diff --git a/official/5.0.30.691/Data Abstract (Common)/Bin/DAADODrv.dad b/official/5.0.30.691/Data Abstract (Common)/Bin/DAADODrv.dad
new file mode 100644
index 0000000..4a81079
Binary files /dev/null and b/official/5.0.30.691/Data Abstract (Common)/Bin/DAADODrv.dad differ
diff --git a/official/5.0.30.691/Data Abstract (Common)/Bin/DAAnyDACDrv.dad b/official/5.0.30.691/Data Abstract (Common)/Bin/DAAnyDACDrv.dad
new file mode 100644
index 0000000..fee99ca
Binary files /dev/null and b/official/5.0.30.691/Data Abstract (Common)/Bin/DAAnyDACDrv.dad differ
diff --git a/official/5.0.30.691/Data Abstract (Common)/Bin/DABDEDrv.dad b/official/5.0.30.691/Data Abstract (Common)/Bin/DABDEDrv.dad
new file mode 100644
index 0000000..0f3feb7
Binary files /dev/null and b/official/5.0.30.691/Data Abstract (Common)/Bin/DABDEDrv.dad differ
diff --git a/official/5.0.30.691/Data Abstract (Common)/Bin/DAConverter.exe b/official/5.0.30.691/Data Abstract (Common)/Bin/DAConverter.exe
new file mode 100644
index 0000000..962befe
Binary files /dev/null and b/official/5.0.30.691/Data Abstract (Common)/Bin/DAConverter.exe differ
diff --git a/official/5.0.30.691/Data Abstract (Common)/Bin/DADBISAM3Drv.dad b/official/5.0.30.691/Data Abstract (Common)/Bin/DADBISAM3Drv.dad
new file mode 100644
index 0000000..5529423
Binary files /dev/null and b/official/5.0.30.691/Data Abstract (Common)/Bin/DADBISAM3Drv.dad differ
diff --git a/official/5.0.30.691/Data Abstract (Common)/Bin/DADBISAM4Drv.dad b/official/5.0.30.691/Data Abstract (Common)/Bin/DADBISAM4Drv.dad
new file mode 100644
index 0000000..69b330c
Binary files /dev/null and b/official/5.0.30.691/Data Abstract (Common)/Bin/DADBISAM4Drv.dad differ
diff --git a/official/5.0.30.691/Data Abstract (Common)/Bin/DADBXDrv.dad b/official/5.0.30.691/Data Abstract (Common)/Bin/DADBXDrv.dad
new file mode 100644
index 0000000..c5490dd
Binary files /dev/null and b/official/5.0.30.691/Data Abstract (Common)/Bin/DADBXDrv.dad differ
diff --git a/official/5.0.30.691/Data Abstract (Common)/Bin/DAElevateDBDrv.dad b/official/5.0.30.691/Data Abstract (Common)/Bin/DAElevateDBDrv.dad
new file mode 100644
index 0000000..9fbc98e
Binary files /dev/null and b/official/5.0.30.691/Data Abstract (Common)/Bin/DAElevateDBDrv.dad differ
diff --git a/official/5.0.30.691/Data Abstract (Common)/Bin/DAFIBDrv.dad b/official/5.0.30.691/Data Abstract (Common)/Bin/DAFIBDrv.dad
new file mode 100644
index 0000000..5d83138
Binary files /dev/null and b/official/5.0.30.691/Data Abstract (Common)/Bin/DAFIBDrv.dad differ
diff --git a/official/5.0.30.691/Data Abstract (Common)/Bin/DAIBDACDrv.dad b/official/5.0.30.691/Data Abstract (Common)/Bin/DAIBDACDrv.dad
new file mode 100644
index 0000000..f01e44e
Binary files /dev/null and b/official/5.0.30.691/Data Abstract (Common)/Bin/DAIBDACDrv.dad differ
diff --git a/official/5.0.30.691/Data Abstract (Common)/Bin/DAIBODrv.dad b/official/5.0.30.691/Data Abstract (Common)/Bin/DAIBODrv.dad
new file mode 100644
index 0000000..3fcb46a
Binary files /dev/null and b/official/5.0.30.691/Data Abstract (Common)/Bin/DAIBODrv.dad differ
diff --git a/official/5.0.30.691/Data Abstract (Common)/Bin/DAIBXDrv.dad b/official/5.0.30.691/Data Abstract (Common)/Bin/DAIBXDrv.dad
new file mode 100644
index 0000000..bd533b5
Binary files /dev/null and b/official/5.0.30.691/Data Abstract (Common)/Bin/DAIBXDrv.dad differ
diff --git a/official/5.0.30.691/Data Abstract (Common)/Bin/DAMyDACDrv.dad b/official/5.0.30.691/Data Abstract (Common)/Bin/DAMyDACDrv.dad
new file mode 100644
index 0000000..976c172
Binary files /dev/null and b/official/5.0.30.691/Data Abstract (Common)/Bin/DAMyDACDrv.dad differ
diff --git a/official/5.0.30.691/Data Abstract (Common)/Bin/DAMySQLDACDrv.dad b/official/5.0.30.691/Data Abstract (Common)/Bin/DAMySQLDACDrv.dad
new file mode 100644
index 0000000..010b101
Binary files /dev/null and b/official/5.0.30.691/Data Abstract (Common)/Bin/DAMySQLDACDrv.dad differ
diff --git a/official/5.0.30.691/Data Abstract (Common)/Bin/DANexusDBDrv.dad b/official/5.0.30.691/Data Abstract (Common)/Bin/DANexusDBDrv.dad
new file mode 100644
index 0000000..b5338e9
Binary files /dev/null and b/official/5.0.30.691/Data Abstract (Common)/Bin/DANexusDBDrv.dad differ
diff --git a/official/5.0.30.691/Data Abstract (Common)/Bin/DAODACDrv.dad b/official/5.0.30.691/Data Abstract (Common)/Bin/DAODACDrv.dad
new file mode 100644
index 0000000..06f1f04
Binary files /dev/null and b/official/5.0.30.691/Data Abstract (Common)/Bin/DAODACDrv.dad differ
diff --git a/official/5.0.30.691/Data Abstract (Common)/Bin/DAPostgresDACDrv.dad b/official/5.0.30.691/Data Abstract (Common)/Bin/DAPostgresDACDrv.dad
new file mode 100644
index 0000000..cd87a01
Binary files /dev/null and b/official/5.0.30.691/Data Abstract (Common)/Bin/DAPostgresDACDrv.dad differ
diff --git a/official/5.0.30.691/Data Abstract (Common)/Bin/DASDACDrv.dad b/official/5.0.30.691/Data Abstract (Common)/Bin/DASDACDrv.dad
new file mode 100644
index 0000000..120a924
Binary files /dev/null and b/official/5.0.30.691/Data Abstract (Common)/Bin/DASDACDrv.dad differ
diff --git a/official/5.0.30.691/Data Abstract (Common)/Bin/DASQLiteDrv.dad b/official/5.0.30.691/Data Abstract (Common)/Bin/DASQLiteDrv.dad
new file mode 100644
index 0000000..19168db
Binary files /dev/null and b/official/5.0.30.691/Data Abstract (Common)/Bin/DASQLiteDrv.dad differ
diff --git a/official/5.0.30.691/Data Abstract (Common)/Bin/DASchemaModeler.chm b/official/5.0.30.691/Data Abstract (Common)/Bin/DASchemaModeler.chm
new file mode 100644
index 0000000..0a7ab83
Binary files /dev/null and b/official/5.0.30.691/Data Abstract (Common)/Bin/DASchemaModeler.chm differ
diff --git a/official/5.0.30.691/Data Abstract (Common)/Bin/DASchemaModeler.exe b/official/5.0.30.691/Data Abstract (Common)/Bin/DASchemaModeler.exe
new file mode 100644
index 0000000..f373789
Binary files /dev/null and b/official/5.0.30.691/Data Abstract (Common)/Bin/DASchemaModeler.exe differ
diff --git a/official/5.0.30.691/Data Abstract (Common)/Bin/DAServer.exe b/official/5.0.30.691/Data Abstract (Common)/Bin/DAServer.exe
new file mode 100644
index 0000000..cf4efa4
Binary files /dev/null and b/official/5.0.30.691/Data Abstract (Common)/Bin/DAServer.exe differ
diff --git a/official/5.0.30.691/Data Abstract (Common)/Bin/DAZeosDrv.dad b/official/5.0.30.691/Data Abstract (Common)/Bin/DAZeosDrv.dad
new file mode 100644
index 0000000..32c0147
Binary files /dev/null and b/official/5.0.30.691/Data Abstract (Common)/Bin/DAZeosDrv.dad differ
diff --git a/official/5.0.30.691/Data Abstract (Common)/Bin/Data Abstract.lic b/official/5.0.30.691/Data Abstract (Common)/Bin/Data Abstract.lic
new file mode 100644
index 0000000..caf76ce
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract (Common)/Bin/Data Abstract.lic
@@ -0,0 +1,18 @@
+a507280b197eca7b97b161eeea466e51fe9422d92ee144922e41b313f5cafe13fd53b9f968170f88e987ea4e608fd2cecdb644e3027c7a0003bf061bc27713688f3c73a74d39b613075abdb2c1d38d82a6d975ed0f401dd57ac8d73cb4d20223de8b3842acda4604fffb013e416edb7c4fe68fe3dad6dba42e24c55afe5087c736670de1a271beb9df0c3983a7fc35f0cee0ed30a258935f7da0512bdbadab549ff3bda6a487c5d1badf793c3a0f8c0d876f617de2d5f52ed16f29e6680e618b6bed8568dcbaf8336976c0b49cd8a2ee8f863e2fd724fe6dfab01c954bdceb95b9c2e7dfcd96e941ac3a9c08646c59a9d2421a0ef5c7067c73196e1b4df7f82d
+e5553aa72ca05cd68a06209ba085f3635cea59d6504e7c36a16c55ddf95be850b88d430367a6a3ac8734837f5d3792e12329f32059889de37577dc14c9220e73
+Name=Trial
+Email=Trial
+UserId=Trial
+Company=Trial
+LicenseType=Default
+ProductName=Data Abstract
+Version=5
+AllowBeta=0
+Trial=1
+SubscriptionEndDate=2008-05-25
+LicenseFileEndDate=2008-5-24
+StartDate=2008-5-21
+EndDate=2009-2-21
+P1=5774826342213356562
+P2=14998198381424365840
+P3=3317513148
diff --git a/official/5.0.30.691/Data Abstract (Common)/Bin/DefaultConnections.ini b/official/5.0.30.691/Data Abstract (Common)/Bin/DefaultConnections.ini
new file mode 100644
index 0000000..fd8e300
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract (Common)/Bin/DefaultConnections.ini
@@ -0,0 +1,14 @@
+[Delphi]
+AdventureWorks=ADO?AuxDriver=SQLNCLI.1;Server=localhost;Database=AdventureWorks;Schemas=1;Integrated Security=SSPI
+Northwind=ADO?AuxDriver=SQLOLEDB.1;Server=localhost;Database=Northwind;Integrated Security=SSPI
+Employee=IBX?Server=localhost;Database=C:\Program Files\Firebird\Firebird_1_5\examples\EMPLOYEE.FDB;UserID=sysdba;Password=masterkey;
+
+[.NET]
+AdventureWorks=MSSQL2005.NET?Database=AdventureWorks;Server=localhost;Integrated Security=SSPI
+Northwind=MSSQL.NET?Database=Northwind;Server=localhost;Integrated Security=SSPI
+Employee=FB.NET?Server=localhost;Database=C:\Program Files\Firebird\Firebird_1_5\examples\EMPLOYEE.FDB;UserID=sysdba;Password=masterkey;
+
+[Descriptions]
+AdventureWorks_Description=Microsoft SQL Server 2005, localhost
+Northwind_Description=Microsoft SQL Server 2000, localhost
+Employee_Description=Firebird/Interbase, localhost
diff --git a/official/5.0.30.691/Data Abstract (Common)/Bin/borlndmm.dll b/official/5.0.30.691/Data Abstract (Common)/Bin/borlndmm.dll
new file mode 100644
index 0000000..2e3ede2
Binary files /dev/null and b/official/5.0.30.691/Data Abstract (Common)/Bin/borlndmm.dll differ
diff --git a/official/5.0.30.691/Data Abstract (Common)/Bin/dbxasa30.dll b/official/5.0.30.691/Data Abstract (Common)/Bin/dbxasa30.dll
new file mode 100644
index 0000000..3410b2f
Binary files /dev/null and b/official/5.0.30.691/Data Abstract (Common)/Bin/dbxasa30.dll differ
diff --git a/official/5.0.30.691/Data Abstract (Common)/Bin/dbxase30.dll b/official/5.0.30.691/Data Abstract (Common)/Bin/dbxase30.dll
new file mode 100644
index 0000000..1977334
Binary files /dev/null and b/official/5.0.30.691/Data Abstract (Common)/Bin/dbxase30.dll differ
diff --git a/official/5.0.30.691/Data Abstract (Common)/Bin/dbxconnections.ini b/official/5.0.30.691/Data Abstract (Common)/Bin/dbxconnections.ini
new file mode 100644
index 0000000..cd417db
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract (Common)/Bin/dbxconnections.ini
@@ -0,0 +1,192 @@
+[DBXPoolConnection]
+DriverName=DBXPool
+MaxConnections=16
+MinConnections=0
+ConnectTimeout=0
+
+[DBXTraceConnection]
+DriverName=DBXTrace
+;TraceFile=c:\temp\dbxtrace.txt
+;TraceFlags=PARAMETER;ERROR;EXECUTE;COMMAND;CONNECT;TRANSACT;BLOB;MISC;VENDOR;READER;DRIVER_LOAD;METADATA
+;TraceDriver=true
+TraceFlags=NONE
+
+[DB2Connection]
+;DelegateConnection=DBXTraceConnection
+DriverName=DB2
+Database=DBNAME
+User_Name=user
+Password=password
+BlobSize=-1
+ErrorResourceFile=
+LocaleCode=0000
+DB2 TransIsolation=ReadCommited
+Decimal Separator=.
+
+[MySQLConnection]
+;DelegateConnection=DBXTraceConnection
+DriverName=MySQL
+HostName=ServerName
+Database=DBNAME
+User_Name=user
+Password=password
+BlobSize=-1
+ErrorResourceFile=
+LocaleCode=0000
+Compressed=False
+Encrypted=False
+
+
+[OracleConnection]
+;DelegateConnection=DBXTraceConnection
+DriverName=Oracle
+DataBase=Database Name
+User_Name=user
+Password=password
+RowsetSize=20
+BlobSize=-1
+ErrorResourceFile=
+LocaleCode=0000
+Oracle TransIsolation=ReadCommited
+OS Authentication=False
+Multiple Transaction=False
+Trim Char=False
+Decimal Separator=.
+
+[InformixConnection]
+;DelegateConnection=DBXTraceConnection
+DriverName=Informix
+HostName=ServerName
+DataBase=Database Name
+User_Name=user
+Password=password
+BlobSize=-1
+ErrorResourceFile=
+LocaleCode=0000
+Informix TransIsolation=ReadCommited
+Trim Char=False
+
+
+[ASAConnection]
+;DelegateConnection=DBXTraceConnection
+DriverName=ASA
+HostName=ServerName
+Database=DBNAME
+User_Name=user
+Password=password
+ConnectionString=
+BlobSize=-1
+ErrorResourceFile=
+LocaleCode=0000
+ASA TransIsolation=ReadCommited
+
+[ASEConnection]
+;DelegateConnection=DBXTraceConnection
+DriverName=ASE
+HostName=ServerName
+DataBase=Database Name
+User_Name=user
+Password=password
+BlobSize=-1
+ErrorResourceFile=
+LocaleCode=0000
+ASE TransIsolation=ReadCommited
+
+[BlackfishSQLCONNECTION]
+DriverName=BlackfishSQL
+HostName=localhost
+port=2508
+Database=databasename
+create=true
+User_Name=sysdba
+Password=masterkey
+BlobSize=-1
+TransIsolation=ReadCommited
+[Employee]
+DriverName=Interbase
+DriverUnit=DBXDynalink
+DriverPackageLoader=TDBXDynalinkDriverLoader,DbxDynalinkDriver100.bpl
+DriverPackage=DBXCommonDriver110.bpl
+DriverAssemblyLoader=Borland.Data.TDBXDynalinkDriverLoader,Borland.Data.DbxDynalinkDriver,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b
+DriverAssembly=Borland.Data.DbxCommonDriver,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=a91a7c5705831a4f
+Database=localhost:D:\EMPLOYEE.FDB
+RoleName=RoleName
+User_Name=sysdba
+Password=masterkey
+ServerCharSet=
+SQLDialect=3
+BlobSize=-1
+CommitRetain=False
+WaitOnLocks=True
+ErrorResourceFile=
+LocaleCode=0000
+Interbase TransIsolation=ReadCommited
+Trim Char=False
+MetaDataPackageLoader=TDBXInterbaseMetaDataCommandFactory,DbxReadOnlyMetaData100.bpl
+MetaDataAssemblyLoader=Borland.Data.TDBXInterbaseMetaDataCommandFactory,Borland.Data.DbxReadOnlyMetaData,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b
+[MSSQLConnection]
+SchemaOverride=sa.dbo
+DriverName=MSSQL
+HostName=localhost\sqlexpress
+DataBase=adventureWorks
+User_Name=sa
+Password=
+BlobSize=-1
+ErrorResourceFile=
+LocaleCode=0000
+MSSQL TransIsolation=ReadCommited
+OS Authentication=True
+Prepare SQL=False
+[AdventureWorks]
+DriverName=MSSQL
+SchemaOverride=%.dbo
+DriverUnit=DBXDynalink
+DriverPackageLoader=TDBXDynalinkDriverLoader,DBXDynalinkDriver100.bpl
+DriverPackage=DBXCommonDriver110.bpl
+DriverAssemblyLoader=Borland.Data.TDBXDynalinkDriverLoader,Borland.Data.DbxDynalinkDriver,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b
+DriverAssembly=Borland.Data.DbxCommonDriver,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=a91a7c5705831a4f
+HostName=wks1
+DataBase=master
+User_Name=sa
+Password=
+BlobSize=-1
+ErrorResourceFile=
+LocaleCode=0000
+MSSQL TransIsolation=ReadCommited
+OS Authentication=True
+Prepare SQL=False
+MetaDataPackageLoader=TDBXMsSqlMetaDataCommandFactory,DbxReadOnlyMetaData100.bpl
+MetaDataAssemblyLoader=Borland.Data.TDBXMsSqlMetaDataCommandFactory,Borland.Data.DbxReadOnlyMetaData,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b
+[ADO]
+DriverName=MSSQL
+SchemaOverride=%.dbo
+DriverUnit=DBXDynalink
+DriverPackageLoader=TDBXDynalinkDriverLoader
+DriverPackage=DBXCommonDriver110.bpl
+DriverAssemblyLoader=Borland.Data.TDBXDynalinkDriverLoader
+DriverAssembly=Borland.Data.DbxCommonDriver,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=a91a7c5705831a4f
+HostName=localhost
+DataBase=Northwind
+User_Name=sa
+Password=
+BlobSize=-1
+ErrorResourceFile=
+LocaleCode=0000
+MSSQL TransIsolation=ReadCommited
+OS Authentication=True
+Prepare SQL=False
+[IBConnection]
+DriverName=Interbase
+Database=database.gdb
+RoleName=RoleName
+User_Name=sysdba
+Password=masterkey
+ServerCharSet=
+SQLDialect=3
+ErrorResourceFile=
+LocaleCode=0000
+BlobSize=-1
+CommitRetain=False
+WaitOnLocks=True
+Interbase TransIsolation=ReadCommited
+Trim Char=False
diff --git a/official/5.0.30.691/Data Abstract (Common)/Bin/dbxdb230.dll b/official/5.0.30.691/Data Abstract (Common)/Bin/dbxdb230.dll
new file mode 100644
index 0000000..b44bb92
Binary files /dev/null and b/official/5.0.30.691/Data Abstract (Common)/Bin/dbxdb230.dll differ
diff --git a/official/5.0.30.691/Data Abstract (Common)/Bin/dbxdrivers.ini b/official/5.0.30.691/Data Abstract (Common)/Bin/dbxdrivers.ini
new file mode 100644
index 0000000..63a869f
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract (Common)/Bin/dbxdrivers.ini
@@ -0,0 +1,301 @@
+[Installed Drivers]
+DB2=1
+Interbase=1
+MySQL=1
+Oracle=1
+Informix=1
+MSSQL=1
+ASA=1
+ASE=1
+DBXTrace=1
+DBXPool=1
+BlackfishSQL=1
+
+[DBXPool]
+DelegateDriver=True
+DriverName=DBXPool
+DriverUnit=DBXPool
+DriverPackageLoader=TDBXPoolDriverLoader,DBXCommonDriver100.bpl
+DriverPackage=DBXCommonDriver110.bpl
+DriverAssemblyLoader=Borland.Data.TDBXPoolDriverLoader,Borland.Data.DbxCommonDriver,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b
+DriverAssembly=Borland.Data.DbxCommonDriver,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=a91a7c5705831a4f
+
+[DBXTrace]
+DelegateDriver=True
+DriverName=DBXTrace
+DriverUnit=DBXTrace
+DriverPackageLoader=TDBXTraceDriverLoader,DBXCommonDriver100.bpl
+DriverPackage=DBXCommonDriver110.bpl
+DriverAssemblyLoader=Borland.Data.TDBXTraceDriverLoader,Borland.Data.DbxCommonDriver,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b
+DriverAssembly=Borland.Data.DbxCommonDriver,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=a91a7c5705831a4f
+
+[DB2]
+DriverUnit=DBXDynalink
+DriverPackageLoader=TDBXDynalinkDriverLoader,DBXDynalinkDriver100.bpl
+DriverPackage=DBXCommonDriver110.bpl
+DriverAssemblyLoader=Borland.Data.TDBXDynalinkDriverLoader,Borland.Data.DbxDynalinkDriver,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b
+DriverAssembly=Borland.Data.DbxCommonDriver,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=a91a7c5705831a4f
+
+GetDriverFunc=getSQLDriverDB2
+LibraryName=dbxdb230.dll
+VendorLib=db2cli.dll
+Database=DBNAME
+User_Name=user
+Password=password
+BlobSize=-1
+ErrorResourceFile=
+LocaleCode=0000
+DB2 TransIsolation=ReadCommited
+Decimal Separator=.
+MetaDataPackageLoader=TDBXDb2MetaDataCommandFactory,DbxReadOnlyMetaData100.bpl
+MetaDataAssemblyLoader=Borland.Data.TDBXDb2MetaDataCommandFactory,Borland.Data.DbxReadOnlyMetaData,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b
+
+[Interbase]
+DriverUnit=DBXDynalink
+DriverPackageLoader=TDBXDynalinkDriverLoader,DbxDynalinkDriver100.bpl
+DriverPackage=DBXCommonDriver110.bpl
+DriverAssemblyLoader=Borland.Data.TDBXDynalinkDriverLoader,Borland.Data.DbxDynalinkDriver,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b
+DriverAssembly=Borland.Data.DbxCommonDriver,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=a91a7c5705831a4f
+
+GetDriverFunc=getSQLDriverINTERBASE
+LibraryName=dbxint30.dll
+VendorLib=GDS32.DLL
+Database=database.gdb
+RoleName=RoleName
+User_Name=sysdba
+Password=masterkey
+ServerCharSet=
+SQLDialect=3
+BlobSize=-1
+CommitRetain=False
+WaitOnLocks=True
+ErrorResourceFile=
+LocaleCode=0000
+Interbase TransIsolation=ReadCommited
+Trim Char=False
+MetaDataPackageLoader=TDBXInterbaseMetaDataCommandFactory,DbxReadOnlyMetaData100.bpl
+MetaDataAssemblyLoader=Borland.Data.TDBXInterbaseMetaDataCommandFactory,Borland.Data.DbxReadOnlyMetaData,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b
+
+[MySQL]
+DriverUnit=DBXDynalink
+DriverPackageLoader=TDBXDynalinkDriverLoader,DbxDynalinkDriver100.bpl
+DriverPackage=DBXCommonDriver110.bpl
+DriverAssemblyLoader=Borland.Data.TDBXDynalinkDriverLoader,Borland.Data.DbxDynalinkDriver,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b
+DriverAssembly=Borland.Data.DbxCommonDriver,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=a91a7c5705831a4f
+
+GetDriverFunc=getSQLDriverMYSQL
+LibraryName=dbxmys30.dll
+VendorLib=LIBMYSQL.dll
+HostName=ServerName
+Database=DBNAME
+User_Name=user
+Password=password
+BlobSize=-1
+ErrorResourceFile=
+LocaleCode=0000
+Compressed=False
+Encrypted=False
+MetaDataPackageLoader=TDBXMySqlMetaDataCommandFactory,DbxReadOnlyMetaData100.bpl
+MetaDataAssemblyLoader=Borland.Data.TDBXMySqlMetaDataCommandFactory,Borland.Data.DbxReadOnlyMetaData,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b
+
+[Oracle]
+DriverUnit=DBXDynalink
+DriverPackageLoader=TDBXDynalinkDriverLoader,DBXDynalinkDriver100.bpl
+DriverPackage=DBXCommonDriver110.bpl
+DriverAssemblyLoader=Borland.Data.TDBXDynalinkDriverLoader,Borland.Data.DbxDynalinkDriver,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b
+DriverAssembly=Borland.Data.DbxCommonDriver,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=a91a7c5705831a4f
+
+GetDriverFunc=getSQLDriverORACLE
+LibraryName=dbxora30.dll
+VendorLib=oci.dll
+DataBase=Database Name
+User_Name=user
+Password=password
+BlobSize=-1
+ErrorResourceFile=
+LocaleCode=0000
+Oracle TransIsolation=ReadCommited
+RowsetSize=20
+OS Authentication=False
+Multiple Transaction=False
+Trim Char=False
+Decimal Separator=.
+MetaDataPackageLoader=TDBXOracleMetaDataCommandFactory,DbxReadOnlyMetaData100.bpl
+MetaDataAssemblyLoader=Borland.Data.TDBXOracleMetaDataCommandFactory,Borland.Data.DbxReadOnlyMetaData,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b
+
+[Informix]
+DriverUnit=DBXDynalink
+DriverPackageLoader=TDBXDynalinkDriverLoader,DBXDynalinkDriver100.bpl
+DriverPackage=DBXCommonDriver110.bpl
+DriverAssemblyLoader=Borland.Data.TDBXDynalinkDriverLoader,Borland.Data.DbxDynalinkDriver,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b
+DriverAssembly=Borland.Data.DbxCommonDriver,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=a91a7c5705831a4f
+
+GetDriverFunc=getSQLDriverINFORMIX
+LibraryName=dbxinf30.dll
+VendorLib=isqlt09a.dll
+HostName=ServerName
+DataBase=Database Name
+User_Name=user
+Password=password
+BlobSize=-1
+ErrorResourceFile=
+LocaleCode=0000
+Informix TransIsolation=ReadCommited
+Trim Char=False
+MetaDataPackageLoader=TDBXInformixMetaDataCommandFactory,DbxReadOnlyMetaData100.bpl
+MetaDataAssemblyLoader=Borland.Data.TDBXInformixMetaDataCommandFactory,Borland.Data.DbxReadOnlyMetaData,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b
+
+[MSSQL]
+SchemaOverride=%.dbo
+DriverUnit=DBXDynalink
+DriverPackageLoader=TDBXDynalinkDriverLoader,DBXDynalinkDriver100.bpl
+DriverPackage=DBXCommonDriver110.bpl
+DriverAssemblyLoader=Borland.Data.TDBXDynalinkDriverLoader,Borland.Data.DbxDynalinkDriver,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b
+DriverAssembly=Borland.Data.DbxCommonDriver,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=a91a7c5705831a4f
+
+GetDriverFunc=getSQLDriverMSSQL
+LibraryName=dbxmss30.dll
+VendorLib=oledb
+HostName=ServerName
+DataBase=Database Name
+User_Name=user
+Password=password
+BlobSize=-1
+ErrorResourceFile=
+LocaleCode=0000
+MSSQL TransIsolation=ReadCommited
+OS Authentication=False
+Prepare SQL=False
+MetaDataPackageLoader=TDBXMsSqlMetaDataCommandFactory,DbxReadOnlyMetaData100.bpl
+MetaDataAssemblyLoader=Borland.Data.TDBXMsSqlMetaDataCommandFactory,Borland.Data.DbxReadOnlyMetaData,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b
+
+[ASA]
+DriverUnit=DBXDynalink
+DriverPackageLoader=TDBXDynalinkDriverLoader,DbxDynalinkDriver100.bpl
+DriverPackage=DBXCommonDriver110.bpl
+DriverAssemblyLoader=Borland.Data.TDBXDynalinkDriverLoader,Borland.Data.DbxDynalinkDriver,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b
+DriverAssembly=Borland.Data.DbxCommonDriver,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=a91a7c5705831a4f
+
+GetDriverFunc=getSQLDriverASA
+LibraryName=dbxasa30.dll
+VendorLib=dbodbc9.dll
+HostName=ServerName
+Database=DBNAME
+User_Name=user
+Password=password
+ConnectionString=
+BlobSize=-1
+ErrorResourceFile=
+LocaleCode=0000
+ASA TransIsolation=ReadCommited
+MetaDataPackageLoader=TDBXSybaseASAMetaDataCommandFactory,DbxReadOnlyMetaData100.bpl
+MetaDataAssemblyLoader=Borland.Data.TDBXSybaseASAMetaDataCommandFactory,Borland.Data.DbxReadOnlyMetaData,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b
+
+[ASE]
+DriverUnit=DBXDynalink
+DriverPackageLoader=TDBXDynalinkDriverLoader,DBXDynalinkDriver100.bpl
+DriverPackage=DBXCommonDriver110.bpl
+DriverAssemblyLoader=Borland.Data.TDBXDynalinkDriverLoader,Borland.Data.DbxDynalinkDriver,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b
+DriverAssembly=Borland.Data.DbxCommonDriver,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=a91a7c5705831a4f
+
+GetDriverFunc=getSQLDriverASE
+LibraryName=dbxase30.dll
+VendorLib=libct.dll;libcs.dll
+HostName=ServerName
+DataBase=Database Name
+User_Name=user
+Password=password
+BlobSize=-1
+TDS Packet Size=512
+Client HostName=
+Client AppName=
+ErrorResourceFile=
+LocaleCode=0000
+ASE TransIsolation=ReadCommited
+MetaDataPackageLoader=TDBXSybaseASEMetaDataCommandFactory,DbxReadOnlyMetaData100.bpl
+MetaDataAssemblyLoader=Borland.Data.TDBXSybaseASEMetaDataCommandFactory,Borland.Data.DbxReadOnlyMetaData,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b
+
+[AutoCommit]
+False=0
+True=1
+
+[BlockingMode]
+False=0
+True=1
+
+[WaitOnLocks]
+False=1
+True=0
+
+[CommitRetain]
+False=0
+True=1
+
+[OS Authentication]
+False=0
+True=1
+
+[Multiple Transaction]
+False=0
+True=1
+
+[Trim Char]
+False=0
+True=1
+
+[DB2 TransIsolation]
+DirtyRead=0
+ReadCommited=1
+RepeatableRead=2
+
+[Interbase TransIsolation]
+ReadCommited=1
+RepeatableRead=2
+
+[Oracle TransIsolation]
+DirtyRead=0
+ReadCommited=1
+RepeatableRead=2
+
+[Informix TransIsolation]
+DirtyRead=0
+ReadCommited=1
+RepeatableRead=2
+
+[MSSQL TransIsolation]
+DirtyRead=0
+ReadCommited=1
+RepeatableRead=2
+
+[ASA TransIsolation]
+DirtyRead=0
+ReadCommited=1
+RepeatableRead=2
+
+[ASE TransIsolation]
+DirtyRead=0
+ReadCommited=1
+RepeatableRead=2
+
+[SQLDialect]
+1=0
+2=1
+3=2
+
+[Bdp Providers]
+Oracle=Oracle
+Sybase=Sybase
+Interbase=Interbase
+DB2=DB2
+MySql=MySql
+[BlackfishSQL]
+DriverUnit=DBXClient
+DriverPackageLoader=TDBXClientDriverLoader,DBXClientDriver100.bpl
+DriverAssemblyLoader=Borland.Data.TDBXClientDriverLoader,Borland.Data.DbxClientDriver,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b
+MetaDataPackageLoader=TDBXDataStoreMetaDataCommandFactory,DbxReadOnlyMetaData100.bpl
+MetaDataAssemblyLoader=Borland.Data.TDBXDataStoreMetaDataCommandFactory,Borland.Data.DbxReadOnlyMetaData,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b
+Password=masterkey
+User_Name=sysdba
+Port=2508
+Create=False
+ReadOnlyDb=False
diff --git a/official/5.0.30.691/Data Abstract (Common)/Bin/dbxinf30.dll b/official/5.0.30.691/Data Abstract (Common)/Bin/dbxinf30.dll
new file mode 100644
index 0000000..75f6178
Binary files /dev/null and b/official/5.0.30.691/Data Abstract (Common)/Bin/dbxinf30.dll differ
diff --git a/official/5.0.30.691/Data Abstract (Common)/Bin/dbxint30.dll b/official/5.0.30.691/Data Abstract (Common)/Bin/dbxint30.dll
new file mode 100644
index 0000000..6be9532
Binary files /dev/null and b/official/5.0.30.691/Data Abstract (Common)/Bin/dbxint30.dll differ
diff --git a/official/5.0.30.691/Data Abstract (Common)/Bin/dbxmss30.dll b/official/5.0.30.691/Data Abstract (Common)/Bin/dbxmss30.dll
new file mode 100644
index 0000000..770053b
Binary files /dev/null and b/official/5.0.30.691/Data Abstract (Common)/Bin/dbxmss30.dll differ
diff --git a/official/5.0.30.691/Data Abstract (Common)/Bin/dbxmys30.dll b/official/5.0.30.691/Data Abstract (Common)/Bin/dbxmys30.dll
new file mode 100644
index 0000000..9795083
Binary files /dev/null and b/official/5.0.30.691/Data Abstract (Common)/Bin/dbxmys30.dll differ
diff --git a/official/5.0.30.691/Data Abstract (Common)/Bin/dbxmysA30.dll b/official/5.0.30.691/Data Abstract (Common)/Bin/dbxmysA30.dll
new file mode 100644
index 0000000..e7a34cf
Binary files /dev/null and b/official/5.0.30.691/Data Abstract (Common)/Bin/dbxmysA30.dll differ
diff --git a/official/5.0.30.691/Data Abstract (Common)/Bin/dbxora30.dll b/official/5.0.30.691/Data Abstract (Common)/Bin/dbxora30.dll
new file mode 100644
index 0000000..f39c32d
Binary files /dev/null and b/official/5.0.30.691/Data Abstract (Common)/Bin/dbxora30.dll differ
diff --git a/official/5.0.30.691/Data Abstract (Common)/Bin/dbxoraw30.dll b/official/5.0.30.691/Data Abstract (Common)/Bin/dbxoraw30.dll
new file mode 100644
index 0000000..72fdf4d
Binary files /dev/null and b/official/5.0.30.691/Data Abstract (Common)/Bin/dbxoraw30.dll differ
diff --git a/official/5.0.30.691/Data Abstract (Common)/Bin/sqlite3.dll b/official/5.0.30.691/Data Abstract (Common)/Bin/sqlite3.dll
new file mode 100644
index 0000000..7111873
Binary files /dev/null and b/official/5.0.30.691/Data Abstract (Common)/Bin/sqlite3.dll differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/BACKUP/Launch.exe b/official/5.0.30.691/Data Abstract for Delphi/BACKUP/Launch.exe
new file mode 100644
index 0000000..4b346d2
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/BACKUP/Launch.exe differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/BACKUP/PascalScript_RO_D7.dpk b/official/5.0.30.691/Data Abstract for Delphi/BACKUP/PascalScript_RO_D7.dpk
new file mode 100644
index 0000000..8ece2b8
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/BACKUP/PascalScript_RO_D7.dpk
@@ -0,0 +1,43 @@
+package PascalScript_RO_D7;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Pascal Script - RemObjects SDK 4.0 Integration'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ indy,
+ PascalScript_Core_D7,
+ RemObjects_Core_D7,
+ RemObjects_Indy_D7,
+ dbrtl,
+ vcl,
+ vclx;
+
+contains
+ PascalScript_RO_Reg in 'PascalScript_RO_Reg.pas',
+ uROPSServerLink in 'uROPSServerLink.pas',
+ uROPSImports in 'uROPSImports.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/BACKUP/RegisterDelphiHelp.exe b/official/5.0.30.691/Data Abstract for Delphi/BACKUP/RegisterDelphiHelp.exe
new file mode 100644
index 0000000..9536667
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/BACKUP/RegisterDelphiHelp.exe differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_ADODriver_D10.bpl b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_ADODriver_D10.bpl
new file mode 100644
index 0000000..a18d4a3
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_ADODriver_D10.bpl differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_ADODriver_D10.dcp b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_ADODriver_D10.dcp
new file mode 100644
index 0000000..ca02594
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_ADODriver_D10.dcp differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_BDEDriver_D10.bpl b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_BDEDriver_D10.bpl
new file mode 100644
index 0000000..6a571d0
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_BDEDriver_D10.bpl differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_BDEDriver_D10.dcp b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_BDEDriver_D10.dcp
new file mode 100644
index 0000000..af3b8bb
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_BDEDriver_D10.dcp differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_Core_D10.bpl b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_Core_D10.bpl
new file mode 100644
index 0000000..6803f8c
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_Core_D10.bpl differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_Core_D10.dcp b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_Core_D10.dcp
new file mode 100644
index 0000000..4bac9f7
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_Core_D10.dcp differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_DBXDriver_D10.bpl b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_DBXDriver_D10.bpl
new file mode 100644
index 0000000..4e59425
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_DBXDriver_D10.bpl differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_DBXDriver_D10.dcp b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_DBXDriver_D10.dcp
new file mode 100644
index 0000000..e753f45
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_DBXDriver_D10.dcp differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_IBXDriver_D10.bpl b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_IBXDriver_D10.bpl
new file mode 100644
index 0000000..e9ff500
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_IBXDriver_D10.bpl differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_IBXDriver_D10.dcp b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_IBXDriver_D10.dcp
new file mode 100644
index 0000000..890da19
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_IBXDriver_D10.dcp differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_IDE_D10.bpl b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_IDE_D10.bpl
new file mode 100644
index 0000000..f59087f
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_IDE_D10.bpl differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_IDE_D10.dcp b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_IDE_D10.dcp
new file mode 100644
index 0000000..f2c5ad1
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_IDE_D10.dcp differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_SQLiteDriver_D10.bpl b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_SQLiteDriver_D10.bpl
new file mode 100644
index 0000000..747e03f
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_SQLiteDriver_D10.bpl differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_SQLiteDriver_D10.dcp b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_SQLiteDriver_D10.dcp
new file mode 100644
index 0000000..c650932
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_SQLiteDriver_D10.dcp differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_Scripting_D10.bpl b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_Scripting_D10.bpl
new file mode 100644
index 0000000..1553017
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_Scripting_D10.bpl differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_Scripting_D10.dcp b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_Scripting_D10.dcp
new file mode 100644
index 0000000..2b45139
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D10/DataAbstract_Scripting_D10.dcp differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_ADODriver_D11.bpl b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_ADODriver_D11.bpl
new file mode 100644
index 0000000..090a726
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_ADODriver_D11.bpl differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_ADODriver_D11.dcp b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_ADODriver_D11.dcp
new file mode 100644
index 0000000..1b0e14a
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_ADODriver_D11.dcp differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_BDEDriver_D11.bpl b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_BDEDriver_D11.bpl
new file mode 100644
index 0000000..509c0c0
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_BDEDriver_D11.bpl differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_BDEDriver_D11.dcp b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_BDEDriver_D11.dcp
new file mode 100644
index 0000000..14eb1ad
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_BDEDriver_D11.dcp differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_Core_D11.bpl b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_Core_D11.bpl
new file mode 100644
index 0000000..6437d9c
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_Core_D11.bpl differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_Core_D11.dcp b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_Core_D11.dcp
new file mode 100644
index 0000000..124a366
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_Core_D11.dcp differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_DBXDriver_D11.bpl b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_DBXDriver_D11.bpl
new file mode 100644
index 0000000..755a2b0
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_DBXDriver_D11.bpl differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_DBXDriver_D11.dcp b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_DBXDriver_D11.dcp
new file mode 100644
index 0000000..3c7a6a6
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_DBXDriver_D11.dcp differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_IBXDriver_D11.bpl b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_IBXDriver_D11.bpl
new file mode 100644
index 0000000..bf9a7cd
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_IBXDriver_D11.bpl differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_IBXDriver_D11.dcp b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_IBXDriver_D11.dcp
new file mode 100644
index 0000000..08daa23
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_IBXDriver_D11.dcp differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_IDE_D11.bpl b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_IDE_D11.bpl
new file mode 100644
index 0000000..285bcfd
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_IDE_D11.bpl differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_IDE_D11.dcp b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_IDE_D11.dcp
new file mode 100644
index 0000000..7b975a8
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_IDE_D11.dcp differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_SQLiteDriver_D11.bpl b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_SQLiteDriver_D11.bpl
new file mode 100644
index 0000000..7f44816
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_SQLiteDriver_D11.bpl differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_SQLiteDriver_D11.dcp b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_SQLiteDriver_D11.dcp
new file mode 100644
index 0000000..c22bb55
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_SQLiteDriver_D11.dcp differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_Scripting_D11.bpl b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_Scripting_D11.bpl
new file mode 100644
index 0000000..b0af576
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_Scripting_D11.bpl differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_Scripting_D11.dcp b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_Scripting_D11.dcp
new file mode 100644
index 0000000..2ff4d99
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D11/DataAbstract_Scripting_D11.dcp differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_ADODriver_D6.bpl b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_ADODriver_D6.bpl
new file mode 100644
index 0000000..1e8ca58
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_ADODriver_D6.bpl differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_ADODriver_D6.dcp b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_ADODriver_D6.dcp
new file mode 100644
index 0000000..d9bc35d
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_ADODriver_D6.dcp differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_BDEDriver_D6.bpl b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_BDEDriver_D6.bpl
new file mode 100644
index 0000000..8ca8c9a
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_BDEDriver_D6.bpl differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_BDEDriver_D6.dcp b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_BDEDriver_D6.dcp
new file mode 100644
index 0000000..ba36c18
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_BDEDriver_D6.dcp differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_Core_D6.bpl b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_Core_D6.bpl
new file mode 100644
index 0000000..078904e
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_Core_D6.bpl differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_Core_D6.dcp b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_Core_D6.dcp
new file mode 100644
index 0000000..8c280e6
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_Core_D6.dcp differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_DBXDriver_D6.bpl b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_DBXDriver_D6.bpl
new file mode 100644
index 0000000..b3116e8
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_DBXDriver_D6.bpl differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_DBXDriver_D6.dcp b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_DBXDriver_D6.dcp
new file mode 100644
index 0000000..c20f4ce
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_DBXDriver_D6.dcp differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_IBXDriver_D6.bpl b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_IBXDriver_D6.bpl
new file mode 100644
index 0000000..415b138
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_IBXDriver_D6.bpl differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_IBXDriver_D6.dcp b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_IBXDriver_D6.dcp
new file mode 100644
index 0000000..6a1d438
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_IBXDriver_D6.dcp differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_IDE_D6.bpl b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_IDE_D6.bpl
new file mode 100644
index 0000000..d1f0a29
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_IDE_D6.bpl differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_IDE_D6.dcp b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_IDE_D6.dcp
new file mode 100644
index 0000000..d372c65
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_IDE_D6.dcp differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_SQLiteDriver_D6.bpl b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_SQLiteDriver_D6.bpl
new file mode 100644
index 0000000..b864f31
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_SQLiteDriver_D6.bpl differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_SQLiteDriver_D6.dcp b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_SQLiteDriver_D6.dcp
new file mode 100644
index 0000000..24d8db7
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_SQLiteDriver_D6.dcp differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_Scripting_D6.bpl b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_Scripting_D6.bpl
new file mode 100644
index 0000000..25a05d1
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_Scripting_D6.bpl differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_Scripting_D6.dcp b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_Scripting_D6.dcp
new file mode 100644
index 0000000..0196767
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D6/DataAbstract_Scripting_D6.dcp differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_ADODriver_D7.bpl b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_ADODriver_D7.bpl
new file mode 100644
index 0000000..c7738f7
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_ADODriver_D7.bpl differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_ADODriver_D7.dcp b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_ADODriver_D7.dcp
new file mode 100644
index 0000000..ff73bf9
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_ADODriver_D7.dcp differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_BDEDriver_D7.bpl b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_BDEDriver_D7.bpl
new file mode 100644
index 0000000..cdbe433
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_BDEDriver_D7.bpl differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_BDEDriver_D7.dcp b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_BDEDriver_D7.dcp
new file mode 100644
index 0000000..09c2b25
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_BDEDriver_D7.dcp differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_Core_D7.bpl b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_Core_D7.bpl
new file mode 100644
index 0000000..1babf29
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_Core_D7.bpl differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_Core_D7.dcp b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_Core_D7.dcp
new file mode 100644
index 0000000..c1998ca
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_Core_D7.dcp differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_DBXDriver_D7.bpl b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_DBXDriver_D7.bpl
new file mode 100644
index 0000000..1cbd230
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_DBXDriver_D7.bpl differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_DBXDriver_D7.dcp b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_DBXDriver_D7.dcp
new file mode 100644
index 0000000..adeda6e
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_DBXDriver_D7.dcp differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_IBXDriver_D7.bpl b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_IBXDriver_D7.bpl
new file mode 100644
index 0000000..c3346f7
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_IBXDriver_D7.bpl differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_IBXDriver_D7.dcp b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_IBXDriver_D7.dcp
new file mode 100644
index 0000000..c753dfe
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_IBXDriver_D7.dcp differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_IDE_D7.bpl b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_IDE_D7.bpl
new file mode 100644
index 0000000..11d2f87
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_IDE_D7.bpl differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_IDE_D7.dcp b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_IDE_D7.dcp
new file mode 100644
index 0000000..c6d31d0
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_IDE_D7.dcp differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_SQLiteDriver_D7.bpl b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_SQLiteDriver_D7.bpl
new file mode 100644
index 0000000..33a9d91
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_SQLiteDriver_D7.bpl differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_SQLiteDriver_D7.dcp b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_SQLiteDriver_D7.dcp
new file mode 100644
index 0000000..348a049
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_SQLiteDriver_D7.dcp differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_Scripting_D7.bpl b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_Scripting_D7.bpl
new file mode 100644
index 0000000..851d7f3
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_Scripting_D7.bpl differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_Scripting_D7.dcp b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_Scripting_D7.dcp
new file mode 100644
index 0000000..3cdade6
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Dcu/D7/DataAbstract_Scripting_D7.dcp differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Help/RegisterDelphiHelp.exe b/official/5.0.30.691/Data Abstract for Delphi/Help/RegisterDelphiHelp.exe
new file mode 100644
index 0000000..9536667
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Help/RegisterDelphiHelp.exe differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Help/RemObjects Data Abstract for Delphi.als b/official/5.0.30.691/Data Abstract for Delphi/Help/RemObjects Data Abstract for Delphi.als
new file mode 100644
index 0000000..5d5a627
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Help/RemObjects Data Abstract for Delphi.als
@@ -0,0 +1,542 @@
+edaschemamodeleronly
+edaschemamodeleronly_object
+idaadoconnection
+idaadoconnection_object
+idaadoconnection_providername
+idaadoconnection_providertype
+idaconnection
+idaconnection_begintransaction
+idaconnection_close
+idaconnection_committransaction
+idaconnection_connected
+idaconnection_connectionstring
+idaconnection_intransaction
+idaconnection_name
+idaconnection_newcommand
+idaconnection_newdataset
+idaconnection_object
+idaconnection_open
+idaconnection_password
+idaconnection_rollbacktransaction
+idaconnection_userid
+idadataset
+idadataset_active
+idadataset_close
+idadataset_eof
+idadataset_fieldbyname
+idadataset_fieldcount
+idadataset_fields
+idadataset_fieldvalues
+idadataset_isempty
+idadataset_next
+idadataset_object
+idadataset_open
+idadelta
+idadelta_add
+idadelta_changes
+idadelta_clear
+idadelta_count
+idadelta_isnewrecord
+idadelta_keyfieldcount
+idadelta_keyfieldnames
+idadelta_loggedfieldcount
+idadelta_loggedfieldnames
+idadelta_loggedfieldtypes
+idadelta_logicalname
+idadelta_object
+idadelta_removechange
+idaibconnectionproperties
+idaibconnectionproperties_charset
+idaibconnectionproperties_object
+idaibconnectionproperties_role
+idaibconnectionproperties_sqldialect
+idaibtransactionaccess
+idaibtransactionaccess_commit
+idaibtransactionaccess_commitretaining
+idaibtransactionaccess_object
+idaibtransactionaccess_rollback
+idaibtransactionaccess_rollbackretaining
+idaibtransactionaccess_transaction
+idainterbaseconnection
+idainterbaseconnection_object
+idaoracleconnection
+idaoracleconnection_object
+idasqlcommand
+idasqlcommand_execute
+idasqlcommand_name
+idasqlcommand_object
+idasqlcommand_parambyname
+idasqlcommand_params
+idasqlcommand_prepared
+idasqlcommand_refreshparams
+idasqlcommand_sql
+idasqlcommand_where
+tbaseloginservice
+tbaseloginservice_object
+tbaseloginservice_onlogout
+tdaadodatatable
+tdaadodatatable_object
+tdaadodriver
+tdaadodriver_object
+tdabasefield
+tdabasefield_asboolean
+tdabasefield_ascurrency
+tdabasefield_asdatetime
+tdabasefield_asfloat
+tdabasefield_asinteger
+tdabasefield_aslargeint
+tdabasefield_asstring
+tdabasefield_asvariant
+tdabasefield_aswidestring
+tdabasefield_blobtype
+tdabasefield_clear
+tdabasefield_datatype
+tdabasefield_description
+tdabasefield_dictionaryentry
+tdabasefield_generatorname
+tdabasefield_isnull
+tdabasefield_name
+tdabasefield_object
+tdabasefield_size
+tdabasefield_value
+tdabindatastreamer
+tdabindatastreamer_object
+tdabusinessprocessor
+tdabusinessprocessor_businessrulesid
+tdabusinessprocessor_currentchange
+tdabusinessprocessor_currentdelta
+tdabusinessprocessor_deletecommandname
+tdabusinessprocessor_insertcommandname
+tdabusinessprocessor_object
+tdabusinessprocessor_onafterprocesschange
+tdabusinessprocessor_onafterprocessdelta
+tdabusinessprocessor_onbeforeprocesschange
+tdabusinessprocessor_onbeforeprocessdelta
+tdabusinessprocessor_ongeneratesql
+tdabusinessprocessor_onprocesschange
+tdabusinessprocessor_onprocesserror
+tdabusinessprocessor_onrefreshdeltachange
+tdabusinessprocessor_processoroptions
+tdabusinessprocessor_referenceddataset
+tdabusinessprocessor_refreshdatasetname
+tdabusinessprocessor_schema
+tdabusinessprocessor_updatecommandname
+tdabusinessprocessor_updatemode
+tdabusinessprocessor_userupdatefields
+tdacache
+tdacache_object
+tdacdsdatatable
+tdacdsdatatable_nativeloadfromfile
+tdacdsdatatable_nativeloadfromstream
+tdacdsdatatable_nativesavetofile
+tdacdsdatatable_nativesavetostream
+tdacdsdatatable_object
+tdacolumnmapping
+tdacolumnmapping_datasetfield
+tdacolumnmapping_object
+tdacolumnmapping_sqlorigin
+tdacolumnmapping_tablefield
+tdaconnectionmanager
+tdaconnectionmanager_clearpool
+tdaconnectionmanager_connections
+tdaconnectionmanager_drivermanager
+tdaconnectionmanager_maxpoolsize
+tdaconnectionmanager_newconnection
+tdaconnectionmanager_object
+tdaconnectionmanager_onconnectionacquired
+tdaconnectionmanager_onconnectioncreated
+tdaconnectionmanager_onconnectionfailure
+tdaconnectionmanager_onconnectiontimedout
+tdaconnectionmanager_poolbehaviour
+tdaconnectionmanager_poolingenabled
+tdaconnectionmanager_poolsize
+tdaconnectionmanager_pooltimeoutseconds
+tdaconnectionmanager_pooltransactionbehaviour
+tdaconnectionmanager_waitintervalseconds
+tdacustomfield
+tdacustomfield_alignment
+tdacustomfield_businessclassid
+tdacustomfield_calculated
+tdacustomfield_customattributes
+tdacustomfield_defaultvalue
+tdacustomfield_displayformat
+tdacustomfield_displaylabel
+tdacustomfield_displaywidth
+tdacustomfield_editformat
+tdacustomfield_editmask
+tdacustomfield_fieldcollection
+tdacustomfield_inprimarykey
+tdacustomfield_keyfields
+tdacustomfield_loadfromstream
+tdacustomfield_logchanges
+tdacustomfield_lookup
+tdacustomfield_lookupcache
+tdacustomfield_lookupkeyfields
+tdacustomfield_lookupresultfield
+tdacustomfield_lookupsource
+tdacustomfield_object
+tdacustomfield_oldvalue
+tdacustomfield_onchange
+tdacustomfield_onvalidate
+tdacustomfield_readonly
+tdacustomfield_regexpression
+tdacustomfield_required
+tdacustomfield_savetostream
+tdacustomfield_serverautorefresh
+tdacustomfield_visible
+tdadatadictionary
+tdadatadictionary_fields
+tdadatadictionary_object
+tdadatadictionaryfield
+tdadatadictionaryfield_object
+tdadataset
+tdadataset_businessclassid
+tdadataset_businessrulesclient
+tdadataset_businessrulesserver
+tdadataset_fieldbyname
+tdadataset_fields
+tdadataset_object
+tdadatasetprovider
+tdadatasetprovider_datatable
+tdadatasetprovider_object
+tdadatasetrelationship
+tdadatasetrelationship_description
+tdadatasetrelationship_detaildatasetname
+tdadatasetrelationship_detailfields
+tdadatasetrelationship_masterdatasetname
+tdadatasetrelationship_masterfields
+tdadatasetrelationship_name
+tdadatasetrelationship_object
+tdadatasource
+tdadatasource_datatable
+tdadatasource_object
+tdadatastreamer
+tdadatastreamer_object
+tdadatatable
+tdadatatable_active
+tdadatatable_applyupdates
+tdadatatable_businessrulesid
+tdadatatable_cancelupdates
+tdadatatable_close
+tdadatatable_closing
+tdadatatable_delta
+tdadatatable_detailfields
+tdadatatable_detailoptions
+tdadatatable_editing
+tdadatatable_eof
+tdadatatable_fetching
+tdadatatable_fieldbyname
+tdadatatable_fieldcount
+tdadatatable_fields
+tdadatatable_fieldvalues
+tdadatatable_hasdelta
+tdadatatable_hasdeltarecursive
+tdadatatable_isempty
+tdadatatable_loadfromfile
+tdadatatable_loadfromremotesource
+tdadatatable_loadfromstream
+tdadatatable_loadschema
+tdadatatable_loadscript
+tdadatatable_localconnection
+tdadatatable_localdatastreamer
+tdadatatable_localschema
+tdadatatable_logchanges
+tdadatatable_logicalname
+tdadatatable_masterfields
+tdadatatable_mastermappingmode
+tdadatatable_masteroptions
+tdadatatable_masterparamsmappings
+tdadatatable_masterrequestmappings
+tdadatatable_mastersource
+tdadatatable_maxrecords
+tdadatatable_mergedelta
+tdadatatable_object
+tdadatatable_onafterapplyupdates
+tdadatatable_onafterfieldchange
+tdadatatable_onaftermergedelta
+tdadatatable_onbeforeapplyupdates
+tdadatatable_onbeforefieldchange
+tdadatatable_onbeforemergedelta
+tdadatatable_open
+tdadatatable_opening
+tdadatatable_parambyname
+tdadatatable_params
+tdadatatable_readonly
+tdadatatable_recordcount
+tdadatatable_remotedataadapter
+tdadatatable_remotefetchenabled
+tdadatatable_remoteupdatesoptions
+tdadatatable_savetofile
+tdadatatable_savetostream
+tdadatatable_scriptcode
+tdadatatable_storeactive
+tdadatatable_streamingoptions
+tdadatatable_where
+tdadbisamdriver
+tdadbisamdriver_object
+tdadbsessionmanager
+tdadbsessionmanager_clearsessionscommand
+tdadbsessionmanager_clearsessionsoncreate
+tdadbsessionmanager_clearsessionsondestroy
+tdadbsessionmanager_connection
+tdadbsessionmanager_deletesessioncommand
+tdadbsessionmanager_fieldnamecreated
+tdadbsessionmanager_fieldnamedata
+tdadbsessionmanager_fieldnamelastaccessed
+tdadbsessionmanager_fieldnamesessionid
+tdadbsessionmanager_getallsessionidsdataset
+tdadbsessionmanager_getsessioncountdataset
+tdadbsessionmanager_getsessiondataset
+tdadbsessionmanager_insertsessioncommand
+tdadbsessionmanager_object
+tdadbsessionmanager_onconvertguid
+tdadbsessionmanager_schema
+tdadbsessionmanager_updatesessioncommand
+tdadbxdriver
+tdadbxdriver_object
+tdadelta
+tdadelta_add
+tdadelta_changes
+tdadelta_clear
+tdadelta_count
+tdadelta_isnewrecord
+tdadelta_keyfieldcount
+tdadelta_keyfieldnames
+tdadelta_loggedfieldcount
+tdadelta_loggedfieldnames
+tdadelta_loggedfieldtypes
+tdadelta_object
+tdadelta_removechange
+tdadeltachange
+tdadeltachange_changetype
+tdadeltachange_delta
+tdadeltachange_message
+tdadeltachange_newvaluebyname
+tdadeltachange_newvalues
+tdadeltachange_object
+tdadeltachange_oldvaluebyname
+tdadeltachange_oldvalues
+tdadeltachange_recid
+tdadeltachange_refreshedbyserver
+tdadeltachange_status
+tdadiagrams
+tdadiagrams_object
+tdadrivermanager
+tdadrivermanager_autoload
+tdadrivermanager_drivercount
+tdadrivermanager_driverdirectory
+tdadrivermanager_driverinfo
+tdadrivermanager_drivers
+tdadrivermanager_loaddriver
+tdadrivermanager_loaddrivers
+tdadrivermanager_object
+tdadrivermanager_ondriverloaded
+tdadrivermanager_ondriverunloaded
+tdadrivermanager_unloadalldrivers
+tdadrivermanager_unloaddriver
+tdafibdriver
+tdafibdriver_object
+tdafield
+tdafield_calculated
+tdafield_dictionaryentry
+tdafield_inprimarykey
+tdafield_keyfields
+tdafield_lookup
+tdafield_lookupcache
+tdafield_lookupkeyfields
+tdafield_lookupresultfield
+tdafield_lookupsource
+tdafield_object
+tdafield_onchange
+tdafield_onvalidate
+tdagetdatarequest
+tdagetdatarequest_incomingdataparameter
+tdagetdatarequest_object
+tdagetdatarequest_outgoingincludeschemaparameter
+tdagetdatarequest_outgoingmaxrecordsparameter
+tdagetdatarequest_outgoingparamsparameter
+tdagetdatarequest_outgoingtablenamesparameter
+tdagetdatarequest_outgoingtablerequestinfosparameter
+tdagetschemarequest
+tdagetschemarequest_incomingschemaparameter
+tdagetschemarequest_object
+tdagetschemarequest_outgoingfilterparameter
+tdagetscriptsrequest
+tdagetscriptsrequest_incomingscriptparameter
+tdagetscriptsrequest_object
+tdagetscriptsrequest_outgoingtablenamesparameter
+tdaibodriver
+tdaibodriver_object
+tdaibxdriver
+tdaibxdriver_object
+tdamydacdriver
+tdamydacdriver_object
+tdamysqldacdriver
+tdamysqldacdriver_object
+tdaodacdriver
+tdaodacdriver_object
+tdaparam
+tdaparam_asstring
+tdaparam_object
+tdaparam_paramtype
+tdaparam_value
+tdapostgresdacdriver
+tdapostgresdacdriver_object
+tdapoweredbydataabstractbutton
+tdapoweredbydataabstractbutton_object
+tdapsscriptingprovider
+tdapsscriptingprovider_object
+tdapsscriptingprovider_scriptengine
+tdaremotedataadapter
+tdaremotedataadapter_afterapplyupdates
+tdaremotedataadapter_aftergetdatacall
+tdaremotedataadapter_aftergetschemacall
+tdaremotedataadapter_aftergetscriptscall
+tdaremotedataadapter_afterupdatedatacall
+tdaremotedataadapter_applyupdates
+tdaremotedataadapter_beforeapplyupdates
+tdaremotedataadapter_beforegetdatacall
+tdaremotedataadapter_beforegetschemacall
+tdaremotedataadapter_beforegetscriptscall
+tdaremotedataadapter_beforeupdatedatacall
+tdaremotedataadapter_cacheschema
+tdaremotedataadapter_datastreamer
+tdaremotedataadapter_fill
+tdaremotedataadapter_fillschema
+tdaremotedataadapter_fillscripts
+tdaremotedataadapter_flushschema
+tdaremotedataadapter_getdatacall
+tdaremotedataadapter_getschemacall
+tdaremotedataadapter_getscriptscall
+tdaremotedataadapter_object
+tdaremotedataadapter_remoteservice
+tdaremotedataadapter_schema
+tdaremotedataadapter_setupdefaultrequest
+tdaremotedataadapter_setupdefaultrequestv3
+tdaremotedataadapter_updatedatacall
+tdaremotedataadapterrequest
+tdaremotedataadapterrequest_methodname
+tdaremotedataadapterrequest_object
+tdaremotedataadapterrequest_params
+tdaremoteservice
+tdaremoteservice_object
+tdaschema
+tdaschema_clear
+tdaschema_commands
+tdaschema_connectionmanager
+tdaschema_datadictionary
+tdaschema_datasets
+tdaschema_diagrams
+tdaschema_object
+tdaschema_relationships
+tdaschema_updaterules
+tdascriptingprovider
+tdascriptingprovider_object
+tdasdacdriver
+tdasdacdriver_object
+tdasqlcommand
+tdasqlcommand_description
+tdasqlcommand_name
+tdasqlcommand_object
+tdasqlcommand_parambyname
+tdasqlcommand_params
+tdasqlcommand_sqlcommandcollection
+tdasqlcommand_statements
+tdastatement
+tdastatement_columnmappings
+tdastatement_connection
+tdastatement_name
+tdastatement_needsparams
+tdastatement_object
+tdastatement_sql
+tdastatement_statementcollection
+tdastatement_statementtype
+tdastatement_targettable
+tdataabstractservice
+tdataabstractservice_acquireconnection
+tdataabstractservice_afteracquireconnection
+tdataabstractservice_afterexecutecommand
+tdataabstractservice_aftergetdatasetdata
+tdataabstractservice_aftergetdatasetschema
+tdataabstractservice_afterprocessdeltas
+tdataabstractservice_afterreleaseconnection
+tdataabstractservice_allowdataaccess
+tdataabstractservice_allowexecutecommands
+tdataabstractservice_allowexecutesql
+tdataabstractservice_allowschemaaccess
+tdataabstractservice_allowwheresql
+tdataabstractservice_autocreatebusinessprocessors
+tdataabstractservice_beforeacquireconnection
+tdataabstractservice_beforeexecutecommand
+tdataabstractservice_beforegetdatasetdata
+tdataabstractservice_beforegetdatasetschema
+tdataabstractservice_beforeprocessdeltas
+tdataabstractservice_beforereleaseconnection
+tdataabstractservice_connection
+tdataabstractservice_connectionname
+tdataabstractservice_exporteddatatables
+tdataabstractservice_object
+tdataabstractservice_onacquireconnectionfailure
+tdataabstractservice_onbusinessprocessorautocreated
+tdataabstractservice_ongetschemaasxmlevent
+tdataabstractservice_onprocessdeltaserror
+tdataabstractservice_onupdatedatabegintransaction
+tdataabstractservice_onupdatedatacommittransaction
+tdataabstractservice_onupdatedatarollbacktransaction
+tdataabstractservice_processdeltaswithoutupdaterules
+tdataabstractservice_releaseconnection
+tdataabstractservice_servicedatastreamer
+tdataabstractservice_serviceschema
+tdataabstractservice_validatecommandexecution
+tdataabstractservice_validatedatasetaccess
+tdataabstractservice_validatedirectsqlaccess
+tdaupdatedatarequest
+tdaupdatedatarequest_incomingdeltaparameter
+tdaupdatedatarequest_object
+tdaupdatedatarequest_outgoingdeltaparameter
+tdaupdaterule
+tdaupdaterule_datasetname
+tdaupdaterule_dodelete
+tdaupdaterule_doinsert
+tdaupdaterule_doupdate
+tdaupdaterule_failurebehavior
+tdaupdaterule_name
+tdaupdaterule_object
+tdawhere
+tdawhere_addcondition
+tdawhere_addconditions
+tdawhere_addoperator
+tdawhere_addtext
+tdawhere_addvaluegroup
+tdawhere_changed
+tdawhere_clause
+tdawhere_clear
+tdawhere_clientfields
+tdawhere_closebracket
+tdawhere_defaultoperator
+tdawhere_empty
+tdawhere_object
+tdawhere_onchange
+tdawhere_openbracket
+tdaxmldatastreamer
+tdaxmldatastreamer_documentname
+tdaxmldatastreamer_object
+tdaxmldatastreamer_options
+tdaxmldatastreamer_readxslt
+tdaxmldatastreamer_rowoptions
+tdaxmldatastreamer_schemaoptions
+tdaxmldatastreamer_skipnull
+tdaxmldatastreamer_writexslt
+tmultidbloginservice
+tmultidbloginservice_object
+tmultidbloginservice_onlogin
+tsimpleloginservice
+tsimpleloginservice_object
+tsimpleloginservice_onlogin
+userinfo
+userinfo_attributes
+userinfo_object
+userinfo_privileges
+userinfo_sessionid
+userinfo_userdata
+userinfo_userid
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Help/RemObjects Data Abstract for Delphi.cnt b/official/5.0.30.691/Data Abstract for Delphi/Help/RemObjects Data Abstract for Delphi.cnt
new file mode 100644
index 0000000..a8cd6f3
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Help/RemObjects Data Abstract for Delphi.cnt
@@ -0,0 +1,628 @@
+:Base RemObjects Data Abstract for Delphi.hlp>MAIN
+:Title RemObjects Data Abstract for Delphi
+1 Welcome to Data Abstract
+2 Welcome to Data Abstract=id_1
+2 What's New in Data Abstract
+3 What's New in Data Abstract=id_9
+3 Breaking Changes=id_11
+2 Overview of DA Components
+3 Overview of DA Components=id_5
+1 Programming with Data Abstract
+2 Programming with Data Abstract=id_3
+2 Concepts
+3 Concepts=id_35
+3 Schemas=id_38
+3 Database Drivers
+4 Database Drivers=id_33
+4 Driver Components=id_60
+3 Connection Pooling
+4 Connection Pooling=id_41
+3 Transaction Handling
+4 Transaction Handling=id_42
+3 Command and Data Table Parameters
+4 Command and Data Table Parameters=id_43
+3 Where Clauses
+4 Where Clauses=id_45
+3 Master/Detail Relationships
+4 Master/Detail Relationships=id_46
+3 Updates
+4 Updates=id_47
+4 Deltas and Delta Changes=id_79
+4 AutoIncs and Generators=id_72
+4 Update Rules=id_80
+3 Cross Database Support
+4 Cross Database Support=id_49
+4 Column Mapping=id_53
+3 Business Rules Scripts
+4 Business Rules Scripts=id_50
+3 Dynamic Method Binding
+4 Dynamic Method Binding=id_51
+4 The New v4.0 Service Interface=id_109
+2 IDE Integration
+3 IDE Integration=id_36
+3 New Project Templates=id_113
+3 Component Editors
+4 Component Editors=id_114
+4 Remote Data Adapter Design-Time Support=id_116
+4 Data Table Design-Time Support
+5 Data Table Design-Time Support=id_117
+5 Master/Detail Wizard=id_73
+2 Comparing .NET and Delphi Implementations of Data Abstract
+3 Comparing .NET and Delphi Implementations of Data Abstract=id_4
+1 Tools
+2 Schema Modeler
+3 Schema Modeler=id_6
+3 Schema Modeler Overview=id_132
+3 Data Tables Pane=id_54
+3 Commands Pane=id_55
+3 Detail Pane
+4 Detail Pane=id_136
+4 Data Table Details=id_137
+4 Command Details=id_138
+4 Connection Details=id_139
+4 Relationships View=id_70
+4 Data Dictionary Editor=id_140
+4 Update Rules View=id_89
+4 Diagramming and Modeling Support=id_71
+4 Schema Modeler Welcome Page=id_133
+3 Connections Pane
+4 Connections Pane=id_134
+3 Data Explorer
+4 Data Explorer=id_135
+3 SQL Editor
+4 SQL Editor=id_141
+1 Data Abstract Reference
+2 Data Abstract Reference=id_7
+2 Classes
+3 EDASchemaModelerOnly Class=id_155
+3 TBaseLoginService Class
+4 TBaseLoginService Class=id_156
+4 TBaseLoginService.OnLogout Property=id_234
+3 TDAADODataTable Class
+4 TDAADODataTable Class=id_23
+3 TDAADODriver Class
+4 TDAADODriver Class=id_129
+3 TDABaseField Class
+4 TDABaseField Class=id_159
+4 TDABaseField.AsBoolean Property=id_319
+4 TDABaseField.AsCurrency Property=id_320
+4 TDABaseField.AsDateTime Property=id_321
+4 TDABaseField.AsFloat Property=id_322
+4 TDABaseField.AsInteger Property=id_323
+4 TDABaseField.AsLargeInt Property=id_324
+4 TDABaseField.AsString Property=id_325
+4 TDABaseField.AsVariant Property=id_326
+4 TDABaseField.AsWideString Property=id_327
+4 TDABaseField.BlobType Property=id_328
+4 TDABaseField.DataType Property=id_316
+4 TDABaseField.Description Property=id_330
+4 TDABaseField.DictionaryEntry Property=id_331
+4 TDABaseField.GeneratorName Property=id_332
+4 TDABaseField.IsNull Property=id_333
+4 TDABaseField.Name Property=id_315
+4 TDABaseField.Size Property=id_329
+4 TDABaseField.Value Property=id_317
+4 TDABaseField.Clear Method=id_335
+3 TDABinDataStreamer Class
+4 TDABinDataStreamer Class=id_13
+3 TDABusinessProcessor Class
+4 TDABusinessProcessor Class=id_27
+4 TDABusinessProcessor.BusinessRulesID Property=id_380
+4 TDABusinessProcessor.CurrentChange Property=id_381
+4 TDABusinessProcessor.CurrentDelta Property=id_382
+4 TDABusinessProcessor.DeleteCommandName Property=id_383
+4 TDABusinessProcessor.InsertCommandName Property=id_384
+4 TDABusinessProcessor.OnAfterProcessChange Event=id_83
+4 TDABusinessProcessor.OnAfterProcessDelta Event=id_390
+4 TDABusinessProcessor.OnBeforeProcessChange Event=id_82
+4 TDABusinessProcessor.OnBeforeProcessDelta Event=id_81
+4 TDABusinessProcessor.OnGenerateSQL Event=id_391
+4 TDABusinessProcessor.OnProcessChange Event=id_392
+4 TDABusinessProcessor.OnProcessError Event=id_393
+4 TDABusinessProcessor.OnRefreshDeltaChange Event=id_394
+4 TDABusinessProcessor.ProcessorOptions Property=id_218
+4 TDABusinessProcessor.ReferencedDataset Property=id_378
+4 TDABusinessProcessor.RefreshDatasetName Property=id_385
+4 TDABusinessProcessor.Schema Property=id_376
+4 TDABusinessProcessor.UpdateCommandName Property=id_386
+4 TDABusinessProcessor.UpdateMode Property=id_387
+4 TDABusinessProcessor.UserUpdateFields Property=id_388
+3 TDACache Class
+4 TDACache Class=id_30
+3 TDACDSDataTable Class
+4 TDACDSDataTable Class=id_22
+4 TDACDSDataTable.NativeLoadFromFile Method=id_423
+4 TDACDSDataTable.NativeLoadFromStream Method=id_424
+4 TDACDSDataTable.NativeSaveToFile Method=id_425
+4 TDACDSDataTable.NativeSaveToStream Method=id_426
+3 TDAColumnMapping Class
+4 TDAColumnMapping Class=id_161
+4 TDAColumnMapping.DatasetField Property=id_93
+4 TDAColumnMapping.SQLOrigin Property=id_95
+4 TDAColumnMapping.TableField Property=id_94
+3 TDAConnectionManager Class
+4 TDAConnectionManager Class=id_19
+4 TDAConnectionManager.Connections Property=id_162
+4 TDAConnectionManager.DriverManager Property=id_174
+4 TDAConnectionManager.MaxPoolSize Property=id_450
+4 TDAConnectionManager.OnConnectionAcquired Event=id_458
+4 TDAConnectionManager.OnConnectionCreated Event=id_459
+4 TDAConnectionManager.OnConnectionFailure Event=id_460
+4 TDAConnectionManager.OnConnectionTimedOut Event=id_461
+4 TDAConnectionManager.PoolBehaviour Property=id_451
+4 TDAConnectionManager.PoolingEnabled Property=id_452
+4 TDAConnectionManager.PoolSize Property=id_454
+4 TDAConnectionManager.PoolTimeoutSeconds Property=id_455
+4 TDAConnectionManager.PoolTransactionBehaviour Property=id_63
+4 TDAConnectionManager.WaitIntervalSeconds Property=id_456
+4 TDAConnectionManager.ClearPool Method=id_463
+4 TDAConnectionManager.NewConnection Method=id_453
+3 TDACustomField Class
+4 TDACustomField Class=id_163
+4 TDACustomField.Alignment Property=id_355
+4 TDACustomField.BusinessClassID Property=id_350
+4 TDACustomField.Calculated Property=id_487
+4 TDACustomField.CustomAttributes Property=id_488
+4 TDACustomField.DefaultValue Property=id_356
+4 TDACustomField.DisplayFormat Property=id_353
+4 TDACustomField.DisplayLabel Property=id_352
+4 TDACustomField.DisplayWidth Property=id_351
+4 TDACustomField.EditFormat Property=id_359
+4 TDACustomField.EditMask Property=id_358
+4 TDACustomField.FieldCollection Property=id_489
+4 TDACustomField.InPrimaryKey Property=id_490
+4 TDACustomField.KeyFields Property=id_491
+4 TDACustomField.LogChanges Property=id_493
+4 TDACustomField.Lookup Property=id_494
+4 TDACustomField.LookupCache Property=id_496
+4 TDACustomField.LookupKeyFields Property=id_497
+4 TDACustomField.LookupResultField Property=id_495
+4 TDACustomField.LookupSource Property=id_492
+4 TDACustomField.OldValue Property=id_498
+4 TDACustomField.OnChange Event=id_504
+4 TDACustomField.OnValidate Event=id_505
+4 TDACustomField.ReadOnly Property=id_357
+4 TDACustomField.RegExpression Property=id_360
+4 TDACustomField.Required Property=id_361
+4 TDACustomField.ServerAutoRefresh Property=id_499
+4 TDACustomField.Visible Property=id_354
+4 LoadFromStream Method
+5 TDACustomField.LoadFromStream Method (IROStream)=id_501
+5 TDACustomField.LoadFromStream Method (TStream)=id_528
+4 SaveToStream Method
+5 TDACustomField.SaveToStream Method (IROStream)=id_502
+5 TDACustomField.SaveToStream Method (TStream)=id_529
+3 TDADataDictionary Class
+4 TDADataDictionary Class=id_21
+4 TDADataDictionary.Fields Property=id_534
+3 TDADataDictionaryField Class
+4 TDADataDictionaryField Class=id_164
+3 TDADataset Class
+4 TDADataset Class=id_165
+4 TDADataset.BusinessRulesClient Property=id_559
+4 TDADataset.Fields Property=id_561
+4 TDADataset.FieldByName Method=id_564
+3 TDADatasetProvider Class
+4 TDADatasetProvider Class=id_26
+4 TDADatasetProvider.DataTable Property=id_574
+3 TDADatasetRelationship Class
+4 TDADatasetRelationship Class=id_168
+4 TDADatasetRelationship.Description Property=id_583
+3 TDADataSource Class
+4 TDADataSource Class=id_24
+4 TDADataSource.DataTable Property=id_599
+3 TDADataStreamer Class
+4 TDADataStreamer Class=id_77
+3 TDADataTable Class
+4 TDADataTable Class=id_25
+4 TDADataTable.Active Property=id_261
+4 TDADataTable.BusinessRulesID Property=id_262
+4 TDADataTable.Closing Property=id_263
+4 TDADataTable.Delta Property=id_170
+4 TDADataTable.DetailFields Property=id_124
+4 TDADataTable.DetailOptions Property=id_210
+4 TDADataTable.Editing Property=id_265
+4 TDADataTable.EOF Property=id_266
+4 TDADataTable.Fetching Property=id_267
+4 TDADataTable.FieldCount Property=id_268
+4 TDADataTable.Fields Property=id_269
+4 TDADataTable.FieldValues Property=id_270
+4 TDADataTable.HasDelta Property=id_271
+4 TDADataTable.HasDeltaRecursive Property=id_272
+4 TDADataTable.IsEmpty Property=id_273
+4 TDADataTable.LocalConnection Property=id_274
+4 TDADataTable.LocalDataStreamer Property=id_275
+4 TDADataTable.LocalSchema Property=id_276
+4 TDADataTable.LogChanges Property=id_278
+4 TDADataTable.LogicalName Property=id_86
+4 TDADataTable.MasterFields Property=id_123
+4 TDADataTable.MasterMappingMode Property=id_128
+4 TDADataTable.MasterOptions Property=id_213
+4 TDADataTable.MasterParamsMappings Property=id_125
+4 TDADataTable.MasterRequestMappings Property=id_126
+4 TDADataTable.MasterSource Property=id_264
+4 TDADataTable.MaxRecords Property=id_279
+4 TDADataTable.OnAfterApplyUpdates Event=id_302
+4 TDADataTable.OnAfterFieldChange Event=id_303
+4 TDADataTable.OnAfterMergeDelta Event=id_304
+4 TDADataTable.OnBeforeApplyUpdates Event=id_305
+4 TDADataTable.OnBeforeFieldChange Event=id_306
+4 TDADataTable.OnBeforeMergeDelta Event=id_307
+4 TDADataTable.Opening Property=id_280
+4 TDADataTable.Params Property=id_281
+4 TDADataTable.ReadOnly Property=id_282
+4 TDADataTable.RecordCount Property=id_283
+4 TDADataTable.RemoteDataAdapter Property=id_284
+4 TDADataTable.RemoteFetchEnabled Property=id_277
+4 TDADataTable.RemoteUpdatesOptions Property=id_220
+4 TDADataTable.ScriptCode Property=id_285
+4 TDADataTable.StoreActive Property=id_286
+4 TDADataTable.StreamingOptions Property=id_223
+4 TDADataTable.Where Property=id_287
+4 TDADataTable.ApplyUpdates Method=id_104
+4 TDADataTable.CancelUpdates Method=id_293
+4 TDADataTable.Close Method=id_294
+4 TDADataTable.FieldByName Method=id_295
+4 TDADataTable.LoadFromFile Method=id_121
+4 TDADataTable.LoadFromRemoteSource Method=id_296
+4 TDADataTable.LoadFromStream Method=id_297
+4 TDADataTable.LoadSchema Method=id_107
+4 TDADataTable.LoadScript Method=id_98
+4 TDADataTable.MergeDelta Method=id_298
+4 TDADataTable.Open Method=id_102
+4 TDADataTable.ParamByName Method=id_299
+4 TDADataTable.SaveToFile Method=id_122
+4 TDADataTable.SaveToStream Method=id_300
+3 TDADBISAMDriver Class
+4 TDADBISAMDriver Class=id_171
+3 TDADBSessionManager Class
+4 TDADBSessionManager Class=id_28
+4 TDADBSessionManager.ClearSessionsCommand Property=id_683
+4 TDADBSessionManager.ClearSessionsOnCreate Property=id_684
+4 TDADBSessionManager.ClearSessionsOnDestroy Property=id_685
+4 TDADBSessionManager.Connection Property=id_673
+4 TDADBSessionManager.DeleteSessionCommand Property=id_677
+4 TDADBSessionManager.FieldNameCreated Property=id_680
+4 TDADBSessionManager.FieldNameData Property=id_679
+4 TDADBSessionManager.FieldNameLastAccessed Property=id_681
+4 TDADBSessionManager.FieldNameSessionID Property=id_678
+4 TDADBSessionManager.GetAllSessionIDsDataset Property=id_686
+4 TDADBSessionManager.GetSessionCountDataSet Property=id_687
+4 TDADBSessionManager.GetSessionDataSet Property=id_674
+4 TDADBSessionManager.InsertSessionCommand Property=id_675
+4 TDADBSessionManager.OnConvertGUID Event=id_689
+4 TDADBSessionManager.Schema Property=id_672
+4 TDADBSessionManager.UpdateSessionCommand Property=id_676
+3 TDADBXDriver Class
+4 TDADBXDriver Class=id_172
+3 TDADelta Class
+4 TDADelta Class=id_173
+4 TDADelta.Changes Property=id_710
+4 TDADelta.Count Property=id_711
+4 TDADelta.KeyFieldCount Property=id_721
+4 TDADelta.KeyFieldNames Property=id_722
+4 TDADelta.LoggedFieldCount Property=id_723
+4 TDADelta.LoggedFieldNames Property=id_724
+4 TDADelta.LoggedFieldTypes Property=id_725
+4 Add Method
+5 TDADelta.Add Method (TDADeltaChange)=id_731
+5 TDADelta.Add Method (integer, TDAChangeType, TDAChangeStatus, string)=id_743
+4 TDADelta.Clear Method
+5 TDADelta.Clear Method=id_732
+4 TDADelta.IsNewRecord Method
+5 TDADelta.IsNewRecord Method=id_733
+4 TDADelta.RemoveChange Method
+5 TDADelta.RemoveChange Method=id_734
+3 TDADeltaChange Class
+4 TDADeltaChange Class=id_84
+4 TDADeltaChange.ChangeType Property=id_746
+4 TDADeltaChange.Delta Property=id_757
+4 TDADeltaChange.Message Property=id_754
+4 TDADeltaChange.NewValueByName Property=id_758
+4 TDADeltaChange.NewValues Property=id_753
+4 TDADeltaChange.OldValueByName Property=id_759
+4 TDADeltaChange.OldValues Property=id_752
+4 TDADeltaChange.RecID Property=id_760
+4 TDADeltaChange.RefreshedByServer Property=id_527
+4 TDADeltaChange.Status Property=id_755
+3 TDADiagrams Class
+4 TDADiagrams Class=id_29
+3 TDADriverManager Class
+4 TDADriverManager Class=id_18
+4 TDADriverManager.AutoLoad Property=id_780
+4 TDADriverManager.DriverCount Property=id_782
+4 TDADriverManager.DriverDirectory Property=id_781
+4 TDADriverManager.DriverInfo Property=id_783
+4 TDADriverManager.Drivers Property=id_784
+4 TDADriverManager.OnDriverLoaded Event=id_786
+4 TDADriverManager.OnDriverUnloaded Event=id_787
+4 TDADriverManager.LoadDriver Method=id_789
+4 TDADriverManager.LoadDrivers Method=id_790
+4 TDADriverManager.UnloadAllDrivers Method=id_791
+4 TDADriverManager.UnloadDriver Method=id_792
+3 TDAFIBDriver Class
+4 TDAFIBDriver Class=id_175
+3 TDAField Class
+4 TDAField Class=id_160
+4 TDAField.Calculated Property=id_813
+4 TDAField.DictionaryEntry Property=id_814
+4 TDAField.InPrimaryKey Property=id_815
+4 TDAField.KeyFields Property=id_816
+4 TDAField.Lookup Property=id_817
+4 TDAField.LookupCache Property=id_818
+4 TDAField.LookupKeyFields Property=id_819
+4 TDAField.LookupResultField Property=id_820
+4 TDAField.LookupSource Property=id_821
+4 TDAField.OnChange Event=id_824
+4 TDAField.OnValidate Event=id_825
+3 TDAGetDataRequest Class
+4 TDAGetDataRequest Class=id_176
+4 TDAGetDataRequest.IncomingDataParameter Property=id_842
+4 TDAGetDataRequest.OutgoingIncludeSchemaParameter Property=id_845
+4 TDAGetDataRequest.OutgoingMaxRecordsParameter Property=id_846
+4 TDAGetDataRequest.OutgoingParamsParameter Property=id_847
+4 TDAGetDataRequest.OutgoingTableNamesParameter Property=id_843
+4 TDAGetDataRequest.OutgoingTableRequestInfosParameter Property=id_848
+3 TDAGetSchemaRequest Class
+4 TDAGetSchemaRequest Class=id_177
+4 TDAGetSchemaRequest.IncomingSchemaParameter Property=id_860
+4 TDAGetSchemaRequest.OutgoingFilterParameter Property=id_862
+3 TDAGetScriptsRequest Class
+4 TDAGetScriptsRequest Class=id_178
+4 TDAGetScriptsRequest.IncomingScriptParameter Property=id_871
+4 TDAGetScriptsRequest.OutgoingTableNamesParameter Property=id_872
+3 TDAIBODriver Class
+4 TDAIBODriver Class=id_179
+3 TDAIBXDriver Class
+4 TDAIBXDriver Class=id_130
+3 TDAMyDACDriver Class
+4 TDAMyDACDriver Class=id_180
+3 TDAMySQLDacDriver Class
+4 TDAMySQLDacDriver Class=id_181
+3 TDAODACDriver Class
+4 TDAODACDriver Class=id_182
+3 TDAParam Class
+4 TDAParam Class=id_44
+4 TDAParam.AsString Property=id_889
+4 TDAParam.ParamType Property=id_887
+4 TDAParam.Value Property=id_890
+3 TDAPostgresDACDriver Class
+4 TDAPostgresDACDriver Class=id_183
+3 TDAPoweredByDataAbstractButton Class
+4 TDAPoweredByDataAbstractButton Class=id_184
+3 TDAPSScriptingProvider Class
+4 TDAPSScriptingProvider Class=id_32
+4 TDAPSScriptingProvider.ScriptEngine Property=id_902
+3 TDARemoteDataAdapter Class
+4 TDARemoteDataAdapter Class=id_12
+4 TDARemoteDataAdapter.AfterApplyUpdates Event=id_915
+4 TDARemoteDataAdapter.AfterGetDataCall Event=id_916
+4 TDARemoteDataAdapter.AfterGetSchemaCall Event=id_917
+4 TDARemoteDataAdapter.AfterGetScriptsCall Event=id_918
+4 TDARemoteDataAdapter.AfterUpdateDataCall Event=id_919
+4 TDARemoteDataAdapter.BeforeApplyUpdates Event=id_920
+4 TDARemoteDataAdapter.BeforeGetDataCall Event=id_921
+4 TDARemoteDataAdapter.BeforeGetSchemaCall Event=id_922
+4 TDARemoteDataAdapter.BeforeGetScriptsCall Event=id_923
+4 TDARemoteDataAdapter.BeforeUpdateDataCall Event=id_924
+4 TDARemoteDataAdapter.CacheSchema Property=id_926
+4 TDARemoteDataAdapter.DataStreamer Property=id_369
+4 TDARemoteDataAdapter.GetDataCall Property=id_101
+4 TDARemoteDataAdapter.GetSchemaCall Property=id_105
+4 TDARemoteDataAdapter.GetScriptsCall Property=id_108
+4 TDARemoteDataAdapter.RemoteService Property=id_911
+4 TDARemoteDataAdapter.Schema Property=id_927
+4 TDARemoteDataAdapter.UpdateDataCall Property=id_78
+4 TDARemoteDataAdapter.ApplyUpdates Method=id_76
+4 TDARemoteDataAdapter.Fill Method=id_103
+4 TDARemoteDataAdapter.FillSchema Method=id_106
+4 TDARemoteDataAdapter.FillScripts Method=id_97
+4 TDARemoteDataAdapter.FlushSchema Method=id_928
+4 TDARemoteDataAdapter.SetupDefaultRequest Method=id_912
+4 TDARemoteDataAdapter.SetupDefaultRequestV3 Method=id_913
+3 TDARemoteDataAdapterRequest Class
+4 TDARemoteDataAdapterRequest Class=id_185
+4 TDARemoteDataAdapterRequest.MethodName Property=id_841
+4 TDARemoteDataAdapterRequest.Params Property=id_635
+3 TDARemoteService Class
+4 TDARemoteService Class=id_31
+3 TDASchema Class
+4 TDASchema Class=id_20
+4 TDASchema.Commands Property=id_186
+4 TDASchema.ConnectionManager Property=id_970
+4 TDASchema.DataDictionary Property=id_971
+4 TDASchema.Datasets Property=id_167
+4 TDASchema.Diagrams Property=id_772
+4 TDASchema.RelationShips Property=id_169
+4 TDASchema.UpdateRules Property=id_187
+4 TDASchema.Clear Method=id_974
+3 TDAScriptingProvider Class
+4 TDAScriptingProvider Class=id_188
+3 TDASDACDriver Class
+4 TDASDACDriver Class=id_190
+3 TDASQLCommand Class
+4 TDASQLCommand Class=id_166
+4 TDASQLCommand.Description Property=id_554
+4 TDASQLCommand.Name Property=id_555
+4 TDASQLCommand.Params Property=id_556
+4 TDASQLCommand.SQLCommandCollection Property=id_557
+4 TDASQLCommand.Statements Property=id_193
+4 TDASQLCommand.ParamByName Method=id_563
+3 TDAStatement Class
+4 TDAStatement Class=id_191
+3 TDataAbstractService Class
+4 TDataAbstractService Class=id_56
+4 TDataAbstractService.AcquireConnection Property=id_1026
+4 TDataAbstractService.AfterAcquireConnection Event=id_1038
+4 TDataAbstractService.AfterExecuteCommand Event=id_1039
+4 TDataAbstractService.AfterGetDatasetData Event=id_1040
+4 TDataAbstractService.AfterGetDatasetSchema Event=id_1041
+4 TDataAbstractService.AfterProcessDeltas Event=id_1042
+4 TDataAbstractService.AfterReleaseConnection Event=id_1043
+4 TDataAbstractService.AllowDataAccess Property=id_1027
+4 TDataAbstractService.AllowExecuteCommands Property=id_1028
+4 TDataAbstractService.AllowExecuteSQL Property=id_1029
+4 TDataAbstractService.AllowSchemaAccess Property=id_1030
+4 TDataAbstractService.AllowWhereSQL Property=id_68
+4 TDataAbstractService.AutoCreateBusinessProcessors Property=id_1031
+4 TDataAbstractService.BeforeAcquireConnection Event=id_1044
+4 TDataAbstractService.BeforeExecuteCommand Event=id_1045
+4 TDataAbstractService.BeforeGetDatasetData Event=id_1046
+4 TDataAbstractService.BeforeGetDatasetSchema Event=id_1047
+4 TDataAbstractService.BeforeProcessDeltas Event=id_1048
+4 TDataAbstractService.BeforeReleaseConnection Event=id_1049
+4 TDataAbstractService.Connection Property=id_1032
+4 TDataAbstractService.ConnectionName Property=id_1033
+4 TDataAbstractService.ExportedDataTables Property=id_1035
+4 TDataAbstractService.OnAcquireConnectionFailure Event=id_1050
+4 TDataAbstractService.OnBusinessProcessorAutoCreated Event=id_1051
+4 TDataAbstractService.OnGetSchemaAsXMLEvent Event=id_863
+4 TDataAbstractService.OnProcessDeltasError Event=id_1052
+4 TDataAbstractService.OnUpdateDataBeginTransaction Event=id_1053
+4 TDataAbstractService.OnUpdateDataCommitTransaction Event=id_1054
+4 TDataAbstractService.OnUpdateDataRollBackTransaction Event=id_1055
+4 TDataAbstractService.ProcessDeltasWithoutUpdateRules Property=id_1036
+4 TDataAbstractService.ServiceDataStreamer Property=id_370
+4 TDataAbstractService.ServiceSchema Property=id_377
+4 TDataAbstractService.ValidateCommandExecution Event=id_1056
+4 TDataAbstractService.ValidateDatasetAccess Event=id_1057
+4 TDataAbstractService.ValidateDirectSQLAccess Event=id_1058
+4 TDataAbstractService.ReleaseConnection Method=id_1034
+3 TDAUpdateDataRequest Class
+4 TDAUpdateDataRequest Class=id_194
+4 TDAUpdateDataRequest.IncomingDeltaParameter Property=id_1101
+4 TDAUpdateDataRequest.OutgoingDeltaParameter Property=id_1100
+3 TDAUpdateRule Class
+4 TDAUpdateRule Class=id_195
+4 TDAUpdateRule.DatasetName Property=id_1111
+4 TDAUpdateRule.DoDelete Property=id_1112
+4 TDAUpdateRule.DoInsert Property=id_1113
+4 TDAUpdateRule.DoUpdate Property=id_1114
+4 TDAUpdateRule.FailureBehavior Property=id_1115
+4 TDAUpdateRule.Name Property=id_1116
+3 TDAWhere Class
+4 TDAWhere Class=id_15
+4 TDAWhere.Changed Property=id_1128
+4 TDAWhere.Clause Property=id_1129
+4 TDAWhere.ClientFields Property=id_1130
+4 TDAWhere.DefaultOperator Property=id_1131
+4 TDAWhere.Empty Property=id_1133
+4 TDAWhere.OnChange Property=id_1134
+4 TDAWhere.AddCondition Method=id_1136
+4 TDAWhere.AddConditions Method=id_1137
+4 TDAWhere.AddOperator Method=id_1132
+4 TDAWhere.AddText Method=id_1138
+4 TDAWhere.AddValueGroup Method=id_1139
+4 TDAWhere.Clear Method=id_1140
+4 TDAWhere.CloseBracket Method=id_17
+4 TDAWhere.OpenBracket Method=id_16
+3 TDAXmlDataStreamer Class
+4 TDAXmlDataStreamer Class=id_14
+4 TDAXmlDataStreamer.DocumentName Property=id_1160
+4 TDAXmlDataStreamer.Options Property=id_1161
+4 TDAXmlDataStreamer.ReadXSLT Property=id_1162
+4 TDAXmlDataStreamer.RowOptions Property=id_1163
+4 TDAXmlDataStreamer.SchemaOptions Property=id_1164
+4 TDAXmlDataStreamer.SkipNull Property=id_1165
+4 TDAXmlDataStreamer.WriteXSLT Property=id_1166
+3 TMultiDbLoginService Class
+4 TMultiDbLoginService Class=id_158
+4 TMultiDbLoginService.OnLogin Event=id_239
+3 TSimpleLoginService Class
+4 TSimpleLoginService Class=id_157
+4 TSimpleLoginService.OnLogin Event=id_238
+3 UserInfo Class
+4 UserInfo Class=id_196
+4 UserInfo.Attributes Property=id_1196
+4 UserInfo.Privileges Property=id_1197
+4 UserInfo.SessionID Property=id_1199
+4 UserInfo.UserData Property=id_1198
+4 UserInfo.UserID Property=id_1200
+2 Interfaces
+3 IDAADOConnection Interface
+4 IDAADOConnection Interface=id_198
+4 IDAADOConnection.ProviderName Property=id_1212
+4 IDAADOConnection.ProviderType Property=id_1213
+3 IDAConnection Interface
+4 IDAConnection Interface=id_39
+4 IDAConnection.Connected Property=id_1215
+4 IDAConnection.ConnectionString Property=id_1218
+4 IDAConnection.InTransaction Property=id_1219
+4 IDAConnection.Name Property=id_1220
+4 IDAConnection.Password Property=id_1221
+4 IDAConnection.UserID Property=id_1222
+4 IDAConnection.BeginTransaction Method=id_1224
+4 IDAConnection.Close Method=id_1217
+4 IDAConnection.CommitTransaction Method=id_1225
+4 IDAConnection.NewCommand Method=id_203
+4 IDAConnection.NewDataset Method=id_201
+4 IDAConnection.Open Method=id_1216
+4 IDAConnection.RollbackTransaction Method=id_1226
+3 IDADataset Interface
+4 IDADataset Interface=id_40
+4 IDADataset.Active Property=id_252
+4 IDADataset.EOF Property=id_255
+4 IDADataset.FieldCount Property=id_257
+4 IDADataset.Fields Property=id_258
+4 IDADataset.FieldValues Property=id_259
+4 IDADataset.IsEmpty Property=id_260
+4 IDADataset.Close Method=id_254
+4 IDADataset.FieldByName Method=id_292
+4 IDADataset.Next Method=id_256
+4 IDADataset.Open Method=id_253
+3 IDADelta Interface
+4 IDADelta Interface=id_48
+4 IDADelta.Changes Property=id_713
+4 IDADelta.Count Property=id_714
+4 IDADelta.KeyFieldCount Property=id_715
+4 IDADelta.KeyFieldNames Property=id_716
+4 IDADelta.LoggedFieldCount Property=id_717
+4 IDADelta.LoggedFieldNames Property=id_718
+4 IDADelta.LoggedFieldTypes Property=id_719
+4 IDADelta.LogicalName Property=id_720
+4 Add Method
+5 Add Method=id_727
+5 IDADelta.Add Method (TDADeltaChange)=id_1288
+5 IDADelta.Add Method (integer, TDAChangeType, TDAChangeStatus, string)=id_1289
+4 IDADelta.Clear Method
+5 IDADelta.Clear Method=id_728
+4 IDADelta.IsNewRecord Method
+5 IDADelta.IsNewRecord Method=id_729
+4 IDADelta.RemoveChange Method
+5 IDADelta.RemoveChange Method=id_730
+3 IDAIBConnectionProperties Interface
+4 IDAIBConnectionProperties Interface=id_202
+4 IDAIBConnectionProperties.Charset Property=id_1297
+4 IDAIBConnectionProperties.Role Property=id_1298
+4 IDAIBConnectionProperties.SQLDialect Property=id_1299
+3 IDAIBTransactionAccess Interface
+4 IDAIBTransactionAccess Interface=id_65
+4 IDAIBTransactionAccess.Transaction Property=id_1307
+4 IDAIBTransactionAccess.Commit Method=id_1310
+4 IDAIBTransactionAccess.CommitRetaining Method=id_1312
+4 IDAIBTransactionAccess.Rollback Method=id_1311
+4 IDAIBTransactionAccess.RollbackRetaining Method=id_1313
+3 IDAInterbaseConnection Interface
+4 IDAInterbaseConnection Interface=id_199
+3 IDAOracleConnection Interface
+4 IDAOracleConnection Interface=id_200
+3 IDASQLCommand Interface
+4 IDASQLCommand Interface=id_59
+4 IDASQLCommand.Name Property=id_247
+4 IDASQLCommand.Params Property=id_248
+4 IDASQLCommand.Prepared Property=id_249
+4 IDASQLCommand.SQL Property=id_250
+4 IDASQLCommand.Where Property=id_251
+4 IDASQLCommand.Execute Method=id_289
+4 IDASQLCommand.ParamByName Method=id_290
+4 IDASQLCommand.RefreshParams Method=id_291
+1 Samples
+2 Samples=id_8
+1 Additional Information
+2 Additional Information=id_1371
+2 FAQs=id_1373
+2 Online Articles=id_1374
+2 Getting Technical Support=id_189
+2 Newsgroups=id_1375
+1 Copyright Notice
+2 Copyright Notice=id_1380
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Help/RemObjects Data Abstract for Delphi.hlp b/official/5.0.30.691/Data Abstract for Delphi/Help/RemObjects Data Abstract for Delphi.hlp
new file mode 100644
index 0000000..fca84f1
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Help/RemObjects Data Abstract for Delphi.hlp differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/INSTALL.LOG b/official/5.0.30.691/Data Abstract for Delphi/INSTALL.LOG
new file mode 100644
index 0000000..95d6385
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/INSTALL.LOG
@@ -0,0 +1,3037 @@
+*** Installation Started 07/29/2008 12:02 ***
+Title: RemObjects Data Abstract for Delphi
+Source: C:\DOCUME~1\Usuario\CONFIG~1\Temp\GLBA.tmp | 07-29-2008 | 12:02:46 | 71680
+Made Dir: C:\Archivos de programa\RemObjects Software
+Made Dir: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\UNWISE.EXE | 07-26-2002 | 18:02:06 | | 153088 | 5be5019b
+RegDB Key: Software\Microsoft\Windows\CurrentVersion\Uninstall\Data Abstract 'Vinci' for Delphi
+RegDB Val: Data Abstract 'Vinci' for Delphi
+RegDB Name: DisplayName
+RegDB Root: 2
+RegDB Key: Software\Microsoft\Windows\CurrentVersion\Uninstall\Data Abstract 'Vinci' for Delphi
+RegDB Val: C:\ARCHIV~1\REMOBJ~1\DATAAB~1\UNWISE.EXE C:\ARCHIV~1\REMOBJ~1\DATAAB~1\INSTALL.LOG
+RegDB Name: UninstallString
+RegDB Root: 2
+RegDB Key: Software\Microsoft\Windows\CurrentVersion\Uninstall\Data Abstract 'Vinci' for Delphi
+RegDB Val: _
+RegDB Name: RegCompany
+RegDB Root: 2
+RegDB Key: Software\Microsoft\Windows\CurrentVersion\Uninstall\Data Abstract 'Vinci' for Delphi
+RegDB Val: _
+RegDB Name: RegOwner
+RegDB Root: 2
+Made Dir: C:\Archivos de programa\RemObjects Software\Everwood
+Made Dir: C:\Archivos de programa\RemObjects Software\Everwood\Bin
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Bin\EWSetRegistryPath.exe | 01-06-2006 | 13:16:34 | | 116224 | 96193577
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Bin\RemObjects_Everwood_D6.bpl | 05-23-2008 | 22:04:30 | 2.0.1.109 | 260096 | e6e2570b
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Bin\RemObjects_Everwood_D7.bpl | 05-23-2008 | 22:04:30 | 2.0.1.109 | 261120 | 25d696eb
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Bin\RemObjects_Everwood_D6.dcp | 05-23-2008 | 22:04:30 | | 84272 | 58e7b3d9
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Bin\RemObjects_Everwood_D7.dcp | 05-23-2008 | 22:04:30 | | 87580 | 23a1d43f
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Bin\RemObjects_Everwood_D9.bpl | 05-23-2008 | 22:04:32 | 2.0.1.109 | 268288 | d2bfe54a
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Bin\RemObjects_Everwood_D9.dcp | 05-23-2008 | 22:04:32 | | 91664 | cfeb76ae
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Bin\RemObjects_Everwood_D10.bpl | 05-23-2008 | 22:04:34 | 2.0.1.109 | 264704 | 4a05b635
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Bin\RemObjects_Everwood_D10.dcp | 05-23-2008 | 22:04:34 | | 91906 | 976a5fee
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Bin\RemObjects_Everwood_D11.bpl | 05-23-2008 | 22:04:34 | 2.0.1.109 | 264704 | 179a9655
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Bin\RemObjects_Everwood_D11.dcp | 05-23-2008 | 22:04:34 | | 91915 | 2886f005
+Made Dir: C:\Archivos de programa\RemObjects Software\Everwood\Source
+Made Dir: C:\Archivos de programa\RemObjects Software\Everwood\Source\Delphi
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Source\Delphi\RemObjects_Everwood_D6.dpk | 10-20-2006 | 22:54:12 | | 1321 | aac43c71
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Source\Delphi\RemObjects_Everwood_D6.cfg | 10-08-2007 | 21:58:00 | | 376 | 584bcad7
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Source\Delphi\RemObjects_Everwood_D6.dof | 10-08-2007 | 21:58:00 | | 5009 | dc2ee817
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Source\Delphi\RemObjects_Everwood_D6.res | 05-23-2008 | 22:04:28 | | 392 | 6787d85b
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Source\Delphi\RemObjects_Everwood_D7.dpk | 10-20-2006 | 22:54:12 | | 1321 | 7229b44a
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Source\Delphi\RemObjects_Everwood_D7.cfg | 10-08-2007 | 21:58:00 | | 540 | 6cd75910
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Source\Delphi\RemObjects_Everwood_D7.dof | 10-08-2007 | 21:58:00 | | 3326 | 770233c0
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Source\Delphi\RemObjects_Everwood_D7.res | 05-23-2008 | 22:04:30 | | 392 | 6787d85b
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Source\Delphi\RemObjects_Everwood_D9.bdsproj | 01-03-2006 | 18:39:24 | | 10398 | aeae826a
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Source\Delphi\RemObjects_Everwood_D9.cfg | 10-08-2007 | 21:58:00 | | 512 | 7e4f5fc8
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Source\Delphi\RemObjects_Everwood_D9.dof | 10-20-2006 | 22:54:12 | | 3535 | b9f87056
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Source\Delphi\RemObjects_Everwood_D9.dpk | 10-20-2006 | 22:54:12 | | 1321 | bc0ed08e
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Source\Delphi\RemObjects_Everwood_D9.res | 05-23-2008 | 22:04:30 | | 392 | 6787d85b
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Source\Delphi\RemObjects_Everwood_D10.bdsproj | 01-03-2006 | 18:39:24 | | 10393 | 5377e35f
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Source\Delphi\RemObjects_Everwood_D10.cfg | 10-08-2007 | 21:58:00 | | 518 | 4ac93bc
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Source\Delphi\RemObjects_Everwood_D10.dpk | 10-20-2006 | 22:54:12 | | 1322 | c217326f
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Source\Delphi\RemObjects_Everwood_D10.res | 05-23-2008 | 22:04:32 | | 392 | 6787d85b
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Source\Delphi\RemObjects_Everwood_D11.dproj | 10-08-2007 | 21:58:00 | | 6790 | 67314d14
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Source\Delphi\RemObjects_Everwood_D11.dpk | 09-13-2007 | 13:16:32 | | 1322 | 1afaba54
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Source\Delphi\RemObjects_Everwood_D11.res | 05-23-2008 | 22:04:34 | | 392 | 6787d85b
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Source\Delphi\uEWOTAMessages.pas | 08-19-2006 | 15:44:52 | | 1601 | 2805e15e
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Source\Delphi\uEWOTANewModuleExpert.pas | 01-27-2007 | 22:39:30 | | 286 | 978aef87
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Source\Delphi\uEWOTANewProjectExpert.pas | 01-27-2007 | 22:39:30 | | 291 | a44ff5d9
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Source\Delphi\uEWOTARepositoryExpert.pas | 01-03-2008 | 19:53:06 | | 9176 | fed76b4c
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Source\Delphi\uEWOTAWizards.pas | 01-27-2007 | 22:39:30 | | 9523 | f87eaa98
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Source\Delphi\uEWSampleInfo.dfm | 05-05-2008 | 11:53:20 | | 36589 | 2398803a
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Source\Delphi\uEWSampleInfo.pas | 10-17-2007 | 15:23:18 | | 3687 | 932f0bf8
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Source\Delphi\uEWStringTools.pas | 08-19-2006 | 15:44:52 | | 998 | 2126883a
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Source\Delphi\uEWTools.pas | 08-19-2006 | 15:44:52 | | 273 | 28c13b3d
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Source\Delphi\uEWWizard.dfm | 01-27-2007 | 22:39:30 | | 19494 | 9e40a13d
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Source\Delphi\uEWWizard.pas | 01-03-2008 | 19:53:06 | | 7398 | 27f975ac
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Source\Delphi\EverwoodIDEResources.res | 05-23-2008 | 22:04:28 | | 15292 | 40e5d0a2
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Source\Delphi\RemObjects_Everwood_Reg.pas | 01-03-2008 | 19:53:06 | | 274 | 10e6f39f
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Source\Delphi\uEWAbout.dfm | 09-25-2005 | 20:55:24 | | 342395 | df9db1f9
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Source\Delphi\uEWAbout.pas | 01-03-2008 | 19:53:06 | | 3012 | 56b9ce9f
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Source\Delphi\uEWHelpers.pas | 01-03-2008 | 19:53:06 | | 2886 | 12b359f2
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Source\Delphi\uEWMenuManager.pas | 01-27-2007 | 22:39:30 | | 9809 | 66eff00e
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Source\Delphi\uEWOTAHelpers.pas | 10-03-2007 | 19:25:02 | | 10578 | 5dba221a
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Source\Delphi\eDefines.inc | 04-28-2008 | 14:24:26 | | 16839 | 252645ba
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Source\Delphi\Everwood.inc | 01-03-2008 | 19:53:06 | | 71 | 7678d69e
+RegDB Key: Software\RemObjects\Everwood for Delphi
+RegDB Val: 1
+RegDB Name: Installed
+RegDB Root: 1
+RegDB Key: Software\RemObjects\Everwood for Delphi
+RegDB Val: C:\Archivos de programa\RemObjects Software\Everwood
+RegDB Name: InstallDir
+RegDB Root: 1
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Bin\RemObjects.Everwood.dll | 05-23-2008 | 21:47:50 | 2.0.1.109 | 360448 | c9dff059
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Bin\RemObjects.Everwood.BDS2.dll | 05-23-2008 | 21:47:50 | 2.0.1.109 | 28672 | b7ad89d5
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Bin\RemObjects.Everwood.BDS3.dll | 05-23-2008 | 21:47:50 | 2.0.1.109 | 28672 | 5b875759
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Bin\RemObjects.Everwood.BDS4.dll | 05-23-2008 | 21:47:52 | 2.0.1.109 | 28672 | 138decdd
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Bin\RemObjects.Everwood.BDS5.dll | 05-23-2008 | 21:48:04 | 2.0.1.109 | 28672 | 6f553738
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Bin\RemObjects.Everwood.VisualStudio.dll | 05-23-2008 | 21:47:52 | 2.0.1.109 | 28672 | 29dd8393
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Bin\RemObjects.Everwood.VisualStudio.2005.dll | 05-23-2008 | 21:48:06 | 2.0.1.109 | 20480 | b5546320
+Made Dir: C:\Archivos de programa\RemObjects Software\Everwood\Bin\1033
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Bin\1033\RemObjects.Everwood.Resources.dll | 05-23-2008 | 21:48:08 | | 34816 | 6e4ada65
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Bin\RemObjects.Everwood.ShDocWv.dll | 03-23-2005 | 20:16:42 | 1.1.0.0 | 45056 | f40d2fd3
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Bin\SHDocVw.dll | 03-23-2005 | 20:23:18 | 1.1.0.0 | 126976 | ebcbceb7
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Bin\Microsoft.VisualStudio.VSIP.Helper.dll | 03-17-2004 | 01:36:20 | 7.0.4077.0 | 77824 | 9a8a7b05
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Bin\Microsoft.VisualStudio.OLE.Interop.dll | 03-17-2004 | 01:36:22 | 7.0.4077.0 | 118784 | fb88135d
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Bin\Microsoft.VisualStudio.Shell.Interop.dll | 03-17-2004 | 01:36:20 | 7.0.4077.0 | 249856 | 7caed748
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Bin\Microsoft.VisualStudio.Shell.Interop.8.0.dll | 04-09-2005 | 03:12:44 | 8.0.50215.44 | 163840 | 40276db7
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Bin\Microsoft.VisualStudio.TextManager.Interop.dll | 03-17-2004 | 01:36:20 | 7.0.4077.0 | 114688 | 6491f7e
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Bin\RemObjects.Everwood.VarReplacer.exe | 03-25-2005 | 21:03:22 | | 3584 | ddf48d20
+Made Dir: C:\Archivos de programa\RemObjects Software\Everwood\Bin\temp
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Bin\temp\gacutil.exe | 09-23-2005 | 07:01:18 | 2.0.50727.42 | 97472 | d289f3d3
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Bin\temp\gacutil.exe.config | 09-22-2005 | 23:22:28 | | 181 | e75546ba
+RegDB Key: Software\RemObjects\Everwood for .NET
+RegDB Val: 1
+RegDB Name: Installed
+RegDB Root: 1
+RegDB Key: Software\RemObjects\Everwood for .NET
+RegDB Val: C:\Archivos de programa\RemObjects Software\Everwood
+RegDB Name: InstallDir
+RegDB Root: 1
+RegDB Key: Software\RemObjects\Everwood for .NET
+RegDB Val:
+RegDB Name: Version
+RegDB Root: 1
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK (Common)
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK (Common)\Bin
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK (Common)\Bin\RemObjects SDK.lic | 05-23-2008 | 22:03:04 | | 945 | 9ea71247
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK (Common)\Bin\ROServiceBuilder.exe | 05-23-2008 | 22:03:24 | 5.0.30.691 | 3168256 | 6e0dee6e
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK (Common)\Bin\ROServiceBuilder3.chm | 05-23-2008 | 22:03:56 | | 1188261 | 6d462597
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK (Common)\Bin\ROServiceBuilder70.bpl | 05-23-2008 | 22:03:18 | 5.0.30.691 | 6818304 | b3d88803
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK (Common)\Bin\vcl70.bpl | 08-09-2002 | 17:00:00 | 7.0.4.453 | 1381376 | ee3f2d0b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK (Common)\Bin\rtl70.bpl | 08-09-2002 | 17:00:00 | 7.0.4.453 | 778240 | cc284be7
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK (Common)\Bin\RODL.exe | 05-23-2008 | 22:04:20 | 5.0.30.691 | 584704 | f7035c48
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK (Common)\Bin\ROSBDefaultEditor.dll | 05-23-2008 | 22:03:34 | 5.0.30.691 | 195584 | 9db1236f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK (Common)\Bin\ROSBDefaultValidator.dll | 05-23-2008 | 22:03:32 | 5.0.30.691 | 30208 | b4075309
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK (Common)\Bin\ROSBStandardViews.dll | 05-23-2008 | 22:03:34 | 5.0.30.691 | 94208 | 8b94f44d
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK (Common)\Bin\ROSBStandardImporters.dll | 05-23-2008 | 22:03:36 | 5.0.30.691 | 172032 | d06f1f63
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK (Common)\Bin\ROSBSOAP.dll | 05-23-2008 | 22:03:38 | 5.0.30.691 | 266240 | e3198777
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK (Common)\Bin\ROSBPasImporter.dll | 05-23-2008 | 22:03:40 | 5.0.30.691 | 46080 | 38ab8ad2
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK (Common)\Bin\ROSBTLBImporter.dll | 05-23-2008 | 22:03:38 | 5.0.30.691 | 52736 | 8cabd8d9
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK (Common)\Bin\ROSBPHP.dll | 05-23-2008 | 22:03:30 | 5.0.30.691 | 51712 | e3c4e705
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK (Common)\Bin\ROSBJSONRPC.dll | 05-23-2008 | 22:03:32 | 5.0.30.691 | 70656 | eea6362e
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK (Common)\Bin\ROSBDelphi.dll | 05-23-2008 | 22:03:26 | 5.0.30.691 | 159232 | 7bd497fc
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK (Common)\Bin\ROSBBCB.dll | 05-23-2008 | 22:03:28 | 5.0.30.691 | 380928 | f95e5946
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK (Common)\Bin\ROMasterServer.exe | 05-23-2008 | 22:04:18 | 5.0.30.691 | 2962944 | 23abd0ae
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK (Common)\Bin\MasterServer_Data
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK (Common)\Bin\MasterServer_Data\MessagesPerSession.nx1 | 03-28-2004 | 01:53:44 | | 32768 | 72745057
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK (Common)\Bin\MasterServer_Data\nxTrans.cfg | 03-28-2004 | 01:53:44 | | 8 | 8b312d43
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK (Common)\Bin\MasterServer_Data\Sessions.nx1 | 03-28-2004 | 01:53:44 | | 32768 | 8f654dbb
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK (Common)\Bin\MasterServer_Data\Messages.nx1 | 03-28-2004 | 01:53:44 | | 40960 | e4a98f7c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK (Common)\Bin\ROCOM.dll | 05-23-2008 | 22:04:12 | 5.0.30.691 | 1270272 | 4ec54cd9
+Self-Register: C:\Archivos de programa\RemObjects Software\RemObjects SDK (Common)\Bin\ROCOM.dll
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK (Common)\Bin\ROServiceTester.exe | 05-23-2008 | 22:04:08 | 5.0.30.691 | 8788992 | d3712e2f
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\ro.png | 05-17-2007 | 13:03:16 | | 10767 | 829fa9a6
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\License.txt | 03-13-2008 | 17:47:10 | | 9459 | 9ae670d8
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Launch.exe | 12-03-2003 | 20:26:00 | | 14848 | 81197b84
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\README.html | 02-22-2008 | 15:00:48 | | 12094 | 98e4b1bf
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Help
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Help\RemObjects SDK for Delphi.hlp | 05-23-2008 | 22:07:22 | | 3671966 | 5f575ba7
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Help\RemObjects SDK for Delphi.cnt | 05-23-2008 | 22:05:48 | | 35546 | 8c8da6a0
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Help\RemObjects SDK for Delphi.als | 05-23-2008 | 22:05:48 | | 20783 | 16e42b1f
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D6
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D6\RemObjects_Core_D6.bpl | 05-23-2008 | 22:04:54 | 5.0.30.691 | 1944576 | b07d62fc
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D6\RemObjects_IDE_D6.bpl | 05-23-2008 | 22:04:56 | 5.0.30.691 | 1472000 | 9a522793
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D6\RemObjects_WebBroker_D6.bpl | 05-23-2008 | 22:04:56 | 5.0.30.691 | 29696 | 3f038e45
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D6\RemObjects_Indy_D6.bpl | 05-23-2008 | 22:04:56 | 5.0.30.691 | 208896 | 4038b0d5
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D6\RemObjects_RODX_D6.bpl | 05-23-2008 | 22:04:58 | 5.0.30.691 | 132096 | 1cc97378
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D6\RemObjects_BPDX_D6.bpl | 05-23-2008 | 22:04:58 | 5.0.30.691 | 41472 | b160eafc
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D6\RemObjects_DataSnap_D6.bpl | 05-23-2008 | 22:05:00 | 5.0.30.691 | 102912 | a0b321d2
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D6\RemObjects_Synapse_D6.bpl | 05-23-2008 | 22:05:00 | 5.0.30.691 | 236544 | b566013c
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D7
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D7\RemObjects_Core_D7.bpl | 05-23-2008 | 22:05:02 | 5.0.30.691 | 1952768 | 2a47fe57
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D7\RemObjects_IDE_D7.bpl | 05-23-2008 | 22:05:02 | 5.0.30.691 | 1473536 | 3b442362
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D7\RemObjects_WebBroker_D7.bpl | 05-23-2008 | 22:05:04 | 5.0.30.691 | 29696 | 660de8ca
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D7\RemObjects_Indy_D7.bpl | 05-23-2008 | 22:05:04 | 5.0.30.691 | 215552 | feffee65
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D7\RemObjects_RODX_D7.bpl | 05-23-2008 | 22:05:04 | 5.0.30.691 | 132608 | 23611be4
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D7\RemObjects_BPDX_D7.bpl | 05-23-2008 | 22:05:06 | 5.0.30.691 | 41472 | 7a4f8390
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D7\RemObjects_DataSnap_D7.bpl | 05-23-2008 | 22:05:06 | 5.0.30.691 | 103424 | f200ef71
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D7\RemObjects_Synapse_D7.bpl | 05-23-2008 | 22:05:06 | 5.0.30.691 | 237056 | 7d619d98
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D10
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D10\RemObjects_Core_D10.bpl | 05-23-2008 | 22:05:08 | 5.0.30.691 | 1951744 | dabe1a4
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D10\RemObjects_IDE_D10.bpl | 05-23-2008 | 22:05:10 | 5.0.30.691 | 1476096 | 7744ce1b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D10\RemObjects_WebBroker_D10.bpl | 05-23-2008 | 22:05:10 | 5.0.30.691 | 29696 | 2c89af9f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D10\RemObjects_RODX_D10.bpl | 05-23-2008 | 22:05:12 | 5.0.30.691 | 132608 | 3747f639
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D10\RemObjects_BPDX_D10.bpl | 05-23-2008 | 22:05:14 | 5.0.30.691 | 41472 | fe6b79b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D10\RemObjects_DataSnap_D10.bpl | 05-23-2008 | 22:05:14 | 5.0.30.691 | 101376 | 6e56632c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D10\RemObjects_Synapse_D10.bpl | 05-23-2008 | 22:05:16 | 5.0.30.691 | 234496 | b615329
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D10\RemObjects_Indy_D10.bpl | 05-23-2008 | 22:05:12 | 5.0.30.691 | 221184 | 6ff1e5
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D11
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D11\RemObjects_Core_D11.bpl | 05-23-2008 | 22:05:18 | 5.0.30.691 | 1951744 | 3861b2a9
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D11\RemObjects_IDE_D11.bpl | 05-23-2008 | 22:05:18 | 5.0.30.691 | 1476096 | df744f8f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D11\RemObjects_WebBroker_D11.bpl | 05-23-2008 | 22:05:20 | 5.0.30.691 | 29696 | c359bf70
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D11\RemObjects_RODX_D11.bpl | 05-23-2008 | 22:05:22 | 5.0.30.691 | 132608 | 80f26081
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D11\RemObjects_BPDX_D11.bpl | 05-23-2008 | 22:05:22 | 5.0.30.691 | 41984 | 8c01dfe7
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D11\RemObjects_DataSnap_D11.bpl | 05-23-2008 | 22:05:24 | 5.0.30.691 | 101376 | cd940fa
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D11\RemObjects_Synapse_D11.bpl | 05-23-2008 | 22:05:24 | 5.0.30.691 | 234496 | a9816406
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D11\RemObjects_Indy_D11.bpl | 05-23-2008 | 22:05:20 | 5.0.30.691 | 221184 | 1bffbc0b
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\DataSnap
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\DataSnap\uRODataSnap.rodl | 01-29-2006 | 17:16:02 | | 3713 | 95566916
+RegDB Key: Software\RemObjects\RemObjects SDK
+RegDB Val:
+RegDB Root: 1
+RegDB Key: Software\RemObjects\RemObjects SDK\KnownRodls
+RegDB Val: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\DataSnap\uRODataSnap.rodl
+RegDB Name: DataSnap
+RegDB Root: 1
+RegDB Key: Software\RemObjects\RemObjects SDK\Variables
+RegDB Val: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi
+RegDB Name: RemObjects SDK for Delphi
+RegDB Root: 1
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D6\RemObjects_Core_D6.dcp | 05-23-2008 | 22:04:54 | | 2412438 | 95650c02
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D6\RemObjects_IDE_D6.dcp | 05-23-2008 | 22:04:56 | | 581059 | 9105c6d9
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D6\RemObjects_WebBroker_D6.dcp | 05-23-2008 | 22:04:56 | | 19603 | 4ab3c44d
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D6\RemObjects_Indy_D6.dcp | 05-23-2008 | 22:04:56 | | 262548 | 4f13cdfd
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D6\RemObjects_RODX_D6.dcp | 05-23-2008 | 22:04:58 | | 217075 | d6d30dd2
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D6\RemObjects_BPDX_D6.dcp | 05-23-2008 | 22:04:58 | | 28657 | 2c86a633
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D6\RemObjects_DataSnap_D6.dcp | 05-23-2008 | 22:05:00 | | 105579 | 37027bcf
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D6\RemObjects_Synapse_D6.dcp | 05-23-2008 | 22:05:00 | | 351939 | 899dca19
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D7\RemObjects_Core_D7.dcp | 05-23-2008 | 22:05:02 | | 2424969 | 96936323
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D7\RemObjects_IDE_D7.dcp | 05-23-2008 | 22:05:02 | | 593584 | 7affb677
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D7\RemObjects_WebBroker_D7.dcp | 05-23-2008 | 22:05:04 | | 20291 | 65da5c0
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D7\RemObjects_Indy_D7.dcp | 05-23-2008 | 22:05:04 | | 272365 | b391eb01
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D7\RemObjects_RODX_D7.dcp | 05-23-2008 | 22:05:04 | | 217928 | 7ec64100
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D7\RemObjects_BPDX_D7.dcp | 05-23-2008 | 22:05:06 | | 29726 | dcded5e0
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D7\RemObjects_DataSnap_D7.dcp | 05-23-2008 | 22:05:06 | | 108946 | fb51179f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D7\RemObjects_Synapse_D7.dcp | 05-23-2008 | 22:05:06 | | 355512 | c4a88713
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D10\RemObjects_Core_D10.dcp | 05-23-2008 | 22:05:08 | | 2557142 | a5ad7deb
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D10\RemObjects_IDE_D10.dcp | 05-23-2008 | 22:05:10 | | 605931 | d3d54e4b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D10\RemObjects_WebBroker_D10.dcp | 05-23-2008 | 22:05:10 | | 20355 | a3dae4fe
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D10\RemObjects_RODX_D10.dcp | 05-23-2008 | 22:05:12 | | 227163 | e43aa495
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D10\RemObjects_BPDX_D10.dcp | 05-23-2008 | 22:05:14 | | 29562 | b5276320
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D10\RemObjects_DataSnap_D10.dcp | 05-23-2008 | 22:05:14 | | 112182 | 81a7e771
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D10\RemObjects_Synapse_D10.dcp | 05-23-2008 | 22:05:16 | | 373553 | aee202b9
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D10\RemObjects_Indy_D10.dcp | 05-23-2008 | 22:05:12 | | 289788 | 3fab203a
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D11\RemObjects_Core_D11.dcp | 05-23-2008 | 22:05:18 | | 2557117 | 1b2da531
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D11\RemObjects_IDE_D11.dcp | 05-23-2008 | 22:05:18 | | 606012 | 665cb7c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D11\RemObjects_WebBroker_D11.dcp | 05-23-2008 | 22:05:20 | | 20384 | 7dfe9e13
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D11\RemObjects_RODX_D11.dcp | 05-23-2008 | 22:05:22 | | 227084 | 26462ed2
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D11\RemObjects_BPDX_D11.dcp | 05-23-2008 | 22:05:22 | | 29579 | b6f943f8
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D11\RemObjects_DataSnap_D11.dcp | 05-23-2008 | 22:05:24 | | 112113 | 4adae2e4
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D11\RemObjects_Synapse_D11.dcp | 05-23-2008 | 22:05:24 | | 373563 | a8d1e502
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Dcu\D11\RemObjects_Indy_D11.dcp | 05-23-2008 | 22:05:20 | | 289739 | fe3ebe6
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\BuildPackages_D7.bpg | 05-21-2008 | 11:20:48 | | 1428 | e4c25f6a
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\BuildPackages_D6.bpg | 05-21-2008 | 11:20:48 | | 1424 | ec47a211
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\BuildPackages_D5.bpg | 04-01-2004 | 20:05:20 | | 1326 | be224155
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\BuildPackages_D10.bdsgroup | 05-21-2008 | 11:20:48 | | 2301 | feb7d934
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\BuildPackages_D11.groupproj | 05-21-2008 | 11:20:48 | | 6021 | b8cabf0b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Core_Reg.res | 12-23-2002 | 05:05:02 | | 5140 | f13f9c8f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Core_Reg.pas | 05-19-2008 | 15:14:34 | | 3547 | 7b0e8bd2
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Core_D7.dpk | 05-19-2008 | 15:14:34 | | 3928 | 68d57d37
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Core_D6.dpk | 05-19-2008 | 15:14:34 | | 3962 | 86afc61f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Core_D5.dpk | 05-19-2008 | 15:14:34 | | 3893 | cf16d71f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Core_D7.res | 05-23-2008 | 22:05:00 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Core_D6.res | 05-23-2008 | 22:04:52 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Core_D5.res | 08-19-2003 | 17:50:26 | | 524 | b44217e7
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Core_D7.dof | 03-12-2007 | 12:41:34 | | 2240 | 9917ab7d
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Core_D6.dof | 03-21-2004 | 16:24:18 | | 1303 | 5f86dfa6
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Core_D5.dof | 05-13-2003 | 20:18:20 | | 1798 | 7f2edaa8
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Core_D10.bdsproj | 01-19-2007 | 19:37:24 | | 10371 | 7fada18e
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Core_D10.dpk | 05-19-2008 | 15:14:34 | | 4029 | ad5b0a24
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Core_D10.res | 05-23-2008 | 22:05:08 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Core_D10.cfg | 03-12-2007 | 12:41:34 | | 625 | e95f7b80
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Core_D11.dproj | 03-26-2008 | 14:13:08 | | 15301 | 8748bdbc
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Core_D11.dpk | 05-19-2008 | 15:14:34 | | 3928 | 2ee1c649
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Core_D11.res | 05-23-2008 | 22:05:16 | | 528 | 72f60ecf
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\RemObjects_IDE_Reg.pas | 02-28-2008 | 10:18:46 | | 6766 | 49948ff5
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\RemObjects_IDE_D7.dpk | 05-21-2008 | 09:26:56 | | 3065 | 344f3dd8
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\RemObjects_IDE_D6.dpk | 05-21-2008 | 09:26:56 | | 3038 | 67ca0d20
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\RemObjects_IDE_D5.dpk | 04-03-2006 | 19:54:52 | | 2243 | 17b957ee
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\RemObjects_IDE_D7.res | 05-23-2008 | 22:05:02 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\RemObjects_IDE_D5.res | 08-19-2003 | 17:50:26 | | 524 | b44217e7
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\RemObjects_IDE_D6.res | 05-23-2008 | 22:04:54 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\RemObjects_IDE_D7.dof | 04-03-2006 | 19:54:52 | | 3289 | 9c225b07
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\RemObjects_IDE_D6.dof | 07-10-2004 | 20:20:14 | | 4792 | e63040c7
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\RemObjects_IDE_D5.dof | 05-13-2003 | 20:18:20 | | 1899 | 6d4f41de
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\RemObjects_IDE_D10.bdsproj | 01-19-2007 | 19:37:24 | | 10437 | f00c9da0
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\RemObjects_IDE_D10.cfg | 01-19-2007 | 19:37:24 | | 772 | d902a5ef
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\RemObjects_IDE_D10.dpk | 05-21-2008 | 09:26:56 | | 3149 | 32ac9ec8
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\RemObjects_IDE_D10.res | 05-23-2008 | 22:05:10 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\RemObjects_IDE_D11.dproj | 03-26-2008 | 12:59:26 | | 10798 | eb5ea400
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\RemObjects_IDE_D11.dpk | 05-21-2008 | 09:26:56 | | 3037 | 951f1f26
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\RemObjects_IDE_D11.res | 05-23-2008 | 22:05:18 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_WebBroker_Reg.pas | 01-05-2006 | 23:12:40 | | 1312 | 9a494e4f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_WebBroker_D7.dpk | 04-01-2004 | 02:59:10 | | 749 | 484ef75c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_WebBroker_D6.dpk | 04-01-2004 | 02:59:10 | | 749 | b5a2387d
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_WebBroker_D5.dpk | 04-01-2004 | 02:59:10 | | 749 | 68e66f5f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_WebBroker_D7.dof | 04-01-2004 | 02:59:10 | | 5028 | 55d9911
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_WebBroker_D6.dof | 04-01-2004 | 02:59:10 | | 1841 | ca10d7c8
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_WebBroker_D5.dof | 03-12-2007 | 12:41:34 | | 2132 | cc075741
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_WebBroker_D7.res | 05-23-2008 | 22:05:04 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_WebBroker_D6.res | 05-23-2008 | 22:04:56 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_WebBroker_D5.res | 04-01-2004 | 02:59:10 | | 520 | 93617178
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_WebBroker_D10.bdsproj | 01-19-2007 | 19:37:24 | | 10321 | af7fb77f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_WebBroker_D10.cfg | 01-19-2007 | 19:37:24 | | 625 | 4c0fb2cb
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_WebBroker_D10.dpk | 01-19-2007 | 19:37:24 | | 844 | 6dacf9e9
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_WebBroker_D10.res | 05-23-2008 | 22:05:10 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_WebBroker_D11.dproj | 03-26-2008 | 14:13:08 | | 5643 | b55046ac
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_WebBroker_D11.dpk | 09-12-2007 | 23:38:30 | | 765 | 9183b6d3
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_WebBroker_D11.res | 05-23-2008 | 22:05:18 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Indy_Reg.pas | 05-22-2007 | 21:09:02 | | 2305 | 60e208e4
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Indy_D7.dpk | 05-22-2007 | 21:09:02 | | 1806 | 9a729c0b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Indy_D6.dpk | 05-22-2007 | 21:09:02 | | 1806 | fa698fd4
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Indy_D5.dpk | 05-22-2007 | 21:09:02 | | 1783 | f90cb013
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Indy_D7.res | 05-23-2008 | 22:05:04 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Indy_D6.res | 05-23-2008 | 22:04:56 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Indy_D5.res | 09-06-2003 | 15:36:58 | | 524 | b44217e7
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Indy_D7.dof | 03-12-2007 | 12:41:34 | | 2233 | 7b9988dd
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Indy_D6.dof | 03-21-2004 | 16:24:18 | | 3181 | 957e6ee5
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Indy_D5.dof | 06-17-2003 | 15:17:20 | | 1666 | 5c79d686
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Indy_D10.bdsproj | 01-19-2007 | 19:37:24 | | 10876 | c76d72bb
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Indy_D10.cfg | 03-12-2007 | 12:41:34 | | 625 | e95f7b80
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Indy_D10.dpk | 05-22-2007 | 21:09:02 | | 1970 | b4b7e97d
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Indy_D10.res | 05-23-2008 | 22:05:12 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Indy_D11.dproj | 03-26-2008 | 14:13:08 | | 7850 | d7150bb7
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Indy_D11.dpk | 09-13-2007 | 14:32:06 | | 1888 | a528d421
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Indy_D11.res | 05-23-2008 | 22:05:20 | | 528 | 72f60ecf
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODX
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODX\RemObjects_RODX_D7.dpk | 02-21-2005 | 15:24:16 | | 1087 | dd3e4e92
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODX\RemObjects_RODX_D6.dpk | 02-21-2005 | 15:24:16 | | 1087 | 5a13eec0
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODX\RemObjects_RODX_D5.dpk | 05-29-2003 | 22:56:32 | | 1066 | 59143c73
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODX\RemObjects_RODX_D7.res | 05-23-2008 | 22:05:04 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODX\RemObjects_RODX_D6.res | 05-23-2008 | 22:04:58 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODX\RemObjects_RODX_D5.res | 09-06-2003 | 15:36:58 | | 524 | b44217e7
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODX\RemObjects_RODX_D7.dof | 04-01-2004 | 02:59:10 | | 2357 | 9f01cc49
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODX\RemObjects_RODX_D6.dof | 03-31-2003 | 20:17:18 | | 1962 | 5eb705fd
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODX\RemObjects_RODX_D5.dof | 06-17-2003 | 15:31:34 | | 1420 | 46367fa7
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODX\RemObjects_RODX_D10.bdsproj | 01-19-2007 | 19:37:24 | | 10322 | 95be4803
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODX\RemObjects_RODX_D10.cfg | 01-19-2007 | 19:37:24 | | 648 | 84739fe3
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODX\RemObjects_RODX_D10.dpk | 01-19-2007 | 19:37:24 | | 1083 | ea3a6300
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODX\RemObjects_RODX_D10.res | 05-23-2008 | 22:05:12 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODX\RemObjects_RODX_D11.dproj | 03-26-2008 | 14:13:08 | | 6721 | f3819e04
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODX\RemObjects_RODX_D11.dpk | 09-12-2007 | 23:38:30 | | 1057 | 2937cea
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODX\RemObjects_RODX_D11.res | 05-23-2008 | 22:05:22 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_BPDX_Reg.pas | 04-04-2007 | 11:54:24 | | 1773 | 4171ef3b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_BPDX_D7.dpk | 03-30-2004 | 18:59:40 | | 766 | 9e4543c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_BPDX_D6.dpk | 03-30-2004 | 18:59:40 | | 758 | 3b8c680c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_BPDX_D5.dpk | 03-30-2004 | 18:59:40 | | 781 | 7fe91ee3
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_BPDX_D7.res | 05-23-2008 | 22:05:06 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_BPDX_D6.res | 05-23-2008 | 22:04:58 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_BPDX_D5.res | 09-06-2003 | 15:36:58 | | 524 | b44217e7
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_BPDX_D7.dof | 03-30-2004 | 18:59:40 | | 3420 | e75f9f7a
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_BPDX_D6.dof | 03-21-2004 | 16:24:18 | | 2100 | 8250c8d5
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_BPDX_D5.dof | 06-17-2003 | 15:17:20 | | 1550 | 2168121c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_BPDX_D10.bdsproj | 01-19-2007 | 19:37:24 | | 10302 | 6089406f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_BPDX_D10.cfg | 01-19-2007 | 19:37:24 | | 611 | 5a60a775
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_BPDX_D10.dpk | 01-19-2007 | 19:37:24 | | 783 | 5b0d9394
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_BPDX_D10.res | 05-23-2008 | 22:05:14 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_BPDX_D11.dproj | 03-26-2008 | 14:13:08 | | 5547 | 9eba8b8b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_BPDX_D11.dpk | 09-12-2007 | 23:38:30 | | 783 | e8b282d6
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_BPDX_D11.res | 05-23-2008 | 22:05:22 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\DataSnap\RemObjects_DataSnap_Reg.pas | 03-29-2004 | 20:18:20 | | 1473 | 8aff7282
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\DataSnap\RemObjects_DataSnap_D6.dpk | 06-07-2007 | 14:25:28 | | 1428 | b810615c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\DataSnap\RemObjects_DataSnap_D7.dpk | 06-07-2007 | 14:25:28 | | 1428 | bbc4cdb0
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\DataSnap\RemObjects_DataSnap_D6.res | 05-23-2008 | 22:04:58 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\DataSnap\RemObjects_DataSnap_D7.res | 05-23-2008 | 22:05:06 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\DataSnap\RemObjects_DataSnap_D6.dof | 03-21-2004 | 16:25:48 | | 3023 | 26fa06ae
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\DataSnap\RemObjects_DataSnap_D7.dof | 03-30-2004 | 18:59:40 | | 2828 | 3df2888c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\DataSnap\RemObjects_DataSnap_D10.bdsproj | 05-12-2007 | 13:59:34 | | 10427 | e4f287f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\DataSnap\RemObjects_DataSnap_D10.cfg | 01-19-2007 | 19:37:24 | | 673 | 59119278
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\DataSnap\RemObjects_DataSnap_D10.dpk | 06-07-2007 | 14:25:28 | | 1430 | 1afd6561
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\DataSnap\RemObjects_DataSnap_D10.res | 05-23-2008 | 22:05:14 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\DataSnap\RemObjects_DataSnap_D11.dproj | 03-26-2008 | 12:59:26 | | 8818 | 4de14f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\DataSnap\RemObjects_DataSnap_D11.dpk | 09-12-2007 | 23:38:30 | | 1420 | e2dd9ac0
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\DataSnap\RemObjects_DataSnap_D11.res | 05-23-2008 | 22:05:22 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Synapse_Reg.pas | 04-23-2008 | 12:34:38 | | 1714 | 1bf23693
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Synapse_D7.dpk | 04-23-2008 | 12:34:38 | | 1563 | e3515421
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Synapse_D7.res | 05-23-2008 | 22:05:06 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Synapse_D7.dof | 03-12-2007 | 12:41:34 | | 2287 | 1cf41cc5
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Synapse_D6.dof | 03-12-2007 | 12:41:34 | | 2238 | 110281c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Synapse_D6.dpk | 04-23-2008 | 12:34:38 | | 1568 | b5830b44
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Synapse_D6.res | 05-23-2008 | 22:05:00 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Synapse_D5.dof | 03-12-2007 | 12:41:34 | | 2227 | b0b8da85
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Synapse_D5.dpk | 04-23-2008 | 12:34:38 | | 1553 | 1d58d736
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Synapse_D5.res | 03-27-2004 | 21:47:34 | | 1880 | 4ea2599b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Synapse_D10.bdsproj | 03-12-2007 | 12:41:34 | | 8465 | acdd26d1
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Synapse_D10.dpk | 04-23-2008 | 12:34:38 | | 1570 | 40abf51d
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Synapse_D10.res | 05-23-2008 | 22:05:14 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Synapse_D10.cfg | 03-12-2007 | 12:41:34 | | 641 | 77d8c8a4
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Synapse_D11.dproj | 04-23-2008 | 12:34:38 | | 6783 | 1e6ecdbe
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Synapse_D11.dpk | 04-23-2008 | 12:34:38 | | 1567 | 2724d80a
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Synapse_D11.res | 05-23-2008 | 22:05:24 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Core_Glyphs.res | 05-23-2008 | 22:04:50 | | 76208 | 7302c118
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_WebBroker_Glyphs.res | 05-23-2008 | 22:04:50 | | 2748 | d438f66d
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Indy_Glyphs.res | 05-23-2008 | 22:04:50 | | 42532 | bde52ca4
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Bpdx_Glyphs.res | 05-23-2008 | 22:04:50 | | 7272 | 88982fc0
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects_Synapse_Glyphs.res | 05-23-2008 | 22:04:50 | | 19108 | 52b9c8b1
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\DataSnap\RemObjects_DataSnap_Glyphs.res | 05-23-2008 | 22:04:52 | | 7344 | 24ff0fc1
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RemObjects.inc | 04-04-2008 | 18:14:18 | | 4416 | 88dc5de5
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\eDefines.inc | 04-28-2008 | 14:24:26 | | 16839 | 252645ba
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROIndyHTTPChannel.pas | 02-04-2008 | 12:33:22 | | 7090 | 83452c3d
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROIdeOnly.pas | 04-04-2007 | 11:54:24 | | 1332 | f7120a08
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROHTTPTools.pas | 12-21-2007 | 12:55:42 | | 3485 | e2be22e5
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROHTTPDispatch.pas | 10-15-2007 | 19:09:44 | | 4502 | 330ba171
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uRODL.pas | 05-19-2008 | 17:56:52 | | 64396 | 960f8a2
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROClientIntf.pas | 02-14-2008 | 16:19:46 | | 19012 | b5847d7d
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROClient.pas | 05-23-2008 | 12:45:56 | | 75002 | 6b407b9e
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROXMLSerializer.pas | 05-23-2008 | 11:16:18 | | 68713 | 99270256
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROXDOM_2_3.pas | 02-18-2008 | 21:57:04 | | 1226598 | b7339bb4
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROWebBrokerServer.pas | 12-21-2007 | 12:55:42 | | 14455 | 7cf95e36
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROUnicodeConv.pas | 03-12-2007 | 16:06:30 | | 132501 | 9f5b6b55
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROTypes.pas | 05-22-2008 | 10:33:44 | | 30205 | a56d71eb
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROStreamSerializer.pas | 05-22-2008 | 10:33:44 | | 38340 | d96581fe
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROSOAPMessage.pas | 03-19-2008 | 16:34:22 | | 37724 | 42dede25
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROServerIntf.pas | 12-21-2007 | 12:55:42 | | 5042 | 282706f4
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROServer.pas | 05-05-2008 | 17:19:54 | | 40404 | 3d56611e
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROSerializer.pas | 05-22-2008 | 10:33:44 | | 34041 | 3ca4d680
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uRORes.pas | 05-05-2008 | 17:19:54 | | 11690 | ec57649e
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROPoweredByRemObjectsButton.res | 04-04-2007 | 11:54:24 | | 14712 | ccc5efee
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROPoweredByRemObjectsButton.pas | 05-04-2007 | 16:30:46 | | 4980 | 3f1d779e
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROWinInetHttpChannel.pas | 05-22-2008 | 11:59:46 | | 26055 | 7ccdc852
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROEncryption.pas | 05-22-2008 | 10:33:44 | | 20212 | 7854c727
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uRODLLChannel.pas | 04-09-2008 | 09:43:06 | | 8929 | 272ac59c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uRODLLServer.pas | 10-06-2006 | 19:47:54 | | 5482 | d840cc42
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uRODLLHelpers.pas | 10-06-2006 | 19:47:54 | | 2981 | a1dfecef
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROClasses.pas | 05-22-2008 | 10:33:44 | | 55093 | 9be26c85
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROClassFactories.pas | 12-21-2007 | 12:55:42 | | 14806 | 34fb5c22
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROAsync.pas | 12-28-2007 | 15:58:28 | | 10482 | 41d6f946
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROAsyncResponseStorage.pas | 12-21-2006 | 21:18:52 | | 7511 | 811d0880
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROThread.pas | 04-04-2007 | 11:54:24 | | 5835 | ea44026e
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uRORemoteDataModule.pas | 02-04-2008 | 13:26:18 | | 12714 | fbfdcbf0
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROCOMInit.pas | 01-05-2006 | 23:07:34 | | 1107 | abb84986
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROLocalChannel.pas | 12-21-2007 | 12:55:42 | | 2914 | 7919ec5c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROLocalServer.pas | 12-21-2007 | 12:55:42 | | 1941 | 23cfa9e3
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROThreadPool.pas | 04-23-2008 | 12:34:38 | | 7306 | c895bd9c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROSCHelpers.pas | 05-20-2008 | 10:54:08 | | 28892 | feb823fc
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROSuperTCPServer.pas | 05-08-2008 | 12:45:18 | | 18227 | 7f364460
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROSuperTCPChannel.pas | 05-08-2008 | 12:45:18 | | 30236 | 2925dd36
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROXmlRpcMessage.pas | 05-22-2008 | 10:33:44 | | 43961 | 929b8428
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROServerMultiMessage.pas | 05-23-2008 | 12:39:20 | | 13269 | 23987d4f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROCompression.pas | 04-07-2008 | 13:09:26 | | 9773 | af7b3e30
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROIndyTCPChannel.pas | 02-07-2008 | 18:34:56 | | 7843 | b09f402f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROMSXML2_TLB.pas | 02-04-2006 | 17:11:32 | | 158036 | b888507
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROMSXMLImpl.pas | 03-26-2008 | 14:13:08 | | 16329 | 2ac5bb6f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROOpenXMLImpl.pas | 01-16-2008 | 13:25:20 | | 17320 | 19913a8c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROXMLIntf.pas | 04-14-2008 | 15:21:34 | | 6317 | c0965649
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROWinMessageServer.pas | 12-21-2007 | 12:55:42 | | 7860 | cf0a8e14
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROWinMessageChannel.pas | 12-21-2007 | 12:55:42 | | 8729 | d64f7010
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROBinMessage.pas | 05-20-2008 | 12:49:00 | | 21106 | 54d14a31
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROIndyHTTPServer.pas | 04-04-2008 | 14:37:18 | | 14974 | d05606b2
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROIndyTCPServer.pas | 12-21-2007 | 12:55:42 | | 8413 | db8043bd
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROBPDXHTTPServer.pas | 02-04-2008 | 12:33:22 | | 16344 | 7fbff801
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROBPDXTCPServer.pas | 03-21-2006 | 21:31:48 | | 5317 | 79c1ea64
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROIndyUDPChannel.pas | 10-15-2007 | 19:09:44 | | 19675 | ff90e1a
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROIndyUDPServer.pas | 09-26-2007 | 17:40:46 | | 9868 | 76975592
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROSessions.pas | 01-17-2008 | 11:37:56 | | 31486 | 7325fc90
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uRORemoteService.pas | 10-24-2007 | 18:37:30 | | 7159 | 84f8ea30
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uRODBSessionManager.pas | 05-20-2008 | 14:28:36 | | 17797 | b5d3d79
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uRoPleaseWaitForm.pas | 10-15-2007 | 19:09:44 | | 3268 | 2d302268
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uRoPleaseWaitForm.dfm | 03-27-2007 | 17:19:06 | | 5716 | d59dd4e5
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROPleaseWaitForm_Kylix.xfm | 05-17-2006 | 13:45:12 | | 769 | bc6625e3
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROPleaseWaitForm_Kylix.pas | 05-17-2006 | 13:45:12 | | 2758 | b9066e72
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROServiceComponent.pas | 03-15-2007 | 17:32:38 | | 1121 | 79c50204
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROSynapseHTTPChannel.pas | 02-04-2008 | 12:33:22 | | 6427 | d477bc72
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROEventRepository.pas | 03-11-2008 | 16:52:36 | | 50924 | 16c60c13
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uRODynamicRequest.pas | 05-22-2008 | 10:33:44 | | 44675 | 4d85977
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROMasterServerSessionManager.pas | 05-04-2007 | 16:30:46 | | 5054 | ee600713
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROMasterServerEventRepository.pas | 10-17-2007 | 14:29:26 | | 4348 | 643b689d
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\ROMasterServerLibrary_Intf.pas | 10-17-2007 | 14:34:16 | | 14568 | 60b44c08
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROPostMessage.pas | 05-22-2008 | 10:33:44 | | 34584 | d5c6960
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROComboService.pas | 06-19-2007 | 13:50:38 | | 9180 | 11c12804
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROHtmlServerInfoRes.html | 12-05-2006 | 23:07:10 | | 1236 | 9fbac4c2
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROHtmlServerInfoRes.ico | 01-18-2006 | 16:23:44 | | 22486 | 5c6e478a
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROHtmlServerInfoRes.xsl | 01-25-2008 | 12:21:40 | | 29325 | 2577962d
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROHtmlServerInfoRes.css | 01-18-2006 | 17:25:46 | | 2599 | 3ff25ea
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROHtmlServerInfo.lrs | 07-23-2007 | 12:25:40 | | 98758 | 719f5cf9
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROHtmlServerInfo.pas | 02-13-2008 | 11:56:40 | | 5390 | 50b7d903
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROHtmlServerInfo.res | 07-23-2007 | 12:25:40 | | 51252 | e955a0cb
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROHtmlServerInfo.rc | 06-29-2007 | 01:18:48 | | 304 | 74a67f86
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROBroadcastServer.pas | 09-26-2007 | 17:58:36 | | 4931 | 53a71bbd
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROBroadcastChannel.pas | 10-15-2007 | 19:09:44 | | 7397 | 1912739c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROStreamUtils.pas | 10-15-2007 | 19:09:44 | | 9292 | d58ecca3
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uRONamedPipeServer.pas | 12-21-2007 | 12:55:42 | | 14469 | 44238041
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uRONamedPipeChannel.pas | 12-21-2007 | 12:55:42 | | 9643 | 4ca002e4
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROIndyEmailChannel.pas | 10-18-2007 | 17:31:10 | | 10355 | c9525143
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROIndyEmailServer.pas | 02-08-2008 | 13:54:14 | | 12253 | c5cf5343
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROIndyEmail.pas | 10-18-2007 | 17:31:10 | | 2655 | ab42210e
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uRODiscovery_Intf.pas | 09-26-2007 | 17:44:40 | | 3256 | b9175f08
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uRODiscovery_Invk.pas | 04-24-2007 | 16:06:54 | | 2411 | 777f86c3
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uRODiscoveryService_Impl.pas | 09-26-2007 | 17:44:40 | | 1778 | d5772a81
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uRODiscovery.pas | 01-17-2007 | 12:35:26 | | 12003 | 99d6b993
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uRODiscovery_Async.pas | 04-24-2007 | 16:06:54 | | 3220 | 3841ed8c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\ROServiceDiscovery.RODL | 06-23-2006 | 16:45:10 | | 1071 | 22ce5614
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROBaseSuperHttpServer.pas | 05-08-2008 | 12:45:18 | | 37821 | eacf0a
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uIPAsyncHttpServer.pas | 04-23-2008 | 12:34:38 | | 16358 | a68a863b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uIPAsyncSocket.pas | 02-04-2008 | 12:33:22 | | 29131 | d4087709
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uIPHttpHeaders.pas | 03-26-2008 | 12:59:26 | | 3646 | e73f1a8b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROIpSuperHttpServer.pas | 05-21-2008 | 09:24:22 | | 7066 | 68baafea
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROIndySuperHttpChannel.pas | 02-07-2008 | 18:34:56 | | 8953 | 5b951ef7
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROSynapseSuperHttpChannel.pas | 02-20-2008 | 12:37:46 | | 7417 | adae9f90
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROBaseSuperHttpChannel.pas | 05-08-2008 | 12:45:18 | | 21695 | c6eee9a0
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROSynapseSCHelpers.pas | 05-20-2008 | 10:54:08 | | 23017 | 7510a9c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROSynapseServerSocket.pas | 05-13-2008 | 11:15:58 | | 5053 | 449226fb
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROSynapseSuperTCPChannel.pas | 05-08-2008 | 12:45:18 | | 26617 | 40a466eb
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROSynapseSuperTCPServer.pas | 05-08-2008 | 12:45:18 | | 18492 | c4c65808
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROEncryptionEnvelope.pas | 05-22-2008 | 10:33:44 | | 47553 | aa9115f2
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROIpHttpServer.pas | 04-23-2008 | 12:34:38 | | 12496 | 8469fcce
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROIpTcpServer.pas | 04-23-2008 | 14:56:12 | | 12645 | e0ee12c5
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROAsyncSCHelpers.pas | 05-20-2008 | 10:54:08 | | 26573 | 955d378d
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROAsyncSuperTcpServer.pas | 05-08-2008 | 12:45:18 | | 9828 | 268c7c25
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROIcsAsyncSuperTcpServer.pas | 04-04-2008 | 18:14:18 | | 32265 | bcc80a87
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROJSONMessage.pas | 04-23-2008 | 12:59:50 | | 964 | 5e3b79c4
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\Synapse
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\Synapse\sslinux.pas | 05-23-2007 | 01:35:16 | | 41239 | b4b66fbc
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\Synapse\sswin32.pas | 03-26-2008 | 12:59:26 | | 54669 | 3d94673f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\Synapse\ssfpc.pas | 09-12-2007 | 21:53:08 | | 27589 | 2bee506a
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\Synapse\synacode.pas | 05-23-2007 | 01:35:16 | | 51924 | bd7f3f60
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\Synapse\synautil.pas | 09-26-2007 | 17:38:24 | | 48970 | 5aee47d8
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\Synapse\synsock.pas | 09-26-2007 | 17:38:24 | | 3814 | 8fd6791f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\Synapse\synafpc.pas | 09-26-2007 | 17:38:24 | | 5190 | 24d7aa78
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\Synapse\synaip.pas | 05-23-2007 | 01:43:52 | | 11703 | 8425449d
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\Synapse\blcksock.pas | 09-26-2007 | 17:38:24 | | 124895 | 7f58fa30
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\Synapse\httpsend.pas | 09-26-2007 | 17:38:24 | | 25961 | 247008b0
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODX\uRODXSockClient.pas | 03-15-2007 | 17:32:38 | | 22516 | 1b6ecca0
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODX\uRODXSock.pas | 09-26-2007 | 17:41:54 | | 56348 | 877c0d2c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODX\uRODXSessionTracker.pas | 09-05-2007 | 15:46:02 | | 4045 | 903daba3
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODX\uRODXServerCore.pas | 05-22-2008 | 10:33:44 | | 38784 | e4f0353
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODX\uRODXSecurity.pas | 12-24-2002 | 22:21:40 | | 12379 | b135107b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODX\uRODXISAPIFilter.pas | 09-27-2007 | 18:44:34 | | 15475 | b75aa337
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODX\uRODXISAPI.pas | 09-27-2007 | 18:44:34 | | 60687 | 459d2b48
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODX\uRODXHTTPServerCore.pas | 05-22-2008 | 10:33:44 | | 28875 | 748153a9
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODX\uRODXHTTPHeaderTools.pas | 03-15-2007 | 17:32:38 | | 22705 | 3bfac439
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODX\Resource_Turkish.inc | 12-23-2002 | 05:05:02 | | 3048 | ab191098
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODX\Resource_Spanish.inc | 12-23-2002 | 05:05:02 | | 3710 | 98a473c4
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODX\Resource_Russian.inc | 12-23-2002 | 05:05:02 | | 3239 | a5a510e1
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODX\Resource_Portuguese.inc | 12-23-2002 | 05:05:02 | | 3661 | 38bc11b6
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODX\Resource_LowMem.inc | 12-23-2002 | 05:05:02 | | 2002 | 8240cd
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODX\Resource_Italian.inc | 12-23-2002 | 05:05:02 | | 3192 | 95c19c3b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODX\Resource_German.inc | 12-23-2002 | 05:05:02 | | 3710 | 6f2b156f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODX\Resource_French.inc | 12-23-2002 | 05:05:02 | | 3536 | 8f7cb1fc
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODX\Resource_English.inc | 12-23-2002 | 05:05:02 | | 4772 | ff7a857c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODX\uRODXSock.def | 09-26-2007 | 17:41:54 | | 1549 | 30dbfee7
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODX\uRODXFree.def | 09-26-2007 | 17:41:54 | | 1547 | c71544d
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODX\uRODXString.pas | 05-22-2008 | 10:33:44 | | 82772 | d6abc8ef
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODX\uRODXSocket.pas | 05-22-2008 | 10:33:44 | | 32412 | f0d62243
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODEC
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODEC\uRODECReg.pas | 12-24-2002 | 22:21:40 | | 5011 | 71808eeb
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODEC\uRODECUtil.pas | 05-22-2008 | 10:33:44 | | 49824 | 8b19f472
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODEC\uROEncKeyPropEditor.pas | 12-24-2002 | 22:21:40 | | 3382 | 7bc73578
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODEC\uROHash.pas | 05-22-2008 | 10:33:44 | | 176865 | 145d129b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODEC\uROHCMngr.pas | 12-24-2002 | 22:21:40 | | 12218 | e39003c0
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODEC\uRORFC2289.pas | 01-18-2006 | 21:55:40 | | 20132 | d95b167d
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODEC\uRORng.pas | 12-24-2002 | 22:21:40 | | 22359 | 93f22bb5
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODEC\uROcipher1.inc | 12-23-2002 | 05:05:02 | | 80869 | 3a40b145
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODEC\uROcipher.inc | 12-23-2002 | 05:05:02 | | 137282 | 50274e0d
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODEC\uROHash.inc | 12-23-2002 | 05:05:02 | | 68213 | 764984a8
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODEC\uRORFC1760.inc | 12-23-2002 | 05:05:02 | | 17654 | f39f3a8e
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODEC\uROSquare.inc | 12-23-2002 | 05:05:02 | | 27741 | b7eb3564
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODEC\uROVer.inc | 12-23-2002 | 05:05:02 | | 1111 | 26ae3b07
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODEC\uRODECReg.res | 12-23-2002 | 05:05:02 | | 1388 | 9b9386e5
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODEC\uRORFC1760.RES | 12-23-2002 | 05:05:02 | | 8266 | e967ccfe
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODEC\uROEncKeyPropEditor.dfm | 02-08-2008 | 13:46:22 | | 9383 | c9dd9ff
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODEC\uROCipher1.pas | 12-24-2002 | 22:21:40 | | 114429 | ae7c402
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODEC\uROCipher.pas | 05-22-2008 | 10:33:44 | | 116952 | 2a774a47
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODEC\uROCiphers.pas | 05-22-2008 | 10:33:44 | | 1733 | adbce90b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\RODEC\uRODECConst.pas | 04-19-2006 | 15:50:06 | | 3901 | 2eb2da90
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\DataSnap\uRODataSnapNewServerModuleWizard.pas | 08-10-2006 | 15:18:46 | | 10347 | 85998c6e
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\DataSnap\uRODataSnapNewServerModuleWizard.res | 04-09-2004 | 01:33:08 | | 3388 | 42118f7b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\DataSnap\uRODataSnapProviderManager.pas | 12-24-2002 | 22:21:40 | | 2043 | 3a3af53d
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\DataSnap\uRODataSnapProviderPublisher.dfm | 06-14-2003 | 23:05:40 | | 67 | fd402d2
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\DataSnap\uRODataSnapProviderPublisher.pas | 05-21-2008 | 11:48:56 | | 3638 | 82d729a2
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\DataSnap\uRODataSnapPublishedProvidersCollection.pas | 01-15-2003 | 01:55:36 | | 3263 | af3ba108
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\DataSnap\uRODataSnapRes.pas | 12-24-2002 | 22:21:40 | | 142 | 603a38c4
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\uROBinaryHelpers.pas | 05-22-2008 | 10:33:44 | | 22549 | b25693aa
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\DataSnap\uRODataSnap_Intf.pas | 06-01-2006 | 12:19:22 | | 11847 | 1be46df3
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\DataSnap\uRODataSnap_Async.pas | 05-16-2006 | 13:40:28 | | 11339 | 539125e1
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\DataSnap\uRODataSnap_Invk.pas | 05-04-2007 | 16:30:46 | | 9252 | 68678d4
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\DataSnap\uRODataSnapBaseAppServer.pas | 09-18-2003 | 14:30:12 | | 7825 | 8badb29a
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\DataSnap\uRODataSnapConnection.pas | 04-21-2008 | 13:58:14 | | 14369 | 597f6c99
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\DataSnap\uRODataSnapModule.pas | 12-24-2002 | 22:21:40 | | 5553 | b65bb0af
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\CodeGen
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\CodeGen\uRODLToPascalIntf.pas | 05-19-2008 | 17:30:52 | | 101541 | e176578d
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\CodeGen\uRODLToPascalInvk.pas | 05-06-2008 | 09:47:36 | | 15135 | 62c7681c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\CodeGen\uRODLToPascalAsync.pas | 01-14-2008 | 01:58:44 | | 14562 | 814d4e2b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\CodeGen\uRODLToPascalImpl.pas | 04-23-2007 | 01:26:04 | | 11984 | d32732c5
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\CodeGen\uRODLToWSDL.pas | 12-28-2007 | 11:34:40 | | 44050 | 97d47342
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\CodeGen\uRODLToXML.pas | 04-14-2008 | 15:21:34 | | 51549 | fc40f386
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\CodeGen\uRODLGenTools.pas | 04-21-2008 | 00:51:04 | | 18217 | 42c3b0f5
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\CodeGen\uRODLToPascal.pas | 03-21-2004 | 19:44:26 | | 221 | 1cba3fe8
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\CodeGen2
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\CodeGen2\uRODLIntfConverter.pas | 04-20-2008 | 20:38:28 | | 7598 | 892d6027
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\CodeGen2\uRODLSplitableConverter.pas | 12-31-2007 | 03:24:48 | | 18777 | 75323abd
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\CodeGen2\uRODLTemplateBasedConverter.pas | 05-08-2008 | 17:10:02 | | 132910 | f931ab4c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\CodeGen2\uRODLLineStream.pas | 04-20-2008 | 20:38:28 | | 2044 | 10110095
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\CodeGen2\uRODLTemplateBasedConverterUtils.pas | 05-05-2008 | 11:17:44 | | 27377 | 8eb6ca05
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\CodeGen2\uRODLCppConverters.pas | 04-20-2008 | 20:38:28 | | 15972 | 60e488f1
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\CodeGen2\uRODLDelphiConverters.pas | 04-20-2008 | 20:38:28 | | 8572 | c47f84f0
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\CodeGen2\uRODLImplConverter.pas | 04-04-2007 | 11:54:24 | | 5467 | 6915b5e0
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\CodeGen2\uRODLAsyncConverter.pas | 01-16-2008 | 17:44:40 | | 3365 | 855d0804
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\CodeGen2\uRODLConvertersUtils.pas | 05-01-2008 | 11:01:30 | | 42705 | 21d421a3
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\CodeGen2\uRODLInvkConverter.pas | 01-16-2008 | 17:44:40 | | 4514 | 7a3edae7
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\CodeGen2\Templates
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\CodeGen2\Templates\template.wrapper_async.pas | 08-08-2006 | 19:40:34 | | 817 | 13e3d46b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\CodeGen2\Templates\template.wrapper_intf.pas | 08-08-2006 | 19:40:34 | | 817 | 13e3d46b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\CodeGen2\Templates\template.wrapper_invk.pas | 08-08-2006 | 19:40:34 | | 833 | 7ddc96f6
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\CodeGen2\Templates\template.impl.dfm | 09-25-2007 | 18:15:22 | | 158 | a9f210e8
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\CodeGen2\Templates\template.async.h | 05-20-2008 | 11:03:54 | | 9593 | 12e282b0
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\CodeGen2\Templates\template.impl.h | 05-20-2008 | 11:03:54 | | 3677 | 4ca842b9
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\CodeGen2\Templates\template.intf.h | 05-20-2008 | 11:03:54 | | 19894 | 8c87fe8c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\CodeGen2\Templates\template.invk.h | 05-20-2008 | 11:03:54 | | 2729 | 9544a0b6
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\CodeGen2\Templates\template.wrapper_async.h | 08-08-2006 | 19:40:34 | | 697 | 78d74350
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\CodeGen2\Templates\template.wrapper_intf.h | 08-08-2006 | 19:40:34 | | 697 | 78d74350
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\CodeGen2\Templates\template.wrapper_invk.h | 08-08-2006 | 19:40:34 | | 697 | 78d74350
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\CodeGen2\Templates\template.async.cpp | 02-06-2007 | 17:21:26 | | 7250 | 65158a6d
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\CodeGen2\Templates\template.impl.cpp | 05-20-2008 | 11:03:54 | | 3194 | f1eab7e
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\CodeGen2\Templates\template.intf.cpp | 05-20-2008 | 13:07:12 | | 60837 | 3af4ed1f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\CodeGen2\Templates\template.invk.cpp | 05-20-2008 | 11:03:54 | | 8260 | 86984b29
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\CodeGen2\Templates\template.async.pas | 10-05-2007 | 16:46:34 | | 8012 | ae089917
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\CodeGen2\Templates\template.impl.pas | 10-05-2007 | 16:46:34 | | 2796 | e59c91b6
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\CodeGen2\Templates\template.intf.pas | 05-08-2008 | 17:10:02 | | 62318 | 3745a684
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\CodeGen2\Templates\template.invk.pas | 05-05-2008 | 17:19:54 | | 7044 | d5bde0f4
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\CodeGen2\Templates\Templates.res | 05-23-2008 | 22:04:52 | | 216924 | d13eb4bd
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\CodeGen2\Templates\Templates.rc | 04-20-2008 | 20:38:28 | | 1210 | cb5a60d7
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\fCustomIDEMessagesForm.pas | 12-24-2002 | 22:21:40 | | 3426 | d6070695
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\fServerProjectOptions.pas | 05-28-2007 | 10:46:56 | | 6474 | e68df966
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\uROIDEMenu.pas | 05-20-2008 | 13:30:42 | | 18681 | da9f3e0b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\uROIDEPrjWizard.pas | 12-06-2007 | 19:32:16 | | 20459 | c6bafb88
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\uROIDETools.pas | 04-21-2008 | 11:46:22 | | 22882 | 14f42001
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\uRORODLNotifier.pas | 05-20-2008 | 13:30:42 | | 18435 | 742e01dc
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\uROResWriter.pas | 12-24-2002 | 22:21:40 | | 1787 | 2a870d35
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\fCustomIDEMessagesForm.dfm | 12-23-2002 | 05:05:02 | | 11001 | 1b57e70
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\fServerProjectOptions.dfm | 05-23-2008 | 22:04:48 | | 235625 | 51edc32e
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\fDispatchersEditorForm.pas | 04-18-2003 | 18:42:20 | | 7084 | f18dbb41
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\fDispatchersEditorForm.dfm | 04-25-2004 | 17:57:42 | | 10137 | f3772345
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\fROAbout.dfm | 06-07-2007 | 17:03:22 | | 1015047 | 1ca832a3
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\fROAbout.pas | 06-07-2007 | 17:03:22 | | 2756 | 6d6fdf10
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\uROIDEData.pas | 12-24-2002 | 22:21:40 | | 910 | f96f0c72
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\uROIDEData.dfm | 04-06-2004 | 22:13:20 | | 29041 | 9c99abdb
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\NewRORemoteDataModule.ico | 12-23-2002 | 05:05:02 | | 2238 | 321668e3
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\fCustomIDEMessagesFormKylix.pas | 12-31-2002 | 18:51:08 | | 3156 | ad2d34ca
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\fCustomIDEMessagesFormKylix.dfm | 12-31-2002 | 18:51:08 | | 1098 | 4d16bf32
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\fDispatchersEditorFormKylix.pas | 01-21-2003 | 01:42:34 | | 6937 | 88ea2b74
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\fDispatchersEditorFormKylix.dfm | 01-21-2003 | 01:42:34 | | 9991 | 7add467f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\fServerProjectOptionsKylix.pas | 01-21-2003 | 01:42:34 | | 6156 | bad0c7fa
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\fServerProjectOptionsKylix.dfm | 01-21-2003 | 01:42:34 | | 61226 | aa9b7d0e
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\uROIDEEditors.pas | 02-28-2008 | 10:18:46 | | 5549 | 75477480
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\uROProductVersionInfo_Intf.pas | 06-01-2006 | 12:19:22 | | 22521 | a0a63bee
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\uROProductVersionInfoForm.dfm | 05-23-2008 | 22:04:48 | | 7270 | 47f35ef6
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\uROProductVersionInfoForm.pas | 06-09-2003 | 03:38:08 | | 1830 | f1abe6f0
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\uROProductVersionInfo.pas | 05-04-2007 | 16:30:46 | | 2693 | 106f42e2
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\fROServerClassForm.pas | 10-30-2007 | 13:29:46 | | 3190 | 49a20bb0
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\fROServerClassForm.dfm | 05-23-2008 | 22:04:46 | | 226559 | 805783c8
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\uROExtraEditors.pas | 01-20-2006 | 03:32:10 | | 3056 | 3924fb00
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\fNewProjectForm.pas | 12-06-2007 | 19:32:16 | | 7023 | 5f2d213c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\fNewProjectForm.dfm | 05-23-2008 | 22:04:46 | | 233352 | b5bdf4e9
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\Resources.BDS.RES | 03-09-2007 | 19:42:20 | | 8644 | d5066feb
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\uROLoginNeededForm.pas | 05-05-2008 | 11:17:44 | | 5465 | c3a1e6ab
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\IDE\uROLoginNeededForm.dfm | 05-23-2008 | 22:04:48 | | 56193 | f9bed400
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\ZLib
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\ZLib\uROZLib.pas | 11-26-2007 | 13:43:34 | | 30384 | cedc295
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\ZLib\infback.obj | 09-27-2006 | 16:41:30 | | 6913 | d0e3dbc8
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\ZLib\inffast.obj | 09-27-2006 | 16:41:30 | | 1568 | 17e887e3
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\ZLib\inflate.obj | 09-27-2006 | 16:41:30 | | 10546 | 5515441c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\ZLib\inftrees.obj | 09-27-2006 | 16:41:30 | | 1681 | efdd92be
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\ZLib\trees.obj | 09-27-2006 | 16:41:30 | | 10932 | 727b7484
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\ZLib\adler32.obj | 09-27-2006 | 16:41:30 | | 977 | 60aaa699
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\ZLib\deflate.obj | 09-27-2006 | 16:41:30 | | 8769 | 85e9bb8
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\ZLib\uncompr.obj | 09-27-2006 | 16:41:30 | | 440 | f2e963c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\ZLib\compress.obj | 09-27-2006 | 16:41:30 | | 502 | b9f3f946
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\ZLib\crc32.obj | 09-27-2006 | 16:41:30 | | 10586 | 12c7f923
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\ZLib\gzio.obj | 09-27-2006 | 16:41:30 | | 5124 | c680789
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\ZLib\zutil.obj | 09-27-2006 | 16:41:30 | | 747 | 1e962822
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\Zlib\FPC
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\ZLib\FPC\uROZLib.pas | 10-15-2007 | 15:41:48 | | 13698 | 43f58010
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\Zlib\Kylix
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\ZLib\Kylix\uROZLib.pas | 12-31-2002 | 18:38:56 | | 19372 | d1328973
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\ZLib\Kylix\infblock.obj | 04-05-2004 | 18:13:52 | | 5527 | 723c3620
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\ZLib\Kylix\infcodes.obj | 04-05-2004 | 18:13:52 | | 3790 | e8753755
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\ZLib\Kylix\inffast.obj | 04-05-2004 | 18:13:52 | | 2335 | f80d2de0
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\ZLib\Kylix\inflate.obj | 04-05-2004 | 18:13:52 | | 3280 | 7c512d85
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\ZLib\Kylix\inftrees.obj | 04-05-2004 | 18:13:52 | | 8115 | 52a21d54
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\ZLib\Kylix\infutil.obj | 04-05-2004 | 18:13:52 | | 1409 | 8577507f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\ZLib\Kylix\trees.obj | 04-05-2004 | 18:13:52 | | 11868 | b3a0e0b8
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\ZLib\Kylix\adler32.obj | 04-05-2004 | 18:13:52 | | 612 | f48dc4c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Source\ZLib\Kylix\deflate.obj | 04-05-2004 | 18:13:52 | | 7304 | d130f05b
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Styles.css | 06-27-2006 | 12:49:24 | | 1490 | c0549e5f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Samples.html | 10-19-2007 | 15:29:08 | | 14613 | 669d994f
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Arrays
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Arrays\ArraysServer.dpr | 11-20-2006 | 02:24:40 | | 558 | b5a84afb
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Arrays\ArraysServer.bdsproj | 05-25-2007 | 17:12:08 | | 8387 | 38d3d70c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Arrays\ArraysServer.dproj | 05-29-2007 | 16:16:46 | | 3588 | cff21a55
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Arrays\Arrays.Sample.html | 12-06-2006 | 17:40:30 | | 664 | 1ba26052
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Arrays\ArraysClientMain.pas | 02-19-2007 | 18:06:40 | | 5435 | a2131f15
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Arrays\ArraysLibrary_Intf.pas | 11-20-2006 | 02:24:40 | | 20467 | ad2bf492
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Arrays\ArraysLibrary_Invk.pas | 11-20-2006 | 02:24:40 | | 1962 | eb93b462
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Arrays\ArraysServerMain.pas | 11-20-2006 | 02:24:40 | | 874 | 23ab142c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Arrays\ArraysService_Impl.pas | 11-20-2006 | 02:24:40 | | 4178 | 60d8224a
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Arrays\ArraysLibrary.rodl | 11-20-2006 | 02:24:40 | | 3037 | aac405c6
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Arrays\Arrays.bpg | 11-20-2006 | 02:24:40 | | 833 | 97a9dbba
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Arrays\Arrays.bdsgroup | 05-25-2007 | 17:12:08 | | 711 | a3e53f03
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Arrays\Arrays.groupproj | 05-29-2007 | 16:16:46 | | 1464 | bb452b16
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Arrays\ArraysClient.res | 11-20-2006 | 02:24:40 | | 22748 | ab21813
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Arrays\ArraysServer.res | 11-20-2006 | 02:24:40 | | 22748 | 9880fe42
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Arrays\RODLFILE.res | 11-20-2006 | 02:24:40 | | 3117 | ec338fc8
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Arrays\ArraysClientMain.dfm | 11-20-2006 | 02:24:40 | | 2189 | 46b6f8d9
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Arrays\ArraysServerMain.dfm | 05-23-2008 | 22:04:42 | | 1479 | dce2147
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Arrays\ArraysClient.dpr | 11-20-2006 | 02:24:40 | | 316 | 94959e23
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Arrays\ArraysClient.bdsproj | 05-25-2007 | 17:12:08 | | 8387 | 1037e0b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Arrays\ArraysClient.dproj | 05-29-2007 | 16:16:46 | | 3423 | cb8a42c
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Async
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Async\async_EmailSettings.pas | 03-23-2007 | 12:12:58 | | 5320 | 43f7800e
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Async\async_EmailSettings.dfm | 05-23-2008 | 22:04:42 | | 4717 | 4f090bb4
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Async\AsyncClientMain.dfm | 02-08-2008 | 13:54:14 | | 3974 | 7034e90c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Async\AsyncServerMain.dfm | 02-08-2008 | 13:54:14 | | 2676 | 37d45c85
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Async\AsyncClient.dpr | 02-08-2008 | 13:54:14 | | 372 | c0ebf3c9
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Async\AsyncClient.bdsproj | 05-25-2007 | 17:40:00 | | 8386 | 8d907d80
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Async\AsyncClient.dproj | 05-29-2007 | 16:16:46 | | 3417 | 85bc08c6
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Async\AsyncServer.dpr | 02-08-2008 | 13:54:14 | | 607 | 3e4c347b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Async\AsyncServer.bdsproj | 05-25-2007 | 17:40:00 | | 8385 | 116b65e9
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Async\AsyncServer.dproj | 05-29-2007 | 16:16:46 | | 3578 | 81e9b4eb
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Async\AsyncGroup.Sample.html | 06-25-2006 | 14:29:14 | | 1077 | 9a81331f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Async\AsyncLibrary.rodl | 04-21-2006 | 21:47:26 | | 960 | 733497f0
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Async\AsyncGroup.bpg | 05-28-2007 | 13:42:24 | | 827 | 28d7ce26
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Async\AsyncGroup.bdsgroup | 05-25-2007 | 17:40:00 | | 705 | bf4ab570
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Async\AsyncGroup.groupproj | 05-29-2007 | 16:16:46 | | 1446 | f014c1d4
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Async\AsyncClientMain.pas | 02-08-2008 | 13:54:14 | | 7027 | f4cb2d3b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Async\AsyncLibrary_Async.pas | 04-21-2006 | 21:47:26 | | 2797 | e4f347f6
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Async\AsyncLibrary_Intf.pas | 05-28-2007 | 13:42:24 | | 2759 | 1ada3524
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Async\AsyncLibrary_Invk.pas | 02-08-2008 | 13:54:14 | | 1878 | 1ffcc4ae
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Async\AsyncServerMain.pas | 02-08-2008 | 13:54:14 | | 3141 | 9ac3b95
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Async\AsyncService_Impl.pas | 04-21-2006 | 21:47:26 | | 1390 | 1db46eb1
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Async\AsyncClient.res | 04-21-2006 | 21:47:26 | | 22748 | a6c8709c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Async\AsyncServer.res | 04-21-2006 | 21:47:26 | | 23460 | 98e0e797
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Async\RODLFILE.res | 04-21-2006 | 21:47:26 | | 1040 | dd47a7de
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Auto Server
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Auto Server\AutoServerLibrary_Intf.pas | 04-06-2006 | 02:34:06 | | 3196 | 19ac35fa
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Auto Server\AutoServerLibrary_Invk.pas | 04-06-2006 | 02:34:06 | | 2595 | 8125cb17
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Auto Server\AutoServerService_Impl.pas | 04-06-2006 | 02:34:06 | | 1544 | 85caed2e
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Auto Server\AutoServer.res | 04-06-2006 | 02:34:06 | | 22748 | b8aec145
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Auto Server\AutoServer_Client.res | 04-06-2006 | 02:34:06 | | 23752 | 5cc5b097
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Auto Server\RODLFILE.res | 04-06-2006 | 02:34:06 | | 1200 | ae3a88b4
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Auto Server\AutoServer_ClientMain.dfm | 05-23-2008 | 22:04:42 | | 1897 | 5e37b29d
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Auto Server\AutoServer_ServerMain.dfm | 05-23-2008 | 22:04:42 | | 880 | 69862c41
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Auto Server\AutoServer.dpr | 04-06-2006 | 02:34:06 | | 607 | b94d6b61
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Auto Server\AutoServer.bdsproj | 05-25-2007 | 17:12:08 | | 8385 | 75a3053c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Auto Server\AutoServer.dproj | 05-29-2007 | 16:16:46 | | 3602 | 9f44686f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Auto Server\AutoServer_Client.dpr | 04-06-2006 | 02:34:06 | | 349 | 76b958cb
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Auto Server\AutoServer_Client.bdsproj | 05-25-2007 | 17:12:08 | | 8391 | e6a035f4
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Auto Server\AutoServer_Client.dproj | 05-29-2007 | 16:16:46 | | 3452 | 7668b92b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Auto Server\AutoServerGroup.Sample.html | 04-21-2006 | 21:36:34 | | 851 | 4235d66
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Auto Server\AutoServer.rodl | 04-06-2006 | 02:34:06 | | 1120 | 2edc714f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Auto Server\AutoServerGroup.bpg | 04-06-2006 | 02:34:06 | | 842 | 5abd1df7
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Auto Server\AutoServerGroup.bdsgroup | 05-25-2007 | 17:12:08 | | 720 | 747589dc
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Auto Server\AutoServerGroup.groupproj | 05-29-2007 | 16:16:46 | | 1491 | 68e88ba7
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Auto Server\AutoServer_ClientMain.pas | 05-30-2006 | 17:06:10 | | 4146 | 469d57e6
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Auto Server\AutoServer_ServerMain.pas | 04-06-2006 | 02:34:06 | | 831 | 786df99e
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Broadcast Chat
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Broadcast Chat\BroadcastChat.res | 04-21-2006 | 21:36:26 | | 23604 | 68173a9b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Broadcast Chat\RODLFILE.res | 04-21-2006 | 21:36:26 | | 1080 | f324ff5a
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Broadcast Chat\BroadcastChatMain.dfm | 05-17-2006 | 21:51:42 | | 11317 | 8578e85
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Broadcast Chat\BroadcastChat.dpr | 04-21-2006 | 21:36:26 | | 598 | dfee1aa1
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Broadcast Chat\BroadcastChat.bdsproj | 05-25-2007 | 17:12:08 | | 8387 | 44121064
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Broadcast Chat\BroadcastChat.dproj | 05-29-2007 | 16:16:46 | | 3614 | e1bd1ed4
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Broadcast Chat\BroadcastChat.Sample.html | 04-18-2007 | 19:01:38 | | 808 | 5663d643
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Broadcast Chat\BroadcastChatLibrary.rodl | 04-21-2006 | 21:36:26 | | 1000 | 391f0573
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Broadcast Chat\BroadcastChatLibrary_Async.pas | 04-21-2006 | 21:36:26 | | 3696 | 23ad42f7
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Broadcast Chat\BroadcastChatLibrary_Intf.pas | 04-21-2006 | 21:36:26 | | 3384 | 471d9498
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Broadcast Chat\BroadcastChatLibrary_Invk.pas | 04-21-2006 | 21:36:26 | | 2725 | c644c74
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Broadcast Chat\BroadcastChatMain.pas | 04-25-2006 | 19:33:50 | | 3684 | e86b4c62
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Broadcast Chat\BroadcastChatService_Impl.pas | 04-25-2006 | 19:33:50 | | 2268 | 98f9851d
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\COM
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\COM\COM.Sample.html | 06-09-2006 | 22:23:22 | | 1014 | 45690f16
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\COM\COM_Main.dfm | 05-25-2006 | 04:25:08 | | 1097 | fe40284b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\COM\COM_Main.pas | 05-25-2006 | 04:25:08 | | 2534 | e20f7fdc
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\COM\COMClient.dpr | 05-25-2006 | 04:25:08 | | 292 | ab1866ac
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\COM\COMClient.bdsproj | 05-25-2007 | 17:12:08 | | 8384 | c3f13863
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\COM\COMClient.dproj | 05-29-2007 | 16:16:46 | | 3441 | 439f963d
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\COM\COMClient.res | 05-25-2006 | 04:25:08 | | 22748 | ab21813
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\COM\ExcelDemo.xls | 05-25-2006 | 04:25:08 | | 33280 | 6a62f60a
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\COM\ROASPDemo.asp | 05-25-2006 | 04:25:08 | | 777 | 43fcce39
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\COM\ROCOM_TLB.dcr | 03-27-2004 | 18:42:50 | | 32 | 245d8dcd
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\COM\ROCOM_TLB.pas | 03-27-2004 | 18:42:50 | | 11780 | 83b1e903
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\COM\Test.vbs | 05-25-2006 | 04:25:08 | | 631 | 97dd7ac2
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\COM\COM.bpg | 05-25-2006 | 04:25:08 | | 842 | feb6358b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\COM\COM.bdsgroup | 05-25-2007 | 17:12:08 | | 720 | cbb716e0
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\COM\COM.groupproj | 05-29-2007 | 16:16:46 | | 1491 | 9ad0cdc7
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\DataSnap
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\DataSnap\DataSnapServerMain.pas | 05-23-2007 | 13:36:30 | | 797 | da0dfbc5
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\DataSnap\DataSnapClient.res | 04-22-2006 | 00:08:42 | | 22748 | ab21813
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\DataSnap\DataSnapIsapiServer.res | 04-21-2006 | 22:00:50 | | 876 | 384c3b77
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\DataSnap\DataSnapServer.res | 04-21-2006 | 22:00:50 | | 22748 | 5ac86f48
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\DataSnap\DataSnapClientMain.dfm | 05-23-2007 | 13:36:30 | | 11464 | 1c0b714
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\DataSnap\DataSnapISAPIServerMain.dfm | 04-21-2006 | 22:00:50 | | 767 | 5ba888d9
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\DataSnap\DataSnapServerData.dfm | 05-23-2007 | 13:36:30 | | 2451 | 7c351e65
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\DataSnap\DataSnapServerMain.dfm | 05-23-2008 | 22:04:42 | | 50379 | c76bc287
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\DataSnap\DataSnapClient.dpr | 04-22-2006 | 00:08:42 | | 314 | 8751c22b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\DataSnap\DataSnapClient.bdsproj | 05-25-2007 | 17:12:08 | | 8389 | 64e1961b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\DataSnap\DataSnapClient.dproj | 05-29-2007 | 16:16:46 | | 3435 | b645afa3
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\DataSnap\DataSnapIsapiServer.dpr | 04-21-2006 | 22:00:50 | | 588 | a1718417
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\DataSnap\DataSnapIsapiServer.bdsproj | 05-25-2007 | 17:12:08 | | 8394 | df59b532
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\DataSnap\DataSnapIsapiServer.dproj | 05-29-2007 | 16:16:46 | | 3582 | 62ad9211
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\DataSnap\DataSnapServer.dpr | 05-23-2007 | 13:36:30 | | 437 | 6b5b288b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\DataSnap\DataSnapServer.bdsproj | 05-25-2007 | 17:12:08 | | 8389 | eff3f304
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\DataSnap\DataSnapServer.dproj | 05-29-2007 | 16:16:46 | | 3552 | 294b0b69
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\DataSnap\DataSnap.Sample.html | 06-29-2006 | 05:44:22 | | 450 | e26dfd76
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\DataSnap\DataSnap.bpg | 04-21-2006 | 22:00:50 | | 931 | af39af27
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\DataSnap\DataSnap.bdsgroup | 05-25-2007 | 17:12:08 | | 834 | bad36964
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\DataSnap\DataSnap.groupproj | 05-29-2007 | 16:16:46 | | 1942 | e6d5be4
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\DataSnap\DataSnapClientMain.pas | 06-28-2006 | 02:08:02 | | 3295 | 15836f58
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\DataSnap\DataSnapISAPIServerMain.pas | 04-21-2006 | 22:00:50 | | 521 | 74ba5549
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\DataSnap\DataSnapServerData.pas | 06-28-2006 | 02:08:02 | | 1602 | 42fc21e1
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Extended File Transfer
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Extended File Transfer\ExtendedFileTransferClientMain.dfm | 05-23-2008 | 22:04:42 | | 2188 | 5263b0e
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Extended File Transfer\ExtendedFileTransferServerData.dfm | 05-23-2008 | 22:04:42 | | 810 | fcd4035e
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Extended File Transfer\ExtendedFileTransferServerMain.dfm | 05-23-2008 | 22:04:42 | | 1619 | 19f7f60f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Extended File Transfer\ExtendedFileTransferService_Impl.dfm | 04-21-2006 | 22:00:50 | | 316 | a691b8a8
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Extended File Transfer\ExtendedFileTransferClient.dpr | 04-21-2006 | 22:00:50 | | 601 | c35fab3f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Extended File Transfer\ExtendedFileTransferClient.bdsproj | 05-25-2007 | 17:12:08 | | 8401 | 39fb6ab6
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Extended File Transfer\ExtendedFileTransferClient.dproj | 05-29-2007 | 16:16:46 | | 3659 | 79aedd3a
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Extended File Transfer\ExtendedFileTransferServer.dpr | 04-21-2006 | 22:00:50 | | 1260 | 80907c1c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Extended File Transfer\ExtendedFileTransferServer.bdsproj | 05-25-2007 | 17:12:08 | | 8401 | 4ef3fa44
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Extended File Transfer\ExtendedFileTransferServer.dproj | 05-29-2007 | 16:16:46 | | 3922 | c701be9a
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Extended File Transfer\ExtendedFileTransfer.Sample.html | 06-29-2006 | 11:07:44 | | 1061 | 5edbf2de
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Extended File Transfer\ExtendedFileTransferLibrary.rodl | 04-21-2006 | 22:00:50 | | 2042 | f6cf27f2
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Extended File Transfer\ExtendedFileTransfer.bpg | 04-21-2006 | 22:00:50 | | 917 | 382b179b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Extended File Transfer\ExtendedFileTransfer.bdsgroup | 05-25-2007 | 17:12:08 | | 795 | fdcabdde
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Extended File Transfer\ExtendedFileTransfer.groupproj | 05-29-2007 | 16:16:46 | | 1716 | 14580fc3
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Extended File Transfer\ExtendedFileTransferClientDownloadThread.pas | 12-12-2006 | 16:38:56 | | 5614 | 3f297787
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Extended File Transfer\ExtendedFileTransferClientMain.pas | 06-29-2006 | 12:10:34 | | 6730 | d8877ad3
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Extended File Transfer\ExtendedFileTransferClientUploadThread.pas | 01-12-2007 | 17:03:22 | | 6077 | dfc7137b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Extended File Transfer\ExtendedFileTransferLibrary_Intf.pas | 06-28-2006 | 12:48:30 | | 7224 | f5545d3c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Extended File Transfer\ExtendedFileTransferLibrary_Invk.pas | 04-21-2006 | 22:00:50 | | 4675 | feda1613
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Extended File Transfer\ExtendedFileTransferServerData.pas | 06-28-2006 | 12:48:30 | | 915 | acf5730a
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Extended File Transfer\ExtendedFileTransferServerMain.pas | 06-29-2006 | 12:10:34 | | 1501 | 1131f900
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Extended File Transfer\ExtendedFileTransferService_Impl.pas | 06-28-2006 | 12:48:30 | | 3562 | a82b63c9
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Extended File Transfer\ExtendedFileTransferClient.res | 04-21-2006 | 22:00:50 | | 22748 | ab21813
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Extended File Transfer\ExtendedFileTransferServer.res | 04-21-2006 | 22:00:50 | | 22748 | 9880fe42
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Extended File Transfer\RODLFILE.res | 04-21-2006 | 22:00:50 | | 2122 | c3f7ba9c
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Extended File Transfer\DownloadFiles
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Extended File Transfer\DownloadFiles\create.dir
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Extended File Transfer\ServerFiles
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Extended File Transfer\ServerFiles\create.dir
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\First Sample
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\First Sample\FirstSampleService_Impl.dfm | 03-27-2006 | 16:21:00 | | 136 | 1152cd98
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\First Sample\FirstSampleClient.dpr | 03-27-2006 | 16:50:28 | | 336 | db8b9bd4
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\First Sample\FirstSampleClient.bdsproj | 05-25-2007 | 17:12:08 | | 8392 | f2dbf45d
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\First Sample\FirstSampleClient.dproj | 05-29-2007 | 16:16:46 | | 3506 | 6c9ed85
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\First Sample\FirstSampleServer.dpr | 03-27-2006 | 16:50:28 | | 622 | 4e9b285
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\First Sample\FirstSampleServer.bdsproj | 05-25-2007 | 17:12:08 | | 8392 | 66498e4a
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\First Sample\FirstSampleServer.dproj | 05-29-2007 | 16:16:46 | | 3677 | 6b9e25d5
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\First Sample\FirstSample.Sample.html | 04-19-2006 | 17:02:20 | | 1827 | a487b847
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\First Sample\FirstSample.rodl | 03-27-2006 | 16:21:00 | | 1595 | b0838078
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\First Sample\FirstSample.bpg | 03-27-2006 | 16:21:00 | | 863 | 46a2c77c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\First Sample\FirstSample.bdsgroup | 05-25-2007 | 17:12:08 | | 741 | fcd643c5
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\First Sample\FirstSample.groupproj | 05-29-2007 | 16:16:46 | | 1554 | 27ee451e
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\First Sample\FirstSample_Intf.pas | 03-27-2006 | 16:21:00 | | 4551 | ac8d4205
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\First Sample\FirstSample_Invk.pas | 03-27-2006 | 16:21:00 | | 4440 | 80e9d23e
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\First Sample\FirstSampleClientMain.pas | 05-30-2006 | 17:06:10 | | 2066 | a28c596f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\First Sample\FirstSampleServerMain.pas | 04-23-2006 | 02:48:00 | | 3419 | 2319eacf
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\First Sample\FirstSampleService_Impl.pas | 04-19-2006 | 17:02:20 | | 3250 | d0906ccf
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\First Sample\FirstSampleClient.res | 03-27-2006 | 16:50:28 | | 876 | dd75daa5
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\First Sample\FirstSampleServer.res | 03-27-2006 | 16:50:28 | | 876 | dd75daa5
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\First Sample\RODLFILE.res | 03-27-2006 | 16:21:00 | | 1675 | 2dc15a9b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\First Sample\FirstSampleClientMain.dfm | 05-17-2006 | 22:03:32 | | 3058 | 8e2f398b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\First Sample\FirstSampleServerMain.dfm | 05-23-2008 | 22:04:42 | | 2937 | e46f243a
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\HTTP Chat
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\HTTP Chat\HTTPChatClientMain.dfm | 05-23-2008 | 22:04:42 | | 4056 | c23dfedd
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\HTTP Chat\HTTPChatServerMain.dfm | 05-23-2008 | 22:04:42 | | 3622 | abf2971
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\HTTP Chat\HTTPChatService_Impl.dfm | 04-24-2006 | 17:05:38 | | 307 | 8e66e832
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\HTTP Chat\HTTPChatClient.dpr | 04-24-2006 | 17:05:38 | | 330 | fef6b892
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\HTTP Chat\HTTPChatClient.bdsproj | 05-25-2007 | 17:12:08 | | 8389 | eb9ab432
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\HTTP Chat\HTTPChatClient.dproj | 05-29-2007 | 16:16:46 | | 3435 | ed3871cb
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\HTTP Chat\HTTPChatServer.dpr | 04-24-2006 | 17:05:38 | | 622 | 14469723
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\HTTP Chat\HTTPChatServer.bdsproj | 05-25-2007 | 17:12:08 | | 8389 | 4a0fa1e9
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\HTTP Chat\HTTPChatServer.dproj | 05-29-2007 | 16:16:46 | | 3661 | 2ba21947
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\HTTP Chat\HTTPChat.Sample.html | 06-27-2006 | 13:57:56 | | 1087 | 95ee99fb
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\HTTP Chat\HTTPChatLibrary.rodl | 04-24-2006 | 17:05:38 | | 3714 | 5ae0c36f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\HTTP Chat\HTTPChat.bpg | 04-24-2006 | 17:05:38 | | 845 | ee47f7a8
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\HTTP Chat\HTTPChat.bdsgroup | 05-25-2007 | 17:12:08 | | 723 | 49ae321b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\HTTP Chat\HTTPChat.groupproj | 05-29-2007 | 16:16:46 | | 1500 | 98d48d16
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\HTTP Chat\HTTPChatClientMain.pas | 07-14-2006 | 12:49:06 | | 8032 | 355838ad
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\HTTP Chat\HTTPChatLibrary_Intf.pas | 04-24-2006 | 17:05:38 | | 20759 | cccf53e5
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\HTTP Chat\HTTPChatLibrary_Invk.pas | 04-24-2006 | 17:05:38 | | 4289 | 7882a86f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\HTTP Chat\HTTPChatServerMain.pas | 04-24-2006 | 17:05:38 | | 4623 | 6afe478f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\HTTP Chat\HTTPChatService_Impl.pas | 04-24-2006 | 17:06:58 | | 4752 | 665685f5
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\HTTP Chat\HTTPChatClient.res | 04-24-2006 | 17:05:38 | | 22748 | ab21813
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\HTTP Chat\HTTPChatServer.res | 04-24-2006 | 17:05:38 | | 22748 | b8aec145
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\MegaDemo
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\MegaDemo\MegaDemoISAPI.res | 04-21-2006 | 21:47:26 | | 876 | 483416c3
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\MegaDemo\MegaDemoServer.res | 04-21-2006 | 21:47:26 | | 23724 | 358994b2
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\MegaDemo\RODLFile.RES | 04-21-2006 | 21:47:26 | | 5085 | d0d904f4
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\MegaDemo\MegaDemoClientMain.dfm | 03-31-2008 | 17:01:12 | | 30815 | 87ff18df
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\MegaDemo\MegaDemoISAPIMain.dfm | 04-21-2006 | 21:47:26 | | 986 | 7a404030
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\MegaDemo\MegaDemoServerMain.dfm | 05-23-2008 | 22:04:42 | | 44167 | 7c63f6ee
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\MegaDemo\MegaDemoService_Impl.dfm | 12-05-2006 | 13:38:54 | | 177 | e33bc8cd
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\MegaDemo\MegaDemoClient.dpr | 04-21-2006 | 21:47:26 | | 378 | f957e04d
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\MegaDemo\MegaDemoClient.bdsproj | 05-25-2007 | 17:12:08 | | 8389 | 3ea7b0f0
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\MegaDemo\MegaDemoClient.dproj | 05-29-2007 | 16:16:46 | | 3491 | 1bdaa565
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\MegaDemo\MegaDemoISAPI.dpr | 04-21-2006 | 21:47:26 | | 872 | dd546aad
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\MegaDemo\MegaDemoISAPI.bdsproj | 05-25-2007 | 17:12:08 | | 8388 | 210b432f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\MegaDemo\MegaDemoISAPI.dproj | 05-29-2007 | 16:16:46 | | 3651 | 9c14862e
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\MegaDemo\MegaDemoServer.dpr | 04-26-2006 | 14:25:04 | | 666 | 268a8936
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\MegaDemo\MegaDemoServer.bdsproj | 05-25-2007 | 17:12:08 | | 8388 | 75c39234
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\MegaDemo\MegaDemoServer.dproj | 05-29-2007 | 16:16:46 | | 3419 | 193be3fc
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\MegaDemo\MegaDemo.Sample.html | 04-23-2007 | 12:35:28 | | 2005 | f7071e14
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\MegaDemo\MegaDemoLibrary.rodl | 04-21-2006 | 21:47:26 | | 5005 | 8ce21a9e
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\MegaDemo\MegaDemo.bpg | 04-21-2006 | 21:47:26 | | 913 | a68ed935
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\MegaDemo\MegaDemo.bdsgroup | 05-25-2007 | 17:12:08 | | 816 | b2e81e1f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\MegaDemo\MegaDemo.groupproj | 05-29-2007 | 16:16:46 | | 1888 | 6bfe9ff8
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\MegaDemo\MegaDemoClientMain.pas | 03-31-2008 | 17:01:12 | | 55201 | 23afb636
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\MegaDemo\MegaDemoCustomClass.pas | 04-23-2007 | 12:35:28 | | 1921 | 1a2cab74
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\MegaDemo\MegaDemoISAPIMain.pas | 04-21-2006 | 21:47:26 | | 542 | 4150b3ed
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\MegaDemo\MegaDemoLibrary_Intf.pas | 03-31-2008 | 17:01:12 | | 33630 | 65b513c3
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\MegaDemo\MegaDemoLibrary_Invk.pas | 03-31-2008 | 17:01:12 | | 15505 | 25e1c866
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\MegaDemo\MegaDemoServerMain.pas | 05-23-2008 | 13:03:28 | | 20551 | 41452617
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\MegaDemo\MegaDemoService_Impl.pas | 12-05-2006 | 13:38:54 | | 5057 | e29a2f3a
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\MegaDemo\MegaDemoClient.res | 04-21-2006 | 21:47:26 | | 22748 | ab21813
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Multi Channel
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Multi Channel\MultiChannel_ServerMain.pas | 08-28-2007 | 15:40:44 | | 5996 | 421bd803
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Multi Channel\MultiChannelLibrary_Intf.pas | 08-28-2007 | 15:40:44 | | 2762 | ebea3eea
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Multi Channel\MultiChannelLibrary_Invk.pas | 08-28-2007 | 15:40:44 | | 1823 | 9ce2589f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Multi Channel\MultiChannelService_Impl.pas | 04-26-2006 | 14:53:12 | | 1362 | 2c284490
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Multi Channel\MultiChannel_Client.res | 04-26-2006 | 14:53:12 | | 22748 | ab21813
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Multi Channel\MultiChannel_DLLServer.res | 04-26-2006 | 14:53:12 | | 876 | d795f11f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Multi Channel\MultiChannel_Server.res | 04-26-2006 | 14:53:12 | | 23724 | 358994b2
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Multi Channel\MultiChannel_ClientData.dfm | 04-26-2006 | 14:53:12 | | 484 | fe120d71
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Multi Channel\MultiChannel_ClientMain.dfm | 05-23-2008 | 22:04:42 | | 4630 | 90f49851
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Multi Channel\MultiChannel_ServerMain.dfm | 05-23-2008 | 22:04:42 | | 6626 | bdc2b8ea
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Multi Channel\MultiChannel_Client.dpr | 04-26-2006 | 14:53:12 | | 540 | 6fb162af
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Multi Channel\MultiChannel_Client.bdsproj | 05-25-2007 | 17:12:08 | | 8394 | e2ffee59
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Multi Channel\MultiChannel_Client.dproj | 05-29-2007 | 16:16:46 | | 3592 | 6758ebc9
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Multi Channel\MultiChannel_DLLServer.dpr | 04-26-2006 | 14:53:12 | | 752 | 98b19d6c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Multi Channel\MultiChannel_DLLServer.bdsproj | 05-25-2007 | 17:12:08 | | 8397 | 2d3bb92a
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Multi Channel\MultiChannel_DLLServer.dproj | 05-29-2007 | 16:16:46 | | 3533 | ffe4175e
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Multi Channel\MultiChannel_Server.dpr | 04-26-2006 | 14:53:12 | | 634 | 44dec486
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Multi Channel\MultiChannel_Server.bdsproj | 05-25-2007 | 17:12:08 | | 8393 | 7391f66a
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Multi Channel\MultiChannel_Server.dproj | 05-29-2007 | 16:16:46 | | 3647 | 604bf35d
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Multi Channel\MultiChannel.Sample.html | 08-28-2007 | 15:40:44 | | 1719 | 8f397029
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Multi Channel\MultiChannelLibrary.rodl | 04-26-2006 | 14:53:12 | | 674 | 96daa98b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Multi Channel\MultiChannel.bpg | 04-26-2006 | 14:53:12 | | 970 | 3b881d46
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Multi Channel\MultiChannel.bdsgroup | 05-25-2007 | 17:12:08 | | 873 | a9530172
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Multi Channel\MultiChannel.groupproj | 05-29-2007 | 16:16:46 | | 2059 | b0cf8117
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Multi Channel\MultiChannel_ClientData.pas | 04-26-2006 | 14:53:12 | | 1181 | 1b030990
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Multi Channel\MultiChannel_ClientMain.pas | 08-28-2007 | 15:40:44 | | 4127 | 5d477a8b
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Proxy Server
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Proxy Server\ProxyServer_Client.res | 04-21-2006 | 22:00:50 | | 23460 | 92e057f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Proxy Server\ProxyServer_MainServer.res | 04-21-2006 | 22:00:50 | | 23460 | 98e0e797
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Proxy Server\ProxyServer_ProxyServer.res | 04-21-2006 | 22:00:50 | | 23460 | 98e0e797
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Proxy Server\RODLFILE.res | 04-21-2006 | 22:00:50 | | 1775 | c321a7ed
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Proxy Server\ProxyServer_Client_Main.dfm | 05-23-2008 | 22:04:42 | | 1825 | 6e75767d
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Proxy Server\ProxyServer_MainServer_Main.dfm | 05-23-2008 | 22:04:42 | | 909 | 6b58c17b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Proxy Server\ProxyServer_ProxyServer_Main.dfm | 04-21-2006 | 22:00:50 | | 961 | 5d8699c9
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Proxy Server\ProxyServer_Client.dpr | 04-21-2006 | 22:00:50 | | 348 | 62313c1e
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Proxy Server\ProxyServer_Client.bdsproj | 05-25-2007 | 17:12:08 | | 8392 | 4b5d3ff3
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Proxy Server\ProxyServer_Client.dproj | 05-29-2007 | 16:16:46 | | 3460 | 8a5d75f7
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Proxy Server\ProxyServer_MainServer.dpr | 04-21-2006 | 22:00:50 | | 682 | 9397013d
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Proxy Server\ProxyServer_MainServer.bdsproj | 05-25-2007 | 17:12:08 | | 8396 | 684f9f13
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Proxy Server\ProxyServer_MainServer.dproj | 05-29-2007 | 16:16:46 | | 3676 | b626780a
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Proxy Server\ProxyServer_ProxyServer.dpr | 04-21-2006 | 22:00:50 | | 455 | cda8c474
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Proxy Server\ProxyServer_ProxyServer.bdsproj | 05-25-2007 | 17:12:08 | | 8397 | 5c66ee8e
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Proxy Server\ProxyServer_ProxyServer.dproj | 05-29-2007 | 16:16:46 | | 3555 | bf1c9c95
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Proxy Server\ProxyServer.Sample.html | 06-26-2006 | 13:12:12 | | 1263 | 2e2c6279
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Proxy Server\ProxyServerMainLibrary.rodl | 04-21-2006 | 22:00:50 | | 1695 | bb61173
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Proxy Server\ProxyServer.bpg | 04-21-2006 | 22:00:50 | | 979 | 5e269229
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Proxy Server\ProxyServer.bdsgroup | 05-25-2007 | 17:12:08 | | 882 | 3d97a4a9
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Proxy Server\ProxyServer.groupproj | 05-29-2007 | 16:16:46 | | 2086 | eb0273b0
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Proxy Server\ProxyServer_Client_Main.pas | 04-21-2006 | 22:00:50 | | 2087 | 81d8b1a2
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Proxy Server\ProxyServer_MainServer_Main.pas | 04-21-2006 | 22:00:50 | | 882 | c0a56925
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Proxy Server\ProxyServer_ProxyServer_Impl.pas | 06-26-2006 | 12:13:06 | | 3220 | f4204377
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Proxy Server\ProxyServer_ProxyServer_Main.pas | 04-21-2006 | 22:00:50 | | 995 | 23eb98
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Proxy Server\ProxyServerMainLibrary_Intf.pas | 04-21-2006 | 22:00:50 | | 5837 | c0e0db99
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Proxy Server\ProxyServerMainLibrary_Invk.pas | 04-21-2006 | 22:00:50 | | 3960 | 446bc71a
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Proxy Server\ProxyServerMainService_Impl.pas | 04-21-2006 | 22:00:50 | | 1874 | d1203b0e
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Service Discovery
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Service Discovery\ServiceDiscoveryMain.dfm | 05-23-2008 | 22:04:42 | | 5962 | 844dc044
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Service Discovery\ServiceDiscoveryMain.pas | 07-28-2006 | 12:18:32 | | 5879 | 96244e36
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Service Discovery\RODLFILE.res | 08-11-2003 | 18:10:06 | | 1233 | 11366909
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Service Discovery\ServiceDiscovery.dpr | 06-22-2006 | 19:05:00 | | 335 | d93d2659
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Service Discovery\ServiceDiscovery.bdsproj | 05-25-2007 | 17:12:08 | | 8391 | 880860f1
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Service Discovery\ServiceDiscovery.dproj | 05-29-2007 | 16:16:46 | | 3447 | 19461b56
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Service Discovery\ServiceDiscovery.res | 06-22-2006 | 19:05:00 | | 22748 | a6c8709c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Service Discovery\ServiceDiscovery.Sample.html | 06-26-2006 | 14:19:26 | | 766 | 19fd5fdf
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Session Types
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Session Types\SessionTypesService_Impl.pas | 06-26-2006 | 17:03:58 | | 3421 | ac3f679b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Session Types\RODLFILE.res | 06-06-2006 | 00:00:06 | | 2414 | 9fe1547c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Session Types\SessionTypes_Client.res | 06-06-2006 | 00:00:06 | | 22748 | ab21813
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Session Types\SessionTypes_Server.res | 06-06-2006 | 00:00:06 | | 22748 | 5ac86f48
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Session Types\LoginService_Impl.dfm | 06-06-2006 | 00:00:06 | | 124 | 32ea6995
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Session Types\SessionTypes_ClientMain.dfm | 05-23-2008 | 22:04:42 | | 3774 | 703923f0
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Session Types\SessionTypes_Server_DBSessionManager.dfm | 06-26-2006 | 17:03:58 | | 4009 | cb30ca18
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Session Types\SessionTypes_ServerMain.dfm | 05-23-2008 | 22:04:42 | | 3848 | 4e60f6f8
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Session Types\SessionTypesService_Impl.dfm | 06-06-2006 | 00:00:06 | | 138 | 4416762f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Session Types\SessionTypes_Client.dpr | 06-22-2006 | 18:07:38 | | 354 | 272a299b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Session Types\SessionTypes_Client.bdsproj | 05-25-2007 | 17:12:08 | | 8394 | 23d4b218
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Session Types\SessionTypes_Client.dproj | 05-29-2007 | 16:16:46 | | 3465 | 3cfd8184
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Session Types\SessionTypes_Server.dpr | 02-05-2007 | 19:22:12 | | 1015 | b36c19c5
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Session Types\SessionTypes_Server.bdsproj | 05-25-2007 | 17:12:08 | | 8394 | 4983b340
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Session Types\SessionTypes_Server.dproj | 05-29-2007 | 16:16:46 | | 3966 | 7f9ef0a6
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Session Types\SessionTypes.Sample.html | 06-23-2006 | 12:08:16 | | 2052 | 33b83a6a
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Session Types\SessionTypes Create Session Table.sql | 06-06-2006 | 00:00:06 | | 351 | f2b14a0c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Session Types\SessionTypesLibrary.rodl | 06-06-2006 | 00:00:06 | | 2334 | b8ea53de
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Session Types\SessionTypes.bpg | 06-06-2006 | 00:00:06 | | 875 | 5ddae631
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Session Types\SessionTypes.bdsgroup | 05-25-2007 | 17:12:08 | | 753 | c8beb8f9
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Session Types\SessionTypes.groupproj | 05-29-2007 | 16:16:46 | | 1590 | 5e7ce81a
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Session Types\LoginService_Impl.pas | 06-06-2006 | 00:00:06 | | 2933 | 6fac7acd
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Session Types\SessionTypes_ClientMain.pas | 06-26-2006 | 13:38:28 | | 2896 | 4a03cfc1
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Session Types\SessionTypes_Server_DBSessionManager.pas | 06-22-2006 | 18:07:38 | | 715 | 5da68cb1
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Session Types\SessionTypes_ServerMain.pas | 09-17-2007 | 15:12:38 | | 8902 | ebafdfab
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Session Types\SessionTypesLibrary_Intf.pas | 06-06-2006 | 00:00:06 | | 6466 | a8c0b11b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Session Types\SessionTypesLibrary_Invk.pas | 06-06-2006 | 00:00:06 | | 6085 | c939878
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Super TCP Channel Chat
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Super TCP Channel Chat\SuperTCPChannelChat_Server.res | 04-21-2006 | 19:17:52 | | 22748 | 9880fe42
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Super TCP Channel Chat\ChatServerService_Impl.dfm | 04-21-2006 | 19:17:52 | | 306 | 78c64ebb
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Super TCP Channel Chat\LoginService_Impl.dfm | 04-21-2006 | 19:17:52 | | 270 | f057e2a3
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Super TCP Channel Chat\SuperTCPChannelChat_ClientMain.dfm | 05-23-2008 | 22:04:42 | | 2525 | eb12f20f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Super TCP Channel Chat\SuperTCPChannelChat_ServerMain.dfm | 10-10-2007 | 13:13:22 | | 1291 | f7a49d11
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Super TCP Channel Chat\SuperTCPChannelChat_Client.dpr | 04-21-2006 | 19:17:52 | | 358 | 253cff1a
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Super TCP Channel Chat\SuperTCPChannelChat_Client.bdsproj | 05-25-2007 | 17:12:08 | | 8401 | 2b0832e7
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Super TCP Channel Chat\SuperTCPChannelChat_Client.dproj | 05-29-2007 | 16:16:46 | | 3507 | 126cbbfa
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Super TCP Channel Chat\SuperTCPChannelChat_Server.dpr | 04-21-2006 | 19:17:52 | | 849 | c8660929
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Super TCP Channel Chat\SuperTCPChannelChat_Server.bdsproj | 05-25-2007 | 17:12:08 | | 8401 | 610111ed
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Super TCP Channel Chat\SuperTCPChannelChat_Server.dproj | 05-29-2007 | 16:16:46 | | 3865 | 702df497
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Super TCP Channel Chat\SuperTCPChannelChat.Sample.html | 06-27-2006 | 14:54:02 | | 882 | b73f1b52
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Super TCP Channel Chat\SuperTCPChannelChatLibrary.rodl | 04-25-2006 | 17:50:06 | | 2743 | 122f4946
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Super TCP Channel Chat\SuperTCPChannelChat.bpg | 04-21-2006 | 19:17:52 | | 917 | 66912271
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Super TCP Channel Chat\SuperTCPChannelChat.bdsgroup | 05-25-2007 | 17:12:08 | | 795 | 2d5f9084
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Super TCP Channel Chat\SuperTCPChannelChat.groupproj | 05-29-2007 | 16:16:46 | | 1716 | 82bf135a
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Super TCP Channel Chat\ChatServerService_Impl.pas | 02-05-2008 | 19:02:40 | | 2361 | bf0f0d45
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Super TCP Channel Chat\LoginService_Impl.pas | 02-05-2008 | 19:02:40 | | 3072 | 69296314
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Super TCP Channel Chat\SuperTCPChannelChat_ClientMain.pas | 06-27-2006 | 19:16:20 | | 5666 | 260056d1
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Super TCP Channel Chat\SuperTCPChannelChat_ServerMain.pas | 10-10-2007 | 13:13:22 | | 2414 | 745463a5
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Super TCP Channel Chat\SuperTCPChannelChatLibrary_Intf.pas | 10-10-2007 | 13:13:22 | | 11882 | 9a2ba7e7
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Super TCP Channel Chat\SuperTCPChannelChatLibrary_Invk.pas | 10-10-2007 | 13:13:22 | | 4401 | 184b93cf
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Super TCP Channel Chat\RODLFILE.res | 04-25-2006 | 17:50:06 | | 2823 | b1b817e7
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Super TCP Channel Chat\SuperTCPChannelChat_Client.res | 04-21-2006 | 19:17:52 | | 22748 | a6c8709c
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Class Factories
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Class Factories\SingletonService_Impl.pas | 04-11-2004 | 14:50:46 | | 1026 | bdda303d
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Class Factories\SingleCallService_Impl.pas | 06-27-2006 | 19:59:36 | | 984 | ee851bfb
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Class Factories\RODLFile.RES | 06-27-2006 | 19:59:36 | | 2344 | b28394f1
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Class Factories\PooledService_Impl.pas | 06-27-2006 | 19:59:36 | | 1086 | e3d6491f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Class Factories\ClassFactoryClientMain.pas | 06-27-2006 | 19:59:36 | | 2449 | 7cbd4d47
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Class Factories\ClassFactoryClientMain.dfm | 05-23-2008 | 22:04:42 | | 3886 | 74ed0aac
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Class Factories\ClassFactories.Sample.html | 06-29-2006 | 12:41:08 | | 1782 | 2a889f32
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Class Factories\ClassFactoryServerMain.pas | 06-27-2006 | 19:59:36 | | 893 | 64337583
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Class Factories\ClassFactoryServerMain.dfm | 05-23-2008 | 22:04:42 | | 1033 | fc957de2
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Class Factories\ClassFactoryServer.res | 10-18-2007 | 17:57:16 | | 23696 | 6d2620c8
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Class Factories\ClassFactoryServer.dpr | 10-18-2007 | 17:57:16 | | 733 | b3ad8c9a
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Class Factories\ClassFactoryServer.bdsproj | 05-25-2007 | 17:12:08 | | 8392 | 6556a4af
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Class Factories\ClassFactoryServer.dproj | 05-29-2007 | 16:16:46 | | 3752 | dcda899f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Class Factories\ClassFactoryLibrary_Invk.pas | 06-27-2006 | 19:59:36 | | 5685 | c0e8cfbd
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Class Factories\ClassFactoryLibrary_Intf.pas | 06-27-2006 | 19:59:36 | | 6971 | b6a2c4e
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Class Factories\ClassFactoryLibrary.RODL | 06-27-2006 | 19:59:36 | | 2264 | 14f71e45
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Class Factories\ClassFactoryClient.res | 03-28-2006 | 13:24:36 | | 22748 | ab21813
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Class Factories\ClassFactoryClient.dpr | 03-28-2006 | 13:24:36 | | 358 | 516f1074
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Class Factories\ClassFactoryClient.bdsproj | 05-25-2007 | 17:12:08 | | 8393 | a538cd47
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Class Factories\ClassFactoryClient.dproj | 05-29-2007 | 16:16:46 | | 3520 | 3891a138
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Class Factories\ClassFactories.bpg | 06-27-2006 | 19:59:36 | | 869 | 73b63fcc
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Class Factories\ClassFactories.bdsgroup | 05-25-2007 | 17:12:08 | | 747 | 12f840bd
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Class Factories\ClassFactories.groupproj | 05-29-2007 | 16:16:46 | | 1572 | 66abd4ee
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dispatch Notifier
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dispatch Notifier\DispatchNotifierClient.res | 04-21-2006 | 22:00:50 | | 23752 | 96821486
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dispatch Notifier\DispatchNotifierServer.res | 04-21-2006 | 22:00:50 | | 22748 | 14d4a9ca
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dispatch Notifier\RODLFile.RES | 04-21-2006 | 22:00:50 | | 937 | f222f8a2
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dispatch Notifier\DispatchNotifierClientMain.dfm | 05-23-2008 | 22:04:42 | | 1751 | 4862e361
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dispatch Notifier\DispatchNotifierServerMain.dfm | 05-23-2008 | 22:04:42 | | 1382 | 21bdb27f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dispatch Notifier\DispatchNotifierClient.dpr | 04-21-2006 | 22:00:50 | | 319 | f950b058
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dispatch Notifier\DispatchNotifierClient.bdsproj | 05-25-2007 | 17:12:08 | | 8396 | 54180f71
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dispatch Notifier\DispatchNotifierClient.dproj | 05-29-2007 | 16:16:46 | | 3482 | 5ad67acf
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dispatch Notifier\DispatchNotifierServer.dpr | 04-21-2006 | 22:00:50 | | 631 | dd2b21f8
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dispatch Notifier\DispatchNotifierServer.bdsproj | 05-25-2007 | 17:12:08 | | 8397 | 2b05eed9
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dispatch Notifier\DispatchNotifierServer.dproj | 05-29-2007 | 16:16:46 | | 3678 | ab8e7b08
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dispatch Notifier\DispatchNotifier.Sample.html | 06-27-2006 | 13:45:36 | | 1004 | 8e6ae02
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dispatch Notifier\DispatchNotifierLibrary.rodl | 04-21-2006 | 22:00:50 | | 857 | 1980f353
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dispatch Notifier\DispatchNotifier.bpg | 04-21-2006 | 22:00:50 | | 893 | b7af5d3c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dispatch Notifier\DispatchNotifier.bdsgroup | 05-25-2007 | 17:12:08 | | 771 | 6dca8732
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dispatch Notifier\DispatchNotifier.groupproj | 05-29-2007 | 16:16:46 | | 1644 | e17d4e3c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dispatch Notifier\DispatchNotifierClientMain.pas | 04-21-2006 | 22:00:50 | | 1260 | 6ad7dec
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dispatch Notifier\DispatchNotifierLibrary_Intf.pas | 04-21-2006 | 22:00:50 | | 2755 | 37b19a0
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dispatch Notifier\DispatchNotifierLibrary_Invk.pas | 04-21-2006 | 22:00:50 | | 1795 | 8f82af1f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dispatch Notifier\DispatchNotifierServerMain.pas | 05-17-2006 | 19:02:14 | | 1295 | c22a8943
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dispatch Notifier\DispatchNotifierService_Impl.pas | 06-27-2006 | 13:04:00 | | 5114 | 7f0cc17f
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dynamic Request
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dynamic Request\DynamicRequestClient.res | 04-21-2006 | 22:00:50 | | 22748 | ab21813
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dynamic Request\DynamicRequestServer.res | 04-21-2006 | 22:00:50 | | 22748 | 5ac86f48
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dynamic Request\RODLFile.RES | 04-21-2006 | 22:00:50 | | 2164 | d19dd717
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dynamic Request\DynamicRequestClientMain.dfm | 05-23-2008 | 22:04:42 | | 2869 | 635cb96e
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dynamic Request\DynamicRequestServerMain.dfm | 05-23-2008 | 22:04:42 | | 932 | fda20638
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dynamic Request\DynamicRequestClient.dpr | 04-21-2006 | 22:00:50 | | 357 | 6f318736
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dynamic Request\DynamicRequestClient.bdsproj | 05-25-2007 | 17:12:08 | | 8395 | d2ac705c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dynamic Request\DynamicRequestClient.dproj | 05-29-2007 | 16:16:46 | | 3471 | 284c8c82
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dynamic Request\DynamicRequestServer.dpr | 04-21-2006 | 22:00:50 | | 655 | e1a64f90
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dynamic Request\DynamicRequestServer.bdsproj | 05-25-2007 | 17:12:08 | | 8395 | 643a4d87
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dynamic Request\DynamicRequestServer.dproj | 05-29-2007 | 16:16:46 | | 3660 | 19191994
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dynamic Request\DynamicRequest.Sample.html | 06-26-2006 | 11:37:46 | | 1154 | e497961d
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dynamic Request\DynamicRequestLibrary.rodl | 04-21-2006 | 22:00:50 | | 2084 | 828a54fb
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dynamic Request\DynamicRequest.bpg | 04-21-2006 | 22:00:50 | | 881 | 1b665247
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dynamic Request\DynamicRequest.bdsgroup | 05-25-2007 | 17:12:08 | | 759 | 4e609930
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dynamic Request\DynamicRequest.groupproj | 05-29-2007 | 16:16:46 | | 1608 | 1060d47d
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dynamic Request\DynamicRequestClientMain.pas | 06-07-2007 | 19:18:58 | | 2900 | d0e0109a
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dynamic Request\DynamicRequestLibrary_Intf.pas | 04-21-2006 | 22:00:50 | | 6010 | 5fdb6261
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dynamic Request\DynamicRequestLibrary_Invk.pas | 04-21-2006 | 22:00:50 | | 3949 | bc346d43
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dynamic Request\DynamicRequestServerMain.pas | 06-27-2006 | 18:18:12 | | 787 | 55792a7e
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Dynamic Request\DynamicRequestService_Impl.pas | 04-21-2006 | 22:00:50 | | 1972 | 9033c9cf
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Time Server
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Time Server\TimeServer_ClientMain.dfm | 05-23-2008 | 22:04:42 | | 1457 | ed042424
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Time Server\TimeServer_ServerMain.dfm | 06-27-2006 | 12:21:36 | | 1302 | ae6cc604
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Time Server\TimeServer.dpr | 04-21-2006 | 22:00:50 | | 542 | 7d667549
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Time Server\TimeServer.bdsproj | 05-25-2007 | 17:12:08 | | 8385 | 7866e466
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Time Server\TimeServer.dproj | 05-29-2007 | 16:16:46 | | 3581 | 9e29961
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Time Server\TimeServer_Client.dpr | 04-21-2006 | 22:00:50 | | 373 | 10a750ac
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Time Server\TimeServer_Client.bdsproj | 05-25-2007 | 17:12:08 | | 8391 | 2b842348
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Time Server\TimeServer_Client.dproj | 05-29-2007 | 16:16:46 | | 3504 | 25e5588
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Time Server\TimeServerGroup.Sample.html | 06-26-2006 | 20:32:22 | | 467 | 54ecfae1
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Time Server\TimeServer.rodl | 10-24-2006 | 15:40:22 | | 1147 | eb4e22c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Time Server\TimeServerGroup.bpg | 04-21-2006 | 22:00:50 | | 842 | b6041d43
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Time Server\TimeServerGroup.bdsgroup | 05-25-2007 | 17:12:08 | | 720 | ad39a29a
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Time Server\TimeServerGroup.groupproj | 05-29-2007 | 16:16:46 | | 1491 | 632a5bb8
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Time Server\TfrmServerSelectSrc.pas | 04-21-2006 | 22:00:50 | | 2517 | 508ceed0
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Time Server\TimeServer_ClientMain.pas | 06-27-2006 | 12:21:36 | | 1278 | e42d9801
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Time Server\TimeServer_Impl.pas | 04-21-2006 | 22:00:50 | | 1497 | 72e65940
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Time Server\TimeServer_Intf.pas | 04-21-2006 | 22:00:50 | | 3042 | bb449283
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Time Server\TimeServer_Invk.pas | 04-21-2006 | 22:00:50 | | 2500 | 903786b8
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Time Server\TimeServer_ServerMain.pas | 06-27-2006 | 12:21:36 | | 1165 | c09b5c8c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Time Server\RODLFILE.res | 04-21-2006 | 22:00:50 | | 1207 | c1267b38
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Time Server\TimeServer.res | 04-21-2006 | 22:00:50 | | 22748 | 14d4a9ca
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Time Server\TimeServer_Client.res | 04-21-2006 | 22:00:50 | | 23752 | 96821486
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Time Server\TfrmServerSelectSrc.dfm | 04-21-2006 | 22:00:50 | | 1145 | 4e62f37e
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Variants
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Variants\VariantsClientMain.dfm | 05-30-2006 | 17:06:10 | | 1583 | bd960831
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Variants\VariantsServerMain.dfm | 05-23-2008 | 22:04:42 | | 1228 | 8741aadd
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Variants\VariantsClient.dpr | 04-21-2006 | 22:00:50 | | 286 | f7c59a8a
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Variants\VariantsClient.bdsproj | 05-25-2007 | 17:12:08 | | 8389 | 153ed42
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Variants\VariantsClient.dproj | 05-29-2007 | 16:16:46 | | 3435 | e64f9915
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Variants\VariantsServer.dpr | 04-21-2006 | 22:00:50 | | 542 | 5f5cdee4
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Variants\VariantsServer.bdsproj | 05-25-2007 | 17:12:08 | | 8388 | f5d45a0e
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Variants\VariantsServer.dproj | 05-29-2007 | 16:16:46 | | 3605 | 9152030b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Variants\VariantsGroup.Sample.html | 06-26-2006 | 11:37:46 | | 987 | 65bab1ad
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Variants\VariantsLibrary.rodl | 04-21-2006 | 22:00:50 | | 1908 | 69ac7181
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Variants\VariantsGroup.bpg | 04-21-2006 | 22:00:50 | | 845 | 85aad375
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Variants\VariantsGroup.bdsgroup | 05-25-2007 | 17:12:08 | | 723 | 73c67975
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Variants\VariantsGroup.groupproj | 05-29-2007 | 16:16:46 | | 1500 | f2ad60ff
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Variants\VariantsClientMain.pas | 05-30-2006 | 17:06:10 | | 6589 | 2d22299b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Variants\VariantsLibrary_Intf.pas | 04-21-2006 | 22:00:50 | | 9556 | d2a15afe
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Variants\VariantsLibrary_Invk.pas | 04-21-2006 | 22:00:50 | | 4579 | de754769
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Variants\VariantsServerMain.pas | 04-21-2006 | 22:00:50 | | 832 | a8570c9b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Variants\VariantsService_Impl.pas | 04-21-2006 | 22:00:50 | | 1940 | 15ebb708
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Variants\RODLFILE.res | 04-21-2006 | 22:00:50 | | 1988 | 2b045a80
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Variants\VariantsClient.res | 04-21-2006 | 22:00:50 | | 22748 | ab21813
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Variants\VariantsServer.res | 04-21-2006 | 22:00:50 | | 23724 | 358994b2
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\FPC Server
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\FPC Server\NewLibrary_Async.pas | 06-06-2007 | 18:48:54 | | 3312 | 535fd9
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\FPC Server\NewLibrary_Intf.pas | 06-06-2007 | 18:48:54 | | 3221 | d7a84d38
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\FPC Server\NewLibrary_Invk.pas | 06-06-2007 | 18:48:54 | | 2643 | eb241b2d
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\FPC Server\NewService_Impl.pas | 06-06-2007 | 18:48:54 | | 1440 | 1cf11f01
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\FPC Server\RODLFILE.res | 06-06-2007 | 18:48:54 | | 1252 | 62a99134
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\FPC Server\SimpleClient.pas | 06-06-2007 | 18:48:54 | | 1078 | fd5aeb4c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\FPC Server\SimpleServer.pas | 06-06-2007 | 18:48:54 | | 884 | 965ab5e7
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\FPC Server\SimpleServer.res | 06-06-2007 | 18:48:54 | | 22748 | 34fa96cd
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\FPC Server\NewLibrary.RODL | 06-06-2007 | 18:48:54 | | 1172 | a40ccbd9
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Named Pipes
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Named Pipes\NamedPipeServerMain.dfm | 06-03-2006 | 14:18:22 | | 610 | 96997373
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Named Pipes\NamedPipeClient.dpr | 06-08-2006 | 03:04:46 | | 338 | 631153ea
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Named Pipes\NamedPipeClient.bdsproj | 05-25-2007 | 17:12:08 | | 8390 | adf6fe48
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Named Pipes\NamedPipeClient.dproj | 05-29-2007 | 16:16:46 | | 3441 | 5f69df6e
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Named Pipes\NamedPipeServer.dpr | 06-08-2006 | 03:04:46 | | 609 | c7f00fe
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Named Pipes\NamedPipeServer.bdsproj | 05-25-2007 | 17:12:08 | | 8390 | 6e7f6aa1
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Named Pipes\NamedPipeServer.dproj | 05-29-2007 | 16:16:46 | | 3614 | 14bbeb7b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Named Pipes\NamedPipeGroup.Sample.html | 06-27-2006 | 17:57:44 | | 778 | 5108701f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Named Pipes\NamedPipeLibrary.rodl | 06-08-2006 | 03:04:46 | | 1242 | 9f2c46b2
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Named Pipes\NamedPipeGroup.bpg | 06-03-2006 | 14:16:38 | | 851 | 751af4f8
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Named Pipes\NamedPipeGroup.bdsgroup | 05-25-2007 | 17:12:08 | | 729 | 1b786781
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Named Pipes\NamedPipeGroup.groupproj | 05-29-2007 | 16:16:46 | | 1518 | 6b44b807
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Named Pipes\NamedPipeClientMain.pas | 06-08-2006 | 03:04:46 | | 1796 | b3704dc6
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Named Pipes\NamedPipeClientMain.dfm | 05-23-2008 | 22:04:42 | | 1654 | 8512858e
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Named Pipes\NamedPipeLibrary_Intf.pas | 06-08-2006 | 03:04:46 | | 3450 | 22205f2b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Named Pipes\NamedPipeLibrary_Invk.pas | 06-08-2006 | 03:04:46 | | 3164 | cae4d7df
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Named Pipes\NamedPipeServerMain.pas | 06-03-2006 | 14:18:22 | | 1619 | 24e4e96d
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Named Pipes\NamedPipeService_Impl.pas | 06-08-2006 | 03:04:46 | | 1640 | 5f7195a
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Named Pipes\NamedPipeClient.res | 06-08-2006 | 03:04:46 | | 22748 | ab21813
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Named Pipes\NamedPipeServer.res | 06-08-2006 | 03:04:46 | | 22748 | 9880fe42
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Named Pipes\RODLFILE.res | 06-08-2006 | 03:04:46 | | 1322 | f261f79b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Named Pipes\install_service.cmd | 06-26-2006 | 19:08:10 | | 62 | bb836ea2
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\Named Pipes\uninstall_service.cmd | 06-26-2006 | 19:08:10 | | 65 | b751f1a9
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\RODL
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\RODL\RODLMain.dfm | 07-17-2006 | 12:39:34 | | 3010 | dac13340
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\RODL\RODL.dpr | 04-06-2006 | 02:33:00 | | 211 | 2ad324e
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\RODL\RODL.bdsproj | 05-25-2007 | 17:12:08 | | 8379 | c13bf6b1
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\RODL\RODL.dproj | 05-29-2007 | 16:16:46 | | 3375 | 166668
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\RODL\RODL.Sample.html | 12-08-2006 | 11:19:44 | | 1072 | e09c999f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\RODL\RODLMain.pas | 04-14-2008 | 15:21:34 | | 10223 | fd67e8a7
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples\RODL\RODL.res | 04-06-2006 | 02:33:00 | | 3372 | 20e772fd
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\Config.ini | 03-30-2006 | 06:05:54 | | 121 | cbc6ac8
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\TemplateOptions.ini | 10-17-2007 | 11:35:14 | | 463 | 93a62050
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\$svclibname.rodl | 04-08-2004 | 19:57:18 | | 1007 | fc2a22bb
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\_BDS
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\_BDS\Server
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\_BDS\Server\$PRJNAME.bdsproj | 11-24-2004 | 21:55:18 | | 8205 | b6c69788
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\_BDS\Client
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\_BDS\Client\$PRJNAMEClient.bdsproj | 11-24-2004 | 21:55:18 | | 8211 | 1cb444d1
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\_BDS\Client\$PRJNAMEGroup.bdsgroup | 11-22-2007 | 15:05:26 | | 664 | 72f2b298
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\VclExe
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\VclExe\fServerForm.pas | 10-09-2006 | 18:14:28 | | 697 | 1463511b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\VclExe\fServerForm.dfm | 08-13-2003 | 16:07:18 | | 856 | a7ba6d6c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\VclExe\Info.ini | 12-21-2006 | 22:22:06 | | 158 | 98249651
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\VclExe\Icon.ico | 04-09-2004 | 01:37:50 | | 3262 | 64303600
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\VclExe\$PRJNAME.res | 04-09-2004 | 01:49:26 | | 22748 | 34fa96cd
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\VclExe\$PRJNAME.dpr | 07-20-2003 | 18:27:24 | | 317 | 19ffefe
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\Isapi
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\Isapi\Unit1.pas | 10-09-2006 | 18:14:28 | | 347 | 52615b3f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\Isapi\Unit1.dfm | 02-24-2003 | 20:12:24 | | 422 | d3a6baa7
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\Isapi\Info.ini | 03-06-2004 | 14:27:18 | | 110 | ca291550
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\Isapi\Icon.ico | 04-09-2004 | 01:35:18 | | 3262 | 8ee81af9
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\Isapi\$PRJNAME.res | 04-09-2004 | 17:46:56 | | 22748 | 34fa96cd
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\Isapi\$PRJNAME.dpr | 07-20-2003 | 18:27:24 | | 622 | 54ed9445
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\Cgi
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\Cgi\Unit1.pas | 10-09-2006 | 18:14:28 | | 347 | 52615b3f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\Cgi\Unit1.dfm | 02-24-2003 | 20:12:24 | | 422 | d3a6baa7
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\Cgi\Info.ini | 03-06-2004 | 14:28:26 | | 94 | d3d3c4ef
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\Cgi\Icon.ico | 04-09-2004 | 01:34:54 | | 3262 | 733ff608
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\Cgi\$PRJNAME.res | 04-09-2004 | 01:49:26 | | 22748 | 34fa96cd
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\Cgi\$PRJNAME.dpr | 07-20-2003 | 18:27:24 | | 392 | aae96eb8
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\Apache2
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\Apache2\Unit1.pas | 10-09-2006 | 18:14:28 | | 347 | 52615b3f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\Apache2\Unit1.dfm | 02-24-2003 | 20:12:24 | | 422 | d3a6baa7
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\Apache2\Info.ini | 03-15-2006 | 21:42:08 | | 148 | 7592c51b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\Apache2\Icon.ico | 04-09-2004 | 01:34:22 | | 3262 | 8ee81af9
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\Apache2\$PRJNAME.res | 04-09-2004 | 17:46:56 | | 22748 | 34fa96cd
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\Apache2\$PRJNAME.dpr | 07-20-2003 | 18:27:24 | | 429 | aa813a73
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\Apache
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\Apache\Unit1.pas | 10-09-2006 | 18:14:28 | | 347 | 52615b3f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\Apache\Unit1.dfm | 02-24-2003 | 20:12:24 | | 422 | d3a6baa7
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\Apache\Info.ini | 03-06-2004 | 14:28:26 | | 148 | d9ab060e
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\Apache\Icon.ico | 04-09-2004 | 01:34:22 | | 3262 | 8ee81af9
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\Apache\$PRJNAME.res | 04-09-2004 | 17:46:56 | | 22748 | 34fa96cd
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\Apache\$PRJNAME.dpr | 07-20-2003 | 18:27:24 | | 426 | 75893ef7
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\ClxExe
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\ClxExe\Info.ini | 12-21-2006 | 22:22:06 | | 237 | a1338b1c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\ClxExe\fServerForm.pas | 10-09-2006 | 18:14:28 | | 508 | 7ea3b882
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\ClxExe\fServerForm.xfm | 07-20-2003 | 18:27:24 | | 496 | cb6a647b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\ClxExe\$PRJNAME.dpr | 07-20-2003 | 18:27:24 | | 318 | 7903a49e
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\ClxExe\$PRJNAME.res | 04-09-2004 | 01:49:26 | | 22748 | 34fa96cd
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\ClxExe\Icon.ico | 04-09-2004 | 01:34:54 | | 3262 | 64303600
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\DLL
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\DLL\$PRJNAME.res | 04-09-2004 | 17:46:56 | | 22748 | 34fa96cd
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\DLL\Icon.ico | 04-09-2004 | 01:35:18 | | 3262 | f8946563
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\DLL\Info.ini | 04-23-2007 | 16:44:08 | | 124 | acc8f0d3
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\DLL\$PRJNAME.dpr | 10-09-2006 | 18:14:28 | | 658 | 15dd3baa
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\Service
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\Service\Icon.ico | 04-09-2004 | 01:35:18 | | 3262 | e7eada98
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\Service\Info.ini | 12-21-2006 | 22:22:06 | | 174 | 6245c3be
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\Service\Unit1.dfm | 06-17-2003 | 15:31:34 | | 541 | a936c1ff
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\Service\Unit1.pas | 10-09-2006 | 18:14:28 | | 1468 | 545dbf57
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\Service\$PRJNAME.dpr | 07-20-2003 | 18:27:24 | | 310 | 567f5cf3
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\Service\$PRJNAME.res | 04-09-2004 | 01:49:26 | | 22748 | 34fa96cd
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\LOCAL
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\LOCAL\Info.ini | 01-17-2006 | 19:23:30 | | 130 | ff44ec14
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\LOCAL\fClientDataModule.dfm | 01-17-2006 | 19:23:30 | | 375 | 64b222eb
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\LOCAL\fMainForm.dfm | 01-17-2006 | 19:23:30 | | 522 | 59ec7f7a
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\LOCAL\fServerDataModule.dfm | 01-17-2006 | 19:23:30 | | 420 | 82a92caa
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\LOCAL\$PRJNAME.dpr | 01-17-2006 | 19:23:30 | | 573 | 15181692
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\LOCAL\Icon.ico | 01-17-2006 | 19:23:30 | | 3262 | 13498aad
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\LOCAL\fClientDataModule.pas | 10-09-2006 | 18:14:28 | | 427 | da03f341
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\LOCAL\fMainForm.pas | 01-17-2006 | 19:23:30 | | 409 | 1f1f39e0
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\LOCAL\fServerDataModule.pas | 10-09-2006 | 18:14:28 | | 411 | d559bae0
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\LOCAL\$PRJNAME.res | 01-17-2006 | 19:23:30 | | 22748 | 557d2f64
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\COMBOEXE
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\COMBOEXE\fServerDataModule.pas | 10-09-2006 | 18:14:28 | | 643 | 91f5a349
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\COMBOEXE\fServerForm.dfm | 04-11-2004 | 17:43:42 | | 579 | 19c9757
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\COMBOEXE\fServerForm.pas | 04-11-2004 | 17:43:42 | | 477 | ad54006
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\COMBOEXE\Icon.ico | 04-11-2004 | 17:43:42 | | 3262 | 7ccd8aff
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\COMBOEXE\Info.ini | 12-21-2006 | 22:22:06 | | 184 | dfc20223
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\COMBOEXE\$PRJNAME.dpr | 04-11-2004 | 17:43:42 | | 643 | d4ecd304
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\COMBOEXE\$PRJNAME.res | 04-11-2004 | 17:43:42 | | 22748 | 34fa96cd
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\COMBOEXE\fServerDataModule.dfm | 04-11-2004 | 17:43:42 | | 451 | 1285274
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\CONSOLE
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\CONSOLE\$PRJNAME.dpr | 06-06-2007 | 15:20:06 | | 679 | 7de5bf0f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\CONSOLE\$PRJNAME.res | 06-06-2007 | 15:11:12 | | 22748 | 34fa96cd
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\CONSOLE\Info.ini | 06-06-2007 | 15:11:12 | | 172 | 55b57515
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\RO\CONSOLE\Icon.ico | 06-06-2007 | 18:48:22 | | 3262 | 733ff608
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\_Client
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\_Client\$PRJNAMEClient.res | 03-29-2004 | 20:17:22 | | 22748 | a6c8709c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\_Client\$PRJNAMEGroup.bpg | 03-06-2004 | 14:26:16 | | 822 | b30475f0
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\_Client\fClientForm.dfm | 08-28-2003 | 22:46:56 | | 719 | b44c58c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\_Client\fClientForm.pas | 10-09-2006 | 18:14:28 | | 889 | e7894cb2
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\_Client\$PRJNAMEClient.dpr | 08-28-2003 | 22:46:56 | | 236 | 265eaeb5
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Bin
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Help\RegisterDelphiHelp.exe | 12-03-2003 | 20:26:00 | | 97280 | bd823b42
+Shell Link: C:\Documents and Settings\Usuario\Menú Inicio\Programas\RemObjects SDK\Service Builder.lnk
+Link Info: C:\Archivos de programa\RemObjects Software\RemObjects SDK (Common)\Bin\ROServiceBuilder.exe | | | 0 | 1 | 0 |
+Shell Link: C:\Documents and Settings\Usuario\Menú Inicio\Programas\RemObjects SDK\Service Tester.lnk
+Link Info: C:\Archivos de programa\RemObjects Software\RemObjects SDK (Common)\Bin\ROServiceTester.exe | | | 0 | 1 | 0 |
+Shell Link: C:\Documents and Settings\Usuario\Menú Inicio\Programas\RemObjects SDK\MasterServer.lnk
+Link Info: C:\Archivos de programa\RemObjects Software\RemObjects SDK (Common)\Bin\ROMasterServer.exe | | | 0 | 1 | 0 |
+Made Dir: C:\Archivos de programa\RemObjects Software\Everwood\Welcome
+Made Dir: C:\Archivos de programa\RemObjects Software\Everwood\Welcome\RemObjects SDK
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Welcome\RemObjects SDK\Welcome.png | 05-17-2007 | 15:24:54 | | 34659 | cc05cf6a
+RegDB Key: Software\RemObjects\Everwood\Welcome
+RegDB Val:
+RegDB Root: 1
+RegDB Key: Software\RemObjects\Everwood\Welcome\Products
+RegDB Val:
+RegDB Root: 1
+RegDB Key: Software\RemObjects\Everwood\Welcome\Products\RemObjects SDK
+RegDB Val: 5.0.30.691
+RegDB Name: Installed Version
+RegDB Root: 1
+RegDB Key: Software\RemObjects\Everwood\Welcome\Products\RemObjects SDK
+RegDB Val: 3
+RegDB Name: Order
+RegDB Root: 1
+RegDB Key: Software\RemObjects\Everwood\Welcome\Products\RemObjects SDK
+RegDB Val: C:\Archivos de programa\RemObjects Software\Everwood\Welcome\RemObjects SDK\Welcome.png
+RegDB Name: Image
+RegDB Root: 1
+RegDB Key: Software\RemObjects\Everwood\Welcome\Products\RemObjects SDK\Samples for Delphi
+RegDB Val: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Samples
+RegDB Name: Folder
+RegDB Root: 1
+RegDB Key: Software\RemObjects\Everwood\Welcome\Products\RemObjects SDK\Samples for Delphi
+RegDB Val: Flat
+RegDB Name: Structure
+RegDB Root: 1
+RegDB Key: Software\RemObjects\Everwood\Welcome\Products\RemObjects SDK
+RegDB Val: Data Abstract
+RegDB Name: Hide For
+RegDB Root: 1
+RegDB Key: Software\RemObjects\Everwood\Welcome\Products\RemObjects SDK
+RegDB Val: http://devcenter.remobjects.com/ro
+RegDB Name: DevCenter URL
+RegDB Root: 1
+RegDB Key: Software\RemObjects\RemObjects SDK for Delphi
+RegDB Val: 1
+RegDB Name: Installed
+RegDB Root: 1
+RegDB Key: Software\RemObjects\RemObjects SDK for Delphi
+RegDB Val: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi
+RegDB Name: InstallDir
+RegDB Root: 1
+RegDB Key: Software\RemObjects\RemObjects SDK for Delphi
+RegDB Val: 5.0.30.691
+RegDB Name: Version
+RegDB Root: 1
+Made Dir: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\BACKUP
+File Delete: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Help\RegisterDelphiHelp.exe
+Backup Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\BACKUP\RegisterDelphiHelp.exe
+Made Dir: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)
+Made Dir: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)\Bin
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)\Bin\DASchemaModeler.exe | 05-23-2008 | 22:15:24 | 5.0.30.691 | 11554304 | 7350c2d7
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)\Bin\DASchemaModeler.chm | 05-23-2008 | 22:16:34 | | 116401 | 47c7b11b
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)\Bin\borlndmm.dll | 08-09-2002 | 17:00:00 | 7.0.4.453 | 22528 | ec93288e
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)\Bin\DefaultConnections.ini | 04-03-2006 | 18:13:56 | | 879 | dfaa0117
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)\Bin\Data Abstract.lic | 05-23-2008 | 22:14:54 | | 945 | 121cc2f
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)\Bin\DAConverter.exe | 05-23-2008 | 22:16:46 | | 112056 | 47750d98
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)\Bin\DABDEDrv.dad | 05-23-2008 | 22:15:34 | 5.0.30.691 | 1272320 | 565af1b2
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)\Bin\DAIBXDrv.dad | 05-23-2008 | 22:15:34 | 5.0.30.691 | 1200128 | 9321da41
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)\Bin\DAIBODrv.dad | 05-23-2008 | 22:15:56 | 5.0.30.691 | 1665024 | 5cd06e1e
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)\Bin\DADBXDrv.dad | 05-23-2008 | 22:15:30 | 5.0.30.691 | 1974784 | 317ae96a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)\Bin\DAADODrv.dad | 05-23-2008 | 22:15:28 | 5.0.30.691 | 1191424 | 4434f3b5
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)\Bin\DASDACDrv.dad | 05-23-2008 | 22:15:38 | 5.0.30.691 | 1371136 | 3f82c605
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)\Bin\DAMyDACDrv.dad | 05-23-2008 | 22:15:42 | 5.0.30.691 | 1427456 | fe051712
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)\Bin\DAODACDrv.dad | 05-23-2008 | 22:15:40 | 5.0.30.691 | 1523712 | 869a1263
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)\Bin\DAIBDACDrv.dad | 05-23-2008 | 22:15:44 | 5.0.30.691 | 1451008 | c5e85bc2
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)\Bin\DANexusDBDrv.dad | 05-23-2008 | 22:16:14 | 5.0.30.691 | 3131392 | b7dc3c52
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)\Bin\DADBISAM3Drv.dad | 05-23-2008 | 22:15:50 | 5.0.30.691 | 1718272 | d5c54ec0
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)\Bin\DADBISAM4Drv.dad | 05-23-2008 | 22:15:52 | 5.0.30.691 | 2026496 | 798f6de5
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)\Bin\DAPostgresDACDrv.dad | 05-23-2008 | 22:15:48 | 5.0.30.691 | 1348608 | 27eb5f74
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)\Bin\DAMySQLDACDrv.dad | 05-23-2008 | 22:15:48 | 5.0.30.691 | 1419264 | 77c30a5e
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)\Bin\DAFIBDrv.dad | 05-23-2008 | 22:16:20 | 5.0.30.691 | 1508352 | 27405a99
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)\Bin\DAZeosDrv.dad | 05-23-2008 | 22:16:24 | 5.0.30.691 | 2012160 | d92607cd
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)\Bin\DAElevateDBDrv.dad | 05-23-2008 | 22:16:18 | | 2008576 | f0af9cf6
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)\Bin\DAAnyDACDrv.dad | 05-23-2008 | 22:16:30 | 5.0.5.25 | 2487808 | 6b00e40b
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)\Bin\dbxmss30.dll | 08-26-2007 | 21:03:00 | 11.0.2804.9245 | 258048 | 6bd18b59
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)\Bin\dbxmys30.dll | 08-26-2007 | 21:03:00 | 11.0.2804.9245 | 228864 | e764a9e3
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)\Bin\dbxmysA30.dll | 08-26-2007 | 21:03:00 | 11.0.2804.9245 | 215040 | b40f9c31
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)\Bin\dbxora30.dll | 08-26-2007 | 21:03:00 | 11.0.2804.9245 | 311296 | dfe461d5
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)\Bin\dbxoraw30.dll | 08-26-2007 | 21:03:00 | 11.0.2804.9245 | 334848 | d8c98c8d
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)\Bin\dbxasa30.dll | 08-26-2007 | 21:03:00 | 11.0.2804.9245 | 235520 | 17db664d
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)\Bin\dbxase30.dll | 08-26-2007 | 21:03:00 | 11.0.2804.9245 | 256512 | 70881c06
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)\Bin\dbxdb230.dll | 08-26-2007 | 21:03:00 | 11.0.2804.9245 | 241664 | e06e5323
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)\Bin\dbxinf30.dll | 08-26-2007 | 21:03:00 | 11.0.2804.9245 | 270848 | c841716a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)\Bin\dbxint30.dll | 08-26-2007 | 21:03:00 | 11.0.2804.9245 | 253440 | be3a9c5b
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)\Bin\dbxdrivers.ini | 12-26-2007 | 13:44:54 | | 10175 | f0d78322
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)\Bin\dbxconnections.ini | 02-19-2008 | 17:07:32 | | 5027 | 43b475c5
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)\Bin\DASQLiteDrv.dad | 05-23-2008 | 22:15:36 | 5.0.30.691 | 1076736 | dce857eb
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)\Bin\sqlite3.dll | 02-13-2007 | 09:09:00 | | 388126 | 5069b4ff
+File Overwrite: C:\WINDOWS\system32\msvcrt.dll | 08-19-2004 | 20:42:18 | 7.0.2600.2180 | 681472 | 3e43316c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\license.txt | 03-13-2008 | 17:47:10 | | 9459 | 9ae670d8
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\README.html | 02-22-2008 | 15:00:48 | | 12730 | 47e2d19b
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\da.png | 05-17-2007 | 13:03:16 | | 6599 | 3933defd
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Launch.exe | 12-03-2003 | 20:26:00 | | 14848 | 81197b84
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)\Bin\DAServer.exe | 05-23-2008 | 22:16:42 | 5.0.30.691 | 6998528 | 1415337f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK (Common)\Bin\ROSBDataAbstract.dll | 05-23-2008 | 22:03:42 | 5.0.30.691 | 326144 | c944d694
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK (Common)\Bin\ROSBDataAbstract.codetemplates.cfg | 03-28-2004 | 03:18:34 | | 2487 | 44b5ea9c
+Made Dir: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Help
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Help\RemObjects Data Abstract for Delphi.hlp | 05-23-2008 | 22:18:58 | | 1290240 | b6defd06
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Help\RemObjects Data Abstract for Delphi.cnt | 05-23-2008 | 22:18:32 | | 25859 | c8aefbca
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Help\RemObjects Data Abstract for Delphi.als | 05-23-2008 | 22:18:32 | | 15349 | 6e13c357
+Made Dir: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu
+Made Dir: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D6
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D6\DataAbstract_Core_D6.bpl | 05-23-2008 | 22:14:18 | 5.0.30.691 | 1394176 | 2c8feaa1
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D6\DataAbstract_Scripting_D6.bpl | 05-23-2008 | 22:14:20 | 5.0.30.691 | 72192 | 8a50f801
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D6\DataAbstract_IDE_D6.bpl | 05-23-2008 | 22:14:22 | 5.0.30.691 | 273408 | f79d9dd9
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D6\DataAbstract_ADODriver_D6.bpl | 05-23-2008 | 22:14:22 | 5.0.30.691 | 95232 | 5a019863
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D6\DataAbstract_IBXDriver_D6.bpl | 05-23-2008 | 22:14:22 | 5.0.30.691 | 58880 | fb0e3f96
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D6\DataAbstract_DBXDriver_D6.bpl | 05-23-2008 | 22:14:24 | 5.0.30.691 | 76288 | 4857f0f2
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D6\DataAbstract_BDEDriver_D6.bpl | 05-23-2008 | 22:14:24 | 5.0.30.691 | 78848 | db30de5f
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D6\DataAbstract_SQLiteDriver_D6.bpl | 05-23-2008 | 22:14:24 | 5.0.30.691 | 138240 | e4ca7195
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D6\DataAbstract_Core_D6.dcp | 05-23-2008 | 22:14:18 | | 1886563 | 874f191a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D6\DataAbstract_Scripting_D6.dcp | 05-23-2008 | 22:14:20 | | 54398 | 4197e87c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D6\DataAbstract_IDE_D6.dcp | 05-23-2008 | 22:14:22 | | 128724 | c50617a0
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D6\DataAbstract_ADODriver_D6.dcp | 05-23-2008 | 22:14:22 | | 69721 | 1854ef4d
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D6\DataAbstract_IBXDriver_D6.dcp | 05-23-2008 | 22:14:22 | | 32385 | b4d1fd00
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D6\DataAbstract_DBXDriver_D6.dcp | 05-23-2008 | 22:14:24 | | 44983 | 45a99c08
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D6\DataAbstract_BDEDriver_D6.dcp | 05-23-2008 | 22:14:24 | | 45137 | 251b1b46
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D6\DataAbstract_SQLiteDriver_D6.dcp | 05-23-2008 | 22:14:24 | | 129917 | 89e2a211
+Made Dir: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D7
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D7\DataAbstract_Core_D7.bpl | 05-23-2008 | 22:14:26 | 5.0.30.691 | 1396736 | 54e4429b
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D7\DataAbstract_Scripting_D7.bpl | 05-23-2008 | 22:14:28 | 5.0.30.691 | 73728 | 809b19b3
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D7\DataAbstract_IDE_D7.bpl | 05-23-2008 | 22:14:30 | 5.0.30.691 | 274432 | 8e7db79f
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D7\DataAbstract_ADODriver_D7.bpl | 05-23-2008 | 22:14:30 | 5.0.30.691 | 96768 | c75a9bb
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D7\DataAbstract_IBXDriver_D7.bpl | 05-23-2008 | 22:14:32 | 5.0.30.691 | 59904 | af66bac4
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D7\DataAbstract_DBXDriver_D7.bpl | 05-23-2008 | 22:14:32 | 5.0.30.691 | 77824 | bdd93ec
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D7\DataAbstract_BDEDriver_D7.bpl | 05-23-2008 | 22:14:32 | 5.0.30.691 | 79872 | 7911b272
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D7\DataAbstract_SQLiteDriver_D7.bpl | 05-23-2008 | 22:14:34 | 5.0.30.691 | 139776 | 2383661a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D7\DataAbstract_Core_D7.dcp | 05-23-2008 | 22:14:26 | | 1901869 | ab50a59f
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D7\DataAbstract_Scripting_D7.dcp | 05-23-2008 | 22:14:28 | | 56040 | ff24341a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D7\DataAbstract_IDE_D7.dcp | 05-23-2008 | 22:14:30 | | 135199 | 3ac31a3e
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D7\DataAbstract_ADODriver_D7.dcp | 05-23-2008 | 22:14:30 | | 71054 | bc492f4d
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D7\DataAbstract_IBXDriver_D7.dcp | 05-23-2008 | 22:14:32 | | 33718 | d0f373cd
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D7\DataAbstract_DBXDriver_D7.dcp | 05-23-2008 | 22:14:32 | | 46423 | 1cb2e9c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D7\DataAbstract_BDEDriver_D7.dcp | 05-23-2008 | 22:14:32 | | 46534 | fd793b01
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D7\DataAbstract_SQLiteDriver_D7.dcp | 05-23-2008 | 22:14:34 | | 131188 | b2734653
+Made Dir: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D10
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D10\DataAbstract_Core_D10.bpl | 05-23-2008 | 22:14:36 | 5.0.30.691 | 1404416 | f16879c9
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D10\DataAbstract_Scripting_D10.bpl | 05-23-2008 | 22:14:36 | 5.0.30.691 | 65536 | 4091105d
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D10\DataAbstract_IDE_D10.bpl | 05-23-2008 | 22:14:38 | 5.0.30.691 | 264704 | 19daac4e
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D10\DataAbstract_ADODriver_D10.bpl | 05-23-2008 | 22:14:40 | 5.0.30.691 | 91136 | dce93619
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D10\DataAbstract_IBXDriver_D10.bpl | 05-23-2008 | 22:14:40 | 5.0.30.691 | 53248 | f2aacb93
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D10\DataAbstract_DBXDriver_D10.bpl | 05-23-2008 | 22:14:42 | 5.0.30.691 | 74752 | b7aa159b
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D10\DataAbstract_BDEDriver_D10.bpl | 05-23-2008 | 22:14:42 | 5.0.30.691 | 74240 | 251ad952
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D10\DataAbstract_SQLiteDriver_D10.bpl | 05-23-2008 | 22:14:42 | 5.0.30.691 | 137728 | 1e938efb
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D10\DataAbstract_Core_D10.dcp | 05-23-2008 | 22:14:36 | | 1989943 | 2d8b5b28
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D10\DataAbstract_Scripting_D10.dcp | 05-23-2008 | 22:14:36 | | 53434 | 58038957
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D10\DataAbstract_IDE_D10.dcp | 05-23-2008 | 22:14:38 | | 130269 | 237161c3
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D10\DataAbstract_ADODriver_D10.dcp | 05-23-2008 | 22:14:40 | | 69469 | 727ce55a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D10\DataAbstract_IBXDriver_D10.dcp | 05-23-2008 | 22:14:40 | | 31439 | cc54979d
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D10\DataAbstract_DBXDriver_D10.dcp | 05-23-2008 | 22:14:42 | | 45009 | c1fa5a45
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D10\DataAbstract_BDEDriver_D10.dcp | 05-23-2008 | 22:14:42 | | 44532 | 3c2fe244
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D10\DataAbstract_SQLiteDriver_D10.dcp | 05-23-2008 | 22:14:42 | | 135479 | cadc5502
+Made Dir: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D11
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D11\DataAbstract_Core_D11.bpl | 05-23-2008 | 22:14:46 | 5.0.30.691 | 1404416 | 15a6ecbf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D11\DataAbstract_Scripting_D11.bpl | 05-23-2008 | 22:14:48 | 5.0.30.691 | 66048 | 90a2d68a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D11\DataAbstract_IDE_D11.bpl | 05-23-2008 | 22:14:50 | 5.0.30.691 | 264704 | deecbc6a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D11\DataAbstract_ADODriver_D11.bpl | 05-23-2008 | 22:14:50 | 5.0.30.691 | 91136 | 1e4fc56d
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D11\DataAbstract_IBXDriver_D11.bpl | 05-23-2008 | 22:14:50 | 5.0.30.691 | 53248 | c0434367
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D11\DataAbstract_DBXDriver_D11.bpl | 05-23-2008 | 22:14:52 | 5.0.30.691 | 77824 | 396f5567
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D11\DataAbstract_BDEDriver_D11.bpl | 05-23-2008 | 22:14:52 | 5.0.30.691 | 74240 | 48a83d38
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D11\DataAbstract_SQLiteDriver_D11.bpl | 05-23-2008 | 22:14:54 | 5.0.30.691 | 137728 | 77c31b9b
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D11\DataAbstract_Core_D11.dcp | 05-23-2008 | 22:14:46 | | 1989933 | b73e9a34
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D11\DataAbstract_Scripting_D11.dcp | 05-23-2008 | 22:14:48 | | 53465 | 3e704081
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D11\DataAbstract_IDE_D11.dcp | 05-23-2008 | 22:14:50 | | 130338 | 5e32fa31
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D11\DataAbstract_ADODriver_D11.dcp | 05-23-2008 | 22:14:50 | | 69501 | 60ccd154
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D11\DataAbstract_IBXDriver_D11.dcp | 05-23-2008 | 22:14:50 | | 31471 | 91e33794
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D11\DataAbstract_DBXDriver_D11.dcp | 05-23-2008 | 22:14:52 | | 45689 | 18bf9d84
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D11\DataAbstract_BDEDriver_D11.dcp | 05-23-2008 | 22:14:52 | | 44564 | 6076058b
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Dcu\D11\DataAbstract_SQLiteDriver_D11.dcp | 05-23-2008 | 22:14:54 | | 135516 | 19ec1178
+Made Dir: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\eDefines.inc | 04-28-2008 | 14:24:26 | | 16839 | 252645ba
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract.inc | 04-28-2008 | 17:09:28 | | 619 | e73cf353
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDAADODataTable.pas | 10-01-2007 | 11:36:36 | | 8122 | edc19c5d
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDABinAdapter.pas | 05-22-2008 | 10:33:44 | | 41621 | 66a92ae3
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDABin2DataStreamer.pas | 05-22-2008 | 10:33:44 | | 70951 | fad347f
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDABusinessProcessor.pas | 02-28-2008 | 16:31:44 | | 90510 | 6e33ddb7
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDACDSDataTable.pas | 10-01-2007 | 11:36:36 | | 19070 | f92440b8
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDACache.pas | 04-24-2007 | 16:58:58 | | 10849 | b3ba7d48
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDAClasses.pas | 02-12-2008 | 21:10:02 | | 55564 | 38e5b88
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDAClientDataModule.pas | 04-24-2007 | 16:58:58 | | 1109 | dcd10cf6
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDADataTable.pas | 05-22-2008 | 10:33:44 | | 163341 | 28b0174c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDADatasetProvider.pas | 04-24-2007 | 16:58:58 | | 2596 | b79e934
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDADatasetWrapper.pas | 12-31-2007 | 13:58:58 | | 20507 | b7a2b63c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDADataStreamer.pas | 01-10-2008 | 19:04:52 | | 21814 | 8f590de
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDADataTableReferenceCollection.pas | 04-24-2007 | 16:58:58 | | 5956 | cb6689b2
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDADBSessionManager.pas | 04-28-2008 | 17:11:56 | | 12382 | 3f8dedac
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDADelta.pas | 02-22-2008 | 14:37:04 | | 35550 | 69f115d5
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDADesigntimeCall.pas | 04-24-2007 | 16:58:58 | | 1249 | 4a6d3fea
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDADriverInfo.pas | 03-27-2008 | 11:44:14 | | 2030 | 1b601851
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDADriverManager.pas | 03-27-2008 | 11:44:14 | | 14631 | 42b211dc
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDAEngine.pas | 05-21-2008 | 16:27:20 | | 94595 | 88f2623d
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDAExceptions.pas | 04-24-2007 | 16:58:58 | | 1206 | f0f67b46
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDAExpressionEvaluator.pas | 03-14-2008 | 19:07:22 | | 21674 | 6cb9736e
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDAHelpers.pas | 06-04-2007 | 13:34:40 | | 13285 | 279760bd
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDAInterfaces.pas | 05-22-2008 | 10:33:44 | | 211412 | 834e2a0
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDAInterfacesEx.pas | 11-02-2007 | 16:58:16 | | 1599 | 58acf8d7
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDAMacroProcessors.pas | 04-24-2007 | 16:48:40 | | 17740 | 63291a0b
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDAMacros.pas | 04-07-2008 | 16:58:28 | | 26075 | a4714312
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDAMemDataset.pas | 05-22-2008 | 10:33:44 | | 148017 | d91787b0
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDAMemDataTable.pas | 05-22-2008 | 10:33:44 | | 16445 | b04e6a83
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDAPleaseWaitForm.pas | 03-27-2008 | 11:44:14 | | 3660 | 62763dd4
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDAReconcileDialog.pas | 03-27-2008 | 11:44:14 | | 12279 | 3da7a96f
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDAReconcileDialog.dfm | 02-14-2008 | 10:02:24 | | 32449 | b1c98847
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDAReconcileDialogDetails.pas | 02-14-2008 | 10:02:24 | | 8500 | 420df38d
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDAReconcileDialogDetails.dfm | 02-14-2008 | 10:02:24 | | 2131 | 9a390261
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDARemoteDataAdapter.pas | 05-05-2008 | 11:17:44 | | 42328 | 563e38e3
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDARemoteDataAdapterRequests.pas | 05-05-2008 | 11:17:44 | | 11102 | 8b089baa
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDARemoteCommand.pas | 05-05-2008 | 11:17:44 | | 6345 | caf5e384
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDARes.pas | 05-08-2007 | 18:24:38 | | 5169 | dab5016d
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDARegExpr.pas | 04-07-2008 | 16:58:28 | | 159337 | d7789cd7
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDAServerLog.pas | 04-24-2007 | 16:58:58 | | 18367 | 23740b4c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDASupportClasses.pas | 02-26-2008 | 14:19:30 | | 11980 | a2d782b1
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDAMySQLInterfaces.pas | 05-07-2008 | 14:44:04 | | 25491 | a8a6ddd1
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDASQLiteInterfaces.pas | 05-07-2008 | 14:44:04 | | 9086 | f9347471
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDASQL92Interfaces.pas | 05-07-2008 | 14:44:04 | | 10732 | aa20f045
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDASQL92QueryBuilder.pas | 10-08-2007 | 15:10:02 | | 6179 | a3149303
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDAPostgresInterfaces.pas | 05-07-2008 | 14:44:04 | | 23368 | cfe5b700
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDAUtils.pas | 03-27-2008 | 11:44:14 | | 7607 | a19a9963
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDAWhere.pas | 05-22-2008 | 10:33:44 | | 28948 | 22b8f056
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDAXmlAdapter.pas | 05-22-2008 | 10:33:44 | | 28111 | fbb71286
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDAXmlUtils.pas | 05-22-2008 | 10:33:44 | | 21472 | 4ace29d3
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDAPoweredByDataAbstractButton.pas | 03-27-2008 | 11:44:14 | | 1926 | 1f5fe8a9
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDAPoweredByDataAbstractButton.res | 12-22-2005 | 16:36:52 | | 61352 | 519c6dbb
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDAADOInterfaces.pas | 05-07-2008 | 14:44:04 | | 46403 | 97cd50bd
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDAIBInterfaces.pas | 05-07-2008 | 14:44:04 | | 26894 | 412e0d74
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDAOracleInterfaces.pas | 05-07-2008 | 15:27:10 | | 22483 | cbe6b0c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDAElevateDBInterfaces.pas | 05-07-2008 | 14:44:04 | | 25565 | 84c1910c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\MultiDbLoginService_Impl.pas | 05-05-2008 | 17:24:44 | | 3611 | 9ab8b48f
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\MultiDbLoginService_Impl.dfm | 01-21-2006 | 01:10:22 | | 58 | 97df86d8
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\SimpleLoginService_Impl.pas | 05-05-2008 | 17:24:44 | | 2086 | 980889f8
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\SimpleLoginService_Impl.dfm | 01-21-2006 | 01:10:22 | | 56 | 67462fb1
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\BaseLoginService_Impl.pas | 03-15-2007 | 17:32:38 | | 1641 | 82a00e34
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\BaseLoginService_Impl.dfm | 01-21-2006 | 01:10:22 | | 105 | 26e53c6c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstractService_Impl.pas | 02-28-2008 | 16:32:08 | | 62381 | 12f75f03
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstractService_Impl.dfm | 01-21-2006 | 01:10:22 | | 111 | 23de7f5b
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract4_Intf.pas | 05-08-2008 | 17:10:02 | | 78739 | 9747e381
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract4_Async.pas | 02-05-2008 | 22:28:46 | | 25811 | 8caf296e
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract4_Invk.pas | 05-05-2008 | 17:24:44 | | 25469 | 2eb0a539
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DALoginService_Impl.pas | 05-22-2008 | 10:33:44 | | 6751 | e88f0871
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DARemoteService_Impl.pas | 05-22-2008 | 10:33:44 | | 42729 | 4bb27ddb
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract3_Invk.pas | 05-05-2008 | 17:24:44 | | 14702 | 7fc214f4
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract3_Intf.pas | 05-05-2008 | 17:24:44 | | 44818 | ac87908
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract3_Async.pas | 05-05-2008 | 17:24:44 | | 14446 | 5963fa80
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDADB2Interfaces.pas | 05-07-2008 | 14:44:04 | | 22284 | 31774935
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDASybaseInterfaces.pas | 05-07-2008 | 14:44:04 | | 33621 | 744a583
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\MultiDbLoginServiceV5_Impl.pas | 05-15-2008 | 17:02:26 | | 1265 | f9b712b0
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\MultiDbLoginServiceV5_Impl.dfm | 05-15-2008 | 17:02:26 | | 62 | 18ed7369
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DBSessionManager Default Schema.daConnections | 08-11-2003 | 14:02:46 | | 707 | d560b296
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DBSessionManager Default Schema.daSchema | 02-05-2007 | 18:43:42 | | 16273 | e1c54e62
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DBSessionManager Create Session Table.sql | 08-11-2003 | 14:02:46 | | 383 | 5ab3fc4e
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDAScriptingProvider.pas | 04-24-2007 | 16:58:58 | | 3521 | bb426b21
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDAPascalScript.pas | 04-24-2007 | 16:58:58 | | 40974 | 3e57a882
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDAPSScriptingProvider.pas | 04-24-2007 | 19:51:46 | | 7539 | 8149f2af
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\uDAKDBInfo.pas | 04-24-2007 | 16:58:58 | | 9336 | 7bd7d4d5
+Made Dir: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\IDE
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\IDE\uDADBSessionManagerEditor.pas | 11-15-2006 | 03:32:14 | | 4128 | 2d5f3794
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\IDE\uDADataAbstractEditors.pas | 12-25-2007 | 15:04:36 | | 40721 | a8fead68
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\IDE\uDAIDEMenu.pas | 09-13-2007 | 18:54:08 | | 7569 | b1be5a84
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\IDE\uDAIDEData.pas | 05-15-2006 | 16:11:54 | | 1149 | 543f1e83
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\IDE\uDAIDEData.dfm | 05-19-2006 | 12:38:34 | | 10644 | f3a6d240
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\IDE\uDASchemaUnitsGenerator.pas | 06-28-2007 | 13:33:46 | | 40805 | 263165e9
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\IDE\DataAbstract_IDE_AdditionalResources.res | 05-23-2008 | 22:14:10 | | 2200 | 4597e39a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\IDE\DataAbstract_IDE_AdditionalResources.rc | 07-07-2003 | 00:22:46 | | 50 | a17c7a22
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\IDE\uDAIDERes.pas | 08-28-2003 | 18:48:20 | | 328 | aba952e4
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\IDE\Resources.BDS.RES | 09-12-2007 | 19:19:46 | | 8644 | 470d05df
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\IDE\uDASelectDataTablesForm.dfm | 05-16-2007 | 00:03:44 | | 10964 | 17cfbaca
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\IDE\uDASelectDataTablesForm.pas | 05-18-2006 | 01:36:10 | | 1966 | 8bfbf404
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\IDE\uDAGuideWizardForm.pas | 06-15-2007 | 18:36:48 | | 8436 | 3c3b6371
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\IDE\uDAGuideWizardForm.dfm | 06-15-2007 | 18:36:48 | | 112294 | c07740c4
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\IDE\uDADataTableWizards.pas | 06-13-2007 | 17:33:36 | | 6954 | f8275dcc
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\IDE\uDAClientDataModuleWizard.pas | 05-05-2008 | 11:17:44 | | 12175 | f9222b1f
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\IDE\uDAClientModuleWizard.res | 05-23-2008 | 22:14:10 | | 3392 | c53a085e
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\IDE\uDADataTableEditorForm.pas | 05-05-2008 | 11:17:44 | | 15313 | fe38d34f
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\IDE\uDADataTableEditorForm.dfm | 01-21-2006 | 01:14:40 | | 14241 | 96f2d075
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\IDE\uDAClientDataModuleDataTableWizardForm.pas | 05-21-2007 | 19:04:08 | | 3148 | 11710161
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\IDE\uDAClientDataModuleDataTableWizardForm.dfm | 08-28-2003 | 18:48:20 | | 8944 | d24b6b44
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\IDE\uDAClientDataModuleEditorForm.dfm | 08-28-2003 | 18:48:20 | | 13817 | b03b5a6
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\IDE\uDAClientDataModuleEditorForm.pas | 03-30-2004 | 16:48:22 | | 4296 | 18c1eb32
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\IDE\uDADataTableMasterLinkWizardForm.dfm | 02-05-2008 | 14:47:46 | | 79568 | d908a6bf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\IDE\uDADataTableMasterLinkWizardForm.pas | 06-08-2007 | 15:08:18 | | 11866 | 8326854b
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\BuildPackages_D6.bpg | 11-26-2007 | 12:41:52 | | 3269 | a478f4f
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\BuildPackages_D7.bpg | 11-26-2007 | 12:41:52 | | 3231 | e54c1336
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\BuildPackages_D10.bdsgroup | 11-26-2007 | 10:54:50 | | 3493 | a81c62dd
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\BuildPackages_D11.groupproj | 11-26-2007 | 12:41:52 | | 14693 | 2ea17252
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\BuildPackages_K3.bpg | 12-10-2003 | 21:30:46 | | 884 | 4d1ea896
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\BuildDrivers.bpg | 03-27-2008 | 11:40:48 | | 1999 | ec8a01b
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_Core_Reg.pas | 06-26-2007 | 11:58:22 | | 2537 | 715dccf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_Core_Glyphs.res | 05-23-2008 | 22:14:10 | | 59848 | a63596a8
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_Core_D6.dof | 05-23-2008 | 22:14:06 | | 1097 | c3e0bd46
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_Core_D6.dpk | 05-15-2008 | 17:02:26 | | 4157 | d010687c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_Core_D6.res | 05-23-2008 | 22:14:12 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_Core_D6.cfg | 07-10-2004 | 21:22:48 | | 563 | f23c0c0e
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_Core_D7.dof | 05-23-2008 | 22:14:06 | | 2769 | d5cf05d0
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_Core_D7.dpk | 05-15-2008 | 17:02:26 | | 4157 | 16b7ca93
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_Core_D7.res | 05-23-2008 | 22:14:26 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_Core_D7.cfg | 01-21-2006 | 01:07:06 | | 887 | 8637066f
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_Core_D10.bdsproj | 01-21-2006 | 01:07:06 | | 8134 | 88fe3c55
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_Core_D10.cfg | 12-03-2005 | 18:13:14 | | 485 | 3412f4b
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_Core_D10.dpk | 05-15-2008 | 17:02:26 | | 4159 | 3d843c75
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_Core_D10.res | 05-23-2008 | 22:14:34 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_Core_D11.dproj | 09-13-2007 | 13:01:04 | | 9703 | f59e5b27
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_Core_D11.dpk | 05-15-2008 | 17:02:26 | | 4161 | f2221d2c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_Core_D11.res | 05-23-2008 | 22:14:44 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_Scripting_Reg.pas | 04-24-2007 | 19:51:46 | | 1354 | 94e969d8
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_Scripting_Glyphs.res | 05-23-2008 | 22:14:10 | | 2764 | 1e3006d0
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_Scripting_D6.cfg | 07-10-2004 | 21:22:36 | | 549 | b0468548
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_Scripting_D6.dof | 05-23-2008 | 22:14:06 | | 1104 | 4ada4aee
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_Scripting_D6.dpk | 08-04-2004 | 15:44:52 | | 858 | e790e6e4
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_Scripting_D6.res | 05-23-2008 | 22:14:18 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_Scripting_D7.dof | 05-23-2008 | 22:14:06 | | 1980 | b98782ab
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_Scripting_D7.dpk | 08-04-2004 | 15:44:52 | | 879 | a4690651
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_Scripting_D7.res | 05-23-2008 | 22:14:26 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_Scripting_D7.cfg | 07-10-2004 | 21:22:36 | | 497 | 5c2ed55a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_Scripting_D10.bdsproj | 12-03-2005 | 18:13:14 | | 10085 | f1772c51
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_Scripting_D10.dpk | 12-03-2005 | 18:13:14 | | 862 | d9480104
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_Scripting_D10.res | 05-23-2008 | 22:14:36 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_Scripting_D10.cfg | 12-03-2005 | 18:13:14 | | 723 | 2836ccdf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_Scripting_D11.dproj | 09-13-2007 | 13:01:04 | | 6408 | fc08f916
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_Scripting_D11.dpk | 09-13-2007 | 13:01:04 | | 862 | c2fb464c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_Scripting_D11.res | 05-23-2008 | 22:14:46 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_SimpleQuery_Reg.pas | 07-11-2004 | 04:01:40 | | 776 | db1e34a9
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_SimpleQuery_Glyphs.res | 05-23-2008 | 22:14:12 | | 3704 | e971ae17
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_SimpleQuery_D7.dpk | 12-22-2005 | 19:15:08 | | 822 | 84381291
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_SimpleQuery_D7.res | 07-10-2004 | 21:22:36 | | 1880 | 4ea2599b
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_SimpleQuery_D7.cfg | 07-10-2004 | 21:22:36 | | 497 | 5c2ed55a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_SimpleQuery_D7.dof | 05-23-2008 | 22:14:06 | | 1988 | ea17dc8d
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_SimpleQuery_D6.dpk | 07-13-2004 | 14:47:18 | | 823 | 72b63012
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_SimpleQuery_D6.res | 07-10-2004 | 21:22:36 | | 1880 | 4ea2599b
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_SimpleQuery_D6.cfg | 07-10-2004 | 21:22:36 | | 509 | 4fb58f6f
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_SimpleQuery_D6.dof | 05-23-2008 | 22:14:06 | | 1952 | d7f996ac
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_SimpleQuery_D10.bdsproj | 12-03-2005 | 19:09:32 | | 8301 | 58236b7c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_SimpleQuery_D10.dpk | 12-03-2005 | 19:09:32 | | 827 | de031c94
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_SimpleQuery_D10.res | 12-03-2005 | 19:09:32 | | 1536 | 452e318
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_SimpleQuery_D10.cfg | 12-03-2005 | 19:09:32 | | 605 | d7c17c03
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_SimpleQuery_D11.dproj | 10-16-2007 | 16:07:36 | | 6364 | 9cec6ca2
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_SimpleQuery_D11.dpk | 09-13-2007 | 13:01:04 | | 829 | 556f491d
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract_SimpleQuery_D11.res | 09-13-2007 | 13:01:04 | | 1536 | 452e318
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\IDE\DataAbstract_IDE_Reg.pas | 12-21-2006 | 22:10:20 | | 9057 | 76f016f1
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\IDE\DataAbstract_IDE_D6.dof | 05-23-2008 | 22:14:08 | | 1817 | 68d45614
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\IDE\DataAbstract_IDE_D6.dpk | 04-05-2006 | 16:33:36 | | 1390 | c8272fde
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\IDE\DataAbstract_IDE_D6.res | 05-23-2008 | 22:14:20 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\IDE\DataAbstract_IDE_D6.cfg | 04-06-2004 | 22:49:34 | | 402 | 38ad768f
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\IDE\DataAbstract_IDE_D7.dof | 05-23-2008 | 22:14:08 | | 2738 | d59c730f
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\IDE\DataAbstract_IDE_D7.dpk | 04-05-2006 | 16:33:36 | | 1390 | e40e9fa1
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\IDE\DataAbstract_IDE_D7.res | 05-23-2008 | 22:14:28 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\IDE\DataAbstract_IDE_D7.cfg | 07-10-2004 | 21:37:24 | | 766 | 785e6e46
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\IDE\DataAbstract_IDE_D10.bdsproj | 01-25-2006 | 16:12:54 | | 10040 | c61a9fcc
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\IDE\DataAbstract_IDE_D10.cfg | 12-03-2005 | 18:13:14 | | 648 | 39af4325
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\IDE\DataAbstract_IDE_D10.dpk | 04-05-2006 | 16:33:36 | | 1395 | 72a6272f
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\IDE\DataAbstract_IDE_D10.res | 05-23-2008 | 22:14:38 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\IDE\DataAbstract_IDE_D11.dproj | 09-13-2007 | 13:01:04 | | 6178 | f83f01a6
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\IDE\DataAbstract_IDE_D11.dpk | 09-13-2007 | 13:01:04 | | 1395 | e6dc87ab
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\IDE\DataAbstract_IDE_D11.res | 05-23-2008 | 22:14:48 | | 528 | 72f60ecf
+Made Dir: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_Drivers_D6.bpg | 07-07-2003 | 00:22:46 | | 1847 | 11a70210
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\uDAADODriver.pas | 04-18-2008 | 15:32:10 | | 60342 | dc631d5d
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ADODriver_Glyphs.res | 05-23-2008 | 22:14:12 | | 4872 | d757a94f
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ADODriver_D6.dpk | 07-10-2004 | 21:31:32 | | 698 | 8e88eab7
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ADODriver_D6.res | 05-23-2008 | 22:14:22 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ADODriver_D6.cfg | 07-07-2003 | 00:22:46 | | 602 | e309783a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ADODriver_D6.dof | 05-23-2008 | 22:14:06 | | 1106 | 3a76705
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ADODriver_D7.dpk | 07-10-2004 | 21:31:32 | | 698 | f4df1e90
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ADODriver_D7.res | 05-23-2008 | 22:14:30 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ADODriver_D7.cfg | 11-30-2003 | 20:22:56 | | 766 | 663e6809
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ADODriver_D7.dof | 05-23-2008 | 22:14:06 | | 2738 | dcbfe9e3
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ADODriver_D10.bdsproj | 12-03-2005 | 18:13:50 | | 8215 | bcc4e536
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ADODriver_D10.dpk | 12-03-2005 | 18:13:50 | | 700 | f141a483
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ADODriver_D10.res | 05-23-2008 | 22:14:40 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ADODriver_D10.cfg | 12-03-2005 | 18:13:50 | | 682 | 5332ff3
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ADODriver_D11.dproj | 09-13-2007 | 13:01:04 | | 5790 | 8b856da2
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ADODriver_D11.dpk | 09-13-2007 | 13:01:04 | | 700 | 4f2060da
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ADODriver_D11.res | 05-23-2008 | 22:14:50 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAADODriverHtml.res | 05-23-2008 | 22:15:26 | | 1592 | 151a895e
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAADODrv.dof | 05-23-2008 | 22:14:06 | | 2613 | 3427db80
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAADODrv.dpr | 07-10-2004 | 21:30:48 | | 189 | fd7fb5b3
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAADODrv.res | 05-23-2008 | 22:15:26 | | 672 | 43f8040a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAADODrv.cfg | 11-30-2003 | 20:22:28 | | 570 | 1ac34a70
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\uDAIBXDriver.pas | 12-26-2007 | 13:41:40 | | 14487 | 7764400d
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBXDriver_D6.dof | 05-23-2008 | 22:14:06 | | 1108 | 1bcc12a2
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBXDriver_Glyphs.res | 05-23-2008 | 22:14:12 | | 4872 | e1149f47
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBXDriver_D6.dpk | 07-10-2004 | 21:31:32 | | 702 | 338e872e
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBXDriver_D6.res | 05-23-2008 | 22:14:22 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBXDriver_D6.cfg | 07-07-2003 | 00:22:46 | | 602 | e309783a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBXDriver_D7.dof | 05-23-2008 | 22:14:06 | | 2740 | 9ebd3d94
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBXDriver_D7.dpk | 07-10-2004 | 21:31:32 | | 702 | 8a6d3f0f
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBXDriver_D7.res | 05-23-2008 | 22:14:30 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBXDriver_D7.cfg | 11-30-2003 | 20:22:56 | | 766 | 663e6809
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBXDriver_D10.bdsproj | 12-03-2005 | 18:13:50 | | 8217 | 4b9d404d
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBXDriver_D10.cfg | 12-03-2005 | 18:13:50 | | 682 | 5332ff3
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBXDriver_D10.dpk | 12-03-2005 | 18:13:50 | | 704 | 78a4c5ad
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBXDriver_D10.res | 05-23-2008 | 22:14:40 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBXDriver_D11.dproj | 09-13-2007 | 13:01:04 | | 5794 | 59a4fe5c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBXDriver_D11.dpk | 09-13-2007 | 13:01:04 | | 704 | 7bd9d86f
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBXDriver_D11.res | 05-23-2008 | 22:14:50 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAIBXDriverHtml.res | 05-23-2008 | 22:15:26 | | 1028 | 494e2631
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAIBXDrv.dof | 05-23-2008 | 22:14:06 | | 2613 | 5f0ba1a8
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAIBXDrv.dpr | 07-10-2004 | 21:30:48 | | 146 | 3e93234c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAIBXDrv.res | 05-23-2008 | 22:15:32 | | 672 | 43f8040a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAIBXDrv.cfg | 07-10-2004 | 21:30:48 | | 565 | 554472c9
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\uDABDEDriver.pas | 05-21-2008 | 11:32:38 | | 47618 | 5f2fa0ac
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_BDEDriver_D7.cfg | 01-09-2007 | 14:54:56 | | 702 | 538151b0
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_BDEDriver_D7.dpk | 01-09-2007 | 14:54:56 | | 686 | 4ecfc953
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_BDEDriver_D7.res | 05-23-2008 | 22:14:32 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_BDEDriver_D6.dpk | 01-09-2007 | 14:54:56 | | 686 | e95de8c5
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_BDEDriver_D6.cfg | 01-09-2007 | 14:54:56 | | 538 | 21fc77be
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_BDEDriver_D6.res | 05-23-2008 | 22:14:24 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_BDEDriver_D10.bdsproj | 01-09-2007 | 14:54:56 | | 8194 | 765d2fbf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_BDEDriver_D10.dpk | 01-09-2007 | 14:54:56 | | 688 | 67f196bf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_BDEDriver_D10.cfg | 01-09-2007 | 14:54:56 | | 682 | 5332ff3
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_BDEDriver_D10.res | 05-23-2008 | 22:14:42 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_BDEDriver_D11.dproj | 09-13-2007 | 13:01:04 | | 5778 | 70333d2f
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_BDEDriver_D11.dpk | 09-13-2007 | 13:01:04 | | 688 | a94673b9
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_BDEDriver_D11.res | 05-23-2008 | 22:14:52 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_BDEDriver_Glyphs.res | 05-23-2008 | 22:14:12 | | 4872 | 1b92d3d1
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DABDEDriverHtml.res | 05-23-2008 | 22:15:26 | | 1260 | 73153790
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DABDEDrv.bdsproj | 01-09-2007 | 14:54:56 | | 7991 | 32b3ddda
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DABDEDrv.dpr | 01-09-2007 | 14:54:56 | | 144 | ebac53d2
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DABDEDrv.cfg | 01-09-2007 | 14:54:56 | | 355 | 53932dcf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DABDEDrv.dof | 05-23-2008 | 22:14:06 | | 1377 | 84ba5373
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DABDEDrv.res | 05-23-2008 | 22:15:34 | | 672 | 43f8040a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\uDADBXDriver.pas | 05-18-2008 | 02:13:02 | | 31194 | 1253d3af
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_DBXDriver_Glyphs.res | 05-23-2008 | 22:14:12 | | 4872 | bd88b2d2
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_DBXDriver_D6.dpk | 07-10-2004 | 21:31:32 | | 701 | 24c1fbb1
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_DBXDriver_D6.res | 05-23-2008 | 22:14:22 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_DBXDriver_D6.cfg | 07-07-2003 | 00:22:46 | | 602 | 21091978
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_DBXDriver_D6.dof | 05-23-2008 | 22:14:06 | | 1100 | 4947e4fd
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_DBXDriver_D7.dpk | 07-10-2004 | 21:31:32 | | 701 | 5a85369f
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_DBXDriver_D7.res | 05-23-2008 | 22:14:32 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_DBXDriver_D7.cfg | 11-30-2003 | 20:22:56 | | 766 | 67f91117
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_DBXDriver_D7.dof | 05-23-2008 | 22:14:06 | | 2732 | fc96c760
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_DBXDriver_D10.bdsproj | 12-03-2005 | 18:13:50 | | 8209 | b56cb2c1
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_DBXDriver_D10.dpk | 12-03-2005 | 18:13:50 | | 680 | 67d8dcd6
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_DBXDriver_D10.res | 05-23-2008 | 22:14:40 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_DBXDriver_D10.cfg | 12-03-2005 | 18:13:50 | | 682 | 43d7fe7c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_DBXDriver_D11.dproj | 09-13-2007 | 13:01:04 | | 6024 | 47017bfc
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_DBXDriver_D11.dpk | 09-13-2007 | 13:01:04 | | 680 | c534253d
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_DBXDriver_D11.res | 05-23-2008 | 22:14:52 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DADBXDriverHtml.res | 05-23-2008 | 22:15:26 | | 1536 | 91e65f1a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DADBXDrv.dof | 05-23-2008 | 22:14:06 | | 2613 | 5f0ba1a8
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DADBXDrv.dpr | 07-10-2004 | 21:30:48 | | 146 | 71150d57
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DADBXDrv.res | 05-23-2008 | 22:15:28 | | 672 | 43f8040a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DADBXDrv.cfg | 11-30-2003 | 20:22:28 | | 565 | 554472c9
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\uDASDACDriver.pas | 12-26-2007 | 13:41:40 | | 17264 | c7d9d4f2
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_SDACDriver_Glyphs.res | 05-23-2008 | 22:14:12 | | 4872 | 956249d6
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_SDACDriver_D6.dpk | 07-10-2004 | 21:31:32 | | 726 | c2b8031
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_SDACDriver_D6.res | 07-07-2003 | 00:22:46 | | 1728 | 71daad01
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_SDACDriver_D6.cfg | 07-07-2003 | 00:22:46 | | 602 | 21091978
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_SDACDriver_D6.dof | 05-23-2008 | 22:14:08 | | 1180 | 6a31b850
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_SDACDriver_D7.dpk | 07-10-2004 | 21:31:32 | | 726 | 2c977e43
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_SDACDriver_D7.res | 11-30-2003 | 20:22:56 | | 1368 | 9d3db5ae
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_SDACDriver_D7.cfg | 11-30-2003 | 20:22:56 | | 766 | 67f91117
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_SDACDriver_D7.dof | 05-23-2008 | 22:14:08 | | 2812 | 5b7d16d5
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_SDACDriver_D10.bdsproj | 12-03-2005 | 18:13:50 | | 8258 | bfd9d50d
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_SDACDriver_D10.dpk | 04-06-2006 | 12:23:14 | | 731 | 30255ff9
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_SDACDriver_D10.res | 12-03-2005 | 18:13:50 | | 1664 | 5b6ba919
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_SDACDriver_D10.cfg | 12-03-2005 | 18:13:50 | | 682 | 43d7fe7c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_SDACDriver_D11.dproj | 09-13-2007 | 13:01:04 | | 6542 | c4943cf6
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_SDACDriver_D11.dpk | 09-13-2007 | 13:01:04 | | 731 | 825e7bdc
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_SDACDriver_D11.res | 09-13-2007 | 13:01:04 | | 1664 | 5b6ba919
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DASDACDriverHtml.res | 05-23-2008 | 22:15:26 | | 1072 | 866a09f7
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DASDACDrv.dof | 05-23-2008 | 22:14:06 | | 2613 | a50a6321
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DASDACDrv.dpr | 07-10-2004 | 21:30:48 | | 143 | f3834ab
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DASDACDrv.res | 05-23-2008 | 22:15:36 | | 672 | 43f8040a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DASDACDrv.cfg | 08-28-2003 | 18:49:10 | | 449 | 1bb117f7
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\uDAODACDriver.pas | 04-18-2008 | 15:32:10 | | 20334 | 84adca03
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ODACDriver_Glyphs.res | 05-23-2008 | 22:14:12 | | 4872 | f42f8c57
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ODACDriver_D6.dpk | 07-10-2004 | 21:31:32 | | 726 | a84315fa
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ODACDriver_D6.res | 07-07-2003 | 00:22:46 | | 1728 | 71daad01
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ODACDriver_D6.cfg | 07-07-2003 | 00:22:46 | | 602 | 21091978
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ODACDriver_D6.dof | 05-23-2008 | 22:14:08 | | 1180 | 16320b11
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ODACDriver_D7.dpk | 07-10-2004 | 21:31:32 | | 726 | 99f46189
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ODACDriver_D7.res | 07-07-2003 | 00:22:46 | | 1728 | 71daad01
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ODACDriver_D7.cfg | 11-30-2003 | 20:22:56 | | 766 | 67f91117
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ODACDriver_D7.dof | 05-23-2008 | 22:14:08 | | 2812 | 1e4a55a4
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ODACDriver_D10.bdsproj | 12-03-2005 | 18:13:50 | | 8258 | 87d6b4dd
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ODACDriver_D10.dpk | 12-03-2005 | 18:13:50 | | 731 | 3b5ef5e5
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ODACDriver_D10.res | 12-03-2005 | 18:13:50 | | 1664 | 5b6ba919
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ODACDriver_D10.cfg | 12-03-2005 | 18:13:50 | | 682 | 43d7fe7c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ODACDriver_D11.dproj | 09-13-2007 | 13:01:04 | | 6912 | 578c0ebd
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ODACDriver_D11.dpk | 09-13-2007 | 13:01:04 | | 731 | 512e06f1
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ODACDriver_D11.res | 09-13-2007 | 13:01:04 | | 1664 | 5b6ba919
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAODACDriverHtml.res | 05-23-2008 | 22:15:26 | | 256 | 418ed98a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAODACDrv.dof | 05-23-2008 | 22:14:06 | | 2613 | 5f0ba1a8
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAODACDrv.dpr | 07-10-2004 | 21:30:48 | | 199 | 3df4ee55
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAODACDrv.res | 05-23-2008 | 22:15:38 | | 672 | 43f8040a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAODACDrv.cfg | 07-07-2003 | 00:22:46 | | 449 | 1bb117f7
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\uDACRLabsUtils.inc | 04-20-2007 | 14:55:46 | | 2054 | 5d74ea99
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBDACDriver_Glyphs.res | 05-23-2008 | 22:14:12 | | 4884 | 72488e5b
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBDACDriver_D6.dpk | 09-10-2006 | 12:13:44 | | 700 | 73a803f5
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBDACDriver_D6.res | 09-10-2006 | 12:06:36 | | 1508 | 6f44119
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBDACDriver_D6.cfg | 09-10-2006 | 12:06:36 | | 414 | 1094c05a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBDACDriver_D6.dof | 05-23-2008 | 22:14:06 | | 1034 | f95aacde
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBDACDriver_D7.cfg | 09-10-2006 | 12:06:36 | | 578 | 62cae970
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBDACDriver_D7.dof | 05-23-2008 | 22:14:06 | | 1825 | eb6ad336
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBDACDriver_D7.dpk | 09-10-2006 | 12:06:36 | | 700 | 5fae4726
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBDACDriver_D7.res | 09-10-2006 | 12:06:36 | | 1508 | 6f44119
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBDACDriver_D10.bdsproj | 09-10-2006 | 12:06:36 | | 8251 | c6f5d44d
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBDACDriver_D10.cfg | 09-10-2006 | 12:06:36 | | 682 | 43d7fe7c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBDACDriver_D10.dpk | 09-10-2006 | 12:06:36 | | 704 | 6025204c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBDACDriver_D10.res | 09-10-2006 | 12:06:36 | | 1664 | 5b6ba919
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBDACDriver_D11.dproj | 09-13-2007 | 13:01:04 | | 6141 | 9fbf2494
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBDACDriver_D11.dpk | 09-13-2007 | 13:01:04 | | 704 | 39f84d43
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBDACDriver_D11.res | 09-13-2007 | 13:01:04 | | 1664 | 5b6ba919
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAIBDACDriverHtml.res | 05-23-2008 | 22:15:26 | | 1016 | db72aff4
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAIBDACDrv.dpr | 09-10-2006 | 12:06:36 | | 147 | de1534cb
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAIBDACDrv.res | 05-23-2008 | 22:15:42 | | 664 | d209c9a4
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\uDAIBDACDriver.pas | 12-26-2007 | 13:41:40 | | 16150 | 91a10269
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\uDAIBODriver.pas | 01-10-2008 | 13:05:02 | | 15113 | 7d6da987
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBODriver_D6.dpk | 10-12-2007 | 13:33:58 | | 723 | 30db4126
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBODriver_Glyphs.res | 05-23-2008 | 22:14:12 | | 4872 | 85f9f724
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBODriver_D6.res | 07-07-2003 | 00:22:46 | | 1728 | 71daad01
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBODriver_D6.cfg | 07-07-2003 | 00:22:46 | | 602 | e309783a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBODriver_D6.dof | 05-23-2008 | 22:14:06 | | 1184 | 23c713ba
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBODriver_D7.dpk | 10-12-2007 | 13:33:58 | | 721 | 240401ba
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBODriver_D7.res | 07-07-2003 | 00:22:46 | | 1728 | 71daad01
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBODriver_D7.cfg | 11-30-2003 | 20:22:56 | | 766 | 663e6809
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBODriver_D7.dof | 05-23-2008 | 22:14:06 | | 2827 | 337ab2ad
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBODriver_D10.bdsproj | 12-03-2005 | 18:13:50 | | 8261 | f65e0e4c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBODriver_D10.dpk | 10-12-2007 | 13:33:58 | | 727 | 34abb692
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBODriver_D10.res | 12-03-2005 | 18:13:50 | | 1664 | 5b6ba919
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBODriver_D10.cfg | 12-03-2005 | 18:13:50 | | 682 | 5332ff3
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBODriver_D11.dproj | 10-12-2007 | 13:33:58 | | 5680 | bcf2c0c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBODriver_D11.dpk | 10-12-2007 | 13:33:58 | | 729 | dec87a78
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_IBODriver_D11.res | 09-13-2007 | 13:01:04 | | 1664 | 5b6ba919
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAIBODriverHtml.res | 05-23-2008 | 22:15:26 | | 1012 | 37a24168
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAIBODrv.dof | 05-23-2008 | 22:14:06 | | 2613 | 5f0ba1a8
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAIBODrv.dpr | 07-10-2004 | 21:30:48 | | 146 | 8f0effc8
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAIBODrv.res | 05-23-2008 | 22:15:52 | | 672 | 43f8040a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAIBODrv.cfg | 07-07-2003 | 00:22:46 | | 449 | 1bb117f7
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\uDAMyDACDriver.pas | 12-26-2007 | 13:41:40 | | 16020 | 4e260c3a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_MyDACDriver_Glyphs.res | 05-23-2008 | 22:14:12 | | 4884 | e4fbadb3
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_MyDACDriver_D7.dpk | 09-10-2006 | 12:39:30 | | 731 | c74fe3f7
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_MyDACDriver_D7.res | 07-21-2003 | 17:50:02 | | 1508 | 6f44119
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_MyDACDriver_D7.dof | 05-23-2008 | 22:14:06 | | 1825 | d3a6d83c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_MyDACDriver_D7.cfg | 10-22-2006 | 02:30:52 | | 766 | 663e6809
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_MyDACDriver_D6.dpk | 09-10-2006 | 12:39:30 | | 731 | 9254802d
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_MyDACDriver_D6.dof | 05-23-2008 | 22:14:06 | | 1825 | 3af3fd2a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_MyDACDriver_D6.res | 07-21-2003 | 17:50:02 | | 1508 | 6f44119
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_MyDACDriver_D6.cfg | 07-21-2003 | 17:50:02 | | 432 | aecf6ae9
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_MyDACDriver_D10.bdsproj | 09-10-2006 | 12:39:30 | | 8260 | 96a97aa8
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_MyDACDriver_D10.dpk | 09-10-2006 | 12:39:30 | | 736 | 11aa8590
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_MyDACDriver_D10.res | 12-03-2005 | 18:13:50 | | 1664 | 5b6ba919
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_MyDACDriver_D10.cfg | 12-03-2005 | 18:13:50 | | 682 | 43d7fe7c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_MyDACDriver_D11.dproj | 09-13-2007 | 13:01:04 | | 6465 | b35365dd
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_MyDACDriver_D11.dpk | 09-13-2007 | 13:01:04 | | 736 | aee4cfe6
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_MyDACDriver_D11.res | 09-13-2007 | 13:01:04 | | 1664 | 5b6ba919
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAMyDACDriverHtml.res | 05-23-2008 | 22:15:26 | | 724 | ac60826
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAMyDACDrv.dpr | 07-10-2004 | 21:30:48 | | 147 | b10d44d
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAMyDACDrv.res | 05-23-2008 | 22:15:40 | | 672 | 43f8040a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAMyDACDrv.cfg | 09-19-2006 | 17:00:44 | | 449 | 1bb117f7
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAMyDACDrv.dof | 05-23-2008 | 22:14:06 | | 2598 | a8b74ae7
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\uDADBISAMDriver.pas | 05-07-2008 | 14:44:04 | | 36488 | 3b758b13
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_DBISAMDriver_Glyphs.res | 05-23-2008 | 22:14:12 | | 4884 | 875eabb1
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_DBISAMDriver_D7.cfg | 07-10-2004 | 21:31:32 | | 578 | 8164ffed
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_DBISAMDriver_D7.dof | 05-23-2008 | 22:14:06 | | 1817 | cbbbdbda
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_DBISAMDriver_D7.dpk | 07-15-2004 | 11:08:58 | | 718 | 7cf06ac3
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_DBISAMDriver_D7.res | 07-21-2003 | 17:50:02 | | 1572 | c5df4b68
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_DBISAMDriver_D6.cfg | 07-21-2003 | 17:50:02 | | 602 | e309783a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_DBISAMDriver_D6.dof | 05-23-2008 | 22:14:06 | | 1430 | 39f52545
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_DBISAMDriver_D6.dpk | 07-15-2004 | 11:08:58 | | 718 | 1eec0c60
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_DBISAMDriver_D6.res | 07-21-2003 | 17:50:02 | | 1572 | c5df4b68
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_DBISAMDriver_D10.bdsproj | 12-03-2005 | 18:13:50 | | 8253 | 60bcd634
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_DBISAMDriver_D10.dpk | 12-03-2005 | 18:13:50 | | 721 | 222456c2
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_DBISAMDriver_D10.res | 12-03-2005 | 18:13:50 | | 1664 | 5b6ba919
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_DBISAMDriver_D10.cfg | 12-03-2005 | 18:13:50 | | 682 | 5332ff3
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_DBISAMDriver_D11.dproj | 09-13-2007 | 13:01:04 | | 6669 | 14ff3dca
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_DBISAMDriver_D11.dpk | 09-13-2007 | 13:01:04 | | 724 | e0e68570
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_DBISAMDriver_D11.res | 09-13-2007 | 13:01:04 | | 1664 | 5b6ba919
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DADBISAMDriverHtml.res | 05-23-2008 | 22:15:26 | | 240 | 6a537da3
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DADBISAM3Drv.dpr | 07-10-2004 | 22:14:18 | | 268 | d16776c5
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DADBISAM3Drv.cfg | 07-10-2004 | 22:14:18 | | 491 | 97729ed7
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DADBISAM3Drv.dof | 05-23-2008 | 22:14:06 | | 2864 | a75aea6
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DADBISAM3Drv.res | 05-23-2008 | 22:15:50 | | 672 | 43f8040a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DADBISAM4Drv.dpr | 07-10-2004 | 22:12:14 | | 269 | 5f37a275
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DADBISAM4Drv.cfg | 07-21-2003 | 17:50:02 | | 491 | 97729ed7
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DADBISAM4Drv.dof | 05-23-2008 | 22:14:06 | | 2864 | a75aea6
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DADBISAM4Drv.res | 05-23-2008 | 22:15:50 | | 672 | 43f8040a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_MySQLDACDriver_D6.res | 05-08-2006 | 18:38:36 | | 524 | 4b031689
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_MySQLDACDriver_D6.dpk | 05-08-2006 | 18:38:36 | | 719 | 886411ae
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_MySQLDACDriver_D6.dof | 05-23-2008 | 22:14:06 | | 1106 | 3a76705
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_MySQLDACDriver_D6.cfg | 05-08-2006 | 18:38:36 | | 602 | e309783a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_MySQLDACDriver_D7.res | 05-08-2006 | 18:38:36 | | 524 | 4b031689
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_MySQLDACDriver_D7.dpk | 05-08-2006 | 18:38:36 | | 719 | db5ef128
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_MySQLDACDriver_D7.dof | 05-23-2008 | 22:14:06 | | 2738 | dcbfe9e3
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_MySQLDACDriver_D7.cfg | 05-08-2006 | 18:38:36 | | 766 | 663e6809
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_MySQLDACDriver_D10.bdsproj | 05-08-2006 | 18:38:36 | | 8220 | 6ec03f93
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_MySQLDACDriver_D10.res | 05-08-2006 | 18:38:36 | | 5096 | ef765b40
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_MySQLDACDriver_D10.dpk | 05-08-2006 | 18:38:36 | | 722 | 56a49633
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_MySQLDACDriver_D11.dproj | 09-13-2007 | 13:01:04 | | 5900 | 7859a780
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_MySQLDACDriver_D11.res | 09-13-2007 | 13:01:04 | | 5096 | ef765b40
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_MySQLDACDriver_D11.dpk | 09-13-2007 | 13:01:04 | | 722 | a31ca6be
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_MySQLDACDriver_Glyphs.res | 05-23-2008 | 22:14:12 | | 4896 | 19613f13
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\uDAMySQLDACDriver.pas | 12-26-2007 | 13:41:40 | | 9985 | 1507a84a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAMySQLDACDriverHtml.res | 05-23-2008 | 22:15:26 | | 736 | 6cd38443
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAMySQLDACDrv.dpr | 06-22-2006 | 00:17:46 | | 159 | d6b72e17
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAMySQLDACDrv.res | 05-23-2008 | 22:15:48 | | 672 | 43f8040a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAMySQLDACDrv.cfg | 09-19-2006 | 17:00:44 | | 577 | a269b6ae
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAMySQLDACDrv.dof | 05-23-2008 | 22:14:06 | | 2598 | a8b74ae7
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_PostgresDACDriver_D6.res | 05-08-2006 | 18:38:36 | | 524 | 4b031689
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_PostgresDACDriver_D6.dpk | 05-08-2006 | 18:38:36 | | 734 | e40f698d
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_PostgresDACDriver_D6.dof | 05-23-2008 | 22:14:08 | | 1106 | 3a76705
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_PostgresDACDriver_D6.cfg | 05-08-2006 | 18:38:36 | | 602 | e309783a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_PostgresDACDriver_D7.res | 05-08-2006 | 18:38:36 | | 524 | 4b031689
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_PostgresDACDriver_D7.dpk | 05-08-2006 | 18:38:36 | | 734 | 12d548b8
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_PostgresDACDriver_D7.dof | 05-23-2008 | 22:14:08 | | 2738 | dcbfe9e3
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_PostgresDACDriver_D7.cfg | 05-08-2006 | 18:38:36 | | 766 | 663e6809
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_PostgresDACDriver_D10.bdsproj | 05-08-2006 | 18:38:36 | | 8229 | ca062619
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_PostgresDACDriver_D10.res | 05-08-2006 | 18:38:36 | | 5096 | ef765b40
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_PostgresDACDriver_D10.dpk | 05-08-2006 | 18:38:36 | | 737 | 332279bc
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_PostgresDACDriver_D10.cfg | 05-08-2006 | 18:38:36 | | 682 | 5332ff3
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_PostgresDACDriver_D11.dproj | 09-13-2007 | 13:01:04 | | 5883 | 3c3c3a0f
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_PostgresDACDriver_D11.res | 09-13-2007 | 13:01:04 | | 5096 | ef765b40
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_PostgresDACDriver_D11.dpk | 09-13-2007 | 13:01:04 | | 737 | e432d9ea
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_PostgresDACDriver_Glyphs.res | 05-23-2008 | 22:14:12 | | 4920 | 274f9c98
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAPostgresDACDriverHtml.res | 05-23-2008 | 22:15:26 | | 736 | 6cd38443
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\uDAPostgresDACDriver.pas | 12-26-2007 | 13:41:40 | | 10025 | 6acf0824
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAPostgresDACDrv.res | 05-23-2008 | 22:15:44 | | 672 | 43f8040a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAPostgresDACDrv.cfg | 09-19-2006 | 17:00:44 | | 577 | a269b6ae
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAPostgresDACDrv.dof | 05-23-2008 | 22:14:06 | | 2598 | a8b74ae7
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAPostgresDACDrv.dpr | 06-22-2006 | 00:17:46 | | 171 | a5e72af9
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_FIBDriver_D7.res | 06-21-2006 | 17:13:36 | | 524 | 4b031689
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_FIBDriver_D7.dpk | 06-21-2006 | 17:13:36 | | 692 | a968230e
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_FIBDriver_D7.dof | 05-23-2008 | 22:14:06 | | 2730 | 33cb27a6
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_FIBDriver_D7.cfg | 06-21-2006 | 17:13:36 | | 766 | 663e6809
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_FIBDriver_D6.res | 06-21-2006 | 17:13:36 | | 1368 | 8faf9850
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_FIBDriver_D6.dpk | 06-21-2006 | 17:13:36 | | 692 | e92d3631
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_FIBDriver_D6.dof | 05-23-2008 | 22:14:06 | | 1109 | 4f6da5c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_FIBDriver_D6.cfg | 06-21-2006 | 17:13:36 | | 602 | e309783a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_FIBDriver_D10.bdsproj | 06-21-2006 | 17:13:36 | | 8207 | 71e15c8e
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_FIBDriver_D10.res | 06-21-2006 | 17:13:36 | | 5096 | ef765b40
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_FIBDriver_D10.dpk | 06-21-2006 | 17:13:36 | | 697 | 223cc4f7
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_FIBDriver_D10.cfg | 06-21-2006 | 17:13:36 | | 682 | 5332ff3
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_FIBDriver_D11.dproj | 10-12-2007 | 18:50:14 | | 5787 | d8281dfc
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_FIBDriver_D11.res | 09-13-2007 | 13:01:04 | | 5096 | ef765b40
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_FIBDriver_D11.dpk | 10-12-2007 | 18:50:14 | | 697 | e167d68b
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_FIBDriver_Glyphs.res | 05-23-2008 | 22:14:12 | | 4872 | 39fb8fc7
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAFIBDriverHtml.res | 05-23-2008 | 22:15:26 | | 1032 | acfaa4a2
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\uDAFIBDriver.pas | 03-03-2008 | 10:05:50 | | 19712 | d2c7cd4b
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAFIBDrv.res | 05-23-2008 | 22:16:18 | | 672 | 43f8040a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAFIBDrv.dpr | 06-19-2006 | 17:17:02 | | 139 | 63f63be5
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAFIBDrv.dof | 05-23-2008 | 22:14:06 | | 2613 | 3427db80
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAFIBDrv.cfg | 09-19-2006 | 17:00:44 | | 582 | dc75a12c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_SQLiteDriver_D7.res | 05-23-2008 | 22:14:32 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_SQLiteDriver_D7.cfg | 02-15-2007 | 16:14:14 | | 702 | ef2cc5bc
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_SQLiteDriver_D7.dof | 05-23-2008 | 22:14:08 | | 2729 | dba0f13c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_SQLiteDriver_D7.dpk | 02-15-2007 | 16:14:14 | | 670 | 42681415
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_SQLiteDriver_D6.cfg | 02-15-2007 | 16:14:14 | | 538 | 45ac3f83
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_SQLiteDriver_D6.dof | 05-23-2008 | 22:14:08 | | 1108 | 9ef26646
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_SQLiteDriver_D6.dpk | 02-15-2007 | 16:14:14 | | 670 | d7f90673
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_SQLiteDriver_D6.res | 05-23-2008 | 22:14:24 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_SQLiteDriver_D10.bdsproj | 02-15-2007 | 16:14:14 | | 8209 | 8750d664
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_SQLiteDriver_D10.cfg | 02-15-2007 | 16:14:14 | | 682 | 43d7fe7c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_SQLiteDriver_D10.dpk | 02-15-2007 | 16:14:14 | | 672 | 44fc6714
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_SQLiteDriver_D10.res | 05-23-2008 | 22:14:42 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_SQLiteDriver_D11.dproj | 09-13-2007 | 13:01:04 | | 5939 | 81a1cff4
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_SQLiteDriver_D11.dpk | 09-13-2007 | 13:01:04 | | 672 | 6cdb767c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_SQLiteDriver_D11.res | 05-23-2008 | 22:14:52 | | 528 | 72f60ecf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_SQLiteDriver_Glyphs.res | 05-23-2008 | 22:14:12 | | 4884 | 26831d13
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DASQLiteDriverHtml.res | 05-23-2008 | 22:15:26 | | 616 | 13eaaa89
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\uDASQLiteDriver.pas | 12-26-2007 | 13:41:40 | | 10561 | 890264cf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DASQLiteDrv.bdsproj | 02-15-2007 | 16:14:14 | | 10223 | 7dbfc7c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DASQLiteDrv.cfg | 02-15-2007 | 16:14:14 | | 295 | e9de943c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DASQLiteDrv.dpr | 02-15-2007 | 16:14:14 | | 158 | 2a3af1a4
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DASQLiteDrv.res | 05-23-2008 | 22:15:34 | | 672 | 43f8040a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\ASGRout3.pas | 09-21-2005 | 10:29:00 | | 11531 | 7635d901
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\asgsqlite3.pas | 03-23-2006 | 10:03:00 | | 203585 | d8aae3f9
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\asqlite_def.inc | 01-10-2006 | 11:23:00 | | 2413 | aeae0406
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_NexusDBDriver_D6.cfg | 05-04-2007 | 15:59:30 | | 423 | 82fbbbc0
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_NexusDBDriver_D6.dof | 05-23-2008 | 22:14:06 | | 1767 | dcba9716
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_NexusDBDriver_D6.dpk | 03-31-2008 | 09:47:36 | | 843 | 56fd6dc6
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_NexusDBDriver_D6.res | 05-04-2007 | 15:59:30 | | 1536 | d862b20a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_NexusDBDriver_D7.cfg | 05-04-2007 | 15:59:30 | | 497 | 8a5b2508
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_NexusDBDriver_D7.dof | 05-23-2008 | 22:14:06 | | 1767 | 858527c3
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_NexusDBDriver_D7.dpk | 03-31-2008 | 09:47:36 | | 900 | e038eab9
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_NexusDBDriver_D7.res | 05-04-2007 | 15:59:30 | | 1216 | be2dbc7c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_NexusDBDriver_D10.bdsproj | 05-04-2007 | 15:59:30 | | 8554 | dc31a1aa
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_NexusDBDriver_D10.cfg | 05-04-2007 | 15:59:30 | | 470 | 1a635324
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_NexusDBDriver_D10.dpk | 03-31-2008 | 09:47:36 | | 903 | f7d73118
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_NexusDBDriver_D10.res | 05-04-2007 | 15:59:30 | | 1508 | e2970298
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_NexusDBDriver_D11.dproj | 09-13-2007 | 13:01:04 | | 7359 | 209459fb
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_NexusDBDriver_D11.dpk | 09-13-2007 | 13:01:04 | | 894 | 7fb61813
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_NexusDBDriver_D11.res | 09-13-2007 | 13:01:04 | | 1508 | e2970298
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\uDANexusDBDriver.dcr | 05-04-2007 | 15:59:30 | | 1732 | fbd3a80a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\uDANexusDBDriver.pas | 05-06-2008 | 11:34:08 | | 35443 | 6706621e
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DANexusDBDriverHtml.res | 05-23-2008 | 22:15:26 | | 1108 | 62b1686a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DANexusDBDrv.cfg | 05-04-2007 | 15:59:30 | | 579 | eb667121
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DANexusDBDrv.dpr | 05-04-2007 | 15:59:30 | | 155 | 940e2aea
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DANexusDBDrv.res | 05-23-2008 | 22:15:56 | | 672 | 43f8040a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ZeosDriver_D6.cfg | 05-05-2007 | 00:23:52 | | 602 | 21091978
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ZeosDriver_D6.dof | 05-23-2008 | 22:14:08 | | 1171 | 3a724d62
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ZeosDriver_D6.dpk | 05-05-2007 | 00:23:52 | | 706 | bf55b8f3
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ZeosDriver_D6.res | 05-05-2007 | 00:23:52 | | 1728 | 71daad01
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ZeosDriver_D7.cfg | 05-05-2007 | 00:23:52 | | 766 | 67f91117
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ZeosDriver_D7.dof | 05-23-2008 | 22:14:08 | | 1954 | 8427f1eb
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ZeosDriver_D7.dpk | 05-05-2007 | 00:23:52 | | 706 | 46f6556d
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ZeosDriver_D7.res | 05-05-2007 | 00:23:52 | | 1728 | 71daad01
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ZeosDriver_D10.bdsproj | 05-05-2007 | 00:23:52 | | 8249 | ab4f426d
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ZeosDriver_D10.cfg | 05-05-2007 | 00:23:52 | | 682 | 43d7fe7c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ZeosDriver_D10.dpk | 05-05-2007 | 00:23:52 | | 711 | ea667151
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ZeosDriver_D10.res | 05-05-2007 | 00:23:52 | | 1664 | 5b6ba919
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ZeosDriver_D11.dproj | 09-13-2007 | 13:01:04 | | 6182 | 4e25572f
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ZeosDriver_D11.dpk | 09-13-2007 | 13:01:04 | | 711 | 3cf783fc
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ZeosDriver_D11.res | 09-13-2007 | 13:01:04 | | 1664 | 5b6ba919
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ZeosDriver_Glyphs.res | 05-23-2008 | 22:14:12 | | 4872 | ff826d2
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAZeosDriverHtml.res | 05-23-2008 | 22:15:26 | | 948 | 6cc4708e
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\uDAZeosDriver.pas | 05-21-2008 | 11:32:38 | | 47162 | bf7eb04
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAZeosDrv.dpr | 05-05-2007 | 00:23:52 | | 143 | c9e94b8
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAZeosDrv.res | 05-23-2008 | 22:16:20 | | 672 | 43f8040a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAZeosDrv.cfg | 05-05-2007 | 00:23:52 | | 690 | 63c841c2
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ElevateDBDriver_D6.cfg | 08-30-2007 | 17:29:24 | | 538 | 21fc77be
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ElevateDBDriver_D6.dof | 05-23-2008 | 22:14:06 | | 1095 | 7ef132a0
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ElevateDBDriver_D6.dpk | 08-30-2007 | 17:29:24 | | 715 | 6e249d77
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ElevateDBDriver_D6.res | 08-30-2007 | 17:29:24 | | 1368 | 8faf9850
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ElevateDBDriver_D7.cfg | 08-30-2007 | 17:29:24 | | 766 | 663e6809
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ElevateDBDriver_D7.dof | 05-23-2008 | 22:14:06 | | 2743 | e56bb714
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ElevateDBDriver_D7.dpk | 08-30-2007 | 17:29:24 | | 715 | c5fc2b19
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ElevateDBDriver_D7.res | 08-30-2007 | 17:29:24 | | 1368 | bcad8688
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ElevateDBDriver_D10.bdsproj | 08-30-2007 | 17:29:24 | | 8216 | 45f7eff9
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ElevateDBDriver_D10.cfg | 08-30-2007 | 17:29:24 | | 682 | 5332ff3
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ElevateDBDriver_D10.dpk | 08-30-2007 | 17:29:24 | | 718 | 6c16ecee
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ElevateDBDriver_D10.res | 08-30-2007 | 17:29:24 | | 5096 | ef765b40
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ElevateDBDriver_D11.dproj | 09-13-2007 | 13:01:04 | | 6277 | 8998f96f
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ElevateDBDriver_D11.dpk | 09-13-2007 | 13:01:04 | | 720 | a71297ff
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ElevateDBDriver_D11.res | 09-13-2007 | 13:01:04 | | 5096 | ef765b40
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_ElevateDBDriver_Glyphs.res | 05-23-2008 | 22:14:12 | | 4908 | af04da84
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\uDAElevateDBDriver.pas | 12-26-2007 | 13:41:40 | | 59141 | 109f865b
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAElevateDBDriverHtml.res | 05-23-2008 | 22:15:26 | | 848 | c0bcac28
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAElevateDBDrv.dpr | 08-30-2007 | 17:29:24 | | 163 | 6df9b686
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAElevateDBDrv.res | 08-30-2007 | 17:29:24 | | 876 | d795f11f
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAElevateDBDrv.cfg | 08-30-2007 | 17:29:24 | | 557 | 488183d0
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_AnyDACDriver_D6.cfg | 11-26-2007 | 10:32:26 | | 602 | e309783a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_AnyDACDriver_D6.dof | 05-23-2008 | 22:14:06 | | 1097 | f6c43e60
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_AnyDACDriver_D6.dpk | 11-29-2007 | 15:49:34 | | 999 | 46ff3775
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_AnyDACDriver_D6.res | 11-26-2007 | 10:32:26 | | 524 | 4b031689
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_AnyDACDriver_D7.cfg | 11-26-2007 | 10:32:26 | | 746 | 6f4818e8
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_AnyDACDriver_D7.dof | 05-23-2008 | 22:14:06 | | 1875 | 2a01ddb0
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_AnyDACDriver_D7.dpk | 11-29-2007 | 15:49:34 | | 999 | 78780c67
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_AnyDACDriver_D7.res | 11-26-2007 | 10:32:26 | | 1576 | eef875c0
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_AnyDACDriver_D10.bdsproj | 11-26-2007 | 10:32:26 | | 8209 | 50a53cdf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_AnyDACDriver_D10.cfg | 11-26-2007 | 10:32:26 | | 682 | 5332ff3
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_AnyDACDriver_D10.dpk | 11-29-2007 | 15:49:34 | | 1014 | 89e8720f
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_AnyDACDriver_D10.res | 11-26-2007 | 10:32:26 | | 5096 | ef765b40
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_AnyDACDriver_D11.dproj | 11-26-2007 | 10:32:26 | | 5702 | 5256d38a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_AnyDACDriver_D11.dpk | 11-29-2007 | 15:49:34 | | 1014 | d9d0f145
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_AnyDACDriver_D11.res | 11-26-2007 | 10:32:26 | | 5096 | ef765b40
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DataAbstract_AnyDACDriver_Glyphs.res | 05-23-2008 | 22:14:12 | | 4884 | bb2fd80
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\uDAAnyDACDriver.pas | 05-22-2008 | 10:07:38 | | 102092 | 952dbf77
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAAnyDACDriverHtml.res | 05-23-2008 | 22:15:26 | | 1836 | cd3981d
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAAnyDACDrv.dpr | 11-16-2007 | 13:48:44 | | 151 | d75e1134
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAAnyDACDrv.res | 11-16-2007 | 13:48:44 | | 1540 | a295ef5b
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAAnyDACDrv.cfg | 12-24-2007 | 17:23:02 | | 345 | 2b931204
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\DAAnyDACDrv.dof | 05-23-2008 | 22:14:06 | | 2591 | 5c2a3506
+Made Dir: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\Unsupported
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\Unsupported\DataAbstract_DOADriver_D7.dpk | 12-02-2003 | 15:37:52 | | 719 | 8e08b8af
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\Unsupported\DataAbstract_DOADriver_D7.res | 12-02-2003 | 15:37:52 | | 1536 | 36084df3
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\Unsupported\DataAbstract_DOADriver_D7.cfg | 12-02-2003 | 15:37:52 | | 399 | 3b925e14
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\Unsupported\DataAbstract_DOADriver_D7.dof | 05-23-2008 | 22:14:08 | | 1764 | 964b967b
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\Unsupported\DADOADriverHtml.res | 09-23-2004 | 18:20:40 | | 700 | 9c81d4a1
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\Unsupported\uDADOADriver.dcr | 12-02-2003 | 15:37:52 | | 1728 | cc6089fc
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\Unsupported\uDADOADriver.pas | 04-18-2008 | 15:32:10 | | 18281 | b02248f0
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\Unsupported\DADOADrv.cfg | 12-02-2003 | 15:37:52 | | 494 | d8385f74
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\Unsupported\DADOADrv.dpr | 09-23-2004 | 18:20:40 | | 174 | 3603251c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\Unsupported\DADOADrv.res | 12-02-2003 | 15:37:52 | | 520 | d6e8fdf5
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Drivers\Unsupported\DOA.INC | 12-02-2003 | 15:37:52 | | 294 | 21b0e9c6
+Made Dir: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Unsupported
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Unsupported\uDAJvMTable.pas | 12-10-2003 | 21:31:28 | | 4314 | 5a8ee3bc
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Unsupported\uDASQLMemoryTable.pas | 12-10-2003 | 21:31:28 | | 6109 | e7811714
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\Unsupported\uDAMemTablesReg.pas | 12-10-2003 | 21:31:28 | | 288 | ed154e21
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract3.RODL | 01-21-2006 | 01:08:26 | | 5733 | 728f5508
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract4.RODL | 05-15-2008 | 16:58:24 | | 11035 | 412ff67d
+RegDB Key: Software\RemObjects\RemObjects SDK
+RegDB Val:
+RegDB Root: 1
+RegDB Key: Software\RemObjects\RemObjects SDK\Variables
+RegDB Val: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi
+RegDB Name: Data Abstract for Delphi
+RegDB Root: 1
+RegDB Key: Software\RemObjects\RemObjects SDK\KnownRodls
+RegDB Val: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract4.RODL
+RegDB Name: Data Abstract
+RegDB Root: 1
+RegDB Key: Software\RemObjects\RemObjects SDK\KnownRodls
+RegDB Val: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Source\DataAbstract3.RODL
+RegDB Name: Data Abstract (v3.0 Legacy)
+RegDB Root: 1
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\LOCAL
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\LOCAL\fMainForm.pas | 04-17-2006 | 20:38:04 | | 449 | f35c45b9
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\LOCAL\fServerDataModule.dfm | 03-21-2006 | 17:47:40 | | 1210 | 2285fc42
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\LOCAL\fServerDataModule.pas | 10-09-2006 | 18:14:28 | | 733 | fb3f1acb
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\LOCAL\Icon.ico | 03-21-2006 | 17:47:40 | | 3262 | 1d8835a3
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\LOCAL\Info.ini | 05-14-2007 | 16:01:38 | | 158 | 9c0257a5
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\LOCAL\$SERVICENAME_Impl.dfm | 04-06-2007 | 17:57:06 | | 563 | 4124f31b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\LOCAL\$SERVICENAME_Impl.pas | 11-20-2007 | 16:58:10 | | 962 | 44d010b5
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\LOCAL\$LIBRARYNAME.RODL | 03-21-2006 | 17:47:40 | | 472 | c1b37c00
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\LOCAL\$PRJNAME.dpr | 04-07-2006 | 14:54:02 | | 688 | a4d2e2df
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\LOCAL\$PRJNAME.res | 03-21-2006 | 17:47:40 | | 22748 | 557d2f64
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\LOCAL\fClientDataModule.dfm | 04-06-2007 | 17:57:06 | | 773 | 9b924874
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\LOCAL\fClientDataModule.pas | 05-24-2007 | 16:48:54 | | 730 | 3b68e80b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\LOCAL\fMainForm.dfm | 03-21-2006 | 17:47:40 | | 552 | e1d9eaed
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLEXEv3
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLEXEv3\$PRJNAME.dpr | 03-21-2006 | 16:06:42 | | 730 | 4e336099
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLEXEv3\$SERVICENAME_Impl.pas | 11-20-2007 | 16:58:10 | | 954 | e668b28f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLEXEv3\fServerDataModule.pas | 10-09-2006 | 18:14:28 | | 933 | 88f03c26
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLEXEv3\fServerForm.pas | 03-21-2006 | 16:07:12 | | 432 | 477057d5
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLEXEv3\Icon.ico | 01-26-2006 | 11:25:20 | | 3262 | 832926e1
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLEXEv3\$LIBRARYNAME.RODL | 03-21-2006 | 16:53:08 | | 468 | fb976f9b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLEXEv3\$PRJNAME.res | 04-09-2004 | 01:47:38 | | 22748 | 557d2f64
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLEXEv3\Info.ini | 06-02-2007 | 09:36:52 | | 210 | 6f3ca70b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLEXEv3\$SERVICENAME_Impl.dfm | 04-06-2007 | 17:57:06 | | 558 | d5892979
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLEXEv3\fServerDataModule.dfm | 01-26-2006 | 12:11:34 | | 1214 | 13a1abf9
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLEXEv3\fServerForm.dfm | 01-30-2006 | 15:45:52 | | 552 | f6a3417c
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLEXEv3\_CLIENT
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLEXEv3\_CLIENT\fClientDataModule.dfm | 04-06-2007 | 17:57:06 | | 3241 | 5442878e
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLEXEv3\_CLIENT\fClientForm.dfm | 08-28-2003 | 22:46:56 | | 382 | 835e154b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLEXEv3\_CLIENT\$PRJNAMEClient.dpr | 04-07-2006 | 14:54:02 | | 402 | 4901c6f1
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLEXEv3\_CLIENT\fClientDataModule.pas | 04-06-2007 | 17:57:06 | | 682 | dc60bb79
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLEXEv3\_CLIENT\fClientForm.pas | 03-21-2006 | 16:51:04 | | 424 | c0256547
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLEXEv3\_CLIENT\$PRJNAMEGroup.bpg | 03-06-2004 | 14:26:16 | | 824 | 207152a6
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLEXEv3\_CLIENT\$PRJNAMEClient.res | 04-09-2004 | 01:48:24 | | 22748 | 5f92caef
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLEXE
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLEXE\fServerDataModule.pas | 10-09-2006 | 18:14:28 | | 933 | 88f03c26
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLEXE\fServerForm.pas | 03-21-2006 | 16:07:12 | | 432 | 477057d5
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLEXE\$PRJNAME.res | 01-26-2006 | 11:19:48 | | 22748 | 557d2f64
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLEXE\Info.ini | 05-14-2007 | 16:01:38 | | 207 | 7cd48564
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLEXE\$SERVICENAME_Impl.dfm | 04-06-2007 | 17:57:06 | | 563 | 4124f31b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLEXE\fServerDataModule.dfm | 03-21-2006 | 17:47:56 | | 1214 | 5c5680fe
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLEXE\fServerForm.dfm | 01-30-2006 | 15:45:52 | | 552 | f6a3417c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLEXE\$PRJNAME.dpr | 03-21-2006 | 16:06:42 | | 730 | 4e336099
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLEXE\Icon.ico | 01-26-2006 | 11:19:48 | | 3262 | bd87e090
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLEXE\$LIBRARYNAME.RODL | 03-21-2006 | 16:53:08 | | 472 | c1b37c00
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLEXE\$SERVICENAME_Impl.pas | 11-20-2007 | 16:58:10 | | 962 | 44d010b5
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLEXE\_Client
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLEXE\_Client\fClientDataModule.pas | 05-14-2007 | 20:50:10 | | 682 | dc60bb79
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLEXE\_Client\fClientForm.pas | 03-21-2006 | 16:51:04 | | 424 | c0256547
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLEXE\_Client\$PRJNAMEClient.res | 01-26-2006 | 11:19:48 | | 22748 | 5f92caef
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLEXE\_Client\fClientDataModule.dfm | 04-06-2007 | 17:57:06 | | 665 | ca676979
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLEXE\_Client\fClientForm.dfm | 01-26-2006 | 11:19:48 | | 382 | 835e154b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLEXE\_Client\$PRJNAMEClient.dpr | 04-07-2006 | 14:54:02 | | 402 | 4901c6f1
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLEXE\_Client\$PRJNAMEGroup.bpg | 01-26-2006 | 11:19:48 | | 824 | 207152a6
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLLOGINEXE
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLLOGINEXE\$SERVICENAME_Impl.pas | 11-20-2007 | 16:58:10 | | 962 | 44d010b5
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLLOGINEXE\fServerDataModule.dfm | 03-16-2006 | 17:32:32 | | 1214 | 13a1abf9
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLLOGINEXE\fServerDataModule.pas | 10-09-2006 | 18:14:28 | | 933 | 88f03c26
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLLOGINEXE\fServerForm.dfm | 03-16-2006 | 17:32:32 | | 552 | f6a3417c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLLOGINEXE\fServerForm.pas | 03-21-2006 | 16:07:12 | | 432 | 477057d5
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLLOGINEXE\Icon.ico | 03-21-2006 | 16:05:42 | | 3262 | 64a07412
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLLOGINEXE\Info.ini | 05-14-2007 | 16:01:38 | | 232 | 6e47031b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLLOGINEXE\LoginService_Impl.dfm | 03-21-2006 | 16:54:00 | | 240 | 50f21526
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLLOGINEXE\LoginService_Impl.pas | 04-27-2006 | 16:53:32 | | 2765 | 5d58283
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLLOGINEXE\$LIBRARYNAME.RODL | 03-21-2006 | 16:53:08 | | 727 | 19d72479
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLLOGINEXE\$PRJNAME.dpr | 03-21-2006 | 16:06:42 | | 815 | 58d36299
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLLOGINEXE\$PRJNAME.res | 03-16-2006 | 17:32:32 | | 22748 | 557d2f64
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLLOGINEXE\$SERVICENAME_Impl.dfm | 04-06-2007 | 17:57:06 | | 589 | 20d7bc81
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLLOGINEXE\_CLIENT
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLLOGINEXE\_CLIENT\$PRJNAMEGroup.bpg | 03-16-2006 | 18:32:58 | | 824 | 207152a6
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLLOGINEXE\_CLIENT\fClientDataModule.dfm | 08-24-2007 | 01:38:04 | | 665 | ca676979
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLLOGINEXE\_CLIENT\fClientDataModule.pas | 08-24-2007 | 01:38:04 | | 696 | d0d441d1
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLLOGINEXE\_CLIENT\fClientForm.dfm | 03-21-2006 | 16:07:32 | | 430 | 90480bf5
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLLOGINEXE\_CLIENT\fClientForm.pas | 03-21-2006 | 16:54:20 | | 1544 | bd1989a3
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLLOGINEXE\_CLIENT\fLoginForm.dfm | 05-23-2008 | 22:04:48 | | 1501 | 94d63255
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLLOGINEXE\_CLIENT\fLoginForm.pas | 03-16-2006 | 18:32:58 | | 857 | c5ad0243
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLLOGINEXE\_CLIENT\$PRJNAMEClient.dpr | 04-07-2006 | 14:54:02 | | 449 | e9022e5
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLLOGINEXE\_CLIENT\$PRJNAMEClient.res | 03-16-2006 | 18:32:58 | | 22748 | 5f92caef
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLMULTIDBLOGINEXE
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLMULTIDBLOGINEXE\fServerDataModule.dfm | 03-21-2006 | 16:57:38 | | 1214 | 13a1abf9
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLMULTIDBLOGINEXE\fServerDataModule.pas | 10-09-2006 | 18:14:28 | | 933 | 88f03c26
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLMULTIDBLOGINEXE\fServerForm.dfm | 03-21-2006 | 16:57:38 | | 552 | f6a3417c
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLMULTIDBLOGINEXE\fServerForm.pas | 03-21-2006 | 16:57:38 | | 432 | 477057d5
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLMULTIDBLOGINEXE\Icon.ico | 03-21-2006 | 16:57:38 | | 3262 | 64a07412
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLMULTIDBLOGINEXE\Info.ini | 05-14-2007 | 16:01:38 | | 234 | f028dc2b
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLMULTIDBLOGINEXE\LoginService_Impl.dfm | 02-12-2008 | 21:10:02 | | 298 | ed986157
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLMULTIDBLOGINEXE\LoginService_Impl.pas | 02-12-2008 | 21:10:02 | | 2926 | f12e7ced
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLMULTIDBLOGINEXE\$LIBRARYNAME.RODL | 02-12-2008 | 21:10:02 | | 730 | a1a1ad32
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLMULTIDBLOGINEXE\$PRJNAME.dpr | 03-21-2006 | 16:57:38 | | 815 | 58d36299
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLMULTIDBLOGINEXE\$PRJNAME.res | 03-21-2006 | 16:57:38 | | 22748 | 557d2f64
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLMULTIDBLOGINEXE\$SERVICENAME_Impl.dfm | 04-06-2007 | 17:57:06 | | 661 | 51761ba
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLMULTIDBLOGINEXE\$SERVICENAME_Impl.pas | 02-05-2008 | 19:02:40 | | 1288 | cf7f32ef
+Made Dir: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLMULTIDBLOGINEXE\_CLIENT
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLMULTIDBLOGINEXE\_CLIENT\fClientDataModule.dfm | 04-06-2007 | 17:57:06 | | 665 | ca676979
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLMULTIDBLOGINEXE\_CLIENT\fClientDataModule.pas | 04-06-2007 | 17:57:06 | | 702 | 4391a3df
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLMULTIDBLOGINEXE\_CLIENT\fClientForm.dfm | 03-21-2006 | 16:57:38 | | 430 | 90480bf5
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLMULTIDBLOGINEXE\_CLIENT\fClientForm.pas | 02-12-2008 | 21:10:02 | | 1984 | 85a5283f
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLMULTIDBLOGINEXE\_CLIENT\fLoginForm.dfm | 05-23-2008 | 22:04:48 | | 1867 | 511aa01a
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLMULTIDBLOGINEXE\_CLIENT\fLoginForm.pas | 03-21-2006 | 16:57:38 | | 910 | 38c7c2ae
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLMULTIDBLOGINEXE\_CLIENT\$PRJNAMEClient.dpr | 04-07-2006 | 14:54:02 | | 449 | e9022e5
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLMULTIDBLOGINEXE\_CLIENT\$PRJNAMEClient.res | 03-21-2006 | 16:57:38 | | 22748 | 5f92caef
+File Copy: C:\Archivos de programa\RemObjects Software\RemObjects SDK for Delphi\Templates\DA\VCLMULTIDBLOGINEXE\_CLIENT\$PRJNAMEGroup.bpg | 03-21-2006 | 16:57:38 | | 824 | 207152a6
+Made Dir: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Samples.html | 12-05-2007 | 18:11:30 | | 27838 | 51dbcc8c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Styles.css | 06-27-2006 | 18:15:16 | | 1490 | c0549e5f
+Made Dir: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Briefcase
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Briefcase\BriefcaseModelClientChanges.dfm | 11-03-2006 | 18:43:06 | | 1264 | 8eec4241
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Briefcase\BriefcaseModelClientChanges.pas | 11-03-2006 | 18:43:06 | | 3222 | 99d8995a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Briefcase\BriefcaseModelServerMain.pas | 10-16-2006 | 13:29:48 | | 529 | 10edc539
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Briefcase\BriefcaseModelService_Impl.pas | 11-03-2006 | 18:43:06 | | 1547 | 338fd928
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Briefcase\BriefcaseModelClient.res | 10-16-2006 | 13:29:48 | | 22748 | f3e8a260
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Briefcase\BriefcaseModelServer.res | 10-16-2006 | 13:29:48 | | 22748 | f90747eb
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Briefcase\RODLFILE.res | 11-03-2006 | 18:43:06 | | 7688 | b7448ee7
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Briefcase\BriefcaseModelClientData.dfm | 11-03-2006 | 18:43:06 | | 10419 | a87db52e
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Briefcase\BriefcaseModelClientMain.dfm | 11-03-2006 | 18:43:06 | | 3229 | 501f0d2c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Briefcase\BriefcaseModelServerData.dfm | 05-23-2008 | 22:13:52 | | 1384 | c71fbcd3
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Briefcase\BriefcaseModelServerMain.dfm | 11-03-2006 | 18:43:06 | | 624 | aff26fe
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Briefcase\BriefcaseModelService_Impl.dfm | 08-22-2007 | 04:10:36 | | 15425 | ed975fc2
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Briefcase\BriefcaseModelClient.dpr | 11-03-2006 | 18:43:06 | | 697 | 3deca3b
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Briefcase\BriefcaseModelClient.bdsproj | 05-25-2007 | 16:11:14 | | 8395 | ade9bed8
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Briefcase\BriefcaseModelClient.dproj | 05-29-2007 | 16:40:04 | | 3737 | bcfce161
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Briefcase\BriefcaseModelServer.dpr | 10-16-2006 | 13:29:48 | | 941 | bc5bf434
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Briefcase\BriefcaseModelServer.bdsproj | 05-25-2007 | 16:11:14 | | 8395 | 68452c3b
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Briefcase\BriefcaseModelServer.dproj | 05-29-2007 | 16:40:04 | | 3852 | 2c95b659
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Briefcase\BriefcaseModel.Sample.html | 10-24-2006 | 12:58:54 | | 938 | 86e07f73
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Briefcase\BriefcaseModelLibrary.rodl | 10-16-2006 | 13:29:48 | | 668 | 74fcd02a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Briefcase\BriefcaseModel.bpg | 10-16-2006 | 13:29:48 | | 881 | f1ebdc12
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Briefcase\BriefcaseModel.bdsgroup | 05-25-2007 | 16:11:14 | | 759 | b8326ff3
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Briefcase\BriefcaseModel.groupproj | 05-29-2007 | 16:40:04 | | 1608 | 626ad7e3
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Briefcase\BriefcaseModelClientData.pas | 10-16-2006 | 13:29:48 | | 950 | b8a15c57
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Briefcase\BriefcaseModelClientMain.pas | 11-09-2006 | 16:49:04 | | 4065 | 8130f903
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Briefcase\BriefcaseModelLibrary_Intf.pas | 11-03-2006 | 18:43:06 | | 2273 | d04fb38f
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Briefcase\BriefcaseModelLibrary_Invk.pas | 10-16-2006 | 13:29:48 | | 1029 | 6029273
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Briefcase\BriefcaseModelServerData.pas | 10-16-2006 | 13:29:48 | | 980 | ed56a357
+Made Dir: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Processor
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Processor\BusinessProcessorLibrary_Intf.pas | 03-02-2007 | 17:09:58 | | 2345 | b8539baf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Processor\BusinessProcessorLibrary_Invk.pas | 03-02-2007 | 17:09:58 | | 1050 | 8b286a5d
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Processor\BusinessProcessorServerData.pas | 10-24-2006 | 15:12:36 | | 994 | f441d6ea
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Processor\BusinessProcessorServerMain.pas | 10-24-2006 | 15:12:36 | | 2784 | 18210d59
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Processor\BusinessProcessorService_Impl.pas | 10-24-2006 | 15:12:36 | | 1710 | b14e6733
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Processor\SchemaClient_Intf.pas | 10-24-2006 | 15:12:36 | | 38849 | e7d4fc67
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Processor\SchemaServer_Intf.pas | 10-24-2006 | 15:12:36 | | 48848 | f98a988a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Processor\ServerGlobal.pas | 10-24-2006 | 15:12:36 | | 314 | 7c231e12
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Processor\BusinessProcessorClient.res | 10-24-2006 | 15:12:36 | | 22748 | f3e8a260
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Processor\BusinessProcessorServer.res | 10-24-2006 | 15:12:36 | | 22748 | f90747eb
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Processor\RODLFILE.res | 03-02-2007 | 17:09:58 | | 7995 | a926911e
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Processor\BusinessProcessorClientData.dfm | 03-07-2007 | 13:15:46 | | 11846 | a24f155e
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Processor\BusinessProcessorClientMain.dfm | 03-02-2007 | 17:09:58 | | 3048 | 223e067d
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Processor\BusinessProcessorClientUnit1.dfm | 03-07-2007 | 13:54:22 | | 1853 | dd019e55
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Processor\BusinessProcessorServerData.dfm | 05-23-2008 | 22:13:52 | | 1391 | 1767b386
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Processor\BusinessProcessorServerMain.dfm | 05-23-2008 | 22:13:52 | | 2545 | fd6f8630
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Processor\BusinessProcessorService_Impl.dfm | 10-31-2006 | 14:49:54 | | 22056 | 7a0aba0d
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Processor\BusinessProcessorClient.dpr | 03-07-2007 | 13:54:22 | | 726 | 491f3c9
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Processor\BusinessProcessorClient.bdsproj | 05-25-2007 | 16:11:14 | | 8398 | dab0f144
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Processor\BusinessProcessorClient.dproj | 05-29-2007 | 16:40:04 | | 3811 | 3d2ea593
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Processor\BusinessProcessorServer.dpr | 10-24-2006 | 15:12:36 | | 1130 | 5af71c5a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Processor\BusinessProcessorServer.bdsproj | 05-25-2007 | 16:11:14 | | 8398 | 256bf437
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Processor\BusinessProcessorServer.dproj | 05-29-2007 | 16:40:04 | | 4097 | e17e24bd
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Processor\BusinessProcessor.Sample.html | 10-24-2006 | 17:55:46 | | 993 | 59a72f93
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Processor\BusinessProcessorLibrary.RODL | 10-24-2006 | 15:12:36 | | 674 | 254c1100
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Processor\BusinessProcessor.bpg | 10-24-2006 | 15:12:36 | | 899 | 752446e7
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Processor\BusinessProcessor.bdsgroup | 05-25-2007 | 16:11:14 | | 777 | 6eb01f31
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Processor\BusinessProcessor.groupproj | 05-29-2007 | 16:40:04 | | 1662 | 14c60e69
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Processor\BizSchemaClient.pas | 10-24-2006 | 15:12:36 | | 3859 | 4f1bf657
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Processor\BizSchemaServer.pas | 06-28-2007 | 16:13:22 | | 4563 | e79ad12b
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Processor\BusinessProcessorClientData.pas | 03-07-2007 | 13:54:22 | | 3085 | 5c3617a8
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Processor\BusinessProcessorClientMain.pas | 10-24-2006 | 15:12:36 | | 2019 | 879d9f11
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Processor\BusinessProcessorClientUnit1.pas | 03-31-2007 | 01:10:44 | | 8818 | 111f8076
+Made Dir: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Rules Scripts
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Rules Scripts\BusinessRulesScripts_ClientData.dfm | 10-31-2006 | 14:49:54 | | 11055 | 31806259
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Rules Scripts\BusinessRulesScripts_ClientMain.dfm | 05-18-2006 | 15:13:38 | | 3199 | 7d22f5b0
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Rules Scripts\BusinessRulesScripts_ServerData.dfm | 05-23-2008 | 22:13:52 | | 10474 | d8a0d185
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Rules Scripts\BusinessRulesScripts_ServerMain.dfm | 05-18-2006 | 15:13:38 | | 1094 | 5696ed51
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Rules Scripts\NewService_Impl.dfm | 05-09-2006 | 20:54:48 | | 362 | 14180eed
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Rules Scripts\BusinessRulesScripts_Client.dpr | 05-09-2006 | 20:54:48 | | 663 | 9eccd8b4
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Rules Scripts\BusinessRulesScripts_Client.bdsproj | 05-25-2007 | 16:11:14 | | 8402 | 54c97976
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Rules Scripts\BusinessRulesScripts_Client.dproj | 05-29-2007 | 16:40:04 | | 3658 | 1c1c4306
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Rules Scripts\BusinessRulesScripts_Server.dpr | 05-09-2006 | 20:54:48 | | 996 | d6a91f54
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Rules Scripts\BusinessRulesScripts_Server.bdsproj | 05-25-2007 | 16:11:14 | | 8402 | 3d91221a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Rules Scripts\BusinessRulesScripts_Server.dproj | 05-29-2007 | 16:40:04 | | 3898 | a0d4c161
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Rules Scripts\BusinessRulesScripts.Sample.html | 05-09-2006 | 20:54:48 | | 1145 | 1f18b956
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Rules Scripts\BusinessRulesScriptsLibrary.rodl | 05-17-2006 | 12:42:22 | | 859 | e419c5f4
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Rules Scripts\BusinessRulesScripts.bpg | 05-09-2006 | 20:54:48 | | 923 | b1129b54
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Rules Scripts\BusinessRulesScripts.bdsgroup | 05-25-2007 | 16:11:14 | | 801 | 7f856e17
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Rules Scripts\BusinessRulesScripts.groupproj | 05-29-2007 | 16:40:04 | | 1734 | 3c7732ee
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Rules Scripts\BusinessRulesScripts_ClientData.pas | 05-30-2006 | 16:29:36 | | 1072 | 17c0f60b
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Rules Scripts\BusinessRulesScripts_ClientMain.pas | 08-29-2006 | 17:32:12 | | 1121 | 15549909
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Rules Scripts\BusinessRulesScripts_ServerData.pas | 05-09-2006 | 20:54:48 | | 976 | 158825ee
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Rules Scripts\BusinessRulesScripts_ServerMain.pas | 05-09-2006 | 20:54:48 | | 1286 | c6726b8c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Rules Scripts\BusinessRulesScriptsLibrary_Intf.pas | 05-09-2006 | 20:54:48 | | 2697 | f82480da
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Rules Scripts\BusinessRulesScriptsLibrary_Invk.pas | 05-09-2006 | 20:54:48 | | 1952 | c9874536
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Rules Scripts\NewService_Impl.pas | 05-17-2006 | 12:42:22 | | 1354 | 9b670f33
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Rules Scripts\BusinessRulesScripts_Client.res | 05-09-2006 | 20:54:48 | | 22748 | f3e8a260
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Rules Scripts\BusinessRulesScripts_Server.res | 05-09-2006 | 20:54:48 | | 22748 | f90747eb
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Business Rules Scripts\RODLFILE.res | 05-17-2006 | 12:42:22 | | 790 | afd5341e
+Made Dir: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Calculated Fields
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Calculated Fields\CalcFields_ServerMain.pas | 04-18-2006 | 21:39:56 | | 554 | b2899700
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Calculated Fields\CalcFieldsLibrary_Intf.pas | 09-19-2007 | 13:14:10 | | 2266 | 85f9c89a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Calculated Fields\CalcFieldsLibrary_Invk.pas | 09-19-2007 | 13:14:10 | | 1068 | cbd4f0f8
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Calculated Fields\CalcFieldsService_Impl.pas | 09-19-2007 | 13:14:10 | | 2206 | 589de662
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Calculated Fields\CalcFields_Client.res | 09-19-2007 | 13:14:10 | | 23408 | 74be1547
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Calculated Fields\CalcFields_Server.res | 09-19-2007 | 13:14:10 | | 23408 | d0d701db
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Calculated Fields\RODLFILE.res | 09-19-2007 | 13:14:10 | | 10610 | 3a51a411
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Calculated Fields\CalcFields_ClientData.dfm | 09-19-2007 | 13:14:10 | | 2609 | 11e66f1e
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Calculated Fields\CalcFields_ClientMain.dfm | 05-23-2008 | 22:13:52 | | 1453 | 8bd9c230
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Calculated Fields\CalcFields_ServerData.dfm | 05-23-2008 | 22:13:52 | | 1157 | a4d818e1
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Calculated Fields\CalcFields_ServerMain.dfm | 04-18-2006 | 21:39:56 | | 610 | c344df7b
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Calculated Fields\CalcFieldsService_Impl.dfm | 09-19-2007 | 13:14:10 | | 2323 | 59f0eae9
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Calculated Fields\CalcFields_Client.dpr | 04-18-2006 | 21:39:56 | | 539 | a0ce9dc8
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Calculated Fields\CalcFields_Client.bdsproj | 05-25-2007 | 16:11:14 | | 8392 | aac9248f
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Calculated Fields\CalcFields_Client.dproj | 05-29-2007 | 16:40:04 | | 3576 | c380ab9c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Calculated Fields\CalcFields_Server.dpr | 04-18-2006 | 21:39:56 | | 843 | b94e74e0
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Calculated Fields\CalcFields_Server.bdsproj | 05-25-2007 | 16:11:14 | | 8391 | 1684d806
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Calculated Fields\CalcFields_Server.dproj | 05-29-2007 | 16:40:04 | | 3809 | bacf05fd
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Calculated Fields\CalcFields.Sample.html | 04-27-2006 | 17:10:16 | | 905 | 1e94e578
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Calculated Fields\CalcFieldsLibrary.rodl | 09-19-2007 | 13:14:10 | | 982 | 8121e529
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Calculated Fields\CalcFields.bpg | 04-18-2006 | 21:39:56 | | 863 | 143e151b
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Calculated Fields\CalcFields.bdsgroup | 05-25-2007 | 16:11:14 | | 741 | 69330715
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Calculated Fields\CalcFields.groupproj | 05-29-2007 | 16:40:04 | | 1554 | b17689be
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Calculated Fields\CalcFields_ClientData.pas | 09-19-2007 | 13:14:10 | | 1955 | fe492cf7
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Calculated Fields\CalcFields_ClientMain.pas | 09-19-2007 | 13:14:10 | | 1155 | ed7c6e8e
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Calculated Fields\CalcFields_ServerData.pas | 06-29-2007 | 13:02:48 | | 870 | 23d3e24b
+Made Dir: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Connection By User
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Connection By User\ConnectionByUserMain.dfm | 05-23-2008 | 22:13:52 | | 3767 | 6b8226cf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Connection By User\ConnectionByUser.dpr | 04-18-2006 | 21:39:56 | | 329 | 65ab4831
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Connection By User\ConnectionByUser.bdsproj | 05-25-2007 | 16:11:14 | | 8391 | 4cb3f376
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Connection By User\ConnectionByUser.dproj | 05-29-2007 | 16:40:04 | | 3447 | c1b5533a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Connection By User\ConnectionByUser.Sample.html | 06-28-2006 | 16:38:52 | | 1470 | f825d278
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Connection By User\ConnectionByUserMain.pas | 06-28-2006 | 15:31:02 | | 6112 | 5f33a15b
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Connection By User\ConnectionByUser.res | 04-18-2006 | 21:39:56 | | 22748 | 23808d40
+Made Dir: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Connection Pooling
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Connection Pooling\ConnectionPoolingMain.dfm | 05-23-2008 | 22:13:52 | | 3871 | 2fad26dc
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Connection Pooling\ConnectionPooling.dpr | 04-18-2006 | 21:39:56 | | 334 | ccc0bec4
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Connection Pooling\ConnectionPooling.bdsproj | 05-25-2007 | 16:11:14 | | 8392 | 574bd204
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Connection Pooling\ConnectionPooling.dproj | 05-29-2007 | 16:40:04 | | 3453 | 84446969
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Connection Pooling\ConnectionPooling.Sample.html | 04-27-2006 | 18:04:28 | | 928 | b1ebda5c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Connection Pooling\ConnectionPoolingMain.pas | 12-08-2006 | 17:40:24 | | 4553 | 99ba8166
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Connection Pooling\ConnectionPooling.res | 04-18-2006 | 21:39:56 | | 22748 | 8ffae5cf
+Made Dir: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Custom User Logon
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Custom User Logon\CustomUserLogonMain.dfm | 04-18-2006 | 21:39:56 | | 2342 | 3904483b
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Custom User Logon\CustomUserLogon.dpr | 04-18-2006 | 21:39:56 | | 320 | e5a55a8e
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Custom User Logon\CustomUserLogon.bdsproj | 05-25-2007 | 16:11:14 | | 8390 | 30d29fae
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Custom User Logon\CustomUserLogon.dproj | 05-29-2007 | 16:40:04 | | 3148 | 53e5d916
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Custom User Logon\CustomUserLogon.Sample.html | 04-27-2006 | 18:12:30 | | 1339 | f891346a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Custom User Logon\CustomUserLogonMain.pas | 04-18-2006 | 21:39:56 | | 1491 | 7c7e48f1
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Custom User Logon\CustomUserLogon.res | 04-18-2006 | 21:39:56 | | 22748 | 8ffae5cf
+Made Dir: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Data Streamers
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Data Streamers\DataStreamersTest.res | 04-26-2006 | 21:19:08 | | 22748 | 23808d40
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Data Streamers\DataStreamersMain.dfm | 10-16-2006 | 18:04:30 | | 20553 | c9c47646
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Data Streamers\fMainForm.dfm | 06-16-2006 | 18:31:42 | | 20505 | 918e9ea3
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Data Streamers\DataStreamersTest.dpr | 06-21-2006 | 06:59:10 | | 310 | 9ecd4c70
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Data Streamers\DataStreamersTest.bdsproj | 05-25-2007 | 16:11:14 | | 8392 | 883931d1
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Data Streamers\DataStreamersTest.dproj | 05-29-2007 | 16:40:04 | | 3445 | f43bbcd9
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Data Streamers\DataStreamersTest.Sample.html | 06-21-2006 | 12:49:16 | | 914 | 74c42ac6
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Data Streamers\DataStreamersMain.pas | 10-16-2006 | 18:04:30 | | 7026 | 392b833a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Data Streamers\fMainForm.pas | 06-16-2006 | 18:31:42 | | 6655 | e98e2107
+Made Dir: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic SQL
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic SQL\DynSQLServerMain.pas | 12-17-2007 | 12:24:44 | | 1684 | db2b073b
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic SQL\DynSQLService_Impl.pas | 12-17-2007 | 12:24:44 | | 5549 | a03aa4b9
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic SQL\DynSQLClient.res | 04-18-2006 | 21:39:56 | | 22748 | f3e8a260
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic SQL\DynSQLServer.res | 06-14-2006 | 17:17:54 | | 22748 | f90747eb
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic SQL\RODLFILE.res | 12-17-2007 | 12:24:44 | | 10941 | 7ceefef
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic SQL\DynSQLMainClient.dfm | 12-17-2007 | 12:24:44 | | 6187 | 6970ec8a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic SQL\DynSQLServerMain.dfm | 05-23-2008 | 22:13:52 | | 2109 | b9851054
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic SQL\DynSQLService_Impl.dfm | 12-17-2007 | 12:24:44 | | 1404 | b84a86ee
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic SQL\DynSQLClient.dpr | 04-18-2006 | 21:39:56 | | 351 | 7b3f619f
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic SQL\DynSQLClient.bdsproj | 05-25-2007 | 16:11:14 | | 8387 | ca3d414e
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic SQL\DynSQLClient.dproj | 06-22-2007 | 13:36:02 | | 3185 | 59319b97
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic SQL\DynSQLServer.dpr | 04-18-2006 | 21:39:56 | | 594 | c28c21fc
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic SQL\DynSQLServer.bdsproj | 05-25-2007 | 16:11:14 | | 8387 | d8a3bf29
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic SQL\DynSQLServer.dproj | 05-29-2007 | 16:40:04 | | 3641 | fbd71cb
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic SQL\DynSQL.Sample.html | 04-27-2006 | 18:20:32 | | 2671 | 83f55a8f
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic SQL\DynSQLLibrary.RODL | 12-17-2007 | 12:24:44 | | 1314 | 4fe862af
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic SQL\DynSQL.bpg | 04-18-2006 | 21:39:56 | | 833 | d52b2698
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic SQL\DynSQL.bdsgroup | 05-25-2007 | 16:11:14 | | 711 | e4a0fa4d
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic SQL\DynSQL.groupproj | 05-29-2007 | 16:40:04 | | 1464 | 2eb718d4
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic SQL\DynSQLLibrary_Intf.pas | 12-17-2007 | 12:24:44 | | 2995 | 1df924e2
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic SQL\DynSQLLibrary_Invk.pas | 12-17-2007 | 12:24:44 | | 2373 | 81e827ba
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic SQL\DynSQLMainClient.pas | 12-17-2007 | 12:24:44 | | 4361 | 4faed557
+Made Dir: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic Where
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic Where\DynWhere_ClientMain.pas | 10-05-2007 | 16:48:36 | | 13340 | 78613b90
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic Where\DynWhere_Library.rodl | 10-05-2007 | 16:48:36 | | 759 | 25564ec7
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic Where\DynWhere_Library_Intf.pas | 10-05-2007 | 16:48:36 | | 2246 | 8e7c3f3d
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic Where\DynWhere_Library_Invk.pas | 10-05-2007 | 16:48:36 | | 1065 | 65ba4523
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic Where\DynWhere_Server.dpr | 10-05-2007 | 16:48:36 | | 941 | 2cf8e451
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic Where\DynWhere_Server.dproj | 02-13-2008 | 11:33:00 | | 9305 | a673db8a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic Where\DynWhere_Server.res | 10-05-2007 | 16:48:36 | | 23408 | 6fd9f544
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic Where\DynWhere_ServerData.dfm | 05-23-2008 | 22:13:52 | | 1401 | 551e7841
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic Where\DynWhere_ServerData.pas | 10-05-2007 | 16:48:36 | | 962 | 2aac0b71
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic Where\DynWhere_ServerMain.dfm | 10-05-2007 | 16:48:36 | | 585 | bac6a2a5
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic Where\DynWhere_ServerMain.pas | 10-05-2007 | 16:48:36 | | 415 | 706d4d59
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic Where\DynWhere_Service_Impl.dfm | 10-05-2007 | 16:48:36 | | 8626 | f7aace21
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic Where\DynWhere_Service_Impl.pas | 10-05-2007 | 16:48:36 | | 1520 | f90c453b
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic Where\memoForm.dfm | 10-05-2007 | 16:48:36 | | 1299 | 88765352
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic Where\memoForm.pas | 10-05-2007 | 16:48:36 | | 1183 | c3c20cdd
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic Where\RODLFILE.res | 10-05-2007 | 16:48:36 | | 10424 | 2e56e264
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic Where\WhereExpression.dfm | 10-05-2007 | 16:48:36 | | 3316 | 57405fd9
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic Where\WhereExpression.pas | 10-05-2007 | 16:48:36 | | 10189 | e9f88237
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic Where\DynWhere.bpg | 10-05-2007 | 16:48:36 | | 851 | 1587e9cd
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic Where\DynWhere.groupproj | 02-13-2008 | 11:33:00 | | 1758 | ed255330
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic Where\DynWhere.Sample.html | 12-05-2007 | 18:08:00 | | 877 | 35ef094f
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic Where\DynWhere_Client.dpr | 10-05-2007 | 16:48:36 | | 629 | b8381d53
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic Where\DynWhere_Client.dproj | 02-13-2008 | 11:33:00 | | 9247 | 33e5b4b1
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic Where\DynWhere_Client.res | 10-05-2007 | 16:48:36 | | 23408 | c8ad192e
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic Where\DynWhere_ClientData.dfm | 10-05-2007 | 16:48:36 | | 1837 | 1372312c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic Where\DynWhere_ClientData.pas | 10-05-2007 | 16:48:36 | | 1016 | faa6e476
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Dynamic Where\DynWhere_ClientMain.dfm | 10-05-2007 | 16:48:36 | | 34696 | c068a92e
+Made Dir: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Exported DataTables
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Exported DataTables\ExportedDataTablesClientData.pas | 10-11-2007 | 11:46:04 | | 958 | a79575a2
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Exported DataTables\ExportedDataTablesClientMain.dfm | 10-11-2007 | 11:46:04 | | 1884 | 49509569
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Exported DataTables\ExportedDataTablesClientMain.pas | 10-11-2007 | 11:46:04 | | 1253 | 6b1e0914
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Exported DataTables\ExportedDataTablesGroup.bpg | 10-11-2007 | 11:46:04 | | 905 | fcb86867
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Exported DataTables\ExportedDataTablesGroup.groupproj | 02-13-2008 | 11:33:00 | | 1938 | 8b0fa175
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Exported DataTables\ExportedDataTablesGroup.Sample.html | 12-05-2007 | 18:08:00 | | 1245 | a1e0905c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Exported DataTables\ExportedDataTablesLibrary.rodl | 10-11-2007 | 11:46:04 | | 814 | 51bd1c7c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Exported DataTables\ExportedDataTablesLibrary_Intf.pas | 10-11-2007 | 11:46:04 | | 2426 | 5131b326
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Exported DataTables\ExportedDataTablesLibrary_Invk.pas | 10-11-2007 | 11:46:04 | | 1092 | b2c8de4a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Exported DataTables\ExportedDataTablesServer.dpr | 10-11-2007 | 11:46:04 | | 1184 | d9402177
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Exported DataTables\ExportedDataTablesServer.dproj | 02-13-2008 | 11:33:00 | | 9436 | d17ee4c1
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Exported DataTables\ExportedDataTablesServer.res | 10-11-2007 | 11:46:04 | | 22748 | 557d2f64
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Exported DataTables\ExportedDataTablesServerData.dfm | 05-23-2008 | 22:13:52 | | 2610 | 2951f8c0
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Exported DataTables\ExportedDataTablesServerData.pas | 10-11-2007 | 11:46:04 | | 1141 | de3e0033
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Exported DataTables\ExportedDataTablesServerMain.dfm | 10-11-2007 | 11:46:04 | | 638 | e65a4c27
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Exported DataTables\ExportedDataTablesServerMain.pas | 10-11-2007 | 11:46:04 | | 545 | 96048662
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Exported DataTables\ExportedDataTablesService_Impl.dfm | 10-11-2007 | 11:46:04 | | 1651 | a4715571
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Exported DataTables\ExportedDataTablesService_Impl.pas | 10-11-2007 | 11:46:04 | | 1796 | 8b99723
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Exported DataTables\RODLFILE.res | 10-11-2007 | 11:46:04 | | 10442 | a4e3b82e
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Exported DataTables\ExportedDataTablesClient.dpr | 10-11-2007 | 11:46:04 | | 588 | 18b8456
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Exported DataTables\ExportedDataTablesClient.dproj | 02-13-2008 | 11:33:00 | | 9123 | eb8c17c4
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Exported DataTables\ExportedDataTablesClient.res | 10-11-2007 | 11:46:04 | | 22748 | 5f92caef
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Exported DataTables\ExportedDataTablesClientData.dfm | 10-11-2007 | 11:46:04 | | 2621 | 2b249f76
+Made Dir: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Fetch
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Fetch\FetchServerData.dfm | 05-23-2008 | 22:13:52 | | 1339 | 186564be
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Fetch\FetchServerMain.dfm | 06-22-2007 | 13:36:02 | | 596 | 9327c51f
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Fetch\FetchService_Impl.dfm | 06-22-2007 | 13:36:02 | | 26862 | a7ca5287
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Fetch\FetchClient.dpr | 06-22-2007 | 13:36:02 | | 485 | 1e9c7370
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Fetch\FetchServer.dpr | 06-22-2007 | 13:36:02 | | 760 | a231df09
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Fetch\Fetch.Sample.html | 06-25-2007 | 03:26:56 | | 1893 | 8816de46
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Fetch\FetchClientData.pas | 06-22-2007 | 13:36:02 | | 659 | eaa3ba9a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Fetch\FetchClientMain.pas | 06-22-2007 | 13:36:02 | | 4345 | 2b152f05
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Fetch\FetchLibrary_Intf.pas | 06-22-2007 | 13:36:02 | | 3043 | c776ecab
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Fetch\FetchLibrary_Invk.pas | 06-22-2007 | 13:36:02 | | 2389 | 333b74cf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Fetch\FetchServerData.pas | 06-22-2007 | 13:36:02 | | 930 | 899927de
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Fetch\FetchServerMain.pas | 06-22-2007 | 13:36:02 | | 493 | 6725a7b6
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Fetch\FetchService_Impl.pas | 06-22-2007 | 13:36:02 | | 2300 | e8b60ab2
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Fetch\FetchLibrary.RODL | 06-22-2007 | 13:36:02 | | 1319 | 6182a20d
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Fetch\Fetch.bdsgroup | 05-25-2007 | 16:11:14 | | 705 | 716302ba
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Fetch\FetchClient.bdsproj | 05-25-2007 | 16:11:14 | | 8386 | 51f44bac
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Fetch\FetchServer.bdsproj | 05-25-2007 | 16:11:14 | | 8386 | 3b1164c8
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Fetch\Fetch.groupproj | 06-22-2007 | 13:36:02 | | 1673 | 131c2c0a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Fetch\Fetch.bpg | 04-18-2006 | 21:39:56 | | 827 | 618939f4
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Fetch\FetchClient.res | 04-18-2006 | 21:39:56 | | 22748 | f3e8a260
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Fetch\FetchServer.res | 04-18-2006 | 21:39:56 | | 22748 | f90747eb
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Fetch\RODLFILE.res | 06-22-2007 | 13:36:02 | | 10930 | ef7a2e7c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Fetch\FetchClient.dproj | 06-22-2007 | 13:36:02 | | 3695 | 8012e0f3
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Fetch\FetchServer.dproj | 06-22-2007 | 13:36:02 | | 3417 | da95149a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Fetch\FetchClientData.dfm | 06-22-2007 | 13:36:02 | | 684 | 9c3b841a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Fetch\FetchClientMain.dfm | 05-23-2008 | 22:13:52 | | 25997 | 85177039
+Made Dir: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\First Sample
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\First Sample\FirstSampleServerMain.pas | 05-09-2006 | 22:38:08 | | 517 | 9b99816b
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\First Sample\FirstSampleService_Impl.pas | 05-09-2006 | 22:38:08 | | 1005 | 20b9bbfe
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\First Sample\FirstSampleClient.res | 05-09-2006 | 22:38:08 | | 22748 | f3e8a260
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\First Sample\FirstSampleServer.res | 05-09-2006 | 22:38:08 | | 22748 | f90747eb
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\First Sample\RODLFILE.res | 05-28-2006 | 15:08:02 | | 7683 | 2b020581
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\First Sample\FirstSampleClientData.dfm | 05-28-2006 | 15:08:02 | | 5176 | dfdaaa87
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\First Sample\FirstSampleclientMain.dfm | 05-23-2008 | 22:13:52 | | 1407 | 599512ae
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\First Sample\FirstSampleServerData.dfm | 05-23-2008 | 22:13:52 | | 1573 | 1ed8b78f
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\First Sample\FirstSampleServerMain.dfm | 05-09-2006 | 22:38:08 | | 614 | 9d0bcf23
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\First Sample\FirstSampleService_Impl.dfm | 05-09-2006 | 22:38:08 | | 6811 | 6a100574
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\First Sample\FirstSampleClient.dpr | 05-09-2006 | 22:38:08 | | 558 | 50cbe513
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\First Sample\FirstSampleClient.bdsproj | 05-25-2007 | 16:11:14 | | 8392 | 81e73c78
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\First Sample\FirstSampleClient.dproj | 05-29-2007 | 16:40:04 | | 3578 | caaceff4
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\First Sample\FirstSampleServer.dpr | 05-09-2006 | 22:38:08 | | 1066 | 316fbed3
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\First Sample\FirstSampleServer.bdsproj | 05-25-2007 | 16:11:14 | | 8392 | d38ed87d
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\First Sample\FirstSampleServer.dproj | 05-29-2007 | 16:40:04 | | 3816 | a421b2e
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\First Sample\FirstSample.Sample.html | 05-30-2006 | 18:11:16 | | 1335 | c66cdecf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\First Sample\FirstSampleLibrary.RODL | 05-09-2006 | 22:38:08 | | 616 | 7738310d
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\First Sample\FirstSample.bpg | 05-09-2006 | 22:38:08 | | 863 | 46a2c77c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\First Sample\FirstSample.bdsgroup | 05-25-2007 | 16:11:14 | | 741 | 7d04d0ea
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\First Sample\FirstSample.groupproj | 05-29-2007 | 16:40:04 | | 1554 | 5f1fa1ce
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\First Sample\FirstSampleClientData.pas | 05-28-2006 | 15:08:02 | | 861 | 3155ebfc
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\First Sample\FirstSampleclientMain.pas | 05-09-2006 | 22:38:08 | | 1123 | 200d57af
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\First Sample\FirstSampleLibrary_Intf.pas | 05-09-2006 | 22:38:08 | | 2188 | b022c3f
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\First Sample\FirstSampleLibrary_Invk.pas | 05-09-2006 | 22:38:08 | | 1020 | f9fded7d
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\First Sample\FirstSampleServerData.pas | 05-09-2006 | 22:38:08 | | 1008 | 8db74204
+Made Dir: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Local Schema
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Local Schema\LocalSchemaMain.dfm | 06-21-2006 | 08:39:44 | | 21118 | 40a8679a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Local Schema\LocalSchema.dpr | 06-21-2006 | 08:39:44 | | 302 | 713f515e
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Local Schema\LocalSchema.bdsproj | 05-25-2007 | 16:11:14 | | 8386 | 80f4142e
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Local Schema\LocalSchema.dproj | 05-29-2007 | 16:40:04 | | 3417 | 7f512139
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Local Schema\LocalSchema.Sample.html | 06-26-2006 | 09:58:18 | | 2066 | 5702728f
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Local Schema\LocalSchemaMain.pas | 06-21-2006 | 08:39:44 | | 1630 | 172251f0
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Local Schema\LocalSchema.res | 06-21-2006 | 08:39:44 | | 22748 | 8ffae5cf
+Made Dir: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Login Sample
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Login Sample\RODLFILE.res | 05-09-2006 | 21:36:36 | | 7216 | 21a5e9f3
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Login Sample\LoginSample_ClientData.dfm | 05-09-2006 | 21:36:36 | | 2744 | a2b0a41c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Login Sample\LoginSample_ClientMain.dfm | 05-23-2008 | 22:13:54 | | 8203 | 24c7ebb8
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Login Sample\LoginSample_ServerData.dfm | 05-23-2008 | 22:13:54 | | 1442 | b622052c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Login Sample\LoginSample_ServerMain.dfm | 05-09-2006 | 21:36:36 | | 614 | 15f933ee
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Login Sample\LoginSampleService_Impl.dfm | 05-09-2006 | 21:36:36 | | 10135 | 3adcc24b
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Login Sample\LoginService_Impl.dfm | 06-14-2006 | 12:48:06 | | 1940 | e9b7152b
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Login Sample\LoginSample_Client.dpr | 05-09-2006 | 21:36:36 | | 568 | 753f93b1
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Login Sample\LoginSample_Client.bdsproj | 05-25-2007 | 16:11:14 | | 8393 | 9e65bba
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Login Sample\LoginSample_Client.dproj | 05-29-2007 | 16:40:04 | | 3586 | 9561cfad
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Login Sample\LoginSample_server.dpr | 05-09-2006 | 21:36:36 | | 953 | 28f7dd2e
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Login Sample\LoginSample_server.bdsproj | 05-25-2007 | 16:11:14 | | 8393 | 6cc32374
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Login Sample\LoginSample_server.dproj | 05-29-2007 | 16:40:04 | | 3930 | 53c347aa
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Login Sample\LoginSample.Sample.html | 05-26-2006 | 15:57:12 | | 698 | e83cc260
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Login Sample\LoginSampleLibrary.RODL | 05-09-2006 | 21:36:36 | | 935 | 461ed2bc
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Login Sample\LoginSample.bpg | 05-09-2006 | 21:36:36 | | 869 | 93572466
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Login Sample\LoginSample.bdsgroup | 05-25-2007 | 16:11:14 | | 747 | 8fd8eaf8
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Login Sample\LoginSample.groupproj | 05-29-2007 | 16:40:04 | | 1572 | 3b976ff6
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Login Sample\LoginSample_ClientData.pas | 05-30-2006 | 16:29:36 | | 752 | a8c530b2
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Login Sample\LoginSample_ClientMain.pas | 05-09-2006 | 21:36:36 | | 2442 | eae74f4e
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Login Sample\LoginSample_ServerData.pas | 05-09-2006 | 21:36:36 | | 970 | 70ebb947
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Login Sample\LoginSample_ServerMain.pas | 05-09-2006 | 21:36:36 | | 521 | bfee5ce3
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Login Sample\LoginSampleLibrary_Intf.pas | 05-09-2006 | 21:36:36 | | 3202 | c580b8e9
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Login Sample\LoginSampleLibrary_Invk.pas | 05-09-2006 | 21:36:36 | | 1129 | ec0b3044
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Login Sample\LoginSampleService_Impl.pas | 05-09-2006 | 21:36:36 | | 1006 | 8ae362aa
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Login Sample\LoginService_Impl.pas | 06-14-2006 | 12:48:06 | | 2370 | 1b1fd0b8
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Login Sample\LoginSample_Client.res | 05-09-2006 | 21:36:36 | | 22748 | f3e8a260
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Login Sample\LoginSample_server.res | 05-09-2006 | 21:36:36 | | 22748 | f90747eb
+Made Dir: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\MegaDemo
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\MegaDemo\MegaDemoClient.res | 07-04-2006 | 18:02:52 | | 22748 | f3e8a260
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\MegaDemo\MegaDemoServer.res | 07-04-2006 | 18:02:52 | | 22748 | f90747eb
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\MegaDemo\RODLFILE.res | 05-27-2007 | 14:30:10 | | 12341 | c5ee82a4
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\MegaDemo\LoginService_Impl.dfm | 05-27-2007 | 14:30:10 | | 6134 | f53090ed
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\MegaDemo\MegaDemoClient_Data.dfm | 10-31-2006 | 14:49:54 | | 7173 | ab65ea6f
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\MegaDemo\MegaDemoClient_Main.dfm | 05-23-2008 | 22:13:54 | | 8210 | 953825ef
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\MegaDemo\MegaDemoServer_Data.dfm | 05-27-2007 | 14:30:10 | | 1820 | 287679f0
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\MegaDemo\MegaDemoServer_Main.dfm | 05-27-2007 | 14:30:10 | | 1024 | 7465dbc0
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\MegaDemo\OrdersService_Impl.dfm | 05-27-2007 | 14:30:10 | | 10631 | 25ac23f8
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\MegaDemo\MegaDemoClient.dpr | 07-04-2006 | 18:02:52 | | 488 | ec1e04f0
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\MegaDemo\MegaDemoClient.bdsproj | 05-25-2007 | 16:11:14 | | 8389 | 26ea8fba
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\MegaDemo\MegaDemoClient.dproj | 05-29-2007 | 16:40:04 | | 3558 | 4dd77162
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\MegaDemo\MegaDemoServer.dpr | 07-04-2006 | 18:02:52 | | 911 | fd2db59
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\MegaDemo\MegaDemoServer.bdsproj | 05-25-2007 | 16:11:14 | | 8389 | ad9878ed
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\MegaDemo\MegaDemoServer.dproj | 05-29-2007 | 16:40:04 | | 3886 | eb58a713
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\MegaDemo\MegaDemoGroup.Sample.html | 07-04-2006 | 18:02:52 | | 1677 | 6acdb099
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\MegaDemo\MegaDemoLibrary.RODL | 05-27-2007 | 14:30:10 | | 2736 | 22537a4a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\MegaDemo\MegaDemoGroup.bpg | 07-04-2006 | 18:02:52 | | 845 | 384ad875
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\MegaDemo\MegaDemoGroup.bdsgroup | 05-25-2007 | 16:11:14 | | 723 | 1da53ad9
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\MegaDemo\MegaDemoGroup.groupproj | 05-29-2007 | 16:40:04 | | 1500 | f410f800
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\MegaDemo\LoginService_Impl.pas | 05-27-2007 | 14:30:10 | | 3882 | ad340c1d
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\MegaDemo\MegaDemoClient_Data.pas | 07-17-2006 | 17:30:02 | | 1710 | e221392
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\MegaDemo\MegaDemoClient_Main.pas | 05-27-2007 | 14:30:10 | | 5569 | dc87edcf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\MegaDemo\MegaDemoLibrary_Intf.pas | 05-27-2007 | 14:30:10 | | 11694 | 8ff6077d
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\MegaDemo\MegaDemoLibrary_Invk.pas | 05-27-2007 | 14:30:10 | | 4426 | b7823cf0
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\MegaDemo\MegaDemoServer_Data.pas | 07-05-2006 | 13:26:06 | | 1000 | fa9f4854
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\MegaDemo\MegaDemoServer_Main.pas | 07-04-2006 | 18:02:52 | | 1520 | 6eeeeb49
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\MegaDemo\OrdersService_Impl.pas | 02-05-2008 | 19:02:40 | | 3173 | 8d4d6464
+Made Dir: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Memory Data
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Memory Data\MemoryData_Server.dpr | 04-22-2006 | 13:40:36 | | 824 | fe11b666
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Memory Data\MemoryData_Server.bdsproj | 05-25-2007 | 16:11:14 | | 8392 | baa786a5
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Memory Data\MemoryData_Server.dproj | 05-29-2007 | 16:40:04 | | 3798 | 1b8b1193
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Memory Data\MemoryData_Server.res | 04-22-2006 | 13:40:36 | | 22748 | f90747eb
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Memory Data\MemoryData_ServerData.dfm | 05-23-2008 | 22:13:54 | | 1431 | f29f5b6e
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Memory Data\MemoryData_ServerData.pas | 04-22-2006 | 13:40:36 | | 1114 | c0b26ca6
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Memory Data\MemoryData_ServerMain.dfm | 04-22-2006 | 13:40:36 | | 612 | 5867721a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Memory Data\MemoryData_ServerMain.pas | 04-22-2006 | 13:40:36 | | 590 | e2a3ca8
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Memory Data\MemoryDataLibrary.rodl | 04-22-2006 | 13:40:36 | | 847 | 39fdca01
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Memory Data\MemoryDataLibrary_Intf.pas | 04-22-2006 | 13:40:36 | | 2035 | 622910ff
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Memory Data\MemoryDataLibrary_Invk.pas | 04-22-2006 | 13:40:36 | | 1010 | 76ab5397
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Memory Data\NewService_Impl.dfm | 12-05-2006 | 16:47:56 | | 20633 | 20767160
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Memory Data\NewService_Impl.pas | 12-05-2006 | 16:47:56 | | 5763 | db560853
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Memory Data\RODLFILE.res | 04-22-2006 | 13:40:36 | | 7130 | 85aba0c9
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Memory Data\MemoryData.bpg | 04-22-2006 | 13:40:36 | | 863 | 110a5434
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Memory Data\MemoryData.bdsgroup | 05-25-2007 | 16:11:14 | | 741 | 11b96f3e
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Memory Data\MemoryData.groupproj | 05-29-2007 | 16:40:04 | | 1554 | 18c7b34f
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Memory Data\MemoryData.Sample.html | 06-21-2006 | 13:47:52 | | 918 | b2436b9b
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Memory Data\MemoryData_Client.dpr | 04-22-2006 | 13:40:36 | | 545 | 4dbae178
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Memory Data\MemoryData_Client.bdsproj | 05-25-2007 | 16:11:14 | | 8392 | 33f3101f
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Memory Data\MemoryData_Client.dproj | 05-29-2007 | 16:40:04 | | 3578 | d00896aa
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Memory Data\MemoryData_Client.res | 04-22-2006 | 13:40:36 | | 22748 | f3e8a260
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Memory Data\MemoryData_ClientData.dfm | 04-22-2006 | 13:40:36 | | 5880 | 6505d246
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Memory Data\MemoryData_ClientData.pas | 05-30-2006 | 16:29:36 | | 978 | 67bd9575
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Memory Data\MemoryData_ClientMain.dfm | 05-18-2006 | 23:11:22 | | 2667 | a947f123
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Memory Data\MemoryData_ClientMain.pas | 04-22-2006 | 13:40:36 | | 1342 | 51b0d213
+Made Dir: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Multi Level Detail
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Multi Level Detail\MultiLevelDetailService_Impl.dfm | 06-23-2006 | 13:19:52 | | 12116 | 98cac14a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Multi Level Detail\MultiLevelDetailClient.dpr | 06-23-2006 | 12:40:24 | | 629 | 55b21925
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Multi Level Detail\MultiLevelDetailClient.bdsproj | 05-25-2007 | 16:11:14 | | 8397 | ba430ed0
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Multi Level Detail\MultiLevelDetailClient.dproj | 05-29-2007 | 16:40:04 | | 3622 | 13ef4fbd
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Multi Level Detail\MultiLevelDetailServer.dpr | 06-23-2006 | 13:19:52 | | 1199 | 65f49506
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Multi Level Detail\MultiLevelDetailServer.bdsproj | 05-25-2007 | 16:11:14 | | 8397 | a041f
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Multi Level Detail\MultiLevelDetailServer.dproj | 05-29-2007 | 16:40:04 | | 3880 | 26e56fee
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Multi Level Detail\MultiLevelDetail.Sample.html | 06-23-2006 | 12:40:24 | | 575 | ed7298f6
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Multi Level Detail\MultiLevelDetailLibrary.RODL | 06-23-2006 | 12:40:24 | | 626 | 541402b2
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Multi Level Detail\MultiLevelDetail.bpg | 06-23-2006 | 12:40:24 | | 893 | 845cf42f
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Multi Level Detail\MultiLevelDetail.bdsgroup | 05-25-2007 | 16:11:14 | | 771 | 7b5fdd2e
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Multi Level Detail\MultiLevelDetail.groupproj | 05-29-2007 | 16:40:04 | | 1644 | e420a7aa
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Multi Level Detail\MultiLevelDetailClient_Data.pas | 06-23-2006 | 12:40:24 | | 1033 | 5134eff
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Multi Level Detail\MultiLevelDetailClient_Main.pas | 06-23-2006 | 13:19:52 | | 1162 | 91ab0a1d
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Multi Level Detail\MultiLevelDetailLibrary_Intf.pas | 06-23-2006 | 12:40:24 | | 2288 | 855d5d31
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Multi Level Detail\MultiLevelDetailLibrary_Invk.pas | 06-23-2006 | 12:40:24 | | 1035 | 685f1e4d
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Multi Level Detail\MultiLevelDetailServer_Data.pas | 06-23-2006 | 12:40:24 | | 1038 | a5b004eb
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Multi Level Detail\MultiLevelDetailServer_Main.pas | 06-23-2006 | 12:40:24 | | 541 | c9a90de4
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Multi Level Detail\MultiLevelDetailService_Impl.pas | 06-23-2006 | 13:19:52 | | 1071 | 7eddfd33
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Multi Level Detail\MultiLevelDetailClient.res | 06-23-2006 | 12:40:24 | | 22748 | f3e8a260
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Multi Level Detail\MultiLevelDetailServer.res | 06-23-2006 | 12:40:24 | | 22748 | f90747eb
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Multi Level Detail\RODLFILE.res | 06-23-2006 | 12:40:24 | | 7693 | aec6c697
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Multi Level Detail\MultiLevelDetailClient_Data.dfm | 06-23-2006 | 12:40:24 | | 9633 | ea5b79ba
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Multi Level Detail\MultiLevelDetailClient_Main.dfm | 06-23-2006 | 12:40:24 | | 2457 | ea3f0ec3
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Multi Level Detail\MultiLevelDetailServer_Data.dfm | 05-23-2008 | 22:13:54 | | 1461 | c2b9e7d8
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Multi Level Detail\MultiLevelDetailServer_Main.dfm | 06-23-2006 | 12:40:24 | | 634 | 3bb0b231
+Made Dir: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\QuantumGrid 4
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\QuantumGrid 4\NewService_Impl.dfm | 04-18-2006 | 21:39:56 | | 22101 | 92d79cda
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\QuantumGrid 4\QuantumGrid4_ClientData.dfm | 08-28-2007 | 11:25:12 | | 8113 | decf16a0
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\QuantumGrid 4\QuantumGrid4_ClientMain.dfm | 05-19-2006 | 04:45:34 | | 6213 | a93f9887
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\QuantumGrid 4\QuantumGrid4_ServerData.dfm | 05-23-2008 | 22:13:54 | | 1258 | 1b36acf7
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\QuantumGrid 4\QuantumGrid4_ServerMain.dfm | 04-18-2006 | 21:39:56 | | 614 | feef7147
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\QuantumGrid 4\QuantumGrid4_Client.dpr | 04-18-2006 | 21:39:56 | | 567 | 4e4addb0
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\QuantumGrid 4\QuantumGrid4_Client.bdsproj | 05-25-2007 | 16:11:14 | | 8394 | 17bc2e65
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\QuantumGrid 4\QuantumGrid4_Client.dproj | 05-29-2007 | 16:40:04 | | 3594 | f31674cf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\QuantumGrid 4\QuantumGrid4_server.dpr | 04-18-2006 | 21:39:56 | | 856 | 56e99448
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\QuantumGrid 4\QuantumGrid4_server.bdsproj | 05-25-2007 | 16:11:14 | | 8394 | 6f38f4a4
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\QuantumGrid 4\QuantumGrid4_server.dproj | 05-29-2007 | 16:40:04 | | 3818 | c6c6d743
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\QuantumGrid 4\QuantumGrid4.Sample.html | 04-18-2006 | 21:39:56 | | 1478 | 52176045
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\QuantumGrid 4\QuantumGrid4Library.rodl | 04-18-2006 | 21:39:56 | | 1449 | 3c77e5f
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\QuantumGrid 4\QuantumGrid4.bpg | 04-18-2006 | 21:39:56 | | 875 | 24385237
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\QuantumGrid 4\QuantumGrid4.bdsgroup | 05-25-2007 | 16:11:14 | | 753 | 13fa43a3
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\QuantumGrid 4\QuantumGrid4.groupproj | 05-29-2007 | 16:40:04 | | 1590 | 822788e4
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\QuantumGrid 4\NewService_Impl.pas | 04-18-2006 | 21:39:56 | | 2549 | ad7252b4
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\QuantumGrid 4\QuantumGrid4_ClientData.pas | 08-28-2007 | 11:25:12 | | 2235 | 4db3754c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\QuantumGrid 4\QuantumGrid4_ClientMain.pas | 04-18-2006 | 21:39:56 | | 2633 | f102598a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\QuantumGrid 4\QuantumGrid4_ServerData.pas | 04-18-2006 | 21:39:56 | | 903 | 818f20e6
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\QuantumGrid 4\QuantumGrid4_ServerMain.pas | 04-18-2006 | 21:39:56 | | 563 | 54b10a5b
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\QuantumGrid 4\QuantumGrid4Library_Intf.pas | 04-18-2006 | 21:39:56 | | 3751 | 23f1d9d9
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\QuantumGrid 4\QuantumGrid4Library_Invk.pas | 04-18-2006 | 21:39:56 | | 4227 | 4411e7fa
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\QuantumGrid 4\QuantumGrid4_Client.res | 04-18-2006 | 21:39:56 | | 22748 | f3e8a260
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\QuantumGrid 4\QuantumGrid4_server.res | 04-18-2006 | 21:39:56 | | 22748 | f90747eb
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\QuantumGrid 4\RODLFILE.res | 04-18-2006 | 21:39:56 | | 7864 | b71f43db
+Made Dir: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Quick Open
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Quick Open\QuickOpen.res | 04-21-2006 | 16:56:18 | | 22748 | 8ffae5cf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Quick Open\QuickOpenMain.dfm | 05-23-2008 | 22:13:54 | | 8568 | 33bca660
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Quick Open\QuickOpen.dpr | 04-21-2006 | 16:56:18 | | 278 | f23a2e6c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Quick Open\QuickOpen.bdsproj | 05-25-2007 | 16:11:14 | | 8384 | 69371e72
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Quick Open\QuickOpen.dproj | 05-29-2007 | 16:40:04 | | 3405 | 96f01caa
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Quick Open\QuickOpen.Sample.html | 06-28-2006 | 18:18:02 | | 512 | bdf47c17
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Quick Open\QuickOpenMain.pas | 06-28-2006 | 18:18:02 | | 982 | 927cf99f
+Made Dir: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Regular Expressions
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Regular Expressions\RegularExpressionsMain.dfm | 07-20-2006 | 18:33:06 | | 6447 | 133d7ed2
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Regular Expressions\RegularExpressions.dpr | 04-18-2006 | 21:39:56 | | 342 | bdfbfeab
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Regular Expressions\RegularExpressions.bdsproj | 05-25-2007 | 16:11:14 | | 8393 | ff0de059
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Regular Expressions\RegularExpressions.dproj | 05-29-2007 | 16:40:04 | | 3459 | 5bd0247b
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Regular Expressions\RegularExpressions.Sample.html | 06-29-2006 | 00:02:36 | | 554 | 49fe1f16
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Regular Expressions\RegularExpressionsMain.pas | 07-20-2006 | 18:33:06 | | 4782 | f34b0f0d
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Regular Expressions\RegularExpressions.res | 04-18-2006 | 21:39:56 | | 22748 | 8ffae5cf
+Made Dir: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Report Builder
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Report Builder\ReportBuilder_ClientMain.dfm | 06-28-2006 | 18:26:04 | | 14250 | 38287906
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Report Builder\ReportBuilder_ServerMain.dfm | 05-23-2008 | 22:13:54 | | 1701 | 9625bb63
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Report Builder\ReportBuilderClient.dpr | 04-18-2006 | 21:39:56 | | 351 | 3f34b16e
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Report Builder\ReportBuilderClient.bdsproj | 05-25-2007 | 16:11:14 | | 8394 | c53360eb
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Report Builder\ReportBuilderClient.dproj | 05-29-2007 | 16:40:04 | | 3466 | 2bb5d29d
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Report Builder\ReportBuilderServer.dpr | 04-18-2006 | 21:39:56 | | 678 | 998fd363
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Report Builder\ReportBuilderServer.bdsproj | 05-25-2007 | 16:11:14 | | 8394 | 47ab0bce
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Report Builder\ReportBuilderServer.dproj | 05-29-2007 | 16:40:04 | | 3695 | e4829c3a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Report Builder\ReportBuilder.Sample.html | 06-20-2006 | 13:00:50 | | 886 | 8b86cc2
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Report Builder\ClientArchive.raf | 04-18-2006 | 21:39:56 | | 94185 | f4fe7383
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Report Builder\ServerArchive.raf | 04-18-2006 | 21:39:56 | | 94185 | f4fe7383
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Report Builder\ReportBuilderLibrary.rodl | 04-18-2006 | 21:39:56 | | 1181 | 3e1fbc71
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Report Builder\Report1.rtm | 04-18-2006 | 21:39:56 | | 4451 | 53546618
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Report Builder\ReportBuilder.bpg | 04-18-2006 | 21:39:56 | | 875 | 291bd647
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Report Builder\ReportBuilder.bdsgroup | 05-25-2007 | 16:11:14 | | 753 | 527e7c64
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Report Builder\ReportBuilder.groupproj | 05-29-2007 | 16:40:04 | | 1590 | ca22b7bb
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Report Builder\DARBService_Impl.pas | 04-18-2006 | 21:39:56 | | 3382 | 79d5f8e
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Report Builder\ReportBuilder_ClientMain.pas | 06-28-2006 | 18:26:04 | | 2617 | 6aedd9ce
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Report Builder\ReportBuilder_ServerMain.pas | 04-18-2006 | 21:39:56 | | 1068 | af0776c0
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Report Builder\ReportBuilderLibrary_Intf.pas | 04-18-2006 | 21:39:56 | | 2847 | 33555db7
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Report Builder\ReportBuilderLibrary_Invk.pas | 04-18-2006 | 21:39:56 | | 2264 | bcdf172b
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Report Builder\ReportBuilderClient.res | 04-18-2006 | 21:39:56 | | 22748 | f3e8a260
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Report Builder\ReportBuilderServer.res | 04-18-2006 | 21:39:56 | | 22748 | f90747eb
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Report Builder\RODLFILE.res | 04-18-2006 | 21:39:56 | | 7469 | e6ff9c1e
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Report Builder\DARBService_Impl.dfm | 04-18-2006 | 21:39:56 | | 13988 | f9ef50db
+Made Dir: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Service Methods
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Service Methods\ServiceMethods_ClientMain.dfm | 05-23-2008 | 22:13:54 | | 19188 | 9bbd7912
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Service Methods\ServiceMethods_ServerMain.dfm | 05-23-2008 | 22:13:54 | | 11029 | 1288472a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Service Methods\ServiceMethods_Service_Impl.dfm | 08-29-2007 | 18:28:16 | | 11003 | 309aeb06
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Service Methods\ServiceMethods_Client.dpr | 06-06-2006 | 12:11:56 | | 313 | a4e58b62
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Service Methods\ServiceMethods_Client.bdsproj | 05-25-2007 | 16:11:14 | | 8396 | 6f9982ca
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Service Methods\ServiceMethods_Client.dproj | 05-29-2007 | 16:40:04 | | 3477 | cc17d5c6
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Service Methods\ServiceMethods_Server.dpr | 06-06-2006 | 12:11:56 | | 674 | 56436116
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Service Methods\ServiceMethods_Server.bdsproj | 05-25-2007 | 16:11:14 | | 8395 | 9f742b85
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Service Methods\ServiceMethods_Server.dproj | 05-29-2007 | 16:40:04 | | 3728 | 38df963e
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Service Methods\ServiceMethods.Sample.html | 06-08-2006 | 15:21:04 | | 939 | 9da2756c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Service Methods\ServiceMethodsLibrary.rodl | 06-06-2006 | 12:11:56 | | 670 | f602916f
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Service Methods\ServiceMethods.bpg | 06-06-2006 | 12:11:56 | | 887 | 62dcc103
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Service Methods\ServiceMethods.bdsgroup | 05-25-2007 | 16:11:14 | | 765 | a8908c0a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Service Methods\ServiceMethods.groupproj | 05-29-2007 | 16:40:04 | | 1626 | 469679c2
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Service Methods\ServiceMethods_ClientMain.pas | 11-26-2007 | 02:24:50 | | 21874 | 39ababe9
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Service Methods\ServiceMethods_ServerMain.pas | 08-29-2007 | 18:28:16 | | 5960 | 8dd03226
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Service Methods\ServiceMethods_Service_Impl.pas | 08-29-2007 | 18:28:16 | | 19105 | 8cf95529
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Service Methods\ServiceMethodsLibrary_Intf.pas | 08-29-2007 | 18:28:16 | | 2338 | 1802e01d
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Service Methods\ServiceMethodsLibrary_Invk.pas | 08-29-2007 | 18:28:16 | | 1083 | 6a5bc781
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Service Methods\RODLFILE.res | 08-29-2007 | 18:28:16 | | 610 | cd4e499c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Service Methods\ServiceMethods_Client.res | 06-06-2006 | 12:11:56 | | 22748 | 8ffae5cf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Service Methods\ServiceMethods_Server.res | 06-06-2006 | 12:11:56 | | 23380 | 66a71fb0
+Made Dir: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\SQL Access
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\SQL Access\SQLAccessMain.dfm | 06-28-2006 | 19:16:18 | | 15935 | 61f97b79
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\SQL Access\SQLAccess.dpr | 04-18-2006 | 21:39:56 | | 279 | caafb988
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\SQL Access\SQLAccess.bdsproj | 05-25-2007 | 16:11:14 | | 8384 | a4e55cc8
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\SQL Access\SQLAccess.dproj | 05-29-2007 | 16:40:04 | | 3405 | 8325ce0d
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\SQL Access\SQLAccess.Sample.html | 06-28-2006 | 14:59:04 | | 1260 | 3d2274b9
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\SQL Access\SQLAccessMain.pas | 06-28-2006 | 14:59:04 | | 5500 | 3da6f9e6
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\SQL Access\SQLAccess.res | 04-18-2006 | 21:39:56 | | 22748 | 8ffae5cf
+Made Dir: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Stored Procedures
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Stored Procedures\StoredProceduresMain.dfm | 10-25-2006 | 14:16:24 | | 4684 | 25d2a0a5
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Stored Procedures\StoredProcedures.dpr | 04-18-2006 | 21:39:56 | | 283 | b5c6a7ed
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Stored Procedures\StoredProcedures.bdsproj | 05-25-2007 | 16:11:14 | | 8391 | 82a9db5
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Stored Procedures\StoredProcedures.dproj | 05-29-2007 | 16:40:04 | | 3447 | ec40d3d3
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Stored Procedures\StoredProcedures.Sample.html | 06-29-2006 | 12:39:40 | | 878 | 22e46581
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Stored Procedures\StoredProceduresMain.pas | 10-25-2006 | 14:16:24 | | 3799 | 3419c1d5
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Stored Procedures\StoredProcedures.res | 04-18-2006 | 21:39:56 | | 22748 | 8ffae5cf
+Made Dir: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Strongly Typed
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Strongly Typed\StronglyTypedServer.res | 09-05-2006 | 22:30:38 | | 22748 | f90747eb
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Strongly Typed\StronglyTypedClientData.dfm | 05-22-2007 | 16:39:46 | | 12945 | ab4d13c7
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Strongly Typed\StronglyTypedClientMain.dfm | 05-22-2007 | 16:39:46 | | 3321 | 98ad9672
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Strongly Typed\StronglyTypedServerMain.dfm | 05-23-2008 | 22:13:54 | | 1684 | fa52a4b2
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Strongly Typed\StronglyTypedService_Impl.dfm | 05-23-2007 | 12:22:18 | | 33755 | de155b53
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Strongly Typed\StronglyTypedClient.dpr | 05-22-2007 | 16:39:46 | | 743 | 148c38c1
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Strongly Typed\StronglyTypedClient.bdsproj | 05-25-2007 | 16:11:14 | | 8394 | dccdf7a2
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Strongly Typed\StronglyTypedClient.dproj | 05-29-2007 | 16:40:04 | | 3770 | 3436d18
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Strongly Typed\StronglyTypedServer.dpr | 04-18-2006 | 21:39:56 | | 827 | bce9b6df
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Strongly Typed\StronglyTypedServer.bdsproj | 05-25-2007 | 16:11:14 | | 8394 | 8212a9ac
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Strongly Typed\StronglyTypedServer.dproj | 05-29-2007 | 16:40:04 | | 3887 | 2653e0ff
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Strongly Typed\StronglyTyped.Sample.html | 06-20-2006 | 12:41:54 | | 2776 | 58569e33
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Strongly Typed\StronglyTypedLibrary.RODL | 04-18-2006 | 21:39:56 | | 1396 | b7311c89
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Strongly Typed\StronglyTyped.bpg | 04-18-2006 | 21:39:56 | | 875 | c7273cc8
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Strongly Typed\StronglyTyped.bdsgroup | 05-25-2007 | 16:11:14 | | 753 | d3d0d927
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Strongly Typed\StronglyTyped.groupproj | 05-29-2007 | 16:40:04 | | 1590 | 52f38ceb
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Strongly Typed\SampleSchemaClient_Intf.pas | 05-22-2007 | 16:39:46 | | 38135 | 2cff822f
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Strongly Typed\SampleSchemaServer_Intf.pas | 05-22-2007 | 16:39:46 | | 48140 | cf855f37
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Strongly Typed\StronglyTypedClientData.pas | 05-22-2007 | 16:39:46 | | 943 | 720a121e
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Strongly Typed\StronglyTypedClientMain.pas | 05-22-2007 | 16:39:46 | | 4209 | d3e50e8a
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Strongly Typed\StronglyTypedLibrary_Intf.pas | 05-22-2007 | 16:39:46 | | 3681 | 1316c686
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Strongly Typed\StronglyTypedLibrary_Invk.pas | 05-22-2007 | 16:39:46 | | 3191 | 37093e99
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Strongly Typed\StronglyTypedServerMain.pas | 04-18-2006 | 21:39:56 | | 986 | c024288c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Strongly Typed\StronglyTypedService_Impl.pas | 05-22-2007 | 16:39:46 | | 2718 | 31dc10d2
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Strongly Typed\uBizCustomersClient.pas | 04-18-2006 | 21:39:56 | | 6816 | a89f194c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Strongly Typed\uBizCustomersServer.pas | 07-26-2006 | 15:35:42 | | 2205 | c7ac42a5
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Strongly Typed\RODLFILE.res | 05-22-2007 | 16:39:46 | | 11123 | 4f38b0c8
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\Strongly Typed\StronglyTypedClient.res | 04-18-2006 | 21:39:56 | | 22748 | f3e8a260
+Made Dir: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\XSLT
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\XSLT\CustomersToHTML.xsl | 04-24-2006 | 16:37:54 | | 1352 | 5a1bff3d
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\XSLT\CustomersToSimpleXML.xsl | 04-24-2006 | 16:37:54 | | 999 | 43daa672
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\XSLT\XSLTMain.pas | 05-28-2007 | 19:46:18 | | 6837 | c59af7f1
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\XSLT\XSLT.res | 04-24-2006 | 16:31:04 | | 22748 | 8ffae5cf
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\XSLT\XSLTMain.dfm | 05-28-2007 | 19:46:18 | | 32515 | d5a6b725
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\XSLT\XSLT.dpr | 04-24-2006 | 16:31:04 | | 250 | df4e9e08
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\XSLT\XSLT.bdsproj | 05-25-2007 | 16:11:14 | | 8379 | b94fcdd9
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\XSLT\XSLT.dproj | 05-29-2007 | 16:40:04 | | 3375 | 2808a503
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\XSLT\CustomersHTML.html | 04-24-2006 | 16:37:54 | | 17160 | 6d71d395
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\XSLT\XSLT.Sample.html | 07-03-2006 | 12:43:24 | | 612 | a14f753c
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples\XSLT\DALogo.png | 09-13-2004 | 19:38:48 | | 3360 | 6eb28ef4
+File Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Help\RegisterDelphiHelp.exe | 12-03-2003 | 20:26:00 | | 97280 | bd823b42
+RegDB Key: Software\RemObjects\Data Abstract for Delphi
+RegDB Val: 1
+RegDB Name: Installed
+RegDB Root: 1
+RegDB Key: Software\RemObjects\Data Abstract for Delphi
+RegDB Val: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi
+RegDB Name: InstallDir
+RegDB Root: 1
+RegDB Key: Software\RemObjects\Data Abstract for Delphi
+RegDB Val: 5.0.30.691
+RegDB Name: Version
+RegDB Root: 1
+Shell Link: C:\Documents and Settings\Usuario\Menú Inicio\Programas\RemObjects Data Abstract\Schema Modeler.lnk
+Link Info: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)\Bin\DASchemaModeler.exe | | | 0 | 1 | 0 |
+Shell Link: C:\Documents and Settings\Usuario\Menú Inicio\Programas\RemObjects Data Abstract\DAServer.lnk
+Link Info: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)\Bin\DAServer.exe | | | 0 | 1 | 0 |
+Made Dir: C:\Archivos de programa\RemObjects Software\Everwood\Welcome\Data Abstract
+File Copy: C:\Archivos de programa\RemObjects Software\Everwood\Welcome\Data Abstract\Welcome.png | 05-17-2007 | 15:24:54 | | 32526 | 474c45f1
+RegDB Key: Software\RemObjects\Everwood\Welcome
+RegDB Val:
+RegDB Root: 1
+RegDB Key: Software\RemObjects\Everwood\Welcome\Products
+RegDB Val:
+RegDB Root: 1
+RegDB Key: Software\RemObjects\Everwood\Welcome\Products\Data Abstract
+RegDB Val: 5.0.30.691
+RegDB Name: Installed Version
+RegDB Root: 1
+RegDB Key: Software\RemObjects\Everwood\Welcome\Products\Data Abstract
+RegDB Val: 2
+RegDB Name: Order
+RegDB Root: 1
+RegDB Key: Software\RemObjects\Everwood\Welcome\Products\Data Abstract
+RegDB Val: C:\Archivos de programa\RemObjects Software\Everwood\Welcome\Data Abstract\Welcome.png
+RegDB Name: Image
+RegDB Root: 1
+RegDB Key: Software\RemObjects\Everwood\Welcome\Products\Data Abstract\Samples for Delphi
+RegDB Val: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples
+RegDB Name: Folder
+RegDB Root: 1
+RegDB Key: Software\RemObjects\Everwood\Welcome\Products\Data Abstract\Samples for Delphi
+RegDB Val: Flat
+RegDB Name: Structure
+RegDB Root: 1
+RegDB Key: Software\RemObjects\Everwood\Welcome\Products\Data Abstract for Delphi
+RegDB Val: 5.0.30.691
+RegDB Name: Installed Version
+RegDB Root: 1
+RegDB Key: Software\RemObjects\Everwood\Welcome\Products\Data Abstract for Delphi
+RegDB Val: 2
+RegDB Name: Order
+RegDB Root: 1
+RegDB Key: Software\RemObjects\Everwood\Welcome\Products\Data Abstract for Delphi
+RegDB Val: C:\Archivos de programa\RemObjects Software\Everwood\Welcome\Data Abstract\Welcome.png
+RegDB Name: Image
+RegDB Root: 1
+RegDB Key: Software\RemObjects\Everwood\Welcome\Products\Data Abstract for Delphi\Samples for Delphi
+RegDB Val: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Samples
+RegDB Name: Folder
+RegDB Root: 1
+RegDB Key: Software\RemObjects\Everwood\Welcome\Products\Data Abstract for Delphi\Samples for Delphi
+RegDB Val: Flat
+RegDB Name: Structure
+RegDB Root: 1
+RegDB Key: Software\RemObjects\Everwood\Welcome\Products\Data Abstract
+RegDB Val: http://devcenter.remobjects.com/da
+RegDB Name: DevCenter URL
+RegDB Root: 1
+RegDB Key: Software\RemObjects\Everwood\Welcome\Products\Data Abstract for Delphi
+RegDB Val: http://devcenter.remobjects.com/da
+RegDB Name: DevCenter URL
+RegDB Root: 1
+Made Dir: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\License.txt | 03-13-2008 | 17:47:10 | | 9459 | 9ae670d8
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\README.html | 04-25-2004 | 18:21:08 | | 1747 | 19f2794a
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\ps.png | 04-25-2004 | 18:16:12 | | 16701 | a7a101
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Launch.exe | 12-03-2003 | 20:26:00 | | 14848 | 81197b84
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Changes.txt | 12-19-2005 | 23:41:40 | | 4447 | 7bb0bcbe
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Pascal Script.ico | 05-01-2004 | 22:03:18 | | 22486 | d564aa43
+Made Dir: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Bin
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Bin\PSUnitImporter.exe | 05-23-2008 | 22:13:40 | 3.0.30.691 | 1352632 | 309a8dac
+Made Dir: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Dcu
+Made Dir: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Dcu\D6
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Dcu\D6\PascalScript_Core_D6.bpl | 05-23-2008 | 22:13:18 | 3.0.30.691 | 633856 | 5721b5fd
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Dcu\D6\PascalScript_Core_D6.dcp | 05-23-2008 | 22:13:18 | | 771489 | 61e0e56d
+Made Dir: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Dcu\D7
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Dcu\D7\PascalScript_Core_D7.bpl | 05-23-2008 | 22:13:18 | 3.0.30.691 | 641024 | 89a6a13e
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Dcu\D7\PascalScript_Core_D7.dcp | 05-23-2008 | 22:13:18 | | 772893 | ac1f7e4c
+Made Dir: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Dcu\D10
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Dcu\D10\PascalScript_Core_D10.bpl | 05-23-2008 | 22:13:22 | 3.0.30.691 | 638464 | 60daf352
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Dcu\D10\PascalScript_Core_D10.dcp | 05-23-2008 | 22:13:22 | | 787642 | e9de024e
+Made Dir: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Dcu\D11
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Dcu\D11\PascalScript_Core_D11.bpl | 05-23-2008 | 22:13:26 | 3.0.30.691 | 638464 | f130ecdd
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Dcu\D11\PascalScript_Core_D11.dcp | 05-23-2008 | 22:13:26 | | 787661 | 2912dfcd
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Dcu\D7\PascalScript_RO_D7.bpl | 05-23-2008 | 22:13:20 | 3.0.30.691 | 55808 | 478a161b
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Dcu\D7\PascalScript_RO_D7.dcp | 05-23-2008 | 22:13:20 | | 43797 | a4d11e27
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Dcu\D10\PascalScript_RO_D10.bpl | 05-23-2008 | 22:13:22 | 3.0.30.691 | 50176 | 6d1538b1
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Dcu\D10\PascalScript_RO_D10.dcp | 05-23-2008 | 22:13:22 | | 41698 | c89d8dc
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Dcu\D11\PascalScript_RO_D11.bpl | 05-23-2008 | 22:13:28 | 3.0.30.691 | 50176 | b5825654
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Dcu\D11\PascalScript_RO_D11.dcp | 05-23-2008 | 22:13:28 | | 41705 | e81bfd80
+Made Dir: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\PascalScript_Core_D10.bdsproj | 05-23-2008 | 22:13:22 | | 8295 | 5357f307
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\PascalScript_Core_D10.dpk | 10-26-2007 | 15:20:00 | | 2210 | c7553ea5
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\PascalScript_Core_D10.res | 05-23-2008 | 22:13:20 | | 616 | e59ca005
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\PascalScript_Core_D10.cfg | 12-19-2005 | 18:57:54 | | 535 | 129a73f7
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\PascalScript_Core_D11.dproj | 05-23-2008 | 22:13:26 | | 7393 | fd81855d
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\PascalScript_Core_D11.dpk | 10-26-2007 | 15:20:00 | | 2210 | 21339bd2
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\PascalScript_Core_D11.res | 05-23-2008 | 22:13:24 | | 616 | e59ca005
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\PascalScript_Core_D7.dpk | 10-26-2007 | 15:20:00 | | 2209 | 70232fa6
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\PascalScript_Core_D7.dof | 05-23-2008 | 22:13:20 | | 1919 | aed8828b
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\PascalScript_Core_D7.res | 05-23-2008 | 22:13:18 | | 616 | e59ca005
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\PascalScript_Core_D6.dof | 05-23-2008 | 22:13:18 | | 1851 | 12daa727
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\PascalScript_Core_D6.dpk | 10-26-2007 | 15:20:00 | | 2209 | 96458ad1
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\PascalScript_Core_D6.res | 05-23-2008 | 22:13:14 | | 616 | e59ca005
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\PascalScript_Core_D5.dof | 05-23-2008 | 22:13:14 | | 1786 | 21061a8c
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\PascalScript_Core_D5.dpk | 10-16-2006 | 19:24:32 | | 2209 | 679f6309
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\PascalScript_Core_D4.dpk | 10-16-2006 | 19:24:32 | | 2208 | ac617051
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\PascalScript_Core_D4.dof | 05-23-2008 | 22:13:14 | | 1786 | c918aa04
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\PascalScript_Core_D3.dof | 05-23-2008 | 22:13:14 | | 1804 | 5288eae4
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\PascalScript_Core_D3.dpk | 10-16-2006 | 19:24:32 | | 2209 | 5f5bb6f8
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\PascalScript_Core_K3.kof | 04-20-2004 | 21:57:42 | | 1786 | 2be344e0
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\PascalScript_Core_K3.dpk | 04-20-2004 | 21:57:42 | | 2209 | 69dc73d4
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\PascalScript_Core_Glyphs.RES | 05-23-2008 | 22:13:14 | | 18328 | e7641689
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\PascalScript_Core_Reg.pas | 12-10-2007 | 16:32:28 | | 1611 | d98b8369
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\PascalScript_RO_D10.bdsproj | 05-23-2008 | 22:13:24 | | 8256 | a9d4ddc3
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\PascalScript_RO_D10.cfg | 04-26-2006 | 13:16:06 | | 846 | 995e9ae1
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\PascalScript_RO_D10.dpk | 02-23-2006 | 16:15:02 | | 930 | ab48f3b5
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\PascalScript_RO_D7.dpk | 02-23-2006 | 16:15:02 | | 834 | 42a10e79
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\PascalScript_RO_D11.dproj | 05-23-2008 | 22:13:30 | | 6566 | 85d4a5b8
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\PascalScript_RO_D11.dpk | 09-13-2007 | 16:22:22 | | 930 | b7bbca3
+File Overwrite: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\PascalScript_RO_D7.dpk | 02-23-2006 | 16:15:02 | | 834 | 42a10e79
+Backup Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\BACKUP\PascalScript_RO_D7.dpk
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\PascalScript_RO_D7.dof | 05-23-2008 | 22:13:20 | | 1940 | 99ace95f
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\PascalScript_RO_D7.res | 05-23-2008 | 22:13:20 | | 616 | e59ca005
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\PascalScript_RO_D6.dpk | 02-23-2006 | 16:15:02 | | 834 | 21e8b115
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\PascalScript_RO_D6.dof | 05-23-2008 | 22:13:14 | | 1804 | 252473d1
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\PascalScript_RO_D6.res | 04-25-2004 | 18:02:16 | | 616 | 9bbf6df1
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\PascalScript_RO_Glyphs.RES | 05-23-2008 | 22:13:14 | | 1876 | 88704ce0
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\PascalScript_RO_Reg.pas | 02-11-2008 | 12:38:48 | | 745 | 7e39e914
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\x86.inc | 12-05-2007 | 14:55:56 | | 23750 | 4039742d
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\powerpc.inc | 12-05-2007 | 14:55:56 | | 10572 | 39cf152e
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\PascalScript.inc | 01-05-2006 | 20:34:10 | | 1732 | 155d434c
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\eDefines.inc | 03-15-2007 | 17:32:38 | | 14033 | 45fcae7
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\BuildPackages_D6.bpg | 04-25-2004 | 18:02:16 | | 875 | 17e01450
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\BuildPackages_D7.bpg | 04-25-2004 | 18:02:16 | | 875 | dc57cb7
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\BuildPackages_D10.bdsgroup | 12-19-2005 | 19:12:14 | | 856 | 1e8535b2
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\BuildPackages_D11.groupproj | 09-13-2007 | 16:22:22 | | 1853 | 214bf1b2
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\uPSDebugger.pas | 07-27-2005 | 17:41:56 | | 15796 | 4da4b45f
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\uPSDisassembly.pas | 02-11-2008 | 12:36:58 | | 16034 | 69070560
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\uPSPreProcessor.pas | 02-11-2008 | 12:36:58 | | 21845 | a8aaf49a
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\uPSR_buttons.pas | 10-01-2004 | 20:23:56 | | 789 | 45ccccdd
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\uPSR_classes.pas | 07-27-2005 | 17:41:56 | | 14735 | 7bec20bc
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\uPSR_comobj.pas | 07-27-2005 | 17:41:56 | | 2154 | 6098c2a9
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\uPSR_controls.pas | 02-11-2008 | 12:36:58 | | 10953 | bee36feb
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\uPSR_dateutils.pas | 03-15-2007 | 17:32:38 | | 1863 | 57f190dd
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\uPSR_DB.pas | 01-05-2006 | 20:08:30 | | 75792 | feebf90d
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\uPSR_dll.pas | 01-05-2006 | 20:08:30 | | 7115 | a938d03
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\uPSR_extctrls.pas | 01-05-2006 | 20:08:30 | | 3674 | fab516f0
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\uPSR_forms.pas | 02-11-2008 | 12:36:58 | | 13909 | f2ca791b
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\uPSR_graphics.pas | 10-04-2006 | 13:08:40 | | 8488 | 8c2b726e
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\uPSR_menus.pas | 01-05-2006 | 20:08:30 | | 17296 | a63d3bb4
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\uPSR_std.pas | 10-01-2004 | 20:23:56 | | 2710 | 17cc7c4a
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\uPSR_stdctrls.pas | 01-05-2006 | 20:08:30 | | 11025 | 43456fc
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\uPSRuntime.pas | 02-11-2008 | 12:36:58 | | 384536 | 85249be7
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\uPSUtils.pas | 02-11-2008 | 12:36:58 | | 35511 | 6e9cbe6b
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\uPSC_buttons.pas | 11-15-2004 | 15:39:22 | | 2806 | 35ea551
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\uPSC_classes.pas | 02-11-2008 | 12:36:58 | | 12370 | 24627254
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\uPSC_comobj.pas | 11-15-2004 | 15:39:22 | | 612 | 38614afb
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\uPSC_controls.pas | 02-11-2008 | 12:36:58 | | 9796 | 5cf856bb
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\uPSC_dateutils.pas | 11-15-2004 | 15:39:22 | | 1553 | 6121bee5
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\uPSC_DB.pas | 10-04-2006 | 13:08:40 | | 36742 | 851fdf6d
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\uPSC_dll.pas | 02-11-2008 | 12:36:58 | | 3719 | 96eb67f8
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\uPSC_extctrls.pas | 07-27-2005 | 17:41:56 | | 12642 | b80a3fbd
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\uPSC_forms.pas | 07-27-2005 | 17:41:56 | | 11886 | cf0f9153
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\uPSC_graphics.pas | 10-04-2006 | 13:08:40 | | 13222 | eed66126
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\uPSC_menus.pas | 01-05-2006 | 20:08:30 | | 9930 | 4517c1d1
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\uPSC_std.pas | 11-15-2004 | 15:39:22 | | 2707 | b9b9ec2d
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\uPSC_stdctrls.pas | 07-27-2005 | 17:41:56 | | 25016 | cc69c9de
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\uPSCompiler.pas | 02-11-2008 | 12:36:58 | | 448211 | 4af5c98c
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\uPSComponent.pas | 02-11-2008 | 12:36:58 | | 41889 | 71cd8a70
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\uPSComponent_COM.pas | 10-01-2004 | 20:23:56 | | 755 | 7d8d0635
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\uPSComponent_Controls.pas | 01-05-2006 | 20:08:30 | | 1636 | c15c38a7
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\uPSComponent_DB.pas | 03-15-2007 | 17:32:38 | | 715 | 3a93c74c
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\uPSComponent_Default.pas | 10-04-2006 | 13:08:40 | | 1945 | 64df0be9
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\uPSComponent_Forms.pas | 01-05-2006 | 20:08:30 | | 1438 | d778cbb8
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\uPSComponent_StdCtrls.pas | 01-05-2006 | 20:08:30 | | 1558 | d2e2afb9
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\uROPSServerLink.pas | 05-05-2008 | 12:10:50 | | 34753 | 40c7d51d
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Source\uROPSImports.pas | 07-27-2005 | 23:23:26 | | 10899 | 67ed1671
+Made Dir: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples
+Made Dir: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Console
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Console\sample4.dpr | 07-12-2005 | 17:29:16 | | 3652 | c62d935
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Console\sample5.dpr | 07-12-2005 | 17:29:16 | | 3946 | e7c2eb31
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Console\sample6.dpr | 07-12-2005 | 17:29:16 | | 4597 | 473765e
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Console\sample7.dpr | 07-12-2005 | 17:29:16 | | 4854 | fc4ed706
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Console\sample8.dpr | 07-12-2005 | 17:29:16 | | 4045 | bd5cb91b
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Console\sample1.dpr | 07-12-2005 | 17:29:16 | | 2051 | f2022a40
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Console\sample2.dpr | 07-12-2005 | 17:29:16 | | 2745 | e0bc2dda
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Console\sample3.dpr | 07-12-2005 | 17:29:16 | | 2797 | f1bb348c
+Made Dir: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Debug
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Debug\ide_debugoutput.pas | 05-04-2004 | 15:08:08 | | 580 | 6d77c2b7
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Debug\ide_editor.dfm | 05-04-2004 | 15:08:08 | | 5732 | 212433b7
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Debug\ide_editor.pas | 05-04-2004 | 15:08:08 | | 10086 | deb814f6
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Debug\readme.txt | 05-04-2004 | 15:08:08 | | 62 | c9df037d
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Debug\ide.dpr | 05-04-2004 | 15:08:08 | | 309 | 3133d127
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Debug\ide.res | 05-04-2004 | 15:08:08 | | 876 | 1671909e
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Debug\ide_debugoutput.dfm | 05-04-2004 | 15:08:08 | | 521 | 69396746
+Made Dir: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Import
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Import\fDwin.pas | 04-20-2004 | 21:57:42 | | 380 | 2aca94c7
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Import\fMain.pas | 08-02-2005 | 15:23:30 | | 12131 | cb87ae26
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Import\Import.res | 04-20-2004 | 21:57:42 | | 22748 | 7b82a90a
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Import\fDwin.dfm | 04-20-2004 | 21:57:42 | | 608 | b0dc1522
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Import\fMain.dfm | 04-25-2004 | 18:02:16 | | 1997 | 2b89a703
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Import\Import.dpr | 04-20-2004 | 21:57:42 | | 310 | fbd0d2b2
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Import\importtest.rops | 04-20-2004 | 21:57:42 | | 188 | 8ad17bd8
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Import\longfortest.rops | 04-20-2004 | 21:57:42 | | 132 | f2f55245
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Import\rectest.rops | 04-20-2004 | 21:57:42 | | 168 | 95f5d1ea
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Import\stringtest.rops | 04-20-2004 | 21:57:42 | | 81 | e855a712
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Import\t1.rops | 04-25-2004 | 18:02:16 | | 82 | fdd4ff5e
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Import\t2.rops | 04-20-2004 | 21:57:42 | | 71 | ac71c911
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Import\t3.rops | 04-20-2004 | 21:57:42 | | 44 | fae7f743
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Import\t4.rops | 04-20-2004 | 21:57:42 | | 92 | a4ea2881
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Import\t5.rops | 04-20-2004 | 21:57:42 | | 120 | 9555109e
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Import\t6.rops | 04-20-2004 | 21:57:42 | | 314 | 146387e4
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Import\t7.rops | 04-20-2004 | 21:57:42 | | 76 | 1fdd5565
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Import\t8.rops | 04-20-2004 | 21:57:42 | | 748 | ec525a55
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Import\t9.rops | 04-25-2004 | 18:02:16 | | 236 | 8ce601a5
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Import\t10.rops | 04-20-2004 | 21:57:42 | | 187 | 79538f8a
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Import\t11.rops | 04-25-2004 | 18:02:16 | | 1353 | fda91ca6
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Import\testdefine.rops | 04-25-2004 | 18:02:16 | | 172 | db084c84
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Import\testinclude.rops | 04-25-2004 | 18:02:16 | | 214 | b8fe8ebb
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Import\vartype.rops | 04-25-2004 | 18:02:16 | | 286 | d18add38
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Import\wordole.rops | 04-20-2004 | 21:57:42 | | 126 | cfeabde8
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Import\arraytest.rops | 04-20-2004 | 21:57:42 | | 313 | 308fcb11
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Import\booleantest.rops | 04-20-2004 | 21:57:42 | | 303 | 1c2a740e
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Import\bytearray.rops | 04-25-2004 | 18:02:16 | | 319 | 1a6d5b0f
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Import\casetest.rops | 04-20-2004 | 21:57:42 | | 162 | f882dc71
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Import\dlltest.rops | 04-20-2004 | 21:57:42 | | 876 | 7464642d
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Import\exittest.rops | 04-20-2004 | 21:57:42 | | 145 | 877c07ad
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Import\fortest.rops | 04-20-2004 | 21:57:42 | | 117 | 786be752
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Import\if.rops | 04-20-2004 | 21:57:42 | | 131 | 3bac7a0e
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Import\iformtest.rops | 04-20-2004 | 21:57:42 | | 2337 | 8e8ce14d
+Made Dir: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Kylix
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Kylix\Import.dpr | 04-20-2004 | 23:44:16 | | 270 | 4fa91fdc
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Kylix\fDwin.pas | 04-20-2004 | 23:44:16 | | 367 | 679c1d4e
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Kylix\fMain.pas | 08-02-2005 | 15:23:30 | | 8060 | 78685d4b
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Kylix\fDwin.dfm | 04-20-2004 | 23:44:16 | | 666 | 7202d3fa
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Kylix\fMain.dfm | 04-20-2004 | 23:44:16 | | 1775 | 22ef8cf0
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Kylix\bytearray.rops | 04-20-2004 | 21:57:42 | | 157 | bc32e18
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Kylix\casetest.rops | 04-20-2004 | 21:57:42 | | 162 | f882dc71
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Kylix\exittest.rops | 04-20-2004 | 21:57:42 | | 145 | 877c07ad
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Kylix\fortest.rops | 04-20-2004 | 21:57:42 | | 117 | 786be752
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Kylix\if.rops | 04-20-2004 | 21:57:42 | | 131 | 3bac7a0e
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Kylix\importtest.rops | 04-20-2004 | 21:57:42 | | 188 | 8ad17bd8
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Kylix\longfortest.rops | 04-20-2004 | 21:57:42 | | 132 | f2f55245
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Kylix\rectest.rops | 04-20-2004 | 21:57:42 | | 168 | 95f5d1ea
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Kylix\vartype.rops | 04-20-2004 | 23:44:16 | | 273 | 8fa661e1
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Kylix\arraytest.rops | 04-20-2004 | 21:57:42 | | 313 | 6db1db30
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\Kylix\booleantest.rops | 04-20-2004 | 21:57:42 | | 303 | 1c2a740e
+Made Dir: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\TestApp
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\TestApp\fMain.dfm | 04-20-2004 | 21:57:42 | | 1232 | 72734836
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\TestApp\fMain.pas | 04-20-2004 | 21:57:42 | | 4048 | d11eb69e
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\TestApp\TestApplication.dpr | 04-20-2004 | 21:57:42 | | 239 | 2688dabc
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\TestApp\TestApplication.res | 04-20-2004 | 21:57:42 | | 22748 | 7b82a90a
+Made Dir: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\RemObjects SDK Client
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\RemObjects SDK Client\MegaDemo.RODL | 04-25-2004 | 18:02:16 | | 5125 | 48070b2a
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\RemObjects SDK Client\MegaDemo.rops | 04-25-2004 | 18:02:16 | | 2369 | fce045d7
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\RemObjects SDK Client\TestApplication.dpr | 04-25-2004 | 18:02:16 | | 239 | 2688dabc
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\RemObjects SDK Client\TestApplication.res | 04-25-2004 | 18:02:16 | | 22748 | 7b82a90a
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\RemObjects SDK Client\fMain.dfm | 04-25-2004 | 18:41:38 | | 1923 | 2def403d
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Samples\RemObjects SDK Client\fMain.pas | 04-25-2004 | 18:41:38 | | 4816 | e4ab80f4
+Made Dir: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Help
+File Copy: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Help\RegisterDelphiHelp.exe | 12-03-2003 | 20:26:00 | | 97280 | bd823b42
+RegDB Key: Software\RemObjects\Pascal Script
+RegDB Val: 1
+RegDB Name: Installed
+RegDB Root: 1
+RegDB Key: Software\RemObjects\Pascal Script
+RegDB Val: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi
+RegDB Name: InstallDir
+RegDB Root: 1
+RegDB Key: Software\RemObjects\Pascal Script
+RegDB Val: 5.0.30.691
+RegDB Name: Version
+RegDB Root: 1
+Shell Link: C:\Documents and Settings\Usuario\Menú Inicio\Programas\RemObjects Pascal Script\Unit Importer.lnk
+Link Info: C:\Archivos de programa\RemObjects Software\Pascal Script for Delphi\Bin\PSUnitImporter.exe | | | 0 | 1 | 0 |
+File Delete: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\Launch.exe
+Backup Copy: C:\Archivos de programa\RemObjects Software\Data Abstract for Delphi\BACKUP\Launch.exe
+RegDB Key: Software\Microsoft\Windows\CurrentVersion\Uninstall\Data Abstract 'Vinci' for Delphi
+RegDB Val: 5.0.30.691
+RegDB Name: DisplayVersion
+RegDB Root: 2
+RegDB Key: Software\Microsoft\Windows\CurrentVersion\Uninstall\Data Abstract 'Vinci' for Delphi
+RegDB Val: http://www.remobjects.com?da
+RegDB Name: HelpLink
+RegDB Root: 2
+RegDB Key: Software\Microsoft\Windows\CurrentVersion\Uninstall\Data Abstract 'Vinci' for Delphi
+RegDB Val: RemObjects Software
+RegDB Name: Publisher
+RegDB Root: 2
+RegDB Key: Software\Microsoft\Windows\CurrentVersion\Uninstall\Data Abstract 'Vinci' for Delphi
+RegDB Val: C:\Archivos de programa\RemObjects Software\Data Abstract (Common)\Bin\DASchemaModeler.exe,0
+RegDB Name: DisplayIcon
+RegDB Root: 2
+RegDB Key: Software\Microsoft\Windows\CurrentVersion\Uninstall\Data Abstract 'Vinci' for Delphi
+RegDB Val: RemObjects Data Abstract for Delphi
+RegDB Name: DisplayName
+RegDB Root: 2
+RegDB Old: Data Abstract 'Vinci' for Delphi
+User Rights: Admin
diff --git a/official/5.0.30.691/Data Abstract for Delphi/README.html b/official/5.0.30.691/Data Abstract for Delphi/README.html
new file mode 100644
index 0000000..ed4c57b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/README.html
@@ -0,0 +1,271 @@
+
+
+
+
Welcome to RemObjects Data Abstract™ 'Vinci' for Delphi (5.0.29).
+
+
+ Thank you for your interest in our products and for choosing Data Abstract for Delphi.
+
+
+
+ Our goal with Data Abstract is to provide you with the best, easiest and most
+ flexible database and multi-tier framework available for Delphi and other platforms.
+
+
+
+ We will continue to improve Data Abstract (DA for short) over time and these improvements will be available to you as part of your subscription. Please make sure that your subscription
+ stays active to ensure continued access to the latest release to be sure you have
+ the most recent fixes and new features.
+
+
+
+ Please check our website
+ regularly to keep your product up to date with the latest additions. In particular, see the change log for details of recent changes to the product.
+
+
+ The following README contains a few guidelines that you should follow in order to install and get started with Data Abstract.
+
+
+
+
TRIAL Version & RemObjects SDK
+
+ Data Abstract relies on RemObjects SDK. To use the trial version of Data Abstract, you must have the exact matching version of
+ RemObjects SDK (either the trial or full version) installed, and not have made any manual modifications to the RemObjects SDK library code.
+
+
+
TRIAL Version & Third Party Data Access
+
+ The trial version currently does not include support for static linking of the third party database
+ drivers (such as SDAC, ODAC and IBO) provided with Data Abstract. Dynamic driver libraries (.dad files) are provided.
+
+
+
TRIAL Version Requirements
+
+ The following requirements must be met for the trial version:
+
+
+ Delphi 2007 for Win32
+
+
+ Note: the DBX driver is not available for the trial version.
+
Delphi 2006
+
+
+ Update Pack 2 required.
+
+
+
Delphi 7
+
+
+ No updates required.
+
+
+
Delphi 6
+
+ Update Pack 2
+ RTL Update Pack 2
+ RTL Update Pack 3
+
+
+ Please note that these requirements are for the TRIAL version only. Since the retail version comes with full source,
+ you can easily rebuild it to match whatever exact version of Delphi you have installed, by opening the
+ BuildPackages_Dx.bpg project group and doing a Build All Projects.
+
+
+
+Package Installation
+
+The current Data Abstract comes separated into several individual packages; these packages are provided
+in versions for Delphi 6, 7, 2006 and 2007 for Win32.
+
+These packages are:
+
+ DataAbstract_Core_Dx.bpl
+ DataAbstract_IDE_Dx.bpl
+
+
+ As well as several Data Abstract driver packages for ADO, dbExpress, InterBase Express.
+
+
+ Installation in Delphi 6, Delphi 7, Delphi 2006 and Delphi 2007 for Win32
+
+ The RO setup will install prebuilt versions of the packages in the Delphi 6, 7,
+ 2006 and 2007 IDEs.
+
+
+ If you have a custom version of IBX (such as the version 6.5/7.5 that comes with InterBase 7) downloaded and installed to
+ replace the default IBX, loading of this package will most likely fail when you launch Delphi for the first time after installing RO.
+ If this is happens, you will need to manually rebuild the IBX driver package to match your specific IBX version, by opening
+ the DataAbstract_IBXDriver_D6.dpk, DataAbstract_IBXDriver_D7.dpk or DataAbstract_IBXDriver_D9.bdsproj in the IDE and then building and installing it.
+
+
+Free Pascal (FPC)
+
+ The current release of Data Abstract 'Vinci' for Delphi provides library support for Free Pascal 2.1.4 and above, allowing you to rebuild your
+ projects for the Win32 (x86), Win64 (x64), Linux (x86 and x64) platforms. Compilation against other platforms provided by FPC might be possible,
+ but is not currently supported; however, we are interested in your feedback if you do try to build against other platforms.
+
+
+ Official support for other platforms, as well as support for the Lazarus IDE, is under review for future releases.
+
+
+ The minimum version of FPC required is Free Pascal 2.1.4 or newer (which can be downloaded here ). Please note that we explicitly do not support the 2.0.x release, as it is missing crucial functionality.
+
+
+ More information about Free Pascal can be found on the FPC homepage at http://www.freepascal.org ;
+ please also read http://www.remobjects.com?fpc for more details.
+
+Limitations of Free Pascal Support
+
+ At the time of this release, only the new ZEOS database driver is supported for Free Pascal, as the underlying components for all the other drivers
+ are not supported for Free Pascal by Borland/CodeGear or the third party vendors. Please contact the third party component vendors directly to
+ inquire about support for FPC in future versions of their components.
+
+
+
+
License File
+
+ To avoid piracy and abuse, the Data Abstract Install contains a time-limited license for Schema Modeler and Service Builder, which will
+ expire after 30 days of use.
+
+
+ You will be prompted to download your personal license file when you start Schema Modeler or Service Builder for the first time; you can choose to either download your own license file right away,
+ or keep working with the trial license until such a time when the download is more convenient for you.
+ Alternatively, it's possible to download it directly from
+ http://www.remobjects.com/myro .
+
+
+
+
+ Note for users migrating from version 3 or below
+
+ Later versions of Data Abstract for Delphi provide two modes for server applications. For backward compatibility, it provides the server interface you already know from version 3.0, thus allowing you to rebuild your existing server applications with only minimal changes. In addition though, a new service interface is provided matching the .NET edition that streamlines data access further, thus simplifying development of cross platform client/server solutions.
+ See the DA26 article for full details, including the steps needed to upgrade version 3 applications directly to 'Vinci' (version 5).
+
+
+ To aid your conversion, we ship a tool to create Remote Data Adapters from your
+ existing code (also described by DA26 ). You can find the DAConverter
+ tool at: C:\Program Files\RemObjects Software\Data Abstract (Common)\Bin .
+
+ Note for users migrating from version 4
+
+ Data Abstract 'Vinci' employs the version 4 architecture, so there are no actual
+ upgrade requirements. However, you may well wish to upgrade your applications to
+ use the new TDAMemDataTable and TDABin2DataStreamer
+ components. The DAConverter tool described above (see DA26 also)
+ has been extended to do this as well (and will accept version 3 and version 4 project
+ files).
+
+Sample Projects
+
+ A number of sample projects are included in the \Samples folder of your Data Abstract install. These sample projects
+ will show you how to get started and how to use the various functions of Data Abstract.
+
+ A detailed overview of the available samples can be found in the
+ Samples.html file provided.
+
+
+ For BDS2006 and later, after the first start of the Visual Studio IDE, the Welcome
+ Page for Data Abstract will be presented, giving you the option to directly open
+ any of the samples provided.
+
+
+Support
+
+ Support for Data Abstract is available via our newsgroups at
+ remobjects.public.dataabstract.delphi .
+
+ You can use these newsgroups to report any problems or suggestions you might have in regards to Data Abstract, you can communicate with fellow Data Abstract users and exchange ideas and solutions.
+
+
+ Please also make sure to check out our extensive Online Help to get started with Data Abstract; the online help is available integrated into the Delphi Help and also as a standalone .HLP help file.
+
+
+ More information about our support offerings, including the Premium Support subscription,
+ can be found at http://www.remobjects.com/support .
+
+
+ Known Issues in this Release
+
+
+ While we try our best to get all known issues fixed and addressed for each build,
+ sometimes less
+ important issues need to be deferred for later releases in favor
+ for getting a version released. Please check our list of known issues for
+ any known problems with the current release
+
+
+
+
+Where to go from here
+
+ To get started using Data Abstract, please visit our new Developer Center available
+ at
+ http://www.remobjects.com/devcenter/da .
+
+
+DevCenter provides hands-on developer resources such as articles (see article roadmap:
+ DA00 ),
+ videos and FAQs
+ about all our products, including Data Abstract, and is the central
+ hub for all developer-oriented information about our products.
+
+
+Thank You
+
+ Let us thank you again for choosing Data Abstract. We are confident that you
+ will find it to be a worthwhile addition to your development toolset.
+
+
+ Should you, at any time, encounter a problem or need assistance using Data Abstract, please feel free to ask on the newsgroups
+ or contact us directly via email at support@remobjects.com .
+
+
+
+
+Best Regards,
+
+The RemObjects Team
+
+http://www.remobjects.com
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModel.Sample.html b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModel.Sample.html
new file mode 100644
index 0000000..3698485
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModel.Sample.html
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+ Briefcase model sample
+
+
+
+Purpose
+
+ This example shows how to create a briefcase model using a Data Abstract Client.
+
+Getting Started
+
+
+ Launch the Server.
+ Launch the Client.
+ The first time the server runs it will ask to fetch the data, else it will load it from disk.
+ Make some changes to the records. Close the client.
+ Re-open the client and the changes will still be there.
+ Pressing Apply Updates will send the changes back to the server.
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModel.bdsgroup b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModel.bdsgroup
new file mode 100644
index 0000000..1bf8297
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModel.bdsgroup
@@ -0,0 +1,20 @@
+
+
+
+
+ Default.Personality
+
+ 1.0
+ {DC65E2DF-E6C9-4410-9486-4F175607B752}
+
+
+
+
+
+ BriefcaseModelServer.bdsproj
+ BriefcaseModelClient.bdsproj
+ BriefcaseModelServer.exe BriefcaseModelClient.exe
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModel.bpg b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModel.bpg
new file mode 100644
index 0000000..ef89764
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModel.bpg
@@ -0,0 +1,23 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = BriefcaseModelServer.exe BriefcaseModelClient.exe
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+BriefcaseModelServer.exe: BriefcaseModelServer.dpr
+ $(DCC)
+
+BriefcaseModelClient.exe: BriefcaseModelClient.dpr
+ $(DCC)
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModel.groupproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModel.groupproj
new file mode 100644
index 0000000..25568d5
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModel.groupproj
@@ -0,0 +1,40 @@
+
+
+ {8aedcb5a-78e5-4e85-8261-093aa6a47a12}
+
+
+
+
+ Default.Personality
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelClient.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelClient.bdsproj
new file mode 100644
index 0000000..e3d7939
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelClient.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {A812C417-01F7-4D10-80C0-3FAC762998EA}
+
+
+
+
+ BriefcaseModelClient.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelClient.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelClient.dpr
new file mode 100644
index 0000000..71bcbd6
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelClient.dpr
@@ -0,0 +1,19 @@
+program BriefcaseModelClient;
+
+uses
+ uROComInit,
+ Forms,
+ MidasLib,
+ BriefcaseModelClientMain in 'BriefcaseModelClientMain.pas' {BriefcaseModelClientMainForm},
+ BriefcaseModelClientData in 'BriefcaseModelClientData.pas' {BriefcaseModelClientDataModule: TDAClientDataModule},
+ BriefcaseModelClientChanges in 'BriefcaseModelClientChanges.pas' {BriefcaseModelClientChangesForm};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'Briefcase Model Client';
+ Application.CreateForm(TBriefcaseModelClientDataModule, BriefcaseModelClientDataModule);
+ Application.CreateForm(TBriefcaseModelClientMainForm, BriefcaseModelClientMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelClient.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelClient.dproj
new file mode 100644
index 0000000..0d29ec6
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelClient.dproj
@@ -0,0 +1,78 @@
+
+
+ {bbc1c7e0-ae64-480d-a016-c817f7590577}
+ BriefcaseModelClient.dpr
+ Debug
+ AnyCPU
+ DCC32
+ BriefcaseModelClient.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ BriefcaseModelClient.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelClient.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelClient.res
new file mode 100644
index 0000000..da01de5
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelClient.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelClientChanges.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelClientChanges.dfm
new file mode 100644
index 0000000..33a5545
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelClientChanges.dfm
@@ -0,0 +1,62 @@
+object BriefcaseModelClientChangesForm: TBriefcaseModelClientChangesForm
+ Left = 108
+ Top = 133
+ AutoScroll = False
+ Caption = 'Changes'
+ ClientHeight = 352
+ ClientWidth = 405
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Splitter1: TSplitter
+ Left = 0
+ Top = 123
+ Width = 405
+ Height = 8
+ Cursor = crVSplit
+ Align = alBottom
+ Beveled = True
+ end
+ object ListView: TListView
+ Left = 0
+ Top = 131
+ Width = 405
+ Height = 221
+ Align = alBottom
+ Columns = <
+ item
+ Caption = 'Name'
+ Width = 200
+ end
+ item
+ Caption = 'Old value'
+ Width = 100
+ end
+ item
+ Caption = 'New value'
+ Width = 100
+ end>
+ OwnerData = True
+ ReadOnly = True
+ RowSelect = True
+ TabOrder = 0
+ ViewStyle = vsReport
+ OnData = ListViewData
+ end
+ object ListBox: TListBox
+ Left = 0
+ Top = 0
+ Width = 405
+ Height = 123
+ Align = alClient
+ ItemHeight = 13
+ TabOrder = 1
+ OnClick = ListBoxClick
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelClientChanges.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelClientChanges.pas
new file mode 100644
index 0000000..5218501
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelClientChanges.pas
@@ -0,0 +1,115 @@
+unit BriefcaseModelClientChanges;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, StdCtrls, ExtCtrls, ComCtrls;
+
+type
+ TBriefcaseModelClientChangesForm = class(TForm)
+ ListView: TListView;
+ Splitter1: TSplitter;
+ ListBox: TListBox;
+ procedure ListBoxClick(Sender: TObject);
+ procedure ListViewData(Sender: TObject; Item: TListItem);
+ private
+ { Private declarations }
+ procedure SetupListview;
+ procedure Setup;
+ public
+ { Public declarations }
+
+ end;
+
+var
+ BriefcaseModelClientChangesForm: TBriefcaseModelClientChangesForm;
+
+procedure ShowChanges;
+implementation
+uses
+ uDADelta, BriefcaseModelClientData, uDAInterfaces;
+
+{$R *.dfm}
+
+procedure ShowChanges;
+begin
+ with TBriefcaseModelClientChangesForm.Create(Application) do try
+ Setup;
+ if ListBox.Count = 0 then Exit;
+ ShowModal;
+ finally
+ Release;
+ end;
+end;
+
+procedure TBriefcaseModelClientChangesForm.ListBoxClick(Sender: TObject);
+begin
+ SetupListView;
+end;
+
+procedure TBriefcaseModelClientChangesForm.SetupListview;
+begin
+ ListView.Items.Count := 0;
+ if ListBox.ItemIndex = -1 then Exit;
+ ListView.Items.Count := TDADeltaChange(Listbox.Items.Objects[ListBox.ItemIndex]).Delta.LoggedFieldCount;
+end;
+
+procedure TBriefcaseModelClientChangesForm.ListViewData(Sender: TObject;
+ Item: TListItem);
+var
+ DeltaChange: TDADeltaChange;
+begin
+ if (Item = nil) or (Item.Index >= ListView.Items.Count) then Exit;
+ DeltaChange := TDADeltaChange(Listbox.Items.Objects[ListBox.ItemIndex]);
+ Item.Caption := DeltaChange.Delta.LoggedFieldNames[Item.Index];
+ if DeltaChange.ChangeType <> ctInsert then
+ Item.SubItems.Add(VarToStr(DeltaChange.OldValueByName[Item.Caption]))
+ else
+ Item.SubItems.Add('');
+ if DeltaChange.ChangeType <> ctDelete then
+ Item.SubItems.Add(VarToStr(DeltaChange.NewValueByName[Item.Caption]))
+ else
+ Item.SubItems.Add('');
+end;
+
+procedure TBriefcaseModelClientChangesForm.Setup;
+
+ procedure AddDelta(Delta: IDADelta);
+ var
+ str: string;
+ i, j: integer;
+ begin
+ for i := 0 to Delta.Count - 1 do
+ with Delta.Changes[i] do begin
+ case ChangeType of
+ ctInsert: str := '[New]';
+ ctUpdate: str := '[Update]';
+ ctDelete: str := '[Delete]';
+ end;
+ str := str + ' ' + Delta.LogicalName + ': ';
+ for j := 0 to delta.KeyFieldCount - 1 do begin
+ if ChangeType = ctDelete then
+ str := str + VarToStr(OldValueByName[delta.KeyFieldNames[j]]) + ','
+ else
+ str := str + VarToStr(NewValueByName[delta.KeyFieldNames[j]]) + ','
+ end;
+ if delta.KeyFieldCount > 0 then SetLength(Str, Length(str) - 1);
+ ListBox.Items.AddObject(str, Delta.Changes[i]);
+ end;
+ end;
+
+begin
+ ListBox.Items.Clear;
+ with BriefcaseModelClientDataModule do begin
+ if tbl_Customers.DeltaInitialized then AddDelta(tbl_Customers.Delta);
+ if tbl_Orders.DeltaInitialized then AddDelta(tbl_Orders.Delta);
+ end;
+ if ListBox.Count > 0 then begin
+ ListBox.ItemIndex := 0;
+ ListBoxClick(ListBox);
+ end;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelClientData.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelClientData.dfm
new file mode 100644
index 0000000..fee315d
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelClientData.dfm
@@ -0,0 +1,383 @@
+object BriefcaseModelClientDataModule: TBriefcaseModelClientDataModule
+ OldCreateOrder = True
+ Left = 126
+ Top = 134
+ Height = 300
+ Width = 300
+ object Channel: TROWinInetHTTPChannel
+ ServerLocators = <>
+ DispatchOptions = []
+ UserAgent = 'RemObjects SDK'
+ TargetURL = 'http://localhost:8099/BIN'
+ Left = 40
+ Top = 8
+ end
+ object Message: TROBinMessage
+ Left = 40
+ Top = 52
+ end
+ object RemoteService: TRORemoteService
+ Message = Message
+ Channel = Channel
+ ServiceName = 'BriefcaseModelService'
+ Left = 40
+ Top = 96
+ end
+ object DataStreamer: TDABinDataStreamer
+ Left = 40
+ Top = 140
+ end
+ object RemoteDataAdapter: TDARemoteDataAdapter
+ GetSchemaCall.RemoteService = RemoteService
+ GetDataCall.RemoteService = RemoteService
+ UpdateDataCall.RemoteService = RemoteService
+ GetScriptsCall.RemoteService = RemoteService
+ RemoteService = RemoteService
+ DataStreamer = DataStreamer
+ Left = 40
+ Top = 184
+ end
+ object tbl_Customers: TDACDSDataTable
+ RemoteUpdatesOptions = []
+ Fields = <
+ item
+ Name = 'CustomerID'
+ DataType = datWideString
+ Size = 5
+ BlobType = dabtUnknown
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CompanyName'
+ DataType = datWideString
+ Size = 40
+ BlobType = dabtUnknown
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ContactName'
+ DataType = datWideString
+ Size = 30
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ContactTitle'
+ DataType = datWideString
+ Size = 30
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Address'
+ DataType = datWideString
+ Size = 60
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'City'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Region'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'PostalCode'
+ DataType = datWideString
+ Size = 10
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Country'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Phone'
+ DataType = datWideString
+ Size = 24
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Fax'
+ DataType = datWideString
+ Size = 24
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ Params = <>
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteDataAdapter = RemoteDataAdapter
+ ReadOnly = False
+ LocalDataStreamer = DataStreamer
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ LogicalName = 'Customers'
+ IndexDefs = <>
+ Left = 184
+ Top = 144
+ end
+ object ds_Customers: TDADataSource
+ DataSet = tbl_Customers.Dataset
+ DataTable = tbl_Customers
+ Left = 136
+ Top = 144
+ end
+ object tbl_Orders: TDACDSDataTable
+ RemoteUpdatesOptions = []
+ Fields = <
+ item
+ Name = 'OrderID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ LogChanges = False
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CustomerID'
+ DataType = datWideString
+ Size = 5
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'EmployeeID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'OrderDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'RequiredDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShippedDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipVia'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Freight'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DefaultValue = '0'
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipName'
+ DataType = datWideString
+ Size = 40
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipAddress'
+ DataType = datWideString
+ Size = 60
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipCity'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipRegion'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipPostalCode'
+ DataType = datWideString
+ Size = 10
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipCountry'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ Params = <>
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteDataAdapter = RemoteDataAdapter
+ ReadOnly = False
+ LocalDataStreamer = DataStreamer
+ MasterSource = ds_Customers
+ MasterFields = 'CustomerID'
+ DetailFields = 'CustomerID'
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ LogicalName = 'Orders'
+ IndexDefs = <>
+ Left = 184
+ Top = 192
+ end
+ object ds_Orders: TDADataSource
+ DataSet = tbl_Orders.Dataset
+ DataTable = tbl_Orders
+ Left = 136
+ Top = 192
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelClientData.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelClientData.pas
new file mode 100644
index 0000000..e206cde
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelClientData.pas
@@ -0,0 +1,36 @@
+unit BriefcaseModelClientData;
+
+interface
+
+uses
+ {vcl:} SysUtils, Classes, DB, DBClient,
+ {RemObjects:} uROClient, uROClientIntf, uRORemoteService, uROBinMessage, uROWinInetHTTPChannel,
+ {Data Abstract:} uDADataTable, uDABINAdapter, uDAInterfaces,
+ uDADataStreamer, uDARemoteDataAdapter, uDAScriptingProvider,
+ uDACDSDataTable, uDAClasses;
+
+type
+ TBriefcaseModelClientDataModule = class(TDataModule)
+ Message: TROBinMessage;
+ Channel: TROWinInetHTTPChannel;
+ RemoteService: TRORemoteService;
+ DataStreamer: TDABinDataStreamer;
+ RemoteDataAdapter: TDARemoteDataAdapter;
+ tbl_Customers: TDACDSDataTable;
+ ds_Customers: TDADataSource;
+ tbl_Orders: TDACDSDataTable;
+ ds_Orders: TDADataSource;
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ BriefcaseModelClientDataModule: TBriefcaseModelClientDataModule;
+
+implementation
+
+{$R *.dfm}
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelClientMain.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelClientMain.dfm
new file mode 100644
index 0000000..98a5a1d
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelClientMain.dfm
@@ -0,0 +1,135 @@
+object BriefcaseModelClientMainForm: TBriefcaseModelClientMainForm
+ Left = 85
+ Top = 124
+ AutoScroll = False
+ Caption = 'Briefcase Model Client'
+ ClientHeight = 398
+ ClientWidth = 567
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnClose = FormClose
+ OnCreate = FormCreate
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Splitter1: TSplitter
+ Left = 0
+ Top = 215
+ Width = 567
+ Height = 5
+ Cursor = crVSplit
+ Align = alBottom
+ Beveled = True
+ end
+ object Panel1: TPanel
+ Left = 0
+ Top = 0
+ Width = 567
+ Height = 34
+ Align = alTop
+ TabOrder = 0
+ object OpenButton: TButton
+ Left = 10
+ Top = 7
+ Width = 90
+ Height = 22
+ Caption = 'Fetch Data'
+ TabOrder = 0
+ OnClick = OpenButtonClick
+ end
+ object ApplyUpdateButton: TButton
+ Left = 101
+ Top = 7
+ Width = 90
+ Height = 22
+ Action = ApplyUpdateAction
+ TabOrder = 1
+ end
+ object DiscardChangesButton: TButton
+ Left = 192
+ Top = 7
+ Width = 90
+ Height = 22
+ Action = DiscardChangesAction
+ TabOrder = 2
+ end
+ object ShowChangesButton: TButton
+ Left = 283
+ Top = 7
+ Width = 90
+ Height = 22
+ Action = ShowChangesAction
+ TabOrder = 3
+ end
+ end
+ object gCustomers: TDBGrid
+ Left = 0
+ Top = 59
+ Width = 567
+ Height = 156
+ Align = alClient
+ DataSource = BriefcaseModelClientDataModule.ds_Customers
+ TabOrder = 1
+ TitleFont.Charset = DEFAULT_CHARSET
+ TitleFont.Color = clWindowText
+ TitleFont.Height = -11
+ TitleFont.Name = 'MS Sans Serif'
+ TitleFont.Style = []
+ end
+ object gOrders: TDBGrid
+ Left = 0
+ Top = 220
+ Width = 567
+ Height = 153
+ Align = alBottom
+ DataSource = BriefcaseModelClientDataModule.ds_Orders
+ TabOrder = 2
+ TitleFont.Charset = DEFAULT_CHARSET
+ TitleFont.Color = clWindowText
+ TitleFont.Height = -11
+ TitleFont.Name = 'MS Sans Serif'
+ TitleFont.Style = []
+ end
+ object dbnCustomers: TDBNavigator
+ Left = 0
+ Top = 34
+ Width = 567
+ Height = 25
+ DataSource = BriefcaseModelClientDataModule.ds_Customers
+ Align = alTop
+ TabOrder = 3
+ end
+ object dbnOrders: TDBNavigator
+ Left = 0
+ Top = 373
+ Width = 567
+ Height = 25
+ DataSource = BriefcaseModelClientDataModule.ds_Orders
+ Align = alBottom
+ TabOrder = 4
+ end
+ object ActionList1: TActionList
+ Left = 337
+ Top = 87
+ object ApplyUpdateAction: TAction
+ Caption = 'Apply update'
+ OnExecute = ApplyUpdateButtonClick
+ OnUpdate = ApplyUpdateActionUpdate
+ end
+ object DiscardChangesAction: TAction
+ Caption = 'Discard changes'
+ OnExecute = DiscardChangesButtonClick
+ OnUpdate = ApplyUpdateActionUpdate
+ end
+ object ShowChangesAction: TAction
+ Caption = 'Show changes'
+ OnExecute = ShowChangesButtonClick
+ OnUpdate = ApplyUpdateActionUpdate
+ end
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelClientMain.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelClientMain.pas
new file mode 100644
index 0000000..6b421d5
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelClientMain.pas
@@ -0,0 +1,140 @@
+unit BriefcaseModelClientMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
+ uROClient, uROClientIntf, uRORemoteService, uROBinMessage, ExtCtrls,
+ DBCtrls, Grids, DBGrids, ActnList;
+
+type
+ TBriefcaseModelClientMainForm = class(TForm)
+ Panel1: TPanel;
+ gCustomers: TDBGrid;
+ gOrders: TDBGrid;
+ dbnCustomers: TDBNavigator;
+ dbnOrders: TDBNavigator;
+ Splitter1: TSplitter;
+ OpenButton: TButton;
+ ApplyUpdateButton: TButton;
+ DiscardChangesButton: TButton;
+ ShowChangesButton: TButton;
+ ActionList1: TActionList;
+ ApplyUpdateAction: TAction;
+ DiscardChangesAction: TAction;
+ ShowChangesAction: TAction;
+ procedure ApplyUpdateButtonClick(Sender: TObject);
+ procedure FormClose(Sender: TObject; var Action: TCloseAction);
+ procedure FormCreate(Sender: TObject);
+ procedure OpenButtonClick(Sender: TObject);
+ procedure DiscardChangesButtonClick(Sender: TObject);
+ procedure ShowChangesButtonClick(Sender: TObject);
+ procedure ApplyUpdateActionUpdate(Sender: TObject);
+ private
+ { Private declarations }
+ procedure Load;
+ procedure Save;
+ procedure FetchData;
+ public
+ { Public declarations }
+ end;
+
+var
+ BriefcaseModelClientMainForm: TBriefcaseModelClientMainForm;
+
+implementation
+
+uses
+ BriefcaseModelClientData, uDADataTable, BriefcaseModelClientChanges;
+
+{$R *.dfm}
+
+procedure TBriefcaseModelClientMainForm.ApplyUpdateButtonClick(Sender: TObject);
+begin
+ BriefcaseModelClientDataModule.RemoteDataAdapter.ApplyUpdates([BriefcaseModelClientDataModule.tbl_Customers]);
+end;
+
+procedure TBriefcaseModelClientMainForm.Load;
+
+ function loadTable(ATable: TDADataTable): Boolean;
+ var
+ aFileName: string;
+ begin
+ aFileName := ExtractFilePath(Application.ExeName) + ATable.LogicalName + '.table';
+ if FileExists(aFileName) then begin
+ aTable.LoadFromFile(aFileName);
+ Result := True;
+ end else
+ Result := False;
+ end;
+
+begin
+ if not loadTable(BriefcaseModelClientDataModule.tbl_Customers) or not loadTable(BriefcaseModelClientDataModule.tbl_Orders) then begin
+ if MessageDlg('No data table files could be found, do you want to fetch the data from the server?', mtConfirmation, [mbYes, mbNo], 0) = idYes then begin
+ FetchData;
+ end;
+ end;
+end;
+
+procedure TBriefcaseModelClientMainForm.Save;
+
+ procedure SaveTable(ATable: TDADataTable);
+ begin
+ with ATable do
+ if active then
+ SaveToFile(ExtractFilePath(Application.ExeName) + LogicalName + '.table');
+ end;
+
+begin
+ with BriefcaseModelClientDataModule do begin
+ SaveTable(tbl_Customers);
+ SaveTable(tbl_Orders);
+ end;
+end;
+
+procedure TBriefcaseModelClientMainForm.FormClose(Sender: TObject; var Action: TCloseAction);
+begin
+ Save;
+end;
+
+procedure TBriefcaseModelClientMainForm.FormCreate(Sender: TObject);
+begin
+ Load;
+end;
+
+procedure TBriefcaseModelClientMainForm.OpenButtonClick(Sender: TObject);
+begin
+ FetchData;
+end;
+
+procedure TBriefcaseModelClientMainForm.FetchData;
+begin
+ BriefcaseModelClientDataModule.tbl_Orders.close;
+ BriefcaseModelClientDataModule.tbl_Customers.close;
+ BriefcaseModelClientDataModule.RemoteDataAdapter.Fill([BriefcaseModelClientDataModule.tbl_Customers,
+ BriefcaseModelClientDataModule.tbl_Orders], true, false);
+end;
+
+procedure TBriefcaseModelClientMainForm.DiscardChangesButtonClick(Sender: TObject);
+begin
+ with BriefcaseModelClientDataModule do begin
+ tbl_Customers.CancelUpdates;
+ end;
+end;
+
+procedure TBriefcaseModelClientMainForm.ShowChangesButtonClick(Sender: TObject);
+begin
+ ShowChanges;
+end;
+
+procedure TBriefcaseModelClientMainForm.ApplyUpdateActionUpdate(
+ Sender: TObject);
+begin
+ with BriefcaseModelClientDataModule do
+ TAction(Sender).Enabled :=
+ (tbl_Customers.DeltaInitialized) and ((tbl_Customers.Delta.Count > 0)) or
+ (tbl_Orders.DeltaInitialized) and ((tbl_Orders.Delta.Count > 0))
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelLibrary.rodl b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelLibrary.rodl
new file mode 100644
index 0000000..4c957b1
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelLibrary.rodl
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelLibrary_Intf.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelLibrary_Intf.pas
new file mode 100644
index 0000000..48b30f5
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelLibrary_Intf.pas
@@ -0,0 +1,77 @@
+unit BriefcaseModelLibrary_Intf;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROClasses, uROClient, uROTypes, uROClientIntf,
+ {Used RODLs:} DataAbstract4_Intf;
+
+const
+ { Library ID }
+ LibraryUID = '{0C6D69E2-2FEC-49FE-B07B-EE237D69F422}';
+ TargetNamespace = '';
+
+ { Service Interface ID's }
+ IBriefcaseModelService_IID : TGUID = '{DF3E1E54-2924-4DE3-9834-4B225408D09F}';
+
+ { Event ID's }
+
+type
+ { Forward declarations }
+ IBriefcaseModelService = interface;
+
+
+
+
+ { IBriefcaseModelService }
+ IBriefcaseModelService = interface(IDataAbstractService)
+ ['{DF3E1E54-2924-4DE3-9834-4B225408D09F}']
+ end;
+
+ { CoBriefcaseModelService }
+ CoBriefcaseModelService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IBriefcaseModelService;
+ end;
+
+ { TBriefcaseModelService_Proxy }
+ TBriefcaseModelService_Proxy = class(TDataAbstractService_Proxy, IBriefcaseModelService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ end;
+
+implementation
+
+uses
+ {vcl:} SysUtils,
+ {RemObjects:} uROEventRepository, uRORes;
+
+{ CoBriefcaseModelService }
+
+class function CoBriefcaseModelService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IBriefcaseModelService;
+begin
+ result := TBriefcaseModelService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+function TBriefcaseModelService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'BriefcaseModelService';
+end;
+
+initialization
+ RegisterProxyClass(IBriefcaseModelService_IID, TBriefcaseModelService_Proxy);
+
+
+finalization
+ UnregisterProxyClass(IBriefcaseModelService_IID);
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelLibrary_Invk.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelLibrary_Invk.pas
new file mode 100644
index 0000000..34ea4df
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelLibrary_Invk.pas
@@ -0,0 +1,32 @@
+unit BriefcaseModelLibrary_Invk;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes,
+ {RemObjects:} uROServer, uROServerIntf, uROTypes, uROClientIntf,
+ {Used RODL Intf's:} DataAbstract4_Intf,
+ {Used RODL Invk's:} DataAbstract4_Invk,
+ {Generated:} BriefcaseModelLibrary_Intf;
+
+type
+ TBriefcaseModelService_Invoker = class(TDataAbstractService_Invoker)
+ private
+ protected
+ published
+ end;
+
+implementation
+
+uses
+ {RemObjects:} uRORes, uROClient;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelServer.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelServer.bdsproj
new file mode 100644
index 0000000..bf8e10d
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelServer.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {814985E4-2D7E-4B43-B1B8-2C026284B033}
+
+
+
+
+ BriefcaseModelServer.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelServer.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelServer.dpr
new file mode 100644
index 0000000..715dd7e
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelServer.dpr
@@ -0,0 +1,24 @@
+program BriefcaseModelServer;
+
+{#ROGEN:BriefcaseModelLibrary.RODL} // RemObjects SDK: Careful, do not remove!
+
+uses
+ uROComInit,
+ uROComboService,
+ Forms,
+ BriefcaseModelServerMain in 'BriefcaseModelServerMain.pas' {BriefcaseModelServerMainForm},
+ BriefcaseModelServerData in 'BriefcaseModelServerData.pas' {BriefcaseModelServerDataModule: TDataModule},
+ BriefcaseModelLibrary_Intf in 'BriefcaseModelLibrary_Intf.pas',
+ BriefcaseModelLibrary_Invk in 'BriefcaseModelLibrary_Invk.pas',
+ BriefcaseModelService_Impl in 'BriefcaseModelService_Impl.pas' {BriefcaseModelService: TDataAbstractService};
+
+{$R *.res}
+{$R RODLFile.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'Briefcase Model Server';
+ Application.CreateForm(TBriefcaseModelServerDataModule, BriefcaseModelServerDataModule);
+ Application.CreateForm(TBriefcaseModelServerMainForm, BriefcaseModelServerMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelServer.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelServer.dproj
new file mode 100644
index 0000000..7a42c8d
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelServer.dproj
@@ -0,0 +1,80 @@
+
+
+ {55d87c1e-5021-4276-a4c8-aef5b2fb31d9}
+ BriefcaseModelServer.dpr
+ Debug
+ AnyCPU
+ DCC32
+ BriefcaseModelServer.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ BriefcaseModelServer.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelServer.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelServer.res
new file mode 100644
index 0000000..7455d6e
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelServer.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelServerData.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelServerData.dfm
new file mode 100644
index 0000000..e6fc791
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelServerData.dfm
@@ -0,0 +1,60 @@
+object BriefcaseModelServerDataModule: TBriefcaseModelServerDataModule
+ OldCreateOrder = False
+ OnCreate = DataModuleCreate
+ Left = 226
+ Top = 160
+ Height = 207
+ Width = 352
+ object Server: TROIndyHTTPServer
+ Dispatchers = <
+ item
+ Name = 'Message'
+ Message = Message
+ Enabled = True
+ PathInfo = 'Bin'
+ end>
+ Port = 8099
+ Left = 32
+ Top = 8
+ end
+ object Message: TROBinMessage
+ Left = 32
+ Top = 56
+ end
+ object ConnectionManager: TDAConnectionManager
+ Connections = <
+ item
+ Name = 'Northwind'
+ ConnectionString =
+ 'ADO?AuxDriver=SQLOLEDB.1;Server=localhost;Database=Northwind;Int' +
+ 'egrated Security=SSPI'
+ Description = 'Microsoft SQL Server 2000, localhost'
+ Default = True
+ Tag = 0
+ end>
+ DriverManager = DriverManager
+ PoolingEnabled = True
+ Left = 136
+ Top = 56
+ end
+ object DriverManager: TDADriverManager
+ DriverDirectory = '%SYSTEM%\'
+ TraceActive = False
+ TraceFlags = []
+ Left = 136
+ Top = 10
+ end
+ object ADODriver: TDAADODriver
+ Left = 256
+ Top = 8
+ end
+ object DataDictionary: TDADataDictionary
+ Fields = <>
+ Left = 32
+ Top = 104
+ end
+ object SessionManager: TROInMemorySessionManager
+ Left = 136
+ Top = 104
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelServerData.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelServerData.pas
new file mode 100644
index 0000000..dcd422e
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelServerData.pas
@@ -0,0 +1,41 @@
+unit BriefcaseModelServerData;
+
+interface
+
+uses
+ SysUtils, Classes,
+ uROClient, uROPoweredByRemObjectsButton, uROClientIntf, uROServer,
+ uROBinMessage, uROIndyHTTPServer,
+ uDAEngine, uDADriverManager, uDAClasses, uROSessions,
+ uDAADODriver, uROIndyTCPServer;
+
+type
+ TBriefcaseModelServerDataModule = class(TDataModule)
+ Server: TROIndyHTTPServer;
+ Message: TROBinMessage;
+ ConnectionManager: TDAConnectionManager;
+ DriverManager: TDADriverManager;
+ ADODriver: TDAADODriver;
+ SessionManager: TROInMemorySessionManager;
+ DataDictionary: TDADataDictionary;
+
+ procedure DataModuleCreate(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ BriefcaseModelServerDataModule: TBriefcaseModelServerDataModule;
+
+implementation
+
+{$R *.dfm}
+
+procedure TBriefcaseModelServerDataModule.DataModuleCreate(Sender: TObject);
+begin
+ Server.Active := true;
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelServerMain.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelServerMain.dfm
new file mode 100644
index 0000000..93afb00
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelServerMain.dfm
@@ -0,0 +1,25 @@
+object BriefcaseModelServerMainForm: TBriefcaseModelServerMainForm
+ Left = 185
+ Top = 138
+ BorderStyle = bsDialog
+ Caption = 'Briefcase Model Server'
+ ClientHeight = 64
+ ClientWidth = 228
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ PixelsPerInch = 96
+ TextHeight = 13
+ object DAPoweredByDataAbstractButton1: TDAPoweredByDataAbstractButton
+ Left = 8
+ Top = 8
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelServerMain.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelServerMain.pas
new file mode 100644
index 0000000..269ea1a
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelServerMain.pas
@@ -0,0 +1,25 @@
+unit BriefcaseModelServerMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
+ uDAPoweredByDataAbstractButton, uROPoweredByRemObjectsButton;
+
+type
+ TBriefcaseModelServerMainForm = class(TForm)
+ DAPoweredByDataAbstractButton1: TDAPoweredByDataAbstractButton;
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ BriefcaseModelServerMainForm: TBriefcaseModelServerMainForm;
+
+implementation
+
+{$R *.dfm}
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelService_Impl.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelService_Impl.dfm
new file mode 100644
index 0000000..786a369
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelService_Impl.dfm
@@ -0,0 +1,500 @@
+object BriefcaseModelService: TBriefcaseModelService
+ OldCreateOrder = True
+ SessionManager = BriefcaseModelServerDataModule.SessionManager
+ ServiceSchema = Schema
+ ServiceDataStreamer = DataStreamer
+ ExportedDataTables = <>
+ Left = 196
+ Top = 147
+ Height = 164
+ Width = 174
+ object Schema: TDASchema
+ ConnectionManager = BriefcaseModelServerDataModule.ConnectionManager
+ DataDictionary = BriefcaseModelServerDataModule.DataDictionary
+ Datasets = <
+ item
+ Params = <>
+ Statements = <
+ item
+ Connection = 'Northwind'
+ Default = True
+ TargetTable = 'Customers'
+ SQL =
+ 'SELECT '#10' CustomerID, CompanyName, ContactName, ContactTitle, ' +
+ #10' Address, City, Region, PostalCode, Country, Phone, '#10' Fax' +
+ #10' FROM'#10' Customers'
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'CustomerID'
+ TableField = 'CustomerID'
+ end
+ item
+ DatasetField = 'CompanyName'
+ TableField = 'CompanyName'
+ end
+ item
+ DatasetField = 'ContactName'
+ TableField = 'ContactName'
+ end
+ item
+ DatasetField = 'ContactTitle'
+ TableField = 'ContactTitle'
+ end
+ item
+ DatasetField = 'Address'
+ TableField = 'Address'
+ end
+ item
+ DatasetField = 'City'
+ TableField = 'City'
+ end
+ item
+ DatasetField = 'Region'
+ TableField = 'Region'
+ end
+ item
+ DatasetField = 'PostalCode'
+ TableField = 'PostalCode'
+ end
+ item
+ DatasetField = 'Country'
+ TableField = 'Country'
+ end
+ item
+ DatasetField = 'Phone'
+ TableField = 'Phone'
+ end
+ item
+ DatasetField = 'Fax'
+ TableField = 'Fax'
+ end>
+ end>
+ Name = 'Customers'
+ Fields = <
+ item
+ Name = 'CustomerID'
+ DataType = datWideString
+ Size = 5
+ BlobType = dabtUnknown
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CompanyName'
+ DataType = datWideString
+ Size = 40
+ BlobType = dabtUnknown
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ContactName'
+ DataType = datWideString
+ Size = 30
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ContactTitle'
+ DataType = datWideString
+ Size = 30
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Address'
+ DataType = datWideString
+ Size = 60
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'City'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Region'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'PostalCode'
+ DataType = datWideString
+ Size = 10
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Country'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Phone'
+ DataType = datWideString
+ Size = 24
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Fax'
+ DataType = datWideString
+ Size = 24
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ BusinessRulesClient.ScriptLanguage = rslPascalScript
+ BusinessRulesServer.ScriptLanguage = rslPascalScript
+ end
+ item
+ Params = <>
+ Statements = <
+ item
+ Connection = 'Northwind'
+ Default = True
+ TargetTable = 'Orders'
+ SQL =
+ 'SELECT '#10' OrderID, CustomerID, EmployeeID, OrderDate, Required' +
+ 'Date, '#10' ShippedDate, ShipVia, Freight, ShipName, ShipAddress,' +
+ ' '#10' ShipCity, ShipRegion, ShipPostalCode, ShipCountry'#10' FROM'#10' ' +
+ ' Orders'#10#10
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'OrderID'
+ TableField = 'OrderID'
+ end
+ item
+ DatasetField = 'CustomerID'
+ TableField = 'CustomerID'
+ end
+ item
+ DatasetField = 'EmployeeID'
+ TableField = 'EmployeeID'
+ end
+ item
+ DatasetField = 'OrderDate'
+ TableField = 'OrderDate'
+ end
+ item
+ DatasetField = 'RequiredDate'
+ TableField = 'RequiredDate'
+ end
+ item
+ DatasetField = 'ShippedDate'
+ TableField = 'ShippedDate'
+ end
+ item
+ DatasetField = 'ShipVia'
+ TableField = 'ShipVia'
+ end
+ item
+ DatasetField = 'Freight'
+ TableField = 'Freight'
+ end
+ item
+ DatasetField = 'ShipName'
+ TableField = 'ShipName'
+ end
+ item
+ DatasetField = 'ShipAddress'
+ TableField = 'ShipAddress'
+ end
+ item
+ DatasetField = 'ShipCity'
+ TableField = 'ShipCity'
+ end
+ item
+ DatasetField = 'ShipRegion'
+ TableField = 'ShipRegion'
+ end
+ item
+ DatasetField = 'ShipPostalCode'
+ TableField = 'ShipPostalCode'
+ end
+ item
+ DatasetField = 'ShipCountry'
+ TableField = 'ShipCountry'
+ end>
+ end>
+ Name = 'Orders'
+ Fields = <
+ item
+ Name = 'OrderID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ LogChanges = False
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CustomerID'
+ DataType = datWideString
+ Size = 5
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'EmployeeID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'OrderDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'RequiredDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShippedDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipVia'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Freight'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DefaultValue = '0'
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipName'
+ DataType = datWideString
+ Size = 40
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipAddress'
+ DataType = datWideString
+ Size = 60
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipCity'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipRegion'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipPostalCode'
+ DataType = datWideString
+ Size = 10
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipCountry'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ BusinessRulesClient.ScriptLanguage = rslPascalScript
+ BusinessRulesServer.ScriptLanguage = rslPascalScript
+ end>
+ JoinDataTables = <>
+ UnionDataTables = <>
+ Commands = <>
+ RelationShips = <
+ item
+ Name = 'FK_Orders_Customers'
+ MasterDatasetName = 'Customers'
+ MasterFields = 'CustomerID'
+ DetailDatasetName = 'Orders'
+ DetailFields = 'CustomerID'
+ RelationshipType = rtForeignKey
+ end>
+ UpdateRules = <>
+ Version = 0
+ Left = 32
+ Top = 56
+ end
+ object DataStreamer: TDABinDataStreamer
+ BufferSize = 262144
+ IsCompatibleV4 = True
+ Left = 32
+ Top = 8
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelService_Impl.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelService_Impl.pas
new file mode 100644
index 0000000..5600ede
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/BriefcaseModelService_Impl.pas
@@ -0,0 +1,48 @@
+unit BriefcaseModelService_Impl;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ This is where you are supposed to code the implementation of your objects. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils,
+ {RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
+ {Required:} uRORemoteDataModule,
+ {Ancestor Implementation:} DataAbstractService_Impl,
+ {Used RODLs:} DataAbstract4_Intf,
+ {Generated:} BriefcaseModelLibrary_Intf, uDADataStreamer, uDABinAdapter,
+ uDAClasses;
+
+type
+ { TBriefcaseModelService }
+ TBriefcaseModelService = class(TDataAbstractService, IBriefcaseModelService)
+ DataStreamer: TDABinDataStreamer;
+ Schema: TDASchema;
+ private
+ protected
+ { IBriefcaseModelService methods }
+ end;
+
+implementation
+
+{$R *.dfm}
+uses
+ {Generated:} BriefcaseModelLibrary_Invk,BriefcaseModelServerData;
+
+procedure Create_BriefcaseModelService(out anInstance : IUnknown);
+begin
+ anInstance := TBriefcaseModelService.Create(nil);
+end;
+
+{ BriefcaseModelService }
+initialization
+ TROClassFactory.Create('BriefcaseModelService', Create_BriefcaseModelService, TBriefcaseModelService_Invoker);
+
+finalization
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/RODLFILE.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/RODLFILE.res
new file mode 100644
index 0000000..8e8bd7e
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Briefcase/RODLFILE.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BizSchemaClient.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BizSchemaClient.pas
new file mode 100644
index 0000000..369bec6
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BizSchemaClient.pas
@@ -0,0 +1,165 @@
+unit BizSchemaClient;
+
+interface
+uses
+ Classes,
+ SchemaClient_Intf;
+
+type
+ IBizCustomers = interface(ICustomers)
+ ['{63BAECDD-6091-4A86-BA58-E6FFD5330240}']
+ end;
+
+ TBizCustomersDataTableRules = class(TCustomersDataTableRules, IBizCustomers)
+ end;
+
+ IBizOrders = interface(IOrders)
+ ['{E43D1B71-EEF0-4805-9F1E-EE032353BD0F}']
+ end;
+
+ TBizOrdersDataTableRules = class(TOrdersDataTableRules, IBizOrders)
+ end;
+
+ TBizErrorMessageItem = class
+ public
+ Field: string;
+ ErrorMessage: string;
+ end;
+
+ TBizErrorMessage = class
+ private
+ FMessage: string;
+ FList: TList;
+ function GetItems(Index: integer): TBizErrorMessageItem;
+ function GetCount: integer;
+ function GetAsString: string;
+ procedure SetAsString(const Value: string);
+ public
+ constructor Create;
+ destructor Destroy; override;
+ function Add(AField: string; AErrorMessage: string): integer;
+ procedure Clear;
+ property ItemCount: integer read GetCount;
+ property Message: string read FMessage write FMessage;
+ property Items[Index: integer]: TBizErrorMessageItem read GetItems;
+ property AsString: string read GetAsString write SetAsString;
+ end;
+
+implementation
+
+uses uDADataTable, Variants;
+
+{ TBizErrorMessage }
+
+function TBizErrorMessage.Add(AField: string; AErrorMessage: string): integer;
+var
+ Aitem: TBizErrorMessageItem;
+begin
+ Aitem := TBizErrorMessageItem.Create;
+ Aitem.Field := AField;
+ Aitem.ErrorMessage := AErrorMessage;
+ Result := FList.Add(AItem);
+end;
+
+procedure TBizErrorMessage.Clear;
+var
+ i: integer;
+begin
+ for i := 0 to Flist.Count - 1 do
+ TBizErrorMessageItem(FList[i]).Free;
+ FList.Clear;
+end;
+
+constructor TBizErrorMessage.Create;
+begin
+ inherited;
+ FList := TList.Create;
+end;
+
+destructor TBizErrorMessage.Destroy;
+begin
+ Clear;
+ Flist.Free;
+ inherited;
+end;
+
+function TBizErrorMessage.GetAsString: string;
+
+ procedure WriteStringToStream(Str: string; Stream: TStringStream);
+ var
+ size: integer;
+ begin
+ size := Length(Str);
+ stream.Write(size, Sizeof(integer));
+ stream.WriteString(Str);
+ end;
+
+var
+ Stream: TStringStream;
+ cnt: integer;
+ i: integer;
+begin
+ Stream := TStringStream.Create('');
+ try
+ Stream.WriteString(Message);
+ i := 0;
+ stream.Write(Byte(i), 1);
+ cnt := GetCount;
+ stream.Write(cnt, SizeOf(cnt));
+ for i := 0 to cnt - 1 do
+ with Items[i] do begin
+ WriteStringToStream(Field, Stream);
+ WriteStringToStream(ErrorMessage, Stream);
+ end;
+ Result := Stream.DataString;
+ finally
+ Stream.Free;
+ end;
+end;
+
+function TBizErrorMessage.GetCount: integer;
+begin
+ Result := FList.Count;
+end;
+
+function TBizErrorMessage.GetItems(Index: integer): TBizErrorMessageItem;
+begin
+ Result := TBizErrorMessageItem(FList[Index]);
+end;
+
+procedure TBizErrorMessage.SetAsString(const Value: string);
+
+ function ReadStringToStream(Stream: TStringStream): string;
+ var
+ Size: integer;
+ begin
+ stream.Read(size, Sizeof(integer));
+ Result := stream.ReadString(size);
+ end;
+
+var
+ Stream: TStringStream;
+ i, cnt: integer;
+begin
+ Clear;
+ Stream := TStringStream.Create(Value);
+ try
+ Message := Pchar(Value);
+ if Stream.Size < Length(Message) + 1 then exit;
+ Stream.Seek(Length(Message) + 1, soFromBeginning);
+ stream.Read(cnt, SizeOf(cnt));
+ for i := 0 to cnt - 1 do
+ with Items[Add('', '')] do begin
+ Field := ReadStringToStream(Stream);
+ ErrorMessage := ReadStringToStream(Stream);
+ end;
+ finally
+ Stream.Free;
+ end;
+end;
+
+initialization
+ RegisterDataTableRules('Customers.ClientRules', TBizCustomersDataTableRules);
+ RegisterDataTableRules('Orders.ClientRules', TBizOrdersDataTableRules);
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BizSchemaServer.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BizSchemaServer.pas
new file mode 100644
index 0000000..708c409
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BizSchemaServer.pas
@@ -0,0 +1,128 @@
+unit BizSchemaServer;
+
+interface
+
+uses Classes, SysUtils, uDADataTable, uDABusinessProcessor,
+ SchemaServer_Intf, BizSchemaClient, uDADelta, uDAInterfaces;
+
+type
+ TBizCustomersServerRules = class(TCustomersBusinessProcessorRules)
+ protected
+ // Business events
+ procedure BeforeProcessChange(Sender: TDABusinessProcessor; aChangeType: TDAChangeType; aChange: TDADeltaChange; var ProcessChange: boolean); override;
+ procedure ProcessError(Sender: TDABusinessProcessor; aChangeType: TDAChangeType; aChange: TDADeltaChange;
+ const aCommand: IDASQLCommand; var CanRemoveFromDelta: boolean; Error: Exception); override;
+ end;
+
+ TBizOrdersServerRules = class(TOrdersBusinessProcessorRules)
+ protected
+ // Business events
+ procedure BeforeProcessChange(Sender: TDABusinessProcessor; aChangeType: TDAChangeType; aChange: TDADeltaChange; var ProcessChange: boolean); override;
+ procedure ProcessError(Sender: TDABusinessProcessor; aChangeType: TDAChangeType; aChange: TDADeltaChange;
+ const aCommand: IDASQLCommand; var CanRemoveFromDelta: boolean; Error: Exception); override;
+
+ end;
+
+implementation
+uses
+ ServerGlobal, dialogs;
+{ TBizCustomersServerRules }
+
+function CheckCustomer(CustID: string): boolean;
+var
+ i: integer;
+begin
+ Result := False;
+ if Length(CustID) <> 5 then Exit;
+ for i := 1 to Length(CustID) do
+ if not (CustID[i] in ['A'..'Z', 'a'..'z']) then Exit;
+ Result := True;
+end;
+
+procedure TBizCustomersServerRules.BeforeProcessChange(Sender: TDABusinessProcessor;
+ aChangeType: TDAChangeType; aChange: TDADeltaChange; var ProcessChange: boolean);
+begin
+ inherited;
+ aChange.Message := '';
+ if (aChangeType = ctInsert) then begin
+ with TBizErrorMessage.Create do try
+ if gCheckCustomerID and not checkCustomer(CustomerID) then
+ Add('CustomerID', 'CustomerID needs at least 5 characters');
+ if gCompanyCheck and not SameText(CompanyName, gCompany) then
+ Add('CompanyName', 'Company name should be ' + gCompany);
+ finally
+ if ItemCount > 0 then begin
+ Message := 'Cannot process an insert ' + sLineBreak +
+ '(Customer = ''' + CustomerID + ''')';
+ aChange.Message := asString;
+ end;
+ Free;
+ end;
+ end;
+
+ if (aChangeType = ctDelete) and gDeclineDeleteCustomers then begin
+ with TBizErrorMessage.Create do try
+ Message := 'Deleting of customers is not allowed ' + sLineBreak +
+ '(Customer = ''' + OldCustomerID + ''')';
+ aChange.Message := asString;
+ finally
+ Free;
+ end;
+ end;
+ ProcessChange := aChange.Message = '';
+ if not ProcessChange then aChange.Status := csFailed;
+end;
+
+procedure TBizCustomersServerRules.ProcessError(
+ Sender: TDABusinessProcessor; aChangeType: TDAChangeType;
+ aChange: TDADeltaChange; const aCommand: IDASQLCommand;
+ var CanRemoveFromDelta: boolean; Error: Exception);
+begin
+ aChange.Message := Error.Message;
+end;
+
+{ TBizOrdersServerRules }
+
+procedure TBizOrdersServerRules.BeforeProcessChange(
+ Sender: TDABusinessProcessor; aChangeType: TDAChangeType;
+ aChange: TDADeltaChange; var ProcessChange: boolean);
+begin
+ inherited;
+ aChange.Message := '';
+ if aChangeType <> ctDelete then
+ if gFreightCheck and (Freight < gFreight) then begin
+ with TBizErrorMessage.Create do try
+ Message := 'Cannot process operation ' + sLineBreak + '(OrderID = ' + intToStr(OrderID) + ')';
+ Add('Freight', 'Freight should be greater than ' + IntToStr(gFreight));
+ aChange.Message := asString;
+ finally
+ Free;
+ end;
+ end;
+ if (aChangeType = ctDelete) and gDeclineDeleteOrders then begin
+ with TBizErrorMessage.Create do try
+ Message := 'Deleting of orders is not allowed ' + sLineBreak +
+ '(OrderID = ''' + IntToStr(OldOrderID) + ''')';
+ aChange.Message := asString;
+ finally
+ Free;
+ end;
+ end;
+ ProcessChange := aChange.Message = '';
+ if not ProcessChange then aChange.Status := csFailed;
+end;
+
+procedure TBizOrdersServerRules.ProcessError(Sender: TDABusinessProcessor;
+ aChangeType: TDAChangeType; aChange: TDADeltaChange;
+ const aCommand: IDASQLCommand; var CanRemoveFromDelta: boolean;
+ Error: Exception);
+begin
+ aChange.Message := Error.Message;
+ aChange.Status := csFailed;
+end;
+
+initialization
+ RegisterBusinessProcessorRules('Customers.ServerRules', TBizCustomersServerRules);
+ RegisterBusinessProcessorRules('Orders.ServerRules', TBizOrdersServerRules);
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessor.Sample.html b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessor.Sample.html
new file mode 100644
index 0000000..3a99fee
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessor.Sample.html
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+ Business Processor sample
+
+
+Purpose
+
+
+ This is a good example to show the advantages of a multi-tier architecture: systems can be updated via a server re-deploy without the need to update any client. Also,
+ the sample shows advanced handling on the client of any errors returned from the
+ server.
+
+
+Examine the Code
+
+
+ BizSchemaServer.pas : this unit contains the business rules handlers for the server application.
+
+
+ BizSchemaClient.pas : this unit contains the business rules handlers for the client application.
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessor.bdsgroup b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessor.bdsgroup
new file mode 100644
index 0000000..f4f1dd2
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessor.bdsgroup
@@ -0,0 +1,20 @@
+
+
+
+
+ Default.Personality
+
+ 1.0
+ {F5074962-16BE-403D-A040-81B66B387996}
+
+
+
+
+
+ BusinessProcessorServer.bdsproj
+ BusinessProcessorClient.bdsproj
+ BusinessProcessorServer.exe BusinessProcessorClient.exe
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessor.bpg b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessor.bpg
new file mode 100644
index 0000000..ed4c7cc
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessor.bpg
@@ -0,0 +1,23 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = BusinessProcessorServer.exe BusinessProcessorClient.exe
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+BusinessProcessorServer.exe: BusinessProcessorServer.dpr
+ $(DCC)
+
+BusinessProcessorClient.exe: BusinessProcessorClient.dpr
+ $(DCC)
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessor.groupproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessor.groupproj
new file mode 100644
index 0000000..2cdc078
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessor.groupproj
@@ -0,0 +1,40 @@
+
+
+ {e64b5502-8847-4dd5-8e67-4e6d0176cf50}
+
+
+
+
+ Default.Personality
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorClient.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorClient.bdsproj
new file mode 100644
index 0000000..22248ef
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorClient.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {6B208CB8-98D9-44F2-A556-E88D6F03DE32}
+
+
+
+
+ BusinessProcessorClient.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorClient.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorClient.dpr
new file mode 100644
index 0000000..67f0b32
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorClient.dpr
@@ -0,0 +1,20 @@
+program BusinessProcessorClient;
+
+uses
+ uROComInit,
+ Forms,
+ MidasLib,
+ BusinessProcessorClientMain in 'BusinessProcessorClientMain.pas' {BusinessProcessorClientMainForm},
+ BusinessProcessorClientData in 'BusinessProcessorClientData.pas' {BusinessProcessorClientDataModule: TDAClientDataModule},
+ BizSchemaClient in 'BizSchemaClient.pas',
+ BusinessProcessorClientUnit1 in 'BusinessProcessorClientUnit1.pas' {BusinessProcessorClientForm2};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TBusinessProcessorClientDataModule, BusinessProcessorClientDataModule);
+ Application.CreateForm(TBusinessProcessorClientMainForm, BusinessProcessorClientMainForm);
+ Application.Run;
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorClient.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorClient.dproj
new file mode 100644
index 0000000..e6a4576
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorClient.dproj
@@ -0,0 +1,79 @@
+
+
+ {701a77fa-871d-41bc-ab21-ba2b8d978e5b}
+ BusinessProcessorClient.dpr
+ Debug
+ AnyCPU
+ DCC32
+ BusinessProcessorClient.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ BusinessProcessorClient.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorClient.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorClient.res
new file mode 100644
index 0000000..da01de5
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorClient.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorClientData.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorClientData.dfm
new file mode 100644
index 0000000..a7e6ea9
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorClientData.dfm
@@ -0,0 +1,422 @@
+object BusinessProcessorClientDataModule: TBusinessProcessorClientDataModule
+ OldCreateOrder = True
+ Left = 345
+ Top = 206
+ Height = 266
+ Width = 184
+ object Channel: TROWinInetHTTPChannel
+ UserAgent = 'RemObjects SDK'
+ TargetURL = 'http://localhost:8099/BIN'
+ ServerLocators = <>
+ DispatchOptions = []
+ Left = 40
+ Top = 8
+ end
+ object Message: TROBinMessage
+ Left = 40
+ Top = 52
+ end
+ object RemoteService: TRORemoteService
+ Message = Message
+ Channel = Channel
+ ServiceName = 'BusinessProcessorService'
+ Left = 40
+ Top = 96
+ end
+ object DataStreamer: TDABinDataStreamer
+ BufferSize = 262144
+ Left = 40
+ Top = 140
+ end
+ object RemoteDataAdapter: TDARemoteDataAdapter
+ GetSchemaCall.RemoteService = RemoteService
+ GetDataCall.RemoteService = RemoteService
+ UpdateDataCall.RemoteService = RemoteService
+ GetScriptsCall.RemoteService = RemoteService
+ RemoteService = RemoteService
+ DataStreamer = DataStreamer
+ FailureBehavior = fbShowReconcile
+ OnGenerateRecordMessage = RemoteDataAdapterGenerateRecordMessage
+ OnShowReconcileRecordInAppUI = RemoteDataAdapterShowReconcileRecordInAppUI
+ Left = 40
+ Top = 184
+ end
+ object tbl_Customers: TDACDSDataTable
+ RemoteUpdatesOptions = []
+ Fields = <
+ item
+ Name = 'CustomerID'
+ DataType = datWideString
+ Size = 5
+ BlobType = dabtUnknown
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CompanyName'
+ DataType = datWideString
+ Size = 40
+ BlobType = dabtUnknown
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ContactName'
+ DataType = datWideString
+ Size = 30
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ContactTitle'
+ DataType = datWideString
+ Size = 30
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Address'
+ DataType = datWideString
+ Size = 60
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'City'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Region'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'PostalCode'
+ DataType = datWideString
+ Size = 10
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Country'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Phone'
+ DataType = datWideString
+ Size = 24
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Fax'
+ DataType = datWideString
+ Size = 24
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ Params = <>
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteDataAdapter = RemoteDataAdapter
+ ReadOnly = False
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ LogicalName = 'Customers'
+ BusinessRulesID = 'Customers.ClientRules'
+ IndexDefs = <>
+ Left = 89
+ Top = 100
+ end
+ object ds_Customers: TDADataSource
+ DataSet = tbl_Customers.Dataset
+ DataTable = tbl_Customers
+ Left = 118
+ Top = 99
+ end
+ object tbl_Orders: TDACDSDataTable
+ RemoteUpdatesOptions = []
+ Fields = <
+ item
+ Name = 'OrderID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ LogChanges = False
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CustomerID'
+ DataType = datWideString
+ Size = 5
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'EmployeeID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'OrderDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'RequiredDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShippedDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipVia'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Freight'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DefaultValue = '0'
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipName'
+ DataType = datWideString
+ Size = 40
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipAddress'
+ DataType = datWideString
+ Size = 60
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipCity'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipRegion'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipPostalCode'
+ DataType = datWideString
+ Size = 10
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipCountry'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ Params = <
+ item
+ Name = 'CustomerID'
+ DataType = datWideString
+ Size = 5
+ BlobType = dabtUnknown
+ Value = 'ALFKI'
+ ParamType = daptUnknown
+ end>
+ MasterParamsMappings.Strings = (
+ 'CustomerID=CustomerID')
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteDataAdapter = RemoteDataAdapter
+ ReadOnly = False
+ MasterSource = ds_Customers
+ MasterFields = 'CustomerID'
+ DetailFields = 'CustomerID'
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ LogicalName = 'Orders'
+ BusinessRulesID = 'Orders.ClientRules'
+ IndexDefs = <>
+ Left = 99
+ Top = 151
+ end
+ object ds_Orders: TDADataSource
+ DataSet = tbl_Orders.Dataset
+ DataTable = tbl_Orders
+ Left = 128
+ Top = 149
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorClientData.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorClientData.pas
new file mode 100644
index 0000000..9f96a19
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorClientData.pas
@@ -0,0 +1,86 @@
+unit BusinessProcessorClientData;
+
+interface
+
+uses
+ {vcl:} SysUtils, Classes, DB, DBClient, Variants,
+ {RemObjects:} uROClient, uROClientIntf, uRORemoteService, uROBinMessage, uROWinInetHTTPChannel,
+ {Data Abstract:} uDADataTable, uDABINAdapter, uDAInterfaces,
+ uDADataStreamer, uDARemoteDataAdapter, uDAScriptingProvider,
+ uDACDSDataTable, uDADelta;
+
+type
+ TBusinessProcessorClientDataModule = class(TDataModule)
+ Message: TROBinMessage;
+ Channel: TROWinInetHTTPChannel;
+ RemoteService: TRORemoteService;
+ DataStreamer: TDABinDataStreamer;
+ RemoteDataAdapter: TDARemoteDataAdapter;
+ tbl_Customers: TDACDSDataTable;
+ ds_Customers: TDADataSource;
+ tbl_Orders: TDACDSDataTable;
+ ds_Orders: TDADataSource;
+ procedure RemoteDataAdapterGenerateRecordMessage(Sender: TObject;
+ aChange: TDADeltaChange; ADatatable: TDADataTable;
+ var aMessage: string);
+ procedure RemoteDataAdapterShowReconcileRecordInAppUI(Sender: TObject;
+ aChange: TDADeltaChange; aDatatable: TDADataTable;
+ var aHandled: Boolean; var aAction: TDAReconcileDialogAction);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ BusinessProcessorClientDataModule: TBusinessProcessorClientDataModule;
+
+implementation
+uses BusinessProcessorClientUnit1;
+{$R *.dfm}
+
+procedure TBusinessProcessorClientDataModule.RemoteDataAdapterGenerateRecordMessage(
+ Sender: TObject; aChange: TDADeltaChange; ADatatable: TDADataTable;
+ var aMessage: string);
+var
+ i: integer;
+begin
+ aMessage := 'A problem occured while ';
+ case achange.ChangeType of
+ ctInsert: aMessage := aMessage + 'inserting';
+ ctUpdate: aMessage := aMessage + 'updating';
+ ctDelete: aMessage := aMessage + 'deleting';
+ end;
+ aMessage := aMessage + ' a record in table "' + ADatatable.LogicalName + '"';
+ if ADatatable = tbl_Customers then begin
+ aMessage := aMessage + ' , CustomerID = ''';
+ if aChange.ChangeType = ctInsert then
+ aMessage := aMessage + VarToStr(aChange.NewValueByName['CustomerID']) + ''''
+ else
+ aMessage := aMessage + VarToStr(aChange.OldValueByName['CustomerID']) + '''';
+ end
+ else begin
+ aMessage := aMessage + ' , OrderID = ''';
+ if aChange.ChangeType = ctInsert then
+ aMessage := aMessage + VarToStr(aChange.NewValueByName['OrderID']) + ''''
+ else
+ aMessage := aMessage + VarToStr(aChange.OldValueByName['OrderID']) + '''';
+ end;
+
+ i := pos(sLineBreak, aChange.Message);
+ if i = 0 then
+ aMessage := aMessage + sLineBreak + sLineBreak + aChange.Message
+ else
+ aMessage := aMessage + sLineBreak + sLineBreak + copy(aChange.Message, 1, i - 1);
+end;
+
+procedure TBusinessProcessorClientDataModule.RemoteDataAdapterShowReconcileRecordInAppUI(
+ Sender: TObject; aChange: TDADeltaChange; aDatatable: TDADataTable;
+ var aHandled: Boolean; var aAction: TDAReconcileDialogAction);
+begin
+ BusinessProcessorClientUnit1.ReconcileDialogShowDetails(aChange, ADatatable, AAction);
+ AHandled := True;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorClientMain.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorClientMain.dfm
new file mode 100644
index 0000000..717efe7
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorClientMain.dfm
@@ -0,0 +1,134 @@
+object BusinessProcessorClientMainForm: TBusinessProcessorClientMainForm
+ Left = 320
+ Top = 215
+ AutoScroll = False
+ Caption = 'BusinessProcessor Client'
+ ClientHeight = 414
+ ClientWidth = 624
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Splitter1: TSplitter
+ Left = 0
+ Top = 266
+ Width = 624
+ Height = 3
+ Cursor = crVSplit
+ Align = alBottom
+ end
+ object gCustomers: TDBGrid
+ Left = 0
+ Top = 58
+ Width = 624
+ Height = 208
+ Align = alClient
+ DataSource = BusinessProcessorClientDataModule.ds_Customers
+ TabOrder = 0
+ TitleFont.Charset = DEFAULT_CHARSET
+ TitleFont.Color = clWindowText
+ TitleFont.Height = -11
+ TitleFont.Name = 'MS Sans Serif'
+ TitleFont.Style = []
+ end
+ object dbnCustomers: TDBNavigator
+ Left = 0
+ Top = 33
+ Width = 624
+ Height = 25
+ DataSource = BusinessProcessorClientDataModule.ds_Customers
+ Align = alTop
+ TabOrder = 1
+ end
+ object Button1: TButton
+ Left = 13
+ Top = 8
+ Width = 75
+ Height = 25
+ Caption = 'Open'
+ TabOrder = 2
+ OnClick = Button1Click
+ end
+ object Button2: TButton
+ Left = 91
+ Top = 7
+ Width = 75
+ Height = 25
+ Caption = 'Button2'
+ TabOrder = 3
+ end
+ object Panel1: TPanel
+ Left = 0
+ Top = 0
+ Width = 624
+ Height = 33
+ Align = alTop
+ BevelOuter = bvNone
+ TabOrder = 4
+ object ApplyUpdateButton: TButton
+ Left = 92
+ Top = 6
+ Width = 74
+ Height = 25
+ Caption = 'Apply Update'
+ TabOrder = 0
+ OnClick = ApplyUpdateButtonClick
+ end
+ object OpenButton: TButton
+ Left = 13
+ Top = 6
+ Width = 75
+ Height = 25
+ Caption = 'Open/Close'
+ TabOrder = 1
+ OnClick = Button1Click
+ end
+ object CreateCustomerButton: TButton
+ Left = 222
+ Top = 6
+ Width = 95
+ Height = 25
+ Caption = 'Create customer'
+ TabOrder = 2
+ OnClick = CreateCustomerButtonClick
+ end
+ object CreateOrderButton: TButton
+ Left = 322
+ Top = 6
+ Width = 75
+ Height = 25
+ Caption = 'Create order'
+ TabOrder = 3
+ OnClick = CreateOrderButtonClick
+ end
+ end
+ object gOrders: TDBGrid
+ Left = 0
+ Top = 269
+ Width = 624
+ Height = 120
+ Align = alBottom
+ DataSource = BusinessProcessorClientDataModule.ds_Orders
+ TabOrder = 5
+ TitleFont.Charset = DEFAULT_CHARSET
+ TitleFont.Color = clWindowText
+ TitleFont.Height = -11
+ TitleFont.Name = 'MS Sans Serif'
+ TitleFont.Style = []
+ end
+ object dbnOrders: TDBNavigator
+ Left = 0
+ Top = 389
+ Width = 624
+ Height = 25
+ DataSource = BusinessProcessorClientDataModule.ds_Orders
+ Align = alBottom
+ TabOrder = 6
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorClientMain.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorClientMain.pas
new file mode 100644
index 0000000..7da77cd
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorClientMain.pas
@@ -0,0 +1,77 @@
+unit BusinessProcessorClientMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
+ uROClient, uROClientIntf, uRORemoteService, uROBinMessage, ExtCtrls,
+ DBCtrls, Grids, DBGrids;
+
+type
+ TBusinessProcessorClientMainForm = class(TForm)
+ gCustomers: TDBGrid;
+ dbnCustomers: TDBNavigator;
+ Button1: TButton;
+ Button2: TButton;
+ Panel1: TPanel;
+ ApplyUpdateButton: TButton;
+ OpenButton: TButton;
+ gOrders: TDBGrid;
+ dbnOrders: TDBNavigator;
+ Splitter1: TSplitter;
+ CreateCustomerButton: TButton;
+ CreateOrderButton: TButton;
+ procedure Button1Click(Sender: TObject);
+ procedure ApplyUpdateButtonClick(Sender: TObject);
+ procedure CreateCustomerButtonClick(Sender: TObject);
+ procedure CreateOrderButtonClick(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ BusinessProcessorClientMainForm: TBusinessProcessorClientMainForm;
+
+implementation
+
+uses
+ BusinessProcessorClientData, BizSchemaClient, SchemaClient_Intf;
+
+{$R *.dfm}
+
+procedure TBusinessProcessorClientMainForm.Button1Click(Sender: TObject);
+begin
+ with BusinessProcessorClientDataModule.tbl_Customers do
+ Active := not Active;
+end;
+
+procedure TBusinessProcessorClientMainForm.ApplyUpdateButtonClick(Sender: TObject);
+begin
+ with BusinessProcessorClientDataModule.tbl_Customers do
+ ApplyUpdates();
+end;
+
+procedure TBusinessProcessorClientMainForm.CreateCustomerButtonClick(Sender: TObject);
+begin
+ with BusinessProcessorClientDataModule.tbl_Customers as IBizCustomers do begin
+ Insert;
+ CustomerID := 'test';
+ CompanyName := 'test company';
+ Post;
+ end;
+end;
+
+procedure TBusinessProcessorClientMainForm.CreateOrderButtonClick(Sender: TObject);
+begin
+ with BusinessProcessorClientDataModule.tbl_Orders as IBizOrders do begin
+ Insert;
+ OrderID := 1;
+ Freight := 10;
+ Post;
+ end;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorClientUnit1.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorClientUnit1.dfm
new file mode 100644
index 0000000..db0f536
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorClientUnit1.dfm
@@ -0,0 +1,86 @@
+object BusinessProcessorClientForm2: TBusinessProcessorClientForm2
+ Left = 358
+ Top = 217
+ Width = 490
+ Height = 298
+ BorderIcons = [biSystemMenu]
+ Caption = 'Show Details'
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poOwnerFormCenter
+ OnCreate = FormCreate
+ PixelsPerInch = 96
+ TextHeight = 13
+ object ScrollBox: TScrollBox
+ Left = 0
+ Top = 148
+ Width = 482
+ Height = 85
+ Align = alClient
+ BevelInner = bvNone
+ BevelOuter = bvNone
+ BorderStyle = bsNone
+ TabOrder = 0
+ end
+ object BottomPanel: TPanel
+ Left = 0
+ Top = 233
+ Width = 482
+ Height = 32
+ Align = alBottom
+ BevelOuter = bvNone
+ TabOrder = 1
+ DesignSize = (
+ 482
+ 32)
+ object OkButton: TButton
+ Left = 225
+ Top = 4
+ Width = 75
+ Height = 25
+ Anchors = [akRight, akBottom]
+ Caption = '&Ok'
+ Default = True
+ ModalResult = 1
+ TabOrder = 0
+ OnClick = OkButtonClick
+ end
+ object CancelButton: TButton
+ Left = 304
+ Top = 4
+ Width = 95
+ Height = 25
+ Anchors = [akRight, akBottom]
+ Caption = '&Cancel Change'
+ ModalResult = 2
+ TabOrder = 1
+ OnClick = CancelButtonClick
+ end
+ object CloseButton: TButton
+ Left = 404
+ Top = 4
+ Width = 75
+ Height = 25
+ Anchors = [akRight, akBottom]
+ Cancel = True
+ Caption = 'Close'
+ ModalResult = 7
+ TabOrder = 2
+ OnClick = CancelButtonClick
+ end
+ end
+ object TopPanel: TPanel
+ Left = 0
+ Top = 0
+ Width = 482
+ Height = 148
+ Align = alTop
+ BevelOuter = bvNone
+ TabOrder = 2
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorClientUnit1.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorClientUnit1.pas
new file mode 100644
index 0000000..40a8e92
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorClientUnit1.pas
@@ -0,0 +1,298 @@
+unit BusinessProcessorClientUnit1;
+
+interface
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, StdCtrls, ExtCtrls, uDADelta, uDADataTable, DB, BizSchemaClient, uDARemoteDataAdapter;
+
+type
+ TBusinessProcessorClientForm2 = class(TForm)
+ ScrollBox: TScrollBox;
+ BottomPanel: TPanel;
+ TopPanel: TPanel;
+ OkButton: TButton;
+ CancelButton: TButton;
+ CloseButton: TButton;
+ procedure FormCreate(Sender: TObject);
+ procedure OkButtonClick(Sender: TObject);
+ procedure CancelButtonClick(Sender: TObject);
+ private
+ { Private declarations }
+ dbeditHeight, labelheight: integer;
+ FChange: TDADeltaChange;
+ Datasource: TDADataSource;
+ procedure Setup;
+ procedure GenerateControls;
+ procedure ApplyErrorMessage(BizErrorMessage: TBizErrorMessage);
+ procedure OnFieldValueChanged(Sender: TObject);
+ public
+ { Public declarations }
+
+ end;
+
+procedure ReconcileDialogShowDetails(AChange: TDADeltaChange; aTable: TDADataTable;var AAction: TDAReconcileDialogAction);
+implementation
+uses
+ uDAInterfaces, uROClasses, dbCtrls;
+{$R *.dfm}
+
+const
+ labelWidth = 100;
+ editWidth = 200;
+ c_Color: TColor = clMoneyGreen;
+
+procedure ReconcileDialogShowDetails(AChange: TDADeltaChange; aTable: TDADataTable;var AAction: TDAReconcileDialogAction);
+var
+ FFiltered: Boolean;
+ FMasterDS: TDADataSource;
+ FRemoteFetchEnabled: Boolean;
+ FMasterFields: string;
+begin
+ with TBusinessProcessorClientForm2.Create(Application) do try
+ FChange := AChange;
+ FFiltered := ATable.Filtered;
+ FMasterDS := aTable.MasterSource;
+ FMasterFields := aTable.MasterFields;
+ FRemoteFetchEnabled := aTable.RemoteFetchEnabled;
+ try
+ ATable.Filtered := False;
+ aTable.MasterSource := nil;
+ aTable.MasterFields := '';
+ aTable.RemoteFetchEnabled := False;
+ DataSource.DataTable := aTable;
+ Setup;
+ case ShowModal() of
+ mrOk: AAction := rdlgSkip;
+ mrCancel: AAction := rdlgCancel;
+ else AAction := rdlgNone;
+ end;
+ finally
+ aTable.RemoteFetchEnabled := FRemoteFetchEnabled;
+ aTable.Filtered := FFiltered;
+ aTable.MasterSource := FMasterDS;
+ aTable.MasterFields := FMasterFields
+ end;
+ finally
+ Release;
+ end;
+end;
+
+{ TShowDetailsForm }
+
+procedure TBusinessProcessorClientForm2.Setup;
+var
+ BizErrorMessage: TBizErrorMessage;
+begin
+ if FChange.ChangeType <> ctDelete then
+ with DataSource.DataTable do
+ if not Locate(RecIDFieldName, FChange.RecID, []) then RaiseError('Couldn''t find record #' + FormatRecIDString(FChange.RecID));
+ GenerateControls;
+ BizErrorMessage := TBizErrorMessage.Create;
+ try
+ BizErrorMessage.AsString := FChange.Message;
+ ApplyErrorMessage(BizErrorMessage);
+ finally
+ BizErrorMessage.Free;
+ end;
+
+ if Screen.Height > Self.Height + (ScrollBox.VertScrollBar.Range - ScrollBox.Height) then
+ Self.Height := Self.Height + (ScrollBox.VertScrollBar.Range - ScrollBox.Height)
+ else
+ Self.Height := Screen.Height;
+ case FChange.ChangeType of
+ ctInsert: OkButton.Caption := 'Skip';
+ ctUpdate: OkButton.Caption := 'Skip';
+ ctDelete: OkButton.Caption := 'Skip';
+ end;
+end;
+
+procedure TBusinessProcessorClientForm2.GenerateControls;
+var
+ i: integer;
+ aField: string;
+ aTop, aleft: integer;
+ FLabel: TLabel;
+ FdbEdit: TDBEdit;
+ FEdit: TEdit;
+begin
+ aleft := 7;
+ aTop := 7;
+ for i := 0 to FChange.Delta.LoggedFieldCount - 1 do begin
+ aField := FChange.Delta.LoggedFieldNames[i];
+ aTop := 7 + (3 + dbeditHeight) * i;
+ aleft := 7;
+
+ FLabel := TLabel.Create(Self);
+ with FLabel do begin
+ Parent := ScrollBox;
+ Name := 'l_' + aField;
+ Caption := aField;
+ Left := aleft;
+ Top := (dbeditHeight - Height) div 2 + aTop + 1;
+ Width := labelWidth;
+ aleft := aleft + 7 + labelWidth;
+ end;
+
+ if FChange.ChangeType in [ctInsert, ctUpdate] then begin
+ if Self.DataSource.DataTable.FieldByName(aField).DataType = datBlob then begin
+ FEdit := TEdit.Create(Self);
+ with FEdit do begin
+ Name := 'dbe_' + aField;
+ Parent := ScrollBox;
+ Left := aleft;
+ aleft := aleft + 7 + editWidth;
+ Top := aTop;
+ Width := editWidth;
+ ReadOnly := True;
+ Text := '[blob]';
+ end;
+ end
+ else begin
+ FdbEdit := TDBEdit.Create(Self);
+ with FdbEdit do begin
+ Name := 'dbe_' + aField;
+ DataSource := Self.DataSource;
+ Parent := ScrollBox;
+ DataField := aField;
+ Left := aleft;
+ Top := aTop;
+ Width := editWidth;
+ OnChange := OnFieldValueChanged;
+ aleft := aleft + 7 + editWidth;
+ if (FChange.ChangeType = ctUpdate) and
+ not ROVariantsEqual(FChange.OldValues[i], FChange.NewValues[i]) then
+ Color := c_Color;
+ end;
+ end;
+ end;
+
+ if FChange.ChangeType in [ctUpdate, ctDelete] then begin
+ FEdit := TEdit.Create(Self);
+ with FEdit do begin
+ Name := 'e_' + aField;
+ Parent := ScrollBox;
+ Left := aleft;
+ aleft := aleft + 7 + editWidth;
+ Top := aTop;
+ Width := editWidth;
+ ReadOnly := True;
+ Color := clBtnFace;
+ if Self.DataSource.DataTable.FieldByName(aField).DataType = datBlob then begin
+ Text := '[blob]'
+ end
+ else begin
+ case FChange.ChangeType of
+ ctDelete: text := VarToStr(FChange.OldValues[i]);
+ ctUpdate: begin
+ if not Self.DataSource.DataTable.HasReducedDelta then
+ text := VarToStr(FChange.OldValues[i])
+ else
+ if not VarIsEmpty(FChange.OldValues[i]) then
+ text := VarToStr(FChange.OldValues[i])
+ else text := Self.DataSource.DataTable.FieldByName(aField).AsString;
+ end;
+ end;
+ end;
+ end;
+ end;
+ end;
+ inc(aTop, 20);
+ inc(aLeft, 7);
+ //ScrollBox.HorzScrollBar.Range := aleft;
+ Self.ClientWidth := aleft + ScrollBox.VertScrollBar.Size + 2;
+ Self.Constraints.MinWidth := Self.Width;
+ Self.Constraints.MaxWidth := Self.Width;
+
+ ScrollBox.VertScrollBar.Range := aTop;
+end;
+
+procedure TBusinessProcessorClientForm2.FormCreate(Sender: TObject);
+begin
+ inherited;
+ with TDBEdit.Create(Self) do try
+ dbeditHeight := Height;
+ finally
+ free;
+ end;
+ with TLabel.Create(Self) do try
+ labelheight := Height;
+ finally
+ free;
+ end;
+ Datasource := TDADataSource.Create(Self);
+end;
+
+procedure TBusinessProcessorClientForm2.OkButtonClick(Sender: TObject);
+begin
+ if DataSource.DataTable.State in [dsEdit, dsInsert] then DataSource.DataTable.Post;
+end;
+
+procedure TBusinessProcessorClientForm2.CancelButtonClick(Sender: TObject);
+begin
+ if DataSource.DataTable.State in [dsEdit, dsInsert] then DataSource.DataTable.Cancel;
+end;
+
+procedure TBusinessProcessorClientForm2.ApplyErrorMessage(
+ BizErrorMessage: TBizErrorMessage);
+var
+ i: integer;
+ FLabel: TLabel;
+ Fcomp: TComponent;
+ aTop: integer;
+begin
+ ShowHint := True;
+ Caption := Datasource.DataTable.LogicalName;
+ FLabel := TLabel.Create(Self);
+ with FLabel do begin
+ Parent := TopPanel;
+ i := pos(sLineBreak, BizErrorMessage.Message);
+ if i = 0 then
+ Caption := BizErrorMessage.Message
+ else
+ Caption := copy(BizErrorMessage.Message, 1, i-1);
+ Hint := Caption;
+ Left := 7;
+ Top := 7;
+ AutoSize := true;
+ WordWrap := True;
+ AutoSize := False;
+ Height:= labelheight * (Width div (Parent.ClientWidth - Left * 2)+1);
+ Width := Parent.ClientWidth - Left * 2;
+{ if BizErrorMessage.ItemCount = 0 then
+ Height := labelheight * 4
+ else
+ Height := labelheight; }
+ aTop := Height + Top + 3;
+ Anchors := Anchors + [akRight];
+ end;
+
+ for i := 0 to BizErrorMessage.ItemCount - 1 do begin
+ with BizErrorMessage.Items[i] do begin
+ Fcomp := Self.FindComponent('l_' + Field);
+ if Fcomp <> nil then TLabel(Fcomp).Font.Color := clRed;
+
+ FLabel := TLabel.Create(Self);
+ with FLabel do begin
+ Parent := TopPanel;
+ Name := 'error_' + Field;
+ Caption := ErrorMessage;
+ Left := 7;
+ Top := aTop;
+ AutoSize := True;
+ Font.Color := clRed;
+ aTop := Height + Top + 3;
+ end;
+ end;
+ end;
+
+ TopPanel.ClientHeight := aTop;
+end;
+
+procedure TBusinessProcessorClientForm2.OnFieldValueChanged(
+ Sender: TObject);
+begin
+ OkButton.Caption := 'Update';
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorLibrary.RODL b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorLibrary.RODL
new file mode 100644
index 0000000..60a510d
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorLibrary.RODL
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorLibrary_Intf.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorLibrary_Intf.pas
new file mode 100644
index 0000000..2ff6be0
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorLibrary_Intf.pas
@@ -0,0 +1,77 @@
+unit BusinessProcessorLibrary_Intf;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROXMLIntf, uROClasses, uROClient, uROTypes, uROClientIntf,
+ {Used RODLs:} DataAbstract4_Intf;
+
+const
+ { Library ID }
+ LibraryUID = '{EBAEAB9A-1E78-4BB3-8417-2E226959496F}';
+ TargetNamespace = '';
+
+ { Service Interface ID's }
+ IBusinessProcessorService_IID : TGUID = '{4404161B-2A9E-4711-AADF-4493AC19BB34}';
+
+ { Event ID's }
+
+type
+ { Forward declarations }
+ IBusinessProcessorService = interface;
+
+
+
+
+ { IBusinessProcessorService }
+ IBusinessProcessorService = interface(IDataAbstractService)
+ ['{4404161B-2A9E-4711-AADF-4493AC19BB34}']
+ end;
+
+ { CoBusinessProcessorService }
+ CoBusinessProcessorService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IBusinessProcessorService;
+ end;
+
+ { TBusinessProcessorService_Proxy }
+ TBusinessProcessorService_Proxy = class(TDataAbstractService_Proxy, IBusinessProcessorService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ end;
+
+implementation
+
+uses
+ {vcl:} SysUtils,
+ {RemObjects:} uROEventRepository, uRORes;
+
+{ CoBusinessProcessorService }
+
+class function CoBusinessProcessorService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IBusinessProcessorService;
+begin
+ result := TBusinessProcessorService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+function TBusinessProcessorService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'BusinessProcessorService';
+end;
+
+initialization
+ RegisterProxyClass(IBusinessProcessorService_IID, TBusinessProcessorService_Proxy);
+
+
+finalization
+ UnregisterProxyClass(IBusinessProcessorService_IID);
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorLibrary_Invk.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorLibrary_Invk.pas
new file mode 100644
index 0000000..a265b95
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorLibrary_Invk.pas
@@ -0,0 +1,32 @@
+unit BusinessProcessorLibrary_Invk;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes,
+ {RemObjects:} uROXMLIntf, uROServer, uROServerIntf, uROTypes, uROClientIntf,
+ {Used RODL Intf's:} DataAbstract4_Intf,
+ {Used RODL Invk's:} DataAbstract4_Invk,
+ {Generated:} BusinessProcessorLibrary_Intf;
+
+type
+ TBusinessProcessorService_Invoker = class(TDataAbstractService_Invoker)
+ private
+ protected
+ published
+ end;
+
+implementation
+
+uses
+ {RemObjects:} uRORes, uROClient;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorServer.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorServer.bdsproj
new file mode 100644
index 0000000..4053265
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorServer.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {CF9814E2-631B-4FFA-A943-67792DA5CDC6}
+
+
+
+
+ BusinessProcessorServer.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorServer.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorServer.dpr
new file mode 100644
index 0000000..b304ddc
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorServer.dpr
@@ -0,0 +1,27 @@
+program BusinessProcessorServer;
+
+{#ROGEN:BusinessProcessorLibrary.RODL} // RemObjects SDK: Careful, do not remove!
+
+uses
+ uROComInit,
+ uROComboService,
+ Forms,
+ BusinessProcessorServerMain in 'BusinessProcessorServerMain.pas' {BusinessProcessorServerMainForm},
+ BusinessProcessorServerData in 'BusinessProcessorServerData.pas' {BusinessProcessorServerDataModule: TDataModule},
+ SchemaClient_Intf in 'SchemaClient_Intf.pas',
+ SchemaServer_Intf in 'SchemaServer_Intf.pas',
+ BizSchemaServer in 'BizSchemaServer.pas',
+ ServerGlobal in 'ServerGlobal.pas',
+ BusinessProcessorLibrary_Intf in 'BusinessProcessorLibrary_Intf.pas',
+ BusinessProcessorLibrary_Invk in 'BusinessProcessorLibrary_Invk.pas',
+ BusinessProcessorService_Impl in 'BusinessProcessorService_Impl.pas' {BusinessProcessorService: TDataAbstractService};
+
+{$R *.res}
+{$R RODLFile.res}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TBusinessProcessorServerDataModule, BusinessProcessorServerDataModule);
+ Application.CreateForm(TBusinessProcessorServerMainForm, BusinessProcessorServerMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorServer.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorServer.dproj
new file mode 100644
index 0000000..fc2e95e
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorServer.dproj
@@ -0,0 +1,84 @@
+
+
+ {dac310a9-44d2-4920-b4d5-46703300c98d}
+ BusinessProcessorServer.dpr
+ Debug
+ AnyCPU
+ DCC32
+ BusinessProcessorServer.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ BusinessProcessorServer.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorServer.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorServer.res
new file mode 100644
index 0000000..7455d6e
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorServer.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorServerData.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorServerData.dfm
new file mode 100644
index 0000000..5268506
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorServerData.dfm
@@ -0,0 +1,60 @@
+object BusinessProcessorServerDataModule: TBusinessProcessorServerDataModule
+ OldCreateOrder = False
+ OnCreate = DataModuleCreate
+ Left = 186
+ Top = 136
+ Height = 207
+ Width = 352
+ object Server: TROIndyHTTPServer
+ Dispatchers = <
+ item
+ Name = 'Message'
+ Message = Message
+ Enabled = True
+ PathInfo = 'Bin'
+ end>
+ Port = 8099
+ Left = 32
+ Top = 8
+ end
+ object Message: TROBinMessage
+ Left = 32
+ Top = 56
+ end
+ object ConnectionManager: TDAConnectionManager
+ Connections = <
+ item
+ Name = 'Northwind'
+ ConnectionString =
+ 'ADO?AuxDriver=SQLOLEDB.1;Server=localhost;Database=Northwind;Int' +
+ 'egrated Security=SSPI;'
+ Description = 'Microsoft SQL Server 2000, localhost'
+ Default = True
+ Tag = 0
+ end>
+ DriverManager = DriverManager
+ PoolingEnabled = True
+ Left = 136
+ Top = 56
+ end
+ object DriverManager: TDADriverManager
+ DriverDirectory = '%SYSTEM%\'
+ TraceActive = False
+ TraceFlags = []
+ Left = 136
+ Top = 10
+ end
+ object ADODriver: TDAADODriver
+ Left = 256
+ Top = 8
+ end
+ object DataDictionary: TDADataDictionary
+ Fields = <>
+ Left = 32
+ Top = 104
+ end
+ object SessionManager: TROInMemorySessionManager
+ Left = 136
+ Top = 104
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorServerData.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorServerData.pas
new file mode 100644
index 0000000..871cd5e
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorServerData.pas
@@ -0,0 +1,42 @@
+unit BusinessProcessorServerData;
+
+interface
+
+uses
+ SysUtils, Classes,
+ uROClient, uROPoweredByRemObjectsButton, uROClientIntf, uROServer,
+ uROBinMessage, uROIndyHTTPServer,
+ uDAEngine, uDADriverManager, uDAClasses, uROSessions,
+ uDAADODriver, uROIndyTCPServer;
+
+type
+ TBusinessProcessorServerDataModule = class(TDataModule)
+ Server: TROIndyHTTPServer;
+ Message: TROBinMessage;
+ ConnectionManager: TDAConnectionManager;
+ DriverManager: TDADriverManager;
+ ADODriver: TDAADODriver;
+ SessionManager: TROInMemorySessionManager;
+ DataDictionary: TDADataDictionary;
+
+ procedure DataModuleCreate(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ BusinessProcessorServerDataModule: TBusinessProcessorServerDataModule;
+
+implementation
+
+{$R *.dfm}
+
+procedure TBusinessProcessorServerDataModule.DataModuleCreate(Sender: TObject);
+begin
+ Server.Active := true;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorServerMain.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorServerMain.dfm
new file mode 100644
index 0000000..7d1094d
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorServerMain.dfm
@@ -0,0 +1,109 @@
+object BusinessProcessorServerMainForm: TBusinessProcessorServerMainForm
+ Left = 100
+ Top = 111
+ BorderStyle = bsDialog
+ Caption = 'Business Processor Server'
+ ClientHeight = 170
+ ClientWidth = 380
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnShow = FormShow
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Label1: TLabel
+ Left = 7
+ Top = 7
+ Width = 39
+ Height = 13
+ Caption = 'Checks:'
+ end
+ object GroupBox1: TGroupBox
+ Left = 7
+ Top = 24
+ Width = 365
+ Height = 73
+ Anchors = [akLeft, akTop, akRight]
+ Caption = 'Customers'
+ TabOrder = 0
+ object cbCheckCustomerID: TCheckBox
+ Left = 8
+ Top = 15
+ Width = 321
+ Height = 17
+ Caption = 'New records: CustomerID needs at least 5 characters'
+ TabOrder = 0
+ OnClick = cbCheckCustomerIDClick
+ end
+ object cbDeclineDeleteCustomers: TCheckBox
+ Left = 8
+ Top = 49
+ Width = 216
+ Height = 17
+ Caption = 'Restrict deleting records'
+ TabOrder = 1
+ OnClick = cbDeclineDeleteCustomersClick
+ end
+ object cbCompany: TCheckBox
+ Left = 8
+ Top = 32
+ Width = 228
+ Height = 17
+ Caption = 'New records: Company name for should be '
+ TabOrder = 2
+ OnClick = cbCompanyClick
+ end
+ object eCompany: TEdit
+ Left = 245
+ Top = 30
+ Width = 110
+ Height = 21
+ TabOrder = 3
+ Text = 'Company'
+ OnChange = eCompanyChange
+ end
+ end
+ object GroupBox2: TGroupBox
+ Left = 7
+ Top = 100
+ Width = 365
+ Height = 60
+ Anchors = [akLeft, akTop, akRight]
+ Caption = 'Orders'
+ TabOrder = 1
+ object cbFreight: TCheckBox
+ Left = 8
+ Top = 15
+ Width = 218
+ Height = 17
+ Caption = 'Freight should be greater than'
+ TabOrder = 0
+ OnClick = cbFreightClick
+ end
+ object cbDeclineDeleteOrders: TCheckBox
+ Left = 8
+ Top = 33
+ Width = 216
+ Height = 17
+ Caption = 'Restrict deleting of orders'
+ TabOrder = 1
+ OnClick = cbDeclineDeleteOrdersClick
+ end
+ object eFreight: TSpinEdit
+ Left = 245
+ Top = 12
+ Width = 110
+ Height = 22
+ MaxValue = 0
+ MinValue = 0
+ TabOrder = 2
+ Value = 0
+ OnChange = eFreightChange
+ end
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorServerMain.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorServerMain.pas
new file mode 100644
index 0000000..7d70ed7
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorServerMain.pas
@@ -0,0 +1,96 @@
+unit BusinessProcessorServerMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
+ uDAPoweredByDataAbstractButton, Spin;
+
+type
+ TBusinessProcessorServerMainForm = class(TForm)
+ Label1: TLabel;
+ GroupBox1: TGroupBox;
+ cbCheckCustomerID: TCheckBox;
+ cbDeclineDeleteCustomers: TCheckBox;
+ cbCompany: TCheckBox;
+ eCompany: TEdit;
+ GroupBox2: TGroupBox;
+ cbFreight: TCheckBox;
+ cbDeclineDeleteOrders: TCheckBox;
+ eFreight: TSpinEdit;
+ procedure cbCompanyClick(Sender: TObject);
+ procedure eCompanyChange(Sender: TObject);
+ procedure FormShow(Sender: TObject);
+ procedure cbFreightClick(Sender: TObject);
+ procedure eFreightChange(Sender: TObject);
+ procedure cbDeclineDeleteCustomersClick(Sender: TObject);
+ procedure cbDeclineDeleteOrdersClick(Sender: TObject);
+ procedure cbCheckCustomerIDClick(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ BusinessProcessorServerMainForm : TBusinessProcessorServerMainForm;
+
+implementation
+uses
+ ServerGlobal;
+{$R *.dfm}
+
+procedure TBusinessProcessorServerMainForm.cbCompanyClick(Sender: TObject);
+begin
+ eCompany.Enabled := cbCompany.Checked;
+ gCompanyCheck := cbCompany.Checked;
+ eCompanyChange(eCompany);
+end;
+
+procedure TBusinessProcessorServerMainForm.eCompanyChange(Sender: TObject);
+begin
+ gCompany := eCompany.Text;
+end;
+
+procedure TBusinessProcessorServerMainForm.FormShow(Sender: TObject);
+begin
+ eCompany.Text := gCompany;
+ eFreight.Value := gFreight;
+ cbCompany.Checked := gCompanyCheck;
+ cbFreight.Checked := gFreightCheck;
+ cbCompanyClick(cbCompany);
+ cbFreightClick(cbFreight);
+ cbDeclineDeleteCustomers.Checked := gDeclineDeleteCustomers;
+ cbDeclineDeleteOrders.Checked := gDeclineDeleteOrders;
+ cbCheckCustomerID.Checked := gCheckCustomerID;
+end;
+
+procedure TBusinessProcessorServerMainForm.cbFreightClick(Sender: TObject);
+begin
+ eFreight.Enabled := cbFreight.Checked;
+ gFreightCheck := cbFreight.Checked;
+ eFreightChange(eFreight);
+end;
+
+procedure TBusinessProcessorServerMainForm.eFreightChange(Sender: TObject);
+begin
+ gFreight := eFreight.Value;
+end;
+
+procedure TBusinessProcessorServerMainForm.cbDeclineDeleteCustomersClick(Sender: TObject);
+begin
+ gDeclineDeleteCustomers := cbDeclineDeleteCustomers.Checked;
+end;
+
+procedure TBusinessProcessorServerMainForm.cbDeclineDeleteOrdersClick(Sender: TObject);
+begin
+ gDeclineDeleteOrders := cbDeclineDeleteOrders.Checked;
+end;
+
+procedure TBusinessProcessorServerMainForm.cbCheckCustomerIDClick(Sender: TObject);
+begin
+ gCheckCustomerID := cbCheckCustomerID.Checked;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorService_Impl.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorService_Impl.dfm
new file mode 100644
index 0000000..227e306
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorService_Impl.dfm
@@ -0,0 +1,712 @@
+object BusinessProcessorService: TBusinessProcessorService
+ OldCreateOrder = True
+ SessionManager = BusinessProcessorServerDataModule.SessionManager
+ ServiceSchema = Schema
+ ServiceDataStreamer = DataStreamer
+ ExportedDataTables = <>
+ Left = 200
+ Top = 200
+ Height = 300
+ Width = 300
+ object DataStreamer: TDABinDataStreamer
+ Left = 32
+ Top = 8
+ end
+ object Schema: TDASchema
+ ConnectionManager = BusinessProcessorServerDataModule.ConnectionManager
+ DataDictionary = BusinessProcessorServerDataModule.DataDictionary
+ Datasets = <
+ item
+ Params = <>
+ Statements = <
+ item
+ Connection = 'Northwind'
+ TargetTable = 'Customers'
+ SQL =
+ 'SELECT '#10' CustomerID, CompanyName, ContactName, ContactTitle, ' +
+ #10' Address, City, Region, PostalCode, Country, Phone, '#10' Fax' +
+ #10' FROM'#10' Customers'#10
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'CustomerID'
+ TableField = 'CustomerID'
+ end
+ item
+ DatasetField = 'CompanyName'
+ TableField = 'CompanyName'
+ end
+ item
+ DatasetField = 'ContactName'
+ TableField = 'ContactName'
+ end
+ item
+ DatasetField = 'ContactTitle'
+ TableField = 'ContactTitle'
+ end
+ item
+ DatasetField = 'Address'
+ TableField = 'Address'
+ end
+ item
+ DatasetField = 'City'
+ TableField = 'City'
+ end
+ item
+ DatasetField = 'Region'
+ TableField = 'Region'
+ end
+ item
+ DatasetField = 'PostalCode'
+ TableField = 'PostalCode'
+ end
+ item
+ DatasetField = 'Country'
+ TableField = 'Country'
+ end
+ item
+ DatasetField = 'Phone'
+ TableField = 'Phone'
+ end
+ item
+ DatasetField = 'Fax'
+ TableField = 'Fax'
+ end>
+ end>
+ Name = 'Customers'
+ Fields = <
+ item
+ Name = 'CustomerID'
+ DataType = datWideString
+ Size = 5
+ BlobType = dabtUnknown
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CompanyName'
+ DataType = datWideString
+ Size = 40
+ BlobType = dabtUnknown
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ContactName'
+ DataType = datWideString
+ Size = 30
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ContactTitle'
+ DataType = datWideString
+ Size = 30
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Address'
+ DataType = datWideString
+ Size = 60
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'City'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Region'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'PostalCode'
+ DataType = datWideString
+ Size = 10
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Country'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Phone'
+ DataType = datWideString
+ Size = 24
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Fax'
+ DataType = datWideString
+ Size = 24
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ BusinessRulesClient.ScriptLanguage = rslPascalScript
+ BusinessRulesServer.ScriptLanguage = rslPascalScript
+ end
+ item
+ Params = <
+ item
+ Name = 'CustomerID'
+ DataType = datWideString
+ Size = 5
+ BlobType = dabtUnknown
+ Value = ''
+ ParamType = daptUnknown
+ end>
+ Statements = <
+ item
+ Connection = 'Northwind'
+ TargetTable = 'Orders'
+ SQL =
+ 'SELECT '#10' OrderID, CustomerID, EmployeeID, OrderDate, Required' +
+ 'Date, '#10' ShippedDate, ShipVia, Freight, ShipName, ShipAddress,' +
+ ' '#10' ShipCity, ShipRegion, ShipPostalCode, ShipCountry'#10' FROM'#10' ' +
+ ' Orders'#10' WHERE'#10' CustomerID = :CustomerID'#10
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'OrderID'
+ TableField = 'OrderID'
+ end
+ item
+ DatasetField = 'CustomerID'
+ TableField = 'CustomerID'
+ end
+ item
+ DatasetField = 'EmployeeID'
+ TableField = 'EmployeeID'
+ end
+ item
+ DatasetField = 'OrderDate'
+ TableField = 'OrderDate'
+ end
+ item
+ DatasetField = 'RequiredDate'
+ TableField = 'RequiredDate'
+ end
+ item
+ DatasetField = 'ShippedDate'
+ TableField = 'ShippedDate'
+ end
+ item
+ DatasetField = 'ShipVia'
+ TableField = 'ShipVia'
+ end
+ item
+ DatasetField = 'Freight'
+ TableField = 'Freight'
+ end
+ item
+ DatasetField = 'ShipName'
+ TableField = 'ShipName'
+ end
+ item
+ DatasetField = 'ShipAddress'
+ TableField = 'ShipAddress'
+ end
+ item
+ DatasetField = 'ShipCity'
+ TableField = 'ShipCity'
+ end
+ item
+ DatasetField = 'ShipRegion'
+ TableField = 'ShipRegion'
+ end
+ item
+ DatasetField = 'ShipPostalCode'
+ TableField = 'ShipPostalCode'
+ end
+ item
+ DatasetField = 'ShipCountry'
+ TableField = 'ShipCountry'
+ end>
+ end>
+ Name = 'Orders'
+ Fields = <
+ item
+ Name = 'OrderID'
+ DataType = datAutoInc
+ BlobType = dabtUnknown
+ LogChanges = False
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CustomerID'
+ DataType = datWideString
+ Size = 5
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'EmployeeID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'OrderDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'RequiredDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShippedDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipVia'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Freight'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipName'
+ DataType = datWideString
+ Size = 40
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipAddress'
+ DataType = datWideString
+ Size = 60
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipCity'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipRegion'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipPostalCode'
+ DataType = datWideString
+ Size = 10
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipCountry'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ BusinessRulesClient.ScriptLanguage = rslPascalScript
+ BusinessRulesServer.ScriptLanguage = rslPascalScript
+ end>
+ Commands = <
+ item
+ Params = <
+ item
+ Name = 'CustomerID'
+ DataType = datWideString
+ BlobType = dabtUnknown
+ Value = ''
+ ParamType = daptUnknown
+ end
+ item
+ Name = 'CompanyName'
+ DataType = datWideString
+ BlobType = dabtUnknown
+ Value = ''
+ ParamType = daptUnknown
+ end
+ item
+ Name = 'ContactName'
+ DataType = datWideString
+ BlobType = dabtUnknown
+ Value = ''
+ ParamType = daptUnknown
+ end
+ item
+ Name = 'ContactTitle'
+ DataType = datWideString
+ BlobType = dabtUnknown
+ Value = ''
+ ParamType = daptUnknown
+ end
+ item
+ Name = 'Address'
+ DataType = datWideString
+ BlobType = dabtUnknown
+ Value = ''
+ ParamType = daptUnknown
+ end
+ item
+ Name = 'City'
+ DataType = datWideString
+ BlobType = dabtUnknown
+ Value = ''
+ ParamType = daptUnknown
+ end
+ item
+ Name = 'Region'
+ DataType = datWideString
+ BlobType = dabtUnknown
+ Value = ''
+ ParamType = daptUnknown
+ end
+ item
+ Name = 'PostalCode'
+ DataType = datWideString
+ BlobType = dabtUnknown
+ Value = ''
+ ParamType = daptUnknown
+ end
+ item
+ Name = 'Country'
+ DataType = datWideString
+ BlobType = dabtUnknown
+ Value = ''
+ ParamType = daptUnknown
+ end
+ item
+ Name = 'Phone'
+ DataType = datWideString
+ BlobType = dabtUnknown
+ Value = ''
+ ParamType = daptUnknown
+ end
+ item
+ Name = 'Fax'
+ DataType = datWideString
+ BlobType = dabtUnknown
+ Value = ''
+ ParamType = daptUnknown
+ end>
+ Statements = <
+ item
+ Connection = 'Northwind'
+ TargetTable = 'Customers'
+ SQL =
+ 'INSERT'#10' INTO Customers'#10' (CustomerID, CompanyName, ContactNam' +
+ 'e, ContactTitle, '#10' Address, City, Region, PostalCode, Countr' +
+ 'y, Phone, '#10' Fax)'#10' VALUES'#10' (:CustomerID, :CompanyName, :C' +
+ 'ontactName, :ContactTitle, '#10' :Address, :City, :Region, :Post' +
+ 'alCode, :Country, :Phone, '#10' :Fax)'
+ StatementType = stSQL
+ ColumnMappings = <>
+ end>
+ Name = 'Insert_Customers'
+ end
+ item
+ Params = <
+ item
+ Name = 'OLD_CustomerID'
+ DataType = datWideString
+ BlobType = dabtUnknown
+ Value = ''
+ ParamType = daptUnknown
+ end>
+ Statements = <
+ item
+ Connection = 'Northwind'
+ TargetTable = 'Customers'
+ SQL =
+ 'DELETE '#10' FROM'#10' Customers'#10' WHERE'#10' (CustomerID = :OLD_Cust' +
+ 'omerID)'
+ StatementType = stSQL
+ ColumnMappings = <>
+ end>
+ Name = 'Delete_Customers'
+ end
+ item
+ Params = <
+ item
+ Name = 'CustomerID'
+ DataType = datWideString
+ BlobType = dabtUnknown
+ Value = ''
+ ParamType = daptUnknown
+ end
+ item
+ Name = 'CompanyName'
+ DataType = datWideString
+ BlobType = dabtUnknown
+ Value = ''
+ ParamType = daptUnknown
+ end
+ item
+ Name = 'ContactName'
+ DataType = datWideString
+ BlobType = dabtUnknown
+ Value = ''
+ ParamType = daptUnknown
+ end
+ item
+ Name = 'ContactTitle'
+ DataType = datWideString
+ BlobType = dabtUnknown
+ Value = ''
+ ParamType = daptUnknown
+ end
+ item
+ Name = 'Address'
+ DataType = datWideString
+ BlobType = dabtUnknown
+ Value = ''
+ ParamType = daptUnknown
+ end
+ item
+ Name = 'City'
+ DataType = datWideString
+ BlobType = dabtUnknown
+ Value = ''
+ ParamType = daptUnknown
+ end
+ item
+ Name = 'Region'
+ DataType = datWideString
+ BlobType = dabtUnknown
+ Value = ''
+ ParamType = daptUnknown
+ end
+ item
+ Name = 'PostalCode'
+ DataType = datWideString
+ BlobType = dabtUnknown
+ Value = ''
+ ParamType = daptUnknown
+ end
+ item
+ Name = 'Country'
+ DataType = datWideString
+ BlobType = dabtUnknown
+ Value = ''
+ ParamType = daptUnknown
+ end
+ item
+ Name = 'Phone'
+ DataType = datWideString
+ BlobType = dabtUnknown
+ Value = ''
+ ParamType = daptUnknown
+ end
+ item
+ Name = 'Fax'
+ DataType = datWideString
+ BlobType = dabtUnknown
+ Value = ''
+ ParamType = daptUnknown
+ end
+ item
+ Name = 'OLD_CustomerID'
+ DataType = datWideString
+ BlobType = dabtUnknown
+ Value = ''
+ ParamType = daptUnknown
+ end>
+ Statements = <
+ item
+ Connection = 'Northwind'
+ TargetTable = 'Customers'
+ SQL =
+ 'UPDATE Customers'#10' SET '#10' CustomerID = :CustomerID, '#10' Compa' +
+ 'nyName = :CompanyName, '#10' ContactName = :ContactName, '#10' Con' +
+ 'tactTitle = :ContactTitle, '#10' Address = :Address, '#10' City = ' +
+ ':City, '#10' Region = :Region, '#10' PostalCode = :PostalCode, '#10' ' +
+ ' Country = :Country, '#10' Phone = :Phone, '#10' Fax = :Fax'#10' WHE' +
+ 'RE'#10' (CustomerID = :OLD_CustomerID)'
+ StatementType = stSQL
+ ColumnMappings = <>
+ end>
+ Name = 'Update_Customers'
+ end>
+ RelationShips = <
+ item
+ Name = 'Relationship'
+ MasterDatasetName = 'Customers'
+ MasterFields = 'CustomerID'
+ DetailDatasetName = 'Orders'
+ DetailFields = 'CustomerID'
+ end>
+ UpdateRules = <>
+ Left = 32
+ Top = 56
+ end
+ object bpCustomers: TDABusinessProcessor
+ Schema = Schema
+ InsertCommandName = 'Insert_Customers'
+ DeleteCommandName = 'Delete_Customers'
+ UpdateCommandName = 'Update_Customers'
+ ReferencedDataset = 'Customers'
+ ProcessorOptions = [poAutoGenerateInsert, poAutoGenerateUpdate, poAutoGenerateDelete, poAutoGenerateRefreshDataset, poPrepareCommands]
+ UpdateMode = updWhereKeyOnly
+ BusinessRulesID = 'Customers.ServerRules'
+ Left = 76
+ Top = 55
+ end
+ object bpOrders: TDABusinessProcessor
+ Schema = Schema
+ ReferencedDataset = 'Orders'
+ ProcessorOptions = [poAutoGenerateInsert, poAutoGenerateUpdate, poAutoGenerateDelete, poAutoGenerateRefreshDataset, poPrepareCommands]
+ UpdateMode = updWhereKeyOnly
+ BusinessRulesID = 'Orders.ServerRules'
+ Left = 80
+ Top = 98
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorService_Impl.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorService_Impl.pas
new file mode 100644
index 0000000..f0baff7
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/BusinessProcessorService_Impl.pas
@@ -0,0 +1,50 @@
+unit BusinessProcessorService_Impl;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ This is where you are supposed to code the implementation of your objects. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils,
+ {RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
+ {Required:} uRORemoteDataModule,
+ {Ancestor Implementation:} DataAbstractService_Impl,
+ {Used RODLs:} DataAbstract4_Intf,
+ {Generated:} BusinessProcessorLibrary_Intf, uDAScriptingProvider,
+ uDABusinessProcessor, uDAClasses, uDADataStreamer, uDABinAdapter;
+
+type
+ { TBusinessProcessorService }
+ TBusinessProcessorService = class(TDataAbstractService, IBusinessProcessorService)
+ DataStreamer: TDABinDataStreamer;
+ Schema: TDASchema;
+ bpCustomers: TDABusinessProcessor;
+ bpOrders: TDABusinessProcessor;
+ private
+ protected
+ { IBusinessProcessorService methods }
+ end;
+
+implementation
+
+{$R *.dfm}
+uses
+ {Generated:} BusinessProcessorLibrary_Invk,BusinessProcessorServerData;
+
+procedure Create_BusinessProcessorService(out anInstance : IUnknown);
+begin
+ anInstance := TBusinessProcessorService.Create(nil);
+end;
+
+{ BusinessProcessorService }
+initialization
+ TROClassFactory.Create('BusinessProcessorService', Create_BusinessProcessorService, TBusinessProcessorService_Invoker);
+
+finalization
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/RODLFILE.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/RODLFILE.res
new file mode 100644
index 0000000..6919cc8
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/RODLFILE.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/SchemaClient_Intf.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/SchemaClient_Intf.pas
new file mode 100644
index 0000000..e7dda72
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/SchemaClient_Intf.pas
@@ -0,0 +1,981 @@
+unit SchemaClient_Intf;
+
+interface
+
+uses
+ Classes, DB, SysUtils, uROClasses, uDADataTable;
+
+const
+ { Data table rules ids
+ Feel free to change them to something more human readable
+ but make sure they are unique in the context of your application }
+ RID_Customers = '{A9F7C630-77E0-44A8-B46B-E3EE67954A42}';
+ RID_Orders = '{B5125DCD-A27D-488D-A1A2-4FB5D49D7079}';
+
+ { Data table names }
+ nme_Customers = 'Customers';
+ nme_Orders = 'Orders';
+
+ { Customers fields }
+ fld_CustomersCustomerID = 'CustomerID';
+ fld_CustomersCompanyName = 'CompanyName';
+ fld_CustomersContactName = 'ContactName';
+ fld_CustomersContactTitle = 'ContactTitle';
+ fld_CustomersAddress = 'Address';
+ fld_CustomersCity = 'City';
+ fld_CustomersRegion = 'Region';
+ fld_CustomersPostalCode = 'PostalCode';
+ fld_CustomersCountry = 'Country';
+ fld_CustomersPhone = 'Phone';
+ fld_CustomersFax = 'Fax';
+
+ { Customers field indexes }
+ idx_CustomersCustomerID = 0;
+ idx_CustomersCompanyName = 1;
+ idx_CustomersContactName = 2;
+ idx_CustomersContactTitle = 3;
+ idx_CustomersAddress = 4;
+ idx_CustomersCity = 5;
+ idx_CustomersRegion = 6;
+ idx_CustomersPostalCode = 7;
+ idx_CustomersCountry = 8;
+ idx_CustomersPhone = 9;
+ idx_CustomersFax = 10;
+
+ { Orders fields }
+ fld_OrdersOrderID = 'OrderID';
+ fld_OrdersCustomerID = 'CustomerID';
+ fld_OrdersEmployeeID = 'EmployeeID';
+ fld_OrdersOrderDate = 'OrderDate';
+ fld_OrdersRequiredDate = 'RequiredDate';
+ fld_OrdersShippedDate = 'ShippedDate';
+ fld_OrdersShipVia = 'ShipVia';
+ fld_OrdersFreight = 'Freight';
+ fld_OrdersShipName = 'ShipName';
+ fld_OrdersShipAddress = 'ShipAddress';
+ fld_OrdersShipCity = 'ShipCity';
+ fld_OrdersShipRegion = 'ShipRegion';
+ fld_OrdersShipPostalCode = 'ShipPostalCode';
+ fld_OrdersShipCountry = 'ShipCountry';
+
+ { Orders field indexes }
+ idx_OrdersOrderID = 0;
+ idx_OrdersCustomerID = 1;
+ idx_OrdersEmployeeID = 2;
+ idx_OrdersOrderDate = 3;
+ idx_OrdersRequiredDate = 4;
+ idx_OrdersShippedDate = 5;
+ idx_OrdersShipVia = 6;
+ idx_OrdersFreight = 7;
+ idx_OrdersShipName = 8;
+ idx_OrdersShipAddress = 9;
+ idx_OrdersShipCity = 10;
+ idx_OrdersShipRegion = 11;
+ idx_OrdersShipPostalCode = 12;
+ idx_OrdersShipCountry = 13;
+
+type
+ { ICustomers }
+ ICustomers = interface(IDAStronglyTypedDataTable)
+ ['{AD74260F-B808-430E-85E6-FB469055C068}']
+ { Property getters and setters }
+ function GetCustomerIDValue: WideString;
+ procedure SetCustomerIDValue(const aValue: WideString);
+ function GetCustomerIDIsNull: Boolean;
+ procedure SetCustomerIDIsNull(const aValue: Boolean);
+ function GetCompanyNameValue: WideString;
+ procedure SetCompanyNameValue(const aValue: WideString);
+ function GetCompanyNameIsNull: Boolean;
+ procedure SetCompanyNameIsNull(const aValue: Boolean);
+ function GetContactNameValue: WideString;
+ procedure SetContactNameValue(const aValue: WideString);
+ function GetContactNameIsNull: Boolean;
+ procedure SetContactNameIsNull(const aValue: Boolean);
+ function GetContactTitleValue: WideString;
+ procedure SetContactTitleValue(const aValue: WideString);
+ function GetContactTitleIsNull: Boolean;
+ procedure SetContactTitleIsNull(const aValue: Boolean);
+ function GetAddressValue: WideString;
+ procedure SetAddressValue(const aValue: WideString);
+ function GetAddressIsNull: Boolean;
+ procedure SetAddressIsNull(const aValue: Boolean);
+ function GetCityValue: WideString;
+ procedure SetCityValue(const aValue: WideString);
+ function GetCityIsNull: Boolean;
+ procedure SetCityIsNull(const aValue: Boolean);
+ function GetRegionValue: WideString;
+ procedure SetRegionValue(const aValue: WideString);
+ function GetRegionIsNull: Boolean;
+ procedure SetRegionIsNull(const aValue: Boolean);
+ function GetPostalCodeValue: WideString;
+ procedure SetPostalCodeValue(const aValue: WideString);
+ function GetPostalCodeIsNull: Boolean;
+ procedure SetPostalCodeIsNull(const aValue: Boolean);
+ function GetCountryValue: WideString;
+ procedure SetCountryValue(const aValue: WideString);
+ function GetCountryIsNull: Boolean;
+ procedure SetCountryIsNull(const aValue: Boolean);
+ function GetPhoneValue: WideString;
+ procedure SetPhoneValue(const aValue: WideString);
+ function GetPhoneIsNull: Boolean;
+ procedure SetPhoneIsNull(const aValue: Boolean);
+ function GetFaxValue: WideString;
+ procedure SetFaxValue(const aValue: WideString);
+ function GetFaxIsNull: Boolean;
+ procedure SetFaxIsNull(const aValue: Boolean);
+
+
+ { Properties }
+ property CustomerID: WideString read GetCustomerIDValue write SetCustomerIDValue;
+ property CustomerIDIsNull: Boolean read GetCustomerIDIsNull write SetCustomerIDIsNull;
+ property CompanyName: WideString read GetCompanyNameValue write SetCompanyNameValue;
+ property CompanyNameIsNull: Boolean read GetCompanyNameIsNull write SetCompanyNameIsNull;
+ property ContactName: WideString read GetContactNameValue write SetContactNameValue;
+ property ContactNameIsNull: Boolean read GetContactNameIsNull write SetContactNameIsNull;
+ property ContactTitle: WideString read GetContactTitleValue write SetContactTitleValue;
+ property ContactTitleIsNull: Boolean read GetContactTitleIsNull write SetContactTitleIsNull;
+ property Address: WideString read GetAddressValue write SetAddressValue;
+ property AddressIsNull: Boolean read GetAddressIsNull write SetAddressIsNull;
+ property City: WideString read GetCityValue write SetCityValue;
+ property CityIsNull: Boolean read GetCityIsNull write SetCityIsNull;
+ property Region: WideString read GetRegionValue write SetRegionValue;
+ property RegionIsNull: Boolean read GetRegionIsNull write SetRegionIsNull;
+ property PostalCode: WideString read GetPostalCodeValue write SetPostalCodeValue;
+ property PostalCodeIsNull: Boolean read GetPostalCodeIsNull write SetPostalCodeIsNull;
+ property Country: WideString read GetCountryValue write SetCountryValue;
+ property CountryIsNull: Boolean read GetCountryIsNull write SetCountryIsNull;
+ property Phone: WideString read GetPhoneValue write SetPhoneValue;
+ property PhoneIsNull: Boolean read GetPhoneIsNull write SetPhoneIsNull;
+ property Fax: WideString read GetFaxValue write SetFaxValue;
+ property FaxIsNull: Boolean read GetFaxIsNull write SetFaxIsNull;
+ end;
+
+ { TCustomersDataTableRules }
+ TCustomersDataTableRules = class(TDADataTableRules, ICustomers)
+ private
+ protected
+ { Property getters and setters }
+ function GetCustomerIDValue: WideString; virtual;
+ procedure SetCustomerIDValue(const aValue: WideString); virtual;
+ function GetCustomerIDIsNull: Boolean; virtual;
+ procedure SetCustomerIDIsNull(const aValue: Boolean); virtual;
+ function GetCompanyNameValue: WideString; virtual;
+ procedure SetCompanyNameValue(const aValue: WideString); virtual;
+ function GetCompanyNameIsNull: Boolean; virtual;
+ procedure SetCompanyNameIsNull(const aValue: Boolean); virtual;
+ function GetContactNameValue: WideString; virtual;
+ procedure SetContactNameValue(const aValue: WideString); virtual;
+ function GetContactNameIsNull: Boolean; virtual;
+ procedure SetContactNameIsNull(const aValue: Boolean); virtual;
+ function GetContactTitleValue: WideString; virtual;
+ procedure SetContactTitleValue(const aValue: WideString); virtual;
+ function GetContactTitleIsNull: Boolean; virtual;
+ procedure SetContactTitleIsNull(const aValue: Boolean); virtual;
+ function GetAddressValue: WideString; virtual;
+ procedure SetAddressValue(const aValue: WideString); virtual;
+ function GetAddressIsNull: Boolean; virtual;
+ procedure SetAddressIsNull(const aValue: Boolean); virtual;
+ function GetCityValue: WideString; virtual;
+ procedure SetCityValue(const aValue: WideString); virtual;
+ function GetCityIsNull: Boolean; virtual;
+ procedure SetCityIsNull(const aValue: Boolean); virtual;
+ function GetRegionValue: WideString; virtual;
+ procedure SetRegionValue(const aValue: WideString); virtual;
+ function GetRegionIsNull: Boolean; virtual;
+ procedure SetRegionIsNull(const aValue: Boolean); virtual;
+ function GetPostalCodeValue: WideString; virtual;
+ procedure SetPostalCodeValue(const aValue: WideString); virtual;
+ function GetPostalCodeIsNull: Boolean; virtual;
+ procedure SetPostalCodeIsNull(const aValue: Boolean); virtual;
+ function GetCountryValue: WideString; virtual;
+ procedure SetCountryValue(const aValue: WideString); virtual;
+ function GetCountryIsNull: Boolean; virtual;
+ procedure SetCountryIsNull(const aValue: Boolean); virtual;
+ function GetPhoneValue: WideString; virtual;
+ procedure SetPhoneValue(const aValue: WideString); virtual;
+ function GetPhoneIsNull: Boolean; virtual;
+ procedure SetPhoneIsNull(const aValue: Boolean); virtual;
+ function GetFaxValue: WideString; virtual;
+ procedure SetFaxValue(const aValue: WideString); virtual;
+ function GetFaxIsNull: Boolean; virtual;
+ procedure SetFaxIsNull(const aValue: Boolean); virtual;
+
+ { Properties }
+ property CustomerID: WideString read GetCustomerIDValue write SetCustomerIDValue;
+ property CustomerIDIsNull: Boolean read GetCustomerIDIsNull write SetCustomerIDIsNull;
+ property CompanyName: WideString read GetCompanyNameValue write SetCompanyNameValue;
+ property CompanyNameIsNull: Boolean read GetCompanyNameIsNull write SetCompanyNameIsNull;
+ property ContactName: WideString read GetContactNameValue write SetContactNameValue;
+ property ContactNameIsNull: Boolean read GetContactNameIsNull write SetContactNameIsNull;
+ property ContactTitle: WideString read GetContactTitleValue write SetContactTitleValue;
+ property ContactTitleIsNull: Boolean read GetContactTitleIsNull write SetContactTitleIsNull;
+ property Address: WideString read GetAddressValue write SetAddressValue;
+ property AddressIsNull: Boolean read GetAddressIsNull write SetAddressIsNull;
+ property City: WideString read GetCityValue write SetCityValue;
+ property CityIsNull: Boolean read GetCityIsNull write SetCityIsNull;
+ property Region: WideString read GetRegionValue write SetRegionValue;
+ property RegionIsNull: Boolean read GetRegionIsNull write SetRegionIsNull;
+ property PostalCode: WideString read GetPostalCodeValue write SetPostalCodeValue;
+ property PostalCodeIsNull: Boolean read GetPostalCodeIsNull write SetPostalCodeIsNull;
+ property Country: WideString read GetCountryValue write SetCountryValue;
+ property CountryIsNull: Boolean read GetCountryIsNull write SetCountryIsNull;
+ property Phone: WideString read GetPhoneValue write SetPhoneValue;
+ property PhoneIsNull: Boolean read GetPhoneIsNull write SetPhoneIsNull;
+ property Fax: WideString read GetFaxValue write SetFaxValue;
+ property FaxIsNull: Boolean read GetFaxIsNull write SetFaxIsNull;
+
+ public
+ constructor Create(aDataTable: TDADataTable); override;
+ destructor Destroy; override;
+
+ end;
+
+ { IOrders }
+ IOrders = interface(IDAStronglyTypedDataTable)
+ ['{837F52E1-CF1E-44B5-9026-31E65685B868}']
+ { Property getters and setters }
+ function GetOrderIDValue: Integer;
+ procedure SetOrderIDValue(const aValue: Integer);
+ function GetOrderIDIsNull: Boolean;
+ procedure SetOrderIDIsNull(const aValue: Boolean);
+ function GetCustomerIDValue: WideString;
+ procedure SetCustomerIDValue(const aValue: WideString);
+ function GetCustomerIDIsNull: Boolean;
+ procedure SetCustomerIDIsNull(const aValue: Boolean);
+ function GetEmployeeIDValue: Integer;
+ procedure SetEmployeeIDValue(const aValue: Integer);
+ function GetEmployeeIDIsNull: Boolean;
+ procedure SetEmployeeIDIsNull(const aValue: Boolean);
+ function GetOrderDateValue: DateTime;
+ procedure SetOrderDateValue(const aValue: DateTime);
+ function GetOrderDateIsNull: Boolean;
+ procedure SetOrderDateIsNull(const aValue: Boolean);
+ function GetRequiredDateValue: DateTime;
+ procedure SetRequiredDateValue(const aValue: DateTime);
+ function GetRequiredDateIsNull: Boolean;
+ procedure SetRequiredDateIsNull(const aValue: Boolean);
+ function GetShippedDateValue: DateTime;
+ procedure SetShippedDateValue(const aValue: DateTime);
+ function GetShippedDateIsNull: Boolean;
+ procedure SetShippedDateIsNull(const aValue: Boolean);
+ function GetShipViaValue: Integer;
+ procedure SetShipViaValue(const aValue: Integer);
+ function GetShipViaIsNull: Boolean;
+ procedure SetShipViaIsNull(const aValue: Boolean);
+ function GetFreightValue: Float;
+ procedure SetFreightValue(const aValue: Float);
+ function GetFreightIsNull: Boolean;
+ procedure SetFreightIsNull(const aValue: Boolean);
+ function GetShipNameValue: WideString;
+ procedure SetShipNameValue(const aValue: WideString);
+ function GetShipNameIsNull: Boolean;
+ procedure SetShipNameIsNull(const aValue: Boolean);
+ function GetShipAddressValue: WideString;
+ procedure SetShipAddressValue(const aValue: WideString);
+ function GetShipAddressIsNull: Boolean;
+ procedure SetShipAddressIsNull(const aValue: Boolean);
+ function GetShipCityValue: WideString;
+ procedure SetShipCityValue(const aValue: WideString);
+ function GetShipCityIsNull: Boolean;
+ procedure SetShipCityIsNull(const aValue: Boolean);
+ function GetShipRegionValue: WideString;
+ procedure SetShipRegionValue(const aValue: WideString);
+ function GetShipRegionIsNull: Boolean;
+ procedure SetShipRegionIsNull(const aValue: Boolean);
+ function GetShipPostalCodeValue: WideString;
+ procedure SetShipPostalCodeValue(const aValue: WideString);
+ function GetShipPostalCodeIsNull: Boolean;
+ procedure SetShipPostalCodeIsNull(const aValue: Boolean);
+ function GetShipCountryValue: WideString;
+ procedure SetShipCountryValue(const aValue: WideString);
+ function GetShipCountryIsNull: Boolean;
+ procedure SetShipCountryIsNull(const aValue: Boolean);
+
+
+ { Properties }
+ property OrderID: Integer read GetOrderIDValue write SetOrderIDValue;
+ property OrderIDIsNull: Boolean read GetOrderIDIsNull write SetOrderIDIsNull;
+ property CustomerID: WideString read GetCustomerIDValue write SetCustomerIDValue;
+ property CustomerIDIsNull: Boolean read GetCustomerIDIsNull write SetCustomerIDIsNull;
+ property EmployeeID: Integer read GetEmployeeIDValue write SetEmployeeIDValue;
+ property EmployeeIDIsNull: Boolean read GetEmployeeIDIsNull write SetEmployeeIDIsNull;
+ property OrderDate: DateTime read GetOrderDateValue write SetOrderDateValue;
+ property OrderDateIsNull: Boolean read GetOrderDateIsNull write SetOrderDateIsNull;
+ property RequiredDate: DateTime read GetRequiredDateValue write SetRequiredDateValue;
+ property RequiredDateIsNull: Boolean read GetRequiredDateIsNull write SetRequiredDateIsNull;
+ property ShippedDate: DateTime read GetShippedDateValue write SetShippedDateValue;
+ property ShippedDateIsNull: Boolean read GetShippedDateIsNull write SetShippedDateIsNull;
+ property ShipVia: Integer read GetShipViaValue write SetShipViaValue;
+ property ShipViaIsNull: Boolean read GetShipViaIsNull write SetShipViaIsNull;
+ property Freight: Float read GetFreightValue write SetFreightValue;
+ property FreightIsNull: Boolean read GetFreightIsNull write SetFreightIsNull;
+ property ShipName: WideString read GetShipNameValue write SetShipNameValue;
+ property ShipNameIsNull: Boolean read GetShipNameIsNull write SetShipNameIsNull;
+ property ShipAddress: WideString read GetShipAddressValue write SetShipAddressValue;
+ property ShipAddressIsNull: Boolean read GetShipAddressIsNull write SetShipAddressIsNull;
+ property ShipCity: WideString read GetShipCityValue write SetShipCityValue;
+ property ShipCityIsNull: Boolean read GetShipCityIsNull write SetShipCityIsNull;
+ property ShipRegion: WideString read GetShipRegionValue write SetShipRegionValue;
+ property ShipRegionIsNull: Boolean read GetShipRegionIsNull write SetShipRegionIsNull;
+ property ShipPostalCode: WideString read GetShipPostalCodeValue write SetShipPostalCodeValue;
+ property ShipPostalCodeIsNull: Boolean read GetShipPostalCodeIsNull write SetShipPostalCodeIsNull;
+ property ShipCountry: WideString read GetShipCountryValue write SetShipCountryValue;
+ property ShipCountryIsNull: Boolean read GetShipCountryIsNull write SetShipCountryIsNull;
+ end;
+
+ { TOrdersDataTableRules }
+ TOrdersDataTableRules = class(TDADataTableRules, IOrders)
+ private
+ protected
+ { Property getters and setters }
+ function GetOrderIDValue: Integer; virtual;
+ procedure SetOrderIDValue(const aValue: Integer); virtual;
+ function GetOrderIDIsNull: Boolean; virtual;
+ procedure SetOrderIDIsNull(const aValue: Boolean); virtual;
+ function GetCustomerIDValue: WideString; virtual;
+ procedure SetCustomerIDValue(const aValue: WideString); virtual;
+ function GetCustomerIDIsNull: Boolean; virtual;
+ procedure SetCustomerIDIsNull(const aValue: Boolean); virtual;
+ function GetEmployeeIDValue: Integer; virtual;
+ procedure SetEmployeeIDValue(const aValue: Integer); virtual;
+ function GetEmployeeIDIsNull: Boolean; virtual;
+ procedure SetEmployeeIDIsNull(const aValue: Boolean); virtual;
+ function GetOrderDateValue: DateTime; virtual;
+ procedure SetOrderDateValue(const aValue: DateTime); virtual;
+ function GetOrderDateIsNull: Boolean; virtual;
+ procedure SetOrderDateIsNull(const aValue: Boolean); virtual;
+ function GetRequiredDateValue: DateTime; virtual;
+ procedure SetRequiredDateValue(const aValue: DateTime); virtual;
+ function GetRequiredDateIsNull: Boolean; virtual;
+ procedure SetRequiredDateIsNull(const aValue: Boolean); virtual;
+ function GetShippedDateValue: DateTime; virtual;
+ procedure SetShippedDateValue(const aValue: DateTime); virtual;
+ function GetShippedDateIsNull: Boolean; virtual;
+ procedure SetShippedDateIsNull(const aValue: Boolean); virtual;
+ function GetShipViaValue: Integer; virtual;
+ procedure SetShipViaValue(const aValue: Integer); virtual;
+ function GetShipViaIsNull: Boolean; virtual;
+ procedure SetShipViaIsNull(const aValue: Boolean); virtual;
+ function GetFreightValue: Float; virtual;
+ procedure SetFreightValue(const aValue: Float); virtual;
+ function GetFreightIsNull: Boolean; virtual;
+ procedure SetFreightIsNull(const aValue: Boolean); virtual;
+ function GetShipNameValue: WideString; virtual;
+ procedure SetShipNameValue(const aValue: WideString); virtual;
+ function GetShipNameIsNull: Boolean; virtual;
+ procedure SetShipNameIsNull(const aValue: Boolean); virtual;
+ function GetShipAddressValue: WideString; virtual;
+ procedure SetShipAddressValue(const aValue: WideString); virtual;
+ function GetShipAddressIsNull: Boolean; virtual;
+ procedure SetShipAddressIsNull(const aValue: Boolean); virtual;
+ function GetShipCityValue: WideString; virtual;
+ procedure SetShipCityValue(const aValue: WideString); virtual;
+ function GetShipCityIsNull: Boolean; virtual;
+ procedure SetShipCityIsNull(const aValue: Boolean); virtual;
+ function GetShipRegionValue: WideString; virtual;
+ procedure SetShipRegionValue(const aValue: WideString); virtual;
+ function GetShipRegionIsNull: Boolean; virtual;
+ procedure SetShipRegionIsNull(const aValue: Boolean); virtual;
+ function GetShipPostalCodeValue: WideString; virtual;
+ procedure SetShipPostalCodeValue(const aValue: WideString); virtual;
+ function GetShipPostalCodeIsNull: Boolean; virtual;
+ procedure SetShipPostalCodeIsNull(const aValue: Boolean); virtual;
+ function GetShipCountryValue: WideString; virtual;
+ procedure SetShipCountryValue(const aValue: WideString); virtual;
+ function GetShipCountryIsNull: Boolean; virtual;
+ procedure SetShipCountryIsNull(const aValue: Boolean); virtual;
+
+ { Properties }
+ property OrderID: Integer read GetOrderIDValue write SetOrderIDValue;
+ property OrderIDIsNull: Boolean read GetOrderIDIsNull write SetOrderIDIsNull;
+ property CustomerID: WideString read GetCustomerIDValue write SetCustomerIDValue;
+ property CustomerIDIsNull: Boolean read GetCustomerIDIsNull write SetCustomerIDIsNull;
+ property EmployeeID: Integer read GetEmployeeIDValue write SetEmployeeIDValue;
+ property EmployeeIDIsNull: Boolean read GetEmployeeIDIsNull write SetEmployeeIDIsNull;
+ property OrderDate: DateTime read GetOrderDateValue write SetOrderDateValue;
+ property OrderDateIsNull: Boolean read GetOrderDateIsNull write SetOrderDateIsNull;
+ property RequiredDate: DateTime read GetRequiredDateValue write SetRequiredDateValue;
+ property RequiredDateIsNull: Boolean read GetRequiredDateIsNull write SetRequiredDateIsNull;
+ property ShippedDate: DateTime read GetShippedDateValue write SetShippedDateValue;
+ property ShippedDateIsNull: Boolean read GetShippedDateIsNull write SetShippedDateIsNull;
+ property ShipVia: Integer read GetShipViaValue write SetShipViaValue;
+ property ShipViaIsNull: Boolean read GetShipViaIsNull write SetShipViaIsNull;
+ property Freight: Float read GetFreightValue write SetFreightValue;
+ property FreightIsNull: Boolean read GetFreightIsNull write SetFreightIsNull;
+ property ShipName: WideString read GetShipNameValue write SetShipNameValue;
+ property ShipNameIsNull: Boolean read GetShipNameIsNull write SetShipNameIsNull;
+ property ShipAddress: WideString read GetShipAddressValue write SetShipAddressValue;
+ property ShipAddressIsNull: Boolean read GetShipAddressIsNull write SetShipAddressIsNull;
+ property ShipCity: WideString read GetShipCityValue write SetShipCityValue;
+ property ShipCityIsNull: Boolean read GetShipCityIsNull write SetShipCityIsNull;
+ property ShipRegion: WideString read GetShipRegionValue write SetShipRegionValue;
+ property ShipRegionIsNull: Boolean read GetShipRegionIsNull write SetShipRegionIsNull;
+ property ShipPostalCode: WideString read GetShipPostalCodeValue write SetShipPostalCodeValue;
+ property ShipPostalCodeIsNull: Boolean read GetShipPostalCodeIsNull write SetShipPostalCodeIsNull;
+ property ShipCountry: WideString read GetShipCountryValue write SetShipCountryValue;
+ property ShipCountryIsNull: Boolean read GetShipCountryIsNull write SetShipCountryIsNull;
+
+ public
+ constructor Create(aDataTable: TDADataTable); override;
+ destructor Destroy; override;
+
+ end;
+
+implementation
+
+uses Variants;
+
+{ TCustomersDataTableRules }
+constructor TCustomersDataTableRules.Create(aDataTable: TDADataTable);
+begin
+ inherited;
+end;
+
+destructor TCustomersDataTableRules.Destroy;
+begin
+ inherited;
+end;
+
+function TCustomersDataTableRules.GetCustomerIDValue: WideString;
+begin
+ result := DataTable.Fields[idx_CustomersCustomerID].AsWideString;
+end;
+
+procedure TCustomersDataTableRules.SetCustomerIDValue(const aValue: WideString);
+begin
+ DataTable.Fields[idx_CustomersCustomerID].AsWideString := aValue;
+end;
+
+function TCustomersDataTableRules.GetCustomerIDIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_CustomersCustomerID].IsNull;
+end;
+
+procedure TCustomersDataTableRules.SetCustomerIDIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_CustomersCustomerID].AsVariant := Null;
+end;
+
+function TCustomersDataTableRules.GetCompanyNameValue: WideString;
+begin
+ result := DataTable.Fields[idx_CustomersCompanyName].AsWideString;
+end;
+
+procedure TCustomersDataTableRules.SetCompanyNameValue(const aValue: WideString);
+begin
+ DataTable.Fields[idx_CustomersCompanyName].AsWideString := aValue;
+end;
+
+function TCustomersDataTableRules.GetCompanyNameIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_CustomersCompanyName].IsNull;
+end;
+
+procedure TCustomersDataTableRules.SetCompanyNameIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_CustomersCompanyName].AsVariant := Null;
+end;
+
+function TCustomersDataTableRules.GetContactNameValue: WideString;
+begin
+ result := DataTable.Fields[idx_CustomersContactName].AsWideString;
+end;
+
+procedure TCustomersDataTableRules.SetContactNameValue(const aValue: WideString);
+begin
+ DataTable.Fields[idx_CustomersContactName].AsWideString := aValue;
+end;
+
+function TCustomersDataTableRules.GetContactNameIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_CustomersContactName].IsNull;
+end;
+
+procedure TCustomersDataTableRules.SetContactNameIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_CustomersContactName].AsVariant := Null;
+end;
+
+function TCustomersDataTableRules.GetContactTitleValue: WideString;
+begin
+ result := DataTable.Fields[idx_CustomersContactTitle].AsWideString;
+end;
+
+procedure TCustomersDataTableRules.SetContactTitleValue(const aValue: WideString);
+begin
+ DataTable.Fields[idx_CustomersContactTitle].AsWideString := aValue;
+end;
+
+function TCustomersDataTableRules.GetContactTitleIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_CustomersContactTitle].IsNull;
+end;
+
+procedure TCustomersDataTableRules.SetContactTitleIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_CustomersContactTitle].AsVariant := Null;
+end;
+
+function TCustomersDataTableRules.GetAddressValue: WideString;
+begin
+ result := DataTable.Fields[idx_CustomersAddress].AsWideString;
+end;
+
+procedure TCustomersDataTableRules.SetAddressValue(const aValue: WideString);
+begin
+ DataTable.Fields[idx_CustomersAddress].AsWideString := aValue;
+end;
+
+function TCustomersDataTableRules.GetAddressIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_CustomersAddress].IsNull;
+end;
+
+procedure TCustomersDataTableRules.SetAddressIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_CustomersAddress].AsVariant := Null;
+end;
+
+function TCustomersDataTableRules.GetCityValue: WideString;
+begin
+ result := DataTable.Fields[idx_CustomersCity].AsWideString;
+end;
+
+procedure TCustomersDataTableRules.SetCityValue(const aValue: WideString);
+begin
+ DataTable.Fields[idx_CustomersCity].AsWideString := aValue;
+end;
+
+function TCustomersDataTableRules.GetCityIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_CustomersCity].IsNull;
+end;
+
+procedure TCustomersDataTableRules.SetCityIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_CustomersCity].AsVariant := Null;
+end;
+
+function TCustomersDataTableRules.GetRegionValue: WideString;
+begin
+ result := DataTable.Fields[idx_CustomersRegion].AsWideString;
+end;
+
+procedure TCustomersDataTableRules.SetRegionValue(const aValue: WideString);
+begin
+ DataTable.Fields[idx_CustomersRegion].AsWideString := aValue;
+end;
+
+function TCustomersDataTableRules.GetRegionIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_CustomersRegion].IsNull;
+end;
+
+procedure TCustomersDataTableRules.SetRegionIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_CustomersRegion].AsVariant := Null;
+end;
+
+function TCustomersDataTableRules.GetPostalCodeValue: WideString;
+begin
+ result := DataTable.Fields[idx_CustomersPostalCode].AsWideString;
+end;
+
+procedure TCustomersDataTableRules.SetPostalCodeValue(const aValue: WideString);
+begin
+ DataTable.Fields[idx_CustomersPostalCode].AsWideString := aValue;
+end;
+
+function TCustomersDataTableRules.GetPostalCodeIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_CustomersPostalCode].IsNull;
+end;
+
+procedure TCustomersDataTableRules.SetPostalCodeIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_CustomersPostalCode].AsVariant := Null;
+end;
+
+function TCustomersDataTableRules.GetCountryValue: WideString;
+begin
+ result := DataTable.Fields[idx_CustomersCountry].AsWideString;
+end;
+
+procedure TCustomersDataTableRules.SetCountryValue(const aValue: WideString);
+begin
+ DataTable.Fields[idx_CustomersCountry].AsWideString := aValue;
+end;
+
+function TCustomersDataTableRules.GetCountryIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_CustomersCountry].IsNull;
+end;
+
+procedure TCustomersDataTableRules.SetCountryIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_CustomersCountry].AsVariant := Null;
+end;
+
+function TCustomersDataTableRules.GetPhoneValue: WideString;
+begin
+ result := DataTable.Fields[idx_CustomersPhone].AsWideString;
+end;
+
+procedure TCustomersDataTableRules.SetPhoneValue(const aValue: WideString);
+begin
+ DataTable.Fields[idx_CustomersPhone].AsWideString := aValue;
+end;
+
+function TCustomersDataTableRules.GetPhoneIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_CustomersPhone].IsNull;
+end;
+
+procedure TCustomersDataTableRules.SetPhoneIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_CustomersPhone].AsVariant := Null;
+end;
+
+function TCustomersDataTableRules.GetFaxValue: WideString;
+begin
+ result := DataTable.Fields[idx_CustomersFax].AsWideString;
+end;
+
+procedure TCustomersDataTableRules.SetFaxValue(const aValue: WideString);
+begin
+ DataTable.Fields[idx_CustomersFax].AsWideString := aValue;
+end;
+
+function TCustomersDataTableRules.GetFaxIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_CustomersFax].IsNull;
+end;
+
+procedure TCustomersDataTableRules.SetFaxIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_CustomersFax].AsVariant := Null;
+end;
+
+
+{ TOrdersDataTableRules }
+constructor TOrdersDataTableRules.Create(aDataTable: TDADataTable);
+begin
+ inherited;
+end;
+
+destructor TOrdersDataTableRules.Destroy;
+begin
+ inherited;
+end;
+
+function TOrdersDataTableRules.GetOrderIDValue: Integer;
+begin
+ result := DataTable.Fields[idx_OrdersOrderID].AsInteger;
+end;
+
+procedure TOrdersDataTableRules.SetOrderIDValue(const aValue: Integer);
+begin
+ DataTable.Fields[idx_OrdersOrderID].AsInteger := aValue;
+end;
+
+function TOrdersDataTableRules.GetOrderIDIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_OrdersOrderID].IsNull;
+end;
+
+procedure TOrdersDataTableRules.SetOrderIDIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_OrdersOrderID].AsVariant := Null;
+end;
+
+function TOrdersDataTableRules.GetCustomerIDValue: WideString;
+begin
+ result := DataTable.Fields[idx_OrdersCustomerID].AsWideString;
+end;
+
+procedure TOrdersDataTableRules.SetCustomerIDValue(const aValue: WideString);
+begin
+ DataTable.Fields[idx_OrdersCustomerID].AsWideString := aValue;
+end;
+
+function TOrdersDataTableRules.GetCustomerIDIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_OrdersCustomerID].IsNull;
+end;
+
+procedure TOrdersDataTableRules.SetCustomerIDIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_OrdersCustomerID].AsVariant := Null;
+end;
+
+function TOrdersDataTableRules.GetEmployeeIDValue: Integer;
+begin
+ result := DataTable.Fields[idx_OrdersEmployeeID].AsInteger;
+end;
+
+procedure TOrdersDataTableRules.SetEmployeeIDValue(const aValue: Integer);
+begin
+ DataTable.Fields[idx_OrdersEmployeeID].AsInteger := aValue;
+end;
+
+function TOrdersDataTableRules.GetEmployeeIDIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_OrdersEmployeeID].IsNull;
+end;
+
+procedure TOrdersDataTableRules.SetEmployeeIDIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_OrdersEmployeeID].AsVariant := Null;
+end;
+
+function TOrdersDataTableRules.GetOrderDateValue: DateTime;
+begin
+ result := DataTable.Fields[idx_OrdersOrderDate].AsDateTime;
+end;
+
+procedure TOrdersDataTableRules.SetOrderDateValue(const aValue: DateTime);
+begin
+ DataTable.Fields[idx_OrdersOrderDate].AsDateTime := aValue;
+end;
+
+function TOrdersDataTableRules.GetOrderDateIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_OrdersOrderDate].IsNull;
+end;
+
+procedure TOrdersDataTableRules.SetOrderDateIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_OrdersOrderDate].AsVariant := Null;
+end;
+
+function TOrdersDataTableRules.GetRequiredDateValue: DateTime;
+begin
+ result := DataTable.Fields[idx_OrdersRequiredDate].AsDateTime;
+end;
+
+procedure TOrdersDataTableRules.SetRequiredDateValue(const aValue: DateTime);
+begin
+ DataTable.Fields[idx_OrdersRequiredDate].AsDateTime := aValue;
+end;
+
+function TOrdersDataTableRules.GetRequiredDateIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_OrdersRequiredDate].IsNull;
+end;
+
+procedure TOrdersDataTableRules.SetRequiredDateIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_OrdersRequiredDate].AsVariant := Null;
+end;
+
+function TOrdersDataTableRules.GetShippedDateValue: DateTime;
+begin
+ result := DataTable.Fields[idx_OrdersShippedDate].AsDateTime;
+end;
+
+procedure TOrdersDataTableRules.SetShippedDateValue(const aValue: DateTime);
+begin
+ DataTable.Fields[idx_OrdersShippedDate].AsDateTime := aValue;
+end;
+
+function TOrdersDataTableRules.GetShippedDateIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_OrdersShippedDate].IsNull;
+end;
+
+procedure TOrdersDataTableRules.SetShippedDateIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_OrdersShippedDate].AsVariant := Null;
+end;
+
+function TOrdersDataTableRules.GetShipViaValue: Integer;
+begin
+ result := DataTable.Fields[idx_OrdersShipVia].AsInteger;
+end;
+
+procedure TOrdersDataTableRules.SetShipViaValue(const aValue: Integer);
+begin
+ DataTable.Fields[idx_OrdersShipVia].AsInteger := aValue;
+end;
+
+function TOrdersDataTableRules.GetShipViaIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_OrdersShipVia].IsNull;
+end;
+
+procedure TOrdersDataTableRules.SetShipViaIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_OrdersShipVia].AsVariant := Null;
+end;
+
+function TOrdersDataTableRules.GetFreightValue: Float;
+begin
+ result := DataTable.Fields[idx_OrdersFreight].AsFloat;
+end;
+
+procedure TOrdersDataTableRules.SetFreightValue(const aValue: Float);
+begin
+ DataTable.Fields[idx_OrdersFreight].AsFloat := aValue;
+end;
+
+function TOrdersDataTableRules.GetFreightIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_OrdersFreight].IsNull;
+end;
+
+procedure TOrdersDataTableRules.SetFreightIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_OrdersFreight].AsVariant := Null;
+end;
+
+function TOrdersDataTableRules.GetShipNameValue: WideString;
+begin
+ result := DataTable.Fields[idx_OrdersShipName].AsWideString;
+end;
+
+procedure TOrdersDataTableRules.SetShipNameValue(const aValue: WideString);
+begin
+ DataTable.Fields[idx_OrdersShipName].AsWideString := aValue;
+end;
+
+function TOrdersDataTableRules.GetShipNameIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_OrdersShipName].IsNull;
+end;
+
+procedure TOrdersDataTableRules.SetShipNameIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_OrdersShipName].AsVariant := Null;
+end;
+
+function TOrdersDataTableRules.GetShipAddressValue: WideString;
+begin
+ result := DataTable.Fields[idx_OrdersShipAddress].AsWideString;
+end;
+
+procedure TOrdersDataTableRules.SetShipAddressValue(const aValue: WideString);
+begin
+ DataTable.Fields[idx_OrdersShipAddress].AsWideString := aValue;
+end;
+
+function TOrdersDataTableRules.GetShipAddressIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_OrdersShipAddress].IsNull;
+end;
+
+procedure TOrdersDataTableRules.SetShipAddressIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_OrdersShipAddress].AsVariant := Null;
+end;
+
+function TOrdersDataTableRules.GetShipCityValue: WideString;
+begin
+ result := DataTable.Fields[idx_OrdersShipCity].AsWideString;
+end;
+
+procedure TOrdersDataTableRules.SetShipCityValue(const aValue: WideString);
+begin
+ DataTable.Fields[idx_OrdersShipCity].AsWideString := aValue;
+end;
+
+function TOrdersDataTableRules.GetShipCityIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_OrdersShipCity].IsNull;
+end;
+
+procedure TOrdersDataTableRules.SetShipCityIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_OrdersShipCity].AsVariant := Null;
+end;
+
+function TOrdersDataTableRules.GetShipRegionValue: WideString;
+begin
+ result := DataTable.Fields[idx_OrdersShipRegion].AsWideString;
+end;
+
+procedure TOrdersDataTableRules.SetShipRegionValue(const aValue: WideString);
+begin
+ DataTable.Fields[idx_OrdersShipRegion].AsWideString := aValue;
+end;
+
+function TOrdersDataTableRules.GetShipRegionIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_OrdersShipRegion].IsNull;
+end;
+
+procedure TOrdersDataTableRules.SetShipRegionIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_OrdersShipRegion].AsVariant := Null;
+end;
+
+function TOrdersDataTableRules.GetShipPostalCodeValue: WideString;
+begin
+ result := DataTable.Fields[idx_OrdersShipPostalCode].AsWideString;
+end;
+
+procedure TOrdersDataTableRules.SetShipPostalCodeValue(const aValue: WideString);
+begin
+ DataTable.Fields[idx_OrdersShipPostalCode].AsWideString := aValue;
+end;
+
+function TOrdersDataTableRules.GetShipPostalCodeIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_OrdersShipPostalCode].IsNull;
+end;
+
+procedure TOrdersDataTableRules.SetShipPostalCodeIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_OrdersShipPostalCode].AsVariant := Null;
+end;
+
+function TOrdersDataTableRules.GetShipCountryValue: WideString;
+begin
+ result := DataTable.Fields[idx_OrdersShipCountry].AsWideString;
+end;
+
+procedure TOrdersDataTableRules.SetShipCountryValue(const aValue: WideString);
+begin
+ DataTable.Fields[idx_OrdersShipCountry].AsWideString := aValue;
+end;
+
+function TOrdersDataTableRules.GetShipCountryIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_OrdersShipCountry].IsNull;
+end;
+
+procedure TOrdersDataTableRules.SetShipCountryIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_OrdersShipCountry].AsVariant := Null;
+end;
+
+
+initialization
+ RegisterDataTableRules(RID_Customers, TCustomersDataTableRules);
+ RegisterDataTableRules(RID_Orders, TOrdersDataTableRules);
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/SchemaServer_Intf.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/SchemaServer_Intf.pas
new file mode 100644
index 0000000..8ca7acc
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/SchemaServer_Intf.pas
@@ -0,0 +1,1168 @@
+unit SchemaServer_Intf;
+
+interface
+
+uses
+ Classes, DB, SysUtils, uROClasses, uDADataTable, uDABusinessProcessor, SchemaClient_Intf;
+
+const
+ { Delta rules ids
+ Feel free to change them to something more human readable
+ but make sure they are unique in the context of your application }
+ RID_CustomersDelta = '{484D754F-68A9-4DC0-AADF-EBDB00C9E40F}';
+ RID_OrdersDelta = '{6D8F66A7-58AC-4768-AC95-3437EABB042A}';
+
+type
+ { ICustomersDelta }
+ ICustomersDelta = interface(ICustomers)
+ ['{484D754F-68A9-4DC0-AADF-EBDB00C9E40F}']
+ { Property getters and setters }
+ function GetOldCustomerIDValue : WideString;
+ function GetOldCompanyNameValue : WideString;
+ function GetOldContactNameValue : WideString;
+ function GetOldContactTitleValue : WideString;
+ function GetOldAddressValue : WideString;
+ function GetOldCityValue : WideString;
+ function GetOldRegionValue : WideString;
+ function GetOldPostalCodeValue : WideString;
+ function GetOldCountryValue : WideString;
+ function GetOldPhoneValue : WideString;
+ function GetOldFaxValue : WideString;
+
+ { Properties }
+ property OldCustomerID : WideString read GetOldCustomerIDValue;
+ property OldCompanyName : WideString read GetOldCompanyNameValue;
+ property OldContactName : WideString read GetOldContactNameValue;
+ property OldContactTitle : WideString read GetOldContactTitleValue;
+ property OldAddress : WideString read GetOldAddressValue;
+ property OldCity : WideString read GetOldCityValue;
+ property OldRegion : WideString read GetOldRegionValue;
+ property OldPostalCode : WideString read GetOldPostalCodeValue;
+ property OldCountry : WideString read GetOldCountryValue;
+ property OldPhone : WideString read GetOldPhoneValue;
+ property OldFax : WideString read GetOldFaxValue;
+ end;
+
+ { TCustomersBusinessProcessorRules }
+ TCustomersBusinessProcessorRules = class(TDABusinessProcessorRules, ICustomers, ICustomersDelta)
+ private
+ protected
+ { Property getters and setters }
+ function GetCustomerIDValue: WideString; virtual;
+ function GetCustomerIDIsNull: Boolean; virtual;
+ function GetOldCustomerIDValue: WideString; virtual;
+ function GetOldCustomerIDIsNull: Boolean; virtual;
+ procedure SetCustomerIDValue(const aValue: WideString); virtual;
+ procedure SetCustomerIDIsNull(const aValue: Boolean); virtual;
+ function GetCompanyNameValue: WideString; virtual;
+ function GetCompanyNameIsNull: Boolean; virtual;
+ function GetOldCompanyNameValue: WideString; virtual;
+ function GetOldCompanyNameIsNull: Boolean; virtual;
+ procedure SetCompanyNameValue(const aValue: WideString); virtual;
+ procedure SetCompanyNameIsNull(const aValue: Boolean); virtual;
+ function GetContactNameValue: WideString; virtual;
+ function GetContactNameIsNull: Boolean; virtual;
+ function GetOldContactNameValue: WideString; virtual;
+ function GetOldContactNameIsNull: Boolean; virtual;
+ procedure SetContactNameValue(const aValue: WideString); virtual;
+ procedure SetContactNameIsNull(const aValue: Boolean); virtual;
+ function GetContactTitleValue: WideString; virtual;
+ function GetContactTitleIsNull: Boolean; virtual;
+ function GetOldContactTitleValue: WideString; virtual;
+ function GetOldContactTitleIsNull: Boolean; virtual;
+ procedure SetContactTitleValue(const aValue: WideString); virtual;
+ procedure SetContactTitleIsNull(const aValue: Boolean); virtual;
+ function GetAddressValue: WideString; virtual;
+ function GetAddressIsNull: Boolean; virtual;
+ function GetOldAddressValue: WideString; virtual;
+ function GetOldAddressIsNull: Boolean; virtual;
+ procedure SetAddressValue(const aValue: WideString); virtual;
+ procedure SetAddressIsNull(const aValue: Boolean); virtual;
+ function GetCityValue: WideString; virtual;
+ function GetCityIsNull: Boolean; virtual;
+ function GetOldCityValue: WideString; virtual;
+ function GetOldCityIsNull: Boolean; virtual;
+ procedure SetCityValue(const aValue: WideString); virtual;
+ procedure SetCityIsNull(const aValue: Boolean); virtual;
+ function GetRegionValue: WideString; virtual;
+ function GetRegionIsNull: Boolean; virtual;
+ function GetOldRegionValue: WideString; virtual;
+ function GetOldRegionIsNull: Boolean; virtual;
+ procedure SetRegionValue(const aValue: WideString); virtual;
+ procedure SetRegionIsNull(const aValue: Boolean); virtual;
+ function GetPostalCodeValue: WideString; virtual;
+ function GetPostalCodeIsNull: Boolean; virtual;
+ function GetOldPostalCodeValue: WideString; virtual;
+ function GetOldPostalCodeIsNull: Boolean; virtual;
+ procedure SetPostalCodeValue(const aValue: WideString); virtual;
+ procedure SetPostalCodeIsNull(const aValue: Boolean); virtual;
+ function GetCountryValue: WideString; virtual;
+ function GetCountryIsNull: Boolean; virtual;
+ function GetOldCountryValue: WideString; virtual;
+ function GetOldCountryIsNull: Boolean; virtual;
+ procedure SetCountryValue(const aValue: WideString); virtual;
+ procedure SetCountryIsNull(const aValue: Boolean); virtual;
+ function GetPhoneValue: WideString; virtual;
+ function GetPhoneIsNull: Boolean; virtual;
+ function GetOldPhoneValue: WideString; virtual;
+ function GetOldPhoneIsNull: Boolean; virtual;
+ procedure SetPhoneValue(const aValue: WideString); virtual;
+ procedure SetPhoneIsNull(const aValue: Boolean); virtual;
+ function GetFaxValue: WideString; virtual;
+ function GetFaxIsNull: Boolean; virtual;
+ function GetOldFaxValue: WideString; virtual;
+ function GetOldFaxIsNull: Boolean; virtual;
+ procedure SetFaxValue(const aValue: WideString); virtual;
+ procedure SetFaxIsNull(const aValue: Boolean); virtual;
+
+ { Properties }
+ property CustomerID : WideString read GetCustomerIDValue write SetCustomerIDValue;
+ property CustomerIDIsNull : Boolean read GetCustomerIDIsNull write SetCustomerIDIsNull;
+ property OldCustomerID : WideString read GetOldCustomerIDValue;
+ property OldCustomerIDIsNull : Boolean read GetOldCustomerIDIsNull;
+ property CompanyName : WideString read GetCompanyNameValue write SetCompanyNameValue;
+ property CompanyNameIsNull : Boolean read GetCompanyNameIsNull write SetCompanyNameIsNull;
+ property OldCompanyName : WideString read GetOldCompanyNameValue;
+ property OldCompanyNameIsNull : Boolean read GetOldCompanyNameIsNull;
+ property ContactName : WideString read GetContactNameValue write SetContactNameValue;
+ property ContactNameIsNull : Boolean read GetContactNameIsNull write SetContactNameIsNull;
+ property OldContactName : WideString read GetOldContactNameValue;
+ property OldContactNameIsNull : Boolean read GetOldContactNameIsNull;
+ property ContactTitle : WideString read GetContactTitleValue write SetContactTitleValue;
+ property ContactTitleIsNull : Boolean read GetContactTitleIsNull write SetContactTitleIsNull;
+ property OldContactTitle : WideString read GetOldContactTitleValue;
+ property OldContactTitleIsNull : Boolean read GetOldContactTitleIsNull;
+ property Address : WideString read GetAddressValue write SetAddressValue;
+ property AddressIsNull : Boolean read GetAddressIsNull write SetAddressIsNull;
+ property OldAddress : WideString read GetOldAddressValue;
+ property OldAddressIsNull : Boolean read GetOldAddressIsNull;
+ property City : WideString read GetCityValue write SetCityValue;
+ property CityIsNull : Boolean read GetCityIsNull write SetCityIsNull;
+ property OldCity : WideString read GetOldCityValue;
+ property OldCityIsNull : Boolean read GetOldCityIsNull;
+ property Region : WideString read GetRegionValue write SetRegionValue;
+ property RegionIsNull : Boolean read GetRegionIsNull write SetRegionIsNull;
+ property OldRegion : WideString read GetOldRegionValue;
+ property OldRegionIsNull : Boolean read GetOldRegionIsNull;
+ property PostalCode : WideString read GetPostalCodeValue write SetPostalCodeValue;
+ property PostalCodeIsNull : Boolean read GetPostalCodeIsNull write SetPostalCodeIsNull;
+ property OldPostalCode : WideString read GetOldPostalCodeValue;
+ property OldPostalCodeIsNull : Boolean read GetOldPostalCodeIsNull;
+ property Country : WideString read GetCountryValue write SetCountryValue;
+ property CountryIsNull : Boolean read GetCountryIsNull write SetCountryIsNull;
+ property OldCountry : WideString read GetOldCountryValue;
+ property OldCountryIsNull : Boolean read GetOldCountryIsNull;
+ property Phone : WideString read GetPhoneValue write SetPhoneValue;
+ property PhoneIsNull : Boolean read GetPhoneIsNull write SetPhoneIsNull;
+ property OldPhone : WideString read GetOldPhoneValue;
+ property OldPhoneIsNull : Boolean read GetOldPhoneIsNull;
+ property Fax : WideString read GetFaxValue write SetFaxValue;
+ property FaxIsNull : Boolean read GetFaxIsNull write SetFaxIsNull;
+ property OldFax : WideString read GetOldFaxValue;
+ property OldFaxIsNull : Boolean read GetOldFaxIsNull;
+
+ public
+ constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
+ destructor Destroy; override;
+
+ end;
+
+ { IOrdersDelta }
+ IOrdersDelta = interface(IOrders)
+ ['{6D8F66A7-58AC-4768-AC95-3437EABB042A}']
+ { Property getters and setters }
+ function GetOldOrderIDValue : Integer;
+ function GetOldCustomerIDValue : WideString;
+ function GetOldEmployeeIDValue : Integer;
+ function GetOldOrderDateValue : DateTime;
+ function GetOldRequiredDateValue : DateTime;
+ function GetOldShippedDateValue : DateTime;
+ function GetOldShipViaValue : Integer;
+ function GetOldFreightValue : Float;
+ function GetOldShipNameValue : WideString;
+ function GetOldShipAddressValue : WideString;
+ function GetOldShipCityValue : WideString;
+ function GetOldShipRegionValue : WideString;
+ function GetOldShipPostalCodeValue : WideString;
+ function GetOldShipCountryValue : WideString;
+
+ { Properties }
+ property OldOrderID : Integer read GetOldOrderIDValue;
+ property OldCustomerID : WideString read GetOldCustomerIDValue;
+ property OldEmployeeID : Integer read GetOldEmployeeIDValue;
+ property OldOrderDate : DateTime read GetOldOrderDateValue;
+ property OldRequiredDate : DateTime read GetOldRequiredDateValue;
+ property OldShippedDate : DateTime read GetOldShippedDateValue;
+ property OldShipVia : Integer read GetOldShipViaValue;
+ property OldFreight : Float read GetOldFreightValue;
+ property OldShipName : WideString read GetOldShipNameValue;
+ property OldShipAddress : WideString read GetOldShipAddressValue;
+ property OldShipCity : WideString read GetOldShipCityValue;
+ property OldShipRegion : WideString read GetOldShipRegionValue;
+ property OldShipPostalCode : WideString read GetOldShipPostalCodeValue;
+ property OldShipCountry : WideString read GetOldShipCountryValue;
+ end;
+
+ { TOrdersBusinessProcessorRules }
+ TOrdersBusinessProcessorRules = class(TDABusinessProcessorRules, IOrders, IOrdersDelta)
+ private
+ protected
+ { Property getters and setters }
+ function GetOrderIDValue: Integer; virtual;
+ function GetOrderIDIsNull: Boolean; virtual;
+ function GetOldOrderIDValue: Integer; virtual;
+ function GetOldOrderIDIsNull: Boolean; virtual;
+ procedure SetOrderIDValue(const aValue: Integer); virtual;
+ procedure SetOrderIDIsNull(const aValue: Boolean); virtual;
+ function GetCustomerIDValue: WideString; virtual;
+ function GetCustomerIDIsNull: Boolean; virtual;
+ function GetOldCustomerIDValue: WideString; virtual;
+ function GetOldCustomerIDIsNull: Boolean; virtual;
+ procedure SetCustomerIDValue(const aValue: WideString); virtual;
+ procedure SetCustomerIDIsNull(const aValue: Boolean); virtual;
+ function GetEmployeeIDValue: Integer; virtual;
+ function GetEmployeeIDIsNull: Boolean; virtual;
+ function GetOldEmployeeIDValue: Integer; virtual;
+ function GetOldEmployeeIDIsNull: Boolean; virtual;
+ procedure SetEmployeeIDValue(const aValue: Integer); virtual;
+ procedure SetEmployeeIDIsNull(const aValue: Boolean); virtual;
+ function GetOrderDateValue: DateTime; virtual;
+ function GetOrderDateIsNull: Boolean; virtual;
+ function GetOldOrderDateValue: DateTime; virtual;
+ function GetOldOrderDateIsNull: Boolean; virtual;
+ procedure SetOrderDateValue(const aValue: DateTime); virtual;
+ procedure SetOrderDateIsNull(const aValue: Boolean); virtual;
+ function GetRequiredDateValue: DateTime; virtual;
+ function GetRequiredDateIsNull: Boolean; virtual;
+ function GetOldRequiredDateValue: DateTime; virtual;
+ function GetOldRequiredDateIsNull: Boolean; virtual;
+ procedure SetRequiredDateValue(const aValue: DateTime); virtual;
+ procedure SetRequiredDateIsNull(const aValue: Boolean); virtual;
+ function GetShippedDateValue: DateTime; virtual;
+ function GetShippedDateIsNull: Boolean; virtual;
+ function GetOldShippedDateValue: DateTime; virtual;
+ function GetOldShippedDateIsNull: Boolean; virtual;
+ procedure SetShippedDateValue(const aValue: DateTime); virtual;
+ procedure SetShippedDateIsNull(const aValue: Boolean); virtual;
+ function GetShipViaValue: Integer; virtual;
+ function GetShipViaIsNull: Boolean; virtual;
+ function GetOldShipViaValue: Integer; virtual;
+ function GetOldShipViaIsNull: Boolean; virtual;
+ procedure SetShipViaValue(const aValue: Integer); virtual;
+ procedure SetShipViaIsNull(const aValue: Boolean); virtual;
+ function GetFreightValue: Float; virtual;
+ function GetFreightIsNull: Boolean; virtual;
+ function GetOldFreightValue: Float; virtual;
+ function GetOldFreightIsNull: Boolean; virtual;
+ procedure SetFreightValue(const aValue: Float); virtual;
+ procedure SetFreightIsNull(const aValue: Boolean); virtual;
+ function GetShipNameValue: WideString; virtual;
+ function GetShipNameIsNull: Boolean; virtual;
+ function GetOldShipNameValue: WideString; virtual;
+ function GetOldShipNameIsNull: Boolean; virtual;
+ procedure SetShipNameValue(const aValue: WideString); virtual;
+ procedure SetShipNameIsNull(const aValue: Boolean); virtual;
+ function GetShipAddressValue: WideString; virtual;
+ function GetShipAddressIsNull: Boolean; virtual;
+ function GetOldShipAddressValue: WideString; virtual;
+ function GetOldShipAddressIsNull: Boolean; virtual;
+ procedure SetShipAddressValue(const aValue: WideString); virtual;
+ procedure SetShipAddressIsNull(const aValue: Boolean); virtual;
+ function GetShipCityValue: WideString; virtual;
+ function GetShipCityIsNull: Boolean; virtual;
+ function GetOldShipCityValue: WideString; virtual;
+ function GetOldShipCityIsNull: Boolean; virtual;
+ procedure SetShipCityValue(const aValue: WideString); virtual;
+ procedure SetShipCityIsNull(const aValue: Boolean); virtual;
+ function GetShipRegionValue: WideString; virtual;
+ function GetShipRegionIsNull: Boolean; virtual;
+ function GetOldShipRegionValue: WideString; virtual;
+ function GetOldShipRegionIsNull: Boolean; virtual;
+ procedure SetShipRegionValue(const aValue: WideString); virtual;
+ procedure SetShipRegionIsNull(const aValue: Boolean); virtual;
+ function GetShipPostalCodeValue: WideString; virtual;
+ function GetShipPostalCodeIsNull: Boolean; virtual;
+ function GetOldShipPostalCodeValue: WideString; virtual;
+ function GetOldShipPostalCodeIsNull: Boolean; virtual;
+ procedure SetShipPostalCodeValue(const aValue: WideString); virtual;
+ procedure SetShipPostalCodeIsNull(const aValue: Boolean); virtual;
+ function GetShipCountryValue: WideString; virtual;
+ function GetShipCountryIsNull: Boolean; virtual;
+ function GetOldShipCountryValue: WideString; virtual;
+ function GetOldShipCountryIsNull: Boolean; virtual;
+ procedure SetShipCountryValue(const aValue: WideString); virtual;
+ procedure SetShipCountryIsNull(const aValue: Boolean); virtual;
+
+ { Properties }
+ property OrderID : Integer read GetOrderIDValue write SetOrderIDValue;
+ property OrderIDIsNull : Boolean read GetOrderIDIsNull write SetOrderIDIsNull;
+ property OldOrderID : Integer read GetOldOrderIDValue;
+ property OldOrderIDIsNull : Boolean read GetOldOrderIDIsNull;
+ property CustomerID : WideString read GetCustomerIDValue write SetCustomerIDValue;
+ property CustomerIDIsNull : Boolean read GetCustomerIDIsNull write SetCustomerIDIsNull;
+ property OldCustomerID : WideString read GetOldCustomerIDValue;
+ property OldCustomerIDIsNull : Boolean read GetOldCustomerIDIsNull;
+ property EmployeeID : Integer read GetEmployeeIDValue write SetEmployeeIDValue;
+ property EmployeeIDIsNull : Boolean read GetEmployeeIDIsNull write SetEmployeeIDIsNull;
+ property OldEmployeeID : Integer read GetOldEmployeeIDValue;
+ property OldEmployeeIDIsNull : Boolean read GetOldEmployeeIDIsNull;
+ property OrderDate : DateTime read GetOrderDateValue write SetOrderDateValue;
+ property OrderDateIsNull : Boolean read GetOrderDateIsNull write SetOrderDateIsNull;
+ property OldOrderDate : DateTime read GetOldOrderDateValue;
+ property OldOrderDateIsNull : Boolean read GetOldOrderDateIsNull;
+ property RequiredDate : DateTime read GetRequiredDateValue write SetRequiredDateValue;
+ property RequiredDateIsNull : Boolean read GetRequiredDateIsNull write SetRequiredDateIsNull;
+ property OldRequiredDate : DateTime read GetOldRequiredDateValue;
+ property OldRequiredDateIsNull : Boolean read GetOldRequiredDateIsNull;
+ property ShippedDate : DateTime read GetShippedDateValue write SetShippedDateValue;
+ property ShippedDateIsNull : Boolean read GetShippedDateIsNull write SetShippedDateIsNull;
+ property OldShippedDate : DateTime read GetOldShippedDateValue;
+ property OldShippedDateIsNull : Boolean read GetOldShippedDateIsNull;
+ property ShipVia : Integer read GetShipViaValue write SetShipViaValue;
+ property ShipViaIsNull : Boolean read GetShipViaIsNull write SetShipViaIsNull;
+ property OldShipVia : Integer read GetOldShipViaValue;
+ property OldShipViaIsNull : Boolean read GetOldShipViaIsNull;
+ property Freight : Float read GetFreightValue write SetFreightValue;
+ property FreightIsNull : Boolean read GetFreightIsNull write SetFreightIsNull;
+ property OldFreight : Float read GetOldFreightValue;
+ property OldFreightIsNull : Boolean read GetOldFreightIsNull;
+ property ShipName : WideString read GetShipNameValue write SetShipNameValue;
+ property ShipNameIsNull : Boolean read GetShipNameIsNull write SetShipNameIsNull;
+ property OldShipName : WideString read GetOldShipNameValue;
+ property OldShipNameIsNull : Boolean read GetOldShipNameIsNull;
+ property ShipAddress : WideString read GetShipAddressValue write SetShipAddressValue;
+ property ShipAddressIsNull : Boolean read GetShipAddressIsNull write SetShipAddressIsNull;
+ property OldShipAddress : WideString read GetOldShipAddressValue;
+ property OldShipAddressIsNull : Boolean read GetOldShipAddressIsNull;
+ property ShipCity : WideString read GetShipCityValue write SetShipCityValue;
+ property ShipCityIsNull : Boolean read GetShipCityIsNull write SetShipCityIsNull;
+ property OldShipCity : WideString read GetOldShipCityValue;
+ property OldShipCityIsNull : Boolean read GetOldShipCityIsNull;
+ property ShipRegion : WideString read GetShipRegionValue write SetShipRegionValue;
+ property ShipRegionIsNull : Boolean read GetShipRegionIsNull write SetShipRegionIsNull;
+ property OldShipRegion : WideString read GetOldShipRegionValue;
+ property OldShipRegionIsNull : Boolean read GetOldShipRegionIsNull;
+ property ShipPostalCode : WideString read GetShipPostalCodeValue write SetShipPostalCodeValue;
+ property ShipPostalCodeIsNull : Boolean read GetShipPostalCodeIsNull write SetShipPostalCodeIsNull;
+ property OldShipPostalCode : WideString read GetOldShipPostalCodeValue;
+ property OldShipPostalCodeIsNull : Boolean read GetOldShipPostalCodeIsNull;
+ property ShipCountry : WideString read GetShipCountryValue write SetShipCountryValue;
+ property ShipCountryIsNull : Boolean read GetShipCountryIsNull write SetShipCountryIsNull;
+ property OldShipCountry : WideString read GetOldShipCountryValue;
+ property OldShipCountryIsNull : Boolean read GetOldShipCountryIsNull;
+
+ public
+ constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
+ destructor Destroy; override;
+
+ end;
+
+implementation
+
+uses
+ Variants, uROBinaryHelpers;
+
+{ TCustomersBusinessProcessorRules }
+constructor TCustomersBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
+begin
+ inherited;
+end;
+
+destructor TCustomersBusinessProcessorRules.Destroy;
+begin
+ inherited;
+end;
+
+function TCustomersBusinessProcessorRules.GetCustomerIDValue: WideString;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersCustomerID];
+end;
+
+function TCustomersBusinessProcessorRules.GetCustomerIDIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersCustomerID]);
+end;
+
+function TCustomersBusinessProcessorRules.GetOldCustomerIDValue: WideString;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersCustomerID];
+end;
+
+function TCustomersBusinessProcessorRules.GetOldCustomerIDIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersCustomerID]);
+end;
+
+procedure TCustomersBusinessProcessorRules.SetCustomerIDValue(const aValue: WideString);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersCustomerID] := aValue;
+end;
+
+procedure TCustomersBusinessProcessorRules.SetCustomerIDIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersCustomerID] := Null;
+end;
+
+function TCustomersBusinessProcessorRules.GetCompanyNameValue: WideString;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersCompanyName];
+end;
+
+function TCustomersBusinessProcessorRules.GetCompanyNameIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersCompanyName]);
+end;
+
+function TCustomersBusinessProcessorRules.GetOldCompanyNameValue: WideString;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersCompanyName];
+end;
+
+function TCustomersBusinessProcessorRules.GetOldCompanyNameIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersCompanyName]);
+end;
+
+procedure TCustomersBusinessProcessorRules.SetCompanyNameValue(const aValue: WideString);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersCompanyName] := aValue;
+end;
+
+procedure TCustomersBusinessProcessorRules.SetCompanyNameIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersCompanyName] := Null;
+end;
+
+function TCustomersBusinessProcessorRules.GetContactNameValue: WideString;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersContactName];
+end;
+
+function TCustomersBusinessProcessorRules.GetContactNameIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersContactName]);
+end;
+
+function TCustomersBusinessProcessorRules.GetOldContactNameValue: WideString;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersContactName];
+end;
+
+function TCustomersBusinessProcessorRules.GetOldContactNameIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersContactName]);
+end;
+
+procedure TCustomersBusinessProcessorRules.SetContactNameValue(const aValue: WideString);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersContactName] := aValue;
+end;
+
+procedure TCustomersBusinessProcessorRules.SetContactNameIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersContactName] := Null;
+end;
+
+function TCustomersBusinessProcessorRules.GetContactTitleValue: WideString;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersContactTitle];
+end;
+
+function TCustomersBusinessProcessorRules.GetContactTitleIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersContactTitle]);
+end;
+
+function TCustomersBusinessProcessorRules.GetOldContactTitleValue: WideString;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersContactTitle];
+end;
+
+function TCustomersBusinessProcessorRules.GetOldContactTitleIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersContactTitle]);
+end;
+
+procedure TCustomersBusinessProcessorRules.SetContactTitleValue(const aValue: WideString);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersContactTitle] := aValue;
+end;
+
+procedure TCustomersBusinessProcessorRules.SetContactTitleIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersContactTitle] := Null;
+end;
+
+function TCustomersBusinessProcessorRules.GetAddressValue: WideString;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersAddress];
+end;
+
+function TCustomersBusinessProcessorRules.GetAddressIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersAddress]);
+end;
+
+function TCustomersBusinessProcessorRules.GetOldAddressValue: WideString;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersAddress];
+end;
+
+function TCustomersBusinessProcessorRules.GetOldAddressIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersAddress]);
+end;
+
+procedure TCustomersBusinessProcessorRules.SetAddressValue(const aValue: WideString);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersAddress] := aValue;
+end;
+
+procedure TCustomersBusinessProcessorRules.SetAddressIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersAddress] := Null;
+end;
+
+function TCustomersBusinessProcessorRules.GetCityValue: WideString;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersCity];
+end;
+
+function TCustomersBusinessProcessorRules.GetCityIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersCity]);
+end;
+
+function TCustomersBusinessProcessorRules.GetOldCityValue: WideString;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersCity];
+end;
+
+function TCustomersBusinessProcessorRules.GetOldCityIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersCity]);
+end;
+
+procedure TCustomersBusinessProcessorRules.SetCityValue(const aValue: WideString);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersCity] := aValue;
+end;
+
+procedure TCustomersBusinessProcessorRules.SetCityIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersCity] := Null;
+end;
+
+function TCustomersBusinessProcessorRules.GetRegionValue: WideString;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersRegion];
+end;
+
+function TCustomersBusinessProcessorRules.GetRegionIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersRegion]);
+end;
+
+function TCustomersBusinessProcessorRules.GetOldRegionValue: WideString;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersRegion];
+end;
+
+function TCustomersBusinessProcessorRules.GetOldRegionIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersRegion]);
+end;
+
+procedure TCustomersBusinessProcessorRules.SetRegionValue(const aValue: WideString);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersRegion] := aValue;
+end;
+
+procedure TCustomersBusinessProcessorRules.SetRegionIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersRegion] := Null;
+end;
+
+function TCustomersBusinessProcessorRules.GetPostalCodeValue: WideString;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersPostalCode];
+end;
+
+function TCustomersBusinessProcessorRules.GetPostalCodeIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersPostalCode]);
+end;
+
+function TCustomersBusinessProcessorRules.GetOldPostalCodeValue: WideString;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersPostalCode];
+end;
+
+function TCustomersBusinessProcessorRules.GetOldPostalCodeIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersPostalCode]);
+end;
+
+procedure TCustomersBusinessProcessorRules.SetPostalCodeValue(const aValue: WideString);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersPostalCode] := aValue;
+end;
+
+procedure TCustomersBusinessProcessorRules.SetPostalCodeIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersPostalCode] := Null;
+end;
+
+function TCustomersBusinessProcessorRules.GetCountryValue: WideString;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersCountry];
+end;
+
+function TCustomersBusinessProcessorRules.GetCountryIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersCountry]);
+end;
+
+function TCustomersBusinessProcessorRules.GetOldCountryValue: WideString;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersCountry];
+end;
+
+function TCustomersBusinessProcessorRules.GetOldCountryIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersCountry]);
+end;
+
+procedure TCustomersBusinessProcessorRules.SetCountryValue(const aValue: WideString);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersCountry] := aValue;
+end;
+
+procedure TCustomersBusinessProcessorRules.SetCountryIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersCountry] := Null;
+end;
+
+function TCustomersBusinessProcessorRules.GetPhoneValue: WideString;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersPhone];
+end;
+
+function TCustomersBusinessProcessorRules.GetPhoneIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersPhone]);
+end;
+
+function TCustomersBusinessProcessorRules.GetOldPhoneValue: WideString;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersPhone];
+end;
+
+function TCustomersBusinessProcessorRules.GetOldPhoneIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersPhone]);
+end;
+
+procedure TCustomersBusinessProcessorRules.SetPhoneValue(const aValue: WideString);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersPhone] := aValue;
+end;
+
+procedure TCustomersBusinessProcessorRules.SetPhoneIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersPhone] := Null;
+end;
+
+function TCustomersBusinessProcessorRules.GetFaxValue: WideString;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersFax];
+end;
+
+function TCustomersBusinessProcessorRules.GetFaxIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersFax]);
+end;
+
+function TCustomersBusinessProcessorRules.GetOldFaxValue: WideString;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersFax];
+end;
+
+function TCustomersBusinessProcessorRules.GetOldFaxIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersFax]);
+end;
+
+procedure TCustomersBusinessProcessorRules.SetFaxValue(const aValue: WideString);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersFax] := aValue;
+end;
+
+procedure TCustomersBusinessProcessorRules.SetFaxIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersFax] := Null;
+end;
+
+
+{ TOrdersBusinessProcessorRules }
+constructor TOrdersBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
+begin
+ inherited;
+end;
+
+destructor TOrdersBusinessProcessorRules.Destroy;
+begin
+ inherited;
+end;
+
+function TOrdersBusinessProcessorRules.GetOrderIDValue: Integer;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersOrderID];
+end;
+
+function TOrdersBusinessProcessorRules.GetOrderIDIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersOrderID]);
+end;
+
+function TOrdersBusinessProcessorRules.GetOldOrderIDValue: Integer;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersOrderID];
+end;
+
+function TOrdersBusinessProcessorRules.GetOldOrderIDIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersOrderID]);
+end;
+
+procedure TOrdersBusinessProcessorRules.SetOrderIDValue(const aValue: Integer);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersOrderID] := aValue;
+end;
+
+procedure TOrdersBusinessProcessorRules.SetOrderIDIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersOrderID] := Null;
+end;
+
+function TOrdersBusinessProcessorRules.GetCustomerIDValue: WideString;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersCustomerID];
+end;
+
+function TOrdersBusinessProcessorRules.GetCustomerIDIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersCustomerID]);
+end;
+
+function TOrdersBusinessProcessorRules.GetOldCustomerIDValue: WideString;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersCustomerID];
+end;
+
+function TOrdersBusinessProcessorRules.GetOldCustomerIDIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersCustomerID]);
+end;
+
+procedure TOrdersBusinessProcessorRules.SetCustomerIDValue(const aValue: WideString);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersCustomerID] := aValue;
+end;
+
+procedure TOrdersBusinessProcessorRules.SetCustomerIDIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersCustomerID] := Null;
+end;
+
+function TOrdersBusinessProcessorRules.GetEmployeeIDValue: Integer;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersEmployeeID];
+end;
+
+function TOrdersBusinessProcessorRules.GetEmployeeIDIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersEmployeeID]);
+end;
+
+function TOrdersBusinessProcessorRules.GetOldEmployeeIDValue: Integer;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersEmployeeID];
+end;
+
+function TOrdersBusinessProcessorRules.GetOldEmployeeIDIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersEmployeeID]);
+end;
+
+procedure TOrdersBusinessProcessorRules.SetEmployeeIDValue(const aValue: Integer);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersEmployeeID] := aValue;
+end;
+
+procedure TOrdersBusinessProcessorRules.SetEmployeeIDIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersEmployeeID] := Null;
+end;
+
+function TOrdersBusinessProcessorRules.GetOrderDateValue: DateTime;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersOrderDate];
+end;
+
+function TOrdersBusinessProcessorRules.GetOrderDateIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersOrderDate]);
+end;
+
+function TOrdersBusinessProcessorRules.GetOldOrderDateValue: DateTime;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersOrderDate];
+end;
+
+function TOrdersBusinessProcessorRules.GetOldOrderDateIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersOrderDate]);
+end;
+
+procedure TOrdersBusinessProcessorRules.SetOrderDateValue(const aValue: DateTime);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersOrderDate] := aValue;
+end;
+
+procedure TOrdersBusinessProcessorRules.SetOrderDateIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersOrderDate] := Null;
+end;
+
+function TOrdersBusinessProcessorRules.GetRequiredDateValue: DateTime;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersRequiredDate];
+end;
+
+function TOrdersBusinessProcessorRules.GetRequiredDateIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersRequiredDate]);
+end;
+
+function TOrdersBusinessProcessorRules.GetOldRequiredDateValue: DateTime;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersRequiredDate];
+end;
+
+function TOrdersBusinessProcessorRules.GetOldRequiredDateIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersRequiredDate]);
+end;
+
+procedure TOrdersBusinessProcessorRules.SetRequiredDateValue(const aValue: DateTime);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersRequiredDate] := aValue;
+end;
+
+procedure TOrdersBusinessProcessorRules.SetRequiredDateIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersRequiredDate] := Null;
+end;
+
+function TOrdersBusinessProcessorRules.GetShippedDateValue: DateTime;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShippedDate];
+end;
+
+function TOrdersBusinessProcessorRules.GetShippedDateIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShippedDate]);
+end;
+
+function TOrdersBusinessProcessorRules.GetOldShippedDateValue: DateTime;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersShippedDate];
+end;
+
+function TOrdersBusinessProcessorRules.GetOldShippedDateIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersShippedDate]);
+end;
+
+procedure TOrdersBusinessProcessorRules.SetShippedDateValue(const aValue: DateTime);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShippedDate] := aValue;
+end;
+
+procedure TOrdersBusinessProcessorRules.SetShippedDateIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShippedDate] := Null;
+end;
+
+function TOrdersBusinessProcessorRules.GetShipViaValue: Integer;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipVia];
+end;
+
+function TOrdersBusinessProcessorRules.GetShipViaIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipVia]);
+end;
+
+function TOrdersBusinessProcessorRules.GetOldShipViaValue: Integer;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersShipVia];
+end;
+
+function TOrdersBusinessProcessorRules.GetOldShipViaIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersShipVia]);
+end;
+
+procedure TOrdersBusinessProcessorRules.SetShipViaValue(const aValue: Integer);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipVia] := aValue;
+end;
+
+procedure TOrdersBusinessProcessorRules.SetShipViaIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipVia] := Null;
+end;
+
+function TOrdersBusinessProcessorRules.GetFreightValue: Float;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersFreight];
+end;
+
+function TOrdersBusinessProcessorRules.GetFreightIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersFreight]);
+end;
+
+function TOrdersBusinessProcessorRules.GetOldFreightValue: Float;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersFreight];
+end;
+
+function TOrdersBusinessProcessorRules.GetOldFreightIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersFreight]);
+end;
+
+procedure TOrdersBusinessProcessorRules.SetFreightValue(const aValue: Float);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersFreight] := aValue;
+end;
+
+procedure TOrdersBusinessProcessorRules.SetFreightIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersFreight] := Null;
+end;
+
+function TOrdersBusinessProcessorRules.GetShipNameValue: WideString;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipName];
+end;
+
+function TOrdersBusinessProcessorRules.GetShipNameIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipName]);
+end;
+
+function TOrdersBusinessProcessorRules.GetOldShipNameValue: WideString;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersShipName];
+end;
+
+function TOrdersBusinessProcessorRules.GetOldShipNameIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersShipName]);
+end;
+
+procedure TOrdersBusinessProcessorRules.SetShipNameValue(const aValue: WideString);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipName] := aValue;
+end;
+
+procedure TOrdersBusinessProcessorRules.SetShipNameIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipName] := Null;
+end;
+
+function TOrdersBusinessProcessorRules.GetShipAddressValue: WideString;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipAddress];
+end;
+
+function TOrdersBusinessProcessorRules.GetShipAddressIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipAddress]);
+end;
+
+function TOrdersBusinessProcessorRules.GetOldShipAddressValue: WideString;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersShipAddress];
+end;
+
+function TOrdersBusinessProcessorRules.GetOldShipAddressIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersShipAddress]);
+end;
+
+procedure TOrdersBusinessProcessorRules.SetShipAddressValue(const aValue: WideString);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipAddress] := aValue;
+end;
+
+procedure TOrdersBusinessProcessorRules.SetShipAddressIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipAddress] := Null;
+end;
+
+function TOrdersBusinessProcessorRules.GetShipCityValue: WideString;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipCity];
+end;
+
+function TOrdersBusinessProcessorRules.GetShipCityIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipCity]);
+end;
+
+function TOrdersBusinessProcessorRules.GetOldShipCityValue: WideString;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersShipCity];
+end;
+
+function TOrdersBusinessProcessorRules.GetOldShipCityIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersShipCity]);
+end;
+
+procedure TOrdersBusinessProcessorRules.SetShipCityValue(const aValue: WideString);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipCity] := aValue;
+end;
+
+procedure TOrdersBusinessProcessorRules.SetShipCityIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipCity] := Null;
+end;
+
+function TOrdersBusinessProcessorRules.GetShipRegionValue: WideString;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipRegion];
+end;
+
+function TOrdersBusinessProcessorRules.GetShipRegionIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipRegion]);
+end;
+
+function TOrdersBusinessProcessorRules.GetOldShipRegionValue: WideString;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersShipRegion];
+end;
+
+function TOrdersBusinessProcessorRules.GetOldShipRegionIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersShipRegion]);
+end;
+
+procedure TOrdersBusinessProcessorRules.SetShipRegionValue(const aValue: WideString);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipRegion] := aValue;
+end;
+
+procedure TOrdersBusinessProcessorRules.SetShipRegionIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipRegion] := Null;
+end;
+
+function TOrdersBusinessProcessorRules.GetShipPostalCodeValue: WideString;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipPostalCode];
+end;
+
+function TOrdersBusinessProcessorRules.GetShipPostalCodeIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipPostalCode]);
+end;
+
+function TOrdersBusinessProcessorRules.GetOldShipPostalCodeValue: WideString;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersShipPostalCode];
+end;
+
+function TOrdersBusinessProcessorRules.GetOldShipPostalCodeIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersShipPostalCode]);
+end;
+
+procedure TOrdersBusinessProcessorRules.SetShipPostalCodeValue(const aValue: WideString);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipPostalCode] := aValue;
+end;
+
+procedure TOrdersBusinessProcessorRules.SetShipPostalCodeIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipPostalCode] := Null;
+end;
+
+function TOrdersBusinessProcessorRules.GetShipCountryValue: WideString;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipCountry];
+end;
+
+function TOrdersBusinessProcessorRules.GetShipCountryIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipCountry]);
+end;
+
+function TOrdersBusinessProcessorRules.GetOldShipCountryValue: WideString;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersShipCountry];
+end;
+
+function TOrdersBusinessProcessorRules.GetOldShipCountryIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersShipCountry]);
+end;
+
+procedure TOrdersBusinessProcessorRules.SetShipCountryValue(const aValue: WideString);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipCountry] := aValue;
+end;
+
+procedure TOrdersBusinessProcessorRules.SetShipCountryIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipCountry] := Null;
+end;
+
+
+initialization
+ RegisterBusinessProcessorRules(RID_CustomersDelta, TCustomersBusinessProcessorRules);
+ RegisterBusinessProcessorRules(RID_OrdersDelta, TOrdersBusinessProcessorRules);
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/ServerGlobal.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/ServerGlobal.pas
new file mode 100644
index 0000000..2bbee06
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Processor/ServerGlobal.pas
@@ -0,0 +1,15 @@
+unit ServerGlobal;
+
+interface
+var
+ gCompany: string = 'Company';
+ gCompanyCheck: Boolean = True;
+ gFreightCheck: Boolean = True;
+ gFreight: integer = 20;
+ gDeclineDeleteCustomers: Boolean = True;
+ gDeclineDeleteOrders: Boolean = True;
+ gCheckCustomerID: Boolean = True;
+implementation
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts.Sample.html b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts.Sample.html
new file mode 100644
index 0000000..5e87368
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts.Sample.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
+
+ BusinessRulesScripts
+
+
+
+Purpose
+
+ This example demonstrates how client side scripts can be modified on the server
+ and then downloaded to the client via a simple call.
+
+
+ When you compile and launch the server, it displays a memo containing various client
+ side rules executed within event handlers such as BeforePost.
+
+
+ You can test it by compiling and launching the client. Try deleting an
+ item with a gain > 90 , for example.
+
+
+ Next modify the server memo and click Refresh Scripts from Server
+ to see that your change has been actioned.
+
+
+ Note how the strong typing allows simple reference to field names, thus
+ making script changes as simple as possible.
+
+
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts.bdsgroup b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts.bdsgroup
new file mode 100644
index 0000000..2245049
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts.bdsgroup
@@ -0,0 +1,20 @@
+
+
+
+
+ Default.Personality
+
+ 1.0
+ {CED06B4E-A2AA-4E9D-BA08-976E2F0D2CD7}
+
+
+
+
+
+ BusinessRulesScripts_Server.bdsproj
+ BusinessRulesScripts_Client.bdsproj
+ BusinessRulesScripts_Server.exe BusinessRulesScripts_Client.exe
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts.bpg b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts.bpg
new file mode 100644
index 0000000..12ab893
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts.bpg
@@ -0,0 +1,23 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = BusinessRulesScripts_Server.exe BusinessRulesScripts_Client.exe
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+BusinessRulesScripts_Server.exe: BusinessRulesScripts_Server.dpr
+ $(DCC)
+
+BusinessRulesScripts_Client.exe: BusinessRulesScripts_Client.dpr
+ $(DCC)
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts.groupproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts.groupproj
new file mode 100644
index 0000000..181c87d
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts.groupproj
@@ -0,0 +1,40 @@
+
+
+ {d1f18c23-83b8-4d53-bd98-adcf9fdf1af0}
+
+
+
+
+ Default.Personality
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScriptsLibrary.rodl b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScriptsLibrary.rodl
new file mode 100644
index 0000000..003f8dc
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScriptsLibrary.rodl
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScriptsLibrary_Intf.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScriptsLibrary_Intf.pas
new file mode 100644
index 0000000..11fa2f4
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScriptsLibrary_Intf.pas
@@ -0,0 +1,95 @@
+unit BusinessRulesScriptsLibrary_Intf;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROClasses, uROClient, uROTypes, uROClientIntf,
+ {Used RODLs:} DataAbstract4_Intf;
+
+const
+ { Library ID }
+ LibraryUID = '{E97481D6-EA65-4F8F-8CB0-128A20DA2B2C}';
+
+ { Service Interface ID's }
+ INewService_IID : TGUID = '{25DCCAE5-CA08-41B5-8DFC-03C4E548FE33}';
+
+ { Event ID's }
+
+type
+ { Forward declarations }
+ INewService = interface;
+
+
+
+
+ { INewService }
+ INewService = interface(IDataAbstractService)
+ ['{25DCCAE5-CA08-41B5-8DFC-03C4E548FE33}']
+ function GetDatasetScripts(const DatasetNames: String): String;
+ end;
+
+ { CoNewService }
+ CoNewService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): INewService;
+ end;
+
+ { TNewService_Proxy }
+ TNewService_Proxy = class(TDataAbstractService_Proxy, INewService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ function GetDatasetScripts(const DatasetNames: String): String;
+ end;
+
+implementation
+
+uses
+ {vcl:} SysUtils,
+ {RemObjects:} uROEventRepository, uRORes;
+
+{ CoNewService }
+
+class function CoNewService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): INewService;
+begin
+ result := TNewService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TNewService_Proxy }
+
+function TNewService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'NewService';
+end;
+
+function TNewService_Proxy.GetDatasetScripts(const DatasetNames: String): String;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'BusinessRulesScriptsLibrary', __InterfaceName, 'GetDatasetScripts');
+ __Message.Write('DatasetNames', TypeInfo(String), DatasetNames, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(String), result, []);
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+initialization
+ RegisterProxyClass(INewService_IID, TNewService_Proxy);
+
+
+finalization
+ UnregisterProxyClass(INewService_IID);
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScriptsLibrary_Invk.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScriptsLibrary_Invk.pas
new file mode 100644
index 0000000..07c636c
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScriptsLibrary_Invk.pas
@@ -0,0 +1,54 @@
+unit BusinessRulesScriptsLibrary_Invk;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes,
+ {RemObjects:} uROServer, uROServerIntf, uROTypes, uROClientIntf,
+ {Used RODL Intf's:} DataAbstract4_Intf,
+ {Used RODL Invk's:} DataAbstract4_Invk,
+ {Generated:} BusinessRulesScriptsLibrary_Intf;
+
+type
+ TNewService_Invoker = class(TDataAbstractService_Invoker)
+ private
+ protected
+ published
+ procedure Invoke_GetDatasetScripts(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ end;
+
+implementation
+
+uses
+ {RemObjects:} uRORes, uROClient;
+
+{ TNewService_Invoker }
+
+procedure TNewService_Invoker.Invoke_GetDatasetScripts(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function GetDatasetScripts(const DatasetNames: String): String; }
+var
+ DatasetNames: String;
+ lResult: String;
+begin
+ try
+ __Message.Read('DatasetNames', TypeInfo(String), DatasetNames, []);
+
+ lResult := (__Instance as INewService).GetDatasetScripts(DatasetNames);
+
+ __Message.InitializeResponseMessage(__Transport, 'BusinessRulesScriptsLibrary', 'NewService', 'GetDatasetScriptsResponse');
+ __Message.Write('Result', TypeInfo(String), lResult, []);
+ __Message.Finalize;
+
+ finally
+ end;
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_Client.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_Client.bdsproj
new file mode 100644
index 0000000..3727fb3
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_Client.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {4D1546F9-A907-442E-89D1-1DBC969B556B}
+
+
+
+
+ BusinessRulesScripts_Client.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_Client.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_Client.dpr
new file mode 100644
index 0000000..49b86b7
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_Client.dpr
@@ -0,0 +1,17 @@
+program BusinessRulesScripts_Client;
+
+uses
+ uROComInit,
+ Forms,
+ BusinessRulesScripts_ClientMain in 'BusinessRulesScripts_ClientMain.pas' {BusinessRulesScripts_ClientMainForm},
+ BusinessRulesScripts_ClientData in 'BusinessRulesScripts_ClientData.pas' {BusinessRulesScripts_ClientDataModule: TDAClientDataModule};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'BusinessRulesScripts Client';
+ Application.CreateForm(TBusinessRulesScripts_ClientDataModule, BusinessRulesScripts_ClientDataModule);
+ Application.CreateForm(TBusinessRulesScripts_ClientMainForm, BusinessRulesScripts_ClientMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_Client.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_Client.dproj
new file mode 100644
index 0000000..71f4c0d
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_Client.dproj
@@ -0,0 +1,75 @@
+
+
+ {d6188ece-37af-4464-a5cb-347a71598f81}
+ BusinessRulesScripts_Client.dpr
+ Debug
+ AnyCPU
+ DCC32
+ BusinessRulesScripts_Client.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ BusinessRulesScripts_Client.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_Client.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_Client.res
new file mode 100644
index 0000000..da01de5
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_Client.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_ClientData.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_ClientData.dfm
new file mode 100644
index 0000000..f4415e5
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_ClientData.dfm
@@ -0,0 +1,386 @@
+object BusinessRulesScripts_ClientDataModule: TBusinessRulesScripts_ClientDataModule
+ OldCreateOrder = True
+ Left = 447
+ Top = 246
+ Height = 382
+ Width = 300
+ object ROChannel: TROWinInetHTTPChannel
+ UserAgent = 'RemObjects SDK'
+ TargetURL = 'http://localhost:8099/BIN'
+ ServerLocators = <>
+ DispatchOptions = []
+ Left = 40
+ Top = 8
+ end
+ object ROMessage: TROBinMessage
+ Left = 40
+ Top = 52
+ end
+ object RemoteService: TRORemoteService
+ Message = ROMessage
+ Channel = ROChannel
+ ServiceName = 'NewService'
+ Left = 41
+ Top = 96
+ end
+ object BinDataStreamer: TDABinDataStreamer
+ Left = 40
+ Top = 142
+ end
+ object dtProducts: TDACDSDataTable
+ ScriptingProvider = DAPSScriptingProvider
+ RemoteUpdatesOptions = []
+ Fields = <
+ item
+ Name = 'ProductID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ProductName'
+ DataType = datWideString
+ Size = 40
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'SupplierID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CategoryID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'QuantityPerUnit'
+ DataType = datWideString
+ Size = 20
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'UnitPrice'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'UnitsInStock'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'UnitsOnOrder'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ReorderLevel'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Discontinued'
+ DataType = datBoolean
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Gain'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ LogChanges = False
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = True
+ Lookup = False
+ LookupCache = False
+ end>
+ Params = <>
+ MasterMappingMode = mmDataRequest
+ StreamingOptions = [soIgnoreStreamSchema, soDisableEventsWhileStreaming]
+ RemoteDataAdapter = RemoteDataAdapter
+ ReadOnly = False
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ LogicalName = 'Products'
+ IndexDefs = <>
+ Left = 128
+ Top = 160
+ end
+ object dsProducts: TDADataSource
+ DataSet = dtProducts.Dataset
+ DataTable = dtProducts
+ Left = 127
+ Top = 187
+ end
+ object DAPSScriptingProvider: TDAPSScriptingProvider
+ ScriptEngine.CompilerOptions = [icAllowNoBegin, icAllowNoEnd, icBooleanShortCircuit]
+ ScriptEngine.Plugins = <
+ item
+ Plugin = DAPSScriptingProvider.PluginClasses
+ end
+ item
+ Plugin = DAPSScriptingProvider.PluginDB
+ end
+ item
+ Plugin = DAPSScriptingProvider.PluginDateUtils
+ end>
+ ScriptEngine.UsePreProcessor = False
+ Left = 128
+ Top = 256
+ end
+ object RemoteDataAdapter: TDARemoteDataAdapter
+ GetSchemaCall.RemoteService = RemoteService
+ GetSchemaCall.MethodName = 'GetSchema'
+ GetSchemaCall.Params = <
+ item
+ Name = 'aFilter'
+ DataType = rtString
+ Flag = fIn
+ Value = Null
+ end
+ item
+ Name = 'Result'
+ DataType = rtString
+ Flag = fResult
+ Value = Null
+ end>
+ GetSchemaCall.Default = False
+ GetSchemaCall.IncomingSchemaParameter = 'Result'
+ GetSchemaCall.OutgoingFilterParameter = 'aFilter'
+ GetDataCall.RemoteService = RemoteService
+ GetDataCall.MethodName = 'GetData'
+ GetDataCall.Params = <
+ item
+ Name = 'aTableNameArray'
+ DataType = rtUserDefined
+ Flag = fIn
+ TypeName = 'StringArray'
+ Value = Null
+ end
+ item
+ Name = 'aTableRequestInfoArray'
+ DataType = rtUserDefined
+ Flag = fIn
+ TypeName = 'TableRequestInfoArray'
+ Value = Null
+ end
+ item
+ Name = 'Result'
+ DataType = rtBinary
+ Flag = fResult
+ Value = Null
+ end>
+ GetDataCall.Default = False
+ GetDataCall.OutgoingTableNamesParameter = 'aTableNameArray'
+ GetDataCall.OutgoingTableRequestInfosParameter = 'aTableRequestInfoArray'
+ GetDataCall.IncomingDataParameter = 'Result'
+ UpdateDataCall.RemoteService = RemoteService
+ UpdateDataCall.MethodName = 'UpdateData'
+ UpdateDataCall.Params = <
+ item
+ Name = 'aDelta'
+ DataType = rtBinary
+ Flag = fIn
+ end
+ item
+ Name = 'Result'
+ DataType = rtBinary
+ Flag = fResult
+ end>
+ UpdateDataCall.Default = False
+ UpdateDataCall.OutgoingDeltaParameter = 'aDelta'
+ UpdateDataCall.IncomingDeltaParameter = 'Result'
+ GetScriptsCall.RemoteService = RemoteService
+ GetScriptsCall.MethodName = 'GetDatasetScripts'
+ GetScriptsCall.Params = <
+ item
+ Name = 'Result'
+ DataType = rtString
+ Flag = fResult
+ end
+ item
+ Name = 'DatasetNames'
+ DataType = rtString
+ Flag = fIn
+ Value = Null
+ end>
+ GetScriptsCall.Default = False
+ GetScriptsCall.OutgoingTableNamesParameter = 'DatasetNames'
+ GetScriptsCall.IncomingScriptParameter = 'Result'
+ RemoteService = RemoteService
+ DataStreamer = BinDataStreamer
+ AutoFillScripts = True
+ Left = 128
+ Top = 103
+ end
+ object dtOrderDetails: TDACDSDataTable
+ ScriptingProvider = DAPSScriptingProvider
+ RemoteUpdatesOptions = []
+ Fields = <
+ item
+ Name = 'OrderID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ProductName'
+ DataType = datString
+ Size = 50
+ BlobType = dabtUnknown
+ LogChanges = False
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = True
+ LookupSource = dsProducts
+ LookupKeyFields = 'ProductID'
+ LookupResultField = 'ProductName'
+ KeyFields = 'ProductID'
+ LookupCache = True
+ end
+ item
+ Name = 'ProductID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Visible = False
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'UnitPrice'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Quantity'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Discount'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ DisplayFormat = '0.##'
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Gain'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ LogChanges = False
+ DisplayWidth = 0
+ DisplayFormat = '0.##'
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = True
+ Lookup = False
+ LookupCache = False
+ end>
+ Params = <>
+ MasterMappingMode = mmDataRequest
+ StreamingOptions = [soIgnoreStreamSchema, soDisableEventsWhileStreaming]
+ RemoteDataAdapter = RemoteDataAdapter
+ ReadOnly = False
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ LogicalName = 'OrderDetails'
+ IndexDefs = <>
+ Left = 157
+ Top = 159
+ end
+ object dsOrderDetails: TDADataSource
+ DataSet = dtOrderDetails.Dataset
+ DataTable = dtOrderDetails
+ Left = 158
+ Top = 188
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_ClientData.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_ClientData.pas
new file mode 100644
index 0000000..3a2634c
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_ClientData.pas
@@ -0,0 +1,37 @@
+unit BusinessRulesScripts_ClientData;
+
+interface
+
+uses {vcl:} SysUtils, Classes, DB, DBClient,
+ {RemObjects:} uROClient, uROClientIntf, uRORemoteService, uROBinMessage, uROWinInetHTTPChannel,
+ {Data Abstract:} uDADataTable, uDABINAdapter, uDAInterfaces,
+ uDAScriptingProvider, uDACDSDataTable,
+ uDAPSScriptingProvider, uDADataStreamer, uDARemoteDataAdapter;
+
+type
+ TBusinessRulesScripts_ClientDataModule = class(TDataModule)
+ ROMessage: TROBinMessage;
+ ROChannel: TROWinInetHTTPChannel;
+ RemoteService: TRORemoteService;
+ BinDataStreamer: TDABinDataStreamer;
+ dtProducts: TDACDSDataTable;
+ dsProducts: TDADataSource;
+ DAPSScriptingProvider: TDAPSScriptingProvider;
+ RemoteDataAdapter: TDARemoteDataAdapter;
+ dtOrderDetails: TDACDSDataTable;
+ dsOrderDetails: TDADataSource;
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ BusinessRulesScripts_ClientDataModule: TBusinessRulesScripts_ClientDataModule;
+
+implementation
+
+{$R *.dfm}
+
+initialization
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_ClientMain.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_ClientMain.dfm
new file mode 100644
index 0000000..09aec1d
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_ClientMain.dfm
@@ -0,0 +1,79 @@
+object BusinessRulesScripts_ClientMainForm: TBusinessRulesScripts_ClientMainForm
+ Left = 163
+ Top = 30
+ AutoScroll = False
+ BorderWidth = 5
+ Caption = 'Business Rules Script Client'
+ ClientHeight = 316
+ ClientWidth = 565
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ PixelsPerInch = 96
+ TextHeight = 13
+ object BitBtn1: TBitBtn
+ Left = 0
+ Top = 0
+ Width = 169
+ Height = 25
+ Caption = 'Refresh Scripts from Server'
+ TabOrder = 0
+ OnClick = BitBtn1Click
+ Glyph.Data = {
+ 36030000424D3603000000000000360000002800000010000000100000000100
+ 18000000000000030000120B0000120B00000000000000000000FF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFA467698E5D598E5D598E5D598E5D598E5D598E
+ 5D598E5D598E5D598E5D598E5D598E5D5980504BFF00FFFF00FFFF00FFA46769
+ FCEACEF3DABCF2D5B1F0D0A7EECB9EEDC793EDC28BE9BD81E9BD7FE9BD7FEFC4
+ 8180504BFF00FFFF00FFFF00FFA0675BFEEFDAF6E0C6F2DABCF2D5B2C1C18800
+ 7000007000BDB672E9BD82E9BD7FEFC48180504BFF00FFFF00FFFF00FFA0675B
+ FFF4E5F7E5CF007000C4CA97007000C2C187C0BD80007000BDB66FEABF81EFC4
+ 8080504BFF00FFFF00FFFF00FFA7756BFFFBF0F8EADC007000007000C4C998F2
+ D5B1F0D0A9BFBD80007000EBC28AEFC58380504BFF00FFFF00FFFF00FFA7756B
+ FFFFFCFAF0E6007000007000007000F2DABAF2D5B1F0D0A7EECB9DEBC793F2C9
+ 8C80504BFF00FFFF00FFFF00FFBC8268FFFFFFFEF7F2FAEFE6F8EAD9F7E3CFF6
+ E0C5007000007000007000EECC9EF3CE9780504BFF00FFFF00FFFF00FFBC8268
+ FFFFFFFFFEFC007000CADABAF7EADAF6E3CFC5CE9F007000007000F0D0A6F6D3
+ A080504BFF00FFFF00FFFF00FFD1926DFFFFFFFFFFFFCEE7CC007000CADAB8C9
+ D7B0007000C6CC9E007000F4D8B1EBCFA480504BFF00FFFF00FFFF00FFD1926D
+ FFFFFFFFFFFFFFFFFFCEE7CC007000007000C9D5B0F8E7D1FBEACEDECEB4B6AA
+ 9380504BFF00FFFF00FFFF00FFDA9D75FFFFFFFFFFFFFFFFFFFFFFFFFFFEFCFC
+ F6EFFCF3E6EDD8C9A0675BA0675BA0675BA0675BFF00FFFF00FFFF00FFDA9D75
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFBFFFEF7DAC1BAA0675BE19E55E68F
+ 31B56D4DFF00FFFF00FFFF00FFE7AB79FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFDCC7C5A0675BF8B55CBF7A5CFF00FFFF00FFFF00FFFF00FFE7AB79
+ FBF4F0FBF4EFFAF3EFFAF3EFF8F2EFF7F2EFF7F2EFD8C2C0A0675BC1836CFF00
+ FFFF00FFFF00FFFF00FFFF00FFE7AB79CF8E68CF8E68CF8E68CF8E68CF8E68CF
+ 8E68CF8E68CF8E68A0675BFF00FFFF00FFFF00FFFF00FFFF00FF}
+ end
+ object gOrderDetails: TDBGrid
+ Left = 0
+ Top = 33
+ Width = 565
+ Height = 283
+ Align = alBottom
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ DataSource = BusinessRulesScripts_ClientDataModule.dsOrderDetails
+ TabOrder = 1
+ TitleFont.Charset = DEFAULT_CHARSET
+ TitleFont.Color = clWindowText
+ TitleFont.Height = -11
+ TitleFont.Name = 'Tahoma'
+ TitleFont.Style = []
+ end
+ object DBNavigator1: TDBNavigator
+ Left = 176
+ Top = 0
+ Width = 370
+ Height = 25
+ DataSource = BusinessRulesScripts_ClientDataModule.dsOrderDetails
+ TabOrder = 2
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_ClientMain.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_ClientMain.pas
new file mode 100644
index 0000000..61142e6
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_ClientMain.pas
@@ -0,0 +1,45 @@
+unit BusinessRulesScripts_ClientMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
+ uROClient, uROClientIntf, uRORemoteService, uROBinMessage, uROIndyHTTPChannel,
+ Buttons, ExtCtrls, DBCtrls, Grids, DBGrids;
+
+type
+ TBusinessRulesScripts_ClientMainForm = class(TForm)
+ BitBtn1: TBitBtn;
+ gOrderDetails: TDBGrid;
+ DBNavigator1: TDBNavigator;
+ procedure BitBtn1Click(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ BusinessRulesScripts_ClientMainForm: TBusinessRulesScripts_ClientMainForm;
+
+implementation
+
+uses
+ BusinessRulesScripts_ClientData;
+
+{$R *.dfm}
+
+procedure TBusinessRulesScripts_ClientMainForm.BitBtn1Click(Sender: TObject);
+begin
+ BusinessRulesScripts_ClientDataModule.dtOrderDetails.LoadScript();
+ gOrderDetails.Refresh();
+end;
+
+procedure TBusinessRulesScripts_ClientMainForm.FormCreate(Sender: TObject);
+begin
+ BusinessRulesScripts_ClientDataModule.dtOrderDetails.Open();
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_Server.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_Server.bdsproj
new file mode 100644
index 0000000..98c5c99
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_Server.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {FFAC48F8-D2E5-4F68-9B69-0716120E4B35}
+
+
+
+
+ BusinessRulesScripts_Server.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_Server.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_Server.dpr
new file mode 100644
index 0000000..22834ce
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_Server.dpr
@@ -0,0 +1,23 @@
+program BusinessRulesScripts_Server;
+
+{#ROGEN:BusinessRulesScriptsLibrary.rodl} // RemObjects: Careful, do not remove!
+
+uses
+ uROComInit,
+ Forms,
+ BusinessRulesScripts_ServerMain in 'BusinessRulesScripts_ServerMain.pas' {BusinessRulesScripts_ServerMainForm},
+ BusinessRulesScripts_ServerData in 'BusinessRulesScripts_ServerData.pas' {BusinessRulesScripts_ServerDataModule: TDataModule},
+ BusinessRulesScriptsLibrary_Intf in 'BusinessRulesScriptsLibrary_Intf.pas',
+ BusinessRulesScriptsLibrary_Invk in 'BusinessRulesScriptsLibrary_Invk.pas',
+ NewService_Impl in 'NewService_Impl.pas' {NewService: TDataAbstractService};
+
+{$R *.res}
+{$R RODLFile.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'BusinessRulesScripts Server';
+ Application.CreateForm(TBusinessRulesScripts_ServerDataModule, BusinessRulesScripts_ServerDataModule);
+ Application.CreateForm(TBusinessRulesScripts_ServerMainForm, BusinessRulesScripts_ServerMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_Server.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_Server.dproj
new file mode 100644
index 0000000..bffa2c6
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_Server.dproj
@@ -0,0 +1,80 @@
+
+
+ {61f4e143-e541-455f-bfd4-108c7175e3aa}
+ BusinessRulesScripts_Server.dpr
+ Debug
+ AnyCPU
+ DCC32
+ BusinessRulesScripts_Server.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ BusinessRulesScripts_Server.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_Server.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_Server.res
new file mode 100644
index 0000000..7455d6e
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_Server.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_ServerData.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_ServerData.dfm
new file mode 100644
index 0000000..dbfce7f
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_ServerData.dfm
@@ -0,0 +1,337 @@
+object BusinessRulesScripts_ServerDataModule: TBusinessRulesScripts_ServerDataModule
+ OldCreateOrder = False
+ OnCreate = DataModuleCreate
+ Left = 340
+ Top = 54
+ Height = 399
+ Width = 342
+ object ROServer: TROIndyHTTPServer
+ Dispatchers = <
+ item
+ Name = 'ROMessage'
+ Message = ROMessage
+ Enabled = True
+ PathInfo = 'Bin'
+ end>
+ Port = 8099
+ Left = 32
+ Top = 8
+ end
+ object ROMessage: TROBinMessage
+ Left = 34
+ Top = 56
+ end
+ object ConnectionManager: TDAConnectionManager
+ MaxPoolSize = 10
+ PoolTimeoutSeconds = 60
+ PoolBehaviour = pbWait
+ WaitIntervalSeconds = 1
+ Connections = <
+ item
+ Name = 'ADO'
+ ConnectionString =
+ 'ADO?AuxDriver=SQLOLEDB.1;Server=localhost;Database=Northwind;Use' +
+ 'rID=sa;Password=;'
+ Default = True
+ Tag = 0
+ end>
+ DriverManager = DriverManager
+ PoolingEnabled = True
+ Left = 136
+ Top = 56
+ end
+ object DriverManager: TDADriverManager
+ DriverDirectory = '%SYSTEM%\'
+ AutoLoad = False
+ TraceActive = False
+ TraceFlags = []
+ Left = 136
+ Top = 10
+ end
+ object Schema: TDASchema
+ ConnectionManager = ConnectionManager
+ DataDictionary = DataDictionary
+ Datasets = <
+ item
+ Params = <>
+ Statements = <
+ item
+ Connection = 'ADO'
+ TargetTable = 'Products'
+ SQL =
+ 'SELECT '#10' ProductID, ProductName, SupplierID, CategoryID, Quan' +
+ 'tityPerUnit, '#10' UnitPrice, UnitsInStock, UnitsOnOrder, Reorder' +
+ 'Level, '#10' Discontinued'#10' FROM'#10' Products'
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'ProductID'
+ TableField = 'ProductID'
+ end
+ item
+ DatasetField = 'ProductName'
+ TableField = 'ProductName'
+ end
+ item
+ DatasetField = 'SupplierID'
+ TableField = 'SupplierID'
+ end
+ item
+ DatasetField = 'CategoryID'
+ TableField = 'CategoryID'
+ end
+ item
+ DatasetField = 'QuantityPerUnit'
+ TableField = 'QuantityPerUnit'
+ end
+ item
+ DatasetField = 'UnitPrice'
+ TableField = 'UnitPrice'
+ end
+ item
+ DatasetField = 'UnitsInStock'
+ TableField = 'UnitsInStock'
+ end
+ item
+ DatasetField = 'UnitsOnOrder'
+ TableField = 'UnitsOnOrder'
+ end
+ item
+ DatasetField = 'ReorderLevel'
+ TableField = 'ReorderLevel'
+ end
+ item
+ DatasetField = 'Discontinued'
+ TableField = 'Discontinued'
+ end>
+ end>
+ Name = 'Products'
+ Fields = <
+ item
+ Name = 'ProductID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ProductName'
+ DataType = datWideString
+ Size = 40
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'SupplierID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CategoryID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'QuantityPerUnit'
+ DataType = datWideString
+ Size = 20
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'UnitPrice'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'UnitsInStock'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'UnitsOnOrder'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ReorderLevel'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Discontinued'
+ DataType = datBoolean
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ BusinessRulesClient.ScriptLanguage = rslPascalScript
+ BusinessRulesServer.ScriptLanguage = rslPascalScript
+ end
+ item
+ Params = <>
+ Statements = <
+ item
+ Connection = 'ADO'
+ TargetTable = 'OrderDetails'
+ SQL =
+ 'SELECT '#10' OrderID, ProductID, UnitPrice, Quantity, Discount'#10' ' +
+ 'FROM'#10' [Order Details]'
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'OrderID'
+ TableField = 'OrderID'
+ end
+ item
+ DatasetField = 'ProductID'
+ TableField = 'ProductID'
+ end
+ item
+ DatasetField = 'UnitPrice'
+ TableField = 'UnitPrice'
+ end
+ item
+ DatasetField = 'Quantity'
+ TableField = 'Quantity'
+ end
+ item
+ DatasetField = 'Discount'
+ TableField = 'Discount'
+ end>
+ end>
+ Name = 'OrderDetails'
+ Fields = <
+ item
+ Name = 'OrderID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ProductID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'UnitPrice'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Quantity'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Discount'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ BusinessRulesClient.Script =
+ 'procedure BeforeDelete;'#10'begin'#10' if Gain > 50 then'#10' RaiseError' +
+ '('#39'Cannot delete orders that make us more then 50$'#39');'#10'end;'#10#10'pro' +
+ 'cedure BeforePost;'#10'begin'#10' if VarIsNull(ProductID) then'#10' Rais' +
+ 'eError('#39'Please specify a name.'#39');'#10' '#10' if Quantity < 1 then'#10' ' +
+ ' RaiseError('#39'Quantity can not be less 1 !'#39');'#10#10' if UnitPrice < ' +
+ '10 then'#10' Quantity := 10;'#10'end;'#10#10'procedure OnCalcFields;'#10'begin'#10 +
+ ' Gain := UnitPrice*Quantity*(1-Discount);'#10'end;'#10#10'procedure OnNew' +
+ 'Record;'#10'begin'#10' Quantity := 1;'#10'end;'
+ BusinessRulesClient.ScriptLanguage = rslPascalScript
+ BusinessRulesServer.ScriptLanguage = rslPascalScript
+ end>
+ Commands = <>
+ RelationShips = <>
+ UpdateRules = <>
+ Left = 43
+ Top = 150
+ end
+ object DataDictionary: TDADataDictionary
+ Fields = <>
+ Left = 40
+ Top = 200
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_ServerData.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_ServerData.pas
new file mode 100644
index 0000000..6e4f778
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_ServerData.pas
@@ -0,0 +1,39 @@
+unit BusinessRulesScripts_ServerData;
+
+interface
+
+uses
+ SysUtils, Classes,
+ uROClient, uROPoweredByRemObjectsButton, uROClientIntf, uROServer,
+ uROBinMessage, uROIndyHTTPServer,
+ uDADriverManager, uDAClasses, uDAEngine, uDAADODriver, uROIndyTCPServer,
+ uDADataTable, uDABINAdapter;
+
+type
+ TBusinessRulesScripts_ServerDataModule = class(TDataModule)
+ ROServer: TROIndyHTTPServer;
+ ROMessage: TROBinMessage;
+ DriverManager: TDADriverManager;
+ ConnectionManager: TDAConnectionManager;
+ Schema: TDASchema;
+ DataDictionary: TDADataDictionary;
+ procedure DataModuleCreate(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ BusinessRulesScripts_ServerDataModule: TBusinessRulesScripts_ServerDataModule;
+
+implementation
+
+{$R *.dfm}
+
+procedure TBusinessRulesScripts_ServerDataModule.DataModuleCreate(Sender: TObject);
+begin
+ ROServer.Active := true;
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_ServerMain.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_ServerMain.dfm
new file mode 100644
index 0000000..340e738
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_ServerMain.dfm
@@ -0,0 +1,44 @@
+object BusinessRulesScripts_ServerMainForm: TBusinessRulesScripts_ServerMainForm
+ Left = 90
+ Top = 79
+ AutoScroll = False
+ BorderWidth = 5
+ Caption = 'Business Rules Scripts Server'
+ ClientHeight = 406
+ ClientWidth = 614
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ PixelsPerInch = 96
+ TextHeight = 13
+ object RoPoweredByRemObjectsButton1: TROPoweredByRemObjectsButton
+ Left = 0
+ Top = 0
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ end
+ object ed_Script: TMemo
+ Left = 0
+ Top = 54
+ Width = 614
+ Height = 352
+ Align = alBottom
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -13
+ Font.Name = 'Courier New'
+ Font.Style = []
+ ParentFont = False
+ ScrollBars = ssVertical
+ TabOrder = 0
+ OnChange = ed_ScriptChange
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_ServerMain.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_ServerMain.pas
new file mode 100644
index 0000000..4c13c25
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/BusinessRulesScripts_ServerMain.pas
@@ -0,0 +1,45 @@
+unit BusinessRulesScripts_ServerMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
+ uROClient, uROPoweredByRemObjectsButton, uROClientIntf, uROServer,
+ uROBinMessage, uROIndyHTTPServer;
+
+type
+ TBusinessRulesScripts_ServerMainForm = class(TForm)
+ RoPoweredByRemObjectsButton1: TRoPoweredByRemObjectsButton;
+ ed_Script: TMemo;
+ procedure FormCreate(Sender: TObject);
+ procedure ed_ScriptChange(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ BusinessRulesScripts_ServerMainForm: TBusinessRulesScripts_ServerMainForm;
+
+implementation
+
+uses
+ BusinessRulesScripts_ServerData;
+
+{$R *.dfm}
+
+procedure TBusinessRulesScripts_ServerMainForm.FormCreate(Sender: TObject);
+begin
+ with BusinessRulesScripts_ServerDataModule.Schema.Datasets.DatasetByName('OrderDetails').BusinessRulesClient do
+ ed_Script.Text := StringReplace(Script, #10, sLineBreak, [rfReplaceAll]);
+end;
+
+procedure TBusinessRulesScripts_ServerMainForm.ed_ScriptChange(Sender: TObject);
+begin
+ with BusinessRulesScripts_ServerDataModule.Schema.Datasets.DatasetByName('OrderDetails').BusinessRulesClient do
+ Script := ed_Script.Text;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/NewService_Impl.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/NewService_Impl.dfm
new file mode 100644
index 0000000..3cac002
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/NewService_Impl.dfm
@@ -0,0 +1,15 @@
+object NewService: TNewService
+ OldCreateOrder = True
+ AcquireConnection = True
+ ServiceSchema = BusinessRulesScripts_ServerDataModule.Schema
+ ServiceDataStreamer = BinDataStreamer
+ ExportedDataTables = <>
+ Left = 188
+ Top = 181
+ Height = 150
+ Width = 205
+ object BinDataStreamer: TDABinDataStreamer
+ Left = 33
+ Top = 18
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/NewService_Impl.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/NewService_Impl.pas
new file mode 100644
index 0000000..51b6c4f
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/NewService_Impl.pas
@@ -0,0 +1,45 @@
+unit NewService_Impl;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ This is where you are supposed to code the implementation of your objects. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils,
+ {RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
+ {Ancestor Implementation:} DataAbstractService_Impl,
+ {Used RODLs:} DataAbstract4_Intf,
+ {Generated:} BusinessRulesScriptsLibrary_Intf, uDADataStreamer,
+ uDABinAdapter,uDAInterfaces;
+
+type
+ { TNewService }
+ TNewService = class(TDataAbstractService, INewService)
+ BinDataStreamer: TDABinDataStreamer;
+ private
+ protected
+ end;
+
+implementation
+
+{$R *.dfm}
+uses
+ {Generated:} BusinessRulesScriptsLibrary_Invk, BusinessRulesScripts_ServerData,TypInfo;
+
+procedure Create_NewService(out anInstance: IUnknown);
+begin
+ anInstance := TNewService.Create(nil);
+end;
+
+initialization
+ TROClassFactory.Create('NewService', Create_NewService, TNewService_Invoker);
+
+finalization
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/RODLFILE.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/RODLFILE.res
new file mode 100644
index 0000000..53e3ab7
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Business Rules Scripts/RODLFILE.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields.Sample.html b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields.Sample.html
new file mode 100644
index 0000000..2d8151b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields.Sample.html
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+ Calculated Fields Example
+
+Purpose
+
+ This example shows how to handle calculated fields server side and client
+ side.
+
+Examine the Code
+
+ Server side fields are processed via the BinAdapter's OnWriteFieldValue
+ event handler (see CalcFieldsService_Impl ).
+
+
+ On the client side , they are handled as you would expect via dtCustomers.OnCalcFields
+ (see CalcFields_ClientData ). Note though, how the client field actually references
+ the server value.
+
+
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields.bdsgroup b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields.bdsgroup
new file mode 100644
index 0000000..9fa715f
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields.bdsgroup
@@ -0,0 +1,20 @@
+
+
+
+
+ Default.Personality
+
+ 1.0
+ {FEE7EB90-4635-4022-B5E9-A2E21086B02B}
+
+
+
+
+
+ CalcFields_Server.bdsproj
+ CalcFields_Client.bdsproj
+ CalcFields_Server.exe CalcFields_Client.exe
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields.bpg b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields.bpg
new file mode 100644
index 0000000..024afdc
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields.bpg
@@ -0,0 +1,23 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = CalcFields_Server.exe CalcFields_Client.exe
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+CalcFields_Client.exe: CalcFields_Client.dpr
+ $(DCC)
+
+CalcFields_Server.exe: CalcFields_Server.dpr
+ $(DCC)
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields.groupproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields.groupproj
new file mode 100644
index 0000000..f6d8ad4
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields.groupproj
@@ -0,0 +1,40 @@
+
+
+ {70b86ab1-4399-4031-8bb6-28a50d072647}
+
+
+
+
+ Default.Personality
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFieldsLibrary.rodl b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFieldsLibrary.rodl
new file mode 100644
index 0000000..d2b0b72
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFieldsLibrary.rodl
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFieldsLibrary_Intf.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFieldsLibrary_Intf.pas
new file mode 100644
index 0000000..63bfd01
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFieldsLibrary_Intf.pas
@@ -0,0 +1,82 @@
+unit CalcFieldsLibrary_Intf;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+{$I Remobjects.inc}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROXMLIntf, uROClasses, uROClient, uROTypes, uROClientIntf,
+ {Used RODLs:} DataAbstract4_Intf;
+
+const
+ { Library ID }
+ LibraryUID = '{A54F3492-C4C5-4161-8536-FE04F7DE88E5}';
+ TargetNamespace = '';
+
+ { Service Interface ID's }
+ ICalcFieldsService_IID : TGUID = '{7113FC5C-4AB9-4583-B4E6-5F7F5A975E0A}';
+
+ { Event ID's }
+
+type
+ { Forward declarations }
+ ICalcFieldsService = interface;
+
+
+
+
+
+ { Enumerateds }
+
+ { ICalcFieldsService }
+ ICalcFieldsService = interface(IDataAbstractService)
+ ['{7113FC5C-4AB9-4583-B4E6-5F7F5A975E0A}']
+ end;
+
+ { CoCalcFieldsService }
+ CoCalcFieldsService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): ICalcFieldsService;
+ end;
+
+ { TCalcFieldsService_Proxy }
+ TCalcFieldsService_Proxy = class(TDataAbstractService_Proxy, ICalcFieldsService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ end;
+
+implementation
+
+uses
+ {vcl:} SysUtils,
+ {RemObjects:} uROEventRepository, uROSerializer, uRORes;
+
+{ CoCalcFieldsService }
+
+class function CoCalcFieldsService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): ICalcFieldsService;
+begin
+ result := TCalcFieldsService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+function TCalcFieldsService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'CalcFieldsService';
+end;
+
+initialization
+ RegisterProxyClass(ICalcFieldsService_IID, TCalcFieldsService_Proxy);
+
+
+finalization
+ UnregisterProxyClass(ICalcFieldsService_IID);
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFieldsLibrary_Invk.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFieldsLibrary_Invk.pas
new file mode 100644
index 0000000..e3e62a2
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFieldsLibrary_Invk.pas
@@ -0,0 +1,35 @@
+unit CalcFieldsLibrary_Invk;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+{$I Remobjects.inc}
+
+interface
+
+uses
+ {vcl:} Classes,
+ {RemObjects:} uROXMLIntf, uROServer, uROServerIntf, uROTypes, uROClientIntf,
+ {Used RODL Intf's:} DataAbstract4_Intf,
+ {Used RODL Invk's:} DataAbstract4_Invk,
+ {Generated:} CalcFieldsLibrary_Intf;
+
+type
+ TCalcFieldsService_Invoker = class(TDataAbstractService_Invoker)
+ private
+ protected
+ published
+ end;
+
+implementation
+
+uses
+ {RemObjects:} uRORes, uROClient;
+
+initialization
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFieldsService_Impl.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFieldsService_Impl.dfm
new file mode 100644
index 0000000..2d9dc08
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFieldsService_Impl.dfm
@@ -0,0 +1,83 @@
+object CalcFieldsService: TCalcFieldsService
+ OldCreateOrder = True
+ OnCreate = DataAbstractServiceCreate
+ ServiceSchema = Schema
+ ServiceDataStreamer = DataStreamer
+ ExportedDataTables = <>
+ Height = 300
+ Width = 300
+ object DataStreamer: TDABin2DataStreamer
+ OnWriteFieldValue = DataStreamerWriteFieldValue
+ Left = 32
+ Top = 8
+ end
+ object Schema: TDASchema
+ ConnectionManager = CalcFields_ServerDataForm.ConnectionManager
+ DataDictionary = DataDictionary
+ Datasets = <
+ item
+ Params = <>
+ Statements = <
+ item
+ Connection = 'ADO'
+ TargetTable = 'Customers'
+ SQL = 'SELECT '#10' CustomerID, CompanyName'#10#10' FROM'#10' Customers'#10
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'CustomerID'
+ TableField = 'CustomerID'
+ end
+ item
+ DatasetField = 'CompanyName'
+ TableField = 'CompanyName'
+ end
+ item
+ DatasetField = 'ServerCalculated'
+ TableField = ''
+ end>
+ end>
+ Name = 'Customers'
+ Fields = <
+ item
+ Name = 'CustomerID'
+ DataType = datString
+ Size = 5
+ InPrimaryKey = True
+ end
+ item
+ Name = 'CompanyName'
+ DataType = datString
+ Size = 40
+ end
+ item
+ Name = 'ServerCalculated'
+ DataType = datInteger
+ LogChanges = False
+ ReadOnly = True
+ ServerCalculated = True
+ end>
+ end>
+ JoinDataTables = <>
+ UnionDataTables = <>
+ Commands = <>
+ RelationShips = <>
+ UpdateRules = <>
+ Version = 0
+ Left = 32
+ Top = 56
+ end
+ object DataDictionary: TDADataDictionary
+ Fields = <>
+ Left = 32
+ Top = 103
+ end
+ object bpCustomers: TDABusinessProcessor
+ Schema = Schema
+ ReferencedDataset = 'Customers'
+ ProcessorOptions = [poAutoGenerateInsert, poAutoGenerateUpdate, poAutoGenerateDelete, poPrepareCommands]
+ UpdateMode = updWhereKeyOnly
+ Left = 112
+ Top = 56
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFieldsService_Impl.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFieldsService_Impl.pas
new file mode 100644
index 0000000..66b73ec
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFieldsService_Impl.pas
@@ -0,0 +1,75 @@
+unit CalcFieldsService_Impl;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ This is where you are supposed to code the implementation of your objects. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils,
+ {RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
+ {Ancestor Implementation:} DataAbstractService_Impl,
+ {Used RODLs:} DataAbstract4_Intf,
+ {Generated:} CalcFieldsLibrary_Intf, uDAScriptingProvider,
+ uDABusinessProcessor, uDAInterfaces, uDAClasses, uDADataStreamer,
+ uDABin2DataStreamer;
+
+const
+ { Dataset names for Schema }
+ ds_Customers = 'Customers';
+
+type
+ { TCalcFieldsService }
+ TCalcFieldsService = class(TDataAbstractService, ICalcFieldsService)
+ DataStreamer: TDABin2DataStreamer;
+ bpCustomers: TDABusinessProcessor;
+ Schema: TDASchema;
+ DataDictionary: TDADataDictionary;
+ procedure DataStreamerWriteFieldValue(const aField: TDAField;
+ var Value: Variant);
+ procedure DataAbstractServiceCreate(Sender: TObject);
+ private
+ fNextCalcValue: Integer;
+ protected
+ end;
+
+implementation
+
+{$R *.dfm}
+uses
+ {Generated:} CalcFieldsLibrary_Invk, CalcFields_ServerData;
+
+procedure Create_CalcFieldsService(out anInstance: IUnknown);
+begin
+ anInstance := TCalcFieldsService.Create(nil);
+end;
+
+{ CalcFieldsService }
+
+procedure TCalcFieldsService.DataStreamerWriteFieldValue(
+ const aField: TDAField; var Value: Variant);
+begin
+ if SameText(aField.Name, 'ServerCalculated') then
+ begin
+ Value := fNextCalcValue;
+ Inc(fNextCalcValue);
+ end;
+end;
+
+procedure TCalcFieldsService.DataAbstractServiceCreate(Sender: TObject);
+begin
+ inherited;
+ fNextCalcValue := 100;
+end;
+
+initialization
+ TROClassFactory.Create('CalcFieldsService', Create_CalcFieldsService, TCalcFieldsService_Invoker);
+
+finalization
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_Client.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_Client.bdsproj
new file mode 100644
index 0000000..5415a64
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_Client.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {1F7E3666-5A67-4702-8BED-705025CE0211}
+
+
+
+
+ CalcFields_Client.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_Client.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_Client.dpr
new file mode 100644
index 0000000..b5f93c5
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_Client.dpr
@@ -0,0 +1,17 @@
+program CalcFields_Client;
+
+uses
+ uROComInit,
+ Forms,
+ CalcFields_ClientMain in 'CalcFields_ClientMain.pas' {CalcFields_ClientMainForm},
+ CalcFields_ClientData in 'CalcFields_ClientData.pas' {CalcFields_ClientDataForm: TDAClientDataModule};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'CalcFields - Client';
+ Application.CreateForm(TCalcFields_ClientDataForm, CalcFields_ClientDataForm);
+ Application.CreateForm(TCalcFields_ClientMainForm, CalcFields_ClientMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_Client.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_Client.dproj
new file mode 100644
index 0000000..b9f6c7d
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_Client.dproj
@@ -0,0 +1,75 @@
+
+
+ {507351df-1ced-4f28-becd-e7e287bd9083}
+ CalcFields_Client.dpr
+ Debug
+ AnyCPU
+ DCC32
+ CalcFields_Client.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ CalcFields_Client.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_Client.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_Client.res
new file mode 100644
index 0000000..cd90391
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_Client.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_ClientData.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_ClientData.dfm
new file mode 100644
index 0000000..243d2aa
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_ClientData.dfm
@@ -0,0 +1,88 @@
+object CalcFields_ClientDataForm: TCalcFields_ClientDataForm
+ OldCreateOrder = True
+ OnCreate = DataModuleCreate
+ Height = 300
+ Width = 300
+ object ROChannel: TROWinInetHTTPChannel
+ UserAgent = 'RemObjects SDK'
+ TargetURL = 'http://localhost:8099/BIN'
+ ServerLocators = <>
+ DispatchOptions = []
+ Left = 42
+ Top = 10
+ end
+ object ROMessage: TROBinMessage
+ Left = 41
+ Top = 52
+ end
+ object RORemoteService: TRORemoteService
+ Message = ROMessage
+ Channel = ROChannel
+ ServiceName = 'CalcFieldsService'
+ Left = 40
+ Top = 95
+ end
+ object DARemoteDataAdapter: TDARemoteDataAdapter
+ GetSchemaCall.RemoteService = RORemoteService
+ GetDataCall.RemoteService = RORemoteService
+ UpdateDataCall.RemoteService = RORemoteService
+ GetScriptsCall.RemoteService = RORemoteService
+ RemoteService = RORemoteService
+ DataStreamer = DataStreamer
+ Left = 128
+ Top = 82
+ end
+ object DataStreamer: TDABin2DataStreamer
+ Left = 40
+ Top = 144
+ end
+ object tbl_Customers: TDAMemDataTable
+ RemoteUpdatesOptions = []
+ Fields = <
+ item
+ Name = 'CustomerID'
+ DataType = datString
+ Size = 5
+ InPrimaryKey = True
+ OnChange = tbl_CustomersCustomerIDChange
+ end
+ item
+ Name = 'CompanyName'
+ DataType = datString
+ Size = 40
+ OnChange = tbl_CustomersCompanyNameChange
+ end
+ item
+ Name = 'ServerCalculated'
+ DataType = datInteger
+ LogChanges = False
+ ReadOnly = True
+ ServerCalculated = True
+ end
+ item
+ Name = 'ClientCalculated'
+ DataType = datString
+ Size = 50
+ LogChanges = False
+ DisplayWidth = 50
+ ReadOnly = True
+ Calculated = True
+ end>
+ Params = <>
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteDataAdapter = DARemoteDataAdapter
+ OnCalcFields = tbl_CustomersCalcFields
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ LogicalName = 'Customers'
+ IndexDefs = <>
+ Left = 136
+ Top = 136
+ end
+ object ds_Customers: TDADataSource
+ DataSet = tbl_Customers.Dataset
+ DataTable = tbl_Customers
+ Left = 168
+ Top = 136
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_ClientData.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_ClientData.pas
new file mode 100644
index 0000000..178fcdd
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_ClientData.pas
@@ -0,0 +1,66 @@
+unit CalcFields_ClientData;
+
+interface
+
+uses {vcl:} SysUtils, Classes, DB, DBClient,
+ {RemObjects:} uROClient, uROClientIntf, uRORemoteService, uROBinMessage, uROWinInetHTTPChannel,
+ {Data Abstract:} uDADataTable, uDABINAdapter, uDAInterfaces,
+ uDACDSDataTable, uDAScriptingProvider,
+ uDARemoteDataAdapter, uDADataStreamer, uROIndyTCPChannel,
+ uROIndyHTTPChannel, uDABin2DataStreamer, uDAMemDataTable;
+
+type
+ TCalcFields_ClientDataForm = class(TDataModule)
+ ROMessage: TROBinMessage;
+ ROChannel: TROWinInetHTTPChannel;
+ RORemoteService: TRORemoteService;
+ DARemoteDataAdapter: TDARemoteDataAdapter;
+ DataStreamer: TDABin2DataStreamer;
+ tbl_Customers: TDAMemDataTable;
+ ds_Customers: TDADataSource;
+ procedure DataModuleCreate(Sender: TObject);
+ procedure tbl_CustomersCustomerIDChange(Sender: TDACustomField);
+ procedure tbl_CustomersCompanyNameChange(Sender: TDACustomField);
+ procedure tbl_CustomersCalcFields(DataTable: TDADataTable);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ CalcFields_ClientDataForm: TCalcFields_ClientDataForm;
+
+implementation
+{$R *.dfm}
+
+procedure TCalcFields_ClientDataForm.tbl_CustomersCalcFields(
+ DataTable: TDADataTable);
+begin
+ if DataTable.FieldByName('ServerCalculated').IsNULL then
+ DataTable.FieldByName('ClientCalculated').AsString := ''
+ else
+ DataTable.FieldByName('ClientCalculated').AsString :=
+ 'Got #' + DataTable.FieldByName('ServerCalculated').AsString;
+end;
+
+procedure TCalcFields_ClientDataForm.tbl_CustomersCompanyNameChange(
+ Sender: TDACustomField);
+begin
+ Beep;
+end;
+
+procedure TCalcFields_ClientDataForm.tbl_CustomersCustomerIDChange(
+ Sender: TDACustomField);
+begin
+ Beep;
+end;
+
+procedure TCalcFields_ClientDataForm.DataModuleCreate(Sender: TObject);
+begin
+ DARemoteDataAdapter.SetupDefaultRequest;
+end;
+
+initialization
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_ClientMain.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_ClientMain.dfm
new file mode 100644
index 0000000..7a928d7
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_ClientMain.dfm
@@ -0,0 +1,60 @@
+object CalcFields_ClientMainForm: TCalcFields_ClientMainForm
+ Left = 243
+ Top = 213
+ Width = 420
+ Height = 311
+ BorderWidth = 5
+ Caption = 'CalcFields - Client'
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ PixelsPerInch = 96
+ TextHeight = 13
+ object ROPoweredByRemObjectsButton1: TROPoweredByRemObjectsButton
+ Left = 178
+ Top = 0
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ Anchors = [akTop, akRight]
+ ApplicationType = atClient
+ end
+ object OpenCloseButton: TButton
+ Left = 0
+ Top = 0
+ Width = 75
+ Height = 25
+ Caption = 'Open/Close'
+ TabOrder = 0
+ OnClick = OpenCloseButtonClick
+ end
+ object gCustomers: TDBGrid
+ Left = 0
+ Top = 53
+ Width = 394
+ Height = 212
+ Align = alBottom
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ DataSource = CalcFields_ClientDataForm.ds_Customers
+ TabOrder = 1
+ TitleFont.Charset = DEFAULT_CHARSET
+ TitleFont.Color = clWindowText
+ TitleFont.Height = -11
+ TitleFont.Name = 'MS Sans Serif'
+ TitleFont.Style = []
+ end
+ object ApplyUpdatesButton: TButton
+ Left = 80
+ Top = 0
+ Width = 89
+ Height = 25
+ Caption = 'Apply Updates'
+ TabOrder = 2
+ OnClick = ApplyUpdatesButtonClick
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_ClientMain.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_ClientMain.pas
new file mode 100644
index 0000000..5f9701f
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_ClientMain.pas
@@ -0,0 +1,45 @@
+unit CalcFields_ClientMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
+ uROClient, uROClientIntf, uRORemoteService, uROBinMessage, uROIndyHTTPChannel,
+ Grids, DBGrids, uROPoweredByRemObjectsButton;
+
+type
+ TCalcFields_ClientMainForm = class(TForm)
+ OpenCloseButton: TButton;
+ gCustomers: TDBGrid;
+ ApplyUpdatesButton: TButton;
+ ROPoweredByRemObjectsButton1: TROPoweredByRemObjectsButton;
+ procedure OpenCloseButtonClick(Sender: TObject);
+ procedure ApplyUpdatesButtonClick(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ CalcFields_ClientMainForm: TCalcFields_ClientMainForm;
+
+implementation
+
+uses CalcFields_ClientData;
+
+{$R *.dfm}
+
+procedure TCalcFields_ClientMainForm.OpenCloseButtonClick(Sender: TObject);
+begin
+ with CalcFields_ClientDataForm do
+ tbl_Customers.Active := not tbl_Customers.Active;
+end;
+
+procedure TCalcFields_ClientMainForm.ApplyUpdatesButtonClick(Sender: TObject);
+begin
+ CalcFields_ClientDataForm.tbl_Customers.ApplyUpdates(True)
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_Server.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_Server.bdsproj
new file mode 100644
index 0000000..e42d0d9
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_Server.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {B93152B5-C4DC-44D6-8AAE-74C5E123799C}
+
+
+
+
+ CalcFields_Server.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_Server.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_Server.dpr
new file mode 100644
index 0000000..6a5f57f
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_Server.dpr
@@ -0,0 +1,23 @@
+program CalcFields_Server;
+
+{#ROGEN:CalcFieldsLibrary.rodl} // RemObjects: Careful, do not remove!
+
+uses
+ uROComInit,
+ Forms,
+ CalcFields_ServerMain in 'CalcFields_ServerMain.pas' {CalcFields_ServerMainForm},
+ CalcFields_ServerData in 'CalcFields_ServerData.pas' {CalcFields_ServerDataForm: TDataModule},
+ CalcFieldsLibrary_Intf in 'CalcFieldsLibrary_Intf.pas',
+ CalcFieldsLibrary_Invk in 'CalcFieldsLibrary_Invk.pas',
+ CalcFieldsService_Impl in 'CalcFieldsService_Impl.pas' {CalcFieldsService: TDataAbstractService};
+
+{$R *.res}
+{$R RODLFile.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'CalcFields - Server';
+ Application.CreateForm(TCalcFields_ServerDataForm, CalcFields_ServerDataForm);
+ Application.CreateForm(TCalcFields_ServerMainForm, CalcFields_ServerMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_Server.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_Server.dproj
new file mode 100644
index 0000000..8fcb2de
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_Server.dproj
@@ -0,0 +1,80 @@
+
+
+ {e6dc35c7-8101-4b42-8f70-e31cf121c23b}
+ CalcFields_Server.dpr
+ Debug
+ AnyCPU
+ DCC32
+ CalcFields_Server.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ CalcFields_Server.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_Server.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_Server.res
new file mode 100644
index 0000000..ec4433b
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_Server.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_ServerData.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_ServerData.dfm
new file mode 100644
index 0000000..6229eb8
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_ServerData.dfm
@@ -0,0 +1,49 @@
+object CalcFields_ServerDataForm: TCalcFields_ServerDataForm
+ OldCreateOrder = False
+ OnCreate = DataModuleCreate
+ Height = 207
+ Width = 352
+ object ROServer: TROIndyHTTPServer
+ Active = True
+ Dispatchers = <
+ item
+ Name = 'ROMessage'
+ Message = ROMessage
+ Enabled = True
+ PathInfo = 'Bin'
+ end>
+ Port = 8099
+ Left = 32
+ Top = 8
+ end
+ object ROMessage: TROBinMessage
+ Left = 34
+ Top = 56
+ end
+ object ConnectionManager: TDAConnectionManager
+ Connections = <
+ item
+ Name = 'ADO'
+ ConnectionString =
+ 'ADO?AuxDriver=SQLOLEDB.1;Server=localhost;Database=Northwind;Int' +
+ 'egrated Security=SSPI;'
+ Description = 'Borland ADOExpress Connection'
+ Default = True
+ end>
+ DriverManager = DriverManager
+ PoolingEnabled = True
+ Left = 136
+ Top = 56
+ end
+ object DriverManager: TDADriverManager
+ DriverDirectory = '%SYSTEM%\'
+ TraceActive = False
+ TraceFlags = []
+ Left = 136
+ Top = 10
+ end
+ object ADODriver: TDAADODriver
+ Left = 232
+ Top = 8
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_ServerData.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_ServerData.pas
new file mode 100644
index 0000000..3d4b59a
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_ServerData.pas
@@ -0,0 +1,38 @@
+unit CalcFields_ServerData;
+
+interface
+
+uses
+ SysUtils, Classes,
+ uROClient, uROPoweredByRemObjectsButton, uROClientIntf, uROServer,
+ uROBinMessage, uROIndyHTTPServer,
+ uDADriverManager, uDAClasses, uDADBXDriver, uDAEngine, uDAADODriver,
+ uROIndyTCPServer;
+
+type
+ TCalcFields_ServerDataForm = class(TDataModule)
+ ROServer: TROIndyHTTPServer;
+ ROMessage: TROBinMessage;
+ DriverManager: TDADriverManager;
+ ADODriver: TDAADODriver;
+ ConnectionManager: TDAConnectionManager;
+ procedure DataModuleCreate(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ CalcFields_ServerDataForm: TCalcFields_ServerDataForm;
+
+implementation
+
+{$R *.dfm}
+
+procedure TCalcFields_ServerDataForm.DataModuleCreate(Sender: TObject);
+begin
+ ROServer.Active := true;
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_ServerMain.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_ServerMain.dfm
new file mode 100644
index 0000000..b6a51ee
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_ServerMain.dfm
@@ -0,0 +1,25 @@
+object CalcFields_ServerMainForm: TCalcFields_ServerMainForm
+ Left = 122
+ Top = 243
+ BorderStyle = bsDialog
+ Caption = 'CalcFields - Server'
+ ClientHeight = 64
+ ClientWidth = 228
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ PixelsPerInch = 96
+ TextHeight = 13
+ object RoPoweredByRemObjectsButton: TROPoweredByRemObjectsButton
+ Left = 8
+ Top = 8
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_ServerMain.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_ServerMain.pas
new file mode 100644
index 0000000..9fa2b27
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/CalcFields_ServerMain.pas
@@ -0,0 +1,26 @@
+unit CalcFields_ServerMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
+ uROClient, uROPoweredByRemObjectsButton, uROClientIntf, uROServer,
+ uROBinMessage, uROIndyHTTPServer;
+
+type
+ TCalcFields_ServerMainForm = class(TForm)
+ RoPoweredByRemObjectsButton: TROPoweredByRemObjectsButton;
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ CalcFields_ServerMainForm: TCalcFields_ServerMainForm;
+
+implementation
+
+{$R *.dfm}
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/RODLFILE.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/RODLFILE.res
new file mode 100644
index 0000000..09082da
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Calculated Fields/RODLFILE.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Connection By User/ConnectionByUser.Sample.html b/official/5.0.30.691/Data Abstract for Delphi/Samples/Connection By User/ConnectionByUser.Sample.html
new file mode 100644
index 0000000..33b66bf
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Connection By User/ConnectionByUser.Sample.html
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+ Connection By User
+
+Purpose
+
+ Shows various methods how a standard application (i.e. not a RemObjects server or
+ client) can obtain a database connection at runtime.
+
+ The application uses four Data Abstract components: TDAADODriver ,
+ TDADriverManager , TDAConnectionManager and
+ TROInMemorySessionManager .
+
+
+ Acquire #1 : one-liner to open default connection
+
+
+ Acquire #2 : delayed open after supplying userid/pass separately
+
+
+ Acquire #3 : one-liner supplying userid/pass
+
+ Acquire #4 : connect via the DADriverManager
+
+ Acquire and Hold in a Session : explore this method to see how to
+ create,
+ access and release a connection within a session.
+
+
+
+ All tests above connect via the DAConnectionManager except for
+ #4.
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Connection By User/ConnectionByUser.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Connection By User/ConnectionByUser.bdsproj
new file mode 100644
index 0000000..b010e02
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Connection By User/ConnectionByUser.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {8BFD1D8A-ABA4-4A12-82FE-63649C554864}
+
+
+
+
+ ConnectionByUser.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Connection By User/ConnectionByUser.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/Connection By User/ConnectionByUser.dpr
new file mode 100644
index 0000000..460e7fd
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Connection By User/ConnectionByUser.dpr
@@ -0,0 +1,14 @@
+program ConnectionByUser;
+
+uses
+ Forms,
+ ConnectionByUserMain in 'ConnectionByUserMain.pas' {ConnectionByUserMainForm};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'Connection By User';
+ Application.CreateForm(TConnectionByUserMainForm, ConnectionByUserMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Connection By User/ConnectionByUser.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Connection By User/ConnectionByUser.dproj
new file mode 100644
index 0000000..e17d67b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Connection By User/ConnectionByUser.dproj
@@ -0,0 +1,72 @@
+
+
+ {3a10f6d7-3d2b-4bea-bad3-215392d8b601}
+ ConnectionByUser.dpr
+ Debug
+ AnyCPU
+ DCC32
+ ConnectionByUser.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ ConnectionByUser.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Connection By User/ConnectionByUser.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Connection By User/ConnectionByUser.res
new file mode 100644
index 0000000..6a1db77
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Connection By User/ConnectionByUser.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Connection By User/ConnectionByUserMain.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Connection By User/ConnectionByUserMain.dfm
new file mode 100644
index 0000000..9faa693
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Connection By User/ConnectionByUserMain.dfm
@@ -0,0 +1,173 @@
+object ConnectionByUserMainForm: TConnectionByUserMainForm
+ Left = 32
+ Top = 37
+ AutoScroll = False
+ Caption = 'Connection by User'
+ ClientHeight = 313
+ ClientWidth = 506
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Label3: TLabel
+ Left = 309
+ Top = 18
+ Width = 117
+ Height = 13
+ Caption = 'Open default connection'
+ end
+ object Label4: TLabel
+ Left = 309
+ Top = 52
+ Width = 174
+ Height = 13
+ Caption = 'Delayed "Open" after supplying login'
+ end
+ object Label5: TLabel
+ Left = 309
+ Top = 82
+ Width = 155
+ Height = 13
+ Caption = 'One-liner Open with custom login'
+ end
+ object Label6: TLabel
+ Left = 309
+ Top = 114
+ Width = 133
+ Height = 13
+ Caption = 'Using the DADriverManager'
+ end
+ object GroupBox1: TGroupBox
+ Left = 8
+ Top = 8
+ Width = 217
+ Height = 89
+ Caption = 'Login Info'
+ TabOrder = 0
+ object Label1: TLabel
+ Left = 29
+ Top = 28
+ Width = 36
+ Height = 13
+ Caption = 'UserID:'
+ end
+ object Label2: TLabel
+ Left = 16
+ Top = 60
+ Width = 49
+ Height = 13
+ Caption = 'Password:'
+ end
+ object eUserID: TEdit
+ Left = 72
+ Top = 24
+ Width = 121
+ Height = 24
+ TabOrder = 0
+ Text = 'sa'
+ end
+ object ePassword: TEdit
+ Left = 72
+ Top = 56
+ Width = 121
+ Height = 24
+ TabOrder = 1
+ end
+ end
+ object Acquire1Button: TButton
+ Left = 229
+ Top = 12
+ Width = 75
+ Height = 25
+ Caption = 'Acquire #1'
+ TabOrder = 1
+ OnClick = Acquire1ButtonClick
+ end
+ object Acquire2Button: TButton
+ Left = 229
+ Top = 44
+ Width = 75
+ Height = 25
+ Caption = 'Acquire #2'
+ TabOrder = 2
+ OnClick = Acquire2ButtonClick
+ end
+ object Acquire3Button: TButton
+ Left = 229
+ Top = 76
+ Width = 75
+ Height = 25
+ Caption = 'Acquire #3'
+ TabOrder = 3
+ OnClick = Acquire3ButtonClick
+ end
+ object Acquire4Button: TButton
+ Left = 229
+ Top = 108
+ Width = 75
+ Height = 25
+ Caption = 'Acquire #4'
+ TabOrder = 4
+ OnClick = Acquire4ButtonClick
+ end
+ object AcquireHoldButton: TButton
+ Left = 229
+ Top = 140
+ Width = 209
+ Height = 25
+ Caption = 'Acquire and Hold in a Session'
+ TabOrder = 5
+ OnClick = AcquireHoldButtonClick
+ end
+ object Memo: TMemo
+ Left = 4
+ Top = 173
+ Width = 496
+ Height = 137
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ ScrollBars = ssVertical
+ TabOrder = 6
+ end
+ object DAADODriver: TDAADODriver
+ Left = 57
+ Top = 127
+ end
+ object DADriverManager: TDADriverManager
+ DriverDirectory = '%SYSTEM%\'
+ TraceActive = False
+ TraceFlags = []
+ Left = 91
+ Top = 127
+ end
+ object DAConnectionManager: TDAConnectionManager
+ Connections = <
+ item
+ Name = 'ADOPartial'
+ ConnectionString = 'ADO?Server=localhost;Database=Northwind;AuxDriver=SQLOLEDB.1'
+ Default = False
+ Tag = 0
+ end
+ item
+ Name = 'ADOComplete'
+ ConnectionString =
+ 'ADO?Server=localhost;Database=Northwind;AuxDriver=SQLOLEDB.1;Use' +
+ 'rID=sa;Password=;'
+ Default = False
+ Tag = 0
+ end>
+ DriverManager = DADriverManager
+ PoolingEnabled = False
+ Left = 23
+ Top = 127
+ end
+ object ROSessionManager: TROInMemorySessionManager
+ Left = 129
+ Top = 127
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Connection By User/ConnectionByUserMain.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Connection By User/ConnectionByUserMain.pas
new file mode 100644
index 0000000..0ae0360
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Connection By User/ConnectionByUserMain.pas
@@ -0,0 +1,187 @@
+unit ConnectionByUserMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, StdCtrls, uDAClasses, uDADriverManager, uDAEngine, uDAADODriver,
+ uROSessions, uROClient;
+
+type
+ TConnectionByUserMainForm = class(TForm)
+ GroupBox1: TGroupBox;
+ Label1: TLabel;
+ Label2: TLabel;
+ eUserID: TEdit;
+ ePassword: TEdit;
+ Acquire1Button: TButton;
+ Acquire2Button: TButton;
+ Acquire3Button: TButton;
+ DAADODriver: TDAADODriver;
+ DADriverManager: TDADriverManager;
+ DAConnectionManager: TDAConnectionManager;
+ Acquire4Button: TButton;
+ ROSessionManager: TROInMemorySessionManager;
+ AcquireHoldButton: TButton;
+ Label3: TLabel;
+ Label4: TLabel;
+ Label5: TLabel;
+ Label6: TLabel;
+ Memo: TMemo;
+ procedure Acquire1ButtonClick(Sender: TObject);
+ procedure Acquire2ButtonClick(Sender: TObject);
+ procedure Acquire3ButtonClick(Sender: TObject);
+ procedure Acquire4ButtonClick(Sender: TObject);
+ procedure AcquireHoldButtonClick(Sender: TObject);
+ private
+ { Private declarations }
+ procedure Log(Str: string);
+ public
+ { Public declarations }
+ end;
+
+var
+ ConnectionByUserMainForm: TConnectionByUserMainForm;
+
+implementation
+
+uses uDAInterfaces;
+
+{$R *.dfm}
+
+procedure TConnectionByUserMainForm.Acquire1ButtonClick(Sender: TObject);
+var
+ conn: IDAConnection;
+begin
+ try
+ conn := DAConnectionManager.NewConnection('ADOComplete');
+ finally
+ if (Conn <> nil) and conn.Connected then begin
+ Log(TButton(Sender).Caption + ': Connection successful');
+ log('Connection via "' + conn.ConnectionString + '"');
+ end
+ else begin
+ Log(TButton(Sender).Caption + ': Connection failed');
+ end;
+ end;
+end;
+
+procedure TConnectionByUserMainForm.Acquire2ButtonClick(Sender: TObject);
+var
+ conn: IDAConnection;
+begin
+ try
+ conn := DAConnectionManager.NewConnection('ADOPartial', FALSE);
+ conn.UserID := eUserID.Text;
+ conn.Password := ePassword.Text;
+ conn.Open;
+ finally
+ if (Conn <> nil) and conn.Connected then begin
+ Log(TButton(Sender).Caption + ': Connection successful');
+ log('Connection via "' + conn.ConnectionString + '"');
+ end
+ else begin
+ Log(TButton(Sender).Caption + ': Connection failed');
+ end;
+ end;
+end;
+
+procedure TConnectionByUserMainForm.Acquire3ButtonClick(Sender: TObject);
+var
+ conn: IDAConnection;
+begin
+ try
+ conn := DAConnectionManager.NewConnection('ADOPartial', TRUE, eUserID.Text, ePassword.Text);
+ finally
+ if (Conn <> nil) and conn.Connected then begin
+ Log(TButton(Sender).Caption + ': Connection successful');
+ log('Connection via "' + conn.ConnectionString + '"');
+ end
+ else begin
+ Log(TButton(Sender).Caption + ': Connection failed');
+ end;
+ end;
+end;
+
+procedure TConnectionByUserMainForm.Acquire4ButtonClick(Sender: TObject);
+var
+ drv: IDADriver;
+ conn: IDAConnection;
+begin
+ try
+ drv := DriverManager.DriverByDriverID('ADO'); // Raises exception if not found
+ conn := drv.NewConnection;
+ // If not empty strings, these will override any specific UserID, Password specified below
+ conn.ConnectionString := Format('Server=localhost;Database=Northwind;AuxDriver=SQLOLEDB.1;UserID=%s;Password=%s;', [eUserID.Text, ePassword.Text]);
+ conn.Open;
+ finally
+ if (Conn <> nil) and conn.Connected then begin
+ Log(TButton(Sender).Caption + ': Connection successful');
+ log('Connection via "' + conn.ConnectionString + '"');
+ end
+ else begin
+ Log(TButton(Sender).Caption + ': Connection failed');
+ end;
+ end;
+end;
+
+procedure TConnectionByUserMainForm.AcquireHoldButtonClick(Sender: TObject);
+const
+ MySessionID: TGUID = '{2B0ABD74-465A-45A6-AAD7-837709A66DB9}';
+var
+ session: TROSession;
+ conn: IDAConnection;
+begin
+
+ conn := DAConnectionManager.NewConnection('ADOComplete');
+
+ with ROSessionManager do try
+ session := CreateSession(MySessionID);
+
+ // #1: How to store IDAConnections in RO sessions ----------------------------------------
+ conn._AddRef; // We increment its ref count because we want it locked by the session
+ session.Values['MyADOConnection'] := integer(conn);
+ // End of #1 -----------------------------------------------------------------------------
+
+ conn := nil; // We set it to NIL to simulate what would happen in a real RO Datamodule when the vars get out of scope
+ ReleaseSession(session, TRUE);
+{$WARNINGS OFF}
+ session := nil; // Just to simulate real re-initialization
+{$WARNINGS ON}
+ session := FindSession(MySessionID);
+
+ // #2: How to get IDAConnections from RO Sessions ----------------------------------------
+ try
+ conn := IDAConnection(pointer(integer(session.Values['MyADOConnection'])));
+ finally
+ if (Conn <> nil) and conn.Connected then begin
+ Log(TButton(Sender).Caption + ': Connection successful');
+ log('Connection via "' + conn.ConnectionString + '"');
+ end
+ else begin
+ Log(TButton(Sender).Caption + ': Connection failed');
+ end;
+ end;
+
+ // End of #2 -----------------------------------------------------------------------------
+
+ // #3: How to finally release the connection from the session. This should be done when you ------
+ // want to get rid of the connection for good...
+ conn.Close; // Optional. Implicit when it gets freed
+ conn._Release; // Removes the lock we imposed on the connection at the very beginning
+ // End of #3 -------------------------------------------------------------------------------------
+
+ conn := nil; // This is only useful in this example because the ref count is still held up to one by the local "conn" variable.
+
+ finally
+ DeleteSession(MySessionID, FALSE); // This is what the RO session manager does for you, so ignore this too
+ end;
+end;
+
+procedure TConnectionByUserMainForm.Log(Str: string);
+begin
+ Memo.Lines.Add(Str);
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Connection Pooling/ConnectionPooling.Sample.html b/official/5.0.30.691/Data Abstract for Delphi/Samples/Connection Pooling/ConnectionPooling.Sample.html
new file mode 100644
index 0000000..f4e1e4c
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Connection Pooling/ConnectionPooling.Sample.html
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+ Connection Pooling
+
+
+
+Purpose
+
+ Shows how connections can be managed via a pool (ADO/Northwind & IBX/Employee
+ connections).
+
+
+ Use the three pairs of Acquire/Release connection buttons to experiment
+ with pooling. Note how connections timeout later than the Release call and how
+ the delay
+ depends on the selected PoolTimeoutSeconds value selected via the
+ track bar.
+
+
+ Examine the code in ConnectionPoolingMain - you will see that it is minimal - all one
+ or two liners.
+
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Connection Pooling/ConnectionPooling.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Connection Pooling/ConnectionPooling.bdsproj
new file mode 100644
index 0000000..557c349
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Connection Pooling/ConnectionPooling.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {56748B39-CB7E-46D7-BC3F-6F8750F2F54D}
+
+
+
+
+ ConnectionPooling.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Connection Pooling/ConnectionPooling.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/Connection Pooling/ConnectionPooling.dpr
new file mode 100644
index 0000000..90d1fad
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Connection Pooling/ConnectionPooling.dpr
@@ -0,0 +1,14 @@
+program ConnectionPooling;
+
+uses
+ Forms,
+ ConnectionPoolingMain in 'ConnectionPoolingMain.pas' {ConnectionPoolingMainForm};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'ConnectionPooling';
+ Application.CreateForm(TConnectionPoolingMainForm, ConnectionPoolingMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Connection Pooling/ConnectionPooling.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Connection Pooling/ConnectionPooling.dproj
new file mode 100644
index 0000000..5559d22
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Connection Pooling/ConnectionPooling.dproj
@@ -0,0 +1,72 @@
+
+
+ {1087a4d3-a1bb-4f0d-8193-c91d9ddf3a55}
+ ConnectionPooling.dpr
+ Debug
+ AnyCPU
+ DCC32
+ ConnectionPooling.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ ConnectionPooling.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Connection Pooling/ConnectionPooling.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Connection Pooling/ConnectionPooling.res
new file mode 100644
index 0000000..b946fbb
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Connection Pooling/ConnectionPooling.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Connection Pooling/ConnectionPoolingMain.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Connection Pooling/ConnectionPoolingMain.dfm
new file mode 100644
index 0000000..05e22e2
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Connection Pooling/ConnectionPoolingMain.dfm
@@ -0,0 +1,166 @@
+object ConnectionPoolingMainForm: TConnectionPoolingMainForm
+ Left = 392
+ Top = 182
+ AutoScroll = False
+ BorderWidth = 5
+ Caption = 'Connection Pooling'
+ ClientHeight = 323
+ ClientWidth = 365
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Label1: TLabel
+ Left = 3
+ Top = 0
+ Width = 102
+ Height = 13
+ Caption = 'Selected Connection:'
+ end
+ object lPoolTimeoutSeconds: TLabel
+ Left = 3
+ Top = 48
+ Width = 113
+ Height = 13
+ Caption = 'PoolTimeoutSeconds: 5'
+ end
+ object Acquire1Button: TButton
+ Left = 208
+ Top = 0
+ Width = 75
+ Height = 25
+ Caption = '&Acquire #1'
+ TabOrder = 0
+ OnClick = Acquire1ButtonClick
+ end
+ object cbConnections: TComboBox
+ Left = 3
+ Top = 18
+ Width = 193
+ Height = 21
+ Style = csDropDownList
+ ItemHeight = 13
+ TabOrder = 1
+ end
+ object Release1Button: TButton
+ Left = 288
+ Top = 0
+ Width = 75
+ Height = 25
+ Caption = '&Release #1'
+ TabOrder = 2
+ OnClick = Release1ButtonClick
+ end
+ object Memo: TMemo
+ Left = 0
+ Top = 97
+ Width = 365
+ Height = 226
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ ScrollBars = ssVertical
+ TabOrder = 3
+ end
+ object Acquire2Button: TButton
+ Left = 208
+ Top = 32
+ Width = 75
+ Height = 25
+ Caption = '&Acquire #2'
+ TabOrder = 4
+ OnClick = Acquire2ButtonClick
+ end
+ object Release2Button: TButton
+ Left = 288
+ Top = 32
+ Width = 75
+ Height = 25
+ Caption = '&Release #2'
+ TabOrder = 5
+ OnClick = Release2ButtonClick
+ end
+ object Acquire3Button: TButton
+ Left = 208
+ Top = 64
+ Width = 75
+ Height = 25
+ Caption = '&Acquire #3'
+ TabOrder = 6
+ OnClick = Acquire3ButtonClick
+ end
+ object Release3Button: TButton
+ Left = 288
+ Top = 64
+ Width = 75
+ Height = 25
+ Caption = '&Release #3'
+ TabOrder = 7
+ OnClick = Release3ButtonClick
+ end
+ object TrackBar: TTrackBar
+ Left = -4
+ Top = 64
+ Width = 208
+ Height = 30
+ Max = 20
+ Min = 1
+ Orientation = trHorizontal
+ ParentShowHint = False
+ PageSize = 1
+ Frequency = 1
+ Position = 5
+ SelEnd = 0
+ SelStart = 0
+ ShowHint = True
+ TabOrder = 8
+ TickMarks = tmBottomRight
+ TickStyle = tsAuto
+ OnChange = TrackBarChange
+ end
+ object DAConnectionManager: TDAConnectionManager
+ PoolTimeoutSeconds = 5
+ OnConnectionTimedOut = DAConnectionManagerConnectionTimedOut
+ OnConnectionCreated = DAConnectionManagerConnectionCreated
+ Connections = <
+ item
+ Name = 'MSSQL'
+ ConnectionString =
+ 'ADO?AuxDriver=SQLOLEDB.1;Server=localhost;Database=Northwind;Int' +
+ 'egrated Security=SSPI;'
+ Description = 'Microsoft SQL Server Northwind Connection'
+ Default = True
+ Tag = 0
+ end
+ item
+ Name = 'IBEmployees'
+ ConnectionString =
+ 'IBX?Server=;UserID=sysdba;Password=masterkey;Database=C:\Program' +
+ ' Files\Borland\InterBase\examples\Database\Employee.gdb'
+ Description = 'Borland Interbase Employee Connection'
+ Default = False
+ Tag = 0
+ end>
+ DriverManager = DADriverManager
+ PoolingEnabled = True
+ Left = 48
+ Top = 112
+ end
+ object DADriverManager: TDADriverManager
+ DriverDirectory = '%MODULE%\'
+ TraceActive = False
+ TraceFlags = []
+ Left = 16
+ Top = 112
+ end
+ object DAADODriver: TDAADODriver
+ Left = 16
+ Top = 144
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Connection Pooling/ConnectionPoolingMain.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Connection Pooling/ConnectionPoolingMain.pas
new file mode 100644
index 0000000..fb442ab
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Connection Pooling/ConnectionPoolingMain.pas
@@ -0,0 +1,152 @@
+unit ConnectionPoolingMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, uDADriverManager, uDAClasses, StdCtrls, uDAInterfaces,
+ uDAIBXDriver, uDAEngine, uDAADODriver, ExtCtrls, ComCtrls;
+
+type
+ TConnectionPoolingMainForm = class(TForm)
+ DADriverManager: TDADriverManager;
+ DAConnectionManager: TDAConnectionManager;
+ Acquire1Button: TButton;
+ cbConnections: TComboBox;
+ DAADODriver: TDAADODriver;
+ Release1Button: TButton;
+ Memo: TMemo;
+ Acquire2Button: TButton;
+ Release2Button: TButton;
+ Acquire3Button: TButton;
+ Release3Button: TButton;
+ Label1: TLabel;
+ TrackBar: TTrackBar;
+ lPoolTimeoutSeconds: TLabel;
+ procedure FormCreate(Sender: TObject);
+ procedure Acquire1ButtonClick(Sender: TObject);
+ procedure Release1ButtonClick(Sender: TObject);
+ procedure Acquire2ButtonClick(Sender: TObject);
+ procedure Acquire3ButtonClick(Sender: TObject);
+ procedure Release2ButtonClick(Sender: TObject);
+ procedure Release3ButtonClick(Sender: TObject);
+ procedure DAConnectionManagerConnectionAcquired(
+ Sender: TDAConnectionManager; const Connection: IDAConnection);
+ procedure DAConnectionManagerConnectionCreated(
+ Sender: TDAConnectionManager; const Connection: IDAConnection);
+ procedure DAConnectionManagerConnectionTimedOut(
+ Sender: TDAConnectionManager);
+ procedure TrackBarChange(Sender: TObject);
+ procedure FormDestroy(Sender: TObject);
+ private
+ fConnection,
+ fConnection2,
+ fConnection3: IDAConnection;
+ procedure Log(Str: string);
+ public
+
+ end;
+
+var
+ ConnectionPoolingMainForm: TConnectionPoolingMainForm;
+
+implementation
+
+{$R *.dfm}
+
+procedure TConnectionPoolingMainForm.FormCreate(Sender: TObject);
+var
+ i: integer;
+begin
+ for i := 0 to (DAConnectionManager.Connections.Count - 1) do
+ cbConnections.Items.Add(DAConnectionManager.Connections[i].Name);
+
+ cbConnections.ItemIndex := 0;
+end;
+
+procedure TConnectionPoolingMainForm.Acquire1ButtonClick(Sender: TObject);
+begin
+ if not assigned(fConnection) then begin
+ fConnection := DAConnectionManager.NewConnection(cbConnections.Text);
+ Log('Connection #1 acquired...');
+ end;
+end;
+
+procedure TConnectionPoolingMainForm.Release1ButtonClick(Sender: TObject);
+begin
+ if assigned(fConnection) then begin
+ fConnection := nil;
+ Log('Connection #1 released');
+ end;
+end;
+
+procedure TConnectionPoolingMainForm.Acquire2ButtonClick(Sender: TObject);
+begin
+ if not assigned(fConnection2) then begin
+ fConnection2 := DAConnectionManager.NewConnection(cbConnections.Text);
+ Log('Connection #2 acquired...');
+ end;
+end;
+
+procedure TConnectionPoolingMainForm.Acquire3ButtonClick(Sender: TObject);
+begin
+ if not assigned(fConnection3) then begin
+ fConnection3 := DAConnectionManager.NewConnection(cbConnections.Text);
+ Log('Connection #3 acquired...');
+ end;
+end;
+
+procedure TConnectionPoolingMainForm.Release2ButtonClick(Sender: TObject);
+begin
+ if assigned(fConnection2) then begin
+ fConnection2 := nil;
+ Log('Connection #2 released');
+ end;
+end;
+
+procedure TConnectionPoolingMainForm.Release3ButtonClick(Sender: TObject);
+begin
+ if assigned(fConnection3) then begin
+ fConnection3 := nil;
+ Log('Connection #3 released');
+ end;
+end;
+
+procedure TConnectionPoolingMainForm.DAConnectionManagerConnectionAcquired(
+ Sender: TDAConnectionManager; const Connection: IDAConnection);
+begin
+ Log('EVENT -> Connection acquired from the pool at ' + TimeToStr(Now));
+end;
+
+procedure TConnectionPoolingMainForm.DAConnectionManagerConnectionCreated(
+ Sender: TDAConnectionManager; const Connection: IDAConnection);
+begin
+ Log('EVENT -> New connection created at ' + TimeToStr(Now));
+end;
+
+procedure TConnectionPoolingMainForm.DAConnectionManagerConnectionTimedOut(
+ Sender: TDAConnectionManager);
+begin
+ Log('EVENT -> A connection timed out at ' + TimeToStr(Now));
+end;
+
+procedure TConnectionPoolingMainForm.TrackBarChange(Sender: TObject);
+begin
+ DAConnectionManager.PoolTimeoutSeconds := TrackBar.Position;
+ lPoolTimeoutSeconds.Caption := Format('PoolTimeoutSeconds: %d', [TrackBar.Position]);
+end;
+
+procedure TConnectionPoolingMainForm.Log(Str: string);
+begin
+ Memo.Lines.Add(Str);
+end;
+
+procedure TConnectionPoolingMainForm.FormDestroy(Sender: TObject);
+begin
+ fConnection:=nil;
+ fConnection2:=nil;
+ fConnection3:=nil;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Custom User Logon/CustomUserLogon.Sample.html b/official/5.0.30.691/Data Abstract for Delphi/Samples/Custom User Logon/CustomUserLogon.Sample.html
new file mode 100644
index 0000000..40cb0e3
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Custom User Logon/CustomUserLogon.Sample.html
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+
+
+ Custom User Logon
+
+
+
+Purpose
+
+ A very simple example showing two methods of opening a connection at runtime.
+
+
+
+ Open Connection (1st way) : creates and opens the connection in a
+ single
+ call passing the UserID/Password values supplied.
+
+
+ Open Connection (2nd way) : creates the connection and opens it afterwards.
+
+
+
+ The example uses DAConnectionManager.Connections[0] as the connection
+ it opens. Examining its ConnectionString value via the Object Inspector,
+ you will see that it is set to:
+
+
+
+
+
+ ADO?Server=localhost;UserID=sa;AuxDriver=SQLOLEDB.1;Database=Northwind
+
+
+
+
+
+ Modify it as needed to access a different database. See FAQ37
+ for examples of connection strings.
+
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Custom User Logon/CustomUserLogon.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Custom User Logon/CustomUserLogon.bdsproj
new file mode 100644
index 0000000..8f5cb42
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Custom User Logon/CustomUserLogon.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {221CBC0C-2F9D-44D4-99CB-FDB1FCC365EA}
+
+
+
+
+ CustomUserLogon.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Custom User Logon/CustomUserLogon.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/Custom User Logon/CustomUserLogon.dpr
new file mode 100644
index 0000000..d837771
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Custom User Logon/CustomUserLogon.dpr
@@ -0,0 +1,14 @@
+program CustomUserLogon;
+
+uses
+ Forms,
+ CustomUserLogonMain in 'CustomUserLogonMain.pas' {CustomUserLogonMainForm};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'CustomUserLogon';
+ Application.CreateForm(TCustomUserLogonMainForm, CustomUserLogonMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Custom User Logon/CustomUserLogon.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Custom User Logon/CustomUserLogon.dproj
new file mode 100644
index 0000000..e42accf
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Custom User Logon/CustomUserLogon.dproj
@@ -0,0 +1,36 @@
+
+
+ {ec6ab974-9d80-4b73-9f09-b3948cbfef67}
+ CustomUserLogon.dpr
+ Debug
+ AnyCPU
+ DCC32
+ CustomUserLogon.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+False True False False False 1 0 0 0 False False False False False 1058 1251 1.0.0.0 1.0.0.0 CustomUserLogon.dpr
+
+
+
+
+ MainSource
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Custom User Logon/CustomUserLogon.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Custom User Logon/CustomUserLogon.res
new file mode 100644
index 0000000..b946fbb
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Custom User Logon/CustomUserLogon.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Custom User Logon/CustomUserLogonMain.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Custom User Logon/CustomUserLogonMain.dfm
new file mode 100644
index 0000000..f6890e8
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Custom User Logon/CustomUserLogonMain.dfm
@@ -0,0 +1,107 @@
+object TCustomUserLogonMainForm
+ Left = 294
+ Top = 99
+ BorderStyle = bsDialog
+ Caption = 'Custom User Logon'
+ ClientHeight = 158
+ ClientWidth = 207
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ PixelsPerInch = 96
+ TextHeight = 13
+ object GroupBox1: TGroupBox
+ Left = 8
+ Top = 7
+ Width = 191
+ Height = 81
+ Caption = 'User Info'
+ TabOrder = 0
+ object Label1: TLabel
+ Left = 21
+ Top = 28
+ Width = 36
+ Height = 13
+ Caption = 'UserID:'
+ end
+ object Label2: TLabel
+ Left = 8
+ Top = 52
+ Width = 49
+ Height = 13
+ Caption = 'Password:'
+ end
+ object eUserID: TEdit
+ Left = 62
+ Top = 24
+ Width = 121
+ Height = 21
+ TabOrder = 0
+ Text = 'sa'
+ end
+ object ePassword: TEdit
+ Left = 62
+ Top = 48
+ Width = 121
+ Height = 21
+ TabOrder = 1
+ end
+ end
+ object Open1Button: TButton
+ Left = 20
+ Top = 95
+ Width = 167
+ Height = 25
+ Caption = 'Open Connection (1st way)'
+ Default = True
+ TabOrder = 1
+ OnClick = Open1ButtonClick
+ end
+ object Open2Button: TButton
+ Left = 20
+ Top = 127
+ Width = 167
+ Height = 25
+ Caption = 'Open Connection (2nd way)'
+ Default = True
+ TabOrder = 2
+ OnClick = Open2ButtonClick
+ end
+ object DADriverManager: TDADriverManager
+ DriverDirectory = '%SYSTEM%\'
+ AutoLoad = False
+ TraceActive = False
+ TraceFlags = []
+ Left = 120
+ Top = 40
+ end
+ object DAConnectionManager: TDAConnectionManager
+ MaxPoolSize = 10
+ PoolTimeoutSeconds = 60
+ PoolBehaviour = pbWait
+ WaitIntervalSeconds = 1
+ Connections = <
+ item
+ Name = 'ADO'
+ ConnectionString =
+ 'ADO?Server=localhost;UserID=sa;AuxDriver=SQLOLEDB.1;Database=Nor' +
+ 'thwind'
+ Description = 'Borland ADOExpress Connection'
+ Default = True
+ Tag = 0
+ end>
+ DriverManager = DADriverManager
+ PoolingEnabled = False
+ Left = 152
+ Top = 40
+ end
+ object DAADODriver: TDAADODriver
+ Left = 32
+ Top = 88
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Custom User Logon/CustomUserLogonMain.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Custom User Logon/CustomUserLogonMain.pas
new file mode 100644
index 0000000..d11ce41
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Custom User Logon/CustomUserLogonMain.pas
@@ -0,0 +1,57 @@
+unit CustomUserLogonMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, uDAClasses, uDADriverManager, StdCtrls, uDAIBXDriver,
+ uDAEngine, uDAADODriver;
+
+type
+ TCustomUserLogonMainForm = class(TForm)
+ DADriverManager: TDADriverManager;
+ DAConnectionManager: TDAConnectionManager;
+ GroupBox1: TGroupBox;
+ Open1Button: TButton;
+ eUserID: TEdit;
+ ePassword: TEdit;
+ Label1: TLabel;
+ Label2: TLabel;
+ DAADODriver: TDAADODriver;
+ Open2Button: TButton;
+ procedure Open1ButtonClick(Sender: TObject);
+ procedure Open2ButtonClick(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ CustomUserLogonMainForm: TCustomUserLogonMainForm;
+
+implementation
+
+{$R *.dfm}
+
+uses uDAInterfaces;
+
+procedure TCustomUserLogonMainForm.Open1ButtonClick(Sender: TObject);
+var
+ conn: IDAConnection;
+begin
+ conn := DAConnectionManager.NewConnection(DAConnectionManager.Connections[0].Name, TRUE, eUserID.Text, ePassword.Text);
+ MessageDlg('Connection created!', mtInformation, [mbOK], 0);
+end;
+
+procedure TCustomUserLogonMainForm.Open2ButtonClick(Sender: TObject);
+var
+ conn: IDAConnection;
+begin
+ conn := DAConnectionManager.NewConnection(DAConnectionManager.Connections[0].Name, FALSE);
+ conn.Open(eUserID.Text, ePassword.Text);
+ MessageDlg('Connection created!', mtInformation, [mbOK], 0);
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Data Streamers/DataStreamersMain.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Data Streamers/DataStreamersMain.dfm
new file mode 100644
index 0000000..22a899e
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Data Streamers/DataStreamersMain.dfm
@@ -0,0 +1,728 @@
+object DataStreamersMainForm: TDataStreamersMainForm
+ Left = 221
+ Top = 146
+ BorderWidth = 5
+ Caption = 'DataStreamers Tester'
+ ClientHeight = 517
+ ClientWidth = 611
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ PixelsPerInch = 96
+ TextHeight = 13
+ object gCustomers: TDBGrid
+ Left = 0
+ Top = 228
+ Width = 611
+ Height = 91
+ Align = alClient
+ DataSource = dsCustomers
+ TabOrder = 0
+ TitleFont.Charset = DEFAULT_CHARSET
+ TitleFont.Color = clWindowText
+ TitleFont.Height = -11
+ TitleFont.Name = 'MS Sans Serif'
+ TitleFont.Style = []
+ end
+ object gOrders: TDBGrid
+ Left = 0
+ Top = 354
+ Width = 611
+ Height = 163
+ Align = alBottom
+ DataSource = dsOrders
+ TabOrder = 1
+ TitleFont.Charset = DEFAULT_CHARSET
+ TitleFont.Color = clWindowText
+ TitleFont.Height = -11
+ TitleFont.Name = 'MS Sans Serif'
+ TitleFont.Style = []
+ end
+ object Panel1: TPanel
+ Left = 0
+ Top = 319
+ Width = 611
+ Height = 35
+ Align = alBottom
+ BevelOuter = bvNone
+ TabOrder = 2
+ object dbnOrders: TDBNavigator
+ Left = 240
+ Top = 5
+ Width = 240
+ Height = 25
+ DataSource = dsOrders
+ TabOrder = 0
+ end
+ object btn_OpenOrders: TButton
+ Left = 152
+ Top = 5
+ Width = 75
+ Height = 25
+ Caption = 'Open/Close'
+ TabOrder = 1
+ OnClick = btn_OpenOrdersClick
+ end
+ object cbApplyOrdersSchema: TCheckBox
+ Left = 4
+ Top = 9
+ Width = 133
+ Height = 17
+ Caption = 'Apply Orders Schema'
+ Checked = True
+ State = cbChecked
+ TabOrder = 2
+ end
+ end
+ object Panel2: TPanel
+ Left = 0
+ Top = 193
+ Width = 611
+ Height = 35
+ Align = alTop
+ BevelOuter = bvNone
+ TabOrder = 3
+ object cbApplyCustomersSchema: TCheckBox
+ Left = 4
+ Top = 9
+ Width = 141
+ Height = 17
+ Caption = 'Apply Customers Schema'
+ Checked = True
+ State = cbChecked
+ TabOrder = 0
+ end
+ object btn_OpenCustomers: TButton
+ Left = 160
+ Top = 5
+ Width = 75
+ Height = 25
+ Caption = 'Open/Close'
+ TabOrder = 1
+ OnClick = btn_OpenCustomersClick
+ end
+ object dbnCustomers: TDBNavigator
+ Left = 248
+ Top = 5
+ Width = 240
+ Height = 25
+ DataSource = dsCustomers
+ TabOrder = 2
+ end
+ end
+ object Panel3: TPanel
+ Left = 0
+ Top = 0
+ Width = 611
+ Height = 193
+ Align = alTop
+ BevelOuter = bvNone
+ Caption = 'Panel3'
+ TabOrder = 4
+ object Panel4: TPanel
+ Left = 346
+ Top = 0
+ Width = 265
+ Height = 193
+ Align = alRight
+ BevelOuter = bvNone
+ TabOrder = 0
+ object btn_TestDatasets: TButton
+ Left = 8
+ Top = 75
+ Width = 129
+ Height = 25
+ Caption = 'Test Datasets'
+ TabOrder = 0
+ OnClick = btn_TestDatasetsClick
+ end
+ object cbSkipCustomers: TCheckBox
+ Left = 8
+ Top = 40
+ Width = 97
+ Height = 17
+ Caption = 'Skip Customers'
+ TabOrder = 1
+ end
+ object cbSkipOrders: TCheckBox
+ Left = 8
+ Top = 56
+ Width = 97
+ Height = 17
+ Caption = 'Skip Orders'
+ TabOrder = 2
+ end
+ object btn_TurnMD: TButton
+ Left = 8
+ Top = 139
+ Width = 129
+ Height = 25
+ Caption = 'Turn M/D on/off'
+ TabOrder = 3
+ OnClick = btn_TurnMDClick
+ end
+ object cbCloseBeforeTest: TCheckBox
+ Left = 8
+ Top = 11
+ Width = 113
+ Height = 17
+ Caption = 'Close Before Test'
+ Checked = True
+ State = cbChecked
+ TabOrder = 4
+ end
+ object btn_ShowDeltaCounters: TButton
+ Left = 8
+ Top = 168
+ Width = 129
+ Height = 25
+ Caption = 'Show Delta Counters'
+ TabOrder = 5
+ OnClick = btn_ShowDeltaCountersClick
+ end
+ object btn_TestDeltas: TButton
+ Left = 8
+ Top = 107
+ Width = 129
+ Height = 25
+ Caption = 'Test Deltas'
+ TabOrder = 6
+ OnClick = btn_TestDeltasClick
+ end
+ object btn_ClearMemo: TButton
+ Left = 144
+ Top = 168
+ Width = 97
+ Height = 25
+ Caption = 'Clear Memo'
+ TabOrder = 7
+ OnClick = btn_ClearMemoClick
+ end
+ end
+ object Memo: TMemo
+ Left = 0
+ Top = 0
+ Width = 346
+ Height = 193
+ Align = alClient
+ ScrollBars = ssVertical
+ TabOrder = 1
+ end
+ end
+ object DADriverManager: TDADriverManager
+ DriverDirectory = '%SYSTEM%\'
+ TraceActive = False
+ TraceFlags = []
+ Left = 16
+ Top = 8
+ end
+ object DAConnectionManager: TDAConnectionManager
+ Connections = <
+ item
+ Name = 'ADO'
+ ConnectionString =
+ 'ADO?Server=localhost;Database=Northwind;UserID=sa;AuxDriver=SQLO' +
+ 'LEDB.1;password=;'
+ Default = True
+ Tag = 0
+ end>
+ DriverManager = DADriverManager
+ PoolingEnabled = True
+ Left = 80
+ Top = 8
+ end
+ object DASchema: TDASchema
+ ConnectionManager = DAConnectionManager
+ Datasets = <
+ item
+ Params = <>
+ Statements = <
+ item
+ Connection = 'ADO'
+ TargetTable = 'Customers'
+ SQL =
+ 'SELECT '#10' CustomerID, CompanyName, ContactName, ContactTitle, ' +
+ #10' Address, City, Region, PostalCode, Country, Phone, '#10' Fax' +
+ #10' FROM'#10' Customers'
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'CustomerID'
+ TableField = 'CustomerID'
+ end
+ item
+ DatasetField = 'CompanyName'
+ TableField = 'CompanyName'
+ end
+ item
+ DatasetField = 'ContactName'
+ TableField = 'ContactName'
+ end
+ item
+ DatasetField = 'ContactTitle'
+ TableField = 'ContactTitle'
+ end
+ item
+ DatasetField = 'Address'
+ TableField = 'Address'
+ end
+ item
+ DatasetField = 'City'
+ TableField = 'City'
+ end
+ item
+ DatasetField = 'Region'
+ TableField = 'Region'
+ end
+ item
+ DatasetField = 'PostalCode'
+ TableField = 'PostalCode'
+ end
+ item
+ DatasetField = 'Country'
+ TableField = 'Country'
+ end
+ item
+ DatasetField = 'Phone'
+ TableField = 'Phone'
+ end
+ item
+ DatasetField = 'Fax'
+ TableField = 'Fax'
+ end>
+ end>
+ Name = 'Customers'
+ Fields = <
+ item
+ Name = 'CustomerID'
+ DataType = datString
+ Size = 5
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CompanyName'
+ DataType = datString
+ Size = 40
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ContactName'
+ DataType = datString
+ Size = 30
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ContactTitle'
+ DataType = datString
+ Size = 30
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Address'
+ DataType = datString
+ Size = 60
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'City'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Region'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'PostalCode'
+ DataType = datString
+ Size = 10
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Country'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Phone'
+ DataType = datString
+ Size = 24
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Fax'
+ DataType = datString
+ Size = 24
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ BusinessRulesClient.ScriptLanguage = rslPascalScript
+ BusinessRulesServer.ScriptLanguage = rslPascalScript
+ end
+ item
+ Params = <>
+ Statements = <
+ item
+ Connection = 'ADO'
+ TargetTable = 'Orders'
+ SQL =
+ 'SELECT '#10' OrderID, CustomerID, EmployeeID, OrderDate, Required' +
+ 'Date, '#10' ShippedDate, ShipVia, Freight, ShipName, ShipAddress,' +
+ ' '#10' ShipCity, ShipRegion, ShipPostalCode, ShipCountry'#10' FROM'#10' ' +
+ ' Orders'
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'OrderID'
+ TableField = 'OrderID'
+ end
+ item
+ DatasetField = 'CustomerID'
+ TableField = 'CustomerID'
+ end
+ item
+ DatasetField = 'EmployeeID'
+ TableField = 'EmployeeID'
+ end
+ item
+ DatasetField = 'OrderDate'
+ TableField = 'OrderDate'
+ end
+ item
+ DatasetField = 'RequiredDate'
+ TableField = 'RequiredDate'
+ end
+ item
+ DatasetField = 'ShippedDate'
+ TableField = 'ShippedDate'
+ end
+ item
+ DatasetField = 'ShipVia'
+ TableField = 'ShipVia'
+ end
+ item
+ DatasetField = 'Freight'
+ TableField = 'Freight'
+ end
+ item
+ DatasetField = 'ShipName'
+ TableField = 'ShipName'
+ end
+ item
+ DatasetField = 'ShipAddress'
+ TableField = 'ShipAddress'
+ end
+ item
+ DatasetField = 'ShipCity'
+ TableField = 'ShipCity'
+ end
+ item
+ DatasetField = 'ShipRegion'
+ TableField = 'ShipRegion'
+ end
+ item
+ DatasetField = 'ShipPostalCode'
+ TableField = 'ShipPostalCode'
+ end
+ item
+ DatasetField = 'ShipCountry'
+ TableField = 'ShipCountry'
+ end>
+ end>
+ Name = 'Orders'
+ Fields = <
+ item
+ Name = 'OrderID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CustomerID'
+ DataType = datString
+ Size = 5
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'EmployeeID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'OrderDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'RequiredDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShippedDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipVia'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Freight'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipName'
+ DataType = datString
+ Size = 40
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipAddress'
+ DataType = datString
+ Size = 60
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipCity'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipRegion'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipPostalCode'
+ DataType = datString
+ Size = 10
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipCountry'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ BusinessRulesClient.ScriptLanguage = rslPascalScript
+ BusinessRulesServer.ScriptLanguage = rslPascalScript
+ end>
+ Commands = <>
+ RelationShips = <>
+ UpdateRules = <>
+ Left = 48
+ Top = 8
+ end
+ object DAADODriver: TDAADODriver
+ Left = 112
+ Top = 8
+ end
+ object dtCustomers: TDACDSDataTable
+ RemoteUpdatesOptions = []
+ Fields = <>
+ Params = <>
+ MasterMappingMode = mmDataRequest
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteFetchEnabled = False
+ ReadOnly = False
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ IndexDefs = <>
+ Left = 276
+ Top = 27
+ end
+ object dsCustomers: TDADataSource
+ DataSet = dtCustomers.Dataset
+ DataTable = dtCustomers
+ Left = 292
+ Top = 43
+ end
+ object dtOrders: TDACDSDataTable
+ RemoteUpdatesOptions = []
+ Fields = <>
+ Params = <>
+ MasterMappingMode = mmDataRequest
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteFetchEnabled = False
+ ReadOnly = False
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ IndexDefs = <>
+ Left = 340
+ Top = 27
+ end
+ object dsOrders: TDADataSource
+ DataSet = dtOrders.Dataset
+ DataTable = dtOrders
+ Left = 356
+ Top = 43
+ end
+ object DABinDataStreamer: TDABinDataStreamer
+ Left = 146
+ Top = 8
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Data Streamers/DataStreamersMain.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Data Streamers/DataStreamersMain.pas
new file mode 100644
index 0000000..4cc3fb9
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Data Streamers/DataStreamersMain.pas
@@ -0,0 +1,240 @@
+unit DataStreamersMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, StdCtrls, DB, Grids, DBGrids, ExtCtrls, DBCtrls,
+ uDADataTable, uDABINAdapter, uDAClasses, uDADriverManager, uDAInterfaces,
+ uDADataStreamer, uDAScriptingProvider, uDACDSDataTable, uDAEngine,
+ uDAADODriver;
+
+type
+ TDataStreamersMainForm = class(TForm)
+ DADriverManager: TDADriverManager;
+ DAADODriver: TDAADODriver;
+ DAConnectionManager: TDAConnectionManager;
+ dtCustomers: TDACDSDataTable;
+ dsCustomers: TDADataSource;
+ gCustomers: TDBGrid;
+ dtOrders: TDACDSDataTable;
+ dsOrders: TDADataSource;
+ gOrders: TDBGrid;
+ Panel1: TPanel;
+ dbnOrders: TDBNavigator;
+ btn_OpenOrders: TButton;
+ cbApplyOrdersSchema: TCheckBox;
+ Panel2: TPanel;
+ cbApplyCustomersSchema: TCheckBox;
+ btn_OpenCustomers: TButton;
+ dbnCustomers: TDBNavigator;
+ Panel3: TPanel;
+ Panel4: TPanel;
+ btn_TestDatasets: TButton;
+ cbSkipCustomers: TCheckBox;
+ cbSkipOrders: TCheckBox;
+ btn_TurnMD: TButton;
+ cbCloseBeforeTest: TCheckBox;
+ btn_ShowDeltaCounters: TButton;
+ btn_TestDeltas: TButton;
+ btn_ClearMemo: TButton;
+ Memo: TMemo;
+ DASchema: TDASchema;
+ DABinDataStreamer: TDABinDataStreamer;
+ procedure FormCreate(Sender: TObject);
+ procedure btn_TestDatasetsClick(Sender: TObject);
+ procedure btn_OpenCustomersClick(Sender: TObject);
+ procedure btn_OpenOrdersClick(Sender: TObject);
+ procedure btn_TurnMDClick(Sender: TObject);
+ procedure btn_ShowDeltaCountersClick(Sender: TObject);
+ procedure btn_TestDeltasClick(Sender: TObject);
+ procedure btn_ClearMemoClick(Sender: TObject);
+ procedure FormDestroy(Sender: TObject);
+ private
+ fConnection: IDAConnection;
+ end;
+
+var
+ DataStreamersMainForm: TDataStreamersMainForm;
+
+implementation
+
+uses uROTypes, uDADelta;
+
+{$R *.dfm}
+
+procedure TDataStreamersMainForm.FormCreate(Sender: TObject);
+begin
+ fConnection := DAConnectionManager.NewConnection('ADO');
+end;
+
+procedure TDataStreamersMainForm.FormDestroy(Sender: TObject);
+begin
+fConnection:=nil;
+end;
+
+procedure TDataStreamersMainForm.btn_TestDatasetsClick(Sender: TObject);
+var
+ stream: Binary;
+ customers,
+ orders: IDADataset;
+ i: integer;
+ start: Cardinal;
+begin
+ if cbCloseBeforeTest.Checked then begin
+ dtCustomers.Close;
+ dtOrders.Close;
+ end;
+
+ stream := Binary.Create;
+
+ with DABinDataStreamer do try
+ customers := DASchema.NewDataset(fConnection, 'Customers');
+ //customers.Where.AddText(' 1=2');
+ orders := DASchema.NewDataset(fConnection, 'Orders');
+ //orders.Where.AddText(' 1=2');
+
+ start := GetTickCount;
+
+ // Writes the data
+ Initialize(stream, aiWrite);
+ if not cbSkipCustomers.Checked then WriteDataset(customers, [woSchema, woRows], -1);
+
+ if not cbSkipOrders.Checked then WriteDataset(orders, [woRows, woSchema], -1);
+ Finalize;
+ // End of write data
+
+ Memo.Lines.Add('WRITE completed in ' + IntToStr(GetTickCount - start) + 'ms');
+
+ // Logging info
+ Memo.Lines.Add('Stream is now ' + IntToStr(stream.Size) + ' bytes long');
+
+ start := GetTickCount;
+ Initialize(stream, aiReadFromBeginning);
+
+ // Reads the data
+ if not cbSkipCustomers.Checked then begin
+ if cbApplyCustomersSchema.Checked then
+ ReadDataset('Customers', dtCustomers, TRUE)
+ else
+ ReadDataset('Customers', dtCustomers);
+ end;
+
+ if not cbSkipOrders.Checked then begin
+ if cbApplyOrdersSchema.Checked then
+ ReadDataset('Orders', dtOrders, TRUE)
+ else
+ ReadDataset('Orders', dtOrders);
+ end;
+
+ Finalize;
+
+ // End of read data
+ Memo.Lines.Add('READ completed in ' + IntToStr(GetTickCount - start) + 'ms');
+
+ // Logging info
+ Memo.Lines.Add('The stream contains ' + IntToStr(DatasetCount) + ' datasets and ' + IntToStr(DeltaCount) + ' deltas');
+ for i := 0 to (DatasetCount - 1) do Memo.Lines.Add('Dataset -> ' + DatasetNames[i]);
+ for i := 0 to (DeltaCount - 1) do Memo.Lines.Add('Delta -> ' + DeltaNames[i]);
+ Memo.Lines.Add(' ');
+ finally
+ stream.Free;
+ end;
+end;
+
+procedure TDataStreamersMainForm.btn_OpenCustomersClick(Sender: TObject);
+begin
+ dtCustomers.Active := dtCustomers.Active xor TRUE;
+end;
+
+procedure TDataStreamersMainForm.btn_OpenOrdersClick(Sender: TObject);
+begin
+ dtOrders.Active := dtOrders.Active xor TRUE
+end;
+
+procedure TDataStreamersMainForm.btn_TurnMDClick(Sender: TObject);
+begin
+ if dtOrders.MasterSource = nil then begin
+ dtOrders.MasterFields := 'CustomerID';
+ dtOrders.DetailFields := 'CustomerID';
+ dtOrders.MasterSource := dsCustomers;
+ end
+
+ else begin
+ dtOrders.MasterSource := nil;
+ dtOrders.MasterFields := '';
+ dtOrders.DetailFields := '';
+ end;
+
+ btn_TestDatasets.Enabled := dtOrders.MasterSource = nil;
+end;
+
+procedure TDataStreamersMainForm.btn_ShowDeltaCountersClick(Sender: TObject);
+begin
+ ShowMessage(Format('Changes: Customers %d, Orders %d', [dtCustomers.Delta.Count, dtOrders.Delta.Count]));
+end;
+
+procedure TDataStreamersMainForm.btn_TestDeltasClick(Sender: TObject);
+var
+ stream: TStream;
+ i: integer;
+ orddelta,
+ custdelta: TDADelta;
+begin
+ if not dtCustomers.Active or not dtOrders.Active then begin
+ MessageDlg('Both datatables must be open!', mtError, [mbOK], 0);
+ Exit;
+ end;
+
+ stream := TMemoryStream.Create;
+
+ custdelta := TDADelta.Create(dtCustomers);
+ orddelta := TDADelta.Create(dtOrders);
+ with DABinDataStreamer do try
+ // Writes the data
+ Initialize(stream, aiWrite);
+ if not cbSkipCustomers.Checked then WriteDelta(dtCustomers);
+
+ if not cbSkipOrders.Checked then WriteDelta(dtOrders);
+ Finalize;
+ // End of write data
+
+ // Logging info
+ Memo.Lines.Add('Stream is now ' + IntToStr(stream.Size) + ' bytes long');
+
+ Initialize(stream, aiReadFromBeginning);
+
+ // Reads the data
+ if not cbSkipCustomers.Checked then begin
+ ReadDelta('dtCustomers', custdelta);
+ Memo.Lines.Add('Customers delta contains ' + IntToStr(custdelta.Count) + ' changes');
+ end;
+
+ if not cbSkipOrders.Checked then begin
+ ReadDelta('dtOrders', orddelta);
+ Memo.Lines.Add('Orders delta contains ' + IntToStr(orddelta.Count) + ' changes');
+ end;
+
+ Finalize;
+
+ // Logging info
+ Memo.Lines.Add('The stream contains ' + IntToStr(DatasetCount) + ' datasets and ' + IntToStr(DeltaCount) + ' deltas');
+ for i := 0 to (DatasetCount - 1) do Memo.Lines.Add('Dataset -> ' + DatasetNames[i]);
+ for i := 0 to (DeltaCount - 1) do Memo.Lines.Add('Delta -> ' + DeltaNames[i]);
+ Memo.Lines.Add(' ');
+
+ finally
+ stream.Free;
+
+ custdelta.Free;
+ orddelta.Free;
+ end;
+end;
+
+procedure TDataStreamersMainForm.btn_ClearMemoClick(Sender: TObject);
+begin
+ Memo.Lines.Clear;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Data Streamers/DataStreamersTest.Sample.html b/official/5.0.30.691/Data Abstract for Delphi/Samples/Data Streamers/DataStreamersTest.Sample.html
new file mode 100644
index 0000000..1babacb
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Data Streamers/DataStreamersTest.Sample.html
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+ Data Streamers Sample
+This example shows how a dataset can be written to a stream and read from it using the TDABinDataStreamer class.
+When you compile and launch this example it displays two grids, the sources for which are datasets dynamically read using TStream .
+Modify some data in the grids.
+When you press the "Test Deltas" button, it shows the size of the delta containing the data to update the dataset.
+The "Turn M/D on/off" button toggles the top grid as the master source for the bottom grid.
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Data Streamers/DataStreamersTest.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Data Streamers/DataStreamersTest.bdsproj
new file mode 100644
index 0000000..9a4eae0
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Data Streamers/DataStreamersTest.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {9BF2BF18-89B3-4C63-B97B-1A3061BCFD38}
+
+
+
+
+ DataStreamersTest.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Data Streamers/DataStreamersTest.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/Data Streamers/DataStreamersTest.dpr
new file mode 100644
index 0000000..d388589
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Data Streamers/DataStreamersTest.dpr
@@ -0,0 +1,14 @@
+program DataStreamersTest;
+
+uses
+ Forms,
+ DataStreamersMain in 'DataStreamersMain.pas' {DataStreamersMainForm};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'Adapters Test';
+ Application.CreateForm(TDataStreamersMainForm, DataStreamersMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Data Streamers/DataStreamersTest.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Data Streamers/DataStreamersTest.dproj
new file mode 100644
index 0000000..e5ff5da
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Data Streamers/DataStreamersTest.dproj
@@ -0,0 +1,72 @@
+
+
+ {0d9a7452-75b7-4181-9053-aa039d95be41}
+ DataStreamersTest.dpr
+ Debug
+ AnyCPU
+ DCC32
+ DataStreamersTest.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ DataStreamersTest.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Data Streamers/DataStreamersTest.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Data Streamers/DataStreamersTest.res
new file mode 100644
index 0000000..6a1db77
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Data Streamers/DataStreamersTest.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Data Streamers/fMainForm.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Data Streamers/fMainForm.dfm
new file mode 100644
index 0000000..3e0a9f4
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Data Streamers/fMainForm.dfm
@@ -0,0 +1,730 @@
+object Form1: TForm1
+ Left = 70
+ Top = 51
+ Width = 807
+ Height = 632
+ BorderWidth = 5
+ Caption = 'DataStream Tester'
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ PixelsPerInch = 96
+ TextHeight = 13
+ object DBGrid1: TDBGrid
+ Left = 0
+ Top = 228
+ Width = 789
+ Height = 163
+ Align = alClient
+ DataSource = dsCustomers
+ TabOrder = 0
+ TitleFont.Charset = DEFAULT_CHARSET
+ TitleFont.Color = clWindowText
+ TitleFont.Height = -11
+ TitleFont.Name = 'MS Sans Serif'
+ TitleFont.Style = []
+ end
+ object DBGrid2: TDBGrid
+ Left = 0
+ Top = 426
+ Width = 789
+ Height = 163
+ Align = alBottom
+ DataSource = dsOrders
+ TabOrder = 1
+ TitleFont.Charset = DEFAULT_CHARSET
+ TitleFont.Color = clWindowText
+ TitleFont.Height = -11
+ TitleFont.Name = 'MS Sans Serif'
+ TitleFont.Style = []
+ end
+ object Panel1: TPanel
+ Left = 0
+ Top = 391
+ Width = 789
+ Height = 35
+ Align = alBottom
+ BevelOuter = bvNone
+ TabOrder = 2
+ object DBNavigator2: TDBNavigator
+ Left = 240
+ Top = 5
+ Width = 240
+ Height = 25
+ DataSource = dsOrders
+ TabOrder = 0
+ end
+ object Button3: TButton
+ Left = 152
+ Top = 5
+ Width = 75
+ Height = 25
+ Caption = 'Open/Close'
+ TabOrder = 1
+ OnClick = Button3Click
+ end
+ object cbApplyOrdersSchema: TCheckBox
+ Left = 4
+ Top = 9
+ Width = 133
+ Height = 17
+ Caption = 'Apply Orders Schema'
+ Checked = True
+ State = cbChecked
+ TabOrder = 2
+ end
+ end
+ object Panel2: TPanel
+ Left = 0
+ Top = 193
+ Width = 789
+ Height = 35
+ Align = alTop
+ BevelOuter = bvNone
+ TabOrder = 3
+ object cbApplyCustomersSchema: TCheckBox
+ Left = 4
+ Top = 9
+ Width = 141
+ Height = 17
+ Caption = 'Apply Customers Schema'
+ Checked = True
+ State = cbChecked
+ TabOrder = 0
+ end
+ object Button2: TButton
+ Left = 160
+ Top = 5
+ Width = 75
+ Height = 25
+ Caption = 'Open/Close'
+ TabOrder = 1
+ OnClick = Button2Click
+ end
+ object DBNavigator1: TDBNavigator
+ Left = 248
+ Top = 5
+ Width = 240
+ Height = 25
+ DataSource = dsCustomers
+ TabOrder = 2
+ end
+ end
+ object Panel3: TPanel
+ Left = 0
+ Top = 0
+ Width = 789
+ Height = 193
+ Align = alTop
+ BevelOuter = bvNone
+ Caption = 'Panel3'
+ TabOrder = 4
+ object Panel4: TPanel
+ Left = 524
+ Top = 0
+ Width = 265
+ Height = 193
+ Align = alRight
+ BevelOuter = bvNone
+ TabOrder = 0
+ object btn_TestDatasets: TButton
+ Left = 8
+ Top = 75
+ Width = 129
+ Height = 25
+ Caption = 'Test Datasets'
+ TabOrder = 0
+ OnClick = btn_TestDatasetsClick
+ end
+ object cbSkipCustomers: TCheckBox
+ Left = 8
+ Top = 40
+ Width = 97
+ Height = 17
+ Caption = 'Skip Customers'
+ TabOrder = 1
+ end
+ object cbSkipOrders: TCheckBox
+ Left = 8
+ Top = 56
+ Width = 97
+ Height = 17
+ Caption = 'Skip Orders'
+ TabOrder = 2
+ end
+ object btn_TurnMD: TButton
+ Left = 8
+ Top = 139
+ Width = 129
+ Height = 25
+ Caption = 'Turn M/D on/off'
+ TabOrder = 3
+ OnClick = btn_TurnMDClick
+ end
+ object cbCloseBeforeTest: TCheckBox
+ Left = 8
+ Top = 11
+ Width = 113
+ Height = 17
+ Caption = 'Close Before Test'
+ Checked = True
+ State = cbChecked
+ TabOrder = 4
+ end
+ object btn_ShowDeltaCounters: TButton
+ Left = 8
+ Top = 168
+ Width = 129
+ Height = 25
+ Caption = 'Show Delta Counters'
+ TabOrder = 5
+ OnClick = btn_ShowDeltaCountersClick
+ end
+ object btn_TestDeltas: TButton
+ Left = 8
+ Top = 107
+ Width = 129
+ Height = 25
+ Caption = 'Test Deltas'
+ TabOrder = 6
+ OnClick = btn_TestDeltasClick
+ end
+ object btn_ClearMemo: TButton
+ Left = 144
+ Top = 168
+ Width = 97
+ Height = 25
+ Caption = 'Clear Memo'
+ TabOrder = 7
+ OnClick = btn_ClearMemoClick
+ end
+ end
+ object Memo: TMemo
+ Left = 0
+ Top = 0
+ Width = 524
+ Height = 193
+ Align = alClient
+ ScrollBars = ssVertical
+ TabOrder = 1
+ end
+ end
+ object DADriverManager1: TDADriverManager
+ DriverDirectory = '%SYSTEM%\'
+ AutoLoad = False
+ TraceActive = False
+ TraceFlags = []
+ Left = 16
+ Top = 8
+ end
+ object DAConnectionManager1: TDAConnectionManager
+ MaxPoolSize = 10
+ PoolTimeoutSeconds = 60
+ PoolBehaviour = pbWait
+ WaitIntervalSeconds = 1
+ Connections = <
+ item
+ Name = 'ADO'
+ ConnectionString =
+ 'ADO?Server=.;Database=Northwind;UserID=sa;AuxDriver=SQLOLEDB.1;p' +
+ 'assword=;'
+ Default = True
+ Tag = 0
+ end>
+ DriverManager = DADriverManager1
+ PoolingEnabled = True
+ Left = 80
+ Top = 8
+ end
+ object DASchema1: TDASchema
+ ConnectionManager = DAConnectionManager1
+ Datasets = <
+ item
+ Params = <>
+ Statements = <
+ item
+ Connection = 'ADO'
+ TargetTable = 'Customers'
+ SQL =
+ 'SELECT '#10' CustomerID, CompanyName, ContactName, ContactTitle, ' +
+ #10' Address, City, Region, PostalCode, Country, Phone, '#10' Fax' +
+ #10' FROM'#10' Customers'
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'CustomerID'
+ TableField = 'CustomerID'
+ end
+ item
+ DatasetField = 'CompanyName'
+ TableField = 'CompanyName'
+ end
+ item
+ DatasetField = 'ContactName'
+ TableField = 'ContactName'
+ end
+ item
+ DatasetField = 'ContactTitle'
+ TableField = 'ContactTitle'
+ end
+ item
+ DatasetField = 'Address'
+ TableField = 'Address'
+ end
+ item
+ DatasetField = 'City'
+ TableField = 'City'
+ end
+ item
+ DatasetField = 'Region'
+ TableField = 'Region'
+ end
+ item
+ DatasetField = 'PostalCode'
+ TableField = 'PostalCode'
+ end
+ item
+ DatasetField = 'Country'
+ TableField = 'Country'
+ end
+ item
+ DatasetField = 'Phone'
+ TableField = 'Phone'
+ end
+ item
+ DatasetField = 'Fax'
+ TableField = 'Fax'
+ end>
+ end>
+ Name = 'Customers'
+ Fields = <
+ item
+ Name = 'CustomerID'
+ DataType = datString
+ Size = 5
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CompanyName'
+ DataType = datString
+ Size = 40
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ContactName'
+ DataType = datString
+ Size = 30
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ContactTitle'
+ DataType = datString
+ Size = 30
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Address'
+ DataType = datString
+ Size = 60
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'City'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Region'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'PostalCode'
+ DataType = datString
+ Size = 10
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Country'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Phone'
+ DataType = datString
+ Size = 24
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Fax'
+ DataType = datString
+ Size = 24
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ BusinessRulesClient.ScriptLanguage = rslPascalScript
+ BusinessRulesServer.ScriptLanguage = rslPascalScript
+ end
+ item
+ Params = <>
+ Statements = <
+ item
+ Connection = 'ADO'
+ TargetTable = 'Orders'
+ SQL =
+ 'SELECT '#10' OrderID, CustomerID, EmployeeID, OrderDate, Required' +
+ 'Date, '#10' ShippedDate, ShipVia, Freight, ShipName, ShipAddress,' +
+ ' '#10' ShipCity, ShipRegion, ShipPostalCode, ShipCountry'#10' FROM'#10' ' +
+ ' Orders'
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'OrderID'
+ TableField = 'OrderID'
+ end
+ item
+ DatasetField = 'CustomerID'
+ TableField = 'CustomerID'
+ end
+ item
+ DatasetField = 'EmployeeID'
+ TableField = 'EmployeeID'
+ end
+ item
+ DatasetField = 'OrderDate'
+ TableField = 'OrderDate'
+ end
+ item
+ DatasetField = 'RequiredDate'
+ TableField = 'RequiredDate'
+ end
+ item
+ DatasetField = 'ShippedDate'
+ TableField = 'ShippedDate'
+ end
+ item
+ DatasetField = 'ShipVia'
+ TableField = 'ShipVia'
+ end
+ item
+ DatasetField = 'Freight'
+ TableField = 'Freight'
+ end
+ item
+ DatasetField = 'ShipName'
+ TableField = 'ShipName'
+ end
+ item
+ DatasetField = 'ShipAddress'
+ TableField = 'ShipAddress'
+ end
+ item
+ DatasetField = 'ShipCity'
+ TableField = 'ShipCity'
+ end
+ item
+ DatasetField = 'ShipRegion'
+ TableField = 'ShipRegion'
+ end
+ item
+ DatasetField = 'ShipPostalCode'
+ TableField = 'ShipPostalCode'
+ end
+ item
+ DatasetField = 'ShipCountry'
+ TableField = 'ShipCountry'
+ end>
+ end>
+ Name = 'Orders'
+ Fields = <
+ item
+ Name = 'OrderID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CustomerID'
+ DataType = datString
+ Size = 5
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'EmployeeID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'OrderDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'RequiredDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShippedDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipVia'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Freight'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipName'
+ DataType = datString
+ Size = 40
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipAddress'
+ DataType = datString
+ Size = 60
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipCity'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipRegion'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipPostalCode'
+ DataType = datString
+ Size = 10
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipCountry'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ BusinessRulesClient.ScriptLanguage = rslPascalScript
+ BusinessRulesServer.ScriptLanguage = rslPascalScript
+ end>
+ Commands = <>
+ RelationShips = <>
+ UpdateRules = <>
+ Left = 48
+ Top = 8
+ end
+ object DAADODriver1: TDAADODriver
+ Left = 112
+ Top = 8
+ end
+ object dtCustomers: TDACDSDataTable
+ RemoteUpdatesOptions = []
+ Fields = <>
+ Params = <>
+ MasterMappingMode = mmDataRequest
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteFetchEnabled = False
+ ReadOnly = False
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ IndexDefs = <>
+ Left = 276
+ Top = 27
+ end
+ object dsCustomers: TDADataSource
+ DataTable = dtCustomers
+ Left = 292
+ Top = 43
+ end
+ object dtOrders: TDACDSDataTable
+ RemoteUpdatesOptions = []
+ Fields = <>
+ Params = <>
+ MasterMappingMode = mmDataRequest
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteFetchEnabled = False
+ ReadOnly = False
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ IndexDefs = <>
+ Left = 340
+ Top = 27
+ end
+ object dsOrders: TDADataSource
+ DataTable = dtOrders
+ Left = 356
+ Top = 43
+ end
+ object DABinDataStreamer: TDABinDataStreamer
+ Left = 146
+ Top = 8
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Data Streamers/fMainForm.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Data Streamers/fMainForm.pas
new file mode 100644
index 0000000..07dfc8a
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Data Streamers/fMainForm.pas
@@ -0,0 +1,234 @@
+unit fMainForm;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, StdCtrls, DB, Grids, DBGrids, ExtCtrls, DBCtrls,
+ uDADataTable, uDABINAdapter, uDAClasses, uDADriverManager, uDAInterfaces,
+ uDADataStreamer, uDAScriptingProvider, uDACDSDataTable, uDAEngine,
+ uDAADODriver;
+
+type
+ TForm1 = class(TForm)
+ DADriverManager1: TDADriverManager;
+ DAADODriver1: TDAADODriver;
+ DAConnectionManager1: TDAConnectionManager;
+ dtCustomers: TDACDSDataTable;
+ dsCustomers: TDADataSource;
+ DBGrid1: TDBGrid;
+ dtOrders: TDACDSDataTable;
+ dsOrders: TDADataSource;
+ DBGrid2: TDBGrid;
+ Panel1: TPanel;
+ DBNavigator2: TDBNavigator;
+ Button3: TButton;
+ cbApplyOrdersSchema: TCheckBox;
+ Panel2: TPanel;
+ cbApplyCustomersSchema: TCheckBox;
+ Button2: TButton;
+ DBNavigator1: TDBNavigator;
+ Panel3: TPanel;
+ Panel4: TPanel;
+ btn_TestDatasets: TButton;
+ cbSkipCustomers: TCheckBox;
+ cbSkipOrders: TCheckBox;
+ btn_TurnMD: TButton;
+ cbCloseBeforeTest: TCheckBox;
+ btn_ShowDeltaCounters: TButton;
+ btn_TestDeltas: TButton;
+ btn_ClearMemo: TButton;
+ Memo: TMemo;
+ DASchema1: TDASchema;
+ DABinDataStreamer: TDABinDataStreamer;
+ procedure FormCreate(Sender: TObject);
+ procedure btn_TestDatasetsClick(Sender: TObject);
+ procedure Button2Click(Sender: TObject);
+ procedure Button3Click(Sender: TObject);
+ procedure btn_TurnMDClick(Sender: TObject);
+ procedure btn_ShowDeltaCountersClick(Sender: TObject);
+ procedure btn_TestDeltasClick(Sender: TObject);
+ procedure btn_ClearMemoClick(Sender: TObject);
+ private
+ fConnection: IDAConnection;
+ end;
+
+var
+ Form1: TForm1;
+
+implementation
+
+uses uROTypes, uDADelta;
+
+{$R *.dfm}
+
+procedure TForm1.FormCreate(Sender: TObject);
+begin
+ fConnection := DAConnectionManager1.NewConnection('ADO');
+end;
+
+procedure TForm1.btn_TestDatasetsClick(Sender: TObject);
+var
+ stream: Binary;
+ customers,
+ orders: IDADataset;
+ i: integer;
+ start: Cardinal;
+begin
+ if cbCloseBeforeTest.Checked then begin
+ dtCustomers.Close;
+ dtOrders.Close;
+ end;
+
+ stream := Binary.Create;
+
+ with DABinDataStreamer do try
+ customers := DASchema1.NewDataset(fConnection, 'Customers');
+ //customers.Where.AddText(' 1=2');
+ orders := DASchema1.NewDataset(fConnection, 'Orders');
+ //orders.Where.AddText(' 1=2');
+
+ start := GetTickCount;
+
+ // Writes the data
+ Initialize(stream, aiWrite);
+ if not cbSkipCustomers.Checked then WriteDataset(customers, [woSchema, woRows], -1);
+
+ if not cbSkipOrders.Checked then WriteDataset(orders, [woRows, woSchema], -1);
+ Finalize;
+ // End of write data
+
+ Memo.Lines.Add('WRITE completed in ' + IntToStr(GetTickCount - start) + 'ms');
+
+ // Logging info
+ Memo.Lines.Add('Stream is now ' + IntToStr(stream.Size) + ' bytes long');
+
+ start := GetTickCount;
+ Initialize(stream, aiReadFromBeginning);
+
+ // Reads the data
+ if not cbSkipCustomers.Checked then begin
+ if cbApplyCustomersSchema.Checked then
+ ReadDataset('Customers', dtCustomers, TRUE)
+ else
+ ReadDataset('Customers', dtCustomers);
+ end;
+
+ if not cbSkipOrders.Checked then begin
+ if cbApplyOrdersSchema.Checked then
+ ReadDataset('Orders', dtOrders, TRUE)
+ else
+ ReadDataset('Orders', dtOrders);
+ end;
+
+ Finalize;
+
+ // End of read data
+ Memo.Lines.Add('READ completed in ' + IntToStr(GetTickCount - start) + 'ms');
+
+ // Logging info
+ Memo.Lines.Add('The stream contains ' + IntToStr(DatasetCount) + ' datasets and ' + IntToStr(DeltaCount) + ' deltas');
+ for i := 0 to (DatasetCount - 1) do Memo.Lines.Add('Dataset -> ' + DatasetNames[i]);
+ for i := 0 to (DeltaCount - 1) do Memo.Lines.Add('Delta -> ' + DeltaNames[i]);
+ Memo.Lines.Add(' ');
+ finally
+ stream.Free;
+ end;
+end;
+
+procedure TForm1.Button2Click(Sender: TObject);
+begin
+ dtCustomers.Active := dtCustomers.Active xor TRUE;
+end;
+
+procedure TForm1.Button3Click(Sender: TObject);
+begin
+ dtOrders.Active := dtOrders.Active xor TRUE
+end;
+
+procedure TForm1.btn_TurnMDClick(Sender: TObject);
+begin
+ if dtOrders.MasterSource = nil then begin
+ dtOrders.MasterFields := 'CustomerID';
+ dtOrders.DetailFields := 'CustomerID';
+ dtOrders.MasterSource := dsCustomers;
+ end
+
+ else begin
+ dtOrders.MasterSource := nil;
+ dtOrders.MasterFields := '';
+ dtOrders.DetailFields := '';
+ end;
+
+ btn_TestDatasets.Enabled := dtOrders.MasterSource = nil;
+end;
+
+procedure TForm1.btn_ShowDeltaCountersClick(Sender: TObject);
+begin
+ ShowMessage(Format('Changes: Customers %d, Orders %d', [dtCustomers.Delta.Count, dtOrders.Delta.Count]));
+end;
+
+procedure TForm1.btn_TestDeltasClick(Sender: TObject);
+var
+ stream: TStream;
+ i: integer;
+ orddelta,
+ custdelta: TDADelta;
+begin
+ if not dtCustomers.Active or not dtOrders.Active then begin
+ MessageDlg('Both datatables must be open!', mtError, [mbOK], 0);
+ Exit;
+ end;
+
+ stream := TMemoryStream.Create;
+
+ custdelta := TDADelta.Create(dtCustomers);
+ orddelta := TDADelta.Create(dtOrders);
+ with DABinDataStreamer do try
+ // Writes the data
+ Initialize(stream, aiWrite);
+ if not cbSkipCustomers.Checked then WriteDelta(dtCustomers);
+
+ if not cbSkipOrders.Checked then WriteDelta(dtOrders);
+ Finalize;
+ // End of write data
+
+ // Logging info
+ Memo.Lines.Add('Stream is now ' + IntToStr(stream.Size) + ' bytes long');
+
+ Initialize(stream, aiReadFromBeginning);
+
+ // Reads the data
+ if not cbSkipCustomers.Checked then begin
+ ReadDelta('dtCustomers', custdelta);
+ Memo.Lines.Add('Customers delta contains ' + IntToStr(custdelta.Count) + ' changes');
+ end;
+
+ if not cbSkipOrders.Checked then begin
+ ReadDelta('dtOrders', orddelta);
+ Memo.Lines.Add('Orders delta contains ' + IntToStr(orddelta.Count) + ' changes');
+ end;
+
+ Finalize;
+
+ // Logging info
+ Memo.Lines.Add('The stream contains ' + IntToStr(DatasetCount) + ' datasets and ' + IntToStr(DeltaCount) + ' deltas');
+ for i := 0 to (DatasetCount - 1) do Memo.Lines.Add('Dataset -> ' + DatasetNames[i]);
+ for i := 0 to (DeltaCount - 1) do Memo.Lines.Add('Delta -> ' + DeltaNames[i]);
+ Memo.Lines.Add(' ');
+
+ finally
+ stream.Free;
+
+ custdelta.Free;
+ orddelta.Free;
+ end;
+end;
+
+procedure TForm1.btn_ClearMemoClick(Sender: TObject);
+begin
+ Memo.Lines.Clear;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQL.Sample.html b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQL.Sample.html
new file mode 100644
index 0000000..c0e0088
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQL.Sample.html
@@ -0,0 +1,81 @@
+
+
+
+
+
+
+
+
+
+
+ Dynamic SQL
+
+
+
+Purpose
+
+ This demo shows how to retrieve schema and/or data via SQL generated at
+ runtime.
+
+
+ When you compile and run the server, you will see it contains a memo displaying
+ "SQL details generated for Update will be displayed here ".
+ The
+ demo does not actually attempt to update server data but merely display
+ the fields
+ that would be updated by processing the delta. See the TDynSQLService.UpdateData
+ code in DynSQLService_Impl to see how the delta is being processed.
+
+
+ Having next compiled and run the client , the first thing to try
+ is clicking
+ on the Retrieve Schema and Data button and you should then see the
+ Customers
+ data displayed in the grid . Changing the text in the memo, e.g. to
+ Select
+ * from "Order Details" and clicking the button again results
+ in the
+ display of a different dataset with a totally different schema. Any of
+ the datasets
+ in the database (Northwind, by default) may be accessed in this manner.
+
+
+ Other points of interest:
+
+
+
+ As their names suggest, the Retrieve Schema and Retrieve Data
+ buttons
+ achieve the same as the Retrieve Schema and Data button. You might
+ want
+ to use them separately if the data has the same layout as the schema already
+ retrieved.
+ For example, having retrieved all the records (Max Records = -1 ),
+ you can
+ change the number of records required and select Retrieve Data because
+ the schema is correct. If you change the actual SQL though, you will need
+ to reload
+ the schema.
+
+
+ Save and Load buttons. Save stores the schema and
+ data in
+ Data.dat in the sample folder. If you only want to save the schema,
+ set
+ Max Records = 0 and retrieve schema and data (otherwise Save cannot work
+ because
+ the dataset is not open). Load restores the schema and any records
+ saved
+ no matter what data is currently open. Thus you can think of retrieve and
+ load
+ as similar operations but with remote and local data respectively.
+
+
+ The Update button simulates updating the dataset. You can see the
+ result
+ in the memo contained in the server form.
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQL.bdsgroup b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQL.bdsgroup
new file mode 100644
index 0000000..91866a0
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQL.bdsgroup
@@ -0,0 +1,20 @@
+
+
+
+
+ Default.Personality
+
+ 1.0
+ {63CAEABD-4E56-4ED5-BE8B-10B7E87801AB}
+
+
+
+
+
+ DynSQLServer.bdsproj
+ DynSQLClient.bdsproj
+ DynSQLServer.exe DynSQLClient.exe
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQL.bpg b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQL.bpg
new file mode 100644
index 0000000..ef95e27
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQL.bpg
@@ -0,0 +1,23 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = DynSQLServer.exe DynSQLClient.exe
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+DynSQLServer.exe: DynSQLServer.dpr
+ $(DCC)
+
+DynSQLClient.exe: DynSQLClient.dpr
+ $(DCC)
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQL.groupproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQL.groupproj
new file mode 100644
index 0000000..a79c349
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQL.groupproj
@@ -0,0 +1,40 @@
+
+
+ {67b524b6-f332-475d-8d78-7edde30d8a99}
+
+
+
+
+ Default.Personality
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLClient.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLClient.bdsproj
new file mode 100644
index 0000000..7936d9b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLClient.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {C58CCA12-3E20-4DD4-B013-F1EE4C9C2279}
+
+
+
+
+ DynSQLClient.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLClient.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLClient.dpr
new file mode 100644
index 0000000..81907da
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLClient.dpr
@@ -0,0 +1,15 @@
+program DynSQLClient;
+
+uses
+ Forms,
+ DynSQLMainClient in 'DynSQLMainClient.pas' {DynSQLMainClientForm},
+ DynSQLLibrary_Intf in 'DynSQLLibrary_Intf.pas';
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'DynSQL Client';
+ Application.CreateForm(TDynSQLMainClientForm, DynSQLMainClientForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLClient.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLClient.dproj
new file mode 100644
index 0000000..c320b4c
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLClient.dproj
@@ -0,0 +1,37 @@
+
+
+ {a6ec96d6-69bf-4815-b64d-37174ee1d1be}
+ DynSQLClient.dpr
+ Debug
+ AnyCPU
+ DCC32
+ DynSQLClient.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+False True False False False 1 0 0 0 False False False False False 1058 1251 1.0.0.0 1.0.0.0 DynSQLClient.dpr
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLClient.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLClient.res
new file mode 100644
index 0000000..da01de5
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLClient.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLLibrary.RODL b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLLibrary.RODL
new file mode 100644
index 0000000..4e4f4d4
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLLibrary.RODL
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLLibrary_Intf.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLLibrary_Intf.pas
new file mode 100644
index 0000000..ab41146
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLLibrary_Intf.pas
@@ -0,0 +1,104 @@
+unit DynSQLLibrary_Intf;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+{$I Remobjects.inc}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROXMLIntf, uROClasses, uROClient, uROTypes, uROClientIntf,
+ {Used RODLs:} DataAbstract4_Intf;
+
+const
+ { Library ID }
+ LibraryUID = '{7DDA8CC1-A876-4A25-9280-3352E8A464EB}';
+ TargetNamespace = '';
+
+ { Service Interface ID's }
+ IDynSQLService_IID : TGUID = '{02F71273-9E5C-4BD7-81EF-3BD4663EA0AB}';
+
+ { Event ID's }
+
+type
+ { Forward declarations }
+ IDynSQLService = interface;
+
+
+
+
+
+ { Enumerateds }
+
+ { IDynSQLService }
+ IDynSQLService = interface(IDataAbstractService)
+ ['{02F71273-9E5C-4BD7-81EF-3BD4663EA0AB}']
+ function MyUpdateData(const aTableName: String; const Delta: Binary): Binary;
+ end;
+
+ { CoDynSQLService }
+ CoDynSQLService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IDynSQLService;
+ end;
+
+ { TDynSQLService_Proxy }
+ TDynSQLService_Proxy = class(TDataAbstractService_Proxy, IDynSQLService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ function MyUpdateData(const aTableName: String; const Delta: Binary): Binary;
+ end;
+
+implementation
+
+uses
+ {vcl:} SysUtils,
+ {RemObjects:} uROEventRepository, uROSerializer, uRORes;
+
+{ CoDynSQLService }
+
+class function CoDynSQLService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IDynSQLService;
+begin
+ result := TDynSQLService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TDynSQLService_Proxy }
+
+function TDynSQLService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'DynSQLService';
+end;
+
+function TDynSQLService_Proxy.MyUpdateData(const aTableName: String; const Delta: Binary): Binary;
+begin
+ try
+ result := nil;
+ __Message.InitializeRequestMessage(__TransportChannel, 'DynSQLLibrary', __InterfaceName, 'MyUpdateData');
+ __Message.Write('aTableName', TypeInfo(String), aTableName, []);
+ __Message.Write('Delta', TypeInfo(Binary), Delta, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Binary), result, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+initialization
+ RegisterProxyClass(IDynSQLService_IID, TDynSQLService_Proxy);
+
+
+finalization
+ UnregisterProxyClass(IDynSQLService_IID);
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLLibrary_Invk.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLLibrary_Invk.pas
new file mode 100644
index 0000000..f0118bb
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLLibrary_Invk.pas
@@ -0,0 +1,70 @@
+unit DynSQLLibrary_Invk;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+{$I Remobjects.inc}
+
+interface
+
+uses
+ {vcl:} Classes,
+ {RemObjects:} uROXMLIntf, uROServer, uROServerIntf, uROTypes, uROClientIntf,
+ {Used RODL Intf's:} DataAbstract4_Intf,
+ {Used RODL Invk's:} DataAbstract4_Invk,
+ {Generated:} DynSQLLibrary_Intf;
+
+type
+ TDynSQLService_Invoker = class(TDataAbstractService_Invoker)
+ private
+ protected
+ published
+ procedure Invoke_MyUpdateData(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ end;
+
+implementation
+
+uses
+ {RemObjects:} uRORes, uROClient;
+
+{ TDynSQLService_Invoker }
+
+procedure TDynSQLService_Invoker.Invoke_MyUpdateData(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function MyUpdateData(const aTableName: String; const Delta: Binary): Binary; }
+var
+ aTableName: String;
+ Delta: Binary;
+ lResult: Binary;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ Delta := nil;
+ lResult := nil;
+ try
+ __Message.Read('aTableName', TypeInfo(String), aTableName, []);
+ __Message.Read('Delta', TypeInfo(Binary), Delta, []);
+
+ lResult := (__Instance as IDynSQLService).MyUpdateData(aTableName, Delta);
+
+ __Message.InitializeResponseMessage(__Transport, 'DynSQLLibrary', 'DynSQLService', 'MyUpdateDataResponse');
+ __Message.Write('Result', TypeInfo(Binary), lResult, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(Delta);
+ __lObjectDisposer.Add(lResult);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
+initialization
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLMainClient.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLMainClient.dfm
new file mode 100644
index 0000000..0a4b8b2
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLMainClient.dfm
@@ -0,0 +1,248 @@
+object DynSQLMainClientForm: TDynSQLMainClientForm
+ Left = 466
+ Top = 173
+ Width = 549
+ Height = 406
+ BorderWidth = 5
+ Caption = 'DynSQL Client'
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Label1: TLabel
+ Left = 8
+ Top = 136
+ Width = 66
+ Height = 13
+ Caption = 'Max Records:'
+ end
+ object Memo: TMemo
+ Left = 0
+ Top = 0
+ Width = 523
+ Height = 124
+ Align = alTop
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -13
+ Font.Name = 'Courier New'
+ Font.Style = []
+ Lines.Strings = (
+ 'SELECT * FROM Customers')
+ ParentFont = False
+ ScrollBars = ssBoth
+ TabOrder = 0
+ end
+ object seMaxRecs: TSpinEdit
+ Left = 80
+ Top = 133
+ Width = 65
+ Height = 22
+ MaxValue = 0
+ MinValue = 0
+ TabOrder = 1
+ Value = -1
+ end
+ object RetrieveSchema: TButton
+ Left = 0
+ Top = 160
+ Width = 92
+ Height = 25
+ Caption = 'Retrieve Schema'
+ TabOrder = 2
+ OnClick = RetrieveSchemaClick
+ end
+ object Grid: TDBGrid
+ Left = 0
+ Top = 212
+ Width = 523
+ Height = 148
+ Align = alBottom
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ DataSource = DADataSource
+ TabOrder = 3
+ TitleFont.Charset = DEFAULT_CHARSET
+ TitleFont.Color = clWindowText
+ TitleFont.Height = -11
+ TitleFont.Name = 'MS Sans Serif'
+ TitleFont.Style = []
+ end
+ object RetrieveData: TButton
+ Left = 95
+ Top = 160
+ Width = 92
+ Height = 25
+ Caption = 'Retrieve Data'
+ TabOrder = 4
+ OnClick = RetrieveDataClick
+ end
+ object RetrieveSchemaAndData: TButton
+ Left = 191
+ Top = 160
+ Width = 154
+ Height = 25
+ Caption = 'Retrieve Schema and Data'
+ TabOrder = 5
+ OnClick = RetrieveSchemaAndDataClick
+ end
+ object Save: TButton
+ Left = 349
+ Top = 160
+ Width = 45
+ Height = 25
+ Caption = 'Save'
+ TabOrder = 6
+ OnClick = SaveClick
+ end
+ object Load: TButton
+ Left = 398
+ Top = 160
+ Width = 45
+ Height = 25
+ Caption = 'Load'
+ TabOrder = 7
+ OnClick = LoadClick
+ end
+ object Update: TButton
+ Left = 446
+ Top = 160
+ Width = 75
+ Height = 25
+ Caption = 'Update'
+ TabOrder = 8
+ OnClick = UpdateClick
+ end
+ object dbNavigator: TDBNavigator
+ Left = 151
+ Top = 129
+ Width = 320
+ Height = 25
+ DataSource = DADataSource
+ ParentShowHint = False
+ ShowHint = True
+ TabOrder = 9
+ end
+ object cbUpdateviaRDA: TCheckBox
+ Left = 400
+ Top = 192
+ Width = 121
+ Height = 17
+ Caption = 'Update via RDA'
+ TabOrder = 10
+ end
+ object ROBINMessage: TROBinMessage
+ Left = 32
+ Top = 40
+ end
+ object ROWinInetHTTPChannel1: TROWinInetHTTPChannel
+ UserAgent = 'RemObjects SDK'
+ TargetURL = 'http://localhost:8099/BIN'
+ ServerLocators = <>
+ DispatchOptions = []
+ Left = 64
+ Top = 40
+ end
+ object DataStreamer: TDABin2DataStreamer
+ Left = 128
+ Top = 40
+ end
+ object DataTable: TDAMemDataTable
+ RemoteUpdatesOptions = []
+ Fields = <>
+ Params = <>
+ MasterMappingMode = mmDataRequest
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteDataAdapter = DARemoteDataAdapter
+ BeforeRefresh = DataTableBeforeRefresh
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ LogicalName = 'DynamicDataset'
+ IndexDefs = <>
+ Left = 32
+ Top = 80
+ end
+ object DADataSource: TDADataSource
+ DataSet = DataTable.Dataset
+ DataTable = DataTable
+ Left = 64
+ Top = 80
+ end
+ object svcDynSQLService: TRORemoteService
+ Message = ROBINMessage
+ Channel = ROWinInetHTTPChannel1
+ ServiceName = 'DynSQLService'
+ Left = 96
+ Top = 40
+ end
+ object DARemoteDataAdapter: TDARemoteDataAdapter
+ GetSchemaCall.RemoteService = svcDynSQLService
+ GetDataCall.RemoteService = svcDynSQLService
+ GetDataCall.MethodName = 'SQLGetData'
+ GetDataCall.Params = <
+ item
+ Name = 'Result'
+ DataType = rtBinary
+ Flag = fResult
+ Value = Null
+ end
+ item
+ Name = 'aSQLText'
+ DataType = rtString
+ Flag = fIn
+ Value = Null
+ end
+ item
+ Name = 'aIncludeSchema'
+ DataType = rtBoolean
+ Flag = fIn
+ Value = Null
+ end
+ item
+ Name = 'aMaxRecords'
+ DataType = rtInteger
+ Flag = fIn
+ Value = Null
+ end>
+ GetDataCall.Default = False
+ GetDataCall.OutgoingTableNamesParameter = 'aTableNameArray'
+ GetDataCall.OutgoingTableRequestInfosParameter = 'aTableRequestInfoArray'
+ GetDataCall.IncomingDataParameter = 'Result'
+ GetDataCall.OutgoingIncludeSchemaParameter = 'aIncludeSchema'
+ GetDataCall.OutgoingMaxRecordsParameter = 'aMaxRecords'
+ UpdateDataCall.RemoteService = svcDynSQLService
+ UpdateDataCall.MethodName = 'MyUpdateData'
+ UpdateDataCall.Params = <
+ item
+ Name = 'Result'
+ DataType = rtBinary
+ Flag = fResult
+ Value = Null
+ end
+ item
+ Name = 'aTableName'
+ DataType = rtString
+ Flag = fIn
+ Value = Null
+ end
+ item
+ Name = 'Delta'
+ DataType = rtBinary
+ Flag = fIn
+ Value = Null
+ end>
+ UpdateDataCall.Default = False
+ UpdateDataCall.OutgoingDeltaParameter = 'Delta'
+ UpdateDataCall.IncomingDeltaParameter = 'Result'
+ GetScriptsCall.RemoteService = svcDynSQLService
+ RemoteService = svcDynSQLService
+ DataStreamer = DataStreamer
+ Left = 98
+ Top = 80
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLMainClient.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLMainClient.pas
new file mode 100644
index 0000000..1172ee8
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLMainClient.pas
@@ -0,0 +1,151 @@
+unit DynSQLMainClient;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, uROWinInetHttpChannel, uROClient,
+ uROBINMessage, StdCtrls, Spin, uDADataTable,
+ DB, Grids, DBGrids, uRORemoteService,
+ uDAScriptingProvider, ExtCtrls, DBCtrls, uDARemoteDataAdapter,
+ uDADataStreamer, uDAInterfaces, uDABin2DataStreamer,
+ uDAMemDataTable;
+
+type
+ TDynSQLMainClientForm = class(TForm)
+ ROBINMessage: TROBINMessage;
+ ROWinInetHTTPChannel1: TROWinInetHTTPChannel;
+ Memo: TMemo;
+ seMaxRecs: TSpinEdit;
+ Label1: TLabel;
+ RetrieveSchema: TButton;
+ DataStreamer: TDABin2DataStreamer;
+ DataTable: TDAMemDataTable;
+ Grid: TDBGrid;
+ DADataSource: TDADataSource;
+ svcDynSQLService: TRORemoteService;
+ RetrieveData: TButton;
+ RetrieveSchemaAndData: TButton;
+ Save: TButton;
+ Load: TButton;
+ Update: TButton;
+ dbNavigator: TDBNavigator;
+ DARemoteDataAdapter: TDARemoteDataAdapter;
+ cbUpdateviaRDA: TCheckBox;
+ procedure RetrieveSchemaClick(Sender: TObject);
+ procedure RetrieveDataClick(Sender: TObject);
+ procedure RetrieveSchemaAndDataClick(Sender: TObject);
+ procedure SaveClick(Sender: TObject);
+ procedure LoadClick(Sender: TObject);
+ procedure UpdateClick(Sender: TObject);
+ procedure DataTableBeforeRefresh(DataTable: TDADataTable);
+ private
+ { Private declarations }
+ fSavedTablename: String;
+ procedure InitRDA(aIncludeSchema: Boolean; AMaxRecords: integer);
+ public
+ { Public declarations }
+ end;
+
+var
+ DynSQLMainClientForm: TDynSQLMainClientForm;
+
+implementation
+
+uses DynSQLLibrary_Intf, uROTypes, uDARemoteDataAdapterRequests, uRODL;
+
+{$R *.dfm}
+
+procedure TDynSQLMainClientForm.RetrieveSchemaClick(Sender: TObject);
+begin
+ InitRDA(True, 0);
+ DataTable.Close;
+end;
+
+procedure TDynSQLMainClientForm.RetrieveDataClick(Sender: TObject);
+begin
+ InitRDA(False, seMaxRecs.Value);
+end;
+
+procedure TDynSQLMainClientForm.RetrieveSchemaAndDataClick(Sender: TObject);
+begin
+ InitRDA(True, seMaxRecs.Value);
+end;
+
+procedure TDynSQLMainClientForm.SaveClick(Sender: TObject);
+begin
+ DataTable.SaveToFile(ExtractFilePath(Application.ExeName) + 'Data.dat');
+end;
+
+procedure TDynSQLMainClientForm.LoadClick(Sender: TObject);
+begin
+ DataTable.LoadFromFile(ExtractFilePath(Application.ExeName) + 'Data.dat');
+end;
+
+procedure TDynSQLMainClientForm.UpdateClick(Sender: TObject);
+var
+ deltadata, r: Binary;
+
+begin
+ if not DataTable.Active then begin
+ ShowMessage('Please open table');
+ Exit;
+ end;
+ if DataTable.Delta.Count=0 then begin
+ ShowMessage('No changes are found');
+ Exit;
+ end;
+ fSavedTablename:=InputBox('Enter table name','Please enter table name.'+sLineBreak+'Use an empty table name for fake update.',fSavedTablename);
+
+ if cbUpdateviaRDA.Checked then begin
+ DARemoteDataAdapter.UpdateDataCall.ParamByName('aTableName').AsString:= fSavedTablename;
+ DataTable.ApplyUpdates();
+ end
+ else begin
+ deltadata := Binary.Create;
+ try
+ // Packs the delta of the data table and sends it over.
+ DataStreamer.Initialize(deltadata, aiWrite);
+ try
+ DataStreamer.WriteDelta(DataTable);
+ finally
+ DataStreamer.Finalize;
+ end;
+
+ r:=(svcDynSQLService as IDynSQLService).MyUpdateData(fSavedTablename,deltadata);
+ try
+ DataTable.Delta.Clear();
+ DataStreamer.Initialize(r, aiReadFromBeginning);
+ try
+ DataStreamer.ReadDelta(DataStreamer.DeltaNames[0], DataTable.Delta);
+ finally
+ DataStreamer.Finalize;
+ end;
+ DataTable.MergeDelta;
+ finally
+ r.Free;
+ end;
+ finally
+ deltadata.Free;
+ end;
+ end;
+end;
+
+procedure TDynSQLMainClientForm.DataTableBeforeRefresh(DataTable: TDADataTable);
+begin
+ DaRemoteDataAdapter.GetDataCall.ParamByName('aSQLText').AsString := Memo.Lines.Text;
+end;
+
+procedure TDynSQLMainClientForm.InitRDA(aIncludeSchema: Boolean;
+ AMaxRecords: integer);
+begin
+ with DataTable do begin
+ Close;
+ DARemoteDataAdapter.GetDataCall.ParamByName('aSQLText').AsString := Memo.Lines.Text;
+ MaxRecords := AMaxRecords;
+ DARemoteDataAdapter.Fill([DataTable], true, aIncludeSchema);
+ end;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLServer.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLServer.bdsproj
new file mode 100644
index 0000000..233d818
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLServer.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {069B38C6-980B-4FAD-82DD-F4FCCB0A2F68}
+
+
+
+
+ DynSQLServer.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLServer.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLServer.dpr
new file mode 100644
index 0000000..f5094ec
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLServer.dpr
@@ -0,0 +1,21 @@
+program DynSQLServer;
+
+{#ROGEN:DynSQLLibrary.rodl} // RemObjects: Careful, do not remove!
+
+uses
+ uROCOMInit,
+ Forms,
+ DynSQLServerMain in 'DynSQLServerMain.pas' {DynSQLServerMainForm},
+ DynSQLLibrary_Intf in 'DynSQLLibrary_Intf.pas',
+ DynSQLLibrary_Invk in 'DynSQLLibrary_Invk.pas',
+ DynSQLService_Impl in 'DynSQLService_Impl.pas' {DynSQLService: TRORemoteDataModule};
+
+{$R *.RES}
+{$R RODLFile.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'DynSQL Server';
+ Application.CreateForm(TDynSQLServerMainForm, DynSQLServerMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLServer.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLServer.dproj
new file mode 100644
index 0000000..789dac4
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLServer.dproj
@@ -0,0 +1,77 @@
+
+
+ {2d78a543-7091-4d6f-9ce8-69b6915cef48}
+ DynSQLServer.dpr
+ Debug
+ AnyCPU
+ DCC32
+ DynSQLServer.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ DynSQLServer.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLServer.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLServer.res
new file mode 100644
index 0000000..7455d6e
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLServer.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLServerMain.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLServerMain.dfm
new file mode 100644
index 0000000..0836b67
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLServerMain.dfm
@@ -0,0 +1,89 @@
+object DynSQLServerMainForm: TDynSQLServerMainForm
+ Left = 285
+ Top = 181
+ AutoScroll = False
+ BorderWidth = 5
+ Caption = 'DynSQL Server'
+ ClientHeight = 221
+ ClientWidth = 413
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Form1'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ PixelsPerInch = 96
+ TextHeight = 14
+ object RoPoweredByRemObjectsButton1: TROPoweredByRemObjectsButton
+ Left = 0
+ Top = 0
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ end
+ object Memo: TMemo
+ Left = 0
+ Top = 54
+ Width = 413
+ Height = 167
+ Align = alBottom
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ Lines.Strings = (
+ 'SQL details generated for Update will be displayed here')
+ ReadOnly = True
+ ScrollBars = ssBoth
+ TabOrder = 0
+ end
+ object Button1: TButton
+ Left = 336
+ Top = 24
+ Width = 75
+ Height = 25
+ Anchors = [akTop, akRight]
+ Caption = 'Clear'
+ TabOrder = 1
+ OnClick = Button1Click
+ end
+ object ROMessage: TROBinMessage
+ Left = 256
+ end
+ object ROServer: TROIndyHTTPServer
+ Active = True
+ Dispatchers = <
+ item
+ Name = 'ROMessage'
+ Message = ROMessage
+ Enabled = True
+ PathInfo = 'BIN'
+ end>
+ Port = 8099
+ Left = 288
+ end
+ object DADriverManager: TDADriverManager
+ DriverDirectory = '%SYSTEM%\'
+ TraceActive = False
+ TraceFlags = []
+ Left = 320
+ end
+ object DAConnectionManager: TDAConnectionManager
+ Connections = <
+ item
+ Name = 'ADO'
+ ConnectionString =
+ 'ADO?Server=localhost;UserID=sa;AuxDriver=SQLOLEDB.1;Database=Nor' +
+ 'thwind;password=;'
+ Description = 'Borland ADOExpress Connection'
+ Default = True
+ end>
+ DriverManager = DADriverManager
+ PoolingEnabled = True
+ Left = 384
+ end
+ object DAADODriver: TDAADODriver
+ Left = 352
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLServerMain.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLServerMain.pas
new file mode 100644
index 0000000..d9ab672
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLServerMain.pas
@@ -0,0 +1,73 @@
+unit DynSQLServerMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ StdCtrls, uROClient, uROBINMessage, uROClientIntf, uROServer, uROIndyHTTPServer,
+ uROIndyTCPServer, uROPoweredByRemObjectsButton, SyncObjs,
+ uDAClasses, uDADriverManager, uDAEngine, uDAADODriver;
+
+type
+ TDynSQLServerMainForm = class(TForm)
+ ROMessage: TROBINMessage;
+ ROServer: TROIndyHTTPServer;
+ RoPoweredByRemObjectsButton1: TRoPoweredByRemObjectsButton;
+ DADriverManager: TDADriverManager;
+ DAConnectionManager: TDAConnectionManager;
+ DAADODriver: TDAADODriver;
+ Memo: TMemo;
+ Button1: TButton;
+ procedure FormCreate(Sender: TObject);
+ procedure FormDestroy(Sender: TObject);
+ procedure Button1Click(Sender: TObject);
+ private
+ { Private declarations }
+ CriticalSection: TCriticalSection;
+ public
+ { Public declarations }
+ procedure LOG(str: string);
+ end;
+
+var
+ DynSQLServerMainForm: TDynSQLServerMainForm;
+
+implementation
+
+{$R *.dfm}
+
+{ TDynSQLServerMainForm }
+
+procedure TDynSQLServerMainForm.LOG(str: string);
+begin
+ CriticalSection.Enter;
+ try
+ Memo.Lines.Add(str);
+ finally
+ CriticalSection.Leave;
+ end;
+end;
+
+procedure TDynSQLServerMainForm.FormCreate(Sender: TObject);
+begin
+ CriticalSection := TCriticalSection.Create;
+ Button1Click(Self);
+end;
+
+procedure TDynSQLServerMainForm.FormDestroy(Sender: TObject);
+begin
+ CriticalSection.Free;
+end;
+
+procedure TDynSQLServerMainForm.Button1Click(Sender: TObject);
+begin
+ CriticalSection.Enter;
+ try
+ Memo.Clear;
+ finally
+ CriticalSection.Leave;
+ end;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLService_Impl.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLService_Impl.dfm
new file mode 100644
index 0000000..46e9d93
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLService_Impl.dfm
@@ -0,0 +1,51 @@
+object DynSQLService: TDynSQLService
+ OldCreateOrder = True
+ ServiceSchema = Schema
+ ServiceDataStreamer = DataStreamer
+ AllowExecuteSQL = True
+ ExportedDataTables = <>
+ Left = 430
+ Top = 70
+ Height = 300
+ Width = 300
+ object DataStreamer: TDABin2DataStreamer
+ Left = 24
+ Top = 72
+ end
+ object Schema: TDASchema
+ ConnectionManager = DynSQLServerMainForm.DAConnectionManager
+ Datasets = <
+ item
+ Params = <>
+ Statements = <
+ item
+ Connection = 'ADO'
+ Default = True
+ Name = 'ADO'
+ StatementType = stSQL
+ ColumnMappings = <>
+ end>
+ Name = 'ReferencedDataset'
+ Fields = <>
+ end>
+ JoinDataTables = <>
+ UnionDataTables = <>
+ Commands = <>
+ RelationShips = <>
+ UpdateRules = <>
+ Version = 0
+ Left = 24
+ Top = 16
+ end
+ object BusinessProcessor: TDABusinessProcessor
+ OnAfterProcessChange = BusinessProcessorAfterProcessChange
+ OnProcessError = BusinessProcessorProcessError
+ OnGenerateSQL = BusinessProcessorGenerateSQL
+ Schema = Schema
+ ReferencedDataset = 'ReferencedDataset'
+ ProcessorOptions = [poAutoGenerateInsert, poAutoGenerateUpdate, poAutoGenerateDelete, poAutoGenerateRefreshDataset, poPrepareCommands]
+ UpdateMode = updWhereAll
+ Left = 24
+ Top = 120
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLService_Impl.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLService_Impl.pas
new file mode 100644
index 0000000..d14d724
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/DynSQLService_Impl.pas
@@ -0,0 +1,165 @@
+unit DynSQLService_Impl;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ This is where you are supposed to code the implementation of your objects. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils,
+ {RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
+ {Ancestor Implementation:} DataAbstractService_Impl,
+ {Used RODLs:} DataAbstract4_Intf, uDAInterfaces,
+ {Generated:} DynSQLLibrary_Intf, uDAClasses, uDADelta,
+ uDABin2DataStreamer, uDADataStreamer, uDAScriptingProvider,
+ uDABusinessProcessor;
+
+type
+ { TDynSQLService }
+ TDynSQLService = class(TDataAbstractService, IDynSQLService)
+ DataStreamer: TDABin2DataStreamer;
+ BusinessProcessor: TDABusinessProcessor;
+ Schema: TDASchema;
+ procedure BusinessProcessorGenerateSQL(Sender: TDABusinessProcessor;
+ ChangeType: TDAChangeType; const ReferencedStatement: TDAStatement;
+ const aDelta: IDADelta; var SQL: String);
+ procedure BusinessProcessorProcessError(Sender: TDABusinessProcessor;
+ aChangeType: TDAChangeType; aChange: TDADeltaChange;
+ const aCommand: IDASQLCommand; var CanRemoveFromDelta: Boolean;
+ Error: Exception);
+ procedure BusinessProcessorAfterProcessChange(
+ Sender: TDABusinessProcessor; aChange: TDADeltaChange;
+ Processed: Boolean; var CanRemoveFromDelta: Boolean);
+ private
+ procedure Log(aStr: string);
+ function _GetConnection: IDAConnection;
+ protected
+ function MyUpdateData(const aTableName: String; const Delta: Binary): Binary;
+ end;
+
+implementation
+
+{$R *.dfm}
+uses
+ {Generated:} DynSQLLibrary_Invk, DynSQLServerMain, Dialogs, TypInfo;
+
+procedure Create_DynSQLService(out anInstance: IUnknown);
+begin
+ anInstance := TDynSQLService.Create(nil);
+end;
+
+{ TDynSQLService }
+
+function TDynSQLService._GetConnection: IDAConnection;
+begin
+ Result := DynSQLServerMainForm.DAConnectionManager.NewConnection('ADO');
+end;
+
+procedure TDynSQLService.Log(aStr: string);
+begin
+ DynSQLServerMainForm.Log(aStr);
+end;
+
+function TDynSQLService.MyUpdateData(const aTableName: String; const Delta: Binary): Binary;
+var
+ conn: IDAConnection;
+ realdelta: IDADelta;
+ i: integer;
+ sql: string;
+ fOldDeltaname: string;
+begin
+ Log('');
+ Log('');
+ // Opens a connection
+ conn := _GetConnection;
+
+ // Creates a delta object
+ realdelta := NewDelta('tempDelta');
+
+ // Converts the binary stream we just received.
+ DataStreamer.Initialize(Delta, aiReadFromBeginning);
+ try
+ fOldDeltaname:=DataStreamer.DeltaNames[0];
+ DataStreamer.ReadDelta(DataStreamer.DeltaNames[0], realdelta);
+ finally
+ DataStreamer.Finalize;
+ end;
+
+ if (aTableName = '') or (realdelta.Count=0) then begin
+ // Builds a fake SQL string for updating and displays it
+ sql := 'Updating query "' + DataStreamer.DeltaNames[0] + '", fields ';
+
+ for i := 0 to (realdelta.LoggedFieldCount - 1) do
+ sql := sql + realdelta.LoggedFieldNames[i] + '(' + GetEnumName(TypeInfo(TDADataType), Ord(realdelta.LoggedFieldTypes[i])) + '), ';
+
+ sql := Copy(sql, 1, Length(sql) - 2);
+
+ Log(sql);
+ end
+ else begin
+ realDelta.LogicalName:= aTableName;
+ // setup of ReferencedDataset used in BP.ProcessDelta
+ with Schema.Datasets.DatasetByName(BusinessProcessor.ReferencedDataset),Statements[0] do begin
+ TargetTable:=aTableName;
+ ColumnMappings.Clear;
+ Fields.Clear;
+ for i:=0 to realdelta.LoggedFieldCount-1 do begin
+ Fields.Add(realdelta.LoggedFieldNames[i],realdelta.LoggedFieldTypes[i]);
+ with ColumnMappings.Add do begin
+ DatasetField:= realdelta.LoggedFieldNames[i];
+ TableField:= realdelta.LoggedFieldNames[i];
+ SQLOrigin:= realdelta.LoggedFieldNames[i];
+ end;
+ end;
+ end;
+ BusinessProcessor.ProcessDelta(conn,realdelta);
+ end;
+
+ Result:=Binary.Create;
+ realdelta.LogicalName:=fOldDeltaname;
+ DataStreamer.Initialize(Result, aiWrite);
+ try
+ DataStreamer.WriteDelta(realdelta);
+ finally
+ DataStreamer.Finalize;
+ end;
+end;
+
+procedure TDynSQLService.BusinessProcessorGenerateSQL(
+ Sender: TDABusinessProcessor; ChangeType: TDAChangeType;
+ const ReferencedStatement: TDAStatement; const aDelta: IDADelta;
+ var SQL: String);
+begin
+ Log('Generated SQL: '+SQL);
+end;
+
+procedure TDynSQLService.BusinessProcessorProcessError(
+ Sender: TDABusinessProcessor; aChangeType: TDAChangeType;
+ aChange: TDADeltaChange; const aCommand: IDASQLCommand;
+ var CanRemoveFromDelta: Boolean; Error: Exception);
+begin
+ Log('Error during processing change (RecID=' + IntToStr(aChange.RecID)+')');
+ Log(Error.Message);
+end;
+
+procedure TDynSQLService.BusinessProcessorAfterProcessChange(
+ Sender: TDABusinessProcessor; aChange: TDADeltaChange;
+ Processed: Boolean; var CanRemoveFromDelta: Boolean);
+begin
+ if Processed then
+ Log('Change (RecID=' + IntToStr(aChange.RecID) +') is processed')
+ else
+ Log('Change (RecID=' + IntToStr(aChange.RecID) +') isn''t processed');
+end;
+
+initialization
+ TROClassFactory.Create('DynSQLService', Create_DynSQLService, TDynSQLService_Invoker);
+
+finalization
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/RODLFILE.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/RODLFILE.res
new file mode 100644
index 0000000..746553e
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic SQL/RODLFILE.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere.Sample.html b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere.Sample.html
new file mode 100644
index 0000000..da1066f
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere.Sample.html
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+ Dynamic Where Sample
+
+
+
+Purpose
+
+ This example illustrates how work with the Dynamic Where .
+
+
+Getting Started
+
+ Build or compile both projects.
+ Launch the server (via the menu option: RemObjects | Launch Server Executable ).
+ Ensure that DynamicWhereClient is the selected project and run it.
+ Create a few conditions and apply them.
+ Examine pascal code which you can be applied at runtime and the xml code generated
+ by the DynamicWhere.
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere.bpg b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere.bpg
new file mode 100644
index 0000000..0a914f1
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere.bpg
@@ -0,0 +1,23 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = DynWhere_Server.exe DynWhere_Client.exe
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+DynWhere_Server.exe: DynWhere_Server.dpr
+ $(DCC)
+
+DynWhere_Client.exe: DynWhere_Client.dpr
+ $(DCC)
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere.groupproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere.groupproj
new file mode 100644
index 0000000..7b0c875
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere.groupproj
@@ -0,0 +1,44 @@
+
+
+ {efdbc0b3-3cba-4a73-9888-3efa9fa82a97}
+
+
+
+
+
+
+
+ Default.Personality
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_Client.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_Client.dpr
new file mode 100644
index 0000000..d7403c8
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_Client.dpr
@@ -0,0 +1,20 @@
+program DynWhere_Client;
+
+uses
+ uROComInit,
+ Forms,
+ MidasLib,
+ DynWhere_ClientMain in 'DynWhere_ClientMain.pas' {DynWhere_ClientForm},
+ DynWhere_ClientData in 'DynWhere_ClientData.pas' {DynWhere_ClientDataForm: TDAClientDataModule},
+ memoForm in 'memoForm.pas' {frmMemo},
+ WhereExpression in 'WhereExpression.pas' {WhereExpressionForm};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'Dynamic Where - Client';
+ Application.CreateForm(TDynWhere_ClientDataForm, DynWhere_ClientDataForm);
+ Application.CreateForm(TDynWhere_ClientForm, DynWhere_ClientForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_Client.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_Client.dproj
new file mode 100644
index 0000000..d6cc0bb
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_Client.dproj
@@ -0,0 +1,219 @@
+
+
+ {32915d98-851f-4ad4-b94c-2f0ce6942b73}
+ DynWhere_Client.dpr
+ Debug
+ AnyCPU
+ DCC32
+ DynWhere_Client.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1049
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Core Lab Data Access GUI related Components
+ Core Lab Data Access Components
+ Data Access Components for MySQL
+ MySQL Data Access GUI related Components
+ Oracle Data Access Components
+ Oracle Data Access GUI related Components
+ SQL Server Data Access Components
+ SQL Server Data Access GUI related Components
+ RemObjects Data Abstract - InterBase Express Driver
+ RemObjects Data Abstract - Scripting Integration Library
+ RemObjects Data Abstract - dbExpress Driver
+ RemObjects Data Abstract - SQLite Driver
+ RemObjects Data Abstract - DBISAM Driver
+ RemObjects Data Abstract - ElevateDB Driver
+ RemObjects Data Abstract - FIBPlus Driver
+ RemObjects Data Abstract - CoreLabs IBDAC Driver
+ RemObjects Data Abstract - CoreLabs MyDAC Driver
+ Data Abstract - NexusDB Driver
+ RemObjects Data Abstract - CoreLabs ODAC Driver
+ RemObjects Data Abstract - MicroOlap PostgresDAC Driver
+ RemObjects Data Abstract - 'Rosetta'
+ RemObjects Data Abstract - CoreLabs SDAC Driver
+ CodeGear C++Builder Office XP Servers Package
+ Microsoft Office 2000 Sample Automation Server Wrapper Components
+ Microsoft Office XP Sample Automation Server Wrapper Components
+ Core Lab InterBase Data Access Components
+ Data Access Components for MySQL - TMySQLMonitor
+
+
+ DynWhere_Client.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+ TDAClientDataModule
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_Client.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_Client.res
new file mode 100644
index 0000000..cc22935
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_Client.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_ClientData.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_ClientData.dfm
new file mode 100644
index 0000000..63c6f90
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_ClientData.dfm
@@ -0,0 +1,60 @@
+object DynWhere_ClientDataForm: TDynWhere_ClientDataForm
+ OldCreateOrder = True
+ OnCreate = DataModuleCreate
+ Left = 439
+ Top = 220
+ Height = 300
+ Width = 300
+ object Channel: TROWinInetHTTPChannel
+ UserAgent = 'RemObjects SDK'
+ TargetURL = 'http://localhost:8099/BIN'
+ ServerLocators = <>
+ DispatchOptions = []
+ Left = 40
+ Top = 8
+ end
+ object Message: TROBinMessage
+ Left = 40
+ Top = 52
+ end
+ object RemoteService: TRORemoteService
+ Message = Message
+ Channel = Channel
+ ServiceName = 'DynWhere_Service'
+ Left = 40
+ Top = 96
+ end
+ object DataStreamer: TDABin2DataStreamer
+ Left = 40
+ Top = 140
+ end
+ object RemoteDataAdapter: TDARemoteDataAdapter
+ GetSchemaCall.RemoteService = RemoteService
+ GetDataCall.RemoteService = RemoteService
+ UpdateDataCall.RemoteService = RemoteService
+ GetScriptsCall.RemoteService = RemoteService
+ RemoteService = RemoteService
+ DataStreamer = DataStreamer
+ Left = 40
+ Top = 184
+ end
+ object tbl_Data: TDAMemDataTable
+ RemoteUpdatesOptions = []
+ Fields = <>
+ Params = <>
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteDataAdapter = RemoteDataAdapter
+ LocalDataStreamer = DataStreamer
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ LogicalName = 'Employees'
+ Left = 136
+ Top = 24
+ end
+ object ds_Data: TDADataSource
+ DataSet = tbl_Data.Dataset
+ DataTable = tbl_Data
+ Left = 136
+ Top = 80
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_ClientData.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_ClientData.pas
new file mode 100644
index 0000000..5dec311
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_ClientData.pas
@@ -0,0 +1,39 @@
+unit DynWhere_ClientData;
+
+interface
+
+uses
+ {vcl:} SysUtils, Classes, DB, DBClient,
+ {RemObjects:} uROClient, uROClientIntf, uRORemoteService, uROBinMessage, uROWinInetHTTPChannel,
+ {Data Abstract:} uDADataTable, uDABin2DataStreamer, uDAInterfaces, uDARemoteDataAdapter,
+ uDADataStreamer, uDAScriptingProvider, uDAMemDataTable;
+
+type
+ TDynWhere_ClientDataForm = class(TDataModule)
+ Message: TROBinMessage;
+ Channel: TROWinInetHTTPChannel;
+ RemoteService: TRORemoteService;
+ DataStreamer: TDABin2DataStreamer;
+ RemoteDataAdapter: TDARemoteDataAdapter;
+ tbl_Data: TDAMemDataTable;
+ ds_Data: TDADataSource;
+ procedure DataModuleCreate(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ DynWhere_ClientDataForm: TDynWhere_ClientDataForm;
+
+implementation
+
+{$R *.dfm}
+
+procedure TDynWhere_ClientDataForm.DataModuleCreate(Sender: TObject);
+begin
+ RemoteDataAdapter.SetupDefaultRequest;
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_ClientMain.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_ClientMain.dfm
new file mode 100644
index 0000000..0a95281
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_ClientMain.dfm
@@ -0,0 +1,641 @@
+object DynWhere_ClientForm: TDynWhere_ClientForm
+ Left = 329
+ Top = 175
+ AutoScroll = False
+ Caption = 'Dynamic Where Client'
+ ClientHeight = 442
+ ClientWidth = 700
+ Color = clBtnFace
+ Constraints.MinHeight = 478
+ Constraints.MinWidth = 640
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Panel1: TPanel
+ Left = 0
+ Top = 0
+ Width = 700
+ Height = 201
+ Align = alTop
+ BevelOuter = bvNone
+ TabOrder = 0
+ object Panel2: TPanel
+ Left = 0
+ Top = 0
+ Width = 233
+ Height = 201
+ Align = alLeft
+ BevelOuter = bvNone
+ TabOrder = 1
+ object DAPoweredByDataAbstractButton1: TDAPoweredByDataAbstractButton
+ Left = 8
+ Top = 8
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ end
+ object btnOpenClose: TButton
+ Left = 16
+ Top = 72
+ Width = 75
+ Height = 25
+ Caption = 'Open'
+ TabOrder = 0
+ OnClick = btnOpenCloseClick
+ end
+ object btnXML: TButton
+ Left = 16
+ Top = 112
+ Width = 75
+ Height = 25
+ Caption = 'Show XML'
+ TabOrder = 1
+ Visible = False
+ OnClick = btnXMLClick
+ end
+ object btnDelphi: TButton
+ Left = 16
+ Top = 152
+ Width = 75
+ Height = 25
+ Caption = 'Delphi Code'
+ TabOrder = 2
+ Visible = False
+ OnClick = btnDelphiClick
+ end
+ end
+ object Pan_Cond: TPanel
+ Left = 233
+ Top = 0
+ Width = 467
+ Height = 201
+ Align = alClient
+ BevelOuter = bvNone
+ TabOrder = 0
+ Visible = False
+ object panSet: TPanel
+ Left = 0
+ Top = 0
+ Width = 467
+ Height = 25
+ Align = alTop
+ BevelOuter = bvNone
+ Caption =
+ 'Set Values for appropriated fields and click Open/Refresh button' +
+ ':'
+ TabOrder = 0
+ end
+ object Panel4: TPanel
+ Left = 0
+ Top = 25
+ Width = 467
+ Height = 151
+ Align = alClient
+ BevelOuter = bvNone
+ TabOrder = 1
+ object lbOper: TListBox
+ Left = 0
+ Top = 0
+ Width = 416
+ Height = 151
+ Align = alClient
+ ItemHeight = 13
+ TabOrder = 0
+ OnClick = lbOperClick
+ OnDblClick = lbOperDblClick
+ OnKeyDown = lbOperKeyDown
+ end
+ object Panel5: TPanel
+ Left = 416
+ Top = 0
+ Width = 51
+ Height = 151
+ Align = alRight
+ BevelOuter = bvNone
+ TabOrder = 1
+ object ToolBar1: TToolBar
+ Left = 0
+ Top = 0
+ Width = 27
+ Height = 151
+ Align = alLeft
+ AutoSize = True
+ ButtonHeight = 24
+ Caption = 'ToolBar1'
+ EdgeInner = esNone
+ EdgeOuter = esNone
+ Images = ImageList1
+ Indent = 4
+ ParentShowHint = False
+ ShowHint = True
+ TabOrder = 0
+ Wrapable = False
+ object tbCondNew: TToolButton
+ Left = 4
+ Top = 2
+ Action = aCondNew
+ Wrap = True
+ end
+ object TToolButton
+ Left = 4
+ Top = 26
+ Action = aCondEdit
+ Wrap = True
+ end
+ object TToolButton
+ Left = 4
+ Top = 50
+ Action = aCondDelete
+ Wrap = True
+ end
+ object TToolButton
+ Left = 4
+ Top = 74
+ Action = aCondUp
+ Wrap = True
+ end
+ object TToolButton
+ Left = 4
+ Top = 98
+ Action = aCondDown
+ Wrap = True
+ end
+ end
+ end
+ end
+ object Panel6: TPanel
+ Left = 0
+ Top = 176
+ Width = 467
+ Height = 25
+ Align = alBottom
+ BevelOuter = bvNone
+ Caption = 'All logical operators have equal precedence!'
+ TabOrder = 2
+ end
+ end
+ end
+ object DBGrid: TDBGrid
+ Left = 0
+ Top = 201
+ Width = 700
+ Height = 241
+ Align = alClient
+ DataSource = DynWhere_ClientDataForm.ds_Data
+ TabOrder = 1
+ TitleFont.Charset = DEFAULT_CHARSET
+ TitleFont.Color = clWindowText
+ TitleFont.Height = -11
+ TitleFont.Name = 'MS Sans Serif'
+ TitleFont.Style = []
+ end
+ object CondActionList: TActionList
+ Images = ImageList1
+ Left = 337
+ Top = 49
+ object aCondEdit: TAction
+ Caption = 'Edit'
+ Hint = 'Edit'
+ ImageIndex = 2
+ OnExecute = aCondEditExecute
+ end
+ object aCondNew: TAction
+ Caption = 'aCondNew'
+ Hint = 'New'
+ ImageIndex = 0
+ OnExecute = aCondNewExecute
+ end
+ object aCondDelete: TAction
+ Caption = 'aCondDelete'
+ Hint = 'Delete'
+ ImageIndex = 1
+ OnExecute = aCondDeleteExecute
+ end
+ object aCondUp: TAction
+ Caption = 'aCondUp'
+ Hint = 'Up'
+ ImageIndex = 3
+ OnExecute = aCondUpExecute
+ end
+ object aCondDown: TAction
+ Caption = 'aCondDown'
+ Hint = 'Down'
+ ImageIndex = 4
+ OnExecute = aCondDownExecute
+ end
+ end
+ object ImageList1: TImageList
+ Left = 425
+ Top = 57
+ Bitmap = {
+ 494C010108000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
+ 0000000000003600000028000000400000003000000001002000000000000030
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000848400000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000808000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000084840000848400008484000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000808080000000
+ 000000000000808000000000000000000000C0C0C00000000000000000000000
+ 000080808000000000000000000000000000008080000000000000000000C0C0
+ C000000000000000000000000000000000008080800000000000000000000000
+ 00000000000000000000000000000080800000000000C0C0C00000000000C0C0
+ C000000000000000000080808000000000000000000080800000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000008484000084840000848400008484000084840000000000000000
+ 00000000000000000000000000000000000000000000C0C0C000000000000000
+ 00000000000000000000C0C0C00000000000C0C0C00000000000000000000000
+ 000000000000000000000000000000000000C0C0C00000000000000000000000
+ 0000C0C0C0000000000000000000C0C0C00000000000C0C0C000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000C0C0C00000000000000000000000000000000000C0C0C0000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000848400008484000084840000848400008484000084840000848400000000
+ 0000000000000000000000000000000000000000000000000000C0C0C0000000
+ 000000000000C0C0C0000000000000000000C0C0C00000000000000000000000
+ 0000C0C0C0000000000000000000000000000000000000000000C0C0C0000000
+ 000000000000000000000000000000000000C0C0C000C0C0C000000000000000
+ 00000000000000000000000000000000000000000000C0C0C00000000000C0C0
+ C0000000000000000000C0C0C0000000000000000000C0C0C000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000084840000848400008484000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000C0C0C0000000
+ 000000000000C0C0C0000000000000000000C0C0C00000000000000000000000
+ 0000800000000000000000000000000000000000000080808000000000008080
+ 80000000000000000000000000008080800000000000C0C0C000000000000000
+ 00000000000000000000000000000080800000000000C0C0C00080008000C0C0
+ C0000000000000000000C0C0C0000000000000000000C0C0C000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000084840000848400008484000000000000000000000000
+ 00000000000000000000000000000000000000000000C0C0C000000000000000
+ 00000000000000000000C0C0C00000000000C0C0C00000000000000000000000
+ 000000000000C0C0C000000000000000000000000000C0C0C00000000000C0C0
+ C0000000000000000000000000000000000000000000C0C0C000000000000000
+ 0000000000000000000000000000000000000000000000000000C0C0C0000000
+ 000000000000C0C0C00000000000000000000000000000000000C0C0C0000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000084840000848400008484000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000808080000000
+ 000000000000808000000000000000000000C0C0C00000000000000000000000
+ 0000800000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000008080800000000000C0C0
+ C000000000000000000080808000000000000000000080800000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000084840000848400008484000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000848484008484
+ 8400848484008484840084848400848484008484840084848400848484008484
+ 8400848484008484840084848400848484000000000000000000848484008484
+ 8400848484008484840084848400848484008484840084848400848484008484
+ 8400848484008484840084848400848484000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000848484000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000008484840000000000FFFFFF00FFFFFF00FFFF
+ FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000FFFFFF0000FF
+ FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00000000000000
+ 0000FFFFFF0000FFFF0000000000848484000000000000000000FFFFFF0000FF
+ FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00000000000000
+ 0000FFFFFF0000FFFF00000000008484840000000000FFFFFF00000000000000
+ 0000FFFFFF000000000000000000000000000000000000000000FFFFFF000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000000000000FFFF00FFFF
+ FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000000000C6C6
+ C60000000000FFFFFF000000000084848400848484000000000000FFFF00FFFF
+ FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000000000C6C6
+ C60000000000FFFFFF00000000008484840000000000FFFFFF00FFFFFF00FFFF
+ FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000FFFFFF0000FF
+ FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF000000000000FF
+ FF00C6C6C6000000000000000000848484000000840000000000FFFFFF0000FF
+ FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF000000000000FF
+ FF00C6C6C60000000000000000008484840000000000FFFFFF00000000000000
+ 0000FFFFFF000000000000000000000000000000000000000000FFFFFF000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000084840000848400008484000000000000000000000000
+ 000000000000000000000000000000000000000000000000000000FFFF00FFFF
+ FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00000000000000
+ 000000000000000000000000000084848400000084000000840000FFFF00FFFF
+ FF0000FFFF00FFFFFF00848484000000840000FFFF00FFFFFF00000000000000
+ 00000000000000000000000000008484840000000000FFFFFF00FFFFFF00FFFF
+ FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000084840000848400008484000000000000000000000000
+ 000000000000000000000000000000000000FFFFFF0000000000FFFFFF008484
+ 840000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF0000FFFF00FFFFFF0000FF
+ FF00FFFFFF0000FFFF00000000008484840084848400000084008484840000FF
+ FF00FFFFFF00848484000000840084848400FFFFFF0000FFFF00FFFFFF0000FF
+ FF00FFFFFF0000FFFF00000000008484840000000000FFFFFF00FFFFFF00FFFF
+ FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000084840000848400008484000000000000000000000000
+ 0000000000000000000000000000000000008484840000FFFF0000FFFF008484
+ 8400FFFFFF0000FFFF008484840000FFFF00FFFFFF00FFFFFF0000FFFF00FFFF
+ FF0000FFFF00FFFFFF0000000000848484000000000000008400000084008484
+ 840000FFFF000000840000008400FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF
+ FF0000FFFF00FFFFFF00000000008484840000000000FFFFFF00000000000000
+ 0000FFFFFF00FFFFFF00FFFFFF0000000000C6C6C60000000000FFFFFF000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000084840000848400008484000000000000000000000000
+ 0000000000000000000000000000000000000000000084848400FFFFFF008484
+ 840000FFFF008484840000FFFF00FFFFFF0000FFFF0000FFFF00FFFFFF0000FF
+ FF00FFFFFF0000FFFF0000000000848484000000000084848400000084000000
+ 84000000840000008400FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF
+ FF00FFFFFF0000FFFF00000000008484840000000000FFFFFF0000000000C6C6
+ C60000000000FFFFFF0000000000C6C6C60000000000C6C6C600000000000000
+ 0000000000000000000084000000840000000000000000000000000000000000
+ 0000848400008484000084840000848400008484000084840000848400000000
+ 000000000000000000000000000000000000848484008484840084848400FFFF
+ FF0084848400FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF
+ FF0000FFFF00FFFFFF0000000000848484000000000084848400000084000000
+ 840000008400FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF
+ FF0000FFFF00FFFFFF00000000008484840000000000FFFFFF00FFFFFF000000
+ 0000C6C6C60000000000C6C6C60000000000C6C6C60000000000C6C6C600C6C6
+ C600C6C6C6000000000084000000840000000000000000000000000000000000
+ 0000000000008484000084840000848400008484000084840000000000000000
+ 000000000000000000000000000000000000FFFFFF0000FFFF008484840000FF
+ FF00FFFFFF008484840084848400848484008484840000000000000000000000
+ 0000000000000000000000000000000000008484840000008400000084000000
+ 8400000084008484840000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000C6C6C60000000000C6C6C60000000000C6C6C600C6C6C600C6C6
+ C600C6C6C600C6C6C60084000000840000000000000000000000000000000000
+ 0000000000000000000084840000848400008484000000000000000000000000
+ 000000000000000000000000000000000000000000008484840000FFFF008484
+ 840000FFFF008484840000FFFF00000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000840000008400848484000000
+ 0000000084000000840084848400000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000C6C6C60000000000C6C6C600C6C6C600C6C6C600C6C6
+ C600C6C6C600C6C6C60084000000840000000000000000000000000000000000
+ 0000000000000000000000000000848400000000000000000000000000000000
+ 0000000000000000000000000000000000008484840000FFFF00000000008484
+ 8400FFFFFF00000000008484840000FFFF000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000840000008400848484000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000C6C6C600C6C6C600C6C6C600C6C6C600C6C6
+ C600C6C6C6000000000084000000840000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000FFFF0000000000000000008484
+ 840000FFFF000000000000000000848484000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000008400000084008484840000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000084000000840000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000008484
+ 8400FFFFFF000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000424D3E000000000000003E000000
+ 2800000040000000300000000100010000000000800100000000000000000000
+ 000000000000000000000000FFFFFF0000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC7FFFFF7591FFFF
+ F83FC33325162436F01F99370416A996E00F99278C168995C00799078C968991
+ F83F99338D918996F83FC307FFFF2431F83FFFFFFFFFFFFFF83FFFFFFFFFFFFF
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC000C000000FFFFF
+ 80008000000FFFFF80008000000FFFFF80000000000FF83F80000000000FF83F
+ 80000000000FF83F00000000000FF83F00008000000FC007800080000004E00F
+ 000080000000F01F000100010000F83F81FF11FFF800FC7F24FFF8FFFC00FEFF
+ 66FFFC7FFE04FFFFE7FFFFFFFFFFFFFF00000000000000000000000000000000
+ 000000000000}
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_ClientMain.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_ClientMain.pas
new file mode 100644
index 0000000..c5400c1
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_ClientMain.pas
@@ -0,0 +1,498 @@
+unit DynWhere_ClientMain;
+
+interface
+
+uses
+ Forms, StdCtrls, Controls, Grids, DBGrids, Classes, ExtCtrls,
+ ActnList, Buttons, ImgList, ComCtrls, ToolWin, Menus,
+ uROPoweredByRemObjectsButton,
+ uDAPoweredByDataAbstractButton,
+ uDAInterfaces
+ ;
+
+type
+ TFldOperator = record
+ FldName: string;
+ LogOper: TDABinaryOperator;
+ Oper: TDABinaryOperator;
+ Value: variant;
+ end;
+
+ TDynWhere_ClientForm = class(TForm)
+ Panel1: TPanel;
+ DBGrid: TDBGrid;
+ Panel2: TPanel;
+ DAPoweredByDataAbstractButton1: TDAPoweredByDataAbstractButton;
+ btnOpenClose: TButton;
+ Pan_Cond: TPanel;
+ panSet: TPanel;
+ btnXML: TButton;
+ Panel4: TPanel;
+ lbOper: TListBox;
+ Panel5: TPanel;
+ Panel6: TPanel;
+ CondActionList: TActionList;
+ aCondEdit: TAction;
+ aCondNew: TAction;
+ aCondDelete: TAction;
+ aCondUp: TAction;
+ ImageList1: TImageList;
+ ToolBar1: TToolBar;
+ aCondDown: TAction;
+ tbCondNew: TToolButton;
+ btnDelphi: TButton;
+ procedure btnXMLClick(Sender: TObject);
+ procedure btnOpenCloseClick(Sender: TObject);
+ procedure lbOperDblClick(Sender: TObject);
+ procedure aCondEditExecute(Sender: TObject);
+ procedure aCondNewExecute(Sender: TObject);
+ procedure aCondDeleteExecute(Sender: TObject);
+ procedure aCondUpExecute(Sender: TObject);
+ procedure aCondDownExecute(Sender: TObject);
+ procedure lbOperKeyDown(Sender: TObject; var Key: Word;
+ Shift: TShiftState);
+ procedure btnDelphiClick(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ procedure lbOperClick(Sender: TObject);
+ private
+ { Private declarations }
+ fExpression: array of TFldOperator;
+ fXML: string;
+ fDelphiCode: string;
+ procedure CheckEditButtons();
+ procedure RebuildCondList();
+ function GetXML(): string;
+ public
+ { Public declarations }
+ end;
+
+var
+ DynWhere_ClientForm: TDynWhere_ClientForm;
+
+implementation
+
+uses
+ Windows, SysUtils, Variants, TypInfo,
+ uDADataTable, uDASQL92QueryBuilder,
+ DynWhere_ClientData, memoForm, WhereExpression;
+
+{$R *.dfm}
+
+const
+ c_Invalid_XML = '*';
+
+procedure TDynWhere_ClientForm.FormCreate(Sender: TObject);
+begin
+ fXML := c_Invalid_XML;
+ ActiveControl := btnOpenClose;
+end;
+
+procedure TDynWhere_ClientForm.btnOpenCloseClick(Sender: TObject);
+var
+ Tbl: TDADataTable;
+ OldCur: TCursor;
+ XML: string;
+begin
+ OldCur := Screen.Cursor;
+
+ try
+ Screen.Cursor := crHourGlass;
+ Tbl := DynWhere_ClientDataForm.tbl_Data;
+
+ if Pan_Cond.Visible then
+ begin
+ Tbl.Active := False;
+ XML := GetXML();
+
+ if XML = '' then
+ Tbl.DynamicWhere.Clear()
+ else
+ Tbl.DynamicWhere.Xml := GetXML();
+
+ Tbl.Active := True;
+ end
+ else
+ begin
+ Tbl.Active := True;
+ Pan_Cond.Visible := True;
+ btnOpenClose.Caption := 'Refresh';
+ btnXML.Visible := True;
+ btnDelphi.Visible := True;
+ end;
+
+ ActiveControl := lbOper;
+ CheckEditButtons();
+ finally
+ Screen.Cursor := OldCur;
+ end;
+end;
+
+procedure TDynWhere_ClientForm.btnXMLClick(Sender: TObject);
+begin
+ TfrmMemo.Execute('XML pass to Server', GetXML(), True);
+end;
+
+procedure TDynWhere_ClientForm.lbOperDblClick(Sender: TObject);
+begin
+ aCondEdit.Execute();
+end;
+
+procedure TDynWhere_ClientForm.lbOperClick(Sender: TObject);
+begin
+ CheckEditButtons();
+end;
+
+procedure TDynWhere_ClientForm.aCondEditExecute(Sender: TObject);
+var
+ i: integer;
+begin
+ i := integer(lbOper.Items.Objects[lbOper.ItemIndex]);
+
+ if TWhereExpressionForm.Execute(DynWhere_ClientDataForm.tbl_Data.Fields,
+ fExpression[i].FldName, fExpression[i].LogOper,
+ fExpression[i].Oper, fExpression[i].Value) then
+ RebuildCondList();
+end;
+
+procedure TDynWhere_ClientForm.aCondNewExecute(Sender: TObject);
+var
+ FldName: string;
+ LogOper, Oper: TDABinaryOperator;
+ Value: variant;
+ i: integer;
+begin
+ if TWhereExpressionForm.Execute(DynWhere_ClientDataForm.tbl_Data.Fields,
+ FldName, LogOper, Oper, Value) then
+ begin
+ SetLength(fExpression, Length(fExpression) + 1);
+ i := High(fExpression);
+ fExpression[i].FldName := FldName;
+ fExpression[i].LogOper := LogOper;
+ fExpression[i].Oper := Oper;
+ fExpression[i].Value := Value;
+ RebuildCondList();
+ lbOper.ItemIndex := lbOper.Items.Count - 1;
+ CheckEditButtons();
+ end;
+end;
+
+procedure TDynWhere_ClientForm.aCondDeleteExecute(Sender: TObject);
+var
+ i, ii: integer;
+begin
+ ii := lbOper.ItemIndex;
+
+ if ii >= 0 then
+ begin
+ ii := integer(lbOper.Items.Objects[ii]);
+
+ for i := ii + 1 to High(fExpression) do
+ fExpression[i - 1] := fExpression[i];
+
+ SetLength(fExpression, Length(fExpression) - 1);
+ RebuildCondList();
+ end;
+end;
+
+procedure TDynWhere_ClientForm.aCondUpExecute(Sender: TObject);
+var
+ i: integer;
+ Oper: TFldOperator;
+begin
+ i := integer(lbOper.Items.Objects[lbOper.ItemIndex]);
+ Oper := fExpression[i];
+ fExpression[i] := fExpression[i - 1];
+ fExpression[i - 1] := Oper;
+ lbOper.ItemIndex := i - 1;
+ RebuildCondList();
+end;
+
+procedure TDynWhere_ClientForm.aCondDownExecute(Sender: TObject);
+var
+ i: integer;
+ Oper: TFldOperator;
+begin
+ i := integer(lbOper.Items.Objects[lbOper.ItemIndex]);
+ Oper := fExpression[i];
+ fExpression[i] := fExpression[i + 1];
+ fExpression[i + 1] := Oper;
+ lbOper.ItemIndex := i + 1;
+ RebuildCondList();
+end;
+
+procedure TDynWhere_ClientForm.CheckEditButtons();
+var
+ ii: integer;
+begin
+ ii := lbOper.ItemIndex;
+ aCondUp.Enabled := (ii > 0);
+ aCondDown.Enabled := (ii >= 0) and (ii < (lbOper.Items.Count - 1));
+ aCondEdit.Enabled := (ii >= 0);
+ aCondDelete.Enabled := (ii >= 0);
+ btnXML.Enabled := (lbOper.Items.Count > 0);
+end;
+
+procedure TDynWhere_ClientForm.RebuildCondList();
+ function Val2Str(const FldName: string; const Val: variant; IsList: Boolean): string;
+ var
+ DT: TDADataType;
+ Lst: TStrings;
+ i: integer;
+ begin
+ if IsList then
+ begin
+ Result := '';
+ Lst := TStringList.Create();
+
+ try
+ Lst.CommaText := string(Val);
+ for i := 0 to Lst.Count - 1 do
+ if Result = '' then
+ Result := Val2Str(FldName, Lst[i], False)
+ else
+ Result := Result + ',' + Val2Str(FldName, Lst[i], False);
+ finally
+ Lst.Free();
+ end;
+ end
+ else
+ begin
+ DT := DynWhere_ClientDataForm.tbl_Data.FieldByName(FldName).DataType;
+
+ if DT = datDateTime then
+ if VarType(Val) = varString then
+ Result := '''' + Val + ''''
+ else
+ Result := '''' + DateTimeToStr(Val) + ''''
+ else
+ if DT in [datString, datWideString, datMemo, datWideMemo] then
+ Result := '''' + Val + ''''
+ else
+ Result := Val;
+ end;
+ end;
+const
+ c_Oper: array[TDABinaryOperator] of string =
+ ('AND', 'OR', 'XOR', '<', '<=', '>', '>=', '!=', '=', 'like', 'in', '+', '-', '*', '/');
+var
+ i, ii: integer;
+ sOper, sValue: string;
+begin
+ fXML := c_Invalid_XML;
+ ii := lbOper.ItemIndex;
+ lbOper.Items.BeginUpdate;
+
+ try
+ lbOper.Items.Clear;
+
+ for i := Low(fExpression) to High(fExpression) do
+ begin
+ if fExpression[i].Oper = dboIn then
+ sValue := Format('in (%s)', [Val2Str(fExpression[i].FldName, fExpression[i].Value, True)])
+ else
+ if VarIsNULL(fExpression[i].Value) then
+ if fExpression[i].Oper = dboEqual then
+ sValue := 'is NULL'
+ else
+ sValue := 'is not NULL'
+ else
+ sValue := c_Oper[fExpression[i].Oper] + ' ' +
+ Val2Str(fExpression[i].FldName, fExpression[i].Value, False);
+
+ sOper := c_Oper[fExpression[i].LogOper];
+
+ if lbOper.Items.Count = 0 then
+ sOper := '/* ' + sOper + ' */';
+
+ lbOper.Items.AddObject(Format('%s %s %s',
+ [sOper, fExpression[i].FldName, sValue]),
+ TObject(i));
+ end;
+ finally
+ lbOper.Items.EndUpdate;
+ end;
+
+ if ii >= lbOper.Items.Count then
+ ii := lbOper.Items.Count - 1;
+
+ lbOper.ItemIndex := ii;
+ CheckEditButtons();
+end;
+
+procedure TDynWhere_ClientForm.lbOperKeyDown(Sender: TObject;
+ var Key: Word; Shift: TShiftState);
+begin
+ if Key = VK_INSERT then
+ aCondNew.Execute()
+ else if Key = VK_DELETE then
+ aCondDelete.Execute()
+ else if (Key = VK_F2) or (Key = VK_RETURN) then
+ aCondEdit.Execute()
+ else if (Shift = [ssCtrl]) and (Key = VK_UP) then
+ aCondUp.Execute()
+ else if (Shift = [ssCtrl]) and (Key = VK_DOWN) then
+ aCondDown.Execute();
+end;
+
+procedure TDynWhere_ClientForm.btnDelphiClick(Sender: TObject);
+begin
+ GetXML();
+ TfrmMemo.Execute('Delphi Code', fDelphiCode, False);
+end;
+
+function TDynWhere_ClientForm.GetXML(): string;
+var
+ i, j: integer;
+ L, R, Where, Expr: TDAWhereExpression;
+ Lst: TStrings;
+ aExpr: array of TDAWhereExpression;
+ DT: TDADataType;
+ NeedNot: Boolean;
+ LogOper: TDABinaryOperator;
+ WB: TDAWhereBuilder;
+ Log: TStrings;
+ S: string;
+
+ function sMake_Const(const V: variant): string;
+ begin
+ if VarIsNULL(V) then
+ Result := 'NewNull()'
+ else
+ begin
+ if DT = datDateTime then
+ if VarType(V) = varString then
+ Result := Format('StrToDateTime(''%s'')', [string(V)])
+ else
+ Result := Format('StrToDateTime(''%s'')', [DateToStr(V)])
+ else
+ if DT in [datString, datWideString, datMemo, datWideMemo] then
+ Result := Format('''%s''', [string(V)])
+ else
+ Result := V;
+
+ Result := Format('NewConstant(%s, %s)',
+ [Result, GetEnumName(TypeInfo(TDADataType), integer(DT))]);
+ end;
+ end;
+
+begin
+ if fXML = c_Invalid_XML then
+ begin
+ WB := nil;
+ Where := nil;
+ Log := TStringList.Create;
+
+ try
+ Log.Add('procedure Make_DynamicWhere;');
+ Log.Add('var');
+ Log.Add(' L, R, Expr: TDAWhereExpression;');
+ Log.Add('begin');
+ Log.Add(' DADataTable.Close();');
+ Log.Add('');
+ Log.Add(' with DADataTable.DynamicWhere do');
+ Log.Add(' begin');
+ Log.Add(' Clear();');
+
+ for i := Low(fExpression) to High(fExpression) do
+ begin
+ if WB = nil then
+ WB := TDAWhereBuilder.Create();
+
+ NeedNot := False;
+ LogOper := fExpression[i].Oper;
+ DT := DynWhere_ClientDataForm.tbl_Data.FieldByName(fExpression[i].FldName).DataType;
+
+ if LogOper = dboIn then
+ begin
+ Lst := TStringList.Create();
+
+ try
+ Lst.CommaText := fExpression[i].Value;
+ SetLength(aExpr, Lst.Count);
+ S := '';
+
+ for j := 0 to Lst.Count - 1 do
+ begin
+ if DT = datDateTime then
+ aExpr[j] := WB.NewConstant(StrToDateTime(Lst[j]), DT)
+ else
+ aExpr[j] := WB.NewConstant(Lst[j], DT);
+
+ if S = '' then
+ S := sMake_Const(Lst[j])
+ else
+ S := Format('%s, %s', [S, sMake_Const(Lst[j])]);
+ end;
+ finally
+ Lst.Free;
+ end;
+
+ R := WB.NewList(aExpr);
+ Log.Add(Format(' R := NewList([%s]);', [S]));
+ end
+ else
+ begin
+ if VarIsNULL(fExpression[i].Value) then
+ begin
+ R := WB.NewNull();
+
+ if LogOper = dboNotEqual then
+ begin
+ LogOper := dboEqual;
+ NeedNot := True;
+ end;
+ end
+ else
+ R := WB.NewConstant(fExpression[i].Value, DT);
+ end;
+
+ Log.Add(Format(' R := %s;', [sMake_Const(fExpression[i].Value)]));
+ L := WB.NewField('', fExpression[i].FldName);
+ Log.Add(Format(' L := NewField('''', ''%s'');', [fExpression[i].FldName]));
+ Expr := WB.NewBinaryExpression(L, R, LogOper);
+ Log.Add(Format(' Expr := NewBinaryExpression(L, R, %s);',
+ [GetEnumName(TypeInfo(TDABinaryOperator), integer(LogOper))]));
+
+ if NeedNot then
+ begin
+ Expr := WB.NewUnaryExpression(Expr, duoNot);
+ Log.Add(' Expr := NewUnaryExpression(Expr, duoNot);');
+ end;
+
+ if Assigned(Where) then
+ begin
+ Where := WB.NewBinaryExpression(Where, Expr, fExpression[i].LogOper);
+ Log.Add(Format(' Expression := NewBinaryExpression(Expression, Expr, %s);',
+ [GetEnumName(TypeInfo(TDABinaryOperator), integer(fExpression[i].LogOper))]));
+ end
+ else
+ begin
+ Where := Expr;
+ Log.Add(' Expression := Expr;');
+ end;
+ end;
+
+ if Assigned(WB) then
+ begin
+ WB.Expression := Where;
+ fXML := WB.XML;
+ end
+ else
+ fXML := '';
+
+ Log.Add(' end;');
+ Log.Add('');
+ Log.Add(' DADataTable.Open();');
+ Log.Add('end;');
+ fDelphiCode := Log.Text;
+ finally
+ WB.Free;
+ Log.Free;
+ end;
+ end;
+
+ Result := fXML;
+end;
+
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_Library.rodl b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_Library.rodl
new file mode 100644
index 0000000..ddc076a
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_Library.rodl
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_Library_Intf.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_Library_Intf.pas
new file mode 100644
index 0000000..28cc52f
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_Library_Intf.pas
@@ -0,0 +1,82 @@
+unit DynWhere_Library_Intf;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+{$I Remobjects.inc}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROXMLIntf, uROClasses, uROClient, uROTypes, uROClientIntf,
+ {Used RODLs:} DataAbstract4_Intf;
+
+const
+ { Library ID }
+ LibraryUID = '{6FE385D0-259A-47F4-933C-9626A169FB88}';
+ TargetNamespace = '';
+
+ { Service Interface ID's }
+ IDynWhere_Service_IID : TGUID = '{55D412A7-8A48-4BD1-B557-BCA976C2AF80}';
+
+ { Event ID's }
+
+type
+ { Forward declarations }
+ IDynWhere_Service = interface;
+
+
+
+
+
+ { Enumerateds }
+
+ { IDynWhere_Service }
+ IDynWhere_Service = interface(IDataAbstractService)
+ ['{55D412A7-8A48-4BD1-B557-BCA976C2AF80}']
+ end;
+
+ { CoDynWhere_Service }
+ CoDynWhere_Service = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IDynWhere_Service;
+ end;
+
+ { TDynWhere_Service_Proxy }
+ TDynWhere_Service_Proxy = class(TDataAbstractService_Proxy, IDynWhere_Service)
+ protected
+ function __GetInterfaceName:string; override;
+
+ end;
+
+implementation
+
+uses
+ {vcl:} SysUtils,
+ {RemObjects:} uROEventRepository, uROSerializer, uRORes;
+
+{ CoDynWhere_Service }
+
+class function CoDynWhere_Service.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IDynWhere_Service;
+begin
+ result := TDynWhere_Service_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+function TDynWhere_Service_Proxy.__GetInterfaceName:string;
+begin
+ result := 'DynWhere_Service';
+end;
+
+initialization
+ RegisterProxyClass(IDynWhere_Service_IID, TDynWhere_Service_Proxy);
+
+
+finalization
+ UnregisterProxyClass(IDynWhere_Service_IID);
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_Library_Invk.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_Library_Invk.pas
new file mode 100644
index 0000000..519605e
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_Library_Invk.pas
@@ -0,0 +1,35 @@
+unit DynWhere_Library_Invk;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+{$I Remobjects.inc}
+
+interface
+
+uses
+ {vcl:} Classes,
+ {RemObjects:} uROXMLIntf, uROServer, uROServerIntf, uROTypes, uROClientIntf,
+ {Used RODL Intf's:} DataAbstract4_Intf,
+ {Used RODL Invk's:} DataAbstract4_Invk,
+ {Generated:} DynWhere_Library_Intf;
+
+type
+ TDynWhere_Service_Invoker = class(TDataAbstractService_Invoker)
+ private
+ protected
+ published
+ end;
+
+implementation
+
+uses
+ {RemObjects:} uRORes, uROClient;
+
+initialization
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_Server.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_Server.dpr
new file mode 100644
index 0000000..782bc8b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_Server.dpr
@@ -0,0 +1,30 @@
+program DynWhere_Server;
+
+{#ROGEN:DynWhere_Library.RODL} // RemObjects SDK: Careful, do not remove!
+
+uses
+ uROComInit,
+ uROComboService,
+ Forms,
+ DynWhere_ServerMain in 'DynWhere_ServerMain.pas' {ServerForm},
+ DynWhere_ServerData in 'DynWhere_ServerData.pas' {ServerDataModule: TDataModule},
+ DynWhere_Library_Intf in 'DynWhere_Library_Intf.pas',
+ DynWhere_Library_Invk in 'DynWhere_Library_Invk.pas',
+ DynWhere_Service_Impl in 'DynWhere_Service_Impl.pas' {DynWhere_Service: TDataAbstractService};
+
+{$R *.res}
+{$R RODLFile.res}
+
+begin
+ if ROStartService('DynWhere', 'DynWhere') then begin
+ ROService.CreateForm(TServerDataModule, ServerDataModule);
+ ROService.Run;
+ Exit;
+ end;
+
+ Application.Initialize;
+ Application.Title := 'Dynamic Where - Server';
+ Application.CreateForm(TServerDataModule, ServerDataModule);
+ Application.CreateForm(TServerForm, ServerForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_Server.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_Server.dproj
new file mode 100644
index 0000000..0ee5b0a
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_Server.dproj
@@ -0,0 +1,219 @@
+
+
+ {d7530199-da63-4dbd-b1b3-7f797bcb5316}
+ DynWhere_Server.dpr
+ Debug
+ AnyCPU
+ DCC32
+ DynWhere_Server.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1049
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Core Lab Data Access GUI related Components
+ Core Lab Data Access Components
+ Data Access Components for MySQL
+ MySQL Data Access GUI related Components
+ Oracle Data Access Components
+ Oracle Data Access GUI related Components
+ SQL Server Data Access Components
+ SQL Server Data Access GUI related Components
+ RemObjects Data Abstract - InterBase Express Driver
+ RemObjects Data Abstract - Scripting Integration Library
+ RemObjects Data Abstract - dbExpress Driver
+ RemObjects Data Abstract - SQLite Driver
+ RemObjects Data Abstract - DBISAM Driver
+ RemObjects Data Abstract - ElevateDB Driver
+ RemObjects Data Abstract - FIBPlus Driver
+ RemObjects Data Abstract - CoreLabs IBDAC Driver
+ RemObjects Data Abstract - CoreLabs MyDAC Driver
+ Data Abstract - NexusDB Driver
+ RemObjects Data Abstract - CoreLabs ODAC Driver
+ RemObjects Data Abstract - MicroOlap PostgresDAC Driver
+ RemObjects Data Abstract - 'Rosetta'
+ RemObjects Data Abstract - CoreLabs SDAC Driver
+ CodeGear C++Builder Office XP Servers Package
+ Microsoft Office 2000 Sample Automation Server Wrapper Components
+ Microsoft Office XP Sample Automation Server Wrapper Components
+ Core Lab InterBase Data Access Components
+ Data Access Components for MySQL - TMySQLMonitor
+
+
+ DynWhere_Server.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+ TDataModule
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_Server.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_Server.res
new file mode 100644
index 0000000..7c48bdb
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_Server.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_ServerData.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_ServerData.dfm
new file mode 100644
index 0000000..f46aae9
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_ServerData.dfm
@@ -0,0 +1,63 @@
+object ServerDataModule: TServerDataModule
+ OldCreateOrder = False
+ OnCreate = DataModuleCreate
+ Left = 362
+ Top = 208
+ Height = 207
+ Width = 352
+ object Server: TROIndyHTTPServer
+ Dispatchers = <
+ item
+ Name = 'Message'
+ Message = Message
+ Enabled = True
+ PathInfo = 'Bin'
+ end>
+ Port = 8099
+ Left = 32
+ Top = 8
+ end
+ object Message: TROBinMessage
+ Left = 32
+ Top = 56
+ end
+ object ConnectionManager: TDAConnectionManager
+ Connections = <
+ item
+ Name = 'ADO Connection to Northwind'
+ ConnectionString =
+ 'ADO?AuxDriver=SQLOLEDB.1;Server=localhost;Database=Northwind;Int' +
+ 'egrated Security=SSPI;'
+ ConnectionType = 'MSSQL'
+ Default = True
+ end>
+ DriverManager = DriverManager
+ PoolingEnabled = True
+ Left = 136
+ Top = 56
+ end
+ object DriverManager: TDADriverManager
+ DriverDirectory = '%SYSTEM%\'
+ TraceActive = False
+ TraceFlags = []
+ Left = 136
+ Top = 10
+ end
+ object ADODriver: TDAADODriver
+ Left = 256
+ Top = 8
+ end
+ object IBXDriver: TDAIBXDriver
+ Left = 256
+ Top = 56
+ end
+ object DataDictionary: TDADataDictionary
+ Fields = <>
+ Left = 32
+ Top = 104
+ end
+ object SessionManager: TROInMemorySessionManager
+ Left = 136
+ Top = 104
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_ServerData.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_ServerData.pas
new file mode 100644
index 0000000..b987dda
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_ServerData.pas
@@ -0,0 +1,42 @@
+unit DynWhere_ServerData;
+
+interface
+
+uses
+ SysUtils, Classes,
+ uROClient, uROPoweredByRemObjectsButton, uROClientIntf, uROServer,
+ uROBinMessage, uROIndyHTTPServer,
+ uDAEngine, uDADriverManager, uDAClasses, uROSessions,
+ uDAIBXDriver, uDAADODriver, uROIndyTCPServer;
+
+type
+ TServerDataModule = class(TDataModule)
+ Server: TROIndyHTTPServer;
+ Message: TROBinMessage;
+ ConnectionManager: TDAConnectionManager;
+ DriverManager: TDADriverManager;
+ ADODriver: TDAADODriver;
+ IBXDriver: TDAIBXDriver;
+ DataDictionary: TDADataDictionary;
+ SessionManager: TROInMemorySessionManager;
+
+ procedure DataModuleCreate(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ ServerDataModule: TServerDataModule;
+
+implementation
+
+{$R *.dfm}
+
+procedure TServerDataModule.DataModuleCreate(Sender: TObject);
+begin
+ Server.Active := true;
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_ServerMain.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_ServerMain.dfm
new file mode 100644
index 0000000..a687bf9
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_ServerMain.dfm
@@ -0,0 +1,25 @@
+object ServerForm: TServerForm
+ Left = 372
+ Top = 277
+ BorderStyle = bsDialog
+ Caption = 'Dynamic Where Server'
+ ClientHeight = 64
+ ClientWidth = 228
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ PixelsPerInch = 96
+ TextHeight = 13
+ object DAPoweredByDataAbstractButton: TDAPoweredByDataAbstractButton
+ Left = 8
+ Top = 8
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_ServerMain.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_ServerMain.pas
new file mode 100644
index 0000000..198c6ec
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_ServerMain.pas
@@ -0,0 +1,26 @@
+unit DynWhere_ServerMain;
+
+interface
+
+uses
+ Forms, Classes, Controls,
+ uROPoweredByRemObjectsButton, uDAPoweredByDataAbstractButton
+ ;
+
+type
+ TServerForm = class(TForm)
+ DAPoweredByDataAbstractButton: TDAPoweredByDataAbstractButton;
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ ServerForm: TServerForm;
+
+implementation
+
+{$R *.dfm}
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_Service_Impl.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_Service_Impl.dfm
new file mode 100644
index 0000000..756742d
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_Service_Impl.dfm
@@ -0,0 +1,318 @@
+object DynWhere_Service: TDynWhere_Service
+ OldCreateOrder = True
+ SessionManager = ServerDataModule.SessionManager
+ ServiceSchema = Schema
+ ServiceDataStreamer = DataStreamer
+ ExportedDataTables = <>
+ Left = 400
+ Top = 232
+ Height = 300
+ Width = 300
+ object Schema: TDASchema
+ ConnectionManager = ServerDataModule.ConnectionManager
+ Datasets = <
+ item
+ Params = <>
+ Statements = <
+ item
+ Connection = 'ADO Connection to Northwind'
+ ConnectionType = 'MSSQL'
+ Default = True
+ TargetTable = 'Employees'
+ Name = 'ADO Connection to Northwind'
+ StatementType = stAutoSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'EmployeeID'
+ TableField = 'EmployeeID'
+ end
+ item
+ DatasetField = 'LastName'
+ TableField = 'LastName'
+ end
+ item
+ DatasetField = 'FirstName'
+ TableField = 'FirstName'
+ end
+ item
+ DatasetField = 'Title'
+ TableField = 'Title'
+ end
+ item
+ DatasetField = 'TitleOfCourtesy'
+ TableField = 'TitleOfCourtesy'
+ end
+ item
+ DatasetField = 'BirthDate'
+ TableField = 'BirthDate'
+ end
+ item
+ DatasetField = 'HireDate'
+ TableField = 'HireDate'
+ end
+ item
+ DatasetField = 'Address'
+ TableField = 'Address'
+ end
+ item
+ DatasetField = 'City'
+ TableField = 'City'
+ end
+ item
+ DatasetField = 'Region'
+ TableField = 'Region'
+ end
+ item
+ DatasetField = 'PostalCode'
+ TableField = 'PostalCode'
+ end
+ item
+ DatasetField = 'Country'
+ TableField = 'Country'
+ end
+ item
+ DatasetField = 'HomePhone'
+ TableField = 'HomePhone'
+ end
+ item
+ DatasetField = 'Extension'
+ TableField = 'Extension'
+ end
+ item
+ DatasetField = 'Photo'
+ TableField = 'Photo'
+ end
+ item
+ DatasetField = 'Notes'
+ TableField = 'Notes'
+ end
+ item
+ DatasetField = 'ReportsTo'
+ TableField = 'ReportsTo'
+ end
+ item
+ DatasetField = 'PhotoPath'
+ TableField = 'PhotoPath'
+ end>
+ end>
+ Name = 'Employees'
+ Fields = <
+ item
+ Name = 'EmployeeID'
+ DataType = datAutoInc
+ GeneratorName = 'Employees'
+ Required = True
+ InPrimaryKey = True
+ end
+ item
+ Name = 'LastName'
+ DataType = datWideString
+ Size = 20
+ Required = True
+ end
+ item
+ Name = 'FirstName'
+ DataType = datWideString
+ Size = 10
+ Required = True
+ end
+ item
+ Name = 'Title'
+ DataType = datWideString
+ Size = 30
+ end
+ item
+ Name = 'TitleOfCourtesy'
+ DataType = datWideString
+ Size = 25
+ end
+ item
+ Name = 'BirthDate'
+ DataType = datDateTime
+ end
+ item
+ Name = 'HireDate'
+ DataType = datDateTime
+ end
+ item
+ Name = 'Address'
+ DataType = datWideString
+ Size = 60
+ end
+ item
+ Name = 'City'
+ DataType = datWideString
+ Size = 15
+ end
+ item
+ Name = 'Region'
+ DataType = datWideString
+ Size = 15
+ end
+ item
+ Name = 'PostalCode'
+ DataType = datWideString
+ Size = 10
+ end
+ item
+ Name = 'Country'
+ DataType = datWideString
+ Size = 15
+ end
+ item
+ Name = 'HomePhone'
+ DataType = datWideString
+ Size = 24
+ end
+ item
+ Name = 'Extension'
+ DataType = datWideString
+ Size = 4
+ end
+ item
+ Name = 'Photo'
+ DataType = datBlob
+ end
+ item
+ Name = 'Notes'
+ DataType = datMemo
+ end
+ item
+ Name = 'ReportsTo'
+ DataType = datInteger
+ end
+ item
+ Name = 'PhotoPath'
+ DataType = datWideString
+ Size = 255
+ end>
+ end
+ item
+ Params = <>
+ Statements = <
+ item
+ Connection = 'ADO Connection to Northwind'
+ Default = True
+ TargetTable = 'Customers'
+ StatementType = stAutoSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'CustomerID'
+ TableField = 'CustomerID'
+ end
+ item
+ DatasetField = 'CompanyName'
+ TableField = 'CompanyName'
+ end
+ item
+ DatasetField = 'ContactName'
+ TableField = 'ContactName'
+ end
+ item
+ DatasetField = 'ContactTitle'
+ TableField = 'ContactTitle'
+ end
+ item
+ DatasetField = 'Address'
+ TableField = 'Address'
+ end
+ item
+ DatasetField = 'City'
+ TableField = 'City'
+ end
+ item
+ DatasetField = 'Region'
+ TableField = 'Region'
+ end
+ item
+ DatasetField = 'PostalCode'
+ TableField = 'PostalCode'
+ end
+ item
+ DatasetField = 'Country'
+ TableField = 'Country'
+ end
+ item
+ DatasetField = 'Phone'
+ TableField = 'Phone'
+ end
+ item
+ DatasetField = 'Fax'
+ TableField = 'Fax'
+ end>
+ end>
+ Name = 'Customers'
+ Fields = <
+ item
+ Name = 'CustomerID'
+ DataType = datWideString
+ Size = 5
+ Required = True
+ InPrimaryKey = True
+ end
+ item
+ Name = 'CompanyName'
+ DataType = datWideString
+ Size = 40
+ Required = True
+ end
+ item
+ Name = 'ContactName'
+ DataType = datWideString
+ Size = 30
+ end
+ item
+ Name = 'ContactTitle'
+ DataType = datWideString
+ Size = 30
+ end
+ item
+ Name = 'Address'
+ DataType = datWideString
+ Size = 60
+ end
+ item
+ Name = 'City'
+ DataType = datWideString
+ Size = 15
+ end
+ item
+ Name = 'Region'
+ DataType = datWideString
+ Size = 15
+ end
+ item
+ Name = 'PostalCode'
+ DataType = datWideString
+ Size = 10
+ end
+ item
+ Name = 'Country'
+ DataType = datWideString
+ Size = 15
+ end
+ item
+ Name = 'Phone'
+ DataType = datWideString
+ Size = 24
+ end
+ item
+ Name = 'Fax'
+ DataType = datWideString
+ Size = 24
+ end>
+ end>
+ JoinDataTables = <>
+ UnionDataTables = <>
+ Commands = <>
+ RelationShips = <>
+ UpdateRules = <>
+ Version = 0
+ Left = 32
+ Top = 24
+ end
+ object DataStreamer: TDABin2DataStreamer
+ Left = 32
+ Top = 72
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_Service_Impl.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_Service_Impl.pas
new file mode 100644
index 0000000..51bad03
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/DynWhere_Service_Impl.pas
@@ -0,0 +1,50 @@
+unit DynWhere_Service_Impl;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ This is where you are supposed to code the implementation of your objects. }
+{----------------------------------------------------------------------------}
+
+{$I Remobjects.inc}
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils,
+ {RemObjects:} uROXMLIntf, uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
+ {Required:} uRORemoteDataModule,
+ {Ancestor Implementation:} DataAbstractService_Impl,
+ {Used RODLs:} DataAbstract4_Intf,
+ {Generated:} DynWhere_Library_Intf, uDAClasses, uDADataStreamer,
+ uDABin2DataStreamer;
+
+type
+ { TDynWhere_Service }
+ TDynWhere_Service = class(TDataAbstractService, IDynWhere_Service)
+ DataStreamer: TDABin2DataStreamer;
+ Schema: TDASchema;
+ private
+ protected
+ { IDynWhere_Service methods }
+ end;
+
+implementation
+
+{$R *.dfm}
+uses
+ {Generated:} DynWhere_Library_Invk, DynWhere_ServerData;
+
+procedure Create_DynWhere_Service(out anInstance : IUnknown);
+begin
+ anInstance := TDynWhere_Service.Create(nil);
+end;
+
+{ DynWhere_Service }
+initialization
+ TROClassFactory.Create('DynWhere_Service', Create_DynWhere_Service, TDynWhere_Service_Invoker);
+
+finalization
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/RODLFILE.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/RODLFILE.res
new file mode 100644
index 0000000..5b009d0
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/RODLFILE.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/WhereExpression.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/WhereExpression.dfm
new file mode 100644
index 0000000..da18d4c
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/WhereExpression.dfm
@@ -0,0 +1,155 @@
+object WhereExpressionForm: TWhereExpressionForm
+ Left = 299
+ Top = 154
+ BorderIcons = [biSystemMenu]
+ BorderStyle = bsSingle
+ Caption = 'Single Expresion'
+ ClientHeight = 147
+ ClientWidth = 519
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Panel1: TPanel
+ Left = 0
+ Top = 0
+ Width = 519
+ Height = 106
+ Align = alClient
+ BevelOuter = bvNone
+ TabOrder = 0
+ object Label1: TLabel
+ Left = 72
+ Top = 16
+ Width = 53
+ Height = 13
+ Caption = 'Field Name'
+ end
+ object Label2: TLabel
+ Left = 216
+ Top = 16
+ Width = 46
+ Height = 13
+ Caption = 'Operation'
+ end
+ object lbValue: TLabel
+ Left = 304
+ Top = 16
+ Width = 27
+ Height = 13
+ Caption = 'Value'
+ Visible = False
+ end
+ object cmbFldName: TComboBox
+ Left = 72
+ Top = 32
+ Width = 137
+ Height = 21
+ Style = csDropDownList
+ ItemHeight = 13
+ TabOrder = 0
+ OnClick = cmbFldNameClick
+ OnKeyPress = cmbFldNameKeyPress
+ end
+ object cmbOper: TComboBox
+ Left = 216
+ Top = 32
+ Width = 81
+ Height = 21
+ Style = csDropDownList
+ ItemHeight = 13
+ TabOrder = 1
+ OnClick = cmbOperClick
+ OnKeyPress = cmbOperKeyPress
+ end
+ object edtValue: TEdit
+ Left = 304
+ Top = 32
+ Width = 209
+ Height = 21
+ TabOrder = 2
+ Visible = False
+ OnChange = edtValueChange
+ end
+ object dtValue: TDateTimePicker
+ Left = 304
+ Top = 32
+ Width = 97
+ Height = 21
+ Date = 39354.876083981480000000
+ Time = 39354.876083981480000000
+ TabOrder = 3
+ Visible = False
+ OnChange = edtValueChange
+ end
+ object emValue: TRichEdit
+ Left = 304
+ Top = 32
+ Width = 209
+ Height = 65
+ ScrollBars = ssBoth
+ TabOrder = 4
+ Visible = False
+ WordWrap = False
+ OnChange = edtValueChange
+ end
+ object cmbLogOper: TComboBox
+ Left = 8
+ Top = 32
+ Width = 57
+ Height = 21
+ Style = csDropDownList
+ ItemHeight = 13
+ ItemIndex = 0
+ TabOrder = 5
+ Text = 'AND'
+ OnClick = cmbLogOperClick
+ OnKeyPress = cmbLogOperKeyPress
+ Items.Strings = (
+ 'AND'
+ 'OR'
+ 'XOR')
+ end
+ end
+ object Panel2: TPanel
+ Left = 0
+ Top = 106
+ Width = 519
+ Height = 41
+ Align = alBottom
+ BevelOuter = bvNone
+ TabOrder = 1
+ DesignSize = (
+ 519
+ 41)
+ object btnOK: TButton
+ Left = 330
+ Top = 0
+ Width = 75
+ Height = 25
+ Anchors = [akTop, akRight]
+ Caption = 'OK'
+ Default = True
+ ModalResult = 1
+ TabOrder = 0
+ OnClick = btnOKClick
+ end
+ object btnCancel: TButton
+ Left = 426
+ Top = 0
+ Width = 75
+ Height = 25
+ Anchors = [akTop, akRight]
+ Cancel = True
+ Caption = 'Cancel'
+ ModalResult = 2
+ TabOrder = 1
+ end
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/WhereExpression.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/WhereExpression.pas
new file mode 100644
index 0000000..f255710
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/WhereExpression.pas
@@ -0,0 +1,417 @@
+unit WhereExpression;
+
+interface
+
+uses
+ Forms, Controls, StdCtrls, Classes, ExtCtrls,
+ uDAInterfaces, ComCtrls
+ ;
+
+type
+ TWhereExpressionForm = class(TForm)
+ Panel1: TPanel;
+ Panel2: TPanel;
+ btnOK: TButton;
+ btnCancel: TButton;
+ Label1: TLabel;
+ cmbFldName: TComboBox;
+ Label2: TLabel;
+ cmbOper: TComboBox;
+ lbValue: TLabel;
+ edtValue: TEdit;
+ dtValue: TDateTimePicker;
+ emValue: TRichEdit;
+ cmbLogOper: TComboBox;
+ procedure cmbOperKeyPress(Sender: TObject; var Key: Char);
+ procedure cmbOperClick(Sender: TObject);
+ procedure cmbFldNameClick(Sender: TObject);
+ procedure cmbFldNameKeyPress(Sender: TObject; var Key: Char);
+ procedure edtValueChange(Sender: TObject);
+ procedure btnOKClick(Sender: TObject);
+ procedure cmbLogOperClick(Sender: TObject);
+ procedure cmbLogOperKeyPress(Sender: TObject; var Key: Char);
+ private
+ { Private declarations }
+ fFlds: TDAFieldCollection;
+ fDT: TDADataType;
+ procedure CheckOper();
+ procedure CheckButtons();
+ function CheckExpresion(): Boolean;
+ public
+ { Public declarations }
+ function ExecuteEx(AFlds: TDAFieldCollection;
+ var FldName: string; var LogOper, Oper: TDABinaryOperator; var Value: variant): Boolean;
+ class function Execute(AFlds: TDAFieldCollection;
+ var FldName: string; var LogOper, Oper: TDABinaryOperator; var Value: variant): Boolean;
+ end;
+
+
+implementation
+
+uses
+ SysUtils, Variants, Dialogs
+ ;
+
+{$R *.dfm}
+
+const
+ c_is_NULL = -2;
+ c_is_not_NULL = -3;
+
+var
+ Frm: TWhereExpressionForm = nil;
+
+class function TWhereExpressionForm.Execute(AFlds: TDAFieldCollection;
+ var FldName: string; var LogOper, Oper: TDABinaryOperator; var Value: variant): Boolean;
+begin
+ if not Assigned(Frm) then
+ Frm := TWhereExpressionForm.Create(Application);
+
+ Result := Frm.ExecuteEx(AFlds, FldName, LogOper, Oper, Value);
+end;
+
+function TWhereExpressionForm.ExecuteEx(AFlds: TDAFieldCollection;
+ var FldName: string; var LogOper, Oper: TDABinaryOperator; var Value: variant): Boolean;
+var
+ i, ii: integer;
+begin
+ Result := False;
+ fFlds := AFlds;
+ ii := -1;
+ fDT := datUnknown;
+ lbValue.Visible := False;
+ emValue.Visible := False;
+ dtValue.Visible := False;
+ edtValue.Visible := False;
+
+ for i := 0 to fFlds.Count - 1 do
+ begin
+ cmbFldName.Items.AddObject(fFlds[i].Name, TObject(fFlds[i].DataType));
+
+ if AnsiSameText(FldName, fFlds[i].Name) then
+ ii := i;
+ end;
+
+ emValue.Lines.Clear();
+ edtValue.Clear();
+ cmbFldName.ItemIndex := ii;
+ CheckOper();
+
+ if ii >= 0 then
+ begin
+ if VarIsNULL(Value) then
+ if Oper = dboEqual then
+ ii := c_is_NULL
+ else
+ ii := c_is_not_NULL
+ else
+ ii := integer(Oper);
+
+ if LogOper = dboAnd then
+ cmbLogOper.ItemIndex := 0
+ else
+ if LogOper = dboOr then
+ cmbLogOper.ItemIndex := 1
+ else
+ if LogOper = dboXor then
+ cmbLogOper.ItemIndex := 2;
+
+ for i := 0 to cmbOper.Items.Count - 1 do
+ if integer(cmbOper.Items.Objects[i]) = ii then
+ begin
+ cmbOper.ItemIndex := i;
+ cmbOperClick(cmbOper);
+
+ if emValue.Visible then
+ emValue.Lines.CommaText := Value
+ else
+ if dtValue.Visible then
+ dtValue.Date := Value
+ else
+ if edtValue.Visible then
+ edtValue.Text := Value;
+
+ break;
+ end;
+ end
+ else
+ cmbLogOper.ItemIndex := 0;
+
+ btnOK.Enabled := False;
+
+ if ShowModal = mrOK then
+ begin
+ FldName := cmbFldName.Items[cmbFldName.ItemIndex];
+ ii := integer(cmbOper.Items.Objects[cmbOper.ItemIndex]);
+
+ if ii = c_is_NULL then
+ begin
+ Oper := dboEqual;
+ Value := NULL;
+ end
+ else
+ if ii = c_is_not_NULL then
+ begin
+ Oper := dboNotEqual;
+ Value := NULL;
+ end
+ else
+ begin
+ if emValue.Visible then
+ begin
+ for i := emValue.Lines.Count - 1 downto 0 do
+ if Trim(emValue.Lines[i]) = '' then
+ emValue.Lines.Delete(i);
+
+ if emValue.Lines.Count > 0 then
+ Value := Trim(emValue.Lines.CommaText)
+ else
+ begin
+ Result := False;
+ exit;
+ end;
+ end
+ else
+ if dtValue.Visible then
+ Value := VarFromDateTime(Trunc(dtValue.Date))
+ else
+ if edtValue.Visible then
+ Value := Trim(edtValue.Text);
+
+ Oper := TDABinaryOperator(ii);
+ end;
+
+ if cmbLogOper.ItemIndex = 0 then
+ LogOper := dboAnd
+ else
+ if cmbLogOper.ItemIndex = 1 then
+ LogOper := dboOr
+ else
+ if cmbLogOper.ItemIndex = 2 then
+ LogOper := dboXor;
+
+ Result := True;
+ end;
+end;
+
+procedure TWhereExpressionForm.cmbOperClick(Sender: TObject);
+begin
+ if cmbOper.DroppedDown
+ or (cmbOper.ItemIndex < 0) then
+ exit;
+
+ if integer(cmbOper.Items.Objects[cmbOper.ItemIndex]) < 0 then
+ begin
+ lbValue.Visible := False;
+ emValue.Visible := False;
+ dtValue.Visible := False;
+ edtValue.Visible := False;
+ end
+ else
+ begin
+ lbValue.Visible := True;
+
+ if TDABinaryOperator(cmbOper.Items.Objects[cmbOper.ItemIndex]) = dboIn then
+ begin
+ emValue.Visible := True;
+ dtValue.Visible := False;
+ edtValue.Visible := False;
+ end
+ else
+ begin
+ emValue.Visible := False;
+
+ if TDADataType(cmbFldName.Items.Objects[cmbFldName.ItemIndex]) = datDateTime then
+ begin
+ dtValue.Visible := True;
+ edtValue.Visible := False;
+ end
+ else
+ begin
+ dtValue.Visible := False;
+ edtValue.Visible := True;
+ end;
+ end;
+ end;
+
+ CheckButtons();
+end;
+
+procedure TWhereExpressionForm.cmbOperKeyPress(Sender: TObject;
+ var Key: Char);
+begin
+ if Key = #13 then
+ begin
+ if cmbOper.DroppedDown then
+ cmbOper.DroppedDown := False;
+
+ cmbOperClick(Sender);
+ Key := #0;
+ end;
+end;
+
+procedure TWhereExpressionForm.cmbFldNameClick(Sender: TObject);
+begin
+ if cmbFldName.DroppedDown
+ or (cmbFldName.ItemIndex < 0) then
+ exit;
+
+ CheckOper();
+end;
+
+procedure TWhereExpressionForm.cmbFldNameKeyPress(Sender: TObject;
+ var Key: Char);
+begin
+ if Key = #13 then
+ begin
+ if cmbFldName.DroppedDown then
+ cmbFldName.DroppedDown := False;
+
+ cmbFldNameClick(Sender);
+ Key := #0;
+ end;
+end;
+
+procedure TWhereExpressionForm.cmbLogOperClick(Sender: TObject);
+begin
+ if cmbLogOper.DroppedDown
+ or (cmbLogOper.ItemIndex < 0) then
+ exit;
+
+ CheckButtons();
+end;
+
+procedure TWhereExpressionForm.cmbLogOperKeyPress(Sender: TObject;
+ var Key: Char);
+begin
+ if Key = #13 then
+ begin
+ if cmbLogOper.DroppedDown then
+ cmbLogOper.DroppedDown := False;
+
+ cmbLogOperClick(Sender);
+ Key := #0;
+ end;
+end;
+
+procedure TWhereExpressionForm.CheckOper();
+ procedure Add_CmbOper(const Oper: array of TDABinaryOperator;
+ const Txt: array of string);
+ var
+ i: integer;
+ begin
+ cmbOper.Items.Clear;
+
+ for i := Low(Oper) to High(Oper) do
+ cmbOper.Items.AddObject(Txt[i], TObject(integer(Oper[i])));
+
+ cmbOper.Items.AddObject('in', TObject(dboIn));
+ cmbOper.Items.AddObject('is NULL', TObject(c_is_NULL));
+ cmbOper.Items.AddObject('is not NULL', TObject(c_is_not_NULL));
+ cmbOper.ItemIndex := 0;
+ end;
+
+var
+ DT: TDADataType;
+begin
+ cmbOper.Enabled := (cmbFldName.ItemIndex >= 0);
+
+ if cmbOper.Enabled then
+ begin
+ DT := TDADataType(cmbFldName.Items.Objects[cmbFldName.ItemIndex]);
+
+ if fDT <> DT then
+ begin
+ if DT in [datString, datWideString, datMemo, datWideMemo] then
+ Add_CmbOper([dboLike, dboEqual, dboNotEqual], ['like', '=', '!='])
+ else
+ Add_CmbOper([dboEqual, dboNotEqual, dboGreater, dboGreaterOrEqual, dboLess, dboLessOrEqual],
+ ['=', '!=', '>', '>=', '<', '<=']);
+ fDT := DT;
+ end;
+ end
+ else
+ cmbOper.Items.Clear;
+
+ cmbOperClick(cmbOper);
+ CheckButtons();
+end;
+
+procedure TWhereExpressionForm.CheckButtons();
+begin
+ btnOK.Enabled := (cmbFldName.ItemIndex >= 0)
+ and (cmbOper.ItemIndex >= 0);
+
+ if btnOK.Enabled then
+ if integer(cmbOper.Items.Objects[cmbOper.ItemIndex]) >= 0 then
+ begin
+ if emValue.Visible then
+ btnOK.Enabled := (Trim(emValue.Text) <> '')
+ else
+ if dtValue.Visible then
+ btnOK.Enabled := dtValue.Date > 0
+ else
+ if edtValue.Visible then
+ btnOK.Enabled := (Trim(edtValue.Text) <> '')
+ else
+ btnOK.Enabled := False;
+ end;
+end;
+
+procedure TWhereExpressionForm.edtValueChange(Sender: TObject);
+begin
+ CheckButtons();
+end;
+
+procedure TWhereExpressionForm.btnOKClick(Sender: TObject);
+begin
+ if CheckExpresion() then
+ ModalResult := mrOK
+ else
+ ModalResult := mrNone;
+end;
+
+function TWhereExpressionForm.CheckExpresion(): Boolean;
+ function CheckData(const S: string): Boolean;
+ begin
+ Result := False;
+
+ try
+ if S = '' then
+ else
+ if fDT in [datFloat, datCurrency, datDecimal, datSingleFloat] then
+ StrToFloat(S)
+ else
+ if fDT in [datAutoInc, datInteger, datLargeInt, datLargeAutoInc,
+ datShortInt, datWord, datSmallInt, datCardinal, datLargeUInt] then
+ StrToInt(S)
+ else
+ if fDT = datDateTime then
+ StrToDateTime(S);
+
+ Result := True;
+ except
+ MessageDlg(Format('"%s" is not valid field value', [S]), mtError, [mbOK], 0);
+ end;
+ end;
+
+var
+ i: integer;
+begin
+ Result := True;
+
+ if emValue.Visible then
+ begin
+ for i := 0 to emValue.Lines.Count - 1 do
+ if not CheckData(Trim(emValue.Lines[i])) then
+ begin
+ Result := False;
+ break;
+ end;
+ end
+ else
+ if edtValue.Visible then
+ Result := CheckData(Trim(edtValue.Text));
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/memoForm.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/memoForm.dfm
new file mode 100644
index 0000000..fee68e2
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/memoForm.dfm
@@ -0,0 +1,61 @@
+object frmMemo: TfrmMemo
+ Left = 385
+ Top = 215
+ AutoScroll = False
+ BorderIcons = [biSystemMenu]
+ ClientHeight = 442
+ ClientWidth = 632
+ Color = clBtnFace
+ Constraints.MinHeight = 480
+ Constraints.MinWidth = 640
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ KeyPreview = True
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnKeyDown = FormKeyDown
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Panel1: TPanel
+ Left = 0
+ Top = 401
+ Width = 632
+ Height = 41
+ Align = alBottom
+ BevelOuter = bvNone
+ TabOrder = 0
+ DesignSize = (
+ 632
+ 41)
+ object btnOK: TButton
+ Left = 544
+ Top = 8
+ Width = 75
+ Height = 25
+ Anchors = [akTop, akRight]
+ Caption = 'OK'
+ Default = True
+ TabOrder = 0
+ OnClick = btnOKClick
+ end
+ end
+ object edtMemo: TRichEdit
+ Left = 0
+ Top = 0
+ Width = 632
+ Height = 401
+ Align = alClient
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -13
+ Font.Name = 'Courier New'
+ Font.Style = []
+ ParentFont = False
+ ReadOnly = True
+ ScrollBars = ssBoth
+ TabOrder = 1
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/memoForm.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/memoForm.pas
new file mode 100644
index 0000000..8262a42
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Dynamic Where/memoForm.pas
@@ -0,0 +1,61 @@
+unit memoForm;
+
+interface
+
+uses
+ Forms, StdCtrls, ComCtrls, Classes, Controls, ExtCtrls
+ ;
+
+type
+ TfrmMemo = class(TForm)
+ Panel1: TPanel;
+ edtMemo: TRichEdit;
+ btnOK: TButton;
+ procedure FormKeyDown(Sender: TObject; var Key: Word;
+ Shift: TShiftState);
+ procedure btnOKClick(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ class procedure Execute(const ACaption: string; const Memos: string; WordWrap: Boolean);
+ end;
+
+implementation
+
+uses
+ Windows
+ ;
+
+{$R *.dfm}
+
+class procedure TfrmMemo.Execute(const ACaption: string; const Memos: string;
+ WordWrap: Boolean);
+var
+ Frm: TfrmMemo;
+begin
+ Frm := TfrmMemo.Create(Application);
+
+ try
+ Frm.Caption := ACaption;
+ Frm.edtMemo.WordWrap := WordWrap;
+ Frm.edtMemo.Lines.Text := Memos;
+ Frm.ShowModal();
+ finally
+ Frm.Release();
+ end;
+end;
+
+procedure TfrmMemo.FormKeyDown(Sender: TObject; var Key: Word;
+ Shift: TShiftState);
+begin
+ if (Shift = []) and (Key = VK_ESCAPE) then
+ Close();
+end;
+
+procedure TfrmMemo.btnOKClick(Sender: TObject);
+begin
+ Close();
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesClient.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesClient.dpr
new file mode 100644
index 0000000..fd9e269
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesClient.dpr
@@ -0,0 +1,17 @@
+program ExportedDataTablesClient;
+
+uses
+ uROComInit,
+ Forms,
+ MidasLib,
+ ExportedDataTablesClientMain in 'ExportedDataTablesClientMain.pas' {ExportedDataTablesClientMainForm},
+ ExportedDataTablesClientData in 'ExportedDataTablesClientData.pas' {ExportedDataTablesClientDataModule: TDAClientDataModule};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TExportedDataTablesClientDataModule, ExportedDataTablesClientDataModule);
+ Application.CreateForm(TExportedDataTablesClientMainForm, ExportedDataTablesClientMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesClient.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesClient.dproj
new file mode 100644
index 0000000..f3a7404
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesClient.dproj
@@ -0,0 +1,213 @@
+
+
+ {7f0aaa6f-1cc7-4281-bb0d-802a09720390}
+ ExportedDataTablesClient.dpr
+ Debug
+ AnyCPU
+ DCC32
+ ExportedDataTablesClient.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1049
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Core Lab Data Access GUI related Components
+ Core Lab Data Access Components
+ Data Access Components for MySQL
+ MySQL Data Access GUI related Components
+ Oracle Data Access Components
+ Oracle Data Access GUI related Components
+ SQL Server Data Access Components
+ SQL Server Data Access GUI related Components
+ RemObjects Data Abstract - InterBase Express Driver
+ RemObjects Data Abstract - Scripting Integration Library
+ RemObjects Data Abstract - dbExpress Driver
+ RemObjects Data Abstract - SQLite Driver
+ RemObjects Data Abstract - DBISAM Driver
+ RemObjects Data Abstract - ElevateDB Driver
+ RemObjects Data Abstract - FIBPlus Driver
+ RemObjects Data Abstract - CoreLabs IBDAC Driver
+ RemObjects Data Abstract - CoreLabs MyDAC Driver
+ Data Abstract - NexusDB Driver
+ RemObjects Data Abstract - CoreLabs ODAC Driver
+ RemObjects Data Abstract - MicroOlap PostgresDAC Driver
+ RemObjects Data Abstract - 'Rosetta'
+ RemObjects Data Abstract - CoreLabs SDAC Driver
+ CodeGear C++Builder Office XP Servers Package
+ Microsoft Office 2000 Sample Automation Server Wrapper Components
+ Microsoft Office XP Sample Automation Server Wrapper Components
+ Core Lab InterBase Data Access Components
+ Data Access Components for MySQL - TMySQLMonitor
+
+
+ ExportedDataTablesClient.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+ TDAClientDataModule
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesClient.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesClient.res
new file mode 100644
index 0000000..a8142cb
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesClient.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesClientData.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesClientData.dfm
new file mode 100644
index 0000000..5511710
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesClientData.dfm
@@ -0,0 +1,78 @@
+object ExportedDataTablesClientDataModule: TExportedDataTablesClientDataModule
+ OldCreateOrder = True
+ Left = 439
+ Top = 220
+ Height = 300
+ Width = 300
+ object Channel: TROWinInetHTTPChannel
+ UserAgent = 'RemObjects SDK'
+ TargetURL = 'http://localhost:8099/BIN'
+ ServerLocators = <>
+ DispatchOptions = []
+ Left = 40
+ Top = 8
+ end
+ object Message: TROBinMessage
+ Left = 40
+ Top = 52
+ end
+ object RemoteService: TRORemoteService
+ Message = Message
+ Channel = Channel
+ ServiceName = 'ExportedDataTablesService'
+ Left = 40
+ Top = 96
+ end
+ object DataStreamer: TDABin2DataStreamer
+ Left = 40
+ Top = 140
+ end
+ object RemoteDataAdapter: TDARemoteDataAdapter
+ GetSchemaCall.RemoteService = RemoteService
+ GetDataCall.RemoteService = RemoteService
+ UpdateDataCall.RemoteService = RemoteService
+ GetScriptsCall.RemoteService = RemoteService
+ RemoteService = RemoteService
+ DataStreamer = DataStreamer
+ Left = 40
+ Top = 184
+ end
+ object tbl_Customers: TDAMemDataTable
+ RemoteUpdatesOptions = []
+ Fields = <>
+ Params = <>
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteDataAdapter = RemoteDataAdapter
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ LogicalName = 'Customers'
+ IndexDefs = <>
+ Left = 128
+ Top = 120
+ end
+ object ds_Customers: TDADataSource
+ DataSet = tbl_Customers.Dataset
+ DataTable = tbl_Customers
+ Left = 136
+ Top = 128
+ end
+ object tbl_Region: TDAMemDataTable
+ RemoteUpdatesOptions = []
+ Fields = <>
+ Params = <>
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteDataAdapter = RemoteDataAdapter
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ LogicalName = 'Region'
+ IndexDefs = <>
+ Left = 144
+ Top = 136
+ end
+ object ds_Region: TDADataSource
+ DataSet = tbl_Region.Dataset
+ DataTable = tbl_Region
+ Left = 152
+ Top = 144
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesClientData.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesClientData.pas
new file mode 100644
index 0000000..a719cf3
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesClientData.pas
@@ -0,0 +1,35 @@
+unit ExportedDataTablesClientData;
+
+interface
+
+uses
+ {vcl:} SysUtils, Classes, DB, DBClient,
+ {RemObjects:} uROClient, uROClientIntf, uRORemoteService, uROBinMessage, uROWinInetHTTPChannel,
+ {Data Abstract:} uDADataTable, uDABin2DataStreamer, uDAInterfaces, uDARemoteDataAdapter,
+ uDAScriptingProvider, uDAMemDataTable, uDADataStreamer;
+
+type
+ TExportedDataTablesClientDataModule = class(TDataModule)
+ Message: TROBinMessage;
+ Channel: TROWinInetHTTPChannel;
+ RemoteService: TRORemoteService;
+ DataStreamer: TDABin2DataStreamer;
+ RemoteDataAdapter: TDARemoteDataAdapter;
+ tbl_Customers: TDAMemDataTable;
+ ds_Customers: TDADataSource;
+ tbl_Region: TDAMemDataTable;
+ ds_Region: TDADataSource;
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ ExportedDataTablesClientDataModule: TExportedDataTablesClientDataModule;
+
+implementation
+
+{$R *.dfm}
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesClientMain.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesClientMain.dfm
new file mode 100644
index 0000000..f1840b6
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesClientMain.dfm
@@ -0,0 +1,81 @@
+object ExportedDataTablesClientMainForm: TExportedDataTablesClientMainForm
+ Left = 431
+ Top = 315
+ AutoScroll = False
+ Caption = 'Exported DataTables - Client'
+ ClientHeight = 287
+ ClientWidth = 494
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Splitter1: TSplitter
+ Left = 0
+ Top = 163
+ Width = 494
+ Height = 3
+ Cursor = crVSplit
+ Align = alBottom
+ end
+ object DBGrid1: TDBGrid
+ Left = 0
+ Top = 41
+ Width = 494
+ Height = 122
+ Align = alClient
+ DataSource = ExportedDataTablesClientDataModule.ds_Customers
+ TabOrder = 0
+ TitleFont.Charset = DEFAULT_CHARSET
+ TitleFont.Color = clWindowText
+ TitleFont.Height = -11
+ TitleFont.Name = 'MS Sans Serif'
+ TitleFont.Style = []
+ end
+ object DBGrid2: TDBGrid
+ Left = 0
+ Top = 166
+ Width = 494
+ Height = 121
+ Align = alBottom
+ DataSource = ExportedDataTablesClientDataModule.ds_Region
+ TabOrder = 1
+ TitleFont.Charset = DEFAULT_CHARSET
+ TitleFont.Color = clWindowText
+ TitleFont.Height = -11
+ TitleFont.Name = 'MS Sans Serif'
+ TitleFont.Style = []
+ end
+ object Panel1: TPanel
+ Left = 0
+ Top = 0
+ Width = 494
+ Height = 41
+ Align = alTop
+ BevelOuter = bvNone
+ TabOrder = 2
+ object Button1: TButton
+ Left = 8
+ Top = 8
+ Width = 75
+ Height = 25
+ Caption = 'Open/Close'
+ TabOrder = 0
+ OnClick = Button1Click
+ end
+ object Button2: TButton
+ Left = 96
+ Top = 8
+ Width = 75
+ Height = 25
+ Caption = 'ApplyUpdate'
+ TabOrder = 1
+ OnClick = Button2Click
+ end
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesClientMain.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesClientMain.pas
new file mode 100644
index 0000000..ed9b152
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesClientMain.pas
@@ -0,0 +1,50 @@
+unit ExportedDataTablesClientMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
+ uROClient, uROClientIntf, uRORemoteService, uROBinMessage, ExtCtrls,
+ Grids, DBGrids;
+
+type
+ TExportedDataTablesClientMainForm = class(TForm)
+ DBGrid1: TDBGrid;
+ DBGrid2: TDBGrid;
+ Splitter1: TSplitter;
+ Panel1: TPanel;
+ Button1: TButton;
+ Button2: TButton;
+ procedure Button1Click(Sender: TObject);
+ procedure Button2Click(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ ExportedDataTablesClientMainForm: TExportedDataTablesClientMainForm;
+
+implementation
+
+uses
+ ExportedDataTablesClientData, uDADataTable;
+
+{$R *.dfm}
+
+procedure TExportedDataTablesClientMainForm.Button1Click(Sender: TObject);
+begin
+ with ExportedDataTablesClientDataModule.tbl_Customers do
+ Active:= not Active;
+ with ExportedDataTablesClientDataModule.tbl_Region do
+ Active:= not Active;
+end;
+
+procedure TExportedDataTablesClientMainForm.Button2Click(Sender: TObject);
+begin
+ with ExportedDataTablesClientDataModule do
+ RemoteDataAdapter.ApplyUpdates([tbl_Customers,tbl_Region]);
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesGroup.Sample.html b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesGroup.Sample.html
new file mode 100644
index 0000000..cae2130
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesGroup.Sample.html
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+ Exported DataTables Sample
+
+
+
+Purpose
+
+ This example illustrates the functionality of Exported Datatables .
+ Usually Exported Datatables can be used for working with Direct Access Components which currently isn't supported by DataAbstract
+ or for working with shared tables.
+ This sample shows how to receive and update data with TDataset and TDADataTable .
+ Exported Datatables don't need to declared in the ServiceSchema .
+ In this example, TADOTable and TDAMemDataTable are used as Exported Datatables .
+
+
+Getting Started
+
+ Build or compile both projects.
+ Launch the server (via the menu option: RemObjects | Launch Server Executable ).
+ Ensure that ExportedDataTablesClient is the selected project and run it.
+ Check that the client buttons work as expected.
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesGroup.bpg b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesGroup.bpg
new file mode 100644
index 0000000..bc11f5a
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesGroup.bpg
@@ -0,0 +1,23 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = ExportedDataTablesServer.exe ExportedDataTablesClient.exe
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+ExportedDataTablesServer.exe: ExportedDataTablesServer.dpr
+ $(DCC)
+
+ExportedDataTablesClient.exe: ExportedDataTablesClient.dpr
+ $(DCC)
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesGroup.groupproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesGroup.groupproj
new file mode 100644
index 0000000..b6ce3e5
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesGroup.groupproj
@@ -0,0 +1,44 @@
+
+
+ {1b923e1d-5c1f-42e1-8cf0-86e40fcf6cc9}
+
+
+
+
+
+
+
+ Default.Personality
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesLibrary.rodl b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesLibrary.rodl
new file mode 100644
index 0000000..cc54180
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesLibrary.rodl
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesLibrary_Intf.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesLibrary_Intf.pas
new file mode 100644
index 0000000..ea56cba
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesLibrary_Intf.pas
@@ -0,0 +1,82 @@
+unit ExportedDataTablesLibrary_Intf;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+{$I Remobjects.inc}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROXMLIntf, uROClasses, uROClient, uROTypes, uROClientIntf,
+ {Used RODLs:} DataAbstract4_Intf;
+
+const
+ { Library ID }
+ LibraryUID = '{8B75A505-94E9-4210-B49C-129C6622B98E}';
+ TargetNamespace = '';
+
+ { Service Interface ID's }
+ IExportedDataTablesService_IID : TGUID = '{A76BB708-BF1F-4514-AC45-960F5E6199FA}';
+
+ { Event ID's }
+
+type
+ { Forward declarations }
+ IExportedDataTablesService = interface;
+
+
+
+
+
+ { Enumerateds }
+
+ { IExportedDataTablesService }
+ IExportedDataTablesService = interface(IDataAbstractService)
+ ['{A76BB708-BF1F-4514-AC45-960F5E6199FA}']
+ end;
+
+ { CoExportedDataTablesService }
+ CoExportedDataTablesService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IExportedDataTablesService;
+ end;
+
+ { TExportedDataTablesService_Proxy }
+ TExportedDataTablesService_Proxy = class(TDataAbstractService_Proxy, IExportedDataTablesService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ end;
+
+implementation
+
+uses
+ {vcl:} SysUtils,
+ {RemObjects:} uROEventRepository, uROSerializer, uRORes;
+
+{ CoExportedDataTablesService }
+
+class function CoExportedDataTablesService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IExportedDataTablesService;
+begin
+ result := TExportedDataTablesService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+function TExportedDataTablesService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'ExportedDataTablesService';
+end;
+
+initialization
+ RegisterProxyClass(IExportedDataTablesService_IID, TExportedDataTablesService_Proxy);
+
+
+finalization
+ UnregisterProxyClass(IExportedDataTablesService_IID);
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesLibrary_Invk.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesLibrary_Invk.pas
new file mode 100644
index 0000000..1f911fc
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesLibrary_Invk.pas
@@ -0,0 +1,35 @@
+unit ExportedDataTablesLibrary_Invk;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+{$I Remobjects.inc}
+
+interface
+
+uses
+ {vcl:} Classes,
+ {RemObjects:} uROXMLIntf, uROServer, uROServerIntf, uROTypes, uROClientIntf,
+ {Used RODL Intf's:} DataAbstract4_Intf,
+ {Used RODL Invk's:} DataAbstract4_Invk,
+ {Generated:} ExportedDataTablesLibrary_Intf;
+
+type
+ TExportedDataTablesService_Invoker = class(TDataAbstractService_Invoker)
+ private
+ protected
+ published
+ end;
+
+implementation
+
+uses
+ {RemObjects:} uRORes, uROClient;
+
+initialization
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesServer.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesServer.dpr
new file mode 100644
index 0000000..7a68dff
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesServer.dpr
@@ -0,0 +1,29 @@
+program ExportedDataTablesServer;
+
+{#ROGEN:ExportedDataTablesLibrary.RODL} // RemObjects SDK: Careful, do not remove!
+
+uses
+ uROComInit,
+ uROComboService,
+ Forms,
+ ExportedDataTablesServerMain in 'ExportedDataTablesServerMain.pas' {ExportedDataTablesServerMainForm},
+ ExportedDataTablesServerData in 'ExportedDataTablesServerData.pas' {ExportedDataTablesServerDataModule: TDataModule},
+ ExportedDataTablesLibrary_Intf in 'ExportedDataTablesLibrary_Intf.pas',
+ ExportedDataTablesLibrary_Invk in 'ExportedDataTablesLibrary_Invk.pas',
+ ExportedDataTablesService_Impl in 'ExportedDataTablesService_Impl.pas' {ExportedDataTablesService: TDataAbstractService};
+
+{$R *.res}
+{$R RODLFile.res}
+
+begin
+ if ROStartService('ExportedDataTables', 'ExportedDataTables') then begin
+ ROService.CreateForm(TExportedDataTablesServerDataModule, ExportedDataTablesServerDataModule);
+ ROService.Run;
+ Exit;
+ end;
+
+ Application.Initialize;
+ Application.CreateForm(TExportedDataTablesServerDataModule, ExportedDataTablesServerDataModule);
+ Application.CreateForm(TExportedDataTablesServerMainForm, ExportedDataTablesServerMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesServer.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesServer.dproj
new file mode 100644
index 0000000..ea29d95
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesServer.dproj
@@ -0,0 +1,219 @@
+
+
+ {aac31484-1919-4f53-b725-ac72b8534f54}
+ ExportedDataTablesServer.dpr
+ Debug
+ AnyCPU
+ DCC32
+ ExportedDataTablesServer.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1049
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Core Lab Data Access GUI related Components
+ Core Lab Data Access Components
+ Data Access Components for MySQL
+ MySQL Data Access GUI related Components
+ Oracle Data Access Components
+ Oracle Data Access GUI related Components
+ SQL Server Data Access Components
+ SQL Server Data Access GUI related Components
+ RemObjects Data Abstract - InterBase Express Driver
+ RemObjects Data Abstract - Scripting Integration Library
+ RemObjects Data Abstract - dbExpress Driver
+ RemObjects Data Abstract - SQLite Driver
+ RemObjects Data Abstract - DBISAM Driver
+ RemObjects Data Abstract - ElevateDB Driver
+ RemObjects Data Abstract - FIBPlus Driver
+ RemObjects Data Abstract - CoreLabs IBDAC Driver
+ RemObjects Data Abstract - CoreLabs MyDAC Driver
+ Data Abstract - NexusDB Driver
+ RemObjects Data Abstract - CoreLabs ODAC Driver
+ RemObjects Data Abstract - MicroOlap PostgresDAC Driver
+ RemObjects Data Abstract - 'Rosetta'
+ RemObjects Data Abstract - CoreLabs SDAC Driver
+ CodeGear C++Builder Office XP Servers Package
+ Microsoft Office 2000 Sample Automation Server Wrapper Components
+ Microsoft Office XP Sample Automation Server Wrapper Components
+ Core Lab InterBase Data Access Components
+ Data Access Components for MySQL - TMySQLMonitor
+
+
+ ExportedDataTablesServer.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+ TDataModule
+
+
+
+
+
+
+ TDataAbstractService
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesServer.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesServer.res
new file mode 100644
index 0000000..dc22e33
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesServer.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesServerData.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesServerData.dfm
new file mode 100644
index 0000000..de789cb
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesServerData.dfm
@@ -0,0 +1,106 @@
+object ExportedDataTablesServerDataModule: TExportedDataTablesServerDataModule
+ OldCreateOrder = False
+ OnCreate = DataModuleCreate
+ Left = 411
+ Top = 233
+ Height = 251
+ Width = 352
+ object Server: TROIndyHTTPServer
+ Dispatchers = <
+ item
+ Name = 'Message'
+ Message = Message
+ Enabled = True
+ PathInfo = 'Bin'
+ end>
+ Port = 8099
+ Left = 32
+ Top = 8
+ end
+ object Message: TROBinMessage
+ Left = 32
+ Top = 56
+ end
+ object ConnectionManager: TDAConnectionManager
+ Connections = <
+ item
+ Name = 'Northwind'
+ ConnectionString =
+ 'ADO?AuxDriver=SQLOLEDB.1;Server=localhost;Database=Northwind;Int' +
+ 'egrated Security=SSPI'
+ Description = 'Microsoft SQL Server 2000, localhost'
+ ConnectionType = 'MSSQL'
+ Default = True
+ end>
+ DriverManager = DriverManager
+ PoolingEnabled = True
+ Left = 136
+ Top = 56
+ end
+ object DriverManager: TDADriverManager
+ DriverDirectory = '%SYSTEM%\'
+ TraceActive = False
+ TraceFlags = []
+ Left = 136
+ Top = 10
+ end
+ object ADODriver: TDAADODriver
+ Left = 256
+ Top = 8
+ end
+ object DataDictionary: TDADataDictionary
+ Fields = <>
+ Left = 32
+ Top = 104
+ end
+ object SessionManager: TROInMemorySessionManager
+ Left = 136
+ Top = 104
+ end
+ object Schema: TDASchema
+ ConnectionManager = ConnectionManager
+ DataDictionary = DataDictionary
+ Datasets = <
+ item
+ Params = <>
+ Statements = <
+ item
+ ConnectionType = 'MSSQL'
+ Default = True
+ TargetTable = 'Region'
+ StatementType = stAutoSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'RegionID'
+ TableField = 'RegionID'
+ end
+ item
+ DatasetField = 'RegionDescription'
+ TableField = 'RegionDescription'
+ end>
+ end>
+ Name = 'Region'
+ Fields = <
+ item
+ Name = 'RegionID'
+ DataType = datInteger
+ Required = True
+ InPrimaryKey = True
+ end
+ item
+ Name = 'RegionDescription'
+ DataType = datWideString
+ Size = 50
+ Required = True
+ end>
+ end>
+ JoinDataTables = <>
+ UnionDataTables = <>
+ Commands = <>
+ RelationShips = <>
+ UpdateRules = <>
+ Version = 0
+ Left = 256
+ Top = 56
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesServerData.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesServerData.pas
new file mode 100644
index 0000000..19b381b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesServerData.pas
@@ -0,0 +1,44 @@
+unit ExportedDataTablesServerData;
+
+interface
+
+uses
+ SysUtils, Classes,
+ uROClient, uROPoweredByRemObjectsButton, uROClientIntf, uROServer,
+ uROBinMessage, uROIndyHTTPServer,
+ uDAEngine, uDADriverManager, uDAClasses, uROSessions,
+ uDAIBXDriver, uDAADODriver, uROIndyTCPServer, uDADataStreamer,
+ uDABin2DataStreamer, DB, ADODB, uDAScriptingProvider, uDADataTable,
+ uDAMemDataTable;
+
+type
+ TExportedDataTablesServerDataModule = class(TDataModule)
+ Server: TROIndyHTTPServer;
+ Message: TROBinMessage;
+ ConnectionManager: TDAConnectionManager;
+ DriverManager: TDADriverManager;
+ ADODriver: TDAADODriver;
+ SessionManager: TROInMemorySessionManager;
+ Schema: TDASchema;
+ DataDictionary: TDADataDictionary;
+
+ procedure DataModuleCreate(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ ExportedDataTablesServerDataModule: TExportedDataTablesServerDataModule;
+
+implementation
+
+{$R *.dfm}
+
+procedure TExportedDataTablesServerDataModule.DataModuleCreate(Sender: TObject);
+begin
+ Server.Active := true;
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesServerMain.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesServerMain.dfm
new file mode 100644
index 0000000..e27aba1
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesServerMain.dfm
@@ -0,0 +1,25 @@
+object ExportedDataTablesServerMainForm: TExportedDataTablesServerMainForm
+ Left = 372
+ Top = 277
+ BorderStyle = bsDialog
+ Caption = 'Exported DataTables - Server'
+ ClientHeight = 64
+ ClientWidth = 228
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ PixelsPerInch = 96
+ TextHeight = 13
+ object DAPoweredByDataAbstractButton1: TDAPoweredByDataAbstractButton
+ Left = 8
+ Top = 8
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesServerMain.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesServerMain.pas
new file mode 100644
index 0000000..3666032
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesServerMain.pas
@@ -0,0 +1,25 @@
+unit ExportedDataTablesServerMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
+ uDAPoweredByDataAbstractButton, uROPoweredByRemObjectsButton;
+
+type
+ TExportedDataTablesServerMainForm = class(TForm)
+ DAPoweredByDataAbstractButton1: TDAPoweredByDataAbstractButton;
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ ExportedDataTablesServerMainForm: TExportedDataTablesServerMainForm;
+
+implementation
+
+{$R *.dfm}
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesService_Impl.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesService_Impl.dfm
new file mode 100644
index 0000000..e5648b2
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesService_Impl.dfm
@@ -0,0 +1,50 @@
+object ExportedDataTablesService: TExportedDataTablesService
+ OldCreateOrder = True
+ SessionManager = ExportedDataTablesServerDataModule.SessionManager
+ ServiceDataStreamer = DataStreamer
+ ExportedDataTables = <
+ item
+ DataTable = MemDataTable
+ LogicalName = 'Region'
+ end
+ item
+ DataTable = ADOTable
+ LogicalName = 'Customers'
+ end>
+ Left = 432
+ Top = 189
+ Height = 164
+ Width = 244
+ object DataStreamer: TDABin2DataStreamer
+ Left = 32
+ Top = 8
+ end
+ object MemDataTable: TDAMemDataTable
+ RemoteUpdatesOptions = [ruoOnPost]
+ Fields = <>
+ Params = <>
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteFetchEnabled = False
+ LocalSchema = ExportedDataTablesServerDataModule.Schema
+ LocalDataStreamer = DABin2DataStreamer1
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ LogicalName = 'Region'
+ IndexDefs = <>
+ Left = 32
+ Top = 56
+ end
+ object ADOTable: TADOTable
+ ConnectionString =
+ 'Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security In' +
+ 'fo=False;Initial Catalog=Northwind;Data Source=localhost'
+ CursorType = ctStatic
+ TableName = 'Customers'
+ Left = 136
+ Top = 56
+ end
+ object DABin2DataStreamer1: TDABin2DataStreamer
+ Left = 136
+ Top = 8
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesService_Impl.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesService_Impl.pas
new file mode 100644
index 0000000..412a5ea
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/ExportedDataTablesService_Impl.pas
@@ -0,0 +1,53 @@
+unit ExportedDataTablesService_Impl;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ This is where you are supposed to code the implementation of your objects. }
+{----------------------------------------------------------------------------}
+
+{$I Remobjects.inc}
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils,
+ {RemObjects:} uROXMLIntf, uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
+ {Required:} uRORemoteDataModule,
+ {Ancestor Implementation:} DataAbstractService_Impl,
+ {Used RODLs:} DataAbstract4_Intf,
+ {Generated:} ExportedDataTablesLibrary_Intf, uDADataStreamer,
+ uDABin2DataStreamer, uDAClasses, uDAScriptingProvider, uDADataTable,
+ uDAMemDataTable, DB, ADODB;
+
+type
+ { TExportedDataTablesService }
+ TExportedDataTablesService = class(TDataAbstractService, IExportedDataTablesService)
+ DataStreamer: TDABin2DataStreamer;
+ MemDataTable: TDAMemDataTable;
+ ADOTable: TADOTable;
+ DABin2DataStreamer1: TDABin2DataStreamer;
+ private
+ protected
+ { IExportedDataTablesService methods }
+ end;
+
+implementation
+
+{$R *.dfm}
+uses
+ {Generated:} ExportedDataTablesLibrary_Invk,ExportedDataTablesServerData;
+
+procedure Create_ExportedDataTablesService(out anInstance : IUnknown);
+begin
+ anInstance := TExportedDataTablesService.Create(nil);
+end;
+
+{ ExportedDataTablesService }
+initialization
+ TROClassFactory.Create('ExportedDataTablesService', Create_ExportedDataTablesService, TExportedDataTablesService_Invoker);
+
+finalization
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/RODLFILE.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/RODLFILE.res
new file mode 100644
index 0000000..84655a5
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Exported DataTables/RODLFILE.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/Fetch.Sample.html b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/Fetch.Sample.html
new file mode 100644
index 0000000..c101fc0
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/Fetch.Sample.html
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+
+
+
+
+ Fetch
+
+
+
+Purpose
+
+ This demo shows how to fetch paged orders and also master/detail via single
+ server call. See the
+ DA04
+
+ article for a discussion on Dynamic Method Binding using this
+ sample as its example.
+Getting Started
+
+ When you compile and run both projects you will see the client present you
+ with two tabbed pages:
+
+
+
+
+ Paged Orders : when the master dataset ("Orders") is opened,
+ the first 40 records are fetched from the server (assuming that you haven't
+ modified the Max Records Per Fetch setting). Try clicking on the vertical
+ scrollbar.
+ Initially, you will be displaying the other records fetched when the dataset
+ was opened. Once you have reached record 40, another batch of records are then
+ fetched from the server and you can see when this happens because the scrollbar
+ thumb reduces size. OrderDetail records are only fetched as required.
+
+
+ Fetch All : retrieves all orders within the range specified. All
+ associated OrderDetail records are retrieved also.
+
+
+Examine the Code
+
+ The following methods are worth examining:
+
+
+
+ GetOrdersAndDetails in FetchService_Impl : called by the Fetch
+ All page and it shows how to retrieve master and detail records in a single
+ server call.
+
+
+ tbl_PagedOrdersAfterScroll in FetchClientMain : holds the paging logic.
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/Fetch.bdsgroup b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/Fetch.bdsgroup
new file mode 100644
index 0000000..d2590a9
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/Fetch.bdsgroup
@@ -0,0 +1,20 @@
+
+
+
+
+ Default.Personality
+
+ 1.0
+ {715B3650-279A-41A1-897D-75EC7A71B1C5}
+
+
+
+
+
+ FetchServer.bdsproj
+ FetchClient.bdsproj
+ FetchServer.exe FetchClient.exe
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/Fetch.bpg b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/Fetch.bpg
new file mode 100644
index 0000000..2469b7d
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/Fetch.bpg
@@ -0,0 +1,23 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = FetchServer.exe FetchClient.exe
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+FetchServer.exe: FetchServer.dpr
+ $(DCC)
+
+FetchClient.exe: FetchClient.dpr
+ $(DCC)
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/Fetch.groupproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/Fetch.groupproj
new file mode 100644
index 0000000..deb928a
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/Fetch.groupproj
@@ -0,0 +1,44 @@
+
+
+ {b6910b17-afe5-4bb5-af6f-cf820851de91}
+
+
+
+
+
+
+
+ Default.Personality
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchClient.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchClient.bdsproj
new file mode 100644
index 0000000..87209ab
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchClient.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {A3DFF050-4EE5-48AB-9169-B78CA5059729}
+
+
+
+
+ FetchClient.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchClient.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchClient.dpr
new file mode 100644
index 0000000..f5f7e44
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchClient.dpr
@@ -0,0 +1,18 @@
+program FetchClient;
+
+uses
+ uROComInit,
+ Forms,
+ MidasLib,
+ FetchClientMain in 'FetchClientMain.pas' {FetchClientMainForm},
+ FetchClientData in 'FetchClientData.pas' {FetchClientDataModule: TDAClientDataModule};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'Fetch Client';
+ Application.CreateForm(TFetchClientDataModule, FetchClientDataModule);
+ Application.CreateForm(TFetchClientMainForm, FetchClientMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchClient.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchClient.dproj
new file mode 100644
index 0000000..47c8158
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchClient.dproj
@@ -0,0 +1,44 @@
+
+
+ {3ef0f4e0-3dde-4abb-b2e8-8b555c0f23dc}
+ FetchClient.dpr
+ Debug
+ AnyCPU
+ DCC32
+ FetchClient.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+ False
+ $(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10;D:\Jenya\DLIB\jcl\lib\d11\debug
+ $(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10;D:\Jenya\DLIB\jcl\lib\d11\debug
+ $(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10;D:\Jenya\DLIB\jcl\lib\d11\debug
+ $(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10;D:\Jenya\DLIB\jcl\lib\d11\debug
+
+
+ Delphi.Personality
+
+
+False True False False False 1 0 0 0 False False False False False 1033 1252 1.0.0.0 1.0.0.0 FetchClient.dpr
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchClient.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchClient.res
new file mode 100644
index 0000000..da01de5
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchClient.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchClientData.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchClientData.dfm
new file mode 100644
index 0000000..836db84
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchClientData.dfm
@@ -0,0 +1,30 @@
+object FetchClientDataModule: TFetchClientDataModule
+ OldCreateOrder = True
+ Height = 300
+ Width = 300
+ object Channel: TROWinInetHTTPChannel
+ UserAgent = 'RemObjects SDK'
+ TargetURL = 'http://localhost:8099/BIN'
+ ServerLocators = <>
+ DispatchOptions = []
+ Left = 40
+ Top = 8
+ end
+ object Message: TROBinMessage
+ Left = 40
+ Top = 52
+ end
+ object RemoteService: TRORemoteService
+ Message = Message
+ Channel = Channel
+ ServiceName = 'FetchService'
+ Left = 40
+ Top = 96
+ end
+ object DataStreamer: TDABin2DataStreamer
+ BufferSize = 262144
+ SendReducedDelta = False
+ Left = 40
+ Top = 140
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchClientData.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchClientData.pas
new file mode 100644
index 0000000..c80a7c8
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchClientData.pas
@@ -0,0 +1,32 @@
+unit FetchClientData;
+
+interface
+
+uses
+ {vcl:} SysUtils, Classes, DB, DBClient,
+ {RemObjects:} uROClient, uROClientIntf, uRORemoteService, uROBinMessage, uROWinInetHTTPChannel,
+ {Data Abstract:} uDABin2DataStreamer, uDADataStreamer;
+
+type
+ TFetchClientDataModule = class(TDataModule)
+ Message: TROBinMessage;
+ Channel: TROWinInetHTTPChannel;
+ RemoteService: TRORemoteService;
+ DataStreamer: TDABin2DataStreamer;
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+
+ end;
+
+var
+ FetchClientDataModule: TFetchClientDataModule;
+
+implementation
+
+uses
+ FetchClientMain;
+{$R *.dfm}
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchClientMain.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchClientMain.dfm
new file mode 100644
index 0000000..a79df0e
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchClientMain.dfm
@@ -0,0 +1,926 @@
+object FetchClientMainForm: TFetchClientMainForm
+ Left = 353
+ Top = 279
+ Caption = 'Fetch Client'
+ ClientHeight = 406
+ ClientWidth = 447
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poDesigned
+ PixelsPerInch = 96
+ TextHeight = 13
+ object PageControl1: TPageControl
+ Left = 0
+ Top = 0
+ Width = 447
+ Height = 406
+ ActivePage = TabSheet2
+ Align = alClient
+ TabOrder = 0
+ object TabSheet1: TTabSheet
+ BorderWidth = 5
+ Caption = 'Paged Orders'
+ object Label1: TLabel
+ Left = 0
+ Top = 9
+ Width = 115
+ Height = 13
+ Caption = 'Max Records Per Fetch:'
+ end
+ object lbFetchedRecs: TLabel
+ Left = 222
+ Top = 9
+ Width = 117
+ Height = 13
+ Caption = 'No records fetched yet...'
+ end
+ object gPagedOrders: TDBGrid
+ Left = 2
+ Top = 51
+ Width = 429
+ Height = 207
+ Align = alCustom
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ DataSource = ds_PagedOrders
+ TabOrder = 0
+ TitleFont.Charset = DEFAULT_CHARSET
+ TitleFont.Color = clWindowText
+ TitleFont.Height = -11
+ TitleFont.Name = 'MS Sans Serif'
+ TitleFont.Style = []
+ end
+ object seMaxRecords: TSpinEdit
+ Left = 126
+ Top = 4
+ Width = 81
+ Height = 22
+ MaxValue = 0
+ MinValue = 0
+ TabOrder = 1
+ Value = 40
+ end
+ object bFetchPagedOrders: TButton
+ Left = 354
+ Top = 3
+ Width = 75
+ Height = 25
+ Anchors = [akTop, akRight]
+ Caption = 'Open/Close'
+ TabOrder = 2
+ OnClick = bFetchPagedOrdersClick
+ end
+ object gPagedOrderDetails: TDBGrid
+ Left = 0
+ Top = 264
+ Width = 429
+ Height = 104
+ Align = alBottom
+ DataSource = ds_PagedOrderDetails
+ TabOrder = 3
+ TitleFont.Charset = DEFAULT_CHARSET
+ TitleFont.Color = clWindowText
+ TitleFont.Height = -11
+ TitleFont.Name = 'MS Sans Serif'
+ TitleFont.Style = []
+ end
+ object Panel1: TPanel
+ Left = 0
+ Top = 259
+ Width = 429
+ Height = 5
+ Align = alBottom
+ BevelOuter = bvNone
+ TabOrder = 4
+ end
+ end
+ object TabSheet2: TTabSheet
+ BorderWidth = 5
+ Caption = 'Fetch All'
+ ImageIndex = 1
+ object Label2: TLabel
+ Left = 0
+ Top = 3
+ Width = 65
+ Height = 13
+ Caption = 'Start OrderID:'
+ end
+ object Label3: TLabel
+ Left = 0
+ Top = 27
+ Width = 62
+ Height = 13
+ Caption = 'End OrderID:'
+ end
+ object gOrders: TDBGrid
+ Left = 2
+ Top = 51
+ Width = 427
+ Height = 207
+ Align = alCustom
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ DataSource = ds_Orders
+ TabOrder = 0
+ TitleFont.Charset = DEFAULT_CHARSET
+ TitleFont.Color = clWindowText
+ TitleFont.Height = -11
+ TitleFont.Name = 'MS Sans Serif'
+ TitleFont.Style = []
+ end
+ object gOrderDetails: TDBGrid
+ Left = 0
+ Top = 264
+ Width = 429
+ Height = 104
+ Align = alBottom
+ DataSource = ds_OrderDetails
+ TabOrder = 1
+ TitleFont.Charset = DEFAULT_CHARSET
+ TitleFont.Color = clWindowText
+ TitleFont.Height = -11
+ TitleFont.Name = 'MS Sans Serif'
+ TitleFont.Style = []
+ end
+ object bFetchAll: TButton
+ Left = 354
+ Top = 3
+ Width = 75
+ Height = 25
+ Anchors = [akTop, akRight]
+ Caption = 'Open/Close'
+ TabOrder = 2
+ OnClick = bFetchAllClick
+ end
+ object seStart: TSpinEdit
+ Left = 72
+ Top = 0
+ Width = 76
+ Height = 22
+ MaxValue = 0
+ MinValue = 0
+ TabOrder = 3
+ Value = 10248
+ end
+ object seEnd: TSpinEdit
+ Left = 72
+ Top = 24
+ Width = 76
+ Height = 22
+ MaxValue = 0
+ MinValue = 0
+ TabOrder = 4
+ Value = 10300
+ end
+ object Panel2: TPanel
+ Left = 0
+ Top = 259
+ Width = 429
+ Height = 5
+ Align = alBottom
+ BevelOuter = bvNone
+ TabOrder = 5
+ end
+ end
+ end
+ object daPaged: TDARemoteDataAdapter
+ GetSchemaCall.RemoteService = FetchClientDataModule.RemoteService
+ GetDataCall.RemoteService = FetchClientDataModule.RemoteService
+ UpdateDataCall.RemoteService = FetchClientDataModule.RemoteService
+ GetScriptsCall.RemoteService = FetchClientDataModule.RemoteService
+ RemoteService = FetchClientDataModule.RemoteService
+ DataStreamer = FetchClientDataModule.DataStreamer
+ FailureBehavior = fbBoth
+ Left = 117
+ Top = 143
+ end
+ object tbl_OrderDetails: TDAMemDataTable
+ RemoteUpdatesOptions = []
+ Fields = <
+ item
+ Name = 'OrderID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ProductID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'UnitPrice'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Quantity'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Discount'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ Params = <
+ item
+ Name = 'StartingOrderID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ Value = ''
+ ParamType = daptInput
+ end
+ item
+ Name = 'EndingOrderID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ Value = ''
+ ParamType = daptInput
+ end>
+ MasterMappingMode = mmWhere
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteFetchEnabled = False
+ RemoteDataAdapter = daFetchAll
+ ReadOnly = False
+ MasterSource = ds_Orders
+ MasterFields = 'OrderID'
+ DetailFields = 'OrderID'
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ LogicalName = 'OrderDetails'
+ Left = 269
+ Top = 157
+ end
+ object ds_OrderDetails: TDADataSource
+ DataSet = tbl_OrderDetails.Dataset
+ DataTable = tbl_OrderDetails
+ Left = 297
+ Top = 157
+ end
+ object tbl_Orders: TDAMemDataTable
+ RemoteUpdatesOptions = []
+ Fields = <
+ item
+ Name = 'OrderID'
+ DataType = datAutoInc
+ BlobType = dabtUnknown
+ GeneratorName = 'Orders'
+ DecimalPrecision = 0
+ DecimalScale = 0
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CustomerID'
+ DataType = datWideString
+ Size = 5
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'EmployeeID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'OrderDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'RequiredDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShippedDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipVia'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Freight'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipName'
+ DataType = datWideString
+ Size = 40
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipAddress'
+ DataType = datWideString
+ Size = 60
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipCity'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipRegion'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipPostalCode'
+ DataType = datWideString
+ Size = 10
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipCountry'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ Params = <
+ item
+ Name = 'StartingOrderID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ Value = ''
+ ParamType = daptInput
+ end
+ item
+ Name = 'EndingOrderID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ Value = ''
+ ParamType = daptInput
+ end>
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteDataAdapter = daFetchAll
+ ReadOnly = False
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates, moAllInOneFetch]
+ LogicalName = 'Orders'
+ Left = 269
+ Top = 129
+ end
+ object ds_Orders: TDADataSource
+ DataSet = tbl_Orders.Dataset
+ DataTable = tbl_Orders
+ Left = 297
+ Top = 129
+ end
+ object tbl_PagedOrderDetails: TDAMemDataTable
+ RemoteUpdatesOptions = []
+ Fields = <
+ item
+ Name = 'OrderID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ProductID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'UnitPrice'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Quantity'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Discount'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ Params = <>
+ MasterMappingMode = mmWhere
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteDataAdapter = daPaged
+ ReadOnly = False
+ MasterSource = ds_PagedOrders
+ MasterFields = 'OrderID'
+ DetailFields = 'OrderID'
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ LogicalName = 'PagedOrderDetails'
+ Left = 61
+ Top = 157
+ end
+ object ds_PagedOrderDetails: TDADataSource
+ DataSet = tbl_PagedOrderDetails.Dataset
+ DataTable = tbl_PagedOrderDetails
+ Left = 89
+ Top = 157
+ end
+ object tbl_PagedOrders: TDAMemDataTable
+ RemoteUpdatesOptions = []
+ Fields = <
+ item
+ Name = 'OrderID'
+ DataType = datAutoInc
+ BlobType = dabtUnknown
+ GeneratorName = 'Orders'
+ DecimalPrecision = 0
+ DecimalScale = 0
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CustomerID'
+ DataType = datWideString
+ Size = 5
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'EmployeeID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'OrderDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'RequiredDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShippedDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipVia'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Freight'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipName'
+ DataType = datWideString
+ Size = 40
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipAddress'
+ DataType = datWideString
+ Size = 60
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipCity'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipRegion'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipPostalCode'
+ DataType = datWideString
+ Size = 10
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipCountry'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ Params = <
+ item
+ Name = 'StartingOrderID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ Value = ''
+ ParamType = daptInput
+ end>
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteDataAdapter = daPaged
+ AfterScroll = tbl_PagedOrdersAfterScroll
+ ReadOnly = False
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ LogicalName = 'PagedOrders'
+ Left = 61
+ Top = 129
+ end
+ object ds_PagedOrders: TDADataSource
+ DataSet = tbl_PagedOrders.Dataset
+ DataTable = tbl_PagedOrders
+ Left = 89
+ Top = 129
+ end
+ object daFetchAll: TDARemoteDataAdapter
+ GetSchemaCall.RemoteService = FetchClientDataModule.RemoteService
+ GetDataCall.RemoteService = FetchClientDataModule.RemoteService
+ GetDataCall.MethodName = 'GetOrdersAndDetails'
+ GetDataCall.Params = <
+ item
+ Name = 'Result'
+ DataType = rtBinary
+ Flag = fResult
+ Value = Null
+ end
+ item
+ Name = 'StartOrderID'
+ DataType = rtInteger
+ Flag = fIn
+ Value = Null
+ end
+ item
+ Name = 'EndOrderID'
+ DataType = rtInteger
+ Flag = fIn
+ Value = Null
+ end>
+ GetDataCall.Default = False
+ GetDataCall.OutgoingTableNamesParameter = 'aTableNameArray'
+ GetDataCall.OutgoingTableRequestInfosParameter = 'aTableRequestInfoArray'
+ GetDataCall.IncomingDataParameter = 'Result'
+ UpdateDataCall.RemoteService = FetchClientDataModule.RemoteService
+ GetScriptsCall.RemoteService = FetchClientDataModule.RemoteService
+ RemoteService = FetchClientDataModule.RemoteService
+ DataStreamer = FetchClientDataModule.DataStreamer
+ FailureBehavior = fbBoth
+ Left = 325
+ Top = 143
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchClientMain.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchClientMain.pas
new file mode 100644
index 0000000..1be4b4e
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchClientMain.pas
@@ -0,0 +1,121 @@
+unit FetchClientMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
+ uROClient, uROClientIntf, uRORemoteService, uROBinMessage, ExtCtrls, Spin,
+ Grids, DBGrids, ComCtrls, DB, uDAInterfaces, uDADataTable,
+ uDAScriptingProvider, uDAMemDataTable, uDARemoteDataAdapter;
+
+type
+ TFetchClientMainForm = class(TForm)
+ PageControl1: TPageControl;
+ TabSheet1: TTabSheet;
+ Label1: TLabel;
+ lbFetchedRecs: TLabel;
+ gPagedOrders: TDBGrid;
+ seMaxRecords: TSpinEdit;
+ bFetchPagedOrders: TButton;
+ gPagedOrderDetails: TDBGrid;
+ Panel1: TPanel;
+ TabSheet2: TTabSheet;
+ Label2: TLabel;
+ Label3: TLabel;
+ gOrders: TDBGrid;
+ gOrderDetails: TDBGrid;
+ bFetchAll: TButton;
+ seStart: TSpinEdit;
+ seEnd: TSpinEdit;
+ Panel2: TPanel;
+ daPaged: TDARemoteDataAdapter;
+ tbl_OrderDetails: TDAMemDataTable;
+ ds_OrderDetails: TDADataSource;
+ tbl_Orders: TDAMemDataTable;
+ ds_Orders: TDADataSource;
+ tbl_PagedOrderDetails: TDAMemDataTable;
+ ds_PagedOrderDetails: TDADataSource;
+ tbl_PagedOrders: TDAMemDataTable;
+ ds_PagedOrders: TDADataSource;
+ daFetchAll: TDARemoteDataAdapter;
+ procedure bFetchPagedOrdersClick(Sender: TObject);
+ procedure bFetchAllClick(Sender: TObject);
+ procedure tbl_PagedOrdersAfterScroll(DataTable: TDADataTable);
+ private
+ { Private declarations }
+ fFetchRequired: boolean;
+ public
+ { Public declarations }
+ end;
+
+var
+ FetchClientMainForm: TFetchClientMainForm;
+
+implementation
+
+uses
+ FetchClientData;
+
+{$R *.dfm}
+
+procedure TFetchClientMainForm.bFetchAllClick(Sender: TObject);
+begin
+ { Sets the filtering options for the server method so we only retrieve the selected
+ records. It's good advice to always filter data like this to minimize network trafic.
+
+ The server method is defined as:
+
+ function GetOrdersAndDetails(const StartOrderID: Integer;
+ const EndOrderID: Integer): Binary;
+
+ The Binary returned by the server contains a stream with all the orders and all the details }
+
+ daFetchAll.GetDataCall.ParamByName('StartOrderID').AsInteger := seStart.Value;
+ daFetchAll.GetDataCall.ParamByName('EndOrderID').AsInteger := seEnd.Value;
+ tbl_Orders.Active :=not tbl_Orders.Active;
+end;
+
+procedure TFetchClientMainForm.bFetchPagedOrdersClick(Sender: TObject);
+begin
+ lbFetchedRecs.Caption := 'No records fetched yet...';
+ if not tbl_PagedOrders.Active then begin
+ tbl_PagedOrders.ParamByName('StartingOrderID').AsInteger := 0;
+ tbl_PagedOrders.MaxRecords := seMaxRecords.Value;
+ lbFetchedRecs.Caption := 'No records fetched yet...';
+ // fFetchedRequired is a flag that we set to FALSE when the last page is fetched
+ fFetchRequired := True;
+ end;
+ tbl_PagedOrders.Active := not tbl_PagedOrders.Active
+end;
+
+procedure TFetchClientMainForm.tbl_PagedOrdersAfterScroll(
+ DataTable: TDADataTable);
+var
+ lrecordcount: integer;
+begin
+ { This is the core of the paging process. When we reach the last record in the current
+ set we want to issue a new request to the server to get the next packet. If the requested
+ records is different than the returned amount it means there's nothing more to fetch and
+ we're done with the paging.
+
+ By doing paging this way we have full control on what happens server side and what SQL statements
+ are generated. This is only one of the many possible paging implementations you could do using
+ Data Abstract. The control is in your hands! }
+
+ if fFetchRequired and DataTable.EOF and not DataTable.Fetching then
+ with DataTable do begin
+ ParamByName('StartingOrderID').AsInteger := FieldByName('OrderID').AsInteger;
+ MaxRecords := seMaxRecords.Value;
+ lrecordcount := DataTable.RecordCount;
+ LoadFromRemoteSource(True);
+ lrecordcount := RecordCount-lrecordcount;
+
+ lbFetchedRecs.Caption := IntTostr(lrecordcount) + ' records retrieved';
+ fFetchRequired := lrecordcount = MaxRecords;
+ if not fFetchRequired then
+ MessageDlg(Format('Done fetching!!! Expected %d rows but only got %d ',
+ [MaxRecords, lrecordcount]), mtInformation, [mbOK], 0);
+ end;
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchLibrary.RODL b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchLibrary.RODL
new file mode 100644
index 0000000..8f79f9a
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchLibrary.RODL
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchLibrary_Intf.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchLibrary_Intf.pas
new file mode 100644
index 0000000..874a513
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchLibrary_Intf.pas
@@ -0,0 +1,104 @@
+unit FetchLibrary_Intf;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+{$I Remobjects.inc}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROXMLIntf, uROClasses, uROClient, uROTypes, uROClientIntf,
+ {Used RODLs:} DataAbstract4_Intf;
+
+const
+ { Library ID }
+ LibraryUID = '{02C22018-F060-4159-A052-DDFAECD3EA97}';
+ TargetNamespace = '';
+
+ { Service Interface ID's }
+ IFetchService_IID : TGUID = '{E70F3537-38F1-4C4E-AB64-6935C9C9CF69}';
+
+ { Event ID's }
+
+type
+ { Forward declarations }
+ IFetchService = interface;
+
+
+
+
+
+ { Enumerateds }
+
+ { IFetchService }
+ IFetchService = interface(IDataAbstractService)
+ ['{E70F3537-38F1-4C4E-AB64-6935C9C9CF69}']
+ function GetOrdersAndDetails(const StartOrderID: Integer; const EndOrderID: Integer): Binary;
+ end;
+
+ { CoFetchService }
+ CoFetchService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IFetchService;
+ end;
+
+ { TFetchService_Proxy }
+ TFetchService_Proxy = class(TDataAbstractService_Proxy, IFetchService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ function GetOrdersAndDetails(const StartOrderID: Integer; const EndOrderID: Integer): Binary;
+ end;
+
+implementation
+
+uses
+ {vcl:} SysUtils,
+ {RemObjects:} uROEventRepository, uROSerializer, uRORes;
+
+{ CoFetchService }
+
+class function CoFetchService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IFetchService;
+begin
+ result := TFetchService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TFetchService_Proxy }
+
+function TFetchService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'FetchService';
+end;
+
+function TFetchService_Proxy.GetOrdersAndDetails(const StartOrderID: Integer; const EndOrderID: Integer): Binary;
+begin
+ try
+ result := nil;
+ __Message.InitializeRequestMessage(__TransportChannel, 'FetchLibrary', __InterfaceName, 'GetOrdersAndDetails');
+ __Message.Write('StartOrderID', TypeInfo(Integer), StartOrderID, []);
+ __Message.Write('EndOrderID', TypeInfo(Integer), EndOrderID, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Binary), result, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+initialization
+ RegisterProxyClass(IFetchService_IID, TFetchService_Proxy);
+
+
+finalization
+ UnregisterProxyClass(IFetchService_IID);
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchLibrary_Invk.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchLibrary_Invk.pas
new file mode 100644
index 0000000..00626d4
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchLibrary_Invk.pas
@@ -0,0 +1,69 @@
+unit FetchLibrary_Invk;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+{$I Remobjects.inc}
+
+interface
+
+uses
+ {vcl:} Classes,
+ {RemObjects:} uROXMLIntf, uROServer, uROServerIntf, uROTypes, uROClientIntf,
+ {Used RODL Intf's:} DataAbstract4_Intf,
+ {Used RODL Invk's:} DataAbstract4_Invk,
+ {Generated:} FetchLibrary_Intf;
+
+type
+ {$M+}
+ TFetchService_Invoker = class(TDataAbstractService_Invoker)
+ private
+ protected
+ published
+ procedure Invoke_GetOrdersAndDetails(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ end;
+ {$M-}
+
+implementation
+
+uses
+ {RemObjects:} uRORes, uROClient;
+
+{ TFetchService_Invoker }
+
+procedure TFetchService_Invoker.Invoke_GetOrdersAndDetails(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function GetOrdersAndDetails(const StartOrderID: Integer; const EndOrderID: Integer): Binary; }
+var
+ StartOrderID: Integer;
+ EndOrderID: Integer;
+ lResult: Binary;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ lResult := nil;
+ try
+ __Message.Read('StartOrderID', TypeInfo(Integer), StartOrderID, []);
+ __Message.Read('EndOrderID', TypeInfo(Integer), EndOrderID, []);
+
+ lResult := (__Instance as IFetchService).GetOrdersAndDetails(StartOrderID, EndOrderID);
+
+ __Message.InitializeResponseMessage(__Transport, 'FetchLibrary', 'FetchService', 'GetOrdersAndDetailsResponse');
+ __Message.Write('Result', TypeInfo(Binary), lResult, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(lResult);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchServer.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchServer.bdsproj
new file mode 100644
index 0000000..b800b9e
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchServer.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {8B031825-1B54-482D-9291-2BDCE6D94E00}
+
+
+
+
+ FetchServer.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchServer.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchServer.dpr
new file mode 100644
index 0000000..4d702b2
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchServer.dpr
@@ -0,0 +1,24 @@
+program FetchServer;
+
+{#ROGEN:FetchLibrary.RODL} // RemObjects SDK: Careful, do not remove!
+
+uses
+ uROComInit,
+ uROComboService,
+ Forms,
+ FetchServerMain in 'FetchServerMain.pas' {FetchServerMainForm},
+ FetchServerData in 'FetchServerData.pas' {FetchServerDataModule: TDataModule},
+ FetchLibrary_Intf in 'FetchLibrary_Intf.pas',
+ FetchLibrary_Invk in 'FetchLibrary_Invk.pas',
+ FetchService_Impl in 'FetchService_Impl.pas' {FetchService: TDataAbstractService};
+
+{$R *.res}
+{$R RODLFile.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'Fetch Server';
+ Application.CreateForm(TFetchServerDataModule, FetchServerDataModule);
+ Application.CreateForm(TFetchServerMainForm, FetchServerMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchServer.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchServer.dproj
new file mode 100644
index 0000000..7708464
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchServer.dproj
@@ -0,0 +1,44 @@
+
+
+ {c960438c-973c-4609-85d8-f600fec539dc}
+ FetchServer.dpr
+ Debug
+ AnyCPU
+ DCC32
+ FetchServer.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+
+
+False True False False False 1 0 0 0 False False False False False 1033 1252 1.0.0.0 1.0.0.0 FetchServer.dpr
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchServer.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchServer.res
new file mode 100644
index 0000000..7455d6e
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchServer.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchServerData.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchServerData.dfm
new file mode 100644
index 0000000..06b3c89
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchServerData.dfm
@@ -0,0 +1,58 @@
+object FetchServerDataModule: TFetchServerDataModule
+ OldCreateOrder = False
+ OnCreate = DataModuleCreate
+ Height = 207
+ Width = 352
+ object Server: TROIndyHTTPServer
+ Dispatchers = <
+ item
+ Name = 'Message'
+ Message = Message
+ Enabled = True
+ PathInfo = 'Bin'
+ end>
+ Port = 8099
+ Left = 32
+ Top = 8
+ end
+ object Message: TROBinMessage
+ Left = 32
+ Top = 56
+ end
+ object ConnectionManager: TDAConnectionManager
+ Connections = <
+ item
+ Name = 'Northwind'
+ ConnectionString =
+ 'ADO?AuxDriver=SQLOLEDB.1;Server=localhost;Database=Northwind;Int' +
+ 'egrated Security=SSPI'
+ Description = 'Microsoft SQL Server 2000, localhost'
+ Default = True
+ Tag = 0
+ end>
+ DriverManager = DriverManager
+ PoolingEnabled = True
+ Left = 136
+ Top = 56
+ end
+ object DriverManager: TDADriverManager
+ DriverDirectory = '%SYSTEM%\'
+ TraceActive = False
+ TraceFlags = []
+ Left = 136
+ Top = 10
+ end
+ object ADODriver: TDAADODriver
+ Left = 256
+ Top = 8
+ end
+ object DataDictionary: TDADataDictionary
+ Fields = <>
+ Left = 32
+ Top = 104
+ end
+ object SessionManager: TROInMemorySessionManager
+ Left = 136
+ Top = 104
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchServerData.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchServerData.pas
new file mode 100644
index 0000000..d7ad9cb
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchServerData.pas
@@ -0,0 +1,41 @@
+unit FetchServerData;
+
+interface
+
+uses
+ SysUtils, Classes,
+ uROClient, uROPoweredByRemObjectsButton, uROClientIntf, uROServer,
+ uROBinMessage, uROIndyHTTPServer,
+ uDAEngine, uDADriverManager, uDAClasses, uROSessions,
+ uDAADODriver, uROIndyTCPServer;
+
+type
+ TFetchServerDataModule = class(TDataModule)
+ Server: TROIndyHTTPServer;
+ Message: TROBinMessage;
+ ConnectionManager: TDAConnectionManager;
+ DriverManager: TDADriverManager;
+ ADODriver: TDAADODriver;
+ SessionManager: TROInMemorySessionManager;
+ DataDictionary: TDADataDictionary;
+
+ procedure DataModuleCreate(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ FetchServerDataModule: TFetchServerDataModule;
+
+implementation
+
+{$R *.dfm}
+
+procedure TFetchServerDataModule.DataModuleCreate(Sender: TObject);
+begin
+ Server.Active := true;
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchServerMain.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchServerMain.dfm
new file mode 100644
index 0000000..bdeb43b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchServerMain.dfm
@@ -0,0 +1,25 @@
+object FetchServerMainForm: TFetchServerMainForm
+ Left = 372
+ Top = 277
+ BorderStyle = bsDialog
+ Caption = 'Fetch Server'
+ ClientHeight = 64
+ ClientWidth = 228
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ PixelsPerInch = 96
+ TextHeight = 13
+ object DAPoweredByDataAbstractButton1: TDAPoweredByDataAbstractButton
+ Left = 8
+ Top = 8
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchServerMain.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchServerMain.pas
new file mode 100644
index 0000000..6d39b86
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchServerMain.pas
@@ -0,0 +1,25 @@
+unit FetchServerMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
+ uDAPoweredByDataAbstractButton, uROPoweredByRemObjectsButton;
+
+type
+ TFetchServerMainForm = class(TForm)
+ DAPoweredByDataAbstractButton1: TDAPoweredByDataAbstractButton;
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ FetchServerMainForm: TFetchServerMainForm;
+
+implementation
+
+{$R *.dfm}
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchService_Impl.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchService_Impl.dfm
new file mode 100644
index 0000000..2d46bb3
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchService_Impl.dfm
@@ -0,0 +1,857 @@
+object FetchService: TFetchService
+ OldCreateOrder = True
+ SessionManager = FetchServerDataModule.SessionManager
+ ServiceSchema = Schema
+ ServiceDataStreamer = DataStreamer
+ ExportedDataTables = <>
+ Height = 300
+ Width = 300
+ object Schema: TDASchema
+ ConnectionManager = FetchServerDataModule.ConnectionManager
+ DataDictionary = FetchServerDataModule.DataDictionary
+ Datasets = <
+ item
+ Params = <>
+ Statements = <
+ item
+ Connection = 'Northwind'
+ TargetTable = 'Order Details'
+ StatementType = stAutoSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'OrderID'
+ TableField = 'OrderID'
+ end
+ item
+ DatasetField = 'ProductID'
+ TableField = 'ProductID'
+ end
+ item
+ DatasetField = 'UnitPrice'
+ TableField = 'UnitPrice'
+ end
+ item
+ DatasetField = 'Quantity'
+ TableField = 'Quantity'
+ end
+ item
+ DatasetField = 'Discount'
+ TableField = 'Discount'
+ end>
+ end>
+ Name = 'PagedOrderDetails'
+ Fields = <
+ item
+ Name = 'OrderID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ProductID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'UnitPrice'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Quantity'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Discount'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ BusinessRulesClient.ScriptLanguage = rslPascalScript
+ BusinessRulesServer.ScriptLanguage = rslPascalScript
+ end
+ item
+ Params = <
+ item
+ Name = 'StartingOrderID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ Value = ''
+ ParamType = daptInput
+ end
+ item
+ Name = 'EndingOrderID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ Value = ''
+ ParamType = daptInput
+ end>
+ Statements = <
+ item
+ Connection = 'Northwind'
+ TargetTable = 'Order Details'
+ SQL =
+ 'SELECT '#10' OrderID, ProductID, UnitPrice, Quantity, Discount'#10'FR' +
+ 'OM'#10' [Order Details]'#10'WHERE'#10' OrderID >= :StartingOrderID an' +
+ 'd'#10' OrderID <= :EndingOrderID and'#10' {Where}'#10
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'OrderID'
+ TableField = 'OrderID'
+ end
+ item
+ DatasetField = 'ProductID'
+ TableField = 'ProductID'
+ end
+ item
+ DatasetField = 'UnitPrice'
+ TableField = 'UnitPrice'
+ end
+ item
+ DatasetField = 'Quantity'
+ TableField = 'Quantity'
+ end
+ item
+ DatasetField = 'Discount'
+ TableField = 'Discount'
+ end>
+ end>
+ Name = 'OrderDetails'
+ Fields = <
+ item
+ Name = 'OrderID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ProductID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'UnitPrice'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Quantity'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Discount'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ BusinessRulesClient.ScriptLanguage = rslPascalScript
+ BusinessRulesServer.ScriptLanguage = rslPascalScript
+ end
+ item
+ Params = <
+ item
+ Name = 'StartingOrderID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ Value = ''
+ ParamType = daptInput
+ end
+ item
+ Name = 'EndingOrderID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ Value = ''
+ ParamType = daptInput
+ end>
+ Statements = <
+ item
+ Connection = 'Northwind'
+ TargetTable = 'Orders'
+ SQL =
+ 'SELECT '#10' OrderID, CustomerID, EmployeeID, OrderDate, Required' +
+ 'Date, '#10' ShippedDate, ShipVia, Freight, ShipName, ShipAddress,' +
+ ' '#10' ShipCity, ShipRegion, ShipPostalCode, ShipCountry'#10'FROM'#10' ' +
+ ' Orders'#10'WHERE'#10' OrderID >= :StartingOrderID and'#10' OrderID ' +
+ '<= :EndingOrderID and'#10' {Where}'#10' '#10
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'OrderID'
+ TableField = 'OrderID'
+ end
+ item
+ DatasetField = 'CustomerID'
+ TableField = 'CustomerID'
+ end
+ item
+ DatasetField = 'EmployeeID'
+ TableField = 'EmployeeID'
+ end
+ item
+ DatasetField = 'OrderDate'
+ TableField = 'OrderDate'
+ end
+ item
+ DatasetField = 'RequiredDate'
+ TableField = 'RequiredDate'
+ end
+ item
+ DatasetField = 'ShippedDate'
+ TableField = 'ShippedDate'
+ end
+ item
+ DatasetField = 'ShipVia'
+ TableField = 'ShipVia'
+ end
+ item
+ DatasetField = 'Freight'
+ TableField = 'Freight'
+ end
+ item
+ DatasetField = 'ShipName'
+ TableField = 'ShipName'
+ end
+ item
+ DatasetField = 'ShipAddress'
+ TableField = 'ShipAddress'
+ end
+ item
+ DatasetField = 'ShipCity'
+ TableField = 'ShipCity'
+ end
+ item
+ DatasetField = 'ShipRegion'
+ TableField = 'ShipRegion'
+ end
+ item
+ DatasetField = 'ShipPostalCode'
+ TableField = 'ShipPostalCode'
+ end
+ item
+ DatasetField = 'ShipCountry'
+ TableField = 'ShipCountry'
+ end>
+ end>
+ Name = 'Orders'
+ Fields = <
+ item
+ Name = 'OrderID'
+ DataType = datAutoInc
+ BlobType = dabtUnknown
+ GeneratorName = 'Orders'
+ DecimalPrecision = 0
+ DecimalScale = 0
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CustomerID'
+ DataType = datWideString
+ Size = 5
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'EmployeeID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'OrderDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'RequiredDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShippedDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipVia'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Freight'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipName'
+ DataType = datWideString
+ Size = 40
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipAddress'
+ DataType = datWideString
+ Size = 60
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipCity'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipRegion'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipPostalCode'
+ DataType = datWideString
+ Size = 10
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipCountry'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ BusinessRulesClient.ScriptLanguage = rslPascalScript
+ BusinessRulesServer.ScriptLanguage = rslPascalScript
+ end
+ item
+ Params = <
+ item
+ Name = 'StartingOrderID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ Value = ''
+ ParamType = daptInput
+ end>
+ Statements = <
+ item
+ Connection = 'Northwind'
+ TargetTable = 'Orders'
+ SQL =
+ 'SELECT '#10' OrderID, CustomerID, EmployeeID, OrderDate, Required' +
+ 'Date, '#10' ShippedDate, ShipVia, Freight, ShipName, ShipAddress,' +
+ ' '#10' ShipCity, ShipRegion, ShipPostalCode, ShipCountry'#10'FROM'#10' ' +
+ ' Orders'#10'WHERE'#10' OrderID > :StartingOrderID and'#10' {Where}'#10'ORD' +
+ 'ER BY'#10' OrderID'#10
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'OrderID'
+ TableField = 'OrderID'
+ end
+ item
+ DatasetField = 'CustomerID'
+ TableField = 'CustomerID'
+ end
+ item
+ DatasetField = 'EmployeeID'
+ TableField = 'EmployeeID'
+ end
+ item
+ DatasetField = 'OrderDate'
+ TableField = 'OrderDate'
+ end
+ item
+ DatasetField = 'RequiredDate'
+ TableField = 'RequiredDate'
+ end
+ item
+ DatasetField = 'ShippedDate'
+ TableField = 'ShippedDate'
+ end
+ item
+ DatasetField = 'ShipVia'
+ TableField = 'ShipVia'
+ end
+ item
+ DatasetField = 'Freight'
+ TableField = 'Freight'
+ end
+ item
+ DatasetField = 'ShipName'
+ TableField = 'ShipName'
+ end
+ item
+ DatasetField = 'ShipAddress'
+ TableField = 'ShipAddress'
+ end
+ item
+ DatasetField = 'ShipCity'
+ TableField = 'ShipCity'
+ end
+ item
+ DatasetField = 'ShipRegion'
+ TableField = 'ShipRegion'
+ end
+ item
+ DatasetField = 'ShipPostalCode'
+ TableField = 'ShipPostalCode'
+ end
+ item
+ DatasetField = 'ShipCountry'
+ TableField = 'ShipCountry'
+ end>
+ end>
+ Name = 'PagedOrders'
+ Fields = <
+ item
+ Name = 'OrderID'
+ DataType = datAutoInc
+ BlobType = dabtUnknown
+ GeneratorName = 'Orders'
+ DecimalPrecision = 0
+ DecimalScale = 0
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CustomerID'
+ DataType = datWideString
+ Size = 5
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'EmployeeID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'OrderDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'RequiredDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShippedDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipVia'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Freight'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipName'
+ DataType = datWideString
+ Size = 40
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipAddress'
+ DataType = datWideString
+ Size = 60
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipCity'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipRegion'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipPostalCode'
+ DataType = datWideString
+ Size = 10
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipCountry'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ BusinessRulesClient.ScriptLanguage = rslPascalScript
+ BusinessRulesServer.ScriptLanguage = rslPascalScript
+ end>
+ JoinDataTables = <>
+ UnionDataTables = <>
+ Commands = <>
+ RelationShips = <>
+ UpdateRules = <>
+ Version = 0
+ Left = 32
+ Top = 56
+ end
+ object DataStreamer: TDABin2DataStreamer
+ BufferSize = 262144
+ SendReducedDelta = False
+ Left = 32
+ Top = 8
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchService_Impl.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchService_Impl.pas
new file mode 100644
index 0000000..945d08d
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/FetchService_Impl.pas
@@ -0,0 +1,74 @@
+unit FetchService_Impl;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ This is where you are supposed to code the implementation of your objects. }
+{----------------------------------------------------------------------------}
+
+{$I Remobjects.inc}
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils,
+ {RemObjects:} uROXMLIntf, uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
+ {Required:} uRORemoteDataModule,
+ {Ancestor Implementation:} DataAbstractService_Impl,
+ {Used RODLs:} DataAbstract4_Intf,
+ {Generated:} FetchLibrary_Intf, uDADataStreamer, uDABin2DataStreamer,
+ uDAClasses, FetchServerData, uDAInterfaces;
+
+type
+ { TFetchService }
+ TFetchService = class(TDataAbstractService, IFetchService)
+ DataStreamer: TDABin2DataStreamer;
+ Schema: TDASchema;
+ private
+ protected
+ { IFetchService methods }
+ function GetOrdersAndDetails(const StartOrderID: Integer; const EndOrderID: Integer): Binary;
+ end;
+
+implementation
+
+{$R *.dfm}
+uses
+ {Generated:} FetchLibrary_Invk;
+
+procedure Create_FetchService(out anInstance : IUnknown);
+begin
+ anInstance := TFetchService.Create(nil);
+end;
+
+{ FetchService }
+function TFetchService.GetOrdersAndDetails(const StartOrderID: Integer; const EndOrderID: Integer): Binary;
+
+ procedure ProcessDataset(aDataset: IDADataset);
+ begin
+ aDataset.ParamByName('StartingOrderID').AsInteger := StartOrderID;
+ aDataset.ParamByName('EndingOrderID').AsInteger := EndOrderID;
+ aDataset.Open;
+ DataStreamer.WriteDataset(aDataset, [woRows], -1);
+ end;
+
+begin
+ result := Binary.Create;
+ DataStreamer.Initialize(result, aiWrite);
+ try
+ // writing orders
+ ProcessDataset(Schema.NewDataset(Connection, 'Orders'));
+ // writing order details
+ ProcessDataset(Schema.NewDataset(Connection, 'OrderDetails'));
+ finally
+ DataStreamer.Finalize;
+ end;
+end;
+
+initialization
+ TROClassFactory.Create('FetchService', Create_FetchService, TFetchService_Invoker);
+
+finalization
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/RODLFILE.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/RODLFILE.res
new file mode 100644
index 0000000..be37b0d
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Fetch/RODLFILE.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSample.Sample.html b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSample.Sample.html
new file mode 100644
index 0000000..02a861a
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSample.Sample.html
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+
+ First Sample
+
+
+
+Purpose
+
+ This example illustrates the basic functionality of Data Abstract from RemObjects Software.
+ The application shows how to receive data from a remote database.
+
+
+Getting Started
+
+ Build or compile both projects.
+ Launch the server (via the menu option: RemObjects | Launch Server Executable ).
+ Ensure that FirstSampleClient is the selected project and run it.
+ Check that the client buttons work as expected.
+ Modify the server names list and retry the client actions.
+
+Examine the Code
+
+
+ This application was created using the Data Abstract 4.0 Combo Server wizard
+ (see File->New->Other, tab RemObjects Data Abstract).
+ After running the wizard, only a DBGrid, two Buttons and 3 lines of code were added.
+
+
+ Examine the simple code in FirstSampleclientMain.pas .
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSample.bdsgroup b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSample.bdsgroup
new file mode 100644
index 0000000..3121f9f
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSample.bdsgroup
@@ -0,0 +1,20 @@
+
+
+
+
+ Default.Personality
+
+ 1.0
+ {F88FE0BC-F908-4398-982A-AACAB34BECB7}
+
+
+
+
+
+ FirstSampleServer.bdsproj
+ FirstSampleClient.bdsproj
+ FirstSampleServer.exe FirstSampleClient.exe
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSample.bpg b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSample.bpg
new file mode 100644
index 0000000..1de9e53
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSample.bpg
@@ -0,0 +1,23 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = FirstSampleServer.exe FirstSampleClient.exe
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+FirstSampleServer.exe: FirstSampleServer.dpr
+ $(DCC)
+
+FirstSampleClient.exe: FirstSampleClient.dpr
+ $(DCC)
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSample.groupproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSample.groupproj
new file mode 100644
index 0000000..26658df
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSample.groupproj
@@ -0,0 +1,40 @@
+
+
+ {7122486e-398e-464f-b75b-a8169350c11e}
+
+
+
+
+ Default.Personality
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleClient.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleClient.bdsproj
new file mode 100644
index 0000000..df27704
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleClient.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {EC3EE225-4548-4705-B5A4-AFADF4300FDD}
+
+
+
+
+ FirstSampleClient.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleClient.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleClient.dpr
new file mode 100644
index 0000000..7477e94
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleClient.dpr
@@ -0,0 +1,18 @@
+program FirstSampleClient;
+
+uses
+ uROComInit,
+ Forms,
+ MidasLib,
+ FirstSampleclientMain in 'FirstSampleclientMain.pas' {FirstSampleclientMainForm},
+ FirstSampleClientData in 'FirstSampleClientData.pas' {FirstSampleClientDataModule: TDAClientDataModule};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'First Sample Client';
+ Application.CreateForm(TFirstSampleClientDataModule, FirstSampleClientDataModule);
+ Application.CreateForm(TFirstSampleclientMainForm, FirstSampleclientMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleClient.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleClient.dproj
new file mode 100644
index 0000000..d05ce2b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleClient.dproj
@@ -0,0 +1,75 @@
+
+
+ {2ac631a8-06a9-4df5-8645-51b6996e3f52}
+ FirstSampleClient.dpr
+ Debug
+ AnyCPU
+ DCC32
+ FirstSampleClient.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ FirstSampleClient.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleClient.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleClient.res
new file mode 100644
index 0000000..da01de5
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleClient.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleClientData.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleClientData.dfm
new file mode 100644
index 0000000..30dab50
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleClientData.dfm
@@ -0,0 +1,191 @@
+object FirstSampleClientDataModule: TFirstSampleClientDataModule
+ OldCreateOrder = True
+ Left = 139
+ Top = 77
+ Height = 300
+ Width = 300
+ object Channel: TROWinInetHTTPChannel
+ ServerLocators = <>
+ DispatchOptions = []
+ UserAgent = 'RemObjects SDK'
+ TargetURL = 'http://localhost:8099/BIN'
+ Left = 40
+ Top = 8
+ end
+ object Message: TROBinMessage
+ Left = 40
+ Top = 52
+ end
+ object RemoteService: TRORemoteService
+ Message = Message
+ Channel = Channel
+ ServiceName = 'FirstSampleService'
+ Left = 40
+ Top = 96
+ end
+ object DataStreamer: TDABinDataStreamer
+ Left = 40
+ Top = 140
+ end
+ object RemoteDataAdapter: TDARemoteDataAdapter
+ GetSchemaCall.RemoteService = RemoteService
+ GetDataCall.RemoteService = RemoteService
+ UpdateDataCall.RemoteService = RemoteService
+ GetScriptsCall.RemoteService = RemoteService
+ RemoteService = RemoteService
+ DataStreamer = DataStreamer
+ Left = 40
+ Top = 184
+ end
+ object tbl_Customers: TDACDSDataTable
+ RemoteUpdatesOptions = []
+ Fields = <
+ item
+ Name = 'CustomerID'
+ DataType = datWideString
+ Size = 5
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CompanyName'
+ DataType = datWideString
+ Size = 40
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ContactName'
+ DataType = datWideString
+ Size = 30
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ContactTitle'
+ DataType = datWideString
+ Size = 30
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Address'
+ DataType = datWideString
+ Size = 60
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'City'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Region'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'PostalCode'
+ DataType = datWideString
+ Size = 10
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Country'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Phone'
+ DataType = datWideString
+ Size = 24
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Fax'
+ DataType = datWideString
+ Size = 24
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ Params = <>
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteDataAdapter = RemoteDataAdapter
+ ReadOnly = False
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ LogicalName = 'Customers'
+ IndexDefs = <>
+ Left = 130
+ Top = 117
+ end
+ object ds_Customers: TDADataSource
+ DataTable = tbl_Customers
+ Left = 138
+ Top = 125
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleClientData.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleClientData.pas
new file mode 100644
index 0000000..45c6a8b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleClientData.pas
@@ -0,0 +1,34 @@
+unit FirstSampleClientData;
+
+interface
+
+uses
+ {vcl:} SysUtils, Classes, DB, DBClient,
+ {RemObjects:} uROClient, uROClientIntf, uRORemoteService, uROBinMessage, uROWinInetHTTPChannel,
+ {Data Abstract:} uDADataTable, uDABINAdapter, uDAInterfaces,
+ uDADataStreamer, uDARemoteDataAdapter, uDAScriptingProvider,
+ uDACDSDataTable;
+
+type
+ TFirstSampleClientDataModule = class(TDataModule)
+ Message: TROBinMessage;
+ Channel: TROWinInetHTTPChannel;
+ RemoteService: TRORemoteService;
+ DataStreamer: TDABinDataStreamer;
+ RemoteDataAdapter: TDARemoteDataAdapter;
+ tbl_Customers: TDACDSDataTable;
+ ds_Customers: TDADataSource;
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ FirstSampleClientDataModule: TFirstSampleClientDataModule;
+
+implementation
+
+{$R *.dfm}
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleLibrary.RODL b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleLibrary.RODL
new file mode 100644
index 0000000..b83e242
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleLibrary.RODL
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleLibrary_Intf.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleLibrary_Intf.pas
new file mode 100644
index 0000000..3b688bc
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleLibrary_Intf.pas
@@ -0,0 +1,76 @@
+unit FirstSampleLibrary_Intf;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROClasses, uROClient, uROTypes, uROClientIntf,
+ {Used RODLs:} DataAbstract4_Intf;
+
+const
+ { Library ID }
+ LibraryUID = '{668FD1CF-765E-4C72-86E1-5BB53EA5CE34}';
+
+ { Service Interface ID's }
+ IFirstSampleService_IID : TGUID = '{58D29079-CADF-4D12-B78C-F1403B2BBF34}';
+
+ { Event ID's }
+
+type
+ { Forward declarations }
+ IFirstSampleService = interface;
+
+
+
+
+ { IFirstSampleService }
+ IFirstSampleService = interface(IDataAbstractService)
+ ['{58D29079-CADF-4D12-B78C-F1403B2BBF34}']
+ end;
+
+ { CoFirstSampleService }
+ CoFirstSampleService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IFirstSampleService;
+ end;
+
+ { TFirstSampleService_Proxy }
+ TFirstSampleService_Proxy = class(TDataAbstractService_Proxy, IFirstSampleService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ end;
+
+implementation
+
+uses
+ {vcl:} SysUtils,
+ {RemObjects:} uROEventRepository, uRORes;
+
+{ CoFirstSampleService }
+
+class function CoFirstSampleService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IFirstSampleService;
+begin
+ result := TFirstSampleService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+function TFirstSampleService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'FirstSampleService';
+end;
+
+initialization
+ RegisterProxyClass(IFirstSampleService_IID, TFirstSampleService_Proxy);
+
+
+finalization
+ UnregisterProxyClass(IFirstSampleService_IID);
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleLibrary_Invk.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleLibrary_Invk.pas
new file mode 100644
index 0000000..d4eb2fb
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleLibrary_Invk.pas
@@ -0,0 +1,32 @@
+unit FirstSampleLibrary_Invk;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes,
+ {RemObjects:} uROServer, uROServerIntf, uROTypes, uROClientIntf,
+ {Used RODL Intf's:} DataAbstract4_Intf,
+ {Used RODL Invk's:} DataAbstract4_Invk,
+ {Generated:} FirstSampleLibrary_Intf;
+
+type
+ TFirstSampleService_Invoker = class(TDataAbstractService_Invoker)
+ private
+ protected
+ published
+ end;
+
+implementation
+
+uses
+ {RemObjects:} uRORes, uROClient;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleServer.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleServer.bdsproj
new file mode 100644
index 0000000..fa88e8c
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleServer.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {824362B1-0CDF-4ECB-B25D-DDDDAAADCF87}
+
+
+
+
+ FirstSampleServer.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleServer.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleServer.dpr
new file mode 100644
index 0000000..d8d551d
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleServer.dpr
@@ -0,0 +1,30 @@
+program FirstSampleServer;
+
+{#ROGEN:FirstSampleLibrary.RODL} // RemObjects SDK: Careful, do not remove!
+
+uses
+ uROComInit,
+ uROComboService,
+ Forms,
+ FirstSampleServerMain in 'FirstSampleServerMain.pas' {FirstSampleServerMainForm},
+ FirstSampleService_Impl in 'FirstSampleService_Impl.pas' {FirstSampleService: TDARemoteService},
+ FirstSampleServerData in 'FirstSampleServerData.pas' {FirstSampleServerDataModule: TDataModule},
+ FirstSampleLibrary_Intf in 'FirstSampleLibrary_Intf.pas',
+ FirstSampleLibrary_Invk in 'FirstSampleLibrary_Invk.pas';
+
+{$R *.res}
+{$R RODLFile.res}
+
+begin
+ if ROStartService('FirstSample', 'FirstSample') then begin
+ ROService.CreateForm(TFirstSampleServerDataModule, FirstSampleServerDataModule);
+ ROService.Run;
+ Exit;
+ end;
+
+ Application.Initialize;
+ Application.Title := 'First Sample Server';
+ Application.CreateForm(TFirstSampleServerDataModule, FirstSampleServerDataModule);
+ Application.CreateForm(TFirstSampleServerMainForm, FirstSampleServerMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleServer.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleServer.dproj
new file mode 100644
index 0000000..f5ec2f7
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleServer.dproj
@@ -0,0 +1,80 @@
+
+
+ {4845004a-289d-4c48-baea-2a580444e3a9}
+ FirstSampleServer.dpr
+ Debug
+ AnyCPU
+ DCC32
+ FirstSampleServer.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ FirstSampleServer.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleServer.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleServer.res
new file mode 100644
index 0000000..7455d6e
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleServer.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleServerData.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleServerData.dfm
new file mode 100644
index 0000000..e3abc09
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleServerData.dfm
@@ -0,0 +1,69 @@
+object FirstSampleServerDataModule: TFirstSampleServerDataModule
+ OldCreateOrder = False
+ OnCreate = DataModuleCreate
+ Left = 74
+ Top = 68
+ Height = 207
+ Width = 352
+ object Server: TROIndyHTTPServer
+ Dispatchers = <
+ item
+ Name = 'Message'
+ Message = Message
+ Enabled = True
+ PathInfo = 'Bin'
+ end>
+ Port = 8099
+ Left = 32
+ Top = 8
+ end
+ object Message: TROBinMessage
+ Left = 32
+ Top = 56
+ end
+ object ConnectionManager: TDAConnectionManager
+ MaxPoolSize = 10
+ PoolTimeoutSeconds = 60
+ PoolBehaviour = pbWait
+ WaitIntervalSeconds = 1
+ Connections = <
+ item
+ Name = 'Northwind'
+ ConnectionString =
+ 'ADO?AuxDriver=SQLOLEDB.1;Server=localhost;Database=Northwind;Use' +
+ 'rID=sa;Password=;'
+ Description = 'Microsoft SQL Server 2000, localhost'
+ Default = True
+ Tag = 0
+ end>
+ DriverManager = DriverManager
+ PoolingEnabled = True
+ Left = 136
+ Top = 56
+ end
+ object DriverManager: TDADriverManager
+ DriverDirectory = '%SYSTEM%\'
+ AutoLoad = False
+ TraceActive = False
+ TraceFlags = []
+ Left = 136
+ Top = 10
+ end
+ object ADODriver: TDAADODriver
+ Left = 256
+ Top = 8
+ end
+ object IBXDriver: TDAIBXDriver
+ Left = 256
+ Top = 56
+ end
+ object DataDictionary: TDADataDictionary
+ Fields = <>
+ Left = 32
+ Top = 104
+ end
+ object SessionManager: TROInMemorySessionManager
+ Left = 136
+ Top = 104
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleServerData.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleServerData.pas
new file mode 100644
index 0000000..f093cee
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleServerData.pas
@@ -0,0 +1,42 @@
+unit FirstSampleServerData;
+
+interface
+
+uses
+ SysUtils, Classes,
+ uROClient, uROPoweredByRemObjectsButton, uROClientIntf, uROServer,
+ uROBinMessage, uROIndyHTTPServer,
+ uDAEngine, uDADriverManager, uDAClasses, uROSessions,
+ uDAIBXDriver, uDAADODriver, uROIndyTCPServer;
+
+type
+ TFirstSampleServerDataModule = class(TDataModule)
+ Server: TROIndyHTTPServer;
+ Message: TROBinMessage;
+ ConnectionManager: TDAConnectionManager;
+ DriverManager: TDADriverManager;
+ ADODriver: TDAADODriver;
+ IBXDriver: TDAIBXDriver;
+ DataDictionary: TDADataDictionary;
+ SessionManager: TROInMemorySessionManager;
+
+ procedure DataModuleCreate(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ FirstSampleServerDataModule: TFirstSampleServerDataModule;
+
+implementation
+
+{$R *.dfm}
+
+procedure TFirstSampleServerDataModule.DataModuleCreate(Sender: TObject);
+begin
+ Server.Active := true;
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleServerMain.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleServerMain.dfm
new file mode 100644
index 0000000..c62db54
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleServerMain.dfm
@@ -0,0 +1,25 @@
+object FirstSampleServerMainForm: TFirstSampleServerMainForm
+ Left = 109
+ Top = 97
+ BorderStyle = bsDialog
+ Caption = 'First Sample Server'
+ ClientHeight = 64
+ ClientWidth = 228
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ PixelsPerInch = 96
+ TextHeight = 13
+ object DAPoweredByDataAbstractButton1: TDAPoweredByDataAbstractButton
+ Left = 8
+ Top = 8
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleServerMain.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleServerMain.pas
new file mode 100644
index 0000000..bcaeffa
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleServerMain.pas
@@ -0,0 +1,25 @@
+unit FirstSampleServerMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
+ uDAPoweredByDataAbstractButton, uROPoweredByRemObjectsButton;
+
+type
+ TFirstSampleServerMainForm = class(TForm)
+ DAPoweredByDataAbstractButton1: TDAPoweredByDataAbstractButton;
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ FirstSampleServerMainForm: TFirstSampleServerMainForm;
+
+implementation
+
+{$R *.dfm}
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleService_Impl.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleService_Impl.dfm
new file mode 100644
index 0000000..ebb253c
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleService_Impl.dfm
@@ -0,0 +1,227 @@
+object FirstSampleService: TFirstSampleService
+ OldCreateOrder = True
+ SessionManager = FirstSampleServerDataModule.SessionManager
+ AcquireConnection = True
+ ServiceSchema = Schema
+ ServiceDataStreamer = DataStreamer
+ ExportedDataTables = <>
+ Left = 69
+ Top = 46
+ Height = 212
+ Width = 216
+ object DataStreamer: TDABinDataStreamer
+ Left = 32
+ Top = 8
+ end
+ object Schema: TDASchema
+ ConnectionManager = FirstSampleServerDataModule.ConnectionManager
+ DataDictionary = FirstSampleServerDataModule.DataDictionary
+ Datasets = <
+ item
+ Params = <>
+ Statements = <
+ item
+ Connection = 'Northwind'
+ TargetTable = 'Customers'
+ SQL =
+ 'SELECT '#10' CustomerID, CompanyName, ContactName, ContactTitle, ' +
+ #10' Address, City, Region, PostalCode, Country, Phone, '#10' Fax' +
+ #10' FROM'#10' Customers'#10
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'CustomerID'
+ TableField = 'CustomerID'
+ end
+ item
+ DatasetField = 'CompanyName'
+ TableField = 'CompanyName'
+ end
+ item
+ DatasetField = 'ContactName'
+ TableField = 'ContactName'
+ end
+ item
+ DatasetField = 'ContactTitle'
+ TableField = 'ContactTitle'
+ end
+ item
+ DatasetField = 'Address'
+ TableField = 'Address'
+ end
+ item
+ DatasetField = 'City'
+ TableField = 'City'
+ end
+ item
+ DatasetField = 'Region'
+ TableField = 'Region'
+ end
+ item
+ DatasetField = 'PostalCode'
+ TableField = 'PostalCode'
+ end
+ item
+ DatasetField = 'Country'
+ TableField = 'Country'
+ end
+ item
+ DatasetField = 'Phone'
+ TableField = 'Phone'
+ end
+ item
+ DatasetField = 'Fax'
+ TableField = 'Fax'
+ end>
+ end>
+ Name = 'Customers'
+ Fields = <
+ item
+ Name = 'CustomerID'
+ DataType = datWideString
+ Size = 5
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CompanyName'
+ DataType = datWideString
+ Size = 40
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ContactName'
+ DataType = datWideString
+ Size = 30
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ContactTitle'
+ DataType = datWideString
+ Size = 30
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Address'
+ DataType = datWideString
+ Size = 60
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'City'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Region'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'PostalCode'
+ DataType = datWideString
+ Size = 10
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Country'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Phone'
+ DataType = datWideString
+ Size = 24
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Fax'
+ DataType = datWideString
+ Size = 24
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ BusinessRulesClient.ScriptLanguage = rslPascalScript
+ BusinessRulesServer.ScriptLanguage = rslPascalScript
+ end>
+ Commands = <>
+ RelationShips = <
+ item
+ Name = 'FK_Employees_Employees'
+ MasterDatasetName = 'Customers'
+ MasterFields = 'EmployeeID'
+ DetailDatasetName = 'Customers'
+ DetailFields = 'ReportsTo'
+ end>
+ UpdateRules = <>
+ Left = 32
+ Top = 56
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleService_Impl.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleService_Impl.pas
new file mode 100644
index 0000000..e5d0c19
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleService_Impl.pas
@@ -0,0 +1,37 @@
+unit FirstSampleService_Impl;
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils,
+ {RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
+ {Data Abstract:} uDAClasses, uDADataTable, uDABinAdapter, uDAInterfaces, uDADataStreamer,
+ {Ancestor Implementation:} DataAbstractService_Impl,
+ {Used RODLs:} DataAbstract4_Intf,
+ {Generated:} FirstSampleLibrary_Intf;
+
+type
+ { TFirstSampleService }
+ TFirstSampleService = class(TDataAbstractService, IFirstSampleService)
+ DataStreamer: TDABinDataStreamer;
+ Schema: TDASchema;
+ private
+ protected
+ { IFirstSampleService methods }
+ end;
+
+implementation
+
+{$R *.dfm}
+uses
+ {Generated:} FirstSampleLibrary_Invk, FirstSampleServerData;
+
+procedure Create_FirstSampleService(out anInstance: IUnknown);
+begin
+ anInstance := TFirstSampleService.Create(nil);
+end;
+
+initialization
+ TROClassFactory.Create('FirstSampleService', Create_FirstSampleService, TFirstSampleService_Invoker);
+finalization
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleclientMain.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleclientMain.dfm
new file mode 100644
index 0000000..238b333
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleclientMain.dfm
@@ -0,0 +1,59 @@
+object FirstSampleclientMainForm: TFirstSampleclientMainForm
+ Left = 31
+ Top = 80
+ AutoScroll = False
+ Caption = 'First Sample Client'
+ ClientHeight = 411
+ ClientWidth = 615
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -14
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ PixelsPerInch = 120
+ TextHeight = 16
+ object DAPoweredByDataAbstractButton1: TDAPoweredByDataAbstractButton
+ Left = 2
+ Top = 5
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ ApplicationType = atClient
+ end
+ object FillButton: TButton
+ Left = 384
+ Top = 20
+ Width = 92
+ Height = 30
+ Caption = '&Fill'
+ TabOrder = 0
+ OnClick = FillButtonClick
+ end
+ object UpdateButton: TButton
+ Left = 512
+ Top = 20
+ Width = 92
+ Height = 30
+ Caption = '&Update'
+ Enabled = False
+ TabOrder = 1
+ OnClick = UpdateButtonClick
+ end
+ object DBGrid1: TDBGrid
+ Left = 2
+ Top = 70
+ Width = 609
+ Height = 336
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ DataSource = FirstSampleClientDataModule.ds_Customers
+ TabOrder = 2
+ TitleFont.Charset = DEFAULT_CHARSET
+ TitleFont.Color = clWindowText
+ TitleFont.Height = -14
+ TitleFont.Name = 'MS Sans Serif'
+ TitleFont.Style = []
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleclientMain.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleclientMain.pas
new file mode 100644
index 0000000..22e50b7
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/FirstSampleclientMain.pas
@@ -0,0 +1,45 @@
+unit FirstSampleclientMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
+ uROClient, uROClientIntf, uRORemoteService, uROBinMessage, Grids,
+ DBGrids, uROPoweredByRemObjectsButton, uDAPoweredByDataAbstractButton;
+
+type
+ TFirstSampleclientMainForm = class(TForm)
+ DAPoweredByDataAbstractButton1: TDAPoweredByDataAbstractButton;
+ FillButton: TButton;
+ UpdateButton: TButton;
+ DBGrid1: TDBGrid;
+ procedure FillButtonClick(Sender: TObject);
+ procedure UpdateButtonClick(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ FirstSampleclientMainForm: TFirstSampleclientMainForm;
+
+implementation
+
+uses
+ FirstSampleClientData;
+
+{$R *.dfm}
+
+procedure TFirstSampleclientMainForm.FillButtonClick(Sender: TObject);
+begin
+ FirstSampleClientDataModule.tbl_Customers.Open;
+ UpdateButton.Enabled:=True;
+end;
+
+procedure TFirstSampleclientMainForm.UpdateButtonClick(Sender: TObject);
+begin
+ FirstSampleClientDataModule.tbl_Customers.ApplyUpdates;
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/RODLFILE.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/RODLFILE.res
new file mode 100644
index 0000000..f3eeb87
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/First Sample/RODLFILE.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Local Schema/LocalSchema.Sample.html b/official/5.0.30.691/Data Abstract for Delphi/Samples/Local Schema/LocalSchema.Sample.html
new file mode 100644
index 0000000..6e6c2e4
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Local Schema/LocalSchema.Sample.html
@@ -0,0 +1,70 @@
+
+
+
+
+
+
+
+
+
+
+ Local Schema Sample
+
+
+
+Purpose
+
+ A simple demo showing the use of several Data Abstract components to select/update
+ a range of Customer records.
+
+Examine the Code
+
+ The Data Abstract components on the form are:
+
+
+
+ TDAConnectionManager : examine its Connections property - this has a standard
+ collections property editor and Connections[0].ConnectionString supplies
+ an ADO connection to Northwind. If you change this to a different driver, you
+ will need to drop the appropriate driver on the form.
+
+
+ TDADriverManager : a singleton component that manages the drivers used by
+ the application. Set AutoLoad to True and DriverDirectory
+ to your folder containing .DAD files to be loaded when the application
+ starts.
+
+
+ TDAADODriver : supports ADO databases. You can drop other drivers
+ onto the
+ form, e.g. TDAIBXDriver , TDADBXDriver etc.
+
+
+ TDABinDataStreamer : handles the transfer of binary data packets. Note
+ the events provided - they allow you to access/modify the data packets before and
+ after transmission.
+
+
+ TDASchema : manages the datasets available. Double click on its icon to
+ invoke the Schema Modeler .
+
+
+ TDABusinessProcessor : handles dataset updates. Its Schema
+ component is set first followed by ReferencedDataSet .
+
+
+ TDACDSDataTable : a DataAbstract aware descendant of the standard ClientDataSet.
+
+
+ TDADataSource : a DataSource descendant that works with DataTables.
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Local Schema/LocalSchema.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Local Schema/LocalSchema.bdsproj
new file mode 100644
index 0000000..0010851
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Local Schema/LocalSchema.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {161FA349-0193-4AD0-808C-2C2636863CD6}
+
+
+
+
+ LocalSchema.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Local Schema/LocalSchema.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/Local Schema/LocalSchema.dpr
new file mode 100644
index 0000000..ca77be5
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Local Schema/LocalSchema.dpr
@@ -0,0 +1,14 @@
+program LocalSchema;
+
+uses
+ Forms,
+ LocalSchemaMain in 'LocalSchemaMain.pas' {LocalSchemaMainForm};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'Manual DataTable fill';
+ Application.CreateForm(TLocalSchemaMainForm, LocalSchemaMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Local Schema/LocalSchema.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Local Schema/LocalSchema.dproj
new file mode 100644
index 0000000..2b86fe9
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Local Schema/LocalSchema.dproj
@@ -0,0 +1,72 @@
+
+
+ {836cc650-b903-40cd-bf94-647e264ddc3c}
+ LocalSchema.dpr
+ Debug
+ AnyCPU
+ DCC32
+ LocalSchema.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ LocalSchema.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Local Schema/LocalSchema.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Local Schema/LocalSchema.res
new file mode 100644
index 0000000..b946fbb
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Local Schema/LocalSchema.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Local Schema/LocalSchemaMain.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Local Schema/LocalSchemaMain.dfm
new file mode 100644
index 0000000..87b6722
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Local Schema/LocalSchemaMain.dfm
@@ -0,0 +1,759 @@
+object LocalSchemaMainForm: TLocalSchemaMainForm
+ Left = 140
+ Top = 73
+ AutoScroll = False
+ BorderWidth = 5
+ Caption = 'Local Schema Sample'
+ ClientHeight = 317
+ ClientWidth = 502
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Label1: TLabel
+ Left = 0
+ Top = 4
+ Width = 84
+ Height = 13
+ Caption = 'From CustomerID:'
+ end
+ object Label2: TLabel
+ Left = 217
+ Top = 4
+ Width = 74
+ Height = 13
+ Caption = 'To CustomerID:'
+ end
+ object DBGrid1: TDBGrid
+ Left = 0
+ Top = 25
+ Width = 502
+ Height = 262
+ Align = alBottom
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ DataSource = DataSource
+ TabOrder = 0
+ TitleFont.Charset = DEFAULT_CHARSET
+ TitleFont.Color = clWindowText
+ TitleFont.Height = -11
+ TitleFont.Name = 'MS Sans Serif'
+ TitleFont.Style = []
+ end
+ object eCust1: TEdit
+ Left = 88
+ Top = 0
+ Width = 121
+ Height = 21
+ TabOrder = 1
+ Text = 'ALFKI'
+ end
+ object eCust2: TEdit
+ Left = 296
+ Top = 0
+ Width = 121
+ Height = 21
+ TabOrder = 2
+ Text = 'BOTTM'
+ end
+ object Panel1: TPanel
+ Left = 0
+ Top = 287
+ Width = 502
+ Height = 30
+ Align = alBottom
+ BevelOuter = bvNone
+ TabOrder = 3
+ DesignSize = (
+ 502
+ 30)
+ object DBNavigator1: TDBNavigator
+ Left = 0
+ Top = 5
+ Width = 230
+ Height = 25
+ DataSource = DataSource
+ Anchors = [akLeft]
+ TabOrder = 0
+ end
+ object bOpenClose: TButton
+ Left = 240
+ Top = 5
+ Width = 75
+ Height = 25
+ Anchors = [akLeft]
+ Caption = 'Open/Close'
+ TabOrder = 1
+ OnClick = bOpenCloseClick
+ end
+ object bApplyUpdates: TButton
+ Left = 315
+ Top = 5
+ Width = 97
+ Height = 25
+ Anchors = [akLeft]
+ Caption = 'Apply Updates'
+ TabOrder = 2
+ OnClick = bApplyUpdatesClick
+ end
+ end
+ object ConnectionManager: TDAConnectionManager
+ MaxPoolSize = 10
+ PoolTimeoutSeconds = 60
+ PoolBehaviour = pbWait
+ WaitIntervalSeconds = 1
+ Connections = <
+ item
+ Name = 'ADO'
+ ConnectionString =
+ 'ADO?Server=localhost;Database=Northwind;UserID=sa;Password=;AuxD' +
+ 'river=SQLOLEDB.1'
+ Default = True
+ Tag = 0
+ end>
+ DriverManager = DriverManager
+ PoolingEnabled = True
+ Left = 24
+ Top = 152
+ end
+ object DriverManager: TDADriverManager
+ DriverDirectory = 'C:\Dev\DataAbstract\Bin\'
+ AutoLoad = False
+ TraceActive = False
+ TraceFlags = []
+ Left = 56
+ Top = 152
+ end
+ object ADODriver: TDAADODriver
+ Left = 88
+ Top = 152
+ end
+ object BINAdapter: TDABinDataStreamer
+ Left = 120
+ Top = 152
+ end
+ object DataSource: TDADataSource
+ DataTable = DataTable
+ Left = 72
+ Top = 200
+ end
+ object DataTable: TDACDSDataTable
+ RemoteUpdatesOptions = []
+ Fields = <
+ item
+ Name = 'CustomerID'
+ DataType = datString
+ Size = 5
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CompanyName'
+ DataType = datString
+ Size = 40
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ContactName'
+ DataType = datString
+ Size = 30
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ContactTitle'
+ DataType = datString
+ Size = 30
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Address'
+ DataType = datString
+ Size = 60
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'City'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Region'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'PostalCode'
+ DataType = datString
+ Size = 10
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Country'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Phone'
+ DataType = datString
+ Size = 24
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Fax'
+ DataType = datString
+ Size = 24
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ Params = <
+ item
+ Name = 'CustA'
+ DataType = datString
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'CustB'
+ DataType = datString
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end>
+ MasterMappingMode = mmDataRequest
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteFetchEnabled = False
+ ReadOnly = False
+ LocalSchema = DASchema
+ LocalDataStreamer = BINAdapter
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ LogicalName = 'Customers'
+ IndexDefs = <>
+ Left = 64
+ Top = 192
+ end
+ object DASchema: TDASchema
+ ConnectionManager = ConnectionManager
+ Datasets = <
+ item
+ Params = <
+ item
+ Name = 'CustA'
+ DataType = datString
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'CustB'
+ DataType = datString
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end>
+ Statements = <
+ item
+ Connection = 'ADO'
+ TargetTable = 'Customers'
+ SQL =
+ 'SELECT '#10' CustomerID, CompanyName, ContactName, ContactTitle, ' +
+ #10' Address, City, Region, PostalCode, Country, Phone, '#10' Fax' +
+ #10' FROM'#10' Customers'#10' WHERE CustomerID>=:CustA and CustomerID<' +
+ '=:CustB'
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'CustomerID'
+ TableField = 'CustomerID'
+ end
+ item
+ DatasetField = 'CompanyName'
+ TableField = 'CompanyName'
+ end
+ item
+ DatasetField = 'ContactName'
+ TableField = 'ContactName'
+ end
+ item
+ DatasetField = 'ContactTitle'
+ TableField = 'ContactTitle'
+ end
+ item
+ DatasetField = 'Address'
+ TableField = 'Address'
+ end
+ item
+ DatasetField = 'City'
+ TableField = 'City'
+ end
+ item
+ DatasetField = 'Region'
+ TableField = 'Region'
+ end
+ item
+ DatasetField = 'PostalCode'
+ TableField = 'PostalCode'
+ end
+ item
+ DatasetField = 'Country'
+ TableField = 'Country'
+ end
+ item
+ DatasetField = 'Phone'
+ TableField = 'Phone'
+ end
+ item
+ DatasetField = 'Fax'
+ TableField = 'Fax'
+ end>
+ end>
+ Name = 'Customers'
+ Fields = <
+ item
+ Name = 'CustomerID'
+ DataType = datString
+ Size = 5
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CompanyName'
+ DataType = datString
+ Size = 40
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ContactName'
+ DataType = datString
+ Size = 30
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ContactTitle'
+ DataType = datString
+ Size = 30
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Address'
+ DataType = datString
+ Size = 60
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'City'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Region'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'PostalCode'
+ DataType = datString
+ Size = 10
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Country'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Phone'
+ DataType = datString
+ Size = 24
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Fax'
+ DataType = datString
+ Size = 24
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ BusinessRulesClient.ScriptLanguage = rslPascalScript
+ BusinessRulesServer.ScriptLanguage = rslPascalScript
+ end>
+ Commands = <
+ item
+ Params = <
+ item
+ Name = 'CustomerID'
+ DataType = datString
+ Size = 5
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'CompanyName'
+ DataType = datString
+ Size = 40
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'ContactName'
+ DataType = datString
+ Size = 30
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'ContactTitle'
+ DataType = datString
+ Size = 30
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'Address'
+ DataType = datString
+ Size = 60
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'City'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'Region'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'PostalCode'
+ DataType = datString
+ Size = 10
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'Country'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'Phone'
+ DataType = datString
+ Size = 24
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'Fax'
+ DataType = datString
+ Size = 24
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'TestNumeric'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end>
+ Statements = <
+ item
+ Connection = 'ADO'
+ TargetTable = 'Customers'
+ SQL =
+ 'INSERT'#10' INTO Customers'#10' (CustomerID, CompanyName, ContactNam' +
+ 'e, ContactTitle, Address, City, Region, PostalCode, Country, Pho' +
+ 'ne, Fax, TestNumeric)'#10' VALUES'#10' (:CustomerID, :CompanyName, :' +
+ 'ContactName, :ContactTitle, :Address, :City, :Region, :PostalCod' +
+ 'e, :Country, :Phone, :Fax, :TestNumeric)'
+ StatementType = stSQL
+ ColumnMappings = <>
+ end>
+ Name = 'Insert_Customers'
+ end
+ item
+ Params = <
+ item
+ Name = 'OLD_CustomerID'
+ DataType = datString
+ Size = 5
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end>
+ Statements = <
+ item
+ Connection = 'ADO'
+ TargetTable = 'Customers'
+ SQL =
+ 'DELETE '#10' FROM'#10' Customers'#10' WHERE'#10' (CustomerID = :OLD_Cust' +
+ 'omerID)'
+ StatementType = stSQL
+ ColumnMappings = <>
+ end>
+ Name = 'Delete_Customers'
+ end
+ item
+ Params = <
+ item
+ Name = 'CustomerID'
+ DataType = datString
+ Size = 5
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'CompanyName'
+ DataType = datString
+ Size = 40
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'ContactName'
+ DataType = datString
+ Size = 30
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'ContactTitle'
+ DataType = datString
+ Size = 30
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'Address'
+ DataType = datString
+ Size = 60
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'City'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'Region'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'PostalCode'
+ DataType = datString
+ Size = 10
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'Country'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'Phone'
+ DataType = datString
+ Size = 24
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'Fax'
+ DataType = datString
+ Size = 24
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'TestNumeric'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'OLD_CustomerID'
+ DataType = datString
+ Size = 5
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end>
+ Statements = <
+ item
+ Connection = 'ADO'
+ TargetTable = 'Customers'
+ SQL =
+ 'UPDATE Customers'#10' SET '#10' CustomerID = :CustomerID, '#10' Compa' +
+ 'nyName = :CompanyName, '#10' ContactName = :ContactName, '#10' Con' +
+ 'tactTitle = :ContactTitle, '#10' Address = :Address, '#10' City = ' +
+ ':City, '#10' Region = :Region, '#10' PostalCode = :PostalCode, '#10' ' +
+ ' Country = :Country, '#10' Phone = :Phone, '#10' Fax = :Fax, '#10' ' +
+ ' TestNumeric = :TestNumeric'#10' WHERE'#10' (CustomerID = :OLD_Custo' +
+ 'merID)'
+ StatementType = stSQL
+ ColumnMappings = <>
+ end>
+ Name = 'Update_Customers'
+ end>
+ RelationShips = <>
+ UpdateRules = <>
+ Left = 160
+ Top = 152
+ end
+ object BusinessProcessor: TDABusinessProcessor
+ Schema = DASchema
+ ReferencedDataset = 'Customers'
+ ProcessorOptions = [poAutoGenerateInsert, poAutoGenerateUpdate, poAutoGenerateDelete, poPrepareCommands]
+ UpdateMode = updWhereKeyOnly
+ Left = 112
+ Top = 200
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Local Schema/LocalSchemaMain.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Local Schema/LocalSchemaMain.pas
new file mode 100644
index 0000000..b1f750a
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Local Schema/LocalSchemaMain.pas
@@ -0,0 +1,62 @@
+unit LocalSchemaMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, uDAEngine, uDAADODriver, uDADriverManager, uDAClasses,
+ uDADataTable, uDABINAdapter, uDACDSDataTable, DB, StdCtrls, ExtCtrls,
+ DBCtrls, Grids, DBGrids, uDABusinessProcessor, uDAScriptingProvider,
+ uDADataStreamer;
+
+type
+ TLocalSchemaMainForm = class(TForm)
+ DriverManager: TDADriverManager;
+ ADODriver: TDAADODriver;
+ BINAdapter: TDABinDataStreamer;
+ DataSource: TDADataSource;
+ DataTable: TDACDSDataTable;
+ DBGrid1: TDBGrid;
+ BusinessProcessor: TDABusinessProcessor;
+ eCust1: TEdit;
+ eCust2: TEdit;
+ Label1: TLabel;
+ Label2: TLabel;
+ ConnectionManager: TDAConnectionManager;
+ Panel1: TPanel;
+ DBNavigator1: TDBNavigator;
+ bOpenClose: TButton;
+ bApplyUpdates: TButton;
+ DASchema: TDASchema;
+ procedure bOpenCloseClick(Sender: TObject);
+ procedure bApplyUpdatesClick(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ LocalSchemaMainForm: TLocalSchemaMainForm;
+
+implementation
+
+{$R *.dfm}
+
+procedure TLocalSchemaMainForm.bOpenCloseClick(Sender: TObject);
+begin
+ if not DataTable.Active then begin
+ DataTable.ParamByName('CustA').AsString := eCust1.Text;
+ DataTable.ParamByName('CustB').AsString := eCust2.Text;
+ end;
+
+ DataTable.Active := DataTable.Active xor TRUE;
+end;
+
+procedure TLocalSchemaMainForm.bApplyUpdatesClick(Sender: TObject);
+begin
+ BusinessProcessor.ProcessDelta(DataTable, AllChanges);
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample.Sample.html b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample.Sample.html
new file mode 100644
index 0000000..2c21f56
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample.Sample.html
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+ Login Sample
+
+
+
+Purpose
+
+
+ This example shows how to provide a simple Login.
+
+
+ The login data is held in Northwind's Employees table, with the FirstName and LastName fields used for UserName and Password respectively.
+
+
+Examine the Code
+
+
+ See the simple code within LoginService_Impl.pas .
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample.bdsgroup b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample.bdsgroup
new file mode 100644
index 0000000..ca45e64
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample.bdsgroup
@@ -0,0 +1,20 @@
+
+
+
+
+ Default.Personality
+
+ 1.0
+ {4FDDB7A3-5E2A-4153-98B3-52EA4E5D3A7D}
+
+
+
+
+
+ LoginSample_server.bdsproj
+ LoginSample_Client.bdsproj
+ LoginSample_server.exe LoginSample_Client.exe
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample.bpg b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample.bpg
new file mode 100644
index 0000000..f74198c
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample.bpg
@@ -0,0 +1,23 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = LoginSample_server.exe LoginSample_Client.exe
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+LoginSample_server.exe: LoginSample_server.dpr
+ $(DCC)
+
+LoginSample_Client.exe: LoginSample_Client.dpr
+ $(DCC)
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample.groupproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample.groupproj
new file mode 100644
index 0000000..e9204af
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample.groupproj
@@ -0,0 +1,40 @@
+
+
+ {72af6019-78ce-45df-b5c2-80318d022ad3}
+
+
+
+
+ Default.Personality
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSampleLibrary.RODL b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSampleLibrary.RODL
new file mode 100644
index 0000000..2daa08c
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSampleLibrary.RODL
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSampleLibrary_Intf.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSampleLibrary_Intf.pas
new file mode 100644
index 0000000..aaa5a30
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSampleLibrary_Intf.pas
@@ -0,0 +1,109 @@
+unit LoginSampleLibrary_Intf;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROClasses, uROClient, uROTypes, uROClientIntf,
+ {Used RODLs:} DataAbstract4_Intf;
+
+const
+ { Library ID }
+ LibraryUID = '{8923B665-D147-4E49-B262-59B91DE7EF10}';
+
+ { Service Interface ID's }
+ ILoginSampleService_IID : TGUID = '{B3131769-5008-4AAE-A339-A65950032EEE}';
+ ILoginService_IID : TGUID = '{4E74056F-733F-4415-81D2-D8E7297C9EC2}';
+
+ { Event ID's }
+
+type
+ { Forward declarations }
+ ILoginSampleService = interface;
+ ILoginService = interface;
+
+
+
+
+ { ILoginSampleService }
+ ILoginSampleService = interface(IDataAbstractService)
+ ['{B3131769-5008-4AAE-A339-A65950032EEE}']
+ end;
+
+ { CoLoginSampleService }
+ CoLoginSampleService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): ILoginSampleService;
+ end;
+
+ { TLoginSampleService_Proxy }
+ TLoginSampleService_Proxy = class(TDataAbstractService_Proxy, ILoginSampleService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ end;
+
+ { ILoginService }
+ ILoginService = interface(ISimpleLoginService)
+ ['{4E74056F-733F-4415-81D2-D8E7297C9EC2}']
+ end;
+
+ { CoLoginService }
+ CoLoginService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): ILoginService;
+ end;
+
+ { TLoginService_Proxy }
+ TLoginService_Proxy = class(TSimpleLoginService_Proxy, ILoginService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ end;
+
+implementation
+
+uses
+ {vcl:} SysUtils,
+ {RemObjects:} uROEventRepository, uRORes;
+
+{ CoLoginSampleService }
+
+class function CoLoginSampleService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): ILoginSampleService;
+begin
+ result := TLoginSampleService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+function TLoginSampleService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'LoginSampleService';
+end;
+
+{ CoLoginService }
+
+class function CoLoginService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): ILoginService;
+begin
+ result := TLoginService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+function TLoginService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'LoginService';
+end;
+
+initialization
+ RegisterProxyClass(ILoginSampleService_IID, TLoginSampleService_Proxy);
+ RegisterProxyClass(ILoginService_IID, TLoginService_Proxy);
+
+
+finalization
+ UnregisterProxyClass(ILoginSampleService_IID);
+ UnregisterProxyClass(ILoginService_IID);
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSampleLibrary_Invk.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSampleLibrary_Invk.pas
new file mode 100644
index 0000000..5997211
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSampleLibrary_Invk.pas
@@ -0,0 +1,38 @@
+unit LoginSampleLibrary_Invk;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes,
+ {RemObjects:} uROServer, uROServerIntf, uROTypes, uROClientIntf,
+ {Used RODL Intf's:} DataAbstract4_Intf,
+ {Used RODL Invk's:} DataAbstract4_Invk,
+ {Generated:} LoginSampleLibrary_Intf;
+
+type
+ TLoginSampleService_Invoker = class(TDataAbstractService_Invoker)
+ private
+ protected
+ published
+ end;
+
+ TLoginService_Invoker = class(TSimpleLoginService_Invoker)
+ private
+ protected
+ published
+ end;
+
+implementation
+
+uses
+ {RemObjects:} uRORes, uROClient;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSampleService_Impl.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSampleService_Impl.dfm
new file mode 100644
index 0000000..f91ab57
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSampleService_Impl.dfm
@@ -0,0 +1,335 @@
+object LoginSampleService: TLoginSampleService
+ OldCreateOrder = True
+ RequiresSession = True
+ SessionManager = LoginSample_ServerDataModule.SessionManager
+ AcquireConnection = True
+ ServiceSchema = Schema
+ ServiceDataStreamer = DataStreamer
+ ExportedDataTables = <>
+ Left = 357
+ Top = 213
+ Height = 212
+ Width = 216
+ object DataStreamer: TDABinDataStreamer
+ Left = 32
+ Top = 8
+ end
+ object Schema: TDASchema
+ ConnectionManager = LoginSample_ServerDataModule.ConnectionManager
+ DataDictionary = LoginSample_ServerDataModule.DataDictionary
+ Datasets = <
+ item
+ Params = <>
+ Statements = <
+ item
+ Connection = 'Northwind'
+ TargetTable = 'Employees'
+ SQL =
+ 'SELECT '#10' EmployeeID, LastName, FirstName, Title, TitleOfCourt' +
+ 'esy, '#10' BirthDate, HireDate, Address, City, Region, PostalCode' +
+ ', '#10' Country, HomePhone, Extension, Photo, Notes, ReportsTo, '#10 +
+ ' PhotoPath'#10' FROM'#10' Employees'
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'EmployeeID'
+ TableField = 'EmployeeID'
+ end
+ item
+ DatasetField = 'LastName'
+ TableField = 'LastName'
+ end
+ item
+ DatasetField = 'FirstName'
+ TableField = 'FirstName'
+ end
+ item
+ DatasetField = 'Title'
+ TableField = 'Title'
+ end
+ item
+ DatasetField = 'TitleOfCourtesy'
+ TableField = 'TitleOfCourtesy'
+ end
+ item
+ DatasetField = 'BirthDate'
+ TableField = 'BirthDate'
+ end
+ item
+ DatasetField = 'HireDate'
+ TableField = 'HireDate'
+ end
+ item
+ DatasetField = 'Address'
+ TableField = 'Address'
+ end
+ item
+ DatasetField = 'City'
+ TableField = 'City'
+ end
+ item
+ DatasetField = 'Region'
+ TableField = 'Region'
+ end
+ item
+ DatasetField = 'PostalCode'
+ TableField = 'PostalCode'
+ end
+ item
+ DatasetField = 'Country'
+ TableField = 'Country'
+ end
+ item
+ DatasetField = 'HomePhone'
+ TableField = 'HomePhone'
+ end
+ item
+ DatasetField = 'Extension'
+ TableField = 'Extension'
+ end
+ item
+ DatasetField = 'Photo'
+ TableField = 'Photo'
+ end
+ item
+ DatasetField = 'Notes'
+ TableField = 'Notes'
+ end
+ item
+ DatasetField = 'ReportsTo'
+ TableField = 'ReportsTo'
+ end
+ item
+ DatasetField = 'PhotoPath'
+ TableField = 'PhotoPath'
+ end>
+ end>
+ Name = 'Employees'
+ Fields = <
+ item
+ Name = 'EmployeeID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'LastName'
+ DataType = datWideString
+ Size = 20
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'FirstName'
+ DataType = datWideString
+ Size = 10
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Title'
+ DataType = datWideString
+ Size = 30
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'TitleOfCourtesy'
+ DataType = datWideString
+ Size = 25
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'BirthDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'HireDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Address'
+ DataType = datWideString
+ Size = 60
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'City'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Region'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'PostalCode'
+ DataType = datWideString
+ Size = 10
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Country'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'HomePhone'
+ DataType = datWideString
+ Size = 24
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Extension'
+ DataType = datWideString
+ Size = 4
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Photo'
+ DataType = datBlob
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Notes'
+ DataType = datMemo
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ReportsTo'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'PhotoPath'
+ DataType = datWideString
+ Size = 255
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ BusinessRulesClient.ScriptLanguage = rslPascalScript
+ BusinessRulesServer.ScriptLanguage = rslPascalScript
+ end>
+ Commands = <>
+ RelationShips = <
+ item
+ Name = 'FK_Employees_Employees'
+ MasterDatasetName = 'Employees'
+ MasterFields = 'EmployeeID'
+ DetailDatasetName = 'Employees'
+ DetailFields = 'ReportsTo'
+ end>
+ UpdateRules = <>
+ Left = 32
+ Top = 56
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSampleService_Impl.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSampleService_Impl.pas
new file mode 100644
index 0000000..b003b0b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSampleService_Impl.pas
@@ -0,0 +1,37 @@
+unit LoginSampleService_Impl;
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils,
+ {RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
+ {Data Abstract:} uDAClasses, uDADataTable, uDABinAdapter, uDAInterfaces, uDADataStreamer,
+ {Ancestor Implementation:} DataAbstractService_Impl,
+ {Used RODLs:} DataAbstract4_Intf,
+ {Generated:} LoginSampleLibrary_Intf;
+
+type
+ { TLoginSampleService }
+ TLoginSampleService = class(TDataAbstractService, ILoginSampleService)
+ DataStreamer: TDABinDataStreamer;
+ Schema: TDASchema;
+ private
+ protected
+ { ILoginSampleService methods }
+ end;
+
+implementation
+
+{$R *.dfm}
+uses
+ {Generated:} LoginSampleLibrary_Invk, LoginSample_ServerData;
+
+procedure Create_LoginSampleService(out anInstance: IUnknown);
+begin
+ anInstance := TLoginSampleService.Create(nil);
+end;
+
+initialization
+ TROClassFactory.Create('LoginSampleService', Create_LoginSampleService, TLoginSampleService_Invoker);
+finalization
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_Client.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_Client.bdsproj
new file mode 100644
index 0000000..42fff79
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_Client.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {AD87FA11-2CDF-46DC-8112-52563977B13C}
+
+
+
+
+ LoginSample_Client.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_Client.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_Client.dpr
new file mode 100644
index 0000000..56feae1
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_Client.dpr
@@ -0,0 +1,18 @@
+program LoginSample_Client;
+
+uses
+ uROComInit,
+ Forms,
+ MidasLib,
+ LoginSample_ClientMain in 'LoginSample_ClientMain.pas' {LoginSample_ClientMainForm},
+ LoginSample_ClientData in 'LoginSample_ClientData.pas' {LoginSample_ClientDataModule: TDAClientDataModule};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'LoginSample Client';
+ Application.CreateForm(TLoginSample_ClientDataModule, LoginSample_ClientDataModule);
+ Application.CreateForm(TLoginSample_ClientMainForm, LoginSample_ClientMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_Client.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_Client.dproj
new file mode 100644
index 0000000..5aac6d1
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_Client.dproj
@@ -0,0 +1,75 @@
+
+
+ {fb47079d-d00b-4688-901d-b23e72791c7b}
+ LoginSample_Client.dpr
+ Debug
+ AnyCPU
+ DCC32
+ LoginSample_Client.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ LoginSample_Client.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_Client.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_Client.res
new file mode 100644
index 0000000..da01de5
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_Client.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_ClientData.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_ClientData.dfm
new file mode 100644
index 0000000..262f235
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_ClientData.dfm
@@ -0,0 +1,100 @@
+object LoginSample_ClientDataModule: TLoginSample_ClientDataModule
+ OldCreateOrder = True
+ Left = 81
+ Top = 16
+ Height = 300
+ Width = 300
+ object Channel: TROWinInetHTTPChannel
+ ServerLocators = <>
+ DispatchOptions = []
+ UserAgent = 'RemObjects SDK'
+ TargetURL = 'http://localhost:8099/BIN'
+ Left = 40
+ Top = 8
+ end
+ object Message: TROBinMessage
+ Left = 40
+ Top = 52
+ end
+ object RemoteService: TRORemoteService
+ ServiceName = 'LoginSampleService'
+ Message = Message
+ Channel = Channel
+ Left = 40
+ Top = 96
+ end
+ object DataStreamer: TDABinDataStreamer
+ Left = 40
+ Top = 140
+ end
+ object RemoteDataAdapter: TDARemoteDataAdapter
+ GetSchemaCall.RemoteService = RemoteService
+ GetSchemaCall.MethodName = 'GetSchema'
+ GetSchemaCall.Params = <
+ item
+ Name = 'aFilter'
+ DataType = rtString
+ Flag = fIn
+ Value = Null
+ end
+ item
+ Name = 'Result'
+ DataType = rtString
+ Flag = fResult
+ Value = Null
+ end>
+ GetSchemaCall.Default = False
+ GetSchemaCall.IncomingSchemaParameter = 'Result'
+ GetSchemaCall.OutgoingFilterParameter = 'aFilter'
+ GetDataCall.RemoteService = RemoteService
+ GetDataCall.MethodName = 'GetData'
+ GetDataCall.Params = <
+ item
+ Name = 'aTableNameArray'
+ DataType = rtUserDefined
+ Flag = fIn
+ TypeName = 'StringArray'
+ Value = Null
+ end
+ item
+ Name = 'aTableRequestInfoArray'
+ DataType = rtUserDefined
+ Flag = fIn
+ TypeName = 'TableRequestInfoArray'
+ Value = Null
+ end
+ item
+ Name = 'Result'
+ DataType = rtBinary
+ Flag = fResult
+ Value = Null
+ end>
+ GetDataCall.Default = False
+ GetDataCall.OutgoingTableNamesParameter = 'aTableNameArray'
+ GetDataCall.OutgoingTableRequestInfosParameter = 'aTableRequestInfoArray'
+ GetDataCall.IncomingDataParameter = 'Result'
+ UpdateDataCall.RemoteService = RemoteService
+ UpdateDataCall.MethodName = 'UpdateData'
+ UpdateDataCall.Params = <
+ item
+ Name = 'aDelta'
+ DataType = rtBinary
+ Flag = fIn
+ end
+ item
+ Name = 'Result'
+ DataType = rtBinary
+ Flag = fResult
+ end>
+ UpdateDataCall.Default = False
+ UpdateDataCall.OutgoingDeltaParameter = 'aDelta'
+ UpdateDataCall.IncomingDeltaParameter = 'Result'
+ GetScriptsCall.RemoteService = RemoteService
+ GetScriptsCall.Params = <>
+ GetScriptsCall.Default = False
+ RemoteService = RemoteService
+ DataStreamer = DataStreamer
+ Left = 40
+ Top = 183
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_ClientData.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_ClientData.pas
new file mode 100644
index 0000000..8bae154
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_ClientData.pas
@@ -0,0 +1,31 @@
+unit LoginSample_ClientData;
+
+interface
+
+uses
+ {vcl:} SysUtils, Classes, DB, DBClient,
+ {RemObjects:} uROClient, uROClientIntf, uRORemoteService, uROBinMessage, uROWinInetHTTPChannel,
+ {Data Abstract:} uDADataTable, uDABINAdapter, uDAInterfaces,
+ uDADataStreamer, uDARemoteDataAdapter;
+
+type
+ TLoginSample_ClientDataModule = class(TDataModule)
+ Message: TROBinMessage;
+ Channel: TROWinInetHTTPChannel;
+ RemoteService: TRORemoteService;
+ DataStreamer: TDABinDataStreamer;
+ RemoteDataAdapter: TDARemoteDataAdapter;
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ LoginSample_ClientDataModule: TLoginSample_ClientDataModule;
+
+implementation
+
+{$R *.dfm}
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_ClientMain.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_ClientMain.dfm
new file mode 100644
index 0000000..e08e765
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_ClientMain.dfm
@@ -0,0 +1,324 @@
+object LoginSample_ClientMainForm: TLoginSample_ClientMainForm
+ Left = 357
+ Top = 264
+ AutoScroll = False
+ Caption = 'LoginSample Client'
+ ClientHeight = 174
+ ClientWidth = 482
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnDestroy = FormDestroy
+ OnShow = FormShow
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Label1: TLabel
+ Left = 7
+ Top = 17
+ Width = 56
+ Height = 13
+ Caption = '&User Name:'
+ FocusControl = edUsername
+ end
+ object Label2: TLabel
+ Left = 7
+ Top = 60
+ Width = 49
+ Height = 13
+ Caption = '&Password:'
+ FocusControl = edPassword
+ end
+ object edPassword: TEdit
+ Left = 7
+ Top = 78
+ Width = 155
+ Height = 21
+ TabOrder = 1
+ Text = 'davolio'
+ end
+ object edUsername: TEdit
+ Left = 7
+ Top = 35
+ Width = 155
+ Height = 21
+ TabOrder = 0
+ Text = 'nancy'
+ end
+ object LoginButton: TButton
+ Left = 7
+ Top = 102
+ Width = 75
+ Height = 22
+ Caption = 'Login'
+ TabOrder = 2
+ OnClick = LoginButtonClick
+ end
+ object LogoutButton: TButton
+ Left = 87
+ Top = 102
+ Width = 75
+ Height = 22
+ Caption = 'Logout'
+ Enabled = False
+ TabOrder = 3
+ OnClick = LogoutButtonClick
+ end
+ object Grid: TDBGrid
+ Left = 171
+ Top = 34
+ Width = 303
+ Height = 132
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ DataSource = DataSource
+ TabOrder = 5
+ TitleFont.Charset = DEFAULT_CHARSET
+ TitleFont.Color = clWindowText
+ TitleFont.Height = -11
+ TitleFont.Name = 'MS Sans Serif'
+ TitleFont.Style = []
+ end
+ object FillButton: TButton
+ Left = 172
+ Top = 6
+ Width = 75
+ Height = 22
+ Caption = 'Fill'
+ Enabled = False
+ TabOrder = 4
+ OnClick = FillButtonClick
+ end
+ object DataTable: TDACDSDataTable
+ RemoteUpdatesOptions = []
+ Fields = <
+ item
+ Name = 'EmployeeID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'LastName'
+ DataType = datWideString
+ Size = 20
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'FirstName'
+ DataType = datWideString
+ Size = 10
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Title'
+ DataType = datWideString
+ Size = 30
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'TitleOfCourtesy'
+ DataType = datWideString
+ Size = 25
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'BirthDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'HireDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Address'
+ DataType = datWideString
+ Size = 60
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'City'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Region'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'PostalCode'
+ DataType = datWideString
+ Size = 10
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Country'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'HomePhone'
+ DataType = datWideString
+ Size = 24
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Extension'
+ DataType = datWideString
+ Size = 4
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Photo'
+ DataType = datBlob
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Notes'
+ DataType = datMemo
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ReportsTo'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'PhotoPath'
+ DataType = datWideString
+ Size = 255
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ Params = <>
+ StreamingOptions = [soIgnoreStreamSchema, soDisableEventsWhileStreaming]
+ RemoteDataAdapter = LoginSample_ClientDataModule.RemoteDataAdapter
+ ReadOnly = False
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ LogicalName = 'Employees'
+ IndexDefs = <>
+ Left = 336
+ Top = 13
+ end
+ object DataSource: TDADataSource
+ DataTable = DataTable
+ Left = 345
+ Top = 21
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_ClientMain.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_ClientMain.pas
new file mode 100644
index 0000000..35151d4
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_ClientMain.pas
@@ -0,0 +1,98 @@
+unit LoginSample_ClientMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
+ uROClient, uROClientIntf, uRORemoteService, uROBinMessage,
+ DataAbstract4_Intf, LoginSampleLibrary_Intf, DB, uDADataTable,
+ uDAScriptingProvider, uDACDSDataTable, Grids, DBGrids;
+
+type
+ TLoginSample_ClientMainForm = class(TForm)
+ Label1: TLabel;
+ Label2: TLabel;
+ edPassword: TEdit;
+ edUsername: TEdit;
+ LoginButton: TButton;
+ LogoutButton: TButton;
+ Grid: TDBGrid;
+ DataTable: TDACDSDataTable;
+ DataSource: TDADataSource;
+ FillButton: TButton;
+ procedure FormDestroy(Sender: TObject);
+ procedure FormShow(Sender: TObject);
+ procedure LoginButtonClick(Sender: TObject);
+ procedure LogoutButtonClick(Sender: TObject);
+ procedure FillButtonClick(Sender: TObject);
+ private
+ fLoggedIn: Boolean;
+ fUserInfo: UserInfo;
+ fLogin: ILoginService;
+ protected
+ procedure Login;
+ procedure Logout;
+ public
+ { Public declarations }
+ end;
+
+var
+ LoginSample_ClientMainForm: TLoginSample_ClientMainForm;
+
+implementation
+
+uses
+ LoginSample_ClientData;
+
+{$R *.dfm}
+
+procedure TLoginSample_ClientMainForm.FormShow(Sender: TObject);
+begin
+ with LoginSample_ClientDataModule do
+ fLogin := CoLoginService.Create(Message, Channel);
+end;
+
+procedure TLoginSample_ClientMainForm.FormDestroy(Sender: TObject);
+begin
+ Logout;
+end;
+
+procedure TLoginSample_ClientMainForm.Login;
+begin
+ FreeAndNil(fUserInfo);
+ fLoggedIn := fLogin.Login(edUsername.Text, edPassword.Text, fUserInfo);
+ if not fLoggedIn then ShowMessage('Login failed!');
+end;
+
+procedure TLoginSample_ClientMainForm.Logout;
+begin
+ if fLoggedIn then begin
+ fLogin.Logout();
+ fLoggedIn := false;
+ end;
+end;
+
+procedure TLoginSample_ClientMainForm.LoginButtonClick(Sender: TObject);
+begin
+ Login;
+ LoginButton.Enabled := not fLoggedIn;
+ LogoutButton.Enabled := fLoggedIn;
+ FillButton.Enabled := fLoggedIn;
+end;
+
+procedure TLoginSample_ClientMainForm.LogoutButtonClick(Sender: TObject);
+begin
+ Logout;
+ if not fLoggedIn then DataTable.Active := False;
+ LoginButton.Enabled := not fLoggedIn;
+ LogoutButton.Enabled := fLoggedIn;
+ FillButton.Enabled := fLoggedIn;
+end;
+
+procedure TLoginSample_ClientMainForm.FillButtonClick(Sender: TObject);
+begin
+ DataTable.Active := True;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_ServerData.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_ServerData.dfm
new file mode 100644
index 0000000..1b59373
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_ServerData.dfm
@@ -0,0 +1,64 @@
+object LoginSample_ServerDataModule: TLoginSample_ServerDataModule
+ OldCreateOrder = False
+ OnCreate = DataModuleCreate
+ Left = 39
+ Top = 15
+ Height = 207
+ Width = 352
+ object Server: TROIndyHTTPServer
+ Dispatchers = <
+ item
+ Name = 'Message'
+ Message = Message
+ Enabled = True
+ PathInfo = 'Bin'
+ end>
+ Port = 8099
+ Left = 32
+ Top = 8
+ end
+ object Message: TROBinMessage
+ Left = 34
+ Top = 56
+ end
+ object ConnectionManager: TDAConnectionManager
+ MaxPoolSize = 10
+ PoolTimeoutSeconds = 60
+ PoolBehaviour = pbWait
+ WaitIntervalSeconds = 1
+ Connections = <
+ item
+ Name = 'Northwind'
+ ConnectionString =
+ 'ADO?AuxDriver=SQLOLEDB.1;Server=localhost;Database=Northwind;Use' +
+ 'rID=sa;Password=;'
+ Default = True
+ Tag = 0
+ end>
+ DriverManager = DriverManager
+ PoolingEnabled = True
+ Left = 136
+ Top = 56
+ end
+ object DriverManager: TDADriverManager
+ DriverDirectory = '%SYSTEM%\'
+ AutoLoad = False
+ TraceActive = False
+ TraceFlags = []
+ Left = 136
+ Top = 10
+ end
+ object ADODriver: TDAADODriver
+ Left = 256
+ Top = 8
+ end
+ object DataDictionary: TDADataDictionary
+ Fields = <>
+ Left = 32
+ Top = 104
+ end
+ object SessionManager: TROInMemorySessionManager
+ Left = 136
+ Top = 104
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_ServerData.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_ServerData.pas
new file mode 100644
index 0000000..ede8501
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_ServerData.pas
@@ -0,0 +1,41 @@
+unit LoginSample_ServerData;
+
+interface
+
+uses
+ SysUtils, Classes,
+ uROClient, uROPoweredByRemObjectsButton, uROClientIntf, uROServer,
+ uROBinMessage, uROIndyHTTPServer,
+ uDAEngine, uDADriverManager, uDAClasses, uROSessions,
+ uDAADODriver, uROIndyTCPServer;
+
+type
+ TLoginSample_ServerDataModule = class(TDataModule)
+ Server: TROIndyHTTPServer;
+ Message: TROBinMessage;
+ ConnectionManager: TDAConnectionManager;
+ DriverManager: TDADriverManager;
+ ADODriver: TDAADODriver;
+ SessionManager: TROInMemorySessionManager;
+ DataDictionary: TDADataDictionary;
+
+ procedure DataModuleCreate(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ LoginSample_ServerDataModule: TLoginSample_ServerDataModule;
+
+implementation
+
+{$R *.dfm}
+
+procedure TLoginSample_ServerDataModule.DataModuleCreate(Sender: TObject);
+begin
+ Server.Active := true;
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_ServerMain.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_ServerMain.dfm
new file mode 100644
index 0000000..7adb148
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_ServerMain.dfm
@@ -0,0 +1,25 @@
+object LoginSample_ServerMainForm: TLoginSample_ServerMainForm
+ Left = 95
+ Top = 46
+ BorderStyle = bsDialog
+ Caption = 'LoginSample Server'
+ ClientHeight = 64
+ ClientWidth = 228
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ PixelsPerInch = 96
+ TextHeight = 13
+ object DAPoweredByDataAbstractButton1: TDAPoweredByDataAbstractButton
+ Left = 8
+ Top = 8
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_ServerMain.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_ServerMain.pas
new file mode 100644
index 0000000..301ddbd
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_ServerMain.pas
@@ -0,0 +1,25 @@
+unit LoginSample_ServerMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
+ uDAPoweredByDataAbstractButton, uROPoweredByRemObjectsButton;
+
+type
+ TLoginSample_ServerMainForm = class(TForm)
+ DAPoweredByDataAbstractButton1: TDAPoweredByDataAbstractButton;
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ LoginSample_ServerMainForm: TLoginSample_ServerMainForm;
+
+implementation
+
+{$R *.dfm}
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_server.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_server.bdsproj
new file mode 100644
index 0000000..41de46c
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_server.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {1E20D17E-000D-4A23-8FA1-4C9C6A4EAE92}
+
+
+
+
+ LoginSample_server.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_server.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_server.dpr
new file mode 100644
index 0000000..4c39cb0
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_server.dpr
@@ -0,0 +1,25 @@
+program LoginSample_server;
+
+{#ROGEN:LoginSampleLibrary.RODL}// RemObjects SDK: Careful, do not remove!
+
+uses
+ uROComInit,
+ Forms,
+ LoginSample_ServerMain in 'LoginSample_ServerMain.pas' {LoginSample_ServerMainForm},
+ LoginSampleService_Impl in 'LoginSampleService_Impl.pas' {LoginSampleService: TDARemoteService},
+ LoginSample_ServerData in 'LoginSample_ServerData.pas' {LoginSample_ServerDataModule: TDataModule},
+ LoginService_Impl in 'LoginService_Impl.pas' {LoginService: TSimpleLoginService},
+ LoginSampleLibrary_Intf in 'LoginSampleLibrary_Intf.pas',
+ LoginSampleLibrary_Invk in 'LoginSampleLibrary_Invk.pas';
+
+{$R *.res}
+{$R RODLFile.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'LoginSample Server';
+ Application.CreateForm(TLoginSample_ServerDataModule, LoginSample_ServerDataModule);
+ Application.CreateForm(TLoginSample_ServerMainForm, LoginSample_ServerMainForm);
+ Application.Run;
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_server.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_server.dproj
new file mode 100644
index 0000000..5ab3f7c
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_server.dproj
@@ -0,0 +1,83 @@
+
+
+ {ae701f0a-2268-47e6-b890-c7deb4753af7}
+ LoginSample_server.dpr
+ Debug
+ AnyCPU
+ DCC32
+ LoginSample_server.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ LoginSample_server.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_server.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_server.res
new file mode 100644
index 0000000..7455d6e
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginSample_server.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginService_Impl.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginService_Impl.dfm
new file mode 100644
index 0000000..8d58d0a
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginService_Impl.dfm
@@ -0,0 +1,66 @@
+object LoginService: TLoginService
+ OldCreateOrder = True
+ SessionManager = LoginSample_ServerDataModule.SessionManager
+ OnLogout = SimpleLoginServiceLogout
+ OnLogin = SimpleLoginServiceLogin
+ Left = 321
+ Top = 216
+ Height = 96
+ Width = 188
+ object Schema: TDASchema
+ ConnectionManager = LoginSample_ServerDataModule.ConnectionManager
+ DataDictionary = LoginSample_ServerDataModule.DataDictionary
+ Datasets = <
+ item
+ Params = <
+ item
+ Name = 'UserId'
+ DataType = datWideString
+ Size = 10
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'Pass'
+ DataType = datWideString
+ Size = 20
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end>
+ Statements = <
+ item
+ Connection = 'Northwind'
+ TargetTable = 'ValidateLogin'
+ SQL =
+ 'SELECT Count(*) as Cnt FROM Employees WHERE (FirstName = :UserId' +
+ ') AND (LastName = :Pass)'
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'Cnt'
+ TableField = 'Cnt'
+ end>
+ end>
+ Name = 'ValidateLogin'
+ Fields = <
+ item
+ Name = 'Cnt'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ BusinessRulesClient.ScriptLanguage = rslPascalScript
+ BusinessRulesServer.ScriptLanguage = rslPascalScript
+ end>
+ Commands = <>
+ RelationShips = <>
+ UpdateRules = <>
+ Left = 17
+ Top = 12
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginService_Impl.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginService_Impl.pas
new file mode 100644
index 0000000..2fcdb78
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/LoginService_Impl.pas
@@ -0,0 +1,77 @@
+unit LoginService_Impl;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ This is where you are supposed to code the implementation of your objects. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils,
+ {RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
+ {Ancestor Implementation:} SimpleLoginService_Impl,
+ {Used RODLs:} DataAbstract4_Intf,
+ {Generated:} LoginSampleLibrary_Intf, uDAClasses;
+
+type
+ { TLoginService }
+ TLoginService = class(TSimpleLoginService, ILoginService)
+ Schema: TDASchema;
+ procedure SimpleLoginServiceLogout(Sender: TObject);
+ procedure SimpleLoginServiceLogin(Sender: TObject; aUserID,
+ aPassword: string; out aUserInfo: UserInfo;
+ var aLoginSuccessful: Boolean);
+ private
+ protected
+ { ILoginService methods }
+ end;
+
+implementation
+
+{$R *.dfm}
+uses
+ {Generated:} LoginSampleLibrary_Invk, LoginSample_ServerData, uRORemoteDataModule, uDAInterfaces;
+
+procedure Create_LoginService(out anInstance: IUnknown);
+begin
+ anInstance := TLoginService.Create(nil);
+end;
+
+{ LoginService }
+
+procedure TLoginService.SimpleLoginServiceLogin(Sender: TObject; aUserID,
+ aPassword: string; out aUserInfo: UserInfo;
+ var aLoginSuccessful: Boolean);
+var
+ cmd: IDADataset;
+begin
+ cmd := Schema.NewDataset(Schema.ConnectionManager.NewConnection(Schema.ConnectionManager.GetDefaultConnectionName), 'ValidateLogin', ['UserId', 'Pass'], [aUserID, aPassword]);
+ cmd.Open;
+
+ aLoginSuccessful := (cmd.Fields[0].AsInteger <> 0);
+ if (ALoginSuccessful) then begin
+ aUserInfo := UserInfo.Create;
+ aUserInfo.SessionID := GuidToString(ClientID);
+ aUserInfo.UserID := aUserID;
+ Session['UserID'] := aUserID;
+ end
+ else begin
+ DestroySession;
+ end;
+end;
+
+procedure TLoginService.SimpleLoginServiceLogout(Sender: TObject);
+begin
+ DestroySession;
+end;
+
+initialization
+ TROClassFactory.Create('LoginService', Create_LoginService, TLoginService_Invoker);
+
+finalization
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/RODLFILE.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/RODLFILE.res
new file mode 100644
index 0000000..1643ed4
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Login Sample/RODLFILE.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/LoginService_Impl.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/LoginService_Impl.dfm
new file mode 100644
index 0000000..752ea72
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/LoginService_Impl.dfm
@@ -0,0 +1,185 @@
+object LoginService: TLoginService
+ OldCreateOrder = True
+ SessionManager = MegaDemoServer_DataModule.SessionManager
+ ServiceSchema = Schema
+ ServiceDataStreamer = BinDataStreamer
+ ExportedDataTables = <>
+ BeforeAcquireConnection = DataAbstractServiceBeforeAcquireConnection
+ Left = 170
+ Top = 200
+ Height = 124
+ Width = 208
+ object Schema: TDASchema
+ ConnectionManager = MegaDemoServer_DataModule.ConnectionManager
+ DataDictionary = MegaDemoServer_DataModule.DataDictionary
+ Datasets = <
+ item
+ Params = <
+ item
+ Name = 'UserName'
+ DataType = datString
+ Size = 20
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end
+ item
+ Name = 'Password'
+ DataType = datString
+ Size = 10
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end>
+ Statements = <
+ item
+ Connection = 'Employees'
+ TargetTable = 'EMPLOYEE'
+ SQL =
+ 'SELECT'#10' E.EMP_NO, E.FIRST_NAME, E.LAST_NAME, J.JOB_TITLE'#10#10'FROM'#10 +
+ ' EMPLOYEE E'#10' '#10'JOIN JOB J ON'#10' (J.JOB_CODE=E.JOB_CODE) AND'#10' (J' +
+ '.JOB_GRADE=E.JOB_GRADE) AND'#10' (J.JOB_COUNTRY='#39'USA'#39')'#10' ' +
+ ' '#10'WHERE'#10' E.FIRST_NAME=:UserName AND'#10' E.LAST_NAME=:Password'
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'EmployeeID'
+ TableField = 'EMP_NO'
+ end
+ item
+ DatasetField = 'FirstName'
+ TableField = 'FIRST_NAME'
+ end
+ item
+ DatasetField = 'LastName'
+ TableField = 'LAST_NAME'
+ end
+ item
+ DatasetField = 'JobTitle'
+ TableField = 'JOB_TITLE'
+ end>
+ end
+ item
+ Connection = 'Northwind'
+ TargetTable = 'Employees'
+ SQL =
+ 'SELECT Emps.EmployeeID, Emps.FirstName, Emps.LastName, Emps.Titl' +
+ 'e'#10'FROM Employees Emps'#10'WHERE Emps.FirstName=:UserName AND Emps.La' +
+ 'stName=:Password'
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'EmployeeID'
+ TableField = 'EmployeeID'
+ end
+ item
+ DatasetField = 'FirstName'
+ TableField = 'FirstName'
+ end
+ item
+ DatasetField = 'LastName'
+ TableField = 'LastName'
+ end
+ item
+ DatasetField = 'JobTitle'
+ TableField = 'Title'
+ end>
+ end>
+ Name = 'FindEmployee'
+ Description =
+ 'Query that validates a username and password against the first n' +
+ 'ame and last name of the employees in the target databases'
+ Fields = <
+ item
+ Name = 'EmployeeID'
+ DataType = datAutoInc
+ Description = 'A numeric number used to reference the employee in other tables'
+ BlobType = dabtUnknown
+ GeneratorName = 'EMP_NO_GEN'
+ DecimalPrecision = 0
+ DecimalScale = 0
+ Required = True
+ DisplayWidth = 0
+ DisplayLabel = 'Employee ID'
+ Alignment = taLeftJustify
+ ServerAutoRefresh = True
+ InPrimaryKey = True
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'FirstName'
+ DataType = datString
+ Size = 10
+ Description = 'The employee'#39's first name'
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ Required = True
+ DisplayWidth = 0
+ DisplayLabel = 'First Name'
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'LastName'
+ DataType = datString
+ Size = 20
+ Description = 'The employee'#39's last name'
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ Required = True
+ DisplayWidth = 0
+ DisplayLabel = 'Last Name'
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'JobTitle'
+ DataType = datString
+ Size = 25
+ Description = 'The employee'#39's job title'
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ Required = True
+ DisplayWidth = 0
+ DisplayLabel = 'Job Title'
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ BusinessRulesClient.ScriptLanguage = rslPascalScript
+ BusinessRulesServer.ScriptLanguage = rslPascalScript
+ end>
+ JoinDataTables = <>
+ UnionDataTables = <>
+ Commands = <>
+ RelationShips = <>
+ UpdateRules = <>
+ Version = 0
+ Left = 28
+ Top = 11
+ end
+ object BinDataStreamer: TDABinDataStreamer
+ BufferSize = 262144
+ Left = 77
+ Top = 12
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/LoginService_Impl.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/LoginService_Impl.pas
new file mode 100644
index 0000000..9bc62c8
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/LoginService_Impl.pas
@@ -0,0 +1,111 @@
+unit LoginService_Impl;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ This is where you are supposed to code the implementation of your objects. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils,
+ {RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
+ {Required:} uRORemoteDataModule,
+ {Ancestor Implementation:} DataAbstractService_Impl,
+ {Used RODLs:} DataAbstract4_Intf,
+ {Generated:} MegaDemoLibrary_Intf, uDADataStreamer, uDABinAdapter,
+ uDAClasses, uDAInterfaces;
+
+type
+ { TLoginService }
+ TLoginService = class(TDataAbstractService, ILoginService)
+ BinDataStreamer: TDABinDataStreamer;
+ Schema: TDASchema;
+ procedure DataAbstractServiceBeforeAcquireConnection(aSender: TObject;
+ var aConnectionName: string);
+ private
+ protected
+ { ILoginService methods }
+ function Login(const UserName: string; const Password: string; out aLoginInfo: LoginInfo): Boolean;
+ procedure Logout;
+ end;
+
+implementation
+
+{$R *.dfm}
+uses
+ {Generated:} MegaDemoLibrary_Invk, MegaDemoServer_Data, MegaDemoServer_Main;
+
+procedure Create_LoginService(out anInstance: IUnknown);
+begin
+ anInstance := TLoginService.Create(nil);
+end;
+
+{ LoginService }
+
+function TLoginService.Login(const UserName: string; const Password: string; out aLoginInfo: LoginInfo): Boolean;
+var
+ jobTitle, Upper_jobTitle: string;
+ loginReader: IDADataset;
+begin
+ aLoginInfo := nil;
+ loginReader := Schema.NewDataset(Connection, 'FindEmployee', ['UserName', 'Password'], [UserName, Password]);
+ jobTitle := '';
+ try
+ if (loginReader.IsEmpty) then begin
+ DestroySession;
+ Result := false;
+ end
+ else begin
+ aLoginInfo := LoginInfo.Create;
+
+ // Prepares the LoginInfo struct that will be sent back to the client
+ aLoginInfo.EmployeeID := loginReader.Fields[0].AsInteger;
+ aLoginInfo.FirstName := loginReader.Fields[1].AsString;
+ aLoginInfo.LastName := loginReader.Fields[2].AsString;
+
+ // Determines the job type by parsing the JobTitle returned
+ jobTitle := loginReader.Fields[3].AsString;
+ Upper_jobTitle := UpperCase(jobTitle);
+ if Pos('PRESIDENT', Upper_jobTitle) >= 1 then aLoginInfo.Job_Type := JobType_Manager
+ else if Pos('MANAGER', Upper_jobTitle) >= 1 then aLoginInfo.Job_Type := JobType_Manager
+ else if Pos('SALES', Upper_jobTitle) >= 1 then aLoginInfo.Job_Type := JobType_SalesRep
+ else if Pos('CHIEF', Upper_jobTitle) >= 1 then aLoginInfo.Job_Type := JobType_Manager
+ else aLoginInfo.Job_Type := JobType_Engineer;
+
+ aLoginInfo.JobTitle := jobTitle;
+ aLoginInfo.SessionID := GUIDToString(Session.SessionID);
+
+ // Saves information in the current session for the other services to use
+ Session['EmployeeID'] := aLoginInfo.EmployeeID;
+ Session['JobType'] := aLoginInfo.Job_Type;
+
+ Result := true;
+ end
+ finally
+ if loginReader.Active then loginReader.Close;
+ if Connection.InTransaction then Connection.CommitTransaction;
+ end;
+end;
+
+procedure TLoginService.Logout;
+begin
+ DestroySession;
+end;
+
+procedure TLoginService.DataAbstractServiceBeforeAcquireConnection(
+ aSender: TObject; var aConnectionName: string);
+begin
+ // Reads the connection name from the main form.
+ aConnectionName := MegaDemoServer_MainForm.GetSelectedConnectionName;
+end;
+
+initialization
+ TROClassFactory.Create('LoginService', Create_LoginService, TLoginService_Invoker);
+
+finalization
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoClient.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoClient.bdsproj
new file mode 100644
index 0000000..6717d6f
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoClient.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {51BD99B5-3570-4BED-8E0D-1D9635157B88}
+
+
+
+
+ MegaDemoClient.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoClient.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoClient.dpr
new file mode 100644
index 0000000..24b238b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoClient.dpr
@@ -0,0 +1,17 @@
+program MegaDemoClient;
+
+uses
+ uROComInit,
+ Forms,
+ MidasLib,
+ MegaDemoClient_Main in 'MegaDemoClient_Main.pas' {MegaDemoClient_MainForm},
+ MegaDemoClient_Data in 'MegaDemoClient_Data.pas' {MegaDemoClient_DataModule: TDAClientDataModule};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TMegaDemoClient_DataModule, MegaDemoClient_DataModule);
+ Application.CreateForm(TMegaDemoClient_MainForm, MegaDemoClient_MainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoClient.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoClient.dproj
new file mode 100644
index 0000000..9ca14d2
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoClient.dproj
@@ -0,0 +1,75 @@
+
+
+ {691439f0-e360-44b6-972b-b2ffccfc5582}
+ MegaDemoClient.dpr
+ Debug
+ AnyCPU
+ DCC32
+ MegaDemoClient.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ MegaDemoClient.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoClient.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoClient.res
new file mode 100644
index 0000000..da01de5
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoClient.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoClient_Data.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoClient_Data.dfm
new file mode 100644
index 0000000..20f84ec
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoClient_Data.dfm
@@ -0,0 +1,236 @@
+object MegaDemoClient_DataModule: TMegaDemoClient_DataModule
+ OldCreateOrder = True
+ OnCreate = DataModuleCreate
+ OnDestroy = DataModuleDestroy
+ Left = 439
+ Top = 220
+ Height = 300
+ Width = 300
+ object Channel: TROWinInetHTTPChannel
+ UserAgent = 'RemObjects SDK'
+ TargetURL = 'http://localhost:8099/BIN'
+ ServerLocators = <>
+ DispatchOptions = []
+ Left = 40
+ Top = 8
+ end
+ object Message: TROBinMessage
+ Left = 40
+ Top = 52
+ end
+ object RemoteService: TRORemoteService
+ Message = Message
+ Channel = Channel
+ ServiceName = 'OrdersService'
+ Left = 40
+ Top = 96
+ end
+ object DataStreamer: TDABinDataStreamer
+ Left = 40
+ Top = 140
+ end
+ object rdaCustomers: TDARemoteDataAdapter
+ GetSchemaCall.RemoteService = RemoteService
+ GetDataCall.RemoteService = RemoteService
+ UpdateDataCall.RemoteService = RemoteService
+ GetScriptsCall.RemoteService = RemoteService
+ RemoteService = RemoteService
+ DataStreamer = DataStreamer
+ Left = 195
+ Top = 119
+ end
+ object tbl_Customers: TDACDSDataTable
+ RemoteUpdatesOptions = []
+ Fields = <
+ item
+ Name = 'CustomerID'
+ DataType = datString
+ Size = 5
+ Description = 'The customer'#39's code'
+ BlobType = dabtUnknown
+ GeneratorName = 'CUST_NO_GEN'
+ DisplayWidth = 0
+ DisplayLabel = 'Customer ID'
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CustomerName'
+ DataType = datString
+ Size = 40
+ Description = 'The customer'#39's name'
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ DisplayLabel = 'Name'
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'City'
+ DataType = datString
+ Size = 25
+ Description = 'The customer'#39's city'
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ Params = <>
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteDataAdapter = rdaCustomers
+ ReadOnly = False
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ LogicalName = 'Customers'
+ IndexDefs = <>
+ Left = 167
+ Top = 119
+ end
+ object ds_Customers: TDADataSource
+ DataSet = tbl_Customers.Dataset
+ DataTable = tbl_Customers
+ Left = 140
+ Top = 119
+ end
+ object tbl_OrdersByCustomer: TDACDSDataTable
+ RemoteUpdatesOptions = []
+ Fields = <
+ item
+ Name = 'CustomerID'
+ DataType = datString
+ Size = 5
+ Description = 'The identifier of the customer that placed this order'
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ DisplayLabel = 'Customer ID'
+ ReadOnly = True
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'OrderDate'
+ DataType = datDateTime
+ Description = 'The order'#39's date'
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ DisplayLabel = 'Order Date'
+ ReadOnly = True
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'RequiredDate'
+ DataType = datDateTime
+ Description = 'The date by which the order has to be received'
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ DisplayLabel = 'Required Date'
+ ReadOnly = True
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShippedDate'
+ DataType = datDateTime
+ Description = 'The date this order has been shipped'
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ DisplayLabel = 'Shipped Date'
+ ReadOnly = True
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'OrderAmount'
+ DataType = datCurrency
+ Description = 'The order'#39's amount'
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ DisplayLabel = 'Order Amount'
+ ReadOnly = True
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ Params = <
+ item
+ Name = 'CustomerID'
+ DataType = datString
+ Size = 5
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end>
+ MasterMappingMode = mmDataRequest
+ MasterParamsMappings.Strings = (
+ 'CustomerID=CustomerID')
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteDataAdapter = rdaOrders
+ ReadOnly = False
+ MasterSource = ds_Customers
+ MasterFields = 'CustomerID'
+ DetailFields = 'CustomerID'
+ MasterRequestMappings.Strings = (
+ 'CustomerID=CustomerID')
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ LogicalName = 'OrdersByCustomer'
+ IndexDefs = <>
+ Left = 167
+ Top = 167
+ end
+ object ds_OrdersByCustomer: TDADataSource
+ DataSet = tbl_OrdersByCustomer.Dataset
+ DataTable = tbl_OrdersByCustomer
+ Left = 139
+ Top = 166
+ end
+ object rdaOrders: TDARemoteDataAdapter
+ GetSchemaCall.RemoteService = RemoteService
+ GetDataCall.RemoteService = RemoteService
+ GetDataCall.MethodName = 'GetCustomerOrders'
+ GetDataCall.Params = <
+ item
+ Name = 'Result'
+ DataType = rtBinary
+ Flag = fResult
+ Value = Null
+ end
+ item
+ Name = 'CustomerID'
+ DataType = rtString
+ Flag = fIn
+ Value = Null
+ end>
+ GetDataCall.Default = False
+ GetDataCall.IncomingDataParameter = 'Result'
+ UpdateDataCall.RemoteService = RemoteService
+ GetScriptsCall.RemoteService = RemoteService
+ RemoteService = RemoteService
+ DataStreamer = DataStreamer
+ Left = 194
+ Top = 167
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoClient_Data.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoClient_Data.pas
new file mode 100644
index 0000000..359a7ed
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoClient_Data.pas
@@ -0,0 +1,62 @@
+unit MegaDemoClient_Data;
+
+interface
+
+uses
+ {vcl:} SysUtils, Classes, DB, DBClient,
+ {RemObjects:} uROClient, uROClientIntf, uRORemoteService, uROBinMessage, uROWinInetHTTPChannel,
+ {Data Abstract:} uDADataTable, uDABINAdapter, uDAInterfaces,
+ uDADataStreamer, uDARemoteDataAdapter, MegaDemoLibrary_Intf,
+ uDAScriptingProvider, uDACDSDataTable;
+
+type
+ TMegaDemoClient_DataModule = class(TDataModule)
+ Message: TROBinMessage;
+ Channel: TROWinInetHTTPChannel;
+ RemoteService: TRORemoteService;
+ DataStreamer: TDABinDataStreamer;
+ rdaCustomers: TDARemoteDataAdapter;
+ tbl_Customers: TDACDSDataTable;
+ ds_Customers: TDADataSource;
+ tbl_OrdersByCustomer: TDACDSDataTable;
+ ds_OrdersByCustomer: TDADataSource;
+ rdaOrders: TDARemoteDataAdapter;
+ procedure DataModuleCreate(Sender: TObject);
+ procedure DataModuleDestroy(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ fLoginInfo: LoginInfo;
+ fLoginService: ILoginService;
+ fOrdersService: IOrdersService;
+ function LoggedIn: Boolean;
+ end;
+
+var
+ MegaDemoClient_DataModule: TMegaDemoClient_DataModule;
+
+implementation
+
+{$R *.dfm}
+
+{ TMegaDemoClient_DataModule }
+
+function TMegaDemoClient_DataModule.LoggedIn: Boolean;
+begin
+ Result := fLoginInfo <> nil;
+end;
+
+procedure TMegaDemoClient_DataModule.DataModuleCreate(Sender: TObject);
+begin
+ fLoginService := CoLoginService.Create(Message, Channel);
+ fOrdersService := CoOrdersService.Create(message, Channel);
+end;
+
+procedure TMegaDemoClient_DataModule.DataModuleDestroy(Sender: TObject);
+begin
+ if fLoginInfo <> nil then fLoginInfo.Free;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoClient_Main.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoClient_Main.dfm
new file mode 100644
index 0000000..9a379d8
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoClient_Main.dfm
@@ -0,0 +1,305 @@
+object MegaDemoClient_MainForm: TMegaDemoClient_MainForm
+ Left = 224
+ Top = 141
+ AutoScroll = False
+ BorderIcons = [biSystemMenu]
+ Caption = 'Data Abstract Client'
+ ClientHeight = 322
+ ClientWidth = 617
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnShow = FormShow
+ PixelsPerInch = 96
+ TextHeight = 13
+ object PageControl1: TPageControl
+ Left = 6
+ Top = 5
+ Width = 605
+ Height = 296
+ ActivePage = tpLogin
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ TabIndex = 0
+ TabOrder = 0
+ OnChange = PageControl1Change
+ OnChanging = PageControl1Changing
+ object tpLogin: TTabSheet
+ Caption = 'Login'
+ object DAPoweredByDataAbstractButton1: TDAPoweredByDataAbstractButton
+ Left = 17
+ Top = 16
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ ApplicationType = atClient
+ end
+ object GroupBox1: TGroupBox
+ Left = 38
+ Top = 93
+ Width = 246
+ Height = 105
+ Caption = 'Login Information'
+ TabOrder = 0
+ DesignSize = (
+ 246
+ 105)
+ object Label2: TLabel
+ Left = 7
+ Top = 24
+ Width = 56
+ Height = 13
+ Caption = 'User Name:'
+ end
+ object Label3: TLabel
+ Left = 14
+ Top = 47
+ Width = 49
+ Height = 13
+ Caption = 'Password:'
+ end
+ object tbUserName: TEdit
+ Left = 72
+ Top = 20
+ Width = 164
+ Height = 21
+ Anchors = [akLeft, akTop, akRight]
+ TabOrder = 0
+ end
+ object tbPassword: TEdit
+ Left = 72
+ Top = 43
+ Width = 164
+ Height = 21
+ Anchors = [akLeft, akTop, akRight]
+ TabOrder = 1
+ end
+ object bLogin: TButton
+ Left = 80
+ Top = 74
+ Width = 75
+ Height = 22
+ Anchors = [akTop, akRight]
+ Caption = 'Login'
+ TabOrder = 2
+ OnClick = bLoginClick
+ end
+ object bLogout: TButton
+ Left = 161
+ Top = 74
+ Width = 75
+ Height = 22
+ Anchors = [akTop, akRight]
+ Caption = 'Logout'
+ TabOrder = 3
+ OnClick = bLogoutClick
+ end
+ end
+ object GroupBox2: TGroupBox
+ Left = 335
+ Top = 61
+ Width = 239
+ Height = 168
+ Caption = 'Pre-configured Logins'
+ TabOrder = 1
+ DesignSize = (
+ 239
+ 168)
+ object Label4: TLabel
+ Left = 2
+ Top = 16
+ Width = 234
+ Height = 13
+ Alignment = taCenter
+ Anchors = [akLeft, akTop, akRight]
+ AutoSize = False
+ Caption = 'SQL Server'#39's Northwind'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = [fsBold]
+ ParentFont = False
+ end
+ object Label5: TLabel
+ Left = 1
+ Top = 93
+ Width = 235
+ Height = 13
+ Alignment = taCenter
+ Anchors = [akLeft, akTop, akRight]
+ AutoSize = False
+ Caption = 'Firebird Employee'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = [fsBold]
+ ParentFont = False
+ end
+ object rbPreDefLogin1: TRadioButton
+ Left = 4
+ Top = 33
+ Width = 230
+ Height = 17
+ Caption = 'Nancy/Davolio (Sales Representative)'
+ TabOrder = 0
+ OnClick = rbPreDefLoginClick
+ end
+ object rbPreDefLogin2: TRadioButton
+ Left = 4
+ Top = 50
+ Width = 230
+ Height = 17
+ Caption = 'Andrew/Fuller (Vice President, Sales)'
+ TabOrder = 1
+ OnClick = rbPreDefLoginClick
+ end
+ object rbPreDefLogin3: TRadioButton
+ Left = 4
+ Top = 67
+ Width = 230
+ Height = 17
+ Caption = 'Laura/Callahan (Inside Sales Coordinator)'
+ TabOrder = 2
+ OnClick = rbPreDefLoginClick
+ end
+ object rbPreDefLogin4: TRadioButton
+ Left = 4
+ Top = 110
+ Width = 230
+ Height = 17
+ Caption = 'Claudia/Sutherland (Sales Representative)'
+ TabOrder = 3
+ OnClick = rbPreDefLoginClick
+ end
+ object rbPreDefLogin5: TRadioButton
+ Left = 4
+ Top = 127
+ Width = 230
+ Height = 17
+ Caption = 'Luke/Leung (Sales Representative)'
+ TabOrder = 4
+ OnClick = rbPreDefLoginClick
+ end
+ object rbPreDefLogin6: TRadioButton
+ Left = 4
+ Top = 144
+ Width = 230
+ Height = 17
+ Caption = 'Takashi/Yamamoto (Sales Representative)'
+ TabOrder = 5
+ OnClick = rbPreDefLoginClick
+ end
+ end
+ end
+ object tpCustomerManagement: TTabSheet
+ Caption = 'Customer Management'
+ ImageIndex = 1
+ object Splitter1: TSplitter
+ Left = 0
+ Top = 174
+ Width = 597
+ Height = 8
+ Cursor = crVSplit
+ Align = alBottom
+ Beveled = True
+ end
+ object Panel1: TPanel
+ Left = 0
+ Top = 0
+ Width = 597
+ Height = 22
+ Align = alTop
+ BevelOuter = bvNone
+ TabOrder = 0
+ object DBNavigator1: TDBNavigator
+ Left = 0
+ Top = 0
+ Width = 240
+ Height = 22
+ DataSource = MegaDemoClient_DataModule.ds_Customers
+ Align = alLeft
+ TabOrder = 0
+ end
+ object tsbApplyUpdatesCustomers: TButton
+ Left = 240
+ Top = 0
+ Width = 100
+ Height = 22
+ Action = aApplyUpdate
+ TabOrder = 1
+ end
+ end
+ object gCustomers: TDBGrid
+ Left = 0
+ Top = 22
+ Width = 597
+ Height = 152
+ Align = alClient
+ DataSource = MegaDemoClient_DataModule.ds_Customers
+ TabOrder = 1
+ TitleFont.Charset = DEFAULT_CHARSET
+ TitleFont.Color = clWindowText
+ TitleFont.Height = -11
+ TitleFont.Name = 'MS Sans Serif'
+ TitleFont.Style = []
+ end
+ object gOrdersByCustomer: TDBGrid
+ Left = 0
+ Top = 182
+ Width = 597
+ Height = 86
+ Align = alBottom
+ DataSource = MegaDemoClient_DataModule.ds_OrdersByCustomer
+ TabOrder = 2
+ TitleFont.Charset = DEFAULT_CHARSET
+ TitleFont.Color = clWindowText
+ TitleFont.Height = -11
+ TitleFont.Name = 'MS Sans Serif'
+ TitleFont.Style = []
+ end
+ end
+ object tpBank: TTabSheet
+ Caption = 'Bank'
+ ImageIndex = 3
+ object Label1: TLabel
+ Left = 4
+ Top = 5
+ Width = 592
+ Height = 149
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ AutoSize = False
+ Caption = 'This tab doesn'#39't really do anything beside being accessible '
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clGreen
+ Font.Height = -16
+ Font.Name = 'Tahoma'
+ Font.Style = [fsBold, fsItalic]
+ ParentFont = False
+ WordWrap = True
+ end
+ end
+ end
+ object sslPageHint: TStatusBar
+ Left = 0
+ Top = 303
+ Width = 617
+ Height = 19
+ Panels = <>
+ SimplePanel = True
+ end
+ object ActionList1: TActionList
+ Left = 544
+ Top = 58
+ object aApplyUpdate: TAction
+ Caption = 'Apply Update'
+ OnExecute = aApplyUpdateExecute
+ OnUpdate = aApplyUpdateUpdate
+ end
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoClient_Main.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoClient_Main.pas
new file mode 100644
index 0000000..6e1b7a1
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoClient_Main.pas
@@ -0,0 +1,168 @@
+unit MegaDemoClient_Main;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
+ uROClient, uROClientIntf, uRORemoteService, uROBinMessage, ComCtrls,
+ uROPoweredByRemObjectsButton, uDAPoweredByDataAbstractButton, ExtCtrls,
+ Grids, DBGrids, DBCtrls, ActnList;
+
+type
+ TMegaDemoClient_MainForm = class(TForm)
+ PageControl1: TPageControl;
+ tpLogin: TTabSheet;
+ tpCustomerManagement: TTabSheet;
+ tpBank: TTabSheet;
+ Label1: TLabel;
+ DAPoweredByDataAbstractButton1: TDAPoweredByDataAbstractButton;
+ sslPageHint: TStatusBar;
+ GroupBox1: TGroupBox;
+ Label2: TLabel;
+ Label3: TLabel;
+ tbUserName: TEdit;
+ tbPassword: TEdit;
+ bLogin: TButton;
+ bLogout: TButton;
+ GroupBox2: TGroupBox;
+ Label4: TLabel;
+ rbPreDefLogin1: TRadioButton;
+ rbPreDefLogin2: TRadioButton;
+ rbPreDefLogin3: TRadioButton;
+ Label5: TLabel;
+ rbPreDefLogin4: TRadioButton;
+ rbPreDefLogin5: TRadioButton;
+ rbPreDefLogin6: TRadioButton;
+ Panel1: TPanel;
+ DBNavigator1: TDBNavigator;
+ gCustomers: TDBGrid;
+ tsbApplyUpdatesCustomers: TButton;
+ ActionList1: TActionList;
+ aApplyUpdate: TAction;
+ gOrdersByCustomer: TDBGrid;
+ Splitter1: TSplitter;
+ procedure bLoginClick(Sender: TObject);
+ procedure bLogoutClick(Sender: TObject);
+ procedure rbPreDefLoginClick(Sender: TObject);
+ procedure PageControl1Changing(Sender: TObject;
+ var AllowChange: Boolean);
+ procedure FormShow(Sender: TObject);
+ procedure PageControl1Change(Sender: TObject);
+ procedure aApplyUpdateExecute(Sender: TObject);
+ procedure aApplyUpdateUpdate(Sender: TObject);
+ private
+ { Private declarations }
+ procedure PrivilegesSetup;
+ public
+ { Public declarations }
+ end;
+
+var
+ MegaDemoClient_MainForm: TMegaDemoClient_MainForm;
+
+implementation
+
+uses
+ MegaDemoClient_Data, MegaDemoLibrary_Intf, uDADataTable;
+
+{$R *.dfm}
+
+procedure TMegaDemoClient_MainForm.bLoginClick(Sender: TObject);
+var
+ serverLoginInfo: LoginInfo;
+begin
+ bLogout.Click; // Forces a logout click
+ if (MegaDemoClient_DataModule.fLoginService.Login(tbUserName.Text, tbPassword.Text, serverLoginInfo) = false) then begin
+ ShowMessage('Invalid login');
+ end else begin
+ if MegaDemoClient_DataModule.fLoginInfo <> nil then MegaDemoClient_DataModule.fLoginInfo.Free;
+ MegaDemoClient_DataModule.fLoginInfo := serverLoginInfo;
+ ShowMessage('Welcome ' + MegaDemoClient_DataModule.fLoginInfo.JobTitle + ' ' + MegaDemoClient_DataModule.fLoginInfo.FirstName);
+
+ MegaDemoClient_DataModule.tbl_Customers.Close;
+ MegaDemoClient_DataModule.tbl_Customers.Open;
+
+ bLogin.Enabled := false;
+ bLogout.Enabled := true;
+ end;
+ PrivilegesSetup;
+end;
+
+procedure TMegaDemoClient_MainForm.bLogoutClick(Sender: TObject);
+begin
+ PrivilegesSetup;
+ if not MegaDemoClient_DataModule.LoggedIn then Exit;
+ if MegaDemoClient_DataModule.FLoginInfo <> nil then
+ FreeAndNil(MegaDemoClient_DataModule.FLoginInfo);
+ MegaDemoClient_DataModule.tbl_Customers.Close;
+ MegaDemoClient_DataModule.tbl_OrdersByCustomer.Close;
+ bLogin.Enabled := true;
+ bLogout.Enabled := false;
+end;
+
+procedure TMegaDemoClient_MainForm.rbPreDefLoginClick(Sender: TObject);
+var
+ senderRadioButton: TRadioButton;
+ ctrlLabel: string;
+ textIdx: integer;
+begin
+ senderRadioButton := sender as TRadioButton;
+ if (senderRadioButton.Checked) then begin
+ ctrlLabel := senderRadioButton.Caption;
+ textIdx := pos('/', ctrlLabel);
+ tbUserName.Text := copy(ctrlLabel, 1, textIdx - 1);
+ tbPassword.Text := copy(ctrlLabel, textIdx + 1, Pos(' ', ctrlLabel) - textIdx - 1);
+ end;
+end;
+
+procedure TMegaDemoClient_MainForm.PageControl1Changing(Sender: TObject;
+ var AllowChange: Boolean);
+begin
+ if (not MegaDemoClient_DataModule.LoggedIn) and (PageControl1.TabIndex = 0) then begin
+ ShowMessage('You must login first');
+ AllowChange := False;
+ end;
+end;
+
+procedure TMegaDemoClient_MainForm.PrivilegesSetup;
+begin
+ tpCustomerManagement.TabVisible := MegaDemoClient_DataModule.LoggedIn;
+ tpBank.TabVisible := MegaDemoClient_DataModule.LoggedIn and (MegaDemoClient_DataModule.fLoginInfo.Job_Type = JobType_Manager);
+ gOrdersByCustomer.Visible := MegaDemoClient_DataModule.LoggedIn and (MegaDemoClient_DataModule.fLoginInfo.Job_Type <> JobType_Engineer);
+ Splitter1.Visible := gOrdersByCustomer.Visible;
+ Splitter1.top := 0;
+end;
+
+procedure TMegaDemoClient_MainForm.FormShow(Sender: TObject);
+begin
+ PrivilegesSetup;
+ PageControl1.ActivePage := tpLogin;
+ PageControl1.OnChange(PageControl1);
+end;
+
+procedure TMegaDemoClient_MainForm.PageControl1Change(Sender: TObject);
+begin
+ case ((sender as TPageControl).ActivePageIndex) of
+ 0: sslPageHint.SimpleText := 'Login page. Click on the pre-configured logins to avoid typing a username and a password';
+ 1: sslPageHint.SimpleText := 'Customer magamenet page. You can view all customers and create new ones, if your privileges allow you to';
+ else
+ sslPageHint.SimpleText := '';
+ end;
+end;
+
+procedure TMegaDemoClient_MainForm.aApplyUpdateExecute(Sender: TObject);
+begin
+ try
+ MegaDemoClient_DataModule.tbl_Customers.ApplyUpdates;
+ except
+ on e: Exception do ShowMessage(E.Message);
+ end;
+end;
+
+procedure TMegaDemoClient_MainForm.aApplyUpdateUpdate(Sender: TObject);
+begin
+ TAction(Sender).Enabled := MegaDemoClient_DataModule.tbl_Customers.HasDelta;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoGroup.Sample.html b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoGroup.Sample.html
new file mode 100644
index 0000000..5a4c9fd
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoGroup.Sample.html
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+ Mega Demo Sample
+
+
+
+Purpose
+
+ The sample shows:
+
+
+
+ How we can work with several connections to different databases (Northwind - MS SQL and Employee - Firebird).
+
+
+ How we can implement security and access rights in our application.
+
+ Master-detail relations between tables is implemented via a service that provides a list of orders by user id.
+
+
+Examine the code
+
+Check how the server methods were implemented in OrdersService_Impl.pas and LoginService_Impl.pas .
+See the code needed to invoke server methods in MegaDemoClient_Main.pas
+
+
+Getting started
+
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoGroup.bdsgroup b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoGroup.bdsgroup
new file mode 100644
index 0000000..a4c5907
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoGroup.bdsgroup
@@ -0,0 +1,20 @@
+
+
+
+
+ Default.Personality
+
+ 1.0
+ {F1B75A89-AB3D-4F46-89F6-8119F8854238}
+
+
+
+
+
+ MegaDemoServer.bdsproj
+ MegaDemoClient.bdsproj
+ MegaDemoServer.exe MegaDemoClient.exe
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoGroup.bpg b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoGroup.bpg
new file mode 100644
index 0000000..069815f
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoGroup.bpg
@@ -0,0 +1,23 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = MegaDemoServer.exe MegaDemoClient.exe
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+MegaDemoServer.exe: MegaDemoServer.dpr
+ $(DCC)
+
+MegaDemoClient.exe: MegaDemoClient.dpr
+ $(DCC)
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoGroup.groupproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoGroup.groupproj
new file mode 100644
index 0000000..e53f7be
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoGroup.groupproj
@@ -0,0 +1,40 @@
+
+
+ {6de371b5-c051-4282-a7a2-9b5eda33c8d4}
+
+
+
+
+ Default.Personality
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoLibrary.RODL b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoLibrary.RODL
new file mode 100644
index 0000000..3fd1a70
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoLibrary.RODL
@@ -0,0 +1,83 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoLibrary_Intf.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoLibrary_Intf.pas
new file mode 100644
index 0000000..c750723
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoLibrary_Intf.pas
@@ -0,0 +1,355 @@
+unit MegaDemoLibrary_Intf;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+{$I Remobjects.inc}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROXMLIntf, uROClasses, uROClient, uROTypes, uROClientIntf,
+ {Used RODLs:} DataAbstract4_Intf;
+
+const
+ { Library ID }
+ LibraryUID = '{7C1E1A6D-C50B-482D-AE41-090E9A61BBB0}';
+ TargetNamespace = '';
+
+ { Service Interface ID's }
+ ILoginService_IID : TGUID = '{ABD98EFC-78DA-4704-A3EB-0D89CC8BC618}';
+ IOrdersService_IID : TGUID = '{6EC8387D-B288-4EE0-BFB7-C4BAEF28E50B}';
+
+ { Event ID's }
+
+type
+ { Forward declarations }
+ ILoginService = interface;
+ IOrdersService = interface;
+
+
+ LoginInfo = class;
+
+
+
+ { Enumerateds }
+ JobType = (JobType_SalesRep,JobType_Manager,JobType_Engineer);
+
+ { LoginInfo }
+ LoginInfo = class(TROComplexType)
+ private
+ fSessionID: String;
+ fEmployeeID: Integer;
+ fFirstName: String;
+ fLastName: String;
+ fJob_Type: JobType;
+ fJobTitle: String;
+ public
+ procedure Assign(iSource: TPersistent); override;
+ procedure ReadComplex(ASerializer: TObject); override;
+ procedure WriteComplex(ASerializer: TObject); override;
+ published
+ property SessionID:String read fSessionID write fSessionID;
+ property EmployeeID:Integer read fEmployeeID write fEmployeeID;
+ property FirstName:String read fFirstName write fFirstName;
+ property LastName:String read fLastName write fLastName;
+ property Job_Type:JobType read fJob_Type write fJob_Type;
+ property JobTitle:String read fJobTitle write fJobTitle;
+ end;
+
+ { LoginInfoCollection }
+ LoginInfoCollection = class(TROCollection)
+ protected
+ constructor Create(aItemClass: TCollectionItemClass); overload;
+ function GetItems(aIndex: integer): LoginInfo;
+ procedure SetItems(aIndex: integer; const Value: LoginInfo);
+ public
+ constructor Create; overload;
+ function Add: LoginInfo; reintroduce;
+ property Items[Index: integer]:LoginInfo read GetItems write SetItems; default;
+ end;
+
+ { ILoginService }
+ ILoginService = interface(IDataAbstractService)
+ ['{ABD98EFC-78DA-4704-A3EB-0D89CC8BC618}']
+ function Login(const UserName: String; const Password: String; out aLoginInfo: LoginInfo): Boolean;
+ procedure Logout;
+ end;
+
+ { CoLoginService }
+ CoLoginService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): ILoginService;
+ end;
+
+ { TLoginService_Proxy }
+ TLoginService_Proxy = class(TDataAbstractService_Proxy, ILoginService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ function Login(const UserName: String; const Password: String; out aLoginInfo: LoginInfo): Boolean;
+ procedure Logout;
+ end;
+
+ { IOrdersService }
+ IOrdersService = interface(IDataAbstractService)
+ ['{6EC8387D-B288-4EE0-BFB7-C4BAEF28E50B}']
+ function GetCustomerOrders(const CustomerID: String): Binary;
+ end;
+
+ { CoOrdersService }
+ CoOrdersService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IOrdersService;
+ end;
+
+ { TOrdersService_Proxy }
+ TOrdersService_Proxy = class(TDataAbstractService_Proxy, IOrdersService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ function GetCustomerOrders(const CustomerID: String): Binary;
+ end;
+
+implementation
+
+uses
+ {vcl:} SysUtils,
+ {RemObjects:} uROEventRepository, uROSerializer, uRORes;
+
+{ LoginInfo }
+
+procedure LoginInfo.Assign(iSource: TPersistent);
+var lSource: MegaDemoLibrary_Intf.LoginInfo;
+begin
+ inherited Assign(iSource);
+ if (iSource is MegaDemoLibrary_Intf.LoginInfo) then begin
+ lSource := MegaDemoLibrary_Intf.LoginInfo(iSource);
+ SessionID := lSource.SessionID;
+ EmployeeID := lSource.EmployeeID;
+ FirstName := lSource.FirstName;
+ LastName := lSource.LastName;
+ Job_Type := lSource.Job_Type;
+ JobTitle := lSource.JobTitle;
+ end;
+end;
+
+procedure LoginInfo.ReadComplex(ASerializer: TObject);
+var
+ l_EmployeeID: Integer;
+ l_FirstName: String;
+ l_Job_Type: JobType;
+ l_JobTitle: String;
+ l_LastName: String;
+ l_SessionID: String;
+begin
+ if TROSerializer(ASerializer).RecordStrictOrder then begin
+ l_SessionID := SessionID;
+ TROSerializer(ASerializer).ReadUTF8String('SessionID', l_SessionID);
+ SessionID := l_SessionID;
+ l_EmployeeID := EmployeeID;
+ TROSerializer(ASerializer).ReadInteger('EmployeeID', otSLong, l_EmployeeID);
+ EmployeeID := l_EmployeeID;
+ l_FirstName := FirstName;
+ TROSerializer(ASerializer).ReadUTF8String('FirstName', l_FirstName);
+ FirstName := l_FirstName;
+ l_LastName := LastName;
+ TROSerializer(ASerializer).ReadUTF8String('LastName', l_LastName);
+ LastName := l_LastName;
+ l_Job_Type := Job_Type;
+ TROSerializer(ASerializer).ReadEnumerated('Job_Type',TypeInfo(JobType), l_Job_Type);
+ Job_Type := l_Job_Type;
+ l_JobTitle := JobTitle;
+ TROSerializer(ASerializer).ReadUTF8String('JobTitle', l_JobTitle);
+ JobTitle := l_JobTitle;
+ end else begin
+ l_EmployeeID := EmployeeID;
+ TROSerializer(ASerializer).ReadInteger('EmployeeID', otSLong, l_EmployeeID);
+ EmployeeID := l_EmployeeID;
+ l_FirstName := FirstName;
+ TROSerializer(ASerializer).ReadUTF8String('FirstName', l_FirstName);
+ FirstName := l_FirstName;
+ l_Job_Type := Job_Type;
+ TROSerializer(ASerializer).ReadEnumerated('Job_Type',TypeInfo(JobType), l_Job_Type);
+ Job_Type := l_Job_Type;
+ l_JobTitle := JobTitle;
+ TROSerializer(ASerializer).ReadUTF8String('JobTitle', l_JobTitle);
+ JobTitle := l_JobTitle;
+ l_LastName := LastName;
+ TROSerializer(ASerializer).ReadUTF8String('LastName', l_LastName);
+ LastName := l_LastName;
+ l_SessionID := SessionID;
+ TROSerializer(ASerializer).ReadUTF8String('SessionID', l_SessionID);
+ SessionID := l_SessionID;
+ end;
+end;
+
+procedure LoginInfo.WriteComplex(ASerializer: TObject);
+var
+ l_EmployeeID: Integer;
+ l_FirstName: String;
+ l_Job_Type: JobType;
+ l_JobTitle: String;
+ l_LastName: String;
+ l_SessionID: String;
+begin
+ if TROSerializer(ASerializer).RecordStrictOrder then begin
+ l_SessionID := SessionID;
+ TROSerializer(ASerializer).WriteUTF8String('SessionID', l_SessionID);
+ SessionID := l_SessionID;
+ l_EmployeeID := EmployeeID;
+ TROSerializer(ASerializer).WriteInteger('EmployeeID', otSLong, l_EmployeeID);
+ EmployeeID := l_EmployeeID;
+ l_FirstName := FirstName;
+ TROSerializer(ASerializer).WriteUTF8String('FirstName', l_FirstName);
+ FirstName := l_FirstName;
+ l_LastName := LastName;
+ TROSerializer(ASerializer).WriteUTF8String('LastName', l_LastName);
+ LastName := l_LastName;
+ l_Job_Type := Job_Type;
+ TROSerializer(ASerializer).WriteEnumerated('Job_Type',TypeInfo(JobType), l_Job_Type);
+ Job_Type := l_Job_Type;
+ l_JobTitle := JobTitle;
+ TROSerializer(ASerializer).WriteUTF8String('JobTitle', l_JobTitle);
+ JobTitle := l_JobTitle;
+ end else begin
+ l_EmployeeID := EmployeeID;
+ TROSerializer(ASerializer).WriteInteger('EmployeeID', otSLong, l_EmployeeID);
+ EmployeeID := l_EmployeeID;
+ l_FirstName := FirstName;
+ TROSerializer(ASerializer).WriteUTF8String('FirstName', l_FirstName);
+ FirstName := l_FirstName;
+ l_Job_Type := Job_Type;
+ TROSerializer(ASerializer).WriteEnumerated('Job_Type',TypeInfo(JobType), l_Job_Type);
+ Job_Type := l_Job_Type;
+ l_JobTitle := JobTitle;
+ TROSerializer(ASerializer).WriteUTF8String('JobTitle', l_JobTitle);
+ JobTitle := l_JobTitle;
+ l_LastName := LastName;
+ TROSerializer(ASerializer).WriteUTF8String('LastName', l_LastName);
+ LastName := l_LastName;
+ l_SessionID := SessionID;
+ TROSerializer(ASerializer).WriteUTF8String('SessionID', l_SessionID);
+ SessionID := l_SessionID;
+ end;
+end;
+
+{ LoginInfoCollection }
+constructor LoginInfoCollection.Create;
+begin
+ inherited Create(LoginInfo);
+end;
+
+constructor LoginInfoCollection.Create(aItemClass: TCollectionItemClass);
+begin
+ inherited Create(aItemClass);
+end;
+
+function LoginInfoCollection.Add: LoginInfo;
+begin
+ result := LoginInfo(inherited Add);
+end;
+
+function LoginInfoCollection.GetItems(aIndex: integer): LoginInfo;
+begin
+ result := LoginInfo(inherited Items[aIndex]);
+end;
+
+procedure LoginInfoCollection.SetItems(aIndex: integer; const Value: LoginInfo);
+begin
+ LoginInfo(inherited Items[aIndex]).Assign(Value);
+end;
+
+{ CoLoginService }
+
+class function CoLoginService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): ILoginService;
+begin
+ result := TLoginService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TLoginService_Proxy }
+
+function TLoginService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'LoginService';
+end;
+
+function TLoginService_Proxy.Login(const UserName: String; const Password: String; out aLoginInfo: LoginInfo): Boolean;
+begin
+ try
+ aLoginInfo := nil;
+ __Message.InitializeRequestMessage(__TransportChannel, 'MegaDemoLibrary', __InterfaceName, 'Login');
+ __Message.Write('UserName', TypeInfo(String), UserName, []);
+ __Message.Write('Password', TypeInfo(String), Password, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Boolean), result, []);
+ __Message.Read('aLoginInfo', TypeInfo(MegaDemoLibrary_Intf.LoginInfo), aLoginInfo, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+procedure TLoginService_Proxy.Logout;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'MegaDemoLibrary', __InterfaceName, 'Logout');
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+{ CoOrdersService }
+
+class function CoOrdersService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IOrdersService;
+begin
+ result := TOrdersService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TOrdersService_Proxy }
+
+function TOrdersService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'OrdersService';
+end;
+
+function TOrdersService_Proxy.GetCustomerOrders(const CustomerID: String): Binary;
+begin
+ try
+ result := nil;
+ __Message.InitializeRequestMessage(__TransportChannel, 'MegaDemoLibrary', __InterfaceName, 'GetCustomerOrders');
+ __Message.Write('CustomerID', TypeInfo(String), CustomerID, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Binary), result, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+initialization
+ RegisterROClass(LoginInfo);
+ RegisterProxyClass(ILoginService_IID, TLoginService_Proxy);
+ RegisterProxyClass(IOrdersService_IID, TOrdersService_Proxy);
+
+
+finalization
+ UnregisterROClass(LoginInfo);
+ UnregisterProxyClass(ILoginService_IID);
+ UnregisterProxyClass(IOrdersService_IID);
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoLibrary_Invk.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoLibrary_Invk.pas
new file mode 100644
index 0000000..d407890
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoLibrary_Invk.pas
@@ -0,0 +1,126 @@
+unit MegaDemoLibrary_Invk;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+{$I Remobjects.inc}
+
+interface
+
+uses
+ {vcl:} Classes,
+ {RemObjects:} uROXMLIntf, uROServer, uROServerIntf, uROTypes, uROClientIntf,
+ {Used RODL Intf's:} DataAbstract4_Intf,
+ {Used RODL Invk's:} DataAbstract4_Invk,
+ {Generated:} MegaDemoLibrary_Intf;
+
+type
+ {$M+}
+ TLoginService_Invoker = class(TDataAbstractService_Invoker)
+ private
+ protected
+ published
+ procedure Invoke_Login(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_Logout(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ end;
+ {$M-}
+
+ {$M+}
+ TOrdersService_Invoker = class(TDataAbstractService_Invoker)
+ private
+ protected
+ published
+ procedure Invoke_GetCustomerOrders(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ end;
+ {$M-}
+
+implementation
+
+uses
+ {RemObjects:} uRORes, uROClient;
+
+{ TLoginService_Invoker }
+
+procedure TLoginService_Invoker.Invoke_Login(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function Login(const UserName: String; const Password: String; out aLoginInfo: LoginInfo): Boolean; }
+var
+ UserName: String;
+ Password: String;
+ aLoginInfo: MegaDemoLibrary_Intf.LoginInfo;
+ lResult: Boolean;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ aLoginInfo := nil;
+ try
+ __Message.Read('UserName', TypeInfo(String), UserName, []);
+ __Message.Read('Password', TypeInfo(String), Password, []);
+
+ lResult := (__Instance as ILoginService).Login(UserName, Password, aLoginInfo);
+
+ __Message.InitializeResponseMessage(__Transport, 'MegaDemoLibrary', 'LoginService', 'LoginResponse');
+ __Message.Write('Result', TypeInfo(Boolean), lResult, []);
+ __Message.Write('aLoginInfo', TypeInfo(MegaDemoLibrary_Intf.LoginInfo), aLoginInfo, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(aLoginInfo);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
+procedure TLoginService_Invoker.Invoke_Logout(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ procedure Logout; }
+begin
+ try
+ (__Instance as ILoginService).Logout;
+
+ __Message.InitializeResponseMessage(__Transport, 'MegaDemoLibrary', 'LoginService', 'LogoutResponse');
+ __Message.Finalize;
+
+ __oResponseOptions := [roNoResponse];
+
+ finally
+ end;
+end;
+
+{ TOrdersService_Invoker }
+
+procedure TOrdersService_Invoker.Invoke_GetCustomerOrders(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function GetCustomerOrders(const CustomerID: String): Binary; }
+var
+ CustomerID: String;
+ lResult: Binary;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ lResult := nil;
+ try
+ __Message.Read('CustomerID', TypeInfo(String), CustomerID, []);
+
+ lResult := (__Instance as IOrdersService).GetCustomerOrders(CustomerID);
+
+ __Message.InitializeResponseMessage(__Transport, 'MegaDemoLibrary', 'OrdersService', 'GetCustomerOrdersResponse');
+ __Message.Write('Result', TypeInfo(Binary), lResult, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(lResult);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoServer.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoServer.bdsproj
new file mode 100644
index 0000000..bf14e9b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoServer.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {DA8CA75E-E72B-45A5-B876-4A6ED6301BC4}
+
+
+
+
+ MegaDemoServer.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoServer.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoServer.dpr
new file mode 100644
index 0000000..a4f42f4
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoServer.dpr
@@ -0,0 +1,26 @@
+program MegaDemoServer;
+
+{#ROGEN:MegaDemoLibrary.RODL}// RemObjects SDK: Careful, do not remove!
+
+uses
+ uROComInit,
+ uROComboService,
+ Forms,
+ MegaDemoServer_Main in 'MegaDemoServer_Main.pas' {MegaDemoServer_MainForm},
+ MegaDemoServer_Data in 'MegaDemoServer_Data.pas' {MegaDemoServer_DataModule: TDataModule},
+ MegaDemoLibrary_Intf in 'MegaDemoLibrary_Intf.pas',
+ MegaDemoLibrary_Invk in 'MegaDemoLibrary_Invk.pas',
+ LoginService_Impl in 'LoginService_Impl.pas' {LoginService: TDataAbstractService},
+ OrdersService_Impl in 'OrdersService_Impl.pas' {OrdersService: TDataAbstractService};
+
+{$R *.res}
+{$R RODLFile.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'MegaDemo server';
+ Application.CreateForm(TMegaDemoServer_DataModule, MegaDemoServer_DataModule);
+ Application.CreateForm(TMegaDemoServer_MainForm, MegaDemoServer_MainForm);
+ Application.Run;
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoServer.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoServer.dproj
new file mode 100644
index 0000000..9977beb
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoServer.dproj
@@ -0,0 +1,83 @@
+
+
+ {52bc4b5a-f3b4-4085-b7e9-63fe80cf7d83}
+ MegaDemoServer.dpr
+ Debug
+ AnyCPU
+ DCC32
+ MegaDemoServer.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ MegaDemoServer.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoServer.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoServer.res
new file mode 100644
index 0000000..7455d6e
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoServer.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoServer_Data.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoServer_Data.dfm
new file mode 100644
index 0000000..9e14fb4
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoServer_Data.dfm
@@ -0,0 +1,74 @@
+object MegaDemoServer_DataModule: TMegaDemoServer_DataModule
+ OldCreateOrder = False
+ OnCreate = DataModuleCreate
+ Left = 362
+ Top = 208
+ Height = 207
+ Width = 352
+ object Server: TROIndyHTTPServer
+ Dispatchers = <
+ item
+ Name = 'Message'
+ Message = Message
+ Enabled = True
+ PathInfo = 'Bin'
+ end>
+ Port = 8099
+ Left = 32
+ Top = 8
+ end
+ object Message: TROBinMessage
+ Left = 32
+ Top = 56
+ end
+ object ConnectionManager: TDAConnectionManager
+ Connections = <
+ item
+ Name = 'Employees'
+ ConnectionString =
+ 'IBX?Server=localhost;Database=C:\Program Files\Borland\InterBase' +
+ '\examples\Database\EMPLOYEE.FDB;UserID=SYSDBA;Password=masterkey' +
+ ';'
+ Description = 'Local connection to FireBird'#39's EMPLOYEE.FDB'
+ Default = False
+ Tag = 0
+ end
+ item
+ Name = 'Northwind'
+ ConnectionString =
+ 'ADO?AuxDriver=SQLOLEDB.1;Server=localhost;Database=Northwind;Int' +
+ 'egrated Security=SSPI'
+ Description = 'Microsoft SQL Server 2000, localhost'
+ Default = True
+ Tag = 0
+ end>
+ DriverManager = DriverManager
+ PoolingEnabled = True
+ Left = 136
+ Top = 56
+ end
+ object DriverManager: TDADriverManager
+ DriverDirectory = '%MODULE%\'
+ TraceActive = False
+ TraceFlags = []
+ Left = 136
+ Top = 10
+ end
+ object DataDictionary: TDADataDictionary
+ Fields = <>
+ Left = 32
+ Top = 104
+ end
+ object SessionManager: TROInMemorySessionManager
+ Left = 136
+ Top = 104
+ end
+ object DAADODriver: TDAADODriver
+ Left = 243
+ Top = 11
+ end
+ object DAIBXDriver: TDAIBXDriver
+ Left = 244
+ Top = 59
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoServer_Data.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoServer_Data.pas
new file mode 100644
index 0000000..a9b415b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoServer_Data.pas
@@ -0,0 +1,43 @@
+unit MegaDemoServer_Data;
+
+interface
+
+uses
+ SysUtils, Classes,
+ uROClient, uROPoweredByRemObjectsButton, uROClientIntf, uROServer,
+ uROBinMessage, uROIndyHTTPServer,
+ uDAEngine, uDADriverManager, uDAClasses, uROSessions,
+ uROIndyTCPServer, uDAADODriver, uDAIBXDriver;
+
+type
+ TMegaDemoServer_DataModule = class(TDataModule)
+ Server: TROIndyHTTPServer;
+ Message: TROBinMessage;
+ ConnectionManager: TDAConnectionManager;
+ DriverManager: TDADriverManager;
+ SessionManager: TROInMemorySessionManager;
+ DAADODriver: TDAADODriver;
+ DAIBXDriver: TDAIBXDriver;
+ DataDictionary: TDADataDictionary;
+
+ procedure DataModuleCreate(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ MegaDemoServer_DataModule: TMegaDemoServer_DataModule;
+
+implementation
+
+{$R *.dfm}
+
+procedure TMegaDemoServer_DataModule.DataModuleCreate(Sender: TObject);
+begin
+ Server.Active := true;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoServer_Main.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoServer_Main.dfm
new file mode 100644
index 0000000..513b0f2
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoServer_Main.dfm
@@ -0,0 +1,44 @@
+object MegaDemoServer_MainForm: TMegaDemoServer_MainForm
+ Left = 372
+ Top = 277
+ BorderStyle = bsDialog
+ Caption = 'Data Abstract Server'
+ ClientHeight = 108
+ ClientWidth = 345
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ PixelsPerInch = 96
+ TextHeight = 13
+ object DAPoweredByDataAbstractButton1: TDAPoweredByDataAbstractButton
+ Left = 66
+ Top = 8
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ end
+ object Label1: TLabel
+ Left = 8
+ Top = 60
+ Width = 101
+ Height = 13
+ Caption = 'Selected connection:'
+ end
+ object cbConnectionName: TComboBox
+ Left = 7
+ Top = 75
+ Width = 329
+ Height = 21
+ Style = csDropDownList
+ Anchors = [akLeft, akTop, akRight]
+ ItemHeight = 13
+ TabOrder = 0
+ OnChange = cbConnectionNameChange
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoServer_Main.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoServer_Main.pas
new file mode 100644
index 0000000..a935c0f
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/MegaDemoServer_Main.pas
@@ -0,0 +1,56 @@
+unit MegaDemoServer_Main;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
+ uDAPoweredByDataAbstractButton, uROPoweredByRemObjectsButton;
+
+type
+ TMegaDemoServer_MainForm = class(TForm)
+ DAPoweredByDataAbstractButton1: TDAPoweredByDataAbstractButton;
+ Label1: TLabel;
+ cbConnectionName: TComboBox;
+ procedure FormCreate(Sender: TObject);
+ procedure cbConnectionNameChange(Sender: TObject);
+ private
+ fCurrentConnectionName: string;
+ public
+ { Public declarations }
+ function GetSelectedConnectionName: string;
+ end;
+
+var
+ MegaDemoServer_MainForm: TMegaDemoServer_MainForm;
+
+implementation
+uses
+ MegaDemoServer_Data;
+{$R *.dfm}
+
+procedure TMegaDemoServer_MainForm.FormCreate(Sender: TObject);
+var
+ i: integer;
+begin
+ with MegaDemoServer_DataModule.ConnectionManager.Connections do
+ for i := 0 to Count - 1 do begin
+ cbConnectionName.AddItem(Connections[i].Name + ' - ' + Connections[i].Description, nil);
+ if Connections[i].Default then begin
+ cbConnectionName.ItemIndex := i;
+ cbConnectionNameChange(cbConnectionName);
+ end;
+ end;
+end;
+
+function TMegaDemoServer_MainForm.GetSelectedConnectionName: string;
+begin
+ Result := fCurrentConnectionName;
+end;
+
+procedure TMegaDemoServer_MainForm.cbConnectionNameChange(Sender: TObject);
+begin
+ fCurrentConnectionName := copy(cbConnectionName.Text, 1, pos(' ', cbConnectionName.Text)-1);
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/OrdersService_Impl.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/OrdersService_Impl.dfm
new file mode 100644
index 0000000..8eeb63c
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/OrdersService_Impl.dfm
@@ -0,0 +1,323 @@
+object OrdersService: TOrdersService
+ OldCreateOrder = True
+ RequiresSession = True
+ SessionManager = MegaDemoServer_DataModule.SessionManager
+ ServiceSchema = Schema
+ ServiceDataStreamer = BinDataStreamer
+ ExportedDataTables = <>
+ BeforeAcquireConnection = DataAbstractServiceBeforeAcquireConnection
+ Left = 221
+ Top = 190
+ Height = 206
+ Width = 256
+ object bpCustomers: TDABusinessProcessor
+ ProcessorOptions = [poAutoGenerateInsert, poAutoGenerateUpdate, poAutoGenerateDelete, poAutoGenerateRefreshDataset, poPrepareCommands]
+ UpdateMode = updWhereKeyOnly
+ Left = 138
+ Top = 60
+ end
+ object BinDataStreamer: TDABinDataStreamer
+ BufferSize = 262144
+ Left = 62
+ Top = 60
+ end
+ object Schema: TDASchema
+ ConnectionManager = MegaDemoServer_DataModule.ConnectionManager
+ DataDictionary = MegaDemoServer_DataModule.DataDictionary
+ Datasets = <
+ item
+ Params = <>
+ Statements = <
+ item
+ Connection = 'Employees'
+ TargetTable = 'CUSTOMER'
+ SQL = 'SELECT C.CUST_NO, C.CUSTOMER, C.CITY'#10'FROM CUSTOMER C'
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'CustomerID'
+ TableField = 'CUST_NO'
+ end
+ item
+ DatasetField = 'CustomerName'
+ TableField = 'CUSTOMER'
+ end
+ item
+ DatasetField = 'City'
+ TableField = 'CITY'
+ end>
+ end
+ item
+ Connection = 'Northwind'
+ TargetTable = 'Customers'
+ SQL =
+ 'SELECT '#10' Custs.CustomerID, Custs.CompanyName, Custs.City'#10' FR' +
+ 'OM'#10' Customers Custs'
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'CustomerID'
+ TableField = 'CustomerID'
+ end
+ item
+ DatasetField = 'CustomerName'
+ TableField = 'CompanyName'
+ end
+ item
+ DatasetField = 'City'
+ TableField = 'City'
+ end>
+ end>
+ Name = 'Customers'
+ Description = 'Retrieves the list of customers in the database'
+ Fields = <
+ item
+ Name = 'CustomerID'
+ DataType = datString
+ Size = 5
+ Description = 'The customer'#39's code'
+ BlobType = dabtUnknown
+ GeneratorName = 'CUST_NO_GEN'
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ DisplayLabel = 'Customer ID'
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CustomerName'
+ DataType = datString
+ Size = 40
+ Description = 'The customer'#39's name'
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ Required = True
+ DisplayWidth = 0
+ DisplayLabel = 'Name'
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'City'
+ DataType = datString
+ Size = 25
+ Description = 'The customer'#39's city'
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ BusinessRulesClient.ScriptLanguage = rslPascalScript
+ BusinessRulesServer.ScriptLanguage = rslPascalScript
+ end
+ item
+ Params = <
+ item
+ Name = 'EmployeeID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end
+ item
+ Name = 'CustomerID'
+ DataType = datString
+ Size = 5
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end>
+ Statements = <
+ item
+ Connection = 'Employees'
+ TargetTable = 'SALES'
+ SQL =
+ 'SELECT S.CUST_NO, S.ORDER_DATE, S.DATE_NEEDED, S.SHIP_DATE, S.TO' +
+ 'TAL_VALUE'#10'FROM SALES S'#10'WHERE S.SALES_REP=:EmployeeID AND S.CUST_' +
+ 'NO=:CustomerID'
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'CustomerID'
+ TableField = 'CUST_NO'
+ end
+ item
+ DatasetField = 'OrderDate'
+ TableField = 'ORDER_DATE'
+ end
+ item
+ DatasetField = 'RequiredDate'
+ TableField = 'DATE_NEEDED'
+ end
+ item
+ DatasetField = 'ShippedDate'
+ TableField = 'SHIP_DATE'
+ end
+ item
+ DatasetField = 'OrderAmount'
+ TableField = 'TOTAL_VALUE'
+ end>
+ end
+ item
+ Connection = 'Northwind'
+ TargetTable = 'Orders'
+ SQL =
+ 'SELECT '#10' Ords.CustomerID, Ords.OrderDate, Ords.RequiredDate, ' +
+ 'Ords.ShippedDate, Ords.Freight as OrderAmount'#10' FROM'#10' Orders ' +
+ 'Ords'#10'WHERE Ords.EmployeeID=:EmployeeID AND Ords.CustomerID=:Cust' +
+ 'omerID'
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'CustomerID'
+ TableField = 'CustomerID'
+ end
+ item
+ DatasetField = 'OrderDate'
+ TableField = 'OrderDate'
+ end
+ item
+ DatasetField = 'RequiredDate'
+ TableField = 'RequiredDate'
+ end
+ item
+ DatasetField = 'ShippedDate'
+ TableField = 'ShippedDate'
+ end
+ item
+ DatasetField = 'OrderAmount'
+ TableField = 'OrderAmount'
+ end>
+ end>
+ Name = 'OrdersByCustomer'
+ Description =
+ 'Retrieves the list of orders for a specific customer entered by ' +
+ 'the loged employee'
+ Fields = <
+ item
+ Name = 'CustomerID'
+ DataType = datString
+ Size = 5
+ Description = 'The identifier of the customer that placed this order'
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ LogChanges = False
+ DisplayWidth = 0
+ DisplayLabel = 'Customer ID'
+ ReadOnly = True
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'OrderDate'
+ DataType = datDateTime
+ Description = 'The order'#39's date'
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ DisplayLabel = 'Order Date'
+ ReadOnly = True
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'RequiredDate'
+ DataType = datDateTime
+ Description = 'The date by which the order has to be received'
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ DisplayLabel = 'Required Date'
+ ReadOnly = True
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShippedDate'
+ DataType = datDateTime
+ Description = 'The date this order has been shipped'
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ DisplayLabel = 'Shipped Date'
+ ReadOnly = True
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'OrderAmount'
+ DataType = datCurrency
+ Description = 'The order'#39's amount'
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ DisplayLabel = 'Order Amount'
+ ReadOnly = True
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ BusinessRulesClient.ScriptLanguage = rslPascalScript
+ BusinessRulesServer.ScriptLanguage = rslPascalScript
+ end>
+ JoinDataTables = <>
+ UnionDataTables = <>
+ Commands = <>
+ RelationShips = <
+ item
+ Name = 'CustomersToOrders'
+ MasterDatasetName = 'Customers'
+ MasterFields = 'CustomerID'
+ DetailDatasetName = 'OrdersByCustomer'
+ DetailFields = 'CustomerID'
+ RelationshipType = rtForeignKey
+ end>
+ UpdateRules = <>
+ Version = 0
+ Left = 62
+ Top = 15
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/OrdersService_Impl.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/OrdersService_Impl.pas
new file mode 100644
index 0000000..bc187c9
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/OrdersService_Impl.pas
@@ -0,0 +1,97 @@
+unit OrdersService_Impl;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ This is where you are supposed to code the implementation of your objects. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils, Variants,
+ {RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
+ {Required:} uRORemoteDataModule,
+ {Ancestor Implementation:} DataAbstractService_Impl,
+ {Used RODLs:} DataAbstract4_Intf,
+ {Generated:} MegaDemoLibrary_Intf, uDAClasses, uDADataStreamer,
+ uDABinAdapter, uDAScriptingProvider, uDABusinessProcessor;
+
+type
+ { TOrdersService }
+ TOrdersService = class(TDataAbstractService, IOrdersService)
+ bpCustomers: TDABusinessProcessor;
+ BinDataStreamer: TDABinDataStreamer;
+ Schema: TDASchema;
+ procedure DataAbstractServiceBeforeAcquireConnection(aSender: TObject;
+ var aConnectionName: string);
+ private
+ protected
+ { IOrdersService methods }
+ function GetCustomerOrders(const CustomerID: string): Binary;
+ end;
+
+implementation
+
+{$R *.dfm}
+uses
+ {Generated:} MegaDemoLibrary_Invk,
+ MegaDemoServer_Data, MegaDemoServer_Main;
+
+procedure Create_OrdersService(out anInstance: IUnknown);
+begin
+ anInstance := TOrdersService.Create(nil);
+end;
+
+{ OrdersService }
+
+function TOrdersService.GetCustomerOrders(const CustomerID: string): Binary;
+var
+ aTableNameArray: StringArray;
+ aTableRequestInfoArray: TableRequestInfoArray;
+ aTableRequestInfo: TableRequestInfo;
+begin
+ // This method reads all the orders of the specified customer and also filters
+ // based on the current employee's ID. The employee ID has been previously stored
+ // in the session upon the call to LoginService.Login.
+
+ aTableNameArray := StringArray.Create;
+ aTableRequestInfoArray := TableRequestInfoArray.Create;
+ try
+ aTableNameArray.Add('OrdersByCustomer');
+ aTableRequestInfo := aTableRequestInfoArray.Add;
+ with aTableRequestInfo do begin
+ IncludeSchema := True;
+ MaxRecords := -1;
+ UserFilter := '';
+ with Parameters.Add do begin
+ Name := 'CustomerID';
+ Value := CustomerID;
+ end;
+ with Parameters.Add do begin
+ Name := 'EmployeeID';
+ Value := VarToStr(Session['EmployeeID']);
+ end;
+ end;
+ Result := GetData(aTableNameArray, aTableRequestInfoArray)
+ finally
+ aTableRequestInfoArray.Free;
+ aTableNameArray.Free;
+ end;
+end;
+
+procedure TOrdersService.DataAbstractServiceBeforeAcquireConnection(
+ aSender: TObject; var aConnectionName: string);
+begin
+ // Reads the connection name from the main form.
+ aConnectionName := MegaDemoServer_MainForm.GetSelectedConnectionName;
+end;
+
+initialization
+ TROClassFactory.Create('OrdersService', Create_OrdersService, TOrdersService_Invoker);
+
+finalization
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/RODLFILE.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/RODLFILE.res
new file mode 100644
index 0000000..e8d19db
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/MegaDemo/RODLFILE.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData.Sample.html b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData.Sample.html
new file mode 100644
index 0000000..38fadb6
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData.Sample.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
+
+ Memory Data
+
+
+
+Purpose
+
+
+ This example shows how to create and populate a virtual dataset dynamically.
+The client displays two grids:
+
+
+
+ Top Grid : this displays the primary keys of one or more datasets from Northwind. Supply the names of the datasets required in a comma separated list, e.g. Regions, Customers, Employees.
+
+
+ Bottom Grid : this displays the names and sizes of files contained in the specified disk folder.
+
+
+
+
+Examine the Code
+
+
+ See the simple code in NewService_Impl.pas .
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData.bdsgroup b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData.bdsgroup
new file mode 100644
index 0000000..515b8e1
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData.bdsgroup
@@ -0,0 +1,20 @@
+
+
+
+
+ Default.Personality
+
+ 1.0
+ {588695F4-ECD2-41ED-9D79-6432C0B02C01}
+
+
+
+
+
+ MemoryData_Server.bdsproj
+ MemoryData_Client.bdsproj
+ MemoryData_Server.exe MemoryData_Client.exe
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData.bpg b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData.bpg
new file mode 100644
index 0000000..0a15ec3
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData.bpg
@@ -0,0 +1,23 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = MemoryData_Server.exe MemoryData_Client.exe
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+MemoryData_Server.exe: MemoryData_Server.dpr
+ $(DCC)
+
+MemoryData_Client.exe: MemoryData_Client.dpr
+ $(DCC)
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData.groupproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData.groupproj
new file mode 100644
index 0000000..6c66ace
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData.groupproj
@@ -0,0 +1,40 @@
+
+
+ {3e35d412-e6fa-41c3-a9d2-f8c07e8dc6fb}
+
+
+
+
+ Default.Personality
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryDataLibrary.rodl b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryDataLibrary.rodl
new file mode 100644
index 0000000..113ead8
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryDataLibrary.rodl
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryDataLibrary_Intf.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryDataLibrary_Intf.pas
new file mode 100644
index 0000000..5594e0f
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryDataLibrary_Intf.pas
@@ -0,0 +1,76 @@
+unit MemoryDataLibrary_Intf;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROClasses, uROClient, uROTypes, uROClientIntf,
+ {Used RODLs:} DataAbstract4_Intf;
+
+const
+ { Library ID }
+ LibraryUID = '{D4B11283-58D8-4C0D-9747-FEB990A41DEE}';
+
+ { Service Interface ID's }
+ INewService_IID : TGUID = '{1E22E1AC-FB18-4085-8260-F6AFF4E697BA}';
+
+ { Event ID's }
+
+type
+ { Forward declarations }
+ INewService = interface;
+
+
+
+
+ { INewService }
+ INewService = interface(IDataAbstractService)
+ ['{1E22E1AC-FB18-4085-8260-F6AFF4E697BA}']
+ end;
+
+ { CoNewService }
+ CoNewService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): INewService;
+ end;
+
+ { TNewService_Proxy }
+ TNewService_Proxy = class(TDataAbstractService_Proxy, INewService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ end;
+
+implementation
+
+uses
+ {vcl:} SysUtils,
+ {RemObjects:} uROEventRepository, uRORes;
+
+{ CoNewService }
+
+class function CoNewService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): INewService;
+begin
+ result := TNewService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+function TNewService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'NewService';
+end;
+
+initialization
+ RegisterProxyClass(INewService_IID, TNewService_Proxy);
+
+
+finalization
+ UnregisterProxyClass(INewService_IID);
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryDataLibrary_Invk.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryDataLibrary_Invk.pas
new file mode 100644
index 0000000..8f0bbd9
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryDataLibrary_Invk.pas
@@ -0,0 +1,32 @@
+unit MemoryDataLibrary_Invk;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes,
+ {RemObjects:} uROServer, uROServerIntf, uROTypes, uROClientIntf,
+ {Used RODL Intf's:} DataAbstract4_Intf,
+ {Used RODL Invk's:} DataAbstract4_Invk,
+ {Generated:} MemoryDataLibrary_Intf;
+
+type
+ TNewService_Invoker = class(TDataAbstractService_Invoker)
+ private
+ protected
+ published
+ end;
+
+implementation
+
+uses
+ {RemObjects:} uRORes, uROClient;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_Client.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_Client.bdsproj
new file mode 100644
index 0000000..c07331f
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_Client.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {F34C1BC7-82D7-4BF3-8154-5FDAC19FCDF1}
+
+
+
+
+ MemoryData_Client.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_Client.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_Client.dpr
new file mode 100644
index 0000000..54e3179
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_Client.dpr
@@ -0,0 +1,17 @@
+program MemoryData_Client;
+
+uses
+ uROComInit,
+ Forms,
+ MemoryData_ClientMain in 'MemoryData_ClientMain.pas' {MemoryData_ClientMainForm},
+ MemoryData_ClientData in 'MemoryData_ClientData.pas' {MemoryData_ClientDataModule: TDAClientDataModule};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'MemoryData - Client';
+ Application.CreateForm(TMemoryData_ClientDataModule, MemoryData_ClientDataModule);
+ Application.CreateForm(TMemoryData_ClientMainForm, MemoryData_ClientMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_Client.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_Client.dproj
new file mode 100644
index 0000000..62803ed
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_Client.dproj
@@ -0,0 +1,75 @@
+
+
+ {5aba4cae-f8e7-4072-9515-dc1d0e7611fe}
+ MemoryData_Client.dpr
+ Debug
+ AnyCPU
+ DCC32
+ MemoryData_Client.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ MemoryData_Client.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_Client.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_Client.res
new file mode 100644
index 0000000..da01de5
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_Client.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_ClientData.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_ClientData.dfm
new file mode 100644
index 0000000..21191e8
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_ClientData.dfm
@@ -0,0 +1,197 @@
+object MemoryData_ClientDataModule: TMemoryData_ClientDataModule
+ OldCreateOrder = True
+ Left = 152
+ Top = 69
+ Height = 289
+ Width = 252
+ object ROChannel: TROWinInetHTTPChannel
+ ServerLocators = <>
+ DispatchOptions = []
+ UserAgent = 'RemObjects SDK'
+ TargetURL = 'http://localhost:8099/BIN'
+ Left = 40
+ Top = 8
+ end
+ object ROMessage: TROBinMessage
+ Left = 40
+ Top = 52
+ end
+ object RORemoteService: TRORemoteService
+ ServiceName = 'NewService'
+ Message = ROMessage
+ Channel = ROChannel
+ Left = 40
+ Top = 96
+ end
+ object DABinAdapter: TDABinDataStreamer
+ Left = 40
+ Top = 142
+ end
+ object tbl_ComboDataset1: TDACDSDataTable
+ RemoteUpdatesOptions = []
+ Fields = <
+ item
+ Name = 'AutoIncField'
+ DataType = datAutoInc
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'TextField'
+ DataType = datString
+ Size = 50
+ BlobType = dabtUnknown
+ DisplayWidth = 50
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ Params = <
+ item
+ Name = 'CustomParameter'
+ DataType = datString
+ Size = 50
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end>
+ MasterMappingMode = mmDataRequest
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteDataAdapter = DARemoteDataAdapter
+ ReadOnly = False
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ LogicalName = 'ComboDataset'
+ IndexDefs = <>
+ Left = 136
+ Top = 16
+ end
+ object ds_ComboDataset1: TDADataSource
+ DataTable = tbl_ComboDataset1
+ Left = 152
+ Top = 32
+ end
+ object tbl_DirectoryData1: TDACDSDataTable
+ RemoteUpdatesOptions = []
+ Fields = <
+ item
+ Name = 'FileName'
+ DataType = datString
+ Size = 200
+ BlobType = dabtUnknown
+ DisplayWidth = 50
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'FileSize'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ Params = <
+ item
+ Name = 'Directory'
+ DataType = datString
+ Size = 200
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end>
+ MasterMappingMode = mmDataRequest
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteDataAdapter = DARemoteDataAdapter
+ ReadOnly = False
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ LogicalName = 'DirectoryData'
+ IndexDefs = <>
+ Left = 136
+ Top = 112
+ end
+ object ds_DirectoryData1: TDADataSource
+ DataTable = tbl_DirectoryData1
+ Left = 152
+ Top = 128
+ end
+ object DARemoteDataAdapter: TDARemoteDataAdapter
+ GetSchemaCall.RemoteService = RORemoteService
+ GetSchemaCall.MethodName = 'GetSchema'
+ GetSchemaCall.Params = <
+ item
+ Name = 'aFilter'
+ DataType = rtString
+ Flag = fIn
+ Value = Null
+ end
+ item
+ Name = 'Result'
+ DataType = rtString
+ Flag = fResult
+ Value = Null
+ end>
+ GetSchemaCall.Default = False
+ GetSchemaCall.IncomingSchemaParameter = 'Result'
+ GetSchemaCall.OutgoingFilterParameter = 'aFilter'
+ GetDataCall.RemoteService = RORemoteService
+ GetDataCall.MethodName = 'GetData'
+ GetDataCall.Params = <
+ item
+ Name = 'aTableNameArray'
+ DataType = rtUserDefined
+ Flag = fIn
+ TypeName = 'StringArray'
+ end
+ item
+ Name = 'aTableRequestInfoArray'
+ DataType = rtUserDefined
+ Flag = fIn
+ TypeName = 'TableRequestInfoArray'
+ end
+ item
+ Name = 'Result'
+ DataType = rtBinary
+ Flag = fResult
+ end>
+ GetDataCall.Default = False
+ GetDataCall.OutgoingTableNamesParameter = 'aTableNameArray'
+ GetDataCall.OutgoingTableRequestInfosParameter = 'aTableRequestInfoArray'
+ GetDataCall.IncomingDataParameter = 'Result'
+ UpdateDataCall.RemoteService = RORemoteService
+ UpdateDataCall.MethodName = 'UpdateData'
+ UpdateDataCall.Params = <
+ item
+ Name = 'aDelta'
+ DataType = rtBinary
+ Flag = fIn
+ end
+ item
+ Name = 'Result'
+ DataType = rtBinary
+ Flag = fResult
+ end>
+ UpdateDataCall.Default = False
+ UpdateDataCall.OutgoingDeltaParameter = 'aDelta'
+ UpdateDataCall.IncomingDeltaParameter = 'Result'
+ GetScriptsCall.RemoteService = RORemoteService
+ GetScriptsCall.Params = <>
+ GetScriptsCall.Default = False
+ RemoteService = RORemoteService
+ DataStreamer = DABinAdapter
+ Left = 40
+ Top = 192
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_ClientData.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_ClientData.pas
new file mode 100644
index 0000000..244bca4
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_ClientData.pas
@@ -0,0 +1,36 @@
+unit MemoryData_ClientData;
+
+interface
+
+uses {vcl:} SysUtils, Classes, DB, DBClient,
+ {RemObjects:} uROClient, uROClientIntf, uRORemoteService, uROBinMessage, uROWinInetHTTPChannel,
+ {Data Abstract:} uDADataTable, uDABINAdapter, uDAInterfaces,
+ uDAScriptingProvider, uDACDSDataTable,
+ uDARemoteDataAdapter, uDADataStreamer;
+
+type
+ TMemoryData_ClientDataModule = class(TDataModule)
+ ROMessage: TROBinMessage;
+ ROChannel: TROWinInetHTTPChannel;
+ RORemoteService: TRORemoteService;
+ DABinAdapter: TDABinDataStreamer;
+ tbl_ComboDataset1: TDACDSDataTable;
+ ds_ComboDataset1: TDADataSource;
+ tbl_DirectoryData1: TDACDSDataTable;
+ ds_DirectoryData1: TDADataSource;
+ DARemoteDataAdapter: TDARemoteDataAdapter;
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ MemoryData_ClientDataModule: TMemoryData_ClientDataModule;
+
+implementation
+
+{$R *.dfm}
+
+initialization
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_ClientMain.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_ClientMain.dfm
new file mode 100644
index 0000000..d1332b0
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_ClientMain.dfm
@@ -0,0 +1,121 @@
+object MemoryData_ClientMainForm: TMemoryData_ClientMainForm
+ Left = 98
+ Top = 36
+ AutoScroll = False
+ BorderWidth = 5
+ Caption = 'MemoryData - Client'
+ ClientHeight = 440
+ ClientWidth = 512
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ PixelsPerInch = 96
+ TextHeight = 13
+ object DBGrid1: TDBGrid
+ Left = 0
+ Top = 35
+ Width = 512
+ Height = 122
+ Align = alClient
+ DataSource = MemoryData_ClientDataModule.ds_ComboDataset1
+ TabOrder = 0
+ TitleFont.Charset = DEFAULT_CHARSET
+ TitleFont.Color = clWindowText
+ TitleFont.Height = -11
+ TitleFont.Name = 'MS Sans Serif'
+ TitleFont.Style = []
+ end
+ object DBGrid2: TDBGrid
+ Left = 0
+ Top = 192
+ Width = 512
+ Height = 248
+ Align = alBottom
+ DataSource = MemoryData_ClientDataModule.ds_DirectoryData1
+ TabOrder = 1
+ TitleFont.Charset = DEFAULT_CHARSET
+ TitleFont.Color = clWindowText
+ TitleFont.Height = -11
+ TitleFont.Name = 'MS Sans Serif'
+ TitleFont.Style = []
+ end
+ object Panel1: TPanel
+ Left = 0
+ Top = 0
+ Width = 512
+ Height = 35
+ Align = alTop
+ BevelOuter = bvNone
+ TabOrder = 2
+ DesignSize = (
+ 512
+ 35)
+ object Label1: TLabel
+ Left = 88
+ Top = 11
+ Width = 89
+ Height = 13
+ Caption = 'Custom Parameter:'
+ end
+ object Open1: TButton
+ Left = 0
+ Top = 5
+ Width = 75
+ Height = 25
+ Caption = 'Open/Close'
+ TabOrder = 0
+ OnClick = Open1Click
+ end
+ object eCustomParameter: TEdit
+ Left = 183
+ Top = 8
+ Width = 325
+ Height = 21
+ Anchors = [akLeft, akTop, akRight]
+ TabOrder = 1
+ Text = 'Regions, Customers, Employees'
+ end
+ end
+ object Panel2: TPanel
+ Left = 0
+ Top = 157
+ Width = 512
+ Height = 35
+ Align = alBottom
+ BevelOuter = bvNone
+ TabOrder = 3
+ DesignSize = (
+ 512
+ 35)
+ object Label2: TLabel
+ Left = 88
+ Top = 10
+ Width = 45
+ Height = 13
+ Caption = 'Directory:'
+ end
+ object open2: TButton
+ Left = 0
+ Top = 5
+ Width = 75
+ Height = 25
+ Caption = 'Open/Close'
+ TabOrder = 0
+ OnClick = open2Click
+ end
+ object eDirectory: TEdit
+ Left = 138
+ Top = 8
+ Width = 370
+ Height = 21
+ Anchors = [akLeft, akTop, akRight]
+ TabOrder = 1
+ Text = 'C:\Windows'
+ end
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_ClientMain.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_ClientMain.pas
new file mode 100644
index 0000000..fe8473b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_ClientMain.pas
@@ -0,0 +1,56 @@
+unit MemoryData_ClientMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
+ uROClient, uROClientIntf, uRORemoteService, uROBinMessage, uROIndyHTTPChannel,
+ Grids, DBGrids, ExtCtrls;
+
+type
+ TMemoryData_ClientMainForm = class(TForm)
+ DBGrid1: TDBGrid;
+ DBGrid2: TDBGrid;
+ Panel1: TPanel;
+ Panel2: TPanel;
+ open2: TButton;
+ Label2: TLabel;
+ eDirectory: TEdit;
+ Open1: TButton;
+ Label1: TLabel;
+ eCustomParameter: TEdit;
+ procedure Open1Click(Sender: TObject);
+ procedure open2Click(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ MemoryData_ClientMainForm: TMemoryData_ClientMainForm;
+
+implementation
+
+uses MemoryData_ClientData;
+
+{$R *.dfm}
+
+procedure TMemoryData_ClientMainForm.Open1Click(Sender: TObject);
+begin
+ with MemoryData_ClientDataModule.tbl_ComboDataset1 do begin
+ ParamByName('CustomParameter').AsString := eCustomParameter.Text;
+ Active := Active xor TRUE;
+ end;
+end;
+
+procedure TMemoryData_ClientMainForm.open2Click(Sender: TObject);
+begin
+ with MemoryData_ClientDataModule.tbl_DirectoryData1 do begin
+ ParamByName('Directory').AsString := eDirectory.Text;
+ Active := Active xor TRUE;
+ end;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_Server.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_Server.bdsproj
new file mode 100644
index 0000000..48f2368
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_Server.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {0E1097E3-64C1-46B5-BB99-A5D74A2C9EF7}
+
+
+
+
+ MemoryData_Server.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_Server.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_Server.dpr
new file mode 100644
index 0000000..a8d30c4
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_Server.dpr
@@ -0,0 +1,23 @@
+program MemoryData_Server;
+
+{#ROGEN:MemoryDataLibrary.rodl} // RemObjects: Careful, do not remove!
+
+uses
+ uROComInit,
+ Forms,
+ MemoryData_ServerMain in 'MemoryData_ServerMain.pas' {MemoryData_ServerMainForm},
+ NewService_Impl in 'NewService_Impl.pas' {NewService: TDARemoteService},
+ MemoryData_ServerData in 'MemoryData_ServerData.pas' {MemoryData_ServerDataModule: TDataModule},
+ MemoryDataLibrary_Intf in 'MemoryDataLibrary_Intf.pas',
+ MemoryDataLibrary_Invk in 'MemoryDataLibrary_Invk.pas';
+
+{$R *.res}
+{$R RODLFile.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'MemoryData - Server';
+ Application.CreateForm(TMemoryData_ServerDataModule, MemoryData_ServerDataModule);
+ Application.CreateForm(TMemoryData_ServerMainForm, MemoryData_ServerMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_Server.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_Server.dproj
new file mode 100644
index 0000000..7ad4518
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_Server.dproj
@@ -0,0 +1,80 @@
+
+
+ {36625199-3349-4952-8391-e35b3fcc6935}
+ MemoryData_Server.dpr
+ Debug
+ AnyCPU
+ DCC32
+ MemoryData_Server.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ MemoryData_Server.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_Server.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_Server.res
new file mode 100644
index 0000000..7455d6e
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_Server.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_ServerData.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_ServerData.dfm
new file mode 100644
index 0000000..5e57f4b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_ServerData.dfm
@@ -0,0 +1,64 @@
+object MemoryData_ServerDataModule: TMemoryData_ServerDataModule
+ OldCreateOrder = False
+ OnCreate = DataModuleCreate
+ Left = 104
+ Top = 110
+ Height = 207
+ Width = 352
+ object ROServer: TROIndyHTTPServer
+ Dispatchers = <
+ item
+ Name = 'ROMessage'
+ Message = ROMessage
+ Enabled = True
+ PathInfo = 'Bin'
+ end>
+ Port = 8099
+ Left = 32
+ Top = 8
+ end
+ object ROMessage: TROBinMessage
+ Left = 34
+ Top = 56
+ end
+ object ConnectionManager: TDAConnectionManager
+ MaxPoolSize = 10
+ PoolTimeoutSeconds = 60
+ PoolBehaviour = pbWait
+ WaitIntervalSeconds = 1
+ Connections = <
+ item
+ Name = 'Northwind'
+ ConnectionString =
+ 'ADO?AuxDriver=SQLOLEDB.1;Server=localhost;Database=Northwind;Use' +
+ 'rID=sa;Password=;'
+ Default = True
+ Tag = 0
+ end>
+ DriverManager = DriverManager
+ PoolingEnabled = True
+ Left = 136
+ Top = 56
+ end
+ object DriverManager: TDADriverManager
+ DriverDirectory = '%SYSTEM%\'
+ AutoLoad = False
+ TraceActive = False
+ TraceFlags = []
+ Left = 136
+ Top = 10
+ end
+ object ADODriver: TDAADODriver
+ Left = 256
+ Top = 8
+ end
+ object IBXDriver: TDAIBXDriver
+ Left = 256
+ Top = 56
+ end
+ object DataDictionary: TDADataDictionary
+ Fields = <>
+ Left = 32
+ Top = 104
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_ServerData.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_ServerData.pas
new file mode 100644
index 0000000..fa141a5
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_ServerData.pas
@@ -0,0 +1,48 @@
+unit MemoryData_ServerData;
+
+interface
+
+uses
+ SysUtils, Classes,
+ uROClient, uROPoweredByRemObjectsButton, uROClientIntf, uROServer,
+ uROBinMessage, uROIndyHTTPServer,
+ uDADriverManager, uDAClasses, uDAEngine, uDAIBXDriver, uDAADODriver,
+ uROIndyTCPServer;
+
+const
+ { Dataset names for Schema }
+ ds_Employees = 'Employees';
+ ds_ComboDataset = 'ComboDataset';
+ ds_Customers = 'Customers';
+ ds_Region = 'Region';
+
+type
+ TMemoryData_ServerDataModule = class(TDataModule)
+ ROServer: TROIndyHTTPServer;
+ ROMessage: TROBinMessage;
+ DriverManager: TDADriverManager;
+ ADODriver: TDAADODriver;
+ IBXDriver: TDAIBXDriver;
+ ConnectionManager: TDAConnectionManager;
+ DataDictionary: TDADataDictionary;
+ procedure DataModuleCreate(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ MemoryData_ServerDataModule: TMemoryData_ServerDataModule;
+
+implementation
+
+{$R *.dfm}
+
+procedure TMemoryData_ServerDataModule.DataModuleCreate(Sender: TObject);
+begin
+ ROServer.Active := true;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_ServerMain.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_ServerMain.dfm
new file mode 100644
index 0000000..4043fbb
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_ServerMain.dfm
@@ -0,0 +1,25 @@
+object MemoryData_ServerMainForm: TMemoryData_ServerMainForm
+ Left = 41
+ Top = 43
+ BorderStyle = bsDialog
+ Caption = 'MemoryData - Server'
+ ClientHeight = 64
+ ClientWidth = 228
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ PixelsPerInch = 96
+ TextHeight = 13
+ object DAPoweredByDataAbstractButton: TDAPoweredByDataAbstractButton
+ Left = 9
+ Top = 8
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_ServerMain.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_ServerMain.pas
new file mode 100644
index 0000000..7a60dcd
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/MemoryData_ServerMain.pas
@@ -0,0 +1,26 @@
+unit MemoryData_ServerMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
+ uROClient, uROPoweredByRemObjectsButton, uROClientIntf, uROServer,
+ uROBinMessage, uROIndyHTTPServer, uDAPoweredByDataAbstractButton;
+
+type
+ TMemoryData_ServerMainForm = class(TForm)
+ DAPoweredByDataAbstractButton: TDAPoweredByDataAbstractButton;
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ MemoryData_ServerMainForm: TMemoryData_ServerMainForm;
+
+implementation
+
+{$R *.dfm}
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/NewService_Impl.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/NewService_Impl.dfm
new file mode 100644
index 0000000..393cef1
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/NewService_Impl.dfm
@@ -0,0 +1,677 @@
+object NewService: TNewService
+ OldCreateOrder = True
+ ServiceSchema = Schema
+ ServiceDataStreamer = BinAdapter
+ ExportedDataTables = <
+ item
+ DataTable = dtComboDataset
+ end
+ item
+ DataTable = dtWindowsDir
+ end>
+ BeforeGetDatasetData = DataAbstractServiceBeforeGetDatasetData
+ ValidateDatasetAccess = DataAbstractServiceValidateDatasetAccess
+ Left = 339
+ Top = 191
+ Height = 149
+ Width = 326
+ object BinAdapter: TDABinDataStreamer
+ Left = 32
+ Top = 8
+ end
+ object Schema: TDASchema
+ ConnectionManager = MemoryData_ServerDataModule.ConnectionManager
+ DataDictionary = MemoryData_ServerDataModule.DataDictionary
+ Datasets = <
+ item
+ Params = <>
+ Statements = <
+ item
+ Connection = 'Northwind'
+ TargetTable = 'Employees'
+ SQL =
+ 'SELECT '#10' EmployeeID, LastName, FirstName, Title, TitleOfCourt' +
+ 'esy, '#10' BirthDate, HireDate, Address, City, Region, PostalCode' +
+ ', '#10' Country, HomePhone, Extension, Photo, Notes, ReportsTo, '#10 +
+ ' PhotoPath'#10' FROM'#10' Employees'
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'EmployeeID'
+ TableField = 'EmployeeID'
+ end
+ item
+ DatasetField = 'LastName'
+ TableField = 'LastName'
+ end
+ item
+ DatasetField = 'FirstName'
+ TableField = 'FirstName'
+ end
+ item
+ DatasetField = 'Title'
+ TableField = 'Title'
+ end
+ item
+ DatasetField = 'TitleOfCourtesy'
+ TableField = 'TitleOfCourtesy'
+ end
+ item
+ DatasetField = 'BirthDate'
+ TableField = 'BirthDate'
+ end
+ item
+ DatasetField = 'HireDate'
+ TableField = 'HireDate'
+ end
+ item
+ DatasetField = 'Address'
+ TableField = 'Address'
+ end
+ item
+ DatasetField = 'City'
+ TableField = 'City'
+ end
+ item
+ DatasetField = 'Region'
+ TableField = 'Region'
+ end
+ item
+ DatasetField = 'PostalCode'
+ TableField = 'PostalCode'
+ end
+ item
+ DatasetField = 'Country'
+ TableField = 'Country'
+ end
+ item
+ DatasetField = 'HomePhone'
+ TableField = 'HomePhone'
+ end
+ item
+ DatasetField = 'Extension'
+ TableField = 'Extension'
+ end
+ item
+ DatasetField = 'Photo'
+ TableField = 'Photo'
+ end
+ item
+ DatasetField = 'Notes'
+ TableField = 'Notes'
+ end
+ item
+ DatasetField = 'ReportsTo'
+ TableField = 'ReportsTo'
+ end
+ item
+ DatasetField = 'PhotoPath'
+ TableField = 'PhotoPath'
+ end>
+ end>
+ Name = 'Employees'
+ Fields = <
+ item
+ Name = 'EmployeeID'
+ DataType = datAutoInc
+ BlobType = dabtUnknown
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'LastName'
+ DataType = datString
+ Size = 20
+ BlobType = dabtUnknown
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'FirstName'
+ DataType = datString
+ Size = 10
+ BlobType = dabtUnknown
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Title'
+ DataType = datString
+ Size = 30
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'TitleOfCourtesy'
+ DataType = datString
+ Size = 25
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'BirthDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'HireDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Address'
+ DataType = datString
+ Size = 60
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'City'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Region'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'PostalCode'
+ DataType = datString
+ Size = 10
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Country'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'HomePhone'
+ DataType = datString
+ Size = 24
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Extension'
+ DataType = datString
+ Size = 4
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Photo'
+ DataType = datBlob
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Notes'
+ DataType = datMemo
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ReportsTo'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'PhotoPath'
+ DataType = datString
+ Size = 255
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ BusinessRulesClient.ScriptLanguage = rslPascalScript
+ BusinessRulesServer.ScriptLanguage = rslPascalScript
+ end
+ item
+ Params = <>
+ Statements = <
+ item
+ Connection = 'Northwind'
+ TargetTable = 'Customers'
+ SQL =
+ 'SELECT '#10' CustomerID, CompanyName, ContactName, ContactTitle, ' +
+ #10' Address, City, Region, PostalCode, Country, Phone, '#10' Fax' +
+ #10' FROM'#10' Customers'
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'CustomerID'
+ TableField = 'CustomerID'
+ end
+ item
+ DatasetField = 'CompanyName'
+ TableField = 'CompanyName'
+ end
+ item
+ DatasetField = 'ContactName'
+ TableField = 'ContactName'
+ end
+ item
+ DatasetField = 'ContactTitle'
+ TableField = 'ContactTitle'
+ end
+ item
+ DatasetField = 'Address'
+ TableField = 'Address'
+ end
+ item
+ DatasetField = 'City'
+ TableField = 'City'
+ end
+ item
+ DatasetField = 'Region'
+ TableField = 'Region'
+ end
+ item
+ DatasetField = 'PostalCode'
+ TableField = 'PostalCode'
+ end
+ item
+ DatasetField = 'Country'
+ TableField = 'Country'
+ end
+ item
+ DatasetField = 'Phone'
+ TableField = 'Phone'
+ end
+ item
+ DatasetField = 'Fax'
+ TableField = 'Fax'
+ end>
+ end>
+ Name = 'Customers'
+ Fields = <
+ item
+ Name = 'CustomerID'
+ DataType = datString
+ Size = 5
+ BlobType = dabtUnknown
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CompanyName'
+ DataType = datString
+ Size = 40
+ BlobType = dabtUnknown
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ContactName'
+ DataType = datString
+ Size = 30
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ContactTitle'
+ DataType = datString
+ Size = 30
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Address'
+ DataType = datString
+ Size = 60
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'City'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Region'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'PostalCode'
+ DataType = datString
+ Size = 10
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Country'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Phone'
+ DataType = datString
+ Size = 24
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Fax'
+ DataType = datString
+ Size = 24
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ BusinessRulesClient.ScriptLanguage = rslPascalScript
+ BusinessRulesServer.ScriptLanguage = rslPascalScript
+ end
+ item
+ Params = <>
+ Statements = <
+ item
+ Connection = 'Northwind'
+ TargetTable = 'Region'
+ SQL = 'SELECT '#10' RegionID, RegionDescription'#10' FROM'#10' Region'
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'RegionID'
+ TableField = 'RegionID'
+ end
+ item
+ DatasetField = 'RegionDescription'
+ TableField = 'RegionDescription'
+ end>
+ end>
+ Name = 'Regions'
+ Fields = <
+ item
+ Name = 'RegionID'
+ DataType = datAutoInc
+ BlobType = dabtUnknown
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'RegionDescription'
+ DataType = datString
+ Size = 50
+ BlobType = dabtUnknown
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ BusinessRulesClient.ScriptLanguage = rslPascalScript
+ BusinessRulesServer.ScriptLanguage = rslPascalScript
+ end>
+ Commands = <>
+ RelationShips = <
+ item
+ Name = 'FK_Employees_Employees'
+ MasterDatasetName = 'Employees'
+ MasterFields = 'EmployeeID'
+ DetailDatasetName = 'Employees'
+ DetailFields = 'ReportsTo'
+ end>
+ UpdateRules = <>
+ Left = 32
+ Top = 56
+ end
+ object dtComboDataset: TDACDSDataTable
+ RemoteUpdatesOptions = []
+ Fields = <
+ item
+ Name = 'AutoIncField'
+ DataType = datAutoInc
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'TextField'
+ DataType = datString
+ Size = 50
+ BlobType = dabtUnknown
+ DisplayWidth = 50
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ Params = <
+ item
+ Name = 'CustomParameter'
+ DataType = datString
+ Size = 50
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end>
+ MasterMappingMode = mmDataRequest
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteFetchEnabled = False
+ ReadOnly = False
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ LogicalName = 'ComboDataset'
+ IndexDefs = <>
+ Left = 128
+ Top = 56
+ end
+ object dtWindowsDir: TDACDSDataTable
+ RemoteUpdatesOptions = []
+ Fields = <
+ item
+ Name = 'FileName'
+ DataType = datString
+ Size = 200
+ BlobType = dabtUnknown
+ DisplayWidth = 50
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'FileSize'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ Params = <
+ item
+ Name = 'Directory'
+ DataType = datString
+ Size = 200
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end>
+ MasterMappingMode = mmDataRequest
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteFetchEnabled = False
+ ReadOnly = False
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ LogicalName = 'DirectoryData'
+ IndexDefs = <>
+ Left = 216
+ Top = 56
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/NewService_Impl.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/NewService_Impl.pas
new file mode 100644
index 0000000..3d06ac6
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/NewService_Impl.pas
@@ -0,0 +1,173 @@
+unit NewService_Impl;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ This is where you are supposed to code the implementation of your objects. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils,
+ {RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
+ {Ancestor Implementation:} DataAbstractService_Impl,
+ {Used RODLs:} DataAbstract4_Intf,
+ {Generated:} MemoryDataLibrary_Intf, uDAScriptingProvider, uDADataTable,
+ uDACDSDataTable, uDAClasses, uDADataStreamer, uDABinAdapter, uDAInterfaces;
+
+const
+ { Dataset names for Schema }
+ ds_Employees = 'Employees';
+ ds_Customers = 'Customers';
+ ds_Regions = 'Regions';
+
+type
+ { TNewService }
+ TNewService = class(TDataAbstractService, INewService)
+ BinAdapter: TDABinDataStreamer;
+ dtComboDataset: TDACDSDataTable;
+ dtWindowsDir: TDACDSDataTable;
+ Schema: TDASchema;
+ procedure DataAbstractServiceBeforeGetDatasetData(aSender: TObject;
+ const aDataset: IDADataset; const aIncludeSchema: Boolean;
+ const aMaxRecords: Integer);
+ procedure DataAbstractServiceValidateDatasetAccess(Sender: TObject;
+ const aConnection: IDAConnection; const aDatasetName: string;
+ const aParamNames: array of string;
+ const aParamValues: array of Variant; aSchema: TDASchema;
+ var Allowed: Boolean);
+ private
+ procedure FillComboDataset(const aDataset: IDAEditableDataset);
+ procedure FillWinDirDataset(const aDataset: IDAEditableDataset);
+ protected
+ { INewService methods }
+ end;
+
+implementation
+
+{$R *.dfm}
+uses
+ {Generated:} MemoryDataLibrary_Invk, MemoryData_ServerData, Dialogs;
+
+procedure Create_NewService(out anInstance: IUnknown);
+begin
+ anInstance := TNewService.Create(nil);
+end;
+
+procedure TNewService.FillComboDataset(const aDataset: IDAEditableDataset);
+var
+ employees,
+ customers,
+ regions: IDADataset;
+ textfield: TDAField;
+begin
+ with aDataset do begin
+ // Opens the in memory data table
+ Open;
+ textfield := FieldByName('TextField');
+
+ // Adds 3 dummy records
+ Insert;
+ textfield.AsString := 'String A';
+ Post;
+
+ Insert;
+ textfield.AsString := 'String B';
+ Post;
+
+ Insert;
+ textfield.AsString := 'String C';
+ Post;
+
+ // Fetches data from other datasets, according to the value of the parameter "CustomParameter"
+ if (Pos('EMPLOYEES', UpperCase(ParamByName('CustomParameter').AsString)) > 0) then begin
+ employees := Schema.NewDataset(Connection, ds_Employees, [], [], TRUE);
+ while not employees.EOF do begin
+ Insert;
+ textfield.AsString := employees.FieldByName('FirstName').AsString + ' ' + employees.FieldByName('LastName').AsString;
+ Post;
+
+ employees.Next;
+ end;
+ employees:=nil;
+ end;
+ if (Pos('CUSTOMERS', UpperCase(ParamByName('CustomParameter').AsString)) > 0) then begin
+ customers := Schema.NewDataset(Connection, ds_Customers, [], [], TRUE);
+ while not customers.EOF do begin
+ Insert;
+ textfield.AsString := customers.FieldByName('CompanyName').AsString;
+ Post;
+
+ customers.Next;
+ end;
+ customers := nil;
+ end;
+ if (Pos('REGIONS', UpperCase(ParamByName('CustomParameter').AsString)) > 0) then begin
+ regions := Schema.NewDataset(Connection, ds_Regions, [], [], TRUE);
+ while not regions.EOF do begin
+ Insert;
+ textfield.AsString := regions.FieldByName('RegionDescription').AsString;
+ Post;
+
+ regions.Next;
+ end;
+ regions := nil;
+ end;
+ end;
+end;
+
+procedure TNewService.FillWinDirDataset(const aDataset: IDAEditableDataset);
+var
+ dirinfo: TSearchRec;
+begin
+ aDataset.Open;
+ if (FindFirst(IncludeTrailingPathDelimiter(aDataset.ParamByName('Directory').AsString) + '*.*', faArchive, dirinfo) = 0) then repeat
+ aDataset.Insert;
+
+ aDataset.FieldByName('FileName').AsString := dirinfo.Name;
+ aDataset.FieldByName('FileSize').AsInteger := dirinfo.Size;
+
+ aDataset.Post;
+ until (FindNext(dirinfo) <> 0);
+end;
+
+procedure TNewService.DataAbstractServiceBeforeGetDatasetData(
+ aSender: TObject; const aDataset: IDADataset;
+ const aIncludeSchema: Boolean; const aMaxRecords: Integer);
+begin
+ if SameText(aDataset.LogicalName, dtComboDataset.LogicalName) then
+ FillComboDataset((dtComboDataset as IDAEditableDataset))
+ else if SameText(aDataset.LogicalName, dtWindowsDir.LogicalName) then
+ FillWinDirDataset((dtWindowsDir as IDAEditableDataset));
+end;
+
+procedure TNewService.DataAbstractServiceValidateDatasetAccess(
+ Sender: TObject; const aConnection: IDAConnection;
+ const aDatasetName: string; const aParamNames: array of string;
+ const aParamValues: array of Variant; aSchema: TDASchema;
+ var Allowed: Boolean);
+
+ procedure FillParameters(aDataSet: TDACDSDataTable);
+ var
+ i: integer;
+ begin
+ for i := Low(aParamNames) to High(aParamNames) do
+ aDataset.ParamByName(aParamNames[i]).Value := aParamValues[i];
+ end;
+
+begin
+ if SameText(aDatasetName, dtComboDataset.LogicalName) then
+ FillParameters(dtComboDataset)
+ else if SameText(aDatasetName, dtWindowsDir.LogicalName) then
+ FillParameters(dtWindowsDir)
+end;
+
+initialization
+ TROClassFactory.Create('NewService', Create_NewService, TNewService_Invoker);
+
+finalization
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/RODLFILE.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/RODLFILE.res
new file mode 100644
index 0000000..066b5bf
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Memory Data/RODLFILE.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetail.Sample.html b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetail.Sample.html
new file mode 100644
index 0000000..0c9d025
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetail.Sample.html
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+ Multi Level Detail Sample
+
+
+
+Purpose
+
+
+ This sample shows how to implement master/detail/detail updates as simply as possible.
+
+
+Examine the Code
+
+
+ Examine the simple code in MultiLevelDetailClient_Main.pas .
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetail.bdsgroup b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetail.bdsgroup
new file mode 100644
index 0000000..14cde7c
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetail.bdsgroup
@@ -0,0 +1,20 @@
+
+
+
+
+ Default.Personality
+
+ 1.0
+ {0D7AA8F3-6600-407A-8D69-F38F810C227A}
+
+
+
+
+
+ MultiLevelDetailServer.bdsproj
+ MultiLevelDetailClient.bdsproj
+ MultiLevelDetailServer.exe MultiLevelDetailClient.exe
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetail.bpg b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetail.bpg
new file mode 100644
index 0000000..514c8c0
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetail.bpg
@@ -0,0 +1,23 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = MultiLevelDetailServer.exe MultiLevelDetailClient.exe
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+MultiLevelDetailServer.exe: MultiLevelDetailServer.dpr
+ $(DCC)
+
+MultiLevelDetailClient.exe: MultiLevelDetailClient.dpr
+ $(DCC)
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetail.groupproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetail.groupproj
new file mode 100644
index 0000000..0249223
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetail.groupproj
@@ -0,0 +1,40 @@
+
+
+ {a8aee872-234f-4970-aa60-4963b9b3acfb}
+
+
+
+
+ Default.Personality
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailClient.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailClient.bdsproj
new file mode 100644
index 0000000..98918df
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailClient.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {4FFEA285-AC9E-45AA-84FD-F2385E0957B1}
+
+
+
+
+ MultiLevelDetailClient.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailClient.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailClient.dpr
new file mode 100644
index 0000000..c6d38c4
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailClient.dpr
@@ -0,0 +1,18 @@
+program MultiLevelDetailClient;
+
+uses
+ uROComInit,
+ Forms,
+ MidasLib,
+ MultiLevelDetailClient_Main in 'MultiLevelDetailClient_Main.pas' {MultiLevelDetailClient_MainForm},
+ MultiLevelDetailClient_Data in 'MultiLevelDetailClient_Data.pas' {MultiLevelDetailClient_DataModule: TDAClientDataModule};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'Multi Level Detail Client';
+ Application.CreateForm(TMultiLevelDetailClient_DataModule, MultiLevelDetailClient_DataModule);
+ Application.CreateForm(TMultiLevelDetailClient_MainForm, MultiLevelDetailClient_MainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailClient.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailClient.dproj
new file mode 100644
index 0000000..a75f4ff
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailClient.dproj
@@ -0,0 +1,75 @@
+
+
+ {f33b19c1-5014-448b-8588-d80873810fe1}
+ MultiLevelDetailClient.dpr
+ Debug
+ AnyCPU
+ DCC32
+ MultiLevelDetailClient.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ MultiLevelDetailClient.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailClient.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailClient.res
new file mode 100644
index 0000000..da01de5
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailClient.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailClient_Data.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailClient_Data.dfm
new file mode 100644
index 0000000..cd7ca26
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailClient_Data.dfm
@@ -0,0 +1,335 @@
+object MultiLevelDetailClient_DataModule: TMultiLevelDetailClient_DataModule
+ OldCreateOrder = True
+ Left = 124
+ Top = 89
+ Height = 300
+ Width = 300
+ object Channel: TROWinInetHTTPChannel
+ ServerLocators = <>
+ DispatchOptions = []
+ UserAgent = 'RemObjects SDK'
+ TargetURL = 'http://localhost:8099/BIN'
+ Left = 40
+ Top = 8
+ end
+ object Message: TROBinMessage
+ Left = 40
+ Top = 52
+ end
+ object RemoteService: TRORemoteService
+ Message = Message
+ Channel = Channel
+ ServiceName = 'MultiLevelDetailService'
+ Left = 40
+ Top = 96
+ end
+ object DataStreamer: TDABinDataStreamer
+ Left = 40
+ Top = 140
+ end
+ object RemoteDataAdapter: TDARemoteDataAdapter
+ GetSchemaCall.RemoteService = RemoteService
+ GetDataCall.RemoteService = RemoteService
+ UpdateDataCall.RemoteService = RemoteService
+ GetScriptsCall.RemoteService = RemoteService
+ RemoteService = RemoteService
+ DataStreamer = DataStreamer
+ Left = 40
+ Top = 184
+ end
+ object tbl_Categories: TDACDSDataTable
+ RemoteUpdatesOptions = []
+ Fields = <
+ item
+ Name = 'CategoryID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ LogChanges = False
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CategoryName'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Description'
+ DataType = datMemo
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Picture'
+ DataType = datBlob
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ Params = <>
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteDataAdapter = RemoteDataAdapter
+ ReadOnly = False
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ LogicalName = 'Categories'
+ IndexDefs = <>
+ Left = 161
+ Top = 131
+ end
+ object ds_Categories: TDADataSource
+ DataTable = tbl_Categories
+ Left = 133
+ Top = 131
+ end
+ object tbl_Products: TDACDSDataTable
+ RemoteUpdatesOptions = []
+ Fields = <
+ item
+ Name = 'ProductID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ LogChanges = False
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ProductName'
+ DataType = datWideString
+ Size = 40
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'SupplierID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CategoryID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'QuantityPerUnit'
+ DataType = datWideString
+ Size = 20
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'UnitPrice'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'UnitsInStock'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'UnitsOnOrder'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ReorderLevel'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Discontinued'
+ DataType = datBoolean
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ Params = <
+ item
+ Name = 'CategoryID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end>
+ MasterParamsMappings.Strings = (
+ 'CategoryID=CategoryID')
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteDataAdapter = RemoteDataAdapter
+ ReadOnly = False
+ MasterSource = ds_Categories
+ MasterFields = 'CategoryID'
+ DetailFields = 'CategoryID'
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ LogicalName = 'Products'
+ IndexDefs = <>
+ Left = 161
+ Top = 177
+ end
+ object ds_Products: TDADataSource
+ DataTable = tbl_Products
+ Left = 133
+ Top = 177
+ end
+ object tbl_OrderDetails: TDACDSDataTable
+ RemoteUpdatesOptions = []
+ Fields = <
+ item
+ Name = 'OrderID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ LogChanges = False
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ProductID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ LogChanges = False
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'UnitPrice'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Quantity'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Discount'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ Params = <
+ item
+ Name = 'ProductID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end>
+ MasterParamsMappings.Strings = (
+ 'ProductID=ProductID')
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteDataAdapter = RemoteDataAdapter
+ ReadOnly = False
+ MasterSource = ds_Products
+ MasterFields = 'ProductID'
+ DetailFields = 'ProductID'
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ LogicalName = 'OrderDetails'
+ IndexDefs = <>
+ Left = 161
+ Top = 86
+ end
+ object ds_OrderDetails: TDADataSource
+ DataTable = tbl_OrderDetails
+ Left = 133
+ Top = 86
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailClient_Data.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailClient_Data.pas
new file mode 100644
index 0000000..8340f03
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailClient_Data.pas
@@ -0,0 +1,38 @@
+unit MultiLevelDetailClient_Data;
+
+interface
+
+uses
+ {vcl:} SysUtils, Classes, DB, DBClient,
+ {RemObjects:} uROClient, uROClientIntf, uRORemoteService, uROBinMessage, uROWinInetHTTPChannel,
+ {Data Abstract:} uDADataTable, uDABINAdapter, uDAInterfaces,
+ uDADataStreamer, uDARemoteDataAdapter, uDAScriptingProvider,
+ uDACDSDataTable;
+
+type
+ TMultiLevelDetailClient_DataModule = class(TDataModule)
+ Message: TROBinMessage;
+ Channel: TROWinInetHTTPChannel;
+ RemoteService: TRORemoteService;
+ DataStreamer: TDABinDataStreamer;
+ RemoteDataAdapter: TDARemoteDataAdapter;
+ tbl_Categories: TDACDSDataTable;
+ ds_Categories: TDADataSource;
+ tbl_Products: TDACDSDataTable;
+ ds_Products: TDADataSource;
+ tbl_OrderDetails: TDACDSDataTable;
+ ds_OrderDetails: TDADataSource;
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ MultiLevelDetailClient_DataModule: TMultiLevelDetailClient_DataModule;
+
+implementation
+
+{$R *.dfm}
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailClient_Main.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailClient_Main.dfm
new file mode 100644
index 0000000..0881615
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailClient_Main.dfm
@@ -0,0 +1,105 @@
+object MultiLevelDetailClient_MainForm: TMultiLevelDetailClient_MainForm
+ Left = 138
+ Top = 151
+ AutoScroll = False
+ Caption = 'Multi Level Detail Client'
+ ClientHeight = 380
+ ClientWidth = 457
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Splitter1: TSplitter
+ Left = 0
+ Top = 252
+ Width = 457
+ Height = 8
+ Cursor = crVSplit
+ Align = alBottom
+ Beveled = True
+ end
+ object Splitter2: TSplitter
+ Left = 0
+ Top = 124
+ Width = 457
+ Height = 8
+ Cursor = crVSplit
+ Align = alBottom
+ Beveled = True
+ end
+ object Panel1: TPanel
+ Left = 0
+ Top = 0
+ Width = 457
+ Height = 27
+ Align = alTop
+ BevelOuter = bvNone
+ TabOrder = 0
+ object FillButton: TButton
+ Left = 9
+ Top = 3
+ Width = 75
+ Height = 22
+ Caption = 'Fill'
+ TabOrder = 0
+ OnClick = FillButtonClick
+ end
+ object UpdateButton: TButton
+ Left = 147
+ Top = 3
+ Width = 75
+ Height = 22
+ Caption = 'Update'
+ TabOrder = 1
+ OnClick = UpdateButtonClick
+ end
+ end
+ object gOrderDetails: TDBGrid
+ Left = 0
+ Top = 260
+ Width = 457
+ Height = 120
+ Align = alBottom
+ DataSource = MultiLevelDetailClient_DataModule.ds_OrderDetails
+ TabOrder = 1
+ TitleFont.Charset = DEFAULT_CHARSET
+ TitleFont.Color = clWindowText
+ TitleFont.Height = -11
+ TitleFont.Name = 'MS Sans Serif'
+ TitleFont.Style = []
+ end
+ object gProducts: TDBGrid
+ Left = 0
+ Top = 132
+ Width = 457
+ Height = 120
+ Align = alBottom
+ DataSource = MultiLevelDetailClient_DataModule.ds_Products
+ TabOrder = 2
+ TitleFont.Charset = DEFAULT_CHARSET
+ TitleFont.Color = clWindowText
+ TitleFont.Height = -11
+ TitleFont.Name = 'MS Sans Serif'
+ TitleFont.Style = []
+ end
+ object gCategories: TDBGrid
+ Left = 0
+ Top = 27
+ Width = 457
+ Height = 97
+ Align = alClient
+ DataSource = MultiLevelDetailClient_DataModule.ds_Categories
+ TabOrder = 3
+ TitleFont.Charset = DEFAULT_CHARSET
+ TitleFont.Color = clWindowText
+ TitleFont.Height = -11
+ TitleFont.Name = 'MS Sans Serif'
+ TitleFont.Style = []
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailClient_Main.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailClient_Main.pas
new file mode 100644
index 0000000..9eeba1e
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailClient_Main.pas
@@ -0,0 +1,49 @@
+unit MultiLevelDetailClient_Main;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
+ uROClient, uROClientIntf, uRORemoteService, uROBinMessage, ExtCtrls,
+ Grids, DBGrids;
+
+type
+ TMultiLevelDetailClient_MainForm = class(TForm)
+ Panel1: TPanel;
+ FillButton: TButton;
+ gOrderDetails: TDBGrid;
+ Splitter1: TSplitter;
+ gProducts: TDBGrid;
+ Splitter2: TSplitter;
+ gCategories: TDBGrid;
+ UpdateButton: TButton;
+ procedure FillButtonClick(Sender: TObject);
+ procedure UpdateButtonClick(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ MultiLevelDetailClient_MainForm: TMultiLevelDetailClient_MainForm;
+
+implementation
+
+uses
+ MultiLevelDetailClient_Data;
+
+{$R *.dfm}
+
+procedure TMultiLevelDetailClient_MainForm.FillButtonClick(Sender: TObject);
+begin
+ MultiLevelDetailClient_DataModule.tbl_Categories.Open;
+end;
+
+procedure TMultiLevelDetailClient_MainForm.UpdateButtonClick(Sender: TObject);
+begin
+ MultiLevelDetailClient_DataModule.tbl_Categories.ApplyUpdates;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailLibrary.RODL b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailLibrary.RODL
new file mode 100644
index 0000000..d1e6d7a
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailLibrary.RODL
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailLibrary_Intf.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailLibrary_Intf.pas
new file mode 100644
index 0000000..1a6c1d6
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailLibrary_Intf.pas
@@ -0,0 +1,76 @@
+unit MultiLevelDetailLibrary_Intf;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROClasses, uROClient, uROTypes, uROClientIntf,
+ {Used RODLs:} DataAbstract4_Intf;
+
+const
+ { Library ID }
+ LibraryUID = '{C36F2B70-713D-4D12-A330-097CEF6EBDDB}';
+
+ { Service Interface ID's }
+ IMultiLevelDetailService_IID : TGUID = '{F2D11C9C-E4E6-4732-8692-0CAC26018C78}';
+
+ { Event ID's }
+
+type
+ { Forward declarations }
+ IMultiLevelDetailService = interface;
+
+
+
+
+ { IMultiLevelDetailService }
+ IMultiLevelDetailService = interface(IDataAbstractService)
+ ['{F2D11C9C-E4E6-4732-8692-0CAC26018C78}']
+ end;
+
+ { CoMultiLevelDetailService }
+ CoMultiLevelDetailService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IMultiLevelDetailService;
+ end;
+
+ { TMultiLevelDetailService_Proxy }
+ TMultiLevelDetailService_Proxy = class(TDataAbstractService_Proxy, IMultiLevelDetailService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ end;
+
+implementation
+
+uses
+ {vcl:} SysUtils,
+ {RemObjects:} uROEventRepository, uRORes;
+
+{ CoMultiLevelDetailService }
+
+class function CoMultiLevelDetailService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IMultiLevelDetailService;
+begin
+ result := TMultiLevelDetailService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+function TMultiLevelDetailService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'MultiLevelDetailService';
+end;
+
+initialization
+ RegisterProxyClass(IMultiLevelDetailService_IID, TMultiLevelDetailService_Proxy);
+
+
+finalization
+ UnregisterProxyClass(IMultiLevelDetailService_IID);
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailLibrary_Invk.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailLibrary_Invk.pas
new file mode 100644
index 0000000..111a642
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailLibrary_Invk.pas
@@ -0,0 +1,32 @@
+unit MultiLevelDetailLibrary_Invk;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes,
+ {RemObjects:} uROServer, uROServerIntf, uROTypes, uROClientIntf,
+ {Used RODL Intf's:} DataAbstract4_Intf,
+ {Used RODL Invk's:} DataAbstract4_Invk,
+ {Generated:} MultiLevelDetailLibrary_Intf;
+
+type
+ TMultiLevelDetailService_Invoker = class(TDataAbstractService_Invoker)
+ private
+ protected
+ published
+ end;
+
+implementation
+
+uses
+ {RemObjects:} uRORes, uROClient;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailServer.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailServer.bdsproj
new file mode 100644
index 0000000..0a3e952
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailServer.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {DB6FD096-16BF-4726-8B75-AB9D506D6464}
+
+
+
+
+ MultiLevelDetailServer.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailServer.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailServer.dpr
new file mode 100644
index 0000000..cd8a8ab
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailServer.dpr
@@ -0,0 +1,30 @@
+program MultiLevelDetailServer;
+
+{#ROGEN:MultiLevelDetailLibrary.RODL} // RemObjects SDK: Careful, do not remove!
+
+uses
+ uROComInit,
+ uROComboService,
+ Forms,
+ MultiLevelDetailServer_Main in 'MultiLevelDetailServer_Main.pas' {MultiLevelDetailServer_MainForm},
+ MultiLevelDetailService_Impl in 'MultiLevelDetailService_Impl.pas' {MultiLevelDetailService: TDARemoteService},
+ MultiLevelDetailServer_Data in 'MultiLevelDetailServer_Data.pas' {MultiLevelDetailServer_DataModule: TDataModule},
+ MultiLevelDetailLibrary_Intf in 'MultiLevelDetailLibrary_Intf.pas',
+ MultiLevelDetailLibrary_Invk in 'MultiLevelDetailLibrary_Invk.pas';
+
+{$R *.res}
+{$R RODLFile.res}
+
+begin
+ if ROStartService('MultiLevelDetail', 'MultiLevelDetail') then begin
+ ROService.CreateForm(TMultiLevelDetailServer_DataModule, MultiLevelDetailServer_DataModule);
+ ROService.Run;
+ Exit;
+ end;
+
+ Application.Initialize;
+ Application.Title := 'Multi Level Detail Server';
+ Application.CreateForm(TMultiLevelDetailServer_DataModule, MultiLevelDetailServer_DataModule);
+ Application.CreateForm(TMultiLevelDetailServer_MainForm, MultiLevelDetailServer_MainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailServer.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailServer.dproj
new file mode 100644
index 0000000..0cdcabd
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailServer.dproj
@@ -0,0 +1,80 @@
+
+
+ {b4f8c45f-3323-46d4-ba1a-8642a93d1e6e}
+ MultiLevelDetailServer.dpr
+ Debug
+ AnyCPU
+ DCC32
+ MultiLevelDetailServer.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ MultiLevelDetailServer.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailServer.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailServer.res
new file mode 100644
index 0000000..7455d6e
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailServer.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailServer_Data.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailServer_Data.dfm
new file mode 100644
index 0000000..549ecae
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailServer_Data.dfm
@@ -0,0 +1,64 @@
+object MultiLevelDetailServer_DataModule: TMultiLevelDetailServer_DataModule
+ OldCreateOrder = False
+ OnCreate = DataModuleCreate
+ Left = 362
+ Top = 208
+ Height = 207
+ Width = 352
+ object Server: TROIndyHTTPServer
+ Dispatchers = <
+ item
+ Name = 'Message'
+ Message = Message
+ Enabled = True
+ PathInfo = 'Bin'
+ end>
+ Port = 8099
+ Left = 32
+ Top = 8
+ end
+ object Message: TROBinMessage
+ Left = 32
+ Top = 56
+ end
+ object ConnectionManager: TDAConnectionManager
+ Connections = <
+ item
+ Name = 'Northwind'
+ ConnectionString =
+ 'ADO?AuxDriver=SQLOLEDB.1;Server=localhost;Database=Northwind;Int' +
+ 'egrated Security=SSPI'
+ Description = 'Microsoft SQL Server 2000, localhost'
+ Default = True
+ Tag = 0
+ end>
+ DriverManager = DriverManager
+ PoolingEnabled = True
+ Left = 136
+ Top = 56
+ end
+ object DriverManager: TDADriverManager
+ DriverDirectory = '%SYSTEM%\'
+ TraceActive = False
+ TraceFlags = []
+ Left = 136
+ Top = 10
+ end
+ object ADODriver: TDAADODriver
+ Left = 256
+ Top = 8
+ end
+ object IBXDriver: TDAIBXDriver
+ Left = 256
+ Top = 56
+ end
+ object DataDictionary: TDADataDictionary
+ Fields = <>
+ Left = 32
+ Top = 104
+ end
+ object SessionManager: TROInMemorySessionManager
+ Left = 136
+ Top = 104
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailServer_Data.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailServer_Data.pas
new file mode 100644
index 0000000..8dd6a39
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailServer_Data.pas
@@ -0,0 +1,42 @@
+unit MultiLevelDetailServer_Data;
+
+interface
+
+uses
+ SysUtils, Classes,
+ uROClient, uROPoweredByRemObjectsButton, uROClientIntf, uROServer,
+ uROBinMessage, uROIndyHTTPServer,
+ uDAEngine, uDADriverManager, uDAClasses, uROSessions,
+ uDAIBXDriver, uDAADODriver, uROIndyTCPServer;
+
+type
+ TMultiLevelDetailServer_DataModule = class(TDataModule)
+ Server: TROIndyHTTPServer;
+ Message: TROBinMessage;
+ ConnectionManager: TDAConnectionManager;
+ DriverManager: TDADriverManager;
+ ADODriver: TDAADODriver;
+ IBXDriver: TDAIBXDriver;
+ SessionManager: TROInMemorySessionManager;
+ DataDictionary: TDADataDictionary;
+
+ procedure DataModuleCreate(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ MultiLevelDetailServer_DataModule: TMultiLevelDetailServer_DataModule;
+
+implementation
+
+{$R *.dfm}
+
+procedure TMultiLevelDetailServer_DataModule.DataModuleCreate(Sender: TObject);
+begin
+ Server.Active := true;
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailServer_Main.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailServer_Main.dfm
new file mode 100644
index 0000000..0e830ae
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailServer_Main.dfm
@@ -0,0 +1,25 @@
+object MultiLevelDetailServer_MainForm: TMultiLevelDetailServer_MainForm
+ Left = 372
+ Top = 277
+ BorderStyle = bsDialog
+ Caption = 'Multi Level Detail Server'
+ ClientHeight = 64
+ ClientWidth = 277
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ PixelsPerInch = 96
+ TextHeight = 13
+ object DAPoweredByDataAbstractButton1: TDAPoweredByDataAbstractButton
+ Left = 34
+ Top = 8
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailServer_Main.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailServer_Main.pas
new file mode 100644
index 0000000..bf43bb4
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailServer_Main.pas
@@ -0,0 +1,25 @@
+unit MultiLevelDetailServer_Main;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
+ uDAPoweredByDataAbstractButton, uROPoweredByRemObjectsButton;
+
+type
+ TMultiLevelDetailServer_MainForm = class(TForm)
+ DAPoweredByDataAbstractButton1: TDAPoweredByDataAbstractButton;
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ MultiLevelDetailServer_MainForm: TMultiLevelDetailServer_MainForm;
+
+implementation
+
+{$R *.dfm}
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailService_Impl.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailService_Impl.dfm
new file mode 100644
index 0000000..4185ec4
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailService_Impl.dfm
@@ -0,0 +1,390 @@
+object MultiLevelDetailService: TMultiLevelDetailService
+ OldCreateOrder = True
+ SessionManager = MultiLevelDetailServer_DataModule.SessionManager
+ AcquireConnection = True
+ ServiceSchema = Schema
+ ServiceDataStreamer = DataStreamer
+ ExportedDataTables = <>
+ Left = 357
+ Top = 213
+ Height = 212
+ Width = 216
+ object DataStreamer: TDABinDataStreamer
+ Left = 32
+ Top = 8
+ end
+ object Schema: TDASchema
+ ConnectionManager = MultiLevelDetailServer_DataModule.ConnectionManager
+ DataDictionary = MultiLevelDetailServer_DataModule.DataDictionary
+ Datasets = <
+ item
+ Params = <>
+ Statements = <
+ item
+ Connection = 'Northwind'
+ TargetTable = 'Categories'
+ SQL =
+ 'SELECT '#10' CategoryID, CategoryName, Description, Picture'#10' FRO' +
+ 'M'#10' Categories'
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'CategoryID'
+ TableField = 'CategoryID'
+ end
+ item
+ DatasetField = 'CategoryName'
+ TableField = 'CategoryName'
+ end
+ item
+ DatasetField = 'Description'
+ TableField = 'Description'
+ end
+ item
+ DatasetField = 'Picture'
+ TableField = 'Picture'
+ end>
+ end>
+ Name = 'Categories'
+ Fields = <
+ item
+ Name = 'CategoryID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ LogChanges = False
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CategoryName'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Description'
+ DataType = datMemo
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Picture'
+ DataType = datBlob
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ BusinessRulesClient.ScriptLanguage = rslPascalScript
+ BusinessRulesServer.ScriptLanguage = rslPascalScript
+ end
+ item
+ Params = <
+ item
+ Name = 'CategoryID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end>
+ Statements = <
+ item
+ Connection = 'Northwind'
+ TargetTable = 'Products'
+ SQL =
+ 'SELECT '#10' ProductID, ProductName, SupplierID, CategoryID, Quan' +
+ 'tityPerUnit, '#10' UnitPrice, UnitsInStock, UnitsOnOrder, Reorder' +
+ 'Level, '#10' Discontinued'#10'FROM'#10' Products'#10'WHERE'#10' [CategoryID' +
+ '] = :CategoryID'#10
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'ProductID'
+ TableField = 'ProductID'
+ end
+ item
+ DatasetField = 'ProductName'
+ TableField = 'ProductName'
+ end
+ item
+ DatasetField = 'SupplierID'
+ TableField = 'SupplierID'
+ end
+ item
+ DatasetField = 'CategoryID'
+ TableField = 'CategoryID'
+ end
+ item
+ DatasetField = 'QuantityPerUnit'
+ TableField = 'QuantityPerUnit'
+ end
+ item
+ DatasetField = 'UnitPrice'
+ TableField = 'UnitPrice'
+ end
+ item
+ DatasetField = 'UnitsInStock'
+ TableField = 'UnitsInStock'
+ end
+ item
+ DatasetField = 'UnitsOnOrder'
+ TableField = 'UnitsOnOrder'
+ end
+ item
+ DatasetField = 'ReorderLevel'
+ TableField = 'ReorderLevel'
+ end
+ item
+ DatasetField = 'Discontinued'
+ TableField = 'Discontinued'
+ end>
+ end>
+ Name = 'Products'
+ Fields = <
+ item
+ Name = 'ProductID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ LogChanges = False
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ProductName'
+ DataType = datWideString
+ Size = 40
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'SupplierID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CategoryID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'QuantityPerUnit'
+ DataType = datWideString
+ Size = 20
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'UnitPrice'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'UnitsInStock'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'UnitsOnOrder'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ReorderLevel'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Discontinued'
+ DataType = datBoolean
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ BusinessRulesClient.ScriptLanguage = rslPascalScript
+ BusinessRulesServer.ScriptLanguage = rslPascalScript
+ end
+ item
+ Params = <
+ item
+ Name = 'ProductID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end>
+ Statements = <
+ item
+ Connection = 'Northwind'
+ TargetTable = 'Order Details'
+ SQL =
+ 'SELECT '#10' OrderID, ProductID, UnitPrice, Quantity, Discount'#10' ' +
+ 'FROM'#10' [Order Details]'#10'WHERE'#10' ProductID = :ProductID'#10
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'OrderID'
+ TableField = 'OrderID'
+ end
+ item
+ DatasetField = 'ProductID'
+ TableField = 'ProductID'
+ end
+ item
+ DatasetField = 'UnitPrice'
+ TableField = 'UnitPrice'
+ end
+ item
+ DatasetField = 'Quantity'
+ TableField = 'Quantity'
+ end
+ item
+ DatasetField = 'Discount'
+ TableField = 'Discount'
+ end>
+ end>
+ Name = 'OrderDetails'
+ Fields = <
+ item
+ Name = 'OrderID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ LogChanges = False
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ProductID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ LogChanges = False
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'UnitPrice'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Quantity'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Discount'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ BusinessRulesClient.ScriptLanguage = rslPascalScript
+ BusinessRulesServer.ScriptLanguage = rslPascalScript
+ end>
+ Commands = <>
+ RelationShips = <
+ item
+ Name = 'FK_Products_Categories'
+ MasterDatasetName = 'Categories'
+ MasterFields = 'CategoryID'
+ DetailDatasetName = 'Products'
+ DetailFields = 'CategoryID'
+ end>
+ UpdateRules = <>
+ Left = 32
+ Top = 56
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailService_Impl.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailService_Impl.pas
new file mode 100644
index 0000000..43f3d54
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/MultiLevelDetailService_Impl.pas
@@ -0,0 +1,37 @@
+unit MultiLevelDetailService_Impl;
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils,
+ {RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
+ {Data Abstract:} uDAClasses, uDADataTable, uDABinAdapter, uDAInterfaces, uDADataStreamer,
+ {Ancestor Implementation:} DataAbstractService_Impl,
+ {Used RODLs:} DataAbstract4_Intf,
+ {Generated:} MultiLevelDetailLibrary_Intf;
+
+type
+ { TMultiLevelDetailService }
+ TMultiLevelDetailService = class(TDataAbstractService, IMultiLevelDetailService)
+ DataStreamer: TDABinDataStreamer;
+ Schema: TDASchema;
+ private
+ protected
+ { IMultiLevelDetailService methods }
+ end;
+
+implementation
+
+{$R *.dfm}
+uses
+ {Generated:} MultiLevelDetailLibrary_Invk, MultiLevelDetailServer_Data;
+
+procedure Create_MultiLevelDetailService(out anInstance: IUnknown);
+begin
+ anInstance := TMultiLevelDetailService.Create(nil);
+end;
+
+initialization
+ TROClassFactory.Create('MultiLevelDetailService', Create_MultiLevelDetailService, TMultiLevelDetailService_Invoker);
+finalization
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/RODLFILE.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/RODLFILE.res
new file mode 100644
index 0000000..008a4f9
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Multi Level Detail/RODLFILE.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/NewService_Impl.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/NewService_Impl.dfm
new file mode 100644
index 0000000..1007367
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/NewService_Impl.dfm
@@ -0,0 +1,727 @@
+object NewService: TNewService
+ OldCreateOrder = True
+ AcquireConnection = True
+ ConnectionName = 'ADO'
+ ServiceSchema = Schema
+ ServiceDataStreamer = BinAdapter
+ ExportedDataTables = <>
+ Left = 372
+ Top = 283
+ Height = 364
+ Width = 436
+ object BinAdapter: TDABinDataStreamer
+ Left = 32
+ Top = 8
+ end
+ object Schema: TDASchema
+ ConnectionManager = QuantumGrid4_ServerDataModule.ConnectionManager
+ DataDictionary = DataDictionary
+ Datasets = <
+ item
+ Params = <>
+ Statements = <
+ item
+ Connection = 'ADO'
+ TargetTable = 'Customers'
+ SQL =
+ 'SELECT '#10' CustomerID, CompanyName, ContactName, ContactTitle, ' +
+ #10' Address, City, Region, PostalCode, Country, Phone, '#10' Fax' +
+ #10' FROM'#10' Customers'
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'CustomerID'
+ TableField = 'CustomerID'
+ end
+ item
+ DatasetField = 'CompanyName'
+ TableField = 'CompanyName'
+ end
+ item
+ DatasetField = 'ContactName'
+ TableField = 'ContactName'
+ end
+ item
+ DatasetField = 'ContactTitle'
+ TableField = 'ContactTitle'
+ end
+ item
+ DatasetField = 'Address'
+ TableField = 'Address'
+ end
+ item
+ DatasetField = 'City'
+ TableField = 'City'
+ end
+ item
+ DatasetField = 'Region'
+ TableField = 'Region'
+ end
+ item
+ DatasetField = 'PostalCode'
+ TableField = 'PostalCode'
+ end
+ item
+ DatasetField = 'Country'
+ TableField = 'Country'
+ end
+ item
+ DatasetField = 'Phone'
+ TableField = 'Phone'
+ end
+ item
+ DatasetField = 'Fax'
+ TableField = 'Fax'
+ end>
+ end>
+ Name = 'Customers'
+ Fields = <
+ item
+ Name = 'CustomerID'
+ DataType = datString
+ Size = 5
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CompanyName'
+ DataType = datString
+ Size = 40
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ContactName'
+ DataType = datString
+ Size = 30
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ContactTitle'
+ DataType = datString
+ Size = 30
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Address'
+ DataType = datString
+ Size = 60
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'City'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Region'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'PostalCode'
+ DataType = datString
+ Size = 10
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Country'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Phone'
+ DataType = datString
+ Size = 24
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Fax'
+ DataType = datString
+ Size = 24
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ BusinessRulesClient.ScriptLanguage = rslPascalScript
+ BusinessRulesServer.ScriptLanguage = rslPascalScript
+ end
+ item
+ Params = <
+ item
+ Name = 'CustomerID'
+ DataType = datString
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end>
+ Statements = <
+ item
+ Connection = 'ADO'
+ TargetTable = 'Orders'
+ SQL =
+ 'SELECT '#10' OrderID, CustomerID, EmployeeID, OrderDate, Required' +
+ 'Date, '#10' ShippedDate, ShipVia, Freight, ShipName, ShipAddress,' +
+ ' '#10' ShipCity, ShipRegion, ShipPostalCode, ShipCountry'#10' FROM'#10' ' +
+ ' Orders'#10' WHERE CustomerID=:CustomerID'
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'OrderID'
+ TableField = 'OrderID'
+ end
+ item
+ DatasetField = 'CustomerID'
+ TableField = 'CustomerID'
+ end
+ item
+ DatasetField = 'EmployeeID'
+ TableField = 'EmployeeID'
+ end
+ item
+ DatasetField = 'OrderDate'
+ TableField = 'OrderDate'
+ end
+ item
+ DatasetField = 'RequiredDate'
+ TableField = 'RequiredDate'
+ end
+ item
+ DatasetField = 'ShippedDate'
+ TableField = 'ShippedDate'
+ end
+ item
+ DatasetField = 'ShipVia'
+ TableField = 'ShipVia'
+ end
+ item
+ DatasetField = 'Freight'
+ TableField = 'Freight'
+ end
+ item
+ DatasetField = 'ShipName'
+ TableField = 'ShipName'
+ end
+ item
+ DatasetField = 'ShipAddress'
+ TableField = 'ShipAddress'
+ end
+ item
+ DatasetField = 'ShipCity'
+ TableField = 'ShipCity'
+ end
+ item
+ DatasetField = 'ShipRegion'
+ TableField = 'ShipRegion'
+ end
+ item
+ DatasetField = 'ShipPostalCode'
+ TableField = 'ShipPostalCode'
+ end
+ item
+ DatasetField = 'ShipCountry'
+ TableField = 'ShipCountry'
+ end>
+ end>
+ Name = 'Orders'
+ Fields = <
+ item
+ Name = 'OrderID'
+ DataType = datAutoInc
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CustomerID'
+ DataType = datString
+ Size = 5
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'EmployeeID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'OrderDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'RequiredDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShippedDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipVia'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Freight'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipName'
+ DataType = datString
+ Size = 40
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipAddress'
+ DataType = datString
+ Size = 60
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipCity'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipRegion'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipPostalCode'
+ DataType = datString
+ Size = 10
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipCountry'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ BusinessRulesClient.ScriptLanguage = rslPascalScript
+ BusinessRulesServer.ScriptLanguage = rslPascalScript
+ end
+ item
+ Params = <>
+ Statements = <
+ item
+ Connection = 'ADO'
+ TargetTable = 'Orders'
+ SQL =
+ 'SELECT '#10' OrderID, CustomerID, EmployeeID, OrderDate, Required' +
+ 'Date, '#10' ShippedDate, ShipVia, Freight, ShipName, ShipAddress,' +
+ ' '#10' ShipCity, ShipRegion, ShipPostalCode, ShipCountry'#10' FROM'#10' ' +
+ ' Orders'
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'OrderID'
+ TableField = 'OrderID'
+ end
+ item
+ DatasetField = 'CustomerID'
+ TableField = 'CustomerID'
+ end
+ item
+ DatasetField = 'EmployeeID'
+ TableField = 'EmployeeID'
+ end
+ item
+ DatasetField = 'OrderDate'
+ TableField = 'OrderDate'
+ end
+ item
+ DatasetField = 'RequiredDate'
+ TableField = 'RequiredDate'
+ end
+ item
+ DatasetField = 'ShippedDate'
+ TableField = 'ShippedDate'
+ end
+ item
+ DatasetField = 'ShipVia'
+ TableField = 'ShipVia'
+ end
+ item
+ DatasetField = 'Freight'
+ TableField = 'Freight'
+ end
+ item
+ DatasetField = 'ShipName'
+ TableField = 'ShipName'
+ end
+ item
+ DatasetField = 'ShipAddress'
+ TableField = 'ShipAddress'
+ end
+ item
+ DatasetField = 'ShipCity'
+ TableField = 'ShipCity'
+ end
+ item
+ DatasetField = 'ShipRegion'
+ TableField = 'ShipRegion'
+ end
+ item
+ DatasetField = 'ShipPostalCode'
+ TableField = 'ShipPostalCode'
+ end
+ item
+ DatasetField = 'ShipCountry'
+ TableField = 'ShipCountry'
+ end>
+ end>
+ Name = 'AllOrders'
+ Fields = <
+ item
+ Name = 'OrderID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CustomerID'
+ DataType = datString
+ Size = 5
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'EmployeeID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'OrderDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'RequiredDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShippedDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipVia'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Freight'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipName'
+ DataType = datString
+ Size = 40
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipAddress'
+ DataType = datString
+ Size = 60
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipCity'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipRegion'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipPostalCode'
+ DataType = datString
+ Size = 10
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipCountry'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ BusinessRulesClient.ScriptLanguage = rslPascalScript
+ BusinessRulesServer.ScriptLanguage = rslPascalScript
+ end>
+ Commands = <>
+ RelationShips = <>
+ UpdateRules = <>
+ Left = 32
+ Top = 56
+ end
+ object DataDictionary: TDADataDictionary
+ Fields = <>
+ Left = 33
+ Top = 104
+ end
+ object bsCustomers: TDABusinessProcessor
+ Schema = Schema
+ ReferencedDataset = 'Customers'
+ ProcessorOptions = [poAutoGenerateInsert, poAutoGenerateUpdate, poAutoGenerateDelete]
+ UpdateMode = updWhereKeyOnly
+ Left = 64
+ Top = 176
+ end
+ object bsOrders: TDABusinessProcessor
+ Schema = Schema
+ ReferencedDataset = 'Orders'
+ ProcessorOptions = [poAutoGenerateInsert, poAutoGenerateUpdate, poAutoGenerateDelete]
+ UpdateMode = updWhereKeyOnly
+ Left = 160
+ Top = 176
+ end
+ object bsAllOrders: TDABusinessProcessor
+ Schema = Schema
+ ReferencedDataset = 'AllOrders'
+ ProcessorOptions = [poAutoGenerateInsert, poAutoGenerateUpdate, poAutoGenerateDelete]
+ UpdateMode = updWhereKeyOnly
+ Left = 240
+ Top = 176
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/NewService_Impl.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/NewService_Impl.pas
new file mode 100644
index 0000000..6ee8bac
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/NewService_Impl.pas
@@ -0,0 +1,84 @@
+unit NewService_Impl;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ This is where you are supposed to code the implementation of your objects. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils,
+ {RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
+ {Ancestor Implementation:} DataAbstractService_Impl,
+ {Used RODLs:} DataAbstract4_Intf,
+ {Generated:} QuantumGrid4Library_Intf, uDAScriptingProvider, uDABusinessProcessor,
+ uDAClasses, uDADataStreamer, uDABinAdapter;
+
+const
+ { Dataset names for Schema }
+ ds_Customers = 'Customers';
+ ds_Orders = 'Orders';
+ ds_AllOrders = 'AllOrders';
+
+type
+ { TNewService }
+ TNewService = class(TDataAbstractService, INewService)
+ BinAdapter: TDABinDataStreamer;
+ bsCustomers: TDABusinessProcessor;
+ bsOrders: TDABusinessProcessor;
+ Schema: TDASchema;
+ DataDictionary: TDADataDictionary;
+ bsAllOrders: TDABusinessProcessor;
+ private
+ protected
+ { INewService methods }
+ function GetCustomers: Binary;
+ function UpdateCustomers(const IncomingData: Binary): Binary;
+ function GetOrders(const CustomerID: String): Binary;
+ end;
+
+implementation
+
+{$R *.dfm}
+uses
+ {Generated:} QuantumGrid4Library_Invk, QuantumGrid4_ServerData, uDAInterfaces;
+
+procedure Create_NewService(out anInstance : IUnknown);
+begin
+ anInstance := TNewService.Create(NIL);
+end;
+
+
+{ TNewService }
+
+
+function TNewService.GetCustomers: Binary;
+begin
+ result := Binary.Create;
+ BinAdapter.Initialize(result, aiWrite);
+ BinAdapter.WriteDataset(Schema.NewDataset(Connection, ds_Customers), [woRows]);
+ BinAdapter.Finalize;
+end;
+
+function TNewService.GetOrders(const CustomerID: String): Binary;
+begin
+ result := Binary.Create;
+ BinAdapter.Initialize(result, aiWrite);
+ BinAdapter.WriteDataset(Schema.NewDataset(Connection, ds_Orders,['CustomerID'], [CustomerID]), [woRows]);
+ BinAdapter.Finalize;
+end;
+
+function TNewService.UpdateCustomers(const IncomingData: Binary): Binary;
+begin
+ result := UpdateData(IncomingData);
+end;
+
+initialization
+ TROClassFactory.Create('NewService', Create_NewService, TNewService_Invoker);
+
+finalization
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4.Sample.html b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4.Sample.html
new file mode 100644
index 0000000..fb68fed
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4.Sample.html
@@ -0,0 +1,58 @@
+
+
+
+
+
+
+
+
+
+
+ QuantumGrid4
+
+
+
+Purpose
+
+
+ This example demonstrates how to use the QuantumGrid4 (or QuantumGrid5 )
+ product from Developer Express (contact www.devexpress.com . for
+ licensing
+ information if you do not already have the product).
+
+
+
+
+
+ Things to look at in QuantumGrid4_server.exe
+
+
+ The most important methods in the host application are in the NewService_Impl
+ unit:
+
+
+
+ GetCustomers retrieves all the records from that dataset.
+
+
+ GetOrders only retrieves Orders for the current Customer.
+ Note the parameters passed to it.
+
+
+
+ Things to look at in QuantumGrid4_client.exe
+
+
+ There's only two lines of code in QuantumGrid4_ClientMain , one for each button.
+
+
+ Have a look at QuantumGrid4_ClientData though. This contains code that
+ saves references to customers previously accessed, thus avoiding re-fetching details.
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4.bdsgroup b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4.bdsgroup
new file mode 100644
index 0000000..23846d8
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4.bdsgroup
@@ -0,0 +1,20 @@
+
+
+
+
+ Default.Personality
+
+ 1.0
+ {26238F3F-9FDB-4F79-B84D-EA0212BEBD94}
+
+
+
+
+
+ QuantumGrid4_Client.bdsproj
+ QuantumGrid4_server.bdsproj
+ QuantumGrid4_Client.exe QuantumGrid4_server.exe
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4.bpg b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4.bpg
new file mode 100644
index 0000000..b2cc016
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4.bpg
@@ -0,0 +1,23 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = QuantumGrid4_Client.exe QuantumGrid4_server.exe
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+QuantumGrid4_Client.exe: QuantumGrid4_Client.dpr
+ $(DCC)
+
+QuantumGrid4_server.exe: QuantumGrid4_server.dpr
+ $(DCC)
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4.groupproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4.groupproj
new file mode 100644
index 0000000..abbfa8b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4.groupproj
@@ -0,0 +1,40 @@
+
+
+ {91a9ff88-032e-4329-a4e4-75d3d762f4d9}
+
+
+
+
+ Default.Personality
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4Library.rodl b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4Library.rodl
new file mode 100644
index 0000000..be38352
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4Library.rodl
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4Library_Intf.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4Library_Intf.pas
new file mode 100644
index 0000000..1f01454
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4Library_Intf.pas
@@ -0,0 +1,131 @@
+unit QuantumGrid4Library_Intf;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROClasses, uROClient, uROTypes, uROClientIntf,
+ {Used RODLs:} DataAbstract4_Intf;
+
+const
+ { Library ID }
+ LibraryUID = '{7EF63C27-FB17-4F10-985E-92BAF0E3E619}';
+
+ { Service Interface ID's }
+ INewService_IID : TGUID = '{E4E6FDE4-2542-4554-B59A-438E23439111}';
+
+ { Event ID's }
+
+type
+ { Forward declarations }
+ INewService = interface;
+
+
+
+
+ { INewService }
+ INewService = interface(IDataAbstractService)
+ ['{E4E6FDE4-2542-4554-B59A-438E23439111}']
+ function GetCustomers: Binary;
+ function UpdateCustomers(const IncomingData: Binary): Binary;
+ function GetOrders(const CustomerID: String): Binary;
+ end;
+
+ { CoNewService }
+ CoNewService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): INewService;
+ end;
+
+ { TNewService_Proxy }
+ TNewService_Proxy = class(TDataAbstractService_Proxy, INewService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ function GetCustomers: Binary;
+ function UpdateCustomers(const IncomingData: Binary): Binary;
+ function GetOrders(const CustomerID: String): Binary;
+ end;
+
+implementation
+
+uses
+ {vcl:} SysUtils,
+ {RemObjects:} uROEventRepository, uRORes;
+
+{ CoNewService }
+
+class function CoNewService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): INewService;
+begin
+ result := TNewService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TNewService_Proxy }
+
+function TNewService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'NewService';
+end;
+
+function TNewService_Proxy.GetCustomers: Binary;
+begin
+ try
+ result := nil;
+ __Message.InitializeRequestMessage(__TransportChannel, 'QuantumGrid4Library', __InterfaceName, 'GetCustomers');
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Binary), result, []);
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+function TNewService_Proxy.UpdateCustomers(const IncomingData: Binary): Binary;
+begin
+ try
+ result := nil;
+ __Message.InitializeRequestMessage(__TransportChannel, 'QuantumGrid4Library', __InterfaceName, 'UpdateCustomers');
+ __Message.Write('IncomingData', TypeInfo(Binary), IncomingData, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Binary), result, []);
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+function TNewService_Proxy.GetOrders(const CustomerID: String): Binary;
+begin
+ try
+ result := nil;
+ __Message.InitializeRequestMessage(__TransportChannel, 'QuantumGrid4Library', __InterfaceName, 'GetOrders');
+ __Message.Write('CustomerID', TypeInfo(String), CustomerID, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Binary), result, []);
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+initialization
+ RegisterProxyClass(INewService_IID, TNewService_Proxy);
+
+
+finalization
+ UnregisterProxyClass(INewService_IID);
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4Library_Invk.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4Library_Invk.pas
new file mode 100644
index 0000000..23590ae
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4Library_Invk.pas
@@ -0,0 +1,117 @@
+unit QuantumGrid4Library_Invk;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes,
+ {RemObjects:} uROServer, uROServerIntf, uROTypes, uROClientIntf,
+ {Used RODL Intf's:} DataAbstract4_Intf,
+ {Used RODL Invk's:} DataAbstract4_Invk,
+ {Generated:} QuantumGrid4Library_Intf;
+
+type
+ TNewService_Invoker = class(TDataAbstractService_Invoker)
+ private
+ protected
+ published
+ procedure Invoke_GetCustomers(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_UpdateCustomers(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_GetOrders(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ end;
+
+implementation
+
+uses
+ {RemObjects:} uRORes, uROClient;
+
+{ TNewService_Invoker }
+
+procedure TNewService_Invoker.Invoke_GetCustomers(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function GetCustomers: Binary; }
+var
+ lResult: Binary;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ lResult := nil;
+ try
+ lResult := (__Instance as INewService).GetCustomers;
+
+ __Message.InitializeResponseMessage(__Transport, 'QuantumGrid4Library', 'NewService', 'GetCustomersResponse');
+ __Message.Write('Result', TypeInfo(Binary), lResult, []);
+ __Message.Finalize;
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(lResult);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
+procedure TNewService_Invoker.Invoke_UpdateCustomers(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function UpdateCustomers(const IncomingData: Binary): Binary; }
+var
+ IncomingData: Binary;
+ lResult: Binary;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ IncomingData := nil;
+ lResult := nil;
+ try
+ __Message.Read('IncomingData', TypeInfo(Binary), IncomingData, []);
+
+ lResult := (__Instance as INewService).UpdateCustomers(IncomingData);
+
+ __Message.InitializeResponseMessage(__Transport, 'QuantumGrid4Library', 'NewService', 'UpdateCustomersResponse');
+ __Message.Write('Result', TypeInfo(Binary), lResult, []);
+ __Message.Finalize;
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(IncomingData);
+ __lObjectDisposer.Add(lResult);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
+procedure TNewService_Invoker.Invoke_GetOrders(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function GetOrders(const CustomerID: String): Binary; }
+var
+ CustomerID: String;
+ lResult: Binary;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ lResult := nil;
+ try
+ __Message.Read('CustomerID', TypeInfo(String), CustomerID, []);
+
+ lResult := (__Instance as INewService).GetOrders(CustomerID);
+
+ __Message.InitializeResponseMessage(__Transport, 'QuantumGrid4Library', 'NewService', 'GetOrdersResponse');
+ __Message.Write('Result', TypeInfo(Binary), lResult, []);
+ __Message.Finalize;
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(lResult);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_Client.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_Client.bdsproj
new file mode 100644
index 0000000..9f1d6d4
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_Client.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {39E5DE38-A62A-41FD-8C03-2BA8DE1A4948}
+
+
+
+
+ QuantumGrid4_Client.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_Client.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_Client.dpr
new file mode 100644
index 0000000..e5424b7
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_Client.dpr
@@ -0,0 +1,17 @@
+program QuantumGrid4_Client;
+
+uses
+ uROComInit,
+ Forms,
+ QuantumGrid4_ClientMain in 'QuantumGrid4_ClientMain.pas' {QuantumGrid4_ClientMainForm},
+ QuantumGrid4_ClientData in 'QuantumGrid4_ClientData.pas' {QuantumGrid4_ClientDataModule: TDAClientDataModule};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'QuantumGrid4 Client';
+ Application.CreateForm(TQuantumGrid4_ClientDataModule, QuantumGrid4_ClientDataModule);
+ Application.CreateForm(TQuantumGrid4_ClientMainForm, QuantumGrid4_ClientMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_Client.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_Client.dproj
new file mode 100644
index 0000000..d7eddb5
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_Client.dproj
@@ -0,0 +1,75 @@
+
+
+ {186a7cf2-9814-47d5-8eba-10b5c4756fee}
+ QuantumGrid4_Client.dpr
+ Debug
+ AnyCPU
+ DCC32
+ QuantumGrid4_Client.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ QuantumGrid4_Client.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_Client.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_Client.res
new file mode 100644
index 0000000..da01de5
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_Client.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_ClientData.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_ClientData.dfm
new file mode 100644
index 0000000..1ec161b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_ClientData.dfm
@@ -0,0 +1,308 @@
+object QuantumGrid4_ClientDataModule: TQuantumGrid4_ClientDataModule
+ OldCreateOrder = True
+ Left = 281
+ Top = 207
+ Height = 300
+ Width = 437
+ object ROChannel: TROWinInetHTTPChannel
+ UserAgent = 'RemObjects SDK'
+ TargetURL = 'http://localhost:8099/BIN'
+ ServerLocators = <>
+ DispatchOptions = []
+ Left = 40
+ Top = 8
+ end
+ object ROMessage: TROBinMessage
+ Left = 40
+ Top = 52
+ end
+ object RORemoteService: TRORemoteService
+ Message = ROMessage
+ Channel = ROChannel
+ ServiceName = 'NewService'
+ Left = 40
+ Top = 96
+ end
+ object bdsCustomers: TDABinDataStreamer
+ Left = 306
+ Top = 49
+ end
+ object dtCustomers: TDACDSDataTable
+ RemoteUpdatesOptions = []
+ Fields = <
+ item
+ Name = 'CustomerID'
+ DataType = datString
+ Size = 5
+ InPrimaryKey = True
+ end
+ item
+ Name = 'CompanyName'
+ DataType = datString
+ Size = 40
+ end
+ item
+ Name = 'ContactName'
+ DataType = datString
+ Size = 30
+ end
+ item
+ Name = 'ContactTitle'
+ DataType = datString
+ Size = 30
+ end
+ item
+ Name = 'Address'
+ DataType = datString
+ Size = 60
+ end
+ item
+ Name = 'City'
+ DataType = datString
+ Size = 15
+ end
+ item
+ Name = 'Region'
+ DataType = datString
+ Size = 15
+ end
+ item
+ Name = 'PostalCode'
+ DataType = datString
+ Size = 10
+ end
+ item
+ Name = 'Country'
+ DataType = datString
+ Size = 15
+ end
+ item
+ Name = 'Phone'
+ DataType = datString
+ Size = 24
+ end
+ item
+ Name = 'Fax'
+ DataType = datString
+ Size = 24
+ end>
+ Params = <>
+ MasterMappingMode = mmDataRequest
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteDataAdapter = rdaCustomers
+ AfterOpen = dtCustomersAfterOpen
+ AfterScroll = dtCustomersAfterScroll
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ LogicalName = 'Customers'
+ IndexDefs = <>
+ Left = 192
+ Top = 32
+ end
+ object dsCustomers: TDADataSource
+ DataTable = dtCustomers
+ Left = 208
+ Top = 48
+ end
+ object dtOrders: TDACDSDataTable
+ RemoteUpdatesOptions = []
+ Fields = <
+ item
+ Name = 'OrderID'
+ DataType = datAutoInc
+ InPrimaryKey = True
+ end
+ item
+ Name = 'CustomerID'
+ DataType = datString
+ Size = 5
+ end
+ item
+ Name = 'EmployeeID'
+ DataType = datInteger
+ end
+ item
+ Name = 'OrderDate'
+ DataType = datDateTime
+ end
+ item
+ Name = 'RequiredDate'
+ DataType = datDateTime
+ end
+ item
+ Name = 'ShippedDate'
+ DataType = datDateTime
+ end
+ item
+ Name = 'ShipVia'
+ DataType = datInteger
+ end
+ item
+ Name = 'Freight'
+ DataType = datFloat
+ end
+ item
+ Name = 'ShipName'
+ DataType = datString
+ Size = 40
+ end
+ item
+ Name = 'ShipAddress'
+ DataType = datString
+ Size = 60
+ end
+ item
+ Name = 'ShipCity'
+ DataType = datString
+ Size = 15
+ end
+ item
+ Name = 'ShipRegion'
+ DataType = datString
+ Size = 15
+ end
+ item
+ Name = 'ShipPostalCode'
+ DataType = datString
+ Size = 10
+ end
+ item
+ Name = 'ShipCountry'
+ DataType = datString
+ Size = 15
+ end>
+ Params = <>
+ MasterMappingMode = mmDataRequest
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteDataAdapter = rdaorders
+ MasterSource = dsCustomers
+ MasterRequestMappings.Strings = (
+ 'CustomerID=CustomerID')
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ LogicalName = 'Orders'
+ IndexDefs = <>
+ Left = 192
+ Top = 120
+ end
+ object dsOrders: TDADataSource
+ DataTable = dtOrders
+ Left = 208
+ Top = 136
+ end
+ object rdaCustomers: TDARemoteDataAdapter
+ GetSchemaCall.RemoteService = RORemoteService
+ GetSchemaCall.MethodName = 'GetSchema'
+ GetSchemaCall.Params = <
+ item
+ Name = 'aFilter'
+ DataType = rtString
+ Flag = fIn
+ end
+ item
+ Name = 'Result'
+ DataType = rtString
+ Flag = fResult
+ end>
+ GetSchemaCall.Default = False
+ GetSchemaCall.IncomingSchemaParameter = 'Result'
+ GetSchemaCall.OutgoingFilterParameter = 'aFilter'
+ GetDataCall.RemoteService = RORemoteService
+ GetDataCall.MethodName = 'GetCustomers'
+ GetDataCall.Params = <
+ item
+ Name = 'Result'
+ DataType = rtBinary
+ Flag = fResult
+ Value = Null
+ end>
+ GetDataCall.Default = False
+ GetDataCall.IncomingDataParameter = 'Result'
+ UpdateDataCall.RemoteService = RORemoteService
+ UpdateDataCall.MethodName = 'UpdateCustomers'
+ UpdateDataCall.Params = <
+ item
+ Name = 'Result'
+ DataType = rtBinary
+ Flag = fResult
+ Value = Null
+ end
+ item
+ Name = 'IncomingData'
+ DataType = rtBinary
+ Flag = fIn
+ Value = Null
+ end>
+ UpdateDataCall.Default = False
+ UpdateDataCall.OutgoingDeltaParameter = 'IncomingData'
+ UpdateDataCall.IncomingDeltaParameter = 'Result'
+ GetScriptsCall.RemoteService = RORemoteService
+ RemoteService = RORemoteService
+ DataStreamer = bdsCustomers
+ Left = 278
+ Top = 48
+ end
+ object rdaorders: TDARemoteDataAdapter
+ GetSchemaCall.RemoteService = RORemoteService
+ GetSchemaCall.MethodName = 'GetSchema'
+ GetSchemaCall.Params = <
+ item
+ Name = 'aFilter'
+ DataType = rtString
+ Flag = fIn
+ end
+ item
+ Name = 'Result'
+ DataType = rtString
+ Flag = fResult
+ end>
+ GetSchemaCall.Default = False
+ GetSchemaCall.IncomingSchemaParameter = 'Result'
+ GetSchemaCall.OutgoingFilterParameter = 'aFilter'
+ GetDataCall.RemoteService = RORemoteService
+ GetDataCall.MethodName = 'GetOrders'
+ GetDataCall.Params = <
+ item
+ Name = 'Result'
+ DataType = rtBinary
+ Flag = fResult
+ Value = Null
+ end
+ item
+ Name = 'CustomerID'
+ DataType = rtString
+ Flag = fIn
+ Value = Null
+ end>
+ GetDataCall.Default = False
+ GetDataCall.IncomingDataParameter = 'Result'
+ GetDataCall.OutgoingParamsParameter = 'CustomerID'
+ UpdateDataCall.RemoteService = RORemoteService
+ UpdateDataCall.MethodName = 'UpdateCustomers'
+ UpdateDataCall.Params = <
+ item
+ Name = 'Result'
+ DataType = rtBinary
+ Flag = fResult
+ Value = Null
+ end
+ item
+ Name = 'IncomingData'
+ DataType = rtBinary
+ Flag = fIn
+ Value = Null
+ end>
+ UpdateDataCall.Default = False
+ UpdateDataCall.OutgoingDeltaParameter = 'IncomingData'
+ UpdateDataCall.IncomingDeltaParameter = 'Result'
+ GetScriptsCall.RemoteService = RORemoteService
+ RemoteService = RORemoteService
+ DataStreamer = bdsOrders
+ Left = 277
+ Top = 141
+ end
+ object bdsOrders: TDABinDataStreamer
+ Left = 306
+ Top = 141
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_ClientData.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_ClientData.pas
new file mode 100644
index 0000000..936f947
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_ClientData.pas
@@ -0,0 +1,83 @@
+unit QuantumGrid4_ClientData;
+
+interface
+
+uses {vcl:} SysUtils, Classes, DB, DBClient,
+ {RemObjects:} uROClient, uROClientIntf, uRORemoteService, uROBinMessage, uROWinInetHTTPChannel,
+ {Data Abstract:} uDADataTable, uDABINAdapter,
+ uDACDSDataTable, uDAADODataTable, uDAScriptingProvider,
+ uDARemoteDataAdapter, uDADataStreamer, uDAInterfaces;
+
+type
+ TQuantumGrid4_ClientDataModule = class(TDataModule)
+ ROMessage: TROBinMessage;
+ ROChannel: TROWinInetHTTPChannel;
+ RORemoteService: TRORemoteService;
+ bdsCustomers: TDABinDataStreamer;
+ dtCustomers: TDACDSDataTable;
+ dsCustomers: TDADataSource;
+ dtOrders: TDACDSDataTable;
+ dsOrders: TDADataSource;
+ rdaCustomers: TDARemoteDataAdapter;
+ rdaorders: TDARemoteDataAdapter;
+ bdsOrders: TDABinDataStreamer;
+ procedure dtCustomersAfterScroll(DataTable: TDADataTable);
+ procedure dtCustomersAfterOpen(DataTable: TDADataTable);
+ private
+ fFetchedCustomers : TStringList;
+
+ public
+ constructor Create(aOwner : TComponent); override;
+ destructor Destroy; override;
+ end;
+
+var
+ QuantumGrid4_ClientDataModule: TQuantumGrid4_ClientDataModule;
+
+implementation
+
+
+{$R *.dfm}
+
+{ TClientDataModule }
+constructor TQuantumGrid4_ClientDataModule.Create(aOwner: TComponent);
+begin
+ inherited;
+
+ fFetchedCustomers := TStringList.Create;
+ fFetchedCustomers.Sorted := TRUE;
+end;
+
+destructor TQuantumGrid4_ClientDataModule.Destroy;
+begin
+ fFetchedCustomers.Free;
+ inherited;
+end;
+
+procedure TQuantumGrid4_ClientDataModule.dtCustomersAfterScroll(
+ DataTable: TDADataTable);
+var lCustomerID : string;
+begin
+ if dtCustomers.Fetching then Exit;
+
+ with dtOrders do begin
+ lCustomerID := dtCustomers.FieldByName('CustomerID').AsString;
+
+ if (fFetchedCustomers.IndexOf(lCustomerID)>=0)
+ then Exit
+ else fFetchedCustomers.Add(lCustomerID);
+
+ rdaorders.GetDataCall.ParamByName('CustomerID').AsString := lCustomerID;
+ LoadFromRemoteSource;
+ end;
+end;
+
+procedure TQuantumGrid4_ClientDataModule.dtCustomersAfterOpen(DataTable: TDADataTable);
+begin
+ fFetchedCustomers.Clear;
+ dtCustomersAfterScroll(DataTable);
+end;
+
+initialization
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_ClientMain.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_ClientMain.dfm
new file mode 100644
index 0000000..7bb91bd
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_ClientMain.dfm
@@ -0,0 +1,190 @@
+object QuantumGrid4_ClientMainForm: TQuantumGrid4_ClientMainForm
+ Left = 125
+ Top = 83
+ AutoScroll = False
+ BorderWidth = 5
+ Caption = 'QuantumGrid 4 Client'
+ ClientHeight = 447
+ ClientWidth = 506
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ PixelsPerInch = 96
+ TextHeight = 13
+ object PageControl: TPageControl
+ Left = 0
+ Top = 33
+ Width = 506
+ Height = 414
+ ActivePage = TabSheet2
+ Align = alClient
+ TabIndex = 0
+ TabOrder = 0
+ object TabSheet2: TTabSheet
+ Caption = 'Quantum Grid 4 - OnDemand'
+ ImageIndex = 1
+ object cxGrid1: TcxGrid
+ Left = 0
+ Top = 0
+ Width = 498
+ Height = 261
+ Align = alClient
+ TabOrder = 0
+ LookAndFeel.Kind = lfFlat
+ object viewCustomers: TcxGridDBTableView
+ NavigatorButtons.ConfirmDelete = False
+ DataController.DataSource = QuantumGrid4_ClientDataModule.dsCustomers
+ DataController.Summary.DefaultGroupSummaryItems = <>
+ DataController.Summary.FooterSummaryItems = <>
+ DataController.Summary.SummaryGroups = <>
+ object viewCustomersCustomerID: TcxGridDBColumn
+ DataBinding.FieldName = 'CustomerID'
+ end
+ object viewCustomersCompanyName: TcxGridDBColumn
+ DataBinding.FieldName = 'CompanyName'
+ end
+ object viewCustomersContactName: TcxGridDBColumn
+ DataBinding.FieldName = 'ContactName'
+ end
+ object viewCustomersContactTitle: TcxGridDBColumn
+ DataBinding.FieldName = 'ContactTitle'
+ end
+ object viewCustomersAddress: TcxGridDBColumn
+ DataBinding.FieldName = 'Address'
+ end
+ object viewCustomersCity: TcxGridDBColumn
+ DataBinding.FieldName = 'City'
+ end
+ object viewCustomersRegion: TcxGridDBColumn
+ DataBinding.FieldName = 'Region'
+ end
+ object viewCustomersPostalCode: TcxGridDBColumn
+ DataBinding.FieldName = 'PostalCode'
+ end
+ object viewCustomersCountry: TcxGridDBColumn
+ DataBinding.FieldName = 'Country'
+ end
+ object viewCustomersPhone: TcxGridDBColumn
+ DataBinding.FieldName = 'Phone'
+ end
+ object viewCustomersFax: TcxGridDBColumn
+ DataBinding.FieldName = 'Fax'
+ end
+ end
+ object viewOrders: TcxGridDBTableView
+ NavigatorButtons.ConfirmDelete = False
+ DataController.DataSource = QuantumGrid4_ClientDataModule.dsOrders
+ DataController.DetailKeyFieldNames = 'CustomerID'
+ DataController.KeyFieldNames = 'OrderID'
+ DataController.MasterKeyFieldNames = 'CustomerID'
+ DataController.Summary.DefaultGroupSummaryItems = <>
+ DataController.Summary.FooterSummaryItems = <>
+ DataController.Summary.SummaryGroups = <>
+ object viewOrdersOrderID: TcxGridDBColumn
+ DataBinding.FieldName = 'OrderID'
+ end
+ object viewOrdersCustomerID: TcxGridDBColumn
+ DataBinding.FieldName = 'CustomerID'
+ end
+ object viewOrdersEmployeeID: TcxGridDBColumn
+ DataBinding.FieldName = 'EmployeeID'
+ end
+ object viewOrdersOrderDate: TcxGridDBColumn
+ DataBinding.FieldName = 'OrderDate'
+ end
+ object viewOrdersRequiredDate: TcxGridDBColumn
+ DataBinding.FieldName = 'RequiredDate'
+ end
+ object viewOrdersShippedDate: TcxGridDBColumn
+ DataBinding.FieldName = 'ShippedDate'
+ end
+ object viewOrdersShipVia: TcxGridDBColumn
+ DataBinding.FieldName = 'ShipVia'
+ end
+ object viewOrdersFreight: TcxGridDBColumn
+ DataBinding.FieldName = 'Freight'
+ end
+ object viewOrdersShipName: TcxGridDBColumn
+ DataBinding.FieldName = 'ShipName'
+ end
+ object viewOrdersShipAddress: TcxGridDBColumn
+ DataBinding.FieldName = 'ShipAddress'
+ end
+ object viewOrdersShipCity: TcxGridDBColumn
+ DataBinding.FieldName = 'ShipCity'
+ end
+ object viewOrdersShipRegion: TcxGridDBColumn
+ DataBinding.FieldName = 'ShipRegion'
+ end
+ object viewOrdersShipPostalCode: TcxGridDBColumn
+ DataBinding.FieldName = 'ShipPostalCode'
+ end
+ object viewOrdersShipCountry: TcxGridDBColumn
+ DataBinding.FieldName = 'ShipCountry'
+ end
+ end
+ object cxGrid1Level1: TcxGridLevel
+ GridView = viewCustomers
+ object cxGrid1Level2: TcxGridLevel
+ GridView = viewOrders
+ end
+ end
+ end
+ object DBGrid3: TDBGrid
+ Left = 0
+ Top = 266
+ Width = 498
+ Height = 120
+ Align = alBottom
+ DataSource = QuantumGrid4_ClientDataModule.dsOrders
+ TabOrder = 1
+ TitleFont.Charset = DEFAULT_CHARSET
+ TitleFont.Color = clWindowText
+ TitleFont.Height = -11
+ TitleFont.Name = 'MS Sans Serif'
+ TitleFont.Style = []
+ end
+ object Panel2: TPanel
+ Left = 0
+ Top = 261
+ Width = 498
+ Height = 5
+ Align = alBottom
+ BevelOuter = bvNone
+ TabOrder = 2
+ end
+ end
+ end
+ object Panel1: TPanel
+ Left = 0
+ Top = 0
+ Width = 506
+ Height = 33
+ Align = alTop
+ BevelOuter = bvNone
+ TabOrder = 1
+ object Button1: TButton
+ Left = 80
+ Top = 0
+ Width = 97
+ Height = 25
+ Caption = 'Apply Updates'
+ TabOrder = 0
+ OnClick = Button1Click
+ end
+ object Button2: TButton
+ Left = 0
+ Top = 0
+ Width = 75
+ Height = 25
+ Caption = 'Open/Close'
+ TabOrder = 1
+ OnClick = Button2Click
+ end
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_ClientMain.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_ClientMain.pas
new file mode 100644
index 0000000..13e8065
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_ClientMain.pas
@@ -0,0 +1,81 @@
+unit QuantumGrid4_ClientMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
+ uROClient, uROClientIntf, uRORemoteService, uROBinMessage, uROIndyHTTPChannel,
+ Grids, DBGrids, ComCtrls, cxStyles, cxCustomData, cxGraphics, cxFilter,
+ cxData, cxDataStorage, cxEdit, DB, cxDBData, cxGridLevel, cxClasses,
+ cxControls, cxGridCustomView, cxGridCustomTableView, cxGridTableView,
+ cxGridDBTableView, cxGrid, ExtCtrls, DBClient;
+
+type
+ TQuantumGrid4_ClientMainForm = class(TForm)
+ PageControl: TPageControl;
+ TabSheet2: TTabSheet;
+ viewCustomers: TcxGridDBTableView;
+ cxGrid1Level1: TcxGridLevel;
+ cxGrid1: TcxGrid;
+ viewOrders: TcxGridDBTableView;
+ viewCustomersCustomerID: TcxGridDBColumn;
+ viewCustomersCompanyName: TcxGridDBColumn;
+ viewCustomersContactName: TcxGridDBColumn;
+ viewCustomersContactTitle: TcxGridDBColumn;
+ viewCustomersAddress: TcxGridDBColumn;
+ viewCustomersCity: TcxGridDBColumn;
+ viewCustomersRegion: TcxGridDBColumn;
+ viewCustomersPostalCode: TcxGridDBColumn;
+ viewCustomersCountry: TcxGridDBColumn;
+ viewCustomersPhone: TcxGridDBColumn;
+ viewCustomersFax: TcxGridDBColumn;
+ Panel1: TPanel;
+ Button1: TButton;
+ Button2: TButton;
+ viewOrdersOrderID: TcxGridDBColumn;
+ viewOrdersCustomerID: TcxGridDBColumn;
+ viewOrdersEmployeeID: TcxGridDBColumn;
+ viewOrdersOrderDate: TcxGridDBColumn;
+ viewOrdersRequiredDate: TcxGridDBColumn;
+ viewOrdersShippedDate: TcxGridDBColumn;
+ viewOrdersShipVia: TcxGridDBColumn;
+ viewOrdersFreight: TcxGridDBColumn;
+ viewOrdersShipName: TcxGridDBColumn;
+ viewOrdersShipAddress: TcxGridDBColumn;
+ viewOrdersShipCity: TcxGridDBColumn;
+ viewOrdersShipRegion: TcxGridDBColumn;
+ viewOrdersShipPostalCode: TcxGridDBColumn;
+ viewOrdersShipCountry: TcxGridDBColumn;
+ cxGrid1Level2: TcxGridLevel;
+ DBGrid3: TDBGrid;
+ Panel2: TPanel;
+ procedure Button2Click(Sender: TObject);
+ procedure Button1Click(Sender: TObject);
+ private
+ fLastMaster: Variant;
+ public
+
+ end;
+
+var
+ QuantumGrid4_ClientMainForm: TQuantumGrid4_ClientMainForm;
+
+implementation
+
+uses QuantumGrid4_ClientData, uDAInterfaces, uDADataTable;
+
+{$R *.dfm}
+
+procedure TQuantumGrid4_ClientMainForm.Button2Click(Sender: TObject);
+begin
+ with QuantumGrid4_ClientDataModule.dtCustomers do
+ Active := Active xor TRUE;
+end;
+
+procedure TQuantumGrid4_ClientMainForm.Button1Click(Sender: TObject);
+begin
+ QuantumGrid4_ClientDataModule.dtCustomers.ApplyUpdates(TRUE);
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_ServerData.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_ServerData.dfm
new file mode 100644
index 0000000..03c5056
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_ServerData.dfm
@@ -0,0 +1,55 @@
+object QuantumGrid4_ServerDataModule: TQuantumGrid4_ServerDataModule
+ OldCreateOrder = False
+ OnCreate = DataModuleCreate
+ Left = 73
+ Top = 69
+ Height = 207
+ Width = 352
+ object ROServer: TROIndyHTTPServer
+ Dispatchers = <
+ item
+ Name = 'ROMessage'
+ Message = ROMessage
+ Enabled = True
+ PathInfo = 'Bin'
+ end>
+ Port = 8099
+ Left = 32
+ Top = 8
+ end
+ object ROMessage: TROBinMessage
+ Left = 34
+ Top = 56
+ end
+ object ConnectionManager: TDAConnectionManager
+ MaxPoolSize = 10
+ PoolTimeoutSeconds = 60
+ PoolBehaviour = pbWait
+ WaitIntervalSeconds = 1
+ Connections = <
+ item
+ Name = 'ADO'
+ ConnectionString =
+ 'ADO?AuxDriver=SQLOLEDB.1;Server=localhost;Database=Northwind;Use' +
+ 'rID=sa;Password=;'
+ Default = True
+ Tag = 0
+ end>
+ DriverManager = DriverManager
+ PoolingEnabled = True
+ Left = 136
+ Top = 56
+ end
+ object DriverManager: TDADriverManager
+ DriverDirectory = '%SYSTEM%\'
+ AutoLoad = False
+ TraceActive = False
+ TraceFlags = []
+ Left = 136
+ Top = 10
+ end
+ object ADODriver: TDAADODriver
+ Left = 256
+ Top = 8
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_ServerData.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_ServerData.pas
new file mode 100644
index 0000000..f624b32
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_ServerData.pas
@@ -0,0 +1,38 @@
+unit QuantumGrid4_ServerData;
+
+interface
+
+uses
+ SysUtils, Classes,
+ uROClient, uROPoweredByRemObjectsButton, uROClientIntf, uROServer,
+ uROBinMessage, uROIndyHTTPServer,
+ uDADriverManager, uDAClasses, uDADBXDriver, uDAIBXDriver, uDAEngine, uDAADODriver,
+ uROIndyTCPServer;
+
+type
+ TQuantumGrid4_ServerDataModule = class(TDataModule)
+ ROServer: TROIndyHTTPServer;
+ ROMessage: TROBinMessage;
+ DriverManager: TDADriverManager;
+ ADODriver: TDAADODriver;
+ ConnectionManager: TDAConnectionManager;
+ procedure DataModuleCreate(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ QuantumGrid4_ServerDataModule: TQuantumGrid4_ServerDataModule;
+
+implementation
+
+{$R *.dfm}
+
+procedure TQuantumGrid4_ServerDataModule.DataModuleCreate(Sender: TObject);
+begin
+ ROServer.Active := true;
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_ServerMain.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_ServerMain.dfm
new file mode 100644
index 0000000..cfaa725
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_ServerMain.dfm
@@ -0,0 +1,25 @@
+object QuantumGrid4_ServerMainForm: TQuantumGrid4_ServerMainForm
+ Left = 66
+ Top = 76
+ BorderStyle = bsDialog
+ Caption = 'QuantumGrid 4 Server'
+ ClientHeight = 64
+ ClientWidth = 228
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ PixelsPerInch = 96
+ TextHeight = 13
+ object RoPoweredByRemObjectsButton1: TROPoweredByRemObjectsButton
+ Left = 8
+ Top = 8
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_ServerMain.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_ServerMain.pas
new file mode 100644
index 0000000..a70c5a0
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_ServerMain.pas
@@ -0,0 +1,26 @@
+unit QuantumGrid4_ServerMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
+ uROClient, uROPoweredByRemObjectsButton, uROClientIntf, uROServer,
+ uROBinMessage, uROIndyHTTPServer;
+
+type
+ TQuantumGrid4_ServerMainForm = class(TForm)
+ RoPoweredByRemObjectsButton1: TRoPoweredByRemObjectsButton;
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ QuantumGrid4_ServerMainForm: TQuantumGrid4_ServerMainForm;
+
+implementation
+
+{$R *.dfm}
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_server.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_server.bdsproj
new file mode 100644
index 0000000..862243b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_server.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {02FF7147-182D-44E5-A4EA-C4BFABDCBF32}
+
+
+
+
+ QuantumGrid4_server.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_server.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_server.dpr
new file mode 100644
index 0000000..de173a0
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_server.dpr
@@ -0,0 +1,23 @@
+program QuantumGrid4_server;
+
+{#ROGEN:QuantumGrid4Library.rodl} // RemObjects: Careful, do not remove!
+
+uses
+ uROComInit,
+ Forms,
+ QuantumGrid4_ServerMain in 'QuantumGrid4_ServerMain.pas' {QuantumGrid4_ServerMainForm},
+ NewService_Impl in 'NewService_Impl.pas' {NewService: TDARemoteService},
+ QuantumGrid4_ServerData in 'QuantumGrid4_ServerData.pas' {QuantumGrid4_ServerDataModule: TDataModule},
+ QuantumGrid4Library_Intf in 'QuantumGrid4Library_Intf.pas',
+ QuantumGrid4Library_Invk in 'QuantumGrid4Library_Invk.pas';
+
+{$R *.res}
+{$R RODLFile.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'QuantumGrid4 Server';
+ Application.CreateForm(TQuantumGrid4_ServerDataModule, QuantumGrid4_ServerDataModule);
+ Application.CreateForm(TQuantumGrid4_ServerMainForm, QuantumGrid4_ServerMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_server.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_server.dproj
new file mode 100644
index 0000000..11b11c4
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_server.dproj
@@ -0,0 +1,80 @@
+
+
+ {540b874b-c44a-4832-b75a-f3873582e77c}
+ QuantumGrid4_server.dpr
+ Debug
+ AnyCPU
+ DCC32
+ QuantumGrid4_server.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ QuantumGrid4_server.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_server.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_server.res
new file mode 100644
index 0000000..7455d6e
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/QuantumGrid4_server.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/RODLFILE.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/RODLFILE.res
new file mode 100644
index 0000000..66470ea
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/QuantumGrid 4/RODLFILE.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Quick Open/QuickOpen.Sample.html b/official/5.0.30.691/Data Abstract for Delphi/Samples/Quick Open/QuickOpen.Sample.html
new file mode 100644
index 0000000..8b2f535
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Quick Open/QuickOpen.Sample.html
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+ QuickOpen
+
+
+
+Purpose
+
+
+ This example shows how to receive data from a local database.
+
+
+Examine the Code
+
+
+ See the simple code in QuickOpenMain.pas .
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Quick Open/QuickOpen.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Quick Open/QuickOpen.bdsproj
new file mode 100644
index 0000000..143c7d8
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Quick Open/QuickOpen.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {E45EF1CD-38DB-4096-9D1E-8B2CB77CE9C4}
+
+
+
+
+ QuickOpen.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Quick Open/QuickOpen.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/Quick Open/QuickOpen.dpr
new file mode 100644
index 0000000..02aced4
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Quick Open/QuickOpen.dpr
@@ -0,0 +1,14 @@
+program QuickOpen;
+
+uses
+ Forms,
+ QuickOpenMain in 'QuickOpenMain.pas' {QuickOpenMainForm};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'QuickOpen';
+ Application.CreateForm(TQuickOpenMainForm, QuickOpenMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Quick Open/QuickOpen.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Quick Open/QuickOpen.dproj
new file mode 100644
index 0000000..a6ad6ef
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Quick Open/QuickOpen.dproj
@@ -0,0 +1,72 @@
+
+
+ {b3f06429-5ddc-4ac4-8f56-ce4275c9a145}
+ QuickOpen.dpr
+ Debug
+ AnyCPU
+ DCC32
+ QuickOpen.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ QuickOpen.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Quick Open/QuickOpen.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Quick Open/QuickOpen.res
new file mode 100644
index 0000000..b946fbb
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Quick Open/QuickOpen.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Quick Open/QuickOpenMain.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Quick Open/QuickOpenMain.dfm
new file mode 100644
index 0000000..6aabf85
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Quick Open/QuickOpenMain.dfm
@@ -0,0 +1,296 @@
+object QuickOpenMainForm: TQuickOpenMainForm
+ Left = 116
+ Top = 122
+ AutoScroll = False
+ Caption = 'Quick Open'
+ ClientHeight = 311
+ ClientWidth = 539
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ PixelsPerInch = 96
+ TextHeight = 13
+ object OpenButton: TButton
+ Left = 8
+ Top = 8
+ Width = 75
+ Height = 25
+ Caption = 'Open'
+ TabOrder = 0
+ OnClick = OpenButtonClick
+ end
+ object DBGrid1: TDBGrid
+ Left = 8
+ Top = 40
+ Width = 523
+ Height = 269
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ DataSource = dsCustomers
+ TabOrder = 1
+ TitleFont.Charset = DEFAULT_CHARSET
+ TitleFont.Color = clWindowText
+ TitleFont.Height = -11
+ TitleFont.Name = 'MS Sans Serif'
+ TitleFont.Style = []
+ end
+ object DADriverManager1: TDADriverManager
+ DriverDirectory = '%SYSTEM%\'
+ TraceActive = False
+ TraceFlags = []
+ Left = 12
+ Top = 11
+ end
+ object DASchema1: TDASchema
+ ConnectionManager = DAConnectionManager1
+ Datasets = <
+ item
+ Params = <>
+ Statements = <
+ item
+ Connection = 'ADO'
+ TargetTable = 'Customers'
+ SQL =
+ 'SELECT '#10' CustomerID, CompanyName, ContactName, ContactTitle, ' +
+ #10' Address, City, Region, PostalCode, Country, Phone, '#10' Fax' +
+ #10' FROM'#10' Customers'
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'CustomerID'
+ TableField = 'CustomerID'
+ end
+ item
+ DatasetField = 'CompanyName'
+ TableField = 'CompanyName'
+ end
+ item
+ DatasetField = 'ContactName'
+ TableField = 'ContactName'
+ end
+ item
+ DatasetField = 'ContactTitle'
+ TableField = 'ContactTitle'
+ end
+ item
+ DatasetField = 'Address'
+ TableField = 'Address'
+ end
+ item
+ DatasetField = 'City'
+ TableField = 'City'
+ end
+ item
+ DatasetField = 'Region'
+ TableField = 'Region'
+ end
+ item
+ DatasetField = 'PostalCode'
+ TableField = 'PostalCode'
+ end
+ item
+ DatasetField = 'Country'
+ TableField = 'Country'
+ end
+ item
+ DatasetField = 'Phone'
+ TableField = 'Phone'
+ end
+ item
+ DatasetField = 'Fax'
+ TableField = 'Fax'
+ end>
+ end>
+ Name = 'Customers'
+ Fields = <
+ item
+ Name = 'CustomerID'
+ DataType = datString
+ Size = 5
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CompanyName'
+ DataType = datString
+ Size = 40
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ContactName'
+ DataType = datString
+ Size = 30
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ContactTitle'
+ DataType = datString
+ Size = 30
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Address'
+ DataType = datString
+ Size = 60
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'City'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Region'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'PostalCode'
+ DataType = datString
+ Size = 10
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Country'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Phone'
+ DataType = datString
+ Size = 24
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Fax'
+ DataType = datString
+ Size = 24
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ BusinessRulesClient.ScriptLanguage = rslPascalScript
+ BusinessRulesServer.ScriptLanguage = rslPascalScript
+ end>
+ Commands = <>
+ RelationShips = <>
+ UpdateRules = <>
+ Left = 45
+ Top = 11
+ end
+ object DAConnectionManager1: TDAConnectionManager
+ Connections = <
+ item
+ Name = 'ADO'
+ ConnectionString =
+ 'ADO?Server=localhost;Database=Northwind;UserID=sa;AuxDriver=SQLO' +
+ 'LEDB.1;password='
+ Default = True
+ Tag = 0
+ end>
+ DriverManager = DADriverManager1
+ PoolingEnabled = True
+ Left = 76
+ Top = 11
+ end
+ object DAADODriver1: TDAADODriver
+ Left = 109
+ Top = 11
+ end
+ object DataTable: TDACDSDataTable
+ RemoteUpdatesOptions = []
+ Fields = <>
+ Params = <>
+ MasterMappingMode = mmDataRequest
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteFetchEnabled = False
+ ReadOnly = False
+ LocalSchema = DASchema1
+ LocalDataStreamer = DABINAdapter
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ LogicalName = 'Customers'
+ IndexDefs = <>
+ Left = 140
+ Top = 11
+ end
+ object dsCustomers: TDADataSource
+ DataSet = DataTable.Dataset
+ DataTable = DataTable
+ Left = 156
+ Top = 27
+ end
+ object DABINAdapter: TDABinDataStreamer
+ Left = 192
+ Top = 8
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Quick Open/QuickOpenMain.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Quick Open/QuickOpenMain.pas
new file mode 100644
index 0000000..5a4bba5
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Quick Open/QuickOpenMain.pas
@@ -0,0 +1,41 @@
+unit QuickOpenMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, DB, uDADataTable, uDACDSDataTable, uDAEngine, uDAADODriver,
+ uDAClasses, uDADriverManager, uDABINAdapter, Grids, DBGrids, StdCtrls,
+ uDAScriptingProvider, uDADataStreamer;
+
+type
+ TQuickOpenMainForm = class(TForm)
+ DADriverManager1: TDADriverManager;
+ DAADODriver1: TDAADODriver;
+ DataTable: TDACDSDataTable;
+ dsCustomers: TDADataSource;
+ DAConnectionManager1: TDAConnectionManager;
+ OpenButton: TButton;
+ DBGrid1: TDBGrid;
+ DABINAdapter: TDABinDataStreamer;
+ DASchema1: TDASchema;
+ procedure OpenButtonClick(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ QuickOpenMainForm: TQuickOpenMainForm;
+
+implementation
+
+{$R *.dfm}
+
+procedure TQuickOpenMainForm.OpenButtonClick(Sender: TObject);
+begin
+ DataTable.Open;
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Regular Expressions/RegularExpressions.Sample.html b/official/5.0.30.691/Data Abstract for Delphi/Samples/Regular Expressions/RegularExpressions.Sample.html
new file mode 100644
index 0000000..410cdc8
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Regular Expressions/RegularExpressions.Sample.html
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+ Regular Expressions
+
+
+
+Purpose
+
+
+ This sample illustrates the support provided for regular expressions .
+
+
+Examine the Code
+
+
+ Examine the simple code in RegularExpressionsMain.pas .
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Regular Expressions/RegularExpressions.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Regular Expressions/RegularExpressions.bdsproj
new file mode 100644
index 0000000..f07c865
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Regular Expressions/RegularExpressions.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {69D7AF2F-4D8D-44D6-A9EF-E486C6FC0894}
+
+
+
+
+ RegularExpressions.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Regular Expressions/RegularExpressions.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/Regular Expressions/RegularExpressions.dpr
new file mode 100644
index 0000000..e39f53c
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Regular Expressions/RegularExpressions.dpr
@@ -0,0 +1,14 @@
+program RegularExpressions;
+
+uses
+ Forms,
+ RegularExpressionsMain in 'RegularExpressionsMain.pas' {RegularExpressionsMainForm};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'Regular Expressions';
+ Application.CreateForm(TRegularExpressionsMainForm, RegularExpressionsMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Regular Expressions/RegularExpressions.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Regular Expressions/RegularExpressions.dproj
new file mode 100644
index 0000000..3a4a572
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Regular Expressions/RegularExpressions.dproj
@@ -0,0 +1,72 @@
+
+
+ {bb6ba93f-d097-423b-8543-9afc638ec2c4}
+ RegularExpressions.dpr
+ Debug
+ AnyCPU
+ DCC32
+ RegularExpressions.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ RegularExpressions.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Regular Expressions/RegularExpressions.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Regular Expressions/RegularExpressions.res
new file mode 100644
index 0000000..b946fbb
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Regular Expressions/RegularExpressions.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Regular Expressions/RegularExpressionsMain.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Regular Expressions/RegularExpressionsMain.dfm
new file mode 100644
index 0000000..14e1f76
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Regular Expressions/RegularExpressionsMain.dfm
@@ -0,0 +1,267 @@
+object RegularExpressionsMainForm: TRegularExpressionsMainForm
+ Left = 15
+ Top = 41
+ AutoScroll = False
+ BorderWidth = 5
+ Caption = 'Regular Expression'
+ ClientHeight = 240
+ ClientWidth = 740
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Label4: TLabel
+ Left = 355
+ Top = 5
+ Width = 242
+ Height = 19
+ Caption = 'Press a cell of a grid to fill the text'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clNavy
+ Font.Height = -16
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ ParentFont = False
+ end
+ object GroupBox1: TGroupBox
+ Left = 0
+ Top = 0
+ Width = 352
+ Height = 129
+ Caption = 'Test Expression'
+ TabOrder = 0
+ object lbResult: TLabel
+ Left = 150
+ Top = 102
+ Width = 183
+ Height = 13
+ Caption = 'Click the button to verify your input...'
+ end
+ object Label1: TLabel
+ Left = 16
+ Top = 20
+ Width = 48
+ Height = 13
+ Caption = 'Template:'
+ end
+ object Label2: TLabel
+ Left = 9
+ Top = 44
+ Width = 56
+ Height = 13
+ Caption = 'Expression:'
+ end
+ object Label3: TLabel
+ Left = 39
+ Top = 68
+ Width = 26
+ Height = 13
+ Caption = 'Text:'
+ end
+ object cbExpression: TComboBox
+ Left = 68
+ Top = 16
+ Width = 273
+ Height = 21
+ Style = csDropDownList
+ ItemHeight = 13
+ TabOrder = 0
+ OnChange = cbExpressionChange
+ end
+ object eText: TEdit
+ Left = 68
+ Top = 64
+ Width = 273
+ Height = 21
+ TabOrder = 2
+ end
+ object bCheck: TButton
+ Left = 68
+ Top = 96
+ Width = 75
+ Height = 25
+ Caption = '&Check'
+ Default = True
+ TabOrder = 3
+ OnClick = bCheckClick
+ end
+ object eExpression: TEdit
+ Left = 68
+ Top = 40
+ Width = 273
+ Height = 21
+ TabOrder = 1
+ end
+ end
+ object DBGrid1: TDBGrid
+ Left = 0
+ Top = 136
+ Width = 740
+ Height = 104
+ Align = alBottom
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ DataSource = DADataSource
+ ReadOnly = True
+ TabOrder = 1
+ TitleFont.Charset = DEFAULT_CHARSET
+ TitleFont.Color = clWindowText
+ TitleFont.Height = -11
+ TitleFont.Name = 'Tahoma'
+ TitleFont.Style = []
+ OnCellClick = DBGrid1CellClick
+ Columns = <
+ item
+ Expanded = False
+ FieldName = 'USPhoneNumber'
+ Width = 100
+ Visible = True
+ end
+ item
+ Expanded = False
+ FieldName = 'Email'
+ Width = 100
+ Visible = True
+ end
+ item
+ Expanded = False
+ FieldName = 'RealNumber'
+ Width = 100
+ Visible = True
+ end
+ item
+ Expanded = False
+ FieldName = 'RomanNumber'
+ Width = 100
+ Visible = True
+ end
+ item
+ Expanded = False
+ FieldName = 'URL'
+ Width = 100
+ Visible = True
+ end
+ item
+ Expanded = False
+ FieldName = 'ZipCode'
+ Width = 100
+ Visible = True
+ end
+ item
+ Expanded = False
+ FieldName = 'Path'
+ Width = 100
+ Visible = True
+ end>
+ end
+ object DACDSDataTable: TDACDSDataTable
+ RemoteUpdatesOptions = []
+ Fields = <
+ item
+ Name = 'USPhoneNumber'
+ DataType = datString
+ Size = 100
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Email'
+ DataType = datString
+ Size = 100
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'RealNumber'
+ DataType = datString
+ Size = 100
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'RomanNumber'
+ DataType = datString
+ Size = 100
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'URL'
+ DataType = datString
+ Size = 100
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ZipCode'
+ DataType = datString
+ Size = 100
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Path'
+ DataType = datString
+ Size = 100
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ Params = <>
+ MasterMappingMode = mmDataRequest
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteFetchEnabled = False
+ ReadOnly = False
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ IndexDefs = <>
+ Left = 411
+ Top = 57
+ end
+ object DADataSource: TDADataSource
+ DataSet = DACDSDataTable.Dataset
+ DataTable = DACDSDataTable
+ Left = 427
+ Top = 73
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Regular Expressions/RegularExpressionsMain.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Regular Expressions/RegularExpressionsMain.pas
new file mode 100644
index 0000000..243d144
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Regular Expressions/RegularExpressionsMain.pas
@@ -0,0 +1,148 @@
+unit RegularExpressionsMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, StdCtrls, DB, uDADataTable, uDACDSDataTable, ExtCtrls, DBCtrls,
+ Grids, DBGrids, uDAScriptingProvider;
+
+type
+ TRegExpressionTemplate = record
+ Description,
+ RegExpression: string;
+ end;
+
+const
+ RegExpressionTemplates: array[0..6] of TRegExpressionTemplate = (
+ (Description: 'US Phone Number'; RegExpression: '^\d{3}-(\d{2}-\d{2}|\d{4})'),
+ (Description: 'Email'; RegExpression: '[_a-zA-Z\d\-\.]+@([_a-zA-Z\d\-]+(\.[_a-zA-Z\d\-]+)+)'),
+ (Description: 'Real Number'; RegExpression: '^[+\-]?\d+(\.\d+)?([eE][+\-]?\d+)?$'),
+ (Description: 'Roman Number'; RegExpression: '^(?i)M*(D?C{0,3}|C[DM])(L?X{0,3}|X[LC])(V?I{0,3}|I[VX])$'),
+ (Description: 'URL'; RegExpression: '(?i)(FTP|HTTP)://([_a-z\d\-]+(\.[_a-z\d\-]+)+)((/[ _a-z\d\-\\\.]+)+)*'),
+ (Description: 'ZipCode'; RegExpression: '^\d{5}$'),
+ (Description: 'Path'; RegExpression: '[A-Za-z]:(\\[a-zA-Z0-9_]+)+'));
+
+type
+ TRegularExpressionsMainForm = class(TForm)
+ GroupBox1: TGroupBox;
+ cbExpression: TComboBox;
+ eText: TEdit;
+ bCheck: TButton;
+ lbResult: TLabel;
+ eExpression: TEdit;
+ Label1: TLabel;
+ Label2: TLabel;
+ Label3: TLabel;
+ DACDSDataTable: TDACDSDataTable;
+ DADataSource: TDADataSource;
+ DBGrid1: TDBGrid;
+ Label4: TLabel;
+ procedure bCheckClick(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ procedure cbExpressionChange(Sender: TObject);
+ procedure DBGrid1CellClick(Column: TColumn);
+ private
+ { Private declarations }
+ procedure SetupTable;
+ public
+ { Public declarations }
+ end;
+
+var
+ RegularExpressionsMainForm: TRegularExpressionsMainForm;
+
+implementation
+
+uses uDARegExpr;
+
+{$R *.dfm}
+
+procedure TRegularExpressionsMainForm.bCheckClick(Sender: TObject);
+begin
+ if ExecRegExpr(eExpression.Text, eText.Text) then begin
+ lbResult.Caption := 'The text is valid!'
+ end
+ else begin
+ Beep;
+ lbResult.Caption := 'The text is INVALID!'
+ end;
+end;
+
+procedure TRegularExpressionsMainForm.FormCreate(Sender: TObject);
+var
+ i: integer;
+begin
+ for i := 0 to High(RegExpressionTemplates) do
+ cbExpression.Items.Add(RegExpressionTemplates[i].Description);
+ cbExpression.ItemIndex := 0;
+ cbExpressionChange(nil);
+ SetupTable;
+end;
+
+procedure TRegularExpressionsMainForm.cbExpressionChange(Sender: TObject);
+begin
+ eExpression.Text := RegExpressionTemplates[cbExpression.ItemIndex].RegExpression
+end;
+
+procedure TRegularExpressionsMainForm.DBGrid1CellClick(Column: TColumn);
+begin
+ if (Column.Index >= 0) and (Column.Index < cbExpression.Items.Count) then begin
+ cbExpression.ItemIndex := Column.Index;
+ cbExpressionChange(cbExpression);
+ end;
+ eText.Text := DACDSDataTable.Fields[Column.Index].AsString;
+end;
+
+procedure TRegularExpressionsMainForm.SetupTable;
+begin
+ with DACDSDataTable do begin
+ Open;
+ First;
+ // valid record
+ Insert;
+ FieldByName('USPhoneNumber').AsString := '123-45-67';
+ FieldByName('Email').AsString := 'test@test.com';
+ FieldByName('RealNumber').AsString := '-12e+10';
+ FieldByName('RomanNumber').AsString := 'MCXX';
+ FieldByName('URL').AsString := 'http://www.site.com';
+ FieldByName('ZipCode').AsString := '12345';
+ FieldByName('path').AsString := 'c:\file.exe';
+ post;
+ // invalid
+ Insert;
+ FieldByName('USPhoneNumber').AsString := '12-145-67';
+ FieldByName('Email').AsString := 'test@testcom';
+ FieldByName('RealNumber').AsString := '-12e';
+ FieldByName('RomanNumber').AsString := 'MCXX1';
+ FieldByName('URL').AsString := 'http:/www.site.com';
+ FieldByName('ZipCode').AsString := '23 45';
+ FieldByName('path').AsString := '\file.exe';
+ post;
+ // mixed
+ Insert;
+ FieldByName('USPhoneNumber').AsString := '101-15-6917';
+ FieldByName('Email').AsString := 'test@test.test.com';
+ FieldByName('RealNumber').AsString := '-12';
+ FieldByName('RomanNumber').AsString := 'IXM';
+ FieldByName('URL').AsString := 'www.site.com';
+ FieldByName('ZipCode').AsString := '0192';
+ FieldByName('path').AsString := 'z:\folder\';
+ post;
+
+ // mixed
+ Insert;
+ FieldByName('USPhoneNumber').AsString := '101.15.6917';
+ FieldByName('Email').AsString := 'test#test.com';
+ FieldByName('RealNumber').AsString := '+1212';
+ FieldByName('RomanNumber').AsString := 'MCIX';
+ FieldByName('URL').AsString := 'http://www.site.com/files/program.zip';
+ FieldByName('ZipCode').AsString := '192911';
+ FieldByName('path').AsString := 'z:\folder\subfolder\program.exe';
+ post;
+
+ end;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ClientArchive.raf b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ClientArchive.raf
new file mode 100644
index 0000000..8cf3638
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ClientArchive.raf differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/DARBService_Impl.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/DARBService_Impl.dfm
new file mode 100644
index 0000000..4475c80
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/DARBService_Impl.dfm
@@ -0,0 +1,460 @@
+object DARBService: TDARBService
+ OldCreateOrder = True
+ OnActivate = DataAbstractServiceActivate
+ OnDeactivate = DataAbstractServiceDeactivate
+ AcquireConnection = True
+ ServiceSchema = DASchema
+ ServiceDataStreamer = BinDataStreamer
+ ExportedDataTables = <>
+ Left = 345
+ Top = 207
+ Height = 300
+ Width = 300
+ object DASchema: TDASchema
+ ConnectionManager = ReportBuilder_ServerMainForm.DAConnectionManager1
+ Datasets = <
+ item
+ Params = <>
+ Statements = <
+ item
+ Connection = 'ADO'
+ TargetTable = 'Customers'
+ SQL =
+ 'SELECT '#13#10' CustomerID, CompanyName, ContactName, ContactTitle,' +
+ ' '#13#10' Address, City, Region, PostalCode, Country, Phone, '#13#10' ' +
+ 'Fax'#13#10' FROM'#13#10' Customers'
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'CustomerID'
+ TableField = 'CustomerID'
+ end
+ item
+ DatasetField = 'CompanyName'
+ TableField = 'CompanyName'
+ end
+ item
+ DatasetField = 'ContactName'
+ TableField = 'ContactName'
+ end
+ item
+ DatasetField = 'ContactTitle'
+ TableField = 'ContactTitle'
+ end
+ item
+ DatasetField = 'Address'
+ TableField = 'Address'
+ end
+ item
+ DatasetField = 'City'
+ TableField = 'City'
+ end
+ item
+ DatasetField = 'Region'
+ TableField = 'Region'
+ end
+ item
+ DatasetField = 'PostalCode'
+ TableField = 'PostalCode'
+ end
+ item
+ DatasetField = 'Country'
+ TableField = 'Country'
+ end
+ item
+ DatasetField = 'Phone'
+ TableField = 'Phone'
+ end
+ item
+ DatasetField = 'Fax'
+ TableField = 'Fax'
+ end>
+ end>
+ Name = 'Customers'
+ Fields = <
+ item
+ Name = 'CustomerID'
+ DataType = datString
+ Size = 5
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CompanyName'
+ DataType = datString
+ Size = 40
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ContactName'
+ DataType = datString
+ Size = 30
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ContactTitle'
+ DataType = datString
+ Size = 30
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Address'
+ DataType = datString
+ Size = 60
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'City'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Region'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'PostalCode'
+ DataType = datString
+ Size = 10
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Country'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Phone'
+ DataType = datString
+ Size = 24
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Fax'
+ DataType = datString
+ Size = 24
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ BusinessRulesClient.ScriptLanguage = rslPascalScript
+ BusinessRulesServer.ScriptLanguage = rslPascalScript
+ end>
+ Commands = <
+ item
+ Params = <
+ item
+ Name = 'CustomerID'
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'CompanyName'
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'ContactName'
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'ContactTitle'
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'Address'
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'City'
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'Region'
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'PostalCode'
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'Country'
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'Phone'
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'Fax'
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end>
+ Statements = <
+ item
+ Connection = 'ADO'
+ TargetTable = 'Customers'
+ SQL =
+ 'INSERT'#13#10' INTO Customers'#13#10' (CustomerID, CompanyName, ContactN' +
+ 'ame, ContactTitle, Address, City, Region, PostalCode, Country, P' +
+ 'hone, Fax)'#13#10' VALUES'#13#10' (:CustomerID, :CompanyName, :ContactNa' +
+ 'me, :ContactTitle, :Address, :City, :Region, :PostalCode, :Count' +
+ 'ry, :Phone, :Fax)'
+ StatementType = stSQL
+ ColumnMappings = <>
+ end>
+ Name = 'Insert_Customers'
+ end
+ item
+ Params = <
+ item
+ Name = 'OLD_CustomerID'
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end>
+ Statements = <
+ item
+ Connection = 'ADO'
+ TargetTable = 'Customers'
+ SQL =
+ 'DELETE '#13#10' FROM'#13#10' Customers'#13#10' WHERE'#13#10' (CustomerID = :OLD_' +
+ 'CustomerID)'
+ StatementType = stSQL
+ ColumnMappings = <>
+ end>
+ Name = 'Delete_Customers'
+ end
+ item
+ Params = <
+ item
+ Name = 'CustomerID'
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'CompanyName'
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'ContactName'
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'ContactTitle'
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'Address'
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'City'
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'Region'
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'PostalCode'
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'Country'
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'Phone'
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'Fax'
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end
+ item
+ Name = 'OLD_CustomerID'
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end>
+ Statements = <
+ item
+ Connection = 'ADO'
+ TargetTable = 'Customers'
+ SQL =
+ 'UPDATE Customers'#13#10' SET '#13#10' CustomerID = :CustomerID, '#13#10' Co' +
+ 'mpanyName = :CompanyName, '#13#10' ContactName = :ContactName, '#13#10' ' +
+ ' ContactTitle = :ContactTitle, '#13#10' Address = :Address, '#13#10' ' +
+ 'City = :City, '#13#10' Region = :Region, '#13#10' PostalCode = :Postal' +
+ 'Code, '#13#10' Country = :Country, '#13#10' Phone = :Phone, '#13#10' Fax ' +
+ '= :Fax'#13#10' WHERE'#13#10' (CustomerID = :OLD_CustomerID)'
+ StatementType = stSQL
+ ColumnMappings = <>
+ end>
+ Name = 'Update_Customers'
+ end>
+ RelationShips = <>
+ UpdateRules = <>
+ Left = 24
+ Top = 6
+ end
+ object ppReport: TppDBPipeline
+ DataSource = dsReport
+ UserName = 'Pipeline'
+ Left = 68
+ Top = 117
+ end
+ object dtReport: TDACDSDataTable
+ RemoteUpdatesOptions = []
+ Fields = <>
+ Params = <>
+ MasterMappingMode = mmDataRequest
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteFetchEnabled = False
+ ReadOnly = False
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ IndexDefs = <>
+ Left = 22
+ Top = 69
+ end
+ object dsReport: TDADataSource
+ DataTable = dtReport
+ Left = 22
+ Top = 117
+ end
+ object Report: TppReport
+ AutoStop = False
+ DataPipeline = ppReport
+ PrinterSetup.BinName = 'Default'
+ PrinterSetup.DocumentName = 'Report'
+ PrinterSetup.PaperName = 'A4 210 x 297 mm'
+ PrinterSetup.PrinterName = 'Default'
+ PrinterSetup.mmMarginBottom = 6350
+ PrinterSetup.mmMarginLeft = 6350
+ PrinterSetup.mmMarginRight = 6350
+ PrinterSetup.mmMarginTop = 6350
+ PrinterSetup.mmPaperHeight = 297000
+ PrinterSetup.mmPaperWidth = 210000
+ PrinterSetup.PaperSize = 9
+ Units = utMillimeters
+ DeviceType = 'ArchiveFile'
+ EmailSettings.ReportFormat = 'PDF'
+ OutlineSettings.CreateNode = True
+ OutlineSettings.CreatePageNodes = True
+ OutlineSettings.Enabled = True
+ OutlineSettings.Visible = True
+ ShowCancelDialog = False
+ ShowPrintDialog = False
+ TextSearchSettings.DefaultString = ''
+ TextSearchSettings.Enabled = True
+ Left = 68
+ Top = 70
+ Version = '10.02'
+ mmColumnWidth = 0
+ DataPipelineName = 'ppReport'
+ object ppHeaderBand1: TppHeaderBand
+ mmBottomOffset = 0
+ mmHeight = 13229
+ mmPrintPosition = 0
+ end
+ object ppDetailBand1: TppDetailBand
+ mmBottomOffset = 0
+ mmHeight = 13229
+ mmPrintPosition = 0
+ end
+ object ppFooterBand1: TppFooterBand
+ mmBottomOffset = 0
+ mmHeight = 13229
+ mmPrintPosition = 0
+ end
+ end
+ object BinDataStreamer: TDABinDataStreamer
+ Left = 85
+ Top = 5
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/DARBService_Impl.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/DARBService_Impl.pas
new file mode 100644
index 0000000..2d7533e
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/DARBService_Impl.pas
@@ -0,0 +1,100 @@
+unit DARBService_Impl;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ This is where you are supposed to code the implementation of your objects. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils,
+ {RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
+ {Ancestor Implementation:} DataAbstractService_Impl,
+ {Used RODLs:} DataAbstract4_Intf,
+ {Generated:} ReportBuilderLibrary_Intf, uDADataStreamer, uDABinAdapter,
+ ppBands, ppCache, ppClass, ppProd, ppReport, DB, uDADataTable,
+ uDAScriptingProvider, uDACDSDataTable, ppComm, ppRelatv, ppDB, ppDBPipe,
+ uDAClasses, uDaInterfaces;
+
+type
+ { TDARBService }
+ TDARBService = class(TDataAbstractService, IDARBService)
+ DASchema: TDASchema;
+ ppReport: TppDBPipeline;
+ dtReport: TDACDSDataTable;
+ dsReport: TDADataSource;
+ Report: TppReport;
+ ppHeaderBand1: TppHeaderBand;
+ ppDetailBand1: TppDetailBand;
+ ppFooterBand1: TppFooterBand;
+ BinDataStreamer: TDABinDataStreamer;
+ procedure DataAbstractServiceActivate(const aClientID: TGUID;
+ aSession: TROSession; const aMessage: IROMessage);
+ procedure DataAbstractServiceDeactivate(const aClientID: TGUID;
+ aSession: TROSession);
+ private
+ fConnection: IDAConnection;
+ protected
+ { IDARBService methods }
+ function DA_GenReport(const ReportName: string; const DatasetName: string): Binary;
+ end;
+
+implementation
+
+{$R *.dfm}
+uses
+ {Generated:} ReportBuilderLibrary_Invk, ReportBuilder_ServerMain;
+
+procedure Create_DARBService(out anInstance: IUnknown);
+begin
+ anInstance := TDARBService.Create(nil);
+end;
+
+{ DARBService }
+
+function TDARBService.DA_GenReport(const ReportName: string; const DatasetName: string): Binary;
+var
+ ds: IDADataset;
+ s: TMemoryStream;
+begin
+ s := TMemoryStream.Create;
+ result := Binary.Create;
+ try
+ Report.DataPipeline := ppReport;
+ Report.Template.FileName := ReportBuilder_ServerMainForm.AppPath + ReportName;
+ Report.Template.LoadFromFile;
+ Report.Template.Load;
+ ds := DASchema.NewDataset(fConnection, DatasetName);
+ BinDataStreamer.WriteDataset(s, ds, [woRows, woSchema], -1);
+ BinDataStreamer.ReadDataset(s, dtReport, TRUE, '', TRUE, TRUE);
+ Report.DeviceType := 'dtArchive';
+ Report.ArchiveFileName := ReportBuilder_ServerMainForm.AppPath + 'ServerArchive.raf';
+ Report.Print;
+ result.LoadFromFile(ReportBuilder_ServerMainForm.AppPath + 'ServerArchive.raf');
+ finally
+ s.Free;
+ end;
+end;
+
+procedure TDARBService.DataAbstractServiceActivate(const aClientID: TGUID;
+ aSession: TROSession; const aMessage: IROMessage);
+begin
+ fConnection := ReportBuilder_ServerMainForm.DAConnectionManager1.NewConnection('ADO', TRUE);
+end;
+
+procedure TDARBService.DataAbstractServiceDeactivate(
+ const aClientID: TGUID; aSession: TROSession);
+begin
+ fConnection := nil;
+end;
+
+initialization
+ TROClassFactory.Create('DARBService', Create_DARBService, TDARBService_Invoker);
+
+finalization
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/RODLFILE.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/RODLFILE.res
new file mode 100644
index 0000000..b23b77d
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/RODLFILE.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/Report1.rtm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/Report1.rtm
new file mode 100644
index 0000000..270bd58
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/Report1.rtm differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilder.Sample.html b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilder.Sample.html
new file mode 100644
index 0000000..dd01eef
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilder.Sample.html
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+ Report Builder Sample
+
+
+
+Purpose
+
+
+ This example shows how to create the report on the server, stream it to the client and then display to the client.
+
+
+To use this sample, you will need to copy the report template file to the server folder.
+
+Examine the Code
+
+
+ See the simple code in DARBService_Impl.pas and ReportBuilder_ClientMain.pas .
+
+
+Note
+
+ This sample requires the installation of Report Builder (www.digital-metaphors.com ).
+
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilder.bdsgroup b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilder.bdsgroup
new file mode 100644
index 0000000..f049f0b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilder.bdsgroup
@@ -0,0 +1,20 @@
+
+
+
+
+ Default.Personality
+
+ 1.0
+ {C3AA235E-2FD1-4417-BDB5-1D840A25D589}
+
+
+
+
+
+ ReportBuilderClient.bdsproj
+ ReportBuilderServer.bdsproj
+ ReportBuilderClient.exe ReportBuilderServer.exe
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilder.bpg b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilder.bpg
new file mode 100644
index 0000000..f11e550
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilder.bpg
@@ -0,0 +1,23 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = ReportBuilderClient.exe ReportBuilderServer.exe
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+ReportBuilderClient.exe: ReportBuilderClient.dpr
+ $(DCC)
+
+ReportBuilderServer.exe: ReportBuilderServer.dpr
+ $(DCC)
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilder.groupproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilder.groupproj
new file mode 100644
index 0000000..e59150b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilder.groupproj
@@ -0,0 +1,40 @@
+
+
+ {edbe07cb-363c-46f5-a6d3-c92276275a6f}
+
+
+
+
+ Default.Personality
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilderClient.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilderClient.bdsproj
new file mode 100644
index 0000000..1a2b7cf
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilderClient.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {1D896A44-CA96-430D-AF80-C4886EBC9491}
+
+
+
+
+ ReportBuilderClient.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilderClient.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilderClient.dpr
new file mode 100644
index 0000000..890e31b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilderClient.dpr
@@ -0,0 +1,14 @@
+program ReportBuilderClient;
+
+uses
+ Forms,
+ ReportBuilder_ClientMain in 'ReportBuilder_ClientMain.pas' {ReportBuilderClientMainForm};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'ReportBuilder Client';
+ Application.CreateForm(TReportBuilderClientMainForm, ReportBuilderClientMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilderClient.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilderClient.dproj
new file mode 100644
index 0000000..fb953dd
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilderClient.dproj
@@ -0,0 +1,72 @@
+
+
+ {39e1b6f4-4674-4588-8f39-e3edce5eaa45}
+ ReportBuilderClient.dpr
+ Debug
+ AnyCPU
+ DCC32
+ ReportBuilderClient.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ ReportBuilderClient.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilderClient.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilderClient.res
new file mode 100644
index 0000000..da01de5
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilderClient.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilderLibrary.rodl b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilderLibrary.rodl
new file mode 100644
index 0000000..73faed0
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilderLibrary.rodl
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilderLibrary_Intf.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilderLibrary_Intf.pas
new file mode 100644
index 0000000..20eb590
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilderLibrary_Intf.pas
@@ -0,0 +1,97 @@
+unit ReportBuilderLibrary_Intf;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROClasses, uROClient, uROTypes, uROClientIntf,
+ {Used RODLs:} DataAbstract4_Intf;
+
+const
+ { Library ID }
+ LibraryUID = '{AF63BD44-BEA9-4B7A-853F-3792A67A751B}';
+
+ { Service Interface ID's }
+ IDARBService_IID : TGUID = '{373D25E9-7848-4554-8AE7-7703C081E853}';
+
+ { Event ID's }
+
+type
+ { Forward declarations }
+ IDARBService = interface;
+
+
+
+
+ { IDARBService }
+ IDARBService = interface(IDataAbstractService)
+ ['{373D25E9-7848-4554-8AE7-7703C081E853}']
+ function DA_GenReport(const ReportName: String; const DatasetName: String): Binary;
+ end;
+
+ { CoDARBService }
+ CoDARBService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IDARBService;
+ end;
+
+ { TDARBService_Proxy }
+ TDARBService_Proxy = class(TDataAbstractService_Proxy, IDARBService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ function DA_GenReport(const ReportName: String; const DatasetName: String): Binary;
+ end;
+
+implementation
+
+uses
+ {vcl:} SysUtils,
+ {RemObjects:} uROEventRepository, uRORes;
+
+{ CoDARBService }
+
+class function CoDARBService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IDARBService;
+begin
+ result := TDARBService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TDARBService_Proxy }
+
+function TDARBService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'DARBService';
+end;
+
+function TDARBService_Proxy.DA_GenReport(const ReportName: String; const DatasetName: String): Binary;
+begin
+ try
+ result := nil;
+ __Message.InitializeRequestMessage(__TransportChannel, 'ReportBuilderLibrary', __InterfaceName, 'DA_GenReport');
+ __Message.Write('ReportName', TypeInfo(String), ReportName, []);
+ __Message.Write('DatasetName', TypeInfo(String), DatasetName, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Binary), result, []);
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+initialization
+ RegisterProxyClass(IDARBService_IID, TDARBService_Proxy);
+
+
+finalization
+ UnregisterProxyClass(IDARBService_IID);
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilderLibrary_Invk.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilderLibrary_Invk.pas
new file mode 100644
index 0000000..29131eb
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilderLibrary_Invk.pas
@@ -0,0 +1,64 @@
+unit ReportBuilderLibrary_Invk;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes,
+ {RemObjects:} uROServer, uROServerIntf, uROTypes, uROClientIntf,
+ {Used RODL Intf's:} DataAbstract4_Intf,
+ {Used RODL Invk's:} DataAbstract4_Invk,
+ {Generated:} ReportBuilderLibrary_Intf;
+
+type
+ TDARBService_Invoker = class(TDataAbstractService_Invoker)
+ private
+ protected
+ published
+ procedure Invoke_DA_GenReport(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ end;
+
+implementation
+
+uses
+ {RemObjects:} uRORes, uROClient;
+
+{ TDARBService_Invoker }
+
+procedure TDARBService_Invoker.Invoke_DA_GenReport(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function DA_GenReport(const ReportName: String; const DatasetName: String): Binary; }
+var
+ ReportName: String;
+ DatasetName: String;
+ lResult: Binary;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ lResult := nil;
+ try
+ __Message.Read('ReportName', TypeInfo(String), ReportName, []);
+ __Message.Read('DatasetName', TypeInfo(String), DatasetName, []);
+
+ lResult := (__Instance as IDARBService).DA_GenReport(ReportName, DatasetName);
+
+ __Message.InitializeResponseMessage(__Transport, 'ReportBuilderLibrary', 'DARBService', 'DA_GenReportResponse');
+ __Message.Write('Result', TypeInfo(Binary), lResult, []);
+ __Message.Finalize;
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(lResult);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilderServer.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilderServer.bdsproj
new file mode 100644
index 0000000..2eb51ac
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilderServer.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {D355A7D7-168F-4CF8-AF89-6248B998AE37}
+
+
+
+
+ ReportBuilderServer.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilderServer.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilderServer.dpr
new file mode 100644
index 0000000..80bdae4
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilderServer.dpr
@@ -0,0 +1,21 @@
+program ReportBuilderServer;
+
+{#ROGEN:ReportBuilderLibrary.rodl} // RemObjects: Careful, do not remove!
+
+uses
+ uROCOMInit,
+ Forms,
+ ReportBuilderLibrary_Intf in 'ReportBuilderLibrary_Intf.pas',
+ ReportBuilderLibrary_Invk in 'ReportBuilderLibrary_Invk.pas',
+ DARBService_Impl in 'DARBService_Impl.pas' {DARBService: TDataAbstractService},
+ ReportBuilder_ServerMain in 'ReportBuilder_ServerMain.pas' {ReportBuilder_ServerMainForm};
+
+{$R *.RES}
+{$R RODLFile.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'ReportBuilder Server';
+ Application.CreateForm(TReportBuilder_ServerMainForm, ReportBuilder_ServerMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilderServer.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilderServer.dproj
new file mode 100644
index 0000000..a0fc579
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilderServer.dproj
@@ -0,0 +1,77 @@
+
+
+ {c3bd883e-cf1f-451a-a2c0-b0a16351f9af}
+ ReportBuilderServer.dpr
+ Debug
+ AnyCPU
+ DCC32
+ ReportBuilderServer.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ ReportBuilderServer.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilderServer.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilderServer.res
new file mode 100644
index 0000000..7455d6e
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilderServer.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilder_ClientMain.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilder_ClientMain.dfm
new file mode 100644
index 0000000..d6959e8
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilder_ClientMain.dfm
@@ -0,0 +1,525 @@
+object ReportBuilderClientMainForm: TReportBuilderClientMainForm
+ Left = 457
+ Top = 208
+ AutoScroll = False
+ Caption = 'ReportBuilder Client'
+ ClientHeight = 242
+ ClientWidth = 571
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Label1: TLabel
+ Left = 232
+ Top = 13
+ Width = 58
+ Height = 13
+ Caption = 'Reportname'
+ end
+ object Grid: TDBGrid
+ Left = 0
+ Top = 42
+ Width = 571
+ Height = 200
+ Align = alBottom
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ DataSource = dsCustomers
+ TabOrder = 3
+ TitleFont.Charset = DEFAULT_CHARSET
+ TitleFont.Color = clWindowText
+ TitleFont.Height = -11
+ TitleFont.Name = 'MS Sans Serif'
+ TitleFont.Style = []
+ end
+ object OpenButton: TButton
+ Left = 8
+ Top = 8
+ Width = 121
+ Height = 25
+ Caption = 'Close/Open Customers'
+ TabOrder = 1
+ OnClick = OpenButtonClick
+ end
+ object ReportButton: TButton
+ Left = 152
+ Top = 8
+ Width = 75
+ Height = 25
+ Caption = 'GenReport'
+ TabOrder = 2
+ OnClick = ReportButtonClick
+ end
+ object edtRN: TEdit
+ Left = 304
+ Top = 8
+ Width = 121
+ Height = 21
+ TabOrder = 0
+ Text = 'Report1.rtm'
+ end
+ object BINMessage: TROBinMessage
+ UseCompression = False
+ Left = 128
+ Top = 72
+ end
+ object WinInetHTTPChannel: TROWinInetHTTPChannel
+ ServerLocators = <>
+ DispatchOptions = []
+ UserAgent = 'RemObjects SDK'
+ TargetURL = 'http://localhost:8099/bin'
+ Left = 160
+ Top = 72
+ end
+ object RemoteService: TRORemoteService
+ Message = BINMessage
+ Channel = WinInetHTTPChannel
+ ServiceName = 'DARBService'
+ Left = 193
+ Top = 72
+ end
+ object dtCustomers: TDACDSDataTable
+ RemoteUpdatesOptions = []
+ Fields = <
+ item
+ Name = 'CustomerID'
+ DataType = datString
+ Size = 5
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CompanyName'
+ DataType = datString
+ Size = 40
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ContactName'
+ DataType = datString
+ Size = 30
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ContactTitle'
+ DataType = datString
+ Size = 30
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Address'
+ DataType = datString
+ Size = 60
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'City'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Region'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'PostalCode'
+ DataType = datString
+ Size = 10
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Country'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Phone'
+ DataType = datString
+ Size = 24
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Fax'
+ DataType = datString
+ Size = 24
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ Params = <>
+ MasterMappingMode = mmDataRequest
+ StreamingOptions = [soIgnoreStreamSchema, soDisableEventsWhileStreaming]
+ RemoteDataAdapter = RemoteDataAdapter
+ ReadOnly = False
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ LogicalName = 'Customers'
+ IndexDefs = <>
+ Left = 254
+ Top = 72
+ end
+ object dsCustomers: TDADataSource
+ DataTable = dtCustomers
+ Left = 288
+ Top = 72
+ end
+ object ArchiveReader: TppArchiveReader
+ AllowPrintToFile = True
+ DeviceType = 'Screen'
+ EmailSettings.ReportFormat = 'PDF'
+ PreviewFormSettings.WindowState = wsMaximized
+ PreviewFormSettings.ZoomSetting = zsPageWidth
+ SuppressOutline = False
+ TextSearchSettings.DefaultString = ''
+ TextSearchSettings.Enabled = True
+ Left = 320
+ Top = 72
+ Version = '10.02'
+ end
+ object Report: TppReport
+ AutoStop = False
+ DataPipeline = ppReport
+ PrinterSetup.BinName = 'Default'
+ PrinterSetup.DocumentName = 'Report'
+ PrinterSetup.PaperName = 'A4 210 x 297 mm'
+ PrinterSetup.PrinterName = 'Default'
+ PrinterSetup.mmMarginBottom = 6350
+ PrinterSetup.mmMarginLeft = 6350
+ PrinterSetup.mmMarginRight = 6350
+ PrinterSetup.mmMarginTop = 6350
+ PrinterSetup.mmPaperHeight = 297000
+ PrinterSetup.mmPaperWidth = 210000
+ PrinterSetup.PaperSize = 9
+ Units = utMillimeters
+ DeviceType = 'ArchiveFile'
+ EmailSettings.ReportFormat = 'PDF'
+ OutlineSettings.CreateNode = True
+ OutlineSettings.CreatePageNodes = True
+ OutlineSettings.Enabled = True
+ OutlineSettings.Visible = True
+ ShowCancelDialog = False
+ ShowPrintDialog = False
+ TextSearchSettings.DefaultString = ''
+ TextSearchSettings.Enabled = True
+ Left = 320
+ Top = 127
+ Version = '10.02'
+ mmColumnWidth = 0
+ DataPipelineName = 'ppReport'
+ object ppHeaderBand1: TppHeaderBand
+ mmBottomOffset = 0
+ mmHeight = 13229
+ mmPrintPosition = 0
+ end
+ object ppDetailBand1: TppDetailBand
+ mmBottomOffset = 0
+ mmHeight = 13229
+ mmPrintPosition = 0
+ end
+ object ppFooterBand1: TppFooterBand
+ mmBottomOffset = 0
+ mmHeight = 13229
+ mmPrintPosition = 0
+ end
+ end
+ object ppReport: TppDBPipeline
+ DataSource = dsReport
+ UserName = 'Pipeline'
+ Left = 352
+ Top = 127
+ end
+ object dtReport: TDACDSDataTable
+ RemoteUpdatesOptions = []
+ Fields = <
+ item
+ Name = 'CustomerID'
+ DataType = datString
+ Size = 5
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CompanyName'
+ DataType = datString
+ Size = 40
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ContactName'
+ DataType = datString
+ Size = 30
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ContactTitle'
+ DataType = datString
+ Size = 30
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Address'
+ DataType = datString
+ Size = 60
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'City'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Region'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'PostalCode'
+ DataType = datString
+ Size = 10
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Country'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Phone'
+ DataType = datString
+ Size = 24
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Fax'
+ DataType = datString
+ Size = 24
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ Params = <>
+ MasterMappingMode = mmDataRequest
+ StreamingOptions = [soIgnoreStreamSchema, soDisableEventsWhileStreaming]
+ RemoteDataAdapter = RemoteDataAdapter
+ ReadOnly = False
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ LogicalName = 'Customers'
+ IndexDefs = <>
+ Left = 256
+ Top = 127
+ end
+ object dsReport: TDADataSource
+ DataTable = dtReport
+ Left = 288
+ Top = 128
+ end
+ object RemoteDataAdapter: TDARemoteDataAdapter
+ GetSchemaCall.RemoteService = RemoteService
+ GetSchemaCall.MethodName = 'GetSchema'
+ GetSchemaCall.Params = <
+ item
+ Name = 'aFilter'
+ DataType = rtString
+ Flag = fIn
+ end
+ item
+ Name = 'Result'
+ DataType = rtString
+ Flag = fResult
+ end>
+ GetSchemaCall.Default = False
+ GetSchemaCall.IncomingSchemaParameter = 'Result'
+ GetSchemaCall.OutgoingFilterParameter = 'aFilter'
+ GetDataCall.RemoteService = RemoteService
+ GetDataCall.MethodName = 'GetData'
+ GetDataCall.Params = <
+ item
+ Name = 'aTableNameArray'
+ DataType = rtUserDefined
+ Flag = fIn
+ TypeName = 'StringArray'
+ end
+ item
+ Name = 'aTableRequestInfoArray'
+ DataType = rtUserDefined
+ Flag = fIn
+ TypeName = 'TableRequestInfoArray'
+ end
+ item
+ Name = 'Result'
+ DataType = rtBinary
+ Flag = fResult
+ end>
+ GetDataCall.Default = False
+ GetDataCall.OutgoingTableNamesParameter = 'aTableNameArray'
+ GetDataCall.OutgoingTableRequestInfosParameter = 'aTableRequestInfoArray'
+ GetDataCall.IncomingDataParameter = 'Result'
+ UpdateDataCall.RemoteService = RemoteService
+ UpdateDataCall.MethodName = 'UpdateData'
+ UpdateDataCall.Params = <
+ item
+ Name = 'aDelta'
+ DataType = rtBinary
+ Flag = fIn
+ end
+ item
+ Name = 'Result'
+ DataType = rtBinary
+ Flag = fResult
+ end>
+ UpdateDataCall.Default = False
+ UpdateDataCall.OutgoingDeltaParameter = 'aDelta'
+ UpdateDataCall.IncomingDeltaParameter = 'Result'
+ GetScriptsCall.RemoteService = RemoteService
+ GetScriptsCall.Params = <>
+ GetScriptsCall.Default = False
+ RemoteService = RemoteService
+ DataStreamer = DataStreamer
+ Left = 422
+ Top = 68
+ end
+ object DataStreamer: TDABinDataStreamer
+ Left = 488
+ Top = 68
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilder_ClientMain.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilder_ClientMain.pas
new file mode 100644
index 0000000..d7c27c7
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilder_ClientMain.pas
@@ -0,0 +1,90 @@
+unit ReportBuilder_ClientMain;
+
+interface
+
+{
+ IF YOU GET
+
+ [Fatal Error] uClientForm.pas(17): File not found: 'ppModule.dcu'
+
+ HERE: This sample requires ReportBuilder to be installed on your system.
+}
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, uDADataTable, uDACDSDataTable, uDABINAdapter, uRORemoteService,
+ uROWinInetHttpChannel, uROClient,
+ uROBINMessage, DB, Grids, DBGrids, StdCtrls, ppModule,
+ ppCtrls, ppVar, ppPrnabl, ppClass, ppBands, ppCache, ppDB, ppDBPipe,
+ ppComm, ppRelatv, ppProd, ppReport, ppArchiv, uROTypes,
+ ppParameter, uDAScriptingProvider,
+ uDARemoteDataAdapter, uDADataStreamer, ReportBuilderLibrary_Intf;
+
+type
+ TReportBuilderClientMainForm = class(TForm)
+ BINMessage: TROBINMessage;
+ WinInetHTTPChannel: TROWinInetHTTPChannel;
+ RemoteService: TRORemoteService;
+ dtCustomers: TDACDSDataTable;
+ dsCustomers: TDADataSource;
+ Grid: TDBGrid;
+ OpenButton: TButton;
+ ReportButton: TButton;
+ ArchiveReader: TppArchiveReader;
+ Report: TppReport;
+ ppReport: TppDBPipeline;
+ dtReport: TDACDSDataTable;
+ dsReport: TDADataSource;
+ edtRN: TEdit;
+ Label1: TLabel;
+ ppHeaderBand1: TppHeaderBand;
+ ppDetailBand1: TppDetailBand;
+ ppFooterBand1: TppFooterBand;
+ RemoteDataAdapter: TDARemoteDataAdapter;
+ DataStreamer: TDABinDataStreamer;
+ procedure OpenButtonClick(Sender: TObject);
+ procedure ReportButtonClick(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ private
+ { Private-Deklarationen }
+ FService: IDARBService;
+ public
+ { Public-Deklarationen }
+ end;
+
+var
+ ReportBuilderClientMainForm: TReportBuilderClientMainForm;
+
+implementation
+
+{$R *.dfm}
+
+procedure TReportBuilderClientMainForm.OpenButtonClick(Sender: TObject);
+begin
+ dtCustomers.active := not dtCustomers.active;
+end;
+
+procedure TReportBuilderClientMainForm.ReportButtonClick(Sender: TObject);
+var
+ rb: TMemoryStream;
+begin
+ rb := FService.DA_GenReport(edtRN.Text, 'Customers');
+ if rb = nil then exit;
+ try
+ rb.SaveToFile(ExtractFilePath(Application.ExeName) + 'ClientArchive.raf');
+ finally
+ rb.Free;
+ end;
+ ArchiveReader.ArchiveFileName := (ExtractFilePath(Application.ExeName) + 'ClientArchive.raf');
+ ArchiveReader.DeviceType := 'dtScreen';
+ ArchiveReader.Print;
+ ArchiveReader.ArchiveFileName := ''; //To unlock ClientArchive.raf file
+end;
+
+procedure TReportBuilderClientMainForm.FormCreate(Sender: TObject);
+begin
+ FService := (RemoteService as IDARBService);
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilder_ServerMain.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilder_ServerMain.dfm
new file mode 100644
index 0000000..f2aee04
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilder_ServerMain.dfm
@@ -0,0 +1,73 @@
+object ReportBuilder_ServerMainForm: TReportBuilder_ServerMainForm
+ Left = 115
+ Top = 134
+ Width = 235
+ Height = 100
+ Caption = 'ReportBuilder Server'
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Form1'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ PixelsPerInch = 96
+ TextHeight = 14
+ object RoPoweredByRemObjectsButton1: TROPoweredByRemObjectsButton
+ Left = 8
+ Top = 8
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ end
+ object ROMessage: TROBinMessage
+ Left = 56
+ Top = 16
+ end
+ object ROServer: TROIndyHTTPServer
+ Active = True
+ Dispatchers = <
+ item
+ Name = 'ROMessage'
+ Message = ROMessage
+ Enabled = True
+ PathInfo = 'BIN'
+ end>
+ Port = 8099
+ Left = 88
+ Top = 16
+ end
+ object DADriverManager1: TDADriverManager
+ DriverDirectory = '%SYSTEM%\'
+ AutoLoad = False
+ TraceActive = False
+ TraceFlags = []
+ Left = 120
+ Top = 16
+ end
+ object DAConnectionManager1: TDAConnectionManager
+ MaxPoolSize = 10
+ PoolTimeoutSeconds = 60
+ PoolBehaviour = pbWait
+ WaitIntervalSeconds = 1
+ Connections = <
+ item
+ Name = 'ADO'
+ ConnectionString =
+ 'ADO?AuxDriver=SQLOLEDB.1;Server=localhost;Database=Northwind;Use' +
+ 'rID=sa;Password=;'
+ Default = True
+ Tag = 0
+ end>
+ DriverManager = DADriverManager1
+ PoolingEnabled = True
+ Left = 152
+ Top = 16
+ end
+ object DAADODriver1: TDAADODriver
+ Left = 184
+ Top = 16
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilder_ServerMain.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilder_ServerMain.pas
new file mode 100644
index 0000000..dc7ded5
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ReportBuilder_ServerMain.pas
@@ -0,0 +1,42 @@
+unit ReportBuilder_ServerMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ StdCtrls, uROClient, uROBINMessage, uROClientIntf, uROServer, uROIndyHTTPServer,
+ uROIndyTCPServer, uROPoweredByRemObjectsButton,
+ uDAEngine, uDAADODriver, uDAClasses, uDADriverManager;
+
+type
+ TReportBuilder_ServerMainForm = class(TForm)
+ ROMessage: TROBINMessage;
+ ROServer: TROIndyHTTPServer;
+ DADriverManager1: TDADriverManager;
+ DAConnectionManager1: TDAConnectionManager;
+ DAADODriver1: TDAADODriver;
+ RoPoweredByRemObjectsButton1: TRoPoweredByRemObjectsButton;
+ procedure FormCreate(Sender: TObject);
+ private
+ fAppPath: string;
+ public
+ property AppPath: string read fAppPath write fAppPath;
+ end;
+
+var
+ ReportBuilder_ServerMainForm: TReportBuilder_ServerMainForm;
+
+implementation
+
+uses DARBService_Impl;
+
+
+{$R *.dfm}
+
+procedure TReportBuilder_ServerMainForm.FormCreate(Sender: TObject);
+begin
+ fAppPath := ExtractFilePath(Application.ExeName);
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ServerArchive.raf b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ServerArchive.raf
new file mode 100644
index 0000000..8cf3638
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Report Builder/ServerArchive.raf differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/SQL Access/SQLAccess.Sample.html b/official/5.0.30.691/Data Abstract for Delphi/Samples/SQL Access/SQLAccess.Sample.html
new file mode 100644
index 0000000..18a0ad9
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/SQL Access/SQLAccess.Sample.html
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+ SQL Access Sample
+
+
+
+Purpose
+
+
+This example treats two different SQL queries as if they are the same one.
+One takes data from the SHIPPERS table and the other from the CUSTOMERS table. The field mappings used when building the where clause isolate the developer from the SQL details and so allow the building of fairly complex where clauses without the need to do string concatenations in code.
+This sample also illustrates the use of various macro processors (TDAMSSQLMacroProcessor, TDAIBMacroProcessor, TDAOracleMacroProcessor, TDADBISAMMacroProcessor).
+
+
+Examine the Code
+
+
+ See the two SQL statements associated with the Customers dataset for the two connections for more details..
+
+
+Note
+
+
+IMPORTANT: Keep in mind that the dataset's SQL property will always contain the statement you define and the dynamic WHERE clause only gets merged into it when opening the dataset.
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/SQL Access/SQLAccess.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/SQL Access/SQLAccess.bdsproj
new file mode 100644
index 0000000..12aa3e0
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/SQL Access/SQLAccess.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {25637467-4C9A-4328-AB1E-7FCB56027FEB}
+
+
+
+
+ SQLAccess.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/SQL Access/SQLAccess.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/SQL Access/SQLAccess.dpr
new file mode 100644
index 0000000..81c2c0c
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/SQL Access/SQLAccess.dpr
@@ -0,0 +1,14 @@
+program SQLAccess;
+
+uses
+ Forms,
+ SQLAccessMain in 'SQLAccessMain.pas' {SQLAccessMainForm};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'SQL Access';
+ Application.CreateForm(TSQLAccessMainForm, SQLAccessMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/SQL Access/SQLAccess.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/SQL Access/SQLAccess.dproj
new file mode 100644
index 0000000..baebb80
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/SQL Access/SQLAccess.dproj
@@ -0,0 +1,72 @@
+
+
+ {f72ad2e5-c6f5-43f9-9fd6-9c34a1ccae26}
+ SQLAccess.dpr
+ Debug
+ AnyCPU
+ DCC32
+ SQLAccess.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ SQLAccess.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/SQL Access/SQLAccess.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/SQL Access/SQLAccess.res
new file mode 100644
index 0000000..b946fbb
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/SQL Access/SQLAccess.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/SQL Access/SQLAccessMain.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/SQL Access/SQLAccessMain.dfm
new file mode 100644
index 0000000..894d7c9
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/SQL Access/SQLAccessMain.dfm
@@ -0,0 +1,558 @@
+object SQLAccessMainForm: TSQLAccessMainForm
+ Left = 319
+ Top = 116
+ AutoScroll = False
+ BorderWidth = 5
+ Caption = 'SQL Access'
+ ClientHeight = 444
+ ClientWidth = 576
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ PixelsPerInch = 96
+ TextHeight = 13
+ object PageControl1: TPageControl
+ Left = 0
+ Top = 0
+ Width = 576
+ Height = 444
+ ActivePage = TabSheet1
+ Align = alClient
+ TabIndex = 0
+ TabOrder = 0
+ object TabSheet1: TTabSheet
+ BorderWidth = 5
+ Caption = 'Where'
+ object Label1: TLabel
+ Left = 0
+ Top = 76
+ Width = 34
+ Height = 13
+ Caption = 'ID Like'
+ end
+ object Label2: TLabel
+ Left = 0
+ Top = 100
+ Width = 143
+ Height = 13
+ Caption = 'CompanyName Different Than'
+ end
+ object Label3: TLabel
+ Left = 0
+ Top = 124
+ Width = 114
+ Height = 13
+ Caption = 'PhoneNumber Equal To'
+ end
+ object Label4: TLabel
+ Left = 0
+ Top = 148
+ Width = 44
+ Height = 13
+ Caption = 'Order By:'
+ end
+ object ExecuteButton: TButton
+ Left = 410
+ Top = 143
+ Width = 113
+ Height = 22
+ Caption = 'E&xecute'
+ TabOrder = 5
+ OnClick = ExecuteButtonClick
+ end
+ object Memo: TMemo
+ Left = 0
+ Top = 199
+ Width = 558
+ Height = 207
+ Align = alBottom
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ Font.Charset = ANSI_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Courier New'
+ Font.Style = []
+ ParentFont = False
+ TabOrder = 6
+ end
+ object rgConnections: TRadioGroup
+ Left = 0
+ Top = 0
+ Width = 558
+ Height = 65
+ Align = alTop
+ Caption = 'Connection'
+ TabOrder = 0
+ end
+ object eID: TEdit
+ Left = 152
+ Top = 72
+ Width = 255
+ Height = 21
+ TabOrder = 1
+ Text = 'A%'
+ end
+ object eCompanyName: TEdit
+ Left = 152
+ Top = 96
+ Width = 255
+ Height = 21
+ TabOrder = 2
+ Text = 'Noname'
+ end
+ object ePhoneNumber: TEdit
+ Left = 152
+ Top = 120
+ Width = 255
+ Height = 21
+ TabOrder = 3
+ Text = '13456789'
+ end
+ object cbOrderBy: TComboBox
+ Left = 152
+ Top = 144
+ Width = 255
+ Height = 21
+ ItemHeight = 13
+ TabOrder = 4
+ end
+ end
+ object TabSheet2: TTabSheet
+ BorderWidth = 5
+ Caption = 'Macros'
+ ImageIndex = 1
+ object ProcessSQLButton: TButton
+ Left = 325
+ Top = 6
+ Width = 75
+ Height = 22
+ Caption = 'ProcessSQL'
+ TabOrder = 1
+ OnClick = ProcessSQLButtonClick
+ end
+ object Memo1: TMemo
+ Left = 0
+ Top = 74
+ Width = 558
+ Height = 141
+ Align = alBottom
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ Lines.Strings = (
+ 'SELECT * FROM Orders WHERE OrderDate>{DateTime()}'
+ 'SELECT * FROM Orders WHERE OrderDate>{Date()}'
+ 'SELECT * FROM Orders WHERE OrderDate>{AddTime(Date(), 2, day)}'
+
+ 'SELECT * FROM Orders WHERE OrderDate>{FormatDateTime('#39'12/22/2003' +
+ ' 22:10:22.123'#39')}'
+ 'SELECT * FROM Orders WHERE OrderDate>{FormatDate('#39'12/22/2003'#39')}'
+ 'SELECT {Length(CustomerID)} FROM Orders'
+ 'SELECT {TrimLeft(CustomerID)} FROM Orders'
+ 'SELECT {TrimRight(CustomerID)} FROM Orders'
+ 'SELECT {UpperCase(CustomerID)} FROM Orders'
+ 'SELECT {Copy(CustomerID, 2, 3)} FROM Orders')
+ TabOrder = 2
+ end
+ object Memo2: TMemo
+ Left = 0
+ Top = 219
+ Width = 558
+ Height = 187
+ Align = alBottom
+ TabOrder = 4
+ end
+ object rgProcessors: TRadioGroup
+ Left = 0
+ Top = 0
+ Width = 322
+ Height = 71
+ Caption = 'Processor'
+ Columns = 2
+ ItemIndex = 0
+ Items.Strings = (
+ 'TMSSQLMacroProcessor'
+ 'TIBMacroProcessor'
+ 'TOracleMacroProcessor'
+ 'TDBISAMMacroProcessor')
+ TabOrder = 0
+ end
+ object Panel1: TPanel
+ Left = 0
+ Top = 215
+ Width = 558
+ Height = 4
+ Align = alBottom
+ BevelOuter = bvNone
+ TabOrder = 3
+ end
+ end
+ end
+ object DriverManager: TDADriverManager
+ DriverDirectory = '%SYSTEM%\'
+ TraceActive = False
+ TraceFlags = []
+ Left = 24
+ Top = 216
+ end
+ object DAADODriver: TDAADODriver
+ Left = 54
+ Top = 216
+ end
+ object DAConnectionManager: TDAConnectionManager
+ Connections = <
+ item
+ Name = 'NorthwindCustomers'
+ ConnectionString =
+ 'ADO?Server=localhost;AuxDriver=SQLOLEDB.1;UserID=sa;Database=Nor' +
+ 'thwind;password='
+ Description = 'Query that point to the Customers table'
+ Default = True
+ Tag = 0
+ end
+ item
+ Name = 'NorthwindShippers'
+ ConnectionString =
+ 'ADO?Server=localhost;AuxDriver=SQLOLEDB.1;UserID=sa;Database=Nor' +
+ 'thwind;password='
+ Description = 'Query that point to the Shippers table'
+ Default = False
+ Tag = 0
+ end>
+ DriverManager = DriverManager
+ PoolingEnabled = False
+ Left = 88
+ Top = 216
+ end
+ object DASchema: TDASchema
+ ConnectionManager = DAConnectionManager
+ Datasets = <
+ item
+ Params = <>
+ Statements = <
+ item
+ Connection = 'NorthwindCustomers'
+ TargetTable = 'Customers'
+ SQL = 'SELECT CustomerID,CompanyName,Phone FROM Customers'
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'ID'
+ TableField = 'CustomerID'
+ end
+ item
+ DatasetField = 'CompanyName'
+ TableField = 'CompanyName'
+ end
+ item
+ DatasetField = 'PhoneNumber'
+ TableField = 'Phone'
+ end>
+ end
+ item
+ Connection = 'NorthwindShippers'
+ TargetTable = 'Shippers'
+ SQL = 'SELECT ShipperID, CompanyName, Phone FROM Shippers'
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'ID'
+ TableField = 'ShipperID'
+ end
+ item
+ DatasetField = 'CompanyName'
+ TableField = 'CompanyName'
+ end
+ item
+ DatasetField = 'PhoneNumber'
+ TableField = 'Phone'
+ end>
+ end>
+ Name = 'Customers'
+ Fields = <
+ item
+ Name = 'ID'
+ DataType = datString
+ Size = 5
+ BlobType = dabtUnknown
+ Required = True
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CompanyName'
+ DataType = datString
+ Size = 40
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'PhoneNumber'
+ DataType = datString
+ Size = 24
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ BusinessRulesClient.ScriptLanguage = rslPascalScript
+ BusinessRulesServer.ScriptLanguage = rslPascalScript
+ end
+ item
+ Params = <>
+ Statements = <
+ item
+ Connection = 'NorthwindShippers'
+ TargetTable = 'Orders'
+ SQL =
+ 'SELECT OrderID, CustomerID, EmployeeID, OrderDate, RequiredDate,' +
+ #10' ShippedDate, ShipVia, Freight, ShipName, ShipAddress,'#10' ShipCit' +
+ 'y, ShipRegion, ShipPostalCode, ShipCountry'#10' FROM Orders'
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'OrderID'
+ TableField = 'OrderID'
+ end
+ item
+ DatasetField = 'CustomerID'
+ TableField = 'CustomerID'
+ end
+ item
+ DatasetField = 'EmployeeID'
+ TableField = 'EmployeeID'
+ end
+ item
+ DatasetField = 'OrderDate'
+ TableField = 'OrderDate'
+ end
+ item
+ DatasetField = 'RequiredDate'
+ TableField = 'RequiredDate'
+ end
+ item
+ DatasetField = 'ShippedDate'
+ TableField = 'ShippedDate'
+ end
+ item
+ DatasetField = 'ShipVia'
+ TableField = 'ShipVia'
+ end
+ item
+ DatasetField = 'Freight'
+ TableField = 'Freight'
+ end
+ item
+ DatasetField = 'ShipName'
+ TableField = 'ShipName'
+ end
+ item
+ DatasetField = 'ShipAddress'
+ TableField = 'ShipAddress'
+ end
+ item
+ DatasetField = 'ShipCity'
+ TableField = 'ShipCity'
+ end
+ item
+ DatasetField = 'ShipRegion'
+ TableField = 'ShipRegion'
+ end
+ item
+ DatasetField = 'ShipPostalCode'
+ TableField = 'ShipPostalCode'
+ end
+ item
+ DatasetField = 'ShipCountry'
+ TableField = 'ShipCountry'
+ end>
+ end>
+ Name = 'Orders'
+ Fields = <
+ item
+ Name = 'OrderID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CustomerID'
+ DataType = datString
+ Size = 5
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'EmployeeID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'OrderDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'RequiredDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShippedDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipVia'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Freight'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipName'
+ DataType = datString
+ Size = 40
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipAddress'
+ DataType = datString
+ Size = 60
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipCity'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipRegion'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipPostalCode'
+ DataType = datString
+ Size = 10
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipCountry'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ BusinessRulesClient.ScriptLanguage = rslPascalScript
+ BusinessRulesServer.ScriptLanguage = rslPascalScript
+ end>
+ Commands = <>
+ RelationShips = <>
+ UpdateRules = <>
+ Left = 24
+ Top = 248
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/SQL Access/SQLAccessMain.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/SQL Access/SQLAccessMain.pas
new file mode 100644
index 0000000..df4b8e4
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/SQL Access/SQLAccessMain.pas
@@ -0,0 +1,169 @@
+unit SQLAccessMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, uDADriverManager, uDAEngine, uDAADODriver, uDAClasses, StdCtrls,
+ DB, uDADataTable, uDACDSDataTable, uDAADODataTable, ExtCtrls,
+ ComCtrls, uDAScriptingProvider;
+
+type
+ TSQLAccessMainForm = class(TForm)
+ DriverManager: TDADriverManager;
+ DAADODriver: TDAADODriver;
+ PageControl1: TPageControl;
+ TabSheet1: TTabSheet;
+ TabSheet2: TTabSheet;
+ Label1: TLabel;
+ Label2: TLabel;
+ Label3: TLabel;
+ ExecuteButton: TButton;
+ Memo: TMemo;
+ rgConnections: TRadioGroup;
+ eID: TEdit;
+ eCompanyName: TEdit;
+ ePhoneNumber: TEdit;
+ ProcessSQLButton: TButton;
+ Memo1: TMemo;
+ Memo2: TMemo;
+ rgProcessors: TRadioGroup;
+ cbOrderBy: TComboBox;
+ Label4: TLabel;
+ DAConnectionManager: TDAConnectionManager;
+ Panel1: TPanel;
+ DASchema: TDASchema;
+ procedure ExecuteButtonClick(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ procedure ProcessSQLButtonClick(Sender: TObject);
+
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ SQLAccessMainForm: TSQLAccessMainForm;
+
+implementation
+
+uses uDAInterfaces, uDAMacroProcessors, uDAMacros;
+
+{$R *.dfm}
+
+procedure TSQLAccessMainForm.ExecuteButtonClick(Sender: TObject);
+var
+ connname: string;
+ conn: IDAConnection;
+ ds: IDADataset;
+ i: integer;
+ orderby: integer;
+begin
+ { In this example we are treating two different SQL queries like they were the same one.
+ One takes data from the SHIPPERS table when the other from the CUSTOMERS one. The field mappings
+ that are used when building the where clause isolate the developer from the SQL details and allow
+ you to build fairly complex where clauses without the need to do string concatenations in code.
+
+ Examine the two sql statements associated with the Customers dataset for the two connections for
+ more details. The code below transparently works for both.
+
+ IMPORTANT: Keep in mind the SQL property of a dataset will always and only reflect the statement you define
+ in the statement and the dynamic WHERE clause will only be merged to it when opening the dataset.
+ }
+
+ Memo.Lines.Add('---------------');
+ Memo.Lines.Add('');
+ try
+ connname := Trim(Copy(rgConnections.Items[rgConnections.ItemIndex], 1, Pos('-', rgConnections.Items[rgConnections.ItemIndex]) - 1));
+ conn := DAConnectionManager.NewConnection(connname, TRUE);
+
+ ds := DASchema.NewDataset(conn, 'Customers');
+
+ { Note: we could have also created the dataset along with the field mappings and statements manually via code.
+ In some extremely dynamic situations that might be preferrable. }
+
+ Memo.Lines.Add('Mappings');
+ for i := 0 to ds.FieldCount - 1 do
+ Memo.Lines.Add(ds.fields[i].TableField + ' --> ' + ds.fields[i].Name);
+ Memo.Lines.Add('');
+
+ ds.Where.AddCondition('ID', cLike, eID.Text);
+
+ if (eCompanyName.Text <> '') and (ds.Where.Clause <> '') then ds.Where.AddOperator(opAND);
+
+ ds.Where.AddCondition('CompanyName', cDifferent, eCompanyName.Text);
+
+ if (ePhoneNumber.Text <> '') and (ds.Where.Clause <> '') then ds.Where.AddOperator(opOR);
+
+ ds.Where.AddCondition('PhoneNumber', cEqual, ePhoneNumber.Text);
+
+ orderby := POS('order by', lowercase(ds.SQL));
+
+ if (orderby = 0) then begin
+ if (cbOrderBy.Text <> '') then ds.SQL := ds.SQL + ' ORDER BY ' + ds.Fieldbyname(cbOrderBy.Text).TableField;
+ end
+ else begin
+ if (cbOrderBy.Text = '') then ds.SQL := copy(ds.sql, 1, orderby - 1)
+ else
+ ds.SQL := copy(ds.sql, 1, orderby - 1) + ' ORDER BY ' + ds.Fieldbyname(cbOrderBy.Text).TableField;
+ end;
+ ds.Open;
+ finally
+ Memo.Lines.Add('SQL >>> ' + ds.SQL);
+ Memo.Lines.Add('WHERE >>> ' + ds.Where.Clause);
+ end;
+end;
+
+procedure TSQLAccessMainForm.FormCreate(Sender: TObject);
+var
+ i: integer;
+ conn: IDAConnection;
+ ds: IDADataset;
+begin
+ with DAConnectionManager do
+ for i := 0 to (Connections.Count - 1) do begin
+ rgConnections.Items.Add(Connections[i].Name + ' - ' + Connections[i].Description);
+ end;
+
+ rgConnections.ItemIndex := 0;
+
+ conn := DAConnectionManager.NewConnection('NorthwindCustomers');
+ ds := DASchema.NewDataset(conn, 'Customers');
+ cbOrderBy.Items.Add('');
+ for i := 0 to (ds.FieldCount - 1) do begin
+ cbOrderBy.Items.Add(ds.Fields[i].Name);
+ end;
+end;
+
+procedure TSQLAccessMainForm.ProcessSQLButtonClick(Sender: TObject);
+var
+ processor: TDASQLMacroProcessor;
+ savedShortDateFormat: string;
+ SavedDateSeparator, savedTimeSeparator: Char;
+begin
+ case rgProcessors.ItemIndex of
+ 0: processor := TDAMSSQLMacroProcessor.Create;
+ 1: processor := TDAIBMacroProcessor.Create;
+ 2: processor := TDAOracleMacroProcessor.Create;
+ 3: processor := TDADBISAMMacroProcessor.Create;
+ else Exit;
+ end;
+ savedShortDateFormat := ShortDateFormat;
+ savedDateSeparator := DateSeparator;
+ savedTimeSeparator := TimeSeparator;
+ try
+ ShortDateFormat := 'MM/DD/YYYY';
+ DateSeparator := '/';
+ TimeSeparator := ':';
+ Memo2.Lines.Text := processor.Eval(Memo1.Lines.Text)
+ finally
+ ShortDateFormat := savedShortDateFormat;
+ DateSeparator := savedDateSeparator;
+ TimeSeparator := savedTimeSeparator;
+ processor.Free;
+ end;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Samples.html b/official/5.0.30.691/Data Abstract for Delphi/Samples/Samples.html
new file mode 100644
index 0000000..85e9711
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Samples.html
@@ -0,0 +1,556 @@
+
+
+
+
+
+
+
+
+
+
+ Data Abstract™ Samples for Delphi
+
+ Please keep the following things in mind when working with the samples:
+
+
+
+ Getting Started
+
+ Most of the samples provide a project group containing
+ server and client projects. The standard procedure for testing these is as follows:
+
+
+
+ Build or compile both projects.
+ Ensure that the server is the current project. Note: if there is
+ only one RemObjects SDK server contained within the project group, this step is
+ not needed because the next step will still work even if the lient is the current
+ project.
+ Launch the server (IDE menu: RemObjects | Launch Server Executable ).
+ Examine the server window. Some samples require that you activate one or more channels.
+
+ Make the client the current project.
+ Run the client.
+
+
+ Having tested the sample, next examine the database schema and the services provided. Do this by examining
+ the Schema Modeler and Service Builder tools provided:
+
+
+ Schema Modeler
+
+ locate the server form or datamodule containing the TDASchema component
+ double click on the TDASchema
+
+
+ Service Builder
+
+ Ensure that the server is the current project.
+ Open the Service Builder (IDE menu: RemObjects | Edit Service Library ).
+
+
+
+
+ Note : the Schema Modeler item available via the IDE's main menu
+ (RemObjects | Schema Modeler) will open a fresh instance, not the one already referenced
+ by the other components.
+
+
+
+
+ Sample Categories
+
+ Some samples are shown below in more than one category.
+
+
+
+
+
+
+ Category
+
+
+
+
+ Samples
+
+
+
+
+
+ Introduction
+
+ First Sample
+ Login Sample
+ Calculated Fields
+ Custom User Logon
+ MegaDemo
+ Local Schema
+ Quick Open
+
+
+
+
+
+
+ Intermediate
+
+ Briefcase
+ Business Processor
+ BusinessRulesScripts
+ Data Streamers
+ Dynamic Where
+ Fetch
+ Memory Data
+ Multi Level Detail
+ SQL Access
+ Stored Procedures
+ Strongly Typed
+
+
+
+
+ Architecture
+
+ Connection By User
+ Local Schema
+
+ Service Methods
+ Strongly Typed
+
+
+
+
+ Advanced
+
+ Connection By User
+ Connection Pooling
+ Dynamic SQL
+ Exported DataTables
+ Regular Expressions
+ Service Methods
+ XSLT
+
+
+
+ Third Party
+
+
+ QuantumGrid 4
+ Report Builder
+
+
+
+
+ Sample Descriptions
+
+
+
+
+ Name
+
+ Category
+
+ Description
+
+
+
+
+ Briefcase
+
+ Intermediate
+
+ This example shows how to create a briefcase model using a Data Abstract
+ Client.
+
+
+
+ Business Processor
+
+ Intermediate
+
+ This is a good example to show the advantages of a multi-tier architecture: systems
+ can be updated via a server re-deploy without the need to update any client. Also,
+ the sample shows advanced handling on the client of any errors returned from the
+ server.
+
+
+
+ BusinessRulesScripts
+
+ Intermediate
+
+
+ This example demonstrates how client side scripts can be modified on the server
+ and then downloaded to the client via a simple call.
+ When you compile and launch the server, it displays a memo containing various client
+ side rules executed within event handlers such as BeforePost .
+
+
+
+
+
+ Calculated Fields
+
+ Introduction
+
+ This example shows how to handle calculated fields on the server side and client
+ side.
+
+
+
+
+
+ Connection By User
+
+ Architecture
+ Advanced
+
+ Shows various methods how a standard application (i.e. not a RemObjects server or
+ client) can obtain a database connection at runtime.
+
+ The application uses four Data Abstract components: TDAADODriver ,
+ TDADriverManager , TDAConnectionManager and
+ TROInMemorySessionManager .
+
+
+
+
+ Connection Pooling
+
+ Advanced
+
+ Shows how connections can be managed via a pool (ADO/Northwind & IBX/Employee
+ connections).
+
+
+
+
+
+ Custom User Logon
+
+ Introduction
+
+
+ A very simple example showing two methods of opening a connection at runtime:
+
+ creates and opens the connection in a single call passing the UserID/Password values
+ supplied.
+ creates the connection and opens it afterwards.
+
+
+
+
+
+
+ Data Streamers
+
+ Intermediate
+
+
+ This example shows how a dataset can be written to a stream and read from it using
+ the TDABinDataStreamer class.
+ When you compile and launch this example it displays two grids, the sources for
+ which are datasets dynamically read using TStream .
+
+
+
+
+
+ Dynamic SQL
+
+ Advanced
+
+
+ This demo shows how to retrieve schema and/or data via SQL generated at runtime.
+ When you compile and run the server, you will see it contains a memo displaying
+ "SQL details generated for Update will be displayed here ". The demo does
+ not actually attempt to update server data but merely displays the fields that would
+ be updated by processing the delta.
+
+
+
+
+
+ Dynamic Where
+
+ Intermediate
+
+ This example illustrates how work with the Dynamic Where .
+
+
+
+ Exported DataTables
+
+ Advanced
+
+ This example illustrates the functionality of Exported Datatables .This allows
+ you to receive and update data not declared within the Schema.
+
+
+
+ Fetch
+
+ Intermediate
+
+ This demo shows how to fetch paged orders and also master/detail via single server
+ call.
+
+
+
+
+
+ First Sample
+
+ Introduction
+
+ This sample illustrates the basic functionality of Data Abstract .
+
+ The application, which shows how to receive data from a remote database, was created
+ using the Data Abstract 4.0 Combo Server wizard .
+
+
+
+
+ Local Schema
+
+ Introduction
+ Architecture
+
+ A simple demo showing the use of several Data Abstract components to select/update
+ a range of Customer records.
+
+
+
+
+ Login Sample
+
+ Introduction
+
+
+ This example shows how to provide a simple Login.
+ The login data is held in Northwind's Employees table, with the FirstName
+ and LastName fields used for UserName and Password respectively.
+
+
+
+
+
+
+ MegaDemo
+
+ Introduction
+
+ The sample shows:
+
+ How we can work with several connections to different databases (Northwind - MS
+ SQL and Employee - Firebird).
+ How we can implement security and access rights in our application.
+ Master-detail relations between tables is implemented via a service that provides
+ a list of orders by user id.
+
+
+
+
+
+ Memory Data
+
+ Intermediate
+
+
+ This example shows how to create and populate a virtual dataset dynamically.
+ The client displays two grids:
+
+
+ Top Grid : this displays the primary keys of one or more datasets from Northwind.
+
+ Bottom Grid : this displays the names and sizes of files contained in the
+ specified disk folder.
+
+
+
+
+
+
+ Multi Level Detail
+
+ Intermediate
+
+ This sample shows how to implement master/detail/detail updates as simply as possible.
+
+
+
+ QuantumGrid 4
+
+ Third Party
+
+ This example demonstrates how to use the QuantumGrid4 (or QuantumGrid5 )
+ product from Developer Express (contact www.devexpress.com . for licensing
+ information if you do not already have the product).
+
+
+
+
+
+ Quick Open
+
+ Introduction
+
+ This example shows how to load TDACDSDataTable data using the TDABinDataStreamer .
+
+
+
+
+ Regular Expressions
+
+ Advanced
+
+ This sample illustrates the support provided for regular expressions .
+
+
+
+
+ Report Builder
+
+ Third Party
+
+ Requires ReportBuilder 7 from Digital Metaphors .
+ This example shows how to create the report on the server, stream it to the client
+ and then display to the client.
+
+
+
+
+ Service Methods
+
+ Architecture
+ Advanced
+
+ This example illustrates the methods of the IDataAbstractService base
+ service. It shows the options available to change the server's operations and also
+ shows the order in which server methods are invoked.
+
+
+
+
+
+
+ SQL Access
+
+ Intermediate
+
+ This example treats two different SQL queries as if they are the same one. One takes
+ data from the SHIPPERS table and the other from the CUSTOMERS
+ table.
+
+ The field mappings used when building the where clause isolate the developer from
+ the SQL details and so allow the building of fairly complex where clauses without
+ the need to do string concatenations in code.
+ This sample also illustrates the use of various macro processors (TMSSQLMacroProcessor ,
+ TIBMacroProcessor , TOracleMacroProcessor ,
+ TDBISAMMacroProcessor ).
+
+
+
+
+
+ Stored Procedures
+
+ Intermediate
+
+ This example shows how to use the IDAConnection's GetStoredProcedureNames
+ method to retrieve a list of stored procedures for the connection.
+
+ It also shows how to use IDAConnection's NewCommand to access the IDASQLCommand
+ interface
+
+
+
+
+ Strongly Typed
+
+ Architecture
+ Intermediate
+
+ This example shows usage of business rules. It enforces additional rules that
+ might change over time. This is a good example to show the advantages of a multi-tier
+ architecture: systems can be updated via a server re-deploy without the need to
+ update any client.
+
+
+
+ XSLT
+
+ Advanced
+
+ This example shows how to import dataset data into an .xml file by using the TDAXmlDataStreamer .
+ Exporting dataset changes to an .xml file is also shown.
+
+
+
+
+
+
+
+
+
+ Support
+
+
+ If you encounter any problems or have questions regarding the Samples,
+ please feel
+ free to ask on our newsgroup at
+ news://news.remobjects.com/remobjects.public.dataabstract.delphi .
+
+
+ Thank you very much, Your RemObjects Team http://www.remobjects.com
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/RODLFILE.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/RODLFILE.res
new file mode 100644
index 0000000..c0b5ce3
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/RODLFILE.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods.Sample.html b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods.Sample.html
new file mode 100644
index 0000000..2868c91
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods.Sample.html
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+Service Methods
+
+Purpose
+
+This example illustrates the methods of the IDataAbstractService base service.
+ It shows the options available to change the server's operations and also shows the order in which server methods are invoked.
+ In this example, all server methods are called manually. Normally, this is not necessary, as the TDARemoteDataAdapter calls them all for you.
+
+Examine the Code
+
+ See how the
+ IDataAbstractService methods are called manually in
+ ServiceMethods_ClientMain.pas
+
+
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods.bdsgroup b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods.bdsgroup
new file mode 100644
index 0000000..8333b42
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods.bdsgroup
@@ -0,0 +1,20 @@
+
+
+
+
+ Default.Personality
+
+ 1.0
+ {50358F46-CE56-42F4-B12A-927582536994}
+
+
+
+
+
+ ServiceMethods_Server.bdsproj
+ ServiceMethods_Client.bdsproj
+ ServiceMethods_Server.exe ServiceMethods_Client.exe
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods.bpg b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods.bpg
new file mode 100644
index 0000000..fe9fcfa
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods.bpg
@@ -0,0 +1,23 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = ServiceMethods_Server.exe ServiceMethods_Client.exe
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+ServiceMethods_Client.exe: ServiceMethods_Client.dpr
+ $(DCC)
+
+ServiceMethods_Server.exe: ServiceMethods_Server.dpr
+ $(DCC)
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods.groupproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods.groupproj
new file mode 100644
index 0000000..143ef56
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods.groupproj
@@ -0,0 +1,40 @@
+
+
+ {e6c919e3-5360-42fe-9531-375446f3300f}
+
+
+
+
+ Default.Personality
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethodsLibrary.rodl b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethodsLibrary.rodl
new file mode 100644
index 0000000..ae93bfa
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethodsLibrary.rodl
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethodsLibrary_Intf.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethodsLibrary_Intf.pas
new file mode 100644
index 0000000..588654f
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethodsLibrary_Intf.pas
@@ -0,0 +1,77 @@
+unit ServiceMethodsLibrary_Intf;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+{$I Remobjects.inc}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROXMLIntf, uROClasses, uROClient, uROTypes, uROClientIntf,
+ {Used RODLs:} DataAbstract4_Intf;
+
+const
+ { Library ID }
+ LibraryUID = '{4E3F13F7-7BFC-4A77-AAB9-D9A3CF49CEB8}';
+ TargetNamespace = '';
+
+ { Service Interface ID's }
+ IServiceMethods_Service_IID : TGUID = '{7FD71BB0-07C8-479C-B684-75CD9DEF3917}';
+
+ { Event ID's }
+
+type
+ { Forward declarations }
+ IServiceMethods_Service = interface;
+
+
+ { IServiceMethods_Service }
+ IServiceMethods_Service = interface(IDataAbstractService)
+ ['{7FD71BB0-07C8-479C-B684-75CD9DEF3917}']
+ end;
+
+ { CoServiceMethods_Service }
+ CoServiceMethods_Service = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IServiceMethods_Service;
+ end;
+
+ { TServiceMethods_Service_Proxy }
+ TServiceMethods_Service_Proxy = class(TDataAbstractService_Proxy, IServiceMethods_Service)
+ protected
+ function __GetInterfaceName:string; override;
+
+ end;
+
+implementation
+
+uses
+ {vcl:} SysUtils,
+ {RemObjects:} uROEventRepository, uROSerializer, uRORes;
+
+{ CoServiceMethods_Service }
+
+class function CoServiceMethods_Service.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IServiceMethods_Service;
+begin
+ result := TServiceMethods_Service_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+function TServiceMethods_Service_Proxy.__GetInterfaceName:string;
+begin
+ result := 'ServiceMethods_Service';
+end;
+
+initialization
+ RegisterProxyClass(IServiceMethods_Service_IID, TServiceMethods_Service_Proxy);
+
+
+finalization
+ UnregisterProxyClass(IServiceMethods_Service_IID);
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethodsLibrary_Invk.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethodsLibrary_Invk.pas
new file mode 100644
index 0000000..4c2758a
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethodsLibrary_Invk.pas
@@ -0,0 +1,36 @@
+unit ServiceMethodsLibrary_Invk;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+{$I Remobjects.inc}
+
+interface
+
+uses
+ {vcl:} Classes,
+ {RemObjects:} uROXMLIntf, uROServer, uROServerIntf, uROTypes, uROClientIntf,
+ {Used RODL Intf's:} DataAbstract4_Intf,
+ {Used RODL Invk's:} DataAbstract4_Invk,
+ {Generated:} ServiceMethodsLibrary_Intf;
+
+type
+ {$M+}
+ TServiceMethods_Service_Invoker = class(TDataAbstractService_Invoker)
+ private
+ protected
+ published
+ end;
+ {$M-}
+
+implementation
+
+uses
+ {RemObjects:} uRORes, uROClient;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods_Client.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods_Client.bdsproj
new file mode 100644
index 0000000..6e397d1
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods_Client.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {9A50541D-7E23-41F5-BAE4-0CEB2CDE4102}
+
+
+
+
+ ServiceMethods_Client.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods_Client.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods_Client.dpr
new file mode 100644
index 0000000..c73ae67
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods_Client.dpr
@@ -0,0 +1,13 @@
+program ServiceMethods_Client;
+
+uses
+ Forms,
+ ServiceMethods_ClientMain in 'ServiceMethods_ClientMain.pas' {ServiceMethods_ClientMainForm};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TServiceMethods_ClientMainForm, ServiceMethods_ClientMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods_Client.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods_Client.dproj
new file mode 100644
index 0000000..b9baccc
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods_Client.dproj
@@ -0,0 +1,72 @@
+
+
+ {f5641855-869a-4e82-b3c8-167372a7b6d0}
+ ServiceMethods_Client.dpr
+ Debug
+ AnyCPU
+ DCC32
+ ServiceMethods_Client.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ ServiceMethods_Client.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods_Client.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods_Client.res
new file mode 100644
index 0000000..b946fbb
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods_Client.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods_ClientMain.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods_ClientMain.dfm
new file mode 100644
index 0000000..2d0478e
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods_ClientMain.dfm
@@ -0,0 +1,674 @@
+object ServiceMethods_ClientMainForm: TServiceMethods_ClientMainForm
+ Left = 328
+ Top = 246
+ AutoScroll = False
+ Caption = 'ServiceMethods Client'
+ ClientHeight = 445
+ ClientWidth = 804
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ ShowHint = True
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ OnShow = FormShow
+ PixelsPerInch = 96
+ TextHeight = 13
+ object LogMessage: TLabel
+ Left = 150
+ Top = 207
+ Width = 647
+ Height = 16
+ Anchors = [akLeft, akTop, akRight]
+ AutoSize = False
+ Caption = 'Please run GetSchema first!'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clRed
+ Font.Height = -15
+ Font.Name = 'MS Sans Serif'
+ Font.Style = [fsBold]
+ ParentFont = False
+ end
+ object PageControl: TPageControl
+ Left = 0
+ Top = 0
+ Width = 804
+ Height = 198
+ ActivePage = tsGetData
+ Align = alTop
+ TabOrder = 0
+ OnChange = PageControlChange
+ object tsGetSchema: TTabSheet
+ Caption = 'GetSchema'
+ object Label1: TLabel
+ Left = 0
+ Top = 0
+ Width = 796
+ Height = 26
+ Align = alTop
+ AutoSize = False
+ Caption = 'Requires that '#39'AllowSchemaAccess'#39' is enabled on the server'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -12
+ Font.Name = 'MS Sans Serif'
+ Font.Style = [fsBold]
+ ParentFont = False
+ WordWrap = True
+ end
+ end
+ object tsGetTableSchema: TTabSheet
+ Caption = 'GetTableSchema'
+ ImageIndex = 4
+ object Label2: TLabel
+ Left = 9
+ Top = 37
+ Width = 40
+ Height = 13
+ Caption = 'Dataset:'
+ end
+ object Label8: TLabel
+ Left = 0
+ Top = 0
+ Width = 796
+ Height = 26
+ Align = alTop
+ AutoSize = False
+ Caption = 'Requires that '#39'AllowSchemaAccess'#39' is enabled on the server'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -12
+ Font.Name = 'MS Sans Serif'
+ Font.Style = [fsBold]
+ ParentFont = False
+ WordWrap = True
+ end
+ object cbGetTableSchema: TComboBox
+ Left = 126
+ Top = 33
+ Width = 145
+ Height = 21
+ Style = csDropDownList
+ ItemHeight = 0
+ TabOrder = 0
+ end
+ end
+ object tsGetData: TTabSheet
+ Caption = 'GetData'
+ ImageIndex = 1
+ object Label6: TLabel
+ Left = 9
+ Top = 37
+ Width = 40
+ Height = 13
+ Caption = 'Dataset:'
+ end
+ object Label7: TLabel
+ Left = 0
+ Top = 0
+ Width = 796
+ Height = 26
+ Align = alTop
+ AutoSize = False
+ Caption =
+ 'Requires that '#39'AllowDataAccess'#39', '#39'AcquireConnection'#39' and '#39'AllowW' +
+ 'hereSQL'#39' is enabled on the server. (AllowWhereSQL is needed for ' +
+ 'UserFilter)'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -12
+ Font.Name = 'MS Sans Serif'
+ Font.Style = [fsBold]
+ ParentFont = False
+ WordWrap = True
+ end
+ object Label4: TLabel
+ Left = 9
+ Top = 84
+ Width = 58
+ Height = 13
+ Caption = 'MaxRecord:'
+ end
+ object Label19: TLabel
+ Left = 9
+ Top = 108
+ Width = 47
+ Height = 13
+ Caption = 'UserFilter:'
+ end
+ object cbGetData: TComboBox
+ Left = 126
+ Top = 33
+ Width = 145
+ Height = 21
+ Style = csDropDownList
+ ItemHeight = 13
+ TabOrder = 0
+ OnChange = cbGetDataChange
+ end
+ object cbIncludeSchema: TCheckBox
+ Left = 9
+ Top = 58
+ Width = 130
+ Height = 17
+ Alignment = taLeftJustify
+ Caption = 'IncludeSchema'
+ Checked = True
+ State = cbChecked
+ TabOrder = 1
+ end
+ object spMaxRecord: TSpinEdit
+ Left = 126
+ Top = 79
+ Width = 50
+ Height = 22
+ MaxValue = 0
+ MinValue = 0
+ TabOrder = 2
+ Value = 10
+ end
+ object vleGetData: TValueListEditor
+ Left = 610
+ Top = 26
+ Width = 186
+ Height = 144
+ Align = alRight
+ TabOrder = 3
+ TitleCaptions.Strings = (
+ 'Parameter'
+ 'Value')
+ ColWidths = (
+ 86
+ 94)
+ end
+ object GetDataUserFilter: TEdit
+ Left = 126
+ Top = 103
+ Width = 477
+ Height = 21
+ Anchors = [akLeft, akTop, akRight]
+ TabOrder = 4
+ end
+ end
+ object tsUpdateData: TTabSheet
+ Caption = 'UpdateData'
+ ImageIndex = 2
+ object Label18: TLabel
+ Left = 0
+ Top = 0
+ Width = 796
+ Height = 26
+ Align = alTop
+ AutoSize = False
+ Caption =
+ 'Requires that '#39'AllowDataAccess'#39', '#39'ProcessDeltasWithoutUpdateRule' +
+ 's'#39' and '#39'AcquireConnection'#39' is enabled on the server'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -12
+ Font.Name = 'MS Sans Serif'
+ Font.Style = [fsBold]
+ ParentFont = False
+ WordWrap = True
+ end
+ object Panel1: TPanel
+ Left = 0
+ Top = 26
+ Width = 610
+ Height = 144
+ Align = alClient
+ BevelOuter = bvNone
+ TabOrder = 0
+ object Panel2: TPanel
+ Left = 0
+ Top = 0
+ Width = 610
+ Height = 26
+ Align = alTop
+ BevelOuter = bvNone
+ TabOrder = 0
+ object Label15: TLabel
+ Left = 9
+ Top = 6
+ Width = 40
+ Height = 13
+ Caption = 'Dataset:'
+ end
+ object Label17: TLabel
+ Left = 360
+ Top = 6
+ Width = 58
+ Height = 13
+ Caption = 'MaxRecord:'
+ end
+ object RefreshButton: TBitBtn
+ Left = 208
+ Top = 1
+ Width = 77
+ Height = 22
+ Caption = 'Refresh'
+ TabOrder = 1
+ OnClick = RefreshButtonClick
+ Glyph.Data = {
+ 36040000424D3604000000000000360000002800000010000000100000000100
+ 2000000000000004000000000000000000000000000000000000FF00FF00A377
+ 7400A3777400A3777400A3777400A3777400A3777400A3777400A3777400A377
+ 7400A3777400A3777400A377740090605D00FF00FF00FF00FF00FF00FF00A67B
+ 7500F2E2D300F2E2D300FFE8D100EFDFBB00FFE3C500FFDEBD00FFDDBA00FFD8
+ B200FFD6AE00FFD2A500FFD2A30093635F00FF00FF00FF00FF00FF00FF00AB7F
+ 7700F3E7DA00F3E7DA0000990000AFD8A00070C56F0040AA2F0080BB5D00EFD4
+ A600FFD6AE00FFD2A300FFD2A30096666200FF00FF00FF00FF00FF00FF00B083
+ 7900F4E9DD00F4E9DD00009900000099000000990000009900000099000040AA
+ 2E00FFD8B200FFD4A900FFD4A9009A696400FF00FF00FF00FF00FF00FF00B689
+ 7C00F5EDE400F5EDE4000099000000990000109E0D00CFD6A300FFE4C80020A2
+ 1900FFD8B200FFD7B000FFD7B0009E6C6600FF00FF00FF00FF00FF00FF00BC8E
+ 7E00F7EFE800F7EFE80000990000009900000099000000990000FFE4C800EFDE
+ BA00FFD8B200FFD7B000FFD9B400A26F6800FF00FF00FF00FF00FF00FF00C395
+ 8100F8F3EF00F8F3EF00F8F3EF00FFF4E800FFF4E800FFF4E800EFE3C400EFE3
+ C400FFE4C800FFDEBD00FFDDBB00A5736A00FF00FF00FF00FF00FF00FF00CA9B
+ 8400F9F5F200FBFBFB00FFF4E800FFF4E800FFF4E80000990000009900000099
+ 0000FFE8D100FFE3C500FFE1C200A8766C00FF00FF00FF00FF00FF00FF00D2A1
+ 8700F9F9F900FBFBFB00109F0F00AFD8A000FFF4E800AFD8A000009900000099
+ 0000FFE8D100FFE4C800FFE3C600AC796E00FF00FF00FF00FF00FF00FF00D9A8
+ 8A00FBFBFB00FFFFFF0070C56F00009900000099000000990000009900000099
+ 0000FFE8D100FFE8D100FFE6CE00AE7B7100FF00FF00FF00FF00FF00FF00DFAE
+ 8C00FCFCFC00FFFFFF00FFFFFF0070C56F000099000000990000AFD8A0000099
+ 0000FFE8D100FFC8C200FFB0B000B07D7200FF00FF00FF00FF00FF00FF00E5B3
+ 8F00FDFDFD00FDFDFD00FFFFFF00FFFFFF00FFFFFE00FFFAF600FFF9F300FFF5
+ EA00F4DECE00B27F7300B27F7300B27F7300FF00FF00FF00FF00FF00FF00EAB8
+ 9100FEFEFE00FEFEFE00FFFFFF00FFFFFF00FFFFFF00FFFFFE00FFFAF600FFF9
+ F300F5E1D200B27F7300EDA75400CB987F00FF00FF00FF00FF00FF00FF00EFBC
+ 9200FFFFFF00FFFFFF00FCFCFC00FAFAFA00F7F7F700F5F5F500F2F1F100F0ED
+ EA00E9DAD000B27F7300D4A18300D09D8100FF00FF00FF00FF00FF00FF00F2BF
+ 9400DCA98700DCA98700DCA98700DCA98700DCA98700DCA98700DCA98700DCA9
+ 8700DCA98700B27F7300D8A58500FF00FF00FF00FF00FF00FF00FF00FF00FF00
+ FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
+ FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00}
+ end
+ object cbUpdateData: TComboBox
+ Left = 57
+ Top = 2
+ Width = 145
+ Height = 21
+ Style = csDropDownList
+ ItemHeight = 0
+ TabOrder = 0
+ OnChange = cbUpdateDataChange
+ end
+ object updateDataMaxRecord: TSpinEdit
+ Left = 431
+ Top = 1
+ Width = 50
+ Height = 22
+ MaxValue = 0
+ MinValue = 0
+ TabOrder = 2
+ Value = 10
+ end
+ end
+ object DBGrid1: TDBGrid
+ Left = 0
+ Top = 26
+ Width = 610
+ Height = 96
+ Align = alClient
+ DataSource = DataSource
+ TabOrder = 1
+ TitleFont.Charset = DEFAULT_CHARSET
+ TitleFont.Color = clWindowText
+ TitleFont.Height = -11
+ TitleFont.Name = 'MS Sans Serif'
+ TitleFont.Style = []
+ end
+ object DBNavigator1: TDBNavigator
+ Left = 0
+ Top = 122
+ Width = 610
+ Height = 22
+ DataSource = DataSource
+ VisibleButtons = [nbFirst, nbPrior, nbNext, nbLast, nbInsert, nbDelete, nbEdit, nbPost, nbCancel]
+ Align = alBottom
+ TabOrder = 2
+ end
+ end
+ object ParamPanel: TPanel
+ Left = 610
+ Top = 26
+ Width = 186
+ Height = 144
+ Align = alRight
+ BevelOuter = bvNone
+ TabOrder = 1
+ object vleUpdateData: TValueListEditor
+ Left = 0
+ Top = 0
+ Width = 186
+ Height = 144
+ Align = alClient
+ TabOrder = 0
+ ColWidths = (
+ 93
+ 87)
+ end
+ end
+ end
+ object tsSQLGetData: TTabSheet
+ Caption = 'SQLGetData'
+ ImageIndex = 6
+ object Label11: TLabel
+ Left = 9
+ Top = 33
+ Width = 24
+ Height = 13
+ Caption = 'SQL:'
+ end
+ object Label12: TLabel
+ Left = 9
+ Top = 139
+ Width = 58
+ Height = 13
+ Caption = 'MaxRecord:'
+ end
+ object Label13: TLabel
+ Left = 0
+ Top = 0
+ Width = 796
+ Height = 26
+ Align = alTop
+ AutoSize = False
+ Caption =
+ 'Requires that '#39'AllowDataAccess'#39', '#39'AllowExecuteSQL'#39' and '#39'AcquireC' +
+ 'onnection'#39' is enabled on the server'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -12
+ Font.Name = 'MS Sans Serif'
+ Font.Style = [fsBold]
+ ParentFont = False
+ WordWrap = True
+ end
+ object sqlIncludeSchema: TCheckBox
+ Left = 9
+ Top = 113
+ Width = 130
+ Height = 17
+ Alignment = taLeftJustify
+ Caption = 'IncludeSchema'
+ Checked = True
+ State = cbChecked
+ TabOrder = 1
+ end
+ object sqlMaxRecords: TSpinEdit
+ Left = 126
+ Top = 134
+ Width = 50
+ Height = 22
+ MaxValue = 0
+ MinValue = 0
+ TabOrder = 2
+ Value = 10
+ end
+ object memoDQLGetData: TMemo
+ Left = 126
+ Top = 33
+ Width = 600
+ Height = 75
+ Lines.Strings = (
+ 'select * from customers')
+ ScrollBars = ssVertical
+ TabOrder = 0
+ end
+ end
+ object tsGetCommandSchema: TTabSheet
+ Caption = 'GetCommandSchema'
+ ImageIndex = 5
+ object Label5: TLabel
+ Left = 9
+ Top = 37
+ Width = 50
+ Height = 13
+ Caption = 'Command:'
+ end
+ object Label3: TLabel
+ Left = 0
+ Top = 0
+ Width = 800
+ Height = 26
+ Align = alTop
+ AutoSize = False
+ Caption = 'Requires that '#39'AllowSchemaAccess'#39' is enabled on the server'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -12
+ Font.Name = 'MS Sans Serif'
+ Font.Style = [fsBold]
+ ParentFont = False
+ WordWrap = True
+ end
+ object cbGetCommandSchema: TComboBox
+ Left = 126
+ Top = 33
+ Width = 145
+ Height = 24
+ Style = csDropDownList
+ ItemHeight = 0
+ TabOrder = 0
+ end
+ end
+ object tsExecuteCommand: TTabSheet
+ Caption = 'ExecuteCommand'
+ ImageIndex = 3
+ object Label9: TLabel
+ Left = 9
+ Top = 37
+ Width = 50
+ Height = 13
+ Caption = 'Command:'
+ end
+ object Label10: TLabel
+ Left = 0
+ Top = 0
+ Width = 800
+ Height = 26
+ Align = alTop
+ AutoSize = False
+ Caption =
+ 'Requires that '#39'AllowDataAccess'#39', '#39'AllowExecuteCommands'#39' and '#39'Acq' +
+ 'uireConnection'#39' is enabled on the server'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -12
+ Font.Name = 'MS Sans Serif'
+ Font.Style = [fsBold]
+ ParentFont = False
+ WordWrap = True
+ end
+ object cbExecuteCommand: TComboBox
+ Left = 126
+ Top = 33
+ Width = 145
+ Height = 24
+ Style = csDropDownList
+ ItemHeight = 0
+ TabOrder = 0
+ OnChange = cbExecuteCommandChange
+ end
+ object vleExecuteCommand: TValueListEditor
+ Left = 610
+ Top = 26
+ Width = 186
+ Height = 144
+ Align = alRight
+ KeyOptions = [keyUnique]
+ TabOrder = 1
+ TitleCaptions.Strings = (
+ 'Parameter'
+ 'Value')
+ ColWidths = (
+ 81
+ 141)
+ end
+ end
+ object tsExecuteCommandEx: TTabSheet
+ Caption = 'ExecuteCommandEx'
+ ImageIndex = 8
+ object Label20: TLabel
+ Left = 0
+ Top = 0
+ Width = 800
+ Height = 26
+ Align = alTop
+ AutoSize = False
+ Caption =
+ 'Requires that '#39'AllowDataAccess'#39', '#39'AllowExecuteCommands'#39' and '#39'Acq' +
+ 'uireConnection'#39' is enabled on the server'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -12
+ Font.Name = 'MS Sans Serif'
+ Font.Style = [fsBold]
+ ParentFont = False
+ WordWrap = True
+ end
+ object Label21: TLabel
+ Left = 9
+ Top = 37
+ Width = 50
+ Height = 13
+ Caption = 'Command:'
+ end
+ object cbExecuteCommandEx: TComboBox
+ Left = 126
+ Top = 33
+ Width = 145
+ Height = 24
+ Style = csDropDownList
+ ItemHeight = 0
+ TabOrder = 0
+ OnChange = cbExecuteCommandExChange
+ end
+ object vleExecuteCommandEx: TValueListEditor
+ Left = 610
+ Top = 26
+ Width = 186
+ Height = 144
+ Align = alRight
+ KeyOptions = [keyUnique]
+ TabOrder = 1
+ TitleCaptions.Strings = (
+ 'Parameter'
+ 'Value')
+ ColWidths = (
+ 81
+ 141)
+ end
+ end
+ object tsSQLExecuteCommand: TTabSheet
+ Caption = 'SQLExecuteCommand'
+ ImageIndex = 7
+ object Label14: TLabel
+ Left = 0
+ Top = 0
+ Width = 796
+ Height = 26
+ Align = alTop
+ AutoSize = False
+ Caption =
+ 'Requires that '#39'AllowDataAccess'#39', '#39'AllowExecuteSQL'#39' and '#39'AcquireC' +
+ 'onnection'#39' is enabled on the server'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -12
+ Font.Name = 'MS Sans Serif'
+ Font.Style = [fsBold]
+ ParentFont = False
+ WordWrap = True
+ end
+ object Label16: TLabel
+ Left = 9
+ Top = 33
+ Width = 24
+ Height = 13
+ Caption = 'SQL:'
+ end
+ object MemoSQLExecuteCommand: TMemo
+ Left = 126
+ Top = 33
+ Width = 600
+ Height = 75
+ Lines.Strings = (
+
+ 'update orders set CustomerID = '#39'AROUT'#39' where CustomerID = '#39'AROUT' +
+ #39)
+ ScrollBars = ssVertical
+ TabOrder = 0
+ end
+ end
+ end
+ object RunButton: TButton
+ Left = 3
+ Top = 204
+ Width = 139
+ Height = 22
+ Caption = 'RunButton'
+ TabOrder = 1
+ OnClick = RunButtonClick
+ end
+ object Memo: TMemo
+ Left = 1
+ Top = 232
+ Width = 804
+ Height = 213
+ Align = alCustom
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -12
+ Font.Name = 'Courier New'
+ Font.Style = []
+ ParentFont = False
+ ScrollBars = ssBoth
+ TabOrder = 2
+ end
+ object ClearLogButton: TButton
+ Left = 724
+ Top = 204
+ Width = 75
+ Height = 22
+ Anchors = [akTop, akRight]
+ Caption = 'Clear log'
+ TabOrder = 3
+ OnClick = ClearLogButtonClick
+ end
+ object Channel: TROWinInetHTTPChannel
+ UserAgent = 'RemObjects SDK'
+ TargetURL = 'http://localhost:8099/BIN'
+ ServerLocators = <>
+ DispatchOptions = []
+ Left = 3
+ Top = 234
+ end
+ object BinMessage: TROBinMessage
+ Left = 30
+ Top = 234
+ end
+ object Service: TRORemoteService
+ Message = BinMessage
+ Channel = Channel
+ ServiceName = 'ServiceMethods_Service'
+ Left = 85
+ Top = 234
+ end
+ object Streamer: TDABinDataStreamer
+ Left = 58
+ Top = 234
+ end
+ object DataSource: TDADataSource
+ Left = 113
+ Top = 234
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods_ClientMain.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods_ClientMain.pas
new file mode 100644
index 0000000..7a56832
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods_ClientMain.pas
@@ -0,0 +1,688 @@
+unit ServiceMethods_ClientMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, uRORemoteService, uROClient, uROBinMessage,
+ uROWinInetHttpChannel, uDAScriptingProvider, uDADataTable,
+ uDACDSDataTable, uDADataStreamer, uDABinAdapter, uDARemoteDataAdapter,
+ ComCtrls, StdCtrls, ServiceMethodsLibrary_Intf, uDAClasses, uDAInterfaces,
+ Spin, Grids, ValEdit, DB, DBCtrls, DBGrids, ExtCtrls, Buttons;
+
+type
+ TServiceMethods_ClientMainForm = class(TForm)
+ Channel: TROWinInetHTTPChannel;
+ BinMessage: TROBinMessage;
+ Service: TRORemoteService;
+ Streamer: TDABinDataStreamer;
+ PageControl: TPageControl;
+ tsGetSchema: TTabSheet;
+ tsGetData: TTabSheet;
+ tsUpdateData: TTabSheet;
+ tsExecuteCommand: TTabSheet;
+ tsGetTableSchema: TTabSheet;
+ tsGetCommandSchema: TTabSheet;
+ tsSQLGetData: TTabSheet;
+ tsSQLExecuteCommand: TTabSheet;
+ Label1: TLabel;
+ RunButton: TButton;
+ Memo: TMemo;
+ cbGetTableSchema: TComboBox;
+ Label2: TLabel;
+ Label5: TLabel;
+ cbGetCommandSchema: TComboBox;
+ Label6: TLabel;
+ cbGetData: TComboBox;
+ Label7: TLabel;
+ Label8: TLabel;
+ Label3: TLabel;
+ cbIncludeSchema: TCheckBox;
+ Label4: TLabel;
+ spMaxRecord: TSpinEdit;
+ cbExecuteCommand: TComboBox;
+ Label9: TLabel;
+ vleGetData: TValueListEditor;
+ vleExecuteCommand: TValueListEditor;
+ Label10: TLabel;
+ Label11: TLabel;
+ sqlIncludeSchema: TCheckBox;
+ Label12: TLabel;
+ sqlMaxRecords: TSpinEdit;
+ Label13: TLabel;
+ memoDQLGetData: TMemo;
+ Label14: TLabel;
+ MemoSQLExecuteCommand: TMemo;
+ Label16: TLabel;
+ LogMessage: TLabel;
+ Panel1: TPanel;
+ Panel2: TPanel;
+ Label15: TLabel;
+ cbUpdateData: TComboBox;
+ DBGrid1: TDBGrid;
+ DBNavigator1: TDBNavigator;
+ DataSource: TDADataSource;
+ ParamPanel: TPanel;
+ vleUpdateData: TValueListEditor;
+ Label17: TLabel;
+ updateDataMaxRecord: TSpinEdit;
+ RefreshButton: TBitBtn;
+ Label19: TLabel;
+ GetDataUserFilter: TEdit;
+ Label18: TLabel;
+ ClearLogButton: TButton;
+ tsExecuteCommandEx: TTabSheet;
+ Label20: TLabel;
+ Label21: TLabel;
+ cbExecuteCommandEx: TComboBox;
+ vleExecuteCommandEx: TValueListEditor;
+ procedure PageControlChange(Sender: TObject);
+ procedure RunButtonClick(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ procedure FormDestroy(Sender: TObject);
+ procedure FormShow(Sender: TObject);
+ procedure cbGetDataChange(Sender: TObject);
+ procedure cbExecuteCommandChange(Sender: TObject);
+ procedure cbUpdateDataChange(Sender: TObject);
+ procedure RefreshButtonClick(Sender: TObject);
+ procedure ClearLogButtonClick(Sender: TObject);
+ procedure cbExecuteCommandExChange(Sender: TObject);
+ private
+ { Private declarations }
+ FService: IServiceMethods_Service;
+ Schema: TDASchema;
+ procedure Log(Str: string);
+ procedure FillCB(ACombobox: Tcombobox; AItems: TDASQLCommandCollection);
+ function isNeedSchema: boolean;
+ procedure LogDataset(ADataset: TDACDSDataTable);
+ procedure FillUpdateDataDataset;
+ public
+ { Public declarations }
+ procedure GetSchema;
+ procedure GetData;
+ procedure UpdateData;
+ procedure ExecuteCommand;
+ procedure ExecuteCommandEx;
+ procedure GetTableSchema;
+ procedure GetCommandSchema;
+ procedure SQLGetData;
+ procedure SQLExecuteCommand;
+ end;
+
+var
+ ServiceMethods_ClientMainForm: TServiceMethods_ClientMainForm;
+
+implementation
+uses
+ DataAbstract4_Intf, uDADelta, uROTypes, uROXMLIntf;
+{$R *.dfm}
+
+procedure TServiceMethods_ClientMainForm.PageControlChange(
+ Sender: TObject);
+begin
+ RunButton.Caption := PageControl.ActivePage.Caption;
+ isNeedSchema;
+ if PageControl.ActivePage = tsGetData then cbGetDataChange(cbGetData)
+ else if PageControl.ActivePage = tsExecuteCommand then cbExecuteCommandChange(cbExecuteCommand)
+ else if PageControl.ActivePage = tsExecuteCommandEx then cbExecuteCommandExChange(cbExecuteCommandEx)
+ else if PageControl.ActivePage = tsUpdateData then cbUpdateDataChange(cbUpdateData);
+
+end;
+
+procedure TServiceMethods_ClientMainForm.RunButtonClick(Sender: TObject);
+begin
+ if PageControl.ActivePage = tsGetSchema then GetSchema
+ else if PageControl.ActivePage = tsGetData then GetData
+ else if PageControl.ActivePage = tsUpdateData then UpdateData
+ else if PageControl.ActivePage = tsExecuteCommand then ExecuteCommand
+ else if PageControl.ActivePage = tsExecuteCommandEx then ExecuteCommandEx
+ else if PageControl.ActivePage = tsGetTableSchema then GetTableSchema
+ else if PageControl.ActivePage = tsGetCommandSchema then GetCommandSchema
+ else if PageControl.ActivePage = tsSQLGetData then SQLGetData
+ else if PageControl.ActivePage = tsSQLExecuteCommand then SQLExecuteCommand
+ ;
+ Log('');
+end;
+
+procedure TServiceMethods_ClientMainForm.ExecuteCommand;
+var
+ aRowsAffacted: integer;
+ dataparam: DataParameterArray;
+ i: integer;
+begin
+ if isNeedSchema then Exit;
+ Log('***ExecuteCommand***');
+ try
+ dataparam := DataParameterArray.Create;
+ try
+ for i := 0 to vleExecuteCommand.Strings.Count - 1 do begin
+ with dataparam.Add do begin
+ Name := AnsiToUtf8(vleExecuteCommand.Keys[i + 1]);
+ Value := vleExecuteCommand.Values[Name];
+ end;
+ end;
+ aRowsAffacted := FService.ExecuteCommand(AnsiToUtf8(cbExecuteCommand.Text), dataparam);
+ finally
+ dataparam.Free;
+ end;
+ log('aRowsAffacted:'#9 + intToStr(aRowsAffacted));
+ except
+ on e: Exception do Log(e.Message);
+ end;
+ Log('*******************');
+end;
+
+procedure TServiceMethods_ClientMainForm.GetCommandSchema;
+var
+ str: string;
+ strArr: StringArray;
+ doc: IXMLDocument;
+ List: IXMLNodeList;
+ j, i: integer;
+ node, ParamsNode, ParamNode: IXMLNode;
+begin
+ if isNeedSchema then Exit;
+
+ Log('***GetCommandSchema***');
+ StrArr := StringArray.Create;
+ try
+ strArr.Add(AnsiToUtf8(cbGetCommandSchema.Text));
+ try
+ str := FService.GetCommandSchema(StrArr);
+ doc := NewROXmlDocument;
+ doc.New;
+ doc.XML :=Utf8ToAnsi(str);
+ List := doc.DocumentNode.GetNodesByName('SchemaCommand');
+ for i := 0 to List.Count - 1 do begin
+ Node := List.Nodes[i];
+ if Node = nil then continue;
+ Log('Command: ' + Node.GetNodeValue('Name', ''));
+ ParamsNode := Node.GetNodeByName('Params');
+ if ParamsNode = nil then Continue;
+ for j := 0 to ParamsNode.GetAttributeValue('Count', 0) - 1 do begin
+ ParamNode := ParamsNode.GetNodeByName('Item' + IntToStr(j));
+ if ParamNode = nil then Continue;
+ Log('Params[' + IntToStr(j) + ']: ' + ParamNode.GetNodeValue('Name', ''));
+ end;
+ end;
+ except
+ on E: Exception do Log(E.Message);
+ end;
+ finally
+ strArr.Free;
+ end;
+ Log('********************');
+end;
+
+procedure TServiceMethods_ClientMainForm.GetData;
+var
+ Stream: TMemoryStream;
+ CDSDataTable: TDACDSDataTable;
+ aTableRequestInfoArray: TableRequestInfoArray;
+ aTableNameArray: StringArray;
+ i: integer;
+ aTableRequestInfo: TableRequestInfo;
+begin
+ if isNeedSchema then exit;
+ Log('***GetData***');
+
+ aTableNameArray := StringArray.Create;
+ aTableRequestInfoArray := TableRequestInfoArray.Create;
+ try
+ aTableNameArray.Add(AnsiToUtf8(cbGetData.Text));
+ aTableRequestInfo := aTableRequestInfoArray.Add;
+ with aTableRequestInfo do begin
+ IncludeSchema := cbIncludeSchema.checked;
+ MaxRecords := spMaxRecord.Value;
+ UserFilter := AnsiToUtf8(GetDataUserFilter.Text);
+ for i := 0 to vleGetData.Strings.Count - 1 do
+ with Parameters.Add do begin
+ Name := AnsiToUtf8(vleGetData.Keys[i + 1]);
+ Value := vleGetData.Values[Name];
+ end;
+ end;
+ try
+ Stream := FService.GetData(aTableNameArray, aTableRequestInfoArray);
+ if Stream <> nil then try
+ CDSDataTable := TDACDSDataTable.Create(nil);
+ try
+ CDSDataTable.Name := 'TEST';
+ CDSDataTable.LocalDataStreamer := Streamer;
+ CDSDataTable.RemoteFetchEnabled := False;
+ Streamer.ReadDataset(Stream, CDSDataTable, True);
+ log('RecordCount:'#9 + intToStr(CDSDataTable.RecordCount));
+ Log('FieldCount:'#9 + intToStr(CDSDataTable.FieldCount));
+ if (CDSDataTable.FieldCount <> 0) then LogDataset(CDSDataTable);
+ finally
+ CDSDataTable.Free;
+ end;
+ finally
+ Stream.Free;
+ end;
+ except
+ on e: Exception do Log(e.Message);
+ end;
+ finally
+ aTableRequestInfoArray.Free;
+ aTableNameArray.Free;
+ end;
+ Log('*************');
+end;
+
+procedure TServiceMethods_ClientMainForm.GetSchema;
+var
+ i: integer;
+begin
+ cbGetTableSchema.Clear;
+ cbGetCommandSchema.Clear;
+ cbGetData.Clear;
+
+ Log('***GetSchema***');
+ try
+ Schema.LoadFromXml(Utf8ToAnsi(FService.GetSchema('')));
+
+ Log('Datasets.Count:'#9 + IntToStr(Schema.Datasets.Count));
+ for i := 0 to Schema.Datasets.Count - 1 do
+ Log('Datasets[' + IntTostr(i) + ']:'#9 + Schema.Datasets[i].Name);
+ FillCB(cbGetTableSchema, Schema.Datasets);
+ FillCB(cbGetData, Schema.Datasets);
+ FillCB(cbUpdateData, Schema.Datasets);
+
+ Log('Commands.Count:'#9 + IntToStr(Schema.Commands.Count));
+ for i := 0 to Schema.Commands.Count - 1 do
+ Log('Commands[' + IntTostr(i) + ']:'#9 + Schema.Commands[i].Name);
+ FillCB(cbGetCommandSchema, Schema.Commands);
+ FillCB(cbExecuteCommand, Schema.Commands);
+ FillCB(cbExecuteCommandEx, Schema.Commands);
+ except
+ on E: Exception do Log(E.Message);
+ end;
+ Log('***************');
+end;
+
+procedure TServiceMethods_ClientMainForm.GetTableSchema;
+var
+ str: string;
+ strArr: StringArray;
+ doc: IXMLDocument;
+ List: IXMLNodeList;
+ j, i: integer;
+ node, FieldsNode, FieldNode: IXMLNode;
+begin
+ if isNeedSchema then Exit;
+ Log('***GetTableSchema***');
+ StrArr := StringArray.Create;
+ try
+ strArr.Add(AnsiToUtf8(cbGetTableSchema.Text));
+ try
+ str := FService.GetTableSchema(StrArr);
+ doc := NewROXmlDocument;
+ doc.New;
+ doc.XML := Utf8ToAnsi(str);
+ List := doc.DocumentNode.GetNodesByName('SchemaDataTable');
+ for i := 0 to List.Count - 1 do begin
+ Node := List.Nodes[i];
+ if Node = nil then continue;
+ Log('table: ' + Node.GetNodeValue('Name', ''));
+ FieldsNode := Node.GetNodeByName('Fields');
+ if FieldsNode = nil then Continue;
+ for j := 0 to FieldsNode.GetAttributeValue('Count', 0) - 1 do begin
+ FieldNode := FieldsNode.GetNodeByName('Item' + IntToStr(j));
+ if FieldNode = nil then Continue;
+ Log('Fields[' + IntToStr(j) + ']: ' + FieldNode.GetNodeValue('Name', ''));
+ end;
+ end;
+ except
+ on E: Exception do Log(E.Message);
+ end;
+ finally
+ strArr.Free;
+ end;
+ Log('********************');
+end;
+
+procedure TServiceMethods_ClientMainForm.SQLExecuteCommand;
+var
+ aRowsAffacted: integer;
+begin
+ Log('***SQLExecuteCommand***');
+ try
+ aRowsAffacted := FService.SQLExecuteCommand(AnsiToUtf8(MemoSQLExecuteCommand.Text));
+ log('aRowsAffacted:'#9 + intToStr(aRowsAffacted));
+ except
+ on e: Exception do Log(e.Message);
+ end;
+ Log('*********************');
+end;
+
+procedure TServiceMethods_ClientMainForm.SQLGetData;
+var
+ Stream: TMemoryStream;
+ CDSDataTable: TDACDSDataTable;
+begin
+ Log('***SQLGetData***');
+ try
+ Stream := FService.SQLGetData(AnsiToUtf8(memoDQLGetData.Text), sqlIncludeSchema.Checked, sqlMaxRecords.Value);
+ if Stream <> nil then try
+ CDSDataTable := TDACDSDataTable.Create(nil);
+ try
+ CDSDataTable.Name := 'TEST';
+ CDSDataTable.LocalDataStreamer := Streamer;
+ CDSDataTable.RemoteFetchEnabled := False;
+ Streamer.ReadDataset(Stream, CDSDataTable, True);
+ log('RecordCount:'#9 + intToStr(CDSDataTable.RecordCount));
+ Log('FieldCount:'#9 + intToStr(CDSDataTable.FieldCount));
+ if (CDSDataTable.FieldCount <> 0) then LogDataset(CDSDataTable);
+ finally
+ CDSDataTable.Free;
+ end;
+ finally
+ Stream.Free;
+ end;
+ except
+ on e: Exception do Log(e.Message);
+ end;
+end;
+
+procedure TServiceMethods_ClientMainForm.UpdateData;
+var
+ stream1, stream: Binary;
+ i, j: integer;
+
+begin
+ if isNeedSchema then Exit;
+ if DataSource.DataTable = nil then begin
+ ShowMessage('Please select dataset from combobox');
+ Exit;
+ end;
+ Log('***UpdateData***');
+ Log('Delta.Count:'#9 + intToStr(DataSource.DataTable.Delta.Count));
+
+ with DataSource.DataTable.Delta do
+ for i := 0 to Count - 1 do begin
+ Log('----- Delta ' + IntToStr(i) + '-----');
+ with Changes[i] do
+ for j := 0 to (LoggedFieldCount - 1) do
+ Log(LoggedFieldNames[j] + ':'#9 + VarToStr(OldValueByName[LoggedFieldNames[j]]) + ' -> ' + VarToStr(NewValueByName[LoggedFieldNames[j]]));
+ end;
+
+ stream := binary.Create;
+ try
+ Streamer.Initialize(stream, aiWrite);
+ DataSource.DataTable.WriteDeltaToStream(Streamer);
+ Streamer.Finalize;
+ try
+ stream1 := FService.UpdateData(Stream);
+ if Stream1 <> nil then try
+ DataSource.DataTable.Delta.Clear();
+ Streamer.Initialize(stream1, aiRead);
+ DataSource.DataTable.ReadDeltaFromStream(Streamer);
+ Streamer.Finalize;
+ DataSource.DataTable.MergeDelta;
+ finally
+ Stream1.Free;
+ end;
+ except
+ on e: Exception do Log(e.Message);
+ end;
+ finally
+ Stream.Free;
+ end;
+ Log('***************');
+end;
+
+procedure TServiceMethods_ClientMainForm.Log(Str: string);
+begin
+ Memo.Lines.Add(Str);
+end;
+
+procedure TServiceMethods_ClientMainForm.FormCreate(Sender: TObject);
+begin
+ FService := Service as IServiceMethods_Service;
+ Schema := TDASchema.Create(nil);
+end;
+
+procedure TServiceMethods_ClientMainForm.FormDestroy(Sender: TObject);
+begin
+ if DataSource.DataTable <> nil then DataSource.DataTable.Free;
+ Schema.Free;
+end;
+
+procedure TServiceMethods_ClientMainForm.FormShow(Sender: TObject);
+begin
+ PageControl.ActivePage := tsGetSchema;
+ PageControlChange(PageControl);
+end;
+
+procedure TServiceMethods_ClientMainForm.FillCB(ACombobox: Tcombobox; AItems: TDASQLCommandCollection);
+var
+ i: integer;
+begin
+ ACombobox.Items.Clear;
+ for i := 0 to AItems.Count - 1 do
+ ACombobox.Items.Add(AItems[i].Name);
+ if ACombobox.Items.Count > 0 then ACombobox.ItemIndex := 0;
+end;
+
+function TServiceMethods_ClientMainForm.isNeedSchema: Boolean;
+begin
+ Result := (Schema.Datasets.Count = 0) or (Schema.Commands.Count = 0);
+ LogMessage.Visible := Result and
+ (PageControl.ActivePage <> tsGetSchema) and
+ (PageControl.ActivePage <> tsSQLGetData) and
+ (PageControl.ActivePage <> tsSQLExecuteCommand);
+ RunButton.Enabled := not LogMessage.Visible;
+end;
+
+procedure TServiceMethods_ClientMainForm.LogDataset(
+ ADataset: TDACDSDataTable);
+var
+ i: integer;
+ s: string;
+begin
+ log('');
+ s := '';
+ for i := 0 to ADataset.FieldCount - 1 do
+ s := s + ADataset.Fields[i].Name + #9;
+ Log(s);
+ ADataset.first;
+ while not ADataset.Eof do begin
+ s := '';
+ for i := 0 to ADataset.FieldCount - 1 do
+ s := s + ADataset.Fields[i].AsString + #9;
+ Log(s);
+ ADataset.next;
+ end;
+ Log('');
+end;
+
+procedure TServiceMethods_ClientMainForm.cbGetDataChange(Sender: TObject);
+var
+ fDataset: TDADataset;
+ i: integer;
+begin
+ vleGetData.Strings.Clear;
+ try
+ if cbGetData.text = '' then Exit;
+ fDataset := Schema.Datasets.DatasetByName(cbGetData.Text);
+ if fDataset = nil then Exit;
+ for i := 0 to fDataset.Params.Count - 1 do
+ if vleGetData.Strings.IndexOfName(fDataset.Params[i].Name) = -1 then
+ vleGetData.InsertRow(fDataset.Params[i].Name, '', True);
+ finally
+ vleGetData.Visible := vleGetData.Strings.Count > 0;
+ end;
+ Log('*************SQL**************');
+ if fDataset.Statements.Count > 0 then
+ Log(fDataset.Statements[0].SQL)
+ else
+ Log('SQL statement is not found. Probably this table is ExportedDataTable.');
+ Log('******************************');
+
+end;
+
+procedure TServiceMethods_ClientMainForm.cbExecuteCommandChange(
+ Sender: TObject);
+var
+ fcommand: TDASQLCommand;
+ i: integer;
+begin
+ vleExecuteCommand.Strings.Clear;
+ try
+ if cbExecuteCommand.text = '' then Exit;
+ fcommand := Schema.Commands.SQLCommandByName(cbExecuteCommand.Text);
+ if fcommand = nil then Exit;
+ for i := 0 to fcommand.Params.Count - 1 do
+ if fcommand.Params[i].ParamType in [daptInput, daptInputOutput] then
+ if vleExecuteCommand.Strings.IndexOfName(fcommand.Params[i].Name) = -1 then
+ vleExecuteCommand.InsertRow(fcommand.Params[i].Name, '', True);
+ finally
+ vleExecuteCommand.Visible := vleExecuteCommand.Strings.Count > 0;
+ end;
+
+ Log('*************SQL**************');
+ Log(fcommand.Statements[0].SQL);
+ Log('******************************');
+
+end;
+
+procedure TServiceMethods_ClientMainForm.cbUpdateDataChange(Sender: TObject);
+var
+ CDSDataTable: TDACDSDataTable;
+var
+ i: integer;
+begin
+ vleUpdateData.Strings.Clear;
+ if cbUpdateData.text = '' then Exit;
+ if DataSource.DataTable = nil then DataSource.DataTable := TDACDSDataTable.Create(nil);
+ CDSDataTable := TDACDSDataTable(DataSource.DataTable);
+ Log('Try to get data (call GetData)');
+ CDSDataTable.LogicalName := cbUpdateData.Text;
+ FillUpdateDataDataset;
+ try
+ for i := 0 to CDSDataTable.Params.Count - 1 do
+ if vleUpdateData.Strings.IndexOfName(CDSDataTable.Params[i].Name) = -1 then
+ vleUpdateData.InsertRow(CDSDataTable.Params[i].Name, '', True);
+ finally
+ ParamPanel.Visible := vleUpdateData.Strings.Count > 0;
+ end;
+end;
+
+procedure TServiceMethods_ClientMainForm.FillUpdateDataDataset;
+var
+ Stream: TMemoryStream;
+ aTableRequestInfoArray: TableRequestInfoArray;
+ aTableNameArray: StringArray;
+ i: integer;
+ aTableRequestInfo: TableRequestInfo;
+ CDSDataTable: TDACDSDataTable;
+begin
+ CDSDataTable := TDACDSDataTable(DataSource.DataTable);
+ if CDSDataTable = nil then Exit;
+ CDSDataTable.Close;
+ aTableNameArray := StringArray.Create;
+ aTableRequestInfoArray := TableRequestInfoArray.Create;
+ try
+ aTableNameArray.Add(CDSDataTable.LogicalName);
+ aTableRequestInfo := aTableRequestInfoArray.Add;
+ with aTableRequestInfo do begin
+ IncludeSchema := true;
+ MaxRecords := updateDataMaxRecord.Value;
+ UserFilter := '';
+ for i := 0 to vleUpdateData.Strings.Count - 1 do
+ with Parameters.Add do begin
+ Name := vleUpdateData.Keys[i + 1];
+ Value := vleUpdateData.Values[Name];
+ end;
+ end;
+ try
+ Stream := FService.GetData(aTableNameArray, aTableRequestInfoArray);
+ if Stream <> nil then try
+ CDSDataTable.Name := 'TEST';
+ CDSDataTable.LocalDataStreamer := Streamer;
+ CDSDataTable.RemoteFetchEnabled := False;
+ Streamer.ReadDataset(Stream, CDSDataTable, True);
+ finally
+ Stream.Free;
+ end;
+ except
+ on e: Exception do Log(e.Message);
+ end;
+ finally
+ aTableRequestInfoArray.Free;
+ aTableNameArray.Free;
+ end;
+ CDSDataTable.Open;
+end;
+
+procedure TServiceMethods_ClientMainForm.RefreshButtonClick(
+ Sender: TObject);
+begin
+ FillUpdateDataDataset;
+end;
+
+procedure TServiceMethods_ClientMainForm.ClearLogButtonClick(
+ Sender: TObject);
+begin
+ Memo.Lines.Clear;
+end;
+
+procedure TServiceMethods_ClientMainForm.ExecuteCommandEx;
+var
+ aRowsAffacted: integer;
+ dataparam, outputdataparam: DataParameterArray;
+ i: integer;
+begin
+ if isNeedSchema then Exit;
+ Log('***ExecuteCommandEx***');
+ try
+ dataparam := DataParameterArray.Create;
+ try
+ for i := 0 to vleExecuteCommandEx.Strings.Count - 1 do begin
+ with dataparam.Add do begin
+ Name := vleExecuteCommandEx.Keys[i + 1];
+ Value := vleExecuteCommandEx.Values[Name];
+ end;
+ end;
+ aRowsAffacted := FService.ExecuteCommandEx(AnsiToUtf8(cbExecuteCommandEx.Text), dataparam, outputdataparam);
+ log('aRowsAffacted:'#9 + intToStr(aRowsAffacted));
+ Log('Output parameters count:'#9 + IntToStr(outputdataparam.Count));
+ for i := 0 to outputdataparam.Count - 1 do
+ Log(outputdataparam.Items[i].Name + ':'#9 + VarToStr(outputdataparam.Items[i].Value));
+
+ finally
+ outputdataparam.Free;
+ dataparam.Free;
+ end;
+ except
+ on e: Exception do Log(e.Message);
+ end;
+ Log('*******************');
+end;
+
+procedure TServiceMethods_ClientMainForm.cbExecuteCommandExChange(
+ Sender: TObject);
+var
+ fcommand: TDASQLCommand;
+ i: integer;
+begin
+ vleExecuteCommandEx.Strings.Clear;
+ try
+ if cbExecuteCommandEx.text = '' then Exit;
+ fcommand := Schema.Commands.SQLCommandByName(cbExecuteCommandEx.Text);
+ if fcommand = nil then Exit;
+ for i := 0 to fcommand.Params.Count - 1 do
+ if fcommand.Params[i].ParamType in [daptInput, daptInputOutput] then
+ if vleExecuteCommandEx.Strings.IndexOfName(fcommand.Params[i].Name) = -1 then
+ vleExecuteCommandEx.InsertRow(fcommand.Params[i].Name, '', True);
+ finally
+ vleExecuteCommandEx.Visible := vleExecuteCommandEx.Strings.Count > 0;
+ end;
+
+ Log('*************SQL**************');
+ Log(fcommand.Statements[0].SQL);
+ Log('******************************');
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods_Server.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods_Server.bdsproj
new file mode 100644
index 0000000..6364664
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods_Server.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {0E332F4D-5839-4E03-B994-0FB08B51ACCF}
+
+
+
+
+ ServiceMethods_Server.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods_Server.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods_Server.dpr
new file mode 100644
index 0000000..5fd9d20
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods_Server.dpr
@@ -0,0 +1,20 @@
+program ServiceMethods_Server;
+
+uses
+ uROCOMInit,
+ Forms,
+ ServiceMethods_ServerMain in 'ServiceMethods_ServerMain.pas' {ServiceMethods_ServerMainForm},
+ ServiceMethodsLibrary_Intf in 'ServiceMethodsLibrary_Intf.pas',
+ ServiceMethodsLibrary_Invk in 'ServiceMethodsLibrary_Invk.pas',
+ ServiceMethods_Service_Impl in 'ServiceMethods_Service_Impl.pas' {ServiceMethods_Service: TDataAbstractService};
+
+{#ROGEN:ServiceMethodsLibrary.rodl}// RemObjects: Careful, do not remove!
+{$R RODLFILE.res}
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TServiceMethods_ServerMainForm, ServiceMethods_ServerMainForm);
+ Application.Run;
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods_Server.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods_Server.dproj
new file mode 100644
index 0000000..9cc8b12
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods_Server.dproj
@@ -0,0 +1,77 @@
+
+
+ {e615b2bf-3d4f-42f0-a57b-40e742fbf754}
+ ServiceMethods_Server.dpr
+ Debug
+ AnyCPU
+ DCC32
+ ServiceMethods_Server.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ ServiceMethods_Server.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods_Server.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods_Server.res
new file mode 100644
index 0000000..2435bfa
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods_Server.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods_ServerMain.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods_ServerMain.dfm
new file mode 100644
index 0000000..160b6f7
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods_ServerMain.dfm
@@ -0,0 +1,469 @@
+object ServiceMethods_ServerMainForm: TServiceMethods_ServerMainForm
+ Left = 270
+ Top = 153
+ AutoScroll = False
+ Caption = 'ServiceMethods Server'
+ ClientHeight = 435
+ ClientWidth = 596
+ Color = clBtnFace
+ Constraints.MinWidth = 604
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Memo: TMemo
+ Left = 0
+ Top = 250
+ Width = 596
+ Height = 129
+ Align = alBottom
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ ScrollBars = ssVertical
+ TabOrder = 6
+ end
+ object GroupBox1: TGroupBox
+ Left = 202
+ Top = 2
+ Width = 390
+ Height = 220
+ Caption = 'Log events:'
+ TabOrder = 1
+ object cbAfterReleaseConnection: TCheckBox
+ Left = 198
+ Top = 149
+ Width = 187
+ Height = 17
+ Caption = 'AfterReleaseConnection'
+ Checked = True
+ State = cbChecked
+ TabOrder = 20
+ end
+ object cbAfterProcessDeltas: TCheckBox
+ Left = 198
+ Top = 66
+ Width = 187
+ Height = 17
+ Caption = 'AfterProcessDeltas'
+ TabOrder = 15
+ end
+ object cbAfterGetDatasetSchema: TCheckBox
+ Left = 198
+ Top = 15
+ Width = 187
+ Height = 17
+ Caption = 'AfterGetDatasetSchema'
+ Checked = True
+ State = cbChecked
+ TabOrder = 12
+ end
+ object cbAfterGetDatasetData: TCheckBox
+ Left = 7
+ Top = 200
+ Width = 187
+ Height = 17
+ Caption = 'AfterGetDatasetData'
+ TabOrder = 11
+ end
+ object cbAfterExecuteCommand: TCheckBox
+ Left = 198
+ Top = 100
+ Width = 187
+ Height = 17
+ Caption = 'AfterExecuteCommand'
+ TabOrder = 17
+ end
+ object cbAfterAcquireConnection: TCheckBox
+ Left = 7
+ Top = 66
+ Width = 187
+ Height = 17
+ Caption = 'AfterAcquireConnection'
+ Checked = True
+ State = cbChecked
+ TabOrder = 3
+ end
+ object cbBeforeReleaseConnection: TCheckBox
+ Left = 198
+ Top = 132
+ Width = 187
+ Height = 17
+ Caption = 'BeforeReleaseConnection'
+ Checked = True
+ State = cbChecked
+ TabOrder = 19
+ end
+ object cbBeforeProcessDeltas: TCheckBox
+ Left = 198
+ Top = 32
+ Width = 187
+ Height = 17
+ Caption = 'BeforeProcessDeltas'
+ TabOrder = 13
+ end
+ object cbBeforeGetDatasetSchema: TCheckBox
+ Left = 7
+ Top = 166
+ Width = 187
+ Height = 17
+ Caption = 'BeforeGetDatasetSchema'
+ Checked = True
+ State = cbChecked
+ TabOrder = 9
+ end
+ object cbBeforeGetDatasetData: TCheckBox
+ Left = 7
+ Top = 183
+ Width = 187
+ Height = 17
+ Caption = 'BeforeGetDatasetData'
+ TabOrder = 10
+ end
+ object cbBeforeExecuteCommand: TCheckBox
+ Left = 198
+ Top = 83
+ Width = 187
+ Height = 17
+ Caption = 'BeforeExecuteCommand'
+ TabOrder = 16
+ end
+ object cbBeforeAcquireConnection: TCheckBox
+ Left = 7
+ Top = 32
+ Width = 187
+ Height = 17
+ Caption = 'BeforeAcquireConnection'
+ Checked = True
+ State = cbChecked
+ TabOrder = 1
+ end
+ object cbValidateCommandExecution: TCheckBox
+ Left = 7
+ Top = 100
+ Width = 187
+ Height = 17
+ Caption = 'ValidateCommandExecution'
+ TabOrder = 5
+ end
+ object cbUpdateDataRollBackTransaction: TCheckBox
+ Left = 7
+ Top = 132
+ Width = 187
+ Height = 17
+ Caption = 'UpdateDataRollBackTransaction'
+ TabOrder = 7
+ end
+ object cbUpdateDataCommitTransaction: TCheckBox
+ Left = 198
+ Top = 117
+ Width = 187
+ Height = 17
+ Caption = 'UpdateDataCommitTransaction'
+ Checked = True
+ State = cbChecked
+ TabOrder = 18
+ end
+ object cbUpdateDataBeginTransaction: TCheckBox
+ Left = 7
+ Top = 149
+ Width = 187
+ Height = 17
+ Caption = 'UpdateDataBeginTransaction'
+ Checked = True
+ State = cbChecked
+ TabOrder = 8
+ end
+ object cbProcessDeltasError: TCheckBox
+ Left = 198
+ Top = 49
+ Width = 187
+ Height = 17
+ Caption = 'ProcessDeltasError'
+ TabOrder = 14
+ end
+ object cbGetSchemaAsXMLEvent: TCheckBox
+ Left = 7
+ Top = 15
+ Width = 187
+ Height = 17
+ Caption = 'GetSchemaAsXMLEvent'
+ TabOrder = 0
+ end
+ object cbValidateDatasetAccess: TCheckBox
+ Left = 7
+ Top = 83
+ Width = 187
+ Height = 17
+ Caption = 'ValidateDatasetAccess'
+ TabOrder = 4
+ end
+ object cbValidateDirectSQLAccess: TCheckBox
+ Left = 7
+ Top = 117
+ Width = 187
+ Height = 17
+ Caption = 'ValidateDirectSQLAccess'
+ TabOrder = 6
+ end
+ object cbAcquireConnectionFailure: TCheckBox
+ Left = 7
+ Top = 49
+ Width = 187
+ Height = 17
+ Caption = 'AcquireConnectionFailure'
+ TabOrder = 2
+ end
+ object cbBusinessProcessorAutoCreated: TCheckBox
+ Left = 198
+ Top = 166
+ Width = 187
+ Height = 17
+ Caption = 'BusinessProcessorAutoCreated'
+ TabOrder = 21
+ end
+ end
+ object GroupBox2: TGroupBox
+ Left = 2
+ Top = 2
+ Width = 197
+ Height = 220
+ Caption = 'Server options:'
+ TabOrder = 0
+ DesignSize = (
+ 197
+ 220)
+ object cbProcessDeltasErrorRaise: TCheckBox
+ Left = 5
+ Top = 134
+ Width = 190
+ Height = 17
+ Anchors = [akLeft, akTop, akRight]
+ Caption = 'Raise ProcessDeltasError'
+ TabOrder = 7
+ end
+ object cbProcessDeltasWithoutUpdateRules: TCheckBox
+ Left = 5
+ Top = 117
+ Width = 190
+ Height = 17
+ Anchors = [akLeft, akTop, akRight]
+ Caption = 'ProcessDeltasWithoutUpdateRules'
+ TabOrder = 6
+ end
+ object cbAllowExecuteCommands: TCheckBox
+ Left = 5
+ Top = 83
+ Width = 190
+ Height = 17
+ Anchors = [akLeft, akTop, akRight]
+ Caption = 'AllowExecuteCommands'
+ TabOrder = 4
+ end
+ object cbAllowWhereSQL: TCheckBox
+ Left = 5
+ Top = 66
+ Width = 190
+ Height = 17
+ Anchors = [akLeft, akTop, akRight]
+ Caption = 'AllowWhereSQL'
+ TabOrder = 3
+ end
+ object cbAllowExecuteSQL: TCheckBox
+ Left = 5
+ Top = 100
+ Width = 190
+ Height = 17
+ Anchors = [akLeft, akTop, akRight]
+ Caption = 'AllowExecuteSQL'
+ TabOrder = 5
+ end
+ object cbAllowSchemaAccess: TCheckBox
+ Left = 5
+ Top = 15
+ Width = 190
+ Height = 17
+ Anchors = [akLeft, akTop, akRight]
+ Caption = 'AllowSchemaAccess'
+ Checked = True
+ State = cbChecked
+ TabOrder = 0
+ end
+ object cbAllowDataAccess: TCheckBox
+ Left = 5
+ Top = 49
+ Width = 190
+ Height = 17
+ Anchors = [akLeft, akTop, akRight]
+ Caption = 'AllowDataAccess'
+ Checked = True
+ State = cbChecked
+ TabOrder = 2
+ end
+ object cbAcquireConnection: TCheckBox
+ Left = 5
+ Top = 32
+ Width = 190
+ Height = 17
+ Anchors = [akLeft, akTop, akRight]
+ Caption = 'AcquireConnection'
+ Checked = True
+ State = cbChecked
+ TabOrder = 1
+ end
+ object cbAllowDynamicSelect: TCheckBox
+ Left = 5
+ Top = 151
+ Width = 190
+ Height = 14
+ Anchors = [akLeft, akTop, akRight]
+ Caption = 'AllowDynamicSelect'
+ Checked = True
+ State = cbChecked
+ TabOrder = 8
+ end
+ object cbAllowDynamicWhere: TCheckBox
+ Left = 5
+ Top = 168
+ Width = 190
+ Height = 14
+ Anchors = [akLeft, akTop, akRight]
+ Caption = 'AllowDynamicWhere'
+ Checked = True
+ State = cbChecked
+ TabOrder = 9
+ end
+ object cbAllowUpdates: TCheckBox
+ Left = 5
+ Top = 185
+ Width = 190
+ Height = 14
+ Anchors = [akLeft, akTop, akRight]
+ Caption = 'AllowUpdates'
+ Checked = True
+ State = cbChecked
+ TabOrder = 10
+ end
+ object cbAutoCreateBusinessProcessors: TCheckBox
+ Left = 5
+ Top = 202
+ Width = 190
+ Height = 14
+ Anchors = [akLeft, akTop, akRight]
+ Caption = 'AutoCreateBusinessProcessors'
+ Checked = True
+ State = cbChecked
+ TabOrder = 11
+ end
+ end
+ object CheckAllOptionsButton: TButton
+ Left = 21
+ Top = 225
+ Width = 75
+ Height = 22
+ Caption = 'Check all'
+ TabOrder = 2
+ OnClick = CheckAllOptionsButtonClick
+ end
+ object CheckNoneOptionsButton: TButton
+ Left = 101
+ Top = 225
+ Width = 75
+ Height = 22
+ Caption = 'Check none'
+ TabOrder = 3
+ OnClick = CheckNoneOptionsButtonClick
+ end
+ object CheckAllEventsButton: TButton
+ Left = 323
+ Top = 225
+ Width = 74
+ Height = 22
+ Caption = 'Check all'
+ TabOrder = 4
+ OnClick = CheckAllEventsButtonClick
+ end
+ object CheckNoneEventsButton: TButton
+ Left = 402
+ Top = 225
+ Width = 76
+ Height = 22
+ Caption = 'Check none'
+ TabOrder = 5
+ OnClick = CheckNoneEventsButtonClick
+ end
+ object Panel1: TPanel
+ Left = 0
+ Top = 379
+ Width = 596
+ Height = 56
+ Align = alBottom
+ BevelOuter = bvNone
+ TabOrder = 7
+ DesignSize = (
+ 596
+ 56)
+ object DAPoweredByDataAbstractButton2: TDAPoweredByDataAbstractButton
+ Left = 212
+ Top = 6
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ end
+ object ClearLogButton: TButton
+ Left = 515
+ Top = 3
+ Width = 75
+ Height = 22
+ Anchors = [akTop, akRight]
+ Caption = 'Clear log'
+ TabOrder = 0
+ OnClick = ClearLogButtonClick
+ end
+ end
+ object ConnectionManager: TDAConnectionManager
+ Connections = <
+ item
+ Name = 'Northwind'
+ ConnectionString =
+ 'ADO?AuxDriver=SQLOLEDB.1;Server=localhost;Database=Northwind;Use' +
+ 'rID=sa;Password=;'
+ Default = True
+ end>
+ DriverManager = DriverManager
+ PoolingEnabled = True
+ Left = 278
+ Top = 395
+ end
+ object DriverManager: TDADriverManager
+ DriverDirectory = '%SYSTEM%\'
+ TraceActive = False
+ TraceFlags = []
+ Left = 305
+ Top = 395
+ end
+ object ADODriver: TDAADODriver
+ Left = 389
+ Top = 395
+ end
+ object Server: TROIndyHTTPServer
+ Dispatchers = <
+ item
+ Name = 'Message'
+ Message = Message
+ Enabled = True
+ PathInfo = 'Bin'
+ end>
+ Port = 8099
+ Left = 333
+ Top = 395
+ end
+ object Message: TROBinMessage
+ Left = 361
+ Top = 395
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods_ServerMain.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods_ServerMain.pas
new file mode 100644
index 0000000..748b637
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods_ServerMain.pas
@@ -0,0 +1,186 @@
+unit ServiceMethods_ServerMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, uROPoweredByRemObjectsButton, uDAPoweredByDataAbstractButton,
+ StdCtrls, SyncObjs, uDAEngine, uDAADODriver, uDADriverManager, uDAClasses,
+ uROClient, uROBinMessage, uROServer, uROIndyTCPServer, uROIndyHTTPServer,
+ ExtCtrls;
+
+type
+ TServiceMethods_ServerMainForm = class(TForm)
+ Memo: TMemo;
+ ConnectionManager: TDAConnectionManager;
+ DriverManager: TDADriverManager;
+ ADODriver: TDAADODriver;
+ Server: TROIndyHTTPServer;
+ Message: TROBinMessage;
+ GroupBox1: TGroupBox;
+ cbAfterReleaseConnection: TCheckBox;
+ cbAfterProcessDeltas: TCheckBox;
+ cbAfterGetDatasetSchema: TCheckBox;
+ cbAfterGetDatasetData: TCheckBox;
+ cbAfterExecuteCommand: TCheckBox;
+ cbAfterAcquireConnection: TCheckBox;
+ cbBeforeReleaseConnection: TCheckBox;
+ cbBeforeProcessDeltas: TCheckBox;
+ cbBeforeGetDatasetSchema: TCheckBox;
+ cbBeforeGetDatasetData: TCheckBox;
+ cbBeforeExecuteCommand: TCheckBox;
+ cbBeforeAcquireConnection: TCheckBox;
+ cbValidateCommandExecution: TCheckBox;
+ cbUpdateDataRollBackTransaction: TCheckBox;
+ cbUpdateDataCommitTransaction: TCheckBox;
+ cbUpdateDataBeginTransaction: TCheckBox;
+ cbProcessDeltasError: TCheckBox;
+ cbGetSchemaAsXMLEvent: TCheckBox;
+ cbValidateDatasetAccess: TCheckBox;
+ cbValidateDirectSQLAccess: TCheckBox;
+ cbAcquireConnectionFailure: TCheckBox;
+ GroupBox2: TGroupBox;
+ cbProcessDeltasErrorRaise: TCheckBox;
+ cbProcessDeltasWithoutUpdateRules: TCheckBox;
+ cbAllowExecuteCommands: TCheckBox;
+ cbAllowWhereSQL: TCheckBox;
+ cbAllowExecuteSQL: TCheckBox;
+ cbAllowSchemaAccess: TCheckBox;
+ cbAllowDataAccess: TCheckBox;
+ cbAcquireConnection: TCheckBox;
+ CheckAllOptionsButton: TButton;
+ CheckNoneOptionsButton: TButton;
+ CheckAllEventsButton: TButton;
+ CheckNoneEventsButton: TButton;
+ Panel1: TPanel;
+ DAPoweredByDataAbstractButton2: TDAPoweredByDataAbstractButton;
+ ClearLogButton: TButton;
+ cbAllowDynamicSelect: TCheckBox;
+ cbAllowDynamicWhere: TCheckBox;
+ cbAllowUpdates: TCheckBox;
+ cbAutoCreateBusinessProcessors: TCheckBox;
+ cbBusinessProcessorAutoCreated: TCheckBox;
+ procedure FormCreate(Sender: TObject);
+ procedure FormDestroy(Sender: TObject);
+ procedure ClearLogButtonClick(Sender: TObject);
+ procedure CheckAllOptionsButtonClick(Sender: TObject);
+ procedure CheckNoneOptionsButtonClick(Sender: TObject);
+ procedure CheckAllEventsButtonClick(Sender: TObject);
+ procedure CheckNoneEventsButtonClick(Sender: TObject);
+ private
+ { Private declarations }
+ FcriticalSection: TCriticalSection;
+ procedure ChangeOptions(Mode: Boolean);
+ procedure ChangeEvent(Mode: Boolean);
+ public
+ { Public declarations }
+ procedure Log(Str: string);
+ end;
+
+var
+ ServiceMethods_ServerMainForm: TServiceMethods_ServerMainForm;
+
+implementation
+
+{$R *.dfm}
+
+{ TServiceMethods_ServerMainForm }
+
+procedure TServiceMethods_ServerMainForm.Log(Str: string);
+begin
+ FcriticalSection.Enter;
+ try
+ Memo.Lines.Add(Str);
+ finally
+ FcriticalSection.Leave;
+ end;
+end;
+
+procedure TServiceMethods_ServerMainForm.FormCreate(Sender: TObject);
+begin
+ FcriticalSection := TCriticalSection.Create;
+
+ Server.Active := True;
+end;
+
+procedure TServiceMethods_ServerMainForm.FormDestroy(Sender: TObject);
+begin
+ FcriticalSection.Free;
+end;
+
+procedure TServiceMethods_ServerMainForm.ClearLogButtonClick(
+ Sender: TObject);
+begin
+ FcriticalSection.Enter;
+ try
+ Memo.Lines.Clear;
+ finally
+ FcriticalSection.Leave;
+ end;
+end;
+
+procedure TServiceMethods_ServerMainForm.CheckAllOptionsButtonClick(Sender: TObject);
+begin
+ ChangeOptions(True);
+end;
+
+procedure TServiceMethods_ServerMainForm.ChangeOptions(Mode: Boolean);
+begin
+ cbAllowSchemaAccess.Checked := Mode;
+ cbAcquireConnection.Checked := Mode;
+ cbAllowDataAccess.Checked := Mode;
+ cbAllowWhereSQL.Checked := Mode;
+ cbAllowExecuteCommands.Checked := Mode;
+ cbAllowExecuteSQL.Checked := Mode;
+ cbProcessDeltasWithoutUpdateRules.Checked := Mode;
+ cbProcessDeltasErrorRaise.Checked := Mode;
+ cbAllowDynamicSelect.Checked := Mode;
+ cbAllowDynamicWhere.Checked := Mode;
+ cbAllowUpdates.Checked := Mode;
+ cbAutoCreateBusinessProcessors.Checked := Mode;
+end;
+
+procedure TServiceMethods_ServerMainForm.CheckNoneOptionsButtonClick(
+ Sender: TObject);
+begin
+ ChangeOptions(False);
+end;
+
+procedure TServiceMethods_ServerMainForm.ChangeEvent(Mode: Boolean);
+begin
+ cbAfterReleaseConnection.Checked := Mode;
+ cbAfterProcessDeltas.Checked := Mode;
+ cbAfterGetDatasetSchema.Checked := Mode;
+ cbAfterGetDatasetData.Checked := Mode;
+ cbAfterExecuteCommand.Checked := Mode;
+ cbAfterAcquireConnection.Checked := Mode;
+ cbBeforeReleaseConnection.Checked := Mode;
+ cbBeforeProcessDeltas.Checked := Mode;
+ cbBeforeGetDatasetSchema.Checked := Mode;
+ cbBeforeGetDatasetData.Checked := Mode;
+ cbBeforeExecuteCommand.Checked := Mode;
+ cbBeforeAcquireConnection.Checked := Mode;
+ cbValidateCommandExecution.Checked := Mode;
+ cbUpdateDataRollBackTransaction.Checked := Mode;
+ cbUpdateDataCommitTransaction.Checked := Mode;
+ cbUpdateDataBeginTransaction.Checked := Mode;
+ cbProcessDeltasError.Checked := Mode;
+ cbGetSchemaAsXMLEvent.Checked := Mode;
+ cbValidateDatasetAccess.Checked := Mode;
+ cbValidateDirectSQLAccess.Checked := Mode;
+ cbAcquireConnectionFailure.Checked := Mode;
+ cbBusinessProcessorAutoCreated.Checked := Mode;
+end;
+
+procedure TServiceMethods_ServerMainForm.CheckAllEventsButtonClick(Sender: TObject);
+begin
+ ChangeEvent(True);
+end;
+
+procedure TServiceMethods_ServerMainForm.CheckNoneEventsButtonClick(Sender: TObject);
+begin
+ ChangeEvent(False);
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods_Service_Impl.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods_Service_Impl.dfm
new file mode 100644
index 0000000..86b9676
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods_Service_Impl.dfm
@@ -0,0 +1,356 @@
+object ServiceMethods_Service: TServiceMethods_Service
+ OldCreateOrder = True
+ OnCreate = DataAbstractServiceCreate
+ OnDestroy = DataAbstractServiceDestroy
+ OnActivate = DataAbstractServiceActivate
+ OnDeactivate = DataAbstractServiceDeactivate
+ AcquireConnection = False
+ ServiceSchema = DASchema
+ ServiceDataStreamer = BinDataStreamer
+ ExportedDataTables = <>
+ BeforeAcquireConnection = DataAbstractServiceBeforeAcquireConnection
+ AfterAcquireConnection = DataAbstractServiceAfterAcquireConnection
+ BeforeReleaseConnection = DataAbstractServiceBeforeReleaseConnection
+ AfterReleaseConnection = DataAbstractServiceAfterReleaseConnection
+ OnAcquireConnectionFailure = DataAbstractServiceAcquireConnectionFailure
+ BeforeProcessDeltas = DataAbstractServiceBeforeProcessDeltas
+ AfterProcessDeltas = DataAbstractServiceAfterProcessDeltas
+ OnProcessDeltasError = DataAbstractServiceProcessDeltasError
+ BeforeGetDatasetSchema = DataAbstractServiceBeforeGetDatasetSchema
+ BeforeGetDatasetData = DataAbstractServiceBeforeGetDatasetData
+ AfterGetDatasetSchema = DataAbstractServiceAfterGetDatasetSchema
+ AfterGetDatasetData = DataAbstractServiceAfterGetDatasetData
+ OnBusinessProcessorAutoCreated = DataAbstractServiceBusinessProcessorAutoCreated
+ BeforeExecuteCommand = DataAbstractServiceBeforeExecuteCommand
+ AfterExecuteCommand = DataAbstractServiceAfterExecuteCommand
+ OnGetSchemaAsXMLEvent = DataAbstractServiceGetSchemaAsXMLEvent
+ ValidateDatasetAccess = DataAbstractServiceValidateDatasetAccess
+ ValidateCommandExecution = DataAbstractServiceValidateCommandExecution
+ ValidateDirectSQLAccess = DataAbstractServiceValidateDirectSQLAccess
+ OnUpdateDataBeginTransaction = DataAbstractServiceUpdateDataBeginTransaction
+ OnUpdateDataCommitTransaction = DataAbstractServiceUpdateDataCommitTransaction
+ OnUpdateDataRollBackTransaction = DataAbstractServiceUpdateDataRollBackTransaction
+ Left = 576
+ Top = 180
+ Height = 300
+ Width = 300
+ object BinDataStreamer: TDABinDataStreamer
+ Left = 29
+ Top = 10
+ end
+ object DASchema: TDASchema
+ ConnectionManager = ServiceMethods_ServerMainForm.ConnectionManager
+ Datasets = <
+ item
+ Params = <>
+ Statements = <
+ item
+ Connection = 'Northwind'
+ TargetTable = 'Customers'
+ SQL =
+ 'SELECT '#10' CustomerID, CompanyName, ContactName, ContactTitle, ' +
+ #10' Address, City, Region, PostalCode, Country, Phone, '#10' Fax' +
+ #10' FROM'#10' Customers'
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'CustomerID'
+ TableField = 'CustomerID'
+ end
+ item
+ DatasetField = 'CompanyName'
+ TableField = 'CompanyName'
+ end
+ item
+ DatasetField = 'ContactName'
+ TableField = 'ContactName'
+ end
+ item
+ DatasetField = 'ContactTitle'
+ TableField = 'ContactTitle'
+ end
+ item
+ DatasetField = 'Address'
+ TableField = 'Address'
+ end
+ item
+ DatasetField = 'City'
+ TableField = 'City'
+ end
+ item
+ DatasetField = 'Region'
+ TableField = 'Region'
+ end
+ item
+ DatasetField = 'PostalCode'
+ TableField = 'PostalCode'
+ end
+ item
+ DatasetField = 'Country'
+ TableField = 'Country'
+ end
+ item
+ DatasetField = 'Phone'
+ TableField = 'Phone'
+ end
+ item
+ DatasetField = 'Fax'
+ TableField = 'Fax'
+ end>
+ end>
+ Name = 'Customers'
+ Fields = <
+ item
+ Name = 'CustomerID'
+ DataType = datWideString
+ Size = 5
+ LogChanges = False
+ InPrimaryKey = True
+ end
+ item
+ Name = 'CompanyName'
+ DataType = datWideString
+ Size = 40
+ end
+ item
+ Name = 'ContactName'
+ DataType = datWideString
+ Size = 30
+ end
+ item
+ Name = 'ContactTitle'
+ DataType = datWideString
+ Size = 30
+ end
+ item
+ Name = 'Address'
+ DataType = datWideString
+ Size = 60
+ end
+ item
+ Name = 'City'
+ DataType = datWideString
+ Size = 15
+ end
+ item
+ Name = 'Region'
+ DataType = datWideString
+ Size = 15
+ end
+ item
+ Name = 'PostalCode'
+ DataType = datWideString
+ Size = 10
+ end
+ item
+ Name = 'Country'
+ DataType = datWideString
+ Size = 15
+ end
+ item
+ Name = 'Phone'
+ DataType = datWideString
+ Size = 24
+ end
+ item
+ Name = 'Fax'
+ DataType = datWideString
+ Size = 24
+ end>
+ end
+ item
+ Params = <
+ item
+ Name = 'CustomerID'
+ DataType = datWideString
+ Size = 5
+ ParamType = daptInput
+ end>
+ Statements = <
+ item
+ Connection = 'Northwind'
+ TargetTable = 'Orders'
+ SQL =
+ 'SELECT OrderID, CustomerID, EmployeeID, OrderDate, RequiredDate,' +
+ ' ShippedDate, ShipVia, Freight, ShipName, ShipAddress, ShipCity,' +
+ ' ShipRegion, ShipPostalCode, ShipCountry FROM Orders Where Custo' +
+ 'merID = :CustomerID'
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'OrderID'
+ TableField = 'OrderID'
+ end
+ item
+ DatasetField = 'CustomerID'
+ TableField = 'CustomerID'
+ end
+ item
+ DatasetField = 'EmployeeID'
+ TableField = 'EmployeeID'
+ end
+ item
+ DatasetField = 'OrderDate'
+ TableField = 'OrderDate'
+ end
+ item
+ DatasetField = 'RequiredDate'
+ TableField = 'RequiredDate'
+ end
+ item
+ DatasetField = 'ShippedDate'
+ TableField = 'ShippedDate'
+ end
+ item
+ DatasetField = 'ShipVia'
+ TableField = 'ShipVia'
+ end
+ item
+ DatasetField = 'Freight'
+ TableField = 'Freight'
+ end
+ item
+ DatasetField = 'ShipName'
+ TableField = 'ShipName'
+ end
+ item
+ DatasetField = 'ShipAddress'
+ TableField = 'ShipAddress'
+ end
+ item
+ DatasetField = 'ShipCity'
+ TableField = 'ShipCity'
+ end
+ item
+ DatasetField = 'ShipRegion'
+ TableField = 'ShipRegion'
+ end
+ item
+ DatasetField = 'ShipPostalCode'
+ TableField = 'ShipPostalCode'
+ end
+ item
+ DatasetField = 'ShipCountry'
+ TableField = 'ShipCountry'
+ end>
+ end>
+ Name = 'Orders'
+ Fields = <
+ item
+ Name = 'OrderID'
+ DataType = datInteger
+ LogChanges = False
+ InPrimaryKey = True
+ end
+ item
+ Name = 'CustomerID'
+ DataType = datWideString
+ Size = 5
+ end
+ item
+ Name = 'EmployeeID'
+ DataType = datInteger
+ end
+ item
+ Name = 'OrderDate'
+ DataType = datDateTime
+ end
+ item
+ Name = 'RequiredDate'
+ DataType = datDateTime
+ end
+ item
+ Name = 'ShippedDate'
+ DataType = datDateTime
+ end
+ item
+ Name = 'ShipVia'
+ DataType = datInteger
+ end
+ item
+ Name = 'Freight'
+ DataType = datFloat
+ end
+ item
+ Name = 'ShipName'
+ DataType = datWideString
+ Size = 40
+ end
+ item
+ Name = 'ShipAddress'
+ DataType = datWideString
+ Size = 60
+ end
+ item
+ Name = 'ShipCity'
+ DataType = datWideString
+ Size = 15
+ end
+ item
+ Name = 'ShipRegion'
+ DataType = datWideString
+ Size = 15
+ end
+ item
+ Name = 'ShipPostalCode'
+ DataType = datWideString
+ Size = 10
+ end
+ item
+ Name = 'ShipCountry'
+ DataType = datWideString
+ Size = 15
+ end>
+ end>
+ JoinDataTables = <>
+ UnionDataTables = <>
+ Commands = <
+ item
+ Params = <
+ item
+ Name = 'CUSTOMERS_CNT'
+ DataType = datInteger
+ ParamType = daptOutput
+ end>
+ Statements = <
+ item
+ Connection = 'Northwind'
+ SQL = 'SELECT :CUSTOMERS_CNT = count(*) from customers'#10
+ StatementType = stSQL
+ ColumnMappings = <>
+ end>
+ Name = 'CustomersCount'
+ end
+ item
+ Params = <
+ item
+ Name = 'CustomerID'
+ DataType = datWideString
+ Size = 5
+ ParamType = daptInput
+ end
+ item
+ Name = 'CustomerID'
+ DataType = datWideString
+ Size = 5
+ ParamType = daptInput
+ end>
+ Statements = <
+ item
+ Connection = 'Northwind'
+ TargetTable = 'Orders'
+ SQL =
+ 'update orders set CustomerID = :CustomerID where CustomerID = :C' +
+ 'ustomerID'#10
+ StatementType = stSQL
+ ColumnMappings = <>
+ end>
+ Name = 'UpdateOrders'
+ end>
+ RelationShips = <>
+ UpdateRules = <>
+ Version = 0
+ Left = 29
+ Top = 55
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods_Service_Impl.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods_Service_Impl.pas
new file mode 100644
index 0000000..9dde52d
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Service Methods/ServiceMethods_Service_Impl.pas
@@ -0,0 +1,490 @@
+unit ServiceMethods_Service_Impl;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ This is where you are supposed to code the implementation of your objects. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils,
+ {RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
+ {Ancestor Implementation:} DataAbstractService_Impl,
+ {Used RODLs:} DataAbstract4_Intf,
+ {Generated:} ServiceMethodsLibrary_Intf, uDADataStreamer, uDABinAdapter,
+ uDAInterfaces, uDABusinessProcessor, uDAClasses, uRORemoteDataModule;
+
+type
+ { TServiceMethods_Service }
+ TServiceMethods_Service = class(TDataAbstractService, IServiceMethods_Service)
+ BinDataStreamer: TDABinDataStreamer;
+ DASchema: TDASchema;
+ procedure DataAbstractServiceAfterAcquireConnection(aSender: TObject;
+ const aConnectionName: string;
+ const aAcquiredConnection: IDAConnection);
+ procedure DataAbstractServiceAfterExecuteCommand(aSender: TObject;
+ const aCommand: IDASQLCommand; aRowsAffacted: Integer);
+ procedure DataAbstractServiceAfterGetDatasetData(aSender: TObject;
+ const aDataset: IDADataset; const aIncludeSchema: Boolean;
+ const aMaxRecords: Integer);
+ procedure DataAbstractServiceAfterGetDatasetSchema(aSender: TObject;
+ const aDataset: IDADataset);
+ procedure DataAbstractServiceAfterProcessDeltas(aSender: TObject;
+ aDeltaStructs: TDADeltaStructList);
+ procedure DataAbstractServiceAfterReleaseConnection(aSender: TObject;
+ const aConnectionName: string);
+ procedure DataAbstractServiceBeforeAcquireConnection(aSender: TObject;
+ var aConnectionName: string);
+ procedure DataAbstractServiceBeforeExecuteCommand(aSender: TObject;
+ const aCommand: IDASQLCommand);
+ procedure DataAbstractServiceBeforeGetDatasetData(aSender: TObject;
+ const aDataset: IDADataset; const aIncludeSchema: Boolean;
+ const aMaxRecords: Integer);
+ procedure DataAbstractServiceBeforeGetDatasetSchema(aSender: TObject;
+ const aDataset: IDADataset);
+ procedure DataAbstractServiceBeforeProcessDeltas(aSender: TObject;
+ aDeltaStructs: TDADeltaStructList);
+ procedure DataAbstractServiceBeforeReleaseConnection(aSender: TObject;
+ const aConnectionName: string;
+ const aAcquiredConnection: IDAConnection);
+ procedure DataAbstractServiceGetSchemaAsXMLEvent(aSender: TObject;
+ var aSchemaXML: string);
+ procedure DataAbstractServiceProcessDeltasError(aSender: TObject;
+ aDeltaStructs: TDADeltaStructList; aError: Exception;
+ var aDoRaise: Boolean);
+ procedure DataAbstractServiceUpdateDataBeginTransaction(
+ Sender: TObject; var aUseDefaultTransactionLogic: Boolean);
+ procedure DataAbstractServiceUpdateDataCommitTransaction(
+ Sender: TObject; var aUseDefaultTransactionLogic: Boolean);
+ procedure DataAbstractServiceUpdateDataRollBackTransaction(
+ Sender: TObject; var aUseDefaultTransactionLogic: Boolean);
+ procedure DataAbstractServiceValidateCommandExecution(Sender: TObject;
+ const aConnection: IDAConnection; const aDatasetName: string;
+ const aParamNames: array of string;
+ const aParamValues: array of Variant; aSchema: TDASchema;
+ var Allowed: Boolean);
+ procedure DataAbstractServiceValidateDatasetAccess(Sender: TObject;
+ const aConnection: IDAConnection; const aDatasetName: string;
+ const aParamNames: array of string;
+ const aParamValues: array of Variant; aSchema: TDASchema;
+ var Allowed: Boolean);
+ procedure DataAbstractServiceValidateDirectSQLAccess(Sender: TObject;
+ const aConnection: IDAConnection; const aSQLText: string;
+ const aParamNames: array of string;
+ const aParamValues: array of Variant; var Allowed: Boolean);
+ procedure DataAbstractServiceAcquireConnectionFailure(aSender: TObject;
+ const aConnectionName: string; aError: Exception);
+ procedure DataAbstractServiceCreate(Sender: TObject);
+ procedure DataAbstractServiceDestroy(Sender: TObject);
+ procedure DataAbstractServiceActivate(const aClientID: TGUID;
+ aSession: TROSession; const aMessage: IROMessage);
+ procedure DataAbstractServiceDeactivate(const aClientID: TGUID;
+ aSession: TROSession);
+ procedure DataAbstractServiceBusinessProcessorAutoCreated(
+ aSender: TRORemoteDataModule;
+ BusinessProcessor: TDABusinessProcessor);
+ private
+ procedure Log(Astr: string);
+ protected
+ { IServiceMethods_Service methods }
+ end;
+
+implementation
+
+{$R *.dfm}
+uses
+ {Generated:} ServiceMethodsLibrary_Invk,
+ ServiceMethods_ServerMain, Variants;
+
+procedure Create_ServiceMethods_Service(out anInstance: IUnknown);
+begin
+ anInstance := TServiceMethods_Service.Create(nil);
+end;
+
+{ TServiceMethods_Service }
+
+procedure TServiceMethods_Service.Log(Astr: string);
+begin
+ ServiceMethods_ServerMainForm.Log(Astr);
+end;
+
+procedure TServiceMethods_Service.DataAbstractServiceAfterAcquireConnection(
+ aSender: TObject; const aConnectionName: string;
+ const aAcquiredConnection: IDAConnection);
+begin
+ inherited;
+ if not ServiceMethods_ServerMainForm.cbAfterAcquireConnection.Checked then Exit;
+ Log('***AfterAcquireConnection***');
+ Log('ConnectionName:'#9 + aConnectionName);
+ Log('aAcquiredConnection.Name:'#9 + aAcquiredConnection.Name);
+ Log('aAcquiredConnection.ConnectionString:'#9 + aAcquiredConnection.ConnectionString);
+ Log('****************************');
+ Log('');
+end;
+
+procedure TServiceMethods_Service.DataAbstractServiceAfterExecuteCommand(
+ aSender: TObject; const aCommand: IDASQLCommand; aRowsAffacted: Integer);
+begin
+ inherited;
+ if not ServiceMethods_ServerMainForm.cbAfterExecuteCommand.Checked then Exit;
+ Log('***AfterExecuteCommand***');
+ Log('aCommand.Name:'#9 + aCommand.Name);
+ Log('aCommand.SQL:'#9 + aCommand.SQL);
+ Log('aRowsAffacted:'#9 + IntToStr(aRowsAffacted));
+ Log('*************************');
+ Log('');
+end;
+
+procedure TServiceMethods_Service.DataAbstractServiceAfterGetDatasetData(
+ aSender: TObject; const aDataset: IDADataset;
+ const aIncludeSchema: Boolean; const aMaxRecords: Integer);
+begin
+ inherited;
+ if not ServiceMethods_ServerMainForm.cbAfterGetDatasetData.Checked then Exit;
+ Log('***AfterGetDatasetData***');
+ Log('aDataset.Name:'#9 + aDataset.Name);
+ Log('aDataset.SQL:'#9 + aDataset.SQL);
+ Log('aIncludeSchema:'#9 + BoolStr[aIncludeSchema]);
+ Log('aMaxRecords:'#9 + IntToStr(aMaxRecords));
+ Log('*************************');
+ Log('');
+end;
+
+procedure TServiceMethods_Service.DataAbstractServiceAfterGetDatasetSchema(
+ aSender: TObject; const aDataset: IDADataset);
+begin
+ inherited;
+ if not ServiceMethods_ServerMainForm.cbAfterGetDatasetSchema.Checked then Exit;
+ Log('***AfterGetDatasetSchema***');
+ Log('aDataset.Name:'#9 + aDataset.Name);
+ Log('aDataset.SQL:'#9 + aDataset.SQL);
+ Log('***************************');
+ Log('');
+end;
+
+procedure TServiceMethods_Service.DataAbstractServiceAfterProcessDeltas(
+ aSender: TObject; aDeltaStructs: TDADeltaStructList);
+begin
+ inherited;
+ if not ServiceMethods_ServerMainForm.cbAfterProcessDeltas.Checked then Exit;
+ Log('***AfterProcessDeltas***');
+ Log('aDeltaStructs.Count:'#9 + IntToStr(aDeltaStructs.Count));
+ Log('************************');
+ Log('');
+end;
+
+procedure TServiceMethods_Service.DataAbstractServiceAfterReleaseConnection(
+ aSender: TObject; const aConnectionName: string);
+begin
+ inherited;
+ if not ServiceMethods_ServerMainForm.cbAfterReleaseConnection.Checked then Exit;
+ Log('***AfterReleaseConnection***');
+ Log('aConnectionName:'#9 + aConnectionName);
+ Log('****************************');
+ Log('');
+end;
+
+procedure TServiceMethods_Service.DataAbstractServiceBeforeAcquireConnection(
+ aSender: TObject; var aConnectionName: string);
+begin
+ inherited;
+ if not ServiceMethods_ServerMainForm.cbBeforeAcquireConnection.Checked then Exit;
+
+ Log('***BeforeAcquireConnection***');
+ Log('aConnectionName:'#9 + aConnectionName);
+ Log('************************');
+ Log('');
+end;
+
+procedure TServiceMethods_Service.DataAbstractServiceBeforeExecuteCommand(
+ aSender: TObject; const aCommand: IDASQLCommand);
+begin
+ inherited;
+ if not ServiceMethods_ServerMainForm.cbBeforeExecuteCommand.Checked then Exit;
+ Log('***BeforeExecuteCommand***');
+ Log('aCommand.Name:'#9 + aCommand.Name);
+ Log('aCommand.SQL:'#9 + aCommand.SQL);
+ Log('************************');
+ Log('');
+end;
+
+procedure TServiceMethods_Service.DataAbstractServiceBeforeGetDatasetData(
+ aSender: TObject; const aDataset: IDADataset;
+ const aIncludeSchema: Boolean; const aMaxRecords: Integer);
+begin
+ inherited;
+ if not ServiceMethods_ServerMainForm.cbBeforeGetDatasetData.Checked then Exit;
+
+ Log('***BeforeGetDatasetData***');
+ Log('aDataset.Name:'#9 + aDataset.Name);
+ Log('aDataset.SQL:'#9 + aDataset.SQL);
+ Log('aIncludeSchema:'#9 + BoolStr[aIncludeSchema]);
+ Log('aMaxRecords:'#9 + IntToStr(aMaxRecords));
+ Log('*************************');
+ Log('');
+end;
+
+procedure TServiceMethods_Service.DataAbstractServiceBeforeGetDatasetSchema(
+ aSender: TObject; const aDataset: IDADataset);
+begin
+ inherited;
+ if not ServiceMethods_ServerMainForm.cbBeforeGetDatasetSchema.Checked then Exit;
+
+ Log('***BeforeGetDatasetSchema***');
+ Log('aDataset.Name:'#9 + aDataset.Name);
+ Log('aDataset.SQL:'#9 + aDataset.SQL);
+ Log('****************************');
+ Log('');
+end;
+
+procedure TServiceMethods_Service.DataAbstractServiceBeforeProcessDeltas(
+ aSender: TObject; aDeltaStructs: TDADeltaStructList);
+begin
+ inherited;
+ if not ServiceMethods_ServerMainForm.cbBeforeProcessDeltas.Checked then Exit;
+ Log('***BeforeProcessDeltas***');
+ Log('aDeltaStructs.Count:'#9 + IntToStr(aDeltaStructs.Count));
+ Log('*************************');
+ Log('');
+end;
+
+procedure TServiceMethods_Service.DataAbstractServiceBeforeReleaseConnection(
+ aSender: TObject; const aConnectionName: string;
+ const aAcquiredConnection: IDAConnection);
+begin
+ inherited;
+ if not ServiceMethods_ServerMainForm.cbBeforeReleaseConnection.Checked then Exit;
+
+ Log('***BeforeReleaseConnection***');
+ Log('aConnectionName:'#9 + aConnectionName);
+ Log('aAcquiredConnection.Name:'#9 + aAcquiredConnection.Name);
+ Log('aAcquiredConnection.ConnectionString:'#9 + aAcquiredConnection.ConnectionString);
+ Log('*****************************');
+ Log('');
+end;
+
+procedure TServiceMethods_Service.DataAbstractServiceGetSchemaAsXMLEvent(
+ aSender: TObject; var aSchemaXML: string);
+begin
+ inherited;
+ if not ServiceMethods_ServerMainForm.cbGetSchemaAsXMLEvent.Checked then Exit;
+
+ Log('***GetSchemaAsXMLEvent***');
+ Log('Length(aSchemaXML):'#9 + intTostr(Length(aSchemaXML)));
+ Log('*************************');
+ Log('');
+end;
+
+procedure TServiceMethods_Service.DataAbstractServiceProcessDeltasError(
+ aSender: TObject; aDeltaStructs: TDADeltaStructList; aError: Exception;
+ var aDoRaise: Boolean);
+begin
+ inherited;
+ if not ServiceMethods_ServerMainForm.cbProcessDeltasError.Checked then Exit;
+
+ aDoRaise := ServiceMethods_ServerMainForm.cbProcessDeltasErrorRaise.Checked;
+ Log('***ProcessDeltasError***');
+ Log('aDeltaStructs.Count:'#9 + IntToStr(aDeltaStructs.Count));
+ Log('aError.ClassName:'#9 + aError.ClassName);
+ Log('aError.Message:'#9 + aError.Message);
+ Log('aDoRaise:'#9 + BoolStr[aDoRaise]);
+ Log('*************************');
+ Log('');
+end;
+
+procedure TServiceMethods_Service.DataAbstractServiceUpdateDataBeginTransaction(
+ Sender: TObject; var aUseDefaultTransactionLogic: Boolean);
+begin
+ inherited;
+ if not ServiceMethods_ServerMainForm.cbUpdateDataBeginTransaction.Checked then Exit;
+
+ Log('***UpdateDataBeginTransaction***');
+ Log('aUseDefaultTransactionLogic:'#9 + BoolStr[aUseDefaultTransactionLogic]);
+ Log('********************************');
+ Log('');
+end;
+
+procedure TServiceMethods_Service.DataAbstractServiceUpdateDataCommitTransaction(
+ Sender: TObject; var aUseDefaultTransactionLogic: Boolean);
+begin
+ inherited;
+ if not ServiceMethods_ServerMainForm.cbUpdateDataCommitTransaction.Checked then Exit;
+
+ Log('***UpdateDataCommitTransaction***');
+ Log('aUseDefaultTransactionLogic:'#9 + BoolStr[aUseDefaultTransactionLogic]);
+ Log('*********************************');
+ Log('');
+end;
+
+procedure TServiceMethods_Service.DataAbstractServiceUpdateDataRollBackTransaction(
+ Sender: TObject; var aUseDefaultTransactionLogic: Boolean);
+begin
+ inherited;
+ if not ServiceMethods_ServerMainForm.cbUpdateDataRollBackTransaction.Checked then Exit;
+ Log('***UpdateDataRollBackTransaction***');
+ Log('aUseDefaultTransactionLogic:'#9 + BoolStr[aUseDefaultTransactionLogic]);
+ Log('***********************************');
+ Log('');
+end;
+
+procedure TServiceMethods_Service.DataAbstractServiceValidateCommandExecution(
+ Sender: TObject; const aConnection: IDAConnection;
+ const aDatasetName: string; const aParamNames: array of string;
+ const aParamValues: array of Variant; aSchema: TDASchema;
+ var Allowed: Boolean);
+var
+ i: integer;
+ SQLCommand: TDASQLCommand;
+begin
+ inherited;
+ if not ServiceMethods_ServerMainForm.cbValidateCommandExecution.Checked then Exit;
+
+ Log('***ValidateCommandExecution***');
+ Log('aConnection.Name:'#9 + aConnection.Name);
+ Log('aDatasetName:'#9 + aDatasetName);
+ SQLCommand := aSchema.Commands.SQLCommandByName(aDatasetName);
+ if (SQLCommand <> nil) and (SQLCommand.Statements.Count > 0) then
+ Log('Command SQL:'#9 + SQLCommand.Statements[0].SQL);
+ Log('ParamCount:'#9 + intToStr(1 + ord(High(aParamNames)) - ord(Low(aParamNames))));
+ for i := Low(aParamNames) to High(aParamNames) do
+ Log(#9 + aParamNames[i] + ' = ' + VarToStr(aParamValues[i]));
+ Log('aSchema.Name:'#9 + aSchema.Name);
+ Log('Allowed:'#9 + BoolStr[Allowed]);
+ Log('******************************');
+ Log('');
+end;
+
+procedure TServiceMethods_Service.DataAbstractServiceValidateDatasetAccess(
+ Sender: TObject; const aConnection: IDAConnection;
+ const aDatasetName: string; const aParamNames: array of string;
+ const aParamValues: array of Variant; aSchema: TDASchema;
+ var Allowed: Boolean);
+var
+ i: integer;
+begin
+ inherited;
+ if not ServiceMethods_ServerMainForm.cbValidateDatasetAccess.Checked then Exit;
+
+ Log('***ValidateDatasetAccess***');
+ Log('aConnection.Name:'#9 + aConnection.Name);
+ Log('aDatasetName:'#9 + aDatasetName);
+ Log('ParamCount:'#9 + intToStr(1 + ord(High(aParamNames)) - ord(Low(aParamNames))));
+ for i := Low(aParamNames) to High(aParamNames) do
+ Log(#9 + aParamNames[i] + ' = ' + VarToStr(aParamValues[i]));
+ Log('aSchema.Name:'#9 + aSchema.Name);
+ Log('Allowed:'#9 + BoolStr[Allowed]);
+ Log('***************************');
+ Log('');
+end;
+
+procedure TServiceMethods_Service.DataAbstractServiceValidateDirectSQLAccess(
+ Sender: TObject; const aConnection: IDAConnection;
+ const aSQLText: string; const aParamNames: array of string;
+ const aParamValues: array of Variant; var Allowed: Boolean);
+var
+ i: integer;
+begin
+ inherited;
+ if not ServiceMethods_ServerMainForm.cbValidateDirectSQLAccess.Checked then Exit;
+
+ Log('***ValidateDirectSQLAccess***');
+ Log('aConnection.Name:'#9 + aConnection.Name);
+ Log('aSQLText:'#9 + aSQLText);
+ Log('ParamCount:'#9 + intToStr(1 + ord(High(aParamNames)) - ord(Low(aParamNames))));
+ for i := Low(aParamNames) to High(aParamNames) do
+ Log(#9 + aParamNames[i] + ' = ' + VarToStr(aParamValues[i]));
+ Log('Allowed:'#9 + BoolStr[Allowed]);
+ Log('***************************');
+ Log('');
+end;
+
+procedure TServiceMethods_Service.DataAbstractServiceAcquireConnectionFailure(
+ aSender: TObject; const aConnectionName: string; aError: Exception);
+begin
+ inherited;
+ if not ServiceMethods_ServerMainForm.cbAcquireConnectionFailure.Checked then Exit;
+
+ Log('***AcquireConnectionFailure***');
+ Log('aConnectionName:'#9 + aConnectionName);
+ Log('aError.ClassName:'#9 + aError.ClassName);
+ Log('aError.Message:'#9 + aError.Message);
+ Log('******************************');
+ Log('');
+end;
+
+procedure TServiceMethods_Service.DataAbstractServiceCreate(
+ Sender: TObject);
+begin
+ inherited;
+ AllowSchemaAccess := ServiceMethods_ServerMainForm.cbAllowSchemaAccess.Checked;
+ AcquireConnection := ServiceMethods_ServerMainForm.cbAcquireConnection.Checked;
+ AllowDataAccess := ServiceMethods_ServerMainForm.cbAllowDataAccess.Checked;
+ AllowWhereSQL := ServiceMethods_ServerMainForm.cbAllowWhereSQL.Checked;
+ AllowExecuteCommands := ServiceMethods_ServerMainForm.cbAllowExecuteCommands.Checked;
+ AllowExecuteSQL := ServiceMethods_ServerMainForm.cbAllowExecuteSQL.Checked;
+ ProcessDeltasWithoutUpdateRules := ServiceMethods_ServerMainForm.cbProcessDeltasWithoutUpdateRules.Checked;
+ AllowDynamicSelect := ServiceMethods_ServerMainForm.cbAllowDynamicSelect.Checked;
+ AllowDynamicWhere := ServiceMethods_ServerMainForm.cbAllowDynamicWhere.Checked;
+ AllowUpdates := ServiceMethods_ServerMainForm.cbAllowUpdates.Checked;
+ AutoCreateBusinessProcessors := ServiceMethods_ServerMainForm.cbAutoCreateBusinessProcessors.Checked;
+ Exit;
+
+ Log('***Create***');
+ Log('************');
+ Log('');
+end;
+
+procedure TServiceMethods_Service.DataAbstractServiceDestroy(
+ Sender: TObject);
+begin
+ Exit;
+
+ Log('***Destroy***');
+ Log('*************');
+ Log('');
+end;
+
+procedure TServiceMethods_Service.DataAbstractServiceActivate(
+ const aClientID: TGUID; aSession: TROSession;
+ const aMessage: IROMessage);
+begin
+ Exit;
+
+ Log('***Activate***');
+ Log('aClientID:'#9 + GUIDToString(aClientID));
+ // Log('aSession:'#9 + aSession.ClassName);
+ // Log('aError.Message:'#9 + aError.Message);
+ Log('**************');
+ Log('');
+end;
+
+procedure TServiceMethods_Service.DataAbstractServiceDeactivate(
+ const aClientID: TGUID; aSession: TROSession);
+begin
+ Exit;
+
+ Log('***Deactivate***');
+ Log('aClientID:'#9 + GUIDToString(aClientID));
+ Log('****************');
+ Log('');
+end;
+
+procedure TServiceMethods_Service.DataAbstractServiceBusinessProcessorAutoCreated(
+ aSender: TRORemoteDataModule; BusinessProcessor: TDABusinessProcessor);
+begin
+ if not ServiceMethods_ServerMainForm.cbBusinessProcessorAutoCreated.Checked then Exit;
+ Log('***BusinessProcessorAutoCreated***');
+ Log('****************');
+ Log('');
+end;
+
+initialization
+ TROClassFactory.Create('ServiceMethods_Service', Create_ServiceMethods_Service, TServiceMethods_Service_Invoker);
+
+finalization
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Stored Procedures/StoredProcedures.Sample.html b/official/5.0.30.691/Data Abstract for Delphi/Samples/Stored Procedures/StoredProcedures.Sample.html
new file mode 100644
index 0000000..4252b3c
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Stored Procedures/StoredProcedures.Sample.html
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+ Stored Procedures Sample
+
+
+
+Purpose
+
+
+This example shows how to use the IDAConnection's GetStoredProcedureNames method to retrieve a list of stored procedures for the connection.
+
+It also shows how to use IDAConnection's NewCommand to access the IDASQLCommand interface:
+
+
+RefreshParams receives the parameters of this stored procedure.
+Execute the stored procedure.
+
+
+Examine the Code
+
+
+ See the simple code in StoredProceduresMain.pas .
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Stored Procedures/StoredProcedures.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Stored Procedures/StoredProcedures.bdsproj
new file mode 100644
index 0000000..326beb1
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Stored Procedures/StoredProcedures.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {0B989594-0CC6-411F-93CA-67B383201C0F}
+
+
+
+
+ StoredProcedures.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Stored Procedures/StoredProcedures.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/Stored Procedures/StoredProcedures.dpr
new file mode 100644
index 0000000..13269b1
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Stored Procedures/StoredProcedures.dpr
@@ -0,0 +1,13 @@
+program StoredProcedures;
+
+uses
+ Forms,
+ StoredProceduresMain in 'StoredProceduresMain.pas' {StoredProceduresMainForm};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TStoredProceduresMainForm, StoredProceduresMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Stored Procedures/StoredProcedures.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Stored Procedures/StoredProcedures.dproj
new file mode 100644
index 0000000..1c4e47d
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Stored Procedures/StoredProcedures.dproj
@@ -0,0 +1,72 @@
+
+
+ {d57caf23-caa8-469d-81c2-3f5757a0f663}
+ StoredProcedures.dpr
+ Debug
+ AnyCPU
+ DCC32
+ StoredProcedures.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ StoredProcedures.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Stored Procedures/StoredProcedures.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Stored Procedures/StoredProcedures.res
new file mode 100644
index 0000000..b946fbb
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Stored Procedures/StoredProcedures.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Stored Procedures/StoredProceduresMain.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Stored Procedures/StoredProceduresMain.dfm
new file mode 100644
index 0000000..1babfef
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Stored Procedures/StoredProceduresMain.dfm
@@ -0,0 +1,197 @@
+object StoredProceduresMainForm: TStoredProceduresMainForm
+ Left = 43
+ Top = 144
+ AutoScroll = False
+ Caption = 'Stored Procedure Demo'
+ ClientHeight = 340
+ ClientWidth = 573
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Label1: TLabel
+ Left = 40
+ Top = 16
+ Width = 54
+ Height = 13
+ Caption = 'Connection'
+ end
+ object Label2: TLabel
+ Left = 8
+ Top = 48
+ Width = 86
+ Height = 13
+ Caption = 'Stored Procedure:'
+ end
+ object Label3: TLabel
+ Left = 408
+ Top = 318
+ Width = 28
+ Height = 13
+ Caption = 'Times'
+ end
+ object ExecuteButton: TButton
+ Left = 240
+ Top = 312
+ Width = 75
+ Height = 25
+ Caption = 'Execute'
+ TabOrder = 5
+ OnClick = ExecuteButtonClick
+ end
+ object cbConnName: TComboBox
+ Left = 104
+ Top = 12
+ Width = 225
+ Height = 21
+ Style = csDropDownList
+ ItemHeight = 13
+ TabOrder = 0
+ end
+ object cbSPNames: TComboBox
+ Left = 104
+ Top = 44
+ Width = 225
+ Height = 21
+ Style = csDropDownList
+ ItemHeight = 13
+ TabOrder = 2
+ end
+ object ConnectButton: TButton
+ Left = 336
+ Top = 10
+ Width = 75
+ Height = 25
+ Caption = 'Connect'
+ TabOrder = 1
+ OnClick = ConnectButtonClick
+ end
+ object ListParamsButton: TButton
+ Left = 336
+ Top = 42
+ Width = 75
+ Height = 25
+ Caption = 'List Params'
+ TabOrder = 3
+ OnClick = ListParamsButtonClick
+ end
+ object StringGrid: TStringGrid
+ Left = 8
+ Top = 80
+ Width = 561
+ Height = 217
+ DefaultRowHeight = 16
+ FixedCols = 4
+ Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goEditing]
+ TabOrder = 4
+ ColWidths = (
+ 129
+ 67
+ 65
+ 65
+ 201)
+ end
+ object SpinEdit: TSpinEdit
+ Left = 328
+ Top = 313
+ Width = 73
+ Height = 22
+ MaxValue = 0
+ MinValue = 0
+ TabOrder = 6
+ Value = 1
+ end
+ object DAConnectionManager: TDAConnectionManager
+ Connections = <
+ item
+ Name = 'ADO'
+ ConnectionString =
+ 'ADO?Server=localhost;UserID=sa;AuxDriver=SQLOLEDB.1;Database=Nor' +
+ 'thwind;password='
+ Description = 'Borland ADOExpress Connection'
+ Default = True
+ Tag = 0
+ end
+ item
+ Name = 'IBX'
+ ConnectionString =
+ 'IBX?Server=;UserID=sysdba;Password=masterkey;Database=C:\Program' +
+ ' Files\Borland\InterBase\examples\database\Employee.gdb'
+ Description = 'Borland IBExpress Connection'
+ Default = False
+ Tag = 0
+ end>
+ DriverManager = DADriverManager
+ PoolingEnabled = True
+ Left = 416
+ Top = 16
+ end
+ object DADriverManager: TDADriverManager
+ DriverDirectory = '%SYSTEM%\'
+ TraceActive = False
+ TraceFlags = []
+ Left = 384
+ Top = 16
+ end
+ object DASchema: TDASchema
+ ConnectionManager = DAConnectionManager
+ Datasets = <>
+ Commands = <
+ item
+ Params = <>
+ Statements = <
+ item
+ Connection = 'SDAC'
+ SQL = 'TestOutputParam'
+ StatementType = stStoredProcedure
+ ColumnMappings = <>
+ end
+ item
+ Connection = 'ADO'
+ SQL = 'TestOutputParam'
+ StatementType = stStoredProcedure
+ ColumnMappings = <>
+ end>
+ Name = 'Execute2'
+ end
+ item
+ Params = <
+ item
+ Name = 'InputText'
+ BlobType = dabtUnknown
+ ParamType = daptInput
+ end>
+ Statements = <
+ item
+ Connection = 'ADO'
+ SQL =
+ 'DECLARE @RC int'#10'DECLARE @InputText varchar(30)'#10'DECLARE @InputTex' +
+ 'tLength int'#10'DECLARE @SomethingElse varchar(200)'#10#10'SET @InputText ' +
+ '= :InputText'#10#10'EXEC @RC = TestOutputParam @InputText, @InputTextL' +
+ 'ength OUTPUT , @SomethingElse OUTPUT'
+ StatementType = stSQL
+ ColumnMappings = <>
+ end>
+ Name = 'Execute1'
+ end>
+ RelationShips = <>
+ UpdateRules = <>
+ Left = 448
+ Top = 16
+ end
+ object DAADODriver1: TDAADODriver
+ Left = 480
+ Top = 16
+ end
+ object DAIBXDriver1: TDAIBXDriver
+ Left = 480
+ Top = 48
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Stored Procedures/StoredProceduresMain.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Stored Procedures/StoredProceduresMain.pas
new file mode 100644
index 0000000..1690f36
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Stored Procedures/StoredProceduresMain.pas
@@ -0,0 +1,137 @@
+unit StoredProceduresMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, uDADriverManager, uDAClasses, StdCtrls, uDAInterfaces,
+ uDAEngine, uDAADODriver, Grids, uDAIBXDriver,
+ Spin;
+
+type
+ TStoredProceduresMainForm = class(TForm)
+ DADriverManager: TDADriverManager;
+ ExecuteButton: TButton;
+ DAADODriver1: TDAADODriver;
+ Label1: TLabel;
+ cbConnName: TComboBox;
+ Label2: TLabel;
+ cbSPNames: TComboBox;
+ ConnectButton: TButton;
+ ListParamsButton: TButton;
+ StringGrid: TStringGrid;
+ DAIBXDriver1: TDAIBXDriver;
+ SpinEdit: TSpinEdit;
+ Label3: TLabel;
+ DAConnectionManager: TDAConnectionManager;
+ DASchema: TDASchema;
+ procedure ExecuteButtonClick(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ procedure ConnectButtonClick(Sender: TObject);
+ procedure ListParamsButtonClick(Sender: TObject);
+ procedure FormDestroy(Sender: TObject);
+ private
+ fConn : IDAConnection;
+
+ procedure CheckConnection;
+ public
+ end;
+
+var
+ StoredProceduresMainForm: TStoredProceduresMainForm;
+
+implementation
+
+uses uROClasses, TypInfo;
+
+{$R *.dfm}
+
+procedure TStoredProceduresMainForm.CheckConnection;
+begin
+ Check(fConn=NIL, 'Connect to a database first!');
+end;
+
+procedure TStoredProceduresMainForm.ExecuteButtonClick(Sender: TObject);
+var cmd : IDASQLCommand;
+ x, i : integer;
+begin
+ CheckConnection;
+ cmd := fConn.NewCommand(cbSPNames.Text, stStoredProcedure);
+ cmd.RefreshParams;
+
+ for x := 1 to SpinEdit.Value do begin
+ for i := 0 to cmd.Params.Count-1 do
+ if (StringGrid.Cells[4, i+1]<>'')
+ then cmd.ParamByName(StringGrid.Cells[0, i+1]).AsString := StringGrid.Cells[4, i+1];
+
+ cmd.Execute;
+
+ for i := 0 to cmd.Params.Count-1 do
+ StringGrid.Cells[4, i+1] := cmd.ParamByName(StringGrid.Cells[0, i+1]).AsString;
+ end;
+end;
+
+procedure TStoredProceduresMainForm.FormCreate(Sender: TObject);
+var i : integer;
+begin
+ for i := 0 to DAConnectionManager.Connections.Count-1 do
+ cbConnName.Items.Add(DAConnectionManager.Connections[i].Name);
+ cbConnName.ItemIndex := 0;
+end;
+
+procedure TStoredProceduresMainForm.ConnectButtonClick(Sender: TObject);
+var i : integer;
+ names : IROStrings;
+begin
+ fConn := DAConnectionManager.NewConnection(cbConnName.Text);
+ cbSPNames.Items.Clear;
+
+ names := NewROStrings;
+ fConn.GetStoredProcedureNames(names);
+ for i := 0 to (names.Count-1) do
+ cbSPNames.Items.Add(names[i]);
+
+ cbSPNames.ItemIndex := 0;
+ cbSPNames.DroppedDown := TRUE;
+
+ ListParamsButton.Enabled := cbSPNames.Items.Count>0
+end;
+
+procedure TStoredProceduresMainForm.ListParamsButtonClick(Sender: TObject);
+var i : integer;
+ cmd : IDASQLCommand;
+ par : TDAParam;
+begin
+ CheckConnection;
+
+ cmd := fConn.NewCommand(cbSPNames.Text, stStoredProcedure);
+ cmd.RefreshParams;
+
+ StringGrid.RowCount := cmd.Params.Count+1;
+ if (StringGrid.RowCount>1)
+ then StringGrid.FixedRows := 1;
+ StringGrid.FixedCols := 4;
+
+ StringGrid.Cells[0, 0] := 'Name';
+ StringGrid.Cells[1, 0] := 'Type';
+ StringGrid.Cells[2, 0] := 'Size';
+ StringGrid.Cells[3, 0] := 'Direction';
+ StringGrid.Cells[4, 0] := 'Value';
+
+ for i := 0 to (cmd.Params.Count-1) do begin
+ par := cmd.Params[i];
+
+ StringGrid.Cells[0, i+1] := par.Name;
+ StringGrid.Cells[1, i+1] := GetEnumName(TypeInfo(TDADataType), Ord(par.DataType));
+ StringGrid.Cells[2, i+1] := IntToStr(par.Size);
+ StringGrid.Cells[3, i+1] := GetEnumName(TypeInfo(TDAParamType), Ord(par.ParamType));
+ StringGrid.Cells[4, i+1] := '';
+ end;
+end;
+
+procedure TStoredProceduresMainForm.FormDestroy(Sender: TObject);
+begin
+ fConn := nil;
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/RODLFILE.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/RODLFILE.res
new file mode 100644
index 0000000..6c379af
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/RODLFILE.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/SampleSchemaClient_Intf.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/SampleSchemaClient_Intf.pas
new file mode 100644
index 0000000..0d84abe
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/SampleSchemaClient_Intf.pas
@@ -0,0 +1,981 @@
+unit SampleSchemaClient_Intf;
+
+interface
+
+uses
+ Classes, DB, SysUtils, uROClasses, uDADataTable;
+
+const
+ { Data table rules ids
+ Feel free to change them to something more human readable
+ but make sure they are unique in the context of your application }
+ RID_Customers = '{A97B58B8-3C56-413D-BA55-360BCD6ACBEA}';
+ RID_Orders = '{63B9B897-D9BC-430C-9D81-C0466A5CD6AD}';
+
+ { Data table names }
+ nme_Customers = 'Customers';
+ nme_Orders = 'Orders';
+
+ { Customers fields }
+ fld_CustomersCustomerID = 'CustomerID';
+ fld_CustomersCompanyName = 'CompanyName';
+ fld_CustomersContactName = 'ContactName';
+ fld_CustomersContactTitle = 'ContactTitle';
+ fld_CustomersAddress = 'Address';
+ fld_CustomersCity = 'City';
+ fld_CustomersRegion = 'Region';
+ fld_CustomersPostalCode = 'PostalCode';
+ fld_CustomersCountry = 'Country';
+ fld_CustomersPhone = 'Phone';
+ fld_CustomersFax = 'Fax';
+
+ { Customers field indexes }
+ idx_CustomersCustomerID = 0;
+ idx_CustomersCompanyName = 1;
+ idx_CustomersContactName = 2;
+ idx_CustomersContactTitle = 3;
+ idx_CustomersAddress = 4;
+ idx_CustomersCity = 5;
+ idx_CustomersRegion = 6;
+ idx_CustomersPostalCode = 7;
+ idx_CustomersCountry = 8;
+ idx_CustomersPhone = 9;
+ idx_CustomersFax = 10;
+
+ { Orders fields }
+ fld_OrdersOrderID = 'OrderID';
+ fld_OrdersCustomerID = 'CustomerID';
+ fld_OrdersEmployeeID = 'EmployeeID';
+ fld_OrdersOrderDate = 'OrderDate';
+ fld_OrdersRequiredDate = 'RequiredDate';
+ fld_OrdersShippedDate = 'ShippedDate';
+ fld_OrdersShipVia = 'ShipVia';
+ fld_OrdersFreight = 'Freight';
+ fld_OrdersShipName = 'ShipName';
+ fld_OrdersShipAddress = 'ShipAddress';
+ fld_OrdersShipCity = 'ShipCity';
+ fld_OrdersShipRegion = 'ShipRegion';
+ fld_OrdersShipPostalCode = 'ShipPostalCode';
+ fld_OrdersShipCountry = 'ShipCountry';
+
+ { Orders field indexes }
+ idx_OrdersOrderID = 0;
+ idx_OrdersCustomerID = 1;
+ idx_OrdersEmployeeID = 2;
+ idx_OrdersOrderDate = 3;
+ idx_OrdersRequiredDate = 4;
+ idx_OrdersShippedDate = 5;
+ idx_OrdersShipVia = 6;
+ idx_OrdersFreight = 7;
+ idx_OrdersShipName = 8;
+ idx_OrdersShipAddress = 9;
+ idx_OrdersShipCity = 10;
+ idx_OrdersShipRegion = 11;
+ idx_OrdersShipPostalCode = 12;
+ idx_OrdersShipCountry = 13;
+
+type
+ { ICustomers }
+ ICustomers = interface(IDAStronglyTypedDataTable)
+ ['{555F0253-7185-47B4-86D9-0CCCF239EBBE}']
+ { Property getters and setters }
+ function GetCustomerIDValue: String;
+ procedure SetCustomerIDValue(const aValue: String);
+ function GetCustomerIDIsNull: Boolean;
+ procedure SetCustomerIDIsNull(const aValue: Boolean);
+ function GetCompanyNameValue: String;
+ procedure SetCompanyNameValue(const aValue: String);
+ function GetCompanyNameIsNull: Boolean;
+ procedure SetCompanyNameIsNull(const aValue: Boolean);
+ function GetContactNameValue: String;
+ procedure SetContactNameValue(const aValue: String);
+ function GetContactNameIsNull: Boolean;
+ procedure SetContactNameIsNull(const aValue: Boolean);
+ function GetContactTitleValue: String;
+ procedure SetContactTitleValue(const aValue: String);
+ function GetContactTitleIsNull: Boolean;
+ procedure SetContactTitleIsNull(const aValue: Boolean);
+ function GetAddressValue: String;
+ procedure SetAddressValue(const aValue: String);
+ function GetAddressIsNull: Boolean;
+ procedure SetAddressIsNull(const aValue: Boolean);
+ function GetCityValue: String;
+ procedure SetCityValue(const aValue: String);
+ function GetCityIsNull: Boolean;
+ procedure SetCityIsNull(const aValue: Boolean);
+ function GetRegionValue: String;
+ procedure SetRegionValue(const aValue: String);
+ function GetRegionIsNull: Boolean;
+ procedure SetRegionIsNull(const aValue: Boolean);
+ function GetPostalCodeValue: String;
+ procedure SetPostalCodeValue(const aValue: String);
+ function GetPostalCodeIsNull: Boolean;
+ procedure SetPostalCodeIsNull(const aValue: Boolean);
+ function GetCountryValue: String;
+ procedure SetCountryValue(const aValue: String);
+ function GetCountryIsNull: Boolean;
+ procedure SetCountryIsNull(const aValue: Boolean);
+ function GetPhoneValue: String;
+ procedure SetPhoneValue(const aValue: String);
+ function GetPhoneIsNull: Boolean;
+ procedure SetPhoneIsNull(const aValue: Boolean);
+ function GetFaxValue: String;
+ procedure SetFaxValue(const aValue: String);
+ function GetFaxIsNull: Boolean;
+ procedure SetFaxIsNull(const aValue: Boolean);
+
+
+ { Properties }
+ property CustomerID: String read GetCustomerIDValue write SetCustomerIDValue;
+ property CustomerIDIsNull: Boolean read GetCustomerIDIsNull write SetCustomerIDIsNull;
+ property CompanyName: String read GetCompanyNameValue write SetCompanyNameValue;
+ property CompanyNameIsNull: Boolean read GetCompanyNameIsNull write SetCompanyNameIsNull;
+ property ContactName: String read GetContactNameValue write SetContactNameValue;
+ property ContactNameIsNull: Boolean read GetContactNameIsNull write SetContactNameIsNull;
+ property ContactTitle: String read GetContactTitleValue write SetContactTitleValue;
+ property ContactTitleIsNull: Boolean read GetContactTitleIsNull write SetContactTitleIsNull;
+ property Address: String read GetAddressValue write SetAddressValue;
+ property AddressIsNull: Boolean read GetAddressIsNull write SetAddressIsNull;
+ property City: String read GetCityValue write SetCityValue;
+ property CityIsNull: Boolean read GetCityIsNull write SetCityIsNull;
+ property Region: String read GetRegionValue write SetRegionValue;
+ property RegionIsNull: Boolean read GetRegionIsNull write SetRegionIsNull;
+ property PostalCode: String read GetPostalCodeValue write SetPostalCodeValue;
+ property PostalCodeIsNull: Boolean read GetPostalCodeIsNull write SetPostalCodeIsNull;
+ property Country: String read GetCountryValue write SetCountryValue;
+ property CountryIsNull: Boolean read GetCountryIsNull write SetCountryIsNull;
+ property Phone: String read GetPhoneValue write SetPhoneValue;
+ property PhoneIsNull: Boolean read GetPhoneIsNull write SetPhoneIsNull;
+ property Fax: String read GetFaxValue write SetFaxValue;
+ property FaxIsNull: Boolean read GetFaxIsNull write SetFaxIsNull;
+ end;
+
+ { TCustomersDataTableRules }
+ TCustomersDataTableRules = class(TDADataTableRules, ICustomers)
+ private
+ protected
+ { Property getters and setters }
+ function GetCustomerIDValue: String; virtual;
+ procedure SetCustomerIDValue(const aValue: String); virtual;
+ function GetCustomerIDIsNull: Boolean; virtual;
+ procedure SetCustomerIDIsNull(const aValue: Boolean); virtual;
+ function GetCompanyNameValue: String; virtual;
+ procedure SetCompanyNameValue(const aValue: String); virtual;
+ function GetCompanyNameIsNull: Boolean; virtual;
+ procedure SetCompanyNameIsNull(const aValue: Boolean); virtual;
+ function GetContactNameValue: String; virtual;
+ procedure SetContactNameValue(const aValue: String); virtual;
+ function GetContactNameIsNull: Boolean; virtual;
+ procedure SetContactNameIsNull(const aValue: Boolean); virtual;
+ function GetContactTitleValue: String; virtual;
+ procedure SetContactTitleValue(const aValue: String); virtual;
+ function GetContactTitleIsNull: Boolean; virtual;
+ procedure SetContactTitleIsNull(const aValue: Boolean); virtual;
+ function GetAddressValue: String; virtual;
+ procedure SetAddressValue(const aValue: String); virtual;
+ function GetAddressIsNull: Boolean; virtual;
+ procedure SetAddressIsNull(const aValue: Boolean); virtual;
+ function GetCityValue: String; virtual;
+ procedure SetCityValue(const aValue: String); virtual;
+ function GetCityIsNull: Boolean; virtual;
+ procedure SetCityIsNull(const aValue: Boolean); virtual;
+ function GetRegionValue: String; virtual;
+ procedure SetRegionValue(const aValue: String); virtual;
+ function GetRegionIsNull: Boolean; virtual;
+ procedure SetRegionIsNull(const aValue: Boolean); virtual;
+ function GetPostalCodeValue: String; virtual;
+ procedure SetPostalCodeValue(const aValue: String); virtual;
+ function GetPostalCodeIsNull: Boolean; virtual;
+ procedure SetPostalCodeIsNull(const aValue: Boolean); virtual;
+ function GetCountryValue: String; virtual;
+ procedure SetCountryValue(const aValue: String); virtual;
+ function GetCountryIsNull: Boolean; virtual;
+ procedure SetCountryIsNull(const aValue: Boolean); virtual;
+ function GetPhoneValue: String; virtual;
+ procedure SetPhoneValue(const aValue: String); virtual;
+ function GetPhoneIsNull: Boolean; virtual;
+ procedure SetPhoneIsNull(const aValue: Boolean); virtual;
+ function GetFaxValue: String; virtual;
+ procedure SetFaxValue(const aValue: String); virtual;
+ function GetFaxIsNull: Boolean; virtual;
+ procedure SetFaxIsNull(const aValue: Boolean); virtual;
+
+ { Properties }
+ property CustomerID: String read GetCustomerIDValue write SetCustomerIDValue;
+ property CustomerIDIsNull: Boolean read GetCustomerIDIsNull write SetCustomerIDIsNull;
+ property CompanyName: String read GetCompanyNameValue write SetCompanyNameValue;
+ property CompanyNameIsNull: Boolean read GetCompanyNameIsNull write SetCompanyNameIsNull;
+ property ContactName: String read GetContactNameValue write SetContactNameValue;
+ property ContactNameIsNull: Boolean read GetContactNameIsNull write SetContactNameIsNull;
+ property ContactTitle: String read GetContactTitleValue write SetContactTitleValue;
+ property ContactTitleIsNull: Boolean read GetContactTitleIsNull write SetContactTitleIsNull;
+ property Address: String read GetAddressValue write SetAddressValue;
+ property AddressIsNull: Boolean read GetAddressIsNull write SetAddressIsNull;
+ property City: String read GetCityValue write SetCityValue;
+ property CityIsNull: Boolean read GetCityIsNull write SetCityIsNull;
+ property Region: String read GetRegionValue write SetRegionValue;
+ property RegionIsNull: Boolean read GetRegionIsNull write SetRegionIsNull;
+ property PostalCode: String read GetPostalCodeValue write SetPostalCodeValue;
+ property PostalCodeIsNull: Boolean read GetPostalCodeIsNull write SetPostalCodeIsNull;
+ property Country: String read GetCountryValue write SetCountryValue;
+ property CountryIsNull: Boolean read GetCountryIsNull write SetCountryIsNull;
+ property Phone: String read GetPhoneValue write SetPhoneValue;
+ property PhoneIsNull: Boolean read GetPhoneIsNull write SetPhoneIsNull;
+ property Fax: String read GetFaxValue write SetFaxValue;
+ property FaxIsNull: Boolean read GetFaxIsNull write SetFaxIsNull;
+
+ public
+ constructor Create(aDataTable: TDADataTable); override;
+ destructor Destroy; override;
+
+ end;
+
+ { IOrders }
+ IOrders = interface(IDAStronglyTypedDataTable)
+ ['{50A479DE-60BA-4066-AAEB-B840FC045BBB}']
+ { Property getters and setters }
+ function GetOrderIDValue: Integer;
+ procedure SetOrderIDValue(const aValue: Integer);
+ function GetOrderIDIsNull: Boolean;
+ procedure SetOrderIDIsNull(const aValue: Boolean);
+ function GetCustomerIDValue: String;
+ procedure SetCustomerIDValue(const aValue: String);
+ function GetCustomerIDIsNull: Boolean;
+ procedure SetCustomerIDIsNull(const aValue: Boolean);
+ function GetEmployeeIDValue: Integer;
+ procedure SetEmployeeIDValue(const aValue: Integer);
+ function GetEmployeeIDIsNull: Boolean;
+ procedure SetEmployeeIDIsNull(const aValue: Boolean);
+ function GetOrderDateValue: DateTime;
+ procedure SetOrderDateValue(const aValue: DateTime);
+ function GetOrderDateIsNull: Boolean;
+ procedure SetOrderDateIsNull(const aValue: Boolean);
+ function GetRequiredDateValue: DateTime;
+ procedure SetRequiredDateValue(const aValue: DateTime);
+ function GetRequiredDateIsNull: Boolean;
+ procedure SetRequiredDateIsNull(const aValue: Boolean);
+ function GetShippedDateValue: DateTime;
+ procedure SetShippedDateValue(const aValue: DateTime);
+ function GetShippedDateIsNull: Boolean;
+ procedure SetShippedDateIsNull(const aValue: Boolean);
+ function GetShipViaValue: Integer;
+ procedure SetShipViaValue(const aValue: Integer);
+ function GetShipViaIsNull: Boolean;
+ procedure SetShipViaIsNull(const aValue: Boolean);
+ function GetFreightValue: Float;
+ procedure SetFreightValue(const aValue: Float);
+ function GetFreightIsNull: Boolean;
+ procedure SetFreightIsNull(const aValue: Boolean);
+ function GetShipNameValue: String;
+ procedure SetShipNameValue(const aValue: String);
+ function GetShipNameIsNull: Boolean;
+ procedure SetShipNameIsNull(const aValue: Boolean);
+ function GetShipAddressValue: String;
+ procedure SetShipAddressValue(const aValue: String);
+ function GetShipAddressIsNull: Boolean;
+ procedure SetShipAddressIsNull(const aValue: Boolean);
+ function GetShipCityValue: String;
+ procedure SetShipCityValue(const aValue: String);
+ function GetShipCityIsNull: Boolean;
+ procedure SetShipCityIsNull(const aValue: Boolean);
+ function GetShipRegionValue: String;
+ procedure SetShipRegionValue(const aValue: String);
+ function GetShipRegionIsNull: Boolean;
+ procedure SetShipRegionIsNull(const aValue: Boolean);
+ function GetShipPostalCodeValue: String;
+ procedure SetShipPostalCodeValue(const aValue: String);
+ function GetShipPostalCodeIsNull: Boolean;
+ procedure SetShipPostalCodeIsNull(const aValue: Boolean);
+ function GetShipCountryValue: String;
+ procedure SetShipCountryValue(const aValue: String);
+ function GetShipCountryIsNull: Boolean;
+ procedure SetShipCountryIsNull(const aValue: Boolean);
+
+
+ { Properties }
+ property OrderID: Integer read GetOrderIDValue write SetOrderIDValue;
+ property OrderIDIsNull: Boolean read GetOrderIDIsNull write SetOrderIDIsNull;
+ property CustomerID: String read GetCustomerIDValue write SetCustomerIDValue;
+ property CustomerIDIsNull: Boolean read GetCustomerIDIsNull write SetCustomerIDIsNull;
+ property EmployeeID: Integer read GetEmployeeIDValue write SetEmployeeIDValue;
+ property EmployeeIDIsNull: Boolean read GetEmployeeIDIsNull write SetEmployeeIDIsNull;
+ property OrderDate: DateTime read GetOrderDateValue write SetOrderDateValue;
+ property OrderDateIsNull: Boolean read GetOrderDateIsNull write SetOrderDateIsNull;
+ property RequiredDate: DateTime read GetRequiredDateValue write SetRequiredDateValue;
+ property RequiredDateIsNull: Boolean read GetRequiredDateIsNull write SetRequiredDateIsNull;
+ property ShippedDate: DateTime read GetShippedDateValue write SetShippedDateValue;
+ property ShippedDateIsNull: Boolean read GetShippedDateIsNull write SetShippedDateIsNull;
+ property ShipVia: Integer read GetShipViaValue write SetShipViaValue;
+ property ShipViaIsNull: Boolean read GetShipViaIsNull write SetShipViaIsNull;
+ property Freight: Float read GetFreightValue write SetFreightValue;
+ property FreightIsNull: Boolean read GetFreightIsNull write SetFreightIsNull;
+ property ShipName: String read GetShipNameValue write SetShipNameValue;
+ property ShipNameIsNull: Boolean read GetShipNameIsNull write SetShipNameIsNull;
+ property ShipAddress: String read GetShipAddressValue write SetShipAddressValue;
+ property ShipAddressIsNull: Boolean read GetShipAddressIsNull write SetShipAddressIsNull;
+ property ShipCity: String read GetShipCityValue write SetShipCityValue;
+ property ShipCityIsNull: Boolean read GetShipCityIsNull write SetShipCityIsNull;
+ property ShipRegion: String read GetShipRegionValue write SetShipRegionValue;
+ property ShipRegionIsNull: Boolean read GetShipRegionIsNull write SetShipRegionIsNull;
+ property ShipPostalCode: String read GetShipPostalCodeValue write SetShipPostalCodeValue;
+ property ShipPostalCodeIsNull: Boolean read GetShipPostalCodeIsNull write SetShipPostalCodeIsNull;
+ property ShipCountry: String read GetShipCountryValue write SetShipCountryValue;
+ property ShipCountryIsNull: Boolean read GetShipCountryIsNull write SetShipCountryIsNull;
+ end;
+
+ { TOrdersDataTableRules }
+ TOrdersDataTableRules = class(TDADataTableRules, IOrders)
+ private
+ protected
+ { Property getters and setters }
+ function GetOrderIDValue: Integer; virtual;
+ procedure SetOrderIDValue(const aValue: Integer); virtual;
+ function GetOrderIDIsNull: Boolean; virtual;
+ procedure SetOrderIDIsNull(const aValue: Boolean); virtual;
+ function GetCustomerIDValue: String; virtual;
+ procedure SetCustomerIDValue(const aValue: String); virtual;
+ function GetCustomerIDIsNull: Boolean; virtual;
+ procedure SetCustomerIDIsNull(const aValue: Boolean); virtual;
+ function GetEmployeeIDValue: Integer; virtual;
+ procedure SetEmployeeIDValue(const aValue: Integer); virtual;
+ function GetEmployeeIDIsNull: Boolean; virtual;
+ procedure SetEmployeeIDIsNull(const aValue: Boolean); virtual;
+ function GetOrderDateValue: DateTime; virtual;
+ procedure SetOrderDateValue(const aValue: DateTime); virtual;
+ function GetOrderDateIsNull: Boolean; virtual;
+ procedure SetOrderDateIsNull(const aValue: Boolean); virtual;
+ function GetRequiredDateValue: DateTime; virtual;
+ procedure SetRequiredDateValue(const aValue: DateTime); virtual;
+ function GetRequiredDateIsNull: Boolean; virtual;
+ procedure SetRequiredDateIsNull(const aValue: Boolean); virtual;
+ function GetShippedDateValue: DateTime; virtual;
+ procedure SetShippedDateValue(const aValue: DateTime); virtual;
+ function GetShippedDateIsNull: Boolean; virtual;
+ procedure SetShippedDateIsNull(const aValue: Boolean); virtual;
+ function GetShipViaValue: Integer; virtual;
+ procedure SetShipViaValue(const aValue: Integer); virtual;
+ function GetShipViaIsNull: Boolean; virtual;
+ procedure SetShipViaIsNull(const aValue: Boolean); virtual;
+ function GetFreightValue: Float; virtual;
+ procedure SetFreightValue(const aValue: Float); virtual;
+ function GetFreightIsNull: Boolean; virtual;
+ procedure SetFreightIsNull(const aValue: Boolean); virtual;
+ function GetShipNameValue: String; virtual;
+ procedure SetShipNameValue(const aValue: String); virtual;
+ function GetShipNameIsNull: Boolean; virtual;
+ procedure SetShipNameIsNull(const aValue: Boolean); virtual;
+ function GetShipAddressValue: String; virtual;
+ procedure SetShipAddressValue(const aValue: String); virtual;
+ function GetShipAddressIsNull: Boolean; virtual;
+ procedure SetShipAddressIsNull(const aValue: Boolean); virtual;
+ function GetShipCityValue: String; virtual;
+ procedure SetShipCityValue(const aValue: String); virtual;
+ function GetShipCityIsNull: Boolean; virtual;
+ procedure SetShipCityIsNull(const aValue: Boolean); virtual;
+ function GetShipRegionValue: String; virtual;
+ procedure SetShipRegionValue(const aValue: String); virtual;
+ function GetShipRegionIsNull: Boolean; virtual;
+ procedure SetShipRegionIsNull(const aValue: Boolean); virtual;
+ function GetShipPostalCodeValue: String; virtual;
+ procedure SetShipPostalCodeValue(const aValue: String); virtual;
+ function GetShipPostalCodeIsNull: Boolean; virtual;
+ procedure SetShipPostalCodeIsNull(const aValue: Boolean); virtual;
+ function GetShipCountryValue: String; virtual;
+ procedure SetShipCountryValue(const aValue: String); virtual;
+ function GetShipCountryIsNull: Boolean; virtual;
+ procedure SetShipCountryIsNull(const aValue: Boolean); virtual;
+
+ { Properties }
+ property OrderID: Integer read GetOrderIDValue write SetOrderIDValue;
+ property OrderIDIsNull: Boolean read GetOrderIDIsNull write SetOrderIDIsNull;
+ property CustomerID: String read GetCustomerIDValue write SetCustomerIDValue;
+ property CustomerIDIsNull: Boolean read GetCustomerIDIsNull write SetCustomerIDIsNull;
+ property EmployeeID: Integer read GetEmployeeIDValue write SetEmployeeIDValue;
+ property EmployeeIDIsNull: Boolean read GetEmployeeIDIsNull write SetEmployeeIDIsNull;
+ property OrderDate: DateTime read GetOrderDateValue write SetOrderDateValue;
+ property OrderDateIsNull: Boolean read GetOrderDateIsNull write SetOrderDateIsNull;
+ property RequiredDate: DateTime read GetRequiredDateValue write SetRequiredDateValue;
+ property RequiredDateIsNull: Boolean read GetRequiredDateIsNull write SetRequiredDateIsNull;
+ property ShippedDate: DateTime read GetShippedDateValue write SetShippedDateValue;
+ property ShippedDateIsNull: Boolean read GetShippedDateIsNull write SetShippedDateIsNull;
+ property ShipVia: Integer read GetShipViaValue write SetShipViaValue;
+ property ShipViaIsNull: Boolean read GetShipViaIsNull write SetShipViaIsNull;
+ property Freight: Float read GetFreightValue write SetFreightValue;
+ property FreightIsNull: Boolean read GetFreightIsNull write SetFreightIsNull;
+ property ShipName: String read GetShipNameValue write SetShipNameValue;
+ property ShipNameIsNull: Boolean read GetShipNameIsNull write SetShipNameIsNull;
+ property ShipAddress: String read GetShipAddressValue write SetShipAddressValue;
+ property ShipAddressIsNull: Boolean read GetShipAddressIsNull write SetShipAddressIsNull;
+ property ShipCity: String read GetShipCityValue write SetShipCityValue;
+ property ShipCityIsNull: Boolean read GetShipCityIsNull write SetShipCityIsNull;
+ property ShipRegion: String read GetShipRegionValue write SetShipRegionValue;
+ property ShipRegionIsNull: Boolean read GetShipRegionIsNull write SetShipRegionIsNull;
+ property ShipPostalCode: String read GetShipPostalCodeValue write SetShipPostalCodeValue;
+ property ShipPostalCodeIsNull: Boolean read GetShipPostalCodeIsNull write SetShipPostalCodeIsNull;
+ property ShipCountry: String read GetShipCountryValue write SetShipCountryValue;
+ property ShipCountryIsNull: Boolean read GetShipCountryIsNull write SetShipCountryIsNull;
+
+ public
+ constructor Create(aDataTable: TDADataTable); override;
+ destructor Destroy; override;
+
+ end;
+
+implementation
+
+uses Variants;
+
+{ TCustomersDataTableRules }
+constructor TCustomersDataTableRules.Create(aDataTable: TDADataTable);
+begin
+ inherited;
+end;
+
+destructor TCustomersDataTableRules.Destroy;
+begin
+ inherited;
+end;
+
+function TCustomersDataTableRules.GetCustomerIDValue: String;
+begin
+ result := DataTable.Fields[idx_CustomersCustomerID].AsString;
+end;
+
+procedure TCustomersDataTableRules.SetCustomerIDValue(const aValue: String);
+begin
+ DataTable.Fields[idx_CustomersCustomerID].AsString := aValue;
+end;
+
+function TCustomersDataTableRules.GetCustomerIDIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_CustomersCustomerID].IsNull;
+end;
+
+procedure TCustomersDataTableRules.SetCustomerIDIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_CustomersCustomerID].AsVariant := Null;
+end;
+
+function TCustomersDataTableRules.GetCompanyNameValue: String;
+begin
+ result := DataTable.Fields[idx_CustomersCompanyName].AsString;
+end;
+
+procedure TCustomersDataTableRules.SetCompanyNameValue(const aValue: String);
+begin
+ DataTable.Fields[idx_CustomersCompanyName].AsString := aValue;
+end;
+
+function TCustomersDataTableRules.GetCompanyNameIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_CustomersCompanyName].IsNull;
+end;
+
+procedure TCustomersDataTableRules.SetCompanyNameIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_CustomersCompanyName].AsVariant := Null;
+end;
+
+function TCustomersDataTableRules.GetContactNameValue: String;
+begin
+ result := DataTable.Fields[idx_CustomersContactName].AsString;
+end;
+
+procedure TCustomersDataTableRules.SetContactNameValue(const aValue: String);
+begin
+ DataTable.Fields[idx_CustomersContactName].AsString := aValue;
+end;
+
+function TCustomersDataTableRules.GetContactNameIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_CustomersContactName].IsNull;
+end;
+
+procedure TCustomersDataTableRules.SetContactNameIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_CustomersContactName].AsVariant := Null;
+end;
+
+function TCustomersDataTableRules.GetContactTitleValue: String;
+begin
+ result := DataTable.Fields[idx_CustomersContactTitle].AsString;
+end;
+
+procedure TCustomersDataTableRules.SetContactTitleValue(const aValue: String);
+begin
+ DataTable.Fields[idx_CustomersContactTitle].AsString := aValue;
+end;
+
+function TCustomersDataTableRules.GetContactTitleIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_CustomersContactTitle].IsNull;
+end;
+
+procedure TCustomersDataTableRules.SetContactTitleIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_CustomersContactTitle].AsVariant := Null;
+end;
+
+function TCustomersDataTableRules.GetAddressValue: String;
+begin
+ result := DataTable.Fields[idx_CustomersAddress].AsString;
+end;
+
+procedure TCustomersDataTableRules.SetAddressValue(const aValue: String);
+begin
+ DataTable.Fields[idx_CustomersAddress].AsString := aValue;
+end;
+
+function TCustomersDataTableRules.GetAddressIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_CustomersAddress].IsNull;
+end;
+
+procedure TCustomersDataTableRules.SetAddressIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_CustomersAddress].AsVariant := Null;
+end;
+
+function TCustomersDataTableRules.GetCityValue: String;
+begin
+ result := DataTable.Fields[idx_CustomersCity].AsString;
+end;
+
+procedure TCustomersDataTableRules.SetCityValue(const aValue: String);
+begin
+ DataTable.Fields[idx_CustomersCity].AsString := aValue;
+end;
+
+function TCustomersDataTableRules.GetCityIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_CustomersCity].IsNull;
+end;
+
+procedure TCustomersDataTableRules.SetCityIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_CustomersCity].AsVariant := Null;
+end;
+
+function TCustomersDataTableRules.GetRegionValue: String;
+begin
+ result := DataTable.Fields[idx_CustomersRegion].AsString;
+end;
+
+procedure TCustomersDataTableRules.SetRegionValue(const aValue: String);
+begin
+ DataTable.Fields[idx_CustomersRegion].AsString := aValue;
+end;
+
+function TCustomersDataTableRules.GetRegionIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_CustomersRegion].IsNull;
+end;
+
+procedure TCustomersDataTableRules.SetRegionIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_CustomersRegion].AsVariant := Null;
+end;
+
+function TCustomersDataTableRules.GetPostalCodeValue: String;
+begin
+ result := DataTable.Fields[idx_CustomersPostalCode].AsString;
+end;
+
+procedure TCustomersDataTableRules.SetPostalCodeValue(const aValue: String);
+begin
+ DataTable.Fields[idx_CustomersPostalCode].AsString := aValue;
+end;
+
+function TCustomersDataTableRules.GetPostalCodeIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_CustomersPostalCode].IsNull;
+end;
+
+procedure TCustomersDataTableRules.SetPostalCodeIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_CustomersPostalCode].AsVariant := Null;
+end;
+
+function TCustomersDataTableRules.GetCountryValue: String;
+begin
+ result := DataTable.Fields[idx_CustomersCountry].AsString;
+end;
+
+procedure TCustomersDataTableRules.SetCountryValue(const aValue: String);
+begin
+ DataTable.Fields[idx_CustomersCountry].AsString := aValue;
+end;
+
+function TCustomersDataTableRules.GetCountryIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_CustomersCountry].IsNull;
+end;
+
+procedure TCustomersDataTableRules.SetCountryIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_CustomersCountry].AsVariant := Null;
+end;
+
+function TCustomersDataTableRules.GetPhoneValue: String;
+begin
+ result := DataTable.Fields[idx_CustomersPhone].AsString;
+end;
+
+procedure TCustomersDataTableRules.SetPhoneValue(const aValue: String);
+begin
+ DataTable.Fields[idx_CustomersPhone].AsString := aValue;
+end;
+
+function TCustomersDataTableRules.GetPhoneIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_CustomersPhone].IsNull;
+end;
+
+procedure TCustomersDataTableRules.SetPhoneIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_CustomersPhone].AsVariant := Null;
+end;
+
+function TCustomersDataTableRules.GetFaxValue: String;
+begin
+ result := DataTable.Fields[idx_CustomersFax].AsString;
+end;
+
+procedure TCustomersDataTableRules.SetFaxValue(const aValue: String);
+begin
+ DataTable.Fields[idx_CustomersFax].AsString := aValue;
+end;
+
+function TCustomersDataTableRules.GetFaxIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_CustomersFax].IsNull;
+end;
+
+procedure TCustomersDataTableRules.SetFaxIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_CustomersFax].AsVariant := Null;
+end;
+
+
+{ TOrdersDataTableRules }
+constructor TOrdersDataTableRules.Create(aDataTable: TDADataTable);
+begin
+ inherited;
+end;
+
+destructor TOrdersDataTableRules.Destroy;
+begin
+ inherited;
+end;
+
+function TOrdersDataTableRules.GetOrderIDValue: Integer;
+begin
+ result := DataTable.Fields[idx_OrdersOrderID].AsInteger;
+end;
+
+procedure TOrdersDataTableRules.SetOrderIDValue(const aValue: Integer);
+begin
+ DataTable.Fields[idx_OrdersOrderID].AsInteger := aValue;
+end;
+
+function TOrdersDataTableRules.GetOrderIDIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_OrdersOrderID].IsNull;
+end;
+
+procedure TOrdersDataTableRules.SetOrderIDIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_OrdersOrderID].AsVariant := Null;
+end;
+
+function TOrdersDataTableRules.GetCustomerIDValue: String;
+begin
+ result := DataTable.Fields[idx_OrdersCustomerID].AsString;
+end;
+
+procedure TOrdersDataTableRules.SetCustomerIDValue(const aValue: String);
+begin
+ DataTable.Fields[idx_OrdersCustomerID].AsString := aValue;
+end;
+
+function TOrdersDataTableRules.GetCustomerIDIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_OrdersCustomerID].IsNull;
+end;
+
+procedure TOrdersDataTableRules.SetCustomerIDIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_OrdersCustomerID].AsVariant := Null;
+end;
+
+function TOrdersDataTableRules.GetEmployeeIDValue: Integer;
+begin
+ result := DataTable.Fields[idx_OrdersEmployeeID].AsInteger;
+end;
+
+procedure TOrdersDataTableRules.SetEmployeeIDValue(const aValue: Integer);
+begin
+ DataTable.Fields[idx_OrdersEmployeeID].AsInteger := aValue;
+end;
+
+function TOrdersDataTableRules.GetEmployeeIDIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_OrdersEmployeeID].IsNull;
+end;
+
+procedure TOrdersDataTableRules.SetEmployeeIDIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_OrdersEmployeeID].AsVariant := Null;
+end;
+
+function TOrdersDataTableRules.GetOrderDateValue: DateTime;
+begin
+ result := DataTable.Fields[idx_OrdersOrderDate].AsDateTime;
+end;
+
+procedure TOrdersDataTableRules.SetOrderDateValue(const aValue: DateTime);
+begin
+ DataTable.Fields[idx_OrdersOrderDate].AsDateTime := aValue;
+end;
+
+function TOrdersDataTableRules.GetOrderDateIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_OrdersOrderDate].IsNull;
+end;
+
+procedure TOrdersDataTableRules.SetOrderDateIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_OrdersOrderDate].AsVariant := Null;
+end;
+
+function TOrdersDataTableRules.GetRequiredDateValue: DateTime;
+begin
+ result := DataTable.Fields[idx_OrdersRequiredDate].AsDateTime;
+end;
+
+procedure TOrdersDataTableRules.SetRequiredDateValue(const aValue: DateTime);
+begin
+ DataTable.Fields[idx_OrdersRequiredDate].AsDateTime := aValue;
+end;
+
+function TOrdersDataTableRules.GetRequiredDateIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_OrdersRequiredDate].IsNull;
+end;
+
+procedure TOrdersDataTableRules.SetRequiredDateIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_OrdersRequiredDate].AsVariant := Null;
+end;
+
+function TOrdersDataTableRules.GetShippedDateValue: DateTime;
+begin
+ result := DataTable.Fields[idx_OrdersShippedDate].AsDateTime;
+end;
+
+procedure TOrdersDataTableRules.SetShippedDateValue(const aValue: DateTime);
+begin
+ DataTable.Fields[idx_OrdersShippedDate].AsDateTime := aValue;
+end;
+
+function TOrdersDataTableRules.GetShippedDateIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_OrdersShippedDate].IsNull;
+end;
+
+procedure TOrdersDataTableRules.SetShippedDateIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_OrdersShippedDate].AsVariant := Null;
+end;
+
+function TOrdersDataTableRules.GetShipViaValue: Integer;
+begin
+ result := DataTable.Fields[idx_OrdersShipVia].AsInteger;
+end;
+
+procedure TOrdersDataTableRules.SetShipViaValue(const aValue: Integer);
+begin
+ DataTable.Fields[idx_OrdersShipVia].AsInteger := aValue;
+end;
+
+function TOrdersDataTableRules.GetShipViaIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_OrdersShipVia].IsNull;
+end;
+
+procedure TOrdersDataTableRules.SetShipViaIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_OrdersShipVia].AsVariant := Null;
+end;
+
+function TOrdersDataTableRules.GetFreightValue: Float;
+begin
+ result := DataTable.Fields[idx_OrdersFreight].AsFloat;
+end;
+
+procedure TOrdersDataTableRules.SetFreightValue(const aValue: Float);
+begin
+ DataTable.Fields[idx_OrdersFreight].AsFloat := aValue;
+end;
+
+function TOrdersDataTableRules.GetFreightIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_OrdersFreight].IsNull;
+end;
+
+procedure TOrdersDataTableRules.SetFreightIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_OrdersFreight].AsVariant := Null;
+end;
+
+function TOrdersDataTableRules.GetShipNameValue: String;
+begin
+ result := DataTable.Fields[idx_OrdersShipName].AsString;
+end;
+
+procedure TOrdersDataTableRules.SetShipNameValue(const aValue: String);
+begin
+ DataTable.Fields[idx_OrdersShipName].AsString := aValue;
+end;
+
+function TOrdersDataTableRules.GetShipNameIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_OrdersShipName].IsNull;
+end;
+
+procedure TOrdersDataTableRules.SetShipNameIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_OrdersShipName].AsVariant := Null;
+end;
+
+function TOrdersDataTableRules.GetShipAddressValue: String;
+begin
+ result := DataTable.Fields[idx_OrdersShipAddress].AsString;
+end;
+
+procedure TOrdersDataTableRules.SetShipAddressValue(const aValue: String);
+begin
+ DataTable.Fields[idx_OrdersShipAddress].AsString := aValue;
+end;
+
+function TOrdersDataTableRules.GetShipAddressIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_OrdersShipAddress].IsNull;
+end;
+
+procedure TOrdersDataTableRules.SetShipAddressIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_OrdersShipAddress].AsVariant := Null;
+end;
+
+function TOrdersDataTableRules.GetShipCityValue: String;
+begin
+ result := DataTable.Fields[idx_OrdersShipCity].AsString;
+end;
+
+procedure TOrdersDataTableRules.SetShipCityValue(const aValue: String);
+begin
+ DataTable.Fields[idx_OrdersShipCity].AsString := aValue;
+end;
+
+function TOrdersDataTableRules.GetShipCityIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_OrdersShipCity].IsNull;
+end;
+
+procedure TOrdersDataTableRules.SetShipCityIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_OrdersShipCity].AsVariant := Null;
+end;
+
+function TOrdersDataTableRules.GetShipRegionValue: String;
+begin
+ result := DataTable.Fields[idx_OrdersShipRegion].AsString;
+end;
+
+procedure TOrdersDataTableRules.SetShipRegionValue(const aValue: String);
+begin
+ DataTable.Fields[idx_OrdersShipRegion].AsString := aValue;
+end;
+
+function TOrdersDataTableRules.GetShipRegionIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_OrdersShipRegion].IsNull;
+end;
+
+procedure TOrdersDataTableRules.SetShipRegionIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_OrdersShipRegion].AsVariant := Null;
+end;
+
+function TOrdersDataTableRules.GetShipPostalCodeValue: String;
+begin
+ result := DataTable.Fields[idx_OrdersShipPostalCode].AsString;
+end;
+
+procedure TOrdersDataTableRules.SetShipPostalCodeValue(const aValue: String);
+begin
+ DataTable.Fields[idx_OrdersShipPostalCode].AsString := aValue;
+end;
+
+function TOrdersDataTableRules.GetShipPostalCodeIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_OrdersShipPostalCode].IsNull;
+end;
+
+procedure TOrdersDataTableRules.SetShipPostalCodeIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_OrdersShipPostalCode].AsVariant := Null;
+end;
+
+function TOrdersDataTableRules.GetShipCountryValue: String;
+begin
+ result := DataTable.Fields[idx_OrdersShipCountry].AsString;
+end;
+
+procedure TOrdersDataTableRules.SetShipCountryValue(const aValue: String);
+begin
+ DataTable.Fields[idx_OrdersShipCountry].AsString := aValue;
+end;
+
+function TOrdersDataTableRules.GetShipCountryIsNull: boolean;
+begin
+ result := DataTable.Fields[idx_OrdersShipCountry].IsNull;
+end;
+
+procedure TOrdersDataTableRules.SetShipCountryIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ DataTable.Fields[idx_OrdersShipCountry].AsVariant := Null;
+end;
+
+
+initialization
+ RegisterDataTableRules(RID_Customers, TCustomersDataTableRules);
+ RegisterDataTableRules(RID_Orders, TOrdersDataTableRules);
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/SampleSchemaServer_Intf.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/SampleSchemaServer_Intf.pas
new file mode 100644
index 0000000..b75371d
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/SampleSchemaServer_Intf.pas
@@ -0,0 +1,1168 @@
+unit SampleSchemaServer_Intf;
+
+interface
+
+uses
+ Classes, DB, SysUtils, uROClasses, uDADataTable, uDABusinessProcessor, SampleSchemaClient_Intf;
+
+const
+ { Delta rules ids
+ Feel free to change them to something more human readable
+ but make sure they are unique in the context of your application }
+ RID_CustomersDelta = '{79206377-2D23-4B53-84A3-AA445FF02FA8}';
+ RID_OrdersDelta = '{AD299B05-275D-495E-8036-3B383CDA5248}';
+
+type
+ { ICustomersDelta }
+ ICustomersDelta = interface(ICustomers)
+ ['{79206377-2D23-4B53-84A3-AA445FF02FA8}']
+ { Property getters and setters }
+ function GetOldCustomerIDValue : String;
+ function GetOldCompanyNameValue : String;
+ function GetOldContactNameValue : String;
+ function GetOldContactTitleValue : String;
+ function GetOldAddressValue : String;
+ function GetOldCityValue : String;
+ function GetOldRegionValue : String;
+ function GetOldPostalCodeValue : String;
+ function GetOldCountryValue : String;
+ function GetOldPhoneValue : String;
+ function GetOldFaxValue : String;
+
+ { Properties }
+ property OldCustomerID : String read GetOldCustomerIDValue;
+ property OldCompanyName : String read GetOldCompanyNameValue;
+ property OldContactName : String read GetOldContactNameValue;
+ property OldContactTitle : String read GetOldContactTitleValue;
+ property OldAddress : String read GetOldAddressValue;
+ property OldCity : String read GetOldCityValue;
+ property OldRegion : String read GetOldRegionValue;
+ property OldPostalCode : String read GetOldPostalCodeValue;
+ property OldCountry : String read GetOldCountryValue;
+ property OldPhone : String read GetOldPhoneValue;
+ property OldFax : String read GetOldFaxValue;
+ end;
+
+ { TCustomersBusinessProcessorRules }
+ TCustomersBusinessProcessorRules = class(TDABusinessProcessorRules, ICustomers, ICustomersDelta)
+ private
+ protected
+ { Property getters and setters }
+ function GetCustomerIDValue: String; virtual;
+ function GetCustomerIDIsNull: Boolean; virtual;
+ function GetOldCustomerIDValue: String; virtual;
+ function GetOldCustomerIDIsNull: Boolean; virtual;
+ procedure SetCustomerIDValue(const aValue: String); virtual;
+ procedure SetCustomerIDIsNull(const aValue: Boolean); virtual;
+ function GetCompanyNameValue: String; virtual;
+ function GetCompanyNameIsNull: Boolean; virtual;
+ function GetOldCompanyNameValue: String; virtual;
+ function GetOldCompanyNameIsNull: Boolean; virtual;
+ procedure SetCompanyNameValue(const aValue: String); virtual;
+ procedure SetCompanyNameIsNull(const aValue: Boolean); virtual;
+ function GetContactNameValue: String; virtual;
+ function GetContactNameIsNull: Boolean; virtual;
+ function GetOldContactNameValue: String; virtual;
+ function GetOldContactNameIsNull: Boolean; virtual;
+ procedure SetContactNameValue(const aValue: String); virtual;
+ procedure SetContactNameIsNull(const aValue: Boolean); virtual;
+ function GetContactTitleValue: String; virtual;
+ function GetContactTitleIsNull: Boolean; virtual;
+ function GetOldContactTitleValue: String; virtual;
+ function GetOldContactTitleIsNull: Boolean; virtual;
+ procedure SetContactTitleValue(const aValue: String); virtual;
+ procedure SetContactTitleIsNull(const aValue: Boolean); virtual;
+ function GetAddressValue: String; virtual;
+ function GetAddressIsNull: Boolean; virtual;
+ function GetOldAddressValue: String; virtual;
+ function GetOldAddressIsNull: Boolean; virtual;
+ procedure SetAddressValue(const aValue: String); virtual;
+ procedure SetAddressIsNull(const aValue: Boolean); virtual;
+ function GetCityValue: String; virtual;
+ function GetCityIsNull: Boolean; virtual;
+ function GetOldCityValue: String; virtual;
+ function GetOldCityIsNull: Boolean; virtual;
+ procedure SetCityValue(const aValue: String); virtual;
+ procedure SetCityIsNull(const aValue: Boolean); virtual;
+ function GetRegionValue: String; virtual;
+ function GetRegionIsNull: Boolean; virtual;
+ function GetOldRegionValue: String; virtual;
+ function GetOldRegionIsNull: Boolean; virtual;
+ procedure SetRegionValue(const aValue: String); virtual;
+ procedure SetRegionIsNull(const aValue: Boolean); virtual;
+ function GetPostalCodeValue: String; virtual;
+ function GetPostalCodeIsNull: Boolean; virtual;
+ function GetOldPostalCodeValue: String; virtual;
+ function GetOldPostalCodeIsNull: Boolean; virtual;
+ procedure SetPostalCodeValue(const aValue: String); virtual;
+ procedure SetPostalCodeIsNull(const aValue: Boolean); virtual;
+ function GetCountryValue: String; virtual;
+ function GetCountryIsNull: Boolean; virtual;
+ function GetOldCountryValue: String; virtual;
+ function GetOldCountryIsNull: Boolean; virtual;
+ procedure SetCountryValue(const aValue: String); virtual;
+ procedure SetCountryIsNull(const aValue: Boolean); virtual;
+ function GetPhoneValue: String; virtual;
+ function GetPhoneIsNull: Boolean; virtual;
+ function GetOldPhoneValue: String; virtual;
+ function GetOldPhoneIsNull: Boolean; virtual;
+ procedure SetPhoneValue(const aValue: String); virtual;
+ procedure SetPhoneIsNull(const aValue: Boolean); virtual;
+ function GetFaxValue: String; virtual;
+ function GetFaxIsNull: Boolean; virtual;
+ function GetOldFaxValue: String; virtual;
+ function GetOldFaxIsNull: Boolean; virtual;
+ procedure SetFaxValue(const aValue: String); virtual;
+ procedure SetFaxIsNull(const aValue: Boolean); virtual;
+
+ { Properties }
+ property CustomerID : String read GetCustomerIDValue write SetCustomerIDValue;
+ property CustomerIDIsNull : Boolean read GetCustomerIDIsNull write SetCustomerIDIsNull;
+ property OldCustomerID : String read GetOldCustomerIDValue;
+ property OldCustomerIDIsNull : Boolean read GetOldCustomerIDIsNull;
+ property CompanyName : String read GetCompanyNameValue write SetCompanyNameValue;
+ property CompanyNameIsNull : Boolean read GetCompanyNameIsNull write SetCompanyNameIsNull;
+ property OldCompanyName : String read GetOldCompanyNameValue;
+ property OldCompanyNameIsNull : Boolean read GetOldCompanyNameIsNull;
+ property ContactName : String read GetContactNameValue write SetContactNameValue;
+ property ContactNameIsNull : Boolean read GetContactNameIsNull write SetContactNameIsNull;
+ property OldContactName : String read GetOldContactNameValue;
+ property OldContactNameIsNull : Boolean read GetOldContactNameIsNull;
+ property ContactTitle : String read GetContactTitleValue write SetContactTitleValue;
+ property ContactTitleIsNull : Boolean read GetContactTitleIsNull write SetContactTitleIsNull;
+ property OldContactTitle : String read GetOldContactTitleValue;
+ property OldContactTitleIsNull : Boolean read GetOldContactTitleIsNull;
+ property Address : String read GetAddressValue write SetAddressValue;
+ property AddressIsNull : Boolean read GetAddressIsNull write SetAddressIsNull;
+ property OldAddress : String read GetOldAddressValue;
+ property OldAddressIsNull : Boolean read GetOldAddressIsNull;
+ property City : String read GetCityValue write SetCityValue;
+ property CityIsNull : Boolean read GetCityIsNull write SetCityIsNull;
+ property OldCity : String read GetOldCityValue;
+ property OldCityIsNull : Boolean read GetOldCityIsNull;
+ property Region : String read GetRegionValue write SetRegionValue;
+ property RegionIsNull : Boolean read GetRegionIsNull write SetRegionIsNull;
+ property OldRegion : String read GetOldRegionValue;
+ property OldRegionIsNull : Boolean read GetOldRegionIsNull;
+ property PostalCode : String read GetPostalCodeValue write SetPostalCodeValue;
+ property PostalCodeIsNull : Boolean read GetPostalCodeIsNull write SetPostalCodeIsNull;
+ property OldPostalCode : String read GetOldPostalCodeValue;
+ property OldPostalCodeIsNull : Boolean read GetOldPostalCodeIsNull;
+ property Country : String read GetCountryValue write SetCountryValue;
+ property CountryIsNull : Boolean read GetCountryIsNull write SetCountryIsNull;
+ property OldCountry : String read GetOldCountryValue;
+ property OldCountryIsNull : Boolean read GetOldCountryIsNull;
+ property Phone : String read GetPhoneValue write SetPhoneValue;
+ property PhoneIsNull : Boolean read GetPhoneIsNull write SetPhoneIsNull;
+ property OldPhone : String read GetOldPhoneValue;
+ property OldPhoneIsNull : Boolean read GetOldPhoneIsNull;
+ property Fax : String read GetFaxValue write SetFaxValue;
+ property FaxIsNull : Boolean read GetFaxIsNull write SetFaxIsNull;
+ property OldFax : String read GetOldFaxValue;
+ property OldFaxIsNull : Boolean read GetOldFaxIsNull;
+
+ public
+ constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
+ destructor Destroy; override;
+
+ end;
+
+ { IOrdersDelta }
+ IOrdersDelta = interface(IOrders)
+ ['{AD299B05-275D-495E-8036-3B383CDA5248}']
+ { Property getters and setters }
+ function GetOldOrderIDValue : Integer;
+ function GetOldCustomerIDValue : String;
+ function GetOldEmployeeIDValue : Integer;
+ function GetOldOrderDateValue : DateTime;
+ function GetOldRequiredDateValue : DateTime;
+ function GetOldShippedDateValue : DateTime;
+ function GetOldShipViaValue : Integer;
+ function GetOldFreightValue : Float;
+ function GetOldShipNameValue : String;
+ function GetOldShipAddressValue : String;
+ function GetOldShipCityValue : String;
+ function GetOldShipRegionValue : String;
+ function GetOldShipPostalCodeValue : String;
+ function GetOldShipCountryValue : String;
+
+ { Properties }
+ property OldOrderID : Integer read GetOldOrderIDValue;
+ property OldCustomerID : String read GetOldCustomerIDValue;
+ property OldEmployeeID : Integer read GetOldEmployeeIDValue;
+ property OldOrderDate : DateTime read GetOldOrderDateValue;
+ property OldRequiredDate : DateTime read GetOldRequiredDateValue;
+ property OldShippedDate : DateTime read GetOldShippedDateValue;
+ property OldShipVia : Integer read GetOldShipViaValue;
+ property OldFreight : Float read GetOldFreightValue;
+ property OldShipName : String read GetOldShipNameValue;
+ property OldShipAddress : String read GetOldShipAddressValue;
+ property OldShipCity : String read GetOldShipCityValue;
+ property OldShipRegion : String read GetOldShipRegionValue;
+ property OldShipPostalCode : String read GetOldShipPostalCodeValue;
+ property OldShipCountry : String read GetOldShipCountryValue;
+ end;
+
+ { TOrdersBusinessProcessorRules }
+ TOrdersBusinessProcessorRules = class(TDABusinessProcessorRules, IOrders, IOrdersDelta)
+ private
+ protected
+ { Property getters and setters }
+ function GetOrderIDValue: Integer; virtual;
+ function GetOrderIDIsNull: Boolean; virtual;
+ function GetOldOrderIDValue: Integer; virtual;
+ function GetOldOrderIDIsNull: Boolean; virtual;
+ procedure SetOrderIDValue(const aValue: Integer); virtual;
+ procedure SetOrderIDIsNull(const aValue: Boolean); virtual;
+ function GetCustomerIDValue: String; virtual;
+ function GetCustomerIDIsNull: Boolean; virtual;
+ function GetOldCustomerIDValue: String; virtual;
+ function GetOldCustomerIDIsNull: Boolean; virtual;
+ procedure SetCustomerIDValue(const aValue: String); virtual;
+ procedure SetCustomerIDIsNull(const aValue: Boolean); virtual;
+ function GetEmployeeIDValue: Integer; virtual;
+ function GetEmployeeIDIsNull: Boolean; virtual;
+ function GetOldEmployeeIDValue: Integer; virtual;
+ function GetOldEmployeeIDIsNull: Boolean; virtual;
+ procedure SetEmployeeIDValue(const aValue: Integer); virtual;
+ procedure SetEmployeeIDIsNull(const aValue: Boolean); virtual;
+ function GetOrderDateValue: DateTime; virtual;
+ function GetOrderDateIsNull: Boolean; virtual;
+ function GetOldOrderDateValue: DateTime; virtual;
+ function GetOldOrderDateIsNull: Boolean; virtual;
+ procedure SetOrderDateValue(const aValue: DateTime); virtual;
+ procedure SetOrderDateIsNull(const aValue: Boolean); virtual;
+ function GetRequiredDateValue: DateTime; virtual;
+ function GetRequiredDateIsNull: Boolean; virtual;
+ function GetOldRequiredDateValue: DateTime; virtual;
+ function GetOldRequiredDateIsNull: Boolean; virtual;
+ procedure SetRequiredDateValue(const aValue: DateTime); virtual;
+ procedure SetRequiredDateIsNull(const aValue: Boolean); virtual;
+ function GetShippedDateValue: DateTime; virtual;
+ function GetShippedDateIsNull: Boolean; virtual;
+ function GetOldShippedDateValue: DateTime; virtual;
+ function GetOldShippedDateIsNull: Boolean; virtual;
+ procedure SetShippedDateValue(const aValue: DateTime); virtual;
+ procedure SetShippedDateIsNull(const aValue: Boolean); virtual;
+ function GetShipViaValue: Integer; virtual;
+ function GetShipViaIsNull: Boolean; virtual;
+ function GetOldShipViaValue: Integer; virtual;
+ function GetOldShipViaIsNull: Boolean; virtual;
+ procedure SetShipViaValue(const aValue: Integer); virtual;
+ procedure SetShipViaIsNull(const aValue: Boolean); virtual;
+ function GetFreightValue: Float; virtual;
+ function GetFreightIsNull: Boolean; virtual;
+ function GetOldFreightValue: Float; virtual;
+ function GetOldFreightIsNull: Boolean; virtual;
+ procedure SetFreightValue(const aValue: Float); virtual;
+ procedure SetFreightIsNull(const aValue: Boolean); virtual;
+ function GetShipNameValue: String; virtual;
+ function GetShipNameIsNull: Boolean; virtual;
+ function GetOldShipNameValue: String; virtual;
+ function GetOldShipNameIsNull: Boolean; virtual;
+ procedure SetShipNameValue(const aValue: String); virtual;
+ procedure SetShipNameIsNull(const aValue: Boolean); virtual;
+ function GetShipAddressValue: String; virtual;
+ function GetShipAddressIsNull: Boolean; virtual;
+ function GetOldShipAddressValue: String; virtual;
+ function GetOldShipAddressIsNull: Boolean; virtual;
+ procedure SetShipAddressValue(const aValue: String); virtual;
+ procedure SetShipAddressIsNull(const aValue: Boolean); virtual;
+ function GetShipCityValue: String; virtual;
+ function GetShipCityIsNull: Boolean; virtual;
+ function GetOldShipCityValue: String; virtual;
+ function GetOldShipCityIsNull: Boolean; virtual;
+ procedure SetShipCityValue(const aValue: String); virtual;
+ procedure SetShipCityIsNull(const aValue: Boolean); virtual;
+ function GetShipRegionValue: String; virtual;
+ function GetShipRegionIsNull: Boolean; virtual;
+ function GetOldShipRegionValue: String; virtual;
+ function GetOldShipRegionIsNull: Boolean; virtual;
+ procedure SetShipRegionValue(const aValue: String); virtual;
+ procedure SetShipRegionIsNull(const aValue: Boolean); virtual;
+ function GetShipPostalCodeValue: String; virtual;
+ function GetShipPostalCodeIsNull: Boolean; virtual;
+ function GetOldShipPostalCodeValue: String; virtual;
+ function GetOldShipPostalCodeIsNull: Boolean; virtual;
+ procedure SetShipPostalCodeValue(const aValue: String); virtual;
+ procedure SetShipPostalCodeIsNull(const aValue: Boolean); virtual;
+ function GetShipCountryValue: String; virtual;
+ function GetShipCountryIsNull: Boolean; virtual;
+ function GetOldShipCountryValue: String; virtual;
+ function GetOldShipCountryIsNull: Boolean; virtual;
+ procedure SetShipCountryValue(const aValue: String); virtual;
+ procedure SetShipCountryIsNull(const aValue: Boolean); virtual;
+
+ { Properties }
+ property OrderID : Integer read GetOrderIDValue write SetOrderIDValue;
+ property OrderIDIsNull : Boolean read GetOrderIDIsNull write SetOrderIDIsNull;
+ property OldOrderID : Integer read GetOldOrderIDValue;
+ property OldOrderIDIsNull : Boolean read GetOldOrderIDIsNull;
+ property CustomerID : String read GetCustomerIDValue write SetCustomerIDValue;
+ property CustomerIDIsNull : Boolean read GetCustomerIDIsNull write SetCustomerIDIsNull;
+ property OldCustomerID : String read GetOldCustomerIDValue;
+ property OldCustomerIDIsNull : Boolean read GetOldCustomerIDIsNull;
+ property EmployeeID : Integer read GetEmployeeIDValue write SetEmployeeIDValue;
+ property EmployeeIDIsNull : Boolean read GetEmployeeIDIsNull write SetEmployeeIDIsNull;
+ property OldEmployeeID : Integer read GetOldEmployeeIDValue;
+ property OldEmployeeIDIsNull : Boolean read GetOldEmployeeIDIsNull;
+ property OrderDate : DateTime read GetOrderDateValue write SetOrderDateValue;
+ property OrderDateIsNull : Boolean read GetOrderDateIsNull write SetOrderDateIsNull;
+ property OldOrderDate : DateTime read GetOldOrderDateValue;
+ property OldOrderDateIsNull : Boolean read GetOldOrderDateIsNull;
+ property RequiredDate : DateTime read GetRequiredDateValue write SetRequiredDateValue;
+ property RequiredDateIsNull : Boolean read GetRequiredDateIsNull write SetRequiredDateIsNull;
+ property OldRequiredDate : DateTime read GetOldRequiredDateValue;
+ property OldRequiredDateIsNull : Boolean read GetOldRequiredDateIsNull;
+ property ShippedDate : DateTime read GetShippedDateValue write SetShippedDateValue;
+ property ShippedDateIsNull : Boolean read GetShippedDateIsNull write SetShippedDateIsNull;
+ property OldShippedDate : DateTime read GetOldShippedDateValue;
+ property OldShippedDateIsNull : Boolean read GetOldShippedDateIsNull;
+ property ShipVia : Integer read GetShipViaValue write SetShipViaValue;
+ property ShipViaIsNull : Boolean read GetShipViaIsNull write SetShipViaIsNull;
+ property OldShipVia : Integer read GetOldShipViaValue;
+ property OldShipViaIsNull : Boolean read GetOldShipViaIsNull;
+ property Freight : Float read GetFreightValue write SetFreightValue;
+ property FreightIsNull : Boolean read GetFreightIsNull write SetFreightIsNull;
+ property OldFreight : Float read GetOldFreightValue;
+ property OldFreightIsNull : Boolean read GetOldFreightIsNull;
+ property ShipName : String read GetShipNameValue write SetShipNameValue;
+ property ShipNameIsNull : Boolean read GetShipNameIsNull write SetShipNameIsNull;
+ property OldShipName : String read GetOldShipNameValue;
+ property OldShipNameIsNull : Boolean read GetOldShipNameIsNull;
+ property ShipAddress : String read GetShipAddressValue write SetShipAddressValue;
+ property ShipAddressIsNull : Boolean read GetShipAddressIsNull write SetShipAddressIsNull;
+ property OldShipAddress : String read GetOldShipAddressValue;
+ property OldShipAddressIsNull : Boolean read GetOldShipAddressIsNull;
+ property ShipCity : String read GetShipCityValue write SetShipCityValue;
+ property ShipCityIsNull : Boolean read GetShipCityIsNull write SetShipCityIsNull;
+ property OldShipCity : String read GetOldShipCityValue;
+ property OldShipCityIsNull : Boolean read GetOldShipCityIsNull;
+ property ShipRegion : String read GetShipRegionValue write SetShipRegionValue;
+ property ShipRegionIsNull : Boolean read GetShipRegionIsNull write SetShipRegionIsNull;
+ property OldShipRegion : String read GetOldShipRegionValue;
+ property OldShipRegionIsNull : Boolean read GetOldShipRegionIsNull;
+ property ShipPostalCode : String read GetShipPostalCodeValue write SetShipPostalCodeValue;
+ property ShipPostalCodeIsNull : Boolean read GetShipPostalCodeIsNull write SetShipPostalCodeIsNull;
+ property OldShipPostalCode : String read GetOldShipPostalCodeValue;
+ property OldShipPostalCodeIsNull : Boolean read GetOldShipPostalCodeIsNull;
+ property ShipCountry : String read GetShipCountryValue write SetShipCountryValue;
+ property ShipCountryIsNull : Boolean read GetShipCountryIsNull write SetShipCountryIsNull;
+ property OldShipCountry : String read GetOldShipCountryValue;
+ property OldShipCountryIsNull : Boolean read GetOldShipCountryIsNull;
+
+ public
+ constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
+ destructor Destroy; override;
+
+ end;
+
+implementation
+
+uses
+ Variants, uROBinaryHelpers;
+
+{ TCustomersBusinessProcessorRules }
+constructor TCustomersBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
+begin
+ inherited;
+end;
+
+destructor TCustomersBusinessProcessorRules.Destroy;
+begin
+ inherited;
+end;
+
+function TCustomersBusinessProcessorRules.GetCustomerIDValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersCustomerID];
+end;
+
+function TCustomersBusinessProcessorRules.GetCustomerIDIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersCustomerID]);
+end;
+
+function TCustomersBusinessProcessorRules.GetOldCustomerIDValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersCustomerID];
+end;
+
+function TCustomersBusinessProcessorRules.GetOldCustomerIDIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersCustomerID]);
+end;
+
+procedure TCustomersBusinessProcessorRules.SetCustomerIDValue(const aValue: String);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersCustomerID] := aValue;
+end;
+
+procedure TCustomersBusinessProcessorRules.SetCustomerIDIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersCustomerID] := Null;
+end;
+
+function TCustomersBusinessProcessorRules.GetCompanyNameValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersCompanyName];
+end;
+
+function TCustomersBusinessProcessorRules.GetCompanyNameIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersCompanyName]);
+end;
+
+function TCustomersBusinessProcessorRules.GetOldCompanyNameValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersCompanyName];
+end;
+
+function TCustomersBusinessProcessorRules.GetOldCompanyNameIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersCompanyName]);
+end;
+
+procedure TCustomersBusinessProcessorRules.SetCompanyNameValue(const aValue: String);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersCompanyName] := aValue;
+end;
+
+procedure TCustomersBusinessProcessorRules.SetCompanyNameIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersCompanyName] := Null;
+end;
+
+function TCustomersBusinessProcessorRules.GetContactNameValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersContactName];
+end;
+
+function TCustomersBusinessProcessorRules.GetContactNameIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersContactName]);
+end;
+
+function TCustomersBusinessProcessorRules.GetOldContactNameValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersContactName];
+end;
+
+function TCustomersBusinessProcessorRules.GetOldContactNameIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersContactName]);
+end;
+
+procedure TCustomersBusinessProcessorRules.SetContactNameValue(const aValue: String);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersContactName] := aValue;
+end;
+
+procedure TCustomersBusinessProcessorRules.SetContactNameIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersContactName] := Null;
+end;
+
+function TCustomersBusinessProcessorRules.GetContactTitleValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersContactTitle];
+end;
+
+function TCustomersBusinessProcessorRules.GetContactTitleIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersContactTitle]);
+end;
+
+function TCustomersBusinessProcessorRules.GetOldContactTitleValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersContactTitle];
+end;
+
+function TCustomersBusinessProcessorRules.GetOldContactTitleIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersContactTitle]);
+end;
+
+procedure TCustomersBusinessProcessorRules.SetContactTitleValue(const aValue: String);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersContactTitle] := aValue;
+end;
+
+procedure TCustomersBusinessProcessorRules.SetContactTitleIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersContactTitle] := Null;
+end;
+
+function TCustomersBusinessProcessorRules.GetAddressValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersAddress];
+end;
+
+function TCustomersBusinessProcessorRules.GetAddressIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersAddress]);
+end;
+
+function TCustomersBusinessProcessorRules.GetOldAddressValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersAddress];
+end;
+
+function TCustomersBusinessProcessorRules.GetOldAddressIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersAddress]);
+end;
+
+procedure TCustomersBusinessProcessorRules.SetAddressValue(const aValue: String);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersAddress] := aValue;
+end;
+
+procedure TCustomersBusinessProcessorRules.SetAddressIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersAddress] := Null;
+end;
+
+function TCustomersBusinessProcessorRules.GetCityValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersCity];
+end;
+
+function TCustomersBusinessProcessorRules.GetCityIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersCity]);
+end;
+
+function TCustomersBusinessProcessorRules.GetOldCityValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersCity];
+end;
+
+function TCustomersBusinessProcessorRules.GetOldCityIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersCity]);
+end;
+
+procedure TCustomersBusinessProcessorRules.SetCityValue(const aValue: String);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersCity] := aValue;
+end;
+
+procedure TCustomersBusinessProcessorRules.SetCityIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersCity] := Null;
+end;
+
+function TCustomersBusinessProcessorRules.GetRegionValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersRegion];
+end;
+
+function TCustomersBusinessProcessorRules.GetRegionIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersRegion]);
+end;
+
+function TCustomersBusinessProcessorRules.GetOldRegionValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersRegion];
+end;
+
+function TCustomersBusinessProcessorRules.GetOldRegionIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersRegion]);
+end;
+
+procedure TCustomersBusinessProcessorRules.SetRegionValue(const aValue: String);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersRegion] := aValue;
+end;
+
+procedure TCustomersBusinessProcessorRules.SetRegionIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersRegion] := Null;
+end;
+
+function TCustomersBusinessProcessorRules.GetPostalCodeValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersPostalCode];
+end;
+
+function TCustomersBusinessProcessorRules.GetPostalCodeIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersPostalCode]);
+end;
+
+function TCustomersBusinessProcessorRules.GetOldPostalCodeValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersPostalCode];
+end;
+
+function TCustomersBusinessProcessorRules.GetOldPostalCodeIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersPostalCode]);
+end;
+
+procedure TCustomersBusinessProcessorRules.SetPostalCodeValue(const aValue: String);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersPostalCode] := aValue;
+end;
+
+procedure TCustomersBusinessProcessorRules.SetPostalCodeIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersPostalCode] := Null;
+end;
+
+function TCustomersBusinessProcessorRules.GetCountryValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersCountry];
+end;
+
+function TCustomersBusinessProcessorRules.GetCountryIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersCountry]);
+end;
+
+function TCustomersBusinessProcessorRules.GetOldCountryValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersCountry];
+end;
+
+function TCustomersBusinessProcessorRules.GetOldCountryIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersCountry]);
+end;
+
+procedure TCustomersBusinessProcessorRules.SetCountryValue(const aValue: String);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersCountry] := aValue;
+end;
+
+procedure TCustomersBusinessProcessorRules.SetCountryIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersCountry] := Null;
+end;
+
+function TCustomersBusinessProcessorRules.GetPhoneValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersPhone];
+end;
+
+function TCustomersBusinessProcessorRules.GetPhoneIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersPhone]);
+end;
+
+function TCustomersBusinessProcessorRules.GetOldPhoneValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersPhone];
+end;
+
+function TCustomersBusinessProcessorRules.GetOldPhoneIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersPhone]);
+end;
+
+procedure TCustomersBusinessProcessorRules.SetPhoneValue(const aValue: String);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersPhone] := aValue;
+end;
+
+procedure TCustomersBusinessProcessorRules.SetPhoneIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersPhone] := Null;
+end;
+
+function TCustomersBusinessProcessorRules.GetFaxValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersFax];
+end;
+
+function TCustomersBusinessProcessorRules.GetFaxIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersFax]);
+end;
+
+function TCustomersBusinessProcessorRules.GetOldFaxValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersFax];
+end;
+
+function TCustomersBusinessProcessorRules.GetOldFaxIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_CustomersFax]);
+end;
+
+procedure TCustomersBusinessProcessorRules.SetFaxValue(const aValue: String);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersFax] := aValue;
+end;
+
+procedure TCustomersBusinessProcessorRules.SetFaxIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_CustomersFax] := Null;
+end;
+
+
+{ TOrdersBusinessProcessorRules }
+constructor TOrdersBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
+begin
+ inherited;
+end;
+
+destructor TOrdersBusinessProcessorRules.Destroy;
+begin
+ inherited;
+end;
+
+function TOrdersBusinessProcessorRules.GetOrderIDValue: Integer;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersOrderID];
+end;
+
+function TOrdersBusinessProcessorRules.GetOrderIDIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersOrderID]);
+end;
+
+function TOrdersBusinessProcessorRules.GetOldOrderIDValue: Integer;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersOrderID];
+end;
+
+function TOrdersBusinessProcessorRules.GetOldOrderIDIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersOrderID]);
+end;
+
+procedure TOrdersBusinessProcessorRules.SetOrderIDValue(const aValue: Integer);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersOrderID] := aValue;
+end;
+
+procedure TOrdersBusinessProcessorRules.SetOrderIDIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersOrderID] := Null;
+end;
+
+function TOrdersBusinessProcessorRules.GetCustomerIDValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersCustomerID];
+end;
+
+function TOrdersBusinessProcessorRules.GetCustomerIDIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersCustomerID]);
+end;
+
+function TOrdersBusinessProcessorRules.GetOldCustomerIDValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersCustomerID];
+end;
+
+function TOrdersBusinessProcessorRules.GetOldCustomerIDIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersCustomerID]);
+end;
+
+procedure TOrdersBusinessProcessorRules.SetCustomerIDValue(const aValue: String);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersCustomerID] := aValue;
+end;
+
+procedure TOrdersBusinessProcessorRules.SetCustomerIDIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersCustomerID] := Null;
+end;
+
+function TOrdersBusinessProcessorRules.GetEmployeeIDValue: Integer;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersEmployeeID];
+end;
+
+function TOrdersBusinessProcessorRules.GetEmployeeIDIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersEmployeeID]);
+end;
+
+function TOrdersBusinessProcessorRules.GetOldEmployeeIDValue: Integer;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersEmployeeID];
+end;
+
+function TOrdersBusinessProcessorRules.GetOldEmployeeIDIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersEmployeeID]);
+end;
+
+procedure TOrdersBusinessProcessorRules.SetEmployeeIDValue(const aValue: Integer);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersEmployeeID] := aValue;
+end;
+
+procedure TOrdersBusinessProcessorRules.SetEmployeeIDIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersEmployeeID] := Null;
+end;
+
+function TOrdersBusinessProcessorRules.GetOrderDateValue: DateTime;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersOrderDate];
+end;
+
+function TOrdersBusinessProcessorRules.GetOrderDateIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersOrderDate]);
+end;
+
+function TOrdersBusinessProcessorRules.GetOldOrderDateValue: DateTime;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersOrderDate];
+end;
+
+function TOrdersBusinessProcessorRules.GetOldOrderDateIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersOrderDate]);
+end;
+
+procedure TOrdersBusinessProcessorRules.SetOrderDateValue(const aValue: DateTime);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersOrderDate] := aValue;
+end;
+
+procedure TOrdersBusinessProcessorRules.SetOrderDateIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersOrderDate] := Null;
+end;
+
+function TOrdersBusinessProcessorRules.GetRequiredDateValue: DateTime;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersRequiredDate];
+end;
+
+function TOrdersBusinessProcessorRules.GetRequiredDateIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersRequiredDate]);
+end;
+
+function TOrdersBusinessProcessorRules.GetOldRequiredDateValue: DateTime;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersRequiredDate];
+end;
+
+function TOrdersBusinessProcessorRules.GetOldRequiredDateIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersRequiredDate]);
+end;
+
+procedure TOrdersBusinessProcessorRules.SetRequiredDateValue(const aValue: DateTime);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersRequiredDate] := aValue;
+end;
+
+procedure TOrdersBusinessProcessorRules.SetRequiredDateIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersRequiredDate] := Null;
+end;
+
+function TOrdersBusinessProcessorRules.GetShippedDateValue: DateTime;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShippedDate];
+end;
+
+function TOrdersBusinessProcessorRules.GetShippedDateIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShippedDate]);
+end;
+
+function TOrdersBusinessProcessorRules.GetOldShippedDateValue: DateTime;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersShippedDate];
+end;
+
+function TOrdersBusinessProcessorRules.GetOldShippedDateIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersShippedDate]);
+end;
+
+procedure TOrdersBusinessProcessorRules.SetShippedDateValue(const aValue: DateTime);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShippedDate] := aValue;
+end;
+
+procedure TOrdersBusinessProcessorRules.SetShippedDateIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShippedDate] := Null;
+end;
+
+function TOrdersBusinessProcessorRules.GetShipViaValue: Integer;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipVia];
+end;
+
+function TOrdersBusinessProcessorRules.GetShipViaIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipVia]);
+end;
+
+function TOrdersBusinessProcessorRules.GetOldShipViaValue: Integer;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersShipVia];
+end;
+
+function TOrdersBusinessProcessorRules.GetOldShipViaIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersShipVia]);
+end;
+
+procedure TOrdersBusinessProcessorRules.SetShipViaValue(const aValue: Integer);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipVia] := aValue;
+end;
+
+procedure TOrdersBusinessProcessorRules.SetShipViaIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipVia] := Null;
+end;
+
+function TOrdersBusinessProcessorRules.GetFreightValue: Float;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersFreight];
+end;
+
+function TOrdersBusinessProcessorRules.GetFreightIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersFreight]);
+end;
+
+function TOrdersBusinessProcessorRules.GetOldFreightValue: Float;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersFreight];
+end;
+
+function TOrdersBusinessProcessorRules.GetOldFreightIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersFreight]);
+end;
+
+procedure TOrdersBusinessProcessorRules.SetFreightValue(const aValue: Float);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersFreight] := aValue;
+end;
+
+procedure TOrdersBusinessProcessorRules.SetFreightIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersFreight] := Null;
+end;
+
+function TOrdersBusinessProcessorRules.GetShipNameValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipName];
+end;
+
+function TOrdersBusinessProcessorRules.GetShipNameIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipName]);
+end;
+
+function TOrdersBusinessProcessorRules.GetOldShipNameValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersShipName];
+end;
+
+function TOrdersBusinessProcessorRules.GetOldShipNameIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersShipName]);
+end;
+
+procedure TOrdersBusinessProcessorRules.SetShipNameValue(const aValue: String);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipName] := aValue;
+end;
+
+procedure TOrdersBusinessProcessorRules.SetShipNameIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipName] := Null;
+end;
+
+function TOrdersBusinessProcessorRules.GetShipAddressValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipAddress];
+end;
+
+function TOrdersBusinessProcessorRules.GetShipAddressIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipAddress]);
+end;
+
+function TOrdersBusinessProcessorRules.GetOldShipAddressValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersShipAddress];
+end;
+
+function TOrdersBusinessProcessorRules.GetOldShipAddressIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersShipAddress]);
+end;
+
+procedure TOrdersBusinessProcessorRules.SetShipAddressValue(const aValue: String);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipAddress] := aValue;
+end;
+
+procedure TOrdersBusinessProcessorRules.SetShipAddressIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipAddress] := Null;
+end;
+
+function TOrdersBusinessProcessorRules.GetShipCityValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipCity];
+end;
+
+function TOrdersBusinessProcessorRules.GetShipCityIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipCity]);
+end;
+
+function TOrdersBusinessProcessorRules.GetOldShipCityValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersShipCity];
+end;
+
+function TOrdersBusinessProcessorRules.GetOldShipCityIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersShipCity]);
+end;
+
+procedure TOrdersBusinessProcessorRules.SetShipCityValue(const aValue: String);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipCity] := aValue;
+end;
+
+procedure TOrdersBusinessProcessorRules.SetShipCityIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipCity] := Null;
+end;
+
+function TOrdersBusinessProcessorRules.GetShipRegionValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipRegion];
+end;
+
+function TOrdersBusinessProcessorRules.GetShipRegionIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipRegion]);
+end;
+
+function TOrdersBusinessProcessorRules.GetOldShipRegionValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersShipRegion];
+end;
+
+function TOrdersBusinessProcessorRules.GetOldShipRegionIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersShipRegion]);
+end;
+
+procedure TOrdersBusinessProcessorRules.SetShipRegionValue(const aValue: String);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipRegion] := aValue;
+end;
+
+procedure TOrdersBusinessProcessorRules.SetShipRegionIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipRegion] := Null;
+end;
+
+function TOrdersBusinessProcessorRules.GetShipPostalCodeValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipPostalCode];
+end;
+
+function TOrdersBusinessProcessorRules.GetShipPostalCodeIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipPostalCode]);
+end;
+
+function TOrdersBusinessProcessorRules.GetOldShipPostalCodeValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersShipPostalCode];
+end;
+
+function TOrdersBusinessProcessorRules.GetOldShipPostalCodeIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersShipPostalCode]);
+end;
+
+procedure TOrdersBusinessProcessorRules.SetShipPostalCodeValue(const aValue: String);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipPostalCode] := aValue;
+end;
+
+procedure TOrdersBusinessProcessorRules.SetShipPostalCodeIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipPostalCode] := Null;
+end;
+
+function TOrdersBusinessProcessorRules.GetShipCountryValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipCountry];
+end;
+
+function TOrdersBusinessProcessorRules.GetShipCountryIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipCountry]);
+end;
+
+function TOrdersBusinessProcessorRules.GetOldShipCountryValue: String;
+begin
+ result := BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersShipCountry];
+end;
+
+function TOrdersBusinessProcessorRules.GetOldShipCountryIsNull: Boolean;
+begin
+ result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_OrdersShipCountry]);
+end;
+
+procedure TOrdersBusinessProcessorRules.SetShipCountryValue(const aValue: String);
+begin
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipCountry] := aValue;
+end;
+
+procedure TOrdersBusinessProcessorRules.SetShipCountryIsNull(const aValue: Boolean);
+begin
+ if aValue then
+ BusinessProcessor.CurrentChange.NewValueByName[fld_OrdersShipCountry] := Null;
+end;
+
+
+initialization
+ RegisterBusinessProcessorRules(RID_CustomersDelta, TCustomersBusinessProcessorRules);
+ RegisterBusinessProcessorRules(RID_OrdersDelta, TOrdersBusinessProcessorRules);
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTyped.Sample.html b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTyped.Sample.html
new file mode 100644
index 0000000..a223583
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTyped.Sample.html
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+ Strongly Typed Sample
+
+
+
+Purpose
+
+
+This example shows usage of business rules. It enforces additional rules that might change over time. This is a good example to show the advantages of a multi-tier architecture: systems can be updated via a server re-deploy without the need to update any client.
+
+
+Examine the Code
+
+
+ uBizCustomersServer.pas :
+this unit contains the business rules handlers for the server application.
+It's important to note however that some business rules are shared among clients and servers. For example, customer validation is done by calling the ValidateCustomers function (uBizCustomersClient.pas). Validation is not a requirement but a highly recommended practice, expecially when your system is accessed by clients that were not developed by you (i.e. Java clients accessing your server through SOAP).
+
+
+ uBizCustomersClient.pas :
+this unit contains the business rules handlers for the client application.
+ The simplest possible implementation just overrides the methods inherited from TDADataTableRules (i.e. AfterInsert, BeforePost).
+ More sophisticated implementations may add additional functionality and even make it accessible from outside units (i.e. a form or a data module hosting a TDADataTable).
+ TBizCustomersClientRules shows how to do both by overriding a few event handlers and by adding support for the IAdvancedCustomer interface.
+
+
+
+Note
+Adding interfaces like IAdvancedCustomer is not required to implement extra functionality that is only accessed in the context of a business rule class/unit. You can obviously add any method you want to classes like TBizCustomersClientRules and reference them from other methods in order to make them more "object oriented".
+However, when you need to access this functionality from the outside world you need to define an "access contract" via an interface. You can then treat TDADataTables as IAdvancedCustomer (or whatever other interface you decide to create) by simply using the Supports VCL function.
+ The bCheckBalanceClick method in fClientForm.pas is an example of this.
+ TDADataTable allows you to access the instance of TBizCustomersClientRules via the BusinessRules property. You could also type cast that property to TBizCustomersClientRules but, in general, the interface approach is cleaner and more elegant.
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTyped.bdsgroup b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTyped.bdsgroup
new file mode 100644
index 0000000..cd41e1a
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTyped.bdsgroup
@@ -0,0 +1,20 @@
+
+
+
+
+ Default.Personality
+
+ 1.0
+ {BCB13FA7-70C7-44F9-A359-4B5562556E74}
+
+
+
+
+
+ StronglyTypedServer.bdsproj
+ StronglyTypedClient.bdsproj
+ StronglyTypedServer.exe StronglyTypedClient.exe
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTyped.bpg b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTyped.bpg
new file mode 100644
index 0000000..9eb9328
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTyped.bpg
@@ -0,0 +1,23 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = StronglyTypedServer.exe StronglyTypedClient.exe
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+StronglyTypedServer.exe: StronglyTypedServer.dpr
+ $(DCC)
+
+StronglyTypedClient.exe: StronglyTypedClient.dpr
+ $(DCC)
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTyped.groupproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTyped.groupproj
new file mode 100644
index 0000000..ea9e40d
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTyped.groupproj
@@ -0,0 +1,40 @@
+
+
+ {4dcc5f31-7535-40c3-93a7-2ad992327e4b}
+
+
+
+
+ Default.Personality
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedClient.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedClient.bdsproj
new file mode 100644
index 0000000..0357a18
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedClient.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {4AEA9B21-E042-46B3-8DAD-5272B529BC49}
+
+
+
+
+ StronglyTypedClient.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedClient.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedClient.dpr
new file mode 100644
index 0000000..0f2d5e6
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedClient.dpr
@@ -0,0 +1,20 @@
+program StronglyTypedClient;
+
+uses
+ uROComInit,
+ Forms,
+ StronglyTypedClientMain in 'StronglyTypedClientMain.pas' {StronglyTypedClientMainForm},
+ uBizCustomersClient in 'uBizCustomersClient.pas',
+ StronglyTypedClientData in 'StronglyTypedClientData.pas' {StronglyTypedClientDataModule: TDAClientDataModule},
+ SampleSchemaClient_Intf in 'SampleSchemaClient_Intf.pas',
+ SampleSchemaServer_Intf in 'SampleSchemaServer_Intf.pas';
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'StronglyTyped Client';
+ Application.CreateForm(TStronglyTypedClientDataModule, StronglyTypedClientDataModule);
+ Application.CreateForm(TStronglyTypedClientMainForm, StronglyTypedClientMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedClient.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedClient.dproj
new file mode 100644
index 0000000..7ac1801
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedClient.dproj
@@ -0,0 +1,78 @@
+
+
+ {e2da5b2a-47db-4d24-9a88-5aa94ec3dfca}
+ StronglyTypedClient.dpr
+ Debug
+ AnyCPU
+ DCC32
+ StronglyTypedClient.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ StronglyTypedClient.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedClient.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedClient.res
new file mode 100644
index 0000000..da01de5
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedClient.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedClientData.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedClientData.dfm
new file mode 100644
index 0000000..a1a69ad
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedClientData.dfm
@@ -0,0 +1,466 @@
+object StronglyTypedClientDataModule: TStronglyTypedClientDataModule
+ OldCreateOrder = True
+ Height = 300
+ Width = 224
+ object ROChannel: TROWinInetHTTPChannel
+ UserAgent = 'RemObjects SDK'
+ TargetURL = 'http://localhost:8099/bin'
+ ServerLocators = <>
+ DispatchOptions = []
+ Left = 40
+ Top = 8
+ end
+ object ROMessage: TROBinMessage
+ Left = 40
+ Top = 52
+ end
+ object RORemoteService: TRORemoteService
+ Message = ROMessage
+ Channel = ROChannel
+ ServiceName = 'StronglyTypedService'
+ Left = 40
+ Top = 96
+ end
+ object dtCustomers: TDAMemDataTable
+ RemoteUpdatesOptions = []
+ Fields = <
+ item
+ Name = 'CustomerID'
+ DataType = datString
+ Size = 5
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CompanyName'
+ DataType = datString
+ Size = 40
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ContactName'
+ DataType = datString
+ Size = 30
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ContactTitle'
+ DataType = datString
+ Size = 30
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Address'
+ DataType = datString
+ Size = 60
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'City'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Region'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'PostalCode'
+ DataType = datString
+ Size = 10
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Country'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Phone'
+ DataType = datString
+ Size = 24
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Fax'
+ DataType = datString
+ Size = 24
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ Params = <>
+ MasterMappingMode = mmDataRequest
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteDataAdapter = RemoteDataAdapter
+ ReadOnly = False
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ LogicalName = 'Customers'
+ BusinessRulesID = 'ClientRules.Customers'
+ Left = 112
+ Top = 56
+ end
+ object dsCustomers: TDADataSource
+ DataSet = dtCustomers.Dataset
+ DataTable = dtCustomers
+ Left = 128
+ Top = 72
+ end
+ object dtOrders: TDAMemDataTable
+ RemoteUpdatesOptions = []
+ Fields = <
+ item
+ Name = 'OrderID'
+ DataType = datAutoInc
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CustomerID'
+ DataType = datString
+ Size = 5
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'EmployeeID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'OrderDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'RequiredDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShippedDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipVia'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Freight'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipName'
+ DataType = datString
+ Size = 40
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipAddress'
+ DataType = datString
+ Size = 60
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipCity'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipRegion'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipPostalCode'
+ DataType = datString
+ Size = 10
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipCountry'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ Params = <
+ item
+ Name = 'CustomerID'
+ DataType = datString
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ Value = ''
+ ParamType = daptInput
+ end>
+ MasterParamsMappings.Strings = (
+ 'CustomerID=CustomerID')
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteDataAdapter = RemoteDataAdapter
+ ReadOnly = False
+ MasterSource = dsCustomers
+ MasterFields = 'CustomerID'
+ DetailFields = 'CustomerID'
+ MasterRequestMappings.Strings = (
+ 'CustomerID=CustomerID')
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ LogicalName = 'Orders'
+ BusinessRulesID = 'ClientRules.Orders'
+ Left = 112
+ Top = 128
+ end
+ object dsOrders: TDADataSource
+ DataSet = dtOrders.Dataset
+ DataTable = dtOrders
+ Left = 128
+ Top = 144
+ end
+ object RemoteDataAdapter: TDARemoteDataAdapter
+ GetSchemaCall.RemoteService = RORemoteService
+ GetDataCall.RemoteService = RORemoteService
+ UpdateDataCall.RemoteService = RORemoteService
+ GetScriptsCall.RemoteService = RORemoteService
+ RemoteService = RORemoteService
+ DataStreamer = Streamer
+ FailureBehavior = fbBoth
+ Left = 40
+ Top = 200
+ end
+ object Streamer: TDABin2DataStreamer
+ BufferSize = 262144
+ SendReducedDelta = False
+ Left = 40
+ Top = 152
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedClientData.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedClientData.pas
new file mode 100644
index 0000000..65922c7
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedClientData.pas
@@ -0,0 +1,37 @@
+unit StronglyTypedClientData;
+
+interface
+
+uses {vcl:} SysUtils, Classes, DB, DBClient,
+ {RemObjects:} uDADataTable, uDABINAdapter,
+ uRORemoteService, uROClient, uROBINMessage,
+ uROWinInetHttpChannel, uDACDSDataTable,
+ uDAScriptingProvider, uDARemoteDataAdapter, uDADataStreamer,
+ uDABin2DataStreamer, uDAMemDataTable;
+
+type
+ TStronglyTypedClientDataModule = class(TDataModule)
+ ROChannel: TROWinInetHTTPChannel;
+ ROMessage: TROBinMessage;
+ RORemoteService: TRORemoteService;
+ dtCustomers: TDAMemDataTable;
+ dsCustomers: TDADataSource;
+ dtOrders: TDAMemDataTable;
+ dsOrders: TDADataSource;
+ RemoteDataAdapter: TDARemoteDataAdapter;
+ Streamer: TDABin2DataStreamer;
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ StronglyTypedClientDataModule: TStronglyTypedClientDataModule;
+
+implementation
+
+{$R *.DFM}
+
+initialization
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedClientMain.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedClientMain.dfm
new file mode 100644
index 0000000..0e4044e
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedClientMain.dfm
@@ -0,0 +1,139 @@
+object StronglyTypedClientMainForm: TStronglyTypedClientMainForm
+ Left = 287
+ Top = 235
+ BorderWidth = 5
+ Caption = 'Strongly Typed Client'
+ ClientHeight = 299
+ ClientWidth = 498
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ PixelsPerInch = 96
+ TextHeight = 13
+ object DBGrid1: TDBGrid
+ Left = 0
+ Top = 21
+ Width = 498
+ Height = 100
+ Align = alBottom
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ DataSource = StronglyTypedClientDataModule.dsCustomers
+ TabOrder = 1
+ TitleFont.Charset = DEFAULT_CHARSET
+ TitleFont.Color = clWindowText
+ TitleFont.Height = -11
+ TitleFont.Name = 'MS Sans Serif'
+ TitleFont.Style = []
+ OnTitleClick = DBGrid1TitleClick
+ end
+ object cbRemoteFetch: TCheckBox
+ Left = 0
+ Top = 0
+ Width = 136
+ Height = 17
+ Caption = 'Remote Fetch Enabled'
+ Checked = True
+ State = cbChecked
+ TabOrder = 0
+ end
+ object DBGrid2: TDBGrid
+ Left = 0
+ Top = 191
+ Width = 498
+ Height = 108
+ Align = alBottom
+ DataSource = StronglyTypedClientDataModule.dsOrders
+ TabOrder = 3
+ TitleFont.Charset = DEFAULT_CHARSET
+ TitleFont.Color = clWindowText
+ TitleFont.Height = -11
+ TitleFont.Name = 'MS Sans Serif'
+ TitleFont.Style = []
+ end
+ object Panel1: TPanel
+ Left = 0
+ Top = 121
+ Width = 498
+ Height = 70
+ Align = alBottom
+ BevelOuter = bvNone
+ TabOrder = 2
+ object bCreateTestCustomer: TButton
+ Left = 1
+ Top = 35
+ Width = 145
+ Height = 25
+ Caption = 'Create Test Customer'
+ TabOrder = 0
+ OnClick = bCreateTestCustomerClick
+ end
+ object DBNavigator1: TDBNavigator
+ Left = 0
+ Top = 5
+ Width = 240
+ Height = 25
+ DataSource = StronglyTypedClientDataModule.dsCustomers
+ TabOrder = 1
+ end
+ object BitBtn1: TBitBtn
+ Left = 240
+ Top = 5
+ Width = 75
+ Height = 25
+ Caption = 'Open/Close'
+ TabOrder = 2
+ OnClick = BitBtn1Click
+ end
+ object bCheckBalance: TButton
+ Left = 146
+ Top = 35
+ Width = 145
+ Height = 25
+ Caption = 'Check Customer Balance'
+ TabOrder = 3
+ OnClick = bCheckBalanceClick
+ end
+ object Button1: TButton
+ Left = 291
+ Top = 35
+ Width = 185
+ Height = 25
+ Caption = 'Create Test Customer with Orders'
+ TabOrder = 4
+ OnClick = Button1Click
+ end
+ object bApplyUpdates: TButton
+ Left = 315
+ Top = 5
+ Width = 97
+ Height = 25
+ Caption = 'Apply Updates'
+ TabOrder = 5
+ OnClick = bApplyUpdatesClick
+ end
+ end
+ object ROMessage: TROBinMessage
+ Left = 148
+ Top = 32
+ end
+ object RORemoteService: TRORemoteService
+ Message = ROMessage
+ Channel = ROChannel
+ ServiceName = 'StronglyTypedService'
+ Left = 176
+ Top = 32
+ end
+ object ROChannel: TROWinInetHTTPChannel
+ UserAgent = 'RemObjects SDK'
+ TargetURL = 'http://localhost:8099/BIN'
+ ServerLocators = <>
+ DispatchOptions = []
+ Left = 120
+ Top = 32
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedClientMain.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedClientMain.pas
new file mode 100644
index 0000000..34839a3
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedClientMain.pas
@@ -0,0 +1,145 @@
+unit StronglyTypedClientMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
+ uROClient, uROClientIntf, uRORemoteService, uROBinMessage, uROIndyHTTPChannel,
+ uROWinInetHttpChannel, DB, uDADataTable,
+ uDACDSDataTable, Buttons, ExtCtrls, DBCtrls, Grids,
+ DBGrids ;
+
+type
+ TStronglyTypedClientMainForm = class(TForm)
+ ROMessage: TROBinMessage;
+ RORemoteService: TRORemoteService;
+ ROChannel: TROWinInetHTTPChannel;
+ DBGrid1: TDBGrid;
+ cbRemoteFetch: TCheckBox;
+ DBGrid2: TDBGrid;
+ Panel1: TPanel;
+ bCreateTestCustomer: TButton;
+ DBNavigator1: TDBNavigator;
+ BitBtn1: TBitBtn;
+ bCheckBalance: TButton;
+ Button1: TButton;
+ bApplyUpdates: TButton;
+ procedure BitBtn1Click(Sender: TObject);
+ procedure bCheckBalanceClick(Sender: TObject);
+ procedure bApplyUpdatesClick(Sender: TObject);
+ procedure bCreateTestCustomerClick(Sender: TObject);
+ procedure dtCustomersBeforeOpen(DataTable: TDADataTable);
+ procedure Button1Click(Sender: TObject);
+ procedure DBGrid1TitleClick(Column: TColumn);
+ private
+ fCustomersCol: string;
+ fCustomersSort: TDASortDirection;
+ end;
+
+var
+ StronglyTypedClientMainForm: TStronglyTypedClientMainForm;
+
+implementation
+
+{
+ The unit StronglyTypedLibrary_Intf.pas will be generated by the RemObjects preprocessor the first time you
+ compile your server application. Make sure to do that before trying to compile the client.
+
+ To invoke your server simply typecast your server to the name of the service interface like this:
+
+ (RORemoteService as IStronglyTypedService).Sum(1,2)
+}
+
+uses StronglyTypedLibrary_Intf, SampleSchemaClient_Intf, uBizCustomersClient,
+ StronglyTypedClientData;
+
+{$R *.dfm}
+
+procedure TStronglyTypedClientMainForm.BitBtn1Click(Sender: TObject);
+begin
+ with StronglyTypedClientDataModule do
+ dtCustomers.Active := not dtCustomers.Active;
+end;
+
+procedure TStronglyTypedClientMainForm.bCheckBalanceClick(Sender: TObject);
+var
+ balance: currency;
+begin
+ with (StronglyTypedClientDataModule.dtCustomers as IAdvancedCustomer) do begin
+ balance := CheckBalance; // <-- Custom method!
+
+ ShowMessage(CustomerID + ' has ' + FloatToStr(balance) + '$ in his account');
+ end;
+end;
+
+procedure TStronglyTypedClientMainForm.bApplyUpdatesClick(Sender: TObject);
+begin
+ try
+ StronglyTypedClientDataModule.dtCustomers.ApplyUpdates(TRUE);
+ except
+ with StronglyTypedClientDataModule.dtCustomers do begin
+ Close;
+ Open;
+ end;
+ raise;
+ end;
+end;
+
+procedure TStronglyTypedClientMainForm.bCreateTestCustomerClick(Sender: TObject);
+begin
+ with (StronglyTypedClientDataModule.dtCustomers as ICustomers) do begin
+ Insert;
+ CustomerID := 'ID' + IntToStr(RecordCount);
+ CompanyName := 'RemObjects Software, Inc.';
+ ContactName := 'Alex';
+
+ Post;
+ end;
+end;
+
+procedure TStronglyTypedClientMainForm.dtCustomersBeforeOpen(DataTable: TDADataTable);
+begin
+ StronglyTypedClientDataModule.dtCustomers.RemoteFetchEnabled := cbRemoteFetch.Checked;
+end;
+
+procedure TStronglyTypedClientMainForm.Button1Click(Sender: TObject);
+var
+ i: integer;
+begin
+ with (StronglyTypedClientDataModule.dtCustomers as IAdvancedCustomer) do begin
+ Insert;
+ CustomerID := 'ID' + IntToStr(RecordCount);
+ CompanyName := 'RemObjects Software, Inc.';
+ ContactName := 'Alex';
+ Post;
+
+ for i := 0 to Random(10) + 1 do begin
+ Orders.Insert;
+ Orders.EmployeeID := 1;
+ Orders.OrderDate := Now;
+ Orders.RequiredDate := Now + Random(4);
+ Orders.ShipVia := 1;
+ Orders.Post;
+ end;
+ end;
+end;
+
+procedure TStronglyTypedClientMainForm.DBGrid1TitleClick(Column: TColumn);
+var
+ dt: TDADataTable;
+begin
+ dt := TDADataSource(Column.Grid.DataSource).DataTable;
+
+ if not SameText(fCustomersCol, Column.FieldName) then begin
+ fCustomersCol := Column.FieldName;
+ fCustomersSort := sdAscending;
+ end
+ else begin
+ fCustomersSort := TDASortDirection(integer(fCustomersSort) xor 1);
+ end;
+
+ dt.Sort([fCustomersCol], [fCustomersSort]);
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedLibrary.RODL b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedLibrary.RODL
new file mode 100644
index 0000000..664a6c4
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedLibrary.RODL
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedLibrary_Intf.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedLibrary_Intf.pas
new file mode 100644
index 0000000..43c4d38
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedLibrary_Intf.pas
@@ -0,0 +1,121 @@
+unit StronglyTypedLibrary_Intf;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+{$I Remobjects.inc}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROXMLIntf, uROClasses, uROClient, uROTypes, uROClientIntf,
+ {Used RODLs:} DataAbstract4_Intf;
+
+const
+ { Library ID }
+ LibraryUID = '{1BBB15C7-1CF5-4C37-B9C8-323AFAF87EB6}';
+ TargetNamespace = '';
+
+ { Service Interface ID's }
+ IStronglyTypedService_IID : TGUID = '{E611C0CF-5A17-469F-B906-98AFF41C1D73}';
+
+ { Event ID's }
+
+type
+ { Forward declarations }
+ IStronglyTypedService = interface;
+
+
+
+
+
+ { Enumerateds }
+
+ { IStronglyTypedService }
+ IStronglyTypedService = interface(IDataAbstractService)
+ ['{E611C0CF-5A17-469F-B906-98AFF41C1D73}']
+ function CheckBalance(const CustomerID: String): Currency;
+ function GetOrders(const CustomerID: String): Binary;
+ end;
+
+ { CoStronglyTypedService }
+ CoStronglyTypedService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IStronglyTypedService;
+ end;
+
+ { TStronglyTypedService_Proxy }
+ TStronglyTypedService_Proxy = class(TDataAbstractService_Proxy, IStronglyTypedService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ function CheckBalance(const CustomerID: String): Currency;
+ function GetOrders(const CustomerID: String): Binary;
+ end;
+
+implementation
+
+uses
+ {vcl:} SysUtils,
+ {RemObjects:} uROEventRepository, uROSerializer, uRORes;
+
+{ CoStronglyTypedService }
+
+class function CoStronglyTypedService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IStronglyTypedService;
+begin
+ result := TStronglyTypedService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TStronglyTypedService_Proxy }
+
+function TStronglyTypedService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'StronglyTypedService';
+end;
+
+function TStronglyTypedService_Proxy.CheckBalance(const CustomerID: String): Currency;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'StronglyTypedLibrary', __InterfaceName, 'CheckBalance');
+ __Message.Write('CustomerID', TypeInfo(String), CustomerID, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Currency), result, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+function TStronglyTypedService_Proxy.GetOrders(const CustomerID: String): Binary;
+begin
+ try
+ result := nil;
+ __Message.InitializeRequestMessage(__TransportChannel, 'StronglyTypedLibrary', __InterfaceName, 'GetOrders');
+ __Message.Write('CustomerID', TypeInfo(String), CustomerID, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Binary), result, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+initialization
+ RegisterProxyClass(IStronglyTypedService_IID, TStronglyTypedService_Proxy);
+
+
+finalization
+ UnregisterProxyClass(IStronglyTypedService_IID);
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedLibrary_Invk.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedLibrary_Invk.pas
new file mode 100644
index 0000000..572b1e7
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedLibrary_Invk.pas
@@ -0,0 +1,88 @@
+unit StronglyTypedLibrary_Invk;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+{$I Remobjects.inc}
+
+interface
+
+uses
+ {vcl:} Classes,
+ {RemObjects:} uROXMLIntf, uROServer, uROServerIntf, uROTypes, uROClientIntf,
+ {Used RODL Intf's:} DataAbstract4_Intf,
+ {Used RODL Invk's:} DataAbstract4_Invk,
+ {Generated:} StronglyTypedLibrary_Intf;
+
+type
+ {$M+}
+ TStronglyTypedService_Invoker = class(TDataAbstractService_Invoker)
+ private
+ protected
+ published
+ procedure Invoke_CheckBalance(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_GetOrders(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ end;
+ {$M-}
+
+implementation
+
+uses
+ {RemObjects:} uRORes, uROClient;
+
+{ TStronglyTypedService_Invoker }
+
+procedure TStronglyTypedService_Invoker.Invoke_CheckBalance(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function CheckBalance(const CustomerID: String): Currency; }
+var
+ CustomerID: String;
+ lResult: Currency;
+begin
+ try
+ __Message.Read('CustomerID', TypeInfo(String), CustomerID, []);
+
+ lResult := (__Instance as IStronglyTypedService).CheckBalance(CustomerID);
+
+ __Message.InitializeResponseMessage(__Transport, 'StronglyTypedLibrary', 'StronglyTypedService', 'CheckBalanceResponse');
+ __Message.Write('Result', TypeInfo(Currency), lResult, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ end;
+end;
+
+procedure TStronglyTypedService_Invoker.Invoke_GetOrders(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function GetOrders(const CustomerID: String): Binary; }
+var
+ CustomerID: String;
+ lResult: Binary;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ lResult := nil;
+ try
+ __Message.Read('CustomerID', TypeInfo(String), CustomerID, []);
+
+ lResult := (__Instance as IStronglyTypedService).GetOrders(CustomerID);
+
+ __Message.InitializeResponseMessage(__Transport, 'StronglyTypedLibrary', 'StronglyTypedService', 'GetOrdersResponse');
+ __Message.Write('Result', TypeInfo(Binary), lResult, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(lResult);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedServer.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedServer.bdsproj
new file mode 100644
index 0000000..220fcb0
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedServer.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {28D0D7BA-820A-4E15-A7A3-5021E2B515F4}
+
+
+
+
+ StronglyTypedServer.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedServer.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedServer.dpr
new file mode 100644
index 0000000..5e79582
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedServer.dpr
@@ -0,0 +1,25 @@
+program StronglyTypedServer;
+
+{#ROGEN:StronglyTypedLibrary.rodl} // RemObjects: Careful, do not remove!
+
+
+
+uses
+ uROComInit,
+ Forms,
+ StronglyTypedServerMain in 'StronglyTypedServerMain.pas' {StronglyTypedServerMainFoem},
+ StronglyTypedLibrary_Intf in 'StronglyTypedLibrary_Intf.pas',
+ StronglyTypedLibrary_Invk in 'StronglyTypedLibrary_Invk.pas',
+ StronglyTypedService_Impl in 'StronglyTypedService_Impl.pas' {StronglyTypedService: TDARemoteService},
+ SampleSchemaClient_Intf in 'SampleSchemaClient_Intf.pas',
+ SampleSchemaServer_Intf in 'SampleSchemaServer_Intf.pas',
+ uBizCustomersServer in 'uBizCustomersServer.pas';
+
+{$R *.res}
+{$R RODLFile.res}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TStronglyTypedServerMainFoem, StronglyTypedServerMainFoem);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedServer.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedServer.dproj
new file mode 100644
index 0000000..1772ed3
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedServer.dproj
@@ -0,0 +1,80 @@
+
+
+ {93d81d2c-638f-47b8-a46b-efb92ea95bcc}
+ StronglyTypedServer.dpr
+ Debug
+ AnyCPU
+ DCC32
+ StronglyTypedServer.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ StronglyTypedServer.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedServer.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedServer.res
new file mode 100644
index 0000000..7455d6e
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedServer.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedServerMain.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedServerMain.dfm
new file mode 100644
index 0000000..0561162
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedServerMain.dfm
@@ -0,0 +1,70 @@
+object StronglyTypedServerMainFoem: TStronglyTypedServerMainFoem
+ Left = 87
+ Top = 224
+ BorderStyle = bsDialog
+ Caption = 'StronglyTyped server'
+ ClientHeight = 64
+ ClientWidth = 228
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Form1'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ PixelsPerInch = 96
+ TextHeight = 14
+ object DAPoweredByDataAbstractButton1: TDAPoweredByDataAbstractButton
+ Left = 5
+ Top = 5
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ end
+ object ROMessage: TROBinMessage
+ Left = 36
+ Top = 8
+ end
+ object ROServer: TROIndyHTTPServer
+ Dispatchers = <
+ item
+ Name = 'ROMessage'
+ Message = ROMessage
+ Enabled = True
+ PathInfo = 'Bin'
+ end>
+ Port = 8099
+ Left = 8
+ Top = 8
+ end
+ object DriverManager: TDADriverManager
+ DriverDirectory = '%SYSTEM%\'
+ AutoLoad = False
+ TraceActive = False
+ TraceFlags = []
+ Left = 64
+ Top = 8
+ end
+ object ConnectionManager: TDAConnectionManager
+ MaxPoolSize = 10
+ PoolTimeoutSeconds = 60
+ PoolBehaviour = pbWait
+ WaitIntervalSeconds = 1
+ Connections = <
+ item
+ Name = 'ADO'
+ ConnectionString =
+ 'ADO?AuxDriver=SQLOLEDB.1;Server=localhost;Database=Northwind;Use' +
+ 'rID=sa;Password='
+ Description = 'Borland ADOExpress Connection'
+ Default = True
+ Tag = 0
+ end>
+ DriverManager = DriverManager
+ PoolingEnabled = True
+ Left = 96
+ Top = 8
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedServerMain.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedServerMain.pas
new file mode 100644
index 0000000..2f1c92f
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedServerMain.pas
@@ -0,0 +1,39 @@
+unit StronglyTypedServerMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
+ uROClient, uROPoweredByRemObjectsButton, uROClientIntf, uROServer,
+ uROBinMessage, uROIndyHTTPServer, uROIndyTCPServer,
+ uDAClasses, uDADriverManager, uDAEngine, uDAADODriver,
+ uDAPoweredByDataAbstractButton;
+
+type
+ TStronglyTypedServerMainFoem = class(TForm)
+ ROMessage: TROBinMessage;
+ ROServer: TROIndyHTTPServer;
+ DriverManager: TDADriverManager;
+ ConnectionManager: TDAConnectionManager;
+ DAPoweredByDataAbstractButton1: TDAPoweredByDataAbstractButton;
+ procedure FormCreate(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ StronglyTypedServerMainFoem: TStronglyTypedServerMainFoem;
+
+implementation
+
+
+{$R *.dfm}
+
+procedure TStronglyTypedServerMainFoem.FormCreate(Sender: TObject);
+begin
+ ROServer.Active := true;
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedService_Impl.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedService_Impl.dfm
new file mode 100644
index 0000000..3cf4972
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedService_Impl.dfm
@@ -0,0 +1,1092 @@
+object StronglyTypedService: TStronglyTypedService
+ OldCreateOrder = True
+ ConnectionName = 'ADO'
+ ServiceSchema = SampleSchema
+ ServiceDataStreamer = Streamer
+ ExportedDataTables = <>
+ Height = 300
+ Width = 300
+ object SampleSchema: TDASchema
+ ConnectionManager = StronglyTypedServerMainFoem.ConnectionManager
+ Datasets = <
+ item
+ Params = <>
+ Statements = <
+ item
+ Connection = 'ADO'
+ TargetTable = 'Customers'
+ SQL =
+ 'SELECT '#10' CustomerID, CompanyName, ContactName, ContactTitle, ' +
+ #10' Address, City, Region, PostalCode, Country, Phone, '#10' Fax' +
+ #10' FROM'#10' Customers'
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'CustomerID'
+ TableField = 'CustomerID'
+ end
+ item
+ DatasetField = 'CompanyName'
+ TableField = 'CompanyName'
+ end
+ item
+ DatasetField = 'ContactName'
+ TableField = 'ContactName'
+ end
+ item
+ DatasetField = 'ContactTitle'
+ TableField = 'ContactTitle'
+ end
+ item
+ DatasetField = 'Address'
+ TableField = 'Address'
+ end
+ item
+ DatasetField = 'City'
+ TableField = 'City'
+ end
+ item
+ DatasetField = 'Region'
+ TableField = 'Region'
+ end
+ item
+ DatasetField = 'PostalCode'
+ TableField = 'PostalCode'
+ end
+ item
+ DatasetField = 'Country'
+ TableField = 'Country'
+ end
+ item
+ DatasetField = 'Phone'
+ TableField = 'Phone'
+ end
+ item
+ DatasetField = 'Fax'
+ TableField = 'Fax'
+ end>
+ end>
+ Name = 'Customers'
+ Fields = <
+ item
+ Name = 'CustomerID'
+ DataType = datString
+ Size = 5
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CompanyName'
+ DataType = datString
+ Size = 40
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ContactName'
+ DataType = datString
+ Size = 30
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ContactTitle'
+ DataType = datString
+ Size = 30
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Address'
+ DataType = datString
+ Size = 60
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'City'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Region'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'PostalCode'
+ DataType = datString
+ Size = 10
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Country'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Phone'
+ DataType = datString
+ Size = 24
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Fax'
+ DataType = datString
+ Size = 24
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ BusinessRulesClient.ScriptLanguage = rslPascalScript
+ BusinessRulesServer.ScriptLanguage = rslPascalScript
+ end
+ item
+ Params = <
+ item
+ Name = 'CustomerID'
+ DataType = datString
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end>
+ Statements = <
+ item
+ Connection = 'ADO'
+ TargetTable = 'Orders'
+ SQL =
+ 'SELECT '#10' OrderID, CustomerID, EmployeeID, OrderDate, Required' +
+ 'Date, '#10' ShippedDate, ShipVia, Freight, ShipName, ShipAddress,' +
+ ' '#10' ShipCity, ShipRegion, ShipPostalCode, ShipCountry'#10' FROM'#10' ' +
+ ' Orders'#10' WHERE CustomerID=:CustomerID'
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'OrderID'
+ TableField = 'OrderID'
+ end
+ item
+ DatasetField = 'CustomerID'
+ TableField = 'CustomerID'
+ end
+ item
+ DatasetField = 'EmployeeID'
+ TableField = 'EmployeeID'
+ end
+ item
+ DatasetField = 'OrderDate'
+ TableField = 'OrderDate'
+ end
+ item
+ DatasetField = 'RequiredDate'
+ TableField = 'RequiredDate'
+ end
+ item
+ DatasetField = 'ShippedDate'
+ TableField = 'ShippedDate'
+ end
+ item
+ DatasetField = 'ShipVia'
+ TableField = 'ShipVia'
+ end
+ item
+ DatasetField = 'Freight'
+ TableField = 'Freight'
+ end
+ item
+ DatasetField = 'ShipName'
+ TableField = 'ShipName'
+ end
+ item
+ DatasetField = 'ShipAddress'
+ TableField = 'ShipAddress'
+ end
+ item
+ DatasetField = 'ShipCity'
+ TableField = 'ShipCity'
+ end
+ item
+ DatasetField = 'ShipRegion'
+ TableField = 'ShipRegion'
+ end
+ item
+ DatasetField = 'ShipPostalCode'
+ TableField = 'ShipPostalCode'
+ end
+ item
+ DatasetField = 'ShipCountry'
+ TableField = 'ShipCountry'
+ end>
+ end>
+ Name = 'Orders'
+ Fields = <
+ item
+ Name = 'OrderID'
+ DataType = datAutoInc
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CustomerID'
+ DataType = datString
+ Size = 5
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'EmployeeID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'OrderDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'RequiredDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShippedDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipVia'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Freight'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipName'
+ DataType = datString
+ Size = 40
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipAddress'
+ DataType = datString
+ Size = 60
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipCity'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipRegion'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipPostalCode'
+ DataType = datString
+ Size = 10
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipCountry'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ BusinessRulesClient.ScriptLanguage = rslPascalScript
+ BusinessRulesServer.ScriptLanguage = rslPascalScript
+ end>
+ JoinDataTables = <>
+ UnionDataTables = <>
+ Commands = <
+ item
+ Params = <
+ item
+ Name = 'CustomerID'
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptUnknown
+ end
+ item
+ Name = 'CompanyName'
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptUnknown
+ end
+ item
+ Name = 'ContactName'
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptUnknown
+ end
+ item
+ Name = 'ContactTitle'
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptUnknown
+ end
+ item
+ Name = 'Address'
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptUnknown
+ end
+ item
+ Name = 'City'
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptUnknown
+ end
+ item
+ Name = 'Region'
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptUnknown
+ end
+ item
+ Name = 'PostalCode'
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptUnknown
+ end
+ item
+ Name = 'Country'
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptUnknown
+ end
+ item
+ Name = 'Phone'
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptUnknown
+ end
+ item
+ Name = 'Fax'
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptUnknown
+ end
+ item
+ Name = 'TestNumeric'
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptUnknown
+ end>
+ Statements = <
+ item
+ Connection = 'ADO'
+ TargetTable = 'Customers'
+ SQL =
+ 'INSERT'#10' INTO Customers'#10' (CustomerID, CompanyName, ContactNam' +
+ 'e, ContactTitle, Address, City, Region, PostalCode, Country, Pho' +
+ 'ne, Fax, TestNumeric)'#10' VALUES'#10' (:CustomerID, :CompanyName, :' +
+ 'ContactName, :ContactTitle, :Address, :City, :Region, :PostalCod' +
+ 'e, :Country, :Phone, :Fax, :TestNumeric)'
+ StatementType = stSQL
+ ColumnMappings = <>
+ end>
+ Name = 'Insert_Customers'
+ end
+ item
+ Params = <
+ item
+ Name = 'OLD_CustomerID'
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptUnknown
+ end>
+ Statements = <
+ item
+ Connection = 'ADO'
+ TargetTable = 'Customers'
+ SQL =
+ 'DELETE '#10' FROM'#10' Customers'#10' WHERE'#10' (CustomerID = :OLD_Cust' +
+ 'omerID)'
+ StatementType = stSQL
+ ColumnMappings = <>
+ end>
+ Name = 'Delete_Customers'
+ end
+ item
+ Params = <
+ item
+ Name = 'CustomerID'
+ DataType = datString
+ Size = 5
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end
+ item
+ Name = 'CompanyName'
+ DataType = datString
+ Size = 40
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end
+ item
+ Name = 'ContactName'
+ DataType = datString
+ Size = 30
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end
+ item
+ Name = 'ContactTitle'
+ DataType = datString
+ Size = 30
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end
+ item
+ Name = 'Address'
+ DataType = datString
+ Size = 60
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end
+ item
+ Name = 'City'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end
+ item
+ Name = 'Region'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end
+ item
+ Name = 'PostalCode'
+ DataType = datString
+ Size = 10
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end
+ item
+ Name = 'Country'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end
+ item
+ Name = 'Phone'
+ DataType = datString
+ Size = 24
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end
+ item
+ Name = 'Fax'
+ DataType = datString
+ Size = 24
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end
+ item
+ Name = 'OLD_CustomerID'
+ DataType = datString
+ Size = 5
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end>
+ Statements = <
+ item
+ Connection = 'ADO'
+ TargetTable = 'Customers'
+ SQL =
+ 'UPDATE Customers'#10' SET'#10' CustomerID = :CustomerID,'#10' Company' +
+ 'Name = :CompanyName,'#10' ContactName = :ContactName,'#10' Contact' +
+ 'Title = :ContactTitle,'#10' Address = :Address,'#10' City = :City,' +
+ #10' Region = :Region,'#10' PostalCode = :PostalCode,'#10' Country' +
+ ' = :Country,'#10' Phone = :Phone,'#10' Fax = :Fax'#10' WHERE'#10' (Cus' +
+ 'tomerID = :OLD_CustomerID)'
+ StatementType = stSQL
+ ColumnMappings = <>
+ end>
+ Name = 'Update_Customers'
+ end
+ item
+ Params = <
+ item
+ Name = 'CustomerID'
+ DataType = datString
+ Size = 5
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end
+ item
+ Name = 'EmployeeID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end
+ item
+ Name = 'OrderDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end
+ item
+ Name = 'RequiredDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end
+ item
+ Name = 'ShippedDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end
+ item
+ Name = 'ShipVia'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end
+ item
+ Name = 'Freight'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end
+ item
+ Name = 'ShipName'
+ DataType = datString
+ Size = 40
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end
+ item
+ Name = 'ShipAddress'
+ DataType = datString
+ Size = 60
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end
+ item
+ Name = 'ShipCity'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end
+ item
+ Name = 'ShipRegion'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end
+ item
+ Name = 'ShipPostalCode'
+ DataType = datString
+ Size = 10
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end
+ item
+ Name = 'ShipCountry'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end>
+ Statements = <
+ item
+ Connection = 'ADO'
+ TargetTable = 'Orders'
+ SQL =
+ 'INSERT'#10' INTO Orders'#10' (CustomerID, EmployeeID, OrderDate, Req' +
+ 'uiredDate, ShippedDate, ShipVia, Freight, ShipName, ShipAddress,' +
+ ' ShipCity, ShipRegion, ShipPostalCode, ShipCountry)'#10' VALUES'#10' ' +
+ ' (:CustomerID, :EmployeeID, :OrderDate, :RequiredDate, :ShippedD' +
+ 'ate, :ShipVia, :Freight, :ShipName, :ShipAddress, :ShipCity, :Sh' +
+ 'ipRegion, :ShipPostalCode, :ShipCountry)'
+ StatementType = stSQL
+ ColumnMappings = <>
+ end>
+ Name = 'Insert_Orders'
+ end
+ item
+ Params = <
+ item
+ Name = 'OLD_OrderID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end>
+ Statements = <
+ item
+ Connection = 'ADO'
+ TargetTable = 'Orders'
+ SQL = 'DELETE '#10' FROM'#10' Orders'#10' WHERE'#10' (OrderID = :OLD_OrderID)'
+ StatementType = stSQL
+ ColumnMappings = <>
+ end>
+ Name = 'Delete_Orders'
+ end
+ item
+ Params = <
+ item
+ Name = 'CustomerID'
+ DataType = datString
+ Size = 5
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end
+ item
+ Name = 'EmployeeID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end
+ item
+ Name = 'OrderDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end
+ item
+ Name = 'RequiredDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end
+ item
+ Name = 'ShippedDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end
+ item
+ Name = 'ShipVia'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end
+ item
+ Name = 'Freight'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end
+ item
+ Name = 'ShipName'
+ DataType = datString
+ Size = 40
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end
+ item
+ Name = 'ShipAddress'
+ DataType = datString
+ Size = 60
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end
+ item
+ Name = 'ShipCity'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end
+ item
+ Name = 'ShipRegion'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end
+ item
+ Name = 'ShipPostalCode'
+ DataType = datString
+ Size = 10
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end
+ item
+ Name = 'ShipCountry'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end
+ item
+ Name = 'OLD_OrderID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ ParamType = daptInput
+ end>
+ Statements = <
+ item
+ Connection = 'ADO'
+ TargetTable = 'Orders'
+ SQL =
+ 'UPDATE Orders'#10' SET '#10' CustomerID = :CustomerID,'#10' EmployeeI' +
+ 'D = :EmployeeID, '#10' OrderDate = :OrderDate, '#10' RequiredDate ' +
+ '= :RequiredDate, '#10' ShippedDate = :ShippedDate, '#10' ShipVia =' +
+ ' :ShipVia, '#10' Freight = :Freight, '#10' ShipName = :ShipName, '#10 +
+ ' ShipAddress = :ShipAddress, '#10' ShipCity = :ShipCity, '#10' ' +
+ 'ShipRegion = :ShipRegion, '#10' ShipPostalCode = :ShipPostalCode,' +
+ ' '#10' ShipCountry = :ShipCountry'#10' WHERE'#10' (OrderID = :OLD_Ord' +
+ 'erID)'
+ StatementType = stSQL
+ ColumnMappings = <>
+ end>
+ Name = 'Update_Orders'
+ end>
+ RelationShips = <>
+ UpdateRules = <>
+ Version = 0
+ Left = 128
+ Top = 58
+ end
+ object CustomersProcessor: TDABusinessProcessor
+ Schema = SampleSchema
+ ReferencedDataset = 'Customers'
+ ProcessorOptions = [poAutoGenerateInsert, poAutoGenerateUpdate, poAutoGenerateDelete, poPrepareCommands]
+ UpdateMode = updWhereKeyOnly
+ BusinessRulesID = 'ServerRules.Customers'
+ Left = 42
+ Top = 8
+ end
+ object OrdersProcessor: TDABusinessProcessor
+ Schema = SampleSchema
+ ProcessorOptions = [poAutoGenerateInsert, poAutoGenerateUpdate, poAutoGenerateDelete, poPrepareCommands]
+ UpdateMode = updWhereKeyOnly
+ Left = 42
+ Top = 58
+ end
+ object Streamer: TDABin2DataStreamer
+ BufferSize = 262144
+ SendReducedDelta = False
+ Left = 128
+ Top = 8
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedService_Impl.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedService_Impl.pas
new file mode 100644
index 0000000..2a7fffa
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/StronglyTypedService_Impl.pas
@@ -0,0 +1,84 @@
+unit StronglyTypedService_Impl;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ This is where you are supposed to code the implementation of your objects. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils,
+ {RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
+ {Ancestor Implementation:} DataAbstractService_Impl,
+ {Used RODLs:} DataAbstract4_Intf,
+ {Generated:} StronglyTypedLibrary_Intf, uDAScriptingProvider,
+ uDABusinessProcessor, uDADataStreamer,uDAClasses,uDAinterfaces,uDADelta,
+ uDABin2DataStreamer;
+
+
+const
+ { Dataset names for SampleSchema }
+ ds_Customers = 'Customers';
+ ds_Orders = 'Orders';
+
+ { Command names for SampleSchema }
+ cmd_Insert_Customers = 'Insert_Customers';
+ cmd_Delete_Customers = 'Delete_Customers';
+ cmd_Update_Customers = 'Update_Customers';
+ cmd_Insert_Orders = 'Insert_Orders';
+ cmd_Delete_Orders = 'Delete_Orders';
+ cmd_Update_Orders = 'Update_Orders';
+
+type
+ { TStronglyTypedService }
+ TStronglyTypedService = class(TDataAbstractService, IStronglyTypedService)
+ CustomersProcessor: TDABusinessProcessor;
+ OrdersProcessor: TDABusinessProcessor;
+ SampleSchema: TDASchema;
+ Streamer: TDABin2DataStreamer;
+ private
+ protected
+ { IStronglyTypedService methods }
+ function CheckBalance(const CustomerID: String): Currency;
+ function GetOrders(const CustomerID: String): Binary;
+ end;
+
+implementation
+
+{$R *.dfm}
+uses
+ {Generated:} StronglyTypedLibrary_Invk,StronglyTypedServerMain;
+
+procedure Create_StronglyTypedService(out anInstance : IUnknown);
+begin
+ anInstance := TStronglyTypedService.Create(NIL);
+end;
+
+{ TStronglyTypedService }
+
+function TStronglyTypedService.CheckBalance(
+ const CustomerID: String): Currency;
+begin
+ if (CustomerID='ALFKI') then result := 100000 else result := 8000;
+end;
+
+function TStronglyTypedService.GetOrders(const CustomerID: String): Binary;
+var
+ orders: IDADataset;
+begin
+ orders := SampleSchema.NewDataset(Connection, ds_Orders, ['CustomerID'], [CustomerID]);
+ Result:=Binary.Create;
+ Streamer.Initialize(result, aiWrite);
+ Streamer.WriteDataset(orders, [woRows], -1);
+ Streamer.Finalize;
+end;
+
+initialization
+ TROClassFactory.Create('StronglyTypedService', Create_StronglyTypedService, TStronglyTypedService_Invoker);
+
+finalization
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/uBizCustomersClient.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/uBizCustomersClient.pas
new file mode 100644
index 0000000..b342af1
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/uBizCustomersClient.pas
@@ -0,0 +1,209 @@
+unit uBizCustomersClient;
+
+{
+ This unit contains the business rules handlers for the client application.
+
+ The simplest possible implementation just overrides the methods inherited
+ from TDADataTableRules (i.e. AfterInsert, BeforePost).
+
+ More sophisticated ones instead add additional behaviour and even make it accessible
+ from outside units (i.e. a form or a data module hosting a TDADataTable).
+
+ TBizCustomersClientRules shows an example of both possibilities by overriding a few event
+ handlers and adding support for the interface IAdvancedCustomer.
+
+ Adding interfaces like IAdvancedCustomer is not required to implement extra functionality that is
+ only accessed in the context of a business rule class/unit. You obviously can add any method you want to
+ classes like TBizCustomersClientRules and reference them from other methods in order to make them
+ more "object oriented" (see DummTest below).
+ But when you need to access this functionality from the outside world you need to define an
+ "access contract" via an interface. You can then treat TDADataTables as IAdvancedCustomer (or
+ whatever other interface you decide to create) by simply using the VCL function Supports.
+ See an example of this in the unit fClientForm.pas, method bCheckBalanceClick
+
+ Note: TDADataTable also allows you to access the instance of TBizCustomersClientRules via the
+ property BusinessRules. You could also type cast that property to TBizCustomersClientRules but
+ in general, the interface approach is cleaner and more elegant.
+}
+
+interface
+
+uses
+ Classes, SysUtils,
+ uDADataTable, SampleSchemaClient_Intf,
+ uDAInterfaces, SampleSchemaServer_Intf,
+ StronglyTypedLibrary_Intf; // Not really required. Just for the IDefaultROIntfServer example below
+
+type
+ { IAdvancedCustomer }
+ IAdvancedCustomer = interface(ICustomers)
+ ['{BDB203DC-954B-4D78-A446-B1E2232BEF71}']
+ function GetOrders : IOrders;
+
+ function CheckBalance : currency;
+ procedure DisableAccount;
+
+ property Orders : IOrders read GetOrders;
+ end;
+
+ { TBizCustomersClientRules }
+ TBizCustomersClientRules = class(TCustomersDataTableRules, IAdvancedCustomer)
+ private
+
+ protected
+ // Business events
+ procedure AfterInsert(Sender : TDADataTable); override;
+ procedure BeforeDelete(Sender : TDADataTable); override;
+ procedure BeforePost(Sender : TDADataTable); override;
+
+ // IAdvancedCustomer
+ function CheckBalance : currency;
+ procedure DisableAccount;
+ function GetOrders : IOrders;
+ end;
+
+ { TBizOrdersClientRules }
+ TBizOrdersClientRules = class(TOrdersDataTableRules)
+ protected
+ procedure OnNewRecord(Sender: TDADataTable); override;
+ procedure BeforePost(Sender : TDADataTable); override;
+ end;
+
+ { TBizCustomerIDRules }
+ TBizCustomerIDRules = class(TDAFieldRules)
+ private
+ protected
+ procedure OnValidate(Sender: TDACustomField); override;
+ procedure OnChange(Sender: TDACustomField); override;
+
+ end;
+
+
+{ General validation routine shared by client and server }
+procedure ValidateCustomer(const aCustomers : ICustomers);
+
+implementation
+uses uDARemoteDataAdapter;
+const
+ def_CompanyName = 'New Company';
+ def_ContactName = '';
+
+{ General validation routine shared by client and server }
+procedure ValidateCustomer(const aCustomers : ICustomers);
+var errors : string;
+begin
+ errors := '';
+ with aCustomers do begin
+ if (Trim(CustomerID)='') then errors := errors+'CustomerID cannot be empty'+#13;
+ if (Trim(CompanyName)='') then errors := errors+'CompanyName is required'+#13;
+
+ if (errors<>'')
+ then raise EDABizValidationException.Create(errors);
+ end;
+end;
+
+procedure ValidateOrder(const aOrder : IOrders);
+var errors : string;
+begin
+ errors := '';
+
+ with aOrder do begin
+ if (Trim(CustomerID)='') then errors := errors+'An order must have a CustomerID'+#13;
+
+ if (EmployeeID<=0) // 0 also covers NULL in the conversion of AsInteger
+ then errors := errors+'Invalid or unspecified EmployeeID'+#13;
+
+ if (errors<>'')
+ then raise EDABizValidationException.Create(errors);
+ end;
+end;
+
+{ TBizCustomersClientRules }
+procedure TBizCustomersClientRules.AfterInsert(Sender : TDADataTable);
+begin
+ inherited;
+
+ CustomerID := IntToStr(DataTable.RecordCount);
+ CompanyName := def_CompanyName;
+ ContactName := def_ContactName;
+end;
+
+procedure TBizCustomersClientRules.BeforeDelete(Sender : TDADataTable);
+begin
+ inherited;
+end;
+
+procedure TBizCustomersClientRules.BeforePost(Sender : TDADataTable);
+begin
+ inherited;
+
+ ValidateCustomer(Self);
+end;
+
+function TBizCustomersClientRules.CheckBalance: currency;
+begin
+ {
+ A simple example of how to invoke remote service using the referenced RemoteService.
+ Nothing prevents you to add an interface which takes a TRORemoteService as parameter or even
+ an IxxxService interface. Possibilities are endless!
+ }
+ result := (TDARemoteDataAdapter(DataTable.RemoteDataAdapter).RemoteService as IStronglyTypedService).CheckBalance(CustomerID)
+end;
+
+procedure TBizCustomersClientRules.DisableAccount;
+begin
+ // This is just for demonstration purposes and completeness.
+ Beep;
+end;
+
+function TBizCustomersClientRules.GetOrders: IOrders;
+begin
+ {
+ Provides access to the detail datatable which points to Orders.
+ Detail access depends on the client module/form. Not all might support or require
+ the use of this property. An exception is raised at runtime by DetailByName
+ if the detail table was never actually linked.
+ }
+
+ result := DetailByName(nme_Orders) as IOrders;
+end;
+
+{ TBizOrdersClientRules }
+
+procedure TBizOrdersClientRules.BeforePost(Sender: TDADataTable);
+begin
+ inherited;
+ ValidateOrder(Self);
+end;
+
+procedure TBizOrdersClientRules.OnNewRecord(Sender: TDADataTable);
+begin
+ with (DataTable.GetMasterDataTable as ICustomers) do begin
+ if (CustomerID='ALFKI')
+ then raise EDABizValidationException.Create('You cannot add orders to ALFKI');
+ end;
+end;
+
+{ TBizCustomerIDRules }
+
+procedure TBizCustomerIDRules.OnChange(Sender: TDACustomField);
+var i : integer;
+ lCurrVal : string;
+begin
+ lCurrVal := Sender.AsString;
+ for i := 1 to Length(lCurrVal) do
+ if not (lCurrVal[i] in ['a'..'z', 'A'..'Z', '0'..'9'])
+ then raise EDABizValidationException.Create('Invalid character');
+end;
+
+procedure TBizCustomerIDRules.OnValidate(Sender: TDACustomField);
+begin
+ beep;
+end;
+
+initialization
+ RegisterDataTableRules('ClientRules.Customers', TBizCustomersClientRules);
+ RegisterDataTableRules('ClientRules.Orders', TBizOrdersClientRules);
+ RegisterFieldRules('CustomerID', TBizCustomerIDRules);
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/uBizCustomersServer.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/uBizCustomersServer.pas
new file mode 100644
index 0000000..5f22864
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Strongly Typed/uBizCustomersServer.pas
@@ -0,0 +1,60 @@
+unit uBizCustomersServer;
+
+{
+ This unit contains the business rules handlers for the server application.
+
+ It enforces additional rules that might change over time. This is a good example
+ to show the advantages of a multi-tier architecture: systems can be updated in a
+ matter of a server re-deploy without the need to update any client.
+
+ It's important to notice how some business rules are shared among clients and servers.
+ In particular, Customer validation is done by calling the function ValidateCustomers
+ (from uBizCustomersClient.pas). This is not a requirement but a highly adviceable
+ practice, expecially when your system is accessed by clients that were not developed by
+ you (i.e. Java clients accessing your server through SOAP).
+
+ For additional topics such as how to extend the business functionality adding custom
+ interfaces, refer to the comments in the unit uBizCustomersClient.pas
+}
+
+interface
+
+uses
+ Classes, SysUtils,
+ uDADataTable,uDADelta,
+ uBizCustomersClient, uDAInterfaces,
+ uDABusinessProcessor, SampleSchemaServer_Intf;
+
+type
+ { TBizCustomerServerRules }
+ TBizCustomerServerRules = class(TCustomersBusinessProcessorRules)
+ protected
+ // Business events
+ procedure BeforeProcessChange(Sender : TDABusinessProcessor; aChangeType : TDAChangeType;
+ aChange : TDADeltaChange; var ProcessChange : boolean); override;
+ end;
+
+implementation
+
+{ TBizCustomerServerRules }
+
+procedure TBizCustomerServerRules.BeforeProcessChange(
+ Sender: TDABusinessProcessor; aChangeType: TDAChangeType;
+ aChange: TDADeltaChange; var ProcessChange: boolean);
+begin
+ inherited;
+ if (aChangeType<>ctDelete) then ValidateCustomer(Self);
+
+ // Sort of a strong rule but it's just to make a point that server side business
+ // rules might enforce stronger rules than clients.
+
+ if (aChangeType=ctInsert) and not SameText(ContactName, 'Alex')
+ then raise Exception.Create('Cannot process an update without Alex as ContactName');
+
+ ContactTitle := TimeToStr(Now);
+end;
+
+initialization
+ RegisterBusinessProcessorRules('ServerRules.Customers', TBizCustomerServerRules);
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/Styles.css b/official/5.0.30.691/Data Abstract for Delphi/Samples/Styles.css
new file mode 100644
index 0000000..c8e0628
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/Styles.css
@@ -0,0 +1,103 @@
+body
+{
+ background-color: #f7f7f7;
+ margin-top: 15px;
+ margin-bottom: 15px;
+ margin-left: 15px;
+ margin-right: 15px;
+ padding-top: 10px;
+ padding-bottom: 10px;
+ padding-left: 10px;
+ padding-right: 10px;
+ font-family: tahoma, verdana, sans-serif;
+ font-size: 10pt;
+ width: 700px;
+ color: #000000;
+}
+p
+{
+ padding-top: 0;
+ padding-bottom: 0;
+ padding-left: 0;
+ padding-right: 0.5em;
+}
+ul
+{
+ padding-top: 0;
+ padding-bottom: 0;
+ list-style-type: disc;
+}
+li
+{
+ padding-top: 0;
+ padding-bottom: 0;
+}
+img
+{
+ margin: 5px;
+ border-width: 0;
+}
+table
+{
+ background-color: #f7f7f7;
+ margin: 15px;
+ padding: 0px;
+ font-size: 10pt;
+}
+tr
+{
+ background-color: #f7f7f7;
+ margin: 15px;
+ padding: 0px;
+ font-size: 10pt;
+}
+td, th
+{
+ background-color: #f7f7f7;
+ margin: 0;
+ padding: 5px;
+ font-size: 10pt;
+}
+td ul
+{
+ padding-left: 2em;
+}
+
+img:left { margin-left: 0; }
+img:right { margin-right: 0; }
+p.h1
+{
+ margin-top: 1em;
+ margin-bottom: 0.5px;
+ padding-bottom:0px;
+ font-size:13pt;
+ font-weight:bold;
+}
+p.h2
+{
+ margin-top: 1em;
+ margin-bottom: 0.5px;
+ padding-bottom:0px;
+ font-size:11pt;
+ font-weight:bold;
+}
+p.h3
+{
+ margin-top: 1em;
+ margin-bottom: 0.5px;
+ padding-bottom:0px;
+ font-size:10pt;
+ font-weight:bold;
+}
+pre
+{
+ margin-top:0px;
+ margin-bottom:0px;
+ margin-left:0px;
+ margin-right:0px;
+}
+.spaced
+{
+ letter-spacing:1px;
+ color:#000060;
+}
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/XSLT/CustomersHTML.html b/official/5.0.30.691/Data Abstract for Delphi/Samples/XSLT/CustomersHTML.html
new file mode 100644
index 0000000..cd41181
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/XSLT/CustomersHTML.html differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/XSLT/CustomersToHTML.xsl b/official/5.0.30.691/Data Abstract for Delphi/Samples/XSLT/CustomersToHTML.xsl
new file mode 100644
index 0000000..8107a83
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/XSLT/CustomersToHTML.xsl
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Customer: ,
+ ,
+ ,
+
+
+ Address: ,
+ City: ,
+ ,
+ ,
+
+
+ Phone:
+ Fax:
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/XSLT/CustomersToSimpleXML.xsl b/official/5.0.30.691/Data Abstract for Delphi/Samples/XSLT/CustomersToSimpleXML.xsl
new file mode 100644
index 0000000..902b170
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/XSLT/CustomersToSimpleXML.xsl
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+ ( )
+ ,
+ ,
+
+
+
+
+ ,
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/XSLT/DALogo.png b/official/5.0.30.691/Data Abstract for Delphi/Samples/XSLT/DALogo.png
new file mode 100644
index 0000000..54892ce
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/XSLT/DALogo.png differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/XSLT/XSLT.Sample.html b/official/5.0.30.691/Data Abstract for Delphi/Samples/XSLT/XSLT.Sample.html
new file mode 100644
index 0000000..23bffb0
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/XSLT/XSLT.Sample.html
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+ XSLT Sample
+
+
+
+Purpose
+
+
+This example shows how to import dataset data into an .xml file by using the TDAXmlDataStreamer .
+Exporting dataset changes to an .xml file is also shown.
+
+
+Examine the Code
+
+
+ See the simple code in XSLTMain.pas .
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/XSLT/XSLT.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/XSLT/XSLT.bdsproj
new file mode 100644
index 0000000..5f2c59c
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/XSLT/XSLT.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {2D7C9DF9-94DC-4157-A8B6-45101037D1B3}
+
+
+
+
+ XSLT.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/XSLT/XSLT.dpr b/official/5.0.30.691/Data Abstract for Delphi/Samples/XSLT/XSLT.dpr
new file mode 100644
index 0000000..672dbce
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/XSLT/XSLT.dpr
@@ -0,0 +1,14 @@
+program XSLT;
+
+uses
+ Forms,
+ XSLTMain in 'XSLTMain.pas' {XSLTMainForm};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'XSLT Sample';
+ Application.CreateForm(TXSLTMainForm, XSLTMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/XSLT/XSLT.dproj b/official/5.0.30.691/Data Abstract for Delphi/Samples/XSLT/XSLT.dproj
new file mode 100644
index 0000000..a22c322
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/XSLT/XSLT.dproj
@@ -0,0 +1,72 @@
+
+
+ {eb5321d8-fcb7-4e0d-a61b-0469d08bc4e3}
+ XSLT.dpr
+ Debug
+ AnyCPU
+ DCC32
+ XSLT.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ XSLT.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/XSLT/XSLT.res b/official/5.0.30.691/Data Abstract for Delphi/Samples/XSLT/XSLT.res
new file mode 100644
index 0000000..b946fbb
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Samples/XSLT/XSLT.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/XSLT/XSLTMain.dfm b/official/5.0.30.691/Data Abstract for Delphi/Samples/XSLT/XSLTMain.dfm
new file mode 100644
index 0000000..d96bc19
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/XSLT/XSLTMain.dfm
@@ -0,0 +1,1115 @@
+object XSLTMainForm: TXSLTMainForm
+ Left = 327
+ Top = 205
+ AutoScroll = False
+ BorderWidth = 5
+ Caption = 'XSLT Sample'
+ ClientHeight = 402
+ ClientWidth = 456
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ PixelsPerInch = 96
+ TextHeight = 13
+ object PageControl: TPageControl
+ Left = 0
+ Top = 34
+ Width = 456
+ Height = 368
+ ActivePage = tsXML
+ Align = alCustom
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ TabIndex = 0
+ TabOrder = 4
+ object tsXML: TTabSheet
+ Caption = 'XML'
+ object WebBrowser: TWebBrowser
+ Left = 0
+ Top = 0
+ Width = 448
+ Height = 340
+ Align = alClient
+ TabOrder = 0
+ ControlData = {
+ 4C0000004D2E0000242300000000000000000000000000000000000000000000
+ 000000004C000000000000000000000001000000E0D057007335CF11AE690800
+ 2B2E126208000000000000004C0000000114020000000000C000000000000046
+ 8000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000100000000000000000000000000000000000000}
+ end
+ end
+ object tsGrid: TTabSheet
+ Caption = 'Grid'
+ ImageIndex = 1
+ object Splitter2: TSplitter
+ Left = 0
+ Top = 152
+ Width = 448
+ Height = 3
+ Cursor = crVSplit
+ Align = alBottom
+ end
+ object gCustomers: TDBGrid
+ Left = 0
+ Top = 0
+ Width = 448
+ Height = 152
+ Align = alClient
+ DataSource = dsCustomers
+ TabOrder = 0
+ TitleFont.Charset = DEFAULT_CHARSET
+ TitleFont.Color = clWindowText
+ TitleFont.Height = -11
+ TitleFont.Name = 'MS Sans Serif'
+ TitleFont.Style = []
+ end
+ object gOrders: TDBGrid
+ Left = 0
+ Top = 155
+ Width = 448
+ Height = 185
+ Align = alBottom
+ DataSource = dsOrders
+ Options = [dgTitles, dgIndicator, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgConfirmDelete, dgCancelOnExit]
+ TabOrder = 1
+ TitleFont.Charset = DEFAULT_CHARSET
+ TitleFont.Color = clWindowText
+ TitleFont.Height = -11
+ TitleFont.Name = 'MS Sans Serif'
+ TitleFont.Style = []
+ end
+ end
+ end
+ object GetDataButton: TButton
+ Left = 2
+ Top = 4
+ Width = 75
+ Height = 25
+ Caption = 'Get Data'
+ TabOrder = 0
+ OnClick = GetDataButtonClick
+ end
+ object GenerateDeltaButton: TButton
+ Left = 80
+ Top = 4
+ Width = 120
+ Height = 25
+ Caption = 'Generate Delta XML'
+ TabOrder = 1
+ OnClick = GenerateDeltaButtonClick
+ end
+ object XSLTTransformationButton: TButton
+ Left = 202
+ Top = 4
+ Width = 131
+ Height = 25
+ Caption = 'XSLT Transformation'
+ TabOrder = 2
+ OnClick = XSLTTransformationButtonClick
+ end
+ object GenerateHTMLButton: TButton
+ Left = 336
+ Top = 4
+ Width = 106
+ Height = 25
+ Caption = 'Generate HTML'
+ TabOrder = 3
+ OnClick = XSLTTransformationButtonClick
+ end
+ object DriverManager: TDADriverManager
+ DriverDirectory = '%SYSTEM%\'
+ TraceActive = False
+ TraceFlags = []
+ Left = 274
+ Top = 176
+ end
+ object ConnectionManager: TDAConnectionManager
+ Connections = <
+ item
+ Name = 'ADO'
+ ConnectionString =
+ 'ADO?AuxDriver=SQLOLEDB.1;Server=localhost;Database=Northwind;Use' +
+ 'rID=sa;Password=;'
+ Default = True
+ Tag = 0
+ end>
+ DriverManager = DriverManager
+ PoolingEnabled = True
+ Left = 304
+ Top = 176
+ end
+ object ADODriver: TDAADODriver
+ Left = 333
+ Top = 176
+ end
+ object Schema: TDASchema
+ ConnectionManager = ConnectionManager
+ Datasets = <
+ item
+ Params = <>
+ Statements = <
+ item
+ Connection = 'ADO'
+ TargetTable = 'Customers'
+ SQL =
+ 'SELECT '#10' CustomerID, CompanyName, ContactName, ContactTitle, ' +
+ #10' Address, City, Region, PostalCode, Country, Phone, '#10' Fax' +
+ #10' FROM'#10' Customers'#10
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'CustomerID'
+ TableField = 'CustomerID'
+ end
+ item
+ DatasetField = 'CompanyName'
+ TableField = 'CompanyName'
+ end
+ item
+ DatasetField = 'ContactName'
+ TableField = 'ContactName'
+ end
+ item
+ DatasetField = 'ContactTitle'
+ TableField = 'ContactTitle'
+ end
+ item
+ DatasetField = 'Address'
+ TableField = 'Address'
+ end
+ item
+ DatasetField = 'City'
+ TableField = 'City'
+ end
+ item
+ DatasetField = 'Region'
+ TableField = 'Region'
+ end
+ item
+ DatasetField = 'PostalCode'
+ TableField = 'PostalCode'
+ end
+ item
+ DatasetField = 'Country'
+ TableField = 'Country'
+ end
+ item
+ DatasetField = 'Phone'
+ TableField = 'Phone'
+ end
+ item
+ DatasetField = 'Fax'
+ TableField = 'Fax'
+ end>
+ end>
+ Name = 'Customers'
+ Fields = <
+ item
+ Name = 'CustomerID'
+ DataType = datWideString
+ Size = 5
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CompanyName'
+ DataType = datWideString
+ Size = 40
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ContactName'
+ DataType = datWideString
+ Size = 30
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ContactTitle'
+ DataType = datWideString
+ Size = 30
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Address'
+ DataType = datWideString
+ Size = 60
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'City'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Region'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'PostalCode'
+ DataType = datWideString
+ Size = 10
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Country'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Phone'
+ DataType = datWideString
+ Size = 24
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Fax'
+ DataType = datWideString
+ Size = 24
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ BusinessRulesClient.ScriptLanguage = rslPascalScript
+ BusinessRulesServer.ScriptLanguage = rslPascalScript
+ end
+ item
+ Params = <
+ item
+ Name = 'customerid'
+ DataType = datWideString
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ Value = ''
+ ParamType = daptUnknown
+ end>
+ Statements = <
+ item
+ Connection = 'ADO'
+ TargetTable = 'Orders'
+ SQL =
+ 'SELECT '#10' OrderID, CustomerID, EmployeeID, OrderDate, Required' +
+ 'Date, '#10' ShippedDate, ShipVia, Freight, ShipName, ShipAddress,' +
+ ' '#10' ShipCity, ShipRegion, ShipPostalCode, ShipCountry'#10' FROM'#10' ' +
+ ' Orders'#10' where'#10' customerid = :customerid'#10
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'OrderID'
+ TableField = 'OrderID'
+ end
+ item
+ DatasetField = 'CustomerID'
+ TableField = 'CustomerID'
+ end
+ item
+ DatasetField = 'EmployeeID'
+ TableField = 'EmployeeID'
+ end
+ item
+ DatasetField = 'OrderDate'
+ TableField = 'OrderDate'
+ end
+ item
+ DatasetField = 'RequiredDate'
+ TableField = 'RequiredDate'
+ end
+ item
+ DatasetField = 'ShippedDate'
+ TableField = 'ShippedDate'
+ end
+ item
+ DatasetField = 'ShipVia'
+ TableField = 'ShipVia'
+ end
+ item
+ DatasetField = 'Freight'
+ TableField = 'Freight'
+ end
+ item
+ DatasetField = 'ShipName'
+ TableField = 'ShipName'
+ end
+ item
+ DatasetField = 'ShipAddress'
+ TableField = 'ShipAddress'
+ end
+ item
+ DatasetField = 'ShipCity'
+ TableField = 'ShipCity'
+ end
+ item
+ DatasetField = 'ShipRegion'
+ TableField = 'ShipRegion'
+ end
+ item
+ DatasetField = 'ShipPostalCode'
+ TableField = 'ShipPostalCode'
+ end
+ item
+ DatasetField = 'ShipCountry'
+ TableField = 'ShipCountry'
+ end>
+ end>
+ Name = 'Orders'
+ Fields = <
+ item
+ Name = 'OrderID'
+ DataType = datAutoInc
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CustomerID'
+ DataType = datWideString
+ Size = 5
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'EmployeeID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'OrderDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'RequiredDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShippedDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipVia'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Freight'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipName'
+ DataType = datWideString
+ Size = 40
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipAddress'
+ DataType = datWideString
+ Size = 60
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipCity'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipRegion'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipPostalCode'
+ DataType = datWideString
+ Size = 10
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipCountry'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ BusinessRulesClient.ScriptLanguage = rslPascalScript
+ BusinessRulesServer.ScriptLanguage = rslPascalScript
+ end>
+ JoinDataTables = <>
+ UnionDataTables = <>
+ Commands = <>
+ RelationShips = <>
+ UpdateRules = <>
+ Version = 0
+ Left = 362
+ Top = 177
+ end
+ object XMLAdapter: TDAXmlDataStreamer
+ SchemaOptions = [soIncludeEmptyAttributes]
+ RowOptions = []
+ Options = [xaoUseDatasetXSLTs, xaoUseDeltaXSLTs]
+ Left = 245
+ Top = 176
+ end
+ object dtCustomers: TDACDSDataTable
+ RemoteUpdatesOptions = []
+ Fields = <
+ item
+ Name = 'CustomerID'
+ DataType = datWideString
+ Size = 5
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CompanyName'
+ DataType = datWideString
+ Size = 40
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ContactName'
+ DataType = datWideString
+ Size = 30
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ContactTitle'
+ DataType = datWideString
+ Size = 30
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Address'
+ DataType = datWideString
+ Size = 60
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'City'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Region'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'PostalCode'
+ DataType = datWideString
+ Size = 10
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Country'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Phone'
+ DataType = datWideString
+ Size = 24
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Fax'
+ DataType = datWideString
+ Size = 24
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ Params = <>
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteFetchEnabled = False
+ ReadOnly = False
+ LocalSchema = Schema
+ LocalDataStreamer = DAXmlDataStreamer
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ LogicalName = 'Customers'
+ IndexDefs = <>
+ Left = 43
+ Top = 115
+ end
+ object dsCustomers: TDADataSource
+ DataSet = dtCustomers.Dataset
+ DataTable = dtCustomers
+ Left = 52
+ Top = 128
+ end
+ object dtOrders: TDACDSDataTable
+ RemoteUpdatesOptions = []
+ Fields = <
+ item
+ Name = 'OrderID'
+ DataType = datAutoInc
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = True
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CustomerID'
+ DataType = datWideString
+ Size = 5
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'EmployeeID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'OrderDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'RequiredDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShippedDate'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipVia'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'Freight'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipName'
+ DataType = datWideString
+ Size = 40
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipAddress'
+ DataType = datWideString
+ Size = 60
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipCity'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipRegion'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipPostalCode'
+ DataType = datWideString
+ Size = 10
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ShipCountry'
+ DataType = datWideString
+ Size = 15
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ ServerCalculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ Params = <
+ item
+ Name = 'customerid'
+ DataType = datWideString
+ BlobType = dabtUnknown
+ DecimalPrecision = 0
+ DecimalScale = 0
+ Value = ''
+ ParamType = daptUnknown
+ end>
+ MasterParamsMappings.Strings = (
+ 'customerid=CustomerID')
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteFetchEnabled = False
+ ReadOnly = False
+ LocalSchema = Schema
+ LocalDataStreamer = DAXmlDataStreamer
+ MasterSource = dsCustomers
+ MasterFields = 'CustomerID'
+ DetailFields = 'CustomerID'
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ LogicalName = 'Orders'
+ IndexDefs = <>
+ Left = 98
+ Top = 115
+ end
+ object dsOrders: TDADataSource
+ DataSet = dtOrders.Dataset
+ DataTable = dtOrders
+ Left = 106
+ Top = 128
+ end
+ object DAXmlDataStreamer: TDAXmlDataStreamer
+ SchemaOptions = [soIncludeEmptyAttributes]
+ RowOptions = []
+ Options = [xaoUseDatasetXSLTs, xaoUseDeltaXSLTs]
+ Left = 76
+ Top = 162
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Samples/XSLT/XSLTMain.pas b/official/5.0.30.691/Data Abstract for Delphi/Samples/XSLT/XSLTMain.pas
new file mode 100644
index 0000000..ce4c8c4
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Samples/XSLT/XSLTMain.pas
@@ -0,0 +1,187 @@
+unit XSLTMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, StdCtrls, uDADataTable, uDAXMLAdapter, uDAClasses,
+ uDADriverManager, uDAEngine, uDAADODriver, Spin, Buttons, OleCtrls,
+ SHDocVw, ExtCtrls, ComCtrls, DB, uDAScriptingProvider, uDACDSDataTable,
+ Grids, DBGrids, uDABINAdapter, DBCtrls, uDADataStreamer,
+ uDARemoteDataAdapter, uDAInterfaces;
+
+type
+ TXSLTMainForm = class(TForm)
+ DriverManager: TDADriverManager;
+ ADODriver: TDAADODriver;
+ PageControl: TPageControl;
+ tsXML: TTabSheet;
+ tsGrid: TTabSheet;
+ WebBrowser: TWebBrowser;
+ gCustomers: TDBGrid;
+ ConnectionManager: TDAConnectionManager;
+ XMLAdapter: TDAXmlDataStreamer;
+ gOrders: TDBGrid;
+ Splitter2: TSplitter;
+ dtCustomers: TDACDSDataTable;
+ GetDataButton: TButton;
+ dsCustomers: TDADataSource;
+ dtOrders: TDACDSDataTable;
+ dsOrders: TDADataSource;
+ GenerateDeltaButton: TButton;
+ XSLTTransformationButton: TButton;
+ GenerateHTMLButton: TButton;
+ Schema: TDASchema;
+ DAXmlDataStreamer: TDAXmlDataStreamer;
+ procedure GetDataButtonClick(Sender: TObject);
+ procedure GenerateDeltaButtonClick(Sender: TObject);
+ procedure XSLTTransformationButtonClick(Sender: TObject);
+ private
+ fTempFileName,
+ fHTMLFileName,
+ fAppDir: string;
+ function CreateTestUpdates1: Boolean;
+ procedure RefreshXMLView(AfileName: string; aDelta: Boolean = False);
+ public
+ constructor Create(aOwner: TComponent); override;
+ property AppDir: string read fAppDir;
+ property TempFileName: string read fTempFileName;
+ property HTMLFileName: string read fHTMLFileName;
+ end;
+
+var
+ XSLTMainForm: TXSLTMainForm;
+
+implementation
+
+{$R *.dfm}
+
+uses
+ uROMSXMLImpl, uROMSXML2_TLB, uROXMLIntf, ShellAPI, uDADelta, StrUtils;
+
+constructor TXSLTMainForm.Create(aOwner: TComponent);
+begin
+ inherited;
+ fAppDir := ExtractFilePath(Application.ExeName);
+ fTempFileName := fAppDir + 'Temp.xml';
+ fHTMLFileName := fAppDir + 'CustomersHTML.html';
+ PageControl.ActivePageIndex := 0;
+end;
+
+procedure TXSLTMainForm.GetDataButtonClick(Sender: TObject);
+begin
+ dtCustomers.Open;
+ dtOrders.Open;
+ if dtCustomers.DeltaInitialized then dtCustomers.CancelUpdates;
+ if dtOrders.DeltaInitialized then dtOrders.CancelUpdates;
+ XMLAdapter.WriteXSLT := nil; // In case there's one set
+ RefreshXMLView(TempFileName);
+end;
+
+procedure TXSLTMainForm.RefreshXMLView(AfileName: string; aDelta: Boolean = False);
+var
+ xmlstream: TMemoryStream;
+begin
+ xmlstream := TMemoryStream.Create;
+ try
+ // Writes the data or Delta into the stream by using the XML Adapter
+ XMLAdapter.Initialize(xmlstream, aiWrite);
+ if aDelta then begin
+ XMLAdapter.WriteDelta(dtCustomers);
+ XMLAdapter.WriteDelta(dtOrders);
+ end
+ else begin
+ XMLAdapter.WriteDataset(dtCustomers, [woSchema, woRows]);
+ XMLAdapter.WriteDataset(dtOrders, [woSchema, woRows]);
+ end;
+ XMLAdapter.Finalize;
+
+ // Saves the XML stream and displays it in the WebBrowser control
+ xmlstream.SaveToFile(aFileName);
+ WebBrowser.Navigate(aFileName);
+ finally
+ XMLStream.Free;
+ end;
+end;
+
+procedure TXSLTMainForm.GenerateDeltaButtonClick(Sender: TObject);
+begin
+ // Generates some test updates (ask confirmation first)
+ dtCustomers.Open;
+ dtOrders.Open;
+ if not CreateTestUpdates1 then Exit;
+
+ // Erases the XSLT in case there's one set
+ XMLAdapter.WriteXSLT := nil; // In case there's one set
+ RefreshXMLView(TempFileName, True);
+end;
+
+function TXSLTMainForm.CreateTestUpdates1: Boolean;
+begin
+ Result := False;
+ if (MessageDlg('Do you want to create some updates?', mtConfirmation, [mbYes, mbNo], 0) <> mrYes) then Exit;
+
+ dtCustomers.open;
+ dtOrders.open;
+ if dtCustomers.DeltaInitialized then dtCustomers.CancelUpdates;
+ if dtOrders.DeltaInitialized then dtOrders.CancelUpdates;
+ dtCustomers.Last;
+
+ try
+ // Inserts a bunch of new ones
+ dtCustomers.AddRecord(
+ ['CustomerID', 'CompanyName', 'ContactName', 'ContactTitle', 'Address', 'City', 'Region', 'PostalCode', 'Country', 'Phone', 'Fax'],
+ ['JONSM', 'JohnSmith&Co', 'John Smith', 'Owner', '202 North Lake Drive', 'Barrington', 'IL', '60010', 'USA', '847 389 2112', '847 389 2115']);
+
+ dtOrders.AddRecord(
+ ['OrderID', 'EmployeeID', 'OrderDate', 'RequiredDate', 'ShippedDate', 'ShipVia', 'Freight', 'ShipName', 'ShipAddress', 'ShipCity', 'ShipRegion', 'ShipPostalCode', 'ShipCountry'],
+ [60000, 5, Date, Date + 30, Date + 15, 1, 73.23, 'QUICK-Stop', 'Taucherstrabe 10', 'Rio de Janeiro', 'RJ', '50739', 'Brazil']);
+
+ dtOrders.AddRecord(
+ ['OrderID', 'EmployeeID', 'OrderDate', 'RequiredDate', 'ShippedDate', 'ShipVia', 'Freight', 'ShipName', 'ShipAddress', 'ShipCity', 'ShipRegion', 'ShipPostalCode', 'ShipCountry'],
+ [60001, 2, Date + 15, Date + 30, Date + 25, 1, 22.45, 'LINO-Delicateses', '2743 Bering St.', 'Rio de Janeiro', 'RJ', '50700', 'Brazil']);
+
+ dtCustomers.AddRecord(
+ ['CustomerID', 'CompanyName', 'ContactName', 'ContactTitle', 'Address', 'City', 'Region', 'PostalCode', 'Country', 'Phone', 'Fax'],
+ ['JACDO', 'JackDohrn Ltd', 'Jack Dohrn', 'Owner', '32 Manhattan Lane', 'Hoffman Estates', 'IL', '60074', 'USA', '847 221 3221', '842 221 3221']);
+
+ dtOrders.AddRecord(
+ ['OrderID', 'EmployeeID', 'OrderDate', 'RequiredDate', 'ShippedDate', 'ShipVia', 'Freight', 'ShipName', 'ShipAddress', 'ShipCity', 'ShipRegion', 'ShipPostalCode', 'ShipCountry'],
+ [60002, 5, Date, Date + 20, Date + 10, 1, 45673.29, 'Save-a-lot Markets', 'Torikatu 38', 'Rio de Janeiro', 'RJ', '50759', 'Brazil']);
+
+ dtOrders.AddRecord(
+ ['OrderID', 'EmployeeID', 'OrderDate', 'RequiredDate', 'ShippedDate', 'ShipVia', 'Freight', 'ShipName', 'ShipAddress', 'ShipCity', 'ShipRegion', 'ShipPostalCode', 'ShipCountry'],
+ [60003, 2, Date, Date + 10, Date + 2, 1, 722.23, 'Bottom-Dollar Markets', 'Fauntleroy Circus', 'Rio de Janeiro', 'RJ', '50730', 'Brazil']);
+
+ Result := True;
+ except
+ Result := False;
+ if dtCustomers.Editing then dtCustomers.Cancel;
+ if dtOrders.Editing then dtOrders.Cancel;
+ end;
+end;
+
+procedure TXSLTMainForm.XSLTTransformationButtonClick(Sender: TObject);
+var
+ resfilename, xsltname: string;
+begin
+ dtCustomers.open;
+ dtOrders.open;
+
+ dtCustomers.First;
+
+ // Loads the XSLT document
+ if (Sender = GenerateHTMLButton) then begin
+ xsltname := 'CustomersToHTML.xsl';
+ resfilename := HTMLFileName;
+ end
+ else begin
+ xsltname := 'CustomersToSimpleXML.xsl';
+ resfilename := TempFileName;
+ end;
+ XMLAdapter.WriteXSLT.LoadFromFile(xsltname);
+ RefreshXMLView(resfilename);
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/BaseLoginService_Impl.dfm b/official/5.0.30.691/Data Abstract for Delphi/Source/BaseLoginService_Impl.dfm
new file mode 100644
index 0000000..75ebc6a
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/BaseLoginService_Impl.dfm
@@ -0,0 +1,5 @@
+object BaseLoginService: TBaseLoginService
+ OldCreateOrder = True
+ Height = 300
+ Width = 300
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/BaseLoginService_Impl.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/BaseLoginService_Impl.pas
new file mode 100644
index 0000000..d20b514
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/BaseLoginService_Impl.pas
@@ -0,0 +1,50 @@
+unit BaseLoginService_Impl;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils,
+ {RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
+ {Required:} uRORemoteDataModule,
+ {Generated:} DataAbstract4_Intf;
+
+type
+ { TBaseLoginService }
+ TBaseLoginService = class (TRORemoteDataModule, IBaseLoginService)
+ private
+ fOnLogout: TNotifyEvent;
+ protected
+ { IBaseLoginService methods }
+ procedure Logout;
+ published
+ property OnLogout: TNotifyEvent read fOnLogout write fOnLogout;
+ end;
+
+implementation
+
+uses
+ {Generated:} DataAbstract4_Invk;
+
+{ BaseLoginService }
+
+procedure TBaseLoginService.Logout;
+begin
+ if assigned(OnLogout) then
+ OnLogout(self);
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/BuildDrivers.bpg b/official/5.0.30.691/Data Abstract for Delphi/Source/BuildDrivers.bpg
new file mode 100644
index 0000000..95a2c9d
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/BuildDrivers.bpg
@@ -0,0 +1,75 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = DAADODrv.dad DAAnyDACDrv.dad DABDEDrv.dad DADBISAM3Drv.dad DADBISAM4Drv.dad DADBXDrv.dad DAFIBDrv.dad DAIBDACDrv.dad DAIBODrv.dad DAIBXDrv.dad DAMyDACDrv.dad DAMySQLDACDrv.dad DANexusDBDrv.dad DAODACDrv.dad DAPostgresDACDrv.dad \
+ DASDACDrv.dad DASQLiteDrv.dad DAZeosDrv.dad DAElevateDBDrv.dad
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+DAADODrv.dad: Drivers\DAADODrv.dpr
+ $(DCC)
+
+DAIBXDrv.dad: Drivers\DAIBXDrv.dpr
+ $(DCC)
+
+DADBXDrv.dad: Drivers\DADBXDrv.dpr
+ $(DCC)
+
+DAIBODrv.dad: Drivers\DAIBODrv.dpr
+ $(DCC)
+
+DAODACDrv.dad: Drivers\DAODACDrv.dpr
+ $(DCC)
+
+DASDACDrv.dad: Drivers\DASDACDrv.dpr
+ $(DCC)
+
+DADBISAM3Drv.dad: Drivers\DADBISAM3Drv.dpr
+ $(DCC)
+
+DADBISAM4Drv.dad: Drivers\DADBISAM4Drv.dpr
+ $(DCC)
+
+DAMyDACDrv.dad: Drivers\DAMyDACDrv.dpr
+ $(DCC)
+
+DAIBDACDrv.dad: Drivers\DAIBDACDrv.dpr
+ $(DCC)
+
+DAFIBDrv.dad: Drivers\DAFIBDrv.dpr
+ $(DCC)
+
+DAPostgresDACDrv.dad: Drivers\DAPostgresDACDrv.dpr
+ $(DCC)
+
+DAMySQLDACDrv.dad: Drivers\DAMySQLDACDrv.dpr
+ $(DCC)
+
+DABDEDrv.dad: Drivers\DABDEDrv.dpr
+ $(DCC)
+
+DANexusDBDrv.dad: Drivers\DANexusDBDrv.dpr
+ $(DCC)
+
+DAZeosDrv.dad: Drivers\DAZeosDrv.dpr
+ $(DCC)
+
+DASQLiteDrv.dad: Drivers\DASQLiteDrv.dpr
+ $(DCC)
+
+DAAnyDACDrv.dad: Drivers\DAAnyDACDrv.dpr
+ $(DCC)
+
+DAElevateDBDrv.dad: Drivers\DAElevateDBDrv.dpr
+ $(DCC)
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/BuildPackages_D10.bdsgroup b/official/5.0.30.691/Data Abstract for Delphi/Source/BuildPackages_D10.bdsgroup
new file mode 100644
index 0000000..a91801f
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/BuildPackages_D10.bdsgroup
@@ -0,0 +1,37 @@
+
+
+
+
+ Default.Personality
+
+ 1.0
+ {54AB30E9-B101-48B0-A497-ACE401323312}
+
+
+
+ DataAbstract_Core_D10.bdsproj
+ ..\..\Pascal Script for Delphi\Source\PascalScript_Core_D10.bdsproj
+ DataAbstract_Scripting_D10.bdsproj
+ IDE\DataAbstract_IDE_D10.bdsproj
+ Drivers\DataAbstract_ADODriver_D10.bdsproj
+ Drivers\DataAbstract_AnyDACDriver_D10.bdsproj
+ Drivers\DataAbstract_IBXDriver_D10.bdsproj
+ Drivers\DataAbstract_DBXDriver_D10.bdsproj
+ Drivers\DataAbstract_DBISAMDriver_D10.bdsproj
+ Drivers\DataAbstract_IBODriver_D10.bdsproj
+ Drivers\DataAbstract_MyDACDriver_D10.bdsproj
+ Drivers\DataAbstract_ODACDriver_D10.bdsproj
+ Drivers\DataAbstract_SDACDriver_D10.bdsproj
+ Drivers\DataAbstract_FIBDriver_D10.bdsproj
+ Drivers\DataAbstract_PostgresDACDriver_D10.bdsproj
+ Drivers\DataAbstract_IBDACDriver_D10.bdsproj
+ Drivers\DataAbstract_BDEDriver_D10.bdsproj
+ Drivers\DataAbstract_SQLiteDriver_D10.bdsproj
+ Drivers\DataAbstract_NexusDBDriver_D10.bdsproj
+ Drivers\DataAbstract_MySQLDACDriver_D10.bdsproj
+ Drivers\DataAbstract_ZeosDriver_D10.bdsproj
+ DataAbstract_Core_D10.bpl DataAbstract_Scripting_D10.bpl DataAbstract_IDE_D10.bpl DataAbstract_ADODriver_D10.bpl DataAbstract_AnyDACDriver_D10.bpl DataAbstract_IBXDriver_D10.bpl DataAbstract_DBXDriver_D10.bpl DataAbstract_SDACDriver_D10.bpl DataAbstract_ODACDriver_D10.bpl DataAbstract_IBODriver_D10.bpl DataAbstract_DBISAMDriver_D10.bpl DataAbstract_MyDACDriver_D10.bpl DataAbstract_FIBDriver_D10.bpl DataAbstract_IBDACDriver_D10.bpl DataAbstract_BDEDriver_D10.bpl DataAbstract_ZeosDriver_D10.bpl DataAbstract_MySQLDACDriver_D10.bpl DataAbstract_NexusDBDriver_D10.bpl DataAbstract_SQLiteDriver_D10.bpl DataAbstract_PostgresDACDriver_D10.bpl
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/BuildPackages_D11.groupproj b/official/5.0.30.691/Data Abstract for Delphi/Source/BuildPackages_D11.groupproj
new file mode 100644
index 0000000..bc2abf8
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/BuildPackages_D11.groupproj
@@ -0,0 +1,248 @@
+
+
+ {788d1e93-6494-4009-bad7-5d620a616e08}
+
+
+
+
+
+
+
+ DataAbstract_Core_D11.dproj
+
+
+ DataAbstract_Core_D11.dproj
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Default.Personality
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/BuildPackages_D6.bpg b/official/5.0.30.691/Data Abstract for Delphi/Source/BuildPackages_D6.bpg
new file mode 100644
index 0000000..8d0eccd
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/BuildPackages_D6.bpg
@@ -0,0 +1,92 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = DataAbstract_Core_D6.bpl DataAbstract_Scripting_D6.bpl \
+ DataAbstract_IDE_D6.bpl DataAbstract_ADODriver_D6.bpl \
+ DataAbstract_AnyDACDriver_D6.bpl \
+ DataAbstract_BDEDriver_D6.bpl DataAbstract_DBISAMDriver_D6.bpl \
+ DataAbstract_DBXDriver_D6.bpl DataAbstract_ElevateDBDriver_D6.bpl \
+ DataAbstract_FIBDriver_D6.bpl DataAbstract_IBDACDriver_D6.bpl \
+ DataAbstract_IBODriver_D6.bpl DataAbstract_IBXDriver_D6.bpl \
+ DataAbstract_MyDACDriver_D6.bpl DataAbstract_MySQLDACDriver_D6.bpl \
+ DataAbstract_NexusDBDriver_D6.bpl DataAbstract_ODACDriver_D6.bpl \
+ DataAbstract_PostgresDACDriver_D6.bpl DataAbstract_SDACDriver_D6.bpl \
+ DataAbstract_SQLiteDriver_D6.bpl DataAbstract_ZeosDriver_D6.bpl
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+DataAbstract_Core_D6.bpl: DataAbstract_Core_D6.dpk
+ $(DCC)
+
+DataAbstract_IDE_D6.bpl: IDE\DataAbstract_IDE_D6.dpk
+ $(DCC)
+
+DataAbstract_ADODriver_D6.bpl: Drivers\DataAbstract_ADODriver_D6.dpk
+ $(DCC)
+
+DataAbstract_IBXDriver_D6.bpl: Drivers\DataAbstract_IBXDriver_D6.dpk
+ $(DCC)
+
+DataAbstract_SDACDriver_D6.bpl: Drivers\DataAbstract_SDACDriver_D6.dpk
+ $(DCC)
+
+DataAbstract_DBXDriver_D6.bpl: Drivers\DataAbstract_DBXDriver_D6.dpk
+ $(DCC)
+
+DataAbstract_ODACDriver_D6.bpl: Drivers\DataAbstract_ODACDriver_D6.dpk
+ $(DCC)
+
+DataAbstract_IBODriver_D6.bpl: Drivers\DataAbstract_IBODriver_D6.dpk
+ $(DCC)
+
+DataAbstract_DBISAMDriver_D6.bpl: Drivers\DataAbstract_DBISAMDriver_D6.dpk
+ $(DCC)
+
+DataAbstract_MyDACDriver_D6.bpl: Drivers\DataAbstract_MyDACDriver_D6.dpk
+ $(DCC)
+
+DataAbstract_Scripting_D6.bpl: DataAbstract_Scripting_D6.dpk
+ $(DCC)
+
+PascalScript_Core_D6.bpl: ..\..\Pascal Script for Delphi\Source\PascalScript_Core_D6.dpk
+ $(DCC)
+
+DataAbstract_FIBDriver_D6.bpl: Drivers\DataAbstract_FIBDriver_D6.dpk
+ $(DCC)
+
+DataAbstract_IBDACDriver_D6.bpl: Drivers\DataAbstract_IBDACDriver_D6.dpk
+ $(DCC)
+
+DataAbstract_BDEDriver_D6.bpl: Drivers\DataAbstract_BDEDriver_D6.dpk
+ $(DCC)
+
+DataAbstract_ZeosDriver_D6.bpl: Drivers\DataAbstract_ZeosDriver_D6.dpk
+ $(DCC)
+
+DataAbstract_MySQLDACDriver_D6.bpl: Drivers\DataAbstract_MySQLDACDriver_D6.dpk
+ $(DCC)
+
+DataAbstract_NexusDBDriver_D6.bpl: Drivers\DataAbstract_NexusDBDriver_D6.dpk
+ $(DCC)
+
+DataAbstract_SQLiteDriver_D6.bpl: Drivers\DataAbstract_SQLiteDriver_D6.dpk
+ $(DCC)
+
+DataAbstract_PostgresDACDriver_D6.bpl: Drivers\DataAbstract_PostgresDACDriver_D6.dpk
+ $(DCC)
+
+DataAbstract_ElevateDBDriver_D6.bpl: Drivers\DataAbstract_ElevateDBDriver_D6.dpk
+ $(DCC)
+
+DataAbstract_AnyDACDriver_D6.bpl: Drivers\DataAbstract_AnyDACDriver_D6.dpk
+ $(DCC)
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/BuildPackages_D7.bpg b/official/5.0.30.691/Data Abstract for Delphi/Source/BuildPackages_D7.bpg
new file mode 100644
index 0000000..fc94be1
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/BuildPackages_D7.bpg
@@ -0,0 +1,85 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = DataAbstract_Core_D7.bpl DataAbstract_Scripting_D7.bpl DataAbstract_IDE_D7.bpl DataAbstract_ADODriver_D7.bpl DataAbstract_AnyDACDriver_D7.bpl DataAbstract_BDEDriver_D7.bpl DataAbstract_DBISAMDriver_D7.bpl DataAbstract_DBXDriver_D7.bpl \
+ DataAbstract_ElevateDBDriver_D7.bpl DataAbstract_FIBDriver_D7.bpl DataAbstract_IBDACDriver_D7.bpl DataAbstract_IBODriver_D7.bpl DataAbstract_IBXDriver_D7.bpl DataAbstract_MyDACDriver_D7.bpl DataAbstract_MySQLDACDriver_D7.bpl \
+ DataAbstract_NexusDBDriver_D7.bpl DataAbstract_ODACDriver_D7.bpl DataAbstract_PostgresDACDriver_D7.bpl DataAbstract_SDACDriver_D7.bpl DataAbstract_SQLiteDriver_D7.bpl DataAbstract_ZeosDriver_D7.bpl
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+DataAbstract_Core_D7.bpl: DataAbstract_Core_D7.dpk
+ $(DCC)
+
+DataAbstract_IDE_D7.bpl: IDE\DataAbstract_IDE_D7.dpk
+ $(DCC)
+
+DataAbstract_ADODriver_D7.bpl: Drivers\DataAbstract_ADODriver_D7.dpk
+ $(DCC)
+
+DataAbstract_IBXDriver_D7.bpl: Drivers\DataAbstract_IBXDriver_D7.dpk
+ $(DCC)
+
+DataAbstract_SDACDriver_D7.bpl: Drivers\DataAbstract_SDACDriver_D7.dpk
+ $(DCC)
+
+DataAbstract_DBXDriver_D7.bpl: Drivers\DataAbstract_DBXDriver_D7.dpk
+ $(DCC)
+
+DataAbstract_ODACDriver_D7.bpl: Drivers\DataAbstract_ODACDriver_D7.dpk
+ $(DCC)
+
+DataAbstract_IBODriver_D7.bpl: Drivers\DataAbstract_IBODriver_D7.dpk
+ $(DCC)
+
+DataAbstract_DBISAMDriver_D7.bpl: Drivers\DataAbstract_DBISAMDriver_D7.dpk
+ $(DCC)
+
+DataAbstract_MyDACDriver_D7.bpl: Drivers\DataAbstract_MyDACDriver_D7.dpk
+ $(DCC)
+
+DataAbstract_Scripting_D7.bpl: DataAbstract_Scripting_D7.dpk
+ $(DCC)
+
+PascalScript_Core_D7.bpl: ..\..\Pascal Script for Delphi\Source\PascalScript_Core_D7.dpk
+ $(DCC)
+
+DataAbstract_FIBDriver_D7.bpl: Drivers\DataAbstract_FIBDriver_D7.dpk
+ $(DCC)
+
+DataAbstract_IBDACDriver_D7.bpl: Drivers\DataAbstract_IBDACDriver_D7.dpk
+ $(DCC)
+
+DataAbstract_BDEDriver_D7.bpl: Drivers\DataAbstract_BDEDriver_D7.dpk
+ $(DCC)
+
+DataAbstract_ZeosDriver_D7.bpl: Drivers\DataAbstract_ZeosDriver_D7.dpk
+ $(DCC)
+
+DataAbstract_MySQLDACDriver_D7.bpl: Drivers\DataAbstract_MySQLDACDriver_D7.dpk
+ $(DCC)
+
+DataAbstract_NexusDBDriver_D7.bpl: Drivers\DataAbstract_NexusDBDriver_D7.dpk
+ $(DCC)
+
+DataAbstract_SQLiteDriver_D7.bpl: Drivers\DataAbstract_SQLiteDriver_D7.dpk
+ $(DCC)
+
+DataAbstract_PostgresDACDriver_D7.bpl: Drivers\DataAbstract_PostgresDACDriver_D7.dpk
+ $(DCC)
+
+DataAbstract_ElevateDBDriver_D7.bpl: Drivers\DataAbstract_ElevateDBDriver_D7.dpk
+ $(DCC)
+
+DataAbstract_AnyDACDriver_D7.bpl: Drivers\DataAbstract_AnyDACDriver_D7.dpk
+ $(DCC)
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/BuildPackages_K3.bpg b/official/5.0.30.691/Data Abstract for Delphi/Source/BuildPackages_K3.bpg
new file mode 100644
index 0000000..6649fe0
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/BuildPackages_K3.bpg
@@ -0,0 +1,23 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = DataAbstract_Core_K3.bpl bplDataAbstract_IDE_K3.so
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+DataAbstract_Core_K3.bpl: DataAbstract_Core_K3.dpk
+ $(DCC)
+
+bplDataAbstract_IDE_K3.so: IDE/DataAbstract_IDE_K3.dpk
+ $(DCC)
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DALoginService_Impl.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/DALoginService_Impl.pas
new file mode 100644
index 0000000..53fe76e
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DALoginService_Impl.pas
@@ -0,0 +1,199 @@
+unit DALoginService_Impl {$IFNDEF FPC}deprecated{$ENDIF};
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ This is where you are supposed to code the implementation of your objects. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils,
+ {RemObjects:} uROClientIntf, uROTypes, uROServer, uROSessions,
+ {Ancestor Implementation:} DARemoteService_Impl,
+ {Generated:} DataAbstract3_Intf;
+
+const
+ def_UserID = 'UserID';
+ def_Password = 'UserPassword';
+ def_SessionID = 'SessionID';
+
+type
+ TDALoginService = class;
+
+ TDAOnLoginEvent = procedure(Sender : TDALoginService; var aUserID, aPassword : AnsiString) of object;
+ TDAOnLoginSuccessEvent = procedure(Sender : TDALoginService; aLoginInfo : TDALoginInfo) of object;
+ TDAOnLoginFailureEvent = procedure(Sender : TDALoginService; const aUserID, aPassword : AnsiString) of object;
+ TDAOnLogoutEvent = procedure(Sender : TDALoginService; const aSessionID : TGUID) of object;
+
+ { TDALoginService }
+ TDALoginService = class(TDARemoteService, IDALoginService)
+ private
+ fLoginDataset: string;
+ fLogoutCommand: string;
+ fOnLogin: TDAOnLoginEvent;
+ fOnLoginFailure: TDAOnLoginFailureEvent;
+ fOnLoginSuccess: TDAOnLoginSuccessEvent;
+ fOnLogout: TDAOnLogoutEvent;
+ fParamNameUserID: string;
+ fParamNamePassword: string;
+ fParamNameSessionID: string;
+ function GetParamNamePasswordStored: Boolean;
+ function GetParamNameUserIDStored: Boolean;
+ function GetParamNameSessionIDStored: Boolean;
+ procedure SetParamNameSessionID(const Value: string);
+
+ protected
+ procedure SetLoginDataset(const Value: string); virtual;
+ procedure SetLogoutCommand(const Value: string); virtual;
+
+ procedure SetParamNamePassword(const Value: string); virtual;
+ procedure SetParamNameUserID(const Value: string); virtual;
+
+ function DoLogin(const UserID, Password: AnsiString; out LoginInfo: TDALoginInfo): boolean; virtual;
+ procedure DoLogout(const SessionID : TGUID); virtual;
+
+ { IDALoginService methods }
+ function Login(const UserID: AnsiString; const Password: AnsiString; out LoginInfo: TDALoginInfo): Boolean;
+ procedure Logout;
+
+ public
+ constructor Create(aOwner : TComponent); override;
+
+ published
+ property LoginDataset : string read fLoginDataset write SetLoginDataset;
+ property LogoutCommand : string read fLogoutCommand write SetLogoutCommand;
+
+ property ParamNameUserID : string read fParamNameUserID write SetParamNameUserID stored GetParamNameUserIDStored;
+ property ParamNamePassword : string read fParamNamePassword write SetParamNamePassword stored GetParamNamePasswordStored;
+ property ParamNameSessionID : string read fParamNameSessionID write SetParamNameSessionID stored GetParamNameSessionIDStored;
+
+ property OnLogin: TDAOnLoginEvent read fOnLogin write fOnLogin;
+ property OnLoginSuccess: TDAOnLoginSuccessEvent read fOnLoginSuccess write fOnLoginSuccess;
+ property OnLoginFailure: TDAOnLoginFailureEvent read fOnLoginFailure write fOnLoginFailure;
+ property OnLogout: TDAOnLogoutEvent read fOnLogout write fOnLogout;
+ end deprecated;
+
+implementation
+
+uses
+ {Generated:} uDAInterfaces;
+
+{ DALoginService }
+constructor TDALoginService.Create(aOwner: TComponent);
+begin
+ fParamNameUserID := def_UserID;
+ fParamNamePassword := def_Password;
+ fParamNameSessionID := def_SessionID;
+
+ inherited;
+end;
+
+procedure TDALoginService.SetLoginDataset(const Value: string);
+begin
+ fLoginDataset := Value;
+end;
+
+procedure TDALoginService.SetLogoutCommand(const Value: string);
+begin
+ fLogoutCommand := Value;
+end;
+
+function TDALoginService.Login(const UserID: AnsiString; const Password: AnsiString; out LoginInfo: TDALoginInfo): Boolean;
+var tempuserid, temppassword : AnsiString;
+begin
+ tempuserid := UserID;
+ temppassword := Password;
+
+ CheckObjects(Connection, ServiceSchema, NIL, TRUE, TRUE, FALSE);
+
+ if Assigned(fOnLogin) then fOnLogin(Self, tempuserid, temppassword);
+
+ result := DoLogin(tempuserid, temppassword, LoginInfo);
+
+ if not result then begin
+ DestroySession;
+ if Assigned(fOnLoginFailure) then fOnLoginFailure(Self, tempuserid, temppassword);
+ end
+ else begin
+ if Assigned(fOnLoginSuccess) then fOnLoginSuccess(Self, LoginInfo);
+ end;
+end;
+
+procedure TDALoginService.Logout;
+begin
+ if (LogoutCommand<>'')
+ then CheckObjects(Connection, ServiceSchema, NIL, TRUE, TRUE, FALSE);
+
+ if Assigned(fOnLogout)
+ then fOnLogout(Self, Session.SessionID);
+
+ DoLogout(Session.SessionID);
+
+ DestroySession;
+end;
+
+function TDALoginService.DoLogin(const UserID: AnsiString; const Password: AnsiString; out LoginInfo: TDALoginInfo): boolean;
+var ds : IDADataset;
+ i : integer;
+begin
+ result := FALSE;
+ LoginInfo := NIL;
+
+ ds := ServiceSchema.NewDataset(Connection, LoginDataset, [ParamNameUserID, ParamNamePassword], [UserID, Password]);
+ if ds.EOF then Exit;
+
+ LoginInfo := TDALoginInfo.Create;
+ LoginInfo.UserID := UserID;
+ LoginInfo.SessionID := {$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(GUIDToString(Session.SessionID));
+
+ for i := 0 to (ds.FieldCount-1) do begin
+ Session[ds.Fields[i].Name] := ds.Fields[i].Value;
+ LoginInfo.Attributes.Add({$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(ds.Fields[i].Name+'='+ds.Fields[i].AsString));
+ end;
+
+ result := TRUE;
+end;
+
+procedure TDALoginService.DoLogout(const SessionID: TGUID);
+var cmd : IDASQLCommand;
+begin
+ if (LogoutCommand<>'')
+ then cmd := ServiceSchema.NewCommand(Connection, LogoutCommand, [ParamNameSessionID], [GUIDToString(SessionID)]);
+end;
+
+procedure TDALoginService.SetParamNamePassword(const Value: string);
+begin
+ fParamNamePassword := Value;
+end;
+
+procedure TDALoginService.SetParamNameUserID(const Value: string);
+begin
+ fParamNameUserID := Value;
+end;
+
+function TDALoginService.GetParamNamePasswordStored: Boolean;
+begin
+ result := fParamNamePassword<>def_Password
+end;
+
+function TDALoginService.GetParamNameUserIDStored: Boolean;
+begin
+ result := fParamNameUserID<>def_UserID
+end;
+
+function TDALoginService.GetParamNameSessionIDStored: Boolean;
+begin
+ result := fParamNameSessionID<>def_SessionID
+end;
+
+procedure TDALoginService.SetParamNameSessionID(const Value: string);
+begin
+ fParamNameSessionID := Value;
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DARemoteService_Impl.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/DARemoteService_Impl.pas
new file mode 100644
index 0000000..5c757fa
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DARemoteService_Impl.pas
@@ -0,0 +1,1095 @@
+unit DARemoteService_Impl {$IFNDEF FPC}deprecated{$ENDIF};
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{----------------------------------------------------------------------------}
+{ LEGACY NOTE: }
+{ As of v4.0, future development of this unit has been discontinued, and }
+{ new featureswill be impleentd in DataAbstractService_Impl.pas, instead. }
+{ }
+{ When applying fixes to this unit, please propagate them to the new unit }
+{ as well, where needed. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ Classes, SysUtils,
+ {$IFDEF DELPHI5}Forms, {$ENDIF}
+ uRORemoteDataModule, uROClientIntf, uROSessions, uROClasses, uROTypes,
+ uDAClasses, uDAInterfaces, uDADataTable, uDABusinessProcessor, uDACache, uDADelta, uDADataStreamer,
+ uDADataTableReferenceCollection, DataAbstract3_Intf;
+
+type
+ { Types }
+ TDARemoteService = class;
+
+ { Events }
+ TDAAcquireConnectionEvent = procedure(Sender: TDARemoteService; var ConnectionName: string) of object;
+ TDAConnectionAcquiredEvent = procedure(Sender: TDARemoteService; const ConnectionName: string; const AcquiredConnection: IDAConnection) of object;
+ TDAAcquireConnectionFailureEvent = procedure(Sender: TDARemoteService; const ConnectionName: string; Error: Exception) of object;
+ TDAGetDatasetSchemaEvent = procedure(const Dataset: IDADataset) of object;
+ TDAGetDatasetDataEvent = procedure(const Dataset: IDADataset; const IncludeSchema: Boolean; const MaxRecords: Integer) of object;
+ TDAOnBusinessProcessorAutoCreated = procedure(Sender : TRORemoteDataModule; BusinessProcessor : TDABusinessProcessor) of object;
+ TDABeforeExecuteCommandEvent = procedure(Sender : TDARemoteService; const aCommand : IDASQLCommand) of object;
+ TDAAfterExecuteCommandEvent = procedure(Sender : TDARemoteService; const aCommand : IDASQLCommand; RowsAffacted : integer) of object;
+ TDAConnectionReleasedEvent = procedure(Sender: TDARemoteService; const ConnectionName: string) of object;
+ TDAGetSchemaAsXMLEvent = procedure(Sender: TDARemoteService; var SchemaXML : AnsiString) of object;
+
+ TDAProcessDeltasEvent = procedure(Sender : TDARemoteService; DeltaStructs : TDADeltaStructList) of object;
+ TDAProcessDeltasErrorEvent = procedure(Sender : TDARemoteService; DeltaStructs : TDADeltaStructList; Error : Exception; var DoRaise : boolean) of object;
+
+ TDAOnGetCachedDataset = procedure(Sender : TDARemoteService; const aDatasetName : string; aDataStream : TStream) of object;
+
+ TDAGetDatasetDataValidationEvent = procedure(Sender: TDARemoteService;
+ const aConnection: IDAConnection;
+ const aDatasetName: string;
+ const aParamNames: array of string;
+ const aParamValues : array of variant;
+ aSchema: TDASchema;
+ var Allowed : boolean) of object;
+
+ TDAUpdateDataTransactionEvent = procedure(Sender: TDARemoteService; var UseDefaultTransactionLogic: Boolean) of object;
+
+ TDAAfterProcessTransactionAction = (pptaNone, pptaRollback, pptaCommit);
+
+ { TDARemoteService }
+ TDARemoteServiceOption = (rsoProcessDeltasWithoutUpdateRules);
+ TDARemoteServiceOptions = set of TDARemoteServiceOption;
+
+ TDARemoteService = class(TRORemoteDataModule, IDARemoteService)
+ private
+ fServiceSchema: TDASchema;
+
+ fStreamedAcquireConnection,
+ fAcquireConnection: boolean;
+ fConnectionName: string;
+ fOnBeforeAcquireConnection: TDAAcquireConnectionEvent;
+ fOnAfterAcquireConnection: TDAConnectionAcquiredEvent;
+ fOnAfterReleaseConnection: TDAConnectionReleasedEvent;
+ fOnBeforeReleaseConnection: TDAConnectionAcquiredEvent;
+ fConnection: IDAConnection;
+ fServiceAdapter: TDADataStreamer;
+ fOnAcquireConnectionFailure: TDAAcquireConnectionFailureEvent;
+
+ fOnAfterGetDatasetData: TDAGetDatasetDataEvent;
+ fOnBeforeGetDatasetData: TDAGetDatasetDataEvent;
+ fOnAfterGetDatasetSchema: TDAGetDatasetSchemaEvent;
+ fOnBeforeGetDatasetSchema: TDAGetDatasetSchemaEvent;
+ fAutoCreateBusinessProcessors: boolean;
+ fAllowExecuteSQLCommand: boolean;
+ fAllowWhereSQL: boolean;
+ fOnBusinessProcessorAutoCreated: TDAOnBusinessProcessorAutoCreated;
+ fOnBeforeExecuteCommand: TDABeforeExecuteCommandEvent;
+ fOnAfterExecuteCommand: TDAAfterExecuteCommandEvent;
+ fOnGetSchemaAsXML: TDAGetSchemaAsXMLEvent;
+
+ fGetDatasetDataValidation: TDAGetDatasetDataValidationEvent;
+
+ fAfterProcessTransactionAction: TDAAfterProcessTransactionAction;
+
+ fOnUpdateDataBeginTransaction : TDAUpdateDataTransactionEvent;
+ fOnUpdateDataCommitTransaction : TDAUpdateDataTransactionEvent;
+ fOnUpdateDataRollBackTransaction : TDAUpdateDataTransactionEvent;
+
+ fOnBeforeProcessDeltas : TDAProcessDeltasEvent;
+ fOnAfterProcessDeltas: TDAProcessDeltasEvent;
+ fOnProcessDeltasError: TDAProcessDeltasErrorEvent;
+ fExportedDataTables: TDADataTableReferenceCollection;
+ fCache: TDACache;
+ fCacheElements: TDACacheElementCollection;
+ fOnGetCachedDataset: TDAOnGetCachedDataset;
+ fOptions: TDARemoteServiceOptions;
+
+ function TriggerTransactionEvent(aEvent: TDAUpdateDataTransactionEvent): Boolean;
+ procedure SetServiceSchema(const Value: TDASchema);
+ procedure SetAcquireConnection(const Value: boolean);
+ procedure SetConnectionName(const Value: string);
+ procedure SetServiceAdapter(const Value: TDADataAdapter);
+ function UnpackDeltas(const DeltaStream: Binary; DeltaStructList : TDADeltaStructList): integer;
+ procedure SetExportedDataTables(const Value: TDADataTableReferenceCollection);
+ procedure MergeDatatablesToSchema(aList : TList);
+ procedure SetCache(const Value: TDACache);
+ procedure SetCacheElements(const Value: TDACacheElementCollection);
+ procedure SetConnection(const aValue: IDAConnection);
+
+ protected
+ procedure Notification(AComponent: TComponent; Operation: TOperation); override;
+ procedure Loaded; override;
+
+ procedure CheckObjects(const aConnection: IDAConnection;
+ aSchema: TDASchema; anAdapter: TDADataAdapter;
+ CheckConnection : boolean = TRUE;
+ CheckSchema : boolean = TRUE;
+ CheckAdapter : boolean = TRUE);
+
+ { Internal }
+ procedure DoOnActivate(aClientID: TGUID; const aMessage: IROMessage); override;
+ procedure DoOnDeactivate(aClientID: TGUID); override;
+
+ function DoGetDatasetData(const Stream: TStream;
+ const aConnection: IDAConnection;
+ const aDatasetName: ansistring;
+ const aParamNames: array of string;
+ const aParamValues : array of variant;
+ const UserFilter : ansistring;
+ aSchema: TDASchema;
+ anAdapter: TDADataAdapter;
+ someOptions: TDAWriteOptions;
+ MaxRecords: integer): integer; virtual;
+
+ function CreateParamString(const ParamNames: array of string; const ParamValues: array of Variant): string;
+
+ function GetDatasetData(const DatasetName: ansistring;
+ const ParamNames: array of string;
+ const ParamValues: array of Variant;
+ const IncludeSchema: Boolean = FALSE;
+ const MaxRecords: Integer = -1): Binary; overload;
+ function GetDatasetData(const DatasetName: Ansistring;
+ const IncludeSchema: Boolean = FALSE;
+ const MaxRecords: Integer = -1): Binary; overload;
+
+ { IDARemoteService }
+ function GetDatasetSchema(const aDatasetName: AnsiString): Binary; virtual;
+ function GetDatasetData(const DatasetName: AnsiString;
+ const Params: AnsiString;
+ const IncludeSchema: Boolean;
+ const MaxRecords: Integer): Binary; overload; virtual;
+ function UpdateData(const Delta: Binary): Binary; virtual;
+ function ExecuteSQLCommand(const SQL: AnsiString): Integer; virtual;
+ function GetSchemaAsXML: AnsiString; virtual;
+ function GetDatasetDataEx(const DatasetName: AnsiString;
+ const Params: TDADatasetParamArray;
+ const UserFilter: AnsiString;
+ const IncludeSchema: Boolean;
+ const MaxRecords: Integer): Binary;
+ function GetMultipleDatasets(const DatasetRequestInfoArray: TDADatasetRequestInfoArray): TROBinaryMemoryStream;
+ function GetDatasetScripts(const DatasetNames: AnsiString): AnsiString;
+ function ExecuteSQLCommandEx(const CommandName: AnsiString; const Params: TDADatasetParamArray): Integer;
+
+ public
+ constructor Create(aOwner : TComponent); override;
+ destructor Destroy; override;
+
+ property Connection: IDAConnection read fConnection write SetConnection;
+
+ published
+ property AcquireConnection: boolean read fAcquireConnection write SetAcquireConnection default false;
+ property ConnectionName: string read fConnectionName write SetConnectionName;
+
+ property ServiceSchema: TDASchema read fServiceSchema write SetServiceSchema;
+ property ServiceAdapter: TDADataAdapter read fServiceAdapter write SetServiceAdapter;
+
+ property AutoCreateBusinessProcessors : boolean read fAutoCreateBusinessProcessors write fAutoCreateBusinessProcessors default true;
+ property AllowExecuteSQLCommand: boolean read fAllowExecuteSQLCommand write fAllowExecuteSQLCommand default false;
+ property AllowWhereSQL: boolean read fAllowWhereSQL write fAllowWhereSQL default true;
+
+ property OnAfterProcessTransactionAction: TDAAfterProcessTransactionAction read fAfterProcessTransactionAction write fAfterProcessTransactionAction default pptaCommit;
+
+ property OnBeforeAcquireConnection: TDAAcquireConnectionEvent read fOnBeforeAcquireConnection write fOnBeforeAcquireConnection;
+ property OnAfterAcquireConnection: TDAConnectionAcquiredEvent read fOnAfterAcquireConnection write fOnAfterAcquireConnection;
+ property OnBeforeReleaseConnection: TDAConnectionAcquiredEvent read fOnBeforeReleaseConnection write fOnBeforeReleaseConnection;
+ property OnAfterReleaseConnection: TDAConnectionReleasedEvent read fOnAfterReleaseConnection write fOnAfterReleaseConnection;
+ property OnAcquireConnectionFailure: TDAAcquireConnectionFailureEvent read fOnAcquireConnectionFailure write fOnAcquireConnectionFailure;
+
+ property OnBeforeProcessDeltas : TDAProcessDeltasEvent read fOnBeforeProcessDeltas write fOnBeforeProcessDeltas;
+ property OnAfterProcessDeltas: TDAProcessDeltasEvent read fOnAfterProcessDeltas write fOnAfterProcessDeltas;
+ property OnProcessDeltasError: TDAProcessDeltasErrorEvent read fOnProcessDeltasError write fOnProcessDeltasError;
+
+ property OnBeforeGetDatasetSchema: TDAGetDatasetSchemaEvent read fOnBeforeGetDatasetSchema write fOnBeforeGetDatasetSchema;
+ property OnBeforeGetDatasetData: TDAGetDatasetDataEvent read fOnBeforeGetDatasetData write fOnBeforeGetDatasetData;
+ property OnAfterGetDatasetSchema: TDAGetDatasetSchemaEvent read fOnAfterGetDatasetSchema write fOnAfterGetDatasetSchema;
+ property OnAfterGetDatasetData: TDAGetDatasetDataEvent read fOnAfterGetDatasetData write fOnAfterGetDatasetData;
+ property OnBusinessProcessorAutoCreated: TDAOnBusinessProcessorAutoCreated read fOnBusinessProcessorAutoCreated write fOnBusinessProcessorAutoCreated;
+ property OnBeforeExecuteCommand: TDABeforeExecuteCommandEvent read fOnBeforeExecuteCommand write fOnBeforeExecuteCommand;
+ property OnAfterExecuteCommand: TDAAfterExecuteCommandEvent read fOnAfterExecuteCommand write fOnAfterExecuteCommand;
+ property OnGetSchemaAsXMLEvent: TDAGetSchemaAsXMLEvent read fOnGetSchemaAsXML write fOnGetSchemaAsXML;
+ property GetDatasetDataValidation: TDAGetDatasetDataValidationEvent read fGetDatasetDataValidation write fGetDatasetDataValidation;
+
+ property OnUpdateDataBeginTransaction : TDAUpdateDataTransactionEvent read fOnUpdateDataBeginTransaction write fOnUpdateDataBeginTransaction;
+ property OnUpdateDataCommitTransaction : TDAUpdateDataTransactionEvent read fOnUpdateDataCommitTransaction write fOnUpdateDataCommitTransaction;
+ property OnUpdateDataRollBackTransaction : TDAUpdateDataTransactionEvent read fOnUpdateDataRollBackTransaction write fOnUpdateDataRollBackTransaction;
+
+ property ExportedDataTables : TDADataTableReferenceCollection read fExportedDataTables write SetExportedDataTables;
+ property Cache : TDACache read fCache write SetCache;
+ property CacheElements : TDACacheElementCollection read fCacheElements write SetCacheElements;
+ property OnGetCachedDataset : TDAOnGetCachedDataset read fOnGetCachedDataset write fOnGetCachedDataset;
+
+ property Options : TDARemoteServiceOptions read fOptions write fOptions;
+ end deprecated;
+
+implementation
+
+uses
+ Contnrs, Variants, TypInfo,
+ uROClient,
+ uDARes, uDAExceptions;
+
+{ TDARemoteService }
+
+constructor TDARemoteService.Create(aOwner: TComponent);
+begin
+ fExportedDataTables := TDADataTableReferenceCollection.Create(Self);
+ fCacheElements := TDACacheElementCollection.Create();
+ fOptions := [rsoProcessDeltasWithoutUpdateRules];
+ fAllowWhereSQL := true;
+
+ inherited;
+
+ fAutoCreateBusinessProcessors := TRUE;
+end;
+
+destructor TDARemoteService.Destroy;
+begin
+ inherited;
+
+ FreeAndNIL(fExportedDataTables);
+ FreeAndNIL(fCacheElements);
+end;
+
+procedure TDARemoteService.DoOnActivate(aClientID: TGUID; const aMessage: IROMessage);
+var
+ connname: string;
+begin
+ inherited;
+
+ if (csDesigning in ComponentState) then Exit;
+
+ if AcquireConnection then try
+ // Acquires a DA connection automatically
+ if (fServiceSchema = nil) or (fServiceSchema.ConnectionManager = nil) then RaiseError(err_DARDMInvalidSchema);
+
+ connname := fConnectionName;
+ if Assigned(fOnBeforeAcquireConnection) then fOnBeforeAcquireConnection(Self, connname);
+
+ fConnection := ServiceSchema.ConnectionManager.NewConnection(connname);
+ if Supports(fConnection, IDAHETConnection) then
+ raise Exception.Create(err_HETConnectionNotSupportedInV3);
+
+ if Assigned(fOnAfterAcquireConnection) then fOnAfterAcquireConnection(Self, connname, fConnection);
+ except
+ on E: Exception do begin
+ if Assigned(fOnAcquireConnectionFailure) then fOnAcquireConnectionFailure(Self, connname, E);
+ raise;
+ end;
+ end;
+end;
+
+procedure TDARemoteService.DoOnDeactivate(aClientID: TGUID);
+var connname : string;
+begin
+ inherited;
+
+ if (csDesigning in ComponentState) then Exit;
+
+ if assigned(fConnection) then begin
+ connname := fConnection.Name;
+
+ if Assigned(fOnBeforeReleaseConnection)
+ then fOnBeforeReleaseConnection(Self, connname, fConnection);
+
+ fConnection := nil;
+
+ if Assigned(fOnAfterReleaseConnection)
+ then fOnAfterReleaseConnection(Self, connname);
+ end;
+end;
+
+procedure TDARemoteService.Loaded;
+begin
+ inherited;
+
+ AcquireConnection := fStreamedAcquireConnection;
+end;
+
+procedure TDARemoteService.CheckObjects(const aConnection: IDAConnection;
+ aSchema: TDASchema; anAdapter: TDADataAdapter;
+ CheckConnection : boolean = TRUE;
+ CheckSchema : boolean = TRUE;
+ CheckAdapter : boolean = TRUE);
+begin
+ if CheckConnection and not Assigned(aConnection) then RaiseError(err_DARDMConnectionIsNotAssigned);
+ if CheckSchema and not Assigned(aSchema) then RaiseError(err_DARDMInvalidSchema);
+ if CheckAdapter and not Assigned(anAdapter) then RaiseError(err_DARDMUnassignedAdapter);
+end;
+
+procedure TDARemoteService.Notification(AComponent: TComponent;
+ Operation: TOperation);
+var ref : TDADataTableReference;
+begin
+ inherited;
+
+ if (Operation = opRemove) then begin
+ if (aComponent = fServiceSchema) then ServiceSchema := nil
+ else if (AComponent=fCache) then fCache := NIL
+ else if (aComponent = fServiceAdapter) then ServiceAdapter := nil
+ else if (AComponent is TDADataTable) and (fExportedDataTables<>NIL) then begin
+ ref := fExportedDataTables.FindByDataTable(TDADataTable(aComponent));
+ if (ref<>NIL) then ref.DataTable := NIL;
+ end;
+ end
+
+ else if (Operation = opInsert) then begin
+ if not (csLoading in ComponentState) and (AComponent is TDASchema) and (fServiceSchema = nil) and (AComponent.Owner = Self) then ServiceSchema := TDASchema(aComponent);
+ end;
+end;
+
+procedure TDARemoteService.SetAcquireConnection(const Value: boolean);
+begin
+ if (csLoading in ComponentState) then
+ fStreamedAcquireConnection := Value
+ else begin
+ if Value then begin
+ if (fServiceSchema = nil) then raise Exception.Create(err_DARDMInvalidSchema);
+ end;
+
+ fAcquireConnection := Value;
+ end;
+end;
+
+procedure TDARemoteService.SetConnection(const aValue: IDAConnection);
+begin
+ if assigned(fConnection) and Supports(fConnection, IDAHETConnection) then
+ raise Exception.Create(err_HETConnectionNotSupportedInV3);
+ fConnection := aValue;
+end;
+
+procedure TDARemoteService.SetConnectionName(const Value: string);
+begin
+ fConnectionName := Trim(Value);
+ if (fConnectionName = '') then fAcquireConnection := FALSE;
+end;
+
+procedure TDARemoteService.SetServiceSchema(const Value: TDASchema);
+begin
+ fServiceSchema := Value;
+
+ if (fServiceSchema <> nil) then
+ fServiceSchema.FreeNotification(Self)
+ else
+ fAcquireConnection := FALSE;
+end;
+
+procedure TDARemoteService.SetServiceAdapter(const Value: TDADataAdapter);
+begin
+ fServiceAdapter := Value;
+ if (fServiceAdapter <> nil) then fServiceAdapter.FreeNotification(Self);
+end;
+
+function TDARemoteService.TriggerTransactionEvent(aEvent: TDAUpdateDataTransactionEvent): Boolean;
+begin
+ result := true;
+ if assigned(aEvent) then aEvent(self, result);
+end;
+
+function TDARemoteService.DoGetDatasetData(
+ const Stream: TStream;
+ const aConnection: IDAConnection;
+ const aDatasetName: ansistring;
+ const aParamNames: array of string;
+ const aParamValues : array of variant;
+ const UserFilter : ansistring;
+ aSchema: TDASchema;
+ anAdapter: TDADataAdapter;
+ someOptions: TDAWriteOptions;
+ MaxRecords: integer): integer;
+
+var
+ ds: IDADataset;
+ i, cnt: integer;
+ paramname: string;
+ paramvalue: variant;
+ inclrows,
+ inclschema: boolean;
+ allow : boolean;
+ ref : TDADataTableReference;
+ cachedentry : IDACacheEntry;
+ cacheelement : TDACacheElement;
+ lDatasetName: string;
+ lUserFilter: string;
+begin
+ // Misc
+ lDatasetName:= {$IFDEF UNICODE}Utf8ToAnsi{$ENDIF}(aDatasetName);
+ luserFilter := {$IFDEF UNICODE}Utf8ToAnsi{$ENDIF}(UserFilter);
+ cachedentry := NIL;
+
+ inclschema := (woSchema in someOptions);
+ inclrows := (woRows in someOptions);
+ ref := NIL;
+
+ if (fCache<>NIL) then begin
+ // If the service is connected to a cache, then it searches the cache for this dataset
+ cachedentry := fCache.Get(Self.Name+'.'+lDatasetName);
+ end;
+
+ if (cachedentry=NIL) then begin
+ // New: searches for a datatable reference that matches the request, if any are present
+ // This allows the user to return in memory datasets or other custom data
+ if (fExportedDataTables.Count>0) then begin
+ ref := fExportedDataTables.FindByName(lDatasetName); // Already checks the datatable is not NIL
+ if (ref<>NIL) then begin
+ ds := ref.Dataset;
+ end;
+ end;
+ end;
+
+ // Checks for connection, schema and adapter to be assigned since it will need to query the DB in this case
+ if (ref=NIL) and (cachedentry=NIL)
+ then CheckObjects(aConnection, aSchema, anAdapter);
+
+ // Security check, common to every case
+ allow := TRUE;
+ if Assigned(fGetDatasetDataValidation)
+ then fGetDatasetDataValidation(Self, aConnection, lDatasetName, aParamNames, aParamValues, aSchema, allow);
+
+ if not allow
+ then raise EDADatasetNotAccessible.CreateFmt(err_DatasetNotAccessible, [aDatasetName]);
+
+ // Returns the actual data. Cached and non-cached data follow two different paths (some events are not triggered in the
+ // case of cached data, since we don't have an actual IDADataset to reference)
+
+ if (cachedentry<>NIL) then begin
+ if Assigned(fOnGetCachedDataset) then fOnGetCachedDataset(Self, lDatasetName, cachedentry.Data);
+
+ result := cachedentry.RecordCount;
+ Stream.CopyFrom(cachedentry.Data, 0);
+ end
+ else begin
+
+ if TriggerTransactionEvent(fOnUpdateDataBeginTransaction) then Connection.BeginTransaction;
+ try
+
+ // Gets a reference to the dataset if it couldn't find a datatable to match the request...
+ if (ref=NIL) then
+ ds := aSchema.NewDataset(aConnection, lDatasetName);
+
+ // Fills the parameters (if any are specified)
+ cnt := Length(aParamNames);
+ if (cnt>0) then begin
+ for i := 0 to (cnt-1) do begin
+ paramname := aParamNames[i];
+ paramvalue := aParamValues[i];
+
+ ds.ParamByName(paramname).Value := paramvalue;
+ end;
+ end;
+
+ // Applies the UserFilter, if any specified
+ if (Trim(lUserFilter)<>'') then begin
+ if not AllowWhereSQL then
+ raise Exception.Create('Passing of clear text WHERE clauses has been disabled (GetData)');
+ ds.Where.AddText(lUserFilter);
+ end;
+
+ // ...and writes the data fireing the right events
+ if inclschema and Assigned(fOnBeforeGetDatasetSchema) then fOnBeforeGetDatasetSchema(ds);
+ if inclrows and Assigned(fOnBeforeGetDatasetData) then fOnBeforeGetDatasetData(ds, inclschema, MaxRecords);
+
+ result := anAdapter.WriteDataset(stream, ds, someOptions, MaxRecords);
+
+ if inclschema and Assigned(fOnAfterGetDatasetSchema) then fOnAfterGetDatasetSchema(ds);
+ if inclrows and Assigned(fOnAfterGetDatasetData) then fOnAfterGetDatasetData(ds, inclschema, MaxRecords);
+
+ if Connection.InTransaction and TriggerTransactionEvent(fOnUpdateDataCommitTransaction) then Connection.CommitTransaction;
+ except
+ if Connection.InTransaction and TriggerTransactionEvent(fOnUpdateDataRollBackTransaction) then Connection.RollbackTransaction;
+ raise;
+ end;
+
+ // Checks if it needs to stored it in the cache
+ if (fCache<>NIL) then begin
+ cacheelement := fCacheElements.FindByDatasetName(lDatasetName);
+ if (cacheelement=NIL) or not cacheelement.Enabled then Exit;
+
+ fCache.Store(Self.Name+'.'+lDatasetName, stream, TRUE, result, cacheelement.MaxReads, cacheelement.Duration);
+ end;
+
+ end;
+end;
+
+function TDARemoteService.GetDatasetSchema(
+ const aDatasetName: AnsiString): Binary;
+var tempds : IDADataset;
+ schemads : TDADataset;
+ dummyrefs : TObjectList;
+ lDatasetName: string;
+begin
+ dummyrefs := NIL;
+
+ CheckObjects(Connection, ServiceSchema, ServiceAdapter);
+
+ result := Binary.Create;
+ try
+ try
+ // New: merges the data tables references by the service
+ if (fExportedDataTables.Count>0) then begin
+ dummyrefs := TObjectList.Create;
+ MergeDatatablesToSchema(dummyrefs);
+ end;
+
+ lDatasetName := {$IFDEF UNICODE}Utf8ToAnsi{$ENDIF}(aDatasetName);
+ // Improved this method: now it is not necessary to have statements associated to a dataset
+ // thus allowing for the definition of in memory datasets inside a schema
+ schemads := ServiceSchema.Datasets.DatasetByName(lDatasetName);
+ tempds := Connection.NewDataset('', lDatasetName);
+
+ // Copies the schema
+ tempds.Fields.AssignFieldCollection(schemads.Fields);
+ tempds.Params.AssignParamCollection(schemads.Params);
+
+ ServiceAdapter.WriteDataset(result, tempds, [woSchema], 0);
+ except
+ FreeAndNIL(result);
+ raise;
+ end;
+ finally
+ dummyrefs.Free;
+ end;
+end;
+
+type
+ TBizProcessorReference = class(TObject)
+ private
+ end;
+
+function TDARemoteService.UnpackDeltas(const DeltaStream: Binary;
+ DeltaStructList : TDADeltaStructList): integer;
+var x, i: integer;
+ deltaname: string;
+ bizproc: TDABusinessProcessor;
+ details : TDADatasetRelationshipList;
+ found: boolean;
+ struct : TDADeltaStruct;
+begin
+ result := 0;
+ with ServiceAdapter do begin
+
+ // Reads the deltas.
+ Initialize(DeltaStream, aiReadFromBeginning);
+ try
+ if (DeltaCount = 0) then Exit;
+
+ for i := 0 to (DeltaCount - 1) do begin
+ deltaname := DeltaNames[i];
+ found := FALSE;
+
+ { Tries to locate a user-defined business processor }
+ for x := 0 to (Self.ComponentCount - 1) do
+ if (Self.Components[x] is TDABusinessProcessor) then begin
+ bizproc := TDABusinessProcessor(Self.Components[x]);
+ if SameText(bizproc.ReferencedDataset, deltaname) then begin
+ struct := DeltaStructList.Add(NewDelta(deltaname), bizproc);
+ ReadDelta(deltaname, struct.Delta);
+
+ found := TRUE;
+ Break;
+ end;
+ end;
+
+ { Either creates one or aborts raising an exception }
+ if not found then begin
+ if not AutoCreateBusinessProcessors then RaiseError(err_DARDMCannotFindProxessorForDelta, [deltaname]);
+
+ bizproc := TDABusinessProcessor.Create(Self);
+ bizproc.ReferencedDataset := deltaname;
+ bizproc.Schema := ServiceSchema;
+
+ struct := DeltaStructList.Add(NewDelta(deltaname), bizproc);
+ ReadDelta(deltaname, struct.Delta);
+
+ if Assigned(fOnBusinessProcessorAutoCreated)
+ then fOnBusinessProcessorAutoCreated(Self, bizproc);
+ end;
+
+ Inc(result);
+ end;
+
+ if (result=0) then Exit; // Cannot process anything!
+
+ { Sets the master/detail relationships }
+ with ServiceSchema do
+ if (RelationShips.Count>0) then begin
+ details := TDADatasetRelationshipList.Create;
+ try
+
+ for i := 0 to DeltaStructList.Count-1 do begin
+ RelationShips.GetDetails(DeltaStructList[i].BusinessProcessor.ReferencedDataset, details);
+ if (details.Count=0) then Continue;
+
+ { Prepares an array with the references to the detail deltas that will be used later on to adjust
+ autoincs, etc. }
+ for x := 0 to details.Count-1 do begin
+ struct := DeltaStructList.FindStruct(details[x].DetailDatasetName);
+ if (struct<>NIL) then begin
+ DeltaStructList[i].DetailDeltas.Add(struct.Delta);
+ DeltaStructList[i].RelationShips.Add(details[x]);
+ end;
+ end;
+ end;
+ finally
+ details.Free;
+ end;
+
+ end;
+ finally
+ Finalize;
+ end;
+ end;
+end;
+
+function TDARemoteService.UpdateData(const Delta: Binary): Binary;
+var
+ deltastructs : TDADeltaStructList;
+ struct : TDADeltaStruct;
+ k, i: integer;
+ doraise : boolean;
+ processeddeltas : TStringList;
+
+ function ProceedDefaultTransactionLogic(aEvent: TDAUpdateDataTransactionEvent): Boolean;
+ begin
+ Result := True;
+ if Assigned(aEvent)
+ then aEvent(Self, Result);
+ end;
+
+ procedure FlushCache(const aDatasetName : string);
+ var element : TDACacheElement;
+ begin
+ if (fCache=NIL) or (fCacheElements.Count=0) then Exit;
+
+ element := fCacheElements.FindByDatasetName(aDatasetName);
+ if (element=NIL) then Exit;
+
+ if (ceoFlushOnUpdate in element.Options)
+ then fCache.Flush(Self.Name+'.'+aDatasetName);
+ end;
+
+begin
+ result := NIL;
+ processeddeltas := NIL;
+
+ CheckObjects(Connection, ServiceSchema, ServiceAdapter);
+
+ deltastructs := TDADeltaStructList.Create;
+
+ with ServiceAdapter do try
+ try
+ // Reads the deltas. The order in which the are put in the stream indicates
+ // the order in which updates are being made
+ if not (UnpackDeltas(Delta, deltastructs)>0) then Exit;
+
+ // Applies the updates
+ if ProceedDefaultTransactionLogic(fOnUpdateDataBeginTransaction)
+ then Connection.BeginTransaction;
+
+ if Assigned(fOnBeforeProcessDeltas) then fOnBeforeProcessDeltas(Self, deltastructs);
+
+ if (ServiceSchema.UpdateRules.Count=0) and (rsoProcessDeltasWithoutUpdateRules in Options) then begin
+ // Processes them in order, from first to last delta sent
+ for i := 0 to deltastructs.Count-1 do begin
+ // Flushes the cache for the given dataset
+ FlushCache(deltastructs[i].Delta.LogicalName);
+
+ deltastructs[i].BusinessProcessor.ProcessDelta(Connection, deltastructs[i].Delta, AllChanges);
+ end;
+ end
+ else try
+ processeddeltas := TStringList.Create;
+
+ for i := 0 to (ServiceSchema.UpdateRules.Count-1) do begin
+ // Processes them in the order defined in the schema
+ struct := deltastructs.FindStruct(ServiceSchema.UpdateRules[i].DatasetName);
+ if (struct<>NIL) then begin
+ // Adds the dataset name to the list of processed deltas. Those that don't have update rules will be processed later
+ processeddeltas.Add(struct.Delta.LogicalName);
+
+ // Flushes the cache for the given dataset
+ FlushCache(struct.Delta.LogicalName);
+
+ // Processes the delta
+ struct.BusinessProcessor.ProcessDelta(Connection, struct.Delta, ServiceSchema.UpdateRules[i].ChangeTypes);
+
+
+ if (ctInsert in ServiceSchema.UpdateRules[i].ChangeTypes) then begin
+ for k := 0 to (struct.DetailDeltas.Count-1) do
+ struct.BusinessProcessor.SynchronizeAutoIncs(struct.Delta, struct.DetailDeltas[k], struct.RelationShips[k]);
+ end;
+ end;
+ end;
+
+ // Processes the deltas for which update rules were not defined
+ if (rsoProcessDeltasWithoutUpdateRules in Options) then begin
+ for i := 0 to deltastructs.Count-1 do begin
+ // Skips if already processed
+ if (processeddeltas.IndexOf(deltastructs[i].Delta.LogicalName)>=0) then Continue;
+
+ // Flushes the cache for the given dataset
+ FlushCache(deltastructs[i].Delta.LogicalName);
+
+ deltastructs[i].BusinessProcessor.ProcessDelta(Connection, deltastructs[i].Delta, AllChanges);
+ end;
+ end;
+
+ finally
+ processeddeltas.Free;
+ end;
+
+ if Assigned(fOnAfterProcessDeltas) then fOnAfterProcessDeltas(Self, deltastructs);
+
+ if Connection.InTransaction and ProceedDefaultTransactionLogic(fOnUpdateDataCommitTransaction)
+ then Connection.CommitTransaction;
+
+ // Prepares the response
+ result := Binary.Create;
+ ServiceAdapter.Initialize(result, aiWrite);
+ try
+ for i := 0 to deltastructs.Count-1 do
+ WriteDelta(deltastructs[i].Delta);
+ finally
+ ServiceAdapter.Finalize;
+ end;
+
+ except
+ on E:Exception do begin
+ doraise := TRUE;
+ try
+ if Assigned(fOnProcessDeltasError)
+ then fOnProcessDeltasError(Self, deltastructs, E, doraise);
+ finally
+ if Connection.InTransaction and ProceedDefaultTransactionLogic(fOnUpdateDataRollBackTransaction)
+ then Connection.RollbackTransaction;
+ end;
+ if doraise then raise;
+ end;
+ end;
+ finally
+ deltastructs.Free;
+ end;
+end;
+
+function TDARemoteService.ExecuteSQLCommand(const SQL: AnsiString): Integer;
+begin
+ if not AllowExecuteSQLCommand then
+ RaiseError(err_ExecuteSQLCommandNotAllowed);
+
+ CheckObjects(Connection, ServiceSchema, NIL, TRUE, TRUE, FALSE);
+
+ if TriggerTransactionEvent(fOnUpdateDataBeginTransaction) then Connection.BeginTransaction;
+ try
+ result := Connection.NewCommand({$IFDEF UNICODE}Utf8ToAnsi{$ENDIF}(SQL), stSQL).Execute;
+ if Connection.InTransaction and TriggerTransactionEvent(fOnUpdateDataCommitTransaction) then Connection.CommitTransaction;
+ except
+ if Connection.InTransaction and TriggerTransactionEvent(fOnUpdateDataRollBackTransaction) then Connection.RollbackTransaction;
+ raise;
+ end;
+end;
+
+function TDARemoteService.GetDatasetData(const DatasetName: AnsiString; const Params: AnsiString;
+ const IncludeSchema: Boolean; const MaxRecords: Integer): Binary;
+var
+ parnames: array of string;
+ parvalues: array of Variant;
+ options: TDAWriteOptions;
+ pars: TStringList;
+ i : integer;
+begin
+ pars := TStringList.Create;
+ result := Binary.Create;
+ try
+ try
+ pars.Text := {$IFDEF UNICODE}Utf8ToAnsi{$ENDIF}(Params);
+ SetLength(parnames, pars.Count);
+ SetLength(parvalues, pars.Count);
+ for i := 0 to (pars.Count-1) do begin
+ parnames[i] := pars.Names[i];
+ parvalues[i] := pars.Values[pars.Names[i]];
+ end;
+
+ if IncludeSchema
+ then options := [woSchema, woRows]
+ else options := [woRows];
+
+ DoGetDatasetData(result, Connection, DatasetName, parnames, parvalues, '', ServiceSchema, ServiceAdapter, options, MaxRecords);
+ except
+ FreeAndNIL(result);
+ raise;
+ end;
+ finally
+ pars.Free;
+ end;
+end;
+
+function TDARemoteService.CreateParamString(
+ const ParamNames: array of string;
+ const ParamValues: array of Variant): string;
+var
+ i: integer;
+begin
+ result := '';
+
+ for i := 0 to High(ParamNames) do
+ result := result + ParamNames[i] + '=' + VarToStr(ParamValues[i]) + #13;
+end;
+
+function TDARemoteService.GetDatasetData(const DatasetName: ansistring;
+ const ParamNames: array of string; const ParamValues: array of Variant;
+ const IncludeSchema: Boolean; const MaxRecords: Integer): Binary;
+var
+ options: TDAWriteOptions;
+begin
+ {result := GetDatasetData(DatasetName, CreateParamString(ParamNames, ParamValues), IncludeSchema, MaxRecords);}
+ result := Binary.Create;
+ try
+ if IncludeSchema
+ then options := [woSchema, woRows]
+ else options := [woRows];
+ DoGetDatasetData(result, Connection, DatasetName, ParamNames, ParamValues, '', ServiceSchema, ServiceAdapter, options, MaxRecords);
+ except
+ FreeAndNIL(result);
+ raise;
+ end;
+end;
+
+function TDARemoteService.GetDatasetData(const DatasetName: ansistring;
+ const IncludeSchema: Boolean = FALSE;
+ const MaxRecords: Integer = -1): Binary;
+begin
+ result := GetDatasetData(DatasetName, '', IncludeSchema, MaxRecords);
+end;
+
+procedure TDARemoteService.MergeDatatablesToSchema(aList : TList);
+var i : integer;
+ ref : TDADataset;
+ dt : IDADataset;
+begin
+ if (fExportedDataTables.Count>0) then begin
+ for i := 0 to fExportedDataTables.Count-1 do
+ if fExportedDataTables[i].IsValidReference {and fExportedDataTables[i].ExportAsPartOfSchema} then begin
+ dt := fExportedDataTables[i].Dataset;
+
+ ref := ServiceSchema.Datasets.Add;
+ ref.Name := dt.LogicalName;
+ ref.Fields.AssignFieldCollection(dt.Fields);
+ ref.Params.AssignParamCollection(dt.Params);
+
+ aList.Add(ref);
+ end;
+ end;
+end;
+
+function TDARemoteService.GetSchemaAsXML: AnsiString;
+var xml : TStringStream;
+ dummyrefs : TObjectList;
+begin
+ result := '';
+ dummyrefs := NIL;
+
+ if not Assigned(ServiceSchema) then Exit;
+
+ try
+ // New: merges the data tables references by the service
+ if (fExportedDataTables.Count>0) then begin
+ dummyrefs := TObjectList.Create;
+ MergeDatatablesToSchema(dummyrefs);
+ end;
+
+ // Returns the schema
+ xml := TStringStream.Create('');
+ try
+ ServiceSchema.SaveToStream(xml);
+
+ result := {$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(xml.DataString);
+
+ if Assigned(fOnGetSchemaAsXML)
+ then fOnGetSchemaAsXML(Self, result);
+ finally
+ xml.Free;
+ end;
+
+ finally
+ dummyrefs.Free; // automatically removes the datatables from the schema again
+ end;
+end;
+
+function TDARemoteService.GetDatasetDataEx(const DatasetName: AnsiString;
+ const Params: TDADatasetParamArray;
+ const UserFilter: AnsiString;
+ const IncludeSchema: Boolean;
+ const MaxRecords: Integer): Binary;
+var parnames : array of string;
+ parvalues : array of variant;
+ i : integer;
+ options : TDAWriteOptions;
+begin
+ result := Binary.Create;
+ try
+ { Prepares the parameter arrays}
+ if (Params<>NIL) then begin
+ SetLength(parnames, Params.Count);
+ SetLength(parvalues, Params.Count);
+ for i := 0 to (Params.Count-1) do begin
+ parnames[i] := {$IFDEF UNICODE}Utf8ToAnsi{$ENDIF}(Params[i].Name);
+ parvalues[i] := Params[i].Value;
+ end;
+ end
+ else begin
+ SetLength(parnames, 0);
+ SetLength(parvalues, 0);
+ end;
+
+ { Other options }
+ if IncludeSchema
+ then options := [woSchema, woRows]
+ else options := [woRows];
+
+ { Reads the data }
+ DoGetDatasetData(result, Connection, DatasetName, parnames, parvalues, UserFilter, ServiceSchema, ServiceAdapter, options, MaxRecords);
+ except
+ FreeAndNIL(result);
+ raise;
+ end;
+end;
+
+function TDARemoteService.GetMultipleDatasets(const DatasetRequestInfoArray: TDADatasetRequestInfoArray): TROBinaryMemoryStream;
+var i : integer;
+ ds : IDADataset;
+ parnames : array of string;
+ parvalues : array of variant;
+ x : integer;
+ opt : TDAWriteOptions;
+ allow : boolean;
+ lDatasetName: string;
+begin
+ result := NIL;
+ if (DatasetRequestInfoArray=NIL) or (DatasetRequestInfoArray.Count=0) then exit;
+ result := Binary.Create;
+ try
+ ServiceAdapter.Initialize(result, aiWrite);
+ try
+
+ for i := 0 to (DatasetRequestInfoArray.Count-1) do begin
+ with DatasetRequestInfoArray[i] do begin
+ SetLength(parnames, Params.Count);
+ SetLength(parvalues, Params.Count);
+ for x := 0 to (Params.Count-1) do begin
+ parnames[x] := {$IFDEF UNICODE}Utf8ToAnsi{$ENDIF}(Params[x].Name);
+ parvalues[x] := Params[x].Value;
+ end;
+ lDatasetName := {$IFDEF UNICODE}Utf8ToAnsi{$ENDIF}(DatasetName);
+ opt := [woRows];
+ if DatasetRequestInfoArray[i].IncludeSchema then opt := opt+[woSchema];
+
+ // Security check
+ allow := TRUE;
+ if Assigned(fGetDatasetDataValidation)
+ then fGetDatasetDataValidation(Self, Connection, lDatasetName, parnames, parvalues, ServiceSchema, allow);
+
+ if not allow
+ then raise EDADatasetNotAccessible.CreateFmt(err_DatasetNotAccessible, [lDatasetName]);
+
+ // Proceeds
+ ds := ServiceSchema.NewDataset(Connection, lDatasetName, parnames, parvalues, TRUE);
+
+ ServiceAdapter.WriteDataset(ds, opt, MaxRecords);
+ end;
+ end;
+ finally
+ ServiceAdapter.Finalize();
+ end;
+ except
+ FreeAndNIL(result);
+ raise
+ end;
+end;
+
+function TDARemoteService.GetDatasetScripts(const DatasetNames: AnsiString): AnsiString;
+var names : TStringList;
+ i : integer;
+ ds : TDADataset;
+begin
+ result := '';
+ names := TStringList.Create;
+ try
+ CheckObjects(NIL, fServiceSchema, NIL, FALSE, TRUE, FALSE);
+ names.CommaText := {$IFDEF UNICODE}Utf8ToAnsi{$ENDIF}(DatasetNames);
+
+ result := '';
+
+ for i := 0 to (names.Count-1) do begin
+ ds := fServiceSchema.Datasets.DatasetByName(names[i]);
+
+ result := result+ {$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(
+ Format('<%s Language="%s">%s>', [
+ names[i],
+ GetEnumName(TypeInfo(TROSEScriptLanguage), Ord(ds.BusinessRulesClient.ScriptLanguage)),
+ UTF8Encode(ds.BusinessRulesClient.Script),
+ names[i]]));
+ end;
+
+ result := result+AnsiString(' ');
+ finally
+ FreeAndNIL(names);
+ end;
+end;
+
+function TDARemoteService.ExecuteSQLCommandEx(const CommandName: AnsiString;
+ const Params: TDADatasetParamArray): Integer;
+var cmd : IDASQLCommand;
+ i : integer;
+begin
+ if not AllowExecuteSQLCommand then
+ RaiseError(err_ExecuteSQLCommandNotAllowed);
+
+ CheckObjects(Connection, ServiceSchema, NIL, TRUE, TRUE, FALSE);
+
+ cmd := ServiceSchema.NewCommand(Connection, {$IFDEF UNICODE}Utf8ToAnsi{$ENDIF}(CommandName));
+ for i := 0 to (Params.Count-1) do
+ cmd.ParamByName({$IFDEF UNICODE}Utf8ToAnsi{$ENDIF}(Params[i].Name)).Value := Params[i].Value;
+
+ if Assigned(fOnBeforeExecuteCommand)
+ then fOnBeforeExecuteCommand(Self, cmd);
+
+ if TriggerTransactionEvent(fOnUpdateDataBeginTransaction) then Connection.BeginTransaction;
+ try
+ result := cmd.Execute;
+ if Connection.InTransaction and TriggerTransactionEvent(fOnUpdateDataCommitTransaction) then Connection.CommitTransaction;
+ except
+ if Connection.InTransaction and TriggerTransactionEvent(fOnUpdateDataRollBackTransaction) then Connection.RollbackTransaction;
+ raise;
+ end;
+
+ if Assigned(fOnAfterExecuteCommand)
+ then fOnAfterExecuteCommand(Self, cmd, result);
+end;
+
+procedure TDARemoteService.SetExportedDataTables(const Value: TDADataTableReferenceCollection);
+begin
+ fExportedDataTables.Assign(Value);
+end;
+
+procedure TDARemoteService.SetCache(const Value: TDACache);
+begin
+ fCache := Value;
+ if (fCache<>NIL)
+ then fCache.FreeNotification(Self);
+end;
+
+procedure TDARemoteService.SetCacheElements(
+ const Value: TDACacheElementCollection);
+begin
+ fCacheElements.Assign(Value);
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DBSessionManager Create Session Table.sql b/official/5.0.30.691/Data Abstract for Delphi/Source/DBSessionManager Create Session Table.sql
new file mode 100644
index 0000000..54f5e49
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DBSessionManager Create Session Table.sql
@@ -0,0 +1,15 @@
+CREATE TABLE [dbo].[Sessions] (
+ [SessionID] [char] (38) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
+ [Created] [datetime] NULL ,
+ [LastAccessed] [datetime] NULL ,
+ [Data] [image] NULL
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
+GO
+
+ALTER TABLE [dbo].[Sessions] WITH NOCHECK ADD
+ CONSTRAINT [PK_Sessions] PRIMARY KEY CLUSTERED
+ (
+ [SessionID]
+ ) ON [PRIMARY]
+GO
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DBSessionManager Default Schema.daConnections b/official/5.0.30.691/Data Abstract for Delphi/Source/DBSessionManager Default Schema.daConnections
new file mode 100644
index 0000000..625165d
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DBSessionManager Default Schema.daConnections
@@ -0,0 +1 @@
+ADO?AuxDriver=SQLOLEDB.1;Server=localhost;Database=Northwind;UserID=sa;Password=; True MSSQL 0 10 pbWait True 60 0 1
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DBSessionManager Default Schema.daSchema b/official/5.0.30.691/Data Abstract for Delphi/Source/DBSessionManager Default Schema.daSchema
new file mode 100644
index 0000000..32f7e13
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DBSessionManager Default Schema.daSchema
@@ -0,0 +1,30 @@
+
+Insert_Session dabtUnknown datString SessionID daptInput 38 dabtUnknown datDateTime Created daptInput 0 dabtUnknown datDateTime LastAccessed daptInput 0 dabtUnknown datBlob Data daptInput 0 MSSQL INSERT
+ INTO Sessions
+ (SessionID, Created, LastAccessed, Data)
+ VALUES
+ (:SessionID, :Created, :LastAccessed, :Data) stSQL Update_Session dabtUnknown datDateTime LastAccessed daptInput 0 dabtUnknown datBlob Data daptInput 0 dabtUnknown datString SessionID daptInput 38 MSSQL UPDATE
+ Sessions
+ SET
+ LastAccessed = :LastAccessed,
+ Data = :Data
+ WHERE
+ SessionID = :SessionID
+ stSQL ClearSessions dabtUnknown datDateTime LastAccessed daptInput 0 MSSQL DELETE
+ FROM
+ Sessions
+ WHERE
+ LastAccessed < :LastAccessed stSQL Delete_Session dabtUnknown datString SessionID daptInput 38 MSSQL DELETE
+ FROM
+ Sessions
+ WHERE
+ SessionID = :SessionID stSQL True True rslPascalScript rslPascalScript taLeftJustify dabtUnknown False datString SessionID 0 False True False False SessionID False False False 38 True GetAllSessionIDsDataset SessionID SessionID MSSQL Select SessionID from Sessions
+ stSQL True True rslPascalScript rslPascalScript taLeftJustify dabtUnknown False datInteger COLUMN1 0 False True False False COLUMN1 False False False 0 True GetSessionCount COLUMN1 COLUMN1 MSSQL SELECT
+ COUNT(*)
+ FROM
+ Sessions stSQL True True rslPascalScript rslPascalScript taLeftJustify dabtUnknown False datString SessionID 0 True True False False SessionID False False False 38 True taLeftJustify dabtUnknown False datDateTime Created 0 False True False False Created False False False 0 True taLeftJustify dabtUnknown False datDateTime LastAccessed 0 False True False False LastAccessed False False False 0 True taLeftJustify dabtUnknown False datBlob Data 0 False True False False Data False False False 0 True GetSession dabtUnknown datString SessionID daptInput 38 SessionID SessionID Created Created LastAccessed LastAccessed Data Data MSSQL SELECT
+ SessionID, Created, LastAccessed, Data
+ FROM
+ Sessions
+ WHERE
+ SessionID = :SessionID stSQL 0
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract.inc b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract.inc
new file mode 100644
index 0000000..16a6553
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract.inc
@@ -0,0 +1,25 @@
+{$INCLUDE eDefines.inc}
+{.$DEFINE STORERECID}
+{$DEFINE DataAbstract5}
+
+{$IFDEF FPC}
+ {$IFNDEF RO_FPC_MODE_SET}
+ {$MODE DELPHI}
+ {$DEFINE RO_FPC_MODE_SET}
+ {$ENDIF}
+ {$DEFINE FPC_SAFECALL_BUG}
+ {$DEFINE DA_WideMemoSupport} // support for ftWideMemo
+ {.$DEFINE ftFMTBCD_Support} // support for FMTBCD
+{$ENDIF}
+
+{$IFDEF DELPHI6UP}
+ {$DEFINE ftFMTBCD_Support} // support for FMTBCD
+{$ENDIF}
+
+
+{$IFDEF DELPHI10UP}
+ {$DEFINE DA_WideMemoSupport} // support for ftWideMemo
+{$ENDIF}
+
+// always use std methods for TDataset-compatible drivers
+{$DEFINE Drivers_CompatibilityMode}
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract3.RODL b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract3.RODL
new file mode 100644
index 0000000..d9d82c1
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract3.RODL
@@ -0,0 +1,171 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract3_Async.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract3_Async.pas
new file mode 100644
index 0000000..e823d65
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract3_Async.pas
@@ -0,0 +1,367 @@
+unit DataAbstract3_Async;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROXMLIntf, uROClasses, uROTypes, uROClientIntf, uROAsync,
+ {Project:} DataAbstract3_Intf;
+
+type
+ { IDARemoteService_Async }
+ IDARemoteService_Async = interface(IROAsyncInterface)
+ ['{F8299772-C66E-4D77-A4F9-78400662810B}']
+ procedure Invoke_GetDatasetSchema(const aDatasetName: AnsiString);
+ procedure Invoke_GetDatasetScripts(const DatasetNames: AnsiString);
+ procedure Invoke_GetDatasetData(const DatasetName: AnsiString; const Params: AnsiString; const IncludeSchema: Boolean; const MaxRecords: Integer);
+ procedure Invoke_GetDatasetDataEx(const DatasetName: AnsiString; const Params: TDADatasetParamArray; const UserFilter: AnsiString; const IncludeSchema: Boolean; const MaxRecords: Integer);
+ procedure Invoke_UpdateData(const Delta: Binary);
+ procedure Invoke_ExecuteSQLCommand(const SQL: AnsiString);
+ procedure Invoke_GetSchemaAsXML;
+ procedure Invoke_GetMultipleDatasets(const DatasetRequestInfoArray: TDADatasetRequestInfoArray);
+ procedure Invoke_ExecuteSQLCommandEx(const CommandName: AnsiString; const Params: TDADatasetParamArray);
+ function Retrieve_GetDatasetSchema: Binary;
+ function Retrieve_GetDatasetScripts: AnsiString;
+ function Retrieve_GetDatasetData: Binary;
+ function Retrieve_GetDatasetDataEx: Binary;
+ function Retrieve_UpdateData: Binary;
+ function Retrieve_ExecuteSQLCommand: Integer;
+ function Retrieve_GetSchemaAsXML: AnsiString;
+ function Retrieve_GetMultipleDatasets: Binary;
+ function Retrieve_ExecuteSQLCommandEx: Integer;
+ end;
+
+ { IDALoginService_Async }
+ IDALoginService_Async = interface(IDARemoteService_Async)
+ ['{5A9C9231-1C8D-4436-88E1-07AD23D7BEF3}']
+ procedure Invoke_Login(const UserID: AnsiString; const Password: AnsiString);
+ procedure Invoke_Logout;
+ function Retrieve_Login(out LoginInfo: TDALoginInfo): Boolean;
+ end;
+
+ { CoDARemoteService_Async }
+ CoDARemoteService_Async = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IDARemoteService_Async;
+ end;
+
+ { CoDALoginService_Async }
+ CoDALoginService_Async = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IDALoginService_Async;
+ end;
+
+ { TDARemoteService_AsyncProxy }
+ TDARemoteService_AsyncProxy = class(TROAsyncProxy, IDARemoteService_Async)
+ private
+ protected
+ function __GetInterfaceName:string; override;
+
+ procedure Invoke_GetDatasetSchema(const aDatasetName: AnsiString);
+ procedure Invoke_GetDatasetScripts(const DatasetNames: AnsiString);
+ procedure Invoke_GetDatasetData(const DatasetName: AnsiString; const Params: AnsiString; const IncludeSchema: Boolean; const MaxRecords: Integer);
+ procedure Invoke_GetDatasetDataEx(const DatasetName: AnsiString; const Params: TDADatasetParamArray; const UserFilter: AnsiString; const IncludeSchema: Boolean; const MaxRecords: Integer);
+ procedure Invoke_UpdateData(const Delta: Binary);
+ procedure Invoke_ExecuteSQLCommand(const SQL: AnsiString);
+ procedure Invoke_GetSchemaAsXML;
+ procedure Invoke_GetMultipleDatasets(const DatasetRequestInfoArray: TDADatasetRequestInfoArray);
+ procedure Invoke_ExecuteSQLCommandEx(const CommandName: AnsiString; const Params: TDADatasetParamArray);
+ function Retrieve_GetDatasetSchema: Binary;
+ function Retrieve_GetDatasetScripts: AnsiString;
+ function Retrieve_GetDatasetData: Binary;
+ function Retrieve_GetDatasetDataEx: Binary;
+ function Retrieve_UpdateData: Binary;
+ function Retrieve_ExecuteSQLCommand: Integer;
+ function Retrieve_GetSchemaAsXML: AnsiString;
+ function Retrieve_GetMultipleDatasets: Binary;
+ function Retrieve_ExecuteSQLCommandEx: Integer;
+ end;
+
+ { TDALoginService_AsyncProxy }
+ TDALoginService_AsyncProxy = class(TDARemoteService_AsyncProxy, IDALoginService_Async)
+ private
+ protected
+ function __GetInterfaceName:string; override;
+
+ procedure Invoke_Login(const UserID: AnsiString; const Password: AnsiString);
+ procedure Invoke_Logout;
+ function Retrieve_Login(out LoginInfo: TDALoginInfo): Boolean;
+ end;
+
+implementation
+
+uses
+ {vcl:} SysUtils;
+
+{ CoDARemoteService }
+
+class function CoDARemoteService_Async.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IDARemoteService_Async;
+begin
+ result := TDARemoteService_AsyncProxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TDARemoteService_AsyncProxy }
+
+function TDARemoteService_AsyncProxy.__GetInterfaceName:string;
+begin
+ result := 'DARemoteService';
+end;
+
+procedure TDARemoteService_AsyncProxy.Invoke_GetDatasetSchema(const aDatasetName: AnsiString);
+begin
+ __AssertProxyNotBusy('GetDatasetSchema');
+
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract3', __InterfaceName, 'GetDatasetSchema');
+ __Message.Write('aDatasetName', TypeInfo(AnsiString), aDatasetName, []);
+ __DispatchAsyncRequest('GetDatasetSchema',__Message);
+ __Message.UnsetAttributes(__TransportChannel);
+end;
+
+function TDARemoteService_AsyncProxy.Retrieve_GetDatasetSchema: Binary;
+var __response:TStream;
+begin
+ result := nil;
+ __response := __RetrieveAsyncResponse('GetDatasetSchema');
+ __Message.ReadFromStream(__response);
+
+ __Message.Read('Result', TypeInfo(Binary), Result, []);
+
+ __response.Free();
+end;
+
+procedure TDARemoteService_AsyncProxy.Invoke_GetDatasetScripts(const DatasetNames: AnsiString);
+begin
+ __AssertProxyNotBusy('GetDatasetScripts');
+
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract3', __InterfaceName, 'GetDatasetScripts');
+ __Message.Write('DatasetNames', TypeInfo(AnsiString), DatasetNames, []);
+ __DispatchAsyncRequest('GetDatasetScripts',__Message);
+ __Message.UnsetAttributes(__TransportChannel);
+end;
+
+function TDARemoteService_AsyncProxy.Retrieve_GetDatasetScripts: AnsiString;
+var __response:TStream;
+begin
+ __response := __RetrieveAsyncResponse('GetDatasetScripts');
+ __Message.ReadFromStream(__response);
+
+ __Message.Read('Result', TypeInfo(AnsiString), Result, []);
+
+ __response.Free();
+end;
+
+procedure TDARemoteService_AsyncProxy.Invoke_GetDatasetData(const DatasetName: AnsiString; const Params: AnsiString; const IncludeSchema: Boolean; const MaxRecords: Integer);
+begin
+ __AssertProxyNotBusy('GetDatasetData');
+
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract3', __InterfaceName, 'GetDatasetData');
+ __Message.Write('DatasetName', TypeInfo(AnsiString), DatasetName, []);
+ __Message.Write('Params', TypeInfo(AnsiString), Params, []);
+ __Message.Write('IncludeSchema', TypeInfo(Boolean), IncludeSchema, []);
+ __Message.Write('MaxRecords', TypeInfo(Integer), MaxRecords, []);
+ __DispatchAsyncRequest('GetDatasetData',__Message);
+ __Message.UnsetAttributes(__TransportChannel);
+end;
+
+function TDARemoteService_AsyncProxy.Retrieve_GetDatasetData: Binary;
+var __response:TStream;
+begin
+ result := nil;
+ __response := __RetrieveAsyncResponse('GetDatasetData');
+ __Message.ReadFromStream(__response);
+
+ __Message.Read('Result', TypeInfo(Binary), Result, []);
+
+ __response.Free();
+end;
+
+procedure TDARemoteService_AsyncProxy.Invoke_GetDatasetDataEx(const DatasetName: AnsiString; const Params: TDADatasetParamArray; const UserFilter: AnsiString; const IncludeSchema: Boolean; const MaxRecords: Integer);
+begin
+ __AssertProxyNotBusy('GetDatasetDataEx');
+
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract3', __InterfaceName, 'GetDatasetDataEx');
+ __Message.Write('DatasetName', TypeInfo(AnsiString), DatasetName, []);
+ __Message.Write('Params', TypeInfo(TDADatasetParamArray), Params, []);
+ __Message.Write('UserFilter', TypeInfo(AnsiString), UserFilter, []);
+ __Message.Write('IncludeSchema', TypeInfo(Boolean), IncludeSchema, []);
+ __Message.Write('MaxRecords', TypeInfo(Integer), MaxRecords, []);
+ __DispatchAsyncRequest('GetDatasetDataEx',__Message);
+ __Message.UnsetAttributes(__TransportChannel);
+end;
+
+function TDARemoteService_AsyncProxy.Retrieve_GetDatasetDataEx: Binary;
+var __response:TStream;
+begin
+ result := nil;
+ __response := __RetrieveAsyncResponse('GetDatasetDataEx');
+ __Message.ReadFromStream(__response);
+
+ __Message.Read('Result', TypeInfo(Binary), Result, []);
+
+ __response.Free();
+end;
+
+procedure TDARemoteService_AsyncProxy.Invoke_UpdateData(const Delta: Binary);
+begin
+ __AssertProxyNotBusy('UpdateData');
+
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract3', __InterfaceName, 'UpdateData');
+ __Message.Write('Delta', TypeInfo(Binary), Delta, []);
+ __DispatchAsyncRequest('UpdateData',__Message);
+ __Message.UnsetAttributes(__TransportChannel);
+end;
+
+function TDARemoteService_AsyncProxy.Retrieve_UpdateData: Binary;
+var __response:TStream;
+begin
+ result := nil;
+ __response := __RetrieveAsyncResponse('UpdateData');
+ __Message.ReadFromStream(__response);
+
+ __Message.Read('Result', TypeInfo(Binary), Result, []);
+
+ __response.Free();
+end;
+
+procedure TDARemoteService_AsyncProxy.Invoke_ExecuteSQLCommand(const SQL: AnsiString);
+begin
+ __AssertProxyNotBusy('ExecuteSQLCommand');
+
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract3', __InterfaceName, 'ExecuteSQLCommand');
+ __Message.Write('SQL', TypeInfo(AnsiString), SQL, []);
+ __DispatchAsyncRequest('ExecuteSQLCommand',__Message);
+ __Message.UnsetAttributes(__TransportChannel);
+end;
+
+function TDARemoteService_AsyncProxy.Retrieve_ExecuteSQLCommand: Integer;
+var __response:TStream;
+begin
+ __response := __RetrieveAsyncResponse('ExecuteSQLCommand');
+ __Message.ReadFromStream(__response);
+
+ __Message.Read('Result', TypeInfo(Integer), Result, []);
+
+ __response.Free();
+end;
+
+procedure TDARemoteService_AsyncProxy.Invoke_GetSchemaAsXML;
+begin
+ __AssertProxyNotBusy('GetSchemaAsXML');
+
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract3', __InterfaceName, 'GetSchemaAsXML');
+ __DispatchAsyncRequest('GetSchemaAsXML',__Message);
+end;
+
+function TDARemoteService_AsyncProxy.Retrieve_GetSchemaAsXML: AnsiString;
+var __response:TStream;
+begin
+ __response := __RetrieveAsyncResponse('GetSchemaAsXML');
+ __Message.ReadFromStream(__response);
+
+ __Message.Read('Result', TypeInfo(AnsiString), Result, []);
+
+ __response.Free();
+end;
+
+procedure TDARemoteService_AsyncProxy.Invoke_GetMultipleDatasets(const DatasetRequestInfoArray: TDADatasetRequestInfoArray);
+begin
+ __AssertProxyNotBusy('GetMultipleDatasets');
+
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract3', __InterfaceName, 'GetMultipleDatasets');
+ __Message.Write('DatasetRequestInfoArray', TypeInfo(TDADatasetRequestInfoArray), DatasetRequestInfoArray, []);
+ __DispatchAsyncRequest('GetMultipleDatasets',__Message);
+ __Message.UnsetAttributes(__TransportChannel);
+end;
+
+function TDARemoteService_AsyncProxy.Retrieve_GetMultipleDatasets: Binary;
+var __response:TStream;
+begin
+ result := nil;
+ __response := __RetrieveAsyncResponse('GetMultipleDatasets');
+ __Message.ReadFromStream(__response);
+
+ __Message.Read('Result', TypeInfo(Binary), Result, []);
+
+ __response.Free();
+end;
+
+procedure TDARemoteService_AsyncProxy.Invoke_ExecuteSQLCommandEx(const CommandName: AnsiString; const Params: TDADatasetParamArray);
+begin
+ __AssertProxyNotBusy('ExecuteSQLCommandEx');
+
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract3', __InterfaceName, 'ExecuteSQLCommandEx');
+ __Message.Write('CommandName', TypeInfo(AnsiString), CommandName, []);
+ __Message.Write('Params', TypeInfo(TDADatasetParamArray), Params, []);
+ __DispatchAsyncRequest('ExecuteSQLCommandEx',__Message);
+ __Message.UnsetAttributes(__TransportChannel);
+end;
+
+function TDARemoteService_AsyncProxy.Retrieve_ExecuteSQLCommandEx: Integer;
+var __response:TStream;
+begin
+ __response := __RetrieveAsyncResponse('ExecuteSQLCommandEx');
+ __Message.ReadFromStream(__response);
+
+ __Message.Read('Result', TypeInfo(Integer), Result, []);
+
+ __response.Free();
+end;
+
+
+{ CoDALoginService }
+
+class function CoDALoginService_Async.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IDALoginService_Async;
+begin
+ result := TDALoginService_AsyncProxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TDALoginService_AsyncProxy }
+
+function TDALoginService_AsyncProxy.__GetInterfaceName:string;
+begin
+ result := 'DALoginService';
+end;
+
+procedure TDALoginService_AsyncProxy.Invoke_Login(const UserID: AnsiString; const Password: AnsiString);
+begin
+ __AssertProxyNotBusy('Login');
+
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract3', __InterfaceName, 'Login');
+ __Message.Write('UserID', TypeInfo(AnsiString), UserID, []);
+ __Message.Write('Password', TypeInfo(AnsiString), Password, []);
+ __DispatchAsyncRequest('Login',__Message);
+ __Message.UnsetAttributes(__TransportChannel);
+end;
+
+function TDALoginService_AsyncProxy.Retrieve_Login(out LoginInfo: TDALoginInfo): Boolean;
+var __response:TStream;
+begin
+ LoginInfo := nil;
+ __response := __RetrieveAsyncResponse('Login');
+ __Message.ReadFromStream(__response);
+
+ __Message.Read('Result', TypeInfo(Boolean), Result, []);
+ __Message.Read('LoginInfo', TypeInfo(TDALoginInfo), LoginInfo, []);
+
+ __response.Free();
+end;
+
+procedure TDALoginService_AsyncProxy.Invoke_Logout;
+begin
+ __AssertProxyNotBusy('Logout');
+
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract3', __InterfaceName, 'Logout');
+ __DispatchAsyncRequest('Logout',__Message, false);
+end;
+
+
+initialization
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract3_Intf.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract3_Intf.pas
new file mode 100644
index 0000000..c1f4134
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract3_Intf.pas
@@ -0,0 +1,1367 @@
+unit DataAbstract3_Intf;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROXMLIntf, uROClasses, uROClient, uROTypes, uROClientIntf;
+
+const
+ { Library ID }
+ LibraryUID = '{2966A4BF-569C-45AA-8F34-CF1E155FD77A}';
+ TargetNamespace = '';
+
+ { Service Interface ID's }
+ IDARemoteService_IID : TGUID = '{C532E842-0AA9-4253-A9BF-AFCF22885B97}';
+ IDALoginService_IID : TGUID = '{58550AA0-B64F-495A-B2F8-C981D4C39180}';
+
+ { Event ID's }
+
+type
+ { Forward declarations }
+ IDARemoteService = interface;
+ IDALoginService = interface;
+
+ TDADatasetParamArray = class;
+ TDADatasetRequestInfoArray = class;
+ TDAStringArray = class;
+
+ TDADatasetParam = class;
+ TDADatasetRequestInfo = class;
+ TDALoginInfo = class;
+
+
+ { TDADatasetParam }
+ TDADatasetParam = class(TROComplexType)
+ private
+ fName: AnsiString;
+ fValue: Variant;
+ public
+ procedure Assign(iSource: TPersistent); override;
+ procedure ReadComplex(ASerializer: TObject); override;
+ procedure WriteComplex(ASerializer: TObject); override;
+ published
+ property Name:AnsiString read fName write fName;
+ property Value:Variant read fValue write fValue;
+ end;
+
+ { TDADatasetParamCollection }
+ TDADatasetParamCollection = class(TROCollection)
+ protected
+ constructor Create(aItemClass: TCollectionItemClass); overload;
+ function GetItems(aIndex: integer): TDADatasetParam;
+ procedure SetItems(aIndex: integer; const Value: TDADatasetParam);
+ public
+ constructor Create; overload;
+ function Add: TDADatasetParam; reintroduce;
+ procedure SaveToArray(anArray: TDADatasetParamArray);
+ procedure LoadFromArray(anArray: TDADatasetParamArray);
+ property Items[Index: integer]:TDADatasetParam read GetItems write SetItems; default;
+ end;
+
+ { TDADatasetRequestInfo }
+ TDADatasetRequestInfo = class(TROComplexType)
+ private
+ fDatasetName: AnsiString;
+ fIncludeSchema: Boolean;
+ fMaxRecords: Integer;
+ fParams: TDADatasetParamArray;
+ function GetParams: TDADatasetParamArray;
+ public
+ procedure Assign(iSource: TPersistent); override;
+ procedure ReadComplex(ASerializer: TObject); override;
+ procedure WriteComplex(ASerializer: TObject); override;
+ published
+ property DatasetName:AnsiString read fDatasetName write fDatasetName;
+ property IncludeSchema:Boolean read fIncludeSchema write fIncludeSchema;
+ property MaxRecords:Integer read fMaxRecords write fMaxRecords;
+ property Params:TDADatasetParamArray read GetParams write fParams;
+ end;
+
+ { TDADatasetRequestInfoCollection }
+ TDADatasetRequestInfoCollection = class(TROCollection)
+ protected
+ constructor Create(aItemClass: TCollectionItemClass); overload;
+ function GetItems(aIndex: integer): TDADatasetRequestInfo;
+ procedure SetItems(aIndex: integer; const Value: TDADatasetRequestInfo);
+ public
+ constructor Create; overload;
+ function Add: TDADatasetRequestInfo; reintroduce;
+ procedure SaveToArray(anArray: TDADatasetRequestInfoArray);
+ procedure LoadFromArray(anArray: TDADatasetRequestInfoArray);
+ property Items[Index: integer]:TDADatasetRequestInfo read GetItems write SetItems; default;
+ end;
+
+ { TDALoginInfo }
+ TDALoginInfo = class(TROComplexType)
+ private
+ fSessionID: AnsiString;
+ fUserID: AnsiString;
+ fPrivileges: TDAStringArray;
+ fAttributes: TDAStringArray;
+ fData: Binary;
+ function GetPrivileges: TDAStringArray;
+ function GetAttributes: TDAStringArray;
+ function GetData: Binary;
+ public
+ procedure Assign(iSource: TPersistent); override;
+ procedure ReadComplex(ASerializer: TObject); override;
+ procedure WriteComplex(ASerializer: TObject); override;
+ published
+ property SessionID:AnsiString read fSessionID write fSessionID;
+ property UserID:AnsiString read fUserID write fUserID;
+ property Privileges:TDAStringArray read GetPrivileges write fPrivileges;
+ property Attributes:TDAStringArray read GetAttributes write fAttributes;
+ property Data:Binary read GetData write fData;
+ end;
+
+ { TDALoginInfoCollection }
+ TDALoginInfoCollection = class(TROCollection)
+ protected
+ constructor Create(aItemClass: TCollectionItemClass); overload;
+ function GetItems(aIndex: integer): TDALoginInfo;
+ procedure SetItems(aIndex: integer; const Value: TDALoginInfo);
+ public
+ constructor Create; overload;
+ function Add: TDALoginInfo; reintroduce;
+ property Items[Index: integer]:TDALoginInfo read GetItems write SetItems; default;
+ end;
+
+ { TDADatasetParamArray }
+ TDADatasetParamArray_TDADatasetParam = array of TDADatasetParam;
+ TDADatasetParamArray = class(TROArray)
+ private
+ fCount: Integer;
+ fItems : TDADatasetParamArray_TDADatasetParam;
+ protected
+ procedure Grow; virtual;
+ function GetItems(aIndex: integer): TDADatasetParam;
+ procedure SetItems(aIndex: integer; const Value: TDADatasetParam);
+ function GetCount: integer; override;
+ public
+ class function GetItemType: PTypeInfo; override;
+ class function GetItemClass: TClass; override;
+ class function GetItemSize: integer; override;
+
+ function GetItemRef(aIndex: integer): pointer; override;
+ procedure SetItemRef(aIndex: integer; Ref: pointer); override;
+ procedure Clear; override;
+ procedure Delete(aIndex: integer); override;
+ procedure Resize(ElementCount: integer); override;
+
+ procedure Assign(iSource:TPersistent); override;
+ procedure ReadComplex(ASerializer: TObject); override;
+ procedure WriteComplex(ASerializer: TObject); override;
+ function Add: TDADatasetParam; overload;
+ function Add(const Value: TDADatasetParam):integer; overload;
+
+ property Count : integer read GetCount;
+ property Items[Index: integer]:TDADatasetParam read GetItems write SetItems; default;
+ property InnerArray: TDADatasetParamArray_TDADatasetParam read fItems;
+ end;
+
+ { TDADatasetRequestInfoArray }
+ TDADatasetRequestInfoArray_TDADatasetRequestInfo = array of TDADatasetRequestInfo;
+ TDADatasetRequestInfoArray = class(TROArray)
+ private
+ fCount: Integer;
+ fItems : TDADatasetRequestInfoArray_TDADatasetRequestInfo;
+ protected
+ procedure Grow; virtual;
+ function GetItems(aIndex: integer): TDADatasetRequestInfo;
+ procedure SetItems(aIndex: integer; const Value: TDADatasetRequestInfo);
+ function GetCount: integer; override;
+ public
+ class function GetItemType: PTypeInfo; override;
+ class function GetItemClass: TClass; override;
+ class function GetItemSize: integer; override;
+
+ function GetItemRef(aIndex: integer): pointer; override;
+ procedure SetItemRef(aIndex: integer; Ref: pointer); override;
+ procedure Clear; override;
+ procedure Delete(aIndex: integer); override;
+ procedure Resize(ElementCount: integer); override;
+
+ procedure Assign(iSource:TPersistent); override;
+ procedure ReadComplex(ASerializer: TObject); override;
+ procedure WriteComplex(ASerializer: TObject); override;
+ function Add: TDADatasetRequestInfo; overload;
+ function Add(const Value: TDADatasetRequestInfo):integer; overload;
+
+ property Count : integer read GetCount;
+ property Items[Index: integer]:TDADatasetRequestInfo read GetItems write SetItems; default;
+ property InnerArray: TDADatasetRequestInfoArray_TDADatasetRequestInfo read fItems;
+ end;
+
+ { TDAStringArray }
+ TDAStringArray_AnsiString = array of AnsiString;
+ TDAStringArray = class(TROArray)
+ private
+ fCount: Integer;
+ fItems : TDAStringArray_AnsiString;
+ protected
+ procedure Grow; virtual;
+ function GetItems(aIndex: integer): AnsiString;
+ procedure SetItems(aIndex: integer; const Value: AnsiString);
+ function GetCount: integer; override;
+ public
+ class function GetItemType: PTypeInfo; override;
+ class function GetItemSize: integer; override;
+
+ function GetItemRef(aIndex: integer): pointer; override;
+ procedure Clear; override;
+ procedure Delete(aIndex: integer); override;
+ procedure Resize(ElementCount: integer); override;
+
+ procedure Assign(iSource:TPersistent); override;
+ procedure ReadComplex(ASerializer: TObject); override;
+ procedure WriteComplex(ASerializer: TObject); override;
+ function Add(const Value:AnsiString): integer;
+ function GetIndex(const aPropertyName : string;
+ const aPropertyValue : Variant;
+ StartFrom : integer = 0;
+ Options : TROSearchOptions = [soIgnoreCase]) : integer; override;
+
+ property Count : integer read GetCount;
+ property Items[Index: integer]:AnsiString read GetItems write SetItems; default;
+ property InnerArray: TDAStringArray_AnsiString read fItems;
+ end;
+
+ { IDARemoteService }
+ IDARemoteService = interface
+ ['{C532E842-0AA9-4253-A9BF-AFCF22885B97}']
+ function GetDatasetSchema(const aDatasetName: AnsiString): Binary;
+ function GetDatasetScripts(const DatasetNames: AnsiString): AnsiString;
+ function GetDatasetData(const DatasetName: AnsiString; const Params: AnsiString; const IncludeSchema: Boolean; const MaxRecords: Integer): Binary;
+ function GetDatasetDataEx(const DatasetName: AnsiString; const Params: TDADatasetParamArray; const UserFilter: AnsiString; const IncludeSchema: Boolean;
+ const MaxRecords: Integer): Binary;
+ function UpdateData(const Delta: Binary): Binary;
+ function ExecuteSQLCommand(const SQL: AnsiString): Integer;
+ function GetSchemaAsXML: AnsiString;
+ function GetMultipleDatasets(const DatasetRequestInfoArray: TDADatasetRequestInfoArray): Binary;
+ function ExecuteSQLCommandEx(const CommandName: AnsiString; const Params: TDADatasetParamArray): Integer;
+ end;
+
+ { CoDARemoteService }
+ CoDARemoteService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IDARemoteService;
+ end;
+
+ { TDARemoteService_Proxy }
+ TDARemoteService_Proxy = class(TROProxy, IDARemoteService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ function GetDatasetSchema(const aDatasetName: AnsiString): Binary;
+ function GetDatasetScripts(const DatasetNames: AnsiString): AnsiString;
+ function GetDatasetData(const DatasetName: AnsiString; const Params: AnsiString; const IncludeSchema: Boolean; const MaxRecords: Integer): Binary;
+ function GetDatasetDataEx(const DatasetName: AnsiString; const Params: TDADatasetParamArray; const UserFilter: AnsiString; const IncludeSchema: Boolean;
+ const MaxRecords: Integer): Binary;
+ function UpdateData(const Delta: Binary): Binary;
+ function ExecuteSQLCommand(const SQL: AnsiString): Integer;
+ function GetSchemaAsXML: AnsiString;
+ function GetMultipleDatasets(const DatasetRequestInfoArray: TDADatasetRequestInfoArray): Binary;
+ function ExecuteSQLCommandEx(const CommandName: AnsiString; const Params: TDADatasetParamArray): Integer;
+ end;
+
+ { IDALoginService }
+ IDALoginService = interface(IDARemoteService)
+ ['{58550AA0-B64F-495A-B2F8-C981D4C39180}']
+ function Login(const UserID: AnsiString; const Password: AnsiString; out LoginInfo: TDALoginInfo): Boolean;
+ procedure Logout;
+ end;
+
+ { CoDALoginService }
+ CoDALoginService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IDALoginService;
+ end;
+
+ { TDALoginService_Proxy }
+ TDALoginService_Proxy = class(TDARemoteService_Proxy, IDALoginService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ function Login(const UserID: AnsiString; const Password: AnsiString; out LoginInfo: TDALoginInfo): Boolean;
+ procedure Logout;
+ end;
+
+implementation
+
+uses
+ {vcl:} SysUtils,
+ {RemObjects:} uROEventRepository, uROSerializer, uRORes;
+
+{ TDADatasetParamArray }
+
+procedure TDADatasetParamArray.Assign(iSource: TPersistent);
+var lSource:TDADatasetParamArray;
+ i:integer;
+begin
+ if (iSource is TDADatasetParamArray) then begin
+ lSource := TDADatasetParamArray(iSource);
+ Clear();
+ Resize(lSource.Count);
+
+ for i := 0 to Count-1 do begin
+ if Assigned(lSource.Items[i]) then begin
+ Items[i].Assign(lSource.Items[i]);
+ end;
+ end;
+ end
+ else begin
+ inherited Assign(iSource);
+ end;
+end;
+
+class function TDADatasetParamArray.GetItemType: PTypeInfo;
+begin
+ result := TypeInfo(TDADatasetParam);
+end;
+
+class function TDADatasetParamArray.GetItemClass: TClass;
+begin
+ result := TDADatasetParam;
+end;
+
+class function TDADatasetParamArray.GetItemSize: integer;
+begin
+ result := SizeOf(TDADatasetParam);
+end;
+
+function TDADatasetParamArray.GetItems(aIndex: integer): TDADatasetParam;
+begin
+ if (aIndex < 0) or (aIndex >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);
+ result := fItems[aIndex];
+end;
+
+function TDADatasetParamArray.GetItemRef(aIndex: integer): pointer;
+begin
+ if (aIndex < 0) or (aIndex >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);
+ result := fItems[aIndex];
+end;
+
+procedure TDADatasetParamArray.SetItemRef(aIndex: integer; Ref: pointer);
+begin
+ if (aIndex < 0) or (aIndex >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);
+ if Ref <> fItems[aIndex] then begin
+ if fItems[aIndex] <> nil then fItems[aIndex].Free;
+ fItems[aIndex] := Ref;
+ end;
+end;
+
+procedure TDADatasetParamArray.Clear;
+var i: integer;
+begin
+ for i := 0 to (Count-1) do fItems[i].Free();
+ SetLength(fItems, 0);
+ FCount := 0;
+end;
+
+procedure TDADatasetParamArray.Delete(aIndex: integer);
+var i: integer;
+begin
+ if (aIndex>=Count) then RaiseError(err_InvalidIndex, [aIndex]);
+
+ fItems[aIndex].Free();
+
+ if (aIndex= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);
+ if fItems[aIndex] <> Value then begin
+ fItems[aIndex].Free;
+ fItems[aIndex] := Value;
+ end;
+end;
+
+procedure TDADatasetParamArray.Resize(ElementCount: integer);
+var i: Integer;
+begin
+ if fCount = ElementCount then Exit;
+ for i := FCount -1 downto ElementCount do
+ FItems[i].Free;
+ SetLength(fItems, ElementCount);
+ for i := FCount to ElementCount -1 do
+ FItems[i] := TDADatasetParam.Create;
+ FCount := ElementCount;
+end;
+
+function TDADatasetParamArray.GetCount: integer;
+begin
+ result := FCount;
+end;
+
+procedure TDADatasetParamArray.Grow;
+var
+ Delta, Capacity: Integer;
+begin
+ Capacity := Length(fItems);
+ if Capacity > 64 then
+ Delta := Capacity div 4
+ else
+ if Capacity > 8 then
+ Delta := 16
+ else
+ Delta := 4;
+ SetLength(fItems, Capacity + Delta);
+end;
+
+function TDADatasetParamArray.Add: TDADatasetParam;
+begin
+ result := TDADatasetParam.Create;
+ Add(Result);
+end;
+
+function TDADatasetParamArray.Add(const Value:TDADatasetParam): integer;
+begin
+ Result := Count;
+ if Length(fItems) = Result then
+ Grow;
+ fItems[result] := Value;
+ Inc(fCount);
+end;
+
+procedure TDADatasetParamArray.ReadComplex(ASerializer: TObject);
+var
+ lval: TDADatasetParam;
+ i: integer;
+begin
+ for i := 0 to Count-1 do begin
+ with TROSerializer(ASerializer) do
+ ReadStruct(GetArrayElementName(GetItemType, GetItemRef(i)), TDADatasetParam, lval, i);
+ Items[i] := lval;
+ end;
+end;
+
+procedure TDADatasetParamArray.WriteComplex(ASerializer: TObject);
+var
+ i: integer;
+begin
+ for i := 0 to Count-1 do
+ with TROSerializer(ASerializer) do
+ WriteStruct(GetArrayElementName(GetItemType, GetItemRef(i)), fItems[i], TDADatasetParam, i);
+end;
+
+{ TDADatasetRequestInfoArray }
+
+procedure TDADatasetRequestInfoArray.Assign(iSource: TPersistent);
+var lSource:TDADatasetRequestInfoArray;
+ i:integer;
+begin
+ if (iSource is TDADatasetRequestInfoArray) then begin
+ lSource := TDADatasetRequestInfoArray(iSource);
+ Clear();
+ Resize(lSource.Count);
+
+ for i := 0 to Count-1 do begin
+ if Assigned(lSource.Items[i]) then begin
+ Items[i].Assign(lSource.Items[i]);
+ end;
+ end;
+ end
+ else begin
+ inherited Assign(iSource);
+ end;
+end;
+
+class function TDADatasetRequestInfoArray.GetItemType: PTypeInfo;
+begin
+ result := TypeInfo(TDADatasetRequestInfo);
+end;
+
+class function TDADatasetRequestInfoArray.GetItemClass: TClass;
+begin
+ result := TDADatasetRequestInfo;
+end;
+
+class function TDADatasetRequestInfoArray.GetItemSize: integer;
+begin
+ result := SizeOf(TDADatasetRequestInfo);
+end;
+
+function TDADatasetRequestInfoArray.GetItems(aIndex: integer): TDADatasetRequestInfo;
+begin
+ if (aIndex < 0) or (aIndex >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);
+ result := fItems[aIndex];
+end;
+
+function TDADatasetRequestInfoArray.GetItemRef(aIndex: integer): pointer;
+begin
+ if (aIndex < 0) or (aIndex >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);
+ result := fItems[aIndex];
+end;
+
+procedure TDADatasetRequestInfoArray.SetItemRef(aIndex: integer; Ref: pointer);
+begin
+ if (aIndex < 0) or (aIndex >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);
+ if Ref <> fItems[aIndex] then begin
+ if fItems[aIndex] <> nil then fItems[aIndex].Free;
+ fItems[aIndex] := Ref;
+ end;
+end;
+
+procedure TDADatasetRequestInfoArray.Clear;
+var i: integer;
+begin
+ for i := 0 to (Count-1) do fItems[i].Free();
+ SetLength(fItems, 0);
+ FCount := 0;
+end;
+
+procedure TDADatasetRequestInfoArray.Delete(aIndex: integer);
+var i: integer;
+begin
+ if (aIndex>=Count) then RaiseError(err_InvalidIndex, [aIndex]);
+
+ fItems[aIndex].Free();
+
+ if (aIndex= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);
+ if fItems[aIndex] <> Value then begin
+ fItems[aIndex].Free;
+ fItems[aIndex] := Value;
+ end;
+end;
+
+procedure TDADatasetRequestInfoArray.Resize(ElementCount: integer);
+var i: Integer;
+begin
+ if fCount = ElementCount then Exit;
+ for i := FCount -1 downto ElementCount do
+ FItems[i].Free;
+ SetLength(fItems, ElementCount);
+ for i := FCount to ElementCount -1 do
+ FItems[i] := TDADatasetRequestInfo.Create;
+ FCount := ElementCount;
+end;
+
+function TDADatasetRequestInfoArray.GetCount: integer;
+begin
+ result := FCount;
+end;
+
+procedure TDADatasetRequestInfoArray.Grow;
+var
+ Delta, Capacity: Integer;
+begin
+ Capacity := Length(fItems);
+ if Capacity > 64 then
+ Delta := Capacity div 4
+ else
+ if Capacity > 8 then
+ Delta := 16
+ else
+ Delta := 4;
+ SetLength(fItems, Capacity + Delta);
+end;
+
+function TDADatasetRequestInfoArray.Add: TDADatasetRequestInfo;
+begin
+ result := TDADatasetRequestInfo.Create;
+ Add(Result);
+end;
+
+function TDADatasetRequestInfoArray.Add(const Value:TDADatasetRequestInfo): integer;
+begin
+ Result := Count;
+ if Length(fItems) = Result then
+ Grow;
+ fItems[result] := Value;
+ Inc(fCount);
+end;
+
+procedure TDADatasetRequestInfoArray.ReadComplex(ASerializer: TObject);
+var
+ lval: TDADatasetRequestInfo;
+ i: integer;
+begin
+ for i := 0 to Count-1 do begin
+ with TROSerializer(ASerializer) do
+ ReadStruct(GetArrayElementName(GetItemType, GetItemRef(i)), TDADatasetRequestInfo, lval, i);
+ Items[i] := lval;
+ end;
+end;
+
+procedure TDADatasetRequestInfoArray.WriteComplex(ASerializer: TObject);
+var
+ i: integer;
+begin
+ for i := 0 to Count-1 do
+ with TROSerializer(ASerializer) do
+ WriteStruct(GetArrayElementName(GetItemType, GetItemRef(i)), fItems[i], TDADatasetRequestInfo, i);
+end;
+
+{ TDAStringArray }
+
+procedure TDAStringArray.Assign(iSource: TPersistent);
+var lSource:TDAStringArray;
+ i:integer;
+begin
+ if (iSource is TDAStringArray) then begin
+ lSource := TDAStringArray(iSource);
+ Clear();
+ Resize(lSource.Count);
+
+ for i := 0 to Count-1 do begin
+ Items[i] := lSource.Items[i];
+ end;
+ end
+ else begin
+ inherited Assign(iSource);
+ end;
+end;
+
+class function TDAStringArray.GetItemType: PTypeInfo;
+begin
+ result := TypeInfo(AnsiString);
+end;
+
+class function TDAStringArray.GetItemSize: integer;
+begin
+ result := SizeOf(AnsiString);
+end;
+
+function TDAStringArray.GetItems(aIndex: integer): AnsiString;
+begin
+ if (aIndex < 0) or (aIndex >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);
+ result := fItems[aIndex];
+end;
+
+function TDAStringArray.GetItemRef(aIndex: integer): pointer;
+begin
+ if (aIndex < 0) or (aIndex >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);
+ result := @fItems[aIndex];
+end;
+
+procedure TDAStringArray.Clear;
+begin
+ SetLength(fItems, 0);
+ FCount := 0;
+end;
+
+procedure TDAStringArray.Delete(aIndex: integer);
+var i: integer;
+begin
+ if (aIndex>=Count) then RaiseError(err_InvalidIndex, [aIndex]);
+
+ if (aIndex= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);
+ fItems[aIndex] := Value;
+end;
+
+procedure TDAStringArray.Resize(ElementCount: integer);
+begin
+ if fCount = ElementCount then Exit;
+ SetLength(fItems, ElementCount);
+ FCount := ElementCount;
+end;
+
+function TDAStringArray.GetCount: integer;
+begin
+ result := FCount;
+end;
+
+procedure TDAStringArray.Grow;
+var
+ Delta, Capacity: Integer;
+begin
+ Capacity := Length(fItems);
+ if Capacity > 64 then
+ Delta := Capacity div 4
+ else
+ if Capacity > 8 then
+ Delta := 16
+ else
+ Delta := 4;
+ SetLength(fItems, Capacity + Delta);
+end;
+
+function TDAStringArray.Add(const Value: AnsiString): integer;
+begin
+ Result := Count;
+ if Length(fItems) = Result then
+ Grow;
+ fItems[result] := Value;
+ Inc(fCount);
+end;
+
+function TDAStringArray.GetIndex(const aPropertyName: string;
+ const aPropertyValue: Variant; StartFrom: integer;
+ Options: TROSearchOptions): integer;
+begin
+ result := -1;
+end;
+
+procedure TDAStringArray.ReadComplex(ASerializer: TObject);
+var
+ lval: AnsiString;
+ i: integer;
+begin
+ for i := 0 to Count-1 do begin
+ with TROSerializer(ASerializer) do
+ ReadUTF8String(GetArrayElementName(GetItemType, GetItemRef(i)), lval, i);
+ Items[i] := lval;
+ end;
+end;
+
+procedure TDAStringArray.WriteComplex(ASerializer: TObject);
+var
+ i: integer;
+begin
+ for i := 0 to Count-1 do
+ with TROSerializer(ASerializer) do
+ WriteUTF8String(GetArrayElementName(GetItemType, GetItemRef(i)), fItems[i], i);
+end;
+
+{ TDADatasetParam }
+
+procedure TDADatasetParam.Assign(iSource: TPersistent);
+var lSource: DataAbstract3_Intf.TDADatasetParam;
+begin
+ inherited Assign(iSource);
+ if (iSource is DataAbstract3_Intf.TDADatasetParam) then begin
+ lSource := DataAbstract3_Intf.TDADatasetParam(iSource);
+ Name := lSource.Name;
+ Value := lSource.Value;
+ end;
+end;
+
+procedure TDADatasetParam.ReadComplex(ASerializer: TObject);
+var
+ l_Name: AnsiString;
+ l_Value: Variant;
+begin
+ if TROSerializer(ASerializer).RecordStrictOrder then begin
+ l_Name := Name;
+ TROSerializer(ASerializer).ReadUTF8String('Name', l_Name);
+ Name := l_Name;
+ l_Value := Value;
+ TROSerializer(ASerializer).ReadVariant('Value', l_Value);
+ Value := l_Value;
+ end
+ else begin
+ l_Name := Name;
+ TROSerializer(ASerializer).ReadUTF8String('Name', l_Name);
+ Name := l_Name;
+ l_Value := Value;
+ TROSerializer(ASerializer).ReadVariant('Value', l_Value);
+ Value := l_Value;
+ end;
+end;
+
+procedure TDADatasetParam.WriteComplex(ASerializer: TObject);
+var
+ l_Name: AnsiString;
+ l_Value: Variant;
+begin
+ if TROSerializer(ASerializer).RecordStrictOrder then begin
+ TROSerializer(ASerializer).ChangeClass(TDADatasetParam);
+ l_Name := Name;
+ TROSerializer(ASerializer).WriteUTF8String('Name', l_Name);
+ l_Value := Value;
+ TROSerializer(ASerializer).WriteVariant('Value', l_Value);
+ end
+ else begin
+ l_Name := Name;
+ TROSerializer(ASerializer).WriteUTF8String('Name', l_Name);
+ l_Value := Value;
+ TROSerializer(ASerializer).WriteVariant('Value', l_Value);
+ end;
+end;
+
+{ TDADatasetParamCollection }
+constructor TDADatasetParamCollection.Create;
+begin
+ inherited Create(TDADatasetParam);
+end;
+
+constructor TDADatasetParamCollection.Create(aItemClass: TCollectionItemClass);
+begin
+ inherited Create(aItemClass);
+end;
+
+function TDADatasetParamCollection.Add: TDADatasetParam;
+begin
+ result := TDADatasetParam(inherited Add);
+end;
+
+function TDADatasetParamCollection.GetItems(aIndex: integer): TDADatasetParam;
+begin
+ result := TDADatasetParam(inherited Items[aIndex]);
+end;
+
+procedure TDADatasetParamCollection.LoadFromArray(anArray: TDADatasetParamArray);
+var i : integer;
+begin
+ Clear;
+ for i := 0 to (anArray.Count-1) do
+ Add.Assign(anArray[i]);
+end;
+
+procedure TDADatasetParamCollection.SaveToArray(anArray: TDADatasetParamArray);
+var i : integer;
+begin
+ anArray.Clear;
+ anArray.Resize(Count);
+ for i := 0 to (Count-1) do begin
+ anArray[i] := TDADatasetParam.Create;
+ anArray[i].Assign(Items[i]);
+ end;
+end;
+
+procedure TDADatasetParamCollection.SetItems(aIndex: integer; const Value: TDADatasetParam);
+begin
+ TDADatasetParam(inherited Items[aIndex]).Assign(Value);
+end;
+
+{ TDADatasetRequestInfo }
+
+procedure TDADatasetRequestInfo.Assign(iSource: TPersistent);
+var lSource: DataAbstract3_Intf.TDADatasetRequestInfo;
+begin
+ inherited Assign(iSource);
+ if (iSource is DataAbstract3_Intf.TDADatasetRequestInfo) then begin
+ lSource := DataAbstract3_Intf.TDADatasetRequestInfo(iSource);
+ DatasetName := lSource.DatasetName;
+ IncludeSchema := lSource.IncludeSchema;
+ MaxRecords := lSource.MaxRecords;
+ Params.Assign(lSource.Params);
+ end;
+end;
+
+function TDADatasetRequestInfo.GetParams: TDADatasetParamArray;
+begin
+ if (fParams = nil) then fParams := TDADatasetParamArray.Create();
+ result := fParams;
+end;
+
+procedure TDADatasetRequestInfo.ReadComplex(ASerializer: TObject);
+var
+ l_DatasetName: AnsiString;
+ l_IncludeSchema: Boolean;
+ l_MaxRecords: Integer;
+ l_Params: TDADatasetParamArray;
+begin
+ if TROSerializer(ASerializer).RecordStrictOrder then begin
+ l_DatasetName := DatasetName;
+ TROSerializer(ASerializer).ReadUTF8String('DatasetName', l_DatasetName);
+ DatasetName := l_DatasetName;
+ l_IncludeSchema := IncludeSchema;
+ TROSerializer(ASerializer).ReadEnumerated('IncludeSchema',TypeInfo(boolean), l_IncludeSchema);
+ IncludeSchema := l_IncludeSchema;
+ l_MaxRecords := MaxRecords;
+ TROSerializer(ASerializer).ReadInteger('MaxRecords', otSLong, l_MaxRecords);
+ MaxRecords := l_MaxRecords;
+ l_Params := Params;
+ TROSerializer(ASerializer).ReadArray('Params', TDADatasetParamArray, l_Params);
+ if Params <> l_Params then Params.Free;
+ Params := l_Params;
+ end
+ else begin
+ l_DatasetName := DatasetName;
+ TROSerializer(ASerializer).ReadUTF8String('DatasetName', l_DatasetName);
+ DatasetName := l_DatasetName;
+ l_IncludeSchema := IncludeSchema;
+ TROSerializer(ASerializer).ReadEnumerated('IncludeSchema',TypeInfo(boolean), l_IncludeSchema);
+ IncludeSchema := l_IncludeSchema;
+ l_MaxRecords := MaxRecords;
+ TROSerializer(ASerializer).ReadInteger('MaxRecords', otSLong, l_MaxRecords);
+ MaxRecords := l_MaxRecords;
+ l_Params := Params;
+ TROSerializer(ASerializer).ReadArray('Params', TDADatasetParamArray, l_Params);
+ if Params <> l_Params then Params.Free;
+ Params := l_Params;
+ end;
+end;
+
+procedure TDADatasetRequestInfo.WriteComplex(ASerializer: TObject);
+var
+ l_DatasetName: AnsiString;
+ l_IncludeSchema: Boolean;
+ l_MaxRecords: Integer;
+ l_Params: TDADatasetParamArray;
+begin
+ if TROSerializer(ASerializer).RecordStrictOrder then begin
+ TROSerializer(ASerializer).ChangeClass(TDADatasetRequestInfo);
+ l_DatasetName := DatasetName;
+ TROSerializer(ASerializer).WriteUTF8String('DatasetName', l_DatasetName);
+ l_IncludeSchema := IncludeSchema;
+ TROSerializer(ASerializer).WriteEnumerated('IncludeSchema',TypeInfo(boolean), l_IncludeSchema);
+ l_MaxRecords := MaxRecords;
+ TROSerializer(ASerializer).WriteInteger('MaxRecords', otSLong, l_MaxRecords);
+ l_Params := Params;
+ TROSerializer(ASerializer).WriteArray('Params', l_Params, TDADatasetParamArray);
+ end
+ else begin
+ l_DatasetName := DatasetName;
+ TROSerializer(ASerializer).WriteUTF8String('DatasetName', l_DatasetName);
+ l_IncludeSchema := IncludeSchema;
+ TROSerializer(ASerializer).WriteEnumerated('IncludeSchema',TypeInfo(boolean), l_IncludeSchema);
+ l_MaxRecords := MaxRecords;
+ TROSerializer(ASerializer).WriteInteger('MaxRecords', otSLong, l_MaxRecords);
+ l_Params := Params;
+ TROSerializer(ASerializer).WriteArray('Params', l_Params, TDADatasetParamArray);
+ end;
+end;
+
+{ TDADatasetRequestInfoCollection }
+constructor TDADatasetRequestInfoCollection.Create;
+begin
+ inherited Create(TDADatasetRequestInfo);
+end;
+
+constructor TDADatasetRequestInfoCollection.Create(aItemClass: TCollectionItemClass);
+begin
+ inherited Create(aItemClass);
+end;
+
+function TDADatasetRequestInfoCollection.Add: TDADatasetRequestInfo;
+begin
+ result := TDADatasetRequestInfo(inherited Add);
+end;
+
+function TDADatasetRequestInfoCollection.GetItems(aIndex: integer): TDADatasetRequestInfo;
+begin
+ result := TDADatasetRequestInfo(inherited Items[aIndex]);
+end;
+
+procedure TDADatasetRequestInfoCollection.LoadFromArray(anArray: TDADatasetRequestInfoArray);
+var i : integer;
+begin
+ Clear;
+ for i := 0 to (anArray.Count-1) do
+ Add.Assign(anArray[i]);
+end;
+
+procedure TDADatasetRequestInfoCollection.SaveToArray(anArray: TDADatasetRequestInfoArray);
+var i : integer;
+begin
+ anArray.Clear;
+ anArray.Resize(Count);
+ for i := 0 to (Count-1) do begin
+ anArray[i] := TDADatasetRequestInfo.Create;
+ anArray[i].Assign(Items[i]);
+ end;
+end;
+
+procedure TDADatasetRequestInfoCollection.SetItems(aIndex: integer; const Value: TDADatasetRequestInfo);
+begin
+ TDADatasetRequestInfo(inherited Items[aIndex]).Assign(Value);
+end;
+
+{ TDALoginInfo }
+
+procedure TDALoginInfo.Assign(iSource: TPersistent);
+var lSource: DataAbstract3_Intf.TDALoginInfo;
+begin
+ inherited Assign(iSource);
+ if (iSource is DataAbstract3_Intf.TDALoginInfo) then begin
+ lSource := DataAbstract3_Intf.TDALoginInfo(iSource);
+ SessionID := lSource.SessionID;
+ UserID := lSource.UserID;
+ Privileges.Assign(lSource.Privileges);
+ Attributes.Assign(lSource.Attributes);
+ Data.Assign(lSource.Data);
+ end;
+end;
+
+function TDALoginInfo.GetPrivileges: TDAStringArray;
+begin
+ if (fPrivileges = nil) then fPrivileges := TDAStringArray.Create();
+ result := fPrivileges;
+end;
+
+function TDALoginInfo.GetAttributes: TDAStringArray;
+begin
+ if (fAttributes = nil) then fAttributes := TDAStringArray.Create();
+ result := fAttributes;
+end;
+
+function TDALoginInfo.GetData: Binary;
+begin
+ if (fData = nil) then fData := Binary.Create();
+ result := fData;
+end;
+
+procedure TDALoginInfo.ReadComplex(ASerializer: TObject);
+var
+ l_Attributes: TDAStringArray;
+ l_Data: Binary;
+ l_Privileges: TDAStringArray;
+ l_SessionID: AnsiString;
+ l_UserID: AnsiString;
+begin
+ if TROSerializer(ASerializer).RecordStrictOrder then begin
+ l_SessionID := SessionID;
+ TROSerializer(ASerializer).ReadUTF8String('SessionID', l_SessionID);
+ SessionID := l_SessionID;
+ l_UserID := UserID;
+ TROSerializer(ASerializer).ReadUTF8String('UserID', l_UserID);
+ UserID := l_UserID;
+ l_Privileges := Privileges;
+ TROSerializer(ASerializer).ReadArray('Privileges', TDAStringArray, l_Privileges);
+ if Privileges <> l_Privileges then Privileges.Free;
+ Privileges := l_Privileges;
+ l_Attributes := Attributes;
+ TROSerializer(ASerializer).ReadArray('Attributes', TDAStringArray, l_Attributes);
+ if Attributes <> l_Attributes then Attributes.Free;
+ Attributes := l_Attributes;
+ l_Data := Data;
+ TROSerializer(ASerializer).ReadBinary('Data', l_Data);
+ if Data <> l_Data then Data.Free;
+ Data := l_Data;
+ end
+ else begin
+ l_Attributes := Attributes;
+ TROSerializer(ASerializer).ReadArray('Attributes', TDAStringArray, l_Attributes);
+ if Attributes <> l_Attributes then Attributes.Free;
+ Attributes := l_Attributes;
+ l_Data := Data;
+ TROSerializer(ASerializer).ReadBinary('Data', l_Data);
+ if Data <> l_Data then Data.Free;
+ Data := l_Data;
+ l_Privileges := Privileges;
+ TROSerializer(ASerializer).ReadArray('Privileges', TDAStringArray, l_Privileges);
+ if Privileges <> l_Privileges then Privileges.Free;
+ Privileges := l_Privileges;
+ l_SessionID := SessionID;
+ TROSerializer(ASerializer).ReadUTF8String('SessionID', l_SessionID);
+ SessionID := l_SessionID;
+ l_UserID := UserID;
+ TROSerializer(ASerializer).ReadUTF8String('UserID', l_UserID);
+ UserID := l_UserID;
+ end;
+end;
+
+procedure TDALoginInfo.WriteComplex(ASerializer: TObject);
+var
+ l_Attributes: TDAStringArray;
+ l_Data: Binary;
+ l_Privileges: TDAStringArray;
+ l_SessionID: AnsiString;
+ l_UserID: AnsiString;
+begin
+ if TROSerializer(ASerializer).RecordStrictOrder then begin
+ TROSerializer(ASerializer).ChangeClass(TDALoginInfo);
+ l_SessionID := SessionID;
+ TROSerializer(ASerializer).WriteUTF8String('SessionID', l_SessionID);
+ l_UserID := UserID;
+ TROSerializer(ASerializer).WriteUTF8String('UserID', l_UserID);
+ l_Privileges := Privileges;
+ TROSerializer(ASerializer).WriteArray('Privileges', l_Privileges, TDAStringArray);
+ l_Attributes := Attributes;
+ TROSerializer(ASerializer).WriteArray('Attributes', l_Attributes, TDAStringArray);
+ l_Data := Data;
+ TROSerializer(ASerializer).WriteBinary('Data', l_Data);
+ end
+ else begin
+ l_Attributes := Attributes;
+ TROSerializer(ASerializer).WriteArray('Attributes', l_Attributes, TDAStringArray);
+ l_Data := Data;
+ TROSerializer(ASerializer).WriteBinary('Data', l_Data);
+ l_Privileges := Privileges;
+ TROSerializer(ASerializer).WriteArray('Privileges', l_Privileges, TDAStringArray);
+ l_SessionID := SessionID;
+ TROSerializer(ASerializer).WriteUTF8String('SessionID', l_SessionID);
+ l_UserID := UserID;
+ TROSerializer(ASerializer).WriteUTF8String('UserID', l_UserID);
+ end;
+end;
+
+{ TDALoginInfoCollection }
+constructor TDALoginInfoCollection.Create;
+begin
+ inherited Create(TDALoginInfo);
+end;
+
+constructor TDALoginInfoCollection.Create(aItemClass: TCollectionItemClass);
+begin
+ inherited Create(aItemClass);
+end;
+
+function TDALoginInfoCollection.Add: TDALoginInfo;
+begin
+ result := TDALoginInfo(inherited Add);
+end;
+
+function TDALoginInfoCollection.GetItems(aIndex: integer): TDALoginInfo;
+begin
+ result := TDALoginInfo(inherited Items[aIndex]);
+end;
+
+procedure TDALoginInfoCollection.SetItems(aIndex: integer; const Value: TDALoginInfo);
+begin
+ TDALoginInfo(inherited Items[aIndex]).Assign(Value);
+end;
+
+{ CoDARemoteService }
+
+class function CoDARemoteService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IDARemoteService;
+begin
+ result := TDARemoteService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TDARemoteService_Proxy }
+
+function TDARemoteService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'DARemoteService';
+end;
+
+function TDARemoteService_Proxy.GetDatasetSchema(const aDatasetName: AnsiString): Binary;
+begin
+ try
+ result := nil;
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract3', __InterfaceName, 'GetDatasetSchema');
+ __Message.Write('aDatasetName', TypeInfo(AnsiString), aDatasetName, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Binary), result, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+function TDARemoteService_Proxy.GetDatasetScripts(const DatasetNames: AnsiString): AnsiString;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract3', __InterfaceName, 'GetDatasetScripts');
+ __Message.Write('DatasetNames', TypeInfo(AnsiString), DatasetNames, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(AnsiString), result, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+function TDARemoteService_Proxy.GetDatasetData(const DatasetName: AnsiString; const Params: AnsiString; const IncludeSchema: Boolean; const MaxRecords: Integer): Binary;
+begin
+ try
+ result := nil;
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract3', __InterfaceName, 'GetDatasetData');
+ __Message.Write('DatasetName', TypeInfo(AnsiString), DatasetName, []);
+ __Message.Write('Params', TypeInfo(AnsiString), Params, []);
+ __Message.Write('IncludeSchema', TypeInfo(Boolean), IncludeSchema, []);
+ __Message.Write('MaxRecords', TypeInfo(Integer), MaxRecords, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Binary), result, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+function TDARemoteService_Proxy.GetDatasetDataEx(const DatasetName: AnsiString; const Params: TDADatasetParamArray; const UserFilter: AnsiString; const IncludeSchema: Boolean;
+ const MaxRecords: Integer): Binary;
+begin
+ try
+ result := nil;
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract3', __InterfaceName, 'GetDatasetDataEx');
+ __Message.Write('DatasetName', TypeInfo(AnsiString), DatasetName, []);
+ __Message.Write('Params', TypeInfo(DataAbstract3_Intf.TDADatasetParamArray), Params, []);
+ __Message.Write('UserFilter', TypeInfo(AnsiString), UserFilter, []);
+ __Message.Write('IncludeSchema', TypeInfo(Boolean), IncludeSchema, []);
+ __Message.Write('MaxRecords', TypeInfo(Integer), MaxRecords, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Binary), result, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+function TDARemoteService_Proxy.UpdateData(const Delta: Binary): Binary;
+begin
+ try
+ result := nil;
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract3', __InterfaceName, 'UpdateData');
+ __Message.Write('Delta', TypeInfo(Binary), Delta, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Binary), result, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+function TDARemoteService_Proxy.ExecuteSQLCommand(const SQL: AnsiString): Integer;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract3', __InterfaceName, 'ExecuteSQLCommand');
+ __Message.Write('SQL', TypeInfo(AnsiString), SQL, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Integer), result, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+function TDARemoteService_Proxy.GetSchemaAsXML: AnsiString;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract3', __InterfaceName, 'GetSchemaAsXML');
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(AnsiString), result, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+function TDARemoteService_Proxy.GetMultipleDatasets(const DatasetRequestInfoArray: TDADatasetRequestInfoArray): Binary;
+begin
+ try
+ result := nil;
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract3', __InterfaceName, 'GetMultipleDatasets');
+ __Message.Write('DatasetRequestInfoArray', TypeInfo(DataAbstract3_Intf.TDADatasetRequestInfoArray), DatasetRequestInfoArray, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Binary), result, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+function TDARemoteService_Proxy.ExecuteSQLCommandEx(const CommandName: AnsiString; const Params: TDADatasetParamArray): Integer;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract3', __InterfaceName, 'ExecuteSQLCommandEx');
+ __Message.Write('CommandName', TypeInfo(AnsiString), CommandName, []);
+ __Message.Write('Params', TypeInfo(DataAbstract3_Intf.TDADatasetParamArray), Params, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Integer), result, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+{ CoDALoginService }
+
+class function CoDALoginService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IDALoginService;
+begin
+ result := TDALoginService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TDALoginService_Proxy }
+
+function TDALoginService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'DALoginService';
+end;
+
+function TDALoginService_Proxy.Login(const UserID: AnsiString; const Password: AnsiString; out LoginInfo: TDALoginInfo): Boolean;
+begin
+ try
+ LoginInfo := nil;
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract3', __InterfaceName, 'Login');
+ __Message.Write('UserID', TypeInfo(AnsiString), UserID, []);
+ __Message.Write('Password', TypeInfo(AnsiString), Password, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Boolean), result, []);
+ __Message.Read('LoginInfo', TypeInfo(DataAbstract3_Intf.TDALoginInfo), LoginInfo, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+procedure TDALoginService_Proxy.Logout;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract3', __InterfaceName, 'Logout');
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+initialization
+ RegisterROClass(TDADatasetParam);
+ RegisterROClass(TDADatasetRequestInfo);
+ RegisterROClass(TDALoginInfo);
+ RegisterROClass(TDADatasetParamArray);
+ RegisterROClass(TDADatasetRequestInfoArray);
+ RegisterROClass(TDAStringArray);
+ RegisterProxyClass(IDARemoteService_IID, TDARemoteService_Proxy);
+ RegisterProxyClass(IDALoginService_IID, TDALoginService_Proxy);
+
+
+finalization
+ UnregisterROClass(TDADatasetParam);
+ UnregisterROClass(TDADatasetRequestInfo);
+ UnregisterROClass(TDALoginInfo);
+ UnregisterROClass(TDADatasetParamArray);
+ UnregisterROClass(TDADatasetRequestInfoArray);
+ UnregisterROClass(TDAStringArray);
+ UnregisterProxyClass(IDARemoteService_IID);
+ UnregisterProxyClass(IDALoginService_IID);
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract3_Invk.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract3_Invk.pas
new file mode 100644
index 0000000..9ad9018
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract3_Invk.pas
@@ -0,0 +1,365 @@
+unit DataAbstract3_Invk;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ {vcl:} Classes,
+ {RemObjects:} uROXMLIntf, uROServer, uROServerIntf, uROTypes, uROClientIntf,
+ {Generated:} DataAbstract3_Intf;
+
+type
+ TDARemoteService_Invoker = class(TROInvoker)
+ private
+ protected
+ public
+ constructor Create; override;
+ published
+ procedure Invoke_GetDatasetSchema(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_GetDatasetScripts(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_GetDatasetData(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_GetDatasetDataEx(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_UpdateData(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_ExecuteSQLCommand(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_GetSchemaAsXML(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_GetMultipleDatasets(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_ExecuteSQLCommandEx(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ end;
+
+ TDALoginService_Invoker = class(TDARemoteService_Invoker)
+ private
+ protected
+ public
+ constructor Create; override;
+ published
+ procedure Invoke_Login(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_Logout(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ end;
+
+implementation
+
+uses
+ {RemObjects:} uRORes, uROClient;
+
+{ TDARemoteService_Invoker }
+
+constructor TDARemoteService_Invoker.Create;
+begin
+ inherited Create;
+ FAbstract := True;
+end;
+
+procedure TDARemoteService_Invoker.Invoke_GetDatasetSchema(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function GetDatasetSchema(const aDatasetName: AnsiString): Binary; }
+var
+ aDatasetName: AnsiString;
+ lResult: Binary;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ lResult := nil;
+ try
+ __Message.Read('aDatasetName', TypeInfo(AnsiString), aDatasetName, []);
+
+ lResult := (__Instance as IDARemoteService).GetDatasetSchema(aDatasetName);
+
+ __Message.InitializeResponseMessage(__Transport, 'DataAbstract3', 'DARemoteService', 'GetDatasetSchemaResponse');
+ __Message.Write('Result', TypeInfo(Binary), lResult, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(lResult);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
+procedure TDARemoteService_Invoker.Invoke_GetDatasetScripts(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function GetDatasetScripts(const DatasetNames: AnsiString): AnsiString; }
+var
+ DatasetNames: AnsiString;
+ lResult: AnsiString;
+begin
+ try
+ __Message.Read('DatasetNames', TypeInfo(AnsiString), DatasetNames, []);
+
+ lResult := (__Instance as IDARemoteService).GetDatasetScripts(DatasetNames);
+
+ __Message.InitializeResponseMessage(__Transport, 'DataAbstract3', 'DARemoteService', 'GetDatasetScriptsResponse');
+ __Message.Write('Result', TypeInfo(AnsiString), lResult, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ end;
+end;
+
+procedure TDARemoteService_Invoker.Invoke_GetDatasetData(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function GetDatasetData(const DatasetName: AnsiString; const Params: AnsiString; const IncludeSchema: Boolean; const MaxRecords: Integer): Binary; }
+var
+ DatasetName: AnsiString;
+ Params: AnsiString;
+ IncludeSchema: Boolean;
+ MaxRecords: Integer;
+ lResult: Binary;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ lResult := nil;
+ try
+ __Message.Read('DatasetName', TypeInfo(AnsiString), DatasetName, []);
+ __Message.Read('Params', TypeInfo(AnsiString), Params, []);
+ __Message.Read('IncludeSchema', TypeInfo(Boolean), IncludeSchema, []);
+ __Message.Read('MaxRecords', TypeInfo(Integer), MaxRecords, []);
+
+ lResult := (__Instance as IDARemoteService).GetDatasetData(DatasetName, Params, IncludeSchema, MaxRecords);
+
+ __Message.InitializeResponseMessage(__Transport, 'DataAbstract3', 'DARemoteService', 'GetDatasetDataResponse');
+ __Message.Write('Result', TypeInfo(Binary), lResult, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(lResult);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
+procedure TDARemoteService_Invoker.Invoke_GetDatasetDataEx(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function GetDatasetDataEx(const DatasetName: AnsiString; const Params: TDADatasetParamArray; const UserFilter: AnsiString; const IncludeSchema: Boolean;
+ const MaxRecords: Integer): Binary; }
+var
+ DatasetName: AnsiString;
+ Params: DataAbstract3_Intf.TDADatasetParamArray;
+ UserFilter: AnsiString;
+ IncludeSchema: Boolean;
+ MaxRecords: Integer;
+ lResult: Binary;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ Params := nil;
+ lResult := nil;
+ try
+ __Message.Read('DatasetName', TypeInfo(AnsiString), DatasetName, []);
+ __Message.Read('Params', TypeInfo(DataAbstract3_Intf.TDADatasetParamArray), Params, []);
+ __Message.Read('UserFilter', TypeInfo(AnsiString), UserFilter, []);
+ __Message.Read('IncludeSchema', TypeInfo(Boolean), IncludeSchema, []);
+ __Message.Read('MaxRecords', TypeInfo(Integer), MaxRecords, []);
+
+ lResult := (__Instance as IDARemoteService).GetDatasetDataEx(DatasetName, Params, UserFilter, IncludeSchema, MaxRecords);
+
+ __Message.InitializeResponseMessage(__Transport, 'DataAbstract3', 'DARemoteService', 'GetDatasetDataExResponse');
+ __Message.Write('Result', TypeInfo(Binary), lResult, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(Params);
+ __lObjectDisposer.Add(lResult);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
+procedure TDARemoteService_Invoker.Invoke_UpdateData(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function UpdateData(const Delta: Binary): Binary; }
+var
+ Delta: Binary;
+ lResult: Binary;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ Delta := nil;
+ lResult := nil;
+ try
+ __Message.Read('Delta', TypeInfo(Binary), Delta, []);
+
+ lResult := (__Instance as IDARemoteService).UpdateData(Delta);
+
+ __Message.InitializeResponseMessage(__Transport, 'DataAbstract3', 'DARemoteService', 'UpdateDataResponse');
+ __Message.Write('Result', TypeInfo(Binary), lResult, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(Delta);
+ __lObjectDisposer.Add(lResult);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
+procedure TDARemoteService_Invoker.Invoke_ExecuteSQLCommand(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function ExecuteSQLCommand(const SQL: AnsiString): Integer; }
+var
+ SQL: AnsiString;
+ lResult: Integer;
+begin
+ try
+ __Message.Read('SQL', TypeInfo(AnsiString), SQL, []);
+
+ lResult := (__Instance as IDARemoteService).ExecuteSQLCommand(SQL);
+
+ __Message.InitializeResponseMessage(__Transport, 'DataAbstract3', 'DARemoteService', 'ExecuteSQLCommandResponse');
+ __Message.Write('Result', TypeInfo(Integer), lResult, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ end;
+end;
+
+procedure TDARemoteService_Invoker.Invoke_GetSchemaAsXML(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function GetSchemaAsXML: AnsiString; }
+var
+ lResult: AnsiString;
+begin
+ try
+ lResult := (__Instance as IDARemoteService).GetSchemaAsXML;
+
+ __Message.InitializeResponseMessage(__Transport, 'DataAbstract3', 'DARemoteService', 'GetSchemaAsXMLResponse');
+ __Message.Write('Result', TypeInfo(AnsiString), lResult, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ end;
+end;
+
+procedure TDARemoteService_Invoker.Invoke_GetMultipleDatasets(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function GetMultipleDatasets(const DatasetRequestInfoArray: TDADatasetRequestInfoArray): Binary; }
+var
+ DatasetRequestInfoArray: DataAbstract3_Intf.TDADatasetRequestInfoArray;
+ lResult: Binary;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ DatasetRequestInfoArray := nil;
+ lResult := nil;
+ try
+ __Message.Read('DatasetRequestInfoArray', TypeInfo(DataAbstract3_Intf.TDADatasetRequestInfoArray), DatasetRequestInfoArray, []);
+
+ lResult := (__Instance as IDARemoteService).GetMultipleDatasets(DatasetRequestInfoArray);
+
+ __Message.InitializeResponseMessage(__Transport, 'DataAbstract3', 'DARemoteService', 'GetMultipleDatasetsResponse');
+ __Message.Write('Result', TypeInfo(Binary), lResult, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(DatasetRequestInfoArray);
+ __lObjectDisposer.Add(lResult);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
+procedure TDARemoteService_Invoker.Invoke_ExecuteSQLCommandEx(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function ExecuteSQLCommandEx(const CommandName: AnsiString; const Params: TDADatasetParamArray): Integer; }
+var
+ CommandName: AnsiString;
+ Params: DataAbstract3_Intf.TDADatasetParamArray;
+ lResult: Integer;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ Params := nil;
+ try
+ __Message.Read('CommandName', TypeInfo(AnsiString), CommandName, []);
+ __Message.Read('Params', TypeInfo(DataAbstract3_Intf.TDADatasetParamArray), Params, []);
+
+ lResult := (__Instance as IDARemoteService).ExecuteSQLCommandEx(CommandName, Params);
+
+ __Message.InitializeResponseMessage(__Transport, 'DataAbstract3', 'DARemoteService', 'ExecuteSQLCommandExResponse');
+ __Message.Write('Result', TypeInfo(Integer), lResult, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(Params);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
+{ TDALoginService_Invoker }
+
+constructor TDALoginService_Invoker.Create;
+begin
+ inherited Create;
+ FAbstract := True;
+end;
+
+procedure TDALoginService_Invoker.Invoke_Login(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function Login(const UserID: AnsiString; const Password: AnsiString; out LoginInfo: TDALoginInfo): Boolean; }
+var
+ UserID: AnsiString;
+ Password: AnsiString;
+ LoginInfo: DataAbstract3_Intf.TDALoginInfo;
+ lResult: Boolean;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ LoginInfo := nil;
+ try
+ __Message.Read('UserID', TypeInfo(AnsiString), UserID, []);
+ __Message.Read('Password', TypeInfo(AnsiString), Password, []);
+
+ lResult := (__Instance as IDALoginService).Login(UserID, Password, LoginInfo);
+
+ __Message.InitializeResponseMessage(__Transport, 'DataAbstract3', 'DALoginService', 'LoginResponse');
+ __Message.Write('Result', TypeInfo(Boolean), lResult, []);
+ __Message.Write('LoginInfo', TypeInfo(DataAbstract3_Intf.TDALoginInfo), LoginInfo, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(LoginInfo);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
+procedure TDALoginService_Invoker.Invoke_Logout(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ procedure Logout; }
+begin
+ try
+ (__Instance as IDALoginService).Logout;
+
+ __Message.InitializeResponseMessage(__Transport, 'DataAbstract3', 'DALoginService', 'LogoutResponse');
+ __Message.Finalize;
+
+ __oResponseOptions := [roNoResponse];
+
+ finally
+ end;
+end;
+
+initialization
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract4.RODL b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract4.RODL
new file mode 100644
index 0000000..d89329e
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract4.RODL
@@ -0,0 +1,317 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract4_Async.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract4_Async.pas
new file mode 100644
index 0000000..3db4e4d
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract4_Async.pas
@@ -0,0 +1,645 @@
+unit DataAbstract4_Async;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROXMLIntf, uROClasses, uROTypes, uROClientIntf, uROAsync,
+ {Project:} DataAbstract4_Intf;
+
+type
+ { IDataAbstractService_Async }
+ IDataAbstractService_Async = interface(IROAsyncInterface)
+ ['{B4C1D84D-1C6F-4E5A-8839-0C9F7EA5431B}']
+ procedure Invoke_GetSchema(const aFilter: Utf8String);
+ procedure Invoke_GetData(const aTableNameArray: StringArray; const aTableRequestInfoArray: TableRequestInfoArray);
+ procedure Invoke_UpdateData(const aDelta: Binary);
+ procedure Invoke_ExecuteCommand(const aCommandName: Utf8String; const aParameterArray: DataParameterArray);
+ procedure Invoke_ExecuteCommandEx(const aCommandName: Utf8String; const aInputParameters: DataParameterArray);
+ procedure Invoke_GetTableSchema(const aTableNameArray: StringArray);
+ procedure Invoke_GetCommandSchema(const aCommandNameArray: StringArray);
+ procedure Invoke_SQLGetData(const aSQLText: Utf8String; const aIncludeSchema: Boolean; const aMaxRecords: Integer);
+ procedure Invoke_SQLGetDataEx(const aSQLText: Utf8String; const aIncludeSchema: Boolean; const aMaxRecords: Integer; const aDynamicWhereXML: Widestring);
+ procedure Invoke_SQLExecuteCommand(const aSQLText: Utf8String);
+ procedure Invoke_SQLExecuteCommandEx(const aSQLText: Utf8String; const aDynamicWhereXML: Widestring);
+ procedure Invoke_GetDatasetScripts(const DatasetNames: Utf8String);
+ procedure Invoke_RegisterForDataChangeNotification(const aTableName: Utf8String);
+ procedure Invoke_UnregisterForDataChangeNotification(const aTableName: Utf8String);
+ function Retrieve_GetSchema: Utf8String;
+ function Retrieve_GetData: Binary;
+ function Retrieve_UpdateData: Binary;
+ function Retrieve_ExecuteCommand: Integer;
+ function Retrieve_ExecuteCommandEx(out aOutputParameters: DataParameterArray): Integer;
+ function Retrieve_GetTableSchema: Utf8String;
+ function Retrieve_GetCommandSchema: Utf8String;
+ function Retrieve_SQLGetData: Binary;
+ function Retrieve_SQLGetDataEx: Binary;
+ function Retrieve_SQLExecuteCommand: Integer;
+ function Retrieve_SQLExecuteCommandEx: Integer;
+ function Retrieve_GetDatasetScripts: Utf8String;
+ end;
+
+ { IBaseLoginService_Async }
+ IBaseLoginService_Async = interface(IROAsyncInterface)
+ ['{45A761A3-80E9-43E6-86BC-E96693551453}']
+ procedure Invoke_Logout;
+ end;
+
+ { IMultiDbLoginService_Async }
+ IMultiDbLoginService_Async = interface(IBaseLoginService_Async)
+ ['{8EBB1878-ECD9-4F4E-8A87-E26D51FD0ADD}']
+ procedure Invoke_Login(const aUserID: Utf8String; const aPassword: Utf8String; const aConnectionName: Utf8String);
+ function Retrieve_Login(out aUserInfo: UserInfo): Boolean;
+ end;
+
+ { IMultiDbLoginServiceV5_Async }
+ IMultiDbLoginServiceV5_Async = interface(IMultiDbLoginService_Async)
+ ['{292C3E8B-B263-4D95-9EE6-41DA014ACDF3}']
+ procedure Invoke_GetConnectionNames;
+ procedure Invoke_GetDefaultConnectionName;
+ function Retrieve_GetConnectionNames: StringArray;
+ function Retrieve_GetDefaultConnectionName: Utf8String;
+ end;
+
+ { ISimpleLoginService_Async }
+ ISimpleLoginService_Async = interface(IBaseLoginService_Async)
+ ['{74BC5406-7AA7-45CD-8012-193C38DF62E9}']
+ procedure Invoke_Login(const aUserID: Utf8String; const aPassword: Utf8String);
+ function Retrieve_Login(out aUserInfo: UserInfo): Boolean;
+ end;
+
+ { CoDataAbstractService_Async }
+ CoDataAbstractService_Async = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IDataAbstractService_Async;
+ end;
+
+ { CoBaseLoginService_Async }
+ CoBaseLoginService_Async = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IBaseLoginService_Async;
+ end;
+
+ { CoMultiDbLoginService_Async }
+ CoMultiDbLoginService_Async = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IMultiDbLoginService_Async;
+ end;
+
+ { CoMultiDbLoginServiceV5_Async }
+ CoMultiDbLoginServiceV5_Async = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IMultiDbLoginServiceV5_Async;
+ end;
+
+ { CoSimpleLoginService_Async }
+ CoSimpleLoginService_Async = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): ISimpleLoginService_Async;
+ end;
+
+ { TDataAbstractService_AsyncProxy }
+ TDataAbstractService_AsyncProxy = class(TROAsyncProxy, IDataAbstractService_Async)
+ private
+ protected
+ function __GetInterfaceName:string; override;
+
+ procedure Invoke_GetSchema(const aFilter: Utf8String);
+ procedure Invoke_GetData(const aTableNameArray: StringArray; const aTableRequestInfoArray: TableRequestInfoArray);
+ procedure Invoke_UpdateData(const aDelta: Binary);
+ procedure Invoke_ExecuteCommand(const aCommandName: Utf8String; const aParameterArray: DataParameterArray);
+ procedure Invoke_ExecuteCommandEx(const aCommandName: Utf8String; const aInputParameters: DataParameterArray);
+ procedure Invoke_GetTableSchema(const aTableNameArray: StringArray);
+ procedure Invoke_GetCommandSchema(const aCommandNameArray: StringArray);
+ procedure Invoke_SQLGetData(const aSQLText: Utf8String; const aIncludeSchema: Boolean; const aMaxRecords: Integer);
+ procedure Invoke_SQLGetDataEx(const aSQLText: Utf8String; const aIncludeSchema: Boolean; const aMaxRecords: Integer; const aDynamicWhereXML: Widestring);
+ procedure Invoke_SQLExecuteCommand(const aSQLText: Utf8String);
+ procedure Invoke_SQLExecuteCommandEx(const aSQLText: Utf8String; const aDynamicWhereXML: Widestring);
+ procedure Invoke_GetDatasetScripts(const DatasetNames: Utf8String);
+ procedure Invoke_RegisterForDataChangeNotification(const aTableName: Utf8String);
+ procedure Invoke_UnregisterForDataChangeNotification(const aTableName: Utf8String);
+ function Retrieve_GetSchema: Utf8String;
+ function Retrieve_GetData: Binary;
+ function Retrieve_UpdateData: Binary;
+ function Retrieve_ExecuteCommand: Integer;
+ function Retrieve_ExecuteCommandEx(out aOutputParameters: DataParameterArray): Integer;
+ function Retrieve_GetTableSchema: Utf8String;
+ function Retrieve_GetCommandSchema: Utf8String;
+ function Retrieve_SQLGetData: Binary;
+ function Retrieve_SQLGetDataEx: Binary;
+ function Retrieve_SQLExecuteCommand: Integer;
+ function Retrieve_SQLExecuteCommandEx: Integer;
+ function Retrieve_GetDatasetScripts: Utf8String;
+ end;
+
+ { TBaseLoginService_AsyncProxy }
+ TBaseLoginService_AsyncProxy = class(TROAsyncProxy, IBaseLoginService_Async)
+ private
+ protected
+ function __GetInterfaceName:string; override;
+
+ procedure Invoke_Logout;
+ end;
+
+ { TMultiDbLoginService_AsyncProxy }
+ TMultiDbLoginService_AsyncProxy = class(TBaseLoginService_AsyncProxy, IMultiDbLoginService_Async)
+ private
+ protected
+ function __GetInterfaceName:string; override;
+
+ procedure Invoke_Login(const aUserID: Utf8String; const aPassword: Utf8String; const aConnectionName: Utf8String);
+ function Retrieve_Login(out aUserInfo: UserInfo): Boolean;
+ end;
+
+ { TMultiDbLoginServiceV5_AsyncProxy }
+ TMultiDbLoginServiceV5_AsyncProxy = class(TMultiDbLoginService_AsyncProxy, IMultiDbLoginServiceV5_Async)
+ private
+ protected
+ function __GetInterfaceName:string; override;
+
+ procedure Invoke_GetConnectionNames;
+ procedure Invoke_GetDefaultConnectionName;
+ function Retrieve_GetConnectionNames: StringArray;
+ function Retrieve_GetDefaultConnectionName: Utf8String;
+ end;
+
+ { TSimpleLoginService_AsyncProxy }
+ TSimpleLoginService_AsyncProxy = class(TBaseLoginService_AsyncProxy, ISimpleLoginService_Async)
+ private
+ protected
+ function __GetInterfaceName:string; override;
+
+ procedure Invoke_Login(const aUserID: Utf8String; const aPassword: Utf8String);
+ function Retrieve_Login(out aUserInfo: UserInfo): Boolean;
+ end;
+
+implementation
+
+uses
+ {vcl:} SysUtils;
+
+{ CoDataAbstractService }
+
+class function CoDataAbstractService_Async.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IDataAbstractService_Async;
+begin
+ result := TDataAbstractService_AsyncProxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TDataAbstractService_AsyncProxy }
+
+function TDataAbstractService_AsyncProxy.__GetInterfaceName:string;
+begin
+ result := 'DataAbstractService';
+end;
+
+procedure TDataAbstractService_AsyncProxy.Invoke_GetSchema(const aFilter: Utf8String);
+begin
+ __AssertProxyNotBusy('GetSchema');
+
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract4', __InterfaceName, 'GetSchema');
+ __Message.Write('aFilter', TypeInfo(Utf8String), aFilter, []);
+ __DispatchAsyncRequest('GetSchema',__Message);
+ __Message.UnsetAttributes(__TransportChannel);
+end;
+
+function TDataAbstractService_AsyncProxy.Retrieve_GetSchema: Utf8String;
+var __response:TStream;
+begin
+ __response := __RetrieveAsyncResponse('GetSchema');
+ __Message.ReadFromStream(__response);
+
+ __Message.Read('Result', TypeInfo(Utf8String), Result, []);
+
+ __response.Free();
+end;
+
+procedure TDataAbstractService_AsyncProxy.Invoke_GetData(const aTableNameArray: StringArray; const aTableRequestInfoArray: TableRequestInfoArray);
+begin
+ __AssertProxyNotBusy('GetData');
+
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract4', __InterfaceName, 'GetData');
+ __Message.Write('aTableNameArray', TypeInfo(StringArray), aTableNameArray, []);
+ __Message.Write('aTableRequestInfoArray', TypeInfo(TableRequestInfoArray), aTableRequestInfoArray, []);
+ __DispatchAsyncRequest('GetData',__Message);
+ __Message.UnsetAttributes(__TransportChannel);
+end;
+
+function TDataAbstractService_AsyncProxy.Retrieve_GetData: Binary;
+var __response:TStream;
+begin
+ result := nil;
+ __response := __RetrieveAsyncResponse('GetData');
+ __Message.ReadFromStream(__response);
+
+ __Message.Read('Result', TypeInfo(Binary), Result, []);
+
+ __response.Free();
+end;
+
+procedure TDataAbstractService_AsyncProxy.Invoke_UpdateData(const aDelta: Binary);
+begin
+ __AssertProxyNotBusy('UpdateData');
+
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract4', __InterfaceName, 'UpdateData');
+ __Message.Write('aDelta', TypeInfo(Binary), aDelta, []);
+ __DispatchAsyncRequest('UpdateData',__Message);
+ __Message.UnsetAttributes(__TransportChannel);
+end;
+
+function TDataAbstractService_AsyncProxy.Retrieve_UpdateData: Binary;
+var __response:TStream;
+begin
+ result := nil;
+ __response := __RetrieveAsyncResponse('UpdateData');
+ __Message.ReadFromStream(__response);
+
+ __Message.Read('Result', TypeInfo(Binary), Result, []);
+
+ __response.Free();
+end;
+
+procedure TDataAbstractService_AsyncProxy.Invoke_ExecuteCommand(const aCommandName: Utf8String; const aParameterArray: DataParameterArray);
+begin
+ __AssertProxyNotBusy('ExecuteCommand');
+
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract4', __InterfaceName, 'ExecuteCommand');
+ __Message.Write('aCommandName', TypeInfo(Utf8String), aCommandName, []);
+ __Message.Write('aParameterArray', TypeInfo(DataParameterArray), aParameterArray, []);
+ __DispatchAsyncRequest('ExecuteCommand',__Message);
+ __Message.UnsetAttributes(__TransportChannel);
+end;
+
+function TDataAbstractService_AsyncProxy.Retrieve_ExecuteCommand: Integer;
+var __response:TStream;
+begin
+ __response := __RetrieveAsyncResponse('ExecuteCommand');
+ __Message.ReadFromStream(__response);
+
+ __Message.Read('Result', TypeInfo(Integer), Result, []);
+
+ __response.Free();
+end;
+
+procedure TDataAbstractService_AsyncProxy.Invoke_ExecuteCommandEx(const aCommandName: Utf8String; const aInputParameters: DataParameterArray);
+begin
+ __AssertProxyNotBusy('ExecuteCommandEx');
+
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract4', __InterfaceName, 'ExecuteCommandEx');
+ __Message.Write('aCommandName', TypeInfo(Utf8String), aCommandName, []);
+ __Message.Write('aInputParameters', TypeInfo(DataParameterArray), aInputParameters, []);
+ __DispatchAsyncRequest('ExecuteCommandEx',__Message);
+ __Message.UnsetAttributes(__TransportChannel);
+end;
+
+function TDataAbstractService_AsyncProxy.Retrieve_ExecuteCommandEx(out aOutputParameters: DataParameterArray): Integer;
+var __response:TStream;
+begin
+ aOutputParameters := nil;
+ __response := __RetrieveAsyncResponse('ExecuteCommandEx');
+ __Message.ReadFromStream(__response);
+
+ __Message.Read('Result', TypeInfo(Integer), Result, []);
+ __Message.Read('aOutputParameters', TypeInfo(DataParameterArray), aOutputParameters, []);
+
+ __response.Free();
+end;
+
+procedure TDataAbstractService_AsyncProxy.Invoke_GetTableSchema(const aTableNameArray: StringArray);
+begin
+ __AssertProxyNotBusy('GetTableSchema');
+
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract4', __InterfaceName, 'GetTableSchema');
+ __Message.Write('aTableNameArray', TypeInfo(StringArray), aTableNameArray, []);
+ __DispatchAsyncRequest('GetTableSchema',__Message);
+ __Message.UnsetAttributes(__TransportChannel);
+end;
+
+function TDataAbstractService_AsyncProxy.Retrieve_GetTableSchema: Utf8String;
+var __response:TStream;
+begin
+ __response := __RetrieveAsyncResponse('GetTableSchema');
+ __Message.ReadFromStream(__response);
+
+ __Message.Read('Result', TypeInfo(Utf8String), Result, []);
+
+ __response.Free();
+end;
+
+procedure TDataAbstractService_AsyncProxy.Invoke_GetCommandSchema(const aCommandNameArray: StringArray);
+begin
+ __AssertProxyNotBusy('GetCommandSchema');
+
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract4', __InterfaceName, 'GetCommandSchema');
+ __Message.Write('aCommandNameArray', TypeInfo(StringArray), aCommandNameArray, []);
+ __DispatchAsyncRequest('GetCommandSchema',__Message);
+ __Message.UnsetAttributes(__TransportChannel);
+end;
+
+function TDataAbstractService_AsyncProxy.Retrieve_GetCommandSchema: Utf8String;
+var __response:TStream;
+begin
+ __response := __RetrieveAsyncResponse('GetCommandSchema');
+ __Message.ReadFromStream(__response);
+
+ __Message.Read('Result', TypeInfo(Utf8String), Result, []);
+
+ __response.Free();
+end;
+
+procedure TDataAbstractService_AsyncProxy.Invoke_SQLGetData(const aSQLText: Utf8String; const aIncludeSchema: Boolean; const aMaxRecords: Integer);
+begin
+ __AssertProxyNotBusy('SQLGetData');
+
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract4', __InterfaceName, 'SQLGetData');
+ __Message.Write('aSQLText', TypeInfo(Utf8String), aSQLText, []);
+ __Message.Write('aIncludeSchema', TypeInfo(Boolean), aIncludeSchema, []);
+ __Message.Write('aMaxRecords', TypeInfo(Integer), aMaxRecords, []);
+ __DispatchAsyncRequest('SQLGetData',__Message);
+ __Message.UnsetAttributes(__TransportChannel);
+end;
+
+function TDataAbstractService_AsyncProxy.Retrieve_SQLGetData: Binary;
+var __response:TStream;
+begin
+ result := nil;
+ __response := __RetrieveAsyncResponse('SQLGetData');
+ __Message.ReadFromStream(__response);
+
+ __Message.Read('Result', TypeInfo(Binary), Result, []);
+
+ __response.Free();
+end;
+
+procedure TDataAbstractService_AsyncProxy.Invoke_SQLGetDataEx(const aSQLText: Utf8String; const aIncludeSchema: Boolean; const aMaxRecords: Integer; const aDynamicWhereXML: Widestring);
+begin
+ __AssertProxyNotBusy('SQLGetDataEx');
+
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract4', __InterfaceName, 'SQLGetDataEx');
+ __Message.Write('aSQLText', TypeInfo(Utf8String), aSQLText, []);
+ __Message.Write('aIncludeSchema', TypeInfo(Boolean), aIncludeSchema, []);
+ __Message.Write('aMaxRecords', TypeInfo(Integer), aMaxRecords, []);
+ __Message.Write('aDynamicWhereXML', TypeInfo(Widestring), aDynamicWhereXML, []);
+ __DispatchAsyncRequest('SQLGetDataEx',__Message);
+ __Message.UnsetAttributes(__TransportChannel);
+end;
+
+function TDataAbstractService_AsyncProxy.Retrieve_SQLGetDataEx: Binary;
+var __response:TStream;
+begin
+ result := nil;
+ __response := __RetrieveAsyncResponse('SQLGetDataEx');
+ __Message.ReadFromStream(__response);
+
+ __Message.Read('Result', TypeInfo(Binary), Result, []);
+
+ __response.Free();
+end;
+
+procedure TDataAbstractService_AsyncProxy.Invoke_SQLExecuteCommand(const aSQLText: Utf8String);
+begin
+ __AssertProxyNotBusy('SQLExecuteCommand');
+
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract4', __InterfaceName, 'SQLExecuteCommand');
+ __Message.Write('aSQLText', TypeInfo(Utf8String), aSQLText, []);
+ __DispatchAsyncRequest('SQLExecuteCommand',__Message);
+ __Message.UnsetAttributes(__TransportChannel);
+end;
+
+function TDataAbstractService_AsyncProxy.Retrieve_SQLExecuteCommand: Integer;
+var __response:TStream;
+begin
+ __response := __RetrieveAsyncResponse('SQLExecuteCommand');
+ __Message.ReadFromStream(__response);
+
+ __Message.Read('Result', TypeInfo(Integer), Result, []);
+
+ __response.Free();
+end;
+
+procedure TDataAbstractService_AsyncProxy.Invoke_SQLExecuteCommandEx(const aSQLText: Utf8String; const aDynamicWhereXML: Widestring);
+begin
+ __AssertProxyNotBusy('SQLExecuteCommandEx');
+
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract4', __InterfaceName, 'SQLExecuteCommandEx');
+ __Message.Write('aSQLText', TypeInfo(Utf8String), aSQLText, []);
+ __Message.Write('aDynamicWhereXML', TypeInfo(Widestring), aDynamicWhereXML, []);
+ __DispatchAsyncRequest('SQLExecuteCommandEx',__Message);
+ __Message.UnsetAttributes(__TransportChannel);
+end;
+
+function TDataAbstractService_AsyncProxy.Retrieve_SQLExecuteCommandEx: Integer;
+var __response:TStream;
+begin
+ __response := __RetrieveAsyncResponse('SQLExecuteCommandEx');
+ __Message.ReadFromStream(__response);
+
+ __Message.Read('Result', TypeInfo(Integer), Result, []);
+
+ __response.Free();
+end;
+
+procedure TDataAbstractService_AsyncProxy.Invoke_GetDatasetScripts(const DatasetNames: Utf8String);
+begin
+ __AssertProxyNotBusy('GetDatasetScripts');
+
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract4', __InterfaceName, 'GetDatasetScripts');
+ __Message.Write('DatasetNames', TypeInfo(Utf8String), DatasetNames, []);
+ __DispatchAsyncRequest('GetDatasetScripts',__Message);
+ __Message.UnsetAttributes(__TransportChannel);
+end;
+
+function TDataAbstractService_AsyncProxy.Retrieve_GetDatasetScripts: Utf8String;
+var __response:TStream;
+begin
+ __response := __RetrieveAsyncResponse('GetDatasetScripts');
+ __Message.ReadFromStream(__response);
+
+ __Message.Read('Result', TypeInfo(Utf8String), Result, []);
+
+ __response.Free();
+end;
+
+procedure TDataAbstractService_AsyncProxy.Invoke_RegisterForDataChangeNotification(const aTableName: Utf8String);
+begin
+ __AssertProxyNotBusy('RegisterForDataChangeNotification');
+
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract4', __InterfaceName, 'RegisterForDataChangeNotification');
+ __Message.Write('aTableName', TypeInfo(Utf8String), aTableName, []);
+ __DispatchAsyncRequest('RegisterForDataChangeNotification',__Message, false);
+ __Message.UnsetAttributes(__TransportChannel);
+end;
+
+procedure TDataAbstractService_AsyncProxy.Invoke_UnregisterForDataChangeNotification(const aTableName: Utf8String);
+begin
+ __AssertProxyNotBusy('UnregisterForDataChangeNotification');
+
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract4', __InterfaceName, 'UnregisterForDataChangeNotification');
+ __Message.Write('aTableName', TypeInfo(Utf8String), aTableName, []);
+ __DispatchAsyncRequest('UnregisterForDataChangeNotification',__Message, false);
+ __Message.UnsetAttributes(__TransportChannel);
+end;
+
+
+{ CoSimpleLoginService }
+
+class function CoSimpleLoginService_Async.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): ISimpleLoginService_Async;
+begin
+ result := TSimpleLoginService_AsyncProxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TSimpleLoginService_AsyncProxy }
+
+function TSimpleLoginService_AsyncProxy.__GetInterfaceName:string;
+begin
+ result := 'SimpleLoginService';
+end;
+
+procedure TSimpleLoginService_AsyncProxy.Invoke_Login(const aUserID: Utf8String; const aPassword: Utf8String);
+begin
+ __AssertProxyNotBusy('Login');
+
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract4', __InterfaceName, 'Login');
+ __Message.Write('aUserID', TypeInfo(Utf8String), aUserID, []);
+ __Message.Write('aPassword', TypeInfo(Utf8String), aPassword, []);
+ __DispatchAsyncRequest('Login',__Message);
+ __Message.UnsetAttributes(__TransportChannel);
+end;
+
+function TSimpleLoginService_AsyncProxy.Retrieve_Login(out aUserInfo: UserInfo): Boolean;
+var __response:TStream;
+begin
+ aUserInfo := nil;
+ __response := __RetrieveAsyncResponse('Login');
+ __Message.ReadFromStream(__response);
+
+ __Message.Read('Result', TypeInfo(Boolean), Result, []);
+ __Message.Read('aUserInfo', TypeInfo(UserInfo), aUserInfo, []);
+
+ __response.Free();
+end;
+
+
+{ CoBaseLoginService }
+
+class function CoBaseLoginService_Async.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IBaseLoginService_Async;
+begin
+ result := TBaseLoginService_AsyncProxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TBaseLoginService_AsyncProxy }
+
+function TBaseLoginService_AsyncProxy.__GetInterfaceName:string;
+begin
+ result := 'BaseLoginService';
+end;
+
+procedure TBaseLoginService_AsyncProxy.Invoke_Logout;
+begin
+ __AssertProxyNotBusy('Logout');
+
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract4', __InterfaceName, 'Logout');
+ __DispatchAsyncRequest('Logout',__Message, false);
+end;
+
+
+{ CoMultiDbLoginService }
+
+class function CoMultiDbLoginService_Async.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IMultiDbLoginService_Async;
+begin
+ result := TMultiDbLoginService_AsyncProxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TMultiDbLoginService_AsyncProxy }
+
+function TMultiDbLoginService_AsyncProxy.__GetInterfaceName:string;
+begin
+ result := 'MultiDbLoginService';
+end;
+
+procedure TMultiDbLoginService_AsyncProxy.Invoke_Login(const aUserID: Utf8String; const aPassword: Utf8String; const aConnectionName: Utf8String);
+begin
+ __AssertProxyNotBusy('Login');
+
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract4', __InterfaceName, 'Login');
+ __Message.Write('aUserID', TypeInfo(Utf8String), aUserID, []);
+ __Message.Write('aPassword', TypeInfo(Utf8String), aPassword, []);
+ __Message.Write('aConnectionName', TypeInfo(Utf8String), aConnectionName, []);
+ __DispatchAsyncRequest('Login',__Message);
+ __Message.UnsetAttributes(__TransportChannel);
+end;
+
+function TMultiDbLoginService_AsyncProxy.Retrieve_Login(out aUserInfo: UserInfo): Boolean;
+var __response:TStream;
+begin
+ aUserInfo := nil;
+ __response := __RetrieveAsyncResponse('Login');
+ __Message.ReadFromStream(__response);
+
+ __Message.Read('Result', TypeInfo(Boolean), Result, []);
+ __Message.Read('aUserInfo', TypeInfo(UserInfo), aUserInfo, []);
+
+ __response.Free();
+end;
+
+
+{ CoMultiDbLoginServiceV5 }
+
+class function CoMultiDbLoginServiceV5_Async.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IMultiDbLoginServiceV5_Async;
+begin
+ result := TMultiDbLoginServiceV5_AsyncProxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TMultiDbLoginServiceV5_AsyncProxy }
+
+function TMultiDbLoginServiceV5_AsyncProxy.__GetInterfaceName:string;
+begin
+ result := 'MultiDbLoginServiceV5';
+end;
+
+procedure TMultiDbLoginServiceV5_AsyncProxy.Invoke_GetConnectionNames;
+begin
+ __AssertProxyNotBusy('GetConnectionNames');
+
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract4', __InterfaceName, 'GetConnectionNames');
+ __DispatchAsyncRequest('GetConnectionNames',__Message);
+end;
+
+function TMultiDbLoginServiceV5_AsyncProxy.Retrieve_GetConnectionNames: StringArray;
+var __response:TStream;
+begin
+ result := nil;
+ __response := __RetrieveAsyncResponse('GetConnectionNames');
+ __Message.ReadFromStream(__response);
+
+ __Message.Read('Result', TypeInfo(StringArray), Result, []);
+
+ __response.Free();
+end;
+
+procedure TMultiDbLoginServiceV5_AsyncProxy.Invoke_GetDefaultConnectionName;
+begin
+ __AssertProxyNotBusy('GetDefaultConnectionName');
+
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract4', __InterfaceName, 'GetDefaultConnectionName');
+ __DispatchAsyncRequest('GetDefaultConnectionName',__Message);
+end;
+
+function TMultiDbLoginServiceV5_AsyncProxy.Retrieve_GetDefaultConnectionName: Utf8String;
+var __response:TStream;
+begin
+ __response := __RetrieveAsyncResponse('GetDefaultConnectionName');
+ __Message.ReadFromStream(__response);
+
+ __Message.Read('Result', TypeInfo(Utf8String), Result, []);
+
+ __response.Free();
+end;
+
+
+initialization
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract4_Intf.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract4_Intf.pas
new file mode 100644
index 0000000..8e43d28
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract4_Intf.pas
@@ -0,0 +1,2368 @@
+unit DataAbstract4_Intf;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROXMLIntf, uROClasses, uROClient, uROTypes, uROClientIntf;
+
+const
+ { Library ID }
+ LibraryUID = '{DC8B7BE2-14AF-402D-B1F8-E1008B6FA4F6}';
+ TargetNamespace = '';
+
+ { Service Interface ID's }
+ IDataAbstractService_IID : TGUID = '{4C2EC238-4FB4-434E-8CFF-ED25EEFF1525}';
+ ISimpleLoginService_IID : TGUID = '{B186853B-168B-4E33-B798-467444BFC8C6}';
+ IBaseLoginService_IID : TGUID = '{C349DB54-9DFB-454E-AD23-6F2166A624A6}';
+ IMultiDbLoginService_IID : TGUID = '{2C6D5764-01CE-447A-8264-27210B2C7371}';
+ IMultiDbLoginServiceV5_IID : TGUID = '{5A78AB01-2097-4473-A4D5-78980FFD90E4}';
+
+ { Event ID's }
+ EID_DataChangeNotification = 'DataChangeNotification';
+
+type
+ { Forward declarations }
+ IDataAbstractService = interface;
+ ISimpleLoginService = interface;
+ IBaseLoginService = interface;
+ IMultiDbLoginService = interface;
+ IMultiDbLoginServiceV5 = interface;
+
+ DataParameterArray = class;
+ TableRequestInfoArray = class;
+ StringArray = class;
+ VariantArray = class;
+ ColumnSortingArray = class;
+
+ DataParameter = class;
+ TableRequestInfo = class;
+ UserInfo = class;
+ TableRequestInfoV5 = class;
+ ColumnSorting = class;
+
+ IDataChangeNotification = interface;
+
+
+ { Enumerateds }
+ ColumnSortDirection = (ColumnSortDirection_Ascending,ColumnSortDirection_Descending);
+
+ { DataParameter }
+ DataParameter = class(TROComplexType)
+ private
+ fName: Utf8String;
+ fValue: Variant;
+ public
+ procedure Assign(iSource: TPersistent); override;
+ procedure ReadComplex(ASerializer: TObject); override;
+ procedure WriteComplex(ASerializer: TObject); override;
+ published
+ property Name:Utf8String read fName write fName;
+ property Value:Variant read fValue write fValue;
+ end;
+
+ { DataParameterCollection }
+ DataParameterCollection = class(TROCollection)
+ protected
+ constructor Create(aItemClass: TCollectionItemClass); overload;
+ function GetItems(aIndex: integer): DataParameter;
+ procedure SetItems(aIndex: integer; const Value: DataParameter);
+ public
+ constructor Create; overload;
+ function Add: DataParameter; reintroduce;
+ procedure SaveToArray(anArray: DataParameterArray);
+ procedure LoadFromArray(anArray: DataParameterArray);
+ property Items[Index: integer]:DataParameter read GetItems write SetItems; default;
+ end;
+
+ { TableRequestInfo }
+ TableRequestInfo = class(TROComplexType)
+ private
+ fUserFilter: Utf8String;
+ fIncludeSchema: Boolean;
+ fMaxRecords: Integer;
+ fParameters: DataParameterArray;
+ function GetParameters: DataParameterArray;
+ public
+ constructor Create(aCollection : TCollection); override;
+ procedure Assign(iSource: TPersistent); override;
+ procedure ReadComplex(ASerializer: TObject); override;
+ procedure WriteComplex(ASerializer: TObject); override;
+ published
+ property UserFilter:Utf8String read fUserFilter write fUserFilter;
+ property IncludeSchema:Boolean read fIncludeSchema write fIncludeSchema;
+ property MaxRecords:Integer read fMaxRecords write fMaxRecords;
+ property Parameters:DataParameterArray read GetParameters write fParameters;
+ end;
+
+ { TableRequestInfoCollection }
+ TableRequestInfoCollection = class(TROCollection)
+ protected
+ constructor Create(aItemClass: TCollectionItemClass); overload;
+ function GetItems(aIndex: integer): TableRequestInfo;
+ procedure SetItems(aIndex: integer; const Value: TableRequestInfo);
+ public
+ constructor Create; overload;
+ function Add: TableRequestInfo; reintroduce;
+ procedure SaveToArray(anArray: TableRequestInfoArray);
+ procedure LoadFromArray(anArray: TableRequestInfoArray);
+ property Items[Index: integer]:TableRequestInfo read GetItems write SetItems; default;
+ end;
+
+ { TableRequestInfoV5 }
+ TableRequestInfoV5 = class(TableRequestInfo)
+ private
+ fWhereClause: IXmlNode;
+ fDynamicSelectFieldNames: StringArray;
+ fSorting: ColumnSorting;
+ function GetDynamicSelectFieldNames: StringArray;
+ function GetSorting: ColumnSorting;
+ public
+ procedure Assign(iSource: TPersistent); override;
+ procedure ReadComplex(ASerializer: TObject); override;
+ procedure WriteComplex(ASerializer: TObject); override;
+ published
+ property WhereClause:IXmlNode read fWhereClause write fWhereClause;
+ property DynamicSelectFieldNames:StringArray read GetDynamicSelectFieldNames write fDynamicSelectFieldNames;
+ property Sorting:ColumnSorting read GetSorting write fSorting;
+ end;
+
+ { TableRequestInfoV5Collection }
+ TableRequestInfoV5Collection = class(TableRequestInfoCollection)
+ protected
+ constructor Create(aItemClass: TCollectionItemClass); overload;
+ function GetItems(aIndex: integer): TableRequestInfoV5;
+ procedure SetItems(aIndex: integer; const Value: TableRequestInfoV5);
+ public
+ constructor Create; overload;
+ function Add: TableRequestInfoV5; reintroduce;
+ property Items[Index: integer]:TableRequestInfoV5 read GetItems write SetItems; default;
+ end;
+
+ { UserInfo }
+ UserInfo = class(TROComplexType)
+ private
+ fSessionID: Utf8String;
+ fUserID: Utf8String;
+ fPrivileges: StringArray;
+ fAttributes: VariantArray;
+ fUserData: Binary;
+ function GetPrivileges: StringArray;
+ function GetAttributes: VariantArray;
+ function GetUserData: Binary;
+ public
+ procedure Assign(iSource: TPersistent); override;
+ procedure ReadComplex(ASerializer: TObject); override;
+ procedure WriteComplex(ASerializer: TObject); override;
+ published
+ property SessionID:Utf8String read fSessionID write fSessionID;
+ property UserID:Utf8String read fUserID write fUserID;
+ property Privileges:StringArray read GetPrivileges write fPrivileges;
+ property Attributes:VariantArray read GetAttributes write fAttributes;
+ property UserData:Binary read GetUserData write fUserData;
+ end;
+
+ { UserInfoCollection }
+ UserInfoCollection = class(TROCollection)
+ protected
+ constructor Create(aItemClass: TCollectionItemClass); overload;
+ function GetItems(aIndex: integer): UserInfo;
+ procedure SetItems(aIndex: integer; const Value: UserInfo);
+ public
+ constructor Create; overload;
+ function Add: UserInfo; reintroduce;
+ property Items[Index: integer]:UserInfo read GetItems write SetItems; default;
+ end;
+
+ { ColumnSorting }
+ ColumnSorting = class(TROComplexType)
+ private
+ fFieldName: Utf8String;
+ fSortDirection: ColumnSortDirection;
+ public
+ procedure Assign(iSource: TPersistent); override;
+ procedure ReadComplex(ASerializer: TObject); override;
+ procedure WriteComplex(ASerializer: TObject); override;
+ published
+ property FieldName:Utf8String read fFieldName write fFieldName;
+ property SortDirection:ColumnSortDirection read fSortDirection write fSortDirection;
+ end;
+
+ { ColumnSortingCollection }
+ ColumnSortingCollection = class(TROCollection)
+ protected
+ constructor Create(aItemClass: TCollectionItemClass); overload;
+ function GetItems(aIndex: integer): ColumnSorting;
+ procedure SetItems(aIndex: integer; const Value: ColumnSorting);
+ public
+ constructor Create; overload;
+ function Add: ColumnSorting; reintroduce;
+ procedure SaveToArray(anArray: ColumnSortingArray);
+ procedure LoadFromArray(anArray: ColumnSortingArray);
+ property Items[Index: integer]:ColumnSorting read GetItems write SetItems; default;
+ end;
+
+ { DataParameterArray }
+ DataParameterArray_DataParameter = array of DataParameter;
+ DataParameterArray = class(TROArray)
+ private
+ fCount: Integer;
+ fItems : DataParameterArray_DataParameter;
+ protected
+ procedure Grow; virtual;
+ function GetItems(aIndex: integer): DataParameter;
+ procedure SetItems(aIndex: integer; const Value: DataParameter);
+ function GetCount: integer; override;
+ public
+ class function GetItemType: PTypeInfo; override;
+ class function GetItemClass: TClass; override;
+ class function GetItemSize: integer; override;
+
+ function GetItemRef(aIndex: integer): pointer; override;
+ procedure SetItemRef(aIndex: integer; Ref: pointer); override;
+ procedure Clear; override;
+ procedure Delete(aIndex: integer); override;
+ procedure Resize(ElementCount: integer); override;
+
+ procedure Assign(iSource:TPersistent); override;
+ procedure ReadComplex(ASerializer: TObject); override;
+ procedure WriteComplex(ASerializer: TObject); override;
+ function Add: DataParameter; overload;
+ function Add(const Value: DataParameter):integer; overload;
+
+ property Count : integer read GetCount;
+ property Items[Index: integer]:DataParameter read GetItems write SetItems; default;
+ property InnerArray: DataParameterArray_DataParameter read fItems;
+ end;
+
+ { TableRequestInfoArray }
+ TableRequestInfoArray_TableRequestInfo = array of TableRequestInfo;
+ TableRequestInfoArray = class(TROArray)
+ private
+ fCount: Integer;
+ fItems : TableRequestInfoArray_TableRequestInfo;
+ protected
+ procedure Grow; virtual;
+ function GetItems(aIndex: integer): TableRequestInfo;
+ procedure SetItems(aIndex: integer; const Value: TableRequestInfo);
+ function GetCount: integer; override;
+ public
+ class function GetItemType: PTypeInfo; override;
+ class function GetItemClass: TClass; override;
+ class function GetItemSize: integer; override;
+
+ function GetItemRef(aIndex: integer): pointer; override;
+ procedure SetItemRef(aIndex: integer; Ref: pointer); override;
+ procedure Clear; override;
+ procedure Delete(aIndex: integer); override;
+ procedure Resize(ElementCount: integer); override;
+
+ procedure Assign(iSource:TPersistent); override;
+ procedure ReadComplex(ASerializer: TObject); override;
+ procedure WriteComplex(ASerializer: TObject); override;
+ function Add: TableRequestInfo; overload;
+ function Add(const Value: TableRequestInfo):integer; overload;
+
+ property Count : integer read GetCount;
+ property Items[Index: integer]:TableRequestInfo read GetItems write SetItems; default;
+ property InnerArray: TableRequestInfoArray_TableRequestInfo read fItems;
+ end;
+
+ { StringArray }
+ StringArray_Utf8String = array of Utf8String;
+ StringArray = class(TROArray)
+ private
+ fCount: Integer;
+ fItems : StringArray_Utf8String;
+ protected
+ procedure Grow; virtual;
+ function GetItems(aIndex: integer): Utf8String;
+ procedure SetItems(aIndex: integer; const Value: Utf8String);
+ function GetCount: integer; override;
+ public
+ class function GetItemType: PTypeInfo; override;
+ class function GetItemSize: integer; override;
+
+ function GetItemRef(aIndex: integer): pointer; override;
+ procedure Clear; override;
+ procedure Delete(aIndex: integer); override;
+ procedure Resize(ElementCount: integer); override;
+
+ procedure Assign(iSource:TPersistent); override;
+ procedure ReadComplex(ASerializer: TObject); override;
+ procedure WriteComplex(ASerializer: TObject); override;
+ function Add(const Value:Utf8String): integer;
+ function GetIndex(const aPropertyName : string;
+ const aPropertyValue : Variant;
+ StartFrom : integer = 0;
+ Options : TROSearchOptions = [soIgnoreCase]) : integer; override;
+
+ property Count : integer read GetCount;
+ property Items[Index: integer]:Utf8String read GetItems write SetItems; default;
+ property InnerArray: StringArray_Utf8String read fItems;
+ end;
+
+ { VariantArray }
+ VariantArray_Variant = array of Variant;
+ VariantArray = class(TROArray)
+ private
+ fCount: Integer;
+ fItems : VariantArray_Variant;
+ protected
+ procedure Grow; virtual;
+ function GetItems(aIndex: integer): Variant;
+ procedure SetItems(aIndex: integer; const Value: Variant);
+ function GetCount: integer; override;
+ public
+ class function GetItemType: PTypeInfo; override;
+ class function GetItemSize: integer; override;
+
+ function GetItemRef(aIndex: integer): pointer; override;
+ procedure Clear; override;
+ procedure Delete(aIndex: integer); override;
+ procedure Resize(ElementCount: integer); override;
+
+ procedure Assign(iSource:TPersistent); override;
+ procedure ReadComplex(ASerializer: TObject); override;
+ procedure WriteComplex(ASerializer: TObject); override;
+ function Add(const Value:Variant): integer;
+ function GetIndex(const aPropertyName : string;
+ const aPropertyValue : Variant;
+ StartFrom : integer = 0;
+ Options : TROSearchOptions = [soIgnoreCase]) : integer; override;
+
+ property Count : integer read GetCount;
+ property Items[Index: integer]:Variant read GetItems write SetItems; default;
+ property InnerArray: VariantArray_Variant read fItems;
+ end;
+
+ { ColumnSortingArray }
+ ColumnSortingArray_ColumnSorting = array of ColumnSorting;
+ ColumnSortingArray = class(TROArray)
+ private
+ fCount: Integer;
+ fItems : ColumnSortingArray_ColumnSorting;
+ protected
+ procedure Grow; virtual;
+ function GetItems(aIndex: integer): ColumnSorting;
+ procedure SetItems(aIndex: integer; const Value: ColumnSorting);
+ function GetCount: integer; override;
+ public
+ class function GetItemType: PTypeInfo; override;
+ class function GetItemClass: TClass; override;
+ class function GetItemSize: integer; override;
+
+ function GetItemRef(aIndex: integer): pointer; override;
+ procedure SetItemRef(aIndex: integer; Ref: pointer); override;
+ procedure Clear; override;
+ procedure Delete(aIndex: integer); override;
+ procedure Resize(ElementCount: integer); override;
+
+ procedure Assign(iSource:TPersistent); override;
+ procedure ReadComplex(ASerializer: TObject); override;
+ procedure WriteComplex(ASerializer: TObject); override;
+ function Add: ColumnSorting; overload;
+ function Add(const Value: ColumnSorting):integer; overload;
+
+ property Count : integer read GetCount;
+ property Items[Index: integer]:ColumnSorting read GetItems write SetItems; default;
+ property InnerArray: ColumnSortingArray_ColumnSorting read fItems;
+ end;
+
+ { IDataAbstractService }
+ IDataAbstractService = interface
+ ['{4C2EC238-4FB4-434E-8CFF-ED25EEFF1525}']
+ function GetSchema(const aFilter: Utf8String): Utf8String;
+ function GetData(const aTableNameArray: StringArray; const aTableRequestInfoArray: TableRequestInfoArray): Binary;
+ function UpdateData(const aDelta: Binary): Binary;
+ function ExecuteCommand(const aCommandName: Utf8String; const aParameterArray: DataParameterArray): Integer;
+ function ExecuteCommandEx(const aCommandName: Utf8String; const aInputParameters: DataParameterArray; out aOutputParameters: DataParameterArray): Integer;
+ function GetTableSchema(const aTableNameArray: StringArray): Utf8String;
+ function GetCommandSchema(const aCommandNameArray: StringArray): Utf8String;
+ function SQLGetData(const aSQLText: Utf8String; const aIncludeSchema: Boolean; const aMaxRecords: Integer): Binary;
+ function SQLGetDataEx(const aSQLText: Utf8String; const aIncludeSchema: Boolean; const aMaxRecords: Integer; const aDynamicWhereXML: Widestring): Binary;
+ function SQLExecuteCommand(const aSQLText: Utf8String): Integer;
+ function SQLExecuteCommandEx(const aSQLText: Utf8String; const aDynamicWhereXML: Widestring): Integer;
+ function GetDatasetScripts(const DatasetNames: Utf8String): Utf8String;
+ procedure RegisterForDataChangeNotification(const aTableName: Utf8String);
+ procedure UnregisterForDataChangeNotification(const aTableName: Utf8String);
+ end;
+
+ { CoDataAbstractService }
+ CoDataAbstractService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IDataAbstractService;
+ end;
+
+ { TDataAbstractService_Proxy }
+ TDataAbstractService_Proxy = class(TROProxy, IDataAbstractService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ function GetSchema(const aFilter: Utf8String): Utf8String;
+ function GetData(const aTableNameArray: StringArray; const aTableRequestInfoArray: TableRequestInfoArray): Binary;
+ function UpdateData(const aDelta: Binary): Binary;
+ function ExecuteCommand(const aCommandName: Utf8String; const aParameterArray: DataParameterArray): Integer;
+ function ExecuteCommandEx(const aCommandName: Utf8String; const aInputParameters: DataParameterArray; out aOutputParameters: DataParameterArray): Integer;
+ function GetTableSchema(const aTableNameArray: StringArray): Utf8String;
+ function GetCommandSchema(const aCommandNameArray: StringArray): Utf8String;
+ function SQLGetData(const aSQLText: Utf8String; const aIncludeSchema: Boolean; const aMaxRecords: Integer): Binary;
+ function SQLGetDataEx(const aSQLText: Utf8String; const aIncludeSchema: Boolean; const aMaxRecords: Integer; const aDynamicWhereXML: Widestring): Binary;
+ function SQLExecuteCommand(const aSQLText: Utf8String): Integer;
+ function SQLExecuteCommandEx(const aSQLText: Utf8String; const aDynamicWhereXML: Widestring): Integer;
+ function GetDatasetScripts(const DatasetNames: Utf8String): Utf8String;
+ procedure RegisterForDataChangeNotification(const aTableName: Utf8String);
+ procedure UnregisterForDataChangeNotification(const aTableName: Utf8String);
+ end;
+
+ { IBaseLoginService }
+ IBaseLoginService = interface
+ ['{C349DB54-9DFB-454E-AD23-6F2166A624A6}']
+ procedure Logout;
+ end;
+
+ { CoBaseLoginService }
+ CoBaseLoginService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IBaseLoginService;
+ end;
+
+ { TBaseLoginService_Proxy }
+ TBaseLoginService_Proxy = class(TROProxy, IBaseLoginService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ procedure Logout;
+ end;
+
+ { IMultiDbLoginService }
+ IMultiDbLoginService = interface(IBaseLoginService)
+ ['{2C6D5764-01CE-447A-8264-27210B2C7371}']
+ function Login(const aUserID: Utf8String; const aPassword: Utf8String; const aConnectionName: Utf8String; out aUserInfo: UserInfo): Boolean;
+ end;
+
+ { CoMultiDbLoginService }
+ CoMultiDbLoginService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IMultiDbLoginService;
+ end;
+
+ { TMultiDbLoginService_Proxy }
+ TMultiDbLoginService_Proxy = class(TBaseLoginService_Proxy, IMultiDbLoginService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ function Login(const aUserID: Utf8String; const aPassword: Utf8String; const aConnectionName: Utf8String; out aUserInfo: UserInfo): Boolean;
+ end;
+
+ { IMultiDbLoginServiceV5 }
+ IMultiDbLoginServiceV5 = interface(IMultiDbLoginService)
+ ['{5A78AB01-2097-4473-A4D5-78980FFD90E4}']
+ function GetConnectionNames: StringArray;
+ function GetDefaultConnectionName: Utf8String;
+ end;
+
+ { CoMultiDbLoginServiceV5 }
+ CoMultiDbLoginServiceV5 = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IMultiDbLoginServiceV5;
+ end;
+
+ { TMultiDbLoginServiceV5_Proxy }
+ TMultiDbLoginServiceV5_Proxy = class(TMultiDbLoginService_Proxy, IMultiDbLoginServiceV5)
+ protected
+ function __GetInterfaceName:string; override;
+
+ function GetConnectionNames: StringArray;
+ function GetDefaultConnectionName: Utf8String;
+ end;
+
+ { ISimpleLoginService }
+ ISimpleLoginService = interface(IBaseLoginService)
+ ['{B186853B-168B-4E33-B798-467444BFC8C6}']
+ function Login(const aUserID: Utf8String; const aPassword: Utf8String; out aUserInfo: UserInfo): Boolean;
+ end;
+
+ { CoSimpleLoginService }
+ CoSimpleLoginService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): ISimpleLoginService;
+ end;
+
+ { TSimpleLoginService_Proxy }
+ TSimpleLoginService_Proxy = class(TBaseLoginService_Proxy, ISimpleLoginService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ function Login(const aUserID: Utf8String; const aPassword: Utf8String; out aUserInfo: UserInfo): Boolean;
+ end;
+
+ { IDataChangeNotification }
+ IDataChangeNotification = interface
+ ['{1309480C-AEF8-48E0-A27F-E6090F441B46}']
+ procedure OnDataTableChanged(const aTableName: Utf8String; const aDelta: Binary);
+ end;
+
+ { IDataChangeNotification_Writer }
+ IDataChangeNotification_Writer = interface(IROEventWriter)
+ ['{1309480C-AEF8-48E0-A27F-E6090F441B46}']
+ procedure OnDataTableChanged(const __Sender : TGUID; const aTableName: Utf8String; const aDelta: Binary);
+ end;
+
+implementation
+
+uses
+ {vcl:} SysUtils,
+ {RemObjects:} uROEventRepository, uROSerializer, uRORes;
+
+{ DataParameterArray }
+
+procedure DataParameterArray.Assign(iSource: TPersistent);
+var lSource:DataParameterArray;
+ i:integer;
+begin
+ if (iSource is DataParameterArray) then begin
+ lSource := DataParameterArray(iSource);
+ Clear();
+ Resize(lSource.Count);
+
+ for i := 0 to Count-1 do begin
+ if Assigned(lSource.Items[i]) then begin
+ Items[i].Assign(lSource.Items[i]);
+ end;
+ end;
+ end
+ else begin
+ inherited Assign(iSource);
+ end;
+end;
+
+class function DataParameterArray.GetItemType: PTypeInfo;
+begin
+ result := TypeInfo(DataParameter);
+end;
+
+class function DataParameterArray.GetItemClass: TClass;
+begin
+ result := DataParameter;
+end;
+
+class function DataParameterArray.GetItemSize: integer;
+begin
+ result := SizeOf(DataParameter);
+end;
+
+function DataParameterArray.GetItems(aIndex: integer): DataParameter;
+begin
+ if (aIndex < 0) or (aIndex >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);
+ result := fItems[aIndex];
+end;
+
+function DataParameterArray.GetItemRef(aIndex: integer): pointer;
+begin
+ if (aIndex < 0) or (aIndex >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);
+ result := fItems[aIndex];
+end;
+
+procedure DataParameterArray.SetItemRef(aIndex: integer; Ref: pointer);
+begin
+ if (aIndex < 0) or (aIndex >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);
+ if Ref <> fItems[aIndex] then begin
+ if fItems[aIndex] <> nil then fItems[aIndex].Free;
+ fItems[aIndex] := Ref;
+ end;
+end;
+
+procedure DataParameterArray.Clear;
+var i: integer;
+begin
+ for i := 0 to (Count-1) do fItems[i].Free();
+ SetLength(fItems, 0);
+ FCount := 0;
+end;
+
+procedure DataParameterArray.Delete(aIndex: integer);
+var i: integer;
+begin
+ if (aIndex>=Count) then RaiseError(err_InvalidIndex, [aIndex]);
+
+ fItems[aIndex].Free();
+
+ if (aIndex= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);
+ if fItems[aIndex] <> Value then begin
+ fItems[aIndex].Free;
+ fItems[aIndex] := Value;
+ end;
+end;
+
+procedure DataParameterArray.Resize(ElementCount: integer);
+var i: Integer;
+begin
+ if fCount = ElementCount then Exit;
+ for i := FCount -1 downto ElementCount do
+ FItems[i].Free;
+ SetLength(fItems, ElementCount);
+ for i := FCount to ElementCount -1 do
+ FItems[i] := DataParameter.Create;
+ FCount := ElementCount;
+end;
+
+function DataParameterArray.GetCount: integer;
+begin
+ result := FCount;
+end;
+
+procedure DataParameterArray.Grow;
+var
+ Delta, Capacity: Integer;
+begin
+ Capacity := Length(fItems);
+ if Capacity > 64 then
+ Delta := Capacity div 4
+ else
+ if Capacity > 8 then
+ Delta := 16
+ else
+ Delta := 4;
+ SetLength(fItems, Capacity + Delta);
+end;
+
+function DataParameterArray.Add: DataParameter;
+begin
+ result := DataParameter.Create;
+ Add(Result);
+end;
+
+function DataParameterArray.Add(const Value:DataParameter): integer;
+begin
+ Result := Count;
+ if Length(fItems) = Result then
+ Grow;
+ fItems[result] := Value;
+ Inc(fCount);
+end;
+
+procedure DataParameterArray.ReadComplex(ASerializer: TObject);
+var
+ lval: DataParameter;
+ i: integer;
+begin
+ for i := 0 to Count-1 do begin
+ with TROSerializer(ASerializer) do
+ ReadStruct(GetArrayElementName(GetItemType, GetItemRef(i)), DataParameter, lval, i);
+ Items[i] := lval;
+ end;
+end;
+
+procedure DataParameterArray.WriteComplex(ASerializer: TObject);
+var
+ i: integer;
+begin
+ for i := 0 to Count-1 do
+ with TROSerializer(ASerializer) do
+ WriteStruct(GetArrayElementName(GetItemType, GetItemRef(i)), fItems[i], DataParameter, i);
+end;
+
+{ TableRequestInfoArray }
+
+procedure TableRequestInfoArray.Assign(iSource: TPersistent);
+var lSource:TableRequestInfoArray;
+ i:integer;
+begin
+ if (iSource is TableRequestInfoArray) then begin
+ lSource := TableRequestInfoArray(iSource);
+ Clear();
+ Resize(lSource.Count);
+
+ for i := 0 to Count-1 do begin
+ if Assigned(lSource.Items[i]) then begin
+ Items[i].Assign(lSource.Items[i]);
+ end;
+ end;
+ end
+ else begin
+ inherited Assign(iSource);
+ end;
+end;
+
+class function TableRequestInfoArray.GetItemType: PTypeInfo;
+begin
+ result := TypeInfo(TableRequestInfo);
+end;
+
+class function TableRequestInfoArray.GetItemClass: TClass;
+begin
+ result := TableRequestInfo;
+end;
+
+class function TableRequestInfoArray.GetItemSize: integer;
+begin
+ result := SizeOf(TableRequestInfo);
+end;
+
+function TableRequestInfoArray.GetItems(aIndex: integer): TableRequestInfo;
+begin
+ if (aIndex < 0) or (aIndex >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);
+ result := fItems[aIndex];
+end;
+
+function TableRequestInfoArray.GetItemRef(aIndex: integer): pointer;
+begin
+ if (aIndex < 0) or (aIndex >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);
+ result := fItems[aIndex];
+end;
+
+procedure TableRequestInfoArray.SetItemRef(aIndex: integer; Ref: pointer);
+begin
+ if (aIndex < 0) or (aIndex >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);
+ if Ref <> fItems[aIndex] then begin
+ if fItems[aIndex] <> nil then fItems[aIndex].Free;
+ fItems[aIndex] := Ref;
+ end;
+end;
+
+procedure TableRequestInfoArray.Clear;
+var i: integer;
+begin
+ for i := 0 to (Count-1) do fItems[i].Free();
+ SetLength(fItems, 0);
+ FCount := 0;
+end;
+
+procedure TableRequestInfoArray.Delete(aIndex: integer);
+var i: integer;
+begin
+ if (aIndex>=Count) then RaiseError(err_InvalidIndex, [aIndex]);
+
+ fItems[aIndex].Free();
+
+ if (aIndex= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);
+ if fItems[aIndex] <> Value then begin
+ fItems[aIndex].Free;
+ fItems[aIndex] := Value;
+ end;
+end;
+
+procedure TableRequestInfoArray.Resize(ElementCount: integer);
+var i: Integer;
+begin
+ if fCount = ElementCount then Exit;
+ for i := FCount -1 downto ElementCount do
+ FItems[i].Free;
+ SetLength(fItems, ElementCount);
+ for i := FCount to ElementCount -1 do
+ FItems[i] := TableRequestInfo.Create;
+ FCount := ElementCount;
+end;
+
+function TableRequestInfoArray.GetCount: integer;
+begin
+ result := FCount;
+end;
+
+procedure TableRequestInfoArray.Grow;
+var
+ Delta, Capacity: Integer;
+begin
+ Capacity := Length(fItems);
+ if Capacity > 64 then
+ Delta := Capacity div 4
+ else
+ if Capacity > 8 then
+ Delta := 16
+ else
+ Delta := 4;
+ SetLength(fItems, Capacity + Delta);
+end;
+
+function TableRequestInfoArray.Add: TableRequestInfo;
+begin
+ result := TableRequestInfo.Create;
+ Add(Result);
+end;
+
+function TableRequestInfoArray.Add(const Value:TableRequestInfo): integer;
+begin
+ Result := Count;
+ if Length(fItems) = Result then
+ Grow;
+ fItems[result] := Value;
+ Inc(fCount);
+end;
+
+procedure TableRequestInfoArray.ReadComplex(ASerializer: TObject);
+var
+ lval: TableRequestInfo;
+ i: integer;
+begin
+ for i := 0 to Count-1 do begin
+ with TROSerializer(ASerializer) do
+ ReadStruct(GetArrayElementName(GetItemType, GetItemRef(i)), TableRequestInfo, lval, i);
+ Items[i] := lval;
+ end;
+end;
+
+procedure TableRequestInfoArray.WriteComplex(ASerializer: TObject);
+var
+ i: integer;
+begin
+ for i := 0 to Count-1 do
+ with TROSerializer(ASerializer) do
+ WriteStruct(GetArrayElementName(GetItemType, GetItemRef(i)), fItems[i], TableRequestInfo, i);
+end;
+
+{ StringArray }
+
+procedure StringArray.Assign(iSource: TPersistent);
+var lSource:StringArray;
+ i:integer;
+begin
+ if (iSource is StringArray) then begin
+ lSource := StringArray(iSource);
+ Clear();
+ Resize(lSource.Count);
+
+ for i := 0 to Count-1 do begin
+ Items[i] := lSource.Items[i];
+ end;
+ end
+ else begin
+ inherited Assign(iSource);
+ end;
+end;
+
+class function StringArray.GetItemType: PTypeInfo;
+begin
+ result := TypeInfo(Utf8String);
+end;
+
+class function StringArray.GetItemSize: integer;
+begin
+ result := SizeOf(Utf8String);
+end;
+
+function StringArray.GetItems(aIndex: integer): Utf8String;
+begin
+ if (aIndex < 0) or (aIndex >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);
+ result := fItems[aIndex];
+end;
+
+function StringArray.GetItemRef(aIndex: integer): pointer;
+begin
+ if (aIndex < 0) or (aIndex >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);
+ result := @fItems[aIndex];
+end;
+
+procedure StringArray.Clear;
+begin
+ SetLength(fItems, 0);
+ FCount := 0;
+end;
+
+procedure StringArray.Delete(aIndex: integer);
+var i: integer;
+begin
+ if (aIndex>=Count) then RaiseError(err_InvalidIndex, [aIndex]);
+
+ if (aIndex= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);
+ fItems[aIndex] := Value;
+end;
+
+procedure StringArray.Resize(ElementCount: integer);
+begin
+ if fCount = ElementCount then Exit;
+ SetLength(fItems, ElementCount);
+ FCount := ElementCount;
+end;
+
+function StringArray.GetCount: integer;
+begin
+ result := FCount;
+end;
+
+procedure StringArray.Grow;
+var
+ Delta, Capacity: Integer;
+begin
+ Capacity := Length(fItems);
+ if Capacity > 64 then
+ Delta := Capacity div 4
+ else
+ if Capacity > 8 then
+ Delta := 16
+ else
+ Delta := 4;
+ SetLength(fItems, Capacity + Delta);
+end;
+
+function StringArray.Add(const Value: Utf8String): integer;
+begin
+ Result := Count;
+ if Length(fItems) = Result then
+ Grow;
+ fItems[result] := Value;
+ Inc(fCount);
+end;
+
+function StringArray.GetIndex(const aPropertyName: string;
+ const aPropertyValue: Variant; StartFrom: integer;
+ Options: TROSearchOptions): integer;
+begin
+ result := -1;
+end;
+
+procedure StringArray.ReadComplex(ASerializer: TObject);
+var
+ lval: Utf8String;
+ i: integer;
+begin
+ for i := 0 to Count-1 do begin
+ with TROSerializer(ASerializer) do
+ ReadUTF8String(GetArrayElementName(GetItemType, GetItemRef(i)), lval, i);
+ Items[i] := lval;
+ end;
+end;
+
+procedure StringArray.WriteComplex(ASerializer: TObject);
+var
+ i: integer;
+begin
+ for i := 0 to Count-1 do
+ with TROSerializer(ASerializer) do
+ WriteUTF8String(GetArrayElementName(GetItemType, GetItemRef(i)), fItems[i], i);
+end;
+
+{ VariantArray }
+
+procedure VariantArray.Assign(iSource: TPersistent);
+var lSource:VariantArray;
+ i:integer;
+begin
+ if (iSource is VariantArray) then begin
+ lSource := VariantArray(iSource);
+ Clear();
+ Resize(lSource.Count);
+
+ for i := 0 to Count-1 do begin
+ Items[i] := lSource.Items[i];
+ end;
+ end
+ else begin
+ inherited Assign(iSource);
+ end;
+end;
+
+class function VariantArray.GetItemType: PTypeInfo;
+begin
+ result := TypeInfo(Variant);
+end;
+
+class function VariantArray.GetItemSize: integer;
+begin
+ result := SizeOf(Variant);
+end;
+
+function VariantArray.GetItems(aIndex: integer): Variant;
+begin
+ if (aIndex < 0) or (aIndex >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);
+ result := fItems[aIndex];
+end;
+
+function VariantArray.GetItemRef(aIndex: integer): pointer;
+begin
+ if (aIndex < 0) or (aIndex >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);
+ result := @fItems[aIndex];
+end;
+
+procedure VariantArray.Clear;
+begin
+ SetLength(fItems, 0);
+ FCount := 0;
+end;
+
+procedure VariantArray.Delete(aIndex: integer);
+var i: integer;
+begin
+ if (aIndex>=Count) then RaiseError(err_InvalidIndex, [aIndex]);
+
+ if (aIndex= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);
+ fItems[aIndex] := Value;
+end;
+
+procedure VariantArray.Resize(ElementCount: integer);
+begin
+ if fCount = ElementCount then Exit;
+ SetLength(fItems, ElementCount);
+ FCount := ElementCount;
+end;
+
+function VariantArray.GetCount: integer;
+begin
+ result := FCount;
+end;
+
+procedure VariantArray.Grow;
+var
+ Delta, Capacity: Integer;
+begin
+ Capacity := Length(fItems);
+ if Capacity > 64 then
+ Delta := Capacity div 4
+ else
+ if Capacity > 8 then
+ Delta := 16
+ else
+ Delta := 4;
+ SetLength(fItems, Capacity + Delta);
+end;
+
+function VariantArray.Add(const Value: Variant): integer;
+begin
+ Result := Count;
+ if Length(fItems) = Result then
+ Grow;
+ fItems[result] := Value;
+ Inc(fCount);
+end;
+
+function VariantArray.GetIndex(const aPropertyName: string;
+ const aPropertyValue: Variant; StartFrom: integer;
+ Options: TROSearchOptions): integer;
+begin
+ result := -1;
+end;
+
+procedure VariantArray.ReadComplex(ASerializer: TObject);
+var
+ lval: Variant;
+ i: integer;
+begin
+ for i := 0 to Count-1 do begin
+ with TROSerializer(ASerializer) do
+ ReadVariant(GetArrayElementName(GetItemType, GetItemRef(i)), lval, i);
+ Items[i] := lval;
+ end;
+end;
+
+procedure VariantArray.WriteComplex(ASerializer: TObject);
+var
+ i: integer;
+begin
+ for i := 0 to Count-1 do
+ with TROSerializer(ASerializer) do
+ WriteVariant(GetArrayElementName(GetItemType, GetItemRef(i)), fItems[i], i);
+end;
+
+{ ColumnSortingArray }
+
+procedure ColumnSortingArray.Assign(iSource: TPersistent);
+var lSource:ColumnSortingArray;
+ i:integer;
+begin
+ if (iSource is ColumnSortingArray) then begin
+ lSource := ColumnSortingArray(iSource);
+ Clear();
+ Resize(lSource.Count);
+
+ for i := 0 to Count-1 do begin
+ if Assigned(lSource.Items[i]) then begin
+ Items[i].Assign(lSource.Items[i]);
+ end;
+ end;
+ end
+ else begin
+ inherited Assign(iSource);
+ end;
+end;
+
+class function ColumnSortingArray.GetItemType: PTypeInfo;
+begin
+ result := TypeInfo(ColumnSorting);
+end;
+
+class function ColumnSortingArray.GetItemClass: TClass;
+begin
+ result := ColumnSorting;
+end;
+
+class function ColumnSortingArray.GetItemSize: integer;
+begin
+ result := SizeOf(ColumnSorting);
+end;
+
+function ColumnSortingArray.GetItems(aIndex: integer): ColumnSorting;
+begin
+ if (aIndex < 0) or (aIndex >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);
+ result := fItems[aIndex];
+end;
+
+function ColumnSortingArray.GetItemRef(aIndex: integer): pointer;
+begin
+ if (aIndex < 0) or (aIndex >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);
+ result := fItems[aIndex];
+end;
+
+procedure ColumnSortingArray.SetItemRef(aIndex: integer; Ref: pointer);
+begin
+ if (aIndex < 0) or (aIndex >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);
+ if Ref <> fItems[aIndex] then begin
+ if fItems[aIndex] <> nil then fItems[aIndex].Free;
+ fItems[aIndex] := Ref;
+ end;
+end;
+
+procedure ColumnSortingArray.Clear;
+var i: integer;
+begin
+ for i := 0 to (Count-1) do fItems[i].Free();
+ SetLength(fItems, 0);
+ FCount := 0;
+end;
+
+procedure ColumnSortingArray.Delete(aIndex: integer);
+var i: integer;
+begin
+ if (aIndex>=Count) then RaiseError(err_InvalidIndex, [aIndex]);
+
+ fItems[aIndex].Free();
+
+ if (aIndex= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);
+ if fItems[aIndex] <> Value then begin
+ fItems[aIndex].Free;
+ fItems[aIndex] := Value;
+ end;
+end;
+
+procedure ColumnSortingArray.Resize(ElementCount: integer);
+var i: Integer;
+begin
+ if fCount = ElementCount then Exit;
+ for i := FCount -1 downto ElementCount do
+ FItems[i].Free;
+ SetLength(fItems, ElementCount);
+ for i := FCount to ElementCount -1 do
+ FItems[i] := ColumnSorting.Create;
+ FCount := ElementCount;
+end;
+
+function ColumnSortingArray.GetCount: integer;
+begin
+ result := FCount;
+end;
+
+procedure ColumnSortingArray.Grow;
+var
+ Delta, Capacity: Integer;
+begin
+ Capacity := Length(fItems);
+ if Capacity > 64 then
+ Delta := Capacity div 4
+ else
+ if Capacity > 8 then
+ Delta := 16
+ else
+ Delta := 4;
+ SetLength(fItems, Capacity + Delta);
+end;
+
+function ColumnSortingArray.Add: ColumnSorting;
+begin
+ result := ColumnSorting.Create;
+ Add(Result);
+end;
+
+function ColumnSortingArray.Add(const Value:ColumnSorting): integer;
+begin
+ Result := Count;
+ if Length(fItems) = Result then
+ Grow;
+ fItems[result] := Value;
+ Inc(fCount);
+end;
+
+procedure ColumnSortingArray.ReadComplex(ASerializer: TObject);
+var
+ lval: ColumnSorting;
+ i: integer;
+begin
+ for i := 0 to Count-1 do begin
+ with TROSerializer(ASerializer) do
+ ReadStruct(GetArrayElementName(GetItemType, GetItemRef(i)), ColumnSorting, lval, i);
+ Items[i] := lval;
+ end;
+end;
+
+procedure ColumnSortingArray.WriteComplex(ASerializer: TObject);
+var
+ i: integer;
+begin
+ for i := 0 to Count-1 do
+ with TROSerializer(ASerializer) do
+ WriteStruct(GetArrayElementName(GetItemType, GetItemRef(i)), fItems[i], ColumnSorting, i);
+end;
+
+{ DataParameter }
+
+procedure DataParameter.Assign(iSource: TPersistent);
+var lSource: DataAbstract4_Intf.DataParameter;
+begin
+ inherited Assign(iSource);
+ if (iSource is DataAbstract4_Intf.DataParameter) then begin
+ lSource := DataAbstract4_Intf.DataParameter(iSource);
+ Name := lSource.Name;
+ Value := lSource.Value;
+ end;
+end;
+
+procedure DataParameter.ReadComplex(ASerializer: TObject);
+var
+ l_Name: Utf8String;
+ l_Value: Variant;
+begin
+ if TROSerializer(ASerializer).RecordStrictOrder then begin
+ l_Name := Name;
+ TROSerializer(ASerializer).ReadUTF8String('Name', l_Name);
+ Name := l_Name;
+ l_Value := Value;
+ TROSerializer(ASerializer).ReadVariant('Value', l_Value);
+ Value := l_Value;
+ end
+ else begin
+ l_Name := Name;
+ TROSerializer(ASerializer).ReadUTF8String('Name', l_Name);
+ Name := l_Name;
+ l_Value := Value;
+ TROSerializer(ASerializer).ReadVariant('Value', l_Value);
+ Value := l_Value;
+ end;
+end;
+
+procedure DataParameter.WriteComplex(ASerializer: TObject);
+var
+ l_Name: Utf8String;
+ l_Value: Variant;
+begin
+ if TROSerializer(ASerializer).RecordStrictOrder then begin
+ TROSerializer(ASerializer).ChangeClass(DataParameter);
+ l_Name := Name;
+ TROSerializer(ASerializer).WriteUTF8String('Name', l_Name);
+ l_Value := Value;
+ TROSerializer(ASerializer).WriteVariant('Value', l_Value);
+ end
+ else begin
+ l_Name := Name;
+ TROSerializer(ASerializer).WriteUTF8String('Name', l_Name);
+ l_Value := Value;
+ TROSerializer(ASerializer).WriteVariant('Value', l_Value);
+ end;
+end;
+
+{ DataParameterCollection }
+constructor DataParameterCollection.Create;
+begin
+ inherited Create(DataParameter);
+end;
+
+constructor DataParameterCollection.Create(aItemClass: TCollectionItemClass);
+begin
+ inherited Create(aItemClass);
+end;
+
+function DataParameterCollection.Add: DataParameter;
+begin
+ result := DataParameter(inherited Add);
+end;
+
+function DataParameterCollection.GetItems(aIndex: integer): DataParameter;
+begin
+ result := DataParameter(inherited Items[aIndex]);
+end;
+
+procedure DataParameterCollection.LoadFromArray(anArray: DataParameterArray);
+var i : integer;
+begin
+ Clear;
+ for i := 0 to (anArray.Count-1) do
+ Add.Assign(anArray[i]);
+end;
+
+procedure DataParameterCollection.SaveToArray(anArray: DataParameterArray);
+var i : integer;
+begin
+ anArray.Clear;
+ anArray.Resize(Count);
+ for i := 0 to (Count-1) do begin
+ anArray[i] := DataParameter.Create;
+ anArray[i].Assign(Items[i]);
+ end;
+end;
+
+procedure DataParameterCollection.SetItems(aIndex: integer; const Value: DataParameter);
+begin
+ DataParameter(inherited Items[aIndex]).Assign(Value);
+end;
+
+{ TableRequestInfo }
+
+procedure TableRequestInfo.Assign(iSource: TPersistent);
+var lSource: DataAbstract4_Intf.TableRequestInfo;
+begin
+ inherited Assign(iSource);
+ if (iSource is DataAbstract4_Intf.TableRequestInfo) then begin
+ lSource := DataAbstract4_Intf.TableRequestInfo(iSource);
+ UserFilter := lSource.UserFilter;
+ IncludeSchema := lSource.IncludeSchema;
+ MaxRecords := lSource.MaxRecords;
+ Parameters.Assign(lSource.Parameters);
+ end;
+end;
+constructor TableRequestInfo.Create(aCollection : TCollection);
+begin
+ inherited Create(aCollection);
+ fMaxRecords := -1;
+end;
+
+function TableRequestInfo.GetParameters: DataParameterArray;
+begin
+ if (fParameters = nil) then fParameters := DataParameterArray.Create();
+ result := fParameters;
+end;
+
+procedure TableRequestInfo.ReadComplex(ASerializer: TObject);
+var
+ l_IncludeSchema: Boolean;
+ l_MaxRecords: Integer;
+ l_Parameters: DataParameterArray;
+ l_UserFilter: Utf8String;
+begin
+ if TROSerializer(ASerializer).RecordStrictOrder then begin
+ l_UserFilter := UserFilter;
+ TROSerializer(ASerializer).ReadUTF8String('UserFilter', l_UserFilter);
+ UserFilter := l_UserFilter;
+ l_IncludeSchema := IncludeSchema;
+ TROSerializer(ASerializer).ReadEnumerated('IncludeSchema',TypeInfo(boolean), l_IncludeSchema);
+ IncludeSchema := l_IncludeSchema;
+ l_MaxRecords := MaxRecords;
+ TROSerializer(ASerializer).ReadInteger('MaxRecords', otSLong, l_MaxRecords);
+ MaxRecords := l_MaxRecords;
+ l_Parameters := Parameters;
+ TROSerializer(ASerializer).ReadArray('Parameters', DataParameterArray, l_Parameters);
+ if Parameters <> l_Parameters then Parameters.Free;
+ Parameters := l_Parameters;
+ end
+ else begin
+ l_IncludeSchema := IncludeSchema;
+ TROSerializer(ASerializer).ReadEnumerated('IncludeSchema',TypeInfo(boolean), l_IncludeSchema);
+ IncludeSchema := l_IncludeSchema;
+ l_MaxRecords := MaxRecords;
+ TROSerializer(ASerializer).ReadInteger('MaxRecords', otSLong, l_MaxRecords);
+ MaxRecords := l_MaxRecords;
+ l_Parameters := Parameters;
+ TROSerializer(ASerializer).ReadArray('Parameters', DataParameterArray, l_Parameters);
+ if Parameters <> l_Parameters then Parameters.Free;
+ Parameters := l_Parameters;
+ l_UserFilter := UserFilter;
+ TROSerializer(ASerializer).ReadUTF8String('UserFilter', l_UserFilter);
+ UserFilter := l_UserFilter;
+ end;
+end;
+
+procedure TableRequestInfo.WriteComplex(ASerializer: TObject);
+var
+ l_IncludeSchema: Boolean;
+ l_MaxRecords: Integer;
+ l_Parameters: DataParameterArray;
+ l_UserFilter: Utf8String;
+begin
+ if TROSerializer(ASerializer).RecordStrictOrder then begin
+ TROSerializer(ASerializer).ChangeClass(TableRequestInfo);
+ l_UserFilter := UserFilter;
+ TROSerializer(ASerializer).WriteUTF8String('UserFilter', l_UserFilter);
+ l_IncludeSchema := IncludeSchema;
+ TROSerializer(ASerializer).WriteEnumerated('IncludeSchema',TypeInfo(boolean), l_IncludeSchema);
+ l_MaxRecords := MaxRecords;
+ TROSerializer(ASerializer).WriteInteger('MaxRecords', otSLong, l_MaxRecords);
+ l_Parameters := Parameters;
+ TROSerializer(ASerializer).WriteArray('Parameters', l_Parameters, DataParameterArray);
+ end
+ else begin
+ l_IncludeSchema := IncludeSchema;
+ TROSerializer(ASerializer).WriteEnumerated('IncludeSchema',TypeInfo(boolean), l_IncludeSchema);
+ l_MaxRecords := MaxRecords;
+ TROSerializer(ASerializer).WriteInteger('MaxRecords', otSLong, l_MaxRecords);
+ l_Parameters := Parameters;
+ TROSerializer(ASerializer).WriteArray('Parameters', l_Parameters, DataParameterArray);
+ l_UserFilter := UserFilter;
+ TROSerializer(ASerializer).WriteUTF8String('UserFilter', l_UserFilter);
+ end;
+end;
+
+{ TableRequestInfoCollection }
+constructor TableRequestInfoCollection.Create;
+begin
+ inherited Create(TableRequestInfo);
+end;
+
+constructor TableRequestInfoCollection.Create(aItemClass: TCollectionItemClass);
+begin
+ inherited Create(aItemClass);
+end;
+
+function TableRequestInfoCollection.Add: TableRequestInfo;
+begin
+ result := TableRequestInfo(inherited Add);
+end;
+
+function TableRequestInfoCollection.GetItems(aIndex: integer): TableRequestInfo;
+begin
+ result := TableRequestInfo(inherited Items[aIndex]);
+end;
+
+procedure TableRequestInfoCollection.LoadFromArray(anArray: TableRequestInfoArray);
+var i : integer;
+begin
+ Clear;
+ for i := 0 to (anArray.Count-1) do
+ Add.Assign(anArray[i]);
+end;
+
+procedure TableRequestInfoCollection.SaveToArray(anArray: TableRequestInfoArray);
+var i : integer;
+begin
+ anArray.Clear;
+ anArray.Resize(Count);
+ for i := 0 to (Count-1) do begin
+ anArray[i] := TableRequestInfo.Create;
+ anArray[i].Assign(Items[i]);
+ end;
+end;
+
+procedure TableRequestInfoCollection.SetItems(aIndex: integer; const Value: TableRequestInfo);
+begin
+ TableRequestInfo(inherited Items[aIndex]).Assign(Value);
+end;
+
+{ UserInfo }
+
+procedure UserInfo.Assign(iSource: TPersistent);
+var lSource: DataAbstract4_Intf.UserInfo;
+begin
+ inherited Assign(iSource);
+ if (iSource is DataAbstract4_Intf.UserInfo) then begin
+ lSource := DataAbstract4_Intf.UserInfo(iSource);
+ SessionID := lSource.SessionID;
+ UserID := lSource.UserID;
+ Privileges.Assign(lSource.Privileges);
+ Attributes.Assign(lSource.Attributes);
+ UserData.Assign(lSource.UserData);
+ end;
+end;
+
+function UserInfo.GetPrivileges: StringArray;
+begin
+ if (fPrivileges = nil) then fPrivileges := StringArray.Create();
+ result := fPrivileges;
+end;
+
+function UserInfo.GetAttributes: VariantArray;
+begin
+ if (fAttributes = nil) then fAttributes := VariantArray.Create();
+ result := fAttributes;
+end;
+
+function UserInfo.GetUserData: Binary;
+begin
+ if (fUserData = nil) then fUserData := Binary.Create();
+ result := fUserData;
+end;
+
+procedure UserInfo.ReadComplex(ASerializer: TObject);
+var
+ l_Attributes: VariantArray;
+ l_Privileges: StringArray;
+ l_SessionID: Utf8String;
+ l_UserData: Binary;
+ l_UserID: Utf8String;
+begin
+ if TROSerializer(ASerializer).RecordStrictOrder then begin
+ l_SessionID := SessionID;
+ TROSerializer(ASerializer).ReadUTF8String('SessionID', l_SessionID);
+ SessionID := l_SessionID;
+ l_UserID := UserID;
+ TROSerializer(ASerializer).ReadUTF8String('UserID', l_UserID);
+ UserID := l_UserID;
+ l_Privileges := Privileges;
+ TROSerializer(ASerializer).ReadArray('Privileges', StringArray, l_Privileges);
+ if Privileges <> l_Privileges then Privileges.Free;
+ Privileges := l_Privileges;
+ l_Attributes := Attributes;
+ TROSerializer(ASerializer).ReadArray('Attributes', VariantArray, l_Attributes);
+ if Attributes <> l_Attributes then Attributes.Free;
+ Attributes := l_Attributes;
+ l_UserData := UserData;
+ TROSerializer(ASerializer).ReadBinary('UserData', l_UserData);
+ if UserData <> l_UserData then UserData.Free;
+ UserData := l_UserData;
+ end
+ else begin
+ l_Attributes := Attributes;
+ TROSerializer(ASerializer).ReadArray('Attributes', VariantArray, l_Attributes);
+ if Attributes <> l_Attributes then Attributes.Free;
+ Attributes := l_Attributes;
+ l_Privileges := Privileges;
+ TROSerializer(ASerializer).ReadArray('Privileges', StringArray, l_Privileges);
+ if Privileges <> l_Privileges then Privileges.Free;
+ Privileges := l_Privileges;
+ l_SessionID := SessionID;
+ TROSerializer(ASerializer).ReadUTF8String('SessionID', l_SessionID);
+ SessionID := l_SessionID;
+ l_UserData := UserData;
+ TROSerializer(ASerializer).ReadBinary('UserData', l_UserData);
+ if UserData <> l_UserData then UserData.Free;
+ UserData := l_UserData;
+ l_UserID := UserID;
+ TROSerializer(ASerializer).ReadUTF8String('UserID', l_UserID);
+ UserID := l_UserID;
+ end;
+end;
+
+procedure UserInfo.WriteComplex(ASerializer: TObject);
+var
+ l_Attributes: VariantArray;
+ l_Privileges: StringArray;
+ l_SessionID: Utf8String;
+ l_UserData: Binary;
+ l_UserID: Utf8String;
+begin
+ if TROSerializer(ASerializer).RecordStrictOrder then begin
+ TROSerializer(ASerializer).ChangeClass(UserInfo);
+ l_SessionID := SessionID;
+ TROSerializer(ASerializer).WriteUTF8String('SessionID', l_SessionID);
+ l_UserID := UserID;
+ TROSerializer(ASerializer).WriteUTF8String('UserID', l_UserID);
+ l_Privileges := Privileges;
+ TROSerializer(ASerializer).WriteArray('Privileges', l_Privileges, StringArray);
+ l_Attributes := Attributes;
+ TROSerializer(ASerializer).WriteArray('Attributes', l_Attributes, VariantArray);
+ l_UserData := UserData;
+ TROSerializer(ASerializer).WriteBinary('UserData', l_UserData);
+ end
+ else begin
+ l_Attributes := Attributes;
+ TROSerializer(ASerializer).WriteArray('Attributes', l_Attributes, VariantArray);
+ l_Privileges := Privileges;
+ TROSerializer(ASerializer).WriteArray('Privileges', l_Privileges, StringArray);
+ l_SessionID := SessionID;
+ TROSerializer(ASerializer).WriteUTF8String('SessionID', l_SessionID);
+ l_UserData := UserData;
+ TROSerializer(ASerializer).WriteBinary('UserData', l_UserData);
+ l_UserID := UserID;
+ TROSerializer(ASerializer).WriteUTF8String('UserID', l_UserID);
+ end;
+end;
+
+{ UserInfoCollection }
+constructor UserInfoCollection.Create;
+begin
+ inherited Create(UserInfo);
+end;
+
+constructor UserInfoCollection.Create(aItemClass: TCollectionItemClass);
+begin
+ inherited Create(aItemClass);
+end;
+
+function UserInfoCollection.Add: UserInfo;
+begin
+ result := UserInfo(inherited Add);
+end;
+
+function UserInfoCollection.GetItems(aIndex: integer): UserInfo;
+begin
+ result := UserInfo(inherited Items[aIndex]);
+end;
+
+procedure UserInfoCollection.SetItems(aIndex: integer; const Value: UserInfo);
+begin
+ UserInfo(inherited Items[aIndex]).Assign(Value);
+end;
+
+{ TableRequestInfoV5 }
+
+procedure TableRequestInfoV5.Assign(iSource: TPersistent);
+var lSource: DataAbstract4_Intf.TableRequestInfoV5;
+begin
+ inherited Assign(iSource);
+ if (iSource is DataAbstract4_Intf.TableRequestInfoV5) then begin
+ lSource := DataAbstract4_Intf.TableRequestInfoV5(iSource);
+ WhereClause := lSource.WhereClause;
+ DynamicSelectFieldNames.Assign(lSource.DynamicSelectFieldNames);
+ Sorting.Assign(lSource.Sorting);
+ end;
+end;
+
+function TableRequestInfoV5.GetDynamicSelectFieldNames: StringArray;
+begin
+ if (fDynamicSelectFieldNames = nil) then fDynamicSelectFieldNames := StringArray.Create();
+ result := fDynamicSelectFieldNames;
+end;
+
+function TableRequestInfoV5.GetSorting: ColumnSorting;
+begin
+ if (fSorting = nil) then fSorting := ColumnSorting.Create();
+ result := fSorting;
+end;
+
+procedure TableRequestInfoV5.ReadComplex(ASerializer: TObject);
+var
+ l_DynamicSelectFieldNames: StringArray;
+ l_IncludeSchema: Boolean;
+ l_MaxRecords: Integer;
+ l_Parameters: DataParameterArray;
+ l_Sorting: ColumnSorting;
+ l_UserFilter: Utf8String;
+ l_WhereClause: IXmlNode;
+begin
+ if TROSerializer(ASerializer).RecordStrictOrder then begin
+ inherited;
+ l_WhereClause := WhereClause;
+ TROSerializer(ASerializer).ReadXML('WhereClause', l_WhereClause);
+ WhereClause := l_WhereClause;
+ l_DynamicSelectFieldNames := DynamicSelectFieldNames;
+ TROSerializer(ASerializer).ReadArray('DynamicSelectFieldNames', StringArray, l_DynamicSelectFieldNames);
+ if DynamicSelectFieldNames <> l_DynamicSelectFieldNames then DynamicSelectFieldNames.Free;
+ DynamicSelectFieldNames := l_DynamicSelectFieldNames;
+ l_Sorting := Sorting;
+ TROSerializer(ASerializer).ReadStruct('Sorting', ColumnSorting, l_Sorting);
+ if Sorting <> l_Sorting then Sorting.Free;
+ Sorting := l_Sorting;
+ end
+ else begin
+ l_DynamicSelectFieldNames := DynamicSelectFieldNames;
+ TROSerializer(ASerializer).ReadArray('DynamicSelectFieldNames', StringArray, l_DynamicSelectFieldNames);
+ if DynamicSelectFieldNames <> l_DynamicSelectFieldNames then DynamicSelectFieldNames.Free;
+ DynamicSelectFieldNames := l_DynamicSelectFieldNames;
+ l_IncludeSchema := IncludeSchema;
+ TROSerializer(ASerializer).ReadEnumerated('IncludeSchema',TypeInfo(boolean), l_IncludeSchema);
+ IncludeSchema := l_IncludeSchema;
+ l_MaxRecords := MaxRecords;
+ TROSerializer(ASerializer).ReadInteger('MaxRecords', otSLong, l_MaxRecords);
+ MaxRecords := l_MaxRecords;
+ l_Parameters := Parameters;
+ TROSerializer(ASerializer).ReadArray('Parameters', DataParameterArray, l_Parameters);
+ if Parameters <> l_Parameters then Parameters.Free;
+ Parameters := l_Parameters;
+ l_Sorting := Sorting;
+ TROSerializer(ASerializer).ReadStruct('Sorting', ColumnSorting, l_Sorting);
+ if Sorting <> l_Sorting then Sorting.Free;
+ Sorting := l_Sorting;
+ l_UserFilter := UserFilter;
+ TROSerializer(ASerializer).ReadUTF8String('UserFilter', l_UserFilter);
+ UserFilter := l_UserFilter;
+ l_WhereClause := WhereClause;
+ TROSerializer(ASerializer).ReadXML('WhereClause', l_WhereClause);
+ WhereClause := l_WhereClause;
+ end;
+end;
+
+procedure TableRequestInfoV5.WriteComplex(ASerializer: TObject);
+var
+ l_DynamicSelectFieldNames: StringArray;
+ l_IncludeSchema: Boolean;
+ l_MaxRecords: Integer;
+ l_Parameters: DataParameterArray;
+ l_Sorting: ColumnSorting;
+ l_UserFilter: Utf8String;
+ l_WhereClause: IXmlNode;
+begin
+ if TROSerializer(ASerializer).RecordStrictOrder then begin
+ inherited;
+ TROSerializer(ASerializer).ChangeClass(TableRequestInfoV5);
+ l_WhereClause := WhereClause;
+ TROSerializer(ASerializer).WriteXML('WhereClause', l_WhereClause);
+ l_DynamicSelectFieldNames := DynamicSelectFieldNames;
+ TROSerializer(ASerializer).WriteArray('DynamicSelectFieldNames', l_DynamicSelectFieldNames, StringArray);
+ l_Sorting := Sorting;
+ TROSerializer(ASerializer).WriteStruct('Sorting', l_Sorting, ColumnSorting);
+ end
+ else begin
+ l_DynamicSelectFieldNames := DynamicSelectFieldNames;
+ TROSerializer(ASerializer).WriteArray('DynamicSelectFieldNames', l_DynamicSelectFieldNames, StringArray);
+ l_IncludeSchema := IncludeSchema;
+ TROSerializer(ASerializer).WriteEnumerated('IncludeSchema',TypeInfo(boolean), l_IncludeSchema);
+ l_MaxRecords := MaxRecords;
+ TROSerializer(ASerializer).WriteInteger('MaxRecords', otSLong, l_MaxRecords);
+ l_Parameters := Parameters;
+ TROSerializer(ASerializer).WriteArray('Parameters', l_Parameters, DataParameterArray);
+ l_Sorting := Sorting;
+ TROSerializer(ASerializer).WriteStruct('Sorting', l_Sorting, ColumnSorting);
+ l_UserFilter := UserFilter;
+ TROSerializer(ASerializer).WriteUTF8String('UserFilter', l_UserFilter);
+ l_WhereClause := WhereClause;
+ TROSerializer(ASerializer).WriteXML('WhereClause', l_WhereClause);
+ end;
+end;
+
+{ TableRequestInfoV5Collection }
+constructor TableRequestInfoV5Collection.Create;
+begin
+ inherited Create(TableRequestInfoV5);
+end;
+
+constructor TableRequestInfoV5Collection.Create(aItemClass: TCollectionItemClass);
+begin
+ inherited Create(aItemClass);
+end;
+
+function TableRequestInfoV5Collection.Add: TableRequestInfoV5;
+begin
+ result := TableRequestInfoV5(inherited Add);
+end;
+
+function TableRequestInfoV5Collection.GetItems(aIndex: integer): TableRequestInfoV5;
+begin
+ result := TableRequestInfoV5(inherited Items[aIndex]);
+end;
+
+procedure TableRequestInfoV5Collection.SetItems(aIndex: integer; const Value: TableRequestInfoV5);
+begin
+ TableRequestInfoV5(inherited Items[aIndex]).Assign(Value);
+end;
+
+{ ColumnSorting }
+
+procedure ColumnSorting.Assign(iSource: TPersistent);
+var lSource: DataAbstract4_Intf.ColumnSorting;
+begin
+ inherited Assign(iSource);
+ if (iSource is DataAbstract4_Intf.ColumnSorting) then begin
+ lSource := DataAbstract4_Intf.ColumnSorting(iSource);
+ FieldName := lSource.FieldName;
+ SortDirection := lSource.SortDirection;
+ end;
+end;
+
+procedure ColumnSorting.ReadComplex(ASerializer: TObject);
+var
+ l_FieldName: Utf8String;
+ l_SortDirection: ColumnSortDirection;
+begin
+ if TROSerializer(ASerializer).RecordStrictOrder then begin
+ l_FieldName := FieldName;
+ TROSerializer(ASerializer).ReadUTF8String('FieldName', l_FieldName);
+ FieldName := l_FieldName;
+ l_SortDirection := SortDirection;
+ TROSerializer(ASerializer).ReadEnumerated('SortDirection',TypeInfo(ColumnSortDirection), l_SortDirection);
+ SortDirection := l_SortDirection;
+ end
+ else begin
+ l_FieldName := FieldName;
+ TROSerializer(ASerializer).ReadUTF8String('FieldName', l_FieldName);
+ FieldName := l_FieldName;
+ l_SortDirection := SortDirection;
+ TROSerializer(ASerializer).ReadEnumerated('SortDirection',TypeInfo(ColumnSortDirection), l_SortDirection);
+ SortDirection := l_SortDirection;
+ end;
+end;
+
+procedure ColumnSorting.WriteComplex(ASerializer: TObject);
+var
+ l_FieldName: Utf8String;
+ l_SortDirection: ColumnSortDirection;
+begin
+ if TROSerializer(ASerializer).RecordStrictOrder then begin
+ TROSerializer(ASerializer).ChangeClass(ColumnSorting);
+ l_FieldName := FieldName;
+ TROSerializer(ASerializer).WriteUTF8String('FieldName', l_FieldName);
+ l_SortDirection := SortDirection;
+ TROSerializer(ASerializer).WriteEnumerated('SortDirection',TypeInfo(ColumnSortDirection), l_SortDirection);
+ end
+ else begin
+ l_FieldName := FieldName;
+ TROSerializer(ASerializer).WriteUTF8String('FieldName', l_FieldName);
+ l_SortDirection := SortDirection;
+ TROSerializer(ASerializer).WriteEnumerated('SortDirection',TypeInfo(ColumnSortDirection), l_SortDirection);
+ end;
+end;
+
+{ ColumnSortingCollection }
+constructor ColumnSortingCollection.Create;
+begin
+ inherited Create(ColumnSorting);
+end;
+
+constructor ColumnSortingCollection.Create(aItemClass: TCollectionItemClass);
+begin
+ inherited Create(aItemClass);
+end;
+
+function ColumnSortingCollection.Add: ColumnSorting;
+begin
+ result := ColumnSorting(inherited Add);
+end;
+
+function ColumnSortingCollection.GetItems(aIndex: integer): ColumnSorting;
+begin
+ result := ColumnSorting(inherited Items[aIndex]);
+end;
+
+procedure ColumnSortingCollection.LoadFromArray(anArray: ColumnSortingArray);
+var i : integer;
+begin
+ Clear;
+ for i := 0 to (anArray.Count-1) do
+ Add.Assign(anArray[i]);
+end;
+
+procedure ColumnSortingCollection.SaveToArray(anArray: ColumnSortingArray);
+var i : integer;
+begin
+ anArray.Clear;
+ anArray.Resize(Count);
+ for i := 0 to (Count-1) do begin
+ anArray[i] := ColumnSorting.Create;
+ anArray[i].Assign(Items[i]);
+ end;
+end;
+
+procedure ColumnSortingCollection.SetItems(aIndex: integer; const Value: ColumnSorting);
+begin
+ ColumnSorting(inherited Items[aIndex]).Assign(Value);
+end;
+
+{ CoDataAbstractService }
+
+class function CoDataAbstractService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IDataAbstractService;
+begin
+ result := TDataAbstractService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TDataAbstractService_Proxy }
+
+function TDataAbstractService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'DataAbstractService';
+end;
+
+function TDataAbstractService_Proxy.GetSchema(const aFilter: Utf8String): Utf8String;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract4', __InterfaceName, 'GetSchema');
+ __Message.Write('aFilter', TypeInfo(Utf8String), aFilter, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Utf8String), result, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+function TDataAbstractService_Proxy.GetData(const aTableNameArray: StringArray; const aTableRequestInfoArray: TableRequestInfoArray): Binary;
+begin
+ try
+ result := nil;
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract4', __InterfaceName, 'GetData');
+ __Message.Write('aTableNameArray', TypeInfo(DataAbstract4_Intf.StringArray), aTableNameArray, []);
+ __Message.Write('aTableRequestInfoArray', TypeInfo(DataAbstract4_Intf.TableRequestInfoArray), aTableRequestInfoArray, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Binary), result, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+function TDataAbstractService_Proxy.UpdateData(const aDelta: Binary): Binary;
+begin
+ try
+ result := nil;
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract4', __InterfaceName, 'UpdateData');
+ __Message.Write('aDelta', TypeInfo(Binary), aDelta, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Binary), result, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+function TDataAbstractService_Proxy.ExecuteCommand(const aCommandName: Utf8String; const aParameterArray: DataParameterArray): Integer;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract4', __InterfaceName, 'ExecuteCommand');
+ __Message.Write('aCommandName', TypeInfo(Utf8String), aCommandName, []);
+ __Message.Write('aParameterArray', TypeInfo(DataAbstract4_Intf.DataParameterArray), aParameterArray, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Integer), result, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+function TDataAbstractService_Proxy.ExecuteCommandEx(const aCommandName: Utf8String; const aInputParameters: DataParameterArray; out aOutputParameters: DataParameterArray): Integer;
+begin
+ try
+ aOutputParameters := nil;
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract4', __InterfaceName, 'ExecuteCommandEx');
+ __Message.Write('aCommandName', TypeInfo(Utf8String), aCommandName, []);
+ __Message.Write('aInputParameters', TypeInfo(DataAbstract4_Intf.DataParameterArray), aInputParameters, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Integer), result, []);
+ __Message.Read('aOutputParameters', TypeInfo(DataAbstract4_Intf.DataParameterArray), aOutputParameters, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+function TDataAbstractService_Proxy.GetTableSchema(const aTableNameArray: StringArray): Utf8String;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract4', __InterfaceName, 'GetTableSchema');
+ __Message.Write('aTableNameArray', TypeInfo(DataAbstract4_Intf.StringArray), aTableNameArray, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Utf8String), result, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+function TDataAbstractService_Proxy.GetCommandSchema(const aCommandNameArray: StringArray): Utf8String;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract4', __InterfaceName, 'GetCommandSchema');
+ __Message.Write('aCommandNameArray', TypeInfo(DataAbstract4_Intf.StringArray), aCommandNameArray, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Utf8String), result, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+function TDataAbstractService_Proxy.SQLGetData(const aSQLText: Utf8String; const aIncludeSchema: Boolean; const aMaxRecords: Integer): Binary;
+begin
+ try
+ result := nil;
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract4', __InterfaceName, 'SQLGetData');
+ __Message.Write('aSQLText', TypeInfo(Utf8String), aSQLText, []);
+ __Message.Write('aIncludeSchema', TypeInfo(Boolean), aIncludeSchema, []);
+ __Message.Write('aMaxRecords', TypeInfo(Integer), aMaxRecords, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Binary), result, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+function TDataAbstractService_Proxy.SQLGetDataEx(const aSQLText: Utf8String; const aIncludeSchema: Boolean; const aMaxRecords: Integer; const aDynamicWhereXML: Widestring): Binary;
+begin
+ try
+ result := nil;
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract4', __InterfaceName, 'SQLGetDataEx');
+ __Message.Write('aSQLText', TypeInfo(Utf8String), aSQLText, []);
+ __Message.Write('aIncludeSchema', TypeInfo(Boolean), aIncludeSchema, []);
+ __Message.Write('aMaxRecords', TypeInfo(Integer), aMaxRecords, []);
+ __Message.Write('aDynamicWhereXML', TypeInfo(Widestring), aDynamicWhereXML, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Binary), result, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+function TDataAbstractService_Proxy.SQLExecuteCommand(const aSQLText: Utf8String): Integer;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract4', __InterfaceName, 'SQLExecuteCommand');
+ __Message.Write('aSQLText', TypeInfo(Utf8String), aSQLText, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Integer), result, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+function TDataAbstractService_Proxy.SQLExecuteCommandEx(const aSQLText: Utf8String; const aDynamicWhereXML: Widestring): Integer;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract4', __InterfaceName, 'SQLExecuteCommandEx');
+ __Message.Write('aSQLText', TypeInfo(Utf8String), aSQLText, []);
+ __Message.Write('aDynamicWhereXML', TypeInfo(Widestring), aDynamicWhereXML, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Integer), result, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+function TDataAbstractService_Proxy.GetDatasetScripts(const DatasetNames: Utf8String): Utf8String;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract4', __InterfaceName, 'GetDatasetScripts');
+ __Message.Write('DatasetNames', TypeInfo(Utf8String), DatasetNames, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Utf8String), result, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+procedure TDataAbstractService_Proxy.RegisterForDataChangeNotification(const aTableName: Utf8String);
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract4', __InterfaceName, 'RegisterForDataChangeNotification');
+ __Message.Write('aTableName', TypeInfo(Utf8String), aTableName, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+procedure TDataAbstractService_Proxy.UnregisterForDataChangeNotification(const aTableName: Utf8String);
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract4', __InterfaceName, 'UnregisterForDataChangeNotification');
+ __Message.Write('aTableName', TypeInfo(Utf8String), aTableName, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+{ CoSimpleLoginService }
+
+class function CoSimpleLoginService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): ISimpleLoginService;
+begin
+ result := TSimpleLoginService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TSimpleLoginService_Proxy }
+
+function TSimpleLoginService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'SimpleLoginService';
+end;
+
+function TSimpleLoginService_Proxy.Login(const aUserID: Utf8String; const aPassword: Utf8String; out aUserInfo: UserInfo): Boolean;
+begin
+ try
+ aUserInfo := nil;
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract4', __InterfaceName, 'Login');
+ __Message.Write('aUserID', TypeInfo(Utf8String), aUserID, []);
+ __Message.Write('aPassword', TypeInfo(Utf8String), aPassword, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Boolean), result, []);
+ __Message.Read('aUserInfo', TypeInfo(DataAbstract4_Intf.UserInfo), aUserInfo, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+{ CoBaseLoginService }
+
+class function CoBaseLoginService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IBaseLoginService;
+begin
+ result := TBaseLoginService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TBaseLoginService_Proxy }
+
+function TBaseLoginService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'BaseLoginService';
+end;
+
+procedure TBaseLoginService_Proxy.Logout;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract4', __InterfaceName, 'Logout');
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+{ CoMultiDbLoginService }
+
+class function CoMultiDbLoginService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IMultiDbLoginService;
+begin
+ result := TMultiDbLoginService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TMultiDbLoginService_Proxy }
+
+function TMultiDbLoginService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'MultiDbLoginService';
+end;
+
+function TMultiDbLoginService_Proxy.Login(const aUserID: Utf8String; const aPassword: Utf8String; const aConnectionName: Utf8String; out aUserInfo: UserInfo): Boolean;
+begin
+ try
+ aUserInfo := nil;
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract4', __InterfaceName, 'Login');
+ __Message.Write('aUserID', TypeInfo(Utf8String), aUserID, []);
+ __Message.Write('aPassword', TypeInfo(Utf8String), aPassword, []);
+ __Message.Write('aConnectionName', TypeInfo(Utf8String), aConnectionName, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Boolean), result, []);
+ __Message.Read('aUserInfo', TypeInfo(DataAbstract4_Intf.UserInfo), aUserInfo, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+{ CoMultiDbLoginServiceV5 }
+
+class function CoMultiDbLoginServiceV5.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IMultiDbLoginServiceV5;
+begin
+ result := TMultiDbLoginServiceV5_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TMultiDbLoginServiceV5_Proxy }
+
+function TMultiDbLoginServiceV5_Proxy.__GetInterfaceName:string;
+begin
+ result := 'MultiDbLoginServiceV5';
+end;
+
+function TMultiDbLoginServiceV5_Proxy.GetConnectionNames: StringArray;
+begin
+ try
+ result := nil;
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract4', __InterfaceName, 'GetConnectionNames');
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(DataAbstract4_Intf.StringArray), result, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+function TMultiDbLoginServiceV5_Proxy.GetDefaultConnectionName: Utf8String;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'DataAbstract4', __InterfaceName, 'GetDefaultConnectionName');
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Utf8String), result, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+type
+ { TDataChangeNotification_Writer }
+ TDataChangeNotification_Writer = class(TROEventWriter, IDataChangeNotification_Writer)
+ protected
+ procedure OnDataTableChanged(const __Sender : TGUID; const aTableName: Utf8String; const aDelta: Binary);
+ end;
+
+procedure TDataChangeNotification_Writer.OnDataTableChanged(const __Sender : TGUID; const aTableName: Utf8String; const aDelta: Binary);
+var __eventdata : Binary;
+begin
+ __eventdata := Binary.Create;
+ try
+ __Message.InitializeEventMessage(NIL, 'DataAbstract4', EID_DataChangeNotification, 'OnDataTableChanged');
+ __Message.Write('aTableName', TypeInfo(Utf8String), aTableName, []);
+ __Message.Write('aDelta', TypeInfo(Binary), aDelta, []);
+ __Message.Finalize;
+
+ __Message.WriteToStream(__eventdata);
+
+ Repository.StoreEventData(__Sender, __eventdata, ExcludeSender, ExcludeSessionList, SessionList.CommaText);
+ finally
+ __eventdata.Free;
+ end;
+end;
+
+type
+ { TDataChangeNotification_Invoker }
+ TDataChangeNotification_Invoker = class(TROEventInvoker)
+ published
+ procedure Invoke_OnDataTableChanged(__EventReceiver : TROEventReceiver; const __Message : IROMessage; const __Target : IUnknown);
+ end;
+
+procedure TDataChangeNotification_Invoker.Invoke_OnDataTableChanged(__EventReceiver : TROEventReceiver; const __Message : IROMessage; const __Target : IUnknown);
+var
+__lObjectDisposer: TROObjectDisposer;
+ aTableName: Utf8String;
+ aDelta: Binary;
+begin
+ aDelta := NIL;
+
+ try
+ __Message.Read('aTableName', TypeInfo(Utf8String), aTableName, []);
+ __Message.Read('aDelta', TypeInfo(Binary), aDelta, []);
+
+ (__Target as IDataChangeNotification).OnDataTableChanged(aTableName, aDelta);
+
+ finally
+ __lObjectDisposer:= TROObjectDisposer.Create(__EventReceiver);
+ try
+ __lObjectDisposer.Add(aDelta);
+ finally
+ __lObjectDisposer.Free();
+ end
+ end
+end;
+
+initialization
+ RegisterROClass(DataParameter);
+ RegisterROClass(TableRequestInfo);
+ RegisterROClass(UserInfo);
+ RegisterROClass(TableRequestInfoV5);
+ RegisterROClass(ColumnSorting);
+ RegisterROClass(DataParameterArray);
+ RegisterROClass(TableRequestInfoArray);
+ RegisterROClass(StringArray);
+ RegisterROClass(VariantArray);
+ RegisterROClass(ColumnSortingArray);
+ RegisterProxyClass(IDataAbstractService_IID, TDataAbstractService_Proxy);
+ RegisterProxyClass(ISimpleLoginService_IID, TSimpleLoginService_Proxy);
+ RegisterProxyClass(IBaseLoginService_IID, TBaseLoginService_Proxy);
+ RegisterProxyClass(IMultiDbLoginService_IID, TMultiDbLoginService_Proxy);
+ RegisterProxyClass(IMultiDbLoginServiceV5_IID, TMultiDbLoginServiceV5_Proxy);
+
+ RegisterEventWriterClass(IDataChangeNotification_Writer, TDataChangeNotification_Writer);
+ RegisterEventInvokerClass(EID_DataChangeNotification, TDataChangeNotification_Invoker);
+
+finalization
+ UnregisterROClass(DataParameter);
+ UnregisterROClass(TableRequestInfo);
+ UnregisterROClass(UserInfo);
+ UnregisterROClass(TableRequestInfoV5);
+ UnregisterROClass(ColumnSorting);
+ UnregisterROClass(DataParameterArray);
+ UnregisterROClass(TableRequestInfoArray);
+ UnregisterROClass(StringArray);
+ UnregisterROClass(VariantArray);
+ UnregisterROClass(ColumnSortingArray);
+ UnregisterProxyClass(IDataAbstractService_IID);
+ UnregisterProxyClass(ISimpleLoginService_IID);
+ UnregisterProxyClass(IBaseLoginService_IID);
+ UnregisterProxyClass(IMultiDbLoginService_IID);
+ UnregisterProxyClass(IMultiDbLoginServiceV5_IID);
+
+ UnregisterEventWriterClass(IDataChangeNotification_Writer);
+ UnregisterEventInvokerClass(EID_DataChangeNotification);
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract4_Invk.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract4_Invk.pas
new file mode 100644
index 0000000..3058bec
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract4_Invk.pas
@@ -0,0 +1,621 @@
+unit DataAbstract4_Invk;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ {vcl:} Classes,
+ {RemObjects:} uROXMLIntf, uROServer, uROServerIntf, uROTypes, uROClientIntf,
+ {Generated:} DataAbstract4_Intf;
+
+type
+ TDataAbstractService_Invoker = class(TROInvoker)
+ private
+ protected
+ public
+ constructor Create; override;
+ published
+ procedure Invoke_GetSchema(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_GetData(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_UpdateData(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_ExecuteCommand(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_ExecuteCommandEx(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_GetTableSchema(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_GetCommandSchema(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_SQLGetData(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_SQLGetDataEx(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_SQLExecuteCommand(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_SQLExecuteCommandEx(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_GetDatasetScripts(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_RegisterForDataChangeNotification(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_UnregisterForDataChangeNotification(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ end;
+
+ TBaseLoginService_Invoker = class(TROInvoker)
+ private
+ protected
+ public
+ constructor Create; override;
+ published
+ procedure Invoke_Logout(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ end;
+
+ TMultiDbLoginService_Invoker = class(TBaseLoginService_Invoker)
+ private
+ protected
+ public
+ constructor Create; override;
+ published
+ procedure Invoke_Login(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ end;
+
+ TMultiDbLoginServiceV5_Invoker = class(TMultiDbLoginService_Invoker)
+ private
+ protected
+ public
+ constructor Create; override;
+ published
+ procedure Invoke_GetConnectionNames(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_GetDefaultConnectionName(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ end;
+
+ TSimpleLoginService_Invoker = class(TBaseLoginService_Invoker)
+ private
+ protected
+ public
+ constructor Create; override;
+ published
+ procedure Invoke_Login(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ end;
+
+implementation
+
+uses
+ {RemObjects:} uRORes, uROClient;
+
+{ TDataAbstractService_Invoker }
+
+constructor TDataAbstractService_Invoker.Create;
+begin
+ inherited Create;
+ FAbstract := True;
+end;
+
+procedure TDataAbstractService_Invoker.Invoke_GetSchema(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function GetSchema(const aFilter: Utf8String): Utf8String; }
+var
+ aFilter: Utf8String;
+ lResult: Utf8String;
+begin
+ try
+ __Message.Read('aFilter', TypeInfo(Utf8String), aFilter, []);
+
+ lResult := (__Instance as IDataAbstractService).GetSchema(aFilter);
+
+ __Message.InitializeResponseMessage(__Transport, 'DataAbstract4', 'DataAbstractService', 'GetSchemaResponse');
+ __Message.Write('Result', TypeInfo(Utf8String), lResult, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ end;
+end;
+
+procedure TDataAbstractService_Invoker.Invoke_GetData(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function GetData(const aTableNameArray: StringArray; const aTableRequestInfoArray: TableRequestInfoArray): Binary; }
+var
+ aTableNameArray: DataAbstract4_Intf.StringArray;
+ aTableRequestInfoArray: DataAbstract4_Intf.TableRequestInfoArray;
+ lResult: Binary;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ aTableNameArray := nil;
+ aTableRequestInfoArray := nil;
+ lResult := nil;
+ try
+ __Message.Read('aTableNameArray', TypeInfo(DataAbstract4_Intf.StringArray), aTableNameArray, []);
+ __Message.Read('aTableRequestInfoArray', TypeInfo(DataAbstract4_Intf.TableRequestInfoArray), aTableRequestInfoArray, []);
+
+ lResult := (__Instance as IDataAbstractService).GetData(aTableNameArray, aTableRequestInfoArray);
+
+ __Message.InitializeResponseMessage(__Transport, 'DataAbstract4', 'DataAbstractService', 'GetDataResponse');
+ __Message.Write('Result', TypeInfo(Binary), lResult, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(aTableNameArray);
+ __lObjectDisposer.Add(aTableRequestInfoArray);
+ __lObjectDisposer.Add(lResult);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
+procedure TDataAbstractService_Invoker.Invoke_UpdateData(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function UpdateData(const aDelta: Binary): Binary; }
+var
+ aDelta: Binary;
+ lResult: Binary;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ aDelta := nil;
+ lResult := nil;
+ try
+ __Message.Read('aDelta', TypeInfo(Binary), aDelta, []);
+
+ lResult := (__Instance as IDataAbstractService).UpdateData(aDelta);
+
+ __Message.InitializeResponseMessage(__Transport, 'DataAbstract4', 'DataAbstractService', 'UpdateDataResponse');
+ __Message.Write('Result', TypeInfo(Binary), lResult, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(aDelta);
+ __lObjectDisposer.Add(lResult);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
+procedure TDataAbstractService_Invoker.Invoke_ExecuteCommand(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function ExecuteCommand(const aCommandName: Utf8String; const aParameterArray: DataParameterArray): Integer; }
+var
+ aCommandName: Utf8String;
+ aParameterArray: DataAbstract4_Intf.DataParameterArray;
+ lResult: Integer;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ aParameterArray := nil;
+ try
+ __Message.Read('aCommandName', TypeInfo(Utf8String), aCommandName, []);
+ __Message.Read('aParameterArray', TypeInfo(DataAbstract4_Intf.DataParameterArray), aParameterArray, []);
+
+ lResult := (__Instance as IDataAbstractService).ExecuteCommand(aCommandName, aParameterArray);
+
+ __Message.InitializeResponseMessage(__Transport, 'DataAbstract4', 'DataAbstractService', 'ExecuteCommandResponse');
+ __Message.Write('Result', TypeInfo(Integer), lResult, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(aParameterArray);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
+procedure TDataAbstractService_Invoker.Invoke_ExecuteCommandEx(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function ExecuteCommandEx(const aCommandName: Utf8String; const aInputParameters: DataParameterArray; out aOutputParameters: DataParameterArray): Integer; }
+var
+ aCommandName: Utf8String;
+ aInputParameters: DataAbstract4_Intf.DataParameterArray;
+ aOutputParameters: DataAbstract4_Intf.DataParameterArray;
+ lResult: Integer;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ aInputParameters := nil;
+ aOutputParameters := nil;
+ try
+ __Message.Read('aCommandName', TypeInfo(Utf8String), aCommandName, []);
+ __Message.Read('aInputParameters', TypeInfo(DataAbstract4_Intf.DataParameterArray), aInputParameters, []);
+
+ lResult := (__Instance as IDataAbstractService).ExecuteCommandEx(aCommandName, aInputParameters, aOutputParameters);
+
+ __Message.InitializeResponseMessage(__Transport, 'DataAbstract4', 'DataAbstractService', 'ExecuteCommandExResponse');
+ __Message.Write('Result', TypeInfo(Integer), lResult, []);
+ __Message.Write('aOutputParameters', TypeInfo(DataAbstract4_Intf.DataParameterArray), aOutputParameters, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(aInputParameters);
+ __lObjectDisposer.Add(aOutputParameters);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
+procedure TDataAbstractService_Invoker.Invoke_GetTableSchema(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function GetTableSchema(const aTableNameArray: StringArray): Utf8String; }
+var
+ aTableNameArray: DataAbstract4_Intf.StringArray;
+ lResult: Utf8String;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ aTableNameArray := nil;
+ try
+ __Message.Read('aTableNameArray', TypeInfo(DataAbstract4_Intf.StringArray), aTableNameArray, []);
+
+ lResult := (__Instance as IDataAbstractService).GetTableSchema(aTableNameArray);
+
+ __Message.InitializeResponseMessage(__Transport, 'DataAbstract4', 'DataAbstractService', 'GetTableSchemaResponse');
+ __Message.Write('Result', TypeInfo(Utf8String), lResult, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(aTableNameArray);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
+procedure TDataAbstractService_Invoker.Invoke_GetCommandSchema(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function GetCommandSchema(const aCommandNameArray: StringArray): Utf8String; }
+var
+ aCommandNameArray: DataAbstract4_Intf.StringArray;
+ lResult: Utf8String;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ aCommandNameArray := nil;
+ try
+ __Message.Read('aCommandNameArray', TypeInfo(DataAbstract4_Intf.StringArray), aCommandNameArray, []);
+
+ lResult := (__Instance as IDataAbstractService).GetCommandSchema(aCommandNameArray);
+
+ __Message.InitializeResponseMessage(__Transport, 'DataAbstract4', 'DataAbstractService', 'GetCommandSchemaResponse');
+ __Message.Write('Result', TypeInfo(Utf8String), lResult, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(aCommandNameArray);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
+procedure TDataAbstractService_Invoker.Invoke_SQLGetData(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function SQLGetData(const aSQLText: Utf8String; const aIncludeSchema: Boolean; const aMaxRecords: Integer): Binary; }
+var
+ aSQLText: Utf8String;
+ aIncludeSchema: Boolean;
+ aMaxRecords: Integer;
+ lResult: Binary;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ lResult := nil;
+ try
+ __Message.Read('aSQLText', TypeInfo(Utf8String), aSQLText, []);
+ __Message.Read('aIncludeSchema', TypeInfo(Boolean), aIncludeSchema, []);
+ __Message.Read('aMaxRecords', TypeInfo(Integer), aMaxRecords, []);
+
+ lResult := (__Instance as IDataAbstractService).SQLGetData(aSQLText, aIncludeSchema, aMaxRecords);
+
+ __Message.InitializeResponseMessage(__Transport, 'DataAbstract4', 'DataAbstractService', 'SQLGetDataResponse');
+ __Message.Write('Result', TypeInfo(Binary), lResult, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(lResult);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
+procedure TDataAbstractService_Invoker.Invoke_SQLGetDataEx(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function SQLGetDataEx(const aSQLText: Utf8String; const aIncludeSchema: Boolean; const aMaxRecords: Integer; const aDynamicWhereXML: Widestring): Binary; }
+var
+ aSQLText: Utf8String;
+ aIncludeSchema: Boolean;
+ aMaxRecords: Integer;
+ aDynamicWhereXML: Widestring;
+ lResult: Binary;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ lResult := nil;
+ try
+ __Message.Read('aSQLText', TypeInfo(Utf8String), aSQLText, []);
+ __Message.Read('aIncludeSchema', TypeInfo(Boolean), aIncludeSchema, []);
+ __Message.Read('aMaxRecords', TypeInfo(Integer), aMaxRecords, []);
+ __Message.Read('aDynamicWhereXML', TypeInfo(Widestring), aDynamicWhereXML, []);
+
+ lResult := (__Instance as IDataAbstractService).SQLGetDataEx(aSQLText, aIncludeSchema, aMaxRecords, aDynamicWhereXML);
+
+ __Message.InitializeResponseMessage(__Transport, 'DataAbstract4', 'DataAbstractService', 'SQLGetDataExResponse');
+ __Message.Write('Result', TypeInfo(Binary), lResult, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(lResult);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
+procedure TDataAbstractService_Invoker.Invoke_SQLExecuteCommand(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function SQLExecuteCommand(const aSQLText: Utf8String): Integer; }
+var
+ aSQLText: Utf8String;
+ lResult: Integer;
+begin
+ try
+ __Message.Read('aSQLText', TypeInfo(Utf8String), aSQLText, []);
+
+ lResult := (__Instance as IDataAbstractService).SQLExecuteCommand(aSQLText);
+
+ __Message.InitializeResponseMessage(__Transport, 'DataAbstract4', 'DataAbstractService', 'SQLExecuteCommandResponse');
+ __Message.Write('Result', TypeInfo(Integer), lResult, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ end;
+end;
+
+procedure TDataAbstractService_Invoker.Invoke_SQLExecuteCommandEx(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function SQLExecuteCommandEx(const aSQLText: Utf8String; const aDynamicWhereXML: Widestring): Integer; }
+var
+ aSQLText: Utf8String;
+ aDynamicWhereXML: Widestring;
+ lResult: Integer;
+begin
+ try
+ __Message.Read('aSQLText', TypeInfo(Utf8String), aSQLText, []);
+ __Message.Read('aDynamicWhereXML', TypeInfo(Widestring), aDynamicWhereXML, []);
+
+ lResult := (__Instance as IDataAbstractService).SQLExecuteCommandEx(aSQLText, aDynamicWhereXML);
+
+ __Message.InitializeResponseMessage(__Transport, 'DataAbstract4', 'DataAbstractService', 'SQLExecuteCommandExResponse');
+ __Message.Write('Result', TypeInfo(Integer), lResult, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ end;
+end;
+
+procedure TDataAbstractService_Invoker.Invoke_GetDatasetScripts(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function GetDatasetScripts(const DatasetNames: Utf8String): Utf8String; }
+var
+ DatasetNames: Utf8String;
+ lResult: Utf8String;
+begin
+ try
+ __Message.Read('DatasetNames', TypeInfo(Utf8String), DatasetNames, []);
+
+ lResult := (__Instance as IDataAbstractService).GetDatasetScripts(DatasetNames);
+
+ __Message.InitializeResponseMessage(__Transport, 'DataAbstract4', 'DataAbstractService', 'GetDatasetScriptsResponse');
+ __Message.Write('Result', TypeInfo(Utf8String), lResult, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ end;
+end;
+
+procedure TDataAbstractService_Invoker.Invoke_RegisterForDataChangeNotification(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ procedure RegisterForDataChangeNotification(const aTableName: Utf8String); }
+var
+ aTableName: Utf8String;
+begin
+ try
+ __Message.Read('aTableName', TypeInfo(Utf8String), aTableName, []);
+
+ (__Instance as IDataAbstractService).RegisterForDataChangeNotification(aTableName);
+
+ __Message.InitializeResponseMessage(__Transport, 'DataAbstract4', 'DataAbstractService', 'RegisterForDataChangeNotificationResponse');
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ __oResponseOptions := [roNoResponse];
+
+ finally
+ end;
+end;
+
+procedure TDataAbstractService_Invoker.Invoke_UnregisterForDataChangeNotification(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ procedure UnregisterForDataChangeNotification(const aTableName: Utf8String); }
+var
+ aTableName: Utf8String;
+begin
+ try
+ __Message.Read('aTableName', TypeInfo(Utf8String), aTableName, []);
+
+ (__Instance as IDataAbstractService).UnregisterForDataChangeNotification(aTableName);
+
+ __Message.InitializeResponseMessage(__Transport, 'DataAbstract4', 'DataAbstractService', 'UnregisterForDataChangeNotificationResponse');
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ __oResponseOptions := [roNoResponse];
+
+ finally
+ end;
+end;
+
+{ TSimpleLoginService_Invoker }
+
+constructor TSimpleLoginService_Invoker.Create;
+begin
+ inherited Create;
+ FAbstract := True;
+end;
+
+procedure TSimpleLoginService_Invoker.Invoke_Login(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function Login(const aUserID: Utf8String; const aPassword: Utf8String; out aUserInfo: UserInfo): Boolean; }
+var
+ aUserID: Utf8String;
+ aPassword: Utf8String;
+ aUserInfo: DataAbstract4_Intf.UserInfo;
+ lResult: Boolean;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ aUserInfo := nil;
+ try
+ __Message.Read('aUserID', TypeInfo(Utf8String), aUserID, []);
+ __Message.Read('aPassword', TypeInfo(Utf8String), aPassword, []);
+
+ lResult := (__Instance as ISimpleLoginService).Login(aUserID, aPassword, aUserInfo);
+
+ __Message.InitializeResponseMessage(__Transport, 'DataAbstract4', 'SimpleLoginService', 'LoginResponse');
+ __Message.Write('Result', TypeInfo(Boolean), lResult, []);
+ __Message.Write('aUserInfo', TypeInfo(DataAbstract4_Intf.UserInfo), aUserInfo, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(aUserInfo);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
+{ TBaseLoginService_Invoker }
+
+constructor TBaseLoginService_Invoker.Create;
+begin
+ inherited Create;
+ FAbstract := True;
+end;
+
+procedure TBaseLoginService_Invoker.Invoke_Logout(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ procedure Logout; }
+begin
+ try
+ (__Instance as IBaseLoginService).Logout;
+
+ __Message.InitializeResponseMessage(__Transport, 'DataAbstract4', 'BaseLoginService', 'LogoutResponse');
+ __Message.Finalize;
+
+ __oResponseOptions := [roNoResponse];
+
+ finally
+ end;
+end;
+
+{ TMultiDbLoginService_Invoker }
+
+constructor TMultiDbLoginService_Invoker.Create;
+begin
+ inherited Create;
+ FAbstract := True;
+end;
+
+procedure TMultiDbLoginService_Invoker.Invoke_Login(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function Login(const aUserID: Utf8String; const aPassword: Utf8String; const aConnectionName: Utf8String; out aUserInfo: UserInfo): Boolean; }
+var
+ aUserID: Utf8String;
+ aPassword: Utf8String;
+ aConnectionName: Utf8String;
+ aUserInfo: DataAbstract4_Intf.UserInfo;
+ lResult: Boolean;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ aUserInfo := nil;
+ try
+ __Message.Read('aUserID', TypeInfo(Utf8String), aUserID, []);
+ __Message.Read('aPassword', TypeInfo(Utf8String), aPassword, []);
+ __Message.Read('aConnectionName', TypeInfo(Utf8String), aConnectionName, []);
+
+ lResult := (__Instance as IMultiDbLoginService).Login(aUserID, aPassword, aConnectionName, aUserInfo);
+
+ __Message.InitializeResponseMessage(__Transport, 'DataAbstract4', 'MultiDbLoginService', 'LoginResponse');
+ __Message.Write('Result', TypeInfo(Boolean), lResult, []);
+ __Message.Write('aUserInfo', TypeInfo(DataAbstract4_Intf.UserInfo), aUserInfo, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(aUserInfo);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
+{ TMultiDbLoginServiceV5_Invoker }
+
+constructor TMultiDbLoginServiceV5_Invoker.Create;
+begin
+ inherited Create;
+ FAbstract := True;
+end;
+
+procedure TMultiDbLoginServiceV5_Invoker.Invoke_GetConnectionNames(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function GetConnectionNames: StringArray; }
+var
+ lResult: DataAbstract4_Intf.StringArray;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ lResult := nil;
+ try
+ lResult := (__Instance as IMultiDbLoginServiceV5).GetConnectionNames;
+
+ __Message.InitializeResponseMessage(__Transport, 'DataAbstract4', 'MultiDbLoginServiceV5', 'GetConnectionNamesResponse');
+ __Message.Write('Result', TypeInfo(DataAbstract4_Intf.StringArray), lResult, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(lResult);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
+procedure TMultiDbLoginServiceV5_Invoker.Invoke_GetDefaultConnectionName(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function GetDefaultConnectionName: Utf8String; }
+var
+ lResult: Utf8String;
+begin
+ try
+ lResult := (__Instance as IMultiDbLoginServiceV5).GetDefaultConnectionName;
+
+ __Message.InitializeResponseMessage(__Transport, 'DataAbstract4', 'MultiDbLoginServiceV5', 'GetDefaultConnectionNameResponse');
+ __Message.Write('Result', TypeInfo(Utf8String), lResult, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ end;
+end;
+
+initialization
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstractService_Impl.dfm b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstractService_Impl.dfm
new file mode 100644
index 0000000..65deb18
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstractService_Impl.dfm
@@ -0,0 +1,5 @@
+object DataAbstractService: TDataAbstractService
+ OldCreateOrder = True
+ Height = 437
+ Width = 546
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstractService_Impl.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstractService_Impl.pas
new file mode 100644
index 0000000..dc9238c
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstractService_Impl.pas
@@ -0,0 +1,1433 @@
+unit DataAbstractService_Impl;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{----------------------------------------------------------------------------}
+{ When applying fixes to this unit, please see if the need to be propagates }
+{ to the duplicate dlogic in legacy DARemoteService_Impl.pas, too. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils, DB,
+ {Generated:} DataAbstract4_Intf,
+ uROClientIntf, uROTypes, uROServer, uROSessions, uRORemoteDataModule, uROClasses,
+ uDAInterfaces, uDAClasses, uDADataTable, uDADataStreamer, uDABusinessProcessor,
+ uDADataTableReferenceCollection, uDADelta;
+
+type
+ { Events }
+ TDAAcquireConnectionEvent = procedure(aSender: TObject; var aConnectionName: string) of object;
+ TDAConnectionAcquiredEvent = procedure(aSender: TObject; const aConnectionName: string; const aAcquiredConnection: IDAConnection) of object;
+ TDAAcquireConnectionFailureEvent = procedure(aSender: TObject; const aConnectionName: string; aError: Exception) of object;
+ TDAGetDatasetSchemaEvent = procedure(aSender: TObject; const aDataset: IDADataset) of object;
+ TDAGetDatasetDataEvent = procedure(aSender: TObject; const aDataset: IDADataset; const aIncludeSchema: Boolean; const aMaxRecords: Integer) of object;
+ TDABusinessProcessorAutoCreatedEvent = procedure(aSender: TRORemoteDataModule; BusinessProcessor : TDABusinessProcessor) of object;
+ TDABeforeExecuteCommandEvent = procedure(aSender: TObject; const aCommand: IDASQLCommand) of object;
+ TDAAfterExecuteCommandEvent = procedure(aSender: TObject; const aCommand: IDASQLCommand; aRowsAffacted : integer) of object;
+ TDAConnectionReleasedEvent = procedure(aSender: TObject; const aConnectionName: string) of object;
+ TDAGetSchemaAsXMLEvent = procedure(aSender: TObject; var aSchemaXML: Utf8string) of object;
+ TDAProcessDeltasEvent = procedure(aSender: TObject; aDeltaStructs: TDADeltaStructList) of object;
+ TDAProcessDeltasErrorEvent = procedure(aSender: TObject; aDeltaStructs: TDADeltaStructList; aError: Exception; var aDoRaise: boolean) of object;
+ TDASchemaElementAccessValidationEvent = procedure(Sender: TObject; const aConnection: IDAConnection; const aDatasetName: string;
+ const aParamNames: array of string; const aParamValues : array of variant;
+ aSchema: TDASchema; var Allowed : boolean) of object;
+ TDASQLValidationEvent = procedure(Sender: TObject; const aConnection: IDAConnection; const aSQLText: string;
+ const aParamNames: array of string; const aParamValues : array of variant;
+ var Allowed : boolean) of object;
+ TDAUpdateDataTransactionEvent = procedure(Sender: TObject; var aUseDefaultTransactionLogic: Boolean) of object;
+
+ TDADeltasMode = (dumExported, dumStandard);
+ TDADeltasModes = set of TDADeltasMode;
+ { TDataAbstractService }
+ TDataAbstractService = class(TRORemoteDataModule, IDataAbstractService)
+ private
+ { Properties }
+ fAllowExecuteCommands: boolean;
+ fAllowExecuteSQL: boolean;
+ fAllowDataAccess: boolean;
+ fAllowSchemaAccess: boolean;
+ fAllowWhereSQL: boolean;
+ fConnectionName: string;
+ fAcquireConnection: boolean;
+ fServiceSchema: TDASchema;
+ fAutoCreateBusinessProcessors: boolean;
+ fServiceDataStreamer: TDADataStreamer;
+ fProcessDeltasWithoutUpdateRules: boolean;
+
+ fConnection: IDAConnection;
+ fHETConnection: IDAHETConnection;
+ fExportedDataTables: TDADataTableReferenceCollection;
+
+ { Events }
+ fBeforeGetDatasetSchema: TDAGetDatasetSchemaEvent;
+ fBeforeProcessDeltas: TDAProcessDeltasEvent;
+ fOnAcquireConnectionFailure: TDAAcquireConnectionFailureEvent;
+ fOnUpdateDataCommitTransaction: TDAUpdateDataTransactionEvent;
+ fGetDatasetDataValidation: TDASchemaElementAccessValidationEvent;
+ fExecuteCommandValidation: TDASchemaElementAccessValidationEvent;
+ fSQLValidation: TDASQLValidationEvent;
+ fAfterExecuteCommand: TDAAfterExecuteCommandEvent;
+ fBeforeAcquireConnection: TDAAcquireConnectionEvent;
+ fOnUpdateDataRollBackTransaction: TDAUpdateDataTransactionEvent;
+ fAfterGetDatasetData: TDAGetDatasetDataEvent;
+ fAfterReleaseConnection: TDAConnectionReleasedEvent;
+ fAfterGetDatasetSchema: TDAGetDatasetSchemaEvent;
+ fAfterProcessDeltas: TDAProcessDeltasEvent;
+ fOnGetSchemaAsXML: TDAGetSchemaAsXMLEvent;
+ fOnBusinessProcessorAutoCreated: TDABusinessProcessorAutoCreatedEvent;
+ fOnUpdateDataBeginTransaction: TDAUpdateDataTransactionEvent;
+ fAfterAcquireConnection: TDAConnectionAcquiredEvent;
+ fOnProcessDeltasError: TDAProcessDeltasErrorEvent;
+ fBeforeExecuteCommand: TDABeforeExecuteCommandEvent;
+ fBeforeGetDatasetData: TDAGetDatasetDataEvent;
+ fBeforeReleaseConnection: TDAConnectionAcquiredEvent;
+ fAllowDynamicSelect: boolean;
+ fAllowDynamicWhere: boolean;
+ fAllowUpdates: boolean;
+ fHasReducedDelta: Boolean;
+
+ procedure SetServiceDataStreamer(const Value: TDADataStreamer);
+ procedure SetServiceSchema(const Value: TDASchema);
+ procedure SetExportedDataTables(const Value: TDADataTableReferenceCollection);
+ procedure Check(CheckOnlyDataStreamer:Boolean = false);
+ private
+ function GetConnection: IDAConnection;
+ function UnpackDeltas(const DeltaStream: Binary; DeltaStructList: TDADeltaStructList): TDADeltasModes;
+ function TriggerTransactionEvent(aEvent: TDAUpdateDataTransactionEvent): boolean;
+ procedure ExportedDataTables_MergeDelta(ADelta: IDADelta);
+ protected
+ { IDataAbstractService methods }
+ function GetSchema(const aFilter: Utf8String): Utf8String;
+ function GetData(const aTableNameArray: StringArray; const aTableRequestInfoArray: TableRequestInfoArray): Binary;
+ function UpdateData(const aDelta: Binary): Binary;
+ function ExecuteCommand(const aCommandName: Utf8String; const aParameterArray: DataParameterArray): Integer;
+ function GetTableSchema(const aTableNameArray: StringArray): Utf8String;
+ function GetCommandSchema(const aCommandNameArray: StringArray): Utf8String;
+ function SQLGetData(const aSQLText: Utf8String; const aIncludeSchema: Boolean; const aMaxRecords: Integer): Binary;
+ function SQLGetDataEx(const aSQLText: Utf8String; const aIncludeSchema: Boolean; const aMaxRecords: Integer; const aDynamicWhereXML: Widestring): Binary;
+ function SQLExecuteCommand(const aSQLText: Utf8String): Integer;
+ function SQLExecuteCommandEx(const aSQLText: Utf8String; const aDynamicWhereXML: Widestring): Integer;
+ function ExecuteCommandEx(const aCommandName: Utf8String;
+ const aInputParameters: DataParameterArray;
+ out aOutputParameters: DataParameterArray): Integer;
+ function GetDatasetScripts(const DatasetNames: Utf8String): Utf8String;
+ procedure RegisterForDataChangeNotification(const aTableName: Utf8String);
+ procedure UnregisterForDataChangeNotification(const aTableName: Utf8String);
+
+ { TRORemoteDataModule }
+ procedure DoOnDeactivate(aClientID: TGUID); override;
+
+ procedure Notification(AComponent: TComponent; Operation: TOperation); override;
+
+ function GetConnectionForObject(const aName: string): IDAConnection; virtual;
+ public
+ constructor Create(aOwner : TComponent); override;
+ destructor Destroy; override;
+
+ procedure SetConnection(aConnection: IDAConnection); deprecated;
+ {$WARN SYMBOL_DEPRECATED OFF}
+ property Connection: IDAConnection read GetConnection write SetConnection;
+ {$WARN SYMBOL_DEPRECATED ON}
+
+ procedure ReleaseConnection;
+ published
+ property AcquireConnection: boolean read fAcquireConnection write fAcquireConnection default true;
+ property ConnectionName: string read fConnectionName write fConnectionName;
+ property AutoCreateBusinessProcessors : boolean read fAutoCreateBusinessProcessors write fAutoCreateBusinessProcessors default true;
+ property ServiceSchema: TDASchema read fServiceSchema write SetServiceSchema;
+ property ServiceDataStreamer: TDADataStreamer read fServiceDataStreamer write SetServiceDataStreamer;
+
+ property AllowDataAccess: boolean read fAllowDataAccess write fAllowDataAccess default true;
+ property AllowSchemaAccess: boolean read fAllowSchemaAccess write fAllowSchemaAccess default true;
+ property AllowUpdates: boolean read fAllowUpdates write fAllowUpdates default true;
+ property AllowExecuteSQL: boolean read fAllowExecuteSQL write fAllowExecuteSQL default false;
+ property AllowWhereSQL: boolean read fAllowWhereSQL write fAllowWhereSQL default false;
+ property AllowExecuteCommands: boolean read fAllowExecuteCommands write fAllowExecuteCommands default false;
+ property AllowDynamicSelect: boolean read fAllowDynamicSelect write fAllowDynamicSelect default true;
+ property AllowDynamicWhere: boolean read fAllowDynamicWhere write fAllowDynamicWhere default true;
+
+ property ProcessDeltasWithoutUpdateRules: boolean read fProcessDeltasWithoutUpdateRules write fProcessDeltasWithoutUpdateRules default true;
+ property ExportedDataTables: TDADataTableReferenceCollection read fExportedDataTables write SetExportedDataTables;
+
+ { Events }
+ property BeforeAcquireConnection: TDAAcquireConnectionEvent read fBeforeAcquireConnection write fBeforeAcquireConnection;
+ property AfterAcquireConnection: TDAConnectionAcquiredEvent read fAfterAcquireConnection write fAfterAcquireConnection;
+ property BeforeReleaseConnection: TDAConnectionAcquiredEvent read fBeforeReleaseConnection write fBeforeReleaseConnection;
+ property AfterReleaseConnection: TDAConnectionReleasedEvent read fAfterReleaseConnection write fAfterReleaseConnection;
+ property OnAcquireConnectionFailure: TDAAcquireConnectionFailureEvent read fOnAcquireConnectionFailure write fOnAcquireConnectionFailure;
+
+ property BeforeProcessDeltas : TDAProcessDeltasEvent read fBeforeProcessDeltas write fBeforeProcessDeltas;
+ property AfterProcessDeltas: TDAProcessDeltasEvent read fAfterProcessDeltas write fAfterProcessDeltas;
+ property OnProcessDeltasError: TDAProcessDeltasErrorEvent read fOnProcessDeltasError write fOnProcessDeltasError;
+
+ property BeforeGetDatasetSchema: TDAGetDatasetSchemaEvent read fBeforeGetDatasetSchema write fBeforeGetDatasetSchema;
+ property BeforeGetDatasetData: TDAGetDatasetDataEvent read fBeforeGetDatasetData write fBeforeGetDatasetData;
+ property AfterGetDatasetSchema: TDAGetDatasetSchemaEvent read fAfterGetDatasetSchema write fAfterGetDatasetSchema;
+ property AfterGetDatasetData: TDAGetDatasetDataEvent read fAfterGetDatasetData write fAfterGetDatasetData;
+ property OnBusinessProcessorAutoCreated: TDABusinessProcessorAutoCreatedEvent read fOnBusinessProcessorAutoCreated write fOnBusinessProcessorAutoCreated;
+ property BeforeExecuteCommand: TDABeforeExecuteCommandEvent read fBeforeExecuteCommand write fBeforeExecuteCommand;
+ property AfterExecuteCommand: TDAAfterExecuteCommandEvent read fAfterExecuteCommand write fAfterExecuteCommand;
+ property OnGetSchemaAsXMLEvent: TDAGetSchemaAsXMLEvent read fOnGetSchemaAsXML write fOnGetSchemaAsXML;
+ property ValidateDatasetAccess: TDASchemaElementAccessValidationEvent read fGetDatasetDataValidation write fGetDatasetDataValidation;
+ property ValidateCommandExecution: TDASchemaElementAccessValidationEvent read fExecuteCommandValidation write fExecuteCommandValidation;
+ property ValidateDirectSQLAccess: TDASQLValidationEvent read fSQLValidation write fSQLValidation;
+
+ property OnUpdateDataBeginTransaction : TDAUpdateDataTransactionEvent read fOnUpdateDataBeginTransaction write fOnUpdateDataBeginTransaction;
+ property OnUpdateDataCommitTransaction : TDAUpdateDataTransactionEvent read fOnUpdateDataCommitTransaction write fOnUpdateDataCommitTransaction;
+ property OnUpdateDataRollBackTransaction : TDAUpdateDataTransactionEvent read fOnUpdateDataRollBackTransaction write fOnUpdateDataRollBackTransaction;
+ end;
+
+implementation
+
+uses
+ Contnrs, Variants,
+ uDARes, uDAExceptions, uDAXMLUtils, uROXMLIntf,
+ TypInfo, uDAEngine, uDAWhere;
+
+
+const
+ sUTF8ToAnsiError = 'Can''t decode UTF8 string to ansi string: "%s"';
+
+procedure CheckUTF8Decode(const aOriginalStr: Utf8String; aDecodedStr: string);
+begin
+ if (aDecodedStr = '') and (aOriginalStr <> '') then raise Exception.CreateFmt(sUTF8ToAnsiError, [aOriginalStr]);
+end;
+{ DataAbstractService }
+
+constructor TDataAbstractService.Create(aOwner : TComponent);
+begin
+ fAllowDataAccess := true;
+ fAllowSchemaAccess := true;
+ fAllowDynamicSelect := true;
+ fAllowDynamicWhere := true;
+ fAllowUpdates := true;
+ fAutoCreateBusinessProcessors := true;
+ fProcessDeltasWithoutUpdateRules := true;
+ fAcquireConnection := true;
+ fExportedDataTables := TDADataTableReferenceCollection.Create(Self);
+ inherited;
+end;
+
+destructor TDataAbstractService.Destroy;
+begin
+ inherited;
+ FreeAndNIL(fExportedDataTables);
+end;
+
+procedure TDataAbstractService.Notification(AComponent: TComponent; Operation: TOperation);
+var
+ lRef: TDADataTableReference;
+begin
+ inherited;
+
+ if (Operation = opRemove) then begin
+
+ if ((AComponent is TDADataTable) or (AComponent is TDataSet)) and (fExportedDataTables.Count > 0) then begin
+ lRef := fExportedDataTables.FindByDataTable(TDADataTable(aComponent));
+ if (lRef<>NIL) then lRef.DataTable := NIL;
+ end else if (AComponent = ServiceSchema) then
+ ServiceSchema := nil
+ else if (AComponent = ServiceDataStreamer) then
+ ServiceDataStreamer := nil;
+ end
+
+end;
+
+function TDataAbstractService.TriggerTransactionEvent(aEvent: TDAUpdateDataTransactionEvent): boolean;
+begin
+ result := true;
+ if assigned(aEvent) then aEvent(self, result);
+end;
+
+{ IDataAbstractService: Schema Access }
+
+function TDataAbstractService.GetSchema(const aFilter: Utf8String): Utf8String;
+var
+ xml: TStringStream;
+ dummyrefs: TObjectList;
+ tempSchema: TDASchema;
+
+ procedure MergeDatatablesToSchema(aList: TObjectList);
+ var i : integer;
+ ref : TDADataset;
+ dt : IDADataset;
+ begin
+ for i := 0 to fExportedDataTables.Count-1 do
+ if fExportedDataTables[i].IsValidReference then begin
+ dt := fExportedDataTables[i].Dataset;
+
+ ref := tempSchema.Datasets.Add;
+ ref.Name := dt.LogicalName;
+ ref.Fields.AssignFieldCollection(dt.Fields);
+ ref.Params.AssignParamCollection(dt.Params);
+
+ aList.Add(ref);
+ end;
+ end;
+
+begin
+ if not AllowSchemaAccess then
+ raise Exception.Create('Schema access has been disabled (GetSchema)');
+
+ tempSchema := ServiceSchema;
+ if not Assigned(tempSchema) and (fExportedDataTables.Count<>0) then
+ tempSchema := TDASchema.Create(nil);
+
+ if not Assigned(tempSchema) then
+ raise Exception.Create('ServiceSchema property is not assigned and no data tables are exported.');
+
+ dummyrefs := nil;
+ try
+ // New: merges the data tables references by the service
+ if (fExportedDataTables.Count>0) then begin
+ dummyrefs := TObjectList.Create(true);;
+ MergeDatatablesToSchema(dummyrefs);
+ end;
+
+ // Returns the schema
+ xml := TStringStream.Create('');
+ try
+ tempSchema.SaveToStream(xml);
+
+ result := AnsiToUtf8(xml.DataString);
+
+ if Assigned(fOnGetSchemaAsXML) then fOnGetSchemaAsXML(Self, result);
+ finally
+ xml.Free;
+ end;
+
+ finally
+ FreeAndNil(dummyrefs); // automatically removes the datatables from the schema again
+ if tempSchema <> ServiceSchema then tempSchema.Free;
+ end;
+end;
+
+function TDataAbstractService.GetTableSchema(const aTableNameArray: StringArray): Utf8String;
+
+ function CreateDatasetFromIDADataset(aRef: IDADataset): TDADataset;
+ begin
+ Result := TDADataset.Create(nil);
+ Result.Name := aRef.LogicalName;
+ Result.Fields.AssignFieldCollection(aRef.Fields);
+ Result.Params.AssignParamCollection(aRef.Params);
+ end;
+
+var
+ lxml: IXMLDocument;
+ i: integer;
+ lDataSet: TDADataset;
+ lDataTableRef: TDADataTableReference;
+ lNeedDeleteDataset: Boolean;
+ lTableName: string;
+begin
+ if not AllowSchemaAccess then
+ raise Exception.Create('Schema access has been disabled (GetTableSchema)');
+
+ if not Assigned(ServiceSchema) and (fExportedDataTables.Count=0) then
+ raise Exception.Create('ServiceSchema property is not assigned and no data tables are exported.');
+
+ // Returns the schema
+ lxml := NewROXmlDocument;
+ lxml.New('DataTables');
+ try
+ for i := 0 to aTableNameArray.Count - 1 do begin
+ lTableName := Utf8ToAnsi(aTableNameArray[i]);
+ CheckUTF8Decode(aTableNameArray[i], lTableName);
+ lDataSet := nil;
+ if (fExportedDataTables.Count > 0) then begin
+ lDataTableRef := fExportedDataTables.FindByName(lTableName);
+ if lDataTableRef <> nil then lDataSet := CreateDatasetFromIDADataset(lDataTableRef.Dataset);
+ end;
+ lNeedDeleteDataset := lDataSet <> nil;
+ if not lNeedDeleteDataset and (ServiceSchema <> nil) then
+ lDataSet := ServiceSchema.Datasets.DatasetByName(lTableName);
+ try
+ if lDataSet <> nil then begin
+ // if Assigned(fBeforeGetDatasetSchema) then fBeforeGetDatasetSchema(Self, lDataset as IDADataset);
+ SaveObjectToXMLNode(lDataSet, lxml.DocumentNode.Add('SchemaDataTable'), [], [], False);
+ //if Assigned(FAfterGetDatasetSchema) then FAfterGetDatasetSchema(Self, lDataset as IDADataset);
+ if not (lDataSet.IsPublic) then
+ raise EDAException.Create(lDataset.Name +' is not accessible');
+ end;
+ finally
+ if lNeedDeleteDataset then lDataSet.Free;
+ end;
+ end;
+ Result := UTF8Encode(lxml.DocumentNode.XML);
+ finally
+ lxml := nil;
+ end;
+end;
+
+function TDataAbstractService.GetCommandSchema(const aCommandNameArray: StringArray): Utf8String;
+var
+ lxml: IXMLDocument;
+ i: integer;
+ lSQLCommand: TDASQLCommand;
+ lCommand: string;
+begin
+ if not AllowSchemaAccess then
+ raise Exception.Create('Schema access has been disabled (GetCommandSchema)');
+
+ if not Assigned(ServiceSchema) then
+ raise Exception.Create('ServiceSchema property is not assigned.');
+
+ // Returns the schema
+ lxml := NewROXmlDocument;
+ lxml.New('Commands');
+ try
+ for i := 0 to aCommandNameArray.Count - 1 do begin
+ lCommand:=Utf8ToAnsi(aCommandNameArray[i]);
+ CheckUTF8Decode(aCommandNameArray[i], lCommand);
+ lSQLCommand:=ServiceSchema.Commands.SQLCommandByName(lCommand);
+ if lSQLCommand <> nil then begin
+ if not lSQLCommand.IsPublic then
+ raise EDAException.Create(lSqlCommand.Name +' is not accessible');
+ SaveObjectToXMLNode(lSQLCommand, lxml.DocumentNode.Add('SchemaCommand'), [], [], False);
+ end;
+ end;
+ result := UTF8Encode(lxml.DocumentNode.XML);
+ finally
+ lxml := nil;
+ end;
+end;
+
+{ IDataAbstractService: Data Access }
+
+function TDataAbstractService.GetData(const aTableNameArray: StringArray; const aTableRequestInfoArray: TableRequestInfoArray): Binary;
+var
+ i, j, x, n,k: integer;
+ lParamNames: array of string;
+ lParamValues: array of Variant;
+ lOptions: TDAWriteOptions;
+ lAllow: boolean;
+ lDataSet: IDADataSet;
+ lEditableDataset: IDAEditableDataset;
+ lHasTransaction: boolean;
+ lMaxRecords: integer;
+ lDataTableRef: TDADataTableReference;
+ lDynSelectFields: array of string;
+ lDynSelectFields2: array of string;
+ lWhereClause: WideString;
+ lConnection: IDAConnection;
+ lTableName: String;
+ lDataTable: TDADataset;
+ lUnionTable: TDAUnionDataTable;
+ lAppendData: TDADataForAppend;
+ lMapping: TDAColumnMappingCollection;
+ lFilter: string;
+
+begin
+ if not AllowDataAccess then
+ raise Exception.Create('Data access has been disabled (GetData)');
+
+ result := nil;
+ if not assigned(aTableNameArray) or (aTableNameArray.Count = 0) then exit;
+
+ if assigned(aTableRequestInfoArray) and (aTableNameArray.Count <> aTableRequestInfoArray.Count) then
+ raise Exception.Create('Number of items passed to aTableNameArray and aTableRequestInfoArray do not match.');
+
+ Check(True);
+
+ result := Binary.Create;
+ Result.CapacityIncrement := ServiceDataStreamer.BufferSize;
+ try
+ lHasTransaction := false;
+ try
+
+ ServiceDataStreamer.Initialize(result, aiWrite);
+ try
+ for i := 0 to (aTableNameArray.Count-1) do begin
+
+ lTableName := Utf8ToAnsi(aTableNameArray[i]);
+ CheckUTF8Decode(aTableNameArray[i], lTableName);
+ if ServiceSchema <> nil then lDataTable := ServiceSchema.FindDataset(lTableName) else lDataTable:=nil;
+ lOptions := [woRows];
+ lMaxRecords := -1;
+ SetLength(lDynSelectFields,0);
+ lWhereClause := '';
+
+ if assigned(aTableRequestInfoArray) and assigned(aTableRequestInfoArray[i]) then with aTableRequestInfoArray[i] do begin
+ SetLength(lParamNames, Parameters.Count);
+ SetLength(lParamValues, Parameters.Count);
+ for j := 0 to (Parameters.Count-1) do begin
+ lParamNames[j] := Utf8ToAnsi(Parameters[j].Name);
+ CheckUTF8Decode(Parameters[j].Name, lParamNames[j]);
+ lParamValues[j] := Parameters[j].Value;
+ end;
+
+ if IncludeSchema then lOptions := lOptions+[woSchema];
+ lMaxRecords := MaxRecords;
+
+ // v5 TableRequestInfo
+ if aTableRequestInfoArray[i] is TableRequestInfoV5 then
+ with TableRequestInfoV5(aTableRequestInfoArray[i]) do begin
+ if assigned(DynamicSelectFieldNames) then begin
+ if AllowDynamicSelect then begin
+ SetLength(lDynSelectFields,DynamicSelectFieldNames.Count);
+ for j := 0 to DynamicSelectFieldNames.Count-1 do begin
+ CheckUTF8Decode(DynamicSelectFieldNames[j], Utf8ToAnsi(DynamicSelectFieldNames[j]));
+ lDynSelectFields[j] := Trim(Utf8ToAnsi(DynamicSelectFieldNames[j]));
+ end;
+ if DynamicSelectFieldNames.Count > 0 then lOptions := lOptions+[woSchema];
+ end else begin
+ raise EDAException.Create('DynamicSelect support has been disabled (GetData)');
+ end;
+ end;
+ if assigned(TableRequestInfoV5(aTableRequestInfoArray[i]).WhereClause) then begin
+ if AllowDynamicWhere then
+ lWhereClause := WhereClause.XML
+ else
+ raise EDAException.Create('DynamicWhere support has been disabled (GetData)');
+ end;
+ end;
+ end;
+
+ if (fExportedDataTables.Count > 0) and Assigned(fExportedDataTables.FindByName(lTableName)) then begin
+ lConnection := nil;
+ end
+ else begin
+ Check();
+ //lConnection := GetConnectionForObject(aTableNameArray[i]);
+ end;
+
+ lAllow := true;
+ if assigned(fGetDatasetDataValidation) then fGetDatasetDataValidation(self, {l}Connection, lTableName, lParamNames, lParamValues, ServiceSchema, lAllow);
+ if not lAllow then raise EDADatasetNotAccessible.CreateFmt(err_DatasetNotAccessible, [lTableName]);
+
+ lDataSet := nil;
+ if (fExportedDataTables.Count > 0) then begin
+ lDataTableRef := fExportedDataTables.FindByName(lTableName);
+ if assigned(lDataTableRef) then lDataSet := lDataTableRef.Dataset;
+ end;
+
+ if not assigned(lDataSet) then begin
+
+ // Create transaction, if needed
+ if not lHasTransaction then begin
+ if TriggerTransactionEvent(fOnUpdateDataBeginTransaction) then begin
+ Connection.BeginTransaction;
+ lHasTransaction := true;
+ end;
+ end;
+
+ lDataTable := ServiceSchema.FindDataset(lTableName);
+
+ { Unions }
+ if lDataTable is TDAUnionDataTable then begin
+
+ if (aTableRequestInfoArray <> nil) then begin
+ lFilter:=Utf8ToAnsi(aTableRequestInfoArray[i].UserFilter);
+ CheckUTF8Decode(aTableRequestInfoArray[i].UserFilter,lFilter);
+ if (Trim(lFilter)<>'') then
+ raise EDAException.Create('Passing of clear text WHERE clauses is not supported for UNIONS (GetData)');
+ end;
+ lUnionTable := lDataTable as TDAUnionDataTable;
+ lAppendData := ServiceDataStreamer.BeginWriteDataset({Source}nil, {Schema}lDataTable, lOptions, lMaxRecords, lDynSelectFields);
+ if not (woRows in lOptions) then Continue;
+
+ for x := 0 to lUnionTable.SourceTables.Count - 1 do begin
+ lTableName := lUnionTable.SourceTables[x].Name;
+
+ // Check is source table exists in schema.
+ if (not Assigned(ServiceSchema.FindDataset(lTableName))) then
+ raise EDAException.CreateFmt('Source table %s doesn''t exist in schema.', [lTableName]);
+
+ // Do column remapping for DynFields names
+ lMapping := lUnionTable.SourceTables[x].ColumnMappings;
+ SetLength(lDynSelectFields2, Length(lDynSelectFields));
+ for n := Low(lDynSelectFields) to High(lDynSelectFields) do begin
+ if (lDynSelectFields[n]) = def_SourceTableFieldName then
+ lDynSelectFields2[n] := lDynSelectFields[n]
+ else
+ lDynSelectFields2[n] := lMapping.MappingByDatasetField(lDynSelectFields[n]).TableField;
+ end;
+
+ //Remove that
+ //lRemappedWhereClause := Where_RemapFieldNames(lWhereClause, lMapping, lTableName);
+
+ lDataSet := ServiceSchema.NewUnionItemDataset(
+ GetConnectionForObject(lTableName),
+ lTableName,
+ lParamNames,
+ lParamValues,
+ lDynSelectFields2,
+ lWhereClause,
+ lMapping
+ );
+
+ ServiceDataStreamer.WriteDatasetData(lDataSet, lAppendData, x);
+ // Keeping track of maxrecords
+ if ((lMaxRecords <> -1) and (lAppendData.RecordCount >= lMaxRecords)) then Break;
+ end;
+ ServiceDataStreamer.EndWriteDataset(lAppendData);
+ end
+ { Joins }
+ else if lDataTable is TDAJoinDataTable then begin
+ raise EDAException.Create('TODO: Joined Data Tables are not implemented in this release, yet.');
+ end
+ { Plain Data Tables }
+ else begin
+
+ lDataSet := ServiceSchema.NewDataset(GetConnectionForObject(lTableName), lTableName, lParamNames, lParamValues, lDynSelectFields, lWhereClause, False);
+
+ if (woSchema in lOptions) and Assigned(fBeforeGetDatasetSchema) then fBeforeGetDatasetSchema(self, lDataset);
+ if (woRows in lOptions) and Assigned(fBeforeGetDatasetData) then fBeforeGetDatasetData(self, lDataset, (woSchema in lOptions), lMaxRecords);
+
+ if (aTableRequestInfoArray <> nil) then begin
+ lFilter:=Utf8ToAnsi(aTableRequestInfoArray[i].UserFilter);
+ CheckUTF8Decode(aTableRequestInfoArray[i].UserFilter,lFilter);
+ if (Trim(lFilter)<>'') then begin
+ if not AllowWhereSQL then raise Exception.Create('Passing of clear text WHERE clauses has been disabled (GetData)');
+ lDataSet.Where.AddText(lFilter);
+ for k := 0 to High(lParamValues) do
+ lDataSet.ParamByName(lParamNames[k]).Value := lParamValues[k];
+ end;
+ end;
+ lDataSet.Open;
+
+ ServiceDataStreamer.WriteDataset(lDataset, lOptions, lMaxRecords,lDynSelectFields);
+
+ if (woRows in lOptions) and Assigned(fAfterGetDatasetData) then fAfterGetDatasetData(self, lDataset, (woSchema in lOptions), lMaxRecords);
+ if (woSchema in lOptions) and Assigned(fAfterGetDatasetSchema) then fAfterGetDatasetSchema(self, lDataset);
+
+ end;
+
+ end
+ { ExportedDataTables }
+ else begin
+ lFilter:=Utf8ToAnsi(aTableRequestInfoArray[i].UserFilter);
+ CheckUTF8Decode(aTableRequestInfoArray[i].UserFilter,lFilter);
+ if (Trim(lFilter)<>'') then
+ raise EDAException.Create('WHERE clauses are not supported on data from ExportedDataTables.');
+
+ if (woSchema in lOptions) and Assigned(fBeforeGetDatasetSchema) then fBeforeGetDatasetSchema(self, lDataset);
+ if (woRows in lOptions) and Assigned(fBeforeGetDatasetData) then fBeforeGetDatasetData(self, lDataset, (woSchema in lOptions), lMaxRecords);
+
+ if lDataSet.Active and (lMaxRecords = -1) then begin
+ if lDataSet.QueryInterface(IDAEditableDataset,lEditableDataset) = s_ok then
+ lEditableDataset.First
+ else
+ lDataSet.Close;
+ end;
+
+ if not lDataSet.Active then lDataSet.Open;
+ ServiceDataStreamer.WriteDataset(lDataset, lOptions, lMaxRecords,lDynSelectFields);
+
+ if (woRows in lOptions) and Assigned(fAfterGetDatasetData) then fAfterGetDatasetData(self, lDataset, (woSchema in lOptions), lMaxRecords);
+ if (woSchema in lOptions) and Assigned(fAfterGetDatasetSchema) then fAfterGetDatasetSchema(self, lDataset);
+ end;
+
+ if assigned(lDataTable) and not (lDataTable.IsPublic) then
+ raise EDAException.Create(lDataTable.Name +' is not accessible');
+
+ lDataSet := nil;
+ end; { for }
+
+ finally
+ ServiceDataStreamer.Finalize();
+ end;
+
+ if lHasTransaction and Connection.InTransaction and TriggerTransactionEvent(fOnUpdateDataCommitTransaction) then Connection.CommitTransaction;
+ except
+ if lHasTransaction and Connection.InTransaction and TriggerTransactionEvent(fOnUpdateDataRollBackTransaction) then Connection.RollbackTransaction;
+ raise;
+ end;
+
+ except
+ FreeAndNIL(result);
+ raise;
+ end;
+
+end;
+
+//TODO: needs cleaning!
+function TDataAbstractService.UnpackDeltas(const DeltaStream: Binary; DeltaStructList: TDADeltaStructList): TDADeltasModes;
+var
+ i, j: integer;
+ lDeltaName: string;
+ lBizProc: TDABusinessProcessor;
+ lDetails : TDADatasetRelationshipList;
+ lFound: boolean;
+ lStruct : TDADeltaStruct;
+ ltabRef: TDADataTableReference;
+begin
+ result := [];
+ Check(True);
+ // Reads the deltas.
+ ServiceDataStreamer.Initialize(DeltaStream, aiReadFromBeginning);
+ try
+ if (ServiceDataStreamer.DeltaCount = 0) then Exit;
+ for i := 0 to (ServiceDataStreamer.DeltaCount - 1) do begin
+ lDeltaName := ServiceDataStreamer.DeltaNames[i];
+ if (ExportedDataTables.Count >0) then begin
+ ltabRef := ExportedDataTables.FindByName(lDeltaName);
+ if Assigned(ltabRef) then begin
+ // for ExportedDataTables , BP=nil
+ lStruct := DeltaStructList.Add(NewDelta(lDeltaName), nil);
+ ServiceDataStreamer.ReadDelta(lDeltaName, lStruct.Delta);
+ Result:=Result+[dumExported];
+ Continue;
+ end;
+ end;
+ lFound := false;
+ { Tries to locate a user-defined business processor }
+ for j := 0 to (Self.ComponentCount - 1) do begin
+ if (Self.Components[j] is TDABusinessProcessor) then begin
+ lBizProc := TDABusinessProcessor(Self.Components[j]);
+ if SameText(lBizProc.ReferencedDataset, lDeltaName) and (lBizProc.Schema = fServiceSchema) then begin
+ lStruct := DeltaStructList.Add(NewDelta(lDeltaName), lBizProc);
+ ServiceDataStreamer.ReadDelta(lDeltaName, lStruct.Delta);
+ if ServiceDataStreamer.HasReducedDelta then begin
+ if (lBizProc.InsertCommandName <> '') or
+ (lBizProc.DeleteCommandName <> '') or
+ (lBizProc.UpdateCommandName <> '') or
+ ([poAutoGenerateInsert,poAutoGenerateUpdate,poAutoGenerateDelete]*lBizProc.ProcessorOptions <>[poAutoGenerateInsert,poAutoGenerateUpdate,poAutoGenerateDelete]) then
+ raise Exception.Create('SendReducedDelta option is uncompatible with '+lBizProc.Name+' settings');
+ end;
+ lFound := true;
+ Break;
+ end;
+ end;
+ end;
+
+ { Either creates one or aborts raising an exception }
+ if not lFound then begin
+ if not AutoCreateBusinessProcessors then
+ raise Exception.CreateFmt(err_DARDMCannotFindProxessorForDelta, [lDeltaName]);
+
+ //ToDo: this will never get freed, until the DM frees?
+ lBizProc := TDABusinessProcessor.Create(self);
+ lBizProc.ReferencedDataset := lDeltaName;
+ lBizProc.Schema := ServiceSchema;
+ if Assigned(fOnBusinessProcessorAutoCreated) then fOnBusinessProcessorAutoCreated(Self, lBizProc);
+
+ lStruct := DeltaStructList.Add(NewDelta(lDeltaName), lBizProc);
+ ServiceDataStreamer.ReadDelta(lDeltaName, lStruct.Delta);
+
+ end;
+
+ Result:=Result+[dumStandard];
+ end;
+ fHasReducedDelta := ServiceDataStreamer.HasReducedDelta;
+ if not (dumStandard in Result) then exit; // nothing to process
+ Check;
+ { Sets the master/detail relationships }
+ if (ServiceSchema.RelationShips.Count>0) then begin
+
+ lDetails := TDADatasetRelationshipList.Create;
+ try
+ for i := 0 to DeltaStructList.Count-1 do begin
+ ServiceSchema.RelationShips.GetDetails(DeltaStructList[i].BusinessProcessor.ReferencedDataset, lDetails);
+ if (lDetails.Count=0) then Continue;
+
+ { Prepares an array with the references to the detail deltas that will be used later on to adjust
+ autoincs, etc. }
+ for j := 0 to lDetails.Count-1 do begin
+ lStruct := DeltaStructList.FindStruct(lDetails[j].DetailDatasetName);
+ if assigned(lStruct) then begin
+ DeltaStructList[i].DetailDeltas.Add(lStruct.Delta);
+ DeltaStructList[i].RelationShips.Add(lDetails[j]);
+ end;
+ end;
+ end;
+ finally
+ lDetails.Free;
+ end;
+
+ end;
+ finally
+ ServiceDataStreamer.Finalize;
+ end;
+end;
+
+function TDataAbstractService.UpdateData(const aDelta: Binary): Binary;
+var
+ lProcessedDeltas: TStringList;
+ lDeltaStructs: TDADeltaStructList;
+ lStruct: TDADeltaStruct;
+ lDs: TDADataset;
+ lDoRaise: boolean;
+ i,j: integer;
+ modes: TDADeltasModes;
+ oldDeltaMode: Boolean;
+begin
+ if not AllowDataAccess then
+ raise Exception.Create('Data access has been disabled (UpdateData)');
+
+ if not AllowUpdates then
+ raise Exception.Create('Data updates have been disabled (UpdateData)');
+
+ result := nil;
+ fHasReducedDelta := False;
+
+ lDeltaStructs := TDADeltaStructList.Create;
+ try
+
+ try
+ modes:= UnpackDeltas(aDelta, lDeltaStructs);
+ if modes = [] then exit;
+
+ if dumStandard in modes then begin
+ Check;
+ if TriggerTransactionEvent(fOnUpdateDataBeginTransaction) then Connection.BeginTransaction;
+ end;
+ if Assigned(fBeforeProcessDeltas) then fBeforeProcessDeltas(Self, lDeltaStructs);
+
+ for i := 0 to lDeltaStructs.Count-1 do begin
+ if ServiceSchema <> nil then
+ lDs := ServiceSchema.FindDataset(lDeltaStructs[i].Delta.LogicalName)
+ else
+ lDs := nil;
+ if lDs <> nil then begin
+ if not lDs.IsPublic then
+ raise EDAException.Create(lDs.Name+' is not accessible');
+ if lDs.ReadOnly then
+ raise EDAException.Create(lDs.Name+' is read-only');
+ end;
+ end;
+ if dumExported in modes then
+ // Processes the delta for exported tables (BP=nil)
+ for i := 0 to lDeltaStructs.Count-1 do begin
+ if lDeltaStructs[i].BusinessProcessor = nil then
+ ExportedDataTables_MergeDelta(lDeltaStructs[i].Delta);
+ end;
+ if dumStandard in modes then begin
+ if (ServiceSchema.UpdateRules.Count = 0) and ProcessDeltasWithoutUpdateRules then begin
+
+ // Processes them in order, from first to last delta sent
+ for i := 0 to lDeltaStructs.Count-1 do
+ if lDeltaStructs[i].BusinessProcessor <> nil then begin
+ oldDeltaMode:=lDeltaStructs[i].BusinessProcessor.HasReducedDelta;
+ try
+ lDeltaStructs[i].BusinessProcessor.HasReducedDelta:=fHasReducedDelta;
+ // TODO: Handle GetConnectionForObject() for 'Rosetta', UNIONS and JOINS
+ lDeltaStructs[i].BusinessProcessor.ProcessDelta(GetConnectionForObject(lDeltaStructs[i].BusinessProcessor.ReferencedDataset), lDeltaStructs[i].Delta, AllChanges);
+ finally
+ lDeltaStructs[i].BusinessProcessor.HasReducedDelta:=oldDeltaMode;
+ end;
+
+ with lDeltaStructs[i] do
+ for j := 0 to (DetailDeltas.Count-1) do
+ BusinessProcessor.SynchronizeAutoIncs(Delta, DetailDeltas[j], RelationShips[j]);
+ end;
+ end
+ else begin
+ lProcessedDeltas := TStringList.Create;
+ try
+
+ for i := 0 to (ServiceSchema.UpdateRules.Count-1) do begin
+ // Processes them in the order defined in the schema
+ lStruct := lDeltaStructs.FindStruct(ServiceSchema.UpdateRules[i].DatasetName);
+ if assigned(lStruct) then begin
+ if lStruct.BusinessProcessor = nil then Continue;
+ // Adds the dataset name to the list of processed deltas. Those that don't have update rules will be processed later
+ lProcessedDeltas.Add(lStruct.Delta.LogicalName);
+
+ // Processes the delta
+ oldDeltaMode:=lStruct.BusinessProcessor.HasReducedDelta;
+ try
+ lStruct.BusinessProcessor.HasReducedDelta:=fHasReducedDelta;
+ // TODO: Handle GetConnectionForObject() for 'Rosetta', UNIONS and JOINS
+ lStruct.BusinessProcessor.ProcessDelta(GetConnectionForObject(lStruct.BusinessProcessor.ReferencedDataset), lStruct.Delta, ServiceSchema.UpdateRules[i].ChangeTypes);
+ finally
+ lStruct.BusinessProcessor.HasReducedDelta:=oldDeltaMode;
+ end;
+
+ if (ctInsert in ServiceSchema.UpdateRules[i].ChangeTypes) then begin
+ for j := 0 to (lStruct.DetailDeltas.Count-1) do
+ lStruct.BusinessProcessor.SynchronizeAutoIncs(lStruct.Delta, lStruct.DetailDeltas[j], lStruct.RelationShips[j]);
+ end;
+ end;
+ end;
+
+ // Processes the deltas for which update rules were not defined
+ if (ProcessDeltasWithoutUpdateRules) then begin
+ for i := 0 to lDeltaStructs.Count-1 do begin
+ // Skips if already processed
+ if (lProcessedDeltas.IndexOf(lDeltaStructs[i].Delta.LogicalName)>=0) then Continue;
+
+ if lDeltaStructs[i].BusinessProcessor <> nil then begin
+ oldDeltaMode:=lDeltaStructs[i].BusinessProcessor.HasReducedDelta;
+ try
+ lDeltaStructs[i].BusinessProcessor.HasReducedDelta:=fHasReducedDelta;
+ lDeltaStructs[i].BusinessProcessor.ProcessDelta(GetConnectionForObject(lDeltaStructs[i].BusinessProcessor.ReferencedDataset), lDeltaStructs[i].Delta, AllChanges);
+ finally
+ lDeltaStructs[i].BusinessProcessor.HasReducedDelta:=oldDeltaMode;
+ end;
+
+ with lDeltaStructs[i] do
+ for j := 0 to (DetailDeltas.Count-1) do
+ BusinessProcessor.SynchronizeAutoIncs(Delta, DetailDeltas[j], RelationShips[j]);
+ end;
+ end;
+ end;
+
+ finally
+ lProcessedDeltas.Free;
+ end;
+ end;
+ end;
+
+ if Assigned(fAfterProcessDeltas) then fAfterProcessDeltas(Self, lDeltaStructs);
+
+ if dumStandard in modes then
+ if Connection.InTransaction and TriggerTransactionEvent(fOnUpdateDataCommitTransaction) then Connection.CommitTransaction;
+
+ // Check for unhandled changes
+ for i := 0 to lDeltaStructs.Count-1 do begin
+ for j := 0 to lDeltaStructs[i].Delta.Count -1 do begin
+ if lDeltaStructs[i].Delta[j].Status = csPending then begin
+ lDeltaStructs[i].Delta[j].Status := csFailed;
+ lDeltaStructs[i].Delta[j].Message := 'Change was not processed';
+ end;
+ end;
+ end;
+ result := Binary.Create;
+ oldDeltaMode:=ServiceDataStreamer.SendReducedDelta;
+ ServiceDataStreamer.Initialize(result, aiWrite);
+ try
+ if fHasReducedDelta then ServiceDataStreamer.SendReducedDelta:=True;
+ for i := 0 to lDeltaStructs.Count-1 do
+ ServiceDataStreamer.WriteDelta(lDeltaStructs[i].Delta);
+ finally
+ ServiceDataStreamer.Finalize;
+ ServiceDataStreamer.SendReducedDelta:=oldDeltaMode;
+ end;
+
+ except
+ on E:Exception do begin
+ lDoRaise := true;
+ try
+ if Assigned(fOnProcessDeltasError) then fOnProcessDeltasError(Self, lDeltaStructs, E, lDoRaise);
+ finally
+ if dumStandard in modes then
+ if Connection.InTransaction and TriggerTransactionEvent(fOnUpdateDataRollBackTransaction) then Connection.RollbackTransaction;
+ end;
+ if lDoRaise then raise;
+ end;
+ end;
+ finally
+ lDeltaStructs.Free;
+ end;
+end;
+
+function TDataAbstractService.ExecuteCommand(const aCommandName: Utf8String; const aParameterArray: DataParameterArray): Integer;
+var
+ j: integer;
+ lParamNames: array of string;
+ lParamValues: array of Variant;
+ lAllow: boolean;
+ lCommand: IDASQLCommand;
+ lCommandSchema: TDASQLCommand;
+ lConnection: IDAConnection;
+ lCommandName: string;
+begin
+ if not AllowDataAccess then
+ raise Exception.Create('Data access has been disabled (ExecuteCommand)');
+
+ if not AllowExecuteCommands then
+ raise Exception.Create('Execution of commands has been disabled (ExecuteCommand)');
+
+ SetLength(lParamNames, aParameterArray.Count);
+ SetLength(lParamValues, aParameterArray.Count);
+ for j := 0 to (aParameterArray.Count-1) do begin
+ lParamNames[j] := Utf8ToAnsi(aParameterArray[j].Name);
+ CheckUTF8Decode(aParameterArray[j].Name,lParamNames[j]);
+ lParamValues[j] := aParameterArray[j].Value;
+ end;
+
+ lCommandName:=Utf8ToAnsi(aCommandName);
+ CheckUTF8Decode(aCommandName,lCommandName);
+ lCommandSchema := ServiceSchema.Commands.SQLCommandByName(lCommandName);
+ if assigned(lCommandSchema) and not (lCommandSchema.IsPublic) then
+ raise EDAException.Create(lCommandSchema.Name +' is not accessible');
+
+
+ lAllow := true;
+ lConnection := GetConnectionForObject(lCommandName);
+ if assigned(fExecuteCommandValidation) then fExecuteCommandValidation(self, lConnection, lCommandName, lParamNames, lParamValues, ServiceSchema, lAllow);
+ if not lAllow then raise EDADatasetNotAccessible.CreateFmt(err_CommandNotAccessible, [lCommandName]);
+
+ if TriggerTransactionEvent(fOnUpdateDataBeginTransaction) then lConnection.BeginTransaction;
+ try
+
+ lCommand := ServiceSchema.NewCommand(lConnection, lCommandName, lParamNames, lParamValues, false);
+ if Assigned(fBeforeExecutecommand) then fBeforeExecuteCommand(self, lCommand);
+ result := lCommand.Execute;
+ if assigned(fAfterExecutecommand) then fAfterExecuteCommand(self, lCommand, Result);
+
+ if lConnection.InTransaction and TriggerTransactionEvent(fOnUpdateDataCommitTransaction) then lConnection.CommitTransaction;
+ except
+ if lConnection.InTransaction and TriggerTransactionEvent(fOnUpdateDataRollBackTransaction) then lConnection.RollbackTransaction;
+ raise;
+ end;
+end;
+
+{ IDataAbstractService: Direct SQL Access }
+
+function TDataAbstractService.SQLGetDataEx(const aSQLText: Utf8String;
+ const aIncludeSchema: Boolean; const aMaxRecords: Integer;
+ const aDynamicWhereXML: Widestring): Binary;
+var
+ lOptions: TDAWriteOptions;
+ lDataSet: IDADataSet;
+ lAllow: boolean;
+ lSQLText: string;
+begin
+ if not AllowDataAccess then
+ raise Exception.Create('Data access has been disabled (SQLGetData)');
+
+ if not AllowExecuteSQL then
+ raise Exception.Create('Execution of SQL has been disabled (SQLGetData)');
+
+ if assigned(fHETConnection) then
+ raise Exception.Create('Execution of SQL isnot supported for HET Connections');
+
+ result := nil;
+ lSQLText := Utf8ToAnsi(aSQLText);
+ CheckUTF8Decode(aSQLText,lSQLText);
+ if lSQLText = '' then exit;
+
+ Check();
+
+ lAllow := true;
+ if assigned(fSQLValidation) then fSQLValidation(self, Connection, lSQLText, [], [], lAllow);
+ if not lAllow then raise EDADatasetNotAccessible.Create(err_SQLNotPermitted);
+
+ result := Binary.Create;
+ Result.CapacityIncrement := ServiceDataStreamer.BufferSize;
+ try
+ if TriggerTransactionEvent(fOnUpdateDataBeginTransaction) then Connection.BeginTransaction;
+ try
+ ServiceDataStreamer.Initialize(result, aiWrite);
+ try
+
+ lOptions := [woRows];
+ if aIncludeSchema then lOptions := lOptions+[woSchema];
+
+ lDataSet := Connection.NewDataset(lSQLText,'SQLResult');
+ try
+ if aDynamicWhereXML <> '' then lDataSet.DynamicWhere.Expression := lDataSet.DynamicWhere.XMLToExpression(aDynamicWhereXML);
+ if (woSchema in lOptions) and Assigned(fBeforeGetDatasetSchema) then fBeforeGetDatasetSchema(self, lDataset);
+ if (woRows in lOptions) and Assigned(fBeforeGetDatasetData) then fBeforeGetDatasetData(self, lDataset, (woSchema in lOptions), aMaxRecords);
+
+ lDataSet.Open();
+
+ ServiceDataStreamer.WriteDataset(lDataset, lOptions, aMaxRecords);
+
+ if (woRows in lOptions) and Assigned(fAfterGetDatasetData) then fAfterGetDatasetData(self, lDataset, (woSchema in lOptions), aMaxRecords);
+ if (woSchema in lOptions) and Assigned(fAfterGetDatasetSchema) then fAfterGetDatasetSchema(self, lDataset);
+
+ finally
+ lDataSet := nil;
+ end;
+
+ finally
+ ServiceDataStreamer.Finalize();
+ end;
+
+ if Connection.InTransaction and TriggerTransactionEvent(fOnUpdateDataCommitTransaction) then Connection.CommitTransaction;
+ except
+ if Connection.InTransaction and TriggerTransactionEvent(fOnUpdateDataRollBackTransaction) then Connection.RollbackTransaction;
+ raise;
+ end;
+
+ except
+ FreeAndNIL(result);
+ raise;
+ end;
+
+end;
+
+function TDataAbstractService.SQLExecuteCommandEx(const aSQLText: Utf8String; const aDynamicWhereXML: Widestring): Integer;
+var
+ lAllow: boolean;
+ lSQLText: string;
+begin
+ if not AllowDataAccess then
+ raise Exception.Create('Data access has been disabled (SQLExecuteCommand)');
+
+ if not AllowExecuteSQL then
+ raise Exception.Create('Execution of SQL has been disabled (SQLExecuteCommand)');
+
+ if assigned(fHETConnection) then
+ raise Exception.Create('Execution of SQL isnot supported for HET Connections');
+
+ Check();
+ lSQLText := Utf8ToAnsi(aSQLText);
+ CheckUTF8Decode(aSQLText,lSQLText);
+ lAllow := true;
+ if assigned(fSQLValidation) then fSQLValidation(self, Connection, lSQLText, [], [], lAllow);
+ if not lAllow then raise EDADatasetNotAccessible.CreateFmt(err_SQLNotPermitted, []);
+
+ if TriggerTransactionEvent(fOnUpdateDataBeginTransaction) then Connection.BeginTransaction;
+ try
+ with Connection.NewCommand(lSQLText, stSQL) do begin
+ if aDynamicWhereXML <> '' then DynamicWhere.Expression := DynamicWhere.XMLToExpression(aDynamicWhereXML);
+ result := Execute;
+ end;
+ if Connection.InTransaction and TriggerTransactionEvent(fOnUpdateDataCommitTransaction) then Connection.CommitTransaction;
+ except
+ if Connection.InTransaction and TriggerTransactionEvent(fOnUpdateDataRollBackTransaction) then Connection.RollbackTransaction;
+ raise;
+ end;
+end;
+
+{ Properties }
+
+procedure TDataAbstractService.SetExportedDataTables(const Value: TDADataTableReferenceCollection);
+begin
+ fExportedDataTables.Assign(Value);
+end;
+
+procedure TDataAbstractService.SetServiceDataStreamer(const Value: TDADataStreamer);
+begin
+ fServiceDataStreamer := Value;
+ if (fServiceDataStreamer <> nil) then
+ fServiceDataStreamer.FreeNotification(Self);
+end;
+
+procedure TDataAbstractService.SetServiceSchema(const Value: TDASchema);
+begin
+ fServiceSchema := Value;
+
+ if assigned(fServiceSchema) then
+ fServiceSchema.FreeNotification(self);
+end;
+
+{ Connections }
+
+function TDataAbstractService.GetConnection: IDAConnection;
+var
+ lConnectionName: string;
+begin
+ inherited;
+ result := fConnection;
+ if assigned(fConnection) then exit;
+ if (csDesigning in ComponentState) then exit;
+
+ if AcquireConnection then try
+
+ if (fServiceSchema = nil) or (fServiceSchema.ConnectionManager = nil) then raise Exception.Create(err_DARDMInvalidSchema);
+
+ lConnectionName := ConnectionName;
+ if Assigned(fBeforeAcquireConnection) then fBeforeAcquireConnection(Self, lConnectionName);
+
+ result := ServiceSchema.ConnectionManager.NewConnection(lConnectionName);
+ Connection := result;
+ if Assigned(fAfterAcquireConnection) then fAfterAcquireConnection(Self, lConnectionName, result);
+
+ except
+ on E: Exception do begin
+ if Assigned(fOnAcquireConnectionFailure) then fOnAcquireConnectionFailure(Self, lConnectionName, E);
+ raise;
+ end;
+ end;
+end;
+
+{$WARN SYMBOL_DEPRECATED OFF}
+procedure TDataAbstractService.SetConnection(aConnection: IDAConnection);
+begin
+ if fConnection <> aConnection then begin
+ fConnection := aConnection;
+ if not Supports(fConnection, IDAHETConnection, fHETConnection) then fHETConnection := nil;
+ end;
+end;
+{$WARN SYMBOL_DEPRECATED ON}
+
+function TDataAbstractService.GetConnectionForObject(const aName: string): IDAConnection;
+begin
+ result := Connection; // forces acquisition of Connection
+ if assigned(fHETConnection) then
+ result := fHETConnection.GetConnectionForObject(aName)
+end;
+
+procedure TDataAbstractService.DoOnDeactivate(aClientID: TGUID);
+begin
+ inherited;
+ if (csDesigning in ComponentState) then Exit;
+
+ ReleaseConnection();
+end;
+
+procedure TDataAbstractService.ReleaseConnection;
+var
+ lConnectionName: string;
+begin
+ if assigned(fConnection) then begin
+ lConnectionName := fConnection.Name;
+ if Assigned(fBeforeReleaseConnection) then fBeforeReleaseConnection(Self, lConnectionName, fConnection);
+ Connection := nil;
+ if Assigned(fAfterReleaseConnection) then fAfterReleaseConnection(Self, lConnectionName);
+ end;
+end;
+
+procedure TDataAbstractService.Check(CheckOnlyDataStreamer:Boolean = false);
+begin
+ if not CheckOnlyDataStreamer then begin
+ if not (Assigned(Connection) or AcquireConnection) then
+ raise EROException.Create('AcquireConnection is not set and there is no connection available');
+ if not Assigned(ServiceSchema) then
+ raise Exception.Create('ServiceSchema property is not assigned.');
+ end;
+ if not Assigned(ServiceDataStreamer) then
+ raise EROException.Create('DataStreamer must be assigned.');
+end;
+
+function TDataAbstractService.ExecuteCommandEx(const aCommandName: Utf8String;
+ const aInputParameters: DataParameterArray;
+ out aOutputParameters: DataParameterArray): Integer;
+var
+ j: integer;
+ lParamNames: array of string;
+ lParamValues: array of Variant;
+ lAllow: boolean;
+ lCommand: IDASQLCommand;
+ lCommandSchema: TDASQLCommand;
+ lConnection: IDAConnection;
+ lCommandName: string;
+begin
+ if not AllowDataAccess then
+ raise Exception.Create('Data access has been disabled (ExecuteCommand)');
+
+ if not AllowExecuteCommands then
+ raise Exception.Create('Execution of commands has been disabled (ExecuteCommand)');
+
+ lCommandName:= Utf8ToAnsi(aCommandName);
+ CheckUTF8Decode(aCommandName,lCommandName);
+ SetLength(lParamNames, aInputParameters.Count);
+ SetLength(lParamValues, aInputParameters.Count);
+ for j := 0 to (aInputParameters.Count-1) do begin
+ lParamNames[j] := Utf8ToAnsi(aInputParameters[j].Name);
+ CheckUTF8Decode(aInputParameters[j].Name,lParamNames[j]);
+ lParamValues[j] := aInputParameters[j].Value;
+ end;
+
+ lCommandSchema := ServiceSchema.Commands.SQLCommandByName(lCommandName);
+ if assigned(lCommandSchema) and not (lCommandSchema.IsPublic) then
+ raise EDAException.Create(lCommandSchema.Name +' is not accessible');
+
+
+ lAllow := true;
+ lConnection := GetConnectionForObject(lCommandName);
+ if assigned(fExecuteCommandValidation) then fExecuteCommandValidation(self, lConnection, lCommandName, lParamNames, lParamValues, ServiceSchema, lAllow);
+ if not lAllow then raise EDADatasetNotAccessible.CreateFmt(err_CommandNotAccessible, [lCommandName]);
+
+ if TriggerTransactionEvent(fOnUpdateDataBeginTransaction) then lConnection.BeginTransaction;
+ try
+
+ lCommand := ServiceSchema.NewCommand(lConnection, lCommandName, lParamNames, lParamValues, false);
+ if Assigned(fBeforeExecutecommand) then fBeforeExecuteCommand(self, lCommand);
+ result := lCommand.Execute;
+ if assigned(fAfterExecutecommand) then fAfterExecuteCommand(self, lCommand, Result);
+
+ aOutputParameters := DataParameterArray.Create;
+ for j := 0 to lCommand.Params.Count -1 do begin
+ if (lCommand.Params[j].ParamType <> daptUnknown) and (lCommand.Params[j].ParamType <> daptInput) then begin
+ with aOutputParameters.Add do begin
+ Name := AnsiToUtf8(lCommand.Params[j].Name);
+ Value := lCommand.Params[j].Value;
+ end;
+ end;
+ end;
+ if lConnection.InTransaction and TriggerTransactionEvent(fOnUpdateDataCommitTransaction) then lConnection.CommitTransaction;
+ except
+ if lConnection.InTransaction and TriggerTransactionEvent(fOnUpdateDataRollBackTransaction) then lConnection.RollbackTransaction;
+ raise;
+ end;
+end;
+
+function TDataAbstractService.GetDatasetScripts(const DatasetNames: Utf8String): Utf8String;
+var names : TStringList;
+ i : integer;
+ ds : TDADataset;
+ lResult: WideString;
+begin
+ lresult := '';
+ names := TStringList.Create;
+ try
+ names.CommaText :=Utf8ToAnsi(DatasetNames);
+ CheckUTF8Decode(DatasetNames,names.CommaText);
+ for i := 0 to (names.Count-1) do begin
+ // scripts for externaltables is not allowed
+ if fExportedDataTables.FindByName(names[i]) <> nil then continue;
+ ds := ServiceSchema.Datasets.DatasetByName(names[i]);
+
+ lresult := lresult+Format('<%s Language="%s">%s>', [
+ names[i],
+ GetEnumName(TypeInfo(TROSEScriptLanguage), Ord(ds.BusinessRulesClient.ScriptLanguage)),
+ ds.BusinessRulesClient.Script,
+ names[i]]);
+ end;
+
+ result := UTF8Encode(''+lresult+' ');
+ finally
+ FreeAndNIL(names);
+ end;
+end;
+
+procedure TDataAbstractService.ExportedDataTables_MergeDelta(ADelta: IDADelta);
+var
+ i, k, x: integer;
+ oldval, newval, val : Variant;
+ fld : TDAField;
+ pkfields : string;
+ pkfields1: array of string;
+ insertfields: array of string;
+ keyvals, insertvals : array of variant;
+ LDAEditableDataset:IDAEditableDataset;
+ ADataset: IDADataset;
+ pk_array: array of boolean;
+begin
+ // validated in UnpackDeltas
+ ADataset:=ExportedDataTables.FindByName(ADelta.LogicalName).Dataset;
+ SetLength(pk_array, ADelta.LoggedFieldCount);
+ for i := 0 to ADelta.LoggedFieldCount - 1 do
+ pk_array[i]:=False;
+
+ for i := 0 to ADelta.KeyFieldCount - 1 do begin
+ x := ADelta.IndexOfLoggedField(ADelta.KeyFieldNames[i]);
+ if x <> -1 then pk_array[x]:=True;
+ end;
+
+ SetLength(pkfields1, ADelta.KeyFieldCount);
+ for i := 0 to (ADelta.KeyFieldCount-1) do
+ pkfields1[i]:=ADelta.KeyFieldNames[i];
+ if ADelta.KeyFieldCount = 0 then
+ begin
+ SetLength(pkfields1, ADelta.LoggedFieldCount);
+ k:=-1;
+ for i := 0 to (ADelta.LoggedFieldCount-1) do begin
+ if ADelta.LoggedFieldTypes[i] in [datUnknown, datMemo, datBlob,datWideMemo] then Continue;
+ inc(k);
+ pkfields1[k]:=ADelta.LoggedFieldNames[i];
+ end;
+ SetLength(pkfields1,k+1);
+ end;
+ SetLength(keyvals, Length(pkfields1));
+ pkfields := '';
+ For i:=0 to Length(pkfields1) - 1 do
+ pkfields:=pkfields+pkfields1[i]+';';
+ pkfields := Copy(pkfields, 1, Length(pkfields)-1);
+
+ if (ADelta.Count>0) then begin
+ for i := (ADelta.Count-1) downto 0 do begin
+ for k := 0 to Length(pkfields1)-1 do begin
+ val := ADelta[i].OldValueByName[pkfields1[k]];
+ keyvals[k] := val;
+ end;
+ if fHasReducedDelta and (ADelta.KeyFieldCount = 0) then begin
+ SetLength(pkfields1, ADelta.LoggedFieldCount);
+ k:=-1;
+ for x := 0 to (ADelta.LoggedFieldCount-1) do begin
+ if ADelta.LoggedFieldTypes[x] in [datUnknown, datMemo, datBlob,datWideMemo] then Continue;
+ pkfields:=ADelta.LoggedFieldNames[x];
+ oldval:=ADelta[i].OldValueByName[pkfields];
+ if ROVariantsEqual(oldval,ADelta[i].NewValueByName[pkfields]) and (VarIsNull(oldval) or (VarIsEmpty(oldval))) then Continue;
+ inc(k);
+ pkfields1[k]:=ADelta.LoggedFieldNames[x];
+ end;
+ SetLength(pkfields1,k+1);
+ SetLength(keyvals,k+1);
+ for k := 0 to Length(pkfields1)-1 do begin
+ val := ADelta[i].OldValueByName[pkfields1[k]];
+ keyvals[k] := val;
+ end;
+ pkfields := '';
+ For x:=0 to Length(pkfields1) - 1 do
+ pkfields:=pkfields+pkfields1[x]+';';
+ pkfields := Copy(pkfields, 1, Length(pkfields)-1);
+ end;
+ if ADataset.QueryInterface(StringToGUID('{D3E2147F-65B3-4D9D-8614-7270011FA7D5}'),LDAEditableDataset) <> 0 then exit;
+ LDAEditableDataset.Open;
+ LDAEditableDataset.First;
+ case ADelta[i].ChangeType of
+ ctDelete: begin
+ // Locates the original record
+ if Length(keyvals)=1 then begin
+ if not Adataset.Locate(pkfields, keyvals[0], []) then Continue;
+ end
+ else begin
+ if not Adataset.Locate(pkfields, keyvals, []) then Continue;
+ end;
+ LDAEditableDataset.Delete;
+ end;
+ ctInsert: begin
+ // fHasReducedDelta don't work in this case
+ // old values = Unassigned
+ // new Values = Null
+ SetLength(insertFields, ADelta.LoggedFieldCount);
+ SetLength(insertvals, ADelta.LoggedFieldCount);
+ for x := 0 to (ADelta.LoggedFieldCount-1) do begin
+ insertfields[x] := ADelta.LoggedFieldNames[x];
+ insertvals[x] := ADelta[i].NewValueByName[ADelta.LoggedFieldNames[x]];
+ end;
+ LDAEditableDataset.AddRecord(insertfields,insertvals);
+ end;
+ ctUpdate: begin
+ // Locates the original record
+ if Length(keyvals)=1 then begin
+ if not Adataset.Locate(pkfields, keyvals[0], []) then Continue;
+ end
+ else begin
+ if not Adataset.Locate(pkfields, keyvals, []) then Continue;
+ end;
+ LDAEditableDataset.Edit;
+ for x := 0 to (ADelta.LoggedFieldCount-1) do begin
+ fld := Adataset.FieldByName(ADelta.LoggedFieldNames[x]);
+ newval := ADelta[i].NewValueByName[fld.Name];
+ oldval := ADelta[i].OldValueByName[fld.Name];
+ if fHasReducedDelta and (ROVariantsEqual(newval, oldval)) then Continue;
+ fld.Value:=newval;
+{ if fld.ServerAutoRefresh or (not VarIsArray(newVal) and (newval<>oldval)) then begin
+ VariantToFieldValue(newval, fld);
+ end;
+}
+ end;
+ LDAEditableDataset.Post;
+ end;
+ end;
+ // Removes this merged change
+ ADelta.Delete(i);
+ end;
+ end
+end;
+
+procedure TDataAbstractService.RegisterForDataChangeNotification(
+ const aTableName: Utf8String);
+begin
+{ TODO : todo }
+end;
+
+procedure TDataAbstractService.UnregisterForDataChangeNotification(
+ const aTableName: Utf8String);
+begin
+{ TODO : todo }
+end;
+
+function TDataAbstractService.SQLExecuteCommand(const aSQLText: Utf8String): Integer;
+begin
+ Result:= SQLExecuteCommandEx(aSQLText,'');
+end;
+
+function TDataAbstractService.SQLGetData(const aSQLText: Utf8String; const aIncludeSchema: Boolean; const aMaxRecords: Integer): Binary;
+begin
+ Result:= SQLGetDataEx(aSQLText, aIncludeSchema, aMaxRecords, '');
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D10.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D10.bdsproj
new file mode 100644
index 0000000..4c974b2
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D10.bdsproj
@@ -0,0 +1,179 @@
+
+
+
+
+ Delphi.Personality
+
+ 1.0
+ {74F520E8-6944-4308-9CFD-20E9AFC351F3}
+
+
+
+
+ DataAbstract_Core_D10.dpk
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+
+
+ False
+
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+ RemObjects Data Abstract - Core Library
+ False
+
+
+
+ ..\Dcu\D10
+ ..\Dcu\D10
+ ..\Dcu\D10
+
+
+ DESIGNTIME
+
+ False
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 0
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1033
+ 1252
+
+
+ RemObjects Software
+
+ 0.0.0.0
+
+
+
+
+ RemObjects SDK
+ 1.0.0.0
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D10.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D10.cfg
new file mode 100644
index 0000000..11c667c
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D10.cfg
@@ -0,0 +1,48 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N0"..\Dcu\D10"
+-LE"..\Dcu\D10"
+-LN"..\Dcu\D10"
+-DDESIGNTIME
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-SYMBOL_EXPERIMENTAL
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNIT_EXPERIMENTAL
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D10.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D10.dpk
new file mode 100644
index 0000000..a3aaa6c
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D10.dpk
@@ -0,0 +1,109 @@
+package DataAbstract_Core_D10;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - Core Library'}
+{$IMPLICITBUILD OFF}
+{$DEFINE DESIGNTIME}
+
+requires
+ RemObjects_Core_D10,
+ rtl,
+ vcl,
+ adortl,
+ dbrtl,
+ dsnap,
+ vcldb;
+
+contains
+ uDAInterfaces in 'uDAInterfaces.pas',
+ uDAInterfacesEx in 'uDAInterfacesEx.pas',
+ uDAClasses in 'uDAClasses.pas',
+ uDAHelpers in 'uDAHelpers.pas',
+ uDAEngine in 'uDAEngine.pas',
+ uDAUtils in 'uDAUtils.pas',
+ uDARes in 'uDARes.pas',
+ DataAbstract_Core_Reg in 'DataAbstract_Core_Reg.pas',
+ uDABinAdapter in 'uDABinAdapter.pas',
+ uDAXMLAdapter in 'uDAXMLAdapter.pas',
+ uDADriverManager in 'uDADriverManager.pas',
+ uDASupportClasses in 'uDASupportClasses.pas',
+ uDADataTable in 'uDADataTable.pas',
+ uDACDSDataTable in 'uDACDSDataTable.pas',
+ uDAADODataTable in 'uDAADODataTable.pas',
+ uDABusinessProcessor in 'uDABusinessProcessor.pas',
+ uDAIBInterfaces in 'uDAIBInterfaces.pas',
+ uDAOracleInterfaces in 'uDAOracleInterfaces.pas',
+ uDAADOInterfaces in 'uDAADOInterfaces.pas',
+ uDAMacroProcessors in 'uDAMacroProcessors.pas',
+ uDADBSessionManager in 'uDADBSessionManager.pas',
+ uDAMacros in 'uDAMacros.pas',
+ DALoginService_Impl in 'DALoginService_Impl.pas',
+ DARemoteService_Impl in 'DARemoteService_Impl.pas',
+ uDAXMLUtils in 'uDAXMLUtils.pas',
+ uDARegExpr in 'uDARegExpr.pas',
+ uDADriverInfo in 'uDADriverInfo.pas',
+ uDAPleaseWaitForm in 'uDAPleaseWaitForm.pas',
+ uDAClientDataModule in 'uDAClientDataModule.pas',
+ uDAScriptingProvider in 'uDAScriptingProvider.pas',
+ uDAServerLog in 'uDAServerLog.pas',
+ uDADatasetProvider in 'uDADatasetProvider.pas',
+ uDAPoweredByDataAbstractButton in 'uDAPoweredByDataAbstractButton.pas',
+ SimpleLoginService_Impl in 'SimpleLoginService_Impl.pas',
+ DataAbstract3_Intf in 'DataAbstract3_Intf.pas',
+ DataAbstract3_Invk in 'DataAbstract3_Invk.pas',
+ DataAbstract3_Async in 'DataAbstract3_Async.pas',
+ DataAbstractService_Impl in 'DataAbstractService_Impl.pas' {DataAbstractService: TRORemoteDataModule},
+ MultiDbLoginService_Impl in 'MultiDbLoginService_Impl.pas',
+ BaseLoginService_Impl in 'BaseLoginService_Impl.pas' {BaseLoginService: TRORemoteDataModule},
+ DataAbstract4_Invk in 'DataAbstract4_Invk.pas',
+ DataAbstract4_Intf in 'DataAbstract4_Intf.pas',
+ DataAbstract4_Async in 'DataAbstract4_Async.pas',
+ uDARemoteDataAdapter in 'uDARemoteDataAdapter.pas',
+ uDACache in 'uDACache.pas',
+ uDARemoteDataAdapterRequests in 'uDARemoteDataAdapterRequests.pas',
+ uDADataStreamer in 'uDADataStreamer.pas',
+ uDADelta in 'uDADelta.pas',
+ uDADesigntimeCall in 'uDADesigntimeCall.pas',
+ uDAExceptions in 'uDAExceptions.pas',
+ uDASQL92Interfaces in 'uDASQL92Interfaces.pas',
+ uDABin2DataStreamer in 'uDABin2DataStreamer.pas',
+ uDAMemDataset in 'uDAMemDataset.pas',
+ uDAMemDataTable in 'uDAMemDataTable.pas',
+ uDAReconcileDialog in 'uDAReconcileDialog.pas' {ReconcileDialogForm},
+ uDAReconcileDialogDetails in 'uDAReconcileDialogDetails.pas',
+ uDADatasetWrapper in 'uDADatasetWrapper.pas',
+ uDADataTableReferenceCollection in 'uDADataTableReferenceCollection.pas',
+ uDAMySQLInterfaces in 'uDAMySQLInterfaces.pas',
+ uDASQLiteInterfaces in 'uDASQLiteInterfaces.pas',
+ uDAExpressionEvaluator in 'uDAExpressionEvaluator.pas',
+ uDASQL92QueryBuilder in 'uDASQL92QueryBuilder.pas',
+ uDAWhere in 'uDAWhere.pas',
+ uDARemoteCommand in 'uDARemoteCommand.pas',
+ uDAPostgresInterfaces in 'uDAPostgresInterfaces.pas',
+ uDAElevateDBInterfaces in 'uDAElevateDBInterfaces.pas',
+ uDADB2Interfaces in 'uDADB2Interfaces.pas',
+ uDASybaseInterfaces in 'uDASybaseInterfaces.pas',
+ MultiDbLoginServiceV5_Impl in 'MultiDbLoginServiceV5_Impl.pas'
+ ;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D10.res b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D10.res
new file mode 100644
index 0000000..204493b
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D10.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D11.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D11.dpk
new file mode 100644
index 0000000..f2493dc
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D11.dpk
@@ -0,0 +1,111 @@
+package DataAbstract_Core_D11;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - Core Library'}
+{$IMPLICITBUILD OFF}
+{$DEFINE DESIGNTIME}
+
+requires
+ RemObjects_Core_D11,
+ rtl,
+ vcl,
+ adortl,
+ dbrtl,
+ dsnap,
+ vcldb;
+
+contains
+ uDAInterfaces in 'uDAInterfaces.pas',
+ uDAInterfacesEx in 'uDAInterfacesEx.pas',
+ uDAClasses in 'uDAClasses.pas',
+ uDAHelpers in 'uDAHelpers.pas',
+ uDAEngine in 'uDAEngine.pas',
+ uDAUtils in 'uDAUtils.pas',
+ uDARes in 'uDARes.pas',
+ DataAbstract_Core_Reg in 'DataAbstract_Core_Reg.pas',
+ uDABinAdapter in 'uDABinAdapter.pas',
+ uDAXMLAdapter in 'uDAXMLAdapter.pas',
+ uDADriverManager in 'uDADriverManager.pas',
+ uDASupportClasses in 'uDASupportClasses.pas',
+ uDADataTable in 'uDADataTable.pas',
+ uDACDSDataTable in 'uDACDSDataTable.pas',
+ uDAADODataTable in 'uDAADODataTable.pas',
+ uDABusinessProcessor in 'uDABusinessProcessor.pas',
+ uDAIBInterfaces in 'uDAIBInterfaces.pas',
+ uDAOracleInterfaces in 'uDAOracleInterfaces.pas',
+ uDAADOInterfaces in 'uDAADOInterfaces.pas',
+ uDAMacroProcessors in 'uDAMacroProcessors.pas',
+ uDADBSessionManager in 'uDADBSessionManager.pas',
+ uDAMacros in 'uDAMacros.pas',
+ DALoginService_Impl in 'DALoginService_Impl.pas',
+ DARemoteService_Impl in 'DARemoteService_Impl.pas',
+ uDAXMLUtils in 'uDAXMLUtils.pas',
+ uDARegExpr in 'uDARegExpr.pas',
+ uDADriverInfo in 'uDADriverInfo.pas',
+ uDAPleaseWaitForm in 'uDAPleaseWaitForm.pas',
+ uDAClientDataModule in 'uDAClientDataModule.pas',
+ uDAScriptingProvider in 'uDAScriptingProvider.pas',
+ uDAServerLog in 'uDAServerLog.pas',
+ uDADatasetProvider in 'uDADatasetProvider.pas',
+ uDAPoweredByDataAbstractButton in 'uDAPoweredByDataAbstractButton.pas',
+ SimpleLoginService_Impl in 'SimpleLoginService_Impl.pas',
+ DataAbstract3_Intf in 'DataAbstract3_Intf.pas',
+ DataAbstract3_Invk in 'DataAbstract3_Invk.pas',
+ DataAbstract3_Async in 'DataAbstract3_Async.pas',
+ DataAbstractService_Impl in 'DataAbstractService_Impl.pas' {DataAbstractService: TRORemoteDataModule},
+ MultiDbLoginService_Impl in 'MultiDbLoginService_Impl.pas',
+ BaseLoginService_Impl in 'BaseLoginService_Impl.pas' {BaseLoginService: TRORemoteDataModule},
+ DataAbstract4_Invk in 'DataAbstract4_Invk.pas',
+ DataAbstract4_Intf in 'DataAbstract4_Intf.pas',
+ DataAbstract4_Async in 'DataAbstract4_Async.pas',
+ uDARemoteDataAdapter in 'uDARemoteDataAdapter.pas',
+ uDACache in 'uDACache.pas',
+ uDARemoteDataAdapterRequests in 'uDARemoteDataAdapterRequests.pas',
+ uDADataStreamer in 'uDADataStreamer.pas',
+ uDADelta in 'uDADelta.pas',
+ uDADesigntimeCall in 'uDADesigntimeCall.pas',
+ uDAExceptions in 'uDAExceptions.pas',
+ uDASQL92Interfaces in 'uDASQL92Interfaces.pas',
+ uDABin2DataStreamer in 'uDABin2DataStreamer.pas',
+ uDAMemDataset in 'uDAMemDataset.pas',
+ uDAMemDataTable in 'uDAMemDataTable.pas',
+ uDAReconcileDialog in 'uDAReconcileDialog.pas' {ReconcileDialogForm},
+ uDAReconcileDialogDetails in 'uDAReconcileDialogDetails.pas',
+ uDADatasetWrapper in 'uDADatasetWrapper.pas',
+ uDADataTableReferenceCollection in 'uDADataTableReferenceCollection.pas',
+ uDAMySQLInterfaces in 'uDAMySQLInterfaces.pas',
+ uDASQLiteInterfaces in 'uDASQLiteInterfaces.pas',
+ uDAExpressionEvaluator in 'uDAExpressionEvaluator.pas',
+ uDASQL92QueryBuilder in 'uDASQL92QueryBuilder.pas',
+ uDAWhere in 'uDAWhere.pas',
+ uDARemoteCommand in 'uDARemoteCommand.pas',
+ uDAPostgresInterfaces in 'uDAPostgresInterfaces.pas',
+ uDAElevateDBInterfaces in 'uDAElevateDBInterfaces.pas',
+ uDADB2Interfaces in 'uDADB2Interfaces.pas',
+ uDASybaseInterfaces in 'uDASybaseInterfaces.pas',
+ MultiDbLoginServiceV5_Impl in 'MultiDbLoginServiceV5_Impl.pas'
+ ;
+
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D11.dproj b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D11.dproj
new file mode 100644
index 0000000..999a5a6
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D11.dproj
@@ -0,0 +1,153 @@
+
+
+ {f3a56007-69a7-443a-8fdf-56da71a8440c}
+ DataAbstract_Core_D11.dpk
+ Debug
+ AnyCPU
+ DCC32
+ ..\Dcu\D11\DataAbstract_Core_D11.bpl
+
+
+ 7.0
+ False
+ False
+ 0
+ ..\Dcu\D11
+ ..\Dcu\D11
+ ..\Dcu\D11
+ ..\Dcu\D11
+ ..\Dcu\D11
+ DESIGNTIME;RELEASE
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ 7.0
+ ..\Dcu\D11
+ ..\Dcu\D11
+ ..\Dcu\D11
+ ..\Dcu\D11
+ ..\Dcu\D11
+ DESIGNTIME
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ ..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\RemObjects SDK for Delphi\Dcu\D11
+
+
+ Delphi.Personality
+ Package
+
+False True False RemObjects Data Abstract - Core Library False False False True False 4 0 2 434 False False False False False 1033 1252 RemObjects Software 4.0.2.434 RemObjects SDK 1.0.0.0 DataAbstract_Core_D11.dpk
+
+
+
+
+
+
+
+
+
+
+ CodeGear BDE DB Components
+ CodeGear C++Builder Office 2000 Servers Package
+ CodeGear C++Builder Office XP Servers Package
+ Microsoft Office 2000 Sample Automation Server Wrapper Components
+ Microsoft Office XP Sample Automation Server Wrapper Components
+
+
+
+
+
+ MainSource
+
+
+
+
+ TRORemoteDataModule
+
+
+
+
+
+
+
+
+
+
+
+ TRORemoteDataModule
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D11.res b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D11.res
new file mode 100644
index 0000000..204493b
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D11.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D6.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D6.cfg
new file mode 100644
index 0000000..3d4736d
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D6.cfg
@@ -0,0 +1,42 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W+
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\Dcu\D6"
+-LE"..\Dcu\D6"
+-LN"..\Dcu\D6"
+-U"..\Dcu\D6;..\..\RemObjects SDK for Delphi\Dcu\D6"
+-O"..\Dcu\D6;..\..\RemObjects SDK for Delphi\Dcu\D6"
+-I"..\Dcu\D6;..\..\RemObjects SDK for Delphi\Dcu\D6"
+-R"..\Dcu\D6;..\..\RemObjects SDK for Delphi\Dcu\D6"
+-DDESIGNTIME
+-Z
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D6.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D6.dof
new file mode 100644
index 0000000..ff6f0ce
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D6.dof
@@ -0,0 +1,76 @@
+[FileVersion]
+Version=6.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=1
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitDeprecated=0
+UnitLibrary=0
+UnitPlatform=0
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=RemObjects Data Abstract - Core Library
+
+[Directories]
+OutputDir=
+UnitOutputDir=..\Dcu\D6
+PackageDLLOutputDir=..\Dcu\D6
+PackageDCPOutputDir=..\Dcu\D6
+SearchPath=..\Dcu\D6;..\..\RemObjects SDK for Delphi\Dcu\D6
+Packages=
+Conditionals=DESIGNTIME
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+FileDescription=
+FileVersion=3.0.0.280
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=RemObjects SDK
+ProductVersion=1.0.0.0
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D6.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D6.dpk
new file mode 100644
index 0000000..02f36b3
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D6.dpk
@@ -0,0 +1,110 @@
+package DataAbstract_Core_D6;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - Core Library'}
+{$IMPLICITBUILD OFF}
+{$DEFINE DESIGNTIME}
+
+requires
+ RemObjects_Core_D6,
+ rtl,
+ vcl,
+ adortl,
+ dbrtl,
+ dsnap,
+ vcldb;
+
+contains
+ uDAInterfaces in 'uDAInterfaces.pas',
+ uDAInterfacesEx in 'uDAInterfacesEx.pas',
+ uDAClasses in 'uDAClasses.pas',
+ uDAHelpers in 'uDAHelpers.pas',
+ uDAEngine in 'uDAEngine.pas',
+ uDAUtils in 'uDAUtils.pas',
+ uDARes in 'uDARes.pas',
+ DataAbstract_Core_Reg in 'DataAbstract_Core_Reg.pas',
+ uDABinAdapter in 'uDABinAdapter.pas',
+ uDAXMLAdapter in 'uDAXMLAdapter.pas',
+ uDADriverManager in 'uDADriverManager.pas',
+ uDASupportClasses in 'uDASupportClasses.pas',
+ uDADataTable in 'uDADataTable.pas',
+ uDACDSDataTable in 'uDACDSDataTable.pas',
+ uDAADODataTable in 'uDAADODataTable.pas',
+ uDABusinessProcessor in 'uDABusinessProcessor.pas',
+ uDAIBInterfaces in 'uDAIBInterfaces.pas',
+ uDAOracleInterfaces in 'uDAOracleInterfaces.pas',
+ uDAADOInterfaces in 'uDAADOInterfaces.pas',
+ uDAMacroProcessors in 'uDAMacroProcessors.pas',
+ uDADBSessionManager in 'uDADBSessionManager.pas',
+ uDAMacros in 'uDAMacros.pas',
+ DALoginService_Impl in 'DALoginService_Impl.pas',
+ DARemoteService_Impl in 'DARemoteService_Impl.pas',
+ uDAXMLUtils in 'uDAXMLUtils.pas',
+ uDARegExpr in 'uDARegExpr.pas',
+ uDADriverInfo in 'uDADriverInfo.pas',
+ uDAPleaseWaitForm in 'uDAPleaseWaitForm.pas',
+ uDAClientDataModule in 'uDAClientDataModule.pas',
+ uDAScriptingProvider in 'uDAScriptingProvider.pas',
+ uDAServerLog in 'uDAServerLog.pas',
+ uDADatasetProvider in 'uDADatasetProvider.pas',
+ uDAPoweredByDataAbstractButton in 'uDAPoweredByDataAbstractButton.pas',
+ SimpleLoginService_Impl in 'SimpleLoginService_Impl.pas',
+ DataAbstract3_Intf in 'DataAbstract3_Intf.pas',
+ DataAbstract3_Invk in 'DataAbstract3_Invk.pas',
+ DataAbstract3_Async in 'DataAbstract3_Async.pas',
+ DataAbstractService_Impl in 'DataAbstractService_Impl.pas' {DataAbstractService: TRORemoteDataModule},
+ MultiDbLoginService_Impl in 'MultiDbLoginService_Impl.pas',
+ BaseLoginService_Impl in 'BaseLoginService_Impl.pas' {BaseLoginService: TRORemoteDataModule},
+ DataAbstract4_Invk in 'DataAbstract4_Invk.pas',
+ DataAbstract4_Intf in 'DataAbstract4_Intf.pas',
+ DataAbstract4_Async in 'DataAbstract4_Async.pas',
+ uDARemoteDataAdapter in 'uDARemoteDataAdapter.pas',
+ uDACache in 'uDACache.pas',
+ uDARemoteDataAdapterRequests in 'uDARemoteDataAdapterRequests.pas',
+ uDADataStreamer in 'uDADataStreamer.pas',
+ uDADelta in 'uDADelta.pas',
+ uDADesigntimeCall in 'uDADesigntimeCall.pas',
+ uDAExceptions in 'uDAExceptions.pas',
+ uDASQL92Interfaces in 'uDASQL92Interfaces.pas',
+ uDABin2DataStreamer in 'uDABin2DataStreamer.pas',
+ uDAMemDataset in 'uDAMemDataset.pas',
+ uDAMemDataTable in 'uDAMemDataTable.pas',
+ uDAReconcileDialog in 'uDAReconcileDialog.pas' {ReconcileDialogForm},
+ uDAReconcileDialogDetails in 'uDAReconcileDialogDetails.pas',
+ uDADatasetWrapper in 'uDADatasetWrapper.pas',
+ uDADataTableReferenceCollection in 'uDADataTableReferenceCollection.pas',
+ uDAMySQLInterfaces in 'uDAMySQLInterfaces.pas',
+ uDASQLiteInterfaces in 'uDASQLiteInterfaces.pas',
+ uDAExpressionEvaluator in 'uDAExpressionEvaluator.pas',
+ uDASQL92QueryBuilder in 'uDASQL92QueryBuilder.pas',
+ uDAWhere in 'uDAWhere.pas',
+ uDARemoteCommand in 'uDARemoteCommand.pas',
+ uDAPostgresInterfaces in 'uDAPostgresInterfaces.pas',
+ uDAElevateDBInterfaces in 'uDAElevateDBInterfaces.pas',
+ uDADB2Interfaces in 'uDADB2Interfaces.pas',
+ uDASybaseInterfaces in 'uDASybaseInterfaces.pas',
+ MultiDbLoginServiceV5_Impl in 'MultiDbLoginServiceV5_Impl.pas'
+ ;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D6.res b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D6.res
new file mode 100644
index 0000000..204493b
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D6.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D7.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D7.cfg
new file mode 100644
index 0000000..d9c7e92
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D7.cfg
@@ -0,0 +1,51 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\Dcu\D7"
+-LE"..\Dcu\D7"
+-LN"..\Dcu\D7"
+-U"..\Dcu\D7;..\Dcu\DevEx;..\..\RemObjects SDK for Delphi\Dcu\D7;..\..\Pascal Script\Dcu\D7"
+-O"..\Dcu\D7;..\Dcu\DevEx;..\..\RemObjects SDK for Delphi\Dcu\D7;..\..\Pascal Script\Dcu\D7"
+-I"..\Dcu\D7;..\Dcu\DevEx;..\..\RemObjects SDK for Delphi\Dcu\D7;..\..\Pascal Script\Dcu\D7"
+-R"..\Dcu\D7;..\Dcu\DevEx;..\..\RemObjects SDK for Delphi\Dcu\D7;..\..\Pascal Script\Dcu\D7"
+-DDESIGNTIME
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D7.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D7.dof
new file mode 100644
index 0000000..19785e8
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D7.dof
@@ -0,0 +1,116 @@
+[FileVersion]
+Version=7.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=RemObjects Data Abstract - Core Library
+
+[Directories]
+OutputDir=
+UnitOutputDir=..\Dcu\D7
+PackageDLLOutputDir=..\Dcu\D7
+PackageDCPOutputDir=..\Dcu\D7
+SearchPath=..\Dcu\D7;..\Dcu\DevEx;..\..\RemObjects SDK for Delphi\Dcu\D7;..\..\Pascal Script\Dcu\D7
+Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;dclOfficeXP;RemObjects_DataSnap_D7;PurposesoftD7;addict3_d6;tb2kComplete_70;CDKDesignTimeSupport;CDKSmp;CDK;ES_CodeSite20;ESDelphiCommandCompiler;ESFileSearch;ESVisualCompositeExpert;EaglWk;ESGraphUtils;ESBase;ESVsCp;ESSampleComposites70;ESSampleCompositeEditors7;Rz252N70;SynEdit_D7;dxsbD7;dxComnD7;dxDockingD7;dxEdtrD7;dxELibD7;dxExELD7;EQGridD7;dxExRwD7;dxDBEdD7;dxInsD7;dxGrEdD7;ECQDBCD7;EQTLD7;EQDBTLD7;dxLayoutControlD7;dxMasterViewD7;dxmdsd7;dxNavBarD7;dxObjInsD7;dxPageControlD7;dxPSCoreD7;Rz252D70;cxPageControlVCLD7;cxEditorsVCLD7;dxThemeD7;cxLibraryVCLD7;cxDataD7;cxGridUtilsVCLD7;cxGridVCLD7;RemObjects_BPDX_D7
+Conditionals=DESIGNTIME
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+FileDescription=
+FileVersion=3.0.0.286
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=RemObjects SDK
+ProductVersion=1.0.0.0
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D7.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D7.dpk
new file mode 100644
index 0000000..7835d6b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D7.dpk
@@ -0,0 +1,110 @@
+package DataAbstract_Core_D7;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - Core Library'}
+{$IMPLICITBUILD OFF}
+{$DEFINE DESIGNTIME}
+
+requires
+ RemObjects_Core_D7,
+ rtl,
+ vcl,
+ adortl,
+ dbrtl,
+ dsnap,
+ vcldb;
+
+contains
+ uDAInterfaces in 'uDAInterfaces.pas',
+ uDAInterfacesEx in 'uDAInterfacesEx.pas',
+ uDAClasses in 'uDAClasses.pas',
+ uDAHelpers in 'uDAHelpers.pas',
+ uDAEngine in 'uDAEngine.pas',
+ uDAUtils in 'uDAUtils.pas',
+ uDARes in 'uDARes.pas',
+ DataAbstract_Core_Reg in 'DataAbstract_Core_Reg.pas',
+ uDABinAdapter in 'uDABinAdapter.pas',
+ uDAXMLAdapter in 'uDAXMLAdapter.pas',
+ uDADriverManager in 'uDADriverManager.pas',
+ uDASupportClasses in 'uDASupportClasses.pas',
+ uDADataTable in 'uDADataTable.pas',
+ uDACDSDataTable in 'uDACDSDataTable.pas',
+ uDAADODataTable in 'uDAADODataTable.pas',
+ uDABusinessProcessor in 'uDABusinessProcessor.pas',
+ uDAIBInterfaces in 'uDAIBInterfaces.pas',
+ uDAOracleInterfaces in 'uDAOracleInterfaces.pas',
+ uDAADOInterfaces in 'uDAADOInterfaces.pas',
+ uDAMacroProcessors in 'uDAMacroProcessors.pas',
+ uDADBSessionManager in 'uDADBSessionManager.pas',
+ uDAMacros in 'uDAMacros.pas',
+ DALoginService_Impl in 'DALoginService_Impl.pas',
+ DARemoteService_Impl in 'DARemoteService_Impl.pas',
+ uDAXMLUtils in 'uDAXMLUtils.pas',
+ uDARegExpr in 'uDARegExpr.pas',
+ uDADriverInfo in 'uDADriverInfo.pas',
+ uDAPleaseWaitForm in 'uDAPleaseWaitForm.pas',
+ uDAClientDataModule in 'uDAClientDataModule.pas',
+ uDAScriptingProvider in 'uDAScriptingProvider.pas',
+ uDAServerLog in 'uDAServerLog.pas',
+ uDADatasetProvider in 'uDADatasetProvider.pas',
+ uDAPoweredByDataAbstractButton in 'uDAPoweredByDataAbstractButton.pas',
+ SimpleLoginService_Impl in 'SimpleLoginService_Impl.pas',
+ DataAbstract3_Intf in 'DataAbstract3_Intf.pas',
+ DataAbstract3_Invk in 'DataAbstract3_Invk.pas',
+ DataAbstract3_Async in 'DataAbstract3_Async.pas',
+ DataAbstractService_Impl in 'DataAbstractService_Impl.pas' {DataAbstractService: TRORemoteDataModule},
+ MultiDbLoginService_Impl in 'MultiDbLoginService_Impl.pas',
+ BaseLoginService_Impl in 'BaseLoginService_Impl.pas' {BaseLoginService: TRORemoteDataModule},
+ DataAbstract4_Invk in 'DataAbstract4_Invk.pas',
+ DataAbstract4_Intf in 'DataAbstract4_Intf.pas',
+ DataAbstract4_Async in 'DataAbstract4_Async.pas',
+ uDARemoteDataAdapter in 'uDARemoteDataAdapter.pas',
+ uDACache in 'uDACache.pas',
+ uDARemoteDataAdapterRequests in 'uDARemoteDataAdapterRequests.pas',
+ uDADataStreamer in 'uDADataStreamer.pas',
+ uDADelta in 'uDADelta.pas',
+ uDADesigntimeCall in 'uDADesigntimeCall.pas',
+ uDAExceptions in 'uDAExceptions.pas',
+ uDASQL92Interfaces in 'uDASQL92Interfaces.pas',
+ uDABin2DataStreamer in 'uDABin2DataStreamer.pas',
+ uDAMemDataset in 'uDAMemDataset.pas',
+ uDAMemDataTable in 'uDAMemDataTable.pas',
+ uDAReconcileDialog in 'uDAReconcileDialog.pas' {ReconcileDialogForm},
+ uDAReconcileDialogDetails in 'uDAReconcileDialogDetails.pas',
+ uDADatasetWrapper in 'uDADatasetWrapper.pas',
+ uDADataTableReferenceCollection in 'uDADataTableReferenceCollection.pas',
+ uDAMySQLInterfaces in 'uDAMySQLInterfaces.pas',
+ uDASQLiteInterfaces in 'uDASQLiteInterfaces.pas',
+ uDAExpressionEvaluator in 'uDAExpressionEvaluator.pas',
+ uDASQL92QueryBuilder in 'uDASQL92QueryBuilder.pas',
+ uDAWhere in 'uDAWhere.pas',
+ uDARemoteCommand in 'uDARemoteCommand.pas',
+ uDAPostgresInterfaces in 'uDAPostgresInterfaces.pas',
+ uDAElevateDBInterfaces in 'uDAElevateDBInterfaces.pas',
+ uDADB2Interfaces in 'uDADB2Interfaces.pas',
+ uDASybaseInterfaces in 'uDASybaseInterfaces.pas',
+ MultiDbLoginServiceV5_Impl in 'MultiDbLoginServiceV5_Impl.pas'
+ ;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D7.res b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D7.res
new file mode 100644
index 0000000..204493b
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_D7.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_Glyphs.res b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_Glyphs.res
new file mode 100644
index 0000000..ab2c23f
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_Glyphs.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_Reg.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_Reg.pas
new file mode 100644
index 0000000..62fb96a
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Core_Reg.pas
@@ -0,0 +1,81 @@
+unit DataAbstract_Core_Reg;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+procedure Register;
+
+implementation
+
+uses
+ {$IFDEF FPC}LResources,{$ENDIF}
+ Classes,
+ uDARes, uDAInterfaces, uDAClasses, uDADriverManager,
+ uDABinAdapter, uDAXMLAdapter, uDADataTable, uDADesigntimeCall,uDABin2DataStreamer,
+ {$IFNDEF FPC}uDACDSDataTable,uDADatasetProvider,uDACache,{$ENDIF FPC}
+ uDARemoteDataAdapter,
+ {$IFDEF MSWINDOWS}
+ {$IFNDEF FPC}
+ uDAADODataTable,
+ {$ENDIF}
+ {$ENDIF MSWINDOWS}
+ uDABusinessProcessor,
+ uDADBSessionManager,
+ uDAServerLog,
+ uDAMemDataTable,
+ uDARemoteCommand,
+ uDAPoweredByDataAbstractButton;
+
+{$IFNDEF FPC}
+ {$R DataAbstract_Core_Glyphs.res}
+{$ENDIF}
+
+procedure Register;
+begin
+ RegisterComponents(DAPalettePageName,
+ [TDAPoweredByDataAbstractButton,
+ TDADriverManager,
+ TDAConnectionManager,
+ TDASchema,
+ TDADiagrams,
+ TDADataDictionary,
+ TDABin2DataStreamer,
+ TDAXMLDataStreamer,
+ TDARemoteDataAdapter,
+ {$IFNDEF FPC}
+ TDADatasetProvider,
+ {$ENDIF FPC}
+ TDAMemDataTable,
+ TDABusinessProcessor,
+ TDADesigntimeCall,
+ TDADataSource,
+ TDARemoteCommand,
+ TDAServerLog]);
+{$IFNDEF FPC}
+{$WARN SYMBOL_DEPRECATED OFF}
+ RegisterComponents('RemObjects Data Abstract (Legacy)', [TDABinAdapter,
+ TDACDSDataTable, TDAADODataTable,
+ TDABinDataStreamer, TDAXMLAdapter,TDACache]);
+{$WARN SYMBOL_DEPRECATED ON}
+{$ENDIF}
+ RegisterComponents('RemObjects SDK', [TDADBSessionManager]);
+end;
+
+{$IFDEF FPC}
+initialization
+ {$I DataAbstract_Core_Glyphs.lrs}
+{$ENDIF}
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D10.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D10.bdsproj
new file mode 100644
index 0000000..81d84c2
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D10.bdsproj
@@ -0,0 +1,176 @@
+
+
+
+
+ Delphi.Personality
+
+ 1.0
+ {20E037D4-6EF6-4096-ACA5-5BA32C54E59D}
+
+
+
+
+ DataAbstract_Scripting_D10.dpk
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 1
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True True
+ True
+
+
+
+ 0
+ 0
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+ RemObjects Data Abstract - Scripting Integration Library False
+
+
+
+ ..\Dcu\D10
+ ..\Dcu\D10
+ ..\Dcu\D10
+ ..\Dcu\D10;..\..\Pascal Script\Dcu\D10
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+ True
+ False
+
+
+ True
+ False
+ 3
+ 0
+ 1
+ 361
+ False
+ False
+ False
+ False
+ False
+ 1033
+ 1252
+
+
+ RemObjects Software
+
+ 3.0.1.361
+
+
+
+
+ RemObjects SDK
+ 1.0.0.0
+
+
+
+ $00000000
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D10.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D10.cfg
new file mode 100644
index 0000000..6d65c2e
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D10.cfg
@@ -0,0 +1,52 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W+
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N0"..\Dcu\D10"
+-LE"..\Dcu\D10"
+-LN"..\Dcu\D10"
+-U"..\Dcu\D10;..\..\Pascal Script\Dcu\D10"
+-O"..\Dcu\D10;..\..\Pascal Script\Dcu\D10"
+-I"..\Dcu\D10;..\..\Pascal Script\Dcu\D10"
+-R"..\Dcu\D10;..\..\Pascal Script\Dcu\D10"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-SYMBOL_EXPERIMENTAL
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNIT_EXPERIMENTAL
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D10.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D10.dpk
new file mode 100644
index 0000000..14457eb
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D10.dpk
@@ -0,0 +1,41 @@
+package DataAbstract_Scripting_D10;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - Scripting Integration Library'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ dbrtl,
+ vcl,
+ RemObjects_Core_D10,
+ DataAbstract_Core_D10,
+ PascalScript_Core_D10;
+
+contains
+ uDAPascalScript in 'uDAPascalScript.pas',
+ uDAPSScriptingProvider in 'uDAPSScriptingProvider.pas',
+ DataAbstract_Scripting_Reg in 'DataAbstract_Scripting_Reg.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D10.res b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D10.res
new file mode 100644
index 0000000..204493b
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D10.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D11.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D11.dpk
new file mode 100644
index 0000000..93e1fa3
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D11.dpk
@@ -0,0 +1,41 @@
+package DataAbstract_Scripting_D11;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - Scripting Integration Library'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ dbrtl,
+ vcl,
+ RemObjects_Core_D11,
+ DataAbstract_Core_D11,
+ PascalScript_Core_D11;
+
+contains
+ uDAPascalScript in 'uDAPascalScript.pas',
+ uDAPSScriptingProvider in 'uDAPSScriptingProvider.pas',
+ DataAbstract_Scripting_Reg in 'DataAbstract_Scripting_Reg.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D11.dproj b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D11.dproj
new file mode 100644
index 0000000..d240db5
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D11.dproj
@@ -0,0 +1,78 @@
+
+
+ {3fb27763-9440-44c3-bb51-17969172e8fe}
+ DataAbstract_Scripting_D11.dpk
+ Debug
+ AnyCPU
+ DCC32
+ ..\Dcu\D11\DataAbstract_Scripting_D11.bpl
+
+
+ 7.0
+ False
+ False
+ True
+ 0
+ ..\Dcu\D11
+ ..\Dcu\D11
+ ..\Dcu\D11
+ ..\Dcu\D11
+ ..\Dcu\D11
+ ..\Dcu\D11;..\..\Pascal Script\Dcu\D11
+ ..\Dcu\D11;..\..\Pascal Script\Dcu\D11
+ ..\Dcu\D11;..\..\Pascal Script\Dcu\D11
+ ..\Dcu\D11;..\..\Pascal Script\Dcu\D11
+ RELEASE
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ 7.0
+ True
+ ..\Dcu\D11
+ ..\Dcu\D11
+ ..\Dcu\D11
+ ..\Dcu\D11
+ ..\Dcu\D11
+ ..\Dcu\D11;..\..\Pascal Script for Delphi\Dcu\D11
+ ..\Dcu\D11;..\..\Pascal Script for Delphi\Dcu\D11
+ ..\Dcu\D11;..\..\Pascal Script for Delphi\Dcu\D11
+ ..\Dcu\D11;..\..\Pascal Script for Delphi\Dcu\D11
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ Delphi.Personality
+ Package
+
+False True False RemObjects Data Abstract - Scripting Integration Library False False False True False 3 0 1 361 False False False False False 1033 1252 RemObjects Software 3.0.1.361 RemObjects SDK 1.0.0.0 DataAbstract_Scripting_D11.dpk
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D11.res b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D11.res
new file mode 100644
index 0000000..204493b
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D11.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D6.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D6.cfg
new file mode 100644
index 0000000..d94514b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D6.cfg
@@ -0,0 +1,41 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W+
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\Dcu\D6"
+-LE"..\Dcu\D6"
+-LN"..\Dcu\D6"
+-U"..\Dcu\D6;..\..\RemObjects SDK for Delphi\Dcu\D6"
+-O"..\Dcu\D6;..\..\RemObjects SDK for Delphi\Dcu\D6"
+-I"..\Dcu\D6;..\..\RemObjects SDK for Delphi\Dcu\D6"
+-R"..\Dcu\D6;..\..\RemObjects SDK for Delphi\Dcu\D6"
+-Z
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D6.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D6.dof
new file mode 100644
index 0000000..75f52a1
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D6.dof
@@ -0,0 +1,76 @@
+[FileVersion]
+Version=6.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=1
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitDeprecated=0
+UnitLibrary=0
+UnitPlatform=0
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=RemObjects Data Abstract - Scripting Integration Library
+
+[Directories]
+OutputDir=
+UnitOutputDir=..\Dcu\D6
+PackageDLLOutputDir=..\Dcu\D6
+PackageDCPOutputDir=..\Dcu\D6
+SearchPath=..\Dcu\D6;..\..\RemObjects SDK for Delphi\Dcu\D6
+Packages=
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+FileDescription=
+FileVersion=3.0.0.280
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=RemObjects SDK
+ProductVersion=1.0.0.0
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D6.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D6.dpk
new file mode 100644
index 0000000..4c39879
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D6.dpk
@@ -0,0 +1,41 @@
+package DataAbstract_Scripting_D6;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - Scripting Integration Library'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ dbrtl,
+ vcl,
+ RemObjects_Core_D6,
+ DataAbstract_Core_D6,
+ PascalScript_Core_D6;
+
+contains
+ uDAPascalScript in 'uDAPascalScript.pas',
+ uDAPSScriptingProvider in 'uDAPSScriptingProvider.pas',
+ DataAbstract_Scripting_Reg in 'DataAbstract_Scripting_Reg.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D6.res b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D6.res
new file mode 100644
index 0000000..204493b
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D6.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D7.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D7.cfg
new file mode 100644
index 0000000..b26eab1
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D7.cfg
@@ -0,0 +1,46 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W+
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\Dcu\D7"
+-LE"..\Dcu\D7"
+-LN"..\Dcu\D7"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D7.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D7.dof
new file mode 100644
index 0000000..97dc0fb
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D7.dof
@@ -0,0 +1,117 @@
+[FileVersion]
+Version=7.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=1
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=RemObjects Data Abstract - Scripting Integration Library
+
+[Directories]
+OutputDir=
+UnitOutputDir=..\Dcu\D7
+PackageDLLOutputDir=..\Dcu\D7
+PackageDCPOutputDir=..\Dcu\D7
+SearchPath=
+Packages=
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+FileDescription=ROServiceTester
+FileVersion=3.0.0.257
+InternalName=ROServiceTester
+LegalCopyright=Copyright RemObjects Software 2002
+LegalTrademarks=RemObjects Software 2002
+OriginalFilename=ROServiceTester.exe
+ProductName=RemObjects SDK
+ProductVersion=3.0.0.0
+Compile Date=Sunday, March 21, 2004 5:55 PM
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D7.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D7.dpk
new file mode 100644
index 0000000..34f8513
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D7.dpk
@@ -0,0 +1,43 @@
+package DataAbstract_Scripting_D7;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - Scripting Integration Library'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ dbrtl,
+ vcl,
+ RemObjects_Core_D7,
+ DataAbstract_Core_D7,
+ PascalScript_Core_D7,
+ dsnap,
+ adortl;
+
+contains
+ uDAPascalScript in 'uDAPascalScript.pas',
+ uDAPSScriptingProvider in 'uDAPSScriptingProvider.pas',
+ DataAbstract_Scripting_Reg in 'DataAbstract_Scripting_Reg.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D7.res b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D7.res
new file mode 100644
index 0000000..204493b
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_D7.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_Glyphs.res b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_Glyphs.res
new file mode 100644
index 0000000..fa5cad1
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_Glyphs.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_Reg.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_Reg.pas
new file mode 100644
index 0000000..f71baf2
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_Scripting_Reg.pas
@@ -0,0 +1,40 @@
+unit DataAbstract_Scripting_Reg;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+procedure Register;
+
+implementation
+
+uses
+ {$IFDEF FPC}LResources,{$ENDIF}
+ Classes, uDAPSScriptingProvider, uDARes;
+
+{$IFNDEF FPC}
+ {$R DataAbstract_Scripting_Glyphs.res}
+{$ENDIF FPC}
+
+procedure Register;
+begin
+ RegisterComponents(DAPalettePageName, [TDAPSScriptingProvider]);
+end;
+
+{$IFDEF FPC}
+initialization
+ {$I DataAbstract_Scripting_Glyphs.lrs}
+{$ENDIF}
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D10.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D10.bdsproj
new file mode 100644
index 0000000..ddab013
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D10.bdsproj
@@ -0,0 +1,177 @@
+
+
+
+
+ Delphi.Personality
+
+ 1.0
+ {07EA6B1E-3F93-43E7-91C5-50005788308E}
+
+
+
+
+ DataAbstract_SimpleQuery_D10.dpk
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 1
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True True
+ True
+
+
+
+ 0
+ 0
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+ RemObjects Data Abstract - Korzh SimpleQuery Integration Library False
+
+
+
+ ..\Dcu\D10
+ ..\Dcu\D10
+ ..\Dcu\D10
+ ..\Dcu\D10;..\..\RemObjects SDK for Dephi\Dcu\D10
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1033
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D10.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D10.cfg
new file mode 100644
index 0000000..c44bc25
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D10.cfg
@@ -0,0 +1,44 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W+
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N0"..\Dcu\D10"
+-LE"..\Dcu\D10"
+-LN"..\Dcu\D10"
+-U"..\Dcu\D10;..\..\RemObjects SDK for Dephi\Dcu\D10"
+-O"..\Dcu\D10;..\..\RemObjects SDK for Dephi\Dcu\D10"
+-I"..\Dcu\D10;..\..\RemObjects SDK for Dephi\Dcu\D10"
+-R"..\Dcu\D10;..\..\RemObjects SDK for Dephi\Dcu\D10"
+-Z
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D10.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D10.dpk
new file mode 100644
index 0000000..9f33f70
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D10.dpk
@@ -0,0 +1,42 @@
+package DataAbstract_SimpleQuery_D10;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - Korzh SimpleQuery Integration Library'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ RemObjects_Core_D10,
+ dbrtl,
+ vcl,
+ DataAbstract_Core_D10,
+ PascalScript_Core_D10,
+ sq7,
+ kprocs7;
+
+contains
+ uDAKDBInfo in 'uDAKDBInfo.pas',
+ DataAbstract_SimpleQuery_Reg in 'DataAbstract_SimpleQuery_Reg.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D10.res b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D10.res
new file mode 100644
index 0000000..c73b102
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D10.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D11.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D11.dpk
new file mode 100644
index 0000000..795f67f
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D11.dpk
@@ -0,0 +1,42 @@
+package DataAbstract_SimpleQuery_D11;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - Korzh SimpleQuery Integration Library'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ RemObjects_Core_D11,
+ dbrtl,
+ vcl,
+ DataAbstract_Core_D11,
+ PascalScript_Core_D11,
+ sq11,
+ kprocs11;
+
+contains
+ uDAKDBInfo in 'uDAKDBInfo.pas',
+ DataAbstract_SimpleQuery_Reg in 'DataAbstract_SimpleQuery_Reg.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D11.dproj b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D11.dproj
new file mode 100644
index 0000000..58bef6e
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D11.dproj
@@ -0,0 +1,71 @@
+
+
+ {12feb998-13fa-45f9-8ee6-f5ab6077ef8e}
+ DataAbstract_SimpleQuery_D11.dpk
+ Debug
+ AnyCPU
+ DCC32
+ ..\Dcu\D11\DataAbstract_SimpleQuery_D11.bpl
+
+
+ 7.0
+ False
+ False
+ True
+ 0
+ ..\Dcu\D11
+ ..\Dcu\D11
+ ..\Dcu\D11
+ ..\Dcu\D11
+ ..\Dcu\D11
+ ..\Dcu\D11;..\..\RemObjects SDK for Dephi\Dcu\D10
+ ..\Dcu\D11;..\..\RemObjects SDK for Dephi\Dcu\D10
+ ..\Dcu\D11;..\..\RemObjects SDK for Dephi\Dcu\D10
+ ..\Dcu\D11;..\..\RemObjects SDK for Dephi\Dcu\D10
+ RELEASE
+
+
+ 7.0
+ True
+ ..\Dcu\D11
+ ..\Dcu\D11
+ ..\Dcu\D11
+ ..\Dcu\D11
+ ..\Dcu\D11
+ ..\Dcu\D11;..\..\RemObjects SDK for Dephi\Dcu\D11
+ ..\Dcu\D11;..\..\RemObjects SDK for Dephi\Dcu\D11
+ ..\Dcu\D11;..\..\RemObjects SDK for Dephi\Dcu\D11
+ ..\Dcu\D11;..\..\RemObjects SDK for Dephi\Dcu\D11
+
+
+ Delphi.Personality
+ Package
+
+False True False RemObjects Data Abstract - Korzh SimpleQuery Integration Library False False False True False 1 0 0 0 False False False False False 1033 1252 1.0.0.0 1.0.0.0 DataAbstract_SimpleQuery_D11.dpk
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D11.res b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D11.res
new file mode 100644
index 0000000..c73b102
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D11.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D6.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D6.cfg
new file mode 100644
index 0000000..e2a8294
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D6.cfg
@@ -0,0 +1,47 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W+
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-E"s:\exe"
+-N"..\Dcu\D6"
+-LE"..\Dcu\D6"
+-LN"..\Dcu\D6"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D6.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D6.dof
new file mode 100644
index 0000000..29abd6f
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D6.dof
@@ -0,0 +1,114 @@
+[FileVersion]
+Version=7.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=1
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=RemObjects Data Abstract - Korzh SimpleQuery Integration Library
+
+[Directories]
+UnitOutputDir=..\Dcu\D6
+PackageDLLOutputDir=..\Dcu\D6
+PackageDCPOutputDir=..\Dcu\D6
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+FileDescription=ROServiceTester
+FileVersion=3.0.0.257
+InternalName=ROServiceTester
+LegalCopyright=Copyright RemObjects Software 2002
+LegalTrademarks=RemObjects Software 2002
+OriginalFilename=ROServiceTester.exe
+ProductName=RemObjects SDK
+ProductVersion=3.0.0.0
+Compile Date=Sunday, March 21, 2004 5:55 PM
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D6.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D6.dpk
new file mode 100644
index 0000000..b8c2834
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D6.dpk
@@ -0,0 +1,42 @@
+package DataAbstract_SimpleQuery_D6;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - Korzh SimpleQuery Integration Library'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ RemObjects_Core_D6,
+ dbrtl,
+ vcl,
+ DataAbstract_Core_D6,
+ PascalScript_Core_D6,
+ sq6,
+ kprocs6;
+
+contains
+ uDAKDBInfo in 'uDAKDBInfo.pas',
+ DataAbstract_SimpleQuery_Reg in 'DataAbstract_SimpleQuery_Reg.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D6.res b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D6.res
new file mode 100644
index 0000000..fff68a1
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D6.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D7.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D7.cfg
new file mode 100644
index 0000000..b26eab1
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D7.cfg
@@ -0,0 +1,46 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W+
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\Dcu\D7"
+-LE"..\Dcu\D7"
+-LN"..\Dcu\D7"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D7.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D7.dof
new file mode 100644
index 0000000..7e2dfdc
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D7.dof
@@ -0,0 +1,117 @@
+[FileVersion]
+Version=7.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=1
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=RemObjects Data Abstract - Korzh SimpleQuery Integration Library
+
+[Directories]
+OutputDir=
+UnitOutputDir=..\Dcu\D7
+PackageDLLOutputDir=..\Dcu\D7
+PackageDCPOutputDir=..\Dcu\D7
+SearchPath=
+Packages=
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+FileDescription=ROServiceTester
+FileVersion=3.0.0.257
+InternalName=ROServiceTester
+LegalCopyright=Copyright RemObjects Software 2002
+LegalTrademarks=RemObjects Software 2002
+OriginalFilename=ROServiceTester.exe
+ProductName=RemObjects SDK
+ProductVersion=3.0.0.0
+Compile Date=Sunday, March 21, 2004 5:55 PM
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D7.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D7.dpk
new file mode 100644
index 0000000..63ff17e
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D7.dpk
@@ -0,0 +1,42 @@
+package DataAbstract_SimpleQuery_D7;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - Korzh SimpleQuery Integration Library'}
+{$IMPLICITBUILD ON}
+
+requires
+ rtl,
+ RemObjects_Core_D7,
+ dbrtl,
+ vcl,
+ DataAbstract_Core_D7,
+ PascalScript_Core_D7,
+ sq7,
+ kprocs7;
+
+contains
+ uDAKDBInfo in 'uDAKDBInfo.pas',
+ DataAbstract_SimpleQuery_Reg in 'DataAbstract_SimpleQuery_Reg.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D7.res b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D7.res
new file mode 100644
index 0000000..fff68a1
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_D7.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_Glyphs.res b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_Glyphs.res
new file mode 100644
index 0000000..4a5d497
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_Glyphs.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_Reg.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_Reg.pas
new file mode 100644
index 0000000..5a9be83
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/DataAbstract_SimpleQuery_Reg.pas
@@ -0,0 +1,33 @@
+unit DataAbstract_SimpleQuery_Reg;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library
+{
+{ compiler: Delphi 6 and up, Kylix 3 and up
+{ platform: Win32, Linux
+{
+{ (c)opyright RemObjects Software. all rights reserved.
+{
+{ Using this code requires a valid license of the Data Abstract
+{ which can be obtained at http://www.remobjects.com.
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+{$R DataAbstract_SimpleQuery_Glyphs.res}
+
+interface
+
+procedure Register;
+
+implementation
+
+uses
+ Classes, uDAKDBInfo;
+
+procedure Register;
+begin
+ RegisterComponents('Data Abstract', [TDAKDBConnectionInfo, TDAKDBSchemaInfo]);
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/ASGRout3.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/ASGRout3.pas
new file mode 100644
index 0000000..6382a1b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/ASGRout3.pas
@@ -0,0 +1,424 @@
+{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+Author: Albert Drent
+Description: ASGRout parser routines
+Creation: Januari 1998
+Version: 1.2.B
+EMail: a.drent@aducom.com (www.aducom.com)
+Support: support@aducom.com (www.aducom.com)
+Legal issues: Copyright (C) 2003 by Aducom Software
+
+ Aducom Software
+ Eckhartstr 61
+ 9746 BN Groningen
+ Netherlands
+
+ This software is provided 'as-is', without any express or
+ implied warranty. In no event will the author be held liable
+ for any damages arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any
+ purpose, including commercial applications, and to alter it
+ and redistribute it freely, subject to the following
+ restrictions:
+
+ 1. The origin of this software must not be misrepresented,
+ you must not claim that you wrote the original software.
+ If you use this software in a product, an acknowledgment
+ in the product documentation would be appreciated but is
+ not required.
+
+ 2. Altered source versions must be plainly marked as such, and
+ must not be misrepresented as being the original software.
+
+ 3. If you make changes which improves the component you must
+ mail these to aducom as the moderator of the components
+ complete with documentation for the benefits of the community.
+
+ 4. You are not allowed to create commercial available components
+ using this software. If you use this source in any way to create
+ your own components, your source should be free of charge,
+ available to anyone. It's a far better idea to distribute your
+ changes through Aducom Software.
+
+ 5. This notice may not be removed or altered from any source
+ distribution.
+
+ 6. You must register this software by entering the support forum.
+ I like to keep track about where the components are used, so
+ sending a picture postcard to the author would be appreciated.
+ Use a nice stamp and mention your name, street
+ address, EMail address and any comment you like to say.
+
+Modifications
+ 26/5/2004 Function YYYYMMDDParser by JPierce, necessary for
+ locale independent datehandling in SQLite components.
+ 1/9/2005 Changes to the StrToFloatX routine, now depending on
+ decimalseparator.
+
+*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * }
+
+unit ASGRout3;
+
+interface
+
+uses SysUtils;
+
+const
+ vtcIdentifier = 1;
+ vtcNumber = 2;
+ vtcAssignment = 3;
+ vtcQString = 4;
+ vtcDString = 5;
+ vtcRelOp = 6;
+ vtcFloat = 7;
+ vtcDelimiter = 8;
+ vtcEof = 9;
+
+procedure FindErrorPos(InString: string; ErrPos: integer;
+ var TheLine, TheCol: integer);
+function GetWord(var InString: string; var StartPos: integer;
+ var VarType: integer): string;
+function GetWordByDelim(var InString: string; var StartPos: integer;
+ var Delim: string): string;
+function PeekWord(var InString: string; StartPos: integer;
+ var VarType: integer): string;
+function Recover(var InString: string; var StartPos: integer): boolean;
+function StrToIntX(StrIn: string): integer;
+function StrToFloatX(StrIn : string) : extended;
+function StrToDateX(TheDate: string): TDateTime;
+function StrToDateTimeX(const S: string): TDateTime;
+function YYYYMMDDParser(Str: PChar): TDateTime;
+function FloatParser(Str: string): string;// jordi march
+
+implementation
+
+function FloatParser(Str: string): string;// jordi march
+var
+ Point: Byte;
+begin
+ if DecimalSeparator <> '.' then begin
+ Point := Pos ('.', Str);
+ if Point <> 0
+ then Str[Point] := DecimalSeparator;
+ end;
+ Result := Str;
+end;
+
+ //==============================================================================
+ // Convert dates to a correct datetime notation. Try several notations,
+ // starting with the system defaults
+ //==============================================================================
+
+function StrToDateTimeX(const S: string): TDateTime;
+begin
+ if S = '' then
+ StrToDateTimeX := 0
+ else begin
+ try
+ StrToDateTimeX := StrToDateTime(S);
+ except
+ StrToDateTimeX := StrToDateX(s);
+ end;
+ end;
+end;
+
+function StrToDateX(TheDate: string): TDateTime;
+var
+ DateFormat: string;
+ DateSep: char;
+begin
+ DateFormat := ShortDateFormat; // save current settings
+ DateSep := DateSeparator;
+ try
+ try
+ StrToDateX := StrToDate(TheDate)
+ except
+ DateSeparator := '-';
+ ShortDateFormat := 'dd-mm-yyyy';
+ try
+ StrToDateX := StrToDate(TheDate)
+ except
+ ShortDateFormat := 'yyyy-mm-dd';
+ try
+ StrToDateX := StrToDate(TheDate)
+ except
+ StrToDateX := StrToDateX('01-01-1900');
+ raise;
+ end;
+ end;
+ end;
+ finally
+ ShortDateFormat := DateFormat;
+ DateSeparator := DateSep;
+ end;
+end;
+
+// Routine submitted by jpierce, modified to accept more types
+// It requires that the date be in strict yyyy-mm-dd [hh:nn:[ss[:mmm]]]
+
+function YYYYMMDDParser(Str: PChar): TDateTime;
+var
+ Year, Month, Day, Hour, Min, Sec, MSec: Word;
+begin
+ Result := 0;
+
+ try
+ if Length(Str) >= 10 then // 10 = Length of YYYY-MM-DD
+ begin
+ Year := StrToInt(Copy(Str, 1, 4));
+ Month := StrToInt(Copy(Str, 6, 2));
+ Day := StrToInt(Copy(Str, 9, 2));
+
+ Result := EncodeDate(Year, Month, Day);
+ end;
+
+ if Length(Str) > 10 then // it has a time
+ begin
+ Hour := StrToInt(Copy(Str, 12, 2));
+ Min := StrToInt(Copy(Str, 15, 2));
+ Sec := 0;
+ MSec := 0;
+ if Length(Str) > 16 then Sec := StrToInt(Copy(Str, 18, 2));
+ if Length(Str) > 19 then Msec := StrToInt(Copy(Str, 21, 3));
+ Result := Result + EncodeTime(Hour, Min, Sec, MSec);
+ end;
+ except
+ Result := 0;
+ end;
+end;
+
+function StrToIntX(StrIn: string): integer;
+var
+E: Integer;
+begin
+ Val(StrIn, Result, E);
+ if E <> 0 then Result := 0;
+end;
+
+function StrToFloatX(StrIn : string) : extended;
+begin
+ if not TextToFloat(PChar(StrIn), Result, fvExtended) then
+ Result := 0;
+end;
+
+procedure FindErrorPos(InString: string; ErrPos: integer;
+ var TheLine, TheCol: integer);
+var
+ i: integer;
+begin
+ TheLine := 1;
+ TheCol := 1;
+ i := 1;
+ while i < ErrPos do
+ begin
+ if InString[i] in [ #10, #13] then
+ begin
+ Inc(TheLine);
+ TheCol := 1;
+ Inc(i);
+ Inc(i);
+ end
+ else
+ begin
+ Inc(TheCol);
+ Inc(i);
+ end;
+ end;
+end;
+
+function Recover(var InString: string;
+ var StartPos: integer): boolean;
+begin
+ if (StartPos > Length(InString)) then
+ begin
+ Recover := false;
+ exit;
+ end;
+
+ while (Startpos < Length(InString)) and
+ ( not (InString[StartPos] in [ #10, #13])) do
+ Inc(StartPos);
+ Recover := true;
+end;
+
+function PeekWord(var InString: string; StartPos: integer;
+ var VarType: integer): string;
+begin
+ PeekWord := GetWord(InString, StartPos, VarType);
+end;
+
+function GetWordByDelim(var InString: string;
+ var StartPos: integer;
+ var Delim: string): string;
+var
+ Ret: string;
+begin
+ Ret := '';
+ while (StartPos <= Length(InString)) and (InString[StartPos] = ' ') do
+ Inc(StartPos);
+ while (StartPos <= Length(InString)) and (Pos(InString[StartPos], Delim) = 0) do
+ begin
+ Ret := Ret + InString[StartPos];
+ Inc(StartPos);
+ end;
+ GetWordByDelim := Trim(Ret);
+end;
+
+function GetWord(var InString: string; var StartPos: integer;
+ var VarType: integer): string;
+var
+ TheChar: char;
+ Rv: string;
+begin
+ if (StartPos > Length(InString)) then
+ begin
+ GetWord := '';
+ VarType := vtcEof;
+ exit;
+ end;
+
+ while (StartPos <= Length(InString)) and (InString[StartPos] <= #32) do
+ Inc(StartPos);
+
+ TheChar := InString[StartPos];
+ Rv := '';
+
+ if TheChar in ['a'..'z', 'A'..'Z'] then
+ VarType := vtcIdentifier
+ else if TheChar in ['0'..'9', '-'] then
+ VarType := vtcNumber
+ else if TheChar = ':' then
+ VarType := vtcAssignment
+ else if TheChar = '"' then
+ VarType := vtcDString
+ else if TheChar = '''' then
+ VarType := vtcQString
+ else if TheChar in ['>', '=', '<'] then
+ VarType := vtcRelOp
+ else
+ begin
+ Inc(StartPos);
+ if TheChar = '!' then
+ begin
+ Recover(InString, StartPos);
+ Rv := GetWord(InString, StartPos, VarType);
+ GetWord := Rv;
+ end
+ else
+ begin
+ GetWord := TheChar;
+ end;
+ exit;
+ end;
+
+ case VarType of
+ vtcIdentifier:
+ begin
+ while InString[StartPos] in ['a'..'z', 'A'..'Z', '_','0'..'9'] do
+ begin
+ Rv := Rv + InString[StartPos];
+ Inc(StartPos);
+ end;
+ end;
+ vtcNumber:
+ begin
+ while InString[StartPos] in ['-', '0'..'9', '.'] do
+ begin
+ if InString[StartPos] = '.' then
+ VarType := vtcFloat;
+ Rv := Rv + InString[StartPos];
+ Inc(StartPos);
+ end;
+ if VarType = vtcFloat then
+ Rv := FloatToStr(StrToFloat(Rv))
+ else
+ Rv := IntToStr(StrToInt(Rv));
+ end;
+ vtcAssignment:
+ begin
+ Rv := InString[StartPos];
+ Inc(StartPos);
+ if InString[StartPos] = '=' then
+ begin
+ Inc(StartPos);
+ Rv := ':=';
+ end
+ else
+ begin
+ VarType := vtcDelimiter;
+ Rv := ':';
+ end;
+ end;
+ vtcQString:
+ begin
+ Inc(StartPos);
+ while InString[StartPos] <> '''' do
+ begin
+ Rv := Rv + InString[StartPos];
+ Inc(StartPos);
+ end;
+ Inc(StartPos);
+ end;
+ vtcDString:
+ begin
+ Inc(StartPos);
+ while InString[StartPos] <> '"' do
+ begin
+ Rv := Rv + InString[StartPos];
+ Inc(StartPos);
+ end;
+ Inc(StartPos);
+ end;
+ vtcRelOp:
+ begin
+ Rv := InString[StartPos];
+ if Rv = '<' then
+ begin
+ if InString[StartPos + 1] in ['=', '>'] then
+ begin
+ Rv := Rv + InString[StartPos + 1];
+ StartPos := StartPos + 2;
+ end
+ else
+ begin
+ Inc(StartPos);
+ end;
+ end
+ else if Rv = '>' then
+ begin
+ if InString[StartPos + 1] in ['=', '<'] then
+ begin
+ Rv := Rv + InString[StartPos + 1];
+ StartPos := StartPos + 2;
+ end
+ else
+ begin
+ Inc(StartPos);
+ end;
+ end
+ else
+ begin
+ Inc(StartPos);
+ end;
+ end;
+ end;
+ GetWord := Rv;
+end;
+
+{$IFDEF SQLite_Static}
+Var
+ TZInfo :_TIME_ZONE_INFORMATION;
+ TZRes :Integer;
+
+initialization
+ PInteger(@__timezone)^:=0;
+ PInteger(@__daylight)^:=0;
+ TZRes:=GetTimezoneInformation(TZInfo);
+ if TZRes>=0 Then
+ PInteger(@__timezone)^:=TZInfo.Bias*60;
+ if TZRes=TIME_ZONE_ID_DAYLIGHT Then
+ PInteger(@__daylight)^:=1;
+{$ENDIF}
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAADODriverHtml.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAADODriverHtml.res
new file mode 100644
index 0000000..98b7c6e
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAADODriverHtml.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAADODrv.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAADODrv.cfg
new file mode 100644
index 0000000..fbc8cdc
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAADODrv.cfg
@@ -0,0 +1,46 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-GD
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-E"..\..\Bin"
+-LE"c:\program files\borland\delphi7\Projects\Bpl"
+-LN"c:\program files\borland\delphi7\Projects\Bpl"
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAADODrv.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAADODrv.dof
new file mode 100644
index 0000000..1a2d3d6
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAADODrv.dof
@@ -0,0 +1,116 @@
+[FileVersion]
+Version=7.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=3
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=
+
+[Directories]
+OutputDir=..\..\Bin
+UnitOutputDir=
+PackageDLLOutputDir=
+PackageDCPOutputDir=
+SearchPath=
+Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;dclOfficeXP;RemObjects_DataSnap_D7;PurposesoftD7;addict3_d6;tb2kComplete_70;CDKDesignTimeSupport;CDKSmp;CDK;ES_CodeSite20;ESDelphiCommandCompiler;ESFileSearch;ESVisualCompositeExpert;EaglWk;ESGraphUtils;ESBase;ESVsCp;ESSampleComposites70;ESSampleCompositeEditors7;Rz252N70;SynEdit_D7;dxsbD7;dxComnD7;dxDockingD7;dxEdtrD7;dxELibD7;dxExELD7;EQGridD7;dxExRwD7;dxDBEdD7;dxInsD7;dxGrEdD7;ECQDBCD7;EQTLD7;EQDBTLD7;dxLayoutControlD7;dxMasterViewD7;dxmdsD7;dxNavBarD7;dxObjInsD7;dxPageControlD7;dxPSCoreD7;Rz252D70;cxPageControlVCLD7;cxEditorsVCLD7;dxThemeD7;cxLibraryVCLD7;cxDataD7;cxGridUtilsVCLD7;cxGridVCLD7;RemObjects_BPDX_D7
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+FileDescription=
+FileVersion=3.0.0.287
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=Data Abstract
+ProductVersion=2.0.0.0
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAADODrv.dpr b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAADODrv.dpr
new file mode 100644
index 0000000..7d130a8
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAADODrv.dpr
@@ -0,0 +1,13 @@
+library DAADODrv;
+
+uses
+ ShareMem,
+ uDAADODriver in 'uDAADODriver.pas',
+ uDAADOInterfaces in '..\uDAADOInterfaces.pas';
+
+{$E dad}
+
+{$R *.res}
+{$R DAADODriverHtml.res}
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAADODrv.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAADODrv.res
new file mode 100644
index 0000000..723a007
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAADODrv.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAAnyDACDriverHtml.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAAnyDACDriverHtml.res
new file mode 100644
index 0000000..93f013e
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAAnyDACDriverHtml.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAAnyDACDrv.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAAnyDACDrv.cfg
new file mode 100644
index 0000000..9f8c69f
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAAnyDACDrv.cfg
@@ -0,0 +1,37 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-E"..\..\Bin"
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAAnyDACDrv.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAAnyDACDrv.dof
new file mode 100644
index 0000000..b542147
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAAnyDACDrv.dof
@@ -0,0 +1,117 @@
+[FileVersion]
+Version=7.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=
+
+[Directories]
+OutputDir=..\..\Bin
+UnitOutputDir=
+PackageDLLOutputDir=
+PackageDCPOutputDir=
+SearchPath=
+Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;dclOfficeXP;RemObjects_DataSnap_D7;PurposesoftD7;addict3_d6;tb2kComplete_70;CDKDesignTimeSupport;CDKSmp;CDK;ES_CodeSite20;ESDelphiCommandCompiler;ESFileSearch;ESVisualCompositeExpert;EaglWk;ESGraphUtils;ESBase;ESVsCp;ESSampleComposites70;ESSampleCompositeEditors7;Rz252N70;SynEdit_D7;dxsbD7;dxComnD7;dxDockingD7;dxEdtrD7;dxELibD7;dxExELD7;EQGridD7;dxExRwD7;dxDBEdD7;dxInsD7;dxGrEdD7;ECQDBCD7;EQTLD7;EQDBTLD7;dxLayoutControlD7;dxMasterViewD7;dxmdsD7;dxNavBarD7;dxObjInsD7;dxPageControlD7;dxPSCoreD7;Rz252D70;cxPageControlVCLD7;cxEditorsVCLD7;dxThemeD7;cxLibraryVCLD7;cxDataD7;cxGridUtilsVCLD7;cxGridVCLD7;RemObjects_BPDX_D7
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=
+FileDescription=
+FileVersion=5.0.5.25
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+Comments=
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAAnyDACDrv.dpr b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAAnyDACDrv.dpr
new file mode 100644
index 0000000..ab5ec53
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAAnyDACDrv.dpr
@@ -0,0 +1,12 @@
+library DAAnyDACDrv;
+
+uses
+ ShareMem,
+ uDAAnyDACDriver in 'uDAAnyDACDriver.pas';
+
+{$E dad}
+
+{$R *.res}
+{$R DAAnyDACDriverHtml.res}
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAAnyDACDrv.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAAnyDACDrv.res
new file mode 100644
index 0000000..84f461e
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAAnyDACDrv.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DABDEDriverHtml.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DABDEDriverHtml.res
new file mode 100644
index 0000000..57e2373
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DABDEDriverHtml.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DABDEDrv.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DABDEDrv.bdsproj
new file mode 100644
index 0000000..720c571
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DABDEDrv.bdsproj
@@ -0,0 +1,173 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {9B98595C-7A8A-4139-9638-98A40A460278}
+
+
+
+
+ DABDEDrv.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 3
+ 0
+ False
+ 1
+ True
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+ ..\..\bin
+
+
+
+ $(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10
+
+
+ False
+
+
+
+ D:\Program Files\RemObjects Software\Data Abstract\DASchemaModeler.exe
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 3
+ 0
+ 0
+ 290
+ False
+ False
+ False
+ False
+ False
+ 1033
+ 1252
+
+
+ RemObjects Software
+
+ 3.0.0.290
+
+
+
+
+ Data Abstract
+ 2.0.0.0
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DABDEDrv.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DABDEDrv.cfg
new file mode 100644
index 0000000..695c614
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DABDEDrv.cfg
@@ -0,0 +1,39 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O-
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-GD
+-cg
+-vn
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-E"..\..\bin"
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DABDEDrv.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DABDEDrv.dof
new file mode 100644
index 0000000..593b787
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DABDEDrv.dof
@@ -0,0 +1,94 @@
+[FileVersion]
+Version=7.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Directories]
+OutputDir=..\..\Bin
+UnitOutputDir=
+PackageDLLOutputDir=
+PackageDCPOutputDir=
+SearchPath=
+Packages=
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DABDEDrv.dpr b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DABDEDrv.dpr
new file mode 100644
index 0000000..f00c885
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DABDEDrv.dpr
@@ -0,0 +1,12 @@
+library DABDEDrv;
+
+uses
+ ShareMem,
+ uDABDEDriver in 'uDABDEDriver.pas';
+
+{$E dad}
+
+{$R *.res}
+{$R DABDEDriverHtml.res}
+begin
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DABDEDrv.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DABDEDrv.res
new file mode 100644
index 0000000..723a007
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DABDEDrv.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DADBISAM3Drv.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DADBISAM3Drv.cfg
new file mode 100644
index 0000000..4a853d2
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DADBISAM3Drv.cfg
@@ -0,0 +1,41 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J+
+-$K-
+-$L+
+-$M-
+-$N+
+-$O-
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-E"..\..\Bin"
+-LE"c:\program files\borland\delphi7\Projects\Bpl"
+-LN"c:\program files\borland\delphi7\Projects\Bpl"
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_PLATFORM
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DADBISAM3Drv.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DADBISAM3Drv.dof
new file mode 100644
index 0000000..af7d0f6
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DADBISAM3Drv.dof
@@ -0,0 +1,116 @@
+[FileVersion]
+Version=7.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=1
+K=0
+L=1
+M=0
+N=1
+O=0
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=Purposesoft HtmlEdit 2.0
+
+[Directories]
+OutputDir=..\..\Bin
+UnitOutputDir=
+PackageDLLOutputDir=
+PackageDCPOutputDir=
+SearchPath=
+Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;dclOfficeXP;RemObjects_DataSnap_D7;PurposesoftD7;addict3_d6;tb2kComplete_70;CDK;ES_CodeSite20;ESDelphiCommandCompiler;ESFileSearch;ESVisualCompositeExpert;CDKSmp;EaglWk;ESGraphUtils;ESBase;CDKDesignTimeSupport;ESVsCp;ESSampleCompositeEditors7;ESSampleComposites70;SynEdit_D7;dxsbD7;dxComnD7;dxExELD7;dxGrEdD7;ECQDBCD7;EQTLD7;dxEdtrD7;EQDBTLD7;EQGridD7;dxMasterViewD7;dxmdsd7;dxObjInsD7;dxPSCoreD7;Rz252N70;Rz252D70;madBasic_;madHelp_;madDisAsm_;madExcept_;EzSpecials_D7;sq7;kprocs7;dxDockingD7;dxLayoutControlD7;dxPageControlD7;cxEditorsVCLD7;cxLibraryVCLD7;dxThemeD7;cxDataD7;cxGridUtilsVCLD7;cxGridVCLD7;Phoenix_Core_D7;cxPageControlVCLD7;dxELibD7;dxExRwD7;dxDBEdD7;dxInsD7;dxNavBarD7;Phoenix_IDE_D7;DataAbstract_Core_D7;DataAbstract_DBXDriver_D7;cxWebD7;cxWebPascalScriptD7;cxWebTeeChartD7;cxWebSnapD7;SchemaModelerUtils_d7;Ani95_D7;DataAbstract_IDE_D7;DataAbstract_DiskDriver_D7
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=
+FileDescription=
+FileVersion=3.0.0.50
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DADBISAM3Drv.dpr b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DADBISAM3Drv.dpr
new file mode 100644
index 0000000..8efca9c
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DADBISAM3Drv.dpr
@@ -0,0 +1,18 @@
+library DADBISAM3Drv;
+
+uses
+ ShareMem,
+ uDADBISAMDriver in 'uDADBISAMDriver.pas';
+
+{$E dad}
+
+{$I dbisamvr.inc}
+{$IFDEF DBISAM_V4}
+Please only build this driver dpr with DBISAM3
+{$ENDIF DBISAM_V4}
+
+{$R *.res}
+{$R DADBISAMDriverHtml.res}
+
+begin
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DADBISAM3Drv.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DADBISAM3Drv.res
new file mode 100644
index 0000000..723a007
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DADBISAM3Drv.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DADBISAM4Drv.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DADBISAM4Drv.cfg
new file mode 100644
index 0000000..4a853d2
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DADBISAM4Drv.cfg
@@ -0,0 +1,41 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J+
+-$K-
+-$L+
+-$M-
+-$N+
+-$O-
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-E"..\..\Bin"
+-LE"c:\program files\borland\delphi7\Projects\Bpl"
+-LN"c:\program files\borland\delphi7\Projects\Bpl"
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_PLATFORM
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DADBISAM4Drv.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DADBISAM4Drv.dof
new file mode 100644
index 0000000..af7d0f6
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DADBISAM4Drv.dof
@@ -0,0 +1,116 @@
+[FileVersion]
+Version=7.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=1
+K=0
+L=1
+M=0
+N=1
+O=0
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=Purposesoft HtmlEdit 2.0
+
+[Directories]
+OutputDir=..\..\Bin
+UnitOutputDir=
+PackageDLLOutputDir=
+PackageDCPOutputDir=
+SearchPath=
+Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;dclOfficeXP;RemObjects_DataSnap_D7;PurposesoftD7;addict3_d6;tb2kComplete_70;CDK;ES_CodeSite20;ESDelphiCommandCompiler;ESFileSearch;ESVisualCompositeExpert;CDKSmp;EaglWk;ESGraphUtils;ESBase;CDKDesignTimeSupport;ESVsCp;ESSampleCompositeEditors7;ESSampleComposites70;SynEdit_D7;dxsbD7;dxComnD7;dxExELD7;dxGrEdD7;ECQDBCD7;EQTLD7;dxEdtrD7;EQDBTLD7;EQGridD7;dxMasterViewD7;dxmdsd7;dxObjInsD7;dxPSCoreD7;Rz252N70;Rz252D70;madBasic_;madHelp_;madDisAsm_;madExcept_;EzSpecials_D7;sq7;kprocs7;dxDockingD7;dxLayoutControlD7;dxPageControlD7;cxEditorsVCLD7;cxLibraryVCLD7;dxThemeD7;cxDataD7;cxGridUtilsVCLD7;cxGridVCLD7;Phoenix_Core_D7;cxPageControlVCLD7;dxELibD7;dxExRwD7;dxDBEdD7;dxInsD7;dxNavBarD7;Phoenix_IDE_D7;DataAbstract_Core_D7;DataAbstract_DBXDriver_D7;cxWebD7;cxWebPascalScriptD7;cxWebTeeChartD7;cxWebSnapD7;SchemaModelerUtils_d7;Ani95_D7;DataAbstract_IDE_D7;DataAbstract_DiskDriver_D7
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=
+FileDescription=
+FileVersion=3.0.0.50
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DADBISAM4Drv.dpr b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DADBISAM4Drv.dpr
new file mode 100644
index 0000000..c81ef35
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DADBISAM4Drv.dpr
@@ -0,0 +1,18 @@
+library DADBISAM4Drv;
+
+uses
+ ShareMem,
+ uDADBISAMDriver in 'uDADBISAMDriver.pas';
+
+{$E dad}
+
+{$I dbisamvr.inc}
+{$IFNDEF DBISAM_V4}
+Please only build this driver dpr with DBISAM4
+{$ENDIF DBISAM_V4}
+
+{$R *.res}
+{$R DADBISAMDriverHtml.res}
+
+begin
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DADBISAM4Drv.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DADBISAM4Drv.res
new file mode 100644
index 0000000..723a007
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DADBISAM4Drv.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DADBISAMDriverHtml.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DADBISAMDriverHtml.res
new file mode 100644
index 0000000..449e052
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DADBISAMDriverHtml.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DADBXDriverHtml.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DADBXDriverHtml.res
new file mode 100644
index 0000000..d7774e2
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DADBXDriverHtml.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DADBXDrv.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DADBXDrv.cfg
new file mode 100644
index 0000000..b0ec5d7
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DADBXDrv.cfg
@@ -0,0 +1,45 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-E"..\..\Bin"
+-LE"c:\program files\borland\delphi7\Projects\Bpl"
+-LN"c:\program files\borland\delphi7\Projects\Bpl"
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DADBXDrv.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DADBXDrv.dof
new file mode 100644
index 0000000..daabfcd
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DADBXDrv.dof
@@ -0,0 +1,116 @@
+[FileVersion]
+Version=7.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=
+
+[Directories]
+OutputDir=..\..\Bin
+UnitOutputDir=
+PackageDLLOutputDir=
+PackageDCPOutputDir=
+SearchPath=
+Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;dclOfficeXP;RemObjects_DataSnap_D7;PurposesoftD7;addict3_d6;tb2kComplete_70;CDKDesignTimeSupport;CDKSmp;CDK;ES_CodeSite20;ESDelphiCommandCompiler;ESFileSearch;ESVisualCompositeExpert;EaglWk;ESGraphUtils;ESBase;ESVsCp;ESSampleComposites70;ESSampleCompositeEditors7;Rz252N70;SynEdit_D7;dxsbD7;dxComnD7;dxDockingD7;dxEdtrD7;dxELibD7;dxExELD7;EQGridD7;dxExRwD7;dxDBEdD7;dxInsD7;dxGrEdD7;ECQDBCD7;EQTLD7;EQDBTLD7;dxLayoutControlD7;dxMasterViewD7;dxmdsd7;dxNavBarD7;dxObjInsD7;dxPageControlD7;dxPSCoreD7;Rz252D70;cxPageControlVCLD7;cxEditorsVCLD7;dxThemeD7;cxLibraryVCLD7;cxDataD7;cxGridUtilsVCLD7;cxGridVCLD7;RemObjects_BPDX_D7
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+FileDescription=
+FileVersion=2.0.0.142
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=Data Abstract
+ProductVersion=2.0.0.0
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DADBXDrv.dpr b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DADBXDrv.dpr
new file mode 100644
index 0000000..4c68283
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DADBXDrv.dpr
@@ -0,0 +1,13 @@
+library DADBXDrv;
+
+uses
+ ShareMem,
+ uDADBXDriver in 'uDADBXDriver.pas';
+
+{$E dad}
+
+{$R *.res}
+{$R DADBXDriverHtml.res}
+
+begin
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DADBXDrv.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DADBXDrv.res
new file mode 100644
index 0000000..723a007
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DADBXDrv.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAElevateDBDriverHtml.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAElevateDBDriverHtml.res
new file mode 100644
index 0000000..e0b8925
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAElevateDBDriverHtml.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAElevateDBDrv.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAElevateDBDrv.cfg
new file mode 100644
index 0000000..a0ce1dc
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAElevateDBDrv.cfg
@@ -0,0 +1,41 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O-
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-E"..\..\bin"
+-U"d:\program files.all\borland\delphi7\Lib\Debug;"
+-O"d:\program files.all\borland\delphi7\Lib\Debug;"
+-I"d:\program files.all\borland\delphi7\Lib\Debug;"
+-R"d:\program files.all\borland\delphi7\Lib\Debug;"
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAElevateDBDrv.dpr b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAElevateDBDrv.dpr
new file mode 100644
index 0000000..7f7050b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAElevateDBDrv.dpr
@@ -0,0 +1,12 @@
+library DAElevateDBDrv;
+
+uses
+ ShareMem,
+ uDAElevateDBDriver in 'uDAElevateDBDriver.pas';
+
+{$E dad}
+
+{$R *.res}
+{$R DAElevateDBDriverHtml.res}
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAElevateDBDrv.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAElevateDBDrv.res
new file mode 100644
index 0000000..08ba56e
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAElevateDBDrv.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAFIBDriverHtml.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAFIBDriverHtml.res
new file mode 100644
index 0000000..d12ca9d
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAFIBDriverHtml.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAFIBDrv.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAFIBDrv.cfg
new file mode 100644
index 0000000..a17abb2
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAFIBDrv.cfg
@@ -0,0 +1,46 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-GD
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-E"..\..\Bin"
+-LE"c:\program files (x86)\borland\delphi7\Projects\Bpl"
+-LN"c:\program files (x86)\borland\delphi7\Projects\Bpl"
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAFIBDrv.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAFIBDrv.dof
new file mode 100644
index 0000000..1a2d3d6
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAFIBDrv.dof
@@ -0,0 +1,116 @@
+[FileVersion]
+Version=7.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=3
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=
+
+[Directories]
+OutputDir=..\..\Bin
+UnitOutputDir=
+PackageDLLOutputDir=
+PackageDCPOutputDir=
+SearchPath=
+Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;dclOfficeXP;RemObjects_DataSnap_D7;PurposesoftD7;addict3_d6;tb2kComplete_70;CDKDesignTimeSupport;CDKSmp;CDK;ES_CodeSite20;ESDelphiCommandCompiler;ESFileSearch;ESVisualCompositeExpert;EaglWk;ESGraphUtils;ESBase;ESVsCp;ESSampleComposites70;ESSampleCompositeEditors7;Rz252N70;SynEdit_D7;dxsbD7;dxComnD7;dxDockingD7;dxEdtrD7;dxELibD7;dxExELD7;EQGridD7;dxExRwD7;dxDBEdD7;dxInsD7;dxGrEdD7;ECQDBCD7;EQTLD7;EQDBTLD7;dxLayoutControlD7;dxMasterViewD7;dxmdsD7;dxNavBarD7;dxObjInsD7;dxPageControlD7;dxPSCoreD7;Rz252D70;cxPageControlVCLD7;cxEditorsVCLD7;dxThemeD7;cxLibraryVCLD7;cxDataD7;cxGridUtilsVCLD7;cxGridVCLD7;RemObjects_BPDX_D7
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+FileDescription=
+FileVersion=3.0.0.287
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=Data Abstract
+ProductVersion=2.0.0.0
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAFIBDrv.dpr b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAFIBDrv.dpr
new file mode 100644
index 0000000..1373b9a
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAFIBDrv.dpr
@@ -0,0 +1,12 @@
+library DAFIBDrv;
+
+uses
+ ShareMem,
+ uDAFIBDriver in 'uDAFIBDriver.pas';
+
+{$E dad}
+
+{$R *.res}
+{$R DAFIBDriverHtml.res}
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAFIBDrv.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAFIBDrv.res
new file mode 100644
index 0000000..723a007
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAFIBDrv.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAIBDACDriverHtml.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAIBDACDriverHtml.res
new file mode 100644
index 0000000..4732a47
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAIBDACDriverHtml.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAIBDACDrv.dpr b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAIBDACDrv.dpr
new file mode 100644
index 0000000..5c46278
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAIBDACDrv.dpr
@@ -0,0 +1,12 @@
+library DAIBDACDrv;
+
+uses
+ ShareMem,
+ uDAIBDACDriver in 'uDAIBDACDriver.pas';
+
+{$E dad}
+
+{$R *.res}
+{$R DAIBDACDriverHtml.res}
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAIBDACDrv.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAIBDACDrv.res
new file mode 100644
index 0000000..578c494
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAIBDACDrv.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAIBODriverHtml.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAIBODriverHtml.res
new file mode 100644
index 0000000..32c06f3
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAIBODriverHtml.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAIBODrv.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAIBODrv.cfg
new file mode 100644
index 0000000..301d58f
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAIBODrv.cfg
@@ -0,0 +1,39 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-E"..\..\Bin"
+-LE"c:\program files\borland\delphi7\Projects\Bpl"
+-LN"c:\program files\borland\delphi7\Projects\Bpl"
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAIBODrv.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAIBODrv.dof
new file mode 100644
index 0000000..daabfcd
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAIBODrv.dof
@@ -0,0 +1,116 @@
+[FileVersion]
+Version=7.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=
+
+[Directories]
+OutputDir=..\..\Bin
+UnitOutputDir=
+PackageDLLOutputDir=
+PackageDCPOutputDir=
+SearchPath=
+Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;dclOfficeXP;RemObjects_DataSnap_D7;PurposesoftD7;addict3_d6;tb2kComplete_70;CDKDesignTimeSupport;CDKSmp;CDK;ES_CodeSite20;ESDelphiCommandCompiler;ESFileSearch;ESVisualCompositeExpert;EaglWk;ESGraphUtils;ESBase;ESVsCp;ESSampleComposites70;ESSampleCompositeEditors7;Rz252N70;SynEdit_D7;dxsbD7;dxComnD7;dxDockingD7;dxEdtrD7;dxELibD7;dxExELD7;EQGridD7;dxExRwD7;dxDBEdD7;dxInsD7;dxGrEdD7;ECQDBCD7;EQTLD7;EQDBTLD7;dxLayoutControlD7;dxMasterViewD7;dxmdsd7;dxNavBarD7;dxObjInsD7;dxPageControlD7;dxPSCoreD7;Rz252D70;cxPageControlVCLD7;cxEditorsVCLD7;dxThemeD7;cxLibraryVCLD7;cxDataD7;cxGridUtilsVCLD7;cxGridVCLD7;RemObjects_BPDX_D7
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+FileDescription=
+FileVersion=2.0.0.142
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=Data Abstract
+ProductVersion=2.0.0.0
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAIBODrv.dpr b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAIBODrv.dpr
new file mode 100644
index 0000000..152fbe5
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAIBODrv.dpr
@@ -0,0 +1,13 @@
+library DAIBODrv;
+
+uses
+ ShareMem,
+ uDAIBODriver in 'uDAIBODriver.pas';
+
+{$E dad}
+
+{$R *.res}
+{$R DAIBODriverHtml.res}
+
+begin
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAIBODrv.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAIBODrv.res
new file mode 100644
index 0000000..723a007
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAIBODrv.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAIBXDriverHtml.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAIBXDriverHtml.res
new file mode 100644
index 0000000..790cda2
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAIBXDriverHtml.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAIBXDrv.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAIBXDrv.cfg
new file mode 100644
index 0000000..b0ec5d7
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAIBXDrv.cfg
@@ -0,0 +1,45 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-E"..\..\Bin"
+-LE"c:\program files\borland\delphi7\Projects\Bpl"
+-LN"c:\program files\borland\delphi7\Projects\Bpl"
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAIBXDrv.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAIBXDrv.dof
new file mode 100644
index 0000000..daabfcd
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAIBXDrv.dof
@@ -0,0 +1,116 @@
+[FileVersion]
+Version=7.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=
+
+[Directories]
+OutputDir=..\..\Bin
+UnitOutputDir=
+PackageDLLOutputDir=
+PackageDCPOutputDir=
+SearchPath=
+Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;dclOfficeXP;RemObjects_DataSnap_D7;PurposesoftD7;addict3_d6;tb2kComplete_70;CDKDesignTimeSupport;CDKSmp;CDK;ES_CodeSite20;ESDelphiCommandCompiler;ESFileSearch;ESVisualCompositeExpert;EaglWk;ESGraphUtils;ESBase;ESVsCp;ESSampleComposites70;ESSampleCompositeEditors7;Rz252N70;SynEdit_D7;dxsbD7;dxComnD7;dxDockingD7;dxEdtrD7;dxELibD7;dxExELD7;EQGridD7;dxExRwD7;dxDBEdD7;dxInsD7;dxGrEdD7;ECQDBCD7;EQTLD7;EQDBTLD7;dxLayoutControlD7;dxMasterViewD7;dxmdsd7;dxNavBarD7;dxObjInsD7;dxPageControlD7;dxPSCoreD7;Rz252D70;cxPageControlVCLD7;cxEditorsVCLD7;dxThemeD7;cxLibraryVCLD7;cxDataD7;cxGridUtilsVCLD7;cxGridVCLD7;RemObjects_BPDX_D7
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+FileDescription=
+FileVersion=2.0.0.142
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=Data Abstract
+ProductVersion=2.0.0.0
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAIBXDrv.dpr b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAIBXDrv.dpr
new file mode 100644
index 0000000..39dde39
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAIBXDrv.dpr
@@ -0,0 +1,13 @@
+library DAIBXDrv;
+
+uses
+ ShareMem,
+ uDAIBXDriver in 'uDAIBXDriver.pas';
+
+{$E dad}
+
+{$R *.res}
+{$R DAIBXDriverHtml.res}
+
+begin
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAIBXDrv.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAIBXDrv.res
new file mode 100644
index 0000000..723a007
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAIBXDrv.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAMyDACDriverHtml.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAMyDACDriverHtml.res
new file mode 100644
index 0000000..e1fa180
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAMyDACDriverHtml.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAMyDACDrv.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAMyDACDrv.cfg
new file mode 100644
index 0000000..301d58f
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAMyDACDrv.cfg
@@ -0,0 +1,39 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-E"..\..\Bin"
+-LE"c:\program files\borland\delphi7\Projects\Bpl"
+-LN"c:\program files\borland\delphi7\Projects\Bpl"
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAMyDACDrv.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAMyDACDrv.dof
new file mode 100644
index 0000000..dd86d8f
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAMyDACDrv.dof
@@ -0,0 +1,115 @@
+[FileVersion]
+Version=7.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=
+
+[Directories]
+OutputDir=..\..\Bin
+UnitOutputDir=
+PackageDLLOutputDir=
+PackageDCPOutputDir=
+SearchPath=
+Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;dclOfficeXP;RemObjects_DataSnap_D7;PurposesoftD7;addict3_d6;tb2kComplete_70;CDKDesignTimeSupport;CDKSmp;CDK;ES_CodeSite20;ESDelphiCommandCompiler;ESFileSearch;ESVisualCompositeExpert;EaglWk;ESGraphUtils;ESBase;ESVsCp;ESSampleComposites70;ESSampleCompositeEditors7;Rz252N70;SynEdit_D7;dxsbD7;dxComnD7;dxDockingD7;dxEdtrD7;dxELibD7;dxExELD7;EQGridD7;dxExRwD7;dxDBEdD7;dxInsD7;dxGrEdD7;ECQDBCD7;EQTLD7;EQDBTLD7;dxLayoutControlD7;dxMasterViewD7;dxmdsd7;dxNavBarD7;dxObjInsD7;dxPageControlD7;dxPSCoreD7;Rz252D70;cxPageControlVCLD7;cxEditorsVCLD7;dxThemeD7;cxLibraryVCLD7;cxDataD7;cxGridUtilsVCLD7;cxGridVCLD7;RemObjects_BPDX_D7
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+FileDescription=
+FileVersion=2.0.0.178
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=Data Abstract
+ProductVersion=2.0.0.0
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAMyDACDrv.dpr b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAMyDACDrv.dpr
new file mode 100644
index 0000000..971e17b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAMyDACDrv.dpr
@@ -0,0 +1,12 @@
+library DAMyDACDrv;
+
+uses
+ ShareMem,
+ uDAMyDACDriver in 'uDAMyDACDriver.pas';
+
+{$E dad}
+
+{$R *.res}
+{$R DAMyDACDriverHtml.res}
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAMyDACDrv.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAMyDACDrv.res
new file mode 100644
index 0000000..723a007
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAMyDACDrv.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAMySQLDACDriverHtml.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAMySQLDACDriverHtml.res
new file mode 100644
index 0000000..c7f7a82
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAMySQLDACDriverHtml.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAMySQLDACDrv.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAMySQLDACDrv.cfg
new file mode 100644
index 0000000..40c80d0
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAMySQLDACDrv.cfg
@@ -0,0 +1,45 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-E"..\..\Bin"
+-LE"c:\program files (x86)\borland\delphi7\Projects\Bpl"
+-LN"c:\program files (x86)\borland\delphi7\Projects\Bpl"
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAMySQLDACDrv.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAMySQLDACDrv.dof
new file mode 100644
index 0000000..dd86d8f
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAMySQLDACDrv.dof
@@ -0,0 +1,115 @@
+[FileVersion]
+Version=7.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=
+
+[Directories]
+OutputDir=..\..\Bin
+UnitOutputDir=
+PackageDLLOutputDir=
+PackageDCPOutputDir=
+SearchPath=
+Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;dclOfficeXP;RemObjects_DataSnap_D7;PurposesoftD7;addict3_d6;tb2kComplete_70;CDKDesignTimeSupport;CDKSmp;CDK;ES_CodeSite20;ESDelphiCommandCompiler;ESFileSearch;ESVisualCompositeExpert;EaglWk;ESGraphUtils;ESBase;ESVsCp;ESSampleComposites70;ESSampleCompositeEditors7;Rz252N70;SynEdit_D7;dxsbD7;dxComnD7;dxDockingD7;dxEdtrD7;dxELibD7;dxExELD7;EQGridD7;dxExRwD7;dxDBEdD7;dxInsD7;dxGrEdD7;ECQDBCD7;EQTLD7;EQDBTLD7;dxLayoutControlD7;dxMasterViewD7;dxmdsd7;dxNavBarD7;dxObjInsD7;dxPageControlD7;dxPSCoreD7;Rz252D70;cxPageControlVCLD7;cxEditorsVCLD7;dxThemeD7;cxLibraryVCLD7;cxDataD7;cxGridUtilsVCLD7;cxGridVCLD7;RemObjects_BPDX_D7
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+FileDescription=
+FileVersion=2.0.0.178
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=Data Abstract
+ProductVersion=2.0.0.0
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAMySQLDACDrv.dpr b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAMySQLDACDrv.dpr
new file mode 100644
index 0000000..3a48d91
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAMySQLDACDrv.dpr
@@ -0,0 +1,12 @@
+library DAMySQLDACDrv;
+
+uses
+ ShareMem,
+ uDAMySQLDACDriver in 'uDAMySQLDACDriver.pas';
+
+{$E dad}
+
+{$R *.res}
+{$R DAMySQLDACDriverHtml.res}
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAMySQLDACDrv.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAMySQLDACDrv.res
new file mode 100644
index 0000000..723a007
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAMySQLDACDrv.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DANexusDBDriverHtml.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DANexusDBDriverHtml.res
new file mode 100644
index 0000000..46b9c33
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DANexusDBDriverHtml.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DANexusDBDrv.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DANexusDBDrv.cfg
new file mode 100644
index 0000000..7caebcd
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DANexusDBDrv.cfg
@@ -0,0 +1,45 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-E"..\..\Data Abstract\Bin"
+-LE"c:\program files\borland\delphi7\Projects\Bpl"
+-LN"c:\program files\borland\delphi7\Projects\Bpl"
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DANexusDBDrv.dpr b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DANexusDBDrv.dpr
new file mode 100644
index 0000000..5d47e04
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DANexusDBDrv.dpr
@@ -0,0 +1,12 @@
+library DANexusDBDrv;
+
+uses
+ ShareMem,
+ uDANexusDBDriver in 'uDANexusDBDriver.pas';
+
+{$E dad}
+
+{$R *.res}
+{$R DANexusDBDriverHtml.res}
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DANexusDBDrv.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DANexusDBDrv.res
new file mode 100644
index 0000000..723a007
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DANexusDBDrv.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAODACDriverHtml.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAODACDriverHtml.res
new file mode 100644
index 0000000..a096da3
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAODACDriverHtml.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAODACDrv.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAODACDrv.cfg
new file mode 100644
index 0000000..301d58f
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAODACDrv.cfg
@@ -0,0 +1,39 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-E"..\..\Bin"
+-LE"c:\program files\borland\delphi7\Projects\Bpl"
+-LN"c:\program files\borland\delphi7\Projects\Bpl"
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAODACDrv.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAODACDrv.dof
new file mode 100644
index 0000000..daabfcd
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAODACDrv.dof
@@ -0,0 +1,116 @@
+[FileVersion]
+Version=7.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=
+
+[Directories]
+OutputDir=..\..\Bin
+UnitOutputDir=
+PackageDLLOutputDir=
+PackageDCPOutputDir=
+SearchPath=
+Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;dclOfficeXP;RemObjects_DataSnap_D7;PurposesoftD7;addict3_d6;tb2kComplete_70;CDKDesignTimeSupport;CDKSmp;CDK;ES_CodeSite20;ESDelphiCommandCompiler;ESFileSearch;ESVisualCompositeExpert;EaglWk;ESGraphUtils;ESBase;ESVsCp;ESSampleComposites70;ESSampleCompositeEditors7;Rz252N70;SynEdit_D7;dxsbD7;dxComnD7;dxDockingD7;dxEdtrD7;dxELibD7;dxExELD7;EQGridD7;dxExRwD7;dxDBEdD7;dxInsD7;dxGrEdD7;ECQDBCD7;EQTLD7;EQDBTLD7;dxLayoutControlD7;dxMasterViewD7;dxmdsd7;dxNavBarD7;dxObjInsD7;dxPageControlD7;dxPSCoreD7;Rz252D70;cxPageControlVCLD7;cxEditorsVCLD7;dxThemeD7;cxLibraryVCLD7;cxDataD7;cxGridUtilsVCLD7;cxGridVCLD7;RemObjects_BPDX_D7
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+FileDescription=
+FileVersion=2.0.0.142
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=Data Abstract
+ProductVersion=2.0.0.0
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAODACDrv.dpr b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAODACDrv.dpr
new file mode 100644
index 0000000..b2aa1e2
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAODACDrv.dpr
@@ -0,0 +1,13 @@
+library DAODACDrv;
+
+uses
+ ShareMem,
+ uDAODACDriver in 'uDAODACDriver.pas',
+ uDAOracleInterfaces in '..\uDAOracleInterfaces.pas';
+
+{$E dad}
+
+{$R *.res}
+{$R DAODACDriverHtml.res}
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAODACDrv.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAODACDrv.res
new file mode 100644
index 0000000..723a007
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAODACDrv.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAPostgresDACDriverHtml.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAPostgresDACDriverHtml.res
new file mode 100644
index 0000000..c7f7a82
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAPostgresDACDriverHtml.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAPostgresDACDrv.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAPostgresDACDrv.cfg
new file mode 100644
index 0000000..40c80d0
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAPostgresDACDrv.cfg
@@ -0,0 +1,45 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-E"..\..\Bin"
+-LE"c:\program files (x86)\borland\delphi7\Projects\Bpl"
+-LN"c:\program files (x86)\borland\delphi7\Projects\Bpl"
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAPostgresDACDrv.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAPostgresDACDrv.dof
new file mode 100644
index 0000000..dd86d8f
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAPostgresDACDrv.dof
@@ -0,0 +1,115 @@
+[FileVersion]
+Version=7.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=
+
+[Directories]
+OutputDir=..\..\Bin
+UnitOutputDir=
+PackageDLLOutputDir=
+PackageDCPOutputDir=
+SearchPath=
+Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;dclOfficeXP;RemObjects_DataSnap_D7;PurposesoftD7;addict3_d6;tb2kComplete_70;CDKDesignTimeSupport;CDKSmp;CDK;ES_CodeSite20;ESDelphiCommandCompiler;ESFileSearch;ESVisualCompositeExpert;EaglWk;ESGraphUtils;ESBase;ESVsCp;ESSampleComposites70;ESSampleCompositeEditors7;Rz252N70;SynEdit_D7;dxsbD7;dxComnD7;dxDockingD7;dxEdtrD7;dxELibD7;dxExELD7;EQGridD7;dxExRwD7;dxDBEdD7;dxInsD7;dxGrEdD7;ECQDBCD7;EQTLD7;EQDBTLD7;dxLayoutControlD7;dxMasterViewD7;dxmdsd7;dxNavBarD7;dxObjInsD7;dxPageControlD7;dxPSCoreD7;Rz252D70;cxPageControlVCLD7;cxEditorsVCLD7;dxThemeD7;cxLibraryVCLD7;cxDataD7;cxGridUtilsVCLD7;cxGridVCLD7;RemObjects_BPDX_D7
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+FileDescription=
+FileVersion=2.0.0.178
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=Data Abstract
+ProductVersion=2.0.0.0
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAPostgresDACDrv.dpr b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAPostgresDACDrv.dpr
new file mode 100644
index 0000000..700c0aa
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAPostgresDACDrv.dpr
@@ -0,0 +1,12 @@
+library DAPostgresDACDrv;
+
+uses
+ ShareMem,
+ uDAPostgresDACDriver in 'uDAPostgresDACDriver.pas';
+
+{$E dad}
+
+{$R *.res}
+{$R DAPostgresDACDriverHtml.res}
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAPostgresDACDrv.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAPostgresDACDrv.res
new file mode 100644
index 0000000..723a007
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAPostgresDACDrv.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DASDACDriverHtml.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DASDACDriverHtml.res
new file mode 100644
index 0000000..2ca3ed1
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DASDACDriverHtml.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DASDACDrv.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DASDACDrv.cfg
new file mode 100644
index 0000000..301d58f
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DASDACDrv.cfg
@@ -0,0 +1,39 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-E"..\..\Bin"
+-LE"c:\program files\borland\delphi7\Projects\Bpl"
+-LN"c:\program files\borland\delphi7\Projects\Bpl"
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DASDACDrv.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DASDACDrv.dof
new file mode 100644
index 0000000..8c8eb5f
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DASDACDrv.dof
@@ -0,0 +1,116 @@
+[FileVersion]
+Version=7.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=
+
+[Directories]
+OutputDir=..\..\Bin
+UnitOutputDir=
+PackageDLLOutputDir=
+PackageDCPOutputDir=
+SearchPath=
+Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;dclOfficeXP;RemObjects_DataSnap_D7;PurposesoftD7;addict3_d6;tb2kComplete_70;CDKDesignTimeSupport;CDKSmp;CDK;ES_CodeSite20;ESDelphiCommandCompiler;ESFileSearch;ESVisualCompositeExpert;EaglWk;ESGraphUtils;ESBase;ESVsCp;ESSampleComposites70;ESSampleCompositeEditors7;Rz252N70;SynEdit_D7;dxsbD7;dxComnD7;dxDockingD7;dxEdtrD7;dxELibD7;dxExELD7;EQGridD7;dxExRwD7;dxDBEdD7;dxInsD7;dxGrEdD7;ECQDBCD7;EQTLD7;EQDBTLD7;dxLayoutControlD7;dxMasterViewD7;dxmdsd7;dxNavBarD7;dxObjInsD7;dxPageControlD7;dxPSCoreD7;Rz252D70;cxPageControlVCLD7;cxEditorsVCLD7;dxThemeD7;cxLibraryVCLD7;cxDataD7;cxGridUtilsVCLD7;cxGridVCLD7;RemObjects_BPDX_D7
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+FileDescription=
+FileVersion=2.0.1.196
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=Data Abstract
+ProductVersion=2.0.0.0
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DASDACDrv.dpr b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DASDACDrv.dpr
new file mode 100644
index 0000000..615439d
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DASDACDrv.dpr
@@ -0,0 +1,12 @@
+library DASDACDrv;
+
+uses
+ ShareMem,
+ uDASDACDriver in 'uDASDACDriver.pas';
+
+{$E dad}
+
+{$R *.res}
+{$R DASDACDriverHtml.res}
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DASDACDrv.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DASDACDrv.res
new file mode 100644
index 0000000..723a007
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DASDACDrv.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DASQLiteDriverHtml.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DASQLiteDriverHtml.res
new file mode 100644
index 0000000..316f711
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DASQLiteDriverHtml.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DASQLiteDrv.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DASQLiteDrv.bdsproj
new file mode 100644
index 0000000..584582a
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DASQLiteDrv.bdsproj
@@ -0,0 +1,182 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {5F97886E-15E1-47E5-B346-586F0B37A04B}
+
+
+
+
+ DASQLiteDrv.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 3
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+ D:\Program Files\RemObjects Software\Data Abstract
+
+
+
+ $(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10;$(DELPHI)\Lib\Debug
+ vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;dclOfficeXP;RemObjects_DataSnap_D7;PurposesoftD7;addict3_d6;tb2kComplete_70;CDKDesignTimeSupport;CDKSmp;CDK;ES_CodeSite20;ESDelphiCommandCompiler;ESFileSearch;ESVisualCompositeExpert;EaglWk;ESGraphUtils;ESBase;ESVsCp;ESSampleComposites70;ESSampleCompositeEditors7;Rz252N70;SynEdit_D7;dxsbD7;dxComnD7;dxDockingD7;dxEdtrD7;dxELibD7;dxExELD7;EQGridD7;dxExRwD7;dxDBEdD7;dxInsD7;dxGrEdD7;ECQDBCD7;EQTLD7;EQDBTLD7;dxLayoutControlD7;dxMasterViewD7;dxmdsd7;dxNavBarD7;dxObjInsD7;dxPageControlD7;dxPSCoreD7;Rz252D70;cxPageControlVCLD7;cxEditorsVCLD7;dxThemeD7;cxLibraryVCLD7;cxDataD7;cxGridUtilsVCLD7;cxGridVCLD7;RemObjects_BPDX_D7
+
+
+ False
+
+
+
+ D:\Program Files\RemObjects Software\Data Abstract\DASchemaModeler.exe
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 3
+ 0
+ 0
+ 290
+ False
+ False
+ False
+ False
+ False
+ 1033
+ 1252
+
+
+ RemObjects Software
+
+ 3.0.0.290
+
+
+
+
+ Data Abstract
+ 2.0.0.0
+
+ RemObjects Data Abstract - FIBPlus Driver
+ RemObjects Hydra - Core Library
+ RemObjects Hydra - IDE Integration
+ RemObjects Hydra - RemObjects SDK Integration Library
+ RemObjects Hydra - RemObjects SDK IDE Integration
+ RemObjects NexusDB Pack - Library
+ RemObjects NexusDB Pack - IDE Integration
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DASQLiteDrv.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DASQLiteDrv.cfg
new file mode 100644
index 0000000..8549342
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DASQLiteDrv.cfg
@@ -0,0 +1,34 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O-
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-E"..\..\Bin"
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DASQLiteDrv.dpr b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DASQLiteDrv.dpr
new file mode 100644
index 0000000..dafaf13
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DASQLiteDrv.dpr
@@ -0,0 +1,13 @@
+library DASQLiteDrv;
+
+uses
+ ShareMem,
+ uDASQLiteDriver in 'uDASQLiteDriver.pas';
+
+{$E dad}
+
+{$R *.res}
+{$R DASQLiteDriverHtml.res}
+
+begin
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DASQLiteDrv.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DASQLiteDrv.res
new file mode 100644
index 0000000..723a007
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DASQLiteDrv.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAZeosDriverHtml.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAZeosDriverHtml.res
new file mode 100644
index 0000000..f3000f5
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAZeosDriverHtml.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAZeosDrv.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAZeosDrv.cfg
new file mode 100644
index 0000000..96a1b9a
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAZeosDrv.cfg
@@ -0,0 +1,41 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O-
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-E"D:\Program Files\RemObjects Software\Data Abstract"
+-U"d:\program files.all\borland\delphi7\Lib\Debug;J:\Products\ACAT\Source"
+-O"d:\program files.all\borland\delphi7\Lib\Debug;J:\Products\ACAT\Source"
+-I"d:\program files.all\borland\delphi7\Lib\Debug;J:\Products\ACAT\Source"
+-R"d:\program files.all\borland\delphi7\Lib\Debug;J:\Products\ACAT\Source"
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAZeosDrv.dpr b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAZeosDrv.dpr
new file mode 100644
index 0000000..a566487
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAZeosDrv.dpr
@@ -0,0 +1,12 @@
+library DAZeosDrv;
+
+uses
+ ShareMem,
+ uDAZeosDriver in 'uDAZeosDriver.pas';
+
+{$E dad}
+
+{$R *.res}
+{$R DAZeosDriverHtml.res}
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAZeosDrv.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAZeosDrv.res
new file mode 100644
index 0000000..723a007
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DAZeosDrv.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D10.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D10.bdsproj
new file mode 100644
index 0000000..1e97716
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D10.bdsproj
@@ -0,0 +1,176 @@
+
+
+
+
+ Delphi.Personality
+
+ 1.0
+ {0FC45B58-F519-40B6-831A-DD79C8D3270F}
+
+
+
+
+ DataAbstract_ADODriver_D10.dpk
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+
+
+ False
+
+ False
+ False
+ False
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True True
+ True
+
+
+
+ 0
+ 0
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+ RemObjects Data Abstract - ADOExpress/dbGo Driver False
+
+
+
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 3
+ 0
+ 1
+ 361
+ False
+ False
+ False
+ False
+ False
+ 1033
+ 1252
+
+
+ RemObjects Software
+
+ 3.0.1.361
+
+
+
+
+ RemObjects SDK
+ 1.0.0.0
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D10.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D10.cfg
new file mode 100644
index 0000000..9037d9d
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D10.cfg
@@ -0,0 +1,49 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N0"..\..\Dcu\D10"
+-LE"..\..\Dcu\D10"
+-LN"..\..\Dcu\D10"
+-U"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-O"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-I"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-R"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D10.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D10.dpk
new file mode 100644
index 0000000..501b019
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D10.dpk
@@ -0,0 +1,39 @@
+package DataAbstract_ADODriver_D10;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - ADOExpress/dbGo Driver'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ DataAbstract_Core_D10,
+ adortl;
+
+contains
+ uDAADODriver in 'uDAADODriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D10.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D10.res
new file mode 100644
index 0000000..204493b
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D10.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D11.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D11.dpk
new file mode 100644
index 0000000..503d123
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D11.dpk
@@ -0,0 +1,39 @@
+package DataAbstract_ADODriver_D11;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - ADOExpress/dbGo Driver'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ DataAbstract_Core_D11,
+ adortl;
+
+contains
+ uDAADODriver in 'uDAADODriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D11.dproj b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D11.dproj
new file mode 100644
index 0000000..b399aa9
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D11.dproj
@@ -0,0 +1,68 @@
+
+
+ {6843d8de-6ab6-4222-a3c5-282e7cc611df}
+ DataAbstract_ADODriver_D11.dpk
+ Debug
+ AnyCPU
+ DCC32
+ ..\..\Dcu\D11\DataAbstract_ADODriver_D11.bpl
+
+
+ 7.0
+ False
+ False
+ 0
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ RELEASE
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ 7.0
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ Delphi.Personality
+ Package
+
+False True False RemObjects Data Abstract - ADOExpress/dbGo Driver False True False True False 3 0 1 361 False False False False False 1033 1252 RemObjects Software 3.0.1.361 RemObjects SDK 1.0.0.0 DataAbstract_ADODriver_D11.dpk
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D11.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D11.res
new file mode 100644
index 0000000..204493b
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D11.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D6.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D6.cfg
new file mode 100644
index 0000000..05f9ec3
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D6.cfg
@@ -0,0 +1,41 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\..\Dcu\D6"
+-LE"..\..\Dcu\D6"
+-LN"..\..\Dcu\D6"
+-U"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-O"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-I"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-R"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-Z
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D6.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D6.dof
new file mode 100644
index 0000000..e0035fa
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D6.dof
@@ -0,0 +1,76 @@
+[FileVersion]
+Version=6.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitDeprecated=0
+UnitLibrary=0
+UnitPlatform=0
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=Data Abstract - ADOExpress/dbGo Driver
+
+[Directories]
+OutputDir=
+UnitOutputDir=..\..\Dcu\D6
+PackageDLLOutputDir=..\..\Dcu\D6
+PackageDCPOutputDir=..\..\Dcu\D6
+SearchPath=..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6
+Packages=
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+FileDescription=
+FileVersion=2.0.0.138
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=RemObjects SDK
+ProductVersion=1.0.0.0
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D6.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D6.dpk
new file mode 100644
index 0000000..9a608cd
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D6.dpk
@@ -0,0 +1,39 @@
+package DataAbstract_ADODriver_D6;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - ADOExpress/dbGo Driver'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ DataAbstract_Core_D6,
+ adortl;
+
+contains
+ uDAADODriver in 'uDAADODriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D6.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D6.res
new file mode 100644
index 0000000..204493b
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D6.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D7.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D7.cfg
new file mode 100644
index 0000000..6784156
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D7.cfg
@@ -0,0 +1,50 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\..\Dcu\D7"
+-LE"..\..\Dcu\D7"
+-LN"..\..\Dcu\D7"
+-U"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-O"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-I"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-R"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D7.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D7.dof
new file mode 100644
index 0000000..f2d0c96
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D7.dof
@@ -0,0 +1,116 @@
+[FileVersion]
+Version=7.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=Data Abstract - ADOExpress/dbGo Driver
+
+[Directories]
+OutputDir=
+UnitOutputDir=..\..\Dcu\D7
+PackageDLLOutputDir=..\..\Dcu\D7
+PackageDCPOutputDir=..\..\Dcu\D7
+SearchPath=..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7
+Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;dclOfficeXP;RemObjects_DataSnap_D7;PurposesoftD7;addict3_d6;tb2kComplete_70;CDKDesignTimeSupport;CDKSmp;CDK;ES_CodeSite20;ESDelphiCommandCompiler;ESFileSearch;ESVisualCompositeExpert;EaglWk;ESGraphUtils;ESBase;ESVsCp;ESSampleComposites70;ESSampleCompositeEditors7;Rz252N70;SynEdit_D7;dxsbD7;dxComnD7;dxDockingD7;dxEdtrD7;dxELibD7;dxExELD7;EQGridD7;dxExRwD7;dxDBEdD7;dxInsD7;dxGrEdD7;ECQDBCD7;EQTLD7;EQDBTLD7;dxLayoutControlD7;dxMasterViewD7;dxmdsd7;dxNavBarD7;dxObjInsD7;dxPageControlD7;dxPSCoreD7;Rz252D70;cxPageControlVCLD7;cxEditorsVCLD7;dxThemeD7;cxLibraryVCLD7;cxDataD7;cxGridUtilsVCLD7;cxGridVCLD7;RemObjects_BPDX_D7
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+FileDescription=
+FileVersion=2.0.0.142
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=RemObjects SDK
+ProductVersion=1.0.0.0
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D7.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D7.dpk
new file mode 100644
index 0000000..a1427e8
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D7.dpk
@@ -0,0 +1,39 @@
+package DataAbstract_ADODriver_D7;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - ADOExpress/dbGo Driver'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ DataAbstract_Core_D7,
+ adortl;
+
+contains
+ uDAADODriver in 'uDAADODriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D7.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D7.res
new file mode 100644
index 0000000..204493b
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_D7.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_Glyphs.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_Glyphs.res
new file mode 100644
index 0000000..067c6a6
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ADODriver_Glyphs.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D10.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D10.bdsproj
new file mode 100644
index 0000000..a34aa65
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D10.bdsproj
@@ -0,0 +1,176 @@
+
+
+
+
+ Delphi.Personality
+
+ 1.0
+ {0FC45B58-F519-40B6-831A-DD79C8D3270F}
+
+
+
+
+ DataAbstract_AnyDACDriver_D10.dpk
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+
+
+ False
+
+ False
+ False
+ False
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True True
+ True
+
+
+
+ 0
+ 0
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+ RemObjects Data Abstract - AnyDAC Driver False
+
+
+
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 3
+ 0
+ 1
+ 361
+ False
+ False
+ False
+ False
+ False
+ 1033
+ 1252
+
+
+ RemObjects Software
+
+ 3.0.1.361
+
+
+
+
+ RemObjects SDK
+ 1.0.0.0
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D10.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D10.cfg
new file mode 100644
index 0000000..9037d9d
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D10.cfg
@@ -0,0 +1,49 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N0"..\..\Dcu\D10"
+-LE"..\..\Dcu\D10"
+-LN"..\..\Dcu\D10"
+-U"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-O"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-I"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-R"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D10.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D10.dpk
new file mode 100644
index 0000000..d6baf13
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D10.dpk
@@ -0,0 +1,53 @@
+package DataAbstract_AnyDACDriver_D10;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - AnyDAC Driver'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ DataAbstract_Core_D10,
+ dbexpress,
+ xmlrtl,
+ AnyDAC_PhysIB_D10,
+ AnyDAC_Phys_D10,
+ AnyDAC_ComI_D10,
+ AnyDAC_PhysADS_D10,
+ AnyDAC_PhysODBC_D10,
+ AnyDAC_PhysDBExp_D10,
+ AnyDAC_PhysASA_D10,
+ AnyDAC_PhysOracl_D10,
+ AnyDAC_PhysMySQL_D10,
+ AnyDAC_PhysDb2_D10,
+ AnyDAC_PhysMSSQL_D10,
+ AnyDAC_PhysMSAcc_D10,
+ AnyDAC_Comp_D10;
+
+contains
+ uDAAnyDACDriver in 'uDAAnyDACDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D10.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D10.res
new file mode 100644
index 0000000..7b3c163
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D10.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D11.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D11.dpk
new file mode 100644
index 0000000..a9fc6ff
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D11.dpk
@@ -0,0 +1,53 @@
+package DataAbstract_AnyDACDriver_D11;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - AnyDAC Driver'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ DataAbstract_Core_D11,
+ dbexpress,
+ xmlrtl,
+ AnyDAC_PhysIB_D11,
+ AnyDAC_Phys_D11,
+ AnyDAC_ComI_D11,
+ AnyDAC_PhysADS_D11,
+ AnyDAC_PhysODBC_D11,
+ AnyDAC_PhysDBExp_D11,
+ AnyDAC_PhysASA_D11,
+ AnyDAC_PhysOracl_D11,
+ AnyDAC_PhysMySQL_D11,
+ AnyDAC_PhysDb2_D11,
+ AnyDAC_PhysMSSQL_D11,
+ AnyDAC_PhysMSAcc_D11,
+ AnyDAC_Comp_D11;
+
+contains
+ uDAAnyDACDriver in 'uDAAnyDACDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D11.dproj b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D11.dproj
new file mode 100644
index 0000000..37cf6a8
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D11.dproj
@@ -0,0 +1,67 @@
+
+
+ {6843d8de-6ab6-4222-a3c5-282e7cc611df}
+ DataAbstract_AnyDACDriver_D11.dpk
+ Debug
+ AnyCPU
+ DCC32
+ ..\..\Dcu\D11\DataAbstract_AnyDACDriver_D11.bpl
+
+
+ 7.0
+ False
+ False
+ 0
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ RELEASE
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ 7.0
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ Delphi.Personality
+ Package
+
+False True False RemObjects Data Abstract - AnyDAC Driver False True False True False 3 0 1 361 False False False False False 1033 1252 RemObjects Software 3.0.1.361 RemObjects SDK 1.0.0.0 DataAbstract_AnyDACDriver_D11.dpk
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D11.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D11.res
new file mode 100644
index 0000000..7b3c163
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D11.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D6.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D6.cfg
new file mode 100644
index 0000000..05f9ec3
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D6.cfg
@@ -0,0 +1,41 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\..\Dcu\D6"
+-LE"..\..\Dcu\D6"
+-LN"..\..\Dcu\D6"
+-U"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-O"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-I"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-R"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-Z
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D6.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D6.dof
new file mode 100644
index 0000000..70f2fea
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D6.dof
@@ -0,0 +1,76 @@
+[FileVersion]
+Version=6.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitDeprecated=0
+UnitLibrary=0
+UnitPlatform=0
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=Data Abstract - AnyDAC Driver
+
+[Directories]
+OutputDir=
+UnitOutputDir=..\..\Dcu\D6
+PackageDLLOutputDir=..\..\Dcu\D6
+PackageDCPOutputDir=..\..\Dcu\D6
+SearchPath=..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6
+Packages=
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+FileDescription=
+FileVersion=2.0.0.138
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=RemObjects SDK
+ProductVersion=1.0.0.0
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D6.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D6.dpk
new file mode 100644
index 0000000..f744ae2
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D6.dpk
@@ -0,0 +1,53 @@
+package DataAbstract_AnyDACDriver_D6;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - AnyDAC Driver'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ DataAbstract_Core_D6,
+ dbexpress,
+ xmlrtl,
+ AnyDAC_PhysIB_D6,
+ AnyDAC_Phys_D6,
+ AnyDAC_ComI_D6,
+ AnyDAC_PhysADS_D6,
+ AnyDAC_PhysODBC_D6,
+ AnyDAC_PhysDBExp_D6,
+ AnyDAC_PhysASA_D6,
+ AnyDAC_PhysOracl_D6,
+ AnyDAC_PhysMySQL_D6,
+ AnyDAC_PhysDb2_D6,
+ AnyDAC_PhysMSSQL_D6,
+ AnyDAC_PhysMSAcc_D6,
+ AnyDAC_Comp_D6;
+
+contains
+ uDAAnyDACDriver in 'uDAAnyDACDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D6.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D6.res
new file mode 100644
index 0000000..892aed8
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D6.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D7.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D7.cfg
new file mode 100644
index 0000000..f33a910
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D7.cfg
@@ -0,0 +1,50 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\..\Dcu\D7"
+-LE"..\..\Dcu\D7"
+-LN"..\..\Dcu\D7"
+-U"..\..\Dcu\D7;..\..\..\RemObjects SDK for Delphi\Dcu\D7"
+-O"..\..\Dcu\D7;..\..\..\RemObjects SDK for Delphi\Dcu\D7"
+-I"..\..\Dcu\D7;..\..\..\RemObjects SDK for Delphi\Dcu\D7"
+-R"..\..\Dcu\D7;..\..\..\RemObjects SDK for Delphi\Dcu\D7"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D7.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D7.dof
new file mode 100644
index 0000000..f8327e9
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D7.dof
@@ -0,0 +1,116 @@
+[FileVersion]
+Version=7.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=RemObjects Data Abstract - AnyDAC Driver
+
+[Directories]
+OutputDir=
+UnitOutputDir=..\..\Dcu\D7
+PackageDLLOutputDir=..\..\Dcu\D7
+PackageDCPOutputDir=..\..\Dcu\D7
+SearchPath=..\..\Dcu\D7;..\..\..\RemObjects SDK for Delphi\Dcu\D7
+Packages=
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+FileDescription=
+FileVersion=3.0.0.289
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=RemObjects SDK
+ProductVersion=1.0.0.0
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D7.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D7.dpk
new file mode 100644
index 0000000..47a39c3
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D7.dpk
@@ -0,0 +1,53 @@
+package DataAbstract_AnyDACDriver_D7;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - AnyDAC Driver'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ DataAbstract_Core_D7,
+ dbexpress,
+ xmlrtl,
+ AnyDAC_PhysIB_D7,
+ AnyDAC_Phys_D7,
+ AnyDAC_ComI_D7,
+ AnyDAC_PhysADS_D7,
+ AnyDAC_PhysODBC_D7,
+ AnyDAC_PhysDBExp_D7,
+ AnyDAC_PhysASA_D7,
+ AnyDAC_PhysOracl_D7,
+ AnyDAC_PhysMySQL_D7,
+ AnyDAC_PhysDb2_D7,
+ AnyDAC_PhysMSSQL_D7,
+ AnyDAC_PhysMSAcc_D7,
+ AnyDAC_Comp_D7;
+
+contains
+ uDAAnyDACDriver in 'uDAAnyDACDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D7.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D7.res
new file mode 100644
index 0000000..b40eccd
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_D7.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_Glyphs.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_Glyphs.res
new file mode 100644
index 0000000..3926468
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_AnyDACDriver_Glyphs.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_BDEDriver_D10.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_BDEDriver_D10.bdsproj
new file mode 100644
index 0000000..f5afeb9
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_BDEDriver_D10.bdsproj
@@ -0,0 +1,179 @@
+
+
+
+
+ Delphi.Personality
+
+ 1.0
+ {0FC45B58-F519-40B6-831A-DD79C8D3270F}
+
+
+
+
+ DataAbstract_BDEDriver_D10.dpk
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+
+
+ False
+
+ False
+ False
+ False
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+ RemObjects Data Abstract - BDE Driver
+ False
+
+
+
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 3
+ 0
+ 1
+ 361
+ False
+ False
+ False
+ False
+ False
+ 1033
+ 1252
+
+
+ RemObjects Software
+
+ 3.0.1.361
+
+
+
+
+ RemObjects SDK
+ 1.0.0.0
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_BDEDriver_D10.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_BDEDriver_D10.cfg
new file mode 100644
index 0000000..9037d9d
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_BDEDriver_D10.cfg
@@ -0,0 +1,49 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N0"..\..\Dcu\D10"
+-LE"..\..\Dcu\D10"
+-LN"..\..\Dcu\D10"
+-U"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-O"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-I"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-R"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_BDEDriver_D10.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_BDEDriver_D10.dpk
new file mode 100644
index 0000000..de3b837
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_BDEDriver_D10.dpk
@@ -0,0 +1,39 @@
+package DataAbstract_BDEDriver_D10;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - BDE Driver'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ bdertl,
+ DataAbstract_Core_D10;
+
+contains
+ uDABDEDriver in 'uDABDEDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_BDEDriver_D10.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_BDEDriver_D10.res
new file mode 100644
index 0000000..204493b
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_BDEDriver_D10.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_BDEDriver_D11.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_BDEDriver_D11.dpk
new file mode 100644
index 0000000..073cecc
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_BDEDriver_D11.dpk
@@ -0,0 +1,39 @@
+package DataAbstract_BDEDriver_D11;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - BDE Driver'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ bdertl,
+ DataAbstract_Core_D11;
+
+contains
+ uDABDEDriver in 'uDABDEDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_BDEDriver_D11.dproj b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_BDEDriver_D11.dproj
new file mode 100644
index 0000000..2d9757f
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_BDEDriver_D11.dproj
@@ -0,0 +1,68 @@
+
+
+ {3cd4ddcd-76f8-4583-8117-c00562cb6a62}
+ DataAbstract_BDEDriver_D11.dpk
+ Debug
+ AnyCPU
+ DCC32
+ ..\..\Dcu\D11\DataAbstract_BDEDriver_D11.bpl
+
+
+ 7.0
+ False
+ False
+ 0
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ RELEASE
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ 7.0
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ Delphi.Personality
+ Package
+
+False True False RemObjects Data Abstract - BDE Driver False True False True False 3 0 1 361 False False False False False 1033 1252 RemObjects Software 3.0.1.361 RemObjects SDK 1.0.0.0 DataAbstract_BDEDriver_D11.dpk
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_BDEDriver_D11.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_BDEDriver_D11.res
new file mode 100644
index 0000000..204493b
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_BDEDriver_D11.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_BDEDriver_D6.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_BDEDriver_D6.cfg
new file mode 100644
index 0000000..c2c069b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_BDEDriver_D6.cfg
@@ -0,0 +1,41 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\..\Dcu\D6"
+-LE"..\..\Dcu\D6"
+-LN"..\..\Dcu\D6"
+-U"..\..\Dcu\D6;..\..\..\RemObjects SDK\Dcu\D6"
+-O"..\..\Dcu\D6;..\..\..\RemObjects SDK\Dcu\D6"
+-I"..\..\Dcu\D6;..\..\..\RemObjects SDK\Dcu\D6"
+-R"..\..\Dcu\D6;..\..\..\RemObjects SDK\Dcu\D6"
+-Z
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_BDEDriver_D6.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_BDEDriver_D6.dpk
new file mode 100644
index 0000000..aceb56d
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_BDEDriver_D6.dpk
@@ -0,0 +1,39 @@
+package DataAbstract_BDEDriver_D6;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - BDE Driver'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ DataAbstract_Core_D6,
+ bdertl;
+
+contains
+ uDABDEDriver in 'uDABDEDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_BDEDriver_D6.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_BDEDriver_D6.res
new file mode 100644
index 0000000..204493b
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_BDEDriver_D6.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_BDEDriver_D7.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_BDEDriver_D7.cfg
new file mode 100644
index 0000000..8e0bad7
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_BDEDriver_D7.cfg
@@ -0,0 +1,50 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\..\Dcu\D7"
+-LE"..\..\Dcu\D7"
+-LN"..\..\Dcu\D7"
+-U"..\..\Dcu\D7;..\..\..\RemObjects SDK\Dcu\D7"
+-O"..\..\Dcu\D7;..\..\..\RemObjects SDK\Dcu\D7"
+-I"..\..\Dcu\D7;..\..\..\RemObjects SDK\Dcu\D7"
+-R"..\..\Dcu\D7;..\..\..\RemObjects SDK\Dcu\D7"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_BDEDriver_D7.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_BDEDriver_D7.dpk
new file mode 100644
index 0000000..a5b4538
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_BDEDriver_D7.dpk
@@ -0,0 +1,39 @@
+package DataAbstract_BDEDriver_D7;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - BDE Driver'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ bdertl,
+ DataAbstract_Core_D7;
+
+contains
+ uDABDEDriver in 'uDABDEDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_BDEDriver_D7.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_BDEDriver_D7.res
new file mode 100644
index 0000000..204493b
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_BDEDriver_D7.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_BDEDriver_Glyphs.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_BDEDriver_Glyphs.res
new file mode 100644
index 0000000..a2a5a20
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_BDEDriver_Glyphs.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D10.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D10.bdsproj
new file mode 100644
index 0000000..096f1d8
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D10.bdsproj
@@ -0,0 +1,176 @@
+
+
+
+
+ Delphi.Personality
+
+ 1.0
+ {E4D07654-5C28-4ECD-A91D-BABEA25937FF}
+
+
+
+
+ DataAbstract_DBISAMDriver_D10.dpk
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+
+
+ False
+
+ False
+ False
+ False
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True True
+ True
+
+
+
+ 0
+ 0
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+ RemObjects Data Abstract - DBISAM Driver False
+
+
+
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1033
+ 1252
+
+
+ RemObjects Software
+
+ 1.0.0.0
+
+ RemObjects Software
+ RemObjects Software
+
+ RemObjects Data Abstract
+ 1.0.0.0
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D10.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D10.cfg
new file mode 100644
index 0000000..9037d9d
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D10.cfg
@@ -0,0 +1,49 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N0"..\..\Dcu\D10"
+-LE"..\..\Dcu\D10"
+-LN"..\..\Dcu\D10"
+-U"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-O"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-I"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-R"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D10.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D10.dpk
new file mode 100644
index 0000000..b21161d
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D10.dpk
@@ -0,0 +1,40 @@
+package DataAbstract_DBISAMDriver_D10;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - DBISAM Driver'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ vcldb,
+ RemObjects_Core_D10,
+ DataAbstract_Core_D10,
+ db324d9r;
+
+contains
+ uDADBISAMDriver in 'uDADBISAMDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D10.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D10.res
new file mode 100644
index 0000000..6ef0ba1
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D10.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D11.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D11.dpk
new file mode 100644
index 0000000..2ba6953
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D11.dpk
@@ -0,0 +1,40 @@
+package DataAbstract_DBISAMDriver_D11;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - DBISAM Driver'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ vcldb,
+ RemObjects_Core_D11,
+ DataAbstract_Core_D11,
+ db324d2007r;
+
+contains
+ uDADBISAMDriver in 'uDADBISAMDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D11.dproj b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D11.dproj
new file mode 100644
index 0000000..d09c0e0
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D11.dproj
@@ -0,0 +1,77 @@
+
+
+ {18f879f9-5865-46a9-8515-d3b4503d16ff}
+ DataAbstract_DBISAMDriver_D11.dpk
+ Debug
+ AnyCPU
+ DCC32
+ ..\..\Dcu\D11\DataAbstract_DBISAMDriver_D11.bpl
+
+
+ 7.0
+ False
+ False
+ 0
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ RELEASE
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ 7.0
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ Delphi.Personality
+ Package
+
+False True False RemObjects Data Abstract - DBISAM Driver False False False True False 1 0 0 0 False False False False False 1033 1252 RemObjects Software 1.0.0.0 RemObjects Software RemObjects Software RemObjects Data Abstract 1.0.0.0 DataAbstract_DBISAMDriver_D11.dpk
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D11.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D11.res
new file mode 100644
index 0000000..6ef0ba1
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D11.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D6.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D6.cfg
new file mode 100644
index 0000000..05f9ec3
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D6.cfg
@@ -0,0 +1,41 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\..\Dcu\D6"
+-LE"..\..\Dcu\D6"
+-LN"..\..\Dcu\D6"
+-U"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-O"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-I"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-R"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-Z
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D6.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D6.dof
new file mode 100644
index 0000000..1e36acf
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D6.dof
@@ -0,0 +1,77 @@
+[FileVersion]
+Version=6.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitDeprecated=0
+UnitLibrary=0
+UnitPlatform=0
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=Data Abstract - DBISAM Driver
+
+[Directories]
+OutputDir=
+UnitOutputDir=..\..\Dcu\D6
+PackageDLLOutputDir=..\..\Dcu\D6
+PackageDCPOutputDir=..\..\Dcu\D6
+SearchPath=..\..\Dcu\D6
+Packages=vcl;rtl;dbrtl;adortl;vcldb;vclx;bdertl;vcldbx;ibxpress;dsnap;cds;bdecds;visualclx;visualdbclx;dsnapcrba;dsnapcon;VclSmp;vclshlctrls;vclie;xmlrtl;inet;inetdbbde;inetdbxpress;inetdb;webdsnap;websnap;soaprtl;dbexpress;dbxcds;indy;tb2kComplete;CRControls60;dac60;dacvcl60;sdacvcl60;sdac60;oraprov60;odac60;odacvcl60;DataAbstract_Core_D6;DataAbstract_DBXDriver_D6;DataAbstract_DiskDriver_D6
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+Comments=
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D6.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D6.dpk
new file mode 100644
index 0000000..f1b37bf
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D6.dpk
@@ -0,0 +1,40 @@
+package DataAbstract_DBISAMDriver_D6;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - DBISAM Driver'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ vcldb,
+ RemObjects_Core_D6,
+ DataAbstract_Core_D6,
+ db324d6r;
+
+contains
+ uDADBISAMDriver in 'uDADBISAMDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D6.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D6.res
new file mode 100644
index 0000000..84eaa11
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D6.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D7.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D7.cfg
new file mode 100644
index 0000000..02179cd
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D7.cfg
@@ -0,0 +1,50 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\..\Dcu\D7"
+-LE"..\..\Dcu\D7"
+-LN"..\..\Dcu\D7"
+-U"..\..\Dcu\D7"
+-O"..\..\Dcu\D7"
+-I"..\..\Dcu\D7"
+-R"..\..\Dcu\D7"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D7.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D7.dof
new file mode 100644
index 0000000..2d15714
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D7.dof
@@ -0,0 +1,116 @@
+[FileVersion]
+Version=7.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=RemObjects Data Abstract - DBISAM Driver
+
+[Directories]
+OutputDir=
+UnitOutputDir=..\..\Dcu\D7
+PackageDLLOutputDir=..\..\Dcu\D7
+PackageDCPOutputDir=..\..\Dcu\D7
+SearchPath=..\..\Dcu\D7
+Packages=
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D7.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D7.dpk
new file mode 100644
index 0000000..6a2ee23
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D7.dpk
@@ -0,0 +1,40 @@
+package DataAbstract_DBISAMDriver_D7;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - DBISAM Driver'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ vcldb,
+ RemObjects_Core_D7,
+ DataAbstract_Core_D7,
+ db324d7r;
+
+contains
+ uDADBISAMDriver in 'uDADBISAMDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D7.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D7.res
new file mode 100644
index 0000000..84eaa11
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_D7.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_Glyphs.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_Glyphs.res
new file mode 100644
index 0000000..3163762
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBISAMDriver_Glyphs.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D10.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D10.bdsproj
new file mode 100644
index 0000000..214c011
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D10.bdsproj
@@ -0,0 +1,176 @@
+
+
+
+
+ Delphi.Personality
+
+ 1.0
+ {C227C50C-E7AA-4212-8D32-C33B5BFE5BB8}
+
+
+
+
+ DataAbstract_DBXDriver_D10.dpk
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ True
+ True
+
+
+ False
+
+ False
+ False
+ False
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True True
+ True
+
+
+
+ 0
+ 0
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+ RemObjects Data Abstract - dbExpress Driver False
+
+
+
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 3
+ 0
+ 1
+ 361
+ False
+ False
+ False
+ False
+ False
+ 1033
+ 1252
+
+
+ RemObjects Software
+
+ 3.0.1.361
+
+
+
+
+ RemObjects SDK
+ 1.0.0.0
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D10.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D10.cfg
new file mode 100644
index 0000000..207b254
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D10.cfg
@@ -0,0 +1,49 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U+
+-$V+
+-$W+
+-$X+
+-$YD
+-$Z1
+-cg
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N0"..\..\Dcu\D10"
+-LE"..\..\Dcu\D10"
+-LN"..\..\Dcu\D10"
+-U"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-O"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-I"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-R"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D10.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D10.dpk
new file mode 100644
index 0000000..ce917fe
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D10.dpk
@@ -0,0 +1,38 @@
+package DataAbstract_DBXDriver_D10;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE ON}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - dbExpress Driver'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ dbexpress,
+ DataAbstract_Core_D10;
+
+contains
+ uDADBXDriver in 'uDADBXDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D10.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D10.res
new file mode 100644
index 0000000..204493b
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D10.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D11.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D11.dpk
new file mode 100644
index 0000000..d3298fa
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D11.dpk
@@ -0,0 +1,38 @@
+package DataAbstract_DBXDriver_D11;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE ON}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - dbExpress Driver'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ dbexpress,
+ DataAbstract_Core_D11;
+
+contains
+ uDADBXDriver in 'uDADBXDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D11.dproj b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D11.dproj
new file mode 100644
index 0000000..071e5f3
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D11.dproj
@@ -0,0 +1,72 @@
+
+
+ {f8cd0c64-f9cd-46d4-8a1b-03d6a3efbdb3}
+ DataAbstract_DBXDriver_D11.dpk
+ Debug
+ AnyCPU
+ DCC32
+ ..\..\Dcu\D11\DataAbstract_DBXDriver_D11.bpl
+
+
+ 7.0
+ False
+ False
+ True
+ True
+ 0
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ RELEASE
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ 7.0
+ True
+ True
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ Delphi.Personality
+ Package
+
+False True False RemObjects Data Abstract - dbExpress Driver False False False True False 3 0 1 361 False False False False False 1033 1252 RemObjects Software 3.0.1.361 RemObjects SDK 1.0.0.0 DataAbstract_DBXDriver_D11.dpk
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D11.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D11.res
new file mode 100644
index 0000000..204493b
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D11.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D6.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D6.cfg
new file mode 100644
index 0000000..0aa2cb6
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D6.cfg
@@ -0,0 +1,41 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U+
+-$V+
+-$W+
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\..\Dcu\D6"
+-LE"..\..\Dcu\D6"
+-LN"..\..\Dcu\D6"
+-U"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-O"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-I"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-R"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-Z
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D6.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D6.dof
new file mode 100644
index 0000000..d2de85f
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D6.dof
@@ -0,0 +1,76 @@
+[FileVersion]
+Version=6.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=1
+V=1
+W=1
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitDeprecated=0
+UnitLibrary=0
+UnitPlatform=0
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=Data Abstract - dbExpress Driver
+
+[Directories]
+OutputDir=
+UnitOutputDir=..\..\Dcu\D6
+PackageDLLOutputDir=..\..\Dcu\D6
+PackageDCPOutputDir=..\..\Dcu\D6
+SearchPath=..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6
+Packages=
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+FileDescription=
+FileVersion=2.0.0.138
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=RemObjects SDK
+ProductVersion=1.0.0.0
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D6.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D6.dpk
new file mode 100644
index 0000000..d9265ff
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D6.dpk
@@ -0,0 +1,39 @@
+package DataAbstract_DBXDriver_D6;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE ON}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - dbExpress Driver'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ dbexpress,
+ RemObjects_Core_D6,
+ DataAbstract_Core_D6;
+
+contains
+ uDADBXDriver in 'uDADBXDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D6.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D6.res
new file mode 100644
index 0000000..204493b
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D6.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D7.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D7.cfg
new file mode 100644
index 0000000..a290ad9
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D7.cfg
@@ -0,0 +1,50 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U+
+-$V+
+-$W+
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\..\Dcu\D7"
+-LE"..\..\Dcu\D7"
+-LN"..\..\Dcu\D7"
+-U"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-O"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-I"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-R"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D7.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D7.dof
new file mode 100644
index 0000000..7f90f99
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D7.dof
@@ -0,0 +1,116 @@
+[FileVersion]
+Version=7.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=1
+V=1
+W=1
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=Data Abstract - dbExpress Driver
+
+[Directories]
+OutputDir=
+UnitOutputDir=..\..\Dcu\D7
+PackageDLLOutputDir=..\..\Dcu\D7
+PackageDCPOutputDir=..\..\Dcu\D7
+SearchPath=..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7
+Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;dclOfficeXP;RemObjects_DataSnap_D7;PurposesoftD7;addict3_d6;tb2kComplete_70;CDKDesignTimeSupport;CDKSmp;CDK;ES_CodeSite20;ESDelphiCommandCompiler;ESFileSearch;ESVisualCompositeExpert;EaglWk;ESGraphUtils;ESBase;ESVsCp;ESSampleComposites70;ESSampleCompositeEditors7;Rz252N70;SynEdit_D7;dxsbD7;dxComnD7;dxDockingD7;dxEdtrD7;dxELibD7;dxExELD7;EQGridD7;dxExRwD7;dxDBEdD7;dxInsD7;dxGrEdD7;ECQDBCD7;EQTLD7;EQDBTLD7;dxLayoutControlD7;dxMasterViewD7;dxmdsd7;dxNavBarD7;dxObjInsD7;dxPageControlD7;dxPSCoreD7;Rz252D70;cxPageControlVCLD7;cxEditorsVCLD7;dxThemeD7;cxLibraryVCLD7;cxDataD7;cxGridUtilsVCLD7;cxGridVCLD7;RemObjects_BPDX_D7
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+FileDescription=
+FileVersion=2.0.0.142
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=RemObjects SDK
+ProductVersion=1.0.0.0
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D7.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D7.dpk
new file mode 100644
index 0000000..a20bd62
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D7.dpk
@@ -0,0 +1,39 @@
+package DataAbstract_DBXDriver_D7;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE ON}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - dbExpress Driver'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ dbexpress,
+ RemObjects_Core_D7,
+ DataAbstract_Core_D7;
+
+contains
+ uDADBXDriver in 'uDADBXDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D7.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D7.res
new file mode 100644
index 0000000..204493b
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_D7.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_Glyphs.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_Glyphs.res
new file mode 100644
index 0000000..3ac39af
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_DBXDriver_Glyphs.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_Drivers_D6.bpg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_Drivers_D6.bpg
new file mode 100644
index 0000000..4e931fa
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_Drivers_D6.bpg
@@ -0,0 +1,61 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = DataAbstract_ADODriver_D7.bpl DataAbstract_DBXDriver_D7.bpl \
+ DataAbstract_IBXDriver_D7.bpl DataAbstract_DiskDriver_D7.bpl DAADODrv.dad \
+ DADBXDrv.dad DADiskDrv.dad DAIBXDrv.dad DataAbstract_IBODriver_D7.bpl \
+ DataAbstract_SDACDriver_D7.bpl DataAbstract_ODACDriver_D7.bpl DAIBODrv.dad \
+ DASDACDrv.dad
+DataAbstract_SDACDriver_D6.bpl DataAbstract_ODACDriver_D6.bpl
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+DataAbstract_DiskDriver_D7.bpl: DataAbstract_DiskDriver_D7.dpk
+ $(DCC)
+
+DataAbstract_DBXDriver_D7.bpl: DataAbstract_DBXDriver_D7.dpk
+ $(DCC)
+
+DAADODrv.dad: DAADODrv.dpr
+ $(DCC)
+
+DADBXDrv.dad: DADBXDrv.dpr
+ $(DCC)
+
+DADiskDrv.dad: DADiskDrv.dpr
+ $(DCC)
+
+DAIBXDrv.dad: DAIBXDrv.dpr
+ $(DCC)
+
+DAIBODrv.dad: DAIBODrv.dpr
+ $(DCC)
+
+DASDACDrv.dad: DASDACDrv.dpr
+ $(DCC)
+
+DataAbstract_SDACDriver_D7.bpl: DataAbstract_SDACDriver_D7.dpk
+ $(DCC)
+
+DataAbstract_ODACDriver_D7.bpl: DataAbstract_ODACDriver_D7.dpk
+ $(DCC)
+
+DataAbstract_ADODriver_D7.bpl: DataAbstract_ADODriver_D7.dpk
+ $(DCC)
+
+DataAbstract_IBXDriver_D7.bpl: DataAbstract_IBXDriver_D7.dpk
+ $(DCC)
+
+DataAbstract_IBODriver_D7.bpl: DataAbstract_IBODriver_D7.dpk
+ $(DCC)
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D10.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D10.bdsproj
new file mode 100644
index 0000000..47a24e4
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D10.bdsproj
@@ -0,0 +1,176 @@
+
+
+
+
+ Delphi.Personality
+
+ 1.0
+ {D0E1436D-9AA9-4616-943B-851DF450E715}
+
+
+
+
+ DataAbstract_ElevateDBDriver_D10.dpk
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+
+
+ False
+
+ False
+ False
+ False
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True True
+ True
+
+
+
+ 0
+ 0
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+ RemObjects Data Abstract - Elevate DB Driver False
+
+
+
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 3
+ 0
+ 1
+ 361
+ False
+ False
+ False
+ False
+ False
+ 1033
+ 1252
+
+
+ RemObjects Software
+
+ 3.0.1.361
+
+
+
+
+ RemObjects SDK
+ 1.0.0.0
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D10.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D10.cfg
new file mode 100644
index 0000000..9037d9d
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D10.cfg
@@ -0,0 +1,49 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N0"..\..\Dcu\D10"
+-LE"..\..\Dcu\D10"
+-LN"..\..\Dcu\D10"
+-U"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-O"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-I"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-R"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D10.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D10.dpk
new file mode 100644
index 0000000..b6773b6
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D10.dpk
@@ -0,0 +1,39 @@
+package DataAbstract_ElevateDBDriver_D10;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - ElevateDB Driver'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ DataAbstract_Core_D10,
+ edb105d10run;
+
+contains
+ uDAElevateDBDriver in 'uDAElevateDBDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D10.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D10.res
new file mode 100644
index 0000000..7b3c163
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D10.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D11.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D11.dpk
new file mode 100644
index 0000000..bd44fbd
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D11.dpk
@@ -0,0 +1,39 @@
+package DataAbstract_ElevateDBDriver_D11;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - ElevateDB Driver'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ DataAbstract_Core_D11,
+ edb105D2007run;
+
+contains
+ uDAElevateDBDriver in 'uDAElevateDBDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D11.dproj b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D11.dproj
new file mode 100644
index 0000000..d04db30
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D11.dproj
@@ -0,0 +1,73 @@
+
+
+ {c31471d9-f8e2-4e45-94a7-1264d8011587}
+ DataAbstract_ElevateDBDriver_D11.dpk
+ Debug
+ AnyCPU
+ DCC32
+ ..\..\Dcu\D11\DataAbstract_ElevateDBDriver_D11.bpl
+
+
+ 7.0
+ False
+ False
+ 0
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ RELEASE
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ 7.0
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ Delphi.Personality
+ Package
+
+False True False RemObjects Data Abstract - ElevateDB Driver False True False True False 3 0 1 361 False False False False False 1033 1252 RemObjects Software 3.0.1.361 RemObjects SDK 1.0.0.0 DataAbstract_ElevateDBDriver_D11.dpk
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D11.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D11.res
new file mode 100644
index 0000000..7b3c163
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D11.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D6.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D6.cfg
new file mode 100644
index 0000000..c2c069b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D6.cfg
@@ -0,0 +1,41 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\..\Dcu\D6"
+-LE"..\..\Dcu\D6"
+-LN"..\..\Dcu\D6"
+-U"..\..\Dcu\D6;..\..\..\RemObjects SDK\Dcu\D6"
+-O"..\..\Dcu\D6;..\..\..\RemObjects SDK\Dcu\D6"
+-I"..\..\Dcu\D6;..\..\..\RemObjects SDK\Dcu\D6"
+-R"..\..\Dcu\D6;..\..\..\RemObjects SDK\Dcu\D6"
+-Z
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D6.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D6.dof
new file mode 100644
index 0000000..0c3ea83
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D6.dof
@@ -0,0 +1,76 @@
+[FileVersion]
+Version=6.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitDeprecated=0
+UnitLibrary=0
+UnitPlatform=0
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=RemObjects Data Abstract - ElevateDB Driver
+
+[Directories]
+OutputDir=
+UnitOutputDir=..\..\Dcu\D6
+PackageDLLOutputDir=..\..\Dcu\D6
+PackageDCPOutputDir=..\..\Dcu\D6
+SearchPath=..\..\Dcu\D6;..\..\..\RemObjects SDK\Dcu\D6
+Packages=
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+FileDescription=
+FileVersion=2.0.0.138
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=RemObjects SDK
+ProductVersion=1.0.0.0
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D6.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D6.dpk
new file mode 100644
index 0000000..5e5f141
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D6.dpk
@@ -0,0 +1,39 @@
+package DataAbstract_ElevateDBDriver_D6;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - ElevateDB Driver'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ DataAbstract_Core_D6,
+ edb105d6run;
+
+contains
+ uDAElevateDBDriver in 'uDAElevateDBDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D6.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D6.res
new file mode 100644
index 0000000..f5602d3
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D6.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D7.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D7.cfg
new file mode 100644
index 0000000..6784156
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D7.cfg
@@ -0,0 +1,50 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\..\Dcu\D7"
+-LE"..\..\Dcu\D7"
+-LN"..\..\Dcu\D7"
+-U"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-O"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-I"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-R"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D7.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D7.dof
new file mode 100644
index 0000000..9e696f5
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D7.dof
@@ -0,0 +1,116 @@
+[FileVersion]
+Version=7.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=RemObjects Data Abstract - ElevateDB Driver
+
+[Directories]
+OutputDir=
+UnitOutputDir=..\..\Dcu\D7
+PackageDLLOutputDir=..\..\Dcu\D7
+PackageDCPOutputDir=..\..\Dcu\D7
+SearchPath=..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7
+Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;EDBpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;dclOfficeXP;RemObjects_DataSnap_D7;PurposesoftD7;addict3_d6;tb2kComplete_70;CDKDesignTimeSupport;CDKSmp;CDK;ES_CodeSite20;ESDelphiCommandCompiler;ESFileSearch;ESVisualCompositeExpert;EaglWk;ESGraphUtils;ESBase;ESVsCp;ESSampleComposites70;ESSampleCompositeEditors7;Rz252N70;SynEdit_D7;dxsbD7;dxComnD7;dxDockingD7;dxEdtrD7;dxELibD7;dxExELD7;EQGridD7;dxExRwD7;dxDBEdD7;dxInsD7;dxGrEdD7;ECQDBCD7;EQTLD7;EQDBTLD7;dxLayoutControlD7;dxMasterViewD7;dxmdsd7;dxNavBarD7;dxObjInsD7;dxPageControlD7;dxPSCoreD7;Rz252D70;cxPageControlVCLD7;cxEditorsVCLD7;dxThemeD7;cxLibraryVCLD7;cxDataD7;cxGridUtilsVCLD7;cxGridVCLD7;RemObjects_BPDX_D7
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+FileDescription=
+FileVersion=2.0.0.142
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=RemObjects SDK
+ProductVersion=1.0.0.0
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D7.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D7.dpk
new file mode 100644
index 0000000..c2f5f25
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D7.dpk
@@ -0,0 +1,39 @@
+package DataAbstract_ElevateDBDriver_D7;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - ElevateDB Driver'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ DataAbstract_Core_D7,
+ edb105d7run;
+
+contains
+ uDAElevateDBDriver in 'uDAElevateDBDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D7.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D7.res
new file mode 100644
index 0000000..77a3fad
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_D7.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_Glyphs.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_Glyphs.res
new file mode 100644
index 0000000..9e2c761
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ElevateDBDriver_Glyphs.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D10.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D10.bdsproj
new file mode 100644
index 0000000..239dc3d
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D10.bdsproj
@@ -0,0 +1,176 @@
+
+
+
+
+ Delphi.Personality
+
+ 1.0
+ {0FC45B58-F519-40B6-831A-DD79C8D3270F}
+
+
+
+
+ DataAbstract_FIBDriver_D10.dpk
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+
+
+ False
+
+ False
+ False
+ False
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True True
+ True
+
+
+
+ 0
+ 0
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+ RemObjects Data Abstract - FIBPlus Driver False
+
+
+
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 3
+ 0
+ 1
+ 361
+ False
+ False
+ False
+ False
+ False
+ 1033
+ 1252
+
+
+ RemObjects Software
+
+ 3.0.1.361
+
+
+
+
+ RemObjects SDK
+ 1.0.0.0
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D10.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D10.cfg
new file mode 100644
index 0000000..9037d9d
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D10.cfg
@@ -0,0 +1,49 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N0"..\..\Dcu\D10"
+-LE"..\..\Dcu\D10"
+-LN"..\..\Dcu\D10"
+-U"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-O"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-I"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-R"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D10.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D10.dpk
new file mode 100644
index 0000000..6b4fd10
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D10.dpk
@@ -0,0 +1,39 @@
+package DataAbstract_FIBDriver_D10;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - FIBPlus Driver'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ DataAbstract_Core_D10,
+ FIBPlus2006;
+
+contains
+ uDAFIBDriver in 'uDAFIBDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D10.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D10.res
new file mode 100644
index 0000000..7b3c163
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D10.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D11.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D11.dpk
new file mode 100644
index 0000000..d35cd4a
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D11.dpk
@@ -0,0 +1,39 @@
+package DataAbstract_FIBDriver_D11;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - FIBPlus Driver'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ DataAbstract_Core_D11,
+ FIBPlus2007;
+
+contains
+ uDAFIBDriver in 'uDAFIBDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D11.dproj b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D11.dproj
new file mode 100644
index 0000000..f73572b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D11.dproj
@@ -0,0 +1,68 @@
+
+
+ {4aa60252-6f77-44b7-a171-e158f29374ca}
+ DataAbstract_FIBDriver_D11.dpk
+ Debug
+ AnyCPU
+ DCC32
+ ..\..\Dcu\D11\DataAbstract_FIBDriver_D11.bpl
+
+
+ 7.0
+ False
+ False
+ 0
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ RELEASE
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ 7.0
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ Delphi.Personality
+ Package
+
+False True False RemObjects Data Abstract - FIBPlus Driver False True False True False 3 0 1 361 False False False False False 1033 1252 RemObjects Software 3.0.1.361 RemObjects SDK 1.0.0.0 DataAbstract_FIBDriver_D11.dpk
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D11.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D11.res
new file mode 100644
index 0000000..7b3c163
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D11.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D6.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D6.cfg
new file mode 100644
index 0000000..05f9ec3
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D6.cfg
@@ -0,0 +1,41 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\..\Dcu\D6"
+-LE"..\..\Dcu\D6"
+-LN"..\..\Dcu\D6"
+-U"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-O"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-I"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-R"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-Z
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D6.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D6.dof
new file mode 100644
index 0000000..c96c6c8
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D6.dof
@@ -0,0 +1,76 @@
+[FileVersion]
+Version=6.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitDeprecated=0
+UnitLibrary=0
+UnitPlatform=0
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=RemObjects Data Abstract - FIBPlus Driver
+
+[Directories]
+OutputDir=
+UnitOutputDir=..\..\Dcu\D6
+PackageDLLOutputDir=..\..\Dcu\D6
+PackageDCPOutputDir=..\..\Dcu\D6
+SearchPath=..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6
+Packages=
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+FileDescription=
+FileVersion=3.0.0.289
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=RemObjects SDK
+ProductVersion=1.0.0.0
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D6.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D6.dpk
new file mode 100644
index 0000000..0447c56
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D6.dpk
@@ -0,0 +1,39 @@
+package DataAbstract_FIBDriver_D6;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - FIBPlus Driver'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ DataAbstract_Core_D6,
+ FIBPlus6;
+
+contains
+ uDAFIBDriver in 'uDAFIBDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D6.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D6.res
new file mode 100644
index 0000000..f5602d3
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D6.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D7.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D7.cfg
new file mode 100644
index 0000000..6784156
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D7.cfg
@@ -0,0 +1,50 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\..\Dcu\D7"
+-LE"..\..\Dcu\D7"
+-LN"..\..\Dcu\D7"
+-U"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-O"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-I"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-R"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D7.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D7.dof
new file mode 100644
index 0000000..ccdfd7b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D7.dof
@@ -0,0 +1,116 @@
+[FileVersion]
+Version=7.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=Data Abstract - FIBPlus Driver
+
+[Directories]
+OutputDir=
+UnitOutputDir=..\..\Dcu\D7
+PackageDLLOutputDir=..\..\Dcu\D7
+PackageDCPOutputDir=..\..\Dcu\D7
+SearchPath=..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7
+Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;dclOfficeXP;RemObjects_DataSnap_D7;PurposesoftD7;addict3_d6;tb2kComplete_70;CDKDesignTimeSupport;CDKSmp;CDK;ES_CodeSite20;ESDelphiCommandCompiler;ESFileSearch;ESVisualCompositeExpert;EaglWk;ESGraphUtils;ESBase;ESVsCp;ESSampleComposites70;ESSampleCompositeEditors7;Rz252N70;SynEdit_D7;dxsbD7;dxComnD7;dxDockingD7;dxEdtrD7;dxELibD7;dxExELD7;EQGridD7;dxExRwD7;dxDBEdD7;dxInsD7;dxGrEdD7;ECQDBCD7;EQTLD7;EQDBTLD7;dxLayoutControlD7;dxMasterViewD7;dxmdsd7;dxNavBarD7;dxObjInsD7;dxPageControlD7;dxPSCoreD7;Rz252D70;cxPageControlVCLD7;cxEditorsVCLD7;dxThemeD7;cxLibraryVCLD7;cxDataD7;cxGridUtilsVCLD7;cxGridVCLD7;RemObjects_BPDX_D7
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+FileDescription=
+FileVersion=2.0.0.142
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=RemObjects SDK
+ProductVersion=1.0.0.0
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D7.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D7.dpk
new file mode 100644
index 0000000..8ecc150
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D7.dpk
@@ -0,0 +1,39 @@
+package DataAbstract_FIBDriver_D7;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - FIBPlus Driver'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ DataAbstract_Core_D7,
+ FIBPlus7;
+
+contains
+ uDAFIBDriver in 'uDAFIBDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D7.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D7.res
new file mode 100644
index 0000000..892aed8
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_D7.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_Glyphs.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_Glyphs.res
new file mode 100644
index 0000000..d0e3d08
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_FIBDriver_Glyphs.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D10.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D10.bdsproj
new file mode 100644
index 0000000..8d350cb
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D10.bdsproj
@@ -0,0 +1,179 @@
+
+
+
+
+ Delphi.Personality
+
+ 1.0
+ {89ABBDEB-A4DB-4045-AE76-0CE8A7CB792A}
+
+
+
+
+ DataAbstract_IBDACDriver_D10.dpk
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ True
+ True
+
+
+ False
+
+ False
+ False
+ False
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+ RemObjects Data Abstract - CoreLabs IBDAC Driver
+ False
+
+
+
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1033
+ 1252
+
+
+ RemObjects Software
+
+ 1.0.0.0
+
+ RemObjects Software
+ RemObjects Software
+
+ RemObjects Data Abstract
+ 1.0.0.0
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D10.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D10.cfg
new file mode 100644
index 0000000..207b254
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D10.cfg
@@ -0,0 +1,49 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U+
+-$V+
+-$W+
+-$X+
+-$YD
+-$Z1
+-cg
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N0"..\..\Dcu\D10"
+-LE"..\..\Dcu\D10"
+-LN"..\..\Dcu\D10"
+-U"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-O"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-I"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-R"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D10.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D10.dpk
new file mode 100644
index 0000000..032d677
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D10.dpk
@@ -0,0 +1,38 @@
+package DataAbstract_MyDACDriver_D10;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE ON}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - CoreLabs IBDAC Driver'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ IBdac100,
+ RemObjects_Core_D10,
+ DataAbstract_Core_D10;
+
+contains
+ uDAIBDACDriver in 'uDAIBDACDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D10.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D10.res
new file mode 100644
index 0000000..6ef0ba1
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D10.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D11.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D11.dpk
new file mode 100644
index 0000000..6cd7bb8
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D11.dpk
@@ -0,0 +1,38 @@
+package DataAbstract_IBDACDriver_D11;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE ON}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - CoreLabs IBDAC Driver'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ IBdac105,
+ RemObjects_Core_D11,
+ DataAbstract_Core_D11;
+
+contains
+ uDAIBDACDriver in 'uDAIBDACDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D11.dproj b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D11.dproj
new file mode 100644
index 0000000..bfcbf1a
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D11.dproj
@@ -0,0 +1,73 @@
+
+
+ {0d0e2131-7a05-4241-9ca1-f98aea2eb9d9}
+ DataAbstract_IBDACDriver_D11.dpk
+ Debug
+ AnyCPU
+ DCC32
+ ..\..\Dcu\D11\DataAbstract_IBDACDriver_D11.bpl
+
+
+ 7.0
+ False
+ False
+ True
+ True
+ 0
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ RELEASE
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ 7.0
+ True
+ True
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ Delphi.Personality
+ Package
+
+False True False RemObjects Data Abstract - CoreLabs IBDAC Driver False False False True False 1 0 0 0 False False False False False 1033 1252 RemObjects Software 1.0.0.0 RemObjects Software RemObjects Software RemObjects Data Abstract 1.0.0.0 DataAbstract_IBDACDriver_D11.dpk
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D11.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D11.res
new file mode 100644
index 0000000..6ef0ba1
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D11.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D6.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D6.cfg
new file mode 100644
index 0000000..51b688e
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D6.cfg
@@ -0,0 +1,41 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U+
+-$V+
+-$W+
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\..\Dcu\D6"
+-LE"..\..\Dcu\D6"
+-LN"..\..\Dcu\D6"
+-U"..\..\Dcu\D6"
+-O"..\..\Dcu\D6"
+-I"..\..\Dcu\D6"
+-R"..\..\Dcu\D6"
+-Z
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D6.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D6.dof
new file mode 100644
index 0000000..0cbf2a3
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D6.dof
@@ -0,0 +1,76 @@
+[FileVersion]
+Version=6.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=1
+V=1
+W=1
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitDeprecated=0
+UnitLibrary=0
+UnitPlatform=0
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=RemObjects Data Abstract - CoreLabs IBDAC Driver
+
+[Directories]
+OutputDir=
+UnitOutputDir=..\..\Dcu\D6
+PackageDLLOutputDir=..\..\Dcu\D6
+PackageDCPOutputDir=..\..\Dcu\D6
+SearchPath=..\..\Dcu\D6
+Packages=
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D6.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D6.dpk
new file mode 100644
index 0000000..6975ec3
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D6.dpk
@@ -0,0 +1,38 @@
+package DataAbstract_IBDACDriver_D6;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE ON}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - CoreLabs IBDAC Driver'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ ibdac60,
+ RemObjects_Core_D6,
+ DataAbstract_Core_D6;
+
+contains
+ uDAIBDACDriver in 'uDAIBDACDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D6.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D6.res
new file mode 100644
index 0000000..371f8db
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D6.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D7.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D7.cfg
new file mode 100644
index 0000000..4c8862b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D7.cfg
@@ -0,0 +1,50 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U+
+-$V+
+-$W+
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\..\Dcu\D7"
+-LE"..\..\Dcu\D7"
+-LN"..\..\Dcu\D7"
+-U"..\..\Dcu\D7"
+-O"..\..\Dcu\D7"
+-I"..\..\Dcu\D7"
+-R"..\..\Dcu\D7"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D7.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D7.dof
new file mode 100644
index 0000000..f69663d
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D7.dof
@@ -0,0 +1,116 @@
+[FileVersion]
+Version=7.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=1
+V=1
+W=1
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=RemObjects Data Abstract - CoreLabs IBDAC Driver
+
+[Directories]
+OutputDir=
+UnitOutputDir=..\..\Dcu\D7
+PackageDLLOutputDir=..\..\Dcu\D7
+PackageDCPOutputDir=..\..\Dcu\D7
+SearchPath=..\..\Dcu\D7
+Packages=
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D7.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D7.dpk
new file mode 100644
index 0000000..3fd2f36
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D7.dpk
@@ -0,0 +1,38 @@
+package DataAbstract_MyDACDriver_D7;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE ON}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - CoreLabs IBDAC Driver'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ ibdac70,
+ RemObjects_Core_D7,
+ DataAbstract_Core_D7;
+
+contains
+ uDAIBDACDriver in 'uDAIBDACDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D7.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D7.res
new file mode 100644
index 0000000..371f8db
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_D7.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_Glyphs.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_Glyphs.res
new file mode 100644
index 0000000..3497984
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBDACDriver_Glyphs.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D10.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D10.bdsproj
new file mode 100644
index 0000000..00d9b79
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D10.bdsproj
@@ -0,0 +1,176 @@
+
+
+
+
+ Delphi.Personality
+
+ 1.0
+ {EECA635C-0BB1-414E-B43A-42F8C5D07E64}
+
+
+
+
+ DataAbstract_IBODriver_D10.dpk
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+
+
+ False
+
+ False
+ False
+ False
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True True
+ True
+
+
+
+ 0
+ 0
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+ RemObjects Data Abstract - InterBase Objects Driver False
+
+
+
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1033
+ 1252
+
+
+ RemObjects Software
+
+ 1.0.0.0
+
+ RemObjects Software
+ RemObjects Software
+
+ RemObjects Data Abstract
+ 1.0.0.0
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D10.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D10.cfg
new file mode 100644
index 0000000..9037d9d
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D10.cfg
@@ -0,0 +1,49 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N0"..\..\Dcu\D10"
+-LE"..\..\Dcu\D10"
+-LN"..\..\Dcu\D10"
+-U"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-O"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-I"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-R"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D10.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D10.dpk
new file mode 100644
index 0000000..ef0bb3f
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D10.dpk
@@ -0,0 +1,40 @@
+package DataAbstract_IBODriver_D10;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - InterBase Objects Driver'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ DataAbstract_Core_D10,
+ IBO40TRT_D10,
+ IBO40XRT_D10;
+
+contains
+ uDAIBODriver in 'uDAIBODriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D10.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D10.res
new file mode 100644
index 0000000..6ef0ba1
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D10.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D11.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D11.dpk
new file mode 100644
index 0000000..d20f478
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D11.dpk
@@ -0,0 +1,40 @@
+package DataAbstract_IBODriver_D11;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - InterBase Objects Driver'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ DataAbstract_Core_D11,
+ IBO40TRT_D2007,
+ IBO40XRT_D2007;
+
+contains
+ uDAIBODriver in 'uDAIBODriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D11.dproj b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D11.dproj
new file mode 100644
index 0000000..15f3a0b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D11.dproj
@@ -0,0 +1,70 @@
+
+
+
+ {8dcafd0d-ab98-4b7e-8b86-36dbc593e504}
+ DataAbstract_IBODriver_D11.dpk
+ Debug
+ AnyCPU
+ DCC32
+ ..\..\Dcu\D11\DataAbstract_IBODriver_D11.bpl
+
+
+ 7.0
+ False
+ False
+ 0
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ RELEASE
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ 7.0
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ Delphi.Personality
+ Package
+
+False True False RemObjects Data Abstract - InterBase Objects Driver False True False True False 1 0 0 0 False False False False False 1033 1252 RemObjects Software 1.0.0.0 RemObjects Software RemObjects Software RemObjects Data Abstract 1.0.0.0 DataAbstract_IBODriver_D11.dpk
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D11.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D11.res
new file mode 100644
index 0000000..6ef0ba1
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D11.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D6.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D6.cfg
new file mode 100644
index 0000000..05f9ec3
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D6.cfg
@@ -0,0 +1,41 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\..\Dcu\D6"
+-LE"..\..\Dcu\D6"
+-LN"..\..\Dcu\D6"
+-U"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-O"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-I"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-R"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-Z
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D6.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D6.dof
new file mode 100644
index 0000000..533614b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D6.dof
@@ -0,0 +1,77 @@
+[FileVersion]
+Version=6.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitDeprecated=0
+UnitLibrary=0
+UnitPlatform=0
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=Data Abstract - InterBase Objects Driver
+
+[Directories]
+OutputDir=
+UnitOutputDir=..\..\Dcu\D6
+PackageDLLOutputDir=..\..\Dcu\D6
+PackageDCPOutputDir=..\..\Dcu\D6
+SearchPath=..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6
+Packages=
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software, Inc.
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=RemObjects Software, Inc.
+LegalTrademarks=RemObjects Software, Inc.
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+Comments=http://www.remobjects.com
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D6.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D6.dpk
new file mode 100644
index 0000000..1238d53
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D6.dpk
@@ -0,0 +1,40 @@
+package DataAbstract_IBODriver_D6;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - InterBase Objects Driver'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ DataAbstract_Core_D6,
+ IBO40TRT_D6,
+ IBO40XRT_D6;
+
+contains
+ uDAIBODriver in 'uDAIBODriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D6.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D6.res
new file mode 100644
index 0000000..b26b84e
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D6.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D7.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D7.cfg
new file mode 100644
index 0000000..6784156
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D7.cfg
@@ -0,0 +1,50 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\..\Dcu\D7"
+-LE"..\..\Dcu\D7"
+-LN"..\..\Dcu\D7"
+-U"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-O"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-I"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-R"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D7.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D7.dof
new file mode 100644
index 0000000..b8f8fb1
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D7.dof
@@ -0,0 +1,117 @@
+[FileVersion]
+Version=7.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=RemObjects Data Abstract - InterBase Objects Driver
+
+[Directories]
+OutputDir=
+UnitOutputDir=..\..\Dcu\D7
+PackageDLLOutputDir=..\..\Dcu\D7
+PackageDCPOutputDir=..\..\Dcu\D7
+SearchPath=..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7
+Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;dclOfficeXP;RemObjects_DataSnap_D7;PurposesoftD7;addict3_d6;tb2kComplete_70;CDKDesignTimeSupport;CDKSmp;CDK;ES_CodeSite20;ESDelphiCommandCompiler;ESFileSearch;ESVisualCompositeExpert;EaglWk;ESGraphUtils;ESBase;ESVsCp;ESSampleComposites70;ESSampleCompositeEditors7;Rz252N70;SynEdit_D7;dxsbD7;dxComnD7;dxDockingD7;dxEdtrD7;dxELibD7;dxExELD7;EQGridD7;dxExRwD7;dxDBEdD7;dxInsD7;dxGrEdD7;ECQDBCD7;EQTLD7;EQDBTLD7;dxLayoutControlD7;dxMasterViewD7;dxmdsd7;dxNavBarD7;dxObjInsD7;dxPageControlD7;dxPSCoreD7;Rz252D70;cxPageControlVCLD7;cxEditorsVCLD7;dxThemeD7;cxLibraryVCLD7;cxDataD7;cxGridUtilsVCLD7;cxGridVCLD7;RemObjects_BPDX_D7
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software, Inc.
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=RemObjects Software, Inc.
+LegalTrademarks=RemObjects Software, Inc.
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+Comments=http://www.remobjects.com
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D7.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D7.dpk
new file mode 100644
index 0000000..d4562dc
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D7.dpk
@@ -0,0 +1,40 @@
+package DataAbstract_IBODriver_D7;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - InterBase Objects Driver'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ DataAbstract_Core_D7,
+ IBO40TRT_D7,
+ IBO40XRT_D7;
+
+contains
+ uDAIBODriver in 'uDAIBODriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D7.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D7.res
new file mode 100644
index 0000000..b26b84e
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_D7.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_Glyphs.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_Glyphs.res
new file mode 100644
index 0000000..e4c8f7b
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBODriver_Glyphs.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D10.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D10.bdsproj
new file mode 100644
index 0000000..ba3a5e6
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D10.bdsproj
@@ -0,0 +1,176 @@
+
+
+
+
+ Delphi.Personality
+
+ 1.0
+ {D0E1436D-9AA9-4616-943B-851DF450E715}
+
+
+
+
+ DataAbstract_IBXDriver_D10.dpk
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+
+
+ False
+
+ False
+ False
+ False
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True True
+ True
+
+
+
+ 0
+ 0
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+ RemObjects Data Abstract - InterBase Express Driver False
+
+
+
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 3
+ 0
+ 1
+ 361
+ False
+ False
+ False
+ False
+ False
+ 1033
+ 1252
+
+
+ RemObjects Software
+
+ 3.0.1.361
+
+
+
+
+ RemObjects SDK
+ 1.0.0.0
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D10.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D10.cfg
new file mode 100644
index 0000000..9037d9d
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D10.cfg
@@ -0,0 +1,49 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N0"..\..\Dcu\D10"
+-LE"..\..\Dcu\D10"
+-LN"..\..\Dcu\D10"
+-U"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-O"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-I"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-R"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D10.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D10.dpk
new file mode 100644
index 0000000..33c10ef
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D10.dpk
@@ -0,0 +1,39 @@
+package DataAbstract_IBXDriver_D10;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - InterBase Express Driver'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ DataAbstract_Core_D10,
+ ibxpress;
+
+contains
+ uDAIBXDriver in 'uDAIBXDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D10.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D10.res
new file mode 100644
index 0000000..204493b
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D10.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D11.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D11.dpk
new file mode 100644
index 0000000..f4f4afd
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D11.dpk
@@ -0,0 +1,39 @@
+package DataAbstract_IBXDriver_D11;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - InterBase Express Driver'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ DataAbstract_Core_D11,
+ ibxpress;
+
+contains
+ uDAIBXDriver in 'uDAIBXDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D11.dproj b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D11.dproj
new file mode 100644
index 0000000..812d141
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D11.dproj
@@ -0,0 +1,68 @@
+
+
+ {c31471d9-f8e2-4e45-94a7-1264d8011587}
+ DataAbstract_IBXDriver_D11.dpk
+ Debug
+ AnyCPU
+ DCC32
+ ..\..\Dcu\D11\DataAbstract_IBXDriver_D11.bpl
+
+
+ 7.0
+ False
+ False
+ 0
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ RELEASE
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ 7.0
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ Delphi.Personality
+ Package
+
+False True False RemObjects Data Abstract - InterBase Express Driver False True False True False 3 0 1 361 False False False False False 1033 1252 RemObjects Software 3.0.1.361 RemObjects SDK 1.0.0.0 DataAbstract_IBXDriver_D11.dpk
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D11.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D11.res
new file mode 100644
index 0000000..204493b
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D11.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D6.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D6.cfg
new file mode 100644
index 0000000..05f9ec3
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D6.cfg
@@ -0,0 +1,41 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\..\Dcu\D6"
+-LE"..\..\Dcu\D6"
+-LN"..\..\Dcu\D6"
+-U"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-O"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-I"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-R"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-Z
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D6.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D6.dof
new file mode 100644
index 0000000..220d444
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D6.dof
@@ -0,0 +1,76 @@
+[FileVersion]
+Version=6.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitDeprecated=0
+UnitLibrary=0
+UnitPlatform=0
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=Data Abstract - InterBase Express Driver
+
+[Directories]
+OutputDir=
+UnitOutputDir=..\..\Dcu\D6
+PackageDLLOutputDir=..\..\Dcu\D6
+PackageDCPOutputDir=..\..\Dcu\D6
+SearchPath=..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6
+Packages=
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+FileDescription=
+FileVersion=2.0.0.138
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=RemObjects SDK
+ProductVersion=1.0.0.0
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D6.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D6.dpk
new file mode 100644
index 0000000..98c5ffa
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D6.dpk
@@ -0,0 +1,39 @@
+package DataAbstract_IBXDriver_D6;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - InterBase Express Driver'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ DataAbstract_Core_D6,
+ ibxpress;
+
+contains
+ uDAIBXDriver in 'uDAIBXDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D6.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D6.res
new file mode 100644
index 0000000..204493b
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D6.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D7.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D7.cfg
new file mode 100644
index 0000000..6784156
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D7.cfg
@@ -0,0 +1,50 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\..\Dcu\D7"
+-LE"..\..\Dcu\D7"
+-LN"..\..\Dcu\D7"
+-U"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-O"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-I"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-R"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D7.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D7.dof
new file mode 100644
index 0000000..933b8c1
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D7.dof
@@ -0,0 +1,116 @@
+[FileVersion]
+Version=7.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=Data Abstract - InterBase Express Driver
+
+[Directories]
+OutputDir=
+UnitOutputDir=..\..\Dcu\D7
+PackageDLLOutputDir=..\..\Dcu\D7
+PackageDCPOutputDir=..\..\Dcu\D7
+SearchPath=..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7
+Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;dclOfficeXP;RemObjects_DataSnap_D7;PurposesoftD7;addict3_d6;tb2kComplete_70;CDKDesignTimeSupport;CDKSmp;CDK;ES_CodeSite20;ESDelphiCommandCompiler;ESFileSearch;ESVisualCompositeExpert;EaglWk;ESGraphUtils;ESBase;ESVsCp;ESSampleComposites70;ESSampleCompositeEditors7;Rz252N70;SynEdit_D7;dxsbD7;dxComnD7;dxDockingD7;dxEdtrD7;dxELibD7;dxExELD7;EQGridD7;dxExRwD7;dxDBEdD7;dxInsD7;dxGrEdD7;ECQDBCD7;EQTLD7;EQDBTLD7;dxLayoutControlD7;dxMasterViewD7;dxmdsd7;dxNavBarD7;dxObjInsD7;dxPageControlD7;dxPSCoreD7;Rz252D70;cxPageControlVCLD7;cxEditorsVCLD7;dxThemeD7;cxLibraryVCLD7;cxDataD7;cxGridUtilsVCLD7;cxGridVCLD7;RemObjects_BPDX_D7
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+FileDescription=
+FileVersion=2.0.0.142
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=RemObjects SDK
+ProductVersion=1.0.0.0
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D7.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D7.dpk
new file mode 100644
index 0000000..7c15b6b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D7.dpk
@@ -0,0 +1,39 @@
+package DataAbstract_IBXDriver_D7;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - InterBase Express Driver'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ DataAbstract_Core_D7,
+ ibxpress;
+
+contains
+ uDAIBXDriver in 'uDAIBXDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D7.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D7.res
new file mode 100644
index 0000000..204493b
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_D7.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_Glyphs.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_Glyphs.res
new file mode 100644
index 0000000..5d3bf7b
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_IBXDriver_Glyphs.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D10.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D10.bdsproj
new file mode 100644
index 0000000..f023fd3
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D10.bdsproj
@@ -0,0 +1,176 @@
+
+
+
+
+ Delphi.Personality
+
+ 1.0
+ {89ABBDEB-A4DB-4045-AE76-0CE8A7CB792A}
+
+
+
+
+ DataAbstract_MyDACDriver_D10.dpk
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ True
+ True
+
+
+ False
+
+ False
+ False
+ False
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True True
+ True
+
+
+
+ 0
+ 0
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+ RemObjects Data Abstract - CoreLabs MyDAC Driver False
+
+
+
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1033
+ 1252
+
+
+ RemObjects Software
+
+ 1.0.0.0
+
+ RemObjects Software
+ RemObjects Software
+
+ RemObjects Data Abstract
+ 1.0.0.0
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D10.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D10.cfg
new file mode 100644
index 0000000..207b254
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D10.cfg
@@ -0,0 +1,49 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U+
+-$V+
+-$W+
+-$X+
+-$YD
+-$Z1
+-cg
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N0"..\..\Dcu\D10"
+-LE"..\..\Dcu\D10"
+-LN"..\..\Dcu\D10"
+-U"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-O"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-I"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-R"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D10.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D10.dpk
new file mode 100644
index 0000000..7d302e2
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D10.dpk
@@ -0,0 +1,41 @@
+package DataAbstract_MyDACDriver_D10;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE ON}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - CoreLabs MyDAC Driver'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ bdertl,
+ dac100,
+ mydac100,
+ RemObjects_Core_D10,
+ DataAbstract_Core_D10;
+
+contains
+ uDAMyDACDriver in 'uDAMyDACDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D10.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D10.res
new file mode 100644
index 0000000..6ef0ba1
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D10.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D11.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D11.dpk
new file mode 100644
index 0000000..9a0e35d
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D11.dpk
@@ -0,0 +1,41 @@
+package DataAbstract_MyDACDriver_D11;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE ON}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - CoreLabs MyDAC Driver'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ bdertl,
+ dac105,
+ mydac105,
+ RemObjects_Core_D11,
+ DataAbstract_Core_D11;
+
+contains
+ uDAMyDACDriver in 'uDAMyDACDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D11.dproj b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D11.dproj
new file mode 100644
index 0000000..dec5987
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D11.dproj
@@ -0,0 +1,77 @@
+
+
+ {c13e3848-8048-4b6e-a5c5-b14de1a683a5}
+ DataAbstract_MyDACDriver_D11.dpk
+ Debug
+ AnyCPU
+ DCC32
+ ..\..\Dcu\D11\DataAbstract_MyDACDriver_D11.bpl
+
+
+ 7.0
+ False
+ False
+ True
+ True
+ 0
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ RELEASE
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ 7.0
+ True
+ True
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ Delphi.Personality
+ Package
+
+False True False RemObjects Data Abstract - CoreLabs MyDAC Driver False False False True False 1 0 0 0 False False False False False 1033 1252 RemObjects Software 1.0.0.0 RemObjects Software RemObjects Software RemObjects Data Abstract 1.0.0.0 DataAbstract_MyDACDriver_D11.dpk
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D11.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D11.res
new file mode 100644
index 0000000..6ef0ba1
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D11.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D6.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D6.cfg
new file mode 100644
index 0000000..481e4c1
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D6.cfg
@@ -0,0 +1,42 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U+
+-$V+
+-$W+
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\..\dcu\d6"
+-LE"..\..\dcu\d6"
+-LN"..\..\dcu\d6"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_PLATFORM
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D6.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D6.dof
new file mode 100644
index 0000000..468bfc4
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D6.dof
@@ -0,0 +1,116 @@
+[FileVersion]
+Version=7.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=1
+V=1
+W=1
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=RemObjects Data Abstract - CoreLabs MyDAC Driver
+
+[Directories]
+OutputDir=
+UnitOutputDir=..\..\Dcu\D6
+PackageDLLOutputDir=..\..\Dcu\D6
+PackageDCPOutputDir=..\..\Dcu\D6
+SearchPath=..\..\Dcu\D6
+Packages=
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D6.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D6.dpk
new file mode 100644
index 0000000..3886fc7
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D6.dpk
@@ -0,0 +1,41 @@
+package DataAbstract_MYDACDriver_D6;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE ON}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - CoreLabs MyDAC Driver'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ bdertl,
+ dac60,
+ mydac60,
+ RemObjects_Core_D6,
+ DataAbstract_Core_D6;
+
+contains
+ uDAMyDACDriver in 'uDAMyDACDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D6.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D6.res
new file mode 100644
index 0000000..371f8db
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D6.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D7.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D7.cfg
new file mode 100644
index 0000000..6784156
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D7.cfg
@@ -0,0 +1,50 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\..\Dcu\D7"
+-LE"..\..\Dcu\D7"
+-LN"..\..\Dcu\D7"
+-U"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-O"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-I"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-R"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D7.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D7.dof
new file mode 100644
index 0000000..d99f972
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D7.dof
@@ -0,0 +1,116 @@
+[FileVersion]
+Version=7.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=1
+V=1
+W=1
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=RemObjects Data Abstract - CoreLabs MyDAC Driver
+
+[Directories]
+OutputDir=
+UnitOutputDir=..\..\Dcu\D7
+PackageDLLOutputDir=..\..\Dcu\D7
+PackageDCPOutputDir=..\..\Dcu\D7
+SearchPath=..\..\Dcu\D7
+Packages=
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D7.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D7.dpk
new file mode 100644
index 0000000..a90f1f3
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D7.dpk
@@ -0,0 +1,41 @@
+package DataAbstract_MyDACDriver_D7;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE ON}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - CoreLabs MyDAC Driver'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ bdertl,
+ dac70,
+ mydac70,
+ RemObjects_Core_D7,
+ DataAbstract_Core_D7;
+
+contains
+ uDAMyDACDriver in 'uDAMyDACDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D7.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D7.res
new file mode 100644
index 0000000..371f8db
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_D7.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_Glyphs.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_Glyphs.res
new file mode 100644
index 0000000..7e28db9
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MyDACDriver_Glyphs.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_D10.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_D10.bdsproj
new file mode 100644
index 0000000..98d0a00
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_D10.bdsproj
@@ -0,0 +1,176 @@
+
+
+
+
+ Delphi.Personality
+
+ 1.0
+ {0FC45B58-F519-40B6-831A-DD79C8D3270F}
+
+
+
+
+ DataAbstract_MySQLDACDriver_D10.dpk
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+
+
+ False
+
+ False
+ False
+ False
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True True
+ True
+
+
+
+ 0
+ 0
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+ RemObjects Data Abstract - MicroOlap mySQL Driver False
+
+
+
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 3
+ 0
+ 1
+ 361
+ False
+ False
+ False
+ False
+ False
+ 1033
+ 1252
+
+
+ RemObjects Software
+
+ 3.0.1.361
+
+
+
+
+ RemObjects SDK
+ 1.0.0.0
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_D10.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_D10.dpk
new file mode 100644
index 0000000..835b724
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_D10.dpk
@@ -0,0 +1,39 @@
+package DataAbstract_MySQLDACDriver_D10;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - MicroOlap mySQLDac Driver'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ DataAbstract_Core_D10,
+ mySQLDAC10;
+
+contains
+ uDAMySQLDACDriver in 'uDAMySQLDACDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_D10.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_D10.res
new file mode 100644
index 0000000..7b3c163
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_D10.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_D11.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_D11.dpk
new file mode 100644
index 0000000..55e6cc5
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_D11.dpk
@@ -0,0 +1,39 @@
+package DataAbstract_MySQLDACDriver_D11;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - MicroOlap mySQLDac Driver'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ DataAbstract_Core_D11,
+ mySQLDAC11;
+
+contains
+ uDAMySQLDACDriver in 'uDAMySQLDACDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_D11.dproj b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_D11.dproj
new file mode 100644
index 0000000..ebd8da3
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_D11.dproj
@@ -0,0 +1,69 @@
+
+
+ {8ba781c7-bf1c-49bf-a87d-d21f3a68fd91}
+ DataAbstract_MySQLDACDriver_D11.dpk
+ Debug
+ AnyCPU
+ DCC32
+ ..\..\Dcu\D11\DataAbstract_MySQLDACDriver_D11.bpl
+
+
+ 7.0
+ False
+ False
+ 0
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ RELEASE
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ 7.0
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ Delphi.Personality
+ Package
+
+False True False RemObjects Data Abstract - MicroOlap mySQLDac Driver False True False True False 3 0 1 361 False False False False False 1033 1252 RemObjects Software 3.0.1.361 RemObjects SDK 1.0.0.0 DataAbstract_MySQLDACDriver_D11.dpk
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_D11.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_D11.res
new file mode 100644
index 0000000..7b3c163
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_D11.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_D6.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_D6.cfg
new file mode 100644
index 0000000..05f9ec3
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_D6.cfg
@@ -0,0 +1,41 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\..\Dcu\D6"
+-LE"..\..\Dcu\D6"
+-LN"..\..\Dcu\D6"
+-U"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-O"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-I"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-R"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-Z
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_D6.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_D6.dof
new file mode 100644
index 0000000..e0035fa
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_D6.dof
@@ -0,0 +1,76 @@
+[FileVersion]
+Version=6.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitDeprecated=0
+UnitLibrary=0
+UnitPlatform=0
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=Data Abstract - ADOExpress/dbGo Driver
+
+[Directories]
+OutputDir=
+UnitOutputDir=..\..\Dcu\D6
+PackageDLLOutputDir=..\..\Dcu\D6
+PackageDCPOutputDir=..\..\Dcu\D6
+SearchPath=..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6
+Packages=
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+FileDescription=
+FileVersion=2.0.0.138
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=RemObjects SDK
+ProductVersion=1.0.0.0
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_D6.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_D6.dpk
new file mode 100644
index 0000000..66a1e6c
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_D6.dpk
@@ -0,0 +1,39 @@
+package DataAbstract_MySQLDACDriver_D6;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - MicroOlap mySQLDac Driver'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ DataAbstract_Core_D6,
+ mySQLDAC6;
+
+contains
+ uDAMySQLDACDriver in 'uDAMySQLDACDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_D6.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_D6.res
new file mode 100644
index 0000000..892aed8
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_D6.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_D7.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_D7.cfg
new file mode 100644
index 0000000..6784156
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_D7.cfg
@@ -0,0 +1,50 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\..\Dcu\D7"
+-LE"..\..\Dcu\D7"
+-LN"..\..\Dcu\D7"
+-U"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-O"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-I"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-R"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_D7.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_D7.dof
new file mode 100644
index 0000000..f2d0c96
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_D7.dof
@@ -0,0 +1,116 @@
+[FileVersion]
+Version=7.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=Data Abstract - ADOExpress/dbGo Driver
+
+[Directories]
+OutputDir=
+UnitOutputDir=..\..\Dcu\D7
+PackageDLLOutputDir=..\..\Dcu\D7
+PackageDCPOutputDir=..\..\Dcu\D7
+SearchPath=..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7
+Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;dclOfficeXP;RemObjects_DataSnap_D7;PurposesoftD7;addict3_d6;tb2kComplete_70;CDKDesignTimeSupport;CDKSmp;CDK;ES_CodeSite20;ESDelphiCommandCompiler;ESFileSearch;ESVisualCompositeExpert;EaglWk;ESGraphUtils;ESBase;ESVsCp;ESSampleComposites70;ESSampleCompositeEditors7;Rz252N70;SynEdit_D7;dxsbD7;dxComnD7;dxDockingD7;dxEdtrD7;dxELibD7;dxExELD7;EQGridD7;dxExRwD7;dxDBEdD7;dxInsD7;dxGrEdD7;ECQDBCD7;EQTLD7;EQDBTLD7;dxLayoutControlD7;dxMasterViewD7;dxmdsd7;dxNavBarD7;dxObjInsD7;dxPageControlD7;dxPSCoreD7;Rz252D70;cxPageControlVCLD7;cxEditorsVCLD7;dxThemeD7;cxLibraryVCLD7;cxDataD7;cxGridUtilsVCLD7;cxGridVCLD7;RemObjects_BPDX_D7
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+FileDescription=
+FileVersion=2.0.0.142
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=RemObjects SDK
+ProductVersion=1.0.0.0
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_D7.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_D7.dpk
new file mode 100644
index 0000000..994ed6b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_D7.dpk
@@ -0,0 +1,39 @@
+package DataAbstract_MySQLDACDriver_D7;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - MicroOlap mySQLDac Driver'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ DataAbstract_Core_D7,
+ mySQLDAC7;
+
+contains
+ uDAMySQLDACDriver in 'uDAMySQLDACDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_D7.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_D7.res
new file mode 100644
index 0000000..892aed8
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_D7.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_Glyphs.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_Glyphs.res
new file mode 100644
index 0000000..cd846aa
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_MySQLDACDriver_Glyphs.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D10.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D10.bdsproj
new file mode 100644
index 0000000..05fd89b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D10.bdsproj
@@ -0,0 +1,182 @@
+
+
+
+
+ Delphi.Personality
+
+ 1.0
+ {56F75847-162D-44A5-A3DF-94172EE994EF}
+
+
+
+
+ DataAbstract_NexusDBDriver_D10.dpk
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+
+
+ False
+
+ False
+ False
+ False
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True True
+ True
+
+
+
+ 0
+ 0
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+ Data Abstract - NexusDB Driver False
+
+
+
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10
+ ..\
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1033
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ RemObjects Data Abstract - Core Library
+ RemObjects Data Abstract - IDE Package
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D10.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D10.cfg
new file mode 100644
index 0000000..ab68ed8
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D10.cfg
@@ -0,0 +1,49 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N0"..\..\Dcu\D10"
+-LE"..\..\Dcu\D10"
+-LN"..\..\Dcu\D10"
+-U"..\"
+-O"..\"
+-I"..\"
+-R"..\"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D10.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D10.dpk
new file mode 100644
index 0000000..b3ebee5
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D10.dpk
@@ -0,0 +1,47 @@
+package DataAbstract_NexusDBDriver_D10;
+
+{$R *.res}
+{$R 'uDANexusDBDriver.dcr'}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'Data Abstract - NexusDB Driver'}
+{$IMPLICITBUILD OFF}
+
+requires
+ RemObjects_Core_D10,
+ DataAbstract_Core_D10,
+ NexusDB107ll90,
+ NexusDB107sr90,
+ NexusDB107sd90,
+ NexusDB107sq90,
+ NexusDB107re90,
+ NexusDB107st90,
+ NexusDB107tn90,
+ NexusDB107pt90,
+ NexusDB107tw90,
+ NexusDB107db90,
+ NexusDB1071x90;
+
+contains
+ uDANexusDBDriver in 'uDANexusDBDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D10.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D10.res
new file mode 100644
index 0000000..941b7a7
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D10.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D11.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D11.dpk
new file mode 100644
index 0000000..4ffe8e1
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D11.dpk
@@ -0,0 +1,46 @@
+package DataAbstract_NexusDBDriver_D11;
+
+{$R *.res}
+{$R 'uDANexusDBDriver.dcr'}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'Data Abstract - NexusDB Driver'}
+{$IMPLICITBUILD OFF}
+
+requires
+ RemObjects_Core_D11,
+ DataAbstract_Core_D11,
+ NexusDB207ll110,
+ NexusDB207se110,
+ NexusDB207sr110,
+ NexusDB207sd110,
+ NexusDB207sq110,
+ NexusDB207re110,
+ NexusDB207pt110,
+ NexusDB207tn110,
+ NexusDB207tw110,
+ NexusDB207db110;
+
+contains
+ uDANexusDBDriver in 'uDANexusDBDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D11.dproj b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D11.dproj
new file mode 100644
index 0000000..52343f9
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D11.dproj
@@ -0,0 +1,102 @@
+
+
+
+ {f5368522-8742-4b69-a8b3-668ec242cc52}
+ DataAbstract_NexusDBDriver_D11.dpk
+ Debug
+ AnyCPU
+ DCC32
+ ..\..\Dcu\D11\DataAbstract_NexusDBDriver_D11.bpl
+
+
+ 7.0
+ False
+ False
+ 0
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\
+ ..\
+ ..\
+ ..\
+ RELEASE
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ 7.0
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\
+ ..\
+ ..\
+ ..\
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ Delphi.Personality
+ Package
+
+False True False Data Abstract - NexusDB Driver False False False True False 1 0 0 0 False False False False False 1033 1252 1.0.0.0 1.0.0.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ RemObjects Data Abstract - MicroOlap mySQLDac Driver
+ CodeGear BDE DB Components
+ CodeGear C++Builder Office 2000 Servers Package
+ CodeGear C++Builder Office XP Servers Package
+ Microsoft Office 2000 Sample Automation Server Wrapper Components
+ Microsoft Office XP Sample Automation Server Wrapper Components
+ DataAbstract_NexusDBDriver_D11.dpk
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D11.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D11.res
new file mode 100644
index 0000000..941b7a7
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D11.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D6.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D6.cfg
new file mode 100644
index 0000000..c7cbecf
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D6.cfg
@@ -0,0 +1,42 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\Dcu\D6"
+-LE"..\Dcu\D6"
+-LN"..\Dcu\D6"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_PLATFORM
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D6.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D6.dof
new file mode 100644
index 0000000..dcd6c63
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D6.dof
@@ -0,0 +1,116 @@
+[FileVersion]
+Version=7.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=Data Abstract - NexusDB Driver
+
+[Directories]
+OutputDir=
+UnitOutputDir=..\Dcu\D6
+PackageDLLOutputDir=..\Dcu\D6
+PackageDCPOutputDir=..\Dcu\D6
+SearchPath=
+Packages=
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D6.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D6.dpk
new file mode 100644
index 0000000..f2b9bec
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D6.dpk
@@ -0,0 +1,44 @@
+package DataAbstract_NexusDBDriver_D6;
+
+{$R *.res}
+{$R 'uDANexusDBDriver.dcr'}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'Data Abstract - NexusDB Driver'}
+{$IMPLICITBUILD OFF}
+
+requires
+ RemObjects_Core_D6,
+ DataAbstract_Core_D6,
+ NexusDB107st60,
+ NexusDB107pt60,
+ NexusDB107tw60,
+ NexusDB107tn60,
+ NexusDB107re60,
+ NexusDB1071x60,
+ NexusDB107sq60,
+ NexusDB107db60;
+
+contains
+ uDANexusDBDriver in 'uDANexusDBDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D6.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D6.res
new file mode 100644
index 0000000..22eb4e7
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D6.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D7.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D7.cfg
new file mode 100644
index 0000000..d772b58
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D7.cfg
@@ -0,0 +1,46 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\Dcu\D7"
+-LE"..\Dcu\D7"
+-LN"..\Dcu\D7"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D7.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D7.dof
new file mode 100644
index 0000000..3a86bcb
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D7.dof
@@ -0,0 +1,116 @@
+[FileVersion]
+Version=7.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=Data Abstract - NexusDB Driver
+
+[Directories]
+OutputDir=
+UnitOutputDir=..\Dcu\D7
+PackageDLLOutputDir=..\Dcu\D7
+PackageDCPOutputDir=..\Dcu\D7
+SearchPath=
+Packages=
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D7.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D7.dpk
new file mode 100644
index 0000000..66eb10a
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D7.dpk
@@ -0,0 +1,47 @@
+package DataAbstract_NexusDBDriver_D7;
+
+{$R *.res}
+{$R 'uDANexusDBDriver.dcr'}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'Data Abstract - NexusDB Driver'}
+{$IMPLICITBUILD OFF}
+
+requires
+ RemObjects_Core_D7,
+ DataAbstract_Core_D7,
+ NexusDB107ll70,
+ NexusDB107sr70,
+ NexusDB107sd70,
+ NexusDB107sq70,
+ NexusDB107re70,
+ NexusDB107st70,
+ NexusDB107tn70,
+ NexusDB107pt70,
+ NexusDB107tw70,
+ NexusDB107db70,
+ NexusDB1071x70;
+
+contains
+ uDANexusDBDriver in 'uDANexusDBDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D7.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D7.res
new file mode 100644
index 0000000..20e9bca
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_NexusDBDriver_D7.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D10.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D10.bdsproj
new file mode 100644
index 0000000..01bb3ad
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D10.bdsproj
@@ -0,0 +1,176 @@
+
+
+
+
+ Delphi.Personality
+
+ 1.0
+ {D5CF0E18-5430-44E4-8B68-4D54B5F3535D}
+
+
+
+
+ DataAbstract_ODACDriver_D10.dpk
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ True
+ True
+
+
+ False
+
+ False
+ False
+ False
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True True
+ True
+
+
+
+ 0
+ 0
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+ RemObjects Data Abstract - CoreLabs ODAC Driver False
+
+
+
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1033
+ 1252
+
+
+ RemObjects Software
+
+ 1.0.0.0
+
+ RemObjects Software
+ RemObjects Software
+
+ RemObjects Data Abstract
+ 1.0.0.0
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D10.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D10.cfg
new file mode 100644
index 0000000..207b254
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D10.cfg
@@ -0,0 +1,49 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U+
+-$V+
+-$W+
+-$X+
+-$YD
+-$Z1
+-cg
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N0"..\..\Dcu\D10"
+-LE"..\..\Dcu\D10"
+-LN"..\..\Dcu\D10"
+-U"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-O"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-I"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-R"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D10.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D10.dpk
new file mode 100644
index 0000000..78921ea
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D10.dpk
@@ -0,0 +1,41 @@
+package DataAbstract_ODACDriver_D10;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE ON}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - CoreLabs ODAC Driver'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ bdertl,
+ dac100,
+ RemObjects_Core_D10,
+ DataAbstract_Core_D10,
+ odac100;
+
+contains
+ uDAODACDriver in 'uDAODACDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D10.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D10.res
new file mode 100644
index 0000000..6ef0ba1
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D10.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D11.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D11.dpk
new file mode 100644
index 0000000..92f4d48
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D11.dpk
@@ -0,0 +1,41 @@
+package DataAbstract_ODACDriver_D11;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE ON}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - CoreLabs ODAC Driver'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ bdertl,
+ dac105,
+ RemObjects_Core_D11,
+ DataAbstract_Core_D11,
+ odac105;
+
+contains
+ uDAODACDriver in 'uDAODACDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D11.dproj b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D11.dproj
new file mode 100644
index 0000000..7d8ed75
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D11.dproj
@@ -0,0 +1,87 @@
+
+
+ {4ed86b4c-3296-4ab5-b711-e264774d76b0}
+ DataAbstract_ODACDriver_D11.dpk
+ Debug
+ AnyCPU
+ DCC32
+ ..\..\Dcu\D11\DataAbstract_ODACDriver_D11.bpl
+
+
+ 7.0
+ False
+ False
+ True
+ True
+ 0
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ RELEASE
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ 7.0
+ True
+ True
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ Delphi.Personality
+ Package
+
+False True False RemObjects Data Abstract - CoreLabs ODAC Driver False False False True False 1 0 0 0 False False False False False 1033 1252 RemObjects Software 1.0.0.0 RemObjects Software RemObjects Software RemObjects Data Abstract 1.0.0.0 DataAbstract_ODACDriver_D11.dpk
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D11.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D11.res
new file mode 100644
index 0000000..6ef0ba1
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D11.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D6.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D6.cfg
new file mode 100644
index 0000000..0aa2cb6
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D6.cfg
@@ -0,0 +1,41 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U+
+-$V+
+-$W+
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\..\Dcu\D6"
+-LE"..\..\Dcu\D6"
+-LN"..\..\Dcu\D6"
+-U"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-O"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-I"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-R"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-Z
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D6.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D6.dof
new file mode 100644
index 0000000..e6a8cb6
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D6.dof
@@ -0,0 +1,77 @@
+[FileVersion]
+Version=6.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=1
+V=1
+W=1
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitDeprecated=0
+UnitLibrary=0
+UnitPlatform=0
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=Data Abstract - CoreLabs ODAC Driver
+
+[Directories]
+OutputDir=
+UnitOutputDir=..\..\Dcu\D6
+PackageDLLOutputDir=..\..\Dcu\D6
+PackageDCPOutputDir=..\..\Dcu\D6
+SearchPath=..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6
+Packages=
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software, Inc.
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=RemObjects Software, Inc.
+LegalTrademarks=RemObjects Software, Inc.
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+Comments=http://www.remobjects.com
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D6.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D6.dpk
new file mode 100644
index 0000000..debd426
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D6.dpk
@@ -0,0 +1,41 @@
+package DataAbstract_ODACDriver_D6;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE ON}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - CoreLabs ODAC Driver'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ bdertl,
+ dac60,
+ RemObjects_Core_D6,
+ DataAbstract_Core_D6,
+ odac60;
+
+contains
+ uDAODACDriver in 'uDAODACDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D6.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D6.res
new file mode 100644
index 0000000..b26b84e
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D6.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D7.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D7.cfg
new file mode 100644
index 0000000..a290ad9
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D7.cfg
@@ -0,0 +1,50 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U+
+-$V+
+-$W+
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\..\Dcu\D7"
+-LE"..\..\Dcu\D7"
+-LN"..\..\Dcu\D7"
+-U"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-O"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-I"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-R"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D7.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D7.dof
new file mode 100644
index 0000000..b6566eb
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D7.dof
@@ -0,0 +1,117 @@
+[FileVersion]
+Version=7.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=1
+V=1
+W=1
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=Data Abstract - CoreLabs ODAC Driver
+
+[Directories]
+OutputDir=
+UnitOutputDir=..\..\Dcu\D7
+PackageDLLOutputDir=..\..\Dcu\D7
+PackageDCPOutputDir=..\..\Dcu\D7
+SearchPath=..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7
+Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;dclOfficeXP;RemObjects_DataSnap_D7;PurposesoftD7;addict3_d6;tb2kComplete_70;CDKDesignTimeSupport;CDKSmp;CDK;ES_CodeSite20;ESDelphiCommandCompiler;ESFileSearch;ESVisualCompositeExpert;EaglWk;ESGraphUtils;ESBase;ESVsCp;ESSampleComposites70;ESSampleCompositeEditors7;Rz252N70;SynEdit_D7;dxsbD7;dxComnD7;dxDockingD7;dxEdtrD7;dxELibD7;dxExELD7;EQGridD7;dxExRwD7;dxDBEdD7;dxInsD7;dxGrEdD7;ECQDBCD7;EQTLD7;EQDBTLD7;dxLayoutControlD7;dxMasterViewD7;dxmdsd7;dxNavBarD7;dxObjInsD7;dxPageControlD7;dxPSCoreD7;Rz252D70;cxPageControlVCLD7;cxEditorsVCLD7;dxThemeD7;cxLibraryVCLD7;cxDataD7;cxGridUtilsVCLD7;cxGridVCLD7;RemObjects_BPDX_D7
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software, Inc.
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=RemObjects Software, Inc.
+LegalTrademarks=RemObjects Software, Inc.
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+Comments=http://www.remobjects.com
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D7.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D7.dpk
new file mode 100644
index 0000000..06e9940
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D7.dpk
@@ -0,0 +1,41 @@
+package DataAbstract_ODACDriver_D7;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE ON}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - CoreLabs ODAC Driver'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ bdertl,
+ dac70,
+ RemObjects_Core_D7,
+ DataAbstract_Core_D7,
+ odac70;
+
+contains
+ uDAODACDriver in 'uDAODACDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D7.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D7.res
new file mode 100644
index 0000000..b26b84e
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_D7.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_Glyphs.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_Glyphs.res
new file mode 100644
index 0000000..5948a0e
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ODACDriver_Glyphs.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D10.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D10.bdsproj
new file mode 100644
index 0000000..d3a6db6
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D10.bdsproj
@@ -0,0 +1,176 @@
+
+
+
+
+ Delphi.Personality
+
+ 1.0
+ {0FC45B58-F519-40B6-831A-DD79C8D3270F}
+
+
+
+
+ DataAbstract_PostgresDACDriver_D10.dpk
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+
+
+ False
+
+ False
+ False
+ False
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True True
+ True
+
+
+
+ 0
+ 0
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+ RemObjects Data Abstract - MicroOlap PostgresDAC Driver False
+
+
+
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 3
+ 0
+ 1
+ 361
+ False
+ False
+ False
+ False
+ False
+ 1033
+ 1252
+
+
+ RemObjects Software
+
+ 3.0.1.361
+
+
+
+
+ RemObjects SDK
+ 1.0.0.0
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D10.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D10.cfg
new file mode 100644
index 0000000..9037d9d
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D10.cfg
@@ -0,0 +1,49 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N0"..\..\Dcu\D10"
+-LE"..\..\Dcu\D10"
+-LN"..\..\Dcu\D10"
+-U"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-O"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-I"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-R"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D10.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D10.dpk
new file mode 100644
index 0000000..424def4
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D10.dpk
@@ -0,0 +1,39 @@
+package DataAbstract_PostgresDACDriver_D10;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - MicroOlap PostgresDAC Driver'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ DataAbstract_Core_D10,
+ PostgresDAC10;
+
+contains
+ uDAPostgresDACDriver in 'uDAPostgresDACDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D10.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D10.res
new file mode 100644
index 0000000..7b3c163
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D10.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D11.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D11.dpk
new file mode 100644
index 0000000..14e92ab
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D11.dpk
@@ -0,0 +1,39 @@
+package DataAbstract_PostgresDACDriver_D11;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - MicroOlap PostgresDAC Driver'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ DataAbstract_Core_D11,
+ PostgresDAC11;
+
+contains
+ uDAPostgresDACDriver in 'uDAPostgresDACDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D11.dproj b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D11.dproj
new file mode 100644
index 0000000..1233566
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D11.dproj
@@ -0,0 +1,69 @@
+
+
+
+ {777e54de-8166-497d-912a-60af105eb626}
+ DataAbstract_PostgresDACDriver_D11.dpk
+ Debug
+ AnyCPU
+ DCC32
+ ..\..\Dcu\D11\DataAbstract_PostgresDACDriver_D11.bpl
+
+
+ 7.0
+ False
+ False
+ 0
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ RELEASE
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ 7.0
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ Delphi.Personality
+ Package
+
+False True False RemObjects Data Abstract - MicroOlap PostgresDAC Driver False True False True False 3 0 1 361 False False False False False 1033 1252 RemObjects Software 3.0.1.361 RemObjects SDK 1.0.0.0 DataAbstract_PostgresDACDriver_D11.dpk
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D11.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D11.res
new file mode 100644
index 0000000..7b3c163
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D11.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D6.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D6.cfg
new file mode 100644
index 0000000..05f9ec3
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D6.cfg
@@ -0,0 +1,41 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\..\Dcu\D6"
+-LE"..\..\Dcu\D6"
+-LN"..\..\Dcu\D6"
+-U"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-O"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-I"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-R"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-Z
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D6.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D6.dof
new file mode 100644
index 0000000..e0035fa
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D6.dof
@@ -0,0 +1,76 @@
+[FileVersion]
+Version=6.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitDeprecated=0
+UnitLibrary=0
+UnitPlatform=0
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=Data Abstract - ADOExpress/dbGo Driver
+
+[Directories]
+OutputDir=
+UnitOutputDir=..\..\Dcu\D6
+PackageDLLOutputDir=..\..\Dcu\D6
+PackageDCPOutputDir=..\..\Dcu\D6
+SearchPath=..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6
+Packages=
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+FileDescription=
+FileVersion=2.0.0.138
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=RemObjects SDK
+ProductVersion=1.0.0.0
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D6.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D6.dpk
new file mode 100644
index 0000000..b7803fe
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D6.dpk
@@ -0,0 +1,39 @@
+package DataAbstract_PostgresDACDriver_D6;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - MicroOlap PostgresDAC Driver'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ DataAbstract_Core_D6,
+ PostgresDAC6;
+
+contains
+ uDAPostgresDACDriver in 'uDAPostgresDACDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D6.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D6.res
new file mode 100644
index 0000000..892aed8
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D6.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D7.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D7.cfg
new file mode 100644
index 0000000..6784156
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D7.cfg
@@ -0,0 +1,50 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\..\Dcu\D7"
+-LE"..\..\Dcu\D7"
+-LN"..\..\Dcu\D7"
+-U"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-O"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-I"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-R"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D7.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D7.dof
new file mode 100644
index 0000000..f2d0c96
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D7.dof
@@ -0,0 +1,116 @@
+[FileVersion]
+Version=7.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=Data Abstract - ADOExpress/dbGo Driver
+
+[Directories]
+OutputDir=
+UnitOutputDir=..\..\Dcu\D7
+PackageDLLOutputDir=..\..\Dcu\D7
+PackageDCPOutputDir=..\..\Dcu\D7
+SearchPath=..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7
+Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;dclOfficeXP;RemObjects_DataSnap_D7;PurposesoftD7;addict3_d6;tb2kComplete_70;CDKDesignTimeSupport;CDKSmp;CDK;ES_CodeSite20;ESDelphiCommandCompiler;ESFileSearch;ESVisualCompositeExpert;EaglWk;ESGraphUtils;ESBase;ESVsCp;ESSampleComposites70;ESSampleCompositeEditors7;Rz252N70;SynEdit_D7;dxsbD7;dxComnD7;dxDockingD7;dxEdtrD7;dxELibD7;dxExELD7;EQGridD7;dxExRwD7;dxDBEdD7;dxInsD7;dxGrEdD7;ECQDBCD7;EQTLD7;EQDBTLD7;dxLayoutControlD7;dxMasterViewD7;dxmdsd7;dxNavBarD7;dxObjInsD7;dxPageControlD7;dxPSCoreD7;Rz252D70;cxPageControlVCLD7;cxEditorsVCLD7;dxThemeD7;cxLibraryVCLD7;cxDataD7;cxGridUtilsVCLD7;cxGridVCLD7;RemObjects_BPDX_D7
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+FileDescription=
+FileVersion=2.0.0.142
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=RemObjects SDK
+ProductVersion=1.0.0.0
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D7.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D7.dpk
new file mode 100644
index 0000000..37c6d74
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D7.dpk
@@ -0,0 +1,39 @@
+package DataAbstract_PostgresDACDriver_D7;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - MicroOlap PostgresDAC Driver'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ DataAbstract_Core_D7,
+ PostgresDAC7;
+
+contains
+ uDAPostgresDACDriver in 'uDAPostgresDACDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D7.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D7.res
new file mode 100644
index 0000000..892aed8
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_D7.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_Glyphs.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_Glyphs.res
new file mode 100644
index 0000000..fb43550
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_PostgresDACDriver_Glyphs.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D10.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D10.bdsproj
new file mode 100644
index 0000000..d05f343
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D10.bdsproj
@@ -0,0 +1,176 @@
+
+
+
+
+ Delphi.Personality
+
+ 1.0
+ {D100EE26-6D50-4902-BC9B-C2BA456E2258}
+
+
+
+
+ DataAbstract_SDACDriver_D10.dpk
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ True
+ True
+
+
+ False
+
+ False
+ False
+ False
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True True
+ True
+
+
+
+ 0
+ 0
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+ RemObjects Data Abstract - CoreLabs SDAC Driver False
+
+
+
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1033
+ 1252
+
+
+ RemObjects Software
+
+ 1.0.0.0
+
+ RemObjects Software
+ RemObjects Software
+
+ RemObjects Data Abstract
+ 1.0.0.0
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D10.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D10.cfg
new file mode 100644
index 0000000..207b254
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D10.cfg
@@ -0,0 +1,49 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U+
+-$V+
+-$W+
+-$X+
+-$YD
+-$Z1
+-cg
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N0"..\..\Dcu\D10"
+-LE"..\..\Dcu\D10"
+-LN"..\..\Dcu\D10"
+-U"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-O"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-I"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-R"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D10.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D10.dpk
new file mode 100644
index 0000000..a7067e9
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D10.dpk
@@ -0,0 +1,41 @@
+package DataAbstract_SDACDriver_D10;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE ON}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - CoreLabs SDAC Driver'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ bdertl,
+ dac100,
+ RemObjects_Core_D10,
+ sdac100,
+ DataAbstract_Core_D10;
+
+contains
+ uDASDACDriver in 'uDASDACDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D10.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D10.res
new file mode 100644
index 0000000..6ef0ba1
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D10.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D11.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D11.dpk
new file mode 100644
index 0000000..40d1424
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D11.dpk
@@ -0,0 +1,41 @@
+package DataAbstract_SDACDriver_D11;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE ON}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - CoreLabs SDAC Driver'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ bdertl,
+ dac105,
+ RemObjects_Core_D11,
+ sdac105,
+ DataAbstract_Core_D11;
+
+contains
+ uDASDACDriver in 'uDASDACDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D11.dproj b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D11.dproj
new file mode 100644
index 0000000..4c5409b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D11.dproj
@@ -0,0 +1,79 @@
+
+
+ {bcb5ceeb-712c-4f85-83e3-6f57bb934c9f}
+ DataAbstract_SDACDriver_D11.dpk
+ Debug
+ AnyCPU
+ DCC32
+ ..\..\Dcu\D11\DataAbstract_SDACDriver_D11.bpl
+
+
+ 7.0
+ False
+ False
+ True
+ True
+ 0
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ RELEASE
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ 7.0
+ True
+ True
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ Delphi.Personality
+ Package
+
+False True False RemObjects Data Abstract - CoreLabs SDAC Driver False False False True False 1 0 0 0 False False False False False 1033 1252 RemObjects Software 1.0.0.0 RemObjects Software RemObjects Software RemObjects Data Abstract 1.0.0.0 DataAbstract_SDACDriver_D11.dpk
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D11.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D11.res
new file mode 100644
index 0000000..6ef0ba1
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D11.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D6.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D6.cfg
new file mode 100644
index 0000000..0aa2cb6
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D6.cfg
@@ -0,0 +1,41 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U+
+-$V+
+-$W+
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\..\Dcu\D6"
+-LE"..\..\Dcu\D6"
+-LN"..\..\Dcu\D6"
+-U"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-O"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-I"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-R"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-Z
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D6.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D6.dof
new file mode 100644
index 0000000..a6cb4e4
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D6.dof
@@ -0,0 +1,77 @@
+[FileVersion]
+Version=6.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=1
+V=1
+W=1
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitDeprecated=0
+UnitLibrary=0
+UnitPlatform=0
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=Data Abstract - CoreLabs SDAC Driver
+
+[Directories]
+OutputDir=
+UnitOutputDir=..\..\Dcu\D6
+PackageDLLOutputDir=..\..\Dcu\D6
+PackageDCPOutputDir=..\..\Dcu\D6
+SearchPath=..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6
+Packages=
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software, Inc.
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=RemObjects Software, Inc.
+LegalTrademarks=RemObjects Software, Inc.
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+Comments=http://www.remobjects.com
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D6.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D6.dpk
new file mode 100644
index 0000000..6f3c3e6
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D6.dpk
@@ -0,0 +1,41 @@
+package DataAbstract_SDACDriver_D6;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE ON}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - CoreLabs SDAC Driver'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ bdertl,
+ RemObjects_Core_D6,
+ DataAbstract_Core_D6,
+ dac60,
+ sdac60;
+
+contains
+ uDASDACDriver in 'uDASDACDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D6.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D6.res
new file mode 100644
index 0000000..b26b84e
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D6.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D7.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D7.cfg
new file mode 100644
index 0000000..a290ad9
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D7.cfg
@@ -0,0 +1,50 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U+
+-$V+
+-$W+
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\..\Dcu\D7"
+-LE"..\..\Dcu\D7"
+-LN"..\..\Dcu\D7"
+-U"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-O"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-I"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-R"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D7.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D7.dof
new file mode 100644
index 0000000..42ca991
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D7.dof
@@ -0,0 +1,117 @@
+[FileVersion]
+Version=7.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=1
+V=1
+W=1
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=Data Abstract - CoreLabs SDAC Driver
+
+[Directories]
+OutputDir=
+UnitOutputDir=..\..\Dcu\D7
+PackageDLLOutputDir=..\..\Dcu\D7
+PackageDCPOutputDir=..\..\Dcu\D7
+SearchPath=..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7
+Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;dclOfficeXP;RemObjects_DataSnap_D7;PurposesoftD7;addict3_d6;tb2kComplete_70;CDKDesignTimeSupport;CDKSmp;CDK;ES_CodeSite20;ESDelphiCommandCompiler;ESFileSearch;ESVisualCompositeExpert;EaglWk;ESGraphUtils;ESBase;ESVsCp;ESSampleComposites70;ESSampleCompositeEditors7;Rz252N70;SynEdit_D7;dxsbD7;dxComnD7;dxDockingD7;dxEdtrD7;dxELibD7;dxExELD7;EQGridD7;dxExRwD7;dxDBEdD7;dxInsD7;dxGrEdD7;ECQDBCD7;EQTLD7;EQDBTLD7;dxLayoutControlD7;dxMasterViewD7;dxmdsd7;dxNavBarD7;dxObjInsD7;dxPageControlD7;dxPSCoreD7;Rz252D70;cxPageControlVCLD7;cxEditorsVCLD7;dxThemeD7;cxLibraryVCLD7;cxDataD7;cxGridUtilsVCLD7;cxGridVCLD7;RemObjects_BPDX_D7
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software, Inc.
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=RemObjects Software, Inc.
+LegalTrademarks=RemObjects Software, Inc.
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+Comments=http://www.remobjects.com
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D7.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D7.dpk
new file mode 100644
index 0000000..ca1d337
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D7.dpk
@@ -0,0 +1,41 @@
+package DataAbstract_SDACDriver_D7;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE ON}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - CoreLabs SDAC Driver'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ bdertl,
+ dac70,
+ RemObjects_Core_D7,
+ sdac70,
+ DataAbstract_Core_D7;
+
+contains
+ uDASDACDriver in 'uDASDACDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D7.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D7.res
new file mode 100644
index 0000000..ac3b612
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_D7.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_Glyphs.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_Glyphs.res
new file mode 100644
index 0000000..d14c81c
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SDACDriver_Glyphs.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D10.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D10.bdsproj
new file mode 100644
index 0000000..4acf23e
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D10.bdsproj
@@ -0,0 +1,176 @@
+
+
+
+
+ Delphi.Personality
+
+ 1.0
+ {C227C50C-E7AA-4212-8D32-C33B5BFE5BB8}
+
+
+
+
+ DataAbstract_SQLiteDriver_D10.dpk
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ True
+ True
+
+
+ False
+
+ False
+ False
+ False
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True True
+ True
+
+
+
+ 0
+ 0
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+ RemObjects Data Abstract - SQLite Driver False
+
+
+
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 3
+ 0
+ 1
+ 361
+ False
+ False
+ False
+ False
+ False
+ 1033
+ 1252
+
+
+ RemObjects Software
+
+ 3.0.1.361
+
+
+
+
+ RemObjects SDK
+ 1.0.0.0
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D10.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D10.cfg
new file mode 100644
index 0000000..207b254
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D10.cfg
@@ -0,0 +1,49 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U+
+-$V+
+-$W+
+-$X+
+-$YD
+-$Z1
+-cg
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N0"..\..\Dcu\D10"
+-LE"..\..\Dcu\D10"
+-LN"..\..\Dcu\D10"
+-U"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-O"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-I"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-R"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D10.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D10.dpk
new file mode 100644
index 0000000..e678ec2
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D10.dpk
@@ -0,0 +1,37 @@
+package DataAbstract_SQLiteDriver_D10;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE ON}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - SQLite Driver'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ DataAbstract_Core_D10;
+
+contains
+ uDASQLiteDriver in 'uDASQLiteDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D10.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D10.res
new file mode 100644
index 0000000..204493b
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D10.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D11.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D11.dpk
new file mode 100644
index 0000000..ba6edaa
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D11.dpk
@@ -0,0 +1,37 @@
+package DataAbstract_SQLiteDriver_D11;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE ON}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - SQLite Driver'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ DataAbstract_Core_D11;
+
+contains
+ uDASQLiteDriver in 'uDASQLiteDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D11.dproj b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D11.dproj
new file mode 100644
index 0000000..ed142b2
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D11.dproj
@@ -0,0 +1,71 @@
+
+
+ {17f81962-5ed1-4c36-bee9-ce79aab46e95}
+ DataAbstract_SQLiteDriver_D11.dpk
+ Debug
+ AnyCPU
+ DCC32
+ ..\..\Dcu\D11\DataAbstract_SQLiteDriver_D11.bpl
+
+
+ 7.0
+ False
+ False
+ True
+ True
+ 0
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ RELEASE
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ 7.0
+ True
+ True
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ Delphi.Personality
+ Package
+
+False True False RemObjects Data Abstract - SQLite Driver False False False True False 3 0 1 361 False False False False False 1033 1252 RemObjects Software 3.0.1.361 RemObjects SDK 1.0.0.0 DataAbstract_SQLiteDriver_D11.dpk
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D11.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D11.res
new file mode 100644
index 0000000..204493b
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D11.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D6.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D6.cfg
new file mode 100644
index 0000000..4730510
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D6.cfg
@@ -0,0 +1,41 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U+
+-$V+
+-$W+
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\..\Dcu\D6"
+-LE"..\..\Dcu\D6"
+-LN"..\..\Dcu\D6"
+-U"..\..\Dcu\D6;..\..\..\RemObjects SDK\Dcu\D6"
+-O"..\..\Dcu\D6;..\..\..\RemObjects SDK\Dcu\D6"
+-I"..\..\Dcu\D6;..\..\..\RemObjects SDK\Dcu\D6"
+-R"..\..\Dcu\D6;..\..\..\RemObjects SDK\Dcu\D6"
+-Z
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D6.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D6.dof
new file mode 100644
index 0000000..1fb3129
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D6.dof
@@ -0,0 +1,76 @@
+[FileVersion]
+Version=6.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=1
+V=1
+W=1
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitDeprecated=0
+UnitLibrary=0
+UnitPlatform=0
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=RemObjects Data Abstract - SQLite Driver
+
+[Directories]
+OutputDir=
+UnitOutputDir=..\..\Dcu\D6
+PackageDLLOutputDir=..\..\Dcu\D6
+PackageDCPOutputDir=..\..\Dcu\D6
+SearchPath=..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6
+Packages=
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+FileDescription=
+FileVersion=2.0.0.138
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=RemObjects SDK
+ProductVersion=1.0.0.0
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D6.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D6.dpk
new file mode 100644
index 0000000..81be681
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D6.dpk
@@ -0,0 +1,37 @@
+package DataAbstract_SQLiteDriver_D6;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE ON}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - SQLite Driver'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ DataAbstract_Core_D6;
+
+contains
+ uDASQLiteDriver in 'uDASQLiteDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D6.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D6.res
new file mode 100644
index 0000000..204493b
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D6.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D7.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D7.cfg
new file mode 100644
index 0000000..5cf57a8
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D7.cfg
@@ -0,0 +1,50 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U+
+-$V+
+-$W+
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\..\Dcu\D7"
+-LE"..\..\Dcu\D7"
+-LN"..\..\Dcu\D7"
+-U"..\..\Dcu\D7;..\..\..\RemObjects SDK\Dcu\D7"
+-O"..\..\Dcu\D7;..\..\..\RemObjects SDK\Dcu\D7"
+-I"..\..\Dcu\D7;..\..\..\RemObjects SDK\Dcu\D7"
+-R"..\..\Dcu\D7;..\..\..\RemObjects SDK\Dcu\D7"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D7.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D7.dof
new file mode 100644
index 0000000..94c4d85
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D7.dof
@@ -0,0 +1,116 @@
+[FileVersion]
+Version=7.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=1
+V=1
+W=1
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=Data Abstract - SQLite Driver
+
+[Directories]
+OutputDir=
+UnitOutputDir=..\..\Dcu\D7
+PackageDLLOutputDir=..\..\Dcu\D7
+PackageDCPOutputDir=..\..\Dcu\D7
+SearchPath=..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7
+Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;dclOfficeXP;RemObjects_DataSnap_D7;PurposesoftD7;addict3_d6;tb2kComplete_70;CDKDesignTimeSupport;CDKSmp;CDK;ES_CodeSite20;ESDelphiCommandCompiler;ESFileSearch;ESVisualCompositeExpert;EaglWk;ESGraphUtils;ESBase;ESVsCp;ESSampleComposites70;ESSampleCompositeEditors7;Rz252N70;SynEdit_D7;dxsbD7;dxComnD7;dxDockingD7;dxEdtrD7;dxELibD7;dxExELD7;EQGridD7;dxExRwD7;dxDBEdD7;dxInsD7;dxGrEdD7;ECQDBCD7;EQTLD7;EQDBTLD7;dxLayoutControlD7;dxMasterViewD7;dxmdsd7;dxNavBarD7;dxObjInsD7;dxPageControlD7;dxPSCoreD7;Rz252D70;cxPageControlVCLD7;cxEditorsVCLD7;dxThemeD7;cxLibraryVCLD7;cxDataD7;cxGridUtilsVCLD7;cxGridVCLD7;RemObjects_BPDX_D7
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+FileDescription=
+FileVersion=2.0.0.142
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=RemObjects SDK
+ProductVersion=1.0.0.0
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D7.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D7.dpk
new file mode 100644
index 0000000..0265195
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D7.dpk
@@ -0,0 +1,37 @@
+package DataAbstract_SQLiteDriver_D7;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE ON}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - SQLite Driver'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ DataAbstract_Core_D7;
+
+contains
+ uDASQLiteDriver in 'uDASQLiteDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D7.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D7.res
new file mode 100644
index 0000000..204493b
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_D7.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_Glyphs.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_Glyphs.res
new file mode 100644
index 0000000..9f2e224
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_SQLiteDriver_Glyphs.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D10.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D10.bdsproj
new file mode 100644
index 0000000..267567e
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D10.bdsproj
@@ -0,0 +1,176 @@
+
+
+
+
+ Delphi.Personality
+
+ 1.0
+ {D5CF0E18-5430-44E4-8B68-4D54B5F3535D}
+
+
+
+
+ DataAbstract_ZeosDriver_D10.dpk
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ True
+ True
+
+
+ False
+
+ False
+ False
+ False
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True True
+ True
+
+
+
+ 0
+ 0
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+ RemObjects Data Abstract - Zeos Driver False
+
+
+
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1033
+ 1252
+
+
+ RemObjects Software
+
+ 1.0.0.0
+
+ RemObjects Software
+ RemObjects Software
+
+ RemObjects Data Abstract
+ 1.0.0.0
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D10.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D10.cfg
new file mode 100644
index 0000000..207b254
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D10.cfg
@@ -0,0 +1,49 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U+
+-$V+
+-$W+
+-$X+
+-$YD
+-$Z1
+-cg
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N0"..\..\Dcu\D10"
+-LE"..\..\Dcu\D10"
+-LN"..\..\Dcu\D10"
+-U"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-O"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-I"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-R"..\..\Dcu\D10;..\..\..\RemObjects SDK for Delphi\Dcu\D10"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D10.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D10.dpk
new file mode 100644
index 0000000..fa6c962
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D10.dpk
@@ -0,0 +1,39 @@
+package DataAbstract_ZeosDriver_D10;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE ON}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - Zeos Driver'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ ZComponentDesign,
+ RemObjects_Core_D10,
+ DataAbstract_Core_D10;
+
+contains
+ uDAZeosDriver in 'uDAZeosDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D10.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D10.res
new file mode 100644
index 0000000..6ef0ba1
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D10.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D11.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D11.dpk
new file mode 100644
index 0000000..8483957
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D11.dpk
@@ -0,0 +1,39 @@
+package DataAbstract_ZeosDriver_D11;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE ON}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - Zeos Driver'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ ZComponentDesign,
+ RemObjects_Core_D11,
+ DataAbstract_Core_D11;
+
+contains
+ uDAZeosDriver in 'uDAZeosDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D11.dproj b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D11.dproj
new file mode 100644
index 0000000..5711217
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D11.dproj
@@ -0,0 +1,73 @@
+
+
+ {a14f79c2-acbc-46d8-a339-5d13e7ddad81}
+ DataAbstract_ZeosDriver_D11.dpk
+ Debug
+ AnyCPU
+ DCC32
+ ..\..\Dcu\D11\DataAbstract_ZeosDriver_D11.bpl
+
+
+ 7.0
+ False
+ False
+ True
+ True
+ 0
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ RELEASE
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ 7.0
+ True
+ True
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ ..\..\Dcu\D11;..\..\..\RemObjects SDK for Delphi\Dcu\D11
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ Delphi.Personality
+ Package
+
+False True False RemObjects Data Abstract - Zeos Driver False False False True False 1 0 0 0 False False False False False 1033 1252 RemObjects Software 1.0.0.0 RemObjects Software RemObjects Software RemObjects Data Abstract 1.0.0.0 DataAbstract_ZeosDriver_D11.dpk
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D11.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D11.res
new file mode 100644
index 0000000..6ef0ba1
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D11.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D6.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D6.cfg
new file mode 100644
index 0000000..0aa2cb6
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D6.cfg
@@ -0,0 +1,41 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U+
+-$V+
+-$W+
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\..\Dcu\D6"
+-LE"..\..\Dcu\D6"
+-LN"..\..\Dcu\D6"
+-U"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-O"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-I"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-R"..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6"
+-Z
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D6.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D6.dof
new file mode 100644
index 0000000..1972ae0
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D6.dof
@@ -0,0 +1,77 @@
+[FileVersion]
+Version=6.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=1
+V=1
+W=1
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitDeprecated=0
+UnitLibrary=0
+UnitPlatform=0
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=Data Abstract - Zeos Driver
+
+[Directories]
+OutputDir=
+UnitOutputDir=..\..\Dcu\D6
+PackageDLLOutputDir=..\..\Dcu\D6
+PackageDCPOutputDir=..\..\Dcu\D6
+SearchPath=..\..\Dcu\D6;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D6
+Packages=
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software, Inc.
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=RemObjects Software, Inc.
+LegalTrademarks=RemObjects Software, Inc.
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+Comments=http://www.remobjects.com
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D6.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D6.dpk
new file mode 100644
index 0000000..95dba7c
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D6.dpk
@@ -0,0 +1,39 @@
+package DataAbstract_ZeosDriver_D6;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE ON}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - Zeos Driver'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ ZComponentDesign,
+ RemObjects_Core_D6,
+ DataAbstract_Core_D6;
+
+contains
+ uDAZeosDriver in 'uDAZeosDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D6.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D6.res
new file mode 100644
index 0000000..b26b84e
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D6.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D7.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D7.cfg
new file mode 100644
index 0000000..a290ad9
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D7.cfg
@@ -0,0 +1,50 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U+
+-$V+
+-$W+
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\..\Dcu\D7"
+-LE"..\..\Dcu\D7"
+-LN"..\..\Dcu\D7"
+-U"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-O"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-I"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-R"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D7.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D7.dof
new file mode 100644
index 0000000..cb208b6
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D7.dof
@@ -0,0 +1,117 @@
+[FileVersion]
+Version=7.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=1
+V=1
+W=1
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=RemObjects Data Abstract - Zeos Driver
+
+[Directories]
+OutputDir=
+UnitOutputDir=..\..\Dcu\D7
+PackageDLLOutputDir=..\..\Dcu\D7
+PackageDCPOutputDir=..\..\Dcu\D7
+SearchPath=..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7
+Packages=
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software, Inc.
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=RemObjects Software, Inc.
+LegalTrademarks=RemObjects Software, Inc.
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+Comments=http://www.remobjects.com
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D7.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D7.dpk
new file mode 100644
index 0000000..9cac616
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D7.dpk
@@ -0,0 +1,39 @@
+package DataAbstract_ZeosDriver_D7;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE ON}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - Zeos Driver'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ RemObjects_Core_D7,
+ DataAbstract_Core_D7,
+ ZComponentDesign;
+
+contains
+ uDAZeosDriver in 'uDAZeosDriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D7.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D7.res
new file mode 100644
index 0000000..b26b84e
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_D7.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_Glyphs.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_Glyphs.res
new file mode 100644
index 0000000..92bfe89
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/DataAbstract_ZeosDriver_Glyphs.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/Unsupported/DADOADriverHtml.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/Unsupported/DADOADriverHtml.res
new file mode 100644
index 0000000..8497330
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/Unsupported/DADOADriverHtml.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/Unsupported/DADOADrv.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/Unsupported/DADOADrv.cfg
new file mode 100644
index 0000000..2d0f732
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/Unsupported/DADOADrv.cfg
@@ -0,0 +1,41 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J+
+-$K-
+-$L+
+-$M-
+-$N+
+-$O-
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-E"..\..\..\Bin"
+-LE"c:\program files\borland\delphi7\Projects\Bpl"
+-LN"c:\program files\borland\delphi7\Projects\Bpl"
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_PLATFORM
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/Unsupported/DADOADrv.dpr b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/Unsupported/DADOADrv.dpr
new file mode 100644
index 0000000..6282793
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/Unsupported/DADOADrv.dpr
@@ -0,0 +1,15 @@
+library DADOADrv;
+
+uses
+ ShareMem,
+ Forms,
+ SysUtils,
+ Classes,
+ uDADOADriver in 'uDADOADriver.pas';
+
+{$E dad}
+
+{$R *.res}
+{$R DADOADriverHtml.res}
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/Unsupported/DADOADrv.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/Unsupported/DADOADrv.res
new file mode 100644
index 0000000..94795e8
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/Unsupported/DADOADrv.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/Unsupported/DOA.INC b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/Unsupported/DOA.INC
new file mode 100644
index 0000000..dbb6770
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/Unsupported/DOA.INC
@@ -0,0 +1,8 @@
+{ ******************************************************************************
+
+ Contains defines for different DOA versions
+
+ **************************************************************************** }
+
+// if using DOA 4.0 or higher activate this define
+{$DEFINE DOA4}
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/Unsupported/DataAbstract_DOADriver_D7.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/Unsupported/DataAbstract_DOADriver_D7.cfg
new file mode 100644
index 0000000..9e5fc23
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/Unsupported/DataAbstract_DOADriver_D7.cfg
@@ -0,0 +1,40 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\..\..\Dcu\D7"
+-LE"..\..\..\Dcu\D7"
+-LN"..\..\..\Dcu\D7"
+-Z
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/Unsupported/DataAbstract_DOADriver_D7.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/Unsupported/DataAbstract_DOADriver_D7.dof
new file mode 100644
index 0000000..8d7f5df
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/Unsupported/DataAbstract_DOADriver_D7.dof
@@ -0,0 +1,117 @@
+[FileVersion]
+Version=7.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=Data Abstract - Direct Oracle Access Driver
+
+[Directories]
+OutputDir=
+UnitOutputDir=
+PackageDLLOutputDir=
+PackageDCPOutputDir=
+SearchPath=
+Packages=
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+Comments=
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/Unsupported/DataAbstract_DOADriver_D7.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/Unsupported/DataAbstract_DOADriver_D7.dpk
new file mode 100644
index 0000000..959b541
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/Unsupported/DataAbstract_DOADriver_D7.dpk
@@ -0,0 +1,40 @@
+package DataAbstract_DOADriver_D7;
+
+{$R *.res}
+{$R 'uDADOADriver.dcr'}
+{$ALIGN 8}
+{$ASSERTIONS OFF}
+{$BOOLEVAL OFF}
+{$DEBUGINFO OFF}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS OFF}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS ON}
+{$RANGECHECKS ON}
+{$REFERENCEINFO OFF}
+{$SAFEDIVIDE ON}
+{$STACKFRAMES OFF}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'Data Abstract - Direct Oracle Access Driver'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl,
+ DataAbstract_Core_D7,
+ doa40d7;
+
+contains
+ uDADOADriver in 'uDADOADriver.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/Unsupported/DataAbstract_DOADriver_D7.res b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/Unsupported/DataAbstract_DOADriver_D7.res
new file mode 100644
index 0000000..c467631
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/Unsupported/DataAbstract_DOADriver_D7.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/Unsupported/uDADOADriver.dcr b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/Unsupported/uDADOADriver.dcr
new file mode 100644
index 0000000..3e5d914
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/Unsupported/uDADOADriver.dcr differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/Unsupported/uDADOADriver.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/Unsupported/uDADOADriver.pas
new file mode 100644
index 0000000..7bb3f3d
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/Unsupported/uDADOADriver.pas
@@ -0,0 +1,675 @@
+unit uDADOADriver;
+
+interface
+
+uses
+ DB,
+ Classes,
+ uROClasses,
+ uDAEngine,
+ uDAInterfaces,
+ uDAOracleInterfaces,
+ uDAUtils,
+ Oracle,
+ OracleData;
+
+type
+
+ TDADOADriver = class(TDADriverReference)
+ end;
+
+ TDAEDOADriver = class(TDAOracleDriver)
+ private
+ fTraceCallBack: TDALogTraceEvent; // UKO 26.09.2003
+ protected
+ procedure DoSetTraceOptions(TraceActive: Boolean; TraceOptions:
+ TDATraceOptions; Callback: TDALogTraceEvent); override;
+ function GetAvailableDriverOptions: TDAAvailableDriverOptions; override;
+ function GetConnectionClass: TDAEConnectionClass; override;
+ function GetDefaultCustomParameters: string; override;
+ function GetDescription: string; override;
+ function GetDriverID: string; override;
+
+ procedure GetAuxParams(const AuxDriver: string; out List: IROStrings); override;
+ end;
+
+ TDAEDOAConnection = class(TDAOracleConnection)
+ private
+ function GetOracleSession: TOracleSession;
+ protected
+ function CreateCompatibleQuery: IDADataset; override;
+ function CreateCustomConnection: TCustomConnection; override;
+ procedure DoApplyConnectionString(aConnStrParser: TDAConnectionStringParser; aConnectionObject: TCustomConnection); override;
+
+ function DoGetInTransaction: boolean; override;
+ function DoBeginTransaction: Integer; override;
+ procedure DoCommitTransaction; override;
+ procedure DoRollbackTransaction; override;
+ function GetDataSetClass: TDAEDatasetClass; override;
+ function GetStoredProcedureClass: TDAEStoredProcedureClass; override;
+ property OracleSession: TOracleSession read GetOracleSession;
+ end;
+
+ TDAEDOAQuery = class(TDAEDataSet, IOracleDataSet)
+ private
+ function LockModeDaToDoa(LockMode: TDAOracleLockMode): TLockingModeOptions;
+ function LockModeDoaToDa(LockMode: TLockingModeOptions): TDAOracleLockMode;
+ protected
+ procedure ClearParams; override;
+ function CreateDataset(aConnection: TDAEConnection): TDataset; override;
+ function DoExecute: Integer; override;
+ function DoGetSQL: string; override;
+ procedure DoPrepare(Value: Boolean); override;
+ procedure DoSetSQL(const Value: string); override;
+ function GetLockMode: TDAOracleLockMode;
+ function GetOptions: TDAOracleOptions;
+ procedure SetLockMode(Value: TDAOracleLockMode);
+ procedure SetOptions(Value: TDAOracleOptions);
+ procedure SetParamValues(Params: TDAParamCollection); override; safecall;
+ procedure GetParamValues(Params: TDAParamCollection); override; safecall;
+ end;
+
+ TDAEDOAStoredProcedure = class(TDAEStoredProcedure)
+ private
+ fProcedureName: string;
+ FConnection: TDAEDOAConnection;
+ procedure DoGetParams;
+ function DoGetParamsResult: TDAParam;
+ procedure DoSetSource;
+ protected
+ function CreateDataset(aConnection: TDAEConnection): TDataset; override;
+ function Execute: Integer; override;
+ function GetStoredProcedureName: string; override;
+ procedure RefreshParams; override;
+ procedure SetParamValues(Params: TDAParamCollection); override; safecall;
+ procedure GetParamValues(Params: TDAParamCollection); override; safecall;
+ procedure SetStoredProcedureName(const Name: string); override;
+ end;
+
+procedure Register;
+
+function GetDriverObject: IDADriver; stdcall;
+
+implementation
+
+{$INCLUDE DOA.INC}
+
+uses
+ SysUtils,
+ uDADriverManager,
+ {$IFDEF DOA4}
+ OracleMonitor,
+ {$ENDIF} uDARes;
+
+type
+ TDADOAInternalConnection = class(TCustomConnection)
+ private
+ fOracleSession: TOracleSession;
+ protected
+ procedure DoConnect; override;
+ procedure DoDisconnect; override;
+ function GetConnected: Boolean; override;
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ property Session: TOracleSession read fOracleSession;
+ end;
+
+ TOraPath = record
+ aScheme: string;
+ aPackage: string;
+ aObject: string;
+ end;
+
+var
+ _Driver: TDAEDriver = nil;
+
+procedure Register;
+begin
+ RegisterComponents(DAPalettePageName, [TDADOADriver]);
+end;
+
+function GetDriverObject: IDADriver;
+begin
+ if (_Driver = nil) then
+ _Driver := TDAEDOADriver.Create(nil);
+ Result := _Driver;
+end;
+
+
+function HandleSqlName(AParamName: string; AParamType: TDAParamType): string;
+begin
+ Result := AParamName;
+ if AParamType = daptResult then Result := 'result';
+end;
+
+function DataTypeDaToOra(AType: TDADataType): Integer;
+const
+ Error = 'INTERNAL: not supported by DOA';
+begin
+ Result := otString;
+ case AType of
+ datUnknown: raise Exception.Create(Error);
+ datGuid, datString: Result := otString;
+ datDateTime: Result := otDate;
+ datSingleFloat, datFloat, datCurrency: Result := otFloat;
+ datByte,
+ datShortInt,
+ datWord,
+ datCardinal,
+ datAutoInc,
+ datInteger,
+ datLargeInt: Result := otInteger;
+ datBoolean: Result := otInteger; // needs a special handling
+ datMemo: Result := otClob;
+ datBlob: Result := otBlob;
+ datXml, datWideString: Result := otVarchar2;
+ datWideMemo : Result := otNCLOB;
+ datLargeAutoInc, datLargeUInt,datDecimal : Result := otNumber;
+ end;
+end;
+
+procedure SetDataSetParams(Params: TDAParamCollection; DataSet: TDataSet);
+var
+ I: Integer;
+ Ds: TOracleDataSet;
+ ParamIndex, OraType: Integer;
+ Name: string;
+begin
+ Ds := TOracleDataSet(DataSet);
+ if Ds.Variables.Count > Params.Count then
+ for I := Ds.VariableCount - 1 downto 0 do
+ if Params.ParamByName(Ds.VariableName(I)) = nil then
+ Ds.DeleteVariable(Ds.VariableName(I));
+
+ for I := 0 to Params.Count - 1 do
+ begin
+ ParamIndex := Ds.VariableIndex(Params[I].Name);
+ Name := HandleSqlName(Params[I].Name, Params[I].ParamType);
+ OraType := DataTypeDaToOra(Params[I].DataType);
+ // New Param
+ if ParamIndex = -1 then
+ Ds.DeclareVariable(Name, OraType);
+ // Changed Param
+ if (ParamIndex > -1) and (Ds.VariableType(ParamIndex) <> DataTypeDaToOra(
+ Params[I].DataType)) then
+ begin
+ Ds.DeleteVariable(Params[I].Name);
+ Ds.DeclareVariable(Name, OraType);
+ end;
+ // Set value
+ if Params[I].DataType = datBoolean then
+ Ds.SetVariable(Name, Integer(Params[I].Value))
+ else
+ Ds.SetVariable(Name, Params[I].Value);
+ end;
+end;
+
+{ INTERNAL CLASSES *********************************************************** }
+{
+*************************** TDADOAInternalConnection ***************************
+}
+
+constructor TDADOAInternalConnection.Create(AOwner: TComponent);
+begin
+ inherited;
+ fOracleSession := TOracleSession.Create(nil);
+end;
+
+destructor TDADOAInternalConnection.Destroy;
+begin
+ fOracleSession.Free;
+ inherited;
+end;
+
+procedure TDADOAInternalConnection.DoConnect;
+begin
+ fOracleSession.LogOn;
+end;
+
+procedure TDADOAInternalConnection.DoDisconnect;
+begin
+ fOracleSession.LogOff;
+end;
+
+function TDADOAInternalConnection.GetConnected: Boolean;
+begin
+ Result := fOracleSession.Connected;
+end;
+
+{ PUBLIC CLASSES ************************************************************* }
+{
+******************************** TDAEDOADriver *********************************
+}
+
+// -----------------------------------------------------------------------------
+// TDAEDOADriver.DoSetTraceOptions
+//
+// Tracing can only be enabled when DOA Version 4.0 or higher is used.
+// UKO 26.09.2003 21:14:47
+//
+
+procedure TDAEDOADriver.DoSetTraceOptions(TraceActive: Boolean; TraceOptions:
+ TDATraceOptions; Callback: TDALogTraceEvent);
+begin
+ inherited;
+
+ if TraceActive then
+ begin
+ fTraceCallBack := Callback;
+
+ {$IFDEF DOA4}
+ EnableMonitor;
+ {$ENDIF}
+ end
+ else
+ begin
+ fTraceCallBack := nil;
+
+ {$IFDEF DOA4}
+ DisableMonitor;
+ {$ENDIF}
+ end;
+
+end;
+
+procedure TDAEDOADriver.GetAuxParams(const AuxDriver: string;
+ out List: IROStrings);
+begin
+ inherited;
+end;
+
+// -----------------------------------------------------------------------------
+// TDAEDOADriver.GetAvailableDriverOptions
+//
+// Only Database, Login and Custom needed. doServerName is not needed !
+//
+// UKO 25.09.2003 17:51:31
+//
+
+function TDAEDOADriver.GetAvailableDriverOptions: TDAAvailableDriverOptions;
+begin
+ Result := [doDatabaseName, doLogin{, doCustom}];
+end;
+
+function TDAEDOADriver.GetConnectionClass: TDAEConnectionClass;
+begin
+ Result := TDAEDOAConnection;
+end;
+
+function TDAEDOADriver.GetDefaultCustomParameters: string;
+begin
+ Result:='';
+end;
+
+function TDAEDOADriver.GetDescription: string;
+begin
+ Result := 'Direct Oracle Access Driver';
+end;
+
+function TDAEDOADriver.GetDriverID: string;
+begin
+ Result := 'DOA';
+end;
+
+{
+****************************** TDAEDOAConnection *******************************
+}
+
+function TDAEDOAConnection.CreateCompatibleQuery: IDADataset;
+begin
+ Result := inherited CreateCompatibleQuery;
+ OracleSession.LogOn;
+end;
+
+function TDAEDOAConnection.CreateCustomConnection: TCustomConnection;
+begin
+ Result := TDADOAInternalConnection.Create(nil);
+end;
+
+// -----------------------------------------------------------------------------
+// TDAEDOAConnection.CreateMacroProcessor
+//
+// UKO 25.09.2003 18:43:06
+//
+
+
+// -----------------------------------------------------------------------------
+// TDAEDOAConnection.DoApplyConnectionString
+//
+// Use Database instead of Server. Server has no meaning in Oracle
+// UKO 25.09.2003 17:54:25
+//
+
+procedure TDAEDOAConnection.DoApplyConnectionString(aConnStrParser: TDAConnectionStringParser; aConnectionObject: TCustomConnection);
+begin
+ inherited;
+ with aConnStrParser do begin
+ OracleSession.LogonDatabase := Database;
+ OracleSession.LogonUsername := UpperCase(UserID);
+ OracleSession.LogonPassword := Password;
+ end;
+end;
+
+function TDAEDOAConnection.DoBeginTransaction: Integer;
+begin
+ // DOA doesn't have any special transaction starting routines
+ Result := 0;
+end;
+
+procedure TDAEDOAConnection.DoCommitTransaction;
+begin
+ OracleSession.Commit;
+end;
+
+function TDAEDOAConnection.DoGetInTransaction: boolean;
+begin
+ Result := OracleSession.InTransaction;
+end;
+
+procedure TDAEDOAConnection.DoRollbackTransaction;
+begin
+ TOracleSession(inherited ConnectionObject).Rollback;
+end;
+
+function TDAEDOAConnection.GetDataSetClass: TDAEDatasetClass;
+begin
+ Result := TDAEDOAQuery;
+end;
+
+function TDAEDOAConnection.GetOracleSession: TOracleSession;
+begin
+ Result := TDADOAInternalConnection(inherited ConnectionObject).Session;
+end;
+
+
+
+function TDAEDOAConnection.GetStoredProcedureClass: TDAEStoredProcedureClass;
+begin
+ Result := TDAEDOAStoredProcedure;
+end;
+
+// -----------------------------------------------------------------------------
+// TDAEDOAConnection.IdentifierNeedsQuoting
+//
+// Default behavior not enough, as '$' and '.' are also a valid character which doesn´t need quoting
+//
+// UKO 25.09.2003 11:48:13
+//
+
+{
+********************************* TDAEDOAQuery *********************************
+}
+
+procedure TDAEDOAQuery.ClearParams;
+begin
+ inherited;
+ TOracleDataSet(Dataset).ClearVariables;
+end;
+
+function TDAEDOAQuery.CreateDataset(aConnection: TDAEConnection): TDataset;
+begin
+ Result := TOracleDataSet.Create(nil);
+ TOracleDataSet(Result).ReadOnly := True;
+ TOracleDataSet(Result).Session := TDAEDOAConnection(aConnection).OracleSession;
+end;
+
+function TDAEDOAQuery.DoExecute: Integer;
+begin
+ TOracleDataSet(DataSet).ExecSQL;
+ Result := -1;
+end;
+
+function TDAEDOAQuery.DoGetSQL: string;
+begin
+ Result := TOracleDataSet(Dataset).SQL.Text;
+end;
+
+procedure TDAEDOAQuery.DoPrepare(Value: Boolean);
+begin
+ TOracleDataSet(DataSet).Optimize := Value;
+end;
+
+procedure TDAEDOAQuery.DoSetSQL(const Value: string);
+begin
+ TOracleDataSet(Dataset).SQL.Text := Value;
+end;
+
+function TDAEDOAQuery.GetLockMode: TDAOracleLockMode;
+begin
+ Result := LockModeDoaToDa(TOracleDataSet(Dataset).LockingMode)
+end;
+
+function TDAEDOAQuery.GetOptions: TDAOracleOptions;
+begin
+ // Can't be implemented
+end;
+
+procedure TDAEDOAQuery.GetParamValues(Params: TDAParamCollection);
+var
+ i: integer;
+ par: TDAParam;
+ ds: TOracleDataSet;
+begin
+ ds := TOracleDataSet(Dataset);
+ if not Assigned(ds.Variables) then Exit;
+
+ for i := 0 to (ds.VariableCount - 1) do begin
+ par := Params.ParamByName(ds.VariableName(i));
+ if par.ParamType in [daptOutput, daptInputOutput, daptResult] then
+ par.Value := ds.GetVariable(i);
+ end;
+end;
+
+function TDAEDOAQuery.LockModeDaToDoa(LockMode: TDAOracleLockMode):
+ TLockingModeOptions;
+begin
+ Result := lmNone;
+ case LockMode of
+ olmLockImmediate: Result := lmLockImmediate;
+ olmLockDelayed: Result := lmLockDelayed;
+ end;
+end;
+
+function TDAEDOAQuery.LockModeDoaToDa(LockMode: TLockingModeOptions):
+ TDAOracleLockMode;
+begin
+ Result := olmNone;
+ case LockMode of
+ lmLockImmediate: Result := olmLockImmediate;
+ lmLockDelayed: Result := olmLockDelayed;
+ end;
+end;
+
+procedure TDAEDOAQuery.SetLockMode(Value: TDAOracleLockMode);
+begin
+ TOracleDataSet(Dataset).LockingMode := LockModeDaToDoa(Value);
+end;
+
+procedure TDAEDOAQuery.SetOptions(Value: TDAOracleOptions);
+begin
+ // Can't be implemented
+end;
+
+procedure TDAEDOAQuery.SetParamValues(Params: TDAParamCollection);
+begin
+ SetDataSetParams(Params, DataSet);
+end;
+
+{
+**************************** TDAEDOAStoredProcedure ****************************
+}
+
+function TDAEDOAStoredProcedure.CreateDataset(aConnection: TDAEConnection): TDataset;
+begin
+ Result := TOracleDataSet.Create(nil);
+ FConnection := TDAEDOAConnection(aConnection);
+ TOracleDataSet(Result).Session := TDAEDOAConnection(aConnection).OracleSession;
+end;
+
+procedure TDAEDOAStoredProcedure.DoGetParams;
+var
+ Ds: TOracleDataSet;
+ I: Integer;
+ Params: TDAParamCollection;
+begin
+ Params := GetParams;
+ Ds := TOracleDataSet(DataSet);
+ for I := 0 to Params.Count - 1 do
+ if Params[I].ParamType in [daptOutput, daptInputOutput, daptResult] then
+ Params[I].Value := Ds.GetVariable(HandleSqlName(Params[I].Name, Params[I].ParamType));
+end;
+
+function TDAEDOAStoredProcedure.DoGetParamsResult: TDAParam;
+var
+ I: Integer;
+ Params: TDAParamCollection;
+begin
+ Result := nil;
+ Params := GetParams;
+ for I := 0 to Params.Count - 1 do
+ if Params[I].ParamType = daptResult then
+ begin
+ Result := Params[I];
+ Exit;
+ end;
+end;
+
+procedure TDAEDOAStoredProcedure.DoSetSource;
+var
+ Ds: TOracleDataSet;
+ I: Integer;
+ Params: TDaParamCollection;
+ ParamResult: TDAParam;
+ ParamsExist: Boolean;
+
+const
+ SQLHeader = 'declare' + sLineBreak +
+ ' result boolean;' + sLineBreak +
+ 'begin' + sLineBreak;
+ SQLHandleBoolean = ':result := sys.diutil.bool_to_int(function_result);';
+ SQLFooter = 'end;';
+
+ function CaseOfParam(const AParamResult: TDAParam): Integer;
+ begin
+ Result := 0;
+ if AParamResult <> nil then
+ if AParamResult.DataType = datBoolean then
+ Result := 1
+ else
+ Result := 2;
+ end;
+
+ function ConvertParam(const AName: string; const ADataType: TDADataType):
+ string;
+ begin
+ if ADataType = datBoolean then
+ begin
+ Result := Format('%s => sys.diutil.int_to_bool(:%s), ', [AName, AName]);
+ Exit;
+ end;
+ Result := Format('%s => :%s, ', [AName, AName]);
+ end;
+
+ function TrimSqlParams(const SQL: string): string;
+ var
+ S: string;
+ begin
+ S := SQL;
+ Delete(S, Length(S) - 3, 4);
+ Result := S;
+ end;
+
+begin
+ Ds := TOracleDataSet(DataSet);
+ Params := GetParams;
+ ParamResult := DoGetParamsResult;
+ // PL/SQL Block - header + stored proc name
+ Ds.SQL.Text := SQLHeader;
+ case CaseOfParam(ParamResult) of // 0 = no result, 1 = boolean, 2 = misc
+ 0: Ds.SQL.Add(Format(' %s(', [fProcedureName]));
+ 1: Ds.SQL.Add(Format(' result := %s(', [fProcedureName]));
+ 2: Ds.SQL.Add(Format(' :result := %s(', [fProcedureName]));
+ end;
+ // PL/SQL Block - params if any;
+ ParamsExist := False;
+ for I := 0 to Params.Count - 1 do
+ if (Params.Items[I] <> ParamResult) then
+ begin
+ ParamsExist := True;
+ Ds.SQL.Add(ConvertParam(Params[I].Name, Params[I].DataType));
+ end;
+ // PL/SQL Block - params - remove the last half-stop
+ if ParamsExist then
+ Ds.SQL.Text := TrimSQLParams(Ds.SQL.Text);
+ Ds.SQL.Add(');');
+ // PL/SQL Block - special treatment for functions with boolean results
+ if ParamResult.DataType = datBoolean then
+ Ds.SQL.Add(SQLHandleBoolean);
+ Ds.SQL.Add(SQLFooter);
+end;
+
+function TDAEDOAStoredProcedure.Execute: Integer;
+var
+ Params: TDAParamCollection;
+begin
+ Params := GetParams;
+ SetDataSetParams(Params, DataSet);
+ DoSetSource;
+ TOracleDataSet(DataSet).ExecSQL;
+ DoGetParams;
+ Result := -1;
+end;
+
+function TDAEDOAStoredProcedure.GetStoredProcedureName: string;
+begin
+ Result := fProcedureName;
+end;
+
+procedure TDAEDOAStoredProcedure.RefreshParams;
+var
+ OraParams: TDAParamCollection;
+begin
+ Oracle_DoGetStoredProcedureParams(fProcedureName, FConnection.CreateCompatibleQuery,OraParams);
+ GetParams.AssignParamCollection(OraParams);
+end;
+
+procedure TDAEDOAStoredProcedure.GetParamValues(Params: TDAParamCollection);
+var
+ i: integer;
+ par: TDAParam;
+ ds: TOracleDataSet;
+begin
+ ds := TOracleDataSet(Dataset);
+ if not Assigned(ds.Variables) then Exit;
+
+ for i := 0 to (ds.VariableCount - 1) do begin
+ par := Params.ParamByName(ds.VariableName(i));
+ if par.ParamType in [daptOutput, daptInputOutput, daptResult] then
+ par.Value := ds.GetVariable(i);
+ end;
+end;
+
+procedure TDAEDOAStoredProcedure.SetParamValues(Params: TDAParamCollection);
+begin
+ SetDataSetParams(Params, DataSet);
+end;
+
+procedure TDAEDOAStoredProcedure.SetStoredProcedureName(const Name: string);
+begin
+ fProcedureName := Name;
+end;
+
+exports
+ GetDriverObject name func_GetDriverObject;
+
+initialization
+ _Driver := nil;
+ RegisterDriverProc(GetDriverObject);
+
+finalization
+ UnregisterDriverProc(GetDriverObject);
+ FreeAndNil(_Driver);
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/asgsqlite3.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/asgsqlite3.pas
new file mode 100644
index 0000000..6220b65
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/asgsqlite3.pas
@@ -0,0 +1,5560 @@
+// To enable debugging remove the dot. Do NOT forget to re-insert before
+// deploying to production since this feature will slow down this component
+// significantly
+{.$DEFINE DEBUG_ENABLED } // Enables Debug information
+ {.$DEFINE DEBUG_VERY_LOUD}
+ {.$DEFINE DEBUG_LOUD}
+
+// Disable this for ignoring IProvider interface (for D4)
+{$DEFINE IPROVIDER}
+
+// enable this if you want to link the SQLite library statically. (No need for dll)
+{.$DEFINE SQLite_Static}
+
+{$I asqlite_def.inc}
+
+unit ASGSQLite3;
+{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+Author: Albert Drent
+Description: SQLite 3 DataSet class (encapsulates the Delphi DataSet Class)
+ based upon the asqlite version for sqlite 2
+Target: Delphi 4, 5, 6 and 7; Delphi 2005; Borland C++ 5 and 6
+Creation: November 2003
+Version: 2006.03.D Stable
+EMail: a.drent@aducom.com (www.aducom.com/sqlite, sqlite.aducom.com)
+Support: support@aducom.com (supportforum on www.aducom.com)
+ Please post any questions, remarks etc. to the support forum. We
+ useually answer questions within days.
+ Unsollicited mail to support will be intercepted by our spamfilters
+ and probabely never be heard of.
+Legal issues: Copyright (C) 2003..2006 by Aducom Software
+
+ Aducom Software
+ Eckhartstr 61
+ 9746 BN Groningen
+ Netherlands
+
+ Open Source licence (BSD: http://www.opensource.org/licenses/bsd-license.php)
+
+ Copyright (c) 2006, Aducom Software
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification,
+ are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+ Neither the name of Aducom Software nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+
+
+Acknowledgement
+ These components were written for our own needs. Since SQLite is
+ a freeware component we like to donate this one to the community
+ too. Parts of the code is adapted from several sources, but mainly
+ from a sample and the vcl sources of Borland itself. And, of
+ course, we did a lot and still are...
+To Do
+ A lot...
+ We are very busy, but will develop on our needs. If anyone can
+ contribute, please feel welcome. Alter the source with lots of comment
+ and mail it to me. If it works right I will add it to the official
+ source and add your credit here below. Before you start, please
+ put a request on the forum. It would be a shame and a waste of your
+ time if you develop something which already is... and I need to set
+ the spamfilter right to let you pass through.
+History:
+ Nov 8, 2003 First alpha release 1.0.A Albert Drent (c) 2003 Aducom Software
+ Nov 11, Release alpha 1.0.B Albert Drent (c) 2003 Aducom Software
+ - added 'param' support
+ - fixed null pointer assignment
+ - added support for partial select (limit / offset)
+ Nov 12, Release alpha 1.0.C Albert Drent (c) 2003 Aducom Software
+ - fixed bug in update
+ - support for events
+ - added 'RowsAffected'
+ Nov 16, Release beta 1.0.D Albert Drent (c) 2003 Aducom Software
+ - fixed 0 resultlist after any ExecSQL usage
+ - added Transaction support
+ Nov 24, Release beta 1.0.E Albert Drent (c) 2003 Aducom Software
+ - StartTransaction will open database if it is'nt already open
+ - Changed resultset method
+ - Added property editor for table names
+ - Added GetTableNames function to TASQLite3Database
+ - Added GetIndexNames function to TASQLite3Database
+ - Added Open and Close function to TASQLite3Database
+ - Added AutoCommit property to TDataSet descendants
+ - Split of source in designtime and runtime package
+ Dec 15, Release beta 1.0.F Albert Drent (c) 2003 Aducom Software
+ - Optimized code for speed
+ - Added support for quering databases
+ - Added property for base directory (default dir) TDatabase
+ - Preparations for mastersets and TUpdateSQL (not functional yet)
+ - Solved GPF on stringfields
+ - Solved hangup of Delphi when developing
+ - Solved invalid pointer operation bug while developing
+ Jan 11 2004, Release beta 1.0.G Albert Drent (c) 2003, 2004 Aducom Software
+ - Fixed GetTableNames Bug as reported on forum
+ - Solved some minor bugs, several code optimizations
+ - Added 'getfieldnames' procedure to asqlitedb
+ - Added component asqlitepragma for adjustments to sqlite behaviour
+ - Added several property editors to smooth things up
+ - Added component asqliteupdatesql
+ - Added master-detail support for TASQLite3table (not fully tested yet)
+ - Added master-detail support for TASQLite3query (not fully tested yet)
+ - Added filter property to TASQLite3Query
+ Jan 18, 2004, Release beta 1.0.H Albert Drent (c) 2003, 2004 Aducom Software
+ - Added TASQLite3Log component
+ - Support for autoincrement (index primary key)
+ Jan 22, 2004, Release beta 1.0.I Albert Drent (c) 2003, 2004 Aducom Software
+ - Solved bug, causing the user to open database first (where
+ it should be opened automatically after open query or table.
+ - datatype text is now treated as a string of max 255 chars.
+ - added samples
+ - added preparations for import and export component
+ Jan 26, 2004, Release beta 1.1.A Albert Drent (c) 2003, 2004 Aducom Software
+ - Support for master-detail
+ - Support for TUpdateSQL
+ Feb 05, 2004, Release beta 1.1.B Albert Drent (c) 2003, 2004 Aducom Software
+ - Solved small bug: basequery is closed on querychanged event
+ - Solved small bug: basequery is closed on filter change event
+ - Solved bug in design package, by Marc Wetzel(forum)
+ - Notification of BaseQuery removed and added to SQLiteTable
+ Feb 24, 2004 Release alpha 1.2.A Albert Drent (c) 2003, 2004 Aducom Software
+ - Locate implemented, working on resultset!
+ - Some small bugfixes
+ Feb 25, 2004 Release alpha 1.2.B Albert Drent (c) 2003, 2004 Aducom Software
+ - Reformat of source (Marc Wetzel)
+ - All the debug directives (Marc Wetzel)
+ The debug stuff is added to be able to do more debugging on the
+ components. At this stage there are still some isues which are
+ hard to be find.
+ - Some small bugfixes (Marc Wetzel)
+ - Solved bug with dblookupcombobox, lookup is now shown (variant error)
+ - Derived more classes from TDataset to solve compatibility isues with
+ 3rd party software (DevExpress)
+ - Start of port to lower Delphi versions (designintf vs dsgnintf)
+ March 25, 2004 Release alpha 1.2.C Albert Drent (c) 2003, 2004 Aducom Software
+ - Added property editor for database directory
+ - Added property editor for sqlitedll directory
+ - Bugix needed for release 13 of SQLite.dll (is compatible to lower
+ dll versions)
+ - More changes to solve compatibility problem with DevExpress (Plato of DevExpress)
+ - Solved some compatibility isues with TDataSet
+ - Solved some compatibility isues with the newest SQLite version (2.8.12)
+ - Added/modified, GetFieldNames, GetPrimaryKeys
+ - Added GetTableInfo
+ - Added StartTransaction and Commit and RollBack to TTable and TQuery
+ This will create a more readable source:
+ db.starttranaction;
+ q.somesql
+ db.commit
+ becomes now
+ with q do begin
+ starttransaction;
+ somesql;
+ try
+ commit;
+ except
+ rollback;
+ end;
+ end;
+ - Changed cleanup of components in notification (TheSneak)
+ - Fixed potential AV (so far not reported)
+ - Changed escape of string characters (TheSneak)
+ (might cause incompatibility of older components if you use single
+ quote in data)
+ - Fixed question mark problem in data (TheSneak)
+ April 7, 2004
+ - Fixed bug GetxxxxNames, moved pragma (reported by Martini)
+ - Improved some performance isues (TheSneak)
+ - Added GetTableIndexNames(by Martini)
+ - Added support for 'small text blobs', it isn't the real stuff but
+ limited to 20000 characters.
+ - Fixed another compatibility isue with DevExpress
+ April 8, 2004
+ - Fixed EnableControls (TheSneak)
+ - Fixed memoryleak ASQLiteQuery.InternalPost (TheSneak)
+ - Downgraded some stuff for support Delphi 4/5
+ - Updated Locate function (by Joel hottcha@juno.com)
+ April 14, 2004 Release beta 1.2.C Albert Drent (c) 2003, 2004 Aducom Software
+ - RawSQL property implemented (supresses parsing of sql data)
+ - published csv release as 1.2.C beta
+ April 15, 2004 Release alpha 2.0.A Albert Drent (c) 2003, 2004 Aducom Software
+ - support for real clobs
+ - added fieldtype numeric(x.y)
+ - Implement RawSQL property in TASQLite3Query
+ May 26, 2004 Release beta 2.0.B Albert Drent (c) 2003, 2004 Aducom Software
+ - new procedure: GetGetLastInsertRow
+ - new component: TASQLite3InlineSQL, to be used to contain all
+ kinds of pre-stored sql statements. I.e. for creation of tables in case
+ of an in-memory database, or a local storage for sql statements to
+ simplify sourcecode. In this release it is bound to the ASQLiteDB component.
+ - new component TASQLite3Output, to be used to generate csv files,
+ xml and html documents. It is NOT bound to ASQLite components but
+ to a datasource (containing any database connection)
+ - implemented bound as described by minhl on the forum
+ - implemented IsNull as described by Kazooie64 on the forum
+ - implemented a uniform datetime implementation by jpierce
+ May, 26, 2004 Release beta 2.0.B Albert Drent (c) 2003, 2004 Aducom Software
+ - A few bugfixes
+ June, 15, 2004 Release beta 2.0.C Albert Drent (c) 2003, 2004 Aducom Software
+ - A few bugfixes, thanks to Tzvetan
+ July 2004, Release 1.0 based upon source sqlite version 2 components
+ Okt 11, 2004 Release beta 1.0.B Albert Drent (c) 2003, 2004 Aducom Software
+ - Callback routine for retieving data replaced by new
+ by sqlite prefered way.
+ - Some bugfixes
+ - Support for calculated fields
+ - Support for real blobs
+ okt 14, 2004 Release beta 1.0.C Albert Drent (c) 2003, 2004 Aducom Software
+ - support for locate lo-partial key (thanks to Bob Mitchel)
+ - some bugfixes (thanks to Oleg Lembievskiy marked by OL)
+ - some other bugfixes and code cleanup
+ okt 18, 2004
+ - re-introduced sqlite_version
+ - added transactiontype property(SQLite3 feature)
+ - added transaction procedures to db and basequery
+ StartDeferredTransaction;
+ StartImmediateTransaction;
+ StartExclusiveTransaction;
+ nov 1, 2004
+ - bugfix (thanx to James) for null pointer assignment on null values
+ nov 8, 2004
+ - fixed introduced bug in result preventing new records to appear
+ right in dbgrids.
+ nov 17, 2004
+ - fixed small bug showing rubish on empty tables
+ Nov 17, 2004 by Mike Dijkema
+ - filter bug FPrepared := FPrepared + ' and ' + Filter adds ' and filterexpr' to the end of the sql statement
+ this created errors with 'order by' 'limit' 'union' 'having' etc..
+ filtering changed to that it works like the ADO components and union and other statements
+ now 'select a from b union select c from d' and 'select a from b order by c' works with a filter
+ - filter bug 'select a_where from b' removed
+ jan 11, 2005 Release 2005.01.A Albert Drent (c) 2003 .. 2005 Aducom Software
+ - fixed bug causing fielddescription to be deleted incorrectly
+ - fixed bug causing errormessage on null values in integer fields
+ - added sqlcursor property
+ - modifications to support Delphi 2005
+ - implemented all transactiontypes
+ - changed all showmessages to raise event types
+ - added readonly property
+ feb 21, 2005 Release 2005.02.A Albert Drent (c) 2003 .. 2005 Aducom Software
+ - some bugfixes, code optimization
+ - first implementation of IProvider support (thanks to
+ Rocco Barbaresco)
+ - changed default SDB extension to SQB
+ - support for multi sql statements in one string
+ - added master-detail functionality on insert of
+ new child record (key-data is copied)
+ - added compatibility with SQLite3.dll version 3.1.2
+ feb 28, 2005 Release 2005.02.B Albert Drent (c) 2003 .. 2005 Aducom Software
+ - bugfix for filter on master-detail. Setting filtered will
+ not automatical open table any more. Causes error on closed
+ tables in master-detail otherwise.
+ mar 7, 2005 Release 2005.03.A Albert Drent (c) 2003 .. 2005 Aducom Software
+ - bugfix for memofields causing crlf to be handled wrongly
+ - added TableExists function ('// DI Ralf http://www.yunqa.de/delphi/)
+ - some code optimizations ('// DI Ralf http://www.yunqa.de/delphi/)
+ - solved decimalpoint bug ('// DI Ralf http://www.yunqa.de/delphi/)
+ mar 10, 2005 Release 2005.03.B Albert Drent (c) 2003 .. 2005 Aducom Software
+ - more code optimizations
+ - removed Forms from uses list to decrease codesize of console app's
+ - changed cursorstyle handling
+ - changed exception handling
+ mar 29, 2005 Release 2005.03.C Albert Drent (c) 2003 .. 2005 Aducom Software
+ - removed default pragma's for tables
+ - implemented another solution for tableheader duplicates (mirko)
+ - implemented user version
+ - solved minor bug in GetTableInfo
+ april 5, 2005 Release 2005.04.A Albert Drent (c) 2003 .. 2005 Aducom Software
+ - fixed bug conceirning in-memory database (Bert Verhees)
+ - fixed precompiler settings for Delhpi 7 (Dak)
+ mai 31, 2005 Release 2005.05.A Albert Drent (c) 2003 .. 2005 Aducom Software
+ - UTF8 support (thanks to Bilgehan KUYUCU)
+ - Statical linking (thanks to Gianpaolo Avallone (GPA)
+ - Some bugfixes and enhancements by Albert, Gianpaolo and others.
+ august 1, 2005 Release 2005.08.A
+ - UTF8 support to be set by property, solving a 'locale' problem.
+ - Bugfix for null strings
+ - Fix for static linking
+ - Solved bug in updatesql, fieldlist is now setup correctly
+ - solved bug in updatesql, inserting null values and constants.
+ august 2, 2005 Release 2005.08.B
+ - first steps towards support utf16 (by Kevin Zhang)
+ - implemented another locate routine (by jbannon)
+ - changed treatment of datatype text. It is considered 'longtext' now.
+ added 'shorttext' datatype which replaces the original 'text' datatype.
+ The datatype text is now compatible with sqlite3, mysql and perhaps
+ others.
+ sept 1, 2005 Release 2005.09.A
+ - code optimizations by Kevin Lu, Aducom
+ sept 1, 2005 Release 2005.09.B
+ - candidate fix for decimal point problem by Jordi March
+ sept 20, 2005 Release 2005.09.C
+ - implementation of unidirectional dataset. This improves
+ performance on large resultsets to the optimum. However
+ the dataset is readonly by default, using inserts/deletes and
+ updates will result in a 'database table is locked' error.
+ sept 21, 2005 Release 2005.09.D
+ - bugfix for decimal point routine by Kevin Lu
+ sept 29, 2005 Release 2005.09.E
+ - bugfix for unidirectional dataset.
+ - bugfix for split of prepare and execute. Data was not updated
+ correctly
+ nov 1, 2005 Release 2005.11.A
+ - Code improvements
+ - First (alpha) implementation of Lookup field (By John Lito)
+ dec 14, 2005 Release 2005.12.A
+ - Check for null values
+ jan 5, 2006 Release 2006.01.A
+ - fixed unidirectional bug (I)
+ jan 9, 2006 Release 2006.01.B
+ - fixed unidirectional bug (II)
+ - automatically will close table if tablename property is changed
+ while a table is still open.
+ - automatically close query if sql property is changed while a table
+ is still open.
+ - fixes for compilation under D4
+ - changes for installation under Delphi 2005 and 2006
+ - changes of copyright notice, the components are now under
+ open-source bsd licence.
+ feb 22, 2006 Release 2006.02.A
+ - Changed status to stable
+ mar 2, 2006 Release 2006.03.A
+ - Modifications for D4/D5
+ - Added order by property. Enter fieldnames separated by ','
+ - Added GetIndexFieldNames (thanks to zavu10n)
+ - Database will be reopened if necessary on filter change
+ - Fixes by Donnie
+ - New routine for dates and floates by Donnie
+ mar 8, 2006 Release 2006.03.B
+ - Fixed small bug causing text treated as char 255, is now memo.
+ mar 15, 2006 Release 2006.03.C
+ - Added switch for compilation under D4/D5 (Art Register)
+ - DBOpen change for utf8 by John Lito
+ - SQLCursor fix
+ - GetFieldValue fix by Velis
+ mar 23, 2006 Release 2006.03.D
+ - Compatibility fixes for D45 (Art Register)
+ - changed D45 directive to $IFDEF ASQLITE_D6PLUS so
+ compilation should work automatically now
+ - changed cr cr/lf pairs for compatibilty with D4/D5
+ - added CompareBookmarks to support multiple selection
+ in DBGrid (Michael S)
+ - added support for char *nothing* datatype (was char(1) now char is allowed)
+
+
+
+*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * }
+
+
+interface
+
+uses
+ DB,
+ DBCommon,
+ Dialogs,
+ Classes,
+ Windows,
+ SysUtils,
+{$IFDEF ASQLITE_D6PLUS}
+ Variants,
+{$ENDIF}
+ ASGRout3;
+const
+ SQLiteVersion = 'ASGSQLite V2006.03.D stable';
+
+ MaxBuf = 30000; // max stringbuffer for record (length) (excluding blob's)
+ SQLITE_OK = 0; // Successful result */
+ SQLITE_ERROR = 1; // SQL error or missing database */
+ SQLITE_INTERNAL = 2; // An internal logic error in SQLite */
+ SQLITE_PERM = 3; // Access permission denied */
+ SQLITE_ABORT = 4; // Callback routine requested an abort */
+ SQLITE_BUSY = 5; // The database file is locked */
+ SQLITE_LOCKED = 6; // A table in the database is locked */
+ SQLITE_NOMEM = 7; // A malloc() failed */
+ SQLITE_READONLY = 8; // Attempt to write a readonly database */
+ SQLITE_INTERRUPT = 9; // Operation terminated by sqlite_interrupt() */
+ SQLITE_IOERR = 10; // Some kind of disk I/O error occurred */
+ SQLITE_CORRUPT = 11; // The database disk image is malformed */
+ SQLITE_NOTFOUND = 12; // (Internal Only) Table or record not found */
+ SQLITE_FULL = 13; // Insertion failed because database is full */
+ SQLITE_CANTOPEN = 14; // Unable to open the database file */
+ SQLITE_PROTOCOL = 15; // Database lock protocol error */
+ SQLITE_EMPTY = 16; // (Internal Only) Database table is empty */
+ SQLITE_SCHEMA = 17; // The database schema changed */
+ SQLITE_TOOBIG = 18; // Too much data for one row of a table */
+ SQLITE_CONSTRAINT = 19; // Abort due to contraint violation */
+ SQLITE_MISMATCH = 20; // Data type mismatch */
+ SQLITE_MISUSE = 21; // Library used incorrectly */
+ SQLITE_NOLFS = 22; // Uses OS features not supported on host */
+ SQLITE_AUTH = 23; // Authorization denied */
+ SQLITE_ROW = 100; // sqlite_step() has another row ready */
+ SQLITE_DONE = 101; // sqlite_step() has finished executing */
+
+ SQLITE_CREATE_INDEX = 1; // Index Name Table Name */
+ SQLITE_CREATE_TABLE = 2; // Table Name NULL */
+ SQLITE_CREATE_TEMP_INDEX = 3; // Index Name Table Name */
+ SQLITE_CREATE_TEMP_TABLE = 4; // Table Name NULL */
+ SQLITE_CREATE_TEMP_TRIGGER = 5; // Trigger Name Table Name */
+ SQLITE_CREATE_TEMP_VIEW = 6; // View Name NULL */
+ SQLITE_CREATE_TRIGGER = 7; // Trigger Name Table Name */
+ SQLITE_CREATE_VIEW = 8; // View Name NULL */
+ SQLITE_DELETE = 9; // Table Name NULL */
+ SQLITE_DROP_INDEX = 10; // Index Name Table Name */
+ SQLITE_DROP_TABLE = 11; // Table Name NULL */
+ SQLITE_DROP_TEMP_INDEX = 12; // Index Name Table Name */
+ SQLITE_DROP_TEMP_TABLE = 13; // Table Name NULL */
+ SQLITE_DROP_TEMP_TRIGGER = 14; // Trigger Name Table Name */
+ SQLITE_DROP_TEMP_VIEW = 15; // View Name NULL */
+ SQLITE_DROP_TRIGGER = 16; // Trigger Name Table Name */
+ SQLITE_DROP_VIEW = 17; // View Name NULL */
+ SQLITE_INSERT = 18; // Table Name NULL */
+ SQLITE_PRAGMA = 19; // Pragma Name 1st arg or NULL */
+ SQLITE_READ = 20; // Table Name Column Name */
+ SQLITE_SELECT = 21; // NULL NULL */
+ SQLITE_TRANSACTION = 22; // NULL NULL */
+ SQLITE_UPDATE = 23; // Table Name Column Name */
+ SQLITE_ATTACH = 24; // Filename NULL */
+ SQLITE_DETACH = 25; // Database Name NULL */
+
+ SQLITE_DENY = 1; // Abort the SQL statement with an error */
+ SQLITE_IGNORE = 2; // Don't allow access, but don't generate an error */
+
+ Crlf : string = #13#10;
+ Q = '''';
+
+type
+ pInteger = ^integer;
+ pPointer = ^Pointer;
+ pSmallInt = ^smallint;
+ pFloat = ^extended;
+ pBoolean = ^boolean;
+
+
+ TConvertBuffer = array[1..255] of char;
+
+ TSQLite3_Callback = function(UserData: Pointer; ColumnCount: Integer; ColumnValues, ColumnNames: PPointer): Integer; cdecl;
+// TSQLiteExecCallback = function(Sender: TObject; Columns: integer; ColumnValues: Pointer; ColumnNames: Pointer): integer of object; cdecl;
+ TSQLiteBusyCallback = function(Sender: TObject; ObjectName: PAnsiChar; BusyCount: integer): integer of object; cdecl;
+ TOnData = procedure(Sender: TObject; Columns: integer; ColumnNames, ColumnValues: string) of object;
+ TOnBusy = procedure(Sender: TObject; ObjectName: string; BusyCount: integer; var Cancel: boolean) of object;
+ TOnQueryComplete = procedure(Sender: TObject) of object;
+ TASQLite3NotifyEvent = procedure(Sender: TObject) of object;
+
+ // structure for holding field information. It is used by GetTableInfo
+
+ TASQLite3Field = class
+ public
+ FieldNumber: integer;
+ FieldName: string;
+ FieldType: string;
+ FieldNN: integer; // 1 if notnull
+ FieldDefault: string;
+ FieldPK: integer; // 1 if primary key
+ end;
+
+ // object to 'play' with SQLite's default settings
+
+ TASQLite3Pragma = class(TComponent)
+ private
+ FTempCacheSize: integer;
+ FDefaultCacheSize: integer;
+ FDefaultSynchronous: string;
+ FDefaultTempStore: string;
+ FTempStore: string;
+ FSynchronous: string;
+ protected
+ function GetTempCacheSize: string;
+ function GetDefaultCacheSize: string;
+ function GetDefaultSynchronous: string;
+ function GetDefaultTempStore: string;
+ function GetTempStore: string;
+ function GetSynchronous: string;
+ published
+ { Published declarations }
+ property TempCacheSize: integer read FTempCacheSize write FTempCacheSize;
+ property DefaultCacheSize: integer read FDefaultCacheSize write FDefaultCacheSize;
+ property DefaultSynchronous: string read FDefaultSynchronous
+ write FDefaultSynchronous;
+ property DefaultTempStore: string read FDefaultTempStore write FDefaultTempStore;
+ property TempStore: string read FTempStore write FTempStore;
+ property Synchronous: string read FSynchronous write FSynchronous;
+ end;
+
+ // component to log messages
+ // it's for debugging purpose and may be obsolete due
+ // to the event implementation. not sure yet...
+
+ TASQLite3Log = class(TComponent)
+ private
+ FLogFile: string;
+ FLogDebugOut: boolean;
+ FAppend: boolean;
+ FLogSQL: boolean;
+ FLogInt: boolean;
+ protected
+ public
+ procedure Display(Msg: string);
+ published
+ { Published declarations }
+ property LogFile: string read FLogFile write FLogFile;
+ property LogDebugOut: boolean read FLogDebugOut write FLogDebugOut; // 20040225
+ property Append: boolean read FAppend write FAppend;
+ property LogSQL: boolean read FLogSQL write FLogSQL;
+ property LogInternals: boolean read FLogInt write FLogInt;
+ end;
+
+// This component can be used to store sql outside the pascal source.
+// It is useful for automatically creating tables on open of a temporary database
+// (i.e. in-memory database)
+
+ TASQLite3InlineSQL = class(TComponent)
+ private
+ FSQL: TStrings;
+ procedure SetSQL(const Value: TStrings);
+ function GetSQL: TStrings;
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ published
+ property SQL: TStrings read GetSQL write SetSQL;
+ end;
+
+ { Basic Database component }
+
+ TASQLite3DB = class(TComponent)
+ private
+ { Private declarations }
+ FAfterConnect: TASQLite3NotifyEvent;
+ FBeforeConnect: TASQLite3NotifyEvent;
+ FAfterDisconnect: TASQLite3NotifyEvent;
+ FBeforeDisconnect: TASQLite3NotifyEvent;
+ function FGetDefaultExt: string;
+ function FGetDriverDLL: string;
+ protected
+ { Protected declarations }
+ FInlineSQL: TASQLite3InlineSQL;
+ FExecuteInlineSQL: boolean;
+ FDatabase: string;
+ FTransactionType: string;
+ FSQLiteVersion: string;
+ FDefaultExt: string;
+ FDefaultDir: string;
+ FDriverDll: string;
+ FConnected: boolean;
+ FMustExist: boolean;
+ FVersion: string;
+ FCharEnc: string;
+ FUtf8: boolean;
+ DBHandle: Pointer;
+ FASQLitePragma: TASQLite3Pragma;
+ FASQLiteLog: TASQLite3Log;
+ FLastError: string;
+ SQLite3_Open: function(dbname: PAnsiChar; var db: pointer): integer; cdecl;
+ SQLite3_Close: function(db: pointer): integer; cdecl;
+ SQLite3_Exec: function(DB: Pointer; SQLStatement: PAnsiChar; Callback: TSQLite3_Callback;
+ UserDate: Pointer; var ErrMsg: PAnsiChar): Integer; cdecl;
+ SQLite3_LibVersion: function(): PAnsiChar; cdecl;
+ SQLite3_ErrorString: function(db: pointer): PAnsiChar; cdecl;
+ SQLite3_GetTable: function(db: Pointer; SQLStatement: PAnsiChar; var ResultPtr: Pointer;
+ var RowCount: cardinal; var ColCount: cardinal; var ErrMsg: PAnsiChar): integer; cdecl;
+ SQLite3_FreeTable: procedure(Table: PAnsiChar); cdecl;
+ SQLite3_FreeMem: procedure(P: PAnsiChar); cdecl;
+ SQLite3_Complete: function(P: PAnsiChar): boolean; cdecl;
+ SQLite3_LastInsertRow: function(db: Pointer): integer; cdecl;
+ SQLite3_Cancel: procedure(db: Pointer); cdecl;
+ SQLite3_BusyHandler: procedure(db: Pointer; CallbackPtr: Pointer; Sender: TObject); cdecl;
+ SQLite3_BusyTimeout: procedure(db: Pointer; TimeOut: integer); cdecl;
+ SQLite3_Changes: function(db: Pointer): integer; cdecl;
+ SQLite3_Prepare: function(db: Pointer; SQLStatement: PAnsiChar; nBytes: integer;
+ var hstatement: pointer; var Tail: PAnsiChar): integer; cdecl;
+ SQLite3_Finalize: function(hstatement: pointer): integer; cdecl;
+ SQLite3_Reset: function(hstatement: pointer): integer; cdecl;
+ SQLite3_Step: function(hstatement: pointer): integer; cdecl;
+ SQLite3_Column_blob: function(hstatement: pointer; iCol: integer): pointer; cdecl;
+ SQLite3_Column_bytes: function(hstatement: pointer; iCol: integer): integer; cdecl;
+ SQLite3_Column_count: function(hstatement: pointer): integer; cdecl;
+ SQLite3_Column_decltype: function(hstatement: pointer; iCol: integer): PAnsiChar; cdecl;
+ SQLite3_Column_double: function(hstatement: pointer; iCol: integer): double; cdecl;
+ SQLite3_Column_int: function(hstatement: pointer; iCol: integer): integer; cdecl;
+ SQLite3_Column_int64: function(hstatement: pointer; iCol: integer): int64; cdecl;
+ SQLite3_Column_name: function(hstatement: pointer; iCol: integer): PAnsiChar; cdecl;
+ SQLite3_Column_text: function(hstatement: pointer; iCol: integer): PAnsiChar; cdecl;
+ SQLite3_Column_text16: function(hstatement: pointer; iCol: integer): PWideChar; cdecl;
+ SQLite3_Column_type: function(hstatement: pointer; iCol: integer): integer; cdecl;
+ SQLite3_Bind_Blob: function(hstatement: pointer; iCol: integer; buf: PAnsiChar; n: integer; DestroyPtr: Pointer): integer; cdecl;
+ SQLite3_Bind_Text16: function(hstatement: pointer; iCol: integer; buf: pointer; n: integer; DestroyPtr: Pointer): integer; cdecl;//\\\
+ SQLite3_Bind_Parameter_Count: function(hstatement: pointer): integer; cdecl;//\\\
+ procedure Notification(AComponent: TComponent; Operation: TOperation); override;
+ procedure DBConnect(Connected: boolean);
+ function SQLite3_PrepareResult(DB: Pointer; TheStatement: string; FParams: TParams; Sender: TObject) : pointer;
+ function SQLite3_GetNextResult(DB: Pointer; TheStatement: pointer; FParams: TParams; Sender: TObject) : pointer;
+ procedure SQLite3_CloseResult(TheStatement : pointer);
+ public
+ DLLHandle: THandle;
+ { Public declarations }
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ function LoadLibs: boolean;
+ procedure FSetDatabase(Database: string);
+ function RowsAffected: integer;
+ function TableExists(const ATableName: AnsiString): Boolean;
+ procedure ExecStartTransaction(TransType: string);
+ procedure StartTransaction;
+ procedure StartDeferredTransaction;
+ procedure StartImmediateTransaction;
+ procedure StartExclusiveTransaction;
+ procedure Open;
+ procedure Close;
+ procedure Commit;
+ procedure RollBack;
+ procedure ShowDatabases(List: TStrings);
+ procedure GetTableNames(List: TStrings; SystemTables: boolean = false);
+ procedure GetTableInfo(TableName: string; List: TList);
+ procedure GetIndexNames(List: TStrings; SystemTables: boolean = false);
+ procedure GetIndexFieldNames(IndexName: string; List: TStrings);
+ procedure GetFieldNames(TableName: string; List: TStrings);
+ procedure GetPrimaryKeys(TableName: string; List: TStrings);
+ procedure GetTableIndexNames(TableName: string; List: TStrings);
+ procedure ExecPragma;
+// function SQLite_XExec(db: Pointer; SQLStatement: PAnsiChar;
+// CallbackPtr: Pointer; Sender: TObject; var ErrMsg: PAnsiChar): integer; cdecl;
+ function SQLite3_Execute(db: Pointer; TheStatement: string; FParams: TParams; Sender: TObject): integer;
+ function SQLite3_ExecSQL(TheStatement: string; Blobs: TList=nil): integer;
+ procedure ShowError;
+ function GetUserVersion(database : string=''): integer;
+ procedure SetUserVersion(Version : integer; Database : string='');
+ published
+ { Published declarations }
+ property CharacterEncoding: string read FCharEnc write FCharEnc;
+ property TransactionType: string read FTransactionType write FTransactionType;
+ property Database: string read FDatabase write FSetDatabase;
+ property ASQLitePragma: TASQLite3Pragma read FASQLitePragma write FASQLitePragma;
+ property ASQLiteLog: TASQLite3Log read FASQLiteLog write FASQLiteLog;
+ property DefaultExt: string read FGetDefaultExt write FDefaultExt;
+ property DefaultDir: string read FDefaultDir write FDefaultDir;
+ property Version: string read FVersion write FVersion;
+// property CharacterEncoding: string Read FCharEncoding Write FCharEncoding;
+ property DriverDLL: string read FGetDriverDLL write FDriverDLL;
+ property Connected: boolean read FConnected write DBConnect;
+ property MustExist: boolean read FMustExist write FMustExist;
+ property ASQLiteInlineSQL: TASQLite3InlineSQL read FInlineSQL write FInlineSQL;
+ property ExecuteInlineSQL: boolean read FExecuteInlineSQL write FExecuteInlineSQL;
+ property AfterConnect: TASQLite3NotifyEvent read FAfterConnect write FAfterConnect;
+ property BeforeConnect: TASQLite3NotifyEvent read FBeforeConnect write FBeforeConnect;
+ property AfterDisconnect: TASQLite3NotifyEvent
+ read FAfterDisconnect write FAfterDisconnect;
+ property BeforeDisconnect: TASQLite3NotifyEvent
+ read FBeforeDisconnect write FBeforeDisconnect;
+ end;
+
+ AsgError = class(Exception);
+
+{ TRecInfo }
+
+{ This structure is used to access additional information stored in
+ each record buffer which follows the actual record data.
+
+ Buffer: PAnsiChar;
+ ||
+ \/
+ --------------------------------------------
+ | Record Data | Bookmark | Bookmark Flag |
+ --------------------------------------------
+ ^-- PRecInfo = Buffer + FRecInfoOfs
+
+ Keep in mind that this is just an example of how the record buffer
+ can be used to store additional information besides the actual record
+ data. There is no requirement that TDataSet implementations do it this
+ way.
+
+ For the purposes of this demo, the bookmark format used is just an integer
+ value. For an actual implementation the bookmark would most likely be
+ a native bookmark type (as with BDE), or a fabricated bookmark for
+ data providers which do not natively support bookmarks (this might be
+ a variant array of key values for instance).
+
+ The BookmarkFlag is used to determine if the record buffer contains a
+ valid bookmark and has special values for when the dataset is positioned
+ on the "cracks" at BOF and EOF. }
+
+ PRecInfo = ^TRecInfo;
+
+ TRecInfo = packed record
+ Bookmark : integer;
+ BookmarkFlag : TBookmarkFlag;
+// Nulls :
+ end;
+
+ //============================================================================== TFResult
+ // The TFResult class is used to maintain the resultlist in memory. This
+ // will only be the case for 'normal' data. Blobs and Clobs will be treated
+ // differently, but they are not supported yet.
+ //==============================================================================
+ TASQLite3BaseQuery = class;
+
+ TFResult = class
+ protected
+ Data: TList;
+ BookMark: TList;
+ RowId: TList;
+ FLastBookmark: integer;
+ FBufSize: integer;
+ FDataSet: TASQLite3BaseQuery;
+ public
+ constructor Create(TheDataSet: TASQLite3BaseQuery);
+ destructor Destroy; override;
+ procedure FreeBlobs;
+ procedure SetBufSize(TheSize: integer);
+ procedure Add(TheBuffer: PAnsiChar; TheRowId: integer);
+ procedure Insert(Index: integer; TheBuffer: Pointer; TheRowId: integer);
+ procedure Delete(Index: integer);
+ function GetData(Index: integer): Pointer;
+ function Count: integer;
+ function IndexOf(TheBookMark: pointer): integer;
+ function GetBookmark(Index: integer): integer;
+ function GetRowId(Index: integer): integer;
+ end;
+
+//============================================================================== TASQLite3UpdateSQL
+ TASQLite3UpdateSQL = class(TComponent)
+ private
+ FInsertSQL: TStrings;
+ FUpdateSQL: TStrings;
+ FDeleteSQL: TStrings;
+ procedure SetInsertSQL(const Value: TStrings);
+ procedure SetUpdateSQL(const Value: TStrings);
+ procedure SetDeleteSQL(const Value: TStrings);
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ published
+ property InsertSQL: TStrings read FInsertSQL write SetInsertSQL;
+ property UpdateSQL: TStrings read FUpdateSQL write SetUpdateSQL;
+ property DeleteSQL: TStrings read FDeleteSQL write SetDeleteSQL;
+ end;
+
+//============================================================================== TASQLite3Output
+
+ TASQLite3Output = class(TComponent)
+ private
+ FActive: boolean;
+ FOutputType: string;
+ FTableClass: string;
+ FHeaderClass: string;
+ FCellClass: string;
+ FOutput: TStrings;
+ FSeparator: string;
+ FDataSource: TDataSource;
+ procedure SetOutput(const Value: TStrings);
+ procedure SetFActive(Active: boolean);
+ function GetOutput: TStrings;
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ procedure Execute(MyDataSet: TDataSet);
+ protected
+ procedure Notification(AComponent: TComponent; Operation: TOperation); override;
+ published
+ property Active: boolean read FActive write SetFActive;
+ property DataSource: TDataSource read FDataSource write FDataSource;
+ property OutputType: string read FOutputType write FOutputType;
+ property TableClass: string read FTableClass write FTableClass;
+ property HeaderClass: string read FHeaderClass write FHeaderClass;
+ property CellClass: string read FCellClass write FCellClass;
+ property Output: TStrings read GetOutput write SetOutput;
+ property FieldSeparator: string read FSeparator write FSeparator;
+ end;
+
+//============================================================================== TASQLite3BaseQuery
+ TASQLite3BaseQuery = class(TDataSet)
+ private
+ FParams: TParams;
+ FTypeLess: boolean;
+ FNoResults: boolean; // suppresses the creation of a result list
+ FAutoCommit: boolean;
+ FTransactionType: string;
+ FTableDateFormat: string;
+ FSQLiteDateFormat: boolean;
+ FResult: TFResult;
+ FSQL: TStrings;
+ FSQLCursor: boolean;
+ FPrepared: string;
+ FRecBufSize: integer;
+ FRecInfoOfs: integer;
+ FCurRec: integer;
+ FMasterFields: string;
+ FMasterSource: TDataSource;
+ FSaveChanges: boolean;
+ MaxStrLen: integer;
+ FConnection: TASQLite3DB;
+ FReadOnly: boolean;
+ FMaxResults: integer;
+ FStartResult: integer;
+ FUniDir : boolean;
+ FStatement : pointer;
+ CurrentRowId: integer;
+ SQLStr: string;
+ ResultStr: PAnsiChar;
+ RowId : integer;
+ RowIdCol : integer;
+ DetailList: TList;
+ procedure SetSQL(const Value: TStrings);
+ function UnpackBuffer(Buffer: PAnsiChar; FieldType: TFieldType): TConvertBuffer;
+ procedure SetDataSource(Value: TDataSource);
+ protected
+ function SetQueryParams(InStr: string): string; //***
+ procedure SetParamsList(Value: TParams);
+ function GetParamsCount: word;
+ procedure RegisterDetailDataset(DetailDataSet: TASQLite3BaseQuery);
+ procedure LoadQueryData;
+ function GetActiveBuffer(var Buffer: PAnsiChar): boolean;
+ function GetDataSource: TDataSource; override;
+ procedure NotifySQLiteMasterChanged;
+ function GetFieldValue(const AField: TField; const Blobs: TList = nil): string; // added by Donnie
+
+ { Overriden abstract methods (required) }
+ function AllocRecordBuffer: PAnsiChar; override;
+ procedure FreeRecordBuffer(var Buffer: PAnsiChar); override;
+ procedure GetBookmarkData(Buffer: PAnsiChar; Data: Pointer); override;
+ function GetBookmarkFlag(Buffer: PAnsiChar): TBookmarkFlag; override;
+ function GetRecord(Buffer: PAnsiChar; GetMode: TGetMode;
+ DoCheck: boolean): TGetResult; override;
+ function GetRecordSize: word; override;
+ procedure InternalAddRecord(Buffer: Pointer; Append: boolean); override;
+ procedure InternalClose; override;
+ procedure InternalDelete; override;
+ procedure InternalFirst; override;
+ procedure InternalGotoBookmark(Bookmark: Pointer); override;
+ procedure InternalHandleException; override;
+ procedure InternalInitFieldDefs; override;
+ procedure InternalInitRecord(Buffer: PAnsiChar); override;
+ procedure InternalLast; override;
+ procedure InternalOpen; override;
+ procedure InternalPost; override;
+ procedure InternalSetToRecord(Buffer: PAnsiChar); override;
+ procedure OpenCursor(InfoQuery: Boolean); override; // GPA
+ function IsCursorOpen: boolean; override;
+ procedure SetBookmarkFlag(Buffer: PAnsiChar; Value: TBookmarkFlag); override;
+ procedure SetBookmarkData(Buffer: PAnsiChar; Data: Pointer); override;
+ procedure SetFieldData(Field: TField; Buffer: Pointer); override;
+ function GetFieldSize(FieldNo: integer): integer; overload;
+ function GetFieldSize(Field: TField): integer; overload;
+ function GetNativeFieldSize(FieldNo: integer): integer;
+ function GetFieldOffset(FieldNo: integer): integer;
+ function GetCalcFieldOffset(Field: TField): integer;
+ function GetMasterFields: string;
+ procedure SetMasterFields(const Value: string);
+ { Additional overrides (optional) }
+ function GetRecordCount: integer; override;
+ function GetRecNo: integer; override;
+ procedure SetRecNo(Value: integer); override;
+ property BaseSQL: TStrings read FSQL write SetSQL;
+ procedure SetSQLiteDateFormat(const Value: boolean);
+ procedure SetFilterText(const Value: string); override;
+ procedure DataConvert(Field: TField; Source, Dest: Pointer; ToNative: Boolean); override;//\\\
+ function CalcFieldInList(const List: string): Boolean; // John Lito
+
+ {$IFDEF IPROVIDER}
+ {***** IProviderSupport - Begin *****}
+ //-----| These are not necessary until the moment!
+ // procedure PSGetAttributes(List: TList); virtual;
+ // function PSGetDefaultOrder: TIndexDef; virtual;
+ // function PSGetIndexDefs(IndexTypes: TIndexOptions): TIndexDefs; virtual;
+ //-----| These are necessary to support IProvider
+ procedure PSEndTransaction(Commit: Boolean); override;
+ procedure PSExecute; override;
+ function PSExecuteStatement(const ASQL: string; AParams: TParams; ResultSet: Pointer = nil): Integer; override;
+ function PSGetParams: TParams; override;
+ function PSGetTableName: string; override;
+ function PSGetUpdateException(E: Exception; Prev: EUpdateError): EUpdateError; override;
+ function PSInTransaction: Boolean; override;
+ function PSIsSQLBased: Boolean; override;
+ function PSIsSQLSupported: Boolean; override;
+ procedure PSReset; override;
+ procedure PSSetCommandText(const CommandText: string); override;
+ procedure PSSetParams(AParams: TParams); override;
+ procedure PSStartTransaction; override;
+ function PSUpdateRecord(UpdateKind: TUpdateKind; Delta: TDataSet): Boolean; override;
+ function PSGetQuoteChar: string; override;
+ function PSGetKeyFields: string; override;
+ {***** IProviderSupport - End *****}
+ {$ENDIF}
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ procedure ExecSQL;
+ procedure StartTransaction;
+ procedure StartDeferredTransaction;
+ procedure StartImmediateTransaction;
+ procedure StartExclusiveTransaction;
+ procedure Commit;
+ procedure RollBack;
+ procedure SetFiltered(Value: Boolean); override;
+ procedure SQLiteMasterChanged; virtual;
+ function GetFieldData(Field: TField; Buffer: Pointer): boolean; override;
+ function GetFieldData(FieldNo: integer; Buffer: Pointer): boolean; override; // 20040225
+ function GetLastInsertRow: integer;
+{$IFDEF ASQLITE_D6PLUS}
+// function GetFieldData(Field: TField; Buffer: Pointer; NativeFormat: boolean): boolean; override;
+{$ENDIF}
+
+ function CompareBookmarks(Bookmark1, Bookmark2: TBookmark): Integer; override; //MS
+ function CreateBlobStream(Field: TField; Mode: TBlobStreamMode): TStream; override;
+ function Locate(const KeyFields: string; const KeyValues: variant; Options: TLocateOptions): boolean; override;
+ function BookmarkValid(Bookmark: Pointer): boolean; override;
+// function LocateNearest(const KeyFields: String; const KeyValues: Variant; Options: TLocateOptions): Boolean;
+ property Params: TParams read FParams write SetParamsList stored false;
+ function Lookup(const KeyFields: string; const KeyValues: Variant; // John Lito
+ const ResultFields: string): Variant; override; // John Lito
+ published
+ property AutoCommit: boolean read FAutoCommit write FAutoCommit default true;
+ property TransactionType: string read FTransactionType write FTransactionType;
+ property SQLiteDateFormat: boolean read FSQLiteDateFormat write SetSQLiteDateFormat;
+ property TableDateFormat: string read FTableDateFormat write FTableDateFormat;
+ property Connection: TASQLite3DB read FConnection write FConnection;
+ property MaxResults: integer read FMaxResults write FMaxResults;
+ property StartResult: integer read FStartResult write FStartResult;
+ property TypeLess: boolean read FTypeLess write FTypeLess;
+ property MasterFields: string read GetMasterFields write SetMasterFields;
+ property MasterSource: TDataSource read GetDataSource write SetDataSource;
+ property SQLCursor: boolean read FSQLCursor write FSQLCursor;
+ property ReadOnly: boolean read FreadOnly write FReadOnly;
+ property UniDirectional : boolean read FUniDir write FUniDir;
+ property AutoCalcFields;
+ property Filter;
+ property Filtered;
+ property Active;
+ property BeforeOpen;
+ property AfterOpen;
+ property BeforeClose;
+ property AfterClose;
+ property BeforeInsert;
+ property AfterInsert;
+ property BeforeEdit;
+ property AfterEdit;
+ property BeforePost;
+ property AfterPost;
+ property BeforeCancel;
+ property AfterCancel;
+ property BeforeDelete;
+ property AfterDelete;
+ property BeforeScroll;
+ property AfterScroll;
+{$IFDEF ASQLITE_D6PLUS}
+ property BeforeRefresh;
+ property AfterRefresh;
+{$ENDIF}
+ property OnCalcFields;
+ property OnDeleteError;
+ property OnEditError;
+ property OnNewRecord;
+ property OnPostError;
+ end;
+//============================================================================== TASQLite3Query
+
+ TASQLite3Query = class(TASQLite3BaseQuery)
+ private
+ FUpdateSQL: TASQLite3UpdateSQL;
+ FRawSQL: boolean;
+ procedure SetSQL(const Value: TStrings);
+ function GetSQL: TStrings;
+ procedure QueryChanged(Sender: TObject);
+ protected
+ procedure InternalOpen; override;
+ procedure InternalPost; override;
+ procedure InternalDelete; override;
+ procedure Notification(AComponent: TComponent; Operation: TOperation); override;
+ procedure InternalClose; override;
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+// property Params: TParams Read FParams Write SetParamsList Stored false;
+ procedure SQLiteMasterChanged; override;
+ published
+ property RawSQL: boolean read FRawSQL write FRawSQL;
+ property SQL: TStrings read GetSQL write SetSQL;
+ property UpdateSQL: TASQLite3UpdateSQL read FUpdateSQL write FUpdateSQL;
+ end;
+
+//============================================================================== TASQLite3Table
+
+ TASQLite3Table = class(TASQLite3BaseQuery)
+ private
+ FTableName: string;
+ FOrderBy : string;
+ FPrimaryAutoInc: boolean;
+ protected
+ procedure Notification(AComponent: TComponent; Operation: TOperation); override;
+ procedure InternalOpen; override;
+ procedure InternalPost; override;
+ procedure InternalDelete; override;
+ procedure SetFTableName(TableName : string);
+ procedure SetFOrderBy(OrderBy : string);
+ public
+ procedure SQLiteMasterChanged; override;
+ published
+ property TableName: string read FTableName write SetFTableName;
+ property PrimaryAutoInc: boolean read FPrimaryAutoInc write FPrimaryAutoInc;
+ property OrderBy : string read FOrderBy write SetFOrderBy;
+ end;
+
+ //============================================================================== TASQLite3BlobStream
+
+ TASQLite3BlobStream = class(TMemoryStream)
+ private
+ FField: TBlobField;
+ FDataSet: TASQLite3BaseQuery;
+ FMode: TBlobStreamMode;
+ FModified: Boolean;
+ FOpened: Boolean;
+ procedure LoadBlobData;
+ procedure SaveBlobData;
+ public
+ constructor Create(Field: TBlobField; Mode: TBlobStreamMode);
+ destructor Destroy; override;
+ function Read(var Buffer; Count: Longint): Longint; override;
+ function Write(const Buffer; Count: Longint): Longint; override;
+ end;
+
+
+implementation
+
+uses
+ Math
+{$IFDEF ASQLITE_D6PLUS}
+ , StrUtils
+{$endif}
+ ;
+
+// GPA - Static Link Start
+{$IFDEF SQLite_Static}
+Var
+ __HandlerPtr:Pointer;
+
+ {$L 'OBJ\sqlite3.obj'}
+ {$L 'OBJ\files.obj'}
+ {$L 'OBJ\strlen.obj'}
+ {$L 'OBJ\assert.obj'}
+ {$L 'OBJ\memcmp.obj'}
+ {$L 'OBJ\memcpy.obj'}
+ {$L 'OBJ\memset.obj'}
+ {$L 'OBJ\strcmp.obj'}
+ {$L 'OBJ\strcpy.obj'}
+ {$L 'OBJ\strcat.obj'}
+ {$L 'OBJ\strncmp.obj'}
+ {$L 'OBJ\strncpy.obj'}
+ {$L 'OBJ\strncat.obj'}
+ {$L 'OBJ\sprintf.obj'}
+ {$L 'OBJ\fprintf.obj'}
+ {$L 'OBJ\_ll.obj'}
+ {$L 'OBJ\ltoupper.obj'}
+ {$L 'OBJ\ltolower.obj'}
+ {$L 'OBJ\atol.obj'}
+ {$L 'OBJ\ftol.obj'}
+ {$L 'OBJ\longtoa.obj'}
+ {$L 'OBJ\hrdir_r.obj'}
+ {$L 'OBJ\gmtime.obj'}
+ {$L 'OBJ\tzdata.obj'}
+ {$L 'OBJ\initcvt.obj'}
+ {$L 'OBJ\streams.obj'}
+ {$L 'OBJ\scantod.obj'}
+ {$L 'OBJ\scanwtod.obj'}
+ {$L 'OBJ\allocbuf.obj'}
+ {$L 'OBJ\bigctype.obj'}
+ {$L 'OBJ\clocale.obj'}
+ {$L 'OBJ\clower.obj'}
+ {$L 'OBJ\cupper.obj'}
+ {$L 'OBJ\fflush.obj'}
+ {$L 'OBJ\fputn.obj'}
+ {$L 'OBJ\hrdir_s.obj'}
+ {$L 'OBJ\mbisspc.obj'}
+ {$L 'OBJ\mbsrchr.obj'}
+ {$L 'OBJ\realcvt.obj'}
+ {$L 'OBJ\realcvtw.obj'}
+ {$L 'OBJ\timefunc.obj'}
+ {$L 'OBJ\vprinter.obj'}
+ {$L 'OBJ\hugeval.obj'}
+ {$L 'OBJ\cvtfak.obj'}
+ {$L 'OBJ\getinfo.obj'}
+ {$L 'OBJ\qmul10.obj'}
+ {$L 'OBJ\fuildq.obj'}
+ {$L 'OBJ\_pow10.obj'}
+ {$L 'OBJ\ldtrunc.obj'}
+ {$L 'OBJ\cvtfakw.obj'}
+ {$L 'OBJ\wis.obj'}
+ {$L 'OBJ\xfflush.obj'}
+ {$L 'OBJ\flushout.obj'}
+ {$L 'OBJ\lputc.obj'}
+ {$L 'OBJ\hrdir_b.obj'}
+ {$L 'OBJ\realloc.obj'}
+ {$L 'OBJ\mbctype.obj'}
+ {$L 'OBJ\xcvt.obj'}
+ {$L 'OBJ\xcvtw.obj'}
+ {$L 'OBJ\wcscpy.obj'}
+ {$L 'OBJ\errno.obj'}
+ {$L 'OBJ\ctrl87.obj'}
+ {$L 'OBJ\timedata.obj'}
+ {$L 'OBJ\int64toa.obj'}
+ {$L 'OBJ\cvtentry.obj'}
+ {$L 'OBJ\mbyte1.obj'}
+ {$L 'OBJ\errormsg.obj'}
+ {$L 'OBJ\exit.obj'}
+ {$L 'OBJ\iswctype.obj'}
+ {$L 'OBJ\heap.obj'}
+ {$L 'OBJ\memmove.obj'}
+ {$L 'OBJ\fxam.obj'}
+ {$L 'OBJ\fuistq.obj'}
+ {$L 'OBJ\qdiv10.obj'}
+ {$L 'OBJ\wmemset.obj'}
+ {$L 'OBJ\wcslen.obj'}
+ {$L 'OBJ\_tzset.obj'}
+ {$L 'OBJ\deflt87.obj'}
+ {$L 'OBJ\mbschr.obj'}
+ {$L 'OBJ\mbsrchr.obj'}
+ {$L 'OBJ\ermsghlp.obj'}
+ {$L 'OBJ\patexit.obj'}
+ {$L 'OBJ\initexit.obj'}
+ {$L 'OBJ\virtmem.obj'}
+ {$L 'OBJ\tzset.obj'}
+ {$L 'OBJ\mbisdgt.obj'}
+ {$L 'OBJ\mbsnbcpy.obj'}
+ {$L 'OBJ\platform.obj'}
+ {$L 'OBJ\getenv.obj'}
+ {$L 'OBJ\mbisalp.obj'}
+ {$L 'OBJ\abort.obj'}
+ {$L 'OBJ\signal.obj'}
+ {$L 'OBJ\clear87.obj'}
+ {$L 'OBJ\abort.obj'}
+ {$L 'OBJ\handles.obj'}
+ {$L 'OBJ\_cfinfo.obj'}
+ {$L 'OBJ\__isatty.obj'}
+ {$L 'OBJ\perror.obj'}
+ {$L 'OBJ\fputs.obj'}
+ {$L 'OBJ\files2.obj'}
+ {$L 'OBJ\ioerror.obj'}
+ {$L 'OBJ\__write.obj'}
+ {$L 'OBJ\_write.obj'}
+ {$L 'OBJ\__lseek.obj'}
+ {$L 'OBJ\ioerror.obj'}
+ {$L 'OBJ\setenvp.obj'}
+ {$L 'OBJ\calloc.obj'}
+ {$L 'OBJ\mbsnbcmp.obj'}
+ {$L 'OBJ\mbsnbicm.obj'}
+ {$L 'OBJ\is.obj'}
+ {$L 'OBJ\isctype.obj'}
+ {$L 'OBJ\bigctype.obj'}
+ {$L 'OBJ\globals.obj'}
+ {$L 'OBJ\hrdir_mf.obj'}
+ {$L 'OBJ\fpreset.obj'}
+ {$L 'OBJ\ta.obj'}
+ {$L 'OBJ\setexc.obj'}
+ {$L 'OBJ\defhandl.obj'}
+
+ function _wsprintfA:integer; external 'user32.dll' name 'wsprintfA';
+ procedure RtlUnwind; external 'NtDll.dll' name 'RtlUnwind';
+
+ function _sqlite3_open(dbname: PAnsiChar; var db: pointer): integer; cdecl; external;
+ function _sqlite3_close(db: pointer): integer; cdecl; external;
+ function _sqlite3_exec(DB: Pointer; SQLStatement: PAnsiChar; Callback: TSQLite3_Callback;
+ UserDate: Pointer; var ErrMsg: PAnsiChar): Integer; cdecl; external;
+ function _sqlite3_libversion: PAnsiChar; cdecl; external;
+ function _sqlite3_errmsg(db: pointer): PAnsiChar; cdecl; external;
+ function _sqlite3_get_table(db: Pointer; SQLStatement: PAnsiChar; var ResultPtr: Pointer;
+ var RowCount: cardinal; var ColCount: cardinal; var ErrMsg: PAnsiChar): integer; cdecl; external;
+ procedure _sqlite3_free_table(Table: PAnsiChar); cdecl; external;
+ procedure _sqlite3_free(P: PAnsiChar); cdecl; external;
+ function _sqlite3_complete(P: PAnsiChar): boolean; cdecl; external;
+ function _sqlite3_last_insert_rowid(db: Pointer): integer; cdecl; external;
+ procedure _sqlite3_interrupt(db: Pointer); cdecl; external;
+ procedure _sqlite3_busy_handler(db: Pointer; CallbackPtr: Pointer; Sender: TObject); cdecl; external;
+ procedure _sqlite3_busy_timeout(db: Pointer; TimeOut: integer); cdecl; external;
+ function _sqlite3_changes(db: Pointer): integer; cdecl; external;
+ function _sqlite3_prepare(db: Pointer; SQLStatement: PAnsiChar; nBytes: integer;
+ var hstatement: pointer; var Tail: PAnsiChar): integer; cdecl; external;
+ function _sqlite3_finalize(hstatement: pointer): integer; cdecl; external;
+ function _sqlite3_reset(hstatement: pointer): integer; cdecl; external;
+ function _sqlite3_step(hstatement: pointer): integer; cdecl; external;
+ function _sqlite3_column_blob(hstatement: pointer; iCol: integer): pointer; cdecl; external;
+ function _sqlite3_column_bytes(hstatement: pointer; iCol: integer): integer; cdecl; external;
+ function _sqlite3_column_count(hstatement: pointer): integer; cdecl; external;
+ function _sqlite3_column_decltype(hstatement: pointer; iCol: integer): PAnsiChar; cdecl; external;
+ function _sqlite3_column_double(hstatement: pointer; iCol: integer): double; cdecl; external;
+ function _sqlite3_column_int(hstatement: pointer; iCol: integer): integer; cdecl; external;
+ function _sqlite3_column_int64(hstatement: pointer; iCol: integer): int64; cdecl; external;
+ function _sqlite3_column_name(hstatement: pointer; iCol: integer): PAnsiChar; cdecl; external;
+ function _sqlite3_column_text(hstatement: pointer; iCol: integer): PAnsiChar; cdecl; external;
+ function _sqlite3_column_type(hstatement: pointer; iCol: integer): integer; cdecl; external;
+ function _sqlite3_bind_blob(hstatement: pointer; iCol: integer; buf: PAnsiChar; n: integer; DestroyPtr: Pointer): integer; cdecl; external;
+
+{$ENDIF}
+// GPA - Static Link End
+
+
+{$IFDEF DEBUG_ENABLED}
+var
+ DebugSpaces : Integer = 0;
+{$ENDIF}
+
+{$IFNDEF ASQLITE_D6PLUS} //Art Register - Function sign not provided in Delphi 5
+function Sign(I: Integer) : Integer ;
+begin
+ if (I > 0) then
+ Result := 1
+ else
+ begin
+ if (I < 0) then
+ Result := -1
+ else
+ Result := 0;
+ end;
+end;
+{$ENDIF}
+
+procedure Debug(const S: string);
+begin
+{$IFDEF DEBUG_ENABLED}
+ OutputDebugString(PAnsiChar(StringOfChar(' ', DebugSpaces) + S));
+{$ENDIF}
+end;
+
+procedure DebugEnter(const S: string);
+begin
+{$IFDEF DEBUG_ENABLED}
+ OutputDebugString(PAnsiChar(StringOfChar(' ', DebugSpaces) + 'Enter ' + S));
+ inc(DebugSpaces);
+{$ENDIF}
+end;
+
+procedure DebugLeave(const S: string);
+begin
+{$IFDEF DEBUG_ENABLED}
+ dec(DebugSpaces);
+ OutputDebugString(PAnsiChar(StringOfChar(' ', DebugSpaces) + 'Leave ' + S));
+{$ENDIF}
+end;
+
+//==============================================================================
+// SyntaxCheck. This routine is used to check if words match the sql syntax
+// It is called where sql statements are parsed and generated
+//==============================================================================
+
+function SyntaxCheck(LWord, RWord: string): boolean;
+begin
+ DebugEnter('SyntaxCheck');
+ try
+ if CompareText(LWord, RWord) <> 0 then begin
+ SyntaxCheck := false;
+ raise AsgError.Create('SQL macro syntax error on sql, expected ' + RWord)
+ end else
+ SyntaxCheck := true;
+ finally
+ DebugLeave('SyntaxCheck');
+ end;
+end;
+
+//==============================================================================
+// Parse the SQL fielddescription and return the Delphi Field types, length etc.
+//==============================================================================
+
+procedure GetFieldInfo(FieldInfo: string; var FieldType: TFieldType;
+ var FieldLen, FieldDec: integer);
+var
+ p1, p2, pn : integer;
+ vt : string;
+begin
+ DebugEnter('GetFieldInfo');
+ FieldType := ftString; // just a default;
+ FieldLen := 255;
+ FieldDec := 0;
+
+ p1 := pos('(', FieldInfo);
+ if p1 <> 0 then
+ begin
+ p2 := pos(')', FieldInfo);
+ if p2 <> 0 then
+ begin
+ vt := LowerCase(Copy(FieldInfo, 1, p1 - 1));
+ if (vt = 'varchar') or (vt = 'char') or (vt = 'varchar2') then begin
+ FieldType := ftString;
+ FieldLen := StrToInt(Copy(FieldInfo, p1 + 1, p2 - p1 - 1));
+ end else if (vt = 'nvarchar') or (vt = 'nchar') or (vt = 'nvarchar2') then begin
+ FieldType := ftWideString;
+ FieldLen := StrToInt(Copy(FieldInfo, p1 + 1, p2 - p1 - 1)) * 2;
+ end else if (vt = 'numeric') then begin
+ vt := Copy(FieldInfo, p1 + 1, p2 - p1 - 1);
+ pn := pos('.', vt); if pn = 0 then pn := pos(',', vt);
+ FieldType := ftFloat;
+ if pn = 0 then begin
+ FieldLen := StrToInt(vt);
+ FieldDec := 0;
+ end else begin
+ FieldLen := StrToInt(Copy(vt, 1, pn - 1));
+ FieldDec := StrToInt(Copy(vt, pn + 1, 2));
+ end;
+ end;
+ end
+ else
+ FieldLen := 256;
+ end
+ else
+ begin
+ vt := LowerCase(FieldInfo);
+ if vt = 'date' then
+ begin
+ FieldType := ftDate;
+ FieldLen := 10;
+ end
+ else if vt = 'datetime' then
+ begin
+ FieldType := ftDateTime; // fpierce original ftDate
+ FieldLen := 24; // aducom
+ end
+ else if vt = 'time' then
+ begin
+ FieldType := ftTime;
+ FieldLen := 12;
+ end
+{$IFDEF ASQLITE_D6PLUS}
+ else if vt = 'timestamp' then
+ begin
+ FieldType := ftTimeStamp;
+ FieldLen := 12;
+ end
+{$ENDIF}
+ else if (vt = 'integer') or (vt = 'int') then
+ begin
+ FieldType := ftInteger;
+ FieldLen := 12;
+ end
+ else if (vt = 'float') or (vt = 'real') then
+ begin
+ FieldType := ftFloat;
+ FieldLen := 12;
+ end
+ else if (vt = 'boolean') or (vt = 'logical') then
+ begin
+ FieldType := ftBoolean;
+ FieldLen := 2;
+ end
+ else if (vt = 'char') or (vt = 'byte') then
+ begin
+ FieldType := ftString;
+ FieldLen := 1;
+ end
+ else if (vt = 'shorttext') or (vt = 'string') then
+ begin
+ FieldType := ftString;
+ FieldLen := 255;
+ end
+ else if (vt = 'widetext') or (vt = 'widestring') then
+ begin
+ FieldType := ftWideString;
+ FieldLen := 512;
+ end
+ else if (vt = 'currency') or (vt = 'financial') or (vt = 'money') then
+ begin
+ FieldType := ftCurrency;
+ FieldLen := 10;
+ end
+ else if (vt = 'blob') then
+ begin
+ FieldType := ftBlob;
+ FieldLen := SizeOf(Pointer);
+ end
+ else if (vt = 'graphic') then
+ begin
+ FieldType := ftGraphic;
+ FieldLen := SizeOf(Pointer);
+ end
+ else if (vt = 'clob') or (vt = 'memo') or (vt = 'text') or (vt = 'longtext') then
+ begin
+ FieldType := ftMemo;
+ FieldLen := SizeOf(Pointer);
+ end;
+ end;
+ DebugLeave('GetFieldInfo: ' + vt);
+end;
+
+ //==============================================================================
+ // Convert TDateTime to TDateTimeRec
+ //==============================================================================
+
+function DateTimeToNative(DataType: TFieldType; Data: TDateTime): TDateTimeRec;
+var
+ TimeStamp : TTimeStamp;
+begin
+ DebugEnter('DateTimeToNative');
+ TimeStamp := DateTimeToTimeStamp(Data);
+ case DataType of
+ ftDate: Result.Date := TimeStamp.Date;
+ ftTime: Result.Time := TimeStamp.Time;
+ else
+ Result.DateTime := TimeStampToMSecs(TimeStamp);
+ end;
+ DebugLeave('DateTimeToNative');
+end;
+
+procedure ApplicationHandleException(Sender: TObject);
+begin
+{$IFDEF ASQLITE_D6PLUS}
+ if Assigned(Classes.ApplicationHandleException) then
+ Classes.ApplicationHandleException(Sender);
+{$ENDIF}
+end;
+
+//============================================================================== TASQLite3LOG
+
+procedure TASQLite3Log.Display(Msg: string);
+var
+ fn : Textfile;
+begin
+ DebugEnter('TASQLite3Log.Display');
+ if FileExists(FLogFile) then
+ begin
+ if FAppend then
+ begin
+ AssignFile(fn, FLogFile);
+ System.Append(fn);
+ end
+ else
+ begin
+ SysUtils.DeleteFile(FLogFile);
+ AssignFile(fn, FLogFile);
+ Rewrite(fn);
+ end;
+ end
+ else
+ begin
+ AssignFile(fn, FLogFile);
+ Rewrite(fn);
+ end;
+ Writeln(fn, FormatDateTime('yyyy mmm dd (hh:nn:ss) ', now) + Msg);
+ CloseFile(fn);
+ DebugLeave('TASQLite3Log.Display');
+end;
+
+//============================================================================== TASQLite3PRAGMA
+
+function TASQLite3Pragma.GetTempCacheSize: string;
+begin
+ DebugEnter('TASQLite3Pragma.GetTempCacheSize');
+ GetTempCacheSize := 'pragma cache_size=' + IntToStr(FTempCacheSize);
+ DebugLeave('TASQLite3Pragma.GetTempCacheSize');
+end;
+
+function TASQLite3Pragma.GetDefaultCacheSize: string;
+begin
+ DebugEnter('TASQLite3Pragma.GetDefaultCacheSize');
+ GetDefaultCacheSize := 'pragma default_cache_size=' + IntToStr(FDefaultCacheSize);
+ DebugLeave('TASQLite3Pragma.GetDefaultCacheSize');
+end;
+
+function TASQLite3Pragma.GetDefaultSynchronous: string;
+begin
+ DebugEnter('TASQLite3Pragma.GetDefaultSynchronous');
+ GetDefaultSynchronous := 'pragma default_synchronous=' + FDefaultSynchronous;
+ DebugLeave('TASQLite3Pragma.GetDefaultSynchronous');
+end;
+
+function TASQLite3Pragma.GetDefaultTempStore: string;
+begin
+ DebugEnter('TASQLite3Pragma.GetDefaultTempStore');
+ GetDefaultTempStore := 'pragma default_temp_store=' + FDefaultTempStore;
+ DebugLeave('TASQLite3Pragma.GetDefaultTempStore');
+end;
+
+function TASQLite3Pragma.GetTempStore: string;
+begin
+ DebugEnter('TASQLite3Pragma.GetTempStore');
+ GetTempStore := 'pragma temp_store=' + FTempStore;
+ DebugLeave('TASQLite3Pragma.GetTempStore');
+end;
+
+function TASQLite3Pragma.GetSynchronous: string;
+begin
+ DebugEnter('TASQLite3Pragma.GetSynchronous');
+ GetSynchronous := 'pragma synchronous=' + FSynchronous;
+ DebugLeave('TASQLite3Pragma.GetSynchronous');
+end;
+
+ //============================================================================== TFRESULT
+ // TResult is a representation of an internal pointerlist of results.
+ // Only 'normal' results will be stored internally within a fixed memory block
+ // depending on calculated length internally. This is not the case
+ // for blobs and clobs. In this case only the handle is stored in the fixed
+ // structure and a separate memory handle is retrieved to store the blob and
+ // clob data. This is because the blobs are stored as null terminated 'strings'
+ // and thus have different lengths. No more memory is allocated this way than
+ // strictly necessary.
+ // KEEP IN MIND: ...
+ // This resultset is NOT used for unidirectional search results. You can
+ // however, open a dbgrid containing griddata. You cannot update your data
+ // if you use the unidirectional the result is read-only by default and cannot
+ // be changed.
+ // The unidirectional dataset improves performance on large resultsets and
+ // is to be considered for query-only components...
+ //==============================================================================
+
+constructor TFResult.Create(TheDataSet: TASQLite3BaseQuery);
+begin
+ DebugEnter('TFResult.Create');
+ Data := TList.Create;
+ Bookmark := TList.Create;
+ RowId := TList.Create;
+ FDataSet := TheDataset;
+ FLastBookmark := -1; // 2004-14-09 (rps) 0 -> -1 (otherwise insert in an empty table gives index out of range)
+ DebugLeave('TFResult.Create');
+end;
+
+destructor TFResult.Destroy;
+var
+ ptr : Pointer;
+ i : integer;
+begin
+ DebugEnter('TFResult.Destroy');
+ FreeBlobs;
+ if Assigned(Data) then begin
+ for i := 0 to Data.Count - 1 do begin
+ ptr := Data.Items[i];
+ if Assigned(ptr) then FreeMem(ptr, FBufSize);
+ end;
+ Data.Free; // D4 compatibility, otherwise FreeAndNil could be used
+ Data := nil;
+ end;
+
+ if Assigned(Bookmark) then begin
+ Bookmark.Free;
+ Bookmark := nil;
+ end;
+
+ if Assigned(RowId) then begin
+ RowId.Free;
+ RowId := nil;
+ end;
+
+ DebugLeave('TFResult.Destroy');
+end;
+
+procedure TFResult.FreeBlobs;
+var i, j : integer;
+ offset : integer;
+ ptr : PAnsiChar;
+ stream : TMemoryStream;
+begin
+ if not Assigned(FDataSet) then exit;
+ if not Assigned(FDataSet.FieldList) then exit;
+ for j := 0 to Data.Count - 1 do begin
+ ptr := GetData(j);
+ for i := 0 to FDataSet.FieldList.Count - 1 do begin
+ if FDataSet.FieldList[i].DataType in [ftMemo, ftFmtMemo, ftGraphic, ftBlob] then begin
+ Offset := FDataset.GetFieldOffset(FDataSet.FieldList[i].FieldNo);
+ Move((ptr + Offset)^, Pointer(Stream), sizeof(Pointer));
+ Stream.Free;
+ end;
+ end;
+ end;
+end;
+
+procedure TFResult.SetBufSize(TheSize: integer);
+begin
+ DebugEnter('TFResult.SetBufSize');
+ FBufSize := TheSize;
+ DebugLeave('TFResult.SetBufSize');
+end;
+
+//==============================================================================
+// Adds a row of data to the resultset.
+//==============================================================================
+
+procedure TFResult.Add(TheBuffer: PAnsiChar; TheRowId: integer);
+var
+ ptr : PAnsiChar;
+// i: integer;
+begin
+{$IFDEF DEBUG_VERY_LOUD}
+ DebugEnter('TFResult.Add');
+{$ENDIF}
+ Inc(FLastBookmark);
+ GetMem(Ptr, FBufSize);
+ move(TheBuffer^, ptr^, FBufSize);
+ Data.Add(Ptr);
+ Bookmark.Add(Pointer(FLastBookMark));
+ if TheRowId >= 0 then
+ RowId.Add(Pointer(TheRowId))
+ else
+ RowId.Add(Pointer(RowId.Count));
+{$IFDEF DEBUG_VERY_LOUD}
+ DebugLeave('TFResult.Add');
+{$ENDIF}
+end;
+
+//==============================================================================
+// Inserts a row of date into the resultset
+//==============================================================================
+
+procedure TFResult.Insert(Index: integer; TheBuffer: pointer; TheRowId: integer);
+var
+ ptr : Pointer;
+begin
+ DebugEnter('TFResult.Insert');
+ Inc(FLastBookmark);
+ GetMem(Ptr, FBufSize);
+ move(TheBuffer^, ptr^, FBufSize);
+ if Data.Count < Index then begin
+ Data.Add(Ptr);
+ Bookmark.Add(Pointer(FLastBookMark));
+ RowId.Add(Pointer(TheRowId));
+ end else begin
+ Data.Insert(Index, Ptr);
+ Bookmark.Insert(Index, Pointer(FLastBookMark));
+ RowId.Insert(Index, Pointer(TheRowId));
+ end;
+ DebugLeave('TFResult.Insert');
+end;
+
+//==============================================================================
+// Deletes a row of data from the resultset
+//==============================================================================
+
+procedure TFResult.Delete(Index: integer);
+var
+ ptr : pointer;
+begin
+ DebugEnter('TFResult.Delete');
+ if not ((Index < 0) or (Index >= Data.Count)) then
+ begin
+ ptr := Data.Items[Index];
+ if ptr <> nil then
+ FreeMem(ptr, FBufSize);
+ Data.Delete(Index);
+ Bookmark.Delete(Index);
+ Rowid.Delete(Index);
+ end;
+ DebugLeave('TFResult.Delete');
+end;
+
+//==============================================================================
+// Returns a row from the resultset
+//==============================================================================
+
+function TFResult.GetData(Index: integer): Pointer;
+begin
+ DebugEnter('TFResult.GetData');
+ if (Index < 0) or (Index >= Data.Count) then
+ GetData := nil
+ else
+ GetData := Data.Items[Index];
+ DebugLeave('TFResult.GetData');
+end;
+
+function TFResult.GetBookmark(Index: integer): integer;
+begin
+ DebugEnter('TFResult.GetBookmark');
+ if (Index < 0) or (Index >= Data.Count) then
+ GetBookmark := -1
+ else
+ GetBookmark := integer(Bookmark.Items[Index]);
+ DebugLeave('TFResult.GetBookmark');
+end;
+
+function TFResult.GetRowId(Index: integer): integer;
+begin
+ DebugEnter('TFResult.GetRowId');
+ if (Index < 0) or (Index >= RowId.Count) then
+ GetRowId := -1
+ else
+ GetRowId := integer(RowId.Items[Index]);
+ DebugLeave('TFResult.GetRowId');
+end;
+
+function TFResult.Count: integer;
+begin
+ Count := Data.Count;
+end;
+
+function TFResult.IndexOf(TheBookMark: pointer): integer;
+begin
+ Result := BookMark.IndexOf(TheBookmark);
+end;
+
+//============================================================================== ASQLITEDB
+
+procedure TASQLite3DB.Notification(AComponent: TComponent; Operation: TOperation);
+begin
+{$IFDEF DEBUG_VERY_LOUD}
+ DebugEnter('TASQLite3DB.Notification');
+{$ENDIF}
+// Application.ProcessMessages;
+ if Assigned(AComponent) then
+ begin
+ if (Operation = opRemove) then
+ begin
+ if (AComponent is TASQLite3Pragma) then begin
+ if Assigned(FASQLitePragma) then begin
+ if TASQLite3Pragma(AComponent) = FASQLitePragma then
+ FASQLitePragma := nil;
+ end;
+ end
+ else if (AComponent is TASQLite3Log) then
+ begin
+ if Assigned(FASQLiteLog) then begin
+ if TASQLite3Log(AComponent) = FASQLiteLog then
+ FASQLiteLog := nil;
+ end;
+ end
+ else if (AComponent is TASQLite3InlineSQL) then
+ begin
+ if Assigned(FInlineSQL) then begin
+ if TASQLite3InlineSQL(AComponent) = FInlineSQL then
+ FInlineSQL := nil;
+ end;
+ end;
+ end;
+ end;
+ inherited;
+{$IFDEF DEBUG_VERY_LOUD}
+ DebugLeave('TASQLite3DB.Notification');
+{$ENDIF}
+end;
+
+function TASQLite3DB.LoadLibs: boolean;
+begin
+ try
+ DebugEnter('TASQLite3DB.LoadLibs');
+ if not(DecimalSeparator in ['.',',']) then
+ DecimalSeparator := '.';
+
+ Debug('loading sqlite lib');
+{$IFNDEF SQLite_Static}
+ Debug(PAnsiChar(DriverDLL));
+ Result := false;
+ DLLHandle := LoadLibrary(PAnsiChar(DriverDLL)); //JohnLito
+ if DLLHandle <> 0 then
+ begin
+ @SQLite3_Open := GetProcAddress(DLLHandle, 'sqlite3_open');
+ if not Assigned(@SQLite3_Open) then exit;
+ @SQLite3_Close := GetProcAddress(DLLHandle, 'sqlite3_close');
+ if not Assigned(@SQLite3_Close) then exit;
+ @SQLite3_Exec := GetProcAddress(DLLHandle, 'sqlite3_exec');
+ if not Assigned(@SQLite3_Exec) then exit;
+ @SQLite3_LibVersion := GetProcAddress(DLLHandle, 'sqlite3_libversion');
+ if not Assigned(@SQLite3_LibVersion) then exit;
+ @SQLite3_ErrorString := GetProcAddress(DLLHandle, 'sqlite3_errmsg');
+ if not Assigned(@SQLite3_ErrorString) then exit;
+ @SQLite3_GetTable := GetProcAddress(DLLHandle, 'sqlite3_get_table');
+ if not Assigned(@SQLite3_GetTable) then exit;
+ @SQLite3_FreeTable := GetProcAddress(DLLHandle, 'sqlite3_free_table');
+ if not Assigned(@SQLite3_FreeTable) then exit;
+ @SQLite3_FreeMem := GetProcAddress(DLLHandle, 'sqlite3_free');
+ if not Assigned(@SQLite3_FreeMem) then exit;
+ @SQLite3_Complete := GetProcAddress(DLLHandle, 'sqlite3_complete');
+ if not Assigned(@SQLite3_Complete) then exit;
+ @SQLite3_LastInsertRow := GetProcAddress(DLLHandle, 'sqlite3_last_insert_rowid');
+ if not Assigned(@SQLite3_LastInsertRow) then exit;
+ @SQLite3_Cancel := GetProcAddress(DLLHandle, 'sqlite3_interrupt');
+ if not Assigned(@SQLite3_Cancel) then exit;
+ @SQLite3_BusyTimeout := GetProcAddress(DLLHandle, 'sqlite3_busy_timeout');
+ if not Assigned(@SQLite3_BusyTimeout) then exit;
+ @SQLite3_BusyHandler := GetProcAddress(DLLHandle, 'sqlite3_busy_handler');
+ if not Assigned(@SQLite3_BusyHandler) then exit;
+ @SQLite3_Changes := GetProcAddress(DLLHandle, 'sqlite3_changes');
+ if not Assigned(@SQLite3_Changes) then exit;
+ @SQLite3_Prepare := GetProcAddress(DLLHandle, 'sqlite3_prepare');
+ if not Assigned(@SQLite3_Prepare) then exit;
+ @SQLite3_Finalize := GetProcAddress(DLLHandle, 'sqlite3_finalize');
+ if not Assigned(@SQLite3_Finalize) then exit;
+ @SQLite3_Reset := GetProcAddress(DLLHandle, 'sqlite3_reset');
+ if not Assigned(@SQLite3_Reset) then exit;
+ @SQLite3_Step := GetProcAddress(DLLHandle, 'sqlite3_step');
+ if not Assigned(@SQLite3_Step) then exit;
+ @SQLite3_Column_blob := GetProcAddress(DLLHandle, 'sqlite3_column_blob');
+ if not Assigned(@SQLite3_Column_blob) then exit;
+ @SQLite3_Column_bytes := GetProcAddress(DLLHandle, 'sqlite3_column_bytes');
+ if not Assigned(@SQLite3_Column_bytes) then exit;
+ @SQLite3_Column_count := GetProcAddress(DLLHandle, 'sqlite3_column_count');
+ if not Assigned(@SQLite3_Column_Count) then exit;
+ @SQLite3_Column_decltype := GetProcAddress(DLLHandle, 'sqlite3_column_decltype');
+ if not Assigned(@SQLite3_Column_decltype) then exit;
+ @SQLite3_Column_double := GetProcAddress(DLLHandle, 'sqlite3_column_double');
+ if not Assigned(@SQLite3_Column_double) then exit;
+ @SQLite3_Column_int := GetProcAddress(DLLHandle, 'sqlite3_column_int');
+ if not Assigned(@SQLite3_Column_int) then exit;
+ @SQLite3_Column_int64 := GetProcAddress(DLLHandle, 'sqlite3_column_int64');
+ if not Assigned(@SQLite3_Column_int64) then exit;
+ @SQLite3_Column_name := GetProcAddress(DLLHandle, 'sqlite3_column_name');
+ if not Assigned(@SQLite3_Column_name) then exit;
+ @SQLite3_Column_text := GetProcAddress(DLLHandle, 'sqlite3_column_text');
+ if not Assigned(@SQLite3_Column_text) then exit;
+ @SQLite3_Column_text16 := GetProcAddress(DLLHandle, 'sqlite3_column_text16');
+ if not Assigned(@SQLite3_Column_text16) then exit;
+ @SQLite3_Column_type := GetProcAddress(DLLHandle, 'sqlite3_column_type');
+ if not Assigned(@SQLite3_Column_type) then exit;
+ @SQLite3_Bind_Blob := GetProcAddress(DLLHandle, 'sqlite3_bind_blob');
+ if not Assigned(@SQLite3_Bind_blob) then exit;
+ @SQLite3_Bind_Text16 := GetProcAddress(DLLHandle, 'sqlite3_bind_text16');
+ if not Assigned(@SQLite3_Bind_Text16) then exit;
+ @SQLite3_Bind_Parameter_Count := GetProcAddress(DLLHandle, 'sqlite3_bind_parameter_count');
+ if not Assigned(@SQLite3_Bind_Parameter_Count) then exit;
+
+ Result := true;
+ end;
+ {$ELSE}
+ DllHandle := 1;
+ @SQLite3_Open := @_sqlite3_open;
+ @SQLite3_Close := @_sqlite3_close;
+ @SQLite3_Exec := @_sqlite3_exec;
+ @SQLite3_LibVersion := @_sqlite3_libversion;
+ @SQLite3_ErrorString := @_sqlite3_errmsg;
+ @SQLite3_GetTable := @_sqlite3_get_table;
+ @SQLite3_FreeTable := @_sqlite3_free_table;
+ @SQLite3_FreeMem := @_sqlite3_free;
+ @SQLite3_Complete := @_sqlite3_complete;
+ @SQLite3_LastInsertRow := @_sqlite3_last_insert_rowid;
+ @SQLite3_Cancel := @_sqlite3_interrupt;
+ @SQLite3_BusyTimeout := @_sqlite3_busy_timeout;
+ @SQLite3_BusyHandler := @_sqlite3_busy_handler;
+ @SQLite3_Changes := @_sqlite3_changes;
+ @SQLite3_Prepare := @_sqlite3_prepare;
+ @SQLite3_Finalize := @_sqlite3_finalize;
+ @SQLite3_Reset := @_sqlite3_reset;
+ @SQLite3_Step := @_sqlite3_step;
+ @SQLite3_Column_blob := @_sqlite3_column_blob;
+ @SQLite3_Column_bytes := @_sqlite3_column_bytes;
+ @SQLite3_Column_count := @_sqlite3_column_count;
+ @SQLite3_Column_decltype := @_sqlite3_column_decltype;
+ @SQLite3_Column_double := @_sqlite3_column_double;
+ @SQLite3_Column_int := @_sqlite3_column_int;
+ @SQLite3_Column_int64 := @_sqlite3_column_int64;
+ @SQLite3_Column_name := @_sqlite3_column_name;
+ @SQLite3_Column_text := @_sqlite3_column_text;
+ @SQLite3_Column_type := @_sqlite3_column_type;
+ @SQLite3_Bind_Blob := @_sqlite3_bind_blob;
+ Result := true;
+ {$ENDIF}
+ finally
+ DebugLeave('TASQLite3DB.LoadLibs');
+ end;
+end;
+
+procedure TASQLite3DB.ShowError;
+var msg : PAnsiChar;
+begin
+ msg := SQLite3_ErrorString(DBHandle);
+ raise EDatabaseError.Create(msg);
+end;
+
+function TASQLite3DB.SQLite3_ExecSQL(TheStatement: string; Blobs: TList=nil): integer;
+var
+ PF: PAnsiChar;
+ p: Pointer;
+ i: Integer;
+ b: Integer;
+ m: TMemoryStream;
+begin
+ TheStatement := StringReplace(TheStatement, #2, '?', [rfReplaceAll, rfIgnoreCase]);
+ PF := PAnsiChar(TheStatement);
+ repeat
+ Result := SQLite3_Prepare(DBHandle, PF, -1, p, PF);
+ if Result = SQLITE_OK then
+ begin
+ if Assigned(Blobs) then begin
+ for i := 0 to Blobs.Count - 1 do Begin
+ b := i+1;
+ m := TMemoryStream(Blobs.Items[i]);
+ SQLite3_Bind_Blob(p, b, PChar(m.Memory), m.Size, nil);
+ End;
+ end;
+ repeat
+ until SQLite3_Step(p) in [SQLITE_DONE, SQLITE_ERROR, SQLITE_MISUSE];
+ Result := SQLite3_Finalize(p);
+ if Result <> SQLITE_OK then ShowError;
+ end
+ else
+ ShowError;
+ until PF^ = #0;
+end;
+
+function TASQLite3DB.SQLite3_PrepareResult(DB: Pointer; TheStatement: string; FParams: TParams; Sender: TObject): Pointer;
+var
+ i,tmpi: Integer;
+ t: PAnsiChar;
+ RV: Integer;
+// RowIdCol: Integer; // column containing rowid
+// RowId: Integer; // current record row id (to be stored in resultset)
+ colname, coltype: PChar;
+ tmpcolname:string;
+ FieldType: TFieldType;
+ FieldLen: Integer;
+ FieldDec: Integer;
+ bFirst: Boolean;
+ wildcard: Integer;
+begin
+ if not (Sender is TASQLite3BaseQuery) then Exit;
+
+ with (Sender as TASQLite3BaseQuery) do begin
+ // if there are blob fields then we need to bind the blob variable
+ RowId := -1;
+ RowIdCol := -1;
+ TheStatement := StringReplace(TheStatement, #2, '?', [rfReplaceAll, rfIgnoreCase]);
+
+ bFirst := True;
+{$IFDEF ASQLITE_D6PLUS}
+ if FUtf8 then
+ RV := SQLite3_Prepare(DBHandle, PAnsiChar(AnsiToUtf8(TheStatement)), -1, result, t)
+ else
+{$endif}
+ RV := SQLite3_Prepare(DBHandle, PAnsiChar(TheStatement), -1, result, t);
+
+ wildcard := 1;
+ if Assigned(FParams) then begin
+ for i := 0 to FParams.Count - 1 do begin
+ if FParams[i].DataType in [ftBlob, ftGraphic] then begin
+ SQLite3_Bind_Blob(result, wildcard, PChar(FParams[i].AsBlob), FParams[i].GetDataSize, nil);
+ Inc(wildcard);
+ end;
+ end;
+ end;
+
+ if RV <> 0 then ShowError else begin
+ if bFirst then begin // retrieve metadata on first row
+ bFirst := False;
+ if SQLite3_Column_count(result) > 0 then FieldDefs.Clear;
+ for i := 0 to SQLite3_Column_count(result) - 1 do begin
+ colname := SQLite3_Column_name(result, i);
+
+ // the second field named "ID", change in "ID_1" (like InterBase)
+ if (FieldDefs.IndexOf(colname) >= 0) then begin // Mirko
+ tmpColName := colname; // Mirko
+ tmpI := 0; // Mirko
+ while (FieldDefs.IndexOf(tmpcolname) >= 0) do begin // Mirko
+ inc(tmpI); // Mirko
+ tmpColName := colname + '_' + inttostr(tmpI); // Mirko
+ end; // Mirko
+ colName := PChar(tmpColName); // Mirko
+ end; // Mirko
+
+ if CompareText(colname, 'rowid') = 0 then begin
+ RowIdCol := i;
+ end else begin
+ coltype := SQLite3_Column_decltype(result, i);
+ //SQl: select max(CurID) from Items, sqlite3_column_decltype returns null.. it's probably SQLite bug
+ // better is to use max(CurID) as something from .... Aducom
+ if coltype = nil then
+ GetFieldInfo('string', FieldType, FieldLen, FieldDec) //OL
+ else
+ GetFieldInfo(coltype, FieldType, FieldLen, FieldDec);
+ if TypeLess then begin
+ FieldType := ftString;
+ with FieldDefs.AddFieldDef do begin
+ Name := colname;
+ DataType := FieldType;
+ Size := FieldLen;
+ end;
+ end else begin
+ with FieldDefs.AddFieldDef do begin
+ if FieldType <> ftString then begin
+ Name := colname;
+ DataType := FieldType;
+ if FieldType = ftFloat then
+ Precision := FieldDec;
+ end else begin
+ Name := colname;
+ DataType := FieldType;
+ Size := FieldLen;
+ end;
+ end;
+ end;
+ MaxStrLen := MaxStrLen + GetNativeFieldSize(i + 1); // compensate for terminating zero
+ FResult.SetBufSize(MaxStrLen + 1 + SizeOf(TBookMark));
+ end;
+ end;
+ end;
+ end;
+ end;
+end;
+
+function TASQLite3DB.SQLite3_GetNextResult(DB: Pointer; TheStatement: pointer; FParams: TParams; Sender: TObject) : pointer;
+var
+ i : integer;
+ minmin : integer;
+ RV: Integer;
+ mv: Integer;
+// RowIdCol: Integer; // column containing rowid
+ convertbuf: TConvertBuffer;
+ pData: PAnsiChar;
+ BlobStream: TMemoryStream;
+begin
+ result := nil;
+ with (Sender as TASQLite3BaseQuery) do begin
+
+ FillChar(ResultStr^, MaxBuf, 0);
+ RV := SQLite3_Step(theStatement);
+ if RV = SQLITE_ROW then begin
+
+ // retrieve data
+ if (Sender is TASQLite3Query) then
+ MinMin := 1
+ else
+ MinMin := 1; // compensate for 'rowid'
+ for i := 0 to SQLite3_Column_count(theStatement) - MinMin do begin
+ if i = RowIdCol then begin // just save rowid
+ RowId := SQLite3_Column_int(theStatement, i);
+ end else begin
+
+// ok, i can find-out that the fiels is null but.... eh....
+// if SQLite3_column_type(theStatement, i) = 5 then begin
+// end;
+
+ pData := SQLite3_Column_text(theStatement, i);
+ if pData = nil then pData := ''; // james
+ if FTypeLess then begin
+ mv := GetNativeFieldSize(i + 1);
+ if StrLen(pData) < Cardinal(mv) then
+ mv := StrLen(pData);
+ Move(pData^, (ResultStr + GetFieldOffset(i + 1))^, mv);
+ end else begin
+ case FieldDefs[i].DataType of // DI
+ ftString: // DI
+ begin // DI
+ mv := GetNativeFieldSize(i + 1);
+ if pData <> nil then //OL
+ begin
+ if StrLen(pData) < Cardinal(mv) then
+ mv := StrLen(pData)+1; // plus onennnnnnnnnnnnnnnn
+ Move(pData^, (ResultStr + GetFieldOffset(i + 1))^, mv);
+ end;
+ end; // DI
+ ftMemo, ftGraphic, ftFmtMemo, ftBlob: // DI
+ begin // DI
+ // create memory stream to save blob;
+ pData := SQLite3_Column_blob(theStatement, i);
+ BlobStream := TMemoryStream.Create;
+ if pData <> nil then
+ BlobStream.Write(pData^, SQLite3_Column_bytes(theStatement, i))
+ else begin
+ pData := '';
+ BlobStream.Write(pData^, 0);
+ end;
+ Move(BlobStream, (ResultStr + GetFieldOffset(i + 1))^, SizeOf(BlobStream));
+ end; // DI
+ else // DI
+ begin // DI
+ convertbuf := UnpackBuffer(pData, FieldDefs[i].DataType);
+ Move(convertbuf, (ResultStr + GetFieldOffset(i + 1))^, GetFieldSize(i + 1));
+ end;
+ end;
+ end;
+ end
+ end;
+ Result := ResultStr;
+ end;
+ if RV in [SQLITE_DONE] then result := nil;
+ if RV in [SQLITE_ERROR, SQLITE_MISUSE] then //f.e. inserting NULL in field declared as NOT NULL
+ ShowError;
+ end;
+end;
+
+procedure TASQLite3DB.SQLite3_CloseResult(TheStatement : pointer);
+var RV : integer;
+begin
+ if TheStatement <> nil then begin
+ SQLite3_Reset(TheStatement);
+ RV := SQLite3_Finalize(TheStatement);
+ if RV <> 0 then raise AsgError.Create('SQLiteExecute error: ' + IntToStr(RV));
+ end;
+end;
+
+function TASQLite3DB.SQLite3_Execute(DB: Pointer; TheStatement: string; FParams: TParams; Sender: TObject): Integer;
+var
+ p: Pointer;
+ RowIdCol: Integer; // column containing rowid
+{$IFDEF ASQLITE_D6PLUS}
+ Cursor: TDBScreenCursor;
+{$endif}
+begin
+ SQLite3_Execute := 0;
+ RowIdCol := -1;
+ if not (Sender is TASQLite3BaseQuery) then Exit;
+ try
+ with (Sender as TASQLite3BaseQuery) do begin
+{$IFDEF ASQLITE_D6PLUS}
+ if Assigned(DBScreen) and (FSQLCursor) then begin
+ Cursor := DBScreen.Cursor;
+ DBScreen.Cursor := dcrSQLWait;
+ end;
+{$endif}
+ RowId := -1;
+
+ FStatement := Connection.SQLite3_PrepareResult(Connection.DBHandle, PAnsiChar(TheStatement),FParams, Sender);
+
+ repeat
+ p := Connection.SQLite3_GetNextResult(Connection.DBHandle, FStatement, FParams, Sender);
+ if p <> nil then
+ FResult.Add(ResultStr, RowId);
+ until p = nil;
+
+ Connection.SQLite3_CloseResult(FStatement);
+ FStatement := nil;
+ end;
+ finally
+{$IFDEF ASQLITE_D6PLUS}
+ if Assigned(DBScreen) and ((Sender as TASQLite3BaseQuery).FSQLCursor) then begin
+ DBScreen.Cursor := Cursor;
+ if DBScreen.Cursor = dcrSQLWait then
+ DBScreen.Cursor := dcrDefault;
+ end;
+{$endif}
+
+ end;
+end;
+
+function TASQLite3DB.FGetDriverDLL: string;
+begin
+ DebugEnter('TASQLite3DB.FGetDriverDLL');
+ if FDriverDLL = '' then
+ FDriverDLL := 'SQLite3.dll';
+ FGetDriverDLL := FDriverDLL;
+ DebugLeave('TASQLite3DB.FGetDriverDLL');
+end;
+
+function TASQLite3DB.FGetDefaultExt: string;
+begin
+ DebugEnter('TASQLite3DB.FGetDefaultExt');
+ if FDefaultExt = '' then
+ FDefaultExt := '.sqb';
+ FGetDefaultExt := FDefaultExt;
+ DebugLeave('TASQLite3DB.FGetDefaultExt');
+end;
+
+procedure TASQLite3DB.FSetDatabase(Database: string);
+begin
+ DebugEnter('TASQLite3DB.FSetDatabase ' + Database);
+ FDatabase := Trim(Database);
+ if ExtractFileExt(FDataBase)='' Then // GPA
+ FDatabase:=FDataBase+FDefaultExt; // GPA
+ DebugLeave('TASQLite3DB.FSetDatabase');
+end;
+
+procedure TASQLite3DB.ShowDatabases(List: TStrings);
+var
+ sr : TSearchRec;
+begin
+ DebugEnter('TASQLite3DB.ShowDatabases');
+ if DefaultExt = '' then
+ DefaultExt := '.sqb';
+ if DefaultExt[1] <> '.' then
+ DefaultExt := '.' + DefaultExt;
+ if DefaultDir <> '' then
+ if DefaultDir[Length(DefaultDir)] <> '\' then
+ DefaultDir := DefaultDir + '\';
+ if FindFirst(FDefaultDir + '*' + DefaultExt, faAnyFile, sr) = 0 then
+ begin
+ repeat
+ List.Add(sr.Name);
+ until FindNext(sr) <> 0;
+ SysUtils.FindClose(sr);
+ end;
+ DebugLeave('TASQLite3DB.ShowDatabases');
+end;
+
+procedure TASQLite3DB.GetTableNames(List: TStrings; SystemTables: boolean = false);
+var
+ ResultPtr : Pointer;
+ ResultStr : ^Pointer;
+ RowCount : cardinal;
+ ColCount : cardinal;
+ ErrMsg : PAnsiChar;
+ i : integer;
+begin
+ DebugEnter('TASQLite3DB.GetTableNames');
+ if not FConnected then
+ Connected := true;
+ if FConnected then
+ begin
+ SQLite3_GetTable(DBHandle, PAnsiChar(
+ 'SELECT name FROM sqlite_master WHERE type="table" ORDER BY name'),
+ ResultPtr, RowCount, ColCount, ErrMsg);
+
+ ResultStr := ResultPtr;
+ List.Clear;
+ Inc(ResultStr); // ignore header
+ for i := 1 to RowCount do
+ begin
+ if (CompareText('name', PAnsiChar(ResultStr^)) <> 0) then
+ List.Add(PAnsiChar(ResultStr^));
+ Inc(ResultStr);
+ end;
+ if Assigned(ResultPtr) then SQLite3_FreeTable(ResultPtr);
+ end;
+ DebugLeave('TASQLite3DB.GetTableNames');
+end;
+
+procedure TASQLite3DB.GetIndexFieldNames(IndexName: string; List: TStrings);
+var
+ ResultPtr : Pointer;
+ ResultStr : ^Pointer;
+ RowCount : cardinal;
+ ColCount : cardinal;
+ ErrMsg : PAnsiChar;
+ i : integer;
+begin
+ DebugEnter('TASQLite3DB.GetIndexFieldNames');
+ if not FConnected then
+ Connected := true;
+ if FConnected then
+ begin
+ SQLite3_GetTable(DBHandle, PAnsiChar(
+ 'PRAGMA index_info("' + IndexName + '");'),
+ ResultPtr, RowCount, ColCount, ErrMsg);
+
+ ResultStr := ResultPtr;
+ List.Clear;
+ Inc(ResultStr, 5);
+ for i := 1 to RowCount do
+ begin
+ List.Insert(0, PAnsiChar(ResultStr^));
+ Inc(ResultStr, 3);
+ end;
+ if Assigned(ResultPtr) then SQLite3_FreeTable(ResultPtr);
+ end;
+ DebugLeave('TASQLite3DB.GetIndexFieldNames');
+end;
+
+procedure TASQLite3DB.GetIndexNames(List: TStrings; SystemTables: boolean = false);
+var
+ ResultPtr : Pointer;
+ ResultStr : ^Pointer;
+ RowCount : cardinal;
+ ColCount : cardinal;
+ ErrMsg : PAnsiChar;
+ i : integer;
+begin
+ DebugEnter('TASQLite3DB.GetIndexNames');
+ if not FConnected then
+ Connected := true;
+ if FConnected then
+ begin
+ SQLite3_GetTable(DBHandle, PAnsiChar(
+ 'SELECT name FROM sqlite_master WHERE type="index" ORDER BY name'),
+ ResultPtr, RowCount, ColCount, ErrMsg);
+
+ ResultStr := ResultPtr;
+ List.Clear;
+ Inc(ResultStr); // ignore header
+ for i := 1 to RowCount do
+ begin
+ List.Add(PAnsiChar(ResultStr^));
+ Inc(ResultStr);
+ end;
+ if Assigned(ResultPtr) then SQLite3_FreeTable(ResultPtr);
+ end;
+ DebugLeave('TASQLite3DB.GetIndexNames');
+end;
+
+procedure TASQLite3DB.GetFieldNames(TableName: string; List: TStrings);
+var
+ ResultPtr : Pointer;
+ ResultStr : ^Pointer;
+ RowCount : cardinal;
+ ColCount : cardinal;
+ ErrMsg : PAnsiChar;
+ i : integer;
+begin
+ DebugEnter('TASQLite3DB.GetFieldNames ' + Tablename);
+ if not FConnected then
+ Connected := true;
+ if FConnected then
+ begin
+ SQLite3_GetTable(DBHandle, PAnsiChar('PRAGMA table_info("' + TableName + '");'),
+ ResultPtr, RowCount, ColCount, ErrMsg);
+ ResultStr := ResultPtr;
+ List.Clear;
+ Inc(ResultStr, 6); // headers can be ignored
+ for i := 1 to RowCount do
+ begin
+ Inc(ResultStr);
+ List.Add(PAnsiChar(ResultStr^)); // the second field contains the fieldname
+ Inc(ResultStr, 5);
+ end;
+ if Assigned(ResultPtr) then SQLite3_FreeTable(ResultPtr);
+ end;
+ DebugLeave('TASQLite3DB.GetFieldNames');
+end;
+
+procedure TASQLite3DB.GetPrimaryKeys(TableName: string; List: TStrings);
+var
+ ResultPtr : Pointer;
+ ResultStr : ^Pointer;
+// PK: ^Pointer;
+ RowCount : cardinal;
+ ColCount : cardinal;
+ ErrMsg : PAnsiChar;
+ Temp : string;
+ i : integer;
+begin
+ DebugEnter('TASQLite3DB.GetPrimaryKeys ' + Tablename);
+ if not FConnected then
+ Connected := true;
+ if FConnected then
+ begin
+ SQLite3_GetTable(DBHandle, PAnsiChar('PRAGMA table_info("' + TableName + '");'),
+ ResultPtr, RowCount, ColCount, ErrMsg);
+ ResultStr := ResultPtr;
+ List.Clear;
+ Inc(ResultStr, 6); // headers can be ignored
+ for i := 1 to RowCount do
+ begin
+ Inc(ResultStr);
+ Temp := PAnsiChar(ResultStr^); // the second field contains the fieldname
+ Inc(ResultStr, 4);
+ // the last field reveils a indicator for primary key
+ if PAnsiChar(ResultStr^) = '1' then
+ List.Add(Temp);
+ Inc(ResultStr);
+ end;
+ if Assigned(ResultPtr) then SQLite3_FreeTable(ResultPtr);
+ end;
+ DebugLeave('TASQLite3DB.GetPrimaryKeys');
+end;
+
+procedure TASQLite3DB.GetTableInfo(TableName: string; List: TList);
+var
+ ResultPtr : Pointer;
+ ResultStr : ^Pointer;
+ RowCount : cardinal;
+ ColCount : cardinal;
+ ErrMsg : PAnsiChar;
+ Field : TASQLite3Field;
+ i : integer;
+begin
+ DebugEnter('TASQLite3DB.GetTableInfo ' + Tablename);
+ if not FConnected then
+ Connected := true;
+ if FConnected then
+ begin
+ SQLite3_GetTable(DBHandle, PAnsiChar('PRAGMA table_info("' + TableName + '");'),
+ ResultPtr, RowCount, ColCount, ErrMsg);
+ ResultStr := ResultPtr;
+ while List.Count > 0 do
+ begin
+ TASQLite3Field(List[0]).Free;
+ List.Delete(0);
+ end;
+ List.Clear;
+
+ Inc(ResultStr,6);
+ for i := 1 to RowCount do
+ begin
+ Field := TASQLite3Field.Create;
+ with Field do
+ begin
+ FieldNumber := StrToIntX(PAnsiChar(ResultStr^));
+ Inc(ResultStr);
+ FieldName := PAnsiChar(ResultStr^);
+ Inc(ResultStr);
+ FieldType := PAnsiChar(ResultStr^);
+ Inc(ResultStr);
+ FieldNN := StrToIntX(PAnsiChar(ResultStr^));
+ Inc(ResultStr);
+ FieldDefault := PAnsiChar(ResultStr^);
+ Inc(ResultStr);
+ FieldPK := StrToIntX(PAnsiChar(ResultStr^));
+ Inc(ResultStr);
+ end;
+ List.Add(Field);
+ end;
+ if Assigned(ResultPtr) then SQLite3_FreeTable(ResultPtr);
+ end;
+ DebugLeave('TASQLite3DB.GetTableInfo');
+end;
+
+// retrieves the user version
+function TASQLite3DB.GetUserVersion(database : string=''): integer;
+var
+ ResultPtr : Pointer;
+ ResultStr : ^Pointer;
+ RowCount : cardinal;
+ ColCount : cardinal;
+ ErrMsg : PAnsiChar;
+begin
+ DebugEnter('TASQLite3DB.GetTableIndexNames');
+ GetUserVersion := -1;
+ if not FConnected then
+ Connected := true;
+ if FConnected then
+ begin
+ if database <> '' then database := database +'.';
+ SQLite3_GetTable(DBHandle, PAnsiChar(
+ 'PRAGMA '+Database+'user_version'),
+ ResultPtr, RowCount, ColCount, ErrMsg);
+ ResultStr := ResultPtr;
+ Inc(ResultStr);
+ GetUserVersion := StrToIntX(PAnsiChar(ResultStr^));
+ end;
+end;
+
+// sets user version.
+procedure TASQLite3DB.SetUserVersion(Version : integer; Database : string='');
+begin
+ if Database <> '' then Database := Database +'.';
+ SQLite3_ExecSQL('PRAGMA '+Database+'user_version='+IntToStr(Version));
+end;
+
+procedure TASQLite3DB.GetTableIndexNames(TableName: string; List: TStrings);
+var
+ ResultPtr : Pointer;
+ ResultStr : ^Pointer;
+ RowCount : cardinal;
+ ColCount : cardinal;
+ ErrMsg : PAnsiChar;
+ i : integer;
+begin
+ DebugEnter('TASQLite3DB.GetTableIndexNames');
+ if not FConnected then
+ Connected := true;
+ if FConnected then
+ begin
+ SQLite3_GetTable(DBHandle, PAnsiChar(
+ 'PRAGMA index_list("' + TableName + '");'),
+ ResultPtr, RowCount, ColCount, ErrMsg);
+
+ ResultStr := ResultPtr;
+ List.Clear;
+ Inc(ResultStr, 4); // Skip header + 1st col.
+ for i := 1 to RowCount do
+ begin
+ List.Insert(0, PAnsiChar(ResultStr^));
+ Inc(ResultStr, 3);
+ end;
+ if Assigned(ResultPtr) then SQLite3_FreeTable(ResultPtr);
+ end;
+ DebugLeave('TASQLite3DB.GetTableIndexNames');
+end;
+
+procedure TASQLite3DB.DBConnect(Connected: boolean);
+var
+ ErrMsg : PAnsiChar;
+ DBMS : string;
+ rv : integer;
+ i : integer; // GPA
+begin
+ DebugEnter('TASQLite3DB.DBConnect');
+
+// ShowMessage(FCharEnc);
+ if (CompareText(FCharEnc,'utf8')=0) or (FCharEnc='') then
+ FUtf8 := true
+ else
+ FUtf8 := false;
+
+ if (Connected) and (FDatabase = '') then
+ begin
+ DebugLeave('TASQLite3DB.DBConnect Exit');
+ raise AsgError.Create('Missing database property');
+ SQLite3_FreeMem(ErrMsg);
+ FConnected := false;
+ exit;
+ end;
+
+ if not Connected then
+ begin
+ if FConnected then
+ begin
+ if DLLHandle <> 0 then
+ begin
+ Debug('freeing sqlite dll');
+ if Assigned(FBeforeDisconnect) then
+ FBeforeDisconnect(self);
+ // if closed then all Datasets must be closed (GPA)
+ if Assigned(Owner) Then
+ For I:=0 to Owner.ComponentCount-1 do
+ if Owner.Components[I] is TASQLite3BaseQuery Then
+ TASQLite3BaseQuery(Owner.Components[I]).Active:=False;
+
+ if Assigned(@SQLite3_Close) then
+ SQLite3_Close(DBHandle);
+
+ {$IFNDEF SQLite_Static}
+ FreeLibrary(DLLHandle);
+ {$ENDIF}
+
+ DLLHandle := 0;
+ if Assigned(FAfterDisconnect) then
+ FAfterDisconnect(self);
+ end;
+ FConnected := false;
+ DebugLeave('TASQLite3DB.DBConnect');
+ exit;
+ end
+ end
+ else
+ begin
+ if CompareText(':memory:', Database) <> 0 then begin
+ if DefaultDir <> '' then begin
+ if DefaultDir[Length(DefaultDir)] <> '\' then
+ DefaultDir := DefaultDir + '\';
+ DBMS := DefaultDir + Database;
+ end else begin
+ if Pos('\', Database) = 0 then
+ DBMS := GetCurrentDir + '\' + DataBase
+ else
+ DBMS := Database;
+ end;
+
+ if FMustExist then begin
+ if not FileExists(DBMS) then begin
+ DebugLeave('TASQLite3DB.DBConnect ' + 'Database ' + DBMS + ' does not exist');
+ raise EDatabaseError.Create('Database ' + DBMS + ' does not exist');
+ end;
+ end;
+ end else DBMS := Database; // in memory database
+
+ if DLLHandle = 0 then
+ begin
+ if not LoadLibs then
+ begin
+ FConnected := false;
+ DebugLeave('TASQLite3DB.DBConnect ' + 'Could Not load SQLite Library');
+ raise AsgError.Create('Could not load SQLite library');
+ end;
+ end;
+
+ FConnected := true;
+ FVersion := SQLite3_LibVersion;
+
+ DBHandle := nil;
+ ErrMsg := nil;
+ if Assigned(FBeforeConnect) then
+ FBeforeConnect(self);
+
+{$IFDEF ASQLITE_D6PLUS}
+ if Assigned(@SQLite3_Open) then
+ if FVersion > '3.2.5' then
+ rv := SQLite3_Open(PAnsiChar(AnsiToUTF8(DBMS)), DBHandle)
+ else
+{$endif}
+ rv := SQLite3_Open(PAnsiChar(DBMS), DBHandle);
+
+ if Assigned(FAfterConnect) then
+ FAfterConnect(self);
+
+ if DBHandle = nil then
+ FConnected := false;
+
+ if Assigned(FASQLitePragma) then
+ ExecPragma;
+
+ FLastError := ErrMsg;
+ if ErrMsg <> nil then
+ SQLite3_FreeMem(ErrMsg);
+ // GPA Added to execute InlineSQL in case of use Connected:=True instead of Open
+ if ExecuteInlineSQL and Assigned(FInlineSQL) then Try // GPA
+ ExecStartTransaction(''); // GPA
+ SQLite3_ExecSQL(FInlineSQL.FSQL.Text); // GPA
+ Commit; // GPA
+ finally // GPA
+ ExecuteInlineSQL:=False; //GPA Assure just one execution in case of reopen
+ end; // GPA
+ end;
+ DebugLeave('TASQLite3DB.DBConnect');
+end;
+
+function TASQLite3DB.RowsAffected: integer;
+begin
+ DebugEnter('TASQLite3DB.RowsAffected');
+ if not FConnected then
+ Result := -1
+ else
+ Result := SQLite3_Changes(DBHandle);
+ DebugLeave('TASQLite3DB.RowsAffected');
+end;
+
+//------------------------------------------------------------------------------
+// By Ralf, The Delphi Inspiration
+//------------------------------------------------------------------------------
+
+function TableExistsCallback(UserData: Pointer; ColumnCount: Integer; ColumnValues, ColumnNames: PPointer): Integer; cdecl;
+begin
+ if AnsiStrIComp(UserData, ColumnValues^) <> 0 then
+ Result := 0
+ else
+ Result := 1; // Abort
+end;
+
+//------------------------------------------------------------------------------
+
+function TASQLite3DB.TableExists(const ATableName: AnsiString): Boolean;
+var
+ ErrMsg: PAnsiChar;
+begin
+ try
+ { No WHERE clause is used in the SQL statement below.
+ Instead, the callback function compares without case sensitivity. }
+ Result := SQLite3_Exec(DBHandle, 'SELECT name FROM sqlite_master',
+ TableExistsCallback,Pointer(ATableName), ErrMsg) = SQLITE_ABORT;
+ finally
+ if ErrMsg <> nil then
+ begin
+ SQLite3_FreeMem(ErrMsg);
+ ShowError;
+ end;
+ end;
+end;
+
+//------------------------------------------------------------------------------
+procedure TASQLite3DB.ExecStartTransaction(TransType: string);
+begin
+// if no transaction type available then use default from asqlitedb
+ if (TransType = '') then TransType := FTransactionType;
+
+ if ((TransType = '') or (CompareText(TransType, 'DEFAULT') = 0)) then StartTransaction
+ else if (CompareText(TransType, 'DEFERRED') = 0) then StartDeferredTransaction
+ else if (CompareText(TransType, 'IMMEDIATE') = 0) then StartImmediateTransaction
+ else if (CompareText(TransType, 'EXCLUSIVE') = 0) then StartExclusiveTransaction
+ else StartTransaction;
+end;
+
+procedure TASQLite3DB.StartTransaction;
+begin
+ DebugEnter('TASQLite3DB.StartTransaction');
+ if not FConnected then // open database if necessary
+ Connected := true; // trigger the 'dbconnect' event
+ if FConnected then SQLite3_ExecSQL('begin transaction');
+ DebugLeave('TASQLite3DB.StartTransaction');
+end;
+
+procedure TASQLite3DB.StartDeferredTransaction;
+begin
+ if not FConnected then // open database if necessary
+ Connected := true; // trigger the 'dbconnect' event
+ if FConnected then SQLite3_ExecSQL('begin deferred transaction');
+end;
+
+procedure TASQLite3DB.StartImmediateTransaction;
+begin
+ if not FConnected then // open database if necessary
+ Connected := true; // trigger the 'dbconnect' event
+ if FConnected then SQLite3_ExecSQL('begin immediate transaction');
+end;
+
+procedure TASQLite3DB.StartExclusiveTransaction;
+begin
+ if not FConnected then // open database if necessary
+ Connected := true; // trigger the 'dbconnect' event
+ if FConnected then SQLite3_ExecSQL('begin exclusive transaction');
+end;
+
+procedure TASQLite3DB.Open;
+begin
+ DebugEnter('TASQLite3DB.Open');
+ Connected := true;
+
+ if DLLHandle = 0 then
+ Connected := false;
+
+ DebugLeave('TASQLite3DB.Open');
+end;
+
+procedure TASQLite3DB.Close;
+begin
+ DebugEnter('TASQLite3DB.Close');
+ Connected := false;
+ DebugLeave('TASQLite3DB.Close');
+end;
+
+procedure TASQLite3DB.ExecPragma;
+var
+ Cmd : string;
+begin
+ DebugEnter('TASQLite3DB.ExecPragma');
+ if not FConnected then
+ Connected := true;
+ if FConnected then
+ begin
+ if FASQLitePragma.FTempCacheSize <> 0 then
+ begin
+ cmd := FASQLitePragma.GetTempCacheSize;
+ SQLite3_ExecSQL(cmd);
+ end;
+ if FASQLitePragma.FDefaultCacheSize <> 0 then
+ begin
+ cmd := FASQLitePragma.GetDefaultCacheSize;
+ SQLite3_ExecSQL(cmd);
+ end;
+
+ if FASQLitePragma.FDefaultSynchronous <> '' then
+ begin
+ cmd := FASQLitePragma.GetDefaultSynchronous;
+ SQLite3_ExecSQL(cmd);
+ end;
+
+ if FASQLitePragma.FDefaultTempStore <> '' then
+ begin
+ cmd := FASQLitePragma.GetDefaultTempStore;
+ SQLite3_ExecSQL(cmd);
+ end;
+
+ if FASQLitePragma.FTempStore <> '' then
+ begin
+ cmd := FASQLitePragma.GetTempStore;
+ SQLite3_ExecSQL(cmd);
+ end;
+
+ if FASQLitePragma.FSynchronous <> '' then
+ begin
+ cmd := FASQLitePragma.GetSynchronous;
+ SQLite3_ExecSQL(cmd);
+ end;
+ end;
+ DebugLeave('TASQLite3DB.ExecPragma');
+end;
+
+procedure TASQLite3DB.Commit;
+begin
+ DebugEnter('TASQLite3DB.Commit');
+ if not FConnected then
+ Connected := true;
+ if FConnected then SQLite3_ExecSQL('commit transaction');
+ DebugLeave('TASQLite3DB.Commit');
+end;
+
+procedure TASQLite3DB.RollBack;
+begin
+ DebugEnter('TASQLite3DB.RollBack');
+ if not FConnected then
+ Connected := true;
+ if FConnected then
+ SQLite3_ExecSQL('rollback transaction');
+ DebugLeave('TASQLite3DB.RollBack');
+end;
+
+constructor TASQLite3DB.Create(AOwner: TComponent);
+//var fn : TextFile;
+begin
+ DebugEnter('TASQLite3DB.Create');
+ Connected := false;
+ ASQLiteLog := nil;
+ ASQLitePragma := nil;
+ inherited Create(AOwner);
+ DebugLeave('TASQLite3DB.Create');
+end;
+
+destructor TASQLite3DB.Destroy;
+//var fn : TextFile;
+begin
+ DebugEnter('TASQLite3DB.Destroy');
+ FConnected := false;
+ ASQLiteLog := nil;
+ ASQLitePragma := nil;
+ inherited Destroy;
+ DebugLeave('TASQLite3DB.Destroy');
+end;
+
+//============================================================================== TASQLite3BaseQuery
+
+function TASQLite3BaseQuery.CompareBookmarks(Bookmark1, Bookmark2: TBookmark): Integer; //MS
+begin
+ result := sign(integer(Bookmark1^)-integer(Bookmark2^));
+end;
+
+// Is one or more fields a calculated field? (John Lito)
+function TASQLite3BaseQuery.CalcFieldInList(const List: string): Boolean;
+var i: Integer;
+ Fields: TList;
+begin
+ if Pos(';', List) <> 0 then
+ begin
+ Result := False;
+ Fields := TList.Create;
+ try
+ GetFieldList(Fields, List);
+ for i := 0 to Fields.Count - 1 do
+ if TField(Fields[I]).FieldKind in [fkCalculated, fkLookup] then Result := True;
+ finally
+ Fields.Free;
+ end;
+ end else
+ Result := (FieldByName(List).FieldKind in [fkCalculated, fkLookup]);
+end;
+
+function TASQLite3BaseQuery.Lookup(const KeyFields: string; const KeyValues: Variant;
+ const ResultFields: string): Variant;
+var OldState: TDataSetState;
+begin
+ Result := '';
+ if Locate(KeyFields, KeyValues, []) then
+ begin
+ if CalcFieldInList(ResultFields) then GetCalcFields(PChar(FResult.GetData(FCurRec)));
+ OldState := SetTempState(dsFilter);
+ try
+ Result := FieldValues[ResultFields];
+ finally
+ RestoreState(OldState);
+ end;
+ end;
+end;
+
+{
+ support routine for UTF16
+}
+
+procedure TASQlite3BaseQuery.DataConvert(Field: TField; Source, Dest: Pointer;
+ ToNative: Boolean);
+const x: Word = 0;
+var L: Integer;
+begin
+ try
+ case Field.DataType of
+ ftWideString:
+ begin
+ if ToNative then
+ begin
+ L := Length(PWideChar(Source^));
+ if (L <= 0) then
+ Move(x,Dest^,2)
+ else
+ begin
+ if (L <= Field.Size) then
+ Move(PWideChar(Source^)^, Dest^, (L+1)*2)
+ else
+ begin
+ Move(PWideChar(Source^)^, Dest^, Field.Size*2);
+ //Move(x,(PChar(Dest)+Field.Size-(Field.Size mod 2))^,2+(Field.Size mod 2));
+ Move(x, (PChar(Dest)+Field.Size*2 - 2)^, 2);
+ end;
+ end;
+ end
+ else
+ begin
+ WideString(Dest^) := WideString(PWideChar(Source));
+ end;
+ end;//ftWideString
+ else
+ begin
+ inherited DataConvert(Field, Source, Dest, ToNative);
+ end
+ end;//case
+ finally
+ end;
+end;//DataConvert
+
+
+{
+ Register detail dataset for a master-detail relationship
+}
+procedure TASQLite3BaseQuery.RegisterDetailDataset(DetailDataSet: TASQLite3BaseQuery);
+var
+ i : integer;
+begin
+ DebugEnter('TASQLite3BaseQuery.RegisterDetailDataset');
+ try
+ for i := 0 to DetailList.Count - 1 do
+ if DetailList[i] = DetailDataset then exit;
+ DetailList.Add(DetailDataSet);
+ finally
+ DebugLeave('TASQLite3BaseQuery.RegisterDetailDataset');
+ end;
+end;
+
+{ compatibility isue }
+procedure TASQLite3BaseQuery.SQLiteMasterChanged;
+begin
+ DebugEnter('TASQLite3BaseQuery.SQLiteMasterChanged');
+ DebugLeave('TASQLite3BaseQuery.SQLiteMasterChanged');
+end;
+
+{
+ notify that the master has changed and a requery on the detail has
+ to be done
+}
+
+procedure TASQLite3BaseQuery.NotifySQLiteMasterChanged;
+var
+ i : integer;
+begin
+ DebugEnter('TASQLite3BaseQuery.NotifySQLiteMasterChanged');
+ for i := 0 to DetailList.Count - 1 do
+ begin
+ TASQLite3BaseQuery(DetailList[i]).SQLiteMasterChanged;
+ end;
+ DebugLeave('TASQLite3BaseQuery.NotifySQLiteMasterChanged');
+end;
+
+{
+ This function returns a string representing the value of the specified field
+ in SQLite format. Floating point values always use '.' as a decimal separator.
+ Date values use 'yyyy-mm-dd' format, unless SQLiteDateFormat is set to false,
+ which results in using TableDateFormat, or system dependent ShortDateFormat
+ if TableDateFormat is not set. Same goes for DateTime and Time values, for
+ which default formats are 'yyyy-mm-ss hh:nn:ss' and 'hh:nn:ss.zzz', respectively.
+ Setting SQLiteDateFormat to false is discouraged.
+ Result is quoted when necessary.
+}
+// added by Donnie
+
+function TASQLite3BaseQuery.GetFieldValue(const AField: TField; const Blobs: TList = nil): string;
+var
+ MS: TMemoryStream;
+ DateTimeFormat: string;
+begin
+ if (AField.DataSet <> Self) then
+ raise EInvalidArgument.Create('Only own fields are accepted');
+ case AField.DataType of
+ ftString:
+{$IFDEF ASQLITE_D6PLUS}
+ if Connection.FUtf8 then
+ Result := QuotedStr(UTF8Encode(VarToWideStr(AField.Value)))
+ else
+{$endif}
+ Result := QuotedStr(AField.AsString);
+ ftSmallint, ftInteger, ftWord:
+ Result := AField.AsString;
+ ftFloat:
+ if DecimalSeparator <> '.' then
+{$IFDEF ASQLITE_D6PLUS}
+ Result := AnsiReplaceStr(AField.AsString, DecimalSeparator, '.')
+{$else}
+ Result := StringReplace(AField.AsString, DecimalSeparator, '.', [rfReplaceAll])
+{$endif}
+ else
+ Result := AField.AsString;
+ ftDate: begin
+ if FSQLiteDateFormat then
+ DateTimeFormat := 'yyyy"-"mm"-"dd'
+ else if TableDateFormat <> '' then
+ DateTimeFormat := TableDateFormat
+ else
+ DateTimeFormat := ShortDateFormat;
+ Result := QuotedStr(FormatDateTime(DateTimeFormat, AField.AsDateTime));
+ end;
+ ftDateTime: begin
+ if FSQLiteDateFormat then
+ DateTimeFormat := 'yyyy"-"mm"-"dd" "hh":"nn":"ss"."zzz'
+ else if TableDateFormat <> '' then
+ DateTimeFormat := TableDateFormat
+ else
+ DateTimeFormat := ShortDateFormat + '" "' + LongTimeFormat;
+ Result := QuotedStr(FormatDateTime(DateTimeFormat, AField.AsDateTime));
+ end;
+ ftTime: begin
+ if FSQLiteDateFormat then
+ DateTimeFormat := 'hh":"nn":"ss"."zzz'
+ else if TableDateFormat <> '' then
+ DateTimeFormat := TableDateFormat
+ else
+ DateTimeFormat := LongTimeFormat;
+ Result := QuotedStr(FormatDateTime(DateTimeFormat, AField.AsDateTime));
+ end;
+ ftBlob, ftGraphic, ftMemo, ftFmtMemo: begin
+ if Blobs = nil then
+ raise EInvalidArgument.Create('No place to store a blob field');
+ MS := TMemoryStream.Create;
+ TBlobField(AField).SaveToStream(MS);
+ Result := #2 + IntToStr(1 + Blobs.Add(MS));
+ end
+ else
+ Result := QuotedStr(AField.AsString);
+ end;
+end; // GetFieldValue
+
+{
+ Unpack the buffer (if necessary) and convert it to a valid representation
+ this is necessary for sqlite since it it typeless. If typed has been
+ defined then the fields have to be converted to the appropiate datatype
+}
+
+function TASQLite3BaseQuery.UnpackBuffer(Buffer: PAnsiChar; FieldType: TFieldType): TConvertBuffer;
+var
+ TempInt : integer;
+ TempDouble : double;
+ TempBool : wordbool;
+ TempT : TDateTimeRec;
+begin
+{$IFDEF DEBUG_VERY_LOUD}
+ DebugEnter('TASQLite3BaseQuery.UnpackBuffer: ' + Buffer);
+{$ENDIF}
+ case FieldType of
+ ftString:
+ begin
+{$IFDEF DEBUG_VERY_LOUD}
+ DebugLeave('TASQLite3BaseQuery.UnpackBuffer');
+{$ENDIF}
+ exit;
+ end;
+ ftInteger, ftSmallInt:
+ begin
+ TempInt := StrToIntX(Buffer);
+ Move(TempInt, result, sizeof(TempInt));
+ end;
+ ftTime:
+ begin
+ TempT := DateTimeToNative(FieldType, StrToDateTimeX(Buffer));
+ Move(TempT, result, sizeof(TDateTime));
+ end;
+ ftDate:
+ begin
+ TempT := DateTimeToNative(FieldType, StrToDateTimeX(Buffer));
+ Move(TempT, result, sizeof(TDateTime));
+ end;
+ ftDateTime:
+ begin
+ if FSQLiteDateFormat then // aducom
+ TempT := DateTimeToNative(FieldType, YYYYMMDDParser(Buffer)) // jpierce
+ else
+ TempT := DateTimeToNative(FieldType, StrToDateTimeX(Buffer));
+ Move(TempT, result, sizeof(TDateTime));
+ end;
+ ftFloat, ftBCD, ftCurrency:
+ begin
+ TempDouble := StrToFloatX(FloatParser(Buffer));
+ Move(TempDouble, result, sizeof(TempDouble));
+ end;
+
+{$IFDEF ASQLITE_D6PLUS}
+ ftBoolean:
+ begin
+ TempBool := StrToBool(Buffer);
+ Move(TempBool, result, sizeof(TempBool));
+ end;
+{$ENDIF}
+ ftMemo, ftGraphic, ftBlob, ftFMTMemo: // pointer to stream
+ begin
+ TempInt := StrToInt(Buffer);
+ Move(TempInt, result, sizeof(TempInt));
+ end;
+ end;
+{$IFDEF DEBUG_VERY_LOUD}
+ DebugLeave('TASQLite3BaseQuery.UnpackBuffer');
+{$ENDIF}
+end;
+
+{ This method is called by TDataSet.Open and also when FieldDefs need to
+ be updated (usually by the DataSet designer). Everything which is
+ allocated or initialized in this method should also be freed or
+ uninitialized in the InternalClose method. }
+
+constructor TASQLite3BaseQuery.Create(AOwner: TComponent);
+begin
+ DebugEnter('TASQLite3BaseQuery.Create');
+ MaxStrLen := 0;
+ FSQL := TStringList.Create;
+ FParams := TParams.Create(Self);
+ DetailList := TList.Create;
+ FConnection := nil;
+ FResult := nil;
+ GetMem(ResultStr, MaxBuf);
+ SQLCursor := true;
+ SQLiteDateFormat := true;
+ TypeLess := false;
+ ReadOnly := false;
+ inherited;
+ DebugLeave('TASQLite3BaseQuery.Create');
+end;
+
+function TASQLite3BaseQuery.CreateBlobStream(Field: TField; Mode: TBlobStreamMode): TStream;
+begin
+ Result := TASQLite3BlobStream.Create(Field as TBlobField, Mode);
+end;
+
+destructor TASQLite3BaseQuery.Destroy;
+begin
+ DebugEnter('TASQLite3BaseQuery.Destroy');
+// Close;
+// inherited Destroy;
+
+ if Assigned(FSQL) then begin
+ TStringList(FSQL).OnChange := nil;
+ FSQL.Free;
+ end;
+ FSQL := nil;
+
+ if Assigned(FParams) then
+ begin
+ FParams.Free;
+ FParams := nil;
+ end;
+
+ if Assigned(DetailList) then
+ DetailList.Free;
+ DetailList := nil;
+
+ if Assigned(FConnection) then
+ FConnection := nil;
+
+ if Assigned(ResultStr) then
+ FreeMem(ResultStr);
+ ResultStr := nil;
+
+ if Assigned(FResult) then
+ FResult.Free;
+ FResult := nil;
+
+ inherited;
+ DebugLeave('TASQLite3BaseQuery.Destroy');
+end;
+
+procedure TASQLite3BaseQuery.StartTransaction;
+begin
+ if Assigned(FConnection) then
+ FConnection.ExecStartTransaction(FTransActionType);
+end;
+
+procedure TASQLite3BaseQuery.StartDeferredTransaction;
+begin
+ if Assigned(FConnection) then
+ FConnection.StartDeferredTransaction;
+end;
+
+procedure TASQLite3BaseQuery.StartImmediateTransaction;
+begin
+ if Assigned(FConnection) then
+ FConnection.StartImmediateTransaction;
+end;
+
+procedure TASQLite3BaseQuery.StartExclusiveTransaction;
+begin
+ if Assigned(FConnection) then
+ FConnection.StartExclusiveTransaction;
+end;
+
+procedure TASQLite3BaseQuery.Commit;
+begin
+ if Assigned(FConnection) then
+ FConnection.Commit;
+end;
+
+procedure TASQLite3BaseQuery.RollBack;
+begin
+ if Assigned(FConnection) then
+ FConnection.RollBack;
+end;
+
+//function TASQLite3BaseQuery.LocateNearest(const KeyFields: String; const KeyValues: Variant; Options: TLocateOptions): Boolean;
+ //begin
+ //end;
+
+// implementation by J Bannon, implementing partial key too.
+function TASQLite3BaseQuery.Locate(const KeyFields: string;
+ const KeyValues: variant; Options: TLocateOptions): boolean;
+//loCaseInsensitive, loPartialKey
+var
+ bOk : boolean;
+ i, j, p : integer;
+ Fields, SearchValue: string; //Variable SearchValue added by bobmitch
+ FieldList : TStringList;
+ DebugStr : string;
+ DoEnableControls : boolean;
+begin
+ DebugEnter('TASQLite3BaseQuery.Locate ' + Keyfields);
+ DoEnableControls := not ControlsDisabled; {used to determine whether to EnableControls at end of function}
+ DisableControls;
+ FieldList := TStringList.Create;
+ bOk := false;
+ try
+ Fields := KeyFields;
+ p := pos(';', Fields);
+ while p > 0 do
+ begin
+ FieldList.Add(Copy(Fields, 1, p - 1));
+ System.Delete(Fields, 1, p);
+ p := pos(';', Fields);
+ end;
+ if Fields <> '' then
+ FieldList.Add(Fields);
+
+ First;
+ for i := 1 to FResult.Data.Count do
+ begin
+ SetRecNo(i);
+ bOk := true;
+ for j := 0 to FieldList.Count - 1 do
+ begin
+ if loCaseInsensitive in Options then
+ begin
+ if FieldList.Count = 1 then
+ begin //Lines 2303 - 2338 by bobmitch, replaces original lines 2303 - 2336
+ SearchValue := VarToStr(KeyValues);
+ if (loPartialKey in Options) and (Length(SearchValue) <= Length(FieldByName(FieldList[j]).AsString)) then
+ bOk := CompareText(Copy(FieldByName(FieldList[j]).AsString, 1, Length(SearchValue)), SearchValue) = 0
+ else
+ bOk := CompareText(FieldByName(FieldList[j]).AsString, SearchValue) = 0
+ end {end loCaseInsensitive in Options AND FieldList.Count = 1}
+ else
+ begin
+ SearchValue := VarToStr(KeyValues[j]);
+ if (loPartialKey in Options) and (Length(SearchValue) <= Length(FieldByName(FieldList[j]).AsString)) then
+ bOk := CompareText(Copy(FieldByName(FieldList[j]).AsString, 1, Length(SearchValue)), SearchValue) = 0
+ else
+ bOk := CompareText(FieldByName(FieldList[j]).AsString, SearchValue) = 0
+ end {end loCaseInsensitive in Options AND FieldList.Count greater than 1}
+ end {end loCaseInsensitive in Options}
+ else
+ begin {begin loCaseInsensitive NOT in Options}
+ if FieldList.Count = 1 then
+ begin
+ SearchValue := VarToStr(KeyValues);
+ if (loPartialKey in Options) and (Length(SearchValue) <= Length(FieldByName(FieldList[j]).AsString)) then
+ bOk := Copy(FieldByName(FieldList[j]).AsString, 1, Length(SearchValue)) = SearchValue
+ else
+ bOk := FieldByName(FieldList[j]).AsString = SearchValue
+ end {end loCaseInsensitive NOT in Options AND FieldList.Count = 1}
+ else
+ begin
+ SearchValue := VarToStr(KeyValues[j]);
+ if (loPartialKey in Options) and (Length(SearchValue) <= Length(FieldByName(FieldList[j]).AsString)) then
+ bOk := Copy(FieldByName(FieldList[j]).AsString, 1, Length(SearchValue)) = SearchValue
+ else
+ bOk := FieldByName(FieldList[j]).AsString = SearchValue
+ end; {end loCaseInsensitive NOT in Options AND FieldList.Count greater than 1}
+ end; {end loCaseInsensitive NOT in Options}
+ if bOk = false then
+ break;
+ end; {end for j := 0 to FieldList.Count - 1}
+ if bOk then
+ begin
+ break;
+ end;
+ end; {end for i := 1 to FResult.Data.Count}
+ if bOk then
+ begin
+ Locate := true;
+ DebugStr := 'TASQLite3BaseQuery.Locate true';
+ end
+ else
+ begin
+ Locate := false;
+ DebugStr := 'TASQLite3BaseQuery.Locate false';
+ end;
+ finally
+ FieldList.Free;
+ if DoEnableControls then {restore original state of the controls}
+ EnableControls;
+ DebugLeave(DebugStr);
+ end;
+end;
+
+
+function TASQLite3BaseQuery.GetDataSource: TDataSource;
+
+begin
+ DebugEnter('TASQLite3BaseQuery.GetDataSource');
+ Result := FMasterSource;
+ DebugLeave('TASQLite3BaseQuery.GetDataSource');
+end;
+
+procedure TASQLite3BaseQuery.SetSQLiteDateFormat(const Value: boolean);
+begin
+ FSQLiteDateFormat := Value;
+end;
+
+procedure TASQLite3BaseQuery.SetDataSource(Value: TDataSource);
+begin
+ DebugEnter('TASQLite3BaseQuery.SetDataSource');
+ if IsLinkedTo(Value) then
+ DatabaseError('circular references are not allowed', Self);
+ FMasterSource := Value;
+ DebugLeave('TASQLite3BaseQuery.SetDataSource');
+end;
+
+function TASQLite3BaseQuery.GetMasterFields: string;
+begin
+ DebugEnter('TASQLite3BaseQuery.GetMasterFields');
+ Result := FMasterFields; //FMasterLink.FieldNames;
+ DebugLeave('TASQLite3BaseQuery.GetMasterFields');
+end;
+
+procedure TASQLite3BaseQuery.SetMasterFields(const Value: string);
+begin
+ DebugEnter('TASQLite3BaseQuery.SetMasterFields ' + Value);
+ FMasterFields := Value; // FMasterLink.FieldNames := Value;
+ DebugLeave('TASQLite3BaseQuery.SetMasterFields');
+end;
+ //Checks the State and Results a defined Buffer;
+
+function TASQLite3BaseQuery.GetActiveBuffer(var Buffer: PAnsiChar): boolean;
+begin
+{$IFDEF DEBUG_VERY_LOUD}
+ DebugEnter('TASQLite3BaseQuery.GetActiveBuffer');
+{$ENDIF}
+ case State of
+ dsBrowse: if IsEmpty then
+ Buffer := nil
+ else
+ Buffer := ActiveBuffer;
+
+ dsEdit: Buffer := ActiveBuffer;
+ dsInsert: Buffer := ActiveBuffer;
+ dsFilter: Buffer := ActiveBuffer; //FFilterBuffer;
+ dsCalcFields: Buffer := CalcBuffer;
+ else
+ Buffer := nil;
+ end;
+ Result := Buffer <> nil;
+{$IFDEF DEBUG_VERY_LOUD}
+ DebugLeave('TASQLite3BaseQuery.GetActiveBuffer ' + PAnsiChar(Buffer));
+{$ENDIF}
+end;
+
+function TASQLite3BaseQuery.GetNativeFieldSize(FieldNo: integer): integer;
+begin
+ DebugEnter('TASQLite3BaseQuery.GetNativeFieldSize');
+ Result := 0;
+ case FieldDefs.Items[FieldNo - 1].Datatype of
+ ftString: Result := FieldDefs.Items[FieldNo - 1].Size + 1;
+ ftWideString: Result := FieldDefs.Items[FieldNo - 1].Size + 1;
+ ftInteger, ftSmallInt, ftDate, ftTime: Result := 12;
+ ftDateTime: Result := 20;
+ ftFloat, ftBCD, ftCurrency: Result := 12;
+ ftBoolean: Result := 12;
+ ftGraphic, ftMemo, ftBlob, ftFmtMemo: Result := 12; // space for memory handles
+ else
+ raise AsgError.Create('Fieldtype of Field "' + FieldDefs.Items[FieldNo - 1].Name +
+ '" not supported!');
+ end;
+ DebugLeave('TASQLite3BaseQuery.GetNativeFieldSize');
+end;
+
+function TASQLite3BaseQuery.GetFieldSize(FieldNo: integer): integer;
+begin
+{$IFDEF DEBUG_VERY_LOUD}
+ DebugEnter('TASQLite3BaseQuery.GetFieldSize');
+{$ENDIF}
+ // try
+ Result := 0;
+ case FieldDefs.Items[FieldNo - 1].Datatype of
+ ftString: Result := FieldDefs.Items[FieldNo - 1].Size+ 1 ; // GPA - Warning UTF-8 length can be potentially > Ansi length
+ ftWideString: Result := FieldDefs.Items[FieldNo - 1].Size+ 1 ;
+ ftInteger, ftSmallInt, ftDate, ftTime: Inc(Result, sizeof(integer));
+ ftDateTime: Inc(Result, sizeof(TDateTime));
+ ftFloat, ftBCD, ftCurrency: Inc(Result, sizeof(double));
+ ftBoolean: Inc(Result, sizeof(wordbool));
+ ftGraphic, ftMemo, ftBlob, ftFmtMemo: Inc(Result, sizeof(pointer));
+ else
+ raise AsgError.Create('Fieldtype of Field "' + FieldDefs.Items[FieldNo - 1].Name +
+ '" not supported!');
+ end;
+{$IFDEF DEBUG_VERY_LOUD}
+ DebugLeave('TASQLite3BaseQuery.GetFieldSize');
+{$ENDIF}
+end;
+
+function TASQLite3BaseQuery.GetFieldSize(Field: TField): integer;
+begin
+{$IFDEF DEBUG_VERY_LOUD}
+ DebugEnter('TASQLiteBaseQuery.GetFieldSize');
+{$ENDIF}
+ // try
+ Result := 0;
+ case Field.DataType of
+ ftString: Result := Field.Size + 1;
+ ftWideString: Result := Field.Size + 1;
+ ftInteger, ftSmallInt, ftDate, ftTime: Inc(Result, sizeof(integer));
+ ftDateTime: Inc(Result, sizeof(TDateTime));
+ ftFloat, ftBCD, ftCurrency: Inc(Result, sizeof(double));
+ ftBoolean: Inc(Result, sizeof(wordbool));
+ ftGraphic, ftMemo, ftBlob, ftFmtMemo: Inc(Result, sizeof(pointer));
+ else
+ raise AsgError.Create('Fieldtype of Field "' + Field.FieldName +
+ '" not supported!');
+ end;
+{$IFDEF DEBUG_VERY_LOUD}
+ DebugLeave('TASQLiteBaseQuery.GetFieldSize');
+{$ENDIF}
+end;
+
+function TASQLite3BaseQuery.GetFieldOffset(FieldNo: integer): integer;
+var
+ i : integer;
+ Offset : integer;
+begin
+{$IFDEF DEBUG_VERY_LOUD}
+ DebugEnter('TASQLite3BaseQuery.GetFieldOffset');
+{$ENDIF}
+ Offset := 0;
+ if FieldNo > 1 then
+ begin
+ for i := 1 to FieldNo - 1 do
+ OffSet := OffSet + GetFieldSize(i);
+ end;
+ GetFieldOffset := Offset;
+{$IFDEF DEBUG_VERY_LOUD}
+ DebugLeave('TASQLite3BaseQuery.GetFieldOffset');
+{$ENDIF}
+end;
+
+function TASQLite3BaseQuery.GetCalcFieldOffset(Field: TField): integer;
+var
+ i : integer;
+ Offset : integer;
+begin
+
+// calcfieldoffset is appended to record (after bookmarkinfo)
+
+{$IFDEF DEBUG_VERY_LOUD}
+ DebugEnter('TASQLiteBaseQuery.GetCalcFieldOffset');
+{$ENDIF}
+ Offset := FRecBufSize + sizeof(TRecInfo); // startlocation of offsetbuffer
+ for i := 0 to FieldList.Count - 1 do begin
+ if CompareText(FieldList[i].FieldName, Field.FieldName) = 0 then begin
+ GetCalcFieldOffset := Offset;
+ exit;
+ end;
+ if FieldList[i].Calculated then
+ OffSet := OffSet + GetFieldSize(Field);
+ end;
+ GetCalcFieldOffset := Offset;
+{$IFDEF DEBUG_VERY_LOUD}
+ DebugLeave('TASQLiteBaseQuery.GetCalcFieldOffset');
+{$ENDIF}
+end;
+
+procedure TASQLite3BaseQuery.SetSQL(const Value: TStrings);
+begin
+ DebugEnter('TASQLite3BaseQuery.SetSQL');
+ Close;
+ if Assigned(FSQL) then
+ FSQL.Assign(Value)
+ else
+ FSQL := Value;
+ DebugLeave('TASQLite3BaseQuery.SetSQL');
+end;
+
+procedure TASQLite3BaseQuery.LoadQueryData;
+begin
+ DebugEnter('TASQLite3BaseQuery.LoadQueryData');
+ if Connection.FConnected then begin
+ Connection.SQLite3_execute(Connection.DBHandle, PAnsiChar(FPrepared), FParams, self);
+ end;
+ DebugLeave('TASQLite3BaseQuery.LoadQueryData');
+end;
+
+procedure TASQLite3BaseQuery.InternalOpen;
+begin
+ DebugEnter('TASQLite3BaseQuery.InternalOpen');
+{$IFDEF ASQLITE_D6PLUS}
+ if UniDirectional then
+ SetUnidirectional(true)
+ else
+ SetUniDirectional(false);
+{$endif}
+ MaxStrLen := 0;
+ if (Connection = nil) then
+ begin // check to see if a valid database
+ raise AsgError.Create('no database connection');
+ end
+ else
+ begin
+
+ if Connection.Connected = false then // open database if necessary
+ Connection.Connected := true; // trigger the 'dbconnect' event
+
+ if (Connection.Connected) and (Connection.DLLHandle <> 0) then
+ if Assigned(MasterSource) then
+ begin // notify master about existance!
+ if (MasterSource.DataSet <> nil) then
+ begin
+ if CompareText(Copy(MasterSource.DataSet.ClassName, 1, 9), 'TASQLite3') = 0 then
+ begin
+ TASQLite3BaseQuery(MasterSource.DataSet).RegisterDetailDataset(
+ TASQLite3BaseQuery(Self));
+ end
+ else
+ begin
+ raise AsgError.Create('master dataset ' + MasterSource.DataSet.ClassName +
+ ' is not of TSQLiteBaseQuery type');
+ DebugLeave('TASQLite3BaseQuery.InternalOpen');
+ exit;
+ end;
+ end
+ else
+ begin
+ raise AsgError.Create('master dataset undefined');
+ DebugLeave('TASQLite3BaseQuery.InternalOpen');
+ exit;
+ end;
+ end;
+
+ if not FUniDir then begin
+ { Load the result into a resultlist }
+ FResult := TFResult.Create(Self);
+ LoadQueryData;
+ end else begin
+ FResult := TFResult.Create(Self);
+ FStatement := Connection.SQLite3_PrepareResult(Connection.DBHandle, PAnsiChar(FPrepared),FParams, self);
+// ptr := Connection.SQLite3_GetNextResult(Connection.DBHandle, FStatement, FParams,self);
+ end;
+
+ { Initialize our internal position.
+ We use -1 to indicate the "crack" before the first record. }
+ FCurRec := -1;
+
+ { Initialize an offset value to find the TRecInfo in each buffer }
+ FRecInfoOfs := MaxStrLen;
+
+ { Calculate the size of the record buffers.
+ Note: This is NOT the same as the RecordSize property which
+ only gets the size of the data in the record buffer }
+ FRecBufSize := FRecInfoOfs + SizeOf(TRecInfo);
+
+ { Tell TDataSet how big our Bookmarks are (REQUIRED) }
+ BookmarkSize := SizeOf(integer);
+
+ { Initialize the FieldDefs }
+ InternalInitFieldDefs;
+
+ { Create TField components when no persistent fields have been created }
+ if DefaultFields then
+ CreateFields;
+
+ { Bind the TField components to the physical fields }
+ BindFields(true);
+
+ end;
+ DebugLeave('TASQLite3BaseQuery.InternalOpen');
+end;
+
+procedure TASQLite3BaseQuery.InternalClose;
+begin
+ DebugEnter('TASQLite3BaseQuery.InternalClose');
+
+ if (FUniDir) and (FStatement <> nil) and (active) then begin
+ Connection.SQLite3_CloseResult(FStatement);
+ FStatement := nil;
+ end;
+
+ if Assigned(FResult) then
+ begin
+ FResult.Free;
+ FResult := nil;
+ end;
+
+ { Destroy the TField components if no persistent fields }
+ if DefaultFields then
+ DestroyFields;
+
+ { Reset these internal flags }
+ // FLastBookmark := 0;
+ FCurRec := -1;
+ DebugLeave('TASQLite3BaseQuery.InternalClose');
+end;
+
+{ This property is used while opening the dataset.
+ It indicates if data is available even though the
+ current state is still dsInActive. }
+
+function TASQLite3BaseQuery.IsCursorOpen: boolean;
+begin
+ Result := Assigned(FResult);
+end;
+
+procedure TASQLite3BaseQuery.OpenCursor(InfoQuery: Boolean);
+begin
+ if InfoQuery then
+ Begin
+ if Assigned(FConnection) Then Begin
+ InternalOpen;
+ InternalClose;
+ End;
+ End
+ else if State <> dsOpening then
+ inherited OpenCursor(InfoQuery);
+end;
+
+procedure TASQLite3BaseQuery.InternalInitFieldDefs;
+begin
+// Just here for compatibility
+end;
+
+{ This is the exception handler which is called if an exception is raised
+ while the component is being stream in or streamed out. In most cases this
+ should be implemented useing the application exception handler as follows. }
+
+procedure TASQLite3BaseQuery.InternalHandleException;
+begin
+ DebugEnter('TASQLite3BaseQuery.InternalHandleException');
+ ApplicationHandleException(Self);
+ DebugLeave('TASQLite3BaseQuery.InternalHandleException');
+end;
+
+ { Bookmarks }
+ { ========= }
+
+{ In this sample the bookmarks are stored in the Object property of the
+ TStringList holding the data. Positioning to a bookmark just requires
+ finding the offset of the bookmark in the TStrings.Objects and using that
+ value as the new current record pointer. }
+
+procedure TASQLite3BaseQuery.InternalGotoBookmark(Bookmark: Pointer);
+var
+ Index : integer;
+begin
+ DebugEnter('TASQLite3BaseQuery.InternalGotoBookmark');
+// inherited;
+ Index := FResult.IndexOf(TObject(PInteger(Bookmark)^));
+ if Index <> -1 then
+ FCurRec := Index
+ else
+ if not FUniDir then DatabaseError('Bookmark not found');
+ DebugLeave('TASQLite3BaseQuery.InternalGotoBookmark');
+end;
+
+function TASQLite3BaseQuery.BookmarkValid(Bookmark: Pointer): boolean;
+var
+ Index : integer;
+begin
+ DebugEnter('TASQLite3BaseQuery.BookmarkValid');
+ Index := FResult.IndexOf(TObject(PInteger(Bookmark)^));
+ if Index <> -1 then
+ BookmarkValid := true
+ else
+ BookmarkValid := false;
+ DebugLeave('TASQLite3BaseQuery.BookmarkValid');
+end;
+
+{ This function does the same thing as InternalGotoBookmark, but it takes
+ a record buffer as a parameter instead }
+
+procedure TASQLite3BaseQuery.InternalSetToRecord(Buffer: PAnsiChar);
+begin
+ DebugEnter('TASQLite3BaseQuery.InternalSetToRecord');
+ InternalGotoBookmark(@PRecInfo(Buffer + FRecInfoOfs).Bookmark);
+// NotifySQLiteMasterChanged;
+ DebugLeave('TASQLite3BaseQuery.InternalSetToRecord');
+end;
+
+{ Bookmark flags are used to indicate if a particular record is the first
+ or last record in the dataset. This is necessary for "crack" handling.
+ If the bookmark flag is bfBOF or bfEOF then the bookmark is not actually
+ used; InternalFirst, or InternalLast are called instead by TDataSet. }
+
+function TASQLite3BaseQuery.GetBookmarkFlag(Buffer: PAnsiChar): TBookmarkFlag;
+begin
+ DebugEnter('TASQLite3BaseQuery.GetBookmarkFlag');
+ Result := PRecInfo(Buffer + FRecInfoOfs).BookmarkFlag;
+ DebugLeave('TASQLite3BaseQuery.GetBookmarkFlag');
+end;
+
+procedure TASQLite3BaseQuery.SetBookmarkFlag(Buffer: PAnsiChar; Value: TBookmarkFlag);
+begin
+ DebugEnter('TASQLite3BaseQuery.SetBookmarkFlag');
+ PRecInfo(Buffer + FRecInfoOfs).BookmarkFlag := Value;
+ DebugLeave('TASQLite3BaseQuery.SetBookmarkFlag');
+end;
+
+{ These methods provide a way to read and write bookmark data into the
+ record buffer without actually repositioning the current record }
+
+procedure TASQLite3BaseQuery.GetBookmarkData(Buffer: PAnsiChar; Data: Pointer);
+begin
+ DebugEnter('TASQLite3BaseQuery.GetBookmarkData');
+ PInteger(Data)^ := PRecInfo(Buffer + FRecInfoOfs).Bookmark;
+ DebugLeave('TASQLite3BaseQuery.GetBookmarkData');
+end;
+
+procedure TASQLite3BaseQuery.SetBookmarkData(Buffer: PAnsiChar; Data: Pointer);
+begin
+ DebugEnter('TASQLite3BaseQuery.SetBookmarkData');
+ PRecInfo(Buffer + FRecInfoOfs).Bookmark := PInteger(Data)^;
+ DebugLeave('TASQLite3BaseQuery.SetBookmarkData');
+end;
+
+ { Record / Field Access }
+ { ===================== }
+
+{ This method returns the size of just the data in the record buffer.
+ Do not confuse this with RecBufSize which also includes any additonal
+ structures stored in the record buffer (such as TRecInfo). }
+
+function TASQLite3BaseQuery.GetRecordSize: word;
+begin
+ DebugEnter('TASQLite3BaseQuery.GetRecordSize');
+ Result := MaxStrLen;
+ DebugLeave('TASQLite3BaseQuery.GetRecordSize');
+end;
+
+{ TDataSet calls this method to allocate the record buffer. Here we use
+ FRecBufSize which is equal to the size of the data plus the size of the
+ TRecInfo structure. }
+
+function TASQLite3BaseQuery.AllocRecordBuffer: PAnsiChar;
+begin
+ DebugEnter('TASQLiteBaseQuery.AllocRecordBuffer');
+ GetMem(Result, FRecBufSize + CalcFieldsSize + sizeof(TRecinfo) + 5);
+ FillChar(Result^, FRecBufSize + CalcFieldsSize + sizeof(TRecinfo) + 5, 0);
+// FillChar(Result^, GetRecordSize+CalcFieldsSize+10, 0);
+ DebugLeave('TASQLiteBaseQuery.AllocRecordBuffer');
+end;
+
+{ Again, TDataSet calls this method to free the record buffer.
+ Note: Make sure the value of FRecBufSize does not change before all
+ allocated buffers are freed. }
+
+procedure TASQLite3BaseQuery.FreeRecordBuffer(var Buffer: PAnsiChar);
+begin
+ DebugEnter('TASQLiteBaseQuery.FreeRecordBuffer');
+ try FreeMem(Buffer); //, FRecBufSize+CalcFieldsSize+sizeof(TRecinfo));
+ except end;
+// Buffer := nil;
+ DebugLeave('TASQLiteBaseQuery.FreeRecordBuffer');
+end;
+
+{ This multi-purpose function does 3 jobs. It retrieves data for either
+ the current, the prior, or the next record. It must return the status
+ (TGetResult), and raise an exception if DoCheck is True. }
+
+function TASQLite3BaseQuery.GetRecord(Buffer: PAnsiChar; GetMode: TGetMode;
+ DoCheck: boolean): TGetResult;
+var
+ ptr : pointer;
+begin
+ DebugEnter('TASQLite3BaseQuery.GetRecord');
+// if Active then CheckBrowseMode;
+ if (not (FUniDir)) and (FResult.Count < 1) then
+ Result := grEOF
+ else
+ begin
+ Result := grOK;
+ case GetMode of
+ gmNext:
+ if FUniDir then begin
+// ptr := Connection.SQLite3_GetNextResult(Connection.DBHandle, FStatement, FParams,self);
+// if ptr <> nil then
+// Move(ptr^, Buffer^, MaxStrLen)
+// else
+// Result := grEOF;
+ end else begin
+ if FCurRec >= RecordCount - 1 then
+ Result := grEOF
+ else
+ Inc(FCurRec);
+ end;
+ gmPrior: begin
+ if FUniDir then
+// Result := grOK
+ raise AsgError.Create('operation PRIOR not allowed on unidirectional dataset')
+ else begin
+ if FCurRec <= 0 then
+ Result := grBOF
+ else
+ Dec(FCurRec);
+ end;
+ end;
+ gmCurrent:
+ begin
+ if (FCurRec < 0) or (FCurRec >= RecordCount) then
+ Result := grError;
+ end;
+ end;
+ if Result = grOK then
+ begin
+ if FUniDir then begin
+ ptr := Connection.SQLite3_GetNextResult(Connection.DBHandle, FStatement, FParams,self);
+ if ptr <> nil then begin
+ Move(ptr^, ActiveBuffer^, MaxStrLen);
+ end else Result := grEOF;
+ end else begin
+ ptr := FResult.GetData(FCurRec);
+ if FResult.Count = 0 then
+ InternalInitRecord(Buffer)
+ else
+ if ptr <> nil then Move(ptr^, Buffer^, MaxStrLen); // albert 17/11/2004
+ end;
+
+ with PRecInfo(Buffer + FRecInfoOfs)^ do
+ begin
+ BookmarkFlag := bfCurrent;
+ Bookmark := FResult.GetBookMark(FCurRec);
+ end;
+
+ if CalcFieldsSize > 0 then
+ GetCalcFields(Buffer)
+
+ end
+ else if (Result = grError) and DoCheck then
+ DatabaseError('No Records');
+ end;
+ DebugLeave('TASQLite3BaseQuery.GetRecord: ' + Buffer);
+end;
+
+{ This routine is called to initialize a record buffer. }
+
+procedure TASQLite3BaseQuery.InternalInitRecord(Buffer: PAnsiChar);
+var
+ i : integer;
+ TempT : TDateTimeRec;
+ Stream : TMemoryStream;
+begin
+ DebugEnter('TASQLite3BaseQuery.InternalInitRecord');
+
+ for i := 0 to FieldDefs.Count - 1 do
+ begin
+ if not (Fields[i].Calculated) then begin
+ case FieldDefs.Items[i].Datatype of
+ ftMemo, ftGraphic, ftBlob, ftFmtMemo: begin
+ Stream := TMemoryStream.Create;
+ Move(Pointer(Stream), (Buffer + GetFieldOffset(i + 1))^, sizeof(Pointer));
+ end;
+ ftString: PAnsiChar(Buffer + GetFieldOffset(i + 1))^ := #0;
+ ftBoolean: pBoolean(Buffer + GetFieldOffset(i + 1))^ := false;
+ ftFloat: pFloat(Buffer + GetFieldOffset(i + 1))^ := 0;
+ ftSmallInt: pSmallInt(Buffer + GetFieldOffset(i + 1))^ := 0;
+ ftInteger: pInteger(Buffer + GetFieldOffset(i + 1))^ := integer(nil);
+ ftCurrency: pFloat(Buffer + GetFieldOffset(i + 1))^ := 0;
+ ftDate:
+ begin
+ TempT := DateTimeToNative(ftDate, now);
+ Move(TempT, (Buffer + GetFieldOffset(i + 1))^, sizeof(TDateTime));
+ end;
+ ftTime:
+ begin
+ TempT := DateTimeToNative(ftTime, now);
+ Move(TempT, (Buffer + GetFieldOffset(i + 1))^, sizeof(TDateTime));
+ end;
+ ftDateTime:
+ begin
+ TempT := DateTimeToNative(ftDateTime, now);
+ Move(TempT, (Buffer + GetFieldOffset(i + 1))^, sizeof(TDateTime));
+ end;
+ end;
+ end;
+ end;
+
+// if FMasterSource <> nil then begin
+// FMasterSource.DataSet.FieldByName()
+// end;
+
+
+ DebugLeave('TASQLite3BaseQuery.InternalInitRecord');
+end;
+
+{ Here we copy the data from the record buffer into a field's buffer.
+ This function, and SetFieldData, are more complex when supporting
+ calculated fields, filters, and other more advanced features.
+ See TBDEDataSet for a more complete example. }
+
+function TASQLite3BaseQuery.GetFieldData(Field: TField; Buffer: Pointer): boolean;
+var
+// SrcBuffer : PAnsiChar;
+ MyBuf : string;
+
+ SrcBuffer : PAnsiChar;
+// MasterField : TField;
+// EqualPos : Integer;
+/// MasterFieldName, DetailFieldName : string;
+
+begin
+{$IFDEF DEBUG_VERY_LOUD}
+ DebugEnter('TASQLite3BaseQuery.GetFieldData');
+{$ENDIF}
+ if Field.FieldNo > 0 then begin
+ // load masterfield data if there's a master-detail relationship
+ // key-data should not be NULL!!
+ if pos(UpperCase(Field.FieldName), UpperCase(FMasterFields)) > 0 then begin
+ MasterSource.DataSet.GetFieldData(Field, Buffer);
+ Result := true;
+ exit;
+ end;
+
+// if FMasterFields <> '' then begin
+// EqualPos := Pos('=',FMasterFields);
+// DetailFieldName := Copy(FMasterFields,1, EqualPos - 1);
+// MasterFieldName := Copy(FMasterFields,EqualPos + 1, Length(FMasterFields) - EqualPos -1);
+// if UpperCase(Field.FieldName) = UpperCase(DetailFieldName) then begin
+// // locate and get master field by name
+// MasterField := MasterSource.DataSet.FieldByName(MasterFieldName);
+// MasterSource.DataSet.GetFieldData(MasterField, Buffer);
+// Result := true;
+// exit;
+// end;
+// end;
+
+ Result := true; // indicates NotNull
+ if GetActiveBuffer(SrcBuffer) then begin
+ if (Assigned(Buffer)) and (Assigned(SrcBuffer)) then begin
+ Move((SrcBuffer + GetFieldOffset(Field.FieldNo))^, Buffer^, GetFieldSize(Field.FieldNo));
+ if Field.DataType = ftString then begin // GPA
+ MyBuf := PChar(Buffer);
+{$IFDEF ASQLITE_D6PLUS}
+ if Connection.FUtf8 then
+ Move(Utf8ToAnsi(MyBuf)[1], Buffer^, Length(MyBuf)) // GPA - Warning UTF-8 length can be potentially > Ansi length
+ else
+{$endif}
+ Move(MyBuf[1], Buffer^, Length(MyBuf)); // GPA - Warning UTF-8 length can be potentially > Ansi length
+ PAnsiChar(PAnsiChar(Buffer) + GetFieldSize(Field.FieldNo))^ := #0; // dev
+ end;
+ Result := true;
+ exit;
+ end;
+ if Assigned(SrcBuffer) then
+ if (Field.DataType <> ftDateTime) and ((SrcBuffer + GetFieldOffset(Field.FieldNo))^ = #0) then
+ Result := false
+ end else begin
+ if assigned(Buffer) then PAnsiChar(Buffer)^ := #0;
+ Result := false;
+ end;
+ end else begin {calcfields}
+ Result := GetActiveBuffer(SrcBuffer);
+ if Result and (State in [dsBrowse, dsEdit, dsInsert, dsCalcFields, dsBlockRead]) then begin
+ if (Assigned(Buffer)) then
+ Move((SrcBuffer + GetCalcFieldOffset(Field))^, Buffer^, GetFieldSize(Field));
+ end;
+ end;
+{$IFDEF DEBUG_VERY_LOUD}
+ DebugLeave('TASQLite3BaseQuery.GetFieldData: ' + PAnsiChar(Buffer));
+{$ENDIF}
+end;
+
+// The next two functions are added to increase compatibility with
+// components that require it (like DevExpress)
+
+function TASQLite3BaseQuery.GetFieldData(FieldNo: integer; Buffer: Pointer): boolean;
+begin
+ Result := GetFieldData(FieldByNumber(FieldNo), Buffer);
+end;
+
+{$IFDEF ASQLITE_D6PLUS}
+//function TASQLite3BaseQuery.GetFieldData(Field: TField; Buffer: Pointer;
+// NativeFormat: boolean): boolean;
+//begin
+// Result := GetFieldData(Field, Buffer);
+//end;
+{$ENDIF}
+
+{ returns the field data back to callee }
+
+procedure TASQLite3BaseQuery.SetFieldData(Field: TField; Buffer: Pointer);
+var
+ DestBuffer : PAnsiChar;
+ MyBuf : string;
+begin
+ DebugEnter('TASQLite3BaseQuery.SetFieldData');
+ GetActiveBuffer(DestBuffer);
+ if (Field.FieldNo > 0) and (Assigned(Buffer)) and (Assigned(DestBuffer)) then
+ begin
+ if Field.DataType = ftString then
+ Begin // GPA
+ MyBuf := PChar(Buffer);
+{$IFDEF ASQLITE_D6PLUS}
+ if Connection.FUtf8 then
+ MyBuf := AnsiToUTF8(MyBuf);
+{$endif}
+ if Length(MyBuf)>0 then
+ Move(MyBuf[1], (DestBuffer + GetFieldOffset(Field.FieldNo))^, Length(MyBuf)+1) // GPA - Warning UTF-8 length can be potentially > Ansi length
+ else begin
+ MyBuf := #0;
+ Move(MyBuf[1], (DestBuffer + GetFieldOffset(Field.FieldNo))^, Length(MyBuf)); // GPA - Warning UTF-8 length can be potentially > Ansi length
+ end;
+ End
+ else
+ Move(Buffer^, (DestBuffer + GetFieldOffset(Field.FieldNo))^, GetFieldSize(Field.FieldNo));
+ end else {fkCalculated, fkLookup} begin
+ if (State in [dsBrowse, dsEdit, dsInsert, dsCalcFields, dsBlockRead]) then begin
+ if (Field.FieldNo < 0) and (Assigned(Buffer)) and (Assigned(DestBuffer)) then begin
+ Move(Buffer^, (CalcBuffer + GetCalcFieldOffset(Field))^, GetFieldSize(Field));
+ end;
+ end;
+ end;
+
+ if not (State in [dsCalcFields, dsFilter, dsNewValue]) then
+ DataEvent(deFieldChange, Longint(Field));
+ DebugLeave('TASQLite3BaseQuery.SetFieldData');
+end;
+
+{ Record Navigation / Editing }
+{ =========================== }
+
+{ This method is called by TDataSet.First. Crack behavior is required.
+ That is we must position to a special place *before* the first record.
+ Otherwise, we will actually end up on the second record after Resync
+ is called. }
+
+procedure TASQLite3BaseQuery.InternalFirst;
+begin
+ DebugEnter('TASQLite3BaseQuery.InternalFirst');
+ FCurRec := -1;
+ DebugLeave('TASQLite3BaseQuery.InternalFirst');
+end;
+
+{ Again, we position to the crack *after* the last record here. }
+
+procedure TASQLite3BaseQuery.InternalLast;
+begin
+ DebugEnter('TASQLite3BaseQuery.InternalLast');
+ FCurRec := FResult.Count;
+ DebugLeave('TASQLite3BaseQuery.InternalLast');
+end;
+
+function TASQLite3BaseQuery.GetLastInsertRow: integer;
+begin
+ if Assigned(Connection) then
+ result := Connection.SQLite3_LastInsertRow(Connection.DBHandle)
+ else
+ result := -1;
+end;
+
+{ This method is called by TDataSet.Post. }
+
+procedure TASQLite3BaseQuery.InternalPost;
+var
+ ptr : Pointer;
+begin
+ DebugEnter('TASQLite3BaseQuery.InternalPost');
+ FSaveChanges := true;
+ { For inserts, just update the data in the string list }
+ if State = dsEdit then
+ begin
+ if FUniDir then
+ Connection.SQLite3_GetNextResult(Connection.DBHandle, FStatement, FParams,self)
+ else begin
+ ptr := FResult.GetData(FCurrec);
+ if ptr <> nil then
+ move(ActiveBuffer^, ptr^, FRecBufSize); // albert 17/11/2004
+ end;//2006
+ end
+ else
+ begin
+ { If inserting (or appending), increment the bookmark counter and
+ store the data }
+ FResult.Insert(FCurRec, ActiveBuffer,
+ Connection.SQLite3_LastInsertRow(Connection.DBHandle));
+ end;
+ DebugLeave('TASQLite3BaseQuery.InternalPost');
+end;
+
+{ This method is similar to InternalPost above, but the operation is always
+ an insert or append and takes a pointer to a record buffer as well. }
+
+procedure TASQLite3BaseQuery.InternalAddRecord(Buffer: Pointer; Append: boolean);
+begin
+ DebugEnter('TASQLite3BaseQuery.InternalAddRecord');
+ if FReadOnly then
+ raise AsgError.Create('Cannot write to a read-only dataset');
+
+ FSaveChanges := true;
+ if Append then
+ InternalLast;
+ Post;
+ DebugLeave('TASQLite3BaseQuery.InternalAddRecord');
+end;
+
+{ This method is called by TDataSet.Delete to delete the current record }
+
+procedure TASQLite3BaseQuery.InternalDelete;
+begin
+ DebugEnter('TASQLite3BaseQuery.InternalDelete');
+ FSaveChanges := true;
+ FResult.Delete(FCurRec);
+ if FCurRec >= FResult.Count then
+ Dec(FCurRec);
+ DebugLeave('TASQLite3BaseQuery.InternalDelete');
+end;
+
+ { Optional Methods }
+ { ================ }
+
+{ The following methods are optional. When provided they will allow the
+ DBGrid and other data aware controls to track the current cursor postion
+ relative to the number of records in the dataset. Because we are dealing
+ with a small, static data store (a stringlist), these are very easy to
+ implement. However, for many data sources (SQL servers), the concept of
+ record numbers and record counts do not really apply. }
+
+function TASQLite3BaseQuery.GetRecordCount: longint;
+begin
+ DebugEnter('TASQLite3BaseQuery.GetRecordCount');
+ Result := FResult.Count;
+ DebugLeave('TASQLite3BaseQuery.GetRecordCount ' + IntToStr(Result));
+end;
+
+function TASQLite3BaseQuery.GetRecNo: longint;
+begin
+ DebugEnter('TASQLite3BaseQuery.GetRecNo');
+ UpdateCursorPos;
+ if (FCurRec = -1) and (RecordCount > 0) then
+ Result := 1
+ else
+ Result := FCurRec + 1;
+ NotifySQLiteMasterChanged; //20040819
+ DebugLeave('TASQLite3BaseQuery.GetRecNo');
+end;
+
+procedure TASQLite3BaseQuery.SetRecNo(Value: integer);
+begin
+ DebugEnter('TASQLite3BaseQuery.SetRecNo');
+ if (Value >= 0) and (Value < FResult.Count + 2) then // value < resultetc
+ begin
+ FCurRec := Value - 1;
+ Resync([]);
+ end;
+ DebugLeave('TASQLite3BaseQuery.SetRecNo');
+end;
+
+procedure TASQLite3BaseQuery.SetFiltered(Value: Boolean);
+begin
+ inherited;
+end;
+
+procedure TASQLite3BaseQuery.SetFilterText(const Value: string);
+begin
+ DebugEnter('TASQLite3BaseQuery.SetFilterText ' + Value);
+ if Active then begin
+ Close;
+ inherited;
+ Open;
+ end else Inherited;
+ DebugLeave('TASQLite3BaseQuery.SetFilterText');
+end;
+
+function TASQLite3BaseQuery.SetQueryParams(InStr: string): string;
+var
+ i : integer;
+ TempParam : string;
+ ThisDateFormat : string;
+ OldDateFormat : string;
+begin
+ if FSQLiteDateFormat then
+ ThisDateFormat := 'yyyy-mm-dd hh:nn:ss.zzz'
+ else if (FTableDateFormat <> '') then
+ ThisDateFormat := FTableDateFormat
+ else
+ ThisDateFormat := ShortDateFormat;
+
+ for i := 0 to FParams.Count - 1 do begin
+ if (FParams.Items[i].DataType <> ftBlob) and
+ (FParams.Items[i].DataType <> ftGraphic) then begin
+ TempParam := Fparams.Items[i].AsString;
+ if (TempParam = '') and (FParams.Items[i].bound) then begin
+ InStr := StringReplace(Instr, '?', 'NULL', []);
+ end else begin
+ //Here we'll replace legitimate '?' characters with an unprintable character
+ TempParam := StringReplace(TempParam, '?', #1, [rfReplaceAll]);
+
+ //Okay, we need to check string dates and times
+ if FParams[i].DataType = ftDate then begin
+ end else if FParams[i].DataType = ftTime then begin
+ end else if FParams[i].DataType = ftDateTime then begin
+ OldDateFormat := ShortDateFormat;
+ ShortDateFormat := ThisDateFormat;
+ TempParam := DateToStr(FParams[i].AsDateTime);
+ ShortDateFormat := OldDateFormat;
+ end;
+
+ InStr := StringReplace(Instr, '?', QuotedStr(TempParam), [rfIgnoreCase]);
+ end;
+ end else begin // BLOB !!
+ //Here we'll replace legitimate '?' characters with an unprintable character
+ InStr := StringReplace(Instr, '?', #2, [rfIgnoreCase]);
+ end;
+ end;
+ //Here we'll restore legitimate '?' characters
+ InStr := StringReplace(Instr, #1, '?', [rfReplaceAll]);
+ SetQueryParams := InStr;
+end;
+
+// ============================================================================= TASQLite3 UPDATE SQL
+
+constructor TASQLite3UpdateSQL.Create(AOWner: TComponent);
+begin
+ DebugEnter('TASQLite3UpdateSQL.Create');
+ inherited Create(AOwner);
+ FInsertSQL := TStringList.Create;
+ FUpdateSQL := TStringList.Create;
+ FDeleteSQL := TStringList.Create;
+ DebugLeave('TASQLite3UpdateSQL.Create');
+end;
+
+destructor TASQLite3UpdateSQL.Destroy;
+begin
+ DebugEnter('TASQLite3UpdateSQL.Destroy');
+ inherited;
+ if Assigned(FInsertSQL) then
+ FInsertSQL.Free;
+ if Assigned(FUpdateSQL) then
+ FUpdateSQL.Free;
+ if Assigned(FDeleteSQL) then
+ FDeleteSQL.Free;
+ DebugLeave('TASQLite3UpdateSQL.Destroy');
+end;
+
+procedure TASQLite3UpdateSQL.SetInsertSQL(const Value: TStrings);
+begin
+ DebugEnter('TASQLite3UpdateSQL.SetInsertSQL');
+ if Assigned(FInsertSQL) then
+ FInsertSQL.Assign(Value)
+ else
+ FInsertSQL := Value;
+ DebugLeave('TASQLite3UpdateSQL.SetInsertSQL');
+end;
+
+procedure TASQLite3UpdateSQL.SetUpdateSQL(const Value: TStrings);
+begin
+ DebugEnter('TASQLite3UpdateSQL.SetUpdateSQL');
+ if Assigned(FUpdateSQL) then
+ FUpdateSQL.Assign(Value)
+ else
+ FUpdateSQL := Value;
+ DebugLeave('TASQLite3UpdateSQL.SetUpdateSQL');
+end;
+
+procedure TASQLite3UpdateSQL.SetDeleteSQL(const Value: TStrings);
+begin
+ DebugEnter('TASQLite3UpdateSQL.SetDeleteSQL');
+ if Assigned(FDeleteSQL) then
+ FDeleteSQL.Assign(Value)
+ else
+ FDeleteSQL := Value;
+ DebugLeave('TASQLite3UpdateSQL.SetDeleteSQL');
+end;
+// ============================================================================= TASQLite3 QUERY
+
+constructor TASQLite3Query.Create(AOwner: TComponent);
+begin
+ DebugEnter('TASQLite3Query.Create');
+ inherited Create(AOwner);
+// FParams := TParams.Create(Self);
+ TStringList(FSQL).OnChange := QueryChanged;
+ DebugLeave('TASQLite3Query.Create');
+end;
+
+destructor TASQLite3Query.Destroy;
+begin
+ DebugEnter('TASQLite3Query.Destroy');
+
+ if Assigned(FSQL) then
+ TStringList(FSQL).OnChange := nil;
+
+ inherited Destroy;
+ DebugLeave('TASQLite3Query.Destroy');
+end;
+
+procedure TASQLite3Query.Notification(AComponent: TComponent; Operation: TOperation);
+begin
+{$IFDEF DEBUG_VERY_LOUD}
+ DebugEnter('TASQLite3Query.Notification');
+{$ENDIF}
+// Application.ProcessMessages;
+ if Assigned(AComponent) then
+ begin
+ if (Operation = opRemove) then begin
+ if Assigned(FUpdateSQL) and (AComponent is TASQLite3UpdateSQL) then begin
+ if TASQLite3UpdateSQL(AComponent) = FUpdateSQL then
+ FUpdateSQL := nil;
+ end else
+
+ if Assigned(FConnection) then begin
+ if (AComponent is TASQLite3DB) and
+ (TASQLite3Db(AComponent) = FConnection) then begin
+ Close;
+ Connection := nil;
+ end;
+ end else
+
+ end;
+ end;
+ inherited;
+{$IFDEF DEBUG_VERY_LOUD}
+ DebugLeave('TASQLite3Query.Notification');
+{$ENDIF}
+end;
+
+procedure TASQLite3Query.QueryChanged(Sender: TObject);
+begin
+ DebugEnter('TASQLite3Query.QueryChanged');
+ FNoResults := false;
+ Close;
+ if not FRawSQL then begin
+ if assigned(FParams) then FParams.Clear; // new
+ SQLStr := FParams.ParseSQL(SQL.Text, true)
+ end else SQLStr := SQL.Text;
+ DebugLeave('TASQLite3Query.QueryChanged');
+end;
+
+procedure TASQLite3Query.SetSQL(const Value: TStrings);
+begin
+ DebugEnter('TASQLite3Query.SetSQL');
+ FNoResults := false;
+ Close;
+ if Assigned(FSQL) then
+ FSQL.Assign(Value)
+ else
+ FSQL := Value;
+// FText := FParams.ParseSQL(SQL.Text, False);
+ DebugLeave('TASQLite3Query.SetSQL');
+end;
+
+function TASQLite3Query.GetSQL: TStrings;
+begin
+ DebugEnter('TASQLite3Query.GetSQL');
+ GetSQL := FSQL;
+ DebugLeave('TASQLite3Query.GetSQL');
+end;
+
+procedure TASQLite3Query.InternalDelete;
+var
+ MySQL : string;
+ TempSQL : string;
+ SQLStr : string; // added by Donnie
+ TheWord : string;
+ TableId : string;
+ FieldId : string;
+ startpos : integer;
+ vartype : integer;
+ p : integer;
+ Blobs : TList; // added by Donnie
+label
+ Ende;
+begin
+ DebugEnter('TASQLite3Query.InternalDelete');
+ if FReadOnly then
+ raise AsgError.Create('Cannot delete from a read-only dataset');
+
+ if Connection.FConnected then
+ begin
+ if FAutoCommit then
+ Connection.ExecStartTransaction(FTransactionType);
+
+ if not Assigned(FUpdateSQL) then
+ begin
+ raise AsgError.Create('Missing TASQLite3UpdateSQL component');
+ goto ende;
+ end;
+ // MyFieldList := TStringList.Create;
+ // MyFieldValues := TStringList.Create;
+ Blobs := TList.Create;
+ MySQL := FUpdateSQL.FDeleteSQL.Text;
+ startpos := 1;
+
+ TheWord := GetWord(MySQL, startpos, vartype); // delete
+ if not SyntaxCheck(TheWord, 'delete') then
+ goto ende;
+
+ TheWord := GetWord(MySQL, startpos, vartype); // from
+ if not SyntaxCheck(TheWord, 'from') then
+ goto ende;
+
+ Tableid := GetWord(MySQL, startpos, vartype); // tablename
+
+ TheWord := GetWord(MySQL, startpos, vartype); // where
+ if not SyntaxCheck(TheWord, 'where') then
+ goto ende;
+
+ SQLStr := 'delete from ' + TableId + ' where ';
+ TempSQL := Copy(MySQL, startpos, 999);
+
+ p := pos(':', TempSQL);
+ while p > 0 do
+ begin
+ SQLStr := SQLStr + Copy(TempSQL, 1, p - 1);
+ System.Delete(TempSQL, 1, p);
+ startpos := 1;
+ FieldId := GetWord(TempSQL, startpos, vartype); // variable
+ System.Delete(TempSQL, 1, startpos); // Tzvetan
+ // SQLStr := SQLStr + QuotedStr(FieldByName(FieldId).AsString);
+ // edited by Donnie
+ SQLStr := SQLStr + GetFieldValue(FieldByName(FieldId), Blobs);
+ p := pos(':', TempSQL);
+ end;
+ SQLStr := SQLStr + Copy(TempSQL, StartPos, 999);
+ try
+ Connection.SQLite3_execute(Connection.DBHandle, PAnsiChar(SQLStr), FParams, self);
+ if FAutoCommit then
+ Connection.Commit;
+ except
+ if FAutoCommit then begin
+ Connection.RollBack;
+ raise;
+ end;
+ end;
+ if Assigned(Blobs) then begin
+ for p := 0 to Blobs.Count - 1 do
+ TMemoryStream(Blobs.Items[p]).Free;
+ Blobs.Free;
+ end;
+ inherited InternalDelete;
+ end;
+ Ende:
+ DebugLeave('TASQLite3Query.InternalDelete');
+end;
+
+ //==============================================================================
+ // This is probabely the most difficult thing about these components.
+ // To be able to have a live resultset a tupdatequery must be used to
+ // supply the correct sql on the events. In the internalpost the insert and
+ // update are handled. The routine will take the given sql and remodel it
+ // to a workable sql which is executed. Keep in mind that this routine
+ // is far more difficult then the TASQLite3Table, since the last one is depending
+ // on a unique rownumber, available in the resultset, which might not be
+ // available to user queries
+ // There are several syntaxes allowed:
+ //
+ // insert into table *
+ // this will generate an insert statement for each field and values
+ // i.e. insert into table a,b,c values :a, :b, :c;
+ //
+ // insert into table (a, b, c) values *
+ // this will generate an insert statement like
+ // insert into table (a, b, c) values (:a, :b, :c);
+ //
+ // insert into table (a, b, c) values (:a, :b, :c);
+ // insert into table (a, b, c) values (:a, "bvalue", :c) etc.
+ //
+ // update table set * where
+ // this will generate a update for all fields like
+ // update a=:a, b=:b, c=:c where
+ //
+ //==============================================================================
+
+procedure TASQLite3Query.InternalPost;
+var
+ i : integer;
+ p : integer;
+ startpos : integer;
+ MyFieldList : TStringList;
+ MyFieldValues : TStringList;
+ MySQL : string;
+ TheWord : string;
+ TempSQL : string;
+ SQLStr : string; // added by Donnie
+ TableId : string;
+ FieldId : string;
+ varType : integer;
+ Blobs : TList; // added by Donnie
+begin
+ DebugEnter('TASQLite3Query.InternalPost');
+ if FReadOnly then
+ raise AsgError.Create('Cannot post into a read-only dataset');
+ MyFieldList := nil;
+ MyFieldValues := nil;
+ try
+ if not Connection.FConnected then
+ begin
+ DebugLeave('TASQLite3Query.InternalPost');
+ exit;
+ end;
+ if FAutoCommit then
+ Connection.ExecStartTransaction(FTransactionType);
+ if not Assigned(FUpdateSQL) then
+ begin
+ DebugLeave('TASQLite3Query.InternalPost Exception');
+ raise AsgError.Create('Missing TASQLite3UpdateSQL component');
+ end;
+
+ Blobs := TList.Create;
+ if (State = dsEdit) and (FResult.Count > 0) then
+ begin
+ MyFieldList := TStringList.Create;
+ MyFieldValues := TStringList.Create;
+ MySQL := FUpdateSQL.FUpdateSQL.Text;
+ startpos := 1;
+ TheWord := GetWord(MySQL, startpos, vartype); // update
+ if not SyntaxCheck(TheWord, 'update') then
+ exit;
+
+ Tableid := GetWord(MySQL, startpos, vartype); // tablename
+
+ TheWord := GetWord(MySQL, startpos, vartype); // set or '*'
+ if TheWord = '*' then
+ begin
+ for i := 0 to FieldList.Count - 1 do
+ begin
+ MyFieldList.Add(FieldList[i].FieldName);
+ MyFieldValues.Add(':' + FieldList[i].FieldName);
+ end;
+ TheWord := GetWord(MySQL, startpos, vartype); // where
+ end
+ else
+ begin
+ if not SyntaxCheck(TheWord, 'set') then
+ begin
+ DebugLeave('TASQLite3Query.InternalPost');
+ exit;
+ end;
+
+ repeat
+ TheWord := GetWord(MySQL, startpos, vartype); // fieldname
+ MyFieldList.Add(TheWord);
+
+ TheWord := GetWord(MySQL, startpos, vartype); // '='
+ if not SyntaxCheck(TheWord, '=') then
+ begin
+ DebugLeave('TASQLite3Query.InternalPost');
+ exit;
+ end;
+ TheWord := GetWord(MySQL, startpos, vartype); // 2004-14-09 (rps) ':' or 'where' --->
+ if vartype = vtcDelimiter then // <---
+ TheWord := GetWord(MySQL, startpos, vartype); // fieldvalue
+ if TheWord = '*' then
+ MyFieldValues.Add(':' + MyFieldList[MyFieldList.Count - 1])
+ else
+ MyFieldValues.Add(':' + TheWord);
+
+ TheWord := GetWord(MySQL, startpos, vartype); // , or 'where'
+ until CompareText(TheWord, 'where') = 0;
+ end;
+
+ if not SyntaxCheck(TheWord, 'where') then
+ exit;
+
+ SQLStr := 'update ' + TableId + ' set ';
+ // for i := 0 to FieldList.Count - 1 do
+ // typo corrected by Donnie
+ for i := 0 to MyFieldList.Count - 1 do
+ begin
+ // SQLStr := SQLStr + FieldList[i].FieldName + '=';
+ // typo corrected by Donnie
+ SQLStr := SQLStr + MyFieldList.Strings[i] + '=';
+ FieldId := MyFieldValues[i];
+ if FieldId[1] = ':' then
+ begin
+ System.Delete(FieldId, 1, 1);
+ // SQLStr := SQLStr + QuotedStr(FieldByName(FieldId).AsString) + ','
+ // edited by Donnie
+ SQLStr := SQLStr + GetFieldValue(FieldByName(FieldId), Blobs) + ','
+ end
+ else
+ SQLStr := SQLStr + QuotedStr(FieldId) + ','
+ end;
+ System.Delete(SQLStr, Length(SQLStr), 1); // get rid of ','
+ TempSQL := ' where ' + Copy(MySQL, startpos, 999);
+
+ p := pos(':', TempSQL);
+ while p > 0 do
+ begin
+ SQLStr := SQLStr + Copy(TempSQL, 1, p - 1);
+ System.Delete(TempSQL, 1, p);
+ startpos := 1;
+ FieldId := GetWord(TempSQL, startpos, vartype); // variable
+ System.Delete(TempSQL, 1, startpos); // Tzvetan
+ // SQLStr := SQLStr + QuotedStr(FieldToStr(FieldByName(FieldId)));
+ // edited by Donnie
+ SQLStr := SQLStr + GetFieldValue(FieldByName(FieldId), Blobs);
+ p := pos(':', TempSQL);
+ end;
+ SQLStr := SQLStr + Copy(TempSQL, StartPos, 999);
+
+ // Connection.SQLite3_ExecSQL(SQLStr);
+ // edited by Donnie
+ Connection.SQLite3_ExecSQL(SQLStr, Blobs);
+ inherited InternalPost; // rework internals
+ end
+ else
+ begin
+ { If inserting (or appending), increment the bookmark counter and
+ store the data. Sytax should be: insert into * or
+ insert into (field, field) values (field, field) | *
+ The sql is parsed and a new (valid) sql generated
+ }
+ MyFieldList := TStringList.Create;
+ MyFieldValues := TStringList.Create;
+ MySQL := FUpdateSQL.FInsertSQL.Text;
+ startpos := 1;
+ TheWord := GetWord(MySQL, startpos, vartype); // insert
+ if not SyntaxCheck(TheWord, 'insert') then
+ exit;
+
+ TheWord := GetWord(MySQL, startpos, vartype); // into
+ if not SyntaxCheck(TheWord, 'into') then
+ exit;
+
+ Tableid := GetWord(MySQL, startpos, vartype); // tablename
+
+ TheWord := GetWord(MySQL, startpos, vartype); // ( or *
+ if TheWord = '*' then
+ begin
+ for i := 0 to FieldList.Count - 1 do
+ begin
+ MyFieldList.Add(FieldList[i].FieldName);
+ MyFieldValues.Add(':' + FieldList[i].FieldName);
+ end;
+ end
+ else if TheWord = '(' then
+ begin
+ repeat
+ TheWord := GetWord(MySQL, startpos, vartype); // fieldname
+ MyFieldList.Add(TheWord);
+ TheWord := GetWord(MySQL, startpos, vartype); // ',' or ')'
+ until theword = ')';
+ TheWord := GetWord(MySQL, startpos, vartype); // values
+ TheWord := GetWord(MySQL, startpos, vartype); // '(' or '*'
+ if TheWord = '*' then
+ begin
+ for i := 0 to MyFieldList.Count - 1 do
+ MyFieldValues.Add(':' + MyFieldList[i]);
+ end
+ else
+ begin
+// 2004-14-09 (rps) original - does not work
+ repeat
+ TheWord := GetWord(MySQL, startpos, vartype); // ':' or fieldname
+ if vartype = vtcDelimiter then begin
+ TheWord := GetWord(MySQL, startpos, vartype); // fieldname !!
+ MyFieldValues.Add(':' + TheWord);
+ end else
+ MyFieldValues.Add(TheWord);
+ TheWord := GetWord(MySQL, startpos, vartype); // ',' or ')'
+ until theword = ')';
+ end;
+ end
+ else
+ begin
+ raise AsgError.Create('SQL macro syntax error on insertsql, expected ( or *');
+ end;
+
+ SQLStr := 'insert into ' + TableId + ' (';
+ for i := 0 to MyFieldList.Count - 1 do
+ SQLStr := SQLStr + MyFieldList[i] + ',';
+ SQLStr[Length(SQLStr)] := ')';
+ SQLStr := SQLStr + ' values (';
+ for i := 0 to MyFieldList.Count - 1 do
+ begin
+ FieldId := MyFieldValues[i];
+ if FieldId[1] = ':' then begin
+ System.Delete(FieldId, 1, 1);
+ // SQLStr := SQLStr + QuotedStr(FieldByName(FieldId).AsString) + ','
+ // edited by Donnie
+ SQLStr := SQLStr + GetFieldValue(FieldByName(FieldId), Blobs) + ','
+ end else begin
+ if CompareText(FieldId,'null')=0 then
+ SQLStr := SQLStr + FieldId+','
+ else
+ SQLStr := SQLStr + QuotedStr(FieldId) + ','
+ end;
+ end;
+ SQLStr[Length(SQLStr)] := ')';
+ // Connection.SQLite3_ExecSQL(SQLStr);
+ // edited by Donnie
+ Connection.SQLite3_ExecSQL(SQLStr, Blobs);
+ if FResult.Count = 0 then
+ Inc(FCurrec);
+ inherited InternalPost; // rework internals
+ end;
+ if FAutoCommit then
+ begin
+ try
+ Connection.Commit;
+ except
+ Connection.RollBack;
+ raise;
+ end;
+ end;
+ finally
+ if Assigned(MyFieldList) then MyFieldList.Free;
+ if Assigned(MyFieldValues) then MyFieldValues.Free;
+ if Assigned(Blobs) then begin
+ for i := 0 to Blobs.Count - 1 do
+ try
+ TMemoryStream(Blobs.Items[i]).Free;
+ except
+ end;
+ Blobs.Free;
+ end;
+ end;
+ DebugLeave('TASQLite3Query.InternalPost');
+end;
+
+procedure TASQLite3Query.InternalClose;
+begin
+ DebugEnter('TASQLite3Query.InternalClose');
+ FPrepared := '';
+ inherited;
+ DebugLeave('TASQLite3Query.InternalClose');
+end;
+
+procedure TASQLite3Query.InternalOpen;
+//var
+// p : integer;
+begin
+ DebugEnter('TASQLite3Query.InternalOpen');
+ if Trim(FSQL.Text) = '' then
+ begin
+ raise AsgError.Create('no query specified');
+ abort;
+ end;
+
+ if (FMaxResults = 0) and (FStartResult <> 0) then
+ FMaxResults := -1;
+
+ // SQLStr contains the 'raw' interpreted SQL, with ? as parameterlist
+ // This string has to be preserved, since it was parsed on entering the sql.
+ // On close and open (i.e. in case of master-detail) the parsed data still
+ // must be available
+
+ // We'll prepare the SQL statement into FPrepared. This is also the var
+ // containing the SQL statement to be executed.
+ FPrepared := SQLStr;
+
+// FPrepared := FSql.Text; // 2004-14-09 (rps) changed SqlStr (current) -> FSql.Text (property),
+ // to bring Close; Open; to work. (Full refresh.)
+ // this will block parameterized queries to function right (Aducom)
+
+ if (Filtered) and (Filter <> '') then
+ begin
+ //in order to let a filter work we use a little trick:
+ //select * from (my select statement)
+ FPrepared := 'select * from (' + FPrepared + ') where ' + Filter;
+ end;
+
+ if FParams.Count > 0 then
+ FPrepared := SetQueryParams(FPrepared);
+
+ if FMaxResults <> 0 then
+ FPrepared := FPrepared + ' limit ' + IntToStr(FMaxResults);
+ if FStartResult <> 0 then
+ FPrepared := FPrepared + ' offset ' + IntToStr(FStartResult);
+ inherited;
+ DebugLeave('TASQLite3Query.InternalOpen');
+end;
+
+ // =============================================================================
+ // The master-detail is implemented through the filter object
+ // in the future perhaps a separate filter object will be used allowing
+ // to add your own criteria too, but for the time being..
+ //==============================================================================
+
+procedure TASQLite3Query.SQLiteMasterChanged;
+var
+ r, s : string;
+ m, d : string;
+ p : integer;
+ cAnd : string;
+begin
+ DebugEnter('TASQLite3Query.SQLiteMasterChanged');
+ Close;
+ cAnd := '';
+ r := FMasterFields;
+ Filter := '';
+ Filtered := false;
+ while r <> '' do
+ begin // build the filter sql syntax
+ p := pos(';', r);
+ if p = 0 then
+ begin
+ if Trim(r) <> '' then
+ s := r;
+ r := '';
+ end
+ else
+ begin
+ s := Trim(Copy(r, 1, p - 1));
+ System.Delete(r, 1, p);
+ end;
+
+ p := pos('=', s);
+ if p = 0 then
+ begin
+ raise AsgError.Create('Syntax error: Masterfields not build of a=b;... pairs');
+ end
+ else
+ begin
+ d := copy(s, 1, p - 1);
+ m := copy(s, p + 1, 99);
+ end;
+// Filter := Filter + cAnd + d + '=' + FMasterSource.DataSet.FieldByName(m).AsString;
+ Filter := Filter + cAnd + d + '=' + QuotedStr(FMasterSource.DataSet.FieldByName(m).AsString) ;
+ cAnd := ' and ';
+ end;
+ if (Filter <> '') and (Active) then begin
+ filtered := true;
+ Open;
+ end;
+ DebugLeave('TASQLite3Query.SQLiteMasterChanged');
+end;
+
+ //==============================================================================
+ // execsql is used for sql statements which do not require cursors. For this
+ // reason the fnoresults is set, to prevent building a result set
+ //==============================================================================
+
+procedure TASQLite3BaseQuery.ExecSQL;
+begin
+ DebugEnter('TASQLite3BaseQuery.ExecSQL');
+ FNoResults := true;
+ Close;
+ if FAutoCommit then
+ begin
+ Connection.ExecStartTransaction(FTransactionType);
+ Open;
+ try
+ Connection.Commit
+ except
+ Connection.RollBack;
+ raise;
+ end;
+ end
+ else
+ Open;
+ DebugLeave('TASQLite3BaseQuery.ExecSQL');
+end;
+
+procedure TASQLite3BaseQuery.SetParamsList(Value: TParams);
+begin
+ DebugEnter('TASQLite3BaseQuery.SetParamsList');
+ FParams.AssignValues(Value);
+ DebugLeave('TASQLite3BaseQuery.SetParamsList');
+end;
+
+function TASQLite3BaseQuery.GetParamsCount: word;
+begin
+ DebugEnter('TASQLite3BaseQuery.GetParamsCount');
+ Result := FParams.Count;
+ DebugLeave('TASQLite3BaseQuery.GetParamsCount');
+end;
+
+procedure TASQLite3Table.SetFOrderBy(OrderBy : string);
+begin
+ if FOrderBy <> OrderBy then begin
+ Close;
+ FOrderBy := OrderBy;
+ end;
+end;
+
+procedure TASQLite3Table.SetFTableName(TableName : string);
+begin
+ Close;
+ FTableName := TableName;
+end;
+
+procedure TASQLite3Table.Notification(AComponent: TComponent; Operation: TOperation);
+begin
+{$IFDEF DEBUG_VERY_LOUD}
+ DebugEnter('TASQLite3Table.Notification');
+{$ENDIF}
+// Application.ProcessMessages;
+ if Assigned(AComponent) then
+ begin
+ if (Operation = opRemove) then
+ begin
+ if (AComponent is TASQLite3DB) and Assigned(FConnection) then
+ begin
+ if TASQLite3DB(AComponent) = FConnection then begin
+ Close;
+ FConnection := nil;
+ end;
+ end else
+
+ end;
+ end;
+ inherited;
+{$IFDEF DEBUG_VERY_LOUD}
+ DebugLeave('TASQLite3Table.Notification');
+{$ENDIF}
+end;
+
+procedure TASQLite3Table.InternalOpen;
+begin
+ DebugEnter('TASQLite3Table.InternalOpen');
+
+ if FTableName = '' then
+ begin
+ raise AsgError.Create('no table specified');
+ exit;
+ end;
+ FSQL.Clear;
+ FSQL.Add('select *, rowid as rowid from ' + TableName);
+ if Filtered then
+ if Filter <> '' then
+ FSQL.Add(' where ' + Filter);
+ if (FMaxResults = 0) and (FStartResult <> 0) then
+ FMaxResults := -1;
+ if FMaxResults <> 0 then
+ FSQL.Add(' limit ' + IntToStr(FMaxResults));
+ if FStartResult <> 0 then
+ FSQL.Add(' offset ' + IntToStr(FStartResult));
+ if FOrderBy <> '' then
+ FSQL.Add(' order by ('+FOrderBy+')');
+ SQLStr := FSQL.Text;
+ FPrepared := SQLStr;
+ inherited;
+ DebugLeave('TASQLite3Table.InternalOpen');
+end;
+
+procedure TASQLite3Table.SQLiteMasterChanged;
+var
+ r, s : string;
+ m, d : string;
+ p : integer;
+ cAnd : string;
+begin
+ DebugEnter('TASQLite3Table.SQLiteMasterChanged');
+ Close;
+ cAnd := '';
+ r := FMasterFields;
+ Filter := '';
+ while r <> '' do
+ begin
+ p := pos(';', r);
+ if p = 0 then
+ begin
+ if Trim(r) <> '' then
+ s := r;
+ r := '';
+ end
+ else
+ begin
+ s := Trim(Copy(r, 1, p - 1));
+ System.Delete(r, 1, p);
+ end;
+
+ p := pos('=', s);
+ if p = 0 then
+ begin
+ raise AsgError.Create('Syntax error: Masterfields not build of a=b;... pairs');
+ end
+ else
+ begin
+ d := copy(s, 1, p - 1);
+ m := copy(s, p + 1, 99);
+ end;
+// Filter := Filter + cAnd + d + '=' + FMasterSource.DataSet.FieldByName(m).AsString;
+ Filter := Filter + cAnd + d + '=' + QuotedStr(FMasterSource.DataSet.FieldByName(m).AsString) ;
+ cAnd := ' and ';
+ end;
+ if Filter <> '' then
+ filtered := true;
+ Open;
+ DebugLeave('TASQLite3Table.SQLiteMasterChanged');
+end;
+
+procedure TASQLite3Table.InternalDelete;
+begin
+ DebugEnter('TASQLite3Table.InternalDelete');
+ if FReadOnly then
+ raise AsgError.Create('Cannot delete from a read-only dataset');
+
+ if not Connection.FConnected then
+ exit;
+ if FAutoCommit then
+ Connection.ExecStartTransaction(FTransactionType);
+
+ SQLStr := '';
+ CurrentRowId := FResult.GetRowId(FCurRec);
+ FSQL.Clear;
+ FSQL.Add('delete from ' + Tablename + ' where rowid=' + QuotedStr(IntToStr(CurrentRowId)));
+// SQLStr := StringReplace(FSQL.Text, crlf, #10, [rfReplaceAll, rfIgnoreCase]); // albert
+ SQLStr := FSQL.Text;
+ Connection.SQLite3_execute(Connection.DBHandle, PAnsiChar(SQLStr), FParams, self);
+
+ inherited InternalDelete;
+
+ if FAutoCommit then
+ begin
+ try
+ Connection.Commit;
+ except
+ Connection.RollBack;
+ raise;
+ end;
+ end;
+ DebugLeave('TASQLite3Table.InternalDelete');
+end;
+
+procedure TASQLite3Table.InternalPost;
+var
+ i : integer;
+ n: Integer;
+ ThisDateFormat,
+ tmpMasterDetail, MasterField, chDelim: string;
+ slDetail, slValues: TStringList;
+ lsBlobs: TList; //GPA
+ M:TMemoryStream; //GPA
+
+ // this function will return the fielvalue of an indicated fieldbyordinalnumber
+ // if the fieldtype is tdatetime it is transfered to the right date notation as
+ // indicated by jpierce.
+
+ function GetFieldValue(const AField: TField): string; // DI
+ begin // DI
+ if AField.DataType = ftDateTime then // DI
+ GetFieldValue := QuotedStr(FormatDateTime(ThisDateFormat, FieldByName(AField.FieldName).AsDateTime)) // DI
+ else if (AField.DataType = ftBlob) or (AField.DataType = ftMemo) or (AField.DataType = ftFmtMemo) or (AField.DataType = ftGraphic) then //GPA
+ begin //GPA
+ M:=TMemoryStream.Create; //GPA
+ TBlobField(FieldByName(AField.FieldName)).SaveToStream(M);
+ GetFieldValue := #2+IntToStr(1+lsBlobs.Add(Pointer(M))) //GPA
+ end
+ else
+ GetFieldValue := QuotedStr(FieldByName(AField.FieldName).AsString); // DI
+ end; // DI
+
+var
+ f: TField; // DI
+ OldDecimalSeparator: ansiChar; // DI
+begin
+ DebugEnter('TASQLite3Table.InternalPost');
+
+ if FReadOnly then
+ raise AsgError.Create('Cannot post into a read-only dataset');
+
+ // determine datetime style of dataset (if any)
+
+ if FSQLiteDateFormat then
+ ThisDateFormat := 'yyyy-mm-dd hh:nn:ss.zzz'
+ else if (FTableDateFormat <> '') then
+ ThisDateFormat := FTableDateFormat
+ else
+ ThisDateFormat := ShortDateFormat;
+
+ if not Connection.FConnected then Exit;
+ if FAutoCommit then Connection.StartTransaction;
+
+ lsBlobs := TList.Create; //GPA
+ OldDecimalSeparator := DecimalSeparator; // DI
+ try // DI
+ DecimalSeparator := '.'; // DI: Force Delphi's DecimalSeparator to SQL style syntax.
+
+ if (State = dsEdit) and (FResult.Count > 0) then
+ begin
+ CurrentRowId := FResult.GetRowId(FCurRec);
+ FSQL.Clear;
+ FSQL.Add('update ' + TableName + ' set ');
+ SQLStr := '';
+ for i := 0 to FieldList.Count - 1 do begin
+ f := FieldList[i]; // DI
+ if not (f.Calculated or f.Lookup) then // DI
+ SQLStr := SQLStr + f.FieldName + '=' + GetFieldValue(f) + ','; // DI
+ end;
+ SQLStr[Length(SQLStr)] := ' ';
+ FSQL.Add(SQLStr);
+ FSQL.Add(' where rowid=' + QuotedStr(IntToStr(CurrentRowId)));
+
+ SQLStr := FSQL.Text; // DI
+ // DI SQLStr := StringReplace(FSQL.Text, CRLF, #10, [rfReplaceAll, rfIgnoreCase]);
+
+ Connection.SQLite3_ExecSQL(SQLStr,lsBlobs);
+ inherited InternalPost; // rework internals
+ end
+ else
+ begin
+ { If inserting (or appending), increment the bookmark counter and
+ store the data }
+ FSQL.Clear;
+ FSQL.Add('insert into ' + TableName + ' (');
+ SQLStr := '';
+
+ for i := 0 to FieldList.Count - 1 do begin
+ if not (FieldList[i].Calculated or FieldList[i].Lookup) then // aducom
+ SQLStr := SQLStr + FieldList[i].FieldName + ',';
+ end;
+
+ SQLStr[Length(SQLStr)] := ')';
+ SQLStr := SQLStr + ' values (';
+ FSQL.Add(SQLStr);
+ SQLStr := '';
+
+ slDetail := TStringList.Create;
+ slValues := TStringList.Create;
+ i := 0; chDelim := ';';
+ if FMasterSource <> nil then
+ begin
+ while i < Length(FMasterFields) do
+ begin
+ tmpMasterDetail := GetWordByDelim(FMasterFields, i, chDelim);
+ n := Pos('=', tmpMasterDetail);
+ if n <> 0 then
+ begin
+ slDetail.Add(Copy(tmpMasterDetail, 1, n - 1));
+ MasterField := Copy(tmpMasterDetail, n + 1, Length(tmpMasterDetail) - n);
+ slValues.Add(FMasterSource.DataSet.FieldByName(MasterField).AsString);
+ end;
+ end;
+ end;
+
+ if (FPrimaryAutoInc) and (FieldDefs[0].DataType = ftInteger) then begin
+ SQLStr := SQLStr + 'null,';
+ n := 1; // aducom
+ end else begin // aducom
+ n := 0; // aducom
+ end; // aducom
+
+ for i := n to FieldList.Count - 1 do // aducom
+ begin // DI
+ f := FieldList[i];
+ if not (f.Calculated or f.Lookup) then // DI
+ if slDetail.Find(f.FieldName, n) then // DI
+ SQLStr := SQLStr + QuotedStr(slValues.Strings[n]) + ','
+ else
+ SQLStr := SQLStr + GetFieldValue(f) + ','; // DI
+ end; // DI
+
+ slDetail.Free;
+ slValues.Free;
+
+ SQLStr[Length(SQLStr)] := ')';
+ FSQL.Add(SQLStr);
+
+ SQLStr := FSQL.Text; // DI
+ // DI SQLStr := StringReplace(FSQL.Text, CRLF, #10, [rfReplaceAll, rfIgnoreCase]);
+
+ Connection.SQLite3_ExecSQL(SQLStr, lsBlobs);
+ if FPrimaryAutoInc then
+ if FieldDefs[0].DataType = ftInteger then
+ FieldByName(FieldList[0].FieldName).AsInteger :=
+ Connection.SQLite3_LastInsertRow(Connection.DBHandle);
+ if FResult.Count = 0 then
+ Inc(FCurRec);
+ inherited InternalPost; // rework internals
+ end;
+
+ finally // DI
+ DecimalSeparator := OldDecimalSeparator; // DI
+ For I:=0 to lsBlobs.Count-1 do begin // GPA
+ M:=TMemoryStream(lsBlobs.Items[I]); // GPA
+ M.Free; // GPA
+ end; // GPA
+ lsBlobs.Free; // GPA
+
+ end; // DI
+
+ if FAutoCommit then
+ begin
+ try
+ Connection.Commit;
+ except
+ Connection.RollBack;
+ raise;
+ end;
+ end;
+ DebugLeave('TASQLite3Table.InternalPost');
+end;
+
+// Blobfields in SQLite are in fact CLOB fields. However, since it is a large
+// chunk of data for all types the ftBlob is used. Keep in mind that blobs are
+// stored separately of TResult. Within the result structure only the memory
+// handle of the blob is stored.
+
+constructor TASQLite3BlobStream.Create(Field: TBlobField; Mode: TBlobStreamMode);
+begin
+// inherited Create;
+ FField := Field;
+ FMode := Mode;
+ FDataSet := FField.DataSet as TASQLite3BaseQuery;
+ if Mode <> bmWrite then
+ LoadBlobData;
+end;
+
+destructor TASQLite3BlobStream.Destroy;
+begin
+ DebugEnter('TASQLite3BlobStream.Destroy');
+ if FModified then
+ SaveBlobData;
+ inherited Destroy;
+end;
+
+function TASQLite3BlobStream.Read(var Buffer; Count: Longint): Longint;
+begin
+ DebugEnter('ASQLiteBlobStream.Read');
+ Result := inherited Read(Buffer, Count);
+ FOpened := True;
+end;
+
+function TASQLite3BlobStream.Write(const Buffer; Count: Longint): Longint;
+begin
+ DebugEnter('ASQLiteBlobStream.Write');
+ Result := inherited Write(Buffer, Count);
+ FModified := True;
+ FDataSet.SetModified(true);
+end;
+
+procedure TASQLite3BlobStream.LoadBlobData;
+var
+ Stream : TMemoryStream;
+ Offset : Integer;
+ RecBuffer : PAnsiChar;
+begin
+ DebugEnter('ASQLiteBlobStream.LoadBlobData');
+ Self.Size := 0;
+ FDataset.GetActiveBuffer(RecBuffer);
+
+// recbuffer := nil;
+
+ if RecBuffer <> nil then
+ begin
+ Offset := FDataset.GetFieldOffset(FField.FieldNo);
+ Move((RecBuffer + Offset)^, Pointer(Stream), sizeof(Pointer));
+ Self.CopyFrom(Stream, 0);
+ end;
+ Position := 0;
+end;
+
+procedure TASQLite3BlobStream.SaveBlobData;
+var
+ Stream : TMemoryStream;
+ Offset : Integer;
+ RecBuffer : PAnsiChar;
+begin
+ DebugEnter('ASQLiteBlobStream.SaveBlobData');
+ FDataset.GetActiveBuffer(RecBuffer);
+ if RecBuffer <> nil then
+ begin
+ Offset := FDataset.GetFieldOffset(FField.FieldNo);
+ Move((RecBuffer + Offset)^, Pointer(Stream), sizeof(Pointer));
+ Stream.Size := 0;
+ Stream.CopyFrom(Self, 0);
+ Stream.Position := 0;
+ end;
+end;
+
+// Inline sql can be used to store sqlstatements outside of the pascal source.
+// it prevents large 'sql.add' rows. Also it can be used to generate an in-memory
+// database structure if needed
+
+constructor TASQLite3InlineSQL.Create;
+begin
+ inherited;
+ FSQL := TStringList.Create;
+end;
+
+destructor TASQLite3InlineSQL.Destroy;
+begin
+ if Assigned(FSQL) then FSQL.Free;
+ inherited;
+end;
+
+procedure TASQLite3InlineSQL.SetSQL(const Value: TStrings);
+begin
+ if Assigned(FSQL) then
+ FSQL.Assign(Value)
+ else
+ FSQL := Value;
+end;
+
+function TASQLite3InlineSQL.GetSQL: TStrings;
+begin
+ GetSQL := FSQL;
+end;
+
+// save resultset as text, html or xml. Depending on type the following
+// will happen:
+//
+// text: all rows will be output, separated by the given separation symbol
+// xml: all rows will be output, tags are the fieldnames
+//
+//
+// fieldvalue
+// ....
+//
+// html: a table will be generated with the given classnames (if available)
+
+constructor TASQLite3Output.Create;
+begin
+ inherited;
+ FOutput := TStringList.Create;
+end;
+
+destructor TASQLite3Output.Destroy;
+begin
+ if Assigned(FOutput) then FOutput.Free;
+ inherited;
+end;
+
+procedure TASQLite3Output.SetFActive(Active: boolean);
+begin
+ FActive := Active;
+ if FActive = false then begin
+ end else begin
+ if Assigned(FDataSource) then begin
+ if Assigned(FDataSource.DataSet) then begin
+ Execute(FDataSource.DataSet);
+ end else raise AsgError.Create('Missing Datasource.Dataset');
+ end else raise AsgError.Create('Missing Datasource');
+ end;
+end;
+
+procedure TASQLite3Output.SetOutput(const Value: TStrings);
+begin
+ if Assigned(FOutput) then
+ FOutput.Assign(Value)
+ else
+ FOutput := Value;
+end;
+
+function TASQLite3Output.GetOutput: TStrings;
+begin
+ GetOutput := FOutput;
+end;
+
+procedure TASQLite3Output.Notification(AComponent: TComponent; Operation: TOperation);
+begin
+{$IFDEF DEBUG_VERY_LOUD}
+ DebugEnter('TASQLite3Output.Notification');
+{$ENDIF}
+ if Assigned(AComponent) then begin
+ if (Operation = opRemove) then begin
+ if (AComponent is TDataSource) then begin
+ if Assigned(FDataSource) then begin
+ if TDataSource(AComponent) = FDataSource then
+ FDataSource := nil;
+ end;
+ end
+ end;
+ end;
+ inherited;
+{$IFDEF DEBUG_VERY_LOUD}
+ DebugLeave('TASQLite3DB.Notification');
+{$ENDIF}
+end;
+
+procedure TASQLite3Output.Execute(MyDataSet: TDataSet);
+const eXML = 0;
+ eHTML = 1;
+ eTXT = 2;
+var FType : integer;
+ i : integer;
+ Line : string;
+ Sep : string;
+// Indent : integer;
+begin
+ if Assigned(MyDataset) then begin
+ if MyDataSet.Active = false then MyDataSet.Open;
+ Output.Clear;
+ FType := ETxt;
+ Line := '';
+
+ if CompareText(FOutputType[1], 'X') = 0 then begin
+ FType := eXML;
+ Line := Line + '' + #10;
+ end else if CompareText(FOutputType[1], 'H') = 0 then begin
+ FType := eHTML;
+ Line := Line + '' + #10 + '' + #10 +
+ 'Table ' + MyDataSet.Name + ' ' + #10 +
+ ' ' + #10 +
+ '' + #10 +
+ '' + #10;
+ end else if CompareText(FOutputType[1], 'T') = 0 then begin
+ FType := eTXT;
+ end;
+
+ Sep := '';
+
+ for i := 0 to MyDataSet.FieldDefs.Count - 1 do begin
+ case FType of
+ eXML: begin
+ end;
+ eHTML: begin
+ Line := Line + '' + MyDataSet.FieldDefs[i].Name + ' ';
+ end;
+ eTXT: begin
+ Line := Line + Sep + MyDataSet.FieldDefs[i].Name;
+ end;
+ end;
+ Sep := FSeparator;
+ end;
+
+ Output.Add(Line); Line := ''; Sep := '';
+ MyDataSet.First;
+
+// Indent := 0;
+ while not MyDataSet.Eof do begin
+
+ case FType of
+ eXML: Line := Line + ' ' + #10;
+ eHTML: Line := Line + '' + #10;
+ end;
+
+ for i := 0 to MyDataSet.FieldDefs.Count - 1 do begin
+ case FType of
+ eXML: begin
+ Line := Line + ' <' + MyDataSet.FieldDefs[i].Name + '>' +
+ MyDataSet.FieldByName(MyDataSet.FieldDefs[i].Name).AsString +
+ '' + MyDataSet.FieldDefs[i].Name + '>' + #10;
+ end;
+ eHTML: begin
+ Line := Line + '' + MyDataSet.FieldByName(MyDataSet.FieldDefs[i].Name).AsString + ' ';
+ end;
+ eTXT: begin
+ Line := Line + Sep + MyDataSet.FieldByName(MyDataSet.FieldDefs[i].Name).AsString;
+ end;
+ end;
+ Sep := FSeparator;
+ end;
+
+ case FType of
+ eXML: Line := Line + ' ' + #10;
+ eHTML: Line := Line + ' ' + #10;
+ end;
+
+ Output.Add(Line); Line := ''; Sep := '';
+ MyDataSet.Next;
+ end;
+
+ case FType of
+ eXML: Line := Line + '
' + #10;
+ eHTML: Line := Line + '
' + #10 + '' + #10 + '' + #10;
+ end;
+ Output.Add(Line);
+ end;
+end;
+
+{$IFDEF IPROVIDER}
+procedure TASQLite3BaseQuery.PSEndTransaction(Commit: Boolean);
+begin
+ // qui non sono molto sicuro...
+ if Assigned(Connection) then
+ if Commit then
+ Connection.Commit
+ else
+ Connection.RollBack;
+end;
+
+procedure TASQLite3BaseQuery.PSExecute;
+begin
+ UniDirectional := true;
+ ExecSQL;
+end;
+
+function TASQLite3BaseQuery.PSExecuteStatement(const ASQL: string;
+ AParams: TParams; ResultSet: Pointer): Integer;
+var
+ AsqlQry : TASQLite3BaseQuery;
+begin
+ if Assigned(ResultSet) then
+ begin
+ TDataSet(ResultSet^) := TASQLite3Query.Create(nil);
+{$IFDEF ASQLITE_D6PLUS}
+ TASQlite3Query(ResultSet^).SetUniDirectional(true);// := true; // just store data in provider.
+{$endif}
+ with TASQLite3BaseQuery(ResultSet^) do begin
+ Connection := self.Connection;
+ Params.Assign(AParams);
+ FPrepared := ASql;
+ if FParams.Count > 0 then
+ FPrepared := SetQueryParams(FPrepared);
+ Open;
+ Result := Connection.RowsAffected;
+ end;
+ end
+ else
+ begin
+ AsqlQry := TASQLite3BaseQuery.Create(nil);
+ try
+ with AsqlQry do begin
+ Connection := self.Connection;
+ FPrepared := ASql;
+ FParams.Assign(AParams);
+ if FParams.Count > 0 then
+ FPrepared := SetQueryParams(AsqlQry.FPrepared);
+ ExecSQL;
+ Result := Connection.RowsAffected;
+ end;
+ finally
+ AsqlQry.Free;
+ end;
+ end;
+end;
+
+function TASQLite3BaseQuery.PSGetParams: TParams;
+begin
+ Result := Params;
+end;
+
+function TASQLite3BaseQuery.PSGetQuoteChar: string;
+begin
+ Result := '"';
+end;
+
+function TASQLite3BaseQuery.PSGetTableName: string;
+begin
+ Result := GetTableNameFromSQL(FSQL.Text);
+end;
+
+function TASQLite3BaseQuery.PSInTransaction: Boolean;
+begin
+ Result := Assigned(Connection);
+end;
+
+function TASQLite3BaseQuery.PSIsSQLBased: Boolean;
+begin
+ Result := True;
+end;
+
+function TASQLite3BaseQuery.PSIsSQLSupported: Boolean;
+begin
+ Result := True;
+end;
+
+procedure TASQLite3BaseQuery.PSSetCommandText(const CommandText: string);
+begin
+ if CommandText <> '' then begin
+ FSQL.Text := CommandText;
+ FPrepared := CommandText;
+ end;
+end;
+
+procedure TASQLite3BaseQuery.PSSetParams(AParams: TParams);
+begin
+ if AParams.Count <> 0 then
+ Params.Assign(AParams);
+ Close;
+end;
+
+procedure TASQLite3BaseQuery.PSStartTransaction;
+begin
+ StartTransaction;
+end;
+
+procedure TASQLite3BaseQuery.PSReset;
+begin
+ if Active then
+ begin
+ Close;
+ Open;
+ end;
+end;
+
+function TASQLite3BaseQuery.PSGetUpdateException(e: Exception; Prev: EUpdateError): EUpdateError;
+var
+ PrevErr : Integer;
+begin
+ // Generates an EUpdateError object based on another exception object.
+ if e is ASGError then begin
+ if Prev = nil then
+ PrevErr := Prev.errorCode
+ else
+ PrevErr := 0;
+ with ASGError(e) do
+ Result := EUpdateError.Create(e.Message, '', -1, PrevErr, e);
+ end else
+ Result := EUpdateError.Create(e.Message, '', -1, -1, e);
+end;
+
+function TASQLite3BaseQuery.PSUpdateRecord(UpdateKind: TUpdateKind; Delta: TDataSet): Boolean;
+begin
+ // OnUpdateRecord is not supported
+ Result := False;
+end;
+
+function TASQlite3BaseQuery.PSGetKeyFields: string;
+var
+ i : integer;
+begin
+ Result := '';
+ for i := 0 to (Fields.Count - 1) do begin
+ if pfInKey in Fields[i].ProviderFlags then begin
+ if Result <> '' then
+ Result := Result + ';';
+ Result := Result + Fields[i].FieldName;
+ end;
+ end;
+end;
+
+{$ENDIF}
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/asqlite_def.inc b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/asqlite_def.inc
new file mode 100644
index 0000000..bbd5e3b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/asqlite_def.inc
@@ -0,0 +1,99 @@
+{
+
+Aducom Software SQLite components
+Copyright (C) 2003-2006 by Aducom Software
+Albert Drent
+a.drent@aducom.com
+for questions please register on the forum on www.aducom.com/sqlite
+}
+
+{$IFDEF VER125}{C4}{$B-}{$X+}{$T-}{$H+}{$ENDIF}
+{$IFDEF VER110}{C3}{$B-}{$X+}{$T-}{$H+}{$ENDIF}
+{$IFDEF VER93}{C1}{$B-}{$X+}{$T-}{$H+}{$ENDIF}
+{$IFDEF VER180}
+ {$DEFINE ASQLite_D2PLUS}
+ {$DEFINE ASQLite_D3PLUS}
+ {$DEFINE ASQLite_D4PLUS}
+ {$DEFINE ASQLite_D5PLUS}
+ {$DEFINE ASQLite_D6PLUS}
+ {$DEFINE ASQLite_D7PLUS}
+ {$DEFINE ASQLite_D2005PLUS}
+ {$DEFINE ASQLite_D2006PLUS}
+ {DELPHI10}
+ {$B-}{$X+}{$T-}{$H+}
+ {$DEFINE ASQLite_DYNARRAY}
+{$ENDIF}
+{$IFDEF VER170}
+ {$DEFINE ASQLite_D2PLUS}
+ {$DEFINE ASQLite_D3PLUS}
+ {$DEFINE ASQLite_D4PLUS}
+ {$DEFINE ASQLite_D5PLUS}
+ {$DEFINE ASQLite_D6PLUS}
+ {$DEFINE ASQLite_D7PLUS}
+ {$DEFINE ASQLite_D2005PLUS}
+ {DELPHI9}
+ {$B-}{$X+}{$T-}{$H+}
+ {$DEFINE ASQLite_DYNARRAY}
+{$ENDIF}
+{$IFDEF VER150}
+ {$DEFINE ASQLite_D2PLUS}
+ {$DEFINE ASQLite_D3PLUS}
+ {$DEFINE ASQLite_D4PLUS}
+ {$DEFINE ASQLite_D5PLUS}
+ {$DEFINE ASQLite_D6PLUS}
+ {$DEFINE ASQLite_D7PLUS}
+ {DELPHI7}
+ {$B-}{$X+}{$T-}{$H+}
+ {$DEFINE ASQLite_DYNARRAY}
+{$ENDIF}
+{$IFDEF VER140}
+ {$DEFINE ASQLite_D2PLUS}
+ {$DEFINE ASQLite_D3PLUS}
+ {$DEFINE ASQLite_D4PLUS}
+ {$DEFINE ASQLite_D5PLUS}
+ {$DEFINE ASQLite_D6PLUS}
+ {DELPHI6}
+ {$B-}{$X+}{$T-}{$H+}
+ {$DEFINE ASQLite_DYNARRAY}
+{$ENDIF}
+{$IFDEF VER130}
+ {$DEFINE ASQLite_D2PLUS}
+ {$DEFINE ASQLite_D3PLUS}
+ {$DEFINE ASQLite_D4PLUS}
+ {$DEFINE ASQLite_D5PLUS}
+ {DELPHI5}
+ {$DEFINE ASQLite_DYNARRAY}
+ {$B-}{$X+}{$T-}{$H+}
+{$ENDIF}
+{$IFDEF VER120}
+ {$DEFINE ASQLite_D2PLUS}
+ {$DEFINE ASQLite_D3PLUS}
+ {$DEFINE ASQLite_D4PLUS}
+ {DELPHI4}
+ {$DEFINE ASQLite_DYNARRAY}
+ {$B-}{$X+}{$T-}{$H+}
+{$ENDIF}
+{$IFDEF VER100}
+ {$DEFINE ASQLite_D2PLUS}
+ {$DEFINE ASQLite_D3PLUS}
+ {$DEFINE ASQLite_NOINT64}
+ {DELPHI3}
+ {$B-}{$X+}{$T-}{$H+}
+{$ENDIF}
+{$IFDEF VER90}
+ {$DEFINE ASQLite_D2PLUS}
+ {$DEFINE ASQLite_NOINT64}
+ {$DEFINE ASQLite_NOWIDESTRING}
+ {DELPHI2}
+ {$B-}{$X+}{$T-}{$H+}
+{$ENDIF}
+
+{$IFDEF LINUX}{KYLIX}{$DEFINE CLX}{$ENDIF}
+{$IFDEF FPC}{$H+}{$MODE DELPHI}{$ENDIF}
+{$IFDEF ASQLite_D4PLUS}{$DEFINE ASQLite_HAVEVARIANT}{$ENDIF}
+{$R-}{$Q-}
+
+{$IFDEF CLX}
+{$DEFINE ASQLite_NOIDISPATCH} // not implemented
+{$ENDIF}
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDAADODriver.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDAADODriver.pas
new file mode 100644
index 0000000..ff9f5a6
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDAADODriver.pas
@@ -0,0 +1,1727 @@
+unit uDAADODriver;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Driver Library
+{
+{ compiler: Delphi 6 and up
+{ platform: Win32
+{
+{ (c)opyright RemObjects Software. all rights reserved.
+{
+{ Using this code requires a valid license of the Data Abstract
+{ which can be obtained at http://www.remobjects.com.
+{----------------------------------------------------------------------------}
+
+{$I ..\DataAbstract.inc}
+
+{$R DataAbstract_ADODriver_Glyphs.res}
+
+// with included option, you can receive errors like
+// Access violation at address 6BD7297F in module 'msado15.dll'. Read of address 00000068.
+{.$DEFINE ADOMONITOR_SHOWPARAMVALUES}
+
+interface
+
+uses Windows, Classes, DB, uDAEngine, uDAInterfaces, uDAADOInterfaces, uROClasses, ADODB,
+ uDAInterfacesEx, uDAUtils, uDAOracleInterfaces;
+
+type { TDAADODriver }
+ TDAADODriver = class(TDADriverReference)
+ end;
+ TDAEADODriver = class;
+
+ TDAADOMonitor = class
+ private
+ FDriver: TDAEADODriver;
+ FEnabled: Boolean;
+ FOnCallback: TDALogTraceEvent;
+ FTraceFlags: TDATraceOptions;
+ procedure SetEnabled(const Value: Boolean);
+ procedure SetTraceFlags(const Value: TDATraceOptions);
+ procedure SetOnCallback(const Value: TDALogTraceEvent);
+ procedure ADOConnectionBeginTransComplete(Connection: TADOConnection;
+ TransactionLevel: Integer; const Error: Error;
+ var EventStatus: TEventStatus);
+ procedure ADOConnectionCommitTransComplete(Connection: TADOConnection;
+ const Error: Error; var EventStatus: TEventStatus);
+ procedure ADOConnectionConnectComplete(Connection: TADOConnection;
+ const Error: Error; var EventStatus: TEventStatus);
+ procedure ADOConnectionExecuteComplete(Connection: TADOConnection;
+ RecordsAffected: Integer; const Error: Error;
+ var EventStatus: TEventStatus; const Command: _Command;
+ const Recordset: _Recordset);
+ procedure ADOConnectionInfoMessage(Connection: TADOConnection;
+ const Error: Error; var EventStatus: TEventStatus);
+ procedure ADOConnectionRollbackTransComplete(
+ Connection: TADOConnection; const Error: Error;
+ var EventStatus: TEventStatus);
+ procedure ADOConnectionDisconnect(Connection: TADOConnection;
+ var EventStatus: TEventStatus);
+ procedure ADOConnectionWillConnect(Connection: TADOConnection;
+ var ConnectionString, UserID, Password: WideString;
+ var ConnectOptions: TConnectOption; var EventStatus: TEventStatus);
+ procedure ADOConnectionWillExecute(Connection: TADOConnection;
+ var CommandText: WideString; var CursorType: TCursorType;
+ var LockType: TADOLockType; var CommandType: TCommandType;
+ var ExecuteOptions: TExecuteOptions; var EventStatus: TEventStatus;
+ const Command: _Command; const Recordset: _Recordset);
+ public
+ constructor Create(ADriver: TDAEADODriver);
+ procedure ReAssignEvents;
+ procedure AssignEvents(AConnection:TADOConnection);
+ procedure UnAssignEvents(AConnection:TADOConnection);
+ property Enabled : Boolean read FEnabled write SetEnabled;
+ property TraceFlags: TDATraceOptions read FTraceFlags write SetTraceFlags;
+ property OnCallback: TDALogTraceEvent read FOnCallback write SetOnCallback;
+ end;
+
+ { TDAEADODriver }
+ TDAEADODriver = class(TDAEDriver, IDADriver40)
+ private
+ FConnectionList: TThreadList;
+ FMonitor: TDAADOMonitor;
+ protected
+ procedure DoSetTraceOptions(TraceActive: boolean; TraceFlags: TDATraceOptions; Callback: TDALogTraceEvent); override;
+ procedure RegisterConnection(AConnection: TADOConnection);
+ procedure UnregisterConnection(AConnection: TADOConnection);
+ protected
+ function GetConnectionClass: TDAEConnectionClass; override;
+ procedure CustomizeConnectionObject(aConnection: TDAEConnection); override;
+ // IDADriver
+ function GetDriverID: string; override;
+ function GetDescription: string; override;
+ procedure GetAuxDrivers(out List: IROStrings); override;
+ procedure GetAuxParams(const AuxDriver: string; out List: IROStrings); override;
+ function GetAvailableDriverOptions: TDAAvailableDriverOptions; override;
+ function GetProviderDefaultCustomParameters(Provider: string): string; safecall;
+ function GetDefaultConnectionType(const AuxDriver: string): string;override; safecall;
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ end;
+
+ { TDAEADOConnection }
+ TDAEADOConnection = class(TDAEConnection, IDAADOConnection, IDAConnectionModelling, IDACanQueryDatabaseNames,IDAFileBasedDatabase,IDAUseGenerators,IDAOracleConnection)
+ private
+ fProviderName: string;
+ fSchemaEnabled: Boolean;
+ fProviderType: TDAOleDBProviderType;
+ fADOConnection: TADOConnection;
+ fQuery_CursorType: TCursorType;
+ fQuery_CursorLocation: TCursorLocation;
+ fQuery_ADOLockType: TADOLockType;
+ procedure GetViewOrTableNames(const aType: string; const aSystemTables: boolean; List: IROStrings);
+ function CreateCompatibleQuery: IDADataset;
+
+ protected
+ function QueryInterface(const IID: TGUID; out Obj): HResult; override; stdcall;
+ function CreateCustomConnection: TCustomConnection; override;
+ function CreateMacroProcessor: TDASQLMacroProcessor; override;
+
+ function GetDatasetClass: TDAEDatasetClass; override;
+ function GetStoredProcedureClass: TDAEStoredProcedureClass; override;
+
+ procedure DoApplyConnectionString(aConnStrParser: TDAConnectionStringParser; aConnectionObject: TCustomConnection); override;
+
+ function DoBeginTransaction: integer; override;
+ procedure DoCommitTransaction; override;
+ procedure DoRollbackTransaction; override;
+ function DoGetInTransaction: boolean; override;
+
+ procedure DoGetTableNames(out List: IROStrings); override;
+ procedure DoGetTableFields(const aTableName: string; out Fields: TDAFieldCollection); override;
+
+ procedure DoGetViewNames(out List: IROStrings); override;
+ procedure DoGetStoredProcedureNames(out List: IROStrings); override;
+ procedure DoGetStoredProcedureParams(const aStoredProcedureName: string; out Params: TDAParamCollection); override;
+ procedure DoGetForeignKeys(out ForeignKeys: TDADriverForeignKeyCollection); override;
+
+ function DoGetLastAutoInc(const GeneratorName: string): integer; override;
+
+ function GetQuoteChars: TDAQuoteCharArray; override;
+ function isAlive: Boolean; override; safecall;
+
+ // IADOConnection
+ function GetProviderName: string; safecall;
+ function GetProviderType: TDAOleDBProviderType; safecall;
+ function GetCommandTimeout: Integer; safecall;
+ procedure SetCommandTimeout(const Value: Integer); safecall;
+
+ // IDAConnectionModelling
+ function BuildCreateTableSQL(aDataSet: TDADataSet; const aOverrideName: string = ''): string; safecall;
+ procedure CreateTable(aDataSet: TDADataSet; const aOverrideName: string = ''); safecall;
+ function FieldToDeclaration(aField: TDAField): string; safecall;
+
+ // IDACanQueryDatabaseNames
+ function GetDatabaseNames: IROStrings;
+ function GetSPSelectSyntax(HasArguments: Boolean): String; override; safecall;
+ // IDAFileBasedDatabase
+ function GetFileExtensions: IROStrings;
+ function IdentifierNeedsQuoting(const iIdentifier: string): boolean; override; safecall;
+ { IDAUseGenerators }
+ function GetNextAutoinc(const GeneratorName: string): integer; safecall;
+ public
+ constructor Create(aDriver: TDAEDriver; aName: string = ''); override;
+ destructor Destroy; override;
+ property SchemaEnabled: Boolean read fSchemaEnabled write fSchemaEnabled;
+ end;
+
+ { TDAEADOQuery }
+ TDAEADOQuery = class(TDAEDataset, IDAMustSetParams)
+ private
+
+ protected
+ procedure ClearParams; override;
+ function CreateDataset(aConnection: TDAEConnection): TDataset; override;
+
+ function DoExecute: integer; override;
+ function DoGetSQL: string; override;
+ procedure DoSetSQL(const Value: string); override;
+
+
+ // IDAMustSetParams
+ procedure SetParamValues(Params: TDAParamCollection); override;safecall;
+ procedure RefreshParams; override; safecall;
+ procedure GetParamValues(Params: TDAParamCollection); override;safecall;
+
+ public
+ end;
+
+ { TDAEADOStoredProcedure }
+ TDAEADOStoredProcedure = class(TDAEStoredProcedure, IDAMustSetParams)
+ protected
+ function CreateDataset(aConnection: TDAEConnection): TDataset; override;
+
+ procedure RefreshParams; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetStoredProcedureName: string; override;
+ procedure SetStoredProcedureName(const Name: string); override;
+ function DoExecute: integer; override;
+ function Execute: integer; override;
+
+ // IDAMustSetParams
+ procedure SetParamValues(Params: TDAParamCollection); override;safecall;
+ procedure GetParamValues(Params: TDAParamCollection); override;safecall;
+ end;
+
+procedure Register;
+
+function GetDriverObject: IDADriver; stdcall;
+
+implementation
+
+uses SysUtils, uDADriverManager, uDARes, Variants, ADOInt, uDAMacroProcessors,
+ Math, uDAHelpers, uROBinaryHelpers, uDAPostgresInterfaces;
+
+const
+ Default_CursorType = ctOpenForwardOnly;
+ Default_CursorLocation = clUseServer;
+ Default_ADOLockType = ltReadOnly;
+
+const
+ TConnectOptionStr: array[TConnectOption] of string = ('coConnectUnspecified', 'coAsyncConnect');
+ TCursorLocationStr: array[TCursorLocation] of string = ('clUseServer', 'clUseClient');
+ TCursorTypeStr: array[TCursorType] of string = ('ctUnspecified', 'ctOpenForwardOnly', 'ctKeyset', 'ctDynamic','ctStatic');
+ TEventStatusStr: array[TEventStatus] of string = ('esOK', 'esErrorsOccured', 'esCantDeny', 'esCancel', 'esUnwantedEvent');
+ TADOLockTypeStr: array[TADOLockType] of string = ('ltUnspecified', 'ltReadOnly', 'ltPessimistic', 'ltOptimistic', 'ltBatchOptimistic');
+ TCommandTypeStr: array[TCommandType] of string = ('cmdUnknown', 'cmdText', 'cmdTable', 'cmdStoredProc', 'cmdFile', 'cmdTableDirect');
+ TExecuteOptionStr: array[TExecuteOption] of string = ('eoAsyncExecute', 'eoAsyncFetch', 'eoAsyncFetchNonBlocking','eoExecuteNoRecords');
+
+var
+ _driver: TDAEDriver = nil;
+
+procedure Register;
+begin
+ RegisterComponents(DAPalettePageName, [TDAADODriver]);
+end;
+
+function GetDriverObject: IDADriver;
+begin
+ if (_driver = nil) then _driver := TDAEADODriver.Create(nil);
+ result := _driver;
+end;
+
+type
+ TDecimalVariant = packed record
+ VarType: TVarType;
+ scale: Byte;
+ sign: Byte;
+ Hi32: Cardinal;
+ Lo32: Cardinal;
+ Mid32: Cardinal;
+ Dummy: Cardinal;
+ end;
+
+function DecimalToInt64(const V: Variant): Int64;
+var
+ vData: TDecimalVariant absolute V;
+begin
+ if (vData.VarType = 14) and (vData.scale = 0) and (vData.Hi32 = 0) then begin
+ Result := Int64(vData.Lo32) or (Int64(vData.Mid32) shl 32);
+ if vData.sign <> 0 then result := -Result;
+ end else result := v;
+end;
+
+function Int64ToDecimal(Data: Int64): Variant;
+var
+ vd: TDecimalVariant absolute Result;
+begin
+ VarClear(Result);
+ vd.scale := 0;
+ if data < 0 then begin
+ vd.Sign := 128;
+ data := -data;
+ end else
+ vd.sign := 0;
+ vd.Hi32 := 0;
+ vd.Mid32 := int64(data shr 32);
+ vd.Lo32 := data;
+ vd.VarType := 14;
+end;
+
+
+{ TDAEADOConnection }
+
+procedure TDAEADOConnection.DoApplyConnectionString(aConnStrParser: TDAConnectionStringParser; aConnectionObject: TCustomConnection);
+var
+ lConnectionString: string;
+ i: Integer;
+ sName,sValue: string;
+begin
+ inherited;
+
+ with aConnStrParser do begin
+ lConnectionString := '';
+ if AuxDriver <> '' then lConnectionString := lConnectionString + 'Provider=' + AuxDriver + ';' else
+ raise EDADriverException.Create('No aux driver specified for ADO connection');
+
+ fProviderName := AuxDriver;
+ fProviderType := OleDBDriverIdToOleDBProviderType(fProviderName);
+
+ if (Self.UserID <> '') then
+ lConnectionString := lConnectionString + 'User ID=' + Self.UserID + ';'
+ else if (UserID <> '') then
+ lConnectionString := lConnectionString + 'User ID=' + UserID + ';';
+
+ if (Self.Password <> '') then
+ lConnectionString := lConnectionString + 'Password=' + Self.Password + ';'
+ else if (Password <> '') then
+ lConnectionString := lConnectionString + 'Password=' + Password + ';';
+
+ if fProviderType = oledb_Jet then begin
+ lConnectionString := lConnectionString + 'Data Source=' + Database+';';
+ end else begin
+ if Database <> '' then begin
+ if fProviderType = oledb_Postgresql then
+ lConnectionString := lConnectionString + 'Location=' + Database + ';'
+ else
+ lConnectionString := lConnectionString + 'Initial Catalog=' + Database + ';';
+ end;
+ if Server <> '' then lConnectionString := lConnectionString + 'Data Source=' + Server + ';';
+
+ if fProviderType <> oledb_Postgresql then
+ lConnectionString := lConnectionString + 'OLE DB SERVICES=-2;';
+ end;
+ fSchemaEnabled := false;
+ for i := 0 to AuxParamsCount -1 do
+ begin
+ sName := AuxParamNames[i];
+ if sName = '' then Continue;
+ sValue := AuxParams[AuxParamNames[i]];
+ if AnsiSameText('SCHEMAS',sName) then
+ fSchemaEnabled := sValue = '1'
+ else if AnsiSameText(sName, 'CursorLocation') then begin
+ if AnsiSameText('clUseServer',sValue) then
+ fQuery_CursorLocation:= clUseServer
+ else if AnsiSameText('clUseClient',sValue) then
+ fQuery_CursorLocation:= clUseClient;
+ end else if AnsiSameText(sName,'CursorType') then begin
+ if AnsiSameText('ctUnspecified',sValue) then
+ fQuery_CursorType:=ctUnspecified
+ else if AnsiSameText('ctOpenForwardOnly',sValue) then
+ fQuery_CursorType:=ctOpenForwardOnly
+ else if AnsiSameText('ctKeyset',sValue) then
+ fQuery_CursorType:=ctKeyset
+ else if AnsiSameText('ctDynamic',sValue) then
+ fQuery_CursorType:=ctDynamic
+ else if AnsiSameText('ctStatic',sValue) then
+ fQuery_CursorType:=ctStatic;
+ end else if AnsiSameText(sName, 'LockType') then begin
+ if AnsiSameText('ltUnspecified',sValue) then
+ fQuery_ADOLockType:= ltUnspecified
+ else if AnsiSameText('ltReadOnly',sValue) then
+ fQuery_ADOLockType:= ltReadOnly
+ else if AnsiSameText('ltPessimistic',sValue) then
+ fQuery_ADOLockType:= ltPessimistic
+ else if AnsiSameText('ltOptimistic',sValue) then
+ fQuery_ADOLockType:= ltOptimistic
+ else if AnsiSameText('ltBatchOptimistic',sValue) then
+ fQuery_ADOLockType:= ltBatchOptimistic;
+ end else begin
+ if sName[1] = '@' then sName:= Pchar(sName)+1;
+ lConnectionString := lConnectionString + sName + '=' + sValue +';';
+ end;
+ end;
+ fADOConnection.ConnectionString := lConnectionString;
+ end;
+ SchemaEnabled := fSchemaEnabled or ((UpperCase(GetProviderName) = 'SQLNCLI') or (UpperCase(GetProviderName) ='SQLNCLI.1'));
+ if fProviderType = oledb_Postgresql then fQuery_CursorLocation:=clUseClient; // ADOQuery can't process correctly "name" datatype of Postgres
+ if fProviderType = oledb_Oracle then fQuery_CursorLocation:=clUseClient; // Oracle don't work correctly without clUseClient
+end;
+
+function TDAEADOConnection.DoBeginTransaction: integer;
+begin
+ result := fADOConnection.BeginTrans
+end;
+
+procedure TDAEADOConnection.DoCommitTransaction;
+begin
+ fADOConnection.CommitTrans
+end;
+
+function TDAEADOConnection.CreateCustomConnection: TCustomConnection;
+begin
+ fSchemaEnabled := true;
+ fADOConnection := TADOConnection.Create(nil);
+ fADOConnection.LoginPrompt := FALSE;
+ if Assigned(fADOConnection) then TDAEADODriver(Driver).RegisterConnection(fADOConnection);
+ result := fADOConnection;
+end;
+
+function TDAEADOConnection.GetDatasetClass: TDAEDatasetClass;
+begin
+ result := TDAEADOQuery;
+end;
+
+function TDAEADOConnection.GetStoredProcedureClass: TDAEStoredProcedureClass;
+begin
+ result := TDAEADOStoredProcedure;
+end;
+
+procedure TDAEADOConnection.DoGetStoredProcedureNames(out List: IROStrings);
+var
+ Schema, NameField: TField;
+ DataSet: TADODataSet;
+ lName: string;
+ p: integer;
+begin
+ inherited;
+ case fProviderType of
+ oledb_MSSQL, oledb_MSSQL2005: MSSQL_DoGetNames(CreateCompatibleQuery,List,dotProcedure,SchemaEnabled);
+ oledb_Postgresql: Postgres_DoGetNames(CreateCompatibleQuery,List,dotProcedure);
+ oledb_Oracle: Oracle_DoGetNames(CreateCompatibleQuery,List,dotProcedure);
+ else
+ fADOConnection.Open();
+ DataSet := TADODataSet.Create(nil);
+ try
+ fADOConnection.OpenSchema(siProcedures, EmptyParam, EmptyParam, DataSet);
+ NameField := DataSet.FieldByName('PROCEDURE_NAME');
+ Schema := DataSet.Findfield('PROCEDURE_SCHEMA');
+ while not DataSet.EOF do begin
+ lName := NameField.AsString;
+ if (Schema <> nil) and (Schema.Value = 'sys') then begin dataset.Next; continue; end;
+ p := Pos(';', lName);
+ if p > 1 then begin
+ if P+1 >= length(lName) then begin
+ if lName[p+1] = '0' then // function
+ begin
+ Dataset.Next;
+ continue;
+ end;
+ end;
+ SetLength(lName, p-1);
+ end;
+ if fSchemaEnabled and (Schema <> nil) and not (VarIsNull(Schema.Value)) then
+ List.Add(Schema.AsString + '.' + lName)
+ else
+ List.Add(lName);
+ DataSet.Next;
+ end;
+ finally
+ DataSet.Free;
+ end;
+ end;
+end;
+
+function ADOTypeToFieldType(const ADOType: DataTypeEnum; EnableBCD: Boolean = False): TFieldType;
+begin
+ case ADOType of
+ adEmpty: Result := ftUnknown;
+ adTinyInt, adSmallInt: Result := ftSmallint;
+ adError, adInteger, adUnsignedInt: Result := ftInteger;
+ adBigInt, adUnsignedBigInt: Result := ftLargeInt;
+ adUnsignedTinyInt, adUnsignedSmallInt: Result := ftWord;
+ adSingle, adDouble: Result := ftFloat;
+ adCurrency: Result := ftCurrency;
+ adBoolean: Result := ftBoolean;
+ adDBDate: Result := ftDate;
+ adDBTime: Result := ftTime;
+ adDate, adDBTimeStamp, adFileTime, adDBFileTime: Result := ftDateTime;
+ adChar: Result := ftFixedChar;
+ adVarChar: Result := ftString;
+ adBSTR, adWChar, adVarWChar: Result := ftWideString;
+ adLongVarChar, adLongVarWChar: Result := ftMemo;
+ adLongVarBinary: Result := ftBlob;
+ adBinary: Result := ftBytes;
+ adVarBinary: Result := ftVarBytes;
+ adChapter: Result := ftDataSet;
+ adPropVariant, adVariant: Result := ftVariant;
+ adIUnknown: Result := ftInterface;
+ adIDispatch: Result := ftIDispatch;
+ adGUID: Result := ftGUID;
+ adDecimal, adNumeric, adVarNumeric:
+ if EnableBCD then
+ Result := ftBCD
+ else
+ Result := ftFloat;
+ else
+ Result := ftUnknown;
+ end;
+end;
+
+(*procedure TDAEADOConnection.DoGetStoredProcedureParams(const aStoredProcedureName: string; out Params: TDAParamCollection);
+var
+ DataSet: TADODataSet;
+begin
+ fADOConnection.Open();
+ DataSet := TADODataSet.Create(nil);
+ try
+ fADOConnection.OpenSchema(siProcedureParameters, VarArrayOf([Null, Null, aStoredProcedureName]), EmptyParam, DataSet);
+ //NameField := DataSet.FieldByName('PROCEDURE_NAME'); { do not localize }
+ Params := TDAParamCollection.Create(NIL);
+ while not DataSet.EOF do begin
+ with Params.Add() do begin
+ Name := DataSet.FieldByName('PARAMETER_NAME').AsString;
+ ParamType := TDAParamType(DataSet.FieldByName('PARAMETER_TYPE').AsInteger);
+ //DataType := TDADataType(DataSet.FieldByName('DATA_TYPE').AsInteger);
+ DataType := VCLTypeToDAType(ADOTypeToFieldType(DataSet.FieldByName('DATA_TYPE').AsInteger));
+ Size := DataSet.FieldByName('CHARACTER_MAXIMUM_LENGTH').AsInteger
+ //more info available:
+ //'PARAMETER_HASDEFAULT'
+ //'PARAMETER_DEFAULT'
+ //'IS_NULLABLE'
+ //'DATA_TYPE'
+ //'CHARACTER_MAXIMUM_LENGTH'
+ //'CHARACTER_OCTET_LENGTH'
+ //'DESCRIPTION'
+ //'TYPE_NAME'
+ //'LOCAL_TYPE_NAME'
+ end;
+ //List.Add(NameField.AsString);
+ DataSet.Next;
+ end;
+ finally
+ DataSet.Free;
+ end;
+end;*)
+
+procedure TDAEADOConnection.DoGetTableFields(const aTableName: string; out Fields: TDAFieldCollection);
+var
+ lField: TDAField;
+ //i: Integer;
+ DataSet: TADODataSet;
+begin
+ case fProviderType of
+ oledb_MSSQL, oledb_MSSQL2005: MSSQL_DoGetTableFields(QuoteIdentifierIfNeeded(aTableName),CreateCompatibleQuery,Fields);
+ oledb_Postgresql: Postgres_DoGetTableFields(QuoteIdentifierIfNeeded(aTableName),CreateCompatibleQuery,Fields);
+ oledb_Oracle: Oracle_DoGetTableFields(QuoteIdentifierIfNeeded(aTableName),CreateCompatibleQuery,Fields);
+ else
+ fADOConnection.Open();
+ DataSet := TADODataSet.Create(nil);
+ try
+ if (pos('.', aTableName) > 0) and (SchemaEnabled) then
+ fADOConnection.OpenSchema(siColumns, VarArrayOf([Unassigned, Copy(aTableName, 1, Pos('.', aTableName)-1), Copy(aTableName, Pos('.', aTableName)+1, MaxInt)]), EmptyParam, DataSet)
+ else
+ fADOConnection.OpenSchema(siColumns, VarArrayOf([Unassigned, Unassigned, aTableName]), EmptyParam, DataSet);
+ //NameField := DataSet.FieldByName('PROCEDURE_NAME'); { do not localize }
+ if DataSet.EOF then begin
+ inherited DoGetTableFields(QuoteIdentifierIfNeeded(aTableName), Fields);
+ exit ;
+ end;
+
+ Fields := TDAFieldCollection.Create(nil);
+
+ {for i := 0 to DataSet.FieldCount-1 do begin
+ DebugServer.Wre(DataSet.Fields[i].FieldName);
+ end; { for }
+
+ while not DataSet.EOF do begin
+ with Fields.Add() do begin
+ Name := DataSet.FieldByName('COLUMN_NAME').AsString;
+ DataType := VCLTypeToDAType(ADOTypeToFieldType(DataSet.FieldByName('DATA_TYPE').AsInteger));
+ Size := DataSet.FieldByName('CHARACTER_MAXIMUM_LENGTH').AsInteger;
+ Description := DataSet.FieldByName('DESCRIPTION').AsString;
+ // NotNull := DataSet.FieldByName('IS_NULLABLE').AsBoolean;
+ Required := not DataSet.FieldByName('IS_NULLABLE').AsBoolean;
+
+ { Hack: for Memo fields ADO seems to return datString, with a lenght of $7fffffff }
+ //if (DataType = datString) and (Size = $7FFFFFFF) then
+ if (DataType = datString) and (Size > $100000) then
+ DataType := datMemo;
+ if (DAtaType = datWideString) and (Size > $100000) then
+ DataType := datWideMemo;
+
+ if DataSet.FieldByName('COLUMN_HASDEFAULT').AsBoolean then
+ begin
+ DefaultValue := DataSet.FieldByName('COLUMN_DEFAULT').AsString;
+ if not TestDefaultValue(DefaultValue, DataType) then
+ DefaultValue := '';
+ end;
+
+ if ADOTypeToFieldType(DataSet.FieldByName('DATA_TYPE').AsInteger) = ftGUID then begin
+ Size := 38; { Quickhack, until we have proper GUID support in 3.0 }
+ if DefaultValue = 'newid()' then DefaultValue := Unassigned;
+ end;
+
+
+ //more info available:
+ //'COLUMN_HASDEFAULT'
+ //'COLUMN_DEFAULT'
+ //'IS_NULLABLE'
+ //'DATA_TYPE'
+ //'CHARACTER_MAXIMUM_LENGTH'
+ end;
+ //List.Add(NameField.AsString);
+ DataSet.Next;
+ end;
+
+ if (pos('.', aTableName) > 0) and (SchemaEnabled) then
+ fADOConnection.OpenSchema(siPrimaryKeys, VarArrayOf([Unassigned, Copy(aTableName, 1, Pos('.', aTableName)-1), Copy(aTableName, Pos('.', aTableName)+1, MaxInt)]), EmptyParam, DataSet)
+ else
+ fADOConnection.OpenSchema(siPrimaryKeys, VarArrayOf([Unassigned, Unassigned, aTableName]), EmptyParam, DataSet);
+ {for i := 0 to DataSet.FieldCount-1 do begin
+ DebugServer.Write(DataSet.Fields[i].FieldName);
+ end; { for }
+ while not DataSet.EOF do begin
+ lField := Fields.FieldByName(DataSet.FieldByName('COLUMN_NAME').AsString);
+ if Assigned(lField) then
+ lField.InPrimaryKey := true;
+
+ DataSet.Next();
+ end;
+ finally
+ DataSet.Free;
+ end;
+ end;
+end;
+
+procedure TDAEADOConnection.DoGetForeignKeys(out ForeignKeys: TDADriverForeignKeyCollection);
+var
+ //i: Integer;
+ DataSet: TADODataSet;
+ s: string;
+ PKSchema,FKSchema: TField;
+begin
+ inherited;
+ case fProviderType of
+ oledb_MSSQL, oledb_MSSQL2005: MSSQL_DoGetForeignKeys(CreateCompatibleQuery, ForeignKeys, SchemaEnabled);
+ oledb_Postgresql: Postgres_DoGetForeignKeys(CreateCompatibleQuery, ForeignKeys);
+ oledb_Oracle: Oracle_DoGetForeignKeys(CreateCompatibleQuery, ForeignKeys);
+ else
+ s := UpperCase(GetProviderName);
+ fADOConnection.Open();
+ DataSet := TADODataSet.Create(nil);
+ try
+ fADOConnection.OpenSchema(siForeignKeys, EmptyParam, EmptyParam, DataSet);
+ {for i := 0 to DataSet.FieldCount-1 do begin
+ DebugServer.Write(DataSet.Fields[i].FieldName);
+ end; { for }
+ PKSchema := DataSet.FindField('PK_TABLE_SCHEMA');
+ FKSchema := DataSet.FindField('FK_TABLE_SCHEMA');
+ while not DataSet.EOF do begin
+ {lField := Fields.FieldByName(DataSet.FieldByName('COLUMN_NAME').AsString);
+ if Assigned(lField) then
+ lField.InPrimaryKey := true;}
+ with ForeignKeys.Add() do begin
+ FKField := DataSet.FieldByName('FK_COLUMN_NAME').AsString;
+ PKField := DataSet.FieldByName('PK_COLUMN_NAME').AsString;
+ //FKTable := DataSet.FieldByName('FK_TABLE_NAME').AsString;
+ //PKTable := DataSet.FieldByName('PK_TABLE_NAME').AsString;
+ if fSchemaEnabled and (PKSchema <> nil) and not (VarIsNull(PKSchema.Value)) then
+ PKTable := PKSchema.AsString + '.' + DataSet.FieldByName('PK_TABLE_NAME').AsString
+ else
+ PKTable := DataSet.FieldByName('PK_TABLE_NAME').AsString;
+ if fSchemaEnabled and (FKSchema <> nil) and not (VarIsNull(FKSchema.Value)) then
+ FKTable := FKSchema.AsString + '.' + DataSet.FieldByName('FK_TABLE_NAME').AsString
+ else
+ FKTable := DataSet.FieldByName('FK_TABLE_NAME').AsString;
+
+ end;
+ {DebugServer.Write(DataSet.FieldByName('FK_TABLE_NAME').AsString+'.'+DataSet.FieldByName('FK_COLUMN_NAME').AsString+' => '+
+ DataSet.FieldByName('PK_COLUMN_NAME').AsString);}
+
+ DataSet.Next();
+ end;
+
+
+ finally
+ DataSet.Free;
+ end;
+ end;
+end;
+
+procedure TDAEADOConnection.GetViewOrTableNames(const aType: string; const aSystemTables: boolean; List: IROStrings);
+var
+ SchemaField,
+ TypeField,
+ NameField: TField;
+ TableType: string;
+ DataSet: TADODataSet;
+begin
+ fADOConnection.Open();
+
+ DataSet := TADODataSet.Create(nil);
+ try
+ fADOConnection.OpenSchema(siTables, EmptyParam, EmptyParam, DataSet);
+
+ TypeField := DataSet.FieldByName('TABLE_TYPE'); { do not localize }
+ NameField := DataSet.FieldByName('TABLE_NAME'); { do not localize }
+ SchemaField := DataSet.FindField('TABLE_SCHEMA');
+ while not DataSet.EOF do begin
+ TableType := TypeField.AsString;
+ if (TableType = aType) or ((aType = 'TABLE') and (TableType ='ACCESS TABLE')) or (aSystemTables and (TableType = 'SYSTEM TABLE')) then
+ begin
+ if fSchemaEnabled and (SchemaField <> nil) and not (VarIsNull(SchemaField.Value)) then
+ List.Add(SchemaField.AsString + '.' + NameField.AsString)
+ else
+ List.Add(NameField.AsString);
+ end;
+ DataSet.Next;
+ end;
+ finally
+ DataSet.Free;
+ end;
+end;
+
+procedure TDAEADOConnection.DoGetViewNames(out List: IROStrings);
+var
+ Schema,NameField: TField;
+ DataSet: TADODataSet;
+ lName: string;
+ p: integer;
+begin
+ inherited;
+ case fProviderType of
+ oledb_MSSQL, oledb_MSSQL2005: MSSQL_DoGetNames(CreateCompatibleQuery,List,dotView,SchemaEnabled);
+ oledb_Postgresql: Postgres_DoGetNames(CreateCompatibleQuery,List,dotView);
+ oledb_Oracle: Oracle_DoGetNames(CreateCompatibleQuery,List,dotView);
+ else
+ GetViewOrTableNames('VIEW', false, List);
+ fADOConnection.Open();
+ DataSet := TADODataSet.Create(nil);
+ try
+ fADOConnection.OpenSchema(siProcedures, EmptyParam, EmptyParam, DataSet);
+ NameField := DataSet.FieldByName('PROCEDURE_NAME'); { do not localize }
+ Schema := DataSet.Findfield('PROCEDURE_SCHEMA');
+ if List = nil then
+ List := NewROStrings();
+ while not DataSet.EOF do begin
+ lName := NameField.AsString;
+ if (Schema <> nil) and (Schema.Value = 'sys') then begin dataset.Next; continue; end;
+ p := Pos(';', lName);
+ if p > 1 then begin
+ if P+1 >= length(lName) then begin
+ if lName[p+1] = '1' then // procedure
+ begin
+ Dataset.Next;
+ continue;
+ end;
+ end;
+ SetLength(lName, p-1);
+ end;
+ if fSchemaEnabled and (Schema <> nil) and not (VarIsNull(Schema.Value)) then
+ List.Add(Schema.AsString + '.' + lName)
+ else
+ List.Add(lName);
+ DataSet.Next;
+ end;
+ finally
+ DataSet.Free;
+ end;
+ end;
+end;
+
+procedure TDAEADOConnection.DoGetTableNames(out List: IROStrings);
+begin
+ inherited;
+ case fProviderType of
+ oledb_MSSQL, oledb_MSSQL2005: MSSQL_DoGetNames(CreateCompatibleQuery,List,dotTable,SchemaEnabled);
+ oledb_Postgresql: Postgres_DoGetNames(CreateCompatibleQuery,List,dotTable);
+ oledb_Oracle: Oracle_DoGetNames(CreateCompatibleQuery,List,dotTable);
+ else
+ GetViewOrTableNames('TABLE', false, List);
+ end;
+end;
+
+procedure TDAEADOConnection.DoRollbackTransaction;
+begin
+ fADOConnection.RollbackTrans
+end;
+
+function TDAEADOConnection.GetQuoteChars: TDAQuoteCharArray;
+begin
+ case fProviderType of
+ oledb_Oracle: Result:= Oracle_GetQuoteChars;
+ else
+ result:=MSSQL_GetQuoteChars;
+ end;
+end;
+
+function TDAEADOConnection.DoGetInTransaction: boolean;
+begin
+ result := fADOConnection.InTransaction
+end;
+
+function TDAEADOConnection.DoGetLastAutoInc(
+ const GeneratorName: string): integer;
+var
+ ds: IDADataset;
+begin
+ case fProviderType of
+ oledb_MSSQL, oledb_MSSQL2005: begin
+ Result := MSSQL_DoGetLastAutoInc(GeneratorName,CreateCompatibleQuery);
+ end;
+ oledb_Jet: begin
+ ds := NewDataset('SELECT @@Identity', ''); // Returns 0 by default
+ ds.Open;
+ result := ds.Fields[0].Value;
+ end;
+ oledb_Postgresql: Result := Postgres_DoGetLastAutoInc(GeneratorName,CreateCompatibleQuery);
+ oledb_Oracle: Result := Oracle_DoGetLastAutoInc(GeneratorName,CreateCompatibleQuery);
+ else
+ result := inherited DoGetLastAutoInc(GeneratorName);
+ end;
+end;
+
+function TDAEADOConnection.GetProviderName: string;
+begin
+ result := fProviderName;
+end;
+
+function TDAEADOConnection.GetProviderType: TDAOleDBProviderType;
+begin
+ result := fProviderType;
+end;
+
+function TDAEADOConnection.CreateMacroProcessor: TDASQLMacroProcessor;
+begin
+ case fProviderType of
+ oledb_MSSQL, oledb_MSSQL2005: Result := MSSQL_CreateMacroProcessor;
+ oledb_Jet: result := MSSQL_CreateMacroProcessor;
+ oledb_Oracle: Result := Oracle_CreateMacroProcessor;
+ else
+ Result:= inherited CreateMacroProcessor;
+ end;
+end;
+
+procedure TDAEADOConnection.CreateTable(aDataSet: TDADataSet; const aOverrideName: string);
+var
+ lSQL: string;
+begin
+ lSQL := BuildCreateTableSQL(aDataSet, aOverrideName);
+ with NewCommand(lSQL, stSQL) do begin
+ Execute();
+ end; { with }
+end;
+
+function TDAEADOConnection.BuildCreateTableSQL(aDataSet: TDADataSet; const aOverrideName: string): string;
+var
+ lName: string;
+begin
+ lName := aOverrideName;
+ if lName = '' then lName := aDataSet.Name;
+ result := uDAHelpers.BuildCreateStatementForTable(aDataSet, lName, self);
+end;
+
+function TDAEADOConnection.FieldToDeclaration(aField: TDAField): string;
+begin
+ case aField.DataType of
+ datUnknown: result := 'unknown';
+ datString: result := Format('varchar(%d)', [aField.Size]);
+ datDateTime: result := 'datetime';
+ datFloat: result := 'float';
+ datCurrency: result := 'money';
+ datAutoInc: result := 'int IDENTITY(1,1)';
+ datInteger: result := 'int';
+ datLargeInt: result := 'largeint';
+ datBoolean: result := 'bit';
+ datMemo: result := 'text';
+ datBlob: result := 'image';
+ //datGuid:result := 'uniqueidentifier';
+ end; { case }
+end;
+
+function TDAEADOConnection.GetDatabaseNames: IROStrings;
+begin
+ case fProviderType of
+ oledb_Jet: Result := NewROStrings;
+ oledb_Postgresql: Result:= Postgres_GetDatabaseNames(Self);
+ else
+ Result := MSSQL_GetDatabaseNames(Self);
+ end;
+end;
+
+function TDAEADOConnection.GetSPSelectSyntax(
+ HasArguments: Boolean): String;
+begin
+ case fProviderType of
+ oledb_MSSQL, oledb_MSSQL2005: Result := MSSQL_GetSPSelectSyntax(HasArguments);
+ oledb_Oracle: Result := Oracle_GetSPSelectSyntax(HasArguments);
+ oledb_Postgresql: Result:= Postgres_GetSPSelectSyntax(HasArguments);
+ else
+ Result := inherited GetSPSelectSyntax(HasArguments);
+ end;
+end;
+
+function TDAEADOConnection.GetCommandTimeout: Integer;
+begin
+ if fADOConnection <> nil then
+ Result:= fADOConnection.CommandTimeout
+ else
+ Result:=0;
+end;
+
+procedure TDAEADOConnection.SetCommandTimeout(const Value: Integer);
+begin
+ if fADOConnection <> nil then
+ fADOConnection.CommandTimeout:= Value;
+end;
+
+function TDAEADOConnection.IdentifierNeedsQuoting(
+ const iIdentifier: string): boolean;
+begin
+ Result := inherited IdentifierNeedsQuoting(iIdentifier);
+ if not Result then
+ case fProviderType of
+ oledb_Oracle: Result:= Oracle_IdentifierNeedsQuoting(iIdentifier);
+ oledb_Postgresql: Result:= Postgres_IdentifierNeedsQuoting(iIdentifier);
+ else
+ Result:= MSSQL_IdentifierNeedsQuoting(iIdentifier);
+ end;
+end;
+
+function TDAEADOConnection.GetFileExtensions: IROStrings;
+begin
+ case fProviderType of
+ oledb_Jet: Result:=MSACCESS_GetFileExtensions;
+ else
+ result := NewROStrings;
+ end;
+end;
+
+function TDAEADOConnection.QueryInterface(const IID: TGUID;
+ out Obj): HResult;
+begin
+ Result := E_NOINTERFACE;
+ if IsEqualGUID(IID, IDAFileBasedDatabase) then begin
+ if not (fProviderType in [oledb_Jet]) then Exit;
+ end
+ else if IsEqualGUID(IID, IDACanQueryDatabaseNames) then begin
+ if (fProviderType in [oledb_Jet]) then Exit;
+ end
+ else if IsEqualGUID(IID, IDAUseGenerators) then begin
+ if not (fProviderType in [oledb_Oracle, oledb_Postgresql]) then Exit;
+ end
+ else if IsEqualGUID(IID, IDAOracleConnection) then begin
+ if (fProviderType <> oledb_Oracle) then Exit;
+ end;
+
+ Result := inherited QueryInterface(IID, Obj);
+end;
+
+function TDAEADOConnection.isAlive: Boolean;
+begin
+ Result:=(ConnectionObject <> nil) and not (stClosed in fADOConnection.State);
+end;
+
+constructor TDAEADOConnection.Create(aDriver: TDAEDriver; aName: string);
+begin
+ inherited Create(aDriver, aName);
+ fQuery_CursorType := Default_CursorType;
+ fQuery_CursorLocation := Default_CursorLocation;
+ fQuery_ADOLockType := Default_ADOLockType;
+end;
+
+function TDAEADOConnection.GetNextAutoinc(const GeneratorName: string): integer;
+begin
+ case fProviderType of
+ oledb_Oracle: Result:=Oracle_GetNextAutoinc(GeneratorName,CreateCompatibleQuery);
+ oledb_Postgresql: Result := Postgres_GetNextAutoInc(GeneratorName,CreateCompatibleQuery);
+ else
+ Result:=-1;
+ end;
+end;
+
+function TDAEADOConnection.CreateCompatibleQuery: IDADataset;
+begin
+ Result := GetDatasetClass.Create(Self);
+ TADOQuery(Result.Dataset).CursorLocation:=clUseClient;
+end;
+
+procedure TDAEADOConnection.DoGetStoredProcedureParams(
+ const aStoredProcedureName: string; out Params: TDAParamCollection);
+begin
+ case fProviderType of
+ oledb_Postgresql: Postgres_DoGetStoredProcedureParams(aStoredProcedureName, CreateCompatibleQuery, Params);
+ oledb_Oracle: Oracle_DoGetStoredProcedureParams(aStoredProcedureName, CreateCompatibleQuery, Params);
+ else
+ inherited;
+ end;
+end;
+
+destructor TDAEADOConnection.Destroy;
+begin
+ if Assigned(fADOConnection) then TDAEADODriver(Driver).UnregisterConnection(fADOConnection);
+ inherited;
+end;
+
+{ TDAEADODriver }
+
+function TDAEADODriver.GetAvailableDriverOptions: TDAAvailableDriverOptions;
+begin
+ result := [doAuxDriver, doServerName, doDatabaseName, doLogin, doCustom];
+end;
+
+function TDAEADODriver.GetConnectionClass: TDAEConnectionClass;
+begin
+ result := TDAEADOConnection;
+end;
+
+function TDAEADODriver.GetDefaultConnectionType(
+ const AuxDriver: string): string;
+begin
+ case OleDBDriverIdToOleDBProviderType(AuxDriver) of
+ oledb_MSSQL,
+ oledb_MSSQL2005 :Result:=MSSQL_DriverType;
+ oledb_Jet: Result := Access_DriverType;
+ oledb_Oracle: Result := Oracle_DriverType;
+ oledb_ODBC: Result := ODBC_DriverType;
+ oledb_Postgresql : Result := PostgreSQL_DriverType;
+ oleDb_VisualFoxPro: Result := FoxPro_DriverType;
+ else
+ Result:= inherited GetDefaultConnectionType(AuxDriver);
+ end;
+end;
+
+function TDAEADODriver.GetDescription: string;
+begin
+ result := 'Borland ADOExpress Driver';
+end;
+
+function TDAEADODriver.GetDriverID: string;
+begin
+ result := 'ADO';
+end;
+
+procedure TDAEADODriver.GetAuxDrivers(out List: IROStrings);
+var
+ i: TDAOleDBProviderType;
+begin
+ inherited;
+ for i := Low(TDAOleDBProviderType) to High(TDAOleDBProviderType) do
+ if (i <> oledb_Unknown) {// Redundant but safe if I change the enum later...} then List.Add(OleDBProviders[i]);
+end;
+
+function TDAEADODriver.GetProviderDefaultCustomParameters(
+ Provider: string): string;
+begin
+ if Sametext(Trim(Provider), oledb_MSSQL2005id) then Result := 'Schemas=1;Integrated Security=SSPI;' else
+ if SameText(Trim(Provider), oledb_MSSQLId) then Result := 'Integrated Security=SSPI;';
+end;
+
+procedure TDAEADODriver.GetAuxParams(const AuxDriver: string;
+ out List: IROStrings);
+begin
+ inherited;
+ if Sametext(Trim(AuxDriver), oledb_MSSQL2005id) or SameText(Trim(AuxDriver), oledb_MSSQLId) then
+ MSSQL_GetAuxParams(List);
+ List.Add('CursorLocation=(clUseServer,clUseClient)');
+ List.Add('CursorType=(ctUnspecified,ctOpenForwardOnly,ctKeyset,ctDynamic,ctStatic)');
+ List.Add('LockType=(ltUnspecified,ltReadOnly,ltPessimistic,ltOptimistic,ltBatchOptimistic)');
+ List.Add('');
+ List.Add('You can pass any parameters directly to driver. Use the prefix ''@'' for this, e.g.:');
+ List.Add('CursorLocation=clUseServer;@Mode=Read');
+end;
+
+procedure TDAEADODriver.CustomizeConnectionObject(
+ aConnection: TDAEConnection);
+begin
+ inherited;
+ if Assigned(FMonitor) then fMonitor.AssignEvents(TDAEADOConnection(aConnection).fADOConnection);
+end;
+
+constructor TDAEADODriver.Create(AOwner: TComponent);
+begin
+ FConnectionList:= TThreadList.Create;
+ inherited;
+end;
+
+destructor TDAEADODriver.Destroy;
+begin
+ inherited;
+ FConnectionList.Free;
+end;
+
+procedure TDAEADODriver.DoSetTraceOptions(TraceActive: boolean;
+ TraceFlags: TDATraceOptions; Callback: TDALogTraceEvent);
+begin
+ inherited;
+ if TraceActive then begin
+ if (FMonitor = nil) then fMonitor := TDAADOMonitor.Create(Self);
+ fMonitor.Enabled := FALSE;
+ fMonitor.TraceFlags := TraceFlags;
+ FMonitor.OnCallback := Callback;
+ fMonitor.Enabled := TRUE;
+ end
+ else begin
+ if (FMonitor <> nil) then begin
+ fMonitor.Enabled:=False;
+ FreeAndNIL(fMonitor);
+ end;
+ end;
+end;
+
+procedure TDAEADODriver.RegisterConnection(AConnection: TADOConnection);
+begin
+ FConnectionList.Add(AConnection);
+ if FMonitor <> nil then FMonitor.AssignEvents(AConnection);
+end;
+
+procedure TDAEADODriver.UnregisterConnection(AConnection: TADOConnection);
+begin
+ FConnectionList.Remove(AConnection);
+ if FMonitor <> nil then FMonitor.UnAssignEvents(AConnection);
+end;
+
+{ TDAEADOQuery }
+
+procedure TDAEADOQuery.ClearParams;
+begin
+ inherited;
+ TADOQuery(Dataset).Parameters.Clear;
+end;
+
+function TDAEADOQuery.CreateDataset(aConnection: TDAEConnection): TDataset;
+begin
+ result := TADOQuery.Create(nil);
+
+ TADOQuery(result).LockType := TDAEADOConnection(aConnection).fQuery_ADOLockType;// ltReadOnly;
+ TADOQuery(result).CursorLocation :=TDAEADOConnection(aConnection).fQuery_CursorLocation; // clUseClient;
+ TADOQuery(result).CursorType := TDAEADOConnection(aConnection).fQuery_CursorType; //ctOpenForwardOnly;
+ TADOQuery(result).Connection := TDAEADOConnection(aConnection).fADOConnection;
+ TADOQuery(result).EnableBCD := False;
+ TADOQuery(result).CacheSize := 25;
+// TADOQuery(result).Prepared := TRUE;
+ if TADOQuery(result).Connection <> nil then
+ TADOQuery(result).CommandTimeout := TADOQuery(result).Connection.CommandTimeout;
+end;
+
+function TDAEADOQuery.DoExecute: integer;
+begin
+ result := TADOQuery(Dataset).ExecSQL;
+ if TADOQuery(Dataset).Connection.Errors.Count>0 then
+ raise Exception.Create(TADOQuery(Dataset).Connection.Errors.Item[0].Description);
+end;
+
+function TDAEADOQuery.DoGetSQL: string;
+begin
+ result := TADOQuery(Dataset).SQL.Text;
+end;
+
+procedure TDAEADOQuery.DoSetSQL(const Value: string);
+begin
+ TADOQuery(Dataset).SQL.Text := Value;
+end;
+
+procedure TDAEADOQuery.GetParamValues(Params: TDAParamCollection);
+var
+ i: integer;
+ par: TDAParam;
+ inpar: TParameter;
+ ds: TADOQuery;
+begin
+ ds := TADOQuery(Dataset);
+ if not Assigned(ds.Parameters) then
+ Exit;
+
+ for i := 0 to (ds.Parameters.Count - 1) do begin
+ inpar := ds.Parameters[i];
+
+ par := Params.ParamByName(inpar.Name);
+ if par.ParamType in [daptOutput, daptInputOutput, daptResult] then begin
+ if inpar.DataType = ftLargeint then
+ par.Value := DecimalToInt64(inpar.Value)
+ else
+ par.Value := inpar.Value;
+ end;
+ end;
+end;
+
+procedure TDAEADOQuery.RefreshParams;
+var
+ i: Integer;
+ par: TDAParam;
+ outpar: TParameter;
+ ds: TADOQuery;
+begin
+ inherited;
+ ds := TADOQuery(Dataset);
+ if not Assigned(ds.Parameters) then
+ Exit;
+ for i := 0 to ds.Parameters.Count -1 do begin
+ outpar := ds.Parameters[i];
+
+ par := self.ParamByName(outpar.Name);
+
+ if outpar.DataType <> ftUnknown then begin
+ par.DataType := VCLTypeToDAType(outpar.DataType);
+ par.Size := outpar.Size;
+ par.DecimalPrecision := outpar.Precision;
+ par.DecimalScale := outpar.NumericScale;
+ case outpar.Direction of
+ pdInput: par.ParamType := daptInput;
+ pdOutput: par.ParamType := daptOutput;
+ pdInputOutput: par.ParamType := daptInputOutput;
+ pdReturnValue: par.ParamType := daptResult;
+ end;
+ end;
+ end;
+end;
+
+procedure TDAEADOQuery.SetParamValues(Params: TDAParamCollection);
+var
+ i: integer;
+ par: TDAParam;
+ outpar: TParameter;
+ ds: TADOQuery;
+ ft: TFieldType;
+begin
+ ds := TADOQuery(Dataset);
+ if not Assigned(ds.Parameters) then
+ Exit;
+
+ for i := 0 to (ds.Parameters.Count - 1) do begin
+ outpar := ds.Parameters[i];
+
+ par := Params.ParamByName(outpar.Name);
+ ft := DATypeToVCLType(par.DataType);
+ case par.ParamType of
+ daptInput: outpar.Direction := pdInput;
+ daptOutput: outpar.Direction := pdOutput;
+ daptInputOutput: outpar.Direction := pdInputOutput;
+ daptResult: outpar.Direction := pdReturnValue;
+ end;
+
+ if par.DataType = datBlob then begin
+ outpar.DataType := ftBlob;
+ if not (par.ParamType in [daptOutput, daptResult]) then begin
+ if VarIsEmpty(par.Value) or VarIsNull(par.Value)
+ then outpar.Value := NULL
+ else outpar.Value := VariantBinaryToString(par.Value);
+ end;
+ end
+ else begin
+ if (outpar.DataType <> ft) and (ft <> ftUnknown) then
+ outpar.DataType := ft;
+ if not (par.ParamType in [daptOutput, daptResult]) then begin
+ if outpar.DataType = ftLargeint then
+ Outpar.Value := Int64ToDecimal(par.Value)
+ else
+ outpar.Value := par.Value;
+ end;
+ end;
+ if (VarIsEmpty(par.Value) or VarIsNull(par.Value)) and
+ (par.DataType <> datUnknown) then begin
+ if (outpar.DataType <> ft) and (ft <> ftUnknown) then
+ outpar.DataType := ft;
+ end;
+ end;
+end;
+
+{ TDAEADOStoredProcedure }
+
+function TDAEADOStoredProcedure.CreateDataset(aConnection: TDAEConnection): TDataset;
+begin
+ result := TADOStoredProc.Create(nil);
+ TADOStoredProc(result).Connection := TDAEADOConnection(aConnection).fADOConnection;
+ if TADOStoredProc(result).Connection <> nil then
+ TADOStoredProc(result).CommandTimeout := TADOStoredProc(result).Connection.CommandTimeout;
+end;
+
+procedure TDAEADOStoredProcedure.SetParamValues(Params: TDAParamCollection);
+var
+ i: integer;
+ par: TDAParam;
+ outpar: TParameter;
+ ds: TADOStoredProc;
+ ft: TFieldType;
+begin
+ ds := TADOStoredProc(Dataset);
+ if not Assigned(ds.Parameters) then
+ Exit;
+
+ for i := 0 to (ds.Parameters.Count - 1) do begin
+ outpar := ds.Parameters[i];
+
+ par := Params.ParamByName(outpar.Name);
+ ft := DATypeToVCLType(par.DataType);
+ case par.ParamType of
+ daptInput: outpar.Direction := pdInput;
+ daptOutput: outpar.Direction := pdOutput;
+ daptInputOutput: outpar.Direction := pdInputOutput;
+ daptResult: outpar.Direction := pdReturnValue;
+ end;
+
+ if par.DataType = datBlob then begin
+ outpar.DataType := ftBlob;
+ if not (par.ParamType in [daptOutput, daptResult]) then begin
+ if VarIsEmpty(par.Value) or VarIsNull(par.Value)
+ then outpar.Value := NULL
+ else outpar.Value := VariantBinaryToString(par.Value);
+ end;
+ end
+ else begin
+ if (outpar.DataType <> ft) and (ft <> ftUnknown) then
+ outpar.DataType := ft;
+ if not (par.ParamType in [daptOutput, daptResult]) then begin
+ if outpar.DataType = ftLargeint then
+ Outpar.Value := Int64ToDecimal(par.Value)
+ else
+ outpar.Value := par.Value;
+ end;
+ end;
+ if (VarIsEmpty(par.Value) or VarIsNull(par.Value)) and
+ (par.DataType <> datUnknown) then begin
+ if (outpar.DataType <> ft) and (ft <> ftUnknown) then
+ outpar.DataType := ft;
+ end;
+ end;
+end;
+
+procedure TDAEADOStoredProcedure.GetParamValues(Params: TDAParamCollection);
+var
+ i: integer;
+ par: TDAParam;
+ inpar: TParameter;
+ ds: TADOQuery;
+begin
+ ds := TADOQuery(Dataset);
+ if not Assigned(ds.Parameters) then
+ Exit;
+
+ for i := 0 to (ds.Parameters.Count - 1) do begin
+ inpar := ds.Parameters[i];
+
+ par := Params.ParamByName(inpar.Name);
+ if par.ParamType in [daptOutput, daptInputOutput, daptResult] then begin
+ if inpar.DataType = ftLargeint then
+ par.Value := DecimalToInt64(inpar.Value)
+ else
+ par.Value := inpar.Value;
+ end;
+ end;
+end;
+
+
+type
+ TADOStoredProcHack = class(TADOStoredProc);
+
+function TDAEADOStoredProcedure.Execute: integer;
+var
+ i: integer;
+ pstr: string;
+ params: TDAParamCollection;
+ ds: TADOStoredProc;
+ lParam: TParameter;
+begin
+ params := GetParams;
+ if (Connection as TDAEADOConnection).fProviderType = oledb_Oracle then pstr := '' else pstr := '@';
+
+ ds := TADOStoredProc(Dataset);
+
+ for i := ds.Parameters.Count -1 downto 0 do
+ begin
+ if (ds.Parameters[i].DataType = ftInterface) and (ds.Parameters[i].Direction in [pdOutput, pdInputOutput, pdReturnValue]) then
+ ds.Parameters.Delete(i);
+ end;
+
+ if (ds.Parameters.Count<>Params.Count) then begin
+ ds.Parameters.Refresh;
+ end;
+
+ {for i := 0 to (Parameters.Count - 1) do
+ if (Parameters[i].Direction in [pdInput, pdInputOutput])
+ then Parameters.ParamByName('@'+params[i].Name) [i].Value := params[i].Value;}
+
+ for i := 0 to (params.Count-1) do
+ begin
+ lParam:= ds.Parameters.ParamByName(pstr+params[i].Name);
+ if (params[i].ParamType = daptOutput) and (lParam.Direction <> pdOutput) then
+ lParam.Direction := pdOutput // ado sometimes doesn't set the direction properly
+ else if (params[i].ParamType in [daptInput, daptInputOutput]) then
+ lParam.Value := params[i].Value;
+ end;
+
+ Result := DoExecute;
+
+ {TADOStoredProcHack(Dataset).InitializeMasterFields(Self);
+ Command.Execute;}
+
+ {for i := 0 to (Parameters.Count - 1) do
+ if (Parameters[i].Direction in [pdOutput, pdInputOutput, pdReturnValue])
+ then params[i].Value := Parameters[i].Value;}
+
+ for i := 0 to (params.Count-1) do
+ if (params[i].ParamType in [daptOutput, daptInputOutput, daptResult])
+ then params[i].Value := ds.Parameters.ParamByName(pstr+params[i].Name).Value;
+end;
+
+function TDAEADOStoredProcedure.GetStoredProcedureName: string;
+begin
+ result := TADOStoredProc(Dataset).ProcedureName;
+end;
+
+procedure TDAEADOStoredProcedure.SetStoredProcedureName(
+ const Name: string);
+begin
+ TADOStoredProc(Dataset).ProcedureName := Name;
+end;
+
+procedure TDAEADOStoredProcedure.RefreshParams;
+var
+ dsparams: TParameters;
+ dPar: TParameter;
+ i: integer;
+ par: TDAParam;
+ params: TDAParamCollection;
+ nme: string;
+begin
+ dsparams := TADOStoredProc(Dataset).Parameters;
+
+ dsparams.Refresh;
+ params := GetParams;
+ params.Clear;
+
+ for i := 0 to (dsparams.Count - 1) do begin
+ par := params.Add;
+ dPar:=dsparams[i];
+ nme := dPar.Name;
+ if Pos('@', nme) > 0 then
+ System.Delete(nme, Pos('@', nme), 1);
+ par.Name := nme;
+
+ if (dPar.DataType = ftInterface) then
+ par.DataType := datUnknown
+ else
+ par.DataType := VCLTypeToDAType(dPar.DataType);
+ par.ParamType := TDAParamType(dPar.Direction);
+ par.Size := dPar.Size;
+ end;
+end;
+
+exports
+ GetDriverObject name func_GetDriverObject;
+
+
+function TDAEADOStoredProcedure.DoExecute: integer;
+begin
+ TADOStoredProcHack(TADOStoredProc(Dataset)).Command.Execute(result, EmptyParam);
+
+ if TADOStoredProc(Dataset).Connection.Errors.Count >0 then
+ raise Exception.Create(TADOStoredProc(Dataset).Connection.Errors.Item[0].Description);
+end;
+
+{ TDAADOMonitor }
+
+function ParseError(const AError: Error):string;
+begin
+ if aError = nil then begin
+ Result:=''
+ end
+ else begin
+ Result:=
+ 'Error.Number: ' + IntToStr(AError.Number) + sLineBreak +
+ 'Error.NativeError: ' + IntToStr(AError.NativeError) + sLineBreak +
+ 'Error.Source: ' + AError.Source+sLineBreak +
+ 'Error.Description: ' + AError.Description + sLineBreak +
+ 'Error.SQLState: ' + AError.SQLState + sLineBreak;
+ end;
+end;
+
+function ParseCommand(Const Command: _Command): string;
+var
+ i: integer;
+ {$IFDEF ADOMONITOR_SHOWPARAMVALUES}
+ v: Variant;
+ {$ENDIF}
+ lItem: _Parameter;
+ s: String;
+begin
+ if Command = nil then begin
+ Result:=sLineBreak;
+ end
+ else begin
+ s:= PWideChar(Command.CommandText);
+ Result:=
+ 'Command.CommandText: ' + StringReplace(s, sLineBreak,' ',[rfReplaceAll]) + sLineBreak +
+ 'Command.Parameters.Count: ' + IntToStr(Command.Parameters.Count) + sLineBreak;
+ for i:= 0 to Command.Parameters.Count-1 do begin
+ lItem:=Command.Parameters.Item[i];
+ Result := Result + 'Command.Parameters['+intToStr(i)+ ']: '+ lItem.Name;
+ {$IFDEF ADOMONITOR_SHOWPARAMVALUES}
+ Result:= Result + ' = ';
+ v:=lItem.Value;
+ if VarIsNull(v) then Result := Result+ ''
+ else if VarIsEmpty(v) then Result := Result+ ''
+ else if lItem.Type_ in [adBinary, adVarBinary, adLongVarBinary, adLongVarChar] then Result:= Result + ''
+ else Result:= Result + VarToStr(v);
+ {$ENDIF}
+ Result:=Result+sLineBreak;
+ end;
+ Result:=Result+sLineBreak;
+ end;
+end;
+
+function ParseEventStatus(const EventStatus: TEventStatus): string;
+begin
+ Result := 'EventStatus: ' + TEventStatusStr[EventStatus]+sLineBreak;
+end;
+
+procedure TDAADOMonitor.ADOConnectionBeginTransComplete(
+ Connection: TADOConnection; TransactionLevel: Integer;
+ const Error: Error; var EventStatus: TEventStatus);
+begin
+ if Assigned(FOnCallback) then FOnCallback(Self,
+ 'Begin transaction'+sLineBreak+
+ '-----------------'+sLineBreak+
+ 'TransactionLevel: ' +IntToStr(TransactionLevel)+sLineBreak+
+ ParseError(Error)+
+ ParseEventStatus(EventStatus),
+ 0);
+end;
+
+procedure TDAADOMonitor.ADOConnectionCommitTransComplete(
+ Connection: TADOConnection; const Error: Error;
+ var EventStatus: TEventStatus);
+begin
+ if Assigned(FOnCallback) then FOnCallback(Self,
+ 'Commit transaction'+sLineBreak+
+ '------------------'+sLineBreak+
+ ParseError(Error)+
+ ParseEventStatus(EventStatus),
+ 0);
+end;
+
+procedure TDAADOMonitor.ADOConnectionConnectComplete(
+ Connection: TADOConnection; const Error: Error;
+ var EventStatus: TEventStatus);
+begin
+ if Assigned(FOnCallback) then FOnCallback(Self,
+ 'Connect'+sLineBreak+
+ '-------'+sLineBreak+
+ ParseError(Error)+
+ ParseEventStatus(EventStatus),
+ 0);
+end;
+
+procedure TDAADOMonitor.ADOConnectionDisconnect(Connection: TADOConnection;
+ var EventStatus: TEventStatus);
+begin
+ if Assigned(FOnCallback) then FOnCallback(Self,
+ 'Disconnect'+sLineBreak+
+ '----------'+sLineBreak+
+ ParseEventStatus(EventStatus),
+ 0);
+end;
+
+procedure TDAADOMonitor.ADOConnectionExecuteComplete(
+ Connection: TADOConnection; RecordsAffected: Integer; const Error: Error;
+ var EventStatus: TEventStatus; const Command: _Command;
+ const Recordset: _Recordset);
+begin
+ if Assigned(FOnCallback) then FOnCallback(Self,
+ 'Execute'+sLineBreak+
+ '-------'+sLineBreak+
+ 'RecordsAffected: ' +IntToStr(RecordsAffected)+sLineBreak+
+ ParseError(Error)+
+ ParseEventStatus(EventStatus)+
+ ParseCommand(Command),
+ 0);
+end;
+
+procedure TDAADOMonitor.ADOConnectionInfoMessage(
+ Connection: TADOConnection; const Error: Error;
+ var EventStatus: TEventStatus);
+begin
+ if Assigned(FOnCallback) then FOnCallback(Self,
+ 'Info message'+sLineBreak+
+ '------------'+sLineBreak+
+ ParseError(Error)+
+ ParseEventStatus(EventStatus),
+ 0);
+end;
+
+procedure TDAADOMonitor.ADOConnectionRollbackTransComplete(
+ Connection: TADOConnection; const Error: Error;
+ var EventStatus: TEventStatus);
+begin
+ if Assigned(FOnCallback) then FOnCallback(Self,
+ 'Rollback transaction'+sLineBreak+
+ '-------------------'+sLineBreak+
+ ParseError(Error)+
+ ParseEventStatus(EventStatus),
+ 0);
+end;
+
+procedure TDAADOMonitor.ADOConnectionWillConnect(
+ Connection: TADOConnection; var ConnectionString, UserID,
+ Password: WideString; var ConnectOptions: TConnectOption;
+ var EventStatus: TEventStatus);
+begin
+ if Assigned(FOnCallback) then FOnCallback(Self,
+ 'Will connect'+sLineBreak+
+ '------------'+sLineBreak+
+ 'Connection string: ' + ConnectionString +sLineBreak+
+ 'UserID: ' + UserID +sLineBreak+
+ 'Password: ' + Password +sLineBreak+
+ 'ConnectOptions: ' + TConnectOptionStr[ConnectOptions]+sLineBreak+
+ ParseEventStatus(EventStatus),
+ 0);
+end;
+
+function getExecuteOptionStr(const ExecuteOptions: TExecuteOptions): string;
+var
+ i: TExecuteOption;
+begin
+ Result:='';
+ for i:= low(TExecuteOption) to High(TExecuteOption) do
+ if i in ExecuteOptions then Result:= Result + TExecuteOptionStr[i]+',';
+ if Length(Result) > 0 then SetLength(Result, Length(Result)-1);
+end;
+
+procedure TDAADOMonitor.ADOConnectionWillExecute(
+ Connection: TADOConnection; var CommandText: WideString;
+ var CursorType: TCursorType; var LockType: TADOLockType;
+ var CommandType: TCommandType; var ExecuteOptions: TExecuteOptions;
+ var EventStatus: TEventStatus; const Command: _Command;
+ const Recordset: _Recordset);
+begin
+ if Assigned(FOnCallback) then FOnCallback(Self,
+ 'Will execute' + sLineBreak+
+ '------------' + sLineBreak+
+ 'CommandText: ' + CommandText + sLineBreak+
+ 'CursorType: ' + TCursorTypeStr[CursorType] + sLineBreak +
+ 'LockType: ' + TADOLockTypeStr[LockType] + sLineBreak +
+ 'CommandType: ' + TCommandTypeStr[CommandType] + sLineBreak +
+ 'ExecuteOptions: ' + getExecuteOptionStr(ExecuteOptions) + sLineBreak +
+ ParseEventStatus(EventStatus)+
+ ParseCommand(Command),
+ 0);
+end;
+
+procedure TDAADOMonitor.AssignEvents(AConnection: TADOConnection);
+begin
+ if (AConnection <> nil) and FEnabled and Assigned(FOnCallback) then begin
+ // if toPrepare in FTraceFlags then AConnection.
+ if toExecute in FTraceFlags then begin
+ AConnection.OnExecuteComplete := ADOConnectionExecuteComplete;
+ AConnection.OnWillExecute := ADOConnectionWillExecute;
+ end;
+ // if toFetch in FTraceFlags then AConnection.
+ if toError in FTraceFlags then begin
+ AConnection.OnInfoMessage := ADOConnectionInfoMessage;
+ end;
+ // if toStmt in FTraceFlags then AConnection.
+ if toConnect in FTraceFlags then begin
+ AConnection.OnConnectComplete := ADOConnectionConnectComplete;
+ AConnection.OnWillConnect := ADOConnectionWillConnect;
+ AConnection.OnDisconnect := ADOConnectionDisconnect;
+ end;
+ if toTransact in FTraceFlags then begin
+ AConnection.OnBeginTransComplete := ADOConnectionBeginTransComplete;
+ AConnection.OnCommitTransComplete := ADOConnectionCommitTransComplete;
+ AConnection.OnRollbackTransComplete := ADOConnectionRollbackTransComplete;
+ end;
+ // if toBlob in FTraceFlags then AConnection.
+ // if toService in FTraceFlags then AConnection.
+ // if toMisc in FTraceFlags then AConnection.
+ // if toParams in FTraceFlags then AConnection.
+ end;
+end;
+
+constructor TDAADOMonitor.Create(ADriver: TDAEADODriver);
+begin
+ inherited Create;
+ FDriver := ADriver;
+ FEnabled := False;
+end;
+
+procedure TDAADOMonitor.ReAssignEvents;
+var
+ i: integer;
+ lmode: boolean;
+begin
+ lMode:=FEnabled and (fTraceFlags <> []) and Assigned(FOnCallback);
+ with FDriver.FConnectionList.LockList do try
+ for i:= 0 to Count-1 do
+ if lMode then
+ AssignEvents(TADOConnection(Items[i]))
+ else
+ UnAssignEvents(TADOConnection(Items[i]));
+ finally
+ FDriver.FConnectionList.UnLockList;
+ end;
+end;
+
+procedure TDAADOMonitor.SetEnabled(const Value: Boolean);
+begin
+ if FEnabled <> Value then begin
+ FEnabled := Value;
+ if FEnabled and (fTraceFlags <> []) and Assigned(FOnCallback) then ReAssignEvents;
+ end;
+end;
+
+procedure TDAADOMonitor.SetOnCallback(const Value: TDALogTraceEvent);
+begin
+ if @fOnCallback <> @Value then begin
+ FOnCallback := Value;
+ if FEnabled and (fTraceFlags <> []) and Assigned(FOnCallback) then ReAssignEvents;
+ end;
+end;
+
+procedure TDAADOMonitor.SetTraceFlags(const Value: TDATraceOptions);
+begin
+ if FTraceFlags <> Value then begin
+ FTraceFlags := Value;
+ if FEnabled and (fTraceFlags <> []) and Assigned(FOnCallback) then ReAssignEvents;
+ end;
+end;
+
+procedure TDAADOMonitor.UnAssignEvents(AConnection: TADOConnection);
+begin
+ if AConnection <> nil then begin
+ // toTransact
+ AConnection.OnBeginTransComplete := nil;
+ AConnection.OnCommitTransComplete := nil;
+ AConnection.OnRollbackTransComplete := nil;
+
+ //toConnect
+ AConnection.OnConnectComplete := nil;
+ AConnection.OnWillConnect := nil;
+ AConnection.OnDisconnect := nil;
+
+ //toExecute
+ AConnection.OnExecuteComplete := nil;
+ AConnection.OnWillExecute := nil;
+
+ //toError
+ AConnection.OnInfoMessage := nil;
+ end;
+end;
+
+initialization
+ _driver := nil;
+ RegisterDriverProc(GetDriverObject);
+finalization
+ UnregisterDriverProc(GetDriverObject);
+ FreeAndNIL(_driver);
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDAAnyDACDriver.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDAAnyDACDriver.pas
new file mode 100644
index 0000000..97220e5
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDAAnyDACDriver.pas
@@ -0,0 +1,2709 @@
+{-------------------------------------------------------------------------------}
+{ Data Abstract Library - Driver Library }
+{ }
+{ compiler: Delphi 6 and up }
+{ platform: Win32 }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{ }
+{ Based on AnyDAC Driver by Dmitry Arefiev (www.da-soft.com) }
+{-------------------------------------------------------------------------------}
+
+{$IFDEF MSWINDOWS}
+ {$I ..\DataAbstract.inc}
+{$ENDIF MSWINDOWS}
+{$IFDEF LINUX}
+ {$I ../DataAbstract.inc}
+{$ENDIF LINUX}
+
+{$I uAD.inc}
+{$IFNDEF DataAbstract_SchemaModelerOnly}
+ {$DEFINE ANYDAC_DEBUGMODE}
+{$ENDIF}
+
+unit uDAAnyDACDriver;
+
+interface
+
+uses
+ DB, Classes,
+ uROClasses,
+ uDAEngine, uDAInterfaces, uDAInterfacesEx, uDAUtils, uDAOracleInterfaces,
+ uDAMySQLInterfaces, uDAADOInterfaces, uDAIBInterfaces, uDADB2Interfaces,
+ uDASybaseInterfaces,
+ uADStanIntf, uADStanOption, uADDatSManager, uADPhysIntf, uADCompClient
+{$IFDEF AnyDAC_MONITOR}
+ ,uADMoniBase, uADMoniCustom
+{$ENDIF}
+ ;
+
+type
+ TDAAnyDACDriverType = TADRDBMSKind;
+
+ { TDAAnyDACDriver }
+ TDAAnyDACDriver = class(TDADriverReference)
+ end;
+
+ { TDAEAnyDACDriver }
+ TDAEAnyDACDriver = class(TDAEDriver, IDADriver40)
+ private
+ FConnectionDefs: TStringList;
+ FConnectionDefIndex: Integer;
+{$IFDEF AnyDAC_MONITOR}
+ FMonitor: TADMoniCustomClientLink;
+ FTraceCallback: TDALogTraceEvent;
+ procedure DoTrace(ASender: TADMoniClientLinkBase; const AClassName, AObjName, AMessage: String);
+{$ENDIF AnyDAC_MONITOR}
+ function LookupConnectionString(const AConnectionString: String; AParsedParams: TStringList): String;
+ protected
+{$IFDEF AnyDAC_MONITOR}
+ procedure DoSetTraceOptions(TraceActive: Boolean; TraceOptions: TDATraceOptions; Callback: TDALogTraceEvent); override;
+{$ENDIF AnyDAC_MONITOR}
+ function GetConnectionClass: TDAEConnectionClass; override;
+ // IDADriver
+ procedure Initialize; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure Finalize; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetDriverID: string; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetDescription: string; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetAuxDrivers(out List: IROStrings); override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetAuxParams(const AuxDriver: string; out List: IROStrings); override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAvailableDriverOptions: TDAAvailableDriverOptions; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetDefaultConnectionType(const AuxDriver: string): string; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ // IDADriver40
+ function GetProviderDefaultCustomParameters(Provider: string): string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ end;
+
+ { TDAEAnyDACConnection }
+ TDAEAnyDACConnection = class(TDAEConnection, IDAConnection,
+ IDAADOConnection,
+ IDAInterbaseConnection,
+ IDAIBTransactionAccess,
+ IDAIBConnectionProperties,
+ IDAOracleConnection,
+ IDAMySQLConnection,
+ IDADB2Connection,
+ IDASybaseConnection,
+ IDAConnectionModelling,
+ IDACanQueryDatabaseNames,
+ IDAFileBasedDatabase,
+ IDAUseGenerators,
+ IDACanQueryGeneratorsNames,
+ IDATestableObject)
+ private
+ FADConnection: TADConnection;
+ fDriverType: TDAAnyDACDriverType;
+ fMSSQLSchemaEnabled: Boolean;
+ fBiDirectionalDataSets: Boolean;
+ fDirectMode: Boolean;
+ FDataTypeSchema: String;
+ procedure DoGetNames(AList: IROStrings; AObjectType: TDAObjecttype);
+ procedure Native_DoGetTableFields(aTableName: string; out Fields: TDAFieldCollection);
+ procedure Native_DoGetForeignKeys(ForeignKeys: TDADriverForeignKeyCollection);
+ function Native_DoGetLastAutoInc(const GeneratorName: string): integer;
+ function Native_GetQuoteChars: TDAQuoteCharArray;
+ function GetAnyDACPhysConnection:IADPhysConnection;
+ procedure MapAsFIB;
+ protected
+ // IInterface
+ function QueryInterface(const IID: TGUID; out Obj): HResult; override; stdcall;
+ // TDAEConnection
+ function CreateCustomConnection: TCustomConnection; override;
+ function CreateMacroProcessor: TDASQLMacroProcessor; override;
+ function GetDatasetClass: TDAEDatasetClass; override;
+ function GetStoredProcedureClass: TDAEStoredProcedureClass; override;
+ procedure DoApplyConnectionString(aConnStrParser: TDAConnectionStringParser; aConnectionObject: TCustomConnection); override;
+ procedure SetupDataset(ADataSet: TADRdbmsDataSet; AFetchMeta: Boolean);
+ procedure SetupOptions(AOptions: IADStanOptions; AFetchMeta: Boolean);
+ function DoBeginTransaction: integer; override;
+ procedure DoCommitTransaction; override;
+ procedure DoRollbackTransaction; override;
+ function DoGetInTransaction: boolean; override;
+ procedure DoGetTableNames(out List: IROStrings); override;
+ procedure DoGetViewNames(out List: IROStrings); override;
+ procedure DoGetStoredProcedureNames(out List: IROStrings); override;
+ procedure DoGetTableFields(const aTableName: string; out Fields: TDAFieldCollection); override;
+ procedure DoGetStoredProcedureParams(const aStoredProcedureName: string; out Params: TDAParamCollection); override;
+ procedure DoGetForeignKeys(out ForeignKeys: TDADriverForeignKeyCollection); override;
+ function DoGetLastAutoInc(const GeneratorName: string): integer; override;
+ // IDATestObject
+ // nothing
+ // IDAConnection
+ function GetSPSelectSyntax(AHasArguments: Boolean): string; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetQuoteChars: TDAQuoteCharArray; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function IdentifierNeedsQuoting(const AIdentifier: string): boolean; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ // IDAADOConnection
+ function GetProviderName: string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetProviderType: TDAOleDBProviderType; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetCommandTimeout: Integer; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetCommandTimeout(const Value: Integer); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ // IDAInterbaseConnection
+ // nothing
+ // IDAIBTransactionAccess
+ function GetTransaction: TObject; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ // IDAIBConnectionProperties
+ function GetRole: string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetRole(const Value: string); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetSQLDialect: integer; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetSQLDialect(Value: integer); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetCharset: string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetCharset(const Value: string); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure Commit; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure CommitRetaining; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure Rollback; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure RollbackRetaining; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ // IDAOracleConnection
+ // nothing
+ // IDAConnectionModelling
+ function FieldToDeclaration(aField: TDAField): string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function BuildCreateTableSQL(aDataSet: TDADataSet; const aOverrideName: string = ''): string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure CreateTable(aDataSet: TDADataSet; const aOverrideName: string = ''); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ // IDACanQueryDatabaseNames
+ function GetDatabaseNames: IROStrings;
+ // IDAFileBasedDatabase
+ function GetFileExtensions: IROStrings;
+ // IDADirectoryBasedDatabase
+ // nothing
+ // IDAUseGenerators
+ function GetNextAutoinc(const GeneratorName: string): integer; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ // IDACanQueryGeneratorsNames
+ function GetGeneratorNames: IROStrings;
+ end;
+
+ { TDAEAnyDACQuery }
+ TDAEAnyDACQuery = class(TDAEDataset, IDAMustSetParams)
+ protected
+ function CreateDataset(aConnection: TDAEConnection): TDataset; override;
+ // TDAEDataset
+ procedure DoPrepare(AValue: boolean); override;
+ function DoExecute: integer; override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function DoGetSQL: string; override;
+ procedure DoSetSQL(const AValue: string); override;
+ procedure ClearParams; override;
+ // IDAMustSetParams
+ procedure SetParamValues(AParams: TDAParamCollection); override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetParamValues(AParams: TDAParamCollection); override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ end;
+
+ { TDAEAnyDACStoredProcedure }
+ TDAEAnyDACStoredProcedure = class(TDAEStoredProcedure, IDAMustSetParams)
+ protected
+ function CreateDataset(aConnection: TDAEConnection): TDataset; override;
+ // TDAEDataset
+ procedure RefreshParams; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetStoredProcedureName: string; override;
+ procedure SetStoredProcedureName(const Name: string); override;
+ function DoExecute: integer; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function Execute: integer; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ // IDAMustSetParams
+ procedure SetParamValues(AParams: TDAParamCollection); override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetParamValues(AParams: TDAParamCollection); override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ end;
+
+ { TDAEAnyDACNativeField }
+ TDAEAnyDACNativeField = class(TInterfacedObject, IDANativeField)
+ private
+ FCol: TADDatSColumn;
+ FCmd: IADPhysCommand;
+ protected
+ function GetNativeObject: TObject;
+ function isTFieldCompatible: Boolean;
+ function GetFieldName: string;
+ function GetDataType: TFieldType;
+ function GetSize: integer;
+ function GetDecimalPrecision: Integer;
+ procedure SetDecimalPrecision(Value: integer);
+ function GetDecimalScale: Integer;
+ procedure SetDecimalScale(Value: integer);
+ procedure SetDataType(Value: TFieldType);
+ public
+ constructor Create(ACol: TADDatSColumn; const ACmd: IADPhysCommand);
+ end;
+
+ { TDAEAnyDACNativeDatabaseAccess }
+ TDAEAnyDACNativeDatabaseAccessFlags = set of (nfActive, nfBOF, nfEOF);
+ TDAEAnyDACNativeDatabaseAccess = class(TObject, IInterface, IDANativeDatabaseAccess)
+ private
+ FCmd: IADPhysCommand;
+ FTab: TADDatSTable;
+ FFlags: TDAEAnyDACNativeDatabaseAccessFlags;
+ FRowIndex: Integer;
+ FRowsPurged: Integer;
+ FBuffs: array of Pointer;
+ procedure First;
+ procedure CheckActive;
+ procedure CheckBidir;
+ function LocateRecord(const KeyFields: string; const KeyValues: Variant;
+ Options: TLocateOptions; AChangePos: Boolean): Integer;
+ protected
+ // IInterface
+ function QueryInterface(const IID: TGUID; out Obj): HResult; stdcall;
+ function _AddRef: Integer; stdcall;
+ function _Release: Integer; stdcall;
+ // IDANativeDatabaseAccess
+ procedure ClearFieldDefs;
+ function GetRecordCount: Integer;
+ function GetBOF: Boolean;
+ function GetEOF: Boolean;
+ function GetActive: Boolean;
+ procedure SetActive(const aValue: Boolean);
+ procedure Next;
+ function Locate(const KeyFields: string; const KeyValues: Variant; Options: TLocateOptions): Boolean;
+ function Lookup(const KeyFields: string; const KeyValues: Variant; const ResultFields: string): Variant;
+ function GetFieldName(Index: Integer): string;
+ procedure DisableControls;
+ procedure EnableControls;
+ function GetIsEmpty: boolean;
+ procedure FreeBookmark(Bookmark: TBookmark);
+ function GetBookMark: pointer;
+ procedure GotoBookmark(Bookmark: TBookmark);
+ function GetState: TDatasetState;
+ function ControlsDisabled: Boolean;
+ procedure Prepare(const AValue: Boolean);
+ function GetFields(Index: integer): IDANativeField;
+ function FieldCount: Integer;
+ function FindField(const FieldName: string): IDANativeField;
+ function IsTDatasetCompatible: Boolean;
+ function GetNativeFieldData(Index: Integer; var Data: pointer; var DataSize: cardinal):Boolean;
+ function GetNativeFieldValue(Index: Integer): Variant;
+ function CanFreeNativeFieldData: Boolean;
+ public
+ Constructor Create(ADAEConnection: TDAEAnyDACConnection);
+ destructor Destroy; override;
+ end;
+
+ { TDAEAnyDACQueryNative }
+ TDAEAnyDACQueryNative = class(TDAEDataset, IDAMustSetParams)
+ private
+ function GetNativeObject: TDAEAnyDACNativeDatabaseAccess;
+ protected
+ function CreateDataset(aConnection: TDAEConnection): TDataset; override;
+ function CreateNativeObject(aConnection: TDAEConnection): TObject; override;
+ function CreateNativeDatabaseAccess: IDANativeDatabaseAccess; override;
+ // TDAEDataset
+ procedure DoPrepare(AValue: boolean); override;
+ function DoExecute: integer; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function DoGetSQL: string; override;
+ procedure DoSetSQL(const AValue: string); override;
+ procedure ClearParams; override;
+ // IDAMustSetParams
+ procedure SetParamValues(AParams: TDAParamCollection); override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetParamValues(AParams: TDAParamCollection); override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ public
+ property NativeObject: TDAEAnyDACNativeDatabaseAccess read GetNativeObject;
+ end;
+
+ { TDAEAnyDACStoredProcedureNative }
+ TDAEAnyDACStoredProcedureNative = class(TDAEStoredProcedure, IDAMustSetParams)
+ private
+ function GetNativeObject: TDAEAnyDACNativeDatabaseAccess;
+ protected
+ function CreateDataset(aConnection: TDAEConnection): TDataset; override;
+ function CreateNativeObject(aConnection: TDAEConnection): TObject; override;
+ function CreateNativeDatabaseAccess: IDANativeDatabaseAccess; override;
+ // TDAEDataset
+ procedure RefreshParams; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetStoredProcedureName: string; override;
+ procedure SetStoredProcedureName(const Name: string); override;
+ function DoExecute: integer; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function Execute: integer; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ // IDAMustSetParams
+ procedure SetParamValues(AParams: TDAParamCollection); override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetParamValues(AParams: TDAParamCollection); override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ public
+ property NativeObject: TDAEAnyDACNativeDatabaseAccess read GetNativeObject;
+ end;
+
+procedure Register;
+function GetDriverObject: IDADriver; stdcall;
+function AnyDACDriverIdToAnyDACDriverType(Provider: string): TDAAnyDACDriverType;
+
+implementation
+
+uses
+ {$IFDEF FPC} LResources, {$ENDIF}
+ {$IFDEF MSWINDOWS} Windows, {$ENDIF}
+ SysUtils, Variants, FmtBCD,
+ uDADriverManager, uDARes, uDAHelpers, uROBinaryHelpers,
+ uADStanParam, uADStanConst, uADStanFactory, uADGUIxConsoleWait, uADPhysManager,
+ uADPhysODBC, uADPhysOracl, uADPhysMySQL, uADPhysMSSQL, uADPhysMSAcc, uADPhysDB2,
+ uADPhysASA, uADPhysIB, uADPhysADS, uADStanUtil
+{$IFDEF AnyDAC_D11}
+ , uADPhysTDBX
+{$ELSE}
+ {$IFDEF AnyDAC_D6}
+ , uADPhysDbExp
+ {$ENDIF}
+{$ENDIF};
+
+{$IFNDEF FPC}
+ {$R DataAbstract_AnyDACDriver_Glyphs.res}
+{$ENDIF}
+
+{$IFDEF DataAbstract_SchemaModelerOnly}
+ {$INCLUDE ..\DataAbstract_SchemaModelerOnly.inc}
+{$ENDIF DataAbstract_SchemaModelerOnly}
+
+{------------------------------------------------------------------------------}
+{ Generic procedures }
+{------------------------------------------------------------------------------}
+function AnyDACDriverIdToAnyDACDriverType(Provider: string): TDAAnyDACDriverType;
+var
+ FConnectionIntf: IADPhysConnection;
+ oConMeta: IADPhysConnectionMetadata;
+begin
+ Result := mkUnknown;
+ if Provider = '' then
+ Exit;
+ try
+ with TADConnection.Create(nil) do
+ try
+ ResultConnectionDef.DriverID := Provider;
+ ADPhysManager.CreateConnection(ResultConnectionDef, FConnectionIntf);
+ if FConnectionIntf <> nil then begin
+ FConnectionIntf.CreateMetadata(oConMeta);
+ Result := oConMeta.Kind;
+ end;
+ finally
+ Free;
+ end;
+ except
+ // hide an exception
+ end;
+end;
+
+{------------------------------------------------------------------------------}
+procedure SetADParamValuesFromDA(ADAParams: TDAParamCollection;
+ AADParams: TADParams; ASetType: Boolean);
+var
+ i: integer;
+ oDAPar: TDAParam;
+ oADPar: TADParam;
+begin
+ for i := 0 to AADParams.Count - 1 do begin
+ oADPar := AADParams[i];
+ oDAPar := ADAParams.ParamByName(oADPar.Name);
+ oADPar.ParamType := TParamType(oDAPar.ParamType);
+ if oDAPar.ParamType in [daptInput, daptInputOutput, daptUnknown] then
+ if oDAPar.DataType in [datBlob, datMemo, datWideMemo] then begin
+ if ASetType then
+ if oDAPar.BlobType = dabtUnknown then
+ case oDAPar.DataType of
+ datMemo: oADPar.DataType := ftMemo;
+ datBlob: oADPar.DataType := ftBlob;
+ datWideMemo: oADPar.DataType := {$IFDEF AnyDAC_D10} ftWideMemo {$ELSE} ftFmtMemo {$ENDIF};
+ end
+ else
+ oADPar.DataType := BlobTypeMappings[oDAPar.BlobType];
+ if VarIsEmpty(oDAPar.Value) or VarIsNull(oDAPar.Value) then
+ oADPar.Clear
+ else
+ oADPar.AsBlob := VariantBinaryToString(oDAPar.Value);
+ end
+ else begin
+ if ASetType then
+ oADPar.DataType := DATypeToVCLType(oDAPar.DataType);
+ if VarIsEmpty(oDAPar.Value) or VarIsNull(oDAPar.Value) then
+ oADPar.Clear
+ else
+ oADPar.Value := oDAPar.Value;
+ end
+ else
+ if ASetType then begin
+ oADPar.DataType := DATypeToVCLType(oDAPar.DataType);
+ oADPar.Size := oDAPar.Size;
+ oADPar.Precision := oDAPar.DecimalPrecision;
+ oADPar.NumericScale := oDAPar.DecimalScale;
+ end;
+ end;
+end;
+
+{------------------------------------------------------------------------------}
+procedure GetDAParamValuesFromAD(Params: TDAParamCollection; AADParams: TADParams);
+var
+ i: integer;
+ oDAPar: TDAParam;
+ oADPar: TADParam;
+begin
+ if not Assigned(AADParams) then
+ Exit;
+ for i := 0 to AADParams.Count - 1 do begin
+ oADPar := AADParams[i];
+ oDAPar := Params.ParamByName(oADPar.Name);
+ if oDAPar.ParamType in [daptOutput, daptInputOutput, daptResult] then
+ oDAPar.Value := oADPar.Value;
+ end;
+end;
+
+{------------------------------------------------------------------------------}
+function MapAD2DADataType(AADDataType: TADDataType; out ABlobType: TDABlobType): TDADataType;
+begin
+ ABlobType := dabtUnknown;
+ case AADDataType of
+ dtUnknown: Result := datUnknown;
+ dtBoolean: Result := datBoolean;
+ dtSByte: Result := datShortInt;
+ dtInt16: Result := datSmallInt;
+ dtInt32: Result := datInteger;
+ dtInt64: Result := datLargeInt;
+ dtByte: Result := datByte;
+ dtUInt16: Result := datWord;
+ dtUInt32: Result := datCardinal;
+ dtUInt64: Result := datLargeUInt;
+ dtDouble: Result := datFloat;
+ dtCurrency: Result := datFloat; // Double
+ dtBCD: Result := datCurrency; // Currency
+ dtFmtBCD: Result := datDecimal; // TBcd
+ dtDateTime: Result := datDateTime;
+ dtTime: Result := datDateTime;
+ dtDate: Result := datDateTime;
+ dtDateTimeStamp: Result := datDateTime;
+ dtAnsiString: Result := datString;
+ dtWideString: Result := datWideString;
+ dtByteString: Result := datString;
+ dtBlob: begin Result := datBlob; ABlobType := dabtBlob; end;
+ dtMemo: begin Result := datMemo; ABlobType := dabtMemo; end;
+ dtWideMemo: begin Result := datWideMemo; ABlobType := dabtMemo; end;
+ dtHBlob: begin Result := datBlob; ABlobType := dabtOraBlob; end;
+ dtHMemo: begin Result := datMemo; ABlobType := dabtOraClob; end;
+ dtWideHMemo: begin Result := datWideMemo; ABlobType := dabtOraClob; end;
+ dtHBFile: begin Result := datBlob; ABlobType := dabtOraBlob; end;
+ dtGUID: Result := datGuid;
+ else raise Exception.CreateFmt('AnyDAC data type [%s] is not supported by DataAbstract',
+ [C_AD_DataTypeNames[AADDataType]]);
+ end;
+end;
+
+{------------------------------------------------------------------------------}
+{ TDAEAnyDACDriver }
+{------------------------------------------------------------------------------}
+function TDAEAnyDACDriver.GetAvailableDriverOptions: TDAAvailableDriverOptions;
+begin
+ result := [doAuxDriver, doServerName, doDatabaseName, doLogin, doCustom];
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACDriver.GetConnectionClass: TDAEConnectionClass;
+begin
+ result := TDAEAnyDACConnection;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACDriver.GetDescription: string;
+begin
+ result := 'RemObjects AnyDAC Driver'{$IFDEF DataAbstract_SchemaModelerOnly} + SchemaModelerOnly{$ENDIF};
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACDriver.GetDriverID: string;
+begin
+ result := 'AnyDAC';
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACDriver.GetAuxDrivers(out List: IROStrings);
+begin
+ List := NewROStrings;
+ ADManager.GetDriverNames(List.Strings);
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACDriver.GetProviderDefaultCustomParameters(Provider: string): string;
+begin
+ Result := '';
+ case AnyDACDriverIdToAnyDACDriverType(Provider) of
+ mkOracle: Result := S_AD_ConnParam_Common_OSAuthent + '=No;';
+ mkMSSQL: Result := 'Schemas=1;Integrated Security=SSPI;';
+ mkMySQL: Result := MYSQL_GetDefaultCustomParameters;
+ mkInterbase: Result := S_AD_ConnParam_IB_Protocol + '=TCPIP;';
+ end;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACDriver.GetDefaultConnectionType(const AuxDriver: string): string;
+begin
+ case AnyDACDriverIdToAnyDACDriverType(AuxDriver) of
+ mkOracle: Result := Oracle_DriverType;
+ mkMSSQL: Result := MSSQL_DriverType;
+ mkMSAccess: Result := Access_DriverType;
+ mkMySQL: Result := MySQL_DriverType;
+ mkDB2: Result := DB2_DriverType;
+ mkASA: Result := ASA_DriverType;
+ mkInterbase: Result := IB_DriverType;
+ else
+ Result := inherited GetDefaultConnectionType(AuxDriver);
+ end;
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACDriver.GetAuxParams(const AuxDriver: string;
+ out List: IROStrings);
+const
+ C_Line: String = '-----------------------------';
+begin
+ inherited;
+
+ List.Add('AnyDAC Driver parameters');
+ List.Add(C_Line);
+ case AnyDACDriverIdToAnyDACDriverType(AuxDriver) of
+ mkOracle:
+ ;
+ mkMSSQL:
+ MSSQL_GetAuxParams(List);
+ mkMSAccess:
+ ;
+ mkMySQL:
+ MYSQL_GetAuxParams(List);
+ mkDB2:
+ ;
+ mkASA:
+ ;
+ mkInterbase:
+ begin
+ AddIBAuxParams(List);
+ List.Add('DataTypeSchema=');
+ end;
+ end;
+ List.Add('ConnectionDefName=');
+ List.Add('BiDirectionalDataSets=0,1');
+ List.Add('DirectMode=0,1');
+ List.Add('');
+
+ case AnyDACDriverIdToAnyDACDriverType(AuxDriver) of
+ mkOracle:
+ begin
+ List.Add('Oracle AuxDriver parameters');
+ List.Add(C_Line);
+ List.Add('You can pass any parameters directly to aux driver. Use the prefix ''@'' for this, e.g.:');
+ List.Add('@SQLTrace=True;@Pooled=True');
+ List.Add('');
+ List.Add('Detailed description of aux driver parameters you can find at:');
+ List.Add('http://wiki.remobjects.com/wiki/Connect_to_Oracle_Server_%28AnyDAC%29');
+ end;
+ mkMSSQL:
+ begin
+ List.Add('MSSQL AuxDriver parameters');
+ List.Add(C_Line);
+ List.Add('');
+ List.Add('You can pass any parameters directly to aux driver. Use the prefix ''@'' for this, e.g.:');
+ List.Add('@App=My DA Server;@Pooled=True');
+ List.Add('');
+ List.Add('Detailed description of aux driver parameters you can find at:');
+ List.Add('http://wiki.remobjects.com/wiki/Connect_to_Microsoft_SQL_Server_%28AnyDAC%29');
+ end;
+ mkMSAccess:
+ begin
+ List.Add('MSAccess AuxDriver parameters');
+ List.Add(C_Line);
+ List.Add('You can pass any parameters directly to aux driver. Use the prefix ''@'' for this, e.g.:');
+ List.Add('@ReadOnly=True;@Pooled=True');
+ List.Add('');
+ List.Add('Detailed description of aux driver parameters you can find at:');
+ List.Add('http://wiki.remobjects.com/wiki/Connect_to_MS_Access_database_%28AnyDAC%29');
+ end;
+ mkMySQL:
+ begin
+ List.Add('MySQL AuxDriver parameters');
+ List.Add(C_Line);
+ List.Add('You can pass any parameters directly to aux driver. Use the prefix ''@'' for this, e.g.:');
+ List.Add('@CharacterSet=utf8;@Pooled=True');
+ List.Add('');
+ List.Add('Detailed description of aux driver parameters you can find at:');
+ List.Add('http://wiki.remobjects.com/wiki/Connect_to_MySQL_Server_%28AnyDAC%29');
+ end;
+ mkDB2:
+ begin
+ List.Add('DB2 AuxDriver parameters');
+ List.Add(C_Line);
+ List.Add('You can pass any parameters directly to aux driver. Use the prefix ''@'' for this, e.g.:');
+ List.Add('@Alias=MyDB;@Pooled=True');
+ List.Add('');
+ List.Add('Detailed description of aux driver parameters you can find at:');
+ List.Add('http://wiki.remobjects.com/wiki/Connect_to_IBM_DB2_Server_%28AnyDAC%29');
+ end;
+ mkASA:
+ begin
+ List.Add('ASA AuxDriver parameters');
+ List.Add(C_Line);
+ List.Add('You can pass any parameters directly to aux driver. Use the prefix ''@'' for this, e.g.:');
+ List.Add('@ODBCAdvanced=AutoStart=Yes;@DatabaseFile=C:\sybase\addemo_asa10.db;@Pooled=True');
+ List.Add('');
+ List.Add('Detailed description of aux driver parameters you can find at:');
+ List.Add('http://wiki.remobjects.com/wiki/Connect_to_Sybase_SQL_Anywhere_%28AnyDAC%29');
+ end;
+ mkInterBase:
+ begin
+ List.Add('IB/FB AuxDriver parameters');
+ List.Add(C_Line);
+ List.Add('You can pass any parameters directly to aux driver. Use the prefix ''@'' for this, e.g.:');
+ List.Add('@Protocol=TCPIP;@CharacterSet=win1251;@Pooled=True');
+ List.Add('');
+ List.Add('Detailed description of aux driver parameters you can find at:');
+ List.Add('http://wiki.remobjects.com/wiki/Connect_to_Interbase_or_Firebird_Server_%28AnyDAC%29');
+ end;
+ end;
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACDriver.Initialize;
+begin
+ FConnectionDefs := TStringList.Create;
+ FConnectionDefs.Sorted := True;
+ FConnectionDefIndex := 0;
+ ADManager.Open;
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACDriver.Finalize;
+begin
+ ADManager.Close;
+{$IFDEF AnyDAC_MONITOR}
+ FreeAndNil(FMonitor);
+{$ENDIF AnyDAC_MONITOR}
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACDriver.LookupConnectionString(const AConnectionString: String;
+ AParsedParams: TStringList): String;
+var
+ i: Integer;
+begin
+ i := FConnectionDefs.IndexOf(AConnectionString);
+ if i = -1 then begin
+ Inc(FConnectionDefIndex);
+ FConnectionDefs.AddObject(AConnectionString, TObject(FConnectionDefIndex));
+ with ADManager.ConnectionDefs.AddConnectionDef do begin
+ Name := Format('__DACD_%d', [FConnectionDefIndex]);
+ Params.AddStrings(AParsedParams);
+ Result := Name;
+ end;
+ end
+ else
+ Result := Format('__DACD_%d', [Integer(FConnectionDefs.Objects[i])]);
+end;
+
+{------------------------------------------------------------------------------}
+{$IFDEF AnyDAC_MONITOR}
+procedure TDAEAnyDACDriver.DoTrace(ASender: TADMoniClientLinkBase;
+ const AClassName, AObjName, AMessage: String);
+begin
+ if Assigned(FTraceCallback) then
+ FTraceCallback(ASender, AMessage, 0);
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACDriver.DoSetTraceOptions(TraceActive: boolean; TraceOptions: TDATraceOptions; Callback: TDALogTraceEvent);
+var
+ eKinds: TADMoniEventKinds;
+begin
+ inherited;
+ if TraceActive then begin
+ FTraceCallBack := Callback;
+ eKinds := [];
+ if toPrepare in TraceOptions then eKinds := eKinds + [ekCmdPrepare];
+ if toExecute in TraceOptions then eKinds := eKinds + [ekCmdExecute];
+ if toFetch in TraceOptions then eKinds := eKinds + [ekCmdDataIn];
+ if toError in TraceOptions then eKinds := eKinds + [ekError];
+ // if toStmt in TraceOptions then eKinds := eKinds + [tfStmt];
+ if toConnect in TraceOptions then eKinds := eKinds + [ekConnConnect];
+ if toTransact in TraceOptions then eKinds := eKinds + [ekConnTransact];
+ // if toBlob in TraceOptions then eKinds := eKinds + [tfBlob];
+ if toService in TraceOptions then eKinds := eKinds + [ekVendor];
+ if toMisc in TraceOptions then eKinds := eKinds + [ekConnService, ekLiveCycle, ekAdaptUpdate];
+ if toParams in TraceOptions then eKinds := eKinds + [ekCmdDataIn, ekCmdDataOut];
+ if FMonitor = nil then FMonitor := TADMoniCustomClientLink.Create(Self);
+ FMonitor.Tracing := False;
+ FMonitor.OnOutput := DoTrace;
+ FMonitor.EventKinds := eKinds;
+ FMonitor.Tracing := True;
+ end
+ else begin
+ if FMonitor <> nil then
+ FMonitor.Tracing := False;
+ FTraceCallback := nil;
+ end;
+end;
+{$ENDIF AnyDAC_MONITOR}
+
+{------------------------------------------------------------------------------}
+{ TDAEAnyDACConnection }
+{------------------------------------------------------------------------------}
+function TDAEAnyDACConnection.QueryInterface(const IID: TGUID; out Obj): HResult;
+begin
+ Result := E_NOINTERFACE;
+ if IsEqualGUID(IID, IDAADOConnection) then begin
+ if fDriverType <> mkMSSQL then Exit;
+ end else if IsEqualGUID(IID, IDAInterbaseConnection) then begin
+ if fDriverType <> mkInterbase then Exit;
+ end else if IsEqualGUID(IID, IDAIBTransactionAccess) then begin
+ if fDriverType <> mkInterbase then Exit;
+ end else if IsEqualGUID(IID, IDAIBConnectionProperties) then begin
+ if fDriverType <> mkInterbase then Exit;
+ end else if IsEqualGUID(IID, IDAOracleConnection) then begin
+ if fDriverType <> mkOracle then Exit;
+ end else if IsEqualGUID(IID, IDADB2Connection) then begin
+ if fDriverType <> mkDB2 then Exit;
+ end else if IsEqualGUID(IID, IDASybaseConnection) then begin
+ if not (fDriverType in [mkASA, mkADS]) then Exit;
+ end else if IsEqualGUID(IID, IDAMySQLConnection) then begin
+ if fDriverType <> mkMySQL then Exit;
+ end else if IsEqualGUID(IID, IDACanQueryDatabaseNames) then begin
+ if (fDriverType in [mkInterBase, mkMSAccess]) then Exit;
+ end else if IsEqualGUID(IID, IDAFileBasedDatabase) then begin
+ if not (fDriverType in [mkInterBase,mkMSAccess]) then Exit;
+ end else if IsEqualGUID(IID, IDAUseGenerators) then begin
+ if not (fDriverType in [mkInterBase, mkOracle]) then Exit;
+ end else if IsEqualGUID(IID, IDACanQueryGeneratorsNames) then begin
+ if not (fDriverType in [mkInterBase]) then Exit;
+ end
+ // else if IsEqualGUID(IID, IDAConnectionModelling) then
+ ;
+ Result := inherited QueryInterface(IID, Obj);
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACConnection.GetDatasetClass: TDAEDatasetClass;
+begin
+ if FDirectMode then
+ result := TDAEAnyDACQueryNative
+ else
+ result := TDAEAnyDACQuery;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACConnection.GetStoredProcedureClass: TDAEStoredProcedureClass;
+begin
+ if FDirectMode then
+ result := TDAEAnyDACStoredProcedureNative
+ else
+ result := TDAEAnyDACStoredProcedure;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACConnection.CreateCustomConnection: TCustomConnection;
+begin
+ fDriverType := mkUnknown;
+ FADConnection := TADConnection.Create(nil);
+ FADConnection.LoginPrompt := False;
+ result := FADConnection;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACConnection.GetAnyDACPhysConnection: IADPhysConnection;
+begin
+ Result := FADConnection.ConnectionIntf;
+ if Result = nil then
+ ADPhysManager.CreateConnection(FADConnection.ConnectionDefName, Result);
+end;
+
+{------------------------------------------------------------------------------}
+
+{
+Database= S_AD_ConnParam_Common_Database
+User_Name= S_AD_ConnParam_Common_UserName
+Password= S_AD_ConnParam_Common_Password
+
+Oracle
+======
+OSAuthent= S_AD_ConnParam_Common_OSAuthent
+DriverID=Ora
+
+MSAccess
+========
+SystemDB= S_AD_ConnParam_MSAcc_SysDB
+DriverID=MSAcc
+
+DB2
+===
+Alias= S_AD_ConnParam_DB2_Alias
+Server= S_AD_ConnParam_Common_Server
+Port= S_AD_ConnParam_Common_Port
+Protocol= S_AD_ConnParam_DB2_Protocol
+DriverID=DB2
+
+ASA
+===
+Server= S_AD_ConnParam_Common_Server
+DatabaseFile= S_AD_ConnParam_ASA_DatabaseFile
+OSAuthent= S_AD_ConnParam_Common_OSAuthent
+App= S_AD_ConnParam_ASA_App
+Compress= S_AD_ConnParam_ASA_Compress
+Encrypt= S_AD_ConnParam_ASA_Encrypt
+DriverID=ASA
+
+ADS
+===
+DefaultType=
+ServerTypes=
+DriverID=ADS
+
+MSSQL
+=====
+Server= S_AD_ConnParam_Common_Server
+Network= S_AD_ConnParam_MSSQL_Network
+Address= S_AD_ConnParam_MSSQL_Address
+OSAuthent= S_AD_ConnParam_Common_OSAuthent
+Workstation= S_AD_ConnParam_MSSQL_Workstation
+App= S_AD_ConnParam_MSSQL_App
+Encrypt= S_AD_ConnParam_MSSQL_Encrypt
+Language= S_AD_ConnParam_MSSQL_Language
+DriverID=MSSQL
+
+MySQL
+=====
+CharacterSet= S_AD_ConnParam_Common_CharacterSet
+Server= S_AD_ConnParam_Common_Server
+Port= S_AD_ConnParam_Common_Port
+DriverID=MySQL
+
+IB
+==
+Protocol= S_AD_ConnParam_IB_Protocol
+Server= S_AD_ConnParam_Common_Server
+InstanceName= S_AD_ConnParam_IB_InstanceName
+CharacterSet= S_AD_ConnParam_Common_CharacterSet
+RoleName= S_AD_ConnParam_IB_RoleName
+SQLDialect= S_AD_ConnParam_IB_SQLDialect
+DriverID=IB
+
+Other
+=====
+ODBCDriver=
+DataSource=
+RDBMS=
+ODBCAdvanced=
+DriverID=ODBC
+}
+
+procedure TDAEAnyDACConnection.DoApplyConnectionString(
+ aConnStrParser: TDAConnectionStringParser; aConnectionObject: TCustomConnection);
+var
+ sName, sValue: string;
+ i: integer;
+ oParams: TStringList;
+begin
+ fDriverType := mkUnknown;
+ FDataTypeSchema := '';
+ fMSSQLSchemaEnabled := False;
+ fBiDirectionalDataSets := False;
+ fDirectMode := False;
+
+ inherited DoApplyConnectionString(aConnStrParser, aConnectionObject);
+ oParams := TStringList.Create;
+ try
+ with aConnStrParser do begin
+ oParams.Values[S_AD_ConnParam_Common_DriverID] := AuxDriver;
+ fDriverType := AnyDACDriverIdToAnyDACDriverType(AuxDriver);
+
+ if (Self.UserID <> '') then
+ oParams.Values[S_AD_ConnParam_Common_UserName] := Self.UserID
+ else if (UserID <> '') then
+ oParams.Values[S_AD_ConnParam_Common_UserName] := UserID;
+
+ if (Self.Password <> '') then
+ oParams.Values[S_AD_ConnParam_Common_Password] := Self.Password
+ else if (Password <> '') then
+ oParams.Values[S_AD_ConnParam_Common_Password] := Password;
+
+ if Database <> '' then
+ oParams.Values[S_AD_ConnParam_Common_Database] := Database;
+
+ if Server <> '' then
+ oParams.Values[S_AD_ConnParam_Common_Server] := Server;
+
+ for i := 0 to AuxParamsCount - 1 do begin
+ sName := AuxParamNames[i];
+ if sName = '' then Continue;
+ sValue := AuxParams[AuxParamNames[i]];
+ if SameText(sName, 'Schemas') then begin
+ fMSSQLSchemaEnabled := sValue = '1';
+ Continue;
+ end
+ else if SameText(sName, 'Dialect') then begin
+ if fDriverType = mkInterBase then
+ sName := S_AD_ConnParam_IB_SQLDialect;
+ end
+ else if SameText(sName, 'Role') then begin
+ if fDriverType = mkInterBase then
+ sName := S_AD_ConnParam_IB_RoleName;
+ end
+ else if SameText(sName, 'Charset') then begin
+ if fDriverType = mkInterBase then
+ sName := S_AD_ConnParam_Common_CharacterSet;
+ end
+ else if SameText(sName, 'Port') then begin
+ if StrToIntDef(sValue, -1) <> -1 then
+ sName := S_AD_ConnParam_Common_Port;
+ end
+ else if SameText(sName, 'ConnectionDefName') then
+ sName := S_AD_DefinitionParam_Common_ConnectionDef
+ else if SameText(sName, 'DataTypeSchema') then begin
+ if fDriverType = mkInterBase then
+ FDataTypeSchema := UpperCase(sValue);
+ end
+ else if SameText(sName, 'Integrated Security') then begin
+ if (fDriverType = mkMSSQL) and (sValue = 'SSPI') then begin
+ sName := S_AD_ConnParam_Common_OSAuthent;
+ sValue := 'Yes';
+ end
+ else
+ Continue;
+ end
+ else if SameText(sName, 'BiDirectionalDataSets') then begin
+ fBiDirectionalDataSets := sValue = '1';
+ Continue;
+ end
+ else if SameText(sName, 'DirectMode') then begin
+ fDirectMode := sValue = '1';
+ Continue;
+ end
+ else
+ if sName[1] = '@' then
+ sName := Pchar(sName) + 1;
+ oParams.Values[sName] := sValue;
+ end;
+ end;
+
+ FADConnection.ConnectionDefName :=
+ TDAEAnyDACDriver(Driver).LookupConnectionString(GetConnectionString, oParams);
+
+ if FDataTypeSchema = 'FIB' then
+ MapAsFIB;
+ finally
+ oParams.Free;
+ end;
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACConnection.MapAsFIB;
+begin
+ with FADConnection.FormatOptions do begin
+ OwnMapRules := True;
+ MapRules.Clear;
+ with MapRules.Add do begin
+ SourceDataType := dtFmtBCD;
+ TargetDataType := dtDouble;
+ end;
+ with MapRules.Add do begin
+ SourceDataType := dtCurrency;
+ TargetDataType := dtDouble;
+ end;
+ with MapRules.Add do begin
+ SourceDataType := dtBCD;
+ TargetDataType := dtBCD;
+ end;
+ with MapRules.Add do begin
+ SourceDataType := dtInt64;
+ TargetDataType := dtBCD;
+ end;
+ end;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACConnection.DoBeginTransaction: integer;
+begin
+ Result := 0;
+ FADConnection.StartTransaction;
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACConnection.DoCommitTransaction;
+begin
+ FADConnection.Commit;
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACConnection.DoRollbackTransaction;
+begin
+ FADConnection.Rollback;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACConnection.DoGetInTransaction: boolean;
+begin
+ result := FADConnection.InTransaction;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACConnection.Native_DoGetLastAutoInc(const GeneratorName: string): integer;
+var
+ v: Variant;
+begin
+ v := FADConnection.GetLastAutoGenValue(GeneratorName);
+ if VarIsNull(v) then
+ Result := -1
+ else
+ Result := v;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACConnection.DoGetLastAutoInc(const GeneratorName: string): integer;
+begin
+ case fDriverType of
+ mkOracle: Result := Oracle_DoGetLastAutoInc(GeneratorName, GetDatasetClass.Create(Self));
+ mkMSSQL: Result := MSSQL_DoGetLastAutoInc(GeneratorName, GetDatasetClass.Create(Self));
+ mkMySQL: Result := MySQL_GetLastAutoInc(GeneratorName, GetDatasetClass.Create(Self));
+ mkInterBase: Result := IB_GetLastAutoInc(GeneratorName, GetDatasetClass.Create(Self));
+ else
+ Result := Native_DoGetLastAutoInc(GeneratorName);
+ end;
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACConnection.DoGetStoredProcedureNames(out List: IROStrings);
+begin
+ inherited;
+ case fDriverType of
+ mkOracle: Oracle_DoGetNames(GetDatasetClass.Create(Self), List, dotProcedure);
+ mkMSSQL: MSSQL_DoGetNames(GetDatasetClass.Create(Self), List, dotProcedure, fMSSQLSchemaEnabled);
+ mkMySQL: MYSQL_DoGetNames(GetDatasetClass.Create(Self), List, dotProcedure, FADConnection.ResultConnectionDef.Database);
+ mkInterbase: IB_GetObjectNames(GetDatasetClass.Create(Self), List, dotProcedure);
+ else
+ DoGetNames(List, dotProcedure);
+ end
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACConnection.DoGetViewNames(out List: IROStrings);
+begin
+ inherited;
+ case fDriverType of
+ mkOracle: Oracle_DoGetNames(GetDatasetClass.Create(Self), List, dotView);
+ mkMSSQL: MSSQL_DoGetNames(GetDatasetClass.Create(Self), List, dotView, fMSSQLSchemaEnabled);
+ mkMySQL: MYSQL_DoGetNames(GetDatasetClass.Create(Self), List, dotView, FADConnection.ResultConnectionDef.Database);
+ mkInterbase: IB_GetObjectNames(GetDatasetClass.Create(Self), List, dotView);
+ else
+ DoGetNames(List, dotView);
+ end
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACConnection.DoGetTableNames(out List: IROStrings);
+begin
+ inherited;
+ case fDriverType of
+ mkOracle: Oracle_DoGetNames(GetDatasetClass.Create(Self), List, dotTable);
+ mkMSSQL: MSSQL_DoGetNames(GetDatasetClass.Create(Self), List, dotTable, fMSSQLSchemaEnabled);
+ mkMySQL: MYSQL_DoGetNames(GetDatasetClass.Create(Self), List, dotTable, FADConnection.ResultConnectionDef.Database);
+ mkInterbase: IB_GetObjectNames(GetDatasetClass.Create(Self), List, dotTable);
+ else
+ DoGetNames(List, dotTable);
+ end
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACConnection.Native_DoGetTableFields(aTableName: string; out Fields: TDAFieldCollection);
+var
+ oMIQ: TADMetaInfoQuery;
+ eAttrs: TADDataAttributes;
+ eBlobType: TDABlobType;
+ lUseROWIDAsPK: Boolean;
+ oFld: TDAField;
+begin
+ aTableName := QuoteIdentifierIfNeeded(aTableName);
+ Fields := TDAFieldCollection.Create(nil);
+ lUseROWIDAsPK := False;
+ oMIQ := TADMetaInfoQuery.Create(nil);
+ try
+ oMIQ.Connection := FADConnection;
+ oMIQ.ObjectName := aTableName;
+ oMIQ.MetaInfoKind := mkTableFields;
+ oMIQ.Open;
+ while not oMIQ.Eof do begin
+ with Fields.Add do begin
+ Name := oMIQ.FieldByName('COLUMN_NAME').AsString;
+ Size := oMIQ.FieldByName('COLUMN_LENGTH').AsInteger;
+ eAttrs := TADDataAttributes({$IFDEF FPC}ord{$ELSE}Word{$ENDIF}(oMIQ.FieldByName('COLUMN_ATTRIBUTES').AsInteger));
+ DataType := MapAD2DADataType(TADDataType(oMIQ.FieldByName('COLUMN_DATATYPE').AsInteger), eBlobType);
+ if eBlobType <> dabtUnknown then
+ BlobType := eBlobType;
+ if (DataType = datInteger) and (caAutoInc in eAttrs) then
+ DataType := datAutoInc;
+ Required := not (caAllowNull in eAttrs);
+ ReadOnly := caReadOnly in eAttrs;
+ if caROWID in eAttrs then begin
+ InPrimaryKey := True;
+ lUseROWIDAsPK := True;
+ end;
+ // DefaultValue
+ // ServerAutoRefresh
+ end;
+ oMIQ.Next;
+ end;
+
+ if not lUseROWIDAsPK then begin
+ oMIQ.Close;
+ oMIQ.BaseObjectName := oMIQ.ObjectName;
+ oMIQ.ObjectName := '';
+ oMIQ.MetaInfoKind := mkPrimaryKeyFields;
+ oMIQ.Open;
+ while not oMIQ.Eof do begin
+ oFld := Fields.FindField(oMIQ.FieldByName('COLUMN_NAME').AsString);
+ if oFld <> nil then
+ oFld.InPrimaryKey := True;
+ oMIQ.Next;
+ end;
+ end;
+
+ finally
+ oMIQ.Free;
+ end;
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACConnection.Native_DoGetForeignKeys(ForeignKeys: TDADriverForeignKeyCollection);
+var
+ oTabs, oFKeys, oFKeyFields: TADMetaInfoQuery;
+ sFKFields, sPKFields: String;
+ oConnMeta: IADPhysConnectionMetadata;
+
+ function QuoteName(const AName: String): String;
+ begin
+ if AName = '' then
+ Result := ''
+ else
+ Result := oConnMeta.NameQuotaChar1 + AName + oConnMeta.NameQuotaChar2;
+ end;
+
+begin
+ GetAnyDACPhysConnection.CreateMetadata(oConnMeta);
+ ForeignKeys := TDADriverForeignKeyCollection.Create(nil);
+ oTabs := TADMetaInfoQuery.Create(nil);
+ oFKeys := TADMetaInfoQuery.Create(nil);
+ oFKeyFields := TADMetaInfoQuery.Create(nil);
+ try
+ oTabs.Connection := FADConnection;
+ oTabs.MetaInfoKind := mkTables;
+ oTabs.TableKinds := [tkTable, tkTempTable, tkLocalTable];
+ oFKeys.MetaInfoKind := mkForeignKeys;
+ oFKeys.Connection := FADConnection;
+ oFKeys.MetaInfoKind := mkForeignKeys;
+ oFKeyFields.Connection := FADConnection;
+ oFKeyFields.MetaInfoKind := mkForeignKeyFields;
+ oTabs.Open;
+ while not oTabs.Eof do begin
+ oFKeys.Close;
+ oFKeys.CatalogName := QuoteName(oTabs.Fields[1].AsString);
+ oFKeys.SchemaName := QuoteName(oTabs.Fields[2].AsString);
+ oFKeys.ObjectName := QuoteName(oTabs.Fields[3].AsString);
+ oFKeys.Open;
+ while not oFKeys.Eof do begin
+ oFKeyFields.Close;
+ oFKeyFields.CatalogName := QuoteName(oFKeys.Fields[1].AsString);
+ oFKeyFields.SchemaName := QuoteName(oFKeys.Fields[2].AsString);
+ oFKeyFields.BaseObjectName := QuoteName(oFKeys.Fields[3].AsString);
+ oFKeyFields.ObjectName := QuoteName(oFKeys.Fields[4].AsString);
+ oFKeyFields.Open;
+ sPKFields := '';
+ sFKFields := '';
+ while not oFKeyFields.Eof do begin
+ if sPKFields <> '' then
+ sPKFields := sPKFields + ',';
+ sPKFields := sPKFields + oFKeyFields.Fields[6].AsString;
+ if sFKFields <> '' then
+ sFKFields := sFKFields + ',';
+ sFKFields := sFKFields + oFKeyFields.Fields[5].AsString;
+ oFKeyFields.Next;
+ end;
+ with ForeignKeys.Add do begin
+ PKTable := FADConnection.EncodeObjectName(oFKeys.Fields[5].AsString,
+ oFKeys.Fields[6].AsString, '', oFKeys.Fields[7].AsString);
+ PKField := sPKFields;
+ FKTable := FADConnection.EncodeObjectName(oFKeys.Fields[1].AsString,
+ oFKeys.Fields[2].AsString, '', oFKeys.Fields[3].AsString);
+ FKField := sFKFields;
+ end;
+ oFKeys.Next;
+ end;
+ oTabs.Next;
+ end;
+ finally
+ oTabs.Free;
+ oFKeys.Free;
+ oFKeyFields.Free;
+ end;
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACConnection.DoGetNames(AList: IROStrings; AObjectType: TDAObjecttype);
+begin
+ case AObjectType of
+ dotTable: FADConnection.GetTableNames('', '', '', AList.Strings, [osMy], [tkTable]);
+ dotProcedure: FADConnection.GetStoredProcNames('', '', '', '', AList.Strings, [osMy]);
+ dotView: FADConnection.GetTableNames('', '', '', AList.Strings, [osMy], [tkView]);
+ end;
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACConnection.DoGetTableFields(const aTableName: string;
+ out Fields: TDAFieldCollection);
+begin
+ case fDriverType of
+ mkOracle: Oracle_DoGetTableFields(QuoteIdentifierIfNeeded(aTableName), GetDatasetClass.Create(Self), Fields);
+ mkMSSQL: MSSQL_DoGetTableFields(QuoteIdentifierIfNeeded(aTableName), GetDatasetClass.Create(Self), Fields);
+ mkMySQL: MYSQL_DoGetTableFields(QuoteIdentifierIfNeeded(aTableName),GetDatasetClass.Create(Self),Fields, FADConnection.ResultConnectionDef.Database);
+ mkInterBase: IB_GetTableFields(QuoteIdentifierIfNeeded(aTableName), GetDatasetClass.Create(Self), Fields);
+ else
+ Native_DoGetTableFields(aTableName,Fields);
+ end;
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACConnection.DoGetStoredProcedureParams(
+ const aStoredProcedureName: string; out Params: TDAParamCollection);
+begin
+ case fDriverType of
+ mkMySQL: MYSQL_DoGetStoredProcedureParams(aStoredProcedureName, GetDatasetClass.Create(Self), Params, FADConnection.ResultConnectionDef.Database);
+ mkOracle: Oracle_DoGetStoredProcedureParams(aStoredProcedureName, GetDatasetClass.Create(Self), Params);
+ else
+ inherited;
+ end;
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACConnection.DoGetForeignKeys(
+ out ForeignKeys: TDADriverForeignKeyCollection);
+begin
+ inherited;
+ case fDriverType of
+ mkOracle: Oracle_DoGetForeignKeys(GetDatasetClass.Create(Self), ForeignKeys);
+ mkMSSQL: MSSQL_DoGetForeignKeys(GetDatasetClass.Create(Self), ForeignKeys, fMSSQLSchemaEnabled);
+ mkMySQL: MYSQL_DoGetForeignKeys(GetDatasetClass.Create(Self), ForeignKeys, FADConnection.ResultConnectionDef.Database);
+ mkInterBase: IB_DoGetForeignKeys(GetDatasetClass.Create(Self), ForeignKeys);
+ else
+ Native_DoGetForeignKeys(ForeignKeys);
+ end;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACConnection.CreateMacroProcessor: TDASQLMacroProcessor;
+begin
+ case fDriverType of
+ mkOracle: Result := Oracle_CreateMacroProcessor;
+ mkMSSQL,mkMSAccess: Result := MSSQL_CreateMacroProcessor;
+ mkInterBase: Result := IB_CreateMacroProcessor;
+ else
+ Result := inherited CreateMacroProcessor;
+ end;
+end;
+
+{------------------------------------------------------------------------------}
+// IDAConnection
+
+function TDAEAnyDACConnection.GetSPSelectSyntax(AHasArguments: Boolean): string;
+begin
+ case fDriverType of
+ mkOracle: Result := Oracle_GetSPSelectSyntax(AHasArguments);
+ mkMSSQL: Result := MSSQL_GetSPSelectSyntax(AHasArguments);
+ mkInterBase: Result := IB_GetSPSelectSyntax(AHasArguments);
+ else
+ Result := inherited GetSPSelectSyntax(AHasArguments);
+ end;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACConnection.Native_GetQuoteChars: TDAQuoteCharArray;
+var
+ oConnMeta: IADPhysConnectionMetadata;
+begin
+ GetAnyDACPhysConnection.CreateMetadata(oConnMeta);
+ result[0] := oConnMeta.NameQuotaChar1;
+ result[1] := oConnMeta.NameQuotaChar2;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACConnection.GetQuoteChars: TDAQuoteCharArray;
+begin
+ case fDriverType of
+ mkMSSQL: Result := MSSQL_GetQuoteChars;
+ mkOracle: Result := Oracle_GetQuoteChars;
+ else
+ Result := Native_GetQuoteChars;
+ end;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACConnection.IdentifierNeedsQuoting(const AIdentifier: string): boolean;
+begin
+ Result := inherited IdentifierNeedsQuoting(AIdentifier);
+ if not Result then
+ case fDriverType of
+ mkORACLE: Result := Oracle_IdentifierNeedsQuoting(AIdentifier);
+ mkMSSQL: Result := MSSQL_IdentifierNeedsQuoting(AIdentifier);
+ mkMySQL: Result := MYSQL_IdentifierNeedsQuoting(AIdentifier);
+ mkInterBase: Result := IB_IdentifierNeedsQuoting(AIdentifier, GetSQLDialect);
+ mkDB2: Result := DB2_IdentifierNeedsQuoting(AIdentifier);
+ mkASA,mkADS: Result := Sybase_IdentifierNeedsQuoting(AIdentifier);
+ else
+ end;
+end;
+
+{------------------------------------------------------------------------------}
+// IDAADOConnection
+
+function TDAEAnyDACConnection.GetCommandTimeout: Integer;
+begin
+ Result := Integer(FADConnection.ResourceOptions.CmdExecTimeout);
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACConnection.SetCommandTimeout(const Value: Integer);
+begin
+ FADConnection.ResourceOptions.CmdExecTimeout := Value;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACConnection.GetProviderName: string;
+begin
+ Result := FADConnection.ResultConnectionDef.DriverID;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACConnection.GetProviderType: TDAOleDBProviderType;
+var
+ s: String;
+begin
+ s := GetProviderName;
+ if SameText(s, S_AD_MSSQLId) then
+ Result := oledb_MSSQL
+ else if SameText(s, S_AD_MSAccId) then
+ Result := oledb_Jet
+ else if SameText(s, S_AD_OraId) then
+ Result := oledb_Oracle
+ else if SameText(s, S_AD_ODBCId) then
+ Result := oledb_ODBC
+ else
+ Result := oledb_Unknown;
+ // oledb_MSSQL2005
+ // oledb_Postgresql
+ // oleDb_VisualFoxPro
+end;
+
+{------------------------------------------------------------------------------}
+// IDAIBTransactionAccess
+
+function TDAEAnyDACConnection.GetTransaction: TObject;
+begin
+ Result := FADConnection.Transaction;
+end;
+
+{------------------------------------------------------------------------------}
+// IDAIBConnectionProperties
+
+function TDAEAnyDACConnection.GetSQLDialect: integer;
+begin
+ Result := StrToIntDef(FADConnection.Params.Values[S_AD_ConnParam_IB_SQLDialect],3);
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACConnection.SetSQLDialect(Value: integer);
+begin
+ FADConnection.Params.Values[S_AD_ConnParam_IB_SQLDialect] := IntToStr(Value);
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACConnection.GetCharset: string;
+begin
+ Result := FADConnection.Params.Values[S_AD_ConnParam_Common_CharacterSet];
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACConnection.SetCharset(const Value: string);
+begin
+ FADConnection.Params.Values[S_AD_ConnParam_Common_CharacterSet] := Value;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACConnection.GetRole: string;
+begin
+ Result := FADConnection.Params.Values[S_AD_ConnParam_IB_RoleName];
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACConnection.SetRole(const Value: string);
+begin
+ FADConnection.Params.Values[S_AD_ConnParam_IB_RoleName] := Value;
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACConnection.Commit;
+begin
+ Self.DoCommitTransaction;
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACConnection.Rollback;
+begin
+ Self.DoRollbackTransaction;
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACConnection.CommitRetaining;
+begin
+ FADConnection.CommitRetaining;
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACConnection.RollbackRetaining;
+begin
+ FADConnection.RollbackRetaining;
+end;
+
+{------------------------------------------------------------------------------}
+// IDAConnectionModelling
+
+function TDAEAnyDACConnection.FieldToDeclaration(aField: TDAField): string;
+begin
+ Result := '';
+ case fDriverType of
+ mkMSSQL:
+ case aField.DataType of
+ datString: result := Format('varchar(%d)', [aField.Size]);
+ datDateTime: result := 'datetime';
+ datFloat: result := 'float';
+ datCurrency: result := 'money';
+ datAutoInc: result := 'int IDENTITY(1,1)';
+ datInteger: result := 'int';
+ datLargeInt: result := 'bigint';
+ datBoolean: result := 'bit';
+ datMemo: result := 'text';
+ datBlob: result := 'image';
+ datWideString: result := Format('nvarchar(%d)', [aField.Size]);
+ datWideMemo: result := 'ntext';
+ datLargeAutoInc: result := 'bigint IDENTITY(1,1)';
+ datByte: result := 'smallint';
+ datShortInt: result := 'smallint';
+ datWord: result := 'int';
+ datSmallInt: result := 'smallint';
+ datCardinal: result := 'bigint';
+ datLargeUInt: result := 'bigint';
+ datGuid: result := 'uniqueidentifier';
+ datXml: result := 'ntext';
+ datDecimal: result := 'decimal';
+ datSingleFloat: result := 'real';
+ end;
+
+ mkOracle:
+ case aField.DataType of
+ datString: result := Format('varchar2(%d)', [aField.Size]);
+ datDateTime: result := 'date';
+ datFloat: result := 'float';
+ datCurrency: result := 'number(19,4)';
+ datAutoInc: result := 'number(10,0)';
+ datInteger: result := 'number(10,0)';
+ datLargeInt: result := 'number(19,0)';
+ datBoolean: result := 'number(1)';
+ datMemo,
+ datBlob:
+ case aField.BlobType of
+ dabtBlob: result := 'long raw';
+ dabtMemo: result := 'long';
+ dabtOraBlob: result := 'blob';
+ dabtOraClob: result := 'clob';
+ else if aField.DataType = datMemo then result := 'long' else result := 'long raw';
+ end;
+ datWideString: result := Format('nvarchar2(%d)', [aField.Size]);
+ datWideMemo: result := 'nclob';
+ datLargeAutoInc: result := 'number(19,0)';
+ datByte: result := 'number(3,0)';
+ datShortInt: result := 'number(3,0)';
+ datWord: result := 'number(5,0)';
+ datSmallInt: result := 'number(5,0)';
+ datCardinal: result := 'number(10,0)';
+ datLargeUInt: result := 'number(19,0)';
+ datGuid: result := 'varchar2(38)';
+ datXml: result := 'XMLType';
+ datDecimal: result := 'number';
+ datSingleFloat: result := 'float';
+ end;
+
+ mkMySQL:
+ case aField.DataType of
+ datString: result := Format('varchar(%d)', [aField.Size]);
+ datDateTime: result := 'datetime';
+ datFloat: result := 'double';
+ datCurrency: result := 'decimal(19,4)';
+ datAutoInc: result := 'int auto_increment';
+ datInteger: result := 'int';
+ datLargeInt: result := 'bigint';
+ datBoolean: result := 'bool';
+ datMemo: result := 'longtext';
+ datBlob: result := 'longblob';
+ datWideString: result := Format('varchar(%d) character set utf8', [aField.Size]);
+ datWideMemo: result := 'longtext character set utf8';
+ datLargeAutoInc: result := 'bigint auto_increment';
+ datByte: result := 'tinyint unsigned';
+ datShortInt: result := 'tinyint';
+ datWord: result := 'smallint unsigned';
+ datSmallInt: result := 'smallint';
+ datCardinal: result := 'int unsigned';
+ datLargeUInt: result := 'bigint unsigned';
+ datGuid: result := 'varchar(38)';
+ datXml: result := 'longtext';
+ datDecimal: result := 'decimal';
+ datSingleFloat: result := 'float';
+ end;
+
+ mkMSAccess:
+ case aField.DataType of
+ datString: result := Format('varchar(%d)', [aField.Size]);
+ datDateTime: result := 'datetime';
+ datFloat: result := 'float';
+ datCurrency: result := 'currency';
+ datAutoInc: result := 'IDENTITY(1,1)';
+ datInteger: result := 'integer';
+ datLargeInt: result := 'decimal(19,0)';
+ datBoolean: result := 'boolean';
+ datMemo: result := 'memo';
+ datBlob: result := 'image';
+ datWideString: result := Format('nchar(%d)', [aField.Size]);
+ datWideMemo: result := 'ntext';
+ datLargeAutoInc: result := 'IDENTITY(1,1)';
+ datByte: result := 'byte';
+ datShortInt: result := 'tinyint';
+ datWord: result := 'smallint';
+ datSmallInt: result := 'smallint';
+ datCardinal: result := 'integer';
+ datLargeUInt: result := 'decimal(19,0)';
+ datGuid: result := 'varchar(38)';
+ datXml: result := 'ntext';
+ datDecimal: result := 'decimal';
+ datSingleFloat: result := 'real';
+ end;
+
+ mkDB2:
+ case aField.DataType of
+ datString: result := Format('varchar(%d)', [aField.Size]);
+ datDateTime: result := 'timestamp';
+ datFloat: result := 'real';
+ datCurrency: result := 'decimal(19,4)';
+ datAutoInc: result := 'integer not null generated always as identity (start with 1, increment by 1, no cache)';
+ datInteger: result := 'integer';
+ datLargeInt: result := 'bigint'; // >= 9.1
+ datBoolean: result := 'smallint';
+ datMemo,
+ datBlob:
+ case aField.BlobType of
+ dabtBlob: result := 'long varchar for bit data';
+ dabtMemo: result := 'long varchar ';
+ dabtOraBlob: result := 'blob';
+ dabtOraClob: result := 'clob';
+ else if aField.DataType = datMemo then result := 'long varchar' else result := 'long varchar for bit data';
+ end;
+ datWideString: result := Format('vargraphic(%d)', [aField.Size]);
+ datWideMemo: result := 'clob';
+ datLargeAutoInc: result := 'bigint not null generated always as identity (start with 1, increment by 1, no cache)'; // >= 9.1
+ datByte: result := 'smallint';
+ datShortInt: result := 'smallint';
+ datWord: result := 'smallint';
+ datSmallInt: result := 'smallint';
+ datCardinal: result := 'integer';
+ datLargeUInt: result := 'bigint'; // >= 9.1
+ datGuid: result := 'varchar(38)';
+ datXml: result := 'clob';
+ datDecimal: result := 'number';
+ datSingleFloat: result := 'real';
+ end;
+
+ mkASA:
+ case aField.DataType of
+ datString: result := Format('varchar(%d)', [aField.Size]);
+ datDateTime: result := 'timestamp';
+ datFloat: result := 'double';
+ datCurrency: result := 'money';
+ datAutoInc: result := 'integer identity(1,1)';
+ datInteger: result := 'integer';
+ datLargeInt: result := 'bigint';
+ datBoolean: result := 'bit';
+ datMemo: result := 'text';
+ datBlob: result := 'image';
+ datWideString: result := Format('nvarchar(%d)', [aField.Size]);
+ datWideMemo: result := 'ntext';
+ datLargeAutoInc: result := 'bigint identity(1,1)';
+ datByte: result := 'unsigned tinyint';
+ datShortInt: result := 'tinyint';
+ datWord: result := 'unsigned smallint';
+ datSmallInt: result := 'smallint';
+ datCardinal: result := 'unsigned integer';
+ datLargeUInt: result := 'unsigned bigint';
+ datGuid: result := 'uniqueidentifierstr';
+ datXml: result := 'xml';
+ datDecimal: result := 'decimal';
+ datSingleFloat: result := 'real';
+ end;
+
+ mkInterbase:
+ case aField.DataType of
+ datString: result := Format('varchar(%d)', [aField.Size]);
+ datDateTime: result := 'timestamp';
+ datFloat: result := 'double precision';
+ datCurrency: result := 'decimal(18,4)';
+ datAutoInc: result := 'integer';
+ datInteger: result := 'integer';
+ datLargeInt: result := 'decimal(18,0)';
+ datBoolean: result := 'integer check (value in (0, 1))';
+ datMemo,
+ datBlob:
+ case aField.BlobType of
+ dabtBlob: result := 'blob(2000,0)';
+ dabtMemo: result := 'blob(2000,1)';
+ dabtOraBlob: result := 'blob(2000,0)';
+ dabtOraClob: result := 'blob(2000,1)';
+ else if aField.DataType = datMemo then result := 'blob(2000,1)' else result := 'blob(2000,0)';
+ end;
+ datWideString: result := Format('varchar(%d) character set unicode_fss', [aField.Size]);
+ datWideMemo: result := 'blob sub_type 1 segment size 2000 character set unicode_fss';
+ datLargeAutoInc: result := 'decimal(18,0)';
+ datByte: result := 'smallint';
+ datShortInt: result := 'smallint';
+ datWord: result := 'smallint';
+ datSmallInt: result := 'smallint';
+ datCardinal: result := 'decimal(10,0)';
+ datLargeUInt: result := 'decimal(18,0)';
+ datGuid: result := 'varchar(38)';
+ datXml: result := 'blob(2000,1)';
+ datDecimal: result := 'decimal(18,6)';
+ datSingleFloat: result := 'float';
+ end;
+ end;
+
+ if Result = '' then
+ raise Exception.CreateFmt('DataAbstract [%d] data type of field [%s] for DBMS [%s] is not supported',
+ [Integer(aField.DataType), aField.Name, C_AD_PhysRDBMSKinds[fDriverType]]);
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACConnection.BuildCreateTableSQL(aDataSet: TDADataSet;
+ const aOverrideName: string): string;
+var
+ lName: string;
+begin
+ lName := aOverrideName;
+ if lName = '' then
+ lName := aDataSet.Name;
+ result := uDAHelpers.BuildCreateStatementForTable(aDataSet, lName, self);
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACConnection.CreateTable(aDataSet: TDADataSet; const aOverrideName: string);
+var
+ sSQL: string;
+begin
+ sSQL := BuildCreateTableSQL(aDataSet, aOverrideName);
+ with NewCommand(sSQL, stSQL) do
+ Execute();
+end;
+
+{------------------------------------------------------------------------------}
+// IDACanQueryDatabaseNames
+
+function TDAEAnyDACConnection.GetDatabaseNames: IROStrings;
+begin
+ case fDriverType of
+ mkMSSQL: Result := MSSQL_GetDatabaseNames(Self);
+ mkMySQL: Result := MYSQL_GetDatabaseNames(GetDatasetClass.Create(Self));
+ else
+ Result := NewROStrings;
+ end;
+end;
+
+{------------------------------------------------------------------------------}
+// IDAFileBasedDatabase
+
+function TDAEAnyDACConnection.GetFileExtensions: IROStrings;
+begin
+ case fDriverType of
+ mkInterBase: Result := IB_GetFileExtensions;
+ mkMSAccess: Result := MSACCESS_GetFileExtensions;
+ else
+ Result := NewROStrings;
+ end;
+end;
+
+{------------------------------------------------------------------------------}
+// IDAUseGenerators
+
+function TDAEAnyDACConnection.GetNextAutoinc(const GeneratorName: string): integer;
+begin
+ Result := -1;
+ case fDriverType of
+ mkInterBase: Result := IB_GetNextAutoinc(GeneratorName, GetDatasetClass.Create(Self));
+ mkOracle: Result := Oracle_GetNextAutoinc(GeneratorName, GetDatasetClass.Create(Self));
+ end;
+end;
+
+{------------------------------------------------------------------------------}
+// IDACanQueryGeneratorsNames
+
+function TDAEAnyDACConnection.GetGeneratorNames: IROStrings;
+begin
+ case fDriverType of
+ mkInterBase: Result := IB_GetGeneratorNames(GetDatasetClass.Create(Self));
+ else
+ Result := NewROStrings;
+ end;
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACConnection.SetupOptions(AOptions: IADStanOptions;
+ AFetchMeta: Boolean);
+begin
+ with AOptions do begin
+ if not fBiDirectionalDataSets then
+ FetchOptions.Unidirectional := True;
+ FetchOptions.Mode := fmAll;
+ if not AFetchMeta then
+ FetchOptions.Items := FetchOptions.Items - [fiMeta];
+ FetchOptions.RowsetSize := 500;
+ ResourceOptions.SilentMode := True;
+ end;
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACConnection.SetupDataset(ADataSet: TADRdbmsDataSet;
+ AFetchMeta: Boolean);
+begin
+ TADQuery(ADataSet).Connection := FADConnection;
+ SetupOptions(IADStanOptions(TADQuery(ADataSet).Command), AFetchMeta);
+end;
+
+{------------------------------------------------------------------------------}
+{ TDAEAnyDACQuery }
+{------------------------------------------------------------------------------}
+function TDAEAnyDACQuery.CreateDataset(aConnection: TDAEConnection): TDataset;
+begin
+ result := TADQuery.Create(nil);
+ TDAEAnyDACConnection(aConnection).SetupDataset(TADQuery(result), False);
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACQuery.DoPrepare(AValue: boolean);
+var
+ i: integer;
+ oPar: TADParam;
+begin
+ if AValue and not TADQuery(Dataset).Prepared and (TADQuery(Dataset).ParamCount <> 0) then
+ for I := 0 to GetParams.Count - 1 do begin
+ oPar := TADQuery(Dataset).ParamByName(GetParams[i].Name);
+ oPar.DataType := DATypeToVCLType(GetParams[i].DataType);
+ if oPar.DataType = ftAutoInc then
+ oPar.DataType := ftInteger;
+ end;
+ TADQuery(Dataset).Prepared := AValue;
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACQuery.ClearParams;
+begin
+ inherited;
+ TADQuery(Dataset).Params.Clear;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACQuery.DoExecute: integer;
+begin
+ with TADQuery(Dataset) do begin
+ // 1) SELECT command on MSSQL, etc may be without result set, for example:
+ // SELECT :CUSTOMERS_CNT = count(*) from customers
+ // 2) On Oracle skExecute is handled specially (PL/SQL) and commands as
+ // above are not possible
+ if PointedConnection.RDBMSKind <> mkOracle then
+ Command.CommandKind := skExecute;
+ ExecSQL;
+ Result := RowsAffected;
+ end;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACQuery.DoGetSQL: string;
+begin
+ Result := TADQuery(Dataset).SQL.Text;
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACQuery.DoSetSQL(const AValue: string);
+begin
+ TADQuery(Dataset).SQL.Text := AValue;
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACQuery.SetParamValues(AParams: TDAParamCollection);
+begin
+ SetADParamValuesFromDA(AParams, TADQuery(Dataset).Params, True);
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACQuery.GetParamValues(AParams: TDAParamCollection);
+begin
+ GetDAParamValuesFromAD(GetParams, TADQuery(Dataset).Params);
+end;
+
+{------------------------------------------------------------------------------}
+{ TDAEAnyDACStoredProcedure }
+{------------------------------------------------------------------------------}
+function TDAEAnyDACStoredProcedure.CreateDataset(AConnection: TDAEConnection): TDataset;
+begin
+ Result := TADStoredProc.Create(nil);
+ TDAEAnyDACConnection(aConnection).SetupDataset(TADStoredProc(Result), True);
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACStoredProcedure.GetStoredProcedureName: string;
+begin
+ Result := TADStoredProc(DataSet).StoredProcName;
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACStoredProcedure.SetStoredProcedureName(const Name: string);
+begin
+ TADStoredProc(DataSet).StoredProcName := Name;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACStoredProcedure.DoExecute: integer;
+begin
+ TADStoredProc(Dataset).ExecProc;
+ result := TADStoredProc(Dataset).RowsAffected;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACStoredProcedure.Execute: integer;
+var
+ oADParams: TADParams;
+ oDAParams: TDAParamCollection;
+begin
+ oADParams := TADStoredProc(Dataset).Params;
+ oDAParams := GetParams;
+ if oADParams.Count <> oDAParams.Count then
+ TADStoredProc(Dataset).Prepare;
+ SetADParamValuesFromDA(oDAParams, oADParams, False);
+ Result := DoExecute;
+ GetDAParamValuesFromAD(oDAParams, oADParams);
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACStoredProcedure.RefreshParams;
+var
+ oDAParams: TDAParamCollection;
+ oDAParam: TDAParam;
+ i: Integer;
+begin
+ TADStoredProc(Dataset).Prepare;
+ oDAParams := GetParams;
+ oDAParams.Clear;
+ with TADStoredProc(Dataset) do
+ for i := 0 to Params.Count - 1 do begin
+ oDAParam := oDAParams.Add;
+ oDAParam.Name := Params[i].Name;
+ oDAParam.DataType := VCLTypeToDAType(Params[i].DataType);
+ oDAParam.ParamType := TDAParamType(Params[i].ParamType);
+ oDAParam.Size := Params[i].Size;
+ end;
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACStoredProcedure.SetParamValues(AParams: TDAParamCollection);
+begin
+ SetADParamValuesFromDA(AParams, TADStoredProc(Dataset).Params, False);
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACStoredProcedure.GetParamValues(AParams: TDAParamCollection);
+begin
+ GetDAParamValuesFromAD(AParams, TADStoredProc(Dataset).Params);
+end;
+
+{------------------------------------------------------------------------------}
+{ TDAEAnyDACNativeField }
+{------------------------------------------------------------------------------}
+constructor TDAEAnyDACNativeField.Create(ACol: TADDatSColumn; const ACmd: IADPhysCommand);
+begin
+ inherited Create;
+ FCol := ACol;
+ FCmd := ACmd;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACNativeField.GetDataType: TFieldType;
+var
+ iDestSize: Longword;
+ iDestPrec: Integer;
+begin
+ FCmd.Options.FormatOptions.ColumnDef2FieldDef(FCol.DataType, FCol.Scale,
+ FCol.Precision, FCol.Size, FCol.Attributes, Result, iDestSize, iDestPrec);
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACNativeField.GetDecimalPrecision: Integer;
+begin
+ Result := FCol.Precision;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACNativeField.GetDecimalScale: Integer;
+begin
+ Result := FCol.Scale;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACNativeField.GetFieldName: string;
+begin
+ Result := FCol.Name;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACNativeField.GetNativeObject: TObject;
+begin
+ Result := Self;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACNativeField.GetSize: integer;
+begin
+ Result := FCol.Size;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACNativeField.isTFieldCompatible: Boolean;
+begin
+ Result := False;
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACNativeField.SetDataType(Value: TFieldType);
+var
+ eDestType: TADDataType;
+ iDestScale: Integer;
+ iDestPrec: Integer;
+ iDestSize: LongWord;
+ iDestAttrs: TADDataAttributes;
+begin
+ FCmd.Options.FormatOptions.FieldDef2ColumnDef(Value, FCol.Size, FCol.Precision,
+ eDestType, iDestScale, iDestPrec, iDestSize, iDestAttrs);
+ FCol.DataType := eDestType;
+ FCol.Attributes := iDestAttrs;
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACNativeField.SetDecimalPrecision(Value: integer);
+begin
+ FCol.Precision := Value;
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACNativeField.SetDecimalScale(Value: integer);
+begin
+ FCol.Scale := Value;
+end;
+
+{------------------------------------------------------------------------------}
+{ TDAEAnyDACNativeDatabaseAccess }
+{------------------------------------------------------------------------------}
+constructor TDAEAnyDACNativeDatabaseAccess.Create(ADAEConnection: TDAEAnyDACConnection);
+begin
+ inherited Create;
+ ADAEConnection.FADConnection.ConnectionIntf.CreateCommand(FCmd);
+ FTab := TADDatSTable.Create;
+end;
+
+{------------------------------------------------------------------------------}
+destructor TDAEAnyDACNativeDatabaseAccess.Destroy;
+begin
+ FCmd := nil;
+ FreeAndNil(FTab);
+ inherited Destroy;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACNativeDatabaseAccess._AddRef: Integer;
+begin
+ Result := 1;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACNativeDatabaseAccess._Release: Integer;
+begin
+ Result := 1;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACNativeDatabaseAccess.QueryInterface(const IID: TGUID; out Obj): HResult;
+begin
+ if GetInterface(IID, Obj) then
+ Result := 0
+ else
+ Result := E_NOINTERFACE;
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACNativeDatabaseAccess.CheckActive;
+begin
+ if not (nfActive in FFlags) then
+ raise Exception.Create('Dataset must be active');
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACNativeDatabaseAccess.CheckBidir;
+begin
+ if FCmd.Options.FetchOptions.Unidirectional then
+ raise Exception.Create('Dataset must be bidirectional');
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACNativeDatabaseAccess.ClearFieldDefs;
+begin
+ FTab.Reset;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACNativeDatabaseAccess.GetRecordCount: Integer;
+begin
+ Result := FRowsPurged + FTab.Rows.Count;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACNativeDatabaseAccess.GetBOF: Boolean;
+begin
+ Result := nfBOF in FFlags;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACNativeDatabaseAccess.GetEOF: Boolean;
+begin
+ Result := nfEOF in FFlags;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACNativeDatabaseAccess.GetActive: Boolean;
+begin
+ Result := nfActive in FFlags;
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACNativeDatabaseAccess.SetActive(const aValue: Boolean);
+var
+ i: Integer;
+begin
+ if (nfActive in FFlags) <> aValue then
+ if aValue then begin
+ FCmd.Open;
+ FCmd.Define(FTab);
+ FCmd.Fetch(FTab, False);
+ FRowIndex := 0;
+ FRowsPurged := 0;
+ if FTab.Rows.Count = 0 then
+ Include(FFlags, nfEOF);
+ Include(FFlags, nfBOF);
+ Include(FFlags, nfActive);
+ SetLength(FBuffs, FTab.Columns.Count);
+ for i := 0 to FTab.Columns.Count - 1 do
+ case FTab.Columns[i].DataType of
+ dtDateTimeStamp,
+ dtTime,
+ dtDate:
+ GetMem(FBuffs[i], SizeOf(TDateTime));
+ dtGUID:
+ GetMem(FBuffs[i], 39);
+ dtCurrency:
+ GetMem(FBuffs[i], SizeOf(Double));
+ dtBCD:
+ GetMem(FBuffs[i], SizeOf(Currency));
+ else
+ FBuffs[i] := nil;
+ end;
+ end
+ else begin
+ FCmd.AbortJob(True);
+ FCmd.CloseAll;
+ FTab.Clear;
+ FRowIndex := 0;
+ FRowsPurged := 0;
+ Exclude(FFlags, nfActive);
+ for i := 0 to FTab.Columns.Count - 1 do
+ if FBuffs[i] <> nil then
+ FreeMem(FBuffs[i]);
+ SetLength(FBuffs, 0);
+ end;
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACNativeDatabaseAccess.First;
+begin
+ CheckActive;
+ CheckBidir;
+ FRowIndex := 0;
+ if FTab.Rows.Count = 0 then
+ Include(FFlags, nfEOF);
+ Include(FFlags, nfBOF);
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACNativeDatabaseAccess.Next;
+begin
+ CheckActive;
+ Exclude(FFlags, nfEOF);
+ if FRowIndex >= FTab.Rows.Count - 1 then begin
+ if FCmd.State = csOpen then begin
+ if FCmd.Options.FetchOptions.Unidirectional then begin
+ Inc(FRowsPurged, FTab.Rows.Count);
+ FTab.Clear;
+ FRowIndex := -1;
+ end;
+ FCmd.Fetch(FTab, False);
+ if FCmd.RowsAffected = 0 then
+ Include(FFlags, nfEOF);
+ end
+ else
+ Include(FFlags, nfEOF);
+ end;
+ if FRowIndex < FTab.Rows.Count - 1 then
+ Inc(FRowIndex);
+ if FRowIndex <= 0 then
+ Include(FFlags, nfBOF)
+ else
+ Exclude(FFlags, nfBOF);
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACNativeDatabaseAccess.LocateRecord(const KeyFields: string;
+ const KeyValues: Variant; Options: TLocateOptions; AChangePos: Boolean): Integer;
+var
+ oCols: TADDatSColumnSublist;
+ iPrevRowIndex: Integer;
+ ePrevFlags: TDAEAnyDACNativeDatabaseAccessFlags;
+ lSimple: Boolean;
+ lEQ: Boolean;
+ i: Integer;
+ V1, V2: Variant;
+begin
+ Result := -1;
+ oCols := TADDatSColumnSublist.Create;
+ iPrevRowIndex := FRowIndex;
+ ePrevFlags := FFlags;
+ try
+ oCols.Fill(FTab, KeyFields);
+ lSimple := (oCols.Count = 1) and VarIsArray(KeyValues);
+ First;
+ while not (nfEOF in FFlags) do begin
+ lEQ := False;
+ for i := 0 to oCols.Count - 1 do begin
+ V1 := FTab.Rows[FRowIndex].GetData(oCols[i]);
+ if lSimple then
+ V2 := KeyValues
+ else
+ V2 := KeyValues[i];
+ if VarIsNull(V1) and VarIsNull(V2) then
+ lEQ := True
+ else if VarIsNull(V1) xor VarIsNull(V2) then
+ lEQ := False
+ else if oCols[i].DataType in [dtAnsiString, dtWideString, dtMemo,
+ dtWideMemo, dtHMemo, dtWideHMemo] then
+ if loCaseInsensitive in Options then begin
+ if loPartialKey in Options then
+ lEQ := Pos(AnsiLowerCase(VarToStr(V2)), AnsiLowerCase(VarToStr(V1))) = 1
+ else
+ lEQ := AnsiCompareText(VarToStr(V2), VarToStr(V1)) = 0;
+ end
+ else if loPartialKey in Options then
+ lEQ := Pos(VarToStr(V2), VarToStr(V1)) = 1
+ else
+ lEQ := CompareStr(VarToStr(V2), VarToStr(V1)) = 0
+ else
+ try
+ lEQ := V1 = V2;
+ except
+ lEQ := False;
+ end;
+ if not lEQ then
+ Exit;
+ end;
+ if lEQ then begin
+ Result := FRowIndex;
+ Break;
+ end;
+ Next;
+ end;
+ finally
+ oCols.Free;
+ if (Result = -1) or not AChangePos then begin
+ FRowIndex := iPrevRowIndex;
+ FFlags := ePrevFlags;
+ end;
+ end;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACNativeDatabaseAccess.Locate(const KeyFields: string;
+ const KeyValues: Variant; Options: TLocateOptions): Boolean;
+begin
+ Result := LocateRecord(KeyFields, KeyValues, Options, True) <> -1;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACNativeDatabaseAccess.Lookup(const KeyFields: string;
+ const KeyValues: Variant; const ResultFields: string): Variant;
+var
+ iRowIndex, i: Integer;
+ oCols: TADDatSColumnSublist;
+begin
+ iRowIndex := LocateRecord(KeyFields, KeyValues, [], False);
+ if iRowIndex <> -1 then begin
+ oCols := TADDatSColumnSublist.Create;
+ try
+ if oCols.Count = 1 then
+ Result := FTab.Rows[iRowIndex].GetData(oCols[0])
+ else begin
+ Result := VarArrayCreate([0, oCols.Count - 1], varVariant);
+ for i := 0 to oCols.Count - 1 do
+ Result[i] := FTab.Rows[iRowIndex].GetData(oCols[i]);
+ end;
+ finally
+ oCols.Free;
+ end
+ end
+ else
+ Result := Null;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACNativeDatabaseAccess.GetFieldName(Index: Integer): string;
+begin
+ Result := FTab.Columns[Index].Name;
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACNativeDatabaseAccess.DisableControls;
+begin
+ // nothing
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACNativeDatabaseAccess.EnableControls;
+begin
+ // nothing
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACNativeDatabaseAccess.ControlsDisabled: Boolean;
+begin
+ // nothing
+ Result := True;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACNativeDatabaseAccess.GetIsEmpty: boolean;
+begin
+ Result := (FRowsPurged + FTab.Rows.Count) = 0;
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACNativeDatabaseAccess.FreeBookmark(Bookmark: TBookmark);
+begin
+ // nothing
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACNativeDatabaseAccess.GetBookMark: pointer;
+begin
+ CheckActive;
+ CheckBidir;
+ Result := Pointer(FRowIndex);
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACNativeDatabaseAccess.GotoBookmark(Bookmark: TBookmark);
+begin
+ CheckActive;
+ CheckBidir;
+ FRowIndex := Integer(Bookmark);
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACNativeDatabaseAccess.GetState: TDatasetState;
+begin
+ if FCmd.State = csExecuting then
+ Result := dsOpening
+ else if nfActive in FFlags then
+ Result := dsBrowse
+ else
+ Result := dsInactive;
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACNativeDatabaseAccess.Prepare(const AValue: Boolean);
+begin
+ if AValue then
+ FCmd.Prepare
+ else
+ FCmd.Unprepare;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACNativeDatabaseAccess.GetFields(Index: integer): IDANativeField;
+begin
+ Result := TDAEAnyDACNativeField.Create(FTab.Columns[Index], FCmd) as IDANativeField;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACNativeDatabaseAccess.FieldCount: Integer;
+begin
+ Result := FTab.Columns.Count;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACNativeDatabaseAccess.FindField(const FieldName: string): IDANativeField;
+var
+ i: Integer;
+begin
+ i := FTab.Columns.IndexOfName(FieldName);
+ if i = -1 then
+ Result := nil
+ else
+ Result := GetFields(i);
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACNativeDatabaseAccess.IsTDatasetCompatible: Boolean;
+begin
+ Result := False;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACNativeDatabaseAccess.GetNativeFieldData(Index: Integer;
+ var Data: pointer; var DataSize: cardinal): Boolean;
+
+ procedure CvtGUID(ABuff: PChar; AGuid: PGUID);
+ begin
+ with AGuid^ do
+ StrLFmt(ABuff, 38,
+ '{%.8x-%.4x-%.4x-%.2x%.2x-%.2x%.2x%.2x%.2x%.2x%.2x}',
+ [D1, D2, D3, D4[0], D4[1], D4[2], D4[3], D4[4], D4[5], D4[6], D4[7]]);
+ end;
+
+ procedure ErrNotSupported(AType: TADDataType);
+ begin
+ raise Exception.CreateFmt('AnyDAC data type [%s] is not supported by DataAbstract',
+ [C_AD_DataTypeNames[AType]]);
+ end;
+
+begin
+ CheckActive;
+ if (FRowIndex >= 0) and (FRowIndex < FTab.Rows.Count) then begin
+ Result := FTab.Rows[FRowIndex].GetData(Index, rvDefault, Data, 0, DataSize, False);
+ if Result then
+ case FTab.Columns[Index].DataType of
+ dtWideString,
+ dtWideMemo,
+ dtWideHMemo:
+ DataSize := DataSize * SizeOf(WideChar);
+ dtDateTimeStamp:
+ begin
+ PDateTime(FBuffs[Index])^ := ADSQLTimeStampToDateTime(PADSQLTimeStamp(Data)^);
+ DataSize := SizeOf(TDateTime);
+ Data := FBuffs[Index];
+ end;
+ dtTime:
+ begin
+ PDateTime(FBuffs[Index])^ := ADTime2DateTime(PLongint(Data)^);
+ DataSize := SizeOf(TDateTime);
+ Data := FBuffs[Index];
+ end;
+ dtDate:
+ begin
+ PDateTime(FBuffs[Index])^ := ADDate2DateTime(PLongint(Data)^);
+ DataSize := SizeOf(TDateTime);
+ Data := FBuffs[Index];
+ end;
+ dtGUID:
+ begin
+ CvtGUID(PChar(FBuffs[Index]), PGuid(Data));
+ DataSize := 38;
+ Data := FBuffs[Index];
+ end;
+ dtCurrency:
+ begin
+ PDouble(FBuffs[Index])^ := PCurrency(Data)^;
+ DataSize := SizeOf(Double);
+ Data := FBuffs[Index];
+ end;
+ dtBCD:
+ begin
+ BCDToCurr(PBCD(Data)^, PCurrency(FBuffs[Index])^);
+ DataSize := SizeOf(Currency);
+ Data := FBuffs[Index];
+ end;
+ dtRowSetRef,
+ dtCursorRef,
+ dtRowRef,
+ dtArrayRef,
+ dtParentRowRef,
+ dtObject:
+ ErrNotSupported(FTab.Columns[Index].DataType);
+ end;
+ end
+ else
+ Result := False;
+ if not Result then begin
+ DataSize := 0;
+ Data := nil;
+ end;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACNativeDatabaseAccess.GetNativeFieldValue(Index: Integer): Variant;
+begin
+ CheckActive;
+ if (FRowIndex >= 0) and (FRowIndex < FTab.Rows.Count) then
+ Result := FTab.Rows[FRowIndex].GetData(Index)
+ else
+ Result := Null;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACNativeDatabaseAccess.CanFreeNativeFieldData: Boolean;
+begin
+ Result := False;
+end;
+
+{------------------------------------------------------------------------------}
+{ TDAEAnyDACQueryNative }
+{------------------------------------------------------------------------------}
+function TDAEAnyDACQueryNative.GetNativeObject: TDAEAnyDACNativeDatabaseAccess;
+begin
+ Result := TDAEAnyDACNativeDatabaseAccess(inherited NativeObject);
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACQueryNative.CreateDataset(aConnection: TDAEConnection): TDataset;
+begin
+ Result := nil;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACQueryNative.CreateNativeDatabaseAccess: IDANativeDatabaseAccess;
+begin
+ Supports(NativeObject, IDANativeDatabaseAccess, Result);
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACQueryNative.CreateNativeObject(aConnection: TDAEConnection): TObject;
+begin
+ Result := TDAEAnyDACNativeDatabaseAccess.Create(TDAEAnyDACConnection(aConnection));
+ TDAEAnyDACConnection(aConnection).SetupOptions(TDAEAnyDACNativeDatabaseAccess(Result).FCmd.Options, False);
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACQueryNative.DoPrepare(AValue: boolean);
+var
+ i: integer;
+ oPar: TADParam;
+begin
+ if AValue and (NativeObject.FCmd.State <> csPrepared) and (NativeObject.FCmd.Params.Count <> 0) then
+ for I := 0 to GetParams.Count - 1 do begin
+ oPar := NativeObject.FCmd.Params.ParamByName(GetParams[i].Name);
+ oPar.DataType := DATypeToVCLType(GetParams[i].DataType);
+ if oPar.DataType = ftAutoInc then
+ oPar.DataType := ftInteger;
+ end;
+ if AValue then
+ NativeObject.FCmd.Prepare
+ else
+ NativeObject.FCmd.Unprepare;
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACQueryNative.ClearParams;
+begin
+ inherited;
+ NativeObject.FCmd.Params.Clear;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACQueryNative.DoExecute: integer;
+var
+ oConnMeta: IADPhysConnectionMetadata;
+begin
+ with NativeObject.FCmd do begin
+ // 1) SELECT command on MSSQL, etc may be without result set, for example:
+ // SELECT :CUSTOMERS_CNT = count(*) from customers
+ // 2) On Oracle skExecute is handled specially (PL/SQL) and commands as
+ // above are not possible
+ Connection.CreateMetadata(oConnMeta);
+ if oConnMeta.Kind <> mkOracle then
+ CommandKind := skExecute;
+ Execute;
+ if RowsAffectedReal then
+ Result := RowsAffected
+ else
+ Result := 0;
+ end;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACQueryNative.DoGetSQL: string;
+begin
+ Result := NativeObject.FCmd.CommandText;
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACQueryNative.DoSetSQL(const AValue: string);
+begin
+ NativeObject.FCmd.CommandText := AValue;
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACQueryNative.SetParamValues(AParams: TDAParamCollection);
+begin
+ SetADParamValuesFromDA(AParams, NativeObject.FCmd.Params, True);
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACQueryNative.GetParamValues(AParams: TDAParamCollection);
+begin
+ GetDAParamValuesFromAD(GetParams, NativeObject.FCmd.Params);
+end;
+
+{------------------------------------------------------------------------------}
+{ TDAEAnyDACStoredProcedureNative }
+{------------------------------------------------------------------------------}
+function TDAEAnyDACStoredProcedureNative.GetNativeObject: TDAEAnyDACNativeDatabaseAccess;
+begin
+ Result := TDAEAnyDACNativeDatabaseAccess(inherited NativeObject);
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACStoredProcedureNative.CreateDataset(aConnection: TDAEConnection): TDataset;
+begin
+ Result := nil;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACStoredProcedureNative.CreateNativeDatabaseAccess: IDANativeDatabaseAccess;
+begin
+ Supports(NativeObject, IDANativeDatabaseAccess, Result);
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACStoredProcedureNative.CreateNativeObject(aConnection: TDAEConnection): TObject;
+begin
+ Result := TDAEAnyDACNativeDatabaseAccess.Create(TDAEAnyDACConnection(aConnection));
+ TDAEAnyDACNativeDatabaseAccess(Result).FCmd.CommandKind := skStoredProc;
+ TDAEAnyDACConnection(aConnection).SetupOptions(TDAEAnyDACNativeDatabaseAccess(Result).FCmd.Options, False);
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACStoredProcedureNative.GetStoredProcedureName: string;
+begin
+ Result := NativeObject.FCmd.CommandText;
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACStoredProcedureNative.SetStoredProcedureName(const Name: string);
+begin
+ NativeObject.FCmd.CommandText := Name;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACStoredProcedureNative.DoExecute: integer;
+begin
+ with NativeObject.FCmd do begin
+ Execute();
+ if RowsAffectedReal then
+ Result := RowsAffected
+ else
+ Result := 0;
+ end;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAEAnyDACStoredProcedureNative.Execute: integer;
+var
+ oADParams: TADParams;
+ oDAParams: TDAParamCollection;
+begin
+ oADParams := NativeObject.FCmd.Params;
+ oDAParams := GetParams;
+ if oADParams.Count <> oDAParams.Count then
+ NativeObject.FCmd.Prepare;
+ SetADParamValuesFromDA(oDAParams, oADParams, False);
+ Result := DoExecute;
+ GetDAParamValuesFromAD(oDAParams, oADParams);
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACStoredProcedureNative.RefreshParams;
+var
+ oDAParams: TDAParamCollection;
+ oDAParam: TDAParam;
+ i: Integer;
+begin
+ NativeObject.FCmd.Prepare;
+ oDAParams := GetParams;
+ oDAParams.Clear;
+ with NativeObject.FCmd do
+ for i := 0 to Params.Count - 1 do begin
+ oDAParam := oDAParams.Add;
+ oDAParam.Name := Params[i].Name;
+ oDAParam.DataType := VCLTypeToDAType(Params[i].DataType);
+ oDAParam.ParamType := TDAParamType(Params[i].ParamType);
+ oDAParam.Size := Params[i].Size;
+ end;
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACStoredProcedureNative.GetParamValues(AParams: TDAParamCollection);
+begin
+ SetADParamValuesFromDA(AParams, NativeObject.FCmd.Params, False);
+end;
+
+{------------------------------------------------------------------------------}
+procedure TDAEAnyDACStoredProcedureNative.SetParamValues(AParams: TDAParamCollection);
+begin
+ GetDAParamValuesFromAD(AParams, NativeObject.FCmd.Params);
+end;
+
+{------------------------------------------------------------------------------}
+{ Registration and factory code }
+{------------------------------------------------------------------------------}
+var
+ _driver: TDAEDriver = nil;
+
+{------------------------------------------------------------------------------}
+procedure Register;
+begin
+ RegisterComponents(DAPalettePageName, [TDAAnyDACDriver]);
+end;
+
+{------------------------------------------------------------------------------}
+function GetDriverObject: IDADriver;
+begin
+{$IFDEF DataAbstract_SchemaModelerOnly}
+ if not RunningInSchemaModeler then begin
+ result := nil;
+ exit;
+ end;
+{$ENDIF}
+ if _driver = nil then
+ _driver := TDAEAnyDACDriver.Create(nil);
+ result := _driver;
+end;
+
+{------------------------------------------------------------------------------}
+exports
+ GetDriverObject name func_GetDriverObject;
+
+initialization
+{$IFDEF FPC}
+ {$I DataAbstract_AnyDACDriver_Glyphs.lrs}
+{$ENDIF}
+ _driver := nil;
+ RegisterDriverProc(GetDriverObject);
+
+finalization
+ UnregisterDriverProc(GetDriverObject);
+ FreeAndNil(_driver);
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDABDEDriver.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDABDEDriver.pas
new file mode 100644
index 0000000..185fe9e
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDABDEDriver.pas
@@ -0,0 +1,1204 @@
+unit uDABDEDriver;
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Driver Library
+{
+{ compiler: Delphi 6 and up
+{ platform: Win32
+{
+{ (c)opyright RemObjects Software. all rights reserved.
+{
+{ Using this code requires a valid license of the Data Abstract
+{ which can be obtained at http://www.remobjects.com.
+{----------------------------------------------------------------------------}
+
+{$I ..\DataAbstract.inc}
+
+{$R DataAbstract_BDEDriver_Glyphs.res}
+{$DEFINE MAX_SUPPORT}
+interface
+
+uses DB, uDAEngine, uDAInterfaces, uROClasses, uDAInterfacesEx, uDAUtils, DBTables,
+ uDAIBInterfaces, uDAADOInterfaces, uDAOracleInterfaces, uDADB2Interfaces, uDASybaseInterfaces;
+
+type
+ TDABDEProviderType = (
+ bdeSTANDARD,
+ bdeDB2,
+ bdeINFORMIX,
+ bdeINTRBASE,
+ bdeMSACCESS,
+ bdeMSSQL,
+ bdeORACLE,
+ bdeSYBASE,
+ bdeODBC);
+
+ { TDABDEDriver }
+ TDABDEDriver = class(TDADriverReference)
+ end;
+
+ { TDAEADODriver }
+ TDAEBDEDriver = class(TDAEDriver, IDADriver40)
+ protected
+ function GetConnectionClass: TDAEConnectionClass; override;
+ // IDADriver
+ function GetDriverID: string; override;
+ function GetDescription: string; override;
+ procedure GetAuxDrivers(out List: IROStrings); override;
+ procedure GetAuxParams(const AuxDriver: string; out List: IROStrings); override;
+ function GetAvailableDriverOptions: TDAAvailableDriverOptions; override;
+ function GetAvailableDriverOptionsEx(AuxDriver: string): TDAAvailableDriverOptions; override;
+ function GetProviderDefaultCustomParameters(Provider: string): string; safecall;
+ function GetDefaultConnectionType(const AuxDriver: string): string; override; safecall;
+ public
+ end;
+
+ { TDAEADOConnection }
+ TDAEBDEConnection = class(TDAEConnection, IDACanQueryDatabaseNames, IDAFileBasedDatabase,
+ IDADirectoryBasedDatabase, IDAUseGenerators, {IDAADOConnection,}
+ IDAInterbaseConnection, IDAOracleConnection, IDACanQueryGeneratorsNames,
+ IDADB2Connection, IDASybaseConnection)
+ private
+ fProviderName: string;
+ fProviderType: TDABDEProviderType;
+ fDatabase: TDataBase;
+ FSession: TSession;
+ protected
+ function QueryInterface(const IID: TGUID; out Obj): HResult; override; stdcall;
+ function CreateCustomConnection: TCustomConnection; override;
+ function CreateMacroProcessor: TDASQLMacroProcessor; override;
+
+ function GetDatasetClass: TDAEDatasetClass; override;
+ function GetStoredProcedureClass: TDAEStoredProcedureClass; override;
+
+ procedure DoApplyConnectionString(aConnStrParser: TDAConnectionStringParser; aConnectionObject: TCustomConnection); override;
+
+ function DoBeginTransaction: integer; override;
+ procedure DoCommitTransaction; override;
+ procedure DoRollbackTransaction; override;
+ function DoGetInTransaction: boolean; override;
+
+ procedure DoGetTableNames(out List: IROStrings); override;
+ procedure DoGetTableFields(const aTableName: string; out Fields: TDAFieldCollection); override;
+
+ procedure DoGetViewNames(out List: IROStrings); override;
+ procedure DoGetStoredProcedureNames(out List: IROStrings); override;
+ procedure DoGetForeignKeys(out ForeignKeys: TDADriverForeignKeyCollection); override;
+ function DoGetLastAutoInc(const GeneratorName: string): integer; override;
+ function GetQuoteChars: TDAQuoteCharArray; override;
+ function GetSPSelectSyntax(HasArguments: Boolean): string; override; safecall;
+ function IdentifierNeedsQuoting(const iIdentifier: string): boolean; override; safecall;
+ function QuoteFieldName(const aTableName, aFieldName: string): string; override; safecall;
+ function GetUserID: string; override; safecall;
+ procedure DoGetStoredProcedureParams(const aStoredProcedureName: string; out Params: TDAParamCollection); override;
+ // IDACanQueryDatabaseNames
+ function GetDatabaseNames: IROStrings;
+ // IDAFileBasedDatabase
+ function GetFileExtensions: IROStrings;
+ // IDAUseGenerators
+ function GetNextAutoinc(const GeneratorName: string): integer; safecall;
+ // IDACanQueryGeneratorsNames
+ function GetGeneratorNames: IROStrings;
+ public
+ destructor Destroy; override;
+ end;
+
+ { TDAEADOQuery }
+ TDAEBDEQuery = class(TDAEDataset, IDAMustSetParams)
+ protected
+ procedure ClearParams; override;
+ function CreateDataset(aConnection: TDAEConnection): TDataset; override;
+ function DoExecute: integer; override;
+ function DoGetSQL: string; override;
+ procedure DoSetSQL(const Value: string); override;
+ procedure RefreshParams; override; safecall;
+ procedure DoPrepare(Value: boolean); override; safecall;
+ // IDAMustSetParams
+ procedure SetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ public
+ end;
+
+ { TDAEADOStoredProcedure }
+ TDAEBDEStoredProcedure = class(TDAEStoredProcedure, IDAMustSetParams)
+ protected
+ function CreateDataset(aConnection: TDAEConnection): TDataset; override;
+ procedure RefreshParams; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetStoredProcedureName: string; override;
+ procedure SetStoredProcedureName(const Name: string); override;
+ function DoExecute: integer; override;
+ function Execute: integer; override;
+ // IDAMustSetParams
+ procedure SetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure DoPrepare(Value: boolean); override; safecall;
+ end;
+
+procedure Register;
+function GetDriverObject: IDADriver; stdcall;
+
+function ProviderToProviderType(AProvider: string): TDABDEProviderType;
+
+implementation
+
+uses
+ Windows, SysUtils, Variants, Classes, uDARes,
+ uROBinaryHelpers, uDADriverManager, uDAMacroProcessors, uDASQL92Interfaces;
+
+var
+ _driver : TDAEDriver = nil;
+
+const
+ BDE_LANGDRIVER =
+ '(Access General,Access Greece,Access Japanese,Access Nord/Danish,Access Swed/Finnish,''ascii'' ANSI,' +
+ 'Borland ANSI Arabic,Borland DAN Latin-1,Borland DEU Latin-1,Borland ENG Latin-1,Borland ENU Latin-1,Borland ESP Latin-1,' +
+ 'Borland FIN Latin-1,Borland FRA Latin-1,Borland FRC Latin-1,Borland ISL Latin-1,Borland ITA Latin-1,Borland NLD Latin-1,' +
+ 'Borland NOR Latin-1,Borland PTG Latin-1,Borland SVE Latin-1,DB2 SQL ANSI DEU,dBASE BUL 868,dBASE CHS cp936,dBASE CHT cp950,' +
+ 'dBASE CSY cp852,dBASE CSY cp867,dBASE DAN cp865,dBASE DEU cp437,dBASE DEU cp850,dBASE ELL GR437,dBASE ENG cp437,dBASE ENG cp850,' +
+ 'dBASE ENU cp437,dBASE ENU cp850,dBASE ESP cp437,dBASE ESP cp850,dBASE FIN cp437,dBASE FRA cp437,dBASE FRA cp850,dBASE FRC cp850,' +
+ 'dBASE FRC cp863,dBASE HUN cp852,dBASE ITA cp437,dBASE ITA cp850,dBASE JPN cp932,dBASE JPN Dic932,dBASE KOR cp949,dBASE NLD cp437,' +
+ 'dBASE NLD cp850,dBASE NOR cp865,dBASE PLK cp852,dBASE PTB cp850,dBASE PTG cp860,dBASE RUS cp866,dBASE SLO cp852,dBASE SVE cp437,' +
+ 'dBASE SVE cp850,dBASE THA cp874,dBASE TRK cp857,FoxPro Czech 1250,FoxPro Czech DOS895,FoxPro German 1252,FoxPro German 437,FoxPro Nordic 1252,' +
+ 'FoxPro Nordic 437,FoxPro Nordic 850,Hebrew dBASE,MSSQL ANSI Greek,Oracle SQL WE850,Paradox ANSI HEBREW,Paradox ''ascii'',Paradox BUL 868,' +
+ 'Paradox China 936,Paradox Cyrr 866,Paradox Czech 852,Paradox Czech 867,Paradox ESP 437,Paradox Greek GR437,Paradox ''hebrew'',' +
+ 'Paradox Hun 852 DC,Paradox ''intl'',Paradox ''intl'' 850,Paradox ISL 861,Paradox ''japan'',Paradox Korea 949,Paradox ''nordan'',' +
+ 'Paradox ''nordan40'',Paradox Polish 852,Paradox Slovene 852,Paradox ''swedfin'',Paradox Taiwan 950,Paradox Thai 874,Paradox ''turk'',' +
+ 'Pdox ANSI Bulgaria,Pdox ANSI Cyrillic,Pdox ANSI Czech,Pdox ANSI Greek,Pdox ANSI Hun. DC,Pdox ANSI Intl,Pdox ANSI Intl850,Pdox ANSI Nordan4,' +
+ 'Pdox ANSI Polish,Pdox ANSI Slovene,Pdox ANSI Spanish,Pdox ANSI Swedfin,Pdox ANSI Swedfin,Pdox ANSI Turkish,Paradox ''ascii'' Japan,' +
+ 'pdx ANSI Czech ''CH'',pdx ANSI ISO L_2 CZ,pdx Czech 852 ''CH'',pdx Czech 867 ''CH'',pdx ISO L_2 Czech,''Spanish'' ANSI,' +
+ 'SQL Link ROMAN8,Sybase SQL Dic437,Sybase SQL Dic850,''WEurope'' ANSI)';
+
+function ProviderToProviderType2(AProvider: string): TDABDEProviderType;
+begin
+ if AnsiCompareText(AProvider, 'STANDARD') = 0 then Result := bdeSTANDARD else
+ if AnsiCompareText(AProvider, 'DB2') = 0 then Result := bdeDB2 else
+ if AnsiCompareText(AProvider, 'INFORMIX') = 0 then Result := bdeINFORMIX else
+ if AnsiCompareText(AProvider, 'INTRBASE') = 0 then Result := bdeINTRBASE else
+ if AnsiCompareText(AProvider, 'MSACCESS') = 0 then Result := bdeMSACCESS else
+ if AnsiCompareText(AProvider, 'MSSQL') = 0 then Result := bdeMSSQL else
+ if AnsiCompareText(AProvider, 'ORACLE') = 0 then Result := bdeORACLE else
+ if AnsiCompareText(AProvider, 'SYBASE') = 0 then Result := bdeSYBASE else
+ Result := bdeODBC;
+end;
+
+function ProviderToProviderType(AProvider: string): TDABDEProviderType;
+begin
+ if Session.IsAlias(AProvider) then
+ Result := ProviderToProviderType2(Session.GetAliasDriverName(AProvider))
+ else
+ Result := ProviderToProviderType2(AProvider);
+end;
+
+function GetDriverObject: IDADriver;
+begin
+ if (_driver = nil) then _driver := TDAEBDEDriver.Create(nil);
+ result := _driver;
+end;
+
+type
+ TDecimalVariant = packed record
+ VarType: TVarType;
+ scale: Byte;
+ sign: Byte;
+ Hi32: Cardinal;
+ Lo32: Cardinal;
+ Mid32: Cardinal;
+ Dummy: Cardinal;
+ end;
+
+function DecimalToInt64(const V: Variant): Int64;
+var
+ vData : TDecimalVariant absolute V;
+begin
+ if (vData.VarType = 14) and (vData.scale = 0) and (vData.Hi32 = 0) then begin
+ Result := Int64(vData.Lo32) or (Int64(vData.Mid32) shl 32);
+ if vData.sign <> 0 then result := -Result;
+ end else result := v;
+end;
+
+function Int64ToDecimal(Data: Int64): Variant;
+var
+ vd : TDecimalVariant absolute Result;
+begin
+ VarClear(Result);
+ vd.scale := 0;
+ if data < 0 then begin
+ vd.Sign := 128;
+ data := -data;
+ end else
+ vd.sign := 0;
+ vd.Hi32 := 0;
+ vd.Mid32 := int64(data shr 32);
+ vd.Lo32 := data;
+ vd.VarType := 14;
+end;
+
+{ TDAEBDEDriver }
+
+procedure TDAEBDEDriver.GetAuxDrivers(out List: IROStrings);
+var
+ FList : TStringList;
+begin
+ inherited GetAuxDrivers(List);
+ FList := TStringList.Create;
+ try
+ try
+ Session.GetAliasNames(FList);
+ List.AddStrings(FList);
+ except
+ end;
+ try
+ Session.GetDriverNames(FList);
+ List.AddStrings(FList);
+ except
+ end;
+ finally
+ FList.Free;
+ end;
+ List.Sorted := True;
+ List.Sorted := False;
+end;
+
+procedure TDAEBDEDriver.GetAuxParams(const AuxDriver: string;
+ out List: IROStrings);
+begin
+ inherited GetAuxParams(AuxDriver, List);
+ case ProviderToProviderType(AuxDriver) of
+ bdeSTANDARD: begin
+ List.Add('DEFAULT DRIVER=(PARADOX, DBASE, FOXPRO, ASCIIDRV)');
+ List.Add('ENABLE BCD=(TRUE, FALSE)');
+ end;
+ bdeDB2: begin
+ List.Add('BATCH COUNT=200');
+ List.Add('BLOB SIZE=32');
+ List.Add('BLOBS TO CACHE=64');
+ //List.Add('DB2 DSN'); { = 'DB2_SERVER'}
+ List.Add('ENABLE BCD=(TRUE, FALSE)');
+ List.Add('ENABLE SCHEMA CACHE=(TRUE, FALSE)');
+ List.Add('LANGDRIVER=' + BDE_LANGDRIVER);
+ List.Add('MAX ROWS=-1');
+ List.Add('OPEN MODE=(READ/WRITE,READ ONLY)');
+ List.Add('ROWSET SIZE=20');
+ List.Add('SCHEMA CACHE DIR=');
+ List.Add('SCHEMA CACHE SIZE=8');
+ List.Add('SCHEMA CACHE TIME=-1');
+ List.Add('SQLPASSTHRU MODE=(SHARED AUTOCOMMIT,SHARED NOAUTOCOMMIT,NOT SHARED)');
+ List.Add('SQLQRYMODE=(LOCAL,SERVER)');
+ end;
+ bdeINFORMIX: begin
+ List.Add('BATCH COUNT=200');
+ List.Add('BLOB SIZE=32');
+ List.Add('BLOBS TO CACHE=64');
+ List.Add('COLLCHAR=(0,1,2)');
+ List.Add('DATE MODE=0');
+ List.Add('DATE SEPARATOR=/');
+ List.Add('DBNLS=(0,1,2)');
+ List.Add('ENABLE BCD=(TRUE, FALSE)');
+ List.Add('ENABLE SCHEMA CACHE=(TRUE, FALSE)');
+ List.Add('LANGDRIVER=' + BDE_LANGDRIVER);
+ List.Add('LIST SYNONYMS=(NONE,ALL,PRIVATE)');
+ List.Add('LOCK MODE=5');
+ List.Add('MAX ROWS=-1');
+ List.Add('OPEN MODE=(READ/WRITE,READ ONLY)');
+ List.Add('SCHEMA CACHE DIR=');
+ List.Add('SCHEMA CACHE SIZE=8');
+ List.Add('SCHEMA CACHE TIME=-1');
+ List.Add('SQLPASSTHRU MODE=(SHARED AUTOCOMMIT,SHARED NOAUTOCOMMIT,NOT SHARED)');
+ List.Add('SQLQRYMODE=(LOCAL,SERVER)');
+ end;
+ bdeINTRBASE: begin
+ List.Add('BATCH COUNT=200');
+ List.Add('BLOB SIZE=32');
+ List.Add('BLOBS TO CACHE=64');
+ List.Add('COMMIT RETAIN=(FALSE)');
+ List.Add('ENABLE BCD=(TRUE, FALSE)');
+ List.Add('ENABLE SCHEMA CACHE=(TRUE, FALSE)');
+ List.Add('LANGDRIVER=' + BDE_LANGDRIVER);
+ List.Add('MAX ROWS=-1');
+ List.Add('OPEN MODE=(READ/WRITE,READ ONLY)');
+ List.Add('ROLE NAME=');
+ List.Add('SCHEMA CACHE DIR=');
+ List.Add('SCHEMA CACHE SIZE=8');
+ List.Add('SCHEMA CACHE TIME=-1');
+ List.Add('SQLPASSTHRU MODE=(SHARED AUTOCOMMIT,SHARED NOAUTOCOMMIT,NOT SHARED)');
+ List.Add('SQLQRYMODE=(LOCAL,SERVER)');
+ List.Add('WAIT ON LOCKS=(FALSE)');
+ end;
+ bdeMSACCESS: begin
+ //List.Add('DATABASE NAME'); { DRIVE:/PATH/DATABASE.MDB}
+ List.Add('LANGDRIVER=' + BDE_LANGDRIVER);
+ List.Add('OPEN MODE=(READ/WRITE,READ ONLY)');
+ List.Add('SYSTEM DATABASE=(.MDW)');
+ end;
+ bdeMSSQL: begin
+ List.Add('APPLICATION MODE'); { }
+ List.Add('BATCH COUNT=200');
+ List.Add('BLOB EDIT LOGGING=(TRUE, FALSE)');
+ List.Add('BLOB SIZE=32');
+ List.Add('BLOBS TO CACHE=64');
+ //List.Add('DATABASE NAME'); { }
+ List.Add('DATE MODE=0');
+ List.Add('ENABLE BCD=(TRUE, FALSE)');
+ List.Add('ENABLE SCHEMA CACHE=(TRUE, FALSE)');
+ //List.Add('HOST NAME'); { }
+ List.Add('LANGDRIVER=' + BDE_LANGDRIVER);
+ List.Add('MAX QUERY TIME=300');
+ List.Add('NATIONAL LANG NAME=');
+ List.Add('MAX ROWS=-1');
+ List.Add('OPEN MODE=(READ/WRITE,READ ONLY)');
+ List.Add('SCHEMA CACHE DIR=');
+ List.Add('SCHEMA CACHE SIZE=8');
+ List.Add('SCHEMA CACHE TIME=-1');
+ List.Add('SQLPASSTHRU MODE=(SHARED AUTOCOMMIT,SHARED NOAUTOCOMMIT,NOT SHARED)');
+ List.Add('SQLQRYMODE=(LOCAL,SERVER)');
+ List.Add('TDS PACKET SIZE=4096');
+ end;
+ bdeORACLE: begin
+ List.Add('BATCH COUNT=200');
+ List.Add('BLOB SIZE=32');
+ List.Add('BLOBS TO CACHE=64');
+ List.Add('ENABLE BCD=(TRUE, FALSE)');
+ List.Add('ENABLE INTEGERS=(TRUE, FALSE)');
+ List.Add('ENABLE SCHEMA CACHE=(TRUE, FALSE)');
+ List.Add('LANGDRIVER=' + BDE_LANGDRIVER);
+ List.Add('LIST SYNONYMS=(NONE,ALL,PRIVATE)');
+ List.Add('MAX ROWS=-1');
+ List.Add('OPEN MODE=(READ/WRITE,READ ONLY)');
+ List.Add('NET PROTOCOL=(TNS,TCP/IP,SPX/IPX,NETBIOS,NAMED PIPES,DECNET,3270,VINES,APPC,ASYNC)');
+ List.Add('OBJECT MODE=(TRUE, FALSE)');
+ List.Add('ROWSET SIZE=20');
+ List.Add('SCHEMA CACHE DIR=');
+ List.Add('SCHEMA CACHE SIZE=8');
+ List.Add('SCHEMA CACHE TIME=-1');
+ List.Add('SQLPASSTHRU MODE=(SHARED AUTOCOMMIT,SHARED NOAUTOCOMMIT,NOT SHARED)');
+ List.Add('SQLQRYMODE=(LOCAL,SERVER)');
+ end;
+ bdeSYBASE: begin
+ List.Add('APPLICATION MODE=');
+ List.Add('BATCH COUNT=200');
+ List.Add('BLOB EDIT LOGGING=(TRUE, FALSE)');
+ List.Add('BLOB SIZE=32');
+ List.Add('BLOBS TO CACHE=64');
+ List.Add('CS CURSOR ROWS=1');
+ //List.Add('DATABASE NAME'); { }
+ List.Add('DATE MODE=0');
+ List.Add('ENABLE BCD=(TRUE, FALSE)');
+ List.Add('ENABLE SCHEMA CACHE=(TRUE, FALSE)');
+ List.Add('HOST NAME='); { }
+ List.Add('LANGDRIVER=' + BDE_LANGDRIVER);
+ List.Add('MAX QUERY TIME=300');
+ List.Add('NATIONAL LANG NAME=');
+ List.Add('MAX ROWS=-1');
+ List.Add('OPEN MODE=(READ/WRITE,READ ONLY)');
+ List.Add('SCHEMA CACHE DIR=');
+ List.Add('SCHEMA CACHE SIZE=8');
+ List.Add('SCHEMA CACHE TIME=-1');
+ List.Add('SQLPASSTHRU MODE=(SHARED AUTOCOMMIT,SHARED NOAUTOCOMMIT,NOT SHARED)');
+ List.Add('SQLQRYMODE=(LOCAL,SERVER)');
+ List.Add('TDS PACKET SIZE=512');
+ end;
+ bdeODBC: begin
+ List.Add('BATCH COUNT=200');
+ List.Add('BLOB SIZE=32');
+ List.Add('BLOBS TO CACHE=64');
+ //List.Add('DATABASE NAME='); { }
+ List.Add('ENABLE BCD=(TRUE, FALSE)');
+ List.Add('ENABLE SCHEMA CACHE=(TRUE, FALSE)');
+ List.Add('LANGDRIVER=' + BDE_LANGDRIVER);
+ List.Add('MAX ROWS=-1');
+ List.Add('OPEN MODE=(READ/WRITE,READ ONLY)');
+ List.Add('ODBC DSN=');
+ List.Add('ROWSET SIZE=20');
+ List.Add('SCHEMA CACHE DIR=');
+ List.Add('SCHEMA CACHE SIZE=8');
+ List.Add('SCHEMA CACHE TIME=-1');
+ List.Add('SQLPASSTHRU MODE=(SHARED AUTOCOMMIT,SHARED NOAUTOCOMMIT,NOT SHARED)');
+ List.Add('SQLQRYMODE=(LOCAL,SERVER)');
+ end;
+ end;
+ List.Add('TransIsolation=(tiDirtyRead,tiReadCommitted,tiRepeatableRead)');
+end;
+
+function TDAEBDEDriver.GetAvailableDriverOptions: TDAAvailableDriverOptions;
+begin
+ result := [doAuxDriver, doServerName, doDatabaseName, doLogin, doCustom];
+ { TODO -c???: GetAuxParams }
+end;
+
+function TDAEBDEDriver.GetAvailableDriverOptionsEx(
+ AuxDriver: string): TDAAvailableDriverOptions;
+begin
+ case ProviderToProviderType(AuxDriver) of
+ bdeSTANDARD: result := [doAuxDriver, doDatabaseName, doCustom];
+ bdeDB2: result := [doAuxDriver, doServerName, doLogin, doCustom];
+ bdeMSACCESS: result := [doAuxDriver, doDatabaseName, doLogin, doCustom];
+ else
+ result := [doAuxDriver, doServerName, doDatabaseName, doLogin, doCustom];
+ end;
+end;
+
+function TDAEBDEDriver.GetConnectionClass: TDAEConnectionClass;
+begin
+ result := TDAEBDEConnection;
+end;
+
+function TDAEBDEDriver.GetDefaultConnectionType(
+ const AuxDriver: string): string;
+begin
+ case ProviderToProviderType(AuxDriver) of
+ bdeSTANDARD : Result := Paradox_DriverType;
+ bdeDB2 : Result := DB2_DriverType;
+ bdeINFORMIX: Result := Informix_DriverType;
+ bdeINTRBASE : Result := IB_DriverType;
+ bdeMSACCESS : Result := Access_DriverType;
+ bdeMSSQL: Result:=MSSQL_DriverType;
+ bdeORACLE: Result:=Oracle_DriverType;
+ bdeSYBASE: Result:=Sybase_DriverType;
+ bdeODBC: Result:=ODBC_DriverType;
+ else
+ Result := inherited GetDefaultConnectionType(AuxDriver);
+ end;
+end;
+
+function TDAEBDEDriver.GetDescription: string;
+begin
+ result := 'Borland BDE Driver';
+end;
+
+function TDAEBDEDriver.GetDriverID: string;
+begin
+ result := 'BDE';
+end;
+
+function Need_ODBC_DSN(Provider: string): boolean;
+var
+ List : TStringList;
+begin
+ List := TStringList.Create;
+ try
+ try
+ if Session.IsAlias(Provider) then
+ Session.GetAliasParams(Provider, List)
+ else
+ Session.GetDriverParams(Provider, List);
+ Result := List.Values['ODBC DSN'] = '';
+ except
+ // in case is invalid Provider, error is raised
+ Result := False;
+ end;
+ finally
+ List.Free;
+ end;
+end;
+
+function TDAEBDEDriver.GetProviderDefaultCustomParameters(
+ Provider: string): string;
+begin
+ Result := '';
+ if Provider = '' then Exit;
+ case ProviderToProviderType(Provider) of
+ bdeODBC: if Need_ODBC_DSN(Provider) then Result := 'ODBC DSN=';
+ bdeSTANDARD, bdeDB2, bdeMSACCESS: Result := 'TransIsolation=tiDirtyRead;';
+ end;
+end;
+
+{ TDAEBDEQuery }
+
+procedure TDAEBDEQuery.ClearParams;
+begin
+ inherited;
+ TQuery(Dataset).Params.Clear;
+end;
+
+function TDAEBDEQuery.CreateDataset(aConnection: TDAEConnection): TDataset;
+begin
+ result := TQuery.Create(nil);
+ TQuery(Result).DatabaseName := TDAEBDEConnection(aConnection).fDatabase.DatabaseName;
+ TQuery(Result).SessionName := TDAEBDEConnection(aConnection).fDatabase.SessionName;
+end;
+
+function TDAEBDEQuery.DoExecute: integer;
+begin
+ TQuery(Dataset).ExecSQL;
+ result := TQuery(Dataset).RowsAffected;
+end;
+
+function TDAEBDEQuery.DoGetSQL: string;
+begin
+ result := TQuery(Dataset).SQL.Text;
+end;
+
+procedure TDAEBDEQuery.DoPrepare(Value: boolean);
+begin
+ if Value then
+ TQuery(Dataset).Prepare
+ else
+ TQuery(Dataset).UnPrepare
+end;
+
+procedure TDAEBDEQuery.DoSetSQL(const Value: string);
+begin
+ TQuery(Dataset).SQL.Text := Value;
+end;
+
+procedure TDAEBDEQuery.GetParamValues(AParams: TDAParamCollection);
+begin
+ GetParamValuesStd(AParams,TQuery(Dataset).Params);
+end;
+
+procedure TDAEBDEQuery.RefreshParams;
+var
+ i : Integer;
+ par : TDAParam;
+ outpar : TParam;
+ ds : TQuery;
+begin
+ inherited;
+ ds := TQuery(Dataset);
+ if not Assigned(ds.Params) then Exit;
+ for i := 0 to ds.Params.Count - 1 do begin
+ outpar := ds.Params[i];
+
+ par := self.ParamByName(outpar.Name);
+
+ if outpar.DataType <> ftUnknown then
+ par.DataType := VCLTypeToDAType(outpar.DataType);
+ end;
+end;
+
+procedure TDAEBDEQuery.SetParamValues(AParams: TDAParamCollection);
+begin
+ SetParamValuesStd(AParams,TQuery(Dataset).Params);
+end;
+
+{ TDAEBDEStoredProcedure }
+
+function TDAEBDEStoredProcedure.CreateDataset(
+ aConnection: TDAEConnection): TDataset;
+begin
+ result := TStoredProc.Create(nil);
+ TStoredProc(result).DatabaseName := TDAEBDEConnection(aConnection).fDatabase.DatabaseName;
+ TStoredProc(result).SessionName := TDAEBDEConnection(aConnection).fDatabase.SessionName;
+end;
+
+function TDAEBDEStoredProcedure.DoExecute: integer;
+begin
+ Result := -1;
+ TStoredProc(Dataset).ExecProc;
+end;
+
+procedure TDAEBDEStoredProcedure.DoPrepare(Value: boolean);
+begin
+ if value then
+ TStoredProc(Dataset).Prepare
+ else
+ TStoredProc(Dataset).UnPrepare
+end;
+
+function TDAEBDEStoredProcedure.Execute: integer;
+var
+ i : integer;
+ ds : TStoredProc;
+begin
+ ds := TStoredProc(Dataset);
+
+ for i := ds.Params.Count - 1 downto 0 do begin
+ if (ds.Params[i].DataType = ftInterface) and
+ (ds.Params[i].ParamType in [ptOutput, ptInputOutput, ptReSult]) then
+ ds.Params.Delete(i);
+ end;
+
+ SetParamValuesStd(GetParams, TStoredProc(Dataset).Params);
+
+ Result:= DoExecute;
+ ds.GetResults;
+
+ GetParamValuesStd(GetParams, TStoredProc(Dataset).Params);
+end;
+
+procedure TDAEBDEStoredProcedure.GetParamValues(AParams: TDAParamCollection);
+begin
+ GetParamValuesStd(AParams, TStoredProc(Dataset).Params);
+end;
+
+function TDAEBDEStoredProcedure.GetStoredProcedureName: string;
+begin
+ result := TStoredProc(Dataset).StoredProcName;
+end;
+
+procedure TDAEBDEStoredProcedure.RefreshParams;
+var
+ dsparams : TParams;
+begin
+ dsparams := TParams.Create(nil);
+ try
+ TStoredProc(Dataset).CopyParams(dsParams);
+ RefreshParamsStd(dsparams);
+ finally
+ dsParams.Free;
+ end;
+end;
+
+procedure TDAEBDEStoredProcedure.SetParamValues(
+ AParams: TDAParamCollection);
+begin
+ SetParamValuesStd(AParams, TStoredProc(Dataset).Params);
+end;
+
+procedure TDAEBDEStoredProcedure.SetStoredProcedureName(
+ const Name: string);
+begin
+ TStoredProc(Dataset).StoredProcName := Name;
+end;
+
+{ TDAEBDEConnection }
+
+function TDAEBDEConnection.CreateCustomConnection: TCustomConnection;
+begin
+ FDatabase := TDatabase.Create(nil);
+ FSession := TSession.Create(nil);
+ FSession.AutoSessionName := True;
+ fDatabase.SessionName := FSession.SessionName;
+ Result := fDatabase;
+ fDatabase.LoginPrompt := False;
+ fDatabase.DatabaseName := copy(NewStrippedGuidAsString, 1, 30);
+end;
+
+function TDAEBDEConnection.CreateMacroProcessor: TDASQLMacroProcessor;
+begin
+ {$IFDEF MAX_SUPPORT}
+ case fProviderType of
+ bdeINTRBASE: Result := IB_CreateMacroProcessor;
+ bdeMSSQL: Result := MSSQL_CreateMacroProcessor;
+ bdeORACLE: Result := Oracle_CreateMacroProcessor;
+ else
+ Result:=inherited CreateMacroProcessor;
+ end;
+ {$ELSE}
+ Result:=inherited CreateMacroProcessor;
+ {$ENDIF}
+end;
+
+destructor TDAEBDEConnection.Destroy;
+begin
+ FreeAndNil(FSession);
+ inherited;
+end;
+
+procedure TDAEBDEConnection.DoApplyConnectionString(
+ aConnStrParser: TDAConnectionStringParser;
+ aConnectionObject: TCustomConnection);
+
+ procedure SetUserNamePassword;
+ begin
+ with aConnStrParser do begin
+ if (Self.UserID <> '') then
+ fDatabase.Params.Values['USER NAME'] := Self.UserID
+ else if (UserID <> '') then
+ fDatabase.Params.Values['USER NAME'] := UserID;
+
+ if (Self.Password <> '') then
+ fDatabase.Params.Values['PASSWORD'] := Self.Password
+ else if (Password <> '') then
+ fDatabase.Params.Values['PASSWORD'] := Password;
+ end;
+ end;
+
+var
+ i : Integer;
+begin
+ inherited;
+ with aConnStrParser do begin
+ if AuxDriver <> '' then begin
+ fDatabase.Params.Clear;
+ fDatabase.AliasName := '';
+ fDatabase.DriverName := '';
+ fProviderType := ProviderToProviderType(AuxDriver);
+ if fDatabase.Session.IsAlias(AuxDriver) then
+ fDatabase.AliasName := AuxDriver
+ else
+ fDatabase.DriverName := AuxDriver;
+ end
+ else
+ raise EDADriverException.Create('No aux driver specified for BDE connection');
+
+ fProviderName := AuxDriver;
+
+ case fProviderType of
+ bdeSTANDARD: begin
+ //fDatabase.Params.Values['DEFAULT DRIVER'] := ; {PARADOX, DBASE, FOXPRO, ASCIIDRV}
+ //fDatabase.Params.Values['ENABLE BCD'] := { TRUE / FALSE}
+ if Database <> '' then fDatabase.Params.Values['PATH'] := Database;
+ end;
+ bdeDB2: begin
+ //fDatabase.Params.Values['BATCH COUNT'] := { = 200}
+ //fDatabase.Params.Values['BLOB SIZE'] := { = 32}
+ //fDatabase.Params.Values['BLOBS TO CACHE'] := { = 64}
+ if Server <> '' then fDatabase.Params.Values['DB2 DSN'] := Server; { = 'DB2_SERVER'}
+ //fDatabase.Params.Values['ENABLE BCD'] := { TRUE / FALSE}
+ //fDatabase.Params.Values['ENABLE SCHEMA CACHE'] := { TRUE / FALSE}
+ //fDatabase.Params.Values['LANGDRIVER'] := { ...}
+ //fDatabase.Params.Values['MAX ROWS'] := { = -1}
+ //fDatabase.Params.Values['OPEN MODE'] := { READ/WRITE, READ ONLY}
+ //fDatabase.Params.Values['ROWSET SIZE'] := { = 20}
+ //fDatabase.Params.Values['SCHEMA CACHE DIR'] := { = ''}
+ //fDatabase.Params.Values['SCHEMA CACHE SIZE'] := { = 8}
+ //fDatabase.Params.Values['SCHEMA CACHE TIME'] := { = -1}
+ //fDatabase.Params.Values['SQLPASSTHRU MODE'] := { SHARED AUTOCOMMIT, SHARED NOAUTOCOMMIT, NOT SHARED}
+ //fDatabase.Params.Values['SQLQRYMODE'] := { = '',LOCAL,SERVER}
+ SetUserNamePassword;
+ end;
+ bdeINFORMIX: begin
+ //fDatabase.Params.Values['BATCH COUNT'] := { = 200}
+ //fDatabase.Params.Values['BLOB SIZE'] := { = 32}
+ //fDatabase.Params.Values['BLOBS TO CACHE'] := { = 64}
+ //fDatabase.Params.Values['COLLCHAR'] := { = 0,1,2}
+ if Database <> '' then fDatabase.Params.Values['DATABASE NAME'] := Database;
+ //fDatabase.Params.Values['DATE MODE'] := { = 0};
+ //fDatabase.Params.Values['DATE SEPARATOR'] := { = '/'};
+ //fDatabase.Params.Values['DBNLS'] := { = '',0,1,2};
+ //fDatabase.Params.Values['ENABLE BCD'] := { TRUE / FALSE}
+ //fDatabase.Params.Values['ENABLE SCHEMA CACHE'] := { TRUE / FALSE}
+ //fDatabase.Params.Values['LANGDRIVER'] := { ...}
+ //fDatabase.Params.Values['LIST SYNONYMS'] := { NONE, ALL, PRIVATE}
+ //fDatabase.Params.Values['LOCK MODE'] := { = 5}
+ //fDatabase.Params.Values['MAX ROWS'] := { = -1}
+ //fDatabase.Params.Values['OPEN MODE'] := { READ/WRITE, READ ONLY}
+ //fDatabase.Params.Values['SCHEMA CACHE DIR'] := { = ''}
+ //fDatabase.Params.Values['SCHEMA CACHE SIZE'] := { = 8}
+ //fDatabase.Params.Values['SCHEMA CACHE TIME'] := { = -1}
+ if Server <> '' then fDatabase.Params.Values['SERVER NAME'] := Server;
+ //fDatabase.Params.Values['SQLPASSTHRU MODE'] := { SHARED AUTOCOMMIT, SHARED NOAUTOCOMMIT, NOT SHARED}
+ //fDatabase.Params.Values['SQLQRYMODE'] := { = '',LOCAL,SERVER}
+ SetUserNamePassword;
+ end;
+ bdeINTRBASE: begin
+ //fDatabase.Params.Values['BATCH COUNT'] := { = 200}
+ //fDatabase.Params.Values['BLOB SIZE'] := { = 32}
+ //fDatabase.Params.Values['BLOBS TO CACHE'] := { = 64}
+ //fDatabase.Params.Values['COMMIT RETAIN'] := { = FALSE}
+ //fDatabase.Params.Values['ENABLE BCD'] := { TRUE / FALSE}
+ //fDatabase.Params.Values['ENABLE SCHEMA CACHE'] := { TRUE / FALSE}
+ //fDatabase.Params.Values['LANGDRIVER'] := { ...}
+ //fDatabase.Params.Values['MAX ROWS'] := { = -1}
+ //fDatabase.Params.Values['OPEN MODE'] := { READ/WRITE, READ ONLY}
+ //fDatabase.Params.Values['ROLE NAME'] := { = ''}
+ //fDatabase.Params.Values['SCHEMA CACHE DIR'] := { = ''}
+ //fDatabase.Params.Values['SCHEMA CACHE SIZE'] := { = 8}
+ //fDatabase.Params.Values['SCHEMA CACHE TIME'] := { = -1}
+ if Database <> '' then fDatabase.Params.Values['SERVER NAME'] := StringReplace(Database, '\', '/', [rfReplaceAll]); { = IB_SERVER:/PATH/DATABASE.GDB}
+ if Server <> '' then fDatabase.Params.Values['SERVER NAME'] := Server + ':' + fDatabase.Params.Values['SERVER NAME']; { = IB_SERVER:/PATH/DATABASE.GDB}
+ //fDatabase.Params.Values['SQLPASSTHRU MODE'] := { SHARED AUTOCOMMIT, SHARED NOAUTOCOMMIT, NOT SHARED}
+ //fDatabase.Params.Values['SQLQRYMODE'] := { = '',LOCAL,SERVER}
+ SetUserNamePassword;
+ //fDatabase.Params.Values['WAIT ON LOCKS'] := {FALSE};
+ end;
+ bdeMSACCESS: begin
+ if Database <> '' then fDatabase.Params.Values['DATABASE NAME'] := StringReplace(Database, '\', '/', [rfReplaceAll]); { DRIVE:/PATH/DATABASE.MDB}
+ //fDatabase.Params.Values['LANGDRIVER'] := { ...}
+ //fDatabase.Params.Values['OPEN MODE'] := { READ/WRITE, READ ONLY}
+ //fDatabase.Params.Values['SYSTEM DATABASE'] := { *.MDW}
+ SetUserNamePassword;
+ end;
+ bdeMSSQL: begin
+ //fDatabase.Params.Values['APPLICATION MODE'] := { }
+ //fDatabase.Params.Values['BATCH COUNT'] := { = 200}
+ //fDatabase.Params.Values['BLOB EDIT LOGGING'] := { '',TRUE,FALSE}
+ //fDatabase.Params.Values['BLOB SIZE'] := { = 32}
+ //fDatabase.Params.Values['BLOBS TO CACHE'] := { = 64}
+ if Database <> '' then fDatabase.Params.Values['DATABASE NAME'] := Database;
+ //fDatabase.Params.Values['DATE MODE'] := { = 0};
+ //fDatabase.Params.Values['ENABLE BCD'] := { TRUE / FALSE}
+ //fDatabase.Params.Values['ENABLE SCHEMA CACHE'] := { TRUE / FALSE}
+ //fDatabase.Params.Values['HOST NAME'] := { };
+ //fDatabase.Params.Values['LANGDRIVER'] := { ...}
+ //fDatabase.Params.Values['MAX QUERY TIME'] := { 300}
+ //fDatabase.Params.Values['MAX ROWS'] := { = -1}
+ //fDatabase.Params.Values['NATIONAL LANG NAME'] := { }
+ //fDatabase.Params.Values['OPEN MODE'] := { READ/WRITE, READ ONLY}
+ //fDatabase.Params.Values['SCHEMA CACHE DIR'] := { = ''}
+ //fDatabase.Params.Values['SCHEMA CACHE SIZE'] := { = 8}
+ //fDatabase.Params.Values['SCHEMA CACHE TIME'] := { = -1}
+ if Server <> '' then fDatabase.Params.Values['SERVER NAME'] := Server; { = MSS_SERVER}
+ //fDatabase.Params.Values['SQLPASSTHRU MODE'] := { SHARED AUTOCOMMIT, SHARED NOAUTOCOMMIT, NOT SHARED}
+ //fDatabase.Params.Values['SQLQRYMODE'] := { = '',LOCAL,SERVER}
+ //fDatabase.Params.Values['TDS PACKET SIZE'] := { = 4096}
+ SetUserNamePassword;
+ end;
+ bdeORACLE: begin
+ //fDatabase.Params.Values['BATCH COUNT'] := { = 200}
+ //fDatabase.Params.Values['BLOB SIZE'] := { = 32}
+ //fDatabase.Params.Values['BLOBS TO CACHE'] := { = 64}
+ //fDatabase.Params.Values['ENABLE BCD'] := { TRUE / FALSE}
+ //fDatabase.Params.Values['ENABLE INTEGERS'] := { TRUE / FALSE}
+ //fDatabase.Params.Values['ENABLE SCHEMA CACHE'] := { TRUE / FALSE}
+ //fDatabase.Params.Values['LANGDRIVER'] := { ...}
+ //fDatabase.Params.Values['LIST SYNONYMS'] := { NONE, ALL, PRIVATE}
+ //fDatabase.Params.Values['MAX ROWS'] := { = -1}
+ //fDatabase.Params.Values['NET PROTOCOL'] := { = TNS, TCP/IP,SPX/IPX,NETBIOS,NAMED PIPES,DECNET,3270,VINES,APPC,ASYNC}
+ //fDatabase.Params.Values['OBJECT MODE'] := { = TRUE/FALSE}
+ //fDatabase.Params.Values['OPEN MODE'] := { READ/WRITE, READ ONLY}
+ //fDatabase.Params.Values['ROWSET SIZE'] := { = 20}
+ //fDatabase.Params.Values['SCHEMA CACHE DIR'] := { = ''}
+ //fDatabase.Params.Values['SCHEMA CACHE SIZE'] := { = 8}
+ //fDatabase.Params.Values['SCHEMA CACHE TIME'] := { = -1}
+ if Server <> '' then fDatabase.Params.Values['SERVER NAME'] := Server; { = ORA_SERVER}
+ //fDatabase.Params.Values['SQLPASSTHRU MODE'] := { SHARED AUTOCOMMIT, SHARED NOAUTOCOMMIT, NOT SHARED}
+ //fDatabase.Params.Values['SQLQRYMODE'] := { = '',LOCAL,SERVER}
+ SetUserNamePassword;
+ end;
+ bdeSYBASE: begin
+ //fDatabase.Params.Values['APPLICATION MODE'] := { }
+ //fDatabase.Params.Values['BATCH COUNT'] := { = 200}
+ //fDatabase.Params.Values['BLOB EDIT LOGGING'] := { '',TRUE,FALSE}
+ //fDatabase.Params.Values['BLOB SIZE'] := { = 32}
+ //fDatabase.Params.Values['BLOBS TO CACHE'] := { = 64}
+ //fDatabase.Params.Values['CS CURSOR ROWS'] := { = 1}
+ if Database <> '' then fDatabase.Params.Values['DATABASE NAME'] := Database;
+ //fDatabase.Params.Values['DATE MODE'] := { = 0};
+ //fDatabase.Params.Values['ENABLE BCD'] := { TRUE / FALSE}
+ //fDatabase.Params.Values['ENABLE SCHEMA CACHE'] := { TRUE / FALSE}
+ //fDatabase.Params.Values['HOST NAME'] := { };
+ //fDatabase.Params.Values['LANGDRIVER'] := { ...}
+ //fDatabase.Params.Values['MAX QUERY TIME'] := { 300}
+ //fDatabase.Params.Values['MAX ROWS'] := { = -1}
+ //fDatabase.Params.Values['NATIONAL LANG NAME'] := { }
+ //fDatabase.Params.Values['OPEN MODE'] := { READ/WRITE, READ ONLY}
+ //fDatabase.Params.Values['SCHEMA CACHE DIR'] := { = ''}
+ //fDatabase.Params.Values['SCHEMA CACHE SIZE'] := { = 8}
+ //fDatabase.Params.Values['SCHEMA CACHE TIME'] := { = -1}
+ if Server <> '' then fDatabase.Params.Values['SERVER NAME'] := Server; { = SYB_SERVER}
+ //fDatabase.Params.Values['SQLPASSTHRU MODE'] := { SHARED AUTOCOMMIT, SHARED NOAUTOCOMMIT, NOT SHARED}
+ //fDatabase.Params.Values['SQLQRYMODE'] := { = '',LOCAL,SERVER}
+ //fDatabase.Params.Values['TDS PACKET SIZE'] := { = 512}
+ SetUserNamePassword;
+ end;
+ bdeODBC: begin
+ //fDatabase.Params.Values['BATCH COUNT'] := { = 200}
+ //fDatabase.Params.Values['BLOB SIZE'] := { = 32}
+ //fDatabase.Params.Values['BLOBS TO CACHE'] := { = 64}
+ if Database <> '' then fDatabase.Params.Values['DATABASE NAME'] := Database;
+ //fDatabase.Params.Values['ENABLE BCD'] := { TRUE / FALSE}
+ //fDatabase.Params.Values['ENABLE SCHEMA CACHE'] := { TRUE / FALSE}
+ //fDatabase.Params.Values['LANGDRIVER'] := { ...}
+ //fDatabase.Params.Values['MAX ROWS'] := { = -1}
+ //fDatabase.Params.Values['ODBC DSN'] := {}
+ //fDatabase.Params.Values['OPEN MODE'] := { READ/WRITE, READ ONLY}
+ //fDatabase.Params.Values['ROWSET SIZE'] := { = 20}
+ //fDatabase.Params.Values['SCHEMA CACHE DIR'] := { = ''}
+ //fDatabase.Params.Values['SCHEMA CACHE SIZE'] := { = 8}
+ //fDatabase.Params.Values['SCHEMA CACHE TIME'] := { = -1}
+ //fDatabase.Params.Values['SQLPASSTHRU MODE'] := { SHARED AUTOCOMMIT, SHARED NOAUTOCOMMIT, NOT SHARED}
+ //fDatabase.Params.Values['SQLQRYMODE'] := { = '',LOCAL,SERVER}
+ SetUserNamePassword;
+ end;
+ end;
+ for i := 0 to AuxParamsCount - 1 do begin
+ if AnsiSameText(AuxParamNames[i], 'TransIsolation') then begin
+ if AnsiSameText(AuxParams[AuxParamNames[i]], 'tiDirtyRead') then fDatabase.TransIsolation := tiDirtyRead else
+ if AnsiSameText(AuxParams[AuxParamNames[i]], 'tiReadCommitted') then fDatabase.TransIsolation := tiReadCommitted else
+ if AnsiSameText(AuxParams[AuxParamNames[i]], 'tiRepeatableRead') then fDatabase.TransIsolation := tiRepeatableRead;
+ end
+ else
+ fDatabase.Params.Values[AuxParamNames[i]] := AuxParams[AuxParamNames[i]];
+ end;
+ end;
+end;
+
+function TDAEBDEConnection.DoBeginTransaction: integer;
+begin
+ result := -1;
+ fDatabase.StartTransaction;
+end;
+
+procedure TDAEBDEConnection.DoCommitTransaction;
+begin
+ fDatabase.Commit;
+end;
+
+procedure TDAEBDEConnection.DoGetForeignKeys(
+ out ForeignKeys: TDADriverForeignKeyCollection);
+begin
+ inherited DoGetForeignKeys(ForeignKeys);
+ {$IFDEF MAX_SUPPORT}
+ case fProviderType of
+ bdeINTRBASE: IB_DoGetForeignKeys(GetDatasetClass.Create(Self), ForeignKeys);
+ bdeMSSQL: MSSQL_DoGetForeignKeys(GetDatasetClass.Create(Self), ForeignKeys, True);
+ bdeORACLE: Oracle_DoGetForeignKeys(GetDatasetClass.Create(Self), ForeignKeys);
+ end;
+ {$ENDIF}
+end;
+
+function TDAEBDEConnection.DoGetInTransaction: boolean;
+begin
+ Result := fDatabase.InTransaction;
+end;
+
+function TDAEBDEConnection.DoGetLastAutoInc(
+ const GeneratorName: string): integer;
+begin
+ Result := inherited DoGetLastAutoInc(GeneratorName);
+ {$IFDEF MAX_SUPPORT}
+ case fProviderType of
+ bdeINTRBASE: Result := IB_GetLastAutoInc(GeneratorName, GetDatasetClass.Create(Self));
+ bdeMSSQL: Result := MSSQL_DoGetLastAutoInc(GeneratorName, GetDatasetClass.Create(Self));
+ bdeOracle: Result := Oracle_DoGetLastAutoInc(GeneratorName,GetDatasetClass.Create(Self));
+ end;
+ {$ENDIF}
+end;
+
+procedure TDAEBDEConnection.DoGetStoredProcedureNames(
+ out List: IROStrings);
+begin
+ inherited DoGetStoredProcedureNames(List);
+ {$IFDEF MAX_SUPPORT}
+ case fProviderType of
+ bdeINTRBASE: IB_GetObjectNames(GetDatasetClass.Create(Self), List, dotProcedure);
+ bdeMSSQL: MSSQL_DoGetNames(GetDatasetClass.Create(Self), List, dotProcedure, True);
+ bdeORACLE: Oracle_DoGetNames(GetDatasetClass.Create(Self), List, dotProcedure);
+ else
+ fDatabase.Session.GetStoredProcNames(fDatabase.DatabaseName, List.Strings);
+ end;
+ {$ELSE}
+ fDatabase.Session.GetStoredProcNames(fDatabase.DatabaseName, List.Strings);
+ {$ENDIF}
+end;
+
+procedure TDAEBDEConnection.DoGetStoredProcedureParams(
+ const aStoredProcedureName: string; out Params: TDAParamCollection);
+begin
+ {$IFDEF MAX_SUPPORT}
+ case fProviderType of
+ bdeOracle: Oracle_DoGetStoredProcedureParams(aStoredProcedureName, GetDatasetClass.Create(Self), Params);
+ else
+ inherited DoGetStoredProcedureParams(aStoredProcedureName, Params);
+ end;
+ {$ELSE}
+ inherited DoGetStoredProcedureParams(aStoredProcedureName, Params);
+ {$ENDIF}
+end;
+
+procedure TDAEBDEConnection.DoGetTableFields(const aTableName: string;
+ out Fields: TDAFieldCollection);
+begin
+ {$IFDEF MAX_SUPPORT}
+ case fProviderType of
+ bdeINTRBASE: IB_GetTableFields(QuoteIdentifierIfNeeded(aTableName), GetDatasetClass.Create(Self), Fields);
+ bdeMSSQL: MSSQL_DoGetTableFields(QuoteIdentifierIfNeeded(aTableName), GetDatasetClass.Create(Self), Fields);
+ bdeOracle: Oracle_DoGetTableFields(QuoteIdentifierIfNeeded(aTableName), GetDatasetClass.Create(Self), Fields);
+ else
+ inherited DoGetTableFields(QuoteIdentifierIfNeeded(aTableName), Fields);
+ end;
+ {$ELSE}
+ inherited DoGetTableFields(QuoteIdentifierIfNeeded(aTableName), Fields);
+ {$ENDIF}
+end;
+
+procedure TDAEBDEConnection.DoGetTableNames(out List: IROStrings);
+begin
+ inherited DoGetTableNames(List);
+ {$IFDEF MAX_SUPPORT}
+ case fProviderType of
+ bdeINTRBASE: IB_GetObjectNames(GetDatasetClass.Create(Self), List, dotTable);
+ bdeMSSQL: MSSQL_DoGetNames(GetDatasetClass.Create(Self), List, dotTable, True);
+ bdeORACLE: Oracle_DoGetNames(GetDatasetClass.Create(Self), List, dotTable);
+ else
+ fDatabase.GetTableNames(List.Strings);
+ end;
+ {$ELSE}
+ fDatabase.GetTableNames(List.Strings);
+ {$ENDIF}
+end;
+
+procedure TDAEBDEConnection.DoGetViewNames(out List: IROStrings);
+begin
+ inherited DoGetViewNames(List);
+ {$IFDEF MAX_SUPPORT}
+ case fProviderType of
+ bdeINTRBASE: IB_GetObjectNames(GetDatasetClass.Create(Self), List, dotView);
+ bdeMSSQL: MSSQL_DoGetNames(GetDatasetClass.Create(Self), List, dotView, True);
+ bdeORACLE: Oracle_DoGetNames(GetDatasetClass.Create(Self), List, dotView);
+ end;
+ {$ENDIF}
+end;
+
+procedure TDAEBDEConnection.DoRollbackTransaction;
+begin
+ fDatabase.Rollback;
+end;
+
+function TDAEBDEConnection.GetDatabaseNames: IROStrings;
+begin
+ {$IFDEF MAX_SUPPORT}
+ case fProviderType of
+ bdeMSSQL: Result := MSSQL_GetDatabaseNames(Self);
+ else
+ Result := NewROStrings;
+ fDatabase.Session.GetDatabaseNames(Result.Strings);
+ end;
+ {$ELSE}
+ Result := NewROStrings;
+ fDatabase.Session.GetDatabaseNames(Result.Strings);
+ {$ENDIF}
+end;
+
+function TDAEBDEConnection.GetDatasetClass: TDAEDatasetClass;
+begin
+ Result := TDAEBDEQuery;
+end;
+
+function TDAEBDEConnection.GetFileExtensions: IROStrings;
+begin
+ case fProviderType of
+ bdeINTRBASE: Result := IB_GetFileExtensions;
+ bdeMSACCESS: Result := MSACCESS_GetFileExtensions;
+ else
+ Result := NewROStrings;
+ end;
+end;
+
+function TDAEBDEConnection.GetGeneratorNames: IROStrings;
+begin
+ case fProviderType of
+ bdeINTRBASE: Result:= IB_GetGeneratorNames(GetDatasetClass.Create(Self));
+ else
+ Result := NewROStrings;
+ end;
+end;
+
+function TDAEBDEConnection.GetNextAutoinc(
+ const GeneratorName: string): integer;
+begin
+ result := -1;
+ {$IFDEF MAX_SUPPORT}
+ case fProviderType of
+ bdeINTRBASE: Result := IB_GetNextAutoinc(GeneratorName, GetDatasetClass.Create(Self));
+ bdeOracle: Result := Oracle_GetNextAutoinc(GeneratorName, GetDatasetClass.Create(Self));
+ end;
+ {$ENDIF}
+end;
+
+function TDAEBDEConnection.GetQuoteChars: TDAQuoteCharArray;
+begin
+ case fProviderType of
+ bdeMSSQL: result:=MSSQL_GetQuoteChars;
+ bdeORACLE: Result:= Oracle_GetQuoteChars;
+ else
+ Result[0] := '"';
+ Result[1] := '"';
+ end;
+end;
+
+function TDAEBDEConnection.GetSPSelectSyntax(
+ HasArguments: Boolean): string;
+begin
+ Result := inherited GetSPSelectSyntax(HasArguments);
+ {$IFDEF MAX_SUPPORT}
+ case fProviderType of
+ bdeINTRBASE: Result := IB_GetSPSelectSyntax(HasArguments);
+ bdeMSSQL: Result := MSSQL_GetSPSelectSyntax(HasArguments);
+ bdeOracle: Result := Oracle_GetSPSelectSyntax(HasArguments);
+ end;
+ {$ENDIF}
+end;
+
+function TDAEBDEConnection.GetStoredProcedureClass: TDAEStoredProcedureClass;
+begin
+ Result := TDAEBDEStoredProcedure;
+end;
+
+function TDAEBDEConnection.GetUserID: string;
+begin
+ Result:=fDatabase.Params.Values['USER NAME'];
+end;
+
+function TDAEBDEConnection.IdentifierNeedsQuoting(
+ const iIdentifier: string): boolean;
+begin
+ Result := inherited IdentifierNeedsQuoting(iIdentifier);
+ if not Result then
+ case fProviderType of
+ bdeMSSQL: Result := MSSQL_IdentifierNeedsQuoting(iIdentifier);
+ bdeINTRBASE: Result := IB_IdentifierNeedsQuoting(iIdentifier,1);
+ bdeORACLE: Result := Oracle_IdentifierNeedsQuoting(iIdentifier);
+ bdeDB2: Result := DB2_IdentifierNeedsQuoting(iIdentifier);
+ bdeSYBASE: Result := Sybase_IdentifierNeedsQuoting(iIdentifier);
+ else
+ Result := SQL92_IdentifierNeedsQuoting(iIdentifier);
+ end;
+end;
+
+function TDAEBDEConnection.QueryInterface(const IID: TGUID;
+ out Obj): HResult;
+begin
+ Result := E_NOINTERFACE;
+
+ if IsEqualGUID(IID, IDADB2Connection) then begin
+ if not (fProviderType in [bdeDB2]) then Exit;
+ end;
+
+ if IsEqualGUID(IID, IDASybaseConnection) then begin
+ if not (fProviderType in [bdeSYBASE]) then Exit;
+ end;
+
+ if IsEqualGUID(IID, IDAInterbaseConnection) then begin
+ if not (fProviderType in [bdeINTRBASE]) then Exit;
+ end;
+
+ if IsEqualGUID(IID, IDAADOConnection) then begin
+ if not (fProviderType in [bdeMSSQL]) then Exit;
+ end;
+
+ if IsEqualGUID(IID, IDAOracleConnection) then begin
+ if not (fProviderType in [bdeOracle]) then Exit;
+ end;
+
+ if IsEqualGUID(IID, IDAUseGenerators) then begin
+ if not (fProviderType in [bdeINTRBASE, bdeOracle]) then Exit;
+ end;
+
+ if IsEqualGUID(IID, IDACanQueryGeneratorsNames) then begin
+ if not (fProviderType in [bdeINTRBASE]) then Exit;
+ end;
+
+ if IsEqualGUID(IID, IDAFileBasedDatabase) then begin
+ if not (fProviderType in [bdeINTRBASE, bdeMSACCESS]) then Exit;
+ end;
+
+ if IsEqualGUID(IID, IDACanQueryDatabaseNames) then begin
+ if not (fProviderType in [bdeINFORMIX, bdeMSSQL, bdeORACLE, bdeSYBASE]) then Exit;
+ end;
+
+ if IsEqualGUID(IID, IDADirectoryBasedDatabase) then begin
+ if not (fProviderType in [bdeSTANDARD]) then Exit;
+ end;
+
+ Result := inherited QueryInterface(IID, Obj);
+end;
+
+procedure Register;
+begin
+ RegisterComponents(DAPalettePageName, [TDABDEDriver]);
+end;
+
+exports
+ GetDriverObject name func_GetDriverObject;
+
+function TDAEBDEConnection.QuoteFieldName(const aTableName,
+ aFieldName: string): string;
+begin
+ Result := inherited QuoteFieldName(aTableName, aFieldName);
+ case fProviderType of
+ bdeSTANDARD:
+ if (aTableName <> '') and (aFieldName <> Result) then
+ Result := QuoteIdentifierIfNeeded(aTableName) + '.' + Result;
+ end;
+end;
+
+initialization
+ _driver := nil;
+ RegisterDriverProc(GetDriverObject);
+finalization
+ UnregisterDriverProc(GetDriverObject);
+ FreeAndNIL(_driver);
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDACRLabsUtils.inc b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDACRLabsUtils.inc
new file mode 100644
index 0000000..5cf9450
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDACRLabsUtils.inc
@@ -0,0 +1,60 @@
+{
+ !!! DO NOT REMOVE THIS FILE !!!
+
+ It's included with an $I directive in the SDAC and ODAC driver units and it's used in
+ their implementation of the IDAMustSetParams
+
+}
+procedure WriteCrLabsParamValues(InputParams : TDAParamCollection; OutputParams: TDAParams; IgnoreBlobType : boolean = false);
+var i : integer;
+ par : uDAInterfaces.TDAParam;
+ outpar : DBAccess.TDAParam;
+ blobtype : TFieldType;
+begin
+ for i := 0 to (InputParams.Count-1) do begin
+ par := InputParams[i];
+ outpar := OutputParams.ParamByName(par.Name);
+
+ // If no blob type is specified, then gets the default field type.
+ // BlobType is only meaningful to Oracle. MSSQL works fine just setting the DataType
+ blobtype := BlobTypeMappings[par.BlobType];
+ if (blobtype=ftUnknown)
+ then blobtype := DADataTypesMappings[par.DataType];
+
+ case par.DataType of
+ datBlob : begin
+ outpar.ParamType := TParamType(par.ParamType);
+ outpar.DataType := DADataTypesMappings[par.DataType];
+ if VarIsNull(par.Value) then
+ outpar.Clear
+ else begin
+ if VarIsArray(par.Value) then
+ outpar.Value := VariantBinaryToString(par.Value)
+ else
+ outpar.Value := par.Value;
+ end;
+ end;
+ datMemo : begin
+ outpar.ParamType := TParamType(par.ParamType);
+ outpar.DataType := ftMemo;
+
+ // Only happens with Oracle
+ if not IgnoreBlobType and (blobtype<>ftUnknown) then
+ outpar.DataType := blobtype;
+
+ if VarIsNull(par.Value) then
+ outpar.Clear
+ else
+ outpar.Value := par.Value;
+ end;
+ else begin
+ outpar.ParamType := TParamType(par.ParamType);
+ outpar.DataType := DADataTypesMappings[par.DataType];
+ if VarIsNull(par.Value)
+ then outpar.Clear
+ else outpar.Value := par.Value;
+ end;
+ end; { case }
+ end; { for }
+end;
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDADBISAMDriver.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDADBISAMDriver.pas
new file mode 100644
index 0000000..eff0c63
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDADBISAMDriver.pas
@@ -0,0 +1,1110 @@
+unit uDADBISAMDriver;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Driver Library
+{
+{ compiler: Delphi 6 and up
+{ platform: Win32
+{
+{ (c)opyright RemObjects Software. all rights reserved.
+{
+{ Using this code requires a valid license of the Data Abstract
+{ which can be obtained at http://www.remobjects.com.
+{----------------------------------------------------------------------------}
+
+{$IFDEF MSWINDOWS}
+{$I ..\DataAbstract.inc}
+{$ENDIF MSWINDOWS}
+{$IFDEF LINUX}
+{$I ../DataAbstract.inc}
+{$ENDIF LINUX}
+
+{$R DataAbstract_DBISAMDriver_Glyphs.res}
+
+{$I dbisamvr.inc}
+{$IFNDEF DBISAM_V4}
+{$DEFINE DBISAM_V3}
+{$ENDIF}
+
+interface
+
+uses DB, Classes, uDAEngine, uDAInterfaces, uROClasses, DBISAMTb, uDAUtils;
+
+type
+ { TDADBISAMDriver }
+ TDADBISAMDriver = class(TDADriverReference)
+ end;
+
+ { IDBISAMConnection }
+ IDBISAMConnection = interface
+ ['{C6222EF8-FBAE-42AE-B034-8FFAE8FF2578}']
+ end;
+
+ { IDBISAMConnectionProperties
+ Provides access to common properties of DBISAM connections }
+
+ IDBISAMConnectionProperties = interface
+ ['{41BAFCD6-D6EA-477E-B489-7EA6E05FFCC0}']
+ function GetForceBufferFlush: Boolean;
+ procedure SetForceBufferFlush(Value: Boolean);
+ function GetKeepConnections: Boolean;
+ procedure SetKeepConnections(Value: Boolean);
+ function GetLockProtocol: TLockProtocol;
+ procedure SetLockProtocol(Value: TLockProtocol);
+ function GetLockRetryCount: Byte;
+ procedure SetLockRetryCount(Value: Byte);
+ function GetLockWaitTime: Word;
+ procedure SetLockWaitTime(Value: Word);
+ function GetPrivateDir: string;
+ procedure SetPrivateDir(const Value: string);
+ function GetRemotePort: Integer;
+ procedure SetRemotePort(Value: Integer);
+ function GetRemoteService: string;
+ procedure SetRemoteService(const Value: string);
+ function GetRemoteTrace: Boolean;
+ procedure SetRemoteTrace(Value: Boolean);
+ {$IFDEF DBISAM_V3}
+ function GetRemoteType: TRemoteType;
+ procedure SetRemoteType(Value: TRemoteType);
+ {$ENDIF}
+ {$IFDEF DBISAM_V4}
+ function GetRemoteCompression: Byte;
+ procedure SetRemoteCompression(Value: Byte);
+ function GetRemoteEncryption: Boolean;
+ procedure SetRemoteEncryption(Value: Boolean);
+ function GetRemoteEncryptionPassword: string;
+ procedure SetRemoteEncryptionPassword(const Value: string);
+ function GetRemoteTimeout: Integer;
+ procedure SetRemoteTimeout(Value: Integer);
+ {$ENDIF}
+
+ procedure AddPassword( const aPassword: string);
+ procedure RemovePassword(const aPassword: string);
+ procedure RemoveAllPasswords;
+
+ property ForceBufferFlush: Boolean read GetForceBufferFlush write SetForceBufferFlush;
+ property KeepConnections: Boolean read GetKeepConnections write SetKeepConnections;
+ property LockProtocol: TLockProtocol read GetLockProtocol write SetLockProtocol;
+ property LockRetryCount: Byte read GetLockRetryCount write SetLockRetryCount;
+ property LockWaitTime: Word read GetLockWaitTime write SetLockWaitTime;
+ property PrivateDir: string read GetPrivateDir write SetPrivateDir;
+ property RemotePort: Integer read GetRemotePort write SetRemotePort;
+ property RemoteService: string read GetRemoteService write SetRemoteService;
+ property RemoteTrace: Boolean read GetRemoteTrace write SetRemoteTrace;
+ {$IFDEF DBISAM_V3}
+ property RemoteType: TRemoteType read GetRemoteType write SetRemoteType;
+ {$ENDIF}
+ {$IFDEF DBISAM_V4}
+ property RemoteCompression: Byte read GetRemoteCompression write SetRemoteCompression;
+ property RemoteEncryption: Boolean read GetRemoteEncryption write SetRemoteEncryption;
+ property RemoteEncryptionPassword: string read GetRemoteEncryptionPassword write SetRemoteEncryptionPassword;
+ property RemoteTimeout: Integer read GetRemoteTimeout write SetRemoteTimeout;
+ {$ENDIF}
+ end;
+
+ { TDBISAMConnection }
+ TDBISAMConnection = class(TDAConnectionWrapper)
+ private
+ fDatabase: TDBISAMDatabase;
+ fSession: TDBISAMSession;
+
+ protected
+ function GetConnected: Boolean; override;
+ procedure SetConnected(Value: Boolean); override;
+
+ public
+ constructor Create(AOwner: TComponent); override;
+
+ property Database: TDBISAMDatabase read fDatabase;
+ property Session: TDBISAMSession read fSession;
+ end;
+
+ { TDAEDBISAMDriver }
+ TDAEDBISAMDriver = class(TDAEDriver)
+ private
+
+ protected
+ function GetConnectionClass: TDAEConnectionClass; override;
+
+ // IDADriver
+ function GetDriverID: string; override;
+ function GetDescription: string; override;
+
+ procedure GetAuxParams(const AuxDriver: string; out List: IROStrings); override;
+
+ function GetAvailableDriverOptions: TDAAvailableDriverOptions; override;
+ function GetDefaultConnectionType(const AuxDriver: string): string; override; safecall;
+ public
+ end;
+
+ { TDAEDBISAMConnection }
+ TDAEDBISAMConnection = class(TDAEConnection, IDBISAMConnection, IDBISAMConnectionProperties)
+ private
+ fConnection: TDBISAMConnection;
+
+ protected
+ // IDBISAMConnectionProperties
+ function GetForceBufferFlush: Boolean;
+ procedure SetForceBufferFlush(Value: Boolean);
+ function GetKeepConnections: Boolean;
+ procedure SetKeepConnections(Value: Boolean);
+ function GetLockProtocol: TLockProtocol;
+ procedure SetLockProtocol(Value: TLockProtocol);
+ function GetLockRetryCount: Byte;
+ procedure SetLockRetryCount(Value: Byte);
+ function GetLockWaitTime: Word;
+ procedure SetLockWaitTime(Value: Word);
+ function GetPrivateDir: string;
+ procedure SetPrivateDir(const Value: string);
+ function GetRemotePort: Integer;
+ procedure SetRemotePort(Value: Integer);
+ function GetRemoteService: string;
+ procedure SetRemoteService(const Value: string);
+ function GetRemoteTrace: Boolean;
+ procedure SetRemoteTrace(Value: Boolean);
+ {$IFDEF DBISAM_V3}
+ function GetRemoteType: TRemoteType;
+ procedure SetRemoteType(Value: TRemoteType);
+ {$ENDIF}
+ {$IFDEF DBISAM_V4}
+ function GetRemoteCompression: Byte;
+ procedure SetRemoteCompression(Value: Byte);
+ function GetRemoteEncryption: Boolean;
+ procedure SetRemoteEncryption(Value: Boolean);
+ function GetRemoteEncryptionPassword: string;
+ procedure SetRemoteEncryptionPassword(const Value: string);
+ function GetRemoteTimeout: Integer;
+ procedure SetRemoteTimeout(Value: Integer);
+ {$ENDIF}
+ procedure AddPassword( const aPassword: string);
+ procedure RemovePassword(const aPassword: string);
+ procedure RemoveAllPasswords;
+
+ // IDAConnection
+ function CreateCustomConnection: TCustomConnection; override;
+ function CreateMacroProcessor: TDASQLMacroProcessor; override;
+
+ function GetDatasetClass: TDAEDatasetClass; override;
+ procedure DoApplyConnectionString(aConnStrParser: TDAConnectionStringParser; aConnectionObject: TCustomConnection); override;
+ function DoBeginTransaction: Integer; override;
+ procedure DoCommitTransaction; override;
+ procedure DoRollbackTransaction; override;
+ function DoGetInTransaction: Boolean; override;
+ procedure DoGetTableNames(out List: IROStrings); override;
+ function DoGetLastAutoInc(const GeneratorName: string): integer; override;
+ procedure DoGetTableFields(const aTableName: string; out Fields: TDAFieldCollection);override;
+ function IdentifierNeedsQuoting(const iIdentifier: string): boolean; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ public
+ end;
+
+ { TDAEDBISAMQuery }
+ TDAEDBISAMQuery = class(TDAEDataset, IDAMustSetParams)
+ private
+ protected
+ function CreateDataset(aConnection: TDAEConnection): TDataset; override;
+ procedure ClearParams; override;
+ function DoExecute: Integer; override;
+ function DoGetSQL: string; override;
+ procedure DoSetSQL(const Value: string); override;
+ procedure DoPrepare(Value: Boolean); override;
+
+ // IDAMustSetParams
+ {$IFDEF DBISAM_V4}
+ procedure RefreshParams; override;
+ {$ENDIF}
+ procedure SetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ end;
+
+const
+ DBISAM_DriverType = 'DBISAM';
+
+procedure Register;
+
+function GetDriverObject: IDADriver; stdcall;
+
+implementation
+
+uses
+ SysUtils, uDADriverManager, uDARes, uDAMacroProcessors, Variants,
+ uROBinaryHelpers;
+
+var
+ _driver: TDAEDriver = nil;
+ dbisam_reservedwords: array of string;
+
+procedure Register;
+begin
+ RegisterComponents(DAPalettePageName, [TDADBISAMDriver]);
+end;
+
+{$IFDEF DataAbstract_SchemaModelerOnly}
+{$INCLUDE ..\DataAbstract_SchemaModelerOnly.inc}
+{$ENDIF DataAbstract_SchemaModelerOnly}
+
+function GetDriverObject: IDADriver;
+begin
+ {$IFDEF DataAbstract_SchemaModelerOnly}
+ if not RunningInSchemaModeler then begin
+ result := nil;
+ exit;
+ end;
+ {$ENDIF}
+ if (_driver = nil) then _driver := TDAEDBISAMDriver.Create(nil);
+ result := _driver;
+end;
+
+{ TDBISAMConnection }
+
+constructor TDBISAMConnection.Create(AOwner: TComponent);
+begin
+ inherited;
+
+ fSession := TDBISAMSession.Create(Self);
+ fSession.AutoSessionName := TRUE;
+
+ fDatabase := TDBISAMDatabase.Create(Self);
+ fDatabase.SessionName := fSession.SessionName;
+ fDatabase.DatabaseName := 'DBISAMDB';
+end;
+
+function TDBISAMConnection.GetConnected: Boolean;
+begin
+ result := fDatabase.Connected;
+end;
+
+procedure TDBISAMConnection.SetConnected(Value: Boolean);
+begin
+ if not(csDestroying in fDatabase.ComponentState) then begin
+ try
+ fSession.Active := Value;
+ fDatabase.Connected := Value;
+ except
+ fSession.Active := FALSE;
+ fDatabase.Connected := FALSE;
+ raise;
+ end;
+ end;
+end;
+
+{ TDAEDBISAMConnection }
+
+procedure TDAEDBISAMConnection.DoApplyConnectionString(
+ aConnStrParser: TDAConnectionStringParser; aConnectionObject: TCustomConnection);
+begin
+ inherited;
+ with aConnStrParser do begin
+ if (Self.UserID <> '') then
+ fConnection.Session.RemoteUser := Self.UserID
+ else
+ fConnection.Session.RemoteUser := UserID;
+ if (Self.Password <> '') then
+ fConnection.Session.RemotePassword := Self.Password
+ else
+ fConnection.Session.RemotePassword := Password;
+
+ if (Server <> '') then begin
+ // Remote connection
+ fConnection.Session.SessionType := stRemote;
+ fConnection.Session.RemoteHost := Server;
+ fConnection.Database.RemoteDatabase := Database;
+ if (AuxParams['RemotePort'] <> '') then
+ fConnection.Session.RemotePort := StrToInt(AuxParams['RemotePort']);
+ if (AuxParams['RemoteService'] <> '') then
+ fConnection.Session.RemoteService := AuxParams['RemoteService'];
+ if (AuxParams['RemoteTrace'] = 'False') then
+ fConnection.Session.RemoteTrace := False
+ else if (AuxParams['RemoteTrace'] = 'True') then
+ fConnection.Session.RemoteTrace := True;
+ {$IFDEF DBISAM_V3}
+ if (AuxParams['RemoteType'] = 'rtLAN') then
+ fConnection.Session.RemoteType := rtLAN
+ else if (AuxParams['RemoteType'] = 'rtInternet') then
+ fConnection.Session.RemoteType := rtInternet;
+ {$ENDIF}
+ {$IFDEF DBISAM_V4}
+ if (AuxParams['RemoteCompression'] <> '') then
+ if (StrToInt(AuxParams['RemoteCompression']) in [0..9]) then
+ fConnection.Session.RemoteCompression := StrToInt(AuxParams['RemoteCompression']);
+ if (AuxParams['RemoteEncryption'] = 'False') then
+ fConnection.Session.RemoteEncryption := False
+ else if (AuxParams['RemoteEncryption'] = 'True') then
+ fConnection.Session.RemoteEncryption := True;
+ if (AuxParams['RemoteEncryptionPassword'] <> '') then
+ fConnection.Session.RemoteEncryptionPassword := AuxParams['RemoteEncryptionPassword'];
+ if (AuxParams['RemoteTimeout'] <> '') then
+ fConnection.Session.RemoteTimeout := StrToInt(AuxParams['RemoteTimeout']);
+ {$ENDIF}
+ end
+ else begin
+ // Local connection
+ fConnection.Session.SessionType := stLocal;
+ fConnection.Database.Directory := Database;
+ end;
+
+ if (AuxParams['ForceBufferFlush'] = 'False') then
+ fConnection.Session.ForceBufferFlush := False
+ else if (AuxParams['ForceBufferFlush'] = 'True') then
+ fConnection.Session.ForceBufferFlush := True;
+ if (AuxParams['KeepConnections'] = 'False') then
+ begin
+ fConnection.Session.KeepConnections := False;
+ fConnection.Database.KeepConnection := False;
+ end
+ else if (AuxParams['KeepConnections'] = 'True') then
+ begin
+ fConnection.Session.KeepConnections := True;
+ fConnection.Database.KeepConnection := True;
+ end;
+ if (AuxParams['LockProtocol'] = 'lpOptimistic') then
+ fConnection.Session.LockProtocol := lpOptimistic
+ else if (AuxParams['LockProtocol'] = 'lpPessimistic') then
+ fConnection.Session.LockProtocol := lpPessimistic;
+ if (AuxParams['LockRetryCount'] <> '') then
+ fConnection.Session.LockRetryCount := StrToInt(AuxParams['LockRetryCount']);
+ if (AuxParams['LockWaitTime'] <> '') then
+ fConnection.Session.LockWaitTime := StrToInt(AuxParams['LockWaitTime']);
+ if (AuxParams['PrivateDir'] <> '') then
+ fConnection.Session.PrivateDir := AuxParams['PrivateDir'];
+ if (AuxParams['TablePassword'] <> '') then
+ begin
+ fConnection.Session.Active := True;
+ fConnection.Session.AddPassword(AuxParams['TablePassword']);
+ end;
+ end;
+end;
+
+function TDAEDBISAMConnection.DoBeginTransaction: integer;
+begin
+ result := -1;
+ fConnection.Database.StartTransaction;
+end;
+
+procedure TDAEDBISAMConnection.DoCommitTransaction;
+begin
+ with fConnection do
+ Database.Commit(Session.ForceBufferFlush);
+end;
+
+function TDAEDBISAMConnection.CreateCustomConnection: TCustomConnection;
+begin
+ result := TDBISAMConnection.Create(nil);
+ fConnection := TDBISAMConnection(result);
+end;
+
+function TDAEDBISAMConnection.GetDatasetClass: TDAEDatasetClass;
+begin
+ result := TDAEDBISAMQuery
+end;
+
+procedure TDAEDBISAMConnection.DoGetTableNames(out List: IROStrings);
+var
+ _database: string;
+begin
+ List := TROStrings.Create;
+ if (fConnection.Session.SessionType = stLocal) then
+ _database := fConnection.Database.Directory
+ else
+ _database := fConnection.Database.RemoteDatabase;
+
+ fConnection.Session.GetTableNames(_database, List.Strings);
+end;
+
+procedure TDAEDBISAMConnection.DoRollbackTransaction;
+begin
+ fConnection.Database.Rollback;
+end;
+
+function TDAEDBISAMConnection.DoGetInTransaction: Boolean;
+begin
+ result := fConnection.Database.InTransaction;
+end;
+
+function TDAEDBISAMConnection.CreateMacroProcessor: TDASQLMacroProcessor;
+begin
+ result := TDADBISAMMacroProcessor.Create;
+end;
+
+function TDAEDBISAMConnection.GetForceBufferFlush: Boolean;
+begin
+ result := fConnection.Session.ForceBufferFlush;
+end;
+
+procedure TDAEDBISAMConnection.SetForceBufferFlush(Value: Boolean);
+begin
+ fConnection.Session.ForceBufferFlush := Value;
+end;
+
+function TDAEDBISAMConnection.GetKeepConnections: Boolean;
+begin
+ result := fConnection.Session.KeepConnections;
+end;
+
+procedure TDAEDBISAMConnection.SetKeepConnections(Value: Boolean);
+begin
+ fConnection.Session.KeepConnections := Value;
+ fConnection.Database.KeepConnection := Value;
+end;
+
+function TDAEDBISAMConnection.GetLockProtocol: TLockProtocol;
+begin
+ result := fConnection.Session.LockProtocol;
+end;
+
+procedure TDAEDBISAMConnection.SetLockProtocol(Value: TLockProtocol);
+begin
+ fConnection.Session.LockProtocol := Value;
+end;
+
+function TDAEDBISAMConnection.GetLockRetryCount: Byte;
+begin
+ result := fConnection.Session.LockRetryCount;
+end;
+
+procedure TDAEDBISAMConnection.SetLockRetryCount(Value: Byte);
+begin
+ fConnection.Session.LockRetryCount := Value;
+end;
+
+function TDAEDBISAMConnection.GetLockWaitTime: Word;
+begin
+ result := fConnection.Session.LockWaitTime;
+end;
+
+procedure TDAEDBISAMConnection.SetLockWaitTime(Value: Word);
+begin
+ fConnection.Session.LockWaitTime := Value;
+end;
+
+function TDAEDBISAMConnection.GetPrivateDir: string;
+begin
+ result := fConnection.Session.PrivateDir;
+end;
+
+procedure TDAEDBISAMConnection.SetPrivateDir(const Value: string);
+begin
+ fConnection.Session.PrivateDir := Value;
+end;
+
+function TDAEDBISAMConnection.GetRemotePort: Integer;
+begin
+ result := fConnection.Session.RemotePort;
+end;
+
+procedure TDAEDBISAMConnection.SetRemotePort(Value: Integer);
+begin
+ fConnection.Session.RemotePort := Value;
+end;
+
+function TDAEDBISAMConnection.GetRemoteService: string;
+begin
+ result := fConnection.Session.RemoteService;
+end;
+
+procedure TDAEDBISAMConnection.SetRemoteService(const Value: string);
+begin
+ fConnection.Session.RemoteService := Value;
+end;
+
+function TDAEDBISAMConnection.GetRemoteTrace: Boolean;
+begin
+ result := fConnection.Session.RemoteTrace;
+end;
+
+procedure TDAEDBISAMConnection.SetRemoteTrace(Value: Boolean);
+begin
+ fConnection.Session.RemoteTrace := Value;
+end;
+
+{$IFDEF DBISAM_V3}
+
+function TDAEDBISAMConnection.GetRemoteType: TRemoteType;
+begin
+ result := fConnection.Session.RemoteType;
+end;
+
+procedure TDAEDBISAMConnection.SetRemoteType(Value: TRemoteType);
+begin
+ fConnection.Session.RemoteType := Value;
+end;
+{$ENDIF}
+
+{$IFDEF DBISAM_V4}
+
+function TDAEDBISAMConnection.GetRemoteCompression: Byte;
+begin
+ result := fConnection.Session.RemoteCompression;
+end;
+
+procedure TDAEDBISAMConnection.SetRemoteCompression(Value: Byte);
+begin
+ fConnection.Session.RemoteCompression := Value;
+end;
+
+function TDAEDBISAMConnection.GetRemoteEncryption: Boolean;
+begin
+ result := fConnection.Session.RemoteEncryption;
+end;
+
+procedure TDAEDBISAMConnection.SetRemoteEncryption(Value: Boolean);
+begin
+ fConnection.Session.RemoteEncryption := Value;
+end;
+
+function TDAEDBISAMConnection.GetRemoteEncryptionPassword: string;
+begin
+ result := fConnection.Session.RemoteEncryptionPassword;
+end;
+
+procedure TDAEDBISAMConnection.SetRemoteEncryptionPassword(const Value: string);
+begin
+ fConnection.Session.RemoteEncryptionPassword := Value;
+end;
+
+function TDAEDBISAMConnection.GetRemoteTimeout: Integer;
+begin
+ result := fConnection.Session.RemoteTimeout;
+end;
+
+procedure TDAEDBISAMConnection.SetRemoteTimeout(Value: Integer);
+begin
+ fConnection.Session.RemoteTimeout := Value;
+end;
+{$ENDIF}
+
+procedure TDAEDBISAMConnection.AddPassword( const aPassword: string);
+begin
+ fConnection.Session.AddPassword(aPassword);
+end;
+
+procedure TDAEDBISAMConnection.RemovePassword( const aPassword: string);
+begin
+ fConnection.Session.RemovePassword(aPassword);
+end;
+
+procedure TDAEDBISAMConnection.RemoveAllPasswords;
+begin
+ fConnection.Session.RemoveAllPasswords;
+end;
+
+function TDAEDBISAMConnection.DoGetLastAutoInc(
+ const GeneratorName: string): integer;
+var
+ lQuery: IDADataset;
+begin
+ Result:= inherited DoGetLastAutoInc(GeneratorName);
+ if GeneratorName <> '' then begin
+ lQuery:=GetDatasetClass.Create(Self);
+ try
+ lQuery.SQL := 'SELECT LASTAUTOINC('''+GeneratorName+''') from '+QuoteIdentifierIfNeeded(GeneratorName);
+ lQuery.Open;
+ Result := lQuery.Fields[0].AsInteger;
+ finally
+ lQuery:=nil;
+ end;
+ end;
+end;
+
+{$IFDEF DELPHI10UP}
+{$WARN SYMBOL_DEPRECATED OFF}
+{$ENDIF DELPHI10UP}
+procedure TDAEDBISAMConnection.DoGetTableFields(const aTableName: string;
+ out Fields: TDAFieldCollection);
+var
+ i: integer;
+ pos1: integer;
+ fld: TDAField;
+ {$IFDEF DBISAM_V4}
+ lofld:TDBISAMFieldDef;
+ {$ELSE}
+ lofld:TFieldDef;
+ {$ENDIF}
+ s: string;
+ ltable: TDBISAMTable;
+begin
+ Fields:=TDAFieldCollection.Create(nil);
+ ltable:=TDBISAMTable.Create(nil);
+ try
+ ltable.DatabaseName := fConnection.Database.DatabaseName;
+ ltable.SessionName := fConnection.Session.SessionName;
+ ltable.TableName := aTableName;
+ ltable.FieldDefs.Update;
+ for i:=0 to ltable.FieldDefs.Count-1 do begin
+ lofld:=ltable.FieldDefs[i];
+ fld:= Fields.Add;
+ fld.Name:= lofld.Name;
+ fld.DataType:= VCLTypeToDAType(lofld.DataType);
+ fld.Size:= lofld.Size;
+ fld.Required:= lofld.Required;
+ {$IFDEF DBISAM_V4}
+ fld.DefaultValue:=lofld.DefaultValue;
+ fld.Description:=lofld.Description;
+ {$ENDIF DBISAM_V4}
+ fld.ReadOnly:= DB.faReadonly in lofld.Attributes;
+ if fld.DataType = datAutoInc then fld.GeneratorName:= aTableName;
+ if fld.DataType = datDecimal then begin
+ case lofld.DataType of
+ ftBCD: begin
+ fld.DecimalPrecision:=20;
+ fld.DecimalScale:=lofld.Size;
+ end;
+ end;
+ end;
+ end;
+
+ //pk
+ ltable.IndexDefs.Update;
+ For i:=0 to ltable.IndexDefs.Count - 1 do
+ if ixPrimary in ltable.IndexDefs[i].Options then begin
+ Pos1 := 1;
+ s:=ltable.IndexDefs[i].Fields;
+ while Pos1 <= Length(s) do begin
+ fld := Fields.FindField(ExtractFieldName(s, Pos1));
+ if fld <> nil then fld.InPrimaryKey:=True;
+ end;
+ end;
+
+ finally
+ ltable.free;
+ end;
+end;
+{$IFDEF DELPHI10UP}
+{$WARN SYMBOL_DEPRECATED ON}
+{$ENDIF DELPHI10UP}
+
+function TDAEDBISAMConnection.IdentifierNeedsQuoting(
+ const iIdentifier: string): boolean;
+begin
+ Result := inherited IdentifierNeedsQuoting(iIdentifier) or TestIdentifier(iIdentifier,dbisam_reservedwords);
+end;
+
+{ TDAEDBISAMDriver }
+
+procedure TDAEDBISAMDriver.GetAuxParams(const AuxDriver: string; out List: IROStrings);
+begin
+ inherited;
+
+ List.Add('ForceBufferFlush=False,True');
+ List.Add('KeepConnections=False,True');
+ List.Add('LockProtocol=lpOptimistic,lpPessimistic');
+ List.Add('LockRetryCount=');
+ List.Add('LockWaitTime=');
+ List.Add('PrivateDir=');
+ List.Add('RemotePort=');
+ List.Add('RemoteService=');
+ List.Add('RemoteTrace=False,True');
+ List.Add('TablePassword=');
+ {$IFDEF DBISAM_V3}
+ List.Add('RemoteType=rtLAN,rtInternet');
+ {$ENDIF}
+ {$IFDEF DBISAM_V4}
+ List.Add('RemoteCompression=');
+ List.Add('RemoteEncryption=False,True');
+ List.Add('RemoteEncryptionPassword=');
+ List.Add('RemoteTimeout=');
+ {$ENDIF}
+
+ List.Sorted := True;
+end;
+
+function TDAEDBISAMDriver.GetAvailableDriverOptions: TDAAvailableDriverOptions;
+begin
+ result := [doServerName, doDatabaseName, doLogin, doCustom];
+end;
+
+function TDAEDBISAMDriver.GetConnectionClass: TDAEConnectionClass;
+begin
+ result := TDAEDBISAMConnection
+end;
+
+function TDAEDBISAMDriver.GetDefaultConnectionType(
+ const AuxDriver: string): string;
+begin
+ Result:=DBISAM_DriverType;
+end;
+
+function TDAEDBISAMDriver.GetDescription: string;
+begin
+ {$IFDEF DBISAM_V3}
+ result := 'DBISAM3 Driver'{$IFDEF DataAbstract_SchemaModelerOnly} + SchemaModelerOnly{$ENDIF};
+ {$ENDIF}
+ {$IFDEF DBISAM_V4}
+ result := 'DBISAM4 Driver'{$IFDEF DataAbstract_SchemaModelerOnly} + SchemaModelerOnly{$ENDIF};
+ {$ENDIF}
+end;
+
+function TDAEDBISAMDriver.GetDriverID: string;
+begin
+ {$IFDEF DBISAM_V3}
+ result := 'DBISAM3';
+ {$ENDIF}
+ {$IFDEF DBISAM_V4}
+ result := 'DBISAM4';
+ {$ENDIF}
+end;
+
+{ TDAEDBISAMQuery }
+
+function TDAEDBISAMQuery.CreateDataset(aConnection: TDAEConnection): TDataset;
+begin
+ result := TDBISAMQuery.Create(nil);
+
+ with TDBISAMQuery(result) do begin
+ DatabaseName := TDAEDBISAMConnection(aConnection).fConnection.Database.DatabaseName;
+ SessionName := TDAEDBISAMConnection(aConnection).fConnection.Session.SessionName;
+ ReadOnly := True;
+ RequestLive := True;
+ end;
+end;
+
+function TDAEDBISAMQuery.DoExecute: integer;
+begin
+ with TDBISAMQuery(Dataset) do begin
+ ExecSQL;
+ result := RowsAffected;
+ end;
+end;
+
+function TDAEDBISAMQuery.DoGetSQL: string;
+begin
+ result := TDBISAMQuery(Dataset).SQL.Text
+end;
+
+procedure TDAEDBISAMQuery.DoPrepare(Value: Boolean);
+begin
+ TDBISAMQuery(Dataset).Prepared := Value;
+end;
+
+procedure TDAEDBISAMQuery.SetParamValues(AParams: TDAParamCollection);
+var
+ i: integer;
+ par: uDAInterfaces.TDAParam;
+ {$IFDEF DBISAM_V4}
+ outpar: TDBISAMParam;
+ {$ELSE}
+ outpar: TParam;
+ {$ENDIF}
+ ft: TFieldType;
+ lParIsEmpty: Boolean;
+begin
+ for i := 0 to (AParams.Count - 1) do begin
+ par := AParams[i];
+ outpar := TDBISAMQuery(Dataset).Params.ParamByName(par.Name);
+
+ ft := DATypeToVCLType(par.DataType);
+ {$IFNDEF DBISAM_V4}
+ case par.ParamType of
+ daptInput: outpar.ParamType := ptInput;
+ daptOutput: outpar.ParamType := ptOutput;
+ daptInputOutput: outpar.ParamType := ptInputOutput;
+ daptResult: outpar.ParamType := ptResult;
+ end;
+ {$ENDIF DBISAM_V3}
+ lParIsEmpty := VarIsEmpty(par.Value) or VarIsNull(par.Value);
+
+ if par.DataType = datBlob then begin
+ outpar.DataType := ftBlob;
+ if not (par.ParamType in [daptOutput, daptResult]) then begin
+ if lParIsEmpty then
+ outpar.Value := Null
+ else
+ outpar.Value := VariantBinaryToString(par.Value);
+ end;
+ end
+ else begin
+ if (outpar.DataType <> ft) and (ft <> ftUnknown) then outpar.DataType := ft;
+ if not (par.ParamType in [daptOutput, daptResult]) then outpar.Value := par.Value;
+ end;
+
+ if lParIsEmpty and (par.DataType <> datUnknown) then begin
+ if (outpar.DataType <> ft) and (ft <> ftUnknown) then outpar.DataType := ft;
+ end;
+ end;
+end;
+
+procedure TDAEDBISAMQuery.GetParamValues(AParams: TDAParamCollection);
+var
+ i: integer;
+ par: uDAInterfaces.TDAParam;
+begin
+ for i := 0 to (AParams.Count - 1) do begin
+ par := AParams[i];
+ if Par.ParamType in [daptOutput, daptInputOutput, daptResult] then
+ Par.Value := TDBISAMQuery(Dataset).Params.ParamByName(par.Name).Value;
+ end;
+end;
+
+procedure TDAEDBISAMQuery.DoSetSQL(const Value: string);
+begin
+ TDBISAMQuery(Dataset).SQL.Text := Value;
+end;
+
+{$IFDEF DBISAM_V4}
+procedure TDAEDBISAMQuery.RefreshParams;
+var
+ i: Integer;
+ par: TDAParam;
+ outpar: TDBISAMParam;
+ ds: TDBISAMQuery;
+begin
+ inherited;
+ ds := TDBISAMQuery(Dataset);
+ if not Assigned(ds.Params) then
+ Exit;
+ for i := 0 to ds.Params.Count -1 do begin
+ outpar := ds.Params[i];
+
+ par := self.ParamByName(outpar.Name);
+
+ if outpar.DataType <> ftUnknown then begin
+ par.DataType := VCLTypeToDAType(outpar.DataType);
+ end;
+ end;
+end;
+{$ENDIF}
+
+exports GetDriverObject name func_GetDriverObject;
+
+procedure TDAEDBISAMQuery.ClearParams;
+begin
+ inherited;
+ TDBISAMQuery(Dataset).Params.Clear;
+end;
+
+procedure dbisam_InitializeReservedWords;
+begin
+ SetLength(dbisam_reservedwords, 220);
+ // sorted with TStringList.Sort (bds2007)
+ dbisam_reservedwords[0] := 'ABS';
+ dbisam_reservedwords[1] := 'ACOS';
+ dbisam_reservedwords[2] := 'ADD';
+ dbisam_reservedwords[3] := 'ALL';
+ dbisam_reservedwords[4] := 'ALLTRIM';
+ dbisam_reservedwords[5] := 'ALTER';
+ dbisam_reservedwords[6] := 'AND';
+ dbisam_reservedwords[7] := 'AS';
+ dbisam_reservedwords[8] := 'ASC';
+ dbisam_reservedwords[9] := 'ASCENDING';
+ dbisam_reservedwords[10] := 'ASIN';
+ dbisam_reservedwords[11] := 'AT';
+ dbisam_reservedwords[12] := 'ATAN';
+ dbisam_reservedwords[13] := 'ATAN2';
+ dbisam_reservedwords[14] := 'AUTOINC';
+ dbisam_reservedwords[15] := 'AVG';
+ dbisam_reservedwords[16] := 'BETWEEN';
+ dbisam_reservedwords[17] := 'BINARY';
+ dbisam_reservedwords[18] := 'BIT';
+ dbisam_reservedwords[19] := 'BLOB';
+ dbisam_reservedwords[20] := 'BLOCK';
+ dbisam_reservedwords[21] := 'BOOL';
+ dbisam_reservedwords[22] := 'BOOLEAN';
+ dbisam_reservedwords[23] := 'BOTH';
+ dbisam_reservedwords[24] := 'BY';
+ dbisam_reservedwords[25] := 'BYTES';
+ dbisam_reservedwords[26] := 'CAST';
+ dbisam_reservedwords[27] := 'CEIL';
+ dbisam_reservedwords[28] := 'CEILING';
+ dbisam_reservedwords[29] := 'CHAR';
+ dbisam_reservedwords[30] := 'CHARACTER';
+ dbisam_reservedwords[31] := 'CHARCASE';
+ dbisam_reservedwords[32] := 'CHARS';
+ dbisam_reservedwords[33] := 'COALESCE';
+ dbisam_reservedwords[34] := 'COLUMN';
+ dbisam_reservedwords[35] := 'COLUMNS';
+ dbisam_reservedwords[36] := 'COMMIT';
+ dbisam_reservedwords[37] := 'COMPRESS';
+ dbisam_reservedwords[38] := 'CONCAT';
+ dbisam_reservedwords[39] := 'CONSTRAINT';
+ dbisam_reservedwords[40] := 'COS';
+ dbisam_reservedwords[41] := 'COT';
+ dbisam_reservedwords[42] := 'COUNT';
+ dbisam_reservedwords[43] := 'CREATE';
+ dbisam_reservedwords[44] := 'CURRENT_DATE';
+ dbisam_reservedwords[45] := 'CURRENT_GUID';
+ dbisam_reservedwords[46] := 'CURRENT_TIME';
+ dbisam_reservedwords[47] := 'CURRENT_TIMESTAMP';
+ dbisam_reservedwords[48] := 'DAY';
+ dbisam_reservedwords[49] := 'DAYOFWEEK';
+ dbisam_reservedwords[50] := 'DAYOFYEAR';
+ dbisam_reservedwords[51] := 'DAYSFROMMSECS';
+ dbisam_reservedwords[52] := 'DECIMAL';
+ dbisam_reservedwords[53] := 'DEFAULT';
+ dbisam_reservedwords[54] := 'DEGREES';
+ dbisam_reservedwords[55] := 'DELETE';
+ dbisam_reservedwords[56] := 'DELIMITER';
+ dbisam_reservedwords[57] := 'DESC';
+ dbisam_reservedwords[58] := 'DESCENDING';
+ dbisam_reservedwords[59] := 'DESCRIPTION';
+ dbisam_reservedwords[60] := 'DISTINCT';
+ dbisam_reservedwords[61] := 'DROP';
+ dbisam_reservedwords[62] := 'DUPBYTE';
+ dbisam_reservedwords[63] := 'ELSE';
+ dbisam_reservedwords[64] := 'EMPTY';
+ dbisam_reservedwords[65] := 'ENCRYPTED';
+ dbisam_reservedwords[66] := 'ESCAPE';
+ dbisam_reservedwords[67] := 'EXCEPT';
+ dbisam_reservedwords[68] := 'EXISTS';
+ dbisam_reservedwords[69] := 'EXP';
+ dbisam_reservedwords[70] := 'EXPORT';
+ dbisam_reservedwords[71] := 'EXTRACT';
+ dbisam_reservedwords[72] := 'FALSE';
+ dbisam_reservedwords[73] := 'FLOAT';
+ dbisam_reservedwords[74] := 'FLOOR';
+ dbisam_reservedwords[75] := 'FLUSH';
+ dbisam_reservedwords[76] := 'FOR';
+ dbisam_reservedwords[77] := 'FORCEINDEXREBUILD';
+ dbisam_reservedwords[78] := 'FROM';
+ dbisam_reservedwords[79] := 'FULL';
+ dbisam_reservedwords[80] := 'GRAPHIC';
+ dbisam_reservedwords[81] := 'GROUP';
+ dbisam_reservedwords[82] := 'GUID';
+ dbisam_reservedwords[83] := 'HAVING';
+ dbisam_reservedwords[84] := 'HEADERS';
+ dbisam_reservedwords[85] := 'HOUR';
+ dbisam_reservedwords[86] := 'HOURSFROMMSECS';
+ dbisam_reservedwords[87] := 'IDENT_CURRENT';
+ dbisam_reservedwords[88] := 'IDENTITY';
+ dbisam_reservedwords[89] := 'IF';
+ dbisam_reservedwords[90] := 'IFNULL';
+ dbisam_reservedwords[91] := 'IMPORT';
+ dbisam_reservedwords[92] := 'IN';
+ dbisam_reservedwords[93] := 'INCLUDE';
+ dbisam_reservedwords[94] := 'INDEX';
+ dbisam_reservedwords[95] := 'INNER';
+ dbisam_reservedwords[96] := 'INSERT';
+ dbisam_reservedwords[97] := 'INT';
+ dbisam_reservedwords[98] := 'INTEGER';
+ dbisam_reservedwords[99] := 'INTERSECT';
+ dbisam_reservedwords[100] := 'INTERVAL';
+ dbisam_reservedwords[101] := 'INTO';
+ dbisam_reservedwords[102] := 'IS';
+ dbisam_reservedwords[103] := 'JOIN';
+ dbisam_reservedwords[104] := 'KEY';
+ dbisam_reservedwords[105] := 'LARGEINT';
+ dbisam_reservedwords[106] := 'LAST';
+ dbisam_reservedwords[107] := 'LASTAUTOINC';
+ dbisam_reservedwords[108] := 'LCASE';
+ dbisam_reservedwords[109] := 'LEADING';
+ dbisam_reservedwords[110] := 'LEFT';
+ dbisam_reservedwords[111] := 'LENGTH';
+ dbisam_reservedwords[112] := 'LIKE';
+ dbisam_reservedwords[113] := 'LOCALE';
+ dbisam_reservedwords[114] := 'LOG';
+ dbisam_reservedwords[115] := 'LOG10';
+ dbisam_reservedwords[116] := 'LONGVARBINARY';
+ dbisam_reservedwords[117] := 'LONGVARCHAR';
+ dbisam_reservedwords[118] := 'LOWER';
+ dbisam_reservedwords[119] := 'LTRIM';
+ dbisam_reservedwords[120] := 'MAJOR';
+ dbisam_reservedwords[121] := 'MAX';
+ dbisam_reservedwords[122] := 'MAXIMUM';
+ dbisam_reservedwords[123] := 'MEMO';
+ dbisam_reservedwords[124] := 'MIN';
+ dbisam_reservedwords[125] := 'MINIMUM';
+ dbisam_reservedwords[126] := 'MINOR';
+ dbisam_reservedwords[127] := 'MINSFROMMSECS';
+ dbisam_reservedwords[128] := 'MINUTE';
+ dbisam_reservedwords[129] := 'MOD';
+ dbisam_reservedwords[130] := 'MONEY';
+ dbisam_reservedwords[131] := 'MONTH';
+ dbisam_reservedwords[132] := 'MSECOND';
+ dbisam_reservedwords[133] := 'MSECSFROMMSECS';
+ dbisam_reservedwords[134] := 'NOBACKUP';
+ dbisam_reservedwords[135] := 'NOCASE';
+ dbisam_reservedwords[136] := 'NOCHANGE';
+ dbisam_reservedwords[137] := 'NOJOINOPTIMIZE';
+ dbisam_reservedwords[138] := 'NONE';
+ dbisam_reservedwords[139] := 'NOT';
+ dbisam_reservedwords[140] := 'NULL';
+ dbisam_reservedwords[141] := 'NUMERIC';
+ dbisam_reservedwords[142] := 'OCCURS';
+ dbisam_reservedwords[143] := 'ON';
+ dbisam_reservedwords[144] := 'OPTIMIZE';
+ dbisam_reservedwords[145] := 'OR';
+ dbisam_reservedwords[146] := 'ORDER';
+ dbisam_reservedwords[147] := 'OUTER';
+ dbisam_reservedwords[148] := 'PAGE';
+ dbisam_reservedwords[149] := 'PI';
+ dbisam_reservedwords[150] := 'POS';
+ dbisam_reservedwords[151] := 'POSITION';
+ dbisam_reservedwords[152] := 'POWER';
+ dbisam_reservedwords[153] := 'PRIMARY';
+ dbisam_reservedwords[154] := 'RADIANS';
+ dbisam_reservedwords[155] := 'RAND';
+ dbisam_reservedwords[156] := 'RANGE';
+ dbisam_reservedwords[157] := 'REDEFINE';
+ dbisam_reservedwords[158] := 'RENAME';
+ dbisam_reservedwords[159] := 'REPAIR';
+ dbisam_reservedwords[160] := 'REPEAT';
+ dbisam_reservedwords[161] := 'REPLACE';
+ dbisam_reservedwords[162] := 'RIGHT';
+ dbisam_reservedwords[163] := 'ROLLBACK';
+ dbisam_reservedwords[164] := 'ROUND';
+ dbisam_reservedwords[165] := 'RTRIM';
+ dbisam_reservedwords[166] := 'RUNSUM';
+ dbisam_reservedwords[167] := 'SECOND';
+ dbisam_reservedwords[168] := 'SECSFROMMSECS';
+ dbisam_reservedwords[169] := 'SELECT';
+ dbisam_reservedwords[170] := 'SET';
+ dbisam_reservedwords[171] := 'SIGN';
+ dbisam_reservedwords[172] := 'SIN';
+ dbisam_reservedwords[173] := 'SIZE';
+ dbisam_reservedwords[174] := 'SMALLINT';
+ dbisam_reservedwords[175] := 'SPACE';
+ dbisam_reservedwords[176] := 'SQRT';
+ dbisam_reservedwords[177] := 'START';
+ dbisam_reservedwords[178] := 'STDDEV';
+ dbisam_reservedwords[179] := 'STOP';
+ dbisam_reservedwords[180] := 'SUBSTRING';
+ dbisam_reservedwords[181] := 'SUM';
+ dbisam_reservedwords[182] := 'TABLE';
+ dbisam_reservedwords[183] := 'TAN';
+ dbisam_reservedwords[184] := 'TEXT';
+ dbisam_reservedwords[185] := 'TEXTOCCURS';
+ dbisam_reservedwords[186] := 'TEXTSEARCH';
+ dbisam_reservedwords[187] := 'THEN';
+ dbisam_reservedwords[188] := 'TIME';
+ dbisam_reservedwords[189] := 'TIMESTAMP';
+ dbisam_reservedwords[190] := 'TO';
+ dbisam_reservedwords[191] := 'TOP';
+ dbisam_reservedwords[192] := 'TRAILBYTE';
+ dbisam_reservedwords[193] := 'TRAILING';
+ dbisam_reservedwords[194] := 'TRANSACTION';
+ dbisam_reservedwords[195] := 'TRIM';
+ dbisam_reservedwords[196] := 'TRUE';
+ dbisam_reservedwords[197] := 'TRUNC';
+ dbisam_reservedwords[198] := 'TRUNCATE';
+ dbisam_reservedwords[199] := 'UCASE';
+ dbisam_reservedwords[200] := 'UNION';
+ dbisam_reservedwords[201] := 'UNIQUE';
+ dbisam_reservedwords[202] := 'UPDATE';
+ dbisam_reservedwords[203] := 'UPGRADE';
+ dbisam_reservedwords[204] := 'UPPER';
+ dbisam_reservedwords[205] := 'USER';
+ dbisam_reservedwords[206] := 'VALUES';
+ dbisam_reservedwords[207] := 'VARBINARY';
+ dbisam_reservedwords[208] := 'VARBYTES';
+ dbisam_reservedwords[209] := 'VARCHAR';
+ dbisam_reservedwords[210] := 'VERIFY';
+ dbisam_reservedwords[211] := 'VERSION';
+ dbisam_reservedwords[212] := 'WEEK';
+ dbisam_reservedwords[213] := 'WHERE';
+ dbisam_reservedwords[214] := 'WITH';
+ dbisam_reservedwords[215] := 'WORD';
+ dbisam_reservedwords[216] := 'WORDS';
+ dbisam_reservedwords[217] := 'WORK';
+ dbisam_reservedwords[218] := 'YEAR';
+ dbisam_reservedwords[219] := 'YEARSFROMMSECS';
+end;
+
+initialization
+ _driver := nil;
+ RegisterDriverProc(GetDriverObject);
+ dbisam_InitializeReservedWords;
+finalization
+ dbisam_reservedwords := nil;
+ UnregisterDriverProc(GetDriverObject);
+ FreeAndNIL(_driver);
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDADBXDriver.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDADBXDriver.pas
new file mode 100644
index 0000000..e2f03a0
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDADBXDriver.pas
@@ -0,0 +1,951 @@
+unit uDADBXDriver;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Driver Library
+{
+{ compiler: Delphi 6 and up, Kylix 3 and up
+{ platform: Win32, Linux
+{
+{ (c)opyright RemObjects Software. all rights reserved.
+{
+{ Using this code requires a valid license of the Data Abstract
+{ which can be obtained at http://www.remobjects.com.
+{----------------------------------------------------------------------------}
+
+{$IFDEF MSWINDOWS}
+{$I ..\DataAbstract.inc}
+{$ENDIF MSWINDOWS}
+{$IFDEF LINUX}
+{$I ../DataAbstract.inc}
+{$ENDIF LINUX}
+
+{$R DataAbstract_DBXDriver_Glyphs.res}
+
+interface
+
+uses Windows,Classes, DB, uDAEngine, uDAInterfaces, uROClasses, SqlExpr,{$IFNDEF DELPHI11UP}DBXpress,{$ENDIF}
+ SqlConst, uDAUtils, uDAIBInterfaces, uDAAdoInterfaces,uDAMySQLInterfaces, {$IFDEF DELPHI9UP}uDASybaseInterfaces,{$ENDIF}
+ uDADB2Interfaces, uDAOracleInterfaces;
+
+const
+ // Standard dbExpress driver identifiers
+ dbx_UnknownId = '???';
+ dbx_MSSQLId = 'MSSQL';
+ dbx_InterbaseId = 'Interbase';
+ dbx_OracleId = 'Oracle';
+ dbx_DB2Id = 'DB2';
+ dbx_MySQLId = 'MYSQL';
+ dbx_InformixId = 'Informix';
+ {$IFDEF DELPHI9UP}
+ dbx_ASAid = 'ASA';
+ dbx_ASEid = 'ASE';
+ {$ENDIF}
+
+type
+ // Standard dbExpress driver enumerated
+ TDADBXDriverType = (dbx_Unknown,
+ dbx_MSSQL,
+ dbx_Interbase,
+ dbx_Oracle,
+ dbx_DB2,
+ dbx_MySQL,
+ dbx_Informix
+ {$IFDEF DELPHI9UP}
+ , dbx_ASA, dbx_ASE
+ {$ENDIF DELPHI9UP}
+ );
+
+const
+ // Standard dbExpress driver identifier array (useful for lookups)
+ DBXDrivers: array[TDADBXDriverType] of string = (
+ dbx_UnknownId,
+ dbx_MSSQLId,
+ dbx_InterbaseId,
+ dbx_OracleId,
+ dbx_DB2Id,
+ dbx_MySQLId,
+ dbx_InformixId
+ {$IFDEF DELPHI9UP}
+ ,dbx_ASAid, dbx_ASEid
+ {$ENDIF DELPHI9UP}
+ );
+
+type
+ { TDADBXDriver }
+ TDADBXDriver = class(TDADriverReference)
+ end;
+
+ { TDAEDBXDriver }
+ TDAEDBXDriver = class(TDAEDriver, IDADriver40)
+ protected
+ function GetConnectionClass: TDAEConnectionClass; override;
+
+ // IDADriver
+ function GetDriverID: string; override;
+ function GetDescription: string; override;
+
+ procedure GetAuxDrivers(out List: IROStrings); override;
+ procedure GetAuxParams(const AuxDriver: string; out List: IROStrings); override;
+
+ function GetAvailableDriverOptions: TDAAvailableDriverOptions; override;
+ // IDADriver40
+ function GetProviderDefaultCustomParameters(Provider: string): string; safecall;
+ function GetDefaultConnectionType(const AuxDriver: string): string; override; safecall;
+ public
+ end;
+
+ { IDBXConnection
+ For identification purposes. }
+ IDBXConnection = interface
+ ['{D4E8FE6C-76B5-46FA-A850-2FD626960775}']
+ function GetDriverName: string;
+ function GetDriverType: TDADBXDriverType;
+
+ property DriverName: string read GetDriverName;
+ property DriverType: TDADBXDriverType read GetDriverType;
+ end;
+
+ { TDBXConnection }
+ TDBXConnection = class(TDAConnectionWrapper)
+ private
+ fSQLConnection: TSQLConnection;
+ fTransDesc: TTransactionDesc;
+
+ protected
+ function GetConnected: Boolean; override;
+ procedure SetConnected(Value: Boolean); override;
+
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+
+ property SQLConnection: TSQLConnection read fSQLConnection;
+ property TransDesc: TTransactionDesc read fTransDesc;
+ end;
+
+
+ { TDAEDBXConnection }
+ TDAEDBXConnection = class(TDAEConnection, IDAFileBasedDatabase,
+ IDACanQueryDatabaseNames, IDAUseGenerators ,{IDAADOConnection,}
+ IDAInterbaseConnection, IDACanQueryGeneratorsNames,
+ {$IFDEF DELPHI9UP}IDASybaseConnection,{$ENDIF}
+ IDADB2Connection, IDAMySQLConnection,IDAOracleConnection)
+ private
+ fConnection: TDBXConnection;
+ fDriverName: string;
+ fDriverType: TDADBXDriverType;
+ fMSSQLSchemaEnabled: Boolean;
+ fSqlDialect: Integer;
+ protected
+ function QueryInterface(const IID: TGUID; out Obj): HResult; override; stdcall;
+ // TDAEConnection
+ function CreateCustomConnection: TCustomConnection; override;
+ function CreateMacroProcessor: TDASQLMacroProcessor; override;
+
+ function GetDatasetClass: TDAEDatasetClass; override;
+ function GetStoredProcedureClass: TDAEStoredProcedureClass; override;
+
+ procedure DoApplyConnectionString(aConnStrParser: TDAConnectionStringParser;
+ aConnectionObject: TCustomConnection); override;
+
+ function DoBeginTransaction: integer; override;
+ procedure DoCommitTransaction; override;
+ procedure DoRollbackTransaction; override;
+ function DoGetInTransaction: boolean; override;
+
+ function GetUserID: string; override; safecall;
+ procedure SetUserID(const Value: string); override; safecall;
+ function GetPassword: string; override; safecall;
+ procedure SetPassword(const Value: string); override; safecall;
+
+ procedure DoGetTableNames(out List: IROStrings); override;
+ procedure DoGetStoredProcedureNames(out List: IROStrings); override;
+ procedure DoGetViewNames(out List: IROStrings); override;
+ procedure DoGetForeignKeys(out ForeignKeys: TDADriverForeignKeyCollection); override;
+ procedure DoGetTableFields(const aTableName: string; out Fields: TDAFieldCollection); override;
+ procedure DoGetStoredProcedureParams(const aStoredProcedureName: string; out Params: TDAParamCollection); override;
+ function DoGetLastAutoInc(const GeneratorName: string): integer; override;
+ function IdentifierNeedsQuoting(const iIdentifier: string): boolean; override; safecall;
+ function GetQuoteChars: TDAQuoteCharArray; override;
+ // IDBXConnection
+ function GetDriverName: string;
+ function GetDriverType: TDADBXDriverType;
+ function GetSPSelectSyntax(HasArguments: Boolean): string; override;
+ safecall;
+ //IDAFileBasedDatabase
+ function GetFileExtensions: IROStrings;
+ //IDACanQueryDatabaseNames
+ function GetDatabaseNames: IROStrings;
+ //IDAUseGenerators
+ function GetNextAutoinc(const GeneratorName: string): integer; safecall;
+ // IDACanQueryGeneratorsNames
+ function GetGeneratorNames: IROStrings;
+ public
+ property MSSQLSchemaEnabled: Boolean read fMSSQLSchemaEnabled write fMSSQLSchemaEnabled;
+ end;
+
+ { TDAEDBXQuery }
+ TDAEDBXQuery = class(TDAEDataset,IDAMustSetParams)
+ private
+ protected
+ function CreateDataset(aConnection: TDAEConnection): TDataset; override;
+ function IsNeedToFixFMTBCDIssue: Boolean; override;
+ function DoExecute: integer; override;
+ function DoGetSQL: string; override;
+ procedure DoSetSQL(const Value: string); override;
+ procedure DoPrepare(Value: boolean); override;
+ procedure ClearParams; override;
+ procedure SetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ public
+ end;
+
+ { TDAEDBXStoredProcedure }
+ TDAEDBXStoredProcedure = class(TDAEStoredProcedure, IDAMustSetParams)
+ protected
+ function CreateDataset(aConnection: TDAEConnection): TDataset; override;
+
+ function GetStoredProcedureName: string; override;
+ procedure SetStoredProcedureName(const Name: string); override;
+ function DoExecute: integer; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function Execute: integer; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure RefreshParams; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ end;
+
+procedure Register;
+
+function DBXDriverIdToDBXDriverType(const anID: string): TDADBXDriverType;
+
+function GetDriverObject: IDADriver; stdcall;
+
+implementation
+
+uses SysUtils, INIFiles, uDADriverManager, uDARes, uDAMacroProcessors, Variants, SqlTimSt,
+ uROBinaryHelpers,uDASQL92Interfaces;
+
+// TODO: Add support for IADOConnection and IInterbaseConnection, etc by redefining QueryInterface in TDAEDBXConnection
+
+
+var
+ _driver: TDAEDriver = nil;
+
+procedure Register;
+begin
+ RegisterComponents(DAPalettePageName, [TDADBXDriver]);
+end;
+
+function GetDriverObject: IDADriver;
+begin
+ if (_driver = nil) then _driver := TDAEDBXDriver.Create(nil);
+ result := _driver;
+end;
+
+function DBXDriverIdToDBXDriverType(const anID: string): TDADBXDriverType;
+var
+ x: TDADBXDriverType;
+begin
+ result := dbx_Unknown;
+
+ for x := Low(TDADBXDriverType) to High(TDADBXDriverType) do
+ if AnsiSameText(DBXDrivers[x], anID) then begin
+ result := x;
+ Exit;
+ end;
+
+ //RaiseError('Unknown dbExpress driver %s', [anID]);
+end;
+
+{ TDBXConnection }
+
+constructor TDBXConnection.Create(AOwner: TComponent);
+begin
+ inherited;
+ fSQLConnection := TSQLConnection.Create(nil);
+end;
+
+destructor TDBXConnection.Destroy;
+begin
+ inherited;
+ fSQLConnection.Free;
+end;
+
+function TDBXConnection.GetConnected: Boolean;
+begin
+ result := fSQLConnection.Connected
+end;
+
+procedure TDBXConnection.SetConnected(Value: Boolean);
+begin
+ fSQLConnection.Connected := Value;
+end;
+
+{ TDAEDBXConnection }
+
+procedure TDAEDBXConnection.DoApplyConnectionString(
+ aConnStrParser: TDAConnectionStringParser; aConnectionObject: TCustomConnection);
+
+ function GetProfileString(Section, Setting, IniFileName: string): string;
+ var
+ IniFile: TMemIniFile;
+ List: TStrings;
+ begin
+ List := TStringList.Create;
+ try
+ IniFile := TMemIniFile.Create(IniFileName);
+ IniFile.ReadSectionValues(Section, List);
+ try
+ Result := List.Values[Setting];
+ finally
+ IniFile.Free;
+ end;
+ finally
+ List.Free;
+ end;
+ end;
+
+var
+ i: integer;
+ drvregfile: string;
+begin
+ inherited;
+
+ with aConnStrParser do begin
+
+ with TDBXConnection(aConnectionObject).SQLConnection do begin
+ DriverName := AuxDriver;
+
+ fDriverType := DBXDriverIdToDBXDriverType(AuxDriver);
+
+ drvregfile := GetDriverRegistryFile(false);
+
+ try
+ VendorLib := GetProfileString(DriverName, VENDORLIB_KEY, drvregfile);
+ LibraryName := GetProfileString(DriverName, DLLLIB_KEY, drvregfile);
+ GetDriverFunc := GetProfileString(DriverName, GETDRIVERFUNC_KEY, drvregfile);
+ except
+ DatabaseErrorFmt(SDriverNotInConfigFile, [DriverName, drvregfile]);
+ end;
+
+ Params.Clear;
+ Params.Values[szUSERNAME] := UserID;
+ Params.Values[szPASSWORD] := Password;
+ if fDriverType = dbx_Interbase then begin // Dbx requires a seperate host field for Interbase
+ Params.Values[DATABASENAME_KEY] := Server + ':' + Database;
+ if auxParams[SQLDIALECT_KEY] = '' then begin
+ AuxParams[SQLDIALECT_KEY] := '3'; // default to 3
+ end;
+ end else begin
+ Params.Values[HOSTNAME_KEY] := Server;
+ Params.Values[DATABASENAME_KEY] := Database;
+ end;
+ fMSSQLSchemaEnabled := false;
+ for i := 0 to (AuxParamsCount - 1) do begin
+ if AnsiSameText(AuxParamNames[i], 'DriverName') then
+ fConnection.fSQLConnection.DriverName:=AuxParams[AuxParamNames[i]]
+ else if AnsiSameText(AuxParamNames[i], 'GetDriverFunc') then
+ fConnection.fSQLConnection.GetDriverFunc:=AuxParams[AuxParamNames[i]]
+ else if AnsiSameText(AuxParamNames[i], 'LibraryName') then
+ fConnection.fSQLConnection.LibraryName:=AuxParams[AuxParamNames[i]]
+ else if AnsiSameText(AuxParamNames[i], 'TableScope') then begin
+ if AnsiSameText(AuxParams[AuxParamNames[i]], 'Synonyms') then
+ TableScope := [tsTable, tsView, tsSynonym]
+ else
+ TableScope := [tsTable, tsView]
+ end
+ else if AnsiSameText(AuxParamNames[i], 'Schemas') then
+ fMSSQLSchemaEnabled := AuxParams['Schemas'] = '1'
+ else begin
+ Params.Add(AuxParamNames[i] + '=' + AuxParams[AuxParamNames[i]]);
+ end;
+ end;
+ LoginPrompt := FALSE;
+ if fDriverType = dbx_Interbase then fSqlDialect := StrToIntDef(AuxParams[SQLDIALECT_KEY],3);
+ end;
+ end;
+end;
+
+function TDAEDBXConnection.DoBeginTransaction: integer;
+begin
+ result := -1;
+
+ // TODO: allow more flexibility here...
+ fConnection.fTransDesc.TransactionID := 1;
+ fConnection.fTransDesc.IsolationLevel := xilREADCOMMITTED;
+{$IFDEF DELPHI10UP}{$WARN SYMBOL_DEPRECATED OFF}{$ENDIF}
+ fConnection.fSQLConnection.StartTransaction(fConnection.fTransDesc);
+{$IFDEF DELPHI10UP}{$WARN SYMBOL_DEPRECATED ON}{$ENDIF}
+end;
+
+procedure TDAEDBXConnection.DoCommitTransaction;
+begin
+{$IFDEF DELPHI10UP}{$WARN SYMBOL_DEPRECATED OFF}{$ENDIF}
+ fConnection.fSQLConnection.Commit(fConnection.fTransDesc);
+{$IFDEF DELPHI10UP}{$WARN SYMBOL_DEPRECATED ON}{$ENDIF}
+end;
+
+function TDAEDBXConnection.CreateCustomConnection: TCustomConnection;
+begin
+ fConnection := TDBXConnection.Create(nil);
+ fConnection.SQLConnection.LoginPrompt := FALSE;
+ result := fConnection;
+end;
+
+function TDAEDBXConnection.GetDatasetClass: TDAEDatasetClass;
+begin
+ result := TDAEDBXQuery;
+end;
+
+function TDAEDBXConnection.GetStoredProcedureClass: TDAEStoredProcedureClass;
+begin
+ result := TDAEDBXStoredProcedure;
+end;
+
+procedure TDAEDBXConnection.DoGetStoredProcedureNames(out List: IROStrings);
+begin
+ inherited DoGetStoredProcedureNames(List);
+ case fDriverType of
+ dbx_MSSQL: MSSQL_DoGetNames(GetDatasetClass.Create(Self), List, dotProcedure, MSSQLSchemaEnabled);
+ dbx_Interbase: IB_GetObjectNames(GetDatasetClass.Create(Self), List, dotProcedure);
+ dbx_MySQL: MYSQL_DoGetNames(GetDatasetClass.Create(Self), List, dotProcedure,fConnection.SQLConnection.Params.Values[DATABASENAME_KEY]);
+ dbx_Oracle: Oracle_DoGetNames(GetDatasetClass.Create(Self), List, dotProcedure);
+ else
+{$IFDEF DELPHI10}{$WARN SYMBOL_DEPRECATED OFF}{$ENDIF}
+ fConnection.fSQLConnection.GetProcedureNames(List.Strings);
+{$IFDEF DELPHI10}{$WARN SYMBOL_DEPRECATED ON}{$ENDIF}
+ end;
+end;
+
+procedure TDAEDBXConnection.DoGetStoredProcedureParams(
+ const aStoredProcedureName: string; out Params: TDAParamCollection);
+begin
+ case fDriverType of
+ dbx_MySQL: MYSQL_DoGetStoredProcedureParams(aStoredProcedureName,GetDatasetClass.Create(Self),Params,fConnection.SQLConnection.Params.Values[DATABASENAME_KEY]);
+ else
+ inherited;
+ end;
+end;
+
+procedure TDAEDBXConnection.DoGetTableNames(out List: IROStrings);
+begin
+ inherited DoGetTableNames(List);
+ case fDriverType of
+ dbx_MSSQL: MSSQL_DoGetNames(GetDatasetClass.Create(Self), List, dotTable, MSSQLSchemaEnabled);
+ dbx_Interbase: IB_GetObjectNames(GetDatasetClass.Create(Self), List, dotTable);
+ dbx_MySQL: MYSQL_DoGetNames(GetDatasetClass.Create(Self), List, dotTable,fConnection.SQLConnection.Params.Values[DATABASENAME_KEY]);
+ dbx_Oracle: Oracle_DoGetNames(GetDatasetClass.Create(Self), List, dotTable);
+ else
+ fConnection.fSQLConnection.GetTableNames(List.Strings);
+ end;
+end;
+
+procedure TDAEDBXConnection.DoRollbackTransaction;
+begin
+{$WARNINGS OFF}
+ fConnection.fSQLConnection.Rollback(fConnection.fTransDesc);
+{$WARNINGS ON}
+end;
+
+function TDAEDBXConnection.DoGetInTransaction: boolean;
+begin
+ result := fConnection.fSQLConnection.InTransaction
+end;
+
+function TDAEDBXConnection.GetDriverName: string;
+begin
+ result := fDriverName
+end;
+
+function TDAEDBXConnection.GetDriverType: TDADBXDriverType;
+begin
+ result := fDriverType
+end;
+
+function TDAEDBXConnection.CreateMacroProcessor: TDASQLMacroProcessor;
+begin
+ case fDriverType of
+ dbx_MSSQL: result := MSSQL_CreateMacroProcessor;
+ dbx_Interbase: result := IB_CreateMacroProcessor;
+ dbx_Oracle: result := Oracle_CreateMacroProcessor;
+ else
+ result := inherited CreateMacroProcessor;
+ end;
+end;
+
+function TDAEDBXConnection.GetPassword: string;
+begin
+ Result := fConnection.SQLConnection.Params.Values[szPASSWORD];
+end;
+
+function TDAEDBXConnection.GetUserID: string;
+begin
+ Result := fConnection.SQLConnection.Params.Values[szUSERNAME];
+end;
+
+procedure TDAEDBXConnection.SetPassword(const Value: string);
+begin
+ fConnection.SQLConnection.Params.Values[szPASSWORD] := Value;
+end;
+
+procedure TDAEDBXConnection.SetUserID(const Value: string);
+begin
+ fConnection.SQLConnection.Params.Values[szUSERNAME] := Value;
+end;
+
+function TDAEDBXConnection.GetSPSelectSyntax(
+ HasArguments: Boolean): string;
+begin
+ case fDriverType of
+ dbx_MSSQL: Result := MSSQL_GetSPSelectSyntax(HasArguments);
+ dbx_Interbase: Result := IB_GetSPSelectSyntax(HasArguments);
+ dbx_Oracle: Result := Oracle_GetSPSelectSyntax(HasArguments);
+ else
+ Result := inherited GetSPSelectSyntax(HasArguments);
+ end;
+end;
+
+function TDAEDBXConnection.GetFileExtensions: IROStrings;
+begin
+ case fDriverType of
+ dbx_Interbase: result := IB_GetFileExtensions;
+ else
+ result := TROStrings.Create;
+ end;
+end;
+
+function TDAEDBXConnection.GetGeneratorNames: IROStrings;
+begin
+ case fDriverType of
+ dbx_Interbase: Result:= IB_GetGeneratorNames(GetDatasetClass.Create(Self));
+ else
+ Result := NewROStrings;
+ end;
+end;
+
+function TDAEDBXConnection.QueryInterface(const IID: TGUID;
+ out Obj): HResult;
+begin
+ Result := E_NOINTERFACE;
+
+ {$IFDEF DELPHI9UP}
+ if IsEqualGUID(IID, IDASybaseConnection) then begin
+ if not (fDriverType in [dbx_ASA, dbx_ASE]) then Exit;
+ end
+ else
+ {$ENDIF}
+ if IsEqualGUID(IID, IDADB2Connection) then begin
+ if not (fDriverType in [dbx_DB2]) then Exit;
+ end
+ else if IsEqualGUID(IID, IDAInterbaseConnection) then begin
+ if not (fDriverType in [dbx_Interbase]) then Exit;
+ end
+ else if IsEqualGUID(IID, IDAADOConnection) then begin
+ if not (fDriverType in [dbx_MSSQL]) then Exit;
+ end
+ else if IsEqualGUID(IID, IDAMySQLConnection) then begin
+ if not (fDriverType in [dbx_MySQL]) then Exit;
+ end
+ else if IsEqualGUID(IID, IDAOracleConnection) then begin
+ if not (fDriverType in [dbx_Oracle]) then Exit;
+ end
+ else if IsEqualGUID(IID, IDAUseGenerators) then begin
+ if not (fDriverType in [dbx_Interbase,dbx_Oracle]) then Exit;
+ end
+ else if IsEqualGUID(IID, IDACanQueryGeneratorsNames) then begin
+ if not (fDriverType in [dbx_Interbase]) then Exit;
+ end
+ else if IsEqualGUID(IID, IDAFileBasedDatabase) then begin
+ if not (fDriverType in [dbx_Interbase]) then Exit;
+ end
+ else if IsEqualGUID(IID, IDACanQueryDatabaseNames) then begin
+ if not (fDriverType in [dbx_MSSQL, dbx_Oracle, dbx_MySQL {$IFDEF DELPHI9UP}, dbx_ASA, dbx_ASE{$ENDIF DELPHI9UP}]) then Exit;
+ end;
+
+ Result := inherited QueryInterface(IID, Obj);
+end;
+
+function TDAEDBXConnection.GetDatabaseNames: IROStrings;
+begin
+ case fDriverType of
+ dbx_MSSQL: Result:=MSSQL_GetDatabaseNames(Self);
+ dbx_MySQL: Result:=MYSQL_GetDatabaseNames(GetDatasetClass.Create(Self));
+ else
+ Result := NewROStrings;
+ end;
+end;
+
+procedure TDAEDBXConnection.DoGetViewNames(out List: IROStrings);
+begin
+ inherited DoGetViewNames(List);
+ case fDriverType of
+ dbx_MSSQL: MSSQL_DoGetNames(GetDatasetClass.Create(Self), List, dotView, MSSQLSchemaEnabled);
+ dbx_Interbase: IB_GetObjectNames(GetDatasetClass.Create(Self), List, dotView);
+ dbx_MySQL: MYSQL_DoGetNames(GetDatasetClass.Create(Self), List, dotView,fConnection.SQLConnection.Params.Values[DATABASENAME_KEY]);
+ dbx_Oracle: Oracle_DoGetNames(GetDatasetClass.Create(Self), List, dotView);
+ else
+ //
+ end;
+end;
+
+procedure TDAEDBXConnection.DoGetForeignKeys(
+ out ForeignKeys: TDADriverForeignKeyCollection);
+begin
+ inherited DoGetForeignKeys(ForeignKeys);
+ case fDriverType of
+ dbx_MSSQL: MSSQL_DoGetForeignKeys(GetDatasetClass.Create(Self), ForeignKeys, MSSQLSchemaEnabled);
+ dbx_Interbase: IB_DoGetForeignKeys(GetDatasetClass.Create(Self), ForeignKeys);
+ dbx_MySQL: MYSQL_DoGetForeignKeys(GetDatasetClass.Create(Self), ForeignKeys,fConnection.SQLConnection.Params.Values[DATABASENAME_KEY]);
+ dbx_ORACLE: Oracle_DoGetForeignKeys(GetDatasetClass.Create(Self), ForeignKeys);
+ else
+ //
+ end;
+end;
+
+procedure TDAEDBXConnection.DoGetTableFields(const aTableName: string;
+ out Fields: TDAFieldCollection);
+begin
+ case fDriverType of
+ dbx_MSSQL: MSSQL_DoGetTableFields(QuoteIdentifierIfNeeded(aTableName), GetDatasetClass.Create(Self), Fields);
+ dbx_Interbase: IB_GetTableFields(QuoteIdentifierIfNeeded(aTableName), GetDatasetClass.Create(Self), Fields);
+ dbx_MySQL: MYSQL_DoGetTableFields(QuoteIdentifierIfNeeded(aTableName), GetDatasetClass.Create(Self), Fields,fConnection.SQLConnection.Params.Values[DATABASENAME_KEY]);
+ dbx_Oracle: Oracle_DoGetTableFields(QuoteIdentifierIfNeeded(aTableName), GetDatasetClass.Create(Self), Fields);
+ else
+ inherited DoGetTableFields(QuoteIdentifierIfNeeded(aTableName), Fields);
+ end;
+end;
+
+function TDAEDBXConnection.DoGetLastAutoInc(
+ const GeneratorName: string): integer;
+begin
+ case fDriverType of
+ dbx_MSSQL: Result := MSSQL_DoGetLastAutoInc(GeneratorName, GetDatasetClass.Create(Self));
+ dbx_Interbase: Result := IB_GetLastAutoInc(GeneratorName, GetDatasetClass.Create(Self));
+ dbx_Oracle: Result := Oracle_DoGetLastAutoInc(GeneratorName,GetDatasetClass.Create(Self));
+ dbx_MySQL: Result := MySQL_GetLastAutoInc(GeneratorName,GetDatasetClass.Create(Self));
+ else
+ Result := inherited DoGetLastAutoInc(GeneratorName);
+ end;
+end;
+
+function TDAEDBXConnection.GetNextAutoinc(
+ const GeneratorName: string): integer;
+begin
+ case fDriverType of
+ dbx_Interbase: Result := IB_GetNextAutoinc(GeneratorName, GetDatasetClass.Create(Self));
+ dbx_Oracle: Result := Oracle_GetNextAutoinc(GeneratorName, GetDatasetClass.Create(Self));
+ else
+ result := -1;
+ end;
+end;
+
+function TDAEDBXConnection.IdentifierNeedsQuoting(
+ const iIdentifier: string): boolean;
+begin
+ Result := inherited IdentifierNeedsQuoting(iIdentifier);
+ if not Result then
+ case fDriverType of
+ dbx_MSSQL: Result := MSSQL_IdentifierNeedsQuoting(iIdentifier);
+ dbx_Interbase: Result := IB_IdentifierNeedsQuoting(iIdentifier, fSqlDialect);
+ dbx_MySQL: Result := MYSQL_IdentifierNeedsQuoting(iIdentifier);
+ dbx_ORACLE: Result := Oracle_IdentifierNeedsQuoting(iIdentifier);
+ dbx_DB2: Result := DB2_IdentifierNeedsQuoting(iIdentifier);
+ {$IFDEF DELPHI9UP}
+ dbx_ASA, dbx_ASE: Result := Sybase_IdentifierNeedsQuoting(iIdentifier);
+ {$ENDIF DELPHI9UP}
+ else
+ Result:= SQL92_IdentifierNeedsQuoting(iIdentifier);
+ end;
+end;
+
+function TDAEDBXConnection.GetQuoteChars: TDAQuoteCharArray;
+begin
+ case fDriverType of
+ dbx_Oracle: Result:=Oracle_GetQuoteChars;
+ else
+ Result:= inherited GetQuoteChars;
+ end;
+end;
+
+{ TDAEDBXDriver }
+
+function TDAEDBXDriver.GetAvailableDriverOptions: TDAAvailableDriverOptions;
+begin
+ result := [doAuxDriver, doServerName, doDatabaseName, doLogin, doCustom];
+end;
+
+function TDAEDBXDriver.GetConnectionClass: TDAEConnectionClass;
+begin
+ result := TDAEDBXConnection;
+end;
+
+function TDAEDBXDriver.GetDefaultConnectionType(
+ const AuxDriver: string): string;
+begin
+ case DBXDriverIdToDBXDriverType(AuxDriver) of
+ dbx_MSSQL: Result:=MSSQL_DriverType;
+ dbx_Interbase: Result:=IB_DriverType;
+ dbx_Oracle: Result:=Oracle_DriverType;
+ dbx_DB2: Result:=DB2_DriverType;
+ dbx_MySQL: Result:=MySQL_DriverType;
+ dbx_Informix: Result:=Informix_DriverType;
+ {$IFDEF DELPHI9UP}
+ dbx_ASA,dbx_ASE : Result:=ASA_DriverType;
+ {$ENDIF DELPHI9UP}
+ else
+ Result := inherited GetDefaultConnectionType(AuxDriver);
+ end;
+end;
+
+function TDAEDBXDriver.GetDescription: string;
+begin
+ result := 'Borland DBXExpress Driver';
+end;
+
+function TDAEDBXDriver.GetDriverID: string;
+begin
+ result := 'DBX';
+end;
+
+procedure TDAEDBXDriver.GetAuxDrivers(out List: IROStrings);
+var
+ i: Integer;
+ lDriversIni: string;
+ x: TDADBXDriverType;
+begin
+ List := NewROStrings;
+
+ lDriversIni := GetDriverRegistryFile(false);
+ if FileExists(lDriversIni) then begin
+ with TMemIniFile.Create(lDriversIni) do try
+ ReadSections(List.Strings);
+ for i := List.Count - 1 downto 0 do begin
+ if not ValueExists(List[i], 'LibraryName') then List.Delete(i);
+ end; { for }
+ finally
+ Free();
+ end;
+ end
+ else begin
+ for x := Low(TDADBXDriverType) to High(TDADBXDriverType) do
+ if (x <> dbx_Unknown) {// Redundant but safe if I change the enum later...} then
+ List.Add(DBXDrivers[x])
+ end;
+ List.Sorted:=True;
+end;
+
+procedure TDAEDBXDriver.GetAuxParams(const AuxDriver: string;
+ out List: IROStrings);
+begin
+ inherited;
+ List.Add('TableScope=Synonyms');
+ List.Add('DriverName=');
+ List.Add('GetDriverFunc=');
+ List.Add('LibraryName=');
+ case DBXDriverIdToDBXDriverType(AuxDriver) of
+ dbx_MSSQL: List.Add('Schemas=(0,1)');
+ dbx_Interbase: List.Add('Interbase TransIsolation=(ReadCommited,RepeatableRead)');
+ end;
+end;
+
+function TDAEDBXDriver.GetProviderDefaultCustomParameters(
+ Provider: string): string;
+begin
+ Result := '';
+ case DBXDriverIdToDBXDriverType(Provider) of
+ dbx_MSSQL: Result := 'Schemas=0;';
+ dbx_Interbase: Result:='Interbase TransIsolation=ReadCommited;';
+ end;
+end;
+
+{ TDAEDBXQuery }
+
+procedure TDAEDBXQuery.ClearParams;
+begin
+ inherited;
+ TSQLQuery(Dataset).Params.Clear;
+end;
+
+function TDAEDBXQuery.CreateDataset(aConnection: TDAEConnection): TDataset;
+begin
+ result := TSQLQuery.Create(nil);
+
+ //TSQLQuery(result).rea
+ //TSQLQuery(result).CursorLocation := clUseClient;
+ //TSQLQuery(result).CursorType := ctOpenForwardOnly;
+ TSQLQuery(result).SQLConnection := TDAEDBXConnection(aConnection).fConnection.fSQLConnection;
+end;
+
+function GetBlobValue(const val: Variant): string;
+var
+ lsize: integer;
+ p: Pointer;
+begin
+ if VarType(val) = 8209 then
+ begin
+ lSize := VarArrayHighBound(val, 1) - VarArrayLowBound(val, 1) + 1;
+ p := VarArrayLock(val);
+ try
+ setlength(REsult, lSize);
+ move(p^, Result[1], lSize);
+ finally
+ VarArrayUnlock(val);
+ end;
+ end else if vartype(val) = varEmpty then
+ result := ''
+ else
+ result := val;
+end;
+
+function TDAEDBXQuery.DoExecute: integer;
+var
+ i: Integer;
+ refParams: TParams;
+ dapar: TDAParam;
+ lDriverName: string;
+begin
+ if Assigned(DataSet) and Assigned(TSQLQuery(DataSet).SQLConnection) and
+ Assigned(TSQLQuery(DataSet).Params) then begin
+ lDriverName := TSQLQuery(DataSet).SQLConnection.DriverName;
+ refParams := TSQLQuery(DataSet).Params;
+ case DBXDriverIdToDBXDriverType(lDriverName) of
+ dbx_Oracle: begin
+ for i := 0 to refParams.Count - 1 do begin
+ case VarType(refParams[i].Value) of
+ varInteger,
+ varSmallInt,
+ varShortInt,
+ varWord,
+ varByte,
+ varLongWord:
+ refParams[i].AsString := VarToStr(refParams[i].Value);
+ varSingle,
+ varDouble,
+ varCurrency:
+ refParams[i].AsBCD := StrToCurr(VarToStr(refParams[i].Value));
+ varDate:
+ refParams[i].AsSQLTimeStamp := DateTimeToSQLTimeStamp(VarToDateTime(refParams[i].Value));
+ end;
+ end;
+ end;
+ dbx_Interbase: begin
+ for i := 0 to refParams.Count - 1 do begin
+ dapar := GetParams.FindParam(refParams[i].Name);
+ if (dapar <> nil) then begin
+ if dapar.DataType = datBlob then begin
+ refParams[i].AsBlob := GetBlobValue(dapar.AsVariant);
+ continue;
+ end;
+ if dapar.DataType = datMemo then begin
+ refParams[i].AsMemo := dapar.AsVariant;
+ continue;
+ end;
+ end;
+ case VarType(refParams[i].Value) of
+ varDate:
+ refParams[i].AsSQLTimeStamp := DateTimeToSQLTimeStamp(VarToDateTime(refParams[i].Value));
+ end;
+ end;
+ end;
+ else ;
+ end;
+ end;
+
+ Result := TSQLQuery(Dataset).ExecSQL;
+end;
+
+function TDAEDBXQuery.DoGetSQL: string;
+begin
+ result := TSQLQuery(Dataset).SQL.Text;
+end;
+
+procedure TDAEDBXQuery.DoPrepare(Value: boolean);
+begin
+ TSQLQuery(Dataset).Prepared := Value;
+end;
+
+procedure TDAEDBXQuery.DoSetSQL(const Value: string);
+begin
+ TSQLQuery(Dataset).SQL.Text := Value;
+end;
+
+procedure TDAEDBXQuery.GetParamValues(AParams: TDAParamCollection);
+begin
+ GetParamValuesStd(AParams, TSQLQuery(Dataset).Params);
+end;
+
+function TDAEDBXQuery.IsNeedToFixFMTBCDIssue: Boolean;
+var
+ i: integer;
+begin
+ Result:=False;
+ For i:=0 to TSQLQuery(Dataset).FieldCount-1 do begin
+ Result:= TSQLQuery(Dataset).Fields[i].DataType = ftFMTBcd;
+ if Result then Break;
+ end;
+end;
+
+procedure TDAEDBXQuery.SetParamValues(AParams: TDAParamCollection);
+begin
+ SetParamValuesStd(AParams, TSQLQuery(Dataset).Params);
+end;
+
+{ TDAEDBXStoredProcedure }
+
+function TDAEDBXStoredProcedure.CreateDataset(
+ aConnection: TDAEConnection): TDataset;
+begin
+ result := TSQLStoredProc.Create(nil);
+ TSQLStoredProc(result).SQLConnection := TDAEDBXConnection(aConnection).fConnection.fSQLConnection;
+end;
+
+procedure TDAEDBXStoredProcedure.SetParamValues(AParams: TDAParamCollection);
+begin
+ SetParamValuesStd(AParams, TSQLStoredProc(Dataset).Params);
+end;
+
+procedure TDAEDBXStoredProcedure.GetParamValues(AParams: TDAParamCollection);
+begin
+ GetParamValuesStd(AParams, TSQLStoredProc(Dataset).Params);
+end;
+
+function TDAEDBXStoredProcedure.Execute: integer;
+begin
+ SetParamValues(GetParams);
+ Result:= DoExecute;
+ GetParamValues(GetParams);
+end;
+
+function TDAEDBXStoredProcedure.GetStoredProcedureName: string;
+begin
+ result := TSQLStoredProc(Dataset).StoredProcName;
+end;
+
+procedure TDAEDBXStoredProcedure.SetStoredProcedureName(
+ const Name: string);
+begin
+ TSQLStoredProc(Dataset).StoredProcName := Name;
+end;
+
+procedure TDAEDBXStoredProcedure.RefreshParams;
+begin
+ TSQLStoredProc(Dataset).Prepared := True;
+ RefreshParamsStd(TSQLStoredProc(Dataset).Params)
+end;
+
+exports
+ GetDriverObject name func_GetDriverObject;
+
+function TDAEDBXStoredProcedure.DoExecute: integer;
+begin
+ Result := TSQLStoredProc(Dataset).ExecProc;
+end;
+
+initialization
+ _driver := nil;
+ RegisterDriverProc(GetDriverObject);
+finalization
+ UnregisterDriverProc(GetDriverObject);
+ FreeAndNIL(_driver);
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDAElevateDBDriver.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDAElevateDBDriver.pas
new file mode 100644
index 0000000..7f1e8d8
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDAElevateDBDriver.pas
@@ -0,0 +1,1491 @@
+unit uDAElevateDBDriver;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Driver Library
+{
+{ compiler: Delphi 6 and up
+{ platform: Win32
+{
+{ (c)opyright RemObjects Software. all rights reserved.
+{
+{ Using this code requires a valid license of the Data Abstract
+{ which can be obtained at http://www.remobjects.com.
+{----------------------------------------------------------------------------}
+
+{$I ..\DataAbstract.inc}
+
+{$R DataAbstract_ElevateDBDriver_Glyphs.res}
+
+interface
+uses Classes, DB,
+ uDAElevateDBInterfaces, edbType, edbcomps,
+ uROClasses, uDAEngine, uDAInterfaces, uDAInterfacesEx, uDAUtils;
+
+type { TDAElevateDBDriver }
+ TDAElevateDBDriver = class(TDADriverReference)
+ end;
+
+ { TDAEElevateDBDriver }
+ TDAEElevateDBDriver = class(uDAElevateDBInterfaces.TDAElevateDBDriver ,IDADriver40)
+ protected
+ function GetConnectionClass: TDAEConnectionClass; override;
+ //procedure CustomizeConnectionObject(aConnection: TDAEConnection); override;
+ //procedure DoSetTraceOptions(TraceActive: boolean; TraceFlags: TDATraceOptions; Callback: TDALogTraceEvent); override;
+
+ { IDADriver }
+ function GetDriverID: string; override; safecall;
+ function GetDescription: string; override; safecall;
+ // function GetMajVersion: byte; override; safecall;
+ // function GetMinVersion: byte; override; safecall;
+ procedure GetAuxDrivers(out List: IROStrings); override; safecall;
+ procedure GetAuxParams(const AuxDriver: string; out List: IROStrings); override;
+ function GetAvailableDriverOptions: TDAAvailableDriverOptions; override; safecall;
+ // procedure Initialize; override; safecall;
+ // procedure Finalize; override; safecall;
+ // function GetDefaultCustomParameters: string; override; safecall;
+
+ { IDADriver40 }
+ function GetProviderDefaultCustomParameters(Provider: string): string; safecall;
+ public
+ end;
+
+ IElevateDBEngineProperties = interface
+ function GetBackupExtension: TEDBString;
+ function GetCatalogExtension: TEDBString;
+ function GetCatalogName: TEDBString;
+ function GetConfigExtension: TEDBString;
+ function GetConfigName: TEDBString;
+ function GetConfigPath: TEDBString;
+ function GetEncryptionPassword: TEDBString;
+ function GetEngineType: TEDBEngineType;
+ function GetLargeFileSupport: Boolean;
+ function GetLicensedSessions: Integer;
+ function GetLockExtension: TEDBString;
+ function GetLogCategories: TEDBLogCategories;
+ function GetLogExtension: TEDBString;
+ function GetMaxLogFileSize: Integer;
+ function GetServerAddress: TEDBString;
+ function GetServerAuthorizedAddresses: TEDBStrings;
+ function GetServerBlockedAddresses: TEDBStrings;
+ function GetServerDeadSessionExpiration: Integer;
+ function GetServerDeadSessionInterval: Integer;
+ function GetServerDescription: TEDBString;
+ function GetServerEncryptedOnly: Boolean;
+ function GetServerJobCategory: TEDBString;
+ function GetServerMaxDeadSessions: Integer;
+ function GetServerName: TEDBString;
+ function GetServerPort: Integer;
+ function GetServerRunJobs: Boolean;
+ function GetServerSessionTimeout: Integer;
+ function GetServerThreadCacheSize: Integer;
+ function GetSignature: TEDBString;
+ function GetTableBlobExtension: TEDBString;
+ function GetTableExtension: TEDBString;
+ function GetTableIndexExtension: TEDBString;
+ function GetTempTablesPathProperty: TEDBString;
+ procedure SetBackupExtension(const Value: TEDBString);
+ procedure SetCatalogExtension(const Value: TEDBString);
+ procedure SetCatalogName(const Value: TEDBString);
+ procedure SetConfigExtension(const Value: TEDBString);
+ procedure SetConfigName(const Value: TEDBString);
+ procedure SetConfigPath(const Value: TEDBString);
+ procedure SetEncryptionPassword(const Value: TEDBString);
+ procedure SetEngineType(const Value: TEDBEngineType);
+ procedure SetLargeFileSupport(const Value: Boolean);
+ procedure SetLicensedSessions(const Value: Integer);
+ procedure SetLockExtension(const Value: TEDBString);
+ procedure SetLogCategories(const Value: TEDBLogCategories);
+ procedure SetLogExtension(const Value: TEDBString);
+ procedure SetMaxLogFileSize(const Value: Integer);
+ procedure SetServerAddress(const Value: TEDBString);
+ procedure SetServerAuthorizedAddresses(const Value: TEDBStrings);
+ procedure SetServerBlockedAddresses(const Value: TEDBStrings);
+ procedure SetServerDeadSessionExpiration(const Value: Integer);
+ procedure SetServerDeadSessionInterval(const Value: Integer);
+ procedure SetServerDescription(const Value: TEDBString);
+ procedure SetServerEncryptedOnly(const Value: Boolean);
+ procedure SetServerJobCategory(const Value: TEDBString);
+ procedure SetServerMaxDeadSessions(const Value: Integer);
+ procedure SetServerName(const Value: TEDBString);
+ procedure SetServerPort(const Value: Integer);
+ procedure SetServerRunJobs(const Value: Boolean);
+ procedure SetServerSessionTimeout(const Value: Integer);
+ procedure SetServerThreadCacheSize(const Value: Integer);
+ procedure SetSignature(const Value: TEDBString);
+ procedure SetTableBlobExtension(const Value: TEDBString);
+ procedure SetTableExtension(const Value: TEDBString);
+ procedure SetTableIndexExtension(const Value: TEDBString);
+ procedure SetTempTablesPath(const Value: TEDBString);
+ property EngineType: TEDBEngineType read GetEngineType write SetEngineType;
+ property Signature: TEDBString read GetSignature write SetSignature;
+ property EncryptionPassword: TEDBString read GetEncryptionPassword write SetEncryptionPassword;
+ property LargeFileSupport: Boolean read GetLargeFileSupport write SetLargeFileSupport;
+ property LicensedSessions: Integer read GetLicensedSessions write SetLicensedSessions;
+ property ConfigPath: TEDBString read GetConfigPath write SetConfigPath;
+ property ConfigName: TEDBString read GetConfigName write SetConfigName;
+ property ConfigExtension: TEDBString read GetConfigExtension write SetConfigExtension;
+ property LockExtension: TEDBString read GetLockExtension write SetLockExtension;
+ property LogExtension: TEDBString read GetLogExtension write SetLogExtension;
+ property MaxLogFileSize: Integer read GetMaxLogFileSize write SetMaxLogFileSize;
+ property LogCategories: TEDBLogCategories read GetLogCategories write SetLogCategories;
+ property CatalogName: TEDBString read GetCatalogName write SetCatalogName;
+ property CatalogExtension: TEDBString read GetCatalogExtension write SetCatalogExtension;
+ property BackupExtension: TEDBString read GetBackupExtension write SetBackupExtension;
+ property TableExtension: TEDBString read GetTableExtension write SetTableExtension;
+ property TableIndexExtension: TEDBString read GetTableIndexExtension write SetTableIndexExtension;
+ property TableBlobExtension: TEDBString read GetTableBlobExtension write SetTableBlobExtension;
+ property TempTablesPath: TEDBString read GetTempTablesPathProperty write SetTempTablesPath;
+ property ServerName: TEDBString read GetServerName write SetServerName;
+ property ServerDescription: TEDBString read GetServerDescription write SetServerDescription;
+ property ServerAddress: TEDBString read GetServerAddress write SetServerAddress;
+ property ServerPort: Integer read GetServerPort write SetServerPort;
+ property ServerThreadCacheSize: Integer read GetServerThreadCacheSize write SetServerThreadCacheSize;
+ property ServerEncryptedOnly: Boolean read GetServerEncryptedOnly write SetServerEncryptedOnly;
+ property ServerSessionTimeout: Integer read GetServerSessionTimeout write SetServerSessionTimeout;
+ property ServerDeadSessionInterval: Integer read GetServerDeadSessionInterval write SetServerDeadSessionInterval;
+ property ServerDeadSessionExpiration: Integer read GetServerDeadSessionExpiration write SetServerDeadSessionExpiration;
+ property ServerMaxDeadSessions: Integer read GetServerMaxDeadSessions write SetServerMaxDeadSessions;
+ property ServerAuthorizedAddresses: TEDBStrings read GetServerAuthorizedAddresses write SetServerAuthorizedAddresses;
+ property ServerBlockedAddresses: TEDBStrings read GetServerBlockedAddresses write SetServerBlockedAddresses;
+ property ServerRunJobs: Boolean read GetServerRunJobs write SetServerRunJobs;
+ property ServerJobCategory: TEDBString read GetServerJobCategory write SetServerJobCategory;
+ end;
+
+ TElevateDBEngineProperties = class(TInterfacedObject,IElevateDBEngineProperties)
+ protected
+ function GetBackupExtension: TEDBString;
+ function GetCatalogExtension: TEDBString;
+ function GetCatalogName: TEDBString;
+ function GetConfigExtension: TEDBString;
+ function GetConfigName: TEDBString;
+ function GetConfigPath: TEDBString;
+ function GetEncryptionPassword: TEDBString;
+ function GetEngineType: TEDBEngineType;
+ function GetLargeFileSupport: Boolean;
+ function GetLicensedSessions: Integer;
+ function GetLockExtension: TEDBString;
+ function GetLogCategories: TEDBLogCategories;
+ function GetLogExtension: TEDBString;
+ function GetMaxLogFileSize: Integer;
+ function GetServerAddress: TEDBString;
+ function GetServerAuthorizedAddresses: TEDBStrings;
+ function GetServerBlockedAddresses: TEDBStrings;
+ function GetServerDeadSessionExpiration: Integer;
+ function GetServerDeadSessionInterval: Integer;
+ function GetServerDescription: TEDBString;
+ function GetServerEncryptedOnly: Boolean;
+ function GetServerJobCategory: TEDBString;
+ function GetServerMaxDeadSessions: Integer;
+ function GetServerName: TEDBString;
+ function GetServerPort: Integer;
+ function GetServerRunJobs: Boolean;
+ function GetServerSessionTimeout: Integer;
+ function GetServerThreadCacheSize: Integer;
+ function GetSignature: TEDBString;
+ function GetTableBlobExtension: TEDBString;
+ function GetTableExtension: TEDBString;
+ function GetTableIndexExtension: TEDBString;
+ function GetTempTablesPathProperty: TEDBString;
+ procedure SetBackupExtension(const Value: TEDBString);
+ procedure SetCatalogExtension(const Value: TEDBString);
+ procedure SetCatalogName(const Value: TEDBString);
+ procedure SetConfigExtension(const Value: TEDBString);
+ procedure SetConfigName(const Value: TEDBString);
+ procedure SetConfigPath(const Value: TEDBString);
+ procedure SetEncryptionPassword(const Value: TEDBString);
+ procedure SetEngineType(const Value: TEDBEngineType);
+ procedure SetLargeFileSupport(const Value: Boolean);
+ procedure SetLicensedSessions(const Value: Integer);
+ procedure SetLockExtension(const Value: TEDBString);
+ procedure SetLogCategories(const Value: TEDBLogCategories);
+ procedure SetLogExtension(const Value: TEDBString);
+ procedure SetMaxLogFileSize(const Value: Integer);
+ procedure SetServerAddress(const Value: TEDBString);
+ procedure SetServerAuthorizedAddresses(const Value: TEDBStrings);
+ procedure SetServerBlockedAddresses(const Value: TEDBStrings);
+ procedure SetServerDeadSessionExpiration(const Value: Integer);
+ procedure SetServerDeadSessionInterval(const Value: Integer);
+ procedure SetServerDescription(const Value: TEDBString);
+ procedure SetServerEncryptedOnly(const Value: Boolean);
+ procedure SetServerJobCategory(const Value: TEDBString);
+ procedure SetServerMaxDeadSessions(const Value: Integer);
+ procedure SetServerName(const Value: TEDBString);
+ procedure SetServerPort(const Value: Integer);
+ procedure SetServerRunJobs(const Value: Boolean);
+ procedure SetServerSessionTimeout(const Value: Integer);
+ procedure SetServerThreadCacheSize(const Value: Integer);
+ procedure SetSignature(const Value: TEDBString);
+ procedure SetTableBlobExtension(const Value: TEDBString);
+ procedure SetTableExtension(const Value: TEDBString);
+ procedure SetTableIndexExtension(const Value: TEDBString);
+ procedure SetTempTablesPath(const Value: TEDBString);
+ public
+ property EngineType: TEDBEngineType read GetEngineType write SetEngineType;
+ property Signature: TEDBString read GetSignature write SetSignature;
+ property EncryptionPassword: TEDBString read GetEncryptionPassword write SetEncryptionPassword;
+ property LargeFileSupport: Boolean read GetLargeFileSupport write SetLargeFileSupport;
+ property LicensedSessions: Integer read GetLicensedSessions write SetLicensedSessions;
+ property ConfigPath: TEDBString read GetConfigPath write SetConfigPath;
+ property ConfigName: TEDBString read GetConfigName write SetConfigName;
+ property ConfigExtension: TEDBString read GetConfigExtension write SetConfigExtension;
+ property LockExtension: TEDBString read GetLockExtension write SetLockExtension;
+ property LogExtension: TEDBString read GetLogExtension write SetLogExtension;
+ property MaxLogFileSize: Integer read GetMaxLogFileSize write SetMaxLogFileSize;
+ property LogCategories: TEDBLogCategories read GetLogCategories write SetLogCategories;
+ property CatalogName: TEDBString read GetCatalogName write SetCatalogName;
+ property CatalogExtension: TEDBString read GetCatalogExtension write SetCatalogExtension;
+ property BackupExtension: TEDBString read GetBackupExtension write SetBackupExtension;
+ property TableExtension: TEDBString read GetTableExtension write SetTableExtension;
+ property TableIndexExtension: TEDBString read GetTableIndexExtension write SetTableIndexExtension;
+ property TableBlobExtension: TEDBString read GetTableBlobExtension write SetTableBlobExtension;
+ property TempTablesPath: TEDBString read GetTempTablesPathProperty write SetTempTablesPath;
+ property ServerName: TEDBString read GetServerName write SetServerName;
+ property ServerDescription: TEDBString read GetServerDescription write SetServerDescription;
+ property ServerAddress: TEDBString read GetServerAddress write SetServerAddress;
+ property ServerPort: Integer read GetServerPort write SetServerPort;
+ property ServerThreadCacheSize: Integer read GetServerThreadCacheSize write SetServerThreadCacheSize;
+ property ServerEncryptedOnly: Boolean read GetServerEncryptedOnly write SetServerEncryptedOnly;
+ property ServerSessionTimeout: Integer read GetServerSessionTimeout write SetServerSessionTimeout;
+ property ServerDeadSessionInterval: Integer read GetServerDeadSessionInterval write SetServerDeadSessionInterval;
+ property ServerDeadSessionExpiration: Integer read GetServerDeadSessionExpiration write SetServerDeadSessionExpiration;
+ property ServerMaxDeadSessions: Integer read GetServerMaxDeadSessions write SetServerMaxDeadSessions;
+ property ServerAuthorizedAddresses: TEDBStrings read GetServerAuthorizedAddresses write SetServerAuthorizedAddresses;
+ property ServerBlockedAddresses: TEDBStrings read GetServerBlockedAddresses write SetServerBlockedAddresses;
+ property ServerRunJobs: Boolean read GetServerRunJobs write SetServerRunJobs;
+ property ServerJobCategory: TEDBString read GetServerJobCategory write SetServerJobCategory;
+ end;
+
+ IElevateDBEngine = interface
+ function EngineProperties: IElevateDBEngineProperties;
+ end;
+
+ IElevateDBSessionProperties = interface
+ function GetForceBufferFlush: Boolean;
+ function GetKeepConnections: Boolean;
+ function GetKeepTablesOpen: Boolean;
+ function GetProgressTimeInterval: Integer;
+ function GetRecordChangeDetection: Boolean;
+ function GetRecordLockProtocol: TEDBRecordLockProtocol;
+ function GetRecordLockRetryCount: Integer;
+ function GetRecordLockWaitTime: Integer;
+ function GetRemoteAddress: TEDBString;
+ function GetRemoteCompression: Integer;
+ function GetRemoteEncryption: Boolean;
+ function GetRemoteHost: TEDBString;
+ function GetRemotePing: Boolean;
+ function GetRemotePingInterval: Integer;
+ function GetRemotePort: Integer;
+ function GetRemoteService: TEDBString;
+ function GetRemoteTimeout: Integer;
+ function GetRemoteTrace: Boolean;
+ function GetSessionType: TEDBSessionType;
+ procedure SetForceBufferFlush(const Value: Boolean);
+ procedure SetKeepTablesOpen(const Value: Boolean);
+ procedure SetKeepConnections(const Value: Boolean);
+ procedure SetProgressTimeInterval(const Value: Integer);
+ procedure SetRecordChangeDetection(const Value: Boolean);
+ procedure SetRecordLockProtocol(const Value: TEDBRecordLockProtocol);
+ procedure SetRecordLockRetryCount(const Value: Integer);
+ procedure SetRecordLockWaitTime(const Value: Integer);
+ procedure SetRemoteAddress(const Value: TEDBString);
+ procedure SetRemoteCompression(const Value: Integer);
+ procedure SetRemoteEncryption(const Value: Boolean);
+ procedure SetRemoteHost(const Value: TEDBString);
+ procedure SetRemotePing(const Value: Boolean);
+ procedure SetRemotePingInterval(const Value: Integer);
+ procedure SetRemotePort(const Value: Integer);
+ procedure SetRemoteService(const Value: TEDBString);
+ procedure SetRemoteTimeout(const Value: Integer);
+ procedure SetRemoteTrace(const Value: Boolean);
+ procedure SetSessionType(const Value: TEDBSessionType);
+ property ForceBufferFlush: Boolean read GetForceBufferFlush write SetForceBufferFlush;
+ property KeepConnections: Boolean read GetKeepConnections write SetKeepConnections;
+ property KeepTablesOpen: Boolean read GetKeepTablesOpen write SetKeepTablesOpen;
+ property RecordLockProtocol: TEDBRecordLockProtocol read GetRecordLockProtocol write SetRecordLockProtocol;
+ property RecordLockRetryCount: Integer read GetRecordLockRetryCount write SetRecordLockRetryCount;
+ property RecordLockWaitTime: Integer read GetRecordLockWaitTime write SetRecordLockWaitTime;
+ property RecordChangeDetection: Boolean read GetRecordChangeDetection write SetRecordChangeDetection;
+ property ProgressTimeInterval: Integer read GetProgressTimeInterval write SetProgressTimeInterval;
+ property SessionType: TEDBSessionType read GetSessionType write SetSessionType;
+ property RemoteCompression: Integer read GetRemoteCompression write SetRemoteCompression;
+ property RemoteEncryption: Boolean read GetRemoteEncryption write SetRemoteEncryption;
+ property RemoteHost: TEDBString read GetRemoteHost write SetRemoteHost;
+ property RemoteAddress: TEDBString read GetRemoteAddress write SetRemoteAddress;
+ property RemotePort: Integer read GetRemotePort write SetRemotePort;
+ property RemoteService: TEDBString read GetRemoteService write SetRemoteService;
+ property RemoteTrace: Boolean read GetRemoteTrace write SetRemoteTrace;
+ property RemoteTimeout: Integer read GetRemoteTimeout write SetRemoteTimeout;
+ property RemotePing: Boolean read GetRemotePing write SetRemotePing;
+ property RemotePingInterval: Integer read GetRemotePingInterval write SetRemotePingInterval;
+ end;
+
+ { TDAEEDBConnection }
+ TDAEEDBConnection = class(TDAElevateDBConnection,IElevateDBEngine,IElevateDBSessionProperties)
+ private
+ FNativeSession: TEDBSession;
+ fNativeDatabase: TEDBDatabase;
+ FDataBasePath: String;
+ FDataBaseName: string;
+ procedure CheckConnected;
+ function CreateConfigQuery: TDAEDataset;
+ protected
+ function GetForceBufferFlush: Boolean;
+ function GetKeepConnections: Boolean;
+ function GetKeepTablesOpen: Boolean;
+ function GetProgressTimeInterval: Integer;
+ function GetRecordChangeDetection: Boolean;
+ function GetRecordLockProtocol: TEDBRecordLockProtocol;
+ function GetRecordLockRetryCount: Integer;
+ function GetRecordLockWaitTime: Integer;
+ function GetRemoteAddress: TEDBString;
+ function GetRemoteCompression: Integer;
+ function GetRemoteEncryption: Boolean;
+ function GetRemoteHost: TEDBString;
+ function GetRemotePing: Boolean;
+ function GetRemotePingInterval: Integer;
+ function GetRemotePort: Integer;
+ function GetRemoteService: TEDBString;
+ function GetRemoteTimeout: Integer;
+ function GetRemoteTrace: Boolean;
+ function GetSessionType: TEDBSessionType;
+ procedure SetForceBufferFlush(const Value: Boolean);
+ procedure SetKeepTablesOpen(const Value: Boolean);
+ procedure SetKeepConnections(const Value: Boolean);
+ procedure SetProgressTimeInterval(const Value: Integer);
+ procedure SetRecordChangeDetection(const Value: Boolean);
+ procedure SetRecordLockProtocol(const Value: TEDBRecordLockProtocol);
+ procedure SetRecordLockRetryCount(const Value: Integer);
+ procedure SetRecordLockWaitTime(const Value: Integer);
+ procedure SetRemoteAddress(const Value: TEDBString);
+ procedure SetRemoteCompression(const Value: Integer);
+ procedure SetRemoteEncryption(const Value: Boolean);
+ procedure SetRemoteHost(const Value: TEDBString);
+ procedure SetRemotePing(const Value: Boolean);
+ procedure SetRemotePingInterval(const Value: Integer);
+ procedure SetRemotePort(const Value: Integer);
+ procedure SetRemoteService(const Value: TEDBString);
+ procedure SetRemoteTimeout(const Value: Integer);
+ procedure SetRemoteTrace(const Value: Boolean);
+ procedure SetSessionType(const Value: TEDBSessionType);
+ protected
+ procedure SetConnected(Value: boolean); override; safecall;
+ function CreateCustomConnection: TCustomConnection; override;
+ //function CreateMacroProcessor: TDASQLMacroProcessor; override;
+ function GetDatasetClass: TDAEDatasetClass; override;
+ function GetStoredProcedureClass: TDAEStoredProcedureClass; override;
+ procedure DoApplyConnectionString(aConnStrParser: TDAConnectionStringParser; aConnectionObject: TCustomConnection); override;
+ // transaction support
+ function DoBeginTransaction: integer; override;
+ procedure DoCommitTransaction; override;
+ procedure DoRollbackTransaction; override;
+ function DoGetInTransaction: boolean; override;
+
+ // procedure DoGetTableFields(const aTableName: string; out Fields: TDAFieldCollection); override;
+ // procedure DoGetQueryFields(const aSQL: string; aParamsIfNeeded: TDAParamCollection; out Fields: TDAFieldCollection); override;
+ // procedure DoGetViewFields(const aViewName: string; out Fields: TDAFieldCollection); override;
+
+ // procedure DoGetStoredProcedureParams(const aStoredProcedureName: string; out Params: TDAParamCollection); override;
+ // function DoGetLastAutoInc(const GeneratorName: string): integer; override;
+
+ { IDAConnection }
+ // UserID/Password
+ // function GetUserID: string; override; safecall;
+ // procedure SetUserID(const Value: string); override; safecall;
+ // function GetPassword: string; override; safecall;
+ // procedure SetPassword(const Value: string); override; safecall;
+
+ function GetSPSelectSyntax(HasArguments: Boolean): string; override; safecall;
+ // function GetQuoteChars: TDAQuoteCharArray; override; safecall;
+ // function IdentifierIsQuoted(const iIdentifier: string): boolean; override; safecall;
+ // function IdentifierNeedsQuoting(const iIdentifier: string): boolean; override; safecall;
+ // function QuoteIdentifierIfNeeded(const iIdentifier: string): string; override; safecall;
+ // function QuoteIdentifier(const iIdentifier: string): string; override; safecall;
+ // function QuoteFieldNameIfNeeded(const aTableName, aFieldName: string): string; override;safecall;
+ // function QuoteFieldName(const aTableName, aFieldName: string): string; override; safecall;
+
+ // function NewCommand(const Text: string; CommandType: TDASQLStatementType; const aCommandName: string = ''): IDASQLCommand; override; safecall;
+ // function NewDataset(const SQL: string; const aDatasetName: string = ''): IDADataset; override; safecall;
+ // function GetLastAutoInc(const GeneratorName: string = ''): integer; safecall;
+
+ // function isAlive: Boolean; override; safecall;
+ // function GetQueryBuilder: TDAQueryBuilder; override; safecall;
+
+ { IDAUseGenerators }
+ // function GetNextAutoinc(const GeneratorName: string): integer; safecall;
+ { IElevateDBEngine }
+ function EngineProperties: IElevateDBEngineProperties;
+ public
+ destructor Destroy; override;
+ end;
+
+ { TDAEElevDBQuery }
+ TDAEElevDBQuery = class(TDAEDataset, IDASQLCommand , IDAMustSetParams)
+ protected
+ // procedure PrepareSQLStatement; override;
+ procedure ClearParams; override;
+ function CreateDataset(aConnection: TDAEConnection): TDataset; override;
+ procedure DoPrepare(Value: boolean); override; safecall;
+ function DoExecute: integer; override; safecall;
+ procedure DoSetSQL(const Value: string); override; safecall;
+ function DoGetSQL: string; override; safecall;
+ // function intVCLTypeToDAType(aFieldType: TFieldType): TDADataType;override;
+
+ { IDASQLCommand }
+ // procedure RefreshParams; override; safecall;
+ function Execute: integer; override; safecall;
+ // function DoGetRecordCount: integer; override;
+ // function DoGetActive: boolean; override;
+ // procedure DoSetActive(Value: boolean); override;
+ // function DoGetBOF: boolean; override;
+ // function DoGetEOF: boolean; override;
+ // procedure DoNext; override;
+ // function DoLocate(const KeyFields: string; const KeyValues: Variant; Options: TLocateOptions): Boolean; override;
+
+ // IDAMustSetParams
+ procedure SetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ public
+ end;
+
+ { TDAEElevDBStoredProcedure }
+ TDAEElevDBStoredProcedure = class(TDAEStoredProcedure, IDAStoredProcedure , IDAMustSetParams)
+ protected
+ // IDAStoredProcedure
+ function GetStoredProcedureName: string; override; safecall;
+ procedure SetStoredProcedureName(const Name: string); override; safecall;
+
+ // procedure PrepareSQLStatement; override;
+ function CreateDataset(aConnection: TDAEConnection): TDataset; override;
+ procedure DoPrepare(Value: boolean); override; safecall;
+ function DoExecute: integer; override; safecall;
+ procedure DoSetSQL(const Value: string); override; safecall;
+ function DoGetSQL: string; override; safecall;
+ // function intVCLTypeToDAType(aFieldType: TFieldType): TDADataType;override;
+
+ { IDASQLCommand }
+ procedure RefreshParams; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function Execute: integer; override; safecall;
+ // function DoGetRecordCount: integer; override;
+ // function DoGetActive: boolean; override;
+ // procedure DoSetActive(Value: boolean); override;
+ // function DoGetBOF: boolean; override;
+ // function DoGetEOF: boolean; override;
+ // procedure DoNext; override;
+ // function DoLocate(const KeyFields: string; const KeyValues: Variant; Options: TLocateOptions): Boolean; override;
+
+ // IDAMustSetParams
+ procedure SetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ end;
+
+procedure Register;
+
+function GetDriverObject: IDADriver; stdcall;
+
+implementation
+
+uses SysUtils, uDADriverManager, uDARes, Variants, uDAMacroProcessors,
+ Math, uDAHelpers, uROBinaryHelpers, Windows;
+
+var
+ _driver: TDAEDriver = nil;
+ gEngineProperties: TElevateDBEngineProperties;
+
+procedure Register;
+begin
+ RegisterComponents(DAPalettePageName, [TDAElevateDBDriver]);
+end;
+
+{$IFDEF DataAbstract_SchemaModelerOnly}
+{$INCLUDE ..\DataAbstract_SchemaModelerOnly.inc}
+{$ENDIF DataAbstract_SchemaModelerOnly}
+
+function GetDriverObject: IDADriver;
+begin
+ {$IFDEF DataAbstract_SchemaModelerOnly}
+ if not RunningInSchemaModeler then begin
+ result := nil;
+ exit;
+ end;
+ {$ENDIF}
+ if (_driver = nil) then _driver := TDAEElevateDBDriver.Create(nil);
+ result := _driver;
+end;
+
+{ TDAEEDBConnection }
+
+procedure TDAEEDBConnection.DoApplyConnectionString(aConnStrParser: TDAConnectionStringParser; aConnectionObject: TCustomConnection);
+var
+ i: Integer;
+ sName, sValue: string;
+begin
+ inherited;
+ with aConnStrParser do begin
+ if (Self.UserID <> '') then
+ FNativeSession.LoginUser := Self.UserID
+ else
+ FNativeSession.LoginUser := UserID;
+
+ if (Self.Password <> '') then
+ FNativeSession.LoginPassword := Self.Password
+ else
+ FNativeSession.LoginPassword := Password;
+
+ Session.RemoteAddress := Server;
+// Engine.ConfigPath := Database;
+ FDataBasePath := Database;
+ FDataBaseName := '';
+ for i := 0 to AuxParamsCount - 1 do begin
+ sName := AuxParamNames[i];
+ if sName = '' then Continue;
+ sValue := AuxParams[AuxParamNames[i]];
+ // engine settings
+ if SameText(sName,'EngineType') then begin
+ if SameText(sValue,'etClient') then gEngineProperties.EngineType:=etClient
+ else if SameText(sValue,'etServer') then gEngineProperties.EngineType:=etServer;
+ end
+ else if SameText(sName,'Signature') then gEngineProperties.Signature := sValue
+ else if SameText(sName,'EncryptionPassword') then gEngineProperties.EncryptionPassword := sValue
+ else if SameText(sName,'LargeFileSupport') then gEngineProperties.LargeFileSupport := StrToBoolDef(sValue, gEngineProperties.LargeFileSupport)
+ else if SameText(sName,'LicensedSessions') then gEngineProperties.LicensedSessions := StrToIntDef(sValue, gEngineProperties.LicensedSessions)
+ else if SameText(sName,'ConfigPath') then gEngineProperties.ConfigPath := sValue
+ else if SameText(sName,'ConfigName') then gEngineProperties.ConfigName := sValue
+ else if SameText(sName,'ConfigExtension') then gEngineProperties.ConfigExtension := sValue
+ else if SameText(sName,'LockExtension') then gEngineProperties.LockExtension := sValue
+ else if SameText(sName,'LogExtension') then gEngineProperties.LogExtension := sValue
+ else if SameText(sName,'MaxLogFileSize') then gEngineProperties.MaxLogFileSize := StrToIntDef(sValue, gEngineProperties.MaxLogFileSize)
+ else if SameText(sName,'CatalogName') then gEngineProperties.CatalogName := sValue
+ else if SameText(sName,'CatalogExtension') then gEngineProperties.CatalogExtension := sValue
+ else if SameText(sName,'BackupExtension') then gEngineProperties.BackupExtension := sValue
+ else if SameText(sName,'TableExtension') then gEngineProperties.TableExtension := sValue
+ else if SameText(sName,'TableIndexExtension') then gEngineProperties.TableIndexExtension := sValue
+ else if SameText(sName,'TableBlobExtension') then gEngineProperties.TableBlobExtension := sValue
+ else if SameText(sName,'TempTablesPath') then gEngineProperties.TempTablesPath := sValue
+ else if SameText(sName,'ServerName') then gEngineProperties.ServerName := sValue
+ else if SameText(sName,'ServerDescription') then gEngineProperties.ServerDescription := sValue
+ else if SameText(sName,'ServerPort') then gEngineProperties.ServerPort := StrToIntDef(sValue, gEngineProperties.ServerPort)
+ else if SameText(sName,'ServerThreadCacheSize') then gEngineProperties.ServerThreadCacheSize := StrToIntDef(sValue, gEngineProperties.ServerThreadCacheSize)
+ else if SameText(sName,'ServerEncryptedOnly') then gEngineProperties.ServerEncryptedOnly := StrToBoolDef(sValue, gEngineProperties.ServerEncryptedOnly)
+ else if SameText(sName,'ServerSessionTimeout') then gEngineProperties.ServerSessionTimeout := StrToIntDef(sValue, gEngineProperties.ServerSessionTimeout)
+ else if SameText(sName,'ServerDeadSessionInterval') then gEngineProperties.ServerDeadSessionInterval := StrToIntDef(sValue, gEngineProperties.ServerDeadSessionInterval)
+ else if SameText(sName,'ServerDeadSessionExpiration') then gEngineProperties.ServerDeadSessionExpiration := StrToIntDef(sValue, gEngineProperties.ServerDeadSessionExpiration)
+ else if SameText(sName,'ServerMaxDeadSessions') then gEngineProperties.ServerMaxDeadSessions := StrToIntDef(sValue, gEngineProperties.ServerMaxDeadSessions)
+ else if SameText(sName,'ServerRunJobs') then gEngineProperties.ServerRunJobs := StrToBoolDef(sValue, gEngineProperties.ServerRunJobs)
+ else if SameText(sName,'ServerJobCategory') then gEngineProperties.ServerJobCategory := sValue
+ // session settings
+ else if SameText(sName,'ForceBufferFlush') then FNativeSession.ForceBufferFlush := StrToBoolDef(sValue, FNativeSession.ForceBufferFlush)
+ else if SameText(sName,'KeepConnections') then FNativeSession.KeepConnections := StrToBoolDef(sValue, FNativeSession.KeepConnections)
+ else if SameText(sName,'KeepTablesOpen') then FNativeSession.KeepTablesOpen := StrToBoolDef(sValue, FNativeSession.KeepTablesOpen)
+ else if SameText(sName,'RecordLockProtocol') then begin
+ if SameText(sValue,'lpPessimistic') then FNativeSession.RecordLockProtocol:=lpPessimistic
+ else if SameText(sValue,'lpOptimistic') then FNativeSession.RecordLockProtocol:=lpOptimistic;
+ end
+ else if SameText(sName,'RecordLockRetryCount') then FNativeSession.RecordLockRetryCount := StrToIntDef(sValue, fNativeSession.RecordLockRetryCount)
+ else if SameText(sName,'RecordLockWaitTime') then fNativeSession.RecordLockWaitTime := StrToIntDef(sValue, fNativeSession.RecordLockWaitTime)
+ else if SameText(sName,'RecordChangeDetection') then FNativeSession.RecordChangeDetection := StrToBoolDef(sValue, FNativeSession.RecordChangeDetection)
+ else if SameText(sName,'ProgressTimeInterval') then fNativeSession.ProgressTimeInterval := StrToIntDef(sValue, fNativeSession.ProgressTimeInterval)
+ else if SameText(sName,'SessionType') then begin
+ if SameText(sValue,'stLocal') then FNativeSession.SessionType:=stLocal
+ else if SameText(sValue,'stRemote') then FNativeSession.SessionType:=stRemote;
+ end
+ else if SameText(sName,'RemoteCompression') then fNativeSession.RemoteCompression := StrToIntDef(sValue, fNativeSession.RemoteCompression)
+ else if SameText(sName,'RemoteEncryption') then FNativeSession.RemoteEncryption := StrToBoolDef(sValue, FNativeSession.RemoteEncryption)
+ else if SameText(sName,'RemoteHost') then fNativeSession.RemoteHost := sValue
+ else if SameText(sName,'RemoteAddress') then fNativeSession.RemoteAddress := sValue
+ else if SameText(sName,'RemotePort') then fNativeSession.RemotePort := StrToIntDef(sValue, fNativeSession.RemotePort)
+ else if SameText(sName,'RemoteService') then fNativeSession.RemoteService := sValue
+ else if SameText(sName,'RemoteTrace') then FNativeSession.RemoteTrace := StrToBoolDef(sValue, FNativeSession.RemoteTrace)
+ else if SameText(sName,'RemoteTimeout') then fNativeSession.RemoteTimeout := StrToIntDef(sValue, fNativeSession.RemoteTimeout)
+ else if SameText(sName,'RemotePing') then FNativeSession.RemotePing := StrToBoolDef(sValue, FNativeSession.RemotePing)
+ else if SameText(sName,'RemotePingInterval') then fNativeSession.RemotePingInterval := StrToIntDef(sValue, fNativeSession.RemotePingInterval)
+ //
+ else if SameText(sName,'DataBaseName') then FDataBaseName:=sValue;
+ end;
+ fNativeDatabase.DatabaseName := FDataBaseName;
+ fNativeDatabase.Database := FDataBaseName;
+ end;
+end;
+
+function TDAEEDBConnection.DoBeginTransaction: integer;
+begin
+ CheckConnected;
+ fNativeDatabase.StartTransaction(EmptyEDBStringsArray);
+ Result := 0;
+end;
+
+procedure TDAEEDBConnection.DoCommitTransaction;
+begin
+ CheckConnected;
+ fNativeDatabase.Commit;
+end;
+
+function TDAEEDBConnection.CreateCustomConnection: TCustomConnection;
+begin
+ FNativeSession := TEDBSession.Create(nil);
+ FNativeSession.AutoSessionName:=True;
+ fNativeDatabase := TEDBDatabase.Create(nil);
+ fNativeDatabase.SessionName := FNativeSession.SessionName;
+ result := fNativeDatabase;
+end;
+
+function TDAEEDBConnection.GetDatasetClass: TDAEDatasetClass;
+begin
+ result := TDAEElevDBQuery;
+end;
+
+function TDAEEDBConnection.GetStoredProcedureClass: TDAEStoredProcedureClass;
+begin
+ result := TDAEElevDBStoredProcedure;
+end;
+
+procedure TDAEEDBConnection.DoRollbackTransaction;
+begin
+ CheckConnected;
+ fNativeDatabase.Rollback;
+end;
+
+function TDAEEDBConnection.DoGetInTransaction: boolean;
+begin
+ CheckConnected;
+ Result := fNativeDatabase.InTransaction;
+end;
+
+
+procedure TDAEEDBConnection.SetConnected(Value: boolean);
+begin
+ if (fNativeDatabase <> nil) then
+ if Value then begin
+ FNativeSession.Connected:=True;
+ ElevateDB_RegisterDatabase(CreateConfigQuery,fNativeDatabase.DatabaseName,FDataBasePath);
+ fNativeDatabase.Connected:=True;
+ end
+ else begin
+ fNativeDatabase.Connected:=False;
+ FNativeSession.Connected:=False;
+ end;
+end;
+
+procedure TDAEEDBConnection.CheckConnected;
+begin
+ if not fNativeDatabase.Connected then SetConnected(True);
+end;
+
+destructor TDAEEDBConnection.Destroy;
+begin
+ FNativeSession.Free;
+ Engine.Active:=False;
+ inherited;
+end;
+
+function TDAEEDBConnection.CreateConfigQuery: TDAEDataset;
+begin
+ Result:= GetDatasetClass.Create(Self);
+ TEDBQuery(TDAEElevDBQuery(Result).Dataset).DatabaseName := ElevateDB_ConfigDBName;
+end;
+
+function TDAEEDBConnection.EngineProperties: IElevateDBEngineProperties;
+begin
+ Result:= gEngineProperties;
+end;
+
+function TDAEEDBConnection.GetForceBufferFlush: Boolean;
+begin
+ Result := FNativeSession.ForceBufferFlush;
+end;
+
+function TDAEEDBConnection.GetKeepConnections: Boolean;
+begin
+ Result := FNativeSession.KeepConnections;
+end;
+
+function TDAEEDBConnection.GetKeepTablesOpen: Boolean;
+begin
+ Result := FNativeSession.KeepTablesOpen;
+end;
+
+function TDAEEDBConnection.GetProgressTimeInterval: Integer;
+begin
+ Result := FNativeSession.ProgressTimeInterval;
+end;
+
+function TDAEEDBConnection.GetRecordChangeDetection: Boolean;
+begin
+ Result := FNativeSession.RecordChangeDetection;
+end;
+
+function TDAEEDBConnection.GetRecordLockProtocol: TEDBRecordLockProtocol;
+begin
+ Result := FNativeSession.RecordLockProtocol;
+end;
+
+function TDAEEDBConnection.GetRecordLockRetryCount: Integer;
+begin
+ Result := FNativeSession.RecordLockRetryCount;
+end;
+
+function TDAEEDBConnection.GetRecordLockWaitTime: Integer;
+begin
+ Result := FNativeSession.RecordLockWaitTime;
+end;
+
+function TDAEEDBConnection.GetRemoteAddress: TEDBString;
+begin
+ Result := FNativeSession.RemoteAddress;
+end;
+
+function TDAEEDBConnection.GetRemoteCompression: Integer;
+begin
+ Result := FNativeSession.RemoteCompression;
+end;
+
+function TDAEEDBConnection.GetRemoteEncryption: Boolean;
+begin
+ Result := FNativeSession.RemoteEncryption;
+end;
+
+function TDAEEDBConnection.GetRemoteHost: TEDBString;
+begin
+ Result := FNativeSession.RemoteHost;
+end;
+
+function TDAEEDBConnection.GetRemotePing: Boolean;
+begin
+ Result := FNativeSession.RemotePing;
+end;
+
+function TDAEEDBConnection.GetRemotePingInterval: Integer;
+begin
+ Result := FNativeSession.RemotePingInterval;
+end;
+
+function TDAEEDBConnection.GetRemotePort: Integer;
+begin
+ Result := FNativeSession.RemotePort;
+end;
+
+function TDAEEDBConnection.GetRemoteService: TEDBString;
+begin
+ Result := FNativeSession.RemoteService;
+end;
+
+function TDAEEDBConnection.GetRemoteTimeout: Integer;
+begin
+ Result := FNativeSession.RemoteTimeout;
+end;
+
+function TDAEEDBConnection.GetRemoteTrace: Boolean;
+begin
+ Result := FNativeSession.RemoteTrace;
+end;
+
+function TDAEEDBConnection.GetSessionType: TEDBSessionType;
+begin
+ Result := FNativeSession.SessionType;
+end;
+
+procedure TDAEEDBConnection.SetForceBufferFlush(const Value: Boolean);
+begin
+ FNativeSession.ForceBufferFlush := Value;
+end;
+
+procedure TDAEEDBConnection.SetKeepConnections(const Value: Boolean);
+begin
+ FNativeSession.KeepConnections := Value;
+end;
+
+procedure TDAEEDBConnection.SetKeepTablesOpen(const Value: Boolean);
+begin
+ FNativeSession.KeepTablesOpen := Value;
+end;
+
+procedure TDAEEDBConnection.SetProgressTimeInterval(const Value: Integer);
+begin
+ FNativeSession.ProgressTimeInterval := Value;
+end;
+
+procedure TDAEEDBConnection.SetRecordChangeDetection(const Value: Boolean);
+begin
+ FNativeSession.RecordChangeDetection := Value;
+end;
+
+procedure TDAEEDBConnection.SetRecordLockProtocol(
+ const Value: TEDBRecordLockProtocol);
+begin
+ FNativeSession.RecordLockProtocol := Value;
+end;
+
+procedure TDAEEDBConnection.SetRecordLockRetryCount(const Value: Integer);
+begin
+ FNativeSession.RecordLockRetryCount := Value;
+end;
+
+procedure TDAEEDBConnection.SetRecordLockWaitTime(const Value: Integer);
+begin
+ FNativeSession.RecordLockWaitTime := Value;
+end;
+
+procedure TDAEEDBConnection.SetRemoteAddress(const Value: TEDBString);
+begin
+ FNativeSession.RemoteAddress := Value;
+end;
+
+procedure TDAEEDBConnection.SetRemoteCompression(const Value: Integer);
+begin
+ FNativeSession.RemoteCompression := Value;
+end;
+
+procedure TDAEEDBConnection.SetRemoteEncryption(const Value: Boolean);
+begin
+ FNativeSession.RemoteEncryption := Value;
+end;
+
+procedure TDAEEDBConnection.SetRemoteHost(const Value: TEDBString);
+begin
+ FNativeSession.RemoteHost := Value;
+end;
+
+procedure TDAEEDBConnection.SetRemotePing(const Value: Boolean);
+begin
+ FNativeSession.RemotePing := Value;
+end;
+
+procedure TDAEEDBConnection.SetRemotePingInterval(const Value: Integer);
+begin
+ FNativeSession.RemotePingInterval := Value;
+end;
+
+procedure TDAEEDBConnection.SetRemotePort(const Value: Integer);
+begin
+ FNativeSession.RemotePort := Value;
+end;
+
+procedure TDAEEDBConnection.SetRemoteService(const Value: TEDBString);
+begin
+ FNativeSession.RemoteService := Value;
+end;
+
+procedure TDAEEDBConnection.SetRemoteTimeout(const Value: Integer);
+begin
+ FNativeSession.RemoteTimeout := Value;
+end;
+
+procedure TDAEEDBConnection.SetRemoteTrace(const Value: Boolean);
+begin
+ FNativeSession.RemoteTrace := Value;
+end;
+
+procedure TDAEEDBConnection.SetSessionType(const Value: TEDBSessionType);
+begin
+ FNativeSession.SessionType := Value;
+end;
+
+function TDAEEDBConnection.GetSPSelectSyntax(
+ HasArguments: Boolean): string;
+begin
+ Result:= ''; // not supported!
+end;
+
+{ TDAEElevateDBDriver }
+
+procedure TDAEElevateDBDriver.GetAuxDrivers(out List: IROStrings);
+begin
+ inherited;
+ // List.Add('Driver1');
+ // List.Add('Driver2');
+end;
+
+procedure TDAEElevateDBDriver.GetAuxParams(const AuxDriver: string;
+ out List: IROStrings);
+begin
+ inherited;
+ List.Add('DataBaseName=');
+ List.Add('ForceBufferFlush=(True,False)');
+ List.Add('KeepConnections=(True,False)');
+ List.Add('KeepTablesOpen=(True,False)');
+ List.Add('RecordLockProtocol=(lpPessimistic,lpOptimistic)');
+ List.Add('RecordLockRetryCount=');
+ List.Add('RecordLockWaitTime=');
+ List.Add('RecordChangeDetection=(True,False)');
+ List.Add('ProgressTimeInterval=');
+ List.Add('SessionType=(stLocal,stRemote)');
+ List.Add('RemoteCompression=');
+ List.Add('RemoteEncryption=(True,False)');
+ List.Add('RemoteHost=');
+ List.Add('RemoteAddress=');
+ List.Add('RemotePort=');
+ List.Add('RemoteService=');
+ List.Add('RemoteTrace=(True,False)');
+ List.Add('RemoteTimeout=');
+ List.Add('RemotePing=(True,False)');
+ List.Add('RemotePingInterval=');
+ List.Add('');
+ List.Add('=== Global Engine Options ===');
+ List.Add('EngineType=(etClient,etServer)');
+ List.Add('Signature=');
+ List.Add('EncryptionPassword=');
+ List.Add('LargeFileSupport=(True,False)');
+ List.Add('LicensedSessions=');
+ List.Add('ConfigPath=');
+ List.Add('ConfigName=');
+ List.Add('ConfigExtension=');
+ List.Add('LockExtension=');
+ List.Add('LogExtension=');
+ List.Add('MaxLogFileSize=');
+ List.Add('CatalogName=');
+ List.Add('CatalogExtension=');
+ List.Add('BackupExtension=');
+ List.Add('TableExtension=');
+ List.Add('TableIndexExtension=');
+ List.Add('TableBlobExtension=');
+ List.Add('TempTablesPath=');
+ List.Add('ServerName=');
+ List.Add('ServerDescription=');
+ List.Add('ServerPort=');
+ List.Add('ServerThreadCacheSize=');
+ List.Add('ServerEncryptedOnly=(True,False)');
+ List.Add('ServerSessionTimeout=');
+ List.Add('ServerDeadSessionInterval=');
+ List.Add('ServerDeadSessionExpiration=');
+ List.Add('ServerMaxDeadSessions=');
+ List.Add('ServerRunJobs=(True,False)');
+ List.Add('ServerJobCategory=');
+end;
+
+function TDAEElevateDBDriver.GetAvailableDriverOptions: TDAAvailableDriverOptions;
+begin
+ Result:=[doServerName, doDatabaseName, doLogin, doCustom];
+end;
+
+function TDAEElevateDBDriver.GetConnectionClass: TDAEConnectionClass;
+begin
+ result := TDAEEDBConnection;
+end;
+
+
+function TDAEElevateDBDriver.GetDescription: string;
+begin
+ result := 'ElevateDB Driver'{$IFDEF DataAbstract_SchemaModelerOnly} + SchemaModelerOnly{$ENDIF};
+end;
+
+function TDAEElevateDBDriver.GetDriverID: string;
+begin
+ result := 'ElevateDB';
+end;
+
+function TDAEElevateDBDriver.GetProviderDefaultCustomParameters(
+ Provider: string): string;
+begin
+ Result:='DataBaseName=';
+end;
+
+{ TDAEElevDBQuery }
+
+procedure TDAEElevDBQuery.ClearParams;
+begin
+ inherited;
+ TEDBQuery(Dataset).Params.Clear;
+end;
+
+function TDAEElevDBQuery.CreateDataset(aConnection: TDAEConnection): TDataset;
+begin
+ Result := TEDBQuery.Create(nil);
+ TEDBQuery(Result).SessionName := TDAEEDBConnection(aConnection).fNativeDatabase.SessionName;
+ TEDBQuery(Result).DatabaseName := TDAEEDBConnection(aConnection).fNativeDatabase.DatabaseName;
+end;
+
+function TDAEElevDBQuery.DoExecute: integer;
+begin
+ TEDBQuery(Dataset).ExecSQL;
+ Result:=TEDBQuery(Dataset).RowsAffected;
+end;
+
+function TDAEElevDBQuery.DoGetSQL: string;
+begin
+ Result := TEDBQuery(Dataset).SQL.Text;
+end;
+
+procedure TDAEElevDBQuery.DoPrepare(Value: boolean);
+begin
+//nothing
+ TEDBQuery(Dataset).Prepared:= Value;
+end;
+
+procedure TDAEElevDBQuery.DoSetSQL(const Value: string);
+begin
+ TEDBQuery(Dataset).SQL.Text := Value;
+end;
+
+function TDAEElevDBQuery.Execute: integer;
+begin
+ SetParamValues(GetParams);
+ Result:= DoExecute;
+ GetParamValues(GetParams);
+end;
+
+procedure TDAEElevDBQuery.GetParamValues(AParams: TDAParamCollection);
+begin
+ GetParamValuesStd(AParams, TEDBQuery(Dataset).Params);
+end;
+
+procedure TDAEElevDBQuery.SetParamValues(AParams: TDAParamCollection);
+begin
+ SetParamValuesStd(AParams, TEDBQuery(Dataset).Params);
+end;
+
+{ TDAEElevDBStoredProcedure }
+
+function TDAEElevDBStoredProcedure.CreateDataset(aConnection: TDAEConnection): TDataset;
+begin
+ result := TEDBStoredProc.Create(nil);
+ TEDBStoredProc(Result).SessionName := TDAEEDBConnection(aConnection).fNativeDatabase.SessionName;
+ TEDBStoredProc(Result).DatabaseName := TDAEEDBConnection(aConnection).fNativeDatabase.DatabaseName;
+end;
+
+function TDAEElevDBStoredProcedure.Execute: integer;
+begin
+ TEDBStoredProc(Dataset).Prepare;
+ SetParamValues(GetParams);
+ Result:= DoExecute;
+ //Result:=TEDBStoredProc(Dataset).RecordCount;
+ GetParamValues(GetParams);
+end;
+
+function TDAEElevDBStoredProcedure.DoGetSQL: string;
+begin
+ Result := '';
+end;
+
+procedure TDAEElevDBStoredProcedure.DoPrepare(Value: boolean);
+begin
+ TEDBStoredProc(Dataset).Prepared:=Value;
+end;
+
+procedure TDAEElevDBStoredProcedure.DoSetSQL(const Value: string);
+begin
+ //
+end;
+
+procedure TDAEElevDBStoredProcedure.GetParamValues(
+ AParams: TDAParamCollection);
+begin
+ GetParamValuesStd(AParams, TEDBStoredProc(Dataset).Params);
+end;
+
+function TDAEElevDBStoredProcedure.GetStoredProcedureName: string;
+begin
+ Result := TEDBStoredProc(Dataset).StoredProcName;
+end;
+
+procedure TDAEElevDBStoredProcedure.RefreshParams;
+var
+ lField: TField;
+ i: integer;
+ par: TDAParam;
+begin
+ DoPrepare(False);
+ DoPrepare(True);
+ RefreshParamsStd(TEDBStoredProc(Dataset).Params);
+ For i:=0 to TEDBStoredProc(Dataset).FieldCount-1 do begin
+ par := GetParams.Add;
+ lField:=TEDBStoredProc(Dataset).Fields[i];
+ par.Name := lField.Name;
+ par.DataType := intVCLTypeToDAType(lField.DataType);
+ par.ParamType := daptOutput;
+ par.Size := lField.Size;
+ end;
+end;
+
+procedure TDAEElevDBStoredProcedure.SetParamValues(
+ AParams: TDAParamCollection);
+begin
+ SetParamValuesStd(AParams, TEDBStoredProc(Dataset).Params);
+end;
+
+procedure TDAEElevDBStoredProcedure.SetStoredProcedureName(
+ const Name: string);
+begin
+ TEDBStoredProc(Dataset).StoredProcName := Name;
+end;
+
+function TDAEElevDBStoredProcedure.DoExecute: integer;
+begin
+ TEDBStoredProc(Dataset).ExecProc;
+ Result:=0;
+end;
+
+{ TElevateDBEngineProperties }
+
+function TElevateDBEngineProperties.GetBackupExtension: TEDBString;
+begin
+ Result := edbcomps.Engine.BackupExtension;
+end;
+
+function TElevateDBEngineProperties.GetCatalogExtension: TEDBString;
+begin
+ Result := edbcomps.Engine.CatalogExtension;
+end;
+
+function TElevateDBEngineProperties.GetCatalogName: TEDBString;
+begin
+ Result := edbcomps.Engine.CatalogName;
+end;
+
+function TElevateDBEngineProperties.GetConfigExtension: TEDBString;
+begin
+ Result := edbcomps.Engine.ConfigExtension;
+end;
+
+function TElevateDBEngineProperties.GetConfigName: TEDBString;
+begin
+ Result := edbcomps.Engine.ConfigName;
+end;
+
+function TElevateDBEngineProperties.GetConfigPath: TEDBString;
+begin
+ Result := edbcomps.Engine.ConfigPath;
+end;
+
+function TElevateDBEngineProperties.GetEncryptionPassword: TEDBString;
+begin
+ Result := edbcomps.Engine.EncryptionPassword;
+end;
+
+function TElevateDBEngineProperties.GetEngineType: TEDBEngineType;
+begin
+ Result := edbcomps.Engine.EngineType;
+end;
+
+function TElevateDBEngineProperties.GetLargeFileSupport: Boolean;
+begin
+ Result := edbcomps.Engine.LargeFileSupport;
+end;
+
+function TElevateDBEngineProperties.GetLicensedSessions: Integer;
+begin
+ Result := edbcomps.Engine.LicensedSessions;
+end;
+
+function TElevateDBEngineProperties.GetLockExtension: TEDBString;
+begin
+ Result := edbcomps.Engine.LockExtension;
+end;
+
+function TElevateDBEngineProperties.GetLogCategories: TEDBLogCategories;
+begin
+ Result := edbcomps.Engine.LogCategories;
+end;
+
+function TElevateDBEngineProperties.GetLogExtension: TEDBString;
+begin
+ Result := edbcomps.Engine.LogExtension;
+end;
+
+function TElevateDBEngineProperties.GetMaxLogFileSize: Integer;
+begin
+ Result := edbcomps.Engine.MaxLogFileSize;
+end;
+
+function TElevateDBEngineProperties.GetServerAddress: TEDBString;
+begin
+ Result := edbcomps.Engine.ServerAddress;
+end;
+
+function TElevateDBEngineProperties.GetServerAuthorizedAddresses: TEDBStrings;
+begin
+ Result := edbcomps.Engine.ServerAuthorizedAddresses;
+end;
+
+function TElevateDBEngineProperties.GetServerBlockedAddresses: TEDBStrings;
+begin
+ Result := edbcomps.Engine.ServerBlockedAddresses;
+end;
+
+function TElevateDBEngineProperties.GetServerDeadSessionExpiration: Integer;
+begin
+ Result := edbcomps.Engine.ServerDeadSessionExpiration;
+end;
+
+function TElevateDBEngineProperties.GetServerDeadSessionInterval: Integer;
+begin
+ Result := edbcomps.Engine.ServerDeadSessionInterval;
+end;
+
+function TElevateDBEngineProperties.GetServerDescription: TEDBString;
+begin
+ Result := edbcomps.Engine.ServerDescription;
+end;
+
+function TElevateDBEngineProperties.GetServerEncryptedOnly: Boolean;
+begin
+ Result := edbcomps.Engine.ServerEncryptedOnly;
+end;
+
+function TElevateDBEngineProperties.GetServerJobCategory: TEDBString;
+begin
+ Result := edbcomps.Engine.ServerJobCategory;
+end;
+
+function TElevateDBEngineProperties.GetServerMaxDeadSessions: Integer;
+begin
+ Result := edbcomps.Engine.ServerMaxDeadSessions;
+end;
+
+function TElevateDBEngineProperties.GetServerName: TEDBString;
+begin
+ Result := edbcomps.Engine.ServerName;
+end;
+
+function TElevateDBEngineProperties.GetServerPort: Integer;
+begin
+ Result := edbcomps.Engine.ServerPort;
+end;
+
+function TElevateDBEngineProperties.GetServerRunJobs: Boolean;
+begin
+ Result := edbcomps.Engine.ServerRunJobs;
+end;
+
+function TElevateDBEngineProperties.GetServerSessionTimeout: Integer;
+begin
+ Result := edbcomps.Engine.ServerSessionTimeout;
+end;
+
+function TElevateDBEngineProperties.GetServerThreadCacheSize: Integer;
+begin
+ Result := edbcomps.Engine.ServerThreadCacheSize;
+end;
+
+function TElevateDBEngineProperties.GetSignature: TEDBString;
+begin
+ Result := edbcomps.Engine.Signature;
+end;
+
+function TElevateDBEngineProperties.GetTableBlobExtension: TEDBString;
+begin
+ Result := edbcomps.Engine.TableBlobExtension;
+end;
+
+function TElevateDBEngineProperties.GetTableExtension: TEDBString;
+begin
+ Result := edbcomps.Engine.TableExtension;
+end;
+
+function TElevateDBEngineProperties.GetTableIndexExtension: TEDBString;
+begin
+ Result := edbcomps.Engine.TableIndexExtension;
+end;
+
+function TElevateDBEngineProperties.GetTempTablesPathProperty: TEDBString;
+begin
+ Result := edbcomps.Engine.TempTablesPath;
+end;
+
+procedure TElevateDBEngineProperties.SetBackupExtension(
+ const Value: TEDBString);
+begin
+ edbcomps.Engine.BackupExtension := Value;
+end;
+
+procedure TElevateDBEngineProperties.SetCatalogExtension(
+ const Value: TEDBString);
+begin
+ edbcomps.Engine.CatalogExtension := Value;
+end;
+
+procedure TElevateDBEngineProperties.SetCatalogName(
+ const Value: TEDBString);
+begin
+ edbcomps.Engine.CatalogName := Value;
+end;
+
+procedure TElevateDBEngineProperties.SetConfigExtension(
+ const Value: TEDBString);
+begin
+ edbcomps.Engine.ConfigExtension := Value;
+end;
+
+procedure TElevateDBEngineProperties.SetConfigName(
+ const Value: TEDBString);
+begin
+ edbcomps.Engine.ConfigName := Value;
+end;
+
+procedure TElevateDBEngineProperties.SetConfigPath(
+ const Value: TEDBString);
+begin
+ edbcomps.Engine.ConfigPath := Value;
+end;
+
+procedure TElevateDBEngineProperties.SetEncryptionPassword(
+ const Value: TEDBString);
+begin
+ edbcomps.Engine.EncryptionPassword := Value;
+end;
+
+procedure TElevateDBEngineProperties.SetEngineType(
+ const Value: TEDBEngineType);
+begin
+ edbcomps.Engine.EngineType := Value;
+end;
+
+procedure TElevateDBEngineProperties.SetLargeFileSupport(
+ const Value: Boolean);
+begin
+ edbcomps.Engine.LargeFileSupport := Value;
+end;
+
+procedure TElevateDBEngineProperties.SetLicensedSessions(
+ const Value: Integer);
+begin
+ edbcomps.Engine.LicensedSessions := Value;
+end;
+
+procedure TElevateDBEngineProperties.SetLockExtension(
+ const Value: TEDBString);
+begin
+ edbcomps.Engine.LockExtension := Value;
+end;
+
+procedure TElevateDBEngineProperties.SetLogCategories(
+ const Value: TEDBLogCategories);
+begin
+ edbcomps.Engine.LogCategories := Value;
+end;
+
+procedure TElevateDBEngineProperties.SetLogExtension(
+ const Value: TEDBString);
+begin
+ edbcomps.Engine.LogExtension := Value;
+end;
+
+procedure TElevateDBEngineProperties.SetMaxLogFileSize(
+ const Value: Integer);
+begin
+ edbcomps.Engine.MaxLogFileSize := Value;
+end;
+
+procedure TElevateDBEngineProperties.SetServerAddress(
+ const Value: TEDBString);
+begin
+ edbcomps.Engine.ServerAddress := Value;
+end;
+
+procedure TElevateDBEngineProperties.SetServerAuthorizedAddresses(
+ const Value: TEDBStrings);
+begin
+ edbcomps.Engine.ServerAuthorizedAddresses := Value;
+end;
+
+procedure TElevateDBEngineProperties.SetServerBlockedAddresses(
+ const Value: TEDBStrings);
+begin
+ edbcomps.Engine.ServerBlockedAddresses := Value;
+end;
+
+procedure TElevateDBEngineProperties.SetServerDeadSessionExpiration(
+ const Value: Integer);
+begin
+ edbcomps.Engine.ServerDeadSessionExpiration := Value;
+end;
+
+procedure TElevateDBEngineProperties.SetServerDeadSessionInterval(
+ const Value: Integer);
+begin
+ edbcomps.Engine.ServerDeadSessionInterval := Value;
+end;
+
+procedure TElevateDBEngineProperties.SetServerDescription(
+ const Value: TEDBString);
+begin
+ edbcomps.Engine.ServerDescription := Value;
+end;
+
+procedure TElevateDBEngineProperties.SetServerEncryptedOnly(
+ const Value: Boolean);
+begin
+ edbcomps.Engine.ServerEncryptedOnly := Value;
+end;
+
+procedure TElevateDBEngineProperties.SetServerJobCategory(
+ const Value: TEDBString);
+begin
+ edbcomps.Engine.ServerJobCategory := Value;
+end;
+
+procedure TElevateDBEngineProperties.SetServerMaxDeadSessions(
+ const Value: Integer);
+begin
+ edbcomps.Engine.ServerMaxDeadSessions := Value;
+end;
+
+procedure TElevateDBEngineProperties.SetServerName(
+ const Value: TEDBString);
+begin
+ edbcomps.Engine.ServerName := Value;
+end;
+
+procedure TElevateDBEngineProperties.SetServerPort(const Value: Integer);
+begin
+ edbcomps.Engine.ServerPort := Value;
+end;
+
+procedure TElevateDBEngineProperties.SetServerRunJobs(
+ const Value: Boolean);
+begin
+ edbcomps.Engine.ServerRunJobs := Value;
+end;
+
+procedure TElevateDBEngineProperties.SetServerSessionTimeout(
+ const Value: Integer);
+begin
+ edbcomps.Engine.ServerSessionTimeout := Value;
+end;
+
+procedure TElevateDBEngineProperties.SetServerThreadCacheSize(
+ const Value: Integer);
+begin
+ edbcomps.Engine.ServerThreadCacheSize := Value;
+end;
+
+procedure TElevateDBEngineProperties.SetSignature(const Value: TEDBString);
+begin
+ edbcomps.Engine.Signature := Value;
+end;
+
+procedure TElevateDBEngineProperties.SetTableBlobExtension(
+ const Value: TEDBString);
+begin
+ edbcomps.Engine.TableBlobExtension := Value;
+end;
+
+procedure TElevateDBEngineProperties.SetTableExtension(
+ const Value: TEDBString);
+begin
+ edbcomps.Engine.TableExtension := Value;
+end;
+
+procedure TElevateDBEngineProperties.SetTableIndexExtension(
+ const Value: TEDBString);
+begin
+ edbcomps.Engine.TableIndexExtension := Value;
+end;
+
+procedure TElevateDBEngineProperties.SetTempTablesPath(
+ const Value: TEDBString);
+begin
+ edbcomps.Engine.TempTablesPath := Value;
+end;
+
+exports
+ GetDriverObject name func_GetDriverObject;
+
+initialization
+ _driver := nil;
+ RegisterDriverProc(GetDriverObject);
+ gEngineProperties := TElevateDBEngineProperties.Create;
+finalization
+ gEngineProperties := nil;
+ UnregisterDriverProc(GetDriverObject);
+ FreeAndNIL(_driver);
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDAFIBDriver.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDAFIBDriver.pas
new file mode 100644
index 0000000..19d9a46
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDAFIBDriver.pas
@@ -0,0 +1,681 @@
+unit uDAFIBDriver;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Driver Library
+{
+{ compiler: Delphi 6 and up
+{ platform: Win32
+{
+{ (c)opyright RemObjects Software. all rights reserved.
+{
+{ Using this code requires a valid license of the Data Abstract
+{ which can be obtained at http://www.remobjects.com.
+{----------------------------------------------------------------------------}
+
+{$IFDEF MSWINDOWS}
+{$I ..\DataAbstract.inc}
+{$ENDIF MSWINDOWS}
+{$IFDEF LINUX}
+{$I ../DataAbstract.inc}
+{$ENDIF LINUX}
+
+{$R DataAbstract_FIBDriver_Glyphs.res}
+
+{.$DEFINE MANUAL_STARTTRANSACTION}
+interface
+
+uses
+ Classes, DB, uDAEngine, uDAInterfaces, uDAIBInterfaces, FIBDatabase,
+ uROClasses, pFIBDatabase, FIBQuery, pFIBQuery, pFIBStoredProc, uDAUtils,
+ FIBDataSet, ibase, FIBSQLMonitor;
+
+type
+ { TDAFIBDriver }
+ TDAFIBDriver = class(TDADriverReference)
+ end;
+
+ { TFIBConnection }
+ TFIBConnection = class(TDAConnectionWrapper)
+ private
+ fDatabase: TpFIBDatabase;
+ fTransaction: TFIBTransaction;
+
+ protected
+ function GetConnected: Boolean; override;
+ procedure SetConnected(Value: boolean); override;
+
+ public
+ constructor Create(AOwner: TComponent); override;
+
+ property Database: TpFIBDatabase read fDatabase;
+ property Transaction: TFIBTransaction read fTransaction;
+ end;
+
+ { TDAEFIBDriver }
+ TDAEFIBDriver = class(TDAIBDriver)
+ private
+ fFIBTraceOptions: TFIBTraceFlags;
+ fTraceCallback: TDALogTraceEvent;
+ fMonitor: TFIBSQLMonitor;
+ procedure OnTrace(EventText: string; EventTime: TDateTime);
+ protected
+ function GetConnectionClass: TDAEConnectionClass; override;
+ procedure CustomizeConnectionObject(aConnection: TDAEConnection); override;
+ procedure DoSetTraceOptions(TraceActive: boolean; TraceOptions: TDATraceOptions; Callback: TDALogTraceEvent); override;
+
+ // IDADriver
+ function GetDriverID: string; override;
+ function GetDescription: string; override;
+ public
+ end;
+
+ { TDAEFIBConnection }
+ TDAEFIBConnection = class(TDAIBConnection, IDAInterbaseConnection, IDAIBTransactionAccess, IDAIBConnectionProperties, IDAUseGenerators, IDAFileBasedDatabase)
+ private
+ fConnection: TFIBConnection;
+ procedure IntOpen;
+ protected
+
+ // IIBTransactionAccess
+ function GetTransaction: TObject; safecall;
+
+ procedure Commit; safecall;
+ procedure CommitRetaining; safecall;
+ procedure Rollback; safecall;
+ procedure RollbackRetaining; safecall;
+
+ // IIBConnectionProperties
+ function GetRole: string; safecall;
+ procedure SetRole(const Value: string); safecall;
+ function GetSQLDialect: integer; override; safecall;
+ procedure SetSQLDialect(Value: integer); safecall;
+ function GetCharset: string; safecall;
+ procedure SetCharset(const Value: string); safecall;
+
+ // IDAConnection
+ function CreateCustomConnection: TCustomConnection; override;
+
+ function GetDatasetClass: TDAEDatasetClass; override;
+ function GetStoredProcedureClass: TDAEStoredProcedureClass; override;
+
+ procedure DoApplyConnectionString(aConnStrParser: TDAConnectionStringParser;
+ aConnectionObject: TCustomConnection); override;
+
+ function DoBeginTransaction: integer; override;
+ procedure DoCommitTransaction; override;
+ procedure DoRollbackTransaction; override;
+ function DoGetInTransaction: boolean; override;
+ public
+ end;
+
+ { TDAEFIBQuery }
+ TDAEFIBQuery = class(TDAEDataset, IDAMustSetParams)
+ private
+ protected
+ function DoGetRecordCount: integer; override;
+ function CreateDataset(aConnection: TDAEConnection): TDataset; override;
+ procedure ClearParams; override;
+ function DoExecute: integer; override;
+ function DoGetSQL: string; override;
+ procedure DoSetSQL(const Value: string); override;
+ procedure DoPrepare(Value: boolean); override;
+ procedure RefreshParams; override;
+ procedure DoSetActive(Value: Boolean); override;
+ procedure SetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ public
+ end;
+
+ { TDAEFIBStoredProcedure }
+ TDAEFIBStoredProcedure = class(TDAEStoredProcedure, IDAMustSetParams)
+ private
+ FSP: TpFIBStoredProc;
+ protected
+ function CreateDataset(aConnection: TDAEConnection): TDataset; override;
+
+ function GetStoredProcedureName: string; override;
+ procedure SetStoredProcedureName(const Name: string); override;
+ procedure RefreshParams; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function DoExecute: integer; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function Execute: integer; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ end;
+
+procedure Register;
+
+function GetDriverObject: IDADriver; stdcall;
+
+implementation
+
+uses SysUtils, uDADriverManager, uDARes,
+ pFIBProps;
+
+var
+ _driver: TDAEDriver = nil;
+
+procedure Register;
+begin
+ RegisterComponents(DAPalettePageName, [TDAFIBDriver]);
+end;
+
+{$IFDEF DataAbstract_SchemaModelerOnly}
+{$INCLUDE ..\DataAbstract_SchemaModelerOnly.inc}
+{$ENDIF DataAbstract_SchemaModelerOnly}
+
+function GetDriverObject: IDADriver;
+begin
+ {$IFDEF DataAbstract_SchemaModelerOnly}
+ if not RunningInSchemaModeler then begin
+ result := nil;
+ exit;
+ end;
+ {$ENDIF}
+ if (_driver = nil) then _driver := TDAEFIBDriver.Create(nil);
+ result := _driver;
+end;
+
+
+{ TFIBConnection }
+
+constructor TFIBConnection.Create(AOwner: TComponent);
+begin
+ inherited;
+
+ fDatabase := TpFIBDatabase.Create(Self);
+ fTransaction := TFIBTransaction.Create(Self);
+
+ fDatabase.UseLoginPrompt := FALSE;
+ fDatabase.DefaultTransaction := fTransaction;
+end;
+
+function TFIBConnection.GetConnected: Boolean;
+begin
+ result := fDatabase.Connected
+end;
+
+procedure TFIBConnection.SetConnected(Value: boolean);
+begin
+ // This first check is required.
+ // I think there's a bug in the FIB destroying sequence and the notification. TCustomConnection gets to this point *after*
+ // the owned components are destroyed. Only happens with FIB...
+
+ if (csDestroying in ComponentState) then Exit;
+ fDatabase.Connected := Value
+end;
+
+{ TDAEFIBConnection }
+
+procedure TDAEFIBConnection.DoApplyConnectionString(
+ aConnStrParser: TDAConnectionStringParser; aConnectionObject: TCustomConnection);
+begin
+ inherited;
+
+ fConnection.Database.SQLDialect := 3;
+ with aConnStrParser do begin
+ if (Self.UserID <> '') then
+ fConnection.Database.ConnectParams.UserName := Self.UserID
+ else
+ fConnection.Database.ConnectParams.UserName := UserID;
+
+ if (Self.Password <> '') then
+ fConnection.Database.ConnectParams.Password := Self.Password
+ else
+ fConnection.Database.ConnectParams.Password := Password;
+
+ if Server <> '' then
+ fConnection.Database.DatabaseName := Server + ':' + Database
+ else
+ fConnection.Database.DatabaseName := Database;
+
+ if AuxParams['Dialect'] <> '' then
+ fConnection.Database.SQLDialect := StrtoInt(AuxParams['Dialect'])
+ else if AuxParams['SQLDialect'] <> '' then
+ fConnection.Database.SQLDialect := StrtoInt(AuxParams['SQLDialect']);
+
+ if AuxParams['Role'] <> '' then
+ fConnection.Database.ConnectParams.RoleName := AuxParams['Role'];
+
+ if AuxParams['Charset'] <> '' then
+ SetCharset(AuxParams['Charset']);
+
+ end;
+end;
+
+function TDAEFIBConnection.DoBeginTransaction: integer;
+begin
+ result := -1;
+ fConnection.Database.DefaultTransaction.StartTransaction;
+end;
+
+procedure TDAEFIBConnection.DoCommitTransaction;
+begin
+ fConnection.Database.DefaultTransaction.Commit;
+end;
+
+function TDAEFIBConnection.CreateCustomConnection: TCustomConnection;
+begin
+ fConnection := TFIBConnection.Create(nil);
+ result := fConnection;
+end;
+
+function TDAEFIBConnection.GetDatasetClass: TDAEDatasetClass;
+begin
+ result := TDAEFIBQuery
+end;
+
+function TDAEFIBConnection.GetStoredProcedureClass: TDAEStoredProcedureClass;
+begin
+ result := TDAEFIBStoredProcedure
+end;
+
+function TDAEFIBConnection.GetTransaction: TObject;
+begin
+ result := fConnection.fTransaction;
+end;
+
+procedure TDAEFIBConnection.DoRollbackTransaction;
+begin
+ fConnection.Database.DefaultTransaction.Rollback;
+end;
+
+function TDAEFIBConnection.GetRole: string;
+begin
+ result := fConnection.Database.ConnectParams.RoleName;
+end;
+
+function TDAEFIBConnection.GetSQLDialect: integer;
+begin
+ result := fConnection.Database.SQLDialect
+end;
+
+function TDAEFIBConnection.GetCharset: string;
+begin
+ result := fConnection.Database.ConnectParams.CharSet
+end;
+
+procedure TDAEFIBConnection.SetRole(const Value: string);
+begin
+ fConnection.Database.ConnectParams.RoleName := Value
+end;
+
+procedure TDAEFIBConnection.SetSQLDialect(Value: integer);
+begin
+ fConnection.Database.SQLDialect := Value
+end;
+
+procedure TDAEFIBConnection.SetCharset(const Value: string);
+begin
+ fConnection.Database.ConnectParams.CharSet := Value;
+end;
+
+procedure TDAEFIBConnection.Commit;
+begin
+ fConnection.fTransaction.Commit
+end;
+
+procedure TDAEFIBConnection.CommitRetaining;
+begin
+ fConnection.fTransaction.CommitRetaining
+end;
+
+procedure TDAEFIBConnection.Rollback;
+begin
+ fConnection.fTransaction.Rollback
+end;
+
+procedure TDAEFIBConnection.RollbackRetaining;
+begin
+ fConnection.fTransaction.RollbackRetaining
+end;
+
+function TDAEFIBConnection.DoGetInTransaction: boolean;
+begin
+ result := fConnection.fTransaction.InTransaction
+end;
+
+procedure TDAEFIBConnection.IntOpen;
+begin
+ {$IFNDEF MANUAL_STARTTRANSACTION}
+ if not fConnection.Connected then fConnection.Open;
+ if not fConnection.Transaction.InTransaction then fConnection.Transaction.StartTransaction;
+ {$ENDIF}
+end;
+
+{ TDAEFIBDriver }
+
+procedure TDAEFIBDriver.CustomizeConnectionObject(aConnection: TDAEConnection);
+begin
+ // 25/04/06 13:05 Donald Shimoda . To do.
+ //TDAEFIBConnection(aConnection).fConnection.Database.TraceFlags := fIBTraceOptions;
+end;
+
+procedure TDAEFIBDriver.DoSetTraceOptions(TraceActive: boolean;
+ TraceOptions: TDATraceOptions; Callback: TDALogTraceEvent);
+begin
+ inherited;
+
+ if TraceActive then begin
+ if (fMonitor = nil) then fMonitor := TFIBSQLMonitor.Create(Self);
+
+ fMonitor.Active := False;
+ fMonitor.OnSQL := OnTrace;
+
+ fFIBTraceOptions := [];
+ if (toPrepare in TraceOptions) then fFIBTraceOptions := fFIBTraceOptions + [tfQPrepare];
+ if (toExecute in TraceOptions) then fFIBTraceOptions := fFIBTraceOptions + [tfQExecute];
+ if (toFetch in TraceOptions) then fFIBTraceOptions := fFIBTraceOptions + [tfQFetch];
+ if (toConnect in TraceOptions) then fFIBTraceOptions := fFIBTraceOptions + [tfConnect];
+ if (toTransact in TraceOptions) then fFIBTraceOptions := fFIBTraceOptions + [tfTransact];
+ if (toService in TraceOptions) then fFIBTraceOptions := fFIBTraceOptions + [tfService];
+ if (toMisc in TraceOptions) then fFIBTraceOptions := fFIBTraceOptions + [tfMisc];
+
+ fTraceCallBack := Callback;
+
+ fMonitor.TraceFlags := fFIBTraceOptions;
+ fMonitor.Active := True;
+ end
+ else begin
+ FreeAndNIL(fMonitor);
+ fTraceCallback := nil;
+ end;
+end;
+
+
+function TDAEFIBDriver.GetConnectionClass: TDAEConnectionClass;
+begin
+ result := TDAEFIBConnection;
+end;
+
+function TDAEFIBDriver.GetDescription: string;
+begin
+ result := 'FIBPlus Driver'{$IFDEF DataAbstract_SchemaModelerOnly} + SchemaModelerOnly{$ENDIF};
+end;
+
+function TDAEFIBDriver.GetDriverID: string;
+begin
+ result := 'FIB';
+end;
+
+procedure CreateParams(FQuery: TFIBQuery; Pars: TDAParamCollection; CreateOutputParams: Boolean = False);
+var
+ i: Integer;
+ par: TDAParam;
+ sqPar: TFIBXSQLVAR;
+begin
+ if FQuery.Database.Handle = nil then
+ FQuery.Database.Open;
+
+ if not FQuery.Prepared then
+ FQuery.Prepare;
+ pars.Clear;
+ for i := 0 to FQuery.ParamCount -1 do begin
+ sqpar := FQuery.Params[i];
+ if sqpar.IsParam then begin
+ par := pars.Add;
+ par.Name := sqPar.Name;
+ par.ParamType:= daptInput;
+ case sqpar.SQLType and not 1 of
+ SQL_VARYING, SQL_TEXT:
+ begin
+ if sqPar.CharacterSet = 'UNICODE_FSS' then
+ par.DataType := datWideString
+ else
+ par.DataType := datString;
+ par.Size := sqPar.Size;
+ end;
+ SQL_DOUBLE, SQL_FLOAT,SQL_D_FLOAT:par.DataType := datFloat;
+ SQL_SHORT, SQL_LONG: begin
+ if sqPar.Scale <> 0 then
+ par.DataType := datFloat
+ else
+ par.DataType := datInteger;
+ end;
+ SQL_INT64: begin
+ if sqPar.Scale <> 0 then
+ par.DataType := datFloat
+ else
+ par.DataType := datLargeInt;
+ end;
+ SQL_TIMESTAMP,
+ SQL_TYPE_TIME,
+ SQL_TYPE_DATE: par.DataType := datDateTime;
+ SQL_BLOB:
+ if sqPar.SQLSubtype = 1 then
+ par.DataType := datMemo
+ else
+ par.DataType := datBlob;
+ SQL_BOOLEAN: par.DataType := datBoolean;
+ else
+ par.DataType := datUnknown;
+ end;
+ end;
+ end;
+
+ if CreateOutputParams then
+ for i := 0 to FQuery.FieldCount -1 do begin
+ sqpar := FQuery.Fields[i];
+ par := pars.Add;
+ par.Name := sqPar.Name;
+ par.ParamType:= daptOutput;
+ case sqpar.SQLType and not 1 of
+ SQL_VARYING, SQL_TEXT:
+ begin
+ if sqPar.CharacterSet = 'UNICODE_FSS' then
+ par.DataType := datWideString
+ else
+ par.DataType := datString;
+ par.Size := sqPar.Size;
+ end;
+ SQL_DOUBLE, SQL_FLOAT,SQL_D_FLOAT:par.DataType := datFloat;
+ SQL_SHORT, SQL_LONG: begin
+ if sqPar.Scale <> 0 then
+ par.DataType := datFloat
+ else
+ par.DataType := datInteger;
+ end;
+ SQL_INT64: begin
+ if sqPar.Scale <> 0 then
+ par.DataType := datFloat
+ else
+ par.DataType := datLargeInt;
+ end;
+ SQL_TIMESTAMP,
+ SQL_TYPE_TIME,
+ SQL_TYPE_DATE: par.DataType := datDateTime;
+ SQL_BLOB:
+ if sqPar.SQLSubtype = 1 then
+ par.DataType := datMemo
+ else
+ par.DataType := datBlob;
+ SQL_BOOLEAN: par.DataType := datBoolean;
+ else
+ par.DataType := datUnknown;
+ end;
+ end;
+end;
+
+
+{ TDAEFIBQuery }
+
+
+procedure TDAEFIBDriver.OnTrace(EventText: string; EventTime: TDateTime);
+begin
+ if Assigned(fTraceCallback) then fTraceCallback(fMonitor, EventText, 0);
+end;
+
+procedure TDAEFIBQuery.ClearParams;
+begin
+ inherited;
+ TFIBDataSet(Dataset).Params.ClearValues;
+end;
+
+{ TDAEFIBStoredProcedure }
+
+function TDAEFIBStoredProcedure.CreateDataset(
+ aConnection: TDAEConnection): TDataset;
+begin
+ FreeAndNil(FSP);
+ FSP := TpFIBStoredProc.Create(nil);
+ FSP.Database := TDAEFIBConnection(aConnection).fConnection.Database;
+ result := nil;
+end;
+
+function TDAEFIBStoredProcedure.Execute: integer;
+begin
+ TDAEFIBConnection(Connection).IntOpen;
+ if FSP.Database.Handle = nil then FSP.Database.Open;
+
+ SetParamValues(GetParams);
+ Result:= DoExecute;
+ GetParamValues(GetParams);
+end;
+
+procedure TDAEFIBStoredProcedure.SetParamValues(AParams: TDAParamCollection);
+var
+ i: integer;
+ sqPar: TFIBXSQLVAR;
+begin
+ for i := 0 to AParams.Count - 1 do begin
+ if (AParams[i].ParamType in [daptInput, daptInputOutput, daptUnknown]) then begin
+ sqPar:= FSP.ParamByName(AParams[i].Name);
+ if (sqPar <> nil) and sqPar.IsParam then sqPar.Value:=AParams[i].Value;
+ end;
+ end;
+end;
+
+procedure TDAEFIBStoredProcedure.GetParamValues(AParams: TDAParamCollection);
+var
+ i: integer;
+ sqPar: TFIBXSQLVAR;
+begin
+ for i := 0 to AParams.Count - 1 do begin
+ if (AParams[i].ParamType in [daptOutput, daptInputOutput, daptResult]) then begin
+ sqPar:= FSP.FieldByName(AParams[i].Name);
+ if (sqPar <> nil) then AParams[i].Value:=sqPar.Value;
+ end;
+ end;
+end;
+
+
+function TDAEFIBStoredProcedure.GetStoredProcedureName: string;
+begin
+ result := FSP.StoredProcName;
+end;
+
+procedure TDAEFIBStoredProcedure.SetStoredProcedureName(
+ const Name: string);
+begin
+ TDAEFIBConnection(Connection).IntOpen;
+ FSP.StoredProcName := Name;
+end;
+
+procedure TDAEFIBStoredProcedure.RefreshParams;
+begin
+ TDAEFIBConnection(Connection).IntOpen;
+ CreateParams(FSP, GetParams,True);
+end;
+
+exports
+ GetDriverObject name func_GetDriverObject;
+
+function TDAEFIBStoredProcedure.DoExecute: integer;
+begin
+ FSP.ExecQuery;
+ result := FSP.RowsAffected;
+end;
+
+{ TDAEFIBQuery }
+
+function TDAEFIBQuery.CreateDataset(aConnection: TDAEConnection): TDataset;
+var
+ ds: TFIBDataSet;
+begin
+ ds := TFIBDataSet.Create(nil);
+ ds.Database := TDAEFIBConnection(aConnection).fConnection.Database;
+ ds.Transaction := TDAEFIBConnection(aConnection).fConnection.Transaction;
+ ds.PrepareOptions := ds.PrepareOptions + [psUseLargeIntField];
+ result := ds;
+end;
+
+function TDAEFIBQuery.DoExecute: integer;
+begin
+ TDAEFIBConnection(Connection).IntOpen;
+ TFIBDataSet(Dataset).QSelect.ExecQuery;
+ result := TFIBDataSet(Dataset).QSelect.RowsAffected;
+end;
+
+function TDAEFIBQuery.DoGetRecordCount: integer;
+begin
+ result := TFIBDataSet(DAtaset).QSelect.RecordCount;
+end;
+
+function TDAEFIBQuery.DoGetSQL: string;
+begin
+ result := TFIBDataSet(DAtaset).QSelect.SQL.Text;
+end;
+
+procedure TDAEFIBQuery.DoPrepare(Value: boolean);
+begin
+ TDAEFIBConnection(Connection).IntOpen;
+ if Value then TFIBDataSet(DAtaset).QSelect.Prepare;
+end;
+
+procedure TDAEFIBQuery.DoSetActive(Value: Boolean);
+begin
+ TDAEFIBConnection(Connection).IntOpen;
+ if Value then begin
+ if not TFIBDataSet(Dataset).Database.Connected then
+ TFIBDataSet(Dataset).Database.Connected := true;
+ end;
+ inherited DoSetActive(Value);
+end;
+
+procedure TDAEFIBQuery.DoSetSQL(const Value: string);
+begin
+ TFIBDataSet(DAtaset).QSelect.SQL.Text := Value;
+end;
+
+
+
+procedure TDAEFIBQuery.RefreshParams;
+begin
+ CreateParams(TFIBDataSet(Dataset).QSelect, GetParams);
+end;
+
+
+procedure TDAEFIBQuery.SetParamValues(AParams: TDAParamCollection);
+var
+ i: integer;
+ _par: TDAParam;
+begin
+ for i := 0 to TFIBDataSet(Dataset).ParamCount - 1 do begin
+ _Par := AParams.ParamByName(TFIBDataSet(Dataset).Params[i].Name);
+ if (_Par.ParamType in [daptInput, daptInputOutput, daptUnknown]) then
+ if (TFIBDataSet(Dataset).Params[i].IsParam) then
+ TFIBDataSet(Dataset).Params[i].Value := _Par.Value;
+ end;
+end;
+
+procedure TDAEFIBQuery.GetParamValues(AParams: TDAParamCollection);
+var
+ i: integer;
+ _Par: TDAParam;
+begin
+ for i := 0 to TFIBDataSet(Dataset).ParamCount - 1 do begin
+ _Par := AParams.ParamByName(TFIBDataSet(Dataset).Params[i].Name);
+ if (_Par.ParamType in [daptOutput, daptInputOutput, daptResult]) then
+ _Par.Value := TFIBDataSet(Dataset).Params[i].Value;
+ end;
+end;
+
+
+initialization
+ _driver := nil;
+ RegisterDriverProc(GetDriverObject);
+
+finalization
+ UnregisterDriverProc(GetDriverObject);
+ FreeAndNIL(_driver);
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDAIBDACDriver.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDAIBDACDriver.pas
new file mode 100644
index 0000000..2f8f148
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDAIBDACDriver.pas
@@ -0,0 +1,562 @@
+unit uDAIBDACDriver;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Driver Library
+{
+{ compiler: Delphi 6 and up
+{ platform: Win32
+{
+{ (c)opyright RemObjects Software. all rights reserved.
+{
+{ Using this code requires a valid license of the Data Abstract
+{ which can be obtained at http://www.remobjects.com.
+{----------------------------------------------------------------------------}
+
+{$I ..\DataAbstract.inc}
+
+{$R DataAbstract_IBDACDriver_Glyphs.res}
+
+interface
+
+uses
+ DB, Classes, uDAEngine, uDAInterfaces, uDAADOInterfaces, uROClasses,
+ DBAccess, IBC, DASQLMonitor,
+ IBCSQLMonitor, Variants, uDAUtils, uDAIBInterfaces;
+
+type { TDAIBDACDriver }
+ TDAIBDACDriver = class(TDADriverReference)
+ end;
+
+ { TDAEIBDACDriver }
+ TDAEIBDACDriver = class(TDAIBDriver)
+ private
+ fMonitor: TIBCSQLMonitor;
+ fTraceCallBack: TDALogTraceEvent;
+ procedure OnIBDACTrace(Sender: TObject; Text: string; Flag: TDATraceFlag);
+ protected
+ function GetConnectionClass: TDAEConnectionClass; override;
+ procedure DoSetTraceOptions(TraceActive: boolean; TraceOptions: TDATraceOptions; Callback: TDALogTraceEvent); override;
+ procedure CustomizeConnectionObject(aConnection: TDAEConnection); override;
+ // IDADriver
+ function GetDriverID: string; override;
+ function GetDescription: string; override;
+ end;
+
+ { TDAEIBDACConnection }
+ TDAEIBDACConnection = class(TDAIBConnection, IDAInterbaseConnection, IDAIBTransactionAccess, IDAIBConnectionProperties, IDAUseGenerators, IDAFileBasedDatabase)
+ private
+ fConnection: TIBCConnection;
+ protected
+ // IIBTransactionAccess
+ function GetTransaction: TObject; safecall;
+
+ procedure Commit; safecall;
+ procedure CommitRetaining; safecall;
+ procedure Rollback; safecall;
+ procedure RollbackRetaining; safecall;
+
+ // IIBConnectionProperties
+ function GetRole: string; safecall;
+ procedure SetRole(const Value: string); safecall;
+ function GetSQLDialect: integer;override; safecall;
+ procedure SetSQLDialect(Value: integer); safecall;
+ function GetCharset: string; safecall;
+ procedure SetCharset(const Value: string); safecall;
+
+
+ // IDAConnection
+ function CreateCustomConnection: TCustomConnection; override;
+
+ function GetDatasetClass: TDAEDatasetClass; override;
+ function GetStoredProcedureClass: TDAEStoredProcedureClass; override;
+
+ procedure DoApplyConnectionString(aConnStrParser: TDAConnectionStringParser;
+ aConnectionObject: TCustomConnection); override;
+
+ function DoBeginTransaction: integer; override;
+ procedure DoCommitTransaction; override;
+ procedure DoRollbackTransaction; override;
+ function DoGetInTransaction: boolean; override;
+ end;
+
+ { TDAEIBDACQuery }
+ TDAEIBDACQuery = class(TDAEDataset, IDAMustSetParams)
+ private
+
+ protected
+ function DoGetRecordCount: integer; override;
+ function CreateDataset(aConnection: TDAEConnection): TDataset; override;
+ procedure ClearParams; override;
+ function DoExecute: integer; override;
+ function DoGetSQL: string; override;
+ procedure DoSetSQL(const Value: string); override;
+ procedure DoPrepare(Value: boolean); override;
+
+ // IDAMustSetParams
+ procedure SetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ public
+ end;
+
+ { TDAEIBDACStoredProcedure }
+ TDAEIBDACStoredProcedure = class(TDAEStoredProcedure, IDAMustSetParams)
+ protected
+ function CreateDataset(aConnection: TDAEConnection): TDataset; override;
+
+ function GetStoredProcedureName: string; override;
+ procedure SetStoredProcedureName(const Name: string); override;
+ function DoExecute: Integer; override;
+ function Execute: integer; override;
+ procedure RefreshParams; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ // IDAMustSetParams
+ procedure SetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ end;
+
+procedure Register;
+
+function GetDriverObject: IDADriver; stdcall;
+
+implementation
+
+uses
+ SysUtils,
+ uDADriverManager, uDARes,
+ uROBinaryHelpers;
+
+var
+ _driver: TDAEDriver = nil;
+
+procedure Register;
+begin
+ RegisterComponents(DAPalettePageName, [TDAIBDACDriver]);
+end;
+
+{$IFDEF DataAbstract_SchemaModelerOnly}
+{$INCLUDE ..\DataAbstract_SchemaModelerOnly.inc}
+{$ENDIF DataAbstract_SchemaModelerOnly}
+
+function GetDriverObject: IDADriver;
+begin
+{$IFDEF DataAbstract_SchemaModelerOnly}
+ if not RunningInSchemaModeler then begin
+ result := nil;
+ exit;
+ end;
+{$ENDIF}
+ if (_driver = nil) then _driver := TDAEIBDACDriver.Create(nil);
+ result := _driver;
+end;
+
+{$I uDACRLabsUtils.inc}
+
+{ TDAEIBDACConnection }
+
+procedure TDAEIBDACConnection.DoApplyConnectionString(
+ aConnStrParser: TDAConnectionStringParser; aConnectionObject: TCustomConnection);
+begin
+ inherited;
+ SetSQLDialect(3);
+ with aConnStrParser do begin
+ if (Self.UserID <> '') then
+ fConnection.Username := Self.UserID
+ else
+ fConnection.Username := UserID;
+
+ if (Self.Password <> '') then
+ fConnection.Password := Self.Password
+ else
+ fConnection.Password := Password;
+
+ if Server <> '' then
+ fConnection.Database := Server + ':' + Database
+ else
+ fConnection.Database := Database;
+
+ if AuxParams['Dialect'] <> '' then
+ SetSQLDialect(StrToInt(AuxParams['Dialect']))
+ else if AuxParams['SQLDialect'] <> '' then
+ SetSQLDialect(StrToInt(AuxParams['SQLDialect']));
+
+ if AuxParams['Role'] <> '' then SetRole(AuxParams['Role']);
+
+ if AuxParams['Charset'] <> '' then SetCharset(AuxParams['Charset']);
+ end;
+end;
+
+function TDAEIBDACConnection.DoBeginTransaction: integer;
+begin
+ result := -1;
+ fConnection.StartTransaction;
+end;
+
+procedure TDAEIBDACConnection.DoCommitTransaction;
+begin
+ fConnection.Commit;
+end;
+
+function TDAEIBDACConnection.CreateCustomConnection: TCustomConnection;
+begin
+ fConnection := TIBCConnection.Create(nil);
+ fConnection.LoginPrompt := FALSE;
+
+ result := fConnection;
+end;
+
+function TDAEIBDACConnection.GetDatasetClass: TDAEDatasetClass;
+begin
+ result := TDAEIBDACQuery;
+end;
+
+function TDAEIBDACConnection.GetStoredProcedureClass: TDAEStoredProcedureClass;
+begin
+ result := TDAEIBDACStoredProcedure;
+end;
+
+(*function SqlServerToDAType(aType:integer):TDADataType;
+begin
+ case aType of
+ 34:result := datBlob;
+ 35:result := datMemo;
+ 36:result := datString; //uniqueidentifier
+ 48:result := datInteger;
+ 52:result := datInteger;
+ 56:result := datInteger;
+ 58:result := datDateTime;
+ 59:result := datFloat;
+ 60:result := datCurrency;
+ 61:result := datDateTime;
+ 62:result := datFloat;
+ //98 sql_variant
+ 99:result := datMemo;// ntext
+ 104:result := datBoolean;
+ 106:result := datFloat;
+ 108:result := datFloat;
+ 122:result := datCurrency;
+ 127:result := datInteger;
+ 165:result := datBlob; // varbinary
+ 167:result := datString;
+ 173:result := datBlob; // binary
+ 175:result := datString; // char
+ 189:result := datBlob; // timestamp
+ 231:result := datString; // nvarchar
+ 239:result := datString; //nchar
+ 240:result := datDateTime;
+ 241:result := datBlob;// xml
+ else result := datUnknown;
+ end;
+end;
+
+procedure TDAEIBDACConnection.DoGetStoredProcedureParams(const aStoredProcedureName: string; out Params: TDAParamCollection);
+var
+ ds : TIBCQuery;
+ lID:string;
+begin
+ ds := TIBCQuery.Create(NIL);
+ try
+
+ ds.Connection := fConnection;
+ ds.SQL.Text := 'select * from sysobjects where xtype=''P'' and name='''+aStoredProcedureName+'''';
+ ds.Open;
+ try
+ if ds.EOF then RaiseError('Stored Procedure %s not found in database',[aStoredProcedureName]);
+ lID := ds.FieldbyName('id').AsString;
+ finally
+ ds.Close();
+ end;
+
+ ds.SQL.Text := 'select * from sys.parameters where object_id='''+lID+''' ORDER BY parameter_id';
+ ds.Open;
+ try
+ Params := TDAParamCollection.Create(nil);
+ while not ds.Eof do begin
+ with Params.Add() do begin
+ Name := ds.FieldByName('name').AsString;
+
+ DataType := SqlServerToDAType(ds.FieldByName('system_type_id').AsInteger);
+ Size := ds.FieldByName('max_length').AsInteger;
+
+ {if ds.FieldByName('has_default_value').AsBoolean then
+ DefaultValue := ds.FieldByName('default_Value').AsInteger;}
+
+ if ds.FieldByName('is_output').AsBoolean then
+ ParamType := daptOutput
+ else
+ ParamType := daptInput;
+
+ end;
+ ds.Next();
+ end;
+ finally
+ Close();
+ end;
+
+ finally
+ ds.Free;
+ end;
+end;*)
+
+procedure TDAEIBDACConnection.DoRollbackTransaction;
+begin
+ fConnection.Rollback;
+end;
+
+function TDAEIBDACConnection.DoGetInTransaction: boolean;
+begin
+ result := fConnection.InTransaction
+end;
+
+procedure TDAEIBDACConnection.Commit;
+begin
+ fConnection.Commit;
+end;
+
+procedure TDAEIBDACConnection.CommitRetaining;
+begin
+ fConnection.CommitRetaining;
+end;
+
+function TDAEIBDACConnection.GetCharset: string;
+begin
+ result := fConnection.Options.Charset;
+end;
+
+function TDAEIBDACConnection.GetRole: string;
+begin
+ Result := fConnection.Options.Role;
+end;
+
+function TDAEIBDACConnection.GetSQLDialect: integer;
+begin
+ Result := fConnection.SQLDialect;
+end;
+
+function TDAEIBDACConnection.GetTransaction: TObject;
+begin
+ Result := fConnection.DefaultTransaction;
+end;
+
+procedure TDAEIBDACConnection.Rollback;
+begin
+ fConnection.Rollback;
+end;
+
+procedure TDAEIBDACConnection.RollbackRetaining;
+begin
+ fConnection.RollbackRetaining;
+end;
+
+procedure TDAEIBDACConnection.SetCharset(const Value: string);
+begin
+ fConnection.Options.Charset := Value;
+end;
+
+procedure TDAEIBDACConnection.SetRole(const Value: string);
+begin
+ fConnection.Options.Role := Value;
+end;
+
+procedure TDAEIBDACConnection.SetSQLDialect(Value: integer);
+begin
+ fConnection.SQLDialect := Value;
+end;
+
+{ TDAEIBDACDriver }
+
+function TDAEIBDACDriver.GetConnectionClass: TDAEConnectionClass;
+begin
+ result := TDAEIBDACConnection;
+end;
+
+function TDAEIBDACDriver.GetDescription: string;
+begin
+ result := 'Core Lab IBDAC Driver'{$IFDEF DataAbstract_SchemaModelerOnly} + SchemaModelerOnly{$ENDIF};
+end;
+
+function TDAEIBDACDriver.GetDriverID: string;
+begin
+ result := 'IBDAC';
+end;
+
+procedure TDAEIBDACDriver.OnIBDACTrace(Sender: TObject; Text: string; Flag: TDATraceFlag);
+begin
+ inherited;
+ // if Assigned(fTraceCallback) then fTraceCallback(Sender, Text, integer(Flag));
+end;
+
+procedure TDAEIBDACDriver.DoSetTraceOptions(TraceActive: boolean; TraceOptions: TDATraceOptions; Callback: TDALogTraceEvent);
+var
+ IBDACopts: TDATraceFlags;
+begin
+ inherited;
+ exit;
+ if TraceActive then begin
+ if (fMonitor = nil) then fMonitor := TIBCSQLMonitor.Create(Self);
+
+ fMonitor.Active := FALSE;
+ fMonitor.OnSQL := OnIBDACTrace;
+
+ IBDACopts := [];
+ if (toPrepare in TraceOptions) then IBDACopts := IBDACopts + [tfQPrepare];
+ if (toExecute in TraceOptions) then IBDACopts := IBDACopts + [tfQExecute];
+ if (toFetch in TraceOptions) then IBDACopts := IBDACopts + [tfQFetch];
+ if (toError in TraceOptions) then IBDACopts := IBDACopts + [tfError];
+ if (toStmt in TraceOptions) then IBDACopts := IBDACopts + [tfStmt];
+ if (toConnect in TraceOptions) then IBDACopts := IBDACopts + [tfConnect];
+ if (toTransact in TraceOptions) then IBDACopts := IBDACopts + [tfTransact];
+ if (toBlob in TraceOptions) then IBDACopts := IBDACopts + [tfBlob];
+ if (toService in TraceOptions) then IBDACopts := IBDACopts + [tfService];
+ if (toMisc in TraceOptions) then IBDACopts := IBDACopts + [tfMisc];
+ if (toParams in TraceOptions) then IBDACopts := IBDACopts + [tfParams];
+
+ fTraceCallBack := Callback;
+
+ fMonitor.TraceFlags := IBDACopts;
+ fMonitor.Active := TRUE;
+ end
+ else begin
+ FreeAndNIL(fMonitor);
+ fTraceCallback := nil;
+ end;
+end;
+
+procedure TDAEIBDACDriver.CustomizeConnectionObject(
+ aConnection: TDAEConnection);
+begin
+ //
+end;
+
+{ TDAEIBDACQuery }
+
+procedure TDAEIBDACQuery.ClearParams;
+begin
+ inherited;
+ TIBCQuery(Dataset).Params.Clear;
+end;
+
+function TDAEIBDACQuery.CreateDataset(aConnection: TDAEConnection): TDataset;
+begin
+ result := TIBCQuery.Create(nil);
+ TIBCQuery(result).FetchAll := True; //for preventing creating an additional session when you call StartTransaction (an known issue of OLEDB)
+ TIBCQuery(result).Unidirectional := True;
+ TIBCQuery(result).ReadOnly := TRUE;
+ TIBCQuery(result).Connection := TDAEIBDACConnection(aConnection).fConnection;
+end;
+
+function TDAEIBDACQuery.DoExecute: integer;
+begin
+ TIBCQuery(Dataset).ExecSQL;
+ result := TIBCQuery(Dataset).RowsAffected;
+end;
+
+function TDAEIBDACQuery.DoGetRecordCount: integer;
+begin
+ Result := TIBCQuery(Dataset).RecordCount;
+end;
+
+function TDAEIBDACQuery.DoGetSQL: string;
+begin
+ result := TIBCQuery(Dataset).SQL.Text;
+end;
+
+procedure TDAEIBDACQuery.DoPrepare(Value: boolean);
+begin
+ TIBCQuery(Dataset).Prepared := Value;
+end;
+
+procedure TDAEIBDACQuery.DoSetSQL(const Value: string);
+begin
+ TIBCQuery(Dataset).SQL.Text := Value;
+end;
+
+procedure TDAEIBDACQuery.GetParamValues(AParams: TDAParamCollection);
+var
+ I: Integer;
+ lParam: TIBCParam;
+begin
+ for i := 0 to TIBCQuery(DataSet).Params.Count - 1 do begin
+ lParam:=TIBCQuery(DataSet).Params[i];
+ if (lParam.ParamType in [ptOutput, ptInputOutput, ptResult]) then
+ AParams.ParamByName(lParam.Name).Value := lParam.Value;
+ end;
+end;
+
+procedure TDAEIBDACQuery.SetParamValues(AParams: TDAParamCollection);
+begin
+ WriteCrLabsParamValues(AParams, TIBCQuery(Dataset).Params, true);
+end;
+
+{ TDAEIBDACStoredProcedure }
+
+function TDAEIBDACStoredProcedure.CreateDataset(
+ aConnection: TDAEConnection): TDataset;
+begin
+ result := TIBCStoredProc.Create(nil);
+ TIBCStoredProc(result).Connection := TDAEIBDACConnection(aConnection).fConnection;
+end;
+
+function TDAEIBDACStoredProcedure.Execute: integer;
+begin
+ TIBCStoredProc(Dataset).Prepare;
+ SetParamValues(GetParams);
+ Result:=DoExecute;
+ GetParamValues(GetParams);
+end;
+
+
+procedure TDAEIBDACStoredProcedure.GetParamValues(AParams: TDAParamCollection);
+var
+ i: Integer;
+ lParam: TIBCParam;
+begin
+ for i := 0 to TIBCStoredProc(DataSet).Params.Count - 1 do begin
+ lParam:=TIBCStoredProc(DataSet).Params[i];
+ if (lParam.ParamType in [ptOutput, ptInputOutput, ptResult]) then
+ AParams.ParamByName(lParam.Name).Value := lParam.Value;
+ end;
+end;
+
+function TDAEIBDACStoredProcedure.GetStoredProcedureName: string;
+begin
+ result := TIBCStoredProc(Dataset).StoredProcName;
+end;
+
+procedure TDAEIBDACStoredProcedure.SetStoredProcedureName(
+ const Name: string);
+begin
+ TIBCStoredProc(Dataset).StoredProcName := Name;
+end;
+
+procedure TDAEIBDACStoredProcedure.RefreshParams;
+begin
+ TIBCStoredProc(Dataset).Prepare;
+ RefreshParamsStd(TIBCStoredProc(Dataset).Params);
+end;
+
+procedure TDAEIBDACStoredProcedure.SetParamValues(AParams: TDAParamCollection);
+begin
+ WriteCrLabsParamValues(AParams, TIBCStoredProc(Dataset).Params);
+end;
+
+exports
+ GetDriverObject name func_GetDriverObject;
+
+function TDAEIBDACStoredProcedure.DoExecute: Integer;
+begin
+ TIBCStoredProc(Dataset).ExecProc;
+ result := TIBCStoredProc(Dataset).RowsAffected;
+end;
+
+initialization
+ _driver := nil;
+ RegisterDriverProc(GetDriverObject);
+
+finalization
+ UnregisterDriverProc(GetDriverObject);
+ FreeAndNIL(_driver);
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDAIBODriver.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDAIBODriver.pas
new file mode 100644
index 0000000..a1a34af
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDAIBODriver.pas
@@ -0,0 +1,526 @@
+unit uDAIBODriver;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Driver Library
+{
+{ compiler: Delphi 6 and up, Kylix 3 and up
+{ platform: Win32, Linux
+{
+{ (c)opyright RemObjects Software. all rights reserved.
+{
+{ Using this code requires a valid license of the Data Abstract
+{ which can be obtained at http://www.remobjects.com.
+{----------------------------------------------------------------------------}
+
+{$I ..\DataAbstract.inc}
+
+{$R DataAbstract_IBODriver_Glyphs.res}
+
+interface
+
+uses DB, Classes, uDAEngine, uDAInterfaces, uDAIBInterfaces, uROClasses,
+ IBODataset, IB_Components, IB_Monitor, uDAUtils;
+
+type
+ { TDAIBODriver }
+ TDAIBODriver = class(TDADriverReference)
+ end;
+
+ { TIBOConnection }
+ TIBOConnection = class(TDAConnectionWrapper)
+ private
+ fDatabase: TIBODatabase;
+
+ protected
+ function GetConnected: Boolean; override;
+ procedure SetConnected(Value: boolean); override;
+
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ property Database: TIBODatabase read fDatabase;
+ end;
+
+ { TDAEIBODriver }
+ TDAEIBODriver = class(TDAIBDriver)
+ private
+ fTraceCallback: TDALogTraceEvent;
+ fMonitor: TIB_Monitor;
+ procedure OnIBOTrace(Sender: TObject; const NewString: string);
+ protected
+ function GetConnectionClass: TDAEConnectionClass; override;
+
+ // IDADriver
+ function GetDriverID: string; override;
+ function GetDescription: string; override;
+
+ procedure DoSetTraceOptions(TraceActive: boolean; TraceOptions: TDATraceOptions;
+ Callback: TDALogTraceEvent); override;
+
+ public
+ end;
+
+ { TDAEIBOConnection }
+ TDAEIBOConnection = class(TDAIBConnection, IDAInterbaseConnection, IDAIBTransactionAccess, IDAIBConnectionProperties, IDAUseGenerators,
+ IDAFileBasedDatabase)
+ private
+ fConnection: TIBOConnection;
+ fSQLDialect: integer; // See TDAEIBOConnection.GetSQLDialect for more details
+
+ protected
+
+ // IIBTransactionAccess
+ function GetTransaction: TObject; safecall;
+
+ procedure Commit; safecall;
+ procedure CommitRetaining; safecall;
+ procedure Rollback; safecall;
+ procedure RollbackRetaining; safecall;
+
+ // IIBConnectionProperties
+ function GetRole: string; safecall;
+ procedure SetRole(const Value: string); safecall;
+ function GetSQLDialect: integer; override;safecall;
+ procedure SetSQLDialect(Value: integer); safecall;
+ function GetCharset: string; safecall;
+ procedure SetCharset(const Value: string); safecall;
+
+ // IDAConnection
+ function CreateCustomConnection: TCustomConnection; override;
+
+ function GetDatasetClass: TDAEDatasetClass; override;
+ function GetStoredProcedureClass: TDAEStoredProcedureClass; override;
+
+ procedure DoApplyConnectionString(aConnStrParser: TDAConnectionStringParser;
+ aConnectionObject: TCustomConnection); override;
+
+ function DoBeginTransaction: integer; override;
+ procedure DoCommitTransaction; override;
+ procedure DoRollbackTransaction; override;
+ function DoGetInTransaction: boolean; override;
+ public
+ end;
+
+ { TDAEIBOQuery }
+ TDAEIBOQuery = class(TDAEDataset, IDAMustSetParams)
+ private
+ protected
+ function CreateDataset(aConnection: TDAEConnection): TDataset; override;
+ procedure ClearParams; override;
+ function DoExecute: integer; override;
+ function DoGetSQL: string; override;
+ procedure DoSetSQL(const Value: string); override;
+ procedure DoPrepare(Value: boolean); override;
+ procedure SetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ public
+ end;
+
+ { TDAEIBOStoredProcedure }
+ TDAEIBOStoredProcedure = class(TDAEStoredProcedure, IDAMustSetParams)
+ private
+
+ protected
+ function CreateDataset(aConnection: TDAEConnection): TDataset; override;
+ procedure RefreshParams; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetStoredProcedureName: string; override;
+ procedure SetStoredProcedureName(const Name: string); override;
+ function DoExecute: integer; override;
+ function Execute: integer; override;
+ procedure SetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ end;
+
+procedure Register;
+
+function GetDriverObject: IDADriver; stdcall;
+
+implementation
+
+uses SysUtils, uDADriverManager, uDARes, uROBinaryHelpers, Variants;
+
+var
+ _driver: TDAEDriver = nil;
+
+procedure Register;
+begin
+ RegisterComponents(DAPalettePageName, [TDAIBODriver]);
+end;
+
+{$IFDEF DataAbstract_SchemaModelerOnly}
+{$INCLUDE ..\DataAbstract_SchemaModelerOnly.inc}
+{$ENDIF DataAbstract_SchemaModelerOnly}
+
+function GetDriverObject: IDADriver;
+begin
+ {$IFDEF DataAbstract_SchemaModelerOnly}
+ if not RunningInSchemaModeler then begin
+ result := nil;
+ exit;
+ end;
+ {$ENDIF}
+ if (_driver = nil) then _driver := TDAEIBODriver.Create(nil);
+ result := _driver;
+end;
+
+
+
+{ TIBOConnection }
+
+constructor TIBOConnection.Create(AOwner: TComponent);
+begin
+ inherited;
+
+ fDatabase := TIBODatabase.Create(Self);
+ fDatabase.LoginPrompt := FALSE;
+end;
+
+destructor TIBOConnection.Destroy;
+begin
+ FreeAndNil(fDatabase);
+ inherited;
+end;
+
+function TIBOConnection.GetConnected: Boolean;
+begin
+ result := fDatabase.Connected
+end;
+
+procedure TIBOConnection.SetConnected(Value: boolean);
+begin
+ if fDatabase <> nil then fDatabase.Connected := Value;
+end;
+
+{ TDAEIBOConnection }
+
+procedure TDAEIBOConnection.DoApplyConnectionString(
+ aConnStrParser: TDAConnectionStringParser; aConnectionObject: TCustomConnection);
+begin
+ inherited;
+
+ with aConnStrParser do begin
+ if (Self.UserID <> '') then
+ fConnection.Database.Username := Self.UserID
+ else
+ fConnection.Database.Username := UserID;
+
+ if (Self.Password <> '') then
+ fConnection.Database.Password := Self.Password
+ else
+ fConnection.Database.Password := Password;
+
+ if (Server <> '') then
+ fConnection.Database.DatabaseName := Server + ':' + Database
+ else
+ fConnection.Database.DatabaseName := Database;
+
+ if AuxParams['Dialect'] <> '' then
+ SetSQLDialect(StrToInt(AuxParams['Dialect']))
+ else if AuxParams['SQLDialect'] <> '' then
+ SetSQLDialect(StrToInt(AuxParams['SQLDialect']));
+
+ if AuxParams['Role'] <> '' then
+ SetRole(AuxParams['Role']);
+
+ if AuxParams['Charset'] <> '' then
+ fConnection.Database.CharSet := AuxParams['Charset'];
+
+ end;
+end;
+
+function TDAEIBOConnection.DoBeginTransaction: integer;
+begin
+ fConnection.Database.DefaultTransaction.StartTransaction;
+ result := -1;
+end;
+
+procedure TDAEIBOConnection.DoCommitTransaction;
+begin
+ fConnection.Database.DefaultTransaction.Commit;
+end;
+
+function TDAEIBOConnection.CreateCustomConnection: TCustomConnection;
+begin
+ fConnection := TIBOConnection.Create(nil);
+ fSQLDialect := fConnection.Database.SQLDialect;
+ result := fConnection;
+end;
+
+function TDAEIBOConnection.GetDatasetClass: TDAEDatasetClass;
+begin
+ result := TDAEIBOQuery
+end;
+
+function TDAEIBOConnection.GetStoredProcedureClass: TDAEStoredProcedureClass;
+begin
+ result := TDAEIBOStoredProcedure
+end;
+
+function TDAEIBOConnection.GetTransaction: TObject;
+begin
+ result := fConnection.Database.DefaultTransaction;
+end;
+
+procedure TDAEIBOConnection.DoRollbackTransaction;
+begin
+ fConnection.Database.DefaultTransaction.Rollback;
+end;
+
+function TDAEIBOConnection.GetRole: string;
+begin
+ result := fConnection.Database.SQLRole
+end;
+
+function TDAEIBOConnection.GetSQLDialect: integer;
+begin
+ // AleF: I modified this because somehow IBO returned 3 even after setting this value to 2 or else.
+ // Somewhere in the IBO code this calue gets reset. This is a work around that basically makes QuoteIdentifier work correctly
+
+ result := fSQLDialect; // fConnection.Database.SQLDialect;
+end;
+
+procedure TDAEIBOConnection.SetSQLDialect(Value: integer);
+begin
+ fSQLDialect := Value;
+ fConnection.Database.SQLDialect := Value;
+end;
+
+procedure TDAEIBOConnection.SetRole(const Value: string);
+begin
+ fConnection.Database.SQLRole := Value
+end;
+
+procedure TDAEIBOConnection.Commit;
+begin
+ fConnection.Database.Commit
+end;
+
+procedure TDAEIBOConnection.CommitRetaining;
+begin
+ fConnection.Database.CommitRetaining
+end;
+
+procedure TDAEIBOConnection.Rollback;
+begin
+ fConnection.Database.Rollback
+end;
+
+procedure TDAEIBOConnection.RollbackRetaining;
+begin
+ fConnection.Database.RollbackRetaining
+end;
+
+function TDAEIBOConnection.DoGetInTransaction: boolean;
+begin
+ result := fConnection.Database.InTransaction
+end;
+
+function TDAEIBOConnection.GetCharset: string;
+begin
+ result := fConnection.Database.CharSet;
+end;
+
+procedure TDAEIBOConnection.SetCharset(const Value: string);
+begin
+ fConnection.Database.CharSet := Value;
+end;
+
+{ TDAEIBODriver }
+
+function TDAEIBODriver.GetConnectionClass: TDAEConnectionClass;
+begin
+ result := TDAEIBOConnection
+end;
+
+function TDAEIBODriver.GetDescription: string;
+begin
+ result := 'Interbase Objects (IBO) Driver'{$IFDEF DataAbstract_SchemaModelerOnly} + SchemaModelerOnly{$ENDIF};
+end;
+
+function TDAEIBODriver.GetDriverID: string;
+begin
+ result := 'IBO';
+end;
+
+procedure TDAEIBODriver.OnIBOTrace(Sender: TObject; const NewString: string);
+begin
+ if Assigned(fTraceCallback) then fTraceCallback(fMonitor, NewString, 0);
+end;
+
+procedure TDAEIBODriver.DoSetTraceOptions(TraceActive: boolean; TraceOptions:
+ TDATraceOptions; Callback: TDALogTraceEvent);
+begin
+ inherited;
+
+ if TraceActive then begin
+ if (fMonitor = nil) then fMonitor := TIB_Monitor.Create(Self);
+
+ fMonitor.Enabled := FALSE;
+ fMonitor.OnMonitorOutputItem := OnIBOTrace;
+ fMonitor.IncludeTimeStamp := True;
+ fMonitor.ItemStart := '';
+ fMonitor.ItemEnd := '';
+ fMonitor.NewLineText := ',';
+
+ FMonitor.MonitorGroups := [];
+ FMonitor.StatementGroups := [];
+
+ if (toPrepare in TraceOptions) then begin
+ FMonitor.MonitorGroups := FMonitor.MonitorGroups + [mgStatement];
+ FMonitor.StatementGroups := FMonitor.StatementGroups + [sgPrepare, sgAllocate, sgStatementInfo, sgDescribe];
+ end;
+
+ if (toExecute in TraceOptions) then begin
+ FMonitor.MonitorGroups := FMonitor.MonitorGroups + [mgStatement];
+ FMonitor.StatementGroups := FMonitor.StatementGroups + [sgExecute];
+ end;
+
+ if (toFetch in TraceOptions) then begin
+ FMonitor.MonitorGroups := FMonitor.MonitorGroups + [mgStatement, mgRow];
+ FMonitor.StatementGroups := FMonitor.StatementGroups + [sgDescribe, sgStatementInfo];
+ end;
+
+ if (toStmt in TraceOptions) then begin
+ FMonitor.MonitorGroups := FMonitor.MonitorGroups + [mgStatement];
+ FMonitor.StatementGroups := FMonitor.StatementGroups + [sgDescribe, sgStatementInfo];
+ end;
+
+ if (toConnect in TraceOptions) then FMonitor.MonitorGroups := FMonitor.MonitorGroups + [mgConnection];
+ if (toTransact in TraceOptions) then FMonitor.MonitorGroups := FMonitor.MonitorGroups + [mgtransaction];
+
+ if (toBlob in TraceOptions) then FMonitor.MonitorGroups := FMonitor.MonitorGroups + [mgBlob];
+
+ if (toMisc in TraceOptions) then begin
+ FMonitor.MonitorGroups := FMonitor.MonitorGroups + [mgBlob, mgArray, mgClientTrace];
+ FMonitor.StatementGroups := FMonitor.StatementGroups + [sgStatementInfo, sgServerCursor, sgServerCursor];
+ end;
+
+ fTraceCallBack := Callback;
+
+ fMonitor.Enabled := TRUE;
+ end
+ else begin
+ FreeAndNIL(fMonitor);
+ fTraceCallback := nil;
+ end;
+end;
+
+{ TDAEIBOQuery }
+
+procedure TDAEIBOQuery.ClearParams;
+begin
+ inherited;
+ TIBOQuery(Dataset).Params.Clear;
+end;
+
+function TDAEIBOQuery.CreateDataset(aConnection: TDAEConnection): TDataset;
+begin
+ result := TIBOQuery.Create(nil);
+ TIBOQuery(result).IB_Connection := TDAEIBOConnection(aConnection).fConnection.Database;
+ TIBOQuery(result).AutoFetchAll := TRUE;
+ TIBOQuery(result).RecordCountAccurate := TRUE;
+end;
+
+function TDAEIBOQuery.DoExecute: integer;
+begin
+ TIBOQuery(Dataset).ExecSQL;
+ result := TIBOQuery(Dataset).RowsAffected;
+end;
+
+function TDAEIBOQuery.DoGetSQL: string;
+begin
+ result := TIBOQuery(Dataset).SQL.Text
+end;
+
+procedure TDAEIBOQuery.DoPrepare(Value: boolean);
+begin
+ TIBOQuery(Dataset).Prepared := Value;
+end;
+
+procedure TDAEIBOQuery.DoSetSQL(const Value: string);
+begin
+ TIBOQuery(Dataset).SQL.Text := Value;
+end;
+
+procedure TDAEIBOQuery.GetParamValues(AParams: TDAParamCollection);
+begin
+ GetParamValuesStd(AParams, TIBOQuery(Dataset).Params);
+end;
+
+procedure TDAEIBOQuery.SetParamValues(AParams: TDAParamCollection);
+var i: Integer;
+begin
+ for i := 0 to AParams.Count - 1 do
+ if (VarType(AParams[i].Value) = varOleStr) and (AParams[i].Value = '') then
+ AParams[i].Value := Unassigned;
+ SetParamValuesStd(AParams, TIBOQuery(Dataset).Params);
+end;
+
+{ TDAEIBOStoredProcedure }
+
+function TDAEIBOStoredProcedure.CreateDataset(
+ aConnection: TDAEConnection): TDataset;
+begin
+ result := TIBOStoredProc.Create(nil);
+ TIBOStoredProc(result).IB_Connection := TDAEIBOConnection(aConnection).fConnection.Database;
+end;
+
+function TDAEIBOStoredProcedure.Execute: integer;
+begin
+ with TIBOStoredProc(Dataset) do begin
+ Unprepare;
+ Prepare;
+ end;
+
+ SetParamValues(GetParams);
+ Result := DoExecute;
+ GetParamValues(GetParams);
+end;
+
+function TDAEIBOStoredProcedure.GetStoredProcedureName: string;
+begin
+ result := TIBOStoredProc(Dataset).StoredProcName;
+end;
+
+procedure TDAEIBOStoredProcedure.SetStoredProcedureName(
+ const Name: string);
+begin
+ TIBOStoredProc(Dataset).StoredProcName := Name;
+end;
+
+procedure TDAEIBOStoredProcedure.RefreshParams;
+begin
+ // Apparently a bug in IBO requires to do so... Automatic gathering only works at runtime
+ TIBOStoredProc(Dataset).Prepare;
+ RefreshParamsStd(TIBOStoredProc(Dataset).Params);
+end;
+
+procedure TDAEIBOStoredProcedure.SetParamValues(AParams: TDAParamCollection);
+begin
+ SetParamValuesStd(AParams, TIBOStoredProc(Dataset).Params);
+end;
+
+procedure TDAEIBOStoredProcedure.GetParamValues(AParams: TDAParamCollection);
+begin
+ GetParamValuesStd(AParams, TIBOStoredProc(Dataset).Params);
+end;
+
+exports
+ GetDriverObject name func_GetDriverObject;
+
+function TDAEIBOStoredProcedure.DoExecute: integer;
+begin
+ TIBOStoredProc(Dataset).ExecProc;
+ result := TIBOStoredProc(Dataset).RowsAffected;
+end;
+
+initialization
+ _driver := nil;
+ RegisterDriverProc(GetDriverObject);
+
+finalization
+ UnregisterDriverProc(GetDriverObject);
+ FreeAndNIL(_driver);
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDAIBXDriver.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDAIBXDriver.pas
new file mode 100644
index 0000000..6513ac5
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDAIBXDriver.pas
@@ -0,0 +1,496 @@
+unit uDAIBXDriver;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Driver Library
+{
+{ compiler: Delphi 6 and up
+{ platform: Win32
+{
+{ (c)opyright RemObjects Software. all rights reserved.
+{
+{ Using this code requires a valid license of the Data Abstract
+{ which can be obtained at http://www.remobjects.com.
+{----------------------------------------------------------------------------}
+
+{$IFDEF MSWINDOWS}
+{$I ..\DataAbstract.inc}
+{$ENDIF MSWINDOWS}
+{$IFDEF LINUX}
+{$I ../DataAbstract.inc}
+{$ENDIF LINUX}
+
+{$R DataAbstract_IBXDriver_Glyphs.res}
+
+interface
+
+uses
+ Classes, DB, uDAEngine, uDAInterfaces, uDAIBInterfaces, IBDatabase,
+ uROClasses, IBQuery, IBStoredProc, IBSQLMonitor, IB, uDAUtils;
+
+type
+ { TDAIBXDriver }
+ TDAIBXDriver = class(TDADriverReference)
+ end;
+
+ { TIBXConnection }
+ TIBXConnection = class(TDAConnectionWrapper)
+ private
+ fDatabase: TIBDatabase;
+ fTransaction: TIBTransaction;
+
+ protected
+ function GetConnected: Boolean; override;
+ procedure SetConnected(Value: boolean); override;
+
+ public
+ constructor Create(AOwner: TComponent); override;
+
+ property Database: TIBDatabase read fDatabase;
+ property Transaction: TIBTransaction read fTransaction;
+ end;
+
+ { TDAEIBXDriver }
+ TDAEIBXDriver = class(TDAIBDriver)
+ private
+ fIBTraceOptions: TTraceFlags;
+ fTraceCallback: TDALogTraceEvent;
+ fMonitor: TIBSQLMonitor;
+
+ procedure OnIBXTrace(EventText: string; EventTime: TDateTime);
+ protected
+ function GetConnectionClass: TDAEConnectionClass; override;
+ procedure CustomizeConnectionObject(aConnection: TDAEConnection); override;
+ procedure DoSetTraceOptions(TraceActive: boolean; TraceOptions: TDATraceOptions; Callback: TDALogTraceEvent); override;
+
+ // IDADriver
+ function GetDriverID: string; override;
+ function GetDescription: string; override;
+ public
+ end;
+
+ { TDAEIBXConnection }
+ TDAEIBXConnection = class(TDAIBConnection, IDAInterbaseConnection, IDAIBTransactionAccess, IDAIBConnectionProperties, IDAUseGenerators, IDAFileBasedDatabase)
+ private
+ fConnection: TIBXConnection;
+
+ protected
+ // IIBTransactionAccess
+ function GetTransaction: TObject; safecall;
+
+ procedure Commit; safecall;
+ procedure CommitRetaining; safecall;
+ procedure Rollback; safecall;
+ procedure RollbackRetaining; safecall;
+
+ // IIBConnectionProperties
+ function GetRole: string; safecall;
+ procedure SetRole(const Value: string); safecall;
+ function GetSQLDialect: integer; override;safecall;
+ procedure SetSQLDialect(Value: integer); safecall;
+ function GetCharset: string; safecall;
+ procedure SetCharset(const Value: string); safecall;
+
+
+ // IDAConnection
+ function CreateCustomConnection: TCustomConnection; override;
+
+ function GetDatasetClass: TDAEDatasetClass; override;
+ function GetStoredProcedureClass: TDAEStoredProcedureClass; override;
+
+ procedure DoApplyConnectionString(aConnStrParser: TDAConnectionStringParser;
+ aConnectionObject: TCustomConnection); override;
+
+ function DoBeginTransaction: integer; override;
+ procedure DoCommitTransaction; override;
+ procedure DoRollbackTransaction; override;
+ function DoGetInTransaction: boolean; override;
+
+ end;
+
+ { TDAEIBXQuery }
+ TDAEIBXQuery = class(TDAEDataset,IDAMustSetParams)
+
+ protected
+ function DoGetRecordCount: integer; override;
+ function CreateDataset(aConnection: TDAEConnection): TDataset; override;
+ procedure ClearParams; override;
+ function DoExecute: integer; override;
+ function DoGetSQL: string; override;
+ procedure DoSetSQL(const Value: string); override;
+ procedure DoPrepare(Value: boolean); override;
+ procedure SetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ public
+ end;
+
+ { TDAEIBXStoredProcedure }
+ TDAEIBXStoredProcedure = class(TDAEStoredProcedure, IDAMustSetParams)
+ protected
+ function CreateDataset(aConnection: TDAEConnection): TDataset; override;
+
+ procedure RefreshParams; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetStoredProcedureName: string; override;
+ procedure SetStoredProcedureName(const Name: string); override;
+ function DoExecute: integer; override;
+ function Execute: integer; override;
+ procedure SetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ end;
+
+procedure Register;
+
+function GetDriverObject: IDADriver; stdcall;
+
+implementation
+
+uses SysUtils, uDADriverManager, uDARes, IBCustomDataSet, IBSQL,uROBinaryHelpers;
+
+var
+ _driver: TDAEDriver = nil;
+
+procedure Register;
+begin
+ RegisterComponents(DAPalettePageName, [TDAIBXDriver]);
+end;
+
+function GetDriverObject: IDADriver;
+begin
+ if (_driver = nil) then _driver := TDAEIBXDriver.Create(nil);
+ result := _driver;
+end;
+
+{ TIBXConnection }
+
+constructor TIBXConnection.Create(AOwner: TComponent);
+begin
+ inherited;
+
+ fDatabase := TIBDatabase.Create(Self);
+ fTransaction := TIBTransaction.Create(Self);
+ fTransaction.AutoStopAction := saNone;
+ //fTransaction.AutoStopAction := saCommit;
+ // ^ new per recommendation from Andy Gibson, to fix the "Transaction in progress" error.
+
+ fDatabase.LoginPrompt := FALSE;
+ fDatabase.DefaultTransaction := fTransaction;
+end;
+
+function TIBXConnection.GetConnected: Boolean;
+begin
+ result := fDatabase.Connected
+end;
+
+procedure TIBXConnection.SetConnected(Value: boolean);
+begin
+ // This first check is required.
+ // I think there's a bug in the IBX destroying sequence and the notification. TCustomConnection gets to this point *after*
+ // the owned components are destroyed. Only happens with IBX...
+
+ if (csDestroying in ComponentState) then Exit;
+ fDatabase.Connected := Value
+end;
+
+{ TDAEIBXConnection }
+
+procedure TDAEIBXConnection.DoApplyConnectionString(
+ aConnStrParser: TDAConnectionStringParser; aConnectionObject: TCustomConnection);
+begin
+ inherited;
+
+ with aConnStrParser do begin
+ if (Self.UserID <> '') then
+ fConnection.Database.Params.Add('user_name=' + Self.UserID)
+ else
+ fConnection.Database.Params.Add('user_name=' + UserID);
+
+ if (Self.Password <> '') then
+ fConnection.Database.Params.Add('password=' + Self.Password)
+ else
+ fConnection.Database.Params.Add('password=' + Password);
+
+ if Server <> '' then { Change: Aleksander Oven, 27. july 2003 }
+ fConnection.Database.DatabaseName := Server + ':' + Database
+ else
+ fConnection.Database.DatabaseName := Database;
+
+ if AuxParams['Dialect'] <> '' then
+ SetSQLDialect(StrToInt(AuxParams['Dialect']))
+ else if AuxParams['SQLDialect'] <> '' then
+ SetSQLDialect(StrToInt(AuxParams['SQLDialect']));
+
+ if AuxParams['Role'] <> '' then
+ SetRole(AuxParams['Role']);
+
+ if AuxParams['Charset'] <> '' then
+ SetCharset(AuxParams['Charset']);
+
+ end;
+end;
+
+function TDAEIBXConnection.DoBeginTransaction: integer;
+begin
+ result := -1;
+ fConnection.Database.DefaultTransaction.StartTransaction;
+end;
+
+procedure TDAEIBXConnection.DoCommitTransaction;
+begin
+ fConnection.Database.DefaultTransaction.Commit;
+end;
+
+function TDAEIBXConnection.CreateCustomConnection: TCustomConnection;
+begin
+ fConnection := TIBXConnection.Create(nil);
+ result := fConnection;
+end;
+
+function TDAEIBXConnection.GetDatasetClass: TDAEDatasetClass;
+begin
+ result := TDAEIBXQuery
+end;
+
+function TDAEIBXConnection.GetStoredProcedureClass: TDAEStoredProcedureClass;
+begin
+ result := TDAEIBXStoredProcedure
+end;
+
+function TDAEIBXConnection.GetTransaction: TObject;
+begin
+ result := fConnection.fTransaction;
+end;
+
+procedure TDAEIBXConnection.DoRollbackTransaction;
+begin
+ fConnection.Database.DefaultTransaction.Rollback;
+end;
+
+function TDAEIBXConnection.GetRole: string;
+begin
+ result := fConnection.Database.Params.Values['sql_role_name']
+end;
+
+function TDAEIBXConnection.GetSQLDialect: integer;
+begin
+ result := fConnection.Database.SQLDialect
+end;
+
+function TDAEIBXConnection.GetCharset: string;
+begin
+ result := fConnection.Database.Params.Values['lc_ctype']
+end;
+
+procedure TDAEIBXConnection.SetRole(const Value: string);
+begin
+ fConnection.Database.Params.Values['sql_role_name'] := Value
+end;
+
+procedure TDAEIBXConnection.SetSQLDialect(Value: integer);
+begin
+ fConnection.Database.SQLDialect := Value
+end;
+
+procedure TDAEIBXConnection.SetCharset(const Value: string);
+begin
+ fConnection.Database.Params.Values['lc_ctype'] := Value;
+end;
+
+procedure TDAEIBXConnection.Commit;
+begin
+ fConnection.fTransaction.Commit
+end;
+
+procedure TDAEIBXConnection.CommitRetaining;
+begin
+ fConnection.fTransaction.CommitRetaining
+end;
+
+procedure TDAEIBXConnection.Rollback;
+begin
+ fConnection.fTransaction.Rollback
+end;
+
+procedure TDAEIBXConnection.RollbackRetaining;
+begin
+ fConnection.fTransaction.RollbackRetaining
+end;
+
+function TDAEIBXConnection.DoGetInTransaction: boolean;
+begin
+ result := fConnection.fTransaction.InTransaction
+end;
+
+{ TDAEIBXDriver }
+
+procedure TDAEIBXDriver.CustomizeConnectionObject(aConnection: TDAEConnection);
+begin
+ TDAEIBXConnection(aConnection).fConnection.Database.TraceFlags := fIBTraceOptions;
+end;
+
+function TDAEIBXDriver.GetConnectionClass: TDAEConnectionClass;
+begin
+ result := TDAEIBXConnection;
+end;
+
+function TDAEIBXDriver.GetDescription: string;
+begin
+ result := 'Borland Interbase Express Driver';
+end;
+
+function TDAEIBXDriver.GetDriverID: string;
+begin
+ result := 'IBX';
+end;
+
+procedure TDAEIBXDriver.OnIBXTrace(EventText: string; EventTime: TDateTime);
+begin
+ if Assigned(fTraceCallback) then fTraceCallback(fMonitor, EventText, 0);
+end;
+
+procedure TDAEIBXDriver.DoSetTraceOptions(TraceActive: boolean; TraceOptions: TDATraceOptions; Callback: TDALogTraceEvent);
+begin
+ inherited;
+
+ if TraceActive then begin
+ if (fMonitor = nil) then fMonitor := TIBSQLMonitor.Create(Self);
+
+ fMonitor.Enabled := FALSE;
+ fMonitor.OnSQL := OnIBXTrace;
+
+ fIBTraceOptions := [];
+ if (toPrepare in TraceOptions) then fIBTraceOptions := fIBTraceOptions + [tfQPrepare];
+ if (toExecute in TraceOptions) then fIBTraceOptions := fIBTraceOptions + [tfQExecute];
+ if (toFetch in TraceOptions) then fIBTraceOptions := fIBTraceOptions + [tfQFetch];
+ if (toError in TraceOptions) then fIBTraceOptions := fIBTraceOptions + [tfError];
+ if (toStmt in TraceOptions) then fIBTraceOptions := fIBTraceOptions + [tfStmt];
+ if (toConnect in TraceOptions) then fIBTraceOptions := fIBTraceOptions + [tfConnect];
+ if (toTransact in TraceOptions) then fIBTraceOptions := fIBTraceOptions + [tfTransact];
+ if (toBlob in TraceOptions) then fIBTraceOptions := fIBTraceOptions + [tfBlob];
+ if (toService in TraceOptions) then fIBTraceOptions := fIBTraceOptions + [tfService];
+ if (toMisc in TraceOptions) then fIBTraceOptions := fIBTraceOptions + [tfMisc];
+
+ fTraceCallBack := Callback;
+
+ fMonitor.TraceFlags := fIBTraceOptions;
+ fMonitor.Enabled := TRUE;
+ end
+ else begin
+ FreeAndNIL(fMonitor);
+ fTraceCallback := nil;
+ end;
+end;
+
+{ TDAEIBXQuery }
+
+procedure TDAEIBXQuery.ClearParams;
+begin
+ inherited;
+ TIBQuery(Dataset).Params.Clear;
+end;
+
+function TDAEIBXQuery.CreateDataset(aConnection: TDAEConnection): TDataset;
+begin
+ result := TIBQuery.Create(nil);
+ TIBQuery(result).UniDirectional := true;
+ TIBQuery(result).Database := TDAEIBXConnection(aConnection).fConnection.Database;
+end;
+
+function TDAEIBXQuery.DoExecute: integer;
+begin
+ TIBQuery(Dataset).ExecSQL;
+ result := TIBQuery(Dataset).RowsAffected;
+end;
+
+function TDAEIBXQuery.DoGetRecordCount: integer;
+begin
+ TIBQuery(Dataset).FetchAll;
+ Result := inherited DoGetRecordCount;
+end;
+
+function TDAEIBXQuery.DoGetSQL: string;
+begin
+ result := TIBQuery(Dataset).SQL.Text
+end;
+
+procedure TDAEIBXQuery.DoPrepare(Value: boolean);
+begin
+ TIBQuery(Dataset).Prepared := Value
+end;
+
+procedure TDAEIBXQuery.DoSetSQL(const Value: string);
+begin
+ TIBQuery(Dataset).SQL.Text := Value;
+end;
+
+
+procedure TDAEIBXQuery.GetParamValues(AParams: TDAParamCollection);
+begin
+ GetParamValuesStd(AParams,TIBQuery(Dataset).Params);
+end;
+
+procedure TDAEIBXQuery.SetParamValues(AParams: TDAParamCollection);
+begin
+ SetParamValuesStd(AParams,TIBQuery(Dataset).Params);
+end;
+
+{ TDAEIBXStoredProcedure }
+
+function TDAEIBXStoredProcedure.CreateDataset(
+ aConnection: TDAEConnection): TDataset;
+begin
+ result := TIBStoredProc.Create(nil);
+ TIBStoredProc(result).Database := TDAEIBXConnection(aConnection).fConnection.Database;
+end;
+
+function TDAEIBXStoredProcedure.Execute: integer;
+begin
+ SetParamValues(GetParams);
+ Result:=DoExecute;
+ GetParamValues(GetParams);
+end;
+
+procedure TDAEIBXStoredProcedure.SetParamValues(AParams: TDAParamCollection);
+begin
+ SetParamValuesStd(AParams,TIBStoredProc(Dataset).Params);
+end;
+
+procedure TDAEIBXStoredProcedure.GetParamValues(AParams: TDAParamCollection);
+begin
+ GetParamValuesStd(AParams,TIBStoredProc(Dataset).Params);
+end;
+
+function TDAEIBXStoredProcedure.GetStoredProcedureName: string;
+begin
+ result := TIBStoredProc(Dataset).StoredProcName
+end;
+
+procedure TDAEIBXStoredProcedure.SetStoredProcedureName(
+ const Name: string);
+begin
+ TIBStoredProc(Dataset).StoredProcName := Name;
+end;
+
+procedure TDAEIBXStoredProcedure.RefreshParams;
+begin
+ // Apparently a bug in IBX requires to do so... Automatic gathering only works at runtime
+ TIBStoredProc(Dataset).Prepare;
+ RefreshParamsStd(TIBStoredProc(Dataset).Params);
+end;
+
+exports
+ GetDriverObject name func_GetDriverObject;
+
+function TDAEIBXStoredProcedure.DoExecute: integer;
+begin
+ TIBStoredProc(Dataset).ExecProc;
+ result := TIBStoredProc(Dataset).RowsAffected;
+end;
+
+initialization
+ _driver := nil;
+ RegisterDriverProc(GetDriverObject);
+
+finalization
+ UnregisterDriverProc(GetDriverObject);
+ FreeAndNIL(_driver);
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDAMyDACDriver.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDAMyDACDriver.pas
new file mode 100644
index 0000000..104a0dc
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDAMyDACDriver.pas
@@ -0,0 +1,539 @@
+unit uDAMyDACDriver;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Driver Library
+{
+{ compiler: Delphi 6 and up, Kylix 3 and up
+{ platform: Win32, Linux
+{
+{ (c)opyright RemObjects Software. all rights reserved.
+{
+{ Using this code requires a valid license of the Data Abstract
+{ which can be obtained at http://www.remobjects.com.
+{----------------------------------------------------------------------------}
+
+{$I ..\DataAbstract.inc}
+
+{$R DataAbstract_MyDACDriver_Glyphs.res}
+{.$DEFINE ENABLE_SQLMonitor}
+{.$DEFINE MYSQL4Compatible}
+
+interface
+
+uses DB, Classes, uDAEngine, uDAInterfaces, {uDAADOInterfaces,} uROClasses, DBAccess, MyAccess,
+ {$IFDEF ENABLE_SQLMonitor}DASQLMonitor, MySQLMonitor,{$ENDIF ENABLE_SQLMonitor} uROBinaryHelpers, uDAUtils, uDAMySQLInterfaces;
+
+type { TDAMyDACDriver }
+ TDAMyDACDriver = class(TDADriverReference)
+ end;
+
+ { TDAEADODriver }
+ TDAEADODriver = class(TDAMySQLDriver)
+ private
+ {$IFDEF ENABLE_SQLMonitor}
+ fMonitor: TMySQLMonitor;
+ fTraceCallBack: TDALogTraceEvent;
+
+ procedure OnMyDACTrace(Sender: TObject; Text: string; Flag: TDATraceFlag);
+ {$ENDIF ENABLE_SQLMonitor}
+ protected
+ function GetConnectionClass: TDAEConnectionClass; override;
+ {$IFDEF ENABLE_SQLMonitor}
+ procedure DoSetTraceOptions(TraceActive: boolean; TraceOptions: TDATraceOptions; Callback: TDALogTraceEvent); override;
+ {$ENDIF ENABLE_SQLMonitor}
+ // IDADriver
+ function GetDriverID: string; override; safecall;
+ function GetDescription: string; override; safecall;
+ function GetDefaultCustomParameters: string; override; safecall;
+ procedure GetAuxParams(const AuxDriver: string; out List: IROStrings); override;
+ end;
+
+ { TDAEMyConnection }
+ TDAEMyConnection = class(TDAMySQLConnection, IDAMySQLConnection,IDACanQueryDatabaseNames)
+ private
+ function GetMyConnection: TMyConnection;
+
+ protected
+ function GetTableSchema: string; override;
+ function useUnicode:Boolean; override;
+
+ function CreateCustomConnection: TCustomConnection; override;
+
+ function GetDatasetClass: TDAEDatasetClass; override;
+ function GetStoredProcedureClass: TDAEStoredProcedureClass; override;
+
+ procedure DoApplyConnectionString(aConnStrParser: TDAConnectionStringParser;
+ aConnectionObject: TCustomConnection); override;
+
+ function DoBeginTransaction: integer; override;
+ procedure DoCommitTransaction; override;
+ procedure DoRollbackTransaction; override;
+ function DoGetInTransaction: boolean; override;
+ procedure DoGetTableNames(out List: IROStrings); override;
+ procedure DoGetViewNames(out List: IROStrings); override;
+ procedure DoGetStoredProcedureNames(out List: IROStrings); override;
+ procedure DoGetForeignKeys(out ForeignKeys: TDADriverForeignKeyCollection); override;
+ procedure DoGetStoredProcedureParams(const aStoredProcedureName: string; out Params: TDAParamCollection); override;
+ function GetDatabaseNames: IROStrings;
+ procedure DoGetTableFields(const aTableName: string; out Fields: TDAFieldCollection); override;
+ property MyConnection: TMyConnection read GetMyConnection;
+ public
+ end;
+
+ { TDAEMyQuery }
+ TDAEMyQuery = class(TDAEDataset, IDAMustSetParams)
+ private
+
+ protected
+ function CreateDataset(aConnection: TDAEConnection): TDataset; override;
+ procedure ClearParams; override;
+ function DoExecute: integer; override;
+ function DoGetSQL: string; override;
+ procedure DoSetSQL(const Value: string); override;
+ procedure DoPrepare(Value: boolean); override;
+
+ // IDAMustSetParams
+ procedure SetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ public
+ end;
+
+ { TDAEADOStoredProcedure }
+ TDAEADOStoredProcedure = class(TDAEStoredProcedure, IDAMustSetParams)
+ protected
+ function CreateDataset(aConnection: TDAEConnection): TDataset; override;
+
+ function GetStoredProcedureName: string; override;
+ procedure SetStoredProcedureName(const Name: string); override;
+ function DoExecute: integer; override;
+ function Execute: integer; override;
+ procedure RefreshParams; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ // IDAMustSetParams
+ procedure SetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ end;
+
+procedure Register;
+
+function GetDriverObject: IDADriver; stdcall;
+
+implementation
+
+uses
+ SysUtils,Variants,
+ uDADriverManager, uDARes;
+
+var
+ _driver: TDAEDriver = nil;
+
+procedure Register;
+begin
+ RegisterComponents(DAPalettePageName, [TDAMyDACDriver]);
+end;
+
+{$IFDEF DataAbstract_SchemaModelerOnly}
+{$INCLUDE ..\DataAbstract_SchemaModelerOnly.inc}
+{$ENDIF DataAbstract_SchemaModelerOnly}
+
+function GetDriverObject: IDADriver;
+begin
+ {$IFDEF DataAbstract_SchemaModelerOnly}
+ if not RunningInSchemaModeler then begin
+ result := nil;
+ exit;
+ end;
+ {$ENDIF}
+ if (_driver = nil) then _driver := TDAEADODriver.Create(nil);
+ result := _driver;
+end;
+
+{$IFDEF LATEST_MyDAC}
+{$I uDACRLabsUtils.inc}
+{$ENDIF LATEST_MyDAC}
+
+
+{$I uDACRLabsUtils.inc}
+{ TDAEMyConnection }
+
+function TDAEMyConnection.DoBeginTransaction: integer;
+begin
+ MyConnection.StartTransaction;
+ result := 0;
+end;
+
+procedure TDAEMyConnection.DoCommitTransaction;
+begin
+ MyConnection.Commit;
+end;
+
+function TDAEMyConnection.GetMyConnection: TMyConnection;
+begin
+ result := TMyConnection(inherited ConnectionObject);
+end;
+
+function TDAEMyConnection.CreateCustomConnection: TCustomConnection;
+begin
+ result := TMyConnection.Create(nil);
+ TMyConnection(result).LoginPrompt := FALSE;
+end;
+
+function TDAEMyConnection.GetDatasetClass: TDAEDatasetClass;
+begin
+ result := TDAEMyQuery;
+end;
+
+function TDAEMyConnection.GetStoredProcedureClass: TDAEStoredProcedureClass;
+begin
+ result := TDAEADOStoredProcedure;
+end;
+
+procedure TDAEMyConnection.DoGetStoredProcedureNames(out List: IROStrings);
+begin
+ {$IFDEF MYSQL4Compatible}
+ List := TROStrings.Create;
+ MyConnection.GetStoredProcNames(List.Strings);
+ {$ELSE}
+ inherited DoGetStoredProcedureNames(List);
+ {$ENDIF}
+end;
+
+procedure TDAEMyConnection.DoGetTableNames(out List: IROStrings);
+begin
+ {$IFDEF MYSQL4Compatible}
+ List := TROStrings.Create;
+ MyConnection.GetTableNames(List.Strings);
+ {$ELSE}
+ inherited DoGetTableNames(List);
+ {$ENDIF MYSQL4Compatible}
+end;
+
+procedure TDAEMyConnection.DoRollbackTransaction;
+begin
+ MyConnection.Rollback;
+end;
+
+function TDAEMyConnection.DoGetInTransaction: boolean;
+begin
+ result := MyConnection.InTransaction
+end;
+
+
+procedure TDAEMyConnection.DoApplyConnectionString(
+ aConnStrParser: TDAConnectionStringParser; aConnectionObject: TCustomConnection);
+const
+ stdMSSQL_ConnectionString = 'User ID=%s;Password=%s;Initial Catalog=%s;Data Source=%s';
+var
+ adoconn: string;
+ i: integer;
+ sName,sValue: string;
+begin
+ inherited;
+
+ with aConnStrParser do begin
+ adoconn := Format(stdMSSQL_ConnectionString, [UserID, Password, Database, Server]);
+
+ MyConnection.Database := Database;
+
+ MyConnection.Server := Server;
+
+ if (Self.UserID <> '') then
+ MyConnection.Username := Self.UserID
+ else
+ MyConnection.Username := UserID;
+
+ if (Self.Password <> '') then
+ MyConnection.Password := Self.Password
+ else
+ MyConnection.Password := Password;
+ for i := 0 to AuxParamsCount -1 do
+ begin
+ sName := AuxParamNames[i];
+ sValue := AuxParams[AuxParamNames[i]];
+ if SameText('Port', sName) then MyConnection.Port:= StrToIntDef(sValue,3306);
+ if SameText('useUnicode', sName) then MyConnection.Options.UseUnicode:=StrToBoolDef(sValue,False);
+ end;
+ end;
+end;
+
+function TDAEMyConnection.GetTableSchema: string;
+begin
+ Result:=MyConnection.Database;
+end;
+
+function TDAEMyConnection.useUnicode: Boolean;
+begin
+ Result:= GetMyConnection.Options.UseUnicode;
+end;
+
+function TDAEMyConnection.GetDatabaseNames: IROStrings;
+begin
+ {$IFDEF MYSQL4Compatible}
+ Result := TROStrings.Create();
+ MyConnection.GetDatabaseNames(Result.Strings);
+ {$ELSE}
+ Result := inherited GetDatabaseNames;
+ {$ENDIF MYSQL4Compatible}
+end;
+
+procedure TDAEMyConnection.DoGetViewNames(out List: IROStrings);
+begin
+ {$IFDEF MYSQL4Compatible}
+ List := TROStrings.Create;
+ GetTablesList(MyConnection, List.Strings);
+ {$ELSE}
+ inherited DoGetViewNames(List);
+ {$ENDIF MYSQL4Compatible}
+end;
+
+procedure TDAEMyConnection.DoGetForeignKeys(
+ out ForeignKeys: TDADriverForeignKeyCollection);
+begin
+ {$IFDEF MYSQL4Compatible}
+ ForeignKeys := TDADriverForeignKeyCollection.Create(nil);
+ {$ELSE}
+ inherited DoGetForeignKeys(ForeignKeys);
+ {$ENDIF MYSQL4Compatible}
+end;
+
+procedure TDAEMyConnection.DoGetStoredProcedureParams(
+ const aStoredProcedureName: string; out Params: TDAParamCollection);
+{$IFDEF MYSQL4Compatible}
+var
+ cmd: IDASQLCommand;
+ {$ENDIF MYSQL4Compatible}
+begin
+ {$IFDEF MYSQL4Compatible}
+ cmd := NewCommand(aStoredProcedureName, stStoredProcedure);
+ cmd.RefreshParams;
+ Params := TDAParamCollection.Create(nil);
+ Params.AssignParamCollection(cmd.Params);
+ {$ELSE}
+ inherited DoGetStoredProcedureParams(aStoredProcedureName, Params);
+ {$ENDIF MYSQL4Compatible}
+end;
+
+procedure TDAEMyConnection.DoGetTableFields(const aTableName: string;
+ out Fields: TDAFieldCollection);
+{$IFDEF MYSQL4Compatible}
+ var
+ qry: IDADataset;
+{$ENDIF}
+begin
+ {$IFDEF MYSQL4Compatible}
+ Fields := TDAFieldCollection.Create(nil);
+ qry := GetDatasetClass.Create(Self);
+ try
+ qry.SQL := 'SELECT * FROM ' + QuoteIdentifierIfNeeded(aTableName) + ' WHERE 1=0';
+ qry.Open;
+ Fields.Assign(qry.Fields);
+ finally
+ qry := nil;
+ end;
+ {$ELSE}
+ inherited DoGetTableFields(aTableName, Fields);
+ {$ENDIF MYSQL4Compatible}
+end;
+
+{ TDAEADODriver }
+
+procedure TDAEADODriver.GetAuxParams(const AuxDriver: string;
+ out List: IROStrings);
+begin
+ inherited;
+ List.Add('useUnicode=(True;False)');
+end;
+
+function TDAEADODriver.GetConnectionClass: TDAEConnectionClass;
+begin
+ result := TDAEMyConnection;
+end;
+
+function TDAEADODriver.GetDefaultCustomParameters: string;
+begin
+ Result:= inherited GetDefaultCustomParameters + 'useUnicode=False;';
+end;
+
+function TDAEADODriver.GetDescription: string;
+begin
+ result := 'Core Lab MyDAC Driver'{$IFDEF DataAbstract_SchemaModelerOnly} + SchemaModelerOnly{$ENDIF};
+end;
+
+function TDAEADODriver.GetDriverID: string;
+begin
+ result := 'MyDAC';
+end;
+
+{$IFDEF ENABLE_SQLMonitor}
+procedure TDAEADODriver.OnMyDACTrace(Sender: TObject; Text: string; Flag: TDATraceFlag);
+begin
+ if Assigned(fTraceCallback) then fTraceCallback(Sender, Text, integer(Flag));
+end;
+
+procedure TDAEADODriver.DoSetTraceOptions(TraceActive: boolean; TraceOptions: TDATraceOptions; Callback: TDALogTraceEvent);
+var
+ MyDACopts: TDATraceFlags;
+begin
+ inherited;
+
+ if TraceActive then begin
+ if (fMonitor = nil) then fMonitor := TMySQLMonitor.Create(Self);
+
+ fMonitor.Active := FALSE;
+ fMonitor.OnSQL := OnMyDACTrace;
+
+ MyDACopts := [];
+ if (toPrepare in TraceOptions) then MyDACopts := MyDACopts + [tfQPrepare];
+ if (toExecute in TraceOptions) then MyDACopts := MyDACopts + [tfQExecute];
+ if (toFetch in TraceOptions) then MyDACopts := MyDACopts + [tfQFetch];
+ if (toError in TraceOptions) then MyDACopts := MyDACopts + [tfError];
+ if (toStmt in TraceOptions) then MyDACopts := MyDACopts + [tfStmt];
+ if (toConnect in TraceOptions) then MyDACopts := MyDACopts + [tfConnect];
+ if (toTransact in TraceOptions) then MyDACopts := MyDACopts + [tfTransact];
+ if (toBlob in TraceOptions) then MyDACopts := MyDACopts + [tfBlob];
+ if (toService in TraceOptions) then MyDACopts := MyDACopts + [tfService];
+ if (toMisc in TraceOptions) then MyDACopts := MyDACopts + [tfMisc];
+ if (toParams in TraceOptions) then MyDACopts := MyDACopts + [tfParams];
+
+ fTraceCallBack := Callback;
+
+ fMonitor.TraceFlags := MyDACopts;
+ fMonitor.Active := TRUE;
+ end
+ else begin
+ FreeAndNIL(fMonitor);
+ fTraceCallback := nil;
+ end;
+end;
+{$ENDIF ENABLE_SQLMonitor}
+
+{ TDAEMyQuery }
+
+function TDAEMyQuery.CreateDataset(aConnection: TDAEConnection): TDataset;
+begin
+ result := TMyQuery.Create(nil);
+ TMyQuery(result).ReadOnly := TRUE;
+ TMyQuery(result).Connection := TDAEMyConnection(aConnection).MyConnection;
+ TMyQuery(result).FetchAll := True; //for preventing creating an additional session when you call StartTransaction (an known issue of OLEDB)
+
+// GetLastAutoInc will work in case these options is commented
+// TMyQuery(result).FetchAll := False;
+// TMyQuery(result).Unidirectional := True;
+end;
+
+function TDAEMyQuery.DoExecute: integer;
+begin
+ TMyQuery(Dataset).Execute;
+ result := TMyQuery(Dataset).RowsAffected;
+end;
+
+function TDAEMyQuery.DoGetSQL: string;
+begin
+ result := TMyQuery(Dataset).SQL.Text;
+end;
+
+procedure TDAEMyQuery.DoPrepare(Value: boolean);
+begin
+ // Do not do inherited DoPrepare for MySQL.
+ {with TMyQuery(Dataset) do begin
+ if not Options.Direct then Prepared := Value;
+ end;}
+end;
+
+procedure TDAEMyQuery.DoSetSQL(const Value: string);
+begin
+ TMyQuery(Dataset).SQL.Text := Value;
+end;
+
+procedure TDAEMyQuery.SetParamValues(AParams: TDAParamCollection);
+begin
+ WriteCrLabsParamValues(AParams, TMyQuery(Dataset).Params);
+end;
+
+procedure TDAEMyQuery.GetParamValues(AParams: TDAParamCollection);
+var
+ i: integer;
+ par: uDAInterfaces.TDAParam;
+ inpar: TParam;
+begin
+ for i := 0 to (AParams.Count - 1) do begin
+ par := AParams[i];
+ inpar := TMyQuery(Dataset).Params.ParamByName(par.Name);
+ par.Value := inpar.Value;
+ end;
+end;
+
+procedure TDAEMyQuery.ClearParams;
+begin
+ inherited;
+ TMyQuery(Dataset).Params.Clear;
+end;
+
+{ TDAEADOStoredProcedure }
+
+function TDAEADOStoredProcedure.CreateDataset(
+ aConnection: TDAEConnection): TDataset;
+begin
+ result := TMyStoredProc.Create(nil);
+ TMyStoredProc(result).Connection := TDAEMyConnection(aConnection).MyConnection;
+end;
+
+function TDAEADOStoredProcedure.Execute: integer;
+begin
+ SetParamValues(GetParams);
+ Result:= DoExecute;
+ GetParamValues(GetParams);
+end;
+
+function TDAEADOStoredProcedure.GetStoredProcedureName: string;
+begin
+ result := TMyStoredProc(Dataset).StoredProcName;
+end;
+
+procedure TDAEADOStoredProcedure.SetStoredProcedureName(
+ const Name: string);
+begin
+ TMyStoredProc(Dataset).StoredProcName := Name;
+end;
+
+procedure TDAEADOStoredProcedure.SetParamValues(AParams: TDAParamCollection);
+begin
+ WriteCrLabsParamValues(AParams, TMyStoredProc(Dataset).Params);
+end;
+
+procedure TDAEADOStoredProcedure.GetParamValues(AParams: TDAParamCollection);
+var
+ i: Integer;
+ lParam: DBAccess.TDAParam;
+begin
+ for i := 0 to TMyStoredProc(DataSet).Params.Count - 1 do begin
+ lParam:=TMyStoredProc(DataSet).Params[i];
+ if (lParam.ParamType in [ptOutput, ptInputOutput, ptResult]) then
+ Aparams.ParamByName(lParam.Name).Value := lParam.Value;
+ end;
+end;
+
+exports
+ GetDriverObject name func_GetDriverObject;
+
+procedure TDAEADOStoredProcedure.RefreshParams;
+begin
+ RefreshParamsStd(TMyStoredProc(DataSet).Params);
+end;
+
+function TDAEADOStoredProcedure.DoExecute: integer;
+begin
+ TMyStoredProc(Dataset).ExecProc;
+ Result := -1;
+end;
+
+initialization
+ _driver := nil;
+ RegisterDriverProc(GetDriverObject);
+
+finalization
+ UnregisterDriverProc(GetDriverObject);
+ FreeAndNIL(_driver);
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDAMySQLDACDriver.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDAMySQLDACDriver.pas
new file mode 100644
index 0000000..a5879e8
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDAMySQLDACDriver.pas
@@ -0,0 +1,362 @@
+unit uDAMySQLDACDriver;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Driver Library
+{
+{ compiler: Delphi 6 and up, Kylix 3 and up
+{ platform: Win32, Linux
+{
+{ (c)opyright RemObjects Software. all rights reserved.
+{
+{ Using this code requires a valid license of the Data Abstract
+{ which can be obtained at http://www.remobjects.com.
+{----------------------------------------------------------------------------}
+
+{$I ..\DataAbstract.inc}
+
+{$R DataAbstract_MySQLDACDriver_Glyphs.res}
+
+interface
+
+uses DB, Classes, uDAEngine, uDAInterfaces, uDAADOInterfaces, uROClasses,
+ uROBinaryHelpers, uDAUtils, mySQLAccess, mySQLDbTables, mySQLTypes, uDAMySQLInterfaces;
+
+type { TDAMySQLDACDriver }
+ TDAMySQLDacDriver = class(TDADriverReference)
+ end;
+
+ { TDAEMySQLDacDriver }
+ TDAEMySQLDacDriver = class(TDAMySQLDriver)
+ private
+ protected
+ function GetConnectionClass: TDAEConnectionClass; override;
+
+ // IDADriver
+ function GetDriverID: string; override; safecall;
+ function GetDescription: string; override; safecall;
+ end;
+
+ { TDAEMyConnection }
+ TDAEMySQLDacConnection = class(TDAMySQLConnection, IDACanQueryDatabaseNames,IDAMySQLConnection)
+ private
+ function GetConnection: TmySQLDatabase;
+
+ protected
+ function GetTableSchema: string; override;
+ function CreateCustomConnection: TCustomConnection; override;
+
+ function GetDatasetClass: TDAEDatasetClass; override;
+ function GetStoredProcedureClass: TDAEStoredProcedureClass; override;
+
+ procedure DoApplyConnectionString(aConnStrParser: TDAConnectionStringParser;
+ aConnectionObject: TCustomConnection); override;
+
+ function DoBeginTransaction: integer; override;
+ procedure DoCommitTransaction; override;
+ procedure DoRollbackTransaction; override;
+ function DoGetInTransaction: boolean; override;
+
+ property Connection: TmySQLDatabase read GetConnection;
+ public
+ end;
+
+ { TDAEMySQLDacQuery }
+ TDAEMySQLDacQuery = class(TDAEDataset, IDAMustSetParams)
+ private
+
+ protected
+ function CreateDataset(aConnection: TDAEConnection): TDataset; override;
+ procedure ClearParams; override;
+ function DoExecute: integer; override;
+ function DoGetSQL: string; override;
+ procedure DoSetSQL(const Value: string); override;
+ procedure DoPrepare(Value: boolean); override;
+ procedure SetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ public
+ end;
+
+ { TDAEMySQLDacStoredProcedure }
+ TDAEMySQLDacStoredProcedure = class(TDAEStoredProcedure, IDAMustSetParams)
+ protected
+ function CreateDataset(aConnection: TDAEConnection): TDataset; override;
+ procedure RefreshParams; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetStoredProcedureName: string; override;
+ procedure SetStoredProcedureName(const Name: string); override;
+ function DoExecute: integer; override;
+ function Execute: integer; override;
+ procedure SetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ end;
+
+procedure Register;
+
+function GetDriverObject: IDADriver; stdcall;
+
+implementation
+
+uses
+ SysUtils,
+ uDADriverManager, uDARes, uDAMacroProcessors;
+
+var
+ _driver: TDAEDriver = nil;
+
+procedure Register;
+begin
+ RegisterComponents(DAPalettePageName, [TDAMySQLDACDriver]);
+end;
+
+{$IFDEF DataAbstract_SchemaModelerOnly}
+{$INCLUDE ..\DataAbstract_SchemaModelerOnly.inc}
+{$ENDIF DataAbstract_SchemaModelerOnly}
+
+function GetDriverObject: IDADriver;
+begin
+ {$IFDEF DataAbstract_SchemaModelerOnly}
+ if not RunningInSchemaModeler then begin
+ result := nil;
+ exit;
+ end;
+ {$ENDIF}
+ if (_driver = nil) then _driver := TDAEMySQLDacDriver.Create(nil);
+ result := _driver;
+end;
+
+{$IFDEF LATEST_MyDAC}
+{$I uDACRLabsUtils.inc}
+{$ENDIF LATEST_MyDAC}
+
+{ TDAEMySQLDacConnection }
+
+function TDAEMySQLDacConnection.DoBeginTransaction: integer;
+begin
+ Connection.StartTransaction;
+ result := 0;
+end;
+
+procedure TDAEMySQLDacConnection.DoCommitTransaction;
+begin
+ Connection.Commit;
+end;
+
+function TDAEMySQLDacConnection.GetConnection: TmySQLDatabase;
+begin
+ result := TmySQLDatabase(inherited ConnectionObject);
+end;
+
+function TDAEMySQLDacConnection.CreateCustomConnection: TCustomConnection;
+begin
+ result := TmySQLDatabase.Create(nil);
+ TmySQLDatabase(result).LoginPrompt := false;
+end;
+
+function TDAEMySQLDacConnection.GetDatasetClass: TDAEDatasetClass;
+begin
+ result := TDAEMySQLDacQuery;
+end;
+
+function TDAEMySQLDacConnection.GetStoredProcedureClass: TDAEStoredProcedureClass;
+begin
+ result := TDAEMySQLDacStoredProcedure;
+end;
+
+
+procedure TDAEMySQLDacConnection.DoRollbackTransaction;
+begin
+ Connection.Rollback;
+end;
+
+function TDAEMySQLDacConnection.DoGetInTransaction: boolean;
+begin
+ result := Connection.InTransaction
+end;
+
+
+
+procedure TDAEMySQLDacConnection.DoApplyConnectionString(
+ aConnStrParser: TDAConnectionStringParser; aConnectionObject: TCustomConnection);
+var
+ i: Integer;
+begin
+ inherited;
+
+ with aConnStrParser do begin
+ Connection.DatabaseName := Database;
+
+ Connection.Host := Server;
+
+ if (Self.UserID <> '') then
+ Connection.Username := Self.UserID
+ else
+ Connection.Username := UserID;
+
+ if (Self.Password <> '') then
+ Connection.UserPassword := Self.Password
+ else
+ Connection.UserPassword := Password;
+ if AuxParams['Port'] <> '' then Connection.Port := StrToIntDef(AuxParams['Port'],3306);
+
+ for i := 0 to AuxParamsCount -1 do
+ begin
+ if SameText(AuxParamNames[i], 'Port') then continue;
+ if AuxParams[AuxParamNames[i]] <> '' then
+ Connection.Params.Add(AuxParamNames[i]+'='+AuxParams[AuxParamNames[i]]);
+ end;
+ end;
+end;
+
+
+function TDAEMySQLDacConnection.GetTableSchema: string;
+begin
+ Result:=Connection.DatabaseName;
+end;
+
+{ TDAEMySQLDacDriver }
+
+
+function TDAEMySQLDacDriver.GetConnectionClass: TDAEConnectionClass;
+begin
+ result := TDAEMySQLDacConnection;
+end;
+
+function TDAEMySQLDacDriver.GetDescription: string;
+begin
+ result := 'MicroOlap DAC for MySQL Driver'{$IFDEF DataAbstract_SchemaModelerOnly} + SchemaModelerOnly{$ENDIF};
+end;
+
+function TDAEMySQLDacDriver.GetDriverID: string;
+begin
+ result := 'MySQLDAC';
+end;
+
+
+{ TDAEMySQLDacQuery }
+
+procedure TDAEMySQLDacQuery.ClearParams;
+begin
+ inherited;
+ TmySQLQuery(Dataset).Params.Clear;
+end;
+
+function TDAEMySQLDacQuery.CreateDataset(aConnection: TDAEConnection): TDataset;
+begin
+ result := TmySQLQuery.Create(nil);
+
+ TmySQLQuery(result).RequestLive := false;
+ TmySQLQuery(result).UniDirectional:=True;
+ TMySqlQuery(result).Database := TDAEMySQLDacConnection(aConnection).Connection;
+end;
+
+function TDAEMySQLDacQuery.DoExecute: integer;
+begin
+ TmySQLQuery(Dataset).ExecSQL;
+ result := TmySQLQuery(Dataset).RowsAffected;
+end;
+
+function TDAEMySQLDacQuery.DoGetSQL: string;
+begin
+ result := TmySQLQuery(Dataset).SQL.Text;
+end;
+
+procedure TDAEMySQLDacQuery.DoPrepare(Value: boolean);
+begin
+ TmySQLQuery(Dataset).Prepared := Value;
+end;
+
+procedure TDAEMySQLDacQuery.DoSetSQL(const Value: string);
+begin
+ TmySQLQuery(Dataset).SQL.Text := Value;
+end;
+
+procedure TDAEMySQLDacQuery.GetParamValues(AParams: TDAParamCollection);
+begin
+ GetParamValuesStd(AParams, TmySQLQuery(Dataset).Params);
+end;
+
+procedure TDAEMySQLDacQuery.SetParamValues(AParams: TDAParamCollection);
+begin
+ SetParamValuesStd(AParams, TmySQLQuery(Dataset).Params);
+end;
+
+
+{ TDAEADOStoredProcedure }
+
+function TDAEMySQLDacStoredProcedure.CreateDataset(
+ aConnection: TDAEConnection): TDataset;
+begin
+ result := TmySQLStoredProc.Create(nil);
+ TmySQLStoredProc(result).Database := TDAEMySQLDacConnection(aConnection).Connection;
+end;
+
+function TDAEMySQLDacStoredProcedure.Execute: integer;
+var
+ i: integer;
+ _params: TDAParamCollection;
+ lParam: TmySQLSPParam;
+begin
+ _params := GetParams;
+
+ with TmySQLStoredProc(Dataset) do begin
+ for i := 0 to (Params.Count-1) do begin
+ lParam:=Params[i];
+ if (lParam.ParamType in [ptInput, ptInputOutput]) then
+ lParam.Value := _params.ParamByName(lParam.Name).Value;
+ end;
+
+ Result:= DoExecute;
+
+ for i := 0 to (Params.Count-1) do begin
+ lParam:=Params[i];
+ if (lParam.ParamType in [ptOutput, ptInputOutput, ptResult]) then
+ _params.ParamByName(lParam.Name).Value := lParam.Value;
+ end;
+ end;
+end;
+
+function TDAEMySQLDacStoredProcedure.GetStoredProcedureName: string;
+begin
+ Result := TmySQLStoredProc(Dataset).ProcedureName;
+end;
+
+procedure TDAEMySQLDacStoredProcedure.SetStoredProcedureName(
+ const Name: string);
+begin
+ TmySQLStoredProc(Dataset).ProcedureName := Name;
+end;
+
+procedure TDAEMySQLDacStoredProcedure.RefreshParams;
+begin
+ RefreshParamsStd(TmySQLStoredProc(Dataset).Params);
+end;
+
+procedure TDAEMySQLDacStoredProcedure.GetParamValues(
+ AParams: TDAParamCollection);
+begin
+ GetParamValuesStd(AParams, TmySQLStoredProc(Dataset).Params);
+end;
+
+procedure TDAEMySQLDacStoredProcedure.SetParamValues(
+ AParams: TDAParamCollection);
+begin
+ SetParamValuesStd(AParams, TmySQLStoredProc(Dataset).Params);
+end;
+
+exports GetDriverObject name func_GetDriverObject;
+
+function TDAEMySQLDacStoredProcedure.DoExecute: integer;
+begin
+ TmySQLStoredProc(Dataset).ExecProc;
+ result := -1;
+end;
+
+initialization
+ _driver := nil;
+ RegisterDriverProc(GetDriverObject);
+
+finalization
+ UnregisterDriverProc(GetDriverObject);
+ FreeAndNIL(_driver);
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDANexusDBDriver.dcr b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDANexusDBDriver.dcr
new file mode 100644
index 0000000..52a0cec
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDANexusDBDriver.dcr differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDANexusDBDriver.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDANexusDBDriver.pas
new file mode 100644
index 0000000..abb049c
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDANexusDBDriver.pas
@@ -0,0 +1,1065 @@
+unit uDANexusDBDriver;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Driver Library
+{
+{ compiler: Delphi 6 and up
+{ platform: Win32
+{
+{ (c)opyright RemObjects Software. all rights reserved.
+{ (c)opyright Nexus Database Systems Pty. Ltd.
+{
+{ Using this code requires a valid license of the Data Abstract
+{ which can be obtained at http://www.remobjects.com.
+{----------------------------------------------------------------------------}
+
+{$IFDEF MSWINDOWS}
+{$I DataAbstract.inc}
+{$ENDIF MSWINDOWS}
+{$IFDEF LINUX}
+{$I DataAbstract.inc}
+{$ENDIF LINUX}
+
+interface
+
+uses
+ Classes,
+ DB,
+
+ uDAEngine,
+ uDAInterfaces,
+ uROClasses,
+
+ nxllMemoryManager,
+ nxllSync,
+ nxllComponent,
+ nxllTransport,
+
+ nxsdServerEngine,
+
+ nxdb,
+
+ {$IFNDEF DataAbstract_NexusDBPack}
+ nxptBasePooledTransport,
+ nxtwWinsockTransport,
+ nxtnNamedPipeTransport,
+
+ nxreRemoteServerEngine,
+ {$ENDIF}
+
+ nxsrSqlEngineBase,
+ nxsrServerEngine,
+
+ nxsqlEngine,
+
+ //nx1xAllEngines,
+ nxseAllEngines, // // NXDB2: Renamed
+ uDAUtils;
+
+type
+ TDANexusDBDriver = class(TDADriverReference)
+ end;
+
+ INexusDBConnection = interface
+ ['{DFF41623-A766-44C0-A61A-CC18FB80CAE3}']
+ end;
+
+ INexusDBDriver = interface
+ ['{CFE4B5BB-3C38-40BF-BE57-5BE3C627A6C3}']
+ procedure RegisterServerEngine(aServerEngine: TnxBaseServerEngine;
+ const aName: string); safecall;
+
+ procedure UnregisterServerEngine(aServerEngine: TnxBaseServerEngine); overload; safecall;
+ procedure UnregisterServerEngine(const aName: string); overload; safecall;
+ end;
+
+ TNexusDBConnection = class;
+
+ TNexusDBBaseEngineContainer = class(TnxObject)
+ protected {private}
+ becServerName: string;
+
+ becConnectionsHead : TNexusDBConnection;
+ becConnectionsTail : TNexusDBConnection;
+ protected
+ function becGetEngine: TnxBaseServerEngine; virtual; abstract;
+ public
+ constructor Create(aServerName: string);
+ destructor Destroy; override;
+
+ procedure CheckedFree; virtual;
+
+ property Engine: TnxBaseServerEngine
+ read becGetEngine;
+ end;
+
+ TNexusDBConnection = class(TDAConnectionWrapper)
+ protected {private}
+ conEngineContainer : TNexusDBBaseEngineContainer;
+ conEngineContainerNext : TNexusDBConnection;
+ conEngineContainerPrev : TNexusDBConnection;
+ conEngineContainerAdded : Boolean;
+
+ conSession : TnxSession;
+ conDatabase : TnxDatabase;
+
+ procedure conSetEngineContainer(aContainer: TNexusDBBaseEngineContainer);
+ protected
+ function GetConnected: Boolean; override;
+ procedure SetConnected(Value: Boolean); override;
+
+ procedure conAddToEngineContainer;
+ procedure conRemoveFromEngineContainer;
+ public
+ constructor Create(aOwner: TComponent); override;
+ destructor Destroy; override;
+ property EngineContainer: TNexusDBBaseEngineContainer read conEngineContainer write conSetEngineContainer;
+ property Session: TnxSession read conSession;
+ property Database: TnxDatabase read conDatabase;
+ end;
+
+ TDAENexusDBDriver = class(TDAEDriver, INexusDBDriver)
+ protected {private}
+ nxdEnginesPadlock: TnxPadlock;
+ nxdEngines: TStringList;
+ protected
+ function GetConnectionClass: TDAEConnectionClass; override;
+
+ { IDADriver }
+ function GetDriverID: string; override;
+ function GetDescription: string; override;
+
+ procedure GetAuxParams(const AuxDriver: string; out List: IROStrings); override;
+
+ function GetAvailableDriverOptions: TDAAvailableDriverOptions; override;
+ function GetDefaultCustomParameters: string; override; safecall;
+ { INexusDBDriver }
+ procedure RegisterServerEngine(aServerEngine: TnxBaseServerEngine;const aName: string); safecall;
+
+ procedure UnregisterServerEngine(aServerEngine: TnxBaseServerEngine); overload; safecall;
+ procedure UnregisterServerEngine(const aName: string); overload; safecall;
+ function GetDefaultConnectionType(const AuxDriver: string): string; override; safecall;
+ public
+ constructor Create(aOwner: TComponent); override;
+ destructor Destroy; override;
+ end;
+
+ { TDAENexusDBConnection }
+ TDAENexusDBConnection = class(TDAEConnection, INexusDBConnection)
+ private
+ dacConnection: TNexusDBConnection;
+ protected
+ { IDAConnection }
+ function CreateCustomConnection: TCustomConnection; override;
+ function CreateMacroProcessor: TDASQLMacroProcessor; override;
+
+ function GetDatasetClass: TDAEDatasetClass; override;
+ function GetStoredProcedureClass: TDAEStoredProcedureClass; override;
+ procedure DoApplyConnectionString(aConnStrParser: TDAConnectionStringParser;
+ aConnectionObject : TCustomConnection); override;
+ function DoBeginTransaction: Integer; override;
+ procedure DoCommitTransaction; override;
+ procedure DoRollbackTransaction; override;
+ function DoGetInTransaction: Boolean; override;
+
+ procedure DoGetTableNames(out aList: IROStrings); override;
+ procedure DoGetStoredProcedureNames(out List: IROStrings); override;
+ procedure DoGetTableFields(const aTableName : string;
+ out aFields : TDAFieldCollection); override;
+
+ function DoGetLastAutoInc(const GeneratorName: string): integer; override;
+ function IdentifierNeedsQuoting(const iIdentifier: string): boolean; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ public
+ end;
+
+ { TDAENexusDBQuery }
+ TDAENexusDBQuery = class(TDAEDataset, IDAMustSetParams)
+ private
+ protected
+ function CreateDataset(aConnection: TDAEConnection): TDataSet; override;
+ procedure ClearParams; override;
+ function DoExecute: Integer; override;
+ function DoGetSQL: string; override;
+ procedure DoSetSQL(const Value: string); override;
+ procedure DoPrepare(Value: Boolean); override;
+
+ { IDAMustSetParams }
+ procedure SetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ public
+ end;
+
+ { TDAENexusStoredProcedure }
+ TDAENexusStoredProcedure = class(TDAEStoredProcedure, IDAStoredProcedure, IDAMustSetParams)
+ protected
+ // Internal
+ // function DoGetStoredProcedureName: string; override;
+ // procedure DoSetStoredProcedureName(const Name: string); override;
+
+ // IDAStoredProcedure
+ function GetStoredProcedureName: string; override; safecall;
+ procedure SetStoredProcedureName(const Name: string); override; safecall;
+
+ // procedure PrepareSQLStatement; override;
+ function CreateDataset(aConnection: TDAEConnection): TDataset; override;
+ procedure DoPrepare(Value: boolean); override; safecall;
+ function DoExecute: integer; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function Execute: integer; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure DoSetSQL(const Value: string); override; safecall;
+ function DoGetSQL: string; override; safecall;
+ // function intVCLTypeToDAType(aFieldType: TFieldType): TDADataType;override;
+
+ { IDASQLCommand }
+ procedure RefreshParams; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ // function DoGetRecordCount: integer; override;
+ // function DoGetActive: boolean; override;
+ // procedure DoSetActive(Value: boolean); override;
+ // function DoGetBOF: boolean; override;
+ // function DoGetEOF: boolean; override;
+ // procedure DoNext; override;
+ // function DoLocate(const KeyFields: string; const KeyValues: Variant; Options: TLocateOptions): Boolean; override;
+
+ // IDAMustSetParams
+ procedure SetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ end;
+
+procedure Register;
+
+function GetDriverObject: IDADriver; stdcall;
+
+const
+ Nexus_DriverType = 'Nexus';
+implementation
+
+uses
+ SysUtils,
+
+ nxllUtils,nxsdTypes,nxsqlBase,
+
+ uDADriverManager,
+ uDARes,
+ uDAMacroProcessors,
+
+ TypInfo;
+
+const
+ csUrlSeperator = '://';
+
+ csEmbedded = 'embedded';
+ csRegistered = 'registered';
+ csEmbeddedDefault = 'embedded://default';
+
+ csAlias = 'alias';
+ csPath = 'path';
+
+ csNexusDB = 'NexusDB';
+ csNexusDBDriver = 'NexusDB Driver';
+
+resourcestring
+ rsEmbeddedOnly = ' [embedded only]';
+ rsThisDriverOnlySupportsEmbeddedServerEngines = 'This driver only supports embedded server engines. Connections to remote server engines require a full NexusDB license.';
+ rsNoProtocolHasBeenSpecified = 'No protocol has been specified';
+ rsNoServerEngineHasBeenRegisteredAs = 'No Server Engine has been registered as "%s"';
+ rsNoTransportAvailableForProtocol = 'No transport available for protocol "%s"';
+ rsUnknownDatabaseType = 'Unknown database type "%s"';
+
+var
+ _driver : TDAENexusDBDriver = nil;
+
+{===Register===================================================================}
+procedure Register;
+begin
+ RegisterComponents(DAPalettePageName, [TDANexusDBDriver]);
+end;
+{==============================================================================}
+
+
+
+{===GetDriverObject============================================================}
+{$IFDEF DataAbstract_SchemaModelerOnly}{$INCLUDE DataAbstract_SchemaModelerOnly.inc}{$ENDIF DataAbstract_SchemaModelerOnly}
+function GetDriverObject: IDADriver;
+begin
+ {$IFDEF DataAbstract_SchemaModelerOnly}
+ if not RunningInSchemaModeler then begin
+ Result := nil;
+ Exit;
+ end;
+ {$ENDIF}
+ if (_driver = nil) then _driver := TDAENexusDBDriver.Create(nil);
+ Result := _driver;
+end;
+{==============================================================================}
+
+
+
+{===TNexusDBBaseEngineContainer================================================}
+procedure TNexusDBBaseEngineContainer.CheckedFree;
+begin
+ if not Assigned(becConnectionsHead) then
+ Free;
+end;
+{------------------------------------------------------------------------------}
+constructor TNexusDBBaseEngineContainer.Create(aServerName: string);
+begin
+ becServerName := aServerName;
+
+ inherited Create;
+
+ _driver.nxdEnginesPadlock.Lock;
+ try
+ _driver.nxdEngines.AddObject(aServerName, Self);
+ finally
+ _driver.nxdEnginesPadlock.Unlock;
+ end;
+end;
+{------------------------------------------------------------------------------}
+destructor TNexusDBBaseEngineContainer.Destroy;
+var
+ i : Integer;
+begin
+ if Assigned(_driver) then begin
+ _driver.nxdEnginesPadlock.Lock;
+ try
+ with _driver.nxdEngines do
+ if Find(becServerName, i) and (Objects[i] = Self) then
+ Delete(i);
+ while Assigned(becConnectionsHead) do try
+ becConnectionsHead.EngineContainer := nil;
+ except end;
+ finally
+ _driver.nxdEnginesPadlock.Unlock;
+ end;
+ end;
+
+ inherited;
+end;
+{==============================================================================}
+
+
+
+{===TNexusDBEmbeddedEngineContainer============================================}
+type
+ TNexusDBEmbeddedEngineContainer = class(TNexusDBBaseEngineContainer)
+ protected {private}
+ eecServerEngine: TnxServerEngine;
+ protected
+ function becGetEngine: TnxBaseServerEngine; override;
+ public
+ constructor Create(aServerName: string);
+ destructor Destroy; override;
+
+ procedure CheckedFree; override;
+ end;
+function TNexusDBEmbeddedEngineContainer.becGetEngine: TnxBaseServerEngine;
+begin
+ Result := eecServerEngine;
+end;
+{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
+procedure TNexusDBEmbeddedEngineContainer.CheckedFree;
+begin
+ if not SameText(becServerName, csEmbeddedDefault) then
+ inherited;
+end;
+{------------------------------------------------------------------------------}
+constructor TNexusDBEmbeddedEngineContainer.Create(aServerName: string);
+begin
+ eecServerEngine := TnxServerEngine.Create(nil);
+ eecServerEngine.SqlEngine := TnxSqlEngine.Create(eecServerEngine);
+ eecServerEngine.Open;
+
+ inherited Create(aServerName);
+end;
+{------------------------------------------------------------------------------}
+destructor TNexusDBEmbeddedEngineContainer.Destroy;
+begin
+ inherited;
+ FreeAndNil(eecServerEngine);
+end;
+{==============================================================================}
+
+
+
+{$IFNDEF DataAbstract_NexusDBPack}
+{==============================================================================}
+type
+ TNexusDBRemoteEngineContainer = class(TNexusDBBaseEngineContainer)
+ protected {private}
+ recTransport: TnxBaseTransport;
+ recServerEngine: TnxRemoteServerEngine;
+ protected
+ function becGetEngine: TnxBaseServerEngine; override;
+ public
+ constructor Create(aServerName, aAuxParamsString: string;
+ aTransportClass: TnxBaseTransportClass);
+ destructor Destroy; override;
+ end;
+{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
+function TNexusDBRemoteEngineContainer.becGetEngine: TnxBaseServerEngine;
+begin
+ Result := recServerEngine;
+end;
+{------------------------------------------------------------------------------}
+constructor TNexusDBRemoteEngineContainer.Create(aServerName, aAuxParamsString: string;
+ aTransportClass: TnxBaseTransportClass);
+var
+ S,
+ N,
+ V : string;
+ AuxParams : IROStrings;
+ i : integer;
+
+ procedure SetProperty(Instance: TObject; const Prefix, Name, Value: string);
+ begin
+ if (Pos(Prefix, Name) = 1) then
+ begin
+ SetPropValue(Instance,
+ Copy(Name, Length(Prefix) + 1, Length(Name)),
+ Value);
+ end;
+ end;
+
+begin
+ S := aServerName;
+ Delete(S, 1, Pos(csUrlSeperator, S) + 2);
+
+ AuxParams := ListStringElements(aAuxParamsString);
+
+ recTransport := aTransportClass.Create(nil);
+ recTransport.ServerName := S;
+
+ recServerEngine := TnxRemoteServerEngine.Create(nil);
+ recServerEngine.Transport := recTransport;
+
+ for i := 0 to AuxParams.Count-1 do
+ begin
+ N := AuxParams.Names[i];
+ V := AuxParams.Values[AuxParams.Names[i]];
+ SetProperty(recTransport, 'Transport.', N, V);
+ SetProperty(recServerEngine, 'Server.', N, V);
+ end;
+
+ recTransport.Open;
+ recServerEngine.Open;
+
+ inherited Create(aServerName);
+end;
+{------------------------------------------------------------------------------}
+destructor TNexusDBRemoteEngineContainer.Destroy;
+begin
+ inherited;
+ FreeAndNil(recServerEngine);
+ FreeAndNil(recTransport);
+end;
+{==============================================================================}
+{$ENDIF}
+
+
+
+{===TNexusDBRegisteredEngineContainer==========================================}
+type
+ TNexusDBRegisteredEngineContainer = class(TNexusDBBaseEngineContainer)
+ protected {private}
+ regecServerEngine: TnxBaseServerEngine;
+ protected
+ function becGetEngine: TnxBaseServerEngine; override;
+ public
+ constructor Create(aServerName: string;
+ aServerEngine: TnxBaseServerEngine);
+
+ procedure CheckedFree; override;
+ end;
+{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
+function TNexusDBRegisteredEngineContainer.becGetEngine: TnxBaseServerEngine;
+begin
+ Result := regecServerEngine;
+end;
+{------------------------------------------------------------------------------}
+procedure TNexusDBRegisteredEngineContainer.CheckedFree;
+begin
+ {never}
+end;
+{------------------------------------------------------------------------------}
+constructor TNexusDBRegisteredEngineContainer.Create(aServerName: string;
+ aServerEngine: TnxBaseServerEngine);
+begin
+ regecServerEngine := aServerEngine;
+ inherited Create(aServerName);
+end;
+{==============================================================================}
+
+
+
+{===TNexusDBConnection=========================================================}
+procedure TNexusDBConnection.conAddToEngineContainer;
+begin
+ if conEngineContainerAdded then
+ Exit;
+ if not Assigned(conEngineContainer) then
+ Exit;
+
+ _driver.nxdEnginesPadlock.Lock;
+ try
+ conEngineContainerPrev := conEngineContainer.becConnectionsTail;
+ conEngineContainer.becConnectionsTail := Self;
+ if Assigned(conEngineContainerPrev) then
+ conEngineContainerPrev.conEngineContainerNext := Self;
+ if not Assigned(conEngineContainer.becConnectionsHead) then
+ conEngineContainer.becConnectionsHead := Self;
+ finally
+ _driver.nxdEnginesPadlock.Unlock;
+ end;
+
+ conEngineContainerAdded := True;
+end;
+{------------------------------------------------------------------------------}
+procedure TNexusDBConnection.conRemoveFromEngineContainer;
+begin
+ if not conEngineContainerAdded then
+ Exit;
+
+ _driver.nxdEnginesPadlock.Lock;
+ try
+ if Assigned(conEngineContainerNext) then
+ conEngineContainerNext.conEngineContainerPrev := conEngineContainerPrev
+ else
+ if conEngineContainer.becConnectionsTail = Self then
+ conEngineContainer.becConnectionsTail := conEngineContainerPrev;
+
+ if Assigned(conEngineContainerPrev) then
+ conEngineContainerPrev.conEngineContainerNext := conEngineContainerNext
+ else
+ if conEngineContainer.becConnectionsHead = Self then
+ conEngineContainer.becConnectionsHead := conEngineContainerNext;
+
+ conEngineContainerNext := nil;
+ conEngineContainerPrev := nil;
+
+ conEngineContainer.CheckedFree;
+ conEngineContainer := nil;
+ finally
+ _driver.nxdEnginesPadlock.Unlock;
+ end;
+ conEngineContainerAdded := False;
+end;
+{------------------------------------------------------------------------------}
+procedure TNexusDBConnection.conSetEngineContainer(aContainer: TNexusDBBaseEngineContainer);
+begin
+ if conEngineContainer <> aContainer then begin
+ conSession.Close;
+ conSession.ServerEngine := nil;
+
+ conRemoveFromEngineContainer;
+
+ conEngineContainer := aContainer;
+ if Assigned(conEngineContainer) then
+ conSession.ServerEngine := conEngineContainer.Engine;
+
+ conAddToEngineContainer;
+ end;
+end;
+{------------------------------------------------------------------------------}
+constructor TNexusDBConnection.Create(aOwner: TComponent);
+begin
+ inherited;
+
+ conSession := TnxSession.Create(Self);
+ conDatabase := TnxDatabase.Create(Self);
+ conDatabase.Session := conSession;
+end;
+{------------------------------------------------------------------------------}
+destructor TNexusDBConnection.Destroy;
+begin
+ EngineContainer := nil;
+ inherited;
+end;
+{------------------------------------------------------------------------------}
+function TNexusDBConnection.GetConnected: Boolean;
+begin
+ Result := conDatabase.Connected;
+end;
+{------------------------------------------------------------------------------}
+procedure TNexusDBConnection.SetConnected(Value: Boolean);
+begin
+ if (csDestroying in ComponentState) then Exit;
+
+ try
+ conSession.Active := Value;
+ conDatabase.Connected := Value;
+ except
+ conSession.Active := False;
+ conDatabase.Connected := False;
+ raise;
+ end;
+end;
+{==============================================================================}
+
+
+
+{===TDAENexusDBDriver==========================================================}
+constructor TDAENexusDBDriver.Create(aOwner: TComponent);
+begin
+ inherited;
+ nxdEnginesPadlock := TnxPadlock.Create;
+ nxdEngines := TStringList.Create;
+end;
+{------------------------------------------------------------------------------}
+destructor TDAENexusDBDriver.Destroy;
+var
+ i : Integer;
+begin
+ if Assigned(nxdEnginesPadlock) then begin
+ nxdEnginesPadlock.Lock;
+ try
+ if Assigned(nxdEngines) then begin
+ for i := Pred(nxdEngines.Count) downto 0 do
+ nxdEngines.Objects[i].Free;
+ nxdEngines.Clear;
+ end;
+ finally
+ nxdEnginesPadlock.Unlock;
+ end;
+ end;
+ inherited;
+ FreeAndNil(nxdEnginesPadlock);
+ FreeAndNil(nxdEngines);
+end;
+{------------------------------------------------------------------------------}
+procedure TDAENexusDBDriver.GetAuxParams(const AuxDriver: string; out List: IROStrings);
+begin
+ inherited;
+end;
+{------------------------------------------------------------------------------}
+function TDAENexusDBDriver.GetAvailableDriverOptions: TDAAvailableDriverOptions;
+begin
+ {$IFDEF DataAbstract_NexusDBPack}
+ Result := [doDatabaseName];
+ {$ELSE}
+ Result := [doServerName, doDatabaseName, doLogin];
+ {$ENDIF}
+end;
+{------------------------------------------------------------------------------}
+function TDAENexusDBDriver.GetConnectionClass: TDAEConnectionClass;
+begin
+ Result := TDAENexusDBConnection;
+end;
+{------------------------------------------------------------------------------}
+function TDAENexusDBDriver.GetDefaultConnectionType(
+ const AuxDriver: string): string;
+begin
+ Result:=Nexus_DriverType;
+end;
+
+function TDAENexusDBDriver.GetDefaultCustomParameters: string;
+begin
+ Result:='';
+end;
+
+function TDAENexusDBDriver.GetDescription: string;
+begin
+ Result := csNexusDBDriver
+ {$IFDEF DataAbstract_SchemaModelerOnly} + SchemaModelerOnly{$ENDIF}
+ {$IFDEF DataAbstract_NexusDBPack} + rsEmbeddedOnly{$ENDIF};
+end;
+{------------------------------------------------------------------------------}
+function TDAENexusDBDriver.GetDriverID: string;
+begin
+ Result := csNexusDB;
+end;
+{------------------------------------------------------------------------------}
+procedure TDAENexusDBDriver.RegisterServerEngine(aServerEngine : TnxBaseServerEngine;
+ const aName : string);
+begin
+ TNexusDBRegisteredEngineContainer.Create(csRegistered + csUrlSeperator + aName, aServerEngine);
+end;
+{------------------------------------------------------------------------------}
+procedure TDAENexusDBDriver.UnregisterServerEngine(aServerEngine : TnxBaseServerEngine);
+var
+ i : Integer;
+begin
+ _driver.nxdEnginesPadlock.Lock;
+ try
+ for i := Pred(_driver.nxdEngines.Count) downto 0 do
+ if _driver.nxdEngines.Objects[i] is TNexusDBRegisteredEngineContainer then
+ if TNexusDBRegisteredEngineContainer(_driver.nxdEngines.Objects[i]).regecServerEngine = aServerEngine then
+ _driver.nxdEngines.Objects[i].Free;
+ finally
+ _driver.nxdEnginesPadlock.Unlock;
+ end;
+end;
+{------------------------------------------------------------------------------}
+procedure TDAENexusDBDriver.UnregisterServerEngine(const aName : string);
+var
+ i : Integer;
+begin
+ _driver.nxdEnginesPadlock.Lock;
+ try
+ if _driver.nxdEngines.Find(csRegistered + csUrlSeperator + aName, i) then
+ _driver.nxdEngines.Objects[i].Free;
+ finally
+ _driver.nxdEnginesPadlock.Unlock;
+ end;
+end;
+{==============================================================================}
+
+
+
+{===TDAENexusDBConnection======================================================}
+function TDAENexusDBConnection.CreateCustomConnection: TCustomConnection;
+begin
+ Result := TNexusDBConnection.Create(nil);
+ dacConnection := TNexusDBConnection(Result);
+end;
+{------------------------------------------------------------------------------}
+function TDAENexusDBConnection.CreateMacroProcessor: TDASQLMacroProcessor;
+begin
+ Result := TOracleMacroProcessor.Create;
+end;
+{------------------------------------------------------------------------------}
+procedure TDAENexusDBConnection.DoApplyConnectionString(aConnStrParser: TDAConnectionStringParser;
+ aConnectionObject : TCustomConnection);
+var
+ S, T : string;
+ i : Integer;
+ sl : TStringList;
+ tpc : TnxBaseTransportClass;
+begin
+ inherited;
+
+ with aConnStrParser do begin
+ (aConnectionObject as TNexusDBConnection).Session.Close;
+
+ if Self.UserID <> '' then
+ dacConnection.Session.Username := Self.UserID
+ else
+ dacConnection.Session.Username := UserID;
+
+ if Self.Password <> '' then
+ dacConnection.Session.Password := Self.Password
+ else
+ dacConnection.Session.Password := Password;
+
+ Server := Trim(Server);
+
+ if Server = '' then
+ Server := csEmbeddedDefault;
+
+ _driver.nxdEnginesPadlock.Lock;
+ try
+ S := Server;
+ SetLength(S, nxMaxI32(0, Pred(Pos(csUrlSeperator, S))));
+
+ if S = '' then
+ raise EDADriverException.Create(rsNoProtocolHasBeenSpecified);
+
+ if not _driver.nxdEngines.Find(Server, i) then begin
+
+ if SameText(S, csEmbedded) then begin
+ (aConnectionObject as TNexusDBConnection).EngineContainer :=
+ TNexusDBEmbeddedEngineContainer.Create(Server);
+ end else if SameText(S, csRegistered) then begin
+ raise EDADriverException.CreateFmt(rsNoServerEngineHasBeenRegisteredAs, [Server]);
+ end else begin
+ {$IFDEF DataAbstract_NexusDBPack}
+ raise EDADriverException.Create(rsThisDriverOnlySupportsEmbeddedServerEngines);
+ {$ELSE}
+ sl := TStringList.Create;
+ try
+ TnxBaseDirectTransport.GetRegisteredClasses(sl);
+ tpc := nil;
+ for i := 0 to Pred(sl.Count) do
+ if SameText(S, TnxBaseTransportClass(sl.Objects[i]).ProtocolName) then begin
+ tpc := TnxBaseTransportClass(sl.Objects[i]);
+ Break;
+ end;
+ if not Assigned(tpc) then
+ raise EDADriverException.CreateFmt(rsNoTransportAvailableForProtocol, [S]);
+ (aConnectionObject as TNexusDBConnection).EngineContainer :=
+ TNexusDBRemoteEngineContainer.Create(Server, AuxParamsString, tpc);
+ finally
+ FreeAndNil(sl);
+ end;
+ {$ENDIF}
+ end;
+ end else
+ (aConnectionObject as TNexusDBConnection).EngineContainer :=
+ (_driver.nxdEngines.Objects[i] as TNexusDBBaseEngineContainer);
+ finally
+ _driver.nxdEnginesPadlock.Unlock;
+ end;
+
+ Database := Trim(Database);
+
+ S := Database;
+ SetLength(S, nxMaxI32(0, Pred(Pos(csUrlSeperator, S))));
+ if Pos(csUrlSeperator, Database) > 0 then
+ T := Copy(Database, Length(S) + 4, High(Integer))
+ else
+ T := Database;
+
+ if S = '' then
+ if (aConnectionObject as TNexusDBConnection).EngineContainer.becGetEngine is TnxServerEngine then
+ S := csPath
+ else
+ S := csAlias;
+
+ if SameText(S, csAlias) then
+ (aConnectionObject as TNexusDBConnection).Database.AliasName := T
+ else if SameText(S, csPath) then
+ (aConnectionObject as TNexusDBConnection).Database.AliasPath := T
+ else
+ raise EDADriverException.CreateFmt(rsUnknownDatabaseType, [S]);
+
+ end;
+end;
+{------------------------------------------------------------------------------}
+function TDAENexusDBConnection.DoBeginTransaction: Integer;
+begin
+ Result := -1;
+ dacConnection.Database.StartTransaction;
+end;
+{------------------------------------------------------------------------------}
+procedure TDAENexusDBConnection.DoCommitTransaction;
+begin
+ dacConnection.Database.Commit;
+end;
+{------------------------------------------------------------------------------}
+function TDAENexusDBConnection.DoGetInTransaction: Boolean;
+begin
+ Result := dacConnection.Database.InTransaction;
+end;
+{------------------------------------------------------------------------------}
+procedure TDAENexusDBConnection.DoGetTableFields(const aTableName : string;
+ out aFields : TDAFieldCollection);
+var
+ i : Integer;
+ fld: TField;
+begin
+ dacConnection.Open;
+
+ with TnxQuery.Create(nil) do try
+ SQL.Text := 'SELECT * FROM "' + aTableName + '" WHERE ''c'' <> ''c''';
+ Database := dacConnection.Database;
+ Open;
+
+ aFields := TDAFieldCollection.Create(nil);
+ try
+ for i := 0 to Pred(FieldCount) do begin
+ fld:=Fields.Fields[i];
+ with aFields.Add do begin
+ Name := fld.FieldName;
+ Size := fld.Size;
+ Required := fld.Required;
+ ReadOnly := fld.ReadOnly;
+ Calculated := fld.Calculated;
+ DisplayWidth := fld.DisplayWidth;
+ DisplayLabel := fld.DisplayLabel;
+ DataType := VCLTypeToDAType(fld.DataType);
+ if DataType = datDecimal then begin
+ case fld.DataType of
+ ftBCD: begin
+ DecimalPrecision:= TBCDField(fld).Precision;
+ DecimalScale:= TBCDField(fld).Size;
+ end;
+ ftFMTBCD: begin
+ DecimalPrecision:= TFMTBCDField(fld).Precision;
+ DecimalScale:= TFMTBCDField(fld).Size;
+ end;
+ end;
+ end;
+ end;
+ end;
+ except
+ FreeAndNil(aFields);
+ raise;
+ end;
+ finally
+ Free;
+ end;
+end;
+{------------------------------------------------------------------------------}
+procedure TDAENexusDBConnection.DoGetTableNames(out aList: IROStrings);
+begin
+ inherited;
+ dacConnection.Database.Open;
+ dacConnection.Database.GetTableNames(aList.Strings);
+end;
+{------------------------------------------------------------------------------}
+procedure TDAENexusDBConnection.DoRollbackTransaction;
+begin
+ dacConnection.Database.Rollback;
+end;
+{------------------------------------------------------------------------------}
+function TDAENexusDBConnection.GetDatasetClass: TDAEDatasetClass;
+begin
+ Result := TDAENexusDBQuery;
+end;
+
+function TDAENexusDBConnection.GetStoredProcedureClass: TDAEStoredProcedureClass;
+begin
+ Result:=TDAENexusStoredProcedure;
+end;
+
+{------------------------------------------------------------------------------}
+function TDAENexusDBConnection.DoGetLastAutoInc(const GeneratorName: string): integer;
+begin
+ // dacConnection.Database.GetAutoIncValue(GeneratorName, Cardinal(Result)); // NXDB2: Changed
+ dacConnection.Database.GetAutoIncValue(GeneratorName,
+ dacConnection.Session.Password,
+ Cardinal(Result));
+// Dec(Result);
+end;
+{==============================================================================}
+
+
+
+{===TDAENexusDBQuery===========================================================}
+function TDAENexusDBQuery.CreateDataset(aConnection: TDAEConnection): TDataSet;
+begin
+ Result := TnxQuery.Create(nil);
+ with TnxQuery(Result) do begin
+ Database := TDAENexusDBConnection(aConnection).dacConnection.Database;
+ RequestLive := False;
+ end;
+end;
+{------------------------------------------------------------------------------}
+function TDAENexusDBQuery.DoExecute: Integer;
+begin
+ with TnxQuery(DataSet) do begin
+ ExecSQL;
+ Result := RowsAffected;
+ end;
+end;
+{------------------------------------------------------------------------------}
+function TDAENexusDBQuery.DoGetSQL: string;
+begin
+ Result := TnxQuery(DataSet).SQL.Text
+end;
+{------------------------------------------------------------------------------}
+procedure TDAENexusDBQuery.DoPrepare(Value: Boolean);
+begin
+ TnxQuery(DataSet).Prepared := Value;
+end;
+{------------------------------------------------------------------------------}
+procedure TDAENexusDBQuery.DoSetSQL(const Value: string);
+begin
+ TnxQuery(DataSet).SQL.Text := Value;
+end;
+{------------------------------------------------------------------------------}
+procedure TDAENexusDBQuery.SetParamValues(AParams: TDAParamCollection);
+begin
+ SetParamValuesStd(AParams, TnxQuery(DataSet).Params);
+end;
+
+procedure TDAENexusDBQuery.GetParamValues(AParams: TDAParamCollection);
+begin
+ GetParamValuesStd(AParams, TnxQuery(DataSet).Params);
+end;
+
+procedure TDAENexusDBQuery.ClearParams;
+begin
+ inherited;
+ TnxQuery(DataSet).Params.Clear;
+end;
+
+
+{==============================================================================}
+
+exports GetDriverObject Name func_GetDriverObject;
+
+procedure TDAENexusDBConnection.DoGetStoredProcedureNames(
+ out List: IROStrings);
+begin
+ inherited;
+ dacConnection.Database.Open;
+ dacConnection.Database.GetStoredProcNames(List.Strings);
+end;
+
+
+{ TDAENexusStoredProcedure }
+
+function TDAENexusStoredProcedure.CreateDataset(
+ aConnection: TDAEConnection): TDataset;
+begin
+ Result := TnxStoredProc.Create(nil);
+ with TnxStoredProc(Result) do begin
+ Database := TDAENexusDBConnection(aConnection).dacConnection.Database;
+ RequestLive := False;
+ end;
+end;
+
+function TDAENexusStoredProcedure.Execute: integer;
+begin
+ SetParamValues(GetParams);
+ Result:=DoExecute;
+ GetParamValues(GetParams);
+end;
+
+function TDAENexusStoredProcedure.DoGetSQL: string;
+begin
+ Result:='';
+end;
+
+procedure TDAENexusStoredProcedure.DoSetSQL(const Value: string);
+begin
+//
+end;
+
+procedure TDAENexusStoredProcedure.GetParamValues(AParams: TDAParamCollection);
+begin
+ GetParamValuesStd(AParams,TnxStoredProc(Dataset).Params);
+end;
+
+function TDAENexusStoredProcedure.GetStoredProcedureName: string;
+begin
+ Result:=TnxStoredProc(Dataset).StoredProcName;
+end;
+
+procedure TDAENexusStoredProcedure.SetParamValues(AParams: TDAParamCollection);
+begin
+ SetParamValuesStd(AParams,TnxStoredProc(Dataset).Params);
+end;
+
+procedure TDAENexusStoredProcedure.SetStoredProcedureName(
+ const Name: string);
+begin
+ TnxStoredProc(Dataset).StoredProcName:=Name;
+end;
+
+procedure TDAENexusStoredProcedure.RefreshParams;
+begin
+ TnxStoredProc(DataSet).RefreshParam;
+ RefreshParamsStd(TnxStoredProc(DataSet).Params);
+end;
+
+procedure TDAENexusStoredProcedure.DoPrepare(Value: boolean);
+begin
+ TnxStoredProc(DataSet).Prepared:=Value;
+end;
+
+
+function TDAENexusStoredProcedure.DoExecute: integer;
+begin
+ TnxStoredProc(Dataset).ExecProc;
+ Result:=-1;
+end;
+
+
+function TDAENexusDBConnection.IdentifierNeedsQuoting(
+ const iIdentifier: string): boolean;
+begin
+ Result := inherited IdentifierNeedsQuoting(iIdentifier) or IsReservedName(iIdentifier);
+end;
+
+initialization
+ _driver := nil;
+ RegisterDriverProc(GetDriverObject);
+finalization
+ UnregisterDriverProc(GetDriverObject);
+ try
+ _driver.Free;
+ except end;
+ _driver := nil;
+end.
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDAODACDriver.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDAODACDriver.pas
new file mode 100644
index 0000000..6dfce43
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDAODACDriver.pas
@@ -0,0 +1,667 @@
+unit uDAODACDriver;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Driver Library
+{
+{ compiler: Delphi 6 and up
+{ platform: Win32
+{
+{ (c)opyright RemObjects Software. all rights reserved.
+{
+{ Using this code requires a valid license of the Data Abstract
+{ which can be obtained at http://www.remobjects.com.
+{----------------------------------------------------------------------------}
+
+{$I ..\DataAbstract.inc}
+
+{$R DataAbstract_ODACDriver_Glyphs.res}
+
+{
+ If you have the version with source code, uncomment the following conditional to
+ make this unit compile.
+}
+
+{.$DEFINE SOURCECODEVERSION}
+
+interface
+
+uses DB, Classes, uDAEngine, uDAInterfaces, uDAADOInterfaces, uROClasses, Variants,
+ uDAOracleInterfaces, Ora, DBAccess, DASQLMonitor, OraSQLMonitor, OraSmart, uDAMacroProcessors, uDAUtils, OraClasses;
+
+type { TDAODACDriver }
+ TDAODACDriver = class(TDADriverReference)
+ end;
+
+ { TDAEODACDriver }
+ TDAEODACDriver = class(TDAOracleDriver)
+ private
+ fMonitor: TOraSQLMonitor;
+ fTraceCallBack: TDALogTraceEvent;
+
+ procedure OnODACTrace(Sender: TObject; Text: string; Flag: TDATraceFlag);
+
+ protected
+ function GetConnectionClass: TDAEConnectionClass; override;
+
+ // IDADriver
+ function GetDriverID: string; override;
+ function GetDescription: string; override;
+ procedure GetAuxParams(const AuxDriver: string; out List: IROStrings); override;
+
+ procedure DoSetTraceOptions(TraceActive: boolean; TraceOptions: TDATraceOptions; Callback: TDALogTraceEvent); override;
+
+ function GetAvailableDriverOptions: TDAAvailableDriverOptions; override;
+ function GetDefaultCustomParameters: string; override;
+
+ public
+ end;
+
+ { TDAEODACConnection }
+ TDAEODACConnection = class(TDAOracleConnection)
+ private
+ fConnection: TORASession;
+ protected
+ function CreateCustomConnection: TCustomConnection; override;
+
+ function GetDatasetClass: TDAEDatasetClass; override;
+ function GetStoredProcedureClass: TDAEStoredProcedureClass; override;
+
+ procedure DoApplyConnectionString(aConnStrParser: TDAConnectionStringParser;
+ aConnectionObject: TCustomConnection); override;
+
+ function DoBeginTransaction: integer; override;
+ procedure DoCommitTransaction; override;
+ procedure DoRollbackTransaction; override;
+ function DoGetInTransaction: boolean; override;
+
+ public
+ function GetDatabaseNames: IROStrings;
+ end;
+
+ { TDAEODACQuery }
+ TDAEODACQuery = class(TDAEDataset, IDAOracleDataset, IDAMustSetParams)
+ private
+
+ protected
+ function CreateDataset(aConnection: TDAEConnection): TDataset; override;
+ function intVCLTypeToDAType(aFieldType: TFieldType): TDADataType;override;
+ procedure ClearParams; override;
+ // IDADataset
+ function DoExecute: integer; override;
+ function DoGetSQL: string; override;
+ procedure DoSetSQL(const Value: string); override;
+ procedure DoPrepare(Value: boolean); override;
+ procedure DoSetActive(Value: boolean); override;
+
+ // IOracleDataset
+ function GetLockMode: TDAOracleLockMode;
+ procedure SetLockMode(Value: TDAOracleLockMode);
+ function GetOptions: TDAOracleOptions;
+ procedure SetOptions(Value: TDAOracleOptions);
+
+ // IDAMustSetParams
+ procedure SetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ public
+ end;
+
+ { TDAEODACStoredProcedure }
+ TDAEODACStoredProcedure = class(TDAEStoredProcedure, IDAMustSetParams)
+ protected
+ function CreateDataset(aConnection: TDAEConnection): TDataset; override;
+ function intVCLTypeToDAType(aFieldType: TFieldType): TDADataType;override;
+
+ function GetStoredProcedureName: string; override;
+ procedure SetStoredProcedureName(const Name: string); override;
+ procedure RefreshParams; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function DoExecute: integer; override;
+ function Execute: integer; override;
+
+ // IDAMustSetParams
+ procedure SetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ end;
+
+procedure Register;
+
+function GetDriverObject: IDADriver; stdcall;
+
+implementation
+
+uses
+ SysUtils,
+ uDADriverManager, uDARes, uROBinaryHelpers;
+
+var
+ _driver: TDAEDriver = nil;
+
+procedure Register;
+begin
+ RegisterComponents(DAPalettePageName, [TDAODACDriver]);
+end;
+
+{$IFDEF DataAbstract_SchemaModelerOnly}
+{$INCLUDE ..\DataAbstract_SchemaModelerOnly.inc}
+{$ENDIF DataAbstract_SchemaModelerOnly}
+
+function GetDriverObject: IDADriver;
+begin
+ {$IFDEF DataAbstract_SchemaModelerOnly}
+ if not RunningInSchemaModeler then begin
+ result := nil;
+ exit;
+ end;
+ {$ENDIF}
+ if (_driver = nil) then _driver := TDAEODACDriver.Create(nil);
+ result := _driver;
+end;
+
+
+procedure ReadODACParamValues(AParams: TDAParamCollection;aDACParams: TOraParams;pvSession: TOraSession);
+var
+ i: integer;
+ lParam: TOraParam;
+ ms: IROStream;
+begin
+ for i := 0 to aDACParams.Count - 1 do begin
+ lParam := aDACParams[i];
+ if (lParam.ParamType in [ptOutput, ptInputOutput, ptResult]) then
+ if ord(lParam.DataType) = ftBFile then begin
+ ms := TROStream.Create;
+ lParam.AsBFile.SaveToStream(ms.Stream);
+ ms.Position:=0;
+ Aparams.ParamByName(lParam.Name).LoadFromStream(ms);
+ ms:=nil;
+ end
+ else
+ Aparams.ParamByName(lParam.Name).Value := lParam.Value;
+ end;
+end;
+
+
+procedure WriteODACParamValues(InputParams: TDAParamCollection;OutputParams: TOraParams;pvSession: TOraSession);
+var i : integer;
+ par : uDAInterfaces.TDAParam;
+ outpar : TOraParam;
+ ms: IROStream;
+ blobtype : TFieldType;
+ lvOraLob : TOralob;
+begin
+ for i := 0 to (InputParams.Count-1) do begin
+ par := InputParams[i];
+ outpar := OutputParams.ParamByName(par.Name);
+
+ // If no blob type is specified, then gets the default field type.
+ // BlobType is only meaningful to Oracle. MSSQL works fine just setting the DataType
+ blobtype := BlobTypeMappings[par.BlobType];
+ if (blobtype=ftUnknown) then blobtype := DADataTypesMappings[par.DataType];
+
+ case par.DataType of
+ datBlob : begin
+ outpar.ParamType := TParamType(par.ParamType);
+ outpar.DataType := DADataTypesMappings[par.DataType];
+ if par.ParamType <> daptOutput then begin
+ ms := TROStream.Create;
+ par.SaveToStream(ms);
+ ms.Position := 0;
+ lvOraLob := TOralob.Create(pvSession.OCISvcCtx);
+ try
+ lvOraLob.CreateTemporary(ltBlob);
+ if ms.Size>0 then lvOraLob.LoadFromStream(ms.Stream);
+ lvOraLob.WriteLob;
+ outpar.AsOraBLOB := lvOraLob;
+ finally
+ lvOraLob.Free;
+ end;
+ end;
+
+ end;
+ datMemo : begin
+ outpar.ParamType := TParamType(par.ParamType);
+ outpar.DataType := ftMemo;
+
+ // Only happens with Oracle
+ if (blobtype<>ftUnknown) then outpar.DataType := blobtype;
+ if par.ParamType <> daptOutput then outpar.Value := par.Value;
+ end;
+ else begin
+ outpar.ParamType := TParamType(par.ParamType);
+ case par.DataType of
+ datAutoInc : outpar.DataType := ftInteger;
+ datLargeAutoInc: outpar.DataType := ftLargeInt;
+ else
+ outpar.DataType := DADataTypesMappings[par.DataType];
+ end;
+ if par.ParamType <> daptOutput then outpar.Value := par.Value;
+ end;
+ end;
+ end;
+end;
+
+{ TDAEODACConnection }
+
+procedure TDAEODACConnection.DoApplyConnectionString(
+ aConnStrParser: TDAConnectionStringParser; aConnectionObject: TCustomConnection);
+begin
+ inherited;
+
+ with aConnStrParser do begin
+
+ if (Self.UserID <> '') then
+ fConnection.Username := Self.UserID
+ else
+ fConnection.Username := UserID;
+
+ if (Self.Password <> '') then
+ fConnection.Password := Self.Password
+ else
+ fConnection.Password := Password;
+
+ fConnection.Server := Server;
+ fConnection.ConnectPrompt := FALSE;
+ fConnection.Debug := (AuxParams['Debug']='1');
+
+ fConnection.Options.Net := AuxParams['Net'] = '1';
+ end;
+end;
+
+function TDAEODACConnection.DoBeginTransaction: integer;
+begin
+ fConnection.StartTransaction;
+ result := 0;
+end;
+
+procedure TDAEODACConnection.DoCommitTransaction;
+begin
+ fConnection.Commit;
+end;
+
+function TDAEODACConnection.CreateCustomConnection: TCustomConnection;
+begin
+ fConnection := TORASession.Create(nil);
+ fConnection.LoginPrompt := FALSE;
+
+ { ToDo: add a COnnectionString parameter to set
+ fConnection.Debug := TRUE; }
+
+ result := fConnection;
+end;
+
+function TDAEODACConnection.GetDatasetClass: TDAEDatasetClass;
+begin
+ result := TDAEODACQuery;
+end;
+
+function TDAEODACConnection.GetStoredProcedureClass: TDAEStoredProcedureClass;
+begin
+ result := TDAEODACStoredProcedure;
+end;
+
+procedure TDAEODACConnection.DoRollbackTransaction;
+begin
+ fConnection.Rollback;
+end;
+
+function TDAEODACConnection.DoGetInTransaction: boolean;
+begin
+ result := fConnection.InTransaction
+end;
+
+function TDAEODACConnection.GetDatabaseNames: IROStrings;
+begin
+ Result := TROStrings.Create();
+ fConnection.GetDatabaseNames(Result.Strings);
+end;
+
+
+{ TDAEODACDriver }
+
+function TDAEODACDriver.GetAvailableDriverOptions: TDAAvailableDriverOptions;
+begin
+ result := [doServerName, doLogin, doCustom];
+end;
+
+function TDAEODACDriver.GetConnectionClass: TDAEConnectionClass;
+begin
+ result := TDAEODACConnection;
+end;
+
+function TDAEODACDriver.GetDefaultCustomParameters: string;
+begin
+ result := 'Net=0';
+end;
+
+function TDAEODACDriver.GetDescription: string;
+begin
+ result := 'Core Lab ODAC Driver'{$IFDEF DataAbstract_SchemaModelerOnly} + SchemaModelerOnly{$ENDIF};
+end;
+
+function TDAEODACDriver.GetDriverID: string;
+begin
+ result := 'ODAC';
+end;
+
+procedure TDAEODACDriver.GetAuxParams(const AuxDriver: string; out List: IROStrings);
+begin
+ inherited;
+ List.Add('Net=0,1');
+end;
+
+procedure TDAEODACDriver.OnODACTrace(Sender: TObject; Text: string; Flag: TDATraceFlag);
+begin
+ if Assigned(fTraceCallback) then fTraceCallback(Sender, Text, integer(Flag));
+end;
+
+procedure TDAEODACDriver.DoSetTraceOptions(TraceActive: boolean; TraceOptions: TDATraceOptions; Callback: TDALogTraceEvent);
+var
+ sdacopts: TDATraceFlags;
+begin
+ inherited;
+
+ if TraceActive then begin
+ if (fMonitor = nil) then fMonitor := TOraSQLMonitor.Create(Self);
+
+ fMonitor.Active := FALSE;
+ fMonitor.OnSQL := OnODACTrace;
+
+ sdacopts := [];
+ if (toPrepare in TraceOptions) then sdacopts := sdacopts + [tfQPrepare];
+ if (toExecute in TraceOptions) then sdacopts := sdacopts + [tfQExecute];
+ if (toFetch in TraceOptions) then sdacopts := sdacopts + [tfQFetch];
+ if (toError in TraceOptions) then sdacopts := sdacopts + [tfError];
+ if (toStmt in TraceOptions) then sdacopts := sdacopts + [tfStmt];
+ if (toConnect in TraceOptions) then sdacopts := sdacopts + [tfConnect];
+ if (toTransact in TraceOptions) then sdacopts := sdacopts + [tfTransact];
+ if (toBlob in TraceOptions) then sdacopts := sdacopts + [tfBlob];
+ if (toService in TraceOptions) then sdacopts := sdacopts + [tfService];
+ if (toMisc in TraceOptions) then sdacopts := sdacopts + [tfMisc];
+ if (toParams in TraceOptions) then sdacopts := sdacopts + [tfParams];
+
+ fTraceCallBack := Callback;
+
+ fMonitor.TraceFlags := sdacopts;
+ fMonitor.Active := TRUE;
+ end
+ else begin
+ FreeAndNIL(fMonitor);
+ fTraceCallback := nil;
+ end;
+end;
+
+{ TDAEODACQuery }
+
+function TDAEODACQuery.CreateDataset(aConnection: TDAEConnection): TDataset;
+begin
+ result := TSmartQuery.Create(nil);
+ TSmartQuery(result).Debug := TDAEODACConnection(aConnection).fConnection.Debug;
+ TSmartQuery(result).ReadOnly := TRUE;
+ TSmartQuery(result).FetchAll := True; //for preventing creating an additional session when you call StartTransaction (an known issue of OLEDB)
+ TSmartQuery(result).Unidirectional := True;
+ TSmartQuery(result).Session := TDAEODACConnection(aConnection).fConnection;
+end;
+
+function TDAEODACQuery.DoGetSQL: string;
+begin
+ result := TSmartQuery(Dataset).SQL.Text;
+end;
+
+procedure TDAEODACQuery.DoSetSQL(const Value: string);
+begin
+ TSmartQuery(Dataset).SQL.Text := Value;
+end;
+
+function TDAEODACQuery.GetLockMode: TDAOracleLockMode;
+begin
+ result := TDAOracleLockMode(TSmartQuery(Dataset).LockMode)
+end;
+
+procedure TDAEODACQuery.SetLockMode(Value: TDAOracleLockMode);
+begin
+ TSmartQuery(Dataset).LockMode := TLockMode(Value)
+end;
+
+procedure TDAEODACQuery.SetOptions(Value: TDAOracleOptions);
+var
+ {$IFDEF SOURCECODEVERSION}
+ dsopts: TOraDataSetOptions;
+ {$ELSE}
+ dsopts: TOraDataSetOptionsDS;
+ {$ENDIF}
+begin
+ {$IFDEF SOURCECODEVERSION}
+ dsopts := TSmartQuery(Dataset).Options;
+ {$ELSE}
+ dsopts := TSmartQuery(Dataset).OptionsDS;
+ {$ENDIF}
+
+ TSmartQuery(Dataset).DMLRefresh := True; // To get the output params when we exec SPs
+ dsopts.AutoClose := opAutoClose in Value;
+ dsopts.DefaultValues := opDefaultValues in Value;
+ dsopts.LongStrings := opLongStrings in Value;
+ dsopts.QueryRecCount := opQueryRecCount in Value;
+ dsopts.CacheLobs := opCacheLobs in Value;
+ dsopts.DeferredLobRead := opDeferredLobRead in Value;
+ dsopts.KeepPrepared := opKeepPrepared in Value;
+end;
+
+function TDAEODACQuery.GetOptions: TDAOracleOptions;
+var
+ {$IFDEF SOURCECODEVERSION}
+ dsopts: TOraDataSetOptions;
+ {$ELSE}
+ dsopts: TOraDataSetOptionsDS;
+ {$ENDIF}
+begin
+ {$IFDEF SOURCECODEVERSION}
+ dsopts := TSmartQuery(Dataset).Options;
+ {$ELSE}
+ dsopts := TSmartQuery(Dataset).OptionsDS;
+ {$ENDIF}
+
+ result := [];
+
+ if dsopts.AutoClose then result := result + [opAutoClose];
+ if dsopts.DefaultValues then result := result + [opDefaultValues];
+ if dsopts.LongStrings then result := result + [opLongStrings];
+ if dsopts.QueryRecCount then result := result + [opQueryRecCount];
+ if dsopts.CacheLobs then result := result + [opCacheLobs];
+ if dsopts.DeferredLobRead then result := result + [opDeferredLobRead];
+ if dsopts.KeepPrepared then result := result + [opKeepPrepared];
+end;
+
+procedure TDAEODACQuery.DoPrepare(Value: boolean);
+begin
+ TSmartQuery(Dataset).Prepared := Value
+end;
+
+function TDAEODACQuery.DoExecute: integer;
+begin
+ TSmartQuery(Dataset).ExecSQL;
+ result := TSmartQuery(Dataset).RowsAffected;
+end;
+
+procedure TDAEODACQuery.SetParamValues(AParams: TDAParamCollection);
+begin
+ WriteODACParamValues(AParams, TSmartQuery(Dataset).Params, TSmartQuery(Dataset).Session);
+end;
+
+procedure TDAEODACQuery.GetParamValues(AParams: TDAParamCollection);
+begin
+ ReadODACParamValues(AParams, TSmartQuery(Dataset).Params, TSmartQuery(Dataset).Session)
+end;
+
+
+function ExtractTableName(aSQLStatement: string): string;
+var sql: string;
+ idx, i, x: integer;
+begin
+ result := '';
+
+ sql := UpperCase(aSQLStatement);
+ ReplaceChar(sql, [#13, #9, #10], #32);
+
+ idx := Pos(' FROM ', sql);
+ if (idx=0) then Exit;
+
+ for i := idx+6 to Length(sql) do begin
+ if (sql[i]<>#32) then begin
+ for x := i to Length(sql) do
+ if not (sql[x] in ['A'..'Z', '0'..'9', '.', '_']) then begin
+ result := Trim(Copy(sql, i, x-i));
+ Exit;
+ end;
+ end;
+ end;
+end;
+
+procedure TDAEODACQuery.DoSetActive(Value: boolean);
+var willCreateFields: boolean;
+ fieldColl: TDAFieldCollection;
+ tableName: string;
+ fld: TDAField;
+ qry: TSmartQuery;
+begin
+ fieldColl:=nil; // prevent warnings
+ willCreateFields := FALSE;
+ if Value then begin
+ fieldColl := inherited GetFields;
+ willCreateFields := fieldColl.Count=0;
+ end;
+
+ inherited;
+
+ if not willCreateFields then Exit;
+
+ { Determines which ones are part of the PK }
+ tableName := UpperCase(ExtractTableName(DoGetSQL));
+
+ if (tableName='') then Exit;
+ qry := TSmartQuery.Create(NIL);
+ try
+ qry.Assign(Dataset);
+ qry.SQL.Text := Format(
+ 'SELECT cols.column_name, cols.position '+
+ 'FROM all_constraints cons, all_cons_columns cols '+
+ 'WHERE cols.table_name = ''%s'' AND cons.constraint_type = ''P'' AND cons.constraint_name = cols.constraint_name '+
+ 'AND cons.owner = cols.owner ORDER BY cols.position', [tableName]);
+ qry.Open;
+ if (qry.RecordCount=0) then Exit;
+
+ while not qry.Eof do try
+ fld := fieldColl.FindField(qry.Fields[0].AsString);
+ if (fld<>NIL) then begin
+ fld.InPrimaryKey := TRUE;
+ fld.Required := TRUE;
+ end;
+ finally
+ qry.Next;
+ end;
+ finally
+ qry.Free;
+ end;
+end;
+
+function TDAEODACQuery.intVCLTypeToDAType(
+ aFieldType: TFieldType): TDADataType;
+begin
+ if ord(aFieldType) in [ftTimeStampTZ,ftTimeStampLTZ] then aFieldType:=ftTimeStamp;
+ if ord(aFieldType) in [ftBFile] then aFieldType:=ftBlob;
+ Result:= inherited intVCLTypeToDAType(aFieldType);
+end;
+
+procedure TDAEODACQuery.ClearParams;
+begin
+ inherited;
+ TSmartQuery(Dataset).Params.Clear;
+end;
+
+{ TDAEODACStoredProcedure }
+
+function TDAEODACStoredProcedure.CreateDataset(aConnection: TDAEConnection): TDataset;
+begin
+ result := TOraStoredProc.Create(nil);
+ TOraStoredProc(result).Debug := TDAEODACConnection(aConnection).fConnection.Debug;
+ TOraStoredProc(result).Session := TDAEODACConnection(aConnection).fConnection;
+end;
+
+function TDAEODACStoredProcedure.Execute: integer;
+var
+// i: integer;
+ _params: TDAParamCollection;
+ // lParam: DBAccess.TDAParam;
+begin
+ _params := GetParams;
+ setParamValues(_Params);
+{
+ with TOraStoredProc(Dataset) do begin
+ if (Params.Count <> _Params.Count) then TOraStoredProc(Dataset).PrepareSQL;
+
+ for i := 0 to (Params.Count - 1) do
+ if (Params[i].ParamType in [ptInput, ptInputOutput]) then
+ Params[i].Value := _params.ParamByName(Params[i].Name).Value;
+
+ for i := 0 to (_params.Count - 1) do begin
+ lParam := Params.ParamByName(_params[i].Name);
+ if (_params[i].DataType = datString) and (_params[i].Size > 4000) and (lParam.ParamType in [ptOutput, ptInputOutput]) then
+ lParam.Size := _params[i].Size;
+ end;
+ end;
+}
+ result := DoExecute;
+ GetParamValues(_Params);
+end;
+
+function TDAEODACStoredProcedure.GetStoredProcedureName: string;
+begin
+ result := TOraStoredProc(Dataset).StoredProcName;
+end;
+
+procedure TDAEODACStoredProcedure.SetStoredProcedureName(
+ const Name: string);
+begin
+ TOraStoredProc(Dataset).StoredProcName := Name;
+end;
+
+procedure TDAEODACStoredProcedure.SetParamValues(AParams: TDAParamCollection);
+begin
+ if (AParams.Count <> TOraStoredProc(Dataset).Params.Count) then TOraStoredProc(Dataset).PrepareSQL;
+ WriteODACParamValues(AParams, TOraStoredProc(Dataset).Params, TOraStoredProc(Dataset).Session);
+end;
+
+procedure TDAEODACStoredProcedure.GetParamValues(AParams: TDAParamCollection);
+begin
+ ReadODACParamValues(AParams, TOraStoredProc(Dataset).Params, TOraStoredProc(Dataset).Session)
+end;
+
+procedure TDAEODACStoredProcedure.RefreshParams;
+begin
+ TOraStoredProc(Dataset).PrepareSQL;
+ RefreshParamsStd(TOraStoredProc(Dataset).Params);
+end;
+
+function TDAEODACStoredProcedure.intVCLTypeToDAType(
+ aFieldType: TFieldType): TDADataType;
+begin
+ if ord(aFieldType) in [ftTimeStampTZ,ftTimeStampLTZ] then aFieldType:=ftTimeStamp;
+ Result:= inherited intVCLTypeToDAType(aFieldType);
+end;
+
+exports GetDriverObject name func_GetDriverObject;
+
+function TDAEODACStoredProcedure.DoExecute: integer;
+begin
+ with TOraStoredProc(Dataset) do begin
+ ExecProc;
+ result := RowsAffected;
+ end;
+end;
+
+initialization
+ _driver := nil;
+ RegisterDriverProc(GetDriverObject);
+
+finalization
+ UnregisterDriverProc(GetDriverObject);
+ FreeAndNIL(_driver);
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDAPostgresDACDriver.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDAPostgresDACDriver.pas
new file mode 100644
index 0000000..e37aa3e
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDAPostgresDACDriver.pas
@@ -0,0 +1,353 @@
+unit uDAPostgresDACDriver;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Driver Library
+{
+{ compiler: Delphi 6 and up, Kylix 3 and up
+{ platform: Win32, Linux
+{
+{ (c)opyright RemObjects Software. all rights reserved.
+{
+{ Using this code requires a valid license of the Data Abstract
+{ which can be obtained at http://www.remobjects.com.
+{----------------------------------------------------------------------------}
+
+{$I ..\DataAbstract.inc}
+
+{$R DataAbstract_PostgresDACDriver_Glyphs.res}
+
+interface
+
+uses DB, Classes, uDAEngine, uDAInterfaces, uDAADOInterfaces, uROClasses,
+ uROBinaryHelpers, uDAUtils, PSQLDbTables, uDAPostgresInterfaces;
+
+type { TDAPostgresDACDriver }
+ TDAPostgresDACDriver = class(TDADriverReference)
+ end;
+
+ { TDAEPostgresDACDriver }
+ TDAEPostgresDACDriver = class(TDAPostgresDriver)
+ private
+ protected
+ function GetConnectionClass: TDAEConnectionClass; override;
+
+ // IDADriver
+ function GetDriverID: string; override; safecall;
+ function GetDescription: string; override; safecall;
+ function GetAvailableDriverOptions: TDAAvailableDriverOptions; override; safecall;
+ end;
+
+ { TDAEMyConnection }
+ TDAEPostgresDACConnection = class(TDAEPostgresConnection)
+ private
+ function GetConnection: TPSQLDatabase;
+ protected
+ function CreateCustomConnection: TCustomConnection; override;
+
+ function GetDatasetClass: TDAEDatasetClass; override;
+ function GetStoredProcedureClass: TDAEStoredProcedureClass; override;
+
+ procedure DoApplyConnectionString(aConnStrParser: TDAConnectionStringParser;
+ aConnectionObject: TCustomConnection); override;
+
+ function DoBeginTransaction: integer; override;
+ procedure DoCommitTransaction; override;
+ procedure DoRollbackTransaction; override;
+ function DoGetInTransaction: boolean; override;
+ property Connection: TPSQLDatabase read GetConnection;
+ public
+ end;
+
+ { TDAEPostgresDACQuery }
+ TDAEPostgresDACQuery = class(TDAEDataset,IDAMustSetParams)
+ private
+
+ protected
+ function CreateDataset(aConnection: TDAEConnection): TDataset; override;
+ procedure ClearParams; override;
+ function DoExecute: integer; override;safecall;
+ function DoGetSQL: string; override;safecall;
+ procedure DoSetSQL(const Value: string); override;safecall;
+ procedure DoPrepare(Value: boolean); override;safecall;
+ procedure SetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ public
+ end;
+
+ { TDAEPostgresDACStoredProcedure }
+ TDAEPostgresDACStoredProcedure = class(TDAEStoredProcedure,IDAMustSetParams)
+ private
+ fConnection:TDAEConnection;
+ protected
+ function CreateDataset(aConnection: TDAEConnection): TDataset; override;
+ function GetStoredProcedureName: string; override; safecall;
+ procedure SetStoredProcedureName(const Name: string); override; safecall;
+ function DoExecute: integer; override;safecall;
+ function Execute: integer; override;safecall;
+ procedure SetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure RefreshParams; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ end;
+
+procedure Register;
+
+function GetDriverObject: IDADriver; stdcall;
+
+implementation
+
+uses
+ SysUtils,
+ uDADriverManager, uDARes;
+
+var
+ _driver: TDAEDriver = nil;
+
+procedure Register;
+begin
+ RegisterComponents(DAPalettePageName, [TDAPostgresDACDriver]);
+end;
+
+{$IFDEF DataAbstract_SchemaModelerOnly}
+{$INCLUDE ..\DataAbstract_SchemaModelerOnly.inc}
+{$ENDIF DataAbstract_SchemaModelerOnly}
+
+function GetDriverObject: IDADriver;
+begin
+ {$IFDEF DataAbstract_SchemaModelerOnly}
+ if not RunningInSchemaModeler then begin
+ result := nil;
+ exit;
+ end;
+ {$ENDIF}
+ if (_driver = nil) then _driver := TDAEPostgresDacDriver.Create(nil);
+ result := _driver;
+end;
+
+{$IFDEF LATEST_MyDAC}
+{$I uDACRLabsUtils.inc}
+{$ENDIF LATEST_MyDAC}
+
+{ TDAEPostgresDacConnection }
+
+function TDAEPostgresDacConnection.DoBeginTransaction: integer;
+begin
+ Connection.StartTransaction;
+ result := 0;
+end;
+
+procedure TDAEPostgresDacConnection.DoCommitTransaction;
+begin
+ Connection.Commit;
+end;
+
+function TDAEPostgresDacConnection.GetConnection: TPsqlDatabase;
+begin
+ result := TPsqlDatabase(inherited ConnectionObject);
+end;
+
+function TDAEPostgresDacConnection.CreateCustomConnection: TCustomConnection;
+begin
+ result := TPsqlDatabase.Create(nil);
+ TPsqlDatabase(result).LoginPrompt := false;
+end;
+
+function TDAEPostgresDacConnection.GetDatasetClass: TDAEDatasetClass;
+begin
+ result := TDAEPostgresDacQuery;
+end;
+
+function TDAEPostgresDacConnection.GetStoredProcedureClass: TDAEStoredProcedureClass;
+begin
+ result := TDAEPostgresDacStoredProcedure;
+end;
+
+procedure TDAEPostgresDacConnection.DoRollbackTransaction;
+begin
+ Connection.Rollback;
+end;
+
+function TDAEPostgresDacConnection.DoGetInTransaction: boolean;
+begin
+ result := Connection.InTransaction
+end;
+
+
+procedure TDAEPostgresDacConnection.DoApplyConnectionString(
+ aConnStrParser: TDAConnectionStringParser; aConnectionObject: TCustomConnection);
+var
+ i: Integer;
+begin
+ inherited;
+
+ with aConnStrParser do begin
+ Connection.DatabaseName := Database;
+
+ Connection.Host := Server;
+
+ if (Self.UserID <> '') then
+ Connection.Username := Self.UserID
+ else
+ Connection.Username := UserID;
+
+ if (Self.Password <> '') then
+ Connection.UserPassword := Self.Password
+ else
+ Connection.UserPassword := Password;
+
+ for i := 0 to AuxParamsCount -1 do
+ begin
+ if AuxParams[AuxParamNames[i]] <> '' then
+ Connection.Params.Add(AuxParamNames[i]+'='+AuxParams[AuxParamNames[i]]);
+ end;
+ end;
+end;
+
+
+{ TDAEPostgresDacDriver }
+
+function TDAEPostgresDacDriver.GetAvailableDriverOptions: TDAAvailableDriverOptions;
+begin
+ Result := [doServerName, doDatabaseName, doLogin, doCustom];
+end;
+
+function TDAEPostgresDacDriver.GetConnectionClass: TDAEConnectionClass;
+begin
+ result := TDAEPostgresDacConnection;
+end;
+
+function TDAEPostgresDacDriver.GetDescription: string;
+begin
+ result := 'MicroOlap DAC for Postgres Driver'{$IFDEF DataAbstract_SchemaModelerOnly} + SchemaModelerOnly{$ENDIF};
+end;
+
+function TDAEPostgresDacDriver.GetDriverID: string;
+begin
+ result := 'PostgresDAC';
+end;
+
+
+{ TDAEPostgresDacQuery }
+
+procedure TDAEPostgresDACQuery.ClearParams;
+begin
+ inherited;
+ TPSQLQuery(Dataset).Params.Clear;
+end;
+
+function TDAEPostgresDacQuery.CreateDataset(aConnection: TDAEConnection): TDataset;
+begin
+ result := TPSQLQuery.Create(nil);
+ TPSQLQuery(result).UniDirectional := True;
+ TPSQLQuery(result).RequestLive := false;
+ TPSQLQuery(result).Database := TDAEPostgresDacConnection(aConnection).Connection;
+end;
+
+function TDAEPostgresDacQuery.DoExecute: integer;
+begin
+ TPSQLQuery(Dataset).ExecSQL;
+ result := TPSQLQuery(Dataset).RowsAffected;
+end;
+
+function TDAEPostgresDacQuery.DoGetSQL: string;
+begin
+ result := TPSQLQuery(Dataset).SQL.Text;
+end;
+
+procedure TDAEPostgresDacQuery.DoPrepare(Value: boolean);
+begin
+ TPSQLQuery(Dataset).Prepared := Value;
+end;
+
+procedure TDAEPostgresDacQuery.DoSetSQL(const Value: string);
+begin
+ TPSQLQuery(Dataset).SQL.Text := Value;
+end;
+
+procedure TDAEPostgresDACQuery.GetParamValues(AParams: TDAParamCollection);
+begin
+ GetParamValuesStd(AParams, TPSQLQuery(Dataset).Params);
+end;
+
+procedure TDAEPostgresDACQuery.SetParamValues(AParams: TDAParamCollection);
+begin
+ SetParamValuesStd(AParams, TPSQLQuery(Dataset).Params);
+end;
+
+
+{ TDAEADOStoredProcedure }
+
+function TDAEPostgresDacStoredProcedure.CreateDataset(
+ aConnection: TDAEConnection): TDataset;
+begin
+ fConnection := aConnection;
+ result := TPSQLStoredProc.Create(nil);
+ TPSQLStoredProc(result).Database := TDAEPostgresDacConnection(aConnection).Connection;
+end;
+
+function TDAEPostgresDACStoredProcedure.DoExecute: integer;
+begin
+ TPSQLStoredProc(Dataset).ExecProc;
+ result := -1;
+end;
+
+function TDAEPostgresDacStoredProcedure.Execute: integer;
+var
+ i: integer;
+ _params: TDAParamCollection;
+begin
+ _params := GetParams;
+
+ with TPSQLStoredProc(Dataset) do begin
+ for i := 0 to (ParamCount-1) do
+ if (Params[i].ParamType in [ptInput, ptInputOutput]) then
+ Params[i].Value := _params.ParamByName(Params[i].Name).Value;
+
+ result := DoExecute;
+
+ for i := 0 to (ParamCount-1) do
+ if (Params[i].ParamType in [ptOutput, ptInputOutput, ptResult]) then
+ _params.ParamByName(Params[i].Name).Value := Params[i].Value;
+ end;
+end;
+
+procedure TDAEPostgresDACStoredProcedure.GetParamValues(
+ AParams: TDAParamCollection);
+begin
+ GetParamValuesStd(AParams,TPSQLStoredProc(Dataset).Params);
+end;
+
+function TDAEPostgresDacStoredProcedure.GetStoredProcedureName: string;
+begin
+ Result := TPSQLStoredProc(Dataset).StoredProcName;
+end;
+
+procedure TDAEPostgresDACStoredProcedure.RefreshParams;
+begin
+ RefreshParamsStd(TPSQLStoredProc(Dataset).Params);
+end;
+
+procedure TDAEPostgresDACStoredProcedure.SetParamValues(
+ AParams: TDAParamCollection);
+begin
+ SetParamValuesStd(AParams,TPSQLStoredProc(Dataset).Params);
+end;
+
+procedure TDAEPostgresDacStoredProcedure.SetStoredProcedureName(
+ const Name: string);
+begin
+ TPSQLStoredProc(Dataset).StoredProcName := Name;
+end;
+
+exports GetDriverObject name func_GetDriverObject;
+
+
+initialization
+ _driver := nil;
+ RegisterDriverProc(GetDriverObject);
+
+finalization
+ UnregisterDriverProc(GetDriverObject);
+ FreeAndNIL(_driver);
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDASDACDriver.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDASDACDriver.pas
new file mode 100644
index 0000000..9a6787d
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDASDACDriver.pas
@@ -0,0 +1,585 @@
+unit uDASDACDriver;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Driver Library
+{
+{ compiler: Delphi 6 and up
+{ platform: Win32
+{
+{ (c)opyright RemObjects Software. all rights reserved.
+{
+{ Using this code requires a valid license of the Data Abstract
+{ which can be obtained at http://www.remobjects.com.
+{----------------------------------------------------------------------------}
+
+{$I ..\DataAbstract.inc}
+
+{$R DataAbstract_SDACDriver_Glyphs.res}
+
+interface
+
+uses
+ DB, Classes, uDAEngine, uDAInterfaces, uDAADOInterfaces, uROClasses,
+ DBAccess, MSAccess, DASQLMonitor,
+ MSSQLMonitor, Variants, uDAUtils;
+
+type { TDASDACDriver }
+ TDASDACDriver = class(TDADriverReference)
+ end;
+
+ { TDAEADODriver }
+ TDAEADODriver = class(TDAMSSQLDriver)
+ private
+ fMonitor: TMSSQLMonitor;
+ fTraceCallBack: TDALogTraceEvent;
+
+ procedure OnSDACTrace(Sender: TObject; Text: string; Flag: TDATraceFlag);
+
+ protected
+ function GetConnectionClass: TDAEConnectionClass; override;
+ procedure DoSetTraceOptions(TraceActive: boolean; TraceOptions: TDATraceOptions; Callback: TDALogTraceEvent); override;
+
+ // IDADriver
+ function GetDriverID: string; override;
+ function GetDescription: string; override;
+ function GetAvailableDriverOptions: TDAAvailableDriverOptions; override; safecall;
+ function GetDefaultCustomParameters: String; override; safecall;
+ procedure GetAuxParams(const AuxDriver: string; out List: IROStrings); override;
+ end;
+
+ { TDAEMSConnection }
+ TDAEMSConnection = class(TDAMSConnection, IDAADOConnection, IDACanQueryDatabaseNames)
+ private
+ fMSConnection: TMSConnection;
+
+// procedure GetSysObjects(const aCondition: string; aList: TStrings);
+
+ protected
+ function CreateCustomConnection: TCustomConnection; override;
+
+ function GetDatasetClass: TDAEDatasetClass; override;
+ function GetStoredProcedureClass: TDAEStoredProcedureClass; override;
+
+ procedure DoApplyConnectionString(aConnStrParser: TDAConnectionStringParser;
+ aConnectionObject: TCustomConnection); override;
+
+ function DoBeginTransaction: integer; override;
+ procedure DoCommitTransaction; override;
+ procedure DoRollbackTransaction; override;
+ function DoGetInTransaction: boolean; override;
+ //procedure DoGetStoredProcedureParams(const aStoredProcedureName : string; out Params : TDAParamCollection); //override;
+ // IADOConnection
+ function GetProviderName: string; safecall;
+ function GetProviderType: TDAOleDBProviderType; safecall;
+ function GetCommandTimeout: Integer; safecall;
+ procedure SetCommandTimeout(const Value: Integer); safecall;
+ end;
+
+ { TDAEMSQuery }
+ TDAEMSQuery = class(TDAEDataset, IDAMustSetParams)
+ private
+
+ protected
+ function CreateDataset(aConnection: TDAEConnection): TDataset; override;
+ procedure ClearParams; override;
+ function DoExecute: integer; override;
+ function DoGetSQL: string; override;
+ procedure DoSetSQL(const Value: string); override;
+ procedure DoPrepare(Value: boolean); override;
+
+ // IDAMustSetParams
+ procedure SetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ public
+ end;
+
+ { TDAEADOStoredProcedure }
+ TDAEADOStoredProcedure = class(TDAEStoredProcedure, IDAMustSetParams)
+ protected
+ function CreateDataset(aConnection: TDAEConnection): TDataset; override;
+
+ function GetStoredProcedureName: string; override;
+ procedure SetStoredProcedureName(const Name: string); override;
+ function DoExecute: integer; override;
+ function Execute: integer; override;
+ procedure RefreshParams; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ // IDAMustSetParams
+ procedure SetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ end;
+
+procedure Register;
+
+function GetDriverObject: IDADriver; stdcall;
+
+implementation
+
+uses
+ SysUtils,
+ uDADriverManager, uDARes, OLEDBAccess,
+ uROBinaryHelpers;
+
+var
+ _driver: TDAEDriver = nil;
+
+procedure Register;
+begin
+ RegisterComponents(DAPalettePageName, [TDASDACDriver]);
+end;
+
+{$IFDEF DataAbstract_SchemaModelerOnly}
+{$INCLUDE ..\DataAbstract_SchemaModelerOnly.inc}
+{$ENDIF DataAbstract_SchemaModelerOnly}
+
+function GetDriverObject: IDADriver;
+begin
+ {$IFDEF DataAbstract_SchemaModelerOnly}
+ if not RunningInSchemaModeler then begin
+ result := nil;
+ exit;
+ end;
+ {$ENDIF}
+ if (_driver = nil) then _driver := TDAEADODriver.Create(nil);
+ result := _driver;
+end;
+
+{$I uDACRLabsUtils.inc}
+
+{ TDAEMSConnection }
+
+procedure TDAEMSConnection.DoApplyConnectionString(
+ aConnStrParser: TDAConnectionStringParser; aConnectionObject: TCustomConnection);
+var
+ adoconn: string;
+ i: integer;
+begin
+ inherited;
+
+ with aConnStrParser do begin
+ adoconn := Format(stdMSSQL_ConnectionString, [UserID, Password, Database, Server]);
+ adoconn := '';
+ if UserId <> '' then begin
+ if adoconn = '' then
+ AdoConn := 'User ID='+UserID
+ else
+ AdoConn := ADoConn + ';User ID='+UserID;
+ end;
+ if Password <> '' then begin
+ if adoconn = '' then
+ AdoConn := 'Password='+Password
+ else
+ AdoConn := ADoConn + ';Password='+Password;
+ end;
+ if DataBase <> '' then begin
+ if adoconn = '' then
+ AdoConn := 'Initial Catalog='+Database
+ else
+ AdoConn := ADoConn + ';Initial Catalog='+Database;
+ end;
+ if Server <> '' then begin
+ if adoconn = '' then
+ AdoConn := 'Data Source='+Server
+ else
+ AdoConn := ADoConn + ';Data Source='+Server;
+ end;
+
+ AdoConn := ADoConn + ';';
+ MSSQLSchemaEnabled := True; // by default
+ for i := 0 to AuxParamsCount -1 do
+ begin
+ if Uppercase(AuxParamNames[i]) = 'SCHEMAS' then
+ MSSQLSchemaEnabled := AuxParams['Schemas'] = '1'
+ else
+ adoconn := adoconn + AuxParamNames[i] + '=' + AuxParams[AuxParamNames[i]]+';';
+ end;
+
+ fMSConnection.ConnectString := adoconn;
+
+ if (Self.UserID <> '') then fMSConnection.Username := Self.UserID;
+
+ if (Self.Password <> '') then fMSConnection.Password := Self.Password;
+ end;
+end;
+
+function TDAEMSConnection.DoBeginTransaction: integer;
+begin
+ fMSConnection.StartTransaction;
+ result := 0;
+end;
+
+procedure TDAEMSConnection.DoCommitTransaction;
+begin
+ fMSConnection.Commit;
+end;
+
+function TDAEMSConnection.CreateCustomConnection: TCustomConnection;
+begin
+ fMSConnection := TMSConnection.Create(nil);
+ fMSConnection.LoginPrompt := FALSE;
+
+ result := fMSConnection;
+end;
+
+function TDAEMSConnection.GetDatasetClass: TDAEDatasetClass;
+begin
+ result := TDAEMSQuery;
+end;
+
+function TDAEMSConnection.GetStoredProcedureClass: TDAEStoredProcedureClass;
+begin
+ result := TDAEADOStoredProcedure;
+end;
+
+(*function SqlServerToDAType(aType:integer):TDADataType;
+begin
+ case aType of
+ 34:result := datBlob;
+ 35:result := datMemo;
+ 36:result := datString; //uniqueidentifier
+ 48:result := datInteger;
+ 52:result := datInteger;
+ 56:result := datInteger;
+ 58:result := datDateTime;
+ 59:result := datFloat;
+ 60:result := datCurrency;
+ 61:result := datDateTime;
+ 62:result := datFloat;
+ //98 sql_variant
+ 99:result := datMemo;// ntext
+ 104:result := datBoolean;
+ 106:result := datFloat;
+ 108:result := datFloat;
+ 122:result := datCurrency;
+ 127:result := datInteger;
+ 165:result := datBlob; // varbinary
+ 167:result := datString;
+ 173:result := datBlob; // binary
+ 175:result := datString; // char
+ 189:result := datBlob; // timestamp
+ 231:result := datString; // nvarchar
+ 239:result := datString; //nchar
+ 240:result := datDateTime;
+ 241:result := datBlob;// xml
+ else result := datUnknown;
+ end;
+end;
+
+procedure TDAEMSConnection.DoGetStoredProcedureParams(const aStoredProcedureName: string; out Params: TDAParamCollection);
+var
+ ds : TMSQuery;
+ lID:string;
+begin
+ ds := TMSQuery.Create(NIL);
+ try
+
+ ds.Connection := fMSConnection;
+ ds.SQL.Text := 'select * from sysobjects where xtype=''P'' and name='''+aStoredProcedureName+'''';
+ ds.Open;
+ try
+ if ds.EOF then RaiseError('Stored Procedure %s not found in database',[aStoredProcedureName]);
+ lID := ds.FieldbyName('id').AsString;
+ finally
+ ds.Close();
+ end;
+
+ ds.SQL.Text := 'select * from sys.parameters where object_id='''+lID+''' ORDER BY parameter_id';
+ ds.Open;
+ try
+ Params := TDAParamCollection.Create(nil);
+ while not ds.Eof do begin
+ with Params.Add() do begin
+ Name := ds.FieldByName('name').AsString;
+
+ DataType := SqlServerToDAType(ds.FieldByName('system_type_id').AsInteger);
+ Size := ds.FieldByName('max_length').AsInteger;
+
+ {if ds.FieldByName('has_default_value').AsBoolean then
+ DefaultValue := ds.FieldByName('default_Value').AsInteger;}
+
+ if ds.FieldByName('is_output').AsBoolean then
+ ParamType := daptOutput
+ else
+ ParamType := daptInput;
+
+ end;
+ ds.Next();
+ end;
+ finally
+ Close();
+ end;
+
+ finally
+ ds.Free;
+ end;
+end;*)
+
+procedure TDAEMSConnection.DoRollbackTransaction;
+begin
+ fMSConnection.Rollback;
+end;
+
+function TDAEMSConnection.DoGetInTransaction: boolean;
+begin
+ result := fMSConnection.InTransaction
+end;
+
+function TDAEMSConnection.GetProviderName: string;
+begin
+ result := oledb_MSSQLId;
+end;
+
+function TDAEMSConnection.GetProviderType: TDAOleDBProviderType;
+begin
+ result := oledb_MSSQL;
+end;
+
+function TDAEMSConnection.GetCommandTimeout: Integer;
+begin
+ if fMSConnection <> nil then
+ Result := fMSConnection.ConnectionTimeout
+ else
+ Result:=0;
+end;
+
+procedure TDAEMSConnection.SetCommandTimeout(const Value: Integer);
+begin
+ if fMSConnection <> nil then
+ fMSConnection.ConnectionTimeout := Value;
+end;
+
+{ TDAEADODriver }
+
+function TDAEADODriver.GetConnectionClass: TDAEConnectionClass;
+begin
+ result := TDAEMSConnection;
+end;
+
+function TDAEADODriver.GetDescription: string;
+begin
+ result := 'Core Lab SDAC Driver'{$IFDEF DataAbstract_SchemaModelerOnly} + SchemaModelerOnly{$ENDIF};
+end;
+
+function TDAEADODriver.GetDriverID: string;
+begin
+ result := 'SDAC';
+end;
+
+procedure TDAEADODriver.OnSDACTrace(Sender: TObject; Text: string; Flag: TDATraceFlag);
+begin
+ if Assigned(fTraceCallback) then fTraceCallback(Sender, Text, integer(Flag));
+end;
+
+procedure TDAEADODriver.DoSetTraceOptions(TraceActive: boolean; TraceOptions: TDATraceOptions; Callback: TDALogTraceEvent);
+var
+ sdacopts: TDATraceFlags;
+begin
+ inherited;
+
+ if TraceActive then begin
+ if (fMonitor = nil) then fMonitor := TMSSQLMonitor.Create(Self);
+
+ fMonitor.Active := FALSE;
+ fMonitor.OnSQL := OnSDACTrace;
+
+ sdacopts := [];
+ if (toPrepare in TraceOptions) then sdacopts := sdacopts + [tfQPrepare];
+ if (toExecute in TraceOptions) then sdacopts := sdacopts + [tfQExecute];
+ if (toFetch in TraceOptions) then sdacopts := sdacopts + [tfQFetch];
+ if (toError in TraceOptions) then sdacopts := sdacopts + [tfError];
+ if (toStmt in TraceOptions) then sdacopts := sdacopts + [tfStmt];
+ if (toConnect in TraceOptions) then sdacopts := sdacopts + [tfConnect];
+ if (toTransact in TraceOptions) then sdacopts := sdacopts + [tfTransact];
+ if (toBlob in TraceOptions) then sdacopts := sdacopts + [tfBlob];
+ if (toService in TraceOptions) then sdacopts := sdacopts + [tfService];
+ if (toMisc in TraceOptions) then sdacopts := sdacopts + [tfMisc];
+ if (toParams in TraceOptions) then sdacopts := sdacopts + [tfParams];
+
+ fTraceCallBack := Callback;
+
+ fMonitor.TraceFlags := sdacopts;
+ fMonitor.Active := TRUE;
+ end
+ else begin
+ FreeAndNIL(fMonitor);
+ fTraceCallback := nil;
+ end;
+end;
+
+function TDAEADODriver.GetAvailableDriverOptions: TDAAvailableDriverOptions;
+begin
+ result := [doServerName, doDatabaseName, doLogin, doCustom];
+end;
+
+function TDAEADODriver.GetDefaultCustomParameters: String;
+begin
+ Result := 'Schemas=1;Integrated Security=SSPI';
+end;
+
+
+
+procedure TDAEADODriver.GetAuxParams(const AuxDriver: string;
+ out List: IROStrings);
+begin
+ inherited;
+ MSSQL_GetAuxParams(List);
+end;
+
+{ TDAEMSQuery }
+
+procedure TDAEMSQuery.ClearParams;
+begin
+ inherited;
+ TMSQuery(Dataset).Params.Clear;
+end;
+
+function TDAEMSQuery.CreateDataset(aConnection: TDAEConnection): TDataset;
+begin
+ result := TMSQuery.Create(nil);
+
+ TMSQuery(result).FetchAll := True; //for preventing creating an additional session when you call StartTransaction (an known issue of OLEDB)
+ TMSQuery(result).Unidirectional := True;
+ TMSQuery(result).ReadOnly := TRUE;
+ TMSQuery(result).Connection := TDAEMSConnection(aConnection).fMSConnection;
+// TMSQuery(result).Options.AutoPrepare:=True;
+end;
+
+function TDAEMSQuery.DoExecute: integer;
+begin
+ TMSQuery(Dataset).Execute;
+ result := TMSQuery(Dataset).RowsAffected;
+end;
+
+function TDAEMSQuery.DoGetSQL: string;
+begin
+ result := TMSQuery(Dataset).SQL.Text;
+end;
+
+procedure TDAEMSQuery.DoPrepare(Value: boolean);
+var
+ i: integer;
+ par: TMSParam;
+begin
+ if Value and not TMSQuery(Dataset).Prepared and (TMSQuery(Dataset).ParamCount<>0) then begin
+ for I := 0 to GetParams.Count - 1 do begin
+ par:=TMSQuery(Dataset).ParamByName(GetParams[i].Name);
+ par.DataType:= DATypeToVCLType(GetParams[i].DataType);
+ if par.DataType = ftAutoInc then par.DataType:= ftInteger;
+ end;
+ end;
+ TMSQuery(Dataset).Prepared := Value;
+end;
+
+procedure TDAEMSQuery.DoSetSQL(const Value: string);
+begin
+ TMSQuery(Dataset).SQL.Text := Value;
+end;
+
+procedure TDAEMSQuery.GetParamValues(AParams: TDAParamCollection);
+var
+ I: Integer;
+ lParam: TMSParam;
+begin
+ for i := 0 to TMSQuery(DataSet).Params.Count - 1 do begin
+ lParam:=TMSQuery(DataSet).Params[i];
+ if (lParam.ParamType in [ptOutput, ptInputOutput, ptResult]) then
+ Aparams.ParamByName(lParam.Name).Value := lParam.Value;
+ end;
+end;
+
+procedure TDAEMSQuery.SetParamValues(AParams: TDAParamCollection);
+begin
+ WriteCrLabsParamValues(AParams, TMSQuery(Dataset).Params, true);
+end;
+
+{ TDAEADOStoredProcedure }
+
+function TDAEADOStoredProcedure.CreateDataset(
+ aConnection: TDAEConnection): TDataset;
+begin
+ result := TMSStoredProc.Create(nil);
+ TMSStoredProc(result).Connection := TDAEMSConnection(aConnection).fMSConnection;
+end;
+
+function TDAEADOStoredProcedure.Execute: integer;
+var
+ i: integer;
+ _params: TDAParamCollection;
+ lParam: uDAInterfaces.TDAParam;
+begin
+ _params := GetParams;
+
+ with TMSStoredProc(Dataset) do begin
+ for i := 0 to (Params.Count - 1) do
+ if (Params[i].ParamType in [ptInput, ptInputOutput]) then begin
+ lParam := _params.ParamByName(Params[i].Name);
+ if (Params[i].DataType in [ftMemo, ftBlob, ftGraphic]) and VarIsArray(lParam.Value)then
+ Params[i].Value := VariantBinaryToString(lParam.Value)
+ else
+ Params[i].Value := lParam.Value;
+ end;
+
+ result := DoExecute;
+
+ for i := 0 to (_params.Count-1) do
+ if (_params[i].ParamType in [daptOutput, daptInputOutput, daptResult])
+ then _params[i].Value := params.ParamByName(_params[i].Name).Value;
+ end;
+end;
+
+procedure TDAEADOStoredProcedure.GetParamValues(AParams: TDAParamCollection);
+var
+ i: Integer;
+ lParam: TMSParam;
+begin
+ for i := 0 to TMSStoredProc(DataSet).Params.Count - 1 do begin
+ lParam:=TMSStoredProc(DataSet).Params[i];
+ if (lParam.ParamType in [ptOutput, ptInputOutput, ptResult]) then
+ Aparams.ParamByName(lParam.Name).Value := lParam.Value;
+ end;
+end;
+
+
+function TDAEADOStoredProcedure.GetStoredProcedureName: string;
+begin
+ result := TMSStoredProc(Dataset).StoredProcName;
+end;
+
+procedure TDAEADOStoredProcedure.SetStoredProcedureName(
+ const Name: string);
+begin
+ TMSStoredProc(Dataset).StoredProcName := Name;
+end;
+
+procedure TDAEADOStoredProcedure.SetParamValues(AParams: TDAParamCollection);
+begin
+ WriteCrLabsParamValues(AParams, TMSStoredProc(Dataset).Params);
+end;
+
+
+exports
+ GetDriverObject name func_GetDriverObject;
+
+procedure TDAEADOStoredProcedure.RefreshParams;
+begin
+ RefreshParamsStd(TMSStoredProc(Dataset).Params);
+end;
+
+function TDAEADOStoredProcedure.DoExecute: integer;
+begin
+ with TMSStoredProc(Dataset) do begin
+ ExecProc;
+ result := RowsAffected;
+ end;
+end;
+
+initialization
+ _driver := nil;
+ RegisterDriverProc(GetDriverObject);
+
+finalization
+ UnregisterDriverProc(GetDriverObject);
+ FreeAndNIL(_driver);
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDASQLiteDriver.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDASQLiteDriver.pas
new file mode 100644
index 0000000..d507516
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDASQLiteDriver.pas
@@ -0,0 +1,374 @@
+unit uDASQLiteDriver;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Driver Library
+{
+{ compiler: Delphi 6 and up, Kylix 3 and up
+{ platform: Win32, Linux
+{
+{ (c)opyright RemObjects Software. all rights reserved.
+{
+{ Using this code requires a valid license of the Data Abstract
+{ which can be obtained at http://www.remobjects.com.
+{----------------------------------------------------------------------------}
+
+{$IFDEF MSWINDOWS}
+{$I ..\DataAbstract.inc}
+{$ENDIF MSWINDOWS}
+{$IFDEF LINUX}
+{$I ../DataAbstract.inc}
+{$ENDIF LINUX}
+
+{$R DataAbstract_SQLiteDriver_Glyphs.res}
+
+interface
+
+uses Windows, Classes, DB, uDAEngine, uDAInterfaces, uROClasses, uDAUtils, ASGSQLite3, uDASQLiteInterfaces;
+
+type
+ { TDASQLiteDriver }
+ TDASQLiteDriver = class(TDADriverReference)
+ end;
+
+ { TDAESQLiteDriver }
+ TDAESQLiteDriver = class(uDASQLiteInterfaces.TDASQLiteDriver, IDADriver40)
+ protected
+ function GetConnectionClass: TDAEConnectionClass; override;
+
+ // IDADriver
+ function GetDriverID: string; override;
+ function GetDescription: string; override;
+
+ procedure GetAuxParams(const AuxDriver: string; out List: IROStrings); override;
+
+ function GetAvailableDriverOptions: TDAAvailableDriverOptions; override;
+ // IDADriver40
+ function GetProviderDefaultCustomParameters(Provider: string): string; safecall;
+ public
+ end;
+
+ // for access to protected methods
+ TDAASQLite3DB = class(TASQLite3DB)
+ private
+ public
+ function GetLastInsertRow: integer;
+ end;
+
+ { TSQLiteConnection }
+ TSQLiteConnection = class(TDAConnectionWrapper)
+ private
+ fConnection: TDAASQLite3DB;
+ protected
+ function GetConnected: Boolean; override;
+ procedure SetConnected(Value: Boolean); override;
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ property Connection: TDAASQLite3DB read fConnection;
+ end;
+
+ { TDAESQLiteConnection }
+ TDAESQLiteConnection = class(TDASQLiteConnection)
+ private
+ FtransactionFlag: Boolean;
+ fConnection: TSQLiteConnection;
+ protected
+ // TDAEConnection
+ function CreateCustomConnection: TCustomConnection; override;
+ function GetDatasetClass: TDAEDatasetClass; override;
+ procedure DoApplyConnectionString(aConnStrParser: TDAConnectionStringParser; aConnectionObject: TCustomConnection); override;
+ function DoBeginTransaction: integer; override;
+ procedure DoCommitTransaction; override;
+ procedure DoRollbackTransaction; override;
+ function DoGetInTransaction: boolean; override;
+ function DoGetLastAutoInc(const GeneratorName: string): integer; override;
+ procedure DoGetForeignKeys(out ForeignKeys: TDADriverForeignKeyCollection); override;
+ procedure DoGetTableFields(const aTableName: string; out Fields: TDAFieldCollection); override;
+
+ function IdentifierNeedsQuoting(const iIdentifier: string): boolean; override; safecall;
+ public
+ constructor Create(aDriver: TDAEDriver; aName: string = ''); override;
+ end;
+
+ { TDAESQLiteQuery }
+ TDAESQLiteQuery = class(TDAEDataset,IDAMustSetParams)
+ private
+ protected
+ procedure ClearParams; override;
+ function CreateDataset(aConnection: TDAEConnection): TDataset; override;
+ procedure DoPrepare(Value: boolean); override; safecall;
+ function DoExecute: integer; override;
+ function DoGetSQL: string; override;
+ procedure DoSetSQL(const Value: string); override;
+ procedure SetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ end;
+
+procedure Register;
+
+function GetDriverObject: IDADriver; stdcall;
+
+implementation
+
+uses SysUtils, uDADriverManager, uDARes, Variants,
+ uROBinaryHelpers, uDASQL92Interfaces;
+
+var
+ _driver: TDAEDriver = nil;
+
+procedure Register;
+begin
+ RegisterComponents(DAPalettePageName, [TDASQLiteDriver]);
+end;
+
+{$IFDEF DataAbstract_SchemaModelerOnly}
+{$INCLUDE ..\DataAbstract_SchemaModelerOnly.inc}
+{$ENDIF DataAbstract_SchemaModelerOnly}
+
+function GetDriverObject: IDADriver;
+begin
+ if (_driver = nil) then _driver := TDAESQLiteDriver.Create(nil);
+ result := _driver;
+end;
+
+{ TSQLiteConnection }
+
+constructor TSQLiteConnection.Create(AOwner: TComponent);
+begin
+ inherited;
+ fConnection := TDAASQLite3DB.Create(nil);
+end;
+
+destructor TSQLiteConnection.Destroy;
+begin
+ inherited;
+ fConnection.Free;
+end;
+
+function TSQLiteConnection.GetConnected: Boolean;
+begin
+ result := fConnection.Connected;
+end;
+
+procedure TSQLiteConnection.SetConnected(Value: Boolean);
+begin
+ fConnection.Connected := Value;
+end;
+
+{ TDAESQLiteConnection }
+
+procedure TDAESQLiteConnection.DoApplyConnectionString(
+ aConnStrParser: TDAConnectionStringParser; aConnectionObject: TCustomConnection);
+var
+ sName, sValue: string;
+ i: integer;
+begin
+ inherited;
+ with aConnStrParser do begin
+ TSQLiteConnection(aConnectionObject).Connection.Database := Database;
+ for i := 0 to (AuxParamsCount - 1) do begin
+ sName := AuxParamNames[i];
+ sValue := AuxParams[sName];
+ if AnsiSameText(sName, 'TransactionType') then begin
+ if AnsiSameText(sValue, 'DEFAULT') or
+ AnsiSameText(sValue, 'DEFERRED') or
+ AnsiSameText(sValue, 'IMMEDIATE') or
+ AnsiSameText(sValue, 'EXCLUSIVE') then
+ fConnection.fConnection.TransactionType := AnsiUpperCase(sValue);
+ end
+ else if AnsiSameText(sName, 'DriverDll') then begin
+ fConnection.fConnection.DriverDll := sValue
+ end
+ else if AnsiSameText(sName, 'CharacterEncoding') then begin
+ if AnsiSameText(sValue, 'STANDARD') or
+ AnsiSameText(sValue, 'UTF8') then
+ fConnection.fConnection.CharacterEncoding := AnsiUpperCase(sValue);
+ end;
+ end;
+ end;
+end;
+
+function TDAESQLiteConnection.DoBeginTransaction: integer;
+begin
+ result := -1;
+ fConnection.Connection.StartTransaction;
+ FtransactionFlag := True;
+end;
+
+procedure TDAESQLiteConnection.DoCommitTransaction;
+begin
+ fConnection.Connection.Commit;
+ FtransactionFlag := False;
+end;
+
+function TDAESQLiteConnection.CreateCustomConnection: TCustomConnection;
+begin
+ fConnection := TSQLiteConnection.Create(nil);
+ result := fConnection;
+end;
+
+function TDAESQLiteConnection.GetDatasetClass: TDAEDatasetClass;
+begin
+ result := TDAESQLiteQuery;
+end;
+
+procedure TDAESQLiteConnection.DoRollbackTransaction;
+begin
+ FtransactionFlag := False;
+ fConnection.Connection.RollBack;
+end;
+
+function TDAESQLiteConnection.DoGetInTransaction: boolean;
+begin
+ Result := FtransactionFlag;
+end;
+
+procedure TDAESQLiteConnection.DoGetTableFields(const aTableName: string;
+ out Fields: TDAFieldCollection);
+var
+ List: TList;
+ i: integer;
+ fld: TDAField;
+begin
+ inherited DoGetTableFields(QuoteIdentifierIfNeeded(aTableName), Fields);
+ List := TList.Create;
+ try
+ fConnection.Connection.GetTableInfo(aTableName, List);
+ for i := 0 to List.Count - 1 do
+ with TASQLite3Field(List[i]) do begin
+ fld := Fields.FieldByName(FieldName);
+ fld.Required := FieldNN <> 0;
+ fld.InPrimaryKey := FieldPK <> 0;
+ if fld.InPrimaryKey then fld.Required := True;
+ fld.DefaultValue := FieldDefault;
+ end;
+ finally
+ List.Free;
+ end;
+end;
+
+function TDAESQLiteConnection.IdentifierNeedsQuoting(
+ const iIdentifier: string): boolean;
+begin
+ Result := inherited IdentifierNeedsQuoting(iIdentifier) or
+ SQL92_IdentifierNeedsQuoting(iIdentifier);
+end;
+
+constructor TDAESQLiteConnection.Create(aDriver: TDAEDriver;
+ aName: string);
+begin
+ inherited;
+ FtransactionFlag := False;
+end;
+
+function TDAESQLiteConnection.DoGetLastAutoInc(
+ const GeneratorName: string): integer;
+begin
+ Result := fConnection.Connection.GetLastInsertRow;
+end;
+
+procedure TDAESQLiteConnection.DoGetForeignKeys(
+ out ForeignKeys: TDADriverForeignKeyCollection);
+begin
+ inherited;
+ // SQL Features That SQLite Does Not Implement
+end;
+
+{ TDAESQLiteDriver }
+
+function TDAESQLiteDriver.GetAvailableDriverOptions: TDAAvailableDriverOptions;
+begin
+ result := [doDatabaseName, doCustom];
+end;
+
+function TDAESQLiteDriver.GetConnectionClass: TDAEConnectionClass;
+begin
+ result := TDAESQLiteConnection;
+end;
+
+function TDAESQLiteDriver.GetDescription: string;
+begin
+ result := 'SQLite Driver';
+end;
+
+function TDAESQLiteDriver.GetDriverID: string;
+begin
+ result := 'SQLite';
+end;
+
+procedure TDAESQLiteDriver.GetAuxParams(const AuxDriver: string;
+ out List: IROStrings);
+begin
+ inherited;
+ List.Add('TransactionType=(DEFAULT,DEFERRED,IMMEDIATE,EXCLUSIVE)');
+ List.Add('DriverDll=SQLite3.dll');
+ List.Add('CharacterEncoding=(STANDARD,UTF8)');
+end;
+
+function TDAESQLiteDriver.GetProviderDefaultCustomParameters(
+ Provider: string): string;
+begin
+ Result := '';
+end;
+
+{ TDAESQLiteQuery }
+
+procedure TDAESQLiteQuery.ClearParams;
+begin
+ inherited;
+ TASQLite3Query(Dataset).Params.Clear;
+end;
+
+function TDAESQLiteQuery.CreateDataset(aConnection: TDAEConnection): TDataset;
+begin
+ result := TASQLite3Query.Create(nil);
+ TASQLite3Query(result).Connection := TDAESQLiteConnection(aConnection).fConnection.Connection;
+end;
+
+function TDAESQLiteQuery.DoExecute: integer;
+begin
+ Result := -1;
+ TASQLite3Query(Dataset).ExecSQL;
+end;
+
+function TDAESQLiteQuery.DoGetSQL: string;
+begin
+ result := TASQLite3Query(Dataset).SQL.Text;
+end;
+
+procedure TDAESQLiteQuery.DoPrepare(Value: boolean);
+begin
+ // nothing
+end;
+
+procedure TDAESQLiteQuery.DoSetSQL(const Value: string);
+begin
+ TASQLite3Query(Dataset).SQL.Text := Value;
+end;
+
+procedure TDAESQLiteQuery.GetParamValues(AParams: TDAParamCollection);
+begin
+ GetParamValuesStd(AParams, TASQLite3Query(Dataset).Params);
+end;
+
+procedure TDAESQLiteQuery.SetParamValues(AParams: TDAParamCollection);
+begin
+ SetParamValuesStd(AParams, TASQLite3Query(Dataset).Params);
+end;
+
+exports GetDriverObject name func_GetDriverObject;
+{ TDAASQLite3DB }
+
+function TDAASQLite3DB.GetLastInsertRow: integer;
+begin
+ result := SQLite3_LastInsertRow(DBHandle)
+end;
+
+initialization
+ _driver := nil;
+ RegisterDriverProc(GetDriverObject);
+finalization
+ UnregisterDriverProc(GetDriverObject);
+ FreeAndNIL(_driver);
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDAZeosDriver.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDAZeosDriver.pas
new file mode 100644
index 0000000..ad45b92
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Drivers/uDAZeosDriver.pas
@@ -0,0 +1,1211 @@
+unit uDAZeosDriver;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Driver Library }
+{ }
+{ compiler: Delphi 6 and up , FPC }
+{ platform: Win32 }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I ..\DataAbstract.inc}
+
+interface
+
+uses Classes, DB,
+ ZDbcIntfs, ZConnection, ZSqlMetadata,
+ uDAInterfaces,
+ uDAADOInterfaces,
+ uDAIBInterfaces,
+ uDASQLiteInterfaces,
+ uDAOracleInterfaces,
+ uDAMySQLInterfaces,
+ uDADB2Interfaces,
+ uDASybaseInterfaces,
+ uDAPostgresInterfaces,
+ uROClasses, uDAEngine, uDAUtils;
+
+type
+ TDAZEOSDriverType = (
+ dazUnknown,
+ dazADO,
+ dazASA,
+ dazIBMDB2,
+ dazInterBase,
+ dazMSSQL,
+ dazMySQL,
+ dazOracle,
+ dazPostgreSQL,
+ dazSQLite,
+ dazSybase);
+
+const
+ ZEOS_ADO = 'ado';
+ ZEOS_ASA = 'asa';
+ ZEOS_IBMDB2 = 'db2';
+ ZEOS_Interbase = 'interbase';
+ ZEOS_Firebird = 'firebird';
+ ZEOS_MSSQL = 'mssql';
+ ZEOS_MySQL = 'mysql';
+ ZEOS_ORACLE = 'oracle';
+ ZEOS_PostgreSQL = 'postgresql';
+ ZEOS_SQLite = 'sqlite';
+ ZEOS_SYBASE = 'sybase';
+
+type
+ { TDAZeosDriver }
+ TDAZeosDriver = class(TDADriverReference)
+ end;
+
+ { TDAESampleDriver }
+ TDAESampleDriver = class(TDAEDriver, IDADriver40)
+ // TDAESampleDriver = class(TDAIBDriver, IDADriver40)
+ protected
+ function GetConnectionClass: TDAEConnectionClass; override;
+ //procedure CustomizeConnectionObject(aConnection: TDAEConnection); override;
+ //procedure DoSetTraceOptions(TraceActive: boolean; TraceFlags: TDATraceOptions; Callback: TDALogTraceEvent); override;
+
+ { IDADriver }
+ function GetDriverID: string; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetDescription: string; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ // function GetMajVersion: byte; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ // function GetMinVersion: byte; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetAuxDrivers(out List: IROStrings); override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetAuxParams(const AuxDriver: string; out List: IROStrings); override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAvailableDriverOptions: TDAAvailableDriverOptions; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAvailableDriverOptionsEx(AuxDriver: string): TDAAvailableDriverOptions; override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ // procedure Initialize; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ // procedure Finalize; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ // function GetDefaultCustomParameters: string; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetDefaultConnectionType(const AuxDriver: string): string; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ { IDADriver40 }
+ function GetProviderDefaultCustomParameters(Provider: string): string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ public
+ end;
+
+ TZEOSConnection = class(TDAConnectionWrapper)
+ private
+ fConnection: TZConnection;
+ fMetaData: TZSQLMetaData;
+ protected
+ function GetConnected: Boolean; override;
+ procedure SetConnected(Value: boolean); override;
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ property Connection: TZConnection read fConnection write fConnection;
+ end;
+
+ { TDAESampleConnection }
+ TDAESampleConnection = class(TDAEConnection, IDAConnection,
+ IDAADOConnection,
+ IDAInterbaseConnection, //IDAIBTransactionAccess, IDAIBConnectionProperties,
+ IDAOracleConnection,
+ IDAMySQLConnection,
+ IDASQLiteConnection,
+ IDADB2Connection,
+ IDASybaseConnection,
+ IDAPostgresConnection,
+ // IDAConnectionModelling,
+ IDACanQueryDatabaseNames,
+ IDAFileBasedDatabase,
+ // IDADirectoryBasedDatabase,
+ IDAUseGenerators,
+ IDACanQueryGeneratorsNames,
+ IDATestableObject)
+ private
+ fNativeConnection: TZEOSConnection;
+ fDriverType: TDAZEOSDriverType;
+ fDriverName: string;
+ fADOProviderName: string;
+ fADOProviderType: TDAOleDBProviderType;
+ fMSSQLSchemaEnabled: Boolean;
+ procedure DoGetNames(AList: IROStrings; AObjectType: TDAObjecttype);
+ function ZEOS_GetMetaData: IZDatabaseMetadata;
+ procedure FixWideStringBug(AFields: TDAFieldCollection);
+ protected
+ function QueryInterface(const IID: TGUID; out Obj): HResult; override; stdcall;
+
+ function CreateCustomConnection: TCustomConnection; override;
+ function CreateMacroProcessor: TDASQLMacroProcessor; override;
+ function GetDatasetClass: TDAEDatasetClass; override;
+ function GetStoredProcedureClass: TDAEStoredProcedureClass; override;
+ procedure DoApplyConnectionString(aConnStrParser: TDAConnectionStringParser; aConnectionObject: TCustomConnection); override;
+
+ // transaction support
+ function DoBeginTransaction: integer; override;
+ procedure DoCommitTransaction; override;
+ procedure DoRollbackTransaction; override;
+ function DoGetInTransaction: boolean; override;
+
+ procedure DoGetTableNames(out List: IROStrings); override;
+ procedure DoGetViewNames(out List: IROStrings); override;
+ procedure DoGetStoredProcedureNames(out List: IROStrings); override;
+
+ procedure DoGetTableFields(const aTableName: string; out Fields: TDAFieldCollection); override;
+ procedure DoGetQueryFields(const aSQL: string; aParamsIfNeeded: TDAParamCollection; out Fields: TDAFieldCollection); override;
+ //procedure DoGetViewFields(const aViewName: string; out Fields: TDAFieldCollection); override;
+
+ procedure DoGetStoredProcedureParams(const aStoredProcedureName: string; out Params: TDAParamCollection); override;
+ procedure DoGetForeignKeys(out ForeignKeys: TDADriverForeignKeyCollection); override;
+
+ function DoGetLastAutoInc(const GeneratorName: string): integer; override;
+
+ { IDATestableObject }
+ // procedure Test; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ { IDAConnection }
+
+ function GetSPSelectSyntax(HasArguments: Boolean): string; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetQuoteChars: TDAQuoteCharArray; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ // function IdentifierIsQuoted(const iIdentifier: string): boolean; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function IdentifierNeedsQuoting(const iIdentifier: string): boolean; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ // function QuoteIdentifierIfNeeded(const iIdentifier: string): string; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ // function QuoteIdentifier(const iIdentifier: string): string; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ // function QuoteFieldNameIfNeeded(const aTableName, aFieldName: string): string; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ // function QuoteFieldName(const aTableName, aFieldName: string): string; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ // function NewCommand(const Text: string; CommandType: TDASQLStatementType; const aCommandName: string = ''): IDASQLCommand; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ // function NewDataset(const SQL: string; const aDatasetName: string = ''): IDADataset; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ // function isAlive: Boolean; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ // function GetQueryBuilder: TDAQueryBuilder; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ { IDAADOConnection }
+ function GetProviderName: string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetProviderType: TDAOleDBProviderType; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetCommandTimeout: Integer; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetCommandTimeout(const Value: Integer); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ { IDAInterbaseConnection }
+ // nothing
+
+ { IDAIBTransactionAccess }
+ //function GetTransaction: TObject; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ //procedure CommitRetaining; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ //procedure RollbackRetaining; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ { IDAIBConnectionProperties }
+ function GetRole: string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetRole(const Value: string); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetSQLDialect: integer; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetSQLDialect(Value: integer); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetCharset: string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetCharset(const Value: string); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ procedure Commit; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ // procedure CommitRetaining; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure Rollback; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ // procedure RollbackRetaining; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ { IDAOracleConnection }
+ // nothing
+
+ { IDAConnectionModelling }
+ // function FieldToDeclaration(aField: TDAField): string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ // function BuildCreateTableSQL(aDataSet: TDADataSet; const aOverrideName: string = ''): string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ // procedure CreateTable(aDataSet: TDADataSet; const aOverrideName: string = ''); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ { IDACanQueryDatabaseNames }
+ function GetDatabaseNames: IROStrings;
+
+ { IDAFileBasedDatabase }
+ function GetFileExtensions: IROStrings;
+
+ { IDADirectoryBasedDatabase }
+ // nothing
+
+ { IDAUseGenerators }
+ function GetNextAutoinc(const GeneratorName: string): integer; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ { IDACanQueryGeneratorsNames }
+ function GetGeneratorNames: IROStrings;
+
+ public
+ constructor Create(aDriver: TDAEDriver; aName: string = ''); override;
+ end;
+
+ { TDAESampleQuery }
+ TDAESampleQuery = class(TDAEDataset , IDAMustSetParams)
+ protected
+ // procedure PrepareSQLStatement; override;
+ procedure ClearParams; override;
+ function CreateDataset(aConnection: TDAEConnection): TDataset; override;
+ procedure DoPrepare(Value: boolean); override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function DoExecute: integer; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure DoSetSQL(const Value: string); override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function DoGetSQL: string; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ // function intVCLTypeToDAType(aFieldType: TFieldType): TDADataType;override;
+
+ { IDASQLCommand }
+ // procedure RefreshParams; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ // function Execute: integer; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ // function DoGetRecordCount: integer; override;
+ // function DoGetActive: boolean; override;
+ // procedure DoSetActive(Value: boolean); override;
+ // function DoGetBOF: boolean; override;
+ // function DoGetEOF: boolean; override;
+ // procedure DoNext; override;
+ // function DoLocate(const KeyFields: string; const KeyValues: Variant; Options: TLocateOptions): Boolean; override;
+
+ // IDAMustSetParams
+ procedure SetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ public
+ end;
+
+ { TDAESampleStoredProcedure }
+ TDAESampleStoredProcedure = class(TDAEStoredProcedure, IDAMustSetParams)
+ protected
+ // Internal
+ // function DoGetStoredProcedureName: string; override;
+ // procedure DoSetStoredProcedureName(const Name: string); override;
+ procedure DoPrepare(Value: boolean); override;
+ procedure RefreshParams; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ // IDAStoredProcedure
+ function GetStoredProcedureName: string; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetStoredProcedureName(const Name: string); override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ // procedure PrepareSQLStatement; override;
+ function CreateDataset(aConnection: TDAEConnection): TDataset; override;
+ function DoExecute: integer; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure DoSetSQL(const Value: string); override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function DoGetSQL: string; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ // function intVCLTypeToDAType(aFieldType: TFieldType): TDADataType;override;
+
+ { IDASQLCommand }
+ // procedure RefreshParams; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ // function Execute: integer; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ // function DoGetRecordCount: integer; override;
+ // function DoGetActive: boolean; override;
+ // procedure DoSetActive(Value: boolean); override;
+ // function DoGetBOF: boolean; override;
+ // function DoGetEOF: boolean; override;
+ // procedure DoNext; override;
+ // function DoLocate(const KeyFields: string; const KeyValues: Variant; Options: TLocateOptions): Boolean; override;
+
+ // IDAMustSetParams
+ procedure SetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetParamValues(AParams: TDAParamCollection); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ end;
+
+procedure Register;
+
+function GetDriverObject: IDADriver; stdcall;
+
+implementation
+
+uses
+ {$IFDEF FPC}LResources,{$ENDIF}
+ {$IFDEF MSWINDOWS}Windows, {$ENDIF}
+ Variants, Types, SysUtils,
+ uDADriverManager, uDARes, uDASQL92Interfaces,
+ zClasses, ZDataset, ZStoredProcedure;
+
+{$IFNDEF FPC}
+ {$R DataAbstract_ZeosDriver_Glyphs.res}
+{$ENDIF}
+
+var
+ _driver : TDAEDriver = nil;
+
+procedure Register;
+begin
+ RegisterComponents(DAPalettePageName, [TDAZeosDriver]);
+end;
+
+function GetDriverObject: IDADriver;
+begin
+ if (_driver = nil) then _driver := TDAESampleDriver.Create(nil);
+ result := _driver;
+end;
+
+function ZEOSDriverIdToZEOSDriverType(aAuxDriver: string): TDAZEOSDriverType;
+begin
+ aAuxDriver := LowerCase(aAuxDriver);
+ if aAuxDriver = '' then Result := dazUnknown
+ else if Pos(ZEOS_ADO, aAuxDriver) = 1 then Result := dazADO
+ else if Pos(ZEOS_ASA, aAuxDriver) = 1 then Result := dazASA
+ else if Pos(ZEOS_IBMDB2, aAuxDriver) = 1 then Result := dazIBMDB2
+ else if Pos(ZEOS_Interbase, aAuxDriver) = 1 then Result := dazInterBase
+ else if Pos(ZEOS_Firebird, aAuxDriver) = 1 then Result := dazInterBase
+ else if Pos(ZEOS_MSSQL, aAuxDriver) = 1 then Result := dazMSSQL
+ else if Pos(ZEOS_MySQL, aAuxDriver) = 1 then Result := dazMySQL
+ else if Pos(ZEOS_ORACLE, aAuxDriver) = 1 then Result := dazOracle
+ else if Pos(ZEOS_PostgreSQL, aAuxDriver) = 1 then Result := dazPostgreSQL
+ else if Pos(ZEOS_SQLite, aAuxDriver) = 1 then Result := dazSQLite
+ else if Pos(ZEOS_SYBASE, aAuxDriver) = 1 then Result := dazSybase
+ else Result := dazUnknown;
+end;
+
+{ TDAESampleConnection }
+
+procedure TDAESampleConnection.DoApplyConnectionString(aConnStrParser: TDAConnectionStringParser; aConnectionObject: TCustomConnection);
+var
+ i : Integer;
+ sName, sValue : string;
+begin
+ inherited;
+ with aConnStrParser do begin
+ fDriverName := AuxDriver;
+ fDriverType := ZEOSDriverIdToZEOSDriverType(AuxDriver);
+ fADOProviderName := AuxParams['Provider'];
+ FADOProviderType := OleDBDriverIdToOleDBProviderType(FADOProviderName);
+
+ fNativeConnection.fConnection.Protocol := AuxDriver;
+ if (Self.UserID <> '') then
+ fNativeConnection.fConnection.User := Self.UserID
+ else
+ fNativeConnection.fConnection.User := UserID;
+
+ if (Self.Password <> '') then
+ fNativeConnection.fConnection.Password := Self.Password
+ else
+ fNativeConnection.fConnection.Password := Password;
+ if Server <> '' then fNativeConnection.fConnection.HostName := Server;
+ if Database <> '' then begin
+ fNativeConnection.fConnection.Database := Database;
+ if fDriverType <> dazSQLite then
+ fNativeConnection.fConnection.Catalog := Database;
+ end;
+
+ for i := 0 to AuxParamsCount - 1 do begin
+ sName := AuxParamNames[i];
+ if sName = '' then Continue;
+ sValue := AuxParams[AuxParamNames[i]];
+ if AnsiSameText(sName, 'role') then begin
+ if fDriverType = dazInterBase then sName := 'rolename';
+ end else if AnsiSameText(sName, 'charset') then begin
+ if fDriverType = dazInterBase then sName := 'codepage';
+ end else if AnsiSameText(sName, 'port') then begin
+ if StrToIntDef(sValue, -1) <> -1 then fNativeConnection.fConnection.Port := StrToInt(sValue);
+ end else begin
+ if sName[1] = '@' then sName := Pchar(sName) + 1;
+ end;
+ fNativeConnection.fConnection.Properties.Values[sName] := sValue;
+ end;
+
+ if fDriverType = dazADO then begin
+ if fADOProviderName = '' then
+ raise EDADriverException.Create('No proviver specified for ADO auxdriver');
+
+ fNativeConnection.fConnection.Properties.Values['User ID'] := fNativeConnection.fConnection.User;
+ fNativeConnection.fConnection.Properties.Values['Password'] := fNativeConnection.fConnection.Password;
+ if FADOProviderType = oledb_Jet then begin
+ fNativeConnection.fConnection.Properties.Values['Data Source'] := Database;
+ end else begin
+ if Database <> '' then begin
+ if fADOProviderType = oledb_Postgresql then
+ fNativeConnection.fConnection.Properties.Values['Location'] := Database
+ else
+ fNativeConnection.fConnection.Properties.Values['Initial Catalog'] := Database;
+ end;
+ if Server <> '' then fNativeConnection.fConnection.Properties.Values['Data Source'] := Server;
+ if fADOProviderType <> oledb_Postgresql then fNativeConnection.fConnection.Properties.Values['OLE DB SERVICES'] := '-2';
+ end;
+ fNativeConnection.fConnection.Database := '';
+ for i := 0 to fNativeConnection.fConnection.Properties.Count - 1 do begin
+ sName:=fNativeConnection.fConnection.Properties.Names[i];
+ sValue:=fNativeConnection.fConnection.Properties.Values[sName];
+ fNativeConnection.fConnection.Database:=fNativeConnection.fConnection.Database + sName+'='+sValue+';'
+ end;
+ end;
+ end;
+end;
+
+function TDAESampleConnection.DoBeginTransaction: integer;
+begin
+ fNativeConnection.fConnection.StartTransaction;
+ Result := 0;
+end;
+
+procedure TDAESampleConnection.DoCommitTransaction;
+begin
+ fNativeConnection.fConnection.Commit;
+end;
+
+function TDAESampleConnection.CreateCustomConnection: TCustomConnection;
+begin
+ fNativeConnection := TZEOSConnection.Create(nil);
+ result := fNativeConnection;
+end;
+
+function TDAESampleConnection.GetDatasetClass: TDAEDatasetClass;
+begin
+ result := TDAESampleQuery;
+end;
+
+function TDAESampleConnection.GetStoredProcedureClass: TDAEStoredProcedureClass;
+begin
+ result := TDAESampleStoredProcedure;
+end;
+
+procedure TDAESampleConnection.DoRollbackTransaction;
+begin
+ fNativeConnection.fConnection.Rollback;
+end;
+
+function TDAESampleConnection.DoGetInTransaction: boolean;
+begin
+ Result := fNativeConnection.fConnection.InTransaction
+end;
+
+function TDAESampleConnection.QueryInterface(const IID: TGUID; out Obj): HResult;
+begin
+ Result := E_NOINTERFACE;
+ if IsEqualGUID(IID, IDAADOConnection) then begin
+ if fDriverType <> dazADO then Exit;
+ end else if IsEqualGUID(IID, IDAInterbaseConnection) then begin
+ if fDriverType <> dazInterbase then Exit;
+ end else if IsEqualGUID(IID, IDAIBTransactionAccess) then begin
+ if fDriverType <> dazInterbase then Exit;
+ end else if IsEqualGUID(IID, IDAIBConnectionProperties) then begin
+ if fDriverType <> dazInterbase then Exit;
+ end else if IsEqualGUID(IID, IDAOracleConnection) then begin
+ if fDriverType <> dazOracle then Exit;
+ end else if IsEqualGUID(IID, IDASQLiteConnection) then begin
+ if fDriverType <> dazSQLite then Exit;
+ end else if IsEqualGUID(IID, IDADB2Connection) then begin
+ if fDriverType <> dazIBMDB2 then Exit;
+ end else if IsEqualGUID(IID, IDASybaseConnection) then begin
+ if not (fDriverType in [dazSybase, dazASA]) then Exit;
+ end else if IsEqualGUID(IID, IDAPostgresConnection) then begin
+ if fDriverType <> dazPostgreSQL then Exit;
+ end else if IsEqualGUID(IID, IDAMySQLConnection) then begin
+ if fDriverType <> dazMySQL then Exit;
+ end else if IsEqualGUID(IID, IDACanQueryDatabaseNames) then begin
+ if (fDriverType in [dazInterBase, dazSQLite]) then Exit;
+ end else if IsEqualGUID(IID, IDAFileBasedDatabase) then begin
+ if not (fDriverType in [dazInterBase, dazSQLite]) then Exit;
+ end else if IsEqualGUID(IID, IDAUseGenerators) then begin
+ if not (fDriverType in [dazInterBase, dazOracle, dazPostgreSQL]) then Exit;
+ end else if IsEqualGUID(IID, IDACanQueryGeneratorsNames) then begin
+ if not (fDriverType in [dazInterBase]) then Exit;
+ end
+
+ // else if IsEqualGUID(IID, IDAConnectionModelling) then
+ // else if IsEqualGUID(IID, IDADirectoryBasedDatabase) then
+ ;
+ Result := inherited QueryInterface(IID, Obj);
+end;
+
+constructor TDAESampleConnection.Create(aDriver: TDAEDriver; aName: string);
+begin
+ inherited Create(aDriver, aName);
+ fMSSQLSchemaEnabled := True;
+end;
+
+function TDAESampleConnection.CreateMacroProcessor: TDASQLMacroProcessor;
+begin
+ case fDriverType of
+ dazInterBase: Result := IB_CreateMacroProcessor;
+ dazMSSQL: Result := MSSQL_CreateMacroProcessor;
+ dazOracle: Result := Oracle_CreateMacroProcessor;
+ else
+ Result := inherited CreateMacroProcessor;
+ end;
+end;
+
+function TDAESampleConnection.GetFileExtensions: IROStrings;
+begin
+ case fDriverType of
+ dazInterBase: Result := IB_GetFileExtensions;
+ dazSQLite: Result := SQLite_GetFileExtensions;
+ else
+ Result := NewROStrings;
+ end;
+end;
+
+function TDAESampleConnection.GetGeneratorNames: IROStrings;
+begin
+ case fDriverType of
+ dazInterBase: Result:= IB_GetGeneratorNames(GetDatasetClass.Create(Self));
+ else
+ Result := NewROStrings;
+ end;
+end;
+
+procedure TDAESampleConnection.DoGetTableNames(out List: IROStrings);
+begin
+ inherited;
+ case fDriverType of
+ dazMSSQL: MSSQL_DoGetNames(GetDatasetClass.Create(Self), List, dotTable, fMSSQLSchemaEnabled);
+ dazInterBase: IB_GetObjectNames(GetDatasetClass.Create(Self), List, dotTable);
+ dazMYSQL: MYSQL_DoGetNames(GetDatasetClass.Create(Self), List, dotTable, fNativeConnection.fConnection.Catalog);
+ dazSQLite: SQLite_GetObjectNames(GetDatasetClass.Create(Self), List, dotTable);
+ dazPostgreSQL: Postgres_DoGetNames(GetDatasetClass.Create(Self), List, dotTable);
+ dazOracle: Oracle_DoGetNames(GetDatasetClass.Create(Self), List, dotTable);
+ else
+ if (fDriverType = dazADO) and (fADOProviderType in [oledb_MSSQL, oledb_MSSQL2005]) then
+ MSSQL_DoGetNames(GetDatasetClass.Create(Self), List, dotTable, fMSSQLSchemaEnabled)
+ else begin
+ DoGetNames(List, dotTable);
+ end;
+ end
+end;
+
+procedure TDAESampleConnection.DoGetViewNames(out List: IROStrings);
+begin
+ inherited;
+ case fDriverType of
+ dazMSSQL: MSSQL_DoGetNames(GetDatasetClass.Create(Self), List, dotView, fMSSQLSchemaEnabled);
+ dazInterBase: IB_GetObjectNames(GetDatasetClass.Create(Self), List, dotView);
+ dazMYSQL: MYSQL_DoGetNames(GetDatasetClass.Create(Self), List, dotView, fNativeConnection.fConnection.Catalog);
+ dazSQLite: SQLite_GetObjectNames(GetDatasetClass.Create(Self), List, dotView);
+ dazPostgreSQL: Postgres_DoGetNames(GetDatasetClass.Create(Self), List, dotView);
+ dazOracle: Oracle_DoGetNames(GetDatasetClass.Create(Self), List, dotView);
+ else
+ if (fDriverType = dazADO) and (fADOProviderType in [oledb_MSSQL, oledb_MSSQL2005]) then
+ MSSQL_DoGetNames(GetDatasetClass.Create(Self), List, dotView, fMSSQLSchemaEnabled)
+ else begin
+ DoGetNames(List, dotView);
+ end;
+ end
+end;
+
+procedure TDAESampleConnection.DoGetStoredProcedureNames(
+ out List: IROStrings);
+begin
+ inherited;
+ case fDriverType of
+ dazMSSQL: MSSQL_DoGetNames(GetDatasetClass.Create(Self), List, dotProcedure, fMSSQLSchemaEnabled);
+ dazInterBase: IB_GetObjectNames(GetDatasetClass.Create(Self), List, dotProcedure);
+ dazMYSQL: MYSQL_DoGetNames(GetDatasetClass.Create(Self), List, dotProcedure, fNativeConnection.fConnection.Catalog);
+ dazSQLite: SQLite_GetObjectNames(GetDatasetClass.Create(Self), List, dotProcedure);
+ dazPostgreSQL: Postgres_DoGetNames(GetDatasetClass.Create(Self), List, dotProcedure);
+ dazOracle: Oracle_DoGetNames(GetDatasetClass.Create(Self), List, dotProcedure);
+ else
+ if (fDriverType = dazADO) and (fADOProviderType in [oledb_MSSQL, oledb_MSSQL2005]) then
+ MSSQL_DoGetNames(GetDatasetClass.Create(Self), List, dotProcedure, fMSSQLSchemaEnabled)
+ else begin
+ DoGetNames(List, dotProcedure);
+ end;
+ end
+end;
+
+procedure TDAESampleConnection.DoGetTableFields(const aTableName: string;
+ out Fields: TDAFieldCollection);
+var
+ lschema, ltbl : string;
+ fld : TDAField;
+begin
+ case fDriverType of
+ dazMSSQL: MSSQL_DoGetTableFields(QuoteIdentifierIfNeeded(aTableName), GetDatasetClass.Create(Self), Fields);
+ dazInterBase: IB_GetTableFields(QuoteIdentifierIfNeeded(aTableName), GetDatasetClass.Create(Self), Fields);
+ dazMySQL: MYSQL_DoGetTableFields(QuoteIdentifierIfNeeded(aTableName),GetDatasetClass.Create(Self),Fields, fNativeConnection.fConnection.Catalog);
+ dazOracle: Oracle_DoGetTableFields(QuoteIdentifierIfNeeded(aTableName), GetDatasetClass.Create(Self), Fields);
+ dazPostgreSQL: Postgres_DoGetTableFields(QuoteIdentifierIfNeeded(aTableName), GetDatasetClass.Create(Self), Fields);
+ else
+ if (fDriverType = dazADO) and (fADOProviderType in [oledb_MSSQL, oledb_MSSQL2005]) then
+ MSSQL_DoGetTableFields(QuoteIdentifierIfNeeded(aTableName), GetDatasetClass.Create(Self), Fields)
+ else begin
+ inherited;
+ if Pos('.', aTableName) > 0 then begin
+ lschema := Trim(Copy(aTableName, 1, Pos('.', aTableName) - 1));
+ ltbl := Trim(Copy(aTableName, Pos('.', aTableName) + 1, Length(aTableName)));
+ end else begin
+ lschema := '';
+ ltbl := aTableName;
+ end;
+ // required+default value
+ with ZEOS_GetMetadata.GetColumns(fNativeConnection.fConnection.Catalog, lschema, ltbl, '') do
+ while Next do begin
+ fld := Fields.FindField(GetStringByName('COLUMN_NAME'));
+ if fld = nil then Continue;
+ fld.Required := GetStringByName('IS_NULLABLE') = 'NO';
+
+ fld.DefaultValue := GetStringByName('COLUMN_DEF');
+ if not TestDefaultValue(fld.DefaultValue, fld.DataType) then
+ fld.DefaultValue := '';
+ end;
+ // pk
+ with ZEOS_GetMetadata.GetPrimaryKeys(fNativeConnection.fConnection.Catalog, lschema, ltbl) do
+ while Next do begin
+ fld := Fields.FindField(GetStringByName('COLUMN_NAME'));
+ if fld = nil then Continue;
+ fld.Required := True;
+ fld.InPrimaryKey := True;
+ end;
+ end;
+ end;
+ FixWideStringBug(Fields);
+end;
+
+procedure TDAESampleConnection.DoGetForeignKeys(
+ out ForeignKeys: TDADriverForeignKeyCollection);
+var
+ lSupportedSchema : boolean;
+begin
+ inherited;
+ case fDriverType of
+ dazMSSQL: MSSQL_DoGetForeignKeys(GetDatasetClass.Create(Self), ForeignKeys, fMSSQLSchemaEnabled);
+ dazInterBase: IB_DoGetForeignKeys(GetDatasetClass.Create(Self), ForeignKeys);
+ dazMySQL: MYSQL_DoGetForeignKeys(GetDatasetClass.Create(Self), ForeignKeys, fNativeConnection.fConnection.Catalog);
+ dazPostgreSQL: Postgres_DoGetForeignKeys(GetDatasetClass.Create(Self),ForeignKeys);
+ dazOracle: Oracle_DoGetForeignKeys(GetDatasetClass.Create(Self), ForeignKeys);
+ else
+ if (fDriverType = dazADO) and (fADOProviderType in [oledb_MSSQL, oledb_MSSQL2005]) then
+ MSSQL_DoGetForeignKeys(GetDatasetClass.Create(Self), ForeignKeys, fMSSQLSchemaEnabled)
+ else begin
+ lSupportedSchema := ZEOS_GetMetadata.SupportsSchemasInDataManipulation;
+ with ZEOS_GetMetadata.GetCrossReference(fNativeConnection.fConnection.Catalog, '', '', fNativeConnection.fConnection.Catalog, '', '') do
+ while Next do
+ with ForeignKeys.Add do begin
+ if lSupportedSchema then begin
+ PKTable := GetStringByName('PKTABLE_SCHEM') + '.' + GetStringByName('PKTABLE_NAME');
+ FKTable := GetStringByName('FKTABLE_SCHEM') + '.' + GetStringByName('FKTABLE_NAME');
+ end
+ else begin
+ PKTable := GetStringByName('PKTABLE_NAME');
+ FKTable := GetStringByName('FKTABLE_NAME');
+ end;
+ PKField := GetStringByName('PKCOLUMN_NAME');
+ FKField := GetStringByName('FKCOLUMN_NAME');
+ end;
+ end;
+ end;
+end;
+
+function TDAESampleConnection.GetDatabaseNames: IROStrings;
+begin
+ case fDriverType of
+ dazMSSQL: Result := MSSQL_GetDatabaseNames(Self);
+ dazMySQL: Result := MYSQL_GetDatabaseNames(GetDatasetClass.Create(Self));
+ dazPostgreSQL: Result := Postgres_GetDatabaseNames(Self);
+ else
+ if (fDriverType = dazADO) and (fADOProviderType in [oledb_MSSQL, oledb_MSSQL2005]) then
+ Result := MSSQL_GetDatabaseNames(Self)
+ else begin
+ Result := NewROStrings;
+ with ZEOS_GetMetadata.GetCatalogs do
+ while Next do
+ Result.Add(GetStringByName('TABLE_CAT'));
+ end;
+ end;
+end;
+
+function TDAESampleConnection.GetQuoteChars: TDAQuoteCharArray;
+var
+ s : string;
+begin
+ Result := inherited GetQuoteChars;
+ case fDriverType of
+ dazMSSQL: Result := MSSQL_GetQuoteChars;
+ dazOracle: Result:= Oracle_GetQuoteChars;
+ else
+ if (fDriverType = dazADO) and (fADOProviderType in [oledb_MSSQL, oledb_MSSQL2005]) then
+ Result := MSSQL_GetQuoteChars
+ else begin
+ s := ZEOS_GetMetadata.GetIdentifierQuoteString;
+ if Length(s) = 1 then begin
+ Result[0] := s[1];
+ Result[1] := s[1];
+ end
+ else if Length(s) = 2 then begin
+ Result[0] := s[1];
+ Result[1] := s[2];
+ end
+ end;
+ end;
+end;
+
+function TDAESampleConnection.IdentifierNeedsQuoting(
+ const iIdentifier: string): boolean;
+var
+ lList : TstringList;
+ i : integer;
+begin
+ Result:= inherited IdentifierNeedsQuoting(iIdentifier);
+ if not result then
+ case fDriverType of
+ dazMSSQL: Result := MSSQL_IdentifierNeedsQuoting(iIdentifier);
+ dazInterBase: Result := IB_IdentifierNeedsQuoting(iIdentifier, GetSQLDialect);
+ dazMySQL: Result := MYSQL_IdentifierNeedsQuoting(iIdentifier);
+ dazORACLE: Result := Oracle_IdentifierNeedsQuoting(iIdentifier);
+ dazPostgreSQL: Result:= Postgres_IdentifierNeedsQuoting(iIdentifier);
+ dazIBMDB2: Result := DB2_IdentifierNeedsQuoting(iIdentifier);
+ dazASA,dazSybase: Result := Sybase_IdentifierNeedsQuoting(iIdentifier);
+ else
+ if (fDriverType = dazADO) and (fADOProviderType in [oledb_MSSQL, oledb_MSSQL2005]) then
+ Result := MSSQL_IdentifierNeedsQuoting(iIdentifier)
+ else begin
+ lList := TStringList.Create;
+ try
+ lList.CommaText :=
+ ZEOS_GetMetadata.GetSQLKeywords + ',' +
+ ZEOS_GetMetadata.GetNumericFunctions + ',' +
+ ZEOS_GetMetadata.GetStringFunctions + ',' +
+ ZEOS_GetMetadata.GetSystemFunctions + ',' +
+ ZEOS_GetMetadata.GetTimeDateFunctions;
+ for i := 0 to lList.Count - 1 do
+ if CompareText(llist[i], iIdentifier) = 0 then begin
+ Result := True;
+ Exit;
+ end;
+ finally
+ lList.Free;
+ end
+ end;
+ end;
+end;
+
+function TDAESampleConnection.GetRole: string;
+begin
+ Result := fNativeConnection.fConnection.Properties.Values['rolename'];
+end;
+
+function TDAESampleConnection.GetSQLDialect: integer;
+begin
+ Result := StrToIntDef(fNativeConnection.fConnection.Properties.Values['dialect'], -1);
+ if Result = -1 then begin
+ if fDriverName = 'interbase-5' then
+ Result := 1
+ else
+ Result := 3;
+ end;
+end;
+
+procedure TDAESampleConnection.SetRole(const Value: string);
+begin
+ fNativeConnection.fConnection.Properties.Values['rolename'] := Value;
+end;
+
+procedure TDAESampleConnection.SetSQLDialect(Value: integer);
+begin
+ fNativeConnection.fConnection.Properties.Values['dialect'] := IntToStr(Value);
+end;
+
+function TDAESampleConnection.GetCharset: string;
+begin
+ Result := fNativeConnection.fConnection.Properties.Values['codepage'];
+end;
+
+procedure TDAESampleConnection.SetCharset(const Value: string);
+begin
+ fNativeConnection.fConnection.Properties.Values['codepage'] := Value;
+end;
+
+procedure TDAESampleConnection.Commit;
+begin
+ Self.DoCommitTransaction;
+end;
+
+procedure TDAESampleConnection.Rollback;
+begin
+ Self.DoRollbackTransaction;
+end;
+
+function TDAESampleConnection.DoGetLastAutoInc(
+ const GeneratorName: string): integer;
+begin
+ Result := -1;
+ case fDriverType of
+ dazMSSQL: Result := MSSQL_DoGetLastAutoInc(GeneratorName, GetDatasetClass.Create(Self));
+ dazInterBase: Result := IB_GetLastAutoInc(GeneratorName, GetDatasetClass.Create(Self));
+ dazMySQL: Result := MySQL_GetLastAutoInc(GeneratorName, GetDatasetClass.Create(Self));
+ dazOracle: Result := Oracle_DoGetLastAutoInc(GeneratorName, GetDatasetClass.Create(Self));
+ dazPostgreSQL: Result := Postgres_DoGetLastAutoInc(GeneratorName, GetDatasetClass.Create(Self));
+ else
+ if (fDriverType = dazADO) and (fADOProviderType in [oledb_MSSQL, oledb_MSSQL2005]) then
+ Result := MSSQL_DoGetLastAutoInc(GeneratorName, GetDatasetClass.Create(Self))
+ else ;
+ end;
+end;
+
+function TDAESampleConnection.GetNextAutoinc(
+ const GeneratorName: string): integer;
+begin
+ Result := -1;
+ case fDriverType of
+ dazInterBase: Result := IB_GetNextAutoinc(GeneratorName, GetDatasetClass.Create(Self));
+ dazOracle: Result := Oracle_GetNextAutoinc(GeneratorName, GetDatasetClass.Create(Self));
+ dazPostgreSQL: Result := Postgres_GetNextAutoInc(GeneratorName, GetDatasetClass.Create(Self));
+ end;
+end;
+
+procedure TDAESampleConnection.DoGetNames(AList: IROStrings;
+ AObjectType: TDAObjecttype);
+var
+ lTableTypes : TStringDynArray;
+ lsupportSchema : Boolean;
+ lprocname : string;
+ i : integer;
+begin
+ fNativeConnection.fConnection.Connect;
+ lsupportSchema := ZEOS_GetMetadata.SupportsSchemasInDataManipulation;
+ if AObjectType = dotProcedure then begin
+ with ZEOS_GetMetadata.GetProcedures(fNativeConnection.fConnection.Catalog, '', '') do
+ while Next do begin
+ lprocname := GetStringByName('PROCEDURE_NAME');
+ i := pos(';', lprocname);
+ if i > 0 then lprocname := Copy(lprocname, 1, i - 1);
+ if lsupportSchema then
+ aList.Add(GetStringByName('PROCEDURE_SCHEM') + '.' + lprocname)
+ else
+ aList.Add(lprocname)
+ end;
+ end
+ else begin
+ SetLength(lTableTypes, 1);
+ if AObjectType = dotTable then
+ lTableTypes[0] := 'TABLE'
+ else
+ lTableTypes[0] := 'VIEW';
+ with ZEOS_GetMetadata.GetTables(fNativeConnection.fConnection.Catalog, '', '', lTableTypes) do
+ while Next do
+ if lsupportSchema then
+ aList.Add(GetStringByName('TABLE_SCHEM') + '.' + GetStringByName('TABLE_NAME'))
+ else
+ aList.Add(GetStringByName('TABLE_NAME'))
+ end;
+end;
+
+function TDAESampleConnection.GetSPSelectSyntax(
+ HasArguments: Boolean): string;
+begin
+ case fDriverType of
+ dazMSSQL: Result := MSSQL_GetSPSelectSyntax(HasArguments);
+ dazInterBase: Result := IB_GetSPSelectSyntax(HasArguments);
+ dazOracle: Result := Oracle_GetSPSelectSyntax(HasArguments);
+ dazPostgreSQL: Result := Postgres_GetSPSelectSyntax(HasArguments);
+ else
+ if (fDriverType = dazADO) and (fADOProviderType in [oledb_MSSQL, oledb_MSSQL2005]) then
+ Result := MSSQL_GetSPSelectSyntax(HasArguments)
+ else begin
+ Result := inherited GetSPSelectSyntax(HasArguments);
+ end;
+ end;
+end;
+
+function TDAESampleConnection.GetCommandTimeout: Integer;
+begin
+ Result := StrToIntDef(fNativeConnection.fConnection.Properties.Values['timeout'], 0);
+end;
+
+function TDAESampleConnection.GetProviderName: string;
+begin
+ Result := fADOProviderName;
+end;
+
+function TDAESampleConnection.GetProviderType: TDAOleDBProviderType;
+begin
+ Result := fADOProviderType;
+end;
+
+procedure TDAESampleConnection.SetCommandTimeout(const Value: Integer);
+begin
+ fNativeConnection.fConnection.Properties.Values['timeout'] := InttoStr(Value);
+end;
+
+procedure TDAESampleConnection.DoGetStoredProcedureParams(
+ const aStoredProcedureName: string; out Params: TDAParamCollection);
+begin
+ case fDriverType of
+ dazMySQL: MYSQL_DoGetStoredProcedureParams(aStoredProcedureName, GetDatasetClass.Create(Self), Params, fNativeConnection.fConnection.Catalog);
+ dazOracle: Oracle_DoGetStoredProcedureParams(aStoredProcedureName, GetDatasetClass.Create(Self), Params);
+ dazPostgreSQL: Postgres_DoGetStoredProcedureParams(aStoredProcedureName, GetDatasetClass.Create(Self), Params);
+ else
+ inherited;
+ end;
+end;
+
+
+function TDAESampleConnection.ZEOS_GetMetaData: IZDatabaseMetadata;
+begin
+ fNativeConnection.Connected:=True;
+ Result:= fNativeConnection.fConnection.DbcConnection.GetMetadata;
+end;
+
+procedure TDAESampleConnection.FixWideStringBug(AFields: TDAFieldCollection);
+{$IFDEF DA_WideMemoSupport}
+var
+ i: integer;
+{$ENDIF}
+begin
+ {$IFDEF DA_WideMemoSupport}
+ For i:=0 to AFields.Count -1 do
+ with AFields[i] do
+ if (DataType = datWideString) and (Size = MaxInt div 2) then begin
+ DataType:= datWideMemo;
+ Size := 0;
+ end;
+ {$ENDIF}
+end;
+
+procedure TDAESampleConnection.DoGetQueryFields(const aSQL: string;
+ aParamsIfNeeded: TDAParamCollection; out Fields: TDAFieldCollection);
+begin
+ inherited;
+ FixWideStringBug(Fields);
+end;
+
+{ TDAESampleDriver }
+
+procedure TDAESampleDriver.GetAuxDrivers(out List: IROStrings);
+var
+ i, j : integer;
+ lDrivers : IZCollection;
+ Protocols : TStringDynArray;
+begin
+ inherited;
+ lDrivers := ZDbcIntfs.DriverManager.GetDrivers;
+ for i := 0 to lDrivers.Count - 1 do begin
+ Protocols := (lDrivers[I] as IZDriver).GetSupportedProtocols;
+ for J := Low(Protocols) to High(Protocols) do
+ List.Add(Protocols[J]);
+ end;
+ List.Sorted := True;
+end;
+
+procedure TDAESampleDriver.GetAuxParams(const AuxDriver: string;
+ out List: IROStrings);
+var
+ i : TDAOleDBProviderType;
+ s : string;
+begin
+ inherited;
+ case ZEOSDriverIdToZEOSDriverType(AuxDriver) of
+ dazADO: begin
+ s := '';
+ for i := Low(TDAOleDBProviderType) to High(TDAOleDBProviderType) do
+ if (i <> oledb_Unknown) {// Redundant but safe if I change the enum later...} then begin
+ if s <> '' then s := s + ';';
+ s := s + OleDBProviders[i];
+ end;
+ List.Add('Provider=(' + s + ')');
+ end;
+ dazInterBase: AddIBAuxParams(List);
+ end;
+ if ZEOSDriverIdToZEOSDriverType(AuxDriver) <> dazAdo then List.Add('Port=');
+ List.Add('timeout=');
+end;
+
+function TDAESampleDriver.GetAvailableDriverOptions: TDAAvailableDriverOptions;
+begin
+ Result := [doAuxDriver, doServerName, doDatabaseName, doLogin, doCustom];
+end;
+
+function TDAESampleDriver.GetAvailableDriverOptionsEx(
+ AuxDriver: string): TDAAvailableDriverOptions;
+begin
+ case ZEOSDriverIdToZEOSDriverType(AuxDriver) of
+ dazSQLite : Result := [doAuxDriver, doDatabaseName, doCustom];
+ else
+ Result := [doAuxDriver, doServerName, doDatabaseName, doLogin, doCustom];
+ end;
+end;
+
+function TDAESampleDriver.GetConnectionClass: TDAEConnectionClass;
+begin
+ result := TDAESampleConnection;
+end;
+
+function TDAESampleDriver.GetDefaultConnectionType(
+ const AuxDriver: string): string;
+begin
+ case ZEOSDriverIdToZEOSDriverType(AuxDriver) of
+ dazADO: Result := '';
+ dazMySQL: Result := MySQL_DriverType;
+ dazIBMDB2: Result:= DB2_DriverType;
+ dazInterBase: Result := IB_DriverType;
+ dazMSSQL: Result := MSSQL_DriverType;
+ dazOracle: Result := Oracle_DriverType;
+ dazPostgreSQL: Result := PostgreSQL_DriverType;
+ dazSQLite : Result:= SQLite_DriverType;
+ dazASA: Result:=ASA_DriverType;
+ dazSybase: Result:=Sybase_DriverType;
+ else
+ Result:= inherited GetDefaultConnectionType(AuxDriver);
+ end;
+end;
+
+function TDAESampleDriver.GetDescription: string;
+begin
+ result := 'DataAbstact Zeos Driver';
+end;
+
+function TDAESampleDriver.GetDriverID: string;
+begin
+ result := 'ZEOS';
+end;
+
+function TDAESampleDriver.GetProviderDefaultCustomParameters(
+ Provider: string): string;
+begin
+ Result := '';
+ case ZEOSDriverIdToZEOSDriverType(Provider) of
+ dazADO: Result := 'Provider=;';
+ dazMySQL: Result := MYSQL_GetDefaultCustomParameters;
+ end;
+end;
+
+{ TDAESampleQuery }
+
+function TDAESampleQuery.CreateDataset(aConnection: TDAEConnection): TDataset;
+begin
+ result := TZReadOnlyQuery.Create(nil);
+ TZReadOnlyQuery(result).Connection := TDAESampleConnection(aConnection).fNativeConnection.fConnection;
+end;
+
+function TDAESampleQuery.DoExecute: integer;
+begin
+ TZReadOnlyQuery(Dataset).ExecSQL;
+ Result:=TZReadOnlyQuery(Dataset).RowsAffected;
+end;
+
+function TDAESampleQuery.DoGetSQL: string;
+begin
+ result := TZReadOnlyQuery(Dataset).SQL.Text;
+end;
+
+procedure TDAESampleQuery.DoPrepare(Value: boolean);
+begin
+ // nothing
+end;
+
+procedure TDAESampleQuery.DoSetSQL(const Value: string);
+begin
+ TZReadOnlyQuery(Dataset).SQL.Text := Value;
+end;
+
+procedure TDAESampleQuery.SetParamValues(AParams: TDAParamCollection);
+var
+ i: integer;
+begin
+ SetParamValuesStd(AParams, TZReadOnlyQuery(Dataset).Params);
+ // zeos doesn't support ftfmtBCD, ftBCD
+ for i:=0 to TZReadOnlyQuery(Dataset).Params.Count-1 do
+ with TZReadOnlyQuery(Dataset).Params[i] do begin
+ if DataType = ftBCD then AsCurrency := Value
+ else if DataType = ftFMTBCD then AsFloat := Value;
+ end;
+end;
+
+procedure TDAESampleQuery.GetParamValues(AParams: TDAParamCollection);
+begin
+ GetParamValuesStd(AParams, TZReadOnlyQuery(Dataset).Params);
+end;
+
+procedure TDAESampleQuery.ClearParams;
+begin
+ inherited;
+ TZReadOnlyQuery(Dataset).Params.Clear;
+end;
+
+{ TDAESampleStoredProcedure }
+
+function TDAESampleStoredProcedure.CreateDataset(aConnection: TDAEConnection): TDataset;
+begin
+ result := TZStoredProc.Create(nil);
+ TZStoredProc(result).Connection := TDAESampleConnection(aConnection).fNativeConnection.fConnection;
+end;
+
+function TDAESampleStoredProcedure.DoExecute: integer;
+begin
+ TZStoredProc(Dataset).ExecProc;
+ Result:=TZStoredProc(Dataset).RowsAffected;
+end;
+
+function TDAESampleStoredProcedure.DoGetSQL: string;
+begin
+ Result := '';
+end;
+
+procedure TDAESampleStoredProcedure.DoPrepare(Value: boolean);
+begin
+ // nothing
+end;
+
+procedure TDAESampleStoredProcedure.DoSetSQL(const Value: string);
+begin
+ //
+end;
+
+procedure TDAESampleStoredProcedure.GetParamValues(
+ AParams: TDAParamCollection);
+begin
+ GetParamValuesStd(AParams, TZStoredProc(Dataset).Params);
+end;
+
+function TDAESampleStoredProcedure.GetStoredProcedureName: string;
+begin
+ Result := TZStoredProc(Dataset).StoredProcName;
+end;
+
+procedure TDAESampleStoredProcedure.RefreshParams;
+begin
+ RefreshParamsStd(TZStoredProc(Dataset).Params);
+end;
+
+procedure TDAESampleStoredProcedure.SetParamValues(
+ AParams: TDAParamCollection);
+var
+ i: integer;
+begin
+ SetParamValuesStd(AParams, TZStoredProc(Dataset).Params);
+ // zeos doesn't support ftfmtBCD, ftBCD
+ for i:=0 to TZStoredProc(Dataset).Params.Count-1 do
+ with TZStoredProc(Dataset).Params[i] do begin
+ if DataType = ftBCD then AsCurrency := Value
+ else if DataType = ftFMTBCD then AsFloat := Value;
+ end
+end;
+
+procedure TDAESampleStoredProcedure.SetStoredProcedureName(
+ const Name: string);
+begin
+ TZStoredProc(Dataset).Connection.Connect;
+ TZStoredProc(Dataset).StoredProcName := Name;
+end;
+
+{ TZEOSConnection }
+
+constructor TZEOSConnection.Create(AOwner: TComponent);
+begin
+ inherited;
+ fConnection := TZConnection.Create(nil);
+ fConnection.LoginPrompt := False;
+ fMetaData := TZSQLMetaData.Create(nil);
+ fMetaData.Connection := fConnection;
+end;
+
+destructor TZEOSConnection.Destroy;
+begin
+ inherited;
+ FreeAndNil(fMetaData);
+ FreeAndNil(fConnection);
+end;
+
+function TZEOSConnection.GetConnected: Boolean;
+begin
+ if fConnection <> nil then
+ Result := fConnection.Connected
+ else
+ Result:=False;
+end;
+
+procedure TZEOSConnection.SetConnected(Value: boolean);
+begin
+ fConnection.Connected := Value;
+end;
+
+exports
+ GetDriverObject name func_GetDriverObject;
+
+initialization
+{$IFDEF FPC}
+ {$I DataAbstract_ZeosDriver_Glyphs.lrs}
+{$ENDIF}
+ _driver := nil;
+ RegisterDriverProc(GetDriverObject);
+finalization
+ UnregisterDriverProc(GetDriverObject);
+ FreeAndNIL(_driver);
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_AdditionalResources.rc b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_AdditionalResources.rc
new file mode 100644
index 0000000..d480282
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_AdditionalResources.rc
@@ -0,0 +1 @@
+DALOGO BITMAP DISCARDABLE "dalogo.bmp"
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_AdditionalResources.res b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_AdditionalResources.res
new file mode 100644
index 0000000..6735fcb
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_AdditionalResources.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D10.bdsproj b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D10.bdsproj
new file mode 100644
index 0000000..67fa8e2
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D10.bdsproj
@@ -0,0 +1,179 @@
+
+
+
+
+ Delphi.Personality
+
+ 1.0
+ {06DC969E-3DBF-4AD9-80A8-ADB03BFF41D1}
+
+
+
+
+ DataAbstract_IDE_D10.dpk
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 1
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+ RemObjects Data Abstract - IDE Package
+ False
+
+
+
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10
+ ..\;..\..\Dcu\D10
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+ True
+ False
+
+
+ True
+ False
+ 3
+ 0
+ 1
+ 361
+ False
+ False
+ False
+ False
+ False
+ 1033
+ 1252
+
+
+ RemObjects Software
+
+ 3.0.1.361
+
+
+
+
+ RemObjects SDK
+ 1.0.0.0
+
+
+
+ $00000000
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D10.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D10.cfg
new file mode 100644
index 0000000..f6e54d1
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D10.cfg
@@ -0,0 +1,52 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W+
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N0"..\..\Dcu\D10"
+-LE"..\..\Dcu\D10"
+-LN"..\..\Dcu\D10"
+-U"..\;..\..\Dcu\D10"
+-O"..\;..\..\Dcu\D10"
+-I"..\;..\..\Dcu\D10"
+-R"..\;..\..\Dcu\D10"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-SYMBOL_EXPERIMENTAL
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNIT_EXPERIMENTAL
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D10.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D10.dpk
new file mode 100644
index 0000000..fdc6b17
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D10.dpk
@@ -0,0 +1,51 @@
+package DataAbstract_IDE_D10;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - IDE Package'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ DesignIDE,
+ vcldb,
+ dbrtl,
+ RemObjects_Core_D10,
+ RemObjects_IDE_D10,
+ RemObjects_Everwood_D10,
+ DataAbstract_Core_D10;
+
+contains
+ DataAbstract_IDE_Reg in 'DataAbstract_IDE_Reg.pas',
+ uDADataAbstractEditors in 'uDADataAbstractEditors.pas',
+ uDADBSessionManagerEditor in 'uDADBSessionManagerEditor.pas',
+ uDASchemaUnitsGenerator in 'uDASchemaUnitsGenerator.pas',
+ uDAIDEMenu in 'uDAIDEMenu.pas',
+ uDAIDEData in 'uDAIDEData.pas' {DAIdeData: TDataModule},
+ uDAIDERes in 'uDAIDERes.pas',
+ uDASelectDataTablesForm in 'uDASelectDataTablesForm.pas' {DASelectDataTablesForm},
+ uDADataTableMasterLinkWizardForm in 'uDADataTableMasterLinkWizardForm.pas' {DADataTableMasterLinkWizard},
+ uDAGuideWizardForm in 'uDAGuideWizardForm.pas' {DAGuideWizardForm},
+ uDADataTableWizards in 'uDADataTableWizards.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D10.res b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D10.res
new file mode 100644
index 0000000..204493b
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D10.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D11.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D11.dpk
new file mode 100644
index 0000000..aa099c4
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D11.dpk
@@ -0,0 +1,51 @@
+package DataAbstract_IDE_D11;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - IDE Package'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ DesignIDE,
+ vcldb,
+ dbrtl,
+ RemObjects_Core_D11,
+ RemObjects_IDE_D11,
+ RemObjects_Everwood_D11,
+ DataAbstract_Core_D11;
+
+contains
+ DataAbstract_IDE_Reg in 'DataAbstract_IDE_Reg.pas',
+ uDADataAbstractEditors in 'uDADataAbstractEditors.pas',
+ uDADBSessionManagerEditor in 'uDADBSessionManagerEditor.pas',
+ uDASchemaUnitsGenerator in 'uDASchemaUnitsGenerator.pas',
+ uDAIDEMenu in 'uDAIDEMenu.pas',
+ uDAIDEData in 'uDAIDEData.pas' {DAIdeData: TDataModule},
+ uDAIDERes in 'uDAIDERes.pas',
+ uDASelectDataTablesForm in 'uDASelectDataTablesForm.pas' {DASelectDataTablesForm},
+ uDADataTableMasterLinkWizardForm in 'uDADataTableMasterLinkWizardForm.pas' {DADataTableMasterLinkWizard},
+ uDAGuideWizardForm in 'uDAGuideWizardForm.pas' {DAGuideWizardForm},
+ uDADataTableWizards in 'uDADataTableWizards.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D11.dproj b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D11.dproj
new file mode 100644
index 0000000..9ce7332
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D11.dproj
@@ -0,0 +1,88 @@
+
+
+ {83d4313b-eff3-4ea0-9289-ba6e608e821e}
+ DataAbstract_IDE_D11.dpk
+ Debug
+ AnyCPU
+ DCC32
+ ..\..\Dcu\D11\DataAbstract_IDE_D11.bpl
+
+
+ 7.0
+ False
+ False
+ True
+ 0
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\;..\..\Dcu\D11
+ ..\;..\..\Dcu\D11
+ ..\;..\..\Dcu\D11
+ ..\;..\..\Dcu\D11
+ RELEASE
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ 7.0
+ True
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\;..\..\Dcu\D11
+ ..\;..\..\Dcu\D11
+ ..\;..\..\Dcu\D11
+ ..\;..\..\Dcu\D11
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ Delphi.Personality
+ Package
+
+False True False RemObjects Data Abstract - IDE Package False False False True False 3 0 6 442 False False False False False 1033 1252 RemObjects Software 3.0.6.442 RemObjects SDK 1.0.0.0 DataAbstract_IDE_D11.dpk
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+ TDataModule
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D11.res b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D11.res
new file mode 100644
index 0000000..204493b
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D11.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D6.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D6.cfg
new file mode 100644
index 0000000..a95f764
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D6.cfg
@@ -0,0 +1,41 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\..\Dcu\D6"
+-LE"..\..\Dcu\D6"
+-LN"..\..\Dcu\D6"
+-U"..\Dcu\D6"
+-O"..\Dcu\D6"
+-I"..\Dcu\D6"
+-R"..\Dcu\D6"
+-Z
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D6.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D6.dof
new file mode 100644
index 0000000..f1ca4e5
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D6.dof
@@ -0,0 +1,116 @@
+[FileVersion]
+Version=7.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=Data Abstract - IDE Package
+
+[Directories]
+OutputDir=
+UnitOutputDir=..\..\Dcu\D6
+PackageDLLOutputDir=..\..\Dcu\D6
+PackageDCPOutputDir=..\..\Dcu\D6
+SearchPath=..\Dcu\D6
+Packages=
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+FileDescription=
+FileVersion=2.0.0.138
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=RemObjects SDK
+ProductVersion=1.0.0.0
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D6.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D6.dpk
new file mode 100644
index 0000000..c2b6298
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D6.dpk
@@ -0,0 +1,51 @@
+package DataAbstract_IDE_D6;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - IDE Package'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ DesignIDE,
+ vcldb,
+ dbrtl,
+ RemObjects_Core_D6,
+ RemObjects_IDE_D6,
+ RemObjects_Everwood_D6,
+ DataAbstract_Core_D6;
+
+contains
+ DataAbstract_IDE_Reg in 'DataAbstract_IDE_Reg.pas',
+ uDADataAbstractEditors in 'uDADataAbstractEditors.pas',
+ uDADBSessionManagerEditor in 'uDADBSessionManagerEditor.pas',
+ uDASchemaUnitsGenerator in 'uDASchemaUnitsGenerator.pas',
+ uDAIDEMenu in 'uDAIDEMenu.pas',
+ uDAIDEData in 'uDAIDEData.pas' {DAIdeData: TDataModule},
+ uDAIDERes in 'uDAIDERes.pas',
+ uDASelectDataTablesForm in 'uDASelectDataTablesForm.pas' {DASelectDataTablesForm},
+ uDADataTableMasterLinkWizardForm in 'uDADataTableMasterLinkWizardForm.pas' {DADataTableMasterLinkWizard},
+ uDAGuideWizardForm in 'uDAGuideWizardForm.pas' {DAGuideWizardForm},
+ uDADataTableWizards in 'uDADataTableWizards.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D6.res b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D6.res
new file mode 100644
index 0000000..204493b
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D6.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D7.cfg b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D7.cfg
new file mode 100644
index 0000000..5645689
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D7.cfg
@@ -0,0 +1,50 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W+
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\..\Dcu\D7"
+-LE"..\..\Dcu\D7"
+-LN"..\..\Dcu\D7"
+-U"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-O"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-I"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-R"..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D7.dof b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D7.dof
new file mode 100644
index 0000000..2b8a3a6
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D7.dof
@@ -0,0 +1,116 @@
+[FileVersion]
+Version=7.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=1
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=RemObjects Data Abstract - IDE Package
+
+[Directories]
+OutputDir=
+UnitOutputDir=..\..\Dcu\D7
+PackageDLLOutputDir=..\..\Dcu\D7
+PackageDCPOutputDir=..\..\Dcu\D7
+SearchPath=..\..\Dcu\D7;..\..\Dcu\DevEx;..\..\..\RemObjects SDK\Dcu\D7
+Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;dclOfficeXP;RemObjects_DataSnap_D7;PurposesoftD7;addict3_d6;tb2kComplete_70;CDKDesignTimeSupport;CDKSmp;CDK;ES_CodeSite20;ESDelphiCommandCompiler;ESFileSearch;ESVisualCompositeExpert;EaglWk;ESGraphUtils;ESBase;ESVsCp;ESSampleComposites70;ESSampleCompositeEditors7;Rz252N70;SynEdit_D7;dxsbD7;dxComnD7;dxDockingD7;dxEdtrD7;dxELibD7;dxExELD7;EQGridD7;dxExRwD7;dxDBEdD7;dxInsD7;dxGrEdD7;ECQDBCD7;EQTLD7;EQDBTLD7;dxLayoutControlD7;dxMasterViewD7;dxmdsd7;dxNavBarD7;dxObjInsD7;dxPageControlD7;dxPSCoreD7;Rz252D70;cxPageControlVCLD7;cxEditorsVCLD7;dxThemeD7;cxLibraryVCLD7;cxDataD7;cxGridUtilsVCLD7;cxGridVCLD7;RemObjects_BPDX_D7
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+FileDescription=
+FileVersion=3.0.0.280
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=RemObjects SDK
+ProductVersion=1.0.0.0
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D7.dpk b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D7.dpk
new file mode 100644
index 0000000..377b366
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D7.dpk
@@ -0,0 +1,51 @@
+package DataAbstract_IDE_D7;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Data Abstract - IDE Package'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ DesignIDE,
+ vcldb,
+ dbrtl,
+ RemObjects_Core_D7,
+ RemObjects_IDE_D7,
+ RemObjects_Everwood_D7,
+ DataAbstract_Core_D7;
+
+contains
+ DataAbstract_IDE_Reg in 'DataAbstract_IDE_Reg.pas',
+ uDADataAbstractEditors in 'uDADataAbstractEditors.pas',
+ uDADBSessionManagerEditor in 'uDADBSessionManagerEditor.pas',
+ uDASchemaUnitsGenerator in 'uDASchemaUnitsGenerator.pas',
+ uDAIDEMenu in 'uDAIDEMenu.pas',
+ uDAIDEData in 'uDAIDEData.pas' {DAIdeData: TDataModule},
+ uDAIDERes in 'uDAIDERes.pas',
+ uDASelectDataTablesForm in 'uDASelectDataTablesForm.pas' {DASelectDataTablesForm},
+ uDADataTableMasterLinkWizardForm in 'uDADataTableMasterLinkWizardForm.pas' {DADataTableMasterLinkWizard},
+ uDAGuideWizardForm in 'uDAGuideWizardForm.pas' {DAGuideWizardForm},
+ uDADataTableWizards in 'uDADataTableWizards.pas';
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D7.res b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D7.res
new file mode 100644
index 0000000..204493b
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_D7.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_Reg.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_Reg.pas
new file mode 100644
index 0000000..101b54a
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/DataAbstract_IDE_Reg.pas
@@ -0,0 +1,163 @@
+unit DataAbstract_IDE_Reg;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - IDE Library
+{
+{ compiler: Delphi 6 and up, Kylix 3 and up
+{ platform: Win32, Linux
+{
+{ (c)opyright RemObjects Software. all rights reserved.
+{
+{ Using this code requires a valid license of the Data Abstract
+{ which can be obtained at http://www.remobjects.com.
+{----------------------------------------------------------------------------}
+
+{$IFDEF MSWINDOWS}
+{$I ..\DataAbstract.inc}
+{$ENDIF MSWINDOWS}
+{$IFDEF LINUX}
+{$I ../DataAbstract.inc}
+{$ENDIF LINUX}
+
+interface
+
+procedure Register;
+
+implementation
+
+uses
+ Classes, uDAClasses, uDADataTable, uDARemoteDataAdapter, uDARemoteDataAdapterRequests,
+ uDADataAbstractEditors, uDADriverManager, uDAInterfaces,
+ uDABusinessProcessor, uRODLGenTools, ColnEdit,
+ DB, SysUtils, uDADBSessionManagerEditor, uDADBSessionManager,
+ DARemoteService_Impl, DALoginService_Impl,
+ DataAbstractService_Impl, BaseLoginService_Impl, MultiDbLoginService_Impl, SimpleLoginService_Impl,
+ uDAClientDataModule, uDADesigntimeCall, uDADataTableReferenceCollection,
+ {$IFDEF MSWINDOWS}
+ uROProductVersionInfo, fROAbout,
+ {$ENDIF MSWINDOWS}
+ {$IFDEF DELPHI5}
+ DsgnIntf, DMDesigner,
+ {$ELSE}
+ DesignIntf, DesignEditors;
+ {$ENDIF}
+
+procedure Register;
+begin
+ RegisterComponentEditor(TDADriverManager, TDADriverManagerEditor);
+ RegisterComponentEditor(TDASchema, TDASchemaEditor);
+ RegisterComponentEditor(TDAConnectionManager, TDAConnectionManagerEditor);
+ RegisterComponentEditor(TDADataDictionary, TDADataDictionaryEditor);
+ RegisterComponentEditor(TDADataTable, TDADataTableEditor);
+ RegisterComponentEditor(TDARemoteDataAdapter, TDARemoteDataAdapterEditor);
+ RegisterComponentEditor(TDADesigntimeCall, TDADesigntimeCallEditor);
+
+ {$IFDEF MSWINDOWS}
+ //RegisterComponentEditor(TDAClientDataModule, TDAClientDataModuleEditor);
+ {$ENDIF MSWINDOWS}
+
+ RegisterPropertyEditor(TypeInfo(string), TDARemoteRequest, 'MethodName', TDADataRequestCallMethodNameEditor);
+
+ {$IFDEF MSWINDOWS}
+ RegisterPropertyEditor(TypeInfo(string), TDADataTable, 'MasterFields', TDADataTableMasterDetailProps);
+ RegisterPropertyEditor(TypeInfo(string), TDADataTable, 'DetailFields', TDADataTableMasterDetailProps);
+ RegisterPropertyEditor(TypeInfo(TStrings), TDADataTable, 'MasterRequestMappings', TDADataTableMasterDetailProps);
+ RegisterPropertyEditor(TypeInfo(TStrings), TDADataTable, 'MasterParamsMappings', TDADataTableMasterDetailProps);
+ {$ENDIF MSWINDOWS}
+
+ RegisterPropertyEditor(TypeInfo(string), TDADriverManager, 'DriverDirectory', TDADriverManagerDirectory);
+ RegisterPropertyEditor(TypeInfo(TComponent), TDADataTableReference, 'DataTable', TDADataTableReferenceDataTable);
+
+ RegisterPropertyEditor(TypeInfo(TDataset), TDADataSource, 'Dataset', NIL);
+
+ RegisterPropertyEditor(TypeInfo(string), TDADataTable, 'LogicalName', TDADataTableLogicalNameEditor);
+ RegisterPropertyEditor(TypeInfo(string), TDADataTable, 'LocalConnection', TDADataTableLocalConnection);
+
+ RegisterPropertyEditor(TypeInfo(string), TDAUpdateRule, 'DatasetName', TDACollectionItemDatasetNameEditor);
+ RegisterPropertyEditor(TypeInfo(string), TDADatasetRelationship, 'DetailDatasetName', TDACollectionItemDatasetNameEditor);
+ RegisterPropertyEditor(TypeInfo(string), TDADatasetRelationship, 'MasterDatasetName', TDACollectionItemDatasetNameEditor);
+
+ RegisterPropertyEditor(TypeInfo(string), TDABusinessProcessor, 'InsertCommandName', TDABusinessProcessorCommandProperty);
+ RegisterPropertyEditor(TypeInfo(string), TDABusinessProcessor, 'DeleteCommandName', TDABusinessProcessorCommandProperty);
+ RegisterPropertyEditor(TypeInfo(string), TDABusinessProcessor, 'UpdateCommandName', TDABusinessProcessorCommandProperty);
+ RegisterPropertyEditor(TypeInfo(string), TDABusinessProcessor, 'ReferencedDataset', TDABusinessProcessorRefDatasetProperty);
+ RegisterPropertyEditor(TypeInfo(string), TDABusinessProcessor, 'RefreshDatasetName', TDABusinessProcessorRefDatasetProperty);
+
+ RegisterPropertyEditor(TypeInfo(string), TDADBSessionManager, 'InsertSessionCommand', TDASchemaCommandListEditor);
+ RegisterPropertyEditor(TypeInfo(string), TDADBSessionManager, 'UpdateSessionCommand', TDASchemaCommandListEditor);
+ RegisterPropertyEditor(TypeInfo(string), TDADBSessionManager, 'DeleteSessionCommand', TDASchemaCommandListEditor);
+ RegisterPropertyEditor(TypeInfo(string), TDADBSessionManager, 'ClearSessionsCommand', TDASchemaCommandListEditor);
+ RegisterPropertyEditor(TypeInfo(string), TDADBSessionManager, 'GetSessionCountDataSet', TDASchemaDataSetListEditor);
+ RegisterPropertyEditor(TypeInfo(string), TDADBSessionManager, 'GetAllSessionIDsDataset', TDASchemaDataSetListEditor);
+ RegisterPropertyEditor(TypeInfo(string), TDADBSessionManager, 'GetSessionDataSet', TDASchemaDataSetListEditor);
+ RegisterPropertyEditor(TypeInfo(string), TDADBSessionManager, 'Connection', TDASchemaConnectionsListEditor);
+
+ RegisterPropertyEditor(TypeInfo(TCollection), TDADataset, 'Fields', TCollectionProperty);
+ RegisterPropertyEditor(TypeInfo(TCollection), TDADataset, 'Params', TCollectionProperty);
+ RegisterPropertyEditor(TypeInfo(TCollection), TDADataset, 'Statements', TCollectionProperty);
+
+ RegisterPropertyEditor(TypeInfo(string), TDALoginService, 'LoginDataset', TDARemoteServiceDataSetListEditor);
+ RegisterPropertyEditor(TypeInfo(string), TDALoginService, 'LogoutCommand', TDARemoteServiceCommandListEditor);
+
+ RegisterPropertyEditor(TypeInfo(string), TDAField, 'KeyFields', TDALookupSourceProperty);
+ RegisterPropertyEditor(TypeInfo(string), TDAField, 'LookupKeyFields', TDALookupDestProperty);
+ RegisterPropertyEditor(TypeInfo(string), TDAField, 'LookupResultField', TDALookupResultFieldProperty);
+
+ {$IFDEF VER140UP}
+ RegisterCustomModule(TDARemoteService, TCustomModule);
+ RegisterCustomModule(TDALoginService, TCustomModule);
+ RegisterCustomModule(TDataAbstractService, TCustomModule);
+ RegisterCustomModule(TBaseLoginService, TCustomModule);
+ RegisterCustomModule(TSimpleLoginService, TCustomModule);
+ RegisterCustomModule(TMultiDbLoginService, TCustomModule);
+ {$ELSE}
+ RegisterCustomModule(TDARemoteService, TDataModuleDesignerCustomModule);
+ RegisterCustomModule(TDALoginService, TDataModuleDesignerCustomModule);
+ RegisterCustomModule(TDataAbstractService, TDataModuleDesignerCustomModule);
+ RegisterCustomModule(TBaseLoginService, TDataModuleDesignerCustomModule);
+ RegisterCustomModule(TSimpleLoginService, TDataModuleDesignerCustomModule);
+ RegisterCustomModule(TMultiDbLoginService, TDataModuleDesignerCustomModule);
+ {$ENDIF}
+
+ RegisterRODataModuleClass(TDataAbstractService,
+ '&Data Abstract 4.0 Service',
+ 'Data Abstract datamodule. '+
+ 'This is the preferred server type when creating a Data Abstract version 4.0 or above server.',
+ 'uRORemoteDataModule, uDAInterfaces, DataAbstractService_Impl, DataAbstract4_Intf'
+ );
+
+ RegisterRODataModuleClass(TDARemoteService,
+ 'Data Abstract &3.0 Remote Service',
+ 'Data Abstract datamodule. This is the preferred server type when creating backward-compatible version 3.0 Data Abstract server.',
+ 'uRORemoteDataModule, uDAInterfaces, DARemoteService_Impl, DataAbstract3_Intf'
+ );
+
+ RegisterCustomModule(TDAClientDataModule,TCustomModule);
+
+ { TDARemoteDataAdapter }
+ RegisterPropertiesInCategory('Dynamic Method Binding', TDARemoteDataAdapter, ['GetSchemaCall', 'GetDataCall', 'GetScriptsCall', 'UpdateDataCall']);
+
+ RegisterPropertiesInCategory('Legacy', TDAGetDataRequest, ['OutgoingParamsParameter', 'OutgoingIncludeSchemaParameter', 'OutgoingMaxRecordsParameter']);
+
+ { TDADataTable }
+ //RegisterPropertiesInCategory('Legacy v3.0', TDADataTable, ['DataRequestCall', 'DataUpdateCall', 'SchemaCall', 'ScriptCall', 'Adapter']);
+ RegisterPropertiesInCategory('Master/Detail', TDADataTable, ['MasterFields', 'MasterMappingMode', 'MasterOptions', 'MasterParamsMappings', 'MasterRequestMappings', 'MasterSource', 'DetailFields', 'DetailOptions']);
+ RegisterPropertiesInCategory('Database', TDADataTable, ['Fields', 'Params', 'LogicalName', 'IndexDefs', 'IndexName', 'Active', 'StoreActive', 'LogChanges', 'MaxRecords']);
+ RegisterPropertiesInCategory('Business Rules', TDADataTable, ['BusinessRulesID', 'ScriptCode']);
+ RegisterPropertiesInCategory('Local Data', TDADataTable, ['LocalConnection', 'LocalSchema', 'LocalDataStreamer']);
+
+ { DA Service }
+
+ { Login Services }
+ RegisterPropertiesInCategory('Login', TBaseLoginService, ['OnLogout']);
+ RegisterPropertiesInCategory('Login', TSimpleLoginService, ['OnLogin']);
+ RegisterPropertiesInCategory('Login', TMultiDbLoginService, ['OnLogin']);
+end;
+
+{$IFDEF MSWINDOWS}
+initialization
+ RegisterProduct('{261E7EA5-C380-42A4-90AC-1FA10ADB39D8}',VersionBuildNo(hInstance));
+finalization
+ UnregisterProduct('{261E7EA5-C380-42A4-90AC-1FA10ADB39D8}');
+{$ENDIF MSWINDOWS}
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/Resources.BDS.RES b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/Resources.BDS.RES
new file mode 100644
index 0000000..bfd676d
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/Resources.BDS.RES differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDAClientDataModuleDataTableWizardForm.dfm b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDAClientDataModuleDataTableWizardForm.dfm
new file mode 100644
index 0000000..32d530e
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDAClientDataModuleDataTableWizardForm.dfm
@@ -0,0 +1,180 @@
+object DAClientDataModuleDataTableWizardForm: TDAClientDataModuleDataTableWizardForm
+ Left = 417
+ Top = 173
+ BorderStyle = bsDialog
+ BorderWidth = 5
+ Caption = '%s - DataTable Wizard'
+ ClientHeight = 412
+ ClientWidth = 339
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ DesignSize = (
+ 339
+ 412)
+ PixelsPerInch = 96
+ TextHeight = 13
+ object lbl_ServerUrl1: TLabel
+ Left = 0
+ Top = 0
+ Width = 90
+ Height = 13
+ Caption = 'Select DataSets'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = [fsBold]
+ ParentFont = False
+ end
+ object lbl_ServerUrl2: TLabel
+ Left = 16
+ Top = 16
+ Width = 248
+ Height = 26
+ Caption =
+ 'Select the Datasets for that you want to generate TDADataTable ' +
+ 'components.'
+ WordWrap = True
+ end
+ object BitBtn2: TBitBtn
+ Left = 264
+ Top = 387
+ Width = 75
+ Height = 25
+ Anchors = [akLeft, akBottom]
+ Cancel = True
+ Caption = 'Cancel'
+ ModalResult = 2
+ TabOrder = 0
+ Glyph.Data = {
+ 36060000424D3606000000000000360000002800000020000000100000000100
+ 18000000000000060000C40E0000C40E00000000000000000000FF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FF00009A00009AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF00009A0000
+ 9AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6B6B6B6BFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FF6B6B6B6B6B6BFF00FFFF00FFFF00FFFF00FFFF00FF
+ 00009A174AFD103BF400009AFF00FFFF00FFFF00FFFF00FF00009A002CF80030
+ FC00009AFF00FFFF00FFFF00FFFF00FF6B6B6BA8A8A8A0A0A06B6B6BFF00FFFF
+ 00FFFF00FFFF00FF6B6B6B9A9A9A9C9C9C6B6B6BFF00FFFF00FFFF00FFFF00FF
+ 00009A1A47F81A4CFF123BF100009AFF00FFFF00FF00009A012DF60132FF002A
+ F300009AFF00FFFF00FFFF00FFFF00FF6B6B6BA7A7A7AAAAAA9F9F9F6B6B6BFF
+ 00FFFF00FF6B6B6B9999999E9E9E9797976B6B6BFF00FFFF00FFFF00FFFF00FF
+ FF00FF00009A1C47F61B4DFF143EF400009A00009A002DF80134FF032BF20000
+ 9AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BA7A7A7ABABABA2A2A26B
+ 6B6B6B6B6B9A9A9A9E9E9E9898986B6B6BFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FF00009A1D48F61D50FF103DFB0431FE0132FF002CF600009AFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BA7A7A7ACACACA3
+ A3A39F9F9F9E9E9E9999996B6B6BFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FF00009A1A48F91342FF0C3CFF0733F600009AFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BA7A7A7A7
+ A7A7A3A3A39C9C9C6B6B6BFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FF00009A214EFC1D4BFF1847FF1743F600009AFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BACACACAC
+ ACACA9A9A9A4A4A46B6B6BFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FF00009A2E5BF92C5FFF224DF8204BF82355FF1B46F600009AFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BB1B1B1B3B3B3AB
+ ABABAAAAAAAFAFAFA6A6A66B6B6BFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FF00009A3664FA386BFF2D59F400009A00009A224CF42558FF1D49F60000
+ 9AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BB6B6B6B9B9B9AEAEAE6B
+ 6B6B6B6B6BA9A9A9B0B0B0A7A7A76B6B6BFF00FFFF00FFFF00FFFF00FFFF00FF
+ 00009A4071FA4274FF325DF100009AFF00FFFF00FF00009A224DF1275AFF204C
+ F800009AFF00FFFF00FFFF00FFFF00FF6B6B6BBBBBBBBEBEBEAFAFAF6B6B6BFF
+ 00FFFF00FF6B6B6BA7A7A7B1B1B1AAAAAA6B6B6BFF00FFFF00FFFF00FFFF00FF
+ 00009A497AFC3B66F300009AFF00FFFF00FFFF00FFFF00FF00009A2550F42655
+ FA00009AFF00FFFF00FFFF00FFFF00FF6B6B6BC0C0C0B5B5B56B6B6BFF00FFFF
+ 00FFFF00FFFF00FF6B6B6BAAAAAAAEAEAE6B6B6BFF00FFFF00FFFF00FFFF00FF
+ FF00FF00009A00009AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF00009A0000
+ 9AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6B6B6B6BFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FF6B6B6B6B6B6BFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
+ NumGlyphs = 2
+ end
+ object BitBtn1: TBitBtn
+ Left = 184
+ Top = 387
+ Width = 75
+ Height = 25
+ Anchors = [akRight, akBottom]
+ Caption = 'Finish'
+ Default = True
+ ModalResult = 1
+ TabOrder = 1
+ Glyph.Data = {
+ 36060000424D3606000000000000360000002800000020000000100000000100
+ 18000000000000060000220B0000220B00000000000000000000FF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF811E00FF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FF787878FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF811E00
+ 811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FF787878787878FF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ 811E00811E00811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FF787878787878787878FF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FF811E0095440F811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF787878898989787878FF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FF811E00A7632F811E00811E00FF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF7878789F9F9F78787878
+ 7878FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FF811E00BF8B62CCA17E811E00811E00FF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF787878B8B8B8C6
+ C6C6787878787878FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FF811E00D8B69CE6D1BFE7D3C4811E00FF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF787878D1
+ D1D1E0E0E0E2E2E2787878FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FF811E00F0E2D9FCF7F2FAF0E6811E00811E
+ 00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF78
+ 7878EBEBEBF5F5F5F1F1F1787878787878FF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FF811E00D8AF96F4E2CFF0D7BDD8A784811E
+ 00811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF78
+ 7878D0D0D0E9E9E9E3E3E3CACACA787878787878FF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FF811E00F3DECAEFD4B8EBC9A7DAA67D811E00FF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF787878E7
+ E7E7E1E1E1DBDBDBC9C9C9787878FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FF811E00E7BB92E3B081E0A672D5925A811E
+ 00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF78
+ 7878D3D3D3CDCDCDC6C6C6BCBCBC787878FF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF811E00DA995ED78F50D38441CF7B
+ 35811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FF787878BFBFBFB8B8B8B2B2B2ACACAC787878FF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF811E00811E00811E00811E
+ 00811E00811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FF787878787878787878787878787878787878FF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
+ NumGlyphs = 2
+ end
+ object lb_DataSets: TCheckListBox
+ Left = 16
+ Top = 48
+ Width = 323
+ Height = 329
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ ItemHeight = 13
+ TabOrder = 2
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDAClientDataModuleDataTableWizardForm.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDAClientDataModuleDataTableWizardForm.pas
new file mode 100644
index 0000000..e48152d
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDAClientDataModuleDataTableWizardForm.pas
@@ -0,0 +1,114 @@
+unit uDAClientDataModuleDataTableWizardForm;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, StdCtrls, CheckLst, Buttons, uDAClientDataModule, DesignIntf;
+
+type
+ TDAClientDataModuleDataTableWizardForm = class(TForm)
+ BitBtn2: TBitBtn;
+ BitBtn1: TBitBtn;
+ lbl_ServerUrl1: TLabel;
+ lbl_ServerUrl2: TLabel;
+ lb_DataSets: TCheckListBox;
+ private
+ fModule:TDAClientDataModule;
+ procedure FillDataSets;
+ public
+ class function Execute(aOwner: TComponent; aModule:TDAClientDataModule; aDesigner:IDesigner):boolean;
+ end;
+
+var
+ DAClientDataModuleDataTableWizardForm: TDAClientDataModuleDataTableWizardForm;
+
+implementation
+
+uses
+ uROClasses, uDAIDERes, uRODL, uRORemoteService,
+ uDADataAbstractEditors, uDAMemDataTable, uDAClasses, uDAPleaseWaitForm;
+
+{$R *.dfm}
+
+{ TDAClientDataModuleDataTableWizardForm }
+
+class function TDAClientDataModuleDataTableWizardForm.Execute(aOwner: TComponent; aModule: TDAClientDataModule; aDesigner:IDesigner): boolean;
+var
+ i:integer;
+begin
+ if not Assigned(aModule.RemoteService) then RaiseError(err_AssignRemoteService);
+ if not Assigned(aModule.RemoteService.Channel) then RaiseError(err_AssignRemoteServiceChannel);
+ if not Assigned(aModule.RemoteService.Message) then RaiseError(err_AssignRemoteServiceMessage);
+
+ with self.Create(aOwner) do try
+
+ fModule := aModule;
+ Caption := Format(Caption,[fModule.Name]);
+ FillDataSets();
+
+ result := ShowModal() = idOk;
+ if result then begin
+
+ for i := 0 to lb_DataSets.Items.Count-1 do begin
+ if lb_DataSets.Checked[i] then begin
+ CreateDataTable(aDesigner, aModule, TDAMemDataTable, lb_DataSets.Items[i], false);
+ end;
+ end;
+
+ end;
+
+ finally
+ Free();
+ end;
+end;
+
+procedure TDAClientDataModuleDataTableWizardForm.FillDataSets;
+var
+ i: integer;
+ lSchema: TDASchema;
+ lDataSets: TStringList;
+begin
+
+ lDataSets := TStringList.Create();
+ try
+ lDataSets.Duplicates := dupIgnore;
+ lDataSets.Sorted := true;
+
+
+ lSchema := nil;
+ with CreatePleaseWaitForm(self,'Retrieving Schema...') do begin
+ fModule.GetSchema(lSchema,true);
+ Hide;
+ end;
+ try
+ for i := 0 to lSchema.Datasets.Count-1 do begin
+ lDataSets.Add(lSchema.Datasets[i].Name);
+ end; { for }
+ finally
+ lSchema.Free();
+ end;
+
+ lb_DataSets.Items.Assign(lDataSets);
+ for i := 0 to lb_Datasets.Items.Count-1 do begin
+ lb_DataSets.Checked[i] := true;
+ end; { for }
+
+ finally
+ FreeAndNil(lDataSets);
+ end;
+ {lLibrary := fModule.RemoteService.GetRODLLibrary();
+ if not Assigned (lLibrary) then RaiseError('Library could not retrieved from server');
+ try
+ lDataSets := fModule.RemoteService.GetServiceMethods();
+ for i := 0 to lDataSets.Count-1 do begin
+ p := Pos('_',lDataSets[i]);
+ if p > 0 then
+ lb_DataSets.Checked[lb_DataSets.Items.Add(Copy(lDataSets[i],p+1,Length(lDataSets[i])-p))] := true;
+ end;
+ finally
+ lLibrary.Free();
+ end; }
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDAClientDataModuleEditorForm.dfm b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDAClientDataModuleEditorForm.dfm
new file mode 100644
index 0000000..4c5220b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDAClientDataModuleEditorForm.dfm
@@ -0,0 +1,284 @@
+object DAClientDataModuleEditorForm: TDAClientDataModuleEditorForm
+ Left = 381
+ Top = 253
+ BorderStyle = bsDialog
+ BorderWidth = 5
+ Caption = '%s - ClientDataModule Editor'
+ ClientHeight = 183
+ ClientWidth = 322
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ DesignSize = (
+ 322
+ 183)
+ PixelsPerInch = 96
+ TextHeight = 13
+ object lbl_ServerUrl1: TLabel
+ Left = 0
+ Top = 0
+ Width = 66
+ Height = 13
+ Caption = 'Server URL:'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = [fsBold]
+ ParentFont = False
+ end
+ object lbl_ServerUrl2: TLabel
+ Left = 16
+ Top = 16
+ Width = 211
+ Height = 13
+ Caption = 'Select the URL of yout development server.'
+ end
+ object lbl_ServerUrl3: TLabel
+ Left = 16
+ Top = 32
+ Width = 308
+ Height = 26
+ Caption =
+ 'If you have kept the defaults when writing the server and are ru' +
+ 'nning the server on this machine, the default value will be ok:'
+ WordWrap = True
+ end
+ object Label4: TLabel
+ Left = 0
+ Top = 96
+ Width = 77
+ Height = 13
+ Caption = 'Service Name'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = [fsBold]
+ ParentFont = False
+ end
+ object Label5: TLabel
+ Left = 16
+ Top = 112
+ Width = 228
+ Height = 13
+ Caption = 'Select the Service that you want to connect to:'
+ end
+ object btn_CreateTables: TBitBtn
+ Left = 62
+ Top = 158
+ Width = 126
+ Height = 25
+ Anchors = [akRight, akBottom]
+ Caption = 'Create DataTables'
+ ModalResult = 1
+ TabOrder = 0
+ OnClick = btn_CreateTablesClick
+ Glyph.Data = {
+ 36060000424D3606000000000000360000002800000020000000100000000100
+ 18000000000000060000130B0000130B00000000000000000000FF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF08750D08750D08750D0875
+ 0DFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FF8C8C8C8C8C8C8C8C8C8C8C8CFF00FFFF00FFFF00FFFF00FFFF00FF
+ 0E80AA0E80AA0E80AA0E80AA0E80AA0E80AAFF00FF08750D13AA2210A61D0875
+ 0DFF00FFFF00FFFF00FFFF00FFFF00FF83838383838383838383838383838383
+ 8383FF00FF8C8C8CA3A3A3A1A1A18C8C8CFF00FFFF00FFFF00FFFF00FF078DBB
+ 49D5EE23D7FE36D9FE6FE6FF8DE7FA44BADD0E80AA08750D1AB12D16AD260875
+ 0DFF00FFFF00FFFF00FFFF00FF878787AFAFAFA8A8A8AFAFAFC3C3C3CCCCCCA8
+ A8A88383838C8C8CA8A8A8A5A5A58C8C8CFF00FFFF00FFFF00FF078DBB8CFBFE
+ 59EAFE23D7FE36D8FD6CE0F808750D08750D08750D08750D22B93B1DB5320875
+ 0D08750D08750D08750D878787CDCDCDBBBBBBA8A8A8AEAEAEC0C0C08C8C8C8C
+ 8C8C8C8C8C8C8C8CADADADAAAAAA8C8C8C8C8C8C8C8C8C8C8C8C078DBB8CFBFE
+ 59EAFE23D7FE36D8FD6CE0F808750D3CD46236CF5A30C9522CC34926BE4121B8
+ 381CB43117AF2A08750D878787CDCDCDBBBBBBA8A8A8AEAEAEC0C0C08C8C8CC0
+ C0C0BCBCBCB8B8B8B4B4B4B1B1B1ACACACAAAAAAA6A6A68C8C8C078DBB8CFBFE
+ 59EAFE23D7FE36D9FE6CE1F908750D44DD703FD8683AD26035CD582FC74F2AC1
+ 4725BD3E20B83608750D878787CDCDCDBBBBBBA8A8A8AFAFAFC0C0C08C8C8CC6
+ C6C6C2C2C2BFBFBFBBBBBBB7B7B7B3B3B3B0B0B0ACACAC8C8C8C078DBBB3FCFE
+ B6F6FFC6F5FFE3FAFFE9F9FD08750D08750D08750D08750D3ED76638D15E0875
+ 0D08750D08750D08750D878787DADADADCDCDCE1E1E1ECECECEDEDED8C8C8C8C
+ 8C8C8C8C8C8C8C8CC2C2C2BDBDBD8C8C8C8C8C8C8C8C8C8C8C8C078DBBBAEEF6
+ 30BCDD11A7D2129FCB20A1CA35A7CD2692BF92CEE408750D46DE7341DA6D0875
+ 0DFF00FFFF00FFFF00FF878787DADADAA1A1A19292929090909595959D9D9D93
+ 9393C6C6C68C8C8CC7C7C7C4C4C48C8C8CFF00FFFF00FFFF00FF078DBB4AC5DD
+ 59EAFE23D7FE36D9FE6FE6FF8DE7FA49C1E30682B608750D4DE67F49E2790875
+ 0DFF00FFFF00FFFF00FF878787AAAAAABBBBBBA8A8A8AFAFAFC3C3C3CCCCCCAC
+ ACAC8585858C8C8CCCCCCCC9C9C98C8C8CFF00FFFF00FFFF00FF078DBB8CFBFE
+ 59EAFE23D7FE36D9FE6FE6FF8DE7FA49C1E3089DCF08750D08750D08750D0875
+ 0DFF00FFFF00FFFF00FF878787CDCDCDBBBBBBA8A8A8AFAFAFC3C3C3CCCCCCAC
+ ACAC8E8E8E8C8C8C8C8C8C8C8C8C8C8C8CFF00FFFF00FFFF00FF078DBB8CFBFE
+ 59EAFE23D7FE36D9FE6FE6FF8DE7FA49C1E3089CCE0E7FA9FF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FF878787CDCDCDBBBBBBA8A8A8AFAFAFC3C3C3CCCCCCAC
+ ACAC8E8E8E838383FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF078DBB8CFBFE
+ 59EAFE23D7FE36D9FE6FE6FF8DE7FA49C1E3089DCF0E80AAFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FF878787CDCDCDBBBBBBA8A8A8AFAFAFC3C3C3CCCCCCAC
+ ACAC8E8E8E838383FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF078DBB91FCFE
+ 82F8FF6FF8FF7AFEFF97FEFFA0FCFE63DAF50DA2D40E80AAFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FF878787CECECEC9C9C9C3C3C3C7C7C7D1D1D1D4D4D4BB
+ BBBB919191838383FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF078DBBFCFFFF
+ F4FFFFD3FFFFB4FFFFADFFFFADFFFFA9FFFF72F9FE0E80AAFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FF878787F4F4F4F1F1F1E6E6E6DBDBDBD9D9D9D9D9D9D7
+ D7D7C4C4C4838383FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF0C92C0
+ F1FBFDE4FFFFC7FFFFAEFFFFA8FFFF9BFBFC1385AFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FF8A8A8AF0F0F0ECECECE2E2E2D9D9D9D7D7D7D1
+ D1D1878787FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ 078DBB078DBB078DBB078DBB078DBB078DBBFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FF87878787878787878787878787878787
+ 8787FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
+ NumGlyphs = 2
+ end
+ object BitBtn2: TBitBtn
+ Left = 259
+ Top = 158
+ Width = 63
+ Height = 25
+ Anchors = [akLeft, akBottom]
+ Cancel = True
+ Caption = 'Cancel'
+ ModalResult = 2
+ TabOrder = 1
+ OnClick = BitBtn2Click
+ Glyph.Data = {
+ 36060000424D3606000000000000360000002800000020000000100000000100
+ 18000000000000060000C40E0000C40E00000000000000000000FF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FF00009A00009AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF00009A0000
+ 9AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6B6B6B6BFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FF6B6B6B6B6B6BFF00FFFF00FFFF00FFFF00FFFF00FF
+ 00009A174AFD103BF400009AFF00FFFF00FFFF00FFFF00FF00009A002CF80030
+ FC00009AFF00FFFF00FFFF00FFFF00FF6B6B6BA8A8A8A0A0A06B6B6BFF00FFFF
+ 00FFFF00FFFF00FF6B6B6B9A9A9A9C9C9C6B6B6BFF00FFFF00FFFF00FFFF00FF
+ 00009A1A47F81A4CFF123BF100009AFF00FFFF00FF00009A012DF60132FF002A
+ F300009AFF00FFFF00FFFF00FFFF00FF6B6B6BA7A7A7AAAAAA9F9F9F6B6B6BFF
+ 00FFFF00FF6B6B6B9999999E9E9E9797976B6B6BFF00FFFF00FFFF00FFFF00FF
+ FF00FF00009A1C47F61B4DFF143EF400009A00009A002DF80134FF032BF20000
+ 9AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BA7A7A7ABABABA2A2A26B
+ 6B6B6B6B6B9A9A9A9E9E9E9898986B6B6BFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FF00009A1D48F61D50FF103DFB0431FE0132FF002CF600009AFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BA7A7A7ACACACA3
+ A3A39F9F9F9E9E9E9999996B6B6BFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FF00009A1A48F91342FF0C3CFF0733F600009AFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BA7A7A7A7
+ A7A7A3A3A39C9C9C6B6B6BFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FF00009A214EFC1D4BFF1847FF1743F600009AFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BACACACAC
+ ACACA9A9A9A4A4A46B6B6BFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FF00009A2E5BF92C5FFF224DF8204BF82355FF1B46F600009AFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BB1B1B1B3B3B3AB
+ ABABAAAAAAAFAFAFA6A6A66B6B6BFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FF00009A3664FA386BFF2D59F400009A00009A224CF42558FF1D49F60000
+ 9AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BB6B6B6B9B9B9AEAEAE6B
+ 6B6B6B6B6BA9A9A9B0B0B0A7A7A76B6B6BFF00FFFF00FFFF00FFFF00FFFF00FF
+ 00009A4071FA4274FF325DF100009AFF00FFFF00FF00009A224DF1275AFF204C
+ F800009AFF00FFFF00FFFF00FFFF00FF6B6B6BBBBBBBBEBEBEAFAFAF6B6B6BFF
+ 00FFFF00FF6B6B6BA7A7A7B1B1B1AAAAAA6B6B6BFF00FFFF00FFFF00FFFF00FF
+ 00009A497AFC3B66F300009AFF00FFFF00FFFF00FFFF00FF00009A2550F42655
+ FA00009AFF00FFFF00FFFF00FFFF00FF6B6B6BC0C0C0B5B5B56B6B6BFF00FFFF
+ 00FFFF00FFFF00FF6B6B6BAAAAAAAEAEAE6B6B6BFF00FFFF00FFFF00FFFF00FF
+ FF00FF00009A00009AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF00009A0000
+ 9AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6B6B6B6BFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FF6B6B6B6B6B6BFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
+ NumGlyphs = 2
+ end
+ object ed_ServerUrl: TEdit
+ Left = 16
+ Top = 64
+ Width = 306
+ Height = 21
+ Anchors = [akLeft, akTop, akRight]
+ TabOrder = 2
+ OnChange = ed_ServerUrlChange
+ end
+ object cb_Services: TComboBox
+ Left = 16
+ Top = 128
+ Width = 306
+ Height = 21
+ Anchors = [akLeft, akTop, akRight]
+ ItemHeight = 13
+ TabOrder = 3
+ OnChange = cb_ServicesChange
+ OnCloseUp = cb_ServicesChange
+ OnEnter = cb_ServicesEnter
+ OnExit = cb_ServicesChange
+ end
+ object BitBtn1: TBitBtn
+ Left = 193
+ Top = 158
+ Width = 61
+ Height = 25
+ Anchors = [akRight, akBottom]
+ Caption = 'Finish'
+ Default = True
+ ModalResult = 1
+ TabOrder = 4
+ Glyph.Data = {
+ 36060000424D3606000000000000360000002800000020000000100000000100
+ 18000000000000060000220B0000220B00000000000000000000FF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF811E00FF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FF787878FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF811E00
+ 811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FF787878787878FF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ 811E00811E00811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FF787878787878787878FF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FF811E0095440F811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF787878898989787878FF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FF811E00A7632F811E00811E00FF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF7878789F9F9F78787878
+ 7878FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FF811E00BF8B62CCA17E811E00811E00FF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF787878B8B8B8C6
+ C6C6787878787878FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FF811E00D8B69CE6D1BFE7D3C4811E00FF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF787878D1
+ D1D1E0E0E0E2E2E2787878FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FF811E00F0E2D9FCF7F2FAF0E6811E00811E
+ 00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF78
+ 7878EBEBEBF5F5F5F1F1F1787878787878FF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FF811E00D8AF96F4E2CFF0D7BDD8A784811E
+ 00811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF78
+ 7878D0D0D0E9E9E9E3E3E3CACACA787878787878FF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FF811E00F3DECAEFD4B8EBC9A7DAA67D811E00FF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF787878E7
+ E7E7E1E1E1DBDBDBC9C9C9787878FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FF811E00E7BB92E3B081E0A672D5925A811E
+ 00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF78
+ 7878D3D3D3CDCDCDC6C6C6BCBCBC787878FF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF811E00DA995ED78F50D38441CF7B
+ 35811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FF787878BFBFBFB8B8B8B2B2B2ACACAC787878FF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF811E00811E00811E00811E
+ 00811E00811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FF787878787878787878787878787878787878FF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
+ NumGlyphs = 2
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDAClientDataModuleEditorForm.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDAClientDataModuleEditorForm.pas
new file mode 100644
index 0000000..c5a26ff
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDAClientDataModuleEditorForm.pas
@@ -0,0 +1,148 @@
+unit uDAClientDataModuleEditorForm;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, uDAClientDataModule, StdCtrls, Buttons, DesignIntf;
+
+type
+ TDAClientDataModuleEditorForm = class(TForm)
+ btn_CreateTables: TBitBtn;
+ BitBtn2: TBitBtn;
+ lbl_ServerUrl1: TLabel;
+ ed_ServerUrl: TEdit;
+ lbl_ServerUrl2: TLabel;
+ lbl_ServerUrl3: TLabel;
+ Label4: TLabel;
+ Label5: TLabel;
+ cb_Services: TComboBox;
+ BitBtn1: TBitBtn;
+ procedure ed_ServerUrlChange(Sender: TObject);
+ procedure cb_ServicesEnter(Sender: TObject);
+ procedure BitBtn2Click(Sender: TObject);
+ procedure btn_CreateTablesClick(Sender: TObject);
+ procedure cb_ServicesChange(Sender: TObject);
+ private
+ fServerUrlChanged: boolean;
+ fRestoreServerUrl: string;
+ fModule:TDAClientDataModule;
+ fCreateDataTables: boolean;
+ procedure FillServiceCombo;
+
+ public
+ class function Execute(aOwner: TCOmponent; aModule:TDAClientDataModule; aDesigner:IDesigner):boolean;
+ end;
+
+var
+ DAClientDataModuleEditorForm: TDAClientDataModuleEditorForm;
+
+implementation
+
+uses
+ uROClasses, TypInfo, uDAIDERes, uDAPleaseWaitForm,
+ uDAClientDataModuleDataTableWizardForm;
+
+{$R *.dfm}
+
+{ TDAClientDataModuleEditorForm }
+
+class function TDAClientDataModuleEditorForm.Execute(aOwner: TCOmponent; aModule: TDAClientDataModule; aDesigner:IDesigner): boolean;
+begin
+ if not Assigned(aModule.RemoteService) then RaiseError(err_AssignRemoteService);
+ if not Assigned(aModule.RemoteService.Channel) then RaiseError(err_AssignRemoteServiceChannel);
+ if not Assigned(aModule.RemoteService.Message) then RaiseError(err_AssignRemoteServiceMessage);
+
+ with self.Create(aOwner) do try
+
+ fModule := aModule;
+ Caption := Format(Caption,[fModule.Name]);
+
+
+ try
+ fRestoreServerUrl := GetStrProp(fModule.RemoteService.Channel,'TargetURL');
+ ed_ServerUrl.Text := fRestoreServerUrl;
+ fServerUrlChanged := false;
+ except
+ ed_ServerUrl.Enabled := false;
+ lbl_ServerUrl1.Enabled := false;
+ lbl_ServerUrl2.Enabled := false;
+ lbl_ServerUrl3.Enabled := false;
+ end;
+
+ FillServiceCombo();
+ cb_Services.ItemIndex := cb_Services.Items.IndexOf(fModule.RemoteService.ServiceName);
+ cb_ServicesChange(nil);
+
+ result := ShowModal() = idOk;
+ if result then begin
+ if ed_ServerUrl.Enabled then SetStrProp(fModule.RemoteService.Channel,'TargetURL',ed_ServerUrl.Text);
+ fModule.RemoteService.ServiceName := cb_Services.Text;
+
+ if fCreateDataTables then begin
+ TDAClientDataModuleDataTableWizardForm.Execute(aOwner, fModule, aDesigner);
+ end;
+
+ end;
+
+ finally
+ Free();
+ end;
+end;
+
+procedure TDAClientDataModuleEditorForm.ed_ServerUrlChange(
+ Sender: TObject);
+begin
+ fServerUrlChanged := true;
+end;
+
+procedure TDAClientDataModuleEditorForm.FillServiceCombo;
+var
+ lServiceNames: IROStrings;
+ i:integer;
+begin
+ Screen.Cursor := crHourGlass;
+ try
+ cb_Services.Items.Clear();
+ lServiceNames := fModule.RemoteService.GetServiceNames();
+ if Assigned(lServiceNames) then begin
+ for i := 0 to (lServiceNames.Count-1) do
+ cb_Services.Items.Add(lServiceNames[i]);
+ end
+ else begin
+ cb_Services.Text := '';
+ end;
+ cb_ServicesChange(nil);
+ finally
+ Screen.Cursor := crDefault;
+ end;
+end;
+
+procedure TDAClientDataModuleEditorForm.cb_ServicesEnter(Sender: TObject);
+begin
+ if fServerUrlChanged then begin
+ if ed_ServerUrl.Enabled then begin
+ SetStrProp(fModule.RemoteService.Channel,'TargetURL',ed_ServerUrl.Text);
+ FillServiceCombo();
+ end;
+ fServerUrlChanged := true;
+ end
+end;
+
+procedure TDAClientDataModuleEditorForm.BitBtn2Click(Sender: TObject);
+begin
+ if ed_ServerUrl.Enabled then
+ SetStrProp(fModule.RemoteService.Channel,'TargetURL',fRestoreServerUrl);
+end;
+
+procedure TDAClientDataModuleEditorForm.btn_CreateTablesClick(Sender: TObject);
+begin
+ fCreateDataTables := true;
+end;
+
+procedure TDAClientDataModuleEditorForm.cb_ServicesChange(Sender: TObject);
+begin
+ btn_CreateTables.Enabled := cb_Services.Text <> '';
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDAClientDataModuleWizard.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDAClientDataModuleWizard.pas
new file mode 100644
index 0000000..8ced8e8
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDAClientDataModuleWizard.pas
@@ -0,0 +1,394 @@
+unit uDAClientDataModuleWizard;
+
+{$I DataAbstract.inc}
+
+interface
+
+uses DesignEditors, ToolsAPI, Windows, ActnList, Menus, Classes;
+
+const CRLF = #13#10; // Carriage-return line-feed.
+
+resourcestring
+ sBasicDfmSource =
+ 'object %0:s: T%0:s' + crlf +
+ ' Left = 200' + crlf +
+ ' Top = 200' + crlf +
+ ' Height = 300' + crlf +
+ ' Width = 300' + crlf +
+ ' RemoteService = RORemoteService' + crlf +
+ ' Adapter = DABinAdapter' + crlf +
+ ' SchemaCall.MethodName = ''GetSchemaAsXML''' + crlf +
+ ' SchemaCall.Params = <' + crlf +
+ ' item' + crlf +
+ ' Name = ''Result''' + crlf +
+ ' ParamType = fResult' + crlf +
+ ' DataType = rtString' + crlf +
+ ' end>' + crlf +
+ ' object ROChannel: TROWinInetHTTPChannel' + crlf +
+ ' UserAgent = ''RemObjects SDK''' + crlf +
+ ' TargetURL = ''http://localhost:8099/bin''' + crlf +
+ ' Left = 40' + crlf +
+ ' Top = 8' + crlf +
+ ' end' + crlf +
+ ' object ROMessage: TROBinMessage' + crlf +
+ ' Left = 40' + crlf +
+ ' Top = 52' + crlf +
+ ' end' + crlf +
+ ' object RORemoteService: TRORemoteService' + crlf +
+ ' Message = ROMessage' + crlf +
+ ' Channel = ROChannel' + crlf +
+ ' Left = 40' + crlf +
+ ' Top = 96' + crlf +
+ ' end' + crlf +
+ ' object DABinAdapter: TDABINAdapter' + crlf +
+ ' Left = 40' + crlf +
+ ' Top = 144' + crlf +
+ ' end' + crlf +
+ 'end';
+
+ sBasicFormSource =
+ 'unit %0:s;' + crlf +
+ crlf +
+ 'interface' + crlf +
+ crlf +
+ 'uses {vcl:} SysUtils, Classes, DB, DBClient, ' + crlf +
+ ' {RemObjects:} %3:s;' + crlf +
+ crlf +
+ 'type' + crlf +
+ ' T%1:s = class(%2:s)' + crlf +
+ ' ROChannel: TROWinInetHTTPChannel;' + crlf +
+ ' ROMessage: TROBinMessage;' + crlf +
+ ' RORemoteService: TRORemoteService;' + crlf +
+ ' DABinAdapter: TDABINAdapter;' + crlf +
+ ' private' + crlf +
+ ' { Private declarations }' + crlf +
+ ' public' + crlf +
+ ' { Public declarations }' + crlf +
+ ' end;' + crlf +
+ crlf +
+ 'var' + crlf +
+ ' %1:s: T%1:s;' + crlf +
+ crlf +
+ 'implementation' + crlf +
+ crlf +
+ '{$R *.DFM}' + crlf +
+ crlf +
+ 'initialization' + crlf +
+ 'end.' ;
+
+type TSourceFile = class(TInterfacedObject, IOTAFile)
+ private
+ fAge: TDateTime;
+ fSource:string;
+ public
+ function GetSource: string;
+ function GetAge: TDateTime;
+ constructor Create(const iSource:string);
+ end;
+
+ TBaseFormCreator = class(TInterfacedObject, IOTAModuleCreator)
+ public
+ function GetCreatorType: string;
+ function GetExisting: Boolean;
+ function GetFileSystem: string;
+ function GetOwner: IOTAModule;
+ function GetUnnamed: Boolean;
+
+ function GetAncestorName: string;
+ function GetImplFileName: string;
+ function GetIntfFileName: string;
+ function GetFormName: string;
+ function GetMainForm: Boolean;
+ function GetShowForm: Boolean;
+ function GetShowSource: Boolean;
+ function NewFormFile(const FormIdent, AncestorIdent: string): IOTAFile;
+ function NewImplSource(const ModuleIdent, FormIdent, AncestorIdent: string): IOTAFile;
+ function NewIntfSource(const ModuleIdent, FormIdent, AncestorIdent: string): IOTAFile;
+
+ procedure FormCreated(const FormEditor: IOTAFormEditor);
+ end; { TBaseFormCreator }
+
+ TNewModuleExpert = class(TInterfacedObject,
+ IOTAWizard,
+ IOTARepositoryWizard,
+ IOTAFormWizard,
+ {$IFDEF BDS}
+ IOTARepositoryWizard80,
+ {$ENDIF}
+ IOTARepositoryWizard60)
+ public
+
+ constructor Create();
+ destructor Destroy(); override;
+
+ procedure AfterSave;
+ procedure BeforeSave;
+ procedure Destroyed;
+ procedure Modified;
+
+ procedure Execute;
+ function GetAuthor: String;
+ function GetComment: String;
+ function GetGlyph: Cardinal;
+ function GetIDString: String;
+ function GetName: String;
+ function GetPage: String;
+ function GetState: TWizardState;
+ function GetDesigner: String;
+
+ {$IFDEF BDS}
+ function GetGalleryCategory: IOTAGalleryCategory;
+ function GetPersonality: string;
+ {$ENDIF}
+
+ end;
+
+procedure Register;
+
+implementation
+
+uses SysUtils, Graphics,
+ uRORes, uDADataAbstractEditors, Dialogs, uDAClientDataModuleEditorForm, Forms,
+ uDAClientDataModule;
+
+{ TBaseFormCreator }
+
+procedure TBaseFormCreator.FormCreated(const FormEditor: IOTAFormEditor);
+begin
+
+end;
+
+function TBaseFormCreator.GetAncestorName: string;
+begin
+ result := 'TDAClientDataModule';
+end;
+
+function TBaseFormCreator.GetCreatorType: string;
+begin
+ result := sForm;
+end;
+
+function TBaseFormCreator.GetExisting: Boolean;
+begin
+ result := false;
+end;
+
+function TBaseFormCreator.GetFileSystem: string;
+begin
+ result := '';
+end;
+
+function TBaseFormCreator.GetFormName: string;
+begin
+ result := '';
+end;
+
+function TBaseFormCreator.GetImplFileName: string;
+begin
+ result := '';
+end;
+
+function TBaseFormCreator.GetIntfFileName: string;
+begin
+ result := '';
+end;
+
+function TBaseFormCreator.GetMainForm: Boolean;
+begin
+ result := false;
+end;
+
+function TBaseFormCreator.GetOwner: IOTAModule;
+var
+ ModuleServices: IOTAModuleServices;
+ Module: IOTAModule;
+ NewModule: IOTAModule;
+begin
+ Result := nil;
+ if BorlandIDEServices.QueryInterface(IOTAModuleServices, ModuleServices) =
+S_OK then
+ begin
+ Module := ModuleServices.CurrentModule;
+ if Module <> nil then
+ if Module.GetOwnerCount > 0 then
+ begin
+ NewModule := Module.GetOwner(0);
+ if NewModule <> nil then
+ if NewModule.QueryInterface(IOTAProject, Result) <> S_OK then
+ Result := nil;
+ end;
+ end;
+end;
+
+function TBaseFormCreator.GetShowForm: Boolean;
+begin
+ result := true;
+end;
+
+function TBaseFormCreator.GetShowSource: Boolean;
+begin
+ result := true;
+end;
+
+function TBaseFormCreator.GetUnnamed: Boolean;
+begin
+ result := true;
+end;
+
+function RemoveInitialT(const iString:string):string;
+begin
+ result := iString;
+ if (result <> '') and (result[1] = 'T') then Delete(result,1,1);
+ //ShowMessage(iString+' '+result);
+end;
+
+function TBaseFormCreator.NewFormFile(const FormIdent,
+ AncestorIdent: string): IOTAFile;
+begin
+ result := TSourceFile.Create(Format(sBasicDfmSource,[RemoveInitialT(FormIdent)]));
+end;
+
+function TBaseFormCreator.NewImplSource(const ModuleIdent, FormIdent,
+ AncestorIdent: string): IOTAFile;
+begin
+ result := TSourceFile.Create(Format(sBasicFormSource,[ModuleIdent,RemoveInitialT(FormIdent),AncestorIdent,'uDAClientDataModule']));
+end;
+
+function TBaseFormCreator.NewIntfSource(const ModuleIdent, FormIdent,
+ AncestorIdent: string): IOTAFile;
+begin
+
+end;
+
+{ TSourceFile }
+
+constructor TSourceFile.Create(const iSource: string);
+begin
+ inherited Create();
+ fSource := iSource;
+ fAge := Now;
+end;
+
+function TSourceFile.GetAge: TDateTime;
+begin
+ result := fAge;
+end;
+
+function TSourceFile.GetSource: string;
+begin
+ result := fSource;
+end;
+
+{ TNewModuleExpert }
+
+constructor TNewModuleExpert.Create;
+begin
+ inherited;
+end;
+
+destructor TNewModuleExpert.Destroy;
+begin
+ inherited;
+end;
+
+procedure TNewModuleExpert.Execute;
+var
+ lModuleServices: IOTAModuleServices;
+ lModuleCreator: IOTAModuleCreator;
+ lModule: IOTAModule;
+begin
+ if BorlandIDEServices.QueryInterface(IOTAModuleServices, lModuleServices) = S_OK then
+ begin
+ lModuleCreator := TBaseFormCreator.Create();
+ lModule := lModuleServices.CreateModule(lModuleCreator);
+ TDAClientDataModuleEditorForm.Execute(Application,
+ (lModule.GetCurrentEditor as INTAFormEditor).FormDesigner.Root as TDAClientDataModule,
+ (lModule.GetCurrentEditor as INTAFormEditor).FormDesigner);
+ end;
+end;
+
+function TNewModuleExpert.GetAuthor: String;
+begin
+ result := 'RemObjects Software';
+end;
+
+function TNewModuleExpert.GetComment: String;
+begin
+ result := 'Data Abstract ClientDataModule';
+end;
+
+function TNewModuleExpert.GetGlyph: Cardinal;
+begin
+ result := LoadIcon(hInstance,'DAClientDataModule');
+end;
+
+function TNewModuleExpert.GetIDString: String;
+begin
+ result := 'RemObjectsDAClientDataModule';
+end;
+
+function TNewModuleExpert.GetName: String;
+begin
+ result := 'Data Abstract ClientDataModule';
+end;
+
+function TNewModuleExpert.GetPage: String;
+begin
+ result := 'RemObjects Data Abstract';
+end;
+
+{$IFDEF BDS}
+function TNewModuleExpert.GetGalleryCategory: IOTAGalleryCategory;
+var
+ lGalleryManager: IOTAGalleryCategoryManager;
+begin
+ lGalleryManager := BorlandIDEServices as IOTAGalleryCategoryManager;
+ result := lGalleryManager.FindCategory('RemObjectsDataAbstractDelphi');
+end;
+
+function TNewModuleExpert.GetPersonality: string;
+begin
+ result := sDelphiPersonality;
+end;
+{$ENDIF}
+
+function TNewModuleExpert.GetState: TWizardState;
+begin
+ result := [wsEnabled];
+end;
+
+procedure TNewModuleExpert.AfterSave;
+begin
+
+end;
+
+procedure TNewModuleExpert.BeforeSave;
+begin
+
+end;
+
+procedure TNewModuleExpert.Destroyed;
+begin
+
+end;
+
+procedure TNewModuleExpert.Modified;
+begin
+
+end;
+
+procedure Register;
+begin
+ //RegisterPackageWizard(TNewModuleExpert.Create as IOTAFormWizard);
+end;
+
+{$R 'uDAClientModuleWizard.res' 'uDAClientModuleWizard.rc'}
+
+function TNewModuleExpert.GetDesigner: String;
+begin
+ Result := dAny;
+end;
+
+initialization
+finalization
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDAClientModuleWizard.res b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDAClientModuleWizard.res
new file mode 100644
index 0000000..dd81d99
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDAClientModuleWizard.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDADBSessionManagerEditor.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDADBSessionManagerEditor.pas
new file mode 100644
index 0000000..5f20234
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDADBSessionManagerEditor.pas
@@ -0,0 +1,166 @@
+unit uDADBSessionManagerEditor;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - IDE Library
+{
+{ compiler: Delphi 6 and up, Kylix 3 and up
+{ platform: Win32, Linux
+{
+{ (c)opyright RemObjects Software. all rights reserved.
+{
+{ Using this code requires a valid license of the Data Abstract
+{ which can be obtained at http://www.remobjects.com.
+{----------------------------------------------------------------------------}
+
+{$IFDEF MSWINDOWS}
+{$I ..\DataAbstract.inc}
+{$ENDIF MSWINDOWS}
+{$IFDEF LINUX}
+{$I ../DataAbstract.inc}
+{$ENDIF LINUX}
+
+interface
+
+uses
+ Classes, DesignIntf, DesignEditors,
+ uDAClasses;
+
+type
+ TDASchemaItemListEditor = class(TStringProperty)
+ protected
+ function GetSchema: TDASchema; virtual;
+
+ public
+ function GetAttributes: TPropertyAttributes; override;
+ procedure SetValue(const Value: string); override;
+ property Schema: TDASchema read GetSchema;
+ end;
+
+ TDASchemaCommandListEditor = class(TDASchemaItemListEditor)
+ public
+ procedure GetValues(Proc: TGetStrProc); override;
+ end;
+
+ TDASchemaDataSetListEditor = class(TDASchemaItemListEditor)
+ public
+ procedure GetValues(Proc: TGetStrProc); override;
+ end;
+
+ TDARemoteServiceDataSetListEditor = class(TDASchemaDataSetListEditor)
+ protected
+ function GetSchema: TDASchema; override;
+
+ end;
+
+ TDARemoteServiceCommandListEditor = class(TDASchemaCommandListEditor)
+ protected
+ function GetSchema: TDASchema; override;
+
+ end;
+
+ TDASchemaCommandAndDataSetListEditor = class(TDASchemaItemListEditor)
+ public
+ procedure GetValues(Proc: TGetStrProc); override;
+ end;
+
+ TDASchemaConnectionsListEditor = class(TDASchemaItemListEditor)
+ public
+ procedure GetValues(Proc: TGetStrProc); override;
+ end;
+
+implementation
+
+uses
+ uDADBSessionManager, Dialogs, DARemoteService_Impl;
+
+{ TDASchemaItemListEditor }
+
+function TDASchemaItemListEditor.GetAttributes: TPropertyAttributes;
+begin
+ result := [paValueList, paSortList]
+end;
+
+function TDASchemaItemListEditor.GetSchema: TDASchema;
+begin
+ result := (GetComponent(0) as TDADBSessionManager).Schema;
+end;
+
+procedure TDASchemaItemListEditor.SetValue(const Value: string);
+begin
+ inherited;
+
+end;
+
+{ TDASchemaCommandListEditor }
+
+procedure TDASchemaCommandListEditor.GetValues(Proc: TGetStrProc);
+var
+ i: integer;
+begin
+ if Assigned(Schema) then begin
+ for i := 0 to Schema.Commands.Count - 1 do begin
+ Proc(Schema.Commands[i].Name);
+ end;
+ end;
+end;
+
+{ TDASchemaDataSetListEditor }
+
+procedure TDASchemaDataSetListEditor.GetValues(Proc: TGetStrProc);
+var
+ i: integer;
+begin
+ if Assigned(Schema) then begin
+ for i := 0 to Schema.Datasets.Count - 1 do begin
+ Proc(Schema.Datasets[i].Name);
+ end;
+ end;
+end;
+
+{ TDASchemaCommandAndDataSetListEditor }
+
+procedure TDASchemaCommandAndDataSetListEditor.GetValues(Proc: TGetStrProc);
+var
+ i: integer;
+begin
+ if Assigned(Schema) then begin
+ for i := 0 to Schema.Datasets.Count - 1 do begin
+ Proc(Schema.Datasets[i].Name);
+ end;
+ if (Schema.Datasets.Count > 0) and (Schema.Commands.Count > 0) then
+ Proc('---');
+
+ for i := 0 to Schema.Commands.Count - 1 do begin
+ Proc(Schema.Commands[i].Name);
+ end;
+ end;
+end;
+
+{ TDASchemaConnectionsListEditor }
+
+procedure TDASchemaConnectionsListEditor.GetValues(Proc: TGetStrProc);
+var
+ i: integer;
+begin
+ if Assigned(Schema) and Assigned(Schema.ConnectionManager) then begin
+ for i := 0 to Schema.ConnectionManager.Connections.Count - 1 do begin
+ Proc(Schema.ConnectionManager.Connections[i].Name);
+ end;
+ end;
+end;
+
+{ TDARemoteServiceDataSetListEditor }
+
+function TDARemoteServiceDataSetListEditor.GetSchema: TDASchema;
+begin
+ result := (GetComponent(0) as TDARemoteService).ServiceSchema;
+end;
+
+{ TDARemoteServiceCommandListEditor }
+
+function TDARemoteServiceCommandListEditor.GetSchema: TDASchema;
+begin
+ result := (GetComponent(0) as TDARemoteService).ServiceSchema;
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDADataAbstractEditors.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDADataAbstractEditors.pas
new file mode 100644
index 0000000..a313f25
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDADataAbstractEditors.pas
@@ -0,0 +1,1291 @@
+unit uDADataAbstractEditors;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - IDE Library
+{
+{ compiler: Delphi 6 and up, Kylix 3 and up
+{ platform: Win32, Linux
+{
+{ (c)opyright RemObjects Software. all rights reserved.
+{
+{ Using this code requires a valid license of the Data Abstract
+{ which can be obtained at http://www.remobjects.com.
+{----------------------------------------------------------------------------}
+
+{$IFDEF MSWINDOWS}
+{$I ..\DataAbstract.inc}
+{$ENDIF MSWINDOWS}
+{$IFDEF LINUX}
+{$I ../DataAbstract.inc}
+{$ENDIF LINUX}
+
+interface
+
+uses
+ Windows, Classes, uDAClasses, DesignIntf, DesignEditors, uRODL, ColnEdit,uDARes,
+ uDAClientDataModule, uDADataTable, uDARemoteDataAdapter, uROClient, SysUtils,
+ uRORemoteService;
+
+type { TDADriverManagerEditor }
+ TDADriverManagerEditor = class(TComponentEditor)
+ private
+ public
+ procedure ExecuteVerb(Index: Integer); override;
+ function GetVerb(Index: Integer): string; override;
+ function GetVerbCount: Integer; override;
+ end;
+
+ { TDAConnectionManagerEditor }
+ TDAConnectionManagerEditor = class(TComponentEditor)
+ private
+ public
+ procedure ExecuteVerb(Index: Integer); override;
+ function GetVerb(Index: Integer): string; override;
+ function GetVerbCount: Integer; override;
+ end;
+
+ { TDADataDictionaryEditor }
+ TDADataDictionaryEditor = class(TComponentEditor)
+ private
+ public
+ procedure ExecuteVerb(Index: Integer); override;
+ function GetVerb(Index: Integer): string; override;
+ function GetVerbCount: Integer; override;
+ end;
+
+ { TDASchemaEditor }
+ TDASchemaEditor = class(TComponentEditor)
+ protected
+ public
+ procedure ExecuteVerb(Index: Integer); override;
+ function GetVerb(Index: Integer): string; override;
+ function GetVerbCount: Integer; override;
+ end;
+
+ { TDADesigntimeCallEditor }
+ TDADesigntimeCallEditor = class(TComponentEditor)
+ protected
+ public
+ procedure ExecuteVerb(Index: Integer); override;
+ function GetVerb(Index: Integer): string; override;
+ function GetVerbCount: Integer; override;
+ end;
+
+ { TDADataRequestCallMethodNameEditor }
+ TDADataRequestCallMethodNameEditor = class(TStringProperty)
+ private
+ function RetrieveLibrary: TRODLLibrary;
+
+ protected
+ public
+ function GetAttributes: TPropertyAttributes; override;
+ procedure GetValues(Proc: TGetStrProc); override;
+ procedure SetValue(const Value: string); override;
+ end;
+
+ { TDALoginAwareComponentEditor }
+ TDALoginAwareComponentEditor = class(TComponentEditor)
+ protected
+ fRemoteService: TRORemoteService;
+ function GetAdapterSchema(aAdapter: TDARemoteDataAdapter): TDASchema;
+ procedure OnLoginNeeded(Sender: TROTransportChannel; anException: Exception; var aRetry: Boolean);
+ end;
+
+ { TDADataTableEditor }
+ TDADataTableEditor = class(TDALoginAwareComponentEditor)
+ protected
+ public
+ procedure ExecuteVerb(Index: Integer); override;
+ function GetVerb(Index: Integer): string; override;
+ function GetVerbCount: Integer; override;
+ end;
+
+ { TDARemoteDataAdapterEditor }
+ TDARemoteDataAdapterEditor = class(TDALoginAwareComponentEditor)
+ private
+ fDataTables: TStringList;
+ function HookUpDataTables: boolean;
+ procedure GetDataTables(const aName: string);
+ public
+ procedure ExecuteVerb(Index: Integer); override;
+ function GetVerb(Index: Integer): string; override;
+ function GetVerbCount: Integer; override;
+ end;
+
+ { TDADataTableMasterDetailProps }
+ {$IFDEF MSWINDOWS}
+ TDADataTableMasterDetailProps = class(TStringProperty)
+ protected
+ public
+ function GetAttributes: TPropertyAttributes; override;
+ procedure Edit; override;
+ end;
+ {$ENDIF MSWINDOWS}
+
+ { TDABusinessProcessorCommandProperty }
+ TDABusinessProcessorCommandProperty = class(TStringProperty)
+ protected
+ public
+ function GetAttributes: TPropertyAttributes; override;
+ procedure GetValues(Proc: TGetStrProc); override;
+ end;
+
+ { TDABusinessProcessorRefDatasetProperty }
+ TDABusinessProcessorRefDatasetProperty = class(TStringProperty)
+ protected
+ public
+ function GetAttributes: TPropertyAttributes; override;
+ procedure GetValues(Proc: TGetStrProc); override;
+ end;
+
+ { TDACollectionProperty }
+ TDACollectionProperty = class(TCollectionProperty)
+ private
+ protected
+ public
+ procedure Edit; override;
+ function GetAttributes: TPropertyAttributes; override;
+ end;
+
+ { TDADataTableLogicalNameEditor }
+ TDADataTableLogicalNameEditor = class(TStringProperty)
+ private
+ function GetSchema: TDASchema;
+ public
+ function GetAttributes: TPropertyAttributes; override;
+ procedure GetValues(Proc: TGetStrProc); override;
+ end;
+
+ { TDACollectionItemDatasetNameEditor }
+ TDACollectionItemDatasetNameEditor = class(TStringProperty)
+ private
+ public
+ function GetAttributes: TPropertyAttributes; override;
+ procedure GetValues(Proc: TGetStrProc); override;
+ end;
+
+ { TDADataTableLocalConnection }
+ TDADataTableLocalConnection = class(TStringProperty)
+ private
+ public
+ function GetAttributes: TPropertyAttributes; override;
+ procedure GetValues(Proc: TGetStrProc); override;
+ end;
+
+ { TDADriverManagerDirectory }
+ TDADriverManagerDirectory = class(TStringProperty)
+ private
+ public
+ function GetAttributes: TPropertyAttributes; override;
+ procedure GetValues(Proc: TGetStrProc); override;
+ procedure SetValue(const Value: string); override;
+ end;
+
+ { TDADataTableReferenceDataTable }
+ TDADataTableReferenceDataTable = class(TComponentProperty)
+ public
+ procedure GetValues(Proc: TGetStrProc); override;
+ end;
+
+ { TDALookupSourceProperty }
+ TDALookupSourceProperty = class(TStringProperty)
+ private
+ public
+ function GetAttributes: TPropertyAttributes; override;
+ procedure GetValues(Proc: TGetStrProc); override;
+ end;
+
+ { TDALookupDestProperty }
+ TDALookupDestProperty = class(TStringProperty)
+ private
+ public
+ function GetAttributes: TPropertyAttributes; override;
+ procedure GetValues(Proc: TGetStrProc); override;
+ end;
+
+ { TDALookupResultFieldProperty }
+ TDALookupResultFieldProperty = class(TDALookupDestProperty)
+ private
+ public
+ function GetAttributes: TPropertyAttributes; override;
+ procedure SetValue(const Value: string); override;
+ end;
+
+implementation
+
+uses
+ Dialogs, ToolsAPI, ShellAPI, Graphics, Controls, FileCtrl,
+ TypInfo, Forms, ClipBrd, DB,
+ uROTypes,
+ uDAUtils, uDADriverManager, uDADriverInfo, uDASupportClasses,
+ uROClasses,
+ {$IFDEF MSWINDOWS}
+ uROIDETools, uROIDEMenu, uROPleaseWaitForm, uDASchemaUnitsGenerator,
+ uDAIDEMenu, uDADataTableMasterLinkWizardForm, uDAPleaseWaitForm,
+ {$ENDIF MSWINDOWS}
+ uRODLToXML, uDAInterfaces, uDABusinessProcessor, uDAIDERes,
+ IniFiles, Registry, uDAIDEData, uDADesigntimeCall, uDASelectDataTablesForm,
+ uRODynamicRequest, uDADataTableWizards, uROLoginNeededForm;
+
+{ TDASchemaEditor }
+
+const
+ {$IFDEF MSWINDOWS}
+ COMMAND_INDEX_EDIT = 0;
+ COMMAND_INDEX_PUBLISH = 1;
+ COMMAND_INDEX_SEPARATOR_1 = 2;
+ COMMAND_INDEX_SAVE = 3;
+ COMMAND_INDEX_LOAD = 4;
+ COMMAND_INDEX_SEPARATOR_2 = 5;
+ COMMAND_INDEX_GENCODE = 6;
+ COMMAND_INDEX_GENCONSTS = 7;
+ {$ENDIF MSWINDOWS}
+ {$IFDEF LINUX}
+ COMMAND_INDEX_EDIT = -1;
+ COMMAND_INDEX_PUBLISH = -2;
+ COMMAND_INDEX_SAVE = 0;
+ COMMAND_INDEX_LOAD = 1;
+ {$ENDIF LINUX}
+
+procedure TDASchemaEditor.ExecuteVerb(Index: Integer);
+var
+ schema :TDASchema;
+ connmgr : TDAConnectionManager;
+ lSchemaAge:integer;
+ sfname,
+ cmfname, dadname,diagramname :string;
+ i, x : integer;
+ s : string;
+ lDesigner:IDesignerNotify;
+ params: TStringList;
+begin
+ schema := GetComponent as TDASchema;
+ connmgr := schema.ConnectionManager;
+
+ {$IFDEF MSWINDOWS}
+ if (Index=COMMAND_INDEX_GENCONSTS) then begin
+ params := TStringList.Create;
+ with schema do try
+ params.Sorted := TRUE;
+
+ s := '';
+ if Datasets.Count>0 then begin
+ s := Format(' { Dataset names contained in schema "%s" }',[schema.Name])+#13#10;
+ for i := 0 to (Datasets.Count-1) do begin
+ s := s+Format(' ds_%s = ''%s'';', [MakeValidIdentifier(Datasets[i].Name), Datasets[i].Name])+#13#10;
+ end;
+ end;
+
+ if Commands.Count>0 then begin
+ s := s+#13#10+Format(' { Command names contained in schema "%s"}',[schema.Name])+#13#10;
+ for i := 0 to (Commands.Count-1) do begin
+ s := s+Format(' cmd_%s = ''%s'';', [MakeValidIdentifier(Commands[i].Name), Commands[i].Name])+#13#10;
+ end;
+ end;
+
+ s := s+' { Dataset and command parameters }'+#13#10;
+ for i := 0 to (Datasets.Count-1) do begin
+ for x := 0 to (Datasets[i].Params.Count-1) do begin
+ // Checks for duplicates
+ if params.IndexOf(UpperCase(Datasets[i].Params[x].Name))<0
+ then params.Add(UpperCase(Datasets[i].Params[x].Name))
+ else Continue;
+
+ s := s+Format(' par_%s = ''%s'';', [Datasets[i].Params[x].Name, Datasets[i].Params[x].Name])+#13#10;
+ end;
+ end;
+
+ for i := 0 to (Commands.Count-1) do begin
+ for x := 0 to (Commands[i].Params.Count-1) do begin
+ // Checks for duplicates
+ if params.IndexOf(UpperCase(Commands[i].Params[x].Name))<0
+ then params.Add(UpperCase(Commands[i].Params[x].Name))
+ else Continue;
+
+ s := s+Format(' par_%s = ''%s'';', [Commands[i].Params[x].Name, Commands[i].Params[x].Name])+#13#10;
+ end;
+ end;
+ finally
+ params.Free;
+ end;
+
+ Clipboard.AsText := s;
+ Exit;
+ end;
+ {$ENDIF MSWINDOWS}
+
+ if (Index<>COMMAND_INDEX_LOAD) {$IFDEF MSWINDOWS} and (Index<>COMMAND_INDEX_GENCODE) {$ENDIF} then begin
+ Check(connmgr=NIL, 'The schema doesn''t have a connection manager associated. Cannot launch Schema Modeler');
+
+ if (Index=COMMAND_INDEX_SAVE) then begin
+ sfname := schema.Name;
+ if not PromptForFileName(sfname, 'Data Abstract Schema (*'+daFileExtSchemaFile+')|*'+daFileExtSchemaFile+'|All Files (*.*)|*.*', daFileExtSchemaFile, 'Save Schema '+schema.Name, '', TRUE)
+ then Exit;
+ end
+ else begin
+ sfname := GetTempFileName(daFileExtSchemaFile);
+ end;
+
+ schema.SaveToFile(sfname, pfXML);
+ lSchemaAge := FileAge(sfname);
+
+ cmfname := ChangeFileExt(sfname, daFileExtConnectionMgrFile);
+ connmgr.SaveToFile(cmfname, pfXML);
+
+ dadname := '';
+ if Assigned(schema.DataDictionary) then begin
+ dadname := ChangeFileExt(sfname, daFileExtDataDictionaryFile);
+ schema.DataDictionary.SaveToFile(dadname, pfXML);
+ end;
+
+ diagramname := '';
+ if Assigned(schema.Diagrams) then begin
+ diagramname := ChangeFileExt(sfname, DAFileExtDiagramsFile);
+ schema.Diagrams.SaveToFile(diagramname);
+ end;
+
+ if (Index=COMMAND_INDEX_LOAD) then Exit; // Only wants to save!
+
+ case Index of
+ {$IFDEF MSWINDOWS}
+ COMMAND_INDEX_EDIT:try
+ with CreatePleaseWaitForm('Running the Schema Modeler...') do try
+ Show();
+ ExecuteAndWait(GetSchemaModelerPath, '/ns /platform:Delphi /projectname:"'+GetComponent().Name+'" /autosave /schemafile:"'+sfname+'"');
+ Hide();
+ finally
+ Free();
+ end;
+
+ if lSchemaAge < FileAge(sfname) then begin
+
+ schema.LoadFromFile(sfname, pfXML);
+ Designer.Modified();
+
+ connmgr.LoadFromFile(cmfname, pfXML);
+ lDesigner := FindRootDesigner(connmgr);
+ if Assigned(lDesigner) then lDesigner.Modified();
+
+ if dadname <> '' then begin
+ schema.DataDictionary.LoadFromFile(dadname, pfXML);
+ lDesigner := FindRootDesigner(schema.DataDictionary);
+ if Assigned(lDesigner) then lDesigner.Modified();
+ end;
+
+ if diagramname <> '' then begin
+ schema.Diagrams.LoadFromFile(diagramname);
+ lDesigner := FindRootDesigner(schema.DataDictionary);
+ if Assigned(lDesigner) then lDesigner.Modified();
+ end;
+
+ end;
+ finally
+ DeleteFile(sfname);
+ DeleteFile(cmfname);
+ if dadname <> '' then DeleteFile(dadname);
+ end;
+ COMMAND_INDEX_PUBLISH:try
+ with CreatePleaseWaitForm('Running the Service Builder...') do try
+ Show();
+ {$IFDEF SB2}
+ LaunchServiceBuilderForCurrentProject('/dataabstract-import-schema /schemafile:"'+sfname+'" /schemacomponentname:"'+schema.Name+'" /ServiceName:"'+schema.Owner.Name+'"',true,true);
+ {$ELSE}
+ LaunchServiceBuilderForCurrentProject('/execute:"DataAbstract.PublishSchemaWizard" /execute-options:"Schema='+sfname+';ServiceName='+schema.Owner.Name+';SchemaComponentName='+schema.Name+'"',true,true);
+ {$ENDIF}
+ Hide();
+ finally
+ Free();
+ end;
+ finally
+ DeleteFile(sfname);
+ DeleteFile(cmfname);
+ if dadname <> '' then DeleteFile(dadname);
+ if diagramname <> '' then DeleteFile(diagramname);
+ end;
+ {$ENDIF MSWINDOWS}
+ COMMAND_INDEX_SAVE:exit;
+ end;
+ end
+
+ {$IFDEF MSWINDOWS}
+ else if (Index=COMMAND_INDEX_GENCODE) then begin
+ //MessageDlg('Not available yet', mtWarning, [mbOK], 0);
+ GenerateSchemaUnits(schema);
+ end
+ {$ENDIF MSWINDOWS}
+
+ else begin
+ if PromptForFileName(sfname, 'Data Abstract Schema (*'+daFileExtSchemaFile+')|*'+daFileExtSchemaFile+'|All Files (*.*)|*.*', daFileExtSchemaFile, 'Load Schema') then begin
+ schema.LoadFromFile(sfname, pfXML);
+ Designer.Modified;
+ end;
+ end;
+end;
+
+function TDASchemaEditor.GetVerb(Index: Integer): string;
+begin
+ case Index of
+ {$IFDEF MSWINDOWS}
+ COMMAND_INDEX_SEPARATOR_1,
+ COMMAND_INDEX_SEPARATOR_2 : result := '-';
+ {$ENDIF MSWINDOWS}
+ COMMAND_INDEX_EDIT : result := 'Edit '+GetComponent.Name;
+ COMMAND_INDEX_PUBLISH : result := 'Publish '+GetComponent.Name+'...';
+ COMMAND_INDEX_SAVE : result := 'Save '+GetComponent.Name+' to Disk...';
+ COMMAND_INDEX_LOAD : result := 'Load '+GetComponent.Name+' from Disk...';
+ {$IFDEF MSWINDOWS}
+ COMMAND_INDEX_GENCODE : result := 'Generate '+GetComponent.Name+' strongly-typed access units...';
+ COMMAND_INDEX_GENCONSTS : result := 'Copy Dataset and Command Names to Clipboard';
+ {$ENDIF MSWINDOWS}
+ end;
+end;
+
+function TDASchemaEditor.GetVerbCount: Integer;
+begin
+ {$IFDEF MSWINDOWS}
+ result := 8;
+ {$ENDIF MSWINDOWS}
+ {$IFDEF LINUX}
+ result := 4;
+ {$ENDIF LINUX}
+end;
+
+{ TDADriverManagerEditor }
+
+procedure TDADriverManagerEditor.ExecuteVerb(Index: Integer);
+var
+ s : string;
+ i: Integer;
+ sl : IROStrings;
+ dm : TDADriverManager;
+begin
+ dm := TDADriverManager(GetComponent);
+ s := '';
+
+ case Index of
+ 0 : ShowDriverInfo(dm);
+
+ 1: begin
+ if (dm.DriverCount=0) then begin
+ MessageDlg('No drivers to unload.', mtWarning, [mbOK], 0);
+ end
+ else begin
+ dm.UnloadAllDrivers;
+ MessageDlg('Drivers unloaded.', mtInformation, [mbOK], 0);
+ end;
+ end;
+
+ 2 : begin
+ if (dm.DriverDirectory='') then begin
+ MessageDlg('DriverDirectory is empty. Cannot load drivers.', mtWarning, [mbOK], 0);
+ end
+ else begin
+ dm.ListDrivers(dm.DriverDirectory, sl);
+ if (sl.Count=0) then begin
+ MessageDlg('No drivers were found', mtInformation, [mbOK], 0);
+ end
+ else begin
+ {$IFDEF MSWINOWS}
+ with CreatePleaseWaitForm('Loading Drivers...') do try
+ {$ENDIF MSWINOWS}
+ for i := 0 to sl.Count-1 do try
+ {$IFDEF MSWINOWS}
+ Show(Format('Loading %s...',[ExtractFileName(sl[i])]));
+ {$ENDIF MSWINOWS}
+ dm.LoadDriver(sl[i]);
+ except
+ on E:EDADriverAlreadyLoaded do;
+ on E:EDASchemaModelerOnly do;
+ on E:Exception do begin
+ {$IFDEF MSWINOWS}
+ Hide();
+ {$ENDIF MSWINOWS}
+ ShowMessageFmt('There was an error loading the %s driver:'#13#13'%s: %s',[ExtractFileName(sl[i]),E.ClassName,E.Message]);
+ end;
+ end; { for }
+ {$IFDEF MSWINOWS}
+ end;
+ {$ENDIF MSWINOWS}
+ MessageDlg(IntToStr(dm.DriverCount)+' Drivers loaded.', mtInformation, [mbOK], 0);
+ end;
+ end;
+ end;
+ end;
+end;
+
+function TDADriverManagerEditor.GetVerb(Index: Integer): string;
+var dir : string;
+begin
+ case Index of
+ 0 : result := 'Display Driver Information...';
+ 1 : result := 'Unload All Drivers';
+ 2 : begin
+ dir := TranslateFileName(TDADriverManager(GetComponent).DriverDirectory);
+ if (dir='')
+ then dir := '';
+ result := 'Load Drivers in '+dir;
+ end;
+ end;
+end;
+
+function TDADriverManagerEditor.GetVerbCount: Integer;
+begin
+ result := 3;
+end;
+
+{ TDAConnectionManagerEditor }
+
+procedure TDAConnectionManagerEditor.ExecuteVerb(Index: Integer);
+var connmgr : TDAConnectionManager;
+ sfname : string;
+begin
+ connmgr := GetComponent as TDAConnectionManager;
+ sfname := connmgr.Name+daFileExtConnectionMgrFile;
+
+ case Index of
+ 0:begin
+ ShowCollectionEditor(Designer, connmgr, connmgr.Connections, 'Connections');
+ end;
+
+ 1 : {separator};
+
+ 2 : begin
+ if not PromptForFileName(sfname, 'Data Abstract Connections (*'+daFileExtConnectionMgrFile+')|*'+daFileExtConnectionMgrFile+'|All Files (*.*)|*.*', daFileExtConnectionMgrFile, 'Save Connections '+connmgr.Name, '', TRUE)
+ then Exit;
+
+ connmgr.SaveToFile(sfname, pfXML);
+ end;
+
+ 3: begin
+ if not PromptForFileName(sfname, 'Data Abstract Connections (*'+daFileExtConnectionMgrFile+')|*'+daFileExtConnectionMgrFile+'|All Files (*.*)|*.*', DAFileExtConnectionMgrFile, 'Load Connections '+connmgr.Name, '')
+ then Exit;
+
+ connmgr.LoadFromFile(sfname, pfXML);
+ Designer.Modified;
+ end;
+ end;
+end;
+
+function TDAConnectionManagerEditor.GetVerb(Index: Integer): string;
+begin
+ case Index of
+ 0 : result := 'Connection List Editor';
+ 1 : result := '-';
+ 2 : result := 'Save '+GetComponent.Name+' To Disk...';
+ 3 : result := 'Load '+GetComponent.Name+' From Disk...';
+ end;
+end;
+
+function TDAConnectionManagerEditor.GetVerbCount: Integer;
+begin
+ result := 4;
+end;
+
+{ TDADataRequestAccessParamEditor }
+
+procedure CheckCondition(InvalidSituation : boolean; const anErrorMessage : string);
+begin
+ if InvalidSituation then begin
+ MessageDlg(anErrorMessage, mtError, [mbOK], 0);
+ Abort;
+ end;
+end;
+
+
+{ TDADataRequestCallMethodNameEditor }
+
+function TDADataRequestCallMethodNameEditor.GetAttributes: TPropertyAttributes;
+begin
+ result := [paValueList]
+end;
+
+function TDADataRequestCallMethodNameEditor.RetrieveLibrary : TRODLLibrary;
+var datamethod : TDARemoteRequest;
+ //datatable : TDADataTable;
+ //adapter : TDADataAdapter;
+ rs : TRORemoteService;
+ svcname : string;
+begin
+ //result := NIL;
+
+ // Sets the variable we need
+ datamethod := GetComponent(0) as TDARemoteRequest;
+ rs := datamethod.RemoteService;
+
+ CheckCondition(rs=NIL, 'RemoteService must be assigned.');
+
+ svcname := Trim(rs.ServiceName);
+ CheckCondition(svcname='', rs.Name+'.ServiceName must be assigned.');
+
+ {adapter := datamethod.Owner.Adapter;
+ CheckCondition(adapter=NIL, 'The Adpater property is not set');}
+
+ result := rs.GetRODLLibrary;
+end;
+
+procedure TDADataRequestCallMethodNameEditor.GetValues(Proc: TGetStrProc);
+var lib : TRODLLibrary;
+ i,j : integer;
+ svc : TRODLService;
+ svcintf : TRODLServiceInterface;
+ svcname : string;
+ sl : IROStrings;
+ anchestors : TList;
+ method: TDARemoteRequest;
+begin
+ lib := RetrieveLibrary;
+ if not assigned(lib) then
+ raise Exception.Create('RODL library could npt be retrieved from server.');
+
+ anchestors := TList.Create;
+ try
+
+ method := GetComponent(0) as TDARemoteRequest;
+ svcname := method.RemoteService.ServiceName;
+
+ svc := lib.FindService(svcname);
+ if not assigned(svc) then raise Exception.Create('Service "'+svcname+'" could not be found in RODL.');
+
+ repeat
+ anchestors.Add(svc.Default);
+ if (Trim(svc.Ancestor)<>'') then begin
+ svc := lib.FindService(svc.Ancestor);
+ if not assigned(svc) then break;
+ end
+ else break;
+ until false;
+
+ // Methods
+ sl := NewROStrings;
+ sl.Sorted := TRUE;
+
+ for i := 0 to anchestors.Count-1 do begin
+ svcintf := TRODLServiceInterface(anchestors[i]);
+
+ for j := 0 to (svcintf.Count-1) do begin
+ {if (svcintf.Items[i].Result=NIL) or
+ not (StrToDataType(svcintf.Items[i].Result.DataType)=method.Owner.Adapter.TargetDataType)
+ then Continue;}
+
+ sl.Add(svcintf.Items[j].Name);
+ end;
+ end;
+
+ for i := 0 to (sl.Count-1)
+ do Proc(sl[i]);
+
+ finally
+ anchestors.Free;
+ end;
+end;
+
+procedure TDADataRequestCallMethodNameEditor.SetValue(const Value: string);
+var
+ lRemoteRequest: TDARemoteRequest;
+ lOldMethodName: String;
+begin
+ lRemoteRequest := TDARemoteRequest(GetComponent(0));
+ lOldMethodName := lRemoteRequest.MethodName;
+ lRemoteRequest.MethodName := Value;
+ if (Trim(lOldMethodName) <> Trim(Value))
+ then Designer.Modified();
+
+ if (Trim(Value)='') then Exit;
+
+ if MessageDlg('Do you want to retrieve the parameters of the method '+Value+'?', mtConfirmation, [mbYes, mbNo], 0) = mrYes then begin
+ {$IFDEF MSWINOWS}
+ with CreatePleaseWaitForm('Retrieving Parameters...') do begin
+ {$ENDIF MSWINOWS}
+ lRemoteRequest.RefreshParams(true);
+ {$IFDEF MSWINOWS}
+ Hide();
+ Designer.Modified();
+ end;
+ {$ENDIF MSWINOWS}
+ end;
+
+end;
+
+{ TDALoginAwareComponentEditor }
+
+procedure TDALoginAwareComponentEditor.OnLoginNeeded(Sender: TROTransportChannel; anException: Exception; var aRetry: Boolean);
+begin
+ aRetry := TROLoginNeededForm.Execute(fRemoteService);
+end;
+
+function TDALoginAwareComponentEditor.GetAdapterSchema(aAdapter: TDARemoteDataAdapter): TDASchema;
+var
+ lSaved: TROExceptionEvent;
+begin
+ if aAdapter.RemoteService.Channel = nil then
+ raise EROException.Create('Channel not assigned');
+ lSaved := aAdapter.RemoteService.Channel.OnLoginNeeded;
+ aAdapter.RemoteService.Channel.OnLoginNeeded := OnLoginNeeded;
+ try
+ fRemoteService := aAdapter.RemoteService;
+ result := aAdapter.ReadSchema(True);
+ finally
+ aAdapter.RemoteService.Channel.OnLoginNeeded := lSaved;
+ end;
+end;
+
+{ TDARemoteDataAdapterEditor }
+
+procedure TDARemoteDataAdapterEditor.GetDataTables(const aName: string);
+begin
+ fDataTables.Add(aName);
+end;
+
+function TDARemoteDataAdapterEditor.HookUpDataTables: boolean;
+var
+ lForm: TDASelectDataTablesForm;
+ i: integer;
+begin
+ fDataTables := TStringList.Create;
+ try
+ fDataTables.Sorted := true;
+ Designer.GetComponentNames(GetTypeData(TypeInfo(TDADataTable)), GetDataTables);
+ if fDataTables.Count > 0 then begin
+ lForm := TDASelectDataTablesForm.Create(nil);
+ try
+ for i := 0 to fDataTables.Count - 1 do begin
+ lForm.lb_DataTables.Items.AddObject(fDataTables[i], nil);
+ lForm.lb_DataTables.Checked[lForm.lb_DataTables.Items.Count-1] := not assigned((Designer.GetComponent(fDataTables[i]) as TDADataTable).RemoteDataAdapter);
+ end;
+ lForm.UpdateCheckBoxState();
+ lForm.OkButtonCaption := '&Hook Up';
+ result := (lForm.ShowModal() = idOk);
+ if result then begin
+ for i := 0 to lForm.lb_DataTables.Items.Count - 1 do
+ if lForm.lb_DataTables.Checked[i] then
+ (Designer.GetComponent(lForm.lb_DataTables.Items[i]) as TDADataTable).RemoteDataAdapter := TDARemoteDataAdapter(GetComponent);
+ end;
+ finally
+ FreeAndNil(lForm);
+ end;
+ end
+ else begin
+ result := false;
+ ShowMessage('No data tables were found on module.')
+ end;
+ finally
+ FreeAndNil(fDataTables);
+ end;
+end;
+
+procedure TDARemoteDataAdapterEditor.ExecuteVerb(Index: Integer);
+var
+ lAdapter: TDARemoteDataAdapter;
+begin
+ lAdapter := TDARemoteDataAdapter(GetComponent);
+ case Index of
+ 0: lAdapter.SetupDefaultRequest();
+ 1: lAdapter.SetupDefaultRequestV3();
+ 2: exit{ Separator };
+ 3: if not HookUpDataTables() then exit;
+ 4: if not TDataTableWizards.CreateDataTables(Designer, lAdapter, GetAdapterSchema(lAdapter), Point(0,0)) then exit;
+ end;
+ Designer.Modified();
+end;
+
+function TDARemoteDataAdapterEditor.GetVerb(Index: Integer): string;
+begin
+ case Index of
+ 0 : result := '&Reset Calls to Default';
+ 1 : result := 'Reset Calls to Default (Legacy v&3.0)';
+ 2 : result := '-';
+ 3 : result := '&Hook up Data Tables...';
+ 4 : result := '&Create Data Tables...';
+ end;
+end;
+
+function TDARemoteDataAdapterEditor.GetVerbCount: Integer;
+begin
+ result := 5;
+end;
+
+{ TDADataTableEditor }
+
+procedure TDADataTableEditor.ExecuteVerb(Index: Integer);
+var
+ dt: TDADataTable;
+ ds: TDADataset;
+ lTempSchema: TDASchema;
+ lTempSchemaDataSet: TDADataset;
+ s: string;
+ lSaved: TROExceptionEvent;
+begin
+ dt := TDADataTable(GetComponent);
+
+ case Index of
+ 0:begin
+ ShowCollectionEditor(Designer, dt, dt.Fields, 'Fields');
+ end;
+ 1:{ Seperator };
+ 2:begin
+ if not (MessageDlg('Do you want to retrieve the schema of '+dt.Name+'?'#13+
+ 'This will overwrite the current field and parameter settings.',
+ mtWarning, [mbYes, mbNo], 0)=mrYes) then Exit;
+
+ if dt.LogicalName = '' then
+ raise Exception.Create('LogicalName must be set.');
+
+ if assigned(dt.RemoteDataAdapter) then begin
+ (dt.RemoteDataAdapter as TDARemoteDataAdapter).CheckProperties();
+ fRemoteService := (dt.RemoteDataAdapter as TDARemoteDataAdapter).RemoteService;
+ lSaved := fRemoteService.Channel.OnLoginNeeded;
+ fRemoteService.Channel.OnLoginNeeded := OnLoginNeeded;
+ (dt.RemoteDataAdapter as TDARemoteDataAdapter).FlushSchema;
+ try
+ dt.LoadSchema(true, true);
+ finally
+ fRemoteService.Channel.OnLoginNeeded := lSaved;
+ end;
+ end
+ else if assigned(dt.LocalSchema) and assigned(dt.LocalDataStreamer) then begin
+ ds := dt.LocalSchema.Datasets.DatasetByName(dt.LogicalName);
+ dt.Fields.AssignFieldCollection(ds.Fields);
+ dt.Params.AssignParamCollection(ds.Params);
+ end
+ else begin
+ MessageDlg('Either RemoteDataAdapter or LocalSchema/LocalDataStreamer must be assigned.', mtError, [mbOK], 0);
+ Exit;
+ end;
+
+ s := 'Schema loaded successfully. '+IntToStr(dt.Fields.Count)+' fields';
+ if (dt.Params.Count>0) then s := s+' and '+IntToStr(dt.Params.Count)+' params';
+ s := s+' have been created. Original lookup- and client calculated fields have been preserved.';
+
+ MessageDlg(s, mtInformation, [mbOK], 0);
+
+ Designer.Modified;
+ end;
+ {$IFDEF MSWINDOWS}
+ 3: if TDADataTableMasterLinkWizard.ExecuteWizard(dt, Designer) then
+ Designer.Modified();
+ 4:{ Seperator };
+ 5:begin
+ lTempSchema := TDASchema.Create(NIL);
+ try
+ lTempSchema.Name := MakeValidIdentifier(dt.LogicalName);
+ if lTempSchema.Name = '' then lTempSchema.Name := dt.Name;
+
+ lTempSchemaDataSet := lTempSchema.Datasets.Add();
+ lTempSchemaDataSet.Name := lTempSchema.Name;
+ lTempSchemaDataSet.Fields.AssignFieldCollection(dt.Fields);
+
+ GenerateSchemaUnits(lTempSchema);
+ finally
+ lTempSchema.Free;
+ end;
+ end;
+ 6:{ Seperator };
+ 7:begin
+ with TDAIdeData.Create(nil) do try
+ if dlg_OpenBriefcase.Execute then begin
+ dt.LoadFromFile(dlg_OpenBriefcase.Filename);
+ Designer.Modified();
+ end;
+ finally
+ Free();
+ end;
+ end;
+ 8:begin
+ if not dt.Active then
+ raise Exception.Create('DataTable is not active.');
+
+ with TDAIdeData.Create(nil) do try
+ if dlg_SaveBriefcase.Execute then begin
+ dt.SaveToFile(dlg_SaveBriefcase.Filename);
+ end;
+ finally
+ Free();
+ end;
+ end;
+ 10:begin
+ if dt.LogicalName = '' then
+ raise Exception.Create('LogicalName must be set.');
+
+ if assigned(dt.RemoteDataAdapter) then begin
+ (dt.RemoteDataAdapter as TDARemoteDataAdapter).CheckProperties();
+ fRemoteService := (dt.RemoteDataAdapter as TDARemoteDataAdapter).RemoteService;
+ lSaved := fRemoteService.Channel.OnLoginNeeded;
+ fRemoteService.Channel.OnLoginNeeded := OnLoginNeeded;
+ try
+ dt.Open();
+ finally
+ fRemoteService.Channel.OnLoginNeeded := lSaved;
+ end;
+ end;
+ Designer.Modified;
+ end;
+
+ {$ENDIF MSWINDOWS}
+ end; { case }
+end;
+
+function TDADataTableEditor.GetVerb(Index: Integer): string;
+begin
+ case Index of
+ 0 : result := 'Field Collection Editor';
+ 1 : result := '-';
+ //2 : result := 'Dynamic Method Binding Setup Wizard (Legacy v3.0)';
+ //3 : result := '-';
+ 2 : result := 'Retrieve DataTable Schema';
+ 3 : result := 'Master/Detail Wizard';
+ 4 : result := '-';
+ 5 : result := 'Generate Business Class...';
+ 6 : result := '-';
+ 7 : result := 'Load Data from briefcase file...';
+ 8 : result := 'Save Data to briefcase file...';
+ 9 : result := '-';
+ 10 : result := 'Get Design-Time Data';
+ end;
+end;
+
+function TDADataTableEditor.GetVerbCount: Integer;
+begin
+ {$IFDEF MSWINDOWS}
+ result := 9;
+ if not TDADataTable(GetComponent).Active and (assigned(TDADataTable(GetComponent).RemoteDataAdapter)) then inc(result,2);
+ {$ENDIF MSWINDOWS}
+ {$IFDEF LINUX}
+ result := 3;
+ {$ENDIF LINUX}
+end;
+
+{ TDABusinessProcessorCommandProperty }
+
+function TDABusinessProcessorCommandProperty.GetAttributes: TPropertyAttributes;
+begin
+ result := [paValueList, paSortList]
+end;
+
+procedure TDABusinessProcessorCommandProperty.GetValues(Proc: TGetStrProc);
+var biz : TDABusinessProcessor;
+ i : integer;
+ list : IROStrings;
+begin
+ biz := GetComponent(0) as TDABusinessProcessor;
+ if (biz.Schema=NIL) then Exit;
+
+ list := NewROStrings;
+ for i := 0 to (biz.Schema.Commands.Count-1) do
+ list.Add(biz.Schema.Commands[i].Name);
+
+ list.Sorted := TRUE;
+
+ for i := 0 to (list.Count-1) do
+ Proc(list[i]);
+end;
+
+type
+ TPersistentCracker = class(TPersistent);
+
+{ TDACollectionProperty }
+
+procedure TDACollectionProperty.Edit;
+var coll : TCollection;
+begin
+ coll := GetObjectProp(GetComponent(0), GetName) as TCollection;
+
+ if (coll=NIL) then ShowMessage('no way!')
+ else showmessage(GetName+' has #'+INtToSTr(coll.count)+' '+TComponent(integer(coll.Owner)).ClassName);
+
+ ShowCollectionEditor(Designer, TComponent(GetComponent(0)), coll, GetName);
+end;
+
+function TDACollectionProperty.GetAttributes: TPropertyAttributes;
+begin
+ result := [paDialog, paReadOnly];
+end;
+
+{ TDABusinessProcessorRefDatasetProperty }
+
+function TDABusinessProcessorRefDatasetProperty.GetAttributes: TPropertyAttributes;
+begin
+ result := [paValueList, paSortList]
+end;
+
+procedure TDABusinessProcessorRefDatasetProperty.GetValues( Proc: TGetStrProc);
+var biz : TDABusinessProcessor;
+ i : integer;
+ list : IROStrings;
+begin
+ biz := GetComponent(0) as TDABusinessProcessor;
+ if (biz.Schema=NIL) then Exit;
+
+ list := NewROStrings;
+ for i := 0 to (biz.Schema.Datasets.Count-1) do
+ list.Add(biz.Schema.Datasets[i].Name);
+
+ list.Sorted := TRUE;
+
+ for i := 0 to (list.Count-1) do
+ Proc(list[i]);
+end;
+
+{ TDADataTableLogicalNameEditor }
+
+function TDADataTableLogicalNameEditor.GetAttributes: TPropertyAttributes;
+begin
+ result := [paValueList, paSortList]
+end;
+
+function TDADataTableLogicalNameEditor.GetSchema: TDASchema;
+begin
+ Result:=nil;
+ try
+ with TDADataTable(GetComponent(0)) do
+ if not RemoteFetchEnabled then
+ Result := LocalSchema
+ else if (RemoteDataAdapter <> nil) and (RemoteDataAdapter is TDARemoteDataAdapter) then
+ Result:= (RemoteDataAdapter as TDARemoteDataAdapter).Schema;
+ except
+ // hide exception, when RDA can't receive SCHEMA
+ end;
+end;
+
+procedure TDADataTableLogicalNameEditor.GetValues(Proc: TGetStrProc);
+var i : integer;
+ _Schema: TDASchema;
+begin
+ _Schema:= GetSchema;
+ if _Schema <> nil then begin
+ for i := 0 to (_Schema.Datasets.Count-1) do
+ if _Schema.Datasets[i].IsPublic then Proc(_Schema.Datasets[i].Name);
+ for i := 0 to (_Schema.UnionDataTables.Count-1) do
+ if _Schema.UnionDataTables[i].IsPublic then Proc(_Schema.UnionDataTables[i].Name);
+ for i := 0 to (_Schema.JoinDataTables.Count-1) do
+ if _Schema.JoinDataTables[i].IsPublic then Proc(_Schema.JoinDataTables[i].Name);
+ end;
+end;
+
+{ TDADataTableLocalConnection }
+
+function TDADataTableLocalConnection.GetAttributes: TPropertyAttributes;
+begin
+ if (TDADataTable(GetComponent(0)).LocalSchema<>NIL) and (TDADataTable(GetComponent(0)).LocalSchema.ConnectionManager<>NIL)
+ then result := [paValueList]
+ else result := []
+end;
+
+procedure TDADataTableLocalConnection.GetValues(Proc: TGetStrProc);
+var i : integer;
+begin
+ with TDADataTable(GetComponent(0)) do begin
+ if (LocalSchema=NIL) or (LocalSchema.ConnectionManager=NIL) then Exit;
+
+ for i := 0 to (LocalSchema.ConnectionManager.Connections.Count-1) do
+ Proc(LocalSchema.ConnectionManager.Connections[i].Name);
+ end;
+end;
+
+{ TDADriverManagerDirectory }
+
+function TDADriverManagerDirectory.GetAttributes: TPropertyAttributes;
+begin
+ result := [paValueList]
+end;
+
+const SelectDirOption = '';
+
+procedure TDADriverManagerDirectory.GetValues(Proc: TGetStrProc);
+begin
+ inherited;
+
+ Proc(alias_ModuleDir);
+ Proc(alias_System);
+ Proc(SelectDirOption);
+end;
+
+{$IFDEF KYLIX}
+function GetDllPath: String;
+var TheFileName : array[0..MAX_PATH] of char;
+begin
+ FillChar(TheFileName, SizeOf(TheFileName), #0);
+ {$IFDEF KYLIX}System.{$ENDIF}GetModuleFileName(hInstance, TheFileName, sizeof(TheFileName));
+ Result := ExtractFilePath(TheFileName);
+end;
+{$ENDIF}
+procedure TDADriverManagerDirectory.SetValue(const Value: string);
+var dir : string;
+begin
+ if (Value=SelectDirOption) then begin
+ if SelectDirectory(dir, [sdPrompt, sdAllowCreate], 0)
+ then inherited SetValue(dir);
+ end
+
+ else if (Value=alias_DABinDir) then begin
+ dir := IncludeTrailingPathDelimiter(Copy(GetDllPath, 1, Length(GetDLLPath)-7))+'Bin';
+ inherited SetValue(dir);
+ end
+
+ else inherited;
+end;
+
+{ TDADataDictionaryEditor }
+
+procedure TDADataDictionaryEditor.ExecuteVerb(Index: Integer);
+var
+ dict: TDADataDictionary;
+ sfname: string;
+begin
+ inherited;
+
+ dict := GetComponent as TDADataDictionary;
+ sfname := dict.Name+DAFileExtDataDictionaryFile;
+
+ case Index of
+ 0:ShowCollectionEditor(Designer, GetComponent(), dict.Fields, 'Fields');
+ 1:{separater};
+ 2:if PromptForFileName(sfname, 'Data Abstract DataDictionaries (*'+DAFileExtDataDictionaryFile+')|*'+daFileExtConnectionMgrFile+'|All Files (*.*)|*.*', daFileExtConnectionMgrFile, 'Save DataDictionary '+dict.Name, '', TRUE) then
+ dict.SaveToFile(sfname, pfXML);
+ 3:if PromptForFileName(sfname, 'Data Abstract DataDictionaries (*'+DAFileExtDataDictionaryFile+')|*'+daFileExtConnectionMgrFile+'|All Files (*.*)|*.*', daFileExtConnectionMgrFile, 'Load DataDictionary '+dict.Name, '') then begin
+ dict.LoadFromFile(sfname, pfXML);
+ Designer.Modified;
+ end;
+ end;
+end;
+
+function TDADataDictionaryEditor.GetVerb(Index: Integer): string;
+begin
+ case Index of
+ 0:result := 'DataDictionary Editor';
+ 1:result := '-';
+ 2: result := 'Save '+GetComponent.Name+' to Disk...';
+ 3: result := 'Load '+GetComponent.Name+' from Disk...';
+ end;
+end;
+
+function TDADataDictionaryEditor.GetVerbCount: Integer;
+begin
+ result := 4;
+end;
+
+{ TDAClientDataModuleEditor }
+
+{ TDADataTableMasterDetailProps }
+
+{$IFDEF MSWINDOWS}
+procedure TDADataTableMasterDetailProps.Edit;
+begin
+ if TDADataTableMasterLinkWizard.ExecuteWizard(TDADataTable(GetComponent(0)), Designer) then
+ Designer.Modified();
+end;
+
+function TDADataTableMasterDetailProps.GetAttributes: TPropertyAttributes;
+begin
+ result := [paDialog]
+end;
+{$ENDIF MSWINDOWS}
+
+{ TDACollectionItemDatasetNameEditor }
+
+function TDACollectionItemDatasetNameEditor.GetAttributes: TPropertyAttributes;
+begin
+ result := [paValueList, paSortList]
+end;
+
+procedure TDACollectionItemDatasetNameEditor.GetValues(Proc: TGetStrProc);
+var schema : TDASchema;
+ i : integer;
+begin
+ schema := TSearcheableCollection(TCollectionItem(GetComponent(0)).Collection).Owner as TDASchema;
+ for i := 0 to schema.Datasets.Count-1 do begin
+ Proc(schema.Datasets[i].Name);
+ end;
+end;
+
+{ TDADesigntimeCallEditor }
+
+procedure TDADesigntimeCallEditor.ExecuteVerb(Index: Integer);
+begin
+ inherited;
+ (GetComponent as TDADesigntimeCall).MakeRequest;
+ ShowMessage('The call to the server was executed.');
+end;
+
+function TDADesigntimeCallEditor.GetVerb(Index: Integer): string;
+begin
+ result := 'Make Call';
+end;
+
+function TDADesigntimeCallEditor.GetVerbCount: Integer;
+begin
+ result := 1;
+end;
+
+{ TDADataTableReferenceDataTable }
+
+procedure TDADataTableReferenceDataTable.GetValues(Proc: TGetStrProc);
+begin
+ Designer.GetComponentNames(GetTypeData(TypeInfo(TDADataTable)), Proc);
+ Designer.GetComponentNames(GetTypeData(TypeInfo(TDataset)), Proc);
+end;
+
+{ TDALookupSourceProperty }
+
+function TDALookupSourceProperty.GetAttributes: TPropertyAttributes;
+begin
+ result := [paValueList, paSortList, paMultiSelect];
+end;
+
+procedure TDALookupSourceProperty.GetValues(Proc: TGetStrProc);
+var
+ i: integer;
+begin
+ with GetComponent(0) as TDAField do
+ for i := 0 to (FieldCollection.Count - 1) do
+ Proc(FieldCollection[i].Name);
+end;
+
+{ TDALookupDestProperty }
+
+function TDALookupDestProperty.GetAttributes: TPropertyAttributes;
+begin
+ result := [paValueList, paSortList, paMultiSelect];
+end;
+
+procedure TDALookupDestProperty.GetValues(Proc: TGetStrProc);
+var
+ lValues: TStringList;
+ i: Integer;
+begin
+ lValues := TStringList.Create;
+ with GetComponent(0) as TDAField do try
+ if Assigned(LookupSource) then begin
+ LookupSource.DataSet.GetFieldNames(lValues);
+ for i := 0 to lValues.Count - 1 do
+ Proc(lValues[i]);
+ end;
+ finally
+ lValues.free;
+ end;
+end;
+
+{ TDALookupResultFieldProperty }
+
+function TDALookupResultFieldProperty.GetAttributes: TPropertyAttributes;
+begin
+ result := [paValueList, paSortList];
+end;
+
+procedure TDALookupResultFieldProperty.SetValue(const Value: string);
+var
+ lResultField, lLookupField: TDAField;
+begin
+ lResultField := GetComponent(0) as TDAField;
+ if Assigned(lResultField.LookupSource) then begin
+ with TDADataSource(lResultField.LookupSource).DataTable do
+ lLookupField := FindField(Value);
+ if Assigned(lLookupField) then begin
+ lResultField.DataType := lLookupField.DataType;
+ lResultField.Size := lLookupField.Size;
+ end;
+ end;
+
+ inherited;
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDADataTableEditorForm.dfm b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDADataTableEditorForm.dfm
new file mode 100644
index 0000000..be74308
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDADataTableEditorForm.dfm
@@ -0,0 +1,431 @@
+object DADataTableEditorForm: TDADataTableEditorForm
+ Left = 407
+ Top = 225
+ BorderStyle = bsDialog
+ BorderWidth = 5
+ Caption = '%s - DataTable Editor'
+ ClientHeight = 513
+ ClientWidth = 300
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnDestroy = FormDestroy
+ DesignSize = (
+ 300
+ 513)
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Label1: TLabel
+ Left = 0
+ Top = 0
+ Width = 49
+ Height = 13
+ Caption = 'DataSet:'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = [fsBold]
+ ParentFont = False
+ end
+ object Label2: TLabel
+ Left = 0
+ Top = 75
+ Width = 91
+ Height = 13
+ Caption = 'Get Schema Call'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = [fsBold]
+ ParentFont = False
+ end
+ object Label3: TLabel
+ Left = 16
+ Top = 13
+ Width = 239
+ Height = 26
+ Caption =
+ 'Select or enter the name of the dataset you want this DataTable ' +
+ 'to represent.'
+ WordWrap = True
+ end
+ object Label6: TLabel
+ Left = 0
+ Top = 179
+ Width = 73
+ Height = 13
+ Caption = 'Get Data Call'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = [fsBold]
+ ParentFont = False
+ end
+ object Label9: TLabel
+ Left = 8
+ Top = 283
+ Width = 98
+ Height = 13
+ Caption = 'Apply Upates Call'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = [fsBold]
+ ParentFont = False
+ end
+ object Label12: TLabel
+ Left = 8
+ Top = 387
+ Width = 85
+ Height = 13
+ Caption = 'Get Scripts Call'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = [fsBold]
+ ParentFont = False
+ end
+ object btn_Ok: TBitBtn
+ Left = 145
+ Top = 487
+ Width = 75
+ Height = 25
+ Anchors = [akRight, akBottom]
+ Caption = 'Ok'
+ Default = True
+ ModalResult = 1
+ TabOrder = 0
+ OnClick = btn_OkClick
+ Glyph.Data = {
+ 36060000424D3606000000000000360000002800000020000000100000000100
+ 18000000000000060000C40E0000C40E00000000000000000000FF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FF006600006600FF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF656565656565FF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FF0066001EB2311FB133006600FF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6565659A9A9A9A9A9A65
+ 6565FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FF00660031C24F22B7381AB02D21B437006600FF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF656565ABABAB9E9E9E9797979C
+ 9C9C656565FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ 00660047D36D3BCB5E25A83B0066001BA92E1DB132006600FF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FF656565BFBFBFB5B5B598989865656594
+ 9494999999656565FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF006600
+ 4FD67953DE7F31B54D006600FF00FF006600179D271EAE31006600FF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FF656565C4C4C4CACACAA5A5A5656565FF00FF65
+ 65658C8C8C989898656565FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ 00660041C563006600FF00FFFF00FFFF00FFFF00FF00660019AA2B006600FF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FF656565B5B5B5656565FF00FFFF00FFFF
+ 00FFFF00FF656565939393656565FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FF006600FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF006600149D210066
+ 00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF656565FF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FF6565658A8A8A656565FF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF0066
+ 00006600FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FF656565656565FF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FF006600006600FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FF656565656565FF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
+ NumGlyphs = 2
+ end
+ object BitBtn2: TBitBtn
+ Left = 225
+ Top = 487
+ Width = 75
+ Height = 25
+ Anchors = [akRight, akBottom]
+ Cancel = True
+ Caption = 'Cancel'
+ ModalResult = 2
+ TabOrder = 1
+ Glyph.Data = {
+ 36060000424D3606000000000000360000002800000020000000100000000100
+ 18000000000000060000C40E0000C40E00000000000000000000FF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FF00009A00009AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF00009A0000
+ 9AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6B6B6B6BFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FF6B6B6B6B6B6BFF00FFFF00FFFF00FFFF00FFFF00FF
+ 00009A174AFD103BF400009AFF00FFFF00FFFF00FFFF00FF00009A002CF80030
+ FC00009AFF00FFFF00FFFF00FFFF00FF6B6B6BA8A8A8A0A0A06B6B6BFF00FFFF
+ 00FFFF00FFFF00FF6B6B6B9A9A9A9C9C9C6B6B6BFF00FFFF00FFFF00FFFF00FF
+ 00009A1A47F81A4CFF123BF100009AFF00FFFF00FF00009A012DF60132FF002A
+ F300009AFF00FFFF00FFFF00FFFF00FF6B6B6BA7A7A7AAAAAA9F9F9F6B6B6BFF
+ 00FFFF00FF6B6B6B9999999E9E9E9797976B6B6BFF00FFFF00FFFF00FFFF00FF
+ FF00FF00009A1C47F61B4DFF143EF400009A00009A002DF80134FF032BF20000
+ 9AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BA7A7A7ABABABA2A2A26B
+ 6B6B6B6B6B9A9A9A9E9E9E9898986B6B6BFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FF00009A1D48F61D50FF103DFB0431FE0132FF002CF600009AFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BA7A7A7ACACACA3
+ A3A39F9F9F9E9E9E9999996B6B6BFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FF00009A1A48F91342FF0C3CFF0733F600009AFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BA7A7A7A7
+ A7A7A3A3A39C9C9C6B6B6BFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FF00009A214EFC1D4BFF1847FF1743F600009AFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BACACACAC
+ ACACA9A9A9A4A4A46B6B6BFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FF00009A2E5BF92C5FFF224DF8204BF82355FF1B46F600009AFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BB1B1B1B3B3B3AB
+ ABABAAAAAAAFAFAFA6A6A66B6B6BFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FF00009A3664FA386BFF2D59F400009A00009A224CF42558FF1D49F60000
+ 9AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BB6B6B6B9B9B9AEAEAE6B
+ 6B6B6B6B6BA9A9A9B0B0B0A7A7A76B6B6BFF00FFFF00FFFF00FFFF00FFFF00FF
+ 00009A4071FA4274FF325DF100009AFF00FFFF00FF00009A224DF1275AFF204C
+ F800009AFF00FFFF00FFFF00FFFF00FF6B6B6BBBBBBBBEBEBEAFAFAF6B6B6BFF
+ 00FFFF00FF6B6B6BA7A7A7B1B1B1AAAAAA6B6B6BFF00FFFF00FFFF00FFFF00FF
+ 00009A497AFC3B66F300009AFF00FFFF00FFFF00FFFF00FF00009A2550F42655
+ FA00009AFF00FFFF00FFFF00FFFF00FF6B6B6BC0C0C0B5B5B56B6B6BFF00FFFF
+ 00FFFF00FFFF00FF6B6B6BAAAAAAAEAEAE6B6B6BFF00FFFF00FFFF00FFFF00FF
+ FF00FF00009A00009AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF00009A0000
+ 9AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6B6B6B6BFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FF6B6B6B6B6B6BFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
+ NumGlyphs = 2
+ end
+ object cb_DataSets: TComboBox
+ Left = 16
+ Top = 44
+ Width = 284
+ Height = 21
+ Anchors = [akLeft, akTop, akRight]
+ ItemHeight = 0
+ TabOrder = 2
+ OnChange = cb_DataSetsChange
+ end
+ object cb_GetSchemaMethods: TComboBox
+ Left = 16
+ Top = 91
+ Width = 284
+ Height = 21
+ Style = csDropDownList
+ Anchors = [akLeft, akTop, akRight]
+ ItemHeight = 0
+ TabOrder = 3
+ OnChange = cb_GetSchemaMethodsChange
+ end
+ object cb_GetDataMethods: TComboBox
+ Left = 16
+ Top = 195
+ Width = 284
+ Height = 21
+ Style = csDropDownList
+ Anchors = [akLeft, akTop, akRight]
+ ItemHeight = 0
+ TabOrder = 4
+ OnChange = cb_GetDataMethodsChange
+ end
+ object cb_ApplyUpdatesMethods: TComboBox
+ Left = 16
+ Top = 299
+ Width = 284
+ Height = 21
+ Style = csDropDownList
+ Anchors = [akLeft, akTop, akRight]
+ ItemHeight = 0
+ TabOrder = 5
+ OnChange = cb_ApplyUpdatesMethodsChange
+ end
+ object pnl_GetSchemaOptions: TPanel
+ Left = 16
+ Top = 112
+ Width = 284
+ Height = 52
+ BevelOuter = bvNone
+ TabOrder = 6
+ object Label4: TLabel
+ Left = 0
+ Top = 7
+ Width = 84
+ Height = 13
+ Caption = 'Parameter Name:'
+ end
+ object Label5: TLabel
+ Left = 0
+ Top = 31
+ Width = 83
+ Height = 13
+ Caption = 'Parameter Value:'
+ end
+ object ed_GetSchemaValue: TEdit
+ Left = 90
+ Top = 28
+ Width = 194
+ Height = 21
+ TabOrder = 0
+ end
+ object cb_GetSchemaParams: TComboBox
+ Left = 90
+ Top = 4
+ Width = 194
+ Height = 21
+ Style = csDropDownList
+ ItemHeight = 0
+ TabOrder = 1
+ end
+ end
+ object pnl_GetDataOptions: TPanel
+ Left = 16
+ Top = 216
+ Width = 284
+ Height = 52
+ BevelOuter = bvNone
+ TabOrder = 7
+ object Label7: TLabel
+ Left = 0
+ Top = 7
+ Width = 84
+ Height = 13
+ Caption = 'Parameter Name:'
+ end
+ object Label8: TLabel
+ Left = 0
+ Top = 31
+ Width = 83
+ Height = 13
+ Caption = 'Parameter Value:'
+ end
+ object ed_GetDataValue: TEdit
+ Left = 90
+ Top = 28
+ Width = 194
+ Height = 21
+ TabOrder = 0
+ end
+ object cb_GetDataParams: TComboBox
+ Left = 90
+ Top = 4
+ Width = 194
+ Height = 21
+ Style = csDropDownList
+ ItemHeight = 0
+ TabOrder = 1
+ end
+ end
+ object pnl_ApplyUpdatesOptions: TPanel
+ Left = 16
+ Top = 320
+ Width = 284
+ Height = 52
+ BevelOuter = bvNone
+ TabOrder = 8
+ object Label10: TLabel
+ Left = 0
+ Top = 7
+ Width = 84
+ Height = 13
+ Caption = 'Parameter Name:'
+ end
+ object Label11: TLabel
+ Left = 0
+ Top = 31
+ Width = 83
+ Height = 13
+ Caption = 'Parameter Value:'
+ end
+ object ed_ApplyUpdatesValue: TEdit
+ Left = 90
+ Top = 28
+ Width = 194
+ Height = 21
+ TabOrder = 0
+ end
+ object cb_ApplyUpdatesParams: TComboBox
+ Left = 90
+ Top = 4
+ Width = 194
+ Height = 21
+ Style = csDropDownList
+ ItemHeight = 0
+ TabOrder = 1
+ end
+ end
+ object cb_GetScriptsMethods: TComboBox
+ Left = 16
+ Top = 403
+ Width = 284
+ Height = 21
+ Style = csDropDownList
+ Anchors = [akLeft, akTop, akRight]
+ ItemHeight = 0
+ TabOrder = 9
+ OnChange = cb_GetScriptsMethodsChange
+ end
+ object pnl_GetScriptOptions: TPanel
+ Left = 16
+ Top = 424
+ Width = 284
+ Height = 52
+ BevelOuter = bvNone
+ TabOrder = 10
+ object Label13: TLabel
+ Left = 0
+ Top = 7
+ Width = 84
+ Height = 13
+ Caption = 'Parameter Name:'
+ end
+ object Label14: TLabel
+ Left = 0
+ Top = 31
+ Width = 83
+ Height = 13
+ Caption = 'Parameter Value:'
+ end
+ object ed_GetScriptsValue: TEdit
+ Left = 90
+ Top = 28
+ Width = 194
+ Height = 21
+ TabOrder = 0
+ end
+ object cb_GetScriptsParams: TComboBox
+ Left = 90
+ Top = 4
+ Width = 194
+ Height = 21
+ Style = csDropDownList
+ ItemHeight = 0
+ TabOrder = 1
+ end
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDADataTableEditorForm.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDADataTableEditorForm.pas
new file mode 100644
index 0000000..87324d1
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDADataTableEditorForm.pas
@@ -0,0 +1,435 @@
+unit uDADataTableEditorForm;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, uDADataTable, StdCtrls, Buttons, ExtCtrls, uRODL, uROClasses,
+ uRORemoteService, uROClientIntf;
+
+type
+ TDADataTableEditorForm = class(TForm)
+ btn_Ok: TBitBtn;
+ BitBtn2: TBitBtn;
+ cb_DataSets: TComboBox;
+ Label1: TLabel;
+ Label2: TLabel;
+ cb_GetSchemaMethods: TComboBox;
+ Label3: TLabel;
+ cb_GetDataMethods: TComboBox;
+ cb_ApplyUpdatesMethods: TComboBox;
+ Label6: TLabel;
+ Label9: TLabel;
+ pnl_GetSchemaOptions: TPanel;
+ Label4: TLabel;
+ Label5: TLabel;
+ ed_GetSchemaValue: TEdit;
+ cb_GetSchemaParams: TComboBox;
+ pnl_GetDataOptions: TPanel;
+ Label7: TLabel;
+ Label8: TLabel;
+ ed_GetDataValue: TEdit;
+ cb_GetDataParams: TComboBox;
+ pnl_ApplyUpdatesOptions: TPanel;
+ Label10: TLabel;
+ Label11: TLabel;
+ ed_ApplyUpdatesValue: TEdit;
+ cb_ApplyUpdatesParams: TComboBox;
+ Label12: TLabel;
+ cb_GetScriptsMethods: TComboBox;
+ pnl_GetScriptOptions: TPanel;
+ Label13: TLabel;
+ Label14: TLabel;
+ ed_GetScriptsValue: TEdit;
+ cb_GetScriptsParams: TComboBox;
+ procedure OnMethodChanged(Sender: TObject);
+ procedure cb_DataSetsChange(Sender: TObject);
+ procedure FormDestroy(Sender: TObject);
+ procedure cb_GetSchemaMethodsChange(Sender: TObject);
+ procedure cb_GetDataMethodsChange(Sender: TObject);
+ procedure cb_ApplyUpdatesMethodsChange(Sender: TObject);
+ procedure btn_OkClick(Sender: TObject);
+ procedure cb_GetScriptsMethodsChange(Sender: TObject);
+ private
+ fDataTable: TDADataTable;
+ fManuallySelectedMethods:boolean;
+ fMethods:TStringList;
+ fLibrary:TRODLLibrary;
+
+ fGetSchemaParams,fGetDataParams,fApplyUpdateParams,fGetScriptsParams:TDARemoteRequestParams;
+
+ procedure FillDataSetsCombo;
+ procedure EnablePanel(iPanel:TPanel; iEnable:boolean=true);
+ procedure FillParameters(iMethodCombo, iParamCombo: TComboBox; iParamEdit:TEdit);
+ procedure CreateParameters(iMethodCombo, iParamCombo: TComboBox; iParamEdit: TEdit; ioParams: TDARemoteRequestParams);
+ function GetSchemaAsXML(aRemoteService : TRORemoteService): String;
+ public
+ class function Execute(aOwner:TComponent; aDataTable:TDADataTable; var aDataSet:string):boolean;
+ end;
+
+implementation
+
+uses
+ uROTypes, uDAClientDataModule, uDAClasses, uDAIDERes, uDAPleaseWaitForm;
+
+{$R *.dfm}
+
+{ TForm1 }
+
+procedure TDADataTableEditorForm.FormDestroy(Sender: TObject);
+begin
+ FreeAndNil(fMethods);
+ FreeAndNil(fLibrary);
+ FreeAndNil(fGetSchemaParams);
+ FreeAndNil(fGetDataParams);
+ FreeAndNil(fApplyUpdateParams);
+ FreeAndNil(fGetScriptsParams);
+end;
+
+class function TDADataTableEditorForm.Execute(aOwner: TComponent; aDataTable: TDADataTable; var aDataSet:string): boolean;
+begin
+ with self.Create(aOwner) do try
+
+ Caption := Format(Caption,[aDataTable.Name]);
+ fDataTable := aDataTable;
+ FillDataSetsCombo();
+
+ cb_DataSets.ItemIndex := cb_DataSets.Items.IndexOf(aDataSet);
+ cb_DataSetsChange(nil);
+
+ result := ShowModal = idOk;
+ if result then begin
+
+ {aDataTable.SchemaCall.MethodName := cb_GetSchemaMethods.Text;
+ aDataTable.SchemaCall.Params.Assign(fGetSchemaParams);
+
+ aDataTable.DataRequestCall.MethodName := cb_GetDataMethods.Text;
+ aDataTable.DataRequestCall.Params.Assign(fGetDataParams);
+
+ aDataTable.DataUpdateCall.MethodName := cb_ApplyUpdatesMethods.Text;
+ aDataTable.DataUpdateCall.Params.Assign(fApplyUpdateParams);
+
+ aDataTable.ScriptCall.MethodName := cb_GetScriptsMethods.Text;
+ aDataTable.ScriptCall.Params.Assign(fGetScriptsParams);}
+
+ aDataSet := cb_DataSets.Text;
+
+ end;
+ finally
+ Free();
+ end;
+end;
+
+function TDADataTableEditorForm.GetSchemaAsXML(aRemoteService : TRORemoteService): String;
+var __request, __response : TMemoryStream;
+ __TransportChannel : IROTransportChannel;
+ __Message : IROMessage;
+begin
+ __TransportChannel := aRemoteService.Channel;
+ __Message := aRemoteService.Message;
+
+ __request := TMemoryStream.Create;
+ __response := TMemoryStream.Create;
+
+ try
+ __Message.Initialize(__TransportChannel, 'DataAbstract', aRemoteService.ServiceName, 'GetSchemaAsXML');
+ __Message.Finalize;
+
+ __Message.WriteToStream(__request);
+ __TransportChannel.Dispatch(__request, __response);
+ __Message.ReadFromStream(__response);
+
+ __Message.Read('Result', TypeInfo(String), result, []);
+ finally
+ __request.Free;
+ __response.Free;
+ end
+end;
+procedure TDADataTableEditorForm.FillDataSetsCombo;
+var
+ p: Integer;
+ lDataSets: TStringList;
+ i: Integer;
+ lService: TRODLService;
+ lSchema:TDASchema;
+begin
+ (*fMethods := TStringList.Create();
+ fLibrary := fDataTable.RemoteService.GetRODLLibrary();
+
+ fGetSchemaParams := TDARemoteRequestParams.Create(nil);
+ fGetDataParams := TDARemoteRequestParams.Create(nil);
+ fApplyUpdateParams := TDARemoteRequestParams.Create(nil);
+ fGetScriptsParams := TDARemoteRequestParams.Create(nil);
+
+ lDataSets := TStringList.Create();
+ try
+
+ lService := fLibrary.FindService(fDataTable.RemoteService.ServiceName);
+ while Assigned(lService) do begin
+ for i := 0 to lService.Default.Count-1 do begin
+ fMethods.AddObject(lService.Default.Items[i].Info.Name,lService.Default.Items[i]);
+ end;
+
+ if (lService.Ancestor <> '')
+ then lService := fLibrary.FindService(lService.Ancestor)
+ else lService := nil;
+ end;
+
+ fMethods.Sort();
+ cb_GetSchemaMethods.Items.Assign(fMethods);
+ cb_GetDataMethods.Items.Assign(fMethods);
+ cb_ApplyUpdatesMethods.Items.Assign(fMethods);
+ cb_GetScriptsMethods.Items.Assign(fMethods);
+
+ lDataSets.Duplicates := dupIgnore;
+ lDataSets.Sorted := true;
+
+ if Assigned(fDataTable.RemoteService) then begin
+ if not Assigned(fDataTable.RemoteService.Channel) then RaiseError(err_AssignRemoteServiceChannel);
+ if not Assigned(fDataTable.RemoteService.Message) then RaiseError(err_AssignRemoteServiceMessage);
+
+ lSchema := nil;
+ with CreatePleaseWaitForm(self,'Retrieving Schema...') do try
+ try
+ lSchema := TDASchema.Create(nil);
+ lSchema.LoadFromXml(GetSchemaAsXML(fDataTable.RemoteService));
+ except
+ lSchema.Free;
+ raise;
+ end;
+ finally
+ Hide;
+ end;
+
+ try
+ for i := 0 to lSchema.Datasets.Count-1 do begin
+ lDataSets.Add(lSchema.Datasets[i].Name);
+ end; { for }
+ finally
+ lSchema.Free();
+ end;
+
+ end
+ else begin
+
+ for i := 0 to fMethods.Count-1 do begin
+ p := Pos('_',fMethods[i]);
+ if p > 0 then lDataSets.Add(Copy(fMethods[i],p+1,Length(fMethods[i])-p));
+ end; { for }
+
+ end;
+ cb_DataSets.Items.Assign(lDataSets);
+
+ finally
+ FreeAndNil(lDataSets);
+ end;
+ *)
+end;
+
+procedure TDADataTableEditorForm.OnMethodChanged(Sender: TObject);
+begin
+ fManuallySelectedMethods := true;
+end;
+
+procedure TDADataTableEditorForm.EnablePanel(iPanel:TPanel; iEnable:boolean=true);
+var
+ i:integer;
+begin
+ for i := 0 to ComponentCount-1 do if (Components[i] as TControl).Parent = iPanel then begin
+ if Components[i] is TLabel then TLabel(Components[i]).Enabled := iEnable
+ else if Components[i] is TComboBox then TComboBox(Components[i]).Enabled := iEnable
+ else if Components[i] is TEdit then TEdit(Components[i]).Enabled := iEnable
+ end;
+end;
+
+procedure TDADataTableEditorForm.cb_DataSetsChange(Sender: TObject);
+var
+ lIndex:integer;
+ lDataSetName:string;
+begin
+ if not fManuallySelectedMethods then begin
+
+ lDataSetName := StringReplace(cb_DataSets.Text,' ','_',[rfReplaceAll]);
+
+ lIndex := cb_GetSchemaMethods.Items.IndexOf('GetDatasetSchema_'+lDataSetName);
+ if lIndex = -1 then lIndex := cb_GetSchemaMethods.Items.IndexOf('GetSchema_'+lDataSetName);
+ if lIndex > -1 then begin
+ cb_GetSchemaMethods.ItemIndex := lIndex;
+ cb_GetSchemaMethodsChange(nil);
+ EnablePanel(pnl_GetSchemaOptions,false);
+ end
+ else begin
+ lIndex := cb_GetSchemaMethods.Items.IndexOf('GetDatasetSchema');
+ if lIndex = -1 then cb_GetSchemaMethods.Text := '';
+ cb_GetSchemaMethods.ItemIndex := lIndex;
+ cb_GetSchemaMethodsChange(nil);
+ end;
+
+ lIndex := cb_GetScriptsMethods.Items.IndexOf('GetDatasetScript_'+lDataSetName);
+ if lIndex = -1 then lIndex := cb_GetScriptsMethods.Items.IndexOf('GetDatasetScripts_'+lDataSetName);
+ if lIndex > -1 then begin
+ cb_GetScriptsMethods.ItemIndex := lIndex;
+ cb_GetScriptsMethodsChange(nil);
+ EnablePanel(pnl_GetScriptOptions,false);
+ end
+ else begin
+ lIndex := cb_GetScriptsMethods.Items.IndexOf('GetDatasetScripts');
+ if lIndex = -1 then cb_GetScriptsMethods.Text := '';
+ cb_GetScriptsMethods.ItemIndex := lIndex;
+ cb_GetScriptsMethodsChange(nil);
+ end;
+
+ lIndex := cb_GetDataMethods.Items.IndexOf('GetDatasetData_'+lDataSetName);
+ if lIndex = -1 then lIndex := cb_GetDataMethods.Items.IndexOf('Get_'+lDataSetName);
+ if lIndex = -1 then lIndex := cb_GetDataMethods.Items.IndexOf('Get'+lDataSetName);
+ if lIndex = -1 then lIndex := cb_GetDataMethods.Items.IndexOf('Load_'+lDataSetName);
+ if lIndex = -1 then lIndex := cb_GetDataMethods.Items.IndexOf('Load'+lDataSetName);
+ if lIndex = -1 then lIndex := cb_GetDataMethods.Items.IndexOf('Read_'+lDataSetName);
+ if lIndex = -1 then lIndex := cb_GetDataMethods.Items.IndexOf('Read'+lDataSetName);
+ if lIndex > -1 then begin
+ cb_GetDataMethods.ItemIndex := lIndex;
+ cb_GetDataMethodsChange(nil);
+ EnablePanel(pnl_GetDataOptions,false);
+ end
+ else begin
+ EnablePanel(pnl_GetDataOptions);
+ lIndex := cb_GetDataMethods.Items.IndexOf('GetDatasetDataEx');
+ if lIndex = -1 then lIndex := cb_GetDataMethods.Items.IndexOf('GetDatasetData');
+ if lIndex = -1 then cb_GetDataMethods.Text := '';
+ cb_GetDataMethods.ItemIndex := lIndex;
+ cb_GetDataMethodsChange(nil);
+ end;
+
+ lIndex := cb_ApplyUpdatesMethods.Items.IndexOf('UpdateData_'+lDataSetName);
+ if lIndex = -1 then lIndex := cb_GetDataMethods.Items.IndexOf('Update_'+lDataSetName);
+ if lIndex = -1 then lIndex := cb_GetDataMethods.Items.IndexOf('Update'+lDataSetName);
+ if lIndex = -1 then lIndex := cb_GetDataMethods.Items.IndexOf('Set_'+lDataSetName);
+ if lIndex = -1 then lIndex := cb_GetDataMethods.Items.IndexOf('Set'+lDataSetName);
+ if lIndex = -1 then lIndex := cb_GetDataMethods.Items.IndexOf('Save_'+lDataSetName);
+ if lIndex = -1 then lIndex := cb_GetDataMethods.Items.IndexOf('Save'+lDataSetName);
+ if lIndex = -1 then lIndex := cb_GetDataMethods.Items.IndexOf('Write_'+lDataSetName);
+ if lIndex = -1 then lIndex := cb_GetDataMethods.Items.IndexOf('Write'+lDataSetName);
+ if lIndex > -1 then begin
+ cb_ApplyUpdatesMethods.ItemIndex := lIndex;
+ cb_ApplyUpdatesMethodsChange(nil);
+ EnablePanel(pnl_ApplyUpdatesOptions,false);
+ end
+ else begin
+ EnablePanel(pnl_ApplyUpdatesOptions);
+ lIndex := cb_ApplyUpdatesMethods.Items.IndexOf('UpdateData');
+ if lIndex = -1 then cb_ApplyUpdatesMethods.Text := '';
+ cb_ApplyUpdatesMethods.ItemIndex := lIndex;
+ cb_ApplyUpdatesMethodsChange(nil);
+ end;
+
+ fManuallySelectedMethods := false;
+ end;
+end;
+
+procedure TDADataTableEditorForm.FillParameters(iMethodCombo, iParamCombo:TComboBox; iParamEdit:TEdit);
+var
+ lIndex:integer;
+ lMethod:TRODLOperation;
+ i:integer;
+begin
+ iParamCombo.Items.Clear();
+
+ lIndex := iMethodCombo.ItemIndex;
+ if lIndex > -1 then begin
+ lMethod := (fMethods.Objects[lIndex] as TRODLOperation);
+
+ iParamCombo.ItemIndex := -1;
+ iParamCombo.Text := '';
+ iParamEdit.Text := '';
+ for i := 0 to lMethod.Count-1 do begin
+ if (lMethod.Items[i].Flag in [fIn, fInOut]) and (lMethod.Items[i].DataType = DataTypeNames[rtString]) then begin
+ iParamCombo.Items.Add(lMethod.Items[i].Name);
+ end;
+ end;
+ //if iParamCombo.Enabled then begin
+ if (iParamCombo.Items.Count > 0) then begin
+ iParamCombo.ItemIndex := 0;
+ iParamEdit.Text := cb_DataSets.Text;
+ EnablePanel(iParamEdit.Parent as TPanel);
+ end
+ else begin
+ iParamEdit.Text := '';
+ EnablePanel(iParamEdit.Parent as TPanel,false);
+ end;
+ //end
+ end;
+end;
+
+
+procedure TDADataTableEditorForm.cb_GetSchemaMethodsChange(Sender: TObject);
+begin
+ FillParameters(cb_GetSchemaMethods, cb_GetSchemaParams, ed_GetSchemaValue);
+end;
+
+procedure TDADataTableEditorForm.cb_GetDataMethodsChange(Sender: TObject);
+begin
+ FillParameters(cb_GetDataMethods, cb_GetDataParams, ed_GetDataValue);
+end;
+
+procedure TDADataTableEditorForm.cb_ApplyUpdatesMethodsChange(Sender: TObject);
+begin
+ FillParameters(cb_ApplyUpdatesMethods, cb_ApplyUpdatesParams, ed_ApplyUpdatesValue);
+end;
+
+procedure TDADataTableEditorForm.cb_GetScriptsMethodsChange(Sender: TObject);
+begin
+ FillParameters(cb_GetScriptsMethods, cb_GetScriptsParams, ed_GetScriptsValue);
+end;
+
+
+procedure TDADataTableEditorForm.CreateParameters(iMethodCombo, iParamCombo:TComboBox; iParamEdit:TEdit; ioParams:TDARemoteRequestParams);
+var
+ lIndex:integer;
+ lMethod:TRODLOperation;
+ i:integer;
+ newparam : TDARemoteRequestParam;
+begin
+ ioParams.Clear();
+
+ lIndex := iMethodCombo.ItemIndex;
+ if lIndex > -1 then begin
+ lMethod := (fMethods.Objects[lIndex] as TRODLOperation);
+
+ // AleF: fixed this one too and moved up to be consistent with the RODL changes of ages ago
+ if Assigned(lMethod.Result) then begin
+ ioParams.Add.CopyRODLParam(lMethod.Result);
+ end;
+
+ for i := 0 to lMethod.Count-1 do begin
+ // AleF: fixed this up so that it uses a common copy function instead of duplicating it like it was before
+ newparam := ioParams.Add;
+ newparam.CopyRODLParam(lMethod.Items[i]);
+
+ // Sets defaults
+ with newparam do begin
+ if (Flag in [fIn, fInOut]) and (Name = iParamCombo.Text) then begin
+ AsString := ed_GetSchemaValue.Text;
+ end
+ else if SameText(Name, 'MaxRecords') then begin
+ AsInteger := -1;
+ end
+ else if SameText(Name, 'IncludeSchema') then begin
+ AsBoolean := false;
+ end
+ else if (newparam.DataType=rtString) and VarIsEmpty(newparam.AsVariant) then begin
+ newparam.AsVariant := '';
+ end;
+ end;
+ end;
+ end;
+end;
+
+procedure TDADataTableEditorForm.btn_OkClick(Sender: TObject);
+begin
+ CreateParameters(cb_GetSchemaMethods, cb_GetSchemaParams, ed_GetSchemaValue, fGetSchemaParams);
+ CreateParameters(cb_GetDataMethods, cb_GetDataParams, ed_GetDataValue, fGetDataParams);
+ CreateParameters(cb_ApplyUpdatesMethods, cb_ApplyUpdatesParams, ed_ApplyUpdatesValue, fApplyUpdateParams);
+ CreateParameters(cb_GetScriptsMethods, cb_GetScriptsParams, ed_GetScriptsValue, fGetScriptsParams);
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDADataTableMasterLinkWizardForm.dfm b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDADataTableMasterLinkWizardForm.dfm
new file mode 100644
index 0000000..a233e81
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDADataTableMasterLinkWizardForm.dfm
@@ -0,0 +1,1457 @@
+inherited DADataTableMasterLinkWizard: TDADataTableMasterLinkWizard
+ Left = 259
+ Top = 205
+ Caption = '%s Master/Detail Wizard'
+ ClientHeight = 480
+ ClientWidth = 459
+ PixelsPerInch = 96
+ TextHeight = 13
+ inherited Bevel1: TBevel
+ Width = 459
+ end
+ object Label16: TLabel [1]
+ Left = 8
+ Top = 366
+ Width = 73
+ Height = 13
+ Caption = 'Mapping Mode:'
+ end
+ inherited Panel1: TPanel
+ Width = 459
+ inherited Image1: TImage
+ Picture.Data = {
+ 055449636F6E0000010006003030000001000800A80E00006600000020200000
+ 01000800A80800000E0F0000101000000100080068050000B617000030300000
+ 01002000A82500001E1D00002020000001002000A8100000C642000010100000
+ 01002000680400006E5300002800000030000000600000000100080000000000
+ 0009000000000000000000000001000000010000000000000505050009090900
+ 0D0D0D000B120B000E150E000A1D0A000C190C00121212001515150011181100
+ 101D1000191919001D1D1D000A230A000F2A0F00053F0500093709000C3C0C00
+ 14391400163D1600193019001A391A0021212100252525002028200029292900
+ 2D2D2D0024342400293229003131310035353500333D3300393939003D3D3D00
+ 07420700044B04000B420B000C450C000E480E00025902000C590C0016461600
+ 104C10001353130014551400155815001D511D00185F180000660000006A0000
+ 006E0000076F07000B620B00096709000E600E000E6D0E000072000000750000
+ 00780000007D00000E7F0E00136C1300196119001B651B00204C20002C5C2E00
+ 3640360039563B002571270028742C002B7730002D7A3300307C3700327F3B00
+ 3C6240004040400045454500494949004D4D4D0049534A005151510056565600
+ 595959005D5D5D004167460047644C0043694800456B4B00417A4900447D4E00
+ 4F6252005D7965006161610065656500616B6400686868006E6E6E00637F6C00
+ 7171710074747400787878007D7D7D000081000000850000008A0000008D0000
+ 0A810A000A850A00009100000095000000990000049D05001284130007A00B00
+ 0BA411000FA8170013AC1C001F91260022942A002D83350035823E002D973A00
+ 16AF22001AB328001EB72E002FA13E0022BB340026BE39002AC23F0038844200
+ 3B8745003D8949003C9B4C003C9C4D0032A442003BAE50003AB650003EB95500
+ 408C4D00438F51004197510045925400479C580045A459005C826700629B7500
+ 58A46D005DA9740060AC78002DC6440031CA4A0035CD500039D156003DD55B00
+ 40D9610044DD670052C470004CDB710058DD7F0048E06D004CE4730050E87800
+ 53EC7E005FDA860057EF84005BEA87005FED8C005BF38A005FF78F0086868600
+ 959595009F9F9F00A2A2A200AAAAAA00ACACAC00000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000066511F090909090D4E60000000000000000000000000000000
+ 00000000000000000000000000000000000000004E0D0D0D0D0D090909090309
+ 0303031864000000000000000000000000000000000000000000000000000000
+ 00001F1818180D0D0D090D09090909030303030303004E000000000000000000
+ 000000000000000000000000000000001F1A1818180D180D0D0D0D0909090909
+ 09030303030300035D000000000000000000000000000000000000000000641A
+ 1A1A1A181818180D151327272727110F05090303030303000309000000000000
+ 000000000000000000000000004E1F1A1F1A1A1A182A353B3B3B3A3A3A333333
+ 332811070303030300000064000000000000000000000000000000004E1A1F1F
+ 1A1F1A1A1C2D2D353B3B3B3A3A3A3A333333313124070303030300005D000000
+ 00000000000000000000004E1F1F1F1F1F1A1F1A1A1A181A182A3A3B3A3A3333
+ 333333313331100404000303005D0000000000000000000000004E1F1F211F1F
+ 1A1F1A1F1A1A1A1A1818163B3B3A3A3A33333333313131280703030003006400
+ 0000000000000000005D212121211F1F1F1F1A1F1A1A1A1A1A18183B3B3B3A3A
+ 3A3331120F0B080507030303000300000000000000000000AB4E214E2121211F
+ 1F1F1F1A1F1F1A1A1A181A673B3B3B3A3A270C09090909030303030303000309
+ 00000000000000004E214E21212121211F1F1F1F1A1F1A1E1A1A1867673B3B3B
+ 3A0D0D0C0C090909090303030303000051000000000000644E4E214E214E2121
+ 211F1F1F1F1A1F1A1A1A1A1A181A16132D0D0D0C0C0909090903030303030303
+ 000000000000004E4E4E4E44462121212121211F1F1F1F1E1F1A1A1A1A181818
+ 0D0D0D0D0D0C09090909090310030003034E00000000664E4E214E76474E214E
+ 2121211F1F1F1F1A1E1E1A1A1A1A181818170D0D0D0D090B0C080908310E0303
+ 0003000000004E4E4E4E4B7C474E21214E2121211F1F1F1F1A1F1A1E1A1A1A18
+ 1817180D0D0D0D0C09090908312403030303640000004E514E4E7A7D474E4E21
+ 21212121211F1F1F1F1E1E1A1A1A1A18181817180D0D0D0C0C09090933310703
+ 030309000066514E5150807F4A4E214E4E214E2121211F1F1F1E1E1F1E1A1A1A
+ 1A181817180D0D0D0D0C0909333123030303030000515151515981804A4E4E21
+ 4E21214E2121211F1F1F1E1A1E1E1A1A1A1A181817180D0D0D0D0C0C33332809
+ 030303000051515151859681824E4E4E4E4E2121212121211F1F1F1F1E1E1E1A
+ 1A1A1A181817180D0D0D0C0C33333109050303530053535151889796834E4E4E
+ 214E4E214E21212121211F1F1E1E1E1E1A1A1A1A181817180D0D0D0C3333330F
+ 0909034E00535351519A9797844E4E4E4E4E214E214E212121211F1F1F1E1E1E
+ 1E1A1A1A1A181817180D0D0D3A3A33120909030900535353519B99988B4E4E4E
+ 4E4E4E4E214E214E2121211F1F1F1E1E1E1E1A1A1A1A181817180D0D3A3A3327
+ 0909090300535353539B9A998C514E4E4E4E4E214E214E21212121211F1F1F1E
+ 1E1E1E1A1A1A1A181817180D3A3A3A270909090900535353539B9B9A8C51514E
+ 4E4E4E4E4E4E214E214E2121211F1F1F1E1E1E1E1A1A1A1A181817293B3A3A27
+ 09090909005D535353A19B9B905151514E4E4E4E4E4E4E214E21212121211F1F
+ 1F1E1E2D382E2E2D3533673B3B3B3A270C0D0909005D5D5D539EA19C9B8F5B51
+ 514E4E4E4E4E214E214E214E2121211F1F1F1E306A6A676A676767673B3B3B13
+ 0D0C0D1F005D5D535D9DA1A09B9B9A8A8D8C58574B4E4E4E4E214E2121212121
+ 1F1F1F306A6A6A6767676767673B3B150D0D0951005D5D5D5394A1A1A19B9B9A
+ 99989796964E4E4E4E4E214E214E2121211F1F306D6A6A6A6A67676767673B18
+ 0D0D0D6600665D5D5D5CA3A3A1A09C9B9A999897964E4E4E4E214E214E21214C
+ 21211F306D6A6A6A676A6A67676735180D180D0000AC5D5D5D5D9FA3A2A1A09B
+ 9B9A9998974E4E4E4E4E4E4E214E214C212121406D6D6A6A6A6A676A67672A18
+ 180D0D00000060605D5D94A5A3A3A1A09C9B9A99985A4E4E4E4E4E4E4E214E21
+ 4E2121716D6D6D6D6A6A676A67671A1818184E000000645D605D5FA6A5A3A2A1
+ A09B9B9A999886564E4E4E4E214E214E2142716F6F6F6D6D6A6A6A6A672E1A18
+ 18180000000000605D605D95A8A5A3A3A1A09C9B9A9A989796877A4A4A787776
+ 7474706F6F6F6D6D6D6D6A6A671E1A1A181F000000000064605D605DA4A8A5A3
+ A2A1A09B9B9A9998979681807F7D7D75757474726F6F6F6D6D6D6A6A411E1A1A
+ 1A0000000000000060605D6062A7A8A5A3A3A1A09C9B9A9998979681807F7D7D
+ 75757474726F6F6F6F6D6D381F1A1E1A21000000000000006660605D6092A8A8
+ A5A3A2A1A09B9B9A9998979681807F7D7D7575747472706F6F6D6C1F1F1E1E1A
+ 000000000000000000606060605D92A9A8A5A3A3A1A09C9B9A9998979681807F
+ 7D7D75757474726F6F6C1F1F1F1E1E5D000000000000000000AF606060606092
+ A8A8A5A3A2A1A09B9B9A9998979681807F7D7D757574747271431F1F1F1F2100
+ 00000000000000000000AE6060605D6062A4A8A5A3A3A1A09C9B9A9998979681
+ 807F7D7D757574454C214C1F1F4E00000000000000000000000000AA60606060
+ 5D5D95A7A5A3A1A1A09C9B9A9998979681807F7D7D77444C4C214C4C4E000000
+ 000000000000000000000000AE60606060605D5F949FA3A3A1A09B9B9A999897
+ 9681807A4B4E4C4E214E1F4D0000000000000000000000000000000000AF6060
+ 605D605D5D5D91939D9EA19B9B9A99898559504E4E4E4E4C4C4C5D0000000000
+ 000000000000000000000000000000666060605D5D5D5D535353535353515151
+ 514E514E4E4E4E4C4EAB00000000000000000000000000000000000000000000
+ 006060605D5D5D5D5D535353535351515151514E4E4E4E640000000000000000
+ 000000000000000000000000000000000000AF6460605D5D5D5D5D5353535353
+ 515151514E660000000000000000000000000000000000000000000000000000
+ 0000000000AE605D5D5D535D5353535353516600000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000FFFFE007FFFF0000FFFF0000
+ 7FFF0000FFFC00001FFF0000FFF0000007FF0000FFC0000003FF0000FF800000
+ 00FF0000FF000000007F0000FE000000003F0000FC000000001F0000F8000000
+ 001F0000F0000000000F0000F000000000070000E000000000070000E0000000
+ 00030000C000000000030000C000000000010000C00000000001000080000000
+ 0001000080000000000100008000000000000000800000000000000080000000
+ 0000000080000000000000008000000000000000800000000000000080000000
+ 0000000080000000000000008000000000000000800000000000000080000000
+ 000100008000000000010000C000000000010000C000000000030000E0000000
+ 00030000E000000000070000F000000000070000F0000000000F0000F8000000
+ 000F0000F8000000001F0000FC000000003F0000FE000000007F0000FF000000
+ 00FF0000FF80000001FF0000FFE0000003FF0000FFF800000FFF0000FFFC0000
+ 3FFF0000FFFF8001FFFF0000FFFFFFFFFFFF0000280000002000000040000000
+ 0100080000000000000400000000000000000000000100000001000000000000
+ 06060600090909000C0C0C000A170A000D130D000F160F000C190C0011111100
+ 1414140012181200181818001D1D1D000C260C000B2B0B000E280E0007340700
+ 0A310A00102B1000122D12001B2A1B0014311400153A1500173D17001D351D00
+ 1E3F1E002222220026262600292929002E2E2E003232320034343400353E3500
+ 3A3A3A003D3D3D00064906000A490A00025502000F560F001043100016451600
+ 13531300016101000067000000690000006D0000066A0600046F04000B610B00
+ 08650800096909000A6F0A00007200000075000000780000007D000015661500
+ 147D150021442100335034003653380026732A003F5240004141410045454500
+ 494949004E4E4E004558470049534B005151510056565600595959005D5D5D00
+ 4369490044744C00427C4B00437C4D006262620065656500636D660068686800
+ 6F6F6F0072727200777777007C7C7C000081000000860000008A0000008E0000
+ 0A820A000091000000950000029B03001083110008A10C000DA6140013AC1D00
+ 1F92270024972E002D8D3700299B350019B226001EB72E002EA03C0024BD3700
+ 2AC23F003B8746003D934C0033A5430037AA4A002EB441003CAF510041844C00
+ 4A835600428F50004197500041B3570041B4580046B85E005C83670063927200
+ 57A36B004ABC650050B96B005FAB760062AE7C0030C8480037C6510035CE5100
+ 3DCC59003BD3590042D1610041D9620046DF6B004CE4730052EA7C0058E68200
+ 5DEC8A0057F085005DF58D008282820085858500888888008D8D8D0090909000
+ 99999900A0A0A000ACACAC000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000052400B0909091C4100000000000000000000000000000000
+ 0000000000521B1B0B0B0B0B0909080808004100000000000000000000000000
+ 0000008E1C1C1B1B1B1B0B0B0B09090808080008400000000000000000000000
+ 0000471C1E1C1C1826313635352D2A230E080800000900000000000000000000
+ 00401E1E1E1C1C192930363635352D2D312A1008080000000000000000000000
+ 40211E1E1E1E1C1C1C1B18353535352D2D313125040800080000000000000051
+ 212121211E1E1E1C1C1C1B3236363535230E0604040800000900000000000040
+ 402121211E1E1E1E1C1C1C32363636270B0B0909080808080040000000004540
+ 403C212121211E1E1E1C1C1C1B1817140B0B0B09090808010800000000004140
+ 3E6140212121211E1E1E1C1C1C1B1B1B1A0B0B0B09040D1008004100004E4141
+ 636240402121211E1E1E1E1C1C1C1B1B0B1B0B0B0B0B0D310808000000454144
+ 6864404040212121211E1E1E1C1C1B1B1B1B1B0B0B0B0E31100808000045454A
+ 696740402140212121211E1E1E1C1C1C1B1B0B1B0B0B152D2308014192454572
+ 7E6C41404040402121211E1E1E1E1C1C1C1B1B1B1A0B152D2A09040B8C474775
+ 806D414141404040212121211E1E1E1C1C1C1B1B0B1B15352D0909098C474776
+ 826F41414140402140212121211E1E1E1C1C1C1B1B1A1735350B09098C47477A
+ 847545454141404040402121211E1E1E1E3A1C1C18272D35350B0B098E4E477B
+ 8583714541414141404040212121211E1E57575656365635360B0B0B004E4779
+ 8685848174736A43404040402121211E1E5A575756563656321B0B40004E4E77
+ 8786858482807E494140402140212121215A575757565636261B0B4E004E4E4E
+ 88878685848280704141404040402121205A5A5A57575656181B1B00008E4E4E
+ 7C8A87868584827F4C4441414040403B395C5A5A575757321B1B1B0000004E4E
+ 4F898A8786858482807E6E676462605F5E5C5C5A5A5A573A1C1B520000005451
+ 4E788B8A8786858482807E69686665605F5E5C5C5A5A381E1C1C000000000051
+ 4E4E7D8B8A8786858482807E69686665605F5E5C5C591E1E1E8E000000000093
+ 514E4E7D8B8A8786858482806969686665605F5E5D201E1E4700000000000000
+ 8E514E4E78898A8786858482807E69686665603D212121400000000000000000
+ 0091514E4E4F7C888786858482807E6968633E40402141000000000000000000
+ 000093514E4E4E4E77797B7A7675727044414040405100000000000000000000
+ 0000000054514E4E474E47474745454541414145000000000000000000000000
+ 0000000000008E4E4E4E474747474645454F0000000000000000000000000000
+ 000000000000000000008E8E8C8C9200000000000000000000000000FFF00FFF
+ FF8001FFFE00007FFC00003FF800001FF000000FE0000007E0000003C0000003
+ C000000180000001800000018000000000000000000000000000000000000000
+ 0000000080000000800000008000000180000001C0000001C0000003E0000003
+ E0000007F000000FF800001FFC00003FFF0000FFFFC003FFFFFC1FFF28000000
+ 1000000020000000010008000000000000010000000000000000000000010000
+ 00010000000000000A0A0A00090F09000F0F0F000E140E000C190C0013131300
+ 14141400111E1100181818001D1D1D00092F09000A390A00113311001B321B00
+ 22222200262626002B2B2B0021322100263626003030300034343400313A3100
+ 393939003E3E3E00044A04000B440B000E490E0005540500065A0600075F0700
+ 124912001848180014531400155915001E521E00006A0000066A0600096A0900
+ 0070000000750000007B0000146414001B631B00137B1300374A38002E713300
+ 2B78300043434300474747004C4C4C004A534B00575757005A5A5A005E5E5E00
+ 46634B004E6152004A7050004878510063636300656565006868680070707000
+ 757575007D7D7D000081000000860000008C00000B860C000092000001980100
+ 09A20E0014AD1F0022B1320020B830003A9048004B975B005D836800539F6600
+ 63A679002BC442003AC0540037CF530039C8530042DA64004DE6750063C28300
+ 59E8840059F187008A8A8A009191910098989800AAAAAA000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000003D110906033400000000000000003E11121F1B1A0C0503
+ 1500000000003615151220252828241902060000004018181514112129250D05
+ 0403150000312E1815151511120E0909060B03005A3349311818151111101009
+ 091C04343E3950313118151515111010091E0C03364C52323131181815111110
+ 101E1A06364E5438323131181515232226291B09594D5554534B311818182B43
+ 42421F095C3D575554513731312D2C454342123D003D4F58555452504A484745
+ 452A1100005C3D5658555452504A484744163D0000005B3D4F5755545250492F
+ 183600000000005C3D3D4D4E4C3A33314000000000000000005C5936363E5A00
+ 00000000F81F0000E0070000C003000080010000800100000000000000000000
+ 000000000000000000000000000000008001000080010000C0030000E0070000
+ F81F000028000000300000006000000001002000000000008025000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000001E1E1E0F1C1C1C4F1B1B1B8F191919BF
+ 171717DF161616FF141414FF131313FF111111FF0F0F0FEF0E0E0EBF0D0D0D9F
+ 0B0B0B6F0A0A0A2F000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000002424240F2323235F212121CF1F1F1FFF1E1E1EFF1C1C1CFF1A1A1AFF
+ 191919FF171717FF161616FF141414FF131313FF111111FF0F0F0FFF0E0E0EFF
+ 0C0C0CFF0B0B0BFF090909DF0808088F0707071F000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000000000000002929290F
+ 2727277F262626EF242424FF222222FF212121FF1F1F1FFF1E1E1EFF1C1C1CFF
+ 1A1A1AFF191919FF171717FF161616FF141414FF131313FF111111FF0F0F0FFF
+ 0E0E0EFF0C0C0CFF0B0B0BFF090909FF080808FF060606BF0505053F00000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000002C2C2C5F2A2A2AEF
+ 292929FF272727FF262626FF242424FF222222FF212121FF1F1F1FFF1E1E1EFF
+ 1C1C1CFF1A1A1AFF191919FF171717FF161616FF141414FF131313FF111111FF
+ 0F0F0FFF0E0E0EFF0C0C0CFF0B0B0BFF090909FF080808FF060606FF0505059F
+ 0505050F00000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000003131310F2F2F2FAF2E2E2EFF2C2C2CFF
+ 2A2A2AFF292929FF272727FF262626FF242424FF222222FF212121FF193019FF
+ 143914FF0E480EFF0D460DFF0C450CFF0B430BFF0C3C0CFF0F2A0FFF111811FF
+ 111111FF0F0F0FFF0E0E0EFF0C0C0CFF0B0B0BFF090909FF080808FF060606FF
+ 040404EF0404044F000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000003434342F323232DF303030FF2F2F2FFF2E2E2EFF
+ 2C2C2CFF2A2A2AFF292929FF272727FF174717FF0B620BFF027702FF007A00FF
+ 007800FF007600FF007400FF007300FF007100FF006F00FF006D00FF006B00FF
+ 035903FF093709FF0D1A0DFF0E0E0EFF0C0C0CFF0B0B0BFF090909FF080808FF
+ 060606FF040404FF0303038F0000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000003737372F353535EF343434FF323232FF303030FF2F2F2FFF
+ 2E2E2EFF2C2C2CFF2A2A2AFF243424FF145414FF135313FF096709FF007C00FF
+ 007A00FF007800FF007600FF007400FF007300FF007100FF006F00FF006D00FF
+ 006B00FF006900FF006700FF044B04FF0B1E0BFF0C0C0CFF0B0B0BFF090909FF
+ 080808FF060606FF040404FF0303039F00000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000003A3A3A2F383838EF373737FF353535FF343434FF323232FF303030FF
+ 2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF292929FF272727FF262626FF242424FF
+ 164416FF027502FF007800FF007600FF007400FF007300FF007100FF006F00FF
+ 006D00FF006B00FF006900FF006700FF006600FF053F05FF0B120BFF0B0B0BFF
+ 090909FF080808FF060606FF040404FF0303039F000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 3D3D3D2F3C3C3CEF3A3A3AFF383838FF373737FF353535FF343434FF323232FF
+ 303030FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF292929FF272727FF262626FF
+ 242424FF1A391AFF007A00FF007800FF007600FF007400FF007300FF007100FF
+ 006F00FF006D00FF006B00FF006900FF006700FF006600FF015A01FF0A1D0AFF
+ 0B0B0BFF090909FF080808FF060606FF040404FF0303038F0000000000000000
+ 000000000000000000000000000000000000000000000000000000004141410F
+ 3F3F3FCF3D3D3DFF3C3C3CFF3A3A3AFF383838FF373737FF353535FF343434FF
+ 323232FF303030FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF292929FF272727FF
+ 262626FF242424FF007C00FF007A00FF007800FF007600FF007400FF007300FF
+ 007100FF036403FF0B410BFF0F2A0FFF101D10FF111111FF0E150EFF0C190CFF
+ 0C0C0CFF0B0B0BFF090909FF080808FF060606FF040404FF0404044F00000000
+ 000000000000000000000000000000000000000000000000000000004242428F
+ 404040FF3F3F3FFF3D3D3DFF3C3C3CFF3A3A3AFF383838FF373737FF353535FF
+ 343434FF323232FF303030FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF292929FF
+ 272727FF262626FF007E00FF007C00FF007A00FF007800FF007600FF007400FF
+ 0D460DFF191919FF171717FF161616FF141414FF131313FF111111FF0F0F0FFF
+ 0E0E0EFF0C0C0CFF0B0B0BFF090909FF080808FF060606FF040404EF0505050F
+ 0000000000000000000000000000000000000000000000004545453F444444FF
+ 424242FF404040FF3F3F3FFF3D3D3DFF3C3C3CFF3A3A3AFF383838FF373737FF
+ 353535FF343434FF323232FF303030FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF
+ 292929FF272727FF008000FF007E00FF007C00FF007A00FF007800FF007600FF
+ 1C1C1CFF1A1A1AFF191919FF171717FF161616FF141414FF131313FF111111FF
+ 0F0F0FFF0E0E0EFF0C0C0CFF0B0B0BFF090909FF080808FF060606FF050505AF
+ 000000000000000000000000000000000000000000000000464646BF454545FF
+ 444444FF424242FF404040FF3F3F3FFF3D3D3DFF3C3C3CFF3A3A3AFF383838FF
+ 373737FF353535FF343434FF323232FF303030FF2F2F2FFF2E2E2EFF2C2C2CFF
+ 2A2A2AFF292929FF272727FF262626FF242424FF1A391AFF163D16FF104C10FF
+ 1E1E1EFF1C1C1CFF1A1A1AFF191919FF171717FF161616FF141414FF131313FF
+ 111111FF0F0F0FFF0E0E0EFF0C0C0CFF0B0B0BFF090909FF080808FF060606FF
+ 0505053F000000000000000000000000000000004A4A4A3F484848FF474747FF
+ 454545FF444444FF39563BFF28742CFF3F3F3FFF3D3D3DFF3C3C3CFF3A3A3AFF
+ 383838FF373737FF353535FF343434FF323232FF303030FF2F2F2FFF2E2E2EFF
+ 2C2C2CFF2A2A2AFF292929FF272727FF262626FF242424FF222222FF212121FF
+ 1F1F1FFF1E1E1EFF1C1C1CFF1A1A1AFF191919FF171717FF161616FF141414FF
+ 131313FF111111FF0F0F0FFF053F05FF0C0C0CFF0B0B0BFF090909FF080808FF
+ 060606BF000000000000000000000000000000004B4B4BBF4A4A4AFF484848FF
+ 474747FF454545FF22942AFF2B7730FF404040FF3F3F3FFF3D3D3DFF3C3C3CFF
+ 3A3A3AFF383838FF373737FF353535FF343434FF323232FF303030FF2F2F2FFF
+ 2E2E2EFF2C2C2CFF2A2A2AFF292929FF272727FF262626FF242424FF222222FF
+ 212121FF1F1F1FFF1E1E1EFF1C1C1CFF1A1A1AFF191919FF171717FF161616FF
+ 141414FF131313FF111111FF006600FF0A230AFF0C0C0CFF0B0B0BFF090909FF
+ 080808FF0707072F00000000000000004F4F4F1F4D4D4DFF4B4B4BFF4A4A4AFF
+ 484848FF3C6240FF1AB328FF2D7A33FF424242FF404040FF3F3F3FFF3D3D3DFF
+ 3C3C3CFF3A3A3AFF383838FF373737FF353535FF343434FF323232FF303030FF
+ 2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF292929FF272727FF262626FF242424FF
+ 222222FF212121FF1F1F1FFF1E1E1EFF1C1C1CFF1A1A1AFF191919FF171717FF
+ 161616FF141414FF131313FF006700FF044B04FF0E0E0EFF0C0C0CFF0B0B0BFF
+ 090909FF0808088F00000000000000005050506F4F4F4FFF4D4D4DFF4B4B4BFF
+ 4A4A4AFF2D973AFF1EB72EFF307C37FF444444FF424242FF404040FF3F3F3FFF
+ 3D3D3DFF3C3C3CFF3A3A3AFF383838FF373737FF353535FF343434FF323232FF
+ 303030FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF292929FF272727FF262626FF
+ 242424FF222222FF212121FF1F1F1FFF1E1E1EFF1C1C1CFF1A1A1AFF191919FF
+ 171717FF161616FF141414FF006900FF006700FF0D1A0DFF0E0E0EFF0C0C0CFF
+ 0B0B0BFF090909EF0000000000000000525252BF505050FF4F4F4FFF4D4D4DFF
+ 49534AFF26BE39FF22BB34FF327F3BFF454545FF444444FF424242FF404040FF
+ 3F3F3FFF3D3D3DFF3C3C3CFF3A3A3AFF383838FF373737FF353535FF343434FF
+ 323232FF303030FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF292929FF272727FF
+ 262626FF242424FF222222FF212121FF1F1F1FFF1E1E1EFF1C1C1CFF1A1A1AFF
+ 191919FF171717FF161616FF006B00FF006900FF074207FF0F0F0FFF0E0E0EFF
+ 0C0C0CFF0B0B0BFF0A0A0A2F00000000535353FF525252FF505050FF4F4F4FFF
+ 417A49FF2AC23FFF26BE39FF35823EFF474747FF454545FF444444FF424242FF
+ 404040FF3F3F3FFF3D3D3DFF3C3C3CFF3A3A3AFF383838FF373737FF353535FF
+ 343434FF323232FF303030FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF292929FF
+ 272727FF262626FF242424FF222222FF212121FF1F1F1FFF1E1E1EFF1C1C1CFF
+ 1A1A1AFF191919FF171717FF006D00FF006B00FF035903FF111111FF0F0F0FFF
+ 0E0E0EFF0C0C0CFF0B0B0B6F5656563F555555FF535353FF525252FF505050FF
+ 3C9B4CFF2DC644FF2AC23FFF388442FF484848FF474747FF454545FF444444FF
+ 424242FF404040FF3F3F3FFF3D3D3DFF3C3C3CFF3A3A3AFF383838FF373737FF
+ 353535FF343434FF323232FF303030FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF
+ 292929FF272727FF262626FF242424FF222222FF212121FF1F1F1FFF1E1E1EFF
+ 1C1C1CFF1A1A1AFF191919FF006F00FF006D00FF006B00FF111811FF111111FF
+ 0F0F0FFF0E0E0EFF0C0C0CAF5858584F575757FF555555FF535353FF525252FF
+ 3BAE50FF31CA4AFF2DC644FF3B8745FF4A4A4AFF484848FF474747FF454545FF
+ 444444FF424242FF404040FF3F3F3FFF3D3D3DFF3C3C3CFF3A3A3AFF383838FF
+ 373737FF353535FF343434FF323232FF303030FF2F2F2FFF2E2E2EFF2C2C2CFF
+ 2A2A2AFF292929FF272727FF262626FF242424FF222222FF212121FF1F1F1FFF
+ 1E1E1EFF1C1C1CFF1A1A1AFF007100FF006F00FF006D00FF0F2A0FFF131313FF
+ 111111FF0F0F0FFF0E0E0EBF5959597F585858FF575757FF555555FF535353FF
+ 39D156FF35CD50FF31CA4AFF3D8949FF4B4B4BFF4A4A4AFF484848FF474747FF
+ 454545FF444444FF424242FF404040FF3F3F3FFF3D3D3DFF3C3C3CFF3A3A3AFF
+ 383838FF373737FF353535FF343434FF323232FF303030FF2F2F2FFF2E2E2EFF
+ 2C2C2CFF2A2A2AFF292929FF272727FF262626FF242424FF222222FF212121FF
+ 1F1F1FFF1E1E1EFF1C1C1CFF007300FF007100FF006F00FF0C3C0CFF141414FF
+ 131313FF111111FF0F0F0FFF5B5B5B7F595959FF585858FF575757FF555555FF
+ 3DD55BFF39D156FF35CD50FF408C4DFF4D4D4DFF4B4B4BFF4A4A4AFF484848FF
+ 474747FF454545FF444444FF424242FF404040FF3F3F3FFF3D3D3DFF3C3C3CFF
+ 3A3A3AFF383838FF373737FF353535FF343434FF323232FF303030FF2F2F2FFF
+ 2E2E2EFF2C2C2CFF2A2A2AFF292929FF272727FF262626FF242424FF222222FF
+ 212121FF1F1F1FFF1E1E1EFF007400FF007300FF007100FF0B430BFF161616FF
+ 141414FF131313FF111111FF5C5C5C7F5B5B5BFF595959FF585858FF575757FF
+ 40D961FF3DD55BFF39D156FF438F51FF4F4F4FFF4D4D4DFF4B4B4BFF4A4A4AFF
+ 484848FF474747FF454545FF444444FF424242FF404040FF3F3F3FFF3D3D3DFF
+ 3C3C3CFF3A3A3AFF383838FF373737FF353535FF343434FF323232FF303030FF
+ 2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF292929FF272727FF262626FF242424FF
+ 222222FF212121FF1F1F1FFF007600FF007400FF007300FF0C450CFF171717FF
+ 161616FF141414FF131313FF5E5E5E7F5D5D5DFF5B5B5BFF595959FF585858FF
+ 44DD67FF40D961FF3DD55BFF459254FF505050FF4F4F4FFF4D4D4DFF4B4B4BFF
+ 4A4A4AFF484848FF474747FF454545FF444444FF424242FF404040FF3F3F3FFF
+ 3D3D3DFF3C3C3CFF3A3A3AFF383838FF373737FF353535FF343434FF323232FF
+ 303030FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF292929FF272727FF262626FF
+ 242424FF202820FF0C590CFF007800FF007600FF007400FF0D460DFF191919FF
+ 171717FF161616FF141414FF6060607F5E5E5EFF5D5D5DFF5B5B5BFF595959FF
+ 48E06DFF44DD67FF40D961FF45A459FF525252FF505050FF4F4F4FFF4D4D4DFF
+ 4B4B4BFF4A4A4AFF484848FF474747FF454545FF444444FF424242FF404040FF
+ 3F3F3FFF3D3D3DFF3C3C3CFF3A3A3AFF383838FF373737FF353535FF343434FF
+ 323232FF303030FF1D511DFF0E6D0EFF155A15FF155815FF145614FF0E600EFF
+ 076F07FF007E00FF007C00FF007A00FF007800FF007600FF0E480EFF1A1A1AFF
+ 191919FF171717FF161616FF6161617F606060FF5E5E5EFF5D5D5DFF5B5B5BFF
+ 4CDB71FF48E06DFF44DD67FF40D961FF479C58FF4F6252FF505050FF4F4F4FFF
+ 4D4D4DFF4B4B4BFF4A4A4AFF484848FF474747FF454545FF444444FF424242FF
+ 404040FF3F3F3FFF3D3D3DFF3C3C3CFF3A3A3AFF383838FF373737FF353535FF
+ 343434FF323232FF185F18FF008B00FF008900FF008700FF008500FF008400FF
+ 008200FF008000FF007E00FF007C00FF007A00FF007800FF143914FF1C1C1CFF
+ 1A1A1AFF191919FF171717DF6262623F616161FF606060FF5E5E5EFF5D5D5DFF
+ 52C470FF4CE473FF48E06DFF44DD67FF40D961FF3DD55BFF3EB955FF419751FF
+ 408C4DFF456B4BFF436948FF416746FF484848FF474747FF454545FF444444FF
+ 424242FF404040FF3F3F3FFF3D3D3DFF3C3C3CFF3A3A3AFF383838FF373737FF
+ 353535FF343434FF196019FF008D00FF008B00FF008900FF008700FF008500FF
+ 008400FF008200FF008000FF007E00FF007C00FF007A00FF193019FF1E1E1EFF
+ 1C1C1CFF1A1A1AFF191919BF6464641F636363FF616161FF606060FF5E5E5EFF
+ 58A46DFF50E878FF4CE473FF48E06DFF44DD67FF40D961FF3DD55BFF39D156FF
+ 35CD50FF31CA4AFF2DC644FF2AC23FFF4A4A4AFF484848FF474747FF454545FF
+ 444444FF424242FF404040FF3F3F3FFF3D3D3DFF3C3C3CFF3A3A3AFF383838FF
+ 373737FF353535FF1A621AFF008F00FF008D00FF008B00FF008900FF008700FF
+ 008500FF008400FF008200FF008000FF007E00FF027702FF212121FF1F1F1FFF
+ 1E1E1EFF1C1C1CFF1B1B1B8F00000000656565DF636363FF616161FF606060FF
+ 5D7965FF53EC7EFF50E878FF4CE473FF48E06DFF44DD67FF40D961FF3DD55BFF
+ 39D156FF35CD50FF31CA4AFF2DC644FF4B4B4BFF4A4A4AFF484848FF474747FF
+ 454545FF444444FF424242FF404040FF3F3F3FFF3D3D3DFF3C3C3CFF3A3A3AFF
+ 383838FF373737FF1B641BFF009100FF008F00FF008D00FF008B00FF008900FF
+ 008700FF008500FF008400FF008200FF008000FF0B620BFF222222FF212121FF
+ 1F1F1FFF1E1E1EFF1C1C1C5F000000006666669F656565FF636363FF616161FF
+ 606060FF58DD7FFF53EC7EFF50E878FF4CE473FF48E06DFF44DD67FF40D961FF
+ 3DD55BFF39D156FF35CD50FF31CA4AFF4D4D4DFF4B4B4BFF4A4A4AFF484848FF
+ 474747FF454545FF444444FF424242FF404040FF3F3F3FFF3D3D3DFF3C3C3CFF
+ 3A3A3AFF383838FF1B661BFF009300FF009100FF008F00FF008D00FF008B00FF
+ 008900FF008700FF008500FF008400FF008200FF174717FF242424FF222222FF
+ 212121FF1F1F1FFF1E1E1E0F000000006767674F666666FF656565FF636363FF
+ 616161FF5DA974FF57EF84FF53EC7EFF50E878FF4CE473FF48E06DFF44DD67FF
+ 40D961FF3DD55BFF39D156FF35CD50FF447D4EFF4D4D4DFF4B4B4BFF4A4A4AFF
+ 484848FF474747FF454545FF444444FF424242FF404040FF3F3F3FFF3D3D3DFF
+ 3C3C3CFF3A3A3AFF0E7F0EFF009500FF009300FF009100FF008F00FF008D00FF
+ 008B00FF008900FF008700FF008500FF027E02FF272727FF262626FF242424FF
+ 222222FF212121CF000000000000000000000000686868EF666666FF656565FF
+ 636363FF616B64FF5BEA87FF57EF84FF53EC7EFF50E878FF4CE473FF48E06DFF
+ 44DD67FF40D961FF3DD55BFF39D156FF35CD50FF3C9C4DFF47644CFF4B4B4BFF
+ 4A4A4AFF484848FF474747FF454545FF444444FF424242FF404040FF3F3F3FFF
+ 2C5C2EFF128413FF009900FF009700FF009500FF009300FF009100FF008F00FF
+ 008D00FF008B00FF008900FF008700FF155815FF292929FF272727FF262626FF
+ 242424FF2323235F0000000000000000000000006969697F686868FF666666FF
+ 656565FF636363FF60AC78FF5BF38AFF57EF84FF53EC7EFF50E878FF4CE473FF
+ 48E06DFF44DD67FF40D961FF3DD55BFF39D156FF35CD50FF31CA4AFF2DC644FF
+ 32A442FF2FA13EFF35823EFF327F3BFF2D8335FF22942BFF1F9126FF0FA817FF
+ 0BA411FF07A00BFF049D05FF009900FF009700FF009500FF009300FF009100FF
+ 008F00FF008D00FF008B00FF028402FF293229FF2A2A2AFF292929FF272727FF
+ 262626EF2424240F0000000000000000000000006A6A6A1F696969EF686868FF
+ 666666FF656565FF636363FF5FDA86FF5BF38AFF57EF84FF53EC7EFF50E878FF
+ 4CE473FF48E06DFF44DD67FF40D961FF3DD55BFF39D156FF35CD50FF31CA4AFF
+ 2DC644FF2AC23FFF26BE39FF22BB34FF1EB72EFF1AB328FF16AF22FF13AC1CFF
+ 0FA817FF0BA411FF07A00BFF049D05FF009900FF009700FF009500FF009300FF
+ 009100FF008F00FF008D00FF204C20FF2E2E2EFF2C2C2CFF2A2A2AFF292929FF
+ 2727277F00000000000000000000000000000000000000006A6A6A7F696969FF
+ 686868FF666666FF656565FF637F6CFF5FED8CFF5BF38AFF57EF84FF53EC7EFF
+ 50E878FF4CE473FF48E06DFF44DD67FF40D961FF3DD55BFF39D156FF35CD50FF
+ 31CA4AFF2DC644FF2AC23FFF26BE39FF22BB34FF1EB72EFF1AB328FF16AF22FF
+ 13AC1CFF0FA817FF0BA411FF07A00BFF049D05FF009900FF009700FF009500FF
+ 009300FF009100FF136C13FF303030FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AEF
+ 2929290F00000000000000000000000000000000000000006B6B6B0F6A6A6ADF
+ 696969FF686868FF666666FF656565FF629B75FF5FF78FFF5BF38AFF57EF84FF
+ 53EC7EFF50E878FF4CE473FF48E06DFF44DD67FF40D961FF3DD55BFF39D156FF
+ 35CD50FF31CA4AFF2DC644FF2AC23FFF26BE39FF22BB34FF1EB72EFF1AB328FF
+ 16AF22FF13AC1CFF0FA817FF0BA411FF07A00BFF049D05FF009900FF009700FF
+ 009500FF0A810AFF343434FF323232FF303030FF2F2F2FFF2E2E2EFF2C2C2C6F
+ 000000000000000000000000000000000000000000000000000000006B6B6B3F
+ 6A6A6AFF696969FF686868FF666666FF656565FF629B75FF5FF78FFF5BF38AFF
+ 57EF84FF53EC7EFF50E878FF4CE473FF48E06DFF44DD67FF40D961FF3DD55BFF
+ 39D156FF35CD50FF31CA4AFF2DC644FF2AC23FFF26BE39FF22BB34FF1EB72EFF
+ 1AB328FF16AF22FF13AC1CFF0FA817FF0BA411FF07A00BFF049D05FF009900FF
+ 0A850AFF333D33FF353535FF343434FF323232FF303030FF2F2F2FBF00000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 6B6B6B8F6A6A6AFF696969FF686868FF666666FF656565FF629B75FF5FF78FFF
+ 5BF38AFF57EF84FF53EC7EFF50E878FF4CE473FF48E06DFF44DD67FF40D961FF
+ 3DD55BFF39D156FF35CD50FF31CA4AFF2DC644FF2AC23FFF26BE39FF22BB34FF
+ 1EB72EFF1AB328FF16AF22FF13AC1CFF0FA817FF0BA411FF07A00BFF128413FF
+ 364036FF383838FF373737FF353535FF343434FF323232EF3131310F00000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000006B6B6B9F6A6A6AFF696969FF686868FF666666FF656565FF637F6CFF
+ 5FDA86FF5BF38AFF57EF84FF53EC7EFF50E878FF4CE473FF48E06DFF44DD67FF
+ 40D961FF3DD55BFF39D156FF35CD50FF31CA4AFF2DC644FF2AC23FFF26BE39FF
+ 22BB34FF1EB72EFF1AB328FF16AF22FF13AC1CFF0FA817FF257127FF3D3D3DFF
+ 3C3C3CFF3A3A3AFF383838FF373737FF353535EF3434342F0000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000006B6B6B0F6B6B6BCF6A6A6AFF696969FF686868FF666666FF656565FF
+ 636363FF60AC78FF5BEA87FF57EF84FF53EC7EFF50E878FF4CE473FF48E06DFF
+ 44DD67FF40D961FF3DD55BFF39D156FF35CD50FF31CA4AFF2DC644FF2AC23FFF
+ 26BE39FF22BB34FF1EB72EFF1AB328FF22942AFF39563BFF404040FF3F3F3FFF
+ 3D3D3DFF3C3C3CFF3A3A3AFF383838EF3737372F000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000006B6B6B0F6B6B6B9F6A6A6AFF696969FF686868FF666666FF
+ 656565FF636363FF616B64FF5DA974FF58DD7FFF53EC7EFF50E878FF4CE473FF
+ 48E06DFF44DD67FF40D961FF3DD55BFF39D156FF35CD50FF31CA4AFF2DC644FF
+ 2AC23FFF26BE39FF2D973AFF3C6240FF454545FF444444FF424242FF404040FF
+ 3F3F3FFF3D3D3DFF3C3C3CEF3A3A3A2F00000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000006B6B6B8F6A6A6AFF696969FF686868FF
+ 666666FF656565FF636363FF616161FF606060FF5C8267FF58A46DFF52C470FF
+ 4CDB71FF48E06DFF44DD67FF40D961FF3DD55BFF39D156FF3AB650FF3C9B4CFF
+ 417A49FF49534AFF4A4A4AFF484848FF474747FF454545FF444444FF424242FF
+ 404040FF3F3F3FCF3D3D3D2F0000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000006B6B6B3F6A6A6ADF696969FF
+ 686868FF666666FF656565FF636363FF616161FF606060FF5E5E5EFF5D5D5DFF
+ 5B5B5BFF595959FF585858FF575757FF555555FF535353FF525252FF505050FF
+ 4F4F4FFF4D4D4DFF4B4B4BFF4A4A4AFF484848FF474747FF454545FF444444FF
+ 4242428F4141410F000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000006B6B6B0F6A6A6A7F
+ 696969FF686868FF666666FF656565FF636363FF616161FF606060FF5E5E5EFF
+ 5D5D5DFF5B5B5BFF595959FF585858FF575757FF555555FF535353FF525252FF
+ 505050FF4F4F4FFF4D4D4DFF4B4B4BFF4A4A4AFF484848FF464646BF4545453F
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 6A6A6A1F6969698F686868EF666666FF656565FF636363FF616161FF606060FF
+ 5E5E5EFF5D5D5DFF5B5B5BFF595959FF585858FF575757FF555555FF535353FF
+ 525252FF505050FF4F4F4FFF4D4D4DFF4B4B4BBF4A4A4A3F0000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000006767674F6666669F656565EF636363FF616161FF
+ 606060FF5E5E5EFF5D5D5DFF5B5B5BFF595959FF585858FF575757FF555555FF
+ 535353FF525252BF5050506F4F4F4F1F00000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000006464641F6262623F
+ 6161617F6060607F5E5E5E7F5C5C5C7F5B5B5B7F5959597F5858585F5656563F
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000FFFF8001FFFF0000FFFC00003FFF0000FFF00000
+ 0FFF0000FFE0000003FF0000FF80000001FF0000FF00000000FF0000FE000000
+ 007F0000FC000000003F0000F8000000001F0000F0000000000F0000F0000000
+ 00070000E000000000070000E000000000030000C000000000030000C0000000
+ 0001000080000000000100008000000000010000800000000000000080000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000800000000000000080000000
+ 000000008000000000010000C000000000010000C000000000010000C0000000
+ 00030000E000000000030000E000000000070000F0000000000F0000F8000000
+ 000F0000FC000000001F0000FC000000003F0000FE000000007F0000FF800000
+ 00FF0000FFC0000001FF0000FFE0000007FF0000FFF800001FFF0000FFFF0000
+ 7FFF0000FFFFE007FFFF00002800000020000000400000000100200000000000
+ 8010000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000000000000002121210F
+ 1F1F1F5F1D1D1D9F1A1A1ACF181818FF151515FF131313FF101010FF0E0E0EDF
+ 0C0C0CBF0A0A0A6F0808081F0000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000002929291F2626269F232323FF
+ 212121FF1F1F1FFF1C1C1CFF1A1A1AFF181818FF151515FF131313FF101010FF
+ 0E0E0EFF0C0C0CFF090909FF070707BF0606063F000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000002D2D2D8F2A2A2AFF282828FF262626FF
+ 232323FF212121FF1F1F1FFF1C1C1CFF1A1A1AFF181818FF151515FF131313FF
+ 101010FF0E0E0EFF0C0C0CFF090909FF070707FF050505BF0404041F00000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000003434341F323232CF2F2F2FFF2D2D2DFF2A2A2AFF282828FF
+ 1E371EFF0F560FFF086408FF007800FF007500FF007200FF006F00FF026102FF
+ 064906FF0B2B0BFF0E0E0EFF0C0C0CFF090909FF070707FF050505EF0303034F
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000003939392F363636EF343434FF323232FF2F2F2FFF2D2D2DFF2A2A2AFF
+ 1E3F1EFF135313FF0B610BFF007A00FF007800FF007500FF007200FF006F00FF
+ 006C00FF006900FF006100FF073407FF0C0C0CFF090909FF070707FF050505FF
+ 0303035F00000000000000000000000000000000000000000000000000000000
+ 3E3E3E0F3B3B3BEF393939FF363636FF343434FF323232FF2F2F2FFF2D2D2DFF
+ 2A2A2AFF282828FF262626FF1D341DFF027502FF007800FF007500FF007200FF
+ 006F00FF006C00FF006900FF006700FF025502FF0A170AFF090909FF070707FF
+ 050505FF0303034F000000000000000000000000000000000000000000000000
+ 404040BF3D3D3DFF3B3B3BFF393939FF363636FF343434FF323232FF2F2F2FFF
+ 2D2D2DFF2A2A2AFF282828FF262626FF096709FF007A00FF007800FF007500FF
+ 007200FF0A490AFF102B10FF121812FF0F160FFF0C190CFF0C0C0CFF090909FF
+ 070707FF050505EF0404041F000000000000000000000000000000004444446F
+ 424242FF404040FF3D3D3DFF3B3B3BFF393939FF363636FF343434FF323232FF
+ 2F2F2FFF2D2D2DFF2A2A2AFF282828FF096909FF007D00FF007A00FF007800FF
+ 104310FF1A1A1AFF181818FF151515FF131313FF101010FF0E0E0EFF0C0C0CFF
+ 090909FF070707FF050505BF0000000000000000000000004A4A4A0F474747EF
+ 444444FF424242FF365338FF3D3D3DFF3B3B3BFF393939FF363636FF343434FF
+ 323232FF2F2F2FFF2D2D2DFF2A2A2AFF282828FF262626FF1D341DFF173D17FF
+ 1B2A1BFF1C1C1CFF1A1A1AFF181818FF151515FF131313FF101010FF0D130DFF
+ 0C0C0CFF090909FF070707FF0606063F00000000000000004B4B4B7F494949FF
+ 474747FF3F5240FF1F9227FF404040FF3D3D3DFF3B3B3BFF393939FF363636FF
+ 343434FF323232FF2F2F2FFF2D2D2DFF2A2A2AFF282828FF262626FF232323FF
+ 212121FF1F1F1FFF1C1C1CFF1A1A1AFF181818FF151515FF131313FF0C260CFF
+ 073407FF0C0C0CFF090909FF070707BF00000000000000004E4E4EDF4B4B4BFF
+ 494949FF2D8D37FF24972EFF424242FF404040FF3D3D3DFF3B3B3BFF393939FF
+ 363636FF343434FF323232FF2F2F2FFF2D2D2DFF2A2A2AFF282828FF262626FF
+ 232323FF212121FF1F1F1FFF1C1C1CFF1A1A1AFF181818FF151515FF0E280EFF
+ 006100FF0E0E0EFF0C0C0CFF090909FF0808081F5252522F505050FF4E4E4EFF
+ 49534BFF24BD37FF299B35FF444444FF424242FF404040FF3D3D3DFF3B3B3BFF
+ 393939FF363636FF343434FF323232FF2F2F2FFF2D2D2DFF2A2A2AFF282828FF
+ 262626FF232323FF212121FF1F1F1FFF1C1C1CFF1A1A1AFF181818FF102B10FF
+ 006900FF0A310AFF0E0E0EFF0C0C0CFF0A0A0A6F5555556F535353FF505050FF
+ 44744CFF2AC23FFF2EA03CFF474747FF444444FF424242FF404040FF3D3D3DFF
+ 3B3B3BFF393939FF363636FF343434FF323232FF2F2F2FFF2D2D2DFF2A2A2AFF
+ 282828FF262626FF232323FF212121FF1F1F1FFF1C1C1CFF1A1A1AFF122D12FF
+ 006C00FF064906FF101010FF0E0E0EFF0C0C0CBF5757578F555555FF535353FF
+ 428F50FF30C848FF33A543FF494949FF474747FF444444FF424242FF404040FF
+ 3D3D3DFF3B3B3BFF393939FF363636FF343434FF323232FF2F2F2FFF2D2D2DFF
+ 2A2A2AFF282828FF262626FF232323FF212121FF1F1F1FFF1C1C1CFF143014FF
+ 006F00FF026102FF131313FF101010FF0E0E0EEF595959BF575757FF555555FF
+ 41B357FF35CE51FF37AA4AFF4B4B4BFF494949FF474747FF444444FF424242FF
+ 404040FF3D3D3DFF3B3B3BFF393939FF363636FF343434FF323232FF2F2F2FFF
+ 2D2D2DFF2A2A2AFF282828FF262626FF232323FF212121FF1F1F1FFF153215FF
+ 007200FF006F00FF151515FF131313FF101010FF5C5C5CBF5A5A5AFF575757FF
+ 46B85EFF3BD359FF3CAF51FF4E4E4EFF4B4B4BFF494949FF474747FF444444FF
+ 424242FF404040FF3D3D3DFF3B3B3BFF393939FF363636FF343434FF323232FF
+ 2F2F2FFF2D2D2DFF2A2A2AFF282828FF262626FF232323FF212121FF153A15FF
+ 007500FF007200FF181818FF151515FF131313FF5E5E5EBF5C5C5CFF5A5A5AFF
+ 4ABC65FF41D962FF41B458FF505050FF4E4E4EFF4B4B4BFF494949FF474747FF
+ 444444FF424242FF404040FF3D3D3DFF3B3B3BFF393939FF363636FF343434FF
+ 323232FF2F2F2FFF214421FF2A2A2AFF282828FF1E371EFF164516FF046F04FF
+ 007800FF007500FF1A1A1AFF181818FF151515FF616161BF5F5F5FFF5C5C5CFF
+ 50B96BFF46DF6BFF42D161FF4A8356FF505050FF4E4E4EFF4B4B4BFF494949FF
+ 474747FF444444FF424242FF404040FF3D3D3DFF3B3B3BFF393939FF363636FF
+ 343434FF323232FF008B00FF008900FF008600FF008300FF008000FF007D00FF
+ 007A00FF007800FF1C1C1CFF1A1A1AFF181818FF6363637F616161FF5F5F5FFF
+ 57A36BFF4CE473FF46DF6BFF41D962FF3DCC59FF3CAF51FF3D934CFF3B8746FF
+ 455847FF474747FF444444FF424242FF404040FF3D3D3DFF3B3B3BFF393939FF
+ 363636FF343434FF008E00FF008B00FF008900FF008600FF008300FF008000FF
+ 007D00FF066A06FF1F1F1FFF1C1C1CFF1A1A1ACF6565655F636363FF616161FF
+ 5C8367FF52EA7CFF4CE473FF46DF6BFF41D962FF3BD359FF35CE51FF30C848FF
+ 436949FF494949FF474747FF444444FF424242FF404040FF3D3D3DFF3B3B3BFF
+ 393939FF363636FF009100FF008E00FF008B00FF008900FF008600FF008300FF
+ 008000FF0F560FFF212121FF1F1F1FFF1D1D1DAF6767671F666666FF636363FF
+ 616161FF58E682FF52EA7CFF4CE473FF46DF6BFF41D962FF3BD359FF35CE51FF
+ 41844CFF4B4B4BFF494949FF474747FF444444FF424242FF404040FF3D3D3DFF
+ 3B3B3BFF353E35FF009400FF009100FF008E00FF008B00FF008900FF008600FF
+ 008300FF1E371EFF232323FF212121FF1F1F1F5F00000000676767BF666666FF
+ 636363FF5FAB76FF57F085FF52EA7CFF4CE473FF46DF6BFF41D962FF3BD359FF
+ 37C651FF437C4DFF49534BFF494949FF474747FF444444FF424242FF404040FF
+ 335034FF147D15FF009700FF009400FF009100FF008E00FF008B00FF008900FF
+ 0A6F0AFF282828FF262626FF232323FF2121210F000000006A6A6A5F686868FF
+ 666666FF636D66FF5DEC8AFF57F085FF52EA7CFF4CE473FF46DF6BFF41D962FF
+ 3BD359FF35CE51FF30C848FF2EB441FF2EA03CFF299B35FF24972EFF13AC1DFF
+ 0DA614FF08A10CFF029B03FF009700FF009400FF009100FF008E00FF008B00FF
+ 214421FF2A2A2AFF282828FF2626269F0000000000000000000000006A6A6ADF
+ 686868FF666666FF639272FF5DF58DFF57F085FF52EA7CFF4CE473FF46DF6BFF
+ 41D962FF3BD359FF35CE51FF30C848FF2AC23FFF24BD37FF1EB72EFF19B226FF
+ 13AC1DFF0DA614FF08A10CFF029B03FF009700FF009400FF009100FF156615FF
+ 2F2F2FFF2D2D2DFF2A2A2AFF2929291F0000000000000000000000006B6B6B3F
+ 6A6A6AFF686868FF666666FF62AE7CFF5DF58DFF57F085FF52EA7CFF4CE473FF
+ 46DF6BFF41D962FF3BD359FF35CE51FF30C848FF2AC23FFF24BD37FF1EB72EFF
+ 19B226FF13AC1DFF0DA614FF08A10CFF029B03FF009700FF0A820AFF343434FF
+ 323232FF2F2F2FFF2D2D2D8F0000000000000000000000000000000000000000
+ 6B6B6B8F6A6A6AFF686868FF666666FF62AE7CFF5DF58DFF57F085FF52EA7CFF
+ 4CE473FF46DF6BFF41D962FF3BD359FF35CE51FF30C848FF2AC23FFF24BD37FF
+ 1EB72EFF19B226FF13AC1DFF0DA614FF08A10CFF108311FF353E35FF363636FF
+ 343434FF323232CF3030300F0000000000000000000000000000000000000000
+ 000000006B6B6BBF6A6A6AFF686868FF666666FF639272FF5DEC8AFF57F085FF
+ 52EA7CFF4CE473FF46DF6BFF41D962FF3BD359FF35CE51FF30C848FF2AC23FFF
+ 24BD37FF1EB72EFF19B226FF13AC1DFF26732AFF3D3D3DFF3B3B3BFF393939FF
+ 363636EF3434341F000000000000000000000000000000000000000000000000
+ 000000006B6B6B0F6B6B6BAF6A6A6AFF686868FF666666FF636D66FF5FAB76FF
+ 58E682FF52EA7CFF4CE473FF46DF6BFF41D962FF3BD359FF35CE51FF30C848FF
+ 2AC23FFF24BD37FF2D8D37FF3F5240FF424242FF404040FF3D3D3DFF3B3B3BEF
+ 3939392F00000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000006B6B6B8F6A6A6AFF686868FF666666FF636363FF
+ 616161FF5C8367FF57A36BFF50B96BFF4ABC65FF46B85EFF41B357FF419750FF
+ 427C4BFF49534BFF494949FF474747FF444444FF424242FF404040BF3E3E3E0F
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000006B6B6B3F6A6A6ADF686868FF666666FF
+ 636363FF616161FF5F5F5FFF5C5C5CFF5A5A5AFF575757FF555555FF535353FF
+ 505050FF4E4E4EFF4B4B4BFF494949FF474747EF4444446F0000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000006A6A6A5F676767BF
+ 666666FF636363FF616161FF5F5F5FFF5C5C5CFF5A5A5AFF575757FF555555FF
+ 535353FF505050FF4E4E4EDF4B4B4B7F4A4A4A0F000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 6767671F6565655F6363637F616161BF5E5E5EBF5C5C5CBF595959BF5757578F
+ 5555556F5252522F000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000FFC003FFFF0000FFFE00003F
+ F800001FF000000FE0000007E0000003C0000003800000018000000180000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000008000000080000001C0000001C0000003E0000003F0000007
+ F000000FFC00001FFE00007FFF8000FFFFE007FF280000001000000020000000
+ 0100200000000000400400000000000000000000000000000000000000000000
+ 0000000000000000000000002727273F222222AF1D1D1DEF181818FF131313FF
+ 0F0F0FFF0B0B0BAF0707075F0000000000000000000000000000000000000000
+ 000000003535350F303030AF2B2B2BFF213221FF124912FF0E490EFF0B440BFF
+ 0A390AFF0C190CFF0A0A0AFF060606CF0404041F000000000000000000000000
+ 3E3E3E0F393939CF343434FF303030FF263626FF184818FF066A06FF007500FF
+ 007000FF006A00FF044A04FF090F09FF050505EF0404041F0000000000000000
+ 424242AF3E3E3EFF393939FF343434FF303030FF2B2B2BFF145314FF007B00FF
+ 017001FF113311FF111E11FF0E140EFF0A0A0AFF060606CF000000004B4B4B3F
+ 474747FF2E7133FF3E3E3EFF393939FF343434FF303030FF2B2B2BFF223222FF
+ 1B321BFF1D1D1DFF181818FF131313FF092F09FF0A0A0AFF0707075F5050509F
+ 4A534BFF22B132FF434343FF3E3E3EFF393939FF343434FF303030FF2B2B2BFF
+ 262626FF222222FF1D1D1DFF181818FF055405FF0C190CFF0B0B0BAF555555CF
+ 4A7050FF2BC442FF474747FF434343FF3E3E3EFF393939FF343434FF303030FF
+ 2B2B2BFF262626FF222222FF1D1D1DFF065A06FF0A390AFF0F0F0FFF5A5A5AFF
+ 4B975BFF37CF53FF4C4C4CFF474747FF434343FF3E3E3EFF393939FF343434FF
+ 303030FF2B2B2BFF262626FF222222FF075F07FF0B440BFF131313FF5F5F5FFF
+ 539F66FF42DA64FF4E6152FF4C4C4CFF474747FF434343FF3E3E3EFF393939FF
+ 343434FF1E521EFF155915FF096A09FF007B00FF0E490EFF181818FF636363BF
+ 5D8368FF4DE675FF42DA64FF39C853FF3A9048FF474747FF434343FF3E3E3EFF
+ 393939FF1B631BFF008C00FF008600FF008100FF124912FF1D1D1DFF6868688F
+ 646464FF59E884FF4DE675FF42DA64FF3AC054FF46634BFF474747FF434343FF
+ 374A38FF137B13FF009200FF008C00FF008600FF213221FF222222AF6A6A6A1F
+ 686868FF63A679FF59F187FF4DE675FF42DA64FF37CF53FF2BC442FF20B830FF
+ 14AD1FFF09A20EFF019801FF009200FF146414FF2B2B2BFF2727273F00000000
+ 6A6A6A8F686868FF63C283FF59F187FF4DE675FF42DA64FF37CF53FF2BC442FF
+ 20B830FF14AD1FFF09A20EFF0B860CFF313A31FF303030BF0000000000000000
+ 000000006A6A6AAF686868FF63A679FF59E884FF4DE675FF42DA64FF37CF53FF
+ 2BC442FF22B132FF2B7830FF3E3E3EFF393939CF3535350F0000000000000000
+ 00000000000000006A6A6A8F686868FF646464FF5D8368FF539F66FF4B975BFF
+ 487851FF4A534BFF474747FF424242AF3E3E3E0F000000000000000000000000
+ 0000000000000000000000006A6A6A1F6868688F636363BF5F5F5FFF5A5A5AFF
+ 555555CF5050509F4B4B4B3F00000000000000000000000000000000F00F0000
+ C003000080010000800100000000000000000000000000000000000000000000
+ 00000000000000000000000080010000C0010000E0030000F00F0000}
+ end
+ inherited Label1: TLabel
+ Width = 221
+ Caption = 'Data Table Master/Detail Setup Wizard'
+ end
+ inherited Label2: TLabel
+ Width = 295
+ Caption = 'This wizard will help you configure a master/detail relationship'
+ end
+ end
+ inherited pc_Pages: TPageControl
+ Width = 459
+ Height = 401
+ ActivePage = ts_MasterSource
+ inherited ts_Welcome: TTabSheet
+ inherited Label3: TLabel
+ Width = 313
+ Caption = 'Welcome to the Data Table Master/Detail Setup Wizard'
+ end
+ inherited Label4: TLabel
+ Width = 350
+ Height = 39
+ Caption =
+ 'This wizard will help you set up a Master/Detail relationship by' +
+ ' choosing a Master Source for the selected data table and defini' +
+ 'ng how the relationshop between master and detail tables is mapp' +
+ 'ed.'
+ WordWrap = True
+ end
+ object Label24: TLabel
+ Left = 24
+ Top = 72
+ Width = 218
+ Height = 13
+ Caption = 'This wizard will affect the following properties'
+ end
+ object Label25: TLabel
+ Left = 32
+ Top = 88
+ Width = 73
+ Height = 13
+ Caption = '- MasterSource'
+ end
+ object Label26: TLabel
+ Left = 32
+ Top = 104
+ Width = 145
+ Height = 13
+ Caption = '- MasterFields and DetailFields'
+ end
+ object Label27: TLabel
+ Left = 32
+ Top = 136
+ Width = 120
+ Height = 13
+ Caption = '- MasterParamsMappings'
+ end
+ object Label28: TLabel
+ Left = 32
+ Top = 152
+ Width = 120
+ Height = 13
+ Caption = '- MasterRequestMapping'
+ end
+ object Label29: TLabel
+ Left = 32
+ Top = 120
+ Width = 106
+ Height = 13
+ Caption = '- MasterMappingMode'
+ end
+ end
+ object ts_MasterSource: TTabSheet [1]
+ Caption = 'ts_MasterSource'
+ ImageIndex = 6
+ object Label8: TLabel
+ Left = 8
+ Top = 8
+ Width = 105
+ Height = 13
+ Caption = 'Pick MasterSource'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = [fsBold]
+ ParentFont = False
+ end
+ object Label9: TLabel
+ Left = 24
+ Top = 24
+ Width = 286
+ Height = 13
+ Caption = 'Select the data table to use as master source for this table:'
+ end
+ object Label10: TLabel
+ Left = 8
+ Top = 80
+ Width = 126
+ Height = 13
+ Caption = 'Choose Mapping Mode'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = [fsBold]
+ ParentFont = False
+ end
+ object Label17: TLabel
+ Left = 24
+ Top = 96
+ Width = 371
+ Height = 13
+ Caption =
+ 'Select what method you want to use fetch detail data for your ma' +
+ 'ster source'
+ end
+ object lbl_Params1: TLabel
+ Left = 42
+ Top = 204
+ Width = 354
+ Height = 39
+ Caption =
+ 'Master key fields will be passed as parameters when fetching det' +
+ 'ail data. Use this if you'#39're talking to a standard DA server, an' +
+ 'd have defined Parameters in data table inside your schema.'
+ WordWrap = True
+ end
+ object lbl_Params2: TLabel
+ Left = 42
+ Top = 248
+ Width = 320
+ Height = 26
+ Caption =
+ 'Your detail data will be fetched via the standard DataRequestCal' +
+ 'l, just like any data table.'
+ WordWrap = True
+ end
+ object lbl_Method1: TLabel
+ Left = 42
+ Top = 324
+ Width = 358
+ Height = 13
+ Caption =
+ 'Data will be retrieved using a custom method you provided in you' +
+ 'r service.'
+ end
+ object lbl_Method2: TLabel
+ Left = 42
+ Top = 344
+ Width = 345
+ Height = 22
+ Caption =
+ 'This option is only available if the detail table uses a separat' +
+ 'e RemoteDataAdapter component with a custom DataRequestCall.'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clGrayText
+ Font.Height = -9
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ ParentFont = False
+ WordWrap = True
+ end
+ object lbl_Params3: TLabel
+ Left = 42
+ Top = 282
+ Width = 298
+ Height = 11
+ Caption =
+ 'This option is only available if your detail data table defines ' +
+ 'parameters.'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clGrayText
+ Font.Height = -9
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ ParentFont = False
+ WordWrap = True
+ end
+ object lbl_Where1: TLabel
+ Left = 42
+ Top = 140
+ Width = 291
+ Height = 13
+ Caption = 'A where clause will be passed to retrieve filtered detail data.'
+ end
+ object lbl_Where2: TLabel
+ Left = 42
+ Top = 160
+ Width = 175
+ Height = 11
+ Caption = 'Recommended for Version 5.0 and above.'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clGrayText
+ Font.Height = -9
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ ParentFont = False
+ end
+ object cb_DataSources: TComboBox
+ Left = 24
+ Top = 40
+ Width = 289
+ Height = 21
+ Style = csDropDownList
+ ItemHeight = 13
+ TabOrder = 0
+ OnChange = cb_DataSourcesChange
+ end
+ object rb_Where: TRadioButton
+ Left = 24
+ Top = 120
+ Width = 177
+ Height = 13
+ Caption = 'Using automatic WHERE clauses'
+ TabOrder = 1
+ OnClick = cb_DataSourcesChange
+ end
+ object rb_Params: TRadioButton
+ Left = 24
+ Top = 184
+ Width = 129
+ Height = 13
+ Caption = 'Using data parameters'
+ TabOrder = 2
+ OnClick = cb_DataSourcesChange
+ end
+ object rb_Method: TRadioButton
+ Left = 24
+ Top = 304
+ Width = 153
+ Height = 13
+ Caption = 'Using a custom method call'
+ TabOrder = 3
+ OnClick = cb_DataSourcesChange
+ end
+ end
+ object ts_Fields: TTabSheet [2]
+ Caption = 'ts_Fields'
+ ImageIndex = 3
+ object labMasterFields: TLabel
+ Left = 24
+ Top = 80
+ Width = 67
+ Height = 13
+ Caption = '&Master Fields:'
+ FocusControl = lbMaster
+ end
+ object labDetailFields: TLabel
+ Left = 256
+ Top = 80
+ Width = 61
+ Height = 13
+ Caption = '&Detail Fields:'
+ FocusControl = lbDetail
+ end
+ object Label13: TLabel
+ Left = 24
+ Top = 311
+ Width = 64
+ Height = 13
+ Caption = 'MasterFields:'
+ FocusControl = eMasterFields
+ end
+ object Label14: TLabel
+ Left = 24
+ Top = 335
+ Width = 58
+ Height = 13
+ Caption = 'DetailFields:'
+ FocusControl = eDetailFields
+ end
+ object Label18: TLabel
+ Left = 8
+ Top = 8
+ Width = 114
+ Height = 13
+ Caption = 'Master/Detail Fields'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = [fsBold]
+ ParentFont = False
+ end
+ object Label19: TLabel
+ Left = 24
+ Top = 24
+ Width = 323
+ Height = 13
+ Caption =
+ 'Please select the fields that describe the Master/Detail relatio' +
+ 'nship.'
+ end
+ object lbMaster: TListBox
+ Left = 22
+ Top = 96
+ Width = 164
+ Height = 209
+ ItemHeight = 13
+ MultiSelect = True
+ TabOrder = 0
+ end
+ object lbDetail: TListBox
+ Left = 254
+ Top = 96
+ Width = 164
+ Height = 209
+ ItemHeight = 13
+ MultiSelect = True
+ TabOrder = 1
+ end
+ object eMasterFields: TEdit
+ Left = 97
+ Top = 308
+ Width = 321
+ Height = 21
+ TabOrder = 2
+ Text = 'fdsfdsdsf'
+ OnChange = OnFieldMappingChange
+ end
+ object eDetailFields: TEdit
+ Left = 97
+ Top = 332
+ Width = 321
+ Height = 21
+ TabOrder = 3
+ Text = 'fdsfdsdsf'
+ OnChange = OnFieldMappingChange
+ end
+ object bbAddFieldMapping: TBitBtn
+ Left = 190
+ Top = 96
+ Width = 60
+ Height = 25
+ Caption = '&Add'
+ TabOrder = 4
+ OnClick = bbAddFieldMappingClick
+ Glyph.Data = {
+ 36030000424D3603000000000000360000002800000010000000100000000100
+ 18000000000000030000120B0000120B00000000000000000000FF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF03
+ 5D05035D05FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FF035D055BF791058C0D035D05FF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF035D055B
+ F79105950E035D05FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FF035D055BF79105920D035D05FF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF035D055B
+ F79106950F035D05FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ 035D05035D05035D05035D05035D055BF7910C9C18035D05035D05035D05035D
+ 05035D05FF00FFFF00FFFF00FF035D055BF7913BDA6930CF572AC64D21B83C17
+ A62B119F210D9E1C0A9A1506920E05930D058B0D035D05FF00FFFF00FF035D05
+ 5BF7915BF7915BF7915BF7915BF7915BF79118A92F5BF7915BF7915BF7915BF7
+ 915BF791035D05FF00FFFF00FFFF00FF035D05035D05035D05035D05035D055B
+ F79125BC42035D05035D05035D05035D05035D05FF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FF035D055BF79130CE57035D05FF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF035D055B
+ F7913BD968035D05FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FF035D055BF79148EB7F035D05FF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF035D055B
+ F7915BF791035D05FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FF035D05035D05FF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
+ end
+ object BitBtn4: TBitBtn
+ Left = 190
+ Top = 280
+ Width = 59
+ Height = 25
+ Caption = '&Clear'
+ TabOrder = 5
+ OnClick = BitBtn4Click
+ Glyph.Data = {
+ 36030000424D3603000000000000360000002800000010000000100000000100
+ 18000000000000030000120B0000120B00000000000000000000FF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFF2BB81F3C48AF2BC81EF
+ B072EEAF6EEFB275FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFBEBBDFEF3C9FBDEACF3C990FBB67EFFB47DFCCA99FFD9ADFED9A7F0B5
+ 77FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFEFAD3FEF7CCFBDCA9EBCA91A9
+ B86E84AB542B912057A743EAF3C7FCE9BDEEAD6FFF00FFFF00FFFF00FFFF00FF
+ EDA565F3C28AFCF0C4FCE5B5FBD09F2C9622007B00058206067F043DA335FEF2
+ D0F0B173FF00FFFF00FFFF00FFFF00FFEEAB6DEDA767EFB070F6C990FFD8AC2E
+ 9823006E006ABF6BFFF0EA48A138A3AF5EFCAF74FF00FFFF00FFFF00FFFF00FF
+ F2B479F2B77EF0B277F0AC6FFBB57E7AB46041A6416FBC69FFFFFFF4FEFBBCBB
+ 79F3AA6BFF00FFFF00FFFF00FFFF00FFF7C292FAC598F8C293F8C090F3BF8AC2
+ D5A5FFFFFFD9EED556B1534BAF4BB8BC79F8B075FF00FFFF00FFFF00FFF6C792
+ FCD4ADFCD4ACFCD0A9FCD0A9FFD4B55DA94680C780E0F2DE27982400700082B0
+ 5BFFBD90EEAC6DFF00FFFF00FFF6C792FFEAC4FEE3BCFEE2BAFEE0B8FFE0BAD9
+ D9AC0A8209188A16037F0300790077B45DFFCEAAEEAC6DFF00FFFF00FFFADDAB
+ FFFBD5FFF4CCFFF3CAFFF0C9FFEFC5FFF2D1B5D5982A96242B99249ACB87B5D1
+ 95FFE0BAF2B77AFF00FFFF00FFFCEFC4FFFFD8FFFBD3FFFCD4FFFBD3FFFBD4FF
+ FCD4FFFFE1FFFFEBFFFFE7FFFFE0FFF8D7FFF4CBF3C086FF00FFFF00FFFEF4CB
+ FFFFDDFFFFD9FFFFD9FFFFDAFFFED7FEF6CCF8DAA3F4C07DF4C17FF7D8A3FEF2
+ C5FFFFDDF3C991FF00FFFF00FFF4CC96F8DEAFF8DDACF7D8A6F6CF99F3BF80EF
+ AC66EB9D4FEB9C4CEB9F55F0AC6EFAC087FCD3A0FAC089FF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFEDA354EFAB68F7BC83FABF
+ 88FABC83FABC83FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFAC088FAC088FAC088FF00FFFF00FF}
+ end
+ end
+ object ts_MethodCall: TTabSheet [3]
+ Caption = 'ts_MethodCall'
+ ImageIndex = 4
+ object labMasterFields2: TLabel
+ Left = 24
+ Top = 80
+ Width = 67
+ Height = 13
+ Caption = '&Master Fields:'
+ end
+ object labDataReqParams: TLabel
+ Left = 256
+ Top = 80
+ Width = 122
+ Height = 13
+ Caption = 'DataRequestCall &Params:'
+ FocusControl = lbDataReqParams
+ end
+ object Label7: TLabel
+ Left = 24
+ Top = 286
+ Width = 273
+ Height = 13
+ Caption = 'Mapp&ings (Detail'#39's DataRequestCall Param=MasterField):'
+ FocusControl = mMappings
+ end
+ object Label20: TLabel
+ Left = 8
+ Top = 8
+ Width = 190
+ Height = 13
+ Caption = 'Map Fields to Method Parameters'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = [fsBold]
+ ParentFont = False
+ end
+ object Label21: TLabel
+ Left = 24
+ Top = 24
+ Width = 396
+ Height = 39
+ Caption =
+ 'Select how the master fields map to the parameters passed to the' +
+ ' customs GetDataCall you are using to fetch Detail data. Ideally' +
+ ', all fields from the previous page (i.e. all fields involved in' +
+ ' the M/D relationship) should be mapped here.'
+ WordWrap = True
+ end
+ object lbMaster2: TListBox
+ Left = 22
+ Top = 96
+ Width = 164
+ Height = 185
+ ItemHeight = 13
+ MultiSelect = True
+ TabOrder = 0
+ end
+ object lbDataReqParams: TListBox
+ Left = 254
+ Top = 96
+ Width = 164
+ Height = 185
+ ItemHeight = 13
+ MultiSelect = True
+ TabOrder = 1
+ end
+ object mMappings: TMemo
+ Left = 22
+ Top = 302
+ Width = 395
+ Height = 60
+ ScrollBars = ssVertical
+ TabOrder = 2
+ end
+ object bbAddDataReqMapping: TBitBtn
+ Left = 190
+ Top = 96
+ Width = 60
+ Height = 25
+ Caption = '&Add'
+ TabOrder = 3
+ OnClick = bbAddDataReqMappingClick
+ Glyph.Data = {
+ 36030000424D3603000000000000360000002800000010000000100000000100
+ 18000000000000030000120B0000120B00000000000000000000FF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF03
+ 5D05035D05FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FF035D055BF791058C0D035D05FF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF035D055B
+ F79105950E035D05FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FF035D055BF79105920D035D05FF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF035D055B
+ F79106950F035D05FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ 035D05035D05035D05035D05035D055BF7910C9C18035D05035D05035D05035D
+ 05035D05FF00FFFF00FFFF00FF035D055BF7913BDA6930CF572AC64D21B83C17
+ A62B119F210D9E1C0A9A1506920E05930D058B0D035D05FF00FFFF00FF035D05
+ 5BF7915BF7915BF7915BF7915BF7915BF79118A92F5BF7915BF7915BF7915BF7
+ 915BF791035D05FF00FFFF00FFFF00FF035D05035D05035D05035D05035D055B
+ F79125BC42035D05035D05035D05035D05035D05FF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FF035D055BF79130CE57035D05FF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF035D055B
+ F7913BD968035D05FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FF035D055BF79148EB7F035D05FF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF035D055B
+ F7915BF791035D05FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FF035D05035D05FF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
+ end
+ object bbClearDataReqMapping: TBitBtn
+ Left = 190
+ Top = 256
+ Width = 59
+ Height = 25
+ Caption = '&Clear'
+ TabOrder = 4
+ OnClick = bbClearDataReqMappingClick
+ Glyph.Data = {
+ 36030000424D3603000000000000360000002800000010000000100000000100
+ 18000000000000030000120B0000120B00000000000000000000FF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFF2BB81F3C48AF2BC81EF
+ B072EEAF6EEFB275FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFBEBBDFEF3C9FBDEACF3C990FBB67EFFB47DFCCA99FFD9ADFED9A7F0B5
+ 77FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFEFAD3FEF7CCFBDCA9EBCA91A9
+ B86E84AB542B912057A743EAF3C7FCE9BDEEAD6FFF00FFFF00FFFF00FFFF00FF
+ EDA565F3C28AFCF0C4FCE5B5FBD09F2C9622007B00058206067F043DA335FEF2
+ D0F0B173FF00FFFF00FFFF00FFFF00FFEEAB6DEDA767EFB070F6C990FFD8AC2E
+ 9823006E006ABF6BFFF0EA48A138A3AF5EFCAF74FF00FFFF00FFFF00FFFF00FF
+ F2B479F2B77EF0B277F0AC6FFBB57E7AB46041A6416FBC69FFFFFFF4FEFBBCBB
+ 79F3AA6BFF00FFFF00FFFF00FFFF00FFF7C292FAC598F8C293F8C090F3BF8AC2
+ D5A5FFFFFFD9EED556B1534BAF4BB8BC79F8B075FF00FFFF00FFFF00FFF6C792
+ FCD4ADFCD4ACFCD0A9FCD0A9FFD4B55DA94680C780E0F2DE27982400700082B0
+ 5BFFBD90EEAC6DFF00FFFF00FFF6C792FFEAC4FEE3BCFEE2BAFEE0B8FFE0BAD9
+ D9AC0A8209188A16037F0300790077B45DFFCEAAEEAC6DFF00FFFF00FFFADDAB
+ FFFBD5FFF4CCFFF3CAFFF0C9FFEFC5FFF2D1B5D5982A96242B99249ACB87B5D1
+ 95FFE0BAF2B77AFF00FFFF00FFFCEFC4FFFFD8FFFBD3FFFCD4FFFBD3FFFBD4FF
+ FCD4FFFFE1FFFFEBFFFFE7FFFFE0FFF8D7FFF4CBF3C086FF00FFFF00FFFEF4CB
+ FFFFDDFFFFD9FFFFD9FFFFDAFFFED7FEF6CCF8DAA3F4C07DF4C17FF7D8A3FEF2
+ C5FFFFDDF3C991FF00FFFF00FFF4CC96F8DEAFF8DDACF7D8A6F6CF99F3BF80EF
+ AC66EB9D4FEB9C4CEB9F55F0AC6EFAC087FCD3A0FAC089FF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFEDA354EFAB68F7BC83FABF
+ 88FABC83FABC83FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFAC088FAC088FAC088FF00FFFF00FF}
+ end
+ end
+ object ts_Params: TTabSheet [4]
+ Caption = 'ts_Params'
+ ImageIndex = 5
+ object Label11: TLabel
+ Left = 24
+ Top = 80
+ Width = 74
+ Height = 13
+ Caption = 'Master'#39's Fields:'
+ end
+ object Label12: TLabel
+ Left = 256
+ Top = 80
+ Width = 39
+ Height = 13
+ Caption = 'Params:'
+ FocusControl = lbParams
+ end
+ object Label15: TLabel
+ Left = 24
+ Top = 286
+ Width = 190
+ Height = 13
+ Caption = 'Mappings (Detail'#39's Param=MasterField):'
+ FocusControl = mParamsMappings
+ end
+ object Label22: TLabel
+ Left = 8
+ Top = 8
+ Width = 208
+ Height = 13
+ Caption = 'Map Fields to Data Table Parameters'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = [fsBold]
+ ParentFont = False
+ end
+ object Label23: TLabel
+ Left = 24
+ Top = 24
+ Width = 399
+ Height = 39
+ Caption =
+ 'Select how the master fields map to the parameters of your detai' +
+ 'l data. Ideally, all fields from the previous page (i.e. all fie' +
+ 'lds involved in the M/D relationship) should be mapped here.'
+ WordWrap = True
+ end
+ object lbMaster3: TListBox
+ Left = 22
+ Top = 96
+ Width = 164
+ Height = 185
+ ItemHeight = 13
+ MultiSelect = True
+ TabOrder = 0
+ end
+ object lbParams: TListBox
+ Left = 254
+ Top = 96
+ Width = 164
+ Height = 185
+ ItemHeight = 13
+ MultiSelect = True
+ TabOrder = 1
+ end
+ object mParamsMappings: TMemo
+ Left = 22
+ Top = 302
+ Width = 395
+ Height = 60
+ ScrollBars = ssVertical
+ TabOrder = 2
+ end
+ object bbAddParamMappingXXX: TBitBtn
+ Left = 190
+ Top = 96
+ Width = 60
+ Height = 25
+ Caption = '&Add'
+ TabOrder = 3
+ OnClick = bbAddParamMappingXXXClick
+ Glyph.Data = {
+ 36030000424D3603000000000000360000002800000010000000100000000100
+ 18000000000000030000120B0000120B00000000000000000000FF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF03
+ 5D05035D05FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FF035D055BF791058C0D035D05FF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF035D055B
+ F79105950E035D05FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FF035D055BF79105920D035D05FF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF035D055B
+ F79106950F035D05FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ 035D05035D05035D05035D05035D055BF7910C9C18035D05035D05035D05035D
+ 05035D05FF00FFFF00FFFF00FF035D055BF7913BDA6930CF572AC64D21B83C17
+ A62B119F210D9E1C0A9A1506920E05930D058B0D035D05FF00FFFF00FF035D05
+ 5BF7915BF7915BF7915BF7915BF7915BF79118A92F5BF7915BF7915BF7915BF7
+ 915BF791035D05FF00FFFF00FFFF00FF035D05035D05035D05035D05035D055B
+ F79125BC42035D05035D05035D05035D05035D05FF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FF035D055BF79130CE57035D05FF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF035D055B
+ F7913BD968035D05FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FF035D055BF79148EB7F035D05FF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF035D055B
+ F7915BF791035D05FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FF035D05035D05FF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
+ end
+ object bbClearParamMappingsXXX: TBitBtn
+ Left = 190
+ Top = 256
+ Width = 59
+ Height = 25
+ Caption = '&Clear'
+ TabOrder = 4
+ OnClick = bbClearParamMappingsXXXClick
+ Glyph.Data = {
+ 36030000424D3603000000000000360000002800000010000000100000000100
+ 18000000000000030000120B0000120B00000000000000000000FF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFF2BB81F3C48AF2BC81EF
+ B072EEAF6EEFB275FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFBEBBDFEF3C9FBDEACF3C990FBB67EFFB47DFCCA99FFD9ADFED9A7F0B5
+ 77FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFEFAD3FEF7CCFBDCA9EBCA91A9
+ B86E84AB542B912057A743EAF3C7FCE9BDEEAD6FFF00FFFF00FFFF00FFFF00FF
+ EDA565F3C28AFCF0C4FCE5B5FBD09F2C9622007B00058206067F043DA335FEF2
+ D0F0B173FF00FFFF00FFFF00FFFF00FFEEAB6DEDA767EFB070F6C990FFD8AC2E
+ 9823006E006ABF6BFFF0EA48A138A3AF5EFCAF74FF00FFFF00FFFF00FFFF00FF
+ F2B479F2B77EF0B277F0AC6FFBB57E7AB46041A6416FBC69FFFFFFF4FEFBBCBB
+ 79F3AA6BFF00FFFF00FFFF00FFFF00FFF7C292FAC598F8C293F8C090F3BF8AC2
+ D5A5FFFFFFD9EED556B1534BAF4BB8BC79F8B075FF00FFFF00FFFF00FFF6C792
+ FCD4ADFCD4ACFCD0A9FCD0A9FFD4B55DA94680C780E0F2DE27982400700082B0
+ 5BFFBD90EEAC6DFF00FFFF00FFF6C792FFEAC4FEE3BCFEE2BAFEE0B8FFE0BAD9
+ D9AC0A8209188A16037F0300790077B45DFFCEAAEEAC6DFF00FFFF00FFFADDAB
+ FFFBD5FFF4CCFFF3CAFFF0C9FFEFC5FFF2D1B5D5982A96242B99249ACB87B5D1
+ 95FFE0BAF2B77AFF00FFFF00FFFCEFC4FFFFD8FFFBD3FFFCD4FFFBD3FFFBD4FF
+ FCD4FFFFE1FFFFEBFFFFE7FFFFE0FFF8D7FFF4CBF3C086FF00FFFF00FFFEF4CB
+ FFFFDDFFFFD9FFFFD9FFFFDAFFFED7FEF6CCF8DAA3F4C07DF4C17FF7D8A3FEF2
+ C5FFFFDDF3C991FF00FFFF00FFF4CC96F8DEAFF8DDACF7D8A6F6CF99F3BF80EF
+ AC66EB9D4FEB9C4CEB9F55F0AC6EFAC087FCD3A0FAC089FF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFEDA354EFAB68F7BC83FABF
+ 88FABC83FABC83FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFAC088FAC088FAC088FF00FFFF00FF}
+ end
+ end
+ inherited ts_Finish: TTabSheet
+ inherited Label5: TLabel
+ Width = 51
+ Caption = 'That'#39's It!'
+ end
+ inherited Label6: TLabel
+ Width = 217
+ Caption = 'Your Master/Detail relationship is now set up.'
+ end
+ inherited lv_Options: TListView
+ Top = 184
+ Visible = False
+ end
+ end
+ end
+ inherited Panel2: TPanel
+ Top = 445
+ Width = 459
+ inherited btn_Finish: TBitBtn
+ Left = 379
+ OnClick = btn_FinishClick
+ end
+ inherited btn_Next: TBitBtn
+ Left = 379
+ end
+ inherited btn_Back: TBitBtn
+ Left = 299
+ end
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDADataTableMasterLinkWizardForm.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDADataTableMasterLinkWizardForm.pas
new file mode 100644
index 0000000..57eab66
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDADataTableMasterLinkWizardForm.pas
@@ -0,0 +1,391 @@
+unit uDADataTableMasterLinkWizardForm;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, StdCtrls, ComCtrls, Buttons, uDADataTable, uEWWizard, ExtCtrls,
+ DesignIntf;
+
+type
+ TDADataTableMasterLinkWizard = class(TEWWizardForm)
+ ts_Fields: TTabSheet;
+ ts_MethodCall: TTabSheet;
+ ts_Params: TTabSheet;
+ labMasterFields: TLabel;
+ labDetailFields: TLabel;
+ Label13: TLabel;
+ Label14: TLabel;
+ lbMaster: TListBox;
+ lbDetail: TListBox;
+ eMasterFields: TEdit;
+ eDetailFields: TEdit;
+ bbAddFieldMapping: TBitBtn;
+ BitBtn4: TBitBtn;
+ labMasterFields2: TLabel;
+ labDataReqParams: TLabel;
+ Label7: TLabel;
+ lbMaster2: TListBox;
+ lbDataReqParams: TListBox;
+ mMappings: TMemo;
+ bbAddDataReqMapping: TBitBtn;
+ bbClearDataReqMapping: TBitBtn;
+ Label11: TLabel;
+ Label12: TLabel;
+ Label15: TLabel;
+ lbMaster3: TListBox;
+ lbParams: TListBox;
+ mParamsMappings: TMemo;
+ bbAddParamMappingXXX: TBitBtn;
+ bbClearParamMappingsXXX: TBitBtn;
+ ts_MasterSource: TTabSheet;
+ Label8: TLabel;
+ Label9: TLabel;
+ Label18: TLabel;
+ Label19: TLabel;
+ Label20: TLabel;
+ Label21: TLabel;
+ cb_DataSources: TComboBox;
+ Label10: TLabel;
+ Label17: TLabel;
+ rb_Params: TRadioButton;
+ rb_Method: TRadioButton;
+ lbl_Params1: TLabel;
+ lbl_Params2: TLabel;
+ lbl_Method1: TLabel;
+ lbl_Method2: TLabel;
+ Label22: TLabel;
+ Label23: TLabel;
+ lbl_Params3: TLabel;
+ Label24: TLabel;
+ Label25: TLabel;
+ Label26: TLabel;
+ Label27: TLabel;
+ Label28: TLabel;
+ Label29: TLabel;
+ rb_Where: TRadioButton;
+ lbl_Where1: TLabel;
+ lbl_Where2: TLabel;
+ procedure bbAddFieldMappingClick(Sender: TObject);
+ procedure bbAddDataReqMappingClick(Sender: TObject);
+ procedure bbClearDataReqMappingClick(Sender: TObject);
+ procedure BitBtn4Click(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ procedure bbAddParamMappingXXXClick(Sender: TObject);
+ procedure bbClearParamMappingsXXXClick(Sender: TObject);
+ procedure cb_DataSourcesChange(Sender: TObject);
+ procedure btn_FinishClick(Sender: TObject);
+ procedure OnFieldMappingChange(Sender: TObject);
+ private
+ fDataTable: TDADataTable;
+ fMasterSource: TDADataSource;
+ fDesigner: IDesigner;
+ procedure GetDataTables(const aName: string);
+ procedure Initialize;
+
+ protected
+ constructor Create(aOwner : TComponent); reintroduce;
+ procedure AfterEnterPage(aPage:TTabSheet; aMovingForward:boolean); override;
+ procedure OnLeavePage(aPage:TTabSheet; aMovingForward:boolean); override;
+ public
+ class function ExecuteWizard(aDataTable: TDADataTable; aDesigner: IDesigner): boolean;
+ end;
+
+var
+ DADataTableMasterLinkWizard: TDADataTableMasterLinkWizard;
+
+
+implementation
+
+uses uROClasses, TypInfo, uDARemoteDataAdapter, uRODynamicRequest, uRODL;
+
+{$R *.dfm}
+
+procedure TrimNamesAndValues(aSL: TStrings);
+var
+ i: Integer;
+begin
+ for i := 0 to aSL.Count - 1 do begin
+ aSL[i] := Trim(aSL.Names[i]) + {$IFDEF DELPHI7UP}aSL.NameValueSeparator{$ELSE}'='{$ENDIF} + Trim(aSL.Values[aSL.Names[i]]);
+
+ end;
+end;
+
+{ TDataTableMasterLink }
+
+class function TDADataTableMasterLinkWizard.ExecuteWizard(aDataTable: TDADataTable; aDesigner: IDesigner): boolean;
+begin
+ with TDADataTableMasterLinkWizard.Create(NIL) do try
+ fDataTable := aDataTable;
+ fDesigner := aDesigner;
+ Initialize();
+ result := Execute();
+ finally
+ Free;
+ end;
+end;
+
+constructor TDADataTableMasterLinkWizard.Create(aOwner: TComponent);
+begin
+ inherited;
+
+end;
+
+procedure TDADataTableMasterLinkWizard.Initialize;
+var
+ i : integer;
+begin
+ cb_DataSources.Items.Clear();
+ fDesigner.GetComponentNames(GetTypeData(TypeInfo(TDADataSource)), GetDataTables);
+
+ if assigned(fDataTable.MasterSource) then begin
+ cb_DataSources.ItemIndex := cb_DataSources.Items.IndexOf(fDataTable.MasterSource.Name);
+ //lMasterTable := fDataTable.MasterSource.DataTable;
+ //Check(mast=NIL, 'MasterSource doesn''t point to a datatable');
+ end;
+ cb_DataSourcesChange(nil);
+
+ Caption := Format(Caption, [fDataTable.Name]);
+
+ eMasterFields.Text := fDataTable.MasterFields;
+ eDetailFields.Text := fDataTable.DetailFields;
+ mMappings.Lines.Text := fDataTable.MasterRequestMappings.Text;
+ mParamsMappings.Lines.Text := fDataTable.MasterParamsMappings.Text;
+
+ for i := 0 to (fDataTable.FieldCount-1) do
+ lbDetail.Items.Add(fDataTable.Fields[i].Name);
+
+ for i := 0 to (fDataTable.Params.Count-1) do
+ lbParams.Items.Add(fDataTable.Params[i].Name);
+
+ case fDataTable.MasterMappingMode of
+ mmParams: rb_Params.Checked := true;
+ mmDataRequest: rb_Method.Checked := true;
+ mmWhere: rb_Where.Checked := true;
+ end;
+end;
+
+procedure TDADataTableMasterLinkWizard.cb_DataSourcesChange(Sender: TObject);
+var
+ lMasterTable: TDADataTable;
+ lCall: TRODynamicRequest;
+ i: integer;
+begin
+ inherited;
+ fMasterSource := fDesigner.GetComponent(cb_DataSources.Text) as TDADataSource;
+
+ if assigned(fMasterSource) and assigned(fMasterSource.DataTable) then begin
+ lMasterTable := fMasterSource.DataTable;
+
+ rb_Params.Enabled := fDataTable.Params.Count > 0;
+ lbl_Params1.Enabled := rb_Params.Enabled;
+ lbl_Params2.Enabled := rb_Params.Enabled;
+
+ rb_Method.Enabled := assigned(lMasterTable.RemoteDataAdapter) and
+ assigned(fDataTable.RemoteDataAdapter) and
+ (lMasterTable.RemoteDataAdapter <> fDataTable.RemoteDataAdapter);
+ lbl_Method1.Enabled := rb_Method.Enabled;
+
+ if (not rb_Params.Enabled and rb_Params.Checked) or (not rb_Method.Enabled and rb_Method.Checked) then
+ rb_Where.Checked := true;
+
+ lbMaster.Items.Clear();
+ lbMaster2.Items.Clear();
+ lbMaster3.Items.Clear();
+ for i := 0 to (lMasterTable.FieldCount-1) do begin
+ lbMaster.Items.Add(lMasterTable.Fields[i].Name);
+ lbMaster2.Items.Add(lMasterTable.Fields[i].Name);
+ lbMaster3.Items.Add(lMasterTable.Fields[i].Name);
+ end;
+
+ if assigned(fDataTable.RemoteDataAdapter) then begin
+ lCall := (fDataTable.RemoteDataAdapter as TDARemoteDataAdapter).GetDataCall;
+ lbDataReqParams.Items.Clear();
+ for i := 0 to lCall.Params.Count-1 do
+ if lCall.Params[i].Flag in [fIn, fInOut] then
+ lbDataReqParams.Items.Add(lCall.Params[i].Name);
+ end
+ else begin
+ lbDataReqParams.Enabled := false;
+ end;
+
+ if pc_Pages.ActivePage = ts_MasterSource then
+ btn_Next.Enabled := (rb_Where.Enabled and rb_Where.Checked) or (rb_Params.Enabled and rb_Params.Checked) or (rb_Method.Enabled and rb_Method.Checked);
+ end
+ else begin
+ if pc_Pages.ActivePage = ts_MasterSource then
+ btn_Next.Enabled := false;
+ end;
+end;
+
+
+procedure TDADataTableMasterLinkWizard.GetDataTables(const aName: string);
+var
+ lDataSource: TDADataSource;
+begin
+ lDataSource := fDesigner.GetComponent(aName) as TDADataSource;
+ if assigned(lDataSource.DataTable) and assigned(lDataSource.DataTable) and (lDataSource.DataTable <> fDataTable) then
+ cb_DataSources.Items.Add(aName);
+end;
+
+procedure TDADataTableMasterLinkWizard.bbAddFieldMappingClick(Sender: TObject);
+var x : integer;
+begin
+ if (lbMaster.SelCount=0) or (lbMaster.SelCount<>lbDetail.SelCount) then begin
+ Beep;
+ Exit;
+ end;
+
+ for x := 0 to (lbMaster.Items.Count-1) do
+ if lbMaster.Selected[x] then begin
+ if (eMasterFields.Text<>'')
+ then eMasterFields.Text := eMasterFields.Text+';';
+ eMasterFields.Text := eMasterFields.Text+lbMaster.Items[x];
+ end;
+
+ for x := 0 to (lbDetail.Items.Count-1) do
+ if lbDetail.Selected[x] then begin
+ if (eDetailFields.Text<>'')
+ then eDetailFields.Text := eDetailFields.Text+';';
+ eDetailFields.Text := eDetailFields.Text+lbDetail.Items[x];
+ end;
+ OnFieldMappingChange(nil);
+end;
+
+procedure TDADataTableMasterLinkWizard.bbAddDataReqMappingClick(Sender: TObject);
+var x, i : integer;
+ s : TStringList;
+begin
+ if (lbMaster2.SelCount=0) or (lbDataReqParams.SelCount<>lbMaster2.SelCount) then begin
+ Beep;
+ Exit;
+ end;
+
+ s := TStringList.Create;
+ try
+ for x := 0 to (lbDataReqParams.Items.Count-1) do
+ if lbDataReqParams.Selected[x] then s.Add(lbDataReqParams.Items[x]+'=');
+
+ i := 0;
+ for x := 0 to (lbMaster2.Items.Count-1) do
+ if lbMaster2.Selected[x] then begin
+ s[i] := s[i]+lbMaster2.Items[x];
+ Inc(i);
+ end;
+
+ mMappings.Lines.AddStrings(s);
+ finally
+ s.Free;
+ end;
+end;
+
+procedure TDADataTableMasterLinkWizard.bbClearDataReqMappingClick(Sender: TObject);
+begin
+ mMappings.Lines.Clear
+end;
+
+procedure TDADataTableMasterLinkWizard.BitBtn4Click(Sender: TObject);
+begin
+ eMasterFields.Text := '';
+ eDetailFields.Text := '';
+ OnFieldMappingChange(nil);
+end;
+
+procedure TDADataTableMasterLinkWizard.OnFieldMappingChange(
+ Sender: TObject);
+begin
+ inherited;
+ if pc_Pages.ActivePage = ts_Fields then
+ btn_Next.Enabled := (eMasterFields.Text <> '') and (eDetailFields.Text <> '');
+end;
+
+procedure TDADataTableMasterLinkWizard.FormCreate(Sender: TObject);
+begin
+ inherited;
+ //PageControl1.ActivePageIndex := 0
+
+end;
+
+procedure TDADataTableMasterLinkWizard.bbAddParamMappingXXXClick(Sender: TObject);
+var x, i : integer;
+ s : TStringList;
+begin
+ if (lbMaster3.SelCount=0) or (lbParams.SelCount<>lbMaster3.SelCount) then begin
+ Beep;
+ Exit;
+ end;
+
+ s := TStringList.Create;
+ try
+ for x := 0 to (lbParams.Items.Count-1) do
+ if lbParams.Selected[x] then s.Add(lbParams.Items[x]+'=');
+
+ i := 0;
+ for x := 0 to (lbMaster3.Items.Count-1) do
+ if lbMaster3.Selected[x] then begin
+ s[i] := s[i]+lbMaster3.Items[x];
+ Inc(i);
+ end;
+
+ mParamsMappings.Lines.AddStrings(s);
+ finally
+ s.Free;
+ end;
+end;
+
+procedure TDADataTableMasterLinkWizard.bbClearParamMappingsXXXClick(Sender: TObject);
+begin
+ mParamsMappings.Lines.Clear
+end;
+
+procedure TDADataTableMasterLinkWizard.btn_FinishClick(Sender: TObject);
+begin
+ inherited;
+
+ fDataTable.MasterSource := fMasterSource;
+ fDataTable.MasterFields := eMasterFields.Text;
+ fDataTable.DetailFields := eDetailFields.Text;
+
+ TrimNamesAndValues(mMappings.Lines);
+ TrimNamesAndValues(mParamsMappings.Lines);
+
+ fDataTable.MasterRequestMappings.Text := mMappings.Lines.Text;
+ fDataTable.MasterParamsMappings.Text := mParamsMappings.Lines.Text;
+
+ if rb_Where.Checked then
+ fDataTable.MasterMappingMode := mmWhere
+ else if rb_Params.Checked then
+ fDataTable.MasterMappingMode := mmParams
+ else if rb_Method.Checked then
+ fDataTable.MasterMappingMode := mmDataRequest;
+
+end;
+
+procedure TDADataTableMasterLinkWizard.AfterEnterPage(aPage: TTabSheet;
+ aMovingForward: boolean);
+begin
+ inherited;
+ if (aPage = ts_MasterSource) and aMovingForward then begin
+ cb_DataSourcesChange(nil);
+ end
+ else if (aPage = ts_Fields) and aMovingForward then begin
+ OnFieldMappingChange(nil);
+ end;
+end;
+
+procedure TDADataTableMasterLinkWizard.OnLeavePage(aPage: TTabSheet;
+ aMovingForward: boolean);
+begin
+ inherited;
+ if (aPage = ts_Fields) and aMovingForward then begin
+ if rb_Where.Checked then NextPage := ts_Finish.PageIndex
+ else if rb_Params.Checked then NextPage := ts_Params.PageIndex
+ else if rb_Method.Checked then NextPage := ts_MethodCall.PageIndex;
+ end
+ else if (aPage = ts_Params) or (aPage = ts_MethodCall) then begin
+ NextPage := ts_Finish.PageIndex;
+ PreviousPage := ts_Fields.PageIndex;
+ end;
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDADataTableWizards.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDADataTableWizards.pas
new file mode 100644
index 0000000..80b5320
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDADataTableWizards.pas
@@ -0,0 +1,194 @@
+unit uDADataTableWizards;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - IDE Library
+{
+{ compiler: Delphi 6 and up, Kylix 3 and up
+{ platform: Win32, Linux
+{
+{ (c)opyright RemObjects Software. all rights reserved.
+{
+{ Using this code requires a valid license of the Data Abstract
+{ which can be obtained at http://www.remobjects.com.
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ Classes, Types, ToolsAPI, DesignIntf,
+ uDAClasses, uDARemoteDataAdapter;
+
+type
+ TDataTableWizards = class
+ private
+ class procedure GetDataTables(const aName: string);
+ public
+ class function CreateDataTables(aDesigner: IDesigner; aAdapter: TDARemoteDataAdapter; aSchema: TDASchema; aCoordinates: TPoint): boolean; overload;
+ class function CreateDataTables(aForm: IOTAFormEditor; aAdapter: TDARemoteDataAdapter; aSchema: TDASchema; aCoordinates: TPoint): boolean; overload;
+ end;
+
+implementation
+
+uses
+ Forms, Windows, SysUtils, Dialogs, Registry, TypInfo,
+ uROClasses,
+ uDADataTable, uDAInterfaces, uDAPleaseWaitForm, uDASelectDataTablesForm, uDAMemDataTable, uDACDSDataTable;
+
+function ComponentExists(aDesigner: IDesigner; aName: string): boolean;
+var
+ i: integer;
+begin
+ for i := 0 to aDesigner.Root.ComponentCount-1 do
+ if aDesigner.Root.Components[i].Name = aName then begin
+ result := true;
+ exit;
+ end;
+ result := false;
+end;
+
+procedure CreateDataTable(aDesigner: IDesigner; aClass:TDADataTableClass; aAdapter: TDARemoteDataAdapter; aSchema: TDASchema;
+ const aDataTableName: String; X,Y: integer; aCreateDataSource: boolean=true); overload;
+var
+ lDataTable:TDADataTable;
+ lDataSource:TDADataSource;
+ lBaseName:string;
+ lDataTablePrefix,lDataSourcePrefix:string;
+ lDataset: TDADataSet;
+ lField: TDAField;
+begin
+ with TRegistry.Create do try
+ RootKey := HKEY_CURRENT_USER;
+ OpenKey('Software\RemObjects\Data Abstract\IDE\ComponentPrefixes',false);
+ lDataTablePrefix := ReadString('TDADataTable');
+ lDataSourcePrefix := ReadString('TDADataSource');
+ finally
+ Free();
+ end;
+ if lDataTablePrefix = '' then lDataTablePrefix := 'tbl_';
+ if lDataSourcePrefix = '' then lDataSourcePrefix := 'ds_';
+
+ lDataTable := aDesigner.CreateComponent(aClass, nil, X, Y, 24, 24) as TDADataTable;
+ lDataset := aSchema.FindDataset(aDataTableName);
+ if Assigned(lDataset) then begin
+ lDataTable.LogicalName := lDataset.Name;
+ lDataTable.CustomAttributes.Assign(lDataset.CustomAttributes);
+ lDataTable.Fields.AssignFieldCollection(lDataset.Fields);
+ lDataTable.Params.AssignParamCollection(lDataset.Params);
+ lBaseName := lDataset.Name;
+ // ToDo: the code below is shared with RDA.FillSchema. Refactor.
+ if lDataset is TDAUnionDataTable then begin
+ if not Assigned(lDataset.Fields.FindField(def_SourceTableFieldName) as TDAField) then begin
+ lField := lDataTable.Fields.Add();
+ lField.Name := def_SourceTableFieldName;
+ lField.DataType := datInteger;
+ lField.InPrimaryKey := True;
+ lField.ServerAutoRefresh := True;
+ end;
+ end;
+ end;
+
+ lDataTable.RemoteDataAdapter := aAdapter;
+
+ RemoveExcept(lBaseName,['a'..'z','A'..'Z','0'..'9','_']);
+ if ComponentExists(aDesigner, lDataTablePrefix+lBaseName) then
+ lDataTable.Name := aDesigner.UniqueName(lDataTablePrefix+lBaseName)
+ else
+ lDataTable.Name := lDataTablePrefix+lBaseName;
+
+
+ if aCreateDataSource then begin
+ lDataSource := aDesigner.CreateComponent(TDADataSource, nil , X, Y+44, 24, 24) as TDADataSource;
+ lDataSource.DataTable := lDataTable;
+ if ComponentExists(aDesigner, lDataSourcePrefix+lBaseName) then
+ lDataSource.Name := aDesigner.UniqueName(lDataSourcePrefix+lBaseName)
+ else
+ lDataSource.Name := lDataSourcePrefix+lBaseName;
+ end;
+
+end;
+
+class function TDataTableWizards.CreateDataTables(aForm: IOTAFormEditor; aAdapter: TDARemoteDataAdapter; aSchema: TDASchema; aCoordinates: TPoint): boolean;
+begin
+ result := CreateDataTables((aForm as INTAFormEditor).FormDesigner, aAdapter, aSchema, aCoordinates);
+end;
+
+var
+ gDataTables: TStringList;
+ gDesigner: IDesigner;
+
+class procedure TDataTableWizards.GetDataTables(const aName: string);
+var
+ lComponent: TComponent;
+begin
+ lComponent := gDesigner.GetComponent(aName);
+ if assigned(lComponent) then
+ gDataTables.Add((lComponent as TDADataTable).LogicalName);
+end;
+
+
+class function TDataTableWizards.CreateDataTables(aDesigner: IDesigner; aAdapter: TDARemoteDataAdapter; aSchema: TDASchema; aCoordinates: TPoint): boolean;
+var
+ lForm: TDASelectDataTablesForm;
+ lDataTables: TStringList;
+ i: integer;
+ Y: integer;
+begin
+ lDataTables := TStringList.Create;
+ try
+ lDataTables.Sorted := true;
+ for i := 0 to aSchema.Datasets.Count-1 do
+ if aSchema.Datasets[i].IsPublic then
+ lDataTables.AddObject(aSchema.Datasets[i].Name, aSchema.Datasets[i]);
+
+ for i := 0 to aSchema.UnionDataTables.Count-1 do
+ if aSchema.UnionDataTables[i].IsPublic then
+ lDataTables.AddObject(aSchema.UnionDataTables[i].Name, aSchema.UnionDataTables[i]);
+
+ for i := 0 to aSchema.JoinDataTables.Count-1 do
+ if aSchema.JoinDataTables[i].IsPublic then
+ lDataTables.AddObject(aSchema.JoinDataTables[i].Name, aSchema.JoinDataTables[i]);
+
+ if lDataTables.Count > 0 then begin
+
+ gDesigner := aDesigner;
+ gDataTables := TStringList.Create();
+ try
+ aDesigner.GetComponentNames(GetTypeData(TypeInfo(TDADataTable)), GetDataTables);
+
+ lForm := TDASelectDataTablesForm.Create(nil);
+ try
+ for i := 0 to lDataTables.Count-1 do begin
+ lForm.lb_DataTables.Items.AddObject(lDataTables[i], lDataTables.Objects[i]);
+ lForm.lb_DataTables.Checked[lForm.lb_DataTables.Items.Count-1] := gDataTables.IndexOf(lDataTables[i]) = -1;
+ end;
+ lForm.UpdateCheckBoxState();
+ lForm.OkButtonCaption := '&Create';
+ result := (lForm.ShowModal() = idOk);
+ if result then begin
+ Y := aCoordinates.Y;
+ for i := 0 to lForm.lb_DataTables.Items.Count - 1 do
+ if lForm.lb_DataTables.Checked[i] then begin
+ CreateDataTable(aDesigner, TDAMemDataTable, aAdapter, aSchema, lForm.lb_DataTables.Items[i], aCoordinates.X, Y, true);
+ inc(y, 88); // doesn't seem to work :(
+ end;
+ end;
+ finally
+ FreeAndNil(lForm);
+ end;
+
+ finally
+ FreeAndNil(gDataTables);
+ gDesigner := nil;
+ end;
+
+ end
+ else begin
+ ShowMessage('No data tables were found in schema.');
+ result := false;
+ end;
+ finally
+ FreeAndNil(lDataTables);
+ end;
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDAGuideWizardForm.dfm b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDAGuideWizardForm.dfm
new file mode 100644
index 0000000..3a2cc06
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDAGuideWizardForm.dfm
@@ -0,0 +1,1799 @@
+inherited DAGuideWizardForm: TDAGuideWizardForm
+ Left = 309
+ Top = 307
+ Caption = 'New Data Abstract Server Project Wizard'
+ ClientHeight = 293
+ ClientWidth = 569
+ Icon.Data = {
+ 0000010006003030000001000800A80E0000660000002020000001000800A808
+ 00000E0F0000101000000100080068050000B61700003030000001002000A825
+ 00001E1D00002020000001002000A8100000C642000010100000010020006804
+ 00006E5300002800000030000000600000000100080000000000000900000000
+ 00000000000000010000000100000000000005050500090909000D0D0D000B12
+ 0B000E150E000A1D0A000C190C00121212001515150011181100101D10001919
+ 19001D1D1D000A230A000F2A0F00053F0500093709000C3C0C0014391400163D
+ 1600193019001A391A00212121002525250020282000292929002D2D2D002434
+ 2400293229003131310035353500333D3300393939003D3D3D0007420700044B
+ 04000B420B000C450C000E480E00025902000C590C0016461600104C10001353
+ 130014551400155815001D511D00185F180000660000006A0000006E0000076F
+ 07000B620B00096709000E600E000E6D0E00007200000075000000780000007D
+ 00000E7F0E00136C1300196119001B651B00204C20002C5C2E00364036003956
+ 3B002571270028742C002B7730002D7A3300307C3700327F3B003C6240004040
+ 400045454500494949004D4D4D0049534A005151510056565600595959005D5D
+ 5D004167460047644C0043694800456B4B00417A4900447D4E004F6252005D79
+ 65006161610065656500616B6400686868006E6E6E00637F6C00717171007474
+ 7400787878007D7D7D000081000000850000008A0000008D00000A810A000A85
+ 0A00009100000095000000990000049D05001284130007A00B000BA411000FA8
+ 170013AC1C001F91260022942A002D83350035823E002D973A0016AF22001AB3
+ 28001EB72E002FA13E0022BB340026BE39002AC23F00388442003B8745003D89
+ 49003C9B4C003C9C4D0032A442003BAE50003AB650003EB95500408C4D00438F
+ 51004197510045925400479C580045A459005C826700629B750058A46D005DA9
+ 740060AC78002DC6440031CA4A0035CD500039D156003DD55B0040D9610044DD
+ 670052C470004CDB710058DD7F0048E06D004CE4730050E8780053EC7E005FDA
+ 860057EF84005BEA87005FED8C005BF38A005FF78F0086868600959595009F9F
+ 9F00A2A2A200AAAAAA00ACACAC00000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0066511F090909090D4E60000000000000000000000000000000000000000000
+ 00000000000000000000000000004E0D0D0D0D0D090909090309030303186400
+ 000000000000000000000000000000000000000000000000000000001F181818
+ 0D0D0D090D09090909030303030303004E000000000000000000000000000000
+ 000000000000000000001F1A1818180D180D0D0D0D0909090909090303030303
+ 00035D000000000000000000000000000000000000000000641A1A1A1A181818
+ 180D151327272727110F05090303030303000309000000000000000000000000
+ 000000000000004E1F1A1F1A1A1A182A353B3B3B3A3A3A333333332811070303
+ 030300000064000000000000000000000000000000004E1A1F1F1A1F1A1A1C2D
+ 2D353B3B3B3A3A3A3A333333313124070303030300005D000000000000000000
+ 00000000004E1F1F1F1F1F1A1F1A1A1A181A182A3A3B3A3A3333333333313331
+ 100404000303005D0000000000000000000000004E1F1F211F1F1A1F1A1F1A1A
+ 1A1A1818163B3B3A3A3A33333333313131280703030003006400000000000000
+ 0000005D212121211F1F1F1F1A1F1A1A1A1A1A18183B3B3B3A3A3A3331120F0B
+ 080507030303000300000000000000000000AB4E214E2121211F1F1F1F1A1F1F
+ 1A1A1A181A673B3B3B3A3A270C09090909030303030303000309000000000000
+ 00004E214E21212121211F1F1F1F1A1F1A1E1A1A1867673B3B3B3A0D0D0C0C09
+ 0909090303030303000051000000000000644E4E214E214E2121211F1F1F1F1A
+ 1F1A1A1A1A1A181A16132D0D0D0C0C0909090903030303030303000000000000
+ 004E4E4E4E44462121212121211F1F1F1F1E1F1A1A1A1A1818180D0D0D0D0D0C
+ 09090909090310030003034E00000000664E4E214E76474E214E2121211F1F1F
+ 1F1A1E1E1A1A1A1A181818170D0D0D0D090B0C080908310E0303000300000000
+ 4E4E4E4E4B7C474E21214E2121211F1F1F1F1A1F1A1E1A1A1A181817180D0D0D
+ 0D0C09090908312403030303640000004E514E4E7A7D474E4E2121212121211F
+ 1F1F1F1E1E1A1A1A1A18181817180D0D0D0C0C09090933310703030309000066
+ 514E5150807F4A4E214E4E214E2121211F1F1F1E1E1F1E1A1A1A1A181817180D
+ 0D0D0D0C0909333123030303030000515151515981804A4E4E214E21214E2121
+ 211F1F1F1E1A1E1E1A1A1A1A181817180D0D0D0D0C0C33332809030303000051
+ 515151859681824E4E4E4E4E2121212121211F1F1F1F1E1E1E1A1A1A1A181817
+ 180D0D0D0C0C33333109050303530053535151889796834E4E4E214E4E214E21
+ 212121211F1F1E1E1E1E1A1A1A1A181817180D0D0D0C3333330F0909034E0053
+ 5351519A9797844E4E4E4E4E214E214E212121211F1F1F1E1E1E1E1A1A1A1A18
+ 1817180D0D0D3A3A33120909030900535353519B99988B4E4E4E4E4E4E4E214E
+ 214E2121211F1F1F1E1E1E1E1A1A1A1A181817180D0D3A3A3327090909030053
+ 5353539B9A998C514E4E4E4E4E214E214E21212121211F1F1F1E1E1E1E1A1A1A
+ 1A181817180D3A3A3A270909090900535353539B9B9A8C51514E4E4E4E4E4E4E
+ 214E214E2121211F1F1F1E1E1E1E1A1A1A1A181817293B3A3A2709090909005D
+ 535353A19B9B905151514E4E4E4E4E4E4E214E21212121211F1F1F1E1E2D382E
+ 2E2D3533673B3B3B3A270C0D0909005D5D5D539EA19C9B8F5B51514E4E4E4E4E
+ 214E214E214E2121211F1F1F1E306A6A676A676767673B3B3B130D0C0D1F005D
+ 5D535D9DA1A09B9B9A8A8D8C58574B4E4E4E4E214E21212121211F1F1F306A6A
+ 6A6767676767673B3B150D0D0951005D5D5D5394A1A1A19B9B9A99989796964E
+ 4E4E4E4E214E214E2121211F1F306D6A6A6A6A67676767673B180D0D0D660066
+ 5D5D5D5CA3A3A1A09C9B9A999897964E4E4E4E214E214E21214C21211F306D6A
+ 6A6A676A6A67676735180D180D0000AC5D5D5D5D9FA3A2A1A09B9B9A9998974E
+ 4E4E4E4E4E4E214E214C212121406D6D6A6A6A6A676A67672A18180D0D000000
+ 60605D5D94A5A3A3A1A09C9B9A99985A4E4E4E4E4E4E4E214E214E2121716D6D
+ 6D6D6A6A676A67671A1818184E000000645D605D5FA6A5A3A2A1A09B9B9A9998
+ 86564E4E4E4E214E214E2142716F6F6F6D6D6A6A6A6A672E1A18181800000000
+ 00605D605D95A8A5A3A3A1A09C9B9A9A989796877A4A4A7877767474706F6F6F
+ 6D6D6D6D6A6A671E1A1A181F000000000064605D605DA4A8A5A3A2A1A09B9B9A
+ 9998979681807F7D7D75757474726F6F6F6D6D6D6A6A411E1A1A1A0000000000
+ 000060605D6062A7A8A5A3A3A1A09C9B9A9998979681807F7D7D75757474726F
+ 6F6F6F6D6D381F1A1E1A21000000000000006660605D6092A8A8A5A3A2A1A09B
+ 9B9A9998979681807F7D7D7575747472706F6F6D6C1F1F1E1E1A000000000000
+ 000000606060605D92A9A8A5A3A3A1A09C9B9A9998979681807F7D7D75757474
+ 726F6F6C1F1F1F1E1E5D000000000000000000AF606060606092A8A8A5A3A2A1
+ A09B9B9A9998979681807F7D7D757574747271431F1F1F1F2100000000000000
+ 00000000AE6060605D6062A4A8A5A3A3A1A09C9B9A9998979681807F7D7D7575
+ 74454C214C1F1F4E00000000000000000000000000AA606060605D5D95A7A5A3
+ A1A1A09C9B9A9998979681807F7D7D77444C4C214C4C4E000000000000000000
+ 000000000000AE60606060605D5F949FA3A3A1A09B9B9A9998979681807A4B4E
+ 4C4E214E1F4D0000000000000000000000000000000000AF6060605D605D5D5D
+ 91939D9EA19B9B9A99898559504E4E4E4E4C4C4C5D0000000000000000000000
+ 000000000000000000666060605D5D5D5D535353535353515151514E514E4E4E
+ 4E4C4EAB00000000000000000000000000000000000000000000006060605D5D
+ 5D5D5D535353535351515151514E4E4E4E640000000000000000000000000000
+ 000000000000000000000000AF6460605D5D5D5D5D5353535353515151514E66
+ 00000000000000000000000000000000000000000000000000000000000000AE
+ 605D5D5D535D5353535353516600000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000FFFFE007FFFF0000FFFF00007FFF0000FFFC
+ 00001FFF0000FFF0000007FF0000FFC0000003FF0000FF80000000FF0000FF00
+ 0000007F0000FE000000003F0000FC000000001F0000F8000000001F0000F000
+ 0000000F0000F000000000070000E000000000070000E000000000030000C000
+ 000000030000C000000000010000C00000000001000080000000000100008000
+ 0000000100008000000000000000800000000000000080000000000000008000
+ 0000000000008000000000000000800000000000000080000000000000008000
+ 0000000000008000000000000000800000000000000080000000000100008000
+ 000000010000C000000000010000C000000000030000E000000000030000E000
+ 000000070000F000000000070000F0000000000F0000F8000000000F0000F800
+ 0000001F0000FC000000003F0000FE000000007F0000FF00000000FF0000FF80
+ 000001FF0000FFE0000003FF0000FFF800000FFF0000FFFC00003FFF0000FFFF
+ 8001FFFF0000FFFFFFFFFFFF0000280000002000000040000000010008000000
+ 0000000400000000000000000000000100000001000000000000060606000909
+ 09000C0C0C000A170A000D130D000F160F000C190C0011111100141414001218
+ 1200181818001D1D1D000C260C000B2B0B000E280E00073407000A310A00102B
+ 1000122D12001B2A1B0014311400153A1500173D17001D351D001E3F1E002222
+ 220026262600292929002E2E2E003232320034343400353E35003A3A3A003D3D
+ 3D00064906000A490A00025502000F560F001043100016451600135313000161
+ 01000067000000690000006D0000066A0600046F04000B610B00086508000969
+ 09000A6F0A00007200000075000000780000007D000015661500147D15002144
+ 2100335034003653380026732A003F5240004141410045454500494949004E4E
+ 4E004558470049534B005151510056565600595959005D5D5D00436949004474
+ 4C00427C4B00437C4D006262620065656500636D6600686868006F6F6F007272
+ 7200777777007C7C7C000081000000860000008A0000008E00000A820A000091
+ 000000950000029B03001083110008A10C000DA6140013AC1D001F9227002497
+ 2E002D8D3700299B350019B226001EB72E002EA03C0024BD37002AC23F003B87
+ 46003D934C0033A5430037AA4A002EB441003CAF510041844C004A835600428F
+ 50004197500041B3570041B4580046B85E005C8367006392720057A36B004ABC
+ 650050B96B005FAB760062AE7C0030C8480037C6510035CE51003DCC59003BD3
+ 590042D1610041D9620046DF6B004CE4730052EA7C0058E682005DEC8A0057F0
+ 85005DF58D008282820085858500888888008D8D8D009090900099999900A0A0
+ A000ACACAC000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000052400B0909091C4100000000000000000000000000000000000000000052
+ 1B1B0B0B0B0B09090808080041000000000000000000000000000000008E1C1C
+ 1B1B1B1B0B0B0B090908080800084000000000000000000000000000471C1E1C
+ 1C1826313635352D2A230E08080000090000000000000000000000401E1E1E1C
+ 1C192930363635352D2D312A100808000000000000000000000040211E1E1E1E
+ 1C1C1C1B18353535352D2D313125040800080000000000000051212121211E1E
+ 1E1C1C1C1B3236363535230E0604040800000900000000000040402121211E1E
+ 1E1E1C1C1C32363636270B0B0909080808080040000000004540403C21212121
+ 1E1E1E1C1C1C1B1817140B0B0B090908080108000000000041403E6140212121
+ 211E1E1E1C1C1C1B1B1B1A0B0B0B09040D1008004100004E4141636240402121
+ 211E1E1E1E1C1C1C1B1B0B1B0B0B0B0B0D310808000000454144686440404021
+ 2121211E1E1E1C1C1B1B1B1B1B0B0B0B0E31100808000045454A696740402140
+ 212121211E1E1E1C1C1C1B1B0B1B0B0B152D23080141924545727E6C41404040
+ 402121211E1E1E1E1C1C1C1B1B1B1A0B152D2A09040B8C474775806D41414140
+ 4040212121211E1E1E1C1C1C1B1B0B1B15352D0909098C474776826F41414140
+ 402140212121211E1E1E1C1C1C1B1B1A1735350B09098C47477A847545454141
+ 404040402121211E1E1E1E3A1C1C18272D35350B0B098E4E477B858371454141
+ 4141404040212121211E1E57575656365635360B0B0B004E4779868584817473
+ 6A43404040402121211E1E5A575756563656321B0B40004E4E77878685848280
+ 7E494140402140212121215A575757565636261B0B4E004E4E4E888786858482
+ 80704141404040402121205A5A5A57575656181B1B00008E4E4E7C8A87868584
+ 827F4C4441414040403B395C5A5A575757321B1B1B0000004E4E4F898A878685
+ 8482807E6E676462605F5E5C5C5A5A5A573A1C1B5200000054514E788B8A8786
+ 858482807E69686665605F5E5C5C5A5A381E1C1C0000000000514E4E7D8B8A87
+ 86858482807E69686665605F5E5C5C591E1E1E8E000000000093514E4E7D8B8A
+ 8786858482806969686665605F5E5D201E1E47000000000000008E514E4E7889
+ 8A8786858482807E69686665603D2121214000000000000000000091514E4E4F
+ 7C888786858482807E6968633E40402141000000000000000000000093514E4E
+ 4E4E77797B7A7675727044414040405100000000000000000000000000005451
+ 4E4E474E47474745454541414145000000000000000000000000000000000000
+ 8E4E4E4E474747474645454F0000000000000000000000000000000000000000
+ 000000008E8E8C8C9200000000000000000000000000FFF00FFFFF8001FFFE00
+ 007FFC00003FF800001FF000000FE0000007E0000003C0000003C00000018000
+ 0001800000018000000000000000000000000000000000000000000000008000
+ 0000800000008000000180000001C0000001C0000003E0000003E0000007F000
+ 000FF800001FFC00003FFF0000FFFFC003FFFFFC1FFF28000000100000002000
+ 0000010008000000000000010000000000000000000000010000000100000000
+ 00000A0A0A00090F09000F0F0F000E140E000C190C001313130014141400111E
+ 1100181818001D1D1D00092F09000A390A00113311001B321B00222222002626
+ 26002B2B2B0021322100263626003030300034343400313A3100393939003E3E
+ 3E00044A04000B440B000E490E0005540500065A0600075F0700124912001848
+ 180014531400155915001E521E00006A0000066A0600096A0900007000000075
+ 0000007B0000146414001B631B00137B1300374A38002E7133002B7830004343
+ 4300474747004C4C4C004A534B00575757005A5A5A005E5E5E0046634B004E61
+ 52004A7050004878510063636300656565006868680070707000757575007D7D
+ 7D000081000000860000008C00000B860C00009200000198010009A20E0014AD
+ 1F0022B1320020B830003A9048004B975B005D836800539F660063A679002BC4
+ 42003AC0540037CF530039C8530042DA64004DE6750063C2830059E8840059F1
+ 87008A8A8A009191910098989800AAAAAA000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000003D110906033400000000000000003E11121F1B1A0C0503150000000000
+ 3615151220252828241902060000004018181514112129250D05040315000031
+ 2E1815151511120E0909060B03005A3349311818151111101009091C04343E39
+ 50313118151515111010091E0C03364C52323131181815111110101E1A06364E
+ 5438323131181515232226291B09594D5554534B311818182B4342421F095C3D
+ 575554513731312D2C454342123D003D4F58555452504A484745452A1100005C
+ 3D5658555452504A484744163D0000005B3D4F5755545250492F183600000000
+ 005C3D3D4D4E4C3A33314000000000000000005C5936363E5A0000000000F81F
+ 0000E0070000C003000080010000800100000000000000000000000000000000
+ 000000000000000000008001000080010000C0030000E0070000F81F00002800
+ 0000300000006000000001002000000000008025000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000001E1E1E0F1C1C1C4F1B1B1B8F191919BF171717DF1616
+ 16FF141414FF131313FF111111FF0F0F0FEF0E0E0EBF0D0D0D9F0B0B0B6F0A0A
+ 0A2F000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000002424
+ 240F2323235F212121CF1F1F1FFF1E1E1EFF1C1C1CFF1A1A1AFF191919FF1717
+ 17FF161616FF141414FF131313FF111111FF0F0F0FFF0E0E0EFF0C0C0CFF0B0B
+ 0BFF090909DF0808088F0707071F000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000002929290F2727277F2626
+ 26EF242424FF222222FF212121FF1F1F1FFF1E1E1EFF1C1C1CFF1A1A1AFF1919
+ 19FF171717FF161616FF141414FF131313FF111111FF0F0F0FFF0E0E0EFF0C0C
+ 0CFF0B0B0BFF090909FF080808FF060606BF0505053F00000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000002C2C2C5F2A2A2AEF292929FF2727
+ 27FF262626FF242424FF222222FF212121FF1F1F1FFF1E1E1EFF1C1C1CFF1A1A
+ 1AFF191919FF171717FF161616FF141414FF131313FF111111FF0F0F0FFF0E0E
+ 0EFF0C0C0CFF0B0B0BFF090909FF080808FF060606FF0505059F0505050F0000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000003131310F2F2F2FAF2E2E2EFF2C2C2CFF2A2A2AFF2929
+ 29FF272727FF262626FF242424FF222222FF212121FF193019FF143914FF0E48
+ 0EFF0D460DFF0C450CFF0B430BFF0C3C0CFF0F2A0FFF111811FF111111FF0F0F
+ 0FFF0E0E0EFF0C0C0CFF0B0B0BFF090909FF080808FF060606FF040404EF0404
+ 044F000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000003434342F323232DF303030FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A
+ 2AFF292929FF272727FF174717FF0B620BFF027702FF007A00FF007800FF0076
+ 00FF007400FF007300FF007100FF006F00FF006D00FF006B00FF035903FF0937
+ 09FF0D1A0DFF0E0E0EFF0C0C0CFF0B0B0BFF090909FF080808FF060606FF0404
+ 04FF0303038F0000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00003737372F353535EF343434FF323232FF303030FF2F2F2FFF2E2E2EFF2C2C
+ 2CFF2A2A2AFF243424FF145414FF135313FF096709FF007C00FF007A00FF0078
+ 00FF007600FF007400FF007300FF007100FF006F00FF006D00FF006B00FF0069
+ 00FF006700FF044B04FF0B1E0BFF0C0C0CFF0B0B0BFF090909FF080808FF0606
+ 06FF040404FF0303039F00000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000003A3A
+ 3A2F383838EF373737FF353535FF343434FF323232FF303030FF2F2F2FFF2E2E
+ 2EFF2C2C2CFF2A2A2AFF292929FF272727FF262626FF242424FF164416FF0275
+ 02FF007800FF007600FF007400FF007300FF007100FF006F00FF006D00FF006B
+ 00FF006900FF006700FF006600FF053F05FF0B120BFF0B0B0BFF090909FF0808
+ 08FF060606FF040404FF0303039F000000000000000000000000000000000000
+ 00000000000000000000000000000000000000000000000000003D3D3D2F3C3C
+ 3CEF3A3A3AFF383838FF373737FF353535FF343434FF323232FF303030FF2F2F
+ 2FFF2E2E2EFF2C2C2CFF2A2A2AFF292929FF272727FF262626FF242424FF1A39
+ 1AFF007A00FF007800FF007600FF007400FF007300FF007100FF006F00FF006D
+ 00FF006B00FF006900FF006700FF006600FF015A01FF0A1D0AFF0B0B0BFF0909
+ 09FF080808FF060606FF040404FF0303038F0000000000000000000000000000
+ 000000000000000000000000000000000000000000004141410F3F3F3FCF3D3D
+ 3DFF3C3C3CFF3A3A3AFF383838FF373737FF353535FF343434FF323232FF3030
+ 30FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF292929FF272727FF262626FF2424
+ 24FF007C00FF007A00FF007800FF007600FF007400FF007300FF007100FF0364
+ 03FF0B410BFF0F2A0FFF101D10FF111111FF0E150EFF0C190CFF0C0C0CFF0B0B
+ 0BFF090909FF080808FF060606FF040404FF0404044F00000000000000000000
+ 000000000000000000000000000000000000000000004242428F404040FF3F3F
+ 3FFF3D3D3DFF3C3C3CFF3A3A3AFF383838FF373737FF353535FF343434FF3232
+ 32FF303030FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF292929FF272727FF2626
+ 26FF007E00FF007C00FF007A00FF007800FF007600FF007400FF0D460DFF1919
+ 19FF171717FF161616FF141414FF131313FF111111FF0F0F0FFF0E0E0EFF0C0C
+ 0CFF0B0B0BFF090909FF080808FF060606FF040404EF0505050F000000000000
+ 0000000000000000000000000000000000004545453F444444FF424242FF4040
+ 40FF3F3F3FFF3D3D3DFF3C3C3CFF3A3A3AFF383838FF373737FF353535FF3434
+ 34FF323232FF303030FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF292929FF2727
+ 27FF008000FF007E00FF007C00FF007A00FF007800FF007600FF1C1C1CFF1A1A
+ 1AFF191919FF171717FF161616FF141414FF131313FF111111FF0F0F0FFF0E0E
+ 0EFF0C0C0CFF0B0B0BFF090909FF080808FF060606FF050505AF000000000000
+ 000000000000000000000000000000000000464646BF454545FF444444FF4242
+ 42FF404040FF3F3F3FFF3D3D3DFF3C3C3CFF3A3A3AFF383838FF373737FF3535
+ 35FF343434FF323232FF303030FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF2929
+ 29FF272727FF262626FF242424FF1A391AFF163D16FF104C10FF1E1E1EFF1C1C
+ 1CFF1A1A1AFF191919FF171717FF161616FF141414FF131313FF111111FF0F0F
+ 0FFF0E0E0EFF0C0C0CFF0B0B0BFF090909FF080808FF060606FF0505053F0000
+ 00000000000000000000000000004A4A4A3F484848FF474747FF454545FF4444
+ 44FF39563BFF28742CFF3F3F3FFF3D3D3DFF3C3C3CFF3A3A3AFF383838FF3737
+ 37FF353535FF343434FF323232FF303030FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A
+ 2AFF292929FF272727FF262626FF242424FF222222FF212121FF1F1F1FFF1E1E
+ 1EFF1C1C1CFF1A1A1AFF191919FF171717FF161616FF141414FF131313FF1111
+ 11FF0F0F0FFF053F05FF0C0C0CFF0B0B0BFF090909FF080808FF060606BF0000
+ 00000000000000000000000000004B4B4BBF4A4A4AFF484848FF474747FF4545
+ 45FF22942AFF2B7730FF404040FF3F3F3FFF3D3D3DFF3C3C3CFF3A3A3AFF3838
+ 38FF373737FF353535FF343434FF323232FF303030FF2F2F2FFF2E2E2EFF2C2C
+ 2CFF2A2A2AFF292929FF272727FF262626FF242424FF222222FF212121FF1F1F
+ 1FFF1E1E1EFF1C1C1CFF1A1A1AFF191919FF171717FF161616FF141414FF1313
+ 13FF111111FF006600FF0A230AFF0C0C0CFF0B0B0BFF090909FF080808FF0707
+ 072F00000000000000004F4F4F1F4D4D4DFF4B4B4BFF4A4A4AFF484848FF3C62
+ 40FF1AB328FF2D7A33FF424242FF404040FF3F3F3FFF3D3D3DFF3C3C3CFF3A3A
+ 3AFF383838FF373737FF353535FF343434FF323232FF303030FF2F2F2FFF2E2E
+ 2EFF2C2C2CFF2A2A2AFF292929FF272727FF262626FF242424FF222222FF2121
+ 21FF1F1F1FFF1E1E1EFF1C1C1CFF1A1A1AFF191919FF171717FF161616FF1414
+ 14FF131313FF006700FF044B04FF0E0E0EFF0C0C0CFF0B0B0BFF090909FF0808
+ 088F00000000000000005050506F4F4F4FFF4D4D4DFF4B4B4BFF4A4A4AFF2D97
+ 3AFF1EB72EFF307C37FF444444FF424242FF404040FF3F3F3FFF3D3D3DFF3C3C
+ 3CFF3A3A3AFF383838FF373737FF353535FF343434FF323232FF303030FF2F2F
+ 2FFF2E2E2EFF2C2C2CFF2A2A2AFF292929FF272727FF262626FF242424FF2222
+ 22FF212121FF1F1F1FFF1E1E1EFF1C1C1CFF1A1A1AFF191919FF171717FF1616
+ 16FF141414FF006900FF006700FF0D1A0DFF0E0E0EFF0C0C0CFF0B0B0BFF0909
+ 09EF0000000000000000525252BF505050FF4F4F4FFF4D4D4DFF49534AFF26BE
+ 39FF22BB34FF327F3BFF454545FF444444FF424242FF404040FF3F3F3FFF3D3D
+ 3DFF3C3C3CFF3A3A3AFF383838FF373737FF353535FF343434FF323232FF3030
+ 30FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF292929FF272727FF262626FF2424
+ 24FF222222FF212121FF1F1F1FFF1E1E1EFF1C1C1CFF1A1A1AFF191919FF1717
+ 17FF161616FF006B00FF006900FF074207FF0F0F0FFF0E0E0EFF0C0C0CFF0B0B
+ 0BFF0A0A0A2F00000000535353FF525252FF505050FF4F4F4FFF417A49FF2AC2
+ 3FFF26BE39FF35823EFF474747FF454545FF444444FF424242FF404040FF3F3F
+ 3FFF3D3D3DFF3C3C3CFF3A3A3AFF383838FF373737FF353535FF343434FF3232
+ 32FF303030FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF292929FF272727FF2626
+ 26FF242424FF222222FF212121FF1F1F1FFF1E1E1EFF1C1C1CFF1A1A1AFF1919
+ 19FF171717FF006D00FF006B00FF035903FF111111FF0F0F0FFF0E0E0EFF0C0C
+ 0CFF0B0B0B6F5656563F555555FF535353FF525252FF505050FF3C9B4CFF2DC6
+ 44FF2AC23FFF388442FF484848FF474747FF454545FF444444FF424242FF4040
+ 40FF3F3F3FFF3D3D3DFF3C3C3CFF3A3A3AFF383838FF373737FF353535FF3434
+ 34FF323232FF303030FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF292929FF2727
+ 27FF262626FF242424FF222222FF212121FF1F1F1FFF1E1E1EFF1C1C1CFF1A1A
+ 1AFF191919FF006F00FF006D00FF006B00FF111811FF111111FF0F0F0FFF0E0E
+ 0EFF0C0C0CAF5858584F575757FF555555FF535353FF525252FF3BAE50FF31CA
+ 4AFF2DC644FF3B8745FF4A4A4AFF484848FF474747FF454545FF444444FF4242
+ 42FF404040FF3F3F3FFF3D3D3DFF3C3C3CFF3A3A3AFF383838FF373737FF3535
+ 35FF343434FF323232FF303030FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF2929
+ 29FF272727FF262626FF242424FF222222FF212121FF1F1F1FFF1E1E1EFF1C1C
+ 1CFF1A1A1AFF007100FF006F00FF006D00FF0F2A0FFF131313FF111111FF0F0F
+ 0FFF0E0E0EBF5959597F585858FF575757FF555555FF535353FF39D156FF35CD
+ 50FF31CA4AFF3D8949FF4B4B4BFF4A4A4AFF484848FF474747FF454545FF4444
+ 44FF424242FF404040FF3F3F3FFF3D3D3DFF3C3C3CFF3A3A3AFF383838FF3737
+ 37FF353535FF343434FF323232FF303030FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A
+ 2AFF292929FF272727FF262626FF242424FF222222FF212121FF1F1F1FFF1E1E
+ 1EFF1C1C1CFF007300FF007100FF006F00FF0C3C0CFF141414FF131313FF1111
+ 11FF0F0F0FFF5B5B5B7F595959FF585858FF575757FF555555FF3DD55BFF39D1
+ 56FF35CD50FF408C4DFF4D4D4DFF4B4B4BFF4A4A4AFF484848FF474747FF4545
+ 45FF444444FF424242FF404040FF3F3F3FFF3D3D3DFF3C3C3CFF3A3A3AFF3838
+ 38FF373737FF353535FF343434FF323232FF303030FF2F2F2FFF2E2E2EFF2C2C
+ 2CFF2A2A2AFF292929FF272727FF262626FF242424FF222222FF212121FF1F1F
+ 1FFF1E1E1EFF007400FF007300FF007100FF0B430BFF161616FF141414FF1313
+ 13FF111111FF5C5C5C7F5B5B5BFF595959FF585858FF575757FF40D961FF3DD5
+ 5BFF39D156FF438F51FF4F4F4FFF4D4D4DFF4B4B4BFF4A4A4AFF484848FF4747
+ 47FF454545FF444444FF424242FF404040FF3F3F3FFF3D3D3DFF3C3C3CFF3A3A
+ 3AFF383838FF373737FF353535FF343434FF323232FF303030FF2F2F2FFF2E2E
+ 2EFF2C2C2CFF2A2A2AFF292929FF272727FF262626FF242424FF222222FF2121
+ 21FF1F1F1FFF007600FF007400FF007300FF0C450CFF171717FF161616FF1414
+ 14FF131313FF5E5E5E7F5D5D5DFF5B5B5BFF595959FF585858FF44DD67FF40D9
+ 61FF3DD55BFF459254FF505050FF4F4F4FFF4D4D4DFF4B4B4BFF4A4A4AFF4848
+ 48FF474747FF454545FF444444FF424242FF404040FF3F3F3FFF3D3D3DFF3C3C
+ 3CFF3A3A3AFF383838FF373737FF353535FF343434FF323232FF303030FF2F2F
+ 2FFF2E2E2EFF2C2C2CFF2A2A2AFF292929FF272727FF262626FF242424FF2028
+ 20FF0C590CFF007800FF007600FF007400FF0D460DFF191919FF171717FF1616
+ 16FF141414FF6060607F5E5E5EFF5D5D5DFF5B5B5BFF595959FF48E06DFF44DD
+ 67FF40D961FF45A459FF525252FF505050FF4F4F4FFF4D4D4DFF4B4B4BFF4A4A
+ 4AFF484848FF474747FF454545FF444444FF424242FF404040FF3F3F3FFF3D3D
+ 3DFF3C3C3CFF3A3A3AFF383838FF373737FF353535FF343434FF323232FF3030
+ 30FF1D511DFF0E6D0EFF155A15FF155815FF145614FF0E600EFF076F07FF007E
+ 00FF007C00FF007A00FF007800FF007600FF0E480EFF1A1A1AFF191919FF1717
+ 17FF161616FF6161617F606060FF5E5E5EFF5D5D5DFF5B5B5BFF4CDB71FF48E0
+ 6DFF44DD67FF40D961FF479C58FF4F6252FF505050FF4F4F4FFF4D4D4DFF4B4B
+ 4BFF4A4A4AFF484848FF474747FF454545FF444444FF424242FF404040FF3F3F
+ 3FFF3D3D3DFF3C3C3CFF3A3A3AFF383838FF373737FF353535FF343434FF3232
+ 32FF185F18FF008B00FF008900FF008700FF008500FF008400FF008200FF0080
+ 00FF007E00FF007C00FF007A00FF007800FF143914FF1C1C1CFF1A1A1AFF1919
+ 19FF171717DF6262623F616161FF606060FF5E5E5EFF5D5D5DFF52C470FF4CE4
+ 73FF48E06DFF44DD67FF40D961FF3DD55BFF3EB955FF419751FF408C4DFF456B
+ 4BFF436948FF416746FF484848FF474747FF454545FF444444FF424242FF4040
+ 40FF3F3F3FFF3D3D3DFF3C3C3CFF3A3A3AFF383838FF373737FF353535FF3434
+ 34FF196019FF008D00FF008B00FF008900FF008700FF008500FF008400FF0082
+ 00FF008000FF007E00FF007C00FF007A00FF193019FF1E1E1EFF1C1C1CFF1A1A
+ 1AFF191919BF6464641F636363FF616161FF606060FF5E5E5EFF58A46DFF50E8
+ 78FF4CE473FF48E06DFF44DD67FF40D961FF3DD55BFF39D156FF35CD50FF31CA
+ 4AFF2DC644FF2AC23FFF4A4A4AFF484848FF474747FF454545FF444444FF4242
+ 42FF404040FF3F3F3FFF3D3D3DFF3C3C3CFF3A3A3AFF383838FF373737FF3535
+ 35FF1A621AFF008F00FF008D00FF008B00FF008900FF008700FF008500FF0084
+ 00FF008200FF008000FF007E00FF027702FF212121FF1F1F1FFF1E1E1EFF1C1C
+ 1CFF1B1B1B8F00000000656565DF636363FF616161FF606060FF5D7965FF53EC
+ 7EFF50E878FF4CE473FF48E06DFF44DD67FF40D961FF3DD55BFF39D156FF35CD
+ 50FF31CA4AFF2DC644FF4B4B4BFF4A4A4AFF484848FF474747FF454545FF4444
+ 44FF424242FF404040FF3F3F3FFF3D3D3DFF3C3C3CFF3A3A3AFF383838FF3737
+ 37FF1B641BFF009100FF008F00FF008D00FF008B00FF008900FF008700FF0085
+ 00FF008400FF008200FF008000FF0B620BFF222222FF212121FF1F1F1FFF1E1E
+ 1EFF1C1C1C5F000000006666669F656565FF636363FF616161FF606060FF58DD
+ 7FFF53EC7EFF50E878FF4CE473FF48E06DFF44DD67FF40D961FF3DD55BFF39D1
+ 56FF35CD50FF31CA4AFF4D4D4DFF4B4B4BFF4A4A4AFF484848FF474747FF4545
+ 45FF444444FF424242FF404040FF3F3F3FFF3D3D3DFF3C3C3CFF3A3A3AFF3838
+ 38FF1B661BFF009300FF009100FF008F00FF008D00FF008B00FF008900FF0087
+ 00FF008500FF008400FF008200FF174717FF242424FF222222FF212121FF1F1F
+ 1FFF1E1E1E0F000000006767674F666666FF656565FF636363FF616161FF5DA9
+ 74FF57EF84FF53EC7EFF50E878FF4CE473FF48E06DFF44DD67FF40D961FF3DD5
+ 5BFF39D156FF35CD50FF447D4EFF4D4D4DFF4B4B4BFF4A4A4AFF484848FF4747
+ 47FF454545FF444444FF424242FF404040FF3F3F3FFF3D3D3DFF3C3C3CFF3A3A
+ 3AFF0E7F0EFF009500FF009300FF009100FF008F00FF008D00FF008B00FF0089
+ 00FF008700FF008500FF027E02FF272727FF262626FF242424FF222222FF2121
+ 21CF000000000000000000000000686868EF666666FF656565FF636363FF616B
+ 64FF5BEA87FF57EF84FF53EC7EFF50E878FF4CE473FF48E06DFF44DD67FF40D9
+ 61FF3DD55BFF39D156FF35CD50FF3C9C4DFF47644CFF4B4B4BFF4A4A4AFF4848
+ 48FF474747FF454545FF444444FF424242FF404040FF3F3F3FFF2C5C2EFF1284
+ 13FF009900FF009700FF009500FF009300FF009100FF008F00FF008D00FF008B
+ 00FF008900FF008700FF155815FF292929FF272727FF262626FF242424FF2323
+ 235F0000000000000000000000006969697F686868FF666666FF656565FF6363
+ 63FF60AC78FF5BF38AFF57EF84FF53EC7EFF50E878FF4CE473FF48E06DFF44DD
+ 67FF40D961FF3DD55BFF39D156FF35CD50FF31CA4AFF2DC644FF32A442FF2FA1
+ 3EFF35823EFF327F3BFF2D8335FF22942BFF1F9126FF0FA817FF0BA411FF07A0
+ 0BFF049D05FF009900FF009700FF009500FF009300FF009100FF008F00FF008D
+ 00FF008B00FF028402FF293229FF2A2A2AFF292929FF272727FF262626EF2424
+ 240F0000000000000000000000006A6A6A1F696969EF686868FF666666FF6565
+ 65FF636363FF5FDA86FF5BF38AFF57EF84FF53EC7EFF50E878FF4CE473FF48E0
+ 6DFF44DD67FF40D961FF3DD55BFF39D156FF35CD50FF31CA4AFF2DC644FF2AC2
+ 3FFF26BE39FF22BB34FF1EB72EFF1AB328FF16AF22FF13AC1CFF0FA817FF0BA4
+ 11FF07A00BFF049D05FF009900FF009700FF009500FF009300FF009100FF008F
+ 00FF008D00FF204C20FF2E2E2EFF2C2C2CFF2A2A2AFF292929FF2727277F0000
+ 0000000000000000000000000000000000006A6A6A7F696969FF686868FF6666
+ 66FF656565FF637F6CFF5FED8CFF5BF38AFF57EF84FF53EC7EFF50E878FF4CE4
+ 73FF48E06DFF44DD67FF40D961FF3DD55BFF39D156FF35CD50FF31CA4AFF2DC6
+ 44FF2AC23FFF26BE39FF22BB34FF1EB72EFF1AB328FF16AF22FF13AC1CFF0FA8
+ 17FF0BA411FF07A00BFF049D05FF009900FF009700FF009500FF009300FF0091
+ 00FF136C13FF303030FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AEF2929290F0000
+ 0000000000000000000000000000000000006B6B6B0F6A6A6ADF696969FF6868
+ 68FF666666FF656565FF629B75FF5FF78FFF5BF38AFF57EF84FF53EC7EFF50E8
+ 78FF4CE473FF48E06DFF44DD67FF40D961FF3DD55BFF39D156FF35CD50FF31CA
+ 4AFF2DC644FF2AC23FFF26BE39FF22BB34FF1EB72EFF1AB328FF16AF22FF13AC
+ 1CFF0FA817FF0BA411FF07A00BFF049D05FF009900FF009700FF009500FF0A81
+ 0AFF343434FF323232FF303030FF2F2F2FFF2E2E2EFF2C2C2C6F000000000000
+ 000000000000000000000000000000000000000000006B6B6B3F6A6A6AFF6969
+ 69FF686868FF666666FF656565FF629B75FF5FF78FFF5BF38AFF57EF84FF53EC
+ 7EFF50E878FF4CE473FF48E06DFF44DD67FF40D961FF3DD55BFF39D156FF35CD
+ 50FF31CA4AFF2DC644FF2AC23FFF26BE39FF22BB34FF1EB72EFF1AB328FF16AF
+ 22FF13AC1CFF0FA817FF0BA411FF07A00BFF049D05FF009900FF0A850AFF333D
+ 33FF353535FF343434FF323232FF303030FF2F2F2FBF00000000000000000000
+ 00000000000000000000000000000000000000000000000000006B6B6B8F6A6A
+ 6AFF696969FF686868FF666666FF656565FF629B75FF5FF78FFF5BF38AFF57EF
+ 84FF53EC7EFF50E878FF4CE473FF48E06DFF44DD67FF40D961FF3DD55BFF39D1
+ 56FF35CD50FF31CA4AFF2DC644FF2AC23FFF26BE39FF22BB34FF1EB72EFF1AB3
+ 28FF16AF22FF13AC1CFF0FA817FF0BA411FF07A00BFF128413FF364036FF3838
+ 38FF373737FF353535FF343434FF323232EF3131310F00000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000006B6B
+ 6B9F6A6A6AFF696969FF686868FF666666FF656565FF637F6CFF5FDA86FF5BF3
+ 8AFF57EF84FF53EC7EFF50E878FF4CE473FF48E06DFF44DD67FF40D961FF3DD5
+ 5BFF39D156FF35CD50FF31CA4AFF2DC644FF2AC23FFF26BE39FF22BB34FF1EB7
+ 2EFF1AB328FF16AF22FF13AC1CFF0FA817FF257127FF3D3D3DFF3C3C3CFF3A3A
+ 3AFF383838FF373737FF353535EF3434342F0000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000006B6B
+ 6B0F6B6B6BCF6A6A6AFF696969FF686868FF666666FF656565FF636363FF60AC
+ 78FF5BEA87FF57EF84FF53EC7EFF50E878FF4CE473FF48E06DFF44DD67FF40D9
+ 61FF3DD55BFF39D156FF35CD50FF31CA4AFF2DC644FF2AC23FFF26BE39FF22BB
+ 34FF1EB72EFF1AB328FF22942AFF39563BFF404040FF3F3F3FFF3D3D3DFF3C3C
+ 3CFF3A3A3AFF383838EF3737372F000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00006B6B6B0F6B6B6B9F6A6A6AFF696969FF686868FF666666FF656565FF6363
+ 63FF616B64FF5DA974FF58DD7FFF53EC7EFF50E878FF4CE473FF48E06DFF44DD
+ 67FF40D961FF3DD55BFF39D156FF35CD50FF31CA4AFF2DC644FF2AC23FFF26BE
+ 39FF2D973AFF3C6240FF454545FF444444FF424242FF404040FF3F3F3FFF3D3D
+ 3DFF3C3C3CEF3A3A3A2F00000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000006B6B6B8F6A6A6AFF696969FF686868FF666666FF6565
+ 65FF636363FF616161FF606060FF5C8267FF58A46DFF52C470FF4CDB71FF48E0
+ 6DFF44DD67FF40D961FF3DD55BFF39D156FF3AB650FF3C9B4CFF417A49FF4953
+ 4AFF4A4A4AFF484848FF474747FF454545FF444444FF424242FF404040FF3F3F
+ 3FCF3D3D3D2F0000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000006B6B6B3F6A6A6ADF696969FF686868FF6666
+ 66FF656565FF636363FF616161FF606060FF5E5E5EFF5D5D5DFF5B5B5BFF5959
+ 59FF585858FF575757FF555555FF535353FF525252FF505050FF4F4F4FFF4D4D
+ 4DFF4B4B4BFF4A4A4AFF484848FF474747FF454545FF444444FF4242428F4141
+ 410F000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000006B6B6B0F6A6A6A7F696969FF6868
+ 68FF666666FF656565FF636363FF616161FF606060FF5E5E5EFF5D5D5DFF5B5B
+ 5BFF595959FF585858FF575757FF555555FF535353FF525252FF505050FF4F4F
+ 4FFF4D4D4DFF4B4B4BFF4A4A4AFF484848FF464646BF4545453F000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000000000000000006A6A6A1F6969
+ 698F686868EF666666FF656565FF636363FF616161FF606060FF5E5E5EFF5D5D
+ 5DFF5B5B5BFF595959FF585858FF575757FF555555FF535353FF525252FF5050
+ 50FF4F4F4FFF4D4D4DFF4B4B4BBF4A4A4A3F0000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000006767674F6666669F656565EF636363FF616161FF606060FF5E5E
+ 5EFF5D5D5DFF5B5B5BFF595959FF585858FF575757FF555555FF535353FF5252
+ 52BF5050506F4F4F4F1F00000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000006464641F6262623F6161617F6060
+ 607F5E5E5E7F5C5C5C7F5B5B5B7F5959597F5858585F5656563F000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000FFFF8001FFFF0000FFFC00003FFF0000FFF000000FFF0000FFE0
+ 000003FF0000FF80000001FF0000FF00000000FF0000FE000000007F0000FC00
+ 0000003F0000F8000000001F0000F0000000000F0000F000000000070000E000
+ 000000070000E000000000030000C000000000030000C0000000000100008000
+ 0000000100008000000000010000800000000000000080000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000800000000000000080000000000000008000
+ 000000010000C000000000010000C000000000010000C000000000030000E000
+ 000000030000E000000000070000F0000000000F0000F8000000000F0000FC00
+ 0000001F0000FC000000003F0000FE000000007F0000FF80000000FF0000FFC0
+ 000001FF0000FFE0000007FF0000FFF800001FFF0000FFFF00007FFF0000FFFF
+ E007FFFF00002800000020000000400000000100200000000000801000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000002121210F1F1F1F5F1D1D
+ 1D9F1A1A1ACF181818FF151515FF131313FF101010FF0E0E0EDF0C0C0CBF0A0A
+ 0A6F0808081F0000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000002929291F2626269F232323FF212121FF1F1F
+ 1FFF1C1C1CFF1A1A1AFF181818FF151515FF131313FF101010FF0E0E0EFF0C0C
+ 0CFF090909FF070707BF0606063F000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000002D2D2D8F2A2A2AFF282828FF262626FF232323FF2121
+ 21FF1F1F1FFF1C1C1CFF1A1A1AFF181818FF151515FF131313FF101010FF0E0E
+ 0EFF0C0C0CFF090909FF070707FF050505BF0404041F00000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00003434341F323232CF2F2F2FFF2D2D2DFF2A2A2AFF282828FF1E371EFF0F56
+ 0FFF086408FF007800FF007500FF007200FF006F00FF026102FF064906FF0B2B
+ 0BFF0E0E0EFF0C0C0CFF090909FF070707FF050505EF0303034F000000000000
+ 0000000000000000000000000000000000000000000000000000000000003939
+ 392F363636EF343434FF323232FF2F2F2FFF2D2D2DFF2A2A2AFF1E3F1EFF1353
+ 13FF0B610BFF007A00FF007800FF007500FF007200FF006F00FF006C00FF0069
+ 00FF006100FF073407FF0C0C0CFF090909FF070707FF050505FF0303035F0000
+ 00000000000000000000000000000000000000000000000000003E3E3E0F3B3B
+ 3BEF393939FF363636FF343434FF323232FF2F2F2FFF2D2D2DFF2A2A2AFF2828
+ 28FF262626FF1D341DFF027502FF007800FF007500FF007200FF006F00FF006C
+ 00FF006900FF006700FF025502FF0A170AFF090909FF070707FF050505FF0303
+ 034F000000000000000000000000000000000000000000000000404040BF3D3D
+ 3DFF3B3B3BFF393939FF363636FF343434FF323232FF2F2F2FFF2D2D2DFF2A2A
+ 2AFF282828FF262626FF096709FF007A00FF007800FF007500FF007200FF0A49
+ 0AFF102B10FF121812FF0F160FFF0C190CFF0C0C0CFF090909FF070707FF0505
+ 05EF0404041F000000000000000000000000000000004444446F424242FF4040
+ 40FF3D3D3DFF3B3B3BFF393939FF363636FF343434FF323232FF2F2F2FFF2D2D
+ 2DFF2A2A2AFF282828FF096909FF007D00FF007A00FF007800FF104310FF1A1A
+ 1AFF181818FF151515FF131313FF101010FF0E0E0EFF0C0C0CFF090909FF0707
+ 07FF050505BF0000000000000000000000004A4A4A0F474747EF444444FF4242
+ 42FF365338FF3D3D3DFF3B3B3BFF393939FF363636FF343434FF323232FF2F2F
+ 2FFF2D2D2DFF2A2A2AFF282828FF262626FF1D341DFF173D17FF1B2A1BFF1C1C
+ 1CFF1A1A1AFF181818FF151515FF131313FF101010FF0D130DFF0C0C0CFF0909
+ 09FF070707FF0606063F00000000000000004B4B4B7F494949FF474747FF3F52
+ 40FF1F9227FF404040FF3D3D3DFF3B3B3BFF393939FF363636FF343434FF3232
+ 32FF2F2F2FFF2D2D2DFF2A2A2AFF282828FF262626FF232323FF212121FF1F1F
+ 1FFF1C1C1CFF1A1A1AFF181818FF151515FF131313FF0C260CFF073407FF0C0C
+ 0CFF090909FF070707BF00000000000000004E4E4EDF4B4B4BFF494949FF2D8D
+ 37FF24972EFF424242FF404040FF3D3D3DFF3B3B3BFF393939FF363636FF3434
+ 34FF323232FF2F2F2FFF2D2D2DFF2A2A2AFF282828FF262626FF232323FF2121
+ 21FF1F1F1FFF1C1C1CFF1A1A1AFF181818FF151515FF0E280EFF006100FF0E0E
+ 0EFF0C0C0CFF090909FF0808081F5252522F505050FF4E4E4EFF49534BFF24BD
+ 37FF299B35FF444444FF424242FF404040FF3D3D3DFF3B3B3BFF393939FF3636
+ 36FF343434FF323232FF2F2F2FFF2D2D2DFF2A2A2AFF282828FF262626FF2323
+ 23FF212121FF1F1F1FFF1C1C1CFF1A1A1AFF181818FF102B10FF006900FF0A31
+ 0AFF0E0E0EFF0C0C0CFF0A0A0A6F5555556F535353FF505050FF44744CFF2AC2
+ 3FFF2EA03CFF474747FF444444FF424242FF404040FF3D3D3DFF3B3B3BFF3939
+ 39FF363636FF343434FF323232FF2F2F2FFF2D2D2DFF2A2A2AFF282828FF2626
+ 26FF232323FF212121FF1F1F1FFF1C1C1CFF1A1A1AFF122D12FF006C00FF0649
+ 06FF101010FF0E0E0EFF0C0C0CBF5757578F555555FF535353FF428F50FF30C8
+ 48FF33A543FF494949FF474747FF444444FF424242FF404040FF3D3D3DFF3B3B
+ 3BFF393939FF363636FF343434FF323232FF2F2F2FFF2D2D2DFF2A2A2AFF2828
+ 28FF262626FF232323FF212121FF1F1F1FFF1C1C1CFF143014FF006F00FF0261
+ 02FF131313FF101010FF0E0E0EEF595959BF575757FF555555FF41B357FF35CE
+ 51FF37AA4AFF4B4B4BFF494949FF474747FF444444FF424242FF404040FF3D3D
+ 3DFF3B3B3BFF393939FF363636FF343434FF323232FF2F2F2FFF2D2D2DFF2A2A
+ 2AFF282828FF262626FF232323FF212121FF1F1F1FFF153215FF007200FF006F
+ 00FF151515FF131313FF101010FF5C5C5CBF5A5A5AFF575757FF46B85EFF3BD3
+ 59FF3CAF51FF4E4E4EFF4B4B4BFF494949FF474747FF444444FF424242FF4040
+ 40FF3D3D3DFF3B3B3BFF393939FF363636FF343434FF323232FF2F2F2FFF2D2D
+ 2DFF2A2A2AFF282828FF262626FF232323FF212121FF153A15FF007500FF0072
+ 00FF181818FF151515FF131313FF5E5E5EBF5C5C5CFF5A5A5AFF4ABC65FF41D9
+ 62FF41B458FF505050FF4E4E4EFF4B4B4BFF494949FF474747FF444444FF4242
+ 42FF404040FF3D3D3DFF3B3B3BFF393939FF363636FF343434FF323232FF2F2F
+ 2FFF214421FF2A2A2AFF282828FF1E371EFF164516FF046F04FF007800FF0075
+ 00FF1A1A1AFF181818FF151515FF616161BF5F5F5FFF5C5C5CFF50B96BFF46DF
+ 6BFF42D161FF4A8356FF505050FF4E4E4EFF4B4B4BFF494949FF474747FF4444
+ 44FF424242FF404040FF3D3D3DFF3B3B3BFF393939FF363636FF343434FF3232
+ 32FF008B00FF008900FF008600FF008300FF008000FF007D00FF007A00FF0078
+ 00FF1C1C1CFF1A1A1AFF181818FF6363637F616161FF5F5F5FFF57A36BFF4CE4
+ 73FF46DF6BFF41D962FF3DCC59FF3CAF51FF3D934CFF3B8746FF455847FF4747
+ 47FF444444FF424242FF404040FF3D3D3DFF3B3B3BFF393939FF363636FF3434
+ 34FF008E00FF008B00FF008900FF008600FF008300FF008000FF007D00FF066A
+ 06FF1F1F1FFF1C1C1CFF1A1A1ACF6565655F636363FF616161FF5C8367FF52EA
+ 7CFF4CE473FF46DF6BFF41D962FF3BD359FF35CE51FF30C848FF436949FF4949
+ 49FF474747FF444444FF424242FF404040FF3D3D3DFF3B3B3BFF393939FF3636
+ 36FF009100FF008E00FF008B00FF008900FF008600FF008300FF008000FF0F56
+ 0FFF212121FF1F1F1FFF1D1D1DAF6767671F666666FF636363FF616161FF58E6
+ 82FF52EA7CFF4CE473FF46DF6BFF41D962FF3BD359FF35CE51FF41844CFF4B4B
+ 4BFF494949FF474747FF444444FF424242FF404040FF3D3D3DFF3B3B3BFF353E
+ 35FF009400FF009100FF008E00FF008B00FF008900FF008600FF008300FF1E37
+ 1EFF232323FF212121FF1F1F1F5F00000000676767BF666666FF636363FF5FAB
+ 76FF57F085FF52EA7CFF4CE473FF46DF6BFF41D962FF3BD359FF37C651FF437C
+ 4DFF49534BFF494949FF474747FF444444FF424242FF404040FF335034FF147D
+ 15FF009700FF009400FF009100FF008E00FF008B00FF008900FF0A6F0AFF2828
+ 28FF262626FF232323FF2121210F000000006A6A6A5F686868FF666666FF636D
+ 66FF5DEC8AFF57F085FF52EA7CFF4CE473FF46DF6BFF41D962FF3BD359FF35CE
+ 51FF30C848FF2EB441FF2EA03CFF299B35FF24972EFF13AC1DFF0DA614FF08A1
+ 0CFF029B03FF009700FF009400FF009100FF008E00FF008B00FF214421FF2A2A
+ 2AFF282828FF2626269F0000000000000000000000006A6A6ADF686868FF6666
+ 66FF639272FF5DF58DFF57F085FF52EA7CFF4CE473FF46DF6BFF41D962FF3BD3
+ 59FF35CE51FF30C848FF2AC23FFF24BD37FF1EB72EFF19B226FF13AC1DFF0DA6
+ 14FF08A10CFF029B03FF009700FF009400FF009100FF156615FF2F2F2FFF2D2D
+ 2DFF2A2A2AFF2929291F0000000000000000000000006B6B6B3F6A6A6AFF6868
+ 68FF666666FF62AE7CFF5DF58DFF57F085FF52EA7CFF4CE473FF46DF6BFF41D9
+ 62FF3BD359FF35CE51FF30C848FF2AC23FFF24BD37FF1EB72EFF19B226FF13AC
+ 1DFF0DA614FF08A10CFF029B03FF009700FF0A820AFF343434FF323232FF2F2F
+ 2FFF2D2D2D8F00000000000000000000000000000000000000006B6B6B8F6A6A
+ 6AFF686868FF666666FF62AE7CFF5DF58DFF57F085FF52EA7CFF4CE473FF46DF
+ 6BFF41D962FF3BD359FF35CE51FF30C848FF2AC23FFF24BD37FF1EB72EFF19B2
+ 26FF13AC1DFF0DA614FF08A10CFF108311FF353E35FF363636FF343434FF3232
+ 32CF3030300F0000000000000000000000000000000000000000000000006B6B
+ 6BBF6A6A6AFF686868FF666666FF639272FF5DEC8AFF57F085FF52EA7CFF4CE4
+ 73FF46DF6BFF41D962FF3BD359FF35CE51FF30C848FF2AC23FFF24BD37FF1EB7
+ 2EFF19B226FF13AC1DFF26732AFF3D3D3DFF3B3B3BFF393939FF363636EF3434
+ 341F000000000000000000000000000000000000000000000000000000006B6B
+ 6B0F6B6B6BAF6A6A6AFF686868FF666666FF636D66FF5FAB76FF58E682FF52EA
+ 7CFF4CE473FF46DF6BFF41D962FF3BD359FF35CE51FF30C848FF2AC23FFF24BD
+ 37FF2D8D37FF3F5240FF424242FF404040FF3D3D3DFF3B3B3BEF3939392F0000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000006B6B6B8F6A6A6AFF686868FF666666FF636363FF616161FF5C83
+ 67FF57A36BFF50B96BFF4ABC65FF46B85EFF41B357FF419750FF427C4BFF4953
+ 4BFF494949FF474747FF444444FF424242FF404040BF3E3E3E0F000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000006B6B6B3F6A6A6ADF686868FF666666FF636363FF6161
+ 61FF5F5F5FFF5C5C5CFF5A5A5AFF575757FF555555FF535353FF505050FF4E4E
+ 4EFF4B4B4BFF494949FF474747EF4444446F0000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000006A6A6A5F676767BF666666FF6363
+ 63FF616161FF5F5F5FFF5C5C5CFF5A5A5AFF575757FF555555FF535353FF5050
+ 50FF4E4E4EDF4B4B4B7F4A4A4A0F000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000000000000000006767671F6565
+ 655F6363637F616161BF5E5E5EBF5C5C5CBF595959BF5757578F5555556F5252
+ 522F000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000FFC003FFFF0000FFFE00003FF800001FF000
+ 000FE0000007E0000003C0000003800000018000000180000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00008000000080000001C0000001C0000003E0000003F0000007F000000FFC00
+ 001FFE00007FFF8000FFFFE007FF280000001000000020000000010020000000
+ 0000400400000000000000000000000000000000000000000000000000000000
+ 0000000000002727273F222222AF1D1D1DEF181818FF131313FF0F0F0FFF0B0B
+ 0BAF0707075F0000000000000000000000000000000000000000000000003535
+ 350F303030AF2B2B2BFF213221FF124912FF0E490EFF0B440BFF0A390AFF0C19
+ 0CFF0A0A0AFF060606CF0404041F0000000000000000000000003E3E3E0F3939
+ 39CF343434FF303030FF263626FF184818FF066A06FF007500FF007000FF006A
+ 00FF044A04FF090F09FF050505EF0404041F0000000000000000424242AF3E3E
+ 3EFF393939FF343434FF303030FF2B2B2BFF145314FF007B00FF017001FF1133
+ 11FF111E11FF0E140EFF0A0A0AFF060606CF000000004B4B4B3F474747FF2E71
+ 33FF3E3E3EFF393939FF343434FF303030FF2B2B2BFF223222FF1B321BFF1D1D
+ 1DFF181818FF131313FF092F09FF0A0A0AFF0707075F5050509F4A534BFF22B1
+ 32FF434343FF3E3E3EFF393939FF343434FF303030FF2B2B2BFF262626FF2222
+ 22FF1D1D1DFF181818FF055405FF0C190CFF0B0B0BAF555555CF4A7050FF2BC4
+ 42FF474747FF434343FF3E3E3EFF393939FF343434FF303030FF2B2B2BFF2626
+ 26FF222222FF1D1D1DFF065A06FF0A390AFF0F0F0FFF5A5A5AFF4B975BFF37CF
+ 53FF4C4C4CFF474747FF434343FF3E3E3EFF393939FF343434FF303030FF2B2B
+ 2BFF262626FF222222FF075F07FF0B440BFF131313FF5F5F5FFF539F66FF42DA
+ 64FF4E6152FF4C4C4CFF474747FF434343FF3E3E3EFF393939FF343434FF1E52
+ 1EFF155915FF096A09FF007B00FF0E490EFF181818FF636363BF5D8368FF4DE6
+ 75FF42DA64FF39C853FF3A9048FF474747FF434343FF3E3E3EFF393939FF1B63
+ 1BFF008C00FF008600FF008100FF124912FF1D1D1DFF6868688F646464FF59E8
+ 84FF4DE675FF42DA64FF3AC054FF46634BFF474747FF434343FF374A38FF137B
+ 13FF009200FF008C00FF008600FF213221FF222222AF6A6A6A1F686868FF63A6
+ 79FF59F187FF4DE675FF42DA64FF37CF53FF2BC442FF20B830FF14AD1FFF09A2
+ 0EFF019801FF009200FF146414FF2B2B2BFF2727273F000000006A6A6A8F6868
+ 68FF63C283FF59F187FF4DE675FF42DA64FF37CF53FF2BC442FF20B830FF14AD
+ 1FFF09A20EFF0B860CFF313A31FF303030BF0000000000000000000000006A6A
+ 6AAF686868FF63A679FF59E884FF4DE675FF42DA64FF37CF53FF2BC442FF22B1
+ 32FF2B7830FF3E3E3EFF393939CF3535350F0000000000000000000000000000
+ 00006A6A6A8F686868FF646464FF5D8368FF539F66FF4B975BFF487851FF4A53
+ 4BFF474747FF424242AF3E3E3E0F000000000000000000000000000000000000
+ 0000000000006A6A6A1F6868688F636363BF5F5F5FFF5A5A5AFF555555CF5050
+ 509F4B4B4B3F00000000000000000000000000000000F00F0000C00300008001
+ 0000800100000000000000000000000000000000000000000000000000000000
+ 00000000000080010000C0010000E0030000F00F0000}
+ PixelsPerInch = 96
+ TextHeight = 13
+ inherited Bevel1: TBevel
+ Width = 569
+ end
+ inherited Panel1: TPanel
+ Width = 569
+ inherited Image1: TImage
+ Picture.Data = {
+ 055449636F6E0000010006003030000001000800A80E00006600000020200000
+ 01000800A80800000E0F0000101000000100080068050000B617000030300000
+ 01002000A82500001E1D00002020000001002000A8100000C642000010100000
+ 01002000680400006E5300002800000030000000600000000100080000000000
+ 0009000000000000000000000001000000010000000000000505050009090900
+ 0D0D0D000B120B000E150E000A1D0A000C190C00121212001515150011181100
+ 101D1000191919001D1D1D000A230A000F2A0F00053F0500093709000C3C0C00
+ 14391400163D1600193019001A391A0021212100252525002028200029292900
+ 2D2D2D0024342400293229003131310035353500333D3300393939003D3D3D00
+ 07420700044B04000B420B000C450C000E480E00025902000C590C0016461600
+ 104C10001353130014551400155815001D511D00185F180000660000006A0000
+ 006E0000076F07000B620B00096709000E600E000E6D0E000072000000750000
+ 00780000007D00000E7F0E00136C1300196119001B651B00204C20002C5C2E00
+ 3640360039563B002571270028742C002B7730002D7A3300307C3700327F3B00
+ 3C6240004040400045454500494949004D4D4D0049534A005151510056565600
+ 595959005D5D5D004167460047644C0043694800456B4B00417A4900447D4E00
+ 4F6252005D7965006161610065656500616B6400686868006E6E6E00637F6C00
+ 7171710074747400787878007D7D7D000081000000850000008A0000008D0000
+ 0A810A000A850A00009100000095000000990000049D05001284130007A00B00
+ 0BA411000FA8170013AC1C001F91260022942A002D83350035823E002D973A00
+ 16AF22001AB328001EB72E002FA13E0022BB340026BE39002AC23F0038844200
+ 3B8745003D8949003C9B4C003C9C4D0032A442003BAE50003AB650003EB95500
+ 408C4D00438F51004197510045925400479C580045A459005C826700629B7500
+ 58A46D005DA9740060AC78002DC6440031CA4A0035CD500039D156003DD55B00
+ 40D9610044DD670052C470004CDB710058DD7F0048E06D004CE4730050E87800
+ 53EC7E005FDA860057EF84005BEA87005FED8C005BF38A005FF78F0086868600
+ 959595009F9F9F00A2A2A200AAAAAA00ACACAC00000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000066511F090909090D4E60000000000000000000000000000000
+ 00000000000000000000000000000000000000004E0D0D0D0D0D090909090309
+ 0303031864000000000000000000000000000000000000000000000000000000
+ 00001F1818180D0D0D090D09090909030303030303004E000000000000000000
+ 000000000000000000000000000000001F1A1818180D180D0D0D0D0909090909
+ 09030303030300035D000000000000000000000000000000000000000000641A
+ 1A1A1A181818180D151327272727110F05090303030303000309000000000000
+ 000000000000000000000000004E1F1A1F1A1A1A182A353B3B3B3A3A3A333333
+ 332811070303030300000064000000000000000000000000000000004E1A1F1F
+ 1A1F1A1A1C2D2D353B3B3B3A3A3A3A333333313124070303030300005D000000
+ 00000000000000000000004E1F1F1F1F1F1A1F1A1A1A181A182A3A3B3A3A3333
+ 333333313331100404000303005D0000000000000000000000004E1F1F211F1F
+ 1A1F1A1F1A1A1A1A1818163B3B3A3A3A33333333313131280703030003006400
+ 0000000000000000005D212121211F1F1F1F1A1F1A1A1A1A1A18183B3B3B3A3A
+ 3A3331120F0B080507030303000300000000000000000000AB4E214E2121211F
+ 1F1F1F1A1F1F1A1A1A181A673B3B3B3A3A270C09090909030303030303000309
+ 00000000000000004E214E21212121211F1F1F1F1A1F1A1E1A1A1867673B3B3B
+ 3A0D0D0C0C090909090303030303000051000000000000644E4E214E214E2121
+ 211F1F1F1F1A1F1A1A1A1A1A181A16132D0D0D0C0C0909090903030303030303
+ 000000000000004E4E4E4E44462121212121211F1F1F1F1E1F1A1A1A1A181818
+ 0D0D0D0D0D0C09090909090310030003034E00000000664E4E214E76474E214E
+ 2121211F1F1F1F1A1E1E1A1A1A1A181818170D0D0D0D090B0C080908310E0303
+ 0003000000004E4E4E4E4B7C474E21214E2121211F1F1F1F1A1F1A1E1A1A1A18
+ 1817180D0D0D0D0C09090908312403030303640000004E514E4E7A7D474E4E21
+ 21212121211F1F1F1F1E1E1A1A1A1A18181817180D0D0D0C0C09090933310703
+ 030309000066514E5150807F4A4E214E4E214E2121211F1F1F1E1E1F1E1A1A1A
+ 1A181817180D0D0D0D0C0909333123030303030000515151515981804A4E4E21
+ 4E21214E2121211F1F1F1E1A1E1E1A1A1A1A181817180D0D0D0D0C0C33332809
+ 030303000051515151859681824E4E4E4E4E2121212121211F1F1F1F1E1E1E1A
+ 1A1A1A181817180D0D0D0C0C33333109050303530053535151889796834E4E4E
+ 214E4E214E21212121211F1F1E1E1E1E1A1A1A1A181817180D0D0D0C3333330F
+ 0909034E00535351519A9797844E4E4E4E4E214E214E212121211F1F1F1E1E1E
+ 1E1A1A1A1A181817180D0D0D3A3A33120909030900535353519B99988B4E4E4E
+ 4E4E4E4E214E214E2121211F1F1F1E1E1E1E1A1A1A1A181817180D0D3A3A3327
+ 0909090300535353539B9A998C514E4E4E4E4E214E214E21212121211F1F1F1E
+ 1E1E1E1A1A1A1A181817180D3A3A3A270909090900535353539B9B9A8C51514E
+ 4E4E4E4E4E4E214E214E2121211F1F1F1E1E1E1E1A1A1A1A181817293B3A3A27
+ 09090909005D535353A19B9B905151514E4E4E4E4E4E4E214E21212121211F1F
+ 1F1E1E2D382E2E2D3533673B3B3B3A270C0D0909005D5D5D539EA19C9B8F5B51
+ 514E4E4E4E4E214E214E214E2121211F1F1F1E306A6A676A676767673B3B3B13
+ 0D0C0D1F005D5D535D9DA1A09B9B9A8A8D8C58574B4E4E4E4E214E2121212121
+ 1F1F1F306A6A6A6767676767673B3B150D0D0951005D5D5D5394A1A1A19B9B9A
+ 99989796964E4E4E4E4E214E214E2121211F1F306D6A6A6A6A67676767673B18
+ 0D0D0D6600665D5D5D5CA3A3A1A09C9B9A999897964E4E4E4E214E214E21214C
+ 21211F306D6A6A6A676A6A67676735180D180D0000AC5D5D5D5D9FA3A2A1A09B
+ 9B9A9998974E4E4E4E4E4E4E214E214C212121406D6D6A6A6A6A676A67672A18
+ 180D0D00000060605D5D94A5A3A3A1A09C9B9A99985A4E4E4E4E4E4E4E214E21
+ 4E2121716D6D6D6D6A6A676A67671A1818184E000000645D605D5FA6A5A3A2A1
+ A09B9B9A999886564E4E4E4E214E214E2142716F6F6F6D6D6A6A6A6A672E1A18
+ 18180000000000605D605D95A8A5A3A3A1A09C9B9A9A989796877A4A4A787776
+ 7474706F6F6F6D6D6D6D6A6A671E1A1A181F000000000064605D605DA4A8A5A3
+ A2A1A09B9B9A9998979681807F7D7D75757474726F6F6F6D6D6D6A6A411E1A1A
+ 1A0000000000000060605D6062A7A8A5A3A3A1A09C9B9A9998979681807F7D7D
+ 75757474726F6F6F6F6D6D381F1A1E1A21000000000000006660605D6092A8A8
+ A5A3A2A1A09B9B9A9998979681807F7D7D7575747472706F6F6D6C1F1F1E1E1A
+ 000000000000000000606060605D92A9A8A5A3A3A1A09C9B9A9998979681807F
+ 7D7D75757474726F6F6C1F1F1F1E1E5D000000000000000000AF606060606092
+ A8A8A5A3A2A1A09B9B9A9998979681807F7D7D757574747271431F1F1F1F2100
+ 00000000000000000000AE6060605D6062A4A8A5A3A3A1A09C9B9A9998979681
+ 807F7D7D757574454C214C1F1F4E00000000000000000000000000AA60606060
+ 5D5D95A7A5A3A1A1A09C9B9A9998979681807F7D7D77444C4C214C4C4E000000
+ 000000000000000000000000AE60606060605D5F949FA3A3A1A09B9B9A999897
+ 9681807A4B4E4C4E214E1F4D0000000000000000000000000000000000AF6060
+ 605D605D5D5D91939D9EA19B9B9A99898559504E4E4E4E4C4C4C5D0000000000
+ 000000000000000000000000000000666060605D5D5D5D535353535353515151
+ 514E514E4E4E4E4C4EAB00000000000000000000000000000000000000000000
+ 006060605D5D5D5D5D535353535351515151514E4E4E4E640000000000000000
+ 000000000000000000000000000000000000AF6460605D5D5D5D5D5353535353
+ 515151514E660000000000000000000000000000000000000000000000000000
+ 0000000000AE605D5D5D535D5353535353516600000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000FFFFE007FFFF0000FFFF0000
+ 7FFF0000FFFC00001FFF0000FFF0000007FF0000FFC0000003FF0000FF800000
+ 00FF0000FF000000007F0000FE000000003F0000FC000000001F0000F8000000
+ 001F0000F0000000000F0000F000000000070000E000000000070000E0000000
+ 00030000C000000000030000C000000000010000C00000000001000080000000
+ 0001000080000000000100008000000000000000800000000000000080000000
+ 0000000080000000000000008000000000000000800000000000000080000000
+ 0000000080000000000000008000000000000000800000000000000080000000
+ 000100008000000000010000C000000000010000C000000000030000E0000000
+ 00030000E000000000070000F000000000070000F0000000000F0000F8000000
+ 000F0000F8000000001F0000FC000000003F0000FE000000007F0000FF000000
+ 00FF0000FF80000001FF0000FFE0000003FF0000FFF800000FFF0000FFFC0000
+ 3FFF0000FFFF8001FFFF0000FFFFFFFFFFFF0000280000002000000040000000
+ 0100080000000000000400000000000000000000000100000001000000000000
+ 06060600090909000C0C0C000A170A000D130D000F160F000C190C0011111100
+ 1414140012181200181818001D1D1D000C260C000B2B0B000E280E0007340700
+ 0A310A00102B1000122D12001B2A1B0014311400153A1500173D17001D351D00
+ 1E3F1E002222220026262600292929002E2E2E003232320034343400353E3500
+ 3A3A3A003D3D3D00064906000A490A00025502000F560F001043100016451600
+ 13531300016101000067000000690000006D0000066A0600046F04000B610B00
+ 08650800096909000A6F0A00007200000075000000780000007D000015661500
+ 147D150021442100335034003653380026732A003F5240004141410045454500
+ 494949004E4E4E004558470049534B005151510056565600595959005D5D5D00
+ 4369490044744C00427C4B00437C4D006262620065656500636D660068686800
+ 6F6F6F0072727200777777007C7C7C000081000000860000008A0000008E0000
+ 0A820A000091000000950000029B03001083110008A10C000DA6140013AC1D00
+ 1F92270024972E002D8D3700299B350019B226001EB72E002EA03C0024BD3700
+ 2AC23F003B8746003D934C0033A5430037AA4A002EB441003CAF510041844C00
+ 4A835600428F50004197500041B3570041B4580046B85E005C83670063927200
+ 57A36B004ABC650050B96B005FAB760062AE7C0030C8480037C6510035CE5100
+ 3DCC59003BD3590042D1610041D9620046DF6B004CE4730052EA7C0058E68200
+ 5DEC8A0057F085005DF58D008282820085858500888888008D8D8D0090909000
+ 99999900A0A0A000ACACAC000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000052400B0909091C4100000000000000000000000000000000
+ 0000000000521B1B0B0B0B0B0909080808004100000000000000000000000000
+ 0000008E1C1C1B1B1B1B0B0B0B09090808080008400000000000000000000000
+ 0000471C1E1C1C1826313635352D2A230E080800000900000000000000000000
+ 00401E1E1E1C1C192930363635352D2D312A1008080000000000000000000000
+ 40211E1E1E1E1C1C1C1B18353535352D2D313125040800080000000000000051
+ 212121211E1E1E1C1C1C1B3236363535230E0604040800000900000000000040
+ 402121211E1E1E1E1C1C1C32363636270B0B0909080808080040000000004540
+ 403C212121211E1E1E1C1C1C1B1817140B0B0B09090808010800000000004140
+ 3E6140212121211E1E1E1C1C1C1B1B1B1A0B0B0B09040D1008004100004E4141
+ 636240402121211E1E1E1E1C1C1C1B1B0B1B0B0B0B0B0D310808000000454144
+ 6864404040212121211E1E1E1C1C1B1B1B1B1B0B0B0B0E31100808000045454A
+ 696740402140212121211E1E1E1C1C1C1B1B0B1B0B0B152D2308014192454572
+ 7E6C41404040402121211E1E1E1E1C1C1C1B1B1B1A0B152D2A09040B8C474775
+ 806D414141404040212121211E1E1E1C1C1C1B1B0B1B15352D0909098C474776
+ 826F41414140402140212121211E1E1E1C1C1C1B1B1A1735350B09098C47477A
+ 847545454141404040402121211E1E1E1E3A1C1C18272D35350B0B098E4E477B
+ 8583714541414141404040212121211E1E57575656365635360B0B0B004E4779
+ 8685848174736A43404040402121211E1E5A575756563656321B0B40004E4E77
+ 8786858482807E494140402140212121215A575757565636261B0B4E004E4E4E
+ 88878685848280704141404040402121205A5A5A57575656181B1B00008E4E4E
+ 7C8A87868584827F4C4441414040403B395C5A5A575757321B1B1B0000004E4E
+ 4F898A8786858482807E6E676462605F5E5C5C5A5A5A573A1C1B520000005451
+ 4E788B8A8786858482807E69686665605F5E5C5C5A5A381E1C1C000000000051
+ 4E4E7D8B8A8786858482807E69686665605F5E5C5C591E1E1E8E000000000093
+ 514E4E7D8B8A8786858482806969686665605F5E5D201E1E4700000000000000
+ 8E514E4E78898A8786858482807E69686665603D212121400000000000000000
+ 0091514E4E4F7C888786858482807E6968633E40402141000000000000000000
+ 000093514E4E4E4E77797B7A7675727044414040405100000000000000000000
+ 0000000054514E4E474E47474745454541414145000000000000000000000000
+ 0000000000008E4E4E4E474747474645454F0000000000000000000000000000
+ 000000000000000000008E8E8C8C9200000000000000000000000000FFF00FFF
+ FF8001FFFE00007FFC00003FF800001FF000000FE0000007E0000003C0000003
+ C000000180000001800000018000000000000000000000000000000000000000
+ 0000000080000000800000008000000180000001C0000001C0000003E0000003
+ E0000007F000000FF800001FFC00003FFF0000FFFFC003FFFFFC1FFF28000000
+ 1000000020000000010008000000000000010000000000000000000000010000
+ 00010000000000000A0A0A00090F09000F0F0F000E140E000C190C0013131300
+ 14141400111E1100181818001D1D1D00092F09000A390A00113311001B321B00
+ 22222200262626002B2B2B0021322100263626003030300034343400313A3100
+ 393939003E3E3E00044A04000B440B000E490E0005540500065A0600075F0700
+ 124912001848180014531400155915001E521E00006A0000066A0600096A0900
+ 0070000000750000007B0000146414001B631B00137B1300374A38002E713300
+ 2B78300043434300474747004C4C4C004A534B00575757005A5A5A005E5E5E00
+ 46634B004E6152004A7050004878510063636300656565006868680070707000
+ 757575007D7D7D000081000000860000008C00000B860C000092000001980100
+ 09A20E0014AD1F0022B1320020B830003A9048004B975B005D836800539F6600
+ 63A679002BC442003AC0540037CF530039C8530042DA64004DE6750063C28300
+ 59E8840059F187008A8A8A009191910098989800AAAAAA000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000003D110906033400000000000000003E11121F1B1A0C0503
+ 1500000000003615151220252828241902060000004018181514112129250D05
+ 0403150000312E1815151511120E0909060B03005A3349311818151111101009
+ 091C04343E3950313118151515111010091E0C03364C52323131181815111110
+ 101E1A06364E5438323131181515232226291B09594D5554534B311818182B43
+ 42421F095C3D575554513731312D2C454342123D003D4F58555452504A484745
+ 452A1100005C3D5658555452504A484744163D0000005B3D4F5755545250492F
+ 183600000000005C3D3D4D4E4C3A33314000000000000000005C5936363E5A00
+ 00000000F81F0000E0070000C003000080010000800100000000000000000000
+ 000000000000000000000000000000008001000080010000C0030000E0070000
+ F81F000028000000300000006000000001002000000000008025000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000001E1E1E0F1C1C1C4F1B1B1B8F191919BF
+ 171717DF161616FF141414FF131313FF111111FF0F0F0FEF0E0E0EBF0D0D0D9F
+ 0B0B0B6F0A0A0A2F000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000002424240F2323235F212121CF1F1F1FFF1E1E1EFF1C1C1CFF1A1A1AFF
+ 191919FF171717FF161616FF141414FF131313FF111111FF0F0F0FFF0E0E0EFF
+ 0C0C0CFF0B0B0BFF090909DF0808088F0707071F000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000000000000002929290F
+ 2727277F262626EF242424FF222222FF212121FF1F1F1FFF1E1E1EFF1C1C1CFF
+ 1A1A1AFF191919FF171717FF161616FF141414FF131313FF111111FF0F0F0FFF
+ 0E0E0EFF0C0C0CFF0B0B0BFF090909FF080808FF060606BF0505053F00000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000002C2C2C5F2A2A2AEF
+ 292929FF272727FF262626FF242424FF222222FF212121FF1F1F1FFF1E1E1EFF
+ 1C1C1CFF1A1A1AFF191919FF171717FF161616FF141414FF131313FF111111FF
+ 0F0F0FFF0E0E0EFF0C0C0CFF0B0B0BFF090909FF080808FF060606FF0505059F
+ 0505050F00000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000003131310F2F2F2FAF2E2E2EFF2C2C2CFF
+ 2A2A2AFF292929FF272727FF262626FF242424FF222222FF212121FF193019FF
+ 143914FF0E480EFF0D460DFF0C450CFF0B430BFF0C3C0CFF0F2A0FFF111811FF
+ 111111FF0F0F0FFF0E0E0EFF0C0C0CFF0B0B0BFF090909FF080808FF060606FF
+ 040404EF0404044F000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000003434342F323232DF303030FF2F2F2FFF2E2E2EFF
+ 2C2C2CFF2A2A2AFF292929FF272727FF174717FF0B620BFF027702FF007A00FF
+ 007800FF007600FF007400FF007300FF007100FF006F00FF006D00FF006B00FF
+ 035903FF093709FF0D1A0DFF0E0E0EFF0C0C0CFF0B0B0BFF090909FF080808FF
+ 060606FF040404FF0303038F0000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000003737372F353535EF343434FF323232FF303030FF2F2F2FFF
+ 2E2E2EFF2C2C2CFF2A2A2AFF243424FF145414FF135313FF096709FF007C00FF
+ 007A00FF007800FF007600FF007400FF007300FF007100FF006F00FF006D00FF
+ 006B00FF006900FF006700FF044B04FF0B1E0BFF0C0C0CFF0B0B0BFF090909FF
+ 080808FF060606FF040404FF0303039F00000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000003A3A3A2F383838EF373737FF353535FF343434FF323232FF303030FF
+ 2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF292929FF272727FF262626FF242424FF
+ 164416FF027502FF007800FF007600FF007400FF007300FF007100FF006F00FF
+ 006D00FF006B00FF006900FF006700FF006600FF053F05FF0B120BFF0B0B0BFF
+ 090909FF080808FF060606FF040404FF0303039F000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 3D3D3D2F3C3C3CEF3A3A3AFF383838FF373737FF353535FF343434FF323232FF
+ 303030FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF292929FF272727FF262626FF
+ 242424FF1A391AFF007A00FF007800FF007600FF007400FF007300FF007100FF
+ 006F00FF006D00FF006B00FF006900FF006700FF006600FF015A01FF0A1D0AFF
+ 0B0B0BFF090909FF080808FF060606FF040404FF0303038F0000000000000000
+ 000000000000000000000000000000000000000000000000000000004141410F
+ 3F3F3FCF3D3D3DFF3C3C3CFF3A3A3AFF383838FF373737FF353535FF343434FF
+ 323232FF303030FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF292929FF272727FF
+ 262626FF242424FF007C00FF007A00FF007800FF007600FF007400FF007300FF
+ 007100FF036403FF0B410BFF0F2A0FFF101D10FF111111FF0E150EFF0C190CFF
+ 0C0C0CFF0B0B0BFF090909FF080808FF060606FF040404FF0404044F00000000
+ 000000000000000000000000000000000000000000000000000000004242428F
+ 404040FF3F3F3FFF3D3D3DFF3C3C3CFF3A3A3AFF383838FF373737FF353535FF
+ 343434FF323232FF303030FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF292929FF
+ 272727FF262626FF007E00FF007C00FF007A00FF007800FF007600FF007400FF
+ 0D460DFF191919FF171717FF161616FF141414FF131313FF111111FF0F0F0FFF
+ 0E0E0EFF0C0C0CFF0B0B0BFF090909FF080808FF060606FF040404EF0505050F
+ 0000000000000000000000000000000000000000000000004545453F444444FF
+ 424242FF404040FF3F3F3FFF3D3D3DFF3C3C3CFF3A3A3AFF383838FF373737FF
+ 353535FF343434FF323232FF303030FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF
+ 292929FF272727FF008000FF007E00FF007C00FF007A00FF007800FF007600FF
+ 1C1C1CFF1A1A1AFF191919FF171717FF161616FF141414FF131313FF111111FF
+ 0F0F0FFF0E0E0EFF0C0C0CFF0B0B0BFF090909FF080808FF060606FF050505AF
+ 000000000000000000000000000000000000000000000000464646BF454545FF
+ 444444FF424242FF404040FF3F3F3FFF3D3D3DFF3C3C3CFF3A3A3AFF383838FF
+ 373737FF353535FF343434FF323232FF303030FF2F2F2FFF2E2E2EFF2C2C2CFF
+ 2A2A2AFF292929FF272727FF262626FF242424FF1A391AFF163D16FF104C10FF
+ 1E1E1EFF1C1C1CFF1A1A1AFF191919FF171717FF161616FF141414FF131313FF
+ 111111FF0F0F0FFF0E0E0EFF0C0C0CFF0B0B0BFF090909FF080808FF060606FF
+ 0505053F000000000000000000000000000000004A4A4A3F484848FF474747FF
+ 454545FF444444FF39563BFF28742CFF3F3F3FFF3D3D3DFF3C3C3CFF3A3A3AFF
+ 383838FF373737FF353535FF343434FF323232FF303030FF2F2F2FFF2E2E2EFF
+ 2C2C2CFF2A2A2AFF292929FF272727FF262626FF242424FF222222FF212121FF
+ 1F1F1FFF1E1E1EFF1C1C1CFF1A1A1AFF191919FF171717FF161616FF141414FF
+ 131313FF111111FF0F0F0FFF053F05FF0C0C0CFF0B0B0BFF090909FF080808FF
+ 060606BF000000000000000000000000000000004B4B4BBF4A4A4AFF484848FF
+ 474747FF454545FF22942AFF2B7730FF404040FF3F3F3FFF3D3D3DFF3C3C3CFF
+ 3A3A3AFF383838FF373737FF353535FF343434FF323232FF303030FF2F2F2FFF
+ 2E2E2EFF2C2C2CFF2A2A2AFF292929FF272727FF262626FF242424FF222222FF
+ 212121FF1F1F1FFF1E1E1EFF1C1C1CFF1A1A1AFF191919FF171717FF161616FF
+ 141414FF131313FF111111FF006600FF0A230AFF0C0C0CFF0B0B0BFF090909FF
+ 080808FF0707072F00000000000000004F4F4F1F4D4D4DFF4B4B4BFF4A4A4AFF
+ 484848FF3C6240FF1AB328FF2D7A33FF424242FF404040FF3F3F3FFF3D3D3DFF
+ 3C3C3CFF3A3A3AFF383838FF373737FF353535FF343434FF323232FF303030FF
+ 2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF292929FF272727FF262626FF242424FF
+ 222222FF212121FF1F1F1FFF1E1E1EFF1C1C1CFF1A1A1AFF191919FF171717FF
+ 161616FF141414FF131313FF006700FF044B04FF0E0E0EFF0C0C0CFF0B0B0BFF
+ 090909FF0808088F00000000000000005050506F4F4F4FFF4D4D4DFF4B4B4BFF
+ 4A4A4AFF2D973AFF1EB72EFF307C37FF444444FF424242FF404040FF3F3F3FFF
+ 3D3D3DFF3C3C3CFF3A3A3AFF383838FF373737FF353535FF343434FF323232FF
+ 303030FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF292929FF272727FF262626FF
+ 242424FF222222FF212121FF1F1F1FFF1E1E1EFF1C1C1CFF1A1A1AFF191919FF
+ 171717FF161616FF141414FF006900FF006700FF0D1A0DFF0E0E0EFF0C0C0CFF
+ 0B0B0BFF090909EF0000000000000000525252BF505050FF4F4F4FFF4D4D4DFF
+ 49534AFF26BE39FF22BB34FF327F3BFF454545FF444444FF424242FF404040FF
+ 3F3F3FFF3D3D3DFF3C3C3CFF3A3A3AFF383838FF373737FF353535FF343434FF
+ 323232FF303030FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF292929FF272727FF
+ 262626FF242424FF222222FF212121FF1F1F1FFF1E1E1EFF1C1C1CFF1A1A1AFF
+ 191919FF171717FF161616FF006B00FF006900FF074207FF0F0F0FFF0E0E0EFF
+ 0C0C0CFF0B0B0BFF0A0A0A2F00000000535353FF525252FF505050FF4F4F4FFF
+ 417A49FF2AC23FFF26BE39FF35823EFF474747FF454545FF444444FF424242FF
+ 404040FF3F3F3FFF3D3D3DFF3C3C3CFF3A3A3AFF383838FF373737FF353535FF
+ 343434FF323232FF303030FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF292929FF
+ 272727FF262626FF242424FF222222FF212121FF1F1F1FFF1E1E1EFF1C1C1CFF
+ 1A1A1AFF191919FF171717FF006D00FF006B00FF035903FF111111FF0F0F0FFF
+ 0E0E0EFF0C0C0CFF0B0B0B6F5656563F555555FF535353FF525252FF505050FF
+ 3C9B4CFF2DC644FF2AC23FFF388442FF484848FF474747FF454545FF444444FF
+ 424242FF404040FF3F3F3FFF3D3D3DFF3C3C3CFF3A3A3AFF383838FF373737FF
+ 353535FF343434FF323232FF303030FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF
+ 292929FF272727FF262626FF242424FF222222FF212121FF1F1F1FFF1E1E1EFF
+ 1C1C1CFF1A1A1AFF191919FF006F00FF006D00FF006B00FF111811FF111111FF
+ 0F0F0FFF0E0E0EFF0C0C0CAF5858584F575757FF555555FF535353FF525252FF
+ 3BAE50FF31CA4AFF2DC644FF3B8745FF4A4A4AFF484848FF474747FF454545FF
+ 444444FF424242FF404040FF3F3F3FFF3D3D3DFF3C3C3CFF3A3A3AFF383838FF
+ 373737FF353535FF343434FF323232FF303030FF2F2F2FFF2E2E2EFF2C2C2CFF
+ 2A2A2AFF292929FF272727FF262626FF242424FF222222FF212121FF1F1F1FFF
+ 1E1E1EFF1C1C1CFF1A1A1AFF007100FF006F00FF006D00FF0F2A0FFF131313FF
+ 111111FF0F0F0FFF0E0E0EBF5959597F585858FF575757FF555555FF535353FF
+ 39D156FF35CD50FF31CA4AFF3D8949FF4B4B4BFF4A4A4AFF484848FF474747FF
+ 454545FF444444FF424242FF404040FF3F3F3FFF3D3D3DFF3C3C3CFF3A3A3AFF
+ 383838FF373737FF353535FF343434FF323232FF303030FF2F2F2FFF2E2E2EFF
+ 2C2C2CFF2A2A2AFF292929FF272727FF262626FF242424FF222222FF212121FF
+ 1F1F1FFF1E1E1EFF1C1C1CFF007300FF007100FF006F00FF0C3C0CFF141414FF
+ 131313FF111111FF0F0F0FFF5B5B5B7F595959FF585858FF575757FF555555FF
+ 3DD55BFF39D156FF35CD50FF408C4DFF4D4D4DFF4B4B4BFF4A4A4AFF484848FF
+ 474747FF454545FF444444FF424242FF404040FF3F3F3FFF3D3D3DFF3C3C3CFF
+ 3A3A3AFF383838FF373737FF353535FF343434FF323232FF303030FF2F2F2FFF
+ 2E2E2EFF2C2C2CFF2A2A2AFF292929FF272727FF262626FF242424FF222222FF
+ 212121FF1F1F1FFF1E1E1EFF007400FF007300FF007100FF0B430BFF161616FF
+ 141414FF131313FF111111FF5C5C5C7F5B5B5BFF595959FF585858FF575757FF
+ 40D961FF3DD55BFF39D156FF438F51FF4F4F4FFF4D4D4DFF4B4B4BFF4A4A4AFF
+ 484848FF474747FF454545FF444444FF424242FF404040FF3F3F3FFF3D3D3DFF
+ 3C3C3CFF3A3A3AFF383838FF373737FF353535FF343434FF323232FF303030FF
+ 2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF292929FF272727FF262626FF242424FF
+ 222222FF212121FF1F1F1FFF007600FF007400FF007300FF0C450CFF171717FF
+ 161616FF141414FF131313FF5E5E5E7F5D5D5DFF5B5B5BFF595959FF585858FF
+ 44DD67FF40D961FF3DD55BFF459254FF505050FF4F4F4FFF4D4D4DFF4B4B4BFF
+ 4A4A4AFF484848FF474747FF454545FF444444FF424242FF404040FF3F3F3FFF
+ 3D3D3DFF3C3C3CFF3A3A3AFF383838FF373737FF353535FF343434FF323232FF
+ 303030FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF292929FF272727FF262626FF
+ 242424FF202820FF0C590CFF007800FF007600FF007400FF0D460DFF191919FF
+ 171717FF161616FF141414FF6060607F5E5E5EFF5D5D5DFF5B5B5BFF595959FF
+ 48E06DFF44DD67FF40D961FF45A459FF525252FF505050FF4F4F4FFF4D4D4DFF
+ 4B4B4BFF4A4A4AFF484848FF474747FF454545FF444444FF424242FF404040FF
+ 3F3F3FFF3D3D3DFF3C3C3CFF3A3A3AFF383838FF373737FF353535FF343434FF
+ 323232FF303030FF1D511DFF0E6D0EFF155A15FF155815FF145614FF0E600EFF
+ 076F07FF007E00FF007C00FF007A00FF007800FF007600FF0E480EFF1A1A1AFF
+ 191919FF171717FF161616FF6161617F606060FF5E5E5EFF5D5D5DFF5B5B5BFF
+ 4CDB71FF48E06DFF44DD67FF40D961FF479C58FF4F6252FF505050FF4F4F4FFF
+ 4D4D4DFF4B4B4BFF4A4A4AFF484848FF474747FF454545FF444444FF424242FF
+ 404040FF3F3F3FFF3D3D3DFF3C3C3CFF3A3A3AFF383838FF373737FF353535FF
+ 343434FF323232FF185F18FF008B00FF008900FF008700FF008500FF008400FF
+ 008200FF008000FF007E00FF007C00FF007A00FF007800FF143914FF1C1C1CFF
+ 1A1A1AFF191919FF171717DF6262623F616161FF606060FF5E5E5EFF5D5D5DFF
+ 52C470FF4CE473FF48E06DFF44DD67FF40D961FF3DD55BFF3EB955FF419751FF
+ 408C4DFF456B4BFF436948FF416746FF484848FF474747FF454545FF444444FF
+ 424242FF404040FF3F3F3FFF3D3D3DFF3C3C3CFF3A3A3AFF383838FF373737FF
+ 353535FF343434FF196019FF008D00FF008B00FF008900FF008700FF008500FF
+ 008400FF008200FF008000FF007E00FF007C00FF007A00FF193019FF1E1E1EFF
+ 1C1C1CFF1A1A1AFF191919BF6464641F636363FF616161FF606060FF5E5E5EFF
+ 58A46DFF50E878FF4CE473FF48E06DFF44DD67FF40D961FF3DD55BFF39D156FF
+ 35CD50FF31CA4AFF2DC644FF2AC23FFF4A4A4AFF484848FF474747FF454545FF
+ 444444FF424242FF404040FF3F3F3FFF3D3D3DFF3C3C3CFF3A3A3AFF383838FF
+ 373737FF353535FF1A621AFF008F00FF008D00FF008B00FF008900FF008700FF
+ 008500FF008400FF008200FF008000FF007E00FF027702FF212121FF1F1F1FFF
+ 1E1E1EFF1C1C1CFF1B1B1B8F00000000656565DF636363FF616161FF606060FF
+ 5D7965FF53EC7EFF50E878FF4CE473FF48E06DFF44DD67FF40D961FF3DD55BFF
+ 39D156FF35CD50FF31CA4AFF2DC644FF4B4B4BFF4A4A4AFF484848FF474747FF
+ 454545FF444444FF424242FF404040FF3F3F3FFF3D3D3DFF3C3C3CFF3A3A3AFF
+ 383838FF373737FF1B641BFF009100FF008F00FF008D00FF008B00FF008900FF
+ 008700FF008500FF008400FF008200FF008000FF0B620BFF222222FF212121FF
+ 1F1F1FFF1E1E1EFF1C1C1C5F000000006666669F656565FF636363FF616161FF
+ 606060FF58DD7FFF53EC7EFF50E878FF4CE473FF48E06DFF44DD67FF40D961FF
+ 3DD55BFF39D156FF35CD50FF31CA4AFF4D4D4DFF4B4B4BFF4A4A4AFF484848FF
+ 474747FF454545FF444444FF424242FF404040FF3F3F3FFF3D3D3DFF3C3C3CFF
+ 3A3A3AFF383838FF1B661BFF009300FF009100FF008F00FF008D00FF008B00FF
+ 008900FF008700FF008500FF008400FF008200FF174717FF242424FF222222FF
+ 212121FF1F1F1FFF1E1E1E0F000000006767674F666666FF656565FF636363FF
+ 616161FF5DA974FF57EF84FF53EC7EFF50E878FF4CE473FF48E06DFF44DD67FF
+ 40D961FF3DD55BFF39D156FF35CD50FF447D4EFF4D4D4DFF4B4B4BFF4A4A4AFF
+ 484848FF474747FF454545FF444444FF424242FF404040FF3F3F3FFF3D3D3DFF
+ 3C3C3CFF3A3A3AFF0E7F0EFF009500FF009300FF009100FF008F00FF008D00FF
+ 008B00FF008900FF008700FF008500FF027E02FF272727FF262626FF242424FF
+ 222222FF212121CF000000000000000000000000686868EF666666FF656565FF
+ 636363FF616B64FF5BEA87FF57EF84FF53EC7EFF50E878FF4CE473FF48E06DFF
+ 44DD67FF40D961FF3DD55BFF39D156FF35CD50FF3C9C4DFF47644CFF4B4B4BFF
+ 4A4A4AFF484848FF474747FF454545FF444444FF424242FF404040FF3F3F3FFF
+ 2C5C2EFF128413FF009900FF009700FF009500FF009300FF009100FF008F00FF
+ 008D00FF008B00FF008900FF008700FF155815FF292929FF272727FF262626FF
+ 242424FF2323235F0000000000000000000000006969697F686868FF666666FF
+ 656565FF636363FF60AC78FF5BF38AFF57EF84FF53EC7EFF50E878FF4CE473FF
+ 48E06DFF44DD67FF40D961FF3DD55BFF39D156FF35CD50FF31CA4AFF2DC644FF
+ 32A442FF2FA13EFF35823EFF327F3BFF2D8335FF22942BFF1F9126FF0FA817FF
+ 0BA411FF07A00BFF049D05FF009900FF009700FF009500FF009300FF009100FF
+ 008F00FF008D00FF008B00FF028402FF293229FF2A2A2AFF292929FF272727FF
+ 262626EF2424240F0000000000000000000000006A6A6A1F696969EF686868FF
+ 666666FF656565FF636363FF5FDA86FF5BF38AFF57EF84FF53EC7EFF50E878FF
+ 4CE473FF48E06DFF44DD67FF40D961FF3DD55BFF39D156FF35CD50FF31CA4AFF
+ 2DC644FF2AC23FFF26BE39FF22BB34FF1EB72EFF1AB328FF16AF22FF13AC1CFF
+ 0FA817FF0BA411FF07A00BFF049D05FF009900FF009700FF009500FF009300FF
+ 009100FF008F00FF008D00FF204C20FF2E2E2EFF2C2C2CFF2A2A2AFF292929FF
+ 2727277F00000000000000000000000000000000000000006A6A6A7F696969FF
+ 686868FF666666FF656565FF637F6CFF5FED8CFF5BF38AFF57EF84FF53EC7EFF
+ 50E878FF4CE473FF48E06DFF44DD67FF40D961FF3DD55BFF39D156FF35CD50FF
+ 31CA4AFF2DC644FF2AC23FFF26BE39FF22BB34FF1EB72EFF1AB328FF16AF22FF
+ 13AC1CFF0FA817FF0BA411FF07A00BFF049D05FF009900FF009700FF009500FF
+ 009300FF009100FF136C13FF303030FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AEF
+ 2929290F00000000000000000000000000000000000000006B6B6B0F6A6A6ADF
+ 696969FF686868FF666666FF656565FF629B75FF5FF78FFF5BF38AFF57EF84FF
+ 53EC7EFF50E878FF4CE473FF48E06DFF44DD67FF40D961FF3DD55BFF39D156FF
+ 35CD50FF31CA4AFF2DC644FF2AC23FFF26BE39FF22BB34FF1EB72EFF1AB328FF
+ 16AF22FF13AC1CFF0FA817FF0BA411FF07A00BFF049D05FF009900FF009700FF
+ 009500FF0A810AFF343434FF323232FF303030FF2F2F2FFF2E2E2EFF2C2C2C6F
+ 000000000000000000000000000000000000000000000000000000006B6B6B3F
+ 6A6A6AFF696969FF686868FF666666FF656565FF629B75FF5FF78FFF5BF38AFF
+ 57EF84FF53EC7EFF50E878FF4CE473FF48E06DFF44DD67FF40D961FF3DD55BFF
+ 39D156FF35CD50FF31CA4AFF2DC644FF2AC23FFF26BE39FF22BB34FF1EB72EFF
+ 1AB328FF16AF22FF13AC1CFF0FA817FF0BA411FF07A00BFF049D05FF009900FF
+ 0A850AFF333D33FF353535FF343434FF323232FF303030FF2F2F2FBF00000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 6B6B6B8F6A6A6AFF696969FF686868FF666666FF656565FF629B75FF5FF78FFF
+ 5BF38AFF57EF84FF53EC7EFF50E878FF4CE473FF48E06DFF44DD67FF40D961FF
+ 3DD55BFF39D156FF35CD50FF31CA4AFF2DC644FF2AC23FFF26BE39FF22BB34FF
+ 1EB72EFF1AB328FF16AF22FF13AC1CFF0FA817FF0BA411FF07A00BFF128413FF
+ 364036FF383838FF373737FF353535FF343434FF323232EF3131310F00000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000006B6B6B9F6A6A6AFF696969FF686868FF666666FF656565FF637F6CFF
+ 5FDA86FF5BF38AFF57EF84FF53EC7EFF50E878FF4CE473FF48E06DFF44DD67FF
+ 40D961FF3DD55BFF39D156FF35CD50FF31CA4AFF2DC644FF2AC23FFF26BE39FF
+ 22BB34FF1EB72EFF1AB328FF16AF22FF13AC1CFF0FA817FF257127FF3D3D3DFF
+ 3C3C3CFF3A3A3AFF383838FF373737FF353535EF3434342F0000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000006B6B6B0F6B6B6BCF6A6A6AFF696969FF686868FF666666FF656565FF
+ 636363FF60AC78FF5BEA87FF57EF84FF53EC7EFF50E878FF4CE473FF48E06DFF
+ 44DD67FF40D961FF3DD55BFF39D156FF35CD50FF31CA4AFF2DC644FF2AC23FFF
+ 26BE39FF22BB34FF1EB72EFF1AB328FF22942AFF39563BFF404040FF3F3F3FFF
+ 3D3D3DFF3C3C3CFF3A3A3AFF383838EF3737372F000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000006B6B6B0F6B6B6B9F6A6A6AFF696969FF686868FF666666FF
+ 656565FF636363FF616B64FF5DA974FF58DD7FFF53EC7EFF50E878FF4CE473FF
+ 48E06DFF44DD67FF40D961FF3DD55BFF39D156FF35CD50FF31CA4AFF2DC644FF
+ 2AC23FFF26BE39FF2D973AFF3C6240FF454545FF444444FF424242FF404040FF
+ 3F3F3FFF3D3D3DFF3C3C3CEF3A3A3A2F00000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000006B6B6B8F6A6A6AFF696969FF686868FF
+ 666666FF656565FF636363FF616161FF606060FF5C8267FF58A46DFF52C470FF
+ 4CDB71FF48E06DFF44DD67FF40D961FF3DD55BFF39D156FF3AB650FF3C9B4CFF
+ 417A49FF49534AFF4A4A4AFF484848FF474747FF454545FF444444FF424242FF
+ 404040FF3F3F3FCF3D3D3D2F0000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000006B6B6B3F6A6A6ADF696969FF
+ 686868FF666666FF656565FF636363FF616161FF606060FF5E5E5EFF5D5D5DFF
+ 5B5B5BFF595959FF585858FF575757FF555555FF535353FF525252FF505050FF
+ 4F4F4FFF4D4D4DFF4B4B4BFF4A4A4AFF484848FF474747FF454545FF444444FF
+ 4242428F4141410F000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000006B6B6B0F6A6A6A7F
+ 696969FF686868FF666666FF656565FF636363FF616161FF606060FF5E5E5EFF
+ 5D5D5DFF5B5B5BFF595959FF585858FF575757FF555555FF535353FF525252FF
+ 505050FF4F4F4FFF4D4D4DFF4B4B4BFF4A4A4AFF484848FF464646BF4545453F
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 6A6A6A1F6969698F686868EF666666FF656565FF636363FF616161FF606060FF
+ 5E5E5EFF5D5D5DFF5B5B5BFF595959FF585858FF575757FF555555FF535353FF
+ 525252FF505050FF4F4F4FFF4D4D4DFF4B4B4BBF4A4A4A3F0000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000006767674F6666669F656565EF636363FF616161FF
+ 606060FF5E5E5EFF5D5D5DFF5B5B5BFF595959FF585858FF575757FF555555FF
+ 535353FF525252BF5050506F4F4F4F1F00000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000006464641F6262623F
+ 6161617F6060607F5E5E5E7F5C5C5C7F5B5B5B7F5959597F5858585F5656563F
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000FFFF8001FFFF0000FFFC00003FFF0000FFF00000
+ 0FFF0000FFE0000003FF0000FF80000001FF0000FF00000000FF0000FE000000
+ 007F0000FC000000003F0000F8000000001F0000F0000000000F0000F0000000
+ 00070000E000000000070000E000000000030000C000000000030000C0000000
+ 0001000080000000000100008000000000010000800000000000000080000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000800000000000000080000000
+ 000000008000000000010000C000000000010000C000000000010000C0000000
+ 00030000E000000000030000E000000000070000F0000000000F0000F8000000
+ 000F0000FC000000001F0000FC000000003F0000FE000000007F0000FF800000
+ 00FF0000FFC0000001FF0000FFE0000007FF0000FFF800001FFF0000FFFF0000
+ 7FFF0000FFFFE007FFFF00002800000020000000400000000100200000000000
+ 8010000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000000000000002121210F
+ 1F1F1F5F1D1D1D9F1A1A1ACF181818FF151515FF131313FF101010FF0E0E0EDF
+ 0C0C0CBF0A0A0A6F0808081F0000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000002929291F2626269F232323FF
+ 212121FF1F1F1FFF1C1C1CFF1A1A1AFF181818FF151515FF131313FF101010FF
+ 0E0E0EFF0C0C0CFF090909FF070707BF0606063F000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000002D2D2D8F2A2A2AFF282828FF262626FF
+ 232323FF212121FF1F1F1FFF1C1C1CFF1A1A1AFF181818FF151515FF131313FF
+ 101010FF0E0E0EFF0C0C0CFF090909FF070707FF050505BF0404041F00000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000003434341F323232CF2F2F2FFF2D2D2DFF2A2A2AFF282828FF
+ 1E371EFF0F560FFF086408FF007800FF007500FF007200FF006F00FF026102FF
+ 064906FF0B2B0BFF0E0E0EFF0C0C0CFF090909FF070707FF050505EF0303034F
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000003939392F363636EF343434FF323232FF2F2F2FFF2D2D2DFF2A2A2AFF
+ 1E3F1EFF135313FF0B610BFF007A00FF007800FF007500FF007200FF006F00FF
+ 006C00FF006900FF006100FF073407FF0C0C0CFF090909FF070707FF050505FF
+ 0303035F00000000000000000000000000000000000000000000000000000000
+ 3E3E3E0F3B3B3BEF393939FF363636FF343434FF323232FF2F2F2FFF2D2D2DFF
+ 2A2A2AFF282828FF262626FF1D341DFF027502FF007800FF007500FF007200FF
+ 006F00FF006C00FF006900FF006700FF025502FF0A170AFF090909FF070707FF
+ 050505FF0303034F000000000000000000000000000000000000000000000000
+ 404040BF3D3D3DFF3B3B3BFF393939FF363636FF343434FF323232FF2F2F2FFF
+ 2D2D2DFF2A2A2AFF282828FF262626FF096709FF007A00FF007800FF007500FF
+ 007200FF0A490AFF102B10FF121812FF0F160FFF0C190CFF0C0C0CFF090909FF
+ 070707FF050505EF0404041F000000000000000000000000000000004444446F
+ 424242FF404040FF3D3D3DFF3B3B3BFF393939FF363636FF343434FF323232FF
+ 2F2F2FFF2D2D2DFF2A2A2AFF282828FF096909FF007D00FF007A00FF007800FF
+ 104310FF1A1A1AFF181818FF151515FF131313FF101010FF0E0E0EFF0C0C0CFF
+ 090909FF070707FF050505BF0000000000000000000000004A4A4A0F474747EF
+ 444444FF424242FF365338FF3D3D3DFF3B3B3BFF393939FF363636FF343434FF
+ 323232FF2F2F2FFF2D2D2DFF2A2A2AFF282828FF262626FF1D341DFF173D17FF
+ 1B2A1BFF1C1C1CFF1A1A1AFF181818FF151515FF131313FF101010FF0D130DFF
+ 0C0C0CFF090909FF070707FF0606063F00000000000000004B4B4B7F494949FF
+ 474747FF3F5240FF1F9227FF404040FF3D3D3DFF3B3B3BFF393939FF363636FF
+ 343434FF323232FF2F2F2FFF2D2D2DFF2A2A2AFF282828FF262626FF232323FF
+ 212121FF1F1F1FFF1C1C1CFF1A1A1AFF181818FF151515FF131313FF0C260CFF
+ 073407FF0C0C0CFF090909FF070707BF00000000000000004E4E4EDF4B4B4BFF
+ 494949FF2D8D37FF24972EFF424242FF404040FF3D3D3DFF3B3B3BFF393939FF
+ 363636FF343434FF323232FF2F2F2FFF2D2D2DFF2A2A2AFF282828FF262626FF
+ 232323FF212121FF1F1F1FFF1C1C1CFF1A1A1AFF181818FF151515FF0E280EFF
+ 006100FF0E0E0EFF0C0C0CFF090909FF0808081F5252522F505050FF4E4E4EFF
+ 49534BFF24BD37FF299B35FF444444FF424242FF404040FF3D3D3DFF3B3B3BFF
+ 393939FF363636FF343434FF323232FF2F2F2FFF2D2D2DFF2A2A2AFF282828FF
+ 262626FF232323FF212121FF1F1F1FFF1C1C1CFF1A1A1AFF181818FF102B10FF
+ 006900FF0A310AFF0E0E0EFF0C0C0CFF0A0A0A6F5555556F535353FF505050FF
+ 44744CFF2AC23FFF2EA03CFF474747FF444444FF424242FF404040FF3D3D3DFF
+ 3B3B3BFF393939FF363636FF343434FF323232FF2F2F2FFF2D2D2DFF2A2A2AFF
+ 282828FF262626FF232323FF212121FF1F1F1FFF1C1C1CFF1A1A1AFF122D12FF
+ 006C00FF064906FF101010FF0E0E0EFF0C0C0CBF5757578F555555FF535353FF
+ 428F50FF30C848FF33A543FF494949FF474747FF444444FF424242FF404040FF
+ 3D3D3DFF3B3B3BFF393939FF363636FF343434FF323232FF2F2F2FFF2D2D2DFF
+ 2A2A2AFF282828FF262626FF232323FF212121FF1F1F1FFF1C1C1CFF143014FF
+ 006F00FF026102FF131313FF101010FF0E0E0EEF595959BF575757FF555555FF
+ 41B357FF35CE51FF37AA4AFF4B4B4BFF494949FF474747FF444444FF424242FF
+ 404040FF3D3D3DFF3B3B3BFF393939FF363636FF343434FF323232FF2F2F2FFF
+ 2D2D2DFF2A2A2AFF282828FF262626FF232323FF212121FF1F1F1FFF153215FF
+ 007200FF006F00FF151515FF131313FF101010FF5C5C5CBF5A5A5AFF575757FF
+ 46B85EFF3BD359FF3CAF51FF4E4E4EFF4B4B4BFF494949FF474747FF444444FF
+ 424242FF404040FF3D3D3DFF3B3B3BFF393939FF363636FF343434FF323232FF
+ 2F2F2FFF2D2D2DFF2A2A2AFF282828FF262626FF232323FF212121FF153A15FF
+ 007500FF007200FF181818FF151515FF131313FF5E5E5EBF5C5C5CFF5A5A5AFF
+ 4ABC65FF41D962FF41B458FF505050FF4E4E4EFF4B4B4BFF494949FF474747FF
+ 444444FF424242FF404040FF3D3D3DFF3B3B3BFF393939FF363636FF343434FF
+ 323232FF2F2F2FFF214421FF2A2A2AFF282828FF1E371EFF164516FF046F04FF
+ 007800FF007500FF1A1A1AFF181818FF151515FF616161BF5F5F5FFF5C5C5CFF
+ 50B96BFF46DF6BFF42D161FF4A8356FF505050FF4E4E4EFF4B4B4BFF494949FF
+ 474747FF444444FF424242FF404040FF3D3D3DFF3B3B3BFF393939FF363636FF
+ 343434FF323232FF008B00FF008900FF008600FF008300FF008000FF007D00FF
+ 007A00FF007800FF1C1C1CFF1A1A1AFF181818FF6363637F616161FF5F5F5FFF
+ 57A36BFF4CE473FF46DF6BFF41D962FF3DCC59FF3CAF51FF3D934CFF3B8746FF
+ 455847FF474747FF444444FF424242FF404040FF3D3D3DFF3B3B3BFF393939FF
+ 363636FF343434FF008E00FF008B00FF008900FF008600FF008300FF008000FF
+ 007D00FF066A06FF1F1F1FFF1C1C1CFF1A1A1ACF6565655F636363FF616161FF
+ 5C8367FF52EA7CFF4CE473FF46DF6BFF41D962FF3BD359FF35CE51FF30C848FF
+ 436949FF494949FF474747FF444444FF424242FF404040FF3D3D3DFF3B3B3BFF
+ 393939FF363636FF009100FF008E00FF008B00FF008900FF008600FF008300FF
+ 008000FF0F560FFF212121FF1F1F1FFF1D1D1DAF6767671F666666FF636363FF
+ 616161FF58E682FF52EA7CFF4CE473FF46DF6BFF41D962FF3BD359FF35CE51FF
+ 41844CFF4B4B4BFF494949FF474747FF444444FF424242FF404040FF3D3D3DFF
+ 3B3B3BFF353E35FF009400FF009100FF008E00FF008B00FF008900FF008600FF
+ 008300FF1E371EFF232323FF212121FF1F1F1F5F00000000676767BF666666FF
+ 636363FF5FAB76FF57F085FF52EA7CFF4CE473FF46DF6BFF41D962FF3BD359FF
+ 37C651FF437C4DFF49534BFF494949FF474747FF444444FF424242FF404040FF
+ 335034FF147D15FF009700FF009400FF009100FF008E00FF008B00FF008900FF
+ 0A6F0AFF282828FF262626FF232323FF2121210F000000006A6A6A5F686868FF
+ 666666FF636D66FF5DEC8AFF57F085FF52EA7CFF4CE473FF46DF6BFF41D962FF
+ 3BD359FF35CE51FF30C848FF2EB441FF2EA03CFF299B35FF24972EFF13AC1DFF
+ 0DA614FF08A10CFF029B03FF009700FF009400FF009100FF008E00FF008B00FF
+ 214421FF2A2A2AFF282828FF2626269F0000000000000000000000006A6A6ADF
+ 686868FF666666FF639272FF5DF58DFF57F085FF52EA7CFF4CE473FF46DF6BFF
+ 41D962FF3BD359FF35CE51FF30C848FF2AC23FFF24BD37FF1EB72EFF19B226FF
+ 13AC1DFF0DA614FF08A10CFF029B03FF009700FF009400FF009100FF156615FF
+ 2F2F2FFF2D2D2DFF2A2A2AFF2929291F0000000000000000000000006B6B6B3F
+ 6A6A6AFF686868FF666666FF62AE7CFF5DF58DFF57F085FF52EA7CFF4CE473FF
+ 46DF6BFF41D962FF3BD359FF35CE51FF30C848FF2AC23FFF24BD37FF1EB72EFF
+ 19B226FF13AC1DFF0DA614FF08A10CFF029B03FF009700FF0A820AFF343434FF
+ 323232FF2F2F2FFF2D2D2D8F0000000000000000000000000000000000000000
+ 6B6B6B8F6A6A6AFF686868FF666666FF62AE7CFF5DF58DFF57F085FF52EA7CFF
+ 4CE473FF46DF6BFF41D962FF3BD359FF35CE51FF30C848FF2AC23FFF24BD37FF
+ 1EB72EFF19B226FF13AC1DFF0DA614FF08A10CFF108311FF353E35FF363636FF
+ 343434FF323232CF3030300F0000000000000000000000000000000000000000
+ 000000006B6B6BBF6A6A6AFF686868FF666666FF639272FF5DEC8AFF57F085FF
+ 52EA7CFF4CE473FF46DF6BFF41D962FF3BD359FF35CE51FF30C848FF2AC23FFF
+ 24BD37FF1EB72EFF19B226FF13AC1DFF26732AFF3D3D3DFF3B3B3BFF393939FF
+ 363636EF3434341F000000000000000000000000000000000000000000000000
+ 000000006B6B6B0F6B6B6BAF6A6A6AFF686868FF666666FF636D66FF5FAB76FF
+ 58E682FF52EA7CFF4CE473FF46DF6BFF41D962FF3BD359FF35CE51FF30C848FF
+ 2AC23FFF24BD37FF2D8D37FF3F5240FF424242FF404040FF3D3D3DFF3B3B3BEF
+ 3939392F00000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000006B6B6B8F6A6A6AFF686868FF666666FF636363FF
+ 616161FF5C8367FF57A36BFF50B96BFF4ABC65FF46B85EFF41B357FF419750FF
+ 427C4BFF49534BFF494949FF474747FF444444FF424242FF404040BF3E3E3E0F
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000006B6B6B3F6A6A6ADF686868FF666666FF
+ 636363FF616161FF5F5F5FFF5C5C5CFF5A5A5AFF575757FF555555FF535353FF
+ 505050FF4E4E4EFF4B4B4BFF494949FF474747EF4444446F0000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000006A6A6A5F676767BF
+ 666666FF636363FF616161FF5F5F5FFF5C5C5CFF5A5A5AFF575757FF555555FF
+ 535353FF505050FF4E4E4EDF4B4B4B7F4A4A4A0F000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 6767671F6565655F6363637F616161BF5E5E5EBF5C5C5CBF595959BF5757578F
+ 5555556F5252522F000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000FFC003FFFF0000FFFE00003F
+ F800001FF000000FE0000007E0000003C0000003800000018000000180000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000008000000080000001C0000001C0000003E0000003F0000007
+ F000000FFC00001FFE00007FFF8000FFFFE007FF280000001000000020000000
+ 0100200000000000400400000000000000000000000000000000000000000000
+ 0000000000000000000000002727273F222222AF1D1D1DEF181818FF131313FF
+ 0F0F0FFF0B0B0BAF0707075F0000000000000000000000000000000000000000
+ 000000003535350F303030AF2B2B2BFF213221FF124912FF0E490EFF0B440BFF
+ 0A390AFF0C190CFF0A0A0AFF060606CF0404041F000000000000000000000000
+ 3E3E3E0F393939CF343434FF303030FF263626FF184818FF066A06FF007500FF
+ 007000FF006A00FF044A04FF090F09FF050505EF0404041F0000000000000000
+ 424242AF3E3E3EFF393939FF343434FF303030FF2B2B2BFF145314FF007B00FF
+ 017001FF113311FF111E11FF0E140EFF0A0A0AFF060606CF000000004B4B4B3F
+ 474747FF2E7133FF3E3E3EFF393939FF343434FF303030FF2B2B2BFF223222FF
+ 1B321BFF1D1D1DFF181818FF131313FF092F09FF0A0A0AFF0707075F5050509F
+ 4A534BFF22B132FF434343FF3E3E3EFF393939FF343434FF303030FF2B2B2BFF
+ 262626FF222222FF1D1D1DFF181818FF055405FF0C190CFF0B0B0BAF555555CF
+ 4A7050FF2BC442FF474747FF434343FF3E3E3EFF393939FF343434FF303030FF
+ 2B2B2BFF262626FF222222FF1D1D1DFF065A06FF0A390AFF0F0F0FFF5A5A5AFF
+ 4B975BFF37CF53FF4C4C4CFF474747FF434343FF3E3E3EFF393939FF343434FF
+ 303030FF2B2B2BFF262626FF222222FF075F07FF0B440BFF131313FF5F5F5FFF
+ 539F66FF42DA64FF4E6152FF4C4C4CFF474747FF434343FF3E3E3EFF393939FF
+ 343434FF1E521EFF155915FF096A09FF007B00FF0E490EFF181818FF636363BF
+ 5D8368FF4DE675FF42DA64FF39C853FF3A9048FF474747FF434343FF3E3E3EFF
+ 393939FF1B631BFF008C00FF008600FF008100FF124912FF1D1D1DFF6868688F
+ 646464FF59E884FF4DE675FF42DA64FF3AC054FF46634BFF474747FF434343FF
+ 374A38FF137B13FF009200FF008C00FF008600FF213221FF222222AF6A6A6A1F
+ 686868FF63A679FF59F187FF4DE675FF42DA64FF37CF53FF2BC442FF20B830FF
+ 14AD1FFF09A20EFF019801FF009200FF146414FF2B2B2BFF2727273F00000000
+ 6A6A6A8F686868FF63C283FF59F187FF4DE675FF42DA64FF37CF53FF2BC442FF
+ 20B830FF14AD1FFF09A20EFF0B860CFF313A31FF303030BF0000000000000000
+ 000000006A6A6AAF686868FF63A679FF59E884FF4DE675FF42DA64FF37CF53FF
+ 2BC442FF22B132FF2B7830FF3E3E3EFF393939CF3535350F0000000000000000
+ 00000000000000006A6A6A8F686868FF646464FF5D8368FF539F66FF4B975BFF
+ 487851FF4A534BFF474747FF424242AF3E3E3E0F000000000000000000000000
+ 0000000000000000000000006A6A6A1F6868688F636363BF5F5F5FFF5A5A5AFF
+ 555555CF5050509F4B4B4B3F00000000000000000000000000000000F00F0000
+ C003000080010000800100000000000000000000000000000000000000000000
+ 00000000000000000000000080010000C0010000E0030000F00F0000}
+ end
+ inherited Label1: TLabel
+ Width = 232
+ Caption = 'New Data Abstract Server Project Wizard'
+ end
+ inherited Label2: TLabel
+ Width = 483
+ Caption =
+ 'This wizard will guide you through the configuration of your Dat' +
+ 'a Abstract client and server projects.'
+ end
+ end
+ inherited pc_Pages: TPageControl
+ Width = 569
+ Height = 214
+ ActivePage = ts_SM
+ inherited ts_Welcome: TTabSheet
+ inherited Label3: TLabel
+ Width = 324
+ Caption = 'Welcome to the New Data Abstract Server Project Wizard'
+ end
+ inherited Label4: TLabel
+ Width = 483
+ Caption =
+ 'This wizard will guide you through the configuration of your Dat' +
+ 'a Abstract client and server projects.'
+ end
+ object Label7: TLabel
+ Left = 24
+ Top = 56
+ Width = 332
+ Height = 13
+ Caption =
+ 'To complete this task, the wizard will run through the following' +
+ ' steps:'
+ end
+ object Label8: TLabel
+ Left = 32
+ Top = 72
+ Width = 256
+ Height = 13
+ Caption = '- Launch Schema Modeler and configure your Schema'
+ end
+ object Label9: TLabel
+ Left = 32
+ Top = 88
+ Width = 198
+ Height = 13
+ Caption = '- Build and launch your Server application'
+ end
+ object Label10: TLabel
+ Left = 32
+ Top = 104
+ Width = 161
+ Height = 13
+ Caption = '- Add Data Tables to your project'
+ end
+ end
+ object ts_SM: TTabSheet [1]
+ Caption = 'ts_SM'
+ ImageIndex = 2
+ object Label11: TLabel
+ Left = 8
+ Top = 8
+ Width = 371
+ Height = 13
+ Caption = 'Step 1: Run Schema Modeler to define and configure your Schema'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = [fsBold]
+ ParentFont = False
+ end
+ object Label12: TLabel
+ Left = 24
+ Top = 24
+ Width = 381
+ Height = 13
+ Caption =
+ 'As the first step, the wizard will launch Schema Modeler to defi' +
+ 'ne your Schema.'
+ end
+ object Label13: TLabel
+ Left = 24
+ Top = 56
+ Width = 448
+ Height = 26
+ Caption =
+ 'The Schema Modeler provides a very easy visual interface for man' +
+ 'aging the connections and datasets available on the server and w' +
+ 'hich of those are accessible by clients.'
+ WordWrap = True
+ end
+ object lbl_SMLaunching: TLabel
+ Left = 24
+ Top = 104
+ Width = 506
+ Height = 13
+ Caption =
+ 'Please follow steps in Schema Modeler and close the modeler to c' +
+ 'ontinue with this wizard.'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = [fsBold]
+ ParentFont = False
+ Transparent = True
+ Visible = False
+ end
+ object Label15: TLabel
+ Left = 8
+ Top = 175
+ Width = 497
+ Height = 13
+ Caption =
+ 'Tip: You can always launch Schema Modeler again by simply double' +
+ '-clicking the TDASchema component.'
+ end
+ object lbl_SMClickNext: TLabel
+ Left = 24
+ Top = 104
+ Width = 229
+ Height = 13
+ Caption = 'Click "Next >>" now to launch Schema Modeler.'
+ Transparent = True
+ end
+ end
+ object ts_Compile: TTabSheet [2]
+ Caption = 'ts_Compile'
+ ImageIndex = 3
+ object Label16: TLabel
+ Left = 8
+ Top = 8
+ Width = 290
+ Height = 13
+ Caption = 'Step 2: Compile and Launch Your Server Application'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = [fsBold]
+ ParentFont = False
+ end
+ object Label17: TLabel
+ Left = 24
+ Top = 24
+ Width = 408
+ Height = 13
+ Caption =
+ 'As the second step, the wizard will now compile your server appl' +
+ 'ication and launch it.'
+ end
+ object lbl_CompileBuilding: TLabel
+ Left = 24
+ Top = 104
+ Width = 124
+ Height = 13
+ Caption = 'Compiling Project(s)...'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = [fsBold]
+ ParentFont = False
+ Transparent = True
+ Visible = False
+ end
+ object Label19: TLabel
+ Left = 24
+ Top = 56
+ Width = 441
+ Height = 26
+ Caption =
+ 'This will allow your client code to connect to the live server a' +
+ 's you proceed to configure the client application.'
+ WordWrap = True
+ end
+ object lbl_CompileClickNext: TLabel
+ Left = 24
+ Top = 104
+ Width = 253
+ Height = 13
+ Caption = 'Click "Next >>" now to build and launch your server.'
+ Transparent = True
+ end
+ object lbl_CompileLaunching: TLabel
+ Left = 24
+ Top = 104
+ Width = 173
+ Height = 13
+ Caption = 'Launching Server Application...'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = [fsBold]
+ ParentFont = False
+ Transparent = True
+ Visible = False
+ end
+ end
+ object ts_DataTables: TTabSheet [3]
+ Caption = 'ts_DataTables'
+ ImageIndex = 4
+ object Label18: TLabel
+ Left = 8
+ Top = 8
+ Width = 300
+ Height = 13
+ Caption = 'Step 3: Create Data Tables components for your data'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = [fsBold]
+ ParentFont = False
+ end
+ object Label20: TLabel
+ Left = 24
+ Top = 24
+ Width = 485
+ Height = 26
+ Caption =
+ 'Finally, the wizard will launch the Create Data Tables dialog, w' +
+ 'hich wll allow you to add one ore more TDADataTable components t' +
+ 'o your client project to access your data.'
+ WordWrap = True
+ end
+ object Label21: TLabel
+ Left = 8
+ Top = 175
+ Width = 533
+ Height = 13
+ Caption =
+ 'Tip: You can invoke this dialog again by right-clicking the Remo' +
+ 'teDataAdapter component on your data module.'
+ end
+ object lbl_DataTableClickNext: TLabel
+ Left = 24
+ Top = 104
+ Width = 171
+ Height = 13
+ Caption = 'Click "Next >>" to launch the dialog'
+ end
+ end
+ object ts_FinishMulti: TTabSheet [4]
+ Caption = 'ts_FinishMulti'
+ ImageIndex = 5
+ object Label30: TLabel
+ Left = 24
+ Top = 175
+ Width = 342
+ Height = 13
+ Caption =
+ 'Also make sure to check our articles and FAQ on the web for more' +
+ ' info:'
+ end
+ object Label31: TLabel
+ Left = 370
+ Top = 175
+ Width = 153
+ Height = 13
+ Cursor = crHandPoint
+ Caption = 'http://www.remobjects.com?da'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clBlue
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = [fsUnderline]
+ ParentFont = False
+ OnClick = lb_LinkClick
+ end
+ object Label22: TLabel
+ Left = 8
+ Top = 8
+ Width = 49
+ Height = 13
+ Caption = 'That'#39's it!'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = [fsBold]
+ ParentFont = False
+ end
+ object Label23: TLabel
+ Left = 24
+ Top = 24
+ Width = 503
+ Height = 26
+ Caption =
+ 'You'#39're now ready to build your client application according to t' +
+ 'he standard Delphi TDataSet practices you are used to.'
+ WordWrap = True
+ end
+ object Label24: TLabel
+ Left = 24
+ Top = 56
+ Width = 490
+ Height = 26
+ Caption =
+ 'For example, you could drop a DataGrid orother data-aware compon' +
+ 'ents on your Main form and hook them up to the Data Tables that ' +
+ 'you created in the previous step.'
+ WordWrap = True
+ end
+ end
+ object ts_FinishServer: TTabSheet [5]
+ Caption = 'ts_FinishServer'
+ ImageIndex = 6
+ object Label25: TLabel
+ Left = 8
+ Top = 8
+ Width = 49
+ Height = 13
+ Caption = 'That'#39's it!'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = [fsBold]
+ ParentFont = False
+ end
+ object Label26: TLabel
+ Left = 24
+ Top = 24
+ Width = 248
+ Height = 13
+ Caption = 'Your Data Abstract server application is now ready.'
+ WordWrap = True
+ end
+ object Label28: TLabel
+ Left = 24
+ Top = 175
+ Width = 342
+ Height = 13
+ Caption =
+ 'Also make sure to check our articles and FAQ on the web for more' +
+ ' info:'
+ end
+ object lb_Link: TLabel
+ Left = 370
+ Top = 175
+ Width = 153
+ Height = 13
+ Cursor = crHandPoint
+ Caption = 'http://www.remobjects.com?da'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clBlue
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = [fsUnderline]
+ ParentFont = False
+ OnClick = lb_LinkClick
+ end
+ end
+ end
+ inherited Panel2: TPanel
+ Top = 258
+ Width = 569
+ inherited btn_Finish: TBitBtn
+ Left = 489
+ end
+ inherited btn_Cancel: TBitBtn
+ Caption = 'Close'
+ end
+ inherited btn_Next: TBitBtn
+ Left = 489
+ end
+ inherited btn_Back: TBitBtn
+ Left = 409
+ Visible = False
+ end
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDAGuideWizardForm.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDAGuideWizardForm.pas
new file mode 100644
index 0000000..0dd45bf
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDAGuideWizardForm.pas
@@ -0,0 +1,257 @@
+unit uDAGuideWizardForm;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - IDE Library
+{
+{ compiler: Delphi 6 and up, Kylix 3 and up
+{ platform: Win32, Linux
+{
+{ (c)opyright RemObjects Software. all rights reserved.
+{
+{ Using this code requires a valid license of the Data Abstract
+{ which can be obtained at http://www.remobjects.com.
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, uROIDEPrjWizard, uEWWizard, StdCtrls, Buttons, ComCtrls,
+ ExtCtrls;
+
+type
+ TDAGuideWizardForm = class(TEWWizardForm)
+ Label7: TLabel;
+ Label8: TLabel;
+ Label9: TLabel;
+ Label10: TLabel;
+ ts_SM: TTabSheet;
+ ts_Compile: TTabSheet;
+ ts_DataTables: TTabSheet;
+ Label11: TLabel;
+ Label12: TLabel;
+ Label13: TLabel;
+ lbl_SMLaunching: TLabel;
+ Label15: TLabel;
+ Label16: TLabel;
+ Label17: TLabel;
+ lbl_CompileBuilding: TLabel;
+ Label19: TLabel;
+ lbl_CompileClickNext: TLabel;
+ lbl_CompileLaunching: TLabel;
+ Label18: TLabel;
+ Label20: TLabel;
+ Label21: TLabel;
+ lbl_DataTableClickNext: TLabel;
+ ts_FinishMulti: TTabSheet;
+ ts_FinishServer: TTabSheet;
+ Label25: TLabel;
+ Label26: TLabel;
+ Label28: TLabel;
+ lb_Link: TLabel;
+ Label30: TLabel;
+ Label31: TLabel;
+ Label22: TLabel;
+ Label23: TLabel;
+ Label24: TLabel;
+ lbl_SMClickNext: TLabel;
+ procedure lb_LinkClick(Sender: TObject);
+ private
+ fNewProjectInfo: TROIDENewProjectInfo;
+ fTempSchema, fTempConnections: string;
+ protected
+ procedure OnEnterPage(aPage:TTabSheet; aMovingForward:boolean); override;
+ procedure OnLeavePage(aPage:TTabSheet; aMovingForward:boolean); override;
+ public
+ constructor Create(aNewProjectInfo: TROIDENewProjectInfo); reintroduce;
+ destructor Destroy; override;
+ end;
+
+var
+ DAGuideWizardForm: TDAGuideWizardForm;
+
+implementation
+
+uses
+ ShellAPI,
+ uROIDETools, ToolsAPI, uROClasses, uDAIDEMenu, uDAClasses, uDAInterfaces,
+ uDAEngine, uDARemoteDataAdapter, uDADataTableWizards;
+
+procedure OnNewProject(aNewProjectInfo: TROIDENewProjectInfo);
+begin
+ if Pos('DAGuideWizard', aNewProjectInfo.Wizard) <> 1 then exit;
+
+ //ShowMessage(Uppercase(aNewProjectInfo.TemplateName));
+ if not assigned(aNewProjectInfo.ClientProject) and (Uppercase(aNewProjectInfo.TemplateName) = 'LOCAL') then
+ aNewProjectInfo.ClientProject := aNewProjectInfo.ServerProject;
+
+ with TDAGuideWizardForm.Create(aNewProjectInfo) do try
+ ShowModal();
+ finally
+ Free;
+ end;
+end;
+
+{$R *.dfm}
+
+{ TTDAGuideWizardForm }
+
+constructor TDAGuideWizardForm.Create(aNewProjectInfo: TROIDENewProjectInfo);
+begin
+ inherited Create(Application);
+ fNewProjectInfo := aNewProjectInfo;
+ fTempSchema := IncludeTrailingPathDelimiter(fNewProjectInfo.ProjectOptions.ProjectDir)+NewGuidAsString()+'.daSchema';
+ fTempConnections := ChangeFileExt(fTempSchema, '.daConnections');
+end;
+
+destructor TDAGuideWizardForm.Destroy;
+begin
+ if FileExists(fTempSchema) then DeleteFile(fTempSchema);
+ if FileExists(fTempConnections) then DeleteFile(fTempConnections);
+ inherited;
+end;
+
+procedure TDAGuideWizardForm.lb_LinkClick(Sender: TObject);
+begin
+ inherited;
+ ShellExecute(0, 'open', 'http://www.remobjects.com?da',nil, nil,SW_SHOWNORMAL);
+end;
+
+procedure TDAGuideWizardForm.OnEnterPage(aPage: TTabSheet; aMovingForward: boolean);
+begin
+ inherited;
+ btn_Back.Enabled := false;
+ btn_Cancel.Visible := (aPage <> ts_FinishMulti) and (aPage <> ts_FinishServer);
+ btn_Next.Visible := btn_Cancel.Visible;
+ btn_Finish.Visible := not btn_Next.Visible;
+ SetForegroundWindow(Self.Handle);
+end;
+
+function FindFormEditor(aModule: IOTAModule): IOTAFormEditor;
+var
+ i: integer;
+ lEditor: IOTAEditor;
+begin
+ for i := 0 to aModule.ModuleFileCount-1 do begin
+ lEditor := aModule.ModuleFileEditors[i];
+ if Supports(lEditor, IOTAFormEditor, result) then exit;
+ end;
+end;
+
+function FindFormInProject(aProject: IOTAProject; aName: string): IOTAFormEditor;
+var
+ i: integer;
+ lModule: IOTAModule;
+begin
+ for i := 0 to aProject.GetModuleCount-1 do begin
+ if aProject.GetModule(i).Name = aName then begin
+ lModule := aProject.GetModule(i).OpenModule();
+ result := FindFormEditor(lModule);
+ exit;
+ end
+ end;
+ raise Exception.Create('Could not locate '+aName+' module in project.');
+end;
+
+function FindComponentOnForm(aForm: IOTAFormEditor; aName: string): TComponent;
+var
+ lOTAComponent: IOTAComponent;
+begin
+ lOTAComponent := aForm.FindComponent(aName);
+ if not assigned(lOTAComponent) then
+ raise Exception.Create('Could not locate '+aName+' component.');
+
+ result := (lOTAComponent as INTAComponent).GetComponent();
+end;
+
+
+procedure TDAGuideWizardForm.OnLeavePage(aPage: TTabSheet; aMovingForward: boolean);
+var
+ lSMParams: string;
+ lServerDM, lService, lClientDM: IOTAFormEditor;
+
+ lConnectionManager: TDAConnectionManager;
+ lSchema: TDASchema;
+ lRemoteDataAdapter: TDARemoteDataAdapter;
+begin
+ inherited;
+ try
+
+ if (aPage = ts_SM) and aMovingForward then begin
+
+ lbl_SMClickNext.Visible := false;
+ lbl_SMLaunching.Visible := true;
+ btn_Next.Enabled := false;
+ Application.ProcessMessages();
+
+ // locate forms & components
+ lServerDM := FindFormInProject(fNewProjectInfo.ServerProject, 'fServerDataModule');
+ lService := FindFormInProject(fNewProjectInfo.ServerProject, fNewProjectInfo.ProjectOptions.ServiceName+'_Impl');
+ lConnectionManager := FindComponentOnForm(lServerDM, 'ConnectionManager') as TDAConnectionManager;
+ lSchema := FindComponentOnForm(lService, 'Schema') as TDASchema;
+
+ // edit in SM
+ lConnectionManager.SaveToFile(fTempConnections);
+ lSchema.SaveToFile(fTempSchema);
+ lSMParams := Format('/ns /autosave /projectname:"%s" /schemafile:"%s" /connectionsfile:"%s" /platform:Delphi /schemawizard', [fNewProjectInfo.ProjectOptions.ProjectName, fTempSchema, fTempConnections]);
+
+ LaunchSchemaModeler(fNewProjectInfo.ProjectOptions.ProjectName, lSMParams, true);
+ lConnectionManager.LoadFromFile(fTempConnections);
+ lSchema.LoadFromFile(fTempSchema);
+ lServerDM.MarkModified();
+ lService.MarkModified();
+
+ if not assigned(fNewProjectInfo.ClientProject) then
+ NextPage := ts_FinishServer.PageIndex;
+ //else if DAPackage.Package.DTE.Solution.Projects.Count > 2 then
+ //fNextPage := pc_Pages.Pages.IndexOf(ts_FinishMultiProject);
+
+ btn_Next.Enabled := true;
+ end
+ else if (aPage = ts_Compile) and aMovingForward then begin
+
+ lbl_CompileClickNext.Visible := false;
+ lbl_CompileBuilding.Visible := true;
+ btn_Next.Enabled := false;
+ Application.ProcessMessages();
+
+ if not fNewProjectInfo.ServerProject.ProjectBuilder.BuildProject(cmOTAMake, true, true) then
+ raise Exception.Create('Failed to compile server project; please check error messages.');
+
+ lbl_CompileLaunching.Visible := true;
+ Application.ProcessMessages();
+ ShellExecute(0, 'open', pchar(GetProjectExe(fNewProjectInfo.ServerProject)), nil, nil, SW_SHOWNORMAL);
+
+ btn_Next.Enabled := false;
+ end
+ else if (aPage = ts_DataTables) and aMovingForward then begin
+
+ lbl_DataTableClickNext.Visible := false;
+ Application.ProcessMessages();
+
+ // locate forms & components
+ lClientDM := FindFormInProject(fNewProjectInfo.ClientProject, 'fClientDataModule');
+ lRemoteDataAdapter := FindComponentOnForm(lClientDM, 'RemoteDataAdapter') as TDARemoteDataAdapter;
+ lService := FindFormInProject(fNewProjectInfo.ServerProject, fNewProjectInfo.ProjectOptions.ServiceName+'_Impl');
+ lSchema := FindComponentOnForm(lService, 'Schema') as TDASchema;
+
+ // create DTs
+ lClientDM.Show();
+ TDataTableWizards.CreateDataTables(lClientDM, lRemoteDataAdapter, lSchema, Point(80,8));
+ lClientDM.MarkModified();
+
+ end;
+
+ except
+ Visible := false;
+ ModalResult := mrCancel;
+ raise;
+ end;
+
+end;
+
+initialization
+ RegisterGuideWizard(@OnNewProject);
+finalization
+ UnregisterGuideWizard(@OnNewProject);
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDAIDEData.dfm b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDAIDEData.dfm
new file mode 100644
index 0000000..ad06737
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDAIDEData.dfm
@@ -0,0 +1,170 @@
+object DAIdeData: TDAIdeData
+ OldCreateOrder = False
+ Left = 586
+ Top = 308
+ Height = 150
+ Width = 215
+ object iml_Actions: TImageList
+ Left = 32
+ Top = 8
+ Bitmap = {
+ 494C010101000400040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
+ 0000000000003600000028000000400000001000000001002000000000000010
+ 000000000000000000000000000000000000FF00FF00FF00FF00FF00FF00FF00
+ FF00FF00FF00686868002B2B2B0018181800131313000F0F0F0057575700FF00
+ FF00FF00FF00FF00FF00FF00FF00FF00FF000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000FF00FF00FF00FF00FF00FF007070
+ 70002B2B2B0021322100124912000E490E000B440B000A390A000C190C000F0F
+ 0F0034343400FF00FF00FF00FF00FF00FF000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000FF00FF00FF00FF005E5E5E003434
+ 3400343434002132210018481800066A06000075000000750000066A0600044A
+ 04000F0F0F0013131300FF00FF00FF00FF000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000FF00FF007D7D7D003E3E3E003E3E
+ 3E0034343400303030002B2B2B0014531400007B0000066A0600113311000C19
+ 0C000E140E000F0F0F0034343400FF00FF000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000FF00FF00474747002E7133003E3E
+ 3E003434340034343400343434002B2B2B00213221001B321B00181818001818
+ 180013131300092F09000F0F0F00FF00FF000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000919191004A534B0022B132004747
+ 47003E3E3E003E3E3E00343434002B2B2B002B2B2B0026262600262626001818
+ 180018181800055405000E140E00575757000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000707070004A7050002BC442004747
+ 4700474747003E3E3E003434340034343400343434002B2B2B00262626002626
+ 260018181800075F07000A390A000F0F0F000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000005E5E5E004B975B0037CF53004C4C
+ 4C0047474700474747003E3E3E003E3E3E00343434002B2B2B002B2B2B002626
+ 260026262600075F07000B440B00131313000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000005E5E5E00539F660042DA64004E61
+ 52004C4C4C0047474700474747003E3E3E0034343400343434001E521E001559
+ 1500096A0900007B00000E490E00181818000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000008A8A8A005D8368004DE6750042DA
+ 640039C853003A904800474747003E3E3E003E3E3E003E3E3E001B631B00008C
+ 0000008600000086000012491200181818000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000FF00FF006868680059E884004DE6
+ 750042DA64003AC0540046634B004747470047474700374A3800137B13000092
+ 0000008C00000086000021322100686868000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000FF00FF006868680063A6790059F1
+ 87004DE6750042DA640037CF53002BC4420020B8300014AD1F0009A20E000092
+ 000000920000146414002B2B2B00FF00FF000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000FF00FF00FF00FF006868680063C2
+ 830059F187004DE6750042DA640037CF53002BC4420020B8300014AD1F0009A2
+ 0E000B860C00313A310068686800FF00FF000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000FF00FF00FF00FF00989898006868
+ 680063A6790059E884004DE6750042DA640037CF53002BC4420022B132002B78
+ 30003E3E3E005E5E5E00FF00FF00FF00FF000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000FF00FF00FF00FF00FF00FF00FF00
+ FF0068686800686868005D836800539F66004B975B00487851004A534B004747
+ 47007D7D7D00FF00FF00FF00FF00FF00FF000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000FF00FF00FF00FF00FF00FF00FF00
+ FF00FF00FF008A8A8A00636363005A5A5A005A5A5A00575757008A8A8A00FF00
+ FF00FF00FF00FF00FF00FF00FF00FF00FF000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000424D3E000000000000003E000000
+ 2800000040000000100000000100010000000000800000000000000000000000
+ 000000000000000000000000FFFFFF0000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000}
+ end
+ object dlg_OpenBriefcase: TOpenDialog
+ DefaultExt = '.daBriefcase'
+ Filter =
+ 'Briefcase files (*.daBriefcase)|*.daBriefcase|All files (*.*)|*.' +
+ '*'
+ FilterIndex = 0
+ Title = 'Load Data from Briefcase File'
+ Left = 112
+ Top = 8
+ end
+ object dlg_SaveBriefcase: TSaveDialog
+ DefaultExt = '.daBriefcase'
+ Filter =
+ 'Briefcase files (*.daBriefcase)|*.daBriefcase|All files (*.*)|*.' +
+ '*'
+ FilterIndex = 0
+ Title = 'Save Data as Briefcase File'
+ Left = 112
+ Top = 56
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDAIDEData.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDAIDEData.pas
new file mode 100644
index 0000000..a8dd78c
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDAIDEData.pas
@@ -0,0 +1,56 @@
+unit uDAIDEData;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - IDE Library
+{
+{ compiler: Delphi 6 and up, Kylix 3 and up
+{ platform: Win32, Linux
+{
+{ (c)opyright RemObjects Software. all rights reserved.
+{
+{ Using this code requires a valid license of the Data Abstract
+{ which can be obtained at http://www.remobjects.com.
+{----------------------------------------------------------------------------}
+
+{$IFDEF LINUX}
+{$I ../DataAbstract.inc}
+{$ELSE}
+{$I ..\DataAbstract.inc}
+{$ENDIF}
+
+interface
+
+uses
+ {$IFDEF DELPHI5}Forms,{$ENDIF}
+ SysUtils, Classes
+ {$IFDEF WIN32}
+ , ImgList, Controls, Dialogs;
+ {$ENDIF}
+ {$IFDEF LINUX}
+ ,QDialogs, QImgList;
+ {$ENDIF}
+
+type
+ TDAIdeData = class(TDataModule)
+ iml_Actions: TImageList;
+ dlg_OpenBriefcase: TOpenDialog;
+ dlg_SaveBriefcase: TSaveDialog;
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+const
+ ICON_REGENERATE = 1;
+ ICON_IMPORT = 2;
+ ICON_MAKESERVER = 3;
+
+{var
+ DAIdeData: TDAIdeData;}
+
+implementation
+
+{$R *.dfm}
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDAIDEMenu.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDAIDEMenu.pas
new file mode 100644
index 0000000..2c3c6e9
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDAIDEMenu.pas
@@ -0,0 +1,297 @@
+unit uDAIDEMenu;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - IDE Library
+{
+{ compiler: Delphi 6 and up, Kylix 3 and up
+{ platform: Win32, Linux
+{
+{ (c)opyright RemObjects Software. all rights reserved.
+{
+{ Using this code requires a valid license of the Data Abstract
+{ which can be obtained at http://www.remobjects.com.
+{----------------------------------------------------------------------------}
+
+{$IFDEF MSWINDOWS}
+{$I ..\DataAbstract.inc}
+{$ENDIF MSWINDOWS}
+{$IFDEF LINUX}
+{$I ../DataAbstract.inc}
+{$ENDIF LINUX}
+
+interface
+
+uses Forms,
+ Classes, Windows, SysUtils,{$IFDEF DELPHI6UP}DesignEditors, DesignIntf, {$ELSE}
+ {$IFDEF LINUX}
+ DesignEditors, DesignIntf,
+ {$ELSE}
+ DsgnIntf,{$ENDIF}{$ENDIF}
+ ToolsApi, Menus, Contnrs, ComObj, Graphics;
+
+type
+ { TMenuItemInfo }
+ TMenuItemInfo = record
+ Caption,
+ ShortCut : string;
+ Menu:TMenuItem;
+ ImageIndex:integer;
+ end;
+
+const MAX_MENU_ITEM = 0;
+
+var
+ MenuItems : array[0..MAX_MENU_ITEM] of TMenuItemInfo = (
+ //(Caption: '-'; ShortCut: ''; Menu:nil; ImageIndex: -1),
+ (Caption: 'Schema &Modeler'; ShortCut: ''; Menu:nil; ImageIndex: 0)
+ );
+
+const
+ mi_SchemaModeler = 0;
+
+type
+ { TDAMenuWizard }
+ TDAMenuWizard = class(TInterfacedObject, IOTAWizard, IOTANotifier)
+ private
+ fDAMenuItems : TList;
+
+ protected
+ { Misc }
+ procedure CreateMenuItems;
+ procedure LaunchSchemaModeler(Sender : TObject);
+ function FindROMenu : TMenuItem;
+
+ { IOTANotifier}
+ procedure AfterSave;
+ procedure BeforeSave;
+ procedure Destroyed;
+ procedure Execute;
+ procedure Modified;
+
+ { IOTAWizard }
+ function GetState: TWizardState;
+ function GetIDString: string;
+ function GetName: string;
+
+ public
+
+ constructor Create;
+ destructor Destroy; override;
+ end;
+
+function GetSchemaModelerPath: string;
+function GetDllPath: String;
+function GetBinDir: string;
+procedure LaunchSchemaModeler(const aProjectName, someParams : string; aWait: boolean=false);
+
+procedure Register;
+
+implementation
+
+uses ShellAPI, Controls, Registry, Dialogs,
+ uRODL, uROIDETools, uRODLToXML, uRODLToPascalIntf, uRODLGenTools,
+ uRORODLNotifier, uROPleaseWaitForm, uDAIDEData, fROAbout,
+ fCustomIDEMessagesForm, uROProductVersionInfo, uROClasses, uROIDEMenu;
+
+{$R Resources.BDS.res}
+
+procedure RegisterAboutInfo;
+const
+ lProductName = 'RemObjects Data Abstract ''Vinci'' for Delphi';
+begin
+ {$IFDEF BDS}
+ {$IFDEF BDS3}
+ SplashScreenServices.AddPluginBitmap(, LoadBitmap(HInstance, 'SPLASH2005'));
+ {$ELSE}
+ {$IFDEF BDS4}
+ SplashScreenServices.AddPluginBitmap(lProductName, LoadBitmap(HInstance, 'SPLASH2006'));
+ {$ELSE}
+ SplashScreenServices.AddPluginBitmap(lProductName, LoadBitmap(HInstance, 'SPLASH2007'));
+ {$ENDIF}
+ {$ENDIF}
+ (BorlandIDEServices as IOTAAboutBoxServices).AddPluginInfo(lProductName, lProductName+#13#10'Copyright RemObjects Software 2002-2007.'#13#10'All rights reserved.'#13#10'http://www.remobjects.com/da.', LoadBitmap(HInstance, 'ABOUT'));
+ {$ENDIF BDS}
+end;
+
+procedure Register;
+begin
+ RegisterAboutInfo();
+ RegisterPackageWizard(TDAMenuWizard.Create);
+end;
+
+{ TDAMenuWizard }
+
+constructor TDAMenuWizard.Create;
+begin
+ inherited Create;
+
+ fDAMenuItems := TList.Create;
+ CreateMenuItems;
+end;
+
+destructor TDAMenuWizard.Destroy;
+var romenu : TMenuItem;
+ i, x : integer;
+begin
+ romenu := FindROMenu;
+ if (romenu<>NIL) then begin
+ for i := (romenu.Count-1) downto 0 do begin
+ for x := (fDAMenuItems.Count-1) downto 0 do
+ if (romenu.Items[i]=fDAMenuItems[x]) then begin
+ TObject(fDAMenuItems[x]).Free;
+ Break;
+ end;
+ end;
+ end;
+
+ fDAMenuItems.Free;
+end;
+
+function TDAMenuWizard.GetIDString: string;
+begin
+ Result := '{FE46996E-0AFA-4C8D-AF59-192F1D581FD1}'
+end;
+
+function TDAMenuWizard.GetName: string;
+begin
+ Result := 'DAMenuWizard';
+end;
+
+// The following are stubs that Delphi never calls.
+procedure TDAMenuWizard.AfterSave;
+begin
+end;
+
+procedure TDAMenuWizard.BeforeSave;
+begin
+end;
+
+procedure TDAMenuWizard.Destroyed;
+begin
+end;
+
+procedure TDAMenuWizard.Execute;
+begin
+end;
+
+function TDAMenuWizard.GetState: TWizardState;
+begin
+ Result := [];
+end;
+
+procedure TDAMenuWizard.Modified;
+begin
+end;
+
+function TDAMenuWizard.FindROMenu: TMenuItem;
+{var mainmenu : TMainMenu;
+ i : integer;}
+begin
+ result := gRemObjectsMenu;
+ {result := NIL;
+ mainmenu := (BorlandIDEServices as INTAServices).MainMenu;
+ for i := 0 to (mainmenu.Items.Count-1) do
+ if SameText('Rem&Objects', mainmenu.Items[i].Caption) then begin
+ result := mainmenu.Items[i];
+ Break;
+ end;}
+end;
+
+procedure TDAMenuWizard.CreateMenuItems;
+var romenu,
+ item : TMenuItem;
+ i : Integer;
+ lBitmap : TBitmap;
+begin
+ romenu := FindROMenu;
+
+ if (romenu=NIL) then Exit;
+
+ with TDAIdeData.Create(nil) do try
+
+ lBitmap := TBitmap.Create();
+ try
+ for i := 0 to High(MenuItems) do begin
+ item := TMenuItem.Create(romenu);
+ item.Caption := MenuItems[i].Caption;
+ item.ShortCut := TextToShortCut(MenuItems[i].ShortCut);
+ item.Tag := i;
+
+ fDAMenuItems.Add(item);
+
+ if MenuItems[i].ImageIndex > -1 then begin
+ iml_Actions.GetBitmap(MenuItems[i].ImageIndex,lBitmap);
+ item.ImageIndex := (BorlandIDEServices as INTAServices).AddMasked(lBitmap, clFuchsia);
+ end;
+
+ MenuItems[i].Menu := item;
+
+ case i of
+ mi_SchemaModeler : item.OnClick := LaunchSchemaModeler;
+ else item.OnClick := NIL;
+ end;
+
+ romenu.Insert(6+i, item);// Add(item);
+ end;
+ finally
+ lBitmap.Free();
+ end;
+
+ finally
+ Free();
+ end;
+end;
+
+function GetDllPath: String;
+var TheFileName : array[0..MAX_PATH] of char;
+begin
+ FillChar(TheFileName, SizeOf(TheFileName), #0);
+ {$IFDEF KYLIX}System.{$ENDIF}GetModuleFileName(hInstance, TheFileName, sizeof(TheFileName));
+ Result := ExtractFilePath(TheFileName);
+end;
+
+function GetBinDir: string;
+begin
+ // This function strips the "DCU\Dx" part of the path where the BPL is
+ result := ExtractFilePath(GetDllPath);
+{$IFDEF DELPHI10UP}
+ result := IncludeTrailingBackslash(Copy(result,1,Length(result)-8))+'Bin\';
+{$ELSE}
+ result := IncludeTrailingBackslash(Copy(result,1,Length(result)-7))+'Bin\';
+{$ENDIF}
+end;
+
+function GetSchemaModelerPath: string;
+var reg: TRegIniFile;
+begin
+ reg := TRegIniFile.Create('Software\RemObjects\Data Abstract');
+ try
+ result := reg.ReadString('Schema Modeler', 'FullPath', GetBinDir+'DASchemaModeler.exe');
+ finally
+ reg.Free;
+ end;
+end;
+
+procedure LaunchSchemaModeler(const aProjectName, someParams : string; aWait: boolean=false);
+var exename : string;
+begin
+ exename := GetSchemaModelerPath;
+
+ if not FileExists(exename) then
+ MessageDlg(Format('Cannot find "%s"', [exename]), mtError, [mbOK], 0)
+ else begin
+ if aWait then begin
+ ExecuteAndWait(exename, someParams);
+ end
+ else begin
+ ShellExecute(0, 'open', PChar(exename), PChar(someParams), PChar(ExtractFilePath(aProjectName)), SW_NORMAL);
+ end;
+ end;
+end;
+
+procedure TDAMenuWizard.LaunchSchemaModeler(Sender: TObject);
+begin
+ uDAIDEMenu.LaunchSchemaModeler('', '/ns /platform:Delphi');
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDAIDERes.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDAIDERes.pas
new file mode 100644
index 0000000..40a8308
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDAIDERes.pas
@@ -0,0 +1,12 @@
+unit uDAIDERes;
+
+interface
+
+resourcestring
+ err_AssignRemoteService = 'Please assign a RemoteService, first.';
+ err_AssignRemoteServiceChannel = 'Please assign a Channel to the RemoteService, first.';
+ err_AssignRemoteServiceMessage = 'Please assign a Message to the RemoteService, first.';
+
+implementation
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDASchemaUnitsGenerator.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDASchemaUnitsGenerator.pas
new file mode 100644
index 0000000..2393818
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDASchemaUnitsGenerator.pas
@@ -0,0 +1,856 @@
+unit uDASchemaUnitsGenerator;
+
+interface
+
+uses
+ Classes, uDAInterfaces, uDAClasses;
+
+
+
+type
+ { TDASchemaCodeGenerator }
+ TDASchemaCodeGenerator = class(TStringList)
+ private
+ fSchema : TDASchema;
+ fFileName : string;
+
+ protected
+ procedure DoWriteCode; virtual; abstract;
+
+ property FileName : string read fFileName;
+ property Schema : TDASchema read fSchema;
+
+ public
+ constructor Create(aSchema : TDASchema);
+
+ procedure Write(const someText: string; Indentation: integer = 0); overload;
+ procedure WriteLines(const someText: string);
+ procedure WriteEmptyLine;
+
+ procedure WriteCode(const aFileName : string);
+ end;
+
+ { TClientUnitSchemaGenerator }
+ TClientUnitSchemaGenerator = class(TDASchemaCodeGenerator)
+ protected
+ procedure DoWriteCode; override;
+ end;
+
+ { TServerUnitSchemaGenerator }
+ TServerUnitSchemaGenerator = class(TDASchemaCodeGenerator)
+ private
+ fClientUnitName: string;
+
+ protected
+ procedure DoWriteCode; override;
+
+ public
+ property ClientUnitName : string read fClientUnitName write fClientUnitName;
+ end;
+
+procedure GenerateSchemaUnits(aSchema : TDASchema);
+function GetDAType(ad: TDADataType): string;
+
+implementation
+
+uses
+ uROIDETools, uRODLToPascal, SysUtils, Dialogs, uROTypes, uROClasses;
+
+function GetDATypeMethod(ad: TDADataType): string;
+begin
+ case ad of
+ datAutoInc: Result := 'Integer';
+ datLargeAutoInc: Result := 'LargeInt';
+ datWideMemo: Result := 'WideString';
+ datSingleFloat: Result := 'Single';
+ else
+ Result := DADataTypeNames[ad];
+ end;
+end;
+
+{ TDASchemaCodeGenerator }
+
+procedure TDASchemaCodeGenerator.Write(const someText: string; Indentation: integer = 0);
+var
+ i: integer;
+ s: string;
+begin
+ s := '';
+ for i := 1 to Indentation do s := s + ' ';
+ s := s + someText;
+ Add(s)
+end;
+
+procedure TDASchemaCodeGenerator.WriteLines(const someText: string);
+begin
+ Text := Text+someText;
+end;
+
+procedure TDASchemaCodeGenerator.WriteEmptyLine;
+begin
+ Add('');
+end;
+
+constructor TDASchemaCodeGenerator.Create(aSchema: TDASchema);
+begin
+ inherited Create;
+ fSchema := aSchema;
+end;
+
+procedure TDASchemaCodeGenerator.WriteCode(const aFileName: string);
+begin
+ fFileName := aFileName;
+
+ Clear;
+ DoWriteCode;
+ SaveToFile(aFileName);
+end;
+
+{ Misc }
+procedure GenerateSchemaUnits(aSchema : TDASchema);
+var clienttargetfilename,
+ servertargetfilename : string;
+begin
+ clienttargetfilename := IncludeTrailingPathDelimiter(ModuleDir(CurrentProject))+aSchema.Name+'Client_Intf.pas';
+ if PromptForFileName(clienttargetfilename, 'Delphi unit (*.pas)|*.pas', '*.pas', 'Save '+aSchema.Name+' client access unit', '', TRUE) then begin
+
+ with TClientUnitSchemaGenerator.Create(aSchema) do try
+ WriteCode(clienttargetfilename);
+ CurrentProject.AddFile(clienttargetfilename, TRUE);
+ finally
+ Free;
+ end;
+
+ end;
+
+ servertargetfilename := IncludeTrailingPathDelimiter(ModuleDir(CurrentProject))+aSchema.Name+'Server_Intf.pas';
+ if PromptForFileName(servertargetfilename, 'Delphi unit (*.pas)|*.pas', '*.pas', 'Save '+aSchema.Name+' server access unit', '', TRUE) then begin
+ with TServerUnitSchemaGenerator.Create(aSchema) do try
+ ClientUnitName := ChangeFileExt(ExtractFileName(clienttargetfilename), '');
+
+ WriteCode(servertargetfilename);
+ CurrentProject.AddFile(servertargetfilename, TRUE);
+ finally
+ Free;
+ end;
+ end;
+end;
+
+function GenFindParams(aDataset : TDADataset; AddType, UsePrefix, UseComma : boolean) : string;
+var x : integer;
+begin
+ result := '';
+ with aDataset do begin
+ for x := 0 to (Fields.Count-1) do
+ if Fields[x].InPrimaryKey then begin
+ if UsePrefix then result := result+'a'+Fields[x].Name
+ else result := result+Fields[x].Name;
+
+ if AddType
+ then result := result+': '+GetDAType(Fields[x].DataType);
+
+ if UseComma
+ then result := result+','
+ else result := result+'; ';
+ end;
+
+ if UseComma
+ then result := Copy(result, 1, Length(result)-1)
+ else result := Copy(result, 1, Length(result)-2);
+ end;
+end;
+
+function GetDAType(ad: TDADataType): string;
+begin
+ case ad of
+ datMemo: Result := 'IROStrings';
+ datBlob: Result := 'IROStream';
+ datAutoInc: Result := 'Integer';
+ datWideMemo: Result := 'WideString';
+ datLargeAutoInc: Result := 'Int64';
+ datGuid: result := 'TGuid';
+ datXml: result := 'IXmlNode';
+ datLargeUint,
+ datLargeInt: Result := 'Int64';
+ datDecimal: Result := 'TBcd';
+ datSingleFloat: Result := 'Single';
+ else
+ Result := DADataTypeNames[ad];
+ end;
+end;
+
+{ TClientUnitSchemaGenerator }
+
+procedure TClientUnitSchemaGenerator.DoWriteCode;
+var i, x : integer;
+ guid : TGUID;
+ guids : TStringList;
+ //s, s2 : string;
+ bVar: boolean;
+begin
+ guids := TStringList.Create;
+
+ with Schema do try
+ for i := 0 to (Datasets.Count-1) do begin
+ CreateGUID(guid);
+ guids.Add(GUIDToString(guid));
+ end;
+
+ Write(Format('unit %s;', [ChangeFileExt(ExtractFileName(FileName), '')]));
+ WriteEmptyLine;
+
+ Write('interface');
+ WriteEmptyLine;
+ Write('uses');
+ Write(' Classes, DB, SysUtils, uROClasses, uDADataTable, FmtBCD, uROXMLIntf;');
+
+ // Data table GUIDs
+ WriteEmptyLine;
+ Write('const');
+ Write('{ Data table rules ids', PASCAL_INDENTATION_LEVEL_1);
+ Write(' Feel free to change them to something more human readable', PASCAL_INDENTATION_LEVEL_1);
+ Write(' but make sure they are unique in the context of your application }', PASCAL_INDENTATION_LEVEL_1);
+ for i := 0 to (Datasets.Count-1) do begin
+ Write(Format('RID_%s = ''%s'';', [MakeValidIdentifier(Datasets[i].Name), guids[i]]), PASCAL_INDENTATION_LEVEL_1);
+ end;
+
+ // Data table names
+ WriteEmptyLine;
+ Write('{ Data table names }', PASCAL_INDENTATION_LEVEL_1);
+ for i := 0 to (Datasets.Count-1) do begin
+ Write(Format('nme_%s = ''%s'';', [MakeValidIdentifier(Datasets[i].Name), Datasets[i].Name]), PASCAL_INDENTATION_LEVEL_1);
+ end;
+ WriteEmptyLine;
+
+ // Data table fields
+ for i := 0 to (Datasets.Count-1) do begin
+ Write(Format('{ %s fields }', [Datasets[i].Name]), PASCAL_INDENTATION_LEVEL_1);
+ for x := 0 to (Datasets[i].Fields.Count-1) do
+ Write(Format('fld_%s%s = ''%s'';', [MakeValidIdentifier(Datasets[i].Name), Datasets[i].Fields[x].Name, Datasets[i].Fields[x].Name]), PASCAL_INDENTATION_LEVEL_1);
+ WriteEmptyLine;
+
+ Write(Format('{ %s field indexes }', [Datasets[i].Name]), PASCAL_INDENTATION_LEVEL_1);
+ for x := 0 to (Datasets[i].Fields.Count-1) do
+ Write(Format('idx_%s%s = %d;', [MakeValidIdentifier(Datasets[i].Name), MakeValidIdentifier(Datasets[i].Fields[x].Name), x]), PASCAL_INDENTATION_LEVEL_1);
+ WriteEmptyLine;
+ end;
+
+ Write('type');
+ for i := 0 to (Datasets.Count-1) do begin
+ if (Trim(Datasets[i].Description)<>'') then begin
+ Write('{', PASCAL_INDENTATION_LEVEL_1);
+ Write(Datasets[i].Description, PASCAL_INDENTATION_LEVEL_1);
+ Write('}', PASCAL_INDENTATION_LEVEL_1);
+ end;
+
+ // Base interface
+ CreateGUID(guid); // This interface is just for reference. People will use the others
+ Write(Format('{ I%s }', [MakeValidIdentifier(Datasets[i].Name)]), PASCAL_INDENTATION_LEVEL_1);
+ Write(Format('I%s = interface(IDAStronglyTypedDataTable)', [MakeValidIdentifier(Datasets[i].Name)]), PASCAL_INDENTATION_LEVEL_1);
+ Write(Format('[''%s'']', [GuidToString(guid)]), PASCAL_INDENTATION_LEVEL_1);
+
+ with Datasets[i] do begin
+ Write('{ Property getters and setters }', PASCAL_INDENTATION_LEVEL_2);
+ for x := 0 to (Fields.Count-1) do begin
+ Write(Format('function Get%sValue: %s;', [MakeValidIdentifier(Fields[x].Name), GetDAType(Fields[x].DataType)]), PASCAL_INDENTATION_LEVEL_2);
+ if not (Fields[x].DataType in [datMemo, datblob]) then
+ Write(Format('procedure Set%sValue(const aValue: %s);', [MakeValidIdentifier(Fields[x].Name), GetDAType(Fields[x].DataType)]), PASCAL_INDENTATION_LEVEL_2);
+ Write(Format('function Get%sIsNull: Boolean;', [MakeValidIdentifier(Fields[x].Name)]), PASCAL_INDENTATION_LEVEL_2);
+ Write(Format('procedure Set%sIsNull(const aValue: Boolean);', [MakeValidIdentifier(Fields[x].Name)]), PASCAL_INDENTATION_LEVEL_2);
+ end;
+
+ WriteEmptyLine;
+ {Write('// Methods', PASCAL_INDENTATION_LEVEL_2);
+
+ // Generates the Find method
+ s := GenFindParams(Datasets[i], TRUE, TRUE, FALSE);
+ if (s<>'') then Write(Format('function Find(%s; LocateOptions : TLocateOptions) : boolean;', [s]), PASCAL_INDENTATION_LEVEL_2);}
+
+ // Properties
+ WriteEmptyLine;
+ Write('{ Properties }', PASCAL_INDENTATION_LEVEL_2);
+ for x := 0 to (Fields.Count-1) do
+ begin
+ if Fields[x].DataType in [datMemo, datBlob] then
+ Write(Format('property %s: %s read Get%sValue;',
+ [MakeValidIdentifier(Fields[x].Name), GetDAType(Fields[x].DataType),
+ MakeValidIdentifier(Fields[x].Name)]), PASCAL_INDENTATION_LEVEL_2)
+ else
+ Write(Format('property %s: %s read Get%sValue write Set%sValue;',
+ [MakeValidIdentifier(Fields[x].Name), GetDAType(Fields[x].DataType),
+ MakeValidIdentifier(Fields[x].Name),
+ MakeValidIdentifier(Fields[x].Name)]), PASCAL_INDENTATION_LEVEL_2);
+ Write(Format('property %sIsNull: Boolean read Get%sIsNull write Set%sIsNull;',
+ [MakeValidIdentifier(Fields[x].Name),
+ MakeValidIdentifier(Fields[x].Name),
+ MakeValidIdentifier(Fields[x].Name)]), PASCAL_INDENTATION_LEVEL_2);
+ end;
+ end;
+ Write(Format('end;', []), PASCAL_INDENTATION_LEVEL_1);
+ WriteEmptyLine;
+
+ // Implementor class
+ Write(Format('{ T%sDataTableRules }', [MakeValidIdentifier(Datasets[i].Name)]), PASCAL_INDENTATION_LEVEL_1);
+ Write(Format('T%sDataTableRules = class(TDADataTableRules, I%s)', [MakeValidIdentifier(Datasets[i].Name),
+ MakeValidIdentifier(Datasets[i].Name)]), PASCAL_INDENTATION_LEVEL_1);
+
+ with Datasets[i] do begin
+ Write('private', PASCAL_INDENTATION_LEVEL_1);
+ for x := 0 to (Fields.Count-1) do begin
+ if Fields[x].DataType in [datMemo, datBlob] then
+ Write(Format('f_%s: %s;',[MakeValidIdentifier(Fields[x].Name), GetDAType(Fields[x].DataType)]),PASCAL_INDENTATION_LEVEL_2);
+ end;
+ for x := 0 to (Fields.Count-1) do begin
+ if Fields[x].DataType = datMemo then
+ Write(Format('procedure %s_OnChange(Sender: TObject);',[MakeValidIdentifier(Fields[x].Name)]),PASCAL_INDENTATION_LEVEL_2)
+ else
+ if Fields[x].DataType = datBlob then
+ Write(Format('procedure %s_OnChange(Sender: TObject);',[MakeValidIdentifier(Fields[x].Name)]),PASCAL_INDENTATION_LEVEL_2);
+ end;
+ Write('protected', PASCAL_INDENTATION_LEVEL_1);
+ Write('{ Property getters and setters }', PASCAL_INDENTATION_LEVEL_2);
+ for x := 0 to (Fields.Count-1) do begin
+ Write(Format('function Get%sValue: %s; virtual;', [MakeValidIdentifier(Fields[x].Name), GetDAType(Fields[x].DataType)]), PASCAL_INDENTATION_LEVEL_2);
+ if not (Fields[x].DataType in [datMemo, datBlob]) then
+ Write(Format('procedure Set%sValue(const aValue: %s); virtual;', [MakeValidIdentifier(Fields[x].Name), GetDAType(Fields[x].DataType)]), PASCAL_INDENTATION_LEVEL_2);
+ Write(Format('function Get%sIsNull: Boolean; virtual;', [MakeValidIdentifier(Fields[x].Name)]), PASCAL_INDENTATION_LEVEL_2);
+ Write(Format('procedure Set%sIsNull(const aValue: Boolean); virtual;', [MakeValidIdentifier(Fields[x].Name)]), PASCAL_INDENTATION_LEVEL_2);
+ end;
+
+ WriteEmptyLine;
+ Write('{ Properties }', PASCAL_INDENTATION_LEVEL_2);
+ for x := 0 to (Fields.Count-1) do
+ begin
+ if Fields[x].DataType in [datMemo, datBlob] then
+ Write(Format('property %s: %s read Get%sValue;',
+ [MakeValidIdentifier(Fields[x].Name),
+ GetDAType(Fields[x].DataType),
+ MakeValidIdentifier(Fields[x].Name)]), PASCAL_INDENTATION_LEVEL_2)
+ else
+ Write(Format('property %s: %s read Get%sValue write Set%sValue;',
+ [MakeValidIdentifier(Fields[x].Name),
+ GetDAType(Fields[x].DataType),
+ MakeValidIdentifier(Fields[x].Name),
+ MakeValidIdentifier(Fields[x].Name)]), PASCAL_INDENTATION_LEVEL_2);
+ Write(Format('property %sIsNull: Boolean read Get%sIsNull write Set%sIsNull;',
+ [MakeValidIdentifier(Fields[x].Name),
+ MakeValidIdentifier(Fields[x].Name),
+ MakeValidIdentifier(Fields[x].Name)]), PASCAL_INDENTATION_LEVEL_2);
+ end;
+
+ WriteEmptyLine;
+ {Write('procedure Validate; override;', PASCAL_INDENTATION_LEVEL_3);
+ WriteEmptyLine;}
+
+ Write('public', PASCAL_INDENTATION_LEVEL_1);
+ Write('constructor Create(aDataTable: TDADataTable); override;', PASCAL_INDENTATION_LEVEL_2);
+ Write('destructor Destroy; override;', PASCAL_INDENTATION_LEVEL_2);
+ WriteEmptyLine;
+
+ // Generates the Find method
+ {s := GenFindParams(Datasets[i], TRUE, TRUE, FALSE);
+ if (s<>'') then Write(Format('function Find(%s; LocateOptions : TLocateOptions) : boolean;', [s]), PASCAL_INDENTATION_LEVEL_2);}
+ end;
+
+ Write(Format('end;', []), PASCAL_INDENTATION_LEVEL_1);
+ WriteEmptyLine;
+ end;
+
+ Write('implementation');
+ WriteEmptyLine;
+ Write('uses Variants, uROBinaryHelpers;');
+ WriteEmptyLine;
+
+ for i := 0 to (Datasets.Count-1) do begin
+ // Implementor class
+ Write(Format('{ T%sDataTableRules }', [MakeValidIdentifier(Datasets[i].Name)]));
+
+ with Datasets[i] do begin
+ Write(Format('constructor T%sDataTableRules.Create(aDataTable: TDADataTable);', [MakeValidIdentifier(Name)]));
+ bVar:=False;
+
+ // create StrList
+ for x := 0 to (Fields.Count-1) do begin
+ if Fields[x].DataType = datMemo then begin
+ if not bVar then begin
+ Write('var');
+ bVar:=True;
+ end;
+ Write(' StrList: TStringList;');
+ Break;
+ end;
+ end;
+
+ // create ROStream
+ for x := 0 to (Fields.Count-1) do begin
+ if Fields[x].DataType = datBlob then begin
+ if not bVar then begin
+ Write('var');
+ end;
+ Write(' ROStream: TROStream;');
+ Break;
+ end;
+ end;
+
+ Write('begin');
+ Write(' inherited;');
+ for x := 0 to (Fields.Count-1) do begin
+ if Fields[x].DataType = datMemo then begin
+ WriteEmptyLine;
+ Write(' StrList := TStringList.Create;');
+ Write(Format(' StrList.OnChange := %s_OnChange;', [MakeValidIdentifier(Fields[x].Name)]));
+ Write(Format(' f_%s := NewROStrings(StrList,True);', [MakeValidIdentifier(Fields[x].Name)]));
+ end else
+ if Fields[x].DataType = datBlob then begin
+ WriteEmptyLine;
+ Write(' ROStream := TROStream.Create;');
+ Write(Format(' ROStream.OnChange := %s_OnChange;', [MakeValidIdentifier(Fields[x].Name)]));
+ Write(Format(' f_%s := ROStream;', [MakeValidIdentifier(Fields[x].Name)]));
+ end;
+ end;
+ Write('end;');
+ WriteEmptyLine;
+
+ Write(Format('destructor T%sDataTableRules.Destroy;', [MakeValidIdentifier(Name)]));
+ Write('begin');
+ Write(' inherited;');
+ Write('end;');
+ WriteEmptyLine;
+
+ // Generates the Find method body
+ {s := GenFindParams(Datasets[i], TRUE, TRUE, FALSE);
+ if (s<>'') then begin
+ Write(Format('function T%s.Find(%s; LocateOptions : TLocateOptions) : boolean;', [Name, s]));
+ Write('begin');
+ s := GenFindParams(Datasets[i], FALSE, FALSE, TRUE);
+ s2 := GenFindParams(Datasets[i], FALSE, TRUE, TRUE);
+ if (Pos(',', s2)=0)
+ then Write(Format('result := DataTable.Locate(''%s'', %s, LocateOptions);', [s, s2]), PASCAL_INDENTATION_LEVEL_1)
+ else Write(Format('result := DataTable.Locate(''%s'', VarArrayOf([%s]), LocateOptions);', [s, s2]), PASCAL_INDENTATION_LEVEL_1);
+
+ Write('end;');
+ WriteEmptyLine;
+ end;}
+
+ {Write(Format('procedure T%s.Validate;', [Name]));
+ Write('begin');
+ Write('end;');
+ WriteEmptyLine;}
+
+
+ {ToDo: -cDA3 improve handling of Memos (and possibly Blobs, too), so that assignments to the returned
+ IROStream (ie MyField.Text := 'Hello') get carried back to the field data properly.
+ currently, the onmly way to chage the field is to actually assign a new IROStream to
+ the property via "MyField := ...", which is NOT GOOD.}
+
+ for x := 0 to (Fields.Count-1) do begin
+ if Fields[x].DataType = datMemo then begin
+ Write(Format('procedure T%sDataTableRules.%s_OnChange(Sender: TObject);', [MakeValidIdentifier(Name), MakeValidIdentifier(Fields[x].Name)]));
+ Write('begin');
+ Write(Format(' if DataTable.Editing then DataTable.Fields[idx_%s%s].AsVariant := TStringList(Sender).Text;', [MakeValidIdentifier(Datasets[i].Name), MakeValidIdentifier(Datasets[i].Fields[x].Name), GetDAType(Fields[x].DataType)]));
+ Write('end;');
+ WriteEmptyLine;
+ end else
+ if Fields[x].DataType = datBlob then begin
+ Write(Format('procedure T%sDataTableRules.%s_OnChange(Sender: TObject);', [MakeValidIdentifier(Name), MakeValidIdentifier(Fields[x].Name)]));
+ Write('begin');
+ Write(Format(' if DataTable.Editing then DataTable.Fields[idx_%s%s].LoadFromStream(TROStream(Sender));', [MakeValidIdentifier(Datasets[i].Name), MakeValidIdentifier(Datasets[i].Fields[x].Name), GetDAType(Fields[x].DataType)]));
+ Write('end;');
+ WriteEmptyLine;
+ end;
+ end;
+
+ for x := 0 to (Fields.Count-1) do begin
+ Write(Format('function T%sDataTableRules.Get%sValue: %s;', [MakeValidIdentifier(Name), MakeValidIdentifier(Fields[x].Name), GetDAType(Fields[x].DataType)]));
+ Write('begin');
+ case Fields[x].DataType of { }
+ datMemo:begin
+ Write(Format(' result := f_%s;',[MakeValidIdentifier(Fields[x].Name)]));
+ Write(Format(' result.Text := DataTable.Fields[idx_%s%s].AsString;', [MakeValidIdentifier(Datasets[i].Name), MakeValidIdentifier(Datasets[i].Fields[x].Name)]));
+ end;
+ datBlob:begin
+ Write(Format(' result := f_%s;',[MakeValidIdentifier(Fields[x].Name)]));
+ Write(' result.Position := 0;');
+ Write(' if not Result.InUpdateMode then begin');
+ Write(Format(' DataTable.Fields[idx_%s%s].SaveToStream(result);', [MakeValidIdentifier(Datasets[i].Name), MakeValidIdentifier(Datasets[i].Fields[x].Name)]));
+ Write(' result.Position := 0;');
+ Write(' end;');
+ end;
+ else
+ Write(Format(' result := DataTable.Fields[idx_%s%s].As%s;', [MakeValidIdentifier(Datasets[i].Name), MakeValidIdentifier(Datasets[i].Fields[x].Name), GetDATypeMethod(Fields[x].DataType)]));
+ end; { case }
+ Write('end;');
+ WriteEmptyLine;
+
+ if not (Fields[x].DataType in [datMemo, datBlob]) then begin
+ Write(Format('procedure T%sDataTableRules.Set%sValue(const aValue: %s);', [MakeValidIdentifier(Name), MakeValidIdentifier(Fields[x].Name), GetDAType(Fields[x].DataType)]));
+ Write('begin');
+ Write(Format(' DataTable.Fields[idx_%s%s].As%s := aValue;', [MakeValidIdentifier(Datasets[i].Name), MakeValidIdentifier(Datasets[i].Fields[x].Name), GetDATypeMethod(Fields[x].DataType)]));
+ Write('end;');
+ WriteEmptyLine;
+ end;
+
+ Write(Format('function T%sDataTableRules.Get%sIsNull: boolean;', [MakeValidIdentifier(Name), MakeValidIdentifier(Fields[x].Name)]));
+ Write('begin');
+ Write(Format(' result := DataTable.Fields[idx_%s%s].IsNull;', [MakeValidIdentifier(Datasets[i].Name), MakeValidIdentifier(Datasets[i].Fields[x].Name)]));
+ Write('end;');
+ WriteEmptyLine;
+
+
+ Write(Format('procedure T%sDataTableRules.Set%sIsNull(const aValue: Boolean);', [MakeValidIdentifier(Name), MakeValidIdentifier(Fields[x].Name)]));
+ Write('begin');
+ Write(' if aValue then');
+ Write(Format(' DataTable.Fields[idx_%s%s].AsVariant := Null;', [MakeValidIdentifier(Datasets[i].Name), MakeValidIdentifier(Datasets[i].Fields[x].Name)]));
+ Write('end;');
+ WriteEmptyLine;
+ end;
+ end;
+
+ WriteEmptyLine;
+ end;
+
+ Write('initialization');
+ for i := 0 to (Datasets.Count-1) do
+ Write(Format('RegisterDataTableRules(RID_%s, T%sDataTableRules);', [MakeValidIdentifier(Datasets[i].Name), MakeValidIdentifier(Datasets[i].Name)]), PASCAL_INDENTATION_LEVEL_1);
+
+ WriteEmptyLine;
+ Write('end.');
+ finally
+ guids.Free;
+ end;
+end;
+
+{ TServerUnitSchemaGenerator }
+
+procedure TServerUnitSchemaGenerator.DoWriteCode;
+var i, x : integer;
+ guid : TGUID;
+ guids : TStringList;
+ //s, s2 : string;
+ bVar: Boolean;
+begin
+ guids := TStringList.Create;
+
+ with Schema do try
+ for i := 0 to (Datasets.Count-1) do begin
+ CreateGUID(guid);
+ guids.Add(GUIDToString(guid));
+ end;
+
+ Write(Format('unit %s;', [ChangeFileExt(ExtractFileName(FileName), '')]));
+ WriteEmptyLine;
+
+ Write('interface');
+ WriteEmptyLine;
+ Write('uses');
+ Write(Format(' Classes, DB, SysUtils, uROClasses, uDADataTable, uDABusinessProcessor, FmtBCD, uROXMLIntf, %s;', [ClientUnitName]));
+
+ // Data table GUIDs
+ WriteEmptyLine;
+ Write('const');
+ Write('{ Delta rules ids ', PASCAL_INDENTATION_LEVEL_1);
+ Write(' Feel free to change them to something more human readable', PASCAL_INDENTATION_LEVEL_1);
+ Write(' but make sure they are unique in the context of your application }', PASCAL_INDENTATION_LEVEL_1);
+ for i := 0 to (Datasets.Count-1) do begin
+ Write(Format('RID_%sDelta = ''%s'';', [MakeValidIdentifier(Datasets[i].Name), guids[i]]), PASCAL_INDENTATION_LEVEL_1);
+ end;
+ WriteEmptyLine;
+
+ Write('type');
+ for i := 0 to (Datasets.Count-1) do begin
+ // Business delta change
+ Write(Format('{ I%sDelta }', [MakeValidIdentifier(Datasets[i].Name)]), PASCAL_INDENTATION_LEVEL_1);
+ Write(Format('I%sDelta = interface(I%s)', [MakeValidIdentifier(Datasets[i].Name), MakeValidIdentifier(Datasets[i].Name)]), PASCAL_INDENTATION_LEVEL_1);
+ Write(Format('[''%s'']', [guids[i]]), PASCAL_INDENTATION_LEVEL_1);
+
+ with Datasets[i] do begin
+ Write('{ Property getters and setters }', PASCAL_INDENTATION_LEVEL_2);
+ for x := 0 to (Fields.Count-1) do begin
+ Write(Format('function GetOld%sValue : %s;', [MakeValidIdentifier(Fields[x].Name), GetDAType(Fields[x].DataType)]), PASCAL_INDENTATION_LEVEL_2);
+ end;
+ WriteEmptyLine;
+
+ // Properties
+ Write('{ Properties }', PASCAL_INDENTATION_LEVEL_2);
+ for x := 0 to (Fields.Count-1) do
+ Write(Format('property Old%s : %s read GetOld%sValue;',
+ [MakeValidIdentifier(Fields[x].Name),
+ GetDAType(Fields[x].DataType),
+ MakeValidIdentifier(Fields[x].Name),
+ MakeValidIdentifier(Fields[x].Name)]), PASCAL_INDENTATION_LEVEL_2);
+
+ Write(Format('end;', []), PASCAL_INDENTATION_LEVEL_1);
+ end;
+ WriteEmptyLine;
+
+ // Implementor class
+ Write(Format('{ T%sBusinessProcessorRules }', [MakeValidIdentifier(Datasets[i].Name)]), PASCAL_INDENTATION_LEVEL_1);
+ Write(Format('T%sBusinessProcessorRules = class(TDABusinessProcessorRules, I%s, I%sDelta)', [MakeValidIdentifier(Datasets[i].Name), MakeValidIdentifier(Datasets[i].Name), MakeValidIdentifier(Datasets[i].Name)]), PASCAL_INDENTATION_LEVEL_1);
+
+ with Datasets[i] do begin
+ Write('private', PASCAL_INDENTATION_LEVEL_1);
+ for x := 0 to (Fields.Count-1) do begin
+ if Fields[x].DataType in [datMemo, datBlob] then
+ Write(Format('f_%s: %s;',[MakeValidIdentifier(Fields[x].Name), GetDAType(Fields[x].DataType)]),PASCAL_INDENTATION_LEVEL_2);
+ end;
+ for x := 0 to (Fields.Count-1) do begin
+ if Fields[x].DataType = datMemo then
+ Write(Format('procedure %s_OnChange(Sender: TObject);',[MakeValidIdentifier(Fields[x].Name)]),PASCAL_INDENTATION_LEVEL_2)
+ else
+ if Fields[x].DataType = datBlob then
+ Write(Format('procedure %s_OnChange(Sender: Tobject);',[MakeValidIdentifier(Fields[x].Name)]),PASCAL_INDENTATION_LEVEL_2);
+ end;
+ Write('protected', PASCAL_INDENTATION_LEVEL_1);
+ Write('{ Property getters and setters }', PASCAL_INDENTATION_LEVEL_2);
+ for x := 0 to (Fields.Count-1) do begin
+ Write(Format('function Get%sValue: %s; virtual;', [MakeValidIdentifier(Fields[x].Name), GetDAType(Fields[x].DataType)]), PASCAL_INDENTATION_LEVEL_2);
+ Write(Format('function Get%sIsNull: Boolean; virtual;', [MakeValidIdentifier(Fields[x].Name)]), PASCAL_INDENTATION_LEVEL_2);
+ Write(Format('function GetOld%sValue: %s; virtual;', [MakeValidIdentifier(Fields[x].Name), GetDAType(Fields[x].DataType)]), PASCAL_INDENTATION_LEVEL_2);
+ Write(Format('function GetOld%sIsNull: Boolean; virtual;', [MakeValidIdentifier(Fields[x].Name)]), PASCAL_INDENTATION_LEVEL_2);
+ if not(Fields[x].DataType in [datMemo, datBlob]) then
+ Write(Format('procedure Set%sValue(const aValue: %s); virtual;', [MakeValidIdentifier(Fields[x].Name), GetDAType(Fields[x].DataType)]), PASCAL_INDENTATION_LEVEL_2);
+ Write(Format('procedure Set%sIsNull(const aValue: Boolean); virtual;', [MakeValidIdentifier(Fields[x].Name)]), PASCAL_INDENTATION_LEVEL_2);
+ end;
+
+ WriteEmptyLine;
+ Write('{ Properties }', PASCAL_INDENTATION_LEVEL_2);
+ for x := 0 to (Fields.Count-1) do begin
+ if (Fields[x].DataType in [datMemo, datBlob]) then
+ Write(Format('property %s : %s read Get%sValue;',
+ [MakeValidIdentifier(Fields[x].Name),
+ GetDAType(Fields[x].DataType),
+ MakeValidIdentifier(Fields[x].Name)]), PASCAL_INDENTATION_LEVEL_2)
+ else
+ Write(Format('property %s : %s read Get%sValue write Set%sValue;',
+ [MakeValidIdentifier(Fields[x].Name),
+ GetDAType(Fields[x].DataType),
+ MakeValidIdentifier(Fields[x].Name),
+ MakeValidIdentifier(Fields[x].Name)]), PASCAL_INDENTATION_LEVEL_2);
+ Write(Format('property %sIsNull : Boolean read Get%sIsNull write Set%sIsNull;',
+ [MakeValidIdentifier(Fields[x].Name),
+ MakeValidIdentifier(Fields[x].Name),
+ MakeValidIdentifier(Fields[x].Name)]), PASCAL_INDENTATION_LEVEL_2);
+ Write(Format('property Old%s : %s read GetOld%sValue;',
+ [MakeValidIdentifier(Fields[x].Name),
+ GetDAType(Fields[x].DataType),
+ MakeValidIdentifier(Fields[x].Name),
+ MakeValidIdentifier(Fields[x].Name)]), PASCAL_INDENTATION_LEVEL_2);
+ Write(Format('property Old%sIsNull : Boolean read GetOld%sIsNull;',
+ [MakeValidIdentifier(Fields[x].Name),
+ MakeValidIdentifier(Fields[x].Name),
+ MakeValidIdentifier(Fields[x].Name)]), PASCAL_INDENTATION_LEVEL_2);
+ end;
+
+ WriteEmptyLine;
+
+ Write('public', PASCAL_INDENTATION_LEVEL_1);
+ Write('constructor Create(aBusinessProcessor: TDABusinessProcessor); override;', PASCAL_INDENTATION_LEVEL_2);
+ Write('destructor Destroy; override;', PASCAL_INDENTATION_LEVEL_2);
+ WriteEmptyLine;
+
+ // Generates the Find method
+ {s := GenFindParams(Datasets[i], TRUE, TRUE, FALSE);
+ if (s<>'') then Write(Format('function Find(%s; LocateOptions : TLocateOptions) : boolean;', [s]), PASCAL_INDENTATION_LEVEL_2);}
+ end;
+
+ Write(Format('end;', []), PASCAL_INDENTATION_LEVEL_1);
+ WriteEmptyLine;
+ end;
+
+ Write('implementation');
+ WriteEmptyLine;
+ Write('uses');
+ Write(' Variants, uROBinaryHelpers, uDAInterfaces;');
+ WriteEmptyLine;
+
+ for i := 0 to (Datasets.Count-1) do begin
+ // Implementor class
+ Write(Format('{ T%sBusinessProcessorRules }', [MakeValidIdentifier(Datasets[i].Name)]));
+
+ with Datasets[i] do begin
+ Write(Format('constructor T%sBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);', [MakeValidIdentifier(Name)]));
+ bVar:=False;
+
+ // create StrList
+ for x := 0 to (Fields.Count-1) do begin
+ if Fields[x].DataType = datMemo then begin
+ if not bVar then begin
+ Write('var');
+ bVar:=True;
+ end;
+ Write(' StrList: TStringList;');
+ Break;
+ end;
+ end;
+
+ // create ROStream
+ for x := 0 to (Fields.Count-1) do begin
+ if Fields[x].DataType = datBlob then begin
+ if not bVar then begin
+ Write('var');
+ end;
+ Write(' ROStream: TROStream;');
+ Break;
+ end;
+ end;
+
+ Write('begin');
+ Write(' inherited;');
+ for x := 0 to (Fields.Count-1) do begin
+ if Fields[x].DataType = datMemo then begin
+ WriteEmptyLine;
+ Write(' StrList := TStringList.Create;');
+ Write(Format(' StrList.OnChange := %s_OnChange;', [MakeValidIdentifier(Fields[x].Name)]));
+ Write(Format(' f_%s := NewROStrings(StrList,True);', [MakeValidIdentifier(Fields[x].Name)]));
+ end else
+ if Fields[x].DataType = datBlob then begin
+ WriteEmptyLine;
+ Write(' ROStream := TROStream.Create;');
+ Write(Format(' ROStream.OnChange := %s_OnChange;', [MakeValidIdentifier(Fields[x].Name)]));
+ Write(Format(' f_%s := ROStream;', [MakeValidIdentifier(Fields[x].Name)]));
+ end;
+ end;
+ Write('end;');
+ WriteEmptyLine;
+
+ Write(Format('destructor T%sBusinessProcessorRules.Destroy;', [MakeValidIdentifier(Name)]));
+ Write('begin');
+ Write(' inherited;');
+ Write('end;');
+ WriteEmptyLine;
+
+ for x := 0 to (Fields.Count-1) do begin
+ if Fields[x].DataType = datMemo then begin
+ Write(Format('procedure T%sBusinessProcessorRules.%s_OnChange(Sender: TObject);', [MakeValidIdentifier(Name), MakeValidIdentifier(Fields[x].Name)]));
+ Write('begin');
+ Write(Format(' BusinessProcessor.CurrentChange.NewValueByName[fld_%s%s] := TStringList(Sender).Text;', [MakeValidIdentifier(Datasets[i].Name), MakeValidIdentifier(Datasets[i].Fields[x].Name)]));
+ Write('end;');
+ WriteEmptyLine;
+ end else
+ if Fields[x].DataType = datBlob then begin
+ Write(Format('procedure T%sBusinessProcessorRules.%s_OnChange(Sender: TObject);', [MakeValidIdentifier(Name), MakeValidIdentifier(Fields[x].Name)]));
+ Write('begin');
+ Write(Format(' BusinessProcessor.CurrentChange.NewValueByName[fld_%s%s] := VariantBinaryFromBinary((TROStream(Sender) as IROStream).Stream);', [MakeValidIdentifier(Datasets[i].Name), MakeValidIdentifier(Datasets[i].Fields[x].Name)]));
+ Write('end;');
+ WriteEmptyLine;
+ end;
+ end;
+
+ for x := 0 to (Fields.Count-1) do begin
+ Write(Format('function T%sBusinessProcessorRules.Get%sValue: %s;', [MakeValidIdentifier(Name), MakeValidIdentifier(Fields[x].Name), GetDAType(Fields[x].DataType)]));
+ Write('begin');
+ case Fields[x].DataType of
+ datMemo:begin
+ Write(Format(' result := f_%s;',[MakeValidIdentifier(Fields[x].Name)]));
+ Write(Format(' result.Text := BusinessProcessor.CurrentChange.NewValueByName[fld_%s%s];', [MakeValidIdentifier(Datasets[i].Name), MakeValidIdentifier(Datasets[i].Fields[x].Name)]));
+ end;
+ datBlob:begin
+ Write(Format(' result := f_%s;',[MakeValidIdentifier(Fields[x].Name)]));
+ Write(' result.Position := 0;');
+ Write(' if not Result.InUpdateMode then begin');
+ Write(Format(' WriteVariantBinaryToBinary(BusinessProcessor.CurrentChange.NewValueByName[fld_%s%s], result.Stream);', [MakeValidIdentifier(Datasets[i].Name), MakeValidIdentifier(Datasets[i].Fields[x].Name)]));
+ Write(' result.Position := 0;');
+ Write(' end;');
+ end;
+ datDecimal: begin
+ Write(Format(' result := GetVarDecimal(BusinessProcessor.CurrentChange.NewValueByName[fld_%s%s]);', [MakeValidIdentifier(Datasets[i].Name), MakeValidIdentifier(Datasets[i].Fields[x].Name), GetDAType(Fields[x].DataType)]));
+ end;
+ datXml: begin
+ Write(Format(' result := GetVarXml(BusinessProcessor.CurrentChange.NewValueByName[fld_%s%s]);', [MakeValidIdentifier(Datasets[i].Name), MakeValidIdentifier(Datasets[i].Fields[x].Name), GetDAType(Fields[x].DataType)]));
+ end;
+ datGuid: begin
+ Write(Format(' result := GetVarGuid(BusinessProcessor.CurrentChange.NewValueByName[fld_%s%s]);', [MakeValidIdentifier(Datasets[i].Name), MakeValidIdentifier(Datasets[i].Fields[x].Name), GetDAType(Fields[x].DataType)]));
+ end;
+ else begin
+ Write(Format(' result := BusinessProcessor.CurrentChange.NewValueByName[fld_%s%s];', [MakeValidIdentifier(Datasets[i].Name), MakeValidIdentifier(Datasets[i].Fields[x].Name), GetDAType(Fields[x].DataType)]));
+ end;
+ end;
+ Write('end;');
+ WriteEmptyLine;
+
+ Write(Format('function T%sBusinessProcessorRules.Get%sIsNull: Boolean;', [MakeValidIdentifier(Name), MakeValidIdentifier(Fields[x].Name)]));
+ Write('begin');
+ Write(Format(' result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_%s%s]);', [MakeValidIdentifier(Datasets[i].Name), MakeValidIdentifier(Datasets[i].Fields[x].Name)]));
+ Write('end;');
+ WriteEmptyLine;
+
+ Write(Format('function T%sBusinessProcessorRules.GetOld%sValue: %s;', [MakeValidIdentifier(Name), MakeValidIdentifier(Fields[x].Name), GetDAType(Fields[x].DataType)]));
+ Write('begin');
+ case Fields[x].DataType of
+ datMemo:begin
+ Write(' result := NewROStrings();');
+ Write(Format(' result.Text := BusinessProcessor.CurrentChange.OldValueByName[fld_%s%s];', [MakeValidIdentifier(Datasets[i].Name), MakeValidIdentifier(Datasets[i].Fields[x].Name)]));
+ end;
+ datBlob:begin
+ Write(' result := NewROStream();');
+ Write(Format(' WriteVariantBinaryToBinary(BusinessProcessor.CurrentChange.OldValueByName[fld_%s%s], result.Stream);', [MakeValidIdentifier(Datasets[i].Name), MakeValidIdentifier(Datasets[i].Fields[x].Name)]));
+ end;
+ datDecimal: begin
+ Write(Format(' result := GetVarDecimal(BusinessProcessor.CurrentChange.OldValueByName[fld_%s%s]);', [MakeValidIdentifier(Datasets[i].Name), MakeValidIdentifier(Datasets[i].Fields[x].Name), GetDAType(Fields[x].DataType)]));
+ end;
+ datXml: begin
+ Write(Format(' result := GetVarXml(BusinessProcessor.CurrentChange.OldValueByName[fld_%s%s]);', [MakeValidIdentifier(Datasets[i].Name), MakeValidIdentifier(Datasets[i].Fields[x].Name), GetDAType(Fields[x].DataType)]));
+ end;
+ datGuid: begin
+ Write(Format(' result := GetVarGuid(BusinessProcessor.CurrentChange.OldValueByName[fld_%s%s]);', [MakeValidIdentifier(Datasets[i].Name), MakeValidIdentifier(Datasets[i].Fields[x].Name), GetDAType(Fields[x].DataType)]));
+ end;
+ else begin
+ Write(Format(' result := BusinessProcessor.CurrentChange.OldValueByName[fld_%s%s];', [MakeValidIdentifier(Datasets[i].Name), MakeValidIdentifier(Datasets[i].Fields[x].Name), GetDAType(Fields[x].DataType)]));
+ end;
+ end;
+ Write('end;');
+ WriteEmptyLine;
+
+ Write(Format('function T%sBusinessProcessorRules.GetOld%sIsNull: Boolean;', [MakeValidIdentifier(Name), MakeValidIdentifier(Fields[x].Name)]));
+ Write('begin');
+ Write(Format(' result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_%s%s]);', [MakeValidIdentifier(Datasets[i].Name), MakeValidIdentifier(Datasets[i].Fields[x].Name)]));
+ Write('end;');
+ WriteEmptyLine;
+
+ if not(Fields[x].DataType in [datMemo, datBlob]) then begin
+ Write(Format('procedure T%sBusinessProcessorRules.Set%sValue(const aValue: %s);', [MakeValidIdentifier(Name), MakeValidIdentifier(Fields[x].Name), GetDAType(Fields[x].DataType)]));
+ Write('begin');
+ case Fields[x].DataType of
+ datDecimal: begin
+ Write(Format(' BusinessProcessor.CurrentChange.NewValueByName[fld_%s%s] := BCDToVariant(aValue);', [MakeValidIdentifier(Datasets[i].Name), MakeValidIdentifier(Datasets[i].Fields[x].Name), GetDAType(Fields[x].DataType)]));
+ end;
+ datXml: begin
+ Write( ' if aValue = nil then');
+ Write(Format(' BusinessProcessor.CurrentChange.NewValueByName[fld_%s%s] := ''''', [MakeValidIdentifier(Datasets[i].Name), MakeValidIdentifier(Datasets[i].Fields[x].Name), GetDAType(Fields[x].DataType)]));
+ Write( ' else');
+ Write(Format(' BusinessProcessor.CurrentChange.NewValueByName[fld_%s%s] := aValue.XML;', [MakeValidIdentifier(Datasets[i].Name), MakeValidIdentifier(Datasets[i].Fields[x].Name), GetDAType(Fields[x].DataType)]));
+ end;
+ datGuid: begin
+ Write(Format(' BusinessProcessor.CurrentChange.NewValueByName[fld_%s%s] := GUIDToString(aValue);', [MakeValidIdentifier(Datasets[i].Name), MakeValidIdentifier(Datasets[i].Fields[x].Name), GetDAType(Fields[x].DataType)]));
+ end;
+ else
+ Write(Format(' BusinessProcessor.CurrentChange.NewValueByName[fld_%s%s] := aValue;', [MakeValidIdentifier(Datasets[i].Name), MakeValidIdentifier(Datasets[i].Fields[x].Name), GetDAType(Fields[x].DataType)]));
+ end;
+ Write('end;');
+ WriteEmptyLine;
+ end;
+
+ Write(Format('procedure T%sBusinessProcessorRules.Set%sIsNull(const aValue: Boolean);', [MakeValidIdentifier(Name), MakeValidIdentifier(Fields[x].Name)]));
+ Write('begin');
+ write(' if aValue then');
+ Write(Format(' BusinessProcessor.CurrentChange.NewValueByName[fld_%s%s] := Null;', [MakeValidIdentifier(Datasets[i].Name), MakeValidIdentifier(Datasets[i].Fields[x].Name)]));
+ Write('end;');
+ WriteEmptyLine;
+ end;
+ end;
+
+ WriteEmptyLine;
+ end;
+
+ Write('initialization');
+ for i := 0 to (Datasets.Count-1) do
+ Write(Format('RegisterBusinessProcessorRules(RID_%sDelta, T%sBusinessProcessorRules);', [MakeValidIdentifier(Datasets[i].Name), MakeValidIdentifier(Datasets[i].Name)]), PASCAL_INDENTATION_LEVEL_1);
+
+ WriteEmptyLine;
+ Write('end.');
+ finally
+ guids.Free;
+ end;
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDASelectDataTablesForm.dfm b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDASelectDataTablesForm.dfm
new file mode 100644
index 0000000..b4cd836
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDASelectDataTablesForm.dfm
@@ -0,0 +1,209 @@
+object DASelectDataTablesForm: TDASelectDataTablesForm
+ Left = 312
+ Top = 219
+ Width = 275
+ Height = 426
+ HorzScrollBar.Range = 59
+ ActiveControl = btn_Ok
+ AutoScroll = False
+ BorderWidth = 5
+ Caption = 'Select Data Tables...'
+ Color = clBtnFace
+ Constraints.MinHeight = 300
+ Constraints.MinWidth = 275
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Pitch = fpVariable
+ Font.Style = []
+ Icon.Data = {
+ 0000010002001010000001000800680500002600000010100000010020006804
+ 00008E0500002800000010000000200000000100080000000000000100000000
+ 000000000000000100000001000000000000A84A0300AE500600D2761800C777
+ 2900CA792C0089815D00B28B5D00CC895100DEA25A00D59E6F00DEAA6A002778
+ 9100FF00FF001182AB001E93BE003F9EBC00609592006D9B9A0044B3BE0063BB
+ BC0067B9BD0026A3D10056ADC60043B2CC0048BCCF005BB7D20055BBD70066BB
+ CF006DBCCF003ECAE60023D5FC005ACADD007BD1DE0055D0E90055D8F00050DC
+ F20054DAF40052DDF9006BCEE7004DE2FA009EBBA10093C1BA009AD5CA008ED8
+ DE0099F1ED008CEAF70086F3F80090F2F40099F9F700A2F3EE00A2FAF800AAFA
+ F800B8F8FB00C3FBFA00CCFBFC00E8FEFD000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000FFFFFF000000000000000000000E0E0E0E0E00000000
+ 0000000000000E241F262E270E00000000000000010101011F262E27160E0000
+ 0E0E0E0E010A0B011F262E27160E000E281F0601050908011F262E27160E0E2F
+ 281F0103040101011710171D1A0E0E2F281F0102010C11191F262E1B0F0E0E2F
+ 281F152A270E2F281F262E27160E0E211C1710171D0E2F1513262E27160E0E18
+ 1E1F262C120C010201242E27160E0E2F281F26010101040301293130220E0E2F
+ 281F240108090501073231310E000E2F281F20010B0A010E0E0E0E0E00000E37
+ 35342B0101010100000000000000000E3836332D2D0E00000000000000000000
+ 0E0E0E0E0E000000000000000000FF830000FF010000FC000000C00000008000
+ 0000000000000000000000000000000000000000000000000000000100000003
+ 0000007F000080FF0000C1FF0000280000001000000020000000010020000000
+ 0000400400000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000001182AB401182ABFF1182
+ ABFF1182ABFF1182ABFF1182ABFF1182AB400000000000000000000000000000
+ 00000000000000000000000000009932003D1182AB401182ABFF50DCF2FF23D5
+ FCFF52DEFAFF8CEAF7FF6BCEE7FF1182ABFF1182AB4000000000000000000000
+ 0000000000000000000000000000A84A03FFA84A03FFA84A03FFA84A03FF23D5
+ FCFF52DEFAFF8CEAF7FF6BCEE7FF26A3D1FF1182ABFF000000001182AB401182
+ ABFF1182ABFF1182ABFF498A96FFA84A03FFD59E6FFFDEAA6AFFA84A03FF23D5
+ FCFF52DEFAFF8CEAF7FF6BCEE7FF26A3D1FF1182ABFF1182AB401182ABFF4DE2
+ FAFF23D5FCFF89815DFFA84A03FFCA792CFFDEA25AFFCC8951FFA84A03FF23D5
+ FCFF52DEFAFF8CEAF7FF6BCEE7FF26A3D1FF1182ABFF1182ABFF86F3F8FF4DE2
+ FAFF23D5FCFFA84A03FFD27618FFC77729FFA84A03FFA84A03FFA84A03FF56AD
+ C6FF3F9EBCFF56ADC6FF6DBCCFFF5BB7D2FF1182ABFF1182ABFF86F3F8FF4DE2
+ FAFF23D5FCFFA84A03FFAE5006FFA84A03FF277890FF609592FF48BCCFFF23D5
+ FCFF52DEFAFF8CEAF7FF55BBD7FF1E93BEFF1182ABFF1182ABFF86F3F8FF4DE2
+ FAFF23D5FCFF67B9BDFF93C1BAFF6BCEE7FF1182ABFF86F3F8FF4DE2FAFF23D5
+ FCFF52DEFAFF8CEAF7FF6BCEE7FF26A3D1FF1182ABFF1182ABFF7BD1DEFF66BB
+ CFFF56ADC6FF3F9EBCFF56ADC6FF6DBCCFFF1182ABFF86F3F8FF63BBBCFF44B3
+ BEFF52DEFAFF8CEAF7FF6BCEE7FF26A3D1FF1182ABFF1182ABFF43B2CCFF3ECA
+ E6FF23D5FCFF52DEFAFF8ED8DEFF6D9B9AFF277992FFA84A03FFAE5006FFA84A
+ 03FF55D8F0FF8CEAF7FF6BCEE7FF26A3D1FF1182ABFF1182ABFF86F3F8FF4DE2
+ FAFF23D5FCFF52DDF9FFA84A03FFA84A03FFA84A03FFC77729FFD27618FFA84A
+ 03FF9EBBA1FF99F9F7FF90F2F4FF55D0E9FF1182ABFF1182ABFF86F3F8FF4DE2
+ FAFF23D5FCFF54DAF4FFA84A03FFCC8951FFDEA25AFFCA792CFFA84A03FFB28B
+ 5DFFA2F3EEFF99F9F7FF99F9F7FF1182ABFF1182AB401182ABFF86F3F8FF4DE2
+ FAFF23D5FCFF5ACADDFFA84A03FFDEAA6AFFD59E6FFFA84A03FF47818FFF1182
+ ABFF1182ABFF1182ABFF1182ABFF1182AB40000000001182ABFFCCFBFCFFB8F8
+ FBFFAAFAF8FF9AD5CAFFA84A03FFA84A03FFA84A03FFA84A03FF000000000000
+ 000000000000000000000000000000000000000000001182AB401182ABFFE8FE
+ FDFFC3FBFAFFA2FAF8FF99F3EFFF9AF0ECFF1182ABFF1182AB40000000000000
+ 00000000000000000000000000000000000000000000000000001182AB401182
+ ABFF1182ABFF1182ABFF1182ABFF1182ABFF1182AB4000000000000000000000
+ 00000000000000000000000000000000000000000000FF010000FC000000FC00
+ 0000800000000000000000000000000000000000000000000000000000000000
+ 00000000000000010000007F0000007F000080FF0000}
+ OldCreateOrder = True
+ Position = poScreenCenter
+ DesignSize = (
+ 249
+ 380)
+ PixelsPerInch = 96
+ TextHeight = 13
+ object btn_Ok: TBitBtn
+ Left = 94
+ Top = 354
+ Width = 75
+ Height = 25
+ Anchors = [akRight, akBottom]
+ Caption = 'OK'
+ Default = True
+ ModalResult = 1
+ TabOrder = 0
+ Glyph.Data = {
+ D6020000424DD602000000000000D60000002800000020000000100000000100
+ 08000000000000020000C30E0000C30E0000280000002800000000000000FFFF
+ FF00FF00FF0000660000149D210019AA2B00179D27001AB02D001BA92E001DB1
+ 32001EB231001FB133001EAE310022B7380021B4370025A83B0031C24F0031B5
+ 4D003BCB5E0041C5630047D36D004FD6790053DE7F00CACACA00C4C4C400BFBF
+ BF00B5B5B500ABABAB00A5A5A5009E9E9E009C9C9C009A9A9A00999999009898
+ 98009797970094949400939393008C8C8C008A8A8A0065656500020202020202
+ 0202020202020202020202020202020202020202020202020202020202020202
+ 0202020202020202020202020202020202020202020202020202020202020203
+ 030202020202020202020202020202272702020202020202020202020202030A
+ 0B03020202020202020202020202271F1F27020202020202020202020203100D
+ 070E0302020202020202020202271B1D221E270202020202020202020314120F
+ 03080903020202020202020227191A2127232027020202020202020315161103
+ 0203060C030202020202022718171C2702272521270202020202020203130302
+ 020202030503020202020202271A270202020227242702020202020202030202
+ 0202020203040302020202020227020202020202272627020202020202020202
+ 0202020202020303020202020202020202020202020227270202020202020202
+ 0202020202020203030202020202020202020202020202272702020202020202
+ 0202020202020202020202020202020202020202020202020202020202020202
+ 0202020202020202020202020202020202020202020202020202020202020202
+ 0202020202020202020202020202020202020202020202020202020202020202
+ 0202020202020202020202020202020202020202020202020202020202020202
+ 0202020202020202020202020202020202020202020202020202}
+ NumGlyphs = 2
+ end
+ object btn_Cancel: TBitBtn
+ Left = 174
+ Top = 354
+ Width = 75
+ Height = 25
+ Anchors = [akRight, akBottom]
+ Cancel = True
+ Caption = 'Cancel'
+ ModalResult = 2
+ TabOrder = 1
+ Glyph.Data = {
+ 8A030000424D8A030000000000008A0100002800000020000000100000000100
+ 08000000000000020000C30E0000C30E0000550000005500000000000000FFFF
+ FF00FF00FF004071FA004274FF00497AFC00275AFF002C5FFF003664FA00386B
+ FF00174AFD001A4CFF001B4DFF001D50FF002355FF002558FF002655FA002E5B
+ F9002D59F400325DF1003B66F3000030FC000132FF000134FF000C3CFF00103D
+ FB00103BF4001342FF001743F6001847FF001A48F9001A47F8001B46F6001D4B
+ FF001C47F6001D48F6001D49F600214EFC00204BF800204CF800224DF800224C
+ F400224DF1002550F400002CF800002DF800002CF600002AF300012DF600032B
+ F2000431FE000733F600123BF100143EF40000009A00C0C0C000BEBEBE00BBBB
+ BB00B9B9B900B6B6B600B5B5B500B3B3B300B1B1B100B0B0B000AFAFAF00AEAE
+ AE00ACACAC00ABABAB00AAAAAA00A9A9A900A8A8A800A7A7A700A6A6A600A4A4
+ A400A3A3A300A2A2A200A0A0A0009F9F9F009E9E9E009C9C9C009A9A9A009999
+ 990098989800979797006B6B6B00020202020202020202020202020202020202
+ 0202020202020202020202020202020202020202020202020202020202020202
+ 0202020202020202020202020202020202363602020202020236360202020202
+ 02545402020202020254540202020202360A1A3602020202362C153602020202
+ 54464C540202020254504F5402020202361F0B343602023630162F3602020202
+ 5447444D54020254514E5354020202020236220C3536362D1731360202020202
+ 025447434B5454504E52540202020202020236230D1932162E36020202020202
+ 02025447424A4D4E5154020202020202020202361E1B18333602020202020202
+ 0202025447474A4F54020202020202020202023625211D1C3602020202020202
+ 02020254424245495402020202020202020236110728260E2036020202020202
+ 0202543E3D434440485402020202020202360809123636290F24360202020202
+ 02543B3A415454453F4754020202020236030413360202362A06273602020202
+ 5439384054020254473E4454020202023605143602020202362B103602020202
+ 54373C5402020202544441540202020202363602020202020236360202020202
+ 0254540202020202025454020202020202020202020202020202020202020202
+ 0202020202020202020202020202020202020202020202020202020202020202
+ 0202020202020202020202020202}
+ NumGlyphs = 2
+ end
+ object lb_DataTables: TCheckListBox
+ Left = 0
+ Top = 0
+ Width = 249
+ Height = 349
+ OnClickCheck = lb_DataTablesClick
+ Align = alTop
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ ItemHeight = 13
+ TabOrder = 2
+ OnClick = lb_DataTablesClick
+ OnDblClick = lb_DataTablesClick
+ end
+ object cb_SelectAll: TCheckBox
+ Left = 0
+ Top = 355
+ Width = 65
+ Height = 12
+ Anchors = [akLeft, akBottom]
+ Caption = 'Select &All'
+ TabOrder = 3
+ OnClick = cb_SelectAllClick
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDASelectDataTablesForm.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDASelectDataTablesForm.pas
new file mode 100644
index 0000000..ea6b58a
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/IDE/uDASelectDataTablesForm.pas
@@ -0,0 +1,84 @@
+unit uDASelectDataTablesForm;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes
+ {$IFDEF WIN32}
+ ,Graphics, Controls, Forms, Dialogs, StdCtrls, CheckLst, Buttons;
+ {$ENDIF}
+ {$IFDEF LINUX}
+ , QForms, QStdCtrls, QControls, QCheckLst, QButtons;
+ {$ENDIF}
+
+type
+ TDASelectDataTablesForm = class(TForm)
+ btn_Ok: TBitBtn;
+ btn_Cancel: TBitBtn;
+ lb_DataTables: TCheckListBox;
+ cb_SelectAll: TCheckBox;
+ procedure cb_SelectAllClick(Sender: TObject);
+ procedure lb_DataTablesClick(Sender: TObject);
+ private
+ fChanging: boolean;
+ procedure SetOkButtonCaption(const Value: string);
+ public
+ procedure UpdateCheckBoxState;
+ property OkButtonCaption: string write SetOkButtonCaption;
+ end;
+
+var
+ DASelectDataTablesForm: TDASelectDataTablesForm;
+
+implementation
+
+{$R *.dfm}
+
+procedure TDASelectDataTablesForm.cb_SelectAllClick(Sender: TObject);
+var
+ i: integer;
+begin
+ if fChanging then exit;
+ fChanging := true;
+ try
+ for i := 0 to lb_DataTables.Items.Count-1 do
+ lb_DataTables.Checked[i] := cb_SelectAll.Checked;
+ finally
+ fChanging := false;
+ end;
+end;
+
+procedure TDASelectDataTablesForm.lb_DataTablesClick(Sender: TObject);
+var
+ lNone, lAll: boolean;
+ i: integer;
+begin
+ if fChanging then exit;
+ fChanging := true;
+ try
+ lNone := true;
+ lAll := true;
+ for i := 0 to lb_DataTables.Items.Count-1 do
+ if lb_DataTables.Checked[i] then
+ lNone := false
+ else
+ lAll := false;
+ if lNone then cb_SelectAll.State := cbUnchecked
+ else if lAll then cb_SelectAll.State := cbChecked
+ else cb_SelectAll.State := cbGrayed;
+ finally
+ fChanging := false;
+ end;
+end;
+
+procedure TDASelectDataTablesForm.SetOkButtonCaption(const Value: string);
+begin
+ btn_Ok.Caption := Value;
+end;
+
+procedure TDASelectDataTablesForm.UpdateCheckBoxState;
+begin
+ lb_DataTablesClick(nil);
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/MultiDbLoginServiceV5_Impl.dfm b/official/5.0.30.691/Data Abstract for Delphi/Source/MultiDbLoginServiceV5_Impl.dfm
new file mode 100644
index 0000000..27ec41e
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/MultiDbLoginServiceV5_Impl.dfm
@@ -0,0 +1,2 @@
+inherited MultiDbLoginServicev5: TMultiDbLoginServicev5
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/MultiDbLoginServiceV5_Impl.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/MultiDbLoginServiceV5_Impl.pas
new file mode 100644
index 0000000..ecb68a6
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/MultiDbLoginServiceV5_Impl.pas
@@ -0,0 +1,44 @@
+unit MultiDbLoginServiceV5_Impl;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ This is where you are supposed to code the implementation of your objects. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils,
+ {RemObjects:} uROXMLIntf, uROClientIntf, uROTypes, uROServer, uROSessions,
+ {Ancestor Implementation:} MultiDbLoginService_Impl,
+ {Generated:} DataAbstract4_Intf;
+
+type
+ { TMultiDbLoginServiceV5 }
+ TMultiDbLoginServiceV5 = class(TMultiDbLoginService)
+ private
+ protected
+ public
+ published
+ end;
+
+implementation
+
+uses
+ {Generated:} DataAbstract4_Invk;
+
+procedure Create_MultiDbLoginServiceV5(out anInstance : IUnknown);
+begin
+ anInstance := TMultiDbLoginServiceV5.Create(nil);
+end;
+
+initialization
+ TROClassFactory.Create('MultiDbLoginServiceV5', Create_MultiDbLoginServiceV5, TMultiDbLoginServiceV5_Invoker);
+
+finalization
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/MultiDbLoginService_Impl.dfm b/official/5.0.30.691/Data Abstract for Delphi/Source/MultiDbLoginService_Impl.dfm
new file mode 100644
index 0000000..5892128
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/MultiDbLoginService_Impl.dfm
@@ -0,0 +1,2 @@
+inherited MultiDbLoginService: TMultiDbLoginService
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/MultiDbLoginService_Impl.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/MultiDbLoginService_Impl.pas
new file mode 100644
index 0000000..7b150a6
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/MultiDbLoginService_Impl.pas
@@ -0,0 +1,91 @@
+unit MultiDbLoginService_Impl;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils,
+ {RemObjects:} uROClientIntf, uROTypes, uROServer, uROSessions, uDAClasses,
+ {Ancestor Implementation:} BaseLoginService_Impl,
+ {Generated:} DataAbstract4_Intf;
+
+type
+ TMultiDbLoginEvent = procedure(Sender: TObject; const aUserID, aPassword, aConnectionName: Utf8String; out aUserInfo: UserInfo; var aLoginSuccessful: boolean) of object;
+
+ { TMultiDbLoginService }
+ TMultiDbLoginService = class(TBaseLoginService, IMultiDbLoginService,IMultiDbLoginServiceV5)
+ private
+ fOnLogin: TMultiDbLoginEvent;
+ FConnectionManager: TDAConnectionManager;
+ procedure SetConnectionManager(const Value: TDAConnectionManager);
+ protected
+ { IMultiDbLoginService methods }
+ function Login(const aUserID: Utf8String; const aPassword: Utf8String; const aConnectionName: Utf8String; out aUserInfo: UserInfo): Boolean;
+ { IMultiDbLoginServiceV5 methods }
+ function GetConnectionNames: StringArray;
+ function GetDefaultConnectionName: Utf8String;
+ public
+ procedure CheckProperties;
+ published
+ property OnLogin: TMultiDbLoginEvent read fOnLogin write fOnLogin;
+ property ConnectionManager: TDAConnectionManager read FConnectionManager write SetConnectionManager;
+ end;
+
+implementation
+uses
+ uROClasses;
+{ MultiDbLoginService }
+
+procedure TMultiDbLoginService.CheckProperties;
+begin
+ Check(not assigned(ConnectionManager), Name+'.ConnectionManager must be assigned.');
+ ConnectionManager.CheckProperties;
+end;
+
+function TMultiDbLoginService.GetConnectionNames: StringArray;
+var
+ i: integer;
+begin
+ CheckProperties;
+ Result:= StringArray.Create;
+ For i:=0 to ConnectionManager.Connections.Count-1 do
+ Result.Add(AnsiToUtf8(ConnectionManager.Connections[i].Name));
+end;
+
+function TMultiDbLoginService.GetDefaultConnectionName: Utf8String;
+begin
+ CheckProperties;
+ Result := AnsiToUtf8(FConnectionManager.GetDefaultConnectionName);
+end;
+
+function TMultiDbLoginService.Login(const aUserID: Utf8String; const aPassword: Utf8String; const aConnectionName: Utf8String; out aUserInfo: UserInfo): Boolean;
+var
+ lLoginSuccessful: boolean;
+begin
+ lLoginSuccessful := false;
+ if assigned(OnLogin) then
+ OnLogin(self, aUserID, aPassword, aConnectionName, aUserInfo, lLoginSuccessful);
+ result := lLoginSuccessful;
+end;
+
+procedure TMultiDbLoginService.SetConnectionManager(const Value: TDAConnectionManager);
+begin
+ if assigned(FConnectionManager) then FConnectionManager.RemoveFreeNotification(self);
+ FConnectionManager := Value;
+ if assigned(FConnectionManager) then FConnectionManager.FreeNotification(self);
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/SimpleLoginService_Impl.dfm b/official/5.0.30.691/Data Abstract for Delphi/Source/SimpleLoginService_Impl.dfm
new file mode 100644
index 0000000..775b9ce
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/SimpleLoginService_Impl.dfm
@@ -0,0 +1,2 @@
+inherited SimpleLoginService: TSimpleLoginService
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/SimpleLoginService_Impl.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/SimpleLoginService_Impl.pas
new file mode 100644
index 0000000..d059360
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/SimpleLoginService_Impl.pas
@@ -0,0 +1,53 @@
+unit SimpleLoginService_Impl;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils,
+ {RemObjects:} uROClientIntf, uROTypes, uROServer, uROSessions,
+ {Ancestor Implementation:} BaseLoginService_Impl,
+ {Generated:} DataAbstract4_Intf;
+
+type
+ TSimpleLoginEvent = procedure(Sender: TObject; aUserID, aPassword: Utf8String; out aUserInfo: UserInfo; var aLoginSuccessful: boolean) of object;
+
+ { TSimpleLoginService }
+ TSimpleLoginService = class(TBaseLoginService, ISimpleLoginService)
+ private
+ fOnLogin: TSimpleLoginEvent;
+ protected
+ { ISimpleLoginService methods }
+ function Login(const aUserID: Utf8String; const aPassword: Utf8String; out aUserInfo: UserInfo): Boolean;
+ published
+ property OnLogin: TSimpleLoginEvent read fOnLogin write fOnLogin;
+ end;
+
+implementation
+
+{ SimpleLoginService }
+
+function TSimpleLoginService.Login(const aUserID: Utf8String; const aPassword: Utf8String; out aUserInfo: UserInfo): Boolean;
+var
+ lLoginSuccessful: boolean;
+begin
+ lLoginSuccessful := false;
+ if assigned(OnLogin) then
+ OnLogin(self, aUserID, aPassword, aUserInfo, lLoginSuccessful);
+ result := lLoginSuccessful;
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Unsupported/uDAJvMTable.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/Unsupported/uDAJvMTable.pas
new file mode 100644
index 0000000..a7cffe6
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Unsupported/uDAJvMTable.pas
@@ -0,0 +1,189 @@
+unit uDAJvMTable;
+
+interface
+
+uses Classes, DB, uDAInterfaces, uDADataTable, JvMemDS;
+
+type
+
+ TDAJvMDataset = class(TJvMemoryData, IDADataTableDataset)
+ private
+ function GetActive: boolean;
+
+ protected
+ function GetDataTable: TDADataTable; safecall;
+ procedure InternalRefresh; override;
+
+ published
+ property Active: boolean read GetActive;
+ end;
+
+ TDAJvMemDataTable = class(TDADataTable)
+ private
+
+ fClientDataset: TDAJvMDataset;
+
+ protected
+ function GetDatasetClass: TDatasetClass; override;
+ procedure CreateInternalFields(aDataset: TDataset; someFieldDefinitions: TDAFieldCollection); override;
+ procedure DoSort(const FieldNames: array of string; const Directions: array of TDASortDirection); override;
+
+ procedure DoBeforeOpenDataset; override;
+ procedure DoAfterCloseDataset; override;
+
+ procedure SetMasterSource(const Value: TDADataSource); override;
+ function GetMasterSource: TDADataSource; override;
+ procedure SetDetailsFields(const Value: string); override;
+ procedure SetMasterFields(const Value: string); override;
+ function GetDetailFields: string; override;
+ function GetMasterFields: string; override;
+
+ function GetIndexDefs: TIndexDefs;
+ procedure SetIndexDefs(const Value: TIndexDefs);
+ function GetIndexName: string;
+ procedure SetIndexName(const Value: string);
+
+ function GetFilter: string; override;
+ function GetFiltered: boolean; override;
+ procedure SetFilter(const Value: string); override;
+ procedure SetFiltered(const Value: boolean); override;
+
+ public
+ constructor Create(aOwner: TComponent); override;
+
+ published
+ property IndexDefs: TIndexDefs read GetIndexDefs write SetIndexDefs;
+ property IndexName: string read GetIndexName write SetIndexName;
+
+ end;
+
+implementation
+
+uses Variants;
+
+constructor TDAJvMemDataTable.Create(aOwner: TComponent);
+begin
+ inherited;
+
+ fClientDataset := TDAJvMDataset(Dataset);
+ fClientDataset.FilterOptions := [foCaseInsensitive];
+end;
+
+procedure TDAJvMemDataTable.CreateInternalFields(aDataset: TDataset; someFieldDefinitions: TDAFieldCollection);
+begin
+ inherited;
+
+ fClientDataset.FieldDefs.Clear;
+ fClientDataset.CreateFields;
+
+end;
+
+procedure TDAJvMemDataTable.DoSort(const FieldNames: array of string; const Directions: array of TDASortDirection);
+begin
+ with fclientDataset do begin
+ Sort(Fieldnames,Directions);
+ end;
+end;
+
+function TDAJvMemDataTable.GetDatasetClass: TDatasetClass;
+begin
+ result := TDAJvMDataset;
+end;
+
+function TDAJvMemDataTable.GetMasterSource: TDADataSource;
+begin
+ result := nil;
+end;
+
+procedure TDAJvMemDataTable.DoAfterCloseDataset;
+begin
+ inherited;
+end;
+
+function TDAJvMemDataTable.GetFilter: string;
+begin
+ result := fClientDataset.Filter
+end;
+
+
+procedure TDAJvMemDataTable.DoBeforeOpenDataset;
+begin
+ inherited;
+end;
+
+procedure TDAJvMemDataTable.SetMasterSource(const Value: TDADataSource);
+begin
+ inherited SetMasterSource(Value);
+end;
+
+procedure TDAJvMemDataTable.SetMasterFields(const Value: string);
+begin
+ inherited;
+end;
+
+procedure TDAJvMemDataTable.SetDetailsFields(const Value: string);
+begin
+end;
+
+function TDAJvMemDataTable.GetDetailFields: string;
+begin
+end;
+
+function TDAJvMemDataTable.GetMasterFields: string;
+begin
+
+end;
+
+
+function TDAJvMemDataTable.GetFiltered: boolean;
+begin
+ result := fClientDataset.Filtered
+end;
+
+procedure TDAJvMemDataTable.SetFilter(const Value: string);
+begin
+ fClientDataset.Filter := Value
+end;
+
+procedure TDAJvMemDataTable.SetFiltered(const Value: boolean);
+begin
+ fClientDataset.Filtered := Value
+end;
+
+function TDAJvMemDataTable.GetIndexDefs: TIndexDefs;
+begin
+ result := nil;
+end;
+
+procedure TDAJvMemDataTable.SetIndexDefs(const Value: TIndexDefs);
+begin
+
+end;
+
+function TDAJvMemDataTable.GetIndexName: string;
+begin
+ result := '';
+end;
+
+procedure TDAJvMemDataTable.SetIndexName(const Value: string);
+begin
+
+end;
+
+function TDAJvMDataset.GetActive: boolean;
+begin
+ result := inherited Active;
+end;
+
+function TDAJvMDataset.GetDataTable: TDADataTable;
+begin
+ result := TDADataTable(Owner);
+end;
+
+procedure TDAJvMDataset.InternalRefresh;
+begin
+
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Unsupported/uDAMemTablesReg.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/Unsupported/uDAMemTablesReg.pas
new file mode 100644
index 0000000..15e7226
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Unsupported/uDAMemTablesReg.pas
@@ -0,0 +1,17 @@
+unit uDAMemTablesReg;
+
+interface
+
+uses uDAJvMTable, uDASQLMemoryTable, Classes;
+
+procedure Register;
+
+implementation
+
+procedure Register;
+begin
+ RegisterComponents('Data Abstract', [TDAJvMemDataTable]);
+ RegisterComponents('Data Abstract',[TDASQLMemTable]);
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/Unsupported/uDASQLMemoryTable.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/Unsupported/uDASQLMemoryTable.pas
new file mode 100644
index 0000000..1d6b365
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/Unsupported/uDASQLMemoryTable.pas
@@ -0,0 +1,233 @@
+unit uDASQLMemoryTable;
+
+interface
+
+uses SysUtils,Classes, DB, uDAInterfaces, uDADataTable, SQLMemMain;
+
+type
+ TDASQLMemDataset = class(TSQLMemTable, IDADataTableDataset)
+ private
+ function GetActive: boolean;
+
+ protected
+ function GetDataTable: TDADataTable; safecall;
+ procedure InternalRefresh; override;
+
+ published
+ property Active: boolean read GetActive;
+ end;
+
+ TDASQLMemTable = class(TDADataTable)
+ private
+ fMasterSource : TDADataSource;
+ fSQLMemDataset: TDASQLMemdataset;
+
+ protected
+ function GetDatasetClass: TDatasetClass; override;
+ procedure CreateInternalFields(aDataset: TDataset; someFieldDefinitions: TDAFieldCollection); override;
+ procedure DoSort(const FieldNames: array of string; const Directions: array of TDASortDirection); override;
+
+ procedure DoBeforeOpenDataset; override;
+ procedure DoAfterCloseDataset; override;
+
+ procedure SetMasterSource(const Value: TDADataSource); override;
+ function GetMasterSource: TDADataSource; override;
+ procedure SetDetailsFields(const Value: string); override;
+ procedure SetMasterFields(const Value: string); override;
+ function GetDetailFields: string; override;
+ function GetMasterFields: string; override;
+
+ function GetIndexDefs: TIndexDefs;
+ procedure SetIndexDefs(const Value: TIndexDefs);
+ function GetIndexName: string;
+ procedure SetIndexName(const Value: string);
+
+ function GetFilter: string; override;
+ function GetFiltered: boolean; override;
+ procedure SetFilter(const Value: string); override;
+ procedure SetFiltered(const Value: boolean); override;
+
+ public
+ constructor Create(aOwner: TComponent); override;
+
+ published
+ property IndexDefs: TIndexDefs read GetIndexDefs write SetIndexDefs;
+ property IndexName: string read GetIndexName write SetIndexName;
+ end;
+
+implementation
+
+uses Variants;
+
+constructor TDASQLMemTable.Create(aOwner: TComponent);
+begin
+ inherited;
+ fSQLMemDataset := TDASqlMemDataset(Dataset);
+ fSQLMemDataset.FilterOptions := [foCaseInsensitive];
+end;
+
+procedure TDASQLMemTable.CreateInternalFields(aDataset: TDataset; someFieldDefinitions: TDAFieldCollection);
+ var tblName : String;
+begin
+ inherited;
+ if fSQLMemDataset.TableName = '' then begin
+ tblname := formatdatetime('ddddmmmmdyyyyhhmmsz',now);
+ fSQLMemDataset.TableName := 'tbl'+tblname;
+ fSQLMemDataset.CreateTable;
+ end else begin
+ fSQLMemDataset.close;
+ fSQLMemDataset.EmptyTable;
+ fSQLMemDataset.FieldDefs.clear;
+ fSQLMemDataset.IndexDefs.Clear;
+ fSQLMemDataset.RestructureFieldDefs.Clear;
+ fSQLMemDataset.RestructureIndexDefs.Clear;
+ fSQLMemDataset.ImportTable(dataset);
+ end;
+end;
+
+procedure TDASQLMemTable.DoSort(const FieldNames: array of string; const Directions: array of TDASortDirection);
+const
+ DirectionStr: array[TDASortDirection] of string = ('ASC', 'DESC');
+var
+ ascfields, descfields,
+ idxname: string;
+ i: integer;
+ idx: TIndexDef;
+begin
+ with fSQLMemDataset do begin
+ if (Length(FieldNames) = 0) then begin
+ IndexName := '';
+ Exit;
+ end;
+
+ idxname := '';
+ for i := 0 to Length(FieldNames) - 1 do
+ idxname := idxname + FieldNames[i] + '_' + DirectionStr[Directions[i]];
+
+ idx := TDefCollection(IndexDefs).Find(idxname) as TIndexDef;
+ if (idx = nil) then begin
+ ascfields := '';
+ descfields := '';
+
+ for i := 0 to Length(Directions) - 1 do
+ case Directions[i] of
+ sdAscending: ascfields := ascfields + FieldNames[i] + ';';
+ sdDescending: descfields := descfields + FieldNames[i] + ';';
+ end;
+
+ if (descfields='')
+ then fSQLMemDataset.AddIndex(idxname, ascfields, [])
+ else fSQLMemDataset.AddIndex(idxname, descfields, [ixDescending]);
+ end;
+
+ IndexName := idxname;
+ end;
+end;
+
+function TDASQLMemTable.GetDatasetClass: TDatasetClass;
+begin
+ result := TDASQLMemDataset;
+end;
+
+function TDASQLMemTable.GetMasterSource: TDADataSource;
+begin
+ result := fMasterSource;
+end;
+
+procedure TDASQLMemTable.DoAfterCloseDataset;
+begin
+ inherited;
+ fSQLMemDataset.close;
+end;
+
+function TDASQLMemTable.GetFilter: string;
+begin
+ result := fSQLMemDataset.Filter
+end;
+
+procedure TDASQLMemTable.DoBeforeOpenDataset;
+begin
+ inherited;
+end;
+
+procedure TDASQLMemTable.SetMasterSource(const Value: TDADataSource);
+begin
+ fSQLMemDataset.MasterSource := Value;
+ fMasterSource := Value;
+
+ inherited SetMasterSource(Value);
+end;
+
+procedure TDASQLMemTable.SetMasterFields(const Value: string);
+begin
+ fSQLMemDataset.MasterFields := Value;
+ inherited;
+end;
+
+procedure TDASQLMemTable.SetDetailsFields(const Value: string);
+begin
+ fSQLMemDataset.IndexFieldNames := Value
+end;
+
+function TDASQLMemTable.GetDetailFields: string;
+begin
+ result := fSQLMemDataset.IndexFieldNames
+end;
+
+function TDASQLMemTable.GetMasterFields: string;
+begin
+ result := fSQLMemDataset.MasterFields
+end;
+
+function TDASQLMemTable.GetFiltered: boolean;
+begin
+ result := fSQLMemDataset.Filtered
+end;
+
+procedure TDASQLMemTable.SetFilter(const Value: string);
+begin
+ fSQLMemDataset.Filter := Value
+end;
+
+procedure TDASQLMemTable.SetFiltered(const Value: boolean);
+begin
+ fSQLMemDataset.Filtered := Value
+end;
+
+function TDASQLMemTable.GetIndexDefs: TIndexDefs;
+begin
+ result := fSQLMemDataset.IndexDefs
+end;
+
+procedure TDASQLMemTable.SetIndexDefs(const Value: TIndexDefs);
+begin
+ fSQLMemDataset.IndexDefs.Assign(Value);
+end;
+
+function TDASQLMemTable.GetIndexName: string;
+begin
+ result := fSQLMemDataset.IndexName
+end;
+
+procedure TDASQLMemTable.SetIndexName(const Value: string);
+begin
+ fSQLMemDataset.IndexName := Value
+end;
+
+function TDASQLMemdataset.GetActive: boolean;
+begin
+ result := inherited Active;
+end;
+
+function TDASQLMemdataset.GetDataTable: TDADataTable;
+begin
+ result := TDADataTable(Owner);
+end;
+
+procedure TDASQLMemdataset.InternalRefresh;
+begin
+
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/eDefines.inc b/official/5.0.30.691/Data Abstract for Delphi/Source/eDefines.inc
new file mode 100644
index 0000000..c671a44
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/eDefines.inc
@@ -0,0 +1,459 @@
+{----------------------------------------------------------------------------}
+{file: eDefines.inc }
+{type: Delphi include file }
+{ }
+{compiler: Borland Pascal 7, }
+{ Delphi 1-7, 2005-2007 for Win32 }
+{ Kylix 1-3, }
+{ C++Builder 1-6, 2006-2007 }
+{ Free Pascal Compiler 2.x }
+{ }
+{platforms: DOS, DPMI, Win16, Win32, Win64, Linux, Mac OS X }
+{ }
+{author: mh@elitedev.com }
+{ }
+{contents: Defines that can be flexibily used to determine the exact }
+{ compiler version used. }
+{ }
+{(c)opyright elitedevelopments software. all rights reserved. }
+{ http://www.elitedev.com }
+{ }
+{ Third Party component developers are encouraged to use the set of defines }
+{ established in this file, rather then their own system, for checking their }
+{ component libraries agains different versions of Delphi and C++Builder. }
+{ }
+{ This file may be distributed freely with both free and commercial source }
+{ libraries, but you are asked to please leave this comment in place, and }
+{ to return any improvements you make to this file to the maintainer that }
+{ is noted above. }
+{----------------------------------------------------------------------------}
+
+{----------------------------------------------------------------------------}
+{ Compiler and OS version defines: }
+{ }
+{ exact compiler versions: }
+{ }
+{ BP7 Borland Pascal 7.0 }
+{ DELPHI1 Delphi 1.0 (any Delphi) }
+{ DELPHI2 Delphi 2.0 }
+{ DELPHI3 Delphi 3.0 }
+{ DELPHI4 Delphi 4.0 }
+{ DELPHI5 Delphi 5.0 }
+{ DELPHI6 Delphi 6.0 }
+{ DELPHI7 Delphi 7.0 }
+{ DELPHI9 Delphi 2005 }
+{ DELPHI2005 Delphi 2005 }
+{ DELPHI2006 Delphi 2006 }
+{ DELPHI2007 Delphi 2007 }
+{ KYLIX1 Kylix 1.0 }
+{ KYLIX2 Kylix 2.0 }
+{ KYLIX3 Kylix 3.0 }
+{ CBUILDER1 C++Builder 1.0 }
+{ CBUILDER3 C++Builder 3.0 }
+{ CBUILDER4 C++Builder 4.0 }
+{ CBUILDER5 C++Builder 5.0 }
+{ }
+{ }
+{ minimum compiler versions: }
+{ }
+{ DELPHI1UP Delphi 1.0 and above (any Delphi) }
+{ DELPHI2UP Delphi 2.0 and above }
+{ DELPHI3UP Delphi 3.0 and above }
+{ DELPHI4UP Delphi 4.0 and above }
+{ DELPHI5UP Delphi 5.0 and above }
+{ DELPHI6UP Delphi 6.0 and above }
+{ DELPHI7UP Delphi 7.0 and above }
+{ DELPHI9UP Delphi 9.0 (2005) and above }
+{ DELPHI10UP Delphi 10.0 (2006) and above }
+{ DELPHI11UP Delphi 11.0 (2007) and above }
+{ DELPHI2005UP Delphi 2005 and above }
+{ DELPHI2006UP Delphi 2006 and above }
+{ DELPHI2007UP Delphi 2007 and above }
+{ KYLIX1UP Kylix 1.0 and above (any Kylix) }
+{ KYLIX2UP Kylix 2.0 and above (any Kylix) }
+{ KYLIX3UP Kylix 3.0 and above (any Kylix) }
+{ CBUILDER1UP C++Builder 1.0 and above or Delphi 2 and above }
+{ CBUILDER3UP C++Builder 3.0 and above or Delphi 3.0 and above }
+{ CBUILDER4UP C++Builder 4.0 and above or Delphi 4.0 and above }
+{ CBUILDER5UP C++Builder 5.0 and above or Delphi 5.0 and above }
+{ CBUILDER6UP C++Builder 5.0 and above or Delphi 5.0 and above }
+{ }
+{ }
+{ compiler types: }
+{ }
+{ BP Borland Pascal (not Delphi or C++Builder) }
+{ DELPHI any Delphi version (but not C++Builder or Kylix) }
+{ KYLIX any Kylix version (not Delphi or C++Builder for Windows) }
+{ CBUILDER any C++Builder for Windows (Pascal) }
+{ }
+{ }
+{ target platforms compiler types: }
+{ }
+{ DELPHI_16BIT 16bit Delphi (but not C++Builder!) }
+{ DELPHI_32BIT 32bit Delphi (but not C++Builder) }
+{ KYLIX_32BIT 32bit Kylix (but not C++Builder) }
+{ CBUILDER_32BIT 32bit C++Builer's Pascal (but not Delphi) }
+{ }
+{ }
+{ target cpu types }
+{ }
+{ CPU16 16bit Delphi or Borland Pascal }
+{ CPU32 32bit Delphi or Free Pascal }
+{ CPU64 64bit Free Pascal }
+{ }
+{ target platforms }
+{ }
+{ DOS any DOS (plain and DPMI) }
+{ REALMODE 16bit realmode DOS }
+{ PROTECTEDMODE 16bit DPMI DOS }
+{ }
+{ MSWINDOWS any Windows platform }
+{ WIN16 16bit Windows }
+{ WIN32 32bit Windows }
+{ WIN64 64bit Windows }
+{ DOTNET .NET }
+{ }
+{ LINUX any Linux platform }
+{ LINUX32 32bit Linux }
+{ LINUX64 64bit Linux }
+{ }
+{ DARWIN Any Mac OS X }
+{ DARWIN32 32bit Mac OS X }
+{ DARWIN64 64bit Mac OS X }
+{----------------------------------------------------------------------------}
+
+{ defines for Borland Pascal 7.0 }
+{$IFDEF VER70}
+ {$DEFINE BP}
+ {$DEFINE BP7}
+ {$DEFINE 16BIT}
+ {$DEFINE CPU16}
+
+ { defines for BP7 DOS real mode }
+ {$IFDEF MSDOS}
+ {$DEFINE DOS}
+ {$DEFINE REALMODE}
+ {$ENDIF}
+
+ { defines for BP7 DOS protected mode }
+ {$IFDEF DPMI}
+ {$DEFINE DOS}
+ {$DEFINE PROTECTEDMODE}
+ {$ENDIF}
+
+ { defines for BP7 Windows }
+ {$IFDEF WINDOWS}
+ {$DEFINE MSWINDOWS}
+ {$DEFINE WIN16}
+ {$ENDIF}
+{$ENDIF}
+
+{ defines for Delphi 1.0 thru 7.0 }
+{$IFNDEF LINUX}
+
+ { defines for Delphi 1.0 }
+ {$IFDEF VER80}
+ {$DEFINE DELPHI}
+ {$DEFINE DELPHI1}
+ {$DEFINE DELPHI1UP}
+ {$DEFINE DELPHI_16BIT}
+ {$DEFINE WIN16}
+ {$DEFINE 16BIT}
+ {$DEFINE CPU16}
+ {$ENDIF}
+
+ { defines for Delphi 2.0 }
+ {$IFDEF VER90}
+ {$DEFINE DELPHI}
+ {$DEFINE DELPHI2}
+ {$DEFINE DELPHI1UP}
+ {$DEFINE DELPHI2UP}
+ {$ENDIF}
+
+ { defines for C++Builder 1.0 }
+ {$IFDEF VER93}
+ {$DEFINE DELPHI1UP}
+ {$DEFINE DELPHI2UP}
+ {$DEFINE CBUILDER}
+ {$DEFINE CBUILDER1}
+ {$DEFINE CBUILDER1UP}
+ {$ENDIF}
+
+ { defines for Delphi 3.0 }
+ {$IFDEF VER100}
+ {$DEFINE DELPHI}
+ {$DEFINE DELPHI3}
+ {$DEFINE DELPHI1UP}
+ {$DEFINE DELPHI2UP}
+ {$DEFINE DELPHI3UP}
+ {$ENDIF}
+
+ { defines for C++Builder 3.0 }
+ {$IFDEF VER110}
+ {$DEFINE DELPHI1UP}
+ {$DEFINE DELPHI2UP}
+ {$DEFINE DELPHI3UP}
+ {$DEFINE CBUILDER}
+ {$DEFINE CBUILDER3}
+ {$DEFINE CBUILDER1UP}
+ {$DEFINE CBUILDER3UP}
+ {$ENDIF}
+
+ { defines for Delphi 4.0 }
+ {$IFDEF VER120}
+ {$DEFINE DELPHI}
+ {$DEFINE DELPHI4}
+ {$DEFINE DELPHI1UP}
+ {$DEFINE DELPHI2UP}
+ {$DEFINE DELPHI3UP}
+ {$DEFINE DELPHI4UP}
+ {$ENDIF}
+
+ { defines for C++Builder 4.0 }
+ {$IFDEF VER125}
+ {$DEFINE DELPHI1UP}
+ {$DEFINE DELPHI2UP}
+ {$DEFINE DELPHI3UP}
+ {$DEFINE DELPHI4UP}
+ {$DEFINE CBUILDER}
+ {$DEFINE CBUILDER4}
+ {$DEFINE CBUILDER1UP}
+ {$DEFINE CBUILDER3UP}
+ {$DEFINE CBUILDER4UP}
+ {$ENDIF}
+ { defines for Delphi 5.0 }
+ {$IFDEF VER130}
+ {$DEFINE DELPHI}
+ {$DEFINE DELPHI5}
+ {$DEFINE DELPHI1UP}
+ {$DEFINE DELPHI2UP}
+ {$DEFINE DELPHI3UP}
+ {$DEFINE DELPHI4UP}
+ {$DEFINE DELPHI5UP}
+ {$ENDIF}
+
+ { defines for C++Builder 5.0 }
+ {$IFDEF VER135}
+ {$DEFINE DELPHI1UP}
+ {$DEFINE DELPHI2UP}
+ {$DEFINE DELPHI3UP}
+ {$DEFINE DELPHI4UP}
+ {$DEFINE DELPHI5UP}
+ {$DEFINE CBUILDER}
+ {$DEFINE CBUILDER5}
+ {$DEFINE CBUILDER1UP}
+ {$DEFINE CBUILDER3UP}
+ {$DEFINE CBUILDER4UP}
+ {$DEFINE CBUILDER5UP}
+ {$ENDIF}
+
+ { defines for Delphi 6.0 }
+ {$IFDEF VER140}
+ {$DEFINE VER140UP}
+ {$DEFINE DELPHI}
+ {$DEFINE DELPHI6}
+ {$DEFINE DELPHI1UP}
+ {$DEFINE DELPHI2UP}
+ {$DEFINE DELPHI3UP}
+ {$DEFINE DELPHI4UP}
+ {$DEFINE DELPHI5UP}
+ {$DEFINE DELPHI6UP}
+ {$ENDIF}
+
+ { defines for Delphi 7.0 }
+ {$IFDEF VER150}
+ {$DEFINE VER140UP}
+ {$DEFINE DELPHI}
+ {$DEFINE DELPHI7}
+ {$DEFINE DELPHI1UP}
+ {$DEFINE DELPHI2UP}
+ {$DEFINE DELPHI3UP}
+ {$DEFINE DELPHI4UP}
+ {$DEFINE DELPHI5UP}
+ {$DEFINE DELPHI6UP}
+ {$DEFINE DELPHI7UP}
+ {$ENDIF}
+
+ { defines for Delphi 2005 }
+ {$IFDEF VER170}
+ {$DEFINE VER140UP}
+ {$DEFINE DELPHI}
+ {$DEFINE DELPHI9}
+ {$DEFINE DELPHI2005}
+ {$DEFINE DELPHI1UP}
+ {$DEFINE DELPHI2UP}
+ {$DEFINE DELPHI3UP}
+ {$DEFINE DELPHI4UP}
+ {$DEFINE DELPHI5UP}
+ {$DEFINE DELPHI6UP}
+ {$DEFINE DELPHI7UP}
+ {$DEFINE DELPHI9UP}
+ {$DEFINE DELPHI2005UP}
+ {$DEFINE BDS}
+ {$DEFINE BDS3}
+ {$DEFINE BDS3UP}
+ {$ENDIF}
+
+ { defines for Delphi 2006 }
+ {$IFDEF VER180}
+ {$DEFINE VER140UP}
+ {$DEFINE DELPHI}
+ {$DEFINE DELPHI10}
+ {$DEFINE DELPHI10A}
+ {$DEFINE DELPHI2006}
+ {$DEFINE DELPHI1UP}
+ {$DEFINE DELPHI2UP}
+ {$DEFINE DELPHI3UP}
+ {$DEFINE DELPHI4UP}
+ {$DEFINE DELPHI5UP}
+ {$DEFINE DELPHI6UP}
+ {$DEFINE DELPHI7UP}
+ {$DEFINE DELPHI9UP}
+ {$DEFINE DELPHI10UP}
+ {$DEFINE DELPHI2005UP}
+ {$DEFINE DELPHI2006UP}
+ {$DEFINE BDS}
+ {$DEFINE BDS4}
+ {$DEFINE BDS3UP}
+ {$DEFINE BDS4UP}
+ {$ENDIF}
+
+ { defines for Delphi 2007 }
+ {$IFDEF VER185}
+ {$UNDEF DELPHI10A} // declared in VER180
+ {$UNDEF DELPHI2006} // declared in VER180
+ {$UNDEF BDS4} // declared in VER180
+
+ {$DEFINE DELPHI10B}
+ {$DEFINE DELPHI10BUP}
+ {$DEFINE DELPHI11}
+ {$DEFINE DELPHI11UP}
+ {$DEFINE DELPHI2007}
+ {$DEFINE DELPHI2007UP}
+ {$DEFINE BDS5}
+ {$DEFINE BDS5UP}
+ {$ENDIF}
+
+ { defines for Delphi 2008 }
+ {$IFDEF VER200}
+ {$DEFINE VER140UP}
+ {$DEFINE DELPHI}
+
+ {$DEFINE DELPHI12}
+ {$DEFINE DELPHI1UP}
+ {$DEFINE DELPHI2UP}
+ {$DEFINE DELPHI3UP}
+ {$DEFINE DELPHI4UP}
+ {$DEFINE DELPHI5UP}
+ {$DEFINE DELPHI6UP}
+ {$DEFINE DELPHI7UP}
+ {$DEFINE DELPHI9UP}
+ {$DEFINE DELPHI10UP}
+ {$DEFINE DELPHI11UP}
+ {$DEFINE DELPHI12UP}
+
+ {$DEFINE DELPHI2008}
+ {$DEFINE DELPHI2005UP}
+ {$DEFINE DELPHI2006UP}
+ {$DEFINE DELPHI2007UP}
+ {$DEFINE DELPHI2008UP}
+
+ {$DEFINE BDS}
+ {$DEFINE BDS6}
+ {$DEFINE BDS3UP}
+ {$DEFINE BDS4UP}
+ {$DEFINE BDS5UP}
+ {$DEFINE BDS6UP}
+ {$DEFINE BDS6}
+ {$DEFINE BDS6UP}
+ {$ENDIF}
+
+ {$IFDEF WIN32}
+ {$DEFINE MSWINDOWS} //not automatically defined for Delphi 2 thru 5
+ {$DEFINE 32BIT}
+ {$DEFINE CPU32}
+ {$ENDIF}
+
+{$ENDIF MSWINDOWS}
+
+{ defines for "Delphi for .NET" }
+{$IFDEF CLR}
+ {$DEFINE DOTNET}
+{$ENDIF}
+
+{$IFDEF DELPHI}
+ {$IFDEF DELPHI2UP}
+ {$DEFINE DELPHI_32BIT}
+ {$ENDIF}
+{$ENDIF}
+
+{$IFDEF CBUILDER}
+ {$DEFINE CBUILDER_32BIT}
+{$ENDIF}
+
+{$IFNDEF FPC}
+
+ { Kylix 1.0 thru 3.0 }
+ {$IFDEF LINUX}
+
+ {$DEFINE VER140UP}
+
+ { Any Kylix }
+ {$DEFINE 32BIT}
+ {$DEFINE LINUX32}
+ {$DEFINE KYLIX_32BIT}
+ {$DEFINE KYLIX}
+ {$DEFINE KYLIX1UP}
+
+ {$IFDEF CONDITIONALEXPRESSIONS}
+ {$IF Declared(CompilerVersion)}
+
+ { Kylix 2.0 }
+ {$IF Declared(RTLVersion) and (RTLVersion = 14.1)}
+ {$DEFINE KYLIX2}
+ {$DEFINE KYLIX1UP}
+ {$DEFINE KYLIX2UP}
+ {$IFEND}
+
+ { Kylix 3.0 - Delphi portion }
+ {$IF Declared(RTLVersion) and (RTLVersion = 14.5)}
+ {$DEFINE KYLIX3}
+ {$DEFINE KYLIX1UP}
+ {$DEFINE KYLIX2UP}
+ {$DEFINE KYLIX3UP}
+ {$IFEND}
+
+ { Kylix 1.0 }
+ {$ELSE}
+ {$DEFINE KYLIX1}
+ {$IFEND}
+ {$ENDIF CONDITIONALEXPRESSIONS}
+
+ {$ENDIF LINUX}
+{$ENDIF}
+
+{ CPU }
+
+{$IFDEF FPC}
+ {$IFDEF MSWINDOWS}
+ {$IFDEF CPU64}
+ {$DEFINE WIN64}
+ {$ENDIF}
+ {$ENDIF}
+ {$IFDEF LINUX}
+ {$IFDEF CPU32}
+ {$DEFINE LINUX32}
+ {$ENDIF}
+ {$IFDEF CPU64}
+ {$DEFINE LINUX64}
+ {$ENDIF}
+ {$ENDIF}
+ {$IFDEF DARWIN}
+ {$IFDEF CPU32}
+ {$DEFINE DARWIN32}
+ {$ENDIF}
+ {$IFDEF CPU64}
+ {$DEFINE DARWIN64}
+ {$ENDIF}
+ {$ENDIF}
+{$ENDIF}
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDAADODataTable.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAADODataTable.pas
new file mode 100644
index 0000000..c02dbd1
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAADODataTable.pas
@@ -0,0 +1,285 @@
+unit uDAADODataTable;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up }
+{ platform: Win32 }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses Classes, DB, uDAInterfaces, uDADataTable, ADODB;
+
+type
+ { TDAADODataset }
+ TDAADODataset = class(TADODataset, IDADataTableDataset)
+ private
+ FLocateRecordMode: Boolean;
+ protected
+ function GetDataTable: TDADataTable; safecall;
+ procedure InternalRefresh; override;
+ procedure InternalInitFieldDefs; override;
+ procedure DataEvent(Event: TDataEvent; Info: Longint); override;
+ public
+ function Locate(const KeyFields: string; const KeyValues: Variant;
+ Options: TLocateOptions): Boolean; override;
+ function Lookup(const KeyFields: string; const KeyValues: Variant;
+ const ResultFields: string): Variant; override;
+ end;
+
+ { TDAADODataTable }
+ TDAADODataTable = class(TDADataTable)
+ private
+ fADODataset: TDAADODataset;
+ protected
+ function GetDatasetClass: TDatasetClass; override;
+ procedure CreateInternalFields(aDataset: TDataset; someFieldDefinitions: TDAFieldCollection); override;
+ procedure DoAfterCloseDataset; override;
+ procedure DoSort(const FieldNames: array of string; const Directions: array of TDASortDirection); override;
+
+ procedure SetMasterSource(const Value: TDADataSource); override;
+ function GetMasterSource: TDADataSource; override;
+ procedure SetDetailsFields(const Value: string); override;
+ procedure SetMasterFields(const Value: string); override;
+ function GetDetailFields: string; override;
+ function GetMasterFields: string; override;
+
+ function GetFilter: string; override;
+ function GetFiltered: boolean; override;
+ procedure SetFilter(const Value: string); override;
+ procedure SetFiltered(const Value: boolean); override;
+ public
+ constructor Create(aOwner: TComponent); override;
+ procedure EnableConstraints; override; safecall;
+ procedure DisableConstraints; override; safecall;
+ end;
+
+implementation
+
+uses
+ ADOInt, Variants, SysUtils;
+
+{ TDAADODataTable }
+
+constructor TDAADODataTable.Create(aOwner: TComponent);
+begin
+ inherited;
+
+ fADODataset := TDAADODataset(Dataset);
+end;
+
+procedure TDAADODataTable.CreateInternalFields(aDataset: TDataset;
+ someFieldDefinitions: TDAFieldCollection);
+var
+ i, n: Integer;
+ lDataType: DataTypeEnum;
+ TmpRecordset: _Recordset;
+
+begin
+ inherited;
+
+ { this loop should be obsolete now with fix to #1674. Keeping for backward compatibilty. mh. }
+ with fADODataset do begin
+ for i := 0 to Fields.Count - 1 do begin
+ if (Fields[i].FieldKind = fkInternalCalc) then begin
+ Fields[i].FieldKind := fkCalculated;
+ with Fields[i] do begin
+ FieldDefs.Add(FieldName, DataType, Size, Required);
+ end;
+ end;
+ end;
+ end;
+
+ fADODataset.CursorLocation := clUseClient;
+ fADODataset.CursorType := ctDynamic;
+ fADODataset.CreateDataSet;
+
+ if (fADODataset.FieldCount > 0) then begin
+ TmpRecordset := CoRecordset.Create;
+ for n := 0 to fADODataset.RecordSet.Fields.Count - 1 do begin
+ with fADODataset.RecordSet.Fields.Item[n] do begin
+ lDataType := Type_;
+ if (lDataType = adVarChar)
+ then lDataType := adVarWChar;
+ TmpRecordSet.Fields.Append(Name, lDataType, DefinedSize, Attributes);
+ end;
+ end;
+ TmpRecordset.Open(EmptyParam, EmptyParam, adOpenUnspecified, adLockUnspecified, 0);
+ fADODataset.Recordset := TmpRecordset;
+ fADODataset.Open;
+ end;
+end;
+
+function TDAADODataTable.GetDatasetClass: TDatasetClass;
+begin
+ result := TDAADODataset;
+end;
+
+procedure TDAADODataTable.DoSort(const FieldNames: array of string; const Directions: array of TDASortDirection);
+const
+ DirectionStr: array[TDASortDirection] of string = ('ASC', 'DESC');
+var
+ i: integer;
+ sortexp: string;
+begin
+ with fADODataSet do begin
+
+ if (Length(FieldNames) = 0) then
+ Sort := ''
+
+ else begin
+ sortexp := '';
+ for i := 0 to Length(FieldNames) - 1 do
+ sortexp := sortexp + FieldNames[i] + ' ' + DirectionStr[Directions[i]] + ', ';
+
+ Sort := Copy(sortexp, 1, Length(sortexp) - 2);
+ end;
+ end;
+end;
+
+function TDAADODataTable.GetDetailFields: string;
+begin
+ result := fADODataset.IndexFieldNames
+end;
+
+function TDAADODataTable.GetMasterFields: string;
+begin
+ result := fADODataset.MasterFields
+end;
+
+function TDAADODataTable.GetMasterSource: TDADataSource;
+begin
+ result := TDADataSource(fADODataset.DataSource)
+end;
+
+procedure TDAADODataTable.SetDetailsFields(const Value: string);
+begin
+ fADODataset.IndexFieldNames := Value
+end;
+
+procedure TDAADODataTable.SetMasterFields(const Value: string);
+begin
+ inherited;
+ fADODataset.MasterFields := Value
+end;
+
+procedure TDAADODataTable.SetMasterSource(const Value: TDADataSource);
+begin
+ inherited;
+ fADODataset.DataSource := Value
+end;
+
+function TDAADODataTable.GetFilter: string;
+begin
+ result := fADODataset.Filter
+end;
+
+function TDAADODataTable.GetFiltered: boolean;
+begin
+ result := fADODataset.Filtered
+end;
+
+procedure TDAADODataTable.SetFilter(const Value: string);
+begin
+ fADODataset.Filter := Value
+end;
+
+procedure TDAADODataTable.SetFiltered(const Value: boolean);
+begin
+ fADODataset.Filtered := Value
+end;
+
+procedure TDAADODataTable.DoAfterCloseDataset;
+begin
+ inherited;
+
+ // These checks prevent the error "the provider does not support the necessary interface for index functionality"
+ // that occourrs when the data table is being closed
+
+ with fADODataset do begin
+ if (IndexName<>'')
+ then fADODataset.IndexName := '';
+
+ if (IndexDefs.Count>0)
+ then IndexDefs.Clear;
+ end;
+end;
+
+procedure TDAADODataTable.DisableConstraints;
+var
+ i: Integer;
+begin
+ for i := fADODataset.Fields.Count -1 downto 0 do
+ begin
+ fADODataset.Fields[i].Required := False;
+ end;
+end;
+
+procedure TDAADODataTable.EnableConstraints;
+var
+ i: Integer;
+begin
+ for i := fADODataset.Fields.Count -1 downto 0 do
+ begin
+ if i <> 0 then
+ fADODataset.Fields[i].Required := Fields[i -1].Required;
+ end;
+end;
+
+{ TDAADODataset }
+
+procedure TDAADODataset.DataEvent(Event: TDataEvent; Info: Integer);
+begin
+ if FLocateRecordMode and (Event = deCheckBrowseMode) and (Info = 0) and (Self.State = dsBrowse) then
+ // nothing
+ else
+ inherited;
+end;
+
+function TDAADODataset.GetDataTable: TDADataTable;
+begin
+ result := TDADataTable(Owner);
+end;
+
+procedure TDAADODataset.InternalInitFieldDefs;
+begin
+ inherited;
+end;
+
+procedure TDAADODataset.InternalRefresh;
+begin
+ // Does nothing
+end;
+
+function TDAADODataset.Locate(const KeyFields: string;
+ const KeyValues: Variant; Options: TLocateOptions): Boolean;
+begin
+ FLocateRecordMode:=True;
+ try
+ Result := inherited Locate(KeyFields,KeyValues,Options);
+ finally
+ FLocateRecordMode:= False;
+ end;
+end;
+
+function TDAADODataset.Lookup(const KeyFields: string;
+ const KeyValues: Variant; const ResultFields: string): Variant;
+begin
+ FLocateRecordMode:=True;
+ try
+ Result := inherited Lookup(KeyFields, KeyValues, ResultFields);
+ finally
+ FLocateRecordMode:= False;
+ end;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDAADOInterfaces.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAADOInterfaces.pas
new file mode 100644
index 0000000..ea1cf35
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAADOInterfaces.pas
@@ -0,0 +1,1192 @@
+unit uDAADOInterfaces;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up }
+{ platform: Win32 }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ uDAInterfaces, uDAEngine, uROClasses;
+
+const
+ stdMSSQL_ConnectionString = 'User ID=%s;Password=%s;Initial Catalog=%s;Data Source=%s';
+
+ // OLE DB Services = -2 means we don't want ADO Connection pooling done for us!
+ stdADO_ConnectionString = 'Provider=%s;' + stdMSSQL_ConnectionString + ';OLE DB SERVICES=-2';
+
+ MSSQL_DriverType = 'MSSQL';
+ Access_DriverType = 'Access';
+ FoxPro_DriverType ='FoxPro';
+ ODBC_DriverType = '';//'ODBC';
+ ASA_DriverType = 'ASA';
+ Sybase_DriverType = 'Sybase';
+ Informix_DriverType = 'Informix';
+ DB2_DriverType = 'DB2';
+ Paradox_DriverType = 'Paradox';
+
+const
+ // Standard OLEDB providers identifiers
+ oledb_UnknownId = '???';
+ oledb_MSSQLId = 'SQLOLEDB.1';
+ oledb_JetId = 'Microsoft.Jet.OLEDB.4.0';
+ oledb_OracleId = 'MSDAORA.1';
+ oledb_ODBCId = 'MSDASQL.1';
+ oledb_MSSQL2005Id ='SQLNCLI.1';
+ oledb_PostgresqlId = 'PostgreSQL.1';
+ oleDb_VisualFoxProId = 'VFPOLEDB.1';
+
+type
+ // Standard OLEDB providers enumerated
+ TDAOleDBProviderType = (oledb_Unknown,
+ oledb_MSSQL,
+ oledb_Jet,
+ oledb_Oracle,
+ oledb_ODBC,
+ oledb_MSSQL2005,
+ oledb_Postgresql,
+ oleDb_VisualFoxPro);
+
+const
+ // Standard OLEDB providers identifier array (useful for lookups)
+ OleDBProviders: array[TDAOleDBProviderType] of string = (
+ oledb_UnknownId,
+ oledb_MSSQLId,
+ oledb_JetId,
+ oledb_OracleId,
+ oledb_ODBCId,
+ oledb_MSSQL2005Id,
+ oledb_PostgresqlId,
+ oleDb_VisualFoxProId);
+
+type
+ { IADOConnection
+ For identification purposes. Implemented by all ADO connections and also those that target MSSQL-only such as SDAC }
+ IDAADOConnection = interface(IDAConnection)
+ ['{979D10CF-FD56-4C16-8074-338CADA9F1CD}']
+ function GetProviderName: string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetProviderType: TDAOleDBProviderType; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ property ProviderName: string read GetProviderName;
+ property ProviderType: TDAOleDBProviderType read GetProviderType;
+
+ function GetCommandTimeout: Integer; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetCommandTimeout(const Value: Integer); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ property CommandTimeout: Integer read GetCommandTimeout write SetCommandTimeout;
+ end;
+
+ TDAMSConnection = class(TDAEConnection,IDACanQueryDatabaseNames)
+ protected
+ fMSSQLSchemaEnabled: Boolean;
+ procedure DoGetTableNames(out List: IROStrings); override;
+ procedure DoGetStoredProcedureNames(out List: IROStrings); override;
+ procedure DoGetViewNames(out List: IROStrings); override;
+ function DoGetLastAutoInc(const GeneratorName: string): integer; override;
+ function CreateMacroProcessor: TDASQLMacroProcessor; override;
+ procedure DoGetTableFields(const aTableName: string; out Fields: TDAFieldCollection); override;
+ procedure DoGetForeignKeys(out ForeignKeys: TDADriverForeignKeyCollection); override;
+ function GetSPSelectSyntax(HasArguments: Boolean): String; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function IdentifierNeedsQuoting(const iIdentifier: string): boolean; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ // IDACanQueryDatabaseNames
+ function GetDatabaseNames: IROStrings;
+ public
+ property MSSQLSchemaEnabled: Boolean read fMSSQLSchemaEnabled write fMSSQLSchemaEnabled;
+ end;
+
+ TDAMSSQLDriver = class(TDAEDriver)
+ protected
+ function GetDefaultConnectionType(const AuxDriver: string): string; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ end;
+
+function OleDBDriverIdToOleDBProviderType(const anID: string): TDAOleDBProviderType;
+procedure MSSQL_GetAuxParams(const List: IROStrings);
+procedure MSSQL_DoGetNames(Query: IDADataset; AList: IROStrings; AObjectType: TDAObjecttype; SchemaEnabled: Boolean);
+function MSSQL_DoGetLastAutoInc(const GeneratorName: string;Query: IDADataset): integer;
+function MSSQL_CreateMacroProcessor: TDASQLMacroProcessor;
+procedure MSSQL_DoGetTableFields(const aTableName: string; Query: IDADataset; out Fields: TDAFieldCollection);
+procedure MSSQL_DoGetForeignKeys(Query: IDADataset; ForeignKeys: TDADriverForeignKeyCollection; SchemaEnabled: Boolean);
+function MSSQL_GetSPSelectSyntax(HasArguments: Boolean): String;
+function MSSQL_IdentifierNeedsQuoting(const iIdentifier: string): boolean;
+function MSSQL_GetQuoteChars: TDAQuoteCharArray;
+function MSSQL_GetDatabaseNames(aConnection:TDAEConnection): IROStrings;
+function MSACCESS_GetFileExtensions: IROStrings;
+
+implementation
+
+uses
+ SysUtils, {$IFDEF MSWINDOWS} Windows,{$ENDIF}
+ uDAMacroProcessors;
+
+const
+ MSSQL_MasterDatabase = 'master';
+ MSSQL_GetDatabaseNames_SQL = 'select Name from sysdatabases order by Name';
+
+var
+ ado_reservedwords: array of string;
+
+function OleDBDriverIdToOleDBProviderType(const anID: string): TDAOleDBProviderType;
+var
+ x: TDAOleDBProviderType;
+begin
+ result := oledb_Unknown;
+
+ for x := Low(TDAOleDBProviderType) to High(TDAOleDBProviderType) do
+ if SameText(OleDBProviders[x], anID) then begin
+ result := x;
+ Exit;
+ end;
+end;
+
+procedure MSSQL_GetAuxParams(const List: IROStrings);
+begin
+ List.Add('Integrated Security=SSPI');
+ List.Add('Schemas=0,1');
+end;
+
+procedure MSSQL_DoGetNames(Query: IDADataset; AList: IROStrings; AObjectType: TDAObjecttype; SchemaEnabled: Boolean);
+var
+ fWhere: string;
+begin
+ try
+ case AObjectType of
+ dotTable: begin
+ if not SchemaEnabled then fWhere:='AND (TABLE_SCHEMA = ''dbo'') ';
+ Query.SQL := 'SELECT TABLE_SCHEMA, TABLE_NAME FROM INFORMATION_SCHEMA.TABLES ' +
+ 'WHERE (OBJECTPROPERTY(OBJECT_ID(TABLE_SCHEMA + ''.'' + TABLE_NAME), ''IsMsShipped'') = 0) ' +
+ 'AND (TABLE_TYPE = ''BASE TABLE'') ' +fWhere+
+ 'ORDER BY 1, 2';
+ end;
+ dotProcedure: begin
+ if not SchemaEnabled then fWhere:='AND (ROUTINE_SCHEMA = ''dbo'') ';
+ Query.SQL := 'SELECT ROUTINE_SCHEMA, ROUTINE_NAME ' +
+ 'FROM INFORMATION_SCHEMA.ROUTINES ' +
+ 'WHERE (OBJECTPROPERTY(OBJECT_ID(ROUTINE_SCHEMA + ''.'' + ROUTINE_NAME), ''IsMsShipped'') = 0) AND (ROUTINE_TYPE = ''PROCEDURE'') ' +fWhere+
+ 'ORDER BY 1, 2';
+ end;
+ dotView: begin
+ if not SchemaEnabled then fWhere:='AND (TABLE_SCHEMA = ''dbo'') ';
+ Query.SQL := 'SELECT TABLE_SCHEMA, TABLE_NAME FROM INFORMATION_SCHEMA.TABLES ' +
+ 'WHERE (OBJECTPROPERTY(OBJECT_ID(TABLE_SCHEMA + ''.'' + TABLE_NAME), ''IsMsShipped'') = 0) ' +
+ 'AND (TABLE_TYPE = ''VIEW'') ' +
+ 'ORDER BY 1, 2';
+ end;
+ else
+ end;
+ Query.Open;
+ while not Query.EOF do begin
+ if SchemaEnabled then
+ AList.Add(Format('%s.%s', [Trim(Query.Fields[0].AsString), Trim(Query.Fields[1].AsString)]))
+ else
+ AList.Add(Trim(Query.Fields[1].AsString));
+ Query.Next;
+ end;
+ Query.Close;
+ finally
+ Query := nil;
+ end;
+end;
+
+function MSSQL_DoGetLastAutoInc(const GeneratorName: string;Query: IDADataset): integer;
+begin
+ try
+ if Trim(GeneratorName) <> '' then
+ Query.SQL := 'SELECT IsNull(Ident_Current(' + QuotedStr(GeneratorName) + '), 0) as LastInc'
+ else
+ Query.SQL := 'SELECT IsNull(@@Identity, 0) as LastInc';
+ Query.Open;
+ result := Query.Fields[0].Value;
+ finally
+ Query := nil;
+ end;
+end;
+
+function MSSQL_CreateMacroProcessor: TDASQLMacroProcessor;
+begin
+ Result := TDAMSSQLMacroProcessor.Create;
+end;
+
+procedure MSSQL_DoGetTableFields(const aTableName: string; Query: IDADataset; out Fields: TDAFieldCollection);
+var
+ dra: TDAField;
+begin
+ Fields := TDAFieldCollection.Create(nil);
+ try
+ Query.SQL := 'SELECT * FROM ' + aTableName + ' WHERE 1=0';
+ Query.Open;
+ Fields.Assign(Query.Fields);
+ Query.Close;
+
+ Query.SQL := 'exec sp_MShelpcolumns '+QuotedStr(aTableName)+', null, ''id'', 1;';
+ Query.Open;
+ try
+ while not Query.Eof do begin
+ dra := Fields.FindField(Trim(Query.FieldByName('COL_NAME').AsString));
+ if Assigned(dra) then
+ begin
+ dra.InPrimaryKey := (Query.FieldByName('COL_FLAGS').AsInteger and $04) = $04;
+ dra.Required := not Query.FieldByName('COL_NULL').AsBoolean;
+ if Query.FieldByName('COL_IDENTITY').AsBoolean then begin
+ if (dra.DataType = datLargeInt) or (dra.DataType = datLargeUInt) then
+ dra.DataType := datLargeAutoInc
+ else
+ dra.DataType := datAutoInc;
+ dra.GeneratorName := aTableName;
+ end;
+ if (AnsiCompareText(Query.FieldByName('COL_BASETYPENAME').asString,'decimal') =0) or
+ (AnsiCompareText(Query.FieldByName('COL_BASETYPENAME').asString,'numeric') =0) then begin
+ dra.DataType := datDecimal;
+ Dra.DecimalScale := Query.FieldByName('COL_SCALE').AsInteger;
+ Dra.DecimalPrecision := Query.FieldByName('COL_PREC').AsInteger;
+ end
+ else
+ if (AnsiCompareText(Query.FieldByName('COL_BASETYPENAME').asString,'uniqueidentifier') =0) then
+ dra.DataType := datGuid
+ else
+ if (AnsiCompareText(Query.FieldByName('COL_BASETYPENAME').asString,'money') =0) or
+ (AnsiCompareText(Query.FieldByName('COL_BASETYPENAME').asString,'smallmoney') =0) then
+ dra.DataType := datCurrency
+ else
+ if (AnsiCompareText(Query.FieldByName('COL_BASETYPENAME').asString,'timestamp') =0) then begin
+ dra.DataType := datBlob;
+ dra.BlobType := dabtTimestamp;
+ dra.LogChanges := false;
+ end;
+ end;
+ Query.Next;
+ end;
+ finally
+ Query.Close;
+ end;
+ finally
+ Query:=nil;
+ end;
+end;
+
+procedure MSSQL_DoGetForeignKeys(Query: IDADataset; ForeignKeys: TDADriverForeignKeyCollection; SchemaEnabled: Boolean);
+const
+ s_fk = 'SELECT ' +
+ 'KCU1.CONSTRAINT_NAME AS CONSTRAINT_NAME, ' +
+ 'KCU1.TABLE_SCHEMA AS FK_TABLE_SCHEMA, ' +
+ 'KCU1.TABLE_NAME AS FK_TABLE_NAME, ' +
+ 'KCU1.COLUMN_NAME AS FK_COLUMN_NAME, ' +
+ 'KCU2.TABLE_SCHEMA AS PK_TABLE_SCHEMA, ' +
+ 'KCU2.TABLE_NAME AS PK_TABLE_NAME, ' +
+ 'KCU2.COLUMN_NAME AS PK_COLUMN_NAME ' +
+ 'FROM ' +
+ 'INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS RC ' +
+ 'JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE KCU1 ON ' +
+ 'KCU1.CONSTRAINT_CATALOG = RC.CONSTRAINT_CATALOG AND KCU1.CONSTRAINT_SCHEMA = RC.CONSTRAINT_SCHEMA AND KCU1.CONSTRAINT_NAME = RC.CONSTRAINT_NAME ' +
+ 'JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE KCU2 ON ' +
+ 'KCU2.CONSTRAINT_CATALOG = RC.UNIQUE_CONSTRAINT_CATALOG AND KCU2.CONSTRAINT_SCHEMA = RC.UNIQUE_CONSTRAINT_SCHEMA AND KCU2.CONSTRAINT_NAME = RC.UNIQUE_CONSTRAINT_NAME AND KCU2.ORDINAL_POSITION = KCU1.ORDINAL_POSITION ';
+ s_fk_where = ' AND (KCU1.TABLE_SCHEMA = ''dbo'') AND (KCU2.TABLE_SCHEMA = ''dbo'') ';
+ s_fk_Order = 'ORDER BY KCU1.TABLE_NAME, KCU1.CONSTRAINT_NAME, KCU2.TABLE_NAME, KCU1.ORDINAL_POSITION';
+var
+ fWhere: String;
+ lCurrConstraint: string;
+ lCurrFK: TDADriverForeignKey;
+ l_name: string;
+begin
+ lCurrConstraint := '';
+ lCurrFK := nil;
+ try
+ if not SchemaEnabled then fWhere:= s_fk_where;
+ Query.SQL := s_fk + fWhere + s_fk_Order;
+ Query.Open;
+ while not Query.Eof do begin
+ l_Name := Trim(Query.Fields[0].AsString);
+ if lCurrConstraint <> l_name then begin
+ lCurrConstraint := l_name;
+ lCurrFK := ForeignKeys.Add();
+ with lCurrFK do begin
+ Name := l_name;
+ FKField := Trim(Query.Fields[3].AsString);
+ PKField := Trim(Query.Fields[6].AsString);
+ if SchemaEnabled then begin
+ FKTable := Format('%s.%s', [Trim(Query.Fields[1].AsString), Trim(Query.Fields[2].AsString)]);
+ PKTable := Format('%s.%s', [Trim(Query.Fields[4].AsString), Trim(Query.Fields[5].AsString)]);
+ end else
+ begin
+ FKTable := Trim(Query.Fields[2].AsString);
+ PKTable := Trim(Query.Fields[5].AsString);
+ end;
+ end;
+ end else begin
+ with lCurrFK do begin
+ FKField := FKField + ';' + Trim(Query.Fields[3].AsString);
+ PKField := PKField + ';' + Trim(Query.Fields[6].AsString);
+ end;
+ end;
+ Query.Next;
+ end;
+ Query.Close;
+ finally
+ Query := nil;
+ end;
+end;
+
+function MSSQL_GetSPSelectSyntax(HasArguments: Boolean): String;
+begin
+ Result := 'EXEC {0} {1}';
+end;
+
+function MSSQL_IdentifierNeedsQuoting(const iIdentifier: string): boolean;
+begin
+ result := TestIdentifier(iIdentifier,ado_reservedwords);
+end;
+
+function MSSQL_GetQuoteChars: TDAQuoteCharArray;
+begin
+ result[0] := '[';
+ result[1] := ']';
+end;
+
+function MSSQL_GetDatabaseNames(aConnection:TDAEConnection): IROStrings;
+begin
+ Result := Engine_GetDatabaseNames(aConnection, MSSQL_MasterDatabase, MSSQL_GetDatabaseNames_SQL);
+end;
+
+{ TDAMSConnection }
+
+function TDAMSConnection.CreateMacroProcessor: TDASQLMacroProcessor;
+begin
+ Result := MSSQL_CreateMacroProcessor;
+end;
+
+procedure TDAMSConnection.DoGetForeignKeys(
+ out ForeignKeys: TDADriverForeignKeyCollection);
+begin
+ inherited;
+ MSSQL_DoGetForeignKeys(GetDatasetClass.Create(Self), ForeignKeys, MSSQLSchemaEnabled);
+end;
+
+function TDAMSConnection.DoGetLastAutoInc(const GeneratorName: string): integer;
+begin
+ Result := MSSQL_DoGetLastAutoInc(GeneratorName,GetDatasetClass.Create(Self));
+end;
+
+procedure TDAMSConnection.DoGetStoredProcedureNames(out List: IROStrings);
+begin
+ inherited DoGetStoredProcedureNames(List);
+ MSSQL_DoGetNames(GetDatasetClass.Create(Self),List,dotProcedure,MSSQLSchemaEnabled);
+end;
+
+procedure TDAMSConnection.DoGetTableFields(const aTableName: string;
+ out Fields: TDAFieldCollection);
+begin
+ MSSQL_DoGetTableFields(QuoteIdentifierIfNeeded(aTableName),GetDatasetClass.Create(Self),Fields);
+end;
+
+procedure TDAMSConnection.DoGetTableNames(out List: IROStrings);
+begin
+ inherited DoGetTableNames(List);
+ MSSQL_DoGetNames(GetDatasetClass.Create(Self),List,dotTable,MSSQLSchemaEnabled);
+end;
+
+procedure TDAMSConnection.DoGetViewNames(out List: IROStrings);
+begin
+ inherited DoGetViewNames(List);
+ MSSQL_DoGetNames(GetDatasetClass.Create(Self),List,dotView,MSSQLSchemaEnabled);
+end;
+
+function TDAMSConnection.GetDatabaseNames: IROStrings;
+begin
+ Result := MSSQL_GetDatabaseNames(Self);
+end;
+
+function TDAMSConnection.GetSPSelectSyntax(HasArguments: Boolean): String;
+begin
+ Result := MSSQL_GetSPSelectSyntax(HasArguments);
+end;
+
+procedure ADO_InitializeReservedWords;
+begin
+ // http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.etools.ejbbatchdeploy.doc/topics/rsqlMSSQLSERVER_2005.html
+ SetLength(ado_reservedwords, 747);
+ // sorted with TStringList.Sort (bds2007)
+ ado_reservedwords[0] := 'A';
+ ado_reservedwords[1] := 'ABORT';
+ ado_reservedwords[2] := 'ABS';
+ ado_reservedwords[3] := 'ABSOLUTE';
+ ado_reservedwords[4] := 'ACCESS';
+ ado_reservedwords[5] := 'ACOS';
+ ado_reservedwords[6] := 'ACQUIRE';
+ ado_reservedwords[7] := 'ACTION';
+ ado_reservedwords[8] := 'ACTIVATE';
+ ado_reservedwords[9] := 'ADA';
+ ado_reservedwords[10] := 'ADD';
+ ado_reservedwords[11] := 'ADDFORM';
+ ado_reservedwords[12] := 'ADMIN';
+ ado_reservedwords[13] := 'AFTER';
+ ado_reservedwords[14] := 'AGGREGATE';
+ ado_reservedwords[15] := 'ALIAS';
+ ado_reservedwords[16] := 'ALL';
+ ado_reservedwords[17] := 'ALLOCATE';
+ ado_reservedwords[18] := 'ALTER';
+ ado_reservedwords[19] := 'AN';
+ ado_reservedwords[20] := 'ANALYZE';
+ ado_reservedwords[21] := 'AND';
+ ado_reservedwords[22] := 'ANY';
+ ado_reservedwords[23] := 'APPEND';
+ ado_reservedwords[24] := 'ARCHIVE';
+ ado_reservedwords[25] := 'ARCHIVELOG';
+ ado_reservedwords[26] := 'ARE';
+ ado_reservedwords[27] := 'ARRAY';
+ ado_reservedwords[28] := 'ARRAYLEN';
+ ado_reservedwords[29] := 'AS';
+ ado_reservedwords[30] := 'ASC';
+ ado_reservedwords[31] := 'ASCII';
+ ado_reservedwords[32] := 'ASIN';
+ ado_reservedwords[33] := 'ASSERTION';
+ ado_reservedwords[34] := 'AT';
+ ado_reservedwords[35] := 'ATAN';
+ ado_reservedwords[36] := 'AUDIT';
+ ado_reservedwords[37] := 'AUTHORIZATION';
+ ado_reservedwords[38] := 'AVG';
+ ado_reservedwords[39] := 'AVGU';
+ ado_reservedwords[40] := 'BACKUP';
+ ado_reservedwords[41] := 'BECOME';
+ ado_reservedwords[42] := 'BEFORE';
+ ado_reservedwords[43] := 'BEGIN';
+ ado_reservedwords[44] := 'BETWEEN';
+ ado_reservedwords[45] := 'BIGINT';
+ ado_reservedwords[46] := 'BINARY';
+ ado_reservedwords[47] := 'BIND';
+ ado_reservedwords[48] := 'BINDING';
+ ado_reservedwords[49] := 'BIT';
+ ado_reservedwords[50] := 'BLOB';
+ ado_reservedwords[51] := 'BLOCK';
+ ado_reservedwords[52] := 'BODY';
+ ado_reservedwords[53] := 'BOOLEAN';
+ ado_reservedwords[54] := 'BOTH';
+ ado_reservedwords[55] := 'BREADTH';
+ ado_reservedwords[56] := 'BREAK';
+ ado_reservedwords[57] := 'BREAKDISPLAY';
+ ado_reservedwords[58] := 'BROWSE';
+ ado_reservedwords[59] := 'BUFFERPOOL';
+ ado_reservedwords[60] := 'BULK';
+ ado_reservedwords[61] := 'BY';
+ ado_reservedwords[62] := 'BYREF';
+ ado_reservedwords[63] := 'CACHE';
+ ado_reservedwords[64] := 'CALL';
+ ado_reservedwords[65] := 'CALLPROC';
+ ado_reservedwords[66] := 'CANCEL';
+ ado_reservedwords[67] := 'CAPTURE';
+ ado_reservedwords[68] := 'CASCADE';
+ ado_reservedwords[69] := 'CASCADED';
+ ado_reservedwords[70] := 'CASE';
+ ado_reservedwords[71] := 'CAST';
+ ado_reservedwords[72] := 'CATALOG';
+ ado_reservedwords[73] := 'CCSID';
+ ado_reservedwords[74] := 'CEILING';
+ ado_reservedwords[75] := 'CHANGE';
+ ado_reservedwords[76] := 'CHAR';
+ ado_reservedwords[77] := 'CHARACTER';
+ ado_reservedwords[78] := 'CHARTOROWID';
+ ado_reservedwords[79] := 'CHECK';
+ ado_reservedwords[80] := 'CHECKPOINT';
+ ado_reservedwords[81] := 'CHR';
+ ado_reservedwords[82] := 'CLASS';
+ ado_reservedwords[83] := 'CLEANUP';
+ ado_reservedwords[84] := 'CLEAR';
+ ado_reservedwords[85] := 'CLEARROW';
+ ado_reservedwords[86] := 'CLOB';
+ ado_reservedwords[87] := 'CLOSE';
+ ado_reservedwords[88] := 'CLUSTER';
+ ado_reservedwords[89] := 'CLUSTERED';
+ ado_reservedwords[90] := 'COALESCE';
+ ado_reservedwords[91] := 'COBOL';
+ ado_reservedwords[92] := 'COLGROUP';
+ ado_reservedwords[93] := 'COLLATE';
+ ado_reservedwords[94] := 'COLLATION';
+ ado_reservedwords[95] := 'COLLECTION';
+ ado_reservedwords[96] := 'COLUMN';
+ ado_reservedwords[97] := 'COMMAND';
+ ado_reservedwords[98] := 'COMMENT';
+ ado_reservedwords[99] := 'COMMIT';
+ ado_reservedwords[100] := 'COMMITTED';
+ ado_reservedwords[101] := 'COMPILE';
+ ado_reservedwords[102] := 'COMPLETION';
+ ado_reservedwords[103] := 'COMPLEX';
+ ado_reservedwords[104] := 'COMPRESS';
+ ado_reservedwords[105] := 'COMPUTE';
+ ado_reservedwords[106] := 'CONCAT';
+ ado_reservedwords[107] := 'CONFIRM';
+ ado_reservedwords[108] := 'CONNECT';
+ ado_reservedwords[109] := 'CONNECTION';
+ ado_reservedwords[110] := 'CONSTRAINT';
+ ado_reservedwords[111] := 'CONSTRAINTS';
+ ado_reservedwords[112] := 'CONSTRUCTOR';
+ ado_reservedwords[113] := 'CONTAINS';
+ ado_reservedwords[114] := 'CONTAINSTABLE';
+ ado_reservedwords[115] := 'CONTENTS';
+ ado_reservedwords[116] := 'CONTINUE';
+ ado_reservedwords[117] := 'CONTROLFILE';
+ ado_reservedwords[118] := 'CONTROLROW';
+ ado_reservedwords[119] := 'CONVERT';
+ ado_reservedwords[120] := 'COPY';
+ ado_reservedwords[121] := 'CORRESPONDING';
+ ado_reservedwords[122] := 'COS';
+ ado_reservedwords[123] := 'COUNT';
+ ado_reservedwords[124] := 'COUNTU';
+ ado_reservedwords[125] := 'CREATE';
+ ado_reservedwords[126] := 'CROSS';
+ ado_reservedwords[127] := 'CUBE';
+ ado_reservedwords[128] := 'CURRENT';
+ ado_reservedwords[129] := 'CURRENT_DATE';
+ ado_reservedwords[130] := 'CURRENT_PATH';
+ ado_reservedwords[131] := 'CURRENT_ROLE';
+ ado_reservedwords[132] := 'CURRENT_TIME';
+ ado_reservedwords[133] := 'CURRENT_TIMESTAMP';
+ ado_reservedwords[134] := 'CURRENT_USER';
+ ado_reservedwords[135] := 'CURSOR';
+ ado_reservedwords[136] := 'CVAR';
+ ado_reservedwords[137] := 'CYCLE';
+ ado_reservedwords[138] := 'DATA';
+ ado_reservedwords[139] := 'DATABASE';
+ ado_reservedwords[140] := 'DATAFILE';
+ ado_reservedwords[141] := 'DATAHANDLER';
+ ado_reservedwords[142] := 'DATAPAGES';
+ ado_reservedwords[143] := 'DATE';
+ ado_reservedwords[144] := 'DAY';
+ ado_reservedwords[145] := 'DAYOFMONTH';
+ ado_reservedwords[146] := 'DAYOFWEEK';
+ ado_reservedwords[147] := 'DAYOFYEAR';
+ ado_reservedwords[148] := 'DAYS';
+ ado_reservedwords[149] := 'DBA';
+ ado_reservedwords[150] := 'DBCC';
+ ado_reservedwords[151] := 'DBSPACE';
+ ado_reservedwords[152] := 'DEALLOCATE';
+ ado_reservedwords[153] := 'DEC';
+ ado_reservedwords[154] := 'DECIMAL';
+ ado_reservedwords[155] := 'DECLARATION';
+ ado_reservedwords[156] := 'DECLARE';
+ ado_reservedwords[157] := 'DECODE';
+ ado_reservedwords[158] := 'DEFAULT';
+ ado_reservedwords[159] := 'DEFERRABLE';
+ ado_reservedwords[160] := 'DEFERRED';
+ ado_reservedwords[161] := 'DEFINE';
+ ado_reservedwords[162] := 'DEFINITION';
+ ado_reservedwords[163] := 'DEGREES';
+ ado_reservedwords[164] := 'DELETE';
+ ado_reservedwords[165] := 'DELETEROW';
+ ado_reservedwords[166] := 'DENY';
+ ado_reservedwords[167] := 'DEPTH';
+ ado_reservedwords[168] := 'DEREF';
+ ado_reservedwords[169] := 'DESC';
+ ado_reservedwords[170] := 'DESCRIBE';
+ ado_reservedwords[171] := 'DESCRIPTOR';
+ ado_reservedwords[172] := 'DESTROY';
+ ado_reservedwords[173] := 'DESTRUCTOR';
+ ado_reservedwords[174] := 'DETERMINISTIC';
+ ado_reservedwords[175] := 'DHTYPE';
+ ado_reservedwords[176] := 'DIAGNOSTICS';
+ ado_reservedwords[177] := 'DICTIONARY';
+ ado_reservedwords[178] := 'DIRECT';
+ ado_reservedwords[179] := 'DISABLE';
+ ado_reservedwords[180] := 'DISCONNECT';
+ ado_reservedwords[181] := 'DISK';
+ ado_reservedwords[182] := 'DISMOUNT';
+ ado_reservedwords[183] := 'DISPLAY';
+ ado_reservedwords[184] := 'DISTINCT';
+ ado_reservedwords[185] := 'DISTRIBUTE';
+ ado_reservedwords[186] := 'DISTRIBUTED';
+ ado_reservedwords[187] := 'DO';
+ ado_reservedwords[188] := 'DOMAIN';
+ ado_reservedwords[189] := 'DOUBLE';
+ ado_reservedwords[190] := 'DOWN';
+ ado_reservedwords[191] := 'DROP';
+ ado_reservedwords[192] := 'DUMMY';
+ ado_reservedwords[193] := 'DUMP';
+ ado_reservedwords[194] := 'DYNAMIC';
+ ado_reservedwords[195] := 'EACH';
+ ado_reservedwords[196] := 'EDITPROC';
+ ado_reservedwords[197] := 'ELSE';
+ ado_reservedwords[198] := 'ELSEIF';
+ ado_reservedwords[199] := 'ENABLE';
+ ado_reservedwords[200] := 'END';
+ ado_reservedwords[201] := 'ENDDATA';
+ ado_reservedwords[202] := 'ENDDISPLAY';
+ ado_reservedwords[203] := 'ENDEXEC';
+ ado_reservedwords[204] := 'END-EXEC';
+ ado_reservedwords[205] := 'ENDFORMS';
+ ado_reservedwords[206] := 'ENDIF';
+ ado_reservedwords[207] := 'ENDLOOP';
+ ado_reservedwords[208] := 'ENDSELECT';
+ ado_reservedwords[209] := 'ENDWHILE';
+ ado_reservedwords[210] := 'EQUALS';
+ ado_reservedwords[211] := 'ERASE';
+ ado_reservedwords[212] := 'ERRLVL';
+ ado_reservedwords[213] := 'ERROREXIT';
+ ado_reservedwords[214] := 'ESCAPE';
+ ado_reservedwords[215] := 'EVENTS';
+ ado_reservedwords[216] := 'EVERY';
+ ado_reservedwords[217] := 'EXCEPT';
+ ado_reservedwords[218] := 'EXCEPTION';
+ ado_reservedwords[219] := 'EXCEPTIONS';
+ ado_reservedwords[220] := 'EXCLUDE';
+ ado_reservedwords[221] := 'EXCLUDING';
+ ado_reservedwords[222] := 'EXCLUSIVE';
+ ado_reservedwords[223] := 'EXEC';
+ ado_reservedwords[224] := 'EXECUTE';
+ ado_reservedwords[225] := 'EXISTS';
+ ado_reservedwords[226] := 'EXIT';
+ ado_reservedwords[227] := 'EXP';
+ ado_reservedwords[228] := 'EXPLAIN';
+ ado_reservedwords[229] := 'EXPLICIT';
+ ado_reservedwords[230] := 'EXTENT';
+ ado_reservedwords[231] := 'EXTERNAL';
+ ado_reservedwords[232] := 'EXTERNALLY';
+ ado_reservedwords[233] := 'EXTRACT';
+ ado_reservedwords[234] := 'FALSE';
+ ado_reservedwords[235] := 'FETCH';
+ ado_reservedwords[236] := 'FIELD';
+ ado_reservedwords[237] := 'FIELDPROC';
+ ado_reservedwords[238] := 'FILE';
+ ado_reservedwords[239] := 'FILLFACTOR';
+ ado_reservedwords[240] := 'FINALIZE';
+ ado_reservedwords[241] := 'FINALIZE';
+ ado_reservedwords[242] := 'FIRST';
+ ado_reservedwords[243] := 'FLOAT';
+ ado_reservedwords[244] := 'FLOOR';
+ ado_reservedwords[245] := 'FLOPPY';
+ ado_reservedwords[246] := 'FLUSH';
+ ado_reservedwords[247] := 'FOR';
+ ado_reservedwords[248] := 'FORCE';
+ ado_reservedwords[249] := 'FOREIGN';
+ ado_reservedwords[250] := 'FORMDATA';
+ ado_reservedwords[251] := 'FORMINIT';
+ ado_reservedwords[252] := 'FORMS';
+ ado_reservedwords[253] := 'FORTRAN';
+ ado_reservedwords[254] := 'FOUND';
+ ado_reservedwords[255] := 'FREE';
+ ado_reservedwords[256] := 'FREELIST';
+ ado_reservedwords[257] := 'FREELISTS';
+ ado_reservedwords[258] := 'FREETEXT';
+ ado_reservedwords[259] := 'FREETEXTTABLE';
+ ado_reservedwords[260] := 'FROM';
+ ado_reservedwords[261] := 'FULL';
+ ado_reservedwords[262] := 'FUNCTION';
+ ado_reservedwords[263] := 'GENERAL';
+ ado_reservedwords[264] := 'GET';
+ ado_reservedwords[265] := 'GETCURRENTCONNECTION';
+ ado_reservedwords[266] := 'GETFORM';
+ ado_reservedwords[267] := 'GETOPER';
+ ado_reservedwords[268] := 'GETROW';
+ ado_reservedwords[269] := 'GLOBAL';
+ ado_reservedwords[270] := 'GO';
+ ado_reservedwords[271] := 'GOTO';
+ ado_reservedwords[272] := 'GRANT';
+ ado_reservedwords[273] := 'GRANTED';
+ ado_reservedwords[274] := 'GRAPHIC';
+ ado_reservedwords[275] := 'GREATEST';
+ ado_reservedwords[276] := 'GROUP';
+ ado_reservedwords[277] := 'GROUPING';
+ ado_reservedwords[278] := 'GROUPS';
+ ado_reservedwords[279] := 'HASH';
+ ado_reservedwords[280] := 'HAVING';
+ ado_reservedwords[281] := 'HELP';
+ ado_reservedwords[282] := 'HELPFILE';
+ ado_reservedwords[283] := 'HOLDLOCK';
+ ado_reservedwords[284] := 'HOST';
+ ado_reservedwords[285] := 'HOUR';
+ ado_reservedwords[286] := 'HOURS';
+ ado_reservedwords[287] := 'IDENTIFIED';
+ ado_reservedwords[288] := 'IDENTITY';
+ ado_reservedwords[289] := 'IDENTITYCOL';
+ ado_reservedwords[290] := 'IF';
+ ado_reservedwords[291] := 'IFNULL';
+ ado_reservedwords[292] := 'IGNORE';
+ ado_reservedwords[293] := 'IIMESSAGE';
+ ado_reservedwords[294] := 'IIPRINTF';
+ ado_reservedwords[295] := 'IMMEDIATE';
+ ado_reservedwords[296] := 'IMPORT';
+ ado_reservedwords[297] := 'IN';
+ ado_reservedwords[298] := 'INCLUDE';
+ ado_reservedwords[299] := 'INCLUDING';
+ ado_reservedwords[300] := 'INCREMENT';
+ ado_reservedwords[301] := 'INDEX';
+ ado_reservedwords[302] := 'INDEXPAGES';
+ ado_reservedwords[303] := 'INDICATOR';
+ ado_reservedwords[304] := 'INITCAP';
+ ado_reservedwords[305] := 'INITIAL';
+ ado_reservedwords[306] := 'INITIALIZE';
+ ado_reservedwords[307] := 'INITIALLY';
+ ado_reservedwords[308] := 'INITRANS';
+ ado_reservedwords[309] := 'INITTABLE';
+ ado_reservedwords[310] := 'INNER';
+ ado_reservedwords[311] := 'INOUT';
+ ado_reservedwords[312] := 'INPUT';
+ ado_reservedwords[313] := 'INSENSITIVE';
+ ado_reservedwords[314] := 'INSERT';
+ ado_reservedwords[315] := 'INSERTROW';
+ ado_reservedwords[316] := 'INSTANCE';
+ ado_reservedwords[317] := 'INSTR';
+ ado_reservedwords[318] := 'INT';
+ ado_reservedwords[319] := 'INTEGER';
+ ado_reservedwords[320] := 'INTEGRITY';
+ ado_reservedwords[321] := 'INTERFACE';
+ ado_reservedwords[322] := 'INTERSECT';
+ ado_reservedwords[323] := 'INTERVAL';
+ ado_reservedwords[324] := 'INTO';
+ ado_reservedwords[325] := 'IS';
+ ado_reservedwords[326] := 'ISOLATION';
+ ado_reservedwords[327] := 'ITERATE';
+ ado_reservedwords[328] := 'JOIN';
+ ado_reservedwords[329] := 'KEY';
+ ado_reservedwords[330] := 'KILL';
+ ado_reservedwords[331] := 'LABEL';
+ ado_reservedwords[332] := 'LANGUAGE';
+ ado_reservedwords[333] := 'LARGE';
+ ado_reservedwords[334] := 'LAST';
+ ado_reservedwords[335] := 'LATERAL';
+ ado_reservedwords[336] := 'LAYER';
+ ado_reservedwords[337] := 'LEADING';
+ ado_reservedwords[338] := 'LEAST';
+ ado_reservedwords[339] := 'LEFT';
+ ado_reservedwords[340] := 'LENGTH';
+ ado_reservedwords[341] := 'LESS';
+ ado_reservedwords[342] := 'LEVEL';
+ ado_reservedwords[343] := 'LIKE';
+ ado_reservedwords[344] := 'LIMIT';
+ ado_reservedwords[345] := 'LINENO';
+ ado_reservedwords[346] := 'LINK';
+ ado_reservedwords[347] := 'LIST';
+ ado_reservedwords[348] := 'LISTS';
+ ado_reservedwords[349] := 'LOAD';
+ ado_reservedwords[350] := 'LOADTABLE';
+ ado_reservedwords[351] := 'LOCAL';
+ ado_reservedwords[352] := 'LOCALTIME';
+ ado_reservedwords[353] := 'LOCALTIMESTAMP';
+ ado_reservedwords[354] := 'LOCATE';
+ ado_reservedwords[355] := 'LOCATOR';
+ ado_reservedwords[356] := 'LOCK';
+ ado_reservedwords[357] := 'LOCKSIZE';
+ ado_reservedwords[358] := 'LOG';
+ ado_reservedwords[359] := 'LOGFILE';
+ ado_reservedwords[360] := 'LONG';
+ ado_reservedwords[361] := 'LONGINT';
+ ado_reservedwords[362] := 'LOWER';
+ ado_reservedwords[363] := 'LPAD';
+ ado_reservedwords[364] := 'LTRIM';
+ ado_reservedwords[365] := 'LVARBINARY';
+ ado_reservedwords[366] := 'LVARCHAR';
+ ado_reservedwords[367] := 'MAIN';
+ ado_reservedwords[368] := 'MANAGE';
+ ado_reservedwords[369] := 'MANUAL';
+ ado_reservedwords[370] := 'MAP';
+ ado_reservedwords[371] := 'MATCH';
+ ado_reservedwords[372] := 'MAX';
+ ado_reservedwords[373] := 'MAXDATAFILES';
+ ado_reservedwords[374] := 'MAXEXTENTS';
+ ado_reservedwords[375] := 'MAXINSTANCES';
+ ado_reservedwords[376] := 'MAXLOGFILES';
+ ado_reservedwords[377] := 'MAXLOGHISTORY';
+ ado_reservedwords[378] := 'MAXLOGMEMBERS';
+ ado_reservedwords[379] := 'MAXTRANS';
+ ado_reservedwords[380] := 'MAXVALUE';
+ ado_reservedwords[381] := 'MENUITEM';
+ ado_reservedwords[382] := 'MESSAGE';
+ ado_reservedwords[383] := 'MICROSECOND';
+ ado_reservedwords[384] := 'MICROSECONDS';
+ ado_reservedwords[385] := 'MIN';
+ ado_reservedwords[386] := 'MINEXTENTS';
+ ado_reservedwords[387] := 'MINUS';
+ ado_reservedwords[388] := 'MINUTE';
+ ado_reservedwords[389] := 'MINUTES';
+ ado_reservedwords[390] := 'MINVALUE';
+ ado_reservedwords[391] := 'MIRROREXIT';
+ ado_reservedwords[392] := 'MOD';
+ ado_reservedwords[393] := 'MODE';
+ ado_reservedwords[394] := 'MODIFIES';
+ ado_reservedwords[395] := 'MODIFY';
+ ado_reservedwords[396] := 'MODULE';
+ ado_reservedwords[397] := 'MONEY';
+ ado_reservedwords[398] := 'MONTH';
+ ado_reservedwords[399] := 'MONTHS';
+ ado_reservedwords[400] := 'MOUNT';
+ ado_reservedwords[401] := 'MOVE';
+ ado_reservedwords[402] := 'NAMED';
+ ado_reservedwords[403] := 'NAMES';
+ ado_reservedwords[404] := 'NATIONAL';
+ ado_reservedwords[405] := 'NATURAL';
+ ado_reservedwords[406] := 'NCHAR';
+ ado_reservedwords[407] := 'NCLOB';
+ ado_reservedwords[408] := 'NEW';
+ ado_reservedwords[409] := 'NEXT';
+ ado_reservedwords[410] := 'NHEADER';
+ ado_reservedwords[411] := 'NO';
+ ado_reservedwords[412] := 'NOARCHIVELOG';
+ ado_reservedwords[413] := 'NOAUDIT';
+ ado_reservedwords[414] := 'NOCACHE';
+ ado_reservedwords[415] := 'NOCHECK';
+ ado_reservedwords[416] := 'NOCOMPRESS';
+ ado_reservedwords[417] := 'NOCYCLE';
+ ado_reservedwords[418] := 'NOECHO';
+ ado_reservedwords[419] := 'NOMAXVALUE';
+ ado_reservedwords[420] := 'NOMINVALUE';
+ ado_reservedwords[421] := 'NONCLUSTERED';
+ ado_reservedwords[422] := 'NONE';
+ ado_reservedwords[423] := 'NOORDER';
+ ado_reservedwords[424] := 'NORESETLOGS';
+ ado_reservedwords[425] := 'NORMAL';
+ ado_reservedwords[426] := 'NOSORT';
+ ado_reservedwords[427] := 'NOT';
+ ado_reservedwords[428] := 'NOTFOUND';
+ ado_reservedwords[429] := 'NOTRIM';
+ ado_reservedwords[430] := 'NOWAIT';
+ ado_reservedwords[431] := 'NULL';
+ ado_reservedwords[432] := 'NULLIF';
+ ado_reservedwords[433] := 'NULLVALUE';
+ ado_reservedwords[434] := 'NUMBER';
+ ado_reservedwords[435] := 'NUMERIC';
+ ado_reservedwords[436] := 'NUMPARTS';
+ ado_reservedwords[437] := 'NVL';
+ ado_reservedwords[438] := 'OBID';
+ ado_reservedwords[439] := 'OBJECT';
+ ado_reservedwords[440] := 'ODBCINFO';
+ ado_reservedwords[441] := 'OF';
+ ado_reservedwords[442] := 'OFF';
+ ado_reservedwords[443] := 'OFFLINE';
+ ado_reservedwords[444] := 'OFFSETS';
+ ado_reservedwords[445] := 'OLD';
+ ado_reservedwords[446] := 'ON';
+ ado_reservedwords[447] := 'ONCE';
+ ado_reservedwords[448] := 'ONLINE';
+ ado_reservedwords[449] := 'ONLY';
+ ado_reservedwords[450] := 'OPEN';
+ ado_reservedwords[451] := 'OPENDATASOURCE';
+ ado_reservedwords[452] := 'OPENQUERY';
+ ado_reservedwords[453] := 'OPENROWSET';
+ ado_reservedwords[454] := 'OPERATION';
+ ado_reservedwords[455] := 'OPTIMAL';
+ ado_reservedwords[456] := 'OPTIMIZE';
+ ado_reservedwords[457] := 'OPTION';
+ ado_reservedwords[458] := 'OR';
+ ado_reservedwords[459] := 'ORDER';
+ ado_reservedwords[460] := 'ORDINALITY';
+ ado_reservedwords[461] := 'OUT';
+ ado_reservedwords[462] := 'OUTER';
+ ado_reservedwords[463] := 'OUTPUT';
+ ado_reservedwords[464] := 'OVER';
+ ado_reservedwords[465] := 'OVERLAPS';
+ ado_reservedwords[466] := 'OWN';
+ ado_reservedwords[467] := 'PACKAGE';
+ ado_reservedwords[468] := 'PAD';
+ ado_reservedwords[469] := 'PAGE';
+ ado_reservedwords[470] := 'PAGES';
+ ado_reservedwords[471] := 'PARALLEL';
+ ado_reservedwords[472] := 'PARAMETER';
+ ado_reservedwords[473] := 'PARAMETERS';
+ ado_reservedwords[474] := 'PART';
+ ado_reservedwords[475] := 'PARTIAL';
+ ado_reservedwords[476] := 'PASCAL';
+ ado_reservedwords[477] := 'PATH';
+ ado_reservedwords[478] := 'PCTFREE';
+ ado_reservedwords[479] := 'PCTINCREASE';
+ ado_reservedwords[480] := 'PCTINDEX';
+ ado_reservedwords[481] := 'PCTUSED';
+ ado_reservedwords[482] := 'PERCENT';
+ ado_reservedwords[483] := 'PERM';
+ ado_reservedwords[484] := 'PERMANENT';
+ ado_reservedwords[485] := 'PERMIT';
+ ado_reservedwords[486] := 'PI';
+ ado_reservedwords[487] := 'PIPE';
+ ado_reservedwords[488] := 'PLAN';
+ ado_reservedwords[489] := 'PLI';
+ ado_reservedwords[490] := 'POSITION';
+ ado_reservedwords[491] := 'POSTFIX';
+ ado_reservedwords[492] := 'POWER';
+ ado_reservedwords[493] := 'PRECISION';
+ ado_reservedwords[494] := 'PREFIX';
+ ado_reservedwords[495] := 'PREORDER';
+ ado_reservedwords[496] := 'PREPARE';
+ ado_reservedwords[497] := 'PRESERVE';
+ ado_reservedwords[498] := 'PRIMARY';
+ ado_reservedwords[499] := 'PRINT';
+ ado_reservedwords[500] := 'PRINTSCREEN';
+ ado_reservedwords[501] := 'PRIOR';
+ ado_reservedwords[502] := 'PRIQTY';
+ ado_reservedwords[503] := 'PRIVATE';
+ ado_reservedwords[504] := 'PRIVILEGES';
+ ado_reservedwords[505] := 'PROC';
+ ado_reservedwords[506] := 'PROCEDURE';
+ ado_reservedwords[507] := 'PROCESSEXIT';
+ ado_reservedwords[508] := 'PROFILE';
+ ado_reservedwords[509] := 'PROGRAM';
+ ado_reservedwords[510] := 'PROMPT';
+ ado_reservedwords[511] := 'PUBLIC';
+ ado_reservedwords[512] := 'PUTFORM';
+ ado_reservedwords[513] := 'PUTOPER';
+ ado_reservedwords[514] := 'PUTROW';
+ ado_reservedwords[515] := 'QUALIFICATION';
+ ado_reservedwords[516] := 'QUARTER';
+ ado_reservedwords[517] := 'QUOTA';
+ ado_reservedwords[518] := 'RADIANS';
+ ado_reservedwords[519] := 'RAISE';
+ ado_reservedwords[520] := 'RAISERROR';
+ ado_reservedwords[521] := 'RAND';
+ ado_reservedwords[522] := 'RANGE';
+ ado_reservedwords[523] := 'RAW';
+ ado_reservedwords[524] := 'READ';
+ ado_reservedwords[525] := 'READS';
+ ado_reservedwords[526] := 'READTEXT';
+ ado_reservedwords[527] := 'REAL';
+ ado_reservedwords[528] := 'RECONFIGURE';
+ ado_reservedwords[529] := 'RECORD';
+ ado_reservedwords[530] := 'RECOVER';
+ ado_reservedwords[531] := 'RECURSIVE';
+ ado_reservedwords[532] := 'REDISPLAY';
+ ado_reservedwords[533] := 'REF';
+ ado_reservedwords[534] := 'REFERENCES';
+ ado_reservedwords[535] := 'REFERENCING';
+ ado_reservedwords[536] := 'REGISTER';
+ ado_reservedwords[537] := 'RELATIVE';
+ ado_reservedwords[538] := 'RELEASE';
+ ado_reservedwords[539] := 'RELOCATE';
+ ado_reservedwords[540] := 'REMOVE';
+ ado_reservedwords[541] := 'RENAME';
+ ado_reservedwords[542] := 'REPEAT';
+ ado_reservedwords[543] := 'REPEATABLE';
+ ado_reservedwords[544] := 'REPEATED';
+ ado_reservedwords[545] := 'REPLACE';
+ ado_reservedwords[546] := 'REPLICATE';
+ ado_reservedwords[547] := 'REPLICATION';
+ ado_reservedwords[548] := 'RESET';
+ ado_reservedwords[549] := 'RESETLOGS';
+ ado_reservedwords[550] := 'RESOURCE';
+ ado_reservedwords[551] := 'RESTORE';
+ ado_reservedwords[552] := 'RESTRICT';
+ ado_reservedwords[553] := 'RESTRICTED';
+ ado_reservedwords[554] := 'RESULT';
+ ado_reservedwords[555] := 'RESUME';
+ ado_reservedwords[556] := 'RETRIEVE';
+ ado_reservedwords[557] := 'RETURN';
+ ado_reservedwords[558] := 'RETURNS';
+ ado_reservedwords[559] := 'REUSE';
+ ado_reservedwords[560] := 'REVOKE';
+ ado_reservedwords[561] := 'RIGHT';
+ ado_reservedwords[562] := 'ROLE';
+ ado_reservedwords[563] := 'ROLES';
+ ado_reservedwords[564] := 'ROLLBACK';
+ ado_reservedwords[565] := 'ROLLUP';
+ ado_reservedwords[566] := 'ROUTINE';
+ ado_reservedwords[567] := 'ROW';
+ ado_reservedwords[568] := 'ROWCOUNT';
+ ado_reservedwords[569] := 'ROWGUIDCOL';
+ ado_reservedwords[570] := 'ROWID';
+ ado_reservedwords[571] := 'ROWIDTOCHAR';
+ ado_reservedwords[572] := 'ROWLABEL';
+ ado_reservedwords[573] := 'ROWNUM';
+ ado_reservedwords[574] := 'ROWS';
+ ado_reservedwords[575] := 'ROWS';
+ ado_reservedwords[576] := 'RPAD';
+ ado_reservedwords[577] := 'RRN';
+ ado_reservedwords[578] := 'RTRIM';
+ ado_reservedwords[579] := 'RULE';
+ ado_reservedwords[580] := 'RUN';
+ ado_reservedwords[581] := 'RUNTIMESTATISTICS';
+ ado_reservedwords[582] := 'SAVE';
+ ado_reservedwords[583] := 'SAVEPOINT';
+ ado_reservedwords[584] := 'SCHEDULE';
+ ado_reservedwords[585] := 'SCHEMA';
+ ado_reservedwords[586] := 'SCN';
+ ado_reservedwords[587] := 'SCOPE';
+ ado_reservedwords[588] := 'SCREEN';
+ ado_reservedwords[589] := 'SCROLL';
+ ado_reservedwords[590] := 'SCROLLDOWN';
+ ado_reservedwords[591] := 'SCROLLUP';
+ ado_reservedwords[592] := 'SEARCH';
+ ado_reservedwords[593] := 'SECOND';
+ ado_reservedwords[594] := 'SECONDS';
+ ado_reservedwords[595] := 'SECQTY';
+ ado_reservedwords[596] := 'SECTION';
+ ado_reservedwords[597] := 'SEGMENT';
+ ado_reservedwords[598] := 'SELECT';
+ ado_reservedwords[599] := 'SEQUENCE';
+ ado_reservedwords[600] := 'SERIALIZABLE';
+ ado_reservedwords[601] := 'SERVICE';
+ ado_reservedwords[602] := 'SESSION';
+ ado_reservedwords[603] := 'SESSION_USER';
+ ado_reservedwords[604] := 'SET';
+ ado_reservedwords[605] := 'SETS';
+ ado_reservedwords[606] := 'SETUSER';
+ ado_reservedwords[607] := 'SETUSER';
+ ado_reservedwords[608] := 'SHARE';
+ ado_reservedwords[609] := 'SHARED';
+ ado_reservedwords[610] := 'SHORT';
+ ado_reservedwords[611] := 'SHUTDOWN';
+ ado_reservedwords[612] := 'SIGN';
+ ado_reservedwords[613] := 'SIMPLE';
+ ado_reservedwords[614] := 'SIN';
+ ado_reservedwords[615] := 'SIZE';
+ ado_reservedwords[616] := 'SLEEP';
+ ado_reservedwords[617] := 'SMALLINT';
+ ado_reservedwords[618] := 'SNAPSHOT';
+ ado_reservedwords[619] := 'SOME';
+ ado_reservedwords[620] := 'SORT';
+ ado_reservedwords[621] := 'SOUNDEX';
+ ado_reservedwords[622] := 'SPACE';
+ ado_reservedwords[623] := 'SPECIFIC';
+ ado_reservedwords[624] := 'SPECIFICTYPE';
+ ado_reservedwords[625] := 'SQL';
+ ado_reservedwords[626] := 'SQLBUF';
+ ado_reservedwords[627] := 'SQLCA';
+ ado_reservedwords[628] := 'SQLCODE';
+ ado_reservedwords[629] := 'SQLERROR';
+ ado_reservedwords[630] := 'SQLEXCEPTION';
+ ado_reservedwords[631] := 'SQLSTATE';
+ ado_reservedwords[632] := 'SQLWARNING';
+ ado_reservedwords[633] := 'SQRT';
+ ado_reservedwords[634] := 'START';
+ ado_reservedwords[635] := 'STATE';
+ ado_reservedwords[636] := 'STATEMENT';
+ ado_reservedwords[637] := 'STATIC';
+ ado_reservedwords[638] := 'STATISTICS';
+ ado_reservedwords[639] := 'STOGROUP';
+ ado_reservedwords[640] := 'STOP';
+ ado_reservedwords[641] := 'STORAGE';
+ ado_reservedwords[642] := 'STORPOOL';
+ ado_reservedwords[643] := 'STRUCTURE';
+ ado_reservedwords[644] := 'SUBMENU';
+ ado_reservedwords[645] := 'SUBPAGES';
+ ado_reservedwords[646] := 'SUBSTR';
+ ado_reservedwords[647] := 'SUBSTRING';
+ ado_reservedwords[648] := 'SUCCESSFUL';
+ ado_reservedwords[649] := 'SUFFIX';
+ ado_reservedwords[650] := 'SUM';
+ ado_reservedwords[651] := 'SUMU';
+ ado_reservedwords[652] := 'SWITCH';
+ ado_reservedwords[653] := 'SYNONYM';
+ ado_reservedwords[654] := 'SYSCAT';
+ ado_reservedwords[655] := 'SYSDATE';
+ ado_reservedwords[656] := 'SYSFUN';
+ ado_reservedwords[657] := 'SYSIBM';
+ ado_reservedwords[658] := 'SYSSTAT';
+ ado_reservedwords[659] := 'SYSTEM';
+ ado_reservedwords[660] := 'SYSTEM_USER';
+ ado_reservedwords[661] := 'SYSTIME';
+ ado_reservedwords[662] := 'SYSTIMESTAMP';
+ ado_reservedwords[663] := 'TABLE';
+ ado_reservedwords[664] := 'TABLEDATA';
+ ado_reservedwords[665] := 'TABLES';
+ ado_reservedwords[666] := 'TABLESPACE';
+ ado_reservedwords[667] := 'TAN';
+ ado_reservedwords[668] := 'TAPE';
+ ado_reservedwords[669] := 'TEMP';
+ ado_reservedwords[670] := 'TEMPORARY';
+ ado_reservedwords[671] := 'TERMINATE';
+ ado_reservedwords[672] := 'TEXTSIZE';
+ ado_reservedwords[673] := 'THAN';
+ ado_reservedwords[674] := 'THEN';
+ ado_reservedwords[675] := 'THREAD';
+ ado_reservedwords[676] := 'TIME';
+ ado_reservedwords[677] := 'TIMEOUT';
+ ado_reservedwords[678] := 'TIMESTAMP';
+ ado_reservedwords[679] := 'TIMEZONE_HOUR';
+ ado_reservedwords[680] := 'TIMEZONE_MINUTE';
+ ado_reservedwords[681] := 'TINYINT';
+ ado_reservedwords[682] := 'TO';
+ ado_reservedwords[683] := 'TOP';
+ ado_reservedwords[684] := 'TPE';
+ ado_reservedwords[685] := 'TRACING';
+ ado_reservedwords[686] := 'TRAILING';
+ ado_reservedwords[687] := 'TRAN';
+ ado_reservedwords[688] := 'TRANSACTION';
+ ado_reservedwords[689] := 'TRANSLATE';
+ ado_reservedwords[690] := 'TRANSLATION';
+ ado_reservedwords[691] := 'TREAT';
+ ado_reservedwords[692] := 'TRIGGER';
+ ado_reservedwords[693] := 'TRIGGERS';
+ ado_reservedwords[694] := 'TRIM';
+ ado_reservedwords[695] := 'TRUE';
+ ado_reservedwords[696] := 'TRUNCATE';
+ ado_reservedwords[697] := 'TSEQUAL';
+ ado_reservedwords[698] := 'TYPE';
+ ado_reservedwords[699] := 'UID';
+ ado_reservedwords[700] := 'UNCOMMITTED';
+ ado_reservedwords[701] := 'UNDER';
+ ado_reservedwords[702] := 'UNION';
+ ado_reservedwords[703] := 'UNIQUE';
+ ado_reservedwords[704] := 'UNKNOWN';
+ ado_reservedwords[705] := 'UNLIMITED';
+ ado_reservedwords[706] := 'UNLOADTABLE';
+ ado_reservedwords[707] := 'UNNEST';
+ ado_reservedwords[708] := 'UNSIGNED';
+ ado_reservedwords[709] := 'UNTIL';
+ ado_reservedwords[710] := 'UP';
+ ado_reservedwords[711] := 'UPDATE';
+ ado_reservedwords[712] := 'UPDATETEXT';
+ ado_reservedwords[713] := 'UPPER';
+ ado_reservedwords[714] := 'USAGE';
+ ado_reservedwords[715] := 'USE';
+ ado_reservedwords[716] := 'USER';
+ ado_reservedwords[717] := 'USING';
+ ado_reservedwords[718] := 'UUID';
+ ado_reservedwords[719] := 'VALIDATE';
+ ado_reservedwords[720] := 'VALIDPROC';
+ ado_reservedwords[721] := 'VALIDROW';
+ ado_reservedwords[722] := 'VALUE';
+ ado_reservedwords[723] := 'VALUES';
+ ado_reservedwords[724] := 'VARBINARY';
+ ado_reservedwords[725] := 'VARCHAR';
+ ado_reservedwords[726] := 'VARIABLE';
+ ado_reservedwords[727] := 'VARIABLES';
+ ado_reservedwords[728] := 'VARYING';
+ ado_reservedwords[729] := 'VCAT';
+ ado_reservedwords[730] := 'VERSION';
+ ado_reservedwords[731] := 'VIEW';
+ ado_reservedwords[732] := 'VOLUMES';
+ ado_reservedwords[733] := 'WAITFOR';
+ ado_reservedwords[734] := 'WEEK';
+ ado_reservedwords[735] := 'WHEN';
+ ado_reservedwords[736] := 'WHENEVER';
+ ado_reservedwords[737] := 'WHERE';
+ ado_reservedwords[738] := 'WHILE';
+ ado_reservedwords[739] := 'WITH';
+ ado_reservedwords[740] := 'WITHOUT';
+ ado_reservedwords[741] := 'WORK';
+ ado_reservedwords[742] := 'WRITE';
+ ado_reservedwords[743] := 'WRITETEXT';
+ ado_reservedwords[744] := 'YEAR';
+ ado_reservedwords[745] := 'YEARS';
+ ado_reservedwords[746] := 'ZONE';
+end;
+
+
+function TDAMSConnection.IdentifierNeedsQuoting(
+ const iIdentifier: string): boolean;
+begin
+ Result := inherited IdentifierNeedsQuoting(iIdentifier) or MSSQL_IdentifierNeedsQuoting(iIdentifier);
+end;
+
+{ TDAMSSQLDriver }
+
+function TDAMSSQLDriver.GetDefaultConnectionType(
+ const AuxDriver: string): string;
+begin
+ Result := MSSQL_DriverType;
+end;
+
+function MSACCESS_GetFileExtensions: IROStrings;
+begin
+ Result := NewROStrings;
+ Result.Add('*.mdb;MSAccess files (*.mdb)');
+ Result.Add('*.*;All files (*.*)');
+end;
+
+initialization
+ ado_InitializeReservedWords;
+finalization
+ ado_reservedwords := nil;
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDABin2DataStreamer.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDABin2DataStreamer.pas
new file mode 100644
index 0000000..77d42cb
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDABin2DataStreamer.pas
@@ -0,0 +1,1837 @@
+unit uDABin2DataStreamer;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up }
+{ platform: Win32 }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+{.$DEFINE BIN2DEBUG_time}
+
+interface
+
+uses
+ Classes,
+ uDAInterfaces, uDADelta, uROTypes,
+ uDADataStreamer;
+
+type
+ TBIN2AdapterSignature = array[0..7] of char;
+
+const
+ BIN2AdapterSignature: TBIN2AdapterSignature = 'DABIN200';
+type
+
+ TDASmallFieldInfo = packed record
+ Name: String;
+ Datatype: TDADataType;
+ Size: integer;
+ end;
+
+ TDADataForAppendBin2 = class(TDADataForAppend)
+ public
+ FieldsInfo: array of TDASmallFieldInfo;
+ end;
+
+ TDAElementType = (etDataset, etDelta);
+ { TElementInfo }
+ TDAElementInfo = class
+ ElementType: TDAElementType;
+ Name: Ansistring;
+ Offset: integer;
+ end;
+
+
+
+type
+ TDABin2DataStreamer = class(TDADataStreamer)
+ private
+ fInfoIntOffset: integer;
+ fHasReducedDelta: Boolean;
+ procedure ReadElementInfo;
+ procedure WriteElementInfo(ElementInfo: TDAElementInfo);
+ procedure AddElementInfo(ElementType: TDAElementType; ElementName: string; Offset: integer);
+ function GetElementInfo(ElementType: TDAElementType; const Name: string): TDAElementInfo;
+ procedure ReadAndApplySchema(const Destination: IDADataset; ApplySchema: boolean);
+ procedure WriteSchema(const Fields: TDAFieldCollection; const Params: TDAParamCollection; aFieldsIndex: array of integer); overload;
+ procedure WriteField(const AField: TDAField);
+ procedure WriteParam(const AParam: TDAParam);
+ procedure ReadParam(const AParam: TDAParam; const aParamPropertiesCount: integer);
+ procedure ReadField(const AField: TDAField; const aFieldPropertiesCount: integer);
+ protected
+ procedure InternalDoReadDataset(const Destination: IDAEditableDataset; ARecordCount: integer; ARealFields: array of integer);virtual;
+ procedure InternalDoWriteDataset(const Source: IDADataset; var k: integer; const Maxrecords: integer; ARealFields: array of integer;aDataIndex: Integer; info: array of TDASmallFieldInfo);virtual;
+ procedure InternalDoWriteDataset_NonDataset(const Source: IDADataset; var k: integer; const Maxrecords: integer; ARealFields: array of integer;aDataIndex: Integer; info: array of TDASmallFieldInfo);virtual;
+ procedure CheckSignature(aSignature: TBIN2AdapterSignature);
+ // To override
+ function DoCreateStream: TStream; override;
+ procedure DoInitialize(Mode: TDAAdapterInitialization); override;
+ procedure DoFinalize; override;
+ function DoWriteDataset(const Source: IDADataset; Options: TDAWriteOptions; MaxRows: integer; ADynFieldNames: array of string): integer; override;
+
+ function DoBeginWriteDataset( const Source: IDADataset; const Schema: TDADataset;
+ Options: TDAWriteOptions; MaxRows: integer;
+ ADynFieldNames: array of string): TDADataForAppend; override;
+ function DoWriteDatasetData(const Source: IDADataset; var aDataForAppend: TDADataForAppend; aDataIndex: Integer = -1): Integer; override;
+ function DoEndWriteDataset(aDataForAppend: TDADataForAppend): Integer; override;
+
+
+ procedure DoWriteDelta(const Source: IDADelta); override;
+ procedure DoReadDataset(const DatasetName: string; const Destination: IDADataset; ApplySchema: boolean); override;
+ procedure DoReadDelta(const DeltaName: string; const Destination: IDADelta); override;
+ public
+ function HasReducedDelta: Boolean; override;
+ function GetTargetDataType: TRODataType; override;
+ published
+ property BufferSize;
+ property SendReducedDelta;
+ end;
+
+
+implementation
+{$IFNDEF MSWINDOWS}
+ {$UNDEF BIN2DEBUG_time}
+{$ENDIF}
+uses
+ {$IFDEF BIN2DEBUG_time}Windows,{$ENDIF BIN2DEBUG_time}
+ SysUtils, Variants, FMTBcd, uROBinaryHelpers, DB,
+ uROClasses, uDAEngine, uDAClasses;
+
+type
+{$IFDEF DELPHI6}
+ UInt64 = Int64;
+{$ENDIF}
+ PUInt64 = ^UInt64;
+
+const
+ field_count = 34;
+ param_count = 11;
+ TAlignmentStrings: array[Low(TAlignment)..High(TAlignment)] of ansistring =
+ ('taLeftJustify', 'taRightJustify', 'taCenter');
+ TDABlobTypeStrings: array[Low(TDABlobType)..High(TDABlobType)] of ansistring =
+ ('dabtUnknown', 'dabtBlob', 'dabtMemo', 'dabtOraBlob',
+ 'dabtOraClob', 'dabtGraphic', 'dabtTypedBinary', 'dabtTimestamp');
+ TDADataTypeStrings: array[Low(TDADataType)..High(TDADataType)] of ansistring =
+ ('datUnknown', 'datString', 'datDateTime', 'datFloat',
+ 'datCurrency', 'datAutoInc', 'datInteger', 'datLargeInt',
+ 'datBoolean', 'datMemo', 'datBlob', 'datWideString',
+ 'datWideMemo', 'datLargeAutoInc', 'datByte', 'datShortInt',
+ 'datWord', 'datSmallInt', 'datCardinal', 'datLargeUInt',
+ 'datGuid', 'datXml', 'datDecimal', 'datSingleFloat');
+ TDAParamTypeStrings:array[Low(TDAParamType)..High(TDAParamType)] of ansistring =
+ ('daptUnknown', 'daptInput', 'daptOutput', 'daptInputOutput',
+ 'daptResult');
+
+
+function TAlignmentStringsToTAlignment(aValue: Ansistring): TAlignment;
+begin
+ for Result := Low(TAlignment) to High(TAlignment) do
+ if TAlignmentStrings[Result] = aValue then Exit;
+ raise Exception.Create('Unknown TAlignment value: '''+aValue+'''');
+end;
+
+function TDABlobTypeStringsToTDABlobType(aValue: Ansistring): TDABlobType;
+begin
+ for Result := Low(TDABlobType) to High(TDABlobType) do
+ if TDABlobTypeStrings[Result] = aValue then Exit;
+ raise Exception.Create('Unknown TDABlobType value: '''+aValue+'''');
+end;
+
+function TDADataTypeStringsToTDADataType(aValue: Ansistring): TDADataType;
+begin
+ for Result := Low(TDADataType) to High(TDADataType) do
+ if TDADataTypeStrings[Result] = aValue then Exit;
+ raise Exception.Create('Unknown TDADataType value: '''+aValue+'''');
+end;
+
+function TDAParamTypeStringsToTDAParamType(aValue: Ansistring): TDAParamType;
+begin
+ for Result := Low(TDAParamType) to High(TDAParamType) do
+ if TDAParamTypeStrings[Result] = aValue then Exit;
+ raise Exception.Create('Unknown TDAParamType value: '''+aValue+'''');
+end;
+
+procedure SetBitMask(Buffer: PAnsiChar; const Index: Integer; const Value: boolean);
+var
+ i: byte;
+begin
+ i := Index shr 3;
+ if Value then
+ Buffer[I] := AnsiChar(ord(Buffer[I]) or (1 shl (Index and 7)))
+ else
+ Buffer[I] := AnsiChar(ord(Buffer[I]) and not (1 shl (Index and 7)))
+end;
+
+function GetBitMask(Buffer: PAnsiChar; const Index: Integer): boolean;
+begin
+ Result := (ord(Buffer[Index shr 3]) shr (Index and 7)) and 1 = 1;
+end;
+
+procedure ClearBitMask(Buffer: PAnsiChar; BitMaskSize:integer; Value: byte = 0 );
+begin
+ FillChar(Buffer^, BitMaskSize, Value);
+end;
+
+function ReadBooleanFromStream(Stream: TStream): ByteBool;
+begin
+ Stream.Read(Result, SizeOf(ByteBool));
+end;
+
+procedure WriteBooleanToStream(Stream: TStream; const Value: ByteBool);
+begin
+ Stream.Write(Value, SizeOf(ByteBool));
+end;
+
+function ReadWordBoolFromStream(Stream: TStream): WordBool;
+begin
+ Stream.Read(Result, SizeOf(WordBool));
+end;
+
+procedure WriteWordBoolToStream(Stream: TStream; const Value: WordBool);
+begin
+ Stream.Write(Value, SizeOf(WordBool));
+end;
+
+
+function ReadByteFromStream(Stream: TStream): Byte;
+begin
+ Stream.Read(Result, SizeOf(Byte));
+end;
+
+procedure WriteByteToStream(Stream: TStream; const Value: Byte);
+begin
+ Stream.Write(Value, SizeOf(Byte));
+end;
+
+function ReadShortIntFromStream(Stream: TStream): ShortInt;
+begin
+ Stream.Read(Result, SizeOf(ShortInt));
+end;
+
+procedure WriteShortIntToStream(Stream: TStream; const Value: ShortInt);
+begin
+ Stream.Write(Value, SizeOf(ShortInt));
+end;
+
+function ReadWordFromStream(Stream: TStream): Word;
+begin
+ Stream.Read(Result, SizeOf(Word));
+end;
+
+procedure WriteWordToStream(Stream: TStream; const Value: Word);
+begin
+ Stream.Write(Value, SizeOf(Word));
+end;
+
+function ReadGUIDFromStream(Stream: TStream): Ansistring;
+begin
+ SetLength(Result,38);
+ Result[1]:='{';
+ Stream.Read(Result[2], 36 {Length(GuidString)-2});
+ Result[38]:='}'
+end;
+
+procedure WriteGUIDToStream(Stream: TStream; const Value: Ansistring);
+begin
+ if Length(Value) <> 38 then
+ raise Exception.Create('Invalid GUID: '+Value)
+ else
+ Stream.Write(Value[2], 36 {Length(GuidString)-2});
+end;
+
+
+function ReadDecimalFromStream(Stream: TStream): TDecimal;
+begin
+ Stream.Read(Result, Sizeof(Result));
+end;
+
+function ReadBCDFromStream(Stream: TStream): TBCD;
+begin
+ Result := DecimalToBCD(ReadDecimalFromStream(Stream));
+end;
+
+procedure WriteDecimalToStream(Stream: TStream; const Value: TDecimal);
+begin
+ Stream.Write(Value, Sizeof(Value));
+end;
+
+procedure WriteBCDToStream(Stream: TStream; const Value: TBCD);
+begin
+ WriteDecimalToStream(Stream,BCDToDecimal(Value));
+end;
+
+function ReadSingleFromStream(Stream: TStream): Single;
+begin
+ Stream.Read(Result, SizeOf(Single));
+end;
+
+procedure WriteSingleToStream(Stream: TStream; const Value: Single);
+begin
+ Stream.Write(Value, SizeOf(Single));
+end;
+
+function ReadSmallIntFromStream(Stream: TStream): SmallInt;
+begin
+ Stream.Read(Result, SizeOf(SmallInt));
+end;
+
+procedure WriteSmallIntToStream(Stream: TStream; const Value: SmallInt);
+begin
+ Stream.Write(Value, SizeOf(SmallInt));
+end;
+
+function ReadCardinalFromStream(Stream: TStream): Cardinal;
+begin
+ Stream.Read(Result, SizeOf(Cardinal));
+end;
+
+procedure WriteCardinalToStream(Stream: TStream; const Value: Cardinal);
+begin
+ Stream.Write(Value, SizeOf(Cardinal));
+end;
+
+function ReadCurrencyFromStream(Stream: TStream): Currency;
+begin
+ Stream.Read(Result, SizeOf(Currency));
+end;
+
+procedure WriteCurrencyToStream(Stream: TStream; const Value: Currency);
+begin
+ Stream.Write(Value, SizeOf(Currency));
+end;
+
+function ReadDoubleFromStream(Stream: TStream): Double;
+begin
+ Stream.Read(Result, SizeOf(Double));
+end;
+
+procedure WriteDoubleToStream(Stream: TStream; const Value: Double);
+begin
+ Stream.Write(Value, SizeOf(Double));
+end;
+
+function ReadDateTimeFromStream(Stream: TStream): TDateTime;
+begin
+ Stream.Read(Result, SizeOf(TDateTime));
+end;
+
+procedure WriteDateTimeToStream(Stream: TStream; const Value: TDateTime);
+begin
+ Stream.Write(Value, SizeOf(TDateTime));
+end;
+
+
+procedure Writeint64ToStream(Stream: TStream; const Value: int64);
+begin
+ Stream.Write(Value, SizeOf(int64));
+end;
+
+function Readint64FromStream(Stream: TStream): int64;
+begin
+ Stream.Read(Result, SizeOf(int64));
+end;
+
+procedure WriteUint64ToStream(Stream: TStream; const Value: UInt64);
+begin
+ Stream.Write(Value, SizeOf(Uint64));
+end;
+
+function ReadUint64FromStream(Stream: TStream): UInt64;
+begin
+ Stream.Read(Result, SizeOf(Uint64));
+end;
+
+procedure WriteIntegerToStream(Stream: TStream; const Value: Integer);
+begin
+ Stream.Write(Value, SizeOf(integer));
+end;
+
+function ReadIntegerFromStream(Stream: TStream): Integer;
+begin
+ Stream.Read(Result, SizeOf(integer));
+end;
+
+function ReadAnsistringFromStream(Stream: TStream): AnsiString;
+var
+ Len: Cardinal;
+begin
+ Len := ReadIntegerFromStream(Stream);
+ SetLength(Result, Len div SizeOf(AnsiChar));
+ Stream.Read(Pointer(Result)^, len);
+end;
+
+procedure WriteAnsistringToStream(Stream: TStream; const AString: Ansistring);
+var
+ Len: Cardinal;
+begin
+ Len := Length(AString);
+ WriteIntegerToStream(Stream, Len);
+ Stream.Write(Pointer(AString)^, len*SizeOf(AnsiChar));
+end;
+
+procedure WriteWidestringToStream(Stream: TStream; const AString: Widestring);
+var
+ Len: Cardinal;
+begin
+ Len := Length(AString) * sizeOf(WideChar);
+ WriteIntegerToStream(Stream, Len);
+ Stream.Write(Pointer(AString)^, len);
+end;
+
+function ReadWidestringFromStream(Stream: TStream): WideString;
+var
+ Len: Cardinal;
+begin
+ Len := ReadIntegerFromStream(Stream);
+ SetLength(Result, Len div sizeOf(WideChar));
+ Stream.Read(Pointer(Result)^, len);
+end;
+
+procedure BlobToStreamAsStr(Stream: TStream; Value: Variant);
+var
+ p: pointer;
+ lSize: cardinal;
+begin
+ case VarType(Value) of
+ varEmpty: WriteIntegerToStream(Stream, 0);
+ varOleStr: WriteWidestringToStream(Stream, VarToWideStr(Value));
+ varString: WriteAnsistringToStream(Stream, {$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(VarToStr(Value)));
+ 8209: begin { 8209 is binary array }
+ lSize := VarArrayHighBound(Value, 1) - VarArrayLowBound(Value, 1) + 1;
+ p := VarArrayLock(Value);
+ try
+ WriteIntegerToStream(Stream, lSize);
+ Stream.Write(p^, lSize);
+ finally
+ VarArrayUnlock(Value);
+ end;
+ end;
+ else
+ raise Exception.CreateFmt('Invalid variant type (%d) for Blob.', [VarType(Value)]);
+ end;
+end;
+
+function WriteVariantToStream(Stream: TStream; Value: Variant; DataType: TDADataType): Boolean;
+begin
+ Result := True;
+
+ case Datatype of
+ datWideString, datWideMemo, datXml: WriteWidestringToStream(Stream, VarToWideStr(Value));
+ datString, datMemo: WriteAnsistringToStream(Stream, {$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(VarToStr(Value)));
+ datDateTime: WriteDateTimeToStream(Stream, VarToDateTime(Value));
+ datFloat: WriteDoubleToStream(Stream, Value);
+ datBoolean: WriteBooleanToStream(Stream, Value = True);
+ datCurrency: WriteCurrencyToStream(Stream, Value);
+ datAutoInc, datInteger: WriteIntegerToStream(Stream, Value);
+ datLargeInt, datLargeAutoInc: Writeint64ToStream(Stream, Value);
+ datLargeUInt: WriteUint64ToStream(Stream, Value);
+ datBlob: BlobToStreamAsStr(Stream, Value);
+ datByte: WriteByteToStream(Stream, Value);
+ datShortInt: WriteShortIntToStream(Stream, Value);
+ datWord: WriteWordToStream(Stream, Value);
+ datSmallInt: WriteSmallIntToStream(Stream, Value);
+ datCardinal: WriteCardinalToStream(Stream, Value);
+ datGuid: WriteGuidToStream(Stream, {$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(VarToStr(Value)));
+ datSingleFloat: WriteSingleToStream(Stream, Value);
+ datDecimal: WriteDecimalToStream(Stream, VariantToDecimal(Value));
+ else
+ Result := False;
+ end;
+end;
+
+function ReadVariantFromStream(Stream: TStream; DataType: TDADataType): Variant;
+begin
+ case Datatype of
+ datWideString, datWideMemo, datXml: Result := ReadWidestringFromStream(Stream);
+ datString, datMemo, DatBlob: Result := ReadAnsistringFromStream(Stream);
+ datDateTime: Result := ReadDateTimeFromStream(Stream);
+ datFloat: Result := ReadDoubleFromStream(Stream);
+ datCurrency: Result := ReadCurrencyFromStream(Stream);
+ datBoolean: Result := ReadBooleanFromStream(Stream);
+ datAutoInc, datInteger: Result := ReadIntegerFromStream(Stream);
+ datLargeInt, datLargeAutoInc: Result := Readint64FromStream(Stream);
+ datLargeUInt: Result := ReadUint64FromStream(Stream);
+ datByte: Result := ReadByteFromStream(Stream);
+ datShortInt: Result := ReadShortIntFromStream(Stream);
+ datWord: Result := ReadWordFromStream(Stream);
+ datSmallInt: Result := ReadSmallIntFromStream(Stream);
+ datCardinal: Result := ReadCardinalFromStream(Stream);
+ datGuid: Result := ReadGUIDFromStream(Stream);
+ datSingleFloat: Result := ReadSingleFromStream(Stream);
+ datDecimal: Result := DecimalToVariant(ReadDecimalFromStream(Stream));
+ else
+ Result := varNull;
+ end;
+end;
+
+{ TDABin2DataStreamer }
+
+procedure TDABin2DataStreamer.AddElementInfo(ElementType: TDAElementType;
+ ElementName: string; Offset: integer);
+var
+ element: TDAElementInfo;
+begin
+ element := TDAElementInfo.Create;
+ element.ElementType := ElementType;
+ element.Name := {$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(ElementName);
+ element.Offset := Offset;
+
+ if ElementType = etDataset then
+ AddingDataset(ElementName, element)
+ else
+ AddingDelta(ElementName, element);
+end;
+
+function TDABin2DataStreamer.DoCreateStream: TStream;
+begin
+ // outdated, for backward capability
+ result := nil;
+end;
+
+procedure TDABin2DataStreamer.DoFinalize;
+var
+ finalpos, i: integer;
+begin
+ if (AdapterInitialization in AdapterWriteModes) then try
+ finalpos := Data.Position;
+
+ // Element count. WIll be read by the DoInitialize method
+ WriteIntegerToStream(Data, DatasetCount + DeltaCount);
+
+ for i := 0 to (DatasetCount - 1) do
+ WriteElementInfo(TDAElementInfo(DatasetInfoObjects[i]));
+
+ for i := 0 to (DeltaCount - 1) do
+ WriteElementInfo(TDAElementInfo(DeltaInfoObjects[i]));
+
+ Data.Position := fInfoIntOffset;
+ WriteIntegerToStream(Data, finalpos);
+ except
+ beep;
+ raise;
+ end;
+end;
+
+procedure TDABin2DataStreamer.DoInitialize(Mode: TDAAdapterInitialization);
+var
+ signature: TBIN2AdapterSignature;
+ currpos, i: integer;
+begin
+ if (Mode in AdapterReadModes) then begin
+ // Checks the signature
+ Data.Read(signature, SizeOf(signature));
+ CheckSignature(signature);
+
+ fInfoIntOffset := ReadIntegerFromStream(Data);
+ currpos := Data.Position;
+ // Reads the information attached at the end of the stream
+ if (Data.Position = fInfoIntOffset) then Exit; // Nothing to read!
+ Data.Position := fInfoIntOffset;
+
+ // Number of elements
+ i := ReadIntegerFromStream(Data);
+ for i := i downto 1 do
+ ReadElementInfo;
+ // Restores its position and continues
+ Data.Position := currpos;
+ end
+ else if (Mode in AdapterWriteModes) then begin
+ // Writes the signature
+ signature := BIN2AdapterSignature;
+ Data.Write(signature, SizeOf(signature));
+
+ // This integer will contain the offset of the stream information (datasetcount, names, etc)
+ // which will be attached at the end of the stream since this is a sequential write
+ fInfoIntOffset := Data.Position;
+ WriteIntegerToStream(Data, 0);
+ end;
+end;
+
+
+procedure TDABin2DataStreamer.DoReadDataset(const DatasetName: string;
+ const Destination: IDADataset; ApplySchema: boolean);
+
+var
+ elementinfo: TDAElementInfo;
+ editable: IDAEditableDataset;
+ schemaend, cnt, i, k: integer;
+ fld: TDAField;
+ schemapresent: boolean;
+ readonlyfields: array of boolean;
+ //
+ Realfldcount: integer;
+ info: array of TDASmallFieldInfo;
+ RealFields: array of integer;
+ lErrorMessage: String;
+ lErrorMesCnt: integer;
+ lFldList: TStringList;
+begin
+ if Destination.Active and ApplySchema then raise Exception.Create('Cannot apply a schema if the destination is active');
+
+ elementinfo := GetElementInfo(etDataset, DatasetName);
+ Data.Position := elementinfo.Offset;
+ lErrorMessage := '';
+ lErrorMesCnt := 0;
+
+ editable := Destination as IDAEditableDataset;
+
+ Destination.DisableControls;
+ try
+ editable.DisableEventHandlers;
+ try
+ if ApplySchema then begin
+ // Checks to see if the schema is present
+ schemapresent := ReadBooleanFromStream(Data);
+ schemaend := ReadIntegerFromStream(Data);
+
+ if schemapresent and ApplySchema then begin
+ ReadAndApplySchema(Destination, ApplySchema);
+ end
+ else if (schemaend > 0) then
+ Data.Position := schemaend;
+ Exit;
+ end
+ else begin
+ {schemapresent :=} ReadBooleanFromStream(Data);
+ schemaend := ReadIntegerFromStream(Data);
+ if (schemaend > 0) then
+ Data.Position := schemaend;
+
+ // Reads the row count
+ cnt := ReadIntegerFromStream(Data);
+ if (cnt = -1) then Exit; // Only schema is present!
+
+ if not Destination.Active then Destination.Open;
+ with editable do try
+ // Temporarily sets all fields as writable
+ Destination.DisableConstraints;
+ Realfldcount := ReadIntegerFromStream(Data);
+ SetLength(info, Realfldcount);
+ SetLength(RealFields, Realfldcount);
+ //Data.Read(pointer(info)^, Sizeof(TDASmallFieldInfo) * Realfldcount);
+ lFldList:=TStringList.Create;
+ try
+ lFldList.Sorted:=False;
+ lFldList.Duplicates:=dupIgnore;
+ For i:= 0 to Fields.Count-1 do
+ lFldList.AddObject(Fields[i].Name,Pointer(Fields[i].Index));
+ lFldList.Sorted:=True;
+
+ for i := 0 to Realfldcount - 1 do begin
+ info[i].Name := {$IFDEF UNICODE}Utf8ToAnsi{$ENDIF} (ReadAnsistringFromStream(Data));
+ info[i].Datatype := TDADataType(ReadByteFromStream(Data));
+ info[i].Size := ReadIntegerFromStream(Data);
+ k:=lFldList.IndexOf(info[i].Name);
+ if k = -1 then begin
+ inc(lErrorMesCnt);
+ if lErrorMesCnt > 5 then begin
+ lErrorMessage := lErrorMessage + '' + sLineBreak;
+ break;
+ end
+ else begin
+ lErrorMessage := lErrorMessage + Format('The %s field isn''t found.' + sLineBreak,[info[i].Name])
+ end;
+ end
+ else begin
+ RealFields[i]:= Integer(lFldList.Objects[k]);
+ end;
+ end;
+ finally
+ lFldList.Free;
+ end;
+ if (Length(lErrorMessage) > 0) then begin
+ lErrorMessage := 'Format of the data in the stream doesn''t match the destination table format.'+ #10#13 + #10#13 + lErrorMessage;
+ RaiseError(lErrorMessage);
+ end;
+
+ k := 0;
+ SetLength(readonlyfields, Fields.Count);
+ for i := 0 to (Fields.Count - 1) do begin
+ readonlyfields[i] := Fields[i].ReadOnly;
+ Fields[i].ReadOnly := FALSE;
+ if Fields[i].Calculated or Fields[i].Lookup then Continue;
+ //RealFields[k] := i;
+ if (k >= Realfldcount) then begin
+ lErrorMessage := lErrorMessage + 'Fields count mismatch' + sLineBreak
+ end
+ else begin
+ fld:=Fields[RealFields[k]];
+ // if (fld.Name <> Info[k].Name) then lErrorMessage := lErrorMessage + Format('Name mismatch: %s expected but %s found in stream.', [fld.Name, Info[k].Name])+ sLineBreak
+ if (fld.DataType <> Info[k].Datatype) then lErrorMessage := lErrorMessage + Format('Data type mismatch for column ''%s.%s'': %s expected but %s found in stream.', [DatasetName, fld.Name, TDADataTypeStrings[fld.DataType], TDADataTypeStrings[Info[k].Datatype]]) + sLineBreak
+ else if (fld.Size <> Info[k].Size) then lErrorMessage := lErrorMessage + Format('Size mismatch for column ''%s.%s'': %d expected but %d found in stream.', [DatasetName, fld.Name, fld.Size, Info[k].Size]) + sLineBreak;
+ end;
+ inc(k);
+ end;
+ try
+ if (k <> Realfldcount) then lErrorMessage := lErrorMessage + Format('Fields count mismatch: %d expected but %d found in the stream', [k, Realfldcount]) + sLineBreak;
+ if (Length(lErrorMessage) > 0) then begin
+ lErrorMessage := 'Format of the data in the stream doesn''t match the destination table format.'+ sLineBreak + sLineBreak + lErrorMessage;
+ RaiseError(lErrorMessage);
+ end;
+ // Inserts the records
+ try
+ InternalDoReadDataset(editable, cnt, RealFields);
+ except
+ raise;
+ end;
+ finally
+ // Restores the read-only property
+ for i := 0 to (Fields.Count - 1) do
+ Fields[i].ReadOnly := readonlyfields[i];
+ end;
+ finally
+ Destination.EnableConstraints;
+ end;
+ end;
+ finally
+ editable.EnableEventHandlers;
+ end;
+ finally
+ Destination.EnableControls;
+ end;
+end;
+
+procedure TDABin2DataStreamer.DoReadDelta(const DeltaName: string;
+ const Destination: IDADelta);
+var
+ elementinfo: TDAElementInfo;
+ msg, str: string;
+ recid, i, cnt, x: integer;
+ change: TDADeltaChange;
+ changetype: TDAChangeType;
+ status: TDAChangeStatus;
+ BitMask: AnsiString;
+ BitMaskSize: integer;
+begin
+ elementinfo := GetElementInfo(etDelta, DeltaName);
+ Data.Position := elementinfo.Offset;
+
+ // Number of changes
+ cnt := ReadIntegerFromStream(Data);
+
+ // Field number, names and types
+ Destination.ClearFieldNames;
+ i := ReadIntegerFromStream(Data);
+ for i := i downto 1 do begin
+ str := {$IFDEF UNICODE}Utf8ToAnsi{$ENDIF} (ReadAnsiStringFromStream(Data));
+ Destination.AddFieldName(str);
+ Destination.LoggedFieldTypes[Destination.LoggedFieldCount - 1] := TDADataType(ReadByteFromStream(Data));
+ end;
+
+ // Key fields
+ Destination.ClearKeyFieldNames;
+ i := ReadIntegerFromStream(Data);
+ for i := i downto 1 do begin
+ str := {$IFDEF UNICODE}Utf8ToAnsi{$ENDIF}(ReadAnsiStringFromStream(Data));
+ Destination.AddKeyFieldName(str);
+ end;
+
+ if (cnt = 0) then Exit;
+
+ BitMaskSize := (Destination.LoggedFieldCount + 7) div 8;
+ SetLength(BitMask, BitMaskSize);
+
+ // mode of Delta
+ fHasReducedDelta := ReadBooleanFromStream(Data);
+
+ // Actual changes
+ cnt := ReadIntegerFromStream(Data);
+ for i := 1 to cnt do begin
+ changetype := TDAChangeType(ReadIntegerFromStream(Data));
+ recid := ReadIntegerFromStream(Data);
+ status := TDAChangeStatus(ReadIntegerFromStream(Data));
+ msg := {$IFDEF UNICODE}Utf8ToAnsi{$ENDIF}(ReadAnsiStringFromStream(Data));
+ change := Destination.Add(recid, changetype, status, msg);
+
+ // bitmask has different value that in ReadDeataset/WriteDataset !!!
+ // 1 = field is not null
+ // 0 = field is null
+ Data.Read(pointer(BitMask)^, BitMaskSize);
+ // Old values
+ for x := 0 to (Destination.LoggedFieldCount - 1) do
+ if GetBitMask(PAnsiChar(BitMask),x) then
+ change.OldValues[x] := ReadVariantFromStream(Data, Destination.LoggedFieldTypes[x]);
+
+ Data.Read(pointer(BitMask)^, BitMaskSize);
+ // new values
+ for x := 0 to (Destination.LoggedFieldCount - 1) do
+ if GetBitMask(PAnsiChar(BitMask),x) then
+ change.NewValues[x] := ReadVariantFromStream(Data, Destination.LoggedFieldTypes[x]);
+ end;
+end;
+
+function TDABin2DataStreamer.DoWriteDataset(const Source: IDADataset;
+ Options: TDAWriteOptions; MaxRows: integer; ADynFieldNames: array of string): integer;
+var
+ lDataForAppend: TDADataForAppend;
+begin
+ lDataForAppend := DoBeginWriteDataset(Source, {schema}nil, Options, MaxRows, ADynFieldNames);
+ if woRows in Options then begin
+ DoWriteDatasetData(Source, lDataForAppend);
+ result := DoEndWriteDataset(lDataForAppend);
+ end
+ else begin
+ result := -1;
+ end;
+end;
+
+procedure TDABin2DataStreamer.DoWriteDelta(const Source: IDADelta);
+var
+ i, x: integer;
+ pk_array: array of boolean;
+ BitMask_Old,BitMask_new: AnsiString;
+ BitMaskSize: integer;
+ old_val,new_val: variant;
+ l_bitmaskflag: boolean;
+ fLocalSendReducedDelta: Boolean;
+begin
+ // This information will be used later to complete the stream (see DoInitialize)
+ AddElementInfo(etDelta, Source.LogicalName, Data.Position);
+ Source.RemoveUnchangedChanges;
+
+ // Number of changes
+ WriteIntegertoStream(Data, Source.Count);
+
+ // Numnber of fields, field names and their types
+ WriteIntegertoStream(Data, Source.LoggedFieldCount);
+ for i := 0 to (Source.LoggedFieldCount - 1) do begin
+ WriteAnsiStringtoStream(Data,{$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(Source.LoggedFieldNames[i]));
+ WriteByteToStream(Data, Ord(Source.LoggedFieldTypes[i]));
+ end;
+
+ // Key fields
+ WriteIntegertoStream(Data, Source.KeyFieldCount);
+ for i := 0 to (Source.KeyFieldCount - 1) do begin
+ WriteAnsiStringtoStream(Data, {$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(Source.KeyFieldNames[i]));
+ end;
+
+ if (Source.Count = 0) then Exit;
+
+ // mode of Delta
+ WriteBooleanToStream(Data, SendReducedDelta);
+
+ // Actual changes
+ WriteIntegertoStream(Data, Source.Count);
+
+ BitMaskSize := (Source.LoggedFieldCount + 7) div 8;
+ SetLength(BitMask_old, BitMaskSize);
+ SetLength(BitMask_new, BitMaskSize);
+ fLocalSendReducedDelta := SendReducedDelta and (Source.KeyFieldCount >0);
+ if fLocalSendReducedDelta then begin
+ SetLength(pk_array, Source.LoggedFieldCount);
+ for i := 0 to Source.LoggedFieldCount - 1 do
+ pk_array[i]:=False;
+
+ for i := 0 to Source.KeyFieldCount - 1 do begin
+ x := Source.IndexOfLoggedField(Source.KeyFieldNames[i]);
+ if x <> -1 then pk_array[x]:=True;
+ end;
+ end;
+
+ for i := 0 to (Source.Count - 1) do begin
+ // Change type, RecID, status and message
+ WriteIntegertoStream(Data, integer(Source.Changes[i].ChangeType));
+ WriteIntegertoStream(Data, Source.Changes[i].RecID);
+ WriteIntegertoStream(Data, integer(Source.Changes[i].Status));
+ WriteAnsiStringtoStream(Data, {$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(Source.Changes[i].Message));
+
+ // bitmask has different value that in ReadDeataset/WriteDataset !!!
+ // 1 = field is not null
+ // 0 = field is null
+ ClearBitMask(PAnsiChar(BitMask_old),BitMaskSize,0);
+ ClearBitMask(PAnsiChar(BitMask_New),BitMaskSize,0);
+ if fLocalSendReducedDelta then begin
+ for x := 0 to (Source.LoggedFieldCount - 1) do begin
+ old_val:=Source.Changes[i].OldValues[x];
+ new_val:=Source.Changes[i].NewValues[x];
+ l_bitmaskflag:=pk_array[x] or not ROVariantsEqual(old_val,new_val);
+ SetBitMask(PAnsiChar(BitMask_Old), x, l_bitmaskflag and not (VarIsNull(old_val) or (VarIsEmpty(old_val))));
+ SetBitMask(PAnsiChar(BitMask_new), x, l_bitmaskflag and not (VarIsNull(new_val) or (VarIsEmpty(new_val))));
+ end;
+ end else begin
+ for x := 0 to (Source.LoggedFieldCount - 1) do begin
+ old_val:=Source.Changes[i].OldValues[x];
+ new_val:=Source.Changes[i].NewValues[x];
+ SetBitMask(PAnsiChar(BitMask_Old), x, not (VarIsNull(old_val) or (VarIsEmpty(old_val))));
+ SetBitMask(PAnsiChar(BitMask_new), x, not (VarIsNull(new_val) or (VarIsEmpty(new_val))));
+ end;
+ end;
+
+ // old
+ Data.Write(pointer(BitMask_Old)^, BitMaskSize);
+ for x := 0 to (Source.LoggedFieldCount - 1) do
+ if GetBitMask(PAnsiChar(BitMask_Old),x) then
+ WriteVariantToStream(Data,Source.Changes[i].OldValues[x],Source.LoggedFieldTypes[x]);
+
+ // new
+ Data.Write(pointer(BitMask_new)^, BitMaskSize);
+ for x := 0 to (Source.LoggedFieldCount - 1) do
+ if GetBitMask(PAnsiChar(BitMask_new),x) then
+ WriteVariantToStream(Data,Source.Changes[i].NewValues[x],Source.LoggedFieldTypes[x]);
+ end;
+end;
+
+function TDABin2DataStreamer.GetElementInfo(ElementType: TDAElementType;
+ const Name: string): TDAElementInfo;
+begin
+ result := nil;
+ case ElementType of
+ etDataset: result := TDAElementInfo(DatasetInfoObjects[GetDatasetIndex(Name)]);
+ etDelta: result := TDAElementInfo(DeltaInfoObjects[GetDeltaIndex(Name)]);
+ end;
+end;
+
+function TDABin2DataStreamer.HasReducedDelta: Boolean;
+begin
+ Result:= fHasReducedDelta;
+end;
+
+procedure TDABin2DataStreamer.ReadAndApplySchema(
+ const Destination: IDADataset; ApplySchema: boolean);
+var
+ lField_cnt: integer;
+ lparam_cnt: integer;
+ i: integer;
+ cnt: integer;
+begin
+ Destination.Fields.Clear;
+ cnt := ReadIntegerFromStream(Data);
+ lField_cnt:= ReadIntegerFromStream(Data);
+ for i := 0 to (cnt - 1) do
+ ReadField(Destination.Fields.Add, lField_cnt);
+
+ Destination.Params.Clear;
+ cnt := ReadIntegerFromStream(Data);
+ lparam_cnt:= ReadIntegerFromStream(Data);
+ for i := 0 to (cnt - 1) do
+ ReadParam(Destination.Params.Add, lparam_cnt);
+end;
+
+procedure TDABin2DataStreamer.ReadElementInfo;
+var
+ et: TDAElementType;
+ nme: string;
+ ofs: integer;
+begin
+ et := TDAElementType(ReadIntegerFromStream(Data));
+ nme := {$IFDEF UNICODE}Utf8ToAnsi{$ENDIF}(ReadAnsistringFromStream(Data));
+ ofs := ReadIntegerFromStream(Data);
+ AddElementInfo(et, nme, ofs);
+end;
+
+procedure TDABin2DataStreamer.WriteElementInfo(
+ ElementInfo: TDAElementInfo);
+begin
+ WriteIntegerToStream(Data, integer(ElementInfo.ElementType));
+ WriteAnsiStringToStream(Data, ElementInfo.Name);
+ WriteIntegerToStream(Data, ElementInfo.Offset);
+end;
+
+procedure TDABin2DataStreamer.WriteSchema(const Fields: TDAFieldCollection; const Params: TDAParamCollection; aFieldsIndex: array of integer);
+var
+ i: integer;
+begin
+ WriteIntegerToStream(Data, Length(aFieldsIndex));
+ WriteIntegerToStream(Data, field_count);
+ for i := 0 to High(aFieldsIndex) do
+ WriteField(Fields[aFieldsIndex[i]]);
+
+ WriteIntegerToStream(Data, Params.Count);
+ WriteIntegerToStream(Data, param_count);
+ for i := 0 to Params.Count - 1 do
+ WriteParam(Params[i]);
+end;
+
+function TDABin2DataStreamer.DoBeginWriteDataset(
+ const Source: IDADataset; const Schema: TDADataset;
+ Options: TDAWriteOptions; MaxRows: integer;
+ ADynFieldNames: array of string): TDADataForAppend;
+var
+ max, cntpos, currpos, k, i, Realfldcnt: integer;
+ fld: TDAField;
+ wrtschema: boolean;
+ info: array of TDASmallFieldInfo;
+ RealFields: array of integer;
+ lfields: array of integer;
+ lDataForAppend : TDADataForAppendBin2;
+ lSchemaFields: TDAFieldCollection;
+ lSchemaParams: TDAParamCollection;
+ lLogicalName: String;
+begin
+ lDataForAppend := TDADataForAppendBin2.Create();
+ result := lDataForAppend;
+
+ if Assigned(Schema) then begin
+ lDataForAppend.TableSchema := Schema;
+ if Schema is TDAUnionDataTable then begin
+ fld := Schema.FindField(def_SourceTableFieldName);
+ if not Assigned(fld) then begin
+ fld := Schema.Fields.Add();
+ fld.Name := def_SourceTableFieldName;
+ fld.DataType := datInteger;
+ fld.InPrimaryKey := true;
+ fld.ServerAutoRefresh := true;
+ end;
+ end;
+ lSchemaFields := Schema.Fields;
+ lSchemaParams := Schema.Params;
+ lLogicalName := Schema.Name;
+ end else begin
+ if Assigned(Source) then begin
+ lSchemaFields := Source.Fields;
+ lSchemaParams := Source.Params;
+ lLogicalName := Source.LogicalName;
+ end else begin
+ raise EDAException.Create('Schema or source should be assigned.');
+ end;
+ end;
+
+ if Length(ADynFieldNames) > 0 then begin
+ SetLength(lfields, Length(ADynFieldNames));
+ For i:=0 to High(ADynFieldNames) do begin
+ fld := lSchemaFields.FindField(ADynFieldNames[i]);
+ if fld <> nil then
+ lfields[i]:= i
+ else
+ lfields[i]:= -1; // TODO: shoudln't this raise an exception "field not found", or the like?
+ end;
+ end else begin
+ SetLength(lfields, lSchemaFields.Count);
+ For i:=0 to lSchemaFields.Count-1 do
+ lfields[i]:=i;
+ end;
+
+ // This information will be used later to complete the stream (see DoInitialize)
+ AddElementInfo(etDataset, lLogicalName, Data.Position);
+
+ // Writes a boolean flag that indicates if the schema is being written
+ wrtschema := (woSchema in Options) or (Length(ADynFieldNames)>0);
+ WriteBooleanToStream(Data, wrtschema);
+ // Write the offset to jump to if the reader wants to skip the schema
+ currpos := Data.Position;
+ WriteIntegerToStream(Data, 0);
+
+ if wrtschema then begin
+ WriteSchema(lSchemaFields, lSchemaParams, lfields);
+
+ // Writes the offset of the schema's end
+ k := Data.Position;
+ Data.Position := currpos;
+ WriteIntegerToStream(Data, k);
+ Data.Position := k;
+ end;
+
+ // Writes the row count
+ if not (woRows in Options) then begin
+ WriteIntegerToStream(Data, -1);
+ Exit;
+ end
+ else begin
+ cntpos := Data.Position;
+ WriteIntegerToStream(Data, 0);
+ max := MaxRows;
+ end;
+
+ // write datatypes+offsets
+ SetLength(info, lSchemaFields.Count);
+ SetLength(RealFields, lSchemaFields.Count);
+ Realfldcnt := 0;
+ for i := 0 to High(lfields) do begin
+ if lSchemaFields[lfields[i]].Calculated or lSchemaFields[lfields[i]].Lookup then Continue;
+ RealFields[Realfldcnt] := lfields[i];
+ info[Realfldcnt].Name := lSchemaFields[lfields[i]].Name;
+ info[Realfldcnt].Datatype := lSchemaFields[lfields[i]].DataType;
+ info[Realfldcnt].Size := lSchemaFields[lfields[i]].Size;
+ inc(Realfldcnt);
+ end;
+ SetLength(info, Realfldcnt);
+ SetLength(RealFields, Realfldcnt);
+
+ WriteIntegerToStream(Data, Realfldcnt);
+ //Data.Write(pointer(info)^, Sizeof(TDASmallFieldInfo) * Realfldcnt);
+ for i := 0 to Realfldcnt - 1 do begin
+ WriteAnsistringToStream(Data, {$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(info[i].Name));
+ WriteByteToStream(Data, Byte(info[i].DataType));
+ WriteIntegerToStream(Data, info[i].Size);
+ end;
+
+
+ // prepare DataForAppend structure...
+ SetLength(lDataForAppend.RealFields, Realfldcnt);
+ SetLength(lDataForAppend.FieldsInfo, Realfldcnt);
+ for i := Low(RealFields) to High(RealFields) do begin
+ lDataForAppend.RealFields[i] := RealFields[i];
+ lDataForAppend.FieldsInfo[i].Name := info[i].Name;
+ lDataForAppend.FieldsInfo[i].Datatype := info[i].Datatype;
+ lDataForAppend.FieldsInfo[i].Size := info[i].Size;
+ end;
+
+ lDataForAppend.MaxRowCount := max;
+ lDataForAppend.CountOfRecordsPosition := cntpos;
+
+ k := 0;
+
+ lDataForAppend.EndDataPosition := Data.Position;
+ lDataForAppend.RecordCount := k;
+
+ result := lDataForAppend;
+end;
+
+
+function TDABin2DataStreamer.DoWriteDatasetData(const Source: IDADataset; var aDataForAppend: TDADataForAppend; aDataIndex: Integer = -1): Integer;
+var
+ max, k, i, Realfldcnt: integer;
+ info: array of TDASmallFieldInfo;
+ RealFields: array of integer;
+ lDataForAppend: TDADataForAppendBin2;
+ lMapToFieldName: String;
+ lColumnMappings: TDAColumnMappingCollection;
+ lColumnMapping: TDAColumnMapping;
+begin
+
+ lDataForAppend := aDataForAppend as TDADataForAppendBin2;
+ Realfldcnt := Length(lDataForAppend.RealFields);
+ Data.Position := lDataForAppend.EndDataPosition;
+ SetLength(info, Realfldcnt);
+ SetLength(RealFields, Realfldcnt);
+ for i := 0 to Realfldcnt - 1 do begin
+ info[i].Name := lDataForAppend.FieldsInfo[i].Name;
+ info[i].Datatype := lDataForAppend.FieldsInfo[i].Datatype;
+ info[i].Size := lDataForAppend.FieldsInfo[i].Size;
+ // these arrays always have the same size
+ RealFields[i] := lDataForAppend.RealFields[i];
+ end;
+ max := lDataForAppend.MaxRowCount;
+ k := lDataForAppend.RecordCount;
+
+ // Mapping fields of Source table to the streamed dataset
+ if Assigned(lDataForAppend.TableSchema) and (lDataForAppend.TableSchema is TDAUnionDataTable) then begin
+ lColumnMappings := TDAUnionSourceTable(TDAUnionDataTable(lDataForAppend.TableSchema).SourceTables.ItemByName(Source.Name)).ColumnMappings;
+ for i := 0 to Realfldcnt - 1 do begin
+ if info[i].Name = def_SourceTableFieldName then begin
+ RealFields[i] := -10;
+ continue;
+ end;
+ lMapToFieldName := info[i].Name;
+ if Assigned(lColumnMappings) then begin
+ lColumnMapping := lColumnMappings.MappingByDatasetField(info[i].Name);
+ if Assigned(lColumnMapping) and (lColumnMapping.TableField <> '') then
+ lMapToFieldName := lColumnMapping.TableField;
+ end;
+ RealFields[i] := Source.FieldByName(lMapToFieldName).Index;
+ end;
+ end;
+
+ with Source do try
+ DisableControls;
+
+ if not Source.Active then Source.Open;
+ try
+ InternalDoWriteDataset_NonDataset(Source,k, max, RealFields, aDataIndex, info)
+ except
+ raise;
+ end;
+
+ lDataForAppend.EndDataPosition := Data.Position;
+ lDataForAppend.RecordCount := k;
+
+ finally
+ EnableControls;
+ result := k;
+ end;
+end;
+
+function TDABin2DataStreamer.DoEndWriteDataset(aDataForAppend: TDADataForAppend): Integer;
+begin
+ result := aDataForAppend.RecordCount;
+ Data.Position := aDataForAppend.CountOfRecordsPosition;
+ WriteIntegerToStream(Data, aDataForAppend.RecordCount);
+ Data.Position := aDataForAppend.EndDataPosition;
+ aDataForAppend.Free();
+end;
+
+function BoolToAnsiStr(B: Boolean): Ansistring;
+begin
+ if b then
+ Result:= 'True'
+ else
+ Result := 'False';
+end;
+
+
+procedure TDABin2DataStreamer.WriteField(const AField: TDAField);
+begin
+ WriteAnsistringToStream(Data, 'Alignment');
+ WriteAnsistringToStream(Data, TAlignmentStrings[AField.Alignment]);
+ WriteAnsistringToStream(Data, 'BlobType');
+ WriteAnsistringToStream(Data, TDABlobTypeStrings[AField.BlobType]);
+ WriteAnsistringToStream(Data, 'BusinessClassID');
+ WriteAnsistringToStream(Data, {$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(AField.BusinessClassID));
+ WriteAnsistringToStream(Data, 'Calculated');
+ WriteAnsistringToStream(Data, BoolToAnsiStr(AField.Calculated));
+ WriteAnsistringToStream(Data, 'CustomAttributes');
+ WriteAnsistringToStream(Data, {$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(AField.CustomAttributes.Text));
+ WriteAnsistringToStream(Data, 'DataType');
+ WriteAnsistringToStream(Data, TDADataTypeStrings[AField.DataType]);
+ WriteAnsistringToStream(Data, 'DecimalPrecision');
+ WriteAnsistringToStream(Data, {$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(IntToStr(AField.DecimalPrecision)));
+ WriteAnsistringToStream(Data, 'DecimalScale');
+ WriteAnsistringToStream(Data, {$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(IntToStr(AField.DecimalScale)));
+ WriteAnsistringToStream(Data, 'DefaultValue');
+ WriteAnsistringToStream(Data, {$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(AField.DefaultValue));
+ WriteAnsistringToStream(Data, 'Description');
+ WriteAnsistringToStream(Data, {$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(AField.Description));
+ WriteAnsistringToStream(Data, 'DictionaryEntry');
+ WriteAnsistringToStream(Data, {$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(AField.DictionaryEntry));
+ WriteAnsistringToStream(Data, 'DisplayFormat');
+ WriteAnsistringToStream(Data, {$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(AField.DisplayFormat));
+ WriteAnsistringToStream(Data, 'DisplayLabel');
+ WriteAnsistringToStream(Data, {$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(AField.DisplayLabel));
+ WriteAnsistringToStream(Data, 'DisplayWidth');
+ WriteAnsistringToStream(Data, {$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(IntToStr(AField.DisplayWidth)));
+ WriteAnsistringToStream(Data, 'EditFormat');
+ WriteAnsistringToStream(Data, {$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(AField.EditFormat));
+ WriteAnsistringToStream(Data, 'EditMask');
+ WriteAnsistringToStream(Data, {$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(AField.EditMask));
+ WriteAnsistringToStream(Data, 'Expression');
+ WriteAnsistringToStream(Data, {$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(AField.Expression));
+ WriteAnsistringToStream(Data, 'GeneratorName');
+ WriteAnsistringToStream(Data, {$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(AField.GeneratorName));
+ WriteAnsistringToStream(Data, 'InPrimaryKey');
+ WriteAnsistringToStream(Data, BoolToAnsiStr(AField.InPrimaryKey));
+ WriteAnsistringToStream(Data, 'KeyFields');
+ WriteAnsistringToStream(Data, {$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(AField.KeyFields));
+ WriteAnsistringToStream(Data, 'LogChanges');
+ WriteAnsistringToStream(Data, BoolToAnsiStr(AField.LogChanges));
+ WriteAnsistringToStream(Data, 'Lookup');
+ WriteAnsistringToStream(Data, BoolToAnsiStr(AField.Lookup));
+ WriteAnsistringToStream(Data, 'LookupCache');
+ WriteAnsistringToStream(Data, BoolToAnsiStr(AField.LookupCache));
+ WriteAnsistringToStream(Data, 'LookupKeyFields');
+ WriteAnsistringToStream(Data, {$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(AField.LookupKeyFields));
+ WriteAnsistringToStream(Data, 'LookupResultField');
+ WriteAnsistringToStream(Data, {$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(AField.LookupResultField));
+ WriteAnsistringToStream(Data, 'LookupSource');
+ WriteAnsistringToStream(Data, '');
+ WriteAnsistringToStream(Data, 'Name');
+ WriteAnsistringToStream(Data, {$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(AField.Name));
+ WriteAnsistringToStream(Data, 'ReadOnly');
+ WriteAnsistringToStream(Data, BoolToAnsiStr(AField.ReadOnly));
+ WriteAnsistringToStream(Data, 'RegExpression');
+ WriteAnsistringToStream(Data, {$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(AField.RegExpression));
+ WriteAnsistringToStream(Data, 'Required');
+ WriteAnsistringToStream(Data, BoolToAnsiStr(AField.Required));
+ WriteAnsistringToStream(Data, 'ServerAutoRefresh');
+ WriteAnsistringToStream(Data, BoolToAnsiStr(AField.ServerAutoRefresh));
+ WriteAnsistringToStream(Data, 'ServerCalculated');
+ WriteAnsistringToStream(Data, BoolToAnsiStr(AField.ServerCalculated));
+ WriteAnsistringToStream(Data, 'Size');
+ WriteAnsistringToStream(Data, {$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(IntToStr(AField.Size)));
+ WriteAnsistringToStream(Data, 'Visible');
+ WriteAnsistringToStream(Data, BoolToAnsiStr(AField.Visible));
+end;
+
+procedure TDABin2DataStreamer.WriteParam(const AParam: TDAParam);
+begin
+ WriteAnsistringToStream(Data, 'AsString');
+ WriteAnsistringToStream(Data, {$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(AParam.AsString));
+ WriteAnsistringToStream(Data, 'BlobType');
+ WriteAnsistringToStream(Data, TDABlobTypeStrings[AParam.BlobType]);
+ WriteAnsistringToStream(Data, 'DataType');
+ WriteAnsistringToStream(Data, TDADataTypeStrings[AParam.DataType]);
+ WriteAnsistringToStream(Data, 'DecimalPrecision');
+ WriteAnsistringToStream(Data, {$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(IntToStr(AParam.DecimalPrecision)));
+ WriteAnsistringToStream(Data, 'DecimalScale');
+ WriteAnsistringToStream(Data, {$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(IntToStr(AParam.DecimalScale)));
+ WriteAnsistringToStream(Data, 'Description');
+ WriteAnsistringToStream(Data, {$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(AParam.Description));
+ WriteAnsistringToStream(Data, 'GeneratorName');
+ WriteAnsistringToStream(Data, {$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(AParam.GeneratorName));
+ WriteAnsistringToStream(Data, 'Name');
+ WriteAnsistringToStream(Data, {$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(AParam.Name));
+ WriteAnsistringToStream(Data, 'ParamType');
+ WriteAnsistringToStream(Data, TDAParamTypeStrings[AParam.ParamType]);
+ WriteAnsistringToStream(Data, 'Size');
+ WriteAnsistringToStream(Data, {$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(IntToStr(AParam.Size)));
+ WriteAnsistringToStream(Data, 'Value');
+ WriteAnsistringToStream(Data, {$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(VarToStr(AParam.Value)));
+end;
+
+procedure TDABin2DataStreamer.ReadParam(const AParam: TDAParam; const aParamPropertiesCount: integer);
+var
+ i: integer;
+ sName: AnsiString;
+ sAnsiValue: AnsiString;
+ sValue: String;
+begin
+ For i := 0 to aParamPropertiesCount-1 do begin
+ sName := ReadAnsistringFromStream(Data);
+ sAnsiValue :=ReadAnsistringFromStream(Data);
+ sValue :={$IFDEF UNICODE}Utf8ToAnsi{$ENDIF}(sAnsiValue);
+ if sName = 'AsString' then AParam.AsString:= sValue
+ else if sName = 'BlobType' then AParam.BlobType := TDABlobTypeStringsToTDABlobType(sAnsiValue)
+ else if sName = 'DataType' then AParam.DataType := TDADataTypeStringsToTDADataType(sAnsiValue)
+ else if sName = 'DecimalPrecision' then AParam.DecimalPrecision := StrToInt(sValue)
+ else if sName = 'DecimalScale' then AParam.DecimalScale := StrToInt(sValue)
+ else if sName = 'Description' then AParam.Description := sValue
+ else if sName = 'GeneratorName' then AParam.GeneratorName := sValue
+ else if sName = 'Name' then AParam.Name := sValue
+ else if sName = 'ParamType' then AParam.ParamType := TDAParamTypeStringsToTDAParamType(sAnsiValue)
+ else if sName = 'Size' then AParam.Size := StrToInt(sValue)
+ else if sName = 'Value' then AParam.Value := sValue
+ else ;
+ end;
+end;
+
+procedure TDABin2DataStreamer.ReadField(const AField: TDAField;
+ const aFieldPropertiesCount: integer);
+var
+ i: integer;
+ sName, sAnsiValue: AnsiString;
+ sValue: string;
+begin
+ For i := 0 to aFieldPropertiesCount-1 do begin
+ sName := ReadAnsistringFromStream(Data);
+ sAnsiValue :=ReadAnsistringFromStream(Data);
+ sValue :={$IFDEF UNICODE}Utf8ToAnsi{$ENDIF}(sAnsiValue);
+ if sName = 'Alignment' then AField.Alignment := TAlignmentStringsToTAlignment(sAnsiValue)
+ else if sName = 'BlobType' then AField.BlobType := TDABlobTypeStringsToTDABlobType(sAnsiValue)
+ else if sName = 'BusinessClassID' then AField.BusinessClassID := sValue
+ else if sName = 'Calculated' then AField.Calculated := StrToBool(sValue)
+ else if sName = 'CustomAttributes' then AField.CustomAttributes.Text := sValue
+ else if sName = 'DataType' then AField.DataType := TDADataTypeStringsToTDADataType(sAnsiValue)
+ else if sName = 'DecimalPrecision' then AField.DecimalPrecision := StrToInt(sValue)
+ else if sName = 'DecimalScale' then AField.DecimalScale := StrToInt(sValue)
+ else if sName = 'DefaultValue' then AField.DefaultValue := sValue
+ else if sName = 'Description' then AField.Description := sValue
+ else if sName = 'DictionaryEntry' then AField.DictionaryEntry := sValue
+ else if sName = 'DisplayFormat' then AField.DisplayFormat := sValue
+ else if sName = 'DisplayLabel' then AField.DisplayLabel := sValue
+ else if sName = 'DisplayWidth' then AField.DisplayWidth := StrToInt(sValue)
+ else if sName = 'EditFormat' then AField.EditFormat := sValue
+ else if sName = 'EditMask' then AField.EditMask := sValue
+ else if sName = 'Expression' then AField.Expression := sValue
+ else if sName = 'GeneratorName' then AField.GeneratorName := sValue
+ else if sName = 'InPrimaryKey' then AField.InPrimaryKey := StrToBool(sValue)
+ else if sName = 'KeyFields' then AField.KeyFields := sValue
+ else if sName = 'LogChanges' then AField.LogChanges := StrToBool(sValue)
+ else if sName = 'Lookup' then AField.Lookup := StrToBool(sValue)
+ else if sName = 'LookupCache' then AField.LookupCache := StrToBool(sValue)
+ else if sName = 'LookupKeyFields' then AField.LookupKeyFields := sValue
+ else if sName = 'LookupResultField' then AField.LookupResultField := sValue
+ else if sName = 'LookupSource' then // AField.LookupSource:=nil;
+ else if sName = 'Name' then AField.Name := sValue
+ else if sName = 'ReadOnly' then AField.ReadOnly := StrToBool(sValue)
+ else if sName = 'RegExpression' then AField.RegExpression := sValue
+ else if sName = 'Required' then AField.Required := StrToBool(sValue)
+ else if sName = 'ServerAutoRefresh' then AField.ServerAutoRefresh := StrToBool(sValue)
+ else if sName = 'ServerCalculated' then AField.ServerCalculated := StrToBool(sValue)
+ else if sName = 'Size' then AField.Size := StrToInt(sValue)
+ else if sName = 'Visible' then AField.Visible := StrToBool(sValue)
+ else ;
+ end;
+end;
+
+procedure TDABin2DataStreamer.InternalDoReadDataset(const Destination: IDAEditableDataset; ARecordCount: integer;ARealFields: array of integer);
+var
+ memdataset: IDAMemDatasetBatchAdding;
+type
+ PMemDatasetrecord_Native = ^TMemDatasetrecord_Native;
+ TMemDatasetrecord_Native = packed record
+ Ident: byte;
+ Data: PAnsichar;
+ end;
+
+ procedure BitmaskToNativeBuf(Bitmask, buf: PAnsiChar; aFields: array of integer);
+ var
+ i: integer;
+ begin
+ for i:=Low(aFields) to High(aFields) do
+ SetBitMask(buf, aFields[i], GetBitMask(Bitmask,i));
+ end;
+
+var
+ FRecordsList: TList;
+ buf1: pointer;
+ s: Ansistring;
+ Buf: PAnsiChar;
+ val: Variant;
+ memdataset_BitMaskSize: integer;
+ BindedFields: array of integer;
+ flds: array of TDAField;
+ BitMask: Ansistring;
+ streamer_BitMaskSize: integer;
+ i: integer;
+ Realfldcount: integer;
+{$IFDEF BIN2DEBUG_time}
+ t1,t2,t3: TDateTime;
+{$ENDIF BIN2DEBUG_time}
+begin
+ if Destination.QueryInterface(IDAMemDatasetBatchAdding, memdataset) <> s_ok then memdataset := nil;
+ Realfldcount := Length(ARealFields);
+ setLength(flds, Realfldcount);
+ For i:= 0 to Realfldcount-1 do
+ flds[i] := Destination.Fields[ARealFields[i]];
+
+ streamer_BitMaskSize := (Realfldcount + 7) div 8;
+ SetLength(BitMask, streamer_BitMaskSize);
+ // bitmask has different value that in ReadDelta/WriteDelta !!!
+ // 0 = field is not null
+ // 1 = field is null
+
+
+ if (memdataset = nil) or Assigned(OnReadFieldValue) then begin
+ // standard mode
+ while (ARecordCount > 0) do try
+ Destination.Append;
+ // read bitmask
+ Data.Read(pointer(BitMask)^, streamer_BitMaskSize);
+ for i := 0 to Realfldcount - 1 do begin
+ if GetBitMask(PAnsiChar(BitMask), i) then
+ //
+ else begin
+ case flds[i].Datatype of
+ datWideString, datWideMemo, datXml: flds[i].AsWideString := ReadWidestringFromStream(Data);
+ datString, datMemo, DatBlob: flds[i].AsString := {$IFDEF UNICODE}Utf8ToAnsi{$ENDIF}(ReadAnsistringFromStream(Data));
+ datDateTime: flds[i].AsDateTime := ReadDateTimeFromStream(Data);
+ datFloat: flds[i].AsFloat := ReadDoubleFromStream(Data);
+ datCurrency: flds[i].AsCurrency := ReadCurrencyFromStream(Data);
+ datBoolean: flds[i].AsBoolean := ReadBooleanFromStream(Data);
+ datAutoInc, datInteger: flds[i].AsInteger := ReadIntegerFromStream(Data);
+ datLargeInt, datLargeAutoInc: flds[i].AsLargeInt := Readint64FromStream(Data);
+ datLargeUInt: flds[i].AsLargeUInt := ReadUint64FromStream(Data);
+ datByte: flds[i].AsByte := ReadByteFromStream(Data);
+ datShortInt: flds[i].AsShortInt := ReadShortIntFromStream(Data);
+ datWord: flds[i].AsWord := ReadWordFromStream(Data);
+ datSmallInt: flds[i].AsSmallInt := ReadSmallIntFromStream(Data);
+ datCardinal: flds[i].AsCardinal := ReadCardinalFromStream(Data);
+ datGuid: flds[i].AsString := {$IFDEF UNICODE}Utf8ToAnsi{$ENDIF}(ReadGuidFromStream(Data));
+ datSingleFloat: flds[i].AsSingle := ReadSingleFromStream(Data);
+ datDecimal: flds[i].AsDecimal := ReadBCDFromStream(Data);
+ end;
+ end;
+ if Assigned(OnReadFieldValue) then begin
+ val := flds[i].Value;
+ OnReadFieldValue(flds[i], val);
+ flds[i].Value := val;
+ end;
+ end;
+ try
+ Destination.Post;
+ except
+ // Introduced to restore the dsBrowse state of the datatable
+ // in case of errors
+ Destination.Cancel;
+ raise;
+ end;
+ finally
+ Dec(ARecordCount);
+ end;
+ end
+ else begin
+ // superfast mode
+ {$IFDEF BIN2DEBUG_time}
+ t1:=now;
+ {$ENDIF BIN2DEBUG_time}
+ SetLength(BindedFields, Realfldcount);
+ For i:= 0 to Realfldcount - 1 do
+ BindedFields[i]:=Destination.Fields[ARealFields[i]].BindedField.Index;
+
+ FRecordsList := TList.Create;
+ try
+ memdataset_BitMaskSize := (Realfldcount + 1 {RECID} + 7) div 8;
+ SetLength(BitMask, memdataset_BitMaskSize);
+
+ while (ARecordCount > 0) do try
+ Buf := memdataset.AllocRecordBuffer;
+ try
+ Data.Read(pointer(BitMask)^, streamer_BitMaskSize);
+ BitmaskToNativeBuf(pointer(BitMask), Pointer(PMemDatasetrecord_Native(buf)^.Data), BindedFields);
+ //Data.Read(buf^, BitMaskSize);
+ for i := 0 to Realfldcount - 1 do begin
+ if GetBitMask(PAnsiChar(BitMask), i) then
+ //
+ else begin
+ buf1 := memdataset.GetFieldNativeBuffer(Buf, flds[i].BindedField);
+ case flds[i].DataType of
+ datWideString, datXml: memdataset.SetWideString(buf1,flds[i].BindedField,ReadWidestringFromStream(Data));//PWideString(buf1)^ := ReadWidestringFromStream(Data);
+ datString: memdataset.SetAnsiString(buf1,flds[i].BindedField,ReadAnsistringFromStream(Data));//PAnsiString(buf1)^ := ReadAnsistringFromStream(Data);
+ datDateTime: PDateTime(buf1)^ := TimeStampToMSecs(DateTimeToTimeStamp(ReadDateTimeFromStream(Data)));
+ datFloat: PDouble(buf1)^ := ReadDoubleFromStream(Data);
+ datCurrency: PCurrency(buf1)^ := ReadCurrencyFromStream(Data);
+ datBoolean: PBoolean(buf1)^ := ReadBooleanFromStream(Data);
+ datLargeInt, datLargeAutoInc: PInt64(buf1)^ := Readint64FromStream(Data);
+ datLargeUInt: PUInt64(buf1)^ := ReadUint64FromStream(Data);
+ datAutoInc, datInteger: PInteger(buf1)^ := ReadIntegerFromStream(Data);
+ datCardinal: PCardinal(buf1)^ := ReadCardinalFromStream(Data);
+ datWord: PWord(buf1)^ := ReadWordFromStream(Data);
+ datShortInt: PSmallInt(buf1)^ := ReadShortIntFromStream(Data);
+ datSmallInt: PSmallInt(buf1)^ := ReadSmallIntFromStream(Data);
+ datByte: PSmallInt(buf1)^ := ReadByteFromStream(Data);
+ datSingleFloat: PDouble(buf1)^ := ReadSingleFromStream(Data);
+ datDecimal: PBCD(buf1)^ := ReadBCDFromStream(Data);
+ datGuid: begin
+ s := ReadGUIDFromStream(Data);
+ Move(pointer(s)^, pointer(buf1)^, 38 {Length(GuidString)});
+ end;
+ datWideMemo, datMemo, DatBlob: begin
+ s := ReadAnsistringFromStream(Data);
+ PPointer(buf1)^ := memdataset.MakeBlobFromString(s);
+ end;
+ end;
+ end;
+ end;
+ FRecordsList.Add(Buf);
+ except
+ memdataset.FreeRecordBuffer(buf);
+ For i:=0 to FRecordsList.Count-1 do begin
+ buf:=FRecordsList[i];
+ memdataset.FreeRecordBuffer(Buf);
+ end;
+ raise;
+ end;
+ finally
+ Dec(ARecordCount);
+ end;
+ {$IFDEF BIN2DEBUG_time}
+ t2:=now;
+ {$ENDIF BIN2DEBUG_time}
+ memdataset.AddRecordsfromList(FRecordsList);
+ {$IFDEF BIN2DEBUG_time}
+ t3:=now;
+ OutputDebugString(PAnsiChar('TDABIN2DataStreamer.InternalDoReadDataset: SF Mode '+TimeToStr(t2-t1)+' | ' +FloatToStr(t2-t1) + ' ||| Adding '+TimeToStr(t3-t2)+' | ' +FloatToStr(t3-t2)));
+ {$ENDIF BIN2DEBUG_time}
+ finally
+ FRecordsList.Free;
+ end;
+ end;
+
+end;
+
+procedure TDABin2DataStreamer.InternalDoWriteDataset(
+ const Source: IDADataset; var k: integer;const Maxrecords: integer;
+ ARealFields: array of integer;aDataIndex: Integer;info: array of TDASmallFieldInfo);
+var
+ currpos: integer;
+ ev1, ev2: boolean;
+ BitMask: Ansistring;
+ BitMaskSize: integer;
+ bitmaskpos : integer;
+ NeedWriteBitMask: Boolean;
+ i : integer;
+ Realfldcnt: integer;
+ flds: array of TDAField;
+ val: Variant;
+{$IFDEF BIN2DEBUG_time}
+ t1,t2: TDateTime;
+{$ENDIF BIN2DEBUG_time}
+begin
+ Realfldcnt:= Length(ARealFields);
+ BitMaskSize := (Realfldcnt + 7) div 8;
+ SetLength(BitMask, BitMaskSize);
+ SetLength(flds,Realfldcnt);
+ for i := 0 to Realfldcnt-1 do begin
+ if ARealFields[i] = -10 then
+ flds[i]:=nil
+ else
+ flds[i]:=Source.Fields[ARealFields[i]];
+ end;
+
+
+ // bitmask has different value that in ReadDelta/WriteDelta !!!
+ // 0 = field is not null
+ // 1 = field is null
+ ev1 := Assigned(OnBeforeFieldValueSerialization);
+ ev2 := Assigned(OnWriteFieldValue);
+ if ev1 or ev2 then begin
+ // with events
+ while (k <> Maxrecords) and not Source.EOF do begin
+ ClearBitMask(PAnsiChar(BitMask),BitMaskSize); // all is not Null
+ bitmaskpos := Data.Position;
+ Data.Write(pointer(BitMask)^, BitMaskSize);
+ NeedWriteBitMask := False;
+ for i := 0 to (Realfldcnt - 1) do begin
+ //ARealFields[i] = -10 then this is @SourceTable field
+ if ARealFields[i] = -10 then begin
+ //We shouldn't fire events since this is special internal field
+ val := aDataIndex;
+ end else begin
+ val := Source.FieldValues[ARealFields[i]];
+ if ev1 then OnBeforeFieldValueSerialization(flds[i], val);
+ if ev2 then OnWriteFieldValue(flds[i], val);
+ end;
+
+ if VarIsNull(Val) or VarIsEmpty(Val) then begin
+ NeedWriteBitMask := True;
+ SetBitMask(PAnsiChar(BitMask), i, True);
+ end else begin
+ if not WriteVariantToStream(Data, val, Info[i].Datatype) then begin
+ NeedWriteBitMask := True;
+ SetBitMask(PAnsiChar(BitMask), i, True);
+ end;
+ end;
+ if NeedWriteBitMask then begin
+ currpos := Data.Position;
+ Data.Position := bitmaskpos;
+ Data.Write(pointer(BitMask)^, BitMaskSize);
+ Data.Position := currpos;
+ end;
+ end;
+ // Inc(result);
+ Inc(k);
+ Source.Next;
+ if Source.EOF then Break;
+ end;
+ end
+ else begin
+ // Writes the actual records
+ // without events
+ {$IFDEF BIN2DEBUG_time}
+ t1:=now;
+ {$ENDIF BIN2DEBUG_time}
+ while (k <> Maxrecords) and not Source.EOF do begin
+ ClearBitMask(PAnsiChar(BitMask),BitMaskSize); // all is not Null
+
+ for i := 0 to (Realfldcnt - 1) do
+ //ARealFields[i] = -10 then this is @SourceTable field
+ if ((ARealFields[i] <> -10) and (flds[i].IsNull)) then
+ SetBitMask(PAnsiChar(BitMask), i, True);
+ Data.Write(pointer(BitMask)^, BitMaskSize);
+
+ for i := 0 to (Realfldcnt - 1) do begin
+
+ //ARealFields[i] = -10 then this is @SourceTable field
+ if ARealFields[i] = -10 then begin
+ WriteIntegerToStream(Data, aDataIndex);
+ end else begin
+ if GetBitMask(PAnsiChar(BitMask), i) then begin
+ end else begin
+ case Info[i].Datatype of
+ datWideString, datWideMemo, datXml: WriteWidestringToStream(Data, flds[i].AsWideString);
+ datString, datMemo, datBlob: WriteAnsistringToStream(Data, {$IFDEF UNICODE}AnsiToUtf8{$ENDIF} (flds[i].AsString));
+ datDateTime: WriteDateTimeToStream(Data, flds[i].AsDateTime);
+ datFloat: WriteDoubleToStream(Data, flds[i].AsFloat);
+ datBoolean: WriteBooleanToStream(Data, flds[i].AsBoolean);
+ datCurrency: WriteCurrencyToStream(Data, flds[i].AsCurrency);
+ datAutoInc, datInteger: WriteIntegerToStream(Data, flds[i].AsInteger);
+ datLargeInt, datLargeAutoInc: Writeint64ToStream(Data, flds[i].AsLargeInt);
+ datLargeUInt: WriteUint64ToStream(Data, flds[i].AsLargeUInt);
+ datByte: WriteByteToStream(Data, flds[i].AsByte);
+ datShortInt: WriteShortIntToStream(Data, flds[i].AsShortInt);
+ datWord: WriteWordToStream(Data, flds[i].AsWord);
+ datSmallInt: WriteSmallIntToStream(Data, flds[i].AsSmallInt);
+ datCardinal: WriteCardinalToStream(Data, flds[i].AsCardinal);
+ datGuid: WriteGUIDToStream(Data, {$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(flds[i].AsString));
+ datSingleFloat: WriteSingleToStream(Data, flds[i].AsSingle);
+ datDecimal: WriteBCDToStream(Data, flds[i].AsDecimal);
+ end;
+ end;
+ end;
+ end;
+
+ // Inc(result);
+ Inc(k);
+ Source.Next;
+ if Source.EOF then Break;
+ end;
+ {$IFDEF BIN2DEBUG_time}
+ t2:=now;
+ OutputDebugString(PAnsiChar('TDABIN2DataStreamer.InternalDoWriteDataset:'+TimeToStr(t2-t1)+' | ' +FloatToStr(t2-t1)));
+ {$ENDIF BIN2DEBUG_time}
+ end;
+end;
+
+function TDABin2DataStreamer.GetTargetDataType: TRODataType;
+begin
+ Result := rtBinary;
+end;
+
+procedure TDABin2DataStreamer.CheckSignature(aSignature: TBIN2AdapterSignature);
+begin
+ if (asignature <> BIN2AdapterSignature) then raise Exception.Create('Incompatible binary2 adapter stream');
+end;
+
+procedure TDABin2DataStreamer.InternalDoWriteDataset_NonDataset(
+ const Source: IDADataset; var k: integer; const Maxrecords: integer;
+ ARealFields: array of integer; aDataIndex: Integer;
+ info: array of TDASmallFieldInfo);
+
+type
+ TfldInfo = packed record
+ isNull: Boolean;
+ Data: pointer;
+ DataSize: Cardinal;
+ DataType: TFieldType;
+ end;
+
+var
+ currpos: integer;
+ ev1, ev2: boolean;
+ BitMask: Ansistring;
+ BitMaskSize: integer;
+ bitmaskpos : integer;
+ NeedWriteBitMask: Boolean;
+ i : integer;
+ Realfldcnt: integer;
+ flds: array of TDAField;
+ val: Variant;
+{$IFDEF BIN2DEBUG_time}
+ t1,t2: TDateTime;
+{$ENDIF BIN2DEBUG_time}
+ NativeDataset: IDASQLCommandNativeObject;
+ fldInfo: array of TfldInfo;
+ s: Ansistring;
+ lbcd: TBCD;
+ lCanFreeNativeData: Boolean;
+begin
+ if (Source.QueryInterface(IDASQLCommandNativeObject, NativeDataset) <> 0)
+ {$IFDEF Drivers_CompatibilityMode}or NativeDataset.IsTDatasetCompatible{$ENDIF} then begin
+ // dataset-compatible mode
+ InternalDoWriteDataset(Source, k, Maxrecords, ARealFields, aDataIndex, info);
+ exit;
+ end;
+ Realfldcnt:= Length(ARealFields);
+ BitMaskSize := (Realfldcnt + 7) div 8;
+ SetLength(BitMask, BitMaskSize);
+ // bitmask has different value that in ReadDelta/WriteDelta !!!
+ // 0 = field is not null
+ // 1 = field is null
+ ev1 := Assigned(OnBeforeFieldValueSerialization);
+ ev2 := Assigned(OnWriteFieldValue);
+ if ev1 or ev2 then begin
+ // with events
+ SetLength(flds,Realfldcnt);
+ for i := 0 to Realfldcnt-1 do begin
+ if ARealFields[i] = -10 then
+ flds[i]:=nil
+ else
+ flds[i]:=Source.Fields[ARealFields[i]];
+ end;
+ while (k <> Maxrecords) and not Source.EOF do begin
+ ClearBitMask(PAnsiChar(BitMask),BitMaskSize); // all is not Null
+ bitmaskpos := Data.Position;
+ Data.Write(pointer(BitMask)^, BitMaskSize);
+ NeedWriteBitMask := False;
+ for i := 0 to (Realfldcnt - 1) do begin
+ //ARealFields[i] = -10 then this is @SourceTable field
+ if ARealFields[i] = -10 then begin
+ //We shouldn't fire events since this is special internal field
+ val := aDataIndex;
+ end else begin
+ val := Source.FieldValues[ARealFields[i]];
+ if ev1 then OnBeforeFieldValueSerialization(flds[i], val);
+ if ev2 then OnWriteFieldValue(flds[i], val);
+ end;
+
+ if VarIsNull(Val) or VarIsEmpty(Val) then begin
+ NeedWriteBitMask := True;
+ SetBitMask(PAnsiChar(BitMask), i, True);
+ end else begin
+ if not WriteVariantToStream(Data, val, Info[i].Datatype) then begin
+ NeedWriteBitMask := True;
+ SetBitMask(PAnsiChar(BitMask), i, True);
+ end;
+ end;
+ if NeedWriteBitMask then begin
+ currpos := Data.Position;
+ Data.Position := bitmaskpos;
+ Data.Write(pointer(BitMask)^, BitMaskSize);
+ Data.Position := currpos;
+ end;
+ end;
+ // Inc(result);
+ Inc(k);
+ Source.Next;
+ if Source.EOF then Break;
+ end;
+ end
+ else begin
+ // Writes the actual records
+ // without events
+ SetLength(fldInfo,Realfldcnt);
+ for i := 0 to (Realfldcnt - 1) do begin
+ if (ARealFields[i] = -10) then
+ fldInfo[i].DataType:= ftInteger
+ else
+ fldInfo[i].DataType:= NativeDataset.NativeFields[i].DataType;
+ end;
+ lCanFreeNativeData := NativeDataset.CanFreeNativeFieldData;
+ {$IFDEF BIN2DEBUG_time}
+ t1:=now;
+ {$ENDIF BIN2DEBUG_time}
+ while (k <> Maxrecords) and not Source.EOF do begin
+ ClearBitMask(PAnsiChar(BitMask),BitMaskSize); // all is not Null
+
+
+ for i := 0 to (Realfldcnt - 1) do begin
+ if (ARealFields[i] = -10) then begin
+ //ARealFields[i] = -10 then this is @SourceTable field
+ fldInfo[i].isNull := False;
+ GetMem(fldInfo[i].Data, SizeOf(Integer));
+ PInteger(fldInfo[i].Data)^ := aDataIndex;
+ fldInfo[i].DataSize:=4;
+ end
+ else begin
+ fldInfo[i].isNull:= not NativeDataset.GetNativeFieldData(ARealFields[i],fldInfo[i].Data, fldInfo[i].DataSize);
+ end;
+ if fldInfo[i].isNull then
+ SetBitMask(PAnsiChar(BitMask), i, True);
+ end;
+ Data.Write(pointer(BitMask)^, BitMaskSize);
+ for i := 0 to (Realfldcnt - 1) do begin
+ if not fldInfo[i].isNull then begin
+ try
+ case Info[i].Datatype of
+ datWideString, datWideMemo, datXml,
+ datString, datMemo, datBlob: begin
+ WriteIntegerToStream(Data, fldInfo[i].DataSize);
+ Data.Write(fldInfo[i].Data^, fldInfo[i].DataSize);
+ end;
+ datDecimal: begin
+ case fldInfo[i].DataType of
+ ftFMTBCD: WriteBCDToStream(Data, PBCD(fldinfo[i].Data)^);
+ ftBCD: begin
+ CurrToBcd(PCurrency(fldinfo[i].Data)^, lbcd);
+ WriteBCDToStream(Data, lbcd);
+ end;
+ end;
+ end;
+ datGuid: begin
+ if fldinfo[i].DataSize <> 39 then begin
+ SetString(s, PAnsiChar(fldinfo[i].Data),38);
+ raise Exception.Create('Invalid GUID: '+s)
+ end
+ else
+ Data.Write((PAnsiChar(fldinfo[i].Data)+1)^,36);
+ end;
+ datBoolean: WriteBooleanToStream(Data, PWordBool(fldinfo[i].Data)^);
+ else
+ Data.Write((fldinfo[i].Data)^, fldinfo[i].DataSize);
+ end;
+ finally
+ if lCanFreeNativeData then FreeMem(fldinfo[i].Data);
+ end;
+ end;
+ end;
+ // Inc(result);
+ Inc(k);
+ Source.Next;
+ if Source.EOF then Break;
+ end;
+ {$IFDEF BIN2DEBUG_time}
+ t2:=now;
+ OutputDebugString(PAnsiChar('TDABIN2DataStreamer.InternalDoWriteDataset:'+TimeToStr(t2-t1)+' | ' +FloatToStr(t2-t1)));
+ {$ENDIF BIN2DEBUG_time}
+ end;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDABinAdapter.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDABinAdapter.pas
new file mode 100644
index 0000000..0fe8556
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDABinAdapter.pas
@@ -0,0 +1,1246 @@
+unit uDABinAdapter;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ Classes,
+ uROTypes,
+ uDADataTable, uDAInterfaces, uDADataStreamer, uDADelta, FMTBcd;
+
+type
+ TBINAdapterSignature = array[0..7] of char;
+
+const
+ BINAdapterSignature: TBINAdapterSignature = 'DABIN100';
+
+type
+ TDAElementType = (etDataset, etDelta);
+
+ { TElementInfo }
+ TDAElementInfo = class
+ ElementType: TDAElementType;
+ Name: string;
+ Offset: integer;
+ end;
+
+ { TDABinDataStreamer }
+ TDABinDataStreamer = class(TDADataStreamer)
+ private
+ fReader: TReader;
+ fWriter: TWriter;
+
+ fInfoIntOffset: integer;
+ fIsCompatibleV4: boolean;
+
+ procedure AddElementInfo(ElementType: TDAElementType; ElementName: string; Offset: integer);
+ procedure WriteElementInfo(ElementInfo: TDAElementInfo);
+ procedure ReadElementInfo;
+ function GetElementInfo(ElementType: TDAElementType; const Name: string): TDAElementInfo;
+
+ procedure ReadAndApplySchema(const Destination: IDADataset; ApplySchema: boolean);
+ procedure WriteSchema(const Fields: TDAFieldCollection; const Params: TDAParamCollection; aFieldsIndex: array of integer); overload;
+ function ReadOffset: integer;
+ procedure WriteOffset(Offset: integer);
+
+ protected
+ // Overriden
+ function DoCreateStream: TStream; override;
+ procedure DoInitialize(Mode: TDAAdapterInitialization); override;
+ procedure DoFinalize; override;
+ function DoWriteDataset(const Source: IDADataset; Options: TDAWriteOptions; MaxRows: integer;ADynFieldNames: array of string): integer; override;
+ procedure DoWriteDelta(const Source: IDADelta); override;
+ procedure DoReadDataset(const DatasetName: string; const Destination: IDADataset; ApplySchema: boolean); override;
+ procedure DoReadDelta(const DeltaName: string; const Destination: IDADelta); override;
+ procedure SetBufferSize(const Value: cardinal); override;
+
+ function DoBeginWriteDataset( const Source: IDADataset; const Schema: TDADataset;
+ Options: TDAWriteOptions; MaxRows: integer;
+ ADynFieldNames: array of string): TDADataForAppend; override;
+
+ function DoWriteDatasetData(const Source: IDADataset; var aDataForAppend: TDADataForAppend; aDataIndex: Integer = -1): Integer; override;
+ function DoEndWriteDataset(aDataForAppend: TDADataForAppend): Integer; override;
+
+ public
+ constructor Create(aOwner: TComponent); override;
+ destructor Destroy; override;
+
+ function GetTargetDataType: TRODataType; override;
+ published
+ property BufferSize;
+ property IsCompatibleV4: boolean read fIsCompatibleV4 write fIsCompatibleV4 default True;
+ end;
+
+ TDABINAdapter = class(TDABinDataStreamer) end deprecated;
+
+implementation
+
+uses Math, SysUtils, Variants, uROBinaryHelpers, uDaClasses, uDAEngine, uROClasses{$IFDEF DELPHI6}, RTLConsts{$ENDIF};
+
+
+{$IFDEF FPC}
+type
+ THackBinaryObjectWriter = class(TBinaryObjectWriter)
+ end;
+
+ THackBinaryObjectReader = class(TBinaryObjectReader)
+ end;
+{$ENDIF}
+
+procedure Writer_FlushBuffer(AWriter: TWriter);
+begin
+ {$IFNDEF FPC}
+ AWriter.FlushBuffer;
+ {$ELSE}
+ THackBinaryObjectWriter(AWriter.Driver).FlushBuffer;
+ {$ENDIF}
+end;
+
+function GetWriterPosition(AWriter: TWriter):Longint;
+begin
+ {$IFNDEF FPC}
+ Result := AWriter.Position
+ {$ELSE}
+ Result := THackBinaryObjectWriter(AWriter.Driver).FStream.Position;
+ {$ENDIF}
+end;
+
+Procedure SetWriterPosition(AWriter: TWriter; APosition:Longint);
+begin
+ {$IFNDEF FPC}
+ AWriter.Position:=APosition;
+ {$ELSE}
+ Writer_FlushBuffer(AWriter);
+ THackBinaryObjectWriter(AWriter.Driver).FStream.Position:=APosition;
+ {$ENDIF}
+end;
+
+{$IFDEF FPC}
+procedure Writer_WriteValue(AWriter: TWriter; aValue: TValueType);
+begin
+ THackBinaryObjectWriter(AWriter.Driver).WriteValue(aValue);
+end;
+{$ENDIF}
+
+procedure Writer_WriteVariant(AWriter: TWriter; AValue: Variant);
+begin
+ {$IFNDEF FPC}
+ AWriter.WriteVariant(AValue);
+ {$ELSE}
+ if VarIsArray(aValue) then raise EWriteError.Create('Stream write error');
+ case VarType(aValue) and varTypeMask of
+ varEmpty: Writer_WriteValue(AWriter,vaNil);
+ varNull: Writer_WriteValue(AWriter,vaNull);
+ varOleStr: aWriter.WriteWideString(aValue);
+ varString: aWriter.WriteString(aValue);
+ varByte, varShortInt, varWord, varSmallInt,
+ varInteger,varLongWord, varInt64: aWriter.WriteInteger(aValue);
+ varSingle: aWriter.WriteSingle(aValue);
+ varDouble: aWriter.WriteFloat(aValue);
+ varCurrency: aWriter.WriteCurrency(aValue);
+ varDate: aWriter.WriteDate(aValue);
+ varBoolean: aWriter.WriteBoolean(aValue);
+ else
+ aWriter.WriteString(aValue)
+ end;
+ {$ENDIF}
+end;
+
+function GetReaderPosition(AReader: TReader):Longint;
+begin
+ {$IFNDEF FPC}
+ Result := AReader.Position
+ {$ELSE}
+ Result := THackBinaryObjectReader(AReader.Driver).FStream.Position;
+ {$ENDIF}
+end;
+
+Procedure SetReaderPosition(AReader: TReader; APosition:Longint);
+begin
+ {$IFNDEF FPC}
+ AReader.Position:=APosition;
+ {$ELSE}
+ THackBinaryObjectReader(AReader.Driver).FStream.Position:=APosition;
+ {$ENDIF}
+end;
+
+
+{$IFDEF DELPHI6}
+
+function D6_Reader_ReadVariant(AReader: TReader): Variant;
+
+ function ReadCustomVariant: Variant;
+ var
+ OuterStream, InnerStream: TMemoryStream;
+ OuterReader: TReader;
+ StreamSize: Integer;
+ CustomType: TCustomVariantType;
+ CustomTypeClassName: string;
+ VarStreamer: IVarStreamable;
+ begin
+ with AReader do begin
+ CheckValue(vaBinary);
+ OuterStream := TMemoryStream.Create;
+ InnerStream := TMemoryStream.Create;
+ try
+ Read(StreamSize, SizeOf(StreamSize));
+ OuterStream.Size := StreamSize;
+ Read(OuterStream.Memory^, StreamSize);
+
+ OuterReader := TReader.Create(OuterStream, 1024);
+ try
+ CustomTypeClassName := OuterReader.ReadString;
+ OuterReader.Read(StreamSize, SizeOf(StreamSize));
+ InnerStream.Size := StreamSize;
+ OuterReader.Read(InnerStream.Memory^, StreamSize);
+
+ if not FindCustomVariantType(CustomTypeClassName, CustomType) or
+ not Supports(TObject(CustomType), IVarStreamable, VarStreamer) then
+ raise EReadError.CreateRes(@SReadError);
+ TVarData(Result).VType := CustomType.VarType;
+ VarStreamer.StreamIn(TVarData(Result), InnerStream);
+ finally
+ OuterReader.Free;
+ end;
+ finally
+ InnerStream.Free;
+ OuterStream.Free;
+ end;
+ end;
+ end;
+
+begin
+ with AReader do begin
+ VarClear(Result);
+ case NextValue of
+ vaNil, vaNull: if ReadValue <> vaNil then
+ Result := NULL;
+ // Delphi 6 has a bug vaInt8: Result := Byte(ReadInteger);
+ vaInt8: Result := Shortint(ReadInteger);
+ vaInt16: Result := Smallint(ReadInteger);
+ vaInt32: Result := ReadInteger;
+ vaExtended: Result := ReadFloat;
+ vaSingle: Result := ReadSingle;
+ vaCurrency: Result := ReadCurrency;
+ vaDate: Result := ReadDate;
+ vaString, vaLString: Result := ReadString;
+ vaWString,
+ vaUTF8String: Result := ReadWideString;
+ vaFalse, vaTrue: Result := ReadValue = vaTrue;
+ vaBinary: Result := ReadCustomVariant;
+ vaInt64: Result := ReadInt64;
+ else
+ raise EReadError.CreateRes(@SReadError);
+ end;
+ end;
+end;
+{$ENDIF}
+
+function Reader_ReadVariant(AReader: TReader): Variant;
+begin
+ {$IFDEF FPC}
+ Result := Null;
+ Raise Exception.Create('Not supported');
+ {$ELSE}
+ {$IFDEF DELPHI6}
+ Result:= D6_Reader_ReadVariant(AReader);
+ {$ELSE}
+ Result:= AReader.ReadVariant;
+ {$ENDIF}
+ {$ENDIF}
+end;
+
+{ TDABinDataStreamer }
+
+constructor TDABinDataStreamer.Create(aOwner: TComponent);
+begin
+ inherited;
+ fIsCompatibleV4:=True;
+end;
+
+destructor TDABinDataStreamer.Destroy;
+begin
+ // Just in case the user did not call Finalize
+
+ {if Assigned(fReader) then fReader.Free;
+ if Assigned(fWriter) then fWriter.Free;}
+
+ inherited;
+end;
+
+procedure TDABinDataStreamer.SetBufferSize(const Value: cardinal);
+begin
+ if (Value > 0) then inherited SetBufferSize(Value);
+end;
+
+procedure TDABinDataStreamer.DoFinalize;
+var
+ finalpos, i: integer;
+begin
+ try
+ if (AdapterInitialization in AdapterWriteModes) then try
+ finalpos := GetWriterPosition(FWriter);
+
+ // Element count. WIll be read by the DoInitialize method
+ fWriter.WriteInteger(DatasetCount + DeltaCount);
+
+ for i := 0 to (DatasetCount - 1) do
+ WriteElementInfo(TDAElementInfo(DatasetInfoObjects[i]));
+
+ for i := 0 to (DeltaCount - 1) do
+ WriteElementInfo(TDAElementInfo(DeltaInfoObjects[i]));
+
+ Writer_FlushBuffer(FWriter);
+
+ SetWriterPosition(FWriter, fInfoIntOffset);
+ WriteOffset(finalpos);
+ except
+ beep;
+ raise;
+ end;
+ finally
+ // Somehow I need to check because the FreeAndNIL fails on these objects even if the are set to NIL...
+ if AdapterInitialization in AdapterReadModes then
+ FreeAndNIL(fReader)
+
+ else if AdapterInitialization in AdapterWriteModes then
+ FreeAndNIL(fWriter);
+ end;
+end;
+
+procedure TDABinDataStreamer.WriteElementInfo(ElementInfo: TDAElementInfo);
+begin
+ fWriter.WriteInteger(integer(ElementInfo.ElementType));
+ fWriter.WriteString(ElementInfo.Name);
+ fWriter.WriteInteger(ElementInfo.Offset);
+end;
+
+procedure TDABinDataStreamer.ReadElementInfo;
+var
+ et: TDAElementType;
+ nme: string;
+ ofs: integer;
+begin
+ et := TDAElementType(fReader.ReadInteger);
+ nme := fReader.ReadString;
+ ofs := fReader.ReadInteger;
+ AddElementInfo(et, nme, ofs);
+end;
+
+procedure TDABinDataStreamer.DoInitialize(Mode: TDAAdapterInitialization);
+var
+ signature: TBINAdapterSignature;
+ currpos, i: integer;
+begin
+ if (Mode in AdapterReadModes) then begin
+ fReader := TReader.Create(Data, BufferSize);
+ freader.Root := Owner;
+
+ // Checks the signature
+ signature := BINAdapterSignature;
+ fReader.Read(signature, SizeOf(signature));
+ if (signature <> BINAdapterSignature) then raise Exception.Create('Incompatible binary adapter stream');
+
+ fInfoIntOffset := ReadOffset;
+ currpos := GetReaderPosition(FReader);
+
+ // Reads the information attached at the end of the stream
+ if (GetReaderPosition(FReader) = fInfoIntOffset) then Exit; // Nothing to read!
+ SetReaderPosition(FReader, fInfoIntOffset);
+
+ // Number of elements
+ i := fReader.ReadInteger;
+
+ for i := i downto 1 do
+ ReadElementInfo;
+
+ // Restores its position and continues
+ SetReaderPosition(FReader, currpos);
+ end
+ else if (Mode in AdapterWriteModes) then begin
+ fWriter := TWriter.Create(Data, BufferSize);
+
+ // Writes the signature
+ signature := BINAdapterSignature;
+ fWriter.Write(signature, SizeOf(signature));
+
+ // This integer will contain the offset of the stream information (datasetcount, names, etc)
+ // which will be attached at the end of the stream since this is a sequential write
+ fInfoIntOffset := GetWriterPosition(FWriter);
+ WriteOffset(0);
+ end;
+end;
+
+function TDABinDataStreamer.GetElementInfo(ElementType: TDAElementType; const Name: string): TDAElementInfo;
+begin
+ result := nil;
+ case ElementType of
+ etDataset: result := TDAElementInfo(DatasetInfoObjects[GetDatasetIndex(Name)]);
+ etDelta: result := TDAElementInfo(DeltaInfoObjects[GetDeltaIndex(Name)]);
+ end;
+end;
+
+procedure TDABinDataStreamer.AddElementInfo(ElementType: TDAElementType; ElementName: string; Offset: integer);
+var
+ element: TDAElementInfo;
+begin
+ element := TDAElementInfo.Create;
+ element.ElementType := ElementType;
+ element.Name := ElementName;
+ element.Offset := Offset;
+
+ if ElementType = etDataset then
+ AddingDataset(ElementName, element)
+ else
+ AddingDelta(ElementName, element);
+end;
+
+function TDABinDataStreamer.DoCreateStream: TStream;
+begin
+ result := TMemoryStream.Create;
+end;
+
+procedure TDABinDataStreamer.ReadAndApplySchema(const Destination: IDADataset; ApplySchema: boolean);
+var
+ cnt: integer;
+ fields: TDAFieldCollection;
+ params: TDAParamCollection;
+begin
+ fields := Destination.Fields;
+ params := Destination.Params;
+
+ cnt := fReader.ReadInteger;
+
+ if (cnt > 0) then begin
+ fReader.ReadValue; // Must do for ReadCollection. Do not remove.
+ fReader.ReadCollection(fields);
+ end
+ else fields.Clear;
+
+ cnt := fReader.ReadInteger;
+ if (cnt > 0) then begin
+ fReader.ReadValue; // Must do for ReadCollection. Do not remove.
+ fReader.ReadCollection(params);
+ end
+ else params.Clear;
+end;
+
+procedure TDABinDataStreamer.WriteSchema(const Fields: TDAFieldCollection; const Params: TDAParamCollection; aFieldsIndex: array of integer);
+var
+ lcoll: TDAFieldCollection;
+ i: integer;
+begin
+ fWriter.WriteInteger(Length(aFieldsIndex));
+ if Length(aFieldsIndex) > 0 then begin
+ lcoll:=TDAFieldCollection.Create(nil);
+ lcoll.IsCompatibleV4:= self.IsCompatibleV4;
+ try
+ For i:=0 to High(aFieldsIndex) do
+ lcoll.Add.AssignField(Fields[aFieldsIndex[i]]);
+ fWriter.WriteCollection(lColl);
+ finally
+ lcoll.Free;
+ end;
+ end;
+
+ fWriter.WriteInteger(Params.Count);
+ if Params.Count > 0 then fWriter.WriteCollection(Params);
+end;
+
+procedure TDABinDataStreamer.WriteOffset(Offset: integer);
+begin
+ fWriter.Write(Offset, SizeOf(integer));
+end;
+
+function TDABinDataStreamer.ReadOffset: integer;
+begin
+ fReader.Read(result, SizeOf(integer));
+end;
+
+procedure VariantToWriterAsStr(aDataType : TDADataType; const aSourceVariant : Variant; aWriter : TWriter);
+var
+ p: pointer;
+ s: string;
+ lVt: TValueType;
+ lSize: cardinal;
+begin
+ case aDataType of
+ datBlob: begin
+ case VarType(aSourceVariant) of
+ varEmpty: begin
+ lSize := 0;
+ aWriter.Write(lSize, SizeOf(lSize));
+ end;
+ varOleStr:
+ awriter.WriteWideString(aSourceVariant);
+ varString, VarNull:
+ begin
+ s := VarToStr(aSourceVariant);
+ lSize := Length(s);
+ if lSize < 256 then begin
+ lVt := vaString;
+ aWriter.Write(lVt, sizeof(lVt));
+ aWriter.Write(lSize, 1);
+ awriter.Write(pointer(s)^, lSize);
+ end
+ else begin
+ lVt := vaLString;
+ aWriter.Write(lVt, sizeof(lVt));
+ aWriter.Write(lSize, sizeof(lSize));
+ awriter.Write(pointer(s)^, lSize);
+ end;
+ end;
+ 8209:begin { 8209 is binary array }
+ lSize := VarArrayHighBound(aSourceVariant, 1)-VarArrayLowBound(aSourceVariant, 1)+1;
+ p := VarArrayLock(aSourceVariant);
+ try
+ if lSize < 256 then begin
+ lVt := vaString;
+ aWriter.Write(lVt, sizeof(lVt));
+ aWriter.Write(lSize, 1);
+ awriter.Write(p^, lSize);
+ end
+ else begin
+ lVt := vaLString;
+ aWriter.Write(lVt, sizeof(lVt));
+ aWriter.Write(lSize, sizeof(lSize));
+ awriter.Write(p^, lSize);
+ end;
+ finally
+ VarArrayUnlock(aSourceVariant);
+ end;
+ end;
+ else begin
+ RaiseError('Invalid variant type (%d) for Blob.',[VarType(aSourceVariant)]);
+ end;
+ end;
+ end;
+ else begin
+ Writer_WriteVariant(aWriter, aSourceVariant);
+ end;
+ end;
+end;
+
+procedure WriteGuid(aWriter: TWriter; const aVal: String);
+var
+ g: TGuid;
+begin
+ g := StringToGUID(aVal);
+ aWriter.Write(g, Sizeof(g));
+end;
+
+procedure WriteDecimal(aWriter: TWriter; const aVal: Variant);
+var
+ dec: TDecimal;
+begin
+ dec:= VariantToDecimal(aVal);
+ aWriter.Write(dec, Sizeof(Dec));
+end;
+
+
+function TDABinDataStreamer.DoWriteDataset(const Source: IDADataset;
+ Options: TDAWriteOptions;
+ MaxRows: integer;
+ ADynFieldNames: array of string): integer;
+var
+ lDataForAppend: TDADataForAppend;
+begin
+ lDataForAppend := DoBeginWriteDataset(Source, {schema}nil, Options, MaxRows, ADynFieldNames);
+ if woRows in Options then begin
+ DoWriteDatasetData(Source, lDataForAppend);
+ result := DoEndWriteDataset(lDataForAppend);
+ end
+ else begin
+ result := -1;
+ end;
+end;
+
+function CreateByteArray(const s: string): Variant;
+begin
+ result := VarArrayCreate([0, Length(s)-1], varByte);
+ if Length(s) > 0 then
+ Move(s[1], VarArrayLock(Result)^, Length(S));
+ VarArrayUnlock(Result);
+end;
+
+function ReadGuid(aReader: TReader): TGuid;
+begin
+ aReader.Read(Result, Sizeof(Result));
+end;
+
+function ReadDecimal(aReader: TReader): Variant;
+var
+ dec: TDecimal;
+begin
+ aReader.Read(dec, Sizeof(Dec));
+ Result := DecimalToVariant(dec);
+end;
+
+procedure TDABinDataStreamer.DoReadDataset(const DatasetName: string; const Destination: IDADataset; ApplySchema: boolean);
+type
+ PMemDatasetrecord_Native = ^TMemDatasetrecord_Native;
+ TMemDatasetrecord_Native = packed record
+ Ident: byte;
+ Data: PAnsichar;
+ end;
+var
+ elementinfo: TDAElementInfo;
+ editable: IDAEditableDataset;
+ schemaend, cnt, i: integer;
+ flds: array of TDAField;
+ dt: TDADataType;
+ schemapresent: boolean;
+ val: Variant;
+ readonlyfields: array of boolean;
+ //bigVal: Int64;
+ memdataset: IDAMemDatasetBatchAdding;
+ buf, buf1: PAnsiChar;
+ ws: widestring;
+ s: Ansistring;
+ bcd: TDecimal;
+ FRecordsList: TList;
+begin
+ if Destination.Active and ApplySchema then raise Exception.Create('Cannot apply a schema if the destination is active');
+
+ elementinfo := GetElementInfo(etDataset, DatasetName);
+ SetReaderPosition(FReader, elementinfo.Offset);
+
+ editable := Destination as IDAEditableDataset;
+
+ Destination.DisableControls;
+ try
+ editable.DisableEventHandlers;
+ try
+ fReader.BeginReferences;
+ try
+ // Checks to see if the schema is present
+ schemapresent := fReader.ReadBoolean;
+ schemaend := ReadOffset;
+
+ if schemapresent and ApplySchema then begin
+ ReadAndApplySchema(Destination, ApplySchema);
+ end
+ else if (schemaend > 0) then
+ SetReaderPosition(FReader, schemaend);
+ fReader.FixupReferences;
+
+ // Reads the row count
+ //cnt := fReader.ReadInteger;
+ {$IFDEF FPC}
+ cnt := 0;
+ {$ENDIF FPC}
+ fReader.Read(cnt, SizeOf(cnt));
+ if (cnt = -1) then Exit; // Only schema is present!
+
+ // TODO: this is a nasty bug. If we read the schema AND the stream, also contains data
+ // it goes in recursion here... Temporary fix is you just do one of the two for now
+ if ApplySchema then Exit;
+
+ if not Destination.Active then Destination.Open;
+
+ with editable do try
+ // Temporarily sets all fields as writable
+ Destination.DisableConstraints;
+ SetLength(readonlyfields, Fields.Count);
+ SetLength(flds, Fields.Count);
+ for i := 0 to (Fields.Count - 1) do begin
+ flds[i] := Fields[i];
+ readonlyfields[i] := flds[i].ReadOnly;
+ flds[i].ReadOnly := FALSE;
+ end;
+
+ {$IFDEF STORERECID}
+ Destination.CurrentRecIdValue := max(1,Destination.CurrentRecIdValue);
+ {$ENDIF}
+
+ if Destination.QueryInterface(IDAMemDatasetBatchAdding, memdataset) <> s_ok then memdataset := nil;
+
+ if (memdataset = nil) or Assigned(OnReadFieldValue) then begin
+ // standard mode
+ // Inserts the records
+ while (cnt > 0) do try
+ Append;
+
+ {$IFDEF STORERECID}
+ Destination.CurrentRecIdValue := max(Destination.CurrentRecIdValue,fReader.ReadInteger);//#2
+ {$ENDIF}
+
+ for i := 0 to (Fields.Count - 1) do begin
+
+ if flds[i].Calculated or flds[i].Lookup then Continue;
+
+ val := Null; // Default (see datUnknown below)
+ dt := TDADataType(fReader.ReadInteger);
+
+ case dt of
+ datUnknown: ; // Field was null
+ datWideString,
+ datWideMemo: val := fReader.ReadWideString;
+ datString: val := fReader.ReadString;
+ datDateTime: val := fReader.ReadDate;
+ datFloat: val := fReader.ReadFloat;
+ datCurrency: val := fReader.ReadCurrency;
+ datBoolean: val := fReader.ReadBoolean;
+ datAutoInc,
+ datInteger: val := fReader.ReadInteger;
+ datSingleFloat: val := fReader.ReadSingle;
+ datLargeUInt,
+ datLargeAutoInc,
+ datLargeInt: val := fReader.ReadInt64;
+
+ datByte: val := Byte(fReader.ReadInteger);
+ datShortInt: val := ShortInt(fReader.ReadInteger);
+ datWord: val := Word(fReader.ReadInteger);
+ datSmallInt: val := SmallInt(fReader.ReadInteger);
+ datCardinal: val := Cardinal(fReader.ReadInteger);
+ datGuid: val := GuidToString(ReadGuid(fReader));
+ datXml: val := fReader.ReadWideString;
+ datDecimal: val := ReadDecimal(fReader);
+ datMemo: val := fReader.ReadString;
+ datBlob: val := fReader.ReadString;
+ end;
+
+ if Assigned(OnReadFieldValue) then OnReadFieldValue(flds[i], val);
+ if VarIsNull(val) then continue;
+ flds[i].Value := val;
+ end;
+
+ try
+ Post;
+ except
+ // Introduced to restore the dsBrowse state of the datatable
+ // in case of errors
+ Cancel;
+ raise;
+ end;
+ finally
+ Dec(cnt);
+ end;
+ end else begin
+ // batch loading
+ // Inserts the records
+ FRecordsList := TList.Create;
+ try
+ while (cnt > 0) do try
+ //Append;
+ buf:= memdataset.AllocRecordBuffer;
+ try
+ for i := 0 to (Fields.Count - 1) do begin
+ if flds[i].Calculated or flds[i].Lookup then Continue;
+ buf1:= memdataset.GetFieldNativeBuffer(buf,flds[i].BindedField);
+ dt := TDADataType(fReader.ReadInteger);
+ memdataset.SetNullMask(PMemDatasetrecord_Native(buf)^.Data,flds[i].BindedField, dt = datUnknown);
+ case dt of
+ datUnknown: ;
+ datWideString, datXml: memdataset.SetWideString(buf1,flds[i].BindedField,fReader.ReadWideString);
+ datString: memdataset.SetAnsiString(buf1,flds[i].BindedField,{$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(fReader.ReadString));
+ datCurrency: PCurrency(buf1)^ := fReader.ReadCurrency;
+ datDateTime: PDateTime(buf1)^ := TimeStampToMSecs(DateTimeToTimeStamp(fReader.ReadDate));
+ datFloat: PDouble(buf1)^ := fReader.ReadFloat;
+ datLargeInt, datLargeAutoInc, datLargeUInt: PInt64(buf1)^ := fReader.ReadInt64;
+ datBoolean: PBoolean(buf1)^ := fReader.ReadBoolean;
+ datAutoInc, datInteger: PInteger(buf1)^ := fReader.ReadInteger;
+ datSingleFloat: PDouble(buf1)^ := fReader.ReadSingle;
+ datDecimal: begin
+ fReader.Read(bcd, Sizeof(bcd));
+ PBCD(buf1)^ := DecimalToBCD(bcd);
+ end;
+ datCardinal: PCardinal(buf1)^ := Cardinal(fReader.ReadInteger);
+ datByte: PSmallInt(buf1)^ := Byte(fReader.ReadInteger);
+ datWord: PWord(buf1)^ := Word(fReader.ReadInteger);
+ datShortInt: PSmallInt(buf1)^ := ShortInt(fReader.ReadInteger);
+ datSmallInt: PSmallInt(buf1)^ := SmallInt(fReader.ReadInteger);
+ datGuid: begin
+ s := {$IFDEF UNICODE}AnsiToUtf8{$ENDIF} (GuidToString(ReadGuid(fReader)));
+ Move(pointer(s)^, pointer(buf1)^, 38 {Length(GuidString)});
+ end;
+ datBlob,datMemo: PPointer(buf1)^ := memdataset.MakeBlobFromString({$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(fReader.ReadString));
+ datWideMemo: begin
+ ws:= fReader.ReadWideString;
+ SetString(S,PAnsiChar(PWideChar(ws)),Length(ws)*SizeOf(WideChar));
+ PPointer(buf1)^ := memdataset.MakeBlobFromString(s);
+ ws:='';
+ end;
+ end;
+ // val =
+ // if Assigned(OnReadFieldValue) then OnReadFieldValue(flds[i], val);
+ // flds[i].Value := val;
+ end;
+ FRecordsList.Add(Buf);
+ except
+ memdataset.FreeRecordBuffer(buf);
+ For i:=0 to FRecordsList.Count-1 do begin
+ buf:=FRecordsList[i];
+ memdataset.FreeRecordBuffer(Buf);
+ end;
+ raise;
+ end;
+ finally
+ Dec(cnt);
+ end;
+ memdataset.AddRecordsfromList(FRecordsList);
+ finally
+ FRecordsList.Free;
+ end;
+ end;
+ finally
+ // Restores the read-only property
+ for i := 0 to (Fields.Count - 1) do
+ flds[i].ReadOnly := readonlyfields[i];
+ Destination.EnableConstraints;
+ end;
+
+ // TODO: temporary hack for the TClientDataset. Somehow if we don't do this the
+ // cursor is locked to the last record and there's no way to move!
+ {editable.Next;
+ editable.First;}
+ finally
+ fReader.EndReferences;
+ end;
+ finally
+ editable.EnableEventHandlers;
+ end;
+ finally
+ Destination.EnableControls;
+ end;
+end;
+
+procedure VariantToWriter(aDataType : TDADataType; const aSourceVariant : Variant; aWriter : TWriter);
+var
+ p: pointer;
+ lSize: cardinal;
+begin
+ case aDataType of
+ datBlob: begin
+ case VarType(aSourceVariant) of
+ varEmpty:begin
+ lSize := 0;
+ aWriter.Write(lSize, SizeOf(lSize));
+ end;
+ 8209:begin { 8209 is binary array }
+ lSize := VarArrayHighBound(aSourceVariant, 1)-VarArrayLowBound(aSourceVariant, 1)+1;
+ p := VarArrayLock(aSourceVariant);
+ try
+ aWriter.Write(lSize, SizeOf(lSize));
+ aWriter.Write(p^, lSize);
+ finally
+ VarArrayUnlock(aSourceVariant);
+ end;
+ end;
+ else begin
+ RaiseError('Invalid variant type (%d) for Blob.',[VarType(aSourceVariant)]);
+ end;
+ end;
+ end;
+ else begin
+ Writer_WriteVariant(aWriter, aSourceVariant);
+ end;
+ end;
+end;
+
+function ReaderToVariant(aDataType : TDADataType; aReader : TReader): Variant;
+var
+ p: pointer;
+ sze : cardinal;
+begin
+ case aDataType of
+ datBlob : begin
+ {$IFDEF FPC}
+ sze := 0;
+ {$ENDIF}
+ aReader.Read(sze, SizeOf(sze));
+
+ if (sze = 0) then
+ result := Unassigned
+ else try
+ result := VarArrayCreate([0, sze-1], varByte);
+ p := VarArrayLock(result);
+ aReader.Read(p^, sze);
+ finally
+ VarArrayUnlock(result);
+ end;
+ end;
+ else
+ result := Reader_ReadVariant(aReader);
+ end;
+end;
+
+procedure TDABinDataStreamer.DoWriteDelta(const Source: IDADelta);
+var
+ i, x: integer;
+begin
+ // This information will be used later to complete the stream (see DoInitialize)
+ AddElementInfo(etDelta, Source.LogicalName, GetWriterPosition(FWriter));
+ Source.RemoveUnchangedChanges;
+ // Number of changes
+ fWriter.WriteInteger(Source.Count);
+
+ // Numnber of fields, field names and their types
+ fWriter.WriteInteger(Source.LoggedFieldCount);
+ for i := 0 to (Source.LoggedFieldCount - 1) do begin
+ fWriter.WriteString(Source.LoggedFieldNames[i]);
+ fWriter.WriteInteger(integer(Source.LoggedFieldTypes[i]));
+ end;
+
+ // Key fields
+ fWriter.WriteInteger(Source.KeyFieldCount);
+ for i := 0 to (Source.KeyFieldCount - 1) do begin
+ fWriter.WriteString(Source.KeyFieldNames[i]);
+ end;
+
+ if (Source.Count = 0) then Exit;
+
+ // Actual changes
+ fWriter.WriteInteger(Source.Count);
+ for i := 0 to (Source.Count - 1) do begin
+ // Change type, RecID, status and message
+ x := integer(Source.Changes[i].ChangeType);
+ fWriter.WriteInteger(x);
+
+ fWriter.WriteInteger(Source.Changes[i].RecID);
+
+ x := integer(Source.Changes[i].Status);
+ fWriter.WriteInteger(x);
+
+ fWriter.WriteString(Source.Changes[i].Message);
+
+ // Old values
+ for x := 0 to (Source.LoggedFieldCount - 1) do begin
+ //fWriter.WriteVariant(Source.Changes[i].OldValues[x]);
+ VariantToWriter(Source.LoggedFieldTypes[x], Source.Changes[i].OldValues[x], fWriter);
+ end;
+
+ // New values
+ for x := 0 to (Source.LoggedFieldCount - 1) do begin
+ //fWriter.WriteVariant(Source.Changes[i].NewValues[x]); }
+ VariantToWriter(Source.LoggedFieldTypes[x], Source.Changes[i].NewValues[x], fWriter);
+ end;
+ end;
+end;
+
+procedure TDABinDataStreamer.DoReadDelta(const DeltaName: string; const Destination: IDADelta);
+var
+ elementinfo: TDAElementInfo;
+ msg, str: string;
+ recid, i, cnt, x: integer;
+ change: TDADeltaChange;
+ changetype: TDAChangeType;
+ status: TDAChangeStatus;
+ val: Variant;
+begin
+ elementinfo := GetElementInfo(etDelta, DeltaName);
+ SetReaderPosition(FReader, elementinfo.Offset);
+
+ // Number of changes
+ cnt := fReader.ReadInteger;
+
+ // Field number, names and types
+ Destination.ClearFieldNames;
+ i := fReader.ReadInteger;
+ for i := i downto 1 do begin
+ str := fReader.ReadString;
+ Destination.AddFieldName(str);
+ Destination.LoggedFieldTypes[Destination.LoggedFieldCount-1] := TDADataType(fReader.ReadInteger);
+ end;
+
+ // Key fields
+ Destination.ClearKeyFieldNames;
+ i := fReader.ReadInteger;
+ for i := i downto 1 do begin
+ str := fReader.ReadString;
+ Destination.AddKeyFieldName(str);
+ end;
+
+ if (cnt = 0) then Exit;
+
+ // Actual changes
+ cnt := fReader.ReadInteger;
+ for i := 1 to cnt do begin
+ x := fReader.ReadInteger;
+ changetype := TDAChangeType(x);
+ recid := fReader.ReadInteger;
+
+ x := fReader.ReadInteger;
+ status := TDAChangeStatus(x);
+
+ msg := fReader.ReadString;
+
+ change := Destination.Add(recid, changetype, status, msg);
+ //Destination.Add(change);
+
+ // Old values
+ for x := 0 to (Destination.LoggedFieldCount - 1) do begin
+ {val := fReader.ReadVariant;
+ change.OldValues[x] := val;}
+ val := ReaderToVariant(Destination.LoggedFieldTypes[x], fReader);
+ change.OldValues[x] := val;
+ end;
+
+ // New values
+ for x := 0 to (Destination.LoggedFieldCount - 1) do begin
+ {val := fReader.ReadVariant;
+ change.NewValues[x] := val;}
+ val := ReaderToVariant(Destination.LoggedFieldTypes[x], fReader);
+ change.NewValues[x] := val;
+ end;
+ end;
+end;
+
+function TDABinDataStreamer.GetTargetDataType: TRODataType;
+begin
+ result := rtBinary
+end;
+
+function TDABinDataStreamer.DoBeginWriteDataset( const Source: IDADataset; const Schema: TDADataset;
+ Options: TDAWriteOptions; MaxRows: integer;
+ ADynFieldNames: array of string): TDADataForAppend;
+var
+ cntpos, currpos, k, i: integer;
+ fld: TDAField;
+ wrtschema: boolean;
+ lfields: array of integer;
+ lDataForAppend : TDADataForAppend;
+ lSchemaFields: TDAFieldCollection;
+ lSchemaParams: TDAParamCollection;
+ lLogicalName: String;
+begin
+ lDataForAppend := TDADataForAppend.Create();
+ result := lDataForAppend;
+
+ if Assigned(Schema) then begin
+ lDataForAppend.TableSchema := Schema;
+ if Schema is TDAUnionDataTable then begin
+ fld := Schema.FindField(def_SourceTableFieldName);
+ if not Assigned(fld) then begin
+ fld := Schema.Fields.Add();
+ fld.Name := def_SourceTableFieldName;
+ fld.DataType := datInteger;
+ fld.InPrimaryKey := true;
+ fld.ServerAutoRefresh := true;
+ end;
+ end;
+ lSchemaFields := Schema.Fields;
+ lSchemaParams := Schema.Params;
+ lLogicalName := Schema.Name;
+ end else begin
+ if Assigned(Source) then begin
+ lSchemaFields := Source.Fields;
+ lSchemaParams := Source.Params;
+ lLogicalName := Source.LogicalName;
+ end else begin
+ raise EDAException.Create('Schema or source should be assigned.');
+ end;
+ end;
+
+
+ if Length(ADynFieldNames) > 0 then begin
+ SetLength(lfields, Length(ADynFieldNames));
+ For i:=0 to High(ADynFieldNames) do begin
+ fld:=lSchemaFields.FindField(ADynFieldNames[i]);
+ if fld <> nil then
+ lfields[i]:= fld.Index
+ else
+ lfields[i]:= -1;
+ end;
+ end else begin
+ SetLength(lfields, lSchemaFields.Count);
+ For i:=0 to lSchemaFields.Count-1 do
+ lfields[i]:=i;
+ end;
+
+ // This information will be used later to complete the stream (see DoInitialize)
+ AddElementInfo(etDataset, lLogicalName, GetWriterPosition(FWriter));
+
+ // Writes a boolean flag that indicates if the schema is being written
+ wrtschema := (woSchema in Options) or (Length(ADynFieldNames)>0);
+ fWriter.WriteBoolean(wrtschema);
+
+ // Write the offset to jump to if the reader wants to skip the schema
+ currpos := GetWriterPosition(FWriter);
+ WriteOffset(0);
+
+ if wrtschema then begin
+ WriteSchema(lSchemaFields, lSchemaParams, lfields);
+ Writer_FlushBuffer(FWriter);
+
+ // Writes the offset of the schema's end
+ k := GetWriterPosition(FWriter);
+ SetWriterPosition(FWriter, currpos);
+ WriteOffset(k);
+ SetWriterPosition(FWriter, k);
+ end;
+
+ // Writes the row count
+ cntpos := GetWriterPosition(FWriter);
+
+ if not (woRows in Options) then begin
+ fWriter.WriteInteger(-1);
+ end else begin
+ k := 0;
+ fWriter.Write(k, SizeOf(k));
+ end;
+
+ SetLength(lDataForAppend.RealFields, Length(lFields));
+ for i:= 0 to Length(lFields) -1 do
+ lDataForAppend.RealFields[i] := lFields[i];
+
+ lDataForAppend.MaxRowCount := MaxRows;
+ lDataForAppend.CountOfRecordsPosition := cntpos;
+ lDataForAppend.EndDataPosition := GetWriterPosition(FWriter);
+ lDataForAppend.RecordCount := k;
+end;
+
+function TDABinDataStreamer.DoWriteDatasetData(const Source: IDADataset; var aDataForAppend: TDADataForAppend; aDataIndex: Integer = -1): Integer;
+var
+ max, k, i: integer;
+ flds: array of TDAField;
+ val: Variant;
+ lDataForAppend: TDADataForAppend;
+ lFields: array of integer;
+ bigVal: Int64;
+ lFieldName: String;
+ lMapToFieldName: String;
+ lColumnMappings: TDAColumnMappingCollection;
+ lColumnMapping: TDAColumnMapping;
+begin
+
+ lDataForAppend := aDataForAppend;
+ SetWriterPosition(FWriter, lDataForAppend.EndDataPosition);
+ SetLength(lfields, Length(lDataForAppend.RealFields));
+ SetLength(flds, Length(lDataForAppend.RealFields));
+ for i:= 0 to Length(lDataForAppend.RealFields) -1 do
+ lFields[i] := lDataForAppend.RealFields[i];
+
+ k := lDataForAppend.RecordCount;
+ max := lDataForAppend.MaxRowCount;
+ {$IFDEF FPC}
+ Result := 0; // else it's warn
+ {$ENDIF}
+
+ // Mapping fields of Source table to the streamed dataset
+ if Assigned(lDataForAppend.TableSchema) and (lDataForAppend.TableSchema is TDAUnionDataTable) then begin
+ lColumnMappings := TDAUnionSourceTable(TDAUnionDataTable(lDataForAppend.TableSchema).SourceTables.ItemByName(Source.Name)).ColumnMappings;
+ for i := 0 to lDataForAppend.TableSchema.Fields.Count - 1 do begin
+ lFieldName := lDataForAppend.TableSchema.Fields[lFields[i]].Name;
+ if lFieldName = def_SourceTableFieldName then begin
+ lFields[i] := -10;
+ continue;
+ end;
+ lMapToFieldName := lFieldName;
+ if Assigned(lColumnMappings) then begin
+ lColumnMapping := lColumnMappings.MappingByDatasetField(lFieldName);
+ if Assigned(lColumnMapping) and (lColumnMapping.TableField <> '') then
+ lMapToFieldName := lColumnMapping.TableField;
+ end;
+ lFields[i] := Source.FieldByName(lMapToFieldName).Index;
+ end;
+ end;
+
+
+ Source.DisableControls();
+ if not Source.active then Source.Open();
+ try
+ for i:= 0 to Length(lfields) -1 do begin
+ if lfields[i] = -10 then
+ flds[i] := lDataForAppend.TableSchema.FieldByName(def_SourceTableFieldName)
+ else
+ flds[i] := Source.Fields[lfields[i]];
+ end;
+
+ // Writes the actual records
+ while (k<>max) and not Source.EOF do begin
+ {$IFDEF STORERECID}
+ fWriter.WriteInteger(Source.GetRowRecIdValue);
+ {$ENDIF}
+ for i := 0 to Length(lfields) - 1 do begin
+ //RealFields[i] = -10 then this is @SourceTable field
+ if lfields[i] = -10 then begin
+ val := aDataIndex;
+ end else begin
+ val := Source.FieldValues[lfields[i]];
+ end;
+
+ if Assigned(OnBeforeFieldValueSerialization) then OnBeforeFieldValueSerialization(flds[i], val);
+
+ if flds[i].Calculated or flds[i].Lookup then Continue;
+ if Assigned(OnWriteFieldValue) then OnWriteFieldValue(flds[i], val);
+
+ if (lfields[i] = -10) or ((not flds[i].IsNull) and (not VarIsNull(Val))) then begin
+ fWriter.WriteInteger(integer(flds[i].DataType));
+ case flds[i].DataType of
+ datWideString,
+ datWideMemo: fWriter.WriteWideString(VarToWideStr(val));
+ datString: fWriter.WriteString(VarToStr(val));
+ datDateTime: fWriter.WriteDate(val);
+ datFloat: fWriter.WriteFloat(val);
+ datBoolean: fWriter.WriteBoolean(val);
+ datCurrency: fWriter.WriteCurrency(val);
+ datByte,
+ datShortInt,
+ datWord,
+ datSmallInt,
+ datCardinal,
+ datAutoInc,
+ datInteger: fWriter.WriteInteger(val);
+ datSingleFloat: fwriter.WRiteSingle(val);
+
+ //datLargeInt: fWriter. WriteInteger(val);
+ datLargeAutoInc,
+ datLargeUInt,
+ datLargeInt: begin
+ bigVal := val;
+ fWriter.WriteInteger(bigVal);
+ end;
+ datGuid: WriteGuid(fWriter, Val);
+ datXml: fWriter.WriteWideString(Val);
+ datDecimal: WriteDecimal(fWriter, Val);
+ datMemo: fWriter.WriteString(VarToStr(val));
+ datBlob: begin
+ VariantToWriterAsStr(datBlob, val, fWriter);
+ end;
+ end;
+ end else
+ fWriter.WriteInteger(Ord(datUnknown));
+ end;
+
+ Inc(result);
+ Inc(k);
+ Source.Next;
+
+ if Source.EOF then Break;
+ end;
+
+ lDataForAppend.EndDataPosition := GetWriterPosition(FWriter);
+ lDataForAppend.RecordCount := k;
+ result := k;
+ finally
+ Source.EnableControls;
+ end;
+end;
+
+function TDABinDataStreamer.DoEndWriteDataset(aDataForAppend: TDADataForAppend): Integer;
+begin
+ Writer_FlushBuffer(FWriter);
+ result := aDataForAppend.RecordCount;
+ SetWriterPosition(FWriter, aDataForAppend.CountOfRecordsPosition);
+ fWriter.Write(aDataForAppend.RecordCount, SizeOf(aDataForAppend.RecordCount));
+ SetWriterPosition(FWriter, aDataForAppend.EndDataPosition);
+ aDataForAppend.Free();
+end;
+
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDABusinessProcessor.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDABusinessProcessor.pas
new file mode 100644
index 0000000..d6badae
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDABusinessProcessor.pas
@@ -0,0 +1,2372 @@
+unit uDABusinessProcessor;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+{ ToDo: for DA3, refactor the Oracle specific stuff OUT of here again }
+
+uses
+ Classes, DB, Contnrs, SysUtils,
+ uDAInterfaces, uDADataTable, uDAClasses, uDAOracleInterfaces,
+ uDAScriptingProvider, uDADelta
+ , uDASupportClasses
+ ;
+
+type
+ // These structs are to speed up mapping between command parameters and delta fields.
+ // See TDABusinessProcessor.ProcessDelta
+ TDAMappingType = (mtNewValue, mtOldValue{, mtNullCheck});
+ TDAParamMapping = record
+ CommandIndex,
+ DeltaIndex: integer;
+ MappingType: TDAMappingType;
+
+ GeneratorName : string;
+ GeneratorValue : integer;
+ end;
+
+ TDAParamMappingArray = array of TDAParamMapping;
+
+const
+ MappingPrefix: array[TDAMappingType] of string = ('', 'OLD_'{, 'NULL_'});
+
+type
+ TDABusinessProcessor = class;
+ TDABusinessProcessorRules = class;
+
+ TDADeltaProcessorItemCollection = class;
+
+
+ { Events }
+ TDAProcessDeltaEvent = procedure(Sender: TDABusinessProcessor; const aDelta: IDADelta) of object;
+
+ TDABeforeProcessChangeEvent = procedure(Sender: TDABusinessProcessor; aChangeType: TDAChangeType; aChange: TDADeltaChange; var ProcessChange: boolean) of object;
+
+ TDAAfterProcessChangeEvent = procedure(Sender: TDABusinessProcessor; aChange: TDADeltaChange; Processed: boolean; var CanRemoveFromDelta: boolean) of object;
+
+ TDAProcessChangeEvent = procedure(Sender: TDABusinessProcessor; aChangeType: TDAChangeType; aChange: TDADeltaChange; const aCommand: IDASQLCommand) of object;
+
+ TDARefreshDeltaChangeEvent = procedure(Sender: TDABusinessProcessor; aChangeType: TDAChangeType; aChange: TDADeltaChange; const aRefreshDataSet: IDADataSet) of object;
+
+ TDAProcessErrorEvent = procedure(Sender: TDABusinessProcessor;
+ aChangeType: TDAChangeType;
+ aChange: TDADeltaChange;
+ const aCommand: IDASQLCommand;
+ var CanRemoveFromDelta: boolean;
+ Error: Exception) of object;
+
+ TDAGenerateSQLEvent = procedure(Sender: TDABusinessProcessor;
+ ChangeType: TDAChangeType;
+ const ReferencedStatement: TDAStatement;
+ const aDelta: IDADelta;
+ var SQL: string) of object;
+
+ { Misc }
+ TDAProcessorOption = (poAutoGenerateInsert,
+ poAutoGenerateUpdate,
+ poAutoGenerateDelete,
+ poAutoGenerateRefreshDataset,
+ poPrepareCommands,
+ poIgnoreRowsAffected);
+ TDAProcessorOptions = set of TDAProcessorOption;
+
+ TDAUpdateMode = (updWhereKeyOnly, updWhereAll, updWhereKeyAndUserDefined, updWhereUserDefined);
+
+ { TDADeltaStruct }
+ TDADeltaStruct = class
+ private
+ fDelta : IDADelta;
+ fBusinessProcessor : TDABusinessProcessor;
+ fDetailDeltas : TDADeltaList;
+ fRelationShips: TDADatasetRelationshipList;
+
+ public
+ constructor Create(const aDelta : IDADelta; aBusinessProcessor : TDABusinessProcessor);
+ destructor Destroy; override;
+
+ property Delta : IDADelta read fDelta;
+ property BusinessProcessor : TDABusinessProcessor read fBusinessProcessor;
+ property DetailDeltas : TDADeltaList read fDetailDeltas;
+ property RelationShips : TDADatasetRelationshipList read fRelationShips;
+ end;
+
+ { TDADeltaStructList }
+ TDADeltaStructList = class(TObjectList)
+ private
+ function GetDADeltaStructs(Index: integer): TDADeltaStruct;
+ protected
+ public
+ function Add(const aDelta : IDADelta; aBusinessProcessor : TDABusinessProcessor): TDADeltaStruct;
+
+ function FindStruct(const aLogicalName : string) : TDADeltaStruct;
+ function StructByLogicalName(const aLogicalName : string) : TDADeltaStruct;
+
+ property DeltaStructs[Index : integer] : TDADeltaStruct read GetDADeltaStructs; default;
+ end;
+
+ IDABusinessProcessorScriptingProvider = interface(IDAScriptingProvider)
+ ['{7BF0D886-51D7-4E91-8073-0FBA78CC11F3}']
+ procedure RunBusinessProcessorScript(aBusinessProcessor: TDABusinessProcessor; const aScript: string; const aMethod: string; aLanguage:TROSEScriptLanguage);
+ end;
+
+ { IDASQLGenerator }
+ IDASQLGenerator = interface
+ ['{EDE4E068-C300-4991-89CF-F9A81D207930}']
+ function GenerateSQL(aChangeType: TDAChangeType;
+ aChange: TDADeltaChange;
+ aDataset: TDADataset;
+ const aDelta: IDADelta;
+ aDatasetStatement: TDAStatement;
+ aConnection: IDAConnection): string;
+
+ procedure UpdateSQLForOracle(aChangeType: TDAChangeType;
+ aDataset: TDADataset; const aDelta: IDADelta;
+ aDatasetStatement: TDAStatement; aConnection: IOracleConnection;
+ var OriginalSQL: string);
+
+ function GenerateRefreshDataset(aDataset: TDADataset; const aDelta: IDADelta;
+ aDatasetStatement: TDAStatement; aConnection: IDAConnection): IDADataset;
+
+ end;
+
+ { TDABusinessProcessor }
+ TDABusinessProcessor = class(TScriptableComponent, IDASQLGenerator)
+ private
+ fOnBeforeProcessChange: TDABeforeProcessChangeEvent;
+ fOnAfterProcessChange: TDAAfterProcessChangeEvent;
+
+ fInsertCommandName: string;
+ fDeleteCommandName: string;
+ fUpdateCommandName: string;
+
+ fSchema: TDASchema;
+
+ fOnAfterProcessDelta: TDAProcessDeltaEvent;
+ fOnBeforeProcessDelta: TDAProcessDeltaEvent;
+ fOnProcessChange: TDAProcessChangeEvent;
+ fOnProcessError: TDAProcessErrorEvent;
+ fOnRefreshDeltaChange: TDARefreshDeltaChangeEvent;
+
+ fReferencedDataset: string;
+ fProcessorOptions: TDAProcessorOptions;
+ fUserUpdateFields: TStringList;
+ fUpdateMode: TDAUpdateMode;
+ fOnGenerateSQL: TDAGenerateSQLEvent;
+
+ fBusinessRules: TDABusinessProcessorRules;
+ fCurrentChange: integer;
+ fCurrentDelta: TDADelta;
+ fBusinessRulesID: string;
+ fRefreshDataset: string;
+ FRaiseExceptionAtError: boolean;
+ fHasReducedDelta: Boolean;
+ FDynamicWhereInRefreshDataset: Boolean;
+
+ procedure SetSchema(const Value: TDASchema);
+ procedure SetDeleteCommandName(const Value: string);
+ procedure SetInsertCommandName(const Value: string);
+ procedure SetUpdateCommandName(const Value: string);
+ procedure SetReferencedDataset(const Value: string);
+ function GetUserUpdateFields: TStrings;
+ procedure SetUserUpdateFields(Value: TStrings);
+ function NeedsReferencedDataset: boolean;
+ function GetCurrentChange: TDADeltaChange;
+ procedure SetBusinessRulesID(const Value: string);
+ procedure SetupParameters(const aCommand: IDASQLCommand; aReferencedDataset : TDADataset; const aConnection: IDAConnection);
+ procedure SetRefreshDataset(const Value: string);
+
+ procedure RefreshDeltaChange(const aConnection : IDAConnection; const aRefreshDataset: IDADataset;
+ const aDelta: IDADelta; aDeltaChange: TDADeltaChange; GenAutoIncValue : integer = -1);
+ function SetupRefreshDatasetForReducedDelta(const aConnection: IDAConnection; const aDelta: IDADelta):IDADataset;
+ procedure SetProcessorOptions(const Value: TDAProcessorOptions);
+ protected
+ procedure SetupCommands(const aConnection: IDAConnection; const aDelta: IDADelta;
+ out anInsertCmd, anUpdateCmd, aDeleteCmd: IDASQLCommand;
+ out aRefreshDs : IDADataset); overload;dynamic;
+ procedure SetupCommands(const aConnection: IDAConnection; const aChange: TDADeltaChange;
+ out anCmd: IDASQLCommand); overload;dynamic;
+ // For unions
+ procedure SetupCommands(const aConnection: IDAConnection; const aDelta: IDADelta;
+ out aCommandsList : TDADeltaProcessorItemCollection); overload;dynamic;
+ procedure SetupCommandsWithMapping(const aConnection: IDAConnection; const aChange: TDADeltaChange;
+ out anCmd: IDASQLCommand; out aParamMapping: TDAParamMappingArray);
+
+
+ procedure CreateMappings(const aDelta: IDADelta; var MappingArray: TDAParamMappingArray; const aCommand: IDASQLCommand; lAdditionalMapping: TDAColumnMappingCollection = nil; AValidateCommand: Boolean = False);
+
+ { IDASQLGenerator }
+ function GenerateSQL(aChangeType: TDAChangeType;
+ aChange: TDADeltaChange;
+ aDataset: TDADataset;
+ const aDelta: IDADelta;
+ aDatasetStatement: TDAStatement;
+ aConnection: IDAConnection): string; dynamic;
+
+ procedure UpdateSQLForOracle(aChangeType: TDAChangeType;
+ aDataset: TDADataset; const aDelta: IDADelta;
+ aDatasetStatement: TDAStatement; aConnection: IOracleConnection;
+ var OriginalSQL: string);
+
+ function GenerateRefreshDataset(aDataset: TDADataset; const aDelta: IDADelta;
+ aDatasetStatement: TDAStatement; aConnection: IDAConnection): IDADataset; dynamic;
+
+ procedure Notification(AComponent: TComponent; Operation: TOperation); override;
+
+ // IInterface
+ function QueryInterface(const IID: TGUID; out Obj): HResult; override;
+
+ function GetConnectionForObject(const aConnection: IDAConnection; const aName: string): IDAConnection;
+ public
+ constructor Create(aOwner: TComponent); override;
+ destructor Destroy; override;
+
+ procedure SynchronizeAutoIncs(const aMasterDelta, aDetailDelta : IDADelta;
+ const aRelationship : TDADatasetRelationship);
+
+ procedure ProcessDelta(const aConnection: IDAConnection;
+ const aDelta: IDADelta;
+ ChangeTypes: TDAChangeTypes = AllChanges); overload;
+
+ procedure ProcessDelta(aDataTable: TDADataTable;
+ ChangeTypes: TDAChangeTypes; const aConnection : IDAConnection = NIL); overload;
+
+ procedure ProcessDeltaForUnion(const aConnection: IDAConnection;
+ const aDelta: IDADelta; ChangeTypes: TDAChangeTypes = AllChanges);
+
+
+ property CurrentDelta: TDADelta read fCurrentDelta;
+ property CurrentChange: TDADeltaChange read GetCurrentChange;
+ property HasReducedDelta: Boolean read fHasReducedDelta write fHasReducedDelta;
+ procedure CheckProperties;
+ published
+ property OnBeforeProcessDelta: TDAProcessDeltaEvent read fOnBeforeProcessDelta write fOnBeforeProcessDelta;
+ property OnAfterProcessDelta: TDAProcessDeltaEvent read fOnAfterProcessDelta write fOnAfterProcessDelta;
+ property OnBeforeProcessChange: TDABeforeProcessChangeEvent read fOnBeforeProcessChange write fOnBeforeProcessChange;
+ property OnAfterProcessChange: TDAAfterProcessChangeEvent read fOnAfterProcessChange write fOnAfterProcessChange;
+ property OnProcessChange: TDAProcessChangeEvent read fOnProcessChange write fOnProcessChange;
+ property OnProcessError: TDAProcessErrorEvent read fOnProcessError write fOnProcessError;
+ property OnGenerateSQL: TDAGenerateSQLEvent read fOnGenerateSQL write fOnGenerateSQL;
+ property OnRefreshDeltaChange: TDARefreshDeltaChangeEvent read fOnRefreshDeltaChange write fOnRefreshDeltaChange;
+
+ property Schema: TDASchema read fSchema write SetSchema;
+
+ property InsertCommandName: string read fInsertCommandName write SetInsertCommandName;
+ property DeleteCommandName: string read fDeleteCommandName write SetDeleteCommandName;
+ property UpdateCommandName: string read fUpdateCommandName write SetUpdateCommandName;
+ property RefreshDatasetName: string read fRefreshDataset write SetRefreshDataset;
+
+ property ReferencedDataset: string read fReferencedDataset write SetReferencedDataset;
+ property ProcessorOptions: TDAProcessorOptions read fProcessorOptions write SetProcessorOptions;
+
+ property UpdateMode: TDAUpdateMode read fUpdateMode write fUpdateMode;
+ property UserUpdateFields: TStrings read GetUserUpdateFields write SetUserUpdateFields;
+
+ property BusinessRulesID: string read fBusinessRulesID write SetBusinessRulesID;
+ property RaiseExceptionAtError: boolean read FRaiseExceptionAtError write FRaiseExceptionAtError default False;
+ end;
+
+ { TDABusinessProcessorRules }
+ TDABusinessProcessorRules = class(TDABusinessRules, IDAStronglyTypedDataTable)
+ private
+ fBusinessProcessor: TDABusinessProcessor;
+ protected
+ property BusinessProcessor: TDABusinessProcessor read fBusinessProcessor;
+
+ // Misc
+ procedure Attach(aBusinessProcessor: TDABusinessProcessor); virtual;
+ procedure Detach(aBusinessProcessor: TDABusinessProcessor); virtual;
+
+ // Business events
+ procedure BeforeProcessDelta(Sender: TDABusinessProcessor; const aDelta: IDADelta); virtual;
+ procedure AfterProcessDelta(Sender: TDABusinessProcessor; const aDelta: IDADelta); virtual;
+ procedure BeforeProcessChange(Sender: TDABusinessProcessor; aChangeType: TDAChangeType; aChange: TDADeltaChange; var ProcessChange: boolean); virtual;
+ procedure AfterProcessChange(Sender: TDABusinessProcessor; aChange: TDADeltaChange; Processed: boolean; var CanRemoveFromDelta: boolean); virtual;
+ procedure ProcessChange(Sender: TDABusinessProcessor; aChangeType: TDAChangeType; aChange: TDADeltaChange; const aCommand: IDASQLCommand); virtual;
+ procedure ProcessError(Sender: TDABusinessProcessor; aChangeType: TDAChangeType; aChange: TDADeltaChange;
+ const aCommand: IDASQLCommand; var CanRemoveFromDelta: boolean; Error: Exception); virtual;
+ procedure GenerateSQL(Sender: TDABusinessProcessor; ChangeType: TDAChangeType; const ReferencedStatement: TDAStatement;
+ const aDelta: IDADelta; var SQL: string); virtual;
+
+ procedure NotSupportedByBusinessProcessor;
+ procedure Open;
+ procedure Close;
+
+ function GetActive: boolean;
+ procedure SetActive(const Value: boolean);
+
+ procedure Append;
+ procedure Cancel;
+ procedure Delete;
+ procedure Edit;
+ procedure First;
+ procedure Insert;
+ procedure Last;
+ procedure Next;
+ procedure Post;
+ procedure Prior;
+ function GetBOF: Boolean;
+ function GetEOF: Boolean;
+ function GetRecordCount: Integer;
+ function Locate(const aKeyFields: String; const aKeyValues: Variant; aOptions: TLocateOptions = []): Boolean;
+ function Lookup(const KeyFields: string; const KeyValues: Variant; const ResultFields: string): Variant;
+
+ function GetMasterOptions : TDAMasterOptions;
+ procedure SetMasterOptions(Value : TDAMasterOptions);
+ function GetDetailOptions : TDADetailOptions;
+ procedure SetDetailOptions(Value : TDADetailOptions);
+ function GetState : TDatasetState;
+ function GetIsEmpty : boolean;
+
+ function IsFieldNull(const FieldIndexOrName : Variant) : boolean;
+ procedure ClearField(const FieldIndexOrName : Variant);
+
+ function GetDataTable : TDADataTable;
+
+ function GetRecNo: integer;
+ procedure SetRecNo(Value: integer);
+
+ public
+ constructor Create(aBusinessProcessor: TDABusinessProcessor); reintroduce; virtual;
+ end;
+
+ TDABusinessProcessorRulesClass = class of TDABusinessProcessorRules;
+
+ TDADeltaProcessorItem = class(TCollectionItem)
+ private
+ fName: String;
+ fRefreshDataset: IDADataset;
+
+ fInsertCommand: IDASQLCommand;
+ fUpdateCommand: IDASQLCommand;
+ fDeleteCommand: IDASQLCommand;
+
+ fInsertCommandMapping: TDAParamMappingArray;
+ fUpdateCommandMapping: TDAParamMappingArray;
+ fDeleteCommandMapping: TDAParamMappingArray;
+
+ public
+ property RefreshDataset: IDADataset read fRefreshDataset write fRefreshDataset;
+
+ property InsertCommand: IDASQLCommand read fInsertCommand write fInsertCommand;
+ property UpdateCommand: IDASQLCommand read fUpdateCommand write fUpdateCommand;
+ property DeleteCommand: IDASQLCommand read fDeleteCommand write fDeleteCommand;
+
+ property InsertCommandMapping: TDAParamMappingArray read fInsertCommandMapping write fInsertCommandMapping;
+ property UpdateCommandMapping: TDAParamMappingArray read fUpdateCommandMapping write fUpdateCommandMapping;
+ property DeleteCommandMapping: TDAParamMappingArray read fDeleteCommandMapping write fDeleteCommandMapping;
+ published
+ property Name: String read fName write fName;
+ end;
+
+ TDADeltaProcessorItemCollection = class(TSearcheableCollection)
+ private
+ function GetItem(Index: integer): TDADeltaProcessorItem;
+ procedure SetItem(Index: integer; const Value: TDADeltaProcessorItem);
+ protected
+ function SetItemName(anItem: TCollectionItem; const aName: string): string; override;
+ function GetItemName(anItem: TCollectionItem): string; override;
+ public
+ constructor Create(aOwner: TComponent);
+ function Add: TDADeltaProcessorItem; reintroduce;
+ function ItemByName(const aName: String): TDADeltaProcessorItem;
+ property Items[Index: integer]: TDADeltaProcessorItem read GetItem write SetItem; default;
+ end;
+
+
+// Registration routines
+procedure RegisterBusinessProcessorRules(const anID: string; const aDeltaChangeClass: TDABusinessProcessorRulesClass);
+function FindBusinessProcessorRules(const anID: string; out aDeltaChangeClass: TDABusinessProcessorRulesClass): boolean;
+
+implementation
+
+uses
+ {$IFDEF DEBUG_DATAABSTRACT_SQL}
+ eDebugServer,
+ {$ENDIF}
+ uROClasses, Variants, TypInfo, Types, uDAEngine;
+
+{$IFDEF DEBUG_DATAABSTRACT_SQL}
+const
+ cat_SQL = 'SQL Generation';
+{$ENDIF}
+
+var
+ _bizdeltachanges: TStringList;
+
+procedure RegisterBusinessProcessorRules(const anID: string; const aDeltaChangeClass: TDABusinessProcessorRulesClass);
+var
+ idx: integer;
+begin
+ idx := _bizdeltachanges.IndexOf(anID);
+
+ if (idx >= 0) then
+ _bizdeltachanges.Objects[idx] := TObject(aDeltaChangeClass)
+ else
+ _bizdeltachanges.AddObject(anID, TObject(aDeltaChangeClass));
+end;
+
+function FindBusinessProcessorRules(const anID: string; out aDeltaChangeClass: TDABusinessProcessorRulesClass): boolean;
+var
+ idx: integer;
+begin
+ result := FALSE;
+ idx := _bizdeltachanges.IndexOf(anID);
+ if (idx >= 0) then begin
+ aDeltaChangeClass := TDABusinessProcessorRulesClass(_bizdeltachanges.Objects[idx]);
+ result := TRUE;
+ end
+ else
+ aDeltaChangeClass := nil;
+end;
+
+function QuoteIdentifier(const aConnection : IDAConnection; const aFieldName: string): string;
+begin
+ {if (Pos(' ', aFieldName) > 0) then
+ result := QuoteChars[0] + aFieldName + QuoteChars[1]
+ else
+ result := aFieldName;}
+ result := aConnection.QuoteIdentifierIfNeeded(aFieldName);
+end;
+
+function QuoteFieldName(const aConnection : IDAConnection; const aTableName,aFieldName: string): string;
+begin
+ result := aConnection.QuoteFieldNameIfNeeded(aTableName, aFieldName);
+end;
+
+function QuoteParamName(const aConnection : IDAConnection; const aParamName: string): string;
+begin
+ if aConnection.IdentifierNeedsQuoting(aParamName) then
+ result := AnsiQuotedStr(aParamName,'"')
+ else
+ Result:= aParamName;
+end;
+
+
+{ TDADeltaStruct }
+
+constructor TDADeltaStruct.Create(const aDelta : IDADelta; aBusinessProcessor : TDABusinessProcessor);
+begin
+ inherited Create;
+
+ fDelta := aDelta;
+ fBusinessProcessor := aBusinessProcessor;
+ fDetailDeltas := TDADeltaList.Create;
+ fRelationShips := TDADatasetRelationshipList.Create;
+end;
+
+destructor TDADeltaStruct.Destroy;
+begin
+ inherited;
+
+ FreeAndNIL(fDetailDeltas);
+ FreeAndNIL(fRelationShips);
+end;
+
+{ TDADeltaStructList }
+
+function TDADeltaStructList.Add(const aDelta : IDADelta; aBusinessProcessor : TDABusinessProcessor): TDADeltaStruct;
+begin
+ result := TDADeltaStruct.Create(aDelta, aBusinessProcessor);
+ inherited Add(result);
+end;
+
+function TDADeltaStructList.FindStruct(
+ const aLogicalName: string): TDADeltaStruct;
+var i : integer;
+begin
+ result := NIL;
+ for i := 0 to (Count-1) do
+ if SameText(DeltaStructs[i].Delta.LogicalName, aLogicalName) then begin
+ result := DeltaStructs[i];
+ Exit;
+ end;
+end;
+
+function TDADeltaStructList.GetDADeltaStructs(
+ Index: integer): TDADeltaStruct;
+begin
+ result := TDADeltaStruct(inherited Items[Index])
+end;
+
+function TDADeltaStructList.StructByLogicalName(
+ const aLogicalName: string): TDADeltaStruct;
+begin
+ result := FindStruct(aLogicalName);
+ if result=NIL then raise Exception.Create('Cannot find struct '+aLogicalName);
+end;
+
+{ TDABusinessProcessor }
+
+constructor TDABusinessProcessor.Create(aOwner: TComponent);
+begin
+ inherited;
+
+ fUserUpdateFields := TStringList.Create;
+ fProcessorOptions := [poAutoGenerateInsert, poAutoGenerateUpdate, poAutoGenerateDelete, poPrepareCommands, poAutoGenerateRefreshDataset];
+ fUpdateMode := updWhereKeyOnly;
+end;
+
+destructor TDABusinessProcessor.Destroy;
+begin
+ FreeAndNIL(fUserUpdateFields);
+
+ if (fBusinessRules <> nil) then begin
+ fBusinessRules.Detach(Self);
+ fBusinessRules.Free;
+ end;
+
+ inherited;
+end;
+
+function TDABusinessProcessor.GetUserUpdateFields: TStrings;
+begin
+ result := fUserUpdateFields
+end;
+
+procedure TDABusinessProcessor.SetUserUpdateFields(Value: TStrings);
+begin
+ fUserUpdateFields.Assign((Value));
+end;
+
+procedure TDABusinessProcessor.CreateMappings(const aDelta: IDADelta; var MappingArray: TDAParamMappingArray; const aCommand: IDASQLCommand; lAdditionalMapping: TDAColumnMappingCollection = nil; AValidateCommand: Boolean = False);
+var
+ lDeltaFieldList: TStringList;
+ lAdditionalMappingList: TStringList;
+
+ function isPresentInDelta(str: string): boolean;
+ var
+ i: integer;
+ begin
+ if lAdditionalMapping <> nil then begin
+ i := lAdditionalMappingList.IndexOf(str);
+ if i <> -1 then
+ str := TDAColumnMapping(lAdditionalMappingList.Objects[i]).DatasetField
+ else
+ str := lAdditionalMapping.MappingByTableField(str).DatasetField; // raise 'native' exception
+ end;
+ Result := lDeltaFieldList.IndexOf(str) <> -1;
+ end;
+
+var
+ i,j: integer;
+ lParamName : string;
+ lDeltaIndex : integer;
+ lFieldName: String;
+begin
+ if aCommand = nil then Exit;
+
+ // The command is what determines how many mappings will be done
+ SetLength(MappingArray, aCommand.Params.Count);
+ lDeltaFieldList := TStringList.Create;
+ lAdditionalMappingList := TStringList.Create;
+ try
+ for i := 0 to aDelta.LoggedFieldCount-1 do
+ lDeltaFieldList.Add(aDelta.LoggedFieldNames[i]);
+ lDeltaFieldList.Sorted:=True;
+
+ if lAdditionalMapping <> nil then
+ for i:= 0 to lAdditionalMapping.Count -1 do
+ lAdditionalMappingList.AddObject(lAdditionalMapping[i].TableField, lAdditionalMapping[i]);
+
+ for i := 0 to (aCommand.Params.Count - 1) do begin
+ MappingArray[i].CommandIndex := 0;
+
+ lParamName := UpperCase(aCommand.Params[i].Name);
+
+ // Determines the mapping type
+ if (Pos(MappingPrefix[mtOldValue], lParamName) = 1) and not isPresentInDelta(lParamName) then
+ MappingArray[i].MappingType := mtOldValue
+
+ {else if (Pos(MappingPrefix[mtNullCheck], lParamName) = 1)
+ then MappingArray[i].MappingType := mtNullCheck}
+
+ else MappingArray[i].MappingType := mtNewValue;
+
+ if (MappingArray[i].MappingType = mtOldValue) then
+ lFieldName := Copy(aCommand.Params[i].Name, 5, MaxInt)
+ else
+ lFieldName := aCommand.Params[i].Name;
+
+ // if lAdditionalMapping is assigned (usually incase delta for union table)
+ // then translate it
+ if Assigned(lAdditionalMapping) then begin
+ j := lAdditionalMappingList.IndexOf(lFieldName);
+ if j <> -1 then
+ lFieldName := TDAColumnMapping(lAdditionalMappingList.Objects[j]).DatasetField
+ else
+ lFieldName := lAdditionalMapping.MappingByTableField(lFieldName).DatasetField; // raise "native" exception
+ end;
+
+ if AValidateCommand and
+ (lDeltaFieldList.IndexOf(lFieldName) = -1) then raise Exception.CreateFmt('%s command can''t be used as delta command for %s datatable: parameters mismatch',[aCommand.Name,aDelta.LogicalName]);
+
+ // Finds the index for this value in the delta
+ lDeltaIndex := aDelta.IndexOfLoggedField(lFieldName);
+
+ MappingArray[i].DeltaIndex := lDeltaIndex;
+
+ MappingArray[i].GeneratorName := aCommand.ParamByName(lParamName).GeneratorName;
+ MappingArray[i].GeneratorValue := -1;
+ end;
+ finally
+ lDeltaFieldList.Free;
+ lAdditionalMappingList.Free;
+ end;
+end;
+
+function TDABusinessProcessor.GenerateRefreshDataset(
+ aDataset: TDADataset; const aDelta: IDADelta; aDatasetStatement: TDAStatement;
+ aConnection: IDAConnection): IDADataset;
+var
+ i: integer;
+ namesstr,
+ fullsql,
+ fieldsstr,
+ keystr,
+ //remotename,
+ localname: string;
+ fld: TDAField;
+begin
+ result := aConnection.NewDataset('');
+ fieldsstr := '';
+ namesstr := '';
+ keystr := '';
+
+ with aDataset do try
+ // Generates the SELECT
+ for i := 0 to Fields.Count-1 do begin
+ if (Fields[i].DataType <> datAutoInc) and (Fields[i].DataType <> datLargeAutoInc) and
+ (not Fields[i].ServerAutoRefresh or Fields[i].Lookup or Fields[i].ServerCalculated) then Continue;
+
+ localname := QuoteFieldName(aConnection, aDatasetStatement.TargetTable, aDatasetStatement.ColumnMappings.MappingByDatasetField(Fields[i].Name).TableField);
+ fieldsstr := fieldsstr+localname+','+#13;
+
+ result.Fields.Add.AssignField(Fields[i]);
+ end;
+ if (fieldsstr='') then Exit;
+ fieldsstr := Copy(fieldsstr,1, Length(fieldsstr)-2)+#13;
+
+ // Generates the WHERE using the primary key fields
+ for i := 0 to Fields.Count-1 do begin
+ if not Fields[i].InPrimaryKey then Continue;
+
+ localname := QuoteFieldName(aConnection,aDatasetStatement.TargetTable, aDatasetStatement.ColumnMappings.MappingByDatasetField(Fields[i].Name).TableField);
+ keystr := keystr+Format('%s=:%s', [localname, Fields[i].Name])+' AND '+#13;
+ end;
+ if (keystr='') then begin
+ // try to create WHERE with AutoInc fields
+ for i := 0 to Fields.Count-1 do begin
+ if not (Fields[i].DataType in [datAutoInc,datLargeAutoInc]) then Continue;
+
+ localname := QuoteFieldName(aConnection,aDatasetStatement.TargetTable, aDatasetStatement.ColumnMappings.MappingByDatasetField(Fields[i].Name).TableField);
+ keystr := keystr+Format('%s=:%s', [localname, Fields[i].Name])+' AND '+#13;
+ end;
+ end;
+ if (keystr='') then Exit;
+ keystr := Copy(keystr,1, Length(keystr)-5)+#13;
+
+ // Combines the two
+ fullsql := 'SELECT'#13+fieldsstr+'FROM '+ QuoteIdentifier(aConnection, aDatasetStatement.TargetTable) +#13+'WHERE'+#13+keystr;
+ result.SQL := fullsql;
+
+ {$IFDEF DEBUG_DATAABSTRACT_SQL}DebugServer.Write([cat_SQL], result.SQL);{$ENDIF}
+
+ with aDatasetStatement do
+ for i := 0 to (ColumnMappings.Count - 1) do begin
+ fld := result.FindField(ColumnMappings[i].DatasetField);
+ if Assigned(fld) then begin
+ fld.TableField := ColumnMappings[i].TableField;
+ fld.SQLOrigin := ColumnMappings[i].SQLOrigin;
+ end;
+ end;
+
+ finally
+ if (result.SQL='') then result := NIL;
+ end;
+end;
+
+function TDABusinessProcessor.GenerateSQL(aChangeType: TDAChangeType;
+ aChange: TDADeltaChange;
+ aDataset: TDADataset;
+ const aDelta: IDADelta;
+ aDatasetStatement: TDAStatement;
+ aConnection: IDAConnection): string;
+
+ function _GetTableField(aMapping: TDAColumnMappingCollection; aDatasetField: string): string;
+ begin
+ if aMapping.Count = 0 then
+ Result:= aDatasetField
+ else
+ Result:= aMapping.MappingByDatasetField(aDatasetField).TableField;
+ end;
+
+var
+ i: integer;
+ namesstr,
+ valuesstr,
+ keystr,
+ remotename,
+ localname: string;
+ oraconn : IOracleConnection;
+ fld : TDAField;
+ usegenerators : boolean;
+ //lIsUnionTable : Boolean;
+ lUnionTable: TDAUnionDataTable;
+ lSrcTable: TDAUnionSourceTable;
+ lUpdateMode: TDAUpdateMode;
+ lPKList: TStringList;
+begin
+ result := '';
+ valuesstr := '';
+ namesstr := '';
+ keystr := '';
+ lSrcTable := nil;
+ if aDatasetStatement.TargetTable = '' then raise Exception.Create(aDelta.LogicalName+'. Can''t generate a delta''s SQL. TargetTable isn''t assigned.');
+ // If passed dataset is a source table for uniontable then lSrcTable will be assigned (used for distinguish unionsourcetables)
+ lUnionTable := fSchema.UnionDataTables.FindItem(fReferencedDataset) as TDAUnionDataTable;
+ if assigned(lUnionTable) then begin
+ lSrcTable := lUnionTable.SourceTables.UnionSourceTableByName(aDataset.Name);
+ end;
+
+ usegenerators := Supports(aConnection, IDAUseGenerators);
+ lUpdateMode:=fUpdateMode;
+ if (aDelta.KeyFieldCount=0) and (lUpdateMode = updWhereKeyOnly) then
+ lUpdateMode:=updWhereAll;
+ lPKList:= TStringList.Create;
+ try
+ with aDatasetStatement, aDelta do begin
+ for i := 0 to (KeyFieldCount - 1) do
+ lPKList.Add(KeyFieldNames[i]);
+ lPKList.Sorted:=True;
+ // Generates the WHERE conditions. Done here because used by both deletes and updates
+ if (aChangeType <> ctInsert) then begin
+ case lUpdateMode of
+ updWhereKeyOnly, updWhereKeyAndUserDefined: begin
+ for i := 0 to (KeyFieldCount - 1) do begin
+ remotename := KeyFieldNames[i];
+
+ // If this is UnionSourceDataTable then we should do fields remapping
+ if Assigned(lSrcTable) then begin
+ if SameText(remotename, def_SourceTableFieldName) then Continue;
+ remotename := _GetTableField(lSrcTable.ColumnMappings, remotename);
+ end;
+
+ localname := QuoteFieldName(aConnection,aDatasetStatement.TargetTable, _GetTableField(ColumnMappings,remotename));
+ keystr := keystr + #13'(' + localname + '=:'+QuoteParamName(aConnection,'OLD_' + remotename)+ ') AND ';
+ end;
+ end;
+
+ updWhereAll: begin
+ for i := 0 to (LoggedFieldCount - 1) do begin
+ remotename := LoggedFieldNames[i];
+
+ // If this is UnionSourceDataTable then we should do fields remapping
+ if Assigned(lSrcTable) then begin
+ if SameText(remotename, def_SourceTableFieldName) then Continue;
+ remotename := _GetTableField(lSrcTable.ColumnMappings,remotename);
+ end;
+
+ localname := QuoteFieldName(aConnection,aDatasetStatement.TargetTable, _GetTableField(ColumnMappings,remotename));
+ if (aDataset.FieldByName(remotename).DataType in [datBlob, datMemo]) then Continue;
+ if assigned(aChange) and ROVariantsEqual(aChange.OldValueByName[remotename],aChange.NewValueByName[remotename]) and (lPKList.IndexOf(remotename) = -1) then Continue;
+ keystr := keystr + #13'((' + localname + '=:'+QuoteParamName(aConnection, 'OLD_' + remotename) + ') OR (:'+QuoteParamName(aConnection, 'OLD_' + remotename) + ' IS NULL AND ' + localname + ' IS NULL)) AND ';
+ end;
+ end;
+ end;
+
+ if (lUpdateMode in [updWhereKeyAndUserDefined, updWhereUserDefined]) then begin
+ for i := 0 to (fUserUpdateFields.Count - 1) do begin
+ remotename := fUserUpdateFields[i];
+
+ // If this is UnionSourceDataTable then we should do fields remapping
+ if Assigned(lSrcTable) then begin
+ if SameText(remotename, def_SourceTableFieldName) then Continue;
+ remotename := _GetTableField(lSrcTable.ColumnMappings,remotename);
+ end;
+
+ localname := QuoteFieldName(aConnection, aDatasetStatement.TargetTable, _GetTableField(ColumnMappings,remotename));
+ if assigned(aChange) and ROVariantsEqual(aChange.OldValueByName[remotename],aChange.NewValueByName[remotename]) then Continue;
+ keystr := keystr + #13'((' + localname + '=:'+QuoteParamName(aConnection, 'OLD_' + remotename) + ') OR (:'+QuoteParamName(aConnection,'OLD_' + remotename) + ' IS NULL AND ' + localname + ' IS NULL)) AND ';
+ end;
+ end;
+
+ keystr := Copy(keystr, 1, Length(keystr) - 5);
+ end;
+
+ // Remaining part of the SQL command
+ case aChangeType of
+ // Insert
+ ctInsert: begin
+ result := 'INSERT INTO ' + QuoteIdentifier(aConnection, aDatasetStatement.TargetTable) + ' ('#13;
+
+ for i := 0 to (LoggedFieldCount - 1) do begin
+ remotename := LoggedFieldNames[i];
+
+ // If this is UnionSourceDataTable then we should do fields remapping
+ if Assigned(lSrcTable) then begin
+ if SameText(remotename, def_SourceTableFieldName) then Continue;
+ remotename := _GetTableField(lSrcTable.ColumnMappings,remotename);
+ end;
+
+
+ fld := aDataset.Fields.FieldByName(remotename);
+ if (((fld.DataType = datAutoInc) or (fld.DataType = datlargeAutoInc)) and not usegenerators) // Skips autoincs on DBs like MSSQL
+ or (fld.Calculated) or (fld.ReadOnly) or (fld.ServerCalculated)
+ then Continue;
+ if (Assigned(aChange) and VarIsNull(aChange.NewValues[i])) then Continue;
+ localname := QuoteFieldName(aConnection, aDatasetStatement.TargetTable,_GetTableField(ColumnMappings,remotename));
+
+ namesstr := namesstr + localname + ', ';
+ valuesstr := valuesstr + ':' +QuoteParamName(aConnection, remotename) + ', ';
+ end;
+ if Assigned(aChange) and (namesstr = '') then begin
+ Result := '';
+ end
+ else begin
+ namesstr := Copy(namesstr, 1, Length(namesstr) - 2) + ')';
+ valuesstr := Copy(valuesstr, 1, Length(valuesstr) - 2) + ')';
+
+ result := result + namesstr + #13' VALUES (' + valuesstr;
+ end;
+ end;
+
+ // Delete
+ ctDelete: result := 'DELETE FROM ' + QuoteIdentifier(aConnection, aDatasetStatement.TargetTable) + #13' WHERE ' + keystr;
+
+ // Update
+ ctUpdate: begin
+ result := '';
+
+ for i := 0 to (LoggedFieldCount - 1) do begin
+ remotename := LoggedFieldNames[i];
+
+ // If this is UnionSourceDataTable then we should do fields remapping
+ if Assigned(lSrcTable) then begin
+ if SameText(remotename, def_SourceTableFieldName) then Continue;
+ remotename := _GetTableField(lSrcTable.ColumnMappings,remotename);
+ end;
+
+
+ fld := aDataset.Fields.FieldByName(remotename);
+ if ((fld.DataType = datAutoInc) or (fld.DataType = datlargeAutoInc)) then Continue; // Skips autoincs
+ if (fld.InPrimaryKey and not fld.LogChanges) then Continue;
+ if (fld.Calculated) or (fld.ReadOnly) or (fld.ServerCalculated) then Continue;
+ if assigned(aChange) and ROVariantsEqual(aChange.OldValues[i],aChange.NewValues[i]) then Continue;
+ localname := QuoteFieldName(aConnection, aDatasetStatement.TargetTable, _GetTableField(ColumnMappings,remotename));
+
+ if (result<>'') then result := result + ', ';
+ result := result + #13 + localname + '= :' + QuoteParamName(aConnection,remotename);
+ //if (i < LoggedFieldCount - 1) then result := result + ', ';
+ end;
+ if assigned(aChange) and (Result = '') then begin
+ //
+ end
+ else begin
+ result := 'UPDATE '+QuoteIdentifier(aConnection, aDatasetStatement.TargetTable)+' SET '+result+#13' WHERE '+keystr;
+ end;
+ end;
+ end;
+ end;
+ finally
+ lPKList.Free;
+ end;
+
+ // Exception for Oracle's SQL
+ if Supports(aConnection, IOracleConnection, oraconn)
+ then UpdateSQLForOracle(aChangeType, aDataset, aDelta, aDatasetStatement, oraconn, result);
+
+ // Events
+ if Assigned(fOnGenerateSQL) then
+ fOnGenerateSQL(Self, aChangeType, aDatasetStatement, aDelta, result)
+ else if Assigned(fBusinessRules) then
+ fBusinessRules.GenerateSQL(Self, aChangeType, aDatasetStatement, aDelta, result);
+
+ {$IFDEF DEBUG_DATAABSTRACT_SQL}DebugServer.Write([cat_SQL], Result);{$ENDIF}
+end;
+
+procedure TDABusinessProcessor.UpdateSQLForOracle(aChangeType: TDAChangeType;
+ aDataset: TDADataset;
+ const aDelta: IDADelta;
+ aDatasetStatement: TDAStatement;
+ aConnection: IOracleConnection;
+ var OriginalSQL: string);
+var i : integer;
+ returningstr, intostr : string;
+begin
+ returningstr := '';
+ intostr := '';
+
+ with aDataset do begin
+ for i := 0 to (Fields.Count-1) do begin
+
+ if not aDataset.Fields[i].LogChanges then Continue;
+
+ case Fields[i].BlobType of
+ dabtOraBlob : begin
+ OriginalSQL := StringReplace(OriginalSQL, ':'+Fields[i].Name, 'empty_blob()', [rfIgnoreCase])
+ end;
+
+ dabtOraClob : begin
+ OriginalSQL := StringReplace(OriginalSQL, ':'+Fields[i].Name, 'empty_clob()', [rfIgnoreCase])
+ end;
+
+ else Continue;
+ end;
+
+ returningstr := returningstr+Fields[i].Name+',';
+ intostr := intostr+':'+Fields[i].Name+',';
+ end;
+ end;
+
+ if (returningstr<>'') then begin
+ Delete(returningstr, Length(returningstr), 1);
+ returningstr := 'RETURNING '+#13#10+returningstr+#13#10;
+
+ Delete(intostr, Length(intostr), 1);
+ intostr := 'INTO '+#13#10+intostr;
+
+ OriginalSQL := OriginalSQL+#13#10+returningstr+intostr;
+ end;
+
+ {$IFDEF DEBUG_DATAABSTRACT_SQL}DebugServer.Write([cat_SQL], OriginalSQL);{$ENDIF}
+end;
+
+function TDABusinessProcessor.NeedsReferencedDataset: boolean;
+begin
+ result :=
+ (
+ ((poAutoGenerateInsert in fProcessorOptions) and (InsertCommandName = '')) or
+ ((poAutoGenerateUpdate in fProcessorOptions) and (UpdateCommandName = '')) or
+ ((poAutoGenerateDelete in fProcessorOptions) and (DeleteCommandName = '')) or
+ ((poAutoGenerateRefreshDataset in fProcessorOptions) and (RefreshDatasetName = ''))
+ );
+end;
+
+procedure TDABusinessProcessor.SetupParameters(const aCommand : IDASQLCommand;
+ aReferencedDataset : TDADataset; const aConnection: IDAConnection);
+var lParams: TParams;
+ fldname: string;
+ i: integer;
+ par: TDAParam;
+ fld : TDAField;
+begin
+ lParams := TParams.Create;
+ try
+ Params_ParseSQL(lParams,aCommand.SQL, True, aConnection.GetQuoteChars);
+
+ with aCommand do begin
+ Params.Clear; // Just in case
+
+ for i := 0 to (lParams.Count - 1) do begin
+ fldname := lParams[i].Name;
+
+ // Checks if it's one of the autogenerated params
+ fld := aReferencedDataset.Fields.FindField(fldname);
+ if fld = nil then begin
+ if (Pos(MappingPrefix[mtOldValue], fldname)=1) then Delete(fldname, 1, Length(MappingPrefix[mtOldValue]));
+ fld := aReferencedDataset.Fields.FieldByName(fldname);
+ end;
+
+ {else if (Pos(MappingPrefix[mtNullCheck], fldname)=1)
+ then Delete(fldname, 1, Length(MappingPrefix[mtNullCheck]));}
+
+ // Looks up the field and completes the param definition
+
+ par := aCommand.Params.Add;
+ par.Name := lParams[i].Name;
+ par.DataType := fld.DataType;
+ par.BlobType := fld.BlobType;
+ par.ParamType := daptInput; // ODAC Blobs require it and this is not covered by AssignField below
+ {par.Size := fld.Size;
+ par.GeneratorName := fld.GeneratorName;}
+ par.AssignField(fld);
+ par.Name := lParams[i].Name; // Leave this here! Must override the Assign
+ end;
+ end;
+ finally
+ lParams.Free;
+ end;
+end;
+
+procedure TDABusinessProcessor.SetupCommands(const aConnection: IDAConnection; const aDelta: IDADelta;
+ out anInsertCmd, anUpdateCmd, aDeleteCmd: IDASQLCommand; out aRefreshDs : IDADataset);
+var
+ sql: string;
+ refstmt: TDAStatement;
+ ds: TDADataset;
+ needsref: boolean;
+ i: integer;
+begin
+ anInsertCmd := nil;
+ aDeleteCmd := nil;
+ anUpdateCmd := nil;
+ ds := nil;
+ refstmt := nil;
+ CheckProperties;
+ // Looks for the referenced statement which contains field mappings and TargetTableName
+ // in case the user specifies any AutoGenerateXXX option
+ needsref := NeedsReferencedDataset;
+ if needsref then begin
+ ds := TDADataset(fSchema.Datasets.FindItem(fReferencedDataset));
+ if (ds <> nil) then begin
+ refstmt := fSchema.FindCommandStatement(aConnection,ds);
+// refstmt := TDAStatement(ds.Statements.FindItem(aConnection.Name));
+// if (refstmt = nil) then refstmt := ds.Statements.StatementByName(Schema.ConnectionManager.GetDefaultConnectionName);
+ end
+ else
+ RaiseError(Name + '''s referenced dataset is not speficied or does not exist. Cannot generate SQL');
+ end;
+
+
+ for i:= 0 to aDelta.Count-1 do
+ if aDelta.Changes[i].ChangeType = ctInsert then begin
+ // Tries to locate the specified commands
+ if (fInsertCommandName <> '') then anInsertCmd := fSchema.NewCommand(aConnection, fInsertCommandName);
+ // Auto generates the SQL for the undefined commands
+ if (anInsertCmd = nil) and (poAutoGenerateInsert in fProcessorOptions) then begin
+ sql := GenerateSQL(ctInsert, nil, ds, aDelta, refstmt, aConnection);
+ anInsertCmd := aConnection.NewCommand(sql, stSQL);
+ SetupParameters(anInsertCmd, ds, aConnection);
+ end;
+ Break;
+ end;
+
+ for i:= 0 to aDelta.Count-1 do
+ if aDelta.Changes[i].ChangeType = ctUpdate then begin
+ // Tries to locate the specified commands
+ if (fUpdateCommandName <> '') then anUpdateCmd := fSchema.NewCommand(aConnection, fUpdateCommandName);
+ // Auto generates the SQL for the undefined commands
+ if (anUpdateCmd = nil) and (poAutoGenerateUpdate in fProcessorOptions) then begin
+ sql := GenerateSQL(ctUpdate, nil, ds, aDelta, refstmt, aConnection);
+ anUpdateCmd := aConnection.NewCommand(sql, stSQL);
+ SetupParameters(anUpdateCmd, ds, aConnection);
+ end;
+ Break;
+ end;
+
+ for i:= 0 to aDelta.Count-1 do
+ if aDelta.Changes[i].ChangeType = ctDelete then begin
+ // Tries to locate the specified commands
+ if (fDeleteCommandName <> '') then aDeleteCmd := fSchema.NewCommand(aConnection, fDeleteCommandName);
+ // Auto generates the SQL for the undefined commands
+ if (aDeleteCmd = nil) and (poAutoGenerateDelete in fProcessorOptions) then begin
+ sql := GenerateSQL(ctDelete, nil, ds, aDelta, refstmt, aConnection);
+ aDeleteCmd := aConnection.NewCommand(sql, stSQL);
+ SetupParameters(aDeleteCmd, ds, aConnection);
+ end;
+ Break;
+ end;
+
+ if (fRefreshDataset <> '')
+ then aRefreshDs := fSchema.NewDataset(aConnection, fRefreshDataset,[],'','',False,True);
+
+ if (aRefreshDs = nil) and (poAutoGenerateRefreshDataset in fProcessorOptions) then begin
+ aRefreshDs := GenerateRefreshDataset(ds, aDelta, refstmt, aConnection);
+ if (aRefreshDs<>NIL) then SetupParameters(aRefreshDs, ds, aConnection);
+ end;
+
+ // Finally prepares them
+ if (poPrepareCommands in fProcessorOptions) then begin
+ if (anInsertCmd <> nil) then anInsertCmd.Prepared := TRUE;
+ if (anUpdateCmd <> nil) then anUpdateCmd.Prepared := TRUE;
+ if (aDeleteCmd <> nil) then aDeleteCmd.Prepared := TRUE;
+ if (aRefreshDs <> NIL) then aRefreshDs.Prepared := TRUE;
+ end;
+end;
+
+function TDABusinessProcessor.GetCurrentChange: TDADeltaChange;
+begin
+ result := fCurrentDelta.Changes[fCurrentChange]
+end;
+
+const
+ lDynWhereParamPrefix = 'dynwhere';
+
+procedure TDABusinessProcessor.RefreshDeltaChange(const aConnection : IDAConnection;
+ const aRefreshDataset : IDADataset; const aDelta : IDADelta; aDeltaChange : TDADeltaChange; GenAutoIncValue : integer = -1);
+var i : integer;
+ par : TDAParam;
+ nam: string;
+ val : Variant;
+ fld: TDAField;
+// genname : string;
+begin
+ // Sets the parameters of the dataset
+ for i := 0 to aRefreshDataset.Params.Count-1 do begin
+ par := aRefreshDataset.Params[i];
+
+ if (aDelta.IndexOfLoggedField(par.Name) < 0) then
+ Continue;
+
+ if (aDeltaChange.ChangeType=ctInsert) then begin
+ if (par.DataType=datAutoInc) or (Par.DataType = datLargeAutoInc) then begin
+ if (GenAutoIncValue<>-1)
+ then val := GenAutoIncValue
+ else val := aConnection.GetLastAutoInc(par.GeneratorName);
+ end
+ else val := aDeltaChange.NewValueByName[par.Name]; // Fix for Schuff
+ end
+ else begin
+ val := aDeltaChange.NewValueByName[par.Name];
+ end;
+
+ par.Value := val;
+ end;
+
+ if FDynamicWhereInRefreshDataset then
+ for i := 0 to aDelta.KeyFieldCount - 1 do begin
+ par := aRefreshDataset.ParamByName(lDynWhereParamPrefix+intToStr(i));
+ if (aDeltaChange.ChangeType=ctInsert) then begin
+ if (par.DataType=datAutoInc) or (Par.DataType = datLargeAutoInc) then begin
+ if (GenAutoIncValue <> -1) then
+ par.Value := GenAutoIncValue
+ else
+ par.Value := aConnection.GetLastAutoInc(par.GeneratorName);
+ end
+ else begin
+ par.Value := aDeltaChange.NewValueByName[aDelta.KeyFieldNames[i]];
+ end;
+ end
+ else begin
+ par.Value := aDeltaChange.NewValueByName[aDelta.KeyFieldNames[i]];
+ end;
+ end;
+
+ if Assigned(fOnRefreshDeltaChange) then
+ fOnRefreshDeltaChange(Self, aDeltaChange.ChangeType, aDeltaChange, aRefreshDataset);
+
+ // Opens the dataset
+ aRefreshDataset.Open;
+ try
+{ if (aRefreshDataset.EOF) and (GenAutoIncValue <> -1) then begin
+ // user can rewrite value in trigger new new value
+ aRefreshDataset.Close;
+ For i:= 0 to aRefreshDataset.Params.Count -1 do
+ with aRefreshDataset.Params[i] do begin
+ if (DataType in [datAutoInc, datLargeAutoInc]) and (Value = GenAutoIncValue) then begin
+ Value := aConnection.GetLastAutoInc(GeneratorName);
+ end;
+ end;
+ aRefreshDataset.Open;
+ end;}
+ if (aRefreshDataset.EOF) then raise Exception.Create('Can''t refresh delta, record isn''t found');
+ case aDeltaChange.ChangeType of
+ ctInsert, ctUpdate : begin
+ // ctInsert:
+ // Swaps the new values the client sent in the old values then updates the
+ // new values. This way the client can locate the record it sent and also
+ // read what's new. This could probabily be optimized
+
+ // ctUpdate:
+ // Leaves the old values alone because they are needed on the client
+ // for merge purposes. This could probabily be optimized
+ for I := 0 to aDelta.LoggedFieldCount - 1 do begin
+ nam := aDelta.LoggedFieldNames[i];
+ fld := aRefreshDataset.FindField(nam);
+ if fld = nil then Continue;
+ aDeltaChange.OldValueByName[nam] := aDeltaChange.NewValueByName[nam];
+ aDeltaChange.NewValueByName[nam] := fld.Value;
+ end;
+ end;
+ end;
+ finally
+ aRefreshDataset.Close;
+ end;
+end;
+
+procedure TDABusinessProcessor.SynchronizeAutoIncs(const aMasterDelta, aDetailDelta : IDADelta;
+ const aRelationship : TDADatasetRelationship);
+var x, k, z: integer;
+ masterds : TDADataset;
+ masterfields, detailfields : TStringList;
+ oldmasterval, masterval, detailval : Variant;
+begin
+ CheckProperties;
+ masterfields := TStringList.Create;
+ masterfields.Delimiter := ';';
+
+ detailfields := TStringList.Create;
+ detailfields.Delimiter := ';';
+
+ try
+ masterds := Schema.Datasets.DatasetByName(aMasterDelta.LogicalName);
+
+ masterfields.DelimitedText := aRelationship.MasterFields;
+ detailfields.DelimitedText := aRelationship.DetailFields;
+
+ for x := 0 to (aMasterDelta.Count-1) do begin
+ if not (aMasterDelta[x].Status=csResolved) then Continue;
+
+ for k := 0 to (masterfields.Count-1) do begin
+ if not (masterds.FieldByName(masterfields[k]).DataType in [datAutoInc, datLargeAutoInc, datInteger, datLargeInt]) then Continue;
+
+ masterval := aMasterDelta[x].NewValueByName[masterfields[k]];
+ oldmasterval := aMasterDelta[x].OldValueByName[masterfields[k]];
+
+ for z := 0 to (aDetailDelta.Count-1) do begin
+ if not (aDetailDelta[z].ChangeType in [ctInsert,ctUpdate]) then Continue;
+
+ detailval := aDetailDelta[z].NewValueByName[detailfields[k]];
+ if (detailval<>oldmasterval) then Continue;
+
+ aDetailDelta[z].NewValueByName[detailfields[k]] := masterval;
+ aDetailDelta[z].RefreshedByServer := TRUE;
+ end;
+ end;
+ end;
+ finally
+ masterfields.Free;
+ detailfields.Free;
+ end;
+end;
+
+procedure TDABusinessProcessor.ProcessDelta(const aConnection: IDAConnection;
+ const aDelta: IDADelta;
+ ChangeTypes: TDAChangeTypes = AllChanges);
+var
+ i, x, rowsaffected: integer;
+ canremove, ok: boolean;
+ currcmd, inscmd, delcmd, updcmd: IDASQLCommand;
+ refds : IDADataset;
+ insmap, delmap, updmap, refmap: TDAParamMappingArray;
+ mapptr: ^TDAParamMappingArray;
+ change: TDADeltaChange;
+ todelete: TList;
+ val : variant;
+ parname : string;
+ autoincvalue: integer;
+ usegenerators : boolean;
+ lexpr: TDAWhereExpression;
+begin
+ Check(not Assigned(aDelta), 'Cannot process a NIL delta');
+ if (aDelta.Count=0) then Exit;
+
+
+ if Assigned(fSchema.UnionDataTables.FindItem(fReferencedDataset)) then begin
+ ProcessDeltaForUnion(aConnection, aDelta, ChangeTypes);
+ exit;
+ end;
+
+ fCurrentDelta := aDelta.GetDelta;
+ fCurrentChange := 0;
+
+ usegenerators := Supports(aConnection, IDAUseGenerators);
+
+ // Fires the "before" events
+ if Assigned(fOnBeforeProcessDelta)
+ then fOnBeforeProcessDelta(Self, aDelta)
+
+ else if Assigned(fBusinessRules)
+ then fBusinessRules.BeforeProcessDelta(Self, aDelta);
+
+ // Prepares the commands
+ if not fHasReducedDelta then begin
+ SetupCommands(aConnection, aDelta, inscmd, updcmd, delcmd, refds);
+
+ CreateMappings(aDelta, insmap, inscmd, nil, True);
+ CreateMappings(aDelta, updmap, updcmd, nil, True);
+ CreateMappings(aDelta, delmap, delcmd, nil, True);
+ CreateMappings(aDelta, refmap, refds);
+
+ FDynamicWhereInRefreshDataset:=False;
+ // dynwhere
+ if (refds <> nil) and refds.SQLContainsDynamicWhere then begin
+ FDynamicWhereInRefreshDataset := True;
+ refds.DynamicWhere.Expression:=nil;
+ for i := 0 to aDelta.KeyFieldCount - 1 do begin
+ with refds.Params.Add do begin
+ ParamType:=daptInput;
+ DataType := refds.FieldByName(aDelta.KeyFieldNames[i]).DataType;
+ Name:=lDynWhereParamPrefix+IntToStr(i);
+ end;
+ with refds.DynamicWhere do begin
+ lexpr:= NewBinaryExpression(NewField('',aDelta.KeyFieldNames[i]),NewParameter(lDynWhereParamPrefix+IntToStr(i)),dboEqual);
+ if Expression = nil then
+ Expression := lexpr
+ else
+ Expression:= NewBinaryExpression(Expression,lexpr,dboEqual);
+ end;
+ end;
+ end;
+ end;
+ // Processes the delta
+ todelete := TList.Create;
+ try
+ for i := 0 to (aDelta.Count - 1) do begin
+ change := aDelta[i];
+ fCurrentChange := i; // Do NOT remove!!!
+ canremove := false;
+ autoincvalue := -1;
+
+ try
+ ok := change.ChangeType in ChangeTypes; // Filters
+
+
+ // Even if there might not be a command associated, the user might want to do something with this
+ // We just give an override chance here
+ if Assigned(fOnBeforeProcessChange) then
+ fOnBeforeProcessChange(Self, change.ChangeType, aDelta[i], ok)
+
+ else if Assigned(fBusinessRules) then
+ fBusinessRules.BeforeProcessChange(Self, change.ChangeType, aDelta[i], ok);
+
+ if ok then begin
+ // Selects the right command
+ mapptr := nil;
+ if not fHasReducedDelta then begin
+ case change.ChangeType of
+ ctInsert: begin
+ currcmd := inscmd;
+ mapptr := @insmap;
+ end;
+ ctUpdate: begin
+ currcmd := updcmd;
+ mapptr := @updmap;
+ end;
+ ctDelete: begin
+ currcmd := delcmd;
+ mapptr := @delmap;
+ end;
+ end;
+
+ end else begin
+ SetupCommands(aConnection, Change, currCmd);
+ if currCmd <> nil then begin
+ CreateMappings(aDelta, insmap, currCmd, nil, True);
+ mapptr := @insmap;
+ refds := SetupRefreshDatasetForReducedDelta(aConnection, aDelta);
+ CreateMappings(aDelta, refmap, refds);
+ end;
+ end;
+ // Assigns the values of the current change
+ if (currcmd <> nil) then
+ for x := 0 to (currcmd.Params.Count - 1) do
+ if (mapptr^[x].DeltaIndex >= 0) then begin
+ case mapptr^[x].MappingType of
+ mtOldValue: val := change.OldValues[mapptr^[x].DeltaIndex];
+ else val := change.NewValues[mapptr^[x].DeltaIndex];
+ end;
+
+ if (currcmd.Params[x].DataType in [datAutoinc, datLargeAutoInc]) and (usegenerators) and (change.ChangeType=ctInsert) and (mapptr^[x].MappingType=mtNewValue) then begin
+ // Gets the next generator values from the DB. This is for DBs such as IB or Oracle which lack autoinc fields
+ if (autoincvalue<>-1) then raise Exception.Create('Multiple auto incremental fields not supported');
+ parname := currcmd.Params[x].Name;
+ change.OldValueByName[parname] := val;
+ autoincvalue := (aConnection as IDAUseGenerators).GetNextAutoinc(currcmd.Params[x].GeneratorName);
+ currcmd.Params[x].Value := autoincvalue;
+ change.RefreshedByServer := TRUE;
+ if not Assigned(refds) then begin
+ change.NewValueByName[parname] := autoincvalue;
+ end;
+ end
+ else currcmd.Params[x].Value := val;
+ end;
+
+ // Gives the user a chance to modify it before execution
+ if Assigned(fOnProcessChange) then
+ fOnProcessChange(Self, change.ChangeType, change, currcmd)
+ else if Assigned(fBusinessRules) then
+ fBusinessRules.ProcessChange(Self, change.ChangeType, change, currcmd);
+
+ // Executes it
+ if (currcmd <> nil)
+ then rowsaffected := currcmd.Execute
+ else rowsaffected := 0;
+
+ canremove := FALSE;
+
+ // IBX returns -1 even if updates are successful! This started to happen after I plugged the GetNextAutoinc call above.
+ // If records fail, an exception is usually generated so this check for <>0 should be sufficient for all cases...
+ // DO NOT CHANGE this to >0 !!!!
+ if (rowsaffected<>0) or (poIgnoreRowsAffected in fProcessorOptions) then begin
+ if (change.ChangeType<>ctDelete) and (refds<>NIL) then begin
+ RefreshDeltaChange(aConnection, refds, aDelta, change, autoincvalue);
+ change.RefreshedByServer := TRUE;
+ end;
+
+ canremove := not change.RefreshedByServer;
+ change.Status := csResolved;
+ end
+ else begin
+ if fHasReducedDelta and (currcmd = nil) then begin
+ // no data for operations, i.e. oldvalues[] = newvalues[]
+ canremove := True;
+ change.Status := csResolved;
+ end
+ else begin
+ canremove := FALSE;
+ change.Status := csFailed;
+ change.Message := 'No rows were affected by this update';
+ end;
+ end;
+
+ // After processing gives the user a last chance to update the change and
+ // optionally set it so that it goes back to the client (i.e. updated values)
+ if Assigned(fOnAfterProcessChange)
+ then fOnAfterProcessChange(Self, change, ok, canremove)
+
+ else if Assigned(fBusinessRules)
+ then fBusinessRules.AfterProcessChange(Self, change, ok, canremove)
+ end;
+
+ except
+ on E: Exception do begin
+ change.Status := csFailed;
+ change.Message := E.Message;
+ canremove := FALSE;
+
+ if Assigned(fOnProcessError) then
+ fOnProcessError(Self, change.ChangeType, change, currcmd, canremove, E)
+ else if Assigned(fBusinessRules) then begin
+ fBusinessRules.ProcessError(Self, change.ChangeType, change, currcmd, canremove, E);
+ if FRaiseExceptionAtError then raise;
+ end
+ else
+ raise EDAApplyUpdateFailed.Create(change, E);
+ end;
+ end;
+
+ if canremove then todelete.Add(change);
+ end;
+
+ for i := 0 to todelete.Count - 1 do
+ aDelta.RemoveChange(TDADeltaChange(todelete[i]));
+
+ if Assigned(fOnAfterProcessDelta) then
+ fOnAfterProcessDelta(Self, aDelta)
+ else if Assigned(fBusinessRules) then
+ fBusinessRules.AfterProcessDelta(Self, aDelta)
+
+ finally
+ todelete.Free;
+ end;
+end;
+
+procedure TDABusinessProcessor.SetDeleteCommandName(const Value: string);
+begin
+ if fDeleteCommandName <> Trim(Value) then begin
+ fDeleteCommandName := Trim(Value);
+ if fDeleteCommandName <> '' then
+ fProcessorOptions := fProcessorOptions - [poAutoGenerateDelete]
+ else
+ fProcessorOptions := fProcessorOptions + [poAutoGenerateDelete];
+ end;
+end;
+
+procedure TDABusinessProcessor.SetInsertCommandName(const Value: string);
+begin
+ if fInsertCommandName <> Trim(Value) then begin
+ fInsertCommandName := Trim(Value);
+ if fInsertCommandName <> '' then
+ fProcessorOptions := fProcessorOptions - [poAutoGenerateInsert]
+ else
+ fProcessorOptions := fProcessorOptions + [poAutoGenerateInsert];
+ end;
+end;
+
+procedure TDABusinessProcessor.SetUpdateCommandName(const Value: string);
+begin
+ if fUpdateCommandName <> Trim(Value) then begin
+ fUpdateCommandName := Trim(Value);
+ if fUpdateCommandName <> '' then
+ fProcessorOptions := fProcessorOptions - [poAutoGenerateUpdate]
+ else
+ fProcessorOptions := fProcessorOptions + [poAutoGenerateUpdate];
+ end;
+end;
+
+procedure TDABusinessProcessor.SetSchema(const Value: TDASchema);
+begin
+ fSchema := Value;
+
+ if (Value <> nil) then fSchema.FreeNotification(Self);
+end;
+
+procedure TDABusinessProcessor.SetReferencedDataset(const Value: string);
+begin
+ fReferencedDataset := Value;
+end;
+
+procedure TDABusinessProcessor.ProcessDelta(aDataTable: TDADataTable;
+ ChangeTypes: TDAChangeTypes; const aConnection : IDAConnection = NIL);
+var
+ conn: IDAConnection;
+begin
+ with aDataTable do begin
+ Check(LocalSchema = nil, 'Datatable doesn''t reference any schema');
+ Check(LocalSchema.ConnectionManager = nil, 'Datatable''s schema doesn''t reference a connection manager');
+
+ if aConnection<>NIL
+ then conn := aConnection
+ else conn := LocalSchema.ConnectionManager.NewConnection(LocalConnection);
+
+ ProcessDelta(conn, aDataTable.Delta, ChangeTypes);
+ end;
+end;
+
+function TDABusinessProcessor.QueryInterface(const IID: TGUID; out Obj): HResult;
+begin
+ result := inherited QueryInterface(IID, Obj);
+
+ if (result <> S_OK) and Assigned(fBusinessRules) then begin
+ // Users might introduce specific interfaces at the business rule level
+ // This allows to type cast the data table to any additional business oriented interface
+ // they decide to create.
+ result := fBusinessRules.QueryInterface(IID, Obj);
+ end;
+end;
+
+procedure TDABusinessProcessor.SetBusinessRulesID(const Value: string);
+var
+ bizclass: TDABusinessProcessorRulesClass;
+begin
+ if (Value = fBusinessRulesID) then Exit;
+
+ if Assigned(fBusinessRules) then begin
+ fBusinessRules.Detach(Self);
+ FreeAndNIL(fBusinessRules);
+ end;
+
+ fBusinessRulesID := Trim(Value);
+
+ if (fBusinessRulesID <> '') and not (csDesigning in ComponentState) then begin
+ Check(not FindBusinessProcessorRules(Value, bizclass), Name+'. Invalid BusinessRulesID "%s"', [Value]);
+
+ fBusinessRules := bizclass.Create(Self);
+ fBusinessRules.Attach(Self);
+ end;
+end;
+
+procedure TDABusinessProcessor.SetRefreshDataset(const Value: string);
+begin
+ if fRefreshDataset <> Trim(Value) then begin
+ fRefreshDataset := Trim(Value);
+ if fRefreshDataset <> '' then
+ fProcessorOptions := fProcessorOptions - [poAutoGenerateRefreshDataset]
+ else
+ fProcessorOptions := fProcessorOptions + [poAutoGenerateRefreshDataset];
+ end;
+end;
+
+procedure TDABusinessProcessor.Notification(AComponent: TComponent;
+ Operation: TOperation);
+begin
+ inherited;
+ if (Operation = opRemove) then begin
+ if (AComponent = fSchema) then fSchema := nil;
+ end;
+end;
+
+procedure TDABusinessProcessor.CheckProperties;
+begin
+ Check(Schema = nil, Name + '.Schema must be assinged.');
+end;
+
+procedure TDABusinessProcessor.SetupCommandsWithMapping(
+ const aConnection: IDAConnection;
+ const aChange: TDADeltaChange;
+ out anCmd: IDASQLCommand;
+ out aParamMapping: TDAParamMappingArray);
+var
+ lSql: string;
+ lDataset: TDADataset;
+ lRefStatement: TDAStatement;
+ lUnionTable: TDAUnionDataTable;
+ lVar: Variant;
+
+ lSourceTableIdx: Integer;
+ lUnionSourceTable : TDAUnionSourceTable;
+ lSourceTable : TDADataset;
+ lSourceTableName: String;
+ lSourceTableMapping: TDAColumnMappingCollection;
+begin
+ anCmd := nil;
+ lRefStatement := nil;
+ lSourceTableMapping := nil;
+ CheckProperties;
+ lDataset := TDADataset(fSchema.FindDataset(fReferencedDataset));
+
+ // If Union table ...
+ if lDataset is TDAUnionDataTable then begin
+ lUnionTable := TDAUnionDataTable(lDataset);
+ lVar := aChange.NewValueByName[def_SourceTableFieldName];
+ if (VarIsNull(lVar)) then begin
+ lSourceTableName := lUnionTable.DefaultSourceTable;
+ lUnionSourceTable := TDAUnionSourceTable(lUnionTable.SourceTables.ItemByName(lSourceTableName));
+ end else begin
+ lSourceTableIdx := lVar;
+ lUnionSourceTable := lUnionTable.SourceTables[lSourceTableIdx];
+ lSourceTableName := lUnionSourceTable.Name;
+ end;
+
+ // check do we have rights to change this table
+ if lUnionSourceTable.IsReadOnly then
+ raise EDAException.Create(Format('Union source table "%s" is read-only', [lSourceTableName]));
+ //------------------------------------------------------------------
+
+
+ lSourceTableMapping := lUnionSourceTable.ColumnMappings;
+
+ lSourceTable := TDADataset(fSchema.Datasets.FindItem(lSourceTableName));
+ if Assigned(lSourceTable) then begin
+
+ lDataset := lSourceTable;
+
+ lRefStatement := TDAStatement(lSourceTable.Statements.FindItem(aConnection.Name));
+ if (lRefStatement = nil) then lRefStatement := lSourceTable.Statements.StatementByName(Schema.ConnectionManager.GetDefaultConnectionName);
+ end;
+
+
+
+ end else
+
+ // If plain table ...
+ if lDataset is TDADataset then begin
+ lRefStatement := TDAStatement(lDataset.Statements.FindItem(aConnection.Name));
+ if (lRefStatement = nil) then lRefStatement := lDataset.Statements.StatementByName(Schema.ConnectionManager.GetDefaultConnectionName);
+
+ // If no dataset found
+ end else
+ RaiseError(Name + '''s referenced dataset is not speficied or does not exist. Cannot generate SQL');
+
+ lSql := GenerateSQL(aChange.ChangeType, aChange, lDataset, aChange.Delta, lRefStatement, aConnection);
+ if lSql <> '' then begin
+ anCmd := aConnection.NewCommand(lSql, stSQL);
+ SetupParameters(anCmd, lDataset, aConnection);
+ if anCmd <> nil then anCmd.Prepared:=True;
+ CreateMappings(aChange.Delta, aParamMapping, anCmd, lSourceTableMapping, True);
+ end;
+end;
+
+procedure TDABusinessProcessor.SetupCommands(
+ const aConnection: IDAConnection; const aChange: TDADeltaChange;
+ out anCmd: IDASQLCommand);
+var
+ sql: string;
+ ds: TDADataset;
+ refstmt: TDAStatement;
+begin
+ anCmd:=nil;
+ refstmt := nil;
+ CheckProperties;
+ ds := TDADataset(fSchema.Datasets.FindItem(fReferencedDataset));
+ if (ds <> nil) then begin
+ refstmt := fSchema.FindCommandStatement(aConnection,ds,aConnection.Name);
+// refstmt := TDAStatement(ds.Statements.FindItem(aConnection.Name));
+// if (refstmt = nil) then refstmt := ds.Statements.StatementByName(Schema.ConnectionManager.GetDefaultConnectionName);
+ end
+ else
+ RaiseError(Name + '''s referenced dataset is not speficied or does not exist. Cannot generate SQL');
+ sql := GenerateSQL(aChange.ChangeType, aChange, ds,aChange.Delta ,refstmt, aConnection);
+ if sql <> '' then begin
+ anCmd := aConnection.NewCommand(sql, stSQL);
+ SetupParameters(anCmd, ds, aConnection);
+ if anCmd <> nil then anCmd.Prepared:=True;
+ end;
+end;
+
+
+
+function TDABusinessProcessor.SetupRefreshDatasetForReducedDelta(
+ const aConnection: IDAConnection; const aDelta: IDADelta): IDADataset;
+var
+ ds: TDADataset;
+begin
+ Result := nil;
+ if (fRefreshDataset <> '') then Result := fSchema.NewDataset(aConnection, fRefreshDataset,[],'','',False,True);
+ if (Result = nil) and (poAutoGenerateRefreshDataset in fProcessorOptions) then begin
+ ds := TDADataset(fSchema.Datasets.FindItem(fReferencedDataset));
+ if (ds <> nil) then begin
+ Result := GenerateRefreshDataset(ds, aDelta, fSchema.FindCommandStatement(aConnection,ds), aConnection);
+ if (Result<>NIL) then SetupParameters(Result, ds, aConnection);
+ end
+ else begin
+ RaiseError(Name + '''s referenced dataset is not speficied or does not exist. Cannot generate SQL');
+ end;
+ end;
+ // Finally prepares them
+ if (poPrepareCommands in fProcessorOptions) and (Result <> NIL) then Result.Prepared := TRUE;
+end;
+
+procedure TDABusinessProcessor.SetProcessorOptions(
+ const Value: TDAProcessorOptions);
+begin
+ fProcessorOptions := Value;
+ if csLoading in ComponentState then begin
+ if fInsertCommandName <> '' then fProcessorOptions:= fProcessorOptions - [poAutoGenerateInsert];
+ if fUpdateCommandName <> '' then fProcessorOptions:= fProcessorOptions - [poAutoGenerateUpdate];
+ if fDeleteCommandName <> '' then fProcessorOptions:= fProcessorOptions - [poAutoGenerateDelete];
+ if fRefreshDataset <> '' then fProcessorOptions:= fProcessorOptions - [poAutoGenerateRefreshDataset];
+ end
+ else begin
+ if poAutoGenerateInsert in fProcessorOptions then fInsertCommandName :='';
+ if poAutoGenerateUpdate in fProcessorOptions then fUpdateCommandName :='';
+ if poAutoGenerateDelete in fProcessorOptions then fDeleteCommandName :='';
+ if poAutoGenerateRefreshDataset in fProcessorOptions then fRefreshDataset :='';
+ end;
+end;
+
+{ TDABusinessProcessorRules }
+
+procedure TDABusinessProcessorRules.Attach(
+ aBusinessProcessor: TDABusinessProcessor);
+begin
+
+end;
+
+constructor TDABusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
+begin
+ inherited Create;
+ fBusinessProcessor := aBusinessProcessor;
+end;
+
+procedure TDABusinessProcessorRules.Detach(
+ aBusinessProcessor: TDABusinessProcessor);
+begin
+
+end;
+
+procedure TDABusinessProcessorRules.AfterProcessChange(
+ Sender: TDABusinessProcessor; aChange: TDADeltaChange;
+ Processed: boolean; var CanRemoveFromDelta: boolean);
+begin
+
+end;
+
+procedure TDABusinessProcessorRules.AfterProcessDelta(
+ Sender: TDABusinessProcessor; const aDelta: IDADelta);
+begin
+
+end;
+
+procedure TDABusinessProcessorRules.BeforeProcessChange(
+ Sender: TDABusinessProcessor; aChangeType: TDAChangeType;
+ aChange: TDADeltaChange; var ProcessChange: boolean);
+begin
+
+end;
+
+procedure TDABusinessProcessorRules.BeforeProcessDelta(
+ Sender: TDABusinessProcessor; const aDelta: IDADelta);
+begin
+
+end;
+
+procedure TDABusinessProcessorRules.GenerateSQL(
+ Sender: TDABusinessProcessor; ChangeType: TDAChangeType;
+ const ReferencedStatement: TDAStatement; const aDelta: IDADelta;
+ var SQL: string);
+begin
+
+end;
+
+procedure TDABusinessProcessorRules.ProcessChange(
+ Sender: TDABusinessProcessor; aChangeType: TDAChangeType;
+ aChange: TDADeltaChange; const aCommand: IDASQLCommand);
+begin
+
+end;
+
+procedure TDABusinessProcessorRules.ProcessError(
+ Sender: TDABusinessProcessor; aChangeType: TDAChangeType;
+ aChange: TDADeltaChange; const aCommand: IDASQLCommand;
+ var CanRemoveFromDelta: boolean; Error: Exception);
+begin
+ if Assigned(Error) then
+ raise Exception(Error.NewInstance).Create(Error.Message)
+ else
+ raise Exception.Create('Unknown error');
+end;
+
+//----------
+
+procedure TDABusinessProcessorRules.NotSupportedByBusinessProcessor;
+begin
+ RaiseError('This method is not supported on the Business Processor Rule, but only on the client.');
+end;
+
+procedure TDABusinessProcessorRules.Append;
+begin
+ NotSupportedByBusinessProcessor();
+end;
+
+procedure TDABusinessProcessorRules.Cancel;
+begin
+ NotSupportedByBusinessProcessor();
+end;
+
+procedure TDABusinessProcessorRules.Delete;
+begin
+ NotSupportedByBusinessProcessor();
+end;
+
+procedure TDABusinessProcessorRules.Edit;
+begin
+ NotSupportedByBusinessProcessor();
+end;
+
+procedure TDABusinessProcessorRules.First;
+begin
+ NotSupportedByBusinessProcessor();
+end;
+
+function TDABusinessProcessorRules.GetBOF: Boolean;
+begin
+ result := false; { to avoid warning; }
+ NotSupportedByBusinessProcessor();
+end;
+
+function TDABusinessProcessorRules.GetEOF: Boolean;
+begin
+ result := false; { to avoid warning; }
+ NotSupportedByBusinessProcessor();
+end;
+
+function TDABusinessProcessorRules.GetRecordCount: Integer;
+begin
+ result := -1; { to avoid warning; }
+ NotSupportedByBusinessProcessor();
+end;
+
+procedure TDABusinessProcessorRules.Insert;
+begin
+ NotSupportedByBusinessProcessor();
+end;
+
+procedure TDABusinessProcessorRules.Last;
+begin
+ NotSupportedByBusinessProcessor();
+end;
+
+function TDABusinessProcessorRules.Locate(const aKeyFields: String; const aKeyValues: Variant; aOptions: TLocateOptions): Boolean;
+begin
+ result := false; { to avoid warning; }
+ NotSupportedByBusinessProcessor();
+end;
+
+procedure TDABusinessProcessorRules.Next;
+begin
+ NotSupportedByBusinessProcessor();
+end;
+
+procedure TDABusinessProcessorRules.Post;
+begin
+ NotSupportedByBusinessProcessor();
+end;
+
+procedure TDABusinessProcessorRules.Prior;
+begin
+ NotSupportedByBusinessProcessor();
+end;
+
+function TDABusinessProcessorRules.GetDetailOptions: TDADetailOptions;
+begin
+ result := []
+end;
+
+function TDABusinessProcessorRules.GetMasterOptions: TDAMasterOptions;
+begin
+ result := []
+end;
+
+procedure TDABusinessProcessorRules.SetDetailOptions(
+ Value: TDADetailOptions);
+begin
+ NotSupportedByBusinessProcessor();
+end;
+
+procedure TDABusinessProcessorRules.SetMasterOptions(
+ Value: TDAMasterOptions);
+begin
+ NotSupportedByBusinessProcessor();
+end;
+
+function TDABusinessProcessorRules.GetRecNo: integer;
+begin
+ result := -1; { to avoid warning; }
+ NotSupportedByBusinessProcessor();
+end;
+
+procedure TDABusinessProcessorRules.SetRecNo(Value: integer);
+begin
+ NotSupportedByBusinessProcessor();
+end;
+
+function TDABusinessProcessorRules.GetIsEmpty: boolean;
+begin
+ result := FALSE;
+ NotSupportedByBusinessProcessor();
+end;
+
+function TDABusinessProcessorRules.GetState: TDatasetState;
+begin
+ result := dsBrowse
+end;
+
+function TDABusinessProcessorRules.Lookup(const KeyFields: string;
+ const KeyValues: Variant; const ResultFields: string): Variant;
+begin
+ Result:=Null;
+ NotSupportedByBusinessProcessor();
+end;
+
+procedure TDABusinessProcessorRules.ClearField(
+ const FieldIndexOrName: Variant);
+begin
+ NotSupportedByBusinessProcessor();
+end;
+
+function TDABusinessProcessorRules.IsFieldNull(
+ const FieldIndexOrName: Variant): boolean;
+begin
+ result := FALSE;
+ NotSupportedByBusinessProcessor();
+end;
+
+function TDABusinessProcessorRules.GetDataTable: TDADataTable;
+begin
+ result := NIL;
+ NotSupportedByBusinessProcessor();
+end;
+
+procedure TDABusinessProcessorRules.Close;
+begin
+ NotSupportedByBusinessProcessor();
+end;
+
+procedure TDABusinessProcessorRules.Open;
+begin
+ NotSupportedByBusinessProcessor();
+end;
+
+function TDABusinessProcessorRules.GetActive: boolean;
+begin
+ NotSupportedByBusinessProcessor();
+ result:=FALSE
+end;
+
+procedure TDABusinessProcessorRules.SetActive(const Value: boolean);
+begin
+ NotSupportedByBusinessProcessor();
+end;
+
+procedure TDABusinessProcessor.ProcessDeltaForUnion(const aConnection: IDAConnection;
+ const aDelta: IDADelta;
+ ChangeTypes: TDAChangeTypes = AllChanges);
+var
+ i, x, rowsaffected: integer;
+ canremove, ok: boolean;
+ refds : IDADataset;
+ insmap: TDAParamMappingArray;
+ mapptr: ^TDAParamMappingArray;
+ change: TDADeltaChange;
+ todelete: TList;
+ val : variant;
+ parname : string;
+ autoincvalue: integer;
+ usegenerators : boolean;
+ currcmd: IDASQLCommand;
+ lCommands: TDADeltaProcessorItemCollection;
+ lUnionTable: TDAUnionDataTable;
+ lUnionSourceTable: TDAUnionSourceTable;
+ lSourceTableName: String;
+ lProcessorItem: TDADeltaProcessorItem;
+ lVar: Variant;
+begin
+ Check(not Assigned(aDelta), 'Cannot process a NIL delta');
+ if (aDelta.Count=0) then Exit;
+ refds := nil;
+ fCurrentDelta := aDelta.GetDelta;
+ fCurrentChange := 0;
+
+ usegenerators := Supports(aConnection, IDAUseGenerators);
+
+ // Fires the "before" events
+ if Assigned(fOnBeforeProcessDelta)
+ then fOnBeforeProcessDelta(Self, aDelta)
+
+ else if Assigned(fBusinessRules)
+ then fBusinessRules.BeforeProcessDelta(Self, aDelta);
+
+ lUnionTable := fSchema.UnionDataTables.ItemByName(fReferencedDataset) as TDAUnionDataTable;
+ //lSourceTableFieldIdx := lUnionTable.Fields.FieldByName(def_SourceTableFieldName).Index;
+
+ try
+ // Prepares the commands
+ if not fHasReducedDelta then begin
+ SetupCommands(aConnection, aDelta, lCommands);
+ end;
+ // Processes the delta
+ todelete := TList.Create;
+ try
+ for i := 0 to (aDelta.Count - 1) do begin
+ change := aDelta[i];
+ fCurrentChange := i; // Do NOT remove!!!
+ canremove := false;
+ autoincvalue := -1;
+
+ ok := change.ChangeType in ChangeTypes; // Filters
+ try
+
+ // Even if there might not be a command associated, the user might want to do something with this
+ // We just give an override chance here
+ if Assigned(fOnBeforeProcessChange) then
+ fOnBeforeProcessChange(Self, change.ChangeType, aDelta[i], ok)
+
+ else if Assigned(fBusinessRules) then
+ fBusinessRules.BeforeProcessChange(Self, change.ChangeType, aDelta[i], ok);
+
+ if ok then begin
+ // Selects the right command
+ mapptr := nil;
+ if not fHasReducedDelta then begin
+
+ // Define appripriate source table and get its commands
+
+ //lVar := aDelta.Changes[i].NewValues[lSourceTableFieldIdx];
+ if (aDelta.Changes[i].ChangeType = ctInsert) then
+ lVar := aDelta.Changes[i].NewValueByName[def_SourceTableFieldName]
+ else
+ lVar := aDelta.Changes[i].OldValueByName[def_SourceTableFieldName];
+
+ if (VarIsNull(lVar) or VarIsClear(lVar)) then begin
+ if lUnionTable.DefaultSourceTable <> '' then
+ lSourceTableName := lUnionTable.DefaultSourceTable
+ else
+ lSourceTableName := lUnionTable.SourceTables[0].Name;
+ end else
+ lSourceTableName := lUnionTable.SourceTables[lVar].Name;
+
+ // Since we specified table for this particular change then let's
+ // check do we have rights to change this table
+ lUnionSourceTable :=
+ lUnionTable.SourceTables.UnionSourceTableByName(lSourceTableName);
+
+ if lUnionSourceTable.IsReadOnly then
+ raise EDAException.Create(Format('Union source table "%s" is read-only', [lSourceTableName]));
+ //------------------------------------------------------------------
+
+ lProcessorItem := TDADeltaProcessorItem(lCommands.FindItem(lSourceTableName));
+
+ case change.ChangeType of
+ ctInsert: begin
+ currcmd := lProcessorItem.fInsertCommand;
+ mapptr := @lProcessorItem.fInsertCommandMapping;
+ end;
+ ctUpdate: begin
+ currcmd := lProcessorItem.fUpdateCommand;
+ mapptr := @lProcessorItem.fUpdateCommandMapping;
+ end;
+ ctDelete: begin
+ currcmd := lProcessorItem.fDeleteCommand;
+ mapptr := @lProcessorItem.fDeleteCommandMapping;
+
+ end;
+ end;
+ end else begin
+ SetupCommandsWithMapping(aConnection, Change, currCmd, insmap);
+ mapptr := @insmap;
+ end;
+ // Assigns the values of the current change
+ if (currcmd <> nil) then
+ for x := 0 to (currcmd.Params.Count - 1) do
+ if (mapptr^[x].DeltaIndex >= 0) then begin
+ case mapptr^[x].MappingType of
+ mtOldValue: val := change.OldValues[mapptr^[x].DeltaIndex];
+ else val := change.NewValues[mapptr^[x].DeltaIndex];
+ end;
+
+ if (currcmd.Params[x].DataType in [datAutoinc, datLargeAutoInc]) and (usegenerators) and (change.ChangeType=ctInsert) and (mapptr^[x].MappingType=mtNewValue) then begin
+ // Gets the next generator values from the DB. This is for DBs such as IB or Oracle which lack autoinc fields
+ if (autoincvalue<>-1) then raise Exception.Create('Multiple auto incremental fields not supported');
+ parname := currcmd.Params[x].Name;
+ change.OldValueByName[parname] := val;
+ autoincvalue := (aConnection as IDAUseGenerators).GetNextAutoinc(currcmd.Params[x].GeneratorName);
+ currcmd.Params[x].Value := autoincvalue;
+ change.RefreshedByServer := TRUE;
+ if not Assigned(refds) then begin
+ change.NewValueByName[parname] := autoincvalue;
+ end;
+ end
+ else currcmd.Params[x].Value := val;
+ end;
+
+ // Gives the user a chance to modify it before execution
+ if Assigned(fOnProcessChange) then
+ fOnProcessChange(Self, change.ChangeType, change, currcmd)
+ else if Assigned(fBusinessRules) then
+ fBusinessRules.ProcessChange(Self, change.ChangeType, change, currcmd);
+
+ // Executes it
+ if (currcmd <> nil)
+ then rowsaffected := currcmd.Execute
+ else rowsaffected := 0;
+
+ canremove := FALSE;
+
+ // IBX returns -1 even if updates are successful! This started to happen after I plugged the GetNextAutoinc call above.
+ // If records fail, an exception is usually generated so this check for <>0 should be sufficient for all cases...
+ // DO NOT CHANGE this to >0 !!!!
+ if (rowsaffected<>0) or (poIgnoreRowsAffected in fProcessorOptions) then begin
+ if (change.ChangeType<>ctDelete) and (refds<>NIL) then begin
+ RefreshDeltaChange(aConnection, refds, aDelta, change, autoincvalue);
+ change.RefreshedByServer := TRUE;
+ end;
+
+ canremove := not change.RefreshedByServer;
+ change.Status := csResolved;
+ end
+ else begin
+ if fHasReducedDelta and (currcmd = nil) then begin
+ // no data for operations, i.e. oldvalues[] = newvalues[]
+ canremove := True;
+ change.Status := csResolved;
+ end
+ else begin
+ canremove := FALSE;
+ change.Status := csFailed;
+ change.Message := 'No rows were affected by this update';
+ end;
+ end;
+
+ // After processing gives the user a last chance to update the change and
+ // optionally set it so that it goes back to the client (i.e. updated values)
+ if Assigned(fOnAfterProcessChange)
+ then fOnAfterProcessChange(Self, change, ok, canremove)
+
+ else if Assigned(fBusinessRules)
+ then fBusinessRules.AfterProcessChange(Self, change, ok, canremove)
+ end;
+
+ except
+ on E: Exception do begin
+ change.Status := csFailed;
+ change.Message := E.Message;
+ canremove := FALSE;
+
+ if Assigned(fOnProcessError) then
+ fOnProcessError(Self, change.ChangeType, change, currcmd, canremove, E)
+ else if Assigned(fBusinessRules) then begin
+ fBusinessRules.ProcessError(Self, change.ChangeType, change, currcmd, canremove, E);
+ if FRaiseExceptionAtError then raise;
+ end
+ else
+ raise EDAApplyUpdateFailed.Create(change, E);
+ end;
+ end;
+
+ if canremove then todelete.Add(change);
+ end;
+
+ for i := 0 to todelete.Count - 1 do
+ aDelta.RemoveChange(TDADeltaChange(todelete[i]));
+
+ if Assigned(fOnAfterProcessDelta) then
+ fOnAfterProcessDelta(Self, aDelta)
+ else if Assigned(fBusinessRules) then
+ fBusinessRules.AfterProcessDelta(Self, aDelta)
+
+ finally
+ todelete.Free;
+ end;
+ finally
+ lCommands.Free();
+ end;
+
+end;
+
+procedure TDABusinessProcessor.SetupCommands(const aConnection: IDAConnection;
+const aDelta: IDADelta; out aCommandsList : TDADeltaProcessorItemCollection);
+var i: Integer;
+ refstmt: TDAStatement;
+ lUnionTable: TDAUnionDataTable;
+ lSourceTable: TDADataset;
+ lSourceTableName: String;
+ lSourceTableIdx: integer;
+ lSourceTableMapping: TDAColumnMappingCollection;
+ lProcessorItem: TDADeltaProcessorItem;
+ lSql: String;
+ lVar: Variant;
+ lConnection: IDAConnection;
+begin
+ //lUnionTable := nil;
+ refstmt := nil;
+ CheckProperties;
+
+ aCommandsList := TDADeltaProcessorItemCollection.Create(Self);
+
+ lUnionTable := fSchema.UnionDataTables.ItemByName(fReferencedDataset) as TDAUnionDataTable;
+
+ if not Assigned(lUnionTable) then
+ RaiseError(Name + '''s referenced dataset is not speficied or does not exist. Cannot generate SQL');
+
+ // for each change in delta
+ for i:= 0 to aDelta.Count-1 do begin
+ case aDelta.Changes[i].ChangeType of
+ ctInsert: lVar := aDelta.Changes[i].NewValueByName[def_SourceTableFieldName];
+ ctUpdate, ctDelete: lVar := aDelta.Changes[i].OldValueByName[def_SourceTableFieldName];
+ end;
+
+ if (VarIsNull(lVar) or VarIsClear(lVar)) then begin
+ if lUnionTable.DefaultSourceTable <> '' then
+ lSourceTableName := lUnionTable.DefaultSourceTable
+ else
+ lSourceTableName := lUnionTable.SourceTables[0].Name;
+ lSourceTableIdx := lUnionTable.SourceTables.ItemByName(lSourceTableName).Index;
+ end else begin
+ lSourceTableIdx := lVar;
+ lSourceTableName := lUnionTable.SourceTables[lSourceTableIdx].Name;
+ end;
+ lSourceTableMapping := lUnionTable.SourceTables[lSourceTableIdx].ColumnMappings;
+ lConnection := GetConnectionForObject(aConnection, lSourceTableName);
+ lSourceTable := TDADataset(fSchema.Datasets.FindItem(lSourceTableName));
+ if Assigned(lSourceTable) then begin
+ refstmt := lSourceTable.Statements.FindItem(lConnection.Name, '', lConnection.ConnectionType, True);
+ end;
+
+ lProcessorItem := TDADeltaProcessorItem(aCommandsList.FindItem(lSourceTableName));
+
+ if not Assigned(lProcessorItem) then begin
+ lProcessorItem := aCommandsList.Add();
+ lProcessorItem.fName := lSourceTableName;
+ end;
+
+ // Assemble Refresh dataset ...
+ if (fRefreshDataset <> '') and (not Assigned(lProcessorItem.fRefreshDataset)) then begin
+ lProcessorItem.fRefreshDataset := fSchema.NewDataset(lConnection, fRefreshDataset, [], [], FALSE);
+
+ if (lProcessorItem.fRefreshDataset = nil) and (poAutoGenerateRefreshDataset in fProcessorOptions) then begin
+ lProcessorItem.fRefreshDataset := GenerateRefreshDataset(lSourceTable, aDelta, refstmt, lConnection);
+ if (lProcessorItem.fRefreshDataset <> NIL) then SetupParameters(lProcessorItem.fRefreshDataset, lSourceTable, lConnection);
+ end;
+
+ if Assigned(lProcessorItem.fRefreshDataset) then
+ lProcessorItem.fRefreshDataset.Prepared := True;
+ end;
+
+ // Assemble Insert command ...
+ if ((aDelta.Changes[i].ChangeType = ctInsert) and (not Assigned(lProcessorItem.fInsertCommand))) then begin
+ // Tries to locate the specified commands
+ if (fInsertCommandName <> '') then
+ lProcessorItem.fInsertCommand := fSchema.NewCommand(lConnection, fInsertCommandName);
+ // Auto generates the SQL for the undefined commands
+ if (lProcessorItem.fInsertCommand = nil) and (poAutoGenerateInsert in fProcessorOptions) then begin
+ lSql := GenerateSQL(ctInsert, nil, lSourceTable, aDelta, refstmt, lConnection);
+ lProcessorItem.fInsertCommand := lConnection.NewCommand(lSql, stSQL);
+ SetupParameters(lProcessorItem.fInsertCommand, lSourceTable, lConnection);
+ end;
+
+ if Assigned(lProcessorItem.fInsertCommand) then begin
+ CreateMappings(aDelta, lProcessorItem.fInsertCommandMapping , lProcessorItem.fInsertCommand, lSourceTableMapping, True);
+ lProcessorItem.fInsertCommand.Prepared := True;
+ end;
+ end;
+
+ // Assemble Update command ...
+ if ((aDelta.Changes[i].ChangeType = ctUpdate) and (not Assigned(lProcessorItem.fUpdateCommand))) then begin
+ // Tries to locate the specified commands
+ if (fUpdateCommandName <> '') then
+ lProcessorItem.fUpdateCommand := fSchema.NewCommand(lConnection, fUpdateCommandName);
+ // Auto generates the SQL for the undefined commands
+ if (lProcessorItem.fUpdateCommand = nil) and (poAutoGenerateUpdate in fProcessorOptions) then begin
+ lSql := GenerateSQL(ctUpdate, nil, lSourceTable, aDelta, refstmt, lConnection);
+ lProcessorItem.fUpdateCommand := lConnection.NewCommand(lSql, stSQL);
+ SetupParameters(lProcessorItem.fUpdateCommand, lSourceTable, lConnection);
+ end;
+ if Assigned(lProcessorItem.fUpdateCommand) then begin
+ CreateMappings(aDelta, lProcessorItem.fUpdateCommandMapping , lProcessorItem.fUpdateCommand, lSourceTableMapping, True);
+ lProcessorItem.fUpdateCommand.Prepared := True;
+ end;
+
+ end;
+
+ // Assemble Delete command ...
+ if ((aDelta.Changes[i].ChangeType = ctDelete) and (not Assigned(lProcessorItem.fDeleteCommand))) then begin
+ // Tries to locate the specified commands
+ if (fDeleteCommandName <> '') then
+ lProcessorItem.fDeleteCommand := fSchema.NewCommand(lConnection, fDeleteCommandName);
+ // Auto generates the SQL for the undefined commands
+ if (lProcessorItem.fDeleteCommand = nil) and (poAutoGenerateDelete in fProcessorOptions) then begin
+ lSql := GenerateSQL(ctDelete, nil, lSourceTable, aDelta, refstmt, lConnection);
+ lProcessorItem.fDeleteCommand := lConnection.NewCommand(lSql, stSQL);
+ SetupParameters(lProcessorItem.fDeleteCommand, lSourceTable, lConnection);
+ end;
+ if Assigned(lProcessorItem.fDeleteCommand) then begin
+ CreateMappings(aDelta, lProcessorItem.fDeleteCommandMapping , lProcessorItem.fDeleteCommand, lSourceTableMapping, True);
+ lProcessorItem.fDeleteCommand.Prepared := True;
+ end;
+ end;
+
+ end;
+end;
+
+function TDABusinessProcessor.GetConnectionForObject(const aConnection: IDAConnection; const aName: string): IDAConnection;
+var lHETConnection: IDAHETConnection;
+begin
+ result := aConnection;
+ if Supports(aConnection, IDAHETConnection, lHETConnection) then
+ result := lHETConnection.GetConnectionForObject(aName)
+end;
+
+
+{ TDADeltaProcessorItemCollection }
+constructor TDADeltaProcessorItemCollection.Create(aOwner: TComponent);
+begin
+ inherited Create(aOwner, TDADeltaProcessorItem);
+end;
+
+function TDADeltaProcessorItemCollection.GetItem(Index: integer): TDADeltaProcessorItem;
+begin
+ result := TDADeltaProcessorItem(inherited Items[Index])
+end;
+
+procedure TDADeltaProcessorItemCollection.SetItem(Index: integer; const Value: TDADeltaProcessorItem);
+begin
+ Items[Index].Assign(Value);
+end;
+
+function TDADeltaProcessorItemCollection.Add: TDADeltaProcessorItem;
+begin
+ result := TDADeltaProcessorItem(inherited Add);
+end;
+
+function TDADeltaProcessorItemCollection.ItemByName(const aName: String): TDADeltaProcessorItem;
+begin
+ result := TDADeltaProcessorItem(inherited ItemByName(aName));
+end;
+
+
+function TDADeltaProcessorItemCollection.GetItemName(
+ anItem: TCollectionItem): string;
+begin
+ Result := TDADeltaProcessorItem(anItem).Name;
+end;
+
+function TDADeltaProcessorItemCollection.SetItemName(
+ anItem: TCollectionItem; const aName: string): string;
+begin
+ TDADeltaProcessorItem(anItem).Name := aName;
+end;
+
+initialization
+ _bizdeltachanges := TStringList.Create;
+ _bizdeltachanges.Sorted := TRUE;
+
+finalization
+ _bizdeltachanges.Free;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDACDSDataTable.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDACDSDataTable.pas
new file mode 100644
index 0000000..9b01a86
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDACDSDataTable.pas
@@ -0,0 +1,638 @@
+unit uDACDSDataTable;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up }
+{ platform: Win32 }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses Classes, DB, uDAInterfaces, uDADataTable, DBClient;
+
+
+const
+ DAFormatToCDSFormat : array[TDANativeDataFormat] of TDataPacketFormat = (dfBinary, dfXML);
+
+type
+ TDACDSDataTable = class;
+
+ { TDAClientdataset }
+ TDAClientdataset = class(TClientDataset, IDADataTableDataset)
+ private
+ FLocateRecordMode: Boolean;
+ function GetActive: boolean;
+
+ protected
+ function GetDataTable: TDADataTable; safecall;
+ procedure InternalRefresh; override;
+ function GetStateFieldValue(State: TDataSetState;
+ Field: TField): Variant; override;
+ procedure DataEvent(Event: TDataEvent; Info: Longint); override;
+ public
+ function Locate(const KeyFields: string; const KeyValues: Variant;
+ Options: TLocateOptions): Boolean; override;
+ function Lookup(const KeyFields: string; const KeyValues: Variant;
+ const ResultFields: string): Variant; override;
+{$IFDEF DELPHI7UP}
+ procedure GetFieldNames(List: TStrings); override;
+{$ENDIF}
+ published
+ property Active: boolean read GetActive;
+ end;
+
+ { TDACDSDataTable }
+ TDACDSDataTable = class(TDADataTable, IDARangeController, IDANativeDatasetStreaming)
+ private
+ fMasterSource : TDADataSource;
+ fClientDataset: TClientDataSet;
+ fWasReadonly : Boolean;
+ protected
+ function GetDatasetClass: TDatasetClass; override;
+ procedure CreateInternalFields(aDataset: TDataset; someFieldDefinitions: TDAFieldCollection); override;
+ procedure DoSort(const FieldNames: array of string; const Directions: array of TDASortDirection); override;
+
+ procedure DoBeforeOpenDataset; override;
+ procedure DoAfterCloseDataset; override;
+
+ procedure SetMasterSource(const Value: TDADataSource); override;
+ function GetMasterSource: TDADataSource; override;
+ procedure SetDetailsFields(const Value: string); override;
+ procedure SetMasterFields(const Value: string); override;
+ function GetDetailFields: string; override;
+ function GetMasterFields: string; override;
+
+ function GetIndexDefs: TIndexDefs;
+ procedure SetIndexDefs(const Value: TIndexDefs);
+ function GetIndexName: string;
+ procedure SetIndexName(const Value: string);
+
+ function GetFilter: string; override;
+ function GetFiltered: boolean; override;
+ procedure SetFilter(const Value: string); override;
+ procedure SetFiltered(const Value: boolean); override;
+
+ function GetReadOnly: boolean; override;
+ procedure SetReadOnly(const Value: boolean); override;
+
+ public
+ constructor Create(aOwner: TComponent); override;
+
+ procedure FindNearest(const KeyValues: array of const);
+
+ { IDAClonedCursorsSupport }
+ procedure CloneCursor(Source : TDADataTable); override; safecall;
+
+ { IDANativeDatasetStreaming }
+ procedure NativeSaveToFile(const aFileName : string; DataFormat : TDANativeDataFormat = ndfBinary);
+ procedure NativeLoadFromFile(const aFileName : string);
+ procedure NativeSaveToStream(aStream : TStream; DataFormat : TDANativeDataFormat = ndfBinary);
+ procedure NativeLoadFromStream(aStream : TStream);
+
+ { IDARangeController }
+ procedure ApplyRange; safecall;
+ procedure CancelRange; safecall;
+ procedure SetRange(const StartValues, EndValues: array of const); safecall;
+ procedure EditRangeEnd; safecall;
+ procedure EditRangeStart; safecall;
+ procedure SetRangeEnd; safecall;
+ procedure SetRangeStart; safecall;
+
+ procedure DisableConstraints; override; safecall;
+ procedure EnableConstraints; override; safecall;
+ published
+ property IndexDefs: TIndexDefs read GetIndexDefs write SetIndexDefs;
+ property IndexName: string read GetIndexName write SetIndexName;
+
+ end;
+
+// Table for quick CRC Calculations. Used to generate unique index names when sorting
+const crctable : array [0..255] of cardinal =
+(
+ $00000000, $77073096, $EE0E612C, $990951BA,
+ $076DC419, $706AF48F, $E963A535, $9E6495A3,
+ $0EDB8832, $79DCB8A4, $E0D5E91E, $97D2D988,
+ $09B64C2B, $7EB17CBD, $E7B82D07, $90BF1D91,
+ $1DB71064, $6AB020F2, $F3B97148, $84BE41DE,
+ $1ADAD47D, $6DDDE4EB, $F4D4B551, $83D385C7,
+ $136C9856, $646BA8C0, $FD62F97A, $8A65C9EC,
+ $14015C4F, $63066CD9, $FA0F3D63, $8D080DF5,
+ $3B6E20C8, $4C69105E, $D56041E4, $A2677172,
+ $3C03E4D1, $4B04D447, $D20D85FD, $A50AB56B,
+ $35B5A8FA, $42B2986C, $DBBBC9D6, $ACBCF940,
+ $32D86CE3, $45DF5C75, $DCD60DCF, $ABD13D59,
+ $26D930AC, $51DE003A, $C8D75180, $BFD06116,
+ $21B4F4B5, $56B3C423, $CFBA9599, $B8BDA50F,
+ $2802B89E, $5F058808, $C60CD9B2, $B10BE924,
+ $2F6F7C87, $58684C11, $C1611DAB, $B6662D3D,
+ $76DC4190, $01DB7106, $98D220BC, $EFD5102A,
+ $71B18589, $06B6B51F, $9FBFE4A5, $E8B8D433,
+ $7807C9A2, $0F00F934, $9609A88E, $E10E9818,
+ $7F6A0DBB, $086D3D2D, $91646C97, $E6635C01,
+ $6B6B51F4, $1C6C6162, $856530D8, $F262004E,
+ $6C0695ED, $1B01A57B, $8208F4C1, $F50FC457,
+ $65B0D9C6, $12B7E950, $8BBEB8EA, $FCB9887C,
+ $62DD1DDF, $15DA2D49, $8CD37CF3, $FBD44C65,
+ $4DB26158, $3AB551CE, $A3BC0074, $D4BB30E2,
+ $4ADFA541, $3DD895D7, $A4D1C46D, $D3D6F4FB,
+ $4369E96A, $346ED9FC, $AD678846, $DA60B8D0,
+ $44042D73, $33031DE5, $AA0A4C5F, $DD0D7CC9,
+ $5005713C, $270241AA, $BE0B1010, $C90C2086,
+ $5768B525, $206F85B3, $B966D409, $CE61E49F,
+ $5EDEF90E, $29D9C998, $B0D09822, $C7D7A8B4,
+ $59B33D17, $2EB40D81, $B7BD5C3B, $C0BA6CAD,
+ $EDB88320, $9ABFB3B6, $03B6E20C, $74B1D29A,
+ $EAD54739, $9DD277AF, $04DB2615, $73DC1683,
+ $E3630B12, $94643B84, $0D6D6A3E, $7A6A5AA8,
+ $E40ECF0B, $9309FF9D, $0A00AE27, $7D079EB1,
+ $F00F9344, $8708A3D2, $1E01F268, $6906C2FE,
+ $F762575D, $806567CB, $196C3671, $6E6B06E7,
+ $FED41B76, $89D32BE0, $10DA7A5A, $67DD4ACC,
+ $F9B9DF6F, $8EBEEFF9, $17B7BE43, $60B08ED5,
+ $D6D6A3E8, $A1D1937E, $38D8C2C4, $4FDFF252,
+ $D1BB67F1, $A6BC5767, $3FB506DD, $48B2364B,
+ $D80D2BDA, $AF0A1B4C, $36034AF6, $41047A60,
+ $DF60EFC3, $A867DF55, $316E8EEF, $4669BE79,
+ $CB61B38C, $BC66831A, $256FD2A0, $5268E236,
+ $CC0C7795, $BB0B4703, $220216B9, $5505262F,
+ $C5BA3BBE, $B2BD0B28, $2BB45A92, $5CB36A04,
+ $C2D7FFA7, $B5D0CF31, $2CD99E8B, $5BDEAE1D,
+ $9B64C2B0, $EC63F226, $756AA39C, $026D930A,
+ $9C0906A9, $EB0E363F, $72076785, $05005713,
+ $95BF4A82, $E2B87A14, $7BB12BAE, $0CB61B38,
+ $92D28E9B, $E5D5BE0D, $7CDCEFB7, $0BDBDF21,
+ $86D3D2D4, $F1D4E242, $68DDB3F8, $1FDA836E,
+ $81BE16CD, $F6B9265B, $6FB077E1, $18B74777,
+ $88085AE6, $FF0F6A70, $66063BCA, $11010B5C,
+ $8F659EFF, $F862AE69, $616BFFD3, $166CCF45,
+ $A00AE278, $D70DD2EE, $4E048354, $3903B3C2,
+ $A7672661, $D06016F7, $4969474D, $3E6E77DB,
+ $AED16A4A, $D9D65ADC, $40DF0B66, $37D83BF0,
+ $A9BCAE53, $DEBB9EC5, $47B2CF7F, $30B5FFE9,
+ $BDBDF21C, $CABAC28A, $53B39330, $24B4A3A6,
+ $BAD03605, $CDD70693, $54DE5729, $23D967BF,
+ $B3667A2E, $C4614AB8, $5D681B02, $2A6F2B94,
+ $B40BBE37, $C30C8EA1, $5A05DF1B, $2D02EF8D
+);
+
+function CRC(S : String):LongInt;
+
+implementation
+
+uses Variants, SysUtils, uDAClasses;
+
+{ TDACDSDataTable }
+
+constructor TDACDSDataTable.Create(aOwner: TComponent);
+begin
+ inherited;
+
+ fClientDataset := TClientDataSet(Dataset);
+ fClientDataset.FetchOnDemand := FALSE;
+ fClientDataset.FilterOptions := [foCaseInsensitive];
+end;
+
+procedure TDACDSDataTable.CreateInternalFields(aDataset: TDataset; someFieldDefinitions: TDAFieldCollection);
+begin
+ inherited;
+
+ // Creates the dataset
+ if not MasterLink.Active then begin
+ // This should actually never happen since its mutually exclusive with IndexFieldNames...
+ if (fClientDataset.IndexName<>'') then
+ fClientDataset.IndexName := '';
+ end;
+
+ fClientDataset.CreateDataSet;
+ //fClientDataset.LogChanges := FALSE;
+ { Unfortunately a bug in the CDS provents us to disable the log.
+ Tables with multiple blob fields behave weird and lose data otherwise.
+ The Issue has been reported to Borland. }
+end;
+
+// CRC routine in ASM.
+// NOTE: This routine strips the signed bit from the CRC.
+// Written and posted on Google by Clifford Hammerschmidt
+// http://www.engr.uvic.ca/~chammers/
+// http://www.ultranet.ca/chcc/
+function CRC(S : String):LongInt;
+var
+ Len,crc : LongInt;
+ K : PChar;
+begin
+ Len := Length(S);
+ K := PChar(S);
+ asm
+ mov dword ptr [crc],$ffffffff
+@@2:
+ dec dword ptr [len]
+ cmp dword ptr [len],$FFFFFFFF
+ je @@1
+ mov eax,dword ptr [K]
+ movsx eax,byte ptr [eax]
+ mov ecx,dword ptr [crc]
+ sar ecx,$18
+ xor eax,ecx
+ and eax,$000000ff
+ mov eax,dword ptr [crctable+eax*$4]
+ mov ecx,dword ptr [crc]
+ shl ecx,$08
+ xor eax,ecx
+ mov dword ptr [crc],eax
+ inc dword ptr [K]
+ jmp @@2
+@@1:
+// NOTE: From here on the asm is optional...
+ mov eax,dword ptr [crc]
+ not eax
+// Next line strips signed bit...
+ and eax,$7fffffff
+ mov dword ptr [crc],eax
+ end;
+
+ Result := crc;
+end;
+
+procedure TDACDSDataTable.DoSort(const FieldNames: array of string; const Directions: array of TDASortDirection);
+const
+ DirectionStr: array[TDASortDirection] of string = ('ASC', 'DESC');
+var
+ ascfields, descfields,
+ idxname: string;
+ i: integer;
+ idx: TIndexDef;
+begin
+ with fClientDataset do begin
+ if (Length(FieldNames) = 0) then begin
+ IndexName := '';
+ Exit;
+ end;
+
+ idxname := '';
+ for i := 0 to Length(FieldNames) - 1 do
+ idxname := idxname + FieldNames[i] + '_' + DirectionStr[Directions[i]];
+
+ idxname := 'IDX'+IntToStr(CRC(idxname));
+
+ idx := TDefCollection(IndexDefs).Find(idxname) as TIndexDef;
+ if (idx = nil) then begin
+ ascfields := '';
+ descfields := '';
+
+ for i := 0 to Length(Directions) - 1 do begin
+ ascfields := ascfields + FieldNames[i] + ';'; //<-- IDX.Fields must include ALL Fieldnames
+ if Directions[i] = sdDescending then
+ descfields := descfields + FieldNames[i] + ';';
+ end;
+
+ idx := fClientDataset.IndexDefs.AddIndexDef;
+ idx.Name := idxname;
+ idx.DescFields := descfields;
+ idx.Fields := ascfields;
+ end;
+
+ IndexName := idxname;
+ end;
+end;
+
+function TDACDSDataTable.GetDatasetClass: TDatasetClass;
+begin
+ result := TDAClientDataset;
+end;
+
+function TDACDSDataTable.GetMasterSource: TDADataSource;
+begin
+ result := fMasterSource;
+end;
+
+procedure TDACDSDataTable.DoAfterCloseDataset;
+begin
+ inherited;
+ fClientDataset.Data := Null;
+end;
+
+function TDACDSDataTable.GetFilter: string;
+begin
+ result := fClientDataset.Filter
+end;
+
+//////////////
+procedure TDACDSDataTable.DoBeforeOpenDataset;
+begin
+ inherited;
+
+ // This helps prevending a design time problem which results in DetailFields being reset
+ // whenever something is wrong or the dataset cannot be open properly
+ // Keep in this orders!!!
+
+{ fClientDataset.IndexFieldNames := fDetailFields;
+ fClientDataset.MasterFields := fMasterFields;
+ fClientDataset.MasterSource := fMasterSource;}
+end;
+
+procedure TDACDSDataTable.SetMasterSource(const Value: TDADataSource);
+begin
+ fClientDataset.MasterSource := Value;
+ fMasterSource := Value;
+
+ inherited SetMasterSource(Value);
+end;
+
+procedure TDACDSDataTable.SetMasterFields(const Value: string);
+begin
+ fClientDataset.MasterFields := Value;
+
+ inherited;
+ //fMasterFields := Value;
+end;
+
+procedure TDACDSDataTable.SetDetailsFields(const Value: string);
+begin
+ fClientDataset.IndexFieldNames := Value
+ //fDetailFields := Value;
+end;
+
+function TDACDSDataTable.GetDetailFields: string;
+begin
+ result := fClientDataset.IndexFieldNames
+ //result := fDetailFields
+end;
+
+function TDACDSDataTable.GetMasterFields: string;
+begin
+ result := fClientDataset.MasterFields
+ //result := fMasterFields
+end;
+///////////
+
+function TDACDSDataTable.GetFiltered: boolean;
+begin
+ result := fClientDataset.Filtered
+end;
+
+procedure TDACDSDataTable.SetFilter(const Value: string);
+begin
+ fClientDataset.Filter := Value
+end;
+
+procedure TDACDSDataTable.SetFiltered(const Value: boolean);
+begin
+ fClientDataset.Filtered := Value
+end;
+
+function TDACDSDataTable.GetIndexDefs: TIndexDefs;
+begin
+ result := fClientDataset.IndexDefs
+end;
+
+procedure TDACDSDataTable.SetIndexDefs(const Value: TIndexDefs);
+begin
+ fClientDataset.IndexDefs.Assign(Value);
+end;
+
+function TDACDSDataTable.GetIndexName: string;
+begin
+ result := fClientDataset.IndexName
+end;
+
+procedure TDACDSDataTable.SetIndexName(const Value: string);
+begin
+ fClientDataset.IndexName := Value
+end;
+
+function TDACDSDataTable.GetReadOnly: boolean;
+begin
+ result := fClientDataset.ReadOnly
+end;
+
+procedure TDACDSDataTable.SetReadOnly(const Value: boolean);
+begin
+ fClientDataset.ReadOnly := Value
+end;
+
+procedure TDACDSDataTable.CloneCursor(Source: TDADataTable);
+var i: integer;
+begin
+ if Source = nil then Exception.Create('CloneCursor. Source should be specified.');
+ if not (Source is TDACDSDataTable) then Exception.Create('Can''t clone cursor from ' + Source.ClassName);
+ if Active then raise Exception.Create('Datatable is already open');
+
+ try
+ fCloneSource := Source;
+
+ Fields.Clear;
+ Fields.Assign(Source.Fields);
+
+ // Lookup fields are not cloned by the CDS. We must remove them
+ for i := (Fields.Count-1) downto 0 do
+ if Fields[i].Lookup then Fields.Delete(i);
+
+ // Proceeds
+ fClientDataset.CloneCursor(Source.Dataset as TClientDataset, False);
+
+ RecIDField := fClientDataset.FieldByName(RecIDFieldName) as TIntegerField;
+ RecIDField.Visible := FALSE;
+
+ Fields.Bind(fClientDataset);
+
+ // Prepares the delta
+ Delta := Source.Delta;
+
+ // Finishes to prepare the internal dataset (descendant might need additional customization and might not be open)
+ DoBeforeOpenDataset;
+ if not Dataset.Active then Dataset.Open;
+ DoAfterOpenDataset;
+ except
+ // Restores the previous state
+ fCloneSource := NIL;
+ Delta := NIL;
+
+ raise;
+ end;
+end;
+
+procedure TDACDSDataTable.ApplyRange;
+begin
+ fClientDataset.ApplyRange
+end;
+
+procedure TDACDSDataTable.CancelRange;
+begin
+ fClientDataset.CancelRange
+end;
+
+procedure TDACDSDataTable.EditRangeEnd;
+begin
+ fClientDataset.EditRangeEnd
+end;
+
+procedure TDACDSDataTable.EditRangeStart;
+begin
+ fClientDataset.EditRangeStart
+end;
+
+procedure TDACDSDataTable.SetRange(const StartValues,
+ EndValues: array of const);
+begin
+ fClientDataset.SetRange(StartValues, EndValues);
+end;
+
+procedure TDACDSDataTable.SetRangeEnd;
+begin
+ fClientDataset.SetRangeEnd
+end;
+
+procedure TDACDSDataTable.SetRangeStart;
+begin
+ fClientDataset.SetRangeStart
+end;
+
+procedure TDACDSDataTable.NativeLoadFromFile(const aFileName: string);
+var fs : TFileStream;
+begin
+ fs := TFileStream.Create(aFileName, fmOpenRead+fmShareDenyWrite);
+ try
+ NativeLoadFromStream(fs);
+ finally
+ fs.Free;
+ end;
+end;
+
+procedure TDACDSDataTable.NativeSaveToFile(const aFileName: string;
+ DataFormat: TDANativeDataFormat);
+var fs : TFileStream;
+begin
+ fs := TFileStream.Create(aFileName, fmCreate);
+ try
+ NativeSaveToStream(fs, DataFormat);
+ finally
+ fs.Free;
+ end;
+end;
+
+procedure TDACDSDataTable.NativeLoadFromStream(aStream : TStream);
+var oldrf : boolean;
+ ls : TDASchema;
+begin
+ oldrf := RemoteFetchEnabled;
+ ls := LocalSchema;
+ try
+ RemoteFetchEnabled := FALSE;
+ ls := NIL;
+
+ if not Active then Active := TRUE
+ else if DeltaInitialized then Delta.Clear;
+
+ fClientDataset.LoadFromStream(aStream);
+ finally
+ RemoteFetchEnabled := oldrf;
+ LocalSchema := ls;
+ end;
+end;
+
+procedure TDACDSDataTable.NativeSaveToStream(aStream : TStream;
+ DataFormat: TDANativeDataFormat);
+begin
+ fClientDataset.SaveToStream(aStream, DAFormatToCDSFormat[DataFormat]);
+end;
+
+procedure TDACDSDataTable.DisableConstraints;
+begin
+ fWasReadonly := ReadOnly;
+ ReadOnly := False;
+ fClientDataset.DisableConstraints;
+end;
+
+procedure TDACDSDataTable.EnableConstraints;
+begin
+ fClientDataset.EnableConstraints;
+ ReadOnly := fWasReadonly;
+end;
+
+procedure TDACDSDataTable.FindNearest(const KeyValues: array of const);
+begin
+ fClientDataset.FindNearest(KeyValues);
+end;
+
+
+{ TDAClientdataset }
+
+procedure TDAClientdataset.DataEvent(Event: TDataEvent; Info: Integer);
+begin
+ if FLocateRecordMode and (Event = deCheckBrowseMode) and (Info = 0) and (Self.State = dsBrowse) then
+ // nothing
+ else
+ inherited;
+end;
+
+function TDAClientdataset.GetActive: boolean;
+begin
+ result := inherited Active;
+end;
+
+function TDAClientdataset.GetDataTable: TDADataTable;
+begin
+ result := TDADataTable(Owner);
+end;
+{$IFDEF DELPHI7UP}
+procedure TDAClientdataset.GetFieldNames(List: TStrings);
+var
+ i: Integer;
+begin
+ if (not inherited Active) then
+ begin
+ for i := 0 to TDADataTable(Owner).FieldCount -1 do
+ List.Add(TDADataTable(Owner).Fields[i].Name);
+ exit;
+ end;
+{$IFDEF DELPHI10UP}{$WARN SYMBOL_DEPRECATED OFF}{$ENDIF}
+ inherited GetFieldNames(List);
+{$IFDEF DELPHI10UP}{$WARN SYMBOL_DEPRECATED ON}{$ENDIF}
+end;
+{$ENDIF}
+
+function TDAClientdataset.GetStateFieldValue(State: TDataSetState;
+ Field: TField): Variant;
+begin
+ if (State = dsOldValue) and (Self.State in [dsEdit, dsInsert]) then
+ Result := TDACDSDataTable(Owner).fOldValues[Field.Index]
+ else
+ result := Inherited GetStateFieldValue(State, Field);
+end;
+
+procedure TDAClientdataset.InternalRefresh;
+begin
+ // Does nothing
+end;
+
+function TDAClientdataset.Locate(const KeyFields: string;
+ const KeyValues: Variant; Options: TLocateOptions): Boolean;
+begin
+ FLocateRecordMode:=True;
+ try
+ Result := inherited Locate(KeyFields,KeyValues,Options);
+ finally
+ FLocateRecordMode:= False;
+ end;
+end;
+
+function TDAClientdataset.Lookup(const KeyFields: string;
+ const KeyValues: Variant; const ResultFields: string): Variant;
+begin
+ FLocateRecordMode:=True;
+ try
+ Result := inherited Lookup(KeyFields, KeyValues, ResultFields);
+ finally
+ FLocateRecordMode:= False;
+ end;
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDACache.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDACache.pas
new file mode 100644
index 0000000..6501789
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDACache.pas
@@ -0,0 +1,425 @@
+unit uDACache;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ Classes, SysUtils, SyncObjs,
+ uROClasses, uROTypes, uDAInterfaces;
+
+type
+ { TDACacheElement }
+ TDACacheElementOption = (ceoFlushOnUpdate);
+ TDACacheElementOptions = set of TDACacheElementOption;
+
+ TDACacheElement = class(TCollectionItem)
+ private
+ fEnabled: boolean;
+ fMaxReads: integer;
+ fReferencedDataset: string;
+ fOptions: TDACacheElementOptions;
+ fDuration: integer;
+ procedure SetDuration(const Value: integer);
+ procedure SetMaxReads(const Value: integer);
+
+ protected
+ function GetDisplayName: string; override;
+
+ public
+ constructor Create(aCollection : TCollection); override;
+
+ published
+ property ReferencedDataset : string read fReferencedDataset write fReferencedDataset;
+ property Enabled : boolean read fEnabled write fEnabled;
+ property Options : TDACacheElementOptions read fOptions write fOptions;
+ property MaxReads : integer read fMaxReads write SetMaxReads;
+ property Duration : integer read fDuration write SetDuration;
+ end;
+
+ { TDACacheElementCollection }
+ TDACacheElementCollection = class(TCollection)
+ private
+ function GetItems(Index: integer): TDACacheElement;
+ protected
+ public
+ constructor Create;
+ destructor Destroy; override;
+
+ function Add : TDACacheElement;
+ function FindByDatasetName(aDatasetName : string) : TDACacheElement;
+
+ property Items[Index : integer] : TDACacheElement read GetItems; default;
+ end;
+
+ { IDACacheEntry }
+ IDACacheEntry = interface
+ ['{87F5AFF3-590C-4749-A3D7-BD4F8B2D5166}']
+ function GetInvalid: boolean;
+ function GetData: TStream;
+ function GetExpirationTime: TDateTime;
+ function GetMaxReads: integer;
+ function GetName: string;
+ function GetOwnsStream: boolean;
+ function GetReadCount: integer;
+ function GetRecordCount: integer;
+ procedure SetReadCount(const Value: integer);
+
+ property Name : string read GetName;
+ property Data : TStream read GetData;
+ property ReadCount : integer read GetReadCount write SetReadCount;
+
+ property RecordCount : integer read GetRecordCount;
+
+ property ExpirationTime : TDateTime read GetExpirationTime;
+
+ property MaxReads : integer read GetMaxReads;
+ property OwnsStream : boolean read GetOwnsStream;
+ property Invalid : boolean read GetInvalid;
+ end;
+
+ { TDACacheEntry }
+ TDACacheEntry = class(TInterfacedObject, IDACacheEntry)
+ private
+ fOwnsStream : boolean;
+ fData: TStream;
+ fMaxReads: integer;
+ fReadCount: integer;
+ fName: string;
+ fExpirationTime: TDateTime;
+ fRecordCount: integer;
+
+ protected
+ { IDACacheEntry }
+ function GetInvalid: boolean;
+ function GetData: TStream;
+ function GetExpirationTime: TDateTime;
+ function GetMaxReads: integer;
+ function GetName: string;
+ function GetOwnsStream: boolean;
+ function GetReadCount: integer;
+ function GetRecordCount: integer;
+ procedure SetReadCount(const Value: integer);
+
+ public
+ constructor Create(const aName : string; aData : TStream; aRecordCount : integer;
+ aOwnsStream : boolean; aMaxReads : integer = -1; aDuration : integer = -1);
+ destructor Destroy; override;
+ end;
+
+ { TDACache }
+ TDACache = class(TComponent)
+ private
+ fTimer : TROThreadTimer;
+ fEntries : TInterfaceList;
+ fCritical : TCriticalSection;
+
+ function GetEntries(Index: integer): IDACacheEntry;
+ function GetEntryCount: integer;
+
+ protected
+ procedure OnTimerTick(CurrentTickCount : cardinal);
+
+ public
+ constructor Create(aOwner : TComponent); override;
+ destructor Destroy; override;
+
+ procedure Store(const anEntryName : string; Data : TStream;
+ CopyStream : boolean; RecordCount : integer = -1;
+ MaxReads : integer = -1; Duration : integer = -1);
+ function Get(const anEntryName : string) : IDACacheEntry;
+ procedure Flush(const anEntryName : string);
+
+ function Find(const anEntryName : string) : integer;
+
+ property Entries[Index : integer] : IDACacheEntry read GetEntries;
+ property EntryCount : integer read GetEntryCount;
+
+ end;
+
+implementation
+
+uses
+ DateUtils;
+
+{ TDACacheElementCollection }
+
+function TDACacheElementCollection.Add: TDACacheElement;
+begin
+ result := TDACacheElement(inherited Add);
+end;
+
+constructor TDACacheElementCollection.Create;
+begin
+ inherited Create(TDACacheElement);
+end;
+
+destructor TDACacheElementCollection.Destroy;
+begin
+
+ inherited;
+end;
+
+function TDACacheElementCollection.FindByDatasetName(
+ aDatasetName: string): TDACacheElement;
+var i : integer;
+begin
+ result := NIL;
+
+ for i := 0 to (Count-1) do
+ if SameText(Items[i].ReferencedDataset, aDatasetName) then begin
+ result := Items[i];
+ Exit;
+ end;
+end;
+
+function TDACacheElementCollection.GetItems(
+ Index: integer): TDACacheElement;
+begin
+ result := TDACacheElement(inherited Items[Index]);
+end;
+
+{ TDACacheElement }
+
+constructor TDACacheElement.Create(aCollection: TCollection);
+begin
+ inherited;
+
+ fEnabled := TRUE;
+ fMaxReads := -1;
+ fDuration := -1;
+ fOptions := [ceoFlushOnUpdate];
+end;
+
+function TDACacheElement.GetDisplayName: string;
+begin
+ if fReferencedDataset<>''
+ then result := fReferencedDataset
+ else result := ''
+end;
+
+procedure TDACacheElement.SetDuration(const Value: integer);
+begin
+ if (Value=-1) or (Value>0)
+ then fDuration := Value;
+end;
+
+procedure TDACacheElement.SetMaxReads(const Value: integer);
+begin
+ if (Value=-1) or (Value>0)
+ then fMaxReads := Value;
+end;
+
+{ TDACache }
+
+constructor TDACache.Create(aOwner: TComponent);
+begin
+ inherited;
+
+ fTimer := TROThreadTimer.Create(OnTimerTick, 60); // Checks every minute
+
+ fCritical := TCriticalSection.Create;
+ fEntries := TInterfaceList.Create;
+end;
+
+destructor TDACache.Destroy;
+begin
+ fTimer.Terminate;
+ fTimer.Free;
+
+ fEntries.Free;
+ fCritical.Free;
+
+ inherited;
+end;
+
+function TDACache.Find(const anEntryName: string): integer;
+var i : integer;
+begin
+ result := -1;
+ for i := 0 to (fEntries.Count-1) do
+ if SameText(Entries[i].Name, anEntryName) then begin
+ result := i;
+ Exit;
+ end;
+end;
+
+procedure TDACache.Flush(const anEntryName: string);
+var idx : integer;
+begin
+ fCritical.Enter;
+ try
+ idx := Find(anEntryName);
+ if (idx>=0)
+ then fEntries.Delete(idx);
+ finally
+ fCritical.Leave;
+ end;
+end;
+
+function TDACache.Get(const anEntryName: string): IDACacheEntry;
+var idx : integer;
+begin
+ result := NIL;
+ fCritical.Enter;
+ try
+ idx := Find(anEntryName);
+ if (idx>=0) then begin
+ result := Entries[idx];
+
+ if result.Invalid then begin
+ result := NIL;
+ fEntries.Delete(idx);
+ Exit;
+ end
+ else begin
+ result.ReadCount := result.ReadCount+1;
+ end;
+ end;
+ finally
+ fCritical.Leave;
+ end;
+end;
+
+function TDACache.GetEntries(Index: integer): IDACacheEntry;
+begin
+ result := fEntries[Index] as IDACacheEntry;
+end;
+
+function TDACache.GetEntryCount: integer;
+begin
+ result := fEntries.Count;
+end;
+
+procedure TDACache.OnTimerTick(CurrentTickCount: cardinal);
+var i : integer;
+begin
+ fCritical.Enter;
+ try
+ for i := fEntries.Count-1 downto 0 do begin
+ if Entries[i].Invalid
+ then fEntries.Delete(i);
+ end;
+ finally
+ fCritical.Leave;
+ end;
+end;
+
+procedure TDACache.Store(const anEntryName: string; Data: TStream; CopyStream : boolean;
+ RecordCount, MaxReads, Duration: integer);
+var entry : TDACacheEntry;
+ nme : string;
+ idx : integer;
+ newstream : Binary;
+begin
+ nme := UpperCase(anEntryName);
+
+ fCritical.Enter;
+ try
+ idx := Find(nme);
+
+ if (idx<0) then begin
+ if CopyStream then begin
+ newstream := Binary.Create;
+ newstream.CopyFrom(Data, 0);
+ entry := TDACacheEntry.Create(nme, newstream, RecordCount, TRUE, MaxReads, Duration);
+ end
+ else entry := TDACacheEntry.Create(nme, Data, RecordCount, FALSE, MaxReads, Duration);
+
+ fEntries.Add(entry);
+ end
+ else raise Exception.Create('Duplicated name '+anEntryName);
+ finally
+ fCritical.Leave;
+ end;
+end;
+
+{ TDACacheEntry }
+
+constructor TDACacheEntry.Create(const aName : string; aData : TStream; aRecordCount : integer;
+ aOwnsStream : boolean; aMaxReads : integer = -1; aDuration : integer = -1);
+begin
+ inherited Create;
+
+ fName := aName;
+ fData := aData;
+ fRecordCount := aRecordCount;
+
+ if (aDuration>0)
+ then fExpirationTime := IncMinute(Now, aDuration)
+ else fExpirationTime := -1;
+
+ fReadCount := 0;
+ fMaxReads := aMaxReads;
+end;
+
+destructor TDACacheEntry.Destroy;
+begin
+ if fOwnsStream
+ then fData.Free;
+
+ inherited;
+end;
+
+function TDACacheEntry.GetData: TStream;
+begin
+ result := fData;
+ //Inc(fReadCount);
+end;
+
+function TDACacheEntry.GetExpirationTime: TDateTime;
+begin
+ result := fExpirationTime
+end;
+
+function TDACacheEntry.GetInvalid: boolean;
+begin
+ result := ((fMaxReads<>-1) and (fReadCount>=fMaxReads))
+ or
+ ((fExpirationTime<>-1) and (fExpirationTime<=Now));
+end;
+
+function TDACacheEntry.GetMaxReads: integer;
+begin
+ result := fMaxReads
+end;
+
+function TDACacheEntry.GetName: string;
+begin
+ result := fName
+end;
+
+function TDACacheEntry.GetOwnsStream: boolean;
+begin
+ result := fOwnsStream
+end;
+
+function TDACacheEntry.GetReadCount: integer;
+begin
+ result := fReadCount
+end;
+
+function TDACacheEntry.GetRecordCount: integer;
+begin
+ result := fRecordCount
+end;
+
+procedure TDACacheEntry.SetReadCount(const Value: integer);
+begin
+ if (Value>=0)
+ then fReadCount := Value
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDAClasses.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAClasses.pas
new file mode 100644
index 0000000..4a6ba29
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAClasses.pas
@@ -0,0 +1,1618 @@
+unit uDAClasses;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ {$IFDEF MSWINDOWS} Windows,{$ENDIF}
+ Classes, SysUtils, uROClasses, uDAInterfaces, uDARes, uROTypes,
+ uDADriverManager, uDAXMLUtils, SyncObjs, uROXMLIntf;
+
+type
+ TDAPoolBehaviour = (pbWait, pbRaiseError, pbIgnoreAndReturn);
+ TDAPoolTransactionBehaviour = (ptNone, ptRollback, ptCommit, ptCustom);
+
+const
+ def_PoolingEnabled = TRUE;
+ def_PoolBehaviour = pbWait;
+ def_MaxPoolSize = 10;
+ def_WaitIntervalSeconds = 1;
+ def_PoolTimeoutSeconds = 60;
+
+ def_SourceTableFieldName = '@SourceTable';
+
+type
+ { Forwards }
+ TDAConnectionManager = class;
+ TDADataDictionary = class;
+
+ { TStreamableComponent }
+ TPointerArray = array of pointer;
+
+ TDAStreamableComponent = class(TComponent)
+ private
+ fTempPropertiesSaved: boolean;
+ fTempStorage: TPointerArray;
+
+ protected
+ procedure SaveNonStreamableProperties(var TempStorage: TPointerArray); virtual;
+ procedure RestoreNonStreamableProperties(const TempStorage: TPointerArray); virtual;
+
+ public
+ procedure Clear; virtual;
+
+ procedure LoadFromStream(aStream: TStream; aFormat: TDAPersistFormat=pfXML); virtual;
+ procedure LoadFromXml(aXML: string);
+ procedure SaveToStream(aStream: TStream; aFormat: TDAPersistFormat=pfXML); virtual;
+ procedure LoadFromFile(const aFileName: string; aFormat: TDAPersistFormat=pfXML);
+ procedure SaveToFile(const aFileName: string; aFormat: TDAPersistFormat=pfXML);
+ end;
+
+ { TDAConnectionManager }
+ TDAConnectionNotifyEvent = procedure(Sender: TDAConnectionManager; const Connection: IDAConnection) of object;
+ TDAConnectionFailureEvent = procedure(Sender: TDAConnectionManager; Ex: Exception) of object;
+ TDAConnectionTimeoutEvent = procedure(Sender: TDAConnectionManager) of object;
+ TDAUnknownMacroVariableEvent = procedure (Sender: TObject; const Name: string; var Value: string) of object;
+
+ TDAConnectionManager = class(TDAStreamableComponent, IDAConnectionManager, IDAConnectionPool)
+ private
+ fConnections: TDAConnectionCollection;
+ fDriverManager: TDADriverManager;
+ fConnectionWait: TROEvent;
+
+ fMaxPoolSize: Cardinal;
+ fTotalConnections: Integer;
+ fConnectionCache: TThreadList;
+ fPoolTimeoutSeconds: cardinal;
+ fTimer: TROThreadTimer;
+ fOnConnectionReleased: TDAConnectionNotifyEvent;
+ fOnConnectionTimedOut: TDAConnectionTimeoutEvent;
+ fPoolBehaviour: TDAPoolBehaviour;
+ fOnConnectionAcquired: TDAConnectionNotifyEvent;
+ fWaitIntervalSeconds: cardinal;
+ fPoolingEnabled: boolean;
+ fOnConnectionCreated: TDAConnectionNotifyEvent;
+ FOnConnectionFailure: TDAConnectionFailureEvent;
+ fPoolTransactionBehaviour: TDAPoolTransactionBehaviour;
+ fOnUnknownMacroVariable: TDAUnknownMacroVariableEvent;
+ fOnCustomPoolTransactionBehavior: TDAConnectionNotifyEvent;
+
+ procedure SetMaxPoolSize(const Value: cardinal);
+ procedure SetPoolTimeoutSeconds(const Value: cardinal);
+
+ procedure SetConnections(const Value: TDAConnectionCollection);
+ procedure SetDriverManager(const Value: TDADriverManager);
+ procedure SetPoolingEnabled(const Value: boolean);
+ function UnknownMacroIdentifier(Sender: TObject; const Name, OrgName: string; var Value: string): Boolean;
+ protected
+ procedure Loaded; override;
+ procedure OnTimerTick(CurrentTickCount: cardinal); dynamic;
+
+ function CreateNewConnection(const ConnectionName: string;
+ OpenConnection: boolean = TRUE;
+ const UserID: string = '';
+ const Password: string = ''): IDAConnection;
+
+ procedure Notification(AComponent: TComponent; Operation: TOperation); override;
+ procedure SaveNonStreamableProperties(var TempStorage: TPointerArray); override;
+ procedure RestoreNonStreamableProperties(const TempStorage: TPointerArray); override;
+
+ procedure ReleaseConnection(const Conn: IDAConnection);
+ public
+ constructor Create(aOwner: TComponent); override;
+ destructor Destroy; override;
+
+ procedure LoadFromStream(aStream: TStream; aFormat: TDAPersistFormat=pfXML); override;
+ procedure SaveToStream(aStream: TStream; aFormat: TDAPersistFormat=pfXML); override;
+
+ // IDAConnectionManager
+ function GetDefaultConnectionName: string;
+ function NewConnection(const aConnectionName: string;
+ OpenConnection: boolean = TRUE;
+ const UserID: string = '';
+ const Password: string = ''): IDAConnection;
+
+ procedure Clear; override;
+
+ property PoolSize: Integer read fTotalConnections;
+ procedure ClearPool;
+ procedure CheckProperties;
+ published
+ property MaxPoolSize: cardinal read fMaxPoolSize write SetMaxPoolSize default def_MaxPoolSize;
+ property PoolTimeoutSeconds: cardinal read fPoolTimeoutSeconds write SetPoolTimeoutSeconds default def_PoolTimeoutSeconds;
+ property PoolBehaviour: TDAPoolBehaviour read fPoolBehaviour write fPoolBehaviour default def_PoolBehaviour;
+
+ property OnConnectionAcquired: TDAConnectionNotifyEvent read fOnConnectionAcquired write fOnConnectionAcquired;
+ property OnConnectionTimedOut: TDAConnectionTimeoutEvent read fOnConnectionTimedOut write fOnConnectionTimedOut;
+ property OnConnectionCreated: TDAConnectionNotifyEvent read fOnConnectionCreated write fOnConnectionCreated;
+ property OnConnectionFailure: TDAConnectionFailureEvent read FOnConnectionFailure write FOnConnectionFailure;
+ property OnConnectionReleased: TDAConnectionNotifyEvent read fOnConnectionReleased write fOnConnectionReleased;
+ property OnCustomPoolTransactionBehavior: TDAConnectionNotifyEvent read fOnCustomPoolTransactionBehavior write fOnCustomPoolTransactionBehavior;
+ property OnUnknownMacroVariable: TDAUnknownMacroVariableEvent read fOnUnknownMacroVariable write fOnUnknownMacroVariable;
+
+ property WaitIntervalSeconds: cardinal read fWaitIntervalSeconds write fWaitIntervalSeconds default def_WaitIntervalSeconds;
+
+ property Connections: TDAConnectionCollection read fConnections write SetConnections;
+ property DriverManager: TDADriverManager read fDriverManager write SetDriverManager;
+
+ property PoolingEnabled: boolean read fPoolingEnabled write SetPoolingEnabled;
+ property PoolTransactionBehaviour: TDAPoolTransactionBehaviour read fPoolTransactionBehaviour write fPoolTransactionBehaviour default ptNone;
+ end;
+
+ { TDADataDictionary }
+ TDADataDictionary = class(TDAStreamableComponent, IDADataDictionary)
+ private
+ fFields: TDADataDictionaryFieldCollection;
+ procedure SetFields(const Value: TDADataDictionaryFieldCollection);
+ function GetFields: TDADataDictionaryFieldCollection;
+ protected
+ procedure SaveNonStreamableProperties(var TempStorage: TPointerArray); override;
+ procedure RestoreNonStreamableProperties(const TempStorage: TPointerArray); override;
+ public
+ constructor Create(aOwner: TComponent); override;
+ destructor Destroy; override;
+ published
+ property Fields: TDADataDictionaryFieldCollection read GetFields write SetFields;
+ end;
+
+ TDADiagrams = class(TComponent)
+ private
+ fDiagramData: string;
+ procedure ReadDiagramData(Reader: TReader);
+ procedure WriteDiagramData(Writer: TWriter);
+ protected
+ procedure DefineProperties(Filer: TFiler); override;
+ public
+ procedure LoadFromFile(const aFilename: string);
+ procedure SaveToFile(const aFilename: string);
+ end;
+
+ { TDASchema }
+ TDASchema = class;
+
+ TDASchemaElementType = (setDataset, setCommand);
+ TDAOnGetSQLEvent = procedure(Sender : TDASchema; const ElementName : string; ElementType : TDASchemaElementType; var SQL : string) of object;
+
+ TDASchema = class(TDAStreamableComponent, IDASchema, IDAHasDataDictionary)
+ private
+ fDatasets: TDADatasetCollection;
+ fJoinDataTables: TDAJoinDataTableCollection;
+ fUnionDataTables: TDAUnionDataTableCollection;
+ fCommands: TDASQLCommandCollection;
+ fConnectionManager: TDAConnectionManager;
+ fDataDictionary: TDADataDictionary;
+ fOnGetSQL: TDAOnGetSQLEvent;
+ fUpdateRules: TDAUpdateRuleCollection;
+ fRelationShips: TDADatasetRelationshipCollection;
+ fDiagrams: TDADiagrams;
+ fCustomAttributes: TStrings;
+ fVersion: Integer;
+ fMergeDataDictionaries: Boolean;
+
+ procedure SetConnectionManager(const Value: TDAConnectionManager);
+ procedure SetDataDictionary(const Value: TDADataDictionary);
+ procedure SetUpdateRules(const Value: TDAUpdateRuleCollection);
+ procedure SetRelationShips(const Value: TDADatasetRelationshipCollection);
+ procedure SetDiagrams(const Value: TDADiagrams);
+
+ function DoNewDataset(
+ const aConnection: IDAConnection;
+ const aName: string;
+ aDynSelectFields: array of string;
+ aWhereClause: WideString;
+ aStatementName: string='';
+ OpenIt: boolean = false;
+ AlwaysGenerateDynamicWhereStatement: Boolean=False;
+ anUnionMapping: TDAColumnMappingCollection = nil
+ ): IDADataset;
+
+
+ protected
+ function GetDataDictionary: IDADataDictionary;
+ function MergeDataDictionaries: Boolean;
+ function GetCommands: TDASQLCommandCollection; virtual;
+ function GetDatasets: TDADatasetCollection; virtual;
+ function GetJoinDataTables: TDAJoinDataTableCollection; virtual;
+ function GetUnionDataTables: TDAUnionDataTableCollection; virtual;
+ procedure SetCommands(const Value: TDASQLCommandCollection); virtual;
+ procedure SetDatasets(const Value: TDADatasetCollection); virtual;
+ procedure SetJoinDataTables(const Value: TDAJoinDataTableCollection); virtual;
+ procedure SetUnionDataTables(const Value: TDAUnionDataTableCollection); virtual;
+
+ procedure Notification(aComponent: TComponent; Operation: TOperation); override;
+ procedure Loaded; override;
+
+ procedure SaveNonStreamableProperties(var TempStorage: TPointerArray); override;
+ procedure RestoreNonStreamableProperties(const TempStorage: TPointerArray); override;
+
+ public
+ constructor Create(aOwner: TComponent); override;
+ destructor Destroy; override;
+
+ function FindCommandStatement(const aConnection: IDAConnection; aSQLCommand: TDASQLCommand; aStatementName: string=''): TDAStatement;
+ // IDASchema
+ function GetDatasetText(const aConnection: IDAConnection; const aName: string): string; virtual;
+ function GetCommandText(const aConnection: IDAConnection; const aName: string): string; virtual;
+
+ function NewDataset(const aConnection: IDAConnection; const aName: string;
+ aStatementName: string='';OpenIt: boolean = false): IDADataset; overload; virtual;
+ function NewDataset(const aConnection: IDAConnection; const aName: string;
+ const ParamNames: array of string;
+ const ParamValues: array of Variant;
+ OpenIt: boolean = TRUE;
+ aStatementName: string=''): IDADataset; overload;
+ function NewDataset(const aConnection: IDAConnection; const aName: string;
+ aDynSelectFields: array of string;
+ aWhereClause: WideString;
+ aStatementName: string='';
+ OpenIt: boolean = false;
+ AlwaysGenerateDynamicWhereStatement: Boolean=False): IDADataset; overload;
+ function NewDataset(
+ const aConnection: IDAConnection;
+ const aName: string;
+ const ParamNames: array of string;
+ const ParamValues: array of Variant;
+ aDynSelectFields: array of string;
+ aWhereClause: WideString;
+ OpenIt: boolean = TRUE;
+ aStatementName: string=''): IDADataset; overload;
+
+ function NewUnionItemDataset(
+ const aConnection: IDAConnection;
+ const aName: string;
+ const ParamNames: array of string;
+ const ParamValues: array of Variant;
+ aDynSelectFields: array of string;
+ aWhereClause: WideString;
+ anUnionMapping: TDAColumnMappingCollection): IDADataset;
+
+ function NewCommand(const aConnection: IDAConnection; const aName: string;
+ aStatementName: string=''): IDASQLCommand; overload; virtual;
+ function NewCommand(const aConnection: IDAConnection; const aName: string;
+ const ParamNames: array of string;
+ const ParamValues: array of Variant;
+ ExecuteIt: boolean = TRUE; aStatementName: string=''): IDASQLCommand; overload;
+
+ procedure Clear; override;
+
+ procedure Copy(aSourceSchema : TDASchema;
+ DatasetNames : array of string;
+ CommandNames : array of string;
+ UpdateRuleNames : array of string;
+ RelationShipNames : array of string); overload;
+
+ procedure Copy(aSourceSchema : TDASchema;
+ IncludeDatasets : boolean = TRUE;
+ IncludeCommands : boolean = TRUE;
+ IncludeUpdateRules : boolean = TRUE;
+ IncludeRelationShips : boolean = TRUE); overload;
+ procedure CheckProperties;
+ function FindDataset(aDatasetName: String): TDADataset;
+ procedure SaveToStream(aStream: TStream;
+ aFormat: TDAPersistFormat = pfXML); override;
+ published
+ property ConnectionManager: TDAConnectionManager read fConnectionManager write SetConnectionManager;
+ property DataDictionary: TDADataDictionary read fDataDictionary write SetDataDictionary;
+ property Diagrams: TDADiagrams read fDiagrams write SetDiagrams;
+ property Datasets: TDADatasetCollection read GetDatasets write SetDatasets;
+ property JoinDataTables: TDAJoinDataTableCollection read GetJoinDataTables write SetJoinDataTables;
+ property UnionDataTables: TDAUnionDataTableCollection read GetUnionDataTables write SetUnionDataTables;
+ property Commands: TDASQLCommandCollection read GetCommands write SetCommands;
+ property RelationShips: TDADatasetRelationshipCollection read fRelationShips write SetRelationShips;
+ property UpdateRules : TDAUpdateRuleCollection read fUpdateRules write SetUpdateRules;
+
+ property OnGetSQL : TDAOnGetSQLEvent read fOnGetSQL write fOnGetSQL;
+ property Version : Integer read fVersion write fVersion;
+ property CustomAttributes : TStrings read fCustomAttributes;
+ end;
+
+procedure FillROStruct(const aDataset: IDADataset; const aStruct: TROComplexType);
+
+implementation
+
+uses TypInfo, uDAEngine, uDAUtils, DB, uDAMemDataTable, uDAWhere;
+
+procedure FillROStruct(const aDataset: IDADataset; const aStruct: TROComplexType);
+var
+ proplist: TStringList;
+ i: integer;
+ fld: TDACustomField;
+begin
+ proplist := TStringList.Create;
+ try
+ aStruct.GetFieldNames(proplist);
+ for i := 0 to (proplist.Count - 1) do begin
+ fld := aDataset.Fields.FindField(proplist[i]);
+ if (fld <> nil) then aStruct.SetFieldValue(proplist[i], fld.Value);
+ end;
+ finally
+ proplist.Free;
+ end;
+end;
+
+{ TDAStreamableComponent }
+
+procedure TDAStreamableComponent.LoadFromStream(aStream: TStream; aFormat: TDAPersistFormat);
+var
+ oldname: string;
+begin
+ Clear;
+
+ oldname := Name;
+ try Name := ''; except end;
+ try
+ case aFormat of
+ pfBinary: aStream.ReadComponent(Self);
+ pfXML: LoadObjectFromStream(aStream, Self, ['Name']);
+ end;
+
+ if fTempPropertiesSaved then begin
+ RestoreNonStreamableProperties(fTempStorage);
+ SetLength(fTempStorage, 0);
+ end;
+ finally
+ fTempPropertiesSaved := FALSE;
+ try Name := oldname; except end;
+ end;
+end;
+
+procedure TDAStreamableComponent.LoadFromXml(aXML: string);
+var lStream:TStringStream;
+begin
+ lStream := TStringStream.Create(aXML);
+ try
+ lStream.Seek(0,soFromBeginning);
+ LoadFromStream(lStream,pfXML);
+ finally
+ lStream.Free();
+ end;
+end;
+
+procedure TDAStreamableComponent.SaveToStream(aStream: TStream; aFormat: TDAPersistFormat);
+var
+ oldname: string;
+begin
+ fTempPropertiesSaved := TRUE;
+
+ oldname := Name;
+ //Name := '';
+ try
+ try
+ SaveNonStreamableProperties(fTempStorage);
+
+ case aFormat of
+ pfBinary: aStream.WriteComponent(Self);
+ pfXML: SaveObjectToStream(Self, aStream, ['Name']);
+ end;
+ finally
+ Name := oldname;
+ end;
+ except
+ fTempPropertiesSaved := FALSE;
+ raise;
+ end;
+end;
+
+procedure TDAStreamableComponent.SaveToFile(const aFileName: string;
+ aFormat: TDAPersistFormat);
+var
+ fs: TFileStream;
+begin
+ fs := TFileStream.Create(aFileName, fmCreate);
+ try
+ SaveToStream(fs, aFormat);
+ finally
+ fs.Free;
+ end;
+end;
+
+procedure TDAStreamableComponent.LoadFromFile(const aFileName: string;
+ aFormat: TDAPersistFormat);
+var
+ fs: TFileStream;
+begin
+ fs := TFileStream.Create(aFileName, fmOpenRead);
+ try
+ LoadFromStream(fs, aFormat);
+ finally
+ fs.Free;
+ end;
+end;
+
+procedure TDAStreamableComponent.RestoreNonStreamableProperties(
+ const TempStorage: TPointerArray);
+begin
+end;
+
+procedure TDAStreamableComponent.SaveNonStreamableProperties(
+ var TempStorage: TPointerArray);
+begin
+
+end;
+
+procedure TDAStreamableComponent.Clear;
+begin
+end;
+
+type
+ TCachedConnection = class
+ private
+ fConnection: IDAConnection;
+ fLastUse: TDateTime;
+ public
+ constructor Create(const aConnection: IDAConnection);
+ property Connection: IDAConnection read fConnection write fConnection;
+ property LastUse: TDateTime read fLastUse write fLastUse;
+ end;
+
+constructor TCachedConnection.Create(const aConnection: IDAConnection);
+begin
+ inherited Create;
+ fConnection := aConnection;
+ fLastUse := Now;
+end;
+
+{ TDAConnectionManager }
+
+constructor TDAConnectionManager.Create(aOwner: TComponent);
+begin
+ inherited;
+ fConnectionWait := TROEvent.Create(nil, false, false, '');
+
+ fConnections := TDAConnectionCollection.Create(Self);
+
+ fPoolingEnabled := def_PoolingEnabled;
+ fPoolBehaviour := def_PoolBehaviour;
+ fMaxPoolSize := def_MaxPoolSize;
+ fWaitIntervalSeconds := def_WaitIntervalSeconds;
+ fPoolTimeoutSeconds := def_PoolTimeoutSeconds;
+
+ fConnectionCache := TThreadList.Create;
+end;
+
+destructor TDAConnectionManager.Destroy;
+begin
+ DriverManager := nil;
+
+ fConnections.Free;
+ ClearPool;
+ fConnectionCache.Free;
+
+ fTimer.Free;
+ fConnectionWait.Free;
+ inherited;
+end;
+
+procedure TDAConnectionManager.SetConnections(const Value: TDAConnectionCollection);
+begin
+ fConnections.Assign(Value);
+end;
+
+function TDAConnectionManager.CreateNewConnection(const ConnectionName: string;
+ OpenConnection: boolean = TRUE;
+ const UserID: string = '';
+ const Password: string = ''): IDAConnection;
+var
+ conndef: TDAConnection;
+ drv: IDADriver;
+ mac: IDAHasMacroProcessor;
+ drvid: string;
+begin
+ CheckProperties;
+
+ conndef := Connections.ItemByName(ConnectionName) as TDAConnection; // Raises exception if not found
+ drvid := TDAConnectionStringParser.ExtractDriverID(conndef.ConnectionString);
+
+ drv := fDriverManager.DriverByDriverID(drvid); // Raises exception if not found
+ result := drv.NewConnection(self, conndef);
+
+ // If not empty strings, these will override any specific UserID, Password specified below
+ result.ConnectionString := conndef.ConnectionString;
+
+ if (UserID <> '') then result.UserID := UserID;
+ if (Password <> '') then result.Password := Password;
+
+ if OpenConnection then result.Open;
+
+ if Assigned(fOnConnectionCreated) then fOnConnectionCreated(Self, result);
+ if Supports(Result, IDAHasMacroProcessor, mac) and (mac.GetMacroProcessor <> nil) then begin
+ mac.GetMacroProcessor.OnUnknownIdentifier := UnknownMacroIdentifier;
+ end;
+end;
+
+procedure TDAConnectionManager.SetDriverManager(const Value: TDADriverManager);
+begin
+ fDriverManager := Value;
+ ClearPool();
+ if (fDriverManager <> nil) then fDriverManager.FreeNotification(Self);
+end;
+
+procedure TDAConnectionManager.Notification(AComponent: TComponent;
+ Operation: TOperation);
+begin
+ inherited;
+
+ if (Operation <> opRemove) then Exit;
+ if (AComponent = fDriverManager) then DriverManager := nil;
+end;
+
+procedure TDAConnectionManager.RestoreNonStreamableProperties(
+ const TempStorage: TPointerArray);
+begin
+ DriverManager := TempStorage[0];
+end;
+
+procedure TDAConnectionManager.SaveNonStreamableProperties(
+ var TempStorage: TPointerArray);
+begin
+ SetLength(TempStorage, 1);
+ TempStorage[0] := DriverManager;
+end;
+
+function TDAConnectionManager.GetDefaultConnectionName: string;
+var
+ i: integer;
+begin
+ result := '';
+ for i := 0 to (fConnections.Count - 1) do
+ if Connections[i].Default then begin
+ result := Connections[i].Name;
+ Exit;
+ end;
+end;
+
+procedure TDAConnectionManager.Clear;
+begin
+ fConnections.Clear;
+end;
+
+procedure TDAConnectionManager.SetMaxPoolSize(const Value: cardinal);
+begin
+ fMaxPoolSize := Value;
+end;
+
+procedure TDAConnectionManager.SetPoolTimeoutSeconds(const Value: cardinal);
+begin
+ if (fPoolTimeoutSeconds = Value) and (fTimer <> nil) then Exit;
+ fPoolTimeoutSeconds := Value;
+
+ if not (csDesigning in ComponentState) then begin
+ if (PoolSize > 0) then RaiseError(err_PoolIsNotEmpty);
+
+ if Assigned(fTimer) then begin
+ fTimer.Free;
+ fTimer := nil;
+ end;
+
+ if (fPoolTimeoutSeconds > 0) then fTimer := TROThreadTimer.Create(OnTimerTick, fPoolTimeoutSeconds * 500);
+ end;
+end;
+
+procedure TDAConnectionManager.OnTimerTick(CurrentTickCount: cardinal);
+var
+ i: integer;
+ tempconn: TCachedConnection;
+ list: TList;
+begin
+ list := fConnectionCache.LockList;
+ try
+ for i := list.Count - 1 downto 0 do
+ begin
+ tempconn := TCachedConnection(list[i]);
+ if tempconn.LastUse + (fPoolTimeoutSeconds / 86400.0) < Now then begin
+ if Assigned(fOnConnectionTimedOut) then fOnConnectionTimedOut(Self);
+ list.Delete(i);
+ tempconn.Connection.ConnectionPool := nil;
+ tempconn.Free;
+ dec(fTotalConnections);
+ end;
+ end;
+ finally
+ fConnectionCache.UnlockList;
+ end;
+end;
+
+function TDAConnectionManager.NewConnection(const aConnectionName: string;
+ OpenConnection: boolean = TRUE; const UserID: string = ''; const Password: string = ''): IDAConnection;
+var
+ i: integer;
+ conn: TDAConnection;
+ list: TList;
+ tempconn: TCachedConnection;
+begin
+ try
+ // If pooling is not enable immediately creates a connection.
+ // This is the quickest way to Acquire one
+ if not fPoolingEnabled then begin
+ result := CreateNewConnection(aConnectionName, OpenConnection, UserID, Password);
+ if Assigned(fOnConnectionAcquired) then fOnConnectionAcquired(Self, result);
+ Exit;
+ end;
+
+ // Pooling is enabled and has to be thread safe
+ result := nil;
+ conn := fConnections.ConnectionByName(aConnectionName);
+ while true do begin
+ list := fConnectionCache.LockList;
+ try
+ for i := list.Count -1 downto 0 do begin
+ tempconn := TCachedConnection(list[i]);
+ if not tempconn.Connection.IsAlive then begin
+ tempconn.Connection:=nil;
+ list.Delete(i);
+ end;
+ end;
+ for i := 0 to list.Count -1 do begin
+ tempconn := TCachedConnection(list[i]);
+
+ if SameText(tempconn.Connection.ConnectionString, conn.ConnectionString) and
+ SameText(tempconn.Connection.ConnectionType, conn.ConnectionType) then begin
+ list.Delete(i);
+ Result := tempconn.Connection;
+ tempconn.Free;
+ if Assigned(fOnConnectionAcquired) then fOnConnectionAcquired(Self, result);
+ Exit;
+ end;
+ end;
+
+ // If it doesn't find one and the max poolsize is not reached then creates it...
+ if Cardinal(fTotalConnections) < fMaxPoolSize then begin
+ result := CreateNewConnection(aConnectionName, OpenConnection, UserID, Password);
+ result.ConnectionPool := self;
+ inc(fTotalConnections);
+ if Assigned(fOnConnectionAcquired) then fOnConnectionAcquired(Self, result);
+ Exit;
+ end;
+
+ finally
+ fConnectionCache.UnlockList;
+ end;
+ // Otherwise either waits and tries again or raises an error
+ case PoolBehaviour of
+ pbRaiseError: RaiseError(err_MaxPoolSizeReached);
+ pbWait: begin
+ if fConnectionWait.WaitFor(1000 * fWaitIntervalSeconds) <> wrSignaled then
+ RaiseError(err_MaxPoolSizeReached);
+ end;
+ pbIgnoreAndReturn: Exit;
+ end;
+ end;
+ except
+ on e: Exception do begin
+ if assigned(FOnConnectionFailure) then FOnConnectionFailure(self, E);
+ raise;
+ end;
+ end;
+end;
+
+procedure TDAConnectionManager.ReleaseConnection(const Conn: IDAConnection);
+var
+ list: TList;
+begin
+ case fPoolTransactionBehaviour of
+ ptRollback: if Conn.InTransaction then Conn.RollbackTransaction;
+ ptCommit: if Conn.InTransaction then Conn.CommitTransaction;
+ ptCustom: if Conn.InTransaction and assigned(fOnCustomPoolTransactionBehavior) then
+ fOnCustomPoolTransactionBehavior(Self, Conn);
+ end;
+ if assigned(fOnConnectionReleased) then
+ fOnConnectionReleased(Self, Conn);
+ if fPoolingEnabled then begin
+ list := fConnectionCache.LockList;
+ try
+ if (Cardinal(list.Count) < fMaxPoolSize) and Conn.isAlive then begin
+ fConnectionCache.Add(TCachedConnection.Create(Conn))
+ end else
+ Dec(fTotalConnections);
+ finally
+ fConnectionCache.UnlockList;
+ end;
+ fConnectionWait.SetEvent;
+ end;
+end;
+
+procedure TDAConnectionManager.SetPoolingEnabled(const Value: boolean);
+begin
+ fPoolingEnabled := Value;
+end;
+
+procedure TDAConnectionManager.ClearPool;
+var
+ i: Integer;
+ list: TList;
+begin
+ list := fConnectionCache.LockList;
+ try
+ for i := list.Count -1 downto 0 do begin
+ TCachedConnection(List[i]).Connection.ConnectionPool := nil;
+ TCachedConnection(List[i]).Free;
+ end;
+ Dec(fTotalConnections, list.Count);
+ list.Clear;
+ finally
+ fConnectionCache.UnlockList;
+ end;
+end;
+
+const
+ nn_Connections = 'Connections';
+ nn_Definitions = 'Definitions';
+ nn_Definition = 'Definition';
+
+ nn_PoolingEnabled = 'PoolingEnabled';
+ nn_PoolingBehavior = 'PoolingBehavior';
+ nn_MaxPoolSize = 'MaxPoolSize';
+ nn_WaitIntervalSeconds = 'WaitIntervalSeconds';
+ nn_PoolTimeoutSeconds = 'PoolTimeoutSeconds';
+
+ nn_ConnectionString = 'ConnectionString';
+ nn_Default = 'Default';
+ nn_Name = 'Name';
+ nn_Description = 'Description';
+ nn_ConnectionType = 'ConnectionType';
+
+procedure TDAConnectionManager.LoadFromStream(aStream: TStream;
+ aFormat: TDAPersistFormat);
+var buff: array[0..21] of char;
+ xmlDoc: IXMLDocument;
+ s: string;
+ i : integer;
+ connsNode, thisNode: IXMLNode;
+ conn: TDAConnection;
+begin
+ aStream.Position := 0;
+ aStream.ReadBuffer(buff, SizeOf(buff));
+ if (buff<>'') then begin
+ aStream.Position := 0;
+ xmlDoc := NewROXmlDocument;
+ xmlDoc.New();
+ xmlDoc.LoadFromStream(aStream);
+
+ Clear;
+
+ PoolingEnabled := xmlDoc.DocumentNode.GetNodeValue(nn_PoolingEnabled, def_PoolingEnabled);
+ // TDAPoolBehaviour = (pbWait, pbRaiseError, pbIgnoreAndReturn);
+ s := xmlDoc.DocumentNode.GetNodeValue(nn_PoolingBehavior, GetEnumName(TypeInfo(TDAPoolBehaviour), Ord(def_PoolBehaviour)));
+ if (Pos('pb', s)<>1) then s := 'pb'+s;
+ PoolBehaviour := TDAPoolBehaviour(GetEnumValue(TypeInfo(TDAPoolBehaviour), s));
+ MaxPoolSize := xmlDoc.DocumentNode.GetNodeValue(nn_MaxPoolSize, def_MaxPoolSize);
+ WaitIntervalSeconds := xmlDoc.DocumentNode.GetNodeValue(nn_WaitIntervalSeconds, def_WaitIntervalSeconds);
+ PoolTimeoutSeconds := xmlDoc.DocumentNode.GetNodeValue(nn_PoolTimeoutSeconds, def_PoolTimeoutSeconds);
+
+ connsNode := xmlDoc.DocumentNode.GetNodeByName(nn_Definitions);
+ if (connsNode=NIL) then Exit;
+ for i := 0 to (connsNode.ChildrenCount-1) do begin
+ thisNode := connsNode.Children[i];
+ if thisNode.Name <> nn_Definition then continue;
+
+ conn := Connections.Add;
+ conn.Name := thisNode.GetNodeValue(nn_Name, 'Connection'+IntToStr(i+1));
+ conn.Description:= thisNode.GetNodeValue(nn_Description, '');
+ conn.Default := thisNode.GetNodeValue(nn_Default, FALSE);
+ conn.ConnectionString := thisNode.GetNodeValue(nn_ConnectionString, '');
+ conn.ConnectiontYPE := thisNode.GetNodeValue(nn_ConnectionType, '');
+ end;
+ end
+ else inherited;
+end;
+
+procedure TDAConnectionManager.SaveToStream(aStream: TStream;
+ aFormat: TDAPersistFormat);
+var xmlDoc : IXMLDocument;
+ connNode, thisNode: IXMLNode;
+ s: string;
+ i: integer;
+begin
+ if (aFormat=pfBinary) then begin
+ inherited;
+ Exit;
+ end;
+
+ xmlDoc := NewROXmlDocument;
+ xmlDoc.New(nn_Connections);
+ thisNode := xmlDoc.DocumentNode;
+
+ thisnode.Add(nn_PoolingEnabled).Value := PoolingEnabled;
+ s := GetEnumName(TypeInfo(TDAPoolBehaviour), Ord(PoolBehaviour));
+ thisnode.Add(nn_PoolingBehavior).Value := Copy(s, 3, MaxInt);
+ thisnode.Add(nn_MaxPoolSize).Value := MaxPoolSize;
+ thisnode.Add(nn_WaitIntervalSeconds).Value := WaitIntervalSeconds;
+ thisnode.Add(nn_PoolTimeoutSeconds).Value := PoolTimeoutSeconds;
+
+ connNode := thisNode.Add(nn_Definitions);
+ for i := 0 to (Connections.Count-1) do begin
+ thisNode := connNode.Add(nn_Definition);
+ thisNode.Add(nn_Name).Value := Connections[i].Name;
+ thisNode.Add(nn_ConnectionString).Value := Connections[i].ConnectionString;
+ thisNode.Add(nn_Default).Value := Connections[i].Default;
+ thisNode.Add(nn_Description).Value := Connections[i].Description;
+ thisNode.Add(nn_ConnectionType).Value := Connections[i].ConnectionType;
+ end;
+
+ xmlDoc.SaveToStream(aStream);
+end;
+
+procedure TDAConnectionManager.Loaded;
+begin
+ inherited;
+ if not (csDesigning in ComponentState) then
+ begin
+ SetPoolTimeoutSeconds(fPoolTimeoutSeconds);
+ end;
+end;
+
+function TDAConnectionManager.UnknownMacroIdentifier(Sender: TObject;
+ const Name, OrgName: string; var Value: string): Boolean;
+begin
+ Value := Name;
+ result := TRUE;
+ if assigned(fOnUnknownMacroVariable) then begin
+ fOnUnknownMacroVariable(Self, OrgName, Value);
+ end;
+end;
+
+procedure TDAConnectionManager.CheckProperties;
+begin
+ Check(not Assigned(DriverManager), Name + '. '+err_DriverManagerNotAssigned);
+end;
+
+{ TDADataDictionary }
+
+constructor TDADataDictionary.Create(aOwner: TComponent);
+begin
+ inherited;
+ fFields := TDADataDictionaryFieldCollection.Create(self, TDADataDictionaryField);
+end;
+
+destructor TDADataDictionary.Destroy;
+begin
+ fFields.Free;
+ inherited;
+end;
+
+function TDADataDictionary.GetFields: TDADataDictionaryFieldCollection;
+begin
+ result := fFields;
+end;
+
+procedure TDADataDictionary.RestoreNonStreamableProperties(const TempStorage: TPointerArray);
+begin
+
+end;
+
+procedure TDADataDictionary.SaveNonStreamableProperties(var TempStorage: TPointerArray);
+begin
+
+end;
+
+procedure TDADataDictionary.SetFields(const Value: TDADataDictionaryFieldCollection);
+begin
+ fFields.Assign(Value);
+end;
+
+{ TDASchema }
+
+constructor TDASchema.Create(aOwner: TComponent);
+begin
+ inherited;
+ fCustomAttributes := TStringList.Create;
+ fDatasets := TDADatasetCollection.Create(Self);
+ fJoinDataTables := TDAJoinDataTableCollection.Create(Self);
+ fUnionDataTables := TDAUnionDataTableCollection.Create(Self);
+ fCommands := TDASQLCommandCollection.Create(Self);
+ fRelationShips := TDADatasetRelationshipCollection.Create(Self);
+ fUpdateRules := TDAUpdateRuleCollection.Create(Self);
+end;
+
+destructor TDASchema.Destroy;
+begin
+ FreeAndNil(fDatasets);
+ FreeAndNil(fJoinDataTables);
+ FreeAndNil(fUnionDataTables);
+ FreeAndNil(fCommands);
+ FreeAndNil(fRelationShips);
+ FreeAndNil(fUpdateRules);
+ fCustomAttributes.Free;
+
+ inherited;
+end;
+
+procedure TDASchema.Notification(aComponent: TComponent; Operation: TOperation);
+begin
+ inherited;
+ if (Operation <> opRemove) then Exit;
+ if aComponent = ConnectionManager then
+ ConnectionManager := nil
+ else if aComponent = DataDictionary then
+ DataDictionary := nil
+ else if aComponent = Diagrams then
+ Diagrams := nil;
+end;
+
+function TDASchema.GetCommands: TDASQLCommandCollection;
+begin
+ Result := fCommands;
+end;
+
+function TDASchema.GetDatasets: TDADatasetCollection;
+begin
+ Result := fDatasets;
+end;
+
+function TDASchema.GetJoinDataTables: TDAJoinDataTableCollection;
+begin
+ Result := fJoinDataTables;
+end;
+
+function TDASchema.GetUnionDataTables: TDAUnionDataTableCollection;
+begin
+ Result := fUnionDataTables;
+end;
+
+procedure TDASchema.SetCommands(const Value: TDASQLCommandCollection);
+begin
+ fCommands.Assign(Value);
+end;
+
+procedure TDASchema.SetDatasets(const Value: TDADatasetCollection);
+begin
+ fDatasets.Assign(Value);
+end;
+
+procedure TDASchema.SetJoinDataTables(const Value: TDAJoinDataTableCollection);
+begin
+ fJoinDataTables.Assign(Value);
+end;
+
+procedure TDASchema.SetUnionDataTables(const Value: TDAUnionDataTableCollection);
+begin
+ fUnionDataTables.Assign(Value);
+end;
+
+procedure TDASchema.Loaded;
+begin
+ inherited;
+end;
+
+procedure TDASchema.SetConnectionManager(const Value: TDAConnectionManager);
+begin
+ if fConnectionManager <> Value then begin
+ fConnectionManager := Value;
+ if (fConnectionManager <> nil) then fConnectionManager.FreeNotification(Self);
+ end;
+end;
+
+procedure TDASchema.SetDataDictionary(const Value: TDADataDictionary);
+begin
+ if fDataDictionary <> Value then begin
+ fDataDictionary := Value;
+ if (fDataDictionary <> nil) then fDataDictionary.FreeNotification(Self);
+ end;
+end;
+
+procedure TDASchema.RestoreNonStreamableProperties(
+ const TempStorage: TPointerArray);
+begin
+ fConnectionManager := TempStorage[0];
+ fDataDictionary := TempStorage[1];
+end;
+
+procedure TDASchema.SaveNonStreamableProperties(
+ var TempStorage: TPointerArray);
+begin
+ SetLength(TempStorage, 2);
+ TempStorage[0] := fConnectionManager;
+ TempStorage[1] := fDataDictionary;
+end;
+
+function TDASchema.GetCommandText(const aConnection: IDAConnection; const aName: string): string;
+var
+ cmd: TDASQLCommand;
+begin
+ cmd := TDASQLCommand(Commands.ItemByName(aName));
+ result := FindCommandStatement(aConnection, cmd).SQL;
+end;
+
+function TDASchema.GetDatasetText(const aConnection: IDAConnection; const aName: string): string;
+var
+ ds: TDADataset;
+begin
+ ds := TDADataset(Datasets.ItemByName(aName));
+ result := FindCommandStatement(aConnection, ds).SQL;
+end;
+
+function TDASchema.FindCommandStatement(const aConnection: IDAConnection; aSQLCommand: TDASQLCommand; aStatementName: string=''): TDAStatement;
+var
+ connname: string;
+ i: integer;
+begin
+ // Tries to find the statement associated with the given connection
+
+ result := nil;
+ if (aConnection <> nil) then begin
+ connname := aConnection.Name;
+ result := TDAStatement(aSQLCommand.Statements.FindItem(connname, aStatementName));
+ end;
+
+ //check for statement matching the connection TYPE of the active connection [matching means same *non-empty* value for both]
+ if (Result = nil) and (aConnection.ConnectionType<>'') then begin
+ For i:=0 to aSQLCommand.Statements.Count-1 do
+ if AnsiSameText(aConnection.ConnectionType,aSQLCommand.Statements[i].ConnectionType) then begin
+ Result:=aSQLCommand.Statements[i];
+ Break;
+ end;
+ end;
+
+ //check for a default statement ["Default" is new property on statement]
+ if (Result = nil) then
+ For i:=0 to aSQLCommand.Statements.Count-1 do
+ if aSQLCommand.Statements[i].Default then begin
+ Result:=aSQLCommand.Statements[i];
+ Break;
+ end;
+
+ // If none is found then reverts to the default connection
+ if (result = nil) then begin
+ connname := ConnectionManager.GetDefaultConnectionName;
+ result := TDAStatement(aSQLCommand.Statements.FindItem(connname, aStatementName));
+ end;
+
+ Check(result = nil, err_CannotFindStatement, [aSQLCommand.Name, connname]);
+end;
+
+{function TDASchema.NewDataset(aConnectionName: string; const aName: string): IDADataset;
+begin
+ Check(not Assigned(ConnectionManager), err_ConnectionManagerNotAssigned);
+ result := NewDataset(ConnectionManager.NewConnection(aConnectionName), aName);
+end;}
+
+function TDASchema.NewUnionItemDataset(
+ const aConnection: IDAConnection;
+ const aName: string;
+ const ParamNames: array of string;
+ const ParamValues: array of Variant;
+ aDynSelectFields: array of string;
+ aWhereClause: WideString;
+ anUnionMapping: TDAColumnMappingCollection): IDADataset;
+var
+ i: integer;
+begin
+ if (High(ParamNames) <> High(ParamValues)) then RaiseError('Names and values counts are different');
+
+ result := Self.DoNewDataset(aConnection, aName, aDynSelectFields, aWhereClause,
+ '', false, false, //default values
+ anUnionMapping);
+
+ for i := 0 to High(ParamValues) do
+ result.ParamByName(ParamNames[i]).Value := ParamValues[i];
+
+end;
+
+function TDASchema.NewDataset(
+ const aConnection: IDAConnection;
+ const aName: string;
+ aDynSelectFields: array of string;
+ aWhereClause: WideString;
+ aStatementName: string;
+ OpenIt: boolean;
+ AlwaysGenerateDynamicWhereStatement:Boolean): IDADataset;
+begin
+ result := Self.DoNewDataset(aConnection, aName, aDynSelectFields,
+ aWhereClause, aStatementName, OpenIt, AlwaysGenerateDynamicWhereStatement,
+ nil);
+end;
+
+function TDASchema.DoNewDataset(
+ const aConnection: IDAConnection;
+ const aName: string;
+ aDynSelectFields: array of string;
+ aWhereClause: WideString;
+ aStatementName: string;
+ OpenIt: boolean;
+ AlwaysGenerateDynamicWhereStatement:Boolean;
+ anUnionMapping: TDAColumnMappingCollection): IDADataset;
+
+var
+ ds: TDADataset;
+ fld : TDAField;
+
+ function IsRealField(aFieldName: string; ACheckForCalulated: boolean): boolean;
+ begin
+ Result:=not SameText(aFieldName, def_SourceTableFieldName);
+ if Result and ACheckForCalulated then begin
+ fld:=ds.Fields.FindField(aFieldName);
+ if fld <> nil then
+ Result:= not fld.Calculated;
+ end;
+ end;
+
+var
+ sql: string;
+ statement: TDAStatement;
+ i,j: integer;
+ lConnection: IDAConnection;
+ lFields: TDAFieldCollection;
+ lFields2:TDAFieldCollection;
+ lColumnMapping: TDAColumnMapping;
+ lWhereFields: TWhereFieldsArray;
+ lWhereFlag: Boolean;
+ lstatname: string;
+ lWhereClause: WideString;
+begin
+ lConnection := aConnection;
+ if not assigned(lConnection) then begin
+ CheckProperties;
+ lConnection := ConnectionManager.NewConnection(ConnectionManager.GetDefaultConnectionName);
+ end;
+ result := nil;
+ lColumnMapping := nil;
+ SetLength(lWhereFields,0); // remove warning
+ ds := (Datasets.DatasetByName(aName) as TDADataset);
+ if Assigned(ds) then begin
+ statement := FindCommandStatement(lConnection, ds, aStatementName);
+ sql := statement.SQL;
+ // generate AutoSQL
+ if statement.StatementType = stAutoSQL then begin
+ if statement.TargetTable = '' then begin
+ if statement.Name = '' then
+ lstatname:= '['+statement.ConnectionType+']'
+ else
+ lstatname:= statement.Name;
+ raise Exception.Create(aName+'. Statement: '+lstatname+ '. TargetTable must be specified.');
+ end;
+ With aConnection.GetQueryBuilder do try
+ if Length(aDynSelectFields) > 0 then begin
+ For i:=0 to ds.Fields.Count-1 do begin
+ fld:=ds.Fields[i];
+ if not (not Assigned(fld) or fld.Calculated or fld.Lookup or fld.ServerCalculated) then
+ for j:=Low(aDynSelectFields) to High(aDynSelectFields) do
+ if SameText(aDynSelectFields[j],Fld.Name) then begin
+ AddSelect('',fld.Name);
+ Break;
+ end;
+ end;
+ end
+ else begin
+ For i:=0 to ds.Fields.Count-1 do begin
+ fld:=ds.Fields[i];
+ if not (fld.Calculated or fld.Lookup or fld.ServerCalculated) then
+ AddSelect('',fld.Name);
+ end;
+ end;
+ MainTable.MasterTable:=statement.TargetTable;
+ if (aWhereClause <> '') or AlwaysGenerateDynamicWhereStatement then
+ Options := Options + [qboGenerateDynamicWhereStatement];
+ ColumnMapping:=statement.ColumnMappings;
+ sql := GenerateSelectSQL;
+ finally
+ Free;
+ end;
+ end;
+
+ if Assigned(fOnGetSQL) then fOnGetSQL(Self, aName, setDataset, sql);
+
+ result := lConnection.NewDataset(sql, aName);
+
+ if (aWhereClause <> '') then begin
+
+ //Do remapping for unions
+ if (Assigned(anUnionMapping)) then
+ lWhereClause := Where_RemapFieldNames(aWhereClause, anUnionMapping, statement.TargetTable)
+ else
+ lWhereClause := aWhereClause;
+
+ Result.DynamicWhere.Xml := lWhereClause;
+
+ // Checking conformity dynamic where fields to table fields
+ lWhereFields := Where_ExtractFieldNames(Result.DynamicWhere.Expression);
+ if Length(lWhereFields) <> 0 then begin
+ {// remapping
+ for i:=0 to High(lWhereFields) do begin
+ lColumnMapping := statement.ColumnMappings.FindMappingByDatasetField(lWhereFields[i]);
+ if Assigned(lColumnMapping) then lWhereFields[i] := lColumnMapping.TableField;
+ end;
+ }
+ if Length(aDynSelectFields) > 0 then begin
+ For i:= 0 to High(lWhereFields) do begin
+ lWhereFlag:=False;
+ for j:=0 to High(aDynSelectFields) do
+ if IsRealField(aDynSelectFields[j],True) then
+ if SameText(lWhereFields[i],aDynSelectFields[j]) then begin
+ lWhereFlag:=True;
+ break;
+ end;
+ if not lWhereFlag then
+ raise EDAException.CreateFmt('''%s'' field can''t be used inside the where clause',[lWhereFields[i]]);
+ end;
+ end
+ else begin
+ For i:= 0 to High(lWhereFields) do begin
+ lWhereFlag:= ds.Fields.Count = 0;
+ for j:=0 to ds.Fields.Count-1 do
+ if not ds.Fields[j].Calculated and IsRealField(ds.Fields[j].Name, False) then
+ if SameText(lWhereFields[i],ds.Fields[j].Name) then begin
+ lWhereFlag:=True;
+ break;
+ end;
+ if not lWhereFlag then
+ raise EDAException.CreateFmt('''%s'' field can''t be used inside the where clause',[lWhereFields[i]]);
+ end;
+ end;
+ end;
+ // end Checking conformity dynamic where fields to table fields
+ Result.DynamicWhere.ColumnMapping := statement.ColumnMappings;
+ end;
+
+ // Copies the definitions of the schema
+
+ { not sure if this is unproblematic, but we need to copy access to the data
+ dictionary. though some more explicit access (say a Fields.DataDictionary
+ property would be better. }
+
+ result.Fields.DataDictionary := self.DataDictionary;
+ if statement.StatementType <> stAutoSQL then begin
+ result.Fields.AssignFieldCollection(ds.Fields);
+
+ with statement do
+ for i := 0 to (ColumnMappings.Count - 1) do begin
+ fld := result.Fields.FieldByName(ColumnMappings[i].DatasetField);
+
+ fld.TableField := ColumnMappings[i].TableField;
+ fld.SQLOrigin := ColumnMappings[i].SQLOrigin;
+ end;
+ end else begin
+ // stAutoSQL
+ lFields:=nil;
+ if ds.Fields.Count = 0 then begin
+ lConnection.GetTableFields(statement.TargetTable,lFields);
+ lFields2:=lFields;
+ end
+ else begin
+ lFields2:=ds.Fields;
+ end;
+ try
+ if Length(aDynSelectFields) > 0 then begin
+ if statement.ColumnMappings.Count = 0 then begin
+ For i:=0 to High(aDynSelectFields) do begin
+ if aDynSelectFields[i] = def_SourceTableFieldName then Continue;
+ fld:=Result.Fields.Add;
+ fld.AssignField(lfields2.FieldByName(aDynSelectFields[i]));
+ if lColumnMapping <> nil then begin
+ fld.Name := lColumnMapping.DatasetField;
+ fld.TableField := lColumnMapping.TableField;
+ fld.SQLOrigin := lColumnMapping.SQLOrigin;
+ end;
+ end;
+ end
+ else begin
+ For i:=0 to statement.ColumnMappings.Count-1 do begin
+ lColumnMapping := statement.ColumnMappings[i];
+ for j:=Low(aDynSelectFields) to High(aDynSelectFields) do
+ if SameText(aDynSelectFields[j],lColumnMapping.DatasetField) then begin
+ fld:=Result.Fields.Add;
+ fld.AssignField(lfields2.FieldByName(lColumnMapping.DatasetField));
+ fld.Name := lColumnMapping.DatasetField;
+ fld.TableField := lColumnMapping.TableField;
+ fld.SQLOrigin := lColumnMapping.SQLOrigin;
+ Break;
+ end;
+ end;
+ end;
+ end
+ else begin
+ result.Fields.AssignFieldCollection(lfields2);
+ with statement do
+ for i := 0 to (ColumnMappings.Count - 1) do begin
+ fld := Result.Fields.FindField(ColumnMappings[i].DatasetField);
+ if fld = nil then Continue;
+ fld.Name := ColumnMappings[i].DatasetField;
+ fld.TableField := ColumnMappings[i].TableField;
+ fld.SQLOrigin := ColumnMappings[i].SQLOrigin;
+ end;
+ end;
+ finally
+ if lFields <> nil then lFields.Free;
+ end;
+ end;
+ // checking for DynamicFields
+ if Length(aDynSelectFields) > 0 then begin
+ For i:=0 to High(aDynSelectFields) do
+ if IsRealField(aDynSelectFields[i],True) then
+ Result.FieldByName(aDynSelectFields[i]);
+ end;
+ result.Params.AssignParamCollection(ds.Params);
+ if OpenIt then result.Open;
+
+ end;
+end;
+
+function TDASchema.NewCommand(const aConnection: IDAConnection; const aName: string; aStatementName: string=''): IDASQLCommand;
+var
+ statement: TDAStatement;
+ sql: string;
+ cmd: TDASQLCommand;
+ lConnection: IDAConnection;
+begin
+ lConnection := aConnection;
+ if not assigned(lConnection) then begin
+ CheckProperties;
+ lConnection := ConnectionManager.NewConnection(ConnectionManager.GetDefaultConnectionName);
+ end;
+ result := nil;
+ cmd := TDASQLCommand(Commands.ItemByName(aName));
+
+ statement := FindCommandStatement(lConnection, cmd, aStatementName);
+ sql := statement.SQL;
+
+ if Assigned(fOnGetSQL) then fOnGetSQL(Self, aName, setCommand, sql);
+
+ result := lConnection.NewCommand(sql, statement.StatementType, aName);
+
+ // Copies the definitions of the schema
+ result.Params.AssignParamCollection(cmd.Params);
+end;
+
+procedure TDASchema.Clear;
+begin
+ Datasets.Clear();
+ Commands.Clear();
+ JoinDataTables.Clear();
+ UnionDataTables.Clear();
+end;
+
+function TDASchema.NewDataset(
+ const aConnection: IDAConnection;
+ const aName: string;
+ const ParamNames: array of string;
+ const ParamValues: array of Variant;
+ aDynSelectFields: array of string;
+ aWhereClause: WideString;
+ OpenIt: boolean;
+ aStatementName: string): IDADataset;
+var
+ i: integer;
+begin
+ if (High(ParamNames) <> High(ParamValues)) then RaiseError('Names and values counts are different');
+
+ result := NewDataset(aConnection, aName, aDynSelectFields, aWhereClause, aStatementName, False, False);
+
+ for i := 0 to High(ParamValues) do
+ result.ParamByName(ParamNames[i]).Value := ParamValues[i];
+
+ if OpenIt then result.Open;
+end;
+
+function TDASchema.NewCommand(const aConnection: IDAConnection; const aName: string;
+ const ParamNames: array of string;
+ const ParamValues: array of Variant;
+ ExecuteIt: boolean = TRUE;
+ aStatementName: string=''): IDASQLCommand;
+var
+ i: integer;
+begin
+ if (High(ParamNames) <> High(ParamValues)) then RaiseError('Names and values counts are different');
+
+ result := NewCommand(aConnection, aName);
+
+ for i := 0 to High(ParamValues) do
+ result.ParamByName(ParamNames[i]).Value := ParamValues[i];
+
+ if ExecuteIt then result.Execute;
+end;
+
+procedure TDASchema.SetUpdateRules(const Value: TDAUpdateRuleCollection);
+begin
+ fUpdateRules.Assign(Value);
+end;
+
+procedure TDASchema.SetRelationShips(
+ const Value: TDADatasetRelationshipCollection);
+begin
+ fRelationShips.Assign(Value);
+end;
+
+procedure TDASchema.SetDiagrams(const Value: TDADiagrams);
+begin
+ if fDiagrams <> Value then begin
+ fDiagrams := Value;
+ if (fDiagrams <> nil) then fDiagrams.FreeNotification(Self);
+ end;
+
+end;
+
+procedure TDASchema.Copy(aSourceSchema : TDASchema;
+ DatasetNames : array of string;
+ CommandNames : array of string;
+ UpdateRuleNames : array of string;
+ RelationShipNames : array of string);
+var i : integer;
+ sourcedataset,
+ destdataset : TDADataset;
+ sourcecommand,
+ destcommand : TDASQLCommand;
+ sourceupdaterule,
+ destupdaterule : TDAUpdateRule;
+ sourcerelationship,
+ destrelationship : TDADatasetRelationship;
+begin
+ for i := 0 to High(DatasetNames) do begin
+ sourcedataset := aSourceSchema.Datasets.DatasetByName(DatasetNames[i]);
+ destdataset := Datasets.Add;
+ destdataset.Assign(sourcedataset);
+ end;
+
+ for i := 0 to High(CommandNames) do begin
+ sourcecommand := aSourceSchema.Commands.SQLCommandByName(CommandNames[i]);
+ destcommand := Commands.Add;
+ destcommand.Assign(sourcecommand);
+ end;
+
+ for i := 0 to High(UpdateRuleNames) do begin
+ sourceupdaterule := aSourceSchema.UpdateRules.UpdateRuleByName(UpdateRuleNames[i]);
+ destupdaterule := UpdateRules.Add;
+ destupdaterule.Assign(sourceupdaterule);
+ end;
+
+ for i := 0 to High(RelationShipNames) do begin
+ sourcerelationship := aSourceSchema.RelationShips.RelationShipByName(RelationShipNames[i]);
+ destrelationship := RelationShips.Add;
+ destrelationship.Assign(sourcerelationship);
+ end;
+end;
+
+procedure TDASchema.Copy(aSourceSchema : TDASchema;
+ IncludeDatasets : boolean = TRUE;
+ IncludeCommands : boolean = TRUE;
+ IncludeUpdateRules : boolean = TRUE;
+ IncludeRelationShips : boolean = TRUE);
+var datasetnames, commandnames, updaterulenames, relationshipnames : array of string;
+ i : integer;
+begin
+ if not IncludeDatasets then SetLength(datasetnames, 0)
+ else begin
+ SetLength(datasetnames, aSourceSchema.Datasets.Count);
+ for i := 0 to (aSourceSchema.Datasets.Count-1) do
+ datasetnames[i] := aSourceSchema.Datasets[i].Name;
+ end;
+
+ if not IncludeCommands then SetLength(commandnames, 0)
+ else begin
+ SetLength(commandnames, aSourceSchema.Commands.Count);
+ for i := 0 to (aSourceSchema.Commands.Count-1) do
+ commandnames[i] := aSourceSchema.Commands[i].Name;
+ end;
+
+ if not IncludeUpdateRules then SetLength(updaterulenames, 0)
+ else begin
+ SetLength(updaterulenames, aSourceSchema.UpdateRules.Count);
+ for i := 0 to (aSourceSchema.UpdateRules.Count-1) do
+ updaterulenames[i] := aSourceSchema.UpdateRules[i].Name;
+ end;
+
+ if not IncludeRelationShips then SetLength(relationshipnames, 0)
+ else begin
+ SetLength(relationshipnames, aSourceSchema.RelationShips.Count);
+ for i := 0 to (aSourceSchema.RelationShips.Count-1) do
+ relationshipnames[i] := aSourceSchema.RelationShips[i].Name;
+ end;
+
+ Copy(aSourceSchema, datasetnames, commandnames, updaterulenames, relationshipnames);
+end;
+
+procedure TDASchema.CheckProperties;
+begin
+ Check(not assigned(ConnectionManager), Name+'.ConnectionManager must be assigned.');
+ Check(ConnectionManager.GetDefaultConnectionName = '', Name+'.ConnectionManager does not have a default connection.');
+ ConnectionManager.CheckProperties;
+end;
+
+function TDASchema.FindDataset(aDatasetName: String): TDADataset;
+begin
+ result := Self.fDatasets.FindItem(aDatasetName) as TDADataset;
+ if not Assigned(result) then
+ result := Self.fUnionDataTables.FindItem(aDatasetName) as TDADataset;
+ if not Assigned(result) then
+ result := Self.fJoinDataTables.FindItem(aDatasetName) as TDADataset;
+end;
+
+function TDASchema.NewDataset(const aConnection: IDAConnection;
+ const aName: string;
+ aStatementName: string='';
+ OpenIt: boolean = false): IDADataset;
+begin
+ result := NewDataset(aConnection, aName, [], '', aStatementName, OpenIt);
+end;
+
+function TDASchema.NewDataset(const aConnection: IDAConnection; const aName: string;
+ const ParamNames: array of string;
+ const ParamValues: array of Variant;
+ OpenIt: boolean = TRUE;
+ aStatementName: string=''): IDADataset;
+begin
+ result := NewDataset(aConnection, aName, ParamNames, ParamValues,[],'', OpenIt,aStatementName);
+end;
+
+function TDASchema.GetDataDictionary: IDADataDictionary;
+begin
+ Result := fDataDictionary;
+end;
+
+procedure TDASchema.SaveToStream(aStream: TStream;
+ aFormat: TDAPersistFormat);
+begin
+ fMergeDataDictionaries := true;
+ try
+ inherited SaveToStream(aStream, aFormat);
+ finally
+ fMergeDataDictionaries := false;
+ end;
+end;
+
+function TDASchema.MergeDataDictionaries: Boolean;
+begin
+ result := fMergeDataDictionaries;
+end;
+
+{ TDADiagrams }
+
+procedure TDADiagrams.DefineProperties(Filer: TFiler);
+begin
+ inherited;
+ Filer.DefineProperty('DiagramData', ReadDiagramData, WriteDiagramData, fDiagramData <> '');
+end;
+
+procedure TDADiagrams.LoadFromFile(const aFilename: string);
+var
+ t: TextFile;
+ S: string;
+begin
+ AssignFile(t, aFilename);
+ Reset(t);
+ try
+ fDiagramData := '';
+ while not Eof(t) do begin
+ Readln(t, s);
+ fDiagramData := fDiagramData+s+#13#10;
+ end;
+ finally
+ CloseFile(t);
+ end;
+end;
+
+procedure TDADiagrams.SaveToFile(const aFilename: string);
+var
+ t:TextFile;
+begin
+ AssignFile(t, aFilename);
+ Rewrite(t);
+ try
+ Write(t, fDiagramData);
+ finally
+ CloseFile(t);
+ end;
+end;
+
+procedure TDADiagrams.ReadDiagramData(Reader: TReader);
+begin
+ fDiagramData := Reader.ReadString;
+end;
+
+procedure TDADiagrams.WriteDiagramData(Writer: TWriter);
+begin
+ Writer.WriteString(fDiagramData);
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDAClientDataModule.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAClientDataModule.pas
new file mode 100644
index 0000000..d72017a
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAClientDataModule.pas
@@ -0,0 +1,30 @@
+unit uDAClientDataModule {$IFNDEF FPC}deprecated{$ENDIF};
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ Classes;
+
+type
+ TDAClientDataModule = class(TDataModule)
+ private
+
+ end deprecated;
+
+implementation
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDADB2Interfaces.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDADB2Interfaces.pas
new file mode 100644
index 0000000..ec21663
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDADB2Interfaces.pas
@@ -0,0 +1,567 @@
+unit uDADB2Interfaces;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses uDAInterfaces, uDAEngine;
+
+type
+ { IDADB2Connection
+ For identification purposes. Implemented by all DB2 connections }
+ IDADB2Connection = interface(IDAConnection)
+ ['{E1449C52-8AEF-432C-BABC-823E592A8116}']
+ end;
+
+
+function DB2_IdentifierNeedsQuoting(const iIdentifier: string): boolean;
+
+implementation
+uses
+ SysUtils;
+
+var
+ db2_reservedwords: array of string;
+
+function DB2_IdentifierNeedsQuoting(const iIdentifier: string): boolean;
+begin
+ Result := TestIdentifier(iIdentifier, db2_reservedwords);
+end;
+
+procedure db2_InitializeReservedWords;
+begin
+// from http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/topic/com.ibm.db2.luw.sql.ref.doc/doc/r0001095.html
+ SetLength(db2_reservedwords, 513);
+ // sorted with TStringList.Sort (bds2007)
+ db2_reservedwords[0] := 'ABS';
+ db2_reservedwords[1] := 'ACTIVATE';
+ db2_reservedwords[2] := 'ADD';
+ db2_reservedwords[3] := 'AFTER';
+ db2_reservedwords[4] := 'ALIAS';
+ db2_reservedwords[5] := 'ALL';
+ db2_reservedwords[6] := 'ALLOCATE';
+ db2_reservedwords[7] := 'ALLOW';
+ db2_reservedwords[8] := 'ALTER';
+ db2_reservedwords[9] := 'AND';
+ db2_reservedwords[10] := 'ANY';
+ db2_reservedwords[11] := 'ARE';
+ db2_reservedwords[12] := 'ARRAY';
+ db2_reservedwords[13] := 'AS';
+ db2_reservedwords[14] := 'ASENSITIVE';
+ db2_reservedwords[15] := 'ASSOCIATE';
+ db2_reservedwords[16] := 'ASUTIME';
+ db2_reservedwords[17] := 'ASYMMETRIC';
+ db2_reservedwords[18] := 'AT';
+ db2_reservedwords[19] := 'ATOMIC';
+ db2_reservedwords[20] := 'ATTRIBUTES';
+ db2_reservedwords[21] := 'AUDIT';
+ db2_reservedwords[22] := 'AUTHORIZATION';
+ db2_reservedwords[23] := 'AUX';
+ db2_reservedwords[24] := 'AUXILIARY';
+ db2_reservedwords[25] := 'AVG';
+ db2_reservedwords[26] := 'BEFORE';
+ db2_reservedwords[27] := 'BEGIN';
+ db2_reservedwords[28] := 'BETWEEN';
+ db2_reservedwords[29] := 'BIGINT';
+ db2_reservedwords[30] := 'BINARY';
+ db2_reservedwords[31] := 'BLOB';
+ db2_reservedwords[32] := 'BOOLEAN';
+ db2_reservedwords[33] := 'BOTH';
+ db2_reservedwords[34] := 'BUFFERPOOL';
+ db2_reservedwords[35] := 'BY';
+ db2_reservedwords[36] := 'CACHE';
+ db2_reservedwords[37] := 'CALL';
+ db2_reservedwords[38] := 'CALLED';
+ db2_reservedwords[39] := 'CAPTURE';
+ db2_reservedwords[40] := 'CARDINALITY';
+ db2_reservedwords[41] := 'CASCADED';
+ db2_reservedwords[42] := 'CASE';
+ db2_reservedwords[43] := 'CAST';
+ db2_reservedwords[44] := 'CCSID';
+ db2_reservedwords[45] := 'CEIL';
+ db2_reservedwords[46] := 'CEILING';
+ db2_reservedwords[47] := 'CHAR';
+ db2_reservedwords[48] := 'CHAR_LENGTH';
+ db2_reservedwords[49] := 'CHARACTER';
+ db2_reservedwords[50] := 'CHARACTER_LENGTH';
+ db2_reservedwords[51] := 'CHECK';
+ db2_reservedwords[52] := 'CLOB';
+ db2_reservedwords[53] := 'CLONE';
+ db2_reservedwords[54] := 'CLOSE';
+ db2_reservedwords[55] := 'CLUSTER';
+ db2_reservedwords[56] := 'COALESCE';
+ db2_reservedwords[57] := 'COLLATE';
+ db2_reservedwords[58] := 'COLLECT';
+ db2_reservedwords[59] := 'COLLECTION';
+ db2_reservedwords[60] := 'COLLID';
+ db2_reservedwords[61] := 'COLUMN';
+ db2_reservedwords[62] := 'COMMENT';
+ db2_reservedwords[63] := 'COMMIT';
+ db2_reservedwords[64] := 'CONCAT';
+ db2_reservedwords[65] := 'CONDITION';
+ db2_reservedwords[66] := 'CONNECT';
+ db2_reservedwords[67] := 'CONNECTION';
+ db2_reservedwords[68] := 'CONSTRAINT';
+ db2_reservedwords[69] := 'CONTAINS';
+ db2_reservedwords[70] := 'CONTINUE';
+ db2_reservedwords[71] := 'CONVERT';
+ db2_reservedwords[72] := 'CORR';
+ db2_reservedwords[73] := 'CORRESPONDING';
+ db2_reservedwords[74] := 'COUNT';
+ db2_reservedwords[75] := 'COUNT_BIG';
+ db2_reservedwords[76] := 'COVAR_POP';
+ db2_reservedwords[77] := 'COVAR_SAMP';
+ db2_reservedwords[78] := 'CREATE';
+ db2_reservedwords[79] := 'CROSS';
+ db2_reservedwords[80] := 'CUBE';
+ db2_reservedwords[81] := 'CUME_DIST';
+ db2_reservedwords[82] := 'CURRENT';
+ db2_reservedwords[83] := 'CURRENT_DATE';
+ db2_reservedwords[84] := 'CURRENT_DEFAULT_TRANSFORM_GROUP';
+ db2_reservedwords[85] := 'CURRENT_LC_CTYPE';
+ db2_reservedwords[86] := 'CURRENT_PATH';
+ db2_reservedwords[87] := 'CURRENT_ROLE';
+ db2_reservedwords[88] := 'CURRENT_SCHEMA';
+ db2_reservedwords[89] := 'CURRENT_SERVER';
+ db2_reservedwords[90] := 'CURRENT_TIME';
+ db2_reservedwords[91] := 'CURRENT_TIMESTAMP';
+ db2_reservedwords[92] := 'CURRENT_TIMEZONE';
+ db2_reservedwords[93] := 'CURRENT_TRANSFORM_GROUP_FOR_TYPE';
+ db2_reservedwords[94] := 'CURRENT_USER';
+ db2_reservedwords[95] := 'CURSOR';
+ db2_reservedwords[96] := 'CYCLE';
+ db2_reservedwords[97] := 'DATA';
+ db2_reservedwords[98] := 'DATABASE';
+ db2_reservedwords[99] := 'DATAPARTITIONNAME';
+ db2_reservedwords[100] := 'DATAPARTITIONNUM';
+ db2_reservedwords[101] := 'DATE';
+ db2_reservedwords[102] := 'DAY';
+ db2_reservedwords[103] := 'DAYS';
+ db2_reservedwords[104] := 'DB2GENERAL';
+ db2_reservedwords[105] := 'DB2GENRL';
+ db2_reservedwords[106] := 'DB2SQL';
+ db2_reservedwords[107] := 'DBINFO';
+ db2_reservedwords[108] := 'DBPARTITIONNAME';
+ db2_reservedwords[109] := 'DBPARTITIONNUM';
+ db2_reservedwords[110] := 'DEALLOCATE';
+ db2_reservedwords[111] := 'DEC';
+ db2_reservedwords[112] := 'DECIMAL';
+ db2_reservedwords[113] := 'DECLARE';
+ db2_reservedwords[114] := 'DEFAULT';
+ db2_reservedwords[115] := 'DEFAULTS';
+ db2_reservedwords[116] := 'DEFINITION';
+ db2_reservedwords[117] := 'DELETE';
+ db2_reservedwords[118] := 'DENSE_RANK';
+ db2_reservedwords[119] := 'DENSERANK';
+ db2_reservedwords[120] := 'DEREF';
+ db2_reservedwords[121] := 'DESCRIBE';
+ db2_reservedwords[122] := 'DESCRIPTOR';
+ db2_reservedwords[123] := 'DETERMINISTIC';
+ db2_reservedwords[124] := 'DIAGNOSTICS';
+ db2_reservedwords[125] := 'DISABLE';
+ db2_reservedwords[126] := 'DISALLOW';
+ db2_reservedwords[127] := 'DISCONNECT';
+ db2_reservedwords[128] := 'DISTINCT';
+ db2_reservedwords[129] := 'DO';
+ db2_reservedwords[130] := 'DOCUMENT';
+ db2_reservedwords[131] := 'DOUBLE';
+ db2_reservedwords[132] := 'DROP';
+ db2_reservedwords[133] := 'DSSIZE';
+ db2_reservedwords[134] := 'DYNAMIC';
+ db2_reservedwords[135] := 'EACH';
+ db2_reservedwords[136] := 'EDITPROC';
+ db2_reservedwords[137] := 'ELEMENT';
+ db2_reservedwords[138] := 'ELSE';
+ db2_reservedwords[139] := 'ELSEIF';
+ db2_reservedwords[140] := 'ENABLE';
+ db2_reservedwords[141] := 'ENCODING';
+ db2_reservedwords[142] := 'ENCRYPTION';
+ db2_reservedwords[143] := 'END';
+ db2_reservedwords[144] := 'END-EXEC';
+ db2_reservedwords[145] := 'ENDING';
+ db2_reservedwords[146] := 'ERASE';
+ db2_reservedwords[147] := 'ESCAPE';
+ db2_reservedwords[148] := 'EVERY';
+ db2_reservedwords[149] := 'EXCEPT';
+ db2_reservedwords[150] := 'EXCEPTION';
+ db2_reservedwords[151] := 'EXCLUDING';
+ db2_reservedwords[152] := 'EXCLUSIVE';
+ db2_reservedwords[153] := 'EXEC';
+ db2_reservedwords[154] := 'EXECUTE';
+ db2_reservedwords[155] := 'EXISTS';
+ db2_reservedwords[156] := 'EXIT';
+ db2_reservedwords[157] := 'EXP';
+ db2_reservedwords[158] := 'EXPLAIN';
+ db2_reservedwords[159] := 'EXTERNAL';
+ db2_reservedwords[160] := 'EXTRACT';
+ db2_reservedwords[161] := 'FALSE';
+ db2_reservedwords[162] := 'FENCED';
+ db2_reservedwords[163] := 'FETCH';
+ db2_reservedwords[164] := 'FIELDPROC';
+ db2_reservedwords[165] := 'FILE';
+ db2_reservedwords[166] := 'FILTER';
+ db2_reservedwords[167] := 'FINAL';
+ db2_reservedwords[168] := 'FLOAT';
+ db2_reservedwords[169] := 'FLOOR';
+ db2_reservedwords[170] := 'FOR';
+ db2_reservedwords[171] := 'FOREIGN';
+ db2_reservedwords[172] := 'FREE';
+ db2_reservedwords[173] := 'FROM';
+ db2_reservedwords[174] := 'FULL';
+ db2_reservedwords[175] := 'FUNCTION';
+ db2_reservedwords[176] := 'FUSION';
+ db2_reservedwords[177] := 'GENERAL';
+ db2_reservedwords[178] := 'GENERATED';
+ db2_reservedwords[179] := 'GET';
+ db2_reservedwords[180] := 'GLOBAL';
+ db2_reservedwords[181] := 'GO';
+ db2_reservedwords[182] := 'GOTO';
+ db2_reservedwords[183] := 'GRANT';
+ db2_reservedwords[184] := 'GRAPHIC';
+ db2_reservedwords[185] := 'GROUP';
+ db2_reservedwords[186] := 'GROUPING';
+ db2_reservedwords[187] := 'HANDLER';
+ db2_reservedwords[188] := 'HASH';
+ db2_reservedwords[189] := 'HASHED_VALUE';
+ db2_reservedwords[190] := 'HAVING';
+ db2_reservedwords[191] := 'HINT';
+ db2_reservedwords[192] := 'HOLD';
+ db2_reservedwords[193] := 'HOUR';
+ db2_reservedwords[194] := 'HOURS';
+ db2_reservedwords[195] := 'IDENTITY';
+ db2_reservedwords[196] := 'IF';
+ db2_reservedwords[197] := 'IMMEDIATE';
+ db2_reservedwords[198] := 'IN';
+ db2_reservedwords[199] := 'INCLUDING';
+ db2_reservedwords[200] := 'INCLUSIVE';
+ db2_reservedwords[201] := 'INCREMENT';
+ db2_reservedwords[202] := 'INDEX';
+ db2_reservedwords[203] := 'INDICATOR';
+ db2_reservedwords[204] := 'INF';
+ db2_reservedwords[205] := 'INFINITY';
+ db2_reservedwords[206] := 'INHERIT';
+ db2_reservedwords[207] := 'INNER';
+ db2_reservedwords[208] := 'INOUT';
+ db2_reservedwords[209] := 'INSENSITIVE';
+ db2_reservedwords[210] := 'INSERT';
+ db2_reservedwords[211] := 'INT';
+ db2_reservedwords[212] := 'INTEGER';
+ db2_reservedwords[213] := 'INTEGRITY';
+ db2_reservedwords[214] := 'INTERSECT';
+ db2_reservedwords[215] := 'INTERSECTION';
+ db2_reservedwords[216] := 'INTERVAL';
+ db2_reservedwords[217] := 'INTO';
+ db2_reservedwords[218] := 'IS';
+ db2_reservedwords[219] := 'ISOBID';
+ db2_reservedwords[220] := 'ISOLATION';
+ db2_reservedwords[221] := 'ITERATE';
+ db2_reservedwords[222] := 'JAR';
+ db2_reservedwords[223] := 'JAVA';
+ db2_reservedwords[224] := 'JOIN';
+ db2_reservedwords[225] := 'KEEP';
+ db2_reservedwords[226] := 'KEY';
+ db2_reservedwords[227] := 'LABEL';
+ db2_reservedwords[228] := 'LANGUAGE';
+ db2_reservedwords[229] := 'LARGE';
+ db2_reservedwords[230] := 'LATERAL';
+ db2_reservedwords[231] := 'LC_CTYPE';
+ db2_reservedwords[232] := 'LEADING';
+ db2_reservedwords[233] := 'LEAVE';
+ db2_reservedwords[234] := 'LEFT';
+ db2_reservedwords[235] := 'LIKE';
+ db2_reservedwords[236] := 'LINKTYPE';
+ db2_reservedwords[237] := 'LN';
+ db2_reservedwords[238] := 'LOCAL';
+ db2_reservedwords[239] := 'LOCALDATE';
+ db2_reservedwords[240] := 'LOCALE';
+ db2_reservedwords[241] := 'LOCALTIME';
+ db2_reservedwords[242] := 'LOCALTIMESTAMP';
+ db2_reservedwords[243] := 'LOCATOR';
+ db2_reservedwords[244] := 'LOCATORS';
+ db2_reservedwords[245] := 'LOCK';
+ db2_reservedwords[246] := 'LOCKMAX';
+ db2_reservedwords[247] := 'LOCKSIZE';
+ db2_reservedwords[248] := 'LONG';
+ db2_reservedwords[249] := 'LOOP';
+ db2_reservedwords[250] := 'LOWER';
+ db2_reservedwords[251] := 'MAINTAINED';
+ db2_reservedwords[252] := 'MATCH';
+ db2_reservedwords[253] := 'MATERIALIZED';
+ db2_reservedwords[254] := 'MAX';
+ db2_reservedwords[255] := 'MAXVALUE';
+ db2_reservedwords[256] := 'MEMBER';
+ db2_reservedwords[257] := 'MERGE';
+ db2_reservedwords[258] := 'METHOD';
+ db2_reservedwords[259] := 'MICROSECOND';
+ db2_reservedwords[260] := 'MICROSECONDS';
+ db2_reservedwords[261] := 'MIN';
+ db2_reservedwords[262] := 'MINUTE';
+ db2_reservedwords[263] := 'MINUTES';
+ db2_reservedwords[264] := 'MINVALUE';
+ db2_reservedwords[265] := 'MOD';
+ db2_reservedwords[266] := 'MODE';
+ db2_reservedwords[267] := 'MODIFIES';
+ db2_reservedwords[268] := 'MODULE';
+ db2_reservedwords[269] := 'MONTH';
+ db2_reservedwords[270] := 'MONTHS';
+ db2_reservedwords[271] := 'MULTISET';
+ db2_reservedwords[272] := 'NAN';
+ db2_reservedwords[273] := 'NATIONAL';
+ db2_reservedwords[274] := 'NATURAL';
+ db2_reservedwords[275] := 'NCHAR';
+ db2_reservedwords[276] := 'NCLOB';
+ db2_reservedwords[277] := 'NEW';
+ db2_reservedwords[278] := 'NEW_TABLE';
+ db2_reservedwords[279] := 'NEXTVAL';
+ db2_reservedwords[280] := 'NO';
+ db2_reservedwords[281] := 'NOCACHE';
+ db2_reservedwords[282] := 'NOCYCLE';
+ db2_reservedwords[283] := 'NODENAME';
+ db2_reservedwords[284] := 'NODENUMBER';
+ db2_reservedwords[285] := 'NOMAXVALUE';
+ db2_reservedwords[286] := 'NOMINVALUE';
+ db2_reservedwords[287] := 'NONE';
+ db2_reservedwords[288] := 'NOORDER';
+ db2_reservedwords[289] := 'NORMALIZE';
+ db2_reservedwords[290] := 'NORMALIZED';
+ db2_reservedwords[291] := 'NOT';
+ db2_reservedwords[292] := 'NULL';
+ db2_reservedwords[293] := 'NULLIF';
+ db2_reservedwords[294] := 'NULLS';
+ db2_reservedwords[295] := 'NUMERIC';
+ db2_reservedwords[296] := 'NUMPARTS';
+ db2_reservedwords[297] := 'OBID';
+ db2_reservedwords[298] := 'OCTET_LENGTH';
+ db2_reservedwords[299] := 'OF';
+ db2_reservedwords[300] := 'OLD';
+ db2_reservedwords[301] := 'OLD_TABLE';
+ db2_reservedwords[302] := 'ON';
+ db2_reservedwords[303] := 'ONLY';
+ db2_reservedwords[304] := 'OPEN';
+ db2_reservedwords[305] := 'OPTIMIZATION';
+ db2_reservedwords[306] := 'OPTIMIZE';
+ db2_reservedwords[307] := 'OPTION';
+ db2_reservedwords[308] := 'OR';
+ db2_reservedwords[309] := 'ORDER';
+ db2_reservedwords[310] := 'OUT';
+ db2_reservedwords[311] := 'OUTER';
+ db2_reservedwords[312] := 'OVER';
+ db2_reservedwords[313] := 'OVERLAPS';
+ db2_reservedwords[314] := 'OVERLAY';
+ db2_reservedwords[315] := 'OVERRIDING';
+ db2_reservedwords[316] := 'PACKAGE';
+ db2_reservedwords[317] := 'PADDED';
+ db2_reservedwords[318] := 'PAGESIZE';
+ db2_reservedwords[319] := 'PARAMETER';
+ db2_reservedwords[320] := 'PART';
+ db2_reservedwords[321] := 'PARTITION';
+ db2_reservedwords[322] := 'PARTITIONED';
+ db2_reservedwords[323] := 'PARTITIONING';
+ db2_reservedwords[324] := 'PARTITIONS';
+ db2_reservedwords[325] := 'PASSWORD';
+ db2_reservedwords[326] := 'PATH';
+ db2_reservedwords[327] := 'PERCENT_RANK';
+ db2_reservedwords[328] := 'PERCENTILE_CONT';
+ db2_reservedwords[329] := 'PERCENTILE_DISC';
+ db2_reservedwords[330] := 'PIECESIZE';
+ db2_reservedwords[331] := 'PLAN';
+ db2_reservedwords[332] := 'POSITION';
+ db2_reservedwords[333] := 'POWER';
+ db2_reservedwords[334] := 'PRECISION';
+ db2_reservedwords[335] := 'PREPARE';
+ db2_reservedwords[336] := 'PREVVAL';
+ db2_reservedwords[337] := 'PRIMARY';
+ db2_reservedwords[338] := 'PRIQTY';
+ db2_reservedwords[339] := 'PRIVILEGES';
+ db2_reservedwords[340] := 'PROCEDURE';
+ db2_reservedwords[341] := 'PROGRAM';
+ db2_reservedwords[342] := 'PSID';
+ db2_reservedwords[343] := 'PUBLIC';
+ db2_reservedwords[344] := 'QUERY';
+ db2_reservedwords[345] := 'QUERYNO';
+ db2_reservedwords[346] := 'RANGE';
+ db2_reservedwords[347] := 'RANK';
+ db2_reservedwords[348] := 'READ';
+ db2_reservedwords[349] := 'READS';
+ db2_reservedwords[350] := 'REAL';
+ db2_reservedwords[351] := 'RECOVERY';
+ db2_reservedwords[352] := 'RECURSIVE';
+ db2_reservedwords[353] := 'REF';
+ db2_reservedwords[354] := 'REFERENCES';
+ db2_reservedwords[355] := 'REFERENCING';
+ db2_reservedwords[356] := 'REFRESH';
+ db2_reservedwords[357] := 'REGR_AVGX';
+ db2_reservedwords[358] := 'REGR_AVGY';
+ db2_reservedwords[359] := 'REGR_COUNT';
+ db2_reservedwords[360] := 'REGR_INTERCEPT';
+ db2_reservedwords[361] := 'REGR_R2';
+ db2_reservedwords[362] := 'REGR_SLOPE';
+ db2_reservedwords[363] := 'REGR_SXX';
+ db2_reservedwords[364] := 'REGR_SXY';
+ db2_reservedwords[365] := 'REGR_SYY';
+ db2_reservedwords[366] := 'RELEASE';
+ db2_reservedwords[367] := 'RENAME';
+ db2_reservedwords[368] := 'REPEAT';
+ db2_reservedwords[369] := 'RESET';
+ db2_reservedwords[370] := 'RESIGNAL';
+ db2_reservedwords[371] := 'RESTART';
+ db2_reservedwords[372] := 'RESTRICT';
+ db2_reservedwords[373] := 'RESULT';
+ db2_reservedwords[374] := 'RESULT_SET_LOCATOR';
+ db2_reservedwords[375] := 'RETURN';
+ db2_reservedwords[376] := 'RETURNS';
+ db2_reservedwords[377] := 'REVOKE';
+ db2_reservedwords[378] := 'RIGHT';
+ db2_reservedwords[379] := 'ROLE';
+ db2_reservedwords[380] := 'ROLLBACK';
+ db2_reservedwords[381] := 'ROLLUP';
+ db2_reservedwords[382] := 'ROUND_CEILING';
+ db2_reservedwords[383] := 'ROUND_DOWN';
+ db2_reservedwords[384] := 'ROUND_FLOOR';
+ db2_reservedwords[385] := 'ROUND_HALF_DOWN';
+ db2_reservedwords[386] := 'ROUND_HALF_EVEN';
+ db2_reservedwords[387] := 'ROUND_HALF_UP';
+ db2_reservedwords[388] := 'ROUND_UP';
+ db2_reservedwords[389] := 'ROUTINE';
+ db2_reservedwords[390] := 'ROW';
+ db2_reservedwords[391] := 'ROW_NUMBER';
+ db2_reservedwords[392] := 'ROWNUMBER';
+ db2_reservedwords[393] := 'ROWS';
+ db2_reservedwords[394] := 'ROWSET';
+ db2_reservedwords[395] := 'RRN';
+ db2_reservedwords[396] := 'RUN';
+ db2_reservedwords[397] := 'SAVEPOINT';
+ db2_reservedwords[398] := 'SCHEMA';
+ db2_reservedwords[399] := 'SCOPE';
+ db2_reservedwords[400] := 'SCRATCHPAD';
+ db2_reservedwords[401] := 'SCROLL';
+ db2_reservedwords[402] := 'SEARCH';
+ db2_reservedwords[403] := 'SECOND';
+ db2_reservedwords[404] := 'SECONDS';
+ db2_reservedwords[405] := 'SECQTY';
+ db2_reservedwords[406] := 'SECURITY';
+ db2_reservedwords[407] := 'SELECT';
+ db2_reservedwords[408] := 'SENSITIVE';
+ db2_reservedwords[409] := 'SEQUENCE';
+ db2_reservedwords[410] := 'SESSION';
+ db2_reservedwords[411] := 'SESSION_USER';
+ db2_reservedwords[412] := 'SET';
+ db2_reservedwords[413] := 'SIGNAL';
+ db2_reservedwords[414] := 'SIMILAR';
+ db2_reservedwords[415] := 'SIMPLE';
+ db2_reservedwords[416] := 'SMALLINT';
+ db2_reservedwords[417] := 'SNAN';
+ db2_reservedwords[418] := 'SOME';
+ db2_reservedwords[419] := 'SOURCE';
+ db2_reservedwords[420] := 'SPECIFIC';
+ db2_reservedwords[421] := 'SPECIFICTYPE';
+ db2_reservedwords[422] := 'SQL';
+ db2_reservedwords[423] := 'SQLEXCEPTION';
+ db2_reservedwords[424] := 'SQLID';
+ db2_reservedwords[425] := 'SQLSTATE';
+ db2_reservedwords[426] := 'SQLWARNING';
+ db2_reservedwords[427] := 'SQRT';
+ db2_reservedwords[428] := 'STACKED';
+ db2_reservedwords[429] := 'STANDARD';
+ db2_reservedwords[430] := 'START';
+ db2_reservedwords[431] := 'STARTING';
+ db2_reservedwords[432] := 'STATEMENT';
+ db2_reservedwords[433] := 'STATIC';
+ db2_reservedwords[434] := 'STATMENT';
+ db2_reservedwords[435] := 'STAY';
+ db2_reservedwords[436] := 'STDDEV_POP';
+ db2_reservedwords[437] := 'STDDEV_SAMP';
+ db2_reservedwords[438] := 'STOGROUP';
+ db2_reservedwords[439] := 'STORES';
+ db2_reservedwords[440] := 'STYLE';
+ db2_reservedwords[441] := 'SUBMULTISET';
+ db2_reservedwords[442] := 'SUBSTRING';
+ db2_reservedwords[443] := 'SUM';
+ db2_reservedwords[444] := 'SUMMARY';
+ db2_reservedwords[445] := 'SYMMETRIC';
+ db2_reservedwords[446] := 'SYNONYM';
+ db2_reservedwords[447] := 'SYSFUN';
+ db2_reservedwords[448] := 'SYSIBM';
+ db2_reservedwords[449] := 'SYSPROC';
+ db2_reservedwords[450] := 'SYSTEM';
+ db2_reservedwords[451] := 'SYSTEM_USER';
+ db2_reservedwords[452] := 'TABLE';
+ db2_reservedwords[453] := 'TABLESAMPLE';
+ db2_reservedwords[454] := 'TABLESPACE';
+ db2_reservedwords[455] := 'THEN';
+ db2_reservedwords[456] := 'TIME';
+ db2_reservedwords[457] := 'TIMESTAMP';
+ db2_reservedwords[458] := 'TIMEZONE_HOUR';
+ db2_reservedwords[459] := 'TIMEZONE_MINUTE';
+ db2_reservedwords[460] := 'TO';
+ db2_reservedwords[461] := 'TRAILING';
+ db2_reservedwords[462] := 'TRANSACTION';
+ db2_reservedwords[463] := 'TRANSLATE';
+ db2_reservedwords[464] := 'TRANSLATION';
+ db2_reservedwords[465] := 'TREAT';
+ db2_reservedwords[466] := 'TRIGGER';
+ db2_reservedwords[467] := 'TRIM';
+ db2_reservedwords[468] := 'TRUE';
+ db2_reservedwords[469] := 'TRUNCATE';
+ db2_reservedwords[470] := 'TYPE';
+ db2_reservedwords[471] := 'UESCAPE';
+ db2_reservedwords[472] := 'UNDO';
+ db2_reservedwords[473] := 'UNION';
+ db2_reservedwords[474] := 'UNIQUE';
+ db2_reservedwords[475] := 'UNKNOWN';
+ db2_reservedwords[476] := 'UNNEST';
+ db2_reservedwords[477] := 'UNTIL';
+ db2_reservedwords[478] := 'UPDATE';
+ db2_reservedwords[479] := 'UPPER';
+ db2_reservedwords[480] := 'USAGE';
+ db2_reservedwords[481] := 'USER';
+ db2_reservedwords[482] := 'USING';
+ db2_reservedwords[483] := 'VALIDPROC';
+ db2_reservedwords[484] := 'VALUE';
+ db2_reservedwords[485] := 'VALUES';
+ db2_reservedwords[486] := 'VAR_POP';
+ db2_reservedwords[487] := 'VAR_SAMP';
+ db2_reservedwords[488] := 'VARCHAR';
+ db2_reservedwords[489] := 'VARIABLE';
+ db2_reservedwords[490] := 'VARIANT';
+ db2_reservedwords[491] := 'VARYING';
+ db2_reservedwords[492] := 'VCAT';
+ db2_reservedwords[493] := 'VERSION';
+ db2_reservedwords[494] := 'VIEW';
+ db2_reservedwords[495] := 'VOLATILE';
+ db2_reservedwords[496] := 'VOLUMES';
+ db2_reservedwords[497] := 'WHEN';
+ db2_reservedwords[498] := 'WHENEVER';
+ db2_reservedwords[499] := 'WHERE';
+ db2_reservedwords[500] := 'WHILE';
+ db2_reservedwords[501] := 'WIDTH_BUCKET';
+ db2_reservedwords[502] := 'WINDOW';
+ db2_reservedwords[503] := 'WITH';
+ db2_reservedwords[504] := 'WITHIN';
+ db2_reservedwords[505] := 'WITHOUT';
+ db2_reservedwords[506] := 'WLM';
+ db2_reservedwords[507] := 'WRITE';
+ db2_reservedwords[508] := 'XMLELEMENT';
+ db2_reservedwords[509] := 'XMLEXISTS';
+ db2_reservedwords[510] := 'XMLNAMESPACES';
+ db2_reservedwords[511] := 'YEAR';
+ db2_reservedwords[512] := 'YEARS';
+end;
+
+initialization
+ db2_InitializeReservedWords;
+finalization
+ db2_reservedwords := nil;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDADBSessionManager.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDADBSessionManager.pas
new file mode 100644
index 0000000..cff7a6d
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDADBSessionManager.pas
@@ -0,0 +1,362 @@
+unit uDADBSessionManager;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ {vcl:}SysUtils, Classes,
+ {RemObjects: SDK}uROSessions,
+ {Data Abstract:}uDAInterfaces, uDAClasses;
+
+type
+ TDAConvertGUIDEvent = function(Sender: TROCustomSessionManager; const aGUID: TGUID): string of object;
+ TDADBSessionManager = class(TROCustomSessionManager)
+ private
+ fSchema: TDASchema;
+ fDeleteSession: string;
+ fUpdateSession: string;
+ fInsertSession: string;
+ fGetSession: string;
+ fClearSessions: string;
+ fGetSessionCount: string;
+ fConnection: string;
+ fFieldNameSessionID: string;
+ fFieldNameCreated: string;
+ fFieldNameLastAccessed: string;
+ fFieldNameData: string;
+ fClearSessionsOnCreate: boolean;
+ fClearSessionsOnDestroy: boolean;
+ fGetAllSessionIDs: string;
+ fOnConvertGUID: TDAConvertGUIDEvent;
+ FForceTransaction: Boolean;
+ FNeedTransactionAction: Boolean;
+ procedure SetSchema(const Value: TDASchema);
+ { Private declarations }
+ procedure BeginTransaction(AConnection: IDAConnection);
+ procedure CommitTransaction(AConnection: IDAConnection);
+ procedure RollbackTransaction(AConnection: IDAConnection);
+ function GetConnection: IDAConnection;
+ protected
+ procedure Notification(AComponent: TComponent; Operation: TOperation); override;
+
+ function DoFindSession(const aSessionID: TGUID; aUpdateTime: Boolean): TROSession; override;
+ procedure DoDeleteSession(const aSessionID: TGUID; IsExpired: boolean); override;
+ procedure DoClearSessions(OnlyExpired: boolean); override;
+ function DoGetSessionCount: integer; override;
+ procedure DoReleaseSession(aSession: TROSession; NewSession: boolean); override;
+ procedure DoGetAllSessions(Dest: TStringList); override;
+
+ function DoConvertGUID(const aGUID: TGUID): string; virtual;
+ public
+ { Public declarations }
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ procedure CheckProperties;
+ published
+ property Schema: TDASchema read fSchema write SetSchema;
+
+ property FieldNameSessionID: string read fFieldNameSessionID write fFieldNameSessionID;
+ property FieldNameCreated: string read fFieldNameCreated write fFieldNameCreated;
+ property FieldNameLastAccessed: string read fFieldNameLastAccessed write fFieldNameLastAccessed;
+ property FieldNameData: string read fFieldNameData write fFieldNameData;
+
+ property InsertSessionCommand: string read fInsertSession write fInsertSession;
+ property UpdateSessionCommand: string read fUpdateSession write fUpdateSession;
+ property DeleteSessionCommand: string read fDeleteSession write fDeleteSession;
+ property ClearSessionsCommand: string read fClearSessions write fClearSessions;
+ property GetSessionCountDataSet: string read fGetSessionCount write fGetSessionCount;
+ property GetSessionDataSet: string read fGetSession write fGetSession;
+ property GetAllSessionIDsDataset: string read fGetAllSessionIDs write fGetAllSessionIDs;
+
+ property ClearSessionsOnCreate: boolean read fClearSessionsOnCreate write fClearSessionsOnCreate default true;
+ property ClearSessionsOnDestroy: boolean read fClearSessionsOnDestroy write fClearSessionsOnDestroy default true;
+
+ property Connection: string read fConnection write fConnection;
+ property OnConvertGUID: TDAConvertGUIDEvent read fOnConvertGUID write fOnConvertGUID;
+ property AutoTransaction: Boolean read FForceTransaction write FForceTransaction default false;
+ property SessionDuration;
+ property SessionCheckInterval;
+ end;
+
+implementation
+
+uses
+ uROClasses, uROTypes;
+
+constructor TDADBSessionManager.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+ fClearSessionsOnDestroy := TRUE;
+ ClearSessionsOnCreate := TRUE;
+
+ fFieldNameSessionID := 'SessionID';
+ fFieldNameCreated := 'Created';
+ fFieldNameLastAccessed := 'LastAccessed';
+ fFieldNameData := 'Data';
+end;
+
+destructor TDADBSessionManager.Destroy;
+begin
+ Schema := nil;
+ inherited;
+end;
+
+procedure TDADBSessionManager.DoClearSessions(OnlyExpired: boolean);
+var
+ lCommand: IDASQLCommand;
+ lConnection: IDAConnection;
+begin
+ lConnection:=GetConnection;
+ lCommand := Schema.NewCommand(lConnection, ClearSessionsCommand);
+ if OnlyExpired then
+ lCommand.ParamByName(FieldNameLastAccessed).Value := ((Now * MinsPerDay) - SessionDuration) / MinsPerDay
+ else
+ lCommand.ParamByName(FieldNameLastAccessed).Value := Now + 30; // 30 days from now. Enough to say all!
+ BeginTransaction(lConnection);
+ try
+ lCommand.Execute();
+ except
+ RollbackTransaction(lConnection);
+ Raise;
+ end;
+ CommitTransaction(lConnection);
+end;
+
+procedure TDADBSessionManager.DoDeleteSession(const aSessionID: TGUID; IsExpired: boolean);
+var
+ lCommand: IDASQLCommand;
+ lConnection: IDAConnection;
+begin
+ {$IFDEF FPC}
+ if IsExpired then lConnection := GetConnection else // remove warning
+ {$ENDIF}
+ lConnection := GetConnection;
+ lCommand := Schema.NewCommand(lConnection, DeleteSessionCommand);
+ lCommand.ParamByName(FieldNameSessionID).Value := DoConvertGUID(aSessionID);
+ BeginTransaction(lConnection);
+ try
+ lCommand.Execute();
+ except
+ RollbackTransaction(lConnection);
+ raise;
+ end;
+ CommitTransaction(lConnection);
+end;
+
+function TDADBSessionManager.DoFindSession(const aSessionID: TGUID; aUpdateTime: Boolean): TROSession;
+var
+ lDataSet: IDADataSet;
+ lData: Binary;
+ lDataField: TDAField;
+ lConnection: IDAConnection;
+begin
+ {$IFDEF FPC}
+ if aUpdateTime then result := nil else //remove warning
+ {$ENDIF}
+ result := nil;
+
+ lConnection := GetConnection;
+ lDataSet := Schema.NewDataset(lConnection, GetSessionDataSet);
+ lDataSet.ParamByName(FieldNameSessionID).AsString := DoConvertGUID(aSessionID);
+
+ BeginTransaction(lConnection);
+ try
+ lDataSet.Open;
+ except
+ RollbackTransaction(lConnection);
+ raise;
+ end;
+ CommitTransaction(lConnection);
+
+ try
+ if lDataSet.EOF then Exit;
+
+ result := DoCreateSession(aSessionID);
+ result.Created := lDataSet.FieldByName(FieldNameCreated).AsDateTime;
+ result.LastAccessed := lDataSet.FieldByName(FieldNameLastAccessed).AsDateTime;
+
+ lData := Binary.Create;
+ try
+ lDataField := lDataSet.FieldByName(fFieldNameData);
+ lDataField.SaveToStream(NewROStream(lData, false));
+ //lData := BinaryFromVariant(lDataSet.FieldByName(FieldNameData).Value);
+ //try
+ lData.Seek(0, soFromBeginning);
+ result.LoadFromStream(lData, true);
+ finally
+ lData.Free;
+ end;
+ finally
+ lDataSet.Close();
+ end;
+end;
+
+procedure TDADBSessionManager.DoGetAllSessions(Dest: TStringList);
+var
+ lDataSet: IDADataSet;
+ lConnection: IDAConnection;
+begin
+ lConnection := GetConnection;
+
+ lDataSet := Schema.NewDataset(lConnection, GetAllSessionIDsDataset);
+ BeginTransaction(lConnection);
+ try
+ lDataSet.Open;
+ except
+ RollbackTransaction(lConnection);
+ raise;
+ end;
+ CommitTransaction(lConnection);
+
+ try
+ while not lDataSet.EOF do try
+ Dest.Add(lDataSet.Fields[0].AsString);
+ finally
+ lDataSet.Next;
+ end;
+ finally
+ lDataSet.Close();
+ end;
+end;
+
+function TDADBSessionManager.DoGetSessionCount: integer;
+var
+ lDataSet: IDADataSet;
+ lConnection: IDAConnection;
+begin
+ lConnection := GetConnection;
+ lDataSet := Schema.NewDataset(lConnection, GetSessionCountDataSet);
+ BeginTransaction(lConnection);
+ try
+ lDataSet.Open;
+ except
+ RollbackTransaction(lConnection);
+ raise;
+ end;
+ CommitTransaction(lConnection);
+ try
+ result := lDataSet.Fields[0].AsInteger;
+ finally
+ lDataSet.Close();
+ end;
+end;
+
+procedure TDADBSessionManager.DoReleaseSession(aSession: TROSession; NewSession: boolean);
+var
+ lCommand: IDASQLCommand;
+ lData: Binary;
+ lConnection: IDAConnection;
+begin
+ inherited;
+ lConnection := GetConnection;
+ if NewSession then begin
+ lCommand := Schema.NewCommand(lConnection, InsertSessionCommand);
+ lCommand.ParamByName(FieldNameCreated).AsDateTime := aSession.Created;
+ end
+ else begin
+ lCommand := Schema.NewCommand(lConnection, UpdateSessionCommand);
+ end;
+ lCommand.ParamByName(FieldNameSessionID).AsString := DoConvertGUID(aSession.SessionID);
+ lCommand.ParamByName(FieldNameLastAccessed).AsDateTime := aSession.LastAccessed;
+ lData := Binary.Create;
+ try
+ aSession.SaveToStream(lData, TRUE);
+ lData.Seek(0, soFromBeginning);
+ lCommand.ParamByName(FieldNameData).LoadFromStream(NewROStream(lData, false));
+ finally
+ lData.Free;
+ end;
+ BeginTransaction(lConnection);
+ try
+ lCommand.Execute();
+ except
+ RollbackTransaction(lConnection);
+ raise;
+ end;
+ CommitTransaction(lConnection);
+ if ((NewSession) and (Assigned(OnSessionCreated))) then OnSessionCreated(aSession);
+ aSession.Free();
+end;
+
+procedure TDADBSessionManager.Notification(AComponent: TComponent; Operation: TOperation);
+begin
+ inherited;
+ if Operation <> opRemove then exit;
+ if AComponent = Schema then Schema := nil;
+end;
+
+procedure TDADBSessionManager.SetSchema(const Value: TDASchema);
+begin
+ if fSchema <> Value then begin
+ fSchema := Value;
+ if Assigned(Schema) then Schema.FreeNotification(self);
+ end;
+end;
+
+function TDADBSessionManager.DoConvertGUID(const aGUID: TGUID): string;
+begin
+ if Assigned(fOnConvertGUID) then
+ try
+ Result:= fOnConvertGUID(Self, aGUID);
+ except
+ Result:= GUIDToString(aGUID);
+ end
+ else
+ Result:= GUIDToString(aGUID);
+end;
+
+procedure TDADBSessionManager.BeginTransaction(AConnection: IDAConnection);
+begin
+ with AConnection do begin
+ FNeedTransactionAction := FForceTransaction and not InTransaction;
+ if FNeedTransactionAction then BeginTransaction;
+ end;
+end;
+
+procedure TDADBSessionManager.CommitTransaction(AConnection: IDAConnection);
+begin
+ if FNeedTransactionAction then AConnection.CommitTransaction;
+end;
+
+procedure TDADBSessionManager.RollbackTransaction(AConnection: IDAConnection);
+begin
+ if FNeedTransactionAction then AConnection.RollbackTransaction;
+end;
+
+function TDADBSessionManager.GetConnection: IDAConnection;
+begin
+ CheckProperties;
+ Result := Schema.ConnectionManager.NewConnection(Connection);
+end;
+
+procedure TDADBSessionManager.CheckProperties;
+begin
+ Check(Schema = nil, Name+'.Schema must be assigned.');
+ Schema.CheckProperties;
+ Check(FieldNameSessionID = '', Name + '.FieldNameSessionID must be set.');
+ Check(FieldNameCreated = '', Name + '.FieldNameCreated must be set.');
+ Check(FieldNameLastAccessed = '', Name + '.FieldNameLastAccessed must be assigned.');
+ Check(FieldNameData = '', Name + '.FieldNameData must be set.');
+ Check(InsertSessionCommand = '', Name + '.InsertSessionCommand must be set.');
+ Check(DeleteSessionCommand = '', Name + '.DeleteSessionCommand must be set.');
+ Check(UpdateSessionCommand = '', Name + '.UpdateSessionCommand must be set.');
+ Check(ClearSessionsCommand = '', Name + '.ClearSessionsCommand must be set.');
+ Check(GetSessionCountDataSet = '', Name + '.GetSessionCountDataSet must be set.');
+ Check(GetSessionDataSet = '', Name + '.GetSessionDataSet must be set.');
+ Check(GetAllSessionIDsDataset = '', Name + '.GetAllSessionIDsDataset must be set.');
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDADataStreamer.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDADataStreamer.pas
new file mode 100644
index 0000000..e39db8f
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDADataStreamer.pas
@@ -0,0 +1,651 @@
+unit uDADataStreamer;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ Classes, SysUtils,
+ uRODL, uROTypes, uROClientIntf,
+ uDAInterfaces, uDAEngine, uDADelta,
+ DataAbstract3_Intf, DataAbstract4_Intf;
+
+const
+ AllRows = -1;
+ DEFAULT_BUFFER_SIZE = 262144; //256kb
+
+type
+ TDADataForAppend = class
+ public
+ TableSchema: TDADataset;
+ EndDataPosition: Integer;
+ CountOfRecordsPosition: Integer;
+ RecordCount: Integer;
+ MaxRowCount: Integer;
+ RealFields: array of integer;
+ end;
+
+type
+ TDAAdapterInitialization = (aiUnknown, aiRead, aiReadFromBeginning, aiWrite);
+
+ TDAWriteOption = (woRows, woSchema);
+ TDAWriteOptions = set of TDAWriteOption;
+
+const
+ AdapterReadModes = [aiRead, aiReadFromBeginning];
+ AdapterWriteModes = [aiWrite];
+
+type
+ TDADataStreamer = class;
+
+ TDADatasetOperation = procedure(DataStreamer: TDADataStreamer; const Datasetname: string; const Dataset: IDADataset) of object;
+ TDADeltaOperation = procedure(DataStreamer: TDADataStreamer; const DeltaName: string; const Delta: IDADelta) of object;
+
+ TDAReadWriteFieldValue = procedure(const aField: TDAField; var Value: Variant) of object;
+
+ { TDADataStreamer }
+ TDADataStreamer = class(TComponent)
+ private
+ fDeltaNames,
+ fDatasetNames: TStringList;
+
+ fOnInitialized,
+ fOnFinalized: TNotifyEvent;
+
+ fOnWriteDataset,
+ fOnReadDataset: TDADatasetOperation;
+
+ fOnWriteDelta,
+ fOnReadDelta: TDADeltaOperation;
+
+ fOnWriteFieldValue,
+ fOnReadFieldValue,
+ fOnBeforeFieldValueSerialization: TDAReadWriteFieldValue;
+
+ fBusy: boolean;
+ fAdapterInitialization: TDAAdapterInitialization;
+ fData: TStream;
+ FBufferSize: cardinal;
+ FSendReducedDelta: boolean;
+
+ function GetDatasetCount: integer;
+ function GetDatasetNames(Index: integer): string;
+ function GetDeltaCount: integer;
+ function GetDeltaNames(Index: integer): string;
+ procedure ClearReferences;
+ procedure CheckCanRead;
+ procedure CheckCanWrite;
+ function GetDatasetInfoObjects(Index: integer): TObject;
+ function GetDeltaInfoObjects(Index: integer): TObject;
+ procedure SetAdapterInitialization(const Value: TDAAdapterInitialization);
+
+ protected
+ // To override
+ function DoCreateStream: TStream; virtual; abstract;
+ procedure DoInitialize(Mode: TDAAdapterInitialization); virtual; abstract;
+ procedure DoFinalize; virtual; abstract;
+
+ function DoWriteDataset(const Source: IDADataset;
+ Options: TDAWriteOptions;
+ MaxRows: integer): integer;overload;
+
+ function DoWriteDataset(const Source: IDADataset;
+ Options: TDAWriteOptions;
+ MaxRows: integer;
+ ADynFieldNames: array of string): integer; overload; virtual; abstract;
+
+ procedure DoWriteDelta(const Source: IDADelta); virtual; abstract;
+
+ procedure DoReadDataset(const DatasetName: string;
+ const Destination: IDADataset;
+ ApplySchema: boolean); virtual;
+
+ procedure DoReadDelta(const DeltaName: string;
+ const Destination: IDADelta); virtual; abstract;
+
+ function DoBeginWriteDataset( const Source: IDADataset; const Schema: TDADataset;
+ Options: TDAWriteOptions; MaxRows: integer;
+ ADynFieldNames: array of string): TDADataForAppend; virtual; abstract;
+
+ function DoWriteDatasetData(const Source: IDADataset; var aDataForAppend: TDADataForAppend; aUnionSourceIndex: Integer = -1): Integer; virtual; abstract;
+ function DoEndWriteDataset(aDataForAppend: TDADataForAppend): Integer;virtual; abstract;
+
+
+ // Internal
+ procedure AddingDataset(const aDatasetName: string; InfoObject: TObject = nil);
+ procedure AddingDelta(const aDeltaName: string; InfoObject: TObject = nil);
+
+ property AdapterInitialization: TDAAdapterInitialization read fAdapterInitialization write SetAdapterInitialization;
+
+ property Data: TStream read fData;
+ property DatasetInfoObjects[Index: integer]: TObject read GetDatasetInfoObjects;
+ property DeltaInfoObjects[Index: integer]: TObject read GetDeltaInfoObjects;
+ procedure SetBufferSize(const Value: cardinal); virtual;
+ public
+ constructor Create(aOwner: TComponent); override;
+ destructor Destroy; override;
+
+ // Initialization methods
+ procedure Initialize({var }Stream: TStream; Mode: TDAAdapterInitialization);
+ procedure Finalize;
+
+ // Writing methods
+ function WriteDataset(const Source: IDADataset;
+ Options: TDAWriteOptions;
+ MaxRows: integer;
+ ADynFieldNames: array of string): integer; overload;
+
+ function WriteDataset(const Source: IDADataset;
+ Options: TDAWriteOptions;
+ MaxRows: integer = AllRows): integer; overload;
+
+ function WriteDataset(Stream: TStream;
+ const Source: IDADataset;
+ Options: TDAWriteOptions;
+ MaxRows: integer = AllRows): integer; overload;
+
+ function WriteDataset(Stream: TStream;
+ const Schema: IDASchema;
+ const Connection: IDAConnection;
+ const DatasetName: string;
+ const ParamNames: array of string;
+ const ParamValues: array of Variant;
+ InitializeStream: boolean = TRUE;
+ FinalizeStream: boolean = TRUE;
+ MaxRows: integer = AllRows): integer; overload;
+
+ function WriteDataset(Stream: TStream;
+ const Schema: IDASchema;
+ const Connection: IDAConnection;
+ const DatasetName: string;
+ InitializeStream: boolean = TRUE;
+ FinalizeStream: boolean = TRUE;
+ MaxRows: integer = AllRows): integer; overload;
+
+ procedure WriteDelta(const Source: IDADataset); overload;
+ procedure WriteDelta(const Source: IDADelta); overload;
+ procedure WriteDelta(Stream: TStream; const Source: IDADataset); overload;
+
+ // Reading methods
+ procedure ReadDelta(const DeltaName: string; const Destination: IDADelta); overload;
+ function ReadDelta(const DeltaName: string): IDADelta; overload;
+ procedure ReadDelta(const Destination: IDADataset); overload;
+ procedure ReadDelta(Stream: TStream;
+ const Destination: IDADelta;
+ DeltaName: string = '';
+ ReadFromBeginning: boolean = TRUE); overload;
+
+ procedure ReadDataset(const DatasetName: string;
+ const Destination: IDADataset;
+ ApplySchema: boolean = FALSE;
+ LoadRecords: boolean = TRUE); overload;
+ procedure ReadDataset(Stream: TStream;
+ const Destination: IDADataset;
+ ApplySchema: boolean = FALSE;
+ DatasetName: string = '';
+ LoadRecords: boolean = TRUE;
+ ReadFromBeginning: boolean = TRUE); overload;
+
+ function BeginWriteDataset(const Source: IDADataset; const Schema: TDADataset;
+ Options: TDAWriteOptions; MaxRows: integer;
+ ADynFieldNames: array of string): TDADataForAppend;
+ function WriteDatasetData(const Source: IDADataset; var aDataForAppend: TDADataForAppend; aUnionSourceIndex: Integer = -1): Integer;
+ function EndWriteDataset(aDataForAppend: TDADataForAppend): Integer;
+
+
+ // Misc
+ function FindDatasetIndex(const aName: string): integer;
+ function FindDeltaIndex(const aName: string): integer;
+
+ function GetDatasetIndex(const aName: string): integer;
+ function GetDeltaIndex(const aName: string): integer;
+
+ function GetTargetDataType: TRODataType; virtual; abstract;
+ function HasReducedDelta: Boolean; virtual;
+ property DatasetCount: integer read GetDatasetCount;
+ property DatasetNames[Index: integer]: string read GetDatasetNames;
+
+ property DeltaCount: integer read GetDeltaCount;
+ property DeltaNames[Index: integer]: string read GetDeltaNames;
+
+ property TargetDataType: TRODataType read GetTargetDataType;
+ property BufferSize: Cardinal read FBufferSize write SetBufferSize default DEFAULT_BUFFER_SIZE;
+ property SendReducedDelta: boolean read FSendReducedDelta write FSendReducedDelta default False;
+ published
+ property OnInitialized: TNotifyEvent read fOnInitialized write fOnInitialized;
+ property OnFinalized: TNotifyEvent read fOnFinalized write fOnFinalized;
+
+ property OnReadDataset: TDADatasetOperation read fOnReadDataset write fOnReadDataset;
+ property OnWriteDataset: TDADatasetOperation read fOnWriteDataset write fOnWriteDataset;
+
+ property OnReadDelta: TDADeltaOperation read fOnReadDelta write fOnReadDelta;
+ property OnWriteDelta: TDADeltaOperation read fOnWriteDelta write fOnWriteDelta;
+
+ property OnReadFieldValue: TDAReadWriteFieldValue read fOnReadFieldValue write fOnReadFieldValue;
+ property OnWriteFieldValue: TDAReadWriteFieldValue read fOnWriteFieldValue write fOnWriteFieldValue;
+ property OnBeforeFieldValueSerialization: TDAReadWriteFieldValue read fOnBeforeFieldValueSerialization write fOnBeforeFieldValueSerialization;
+ end;
+
+ TDADataAdapter = TDADataStreamer;
+
+implementation
+
+{ TDADataStreamer }
+
+constructor TDADataStreamer.Create(aOwner: TComponent);
+begin
+ inherited;
+ FBufferSize := DEFAULT_BUFFER_SIZE;
+ fDeltaNames := TStringList.Create;
+ { Doesn't work correctly because it messes up the order in which the server processes the deltas!!!!
+ Fixed the methods that add elements to this down.
+
+ fDeltaNames.Sorted := TRUE;
+ fDeltaNames.Duplicates := dupError;}
+
+ fDatasetNames := TStringList.Create;
+ { Fixed for consistency with the above
+
+ fDatasetNames.Sorted := TRUE;
+ fDatasetNames.Duplicates := dupError;}
+end;
+
+destructor TDADataStreamer.Destroy;
+begin
+ ClearReferences;
+
+ FreeAndNIL(fDeltaNames);
+ FreeAndNIL(fDatasetNames);
+
+ inherited;
+end;
+
+function TDADataStreamer.GetDatasetCount: integer;
+begin
+ result := fDatasetNames.Count;
+end;
+
+function TDADataStreamer.GetDatasetNames(Index: integer): string;
+begin
+ result := fDatasetNames[Index];
+end;
+
+function TDADataStreamer.GetDeltaCount: integer;
+begin
+ result := fDeltaNames.Count;
+end;
+
+function TDADataStreamer.GetDeltaNames(Index: integer): string;
+begin
+ result := fDeltaNames[Index];
+end;
+
+procedure TDADataStreamer.ClearReferences;
+var
+ i: integer;
+begin
+ for i := 0 to (fDatasetNames.Count - 1) do
+ if (fDatasetNames.Objects[i] <> nil) then fDatasetNames.Objects[i].Free;
+
+ fDatasetNames.Clear;
+
+ for i := 0 to (fDeltaNames.Count - 1) do
+ if (fDeltaNames.Objects[i] <> nil) then fDeltaNames.Objects[i].Free;
+
+ fDeltaNames.Clear;
+end;
+
+procedure TDADataStreamer.Initialize({var }Stream: TStream; Mode: TDAAdapterInitialization);
+begin
+ if fBusy then
+ raise EDAException.Create('Cannot Initialize Streamer that is already in use.');
+
+ ClearReferences;
+ fAdapterInitialization := aiUnknown;
+ fData := nil;
+
+ if Mode = aiUnknown then raise Exception.Create('Invalid DataStreamer initialization parameter.');
+ if (Stream = nil) then raise Exception.Create('Stream parameter must assigned.');
+ if (Mode in AdapterReadModes) and (Stream.Size = 0) then raise Exception.Create('Stream may not me empty for Read mode.');
+
+ try
+ if (Mode = aiReadFromBeginning) then Stream.Position := 0;
+
+ // Sets internal references
+ fData := Stream;
+ AdapterInitialization := Mode;
+
+ fDatasetNames.Clear;
+
+ DoInitialize(Mode); // Calls descendant's implementation
+
+ if Assigned(fOnInitialized) then fOnInitialized(Self);
+
+ fBusy := true;
+ except
+ ClearReferences;
+ raise;
+ end;
+end;
+
+procedure TDADataStreamer.Finalize;
+begin
+ DoFinalize; // Calls descendant's implementation
+
+ if Assigned(fOnFinalized) then fOnFinalized(Self);
+ fBusy := false;
+end;
+
+procedure TDADataStreamer.CheckCanRead;
+begin
+ if not (AdapterInitialization in AdapterReadModes) then raise Exception.Create('Adapter was not initialized for this operation');
+end;
+
+procedure TDADataStreamer.CheckCanWrite;
+begin
+ if not (AdapterInitialization in AdapterWriteModes) then raise Exception.Create('Adapter was not initialized for this operation');
+end;
+
+procedure TDADataStreamer.ReadDelta(const DeltaName: string;
+ const Destination: IDADelta);
+begin
+ CheckCanRead;
+ if Assigned(fOnReadDelta) then fOnReadDelta(Self, DeltaName, Destination);
+
+ DoReadDelta(DeltaName, Destination); // Calls descendant's implementation
+end;
+
+function TDADataStreamer.WriteDataset(const Source: IDADataset; Options: TDAWriteOptions;
+ MaxRows: integer = AllRows): integer;
+begin
+ Result := WriteDataset(Source, Options, MaxRows, []);
+end;
+
+procedure TDADataStreamer.WriteDelta(const Source: IDADataset);
+var
+ deltaowner: IDADeltaOwner;
+ delta: IDADelta;
+begin
+ if not Supports(Source, IDADeltaOwner, deltaowner)
+ then raise Exception.Create('Source does not have a delta')
+ else delta := deltaowner.GetDelta;
+
+ CheckCanWrite;
+ if Assigned(fOnWriteDelta) then fOnWriteDelta(Self, delta.LogicalName, delta);
+
+ DoWriteDelta(delta); // Calls descendant's implementation
+end;
+
+procedure TDADataStreamer.AddingDataset(const aDatasetName: string; InfoObject: TObject = nil);
+var i : integer;
+begin
+ i := fDatasetNames.IndexOf(aDatasetName);
+ if (i>=0)
+ then raise Exception.Create('A dataset called "'+aDatasetName+'" is already present')
+ else fDatasetNames.AddObject(aDatasetName, InfoObject)
+end;
+
+procedure TDADataStreamer.AddingDelta(const aDeltaName: string; InfoObject: TObject = nil);
+var i : integer;
+begin
+ i := fDeltaNames.IndexOf(aDeltaName);
+ if (i>=0)
+ then raise Exception.Create('A delta called "'+aDeltaName+'" is already present')
+ else fDeltaNames.AddObject(aDeltaName, InfoObject)
+end;
+
+function TDADataStreamer.GetDatasetInfoObjects(Index: integer): TObject;
+begin
+ result := fDatasetNames.Objects[Index]
+end;
+
+function TDADataStreamer.GetDeltaInfoObjects(Index: integer): TObject;
+begin
+ result := fDeltaNames.Objects[Index]
+end;
+
+function TDADataStreamer.GetDatasetIndex(const aName: string): integer;
+begin
+ result := FindDatasetIndex(aName);
+ if (result = -1) then raise Exception.Create('Unknown dataset ' + aName);
+end;
+
+function TDADataStreamer.GetDeltaIndex(const aName: string): integer;
+begin
+ result := FindDeltaIndex(aName);
+ if (result = -1) then raise Exception.Create('Unknown delta ' + aName);
+end;
+
+procedure TDADataStreamer.ReadDataset(const DatasetName: string;
+ const Destination: IDADataset; ApplySchema: boolean = FALSE; LoadRecords: boolean = TRUE);
+var editable: IDAEditableDataset;
+begin
+ CheckCanRead;
+ if Assigned(fOnReadDataset) then fOnReadDataset(Self, DatasetName, Destination);
+
+ editable := Destination as IDAEditableDataset;
+
+ Destination.DisableControls;
+ try
+ editable.DisableEventHandlers;
+ try
+ if ApplySchema then begin
+ if Destination.Active then Destination.Close;
+ DoReadDataset(DatasetName, Destination, TRUE);
+ end;
+
+ if LoadRecords then
+ DoReadDataset(DatasetName, Destination, FALSE);
+ finally
+ editable.EnableEventHandlers;
+ end;
+ if LoadRecords then editable.Dataset.Resync([]);
+ finally
+ Destination.EnableControls;
+ end;
+end;
+
+procedure TDADataStreamer.ReadDataset(Stream: TStream;
+ const Destination: IDADataset;
+ ApplySchema: boolean = FALSE;
+ DatasetName: string = '';
+ LoadRecords: boolean = TRUE;
+ ReadFromBeginning: boolean = TRUE);
+var
+ nme: string;
+begin
+ if ReadFromBeginning then
+ Initialize(Stream, aiReadFromBeginning)
+ else
+ Initialize(Stream, aiRead);
+
+ try
+ if (DatasetName = '') then
+ nme := DatasetNames[0]
+ else
+ nme := DatasetName;
+
+ ReadDataset(nme, Destination, ApplySchema, LoadRecords);
+ finally
+ Finalize;
+ end;
+end;
+
+procedure TDADataStreamer.ReadDelta(Stream: TStream;
+ const Destination: IDADelta;
+ DeltaName: string = '';
+ ReadFromBeginning: boolean = TRUE);
+var
+ nme: string;
+begin
+ if ReadFromBeginning then
+ Initialize(Stream, aiReadFromBeginning)
+ else
+ Initialize(Stream, aiRead);
+
+ try
+ if (DeltaName <> '') then
+ nme := DeltaName
+ else
+ nme := DeltaNames[0];
+ ReadDelta(nme, Destination);
+ finally
+ Finalize;
+ end;
+end;
+
+function TDADataStreamer.WriteDataset(Stream: TStream;
+ const Source: IDADataset; Options: TDAWriteOptions;
+ MaxRows: integer): integer;
+begin
+ Initialize(Stream, aiWrite);
+ try
+ result := WriteDataset(Source, Options, MaxRows);
+ finally
+ Finalize;
+ end;
+end;
+
+procedure TDADataStreamer.WriteDelta(Stream: TStream;
+ const Source: IDADataset);
+begin
+ Initialize(Stream, aiWrite);
+ try
+ WriteDelta(Source);
+ finally
+ Finalize;
+ end;
+end;
+
+procedure TDADataStreamer.WriteDelta(const Source: IDADelta);
+begin
+ DoWriteDelta(Source);
+end;
+
+procedure TDADataStreamer.ReadDelta(const Destination: IDADataset);
+var
+ deltaowner: IDADeltaOwner;
+ delta: IDADelta;
+begin
+ if not Supports(Destination, IDADeltaOwner, deltaowner)
+ then raise Exception.Create('Destination does not have a delta')
+ else delta := deltaowner.GetDelta;
+
+ ReadDelta(delta.LogicalName, delta);
+end;
+
+function TDADataStreamer.WriteDataset(Stream: TStream;
+ const Schema: IDASchema; const Connection: IDAConnection;
+ const DatasetName: string; const ParamNames: array of string;
+ const ParamValues: array of Variant; InitializeStream: boolean = TRUE;
+ FinalizeStream: boolean = TRUE; MaxRows: integer = AllRows): integer;
+var
+ ds: IDADataset;
+begin
+ if InitializeStream then Initialize(Stream, aiWrite);
+ try
+ ds := Schema.NewDataset(Connection, DatasetName, ParamNames, ParamValues, TRUE);
+ result := WriteDataset(ds, [woRows], MaxRows);
+ finally
+ if FinalizeStream then Finalize;
+ end;
+end;
+
+function TDADataStreamer.WriteDataset(Stream: TStream;
+ const Schema: IDASchema; const Connection: IDAConnection;
+ const DatasetName: string; InitializeStream, FinalizeStream: boolean;
+ MaxRows: integer): integer;
+begin
+ result := WriteDataset(Stream, Schema, Connection, DatasetName, [], [],
+ InitializeStream, FinalizeStream, MaxRows);
+end;
+
+procedure TDADataStreamer.SetAdapterInitialization(
+ const Value: TDAAdapterInitialization);
+begin
+ fAdapterInitialization := Value;
+end;
+
+function TDADataStreamer.ReadDelta(const DeltaName: string): IDADelta;
+begin
+ result := NewDelta(DeltaName);
+ ReadDelta(DeltaName, Result);
+end;
+
+function TDADataStreamer.FindDatasetIndex(const aName: string): integer;
+begin
+ result := fDatasetNames.IndexOf(aName);
+end;
+
+function TDADataStreamer.FindDeltaIndex(const aName: string): integer;
+begin
+ result := fDeltaNames.IndexOf(aName);
+end;
+
+procedure TDADataStreamer.DoReadDataset(const DatasetName: string;
+ const Destination: IDADataset; ApplySchema: boolean);
+begin
+ if Destination.Active and ApplySchema then raise Exception.Create('Cannot apply a schema if the destination is active');
+end;
+
+procedure TDADataStreamer.SetBufferSize(const Value: cardinal);
+begin
+ FBufferSize := Value;
+end;
+
+function TDADataStreamer.HasReducedDelta: Boolean;
+begin
+ Result:=False;
+end;
+
+function TDADataStreamer.DoWriteDataset(const Source: IDADataset;
+ Options: TDAWriteOptions; MaxRows: integer): integer;
+begin
+ Result:= DoWriteDataset(Source, Options, MaxRows, []);
+end;
+
+function TDADataStreamer.WriteDataset(const Source: IDADataset;
+ Options: TDAWriteOptions; MaxRows: integer;
+ ADynFieldNames: array of string): integer;
+begin
+ CheckCanWrite;
+ if Assigned(fOnWriteDataset) then fOnWriteDataset(Self, Source.LogicalName, Source);
+
+ result := DoWriteDataset(Source, Options, MaxRows, ADynFieldNames); // Calls descendant's implementation
+end;
+
+function TDADataStreamer.BeginWriteDataset(const Source: IDADataset; const Schema: TDADataset;
+ Options: TDAWriteOptions; MaxRows: integer;
+ ADynFieldNames: array of string): TDADataForAppend;
+begin
+ result := DoBeginWriteDataset(Source, Schema, Options, MaxRows, ADynFieldNames); // Calls descendant's implementation
+end;
+
+function TDADataStreamer.WriteDatasetData(const Source: IDADataset; var aDataForAppend: TDADataForAppend; aUnionSourceIndex: Integer = -1): Integer;
+begin
+ CheckCanWrite;
+ if Assigned(fOnWriteDataset) then fOnWriteDataset(Self, Source.LogicalName, Source);
+
+ result := DoWriteDatasetData(Source, aDataForAppend, aUnionSourceIndex); // Calls descendant's implementation
+end;
+
+function TDADataStreamer.EndWriteDataset(aDataForAppend: TDADataForAppend): Integer;
+begin
+ result := DoEndWriteDataset(aDataForAppend); // Calls descendant's implementation
+end;
+
+
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDADataTable.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDADataTable.pas
new file mode 100644
index 0000000..9b39b7a
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDADataTable.pas
@@ -0,0 +1,4992 @@
+unit uDADataTable;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ Classes, DB, Contnrs, SysUtils,
+ {$IFDEF MSWINDOWS}ActiveX,{$ENDIF}
+ uRODL, uROTypes, uROClasses, uROClientIntf, uRODynamicRequest,uDAExpressionEvaluator,
+ uDAInterfaces, uDAClasses, uDAEngine, uDAScriptingProvider, uDADataStreamer, uDADelta,
+ DataAbstract3_Intf, DataAbstract4_Intf,uDAWhere;
+
+const
+ RecIDFieldName = 'RecID'; // Do not change!
+ AllChanges = [ctInsert, ctUpdate, ctDelete];
+
+type
+ //ToDo: remove and replace these three with TRO(Dynamic)Request*
+ TDARemoteRequest = TRODynamicRequest;
+ TDARemoteRequestParam = TRORequestParam;
+ TDARemoteRequestParams = TRORequestParamCollection;
+
+ { Other types }
+ float = double;
+ datetime = TDateTime;
+
+ TDADataTable = class;
+ TDatasetClass = class of TDataset;
+ TDADataTableRules = class;
+
+ TDADataTableNotifyEvent = procedure(DataTable: TDADataTable) of object;
+ TDADataTableFilterEvent = procedure(DataTable: TDADataTable; var Accept: Boolean) of object;
+ TDADataTableErrorEvent = procedure(DataTable: TDADataTable; Error: EDatabaseError; var Action: TDataAction) of object;
+ TDADataTableDynamicMethodEvent = procedure(DataTable: TDADataTable; const aMessage: IROMessage) of object;
+ TDADataTableRemoteRequestEvent = procedure(DataTable: TDADataTable; Request: TDARemoteRequest) of object;
+ TDADataTableDataChangeEvent = procedure(DataTable: TDADataTable; Field: TDAField) of object;
+ TDADataRequestStreamEvent = procedure(DataTable: TDADataTable; Stream: TStream) of object;
+
+ //TDADelta = class;
+
+ TDAApplyUpdatesError = procedure(DataTable: TDADataTable; const Delta: IDADelta; var Ignore: boolean) of object;
+ TDAAfterApplyUpdatesEvent = procedure(DataTable: TDADataTable; const Delta: IDADelta) of object;
+ TDABeforeApplyUpdatesEvent = procedure(DataTable: TDADataTable; const Delta: IDADelta) of object;
+
+ TDADetailOption = (dtCascadeOpenClose,
+ dtCascadeApplyUpdates,
+ dtAutoFetch,
+ dtCascadeDelete,
+ dtCascadeUpdate,
+ dtDisableLogOfCascadeDeletes,
+ dtDisableLogOfCascadeUpdates,
+ dtIncludeInAllInOneFetch);
+ TDADetailOptions = set of TDADetailOption;
+
+ TDAMasterOption = (moCascadeOpenClose,
+ moCascadeApplyUpdates,
+ moCascadeDelete,
+ moCascadeUpdate,
+ moDisableLogOfCascadeDeletes,
+ moDisableLogOfCascadeUpdates,
+ moAllInOneFetch);
+
+ TDAMasterOptions = set of TDAMasterOption;
+
+ TDAStreamingOption = (soIgnoreStreamSchema, soDisableEventsWhileStreaming);
+ TDAStreamingOptions = set of TDAStreamingOption;
+
+ TDARemoteUpdatesOption = (ruoOnPost);
+ TDARemoteUpdatesOptions = set of TDARemoteUpdatesOption;
+
+ TDABaseRemoteDataAdapter = class(TComponent)
+ protected
+ function GetDataStreamer: TDADataStreamer; virtual; abstract;
+
+ { backward compatibility: to provide access to these in the legacy events }
+ function Get_GetSchemaCall: TDARemoteRequest; virtual;
+ function Get_GetDataCall: TDARemoteRequest; virtual;
+ function Get_UpdateDataCall: TDARemoteRequest; virtual;
+ function Get_GetScriptsCall: TDARemoteRequest; virtual;
+ public
+ function ApplyUpdates(aTables: array of TDADataTable; aRefetchAll: boolean = false): boolean; virtual; abstract;
+ procedure Fill(aTables: array of TDADataTable; aSaveCursor: boolean; aIncludeSchema: boolean); overload; virtual; abstract;
+ procedure Fill(aTables: array of TDADataTable; aTableRequestInfoArray: array of TableRequestInfo; aSaveCursor: boolean=false;aIncludeSchema: boolean=false); overload; virtual; abstract;
+ procedure Fill(aTables: array of TDADataTable; aWhereClauses : array of TDAWhereExpression; aSaveCursor: boolean=false; aIncludeSchema: boolean=false); overload; virtual; abstract;
+ procedure FillSchema(aTables: array of TDADataTable; aPreserveLookupFields: boolean = false; areserveClientCalcFields : boolean = false); virtual; abstract;
+ procedure FillScripts(aTables: array of TDADataTable); virtual; abstract;
+
+ property DataStreamer: TDADataStreamer read GetDataStreamer;
+ end;
+
+ { IDADataTableDataset }
+ IDADataTableDataset = interface
+ ['{3BADA4F8-BA32-411C-A7CD-DEBD10A4AF06}']
+ function GetDataTable: TDADataTable;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ end;
+
+ { IDARangeController }
+ IDARangeController = interface
+ ['{5A182854-B824-496F-80C2-6F8064003E13}']
+ procedure ApplyRange; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure CancelRange; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetRange(const StartValues, EndValues: array of const); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure EditRangeEnd; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure EditRangeStart; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetRangeEnd; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetRangeStart; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ end;
+
+ { IDANativeDatasetStreaming }
+ TDANativeDataFormat = (ndfBinary, ndfXML);
+ IDANativeDatasetStreaming = interface
+ ['{00B37B20-23DA-49A5-BB5D-B96E50C210F4}']
+ procedure NativeSaveToFile(const aFileName : string; DataFormat : TDANativeDataFormat = ndfBinary);
+ procedure NativeLoadFromFile(const aFileName : string);
+ procedure NativeSaveToStream(aStream : TStream; DataFormat : TDANativeDataFormat = ndfBinary);
+ procedure NativeLoadFromStream(aStream : TStream);
+ end;
+
+
+ { TDADataSource }
+ TDADataSource = class(TDABaseDataSource)
+ private
+ fDataTable: TDADataTable;
+
+ function GetDataset: TDataset;
+ procedure SetDataTable(const Value: TDADataTable);
+ procedure SetDataset(const Value: TDataset);
+ function GetOpening: boolean;
+ function GetActive: boolean;
+
+ protected
+ procedure Notification(AComponent: TComponent; Operation: TOperation); override;
+
+ property Dataset: TDataset read GetDataset write SetDataset; // hide base class property
+ public
+ constructor Create(aOwner: TComponent); override;
+ destructor Destroy; override;
+
+ property Opening: boolean read GetOpening;
+ property Active: boolean read GetActive;
+ published
+ property DataTable: TDADataTable read fDataTable write SetDataTable;
+ end;
+
+ { TDADataTable }
+ TDASortDirection = (sdAscending, sdDescending);
+ TDAMasterMappingMode = (mmDataRequest, mmParams, mmWhere);
+
+ TDASortDirectionArray = array of TDASortDirection;
+ TStringArray = array of string;
+
+ IDADataTableScriptingProvider = interface(IDAScriptingProvider)
+ ['{E16B7359-C733-4F09-96A8-10527CFABB6D}']
+ procedure RunDataTableScript(aDataTable: TDADataTable; const aScript: string; const aMethod: string; aLanguage:TROSEScriptLanguage);
+ end;
+
+ { IDAClonedCursorsSupport }
+ IDAClonedCursorsSupport = interface(IDASimpleClonedCursorsSupport)
+ ['{A43A70A2-7438-4C21-B2E2-A5212082EFD0}']
+ function GetCloneSource : TDADataTable; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure CloneCursor(Source : TDADataTable); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetUsingClonedCursor : boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ property CloneSource : TDADataTable read GetCloneSource;
+ property UsingClonedCursor : boolean read GetUsingClonedCursor;
+ end;
+
+ TAutoIncArray = array of Int64;
+ TDALocalUpdateDataTransactionEvent = procedure(Sender: TObject; var aUseDefaultTransactionLogic: Boolean) of object;
+
+
+ {$WARN SYMBOL_DEPRECATED OFF}
+ TDADataTable = class(TScriptableComponent, {$IFDEF MSWINDOWS}ISupportErrorInfo,{$ENDIF} IDADataTable, IDASQLCommand, IDADataset, IDAEditableDataset, IDADeltaOwner, IDADataReader, IDADatasetEx,IDAClonedCursorsSupport)
+ private
+ fCurrRecId: integer;
+
+ fMasterLink: TMasterDataLink;
+
+ fDelta: IDADelta;
+ fWhere: TDAWhere;
+
+ fRecIDField: TIntegerField;
+
+ fStreamedActive,
+ fRefreshing,
+ fOpening: boolean;
+
+ fDataset: TDataset;
+
+ fFields: TDAFieldCollection;
+
+ fAfterEdit: TDADataTableNotifyEvent;
+ fAfterInsert: TDADataTableNotifyEvent;
+ fAfterDelete: TDADataTableNotifyEvent;
+ fBeforeScroll: TDADataTableNotifyEvent;
+ fAfterClose: TDADataTableNotifyEvent;
+ fBeforePost: TDADataTableNotifyEvent;
+ fAfterScroll: TDADataTableNotifyEvent;
+ fBeforeCancel: TDADataTableNotifyEvent;
+ fBeforeRefresh: TDADataTableNotifyEvent;
+ fBeforeOpen: TDADataTableNotifyEvent;
+ fAfterRefresh: TDADataTableNotifyEvent;
+ fAfterOpen: TDADataTableNotifyEvent;
+ fBeforeEdit: TDADataTableNotifyEvent;
+ fBeforeClose: TDADataTableNotifyEvent;
+ fBeforeDelete: TDADataTableNotifyEvent;
+ fAfterPost: TDADataTableNotifyEvent;
+ fOnCalcFields: TDADataTableNotifyEvent;
+ fOnNewRecord: TDADataTableNotifyEvent;
+ fAfterCancel: TDADataTableNotifyEvent;
+ fBeforeInsert: TDADataTableNotifyEvent;
+ fOnFilterRecord: TDADataTableFilterEvent;
+ fOnEditError: TDADataTableErrorEvent;
+ fOnDeleteError: TDADataTableErrorEvent;
+ fOnPostError: TDADataTableErrorEvent;
+ fBeforeFieldChange: TDADataTableDataChangeEvent;
+ fAfterFieldChange: TDADataTableDataChangeEvent;
+ fLogChanges: boolean;
+
+ fRemoteFetchEnabled: boolean;
+ fSortDirections: TDASortDirectionArray;
+ fSortFieldNames: TStringArray;
+ fParams: TDAParamCollection;
+
+ fFetchedMasters: TStringList;
+
+ fMasterParamsMappings,
+ fMasterRequestMappings: TStringList;
+ fDynamicWhere: TDAWhereBuilder;
+
+ fDetailOptions: TDADetailOptions;
+ fMasterOptions: TDAMasterOptions;
+ fLogicalName: string;
+ fClosing: boolean;
+ fFetching: boolean;
+ fStreaming: boolean;
+ fOnAfterSchemaCall: TDADataTableRemoteRequestEvent;
+ fOnAfterDataRequestCall: TDADataTableRemoteRequestEvent;
+ fOnBeforeSchemaCall: TDADataTableRemoteRequestEvent;
+ fOnBeforeDataRequestCall: TDADataTableRemoteRequestEvent;
+ fOnBeforeDataUpdateCall: TDADataTableRemoteRequestEvent;
+ fOnAfterDataUpdateCall: TDADataTableRemoteRequestEvent;
+ //fOnApplyUpdatesError: TDAApplyUpdatesError;
+ fOnReceiveDataStream: TDADataRequestStreamEvent;
+ fStreamingOptions: TDAStreamingOptions;
+ fRemoteUpdateOptions: TDARemoteUpdatesOptions;
+ fLocalSchema: TDASchema;
+ fLocalConnection: string;
+
+ fBusinessRulesID: string;
+ fBusinessRules: TDADataTableRules;
+ fFieldRules: TObjectList;
+
+ fAutoIncs : TAutoIncArray;
+ fOnAfterApplyUpdates: TDADataTableNotifyEvent;
+ fOnBeforeApplyUpdates: TDABeforeApplyUpdatesEvent;
+ fMasterMappingMode: TDAMasterMappingMode;
+ fMaxRecords: integer;
+ fOnBeforeMergeDelta: TDADataTableNotifyEvent;
+ fOnAfterMergeDelta: TDADataTableNotifyEvent;
+ fStoreActive: boolean;
+ fScriptCode: TStrings;
+ fOnBeforeScriptCall: TDADataTableRemoteRequestEvent;
+ fOnAfterScriptCall: TDADataTableRemoteRequestEvent;
+
+ fOpenTick: cardinal;
+ fAfterOpenIDataset: TDAAfterOpenDatasetEvent;
+ fBeforeOpenIDataset: TDABeforeOpenDatasetEvent;
+
+ fRemoteDataAdapter: TDABaseRemoteDataAdapter;
+ fLocalDataStreamer: TDADataStreamer;
+ fCustomAttributes: TStrings;
+ fExpressionEvaluator: TDAStdExpressionEvaluator;
+ fHasReducedDelta: Boolean;
+ fOnLocalUpdateDataBeginTransaction: TDALocalUpdateDataTransactionEvent;
+ fOnLocalUpdateDataRollBackTransaction: TDALocalUpdateDataTransactionEvent;
+ fOnLocalUpdateDataCommitTransaction: TDALocalUpdateDataTransactionEvent;
+ procedure SetLocalDataStreamer(const Value: TDADataStreamer);
+ procedure SetRemoteDataAdapter(const Value: TDABaseRemoteDataAdapter);
+
+ procedure SetLogChanges(const Value: boolean);
+ function GetDataset: TDataset; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetFields: TDAFieldCollection; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetFields(const Value: TDAFieldCollection);
+ function GetActive: boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetActive(Value: boolean); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetLogChanges: boolean;
+ procedure SetParams(const Value: TDAParamCollection);
+ function GetEditing: boolean;
+ function GetMasterRequestMappings: TStrings;
+ procedure SetMasterRequestMappings(const Value: TStrings);
+
+ procedure TempSetRowRecIDValue(Sender: TDataset);
+
+ procedure SetLocalSchema(const Value: TDASchema);
+ procedure LoadFromLocalSchema;
+ procedure LoadLocalSchema(aPreserveLookupFields: Boolean; aPreserveClientCalcFields: Boolean);
+
+ procedure SetBusinessRulesID(const Value: string);
+ function GetHasDelta: boolean;
+ function GetHasDeltaRecursive: boolean;
+ function GetRecNo: integer;
+ procedure SetRecNo(const Value: integer);
+
+ { published property accessors cannot be safecall, so we need wrappers: }
+ function GetFieldsProperty: TDAFieldCollection;
+ function GetActiveProperty: boolean;
+ procedure SetActiveProperty(const Value: boolean);
+ function GetParamsProperty: TDAParamCollection;
+ function GetMasterParamsMappings: TStrings;
+ procedure SetMasterParamsMappings(const Value: TStrings);
+
+ procedure PackAllInOneFetchInfoArray(aDataTable : TDADataTable; OutArray: TDADatasetRequestInfoArray);
+ procedure OnWhereChange(Sender: TObject);
+ procedure SetScriptCode(const Value: TStrings);
+ function GetDeltaInitialized: boolean;
+ procedure SetCustomAttributes(const Value: TStrings);
+ function Local_ApplyUpdates(RefetchAll: boolean = FALSE): boolean;
+ procedure InternalCancelUpdateChange(Change: TDADeltaChange);
+ procedure ExpessionEvaluatorGetValue(Sender: TDAExpressionEvaluator; const aIdentifier: string; out aValue: Variant);
+ procedure DoCascadeRemoteAllInOneFetch(aStreamer: TDADataStreamer);
+ function TriggerTransactionEvent(aEvent: TDALocalUpdateDataTransactionEvent): boolean;
+ protected
+ function CreateAutoIncArray: TAutoIncArray;
+ function GetAutoIncs: TAutoIncArray;
+ procedure SetAutoIncs(const Value: TAutoIncArray);
+
+ property AutoIncs: TAutoIncArray read GetAutoIncs write SetAutoIncs;
+
+ function GetCurrRecId: integer;
+ procedure SetCurrRecId(const Value: integer);
+
+ procedure Loaded; override;
+
+ // To override
+ function GetDatasetClass: TDatasetClass; virtual; abstract;
+ procedure CreateInternalFields(aDataset: TDataset; someFieldDefinitions: TDAFieldCollection); virtual;
+ procedure DoRefresh(aDataset: TDataset);
+ procedure DoSort(const FieldNames: array of string; const Directions: array of TDASortDirection); virtual; abstract;
+
+ procedure SetMasterSource(const Value: TDADataSource); virtual;
+ function GetMasterSource: TDADataSource; virtual; abstract;
+ procedure SetDetailsFields(const Value: string); virtual; abstract;
+ procedure SetMasterFields(const Value: string); virtual;
+ function GetDetailFields: string; virtual; abstract;
+ function GetMasterFields: string; virtual; abstract;
+
+ function GetFilter: string; virtual; abstract;
+ function GetFiltered: boolean; virtual; abstract;
+ procedure SetFilter(const Value: string); virtual; abstract;
+ procedure SetFiltered(const Value: boolean); virtual; abstract;
+
+ function GetReadOnly: boolean; virtual;
+ procedure SetReadOnly(const Value: boolean); virtual;
+
+ procedure AttachEventHooks(aDataset: TDataset); virtual;
+ procedure DetachEventHooks(aDataset: TDataset); virtual;
+
+ // Internal
+ procedure DoBeforeOpenDataset; virtual;
+ procedure DoBeforeCloseDataset; virtual;
+ procedure DoAfterOpenDataset; virtual;
+ procedure DoAfterCloseDataset; virtual;
+ procedure DoOpen(IgnoreAutoFetchSettings: Boolean = False); virtual;
+
+ // Internal TDataset event handler hooks
+ procedure InternalAfterInsert(Sender: TDataset); dynamic;
+ procedure InternalAfterEdit(Sender: TDataset); dynamic;
+ procedure InternalBeforePost(Sender: TDataset); dynamic;
+ procedure InternalBeforeCancel(Sender: TDataset); dynamic;
+ procedure InternalAfterDelete(Sender: TDataset); dynamic;
+ procedure InternalBeforeScroll(Sender: TDataset); dynamic;
+ procedure InternalAfterScroll(Sender: TDataset); dynamic;
+ procedure InternalBeforeRefresh(Sender: TDataset); dynamic;
+ procedure InternalAfterRefresh(Sender: TDataset); dynamic;
+ procedure InternalOnCalcFields(Sender: TDataset); dynamic;
+ procedure InternalOnNewRecord(Sender: TDataset); dynamic;
+ procedure InternalAfterCancel(Sender: TDataset); dynamic;
+ procedure InternalBeforeInsert(Sender: TDataset); dynamic;
+ procedure InternalBeforeDelete(Sender: TDataset); dynamic;
+ procedure InternalBeforeEdit(Sender: TDataset); dynamic;
+ procedure InternalAfterPost(Sender: TDataset); dynamic;
+ procedure InternalBeforeFieldUpdate(Sender: TDACustomField);
+ procedure InternalAfterFieldUpdate(Sender: TDACustomField);
+
+ procedure InternalOnFilterRecord(Dataset: TDataset; var Accept: Boolean); dynamic;
+
+ procedure InternalOnDeleteError(DataSet: TDataSet; Error: EDatabaseError; var Action: TDataAction); dynamic;
+ procedure InternalOnEditError(DataSet: TDataSet; Error: EDatabaseError; var Action: TDataAction); dynamic;
+ procedure InternalOnPostError(DataSet: TDataSet; Error: EDatabaseError; var Action: TDataAction); dynamic;
+
+ // IDASQLCommand
+ function GetParams: TDAParamCollection; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure RefreshParams; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function Execute: integer; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetText: string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetText(const Value: string); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetName: string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ // IDADeltaOwner
+ function GetDelta: IDADelta; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ // IDADataReader
+ function IDADataReader.First = DataReaderFirst;
+ function IDADataReader.Next = DataReaderNext;
+ function DataReaderFirst: boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function DataReaderNext: boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ function GetFieldNames(Index: integer): string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetFieldIndexes(const aName: string): integer; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAsBoolean(Index: integer): boolean; overload; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAsCurrency(Index: integer): currency; overload; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAsDateTime(Index: integer): TDateTime; overload; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAsFloat(Index: integer): double; overload; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAsInteger(Index: integer): integer; overload; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAsString(Index: integer): string; overload; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAsVariant(Index: integer): variant; overload; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAsBoolean(const FieldName: string): boolean; overload; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAsCurrency(const FieldName: string): currency; overload; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAsDateTime(const FieldName: string): TDateTime; overload; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAsFloat(const FieldName: string): double; overload; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAsInteger(const FieldName: string): integer; overload; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAsString(const FieldName: string): string; overload; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAsVariant(const FieldName: string): variant; overload; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ // IDADataset
+ function GetIsEmpty: boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetRecordCount: integer; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetFieldCount: integer; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetBOF: boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetEOF: boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetSQL: string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetSQL(const Value: string); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function SQLContainsDynamicWhere: boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetFieldValues(Index: integer): Variant; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetNames(Index: integer): string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetWhere: TDAWhere; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF} deprecated;
+ function GetDynamicWhere: TDAWhereBuilder; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetDynamicWhere(const Value: TDAWhereBuilder); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetPrepared: boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetPrepared(Value: boolean); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetState: TDataSetState; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetLogicalName: string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetLogicalName(aName : string); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ procedure Notification(AComponent: TComponent; Operation: TOperation); override;
+
+ procedure OnMasterChange(Sender: TObject); virtual;
+ procedure OnMasterDisable(Sender: TObject); virtual;
+
+ function GetOnAfterOpen: TDAAfterOpenDatasetEvent; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetOnBeforeOpen: TDABeforeOpenDatasetEvent; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetOnAfterOpen(const Value: TDAAfterOpenDatasetEvent); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetOnBeforeOpen(const Value: TDABeforeOpenDatasetEvent); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ function GetOnAfterExecute: TDAAfterExecuteCommandEvent; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetOnBeforeExecute: TDABeforeExecuteCommandEvent; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetOnAfterExecute(const Value: TDAAfterExecuteCommandEvent); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetOnBeforeExecute(const Value: TDABeforeExecuteCommandEvent); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetOnExecuteError: TDAExecuteCommandErrorEvent; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetOnExecuteError(const Value: TDAExecuteCommandErrorEvent); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetOnOpenError: TDAOpenDatasetErrorEvent; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetOnOpenError(const Value: TDAOpenDatasetErrorEvent); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ procedure NotifyFieldsClear;
+
+ // IInterface
+ function QueryInterface(const IID: TGUID; out Obj): HResult; override;
+
+ property MasterLink: TMasterDataLink read fMasterLink;
+
+ {$IFDEF MSWINDOWS}
+ protected
+ function InterfaceSupportsErrorInfo(const iid: TGUID): HResult; stdcall;
+
+ public
+ function SafeCallException(ExceptObject: TObject; ExceptAddr: Pointer): HResult; override;
+ {$ENDIF}
+
+ // begin IDAClonedCursorsSupport
+ protected
+ fOldValues : array of Variant;
+ fCloneSource : TDADataTable;
+ function GetSimpleCloneSource : TObject;
+ procedure CloneCursor(Source : TDADataTable); virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ public
+ function GetUsingClonedCursor : boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetCloneSource : TDADataTable; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ property CloneSource : TDADataTable read GetCloneSource;
+ property UsingClonedCursor : boolean read GetUsingClonedCursor;
+ // end IDAClonedCursorsSupport
+
+ public { for Delta }
+ property RecIDField : TIntegerField read fRecIDField write fRecIDField;
+ function GetRowRecIDValue: integer;
+
+
+ procedure CallScript(const aEvent: string);
+
+ procedure InitializeDataTable;
+ procedure DoCascadeOperation(aStreamer: TDADataStreamer; aOption: TDAMasterOption);
+ procedure WriteDeltaToStream(aStreamer: TDADataStreamer);
+ procedure ReadDeltaFromStream(aStreamer: TDADataStreamer; aFailedDeltas:TList);overload;
+ procedure ReadDeltaFromStream(aStreamer: TDADataStreamer); overload;
+
+ public
+ constructor Create(aOwner: TComponent); override;
+ destructor Destroy; override;
+
+ procedure EnableConstraints; virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF} abstract;
+ procedure DisableConstraints; virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF} abstract;
+
+ procedure LoadFromRemoteSource(BookmarkPosition: boolean = FALSE); virtual;
+ procedure FetchMastersDetails(aMasterTable : TDADataTable = NIL; aRequestMappings : TStrings = NIL; IgnoreAutoFetchSettings : Boolean = False); dynamic;
+ procedure LoadSchema(PreserveLookupFields : boolean = FALSE; PreserveClientCalcFields : boolean = FALSE);
+ procedure LoadScript(aDatasetName : string = '');
+
+ function ApplyUpdates(RefetchAll: boolean = FALSE): boolean; dynamic;
+ procedure CancelUpdates(IncludeDetails : boolean = TRUE);
+ procedure CancelUpdateChange(Change: TDADeltaChange;IncludeDetails : boolean = TRUE);
+
+ procedure Sort(const FieldNames: array of string; const Directions: array of TDASortDirection);
+ procedure UnSort;
+
+ procedure ClearFields;
+ procedure ClearRows;
+
+ procedure CloneSelectedRecord(Source: TDADataTable; DoPost: boolean = TRUE); overload;
+ procedure CloneSelectedRecord(const Source: IDADataset; DoPost: boolean = TRUE); overload;
+
+ procedure SaveToStream(aStream: TStream);
+ procedure LoadFromStream(aStream: TStream);
+ procedure SaveToFile(const aFileName: string);
+ procedure LoadFromFile(const aFileName: string);
+
+ procedure MergeDelta; virtual;
+
+ // Master detail
+ function GetDetailDataTables: TList;
+ function GetDetailTablesforApplyUpdate(aRecursive: boolean = True): TList;
+ procedure GetDetailTablesforAllinOneFetch(aRemote, aLocal:TList; aRecursive: boolean);
+ function GetMasterDataTable : TDADataTable;
+
+ // Methods
+ procedure Open; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure Close; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ procedure EnableControls; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure DisableControls; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function ControlsDisabled: Boolean;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ procedure Next; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ procedure Edit; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure Insert; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure Post; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure Cancel; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure Append; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure Delete; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ procedure Prior; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure First; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure Last; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ procedure Refresh; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ function Locate(const KeyFields: string; const KeyValues: Variant; Options: TLocateOptions): Boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function Lookup(const KeyFields: string; const KeyValues: Variant; const ResultFields: string): Variant; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ function FieldByName(const aName: string): TDAField; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function FindField(const aName: string): TDAField; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function ParamByName(const aName: string): TDAParam; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ function GetBookmark: pointer; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GotoBookmark(Bookmark: TBookmark); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure FreeBookmark(Bookmark: TBookmark); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function BookmarkValid(Bookmark: TBookmark): Boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ procedure EnableEventHandlers; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure DisableEventHandlers; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ procedure InternalSetFetching(aFetching: boolean);
+
+ procedure AddRecord(const FieldNames : array of string; const FieldValues : array of Variant); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ function GetCurrentRecIdValue: integer;
+ procedure SetCurrentRecIdValue(Value: integer);
+
+ // Properties
+ property CurrRecId: integer read GetCurrRecId write SetCurrRecId;
+ property RecIDValue: integer read GetRowRecIDValue;
+ property Delta: IDADelta read GetDelta write fDelta;
+ property RecNo : integer read GetRecNo write SetRecNo;
+
+ property BOF: boolean read GetBOF;
+ property EOF: boolean read GetEOF;
+ property RecordCount: integer read GetRecordCount;
+ property FieldCount: integer read GetFieldCount;
+ property FieldValues[Index: integer]: Variant read GetFieldValues;
+ property Names[Index: integer]: string read GetNames;
+
+ property SortFieldNames: TStringArray read fSortFieldNames;
+ property SortDirections: TDASortDirectionArray read fSortDirections;
+
+ property Opening: boolean read fOpening;
+ property Closing: boolean read fClosing;
+ property Editing: boolean read GetEditing;
+ property Fetching: boolean read fFetching;
+
+ property State: TDataSetState read GetState;
+ property Dataset: TDataset read GetDataset;
+
+ property IsEmpty : boolean read GetIsEmpty;
+
+ property BusinessEventsObj: TDADataTableRules read fBusinessRules;
+
+ property HasDelta: boolean read GetHasDelta;
+ property HasDeltaRecursive: boolean read GetHasDeltaRecursive;
+ property DeltaInitialized: boolean read GetDeltaInitialized;
+
+ property Where : TDAWhere read GetWhere;
+ property DynamicWhere: TDAWhereBuilder read GetDynamicWhere write SetDynamicWhere;
+ procedure CheckProperties(ACheckRemoteFetching: Boolean=False); virtual;
+ property HasReducedDelta: boolean read fHasReducedDelta;
+ published
+ property Active: boolean read GetActiveProperty write SetActiveProperty stored fStoreActive default false;
+ property StoreActive: boolean read fStoreActive write fStoreActive default false;
+
+ property RemoteUpdatesOptions: TDARemoteUpdatesOptions read fRemoteUpdateOptions write fRemoteUpdateOptions;
+
+ property MaxRecords : integer read fMaxRecords write fMaxRecords default -1;
+
+ property Fields: TDAFieldCollection read GetFieldsProperty write SetFields;
+ property Params: TDAParamCollection read GetParamsProperty write SetParams;
+
+ property MasterMappingMode : TDAMasterMappingMode read fMasterMappingMode write fMasterMappingMode default mmParams;
+ property MasterParamsMappings : TStrings read GetMasterParamsMappings write SetMasterParamsMappings;
+
+ property LogChanges: boolean read GetLogChanges write SetLogChanges default true;
+ property StreamingOptions: TDAStreamingOptions read fStreamingOptions write fStreamingOptions;
+ property RemoteFetchEnabled: boolean read fRemoteFetchEnabled write fRemoteFetchEnabled default true;
+
+ property ScriptCode : TStrings read fScriptCode write SetScriptCode;
+ property CustomAttributes : TStrings read fCustomAttributes write SetCustomAttributes;
+
+ property RemoteDataAdapter: TDABaseRemoteDataAdapter read fRemoteDataAdapter write SetRemoteDataAdapter;
+
+ property BeforeOpen: TDADataTableNotifyEvent read fBeforeOpen write fBeforeOpen;
+ property AfterOpen: TDADataTableNotifyEvent read fAfterOpen write fAfterOpen;
+ property BeforeClose: TDADataTableNotifyEvent read fBeforeClose write fBeforeClose;
+ property AfterClose: TDADataTableNotifyEvent read fAfterClose write fAfterClose;
+ property BeforeInsert: TDADataTableNotifyEvent read fBeforeInsert write fBeforeInsert;
+ property AfterInsert: TDADataTableNotifyEvent read fAfterInsert write fAfterInsert;
+ property BeforeEdit: TDADataTableNotifyEvent read fBeforeEdit write fBeforeEdit;
+ property AfterEdit: TDADataTableNotifyEvent read fAfterEdit write fAfterEdit;
+ property BeforePost: TDADataTableNotifyEvent read fBeforePost write fBeforePost;
+ property AfterPost: TDADataTableNotifyEvent read fAfterPost write fAfterPost;
+ property BeforeCancel: TDADataTableNotifyEvent read fBeforeCancel write fBeforeCancel;
+ property AfterCancel: TDADataTableNotifyEvent read fAfterCancel write fAfterCancel;
+ property BeforeDelete: TDADataTableNotifyEvent read fBeforeDelete write fBeforeDelete;
+ property AfterDelete: TDADataTableNotifyEvent read fAfterDelete write fAfterDelete;
+ property BeforeScroll: TDADataTableNotifyEvent read fBeforeScroll write fBeforeScroll;
+ property AfterScroll: TDADataTableNotifyEvent read fAfterScroll write fAfterScroll;
+ property BeforeRefresh: TDADataTableNotifyEvent read fBeforeRefresh write fBeforeRefresh;
+ property AfterRefresh: TDADataTableNotifyEvent read fAfterRefresh write fAfterRefresh;
+ property OnCalcFields: TDADataTableNotifyEvent read fOnCalcFields write fOnCalcFields;
+ property OnNewRecord: TDADataTableNotifyEvent read fOnNewRecord write fOnNewRecord;
+
+ property OnFilterRecord: TDADataTableFilterEvent read fOnFilterRecord write fOnFilterRecord;
+
+ property ReadOnly : boolean read GetReadOnly write SetReadOnly default False;
+
+ property OnDeleteError: TDADataTableErrorEvent read fOnDeleteError write fOnDeleteError;
+ property OnEditError: TDADataTableErrorEvent read fOnEditError write fOnEditError;
+ property OnPostError: TDADataTableErrorEvent read fOnPostError write fOnPostError;
+
+ property LocalSchema: TDASchema read fLocalSchema write SetLocalSchema;
+ property LocalDataStreamer: TDADataStreamer read fLocalDataStreamer write SetLocalDataStreamer;
+ property LocalConnection: string read fLocalConnection write fLocalConnection;
+
+ property MasterSource: TDADataSource read GetMasterSource write SetMasterSource;
+ property MasterFields: string read GetMasterFields write SetMasterFields;
+ property DetailFields: string read GetDetailFields write SetDetailsFields;
+ property MasterRequestMappings: TStrings read GetMasterRequestMappings write SetMasterRequestMappings;
+
+ property DetailOptions: TDADetailOptions read fDetailOptions write fDetailOptions;
+ property MasterOptions: TDAMasterOptions read fMasterOptions write fMasterOptions;
+
+ property Filtered: boolean read GetFiltered write SetFiltered default false;
+ property Filter: string read GetFilter write SetFilter;
+
+ property LogicalName: string read fLogicalName write fLogicalName;
+
+ //property OnApplyUpdatesError: TDAApplyUpdatesError read fOnApplyUpdatesError write fOnApplyUpdatesError;
+
+ property OnAfterApplyUpdates : TDADataTableNotifyEvent read fOnAfterApplyUpdates write fOnAfterApplyUpdates;
+ property OnBeforeApplyUpdates : TDABeforeApplyUpdatesEvent read fOnBeforeApplyUpdates write fOnBeforeApplyUpdates;
+ property OnBeforeMergeDelta : TDADataTableNotifyEvent read fOnBeforeMergeDelta write fOnBeforeMergeDelta;
+ property OnAfterMergeDelta : TDADataTableNotifyEvent read fOnAfterMergeDelta write fOnAfterMergeDelta;
+
+ property OnBeforeDataRequestCall: TDADataTableRemoteRequestEvent read fOnBeforeDataRequestCall write fOnBeforeDataRequestCall;
+ property OnAfterDataRequestCall: TDADataTableRemoteRequestEvent read fOnAfterDataRequestCall write fOnAfterDataRequestCall;
+ property OnBeforeDataUpdateCall: TDADataTableRemoteRequestEvent read fOnBeforeDataUpdateCall write fOnBeforeDataUpdateCall;
+ property OnAfterDataUpdateCall: TDADataTableRemoteRequestEvent read fOnAfterDataUpdateCall write fOnAfterDataUpdateCall;
+ property OnBeforeSchemaCall: TDADataTableRemoteRequestEvent read fOnBeforeSchemaCall write fOnBeforeSchemaCall;
+ property OnAfterSchemaCall: TDADataTableRemoteRequestEvent read fOnAfterSchemaCall write fOnAfterSchemaCall;
+ property OnBeforeScriptCall: TDADataTableRemoteRequestEvent read fOnBeforeScriptCall write fOnBeforeScriptCall;
+ property OnAfterScriptCall: TDADataTableRemoteRequestEvent read fOnAfterScriptCall write fOnAfterScriptCall;
+
+ property OnReceiveDataStream: TDADataRequestStreamEvent read fOnReceiveDataStream write fOnReceiveDataStream;
+
+ property OnBeforeFieldChange: TDADataTableDataChangeEvent read fBeforeFieldChange write fBeforeFieldChange;
+ property OnAfterFieldChange: TDADataTableDataChangeEvent read fAfterFieldChange write fAfterFieldChange;
+ property BusinessRulesID: string read fBusinessRulesID write SetBusinessRulesID;
+ property OnLocalUpdateDataBeginTransaction : TDALocalUpdateDataTransactionEvent read fOnLocalUpdateDataBeginTransaction write fOnLocalUpdateDataBeginTransaction;
+ property OnLocalUpdateDataCommitTransaction : TDALocalUpdateDataTransactionEvent read fOnLocalUpdateDataCommitTransaction write fOnLocalUpdateDataCommitTransaction;
+ property OnLocalUpdateDataRollBackTransaction : TDALocalUpdateDataTransactionEvent read fOnLocalUpdateDataRollBackTransaction write fOnLocalUpdateDataRollBackTransaction;
+ end;
+
+ TDADataTableClass = class of TDADataTable;
+ {$WARN SYMBOL_DEPRECATED ON}
+
+ { Exceptions }
+ EDABizValidationException = class(EROException);
+
+ { TDABusinessRules }
+ TDABusinessRules = class(TDAEngineBaseObject)
+ private
+ protected
+ function _AddRef: Integer; override;
+ function _Release: Integer; override;
+
+ public
+ constructor Create; virtual;
+ destructor Destroy; override;
+
+ end;
+
+ IDAStronglyTypedDataTable = interface
+ ['{4D4063AA-DFD0-4B4D-8CC2-FCE3BE1D2F87}']
+ procedure Open;
+ procedure Close;
+
+ function GetActive: boolean;
+ procedure SetActive(const Value: boolean);
+
+ property Active: boolean read GetActive write SetActive;
+
+ procedure Append;
+ procedure Cancel;
+ procedure Delete;
+ procedure Edit;
+ procedure First;
+ procedure Insert;
+ procedure Last;
+ procedure Next;
+ procedure Post;
+ procedure Prior;
+
+ function Locate(const aKeyFields: string; const aKeyValues: Variant; aOptions: TLocateOptions = []): Boolean;
+ function Lookup(const KeyFields: string; const KeyValues: Variant; const ResultFields: string): Variant;
+
+ function GetDataTable : TDADataTable;
+
+ function GetState : TDatasetState;
+ function GetIsEmpty : boolean;
+ function GetRecNo : integer;
+ procedure SetRecNo(Value : integer);
+ function GetMasterOptions : TDAMasterOptions;
+ procedure SetMasterOptions(Value : TDAMasterOptions);
+ function GetDetailOptions : TDADetailOptions;
+ procedure SetDetailOptions(Value : TDADetailOptions);
+
+ function IsFieldNull(const FieldIndexOrName : Variant) : boolean;
+ procedure ClearField(const FieldIndexOrName : Variant);
+
+ function GetBOF: boolean;
+ function GetEOF: boolean;
+ function GetRecordCount: integer;
+
+ property BOF: boolean read GetBOF;
+ property EOF: boolean read GetEOF;
+ property RecordCount: integer read GetRecordCount;
+ property RecNo : integer read GetRecNo write SetRecNo;
+
+ property MasterOptions : TDAMasterOptions read GetMasterOptions write SetMasterOptions;
+ property DetailOptions : TDADetailOptions read GetDetailOptions write SetDetailOptions;
+
+ property IsEmpty : boolean read GetIsEmpty;
+ property State : TDatasetState read GetState;
+ property DataTable : TDADataTable read GetDataTable;
+ end;
+
+ { TDAFieldRules }
+ TDAFieldRules = class(TDABusinessRules)
+ private
+ fField : TDAField;
+ fDataTable : TDADataTable;
+
+ protected
+ // Misc
+ procedure Attach(aDataTable: TDADataTable); virtual;
+ procedure Detach(aDataTable: TDADataTable); virtual;
+
+ // Event handler hooks
+ procedure OnValidate(Sender: TDACustomField); virtual;
+ procedure OnChange(Sender: TDACustomField); virtual;
+
+ property DataTable : TDADataTable read fDataTable;
+
+ public
+ constructor Create(aField : TDAField; aDataTable : TDADataTable); reintroduce; virtual;
+ destructor Destroy; override;
+ end;
+
+ TDAFieldRulesClass = class of TDAFieldRules;
+
+ { TDADataTableRules }
+ TDADataTableRules = class(TDABusinessRules, IDAStronglyTypedDataTable, IDARangeController)
+ private
+ fDataTable: TDADataTable;
+ fDetails : TStringList;
+
+ function GetDetails(Index: integer): TDADataTable;
+ function GetDetailsCount: integer;
+
+ protected
+ // Misc
+ function GetDataTable: TDADataTable;
+ procedure Attach(aDataTable: TDADataTable); virtual;
+ procedure Detach(aDataTable: TDADataTable); virtual;
+
+ procedure RefreshDetails;
+
+ function FindDetail(const aLogicalName : string) : TDADataTable;
+ function DetailByName(const aLogicalName : string) : TDADataTable;
+
+ // Business events
+ procedure BeforeOpen(Sender: TDADataTable); virtual;
+ procedure AfterOpen(Sender: TDADataTable); virtual;
+ procedure BeforeClose(Sender: TDADataTable); virtual;
+ procedure AfterClose(Sender: TDADataTable); virtual;
+ procedure BeforeInsert(Sender: TDADataTable); virtual;
+ procedure AfterInsert(Sender: TDADataTable); virtual;
+ procedure BeforeEdit(Sender: TDADataTable); virtual;
+ procedure AfterEdit(Sender: TDADataTable); virtual;
+ procedure BeforePost(Sender: TDADataTable); virtual;
+ procedure AfterPost(Sender: TDADataTable); virtual;
+ procedure BeforeCancel(Sender: TDADataTable); virtual;
+ procedure AfterCancel(Sender: TDADataTable); virtual;
+ procedure BeforeDelete(Sender: TDADataTable); virtual;
+ procedure AfterDelete(Sender: TDADataTable); virtual;
+ procedure BeforeScroll(Sender: TDADataTable); virtual;
+ procedure AfterScroll(Sender: TDADataTable); virtual;
+ procedure BeforeRefresh(Sender: TDADataTable); virtual;
+ procedure AfterRefresh(Sender: TDADataTable); virtual;
+ procedure OnCalcFields(Sender: TDADataTable); virtual;
+ procedure OnNewRecord(Sender: TDADataTable); virtual;
+
+ procedure OnDeleteError(DataTable: TDADataTable; Error: EDatabaseError; var Action: TDataAction); virtual;
+ procedure OnEditError(DataTable: TDADataTable; Error: EDatabaseError; var Action: TDataAction); virtual;
+ procedure OnPostError(DataTable: TDADataTable; Error: EDatabaseError; var Action: TDataAction); virtual;
+ procedure OnFilterRecord(DataTable: TDADataTable; var Accept : boolean); virtual;
+
+ procedure OnAfterSchemaCall(DataTable: TDADataTable; Request: TDARemoteRequest); virtual;
+ procedure OnAfterDataRequestCall(DataTable: TDADataTable; Request: TDARemoteRequest); virtual;
+ procedure OnBeforeSchemaCall(DataTable: TDADataTable; Request: TDARemoteRequest); virtual;
+ procedure OnBeforeDataRequestCall(DataTable: TDADataTable; Request: TDARemoteRequest); virtual;
+ procedure OnBeforeDataUpdateCall(DataTable: TDADataTable; Request: TDARemoteRequest); virtual;
+ procedure OnAfterDataUpdateCall(DataTable: TDADataTable; Request: TDARemoteRequest); virtual;
+ procedure OnBeforeScriptCall(DataTable: TDADataTable; Request: TDARemoteRequest); virtual;
+ procedure OnAfterScriptCall(DataTable: TDADataTable; Request: TDARemoteRequest); virtual;
+
+ procedure OnAfterApplyUpdates(DataTable: TDADataTable); virtual;
+ procedure OnBeforeMergeDelta(DataTable: TDADataTable); virtual;
+ procedure OnAfterMergeDelta(DataTable: TDADataTable); virtual;
+
+ procedure OnReceiveDataStream(DataTable: TDADataTable; Stream: TStream); virtual;
+ procedure OnBeforeApplyUpdates(DataTable: TDADataTable; const Delta: IDADelta); virtual;
+
+ procedure Open; virtual;
+ procedure Close; virtual;
+
+ function GetActive: boolean;
+ procedure SetActive(const Value: boolean);
+
+ property Active: boolean read GetActive write SetActive;
+
+ procedure Append; virtual;
+ procedure Cancel; virtual;
+ procedure Delete; virtual;
+ procedure Edit; virtual;
+ procedure First; virtual;
+ procedure Insert; virtual;
+ procedure Last; virtual;
+ procedure Next; virtual;
+ procedure Post; virtual;
+ procedure Prior; virtual;
+
+ function GetBOF: Boolean; virtual;
+ function GetEOF: Boolean; virtual;
+ function GetRecordCount: Integer; virtual;
+ function Locate(const aKeyFields: String; const aKeyValues: Variant; aOptions: TLocateOptions = []): Boolean; virtual;
+ function Lookup(const KeyFields: string; const KeyValues: Variant; const ResultFields: string): Variant;
+
+ function GetMasterOptions : TDAMasterOptions;
+ procedure SetMasterOptions(Value : TDAMasterOptions);
+ function GetDetailOptions : TDADetailOptions;
+ procedure SetDetailOptions(Value : TDADetailOptions);
+ function GetRecNo : integer;
+ procedure SetRecNo(Value : integer);
+ function GetIsEmpty: boolean;
+ function GetState: TDatasetState;
+
+ function IsFieldNull(const FieldIndexOrName : Variant) : boolean;
+ procedure ClearField(const FieldIndexOrName : Variant);
+
+ property DataTable: TDADataTable read GetDataTable;
+ property Details[Index : integer] : TDADataTable read GetDetails;
+ property DetailCount : integer read GetDetailsCount;
+ property State : TDatasetState read GetState;
+ property IsEmpty : boolean read GetIsEmpty;
+
+ { IDARangeController }
+ procedure ApplyRange; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure CancelRange; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetRange(const StartValues, EndValues: array of const); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure EditRangeEnd; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure EditRangeStart; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetRangeEnd; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetRangeStart; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ public
+ constructor Create(aDataTable: TDADataTable); reintroduce; virtual;
+ destructor Destroy; override;
+ end;
+
+ TDADataTableRulesClass = class of TDADataTableRules;
+
+ { TDADataTableList }
+ TDADataTableList = class(TList)
+ private
+ function GetItems(Index: integer): TDADataTable;
+ function GetPendingChangeCount: integer;
+ protected
+ public
+ constructor Create(aOwnerComponent : TComponent);
+
+ function ScanAndAdd(aOwnerComponent : TComponent) : integer;
+
+ function Add(aDataTable : TDADataTable) : integer;
+ procedure Remove(aDataTable : TDADataTable);
+
+ property Items[Index : integer] : TDADataTable read GetItems; default;
+ property PendingChangeCount : integer read GetPendingChangeCount;
+ end;
+
+// Registration routines
+procedure RegisterDataTableRules(const anID: string; const aDataTableRulesClass: TDADataTableRulesClass);
+function FindDataTableRules(const anID: string; out aDataTableRulesClass: TDADataTableRulesClass): boolean;
+
+procedure RegisterFieldRules(const anID: string; const aFieldRulesClass: TDAFieldRulesClass);
+function FindFieldRules(const anID: string; out aFieldRulesClass: TDAFieldRulesClass): boolean;
+
+// Helper functions
+function NewDelta(aDataTable: TDADataTable): IDADelta; overload;
+
+function DatatableFromStream(aStream : TStream;
+ aDataTableClass : TDADataTableClass;
+ anAdapter : TDADataAdapter;
+ const aDatasetName : string = '') : TDADataTable;
+
+implementation
+
+uses
+ {$IFDEF DESIGNTIME}
+ {$IFDEF MSWINDOWS}
+ Dialogs,
+ {$ENDIF MSWINDOWS}
+ {$IFDEF LINUX}
+ QDialogs,
+ {$ENDIF LINUX}
+ {$ENDIF DESIGNTIME}
+ TypInfo, Variants, uDARes,
+ uROClient, uROSessions, uROXMLIntf,
+ uDARegExpr, uDABusinessProcessor;
+
+var
+ _bizfields,
+ _bizdatatables: TStringList;
+
+type
+ TDataSetHack = class(TDataSet);
+
+function NewDelta(aDataTable: TDADataTable): IDADelta;
+begin
+ result := TDADelta.Create(aDataTable);
+end;
+
+procedure RegisterDataTableRules(const anID: string; const aDataTableRulesClass: TDADataTableRulesClass);
+var
+ idx: integer;
+begin
+ idx := _bizdatatables.IndexOf(anID);
+
+ if (idx >= 0) then
+ _bizdatatables.Objects[idx] := TObject(aDataTableRulesClass)
+ else
+ _bizdatatables.AddObject(anID, TObject(aDataTableRulesClass));
+end;
+
+function FindDataTableRules(const anID: string; out aDataTableRulesClass: TDADataTableRulesClass): boolean;
+var
+ idx: integer;
+begin
+ result := FALSE;
+ idx := _bizdatatables.IndexOf(anID);
+ if (idx >= 0) then begin
+ aDataTableRulesClass := TDADataTableRulesClass(_bizdatatables.Objects[idx]);
+ result := TRUE;
+ end
+ else
+ aDataTableRulesClass := nil;
+end;
+
+procedure RegisterFieldRules(const anID: string; const aFieldRulesClass: TDAFieldRulesClass);
+var
+ idx: integer;
+begin
+ idx := _bizfields.IndexOf(anID);
+
+ if (idx >= 0) then
+ _bizfields.Objects[idx] := TObject(aFieldRulesClass)
+ else
+ _bizfields.AddObject(anID, TObject(aFieldRulesClass));
+end;
+
+function FindFieldRules(const anID: string; out aFieldRulesClass: TDAFieldRulesClass): boolean;
+var
+ idx: integer;
+begin
+ result := FALSE;
+ idx := _bizfields.IndexOf(anID);
+ if (idx >= 0) then begin
+ aFieldRulesClass := TDAFieldRulesClass(_bizfields.Objects[idx]);
+ result := TRUE;
+ end
+ else
+ aFieldRulesClass := nil;
+end;
+
+function DatatableFromStream(aStream : TStream;
+ aDataTableClass : TDADataTableClass;
+ anAdapter : TDADataAdapter;
+ const aDatasetName : string = '') : TDADataTable;
+begin
+ result := aDataTableClass.Create(NIL);
+ result.RemoteFetchEnabled := FALSE;
+ anAdapter.ReadDataset(aStream, result, TRUE, aDatasetName);
+ result.First;
+end;
+
+{ TDADataTable }
+
+constructor TDADataTable.Create(aOwner: TComponent);
+begin
+ inherited;
+ fHasReducedDelta := False;
+ fScriptCode := TStringList.Create;
+ fCustomAttributes := TStringList.Create;
+ fMaxRecords := -1;
+
+ fMasterMappingMode := mmParams;
+ fMasterParamsMappings := TStringList.Create;
+
+ fFieldRules := TObjectList.Create;
+
+ fRemoteUpdateOptions := [];
+ fStreamingOptions := [soDisableEventsWhileStreaming];
+ fDetailOptions := [dtCascadeOpenClose,
+ dtCascadeApplyUpdates,
+ dtAutoFetch,
+ dtCascadeDelete,
+ dtCascadeUpdate,
+ dtDisableLogOfCascadeDeletes,
+ dtDisableLogOfCascadeUpdates,
+ dtIncludeInAllInOneFetch // Done to avoid breaking existing apps
+ ];
+
+ fMasterOptions := [moCascadeOpenClose,
+ moCascadeApplyUpdates,
+ moCascadeDelete,
+ moCascadeUpdate,
+ moDisableLogOfCascadeDeletes,
+ moDisableLogOfCascadeUpdates];
+
+ fFetchedMasters := TStringList.Create;
+ fFetchedMasters.Duplicates := dupError;
+ fFetchedMasters.Sorted := TRUE;
+
+ fMasterRequestMappings := TStringList.Create;
+
+ fRemoteFetchEnabled := TRUE;
+ fStreaming := False;
+
+ SetLength(fSortDirections, 0);
+ SetLength(fSortFieldNames, 0);
+
+ fFields := TDAFieldCollection.Create(Self);
+ fFields.OnFieldBeforeUpdate := InternalBeforeFieldUpdate;
+ fFields.OnFieldAfterUpdate := InternalAfterFieldUpdate;
+ fParams := TDAParamCollection.Create(Self);
+
+ fWhere := TDAWhere.Create(fFields, TRUE);
+ fWhere.OnChange := OnWhereChange;
+
+ fDataset := GetDatasetClass.Create(Self);
+ fDataset.Name := 'Dataset';
+
+ fMasterLink := TMasterDataLink.Create(fDataset);
+ fMasterLink.OnMasterChange := OnMasterChange;
+ fMasterLink.OnMasterDisable := OnMasterDisable;
+
+ fExpressionEvaluator := TDAStdExpressionEvaluator.Create;
+ fExpressionEvaluator.OnGetValue := ExpessionEvaluatorGetValue;
+
+ fDynamicWhere := TDAWhereBuilder.Create;
+ fLogChanges := TRUE;
+ EnableEventHandlers;
+end;
+
+destructor TDADataTable.Destroy;
+begin
+ DisableEventHandlers;
+ fDynamicWhere.Free;
+ fExpressionEvaluator.Free;
+ fFields.Free;
+ fWhere.Free;
+
+ fMasterLink.Free;
+ fMasterRequestMappings.Free;
+ fMasterParamsMappings.Free;
+
+ fFetchedMasters.Free;
+
+ if (fBusinessRules <> nil) then begin
+ fBusinessRules.Detach(Self);
+ fBusinessRules.Free;
+ end;
+
+ fFieldRules.Free;
+ fParams.Free;
+
+ fDelta := NIL;
+ fScriptCode.Free;
+ fCustomAttributes.Free;
+
+ inherited;
+end;
+
+procedure TDADataTable.OnWhereChange(Sender : TObject);
+//var par : TDARemoteRequestParam;
+begin
+ //TODO: par := DataRequestCall.FindParam(par_UserFilter);
+ //if (par<>NIL) then par.AsString := fWhere.Clause;
+end;
+
+procedure TDADataTable.AttachEventHooks(aDataset: TDataset);
+var i : integer;
+ lFieldRulesClass : TDAFieldRulesClass;
+ lFieldRules : TDAFieldRules;
+ lField : TDAField;
+begin
+ if (csDesigning in ComponentState) then Exit;
+
+ aDataset.BeforeInsert := InternalBeforeInsert;
+ aDataset.AfterInsert := InternalAfterInsert;
+ aDataset.BeforeEdit := InternalBeforeEdit;
+ aDataset.AfterEdit := InternalAfterEdit;
+ aDataset.BeforePost := InternalBeforePost;
+ aDataset.AfterPost := InternalAfterPost;
+ aDataset.BeforeCancel := InternalBeforeCancel;
+ aDataset.AfterCancel := InternalAfterCancel;
+ aDataset.BeforeDelete := InternalBeforeDelete;
+ aDataset.AfterDelete := InternalAfterDelete;
+ aDataset.BeforeScroll := InternalBeforeScroll;
+ aDataset.AfterScroll := InternalAfterScroll;
+ aDataset.BeforeRefresh := InternalBeforeRefresh;
+ aDataset.AfterRefresh := InternalAfterRefresh;
+
+ aDataset.OnCalcFields := InternalOnCalcFields;
+ aDataset.OnNewRecord := InternalOnNewRecord;
+
+ aDataset.OnFilterRecord := InternalOnFilterRecord;
+
+ aDataset.OnDeleteError := InternalOnDeleteError;
+ aDataset.OnEditError := InternalOnEditError;
+ aDataset.OnPostError := InternalOnPostError;
+
+ for i := 0 to (fFields.Count-1) do begin
+ lField := Fields[i];
+ if (lField.BusinessClassID='') then Continue;
+
+ Check(not FindFieldRules(lField.BusinessClassID, lFieldRulesClass), 'Invalid BusinessClassID "%s"', [lField.BusinessClassID]);
+
+ lFieldRules := lFieldRulesClass.Create(lField, Self);
+ fFieldRules.Add(lFieldRules);
+ end;
+
+ fFields.FieldEventsDisabled := FALSE;
+end;
+
+procedure TDADataTable.DetachEventHooks(aDataset: TDataset);
+begin
+ if (csDesigning in ComponentState) then Exit;
+
+ aDataset.BeforeInsert := nil;
+ aDataset.AfterInsert := nil;
+ aDataset.BeforeEdit := nil;
+ aDataset.AfterEdit := nil;
+ aDataset.BeforePost := TempSetRowRecIDValue; // We still need to autoinc the RecID!!!
+ aDataset.AfterPost := nil;
+ aDataset.BeforeCancel := nil;
+ aDataset.AfterCancel := nil;
+ aDataset.BeforeDelete := nil;
+ aDataset.AfterDelete := nil;
+ aDataset.BeforeScroll := nil;
+ aDataset.AfterScroll := nil;
+ aDataset.BeforeRefresh := nil;
+ aDataset.AfterRefresh := nil;
+ if not Filtered then
+ aDataset.OnCalcFields := nil;
+ aDataset.OnNewRecord := nil;
+
+ aDataset.OnFilterRecord := nil;
+
+ aDataset.OnDeleteError := nil;
+ aDataset.OnEditError := nil;
+ aDataset.OnPostError := nil;
+
+ fFields.FieldEventsDisabled := TRUE;
+ fFieldRules.Clear; // Destroyes them
+end;
+
+procedure TDADataTable.InternalAfterDelete(Sender: TDataset);
+begin
+ CallScript('AfterDelete');
+ if Assigned(AfterDelete) then AfterDelete(Self);
+ if Assigned(fBusinessRules) then fBusinessRules.AfterDelete(Self);
+
+ if (ruoOnPost in RemoteUpdatesOptions) then ApplyUpdates();
+end;
+
+procedure TDADataTable.InternalAfterEdit(Sender: TDataset);
+begin
+ CallScript('AfterEdit');
+ if Assigned(AfterEdit) then AfterEdit(Self);
+ if Assigned(fBusinessRules) then fBusinessRules.AfterEdit(Self);
+end;
+
+procedure TDADataTable.InternalAfterInsert(Sender: TDataset);
+begin
+ CallScript('AfterInsert');
+
+ if Assigned(AfterInsert) then AfterInsert(Self);
+ if Assigned(fBusinessRules) then fBusinessRules.AfterInsert(Self);
+end;
+
+procedure TDADataTable.InternalAfterRefresh(Sender: TDataset);
+begin
+ CallScript('AfterRefresh');
+ if Assigned(AfterRefresh) then AfterRefresh(Self);
+ if Assigned(fBusinessRules) then fBusinessRules.AfterRefresh(Self);
+end;
+
+procedure TDADataTable.InternalAfterScroll(Sender: TDataset);
+begin
+ if fStreaming and (soDisableEventsWhileStreaming in fStreamingOptions)
+ then Exit;
+ CallScript('AfterScroll');
+ if Assigned(AfterScroll) then AfterScroll(Self);
+ if Assigned(fBusinessRules) then fBusinessRules.AfterScroll(Self);
+end;
+
+procedure TDADataTable.InternalBeforeCancel(Sender: TDataset);
+begin
+ CallScript('BeforeCancel');
+ if Assigned(BeforeCancel) then BeforeCancel(Self);
+ if Assigned(fBusinessRules) then fBusinessRules.BeforeCancel(Self);
+end;
+
+procedure TDADataTable.InternalBeforeRefresh(Sender: TDataset);
+begin
+ CallScript('BeforeRefresh');
+ if Assigned(BeforeRefresh) then BeforeRefresh(Self);
+ if Assigned(fBusinessRules) then fBusinessRules.BeforeRefresh(Self);
+ DoRefresh(fDataset);
+end;
+
+procedure TDADataTable.InternalBeforeScroll(Sender: TDataset);
+begin
+ if fStreaming and (soDisableEventsWhileStreaming in fStreamingOptions)
+ then Exit;
+ CallScript('BeforeScroll');
+ if Assigned(BeforeScroll) then BeforeScroll(Self);
+ if Assigned(fBusinessRules) then fBusinessRules.BeforeScroll(Self);
+end;
+
+procedure TDADataTable.InternalOnCalcFields(Sender: TDataset);
+var
+ i: integer;
+begin
+ CallScript('OnCalcFields');
+ if Assigned(OnCalcFields) then OnCalcFields(Self);
+ if Assigned(fBusinessRules) then fBusinessRules.OnCalcFields(Self);
+ For i:= 0 to fFields.Count-1 do
+ With fFields[i] do
+ if Calculated and (Expression <> '') then Value:= fExpressionEvaluator.Evaluate(Expression);
+end;
+
+procedure TDADataTable.InternalOnDeleteError(DataSet: TDataSet; Error: EDatabaseError; var Action: TDataAction);
+begin
+ if Assigned(OnDeleteError) then OnDeleteError(Self, Error, Action);
+ if Assigned(fBusinessRules) then fBusinessRules.OnDeleteError(Self, Error, Action);
+end;
+
+procedure TDADataTable.InternalOnEditError(DataSet: TDataSet; Error: EDatabaseError; var Action: TDataAction);
+begin
+ if Assigned(OnEditError) then OnEditError(Self, Error, Action);
+ if Assigned(fBusinessRules) then fBusinessRules.OnEditError(Self, Error, Action);
+end;
+
+procedure TDADataTable.InternalOnFilterRecord(Dataset: TDataset; var Accept: Boolean);
+begin
+ if Assigned(OnFilterRecord) then OnFilterRecord(Self, Accept);
+ if Assigned(fBusinessRules) then fBusinessRules.OnFilterRecord(Self, Accept);
+end;
+
+procedure TDADataTable.InternalOnPostError(DataSet: TDataSet; Error: EDatabaseError; var Action: TDataAction);
+begin
+ fDelta.RestoreLastChange; // ALEF: added as follow up to the Post errors (Jeff B.)
+
+ if Assigned(OnPostError) then OnPostError(Self, Error, Action);
+ if Assigned(fBusinessRules) then fBusinessRules.OnPostError(Self, Error, Action);
+end;
+
+procedure TDADataTable.SetLogChanges(const Value: boolean);
+begin
+ fLogChanges := Value;
+end;
+
+function TDADataTable.GetDataset: TDataset;
+begin
+ result := fDataset // inherited Dataset;
+end;
+
+function TDADataTable.GetFields: TDAFieldCollection;
+begin
+ result := fFields;
+end;
+
+procedure TDADataTable.SetFields(const Value: TDAFieldCollection);
+begin
+ if Active then Close;
+ fFields.Assign(Value);
+end;
+
+function TDADataTable.GetActive: boolean;
+begin
+ result := fDataset.Active;
+end;
+
+procedure TDADataTable.SetActive(Value: boolean);
+begin
+ if (csLoading in ComponentState) then
+ fStreamedActive := Value
+ else begin
+ if (Value <> Active) then begin
+ if Value then
+ Open
+ else
+ Close
+ end;
+ end;
+end;
+
+procedure TDADataTable.InternalOnNewRecord(Sender: TDataset);
+var
+ i: integer;
+begin
+ fFields.FieldEventsDisabled := TRUE;
+ try
+ try
+ for i := 0 to (fFields.Count - 1) do begin
+ if (fFields[i].DefaultValue <> '') then fFields[i].Value := fFields[i].DefaultValue;
+ // (autoinc)
+ if (fFields[i].DataType=datLargeAutoInc) then begin
+ fFields[i].AsLargeInt := AutoIncs[i];
+ AutoIncs[i] := AutoIncs[i]-1;
+ end
+ else if (fFields[i].DataType=datAutoInc) then begin
+ fFields[i].AsInteger := AutoIncs[i];
+ AutoIncs[i] := AutoIncs[i]-1;
+ end;
+ end;
+
+ fFields.FieldEventsDisabled := FALSE;
+
+ CallScript('OnNewRecord');
+ if Assigned(OnNewRecord) then OnNewRecord(Self);
+ if Assigned(fBusinessRules) then fBusinessRules.OnNewRecord(Self);
+ except
+ fDelta.CancelChange; // OnNewRecord's exception put the dataset in read mode so we must cancel the change
+ raise;
+ end;
+ finally
+ fFields.FieldEventsDisabled := FALSE; // Just in case...
+ end;
+end;
+
+procedure TDADataTable.DoCascadeOperation(aStreamer: TDADataStreamer; aOption: TDAMasterOption);
+var
+ i: integer;
+ details: TList;
+ dt: TDADataTable;
+ flag: boolean;
+ lRemoteList,lLocalList: TList;
+begin
+ if aOption = moAllInOneFetch then begin
+ DoCascadeRemoteAllInOneFetch(aStreamer);
+ exit;
+ end;
+ lRemoteList:= TList.Create;
+ lLocalList:= TList.Create;
+
+ GetDetailTablesforAllinOneFetch(lRemoteList,lLocalList, False);
+ details := GetDetailDataTables;
+ try
+ for i := 0 to (details.Count - 1) do begin
+ dt := TDADataTable(details[i]);
+ flag := dt.LogChanges;
+
+ case aOption of
+ moCascadeDelete: begin
+ if (dtDisableLogOfCascadeDeletes in dt.DetailOptions) then dt.LogChanges := FALSE;
+
+ dt.ClearRows;
+ end;
+
+ moCascadeOpenClose: begin
+ if (dtCascadeOpenClose in dt.DetailOptions) then begin
+ if Opening then begin
+ if (lLocalList.IndexOf(dt)=-1)and (lRemoteList.IndexOf(dt)=-1) then begin
+ dt.Close;
+ dt.DoOpen;
+ end;
+ end
+ else if Closing then
+ dt.Close;
+ end;
+ end;
+
+ moCascadeUpdate: begin
+ end;
+
+ moAllInOneFetch: begin
+ {
+ if (dtIncludeInAllInOneFetch in dt.DetailOptions) then try
+ dt.LogChanges := FALSE;
+
+ if Opening and not (soIgnoreStreamSchema in fStreamingOptions) then
+ begin
+ aStreamer.ReadDataset(dt.LogicalName, dt, TRUE, FALSE);
+ dt.InitializeDataTable;
+ end;
+
+ aStreamer.ReadDataset(dt.LogicalName, dt);
+ dt.DoCascadeOperation(aStreamer, moAllInOneFetch);
+ finally
+ dt.LogChanges := flag;
+ end; }
+ end;
+ end;
+
+ dt.LogChanges := flag;
+ end;
+ finally
+ details.Free;
+ lRemoteList.Free;
+ lLocalList.Free;
+ end;
+end;
+
+procedure TDADataTable.DoCascadeRemoteAllInOneFetch(aStreamer: TDADataStreamer);
+var
+ lFetchedMasters: TStringList;
+
+ procedure ProcessDetailTable(aTable: TDADataTable);
+ begin
+ with aTable do begin
+ fFetchedMasters.Sorted:=False;
+ fFetchedMasters.AddStrings(lFetchedMasters);
+ fFetchedMasters.Sorted:=True;
+ DoCascadeRemoteAllInOneFetch(aStreamer);
+ end;
+ end;
+
+var
+ lLocalList, lRemoteList: TList;
+ ltbl: TDADataTable;
+ i: integer;
+ lflag: boolean;
+begin
+ if moAllInOneFetch in fMasterOptions then begin
+ lRemoteList:= TList.Create;
+ lLocalList:= TList.Create;
+ try
+ GetDetailTablesforAllinOneFetch(lRemoteList,lLocalList, False);
+ if (lRemoteList.Count > 0) or (lLocalList.Count > 0) then begin
+ lFetchedMasters:= TStringList.Create;
+ try
+ First;
+ while not EOF do begin
+ lFetchedMasters.Add(IntToStr(GetRowRecIDValue));
+ Next;
+ end;
+ lFetchedMasters.Sort;
+
+ // these tables are read in RDA
+ for i := 0 to lRemoteList.Count - 1 do begin
+ ProcessDetailTable(TDADataTable(lRemoteList[i]));
+ end;
+
+ // these tables we should read manually from streamer
+ for i := 0 to lLocalList.Count - 1 do begin
+ ltbl:= TDADataTable(lLocalList[i]);
+ if aStreamer.FindDatasetIndex(ltbl.LogicalName) = -1 then Continue; // may be to better raise an exception!
+ lflag := ltbl.LogChanges;
+ try
+ ltbl.LogChanges := False;
+ if Opening and not (soIgnoreStreamSchema in fStreamingOptions) then begin
+ aStreamer.ReadDataset(ltbl.LogicalName, ltbl, TRUE, FALSE);
+ ltbl.InitializeDataTable;
+ end;
+ aStreamer.ReadDataset(ltbl.LogicalName, ltbl);
+ finally
+ ltbl.LogChanges := lflag;
+ end;
+ ProcessDetailTable(ltbl);
+ end;
+ finally
+ lFetchedMasters.Free;
+ end;
+ end;
+ finally
+ lRemoteList.Free;
+ lLocalList.Free;
+ end;
+ end;
+end;
+
+procedure TDADataTable.TempSetRowRecIDValue(Sender: TDataset);
+begin
+ if (State <> dsEdit) then begin // Somehow it's gets in dsBrowse here...
+ fRecIDField.AsInteger := CurrRecId;
+ CurrRecId := CurrRecId + 1;
+ end;
+end;
+
+procedure TDADataTable.CreateInternalFields(aDataset: TDataset; someFieldDefinitions: TDAFieldCollection);
+var
+ i, cnt: integer;
+ fld: TFieldDef;
+ fldcls: TFieldClass;
+ realfld: TField;
+begin
+ // Creates the RecID field
+ fld := aDataset.FieldDefs.AddFieldDef;
+ fld.DataType := ftInteger;
+ fld.Name := RecIDFieldName;
+
+ // Creates the autoinc map (autoinc)
+ AutoIncs := CreateAutoIncArray;
+
+ // Adds the data fields (non calculated) to the FieldDefs
+ for i := 0 to (Fields.Count - 1) do begin
+ if Fields[i].Calculated or Fields[i].Lookup then Continue; // Added as fields later
+
+ fld := aDataset.FieldDefs.AddFieldDef;
+
+ // (autoinc)
+ if (Fields[i].DataType=datLargeAutoInc)
+ then fld.DataType := ftLargeint
+ else
+ if (Fields[i].DataType=datAutoInc)
+ then fld.DataType := ftInteger
+ else fld.DataType := DATypeToVCLType(Fields[i].DataType);
+
+ fld.Name := Fields[i].Name;
+
+ {if not (fld.DataType in [ftFloat, ftCurrency, ftBlob, ftInteger])
+ then fld.Size := Fields[i].Size;}
+
+ if (fld.DataType = ftString) or (fld.DataType = ftWideString) then fld.Size := Fields[i].Size;
+ if (fld.DataType = ftGuid) then fld.Size := 38;
+
+ if (fld.DataType = ftBcd) then begin
+ fld.Size:=Fields[i].DecimalScale;
+ fld.Precision:=Fields[i].DecimalPrecision;
+ end;
+
+ if (fld.DataType = ftFMTBcd) then begin
+ fld.Size:=Fields[i].DecimalScale;
+ fld.Precision:=Fields[i].DecimalPrecision;
+ end;
+
+ fld.Required := Fields[i].Required;
+ end;
+
+ // Creates the data fields
+ for i := 0 to (aDataset.FieldDefs.Count - 1) do begin
+ realfld := aDataset.FieldDefs[i].CreateField(aDataset);
+ realfld.DataSet := aDataset; // NEW
+ end;
+
+ // Creates the calculated fields
+ for i := 0 to (Fields.Count - 1) do begin
+ if not Fields[i].Calculated then Continue;
+
+ fldcls := DefaultFieldClasses[DATypeToVCLType(Fields[i].DataType)];
+ if fldcls = nil then fldcls := TStringField;
+ realfld := fldcls.Create(Self);
+ realfld.Name := aDataset.Name + Fields[i].Name;
+ realfld.FieldName := Fields[i].Name;
+ realfld.DataSet := aDataset;
+
+ if (Fields[i].DataType = datString) or (Fields[i].DataType = datWideString) then realfld.Size := Fields[i].Size;
+
+ realfld.Required := Fields[i].Required;
+ if Fields[i].Calculated then realfld.FieldKind := fkCalculated;
+
+ realfld.DataSet := aDataset;
+ end;
+
+ // Creates the lookup fields
+ for i := 0 to (Fields.Count - 1) do begin
+ if not Fields[i].Lookup then Continue;
+
+ fldcls := DefaultFieldClasses[DATypeToVCLType(Fields[i].DataType)];
+
+ if not Assigned(fldcls) then
+ RaiseError('No or invalid DataType specified for lookup field %s.%s',[self.Name, Fields[i].Name]);
+
+ realfld := fldcls.Create(Self);
+ realfld.Name := aDataset.Name + Fields[i].Name;
+ realfld.FieldName := Fields[i].Name;
+ realfld.DataSet := aDataset; // NEW
+
+ // Sets lookup properties
+ with Fields[i] do begin
+ {$IFNDEF FPC}
+ realfld.Lookup := TRUE;
+ {$ENDIF}
+ realfld.FieldKind:=fkLookup;
+ if (LookupSource<>NIL) then
+ with TDADataSource(LookupSource) do
+ if Assigned(DataTable)
+ then realfld.LookupDataSet := DataTable.Dataset;
+
+ realfld.LookupKeyFields := LookupKeyFields;
+ realfld.LookupCache := LookupCache;
+ realfld.LookupResultField := LookupResultField;
+ realfld.KeyFields := KeyFields;
+ end;
+
+ if (Fields[i].DataType = datString) or (Fields[i].DataType = datWideString) then realfld.Size := Fields[i].Size;
+
+ //realfld.DataSet := aDataset;
+ end;
+
+ // Adjusts field positions (less intrusive than changing the code above)
+ cnt := Fields.Count-1;
+ for i := 0 to cnt do
+ aDataSet.FieldByName(Fields[i].Name).Index := i+1;
+end;
+
+procedure TDADataTable.Loaded;
+begin
+ inherited;
+
+ if Assigned(fBusinessRules)
+ then fBusinessRules.Attach(Self);
+
+ //Active := fStreamedActive;
+ if fStreamedActive then Active:=True;
+
+// AttachEventHooks(fDataset);
+end;
+
+procedure TDADataTable.DoRefresh(aDataset: TDataset);
+begin
+ if fRefreshing then Exit;
+
+ fRefreshing := TRUE;
+ try
+ Close;
+ Open;
+ finally
+ fRefreshing := FALSE;
+ end;
+end;
+
+procedure TDADataTable.InternalBeforeInsert(Sender: TDataset);
+var
+ i: Integer;
+begin
+ if UsingClonedCursor and DeltaInitialized then Delta.AssignDataTable(Self);
+ try
+ CallScript('BeforeInsert');
+ if Assigned(BeforeInsert) then BeforeInsert(Self);
+ if Assigned(fBusinessRules) then fBusinessRules.BeforeInsert(Self);
+
+ if not LogChanges or (csDesigning in ComponentState) then Exit;
+
+ fDelta.StartChange(ctInsert);
+
+ SetLength(fOldValues, FieldCount);
+ for i := 0 to Length(fOldValues) -1 do
+ fOldValues[i] := null;
+ except
+ // Somehow the insert failed, so we restore the original data table to the delta
+ if UsingClonedCursor and HasDelta then Delta.AssignDataTable(fCloneSource);
+ raise;
+ end;
+end;
+
+procedure TDADataTable.InternalBeforeDelete(Sender: TDataset);
+begin
+ if UsingClonedCursor and DeltaInitialized then Delta.AssignDataTable(Self);
+ try
+ CallScript('BeforeDelete');
+ if Assigned(BeforeDelete) then BeforeDelete(Self);
+ if Assigned(fBusinessRules) then fBusinessRules.BeforeDelete(Self);
+
+ if not LogChanges or (csDesigning in ComponentState) then Exit;
+
+ // Deletes the records from the detail tables
+ if (moCascadeDelete in MasterOptions) then DoCascadeOperation(nil, moCascadeDelete);
+
+ // Logs the delete
+ fDelta.StartChange(ctDelete);
+ fDelta.EndChange;
+ finally
+ if UsingClonedCursor and HasDelta then Delta.AssignDataTable(fCloneSource);
+ end;
+end;
+
+procedure TDADataTable.InternalBeforeEdit(Sender: TDataset);
+var
+ i: integer;
+begin
+ if UsingClonedCursor and DeltaInitialized then Delta.AssignDataTable(Self);
+ try
+ CallScript('BeforeEdit');
+ if Assigned(BeforeEdit) then BeforeEdit(Self);
+ if Assigned(fBusinessRules) then fBusinessRules.BeforeEdit(Self);
+
+ if not LogChanges or (csDesigning in ComponentState) then Exit;
+
+ fDelta.StartChange(ctUpdate);
+
+ SetLength(fOldValues, Dataset.Fields.Count);
+ for i := 0 to Length(fOldValues) -1 do
+ fOldValues[i] := Dataset.Fields[i].Value;
+ except
+ // Somehow the edit failed, so we restore the original data table to the delta
+ if UsingClonedCursor and HasDelta then Delta.AssignDataTable(fCloneSource);
+ raise;
+ end;
+end;
+
+procedure TDADataTable.InternalBeforePost(Sender: TDataset);
+var details : TList;
+ key : string;
+ i : integer;
+begin
+ CallScript('BeforePost');
+ if Assigned(BeforePost) then BeforePost(Self);
+ if Assigned(fBusinessRules) then fBusinessRules.BeforePost(Self);
+
+ for i := 0 to (fFields.Count - 1) do
+ if (fFields[i].RegExpression <> '') and not fFields[i].IsNull then begin
+ if not ExecRegExpr(fFields[i].RegExpression, fFields[i].AsString) then RaiseError('Invalid input value for field ' + fFields[i].Name);
+ end;
+
+ if (State <> dsEdit) then begin // Somehow it's gets in dsBrowse here...
+ fRecIDField.AsInteger := CurrRecId;
+ CurrRecId := CurrRecId + 1;
+ end;
+
+ // This was originally in AfterPost. Moved here because after a post filters might step in and the current
+ // record can change resulting in half change from record X and the remaining from record Y
+
+ if not LogChanges or (csDesigning in ComponentState) then Exit;
+ fDelta.EndChange;
+
+ // Adds a reference to the RecID of this record to avoid double fetching records
+ // This is a new master record, so it means there are no details to fetch remotely
+ if (State=dsInsert) then begin
+ key := IntToStr(GetRowRecIDValue);
+ details := GetDetailDataTables;
+ try
+ for i := 0 to (details.Count-1) do begin
+ with TDADataTable(details[i]) do
+ if Active and (fFetchedMasters.IndexOf(key)<0) then fFetchedMasters.Add(key);
+ end;
+ finally
+ details.Free;
+ end;
+ end;
+ if (ruoOnPost in RemoteUpdatesOptions) then try
+ ApplyUpdates();
+ except
+ on E: Exception do
+ begin
+ if fDelta.Count > 0 then
+ fDelta.RestoreLastChange
+ else case Self.State of
+ dsEdit: fDelta.StartChange(ctUpdate);
+ dsInsert: fDelta.StartChange(ctInsert);
+ end;
+ raise;
+ end;
+ end;
+end;
+
+procedure TDADataTable.InternalAfterPost(Sender: TDataset);
+begin
+ try
+ CallScript('AfterPost');
+ if Assigned(AfterPost) then AfterPost(Self);
+ if Assigned(fBusinessRules) then fBusinessRules.AfterPost(Self);
+
+ if not LogChanges or (csDesigning in ComponentState) then Exit;
+ finally
+ // Finally restores the original datatable to the delta
+ if UsingClonedCursor and DeltaInitialized then Delta.AssignDataTable(fCloneSource);
+ end;
+end;
+
+procedure TDADataTable.InternalAfterCancel(Sender: TDataset);
+begin
+ CallScript('AfterCancel');
+ if Assigned(AfterCancel) then AfterCancel(Self);
+ if Assigned(fBusinessRules) then fBusinessRules.AfterCancel(Self);
+
+ fDelta.CancelChange;
+end;
+
+function TDADataTable.GetLogChanges: boolean;
+begin
+ result := fLogChanges;
+end;
+
+procedure TDADataTable.DisableControls;
+begin
+ fDataset.DisableControls;
+end;
+
+procedure TDADataTable.EnableControls;
+begin
+ fDataset.EnableControls;
+end;
+
+function TDADataTable.GetBOF: boolean;
+begin
+ result := fDataset.BOF
+end;
+
+function TDADataTable.GetEOF: boolean;
+begin
+ result := fDataset.EOF
+end;
+
+function TDADataTable.GetFieldCount: integer;
+begin
+ result := fFields.Count
+end;
+
+function TDADataTable.GetFieldValues(Index: integer): Variant;
+begin
+ result := Fields[Index].Value
+end;
+
+function TDADataTable.GetNames(Index: integer): string;
+begin
+ result := Fields[Index].Name
+end;
+
+function TDADataTable.GetRecordCount: integer;
+begin
+ result := fDataset.RecordCount;
+end;
+
+function TDADataTable.GetSQL: string;
+begin
+ // Not implemented in DataTables
+ result := '';
+end;
+
+function TDADataTable.Locate(const KeyFields: string;
+ const KeyValues: Variant; Options: TLocateOptions): Boolean;
+begin
+ if VarIsArray(KeyValues) and (VarArrayHighBound(KeyValues, 1) = 0)
+ then result := fDataset.Locate(KeyFields, KeyValues[0], Options)
+ else result := fDataset.Locate(KeyFields, KeyValues, Options);
+end;
+
+procedure TDADataTable.Next;
+begin
+ fDataset.Next;
+end;
+
+procedure TDADataTable.SetSQL(const Value: string);
+begin
+ // Not implemented in DataTables
+end;
+
+function TDADataTable.Execute: integer;
+begin
+ // Not implemented in DataTables
+ result := -1;
+end;
+
+function TDADataTable.GetParams: TDAParamCollection;
+begin
+ // Not implemented in DataTables
+ result := fParams;
+end;
+
+procedure TDADataTable.RefreshParams;
+begin
+ // Not implemented in DataTables
+end;
+
+procedure TDADataTable.Append;
+begin
+ fDataset.Append;
+end;
+
+procedure TDADataTable.Delete;
+begin
+ fDataset.Delete;
+end;
+
+procedure TDADataTable.Cancel;
+begin
+ fDataset.Cancel;
+end;
+
+procedure TDADataTable.Edit;
+begin
+ fDataset.Edit;
+end;
+
+procedure TDADataTable.Insert;
+begin
+ fDataset.Insert;
+end;
+
+procedure TDADataTable.Post;
+begin
+ fDataset.Post;
+end;
+
+{$WARN SYMBOL_DEPRECATED OFF}
+function TDADataTable.GetWhere: TDAWhere;
+begin
+ result := fWhere
+end;
+{$WARN SYMBOL_DEPRECATED ON}
+
+procedure TDADataTable.SetRemoteDataAdapter(const Value: TDABaseRemoteDataAdapter);
+begin
+ if Value <> fRemoteDataAdapter then begin
+ fRemoteDataAdapter := Value;
+ if assigned(fRemoteDataAdapter) then fRemoteDataAdapter.FreeNotification(self);
+ end;
+end;
+
+procedure TDADataTable.Close;
+begin
+ if not Active then Exit;
+
+ fClosing := TRUE;
+ try
+ DoBeforeCloseDataset;
+ if Assigned(BeforeClose) then BeforeClose(Self);
+ if Assigned(fBusinessRules) then fBusinessRules.BeforeClose(Self);
+
+ if (moCascadeOpenClose in MasterOptions) then DoCascadeOperation(nil, moCascadeOpenClose);
+
+ Dataset.Close;
+ fFields.Unbind;
+
+ //Dataset.Fields.Clear;
+
+ fDelta := nil;
+
+ fFetchedMasters.Clear;
+
+ DoAfterCloseDataset;
+ if Assigned(AfterClose) then AfterClose(Self);
+ if Assigned(fBusinessRules) then fBusinessRules.AfterClose(Self);
+ finally
+ fClosing := FALSE;
+ end;
+end;
+
+procedure TDADataTable.InitializeDataTable;
+begin
+ fCurrRecId := 1;
+
+ try
+ fDataset.Fields.Clear;
+ fDataset.FieldDefs.Clear;
+ finally
+ NotifyFieldsClear;
+ end;
+ try
+ // Creates the fields for the internal dataset
+ CreateInternalFields(fDataset, Fields);
+ finally
+ NotifyFieldsClear;
+ end;
+
+ fRecIDField := fDataset.FieldByName(RecIDFieldName) as TIntegerField;
+ fRecIDField.Visible := FALSE;
+
+ fFields.Bind(fDataset);
+
+ // Prepares the delta
+ fDelta := TDADelta.Create(Self);
+
+(*
+ // Finishes to prepare the internal dataset (descendant might need additional customization and might not be open)
+ if RemoteFetchEnabled and
+ (RemoteDataAdapter<>nil) and
+ (TDARemoteDataAdapter(RemoteDataAdapter).GetDataCall.Default) then
+ LoadScript();
+*)
+ DoBeforeOpenDataset;
+ if not Dataset.Active then Dataset.Open;
+ DoAfterOpenDataset;
+end;
+
+procedure TDADataTable.LoadFromLocalSchema;
+var
+ lConnection: IDAConnection;
+ data: TStream;
+ gofirst, oldlog: boolean;
+ ds: IDADataset;
+ i: integer;
+ lDynFields: array of string;
+begin
+ if (LocalSchema = nil) or (LogicalName = '') or fStreaming then begin
+ InitializeDataTable;
+ Exit;
+ end;
+
+ // Local but from schema. Client/Server mode
+ CheckProperties;
+
+ lConnection := LocalSchema.ConnectionManager.NewConnection(fLocalConnection);
+ try
+ SetLength(lDynFields, 0);
+ ds := LocalSchema.NewDataset(lConnection, fLogicalName,lDynFields,fDynamicWhere.Xml);
+ ds.Where.AddText(Where.Clause);
+
+ oldlog := LogChanges;
+ fFetching := TRUE;
+ LogChanges := FALSE;
+// book := nil;
+
+ data := Binary.Create;
+ Binary(data).CapacityIncrement := LocalDataStreamer.BufferSize;
+ try
+ for i := 0 to (ds.Params.Count - 1) do
+ ds.Params[i].Value := ParamByName(ds.Params[i].Name).Value;
+
+ LocalDataStreamer.WriteDataset(data, ds, [woRows, woSchema], MaxRecords);
+
+ if Active then
+ gofirst := FALSE
+ else
+ gofirst := TRUE;
+
+ if Assigned(fOnReceiveDataStream) then fOnReceiveDataStream(Self, data);
+ if Assigned(fBusinessRules) then fBusinessRules.OnReceiveDataStream(Self, data);
+ data.Position := 0;
+
+ // Reads the data
+ LocalDataStreamer.Initialize(data, aiRead);
+ try
+ if (LocalDataStreamer.DatasetCount = 0) then RaiseError('Stream does not contain any dataset');
+
+ if Opening then begin
+ if not (soIgnoreStreamSchema in fStreamingOptions) then LocalDataStreamer.ReadDataset(LogicalName, Self, TRUE, FALSE);
+
+ InitializeDataTable;
+ end;
+
+ LocalDataStreamer.ReadDataset(LogicalName, Self, FALSE);
+ {
+ if (moAllInOneFetch in MasterOptions) then begin
+ DoCascadeOperation(LocalDataStreamer, moAllInOneFetch);
+ end;}
+ finally
+ LocalDataStreamer.Finalize;
+ end;
+
+ if gofirst then First;
+ finally
+ fFetching := FALSE;
+ data.Free;
+ LogChanges := oldlog;
+ end;
+ finally
+ lConnection := nil;
+ end;
+end;
+
+procedure TDADataTable.LoadLocalSchema(aPreserveLookupFields,
+ aPreserveClientCalcFields: Boolean);
+type
+ THandlerArray = array[0..1] of TMethod;
+ PHandlerArray = ^THandlerArray;
+
+const
+ HandlersToSave : array[0..1] of string = ('OnChange', 'OnValidate');
+
+var
+ lFieldHandlers : TStringList;
+ lHandlers : PHandlerArray;
+ lookupfields : TDAFieldCollection;
+ clientcalcfields : TDAFieldCollection;
+ i, j, lIndex: integer;
+ lConnection: IDAConnection;
+ lDataset: IDADataset;
+ data: TStream;
+begin
+ if Active then Close();
+
+ lookupfields := nil;
+ clientcalcfields := nil;
+
+ Fields.FieldEventsDisabled := true;
+
+ try
+ lFieldHandlers := TStringList.Create;
+
+ { Saves the current event handler pointers }
+ for i := 0 to Fields.Count-1 do begin
+ New(lHandlers);
+ for j := Low(HandlersToSave) to High(HandlersToSave) do
+ lHandlers[j] := GetMethodProp(Fields[i], HandlersToSave[j]);
+ lFieldHandlers.AddObject(Fields[i].Name, TObject(lHandlers));
+ end;
+
+ { Save lookup and calced fields}
+ if aPreserveLookupFields then begin
+ lookupfields := TDAFieldCollection.Create(nil);
+ lookupfields.Assign(Fields);
+ for i := (lookupfields.Count-1) downto 0 do
+ if not (lookupfields[i] as TDACustomField).Lookup then
+ lookupfields.Delete(i);
+ end;
+
+ if aPreserveClientCalcFields then begin
+ clientcalcfields := TDAFieldCollection.Create(nil);
+ clientcalcfields.Assign(Fields);
+ for i :=(clientcalcfields.Count-1) downto 0 do
+ if not (clientcalcfields[i] as TDACustomField).Calculated then
+ clientcalcfields.Delete(i);
+ end;
+
+ Fields.Clear;
+
+ try
+ lConnection := LocalSchema.ConnectionManager.NewConnection(fLocalConnection);
+ lDataset := LocalSchema.NewDataset(lConnection, fLogicalName);
+
+ data := Binary.Create;
+ Binary(data).CapacityIncrement := LocalDataStreamer.BufferSize;
+ try
+ LocalDataStreamer.WriteDataset(data, lDataset, [woSchema], MaxRecords);
+ data.Position := 0;
+ LocalDataStreamer.Initialize(data, aiRead);
+ try
+ if (LocalDataStreamer.DatasetCount = 0) then RaiseError('Stream does not contain any dataset');
+ LocalDataStreamer.ReadDataset(LogicalName, Self, true, false);
+ finally
+ LocalDataStreamer.Finalize;
+ end;
+ finally
+ data.Free;
+ end;
+
+ finally
+ if aPreserveLookupFields then
+ for i := 0 to (lookupfields.Count-1) do
+ Fields.Add.Assign(lookupfields[i]);
+ if aPreserveClientCalcFields then
+ for i := 0 to (clientcalcfields.Count-1) do
+ if not Assigned(Fields.FindField(clientcalcfields[i].Name)) then
+ Fields.Add.Assign(clientcalcfields[i]);
+
+ { restores the old event handler pointers }
+ for i := 0 to Fields.Count-1 do begin
+ lIndex := lFieldHandlers.IndexOf(Fields[i].Name);
+ if lIndex >= 0 then begin
+ lHandlers := PHandlerArray(lFieldHandlers.Objects[lIndex]);
+ for j := Low(HandlersToSave) to High(HandlersToSave) do
+ SetMethodProp(Fields[i], HandlersToSave[j], lHandlers[j]);
+ Dispose(lHandlers);
+ end;
+ end;
+ lFieldHandlers.Free;
+ end;
+ finally
+ clientcalcfields.Free;
+ lookupfields.Free;
+ Fields.FieldEventsDisabled := false;
+ end;
+end;
+
+procedure TDADataTable.DoOpen(IgnoreAutoFetchSettings: Boolean);
+
+ procedure CheckForMaster(aMasterTable, aLookupTable: TDADataTable);
+ begin
+ if aMasterTable = aLookupTable then raise Exception.Create('You can''t use master source as lookup source');
+ if aMasterTable.MasterSource <> nil then CheckForMaster(aMasterTable.MasterSource.DataTable,aLookupTable);
+ end;
+
+var
+ i : integer;
+begin
+ if Active or fOpening then Exit;
+
+ fOpening := TRUE;
+ try
+ if (MasterSource <> nil) and (MasterSource.DataTable <> nil) then begin
+ for i := 0 to (FieldCount-1) do
+ if Fields[i].Lookup and (Fields[i].LookupSource<>NIL) and (Fields[i].LookupSource is TDADataSource) and
+ Assigned(TDADataSource(Fields[i].LookupSource).DataTable) then
+ CheckForMaster(MasterSource.DataTable, TDADataSource(Fields[i].LookupSource).DataTable)
+ end;
+ { Checks that all the lookup datasets are open. If not, we would get the error "Missing Data Provider"}
+ for i := 0 to (FieldCount-1) do
+ if Fields[i].Lookup and (Fields[i].LookupSource<>NIL) then begin
+ if (Fields[i].LookupSource is TDADataSource) then begin
+ if Assigned(TDADataSource(Fields[i].LookupSource).DataTable)
+ then TDADataSource(Fields[i].LookupSource).DataTable.Open;
+ end
+ else begin
+ if Assigned(Fields[i].LookupSource.DataSet)
+ then Fields[i].LookupSource.DataSet.Open;
+ end;
+ end;
+
+
+ if Assigned(BeforeOpen) then BeforeOpen(Self);
+ if Assigned(fBusinessRules) then fBusinessRules.BeforeOpen(Self);
+
+ try
+ if not fFetching then begin
+ if fMasterLink.Active then
+ FetchMastersDetails(nil, nil, IgnoreAutoFetchSettings) // This calls InitializeDataTable possibily applying a new schema
+ else
+ if RemoteFetchEnabled then LoadFromRemoteSource else LoadFromLocalSchema;
+ end;
+
+ if (moCascadeOpenClose in MasterOptions) then DoCascadeOperation(nil, moCascadeOpenClose);
+
+ if Assigned(AfterOpen) then AfterOpen(Self);
+ if Assigned(fBusinessRules) then fBusinessRules.AfterOpen(Self);
+ except
+ on E: Exception do begin
+ Close;
+ {$IFDEF DESIGNTIME}
+ if (csDesigning in ComponentState) then begin
+ SysUtils.Beep;
+ MessageDlg(E.Message, mtError, [mbOK], 0);
+ end
+ else
+ {$ENDIF DESIGNTIME}
+ raise;
+ end;
+ end;
+ finally
+ fOpening := FALSE;
+ end;
+end;
+
+procedure TDADataTable.Open;
+begin
+ DoOpen(True);
+end;
+
+
+procedure TDADataTable.OnMasterChange(Sender: TObject);
+begin
+ if (MasterSource <> nil) and (MasterSource.DataTable <> nil) then begin
+ if MasterSource.DataTable.fFetching then
+ exit;
+ end;
+
+ FetchMastersDetails;
+end;
+
+procedure TDADataTable.OnMasterDisable(Sender: TObject);
+begin
+
+end;
+
+procedure TDADataTable.LoadFromRemoteSource(BookmarkPosition: boolean = FALSE);
+begin
+ CheckProperties(True);
+ if Assigned(fOnBeforeDataRequestCall) then fOnBeforeDataRequestCall(Self, RemoteDataAdapter.Get_GetDataCall);
+ if Assigned(fBusinessRules) then fBusinessRules.OnBeforeDataRequestCall(Self, RemoteDataAdapter.Get_GetDataCall);
+ RemoteDataAdapter.Fill([self], BookmarkPosition, FieldCount = 0);
+ if Assigned(fOnAfterDataRequestCall) then fOnAfterDataRequestCall(Self, RemoteDataAdapter.Get_GetDataCall);
+ if Assigned(fBusinessRules) then fBusinessRules.OnAfterDataRequestCall(Self, RemoteDataAdapter.Get_GetDataCall);
+end;
+
+function TDADataTable.ApplyUpdates(RefetchAll: boolean = FALSE): boolean;
+var
+ details: TList;
+ i: integer;
+ dt: TDADataTable;
+begin
+ if (fCloneSource<>NIL) then
+ result := fCloneSource.ApplyUpdates(RefetchAll)
+ else begin
+ if not (ruoOnPost in RemoteUpdatesOptions) and (State in [dsInsert, dsEdit]) then Post;
+ details:= GetDetailTablesforApplyUpdate;
+ try
+ // check RDA
+ CheckProperties;
+ for i := 0 to details.Count-1 do begin
+ dt:= TDADataTable(details[i]);
+ {if dt.RemoteFetchEnabled then } dt.CheckProperties;
+ end;
+
+ //fOnBeforeApplyUpdates
+ if Assigned(fOnBeforeApplyUpdates) then fOnBeforeApplyUpdates(Self, fDelta);
+ for i := 0 to details.Count-1 do begin
+ dt:= TDADataTable(details[i]);
+ if Assigned(dt.fOnBeforeApplyUpdates) then dt.fOnBeforeApplyUpdates(dt, fDelta);
+ end;
+
+ //fBusinessRules.OnBeforeApplyUpdates
+ if Assigned(fBusinessRules) then fBusinessRules.OnBeforeApplyUpdates(Self, fDelta);
+ for i := 0 to details.Count-1 do begin
+ dt:= TDADataTable(details[i]);
+ if Assigned(dt.fBusinessRules) then dt.fBusinessRules.OnBeforeApplyUpdates(dt, fDelta);
+ end;
+
+ if RemoteFetchEnabled then begin
+
+ //fOnBeforeDataUpdateCall
+ if Assigned(fOnBeforeDataUpdateCall) then fOnBeforeDataUpdateCall(Self, RemoteDataAdapter.Get_UpdateDataCall);
+ for i := 0 to details.Count-1 do begin
+ dt:= TDADataTable(details[i]);
+ if Assigned(dt.fOnBeforeDataUpdateCall) then dt.fOnBeforeDataUpdateCall(dt, dt.RemoteDataAdapter.Get_UpdateDataCall);
+ end;
+
+ //fBusinessRules.OnBeforeDataUpdateCall
+ if Assigned(fBusinessRules) then fBusinessRules.OnBeforeDataUpdateCall(Self, RemoteDataAdapter.Get_UpdateDataCall);
+ for i := 0 to details.Count-1 do begin
+ dt:= TDADataTable(details[i]);
+ if Assigned(dt.fBusinessRules) then dt.fBusinessRules.OnBeforeDataUpdateCall(dt, dt.RemoteDataAdapter.Get_UpdateDataCall);
+ end;
+
+ result := RemoteDataAdapter.ApplyUpdates([self], RefetchAll);
+
+ //fOnAfterDataUpdateCall
+ if Assigned(fOnAfterDataUpdateCall) then fOnAfterDataUpdateCall(Self, RemoteDataAdapter.Get_UpdateDataCall);
+ for i := 0 to details.Count-1 do begin
+ dt:= TDADataTable(details[i]);
+ if Assigned(dt.fOnAfterDataUpdateCall) then dt.fOnAfterDataUpdateCall(dt, dt.RemoteDataAdapter.Get_UpdateDataCall);
+ end;
+
+ //fBusinessRules.OnAfterDataUpdateCall
+ if Assigned(fBusinessRules) then fBusinessRules.OnAfterDataUpdateCall(Self, RemoteDataAdapter.Get_UpdateDataCall);
+ for i := 0 to details.Count-1 do begin
+ dt:= TDADataTable(details[i]);
+ if Assigned(dt.fBusinessRules) then dt.fBusinessRules.OnAfterDataUpdateCall(dt, dt.RemoteDataAdapter.Get_UpdateDataCall);
+ end;
+
+ end
+ else begin
+ result := Local_ApplyUpdates(RefetchAll);
+ end;
+
+ //fOnAfterApplyUpdates
+ if Assigned(fOnAfterApplyUpdates) then fOnAfterApplyUpdates(Self);
+ for i := 0 to details.Count-1 do begin
+ dt:= TDADataTable(details[i]);
+ if Assigned(dt.fOnAfterApplyUpdates) then dt.fOnAfterApplyUpdates(dt);
+ end;
+
+ //fBusinessRules.OnAfterApplyUpdates
+ if Assigned(fBusinessRules) then fBusinessRules.OnAfterApplyUpdates(Self);
+ for i := 0 to details.Count-1 do begin
+ dt:= TDADataTable(details[i]);
+ if Assigned(dt.fBusinessRules) then dt.fBusinessRules.OnAfterApplyUpdates(dt);
+ end;
+ finally
+ details.Free;
+ end;
+ end;
+end;
+
+procedure TDADataTable.LoadSchema(PreserveLookupFields : boolean = FALSE; PreserveClientCalcFields : boolean = FALSE);
+begin
+ if RemoteFetchEnabled then begin
+ CheckProperties(True);
+ if Assigned(fOnBeforeSchemaCall) then fOnBeforeSchemaCall(Self, RemoteDataAdapter.Get_GetSchemaCall);
+ if Assigned(fBusinessRules) then fBusinessRules.OnBeforeSchemaCall(self, RemoteDataAdapter.Get_GetSchemaCall);
+ RemoteDataAdapter.FillSchema([self], PreserveLookupFields, PreserveClientCalcFields);
+ if Assigned(fOnAfterSchemaCall) then fOnAfterSchemaCall(Self, RemoteDataAdapter.Get_GetSchemaCall);
+ if Assigned(fBusinessRules) then fBusinessRules.OnAfterSchemaCall(self, RemoteDataAdapter.Get_GetSchemaCall);
+ end
+ else begin
+ CheckProperties;
+ LoadLocalSchema(PreserveLookupFields, PreserveClientCalcFields);
+ end;
+end;
+
+procedure TDADataTable.LoadScript(aDatasetName : string = '');
+begin
+ CheckProperties(True);
+ if Assigned(fOnBeforeScriptCall) then fOnBeforeScriptCall(Self, RemoteDataAdapter.Get_GetScriptsCall);
+ if Assigned(fBusinessRules) then fBusinessRules.OnBeforeScriptCall(Self, RemoteDataAdapter.Get_GetScriptsCall);
+ RemoteDataAdapter.FillScripts([self]);
+ if Assigned(fOnAfterScriptCall) then fOnAfterScriptCall(Self, RemoteDataAdapter.Get_GetScriptsCall);
+ if Assigned(fBusinessRules) then fBusinessRules.OnAfterScriptCall(Self, RemoteDataAdapter.Get_GetScriptsCall);
+end;
+
+procedure TDADataTable.FetchMastersDetails(aMasterTable : TDADataTable = NIL; aRequestMappings : TStrings = NIL; IgnoreAutoFetchSettings: Boolean = False);
+
+ procedure CombineDynamicWhere(aWhereExpression:TDAWhereExpression);
+ begin
+ if fMasterMappingMode = mmWhere then begin
+ if fDynamicWhere.Expression = nil then
+ fDynamicWhere.Expression:= aWhereExpression
+ else
+ fDynamicWhere.Expression:= fDynamicWhere.NewBinaryExpression(fDynamicWhere.Expression,aWhereExpression,dboAnd);
+ end;
+ end;
+
+ procedure RevertDynamicWhere(aWhereExpression:TDAWhereExpression);
+ var
+ fUserWhereExpression: TDAWhereExpression;
+ begin
+ if fMasterMappingMode = mmWhere then begin
+ fUserWhereExpression:= nil;
+ if fDynamicWhere.Expression <> aWhereExpression then begin
+ fUserWhereExpression:= TDABinaryExpression(fDynamicWhere.Expression).Left;
+ TDABinaryExpression(fDynamicWhere.Expression).Left:=nil;
+ end;
+ fDynamicWhere.Clear;
+ fDynamicWhere.Expression:= fUserWhereExpression;
+ end;
+ end;
+
+
+ function GenerateWhereStatement: TDAWhereExpression;
+ var
+ lFieldName: string;
+ pos1, pos2: integer;
+ lfld1: TDAField;
+ lfld2: TDAField;
+ lExpression: TDAWhereExpression;
+ begin
+ //fDynamicWhere.Clear;
+ Pos1 := 1;
+ pos2 := 1;
+ Result:=nil;
+ while True do begin
+ if (Pos1 > Length(DetailFields)) and (Pos2 > Length(MasterFields)) then Break;
+
+ if ((Pos1 > Length(DetailFields)) and (Pos2 <= Length(MasterFields))) or
+ ((Pos1 <= Length(DetailFields)) and (Pos2 > Length(MasterFields))) then
+ RaiseError('DetailFields should have same number of items as MasterFields');
+
+ {$WARN SYMBOL_DEPRECATED OFF}
+ lFieldName:= ExtractFieldName(DetailFields, Pos1);
+ {$WARN SYMBOL_DEPRECATED ON}
+ lfld1 := FindField(lFieldName);
+ if lfld1 = nil then RaiseError('Invalid field name %s in DetailFields', [lFieldName]);
+ {$WARN SYMBOL_DEPRECATED OFF}
+ lFieldName:= ExtractFieldName(MasterFields, Pos2);
+ {$WARN SYMBOL_DEPRECATED ON}
+ lfld2 := MasterSource.DataTable.Fields.FindField(lFieldName);
+ if lfld2 = nil then RaiseError('Invalid field name %s in MasterFields', [lFieldName]);
+
+ lExpression := fDynamicWhere.NewBinaryExpression(
+ fDynamicWhere.NewField('',lfld1.Name),
+ fDynamicWhere.NewConstant(lfld2.Value,lfld2.DataType),
+ dboEqual);
+
+ if Result <> nil then
+ Result:=fDynamicWhere.NewBinaryExpression(Result,lExpression,dboAnd)
+ else
+ Result:= lExpression;
+ end;
+ end;
+
+var
+ master: TDataset;
+ par: TDARemoteRequestParam;
+ fld: TDAField;
+ key: string;
+ i: integer;
+ dofetch: boolean;
+ mappings : TStrings;
+ detailparam : TDAParam;
+ lmmWhereExpression: TDAWhereExpression;
+begin
+ if RemoteFetchEnabled then CheckProperties
+ else if not(Assigned(LocalSchema) and Assigned(LocalDataStreamer)) then begin
+ if fOpening then InitializeDataTable;
+ Exit;
+ end;
+
+ //
+ //
+ // TODO: this doesnt properly use the new RDA's DMB yet. we need to discuss/rethink how to handle that!
+ //
+ //
+
+ mappings := NIL;
+
+ dofetch := (((dtAutoFetch in DetailOptions) or IgnoreAutoFetchSettings) {and RemoteFetchEnabled}) or (aMasterTable<>NIL);
+
+ if (aRequestMappings<>NIL) then mappings := aRequestMappings
+ else begin
+ case fMasterMappingMode of
+ mmDataRequest : mappings := MasterRequestMappings;
+ mmParams : mappings := MasterParamsMappings;
+ end;
+ end;
+
+ if (aMasterTable<>NIL)
+ then master := aMasterTable.Dataset
+ else master := fMasterLink.DataSet;
+
+ if master = nil then exit;
+
+ if (master.RecordCount = 0) then begin
+ if not Active then InitializeDataTable; // Master opened with 0 records and detail wasn't open yet
+
+ Exit;
+ end
+ else if (MasterSource = nil) then Exit;
+ if {(master.State=dsBrowse) and} not((MasterSource.DataTable.State = dsInsert) or MasterSource.DataTable.Delta.IsNewRecord) then begin
+ if dofetch then begin
+ // Determines if the details for this master have been fetched
+ key := IntToStr(MasterSource.DataTable.GetRowRecIDValue);
+ if (fFetchedMasters.IndexOf(key) >= 0) then Exit;
+ if (fMasterMappingMode = mmWhere) or ((mappings<>NIL) and (mappings.Count > 0)) then begin
+ lmmWhereExpression:=nil;
+ if RemoteFetchEnabled then begin
+ // remotemode
+
+ // If not, then assigns the param values from the current master record,
+ // invokes the remote call and loads the data
+ case MasterMappingMode of
+ mmWhere: begin
+ lmmWhereExpression:=GenerateWhereStatement;
+ end;
+ mmDataRequest : begin
+ for i := 0 to (mappings.Count - 1) do begin
+ par := nil;
+ if RemoteDataAdapter.Get_GetDataCall <> nil then
+ par := RemoteDataAdapter.Get_GetDataCall.Params.ParamByName(Trim(mappings.Names[i]));
+ if (par=NIL) then RaiseError('Invalid parameter name %s in master mappings', [Trim(mappings.Names[i])]);
+
+ fld := MasterSource.DataTable.Fields.FindField(Trim(mappings.Values[mappings.Names[i]]));
+ if (fld=NIL) then RaiseError('Invalid field name %s in master mappings', [Trim(mappings.Values[mappings.Names[i]])]);
+
+ if (par <> nil) and (fld <> nil) and not VarIsNull(fld.Value)
+ then par.AsVariant := fld.Value
+ end;
+ end;
+ mmParams : begin
+ // Fills it in
+ for i := 0 to (mappings.Count - 1) do begin
+ detailparam := Params.ParamByName(Trim(mappings.Names[i]));
+ if (detailparam=NIL) then RaiseError('Invalid parameter name %s in param mappings', [Trim(mappings.Names[i])]);
+
+ fld := MasterSource.DataTable.Fields.FindField(Trim(mappings.Values[mappings.Names[i]]));
+ if (fld=NIL) then RaiseError('Invalid field name %s in param mappings', [Trim(mappings.Values[mappings.Names[i]])]);
+
+ if (detailparam <> nil) and (fld <> nil) and not VarIsNull(fld.Value)
+ then detailparam.Value := fld.Value
+ end;
+ end;
+ end;
+
+ CombineDynamicWhere(lmmWhereExpression);
+ try
+ LoadFromRemoteSource;
+ finally
+ RevertDynamicWhere(lmmWhereExpression);
+ end;
+
+ try
+ fFetchedMasters.Add(key);
+ except
+ raise Exception.CreateFmt('Master record %s has been fetched twice', [key]);
+ end;
+ end { RemoteFetchEnabled }else begin
+ // localmode
+
+ // If not, then assigns the param values from the current master record,
+ // invokes the remote call and loads the data
+ case MasterMappingMode of
+ mmWhere: begin
+ lmmWhereExpression := GenerateWhereStatement;
+ end;
+ mmParams: begin
+ // Fills it in
+ for i := 0 to (mappings.Count - 1) do begin
+ detailparam := Params.ParamByName(Trim(mappings.Names[i]));
+ if (detailparam=NIL) then RaiseError('Invalid parameter name %s in param mappings', [Trim(mappings.Names[i])]);
+
+ fld := MasterSource.DataTable.Fields.FindField(Trim(mappings.Values[mappings.Names[i]]));
+ if (fld=NIL) then RaiseError('Invalid field name %s in param mappings', [Trim(mappings.Values[mappings.Names[i]])]);
+
+ if (detailparam <> nil) and (fld <> nil) and not VarIsNull(fld.Value) then detailparam.Value := fld.Value
+ end;
+ end;
+ mmDataRequest: raise Exception.Create('mmDataRequest mode only supported in RemoteFetchEnabled mode');
+ end;
+
+ CombineDynamicWhere(lmmWhereExpression);
+ try
+ LoadFromLocalSchema;
+ finally
+ RevertDynamicWhere(lmmWhereExpression);
+ end;
+
+ try
+ fFetchedMasters.Add(key);
+ except
+ raise Exception.CreateFmt('Master record %s has been fetched twice', [key]);
+ end;
+ end;
+ end else begin
+ { ALEF: I removed the code below because it was never meant to be here to begin with. Very error prone.
+ Who added this???
+
+ // Automatics
+ for i := 0 to (DataRequestCall.Params.Count - 1) do begin
+ par := DataRequestCall.Params[i];
+ fld := MasterSource.DataTable.Fields.FindField(par.Name);
+
+ if (par <> nil) and (fld <> nil) and not VarIsNull(fld.Value) then par.Value := fld.Value;
+ end;}
+
+ RaiseError('There are no mappings defined. Cannot fetch records for detail table '+Name);
+ end;
+ end; {dofetch}
+ end;
+end;
+
+procedure TDADataTable.WriteDeltaToStream(aStreamer: TDADataStreamer);
+var
+ i: integer;
+ details: TList;
+ lHasReducedDelta: Boolean;
+ oldMode: boolean;
+begin
+ // And the details' updates (if specified)
+ details := GetDetailTablesforApplyUpdate(False);
+ try
+ lHasReducedDelta:= fHasReducedDelta;
+ if not aStreamer.SendReducedDelta then begin
+ if not lHasReducedDelta then
+ for i := 0 to (details.Count - 1) do begin
+ lHasReducedDelta:= TDADataTable(details[i]).fHasReducedDelta;
+ if lHasReducedDelta then Break;
+ end;
+ end;
+ oldMode:=aStreamer.SendReducedDelta;
+ if lHasReducedDelta then aStreamer.SendReducedDelta:=True;
+ try
+ // Writes its own updates
+ if self.HasDelta then aStreamer.WriteDelta(Self);
+ for i := 0 to (details.Count - 1) do
+ TDADataTable(details[i]).WriteDeltaToStream(aStreamer);
+ finally
+ aStreamer.SendReducedDelta := oldMode;
+ end;
+ finally
+ details.Free;
+ end;
+end;
+
+procedure TDADataTable.ReadDeltaFromStream(aStreamer: TDADataStreamer;aFailedDeltas:TList);
+var
+ i: integer;
+ details: TList;
+begin
+ // Reads its own updates
+ if aStreamer.FindDeltaIndex(Self.LogicalName) <> -1 then begin
+ Delta.Clear;
+ aStreamer.ReadDelta(Self);
+ if Delta.Count>0 then fHasReducedDelta := aStreamer.HasReducedDelta;
+
+ For i := 0 to Delta.Count-1 do
+ if Delta.Changes[i].Status = csFailed then
+ aFailedDeltas.Add(Delta.Changes[i]);
+ end;
+
+ // And the details' updates (if specified)
+ details := GetDetailTablesforApplyUpdate(False);
+ try
+ for i := 0 to (details.Count - 1) do
+ TDADataTable(details[i]).ReadDeltaFromStream(aStreamer, aFailedDeltas);
+ finally
+ details.Free;
+ end;
+end;
+
+procedure TDADataTable.ReadDeltaFromStream(aStreamer: TDADataStreamer);
+var
+ List: TList;
+begin
+ List:= TList.Create;
+ try
+ ReadDeltaFromStream(aStreamer,List);
+ finally
+ List.Free;
+ end;
+end;
+
+procedure TDADataTable.MergeDelta;
+var
+ i, k, x: integer;
+ details: TList;
+// dt: TDADataTable;
+// ok : boolean;
+// failed, pending, resolved : integer;
+ oldval, newval : Variant;
+ fld : TDAField;
+ pkfields : string;
+ oldopt : TDARemoteUpdatesOptions;
+ oldlog : boolean;
+ keynames: array of string;
+ keyvals : array of variant;
+ oldmastersource : TDADataSource;
+ lhasDelta: Boolean;
+ pk_array: array of boolean;
+ lReadOnly: boolean;
+ key_cnt: integer;
+begin
+ details:=GetDetailTablesforApplyUpdate(False);
+ try
+ //fOnBeforeMergeDelta
+ if Assigned(fOnBeforeMergeDelta) then fOnBeforeMergeDelta(Self);
+ {for i := 0 to details.Count-1 do begin
+ dt:= TDADataTable(details[i]);
+ if Assigned(dt.fOnBeforeMergeDelta) then dt.fOnBeforeMergeDelta(dt);
+ end;}
+
+ //fBusinessRules.OnBeforeMergeDelta
+ if Assigned(fBusinessRules) then fBusinessRules.OnBeforeMergeDelta(Self);
+ {for i := 0 to details.Count-1 do begin
+ dt:= TDADataTable(details[i]);
+ if Assigned(dt.fBusinessRules) then dt.fBusinessRules.OnBeforeMergeDelta(dt);
+ end;}
+
+ oldopt := RemoteUpdatesOptions;
+ oldlog := LogChanges;
+ oldmastersource := MasterSource;
+
+ lhasDelta := Delta.Count > 0;
+ if lhasDelta then begin
+ RemoteUpdatesOptions := RemoteUpdatesOptions-[ruoOnPost];
+ LogChanges := FALSE;
+ // Disables the M/D relationship so that Locates can work in all cases (master or detail tables, regardless
+ // of their positioning)
+ if not (ruoOnPost in oldopt) then MasterSource := NIL;
+ end;
+
+ try
+ pkfields := '';
+ key_cnt:=Delta.KeyFieldCount;
+ SetLength(keynames, key_cnt);
+ if key_cnt > 0 then begin
+ for i := 0 to (key_cnt-1) do
+ keynames[i]:=Delta.KeyFieldNames[i];
+ end
+ else begin
+ // use AutoInc as PK
+ SetLength(keynames, Delta.LoggedFieldCount);
+ for i := 0 to (Delta.LoggedFieldCount-1) do
+ if Delta.LoggedFieldTypes[i] in [datAutoInc, datLargeAutoInc] then begin
+ keynames[key_cnt]:=Delta.LoggedFieldNames[i];
+ inc(key_cnt);
+ end;
+ SetLength(keynames, key_cnt);
+ end;
+
+ For i:=0 to key_cnt -1 do
+ pkfields := pkfields+keynames[i]+';';
+ if pkfields <> '' then pkfields := Copy(pkfields, 1, Length(pkfields)-1);
+ SetLength(keyvals, key_cnt);
+
+ // Merges the updates
+ if (Delta.Count>0) then begin
+ SetLength(pk_array, Delta.LoggedFieldCount);
+ for i := 0 to Delta.LoggedFieldCount - 1 do
+ pk_array[i]:=False;
+
+ for i := 0 to key_cnt - 1 do begin
+ x := Delta.IndexOfLoggedField(keynames[i]);
+ if x <> -1 then pk_array[x]:=True;
+ end;
+ for i := (Delta.Count-1) downto 0 do begin
+ if (Delta[i].Status<>csResolved)
+ then Continue;
+ if (Delta[i].ChangeType<>ctDelete) then begin
+ if (Self.State in [dsEdit, dsInsert]) and (ruoOnPost in oldopt) then begin
+ // Merge the details
+ for x := 0 to (details.Count - 1) do
+ TDADataTable(details[x]).MergeDelta;
+ for x := 0 to (Delta.LoggedFieldCount-1) do begin
+ fld := FieldByName(Delta.LoggedFieldNames[x]);
+
+ newval := Delta[i].NewValueByName[fld.Name];
+ oldval := Delta[i].OldValueByName[fld.Name];
+ if fHasReducedDelta then begin
+ if not pk_array[x] and ROVariantsEqual(oldVal,newVal) then continue;
+ end;
+ if fld.ServerAutoRefresh or (not VarIsArray(newVal) and not ROVariantsEqual(newval,oldval)) then begin
+ VariantToFieldValue(Delta[i].NewValueByName[fld.Name], fld);
+ end;
+ end;
+ end
+ else begin
+ for k := 0 to (key_cnt-1) do
+ keyvals[k] := Delta[i].OldValueByName[keynames[k]];
+
+ // Locates the original record
+ First;
+ if not Locate(pkfields, keyvals, []) then Continue;
+
+ // Merge the details
+ for x := 0 to (details.Count - 1) do
+ TDADataTable(details[x]).MergeDelta;
+
+ // Merges its own updates
+ Edit;
+ for x := 0 to (Delta.LoggedFieldCount-1) do begin
+ fld := FieldByName(Delta.LoggedFieldNames[x]);
+
+ newval := Delta[i].NewValueByName[fld.Name];
+ oldval := Delta[i].OldValueByName[fld.Name];
+ if fHasReducedDelta then begin
+ if not pk_array[x] and ROVariantsEqual(oldVal,newVal) then continue;
+ end;
+ if fld.ServerAutoRefresh or (not VarIsArray(newVal) and (newval<>oldval)) then begin
+ lReadOnly := fld.ServerAutoRefresh and fld.ReadOnly;
+ if lReadOnly then fld.ReadOnly:=False;
+ VariantToFieldValue(Delta[i].NewValueByName[fld.Name], fld);
+ if lReadOnly then fld.ReadOnly:=True;
+ end;
+ end;
+ Post;
+ end;
+ end;
+ // Removes this merged change
+ Delta.Delete(i);
+ end;
+ end
+
+ // If there are no updates for this master, the children still need to be processed
+ else begin
+ // Merge the details
+ for x := 0 to (details.Count - 1) do
+ TDADataTable(details[x]).MergeDelta;
+ end;
+ finally
+ if lhasDelta then begin
+ RemoteUpdatesOptions := oldopt;
+ LogChanges := oldlog;
+
+ // Restores the M/D relationship
+ if not (ruoOnPost in oldopt) then MasterSource := oldmastersource;
+ end;
+ //fOnAfterMergeDelta
+ if Assigned(fOnAfterMergeDelta) then fOnAfterMergeDelta(Self);
+ {for i := 0 to details.Count-1 do begin
+ dt:= TDADataTable(details[i]);
+ if Assigned(dt.fOnAfterMergeDelta) then dt.fOnAfterMergeDelta(dt);
+ end;}
+
+ //fBusinessRules.OnAfterMergeDelta
+ if Assigned(fBusinessRules) then fBusinessRules.OnAfterMergeDelta(Self);
+ {for i := 0 to details.Count-1 do begin
+ dt:= TDADataTable(details[i]);
+ if Assigned(dt.fBusinessRules) then dt.fBusinessRules.OnAfterMergeDelta(dt);
+ end;}
+ end;
+ finally
+ details.Free;
+ if Delta.Count = 0 then fHasReducedDelta:=False;
+ end;
+end;
+
+
+procedure TDADataTable.PackAllInOneFetchInfoArray(aDataTable : TDADataTable; OutArray: TDADatasetRequestInfoArray);
+var outinfo : TDADatasetRequestInfo;
+ details : TList;
+ dt : TDADataTable;
+ i : integer;
+begin
+ outinfo := outarray.Add;
+ outinfo.DatasetName := {$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(aDataTable.LogicalName);
+ outinfo.MaxRecords := aDataTable.MaxRecords;
+ outinfo.IncludeSchema := TRUE;
+ outinfo.Params := NIL;
+
+ details := aDataTable.GetDetailDataTables;
+ try
+ for i := 0 to (details.Count - 1) do begin
+ dt := TDADataTable(details[i]);
+
+ if (dtIncludeInAllInOneFetch in dt.DetailOptions)
+ then PackAllInOneFetchInfoArray(dt, OutArray);
+ end;
+ finally
+ details.Free;
+ end;
+end;
+
+function TDADataTable.FieldByName(const aName: string): TDAField;
+begin
+ result := fFields.FieldByName(aName)
+end;
+
+function TDADataTable.ParamByName(const aName: string): TDAParam;
+begin
+ result := fParams.ParamByName(aName)
+end;
+
+procedure TDADataTable.First;
+begin
+ fDataset.First
+end;
+
+procedure TDADataTable.Last;
+begin
+ fDataset.Last
+end;
+
+procedure TDADataTable.Prior;
+begin
+ fDataset.Prior
+end;
+
+procedure TDADataTable.Sort(const FieldNames: array of string; const Directions: array of TDASortDirection);
+var
+ i: integer;
+begin
+ DoSort(FieldNames, Directions);
+
+ // Stores the new settings for convenience
+ SetLength(fSortDirections, Length(Directions));
+ for i := 0 to Length(Directions) - 1 do
+ fSortDirections[i] := Directions[i];
+
+ SetLength(fSortFieldNames, Length(FieldNames));
+ for i := 0 to Length(FieldNames) - 1 do
+ fSortFieldNames[i] := FieldNames[i];
+end;
+
+procedure TDADataTable.UnSort;
+begin
+ Sort([], []);
+end;
+
+procedure TDADataTable.LoadFromStream(aStream: TStream);
+var
+ //remfetch,
+ oldlogchanges, oldcascadeopenclose: boolean;
+ lStreamer: TDADataStreamer;
+ i: integer;
+begin
+ Check(RemoteFetchEnabled, Name+'. Cannot do this operation when RemoteFetchEnabled is set to TRUE');
+ if RemoteDataAdapter <> nil then
+ lStreamer:=RemoteDataAdapter.DataStreamer
+ else
+ lStreamer:=LocalDataStreamer;
+
+ Check(lStreamer = nil, Name+'. RemoteDataAdapter or LocalDataStreamer must be assigned.');
+
+ Close;
+
+ oldlogchanges := LogChanges;
+// remfetch := RemoteFetchEnabled;
+ oldcascadeopenclose := moCascadeOpenClose in fMasterOptions;
+
+// RemoteFetchEnabled := FALSE;
+ LogChanges := FALSE;
+ if oldcascadeopenclose then fMasterOptions := fMasterOptions - [moCascadeOpenClose];
+ try
+ fStreaming := True;
+ lStreamer.Initialize(aStream, aiRead);
+ try
+ if not (soIgnoreStreamSchema in fStreamingOptions) then
+ lStreamer.ReadDataset(LogicalName, Self, TRUE)
+ else
+ lStreamer.ReadDataset(LogicalName, Self, FALSE);
+
+ lStreamer.ReadDelta(Self);
+ if Delta <> nil then
+ For i:= 0 to Delta.Count-1 do
+ if fCurrRecId <= Delta.Changes[i].RecID then
+ fCurrRecId := Delta.Changes[i].RecID+1;
+ finally
+ lStreamer.Finalize;
+ fStreaming := False;
+ end;
+ finally
+ LogChanges := oldlogchanges;
+// RemoteFetchEnabled := remfetch;
+ if oldcascadeopenclose then begin
+ fMasterOptions := fMasterOptions + [moCascadeOpenClose];
+ fOpening := True;
+ try
+ DoCascadeOperation(nil, moCascadeOpenClose);
+ finally
+ fOpening := False;
+ end;
+ end;
+ if Active then First;
+ end;
+end;
+
+procedure TDADataTable.SaveToStream(aStream: TStream);
+var
+ lStreamer: TDADataStreamer;
+ OldMasterSource: TDADataSource;
+begin
+ if (soDisableEventsWhileStreaming in fStreamingOptions) then DisableControls;
+ try
+ OldMasterSource := MasterSource;
+ MasterSource := nil;
+ fStreaming := True;
+ try
+ First; // Important!
+ if RemoteFetchEnabled then
+ lStreamer:= RemoteDataAdapter.DataStreamer
+ else
+ lStreamer:=LocalDataStreamer;
+ if lStreamer = nil then CheckProperties;
+ lStreamer.Initialize(aStream, aiWrite);
+ try
+ lStreamer.WriteDataset(Self, [woRows, woSchema]);
+ lStreamer.WriteDelta(Self);
+ finally
+ lStreamer.Finalize;
+ end;
+ finally
+ fStreaming := False;
+ MasterSource := OldMasterSource;
+ end;
+ finally
+ if (soDisableEventsWhileStreaming in fStreamingOptions) then EnableControls;
+ end;
+end;
+
+procedure TDADataTable.LoadFromFile(const aFileName: string);
+var
+ fs: TFileStream;
+ oldval : boolean;
+begin
+ oldval := RemoteFetchEnabled;
+ RemoteFetchEnabled := FALSE;
+ try
+ fs := TFileStream.Create(aFileName, fmOpenRead);
+ try
+ LoadFromStream(fs);
+ finally
+ fs.Free;
+ end;
+ finally
+ RemoteFetchEnabled := oldval;
+ end;
+end;
+
+procedure TDADataTable.SaveToFile(const aFileName: string);
+var
+ fs: TFileStream;
+begin
+ fs := TFileStream.Create(aFileName, fmCreate);
+ try
+ SaveToStream(fs);
+ finally
+ fs.Free;
+ end;
+end;
+
+procedure TDADataTable.SetParams(const Value: TDAParamCollection);
+begin
+ fParams.Assign(Value);
+end;
+
+procedure TDADataTable.ClearFields;
+var
+ i: integer;
+begin
+ for i := 0 to FieldCount - 1 do
+ Fields[i].Value := Null;
+end;
+
+procedure TDADataTable.ClearRows;
+var
+ lold_Filtered: Boolean;
+begin
+ lold_Filtered:= Filtered;
+ DisableControls;
+ try
+ Filtered := False;
+ if Assigned(fDelta) and fDelta.GetInChange then fDelta.CancelChange;
+ while (RecordCount > 0) do Delete;
+ finally
+ Filtered := lold_Filtered;
+ EnableControls;
+ end;
+end;
+
+function TDADataTable.GetState: TDataSetState;
+begin
+ result := fDataset.State
+end;
+
+function TDADataTable.GetEditing: boolean;
+begin
+ result := State in [dsEdit, dsInsert]
+end;
+
+function TDADataTable.GetPrepared: boolean;
+begin
+ result := FALSE
+end;
+
+procedure TDADataTable.SetPrepared(Value: boolean);
+begin
+
+end;
+
+function TDADataTable.GetText: string;
+begin
+ result := ''
+end;
+
+procedure TDADataTable.SetText(const Value: string);
+begin
+
+end;
+
+procedure TDADataTable.Notification(AComponent: TComponent;
+ Operation: TOperation);
+var
+ i: Integer;
+begin
+ inherited;
+
+ if (Operation = opRemove) then begin
+ if (AComponent = fLocalSchema) then fLocalSchema := nil;
+ if (AComponent = fRemoteDataAdapter) then fRemoteDataAdapter := nil;
+ if (AComponent = fLocalDataStreamer) then fLocalDataStreamer := nil;
+ if AComponent is TDataSource then begin
+ for i := 0 to Fields.Count - 1 do begin
+ if Fields[i].LookupSource = AComponent then
+ Fields[i].LookupSource := nil;
+ end;
+ end;
+
+ end;
+
+end;
+
+procedure TDADataTable.SetMasterSource(const Value: TDADataSource);
+begin
+ fMasterLink.DataSource := Value;
+end;
+
+procedure TDADataTable.SetMasterFields(const Value: string);
+begin
+ fMasterLink.FieldNames := Value;
+end;
+
+function TDADataTable.GetMasterRequestMappings: TStrings;
+begin
+ result := fMasterRequestMappings;
+end;
+
+procedure TDADataTable.SetMasterRequestMappings(const Value: TStrings);
+begin
+ fMasterRequestMappings.Assign(Value);
+end;
+
+function TDADataTable.GetDetailDataTables: TList;
+var
+ i: integer;
+ ownerdt: TDADataTable;
+ dtdataset: IDADataTableDataset;
+ tmplist: TList;
+begin
+ // This function only returns the linked datatables and removes duplicates
+ // from the GetDetailDataSets call. I assume the duplicates are because of
+ // the masterlink TDADatatables create.
+
+ result := TList.Create;
+ tmplist := TList.Create;
+
+ try
+ {$IFNDEF FPC}
+ Dataset.GetDetailDataSets(tmplist);
+ {$ENDIF}
+ for i := 0 to (tmplist.Count - 1) do begin
+ if not Supports(TDataset(tmplist[i]), IDADataTableDataset, dtdataset) then Continue;
+ ownerdt := dtdataset.GetDataTable;
+
+ if (result.IndexOf(ownerdt) < 0) then result.Add(ownerdt);
+ end;
+ finally
+ tmplist.Free;
+ end;
+end;
+
+function TDADataTable.GetDelta: IDADelta;
+begin
+ if (fDelta = nil) then raise Exception.Create('Delta has not yet been initialized by the datatable');
+ result := fDelta;
+end;
+
+function TDADataTable.GetName: string;
+begin
+ if (LogicalName = '') then
+ result := Name
+ else
+ result := LogicalName;
+end;
+
+procedure TDADataTable.DoAfterCloseDataset;
+begin
+ CallScript('AfterClose');
+ fCloneSource := NIL;
+end;
+
+procedure TDADataTable.DoAfterOpenDataset;
+begin
+ CallScript('AfterOpen');
+
+ if Assigned(fAfterOpenIDataset) then fAfterOpenIDataset(Self, '', ROGetTickCount-fOpenTick);
+end;
+
+procedure TDADataTable.DoBeforeCloseDataset;
+begin
+ if (fCloneSource<>NIL) then Fields.Clear;
+ CallScript('BeforeClose');
+end;
+
+procedure TDADataTable.CloneSelectedRecord(Source: TDADataTable; DoPost: boolean = TRUE);
+begin
+ CloneSelectedRecord(Source as IDADataset, DoPost);
+end;
+
+procedure TDADataTable.CloneSelectedRecord(const Source: IDADataset; DoPost: boolean = TRUE);
+var
+ i: integer;
+ destfld,
+ srcfld: TDAField;
+ lreadonly: boolean;
+begin
+ Insert;
+ for i := 0 to (Source.FieldCount - 1) do begin
+ srcfld := Source.Fields[i];
+ destfld := Fields.FindField(srcfld.Name);
+ lreadonly := destfld.ReadOnly;
+ destfld.ReadOnly := False;
+ try
+ if destfld <> nil then destfld.Value := srcfld.Value;
+ finally
+ destfld.ReadOnly := lreadonly;
+ end;
+ end;
+ if DoPost then Post;
+end;
+
+procedure TDADataTable.FreeBookmark(Bookmark: TBookmark);
+begin
+ Dataset.FreeBookmark(Bookmark);
+end;
+
+function TDADataTable.GetBookmark: pointer;
+begin
+ result := Dataset.GetBookmark;
+end;
+
+procedure TDADataTable.GotoBookmark(Bookmark: TBookmark);
+begin
+ Dataset.GotoBookmark(Bookmark);
+end;
+
+function TDADataTable.GetRowRecIDValue: integer;
+begin
+ result := fRecIDField.AsInteger
+end;
+
+procedure TDADataTable.DisableEventHandlers;
+begin
+ DetachEventHooks(Dataset);
+end;
+
+procedure TDADataTable.EnableEventHandlers;
+begin
+ AttachEventHooks(Dataset);
+end;
+
+procedure TDADataTable.Refresh;
+begin
+ fDataset.Refresh;
+end;
+
+procedure TDADataTable.SetLocalDataStreamer(const Value: TDADataStreamer);
+begin
+ fLocalDataStreamer := Value;
+ if (fLocalDataStreamer <> nil) then
+ fLocalDataStreamer.FreeNotification(Self);
+end;
+
+procedure TDADataTable.SetLocalSchema(const Value: TDASchema);
+begin
+ fLocalSchema := Value;
+ if (fLocalSchema <> nil) then begin
+ fLocalSchema.FreeNotification(Self);
+
+ RemoteFetchEnabled := FALSE;
+ end;
+end;
+
+function TDADataTable.DataReaderFirst: boolean;
+begin
+ result := RecordCount > 0;
+ if result then First;
+end;
+
+function TDADataTable.DataReaderNext: boolean;
+begin
+ result := not EOF;
+ if result then Next;
+end;
+
+function TDADataTable.GetAsBoolean(Index: integer): boolean;
+begin
+ result := fFields[Index].AsBoolean;
+end;
+
+function TDADataTable.GetAsBoolean(const FieldName: string): boolean;
+begin
+ result := FieldByName(FieldName).AsBoolean;
+end;
+
+function TDADataTable.GetAsCurrency(Index: integer): Currency;
+begin
+ Result:= fFields[Index].AsCurrency;
+end;
+
+function TDADataTable.GetAsCurrency(const FieldName: string): currency;
+begin
+ result := FieldByName(FieldName).AsCurrency;
+end;
+
+function TDADataTable.GetAsDateTime(const FieldName: string): TDateTime;
+begin
+ result := FieldByName(FieldName).AsDateTime;
+end;
+
+function TDADataTable.GetAsDateTime(Index: integer): TDateTime;
+begin
+ result := fFields[Index].AsDateTime;
+end;
+
+function TDADataTable.GetAsFloat(const FieldName: string): double;
+begin
+ result := FieldByName(FieldName).AsFloat;
+end;
+
+function TDADataTable.GetAsFloat(Index: integer): double;
+begin
+ result := fFields[Index].AsFloat;
+end;
+
+function TDADataTable.GetAsInteger(Index: integer): integer;
+begin
+ result := fFields[Index].AsInteger;
+end;
+
+function TDADataTable.GetAsInteger(const FieldName: string): integer;
+begin
+ result := FieldByName(FieldName).AsInteger;
+end;
+
+function TDADataTable.GetAsString(const FieldName: string): string;
+begin
+ result := FieldByName(FieldName).AsString;
+end;
+
+function TDADataTable.GetAsString(Index: integer): string;
+begin
+ result := fFields[Index].AsString;
+end;
+
+function TDADataTable.GetAsVariant(const FieldName: string): variant;
+begin
+ result := FieldByName(FieldName).Value;
+end;
+
+function TDADataTable.GetAsVariant(Index: integer): variant;
+begin
+ result := fFields[Index].Value
+end;
+
+function TDADataTable.GetFieldIndexes(const aName: string): integer;
+begin
+ result := fFields.FindItem(aName).Index
+end;
+
+function TDADataTable.GetFieldNames(Index: integer): string;
+begin
+ result := fFields[Index].Name
+end;
+
+procedure TDADataTable.SetBusinessRulesID(const Value: string);
+var
+ bizclass: TDADataTableRulesClass;
+begin
+ if (Value = fBusinessRulesID) then Exit;
+
+ if Assigned(fBusinessRules) then begin
+ fBusinessRules.Detach(Self);
+ FreeAndNIL(fBusinessRules);
+ end;
+
+ fBusinessRulesID := Trim(Value);
+
+ if (fBusinessRulesID <> '') and not (csDesigning in ComponentState) then begin
+ Check(not FindDataTableRules(Value, bizclass), 'Invalid BusinessRulesID "%s"', [Value]);
+
+ fBusinessRules := bizclass.Create(Self);
+ fBusinessRules.Attach(Self);
+ end;
+end;
+
+function TDADataTable.QueryInterface(const IID: TGUID; out Obj): HResult;
+begin
+ result := inherited QueryInterface(IID, Obj);
+
+ if (result <> S_OK) and Assigned(fBusinessRules) then begin
+ // Users might introduce specific interfaces at the business rule level
+ // This allows to type cast the data table to any additional business oriented interface
+ // they decide to create.
+ result := fBusinessRules.QueryInterface(IID, Obj);
+ end;
+end;
+
+function TDADataTable.GetHasDelta: boolean;
+begin
+ result := Assigned(fDelta) and (fDelta.Count > 0);
+end;
+
+function TDADataTable.GetHasDeltaRecursive: boolean;
+var
+ lDetails: TList;
+ lTable: TDADataTable;
+ i: integer;
+begin
+ result := Assigned(fDelta) and (fDelta.Count > 0);
+ if not result then begin
+ lDetails := nil;
+ if (moCascadeApplyUpdates in fMasterOptions) then try
+ lDetails := GetDetailDataTables;
+ for i := 0 to (lDetails.Count-1) do begin
+ lTable := TDADataTable(lDetails[i]);
+ if lTable.HasDeltaRecursive then begin
+ result := true;
+ exit;
+ end;
+ end;
+ finally
+ lDetails.Free;
+ end;
+ end;
+end;
+
+function TDADataTable.GetMasterDataTable: TDADataTable;
+var lDatatableDataset : IDADataTableDataset;
+begin
+ if Supports(fMasterLink.DataSet, IDADataTableDataset, lDatatableDataset)
+ then result := lDatatableDataset.GetDataTable
+ else result := NIL;
+end;
+
+function TDADataTable.GetRecNo: integer;
+begin
+ result := fDataset.RecNo
+end;
+
+procedure TDADataTable.SetRecNo(const Value: integer);
+begin
+ fDataset.RecNo := Value
+end;
+
+function TDADataTable.GetFieldsProperty: TDAFieldCollection;
+begin
+ result := GetFields;
+end;
+
+function TDADataTable.GetActiveProperty: boolean;
+begin
+ result := GetActive();
+end;
+
+procedure TDADataTable.SetActiveProperty(const Value: boolean);
+begin
+ SetActive(Value);
+end;
+
+function TDADataTable.GetParamsProperty: TDAParamCollection;
+begin
+ result := GetParams();
+end;
+
+{$IFNDEF LINUX}
+function TDADataTable.InterfaceSupportsErrorInfo(const iid: TGUID): HResult;
+begin
+ if GetInterfaceEntry(iid) <> nil then
+ Result := S_OK
+ else
+ Result := S_FALSE;
+end;
+
+function TDADataTable.SafeCallException(ExceptObject: TObject; ExceptAddr: Pointer): HResult;
+begin
+ Result := uDAEngine.DAHandleSafeCallException(self,ExceptObject, ExceptAddr);
+end;
+{$ENDIF}
+
+procedure TDADataTable.CancelUpdates(IncludeDetails: boolean);
+var list : TList;
+ i, orignextinc : integer;
+ wasfiltered,
+ remotefetch : boolean;
+ lOldMasterFields: string;
+begin
+ if Editing then Cancel;
+ if not LogChanges then Exit;
+
+ DisableControls;
+ wasfiltered := Filtered;
+ Filtered := FALSE;
+ try
+ // Truns off the remote fetching for this datatable and its details
+ remotefetch := RemoteFetchEnabled;
+ RemoteFetchEnabled := FALSE;
+ if IncludeDetails then list := GetDetailDataTables else list := TList.Create;
+
+ // Disable the log of changes (we're about to make a bunch!)
+ LogChanges := FALSE;
+
+ // Saves the current recinc (we'll change this during the restore)
+ orignextinc := CurrRecId;
+ try
+ lOldMasterFields := MasterFields;
+ MasterFields := '';
+ try
+ // Reverts the records to the original state
+ for i := 0 to (Delta.Count-1) do
+ InternalCancelUpdateChange(Delta[i]);
+ finally
+ MasterFields := lOldMasterFields;
+ end;
+
+ // Cancels the updates for the details
+ for i := 0 to list.Count-1 do begin
+ TDADataTable(list[i]).CancelUpdates(TRUE);
+ end;
+
+ // Erases the delta
+ Delta.Clear;
+
+ finally
+ fHasReducedDelta:=False;
+ list.Free;
+ CurrRecId := orignextinc;
+ LogChanges := TRUE;
+ RemoteFetchEnabled := remotefetch;
+ end;
+ finally
+ Filtered := wasfiltered;
+ EnableControls;
+ end;
+end;
+
+procedure TDADataTable.DoBeforeOpenDataset;
+begin
+ CallScript('BeforeOpen');
+
+ fOpenTick := ROGetTickCount;
+ if Assigned(fBeforeOpenIDataset) then fBeforeOpenIDataset(Self);
+end;
+
+function TDADataTable.Lookup(const KeyFields: string;
+ const KeyValues: Variant; const ResultFields: string): Variant;
+begin
+ result := fDataset.Lookup(KeyFields, KeyValues, ResultFields);
+end;
+
+function TDADataTable.GetIsEmpty: boolean;
+begin
+ result := fDataset.IsEmpty;
+end;
+
+function TDADataTable.GetMasterParamsMappings: TStrings;
+begin
+ result := fMasterParamsMappings
+end;
+
+procedure TDADataTable.SetMasterParamsMappings(const Value: TStrings);
+begin
+ fMasterParamsMappings.Assign(Value);
+end;
+
+function TDADataTable.GetLogicalName: string;
+begin
+ result := fLogicalName;
+end;
+
+function TDADataTable.GetReadOnly: boolean;
+begin
+ result := FALSE;
+end;
+
+procedure TDADataTable.SetReadOnly(const Value: boolean);
+begin
+ // By default this property cannot be set. Raising exceptions creates problems
+ // at design time and it's useless
+end;
+
+procedure TDADataTable.SetScriptCode(const Value: TStrings);
+begin
+ fScriptCode.Assign(Value);
+end;
+
+procedure TDADataTable.CallScript(const aEvent: string);
+begin
+ if Assigned(ScriptingProvider) and (ScriptCode.Count > 0) then begin
+ (ScriptingProvider as IDADataTableScriptingProvider).RunDataTableScript(self, ScriptCode.Text, aEvent, rslPascalScript);
+ end;
+end;
+
+function TDADataTable.FindField(const aName: string): TDAField;
+begin
+ result := fFields.FindField(aName);
+end;
+
+procedure TDADataTable.AddRecord(const FieldNames: array of string;
+ const FieldValues: array of Variant);
+var i : integer;
+begin
+ Insert;
+ for i := 0 to Length(FieldNames)-1 do
+ FieldByName(FieldNames[i]).Value := FieldValues[i];
+ Post;
+end;
+
+procedure TDADataTable.SetLogicalName(aName: string);
+begin
+ fLogicalName := aName;
+end;
+
+function TDADataTable.GetDeltaInitialized: boolean;
+begin
+ result := fDelta<>NIL
+end;
+
+procedure TDADataTable.NotifyFieldsClear;
+var
+ i, lLockCount: integer;
+begin
+ // This method patches VCL issue with notification
+ // of datasources when clearing fields and controls is disabled
+ lLockCount := 0;
+ while DataSet.ControlsDisabled do begin
+ inc(lLockCount);
+ DataSet.EnableControls;
+ end;
+ TDataSetHack(DataSet).DataEvent(deFieldListChange, 0);
+ for i := 0 to lLockCount - 1 do begin
+ DataSet.DisableControls;
+ end;
+end;
+
+function TDADataTable.GetOnAfterOpen: TDAAfterOpenDatasetEvent;
+begin
+ result := fAfterOpenIDataset;
+end;
+
+function TDADataTable.GetOnBeforeOpen: TDABeforeOpenDatasetEvent;
+begin
+ result := fBeforeOpenIDataset;
+end;
+
+procedure TDADataTable.SetOnAfterOpen(
+ const Value: TDAAfterOpenDatasetEvent);
+begin
+ fAfterOpenIDataset := Value;
+end;
+
+procedure TDADataTable.SetOnBeforeOpen(
+ const Value: TDABeforeOpenDatasetEvent);
+begin
+ fBeforeOpenIDataset := Value;
+end;
+
+function TDADataTable.GetOnAfterExecute: TDAAfterExecuteCommandEvent;
+begin
+ Result := nil;
+ NotSupported();
+end;
+
+function TDADataTable.GetOnBeforeExecute: TDABeforeExecuteCommandEvent;
+begin
+ Result := nil;
+ NotSupported();
+end;
+
+procedure TDADataTable.SetOnAfterExecute(
+ const Value: TDAAfterExecuteCommandEvent);
+begin
+ NotSupported();
+end;
+
+procedure TDADataTable.SetOnBeforeExecute(
+ const Value: TDABeforeExecuteCommandEvent);
+begin
+ NotSupported();
+end;
+
+function TDADataTable.GetOnExecuteError: TDAExecuteCommandErrorEvent;
+begin
+ Result := nil;
+ NotSupported();
+end;
+
+function TDADataTable.GetOnOpenError: TDAOpenDatasetErrorEvent;
+begin
+ Result := nil;
+ NotSupported();
+end;
+
+procedure TDADataTable.SetOnExecuteError(
+ const Value: TDAExecuteCommandErrorEvent);
+begin
+ NotSupported();
+end;
+
+procedure TDADataTable.SetOnOpenError(
+ const Value: TDAOpenDatasetErrorEvent);
+begin
+ NotSupported();
+end;
+
+function TDADataTable.GetCurrRecId: integer;
+begin
+ if CloneSource = nil then
+ result := fCurrRecId
+ else
+ result := CloneSource.CurrRecId;
+end;
+
+procedure TDADataTable.SetCurrRecId(const Value: integer);
+begin
+ if CloneSource = nil then
+ fCurrRecId := Value
+ else
+ CloneSource.CurrRecId := Value
+end;
+
+function TDADataTable.GetAutoIncs: TAutoIncArray;
+begin
+ if CloneSource = nil then
+ result := fAutoIncs
+ else
+ result := CloneSource.AutoIncs;
+end;
+
+procedure TDADataTable.SetAutoIncs(const Value: TAutoIncArray);
+begin
+ if CloneSource = nil then
+ fAutoIncs := Value
+ else
+ CloneSource.AutoIncs := Value
+end;
+
+function TDADataTable.CreateAutoIncArray: TAutoIncArray;
+var i: integer;
+begin
+ SetLength(result, Fields.Count);
+ for i := 0 to Fields.Count-1 do result[i] := -1;
+end;
+
+function TDADataTable.GetCurrentRecIdValue: integer;
+begin
+ result := fCurrRecId;
+end;
+
+procedure TDADataTable.SetCurrentRecIdValue(Value: integer);
+begin
+ fCurrRecId := Value;
+end;
+
+procedure TDADataTable.InternalAfterFieldUpdate(Sender: TDACustomField);
+begin
+ if assigned(fAfterFieldChange) and (Sender is TDAField) then
+ fAfterFieldChange(self, TDAField(Sender));
+end;
+
+procedure TDADataTable.InternalBeforeFieldUpdate(Sender: TDACustomField);
+begin
+ if assigned(fBeforeFieldChange) and (Sender is TDAField) then
+ fBeforeFieldChange(self, TDAField(Sender));
+end;
+
+procedure TDADataTable.InternalSetFetching(aFetching: boolean);
+begin
+ fFetching := aFetching;
+end;
+
+procedure TDADataTable.SetCustomAttributes(const Value: TStrings);
+begin
+ fCustomAttributes.Assign(Value);
+end;
+
+function TDADataTable.Local_ApplyUpdates(RefetchAll: boolean): boolean;
+
+ function UnpackDeltas(var lStruct: TDADeltaStruct): TDABusinessProcessor;
+ var
+ j: integer;
+ lBizProc: TDABusinessProcessor;
+ lDetails: TDADatasetRelationshipList;
+ lFound: boolean;
+ begin
+ result := nil;
+ lStruct := nil;
+ // Reads the deltas.
+ lFound := false;
+ { Tries to locate a user-defined business processor }
+ if LocalSchema.Owner <> nil then
+ for j := 0 to (LocalSchema.Owner.ComponentCount - 1) do begin
+ if (LocalSchema.Owner.Components[j] is TDABusinessProcessor) then begin
+ lBizProc := TDABusinessProcessor(LocalSchema.Owner.Components[j]);
+ if SameText(lBizProc.ReferencedDataset, Self.LogicalName) then begin
+ lStruct := TDADeltaStruct.Create(Self.Delta, lBizProc);
+ lFound := true;
+ Break;
+ end;
+ end;
+ end;
+ { Either creates one}
+ if not lFound then begin
+ lBizProc := TDABusinessProcessor.Create(nil);
+ lBizProc.ReferencedDataset := Self.LogicalName;
+ lBizProc.Schema := LocalSchema;
+ Result := lBizProc;
+ lStruct := TDADeltaStruct.Create(Self.Delta, lBizProc);
+ end;
+
+ { Sets the master/detail relationships }
+ if (LocalSchema.RelationShips.Count > 0) then begin
+ lDetails := TDADatasetRelationshipList.Create;
+ try
+ LocalSchema.RelationShips.GetDetails(lStruct.BusinessProcessor.ReferencedDataset, lDetails);
+ if (lDetails.Count <> 0) then begin
+ { Prepares an array with the references to the detail deltas that will be used later on to adjust
+ autoincs, etc. }
+ for j := 0 to lDetails.Count - 1 do begin
+ if lDetails[j].DetailDatasetName = LogicalName then begin
+ lStruct.DetailDeltas.Add(lStruct.Delta);
+ lStruct.RelationShips.Add(lDetails[j]);
+ end;
+ end;
+ end;
+ finally
+ lDetails.Free;
+ end;
+ end;
+ end;
+
+var
+ FLocalConnection: IDAConnection;
+ lProcessedDeltas: TStringList;
+ lStruct: TDADeltaStruct;
+ lBizProc: TDABusinessProcessor;
+ i, j: integer;
+begin
+ Result:=False;
+ CheckProperties;
+ FLocalConnection := LocalSchema.ConnectionManager.NewConnection(LocalConnection);
+ if (Delta = nil) or (Delta.Count = 0) then Exit;
+ lBizProc := UnpackDeltas(lStruct);
+ try
+ if TriggerTransactionEvent(fOnLocalUpdateDataBeginTransaction) then FLocalConnection.BeginTransaction;
+ try
+ if (LocalSchema.UpdateRules.Count = 0) then begin
+ lStruct.BusinessProcessor.ProcessDelta(FLocalConnection, lStruct.Delta, AllChanges);
+ end
+ else begin
+ lProcessedDeltas := TStringList.Create;
+ try
+
+ for i := 0 to (LocalSchema.UpdateRules.Count - 1) do begin
+ // Processes them in the order defined in the schema
+ if LocalSchema.UpdateRules[i].DatasetName = LogicalName then begin
+ // Adds the dataset name to the list of processed deltas. Those that don't have update rules will be processed later
+ lProcessedDeltas.Add(LogicalName);
+
+ // Processes the delta
+ lStruct.BusinessProcessor.ProcessDelta(FLocalConnection, lStruct.Delta, LocalSchema.UpdateRules[i].ChangeTypes);
+
+ if (ctInsert in LocalSchema.UpdateRules[i].ChangeTypes) then begin
+ for j := 0 to (lStruct.DetailDeltas.Count - 1) do
+ lStruct.BusinessProcessor.SynchronizeAutoIncs(lStruct.Delta, lStruct.DetailDeltas[j], lStruct.RelationShips[j]);
+ end;
+ end;
+ end;
+ // Processes the deltas for which update rules were not defined
+ if lProcessedDeltas.IndexOf(LogicalName) = -1 then
+ lStruct.BusinessProcessor.ProcessDelta(FLocalConnection, lStruct.Delta, AllChanges);
+ finally
+ lProcessedDeltas.Free;
+ end;
+ end;
+ if FLocalConnection.InTransaction and TriggerTransactionEvent(fOnLocalUpdateDataCommitTransaction) then FLocalConnection.CommitTransaction;
+ MergeDelta;
+ Result:=True;
+ except
+ on E: Exception do begin
+ if FLocalConnection.InTransaction and TriggerTransactionEvent(fOnLocalUpdateDataRollBackTransaction) then FLocalConnection.RollbackTransaction;
+ raise;
+ end;
+ end;
+ finally
+ if lStruct <> nil then lStruct.Free;
+ if lBizProc <> nil then lBizProc.Free;
+ end;
+ if RefetchAll and result then begin
+ if Active then Close;
+ Open;
+ end;
+end;
+
+procedure TDADataTable.GetDetailTablesforAllinOneFetch(aRemote, aLocal:TList; aRecursive: boolean);
+var
+ i: integer;
+ dt: TDADataTable;
+ dtList: TList;
+ scc: IDAClonedCursorsSupport;
+begin
+ if (moAllInOneFetch in fMasterOptions) then begin
+ dtList:=GetDetailDataTables;
+ try
+ for i := 0 to dtList.Count-1 do begin
+ dt := TDADataTable(dtList[i]);
+ if (dtIncludeInAllInOneFetch in dt.DetailOptions) then begin
+ if (dt.QueryInterface(IDAClonedCursorsSupport, scc) = S_OK) and scc.UsingClonedCursor then begin
+ dt:= scc.CloneSource;
+ end;
+
+ if self.RemoteFetchEnabled and dt.RemoteFetchEnabled and (dt.RemoteDataAdapter = Self.RemoteDataAdapter) then begin
+ if aRemote.IndexOf(dt) = -1 then aRemote.Add(dt);
+ end
+ else begin
+ if aLocal.IndexOf(dt) = -1 then aLocal.Add(dt);
+ end;
+ if aRecursive then dt.GetDetailTablesforAllinOneFetch(aRemote,aLocal, aRecursive);
+ end;
+ end;
+ finally
+ dtList.Free;
+ end;
+ end
+end;
+
+{$IFDEF FPC}
+procedure List_Union(List1,List2: TList);
+var
+ i: integer;
+begin
+ if List1 = List2 then Exit;
+ for i := 0 to List2.Count-1 do
+ if List1.IndexOf(List2[i])=-1 then
+ List1.Add(List2[i]);
+end;
+{$ENDIF}
+
+function TDADataTable.GetDetailTablesforApplyUpdate(aRecursive: boolean): TList;
+var
+ i: integer;
+ dt: TDADataTable;
+ dtList, dtlist1: TList;
+ scc: IDAClonedCursorsSupport;
+begin
+ Result:= TList.Create;
+ if (moCascadeApplyUpdates in fMasterOptions) then begin
+ dtList:=GetDetailDataTables;
+ try
+ for i := 0 to dtList.Count-1 do begin
+ dt := TDADataTable(dtList[i]);
+ if dt.Active and (dtCascadeApplyUpdates in dt.DetailOptions) then begin
+ if (dt.QueryInterface(IDAClonedCursorsSupport, scc) = S_OK) and scc.UsingClonedCursor then begin
+ dt:= scc.CloneSource;
+ end;
+ if Result.IndexOf(dt) = -1 then Result.Add(dt);
+ if aRecursive then begin
+ dtlist1:= dt.GetDetailTablesforApplyUpdate(aRecursive);
+ try
+ {$IFDEF FPC}
+ List_Union(Result, dtlist1);
+ {$ELSE}
+ Result.Assign(dtlist1,laOr);
+ {$ENDIF}
+ finally
+ dtlist1.Free;
+ end;
+ end;
+ end;
+ end;
+ finally
+ dtList.Free;
+ end;
+ end
+end;
+
+procedure TDADataTable.CancelUpdateChange(Change: TDADeltaChange;IncludeDetails : boolean = TRUE);
+var
+ orignextinc : integer;
+ wasfiltered,
+ remotefetch : boolean;
+ lOldMasterFields: string;
+ details: TList;
+ i,j,k: integer;
+ detailChange: TDADeltaChange;
+ ChangePKValueArray: array of Variant;
+ lNeedDeleteChange: boolean;
+ keyvalue: variant;
+begin
+ if Editing then begin
+ if (ruoOnPost in RemoteUpdatesOptions) and (fDelta.Count=1) then begin
+ InternalCancelUpdateChange(fDelta.Changes[0]);
+ fDelta.Clear;
+ Exit;
+ end else begin
+ Cancel;
+ end;
+ end;
+ if not LogChanges then Exit;
+
+ DisableControls;
+ wasfiltered := Filtered;
+ Filtered := FALSE;
+ try
+ // Truns off the remote fetching for this datatable and its details
+ remotefetch := RemoteFetchEnabled;
+ RemoteFetchEnabled := FALSE;
+
+ // Disable the log of changes (we're about to make a bunch!)
+ LogChanges := FALSE;
+ // Saves the current recinc (we'll change this during the restore)
+ orignextinc := CurrRecId;
+ try
+ lOldMasterFields := MasterFields;
+ MasterFields := '';
+ try
+ // Reverts the records to the original state
+
+ if IncludeDetails then begin
+ SetLength(ChangePKValueArray,Change.Delta.KeyFieldCount);
+ For i:=1 to Change.Delta.KeyFieldCount do begin
+ if Change.ChangeType = ctInsert then
+ keyvalue:=Change.NewValueByName[Change.Delta.KeyFieldNames[i-1]]
+ else
+ keyvalue:=Change.OldValueByName[Change.Delta.KeyFieldNames[i-1]];
+ ChangePKValueArray[0]:=keyvalue;
+ end;
+ details:=GetDetailTablesforApplyUpdate(False);
+ try
+ for i:=0 to details.Count-1 do begin
+ for j:=0 to TDADataTable(details[i]).Delta.Count-1 do begin
+ detailChange :=TDADataTable(details[i]).Delta.Changes[j];
+ if detailChange.Status <> csResolved then begin
+ lNeedDeleteChange:= True;
+ for k:=0 to Change.Delta.KeyFieldCount-1 do begin
+ if detailChange.ChangeType = ctInsert then
+ keyvalue:=detailChange.NewValueByName[Change.Delta.KeyFieldNames[k]]
+ else
+ keyvalue:=detailChange.oldValueByName[Change.Delta.KeyFieldNames[k]];
+ if not VarSameValue(keyValue, ChangePKValueArray[k]) then begin
+ lNeedDeleteChange:= False;
+ Break;
+ end;
+ end;
+ if lNeedDeleteChange then TDADataTable(details[i]).CancelUpdateChange(detailChange,IncludeDetails);
+ end;
+ end;
+ end;
+ finally
+ details.Free;
+ end;
+ end;
+ InternalCancelUpdateChange(change);
+ Delta.RemoveChange(change);
+ finally
+ if Delta.Count = 0 then fHasReducedDelta:=False;
+ MasterFields := lOldMasterFields;
+ end;
+ finally
+ CurrRecId := orignextinc;
+ LogChanges := TRUE;
+ RemoteFetchEnabled := remotefetch;
+ end;
+ finally
+ Filtered := wasfiltered;
+ EnableControls;
+ end;
+end;
+
+procedure TDADataTable.InternalCancelUpdateChange(Change: TDADeltaChange);
+var
+ i, x : integer;
+ fldname : string;
+ fldvalue : Variant;
+ details: TList;
+ RecID:string;
+begin
+ case Change.ChangeType of
+ ctDelete : begin
+ CurrRecId := change.RecID; // We want the same autoinc regenerated
+ RecID:=IntToStr(Change.RecID);
+ Insert;
+ for x := 0 to (Delta.LoggedFieldCount-1) do begin
+ fldname := Delta.LoggedFieldNames[x];
+ fldvalue := change.OldValues[x];
+ VariantToFieldValue(fldValue, FieldByName(fldname));
+ end;
+ Post;
+
+ details := GetDetailDataTables;
+ try
+ for x := 0 to (details.Count-1) do begin
+ i:=TDADataTable(details[x]).fFetchedMasters.IndexOf(RecID);
+ if i<>-1 then TDADataTable(details[x]).fFetchedMasters.Delete(i);
+ end;
+ finally
+ details.Free;
+ end;
+
+
+ end;
+
+ else begin
+ if ruoOnPost in RemoteUpdatesOptions then begin
+ if Self.State = dsInsert then
+ Cancel
+ else begin
+ for x := 0 to (Delta.LoggedFieldCount-1) do begin
+ fldname := Delta.LoggedFieldNames[x];
+ fldvalue := change.OldValues[x];
+ if fHasReducedDelta and ROVariantsEqual(fldvalue, change.NewValues[x]) then Continue;
+ VariantToFieldValue(fldValue, FieldByName(fldname));
+ end;
+ end;
+ end
+ else begin
+ First;
+ if not Locate(RecIDFieldName, change.RecID, []) then RaiseError('Couldn''t find record #'+FormatRecIDString(change.RecID));
+
+ if (change.ChangeType=ctInsert) then Delete
+ else begin
+ Edit;
+ for x := 0 to (Delta.LoggedFieldCount-1) do begin
+ fldname := Delta.LoggedFieldNames[x];
+ fldvalue := change.OldValues[x];
+ if fHasReducedDelta and ROVariantsEqual(fldvalue, change.NewValues[x]) then Continue;
+ VariantToFieldValue(fldValue, FieldByName(fldname));
+ end;
+ Post;
+ end;
+ end;
+ end;
+ end;
+end;
+
+procedure TDADataTable.CheckProperties(ACheckRemoteFetching: Boolean=False);
+begin
+ if (fCloneSource<>NIL) then
+ fCloneSource.CheckProperties(ACheckRemoteFetching)
+ else begin
+ if LogicalName = '' then raise Exception.Create(Name+'.LogicalName must be specified.');
+ if RemoteFetchEnabled or ACheckRemoteFetching then begin
+ Check(RemoteDataAdapter = nil, Name+'.RemoteDataAdapter must be assigned.');
+ end
+ else begin
+ Check(LocalDataStreamer = nil , Name+'.LocalDataStreamer must be assigned.');
+ Check(LocalSchema = nil, Name+'.LocalSchema must be assigned.');
+ LocalSchema.CheckProperties;
+ end;
+ end;
+end;
+
+
+procedure TDADataTable.ExpessionEvaluatorGetValue(
+ Sender: TDAExpressionEvaluator; const aIdentifier: string;
+ out aValue: Variant);
+begin
+ aValue := Fields.FieldByName(aIdentifier).Value;
+end;
+
+function TDADataTable.GetDynamicWhere: TDAWhereBuilder;
+begin
+ Result := fDynamicWhere;
+end;
+
+procedure TDADataTable.SetDynamicWhere(const Value: TDAWhereBuilder);
+begin
+ if Value <> nil then
+ FDynamicWhere.Xml := Value.Xml
+ else
+ FDynamicWhere.Clear;
+end;
+
+function TDADataTable.SQLContainsDynamicWhere: boolean;
+begin
+ Result:=False;
+ // Not implemented in DataTables
+end;
+
+function TDADataTable.GetCloneSource: TDADataTable;
+begin
+ Result:= FCloneSource;
+end;
+
+function TDADataTable.GetUsingClonedCursor: boolean;
+begin
+ Result:=FCloneSource<>nil;
+end;
+
+function TDADataTable.GetSimpleCloneSource: TObject;
+begin
+ Result:= GetCloneSource;
+end;
+
+procedure TDADataTable.CloneCursor(Source: TDADataTable);
+begin
+ Raise Exception.Create(err_NotSupported);
+end;
+
+function TDADataTable.BookmarkValid(Bookmark: TBookmark): Boolean;
+begin
+ Result := fDataset.BookmarkValid(Bookmark);
+end;
+
+function TDADataTable.ControlsDisabled: Boolean;
+begin
+ Result := fDataset.ControlsDisabled;
+end;
+
+function TDADataTable.TriggerTransactionEvent(
+ aEvent: TDALocalUpdateDataTransactionEvent): boolean;
+begin
+ result := true;
+ if assigned(aEvent) then aEvent(self, result);
+end;
+
+{ TDADataSource }
+
+constructor TDADataSource.Create(aOwner: TComponent);
+begin
+ inherited;
+end;
+
+destructor TDADataSource.Destroy;
+begin
+ inherited;
+end;
+
+function TDADataSource.GetActive: boolean;
+begin
+ result := (fDataTable <> nil) and fDataTable.Active
+end;
+
+function TDADataSource.GetDataset: TDataset;
+begin
+ result := nil;
+end;
+
+function TDADataSource.GetOpening: boolean;
+begin
+ result := (fDataTable <> nil) and fDataTable.Opening
+end;
+
+procedure TDADataSource.Notification(AComponent: TComponent;
+ Operation: TOperation);
+begin
+ inherited;
+
+ if (AComponent = fDataTable) then begin
+ fDataTable := nil;
+ inherited Dataset := nil;
+ end;
+end;
+
+procedure TDADataSource.SetDataset(const Value: TDataset);
+begin
+
+end;
+
+procedure TDADataSource.SetDataTable(const Value: TDADataTable);
+begin
+ fDataTable := Value;
+ if (fDataTable <> nil) then begin
+ fDataTable.FreeNotification(Self);
+ inherited Dataset := fDataTable.Dataset;
+ end
+ else
+ inherited Dataset := nil;
+end;
+
+{ TDABusinessRules }
+
+constructor TDABusinessRules.Create;
+begin
+ inherited;
+end;
+
+destructor TDABusinessRules.Destroy;
+begin
+ inherited;
+end;
+
+function TDABusinessRules._AddRef: Integer;
+begin
+ result := -1;
+end;
+
+function TDABusinessRules._Release: Integer;
+begin
+ result := -1;
+end;
+
+{ TDADataTableRules }
+
+constructor TDADataTableRules.Create(aDataTable: TDADataTable);
+begin
+ inherited Create;
+
+ Check(not Assigned(aDatatable), 'DataTable cannot be NIL');
+
+ fDetails := TStringList.Create;
+ fDetails.Sorted := TRUE;
+ fDetails.Duplicates := dupError;
+
+ fDataTable := aDataTable;
+end;
+
+destructor TDADataTableRules.Destroy;
+begin
+ fDetails.Free;
+
+ inherited;
+end;
+
+procedure TDADataTableRules.AfterCancel(Sender: TDADataTable);
+begin
+
+end;
+
+procedure TDADataTableRules.AfterClose(Sender: TDADataTable);
+begin
+
+end;
+
+procedure TDADataTableRules.AfterDelete(Sender: TDADataTable);
+begin
+
+end;
+
+procedure TDADataTableRules.AfterEdit(Sender: TDADataTable);
+begin
+
+end;
+
+procedure TDADataTableRules.AfterInsert(Sender: TDADataTable);
+begin
+
+end;
+
+procedure TDADataTableRules.AfterOpen(Sender: TDADataTable);
+begin
+
+end;
+
+procedure TDADataTableRules.AfterPost(Sender: TDADataTable);
+begin
+
+end;
+
+procedure TDADataTableRules.AfterRefresh(Sender: TDADataTable);
+begin
+
+end;
+
+procedure TDADataTableRules.AfterScroll(Sender: TDADataTable);
+begin
+
+end;
+
+procedure TDADataTableRules.BeforeCancel(Sender: TDADataTable);
+begin
+
+end;
+
+procedure TDADataTableRules.BeforeClose(Sender: TDADataTable);
+begin
+
+end;
+
+procedure TDADataTableRules.BeforeDelete(Sender: TDADataTable);
+begin
+
+end;
+
+procedure TDADataTableRules.BeforeEdit(Sender: TDADataTable);
+begin
+
+end;
+
+procedure TDADataTableRules.BeforeInsert(Sender: TDADataTable);
+begin
+
+end;
+
+procedure TDADataTableRules.BeforeOpen(Sender: TDADataTable);
+begin
+
+end;
+
+procedure TDADataTableRules.BeforePost(Sender: TDADataTable);
+begin
+
+end;
+
+procedure TDADataTableRules.BeforeRefresh(Sender: TDADataTable);
+begin
+
+end;
+
+procedure TDADataTableRules.BeforeScroll(Sender: TDADataTable);
+begin
+
+end;
+
+procedure TDADataTableRules.OnCalcFields(Sender: TDADataTable);
+begin
+
+end;
+
+procedure TDADataTableRules.OnNewRecord(Sender: TDADataTable);
+begin
+
+end;
+
+procedure TDADataTableRules.OnDeleteError(DataTable: TDADataTable;
+ Error: EDatabaseError; var Action: TDataAction);
+begin
+
+end;
+
+procedure TDADataTableRules.OnEditError(DataTable: TDADataTable;
+ Error: EDatabaseError; var Action: TDataAction);
+begin
+
+end;
+
+procedure TDADataTableRules.Attach(aDataTable: TDADataTable);
+begin
+ RefreshDetails;
+end;
+
+procedure TDADataTableRules.Detach(aDataTable: TDADataTable);
+begin
+ fDetails.Clear;
+end;
+
+procedure TDADataTableRules.Append;
+begin
+ fDataTable.Append();
+end;
+
+procedure TDADataTableRules.Cancel;
+begin
+ fDataTable.Cancel();
+end;
+
+procedure TDADataTableRules.Delete;
+begin
+ fDataTable.Delete();
+end;
+
+procedure TDADataTableRules.Edit;
+begin
+ fDataTable.Edit();
+end;
+
+procedure TDADataTableRules.First;
+begin
+ fDataTable.First();
+end;
+
+procedure TDADataTableRules.Insert;
+begin
+ fDataTable.Insert();
+end;
+
+procedure TDADataTableRules.Last;
+begin
+ fDataTable.Last();
+end;
+
+procedure TDADataTableRules.Next;
+begin
+ fDataTable.Next();
+end;
+
+procedure TDADataTableRules.Post;
+begin
+ fDataTable.Post();
+end;
+
+procedure TDADataTableRules.Prior;
+begin
+ fDataTable.Prior();
+end;
+
+function TDADataTableRules.GetBOF: Boolean;
+begin
+ result := fDataTable.BOF;
+end;
+
+function TDADataTableRules.GetEOF: Boolean;
+begin
+ result := fDataTable.EOF;
+end;
+
+function TDADataTableRules.GetRecordCount: Integer;
+begin
+ result := fDataTable.RecordCount;
+end;
+
+function TDADataTableRules.Locate(const aKeyFields: String; const aKeyValues: Variant; aOptions: TLocateOptions = []): boolean;
+begin
+ result := fDataTable.Locate(aKeyFields, aKeyValues, aOptions);
+end;
+
+function TDADataTableRules.GetDetails(Index: integer): TDADataTable;
+begin
+ result := TDADataTable(fDetails[Index])
+end;
+
+function TDADataTableRules.GetDetailsCount: integer;
+begin
+ result := fDetails.Count
+end;
+
+function TDADataTableRules.FindDetail(
+ const aLogicalName: string): TDADataTable;
+var i : integer;
+begin
+ result := NIL;
+ i := fDetails.IndexOf(aLogicalName);
+
+ if (i>=0) then result := TDADataTable(fDetails.Objects[i]);
+end;
+
+function TDADataTableRules.DetailByName(
+ const aLogicalName: string): TDADataTable;
+begin
+ result := FindDetail(aLogicalName);
+ if (result=NIL)
+ then raise Exception.CreateFmt('Cannot find the detail DataTable %s ', [aLogicalName]);
+end;
+
+procedure TDADataTableRules.RefreshDetails;
+var lList : TList;
+ i : integer;
+ lLogicalName : string;
+begin
+ lList := DataTable.GetDetailDataTables;
+ fDetails.Clear;
+ try
+ for i := 0 to (lList.Count-1) do begin
+ lLogicalName := TDADataTable(lList[i]).LogicalName;
+
+ if (lLogicalName<>'')
+ then fDetails.AddObject(lLogicalName, lList[i]);
+ end;
+ finally
+ lList.Free;
+ end;
+end;
+
+function TDADataTableRules.GetDetailOptions: TDADetailOptions;
+begin
+ result := DataTable.DetailOptions
+end;
+
+function TDADataTableRules.GetMasterOptions: TDAMasterOptions;
+begin
+ result := DataTable.MasterOptions
+end;
+
+procedure TDADataTableRules.SetDetailOptions(Value: TDADetailOptions);
+begin
+ DataTable.DetailOptions := Value
+end;
+
+procedure TDADataTableRules.SetMasterOptions(Value: TDAMasterOptions);
+begin
+ DataTable.MasterOptions := Value
+end;
+
+function TDADataTableRules.GetRecNo: integer;
+begin
+ result := fDataTable.RecNo
+end;
+
+procedure TDADataTableRules.SetRecNo(Value: integer);
+begin
+ fDataTable.RecNo := Value
+end;
+
+procedure TDADataTableRules.OnFilterRecord(DataTable: TDADataTable;
+ var Accept: boolean);
+begin
+
+end;
+
+procedure TDADataTableRules.OnPostError(DataTable: TDADataTable;
+ Error: EDatabaseError; var Action: TDataAction);
+begin
+
+end;
+
+function TDADataTableRules.Lookup(const KeyFields: string;
+ const KeyValues: Variant; const ResultFields: string): Variant;
+begin
+ result := fDataTable.Lookup(KeyFields, KeyValues, ResultFields);
+end;
+
+function TDADataTableRules.GetIsEmpty: boolean;
+begin
+ result := fDataTable.IsEmpty
+end;
+
+function TDADataTableRules.GetState: TDatasetState;
+begin
+ result := fDataTable.State
+end;
+
+function TDADataTableRules.IsFieldNull(
+ const FieldIndexOrName: Variant): boolean;
+var fld : TDAField;
+begin
+ case VarType(FieldIndexOrName) of
+ varString, varOleStr, varStrArg : fld := DataTable.FieldByName(VarToStr(FieldIndexOrName));
+ else fld := DataTable.Fields[FieldIndexOrName];
+ end;
+
+ result := fld.IsNull;
+end;
+
+procedure TDADataTableRules.ClearField(const FieldIndexOrName: Variant);
+var fld : TDAField;
+begin
+ case VarType(FieldIndexOrName) of
+ varString, varOleStr, varStrArg : fld := DataTable.FieldByName(VarToStr(FieldIndexOrName));
+ else fld := DataTable.Fields[FieldIndexOrName];
+ end;
+
+ fld.Clear;
+end;
+
+function TDADataTableRules.GetDataTable: TDADataTable;
+begin
+ result := fDataTable;
+end;
+
+procedure TDADataTableRules.ApplyRange;
+begin
+ (fDataTable as IDARangeController).ApplyRange
+end;
+
+procedure TDADataTableRules.CancelRange;
+begin
+ (fDataTable as IDARangeController).CancelRange
+end;
+
+procedure TDADataTableRules.EditRangeEnd;
+begin
+ (fDataTable as IDARangeController).EditRangeEnd
+end;
+
+procedure TDADataTableRules.EditRangeStart;
+begin
+ (fDataTable as IDARangeController).EditRangeStart
+end;
+
+procedure TDADataTableRules.SetRange(const StartValues,
+ EndValues: array of const);
+begin
+ (fDataTable as IDARangeController).SetRange(StartValues, EndValues);
+end;
+
+procedure TDADataTableRules.SetRangeEnd;
+begin
+ (fDataTable as IDARangeController).SetRangeEnd
+end;
+
+procedure TDADataTableRules.SetRangeStart;
+begin
+ (fDataTable as IDARangeController).SetRangeStart
+end;
+
+procedure TDADataTableRules.Close;
+begin
+ fDataTable.Close;
+end;
+
+procedure TDADataTableRules.Open;
+begin
+ fDataTable.Open;
+end;
+
+function TDADataTableRules.GetActive: boolean;
+begin
+ result := fDataTable.Active;
+end;
+
+procedure TDADataTableRules.SetActive(const Value: boolean);
+begin
+ fDataTable.Active := Value;
+end;
+
+procedure TDADataTableRules.OnAfterApplyUpdates(DataTable: TDADataTable);
+begin
+
+end;
+
+procedure TDADataTableRules.OnAfterDataRequestCall(DataTable: TDADataTable;
+ Request: TDARemoteRequest);
+begin
+
+end;
+
+procedure TDADataTableRules.OnAfterDataUpdateCall(DataTable: TDADataTable;
+ Request: TDARemoteRequest);
+begin
+
+end;
+
+procedure TDADataTableRules.OnAfterMergeDelta(DataTable: TDADataTable);
+begin
+
+end;
+
+procedure TDADataTableRules.OnAfterSchemaCall(DataTable: TDADataTable;
+ Request: TDARemoteRequest);
+begin
+
+end;
+
+procedure TDADataTableRules.OnAfterScriptCall(DataTable: TDADataTable;
+ Request: TDARemoteRequest);
+begin
+
+end;
+
+procedure TDADataTableRules.OnBeforeApplyUpdates(DataTable: TDADataTable;
+ const Delta: IDADelta);
+begin
+
+end;
+
+procedure TDADataTableRules.OnBeforeDataRequestCall(
+ DataTable: TDADataTable; Request: TDARemoteRequest);
+begin
+
+end;
+
+procedure TDADataTableRules.OnBeforeDataUpdateCall(DataTable: TDADataTable;
+ Request: TDARemoteRequest);
+begin
+
+end;
+
+procedure TDADataTableRules.OnBeforeMergeDelta(DataTable: TDADataTable);
+begin
+
+end;
+
+procedure TDADataTableRules.OnBeforeSchemaCall(DataTable: TDADataTable;
+ Request: TDARemoteRequest);
+begin
+
+end;
+
+procedure TDADataTableRules.OnBeforeScriptCall(DataTable: TDADataTable;
+ Request: TDARemoteRequest);
+begin
+
+end;
+
+procedure TDADataTableRules.OnReceiveDataStream(DataTable: TDADataTable;
+ Stream: TStream);
+begin
+
+end;
+
+{ TDAFieldRules }
+constructor TDAFieldRules.Create(aField : TDAField; aDataTable : TDADataTable);
+begin
+ inherited Create;
+
+ fDataTable := aDataTable;
+
+ fField := aField;
+ fField.OnValidate := OnValidate;
+ fField.OnChange := OnChange;
+
+ Attach(fDataTable);
+end;
+
+destructor TDAFieldRules.Destroy;
+begin
+ Detach(fDataTable);
+ inherited;
+end;
+
+procedure TDAFieldRules.Attach(aDataTable: TDADataTable);
+begin
+
+end;
+
+procedure TDAFieldRules.Detach(aDataTable: TDADataTable);
+begin
+
+end;
+
+procedure TDAFieldRules.OnChange(Sender: TDACustomField);
+begin
+end;
+
+procedure TDAFieldRules.OnValidate(Sender: TDACustomField);
+begin
+end;
+
+{ TDADataTableList }
+constructor TDADataTableList.Create(aOwnerComponent: TComponent);
+begin
+ inherited Create;
+
+ ScanAndAdd(aOwnerComponent);
+end;
+
+function TDADataTableList.Add(aDataTable: TDADataTable): integer;
+begin
+ result := inherited Add(aDataTable);
+end;
+
+function TDADataTableList.GetItems(Index: integer): TDADataTable;
+begin
+ result := TDADataTable(inherited Items[Index]);
+end;
+
+procedure TDADataTableList.Remove(aDataTable: TDADataTable);
+begin
+ inherited Remove(aDataTable);
+end;
+
+
+function TDADataTableList.ScanAndAdd(aOwnerComponent: TComponent): integer;
+var i : integer;
+begin
+ result := 0;
+ with aOwnerComponent do begin
+ for i := 0 to (Count-1) do
+ if (Components[i] is TDADataTable) then begin
+ Add(TDADataTable(Components[i]));
+ Inc(result);
+ end;
+ end;
+end;
+
+function TDADataTableList.GetPendingChangeCount: integer;
+var i : integer;
+begin
+ result := 0;
+ for i := 0 to (Count-1) do
+ if Items[i].Active and Items[i].LogChanges
+ then Inc(result, Items[i].Delta.Count);
+end;
+
+{ TDABaseRemoteDataAdapter }
+
+function TDABaseRemoteDataAdapter.Get_GetDataCall: TDARemoteRequest;
+begin
+ result := nil;
+end;
+
+function TDABaseRemoteDataAdapter.Get_GetSchemaCall: TDARemoteRequest;
+begin
+ result := nil;
+end;
+
+function TDABaseRemoteDataAdapter.Get_GetScriptsCall: TDARemoteRequest;
+begin
+ result := nil;
+end;
+
+function TDABaseRemoteDataAdapter.Get_UpdateDataCall: TDARemoteRequest;
+begin
+ result := nil;
+end;
+
+initialization
+ RegisterExceptionClass(EDABizValidationException);
+
+ _bizfields := TStringList.Create;
+ _bizfields.Sorted := TRUE;
+
+ _bizdatatables := TStringList.Create;
+ _bizdatatables.Sorted := TRUE;
+
+finalization
+ UnregisterExceptionClass(EDABizValidationException);
+ _bizdatatables.Free;
+ _bizfields.Free;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDADataTableReferenceCollection.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDADataTableReferenceCollection.pas
new file mode 100644
index 0000000..f6bdd17
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDADataTableReferenceCollection.pas
@@ -0,0 +1,201 @@
+unit uDADataTableReferenceCollection;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ Classes,
+ uDAInterfaces,uDADataTable;
+
+type
+ { TDADataTableReference }
+ TDADataTableReferenceCollection = class;
+ TDADataTableReference = class(TCollectionItem)
+ private
+ fDataTable: TComponent;
+ FDataset: IDADataset;
+ FLogicalName: string; // fro Tdataset
+ function GetIsValidReference: boolean;
+ procedure SetDataTable(const Value: TComponent);
+ function GetReferenceCollection: TDADataTableReferenceCollection;
+ function GetDataset: IDADataset;
+ function GetLogicalName: string;
+ procedure SetLogicalName(const Value: string);
+
+ protected
+ function GetDisplayName : string; override;
+ public
+ constructor Create(aCollection : TDADataTableReferenceCollection); reintroduce;
+ property IsValidReference : boolean read GetIsValidReference;
+ property ReferenceCollection : TDADataTableReferenceCollection read GetReferenceCollection;
+ property Dataset: IDADataset read GetDataset;
+ destructor Destroy; override;
+ published
+ property DataTable : TComponent read fDataTable write SetDataTable;
+ property LogicalName: string read GetLogicalName write SetLogicalName;
+ end;
+
+ { TDADataTableReferenceCollection }
+ TDADataTableReferenceCollection = class(TCollection)
+ private
+ fOwner: TComponent;
+
+ function GetItems(Index: integer): TDADataTableReference;
+ protected
+ public
+ constructor Create(aOwner: TComponent);
+ destructor Destroy; override;
+
+ function FindByDataTable(aDataTable : TComponent) : TDADataTableReference;
+ function FindByName(const aLogicalName : string) : TDADataTableReference;
+
+ property Items[Index : integer] : TDADataTableReference read GetItems; default;
+
+ property OwnerService: TComponent read fOwner;
+ end;
+
+implementation
+
+uses
+ SysUtils,DB,
+ uROClasses, uDADatasetWrapper;
+
+{ TDADataTableReferenceCollection }
+
+constructor TDADataTableReferenceCollection.Create(aOwner: TComponent);
+begin
+ inherited Create(TDADataTableReference);
+
+ fOwner := aOwner;
+end;
+
+destructor TDADataTableReferenceCollection.Destroy;
+begin
+
+ inherited;
+end;
+
+function TDADataTableReferenceCollection.FindByDataTable(aDataTable: TComponent): TDADataTableReference;
+var i : integer;
+begin
+ result := NIL;
+ if (aDataTable=NIL) then Exit;
+
+ for i := 0 to (Count-1) do
+ if (Items[i].DataTable=aDataTable) then begin
+ result := Items[i];
+ Exit;
+ end;
+end;
+
+function TDADataTableReferenceCollection.FindByName(const aLogicalName: string): TDADataTableReference;
+var i : integer;
+begin
+ result := NIL;
+
+ for i := 0 to (Count-1) do
+ if Items[i].IsValidReference and SameText(Items[i].Dataset.LogicalName, aLogicalName) then begin
+ result := Items[i];
+ Exit;
+ end;
+end;
+
+function TDADataTableReferenceCollection.GetItems(
+ Index: integer): TDADataTableReference;
+begin
+ result := TDADataTableReference(inherited Items[Index]);
+end;
+
+{ TDADataTableReference }
+
+constructor TDADataTableReference.Create(aCollection : TDADataTableReferenceCollection);
+begin
+ inherited Create(aCollection);
+end;
+
+function TDADataTableReference.GetDataset: IDADataset;
+begin
+ Result := FDataset;
+ if (Result = nil) and (fDataTable is TDADataTable) then
+ Result := fDataTable as IDADataset;
+end;
+
+procedure TDADataTableReference.SetDataTable(const Value: TComponent);
+begin
+ if (fDataTable=Value) then Exit;
+
+ if Value is TDataSet then begin
+ FDataset := TDatasetWrapper.Create(TDataSet(Value));
+ FDataset.LogicalName := FLogicalName;
+ end
+ else
+ FDataset := nil;
+
+ if (Value is TDataSet) or (Value is TDADataTable) then
+ fDataTable := Value
+ else
+ // don't supported other types
+ fDataTable := nil;
+
+ if (fDataTable<>NIL)
+ then fDataTable.FreeNotification(ReferenceCollection.OwnerService);
+end;
+
+function TDADataTableReference.GetDisplayName: string;
+var F_logicalname : string;
+begin
+ if (fDataTable<>NIL) then begin
+ F_logicalname := LogicalName;
+ if (F_logicalname='') then F_logicalname := '???';
+ result := Format('%s (%s)', [F_logicalname, fDataTable.Name])
+ end
+ else result := '';
+end;
+
+function TDADataTableReference.GetIsValidReference: boolean;
+begin
+ result := fDataTable<>NIL
+end;
+
+function TDADataTableReference.GetReferenceCollection: TDADataTableReferenceCollection;
+begin
+ result := TDADataTableReferenceCollection(inherited Collection);
+end;
+
+function TDADataTableReference.GetLogicalName: string;
+begin
+ if (fDataTable<>NIL) then begin
+ Result := Dataset.LogicalName;
+ if fDataTable is TDataset then Result:= FLogicalName;
+ end
+ else
+ result := '';
+end;
+
+procedure TDADataTableReference.SetLogicalName(const Value: string);
+begin
+ FLogicalName := Value;
+ if (Dataset <> nil) then Dataset.LogicalName := Value;
+end;
+
+
+destructor TDADataTableReference.Destroy;
+begin
+ FDataset:=nil;
+ inherited;
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDADatasetProvider.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDADatasetProvider.pas
new file mode 100644
index 0000000..25a9818
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDADatasetProvider.pas
@@ -0,0 +1,79 @@
+unit uDADatasetProvider;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up }
+{ platform: Win32 }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ Classes, DB, Provider, uDADataTable;
+
+type
+ { TDADatasetProvider }
+ TDADatasetProvider = class(TDataSetProvider)
+ private
+ fDataTable: TDADataTable;
+ procedure SetDataTable(const Value: TDADataTable);
+ function GetDataset: TDataset;
+
+ protected
+ procedure Notification(AComponent: TComponent; Operation: TOperation); override;
+ function InternalGetRecords(Count: Integer; out RecsOut: Integer;
+ Options: TGetRecordOptions; const CommandText: WideString;
+ var Params: OleVariant): OleVariant; override;
+
+ published
+ property Dataset: TDataset read GetDataset;
+ property DataTable: TDADataTable read fDataTable write SetDataTable;
+ end;
+
+
+implementation
+
+{ TDADatasetProvider }
+
+function TDADatasetProvider.GetDataset: TDataset;
+begin
+ result := NIL;
+end;
+
+function TDADatasetProvider.InternalGetRecords(Count: Integer;
+ out RecsOut: Integer; Options: TGetRecordOptions;
+ const CommandText: WideString; var Params: OleVariant): OleVariant;
+begin
+ if not DataTable.Active then DataTable.Open;
+
+ result := inherited InternalGetRecords(Count, RecsOut, Options, CommandText, Params);
+end;
+
+procedure TDADatasetProvider.Notification(AComponent: TComponent;
+ Operation: TOperation);
+begin
+ inherited;
+
+ if (Operation=opRemove) then begin
+ if (aComponent=fDatatable) then fDataTable := NIL;
+ end;
+end;
+
+procedure TDADatasetProvider.SetDataTable(const Value: TDADataTable);
+begin
+ fDataTable := Value;
+ if (fDataTable<>NIL) then begin
+ fDataTable.FreeNotification(Self);
+ inherited Dataset := fDataTable.Dataset;
+ end;
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDADatasetWrapper.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDADatasetWrapper.pas
new file mode 100644
index 0000000..877f829
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDADatasetWrapper.pas
@@ -0,0 +1,674 @@
+unit uDADatasetWrapper;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ Classes, DB,
+ {$IFDEF MSWINDOWS}ActiveX,{$ENDIF}
+ uDAInterfaces;
+
+type
+ TDatasetWrapper = class(TInterfacedObject, {$IFDEF MSWINDOWS}ISupportErrorInfo,{$ENDIF} IDADataset, IDAEditableDataset)
+ private
+ FDataset: TDataset;
+ FLogicalName: string;
+ fFields: TDAFieldCollection;
+ fParams: TDAParamCollection;
+ fAfterOpenIDataset: TDAAfterOpenDatasetEvent;
+ fBeforeOpenIDataset: TDABeforeOpenDatasetEvent;
+ FOld_BeforeClose: TDataSetNotifyEvent;
+ FOld_BeforeOpen: TDataSetNotifyEvent;
+ FOld_AfterOpen: TDataSetNotifyEvent;
+ procedure DatasetBeforeOpen(DataSet: TDataSet);
+ procedure DatasetBeforeClose(DataSet: TDataSet);
+ procedure DatasetAfterOpen(DataSet: TDataSet);
+ procedure AttachEventHooks(aDataset: TDataset);
+ procedure DetachEventHooks(aDataset: TDataset);
+ procedure BindFields;
+ procedure UnbindFields;
+ protected
+ function GetParams: TDAParamCollection; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetPrepared: boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetPrepared(Value: boolean); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetWhere: TDAWhere; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetDynamicWhere: TDAWhereBuilder; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetDynamicWhere(const Value: TDAWhereBuilder); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetSQL: string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetSQL(const Value: string); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function SQLContainsDynamicWhere: boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetDataset: TDataset; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetName: string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetOnAfterExecute: TDAAfterExecuteCommandEvent; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetOnBeforeExecute: TDABeforeExecuteCommandEvent; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetOnAfterExecute(const Value: TDAAfterExecuteCommandEvent); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetOnBeforeExecute(const Value: TDABeforeExecuteCommandEvent); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetOnExecuteError: TDAExecuteCommandErrorEvent; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetOnExecuteError(const Value: TDAExecuteCommandErrorEvent); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ // Methods
+ procedure RefreshParams; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function Execute: integer; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ function ParamByName(const aName: string): TDAParam; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ // Properties readers/writers
+ function GetRecordCount: integer; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetFieldCount: integer; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetFields: TDAFieldCollection; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetActive: boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetActive(Value: boolean); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetBOF: boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetEOF: boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetFieldValues(Index: integer): Variant; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetNames(Index: integer): string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetIsEmpty: boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetState: TDatasetState; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetLogicalName: string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetLogicalName(aName: string); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ function GetOnAfterOpen: TDAAfterOpenDatasetEvent; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetOnBeforeOpen: TDABeforeOpenDatasetEvent; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetOnAfterOpen(const Value: TDAAfterOpenDatasetEvent); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetOnBeforeOpen(const Value: TDABeforeOpenDatasetEvent); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetOnOpenError: TDAOpenDatasetErrorEvent; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetOnOpenError(const Value: TDAOpenDatasetErrorEvent); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ // Methods
+ procedure Open; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure Close; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ procedure EnableControls; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure DisableControls; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ procedure Refresh; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ procedure Next; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ function FieldByName(const aName: string): TDAField; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function FindField(const aName: string): TDAField; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ function Locate(const KeyFields: string; const KeyValues: Variant; Options: TLocateOptions): Boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function Lookup(const KeyFields: string; const KeyValues: Variant; const ResultFields: string): Variant; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ function GetBookMark: pointer; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GotoBookmark(Bookmark: TBookmark); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure FreeBookmark(Bookmark: TBookmark); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function BookmarkValid(Bookmark: TBookmark): Boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetCurrentRecIdValue: integer;
+ procedure SetCurrentRecIdValue(Value: integer);
+
+ function GetRowRecIDValue: integer;
+
+ procedure EnableConstraints; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure DisableConstraints; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ procedure Edit; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure Insert; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure Post; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure Cancel; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure Append; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure Delete; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ procedure Prior; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure First; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure Last; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ procedure AddRecord(const FieldNames: array of string; const FieldValues: array of Variant); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ procedure EnableEventHandlers; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure DisableEventHandlers; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function ControlsDisabled: Boolean;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ {$IFDEF MSWINDOWS}
+ protected
+ function InterfaceSupportsErrorInfo(const iid: TGUID): HResult; stdcall;
+ public
+ function SafeCallException(ExceptObject: TObject; ExceptAddr: Pointer): HResult; override;
+ {$ENDIF}
+ public
+ constructor Create(ADataset: TDataset);
+ destructor Destroy; override;
+ property RowRecIdValue: integer read GetRowRecIdValue;
+ property CurrentRecIdValue: integer read GetCurrentRecIdValue write SetCurrentRecIdValue;
+ // Properties
+ property IsEmpty: boolean read GetIsEmpty;
+ property State: TDatasetState read GetState;
+ property BOF: boolean read GetBOF;
+ property EOF: boolean read GetEOF;
+ property RecordCount: integer read GetRecordCount;
+ property Fields: TDAFieldCollection read GetFields;
+ property Active: boolean read GetActive write SetActive;
+ property FieldCount: integer read GetFieldCount;
+ property FieldValues[Index: integer]: Variant read GetFieldValues;
+ property Names[Index: integer]: string read GetNames;
+ property LogicalName: string read GetLogicalName write SetLogicalName;
+
+ property OnBeforeOpen: TDABeforeOpenDatasetEvent read GetOnBeforeOpen write SetOnBeforeOpen;
+ property OnAfterOpen: TDAAfterOpenDatasetEvent read GetOnAfterOpen write SetOnAfterOpen;
+ property OnOpenError: TDAOpenDatasetErrorEvent read GetOnOpenError write SetOnOpenError;
+ property Name: string read GetName;
+ property Dataset: TDataSet read GetDataset;
+ property SQL: string read GetSQL write SetSQL;
+ property Params: TDAParamCollection read GetParams;
+ property Prepared: boolean read GetPrepared write SetPrepared;
+ property Where: TDAWhere read GetWhere;
+ property OnBeforeExecute: TDABeforeExecuteCommandEvent read GetOnBeforeExecute write SetOnBeforeExecute;
+ property OnAfterExecute: TDAAfterExecuteCommandEvent read GetOnAfterExecute write SetOnAfterExecute;
+ property OnExecuteError: TDAExecuteCommandErrorEvent read GetOnExecuteError write SetOnExecuteError;
+ end;
+
+implementation
+
+uses
+ SysUtils,
+ uROClasses, uDARes, uDAEngine;
+
+{ TDatasetWrapper }
+
+procedure TDatasetWrapper.AddRecord(const FieldNames: array of string;
+ const FieldValues: array of Variant);
+var
+ i: integer;
+begin
+ Insert;
+ for i := 0 to Length(FieldNames) - 1 do
+ FieldByName(FieldNames[i]).Value := FieldValues[i];
+ Post;
+end;
+
+procedure TDatasetWrapper.Append;
+begin
+ FDataset.Append;
+end;
+
+procedure TDatasetWrapper.AttachEventHooks(aDataset: TDataset);
+begin
+ fFields.FieldEventsDisabled := FALSE;
+end;
+
+procedure TDatasetWrapper.BindFields;
+var
+ i: integer;
+ fld: TField;
+ daFld: TDAField;
+ l: TDABlobType;
+begin
+ fFields.Clear;
+ for i := 0 to (Fdataset.FieldCount - 1) do begin
+ fld := Fdataset.Fields[i];
+ daFld := fFields.Add;
+ with daFld do begin
+ Name := fld.FieldName;
+ Size := fld.Size;
+ DataType := VCLTypeToDAType(fld.DataType);
+ for l := dabtBlob to High(TDABlobType) do begin
+ if fld.DataType = BlobTypeMappings[l] then begin
+ BlobType:=l;
+ Break;
+ end;
+ end;
+ end;
+ dafld.Bind(fld);
+ end;
+end;
+
+procedure TDatasetWrapper.Cancel;
+begin
+ FDataset.Cancel;
+end;
+
+procedure TDatasetWrapper.Close;
+begin
+ FDataset.Close;
+end;
+
+constructor TDatasetWrapper.Create(ADataset: TDataset);
+begin
+ Check(ADataset = nil, err_InvalidDataset);
+ inherited Create;
+ FDataset := ADataset;
+ fFields := TDAFieldCollection.Create(nil);
+ fParams := TDAParamCollection.Create(nil);
+ FOld_BeforeClose := FDataset.BeforeClose;
+ FOld_BeforeOpen := FDataset.BeforeOpen;
+ FOld_AfterOpen := FDataset.AfterOpen;
+ FDataset.BeforeClose := DatasetBeforeClose;
+ FDataset.BeforeOpen := DatasetBeforeOpen;
+ FDataset.AfterOpen := DatasetAfterOpen;
+ if FDataset.Active then BindFields;
+end;
+
+procedure TDatasetWrapper.DatasetAfterOpen(DataSet: TDataSet);
+begin
+ BindFields;
+ if Assigned(fAfterOpenIDataset) then fAfterOpenIDataset(Self, '', 0);
+ if Assigned(FOld_AfterOpen) then FOld_AfterOpen(Dataset);
+end;
+
+procedure TDatasetWrapper.DatasetBeforeClose(DataSet: TDataSet);
+begin
+ UnbindFields;
+ if Assigned(FOld_BeforeClose) then FOld_BeforeClose(DataSet);
+end;
+
+procedure TDatasetWrapper.DatasetBeforeOpen(DataSet: TDataSet);
+begin
+ if Assigned(fBeforeOpenIDataset) then fBeforeOpenIDataset(Self);
+ if Assigned(FOld_BeforeOpen) then FOld_BeforeOpen(DataSet);
+end;
+
+procedure TDatasetWrapper.Delete;
+begin
+ FDataset.Delete;
+end;
+
+destructor TDatasetWrapper.Destroy;
+begin
+ UnbindFields;
+ if FDataset <> nil then begin
+ FDataset.BeforeClose := FOld_BeforeClose;
+ FDataset.BeforeOpen := FOld_BeforeOpen;
+ FDataset.AfterOpen := FOld_AfterOpen;
+ end;
+ fFields.Free;
+ fParams.Free;
+ inherited;
+end;
+
+procedure TDatasetWrapper.DetachEventHooks(aDataset: TDataset);
+begin
+ fFields.FieldEventsDisabled := TRUE;
+end;
+
+procedure TDatasetWrapper.DisableConstraints;
+begin
+ // nothing
+end;
+
+procedure TDatasetWrapper.DisableControls;
+begin
+ FDataset.DisableControls;
+end;
+
+procedure TDatasetWrapper.DisableEventHandlers;
+begin
+ DetachEventHooks(Dataset);
+end;
+
+procedure TDatasetWrapper.Edit;
+begin
+ FDataset.Edit;
+end;
+
+procedure TDatasetWrapper.EnableConstraints;
+begin
+ // nothing
+end;
+
+procedure TDatasetWrapper.EnableControls;
+begin
+ FDataset.EnableControls;
+end;
+
+procedure TDatasetWrapper.EnableEventHandlers;
+begin
+ AttachEventHooks(Dataset);
+end;
+
+function TDatasetWrapper.Execute: integer;
+begin
+ // Not implemented
+ result := -1;
+end;
+
+function TDatasetWrapper.FieldByName(const aName: string): TDAField;
+begin
+ Result := fFields.FieldByName(aName);
+end;
+
+function TDatasetWrapper.FindField(const aName: string): TDAField;
+begin
+ result := fFields.FindField(aName);
+end;
+
+procedure TDatasetWrapper.First;
+begin
+ FDataset.First;
+end;
+
+procedure TDatasetWrapper.FreeBookmark(Bookmark: TBookmark);
+begin
+ FDataset.FreeBookmark(Bookmark);
+end;
+
+function TDatasetWrapper.GetActive: boolean;
+begin
+ Result := FDataset.Active;
+end;
+
+function TDatasetWrapper.GetBOF: boolean;
+begin
+ Result := FDataset.Bof;
+end;
+
+function TDatasetWrapper.GetBookMark: pointer;
+begin
+ Result := FDataset.GetBookmark;
+end;
+
+function TDatasetWrapper.GetCurrentRecIdValue: integer;
+begin
+ Result := FDataset.RecNo;
+end;
+
+function TDatasetWrapper.GetDataset: TDataset;
+begin
+ Result := FDataset;
+end;
+
+function TDatasetWrapper.GetEOF: boolean;
+begin
+ Result := FDataset.Eof;
+end;
+
+function TDatasetWrapper.GetFieldCount: integer;
+begin
+ Result := fFields.Count;
+end;
+
+function TDatasetWrapper.GetFields: TDAFieldCollection;
+begin
+ result := fFields;
+end;
+
+function TDatasetWrapper.GetFieldValues(Index: integer): Variant;
+begin
+ Result := fFields[Index].Value;
+end;
+
+function TDatasetWrapper.GetIsEmpty: boolean;
+begin
+ Result := FDataset.IsEmpty;
+end;
+
+function TDatasetWrapper.GetLogicalName: string;
+begin
+ Result := FLogicalName;
+end;
+
+function TDatasetWrapper.GetName: string;
+begin
+ if (LogicalName = '') then
+ result := Fdataset.Name
+ else
+ result := LogicalName;
+end;
+
+function TDatasetWrapper.GetNames(Index: integer): string;
+begin
+ Result := Fields[Index].Name;
+end;
+
+function TDatasetWrapper.GetOnAfterExecute: TDAAfterExecuteCommandEvent;
+begin
+ Result := nil;
+ NotSupported();
+end;
+
+function TDatasetWrapper.GetOnAfterOpen: TDAAfterOpenDatasetEvent;
+begin
+ result := fAfterOpenIDataset;
+end;
+
+function TDatasetWrapper.GetOnBeforeExecute: TDABeforeExecuteCommandEvent;
+begin
+ Result := nil;
+ NotSupported();
+end;
+
+function TDatasetWrapper.GetOnBeforeOpen: TDABeforeOpenDatasetEvent;
+begin
+ result := fBeforeOpenIDataset;
+end;
+
+function TDatasetWrapper.GetOnExecuteError: TDAExecuteCommandErrorEvent;
+begin
+ Result := nil;
+ NotSupported();
+end;
+
+function TDatasetWrapper.GetOnOpenError: TDAOpenDatasetErrorEvent;
+begin
+ Result := nil;
+ NotSupported();
+end;
+
+function TDatasetWrapper.GetParams: TDAParamCollection;
+begin
+ Result := fParams;
+end;
+
+function TDatasetWrapper.GetPrepared: boolean;
+begin
+ Result := False;
+ NotSupported();
+end;
+
+function TDatasetWrapper.GetRecordCount: integer;
+begin
+ Result := FDataset.RecordCount;
+end;
+
+function TDatasetWrapper.GetRowRecIDValue: integer;
+begin
+ result := -1;
+end;
+
+function TDatasetWrapper.GetSQL: string;
+begin
+ // Not implemented
+ result := '';
+end;
+
+function TDatasetWrapper.GetState: TDatasetState;
+begin
+ Result := FDataset.State;
+end;
+
+function TDatasetWrapper.GetWhere: TDAWhere;
+begin
+ Result := nil;
+end;
+
+procedure TDatasetWrapper.GotoBookmark(Bookmark: TBookmark);
+begin
+ FDataset.GotoBookmark(Bookmark);
+end;
+
+procedure TDatasetWrapper.Insert;
+begin
+ FDataset.Insert;
+end;
+
+procedure TDatasetWrapper.Last;
+begin
+ FDataset.Last;
+end;
+
+function TDatasetWrapper.Locate(const KeyFields: string;
+ const KeyValues: Variant; Options: TLocateOptions): Boolean;
+begin
+ Result := FDataset.Locate(KeyFields, KeyValues, Options);
+end;
+
+function TDatasetWrapper.Lookup(const KeyFields: string;
+ const KeyValues: Variant; const ResultFields: string): Variant;
+begin
+ Result := FDataset.Lookup(KeyFields, KeyValues, ResultFields);
+end;
+
+procedure TDatasetWrapper.Next;
+begin
+ FDataset.Next;
+end;
+
+procedure TDatasetWrapper.Open;
+begin
+ Dataset.Open;
+end;
+
+function TDatasetWrapper.ParamByName(const aName: string): TDAParam;
+begin
+ Result := nil;
+ NotSupported();
+end;
+
+procedure TDatasetWrapper.Post;
+begin
+ FDataset.Post;
+end;
+
+procedure TDatasetWrapper.Prior;
+begin
+ FDataset.Prior;
+end;
+
+procedure TDatasetWrapper.Refresh;
+begin
+ FDataset.Refresh;
+end;
+
+procedure TDatasetWrapper.RefreshParams;
+begin
+ // Not implemented
+ NotSupported();
+end;
+
+procedure TDatasetWrapper.SetActive(Value: boolean);
+begin
+ FDataset.Active := Value;
+end;
+
+procedure TDatasetWrapper.SetCurrentRecIdValue(Value: integer);
+begin
+ FDataset.RecNo := Value;
+end;
+
+procedure TDatasetWrapper.SetLogicalName(aName: string);
+begin
+ FLogicalName := AName;
+end;
+
+procedure TDatasetWrapper.SetOnAfterExecute(
+ const Value: TDAAfterExecuteCommandEvent);
+begin
+ NotSupported();
+end;
+
+procedure TDatasetWrapper.SetOnAfterOpen(
+ const Value: TDAAfterOpenDatasetEvent);
+begin
+ fAfterOpenIDataset := Value;
+end;
+
+procedure TDatasetWrapper.SetOnBeforeExecute(
+ const Value: TDABeforeExecuteCommandEvent);
+begin
+ NotSupported();
+end;
+
+procedure TDatasetWrapper.SetOnBeforeOpen(
+ const Value: TDABeforeOpenDatasetEvent);
+begin
+ fBeforeOpenIDataset := Value;
+end;
+
+procedure TDatasetWrapper.SetOnExecuteError(
+ const Value: TDAExecuteCommandErrorEvent);
+begin
+ NotSupported();
+end;
+
+procedure TDatasetWrapper.SetOnOpenError(
+ const Value: TDAOpenDatasetErrorEvent);
+begin
+ NotSupported();
+end;
+
+procedure TDatasetWrapper.SetPrepared(Value: boolean);
+begin
+ NotSupported();
+end;
+
+procedure TDatasetWrapper.SetSQL(const Value: string);
+begin
+ // Not implemented
+end;
+
+procedure TDatasetWrapper.UnbindFields;
+var
+ i: integer;
+begin
+ for i := 0 to (FFields.Count - 1) do
+ fFields[i].Unbind;
+end;
+
+
+{$IFDEF MSWINDOWS}
+function TDatasetWrapper.InterfaceSupportsErrorInfo(const iid: TGUID): HResult;
+begin
+ if GetInterfaceEntry(iid) <> nil then
+ Result := S_OK
+ else
+ Result := S_FALSE;
+
+end;
+
+function TDatasetWrapper.SafeCallException(ExceptObject: TObject;
+ ExceptAddr: Pointer): HResult;
+begin
+ Result := uDAEngine.DAHandleSafeCallException(self,ExceptObject, ExceptAddr);
+end;
+{$ENDIF}
+
+function TDatasetWrapper.GetDynamicWhere: TDAWhereBuilder;
+begin
+ Result:=nil;
+end;
+
+procedure TDatasetWrapper.SetDynamicWhere(const Value: TDAWhereBuilder);
+begin
+ // nothing
+end;
+
+function TDatasetWrapper.SQLContainsDynamicWhere: boolean;
+begin
+ Result:=False;
+ // Not implemented
+end;
+
+function TDatasetWrapper.BookmarkValid(Bookmark: TBookmark): Boolean;
+begin
+ Result := FDataset.BookmarkValid(Bookmark);
+end;
+
+function TDatasetWrapper.ControlsDisabled: Boolean;
+begin
+ Result := FDataset.ControlsDisabled;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDADelta.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDADelta.pas
new file mode 100644
index 0000000..5e56031
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDADelta.pas
@@ -0,0 +1,1072 @@
+unit uDADelta;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ Classes, DB, SysUtils,
+// {$IFDEF MSWINDOWS}ActiveX,{$ENDIF}
+ uRODL, uROTypes, uROClasses, uROClientIntf,
+ uDAInterfaces, uDAEngine,
+ DataAbstract3_Intf, DataAbstract4_Intf;
+
+const
+ UndefinedRecordID = -1;
+
+type
+ IDADelta = interface;
+ TDADelta = class;
+ TDADeltaChange = class;
+
+ TVariantArray = array of variant;
+
+ { Exceptions }
+ EDAApplyUpdateFailed = class(EROException)
+ private
+ fRecID: integer;
+ fDeltaName: string;
+
+ public
+ constructor Create(aChange: TDADeltaChange; anOriginalException: Exception);
+
+ published
+ property RecID: integer read fRecID write fRecID;
+ property DeltaName: string read fDeltaName write fDeltaName;
+ end;
+
+ IDADataTable = interface
+ ['{BC6CD610-6D6E-4CD7-B181-73B3A5F9DE4F}']
+ end;
+
+ { IDADeltaOwner }
+ IDADeltaOwner = interface
+ ['{A92ECD00-14B2-4147-AE49-9493C56763A0}']
+ function GetDelta: IDADelta; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ end;
+
+ { TDADeltaChange }
+ TDADeltaChange = class
+ private
+ fDelta: TDADelta;
+ fRecID: integer;
+ fNewValues: TVariantArray;
+ fOldValues: TVariantArray;
+ fChangeType: TDAChangeType;
+ fStatus: TDAChangeStatus;
+ fMessage: string;
+ fRefreshedByServer: boolean;
+
+ procedure SetNewValue(const aName: string; const Value: Variant);
+ procedure SetOldValue(const aName: string; const Value: Variant);
+ function GetNewValue(const aName: string): Variant;
+ function GetOldValue(const aName: string): Variant;
+ function GetDelta: IDADelta;
+ protected
+
+ public
+ constructor Create(aDelta: TDADelta;
+ aRecID: integer;
+ aChangeType: TDAChangeType;
+ aStatus: TDAChangeStatus = csPending;
+ aMessage: string = '');
+ destructor Destroy; override;
+
+ property RecID: integer read fRecID write fRecID;
+ property ChangeType: TDAChangeType read fChangeType write fChangeType;
+ property OldValues: TVariantArray read fOldValues write fOldValues;
+ property NewValues: TVariantArray read fNewValues write fNewValues;
+
+ property OldValueByName[const aName: string]: Variant read GetOldValue write SetOldValue;
+ property NewValueByName[const aName: string]: Variant read GetNewValue write SetNewValue;
+
+ property Status: TDAChangeStatus read fStatus write fStatus;
+ property Message: string read fMessage write fMessage;
+
+ property Delta : IDADelta read GetDelta;
+
+ property RefreshedByServer : boolean read fRefreshedByServer write fRefreshedByServer;
+ end;
+
+ { IDADelta }
+ IDADelta = interface
+ ['{0FD17DDB-3C34-4520-9106-4D3D540BA3D3}']
+ // Property readers/writers
+ function GetLoggedFieldCount: integer;
+ function GetInChange: boolean;
+ function GetCount: integer;
+ function GetChange(Index: integer): TDADeltaChange;
+ function GetLoggedFieldNames(Index: integer): string;
+ function GetKeyFieldCount: integer;
+ function GetKeyFieldNames(Index: integer): string;
+ function GetLoggedFieldTypes(Index : integer): TDADataType;
+ procedure SetLoggedFieldTypes(anIndex : integer; aFieldType : TDADataType);
+ function GetLogicalName : string;
+ procedure SetLogicalName(const aName : string);
+
+ // Methods
+ procedure AssignDataTable(aDataTable : TComponent);
+
+ function FindChange(aRecID: integer): TDADeltaChange;
+ procedure RemoveChange(aChange: TDADeltaChange);
+
+ procedure Clear(DoClearFieldNames: boolean = FALSE; DoClearKeyFieldNames: boolean = FALSE);
+
+ procedure AddFieldName(const aFieldName: string);
+ procedure AddKeyFieldName(const aKeyFieldName: string);
+
+ procedure ClearFieldNames;
+ procedure ClearKeyFieldNames;
+
+ procedure StartChange(aChangeType: TDAChangeType);
+ procedure CancelChange;
+ procedure EndChange;
+ procedure RestoreLastChange;
+
+ function IsNewRecord(aRecordID: integer = -1): boolean;
+
+ procedure Add(aChange: TDADeltaChange); overload;
+ function Add(aRecordID: integer; aChangeType: TDAChangeType;
+ aStatus: TDAChangeStatus = csPending; const aMessage: string = ''): TDADeltaChange; overload;
+ procedure Delete(Index: integer);
+
+ function GetCountByStatus(aChangeStatus : TDAChangeStatus) : integer;
+
+ function IndexOfLoggedField(const aName: string): integer;
+ property LoggedFieldNames[Index: integer]: string read GetLoggedFieldNames;
+ property LoggedFieldCount: integer read GetLoggedFieldCount;
+
+ property KeyFieldNames[Index: integer]: string read GetKeyFieldNames;
+ property KeyFieldCount: integer read GetKeyFieldCount;
+
+ property LoggedFieldTypes[Index : integer]: TDADataType read GetLoggedFieldTypes write SetLoggedFieldTypes;
+
+ function GetDelta: TDADelta;
+ procedure RemoveUnchangedChanges;
+
+ property LogicalName : string read GetLogicalName write SetLogicalName;
+ property Changes[Index: integer]: TDADeltaChange read GetChange; default;
+ property Count: integer read GetCount;
+ end;
+
+ { IDADataReader }
+ IDADataReader = interface
+ ['{7D2FC996-7A04-4ECE-91B0-4F17EFEC4985}']
+ function GetFieldNames(Index: integer): string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetFieldIndexes(const aName: string): integer; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetFieldCount: integer; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetRecordCount: integer; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ function GetAsBoolean(Index: integer): boolean; overload; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAsCurrency(Index: integer): currency; overload; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAsDateTime(Index: integer): TDateTime; overload; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAsFloat(Index: integer): double; overload; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAsInteger(Index: integer): integer; overload; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAsString(Index: integer): string; overload; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAsVariant(Index: integer): variant; overload; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ function GetAsBoolean(const FieldName: string): boolean; overload; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAsCurrency(const FieldName: string): currency; overload; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAsDateTime(const FieldName: string): TDateTime; overload; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAsFloat(const FieldName: string): double; overload; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAsInteger(const FieldName: string): integer; overload; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAsString(const FieldName: string): string; overload; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAsVariant(const FieldName: string): variant; overload; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ function First: boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function Next: boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ function Locate(const KeyFields: string; const KeyValues: Variant; Options: TLocateOptions): Boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ property FieldNames[Index: integer]: string read GetFieldNames;
+ property FieldIndexes[const aFieldName: string]: integer read GetFieldIndexes;
+ property FieldCount: integer read GetFieldCount;
+
+ property RecordCount: integer read GetRecordCount;
+ end;
+
+ { TDADeltaList }
+ TDADeltaList = class(TInterfaceList)
+ private
+ function GetDeltas(Index: integer): IDADelta;
+
+ protected
+ public
+ function Add(const aDelta : IDADelta) : integer; reintroduce;
+ procedure Insert(Index: Integer; const aDelta: IDADelta); reintroduce;
+
+ function DeltaByName(const aDeltaName : string) : IDADelta;
+ function FindDelta(const aDeltaName : string) : IDADelta;
+
+ property Deltas[Index : integer] : IDADelta read GetDeltas; default;
+ end;
+
+ { TDADelta }
+ TDADelta = class(TDAEngineBaseObject, IDADelta, IDADataReader)
+ private
+ fDataTable: TComponent;
+ fChanges: TStringList;
+ fLastChange,
+ fCurrentChange: TDADeltaChange;
+ fNewChange: boolean;
+ fCurrentChangeType: TDAChangeType;
+ fKeyFields,
+ fFieldNames: TStringList;
+ fCurrPosition: integer;
+ fLogicalName : string;
+
+ function GetLoggedFieldCount: integer;
+ function GetInChange: boolean;
+ function GetCount: integer;
+ function GetChange(Index: integer): TDADeltaChange;
+ function GetLoggedFieldNames(Index: integer): string;
+ function GetKeyFieldCount: integer;
+ function GetKeyFieldNames(Index: integer): string;
+ function GetLoggedFieldTypes(Index : integer): TDADataType;
+ procedure SetLoggedFieldTypes(anIndex : integer; aFieldType : TDADataType);
+ procedure DeleteChange(anIndex : integer);
+ protected
+ function GetDelta: TDADelta;
+ function GetLogicalName : string;
+ procedure SetLogicalName(const aName : string);
+
+ // IDADataReader
+ function GetFieldNames(Index: integer): string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetFieldIndexes(const aName: string): integer; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetFieldCount: integer; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAsBoolean(Index: integer): boolean; overload; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAsCurrency(Index: integer): currency; overload; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAsDateTime(Index: integer): TDateTime; overload; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAsFloat(Index: integer): double; overload; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAsInteger(Index: integer): integer; overload; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAsString(Index: integer): string; overload; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAsVariant(Index: integer): variant; overload; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAsBoolean(const FieldName: string): boolean; overload; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAsCurrency(const FieldName: string): currency; overload; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAsDateTime(const FieldName: string): TDateTime; overload; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAsFloat(const FieldName: string): double; overload; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAsInteger(const FieldName: string): integer; overload; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAsString(const FieldName: string): string; overload; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAsVariant(const FieldName: string): variant; overload; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetRecordCount: integer; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function First: boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function Next: boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function Locate(const KeyFields: string; const KeyValues: Variant; Options: TLocateOptions): Boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ public
+ constructor Create(aDataTable: TComponent); overload;
+ constructor Create(const aLogicalName : string); overload;
+ constructor Create; overload;
+ destructor Destroy; override;
+
+ function FindChange(aRecID: integer): TDADeltaChange;
+ procedure RemoveChange(aChange: TDADeltaChange);
+
+ procedure Clear(DoClearFieldNames: boolean = FALSE; DoClearKeyFieldNames: boolean = FALSE);
+
+ procedure AssignDataTable(aDataTable : TComponent);
+
+ procedure AddFieldName(const aFieldName: string);
+ procedure AddKeyFieldName(const aKeyFieldName: string);
+ procedure ClearFieldNames;
+ procedure ClearKeyFieldNames;
+ procedure RemoveUnchangedChanges;
+
+ procedure Add(aChange: TDADeltaChange); overload;
+ function Add(aRecordID: integer; aChangeType: TDAChangeType;
+ aStatus: TDAChangeStatus = csPending; const aMessage: string = ''): TDADeltaChange; overload;
+ procedure Delete(Index: integer);
+
+ procedure StartChange(aChangeType: TDAChangeType);
+ procedure CancelChange;
+ procedure EndChange;
+ procedure RestoreLastChange;
+
+ function IsNewRecord(aRecordID: integer = -1): boolean;
+
+ function IndexOfLoggedField(const aName: string): integer;
+
+ function GetCountByStatus(aChangeStatus : TDAChangeStatus) : integer;
+
+ property CurrentChange: TDADeltaChange read fCurrentChange;
+
+ property KeyFieldNames[Index: integer]: string read GetKeyFieldNames;
+ property KeyFieldCount: integer read GetKeyFieldCount;
+
+ property LoggedFieldNames[Index: integer]: string read GetLoggedFieldNames;
+ property LoggedFieldCount: integer read GetLoggedFieldCount;
+ property LoggedFieldTypes[Index : integer]: TDADataType read GetLoggedFieldTypes write SetLoggedFieldTypes;
+ property InChange: boolean read GetInChange;
+
+ property Changes[Index: integer]: TDADeltaChange read GetChange; default;
+ property Count: integer read GetCount;
+ //property DataTable: TComponent read fDataTable;
+ end;
+
+function FormatRecIDString(aRecID: integer): string;
+function NewDelta(aDeltaName: string): IDADelta; overload;
+
+function FieldValueToVariant(aSourceField : TDAField) : Variant;
+procedure VariantToFieldValue(const aSourceVariant : Variant; aField : TDAField);
+
+
+implementation
+
+uses
+ Variants, TypInfo,
+ uROClient, uROSessions, uROXMLIntf,
+ uDARes, uDARegExpr, uDADataTable;
+
+function FormatRecIDString(aRecID: integer): string;
+begin
+ result := FormatFloat('0000000000', aRecID);
+end;
+
+function NewDelta(aDeltaName: string): IDADelta;
+begin
+ result := TDADelta.Create(aDeltaName);
+end;
+
+{ TDADeltaList }
+
+function TDADeltaList.Add(const aDelta: IDADelta): integer;
+begin
+ result := inherited Add(aDelta);
+end;
+
+function TDADeltaList.DeltaByName(const aDeltaName: string): IDADelta;
+begin
+ result := FindDelta(aDeltaName);
+ if (result=NIL) then raise Exception.Create('Cannot find delta '+aDeltaName);
+end;
+
+function TDADeltaList.FindDelta(const aDeltaName: string): IDADelta;
+var i : integer;
+begin
+ result := NIL;
+ for i := 0 to (Count-1) do
+ if SameText(Deltas[i].LogicalName, aDeltaName) then begin
+ result := Deltas[i];
+ Exit;
+ end;
+end;
+
+function TDADeltaList.GetDeltas(Index: integer): IDADelta;
+begin
+ result := inherited Items[Index] as IDADelta;
+end;
+
+procedure TDADeltaList.Insert(Index: Integer; const aDelta: IDADelta);
+begin
+ inherited Insert(Index, aDelta);
+end;
+
+{ TDADelta }
+
+constructor TDADelta.Create(const aLogicalName: string);
+begin
+ inherited Create;
+
+ // This error is often generated if the user forgets to set LogicalName in the data table
+ if (aLogicalName='') then raise Exception.Create('Cannot create a delta without a name');
+
+ fLogicalName := aLogicalName;
+
+ fKeyFields := TStringList.Create;
+ fFieldNames := TStringList.Create;
+
+ fChanges := TStringList.Create;
+ fChanges.Duplicates := dupError;
+ fChanges.Sorted := TRUE;
+end;
+
+constructor TDADelta.Create;
+begin
+ Create(NewGuidAsString);
+end;
+
+constructor TDADelta.Create(aDataTable: TComponent);
+var i: integer;
+ dnme : string;
+ dt: TDADataTable;
+begin
+ { AleF: Changed the logic of how delta creation works. The name of the delta is required and, if using
+ this overloaded version of create, it will be taken from the datatable.LogicalName.
+ This was made to optimize the adapters which, right noiw, require a list of delta names and
+ one of deltas. Because of this change, adapters can find the name from the delta itself.
+ }
+ if (aDataTable=NIL) then raise Exception.Create('Datatable must be assigned');
+ dt:=aDataTable as TDADataTable;
+ if (dt.LogicalName<>'') then
+ dnme := dt.LogicalName
+ else
+ dnme := dt.Name;
+
+ Create(dnme); // Calls the constructor above;
+ fDataTable := aDataTable;
+
+ for i := 0 to (dt.Fields.Count - 1) do
+ with dt.Fields[i] do begin
+ if LogChanges or InPrimaryKey then fFieldNames.Add(Name);
+ if InPrimaryKey then fKeyFields.Add(Name);
+ end;
+
+ for i := 0 to (fFieldNames.Count-1) do
+ fFieldNames.Objects[i] := TObject(ord(dt.FieldByName(fFieldNames[i]).DataType));
+end;
+
+destructor TDADelta.Destroy;
+begin
+ // Removes the current change (if new and not yet in the changes list)
+ if (fCurrentChange<>NIL) then begin
+ if (FindChange(fCurrentChange.RecID)=NIL)
+ then FreeAndNIL(fCurrentChange);
+ end;
+
+ if (fChanges<>NIL) then begin
+ Clear;
+ fChanges.Free;
+ end;
+
+ fFieldNames.Free;
+ fKeyFields.Free;
+
+ inherited;
+end;
+
+function TDADelta.GetLoggedFieldCount: integer;
+begin
+ result := fFieldNames.Count;
+end;
+
+function FieldValueToVariant(aSourceField : TDAField) : Variant;
+var stream : IROStream;
+ p : pointer;
+ sze : cardinal;
+begin
+ case aSourceField.DataType of
+ datBlob : begin
+ if aSourceField.IsNull {or (aSourceField.BlobSize = 0)} then result := Unassigned
+ else begin
+ stream := NewROStream;
+ aSourceField.SaveToStream(stream);
+ sze := stream.Size;
+ if stream.Size = 0 then
+ result := Unassigned
+ else begin
+ stream.Position := 0;
+ result := VarArrayCreate([0, sze-1], varByte);
+ p := VarArrayLock(result);
+ try
+ stream.Read(p^, sze);
+ finally
+ VarArrayUnlock(result);
+ end;
+ stream.Position := 0;
+ end;
+ end;
+ end;
+ {$IFDEF DELPHI10UP}
+ datWideMemo: Result:= aSourceField.AsWideString;
+ {$ENDIF DELPHI10UP}
+ else result := aSourceField.Value;
+ end;
+end;
+
+procedure VariantToFieldValue(const aSourceVariant : Variant; aField : TDAField);
+var stream : IROStream;
+ p : pointer;
+ readcount, sze : cardinal;
+begin
+ case aField.DataType of
+ datBlob:
+ if VarIsEmpty(aSourceVariant) then begin
+ aField.Value := Unassigned;
+ end
+ else begin
+ if VarType(aSourceVariant) = varString then begin
+ aField.AsString:= VarToStr(aSourceVariant);
+ end
+ else begin
+ stream := NewROStream;
+
+ sze := VarArrayHighBound(aSourceVariant, 1) - VarArrayLowBound(aSourceVariant, 1) + 1;
+ p := VarArrayLock(aSourceVariant);
+ try
+ readcount := stream.Write(p^, sze);
+ finally
+ VarArrayUnlock(aSourceVariant);
+ end;
+
+ if (readcount<>sze)
+ then raise Exception.CreateFmt('Couldn''t read all data. Expected %d read %d', [sze, readcount]);
+
+ stream.Position := 0;
+ aField.LoadFromStream(stream);
+ end;
+ end;
+ {$IFDEF DELPHI10UP}
+ datWideMemo: aField.AsWideString:=aSourceVariant;
+ {$ENDIF DELPHI10UP}
+ else aField.Value := aSourceVariant;
+ end;
+end;
+
+procedure TDADelta.StartChange(aChangeType: TDAChangeType);
+var
+ recid: integer;
+ x, i: integer;
+begin
+ if InChange then RaiseError(err_ChangeLogAlreadyStarted);
+
+ if not Assigned(fDataTable) then RaiseError(err_NotAttachedToDataTable);
+
+ fCurrentChangeType := aChangeType;
+
+ // Checks to see if this is the first time this record was changed
+ if (aChangeType <> ctInsert) then begin
+ recid := (fDataTable as TDADataTable).RecIDField.AsInteger; // CurrRecId;
+ fCurrentChange := FindChange(recid);
+ fNewChange := (fCurrentChange = nil);
+ end
+ else begin
+ recid := UndefinedRecordID;
+ fNewChange := TRUE;
+ end;
+
+ if fNewChange then begin
+ fCurrentChange := TDADeltaChange.Create(Self, recid, aChangeType);
+
+ // For deletes and edit, we want to store the original values.
+ // This happens only once.
+ case aChangeType of
+ ctDelete, ctUpdate: begin
+ with (fDataTable as TDADataTable).Fields do begin
+ x := 0;
+ for i := 0 to ((fDataTable as TDADataTable).FieldCount - 1) do begin
+ if Fields[i].LogChanges or Fields[i].InPrimaryKey then begin
+ fCurrentChange.OldValues[x] := FieldValueToVariant(Fields[i]);
+ Inc(x);
+ end;
+ end;
+ end;
+ end
+ end;
+ end;
+end;
+
+procedure TDADelta.CancelChange;
+begin
+ //if not Assigned(fDataTable) then RaiseError(err_NotAttachedToDataTable);
+
+ if fNewChange
+ then FreeAndNIL(fCurrentChange); // if it is not a new change (i.e. cancelling an edit) should not free!
+ fCurrentChange := nil; // nil it in either case!
+end;
+
+procedure TDADelta.EndChange;
+var
+ x, i: integer;
+ lWasChanged: Boolean;
+ lLoggedFieldName: string;
+ lNewValue, lOldValue: Variant;
+ lDataTable: TDAdataTable;
+begin
+ if not Assigned(fDataTable) then RaiseError(err_NotAttachedToDataTable);
+
+ lDataTable := (fDataTable as TDADataTable);
+
+ try
+ if (fCurrentChange.RecID = UndefinedRecordID)
+ then fCurrentChange.RecID := lDataTable.RecIDField.AsInteger // Happens on inserts and first time changes (except deletes)
+
+ else if (fCurrentChange.RecID <> lDataTable.RecIDField.AsInteger)
+ then raise Exception.Create('Record pointer changed!');
+
+ // Doing a new operation on the same record
+ if (fCurrentChange.ChangeType <> fCurrentChangeType) then begin
+ case fCurrentChangeType of
+ ctDelete: begin
+ if (fCurrentChange.ChangeType = ctInsert) then begin // No need to track new records that have been deleted
+ RemoveChange(fCurrentChange);
+ Exit; // Done!
+ end
+ else begin
+ fCurrentChange.ChangeType := fCurrentChangeType; // Deletes have precedence over anything else
+ for i := 0 to (LoggedFieldCount - 1) do
+ fCurrentChange.NewValues[i] := UnAssigned;
+ end;
+ end;
+ end;
+ end;
+
+ case fCurrentChange.ChangeType of
+ ctUpdate, ctInsert: begin
+ with lDataTable.Fields do begin
+ lWasChanged := False;
+ x := 0;
+ for i := 0 to (lDataTable.FieldCount - 1) do begin
+ if Fields[i].LogChanges or Fields[i].InPrimaryKey then begin
+ fCurrentChange.NewValues[x] := FieldValueToVariant(Fields[i]);
+
+ lOldValue := fCurrentChange.OldValues[x];
+ lNewValue := fCurrentChange.NewValues[x];
+ if fCurrentChange.ChangeType = ctUpdate then begin
+ lWasChanged := lWasChanged or not ROVariantsEqual(lOldValue, lNewValue);
+ end else begin
+ lLoggedFieldName := fCurrentChange.Delta.LoggedFieldNames[x];
+ if FieldByName(lLoggedFieldName).InPrimaryKey and VarIsEmpty(lOldValue) then begin
+ fCurrentChange.OldValues[x] := lNewValue;
+ end;
+ end;
+ Inc(x);
+ end;
+ end;
+ if (fCurrentChange.ChangeType = ctUpdate) and (not lWasChanged) then begin //The change doesn't affect any fields with LogChanges
+ CancelChange;
+ Exit; // Done!
+ end;
+ end;
+ end;
+ end;
+
+ if fNewChange then fChanges.AddObject(FormatRecIDString(fCurrentChange.RecID), fCurrentChange);
+
+ finally
+ // ALEF: added to keep a log of the last change in case a post fails. It will be restored in such case
+ // via the InternalOnPostError through a call to RestoreLastChange
+ fLastChange := fCurrentChange;
+
+ fCurrentChange := nil;
+ end;
+end;
+
+function TDADelta.GetInChange: boolean;
+begin
+ result := fCurrentChange <> nil
+end;
+
+function TDADelta.FindChange(aRecID: integer): TDADeltaChange;
+var
+ idx: integer;
+begin
+ result := nil;
+ idx := fChanges.IndexOf(FormatRecIDString(aRecID));
+ if (idx >= 0) then result := TDADeltaChange(fChanges.Objects[idx]);
+end;
+
+function TDADelta.GetCount: integer;
+begin
+ result := fChanges.Count;
+end;
+
+procedure TDADelta.Clear(DoClearFieldNames: boolean = FALSE; DoClearKeyFieldNames: boolean = FALSE);
+var
+ i: integer;
+begin
+ for i := 0 to (fChanges.Count - 1) do
+ if (fChanges.Objects[i]<>NIL)
+ then fChanges.Objects[i].Free;
+
+ fChanges.Clear;
+ fLastChange := nil;
+
+ if DoClearFieldNames then ClearFieldNames;
+ if DoClearKeyFieldNames then ClearKeyFieldNames;
+
+ fCurrPosition := 0;
+end;
+
+function TDADelta.GetChange(Index: integer): TDADeltaChange;
+begin
+ result := TDADeltaChange(fChanges.Objects[Index]);
+end;
+
+procedure TDADelta.RemoveChange(aChange: TDADeltaChange);
+var
+ idx: integer;
+begin
+ idx := fChanges.IndexOfObject(aChange);
+ if (idx >= 0) then DeleteChange(idx);
+end;
+
+function TDADelta.GetLoggedFieldNames(Index: integer): string;
+begin
+ result := fFieldNames[Index]
+end;
+
+procedure TDADelta.AddFieldName(const aFieldName: string);
+begin
+ fFieldNames.Add(aFieldName);
+end;
+
+procedure TDADelta.ClearFieldNames;
+begin
+ fFieldNames.Clear;
+end;
+
+procedure TDADelta.Add(aChange: TDADeltaChange);
+begin
+ fChanges.AddObject(FormatRecIDString(aChange.RecId), aChange);
+end;
+
+procedure TDADelta.Delete(Index: integer);
+begin
+ fChanges.Objects[Index].Free;
+ fChanges.Delete(Index);
+end;
+
+function TDADelta.IndexOfLoggedField(const aName: string): integer;
+begin
+ result := fFieldNames.IndexOf(aName)
+end;
+
+function TDADelta.GetDelta: TDADelta;
+begin
+ result := Self;
+end;
+
+function TDADelta.IsNewRecord(aRecordID: integer = -1): boolean;
+var
+ recid, i: integer;
+begin
+ result := FALSE;
+ recid := aRecordID;
+
+ if (aRecordID = -1) then begin
+ if ((fDataTable as TDADataTable).RecordCount > 0) then
+ recid := (fDataTable as TDADataTable).GetRowRecIDValue
+ else
+ Exit;
+ end;
+
+ for i := 0 to Count - 1 do
+ if (Changes[i].RecID = recid) then begin
+ result := Changes[i].ChangeType = ctInsert;
+ Exit;
+ end;
+end;
+
+function TDADelta.GetKeyFieldCount: integer;
+begin
+ result := fKeyFields.Count
+end;
+
+function TDADelta.GetKeyFieldNames(Index: integer): string;
+begin
+ result := fKeyFields[Index]
+end;
+
+procedure TDADelta.ClearKeyFieldNames;
+begin
+ fKeyFields.Clear;
+end;
+
+procedure TDADelta.AddKeyFieldName(const aKeyFieldName: string);
+begin
+ fKeyFields.Add(aKeyFieldName)
+end;
+
+function TDADelta.Add(aRecordID: integer; aChangeType: TDAChangeType;
+ aStatus: TDAChangeStatus; const aMessage: string): TDADeltaChange;
+begin
+ result := TDADeltaChange.Create(Self, aRecordID, aChangeType, aStatus, aMessage);
+ Add(result);
+end;
+
+function TDADelta.GetFieldCount: integer;
+begin
+ result := fFieldNames.Count;
+end;
+
+function TDADelta.GetFieldIndexes(const aName: string): integer;
+begin
+ result := fFieldNames.IndexOf(aName);
+end;
+
+function TDADelta.GetFieldNames(Index: integer): string;
+begin
+ result := fFieldNames[Index];
+end;
+
+function TDADelta.GetAsBoolean(const FieldName: string): boolean;
+begin
+ result := GetVarBoolean(Changes[fCurrPosition].NewValueByName[FieldName]);
+end;
+
+function TDADelta.GetAsBoolean(Index: integer): boolean;
+begin
+ result := GetVarBoolean(Changes[fCurrPosition].NewValues[Index]);
+end;
+
+function TDADelta.GetAsCurrency(Index: integer): currency;
+begin
+ result := GetVarCurrency(Changes[fCurrPosition].NewValues[Index]);
+end;
+
+function TDADelta.GetAsCurrency(const FieldName: string): currency;
+begin
+ result := GetVarCurrency(Changes[fCurrPosition].NewValueByName[FieldName]);
+end;
+
+function TDADelta.GetAsDateTime(Index: integer): TDateTime;
+begin
+ result := GetVarDateTime(Changes[fCurrPosition].NewValues[Index]);
+end;
+
+function TDADelta.GetAsDateTime(const FieldName: string): TDateTime;
+begin
+ result := GetVarDateTime(Changes[fCurrPosition].NewValueByName[FieldName]);
+end;
+
+function TDADelta.GetAsFloat(Index: integer): double;
+begin
+ result := GetVarFloat(Changes[fCurrPosition].NewValues[Index]);
+end;
+
+function TDADelta.GetAsFloat(const FieldName: string): double;
+begin
+ result := GetVarFloat(Changes[fCurrPosition].NewValueByName[FieldName]);
+end;
+
+function TDADelta.GetAsInteger(Index: integer): integer;
+begin
+ result := GetVarInteger(Changes[fCurrPosition].NewValues[Index]);
+end;
+
+function TDADelta.GetAsInteger(const FieldName: string): integer;
+begin
+ result := GetVarInteger(Changes[fCurrPosition].NewValueByName[FieldName]);
+end;
+
+function TDADelta.GetAsString(const FieldName: string): string;
+begin
+ result := GetVarString(Changes[fCurrPosition].NewValueByName[FieldName]);
+end;
+
+function TDADelta.GetAsString(Index: integer): string;
+begin
+ result := GetVarString(Changes[fCurrPosition].NewValues[Index]);
+end;
+
+function TDADelta.GetAsVariant(Index: integer): variant;
+begin
+ result := Changes[fCurrPosition].NewValues[Index];
+end;
+
+function TDADelta.GetAsVariant(const FieldName: string): variant;
+begin
+ result := Changes[fCurrPosition].NewValueByName[FieldName];
+end;
+
+function TDADelta.First: boolean;
+begin
+ result := (fChanges.Count > 0);
+ if result then fCurrPosition := 0;
+end;
+
+function TDADelta.GetRecordCount: integer;
+begin
+ result := fChanges.Count;
+end;
+
+function TDADelta.Next: boolean;
+begin
+ result := (fCurrPosition < fChanges.Count - 1);
+
+ if result then Inc(fCurrPosition);
+end;
+
+function TDADelta.Locate(const KeyFields: string; const KeyValues: Variant;
+ Options: TLocateOptions): Boolean;
+begin
+ result := FALSE; // Deltas don't support searches for now
+end;
+
+function TDADelta.GetLoggedFieldTypes(Index: integer): TDADataType;
+begin
+ result := TDADataType(Cardinal(fFieldNames.Objects[Index]));
+end;
+
+procedure TDADelta.SetLoggedFieldTypes(anIndex: integer;
+ aFieldType: TDADataType);
+begin
+ fFieldNames.Objects[anIndex] := TObject(ord(aFieldType));
+end;
+
+procedure TDADelta.RestoreLastChange;
+var
+ i: integer;
+begin
+ if (fLastChange = nil) and (fChanges.Count=1) and
+ (fDataTable <>nil) and (fDataTable is TDADataTable) and
+ (ruoOnPost in TDADataTable(fDataTable).RemoteUpdatesOptions) and
+ (TDADataTable(fDataTable).State in [dsEdit,dsInsert]) then
+ fLastChange := Changes[0];
+ fCurrentChange := fLastChange;
+ if fNewChange and (fCurrentChange <> nil) then begin
+ i:=fChanges.IndexOf(FormatRecIDString(fCurrentChange.RecID));
+ if i <> -1 then fChanges.Delete(i);
+ fCurrentChange.RecID := UndefinedRecordID;
+// basically nulls this --> fChanges.AddObject(FormatRecIDString(fCurrentChange.RecID), fCurrentChange);
+ end;
+end;
+
+function TDADelta.GetCountByStatus(
+ aChangeStatus: TDAChangeStatus): integer;
+var i : integer;
+begin
+ result := 0;
+ for i := 0 to fChanges.Count-1 do begin
+ if (Changes[i].Status=aChangeStatus) then Inc(result);
+ end;
+end;
+
+function TDADelta.GetLogicalName: string;
+begin
+ result := fLogicalName;
+end;
+
+procedure TDADelta.SetLogicalName(const aName: string);
+begin
+ fLogicalName := aName;
+end;
+
+procedure TDADelta.AssignDataTable(aDataTable: TComponent);
+begin
+ fDataTable := aDataTable as TDADataTable;
+end;
+
+procedure TDADelta.RemoveUnchangedChanges;
+
+ function isUnchangedChange(aChange: TDADeltaChange): boolean;
+ var
+ i: integer;
+ begin
+ Result:= (aChange.Status = csPending) and (aChange.fChangeType = ctUpdate);
+ if result then
+ For i := 0 to LoggedFieldCount-1 do begin
+ if not ROVariantsEqual(aChange.OldValues[i],aChange.NewValues[i]) then begin
+ Result:=False;
+ Break;
+ end;
+ end;
+ end;
+
+var
+ i: integer;
+begin
+ For i:= Count-1 downto 0 do
+ if isUnchangedChange(Changes[i]) then begin
+ if fCurrentChange = Changes[i] then fCurrentChange := nil;
+ DeleteChange(i);
+ end;
+end;
+
+procedure TDADelta.DeleteChange(anIndex: integer);
+begin
+ fChanges.Objects[anIndex].Free;
+ fChanges.Delete(anIndex);
+end;
+
+{ TDADeltaChange }
+
+constructor TDADeltaChange.Create(aDelta: TDADelta;
+ aRecID: integer;
+ aChangeType: TDAChangeType;
+ aStatus: TDAChangeStatus = csPending;
+ aMessage: string = '');
+begin
+ inherited Create;
+
+ fRefreshedByServer := FALSE;
+ fStatus := aStatus;
+ fDelta := aDelta;
+ fRecID := aRecID;
+ fChangeType := aChangeType;
+ fMessage := aMessage;
+
+ SetLength(fOldValues, aDelta.LoggedFieldCount);
+ SetLength(fNewValues, aDelta.LoggedFieldCount);
+end;
+
+destructor TDADeltaChange.Destroy;
+begin
+ inherited;
+end;
+
+function TDADeltaChange.GetDelta: IDADelta;
+begin
+ result := fDelta as IDADelta;
+end;
+
+function TDADeltaChange.GetNewValue(const aName: string): Variant;
+var
+ idx: integer;
+begin
+ idx := fDelta.IndexOfLoggedField(aName);
+ if (idx < 0) then RaiseError(err_CannotFindField, [aName]);
+ result := fNewValues[idx];
+end;
+
+function TDADeltaChange.GetOldValue(const aName: string): Variant;
+var
+ idx: integer;
+begin
+ idx := fDelta.IndexOfLoggedField(aName);
+ if (idx < 0) then RaiseError(err_CannotFindField, [aName]);
+ result := fOldValues[idx];
+end;
+
+procedure TDADeltaChange.SetNewValue(const aName: string; const Value: Variant);
+var
+ idx: integer;
+begin
+ idx := fDelta.IndexOfLoggedField(aName);
+ if (idx < 0) then RaiseError(err_CannotFindField, [aName]);
+ if idx >= Length(fNewValues) then
+ SetLength(fNewValues, idx + 1);
+ fNewValues[idx] := Value;
+end;
+
+procedure TDADeltaChange.SetOldValue(const aName: string; const Value: Variant);
+var
+ idx: integer;
+begin
+ idx := fDelta.IndexOfLoggedField(aName);
+ if (idx < 0) then RaiseError(err_CannotFindField, [aName]);
+ if idx >= Length(fOldValues) then
+ SetLength(fOldValues, idx + 1);
+ fOldValues[idx] := Value;
+end;
+
+{ EDAApplyUpdateFailed }
+
+constructor EDAApplyUpdateFailed.Create(aChange: TDADeltaChange; anOriginalException: Exception);
+begin
+ if (anOriginalException<>NIL) then begin
+ inherited Create(anOriginalException.Message);
+ end
+ else inherited Create('');
+
+ fRecID := aChange.RecID;
+ fDeltaName := aChange.Delta.LogicalName;
+end;
+
+initialization
+ RegisterExceptionClass(EDAApplyUpdateFailed);
+finalization
+ UnregisterExceptionClass(EDAApplyUpdateFailed);
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDADesigntimeCall.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDADesigntimeCall.pas
new file mode 100644
index 0000000..60b723f
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDADesigntimeCall.pas
@@ -0,0 +1,40 @@
+unit uDADesigntimeCall;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ Classes,
+ uDADataTable, uRODynamicRequest;
+
+type
+ TDADesigntimeCall = class(TRODynamicRequest)
+ private
+ public
+ procedure MakeRequest;
+ published
+ end;
+
+implementation
+
+{ TDADesigntimeCall }
+
+procedure TDADesigntimeCall.MakeRequest;
+begin
+ Execute();
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDADriverInfo.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDADriverInfo.pas
new file mode 100644
index 0000000..1b9fc1d
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDADriverInfo.pas
@@ -0,0 +1,59 @@
+unit uDADriverInfo;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ uDADriverManager;
+
+procedure ShowDriverInfo(aDriverManager: TDADriverManager);
+
+implementation
+
+uses
+ SysUtils,
+{$IFDEF FPC}
+ FPgtkExt,
+{$ENDIF}
+ Dialogs;
+
+procedure ShowDriverInfo(aDriverManager: TDADriverManager);
+var
+ s: string;
+ i: integer;
+begin
+ if (aDriverManager.DriverCount = 0) then
+ MessageDlg('No drivers are currently loaded', mtWarning, [mbOK], 0)
+ else begin
+ s := 'The following ' + IntToStr(aDriverManager.DriverCount) + ' drivers are currently loaded:'#13;
+ for i := 0 to (aDriverManager.DriverCount - 1) do begin
+ with aDriverManager.DriverInfo[i] do begin
+ if (Handle = 0) then
+ s := s + #13 + Format('%s - %s %d.%d (Statically Linked)',
+ [Driver.DriverID, Driver.Description, Driver.MajVersion, Driver.MinVersion])
+
+ else
+ s := s + #13 + Format('%s - %s %d.%d (%s)',
+ [Driver.DriverID, Driver.Description, Driver.MajVersion, Driver.MinVersion, FileName]);
+ end;
+ end;
+
+ MessageDlg(s, mtInformation, [mbOK], 0);
+ end;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDADriverManager.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDADriverManager.pas
new file mode 100644
index 0000000..c6b5ded
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDADriverManager.pas
@@ -0,0 +1,495 @@
+unit uDADriverManager;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses Classes, uDAInterfaces, uROClasses;
+
+type
+ { TDriverInfo }
+ PDADriverInfo = ^TDADriverInfo;
+ TDADriverInfo = record
+ FileName: string;
+ Handle: cardinal;
+ Driver: IDADriver;
+ GetDriverObjectFunc: TDAGetDriverObject;
+ end;
+
+ TDADriverNameType = (dntFileName, dntDriverID);
+
+ { TDADriverManager }
+ TDADriverLoadNotification = procedure(DriverInfo: TDADriverInfo) of object;
+
+ TDADriverManager = class(TComponent, IDADriverManager)
+ private
+ fDriverDirectory: string;
+ fDrivers: TList;
+ fLoadingAutoLoad,
+ fAutoLoad: boolean;
+ fOnDriverUnloaded: TDADriverLoadNotification;
+ fOnDriverLoaded: TDADriverLoadNotification;
+ fStreamedTraceActive,
+ fTraceActive: boolean;
+ fTraceFlags: TDATraceOptions;
+ fOnTraceEvent: TDALogTraceEvent;
+
+ procedure SetDriverDirectory(const Value: string);
+
+ function GetDrivers(Index: integer): IDADriver;
+ function GetDriverCount: integer;
+ function GetDriverInfo(Index: integer): TDADriverInfo;
+ procedure SetAutoLoad(const Value: boolean);
+
+ protected
+ procedure Loaded; override;
+ procedure LoadStaticDrivers; virtual;
+ procedure UnloadDriver(anIndex: integer; aForceUnloadForStaticDriver: boolean); overload;
+ procedure UnloadAllDrivers(aForceUnloadForStaticDriver: boolean); overload;
+
+ //procedure HandleDriverError(anErrorCode : integer; const anErrorMessage : string); dynamic;
+
+ procedure SetTraceActive(const Value: boolean);
+ procedure SetTraceFlags(const Value: TDATraceOptions);
+
+ public
+ constructor Create(aOwner: TComponent); override;
+ destructor Destroy; override;
+
+ // IDADriverManager
+ procedure LoadDriver(const aFileName: string);
+ procedure UnloadDriver(anIndex: integer); overload;
+
+ procedure LoadDrivers;overload;
+ procedure LoadDrivers(const aDriverList: IROStrings; aIgnoreDuplicates: boolean = false; aIgnoreErrors: boolean = false);overload;
+ procedure UnloadAllDrivers; overload;
+
+ function ListDrivers(const aDirectory: string; out FileNames: IROStrings): integer;
+
+ function FindDriver(const aDriverID: string; out Driver: IDADriver): boolean;
+ function FindDriverIndex(const aDriverID: string): integer;
+
+ function DriverByDriverID(const aDriverID: string): IDADriver;
+
+ property Drivers[Index: integer]: IDADriver read GetDrivers; default;
+ property DriverInfo[Index: integer]: TDADriverInfo read GetDriverInfo;
+ property DriverCount: integer read GetDriverCount;
+
+ published
+ property DriverDirectory: string read fDriverDirectory write SetDriverDirectory;
+ property AutoLoad: boolean read fAutoLoad write SetAutoLoad default false;
+ property OnDriverLoaded: TDADriverLoadNotification read fOnDriverLoaded write fOnDriverLoaded;
+ property OnDriverUnloaded: TDADriverLoadNotification read fOnDriverUnloaded write fOnDriverUnloaded;
+
+ property TraceActive: boolean read fTraceActive write SetTraceActive;
+ property TraceFlags: TDATraceOptions read fTraceFlags write SetTraceFlags;
+ property OnTraceEvent: TDALogTraceEvent read fOnTraceEvent write fOnTraceEvent;
+ end;
+
+function DriverManager: TDADriverManager;
+
+procedure RegisterDriverProc(aDriverProc: TDAGetDriverObject);
+procedure UnregisterDriverProc(aDriverProc: TDAGetDriverObject);
+
+implementation
+
+uses
+ {$IFDEF MSWINDOWS}Windows, {$ENDIF}SysUtils,
+ {$IFDEF FPC}dynlibs,{$ENDIF}
+ uDAUtils, uDARes;
+
+var
+ _DriverManager: TDADriverManager;
+ _DriverProcs: TList;
+
+function DriverManager: TDADriverManager;
+begin
+ if (_DriverManager = nil) then RaiseError(err_DriverManagerNotAssigned);
+
+ result := _DriverManager;
+end;
+
+procedure RegisterDriverProc(aDriverProc: TDAGetDriverObject);
+var
+ p: pointer;
+begin
+ p := @aDriverProc;
+ if (_DriverProcs.IndexOf(p) >= 0) then RaiseError(err_DriverProcAlreadyRegistered, [{$IFDEF cpu64}UINT64{$ELSE}integer{$ENDIF}(p)]);
+
+ _DriverProcs.Add(p);
+end;
+
+procedure UnregisterDriverProc(aDriverProc: TDAGetDriverObject);
+var
+ idx: integer;
+begin
+ idx := _DriverProcs.IndexOf(@aDriverProc);
+ if (idx >= 0) then _DriverProcs.Delete(idx);
+end;
+
+{ TDADriverManager }
+
+constructor TDADriverManager.Create(aOwner: TComponent);
+begin
+ inherited;
+
+ // Cannot create multiple Driver Managers
+ if not (csDesigning in ComponentState) then begin
+ Check(_DriverManager <> nil, err_DriverManagerAlreadyCreated);
+ _DriverManager := Self;
+ end;
+
+ fAutoLoad := FALSE;
+ fDriverDirectory := alias_System;
+ fDrivers := TList.Create;
+
+ if not (csDesigning in ComponentState) then begin
+ LoadStaticDrivers;
+ end;
+end;
+
+destructor TDADriverManager.Destroy;
+begin
+ if (_DriverManager = Self) then _DriverManager := nil;
+
+ if (fDrivers <> nil) then begin // In case of the multplie driver exception
+ UnloadAllDrivers(true);
+ fDrivers.Free;
+ end;
+
+ inherited;
+end;
+
+function TDADriverManager.ListDrivers(const aDirectory: string; out FileNames: IROStrings): integer;
+var
+ actualdir: string;
+ dir: TSearchRec;
+begin
+ result := 0;
+ FileNames := TROStrings.Create;
+
+ if (aDirectory = '') then
+ actualdir := DriverDirectory
+ else
+ actualdir := IncludeTrailingPathDelimiter(aDirectory);
+
+ actualdir := TranslateFileName(actualdir);
+
+ // If no path is specified looks in the Windows\System32 directory
+ {if (Length(actualdir)<=1)
+ then actualdir := IncludeTrailingPathDelimiter(GetSystemDir);}
+
+ if (FindFirst(actualdir + drv_AllDrivers, faAnyFile, dir) = 0) then begin
+ repeat
+ if (dir.Attr and faDirectory) <> faDirectory then begin
+ Inc(result);
+ FileNames.Add(ExpandFileName(actualdir + dir.Name));
+ end;
+ until (FindNext(dir) <> 0);
+ SysUtils.FindClose(dir);
+ end;
+end;
+
+function TDADriverManager.FindDriver(const aDriverID: string; out Driver: IDADriver): boolean;
+var
+ i: integer;
+begin
+ result := FALSE;
+ Driver := nil;
+
+ for i := 0 to (DriverCount - 1) do
+ if SameText(Drivers[i].DriverID, aDriverID) then begin
+ Driver := Drivers[i];
+ result := TRUE;
+ Exit;
+ end;
+end;
+
+function TDADriverManager.FindDriverIndex(const aDriverID:string):integer;
+var
+ i: integer;
+begin
+ result := -1;
+ for i := 0 to (DriverCount - 1) do
+ if SameText(Drivers[i].DriverID, aDriverID) then begin
+ result := i;
+ Exit;
+ end;
+end;
+
+procedure TDADriverManager.LoadStaticDrivers;
+var
+ i: integer;
+ driver: PDADriverInfo;
+ drv: IDADriver;
+begin
+ driver := nil;
+
+ for i := 0 to (_DriverProcs.Count - 1) do try
+ New(driver);
+
+ driver^.GetDriverObjectFunc := _DriverProcs[i];
+ driver^.FileName := '';
+ driver^.Handle := 0;
+ driver^.Driver := driver^.GetDriverObjectFunc;
+
+ Check(FindDriver(driver^.Driver.DriverID, drv), err_DriverAlreadyLoaded, [driver^.Driver.DriverID]); // Checks this driver's not already loaded
+
+ driver^.Driver.Initialize; //(HandleDriverError); // Calls the initialization routine for the DLL
+
+ fDrivers.Add(driver);
+
+ if Assigned(OnDriverLoaded) then OnDriverLoaded(driver^);
+
+ driver := nil;
+ except
+ if (driver <> nil) then begin
+ if (fDrivers.IndexOf(driver) > 0) then fDrivers.Delete(fDrivers.IndexOf(driver));
+
+ Dispose(driver);
+ end;
+
+ raise;
+ end;
+end;
+
+{$IFDEF DataAbstract_SchemaModeler}
+{$INCLUDE DataAbstract_SchemaModelerOnly.inc}
+{$ENDIF DataAbstract_SchemaModeler}
+
+const function_AuthorizeSchemaModeler = 'AuthorizeSchemaModeler';
+
+procedure TDADriverManager.LoadDriver(const aFileName: string);
+var
+ lHandle: cardinal;
+ driver: PDADriverInfo;
+ ptr: pointer;
+ drv: IDADriver;
+ fname: string;
+ alreadyloaded: boolean;
+begin
+ fname := aFileName;
+
+ if not IsMemoryManagerSet then
+ raise Exception.Create(err_NeedShareMem);
+
+ New(driver);
+ try
+ driver^.FileName := aFileName;
+ pointer(driver^.Driver) := nil;
+ driver^.Handle := 0;
+ driver^.Handle := LoadLibrary(PChar(fname));
+
+ Check(driver^.Handle = 0, err_LoadPackageFailed, [fname]); // Checks LoadLibrary's ok
+
+ {$IFDEF DataAbstract_SchemaModeler}
+ ptr := GetProcAddress(driver^.Handle, function_AuthorizeSchemaModeler);
+ if Assigned(ptr) then begin
+ TAuthorizeSchemaModeler(ptr)(AuthorizeSchemaModelerKey);
+ end;
+ {$ENDIF DataAbstract_SchemaModeler}
+
+ ptr := GetProcAddress(driver^.Handle, func_GetDriverObject);
+ Check(ptr = nil, err_InvalidDLL, [fname]); // Checks the DLL exports the required function
+
+ @driver^.GetDriverObjectFunc := ptr;
+ drv := driver.GetDriverObjectFunc();
+ driver^.Driver := drv;
+ drv := nil;
+ { We need a local variable, because else the driver pointer will remain on the
+ stack with a refcount, and Release'd on the "end;".not good, if the .dad is
+ unloaded by then. }
+
+ if not Assigned(driver^.Driver) then begin
+ if GetProcAddress(driver^.Handle, function_AuthorizeSchemaModeler) <> nil then begin
+ RaiseError('Driver %s may only be used inside the Schema Modeler',[fname],EDASchemaModelerOnly);
+ end
+ else begin
+ RaiseError(err_InvalidDriverReference, [fname]);
+ end;
+ end;
+
+ Check(driver^.Driver = nil, err_InvalidDriverReference, [fname]); // Checks the reference to the driver is ok
+
+ alreadyloaded := FindDriver(driver^.Driver.DriverID, drv);
+ Check(alreadyloaded, err_DriverAlreadyLoaded, [driver^.Driver.DriverID], EDADriverAlreadyLoaded); // Checks this driver's not already loaded
+ drv := nil;
+
+ driver^.Driver.Initialize; //(HandleDriverError); // Calls the initialization routine for the DLL
+
+ fDrivers.Add(driver);
+
+ if Assigned(fOnDriverLoaded) then fOnDriverLoaded(driver^);
+ except
+ lHandle := driver^.Handle;
+ driver^.Driver := nil;
+ Dispose(driver);
+ if (lHandle <> 0) then FreeLibrary(lHandle);
+ raise;
+ end;
+end;
+
+procedure TDADriverManager.UnloadDriver(anIndex: integer; aForceUnloadForStaticDriver: boolean);
+var
+ driver: PDADriverInfo;
+begin
+
+ driver := fDrivers[anIndex];
+ if (driver^.Handle = 0) and not aForceUnloadForStaticDriver then Exit;
+
+ try
+ fDrivers.Delete(anIndex);
+
+ driver^.Driver.Finalize; // Calls the finalization routine for the DLL
+ driver^.Driver := nil;
+
+ if (driver^.Handle <> 0) then FreeLibrary(driver^.Handle);
+
+ if Assigned(OnDriverUnloaded) then OnDriverUnloaded(driver^);
+ finally
+ Dispose(driver);
+ end;
+end;
+
+procedure TDADriverManager.UnloadDriver(anIndex: integer);
+begin
+ UnloadDriver(anIndex, false);
+end;
+
+function TDADriverManager.GetDriverCount: integer;
+begin
+ result := fDrivers.Count
+end;
+
+function TDADriverManager.GetDrivers(Index: integer): IDADriver;
+begin
+ result := PDADriverInfo(fDrivers[Index])^.Driver
+end;
+
+procedure TDADriverManager.LoadDrivers;
+var
+ DriverList:IROStrings;
+begin
+ ListDrivers(DriverDirectory,DriverList);
+ LoadDrivers(DriverList,True);
+end;
+
+procedure TDADriverManager.LoadDrivers(const aDriverList: IROStrings; aIgnoreDuplicates: boolean = false; aIgnoreErrors: boolean = false);
+var
+ i: integer;
+begin
+ for i := 0 to (aDriverList.Count - 1) do try
+ LoadDriver(aDriverList[i]);
+ except
+ on E: EDADriverAlreadyLoaded do begin
+ if not aIgnoreDuplicates then raise;
+ end
+ else begin
+ if not aIgnoreErrors then raise;
+ end;
+ end;
+end;
+
+procedure TDADriverManager.UnloadAllDrivers(aForceUnloadForStaticDriver: boolean);
+var
+ i: integer;
+begin
+ for i := DriverCount - 1 downto 0 do
+ UnloadDriver(i, aForceUnloadForStaticDriver);
+end;
+
+procedure TDADriverManager.UnloadAllDrivers;
+begin
+ UnloadAllDrivers(false);
+end;
+
+function TDADriverManager.DriverByDriverID(const aDriverID: string): IDADriver;
+begin
+ Check(not FindDriver(aDriverID, result), err_UnknownDriver, [aDriverID]);
+end;
+
+procedure TDADriverManager.SetDriverDirectory(const Value: string);
+begin
+ fDriverDirectory := Trim(Value);
+ if (fDriverDirectory <> '') then
+ fDriverDirectory := IncludeTrailingPathDelimiter(fDriverDirectory)
+end;
+
+function TDADriverManager.GetDriverInfo(Index: integer): TDADriverInfo;
+begin
+ result := PDADriverInfo(fDrivers[Index])^
+end;
+
+procedure TDADriverManager.SetAutoLoad(const Value: boolean);
+var
+ sl: IROStrings;
+begin
+ if (csLoading in ComponentState) then
+ fLoadingAutoLoad := Value
+ else begin
+ //if (Value=fAutoLoad) then Exit; // Prevents a strange double set done by the IDE....
+
+ //if not Value and (DriverCount>0) then UnloadAllDrivers;
+
+ fAutoLoad := Value;
+
+ if fAutoLoad and not (csDesigning in ComponentState) then begin
+ sl := TROStrings.Create;
+ ListDrivers('', sl);
+ if sl.Count > 0 then begin
+ LoadDrivers(sl);
+ end;
+ end;
+ end;
+end;
+
+procedure TDADriverManager.Loaded;
+begin
+ inherited;
+
+ AutoLoad := fLoadingAutoLoad;
+ TraceActive := fStreamedTraceActive;
+end;
+
+procedure TDADriverManager.SetTraceActive(const Value: boolean);
+var
+ i: integer;
+begin
+ if (Value = fTraceActive) then Exit;
+
+ if (csLoading in ComponentState) then
+ fStreamedTraceActive := Value
+ else begin
+ fTraceActive := Value;
+
+ for i := 0 to (DriverCount - 1) do
+ Drivers[i].SetTraceOptions(Value, TraceFlags, OnTraceEvent);
+ end;
+end;
+
+procedure TDADriverManager.SetTraceFlags(const Value: TDATraceOptions);
+begin
+ fTraceFlags := Value;
+end;
+
+
+initialization
+ _DriverManager := nil;
+ _DriverProcs := TList.Create;
+
+finalization
+ _DriverProcs.Free;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDAElevateDBInterfaces.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAElevateDBInterfaces.pas
new file mode 100644
index 0000000..cebde4a
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAElevateDBInterfaces.pas
@@ -0,0 +1,631 @@
+unit uDAElevateDBInterfaces;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses uROClasses, uDAInterfaces, uDAEngine;
+
+type
+ IDAElevateConnection = interface(IDAConnection)
+ ['{30A997EA-0EBE-41D0-AD13-521DEFCDFE0D}']
+ end;
+
+ TDAElevateDBDriver = class(TDAEDriver)
+ protected
+ function GetDefaultConnectionType(const AuxDriver: string): string; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ end;
+
+ TDAElevateDBConnection = class(TDAEConnection, IDAConnection, IDAElevateConnection, IDADirectoryBasedDatabase)
+ protected
+ Procedure CheckConnected;
+ procedure DoGetTableNames(out List: IROStrings); override;
+ procedure DoGetViewNames(out List: IROStrings); override;
+ procedure DoGetStoredProcedureNames(out List: IROStrings); override;
+ procedure DoGetForeignKeys(out ForeignKeys: TDADriverForeignKeyCollection); override;
+ procedure DoGetTableFields(const aTableName: string; out Fields: TDAFieldCollection); override;
+ function GetSPSelectSyntax(HasArguments: Boolean): string; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function IdentifierNeedsQuoting(const iIdentifier: string): boolean; override; safecall;
+ end;
+
+const
+ ElevateDB_DriverType = 'ElevateDB';
+ ElevateDB_ConfigDBName = 'Configuration';
+
+procedure ElevateDB_RegisterDatabase(Query: IDADataset; ADataBaseName: string;aPath: String);
+procedure ElevateDB_DoGetNames(Query: IDADataset; AList: IROStrings; AObjectType: TDAObjecttype);
+procedure ElevateDB_DoGetForeignKeys(Query: IDADataset; ForeignKeys: TDADriverForeignKeyCollection);
+procedure ElevateDB_DoGetTableFields(const aTableName: string; Query: IDADataset; out Fields: TDAFieldCollection);
+function ElevateDB_GetSPSelectSyntax(HasArguments: Boolean): String;
+function ElevateDB_IdentifierNeedsQuoting(const iIdentifier: string): boolean;
+
+implementation
+
+uses Classes,SysUtils;
+
+var
+ ElevateDB_reservedwords: array of string;
+
+
+procedure ElevateDB_RegisterDatabase(Query: IDADataset; ADataBaseName: string;aPath: String);
+const
+ s_SQL = 'Select Count(*) from Databases Where name = ''%s''';
+ s_DropDataBaseSQL = 'DROP DATABASE "%s" KEEP CONTENTS';
+ s_CreateDataBaseSQL = 'CREATE DATABASE "%s" PATH ''%s''';
+begin
+ try
+ Query.SQL := Format(s_SQL, [aDataBaseName]);
+ Query.Open;
+ if Query.Fields[0].AsInteger =0 then begin
+ Query.Close;
+ Query.SQL := Format(s_CreateDataBaseSQL, [aDataBaseName, aPath]);
+ Query.Execute;
+ end;
+ finally
+ Query := nil;
+ end;
+end;
+
+procedure ElevateDB_DoGetNames(Query: IDADataset; AList: IROStrings; AObjectType: TDAObjecttype);
+const
+ sDoGetTableNames = 'SELECT Name FROM Information.Tables';
+ sDoGetViewNames = 'SELECT Name FROM Information.Views';
+ sDoGetProcedures = 'SELECT Name FROM Information.Procedures';
+begin
+ try
+ case AObjectType of
+ dotTable: Query.SQL := sDoGetTableNames;
+ dotView: Query.SQL := sDoGetViewNames;
+ dotProcedure: Query.SQL := sDoGetProcedures;
+ end;
+ Query.Open;
+ while not Query.Eof do begin
+ Alist.Add(Query.Fields[0].AsString);
+ Query.Next;
+ end;
+ finally
+ Query := nil;
+ end;
+end;
+
+procedure ElevateDB_DoGetForeignKeys(Query: IDADataset; ForeignKeys: TDADriverForeignKeyCollection);
+const
+ sFK_SQL = 'Select c.tablename,c.name, c.targettable, cc.columnname '+
+ 'from Information.Constraints as c '+
+ 'join Information.ConstraintColumns as cc on ((c.tablename = cc.tablename) and (cc.constraintname = c.EnforcingIndex)) '+
+ 'where c.type = ''foreign key''';
+ sPK_SQL = 'Select c.tablename,c.name, c.targettable, cc.columnname '+
+ 'from Information.Constraints as c '+
+ 'join Information.ConstraintColumns as cc on ((c.Targettable = cc.tablename) and (cc.constraintname = c.TargetTableConstraint)) '+
+ 'where c.type = ''foreign key''';
+var
+ lCurrConstraint : string;
+ lCurrFK : TDADriverForeignKey;
+ lList: TStringList;
+ i: integer;
+begin
+ lList:=TstringList.Create;
+ try
+ Query.SQL := sFK_SQL;
+ Query.Open;
+
+ lCurrConstraint := '';
+ lCurrFK := nil;
+ ForeignKeys.Clear;
+ while (not Query.EOF) do begin
+ if lCurrConstraint <> Query.Fields[0].AsString + '.' + Query.Fields[1].AsString then begin
+ lCurrConstraint := Query.Fields[0].AsString + '.' + Query.Fields[1].AsString;
+ lCurrFK := ForeignKeys.Add();
+ lList.AddObject(lCurrConstraint,lCurrFK);
+ with lCurrFK do begin
+ Name:=lCurrConstraint;
+ PKTable := TrimRight(Query.Fields[2].AsString);
+ FKTable := TrimRight(Query.Fields[0].AsString);
+ // PKField := TrimRight(Query.Fields[2].AsString);
+ FKField := TrimRight(Query.Fields[3].AsString);
+ end;
+ end else begin
+ with lCurrFK do begin
+ // PKField := PKField + ';' + TrimRight(Query.Fields[2].AsString);
+ FKField := FKField + ';' + TrimRight(Query.Fields[3].AsString);
+ end;
+ end;
+ Query.Next;
+ end;
+ Llist.Sorted:=True;
+ Query.close;
+ Query.SQL := sPK_SQL;
+ Query.Open;
+ while (not Query.EOF) do begin
+ lCurrConstraint := Query.Fields[0].AsString + '.' + Query.Fields[1].AsString;
+ i:= lList.IndexOf(lCurrConstraint);
+ if i <> -1 then begin
+ lCurrFK:= TDADriverForeignKey(lList.Objects[i]);
+ if lCurrFK.PKField = '' then
+ lCurrFK.PKField := TrimRight(Query.Fields[3].AsString)
+ else
+ lCurrFK.PKField := lCurrFK.PKField + ';' +TrimRight(Query.Fields[3].AsString);
+ end;
+ Query.Next;
+ end;
+ finally
+ Query := nil;
+ LList.Free;
+ end;
+end;
+
+procedure ElevateDB_DoGetTableFields(const aTableName: string; Query: IDADataset; out Fields: TDAFieldCollection);
+const
+ s_sql = 'SELECT tc.Name, tc.Nullable, tc.Identity, cc.ColumnName, tc.scale FROM Information.TableColumns as tc '+
+ 'LEFT JOIN Information.Constraints AS c ON ((c.TableName = tc.TableName) and (c.Type = ''Primary Key'')) '+
+ 'LEFT JOIN Information.ConstraintColumns as cc on ((c.tablename = cc.tablename) and (cc.constraintname = c.EnforcingIndex) and (cc.ColumnName = tc.Name)) '+
+ 'WHERE tc.TableName = ';
+var
+ fld: TDAField;
+begin
+ Fields := TDAFieldCollection.Create(nil);
+ try
+ Query.SQL := 'SELECT * FROM ' + aTableName +' WHERE 1=0';
+ Query.Open;
+ Fields.Assign(Query.Fields);
+ Query.Close;
+ Query.SQL := s_SQL+ '''' + aTableName+'''';
+ Query.Open;
+ While not Query.Eof do begin
+ fld := Fields.FindField(Trim(Query.Fields[0].AsString));
+ if Fld <> nil then begin
+ Fld.Required:=Query.Fields[1].AsBoolean;
+ if not Query.Fields[2].IsNull and Query.Fields[2].AsBoolean then begin
+ if fld.DataType = datInteger then fld.DataType := datAutoInc;
+ if fld.DataType = datLargeInt then fld.DataType := datLargeAutoInc;
+ end;
+ if not Query.Fields[3].IsNull then fld.InPrimaryKey:=True;
+ if fld.DataType = datDecimal then begin
+ fld.DecimalPrecision:=20;
+ fld.DecimalScale:=Query.Fields[4].AsInteger;
+ end;
+ end;
+ Query.Next;
+ end;
+ finally
+ Query:=nil;
+ end;
+end;
+
+function ElevateDB_GetSPSelectSyntax(HasArguments: Boolean): String;
+begin
+ if HasArguments then
+ Result:='CALL {0} ({1})'
+ else
+ Result:='CALL {0} ()';
+end;
+
+function ElevateDB_IdentifierNeedsQuoting(const iIdentifier: string): boolean;
+begin
+ Result := TestIdentifier(iIdentifier, ElevateDB_reservedwords);
+end;
+
+{ TDAElevateDBDriver }
+
+function TDAElevateDBDriver.GetDefaultConnectionType(
+ const AuxDriver: string): string;
+begin
+ Result:= ElevateDB_DriverType;
+end;
+
+
+{ TDAElevateDBConnection }
+
+procedure TDAElevateDBConnection.CheckConnected;
+begin
+ if not GetConnected then SetConnected(True);
+end;
+
+procedure TDAElevateDBConnection.DoGetForeignKeys(
+ out ForeignKeys: TDADriverForeignKeyCollection);
+begin
+ CheckConnected;
+ inherited;
+ ElevateDB_DoGetForeignKeys(GetDatasetClass.Create(Self),ForeignKeys);
+end;
+
+procedure TDAElevateDBConnection.DoGetStoredProcedureNames(
+ out List: IROStrings);
+begin
+ CheckConnected;
+ inherited;
+ ElevateDB_DoGetNames(GetDatasetClass.Create(Self),List,dotProcedure);
+end;
+
+procedure TDAElevateDBConnection.DoGetTableFields(const aTableName: string;
+ out Fields: TDAFieldCollection);
+begin
+ CheckConnected;
+ ElevateDB_DoGetTableFields(QuoteIdentifierIfNeeded(aTableName),GetDatasetClass.Create(Self),Fields);
+end;
+
+procedure TDAElevateDBConnection.DoGetTableNames(out List: IROStrings);
+begin
+ CheckConnected;
+ inherited;
+ ElevateDB_DoGetNames(GetDatasetClass.Create(Self),List,dotTable);
+end;
+
+procedure TDAElevateDBConnection.DoGetViewNames(out List: IROStrings);
+begin
+ CheckConnected;
+ inherited;
+ ElevateDB_DoGetNames(GetDatasetClass.Create(Self),List,dotView);
+end;
+
+function TDAElevateDBConnection.GetSPSelectSyntax(
+ HasArguments: Boolean): string;
+begin
+ Result := ElevateDB_GetSPSelectSyntax(HasArguments);
+end;
+
+procedure ElevateDB_InitializeReservedWords;
+begin
+ SetLength(ElevateDB_reservedwords, 335);
+ // sorted with TStringList.Sort (bds2007)
+ ElevateDB_reservedwords[0] := 'ABS';
+ ElevateDB_reservedwords[1] := 'ABSOLUTE';
+ ElevateDB_reservedwords[2] := 'ACOS';
+ ElevateDB_reservedwords[3] := 'ACTION';
+ ElevateDB_reservedwords[4] := 'ADD';
+ ElevateDB_reservedwords[5] := 'AFTER';
+ ElevateDB_reservedwords[6] := 'ALL';
+ ElevateDB_reservedwords[7] := 'ALLTRIM';
+ ElevateDB_reservedwords[8] := 'ALTER';
+ ElevateDB_reservedwords[9] := 'ALWAYS';
+ ElevateDB_reservedwords[10] := 'AM';
+ ElevateDB_reservedwords[11] := 'AND';
+ ElevateDB_reservedwords[12] := 'AS';
+ ElevateDB_reservedwords[13] := 'ASC';
+ ElevateDB_reservedwords[14] := 'ASCENDING';
+ ElevateDB_reservedwords[15] := 'ASENSITIVE';
+ ElevateDB_reservedwords[16] := 'ASIN';
+ ElevateDB_reservedwords[17] := 'AT';
+ ElevateDB_reservedwords[18] := 'ATAN';
+ ElevateDB_reservedwords[19] := 'ATAN2';
+ ElevateDB_reservedwords[20] := 'AVG';
+ ElevateDB_reservedwords[21] := 'BACKUP';
+ ElevateDB_reservedwords[22] := 'BACKUPS';
+ ElevateDB_reservedwords[23] := 'BEFORE';
+ ElevateDB_reservedwords[24] := 'BEGIN';
+ ElevateDB_reservedwords[25] := 'BETWEEN';
+ ElevateDB_reservedwords[26] := 'BIGINT';
+ ElevateDB_reservedwords[27] := 'BINARY';
+ ElevateDB_reservedwords[28] := 'BLOB';
+ ElevateDB_reservedwords[29] := 'BLOCK';
+ ElevateDB_reservedwords[30] := 'BOF';
+ ElevateDB_reservedwords[31] := 'BOOL';
+ ElevateDB_reservedwords[32] := 'BOOLEAN';
+ ElevateDB_reservedwords[33] := 'BOTH';
+ ElevateDB_reservedwords[34] := 'BUFFER';
+ ElevateDB_reservedwords[35] := 'BY';
+ ElevateDB_reservedwords[36] := 'BYTE';
+ ElevateDB_reservedwords[37] := 'CALL';
+ ElevateDB_reservedwords[38] := 'CASCADE';
+ ElevateDB_reservedwords[39] := 'CASE';
+ ElevateDB_reservedwords[40] := 'CAST';
+ ElevateDB_reservedwords[41] := 'CATALOG';
+ ElevateDB_reservedwords[42] := 'CATEGORY';
+ ElevateDB_reservedwords[43] := 'CEIL';
+ ElevateDB_reservedwords[44] := 'CEILING';
+ ElevateDB_reservedwords[45] := 'CHAR';
+ ElevateDB_reservedwords[46] := 'CHAR_LENGTH';
+ ElevateDB_reservedwords[47] := 'CHARACTER';
+ ElevateDB_reservedwords[48] := 'CHARACTER_LENGTH';
+ ElevateDB_reservedwords[49] := 'CHECK';
+ ElevateDB_reservedwords[50] := 'CLOB';
+ ElevateDB_reservedwords[51] := 'CLOSE';
+ ElevateDB_reservedwords[52] := 'COALESCE';
+ ElevateDB_reservedwords[53] := 'CODE';
+ ElevateDB_reservedwords[54] := 'COLLATE';
+ ElevateDB_reservedwords[55] := 'COLUMN';
+ ElevateDB_reservedwords[56] := 'COLUMNS';
+ ElevateDB_reservedwords[57] := 'COMMIT';
+ ElevateDB_reservedwords[58] := 'COMPRESSION';
+ ElevateDB_reservedwords[59] := 'COMPUTED';
+ ElevateDB_reservedwords[60] := 'CONCAT';
+ ElevateDB_reservedwords[61] := 'CONSTRAINT';
+ ElevateDB_reservedwords[62] := 'CONSTRAINTS';
+ ElevateDB_reservedwords[63] := 'CONTAIN';
+ ElevateDB_reservedwords[64] := 'CONTAINS';
+ ElevateDB_reservedwords[65] := 'CONTENTS';
+ ElevateDB_reservedwords[66] := 'COS';
+ ElevateDB_reservedwords[67] := 'COT';
+ ElevateDB_reservedwords[68] := 'COUNT';
+ ElevateDB_reservedwords[69] := 'CREATE';
+ ElevateDB_reservedwords[70] := 'CURRENT';
+ ElevateDB_reservedwords[71] := 'CURRENT_DATE';
+ ElevateDB_reservedwords[72] := 'CURRENT_GUID';
+ ElevateDB_reservedwords[73] := 'CURRENT_TIME';
+ ElevateDB_reservedwords[74] := 'CURRENT_TIMESTAMP';
+ ElevateDB_reservedwords[75] := 'CURRENT_USER';
+ ElevateDB_reservedwords[76] := 'CURSOR';
+ ElevateDB_reservedwords[77] := 'CURSOR_SENSITIVITY';
+ ElevateDB_reservedwords[78] := 'DAILY';
+ ElevateDB_reservedwords[79] := 'DATA';
+ ElevateDB_reservedwords[80] := 'DATABASE';
+ ElevateDB_reservedwords[81] := 'DATE';
+ ElevateDB_reservedwords[82] := 'DAY';
+ ElevateDB_reservedwords[83] := 'DAYOFWEEK';
+ ElevateDB_reservedwords[84] := 'DAYOFYEAR';
+ ElevateDB_reservedwords[85] := 'DAYS';
+ ElevateDB_reservedwords[86] := 'DECIMAL';
+ ElevateDB_reservedwords[87] := 'DECLARE';
+ ElevateDB_reservedwords[88] := 'DEFAULT';
+ ElevateDB_reservedwords[89] := 'DEFAULTS';
+ ElevateDB_reservedwords[90] := 'DEGREES';
+ ElevateDB_reservedwords[91] := 'DELETE';
+ ElevateDB_reservedwords[92] := 'DELIMITER';
+ ElevateDB_reservedwords[93] := 'DESC';
+ ElevateDB_reservedwords[94] := 'DESCENDING';
+ ElevateDB_reservedwords[95] := 'DESCRIPTION';
+ ElevateDB_reservedwords[96] := 'DISCONNECT';
+ ElevateDB_reservedwords[97] := 'DISTINCT';
+ ElevateDB_reservedwords[98] := 'DO';
+ ElevateDB_reservedwords[99] := 'DOES';
+ ElevateDB_reservedwords[100] := 'DOUBLE';
+ ElevateDB_reservedwords[101] := 'DROP';
+ ElevateDB_reservedwords[102] := 'ELSE';
+ ElevateDB_reservedwords[103] := 'ELSEIF';
+ ElevateDB_reservedwords[104] := 'EMPTY';
+ ElevateDB_reservedwords[105] := 'ENCRYPTED';
+ ElevateDB_reservedwords[106] := 'END';
+ ElevateDB_reservedwords[107] := 'EOF';
+ ElevateDB_reservedwords[108] := 'ERROR';
+ ElevateDB_reservedwords[109] := 'ERRORCODE';
+ ElevateDB_reservedwords[110] := 'ERRORMSG';
+ ElevateDB_reservedwords[111] := 'ESCAPE';
+ ElevateDB_reservedwords[112] := 'EVERY';
+ ElevateDB_reservedwords[113] := 'EXCEPT';
+ ElevateDB_reservedwords[114] := 'EXCEPTION';
+ ElevateDB_reservedwords[115] := 'EXCLUDING';
+ ElevateDB_reservedwords[116] := 'EXECUTE';
+ ElevateDB_reservedwords[117] := 'EXISTS';
+ ElevateDB_reservedwords[118] := 'EXP';
+ ElevateDB_reservedwords[119] := 'EXPORT';
+ ElevateDB_reservedwords[120] := 'EXTERNAL';
+ ElevateDB_reservedwords[121] := 'EXTRACT';
+ ElevateDB_reservedwords[122] := 'FALSE';
+ ElevateDB_reservedwords[123] := 'FETCH';
+ ElevateDB_reservedwords[124] := 'FILE';
+ ElevateDB_reservedwords[125] := 'FILTER';
+ ElevateDB_reservedwords[126] := 'FIRST';
+ ElevateDB_reservedwords[127] := 'FLOAT';
+ ElevateDB_reservedwords[128] := 'FLOOR';
+ ElevateDB_reservedwords[129] := 'FLUSH';
+ ElevateDB_reservedwords[130] := 'FOR';
+ ElevateDB_reservedwords[131] := 'FOREIGN';
+ ElevateDB_reservedwords[132] := 'FORMAT';
+ ElevateDB_reservedwords[133] := 'FOURTH';
+ ElevateDB_reservedwords[134] := 'FROM';
+ ElevateDB_reservedwords[135] := 'FULL';
+ ElevateDB_reservedwords[136] := 'FUNCTION';
+ ElevateDB_reservedwords[137] := 'GENERATED';
+ ElevateDB_reservedwords[138] := 'GENERATOR';
+ ElevateDB_reservedwords[139] := 'GRANT';
+ ElevateDB_reservedwords[140] := 'GROUP';
+ ElevateDB_reservedwords[141] := 'GUID';
+ ElevateDB_reservedwords[142] := 'HAVING';
+ ElevateDB_reservedwords[143] := 'HEADERS';
+ ElevateDB_reservedwords[144] := 'HOUR';
+ ElevateDB_reservedwords[145] := 'IDENTITY';
+ ElevateDB_reservedwords[146] := 'IF';
+ ElevateDB_reservedwords[147] := 'IFNULL';
+ ElevateDB_reservedwords[148] := 'IMMEDIATE';
+ ElevateDB_reservedwords[149] := 'IMPORT';
+ ElevateDB_reservedwords[150] := 'IN';
+ ElevateDB_reservedwords[151] := 'INCLUDE';
+ ElevateDB_reservedwords[152] := 'INCLUDING';
+ ElevateDB_reservedwords[153] := 'INCREMENT';
+ ElevateDB_reservedwords[154] := 'INDEX';
+ ElevateDB_reservedwords[155] := 'INDEXED';
+ ElevateDB_reservedwords[156] := 'INNER';
+ ElevateDB_reservedwords[157] := 'INOUT';
+ ElevateDB_reservedwords[158] := 'INSENSITIVE';
+ ElevateDB_reservedwords[159] := 'INSERT';
+ ElevateDB_reservedwords[160] := 'INT';
+ ElevateDB_reservedwords[161] := 'INTEGER';
+ ElevateDB_reservedwords[162] := 'INTERSECT';
+ ElevateDB_reservedwords[163] := 'INTERVAL';
+ ElevateDB_reservedwords[164] := 'INTO';
+ ElevateDB_reservedwords[165] := 'IS';
+ ElevateDB_reservedwords[166] := 'ITERATE';
+ ElevateDB_reservedwords[167] := 'JOB';
+ ElevateDB_reservedwords[168] := 'JOIN';
+ ElevateDB_reservedwords[169] := 'JOINOPTIMIZECOSTS';
+ ElevateDB_reservedwords[170] := 'KEEP';
+ ElevateDB_reservedwords[171] := 'KEY';
+ ElevateDB_reservedwords[172] := 'LARGE';
+ ElevateDB_reservedwords[173] := 'LAST';
+ ElevateDB_reservedwords[174] := 'LCASE';
+ ElevateDB_reservedwords[175] := 'LEADING';
+ ElevateDB_reservedwords[176] := 'LEAVE';
+ ElevateDB_reservedwords[177] := 'LEFT';
+ ElevateDB_reservedwords[178] := 'LENGTH';
+ ElevateDB_reservedwords[179] := 'LIKE';
+ ElevateDB_reservedwords[180] := 'LITERAL';
+ ElevateDB_reservedwords[181] := 'LOCK';
+ ElevateDB_reservedwords[182] := 'LOG';
+ ElevateDB_reservedwords[183] := 'LOG10';
+ ElevateDB_reservedwords[184] := 'LOOP';
+ ElevateDB_reservedwords[185] := 'LOWER';
+ ElevateDB_reservedwords[186] := 'LTRIM';
+ ElevateDB_reservedwords[187] := 'MAINTAIN';
+ ElevateDB_reservedwords[188] := 'MAX';
+ ElevateDB_reservedwords[189] := 'MEMORY';
+ ElevateDB_reservedwords[190] := 'MESSAGE';
+ ElevateDB_reservedwords[191] := 'MIGRATE';
+ ElevateDB_reservedwords[192] := 'MIGRATOR';
+ ElevateDB_reservedwords[193] := 'MIN';
+ ElevateDB_reservedwords[194] := 'MINUTE';
+ ElevateDB_reservedwords[195] := 'MOD';
+ ElevateDB_reservedwords[196] := 'MODULE';
+ ElevateDB_reservedwords[197] := 'MONTH';
+ ElevateDB_reservedwords[198] := 'MONTHLY';
+ ElevateDB_reservedwords[199] := 'MOVE';
+ ElevateDB_reservedwords[200] := 'MSECOND';
+ ElevateDB_reservedwords[201] := 'NAME';
+ ElevateDB_reservedwords[202] := 'NEXT';
+ ElevateDB_reservedwords[203] := 'NO';
+ ElevateDB_reservedwords[204] := 'NOJOINOPTIMIZE';
+ ElevateDB_reservedwords[205] := 'NONE';
+ ElevateDB_reservedwords[206] := 'NOT';
+ ElevateDB_reservedwords[207] := 'NULL';
+ ElevateDB_reservedwords[208] := 'NULLABLE';
+ ElevateDB_reservedwords[209] := 'NULLIF';
+ ElevateDB_reservedwords[210] := 'NUMERIC';
+ ElevateDB_reservedwords[211] := 'OBJECT';
+ ElevateDB_reservedwords[212] := 'OCCURS';
+ ElevateDB_reservedwords[213] := 'OF';
+ ElevateDB_reservedwords[214] := 'ON';
+ ElevateDB_reservedwords[215] := 'ONCE';
+ ElevateDB_reservedwords[216] := 'OPEN';
+ ElevateDB_reservedwords[217] := 'OPTIMIZE';
+ ElevateDB_reservedwords[218] := 'OPTION';
+ ElevateDB_reservedwords[219] := 'OR';
+ ElevateDB_reservedwords[220] := 'ORDER';
+ ElevateDB_reservedwords[221] := 'OUT';
+ ElevateDB_reservedwords[222] := 'OUTER';
+ ElevateDB_reservedwords[223] := 'PAGE';
+ ElevateDB_reservedwords[224] := 'PASSWORD';
+ ElevateDB_reservedwords[225] := 'PATH';
+ ElevateDB_reservedwords[226] := 'PI';
+ ElevateDB_reservedwords[227] := 'PM';
+ ElevateDB_reservedwords[228] := 'POS';
+ ElevateDB_reservedwords[229] := 'POSITION';
+ ElevateDB_reservedwords[230] := 'POWER';
+ ElevateDB_reservedwords[231] := 'PRECISION';
+ ElevateDB_reservedwords[232] := 'PREPARE';
+ ElevateDB_reservedwords[233] := 'PRIMARY';
+ ElevateDB_reservedwords[234] := 'PRIOR';
+ ElevateDB_reservedwords[235] := 'PRIVILEGES';
+ ElevateDB_reservedwords[236] := 'PROCEDURE';
+ ElevateDB_reservedwords[237] := 'QUOTE';
+ ElevateDB_reservedwords[238] := 'RADIANS';
+ ElevateDB_reservedwords[239] := 'RAISE';
+ ElevateDB_reservedwords[240] := 'RAND';
+ ElevateDB_reservedwords[241] := 'RANGE';
+ ElevateDB_reservedwords[242] := 'REDEFINE';
+ ElevateDB_reservedwords[243] := 'REFERENCES';
+ ElevateDB_reservedwords[244] := 'RELATIVE';
+ ElevateDB_reservedwords[245] := 'REMOVE';
+ ElevateDB_reservedwords[246] := 'REPAIR';
+ ElevateDB_reservedwords[247] := 'REPEAT';
+ ElevateDB_reservedwords[248] := 'REPLACE';
+ ElevateDB_reservedwords[249] := 'RESTORE';
+ ElevateDB_reservedwords[250] := 'RESTRICT';
+ ElevateDB_reservedwords[251] := 'RESULT';
+ ElevateDB_reservedwords[252] := 'RETURN';
+ ElevateDB_reservedwords[253] := 'RETURNS';
+ ElevateDB_reservedwords[254] := 'REVOKE';
+ ElevateDB_reservedwords[255] := 'RIGHT';
+ ElevateDB_reservedwords[256] := 'ROLE';
+ ElevateDB_reservedwords[257] := 'ROLLBACK';
+ ElevateDB_reservedwords[258] := 'ROUND';
+ ElevateDB_reservedwords[259] := 'ROW';
+ ElevateDB_reservedwords[260] := 'ROWCOUNT';
+ ElevateDB_reservedwords[261] := 'ROWS';
+ ElevateDB_reservedwords[262] := 'ROWSAFFECTED';
+ ElevateDB_reservedwords[263] := 'RTRIM';
+ ElevateDB_reservedwords[264] := 'RUN';
+ ElevateDB_reservedwords[265] := 'RUNSUM';
+ ElevateDB_reservedwords[266] := 'SECOND';
+ ElevateDB_reservedwords[267] := 'SELECT';
+ ElevateDB_reservedwords[268] := 'SENSITIVE';
+ ElevateDB_reservedwords[269] := 'SERVER';
+ ElevateDB_reservedwords[270] := 'SESSION';
+ ElevateDB_reservedwords[271] := 'SET';
+ ElevateDB_reservedwords[272] := 'SIGN';
+ ElevateDB_reservedwords[273] := 'SIN';
+ ElevateDB_reservedwords[274] := 'SIZE';
+ ElevateDB_reservedwords[275] := 'SMALLINT';
+ ElevateDB_reservedwords[276] := 'SQRT';
+ ElevateDB_reservedwords[277] := 'START';
+ ElevateDB_reservedwords[278] := 'STATEMENT';
+ ElevateDB_reservedwords[279] := 'STDDEV';
+ ElevateDB_reservedwords[280] := 'SUBSTR';
+ ElevateDB_reservedwords[281] := 'SUBSTRING';
+ ElevateDB_reservedwords[282] := 'SUM';
+ ElevateDB_reservedwords[283] := 'SUMSQUARE';
+ ElevateDB_reservedwords[284] := 'TABLE';
+ ElevateDB_reservedwords[285] := 'TABLES';
+ ElevateDB_reservedwords[286] := 'TAN';
+ ElevateDB_reservedwords[287] := 'TEMPORARY';
+ ElevateDB_reservedwords[288] := 'TEXT';
+ ElevateDB_reservedwords[289] := 'TEXTOCCURS';
+ ElevateDB_reservedwords[290] := 'TEXTSEARCH';
+ ElevateDB_reservedwords[291] := 'THEN';
+ ElevateDB_reservedwords[292] := 'THIRD';
+ ElevateDB_reservedwords[293] := 'TIME';
+ ElevateDB_reservedwords[294] := 'TIMESTAMP';
+ ElevateDB_reservedwords[295] := 'TO';
+ ElevateDB_reservedwords[296] := 'TOP';
+ ElevateDB_reservedwords[297] := 'TRAILING';
+ ElevateDB_reservedwords[298] := 'TRANSACTION';
+ ElevateDB_reservedwords[299] := 'TRIGGER';
+ ElevateDB_reservedwords[300] := 'TRIM';
+ ElevateDB_reservedwords[301] := 'TRUE';
+ ElevateDB_reservedwords[302] := 'TRUNC';
+ ElevateDB_reservedwords[303] := 'TRUNCATE';
+ ElevateDB_reservedwords[304] := 'TYPE';
+ ElevateDB_reservedwords[305] := 'UCASE';
+ ElevateDB_reservedwords[306] := 'UNENCRYPTED';
+ ElevateDB_reservedwords[307] := 'UNION';
+ ElevateDB_reservedwords[308] := 'UNIQUE';
+ ElevateDB_reservedwords[309] := 'UNPREPARE';
+ ElevateDB_reservedwords[310] := 'UNTIL';
+ ElevateDB_reservedwords[311] := 'UPDATE';
+ ElevateDB_reservedwords[312] := 'UPPER';
+ ElevateDB_reservedwords[313] := 'USE';
+ ElevateDB_reservedwords[314] := 'USER';
+ ElevateDB_reservedwords[315] := 'USING';
+ ElevateDB_reservedwords[316] := 'UTC';
+ ElevateDB_reservedwords[317] := 'VALUES';
+ ElevateDB_reservedwords[318] := 'VARBYTE';
+ ElevateDB_reservedwords[319] := 'VARCHAR';
+ ElevateDB_reservedwords[320] := 'VARYING';
+ ElevateDB_reservedwords[321] := 'VERSION';
+ ElevateDB_reservedwords[322] := 'VIEW';
+ ElevateDB_reservedwords[323] := 'WEEK';
+ ElevateDB_reservedwords[324] := 'WEEKLY';
+ ElevateDB_reservedwords[325] := 'WEEKS';
+ ElevateDB_reservedwords[326] := 'WHEN';
+ ElevateDB_reservedwords[327] := 'WHERE';
+ ElevateDB_reservedwords[328] := 'WHILE';
+ ElevateDB_reservedwords[329] := 'WINDOWS';
+ ElevateDB_reservedwords[330] := 'WITH';
+ ElevateDB_reservedwords[331] := 'WITHOUT';
+ ElevateDB_reservedwords[332] := 'WORD';
+ ElevateDB_reservedwords[333] := 'WORK';
+ ElevateDB_reservedwords[334] := 'YEAR';
+end;
+
+function TDAElevateDBConnection.IdentifierNeedsQuoting(
+ const iIdentifier: string): boolean;
+begin
+ Result:=inherited IdentifierNeedsQuoting(iIdentifier) or ElevateDB_IdentifierNeedsQuoting(iIdentifier);
+end;
+
+initialization
+ ElevateDB_InitializeReservedWords;
+finalization
+ ElevateDB_reservedwords := nil;
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDAEngine.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAEngine.pas
new file mode 100644
index 0000000..d64ef42
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAEngine.pas
@@ -0,0 +1,2874 @@
+unit uDAEngine;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+interface
+
+uses
+ Classes, DB, SysUtils,
+ {$IFDEF MSWINDOWS} ActiveX, ComObj,{$ENDIF} // for ISupportErrorInfo, EOleSysError
+ uDAInterfaces, uROClasses, uDARes, uROTypes, uDAMacros, uDAUtils;
+
+type
+ { Misc }
+ TCustomConnectionClass = class of TCustomConnection;
+ TDatasetClass = class of TDataset;
+ TDAEConnection = class;
+ TDAEDriver = class;
+
+ { Exceptions }
+ EDAException = class(EROException);
+ EDADriverException = class(EDAException);
+
+ { TDAConnectionWrapper
+ Internal wrapper class for frameworks whose connections don't inherit from TCustomConnection or require additional
+ supporting components. See IBO and DBISAM drivers for an example. This class provides an implementation for DoConnect
+ and DoDisconnect removing the need to further override them. }
+ TDAConnectionWrapper = class(TCustomConnection)
+ protected
+ procedure DoConnect; override;
+ procedure DoDisconnect; override;
+ end;
+
+ {$IFDEF MSWINDOWS}
+ TDAEngineBaseObject = class(TROInterfacedObject, ISupportErrorInfo)//, IServerExceptionHandler)
+ protected
+ function InterfaceSupportsErrorInfo(const iid: TGUID): HRESULT; stdcall;
+ procedure OnException(const ServerClass: WideString; const ExceptionClass: WideString;
+ const ErrorMessage: WideString; ExceptAddr: Integer; const ErrorIID: WideString;
+ const ProgID: WideString; var Handled: Integer; var Result: HRESULT);
+ public
+ function SafeCallException(ExceptObject: TObject; ExceptAddr: Pointer): HResult; override;
+ end;
+ {$ELSE}
+ TDAEngineBaseObject = TROInterfacedObject;
+ {$ENDIF}
+
+
+ { TDASQLMacroProcessor }
+ TDASQLMacroProcessor = class(TROMacroParser)
+ private
+ fStoredProcedurePrefix,
+ fDateFormat,
+ fStoredProcParamPrefix,
+ fDateTimeFormat: string;
+ fDoubleQuoteStrings: boolean;
+ function MyUnknownIdentifier(Sender: TObject; const Name, OrgName: string; var Value: string): Boolean;
+ protected
+ // Internal
+ procedure RegisterMacros; virtual;
+
+ // SQL Functions
+ function DateTime(Sender: TObject; const Parameters: array of string): string; virtual; abstract;
+ function Date(Sender: TObject; const Parameters: array of string): string; virtual;
+
+ function AddTime(Sender: TObject; const Parameters: array of string): string; virtual; abstract;
+
+ function FormatDateTime(Sender: TObject; const Parameters: array of string): string; virtual;
+ function FormatDate(Sender: TObject; const Parameters: array of string): string; virtual;
+
+ function Length(Sender: TObject; const Parameters: array of string): string; virtual; abstract;
+ function LowerCase(Sender: TObject; const Parameters: array of string): string; virtual; abstract;
+ function UpperCase(Sender: TObject; const Parameters: array of string): string; virtual; abstract;
+ function TrimLeft(Sender: TObject; const Parameters: array of string): string; virtual; abstract;
+ function TrimRight(Sender: TObject; const Parameters: array of string): string; virtual; abstract;
+ function Copy(Sender: TObject; const Parameters: array of string): string; virtual; abstract;
+ function Nolock(Sender: TObject; const Parameters: array of string): string; virtual;abstract;
+ public
+ constructor Create(const aDateFormat, aDateTimeFormat: string;
+ aDoubleQuoteStrings: boolean;
+ const aStoredProcParamsPrefix: string = '');overload;
+ constructor Create;overload;
+
+ property StoredProcedurePrefix: string read fStoredProcedurePrefix;
+ property DateFormat: string read fDateFormat;
+ property StoredProcParamPrefix: string read fStoredProcParamPrefix;
+ property DateTimeFormat: string read fDateTimeFormat;
+ property DoubleQuoteStrings: boolean read fDoubleQuoteStrings;
+ end;
+
+ IDAHasMacroProcessor = interface(IDAConnection)
+ ['{C18B417F-C698-4BB1-8F57-C3952E1046D1}']
+ function GetMacroProcessor: TDASQLMacroProcessor;
+ end;
+
+ IDANativeDatabaseAccess = interface
+ ['{0AC0565B-9500-4A90-B55D-25CB04568F9B}']
+ procedure ClearFieldDefs;
+ function GetRecordCount: Integer;
+ function GetBOF:Boolean;
+ function GetEOF:Boolean;
+ function GetActive:Boolean;
+ procedure SetActive(const aValue: Boolean);
+ procedure Next;
+ function Locate(const KeyFields: string; const KeyValues: Variant; Options: TLocateOptions): Boolean;
+ function Lookup(const KeyFields: string; const KeyValues: Variant; const ResultFields: string): Variant;
+ function GetFieldName(Index: Integer): string;
+ procedure DisableControls;
+ procedure EnableControls;
+ function ControlsDisabled: Boolean;
+ function GetIsEmpty: boolean;
+ procedure FreeBookmark(Bookmark: TBookmark);
+ function GetBookMark: pointer;
+ procedure GotoBookmark(Bookmark: TBookmark);
+ function GetState: TDatasetState;
+ procedure Prepare(const AValue: Boolean);
+ function GetFields(Index: integer): IDANativeField;
+ function FieldCount: Integer;
+ function FindField(const FieldName: string): IDANativeField;
+ function IsTDatasetCompatible: Boolean;
+ property Active: Boolean read GetActive write SetActive;
+ function GetNativeFieldData(Index: Integer; var Data: pointer; var DataSize: cardinal):Boolean;
+ function GetNativeFieldValue(Index: Integer): Variant;
+ function CanFreeNativeFieldData: Boolean;
+ end;
+
+ TDANativeField_Dataset = class(TInterfacedObject, IDANativeField)
+ private
+ fField: TField;
+ protected
+ function GetNativeObject: TObject;
+ function isTFieldCompatible: Boolean;
+ function GetFieldName: string;
+ function GetDataType: TFieldType;
+ function GetSize: integer;
+ function GetDecimalPrecision: Integer;
+ procedure SetDecimalPrecision(Value: integer);
+ function GetDecimalScale: Integer;
+ procedure SetDecimalScale(Value: integer);
+ procedure SetDataType(Value: TFieldType);
+ public
+ constructor Create(AField: TField);
+ end;
+
+ TDANativeDatabaseAccess_Dataset = class(TInterfacedObject,IDANativeDatabaseAccess)
+ private
+ FDataset: TDataSet;
+ fList: TInterfaceList;
+ protected
+ procedure ClearFieldDefs;
+ function GetRecordCount: Integer;
+ function GetBOF:Boolean;
+ function GetEOF:Boolean;
+ function GetActive:Boolean;
+ procedure SetActive(const aValue: Boolean);
+ procedure Next;
+ function Locate(const KeyFields: string; const KeyValues: Variant; Options: TLocateOptions): Boolean;
+ function Lookup(const KeyFields: string; const KeyValues: Variant; const ResultFields: string): Variant;
+ function GetFieldName(Index: Integer): string;
+ procedure DisableControls;
+ procedure EnableControls;
+ function GetIsEmpty: boolean;
+ procedure FreeBookmark(Bookmark: TBookmark);
+ function GetBookMark: pointer;
+ procedure GotoBookmark(Bookmark: TBookmark);
+ function GetState: TDatasetState;
+ function ControlsDisabled: Boolean;
+ procedure Prepare(const AValue: Boolean);
+ function GetFields(Index: integer): IDANativeField;
+ function FieldCount: Integer;
+ function FindField(const FieldName: string): IDANativeField;
+ function IsTDatasetCompatible: Boolean;
+ function GetNativeFieldData(Index: Integer; var Data: pointer; var DataSize: cardinal):Boolean;
+ function CanFreeNativeFieldData: Boolean;
+ function GetNativeFieldValue(Index: Integer): Variant;
+ public
+ Constructor Create(ADataset: TDataSet);
+ destructor Destroy;override;
+ end;
+
+ { 20080408:
+ Dataset-compatible drivers - default mode, i.e. no changes is required.
+
+
+ non-Dataset-compatible drivers:
+
+ you should create objects that supports
+ IDANativeField, IDANativeDatabaseAccess
+
+ xxxQuery:
+ ---------
+ you should override in addition:
+ function CreateNativeDatabaseAccess: IDANativeDatabaseAccess; // point to IDANativeDatabaseAccess
+ function CreateNativeObject(aConnection: TDAEConnection): TObject; // Result - point to your native object
+ function CreateDataset(aConnection: TDAEConnection): TDataset; // you can raise error or return nil
+ you can use
+ property NativeDatabaseAccess: IDANativeDatabaseAccess read fNativeDatabaseAccess; // your object which you return with CreateNativeDatabaseAccess
+ property NativeObject: TObject read GetNativeObject; // your object created with CreateNativeObject
+
+
+ XXXStoredProcedure
+ ------------------
+ you should override in addition:
+ function CreateNativeObject(aConnection: TDAEConnection): TObject; // Result - point to your native object
+ function CreateDataset(aConnection: TDAEConnection): TDataset; // you can raise error or return nil
+ you can use
+ property NativeObject: TObject read GetNativeObject; // your object created with CreateNativeObject
+ }
+
+ { TDAESQLCommand }
+ {$WARN SYMBOL_DEPRECATED OFF}
+ TDAESQLCommand = class(TDAEngineBaseObject, IDASQLCommand, IDAMustSetParams, IDASQLCommandNativeObject)
+ private
+ fConnection: TDAEConnection;
+ fDataset: TDataset;
+ FNativeObject: TObject;
+ fParams: TDAParamCollection;
+ fWhere: TDAWhere;
+ fDynamicWhere: TDASQLWhereBuilder;
+ fChanged: boolean;
+ fSQL: string;
+ fName: string;
+ fPrepared: boolean;
+ //fOrderBy : string;
+ fOnAfterExecute: TDAAfterExecuteCommandEvent;
+ fOnBeforeExecute: TDABeforeExecuteCommandEvent;
+ fOnExecuteError: TDAExecuteCommandErrorEvent;
+ FIsPresentDynWhereVariable: Boolean;
+ function UnknownIdentifier(Sender: TObject; const Name, OrgName: string; var Value: string): Boolean;
+ procedure SetDynamicWhereParams;
+ procedure RemoveDynamicWhereParams;
+
+ { non-dataset mode}
+ protected
+ fNativeDatabaseAccess: IDANativeDatabaseAccess;
+ function CreateNativeDatabaseAccess: IDANativeDatabaseAccess; virtual;
+ { non-dataset mode end}
+
+ // Internal
+ procedure OnWhereChange(Sender: TObject);
+ procedure PrepareSQLStatement; virtual;
+ function GenerateDynamicWhereStatement: string;
+ function SQLContainsDynamicWhere: boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetParamValuesStd(Params1: TDAParamCollection;Params2: TParams);
+ procedure SetParamValuesStd(Params1: TDAParamCollection;Params2: TParams);
+ procedure ClearParams; virtual;
+ function FindParameter(const AParams: TParams;const AParamName: string): TParam;
+
+ // To be overridden
+ function CreateNativeObject(aConnection: TDAEConnection): TObject; virtual;
+ function CreateDataset(aConnection: TDAEConnection): TDataset; virtual; abstract;
+
+ procedure DoPrepare(Value: boolean); virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF} abstract;
+ function DoExecute: integer; virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF} abstract;
+ procedure DoSetSQL(const Value: string); virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF} abstract;
+ function DoGetSQL: string; virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}abstract;
+
+ //IDASQLCommandNativeObject
+ function GetNativeObject: TObject; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetNativeFields(Index: integer): IDANativeField;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function NativeFieldCount: Integer;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function NativeFindField(const FieldName: string): IDANativeField;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function IsTDatasetCompatible: Boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetNativeFieldData(Index: Integer; var Data: pointer; var DataSize: cardinal):Boolean; virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function CanFreeNativeFieldData: Boolean;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ // IDASQLCommand
+ function GetDataset: TDataset; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetPrepared: boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetPrepared(Value: boolean); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetParams: TDAParamCollection; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure RefreshParams; virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function Execute: integer; virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetWhere: TDAWhere; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF} deprecated;
+ function GetDynamicWhere: TDAWhereBuilder; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetDynamicWhere(const Value: TDAWhereBuilder); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetSQL: string; virtual;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetSQL(const Value: string); virtual;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetName: string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ function ParamByName(const aName: string): TDAParam; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ property NativeObject: TObject read GetNativeObject;
+ property Dataset: TDataset read GetDataset;
+ property Changed: boolean read fChanged write fChanged;
+ property Connection: TDAEConnection read fConnection;
+
+ function GetOnAfterExecute: TDAAfterExecuteCommandEvent; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetOnBeforeExecute: TDABeforeExecuteCommandEvent; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetOnAfterExecute(const Value: TDAAfterExecuteCommandEvent); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetOnBeforeExecute(const Value: TDABeforeExecuteCommandEvent); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetOnExecuteError: TDAExecuteCommandErrorEvent; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetOnExecuteError(const Value: TDAExecuteCommandErrorEvent); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function intVCLTypeToDAType(aFieldType: TFieldType): TDADataType;virtual;
+ procedure SetParamValues(AParams: TDAParamCollection); virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF} abstract;
+ procedure GetParamValues(AParams: TDAParamCollection); virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF} abstract;
+ public
+ constructor Create(aConnection: TDAEConnection; const aName: string = ''); virtual;
+ destructor Destroy; override;
+ end;
+
+ { TDAEDataset }
+ TDAEDataset = class(TDAESQLCommand, IDASQLCommand, IDADataset)
+ private
+ fAutoFields: boolean;
+ fFields: TDAFieldCollection;
+ fLogicalName : string;
+ fOnAfterOpen: TDAAfterOpenDatasetEvent;
+ fOnBeforeOpen: TDABeforeOpenDatasetEvent;
+ fOnOpenError: TDAOpenDatasetErrorEvent;
+ FNativeIndex: array of integer;
+ protected
+ property NativeDatabaseAccess: IDANativeDatabaseAccess read fNativeDatabaseAccess;
+ function IsNeedToFixFMTBCDIssue: Boolean; virtual;
+ procedure FixKnownIssues;virtual;
+ procedure FixFMTBCDIssue;
+ // To be overridden
+ function DoGetRecordCount: integer; dynamic;
+ function DoGetActive: boolean; dynamic;
+ procedure DoSetActive(Value: boolean); dynamic;
+ function DoGetBOF: boolean; dynamic;
+ function DoGetEOF: boolean; dynamic;
+
+ procedure DoNext; dynamic;
+
+ function DoLocate(const KeyFields: string; const KeyValues: Variant; Options: TLocateOptions): Boolean; dynamic;
+ procedure DoPrepare(Value: boolean); override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ //IDASQLCommandNativeObject
+ function GetNativeFieldData(Index: Integer; var Data: pointer; var DataSize: cardinal):Boolean; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ // IDADataset
+ function GetRecordCount: integer; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetFieldCount: integer; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetFields: TDAFieldCollection; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetActive: boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetActive(Value: boolean); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetBOF: boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetEOF: boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetFieldValues(Index: integer): Variant; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetNames(Index: integer): string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetIsEmpty : boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetState : TDatasetState; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ procedure Open; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure Close; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ procedure EnableControls; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure DisableControls; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function ControlsDisabled: Boolean;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ procedure Next; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ procedure Refresh; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ function Locate(const KeyFields: string; const KeyValues: Variant; Options: TLocateOptions): Boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function Lookup(const KeyFields: string; const KeyValues: Variant; const ResultFields: string): Variant; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ function FieldByName(const aName: string): TDAField; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function FindField(const aName: string): TDAField; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ function GetBookMark: pointer; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GotoBookmark(Bookmark: TBookmark); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure FreeBookmark(Bookmark: TBookmark); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetLogicalName : string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetLogicalName(aName : string); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ function GetOnAfterOpen: TDAAfterOpenDatasetEvent; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetOnBeforeOpen: TDABeforeOpenDatasetEvent; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetOnAfterOpen(const Value: TDAAfterOpenDatasetEvent); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetOnBeforeOpen(const Value: TDABeforeOpenDatasetEvent); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetOnOpenError: TDAOpenDatasetErrorEvent; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetOnOpenError(const Value: TDAOpenDatasetErrorEvent); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ function GetRowRecIdValue: integer;
+ function GetCurrentRecIdValue: integer;
+ procedure SetCurrentRecIdValue(Value: integer);
+ procedure EnableConstraints; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure DisableConstraints; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ public
+ constructor Create(aConnection: TDAEConnection; const aName: string = ''); override;
+ destructor Destroy; override;
+ end;
+ {$WARN SYMBOL_DEPRECATED ON}
+
+ TDAEDatasetClass = class of TDAEDataset;
+
+ {$WARN SYMBOL_DEPRECATED OFF}
+ { TDAEStoredProcedure }
+ TDAEStoredProcedure = class(TDAESQLCommand, IDASQLCommand, IDAStoredProcedure)
+ protected
+ function CreateNativeDatabaseAccess: IDANativeDatabaseAccess; override;
+ procedure RefreshParamsStd(AParams: TParams);
+ // Internal
+ procedure DoPrepare(Value: boolean); override;
+ procedure RefreshParams; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetSQL(const Value: string); override;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ // IDAStoredProcedure
+ function GetStoredProcedureName: string; virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF} abstract;
+ procedure SetStoredProcedureName(const Name: string); virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF} abstract;
+ procedure PrepareSQLStatement; override;
+ public
+ end;
+ {$WARN SYMBOL_DEPRECATED ON}
+ TDAEStoredProcedureClass = class of TDAEStoredProcedure;
+
+ { TDAEConnection }
+ TDAEConnection = class(TDAEngineBaseObject, IDAConnection, IDAConnectionObjectAccess, IDATestableObject, IDAHasMacroProcessor)
+ private
+ fConnectionObject: TCustomConnection;
+ fConnectionString: string;
+ fConnectionManager: IDAConnectionManager;
+ fConnectionDefinition: TDAConnection;
+ fDriver: TDAEDriver;
+ fUserID,
+ fPassword,
+ fName: string;
+ fMacroProcessor: TDASQLMacroProcessor;
+ fOnAfterExecuteCommand: TDAAfterExecuteCommandEvent;
+ fOnAfterOpenDataset: TDAAfterOpenDatasetEvent;
+ fOnBeforeOpenDataset: TDABeforeOpenDatasetEvent;
+ fOnBeforeExecuteCommand: TDABeforeExecuteCommandEvent;
+ fOnExecuteCommandError: TDAExecuteCommandErrorEvent;
+ fOnOpenDatasetError: TDAOpenDatasetErrorEvent;
+ fConnectionPool: IDAConnectionPool;
+ fReleasing: Boolean;
+ fUseMacroProcessor:Boolean;
+
+ function CreateConnectionObject: TCustomConnection;
+
+ protected
+ fConnectionType: string;
+ property ConnectionName: string read fName;
+ property ConnectionManager: IDAConnectionManager read fConnectionManager;
+ property ConnectionDefinition: TDAConnection read fConnectionDefinition;
+
+ function QueryInterface(const IID: TGUID; out Obj): HResult; override; stdcall;
+ function GetConnectionPool: IDAConnectionPool; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetConnectionPool(const Value: IDAConnectionPool); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ // To be overridden
+ function CreateCustomConnection: TCustomConnection; virtual; abstract;
+ function CreateMacroProcessor: TDASQLMacroProcessor; virtual;
+
+ function GetDatasetClass: TDAEDatasetClass; virtual;
+ function GetStoredProcedureClass: TDAEStoredProcedureClass; virtual;
+
+ procedure DoApplyConnectionString(aConnStrParser: TDAConnectionStringParser; aConnectionObject: TCustomConnection); virtual;
+
+ function DoBeginTransaction: integer; virtual; abstract;
+ procedure DoCommitTransaction; virtual; abstract;
+ procedure DoRollbackTransaction; virtual; abstract;
+ function DoGetInTransaction: boolean; virtual; abstract;
+
+ procedure DoGetTableNames(out List: IROStrings); virtual;
+ procedure DoGetViewNames(out List: IROStrings); virtual;
+ procedure DoGetStoredProcedureNames(out List: IROStrings); virtual;
+ procedure DoGetTableFields(const aTableName: string; out Fields: TDAFieldCollection); virtual;
+ procedure DoGetQueryFields(const aSQL: string; aParamsIfNeeded: TDAParamCollection; out Fields: TDAFieldCollection); virtual;
+ procedure DoGetViewFields(const aViewName: string; out Fields: TDAFieldCollection); virtual;
+ procedure DoGetStoredProcedureParams(const aStoredProcedureName: string; out Params: TDAParamCollection); virtual;
+ procedure DoGetForeignKeys(out ForeignKeys: TDADriverForeignKeyCollection); virtual;
+
+ function DoGetLastAutoInc(const GeneratorName: string): integer; virtual;
+
+ // Misc
+ procedure ApplyConnectionString(const aConnectionString: string; aConnectionObject: TCustomConnection);
+
+ procedure AssignCommandEventHandlers(const aCommand: IDASQLCommand);
+ procedure AssignDatasetEventHandlers(const aDataset: IDADataset);
+
+ // IDAConnectionObjectAccess
+ function GetConnectionObject: TObject; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetConnectionProperties(const aPropertyName: string): Variant; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetConnectionProperties(const aPropertyName: string; const aValue: Variant); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ // IDATestableObject
+ procedure Test; virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ // IDAConnection
+ function GetConnectionString: string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetConnectionString(Value: string); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetConnected: boolean; virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetConnected(Value: boolean); virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetName: string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ function GetOnAfterExecuteCommand: TDAAfterExecuteCommandEvent; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetOnAfterOpenDataset: TDAAfterOpenDatasetEvent; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetOnBeforeExecuteCommand: TDABeforeExecuteCommandEvent; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetOnBeforeOpenDataset: TDABeforeOpenDatasetEvent; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetOnExecuteCommandError: TDAExecuteCommandErrorEvent; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetOnOpenDatasetError: TDAOpenDatasetErrorEvent; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetOnAfterExecuteCommand(const Value: TDAAfterExecuteCommandEvent); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetOnAfterOpenDataset(const Value: TDAAfterOpenDatasetEvent); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetOnBeforeExecuteCommand(const Value: TDABeforeExecuteCommandEvent); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetOnBeforeOpenDataset(const Value: TDABeforeOpenDatasetEvent); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetOnExecuteCommandError(const Value: TDAExecuteCommandErrorEvent); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetOnOpenDatasetError(const Value: TDAOpenDatasetErrorEvent); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ procedure Open(const aUserID: string = ''; const aPassword: string = ''); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure Close; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ // UserID/Password
+ function GetUserID: string; virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetUserID(const Value: string); virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetPassword: string; virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetPassword(const Value: string); virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ function BeginTransaction: integer; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure CommitTransaction; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure RollbackTransaction; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetInTransaction: boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ procedure GetTableNames(out List: IROStrings); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetViewNames(out List: IROStrings); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetStoredProcedureNames(out List: IROStrings); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetTableFields(const aTableName: string; out Fields: TDAFieldCollection); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetQueryFields(const aSQL: string; aParamsIfNeeded: TDAParamCollection; out Fields: TDAFieldCollection); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetViewFields(const aViewName: string; out Fields: TDAFieldCollection); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetStoredProcedureParams(const aStoredProcedureName: string; out Params: TDAParamCollection); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetForeignKeys(out ForeignKeys: TDADriverForeignKeyCollection); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+
+ function GetSPSelectSyntax(HasArguments: Boolean): string; virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetQuoteChars: TDAQuoteCharArray; virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function IdentifierIsQuoted(const iIdentifier: string): boolean; virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function IdentifierNeedsQuoting(const iIdentifier: string): boolean; virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function QuoteIdentifierIfNeeded(const iIdentifier: string): string; virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function QuoteIdentifier(const iIdentifier: string): string; virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function QuoteFieldNameIfNeeded(const aTableName, aFieldName: string): string; virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function QuoteFieldName(const aTableName, aFieldName: string): string; virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ function NewCommand(const Text: string; CommandType: TDASQLStatementType; const aCommandName: string = ''): IDASQLCommand; virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function NewDataset(const SQL: string; const aDatasetName: string = ''): IDADataset; virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetLastAutoInc(const GeneratorName: string = ''): integer; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ property UserID: string read GetUserID write SetUserID;
+ property Password: string read GetPassword write SetPassword;
+ property ConnectionObject: TCustomConnection read fConnectionObject write fConnectionObject;
+ function GetMacroProcessor: TDASQLMacroProcessor;
+ function _Release: Integer; override; stdcall;
+ function isAlive: Boolean; virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetConnectionType: string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ property ConnectionType: string read GetConnectionType;
+ function GetQueryBuilder: TDAQueryBuilder; virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetWhereBuilder: TDASQLWhereBuilder; virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetUseMacroProcessor: Boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetUseMacroProcessor(Value:Boolean); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ public
+ constructor Create(aDriver: TDAEDriver; aName: string = ''); virtual;
+ destructor Destroy; override;
+
+ property ConnectionPool: IDAConnectionPool read GetConnectionPool write SetConnectionPool;
+ property Driver: TDAEDriver read fDriver;
+ property MacroProcessor: TDASQLMacroProcessor read GetMacroProcessor;
+ end;
+
+ TDAEConnectionClass = class of TDAEConnection;
+
+ { TDAEDriver }
+ TDAEDriver = class(TComponent, IDADriver, IDADriver30)
+ private
+
+ protected
+ // To be overridden
+ function GetConnectionClass: TDAEConnectionClass; virtual; abstract;
+ procedure CustomizeConnectionObject(aConnection: TDAEConnection); dynamic;
+ procedure DoSetTraceOptions(TraceActive: boolean; TraceFlags: TDATraceOptions; Callback: TDALogTraceEvent); virtual;
+
+ { IDADriver }
+ function GetDriverID: string; virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF} abstract;
+ function GetDescription: string; virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF} abstract;
+ function GetMajVersion: byte; virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetMinVersion: byte; virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ procedure GetAuxDrivers(out List: IROStrings); virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetAuxParams(const AuxDriver: string; out List: IROStrings); virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetDefaultConnectionType(const AuxDriver: string): string; virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ procedure SetTraceOptions(TraceActive: boolean; TraceFlags: TDATraceOptions; Callback: TDALogTraceEvent); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ function NewConnection(const aName: string = ''; const aConnectionType: string = ''): IDAConnection; overload; {deprecated;} {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function NewConnection(const aConnectionManager: IDAConnectionManager; aConnectionDefinition: TDAConnection): IDAConnection; overload; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ procedure Initialize; virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure Finalize; virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ function GetAvailableDriverOptions: TDAAvailableDriverOptions; virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAvailableDriverOptionsEx(AuxDriver: string): TDAAvailableDriverOptions; virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetDefaultCustomParameters: string; virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ { IDADriver30 }
+ function GetDriverHelp(aType: TDADriverHelpType): string;
+ public
+ destructor Destroy; override;
+ end;
+
+ TDAEDriverClass = class of TDAEDriver;
+
+ { TDADriverReference }
+ TDADriverReference = class(TComponent)
+ end;
+
+{$IFDEF MSWINDOWS}
+function DAHandleSafeCallException(aObject:TObject; ExceptObject: TObject; ExceptAddr: Pointer): HResult;
+{$ENDIF MSWINDOWS}
+function Engine_GetDatabaseNames(aConnection:TDAEConnection; aMasterDatabase, aGetDatabaseNamesSQL: String): IROStrings;
+function TestIdentifier(const iIdentifier: string; const ReservedWords: array of string): boolean;
+implementation
+
+uses
+ {$IFDEF MSWINDOWS}Windows,{$ENDIF} Variants,{$IFDEF FPC}dbconst,{$ELSE}DBConsts,{$ENDIF}
+ {$IFNDEF Drivers_CompatibilityMode}{$IFNDEF FPC}SqlTimSt,{$ENDIF}{$ENDIF}FMTBcd,
+ TypInfo, uDAHelpers, uROClient, uDASQL92QueryBuilder, uROBinaryHelpers;
+
+function Engine_GetDatabaseNames(aConnection:TDAEConnection; aMasterDatabase, aGetDatabaseNamesSQL: String): IROStrings;
+var
+ connStrParser : TDAConnectionStringParser;
+ conn : IDAConnection;
+ ds : IDAdataset;
+begin
+ Result := NewROStrings;
+ connStrParser := TDAConnectionStringParser.Create((aConnection as IDAConnection).ConnectionString);
+ try
+ connStrParser.Database := aMasterDatabase;
+
+ conn := TDAEConnectionClass(aConnection.ClassType).Create(aConnection.Driver);
+ conn.ConnectionString := connStrParser.BuildString;
+ conn.Open;
+
+ ds := conn.NewDataset(aGetDatabaseNamesSQL);
+ ds.Open;
+
+ while not ds.EOF do begin
+ result.Add(VarToStr(ds.FieldValues[0]));
+ ds.Next;
+ end;
+ finally
+ connStrParser.Free;
+ conn := nil;
+ ds := nil;
+ end;
+end;
+
+{ TDAEDriver }
+
+destructor TDAEDriver.Destroy;
+begin
+ SetTraceOptions(FALSE, [], nil);
+
+ inherited;
+end;
+
+procedure TDAEDriver.Initialize;
+begin
+end;
+
+procedure TDAEDriver.Finalize;
+begin
+
+end;
+
+function TDAEDriver.GetMajVersion: byte;
+begin
+ result := 1
+end;
+
+function TDAEDriver.GetMinVersion: byte;
+begin
+ result := 0
+end;
+
+function TDAEDriver.NewConnection(const aName: string = '';const aConnectionType: string = ''): IDAConnection;
+var
+ conn: TDAEConnection;
+begin
+ conn := GetConnectionClass.Create(Self, aName);
+ conn.FConnectionType := aConnectionType;
+ CustomizeConnectionObject(conn); // In some cases the driver might need to do additional customization
+
+ result := conn;
+end;
+
+function TDAEDriver.NewConnection(const aConnectionManager: IDAConnectionManager; aConnectionDefinition: TDAConnection): IDAConnection;
+var
+ conn: TDAEConnection;
+begin
+ conn := GetConnectionClass.Create(Self, aConnectionDefinition.Name);
+ conn.fConnectionType := aConnectionDefinition.ConnectionType;
+ conn.fConnectionManager := aConnectionManager;
+ conn.fConnectionDefinition := aConnectionDefinition;
+ CustomizeConnectionObject(conn); // In some cases the driver might need to do additional customization
+
+ result := conn;
+end;
+
+function TDAEDriver.GetAvailableDriverOptions: TDAAvailableDriverOptions;
+begin
+ //result := [doAuxDriver,doServerName,doDatabaseName,doLogin,doCustom];
+ result := [doServerName, doDatabaseName, doLogin];
+end;
+
+function TDAEDriver.GetAvailableDriverOptionsEx(AuxDriver: string): TDAAvailableDriverOptions;
+begin
+ result := GetAvailableDriverOptions;
+end;
+
+function TDAEDriver.GetDefaultConnectionType(const AuxDriver: string): string;
+begin
+ result := '';
+end;
+
+function TDAEDriver.GetDefaultCustomParameters: string;
+begin
+ result := '';
+end;
+
+procedure TDAEDriver.SetTraceOptions(TraceActive: boolean; TraceFlags: TDATraceOptions; Callback: TDALogTraceEvent);
+begin
+ if (csDesigning in ComponentState) then Exit;
+
+ DoSetTraceOptions(TraceActive, TraceFlags, Callback);
+end;
+
+procedure TDAEDriver.CustomizeConnectionObject(aConnection: TDAEConnection);
+begin
+end;
+
+procedure TDAEDriver.DoSetTraceOptions(TraceActive: boolean;
+ TraceFlags: TDATraceOptions; Callback: TDALogTraceEvent);
+begin
+end;
+
+procedure TDAEDriver.GetAuxDrivers(out List: IROStrings);
+begin
+ List := NewROStrings();
+end;
+
+procedure TDAEDriver.GetAuxParams(const AuxDriver: string; out List: IROStrings);
+begin
+ List := NewROStrings();
+end;
+
+function TDAEDriver.GetDriverHelp(aType: TDADriverHelpType): string;
+begin
+ result := LoadHtmlFromResource(hInstance, 'DRIVER_HELP');
+end;
+
+{ TDAEConnection }
+
+constructor TDAEConnection.Create(aDriver: TDAEDriver; aName: string = '');
+begin
+ inherited Create;
+
+ fName := aName;
+ fDriver := aDriver;
+ fConnectionObject := CreateConnectionObject;
+ FUseMacroProcessor := True;
+end;
+
+destructor TDAEConnection.Destroy;
+begin
+ if Assigned(fConnectionObject) then begin
+ try
+ if fConnectionObject.Connected then fConnectionObject.Close;
+ except
+ end;
+ FreeAndNIL(fConnectionObject);
+ end;
+
+ if Assigned(fMacroProcessor) then fMacroProcessor.Free;
+
+ inherited;
+end;
+
+function TDAEConnection.GetConnected: boolean;
+begin
+ result := assigned(fConnectionObject) and fConnectionObject.Connected;
+end;
+
+function TDAEConnection.GetConnectionString: string;
+begin
+ result := fConnectionString;
+end;
+
+procedure TDAEConnection.SetConnected(Value: boolean);
+begin
+ if fConnectionObject <> nil then
+ fConnectionObject.Connected := Value;
+end;
+
+procedure TDAEConnection.SetConnectionString(Value: string);
+begin
+ if (Value = fConnectionString) then Exit;
+
+ ApplyConnectionString(Value, fConnectionObject);
+end;
+
+function TDAEConnection.GetConnectionObject: TObject;
+begin
+ result := fConnectionObject;
+end;
+
+function TDAEConnection.GetConnectionProperties(
+ const aPropertyName: string): Variant;
+begin
+ if assigned(fConnectionObject) then
+ result := GetPropValue(fConnectionObject, aPropertyName, FALSE)
+ else
+ result := Unassigned;
+end;
+
+procedure TDAEConnection.SetConnectionProperties(
+ const aPropertyName: string; const aValue: Variant);
+begin
+ if assigned(fConnectionObject) then
+ SetPropValue(fConnectionObject, aPropertyName, aValue);
+end;
+
+procedure TDAEConnection.Close;
+begin
+ SetConnected(FALSE); // Exceptions are handled there
+end;
+
+procedure TDAEConnection.Open(const aUserID: string = ''; const aPassword: string = '');
+begin
+ if (aUserID <> '') then UserID := aUserID;
+ if (aPassword <> '') then Password := aPassword;
+
+ SetConnected(TRUE); // Exceptions are handled there
+end;
+
+function TDAEConnection.CreateConnectionObject: TCustomConnection;
+begin
+ result := CreateCustomConnection;
+end;
+
+function TDAEConnection.NewDataset(const SQL: string; const aDatasetName: string = ''): IDADataset;
+begin
+ result := GetDatasetClass.Create(Self, aDatasetName);
+ result.SQL := SQL;
+
+ AssignDatasetEventHandlers(result); // Propagates the event handlers to all datasets
+end;
+
+function TDAEConnection.NewCommand(const Text: string; CommandType: TDASQLStatementType; const aCommandName: string = ''): IDASQLCommand;
+var
+ sp: IDAStoredProcedure;
+ ds: IDADataset;
+begin
+ result := nil;
+
+ case CommandType of
+ stStoredProcedure: begin
+ sp := GetStoredProcedureClass.Create(Self, aCommandName);
+ sp.StoredProcedureName := Text;
+
+ result := sp;
+ end;
+ stSQL: begin
+ ds := GetDatasetClass.Create(Self, aCommandName);
+ ds.SQL := Text;
+ result := ds;
+ end;
+ end;
+
+ if Result <> nil then
+ Result.RefreshParams;
+
+ AssignCommandEventHandlers(result); // Propagates the event handlers to all commands
+end;
+
+function TDAEConnection.BeginTransaction: integer;
+begin
+ result := -1;
+
+ DoBeginTransaction;
+end;
+
+procedure TDAEConnection.CommitTransaction;
+begin
+ DoCommitTransaction;
+end;
+
+procedure TDAEConnection.RollbackTransaction;
+begin
+ DoRollbackTransaction;
+end;
+
+procedure TDAEConnection.GetStoredProcedureNames(out List: IROStrings);
+begin
+ DoGetStoredProcedureNames(List);
+end;
+
+procedure TDAEConnection.GetStoredProcedureParams(
+ const aStoredProcedureName: string; out Params: TDAParamCollection);
+begin
+ DoGetStoredProcedureParams(aStoredProcedureName, Params);
+end;
+
+procedure TDAEConnection.GetForeignKeys(out ForeignKeys: TDADriverForeignKeyCollection);
+begin
+ DoGetForeignKeys(ForeignKeys);
+end;
+
+procedure TDAEConnection.GetTableFields(const aTableName: string;
+ out Fields: TDAFieldCollection);
+begin
+ DoGetTableFields(aTableName, Fields);
+end;
+
+procedure TDAEConnection.GetQueryFields(const aSQL: string; aParamsIfNeeded: TDAParamCollection; out Fields: TDAFieldCollection);
+begin
+ DoGetQueryFields(aSQL, aParamsIfNeeded, Fields);
+end;
+
+procedure TDAEConnection.GetTableNames(out List: IROStrings);
+begin
+ DoGetTableNames(List);
+end;
+
+procedure TDAEConnection.GetViewFields(const aViewName: string;
+ out Fields: TDAFieldCollection);
+begin
+ DoGetViewFields(aViewName, Fields);
+end;
+
+procedure TDAEConnection.GetViewNames(out List: IROStrings);
+begin
+ DoGetViewNames(List);
+end;
+
+function TDAEConnection.GetWhereBuilder: TDASQLWhereBuilder;
+begin
+ Result:= TDASQL92WhereBuilder.Create(Self);
+end;
+
+function TDAEConnection.GetDatasetClass: TDAEDatasetClass;
+begin
+ result := nil;
+end;
+
+function TDAEConnection.GetStoredProcedureClass: TDAEStoredProcedureClass;
+begin
+ result := nil;
+end;
+
+procedure TDAEConnection.DoGetTableFields(const aTableName: string; out Fields: TDAFieldCollection);
+var
+ qry: IDADataset;
+begin
+ Fields := TDAFieldCollection.Create(nil);
+ qry := GetDatasetClass.Create(Self);
+ try
+ qry.SQL := 'SELECT * FROM ' + QuoteIdentifierIfNeeded(aTableName) + ' WHERE 1=0';
+ qry.Open;
+ Fields.Assign(qry.Fields);
+ finally
+ qry := nil;
+ end;
+end;
+
+procedure TDAEConnection.DoGetQueryFields(const aSQL: string; aParamsIfNeeded: TDAParamCollection; out Fields: TDAFieldCollection);
+var
+ qry: IDADataset;
+begin
+ Fields := TDAFieldCollection.Create(nil);
+ qry := GetDatasetClass.Create(Self);
+ try
+ qry.SQL := aSQL;
+ if assigned(aParamsIfNeeded) then
+ qry.Params.AssignParamCollection(aParamsIfNeeded);
+ qry.Open;
+ Fields.Assign(qry.Fields);
+ finally
+ qry := nil;
+ end;
+end;
+
+procedure TDAEConnection.DoGetStoredProcedureParams(const aStoredProcedureName: string; out Params: TDAParamCollection);
+var
+ cmd: IDASQLCommand;
+begin
+ //Params := nil;
+ cmd := NewCommand(aStoredProcedureName, stStoredProcedure);
+ cmd.RefreshParams;
+
+ {if (Params = nil) then} Params := TDAParamCollection.Create(nil);
+ Params.AssignParamCollection(cmd.Params);
+end;
+
+procedure TDAEConnection.DoGetForeignKeys(out ForeignKeys: TDADriverForeignKeyCollection);
+begin
+ ForeignKeys := TDADriverForeignKeyCollection.Create(nil);
+end;
+
+function TDAEConnection.GetName: string;
+begin
+ result := fName;
+end;
+
+procedure TDAEConnection.DoGetViewFields(const aViewName: string;
+ out Fields: TDAFieldCollection);
+begin
+ DoGetTableFields(aViewName, Fields);
+end;
+
+function TDAEConnection.GetQuoteChars: TDAQuoteCharArray;
+begin
+ result[0] := '"';
+ result[1] := '"';
+end;
+
+procedure TDAEConnection.DoGetViewNames(out List: IROStrings);
+begin
+ List := NewROStrings; // Changed from NIL.
+end;
+
+procedure TDAEConnection.DoGetStoredProcedureNames(out List: IROStrings);
+begin
+ List := NewROStrings; // Changed from NIL.
+end;
+
+procedure TDAEConnection.DoGetTableNames(out List: IROStrings);
+begin
+ List := NewROStrings; // Changed from NIL.
+end;
+
+function TDAEConnection.GetInTransaction: boolean;
+begin
+ result := DoGetInTransaction;
+end;
+
+function TDAEConnection.GetPassword: string;
+begin
+ result := fPassword;
+end;
+
+function TDAEConnection.GetUserID: string;
+begin
+ result := fUserID;
+end;
+
+procedure TDAEConnection.SetPassword(const Value: string);
+begin
+ fPassword := Value;
+
+ ApplyConnectionString(GetConnectionString, ConnectionObject); // Refreshes it
+end;
+
+procedure TDAEConnection.SetUserID(const Value: string);
+begin
+ fUserID := Value;
+
+ ApplyConnectionString(GetConnectionString, ConnectionObject); // Refreshes it
+end;
+
+function TDAEConnection.GetLastAutoInc(
+ const GeneratorName: string): integer;
+begin
+ result := DoGetLastAutoInc(GeneratorName);
+end;
+
+function TDAEConnection.DoGetLastAutoInc(
+ const GeneratorName: string): integer;
+begin
+ result := -1;
+end;
+
+function TDAEConnection.IdentifierIsQuoted(const iIdentifier: string): boolean;
+var
+ lQuoteChars: TDAQuoteCharArray;
+ lLength:integer;
+begin
+ lQuoteChars := GetQuoteChars();
+ lLength := Length(iIdentifier);
+ result := (lLength > 2) and (iIdentifier[1] = lQuoteChars[0]) and (iIdentifier[lLength] = lQuoteChars[1]);
+end;
+
+function TDAEConnection.IdentifierNeedsQuoting(const iIdentifier: string): boolean;
+var
+ i: integer;
+begin
+ result := false;
+ if IdentifierIsQuoted(iIdentifier) then Exit;
+
+ for i := 1 to Length(iIdentifier) do begin
+ if not CharInSet(iIdentifier[i], ['a'..'z', 'A'..'Z', '0'..'9', '_', '.']) then begin
+ result := true;
+ exit;
+ end;
+ end;
+ if (iIdentifier <> '') then begin
+ i := pos('.',iIdentifier);
+ if (i < Length(iIdentifier)) and CharInSet(iIdentifier[i+1], ['0'..'9']) then Result := True;
+ end;
+end;
+
+function TDAEConnection.QuoteIdentifierIfNeeded(const iIdentifier: string): string;
+begin
+ if IdentifierNeedsQuoting(iIdentifier) then
+ result := QuoteIdentifier(iIdentifier)
+ else
+ result := iIdentifier;
+end;
+
+function TDAEConnection.QuoteIdentifier(const iIdentifier: string): string;
+var
+ lQuoteChars: TDAQuoteCharArray;
+begin
+ lQuoteChars := GetQuoteChars();
+ if (Pos('.', iIdentifier)>0) then
+ result := lQuoteChars[0] + StringReplace(iIdentifier, '.', lQuoteChars[1]+'.'+ lQuoteChars[0], [rfReplaceAll]) + lQuoteChars[1]
+ else
+ result := lQuoteChars[0] + iIdentifier + lQuoteChars[1];
+end;
+
+function TDAEConnection.CreateMacroProcessor: TDASQLMacroProcessor;
+begin
+{$WARNINGS OFF}
+ result := TDASQLMacroProcessor.Create;
+{$WARNINGS ON}
+end;
+
+procedure TDAEConnection.ApplyConnectionString(
+ const aConnectionString: string; aConnectionObject: TCustomConnection);
+var
+ i: Integer;
+ lParamName: String;
+ lConnStrParser: TDAConnectionStringParser;
+begin
+ FreeAndNIL(fMacroProcessor);
+
+ lConnStrParser := TDAConnectionStringParser.Create(aConnectionString);
+ try
+ fConnectionString := aConnectionString;
+ DoApplyConnectionString(lConnStrParser, aConnectionObject);
+ //with lConnStrParser do
+ if aConnectionObject <> nil then
+ begin
+ for i := 0 to lConnStrParser.AuxParamsCount - 1 do begin
+ lParamName := lConnStrParser.AuxParamNames[i];
+ if Assigned(GetPropInfo(aConnectionObject, lParamName)) then begin
+ SetConnectionProperties(lParamName, lConnStrParser.AuxParams[lParamName]);
+ end;
+ end;
+ end;
+ finally
+ lConnStrParser.Free;
+ end;
+
+ fMacroProcessor := CreateMacroProcessor;
+end;
+
+procedure TDAEConnection.DoApplyConnectionString(
+ aConnStrParser: TDAConnectionStringParser; aConnectionObject: TCustomConnection);
+begin
+ if (aConnectionObject <> nil) then aConnectionObject.Close;
+end;
+
+function TDAEConnection.GetOnAfterExecuteCommand: TDAAfterExecuteCommandEvent;
+begin
+ result := fOnAfterExecuteCommand
+end;
+
+function TDAEConnection.GetOnAfterOpenDataset: TDAAfterOpenDatasetEvent;
+begin
+ result := fOnAfterOpenDataset
+end;
+
+function TDAEConnection.GetOnBeforeExecuteCommand: TDABeforeExecuteCommandEvent;
+begin
+ result := fOnBeforeExecuteCommand
+end;
+
+function TDAEConnection.GetOnBeforeOpenDataset: TDABeforeOpenDatasetEvent;
+begin
+ result := fOnBeforeOpenDataset
+end;
+
+function TDAEConnection.GetOnExecuteCommandError: TDAExecuteCommandErrorEvent;
+begin
+ result := fOnExecuteCommandError
+end;
+
+function TDAEConnection.GetOnOpenDatasetError: TDAOpenDatasetErrorEvent;
+begin
+ result := fOnOpenDatasetError
+end;
+
+procedure TDAEConnection.SetOnAfterExecuteCommand(
+ const Value: TDAAfterExecuteCommandEvent);
+begin
+ fOnAfterExecuteCommand := Value;
+end;
+
+procedure TDAEConnection.SetOnAfterOpenDataset(
+ const Value: TDAAfterOpenDatasetEvent);
+begin
+ fOnAfterOpenDataset := Value;
+end;
+
+procedure TDAEConnection.SetOnBeforeExecuteCommand(
+ const Value: TDABeforeExecuteCommandEvent);
+begin
+ fOnBeforeExecuteCommand := Value;
+end;
+
+procedure TDAEConnection.SetOnBeforeOpenDataset(
+ const Value: TDABeforeOpenDatasetEvent);
+begin
+ fOnBeforeOpenDataset := Value;
+end;
+
+procedure TDAEConnection.SetOnExecuteCommandError(
+ const Value: TDAExecuteCommandErrorEvent);
+begin
+ fOnExecuteCommandError := Value;
+end;
+
+procedure TDAEConnection.SetOnOpenDatasetError(
+ const Value: TDAOpenDatasetErrorEvent);
+begin
+ fOnOpenDatasetError := Value;
+end;
+
+procedure TDAEConnection.AssignCommandEventHandlers(
+ const aCommand: IDASQLCommand);
+begin
+ if aCommand=NIL then Exit;
+ aCommand.OnBeforeExecute := fOnBeforeExecuteCommand;
+ aCommand.OnAfterExecute := fOnAfterExecuteCommand;
+ aCommand.OnExecuteError := fOnExecuteCommandError;
+end;
+
+procedure TDAEConnection.AssignDatasetEventHandlers(
+ const aDataset: IDADataset);
+begin
+ if aDataset=NIL then Exit;
+ aDataset.OnBeforeOpen := fOnBeforeOpenDataset;
+ aDataset.OnAfterOpen := fOnAfterOpenDataset;
+ aDataset.OnOpenError := fOnOpenDatasetError;
+end;
+
+procedure TDAEConnection.Test;
+begin
+ Open;
+ Close;
+end;
+
+function TDAEConnection.GetSPSelectSyntax(HasArguments: Boolean): string;
+begin
+ Result := 'EXEC {0} {1}';
+end;
+
+function TDAEConnection.GetMacroProcessor: TDASQLMacroProcessor;
+begin
+ if FUseMacroProcessor then
+ result := fMacroProcessor
+ else
+ Result := nil;
+end;
+
+function TDAEConnection._Release: Integer;
+begin
+ Result := InterlockedDecrement(FRefCount);
+ if (Result = 0) and not (fReleasing) then begin
+ fReleasing := True;
+ InterlockedIncrement(fRefCount);
+ if assigned(fConnectionPool) then
+ fConnectionPool.ReleaseConnection(self);
+ Result := InterlockedDecrement(fRefCount);
+ fReleasing := False;
+ end;
+ if Result = 0 then
+ Destroy;
+end;
+
+function TDAEConnection.GetConnectionPool: IDAConnectionPool;
+begin
+ result := fConnectionPool;
+end;
+
+procedure TDAEConnection.SetConnectionPool(const Value: IDAConnectionPool);
+begin
+ fConnectionPool := Value;
+end;
+
+function TDAEConnection.QuoteFieldName(const aTableName,
+ aFieldName: string): string;
+begin
+ Result:= QuoteIdentifier(aFieldName);
+end;
+
+function TDAEConnection.QuoteFieldNameIfNeeded(const aTableName,
+ aFieldName: string): string;
+begin
+ if IdentifierNeedsQuoting(aFieldName) then
+ result := QuoteFieldName(aTableName,aFieldName)
+ else
+ result := aFieldName;
+end;
+
+function TDAEConnection.isAlive: Boolean;
+begin
+ Result:= (ConnectionObject <> nil) and ConnectionObject.Connected;
+end;
+
+function TDAEConnection.GetConnectionType: string;
+begin
+ Result:= FConnectionType;
+end;
+
+function TDAEConnection.GetQueryBuilder: TDAQueryBuilder;
+begin
+ Result:= TDASQL92QueryBuilder.Create;
+ Result.Connection:=Self;
+end;
+
+function TDAEConnection.GetUseMacroProcessor: Boolean;
+begin
+ Result := FUseMacroProcessor;
+end;
+
+procedure TDAEConnection.SetUseMacroProcessor(Value: Boolean);
+begin
+ FUseMacroProcessor := Value;
+end;
+
+function TDAEConnection.QueryInterface(const IID: TGUID; out Obj): HResult;
+begin
+ Result:= E_NOINTERFACE;
+ if IsEqualGUID(IID, IDAHasMacroProcessor) then begin
+ if not FUseMacroProcessor then Exit;
+ end;
+ Result := inherited QueryInterface(IID, Obj)
+end;
+
+{ TDAEDataset }
+
+constructor TDAEDataset.Create(aConnection: TDAEConnection; const aName: string = '');
+begin
+ inherited;
+
+ fLogicalName := aName;
+ if (fLogicalName='')
+ then fLogicalName := NewGuidAsString;
+
+ fChanged := true;
+ fFields := TDAFieldCollection.Create(nil);
+ {$WARN SYMBOL_DEPRECATED OFF}
+ GetWhere.Fields := fFields; // So it can find the mappings!
+ {$WARN SYMBOL_DEPRECATED ON}
+end;
+
+destructor TDAEDataset.Destroy;
+begin
+ FreeAndNil(fFields);
+ inherited;
+end;
+
+function TDAEDataset.GetActive: boolean;
+begin
+ result := DoGetActive
+end;
+
+function TDAEDataset.GetBOF: boolean;
+begin
+ result := DoGetBOF
+end;
+
+function TDAEDataset.GetEOF: boolean;
+begin
+ result := DoGetEOF;
+end;
+
+function TDAEDataset.GetFieldCount: integer;
+begin
+ result := fFields.Count;
+end;
+
+function TDAEDataset.GetRecordCount: integer;
+begin
+ result := DoGetRecordCount;
+end;
+
+function TDAEDataset.Locate(const KeyFields: string;
+ const KeyValues: Variant; Options: TLocateOptions): Boolean;
+begin
+ result := DoLocate(KeyFields, KeyValues, Options);
+end;
+
+procedure TDAEDataset.Next;
+begin
+ DoNext;
+end;
+
+procedure TDAEDataset.Open;
+begin
+ SetActive(TRUE); // Handles the exception there
+end;
+
+procedure TDAEDataset.Close;
+begin
+ SetActive(FALSE); // Handles the exception there
+end;
+
+procedure TDAEDataset.SetActive(Value: boolean);
+begin
+ DoSetActive(Value);
+end;
+
+function TDAEDataset.GetFields: TDAFieldCollection;
+begin
+ result := fFields;
+end;
+
+function TDAEDataset.DoGetActive: boolean;
+begin
+ result := FNativeDatabaseAccess.Active;
+end;
+
+function TDAEDataset.DoGetBOF: boolean;
+begin
+ result := FNativeDatabaseAccess.GetBOF;
+end;
+
+function TDAEDataset.DoGetEOF: boolean;
+begin
+ result := FNativeDatabaseAccess.GetEOF;
+end;
+
+function TDAEDataset.DoGetRecordCount: integer;
+begin
+ result := FNativeDatabaseAccess.GetRecordCount;
+end;
+
+function TDAEDataset.DoLocate(const KeyFields: string;
+ const KeyValues: Variant; Options: TLocateOptions): Boolean;
+begin
+ result := FNativeDatabaseAccess.Locate(KeyFields, KeyValues, Options);
+end;
+
+procedure TDAEDataset.DoNext;
+begin
+ FNativeDatabaseAccess.Next;
+end;
+
+procedure TDAEDataset.DoPrepare(Value: boolean);
+begin
+ FNativeDatabaseAccess.Prepare(Value);
+end;
+
+procedure TDAEDataset.DoSetActive(Value: boolean);
+var
+ i: integer;
+ fld: IDANativeField;
+ startTick: Cardinal;
+ s: string;
+ dafld: TDAField;
+begin
+ if (Value = GetActive) then Exit;
+
+ // Opens the dataset
+ if Value then begin
+ // Combines the custom WHERE statement and modifies the inner SQL
+ if fChanged or (fWhere.Changed) then PrepareSQLStatement;
+
+ if Assigned(fConnection.fMacroProcessor) then begin
+ i := fConnection.fMacroProcessor.IndexOfName('Where');
+ s := GenerateDynamicWhereStatement;
+ if i = -1 then
+ fConnection.fMacroProcessor.AddVariable('Where').Value:=s
+ else
+ fConnection.fMacroProcessor.Variable[i].Value:=s;
+
+ SetDynamicWhereParams;
+ SetSQL(fConnection.fMacroProcessor.Eval(GetSQL));
+ end;
+
+
+ // Writes the parameter values
+ if (fParams.Count > 0) then SetParamValues(fParams) else ClearParams;
+
+ startTick := ROGetTickCount;
+ if Assigned(fOnBeforeOpen) then fOnBeforeOpen(Self);
+ // Opens the dataset
+ fAutoFields := (fFields.Count = 0);
+ try
+ FNativeDatabaseAccess.Active := True;
+ FixKnownIssues;
+ except
+ on E:Exception do begin
+ if Assigned(fOnOpenError) then fOnOpenError(Self, DoGetSQL, E);
+ raise;
+ end;
+ end;
+
+ if Assigned(fOnAfterOpen) then fOnAfterOpen(Self, DoGetSQL, ROGetTickCount-startTick);
+
+ GetParamValues(fParams);
+
+ RemoveDynamicWhereParams;
+
+ if fAutoFields and (fFields.Count = 0)then begin
+ for i := 0 to (FNativeDatabaseAccess.FieldCount - 1) do begin
+ fld := FNativeDatabaseAccess.GetFields(i);
+ with fFields.Add(fld.FieldName, intVCLTypeToDAType(fld.DataType), fld.Size) do begin
+ if DataType = datDecimal then begin
+ case fld.DataType of
+ ftFMTBcd: begin
+ DecimalPrecision:= fld.DecimalPrecision;
+ DecimalScale:= fld.DecimalScale;
+ end;
+ ftBCD: begin
+ DecimalPrecision:= fld.DecimalPrecision;
+ DecimalScale:= fld.DecimalScale;
+ end;
+ else
+ DataType := datFloat;
+ end;
+ end;
+ // Fix ZEOS issue
+ {$IFDEF DELPHI2006UP}
+ if (DataType = datWideString) and (Size = MaxInt div 2) then begin
+ DataType:= datWideMemo;
+ Size := 0;
+ end;
+ {$ENDIF}
+ Bind(fld);
+ end;
+ end;
+ end
+ else
+ fFields.Bind(Self);
+ SetLength(FNativeIndex,fFields.Count);
+ for i := 0 to fFields.Count - 1 do
+ FNativeIndex[i] := -1;
+ for i := 0 to fNativeDatabaseAccess.FieldCount - 1 do begin
+ dafld := fFields.FindField(fNativeDatabaseAccess.GetFieldName(i));
+ if dafld <> nil then FNativeIndex[dafld.Index] := i;
+ end;
+ end
+ else begin
+ if fAutoFields then
+ fFields.Clear
+ else
+ fFields.Unbind;
+
+ FNativeDatabaseAccess.Active := False;
+ SetLength(FNativeIndex,0);
+ end;
+end;
+
+{$IFNDEF FPC}
+type
+ PLargeint = ^Largeint;
+ Largeint = Int64;
+{$ENDIF}
+
+function TDAEDataset.GetFieldValues(Index: integer): Variant;
+{$IFNDEF Drivers_CompatibilityMode}
+var
+ data: pointer;
+ Datasize: Cardinal;
+ s: Ansistring;
+{$ENDIF}
+begin
+ if GetFields[Index].ServerCalculated then begin
+ Result := Null;
+ end
+ else begin
+ Index := FNativeIndex[Index];
+ {$IFDEF Drivers_CompatibilityMode}
+ Result := fNativeDatabaseAccess.GetNativeFieldValue(Index);
+ {$ELSE}
+ {$IFDEF FPC}
+ Data := nil;
+ Datasize := 0;
+ {$ENDIF}
+ if not fNativeDatabaseAccess.GetNativeFieldData(Index, Data, Datasize) then begin
+ Result:= Null;
+ end
+ else begin
+ case fNativeDatabaseAccess.GetFields(Index).DataType of
+ ftString, {$IFDEF DELPHI10UP}ftOraInterval, {$ENDIF}
+ ftFixedChar,
+ ftGuid: Result := AnsiString(PAnsiChar(Data));
+ ftSmallint: Result := PSmallint(Data)^;
+ ftInteger: Result := PInteger(Data)^;
+ ftWord: Result := PWord(Data)^;
+ ftBoolean: Result := PWordBool(data)^;
+ ftFloat,
+ ftCurrency: Result := PDouble(data)^;
+ ftBcd: Result := PCurrency(data)^;
+ ftDate: Result := PInteger(Data)^;
+ ftTime: Result := PInteger(Data)^;
+ ftDateTime: Result := PDateTime(Data)^;
+ ftBytes,
+ ftVarBytes: Result := POleVariant(Data)^;
+ ftAutoInc: Result := PInteger(Data)^;
+ ftBlob..ftTypedBinary, ftOraBlob, ftOraClob{$IFDEF DELPHI10UP}, ftWideMemo{$ENDIF}: begin
+ SetString(s, PChar(Data), DataSize);
+ Result := s;
+ end;
+ ftCursor: Result := Null;
+ {$IFDEF DELPHI10UP}
+ ftFixedWideChar,
+ {$ENDIF}
+ ftWideString: Result := WideString(PWideChar(Data));
+ ftLargeint: Result := PLargeint(Data)^;
+ // objects types
+ ftADT, ftArray, ftReference, ftDataSet:
+ Result := varNull;
+ ftVariant: Result := PVariant(Data)^;
+ ftInterface: Result := IUnknown(Data^);
+ ftIDispatch: Result := IDispatch(Data^);
+ {$IFNDEF FPC}
+ {$IFDEF DELPHI10UP}ftOraTimeStamp,{$ENDIF}
+ ftTimeStamp: Result := VarSQLTimeStampCreate(PSQLTimeStamp(data)^);
+ {$ENDIF FPC}
+ ftFMTBcd: Result := BCDToVariant(PBcd(Data)^);
+ end;
+ end;
+ {$ENDIF}
+ end;
+end;
+
+function TDAEDataset.GetNames(Index: integer): string;
+begin
+ result := FNativeDatabaseAccess.GetFieldName(Index);
+end;
+
+procedure TDAEDataset.DisableControls;
+begin
+ FNativeDatabaseAccess.DisableControls;
+end;
+
+procedure TDAEDataset.EnableControls;
+begin
+ FNativeDatabaseAccess.EnableControls;
+end;
+
+function TDAEDataset.FieldByName(const aName: string): TDAField;
+begin
+ result := fFields.FieldByName(aName) as TDAField;
+end;
+
+procedure TDAEDataset.FreeBookmark(Bookmark: TBookmark);
+begin
+ FNativeDatabaseAccess.FreeBookmark(Bookmark);
+end;
+
+function TDAEDataset.GetBookMark: pointer;
+begin
+ result := FNativeDatabaseAccess.GetBookmark;
+end;
+
+procedure TDAEDataset.GotoBookmark(Bookmark: TBookmark);
+begin
+ FNativeDatabaseAccess.GotoBookmark(Bookmark);
+end;
+
+procedure TDAEDataset.Refresh;
+begin
+
+end;
+
+function TDAEDataset.GetIsEmpty: boolean;
+begin
+ result := FNativeDatabaseAccess.GetIsEmpty;
+end;
+
+function TDAEDataset.GetState: TDatasetState;
+begin
+ result := FNativeDatabaseAccess.GetState;
+end;
+
+function TDAEDataset.Lookup(const KeyFields: string;
+ const KeyValues: Variant; const ResultFields: string): Variant;
+begin
+ result := FNativeDatabaseAccess.Lookup(KeyFields, KeyValues, ResultFields);
+end;
+
+function TDAEDataset.GetLogicalName: string;
+begin
+ result := fLogicalName;
+end;
+
+function TDAEDataset.FindField(const aName: string): TDAField;
+begin
+ result := fFields.FindField(aName) as TDAField;
+end;
+
+procedure TDAEDataset.SetLogicalName(aName: string);
+begin
+ fLogicalName := aName
+end;
+
+function TDAEDataset.GetOnAfterOpen: TDAAfterOpenDatasetEvent;
+begin
+ result := fOnAfterOpen
+end;
+
+function TDAEDataset.GetOnBeforeOpen: TDABeforeOpenDatasetEvent;
+begin
+ result := fOnBeforeOpen
+end;
+
+procedure TDAEDataset.SetOnAfterOpen(
+ const Value: TDAAfterOpenDatasetEvent);
+begin
+ fOnAfterOpen := Value
+end;
+
+procedure TDAEDataset.SetOnBeforeOpen(
+ const Value: TDABeforeOpenDatasetEvent);
+begin
+ fOnBeforeOpen := Value
+end;
+
+function TDAEDataset.GetOnOpenError: TDAOpenDatasetErrorEvent;
+begin
+ result := fOnOpenError;
+end;
+
+procedure TDAEDataset.SetOnOpenError(
+ const Value: TDAOpenDatasetErrorEvent);
+begin
+ fOnOpenError := Value;
+end;
+
+function TDAEDataset.GetCurrentRecIdValue: integer;
+begin
+ result := -1;
+end;
+
+procedure TDAEDataset.SetCurrentRecIdValue(Value: integer);
+begin
+
+end;
+
+function TDAEDataset.GetRowRecIdValue: integer;
+begin
+ result := -1
+end;
+
+procedure TDAEDataset.DisableConstraints;
+begin
+ // do nothing
+end;
+
+procedure TDAEDataset.EnableConstraints;
+begin
+ // do nothing
+end;
+
+{
+procedure TDAEDataset.CreateFieldDefs;
+var
+ i: integer;
+ fld: TFieldDef;
+ dafld: TDAField;
+ lNeedtoCreateFieldDefs: Boolean;
+ lFMTBCDPresent: Boolean;
+begin
+ lNeedtoCreateFieldDefs:=fDataset.FieldDefs.Count=0;
+ lFMTBCDPresent:=False;
+ // Adds the data fields (non calculated) to the FieldDefs
+ for i := 0 to (fFields.Count - 1) do begin
+ dafld:=fFields[i];
+ if dafld.Calculated or dafld.Lookup then Continue; // Added as fields later
+ if lNeedtoCreateFieldDefs then begin
+ fld := fDataset.FieldDefs.AddFieldDef;
+ fld.Name := dafld.Name;
+ fld.DataType := DATypeToVCLType(dafld.DataType);
+ end
+ else begin
+ fld := TFieldDef(fDataset.FieldDefs.Find(dafld.Name));
+ end;
+
+ // (autoinc)
+ if (dafld.DataType=datLargeAutoInc) then fld.DataType := ftLargeint
+ else if (dafld.DataType=datAutoInc) then fld.DataType := ftInteger;
+
+ if (fld.DataType = ftString) or (fld.DataType = ftWideString) then fld.Size := dafld.Size;
+ if (fld.DataType = ftGuid) then fld.Size := 38;
+ if (fld.DataType = ftFMTBcd) then begin
+ fld.Size:=dafld.DecimalScale;
+ fld.Precision:=dafld.DecimalPrecision;
+ lFMTBCDPresent:= True;
+ end;
+ end;
+ if not lFMTBCDPresent then fDataset.FieldDefs.Clear;
+ // Creates the data fields
+ for i := 0 to (fDataset.FieldDefs.Count - 1) do
+ fDataset.FieldDefs[i].CreateField(fDataset).DataSet := fDataset;
+end;
+}
+function TDAEDataset.IsNeedToFixFMTBCDIssue: Boolean;
+begin
+ Result:= False;
+end;
+
+procedure TDAEDataset.FixFMTBCDIssue;
+{$IFDEF ftFMTBCD_Support}
+var
+ i: integer;
+ lNeedToFix: Boolean;
+ fld: TFieldDef;
+ dafld: TDAField;
+{$ENDIF}
+begin
+{$IFDEF ftFMTBCD_Support}
+// this only for DBX driver => DatasetCompatible
+ if IsTDatasetCompatible then begin
+ lNeedToFix:= False;
+ for i:=0 to fDataset.FieldCount-1 do
+ if (fDataset.Fields[i].DataType = ftFMTBcd) and
+ (TFMTBCDField(fDataset.Fields[i]).Precision=15) and
+ (TFMTBCDField(fDataset.Fields[i]).Size=4) then begin
+ lNeedToFix:=True;
+ Break;
+ end;
+ if not lNeedToFix then Exit;
+ FNativeDatabaseAccess.Active := False;
+ for i := 0 to (fDataset.FieldDefs.Count - 1) do begin
+ fld := fDataset.FieldDefs[i];
+ if (fld.DataType = ftFMTBcd) then begin
+ dafld:= fFields.FindField(fld.Name);
+ if (fld.Precision = 15 ) and (fld.Size=4) then begin
+ if (dafld <> nil) and (dafld.DataType = datDecimal) then begin
+ fld.Precision := dafld.DecimalPrecision;
+ fld.Size := dafld.DecimalScale;
+ end else begin
+ fld.Precision := 24;
+ fld.Size := 8;
+ end;
+ end;
+ end;
+ end;
+ FNativeDatabaseAccess.Active := True;
+ end;
+{$ENDIF}
+end;
+
+procedure TDAEDataset.FixKnownIssues;
+begin
+ if IsNeedToFixFMTBCDIssue then FixFMTBCDIssue;
+end;
+
+function TDAEDataset.ControlsDisabled: Boolean;
+begin
+ Result := FNativeDatabaseAccess.ControlsDisabled;
+end;
+
+function TDAEDataset.GetNativeFieldData(Index: Integer; var Data: pointer;
+ var DataSize: cardinal): Boolean;
+begin
+ if GetFields[Index].ServerCalculated then begin
+ Result := False;
+ Data := nil;
+ DataSize := 0;
+ end
+ else begin
+ Result := inherited GetNativeFieldData(FNativeIndex[Index], Data, DataSize);
+ end;
+end;
+
+{ TDAESQLCommand }
+
+constructor TDAESQLCommand.Create(aConnection: TDAEConnection; const aName: string = '');
+var
+ id: TGUID;
+begin
+ inherited Create;
+
+ fName := aName;
+ if (fName = '') then begin
+ CreateGUID(id);
+ fName := GUIDToString(id);
+ end;
+
+ fWhere := TDAWhere.Create(nil, FALSE);
+ fDynamicWhere:= nil;// aConnection.GetWhereBuilder;
+ fConnection := aConnection;
+ fParams := TDAParamCollection.Create(nil);
+ fDataset := CreateDataset(fConnection);
+ FNativeObject := CreateNativeObject(fConnection);
+ FNativeDatabaseAccess := CreateNativeDatabaseAccess;
+end;
+
+destructor TDAESQLCommand.Destroy;
+begin
+ FNativeDatabaseAccess:=nil;
+ if FNativeObject <> fDataset then FreeAndNil(FNativeObject) else FNativeObject := nil;
+ FreeAndNil(fDataset);
+ FreeAndNil(fParams);
+ FreeAndNil(fWhere);
+ FreeAndNil(fDynamicWhere);
+ inherited;
+end;
+
+function TDAESQLCommand.GetWhere: TDAWhere;
+begin
+ result := fWhere;
+end;
+
+function TDAESQLCommand.GetParams: TDAParamCollection;
+begin
+ result := fParams;
+end;
+
+function TDAESQLCommand.ParamByName(const aName: string): TDAParam;
+begin
+ result := fParams.ParamByName(aName)
+end;
+
+procedure TDAESQLCommand.RefreshParams;
+var
+ lParams: TParams;
+ i: integer;
+ par: TDAParam;
+begin
+ //dsparams := GetProviderSupport.PSGetParams;
+
+ lParams := TParams.Create;
+ try
+ Params_ParseSQL(lParams, fSQL, True, fConnection.GetQuoteChars);
+
+ fParams.Clear;
+ for i := 0 to (lParams.Count - 1) do begin
+ if fParams.FindParam(lParams[i].Name) <> nil then Continue;
+ par := fParams.Add;
+ par.Name := lParams[i].Name;
+ par.DataType := intVCLTypeToDAType(lParams[i].DataType);
+ par.ParamType := TDAParamType(lParams[i].ParamType);
+ par.Size := lParams[i].Size;
+ end;
+ finally
+ lParams.Free;
+ end;
+end;
+
+procedure TDAESQLCommand.SetPrepared(Value: boolean);
+begin
+ if (fPrepared <> Value) then begin
+ fPrepared := Value;
+ if fPrepared then PrepareSQLStatement();
+ end;
+end;
+
+function TDAESQLCommand.GetPrepared: boolean;
+begin
+ result := fPrepared;
+end;
+
+procedure TDAESQLCommand.OnWhereChange(Sender: TObject);
+begin
+ Changed := true;
+ PrepareSQLStatement();
+end;
+
+function TDAESQLCommand.Execute: integer;
+var
+ startTick: cardinal;
+begin
+ //result := -1;
+ // Combines the custom WHERE statement and modifies the inner SQL
+ if fChanged then PrepareSQLStatement;
+
+ // Writes the parameter values
+ if (fParams.Count > 0) then SetParamValues(fParams) else ClearParams;
+
+ startTick := ROGetTickCount;
+ if Assigned(fOnBeforeExecute) then fOnBeforeExecute(Self);
+
+ try
+ result := DoExecute;
+ except
+ on E:Exception do begin
+ if Assigned(fOnExecuteError) then fOnExecuteError(Self, DoGetSQL, E);
+ raise;
+ end;
+ end;
+ GetParamValues(fParams);
+
+ if Assigned(fOnAfterExecute)
+ then fOnAfterExecute(Self, DoGetSQL, ROGetTickCount-startTick);
+end;
+
+procedure TDAESQLCommand.PrepareSQLStatement;
+var
+ temp, sql, wheretext: string;
+ orderbypos, wherepos: integer;
+ i: integer;
+ s: string;
+begin
+ // Commented out because done above now
+ //if not fChanged then Exit; // Avoids resetting it or repreparing
+
+ sql := fSQL;
+ try
+ fWhere.Changed := False;
+ if (fWhere.Clause = '') then Exit;
+ temp := UpperCase(sql);
+
+ // TODO: Not exactly the best way to do it. Might conflict with a field name that contains WHERE and might
+ // not work if the user writes "ORDER BY"... We'll fix later with a tokenizer or a real parser of some sort
+ orderbypos := Pos('GROUP BY', temp);
+ if (orderbypos = 0)
+ then orderbypos := Pos('ORDER BY', temp);
+ wherepos := Pos('WHERE', temp);
+
+ if (wherepos > 0) then
+ wheretext := ' AND (' + fWhere.Clause + ') '
+ else
+ wheretext := ' WHERE ' + fWhere.Clause + ' ';
+
+ if (orderbypos > 0) then
+ Insert(wheretext, sql, orderbypos) // Adds it before the Order By
+ else
+ Insert(wheretext, sql, Length(sql) + 1); // Adds it at the end since there's no Order By
+
+ finally
+ // Sets the SQL of the wrapped dataset
+ if Assigned(fConnection.fMacroProcessor) then begin
+
+ i := fConnection.fMacroProcessor.IndexOfName('Where');
+ s := GenerateDynamicWhereStatement;
+ if i = -1 then
+ fConnection.fMacroProcessor.AddVariable('Where').Value:=s
+ else
+ fConnection.fMacroProcessor.Variable[i].Value:=s;
+ SetDynamicWhereParams;
+
+
+ sql := fConnection.fMacroProcessor.Eval(sql);
+ end;
+
+ DoSetSQL(sql);
+ DoPrepare(fPrepared);
+
+ Changed := false;
+ end;
+end;
+
+function TDAESQLCommand.GetSQL: string;
+begin
+ result := fSQL
+end;
+
+procedure TDAESQLCommand.SetSQL(const Value: string);
+begin
+ if Value <> fSQL then begin
+ fSQL := Value;
+ fChanged := true;
+ FNativeDatabaseAccess.ClearFieldDefs;
+ PrepareSQLStatement();
+ end;
+end;
+
+function TDAESQLCommand.GetDataset: TDataset;
+begin
+ result := fDataset;
+end;
+
+function TDAESQLCommand.GetName: string;
+begin
+ result := fName;
+end;
+
+function TDAESQLCommand.GetOnAfterExecute: TDAAfterExecuteCommandEvent;
+begin
+ result := fOnAfterExecute
+end;
+
+function TDAESQLCommand.GetOnBeforeExecute: TDABeforeExecuteCommandEvent;
+begin
+ result := fOnBeforeExecute
+end;
+
+procedure TDAESQLCommand.SetOnAfterExecute(
+ const Value: TDAAfterExecuteCommandEvent);
+begin
+ fOnAfterExecute := Value
+end;
+
+procedure TDAESQLCommand.SetOnBeforeExecute(
+ const Value: TDABeforeExecuteCommandEvent);
+begin
+ fOnBeforeExecute := Value
+end;
+
+function TDAESQLCommand.GetOnExecuteError: TDAExecuteCommandErrorEvent;
+begin
+ result := fOnExecuteError;
+end;
+
+procedure TDAESQLCommand.SetOnExecuteError(
+ const Value: TDAExecuteCommandErrorEvent);
+begin
+ fOnExecuteError := Value;
+end;
+
+function TDAESQLCommand.intVCLTypeToDAType(
+ aFieldType: TFieldType): TDADataType;
+begin
+ Result := VCLTypeToDAType(aFieldType);
+end;
+
+function TDAESQLCommand.GetDynamicWhere: TDAWhereBuilder;
+begin
+ if fDynamicWhere = nil then fDynamicWhere := Connection.GetWhereBuilder;
+ Result:=fDynamicWhere;
+end;
+
+procedure TDAESQLCommand.SetDynamicWhere(const Value: TDAWhereBuilder);
+begin
+ if Value <> nil then
+ GetDynamicWhere.Xml := Value.Xml
+ else if fDynamicWhere <> nil then
+ FDynamicWhere.Clear;
+end;
+
+function TDAESQLCommand.GenerateDynamicWhereStatement: string;
+begin
+ if (fDynamicWhere <> nil) and not fDynamicWhere.IsEmpty then Result := fDynamicWhere.CreateWhereClause;
+ if Result = '' then Result:= ' (1=1)';
+end;
+
+function TDAESQLCommand.SQLContainsDynamicWhere: boolean;
+var
+ mac: IDAHasMacroProcessor;
+ lmp: TDASQLMacroProcessor;
+begin
+ FIsPresentDynWhereVariable:=False;
+ if Supports(fConnection, IDAHasMacroProcessor, mac) and (mac.GetMacroProcessor <> nil) then begin
+ lmp:=TDASQLMacroProcessor(mac.GetMacroProcessor.NewInstance).Create;
+ With lmp do try
+ OnUnknownIdentifier := UnknownIdentifier;
+ Eval(GetSQL);
+ finally
+ Free;
+ end;
+ end;
+ Result:= FIsPresentDynWhereVariable;
+end;
+
+function TDAESQLCommand.UnknownIdentifier(Sender: TObject; const Name,
+ OrgName: string; var Value: string): Boolean;
+begin
+ if SameText(OrgName,'WHERE') then
+ FIsPresentDynWhereVariable:=True;
+ Value := OrgName;
+ Result := True;
+end;
+
+procedure TDAESQLCommand.SetDynamicWhereParams;
+var
+ i: integer;
+ k: TDAParam;
+begin
+ if fDynamicWhere <> nil then
+ For i:=0 to fDynamicWhere.Params.Count-1 do begin
+ k:=Self.GetParams.FindParam(fDynamicWhere.Params[i].Name);
+ if k = nil then k:= Self.GetParams.Add;
+ k.AssignField(fDynamicWhere.Params[i]);
+ end;
+end;
+
+procedure TDAESQLCommand.RemoveDynamicWhereParams;
+var
+ i: integer;
+ k: TDAParam;
+begin
+ if fDynamicWhere <> nil then
+ For i:=0 to fDynamicWhere.Params.Count-1 do begin
+ k := Self.GetParams.FindParam(fDynamicWhere.Params[i].Name);
+ if k <> nil then Self.GetParams.Delete(k.Index);
+ end;
+end;
+
+procedure TDAESQLCommand.SetParamValuesStd(Params1: TDAParamCollection;
+ Params2: TParams);
+var
+ i: integer;
+ par: TDAParam;
+ outpar: TParam;
+ ft: TFieldType;
+ lParIsEmpty: Boolean;
+begin
+ for i := 0 to (Params1.Count - 1) do begin
+ par := Params1[i];
+ outpar := FindParameter(Params2,par.Name);
+ ft := DATypeToVCLType(par.DataType);
+
+ if ft = ftAutoInc then ft := ftInteger;
+
+ case par.ParamType of
+ daptInput: outpar.ParamType := ptInput;
+ daptOutput: outpar.ParamType := ptOutput;
+ daptInputOutput: outpar.ParamType := ptInputOutput;
+ daptResult: outpar.ParamType := ptResult;
+ end;
+
+ lParIsEmpty := VarIsEmpty(par.Value) or VarIsNull(par.Value);
+
+ if par.DataType = datBlob then begin
+ outpar.DataType := ftBlob;
+ if not (par.ParamType in [daptOutput, daptResult]) then begin
+ if lParIsEmpty then
+ outpar.Value := Null
+ else
+ outpar.Value := VariantBinaryToString(par.Value);
+ end;
+ end
+ else begin
+ if (outpar.DataType <> ft) and (ft <> ftUnknown) then outpar.DataType := ft;
+ if not (par.ParamType in [daptOutput, daptResult]) then outpar.Value := par.Value;
+ end;
+
+ if lParIsEmpty and (par.DataType <> datUnknown) then begin
+ if (outpar.DataType <> ft) and (ft <> ftUnknown) then outpar.DataType := ft;
+ end;
+ end;
+end;
+
+procedure TDAESQLCommand.GetParamValuesStd(Params1: TDAParamCollection;
+ Params2: TParams);
+var
+ i: integer;
+ par1: TDAParam;
+begin
+ for i := 0 to Params1.Count-1 do begin
+ par1 := Params1[i];
+ if Par1.ParamType in [daptOutput, daptInputOutput, daptResult] then
+ Par1.Value := FindParameter(Params2,Par1.Name).Value;
+ end;
+end;
+
+function TDAESQLCommand.FindParameter(const AParams: TParams;
+ const AParamName: string): TParam;
+begin
+ Result := AParams.FindParam(AParamName);
+ if Result = nil then
+ Result := AParams.FindParam('@'+AParamName);
+ if Result = nil then begin
+ if AParams.Owner is TDataSet then
+ DatabaseErrorFmt(SParameterNotFound, [AParamName], TComponent(AParams.Owner))
+ else
+ DatabaseErrorFmt(SParameterNotFound, [AParamName])
+ end;
+end;
+
+procedure TDAESQLCommand.ClearParams;
+begin
+// nothing
+end;
+
+
+function TDAESQLCommand.GetNativeObject: TObject;
+begin
+ Result:= FNativeObject;
+end;
+
+function TDAESQLCommand.CreateNativeObject(
+ aConnection: TDAEConnection): TObject;
+begin
+ Result:= fDataset;
+end;
+
+function TDAESQLCommand.CreateNativeDatabaseAccess: IDANativeDatabaseAccess;
+begin
+ Result := TDANativeDatabaseAccess_Dataset.Create(GetDataset);
+end;
+
+function TDAESQLCommand.NativeFieldCount: Integer;
+begin
+ Result := FNativeDatabaseAccess.FieldCount;
+end;
+
+function TDAESQLCommand.NativeFindField(const FieldName: string): IDANativeField;
+begin
+ Result := FNativeDatabaseAccess.FindField(FieldName);
+end;
+
+function TDAESQLCommand.GetNativeFields(Index: integer): IDANativeField;
+begin
+ Result := FNativeDatabaseAccess.GetFields(Index);
+end;
+
+function TDAESQLCommand.IsTDatasetCompatible: Boolean;
+begin
+ Result :=FNativeDatabaseAccess.IsTDatasetCompatible;
+end;
+
+function TDAESQLCommand.GetNativeFieldData(Index: Integer; var Data: pointer; var DataSize: cardinal):Boolean;
+begin
+ Result := FNativeDatabaseAccess.GetNativeFieldData(Index, Data, DataSize);
+end;
+
+function TDAESQLCommand.CanFreeNativeFieldData: Boolean;
+begin
+ Result := FNativeDatabaseAccess.CanFreeNativeFieldData;
+end;
+
+{ TDAEStoredProcedure }
+
+function TDAEStoredProcedure.CreateNativeDatabaseAccess: IDANativeDatabaseAccess;
+begin
+ Result := nil;
+end;
+
+procedure TDAEStoredProcedure.DoPrepare(Value: boolean);
+begin
+ // Stored procs don't need to be prepared
+end;
+
+procedure TDAEStoredProcedure.PrepareSQLStatement;
+begin
+ // Stored procs don't need to be prepared
+end;
+
+procedure TDAEStoredProcedure.RefreshParams;
+begin
+ raise Exception.Create('RefreshParams must be implemented in descendant.');
+end;
+
+procedure TDAEStoredProcedure.RefreshParamsStd(AParams: TParams);
+var
+ par: TDAParam;
+ i: integer;
+ lname:string;
+begin
+ fParams.Clear;
+ for i := 0 to (AParams.Count - 1) do begin
+ if (AParams[i].DataType = ftInterface) and (AParams[I].ParamType in [ptOutput, ptInputOutput, ptResult]) then Continue;
+ par := fParams.Add;
+ lName :=AParams[i].Name;
+ if Pos('@', lname) = 1 then lName:=copy(lName,2, Length(lName)-1);
+ par.Name := lName;
+ par.DataType := intVCLTypeToDAType(AParams[i].DataType);
+ par.ParamType := TDAParamType(AParams[i].ParamType);
+ par.Size := AParams[i].Size;
+ end;
+end;
+
+procedure TDAEStoredProcedure.SetSQL(const Value: string);
+begin
+ // nothing: it's removing usage of IDANativeDatabaseAccess
+end;
+
+{ TDASQLMacroProcessor }
+
+constructor TDASQLMacroProcessor.Create(const aDateFormat, aDateTimeFormat: string;
+ aDoubleQuoteStrings: boolean;
+ const aStoredProcParamsPrefix: string = '');
+begin
+ Create;
+ fDateFormat := aDateFormat;
+ fDateTimeFormat := aDateTimeFormat;
+ fDoubleQuoteStrings := aDoubleQuoteStrings;
+ fStoredProcParamPrefix := aStoredProcParamsPrefix;
+ RegisterMacros;
+end;
+
+function TDASQLMacroProcessor.FormatDate(Sender: TObject;
+ const Parameters: array of string): string;
+var
+ dte: TDateTime;
+begin
+ dte := StrToDate(StringReplace(Parameters[0], '''', '', [rfReplaceAll]));
+
+ if fDoubleQuoteStrings then
+ result := '"' + SysUtils.FormatDateTime(fDateFormat, dte) + '"'
+ else
+ result := '''' + SysUtils.FormatDateTime(fDateFormat, dte) + '''';
+end;
+
+function TDASQLMacroProcessor.FormatDateTime(Sender: TObject;
+ const Parameters: array of string): string;
+var
+ dte: TDateTime;
+begin
+ dte := StrToDateTime(StringReplace(Parameters[0], '''', '', [rfReplaceAll]));
+
+ if fDoubleQuoteStrings then
+ result := '"' + SysUtils.FormatDateTime(fDateTimeFormat, dte) + '"'
+ else
+ result := '''' + SysUtils.FormatDateTime(fDateTimeFormat, dte) + '''';
+end;
+
+procedure TDASQLMacroProcessor.RegisterMacros;
+begin
+ RegisterProc('Date', Date, 0);
+ RegisterProc('DateTime', DateTime, 0);
+ RegisterProc('AddTime', AddTime, 3);
+ RegisterProc('FormatDateTime', FormatDateTime, 1);
+ RegisterProc('FormatDate', FormatDate, 1);
+ RegisterProc('Length', Length, 1);
+ RegisterProc('LowerCase', LowerCase, 1);
+ RegisterProc('UpperCase', UpperCase, 1);
+ RegisterProc('TrimLeft', TrimLeft, 1);
+ RegisterProc('TrimRight', TrimRight, 1);
+ RegisterProc('Copy', Copy, 3);
+ RegisterProc('NoLockHint', NoLock, 0);
+end;
+
+constructor TDASQLMacroProcessor.Create;
+begin
+ inherited Create;
+ OnUnknownIdentifier := MyUnknownIdentifier;
+end;
+
+function TDASQLMacroProcessor.Date(Sender: TObject;
+ const Parameters: array of string): string;
+begin
+ result := Self.DateTime(Sender, Parameters);
+end;
+
+function TDASQLMacroProcessor.MyUnknownIdentifier(Sender: TObject;
+ const Name, OrgName: string; var Value: string): Boolean;
+begin
+ Value := OrgName;
+ Result := True;
+end;
+
+{ TDAConnectionWrapper }
+
+procedure TDAConnectionWrapper.DoConnect;
+begin
+ SetConnected(TRUE);
+end;
+
+procedure TDAConnectionWrapper.DoDisconnect;
+begin
+ SetConnected(FALSE);
+end;
+
+{$IFDEF MSWINDOWS}
+{ TDAEngineBaseObject }
+
+function TDAEngineBaseObject.InterfaceSupportsErrorInfo(const iid: TGUID): HRESULT;
+begin
+ if GetInterfaceEntry(iid) <> nil then
+ Result := S_OK
+ else
+ Result := S_FALSE;
+end;
+
+procedure TDAEngineBaseObject.OnException(const ServerClass, ExceptionClass, ErrorMessage: WideString;
+ ExceptAddr: Integer; const ErrorIID, ProgID: WideString;
+ var Handled: Integer; var Result: HRESULT);
+begin
+
+end;
+
+const
+ DA_ERROR_ID : TGUID = '{E479A438-2640-41D2-9DC6-1560C1D08B79}';
+
+function StringToWidestring(const aString: string): WideString;
+var
+ I: Integer;
+begin
+ SetLength(Result, Length(aString));
+ for i := 1 to Length(aString)-1 do
+ Result[i] := WideChar(aString[I]);
+end;
+
+function DAHandleSafeCallException(aObject:TObject; ExceptObject: TObject; ExceptAddr: Pointer): HResult;
+var
+ lClassName: string;
+ E: TObject;
+ CreateError: ICreateErrorInfo;
+ ErrorInfo: IErrorInfo;
+begin
+ {$IFDEF FPC}
+ if ExceptObject <> nil then Result := E_UNEXPECTED else // remove warnings
+ {$ENDIF}
+ Result := E_UNEXPECTED;
+ E := ExceptObject;
+ if Succeeded(CreateErrorInfo(CreateError)) then begin
+ CreateError.SetGUID(DA_ERROR_ID);
+ lClassName := aObject.ClassName;
+ if MainInstance <> HInstance then
+ lClassname := Format('%s in %s',[lClassName,ExtractFileName({$IFDEF FPC}ParamStr(0){$ELSE}GetModuleName(hInstance){$ENDIF})]);
+ CreateError.SetSource(PWideChar(StringToWidestring(E.ClassName+': '+lClassName)));
+ if E is Exception then begin
+ CreateError.SetDescription(PWideChar(WideString(Exception(E).Message)));
+ CreateError.SetHelpContext(Exception(E).HelpContext);
+ if (E is EOleSysError) and (EOleSysError(E).ErrorCode < 0) then
+ Result := EOleSysError(E).ErrorCode;
+ end;
+ if CreateError.QueryInterface(IErrorInfo, ErrorInfo) = S_OK then
+ SetErrorInfo(0, ErrorInfo);
+ end;
+end;
+
+function TDAEngineBaseObject.SafeCallException(ExceptObject: TObject; ExceptAddr: Pointer): HResult;
+begin
+ Result := DAHandleSafeCallException(self, ExceptObject, ExceptAddr);
+end;
+
+procedure DASafeCallError(ErrorCode: Integer; ErrorAddr: Pointer);
+var
+ lExceptionClass: ExceptClass;
+ p: Integer;
+ lSource: WideString;
+ ErrorInfo: IErrorInfo;
+ lDescription: WideString;
+ lGuid: TGUID;
+begin
+ if GetErrorInfo(0, ErrorInfo) = S_OK then begin
+ ErrorInfo.GetDescription(lDescription);
+ ErrorInfo.GetGUID(lGuid);
+ if IsEqualGUID(lGuid,DA_ERROR_ID) then begin
+ ErrorInfo.GetSource(lSource);
+ p := Pos(':', lSource);
+ if p > 0 then begin
+ lExceptionClass := GetExceptionClass(copy(lSource,1,p-1));
+ if Assigned(lExceptionClass) then
+ raise lExceptionClass.Create(lDescription);
+ end;
+ end;
+ raise Exception.Create(lDescription) at ErrorAddr;
+ end
+ else begin
+ raise Exception.Create('A "safecall" error occured, but the source object did not provide the proper error information. Sorry we cannot be more helpful at this time.') at ErrorAddr;
+ end;
+end;
+{$ENDIF MSWINDOWS}
+
+{ TDANativeDatabaseAccess_Dataset }
+
+function TDANativeDatabaseAccess_Dataset.CanFreeNativeFieldData: Boolean;
+begin
+ Result := True;
+end;
+
+procedure TDANativeDatabaseAccess_Dataset.ClearFieldDefs;
+begin
+ FDataset.FieldDefs.Clear;
+end;
+
+function TDANativeDatabaseAccess_Dataset.ControlsDisabled: Boolean;
+begin
+ Result := FDataset.ControlsDisabled;
+end;
+
+constructor TDANativeDatabaseAccess_Dataset.Create(ADataset: TDataSet);
+begin
+ inherited Create;
+ if ADataset = nil then DatabaseError('A dataset must be specified.');
+ FDataset := ADataset;
+ FList := TInterfaceList.Create;
+end;
+
+destructor TDANativeDatabaseAccess_Dataset.Destroy;
+begin
+ FList.Free;
+ inherited;
+end;
+
+procedure TDANativeDatabaseAccess_Dataset.DisableControls;
+begin
+ FDataset.DisableControls;
+end;
+
+procedure TDANativeDatabaseAccess_Dataset.EnableControls;
+begin
+ FDataset.EnableControls;
+end;
+
+function TDANativeDatabaseAccess_Dataset.FieldCount: Integer;
+begin
+ Result := FDataset.FieldCount;
+end;
+
+function TDANativeDatabaseAccess_Dataset.FindField(
+ const FieldName: string): IDANativeField;
+begin
+ Result := FList[FDataset.FindField(FieldName).Index] as IDANativeField;
+end;
+
+procedure TDANativeDatabaseAccess_Dataset.FreeBookmark(
+ Bookmark: TBookmark);
+begin
+ FDataset.FreeBookmark(Bookmark);
+end;
+
+function TDANativeDatabaseAccess_Dataset.GetActive: Boolean;
+begin
+ Result := FDataset.Active;
+end;
+
+function TDANativeDatabaseAccess_Dataset.GetBOF: Boolean;
+begin
+ Result := FDataset.Bof;
+end;
+
+function TDANativeDatabaseAccess_Dataset.GetBookMark: pointer;
+begin
+ Result := FDataset.GetBookmark;
+end;
+
+function TDANativeDatabaseAccess_Dataset.GetEOF: Boolean;
+begin
+ Result := FDataset.Eof;
+end;
+
+function TDANativeDatabaseAccess_Dataset.GetFieldName(
+ Index: Integer): string;
+begin
+ result := fDataset.Fields[Index].FieldName;
+end;
+
+function TDANativeDatabaseAccess_Dataset.GetFields(
+ Index: integer): IDANativeField;
+begin
+ Result := FList[Index] as IDANativeField;
+end;
+
+function TDANativeDatabaseAccess_Dataset.GetIsEmpty: boolean;
+begin
+ result := fDataset.IsEmpty;
+end;
+
+function TDANativeDatabaseAccess_Dataset.GetNativeFieldData(Index: Integer;
+ var Data:Pointer; var DataSize: cardinal): Boolean;
+var
+ str: TStream;
+ fld: TField;
+ {$IFNDEF DELPHI10UP}
+ temp: pointer;
+ {$ENDIF DELPHI10UP}
+begin
+ Data := nil;
+ DataSize := 0;
+ fld:= FDataset.Fields[Index];
+ try
+ if fld.IsBlob then begin
+ Str:= FDataset.CreateBlobStream(fld, bmRead);
+ try
+ DataSize := str.Size;
+ GetMem(Data, DataSize);
+ str.Read(Data^,Datasize);
+ finally
+ Str.Free;
+ end;
+ Result := True;
+ end
+ else if fld.DataType in [ftADT, ftArray, ftReference, ftDataSet] then begin
+ // not supported yet
+ Result := False;
+ end
+ else begin
+ DataSize := fld.DataSize;
+ GetMem(Data, DataSize);
+ {$IFNDEF DELPHI10UP}
+ if fld.DataType = ftWideString then FillChar(Data^,DataSize,0);
+ {$ENDIF DELPHI10UP}
+ Result := FDataset.GetFieldData(fld, Data, False);
+ case fld.DataType of
+ ftString,ftFixedChar: DataSize := StrLen(PAnsiChar(Data));
+ {$IFNDEF DELPHI10UP}
+ ftWideString: begin
+ DataSize := Length(PWideString(Data)^);
+ GetMem(temp, (DataSize+1)*SizeOf(WideChar));
+ Move(PWideChar(Data^)^, PWideChar(temp)^, datasize * SizeOf(WideChar));
+ PWideChar(temp)[datasize] := #0;
+ FreeMem(Data);
+ data := temp;
+ datasize := DataSize*SizeOf(WideChar);
+ end;
+ {$ENDIF DELPHI10UP}
+ end;
+ end;
+ except
+ raise;
+ end;
+end;
+
+function TDANativeDatabaseAccess_Dataset.GetNativeFieldValue(
+ Index: Integer): Variant;
+begin
+ Result := FDataset.Fields[Index].AsVariant;
+end;
+
+function TDANativeDatabaseAccess_Dataset.GetRecordCount: Integer;
+begin
+ Result := FDataset.RecordCount;
+end;
+
+function TDANativeDatabaseAccess_Dataset.GetState: TDatasetState;
+begin
+ Result := FDataset.State;
+end;
+
+procedure TDANativeDatabaseAccess_Dataset.GotoBookmark(
+ Bookmark: TBookmark);
+begin
+ FDataset.GotoBookmark(Bookmark);
+end;
+
+function TDANativeDatabaseAccess_Dataset.IsTDatasetCompatible: Boolean;
+begin
+ Result := True;
+end;
+
+function TDANativeDatabaseAccess_Dataset.Locate(const KeyFields: string;
+ const KeyValues: Variant; Options: TLocateOptions): Boolean;
+begin
+ Result := FDataset.Locate(KeyFields, KeyValues, Options);
+end;
+
+function TDANativeDatabaseAccess_Dataset.Lookup(const KeyFields: string;
+ const KeyValues: Variant; const ResultFields: string): Variant;
+begin
+ Result := FDataset.Lookup(KeyFields, KeyValues, ResultFields);
+end;
+
+procedure TDANativeDatabaseAccess_Dataset.Next;
+begin
+ FDataset.Next;
+end;
+
+procedure TDANativeDatabaseAccess_Dataset.Prepare(const AValue: Boolean);
+begin
+ SetPropValue(fDataset, 'Prepared', aValue); // Works with ADO and IBX for now
+end;
+
+procedure TDANativeDatabaseAccess_Dataset.SetActive(const aValue: Boolean);
+var
+ i: integer;
+begin
+ fList.Clear;
+ FDataset.Active := aValue;
+ if FDataset.Active then
+ for i:=0 to FDataset.FieldCount-1 do
+ fList.Add(TDANativeField_Dataset.Create(FDataset.Fields[i]));
+end;
+
+{ TDANativeField_Dataset }
+
+constructor TDANativeField_Dataset.Create(AField: TField);
+begin
+ Inherited Create();
+ FField:= AField;
+end;
+
+function TDANativeField_Dataset.GetDataType: TFieldType;
+begin
+ Result := fField.DataType;
+end;
+
+function TDANativeField_Dataset.GetDecimalPrecision: Integer;
+begin
+{$IFDEF ftFMTBCD_Support}
+ if (fField is TFMTBCDField) then
+ Result := TFMTBCDField(fField).Precision
+ else
+{$ENDIF}
+ if (fField is TBCDField) then
+ Result := TBCDField(fField).Precision
+ else
+ Result := 0;
+end;
+
+function TDANativeField_Dataset.GetDecimalScale: Integer;
+begin
+{$IFDEF ftFMTBCD_Support}
+ if (fField is TFMTBCDField) then
+ Result := TFMTBCDField(fField).Size
+ else
+{$ENDIF FPC}
+ if (fField is TBCDField) then
+ Result := TBCDField(fField).Size
+ else
+ Result := 0;
+end;
+
+function TDANativeField_Dataset.GetFieldName: string;
+begin
+ Result := fField.FieldName;
+end;
+
+function TDANativeField_Dataset.GetNativeObject: TObject;
+begin
+ Result := FField;
+end;
+
+function TDANativeField_Dataset.GetSize: integer;
+begin
+ Result := fField.Size;
+end;
+
+function TDANativeField_Dataset.isTFieldCompatible: Boolean;
+begin
+ Result := True;
+end;
+
+procedure TDANativeField_Dataset.SetDataType(Value: TFieldType);
+begin
+ if fField is TBlobField then
+ TBlobField(fField).BlobType := Value;
+end;
+
+procedure TDANativeField_Dataset.SetDecimalPrecision(Value: integer);
+begin
+{$IFDEF ftFMTBCD_Support}
+ if (fField is TFMTBCDField) then begin
+ if TFMTBCDField(fField).Precision <> Value then
+ TFMTBCDField(fField).Precision := Value
+ end
+ else
+{$ENDIF FPC}
+ if (fField is TBCDField) then begin
+ if TBCDField(fField).Precision <> Value then
+ TBCDField(fField).Precision := Value;
+ end;
+end;
+
+procedure TDANativeField_Dataset.SetDecimalScale(Value: integer);
+begin
+{$IFDEF ftFMTBCD_Support}
+ if (fField is TFMTBCDField) then begin
+ if TFMTBCDField(fField).Size <> Value then
+ TFMTBCDField(fField).Size := Value
+ end
+ else
+{$ENDIF FPC}
+ if (fField is TBCDField) then begin
+ if TBCDField(fField).Size <> Value then
+ TBCDField(fField).Size := Value;
+ end;
+end;
+
+function TestIdentifier(const iIdentifier: string; const ReservedWords: array of string): boolean;
+var
+ L,H,I, r: Integer;
+ lIdent : string;
+begin
+ Result := False;
+ lIdent := UpperCase(iIdentifier);
+ l := 0;
+ h := Length(ReservedWords) -1;
+ while l <= h do begin
+ i := (L + H) shr 1;
+ r := CompareStr(lIdent, ReservedWords[i]);
+ if r < 0 then h := i - 1 else
+ if r > 0 then l := i + 1 else begin
+ Result := true;
+ Exit;
+ end;
+ end;
+end;
+
+{$IFDEF MSWINDOWS}
+initialization
+ SafeCallErrorProc := @DASafeCallError;
+ RegisterExceptionClass(EAbort);
+finalization
+ UnregisterExceptionClass(EAbort);
+ SafeCallErrorProc := nil;
+{$ENDIF}
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDAExceptions.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAExceptions.pas
new file mode 100644
index 0000000..2484088
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAExceptions.pas
@@ -0,0 +1,34 @@
+unit uDAExceptions;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ uROClasses;
+
+type
+ EDADatasetNotAccessible = class(EROException);
+
+implementation
+
+uses
+ uROCLient;
+
+initialization
+ RegisterExceptionClass(EDADatasetNotAccessible);
+finalization
+ UnregisterExceptionClass(EDADatasetNotAccessible);
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDAExpressionEvaluator.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAExpressionEvaluator.pas
new file mode 100644
index 0000000..2f94328
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAExpressionEvaluator.pas
@@ -0,0 +1,690 @@
+unit uDAExpressionEvaluator;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+uses
+ {$IFDEF MSWINDOWS} Windows, {$ENDIF}
+ SysUtils, Classes, uDAMacros;
+
+type
+ EDAEvaluationException = class(Exception);
+ TDAExpressionEvaluator = class;
+ TDAEEGetValue = procedure (Sender: TDAExpressionEvaluator; const aIdentifier: string; out aValue: Variant) of object;
+ TDAEEFunctionCall = procedure (Sender: TDAExpressionEvaluator; const aIdentifier: string; const Args: array of Variant; out aValue: Variant) of object;
+ TDAEEFunction = class(TObject)
+ private
+ fName: string;
+ fOnCall: TDAEEFunctionCall;
+ fNameHash: Integer;
+ procedure SetName(const Value: string);
+ public
+ property Name: string read fName write SetName;
+ property NameHash: Integer read fNameHash;
+ property OnCall: TDAEEFunctionCall read fOnCall write fOnCall;
+ end;
+
+ TDAEEFunctionList = class(TObject)
+ private
+ fItems: TList;
+ function GetCount: Integer;
+ function GetItem(i: Integer): TDAEEFunction;
+ public
+ constructor Create;
+ destructor Destroy; override;
+
+ property Count: Integer read GetCount;
+ property Items[I: Integer]: TDAEEFunction read GetItem; default;
+
+ function Add(const aName: string): TDAEEFunction;
+ procedure Delete(I: Integer);
+ procedure Clear;
+ end;
+
+ TDAExpressionEvaluator = class(TObject)
+ private
+ fOnUnknownFunctionCall: TDAEEFunctionCall;
+ fOnGetValue: TDAEEGetValue;
+ fFunctionList: TDAEEFunctionList;
+ fParser: TROPascalParser;
+ FUseTrueFalseinVariableName: boolean;
+ FUseWildcardsInEqual: boolean;
+ FStringCaseInsensitive: Boolean;
+ function EvaluateProcCall(const aIdentifier: string; const Args: Variant): Variant;
+ function EvaluateValue(const aIdentifier: string): Variant;
+
+ function Op_In(const V1, V2: Variant): Variant;
+ function Op_Like(const V1, V2: Variant): Variant;
+ function ParseBooleanExpression: Variant;
+ function ParseComparisonExpression: Variant;
+ function ParseFactor: Variant;
+ function ParseSimpleExpression: Variant;
+ function ParseTerm: Variant;
+ function CompareValues(const V1, V2: Variant): boolean;
+ function IsStringType(const V: Variant): Boolean;
+ public
+ constructor Create;
+ destructor Destroy; override;
+
+ property OnGetValue: TDAEEGetValue read fOnGetValue write fOnGetValue;
+ property OnUnknownFunctionCall: TDAEEFunctionCall read fOnUnknownFunctionCall write fOnUnknownFunctionCall;
+ property FunctionList: TDAEEFunctionList read fFunctionList;
+
+ function Evaluate(const aString: string): Variant;
+ property UseTrueFalseinVariableName: boolean read FUseTrueFalseinVariableName write FUseTrueFalseinVariableName;
+ property UseWildcardsInEqual: boolean read FUseWildcardsInEqual write FUseWildcardsInEqual;
+ property StringCaseInsensitive: Boolean read FStringCaseInsensitive write FStringCaseInsensitive;
+ end;
+
+ TDAStdExpressionEvaluator = class(TDAExpressionEvaluator)
+ private
+ procedure Convert(Sender: TDAExpressionEvaluator; const aIdentifier: string; const Args: array of Variant; out aValue: Variant);
+ procedure Len(Sender: TDAExpressionEvaluator; const aIdentifier: string; const Args: array of Variant; out aValue: Variant);
+ procedure IsNull(Sender: TDAExpressionEvaluator; const aIdentifier: string; const Args: array of Variant; out aValue: Variant);
+ procedure IIF(Sender: TDAExpressionEvaluator; const aIdentifier: string; const Args: array of Variant; out aValue: Variant);
+ procedure Trim(Sender: TDAExpressionEvaluator; const aIdentifier: string; const Args: array of Variant; out aValue: Variant);
+ procedure Substring(Sender: TDAExpressionEvaluator; const aIdentifier: string; const Args: array of Variant; out aValue: Variant);
+ public
+ constructor Create;
+ end;
+implementation
+
+uses Variants, uROClasses;
+
+{ TDAExpressionEvaluator }
+
+constructor TDAExpressionEvaluator.Create;
+begin
+ inherited Create;
+ fFunctionList := TDAEEFunctionList.Create;
+ FUseWildcardsInEqual := False;
+ FUseTrueFalseinVariableName := False;
+ FStringCaseInsensitive := False;
+end;
+
+destructor TDAExpressionEvaluator.Destroy;
+begin
+ fFunctionList.Free;
+ inherited Destroy;
+end;
+
+function TDAExpressionEvaluator.Evaluate(const aString: string): Variant;
+begin
+ fParser := TROPascalParser.Create;
+ fParser.OpenBlockEscape := true;
+ try
+ fParser.SetText(aString);
+ Result := ParseBooleanExpression;
+
+ if fParser.CurrtokenId <> CSTI_EOF then
+ raise EDAEvaluationException.Create('End of expression expected');
+ finally
+ fParser.Free;
+ end;
+end;
+
+function TDAExpressionEvaluator.EvaluateProcCall(const aIdentifier: string;
+ const Args: Variant): Variant;
+var
+ s: string;
+ h, i: Integer;
+ lFunction: TDAEEFunction;
+ lRealArgs: array of Variant;
+begin
+ if not VarIsArray(Args) then begin
+ SetLength(lRealArgs, 1);
+ lRealArgs[0] := args;
+ end else begin
+ SetLength(lRealArgs, VarArrayHighBound(Args, 1)+1);
+ for i := 0 to Length(lRealArgs) -1 do begin
+ lRealArgs[i] := Args[i];
+ end;
+ end;
+ s := FastUppercase(aIdentifier);
+ h := MakeHash(s);
+ for i := 0 to fFunctionList.Count -1 do begin
+ lFunction := fFunctionList[i];
+ if (lFunction.NameHash = h) and (lFunction.Name = s) and (assigned(lFunction.OnCall)) then begin
+ lFunction.OnCall(self, aIdentifier, lRealArgs, Result);
+ exit;
+ end;
+ end;
+ if assigned(fOnUnknownFunctionCall) then
+ fOnUnknownFunctionCall(Self, aIdentifier, Args, Result)
+ else
+ raise EDAEvaluationException('Unknown function: '+aIdentifier);
+end;
+
+function TDAExpressionEvaluator.EvaluateValue(const aIdentifier: string): Variant;
+begin
+ if FUseTrueFalseinVariableName then begin
+ if assigned(fOnGetValue) then
+ fOnGetValue(Self, aIdentifier, Result)
+ else
+ raise EDAEvaluationException('Unknown identifier: '+aIdentifier);
+ end
+ else begin
+ if SameText(aIdentifier,'TRUE') then
+ Result:= True
+ else if SameText(aIdentifier,'FALSE') then
+ Result:= False
+ else if assigned(fOnGetValue) then
+ fOnGetValue(Self, aIdentifier, Result)
+ else
+ raise EDAEvaluationException('Unknown identifier: '+aIdentifier);
+ end;
+end;
+
+function TDAExpressionEvaluator.ParseComparisonExpression: Variant;
+
+ function _IsEqual(v1, v2: variant): boolean;
+ var
+ p1, p2: boolean;
+ w1,w2: widestring;
+ begin
+ if FUseWildcardsInEqual and IsStringType(V1) and IsStringType(V2) then begin
+ w1 := VarToWideStr(V1);
+ p1 := (Length(w1) > 1) and (pos('*', w1) > 0);
+ w2 := VarToWideStr(V2);
+ p2 := (Length(w2) > 1) and (pos('*', w2) > 0);
+ if (p1 and not p2) then
+ Result := Op_Like(v2, v1)
+ else if (p2 and not p1) then
+ Result := Op_Like(v1, v2)
+ else
+ Result := CompareValues(v1, v2);
+ end
+ else
+ Result := CompareValues(v1, v2);
+ end;
+
+var
+ V1, V2: Variant;
+ lTok: TROPasToken;
+begin
+ V1 := ParseSimpleExpression;
+ lTok := fParser.CurrTokenId;
+ while (lTok = CSTII_In) or
+ (lTok = CSTII_Like) or
+ (lTok = CSTI_Greater ) or
+ (lTok = CSTI_GreaterEqual) or
+ (lTok = CSTI_Smaller ) or
+ (lTok = CSTI_SmallerEqual) or
+ (lTok = CSTI_Equal) or
+ (lTok = CSTI_NotEqual) or
+ (lTok = CSTII_IsNull) or
+ (lTok = CSTII_IsNotNull) do
+ begin
+ FParser.Next;
+ if (lTok = CSTII_IsNull) or (lTok = CSTII_IsNotNull) then begin
+ case lTok of
+ CSTII_IsNull: v1 := VarIsNull(v1);
+ CSTII_IsNotNull: v1 := not VarIsNull(v1);
+ end;
+ end
+ else begin
+ V2 := ParseSimpleExpression;
+
+ case lTok of
+ CSTII_In: V1 := Op_In(v1, v2);
+ CSTII_Like: V1 := Op_Like(v1, v2);
+ CSTI_Greater: v1 := v1 > v2;
+ CSTI_GreaterEqual: v1 := (v1 > v2) or CompareValues(v1, v2);
+ CSTI_Smaller: v1 := v1 < v2;
+ CSTI_SmallerEqual: v1 := (v1 < v2) or CompareValues(v1, v2);
+ CSTI_Equal: v1:= _isEqual(v1, v2);
+ //CSTI_notEqual:
+ else
+ v1:= not _isEqual(v1, v2);
+ end;
+ end;
+ lTok := fParser.CurrTokenId;
+ end;
+ Result := V1;
+end;
+
+function TDAExpressionEvaluator.ParseSimpleExpression: Variant;
+var
+ V1, V2: Variant;
+ lTok: TROPasToken;
+begin
+ V1 := ParseTerm;
+ lTok := fParser.CurrTokenId;
+ while (lTok = CSTI_Plus) or
+ (lTok = CSTI_Minus) do
+ begin
+ FParser.Next;
+ V2 := ParseTerm;
+
+ case lTok of
+ CSTI_Minus: V1 := V1 - V2;
+ else v1 := v1 + v2; // CSTI_plus
+ end;
+ lTok := fParser.CurrTokenId;
+ end;
+ Result := V1;
+end;
+
+function ParseDate(s: string): TDateTime;
+begin
+ s := copy(S,2,Length(s)-2);
+ if length(s) = 10 then begin
+ if (s[3] <> '/') or (s[6] <> '/') then raise EDAEvaluationException.Create('Invalid date format');
+ Result := EncodeDate(StrToInt(copy(s, 7, 4)), StrToInt(copy(S, 1, 2)), StrToInt(copy(s, 4, 2)));
+ end else
+ raise EDAEvaluationException.Create('Invalid date format');
+end;
+
+function TDAExpressionEvaluator.ParseFactor: Variant;
+var
+ tmp: TList;
+ pv: PVariant;
+ i: Integer;
+ e: Extended;
+ s: string;
+begin
+ case fParser.CurrTokenId of
+ CSTII_Not: begin
+ FParser.Next;
+ Result := not ParseFactor;
+ end;
+ CSTI_Plus: begin
+ FParser.Next;
+ Result := + ParseFactor;
+ end;
+ CSTI_Minus: begin
+ FParser.Next;
+ Result := - ParseFactor;
+ end;
+ CSTI_OpenRound: begin
+ FParser.Next;
+ Result := ParseBooleanExpression;
+ if fParser.CurrTokenId = CSTI_Comma then begin
+ tmp := TList.Create;
+ New(pv);
+ pv^ := Result;
+ tmp.Add(pv);
+ while FPArser.CurrTokenId = CSTI_Comma do begin
+ FParser.Next;
+ try
+ result := ParseBooleanExpression;
+ New(pv);
+ pv^ := Result;
+ tmp.Add(pv);
+ except
+ for i := 0 to tmp.Count -1 do begin
+ pv := tmp[i];
+ dispose(pv);
+ end;
+ tmp.Free;
+ raise;
+ end;
+ end;
+ Result := VarArrayCreate([0, tmp.Count -1], varVariant);
+ for i := 0 to tmp.Count -1 do begin
+ pv := tmp[i];
+ Result[i] := pv^;
+ dispose(pv);
+ end;
+ tmp.Free;
+ end;
+ if fParser.CurrTokenId <> CSTI_CloseRound then
+ raise EDAEvaluationException.Create('Closing parenthesis expected');
+ FParser.Next;
+ end;
+ CSTI_HexInt, CSTI_Integer: begin
+ Result := StrToInt64(FParser.OriginalToken);
+ FParser.Next;
+ end;
+ CSTI_Real: begin
+ Val(FParser.OriginalToken, e, i); Result := e;
+ FParser.Next;
+ end;
+ CSTI_String: begin
+ Result := StringReplace(FParser.OriginalToken, #39#39, #39, [rfReplaceAll]);
+ Result := Copy(Result, 2, Length(Result) -2);
+ Fparser.Next;
+ end;
+ CSTI_Date: begin
+ Result := ParseDate(FParser.OriginalToken);
+ FParser.Next;
+ end;
+ CSTI_Identifier: begin
+ s := FPArser.OriginalToken;
+ FParser.Next;
+ if FParser.CurrTokenID = CSTI_OpenRound then
+ Result := EvaluateProcCall(s, ParseFactor)
+ else
+ Result := EvaluateValue(s)
+ end;
+ else
+ raise EDAEvaluationException.Create('Syntax error');
+ end;
+end;
+
+function TDAExpressionEvaluator.ParseBooleanExpression: Variant;
+var
+ V1, V2: Variant;
+ lTok: TROPasToken;
+begin
+ V1 := ParseComparisonExpression;
+ lTok := fParser.CurrTokenId;
+ while (lTok = CSTII_and) or
+ (lTok = CSTII_or) or
+ (lTok = CSTII_xor) do
+ begin
+ FParser.Next;
+ V2 := ParseComparisonExpression;
+
+ case lTok of
+ CSTII_or: V1 := V1 or V2;
+ CSTII_xor: V1 := V1 xor V2;
+ else v1 := v1 and v2; // CSTII_and
+ end;
+ lTok := fParser.CurrTokenId;
+ end;
+ Result := V1;
+end;
+
+function TDAExpressionEvaluator.ParseTerm: Variant;
+var
+ V1, V2: Variant;
+ lTok: TROPasToken;
+begin
+ V1 := ParseFactor;
+ lTok := fParser.CurrTokenId;
+ while (lTok = CSTI_multiply) or
+ (lTok = CSTI_divide) or
+ (lTok = CSTI_Modulus) do
+ begin
+ FParser.Next;
+ V2 := ParseFactor;
+
+ case lTok of
+ CSTI_Multiply: V1 := V1 * V2;
+ CSTI_Divide: V1 := V1 / V2;
+ else v1 := v1 mod v2; // CSTI_modulus
+ end;
+ lTok := fParser.CurrTokenId;
+ end;
+ Result := V1;
+end;
+
+function TDAExpressionEvaluator.Op_In(const V1, V2: Variant): Variant;
+var
+ i: Integer;
+begin
+ if VarIsArray(V2) then begin
+ for i := VarArrayLowBound(V2, 1) to VarArrayHighBound(V2, 1) do begin
+ if CompareValues(v2[i], v1) then begin
+ Result := true;
+ exit;
+ end;
+ end;
+ Result := False;
+ end
+ else
+ raise EDAEvaluationException.Create('Array expected for IN expression');
+end;
+
+function WidePos(const iSubString, iString:WideString): Integer; overload;
+var i,j:integer;
+ LenS,LenS1:integer;
+ b: Boolean;
+begin
+ LenS1 := Length(iSubString);
+ LenS := Length(iString);
+
+ i := 1;
+ while i <= LenS-LenS1+1 do begin
+
+ { IsCandidate }
+ b := true;
+ for j := 1 to LenS1 do begin
+ if iString[i+j-1] <> iSubString[j] then begin
+ b := false;
+ break;
+ end;
+ end;
+
+ if b then begin
+ result := i;
+ exit;
+ end;
+
+ inc(i);
+ end;
+ result := 0;
+end;
+
+function TDAExpressionEvaluator.Op_Like(const V1, V2: Variant): Variant;
+var
+ w1, w2: WideString;
+begin
+ w1 := WideUppercase(VarToWideStr(V1));
+ W2 := WideUppercase(VarToWideStr(V2));
+ if Length(W2) = 0 then begin Result := False; exit; end;
+
+ if (Length(W2) > 0) and ((W2[1] = '%') or (W2[1] = '*')) then begin
+ if ((W2[Length(W2)] = '%') or (W2[Length(W2)] = '*')) then begin
+ W2 := Copy(W2, 2, Length(W2) -2);
+ Result := WidePos(W2, W1) > 0;
+ end else begin
+ W2 := Copy(W2, 2, Length(W2) -1);
+ Result := Copy(W1, LEngth(W1) - Length(W2)+1, Length(W2)) = W2;
+ end;
+ end else if (Length(W2)> 0) and ((W2[Length(W2)] = '%') or (W2[Length(W2)] = '*')) then begin
+ W2 := copy(W2, 1, Length(W2)-1);
+ result := Copy(W1, 1, Length(W2)) = W2;
+ end else
+ result := w1 = w2;
+end;
+
+function TDAExpressionEvaluator.CompareValues(const V1,
+ V2: Variant): boolean;
+begin
+ if IsStringType(V1) and IsStringType(V2) then begin
+ if (VarType(V1) = VarType(V2)) and (VarType(V2) <> varOleStr) then begin
+ if FStringCaseInsensitive then
+ Result := AnsiSameText(VarToStr(V1), VarToStr(V2))
+ else
+ Result := AnsiSameStr(VarToStr(V1), VarToStr(V2));
+ end
+ else begin
+ Result := ROWideCompare(VarToWideStr(V1), VarToWideStr(V2), FStringCaseInsensitive) = 0;
+ end;
+ end
+ else begin
+ Result := ROVariantsEqual(V1, V2);
+ end;
+end;
+
+function TDAExpressionEvaluator.IsStringType(const V: Variant): Boolean;
+begin
+ case VarType(V) of
+ varOleStr, varStrArg, varString: Result:=True;
+ else
+ Result := False;
+ end;
+end;
+
+{ TDAEEFunction }
+
+procedure TDAEEFunction.SetName(const Value: string);
+begin
+ fName := FastUppercase(Value);
+ fNameHash := MakeHash(fName);
+end;
+
+{ TDAEEFunctionList }
+
+function TDAEEFunctionList.Add(const aName: string): TDAEEFunction;
+begin
+ result := TDAEEFunction.Create;
+ Result.Name := aName;
+ fItems.Add(Result);
+end;
+
+procedure TDAEEFunctionList.Clear;
+var
+ i: Integer;
+begin
+ for i := fItems.Count -1 downto 0 do begin
+ TDAEEFunction(fItems[i]).Free;
+ end;
+ fItems.Clear;
+end;
+
+constructor TDAEEFunctionList.Create;
+begin
+ inherited Create;
+ fItems := TList.Create;
+end;
+
+procedure TDAEEFunctionList.Delete(I: Integer);
+begin
+ TDAEEFunction(fItems[i]).Free;
+ fItems.Delete(i);
+end;
+
+destructor TDAEEFunctionList.Destroy;
+begin
+ Clear;
+ fItems.Free;
+ inherited Destroy;
+end;
+
+function TDAEEFunctionList.GetCount: Integer;
+begin
+ result := fItems.Count;
+end;
+
+function TDAEEFunctionList.GetItem(i: Integer): TDAEEFunction;
+begin
+ result := TDAEEFunction(fItems[i]);
+end;
+
+{ TDAStdExpressionEvaluator }
+
+procedure TDAStdExpressionEvaluator.Convert(Sender: TDAExpressionEvaluator;
+ const aIdentifier: string; const Args: array of Variant;
+ out aValue: Variant);
+var
+ aType: TVarType;
+ s: string;
+begin
+ if Length(Args) <> 2 then raise EDAEvaluationException.Create('2 arguments expected for "Convert"');
+ s := FastUppercase(args[1]);
+ if (s = 'SYSTEM.BYTE') or (s = 'BYTE') then aType := varByte else
+ if (s = 'SYSTEM.SBYTE') or (s = 'SBYTE') then aType := varShortInt else
+ if (s = 'SYSTEM.INT16') or (s = 'INT16') then aType := varSmallint else
+ if (s = 'SYSTEM.UINT16') or (s = 'UINT16') then aType := varWord else
+ if (s = 'SYSTEM.INT32') or (s = 'INT32') then aType := varInteger else
+ if (s = 'SYSTEM.UINT32') or (s = 'UINT32') then aType := varLongWord else
+ if (s = 'SYSTEM.INT64') or (s = 'INT64') then aType := varInt64 else
+ if (s = 'SYSTEM.UINT64') or (s = 'UINT64') then aType := VarInt64 else
+ if (s = 'SYSTEM.STRING') or (s = 'STRING') then aType := varOleStr else
+ if (s = 'SYSTEM.SINGLE') or (s = 'SINGLE') then aType := varSIngle else
+ if (s = 'SYSTEM.DOUBLE') or (s = 'DOUBLE') then aType := varDouble else
+ if (s = 'SYSTEM.CHAR') or (s = 'CHAR') then aType := varOleStr else
+ if (s = 'SYSTEM.DATETIME') or (s = 'DATETIME') then aType := varDate else
+ raise EDAEvaluationException.Create('Unknown type used for conversion: "'+args[1]+'"');
+ VarCast(aValue, Args[0], aType);
+end;
+
+constructor TDAStdExpressionEvaluator.Create;
+begin
+ inherited Create;
+ FunctionList.Add('Convert').OnCall := Convert;
+ FunctionList.Add('Len').OnCall := Len;
+ FunctionList.Add('IsNull').OnCall := IsNull;
+ FunctionList.Add('IIF').OnCall := IIF;
+ FunctionList.Add('Trim').OnCall := Trim;
+ FunctionList.Add('SubString').OnCall := SubString;
+end;
+
+procedure TDAStdExpressionEvaluator.IIF(Sender: TDAExpressionEvaluator;
+ const aIdentifier: string; const Args: array of Variant;
+ out aValue: Variant);
+begin
+ if Length(Args) <> 3 then raise EDAEvaluationException.Create('3 arguments expected for "IIF"');
+ if Args[0] then
+ aValue := Args[1]
+ else
+ aValue := Args[2];
+end;
+
+procedure TDAStdExpressionEvaluator.IsNull(Sender: TDAExpressionEvaluator;
+ const aIdentifier: string; const Args: array of Variant;
+ out aValue: Variant);
+begin
+ if Length(Args) <> 2 then raise EDAEvaluationException.Create('2 arguments expected for "IsNull"');
+ if VarIsError(Args[0]) or VarIsNull(Args[0]) then
+ aValue := Args[1]
+ else
+ aValue := Args[0];
+end;
+
+procedure TDAStdExpressionEvaluator.Len(Sender: TDAExpressionEvaluator;
+ const aIdentifier: string; const Args: array of Variant;
+ out aValue: Variant);
+begin
+ if Length(Args) <> 1 then raise EDAEvaluationException.Create('1 argument expected for "Len"');
+ aValue := Length(WideString(Args[0]));
+end;
+
+procedure TDAStdExpressionEvaluator.Substring(
+ Sender: TDAExpressionEvaluator; const aIdentifier: string;
+ const Args: array of Variant; out aValue: Variant);
+var
+ w: WideString;
+ s: string;
+begin
+ if Length(Args) <> 3 then raise EDAEvaluationException.Create('3 arguments expected for "Substring"');
+ if VarType(Args[0]) = varOleStr then begin
+ w := Args[0];
+ aValue := Copy(w, Integer(args[1])-1, Integer(Args[2])); // zero based
+ end else begin
+ s := Args[0];
+ aValue := Copy(s, Integer(args[1])-1, Integer(Args[2])); // zero based
+ end;end;
+
+procedure TDAStdExpressionEvaluator.Trim(Sender: TDAExpressionEvaluator;
+ const aIdentifier: string; const Args: array of Variant;
+ out aValue: Variant);
+var
+ w: WideString;
+ s: string;
+begin
+ if Length(Args) <> 1 then raise EDAEvaluationException.Create('1 argument expected for "Trim"');
+ if VarType(Args[0]) = varOleStr then begin
+ w := Args[0];
+ while (length(w) > 0) and ((w[1] = #13) or (w[1] = #10) or (w[1] = #9) or (w[1] = #32)) do
+ Delete(w, 1, 1);
+ while (length(w) > 0) and ((w[Length(w)] = #13) or (w[Length(w)] = #10) or (w[Length(w)] = #9) or (w[Length(w)] = #32)) do
+ Delete(w, Length(w), 1);
+ aValue := w;
+ end else begin
+ s := Args[0];
+ while (length(s) > 0) and ((s[1] = #13) or (s[1] = #10) or (s[1] = #9) or (s[1] = #32)) do
+ Delete(s, 1, 1);
+ while (length(s) > 0) and ((s[Length(s)] = #13) or (s[Length(s)] = #10) or (s[Length(s)] = #9) or (s[Length(s)] = #32)) do
+ Delete(s, Length(s), 1);
+ aValue := s;
+ end;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDAHelpers.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAHelpers.pas
new file mode 100644
index 0000000..877ab10
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAHelpers.pas
@@ -0,0 +1,374 @@
+unit uDAHelpers;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ {$IFDEF MSWINDOWS}Windows,{$ENDIF}
+ uDAInterfaces, uDAInterfacesEx, uDAClasses, Classes, uDASupportClasses;
+
+function BuildSelectStatementForTable(iTableName: string; iConnection: IDAConnection): string;
+function BuildJoinedSelectStatementForTables(iTableNames: array of string; iConnection: IDAConnection): string;
+function BuildCreateStatementForTable(aDataSet:TDADataSet; const aTableName:string; iConnection: IDAConnectionModelling): string;
+function BuildExecStatementForProcedure(const iProcedureName: string; iConnection: IDAConnection): string;
+
+function QuoteIfNeeded(iTableName: string; iConnection: IDAConnection = nil): string;
+function QuoteFieldNameIfNeeded(iTableName, iFieldName: string; iConnection: IDAConnection): string;
+
+function FindUniqueName(const iBaseName:string; iCollection: TSearcheableCollection):string;
+procedure CreateNewDatasets(aSchema: TDASchema; aConnection: IDAConnection; aTables: TStrings; aCreateComandsToo: boolean=false; aCreateRelationships: boolean=false; aListCreatedDatasets:TList=nil; aShowDataset:boolean=true);
+
+function LoadHtmlFromResource(aInstance: THandle; const aName: string): string;
+
+implementation
+
+uses
+ SysUtils, uROClasses, Contnrs;
+
+function LoadHtmlFromResource(aInstance: THandle; const aName: string): string;
+{$IFDEF MSWINDOWS}
+var
+ lResource,lData: THandle;
+ p:pChar;
+{$ENDIF}
+begin
+ result := '';
+ {$IFDEF MSWINDOWS}
+ lResource := FindResource(aInstance, pChar(aName), pChar(2110));
+ if (lResource > 0) then begin
+ lData := LoadResource(aInstance, lResource);
+ p := LockResource(lData);
+ try
+ if Assigned(p) then begin
+ result := p;
+ UniqueString(result);
+ end;
+ finally
+ UnlockResource(lData)
+ end;
+ end;
+ {$ENDIF}
+end;
+
+function BuildCreateStatementForTable(aDataSet:TDADataSet; const aTableName:string; iConnection: IDAConnectionModelling): string;
+var
+ i: integer;
+ lCurrentLine, lPrimary: string;
+begin
+
+ result := 'CREATE TABLE '+QuoteIfNeeded(aTableName, iConnection)+
+ #13#10'(';
+
+ for i := 0 to (aDataSet.Fields.Count - 1) do begin
+ lCurrentLine := ' '+
+ QuoteIfNeeded(aDataSet.Fields[i].Name, iConnection)+
+ ' '+
+ iConnection.FieldToDeclaration(aDataSet.Fields[i]);
+ if (i < aDataSet.Fields.Count - 1) then lCurrentLine := lCurrentLine + ', ';
+ result := result+#13#10+lCurrentLine;
+ end;
+
+ lPrimary := '';
+ for i := 0 to (aDataSet.Fields.Count - 1) do if aDataSet.Fields[i].InPrimaryKey then begin
+ if lPrimary <> '' then lPrimary := lPrimary+','#13#10;
+ lPrimary := lPrimary+
+ ' '+
+ QuoteIfNeeded(aDataSet.Fields.Fields[i].Name, iConnection);
+ end;
+ if lPrimary <> '' then begin
+ result := result+','#13#10+
+ 'CONSTRAINT '+QuoteIfNeeded('PK_'+aTableName)+' PRIMARY KEY'#13#10+
+ ' ('#13#10+
+ lPrimary+#13#10+
+ ' )'
+ end;
+ result := result+#13#10')';
+
+end;
+
+function BuildSelectStatementForTable(iTableName: string; iConnection: IDAConnection): string;
+var
+ lFields: TDAFieldCollection;
+ i: integer;
+ lCurrentLine, lQuery: string;
+begin
+ iConnection.GetTableFields(iTableName, lFields);
+ if Assigned(lFields) then try
+
+ lCurrentLine := '';
+ lQuery := '';
+ for i := 0 to (lFields.Count - 1) do begin
+ lCurrentLine := lCurrentLine + QuoteFieldNameIfNeeded(iTableName,lFields.Fields[i].Name, iConnection);
+ if (i < lFields.Count - 1) then begin
+ lCurrentLine := lCurrentLine + ', ';
+ if Length(lCurrentLine) > 50 then begin
+ lQuery := lQuery + lCurrentLine + #13#10' ';
+ lCurrentLine := '';
+ end;
+ end;
+ end;
+ result := 'SELECT ' +
+ #13#10' ' +
+ lQuery + lCurrentLine +
+ #13#10' FROM'#13#10' ' + QuoteIfNeeded(iTableName, iConnection)+ #13#10' WHERE {Where}';
+ finally
+ FreeAndNil(lFields);
+ end
+ else begin
+ result := 'SELECT * FROM ' + QuoteIfNeeded(iTableName, iConnection)+ #13#10' WHERE {Where}';
+ end;
+end;
+
+function BuildJoinedSelectStatementForTables(iTableNames: array of string; iConnection: IDAConnection): string;
+var
+ lTableName: string;
+ lFields: TDAFieldCollection;
+ i,j: integer;
+ lCurrentLine, lQuery: string;
+begin
+ Result:='';
+ for i := Low(iTableNames) to High(iTableNames) do begin
+
+ lTableName := QuoteIfNeeded(iTableNames[i], iConnection);
+
+ if result = '' then
+ result := 'SELECT '#13#10
+ else
+ result := result+', '#13#10;
+
+ iConnection.GetTableFields(iTableNames[i], lFields);
+ if Assigned(lFields) then try
+
+ lCurrentLine := ' ';
+ lQuery := '';
+ for j := 0 to (lFields.Count - 1) do begin
+ lCurrentLine := lCurrentLine + lTableName+'.'+QuoteIfNeeded(lFields.Fields[j].Name, iConnection);
+ if (j < lFields.Count - 1) then begin
+ lCurrentLine := lCurrentLine + ', ';
+ if Length(lCurrentLine) > 50 then begin
+ lQuery := lQuery + lCurrentLine + #13#10' ';
+ lCurrentLine := '';
+ end;
+ end;
+ end;
+ result := result + lQuery + lCurrentLine;
+ finally
+ FreeAndNil(lFields);
+ end
+ else begin
+ result := result + QuoteIfNeeded(iTableNames[i], iConnection)+'*';
+ end;
+ end;
+
+ for i := Low(iTableNames) to High(iTableNames) do begin
+ if i = 0 then begin
+ result := result+#13#10' FROM '+QuoteIfNeeded(iTableNames[i], iConnection)
+ end
+ else begin
+ result := result+#13#10' LEFT OUTER JOIN '+QuoteIfNeeded(iTableNames[i], iConnection)+' ON '
+ end;
+ end;
+ result := Result + #13#10' WHERE {Where}';
+
+end;
+
+
+function BuildExecStatementForProcedure(const iProcedureName: string; iConnection: IDAConnection): string;
+var
+ lParams: TDAParamCollection;
+ lName: string;
+ i: integer;
+ lQuery: string;
+begin
+ iConnection.GetStoredProcedureParams(iProcedureName, lParams);
+ try
+ lQuery := '';
+ if lParams <> nil then begin
+ for i := 0 to (lParams.Count - 1) do begin
+ lName := ':' + QuoteIfNeeded(lParams.Params[i].Name, iConnection);
+ if not (lParams.Params[i].ParamType in [daptInput, daptInputOutput]) then continue;
+ if lQuery <> '' then lQuery := lQuery + ', ';
+ lQuery := lQuery + lName;
+ end;
+ end;
+ Result := iConnection.GetSPSelectSyntax(lQuery <> '');
+ if Result = '' then
+ Result := 'EXEC {0} {1}';
+ Result := StringReplace(Result, '{0}', QuoteIfNeeded(iProcedureName, iConnection), []);
+ Result := StringReplace(Result, '{1}', lQuery, [rfReplaceAll]);
+ Result := StringReplace(Result, '{{', '{', [rfReplaceAll]);
+ finally
+ FreeAndNil(lParams);
+ end
+end;
+
+function QuoteFieldNameIfNeeded(iTableName, iFieldName: string; iConnection: IDAConnection): string;
+begin
+ if Assigned(iConnection) then begin
+ result := iConnection.QuoteFieldNameIfNeeded(iTableName,iFieldName);
+ end
+ else if Pos(' ', iFieldName) > 0 then begin
+ result := '"' + iFieldName + '"';
+ if Pos(' ', iTableName) > 0 then Result:= '"' + iTableName + '".'+ result;
+ end
+ else begin
+ result := iFieldName;
+ end;
+end;
+
+
+function QuoteIfNeeded(iTableName: string; iConnection: IDAConnection): string;
+begin
+ if Assigned(iConnection) then begin
+ result := iConnection.QuoteIdentifierIfNeeded(iTableName);
+ end
+ else if Pos(' ', iTableName) > 0 then begin
+ result := '"' + iTableName + '"';
+ end
+ else begin
+ result := iTableName;
+ end;
+end;
+
+function FindUniqueName(const iBaseName:string; iCollection: TSearcheableCollection):string;
+var
+ lIndex:integer;
+begin
+ result := iBaseName;
+ lIndex := 0;
+ while Assigned(iCollection.FindItem(result)) do begin
+ inc(lIndex);
+ result := iBaseName+IntToStr(lIndex);
+ end;
+end;
+
+procedure CreateNewDatasets(aSchema: TDASchema; aConnection: IDAConnection; aTables: TStrings; aCreateComandsToo: boolean=false; aCreateRelationships: boolean=false; aListCreatedDatasets:TList=nil; aShowDataset:boolean=true);
+var
+ i,j: Integer;
+ lKeys: TDADriverForeignKeyCollection;
+ lSourceTableName, lDataTableName : string;
+ lFields: TDAFieldCollection;
+ k, z : integer;
+ lNewDataset, lFKDataset, lPKDataset : TDADataset;
+ lNewDatasets: TObjectList;
+begin
+
+ // keep a listof the new datasets, so we can access them by the k index when
+ // looking for FK matches
+
+ lNewDatasets := TObjectList.Create(false);
+ try
+ for k := 0 to aTables.Count-1 do begin
+ lSourceTableName := aTables[k];
+ lDataTableName := FindUniqueName(TrimAndClean(lSourceTableName), aSchema.Datasets);
+
+ // Creates the Dataset and the fields
+ aConnection.GetTableFields(lSourceTableName, lFields);
+ lNewDataset := aSchema.Datasets.Add;
+ with lNewDataset do begin
+ Name := lDataTableName;
+ Fields.AssignFieldCollection(lFields);
+ end;
+ lNewDatasets.Add(lNewDataSet);
+
+ // Adds the SQL statement
+ with lNewDataset.Statements.Add do begin
+ if aConnection.ConnectionType <> '' then begin
+ Connection := '';
+ ConnectionType := aConnection.ConnectionType;
+ end else
+ Connection := aConnection.Name;
+ //Default := true;
+ TargetTable := lSourceTableName;
+ //SQL := 'SELECT '#13#10' ';
+ for z := 0 to (lNewDataset.Fields.Count-1) do begin
+ //SQL := SQL+newDataset.Fields[z].Name;
+ if (z < lNewDataset.Fields.Count-1) then SQL := SQL+', ';
+
+ // Creates the default mappings
+ with ColumnMappings.Add do begin
+ DatasetField := lNewDataset.Fields[z].Name;
+ TableField := lNewDataset.Fields[z].Name;
+ end;
+ end;
+ //SQL := SQL+#13#10' FROM '+QuoteIfNeeded(tblname);
+ //SQL := BuildSelectStatementForTable(lSourceTableName, aConnection);
+ StatementType := stAutoSQL;
+ end;
+
+ // activate the LAST one
+ {if aShowDataset and (k = aTables.Count-1) then begin
+ pc_MainPages.ActivePage := ts_DatasetAndCommand;
+ pc_DatasetAndCommandTop.ActivePage := ts_Dataset2;
+ pc_DatasetAndCommandBottom.ActivePage := ts_Dataset3;
+ pc_DatasetPages.ActivePage := ts_DatasetStatements;
+ ActiveControl := insp_Dataset;
+ insp_Dataset.FocusedField := SchemaModelerData.DatasetsName;
+ end;}
+
+ // Refreshes the listview
+ //SchemaModelerData.Datasets.Refresh;
+ //SchemaModelerData.Datasets.Index := lNewDataset.Index;
+
+ //if aCreateComandsToo then
+ //DropCommandNewCommandsForDataset();
+
+ end;
+
+ if aCreateRelationships then begin
+
+ aConnection.GetForeignKeys(lKeys);
+ if assigned(lKeys) then try
+ for i := 0 to lKeys.Count - 1 do begin
+ for j := 0 to lNewDatasets.Count-1 do begin
+ lFKDataset := (lNewDatasets[j] as TDADataSet);
+ if lKeys[i].FKTable = lFKDataset.Name then begin
+ for k := 0 to lNewDatasets.Count-1 do begin
+ lPKDataset := (lNewDatasets[k] as TDADataSet);
+ if lKeys[i].PKTable = lPKDataset.Name then begin
+ with aSchema.RelationShips.Add() do begin
+ Name := Format('FK_%s_%s',[lFKDataset.Name, lPKDataset.Name]);
+ MasterDatasetName := lPKDataset.Name;
+ DetailDatasetName := lFKDataset.Name;
+ MasterFields := lKeys[i].PKField;
+ DetailFields := lKeys[i].FKField;
+ end;
+ break; { break for k }
+ end;
+ end; { for k (PKDataset)}
+ break; { break for j }
+ end; { if FK matches }
+ end; { for j (FKDaatSet) }
+ end; { for i (key) }
+
+ finally
+ lKeys.Free();
+ end;
+ end;
+
+ if Assigned(aListCreatedDatasets) then begin
+ for i := 0 to lNewDataSets.Count-1 do begin
+ aListCreatedDatasets.Add(lNewDataSets[i]);
+ end; { for }
+ end;
+
+ finally
+ FreeAndNil(lNewDatasets);
+ end;
+
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDAIBInterfaces.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAIBInterfaces.pas
new file mode 100644
index 0000000..55cded8
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAIBInterfaces.pas
@@ -0,0 +1,725 @@
+unit uDAIBInterfaces;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses uROClasses, uDAInterfaces, uDAEngine;
+
+type
+ { IDAInterbaseConnection
+ For identification purposes. Implemented by all IB connections }
+ IDAInterbaseConnection = interface(IDAConnection)
+ ['{CE1B8144-4EA6-4815-ACD2-D5A4B62F2E69}']
+ end;
+
+ { IDAIBTransactionAccess
+ Interbase connections usually refer to a separate transaction object unlike all
+ the rest of data access components. If implemented, this interfaces provides access
+ to the inner transaction object. See implementation of IBX and IBO drivers. }
+ IDAIBTransactionAccess = interface
+ ['{C1BDDDD3-749A-4D25-BD1E-43715B697959}']
+ function GetTransaction: TObject; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ procedure Commit; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure CommitRetaining; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure Rollback; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure RollbackRetaining; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ property Transaction: TObject read GetTransaction;
+ end;
+
+ { IDAIBConnectionProperties
+ Provides access to common properties of Interbase connections }
+ IDAIBConnectionProperties = interface
+ ['{5F001B6F-4FB6-46B7-BC27-3326C4658F75}']
+ function GetRole: string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetRole(const Value: string); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetSQLDialect: integer; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetSQLDialect(Value: integer); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ function GetCharset: string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetCharset(const Value: string); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ procedure Commit; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure CommitRetaining; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure Rollback; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure RollbackRetaining; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ property Role: string read GetRole write SetRole;
+ property SQLDialect: integer read GetSQLDialect write SetSQLDialect;
+
+ property Charset: string read GetCharset write SetCharset;
+ end;
+
+ TDAIBAuxParams = (ibxp_Role, ibxp_Dialect, ibxp_Charset);
+
+ TDAIBDriver = class(TDAEDriver)
+ protected
+ procedure GetAuxParams(const AuxDriver: string; out List: IROStrings); override;
+ function GetAvailableDriverOptions: TDAAvailableDriverOptions; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetDefaultConnectionType(const AuxDriver: string): string; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ public
+ end;
+
+ TDAIBConnection = class(TDAEConnection, IDAConnection, IDAUseGenerators, IDAFileBasedDatabase, IDAInterbaseConnection,IDACanQueryGeneratorsNames)
+ private
+ protected
+ function GetSQLDialect: integer; virtual; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}abstract;
+ // IDAConnection
+ procedure DoGetTableFields(const aTableName: string; out Fields: TDAFieldCollection); override;
+ function GetSPSelectSyntax(HasArguments: Boolean): string; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function CreateMacroProcessor: TDASQLMacroProcessor; override;
+ function DoGetLastAutoInc(const GeneratorName: string): integer; override;
+ function IdentifierNeedsQuoting(const iIdentifier: string): boolean; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure DoGetForeignKeys(out ForeignKeys: TDADriverForeignKeyCollection); override;
+ procedure DoGetTableNames(out List: IROStrings); override;
+ procedure DoGetViewNames(out List: IROStrings); override;
+ procedure DoGetStoredProcedureNames(out List: IROStrings); override;
+ // IDAUseGenerators
+ function GetNextAutoinc(const GeneratorName: string): integer; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ // IDAFileBasedDatabase
+ function GetFileExtensions: IROStrings;
+ // IDACanQueryGeneratorsNames
+ function GetGeneratorNames: IROStrings;
+ public
+ end;
+
+const
+ IBAuxParams: array[TDAIBAuxParams] of string = (
+ 'Role=',
+ 'Dialect=1,2,3',
+ 'Charset=ASCII,BIG_5,CYRL,DOS437,DOS850,DOS852,DOS857,DOS860,DOS861,DOS863, ' +
+ 'DOS865,EUCJ_0208,GB_2312,ISO8859_1,ISO8859_2,KSC_5601,NEXT,NONE, ' +
+ 'OCTETS,SJIS_0208,UNICODE_FSS,WIN1250,WIN1251,WIN1252,WIN1253,WIN1254'
+ );
+const
+ IB_DriverType = 'Interbase';
+
+procedure AddIBAuxParams(const List: IROStrings);
+
+function IB_GetFileExtensions: IROStrings;
+procedure IB_GetTableFields(const aTableName: string; Query: IDADataset; out Fields: TDAFieldCollection);
+function IB_GetSPSelectSyntax(HasArguments: Boolean): String;
+function IB_GetNextAutoinc(const GeneratorName: string; Query: IDADataset): integer;
+function IB_GetLastAutoInc(const GeneratorName: string; Query: IDADataset): integer;
+function IB_CreateMacroProcessor: TDASQLMacroProcessor;
+Procedure IB_DoGetForeignKeys(Query: IDADataset;ForeignKeys: TDADriverForeignKeyCollection);
+procedure IB_GetObjectNames(Query: IDADataset;AList: IROStrings; AObjectType: TDAObjecttype);
+function IB_IdentifierNeedsQuoting(const iIdentifier: string; ASQLDialect: integer): boolean;
+function IB_GetGeneratorNames(Query: IDADataset):IROStrings;
+
+implementation
+uses
+ SysUtils, uDAMacroProcessors;
+
+var
+ ib_reservedwords: array of string;
+
+procedure AddIBAuxParams(const List: IROStrings);
+var
+ x: TDAIBAuxParams;
+begin
+ for x := Low(TDAIBAuxParams) to High(TDAIBAuxParams) do
+ List.Add(IBAuxParams[x])
+end;
+
+function IB_GetFileExtensions: IROStrings;
+begin
+ result := TROStrings.Create;
+ result.Add('*.fdb;Firebird Database (*.fdb)');
+ result.Add('*.gdb;Interbase Database (*.gdb)');
+ result.Add('*.*;All files (*.*)');
+end;
+
+procedure IB_GetTableFields(const aTableName: string; Query: IDADataset; out Fields: TDAFieldCollection);
+const
+ IBSQL_TableInfo =
+ 'select a.rdb$field_name,a.rdb$null_flag, '+
+ 'b.rdb$field_precision, b.rdb$field_scale, ' +
+ 'b.rdb$null_flag, b.rdb$computed_source, c.rdb$type_name '+
+ 'from rdb$relation_fields a '+
+ 'left join RDB$FIELDS b on (a.rdb$field_source = b.rdb$field_name) '+
+ 'left join RDB$TYPES c on (b.rdb$field_type = c.rdb$type and c.rdb$field_name = ''RDB$FIELD_TYPE'') '+
+ 'where (a.rdb$relation_name = ''%s'')';
+ IBSQL_PRIMARYKEY =
+ 'select d.rdb$field_name from rdb$relation_constraints c '+
+ 'left join rdb$index_segments d on (c.rdb$index_name = d.rdb$index_name) '+
+ 'where (c.rdb$relation_name = ''%s'') and (c.rdb$constraint_type = ''PRIMARY KEY'')';
+var
+ fld: TDAField;
+begin
+ Fields := TDAFieldCollection.Create(nil);
+ try
+ // main info
+ Query.SQL := 'SELECT * FROM ' + aTableName;
+ Query.Open;
+ Fields.Assign(Query.Fields);
+
+ // required
+ Query.Close;
+ Query.SQL := Format(IBSQL_TableInfo,[aTableName]);
+ Query.Open;
+ While not Query.Eof do begin
+ fld := Fields.FindField(Trim(Query.Fields[0].AsString));
+ if Fld <> nil then begin
+ if Query.Fields[1].IsNull then
+ Fld.Required:=(Query.Fields[4].AsInteger = 1)
+ else
+ Fld.Required:=(Query.Fields[1].AsInteger = 1);
+ if (Query.Fields[6].AsString = 'INT64') and not Query.Fields[2].IsNull and not Query.Fields[3].IsNull then
+ fld.DataType := datDecimal;
+ if fld.DataType = datDecimal then begin
+ fld.DecimalPrecision:=Query.Fields[2].AsInteger;
+ fld.DecimalScale:=ABS(Query.Fields[3].AsInteger);
+ end;
+ if not Query.Fields[5].IsNull then begin
+ fld.ReadOnly:= True;
+ fld.LogChanges:= False;
+ end;
+ end;
+ Query.Next;
+ end;
+
+ // pk
+ Query.Close;
+ Query.SQL:= Format(IBSQL_PRIMARYKEY,[aTableName]);
+ Query.Open;
+ While not Query.Eof do begin
+ fld := Fields.FindField(Trim(Query.Fields[0].AsString));
+ if Fld <> nil then begin
+ fld.InPrimaryKey := True;
+ fld.Required := True;
+ end;
+ Query.Next;
+ end;
+ finally
+ Query := nil;
+ end;
+end;
+
+function IB_GetSPSelectSyntax(HasArguments: Boolean): String;
+begin
+ if HasArguments then
+ Result := 'SELECT * FROM {0}({1})'
+ else
+ Result := 'SELECT * FROM {0}';
+end;
+
+function IB_GetNextAutoinc(const GeneratorName: string; Query: IDADataset): integer;
+begin
+ try
+ Query.SQL:=Format('SELECT Gen_id(%s,1) FROM RDB$Database', [GeneratorName]);
+ Query.Open;
+ Result := Query.Fields[0].AsInteger;
+ finally
+ Query:=nil;
+ end;
+end;
+
+function IB_GetLastAutoInc(const GeneratorName: string;Query: IDADataset): integer;
+begin
+ try
+ Query.SQL:=Format('SELECT Gen_id(%s,0) FROM RDB$Database', [GeneratorName]);
+ Query.Open;
+ Result := Query.Fields[0].AsInteger;
+ finally
+ Query:=nil;
+ end;
+end;
+
+
+function IB_CreateMacroProcessor: TDASQLMacroProcessor;
+begin
+ result := TDAIBMacroProcessor.Create;
+end;
+
+Procedure IB_DoGetForeignKeys(Query: IDADataset;ForeignKeys: TDADriverForeignKeyCollection);
+var
+ lCurrConstraint: string;
+ lCurrFK: TDADriverForeignKey;
+const
+ sFK_SQL =
+ 'SELECT A.RDB$CONSTRAINT_NAME, A.RDB$RELATION_NAME AS TABLE_NAME, ' +
+ //A.RDB$CONSTRAINT_NAME AS FK_NAME, B.RDB$UPDATE_RULE AS UR, B.RDB$DELETE_RULE AS DR,'+
+ 'C.RDB$RELATION_NAME AS FK_TABLE, D.RDB$FIELD_NAME AS FK_FIELD, ' +
+ 'E.RDB$FIELD_NAME AS ONFIELD ' +
+ 'FROM ' +
+ 'RDB$RELATION_CONSTRAINTS A JOIN RDB$REF_CONSTRAINTS B ON (A.RDB$CONSTRAINT_NAME = B.RDB$CONSTRAINT_NAME) ' +
+ 'JOIN RDB$RELATION_CONSTRAINTS C ON (B.RDB$CONST_NAME_UQ=C.RDB$CONSTRAINT_NAME)' +
+ 'JOIN RDB$INDEX_SEGMENTS D ON (C.RDB$INDEX_NAME=D.RDB$INDEX_NAME) ' +
+ 'JOIN RDB$INDEX_SEGMENTS E ON (A.RDB$INDEX_NAME=E.RDB$INDEX_NAME) AND (D.RDB$FIELD_POSITION = E.RDB$FIELD_POSITION) ' +
+ 'WHERE (A.RDB$CONSTRAINT_TYPE = ''FOREIGN KEY'') ' +
+ 'ORDER BY A.RDB$CONSTRAINT_NAME, A.RDB$RELATION_NAME, D.RDB$FIELD_POSITION, E.RDB$FIELD_POSITION ';
+begin
+ lCurrConstraint := '';
+ lCurrFK := nil;
+ try
+ Query.SQL := sFK_SQL;
+ Query.Open;
+
+ ForeignKeys.Clear;
+ while (not Query.EOF) do begin
+
+ if lCurrConstraint <> Query.Fields[0].AsString then begin
+ lCurrConstraint := Query.Fields[0].AsString;
+
+ lCurrFK := ForeignKeys.Add();
+ with lCurrFK do begin
+ FKField := TrimRight(Query.Fields[4].AsString);
+ PKField := TrimRight(Query.Fields[3].AsString);
+ FKTable := TrimRight(Query.Fields[1].AsString);
+ PKTable := TrimRight(Query.Fields[2].AsString);
+ end;
+ end else begin
+ with lCurrFK do begin
+ FKField := FKField + ';' + TrimRight(Query.Fields[4].AsString);
+ PKField := PKField + ';' + TrimRight(Query.Fields[3].AsString);
+ end;
+ end;
+ Query.Next;
+ end;
+ finally
+ Query := nil;
+ end;
+end;
+
+procedure IB_GetObjectNames(Query: IDADataset;AList: IROStrings; AObjectType: TDAObjecttype);
+begin
+ try
+ case AObjectType of
+ dotTable: Query.SQL := 'Select RDB$RELATION_NAME from RDB$RELATIONS WHERE (RDB$VIEW_BLR is NULL) AND (RDB$SYSTEM_FLAG = 0) ORDER BY 1';
+ dotProcedure: Query.SQL := 'Select RDB$PROCEDURE_NAME from RDB$PROCEDURES ORDER BY 1';
+ dotView: Query.SQL := 'Select RDB$RELATION_NAME from RDB$RELATIONS WHERE (RDB$VIEW_BLR is not NULL) ORDER BY 1';
+ else
+ end;
+ Query.Open;
+ while not Query.EOF do begin
+ AList.Add(Trim(Query.Fields[0].AsString));
+ Query.Next;
+ end;
+ finally
+ Query:=nil;
+ end;
+end;
+
+function IB_IdentifierNeedsQuoting(const iIdentifier: string; ASQLDialect: integer): boolean;
+var
+ i: integer;
+begin
+ Result := True;
+ if (ASQLDialect >= 3) then
+ for i := 1 to Length(iIdentifier) do
+ if not CharInSet(iIdentifier[i], ['A'..'Z', '0'..'9', '_']) then Exit;
+ Result := (pos('.', iIdentifier) > 0) or TestIdentifier(iIdentifier, ib_reservedwords);
+end;
+
+function IB_GetGeneratorNames(Query: IDADataset):IROStrings;
+const
+ sql = 'SELECT RDB$GENERATOR_NAME FROM RDB$GENERATORS WHERE RDB$SYSTEM_FLAG = 0 ORDER BY RDB$GENERATOR_NAME';
+begin
+ Result:= NewROStrings;
+ try
+ Query.SQL := sql;
+ Query.Open;
+ while not Query.EOF do begin
+ Result.Add(Trim(Query.Fields[0].AsString));
+ Query.Next;
+ end;
+ finally
+ Query:=nil;
+ end;
+end;
+
+{ TDAIBConnection }
+
+
+function TDAIBConnection.CreateMacroProcessor: TDASQLMacroProcessor;
+begin
+ result := IB_CreateMacroProcessor;
+end;
+
+procedure TDAIBConnection.DoGetForeignKeys(out ForeignKeys: TDADriverForeignKeyCollection);
+begin
+ inherited;
+ IB_DoGetForeignKeys(GetDatasetClass.Create(Self),ForeignKeys);
+end;
+
+function TDAIBConnection.DoGetLastAutoInc(const GeneratorName: string): integer;
+begin
+ Result:= IB_GetLastAutoInc(GeneratorName,GetDatasetClass.Create(Self));
+end;
+
+procedure TDAIBConnection.DoGetStoredProcedureNames(out List: IROStrings);
+begin
+ inherited;
+ IB_GetObjectNames(GetDatasetClass.Create(Self),List,dotProcedure);
+end;
+
+procedure TDAIBConnection.DoGetTableFields(const aTableName: string;
+ out Fields: TDAFieldCollection);
+begin
+ IB_GetTableFields(QuoteIdentifierIfNeeded(aTableName),GetDatasetClass.Create(Self),Fields);
+end;
+
+procedure TDAIBConnection.DoGetTableNames(out List: IROStrings);
+begin
+ inherited;
+ IB_GetObjectNames(GetDatasetClass.Create(Self),List,dotTable);
+end;
+
+procedure TDAIBConnection.DoGetViewNames(out List: IROStrings);
+begin
+ inherited;
+ IB_GetObjectNames(GetDatasetClass.Create(Self),List,dotView);
+end;
+
+function TDAIBConnection.GetFileExtensions: IROStrings;
+begin
+ Result:= IB_GetFileExtensions;
+end;
+
+function TDAIBConnection.GetGeneratorNames: IROStrings;
+begin
+ Result:= IB_GetGeneratorNames(GetDatasetClass.Create(Self));
+end;
+
+function TDAIBConnection.GetNextAutoinc(const GeneratorName: string): integer;
+begin
+ Result:= IB_GetNextAutoinc(GeneratorName,GetDatasetClass.Create(Self));
+end;
+
+function TDAIBConnection.GetSPSelectSyntax(HasArguments: Boolean): string;
+begin
+ Result:= IB_GetSPSelectSyntax(HasArguments);
+end;
+
+function TDAIBConnection.IdentifierNeedsQuoting(const iIdentifier: string): boolean;
+begin
+ result := inherited IdentifierNeedsQuoting(iIdentifier);
+ if not result then result := IB_IdentifierNeedsQuoting(iIdentifier,GetSQLDialect);
+end;
+
+{ TDAIBDriver }
+
+procedure TDAIBDriver.GetAuxParams(const AuxDriver: string;
+ out List: IROStrings);
+begin
+ inherited;
+ AddIBAuxParams(List);
+end;
+
+function TDAIBDriver.GetAvailableDriverOptions: TDAAvailableDriverOptions;
+begin
+ result := [doServerName, doDatabaseName, doLogin, doCustom];
+end;
+
+function TDAIBDriver.GetDefaultConnectionType(const AuxDriver: string): string;
+begin
+ Result:= IB_DriverType;
+end;
+
+procedure ib_InitializeReservedWords;
+begin
+ SetLength(ib_reservedwords, 281);
+ // sorted with TStringList.Sort (bds2007)
+ ib_reservedwords[0] := 'ACTION';
+ ib_reservedwords[1] := 'ACTIVE';
+ ib_reservedwords[2] := 'ADD';
+ ib_reservedwords[3] := 'ADMIN';
+ ib_reservedwords[4] := 'AFTER';
+ ib_reservedwords[5] := 'ALL';
+ ib_reservedwords[6] := 'ALTER';
+ ib_reservedwords[7] := 'AND';
+ ib_reservedwords[8] := 'ANY';
+ ib_reservedwords[9] := 'AS';
+ ib_reservedwords[10] := 'ASC';
+ ib_reservedwords[11] := 'ASCENDING';
+ ib_reservedwords[12] := 'AT';
+ ib_reservedwords[13] := 'AUTO';
+ ib_reservedwords[14] := 'AUTODDL';
+ ib_reservedwords[15] := 'AVG';
+ ib_reservedwords[16] := 'BASE_NAME';
+ ib_reservedwords[17] := 'BASED';
+ ib_reservedwords[18] := 'BASENAME';
+ ib_reservedwords[19] := 'BEFORE';
+ ib_reservedwords[20] := 'BEGIN';
+ ib_reservedwords[21] := 'BETWEEN';
+ ib_reservedwords[22] := 'BLOB';
+ ib_reservedwords[23] := 'BLOBEDIT';
+ ib_reservedwords[24] := 'BUFFER';
+ ib_reservedwords[25] := 'BY';
+ ib_reservedwords[26] := 'CACHE';
+ ib_reservedwords[27] := 'CASCADE';
+ ib_reservedwords[28] := 'CAST';
+ ib_reservedwords[29] := 'CHAR';
+ ib_reservedwords[30] := 'CHAR_LENGTH';
+ ib_reservedwords[31] := 'CHARACTER';
+ ib_reservedwords[32] := 'CHARACTER_LENGTH';
+ ib_reservedwords[33] := 'CHECK';
+ ib_reservedwords[34] := 'CHECK_POINT_LEN';
+ ib_reservedwords[35] := 'CHECK_POINT_LENGTH';
+ ib_reservedwords[36] := 'CLOSE';
+ ib_reservedwords[37] := 'COLLATE';
+ ib_reservedwords[38] := 'COLLATION';
+ ib_reservedwords[39] := 'COLUMN';
+ ib_reservedwords[40] := 'COMMIT';
+ ib_reservedwords[41] := 'COMMITTED';
+ ib_reservedwords[42] := 'COMPILETIME';
+ ib_reservedwords[43] := 'COMPUTED';
+ ib_reservedwords[44] := 'CONDITIONAL';
+ ib_reservedwords[45] := 'CONNECT';
+ ib_reservedwords[46] := 'CONSTRAINT';
+ ib_reservedwords[47] := 'CONTAINING';
+ ib_reservedwords[48] := 'CONTINUE';
+ ib_reservedwords[49] := 'COUNT';
+ ib_reservedwords[50] := 'CREATE';
+ ib_reservedwords[51] := 'CSTRING';
+ ib_reservedwords[52] := 'CURRENT';
+ ib_reservedwords[53] := 'CURRENT_DATE';
+ ib_reservedwords[54] := 'CURRENT_TIME';
+ ib_reservedwords[55] := 'CURRENT_TIMESTAMP';
+ ib_reservedwords[56] := 'CURSOR';
+ ib_reservedwords[57] := 'DATABASE';
+ ib_reservedwords[58] := 'DATE';
+ ib_reservedwords[59] := 'DAY';
+ ib_reservedwords[60] := 'DB_KEY';
+ ib_reservedwords[61] := 'DEBUG';
+ ib_reservedwords[62] := 'DEC';
+ ib_reservedwords[63] := 'DECIMAL';
+ ib_reservedwords[64] := 'DECLARE';
+ ib_reservedwords[65] := 'DEFAULT';
+ ib_reservedwords[66] := 'DELETE';
+ ib_reservedwords[67] := 'DESC';
+ ib_reservedwords[68] := 'DESCENDING';
+ ib_reservedwords[69] := 'DESCRIBE';
+ ib_reservedwords[70] := 'DESCRIPTOR';
+ ib_reservedwords[71] := 'DISCONNECT';
+ ib_reservedwords[72] := 'DISPLAY';
+ ib_reservedwords[73] := 'DISTINCT';
+ ib_reservedwords[74] := 'DO';
+ ib_reservedwords[75] := 'DOMAIN';
+ ib_reservedwords[76] := 'DOUBLE';
+ ib_reservedwords[77] := 'DROP';
+ ib_reservedwords[78] := 'ECHO';
+ ib_reservedwords[79] := 'EDIT';
+ ib_reservedwords[80] := 'ELSE';
+ ib_reservedwords[81] := 'END';
+ ib_reservedwords[82] := 'ENTRY_POINT';
+ ib_reservedwords[83] := 'ESCAPE';
+ ib_reservedwords[84] := 'EVENT';
+ ib_reservedwords[85] := 'EXCEPTION';
+ ib_reservedwords[86] := 'EXECUTE';
+ ib_reservedwords[87] := 'EXISTS';
+ ib_reservedwords[88] := 'EXIT';
+ ib_reservedwords[89] := 'EXTERN';
+ ib_reservedwords[90] := 'EXTERNAL';
+ ib_reservedwords[91] := 'EXTRACT';
+ ib_reservedwords[92] := 'FETCH';
+ ib_reservedwords[93] := 'FILE';
+ ib_reservedwords[94] := 'FILTER';
+ ib_reservedwords[95] := 'FLOAT';
+ ib_reservedwords[96] := 'FOR';
+ ib_reservedwords[97] := 'FOREIGN';
+ ib_reservedwords[98] := 'FOUND';
+ ib_reservedwords[99] := 'FREE_IT';
+ ib_reservedwords[100] := 'FROM';
+ ib_reservedwords[101] := 'FULL';
+ ib_reservedwords[102] := 'FUNCTION';
+ ib_reservedwords[103] := 'GDSCODE';
+ ib_reservedwords[104] := 'GEN_ID';
+ ib_reservedwords[105] := 'GENERATOR';
+ ib_reservedwords[106] := 'GLOBAL';
+ ib_reservedwords[107] := 'GOTO';
+ ib_reservedwords[108] := 'GRANT';
+ ib_reservedwords[109] := 'GROUP';
+ ib_reservedwords[110] := 'GROUP_COMMIT_';
+ ib_reservedwords[111] := 'GROUP_COMMIT_WAIT';
+ ib_reservedwords[112] := 'HAVING';
+ ib_reservedwords[113] := 'HELP';
+ ib_reservedwords[114] := 'HOUR';
+ ib_reservedwords[115] := 'IF';
+ ib_reservedwords[116] := 'IMMEDIATE';
+ ib_reservedwords[117] := 'IN';
+ ib_reservedwords[118] := 'INACTIVE';
+ ib_reservedwords[119] := 'INDEX';
+ ib_reservedwords[120] := 'INDICATOR';
+ ib_reservedwords[121] := 'INIT';
+ ib_reservedwords[122] := 'INNER';
+ ib_reservedwords[123] := 'INPUT';
+ ib_reservedwords[124] := 'INPUT_TYPE';
+ ib_reservedwords[125] := 'INSERT';
+ ib_reservedwords[126] := 'INT';
+ ib_reservedwords[127] := 'INTEGER';
+ ib_reservedwords[128] := 'INTO';
+ ib_reservedwords[129] := 'IS';
+ ib_reservedwords[130] := 'ISOLATION';
+ ib_reservedwords[131] := 'ISQL';
+ ib_reservedwords[132] := 'JOIN';
+ ib_reservedwords[133] := 'KEY';
+ ib_reservedwords[134] := 'LC_MESSAGES';
+ ib_reservedwords[135] := 'LC_TYPE';
+ ib_reservedwords[136] := 'LEFT';
+ ib_reservedwords[137] := 'LENGTH';
+ ib_reservedwords[138] := 'LEV';
+ ib_reservedwords[139] := 'LEVEL';
+ ib_reservedwords[140] := 'LIKE';
+ ib_reservedwords[141] := 'LOG_BUF_SIZE';
+ ib_reservedwords[142] := 'LOG_BUFFER_SIZE';
+ ib_reservedwords[143] := 'LOGFILE';
+ ib_reservedwords[144] := 'LONG';
+ ib_reservedwords[145] := 'MANUAL';
+ ib_reservedwords[146] := 'MAX';
+ ib_reservedwords[147] := 'MAX_SEGMENT';
+ ib_reservedwords[148] := 'MAXIMUM';
+ ib_reservedwords[149] := 'MAXIMUM_SEGMENT';
+ ib_reservedwords[150] := 'MERGE';
+ ib_reservedwords[151] := 'MESSAGE';
+ ib_reservedwords[152] := 'MIN';
+ ib_reservedwords[153] := 'MINIMUM';
+ ib_reservedwords[154] := 'MINUTE';
+ ib_reservedwords[155] := 'MODULE_NAME';
+ ib_reservedwords[156] := 'MONTH';
+ ib_reservedwords[157] := 'NAMES';
+ ib_reservedwords[158] := 'NATIONAL';
+ ib_reservedwords[159] := 'NATURAL';
+ ib_reservedwords[160] := 'NCHAR';
+ ib_reservedwords[161] := 'NO';
+ ib_reservedwords[162] := 'NOAUTO';
+ ib_reservedwords[163] := 'NOT';
+ ib_reservedwords[164] := 'NULL';
+ ib_reservedwords[165] := 'NUM_LOG_BUFFERS';
+ ib_reservedwords[166] := 'NUM_LOG_BUFS';
+ ib_reservedwords[167] := 'NUMERIC';
+ ib_reservedwords[168] := 'OCTET_LENGTH';
+ ib_reservedwords[169] := 'OF';
+ ib_reservedwords[170] := 'ON';
+ ib_reservedwords[171] := 'ONLY';
+ ib_reservedwords[172] := 'OPEN';
+ ib_reservedwords[173] := 'OPTION';
+ ib_reservedwords[174] := 'OR';
+ ib_reservedwords[175] := 'ORDER';
+ ib_reservedwords[176] := 'OUTER';
+ ib_reservedwords[177] := 'OUTPUT';
+ ib_reservedwords[178] := 'OUTPUT_TYPE';
+ ib_reservedwords[179] := 'OVERFLOW';
+ ib_reservedwords[180] := 'PAGE';
+ ib_reservedwords[181] := 'PAGE_SIZE';
+ ib_reservedwords[182] := 'PAGELENGTH';
+ ib_reservedwords[183] := 'PAGES';
+ ib_reservedwords[184] := 'PARAMETER';
+ ib_reservedwords[185] := 'PASSWORD';
+ ib_reservedwords[186] := 'PLAN';
+ ib_reservedwords[187] := 'POSITION';
+ ib_reservedwords[188] := 'POST_EVENT';
+ ib_reservedwords[189] := 'PRECISION';
+ ib_reservedwords[190] := 'PREPARE';
+ ib_reservedwords[191] := 'PRIMARY';
+ ib_reservedwords[192] := 'PRIVILEGES';
+ ib_reservedwords[193] := 'PROCEDURE';
+ ib_reservedwords[194] := 'PROTECTED';
+ ib_reservedwords[195] := 'PUBLIC';
+ ib_reservedwords[196] := 'QUIT';
+ ib_reservedwords[197] := 'RAW_PARTITIONS';
+ ib_reservedwords[198] := 'RDB$DB_KEY';
+ ib_reservedwords[199] := 'READ';
+ ib_reservedwords[200] := 'REAL';
+ ib_reservedwords[201] := 'RECORD_VERSION';
+ ib_reservedwords[202] := 'REFERENCES';
+ ib_reservedwords[203] := 'RELEASE';
+ ib_reservedwords[204] := 'RESERV';
+ ib_reservedwords[205] := 'RESERVING';
+ ib_reservedwords[206] := 'RESTRICT';
+ ib_reservedwords[207] := 'RETAIN';
+ ib_reservedwords[208] := 'RETURN';
+ ib_reservedwords[209] := 'RETURNING_VALUES';
+ ib_reservedwords[210] := 'RETURNS';
+ ib_reservedwords[211] := 'REVOKE';
+ ib_reservedwords[212] := 'RIGHT';
+ ib_reservedwords[213] := 'ROLE';
+ ib_reservedwords[214] := 'ROLLBACK';
+ ib_reservedwords[215] := 'RUNTIME';
+ ib_reservedwords[216] := 'SCHEMA';
+ ib_reservedwords[217] := 'SECOND';
+ ib_reservedwords[218] := 'SEGMENT';
+ ib_reservedwords[219] := 'SELECT';
+ ib_reservedwords[220] := 'SET';
+ ib_reservedwords[221] := 'SHADOW';
+ ib_reservedwords[222] := 'SHARED';
+ ib_reservedwords[223] := 'SHELL';
+ ib_reservedwords[224] := 'SHOW';
+ ib_reservedwords[225] := 'SINGULAR';
+ ib_reservedwords[226] := 'SIZE';
+ ib_reservedwords[227] := 'SMALLINT';
+ ib_reservedwords[228] := 'SNAPSHOT';
+ ib_reservedwords[229] := 'SOME';
+ ib_reservedwords[230] := 'SORT';
+ ib_reservedwords[231] := 'SQLCODE';
+ ib_reservedwords[232] := 'SQLERROR';
+ ib_reservedwords[233] := 'SQLWARNING';
+ ib_reservedwords[234] := 'STABILITY';
+ ib_reservedwords[235] := 'STARTING';
+ ib_reservedwords[236] := 'STARTS';
+ ib_reservedwords[237] := 'STATEMENT';
+ ib_reservedwords[238] := 'STATIC';
+ ib_reservedwords[239] := 'STATISTICS';
+ ib_reservedwords[240] := 'SUB_TYPE';
+ ib_reservedwords[241] := 'SUM';
+ ib_reservedwords[242] := 'SUSPEND';
+ ib_reservedwords[243] := 'TABLE';
+ ib_reservedwords[244] := 'TERMINATOR';
+ ib_reservedwords[245] := 'THEN';
+ ib_reservedwords[246] := 'TIME';
+ ib_reservedwords[247] := 'TIMESTAMP';
+ ib_reservedwords[248] := 'TO';
+ ib_reservedwords[249] := 'TRANSACTION';
+ ib_reservedwords[250] := 'TRANSLATE';
+ ib_reservedwords[251] := 'TRANSLATION';
+ ib_reservedwords[252] := 'TRIGGER';
+ ib_reservedwords[253] := 'TRIM';
+ ib_reservedwords[254] := 'TYPE';
+ ib_reservedwords[255] := 'UNCOMMITTED';
+ ib_reservedwords[256] := 'UNION';
+ ib_reservedwords[257] := 'UNIQUE';
+ ib_reservedwords[258] := 'UPDATE';
+ ib_reservedwords[259] := 'UPPER';
+ ib_reservedwords[260] := 'USER';
+ ib_reservedwords[261] := 'USING';
+ ib_reservedwords[262] := 'VALUE';
+ ib_reservedwords[263] := 'VALUES';
+ ib_reservedwords[264] := 'VARCHAR';
+ ib_reservedwords[265] := 'VARIABLE';
+ ib_reservedwords[266] := 'VARYING';
+ ib_reservedwords[267] := 'VERSION';
+ ib_reservedwords[268] := 'VIEW';
+ ib_reservedwords[269] := 'WAIT';
+ ib_reservedwords[270] := 'WAIT_TIME';
+ ib_reservedwords[271] := 'WEEKDAY';
+ ib_reservedwords[272] := 'WHEN';
+ ib_reservedwords[273] := 'WHENEVER';
+ ib_reservedwords[274] := 'WHERE';
+ ib_reservedwords[275] := 'WHILE';
+ ib_reservedwords[276] := 'WITH';
+ ib_reservedwords[277] := 'WORK';
+ ib_reservedwords[278] := 'WRITE';
+ ib_reservedwords[279] := 'YEAR';
+ ib_reservedwords[280] := 'YEARDAY';
+end;
+
+initialization
+ ib_InitializeReservedWords;
+finalization
+ ib_reservedwords := nil;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDAInterfaces.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAInterfaces.pas
new file mode 100644
index 0000000..cb4ffc8
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAInterfaces.pas
@@ -0,0 +1,6587 @@
+unit uDAInterfaces;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ Classes, DB, uROClasses, SysUtils, uDASupportClasses,
+ DataAbstract3_Intf, DataAbstract4_Intf, uROXmlIntf, FMTBcd;
+
+const
+ func_GetDriverObject = 'GetDriverObject';
+ ClientFieldPrefix = '##';
+
+type
+ TDAObjecttype = (dotTable,dotProcedure, dotView);
+ TDAChangeType = (ctInsert, ctUpdate, ctDelete);
+ TDAChangeTypes = set of TDAChangeType;
+ TDAChangeStatus = (csPending, csResolved, csFailed);
+
+ TDASQLCondition = (cEqual,
+ cDifferent,
+ cMajor,
+ cLess,
+ cMajorOrEqual,
+ cLessOrEqual,
+ cLike,
+ cIn,
+ cContaining,
+ cIsNull,
+ cIsNotNull);
+
+ TDASQLOperator = (opAND,
+ opOR,
+ opNOT);
+
+ TDADefaultOperator = (doNone, doAnd, doOr);
+
+ TDABlobType = (dabtUnknown, dabtBlob, dabtMemo, dabtOraBlob, dabtOraClob, dabtGraphic, dabtTypedBinary, dabtTimestamp);
+
+ TDAJoinType = (jtInner, jtLeftOuter, jtRightOuter, jtFullOuter, jtCross);
+
+ TDARelationshipType = (rtForeignKey, rtMasterDetail);
+
+const
+ StrSQLCondition: array[TDASQLCondition] of string = (
+ '=', '<>', '>', '<', '>=', '<=', 'LIKE', 'IN', 'CONTAINING', 'IS NULL', 'IS NOT NULL');
+
+ StrSQLOperator: array[TDASQLOperator] of string = (
+ 'AND', 'OR', 'NOT');
+
+ BlobTypeMappings : array[TDABlobType] of TFieldType =
+ (ftBlob, ftBlob, ftMemo, ftOraBlob, ftOraClob, ftGraphic,ftTypedBinary, ftBlob);
+
+type
+ { Forwards }
+ IDADriver = interface;
+ IDAStoredProcedure = interface;
+ IDADataset = interface;
+ IDAConnection = interface;
+ IDASQLCommand = interface;
+ IDADataDictionary = interface;
+ IDATestableObject = interface;
+ IDAConnectionPool = interface;
+ IDAConnectionManager = interface;
+
+ TDACustomField = class;
+ TDADataset = class;
+
+ { Driver access }
+ TDAGetDriverObject = function: IDADriver; stdcall;
+
+ //TDriverErrorEvent = procedure(anErrorCode : integer; const anErrorMessage : string) of object;
+
+ EDADriverLoadException = class(Exception)
+ private
+ fErrorCode: integer;
+
+ public
+ constructor Create(anErrorCode: integer; const anErrorMessage: string);
+
+ property ErrorCode: integer read fErrorCode;
+ end;
+ EDADriverLoadExceptionClass = class of EDADriverLoadException;
+ TDADataAbstractException = EDADriverLoadException;
+ TDADataAbstractExceptionClass = class of TDADataAbstractException;
+
+ { Misc. types }
+ TDASQLStatementType = (stSQL, stStoredProcedure, stAutoSQL);
+
+ TDACommandType = (cmdInsert, cmdDelete, cmdUpdate);
+ TDACommandTypes = set of TDACommandType;
+
+ TDAPersistFormat = (pfBinary, pfXML);
+
+ TDAParamType = (daptUnknown, daptInput, daptOutput, daptInputOutput, daptResult);
+
+ TDADataType = (datUnknown,
+ datString,
+ datDateTime,
+ datFloat,
+ datCurrency,
+ datAutoInc,
+ datInteger,
+ datLargeInt,
+ datBoolean,
+ datMemo,
+ datBlob,
+ datWideString,
+ datWideMemo,
+ datLargeAutoInc,
+ datByte,
+ datShortInt,
+ datWord,
+ datSmallInt,
+ datCardinal,
+ datLargeUInt,
+ datGuid,
+ datXml,
+ datDecimal,
+ datSingleFloat);
+
+ { Forwards }
+ TDASQLCommand = class;
+ TDAStatementCollection = class;
+ TDASQLCommandCollection = class;
+ TDAParamCollection = class;
+ TDAJoinConditionCollection = class;
+ TDAUnionSourceTableCollection = class;
+
+ { TDAColumnMapping }
+ TDAColumnMapping = class(TInterfacedCollectionItem)
+ private
+ fDatasetField: string;
+ fTableField: string;
+ fSQLOrigin: string;
+ function GetSQLOrigin: string;
+ function StoreSQLOrigin: Boolean;
+ procedure SetDatasetField(const Value: string);
+ procedure SetSQLOrigin(const Value: string);
+ procedure SetTableField(const Value: string);
+
+ public
+ procedure Assign(aSource: TPersistent); override;
+ procedure AssignFieldMapping(aSource: TPersistent);
+
+ published
+ property DatasetField: string read fDatasetField write SetDatasetField;
+ property TableField: string read fTableField write SetTableField;
+ property SQLOrigin: string read GetSQLOrigin write SetSQLOrigin stored StoreSQLOrigin;
+ end;
+
+ { TDAColumnMappingCollection }
+ TDAColumnMappingCollection = class(TSearcheableCollection)
+ private
+ function GetColumnMappings(Index: integer): TDAColumnMapping;
+ procedure SetColumnMappings(Index: integer;
+ const Value: TDAColumnMapping);
+
+ protected
+ function SetItemName(anItem: TCollectionItem; const aName: string): string; override;
+ function GetItemName(anItem: TCollectionItem): string; override;
+
+ public
+ constructor Create(aOwner: TPersistent);
+
+ procedure AssignColumnMapping(aSource: TPersistent);
+
+ function Add: TDAColumnMapping; reintroduce;
+ function FindMappingByDatasetField(const aDatasetField: string): TDAColumnMapping;
+ function MappingByDatasetField(const aDatasetField: string): TDAColumnMapping;
+ function MappingByTableField(const aTableField: string): TDAColumnMapping;
+
+ property ColumnMappings[Index: integer]: TDAColumnMapping read GetColumnMappings write SetColumnMappings; default;
+ end;
+
+ { TDAStatement }
+ TDAStatement = class(TCollectionItem)
+ private
+ fSQL: string;
+ fStatementType: TDASQLStatementType;
+ fConnection: string;
+ fColumnMappings: TDAColumnMappingCollection;
+ fTargetTable: string;
+ fName: string;
+ fConnectionType: string;
+ fDefault: boolean;
+
+ procedure SetColumnMappings(const Value: TDAColumnMappingCollection);
+ function GetStatementCollection: TDAStatementCollection;
+ procedure SetSQL(const Value: string);
+ function GetNeedsParams: boolean;
+ function StoreSQL: Boolean;
+
+ protected
+ function GetDisplayName: string; override;
+
+ public
+ constructor Create(Collection: TCollection); override;
+ destructor Destroy; override;
+
+ procedure Assign(aSource: TPersistent); override;
+
+ property StatementCollection: TDAStatementCollection read GetStatementCollection;
+ property NeedsParams: boolean read GetNeedsParams;
+ published
+ property Connection: string read fConnection write fConnection;
+ property ConnectionType: string read fConnectionType write fConnectionType;
+ property Default: boolean read fDefault write fDefault default false;
+ property TargetTable: string read fTargetTable write fTargetTable;
+ property Name: string read fName write fName;
+ property SQL: string read fSQL write SetSQL stored StoreSQL;
+ property StatementType: TDASQLStatementType read fStatementType write fStatementType;
+ property ColumnMappings: TDAColumnMappingCollection read fColumnMappings write SetColumnMappings;
+ end;
+
+ { TDAStatementCollection }
+ TDAStatementCollection = class(TSearcheableCollection)
+ private
+ fSQLCommand: TDASQLCommand;
+
+ function GetStatements(Index: integer): TDAStatement;
+ procedure SetStatements(Index: integer; const Value: TDAStatement);
+
+ protected
+ function SetItemName(anItem: TCollectionItem; const aName: string): string; override;
+ function GetItemName(anItem: TCollectionItem): string; override;
+
+ public
+ constructor Create(aOwner: TPersistent; aSQLCommand: TDASQLCommand);
+
+ function Add: TDAStatement; reintroduce;
+ function FindItem(const aName: string; const aStatementName: string=''; const aConnectionType: string = ''; aReturnDefault: Boolean = false): TDAStatement; reintroduce;
+
+ function StatementByName(const aName: string): TDAStatement;
+
+ property SQLCommand: TDASQLCommand read fSQLCommand;
+ property Statements[Index: integer]: TDAStatement read GetStatements write SetStatements; default;
+ end;
+
+ { TDAUpdateRule }
+ TDAUpdateFailureBehavior = (fbRaiseException, fbLogAndContinue, fbIgnoreAndContinue);
+
+ TDAUpdateRule = class(TCollectionItem)
+ private
+ fDatasetName: string;
+ fName: string;
+ fFailureBehavior: TDAUpdateFailureBehavior;
+ fDoInsert: boolean;
+ fDoUpdate: boolean;
+ fDoDelete: boolean;
+ function GetChangeTypes: TDAChangeTypes;
+
+ protected
+ function GetDisplayName : string; override;
+
+ public
+ constructor Create(aCollection : TCollection); override;
+
+ procedure Assign(aSource: TPersistent); override;
+
+ property ChangeTypes: TDAChangeTypes read GetChangeTypes;
+
+ published
+ property Name : string read fName write fName;
+ property DoUpdate : boolean read fDoUpdate write fDoUpdate default True;
+ property DoInsert : boolean read fDoInsert write fDoInsert default True;
+ property DoDelete : boolean read fDoDelete write fDoDelete default True;
+ property DatasetName : string read fDatasetName write fDatasetName;
+
+ property FailureBehavior : TDAUpdateFailureBehavior read fFailureBehavior write fFailureBehavior;
+ end;
+
+ { TDAUpdateRuleCollection }
+ TDAUpdateRuleCollection = class(TSearcheableCollection)
+ private
+ function GetUpdateRules(Index: integer): TDAUpdateRule;
+ protected
+ function SetItemName(anItem: TCollectionItem; const aName: string): string; override;
+ function GetItemName(anItem: TCollectionItem): string; override;
+ public
+ constructor Create(aOwner : TComponent);
+
+ function Add: TDAUpdateRule; reintroduce;
+ function UpdateRuleByName(const aName : string) : TDAUpdateRule;
+
+ property UpdateRules[Index : integer] : TDAUpdateRule read GetUpdateRules; default;
+ end;
+
+ { TDABaseField }
+ TDABaseField = class(TInterfacedCollectionItem)
+ private
+ fDictionaryEntry: string;
+ fSize: integer;
+ fDescription,
+ fName: string;
+ fDataType: TDADataType;
+ fValue: Variant;
+ fBlobType: TDABlobType;
+ fGeneratorName : string;
+ FDecimalPrecision: Integer;
+ FDecimalScale: Integer;
+ //procedure FixSize;
+ procedure UpdateValueType;
+
+ protected
+ function MergeDatadictionaries: Boolean;
+ function GetBlobSize: Integer; virtual;
+ function GetName: string; virtual;
+ procedure SetName(const Value: string); virtual;
+ function GetDataType: TDADataType;
+ procedure SetDataType(aValue: TDADataType);
+ function GetSize: integer;
+ procedure SetSize(Value: integer);
+ function GetValue: Variant; virtual;
+ procedure SetValue(const aValue: Variant); virtual;
+ function GetDescription: string;
+ procedure SetDescription(const Value: string);
+ function StoreBlobType : boolean;
+ function GetBlobType: TDABlobType;
+ procedure SetBlobType(const Value: TDABlobType); virtual;
+ function GetGeneratorName: string;
+ procedure SetGeneratorName(const aValue: string);
+
+ function GetAsBoolean: boolean; virtual;
+ function GetAsCurrency: currency; virtual;
+ function GetAsDateTime: TDateTime; virtual;
+ function GetAsFloat: double; virtual;
+ function GetAsInteger: integer; virtual;
+ function GetAsString: string; virtual;
+ function GetAsVariant: variant; virtual;
+ function GetAsLargeInt: int64; virtual;
+ function GetAsWideString: Widestring; virtual;
+ function GetAsByte: Byte; virtual;
+ function GetAsCardinal: Cardinal; virtual;
+ function GetAsDecimal: TBcd; virtual;
+ function GetAsGuid: TGUID; virtual;
+ function GetAsLargeUInt: Int64; virtual;
+ function GetAsShortInt: ShortInt; virtual;
+ function GetAsSingle: Single; virtual;
+ function GetAsSmallInt: SmallInt; virtual;
+ function GetAsWord: Word; virtual;
+ function GetAsXml: IXMLNode; virtual;
+ procedure SetAsByte(const Value: Byte); virtual;
+ procedure SetAsCardinal(const Value: Cardinal); virtual;
+ procedure SetAsDecimal(const Value: TBcd); virtual;
+ procedure SetAsGuid(const Value: TGUID); virtual;
+ procedure SetAsLargeUInt(const Value: Int64); virtual;
+ procedure SetAsShortInt(const Value: ShortInt); virtual;
+ procedure SetAsSingle(const Value: Single); virtual;
+ procedure SetAsSmallInt(const Value: SmallInt); virtual;
+ procedure SetAsWord(const Value: Word); virtual;
+ procedure SetAsXml(const Value: IXMLNode); virtual;
+ procedure SetAsBoolean(const aValue: boolean); virtual;
+ procedure SetAsCurrency(const aValue: currency); virtual;
+ procedure SetAsDateTime(const aValue: TDateTime); virtual;
+ procedure SetAsString(const aValue: string); virtual;
+ procedure SetAsVariant(const aValue: variant); virtual;
+ procedure SetAsFloat(const aValue: double); virtual;
+ procedure SetAsInteger(const aValue: integer); virtual;
+ procedure SetAsLargeInt(const aValue: Int64); virtual;
+ procedure SetAsWideString(const aValue: Widestring); virtual;
+ function GetIsNull: boolean; virtual;
+
+ function StoreDataType: Boolean;
+ function StoreDescription: Boolean;
+ function StoreGeneratorName: Boolean;
+ function StoreSize: Boolean;
+ function StoreDecimalPrecision: Boolean;
+ function StoreDecimalScale: Boolean;
+
+ function GetDictionaryEntry: string;
+ procedure SetDictionaryEntry(const Value: string);
+ function FindDictionaryField: TDACustomField;
+ function GetDictionaryField: TDACustomField;
+
+ // Internal
+ function GetDisplayName: string; override;
+ procedure SetDisplayName(const Value: string); override;
+ function GetDecimalPrecision: Integer; virtual;
+ procedure SetDecimalPrecision(const Value: Integer);virtual;
+ function GetDecimalScale: Integer;virtual;
+ procedure SetDecimalScale(const Value: Integer);virtual;
+ function IsCompatibleV4: boolean; virtual;
+ public
+ property Value: Variant read GetValue write SetValue;
+
+ procedure Assign(Source: TPersistent); override;
+ procedure AssignField(Source: TDABaseField); virtual;
+
+ function HasValidDictionaryField: Boolean;
+
+ procedure Clear;
+
+ function GetNamePath: string; override;
+
+ property AsBoolean: boolean read GetAsBoolean write SetAsBoolean;
+ property AsCurrency: currency read GetAsCurrency write SetAsCurrency;
+ property AsDateTime: TDateTime read GetAsDateTime write SetAsDateTime; //null->0
+ property AsFloat: double read GetAsFloat write SetAsFloat; //null->0
+ property AsInteger: integer read GetAsInteger write SetAsInteger; //null->0
+ property AsString: string read GetAsString write SetAsString; //null->''
+ property AsVariant: variant read GetAsVariant write SetAsVariant;
+ property AsLargeInt: Int64 read GetAsLargeInt write SetAsLargeInt;
+ property AsWideString: WideString read GetAsWideString write SetAsWideString;
+ property BlobSize: Integer read GetBlobSize;
+ property IsNull: boolean read GetIsNull;
+ property AsByte: Byte read GetAsByte write SetAsByte;
+ property AsShortInt: ShortInt read GetAsShortInt write SetAsShortInt;
+ property AsWord: Word read GetAsWord write SetAsWord;
+ property AsSmallInt: SmallInt read GetAsSmallInt write SetAsSmallInt;
+ property AsCardinal: Cardinal read GetAsCardinal write SetAsCardinal;
+ property AsLargeUInt: Int64 read GetAsLargeUInt write SetAsLargeUInt;
+ property AsGuid: TGUID read GetAsGuid write SetAsGuid;
+ property AsDecimal: TBcd read GetAsDecimal write SetAsDecimal;
+ property AsXml: IXMLNode read GetAsXml write SetAsXml;
+ property AsSingle: Single read GetAsSingle write SetAsSingle;
+
+ property DictionaryEntry: string read GetDictionaryEntry write SetDictionaryEntry;
+ published
+ property Name: string read GetName write SetName;
+ property DataType: TDADataType read GetDataType write SetDataType default datUnknown;
+ property Size: integer read GetSize write SetSize default 0;
+ property Description: string read GetDescription write SetDescription;
+ property BlobType: TDABlobType read GetBlobType write SetBlobType default dabtUnknown;
+ property GeneratorName : string read GetGeneratorName write SetGeneratorName;
+ property DecimalPrecision: Integer read GetDecimalPrecision write SetDecimalPrecision stored StoreDecimalPrecision;
+ property DecimalScale: Integer read GetDecimalScale write SetDecimalScale stored StoreDecimalScale;
+ end;
+
+ { TDACustomField }
+ TDAFieldNotifyEvent = procedure(Sender: TDACustomField) of object;
+ TDAFieldGetTextEvent = procedure(Sender: TDACustomField; var Text: string; DisplayText: boolean) of object;
+ TDAFieldSetTextEvent = procedure(Sender: TDACustomField; const Text: string) of object;
+
+ TDACustomFieldCollection = class;
+
+ IDANativeField = interface;
+ IDASQLCommandNativeObject = interface;
+
+ TDACustomField = class(TDABaseField)
+ private
+ fField: TField;
+ fTableField: string;
+ fCustomAttributes: TStringList;
+
+ fRequired: boolean;
+ fInPrimaryKey: boolean;
+ fRegExpression: string;
+ fDefaultValue: string;
+ fDisplayWidth: integer;
+ fDisplayLabel: string;
+ fReadOnly: boolean;
+ fVisible: boolean;
+ fEditMask: string;
+ fLogChanges: boolean;
+ fCalculated: boolean;
+ fOnChange: TDAFieldNotifyEvent;
+ fOnValidate: TDAFieldNotifyEvent;
+ fDisplayFormat: string;
+ fBusinessClassID: string;
+ fAlignment : TAlignment;
+ fEditFormat : string;
+ fLookupCache: boolean;
+ fLookupKeyFields: string;
+ fLookupResultField: string;
+ fKeyFields: string;
+ fLookupSource: TDataSource;
+ fLookup: boolean;
+ fServerAutoRefresh: boolean;
+ fSQLOrigin: string;
+ fServerCalculated: Boolean;
+ fExpression: string;
+ FNativeField: IDANativeField;
+
+ function GetDisplayLabel: string;
+
+ function StoreDisplayLabel: Boolean;
+
+ function StoreProperties : boolean;
+
+ function GetDefaultValue: string;
+ function GetDisplayWidth: integer;
+ function GetEditMask: string;
+ function GetReadOnly: boolean;
+ function GetVisible: boolean;
+ //procedure SetBusinessRulesID(const Value: string);
+ //function GetBusinessRulesID: string;
+ function GetDisplayFormat: string;
+ function GetAlignment: TAlignment;
+ function GetEditFormat: string;
+ procedure SetAlignment(const Value: TAlignment);
+ procedure SetEditFormat(const Value: string);
+
+ procedure SetKeyFields(const Value: string);
+ procedure SetLookupCache(const Value: boolean);
+ procedure SetLookupKeyFields(const Value: string);
+ procedure SetLookupResultField(const Value: string);
+ procedure SetLookupSource(const Value: TDataSource);
+ procedure SetCalculated(const Value: boolean);
+ procedure SetLookup(const Value: boolean);
+ function GetFieldCollection: TDACustomFieldCollection;
+ {function GetNotNull: boolean;
+ procedure SetNotNull(const Value: boolean);}
+ function GetServerAutoRefresh: boolean;
+ procedure SetServerAutoRefresh(const Value: boolean);
+ function GetLogChanges: boolean;
+ function GetOldValue: Variant;
+ function GetSQLOrigin: string;
+ function GetBusinessClassID: string;
+ procedure SetBusinessClassID(const Value: string);
+ procedure SetServerCalculated(const Value: Boolean);
+ procedure SetExpression(const Value: string);
+ function StoredServerCalculated: Boolean;
+ function StoredExpression: Boolean;
+
+ protected
+ function GetOwner: TPersistent; override;
+
+ procedure SetName(const Value: string); override;
+
+ function GetInPrimaryKey: boolean;
+ function GetRegExpression: string;
+ function GetRequired: boolean;
+ procedure SetInPrimaryKey(const Value: boolean);
+ procedure SetRegExpression(const Value: string);
+ function GetBlobSize: Integer; override;
+ function GetValue: Variant; override;
+ procedure SetValue(const Value: Variant); override;
+ function GetTableField: string;
+ procedure SetTableField(const Value: string);
+ function GetCustomAttributes: TStrings;
+ procedure SetCustomAttributes(const Value: TStrings);
+ procedure SetDisplayFormat(const Value: string);
+ procedure SetBlobType(const Value: TDABlobType); override;
+
+ procedure SetRequired(const aValue: boolean);
+ procedure SetDisplayLabel(const aValue: string);
+ procedure SetVisible(const aValue: boolean);
+ procedure SetDisplayWidth(const aValue: integer);
+ procedure SetEditMask(const aValue: string);
+ procedure SetReadOnly(const aValue: boolean);
+
+ // Event hooks
+ procedure InternalOnChange(Sender: TField);
+ procedure InternalOnValidate(Sender: TField);
+
+ function GetAsBoolean: boolean; override;
+ function GetAsCurrency: currency; override;
+ function GetAsDateTime: TDateTime; override;
+ function GetAsFloat: double; override;
+ function GetAsInteger: integer; override;
+ function GetAsString: string; override;
+ function GetAsVariant: variant; override;
+ function GetAsLargeInt: int64; override;
+ function GetAsWideString: Widestring; override;
+ function GetAsByte: Byte; override;
+ function GetAsCardinal: Cardinal; override;
+ function GetAsDecimal: TBcd; override;
+ function GetAsGuid: TGUID; override;
+ function GetAsLargeUInt: Int64; override;
+ function GetAsShortInt: ShortInt; override;
+ function GetAsSingle: Single; override;
+ function GetAsSmallInt: SmallInt; override;
+ function GetAsWord: Word; override;
+ function GetAsXml: IXMLNode; override;
+ procedure SetAsByte(const Value: Byte); override;
+ procedure SetAsCardinal(const Value: Cardinal); override;
+ procedure SetAsDecimal(const Value: TBcd); override;
+ procedure SetAsGuid(const Value: TGUID); override;
+ procedure SetAsLargeUInt(const Value: Int64); override;
+ procedure SetAsShortInt(const Value: ShortInt); override;
+ procedure SetAsSingle(const Value: Single); override;
+ procedure SetAsSmallInt(const Value: SmallInt); override;
+ procedure SetAsWord(const Value: Word); override;
+ procedure SetAsXml(const Value: IXMLNode); override;
+ procedure SetAsBoolean(const aValue: boolean); override;
+ procedure SetAsCurrency(const aValue: currency); override;
+ procedure SetAsDateTime(const aValue: TDateTime); override;
+ procedure SetAsString(const aValue: string); override;
+ procedure SetAsVariant(const aValue: variant); override;
+ procedure SetAsFloat(const aValue: double); override;
+ procedure SetAsInteger(const aValue: integer); override;
+ procedure SetAsLargeInt(const aValue: Int64); override;
+ procedure SetAsWideString(const aValue: Widestring); override;
+ function GetIsNull: boolean; override;
+ function GetDecimalPrecision: Integer; override;
+ procedure SetDecimalPrecision(const Value: Integer);override;
+ function GetDecimalScale: Integer;override;
+ procedure SetDecimalScale(const Value: Integer);override;
+ function IsCompatibleV4: boolean; override;
+ public
+ constructor Create(Collection: TCollection); override;
+ destructor Destroy; override;
+
+ function GetNamePath: string; override;
+
+ procedure Bind(aField: TField); overload;
+ procedure Bind(aField: IDANativeField); overload;
+ procedure Unbind;
+
+ procedure SaveToStream(const aStream: IROStream); overload;
+ procedure LoadFromStream(const aStream: IROStream); overload;
+ procedure SaveToStream(const aStream: TStream); overload;
+ procedure LoadFromStream(const aStream: TStream); overload;
+ procedure SaveToFile(const aFileName: string);
+ procedure LoadFromFile(const aFileName: string);
+
+ property FieldCollection : TDACustomFieldCollection read GetFieldCollection;
+
+ procedure FocusControl;
+
+ property TableField: string read GetTableField write SetTableField;
+ property SQLOrigin: string read GetSQLOrigin write fSQLOrigin;
+
+ procedure Assign(Source: TPersistent); override;
+ procedure AssignField(Source: TDABaseField); override;
+
+ property OldValue : Variant read GetOldValue;
+ property BindedField: TField read FField;
+ Property BindedNativeField: IDANativeField read FNativeField;
+ public
+ property OnChange: TDAFieldNotifyEvent read fOnChange write fOnChange;
+ property OnValidate: TDAFieldNotifyEvent read fOnValidate write fOnValidate;
+
+ property InPrimaryKey: boolean read GetInPrimaryKey write SetInPrimaryKey default False;
+
+ property Calculated: boolean read fCalculated write SetCalculated default False;
+ property Expression: string read fExpression write SetExpression stored StoredExpression;
+ property ServerCalculated: Boolean read fServerCalculated write SetServerCalculated stored StoredServerCalculated default False;
+ property Lookup : boolean read fLookup write SetLookup default False;
+
+ property LookupSource : TDataSource read fLookupSource write SetLookupSource;
+ property LookupKeyFields : string read fLookupKeyFields write SetLookupKeyFields;
+ property LookupResultField : string read fLookupResultField write SetLookupResultField;
+ property KeyFields : string read fKeyFields write SetKeyFields;
+ property LookupCache : boolean read fLookupCache write SetLookupCache default False;
+
+ published
+
+ property LogChanges: boolean read GetLogChanges write fLogChanges stored StoreProperties default true;
+
+ property RegExpression: string read GetRegExpression write SetRegExpression stored StoreProperties;
+ property DefaultValue: string read GetDefaultValue write fDefaultValue stored StoreProperties;
+ property Required: boolean read GetRequired write SetRequired stored StoreProperties default FALSE;
+ property DisplayWidth: integer read GetDisplayWidth write SetDisplayWidth stored StoreProperties default 0;
+ property DisplayLabel: string read GetDisplayLabel write SetDisplayLabel stored StoreDisplayLabel;
+ property EditMask: string read GetEditMask write SetEditMask stored StoreProperties;
+ property Visible: boolean read GetVisible write SetVisible stored StoreProperties default TRUE;
+ property ReadOnly: boolean read GetReadOnly write SetReadOnly stored StoreProperties default FALSE;
+ property CustomAttributes: TStrings read GetCustomAttributes write SetCustomAttributes stored StoreProperties;
+ property DisplayFormat: string read GetDisplayFormat write SetDisplayFormat stored StoreProperties;
+ //property BusinessRulesID : string read GetBusinessRulesID write SetBusinessRulesID stored StoreProperties;
+ property BusinessClassID : string read GetBusinessClassID write SetBusinessClassID stored StoreProperties;
+ property EditFormat : string read GetEditFormat write SetEditFormat stored StoreProperties;
+ property Alignment : TAlignment read GetAlignment write SetAlignment stored StoreProperties default taLeftJustify;
+ property ServerAutoRefresh : boolean read GetServerAutoRefresh write SetServerAutoRefresh default FALSE;
+ end;
+
+ TDAField = class(TDACustomField)
+ protected
+ function GetDisplayName: string; override;
+ published
+ property DictionaryEntry;
+
+ property InPrimaryKey;
+ property Calculated;
+ property Expression;
+ property ServerCalculated;
+
+ property OnChange;
+ property OnValidate;
+
+ property Lookup;
+
+ property LookupSource;
+ property LookupKeyFields;
+ property LookupResultField;
+ property KeyFields;
+ property LookupCache;
+ end;
+
+ TDADataDictionaryField = class(TDACustomField)
+ end;
+
+ TDAFieldClass = class of TDACustomField;
+
+ { TDACustomFieldCollection }
+ TDACustomFieldCollection = class(TSearcheableInterfacedCollection)
+ private
+ fDataDictionary: IDADataDictionary;
+ fFieldEventsDisabled: boolean;
+ fFieldBeforeUpdate,
+ fFieldAfterUpdate: TDAFieldNotifyEvent;
+ fIsCompatibleV4: boolean;
+ function GetFields(Index: integer): TDACustomField;
+ procedure SetFields(Index: integer; const Value: TDACustomField);
+ protected
+ function SetItemName(anItem: TCollectionItem; const aName: string): string; override;
+ function GetItemName(anItem: TCollectionItem): string; override;
+ public
+ constructor Create(aOwner: TPersistent; aFieldClass: TDAFieldClass);
+
+ procedure Bind(aDataset: TDataset);overload;
+ procedure Bind(aNativeObject: IDASQLCommandNativeObject);overload;
+ procedure Unbind;
+
+ property FieldEventsDisabled:boolean read fFieldEventsDisabled write fFieldEventsDisabled default false;
+
+ function Add: TDAField; reintroduce; overload;
+ function Add(const aName: string; aType: TDADataType; aSize: integer = 0): TDACustomField; overload;
+
+ procedure Assign(Source: TPersistent); override;
+ procedure AssignFieldCollection(Source: TDACustomFieldCollection);
+
+ function FieldByName(const aName: string): TDACustomField;
+ function FindField(const aName: string): TDACustomField;
+
+ property DataDictionary: IDADataDictionary read fDataDictionary write fDataDictionary;
+
+ property Fields[Index: integer]: TDACustomField read GetFields write SetFields; default;
+
+ property OnFieldBeforeUpdate: TDAFieldNotifyEvent read fFieldBeforeUpdate write fFieldBeforeUpdate;
+ property OnFieldAfterUpdate: TDAFieldNotifyEvent read fFieldAfterUpdate write fFieldAfterUpdate;
+ property IsCompatibleV4: boolean read fIsCompatibleV4 write fIsCompatibleV4;
+ end;
+
+ TDAFieldCollection = class(TDACustomFieldCollection)
+ private
+ function GetFields(Index: integer): TDAField;
+ procedure SetFields(Index: integer; const Value: TDAField);
+ public
+ constructor Create(aOwner: TPersistent);
+
+ function FieldByName(const aName: string): TDAField; reintroduce;
+ function FindField(const aName: string): TDAField;
+ property Fields[Index: integer]: TDAField read GetFields write SetFields; default;
+ end;
+
+ TDADriverForeignKey = class(TInterfacedCollectionItem)
+ private
+ fValues:array[0..3] of string;
+ fName: string;
+ function GetValue(const Index: Integer): string;
+ procedure SetValue(const Index: Integer; const Value: string);
+ published
+ property Name: string read fName write fName;
+ property FKTable: string index 0 read GetValue write SetValue;
+ property PKTable: string index 1 read GetValue write SetValue;
+ property FKField: string index 2 read GetValue write SetValue;
+ property PKField: string index 3 read GetValue write SetValue;
+ end;
+
+ TDADriverForeignKeyCollection = class(TInterfacedCollection)
+ private
+ function GetForeignKeys(Index: integer): TDADriverForeignKey;
+ procedure SetForeignKeys(Index: integer; const Value: TDADriverForeignKey);
+ public
+ constructor Create(aOwner: TPersistent);
+ function Add: TDADriverForeignKey; reintroduce; overload;
+
+ //procedure Assign(Source: TPersistent); override;
+ //procedure AssignFieldCollection(Source: TDACustomFieldCollection);
+
+ property ForeignKeys[Index: integer]: TDADriverForeignKey read GetForeignKeys write SetForeignKeys; default;
+ end;
+
+ TDADataDictionaryFieldCollection = class(TDACustomFieldCollection)
+ end;
+
+ { TDAParam }
+ TDAParam = class(TDABaseField)
+ private
+ fParamType: TDAParamType;
+
+ function GetParamType: TDAParamType;
+ procedure SetParamType(Value: TDAParamType);
+ protected
+ procedure SetValue(const aValue: Variant); override;
+ public
+ procedure SaveToStream(const aStream: IROStream);
+ procedure LoadFromStream(const aStream: IROStream);
+ procedure SaveToFile(const aFileName: string);
+ procedure LoadFromFile(const aFileName: string);
+ procedure AssignField(Source: TDABaseField); override;
+ procedure AssignParam(Source: TDAParam); virtual;
+
+ published
+ property Value stored true;
+ property AsString stored false;
+ property ParamType: TDAParamType read GetParamType write SetParamType default daptUnknown;
+ end;
+
+ { TDAParamCollection }
+ TDAParamCollection = class(TSearcheableInterfacedCollection) // They are used also by the driver commands/datasets
+ private
+ function GetParams(Index: integer): TDAParam;
+ procedure SetParams(Index: integer; const Value: TDAParam);
+ function GetHasInputParams: boolean;
+
+ protected
+ function SetItemName(anItem: TCollectionItem; const aName: string): string; override;
+ function GetItemName(anItem: TCollectionItem): string; override;
+ public
+ constructor Create(aOwner: TPersistent);
+
+ procedure WriteValues(OutputParams: TParams);
+ procedure ReadValues(InputParams: TParams);
+
+ function Add: TDAParam; reintroduce;
+
+ function ParamByName(const aName: string): TDAParam;
+ function FindParam(const aParamName: string): TDAParam;
+
+ procedure Assign(Source: TPersistent); override;
+ procedure AssignParamCollection(Source: TDAParamCollection);
+
+ property Params[Index: integer]: TDAParam read GetParams write SetParams; default;
+ property HasInputParams:boolean read GetHasInputParams;
+ end;
+
+ { TDASQLCommand }
+ TDASQLCommand = class(TCollectionItem)
+ private
+ fName: string;
+ fDescription: string;
+ fStatements: TDAStatementCollection;
+ fParams: TDAParamCollection;
+ fCustomAttributes: TStrings;
+ fIsPublic: Boolean;
+
+ procedure SetName(const Value: string);
+ procedure SetCustomAttributes(const Value: TStrings);
+
+ protected
+ function GetDisplayName: string; override;
+ procedure SetDisplayName(const Value: string); override;
+ function GetParams: TDAParamCollection; virtual;
+ procedure SetParams(const Value: TDAParamCollection); virtual;
+ function GetStatements(): TDAStatementCollection; virtual;
+ procedure SetStatements(const Value: TDAStatementCollection); virtual;
+ function GetSQLCommandCollection: TDASQLCommandCollection; virtual;
+
+ public
+ constructor Create(Collection: TCollection); override;
+ destructor Destroy; override;
+
+ function ParamByName(const aName: string): TDAParam;
+
+ procedure Assign(aSource: TPersistent); override;
+
+ property SQLCommandCollection: TDASQLCommandCollection read GetSQLCommandCollection;
+
+ published
+ property IsPublic: Boolean read fIsPublic write fIsPublic default True;
+ property Params: TDAParamCollection read GetParams write SetParams;
+ property Statements: TDAStatementCollection read GetStatements write SetStatements;
+ property Name: string read fName write SetName;
+ property Description: string read fDescription write fDescription;
+ property CustomAttributes: TStrings read fCustomAttributes write SetCustomAttributes;
+ end;
+
+ TDASQLCommandClass = class of TDASQLCommand;
+
+ { TDASQLCommandCollection }
+ TDASQLCommandCollection = class(TSearcheableCollection)
+ private
+ function GetSQLCommands(Index: integer): TDASQLCommand;
+ procedure SetSQLCommands(Index: integer; const Value: TDASQLCommand);
+
+ protected
+ function GetItemClass: TDASQLCommandClass; virtual;
+ function SetItemName(anItem: TCollectionItem; const aName: string): string; override;
+ function GetItemName(anItem: TCollectionItem): string; override;
+ public
+ constructor Create(aOwner: TComponent);
+
+ function Add: TDASQLCommand; reintroduce;
+
+ function SQLCommandByName(const aName: string): TDASQLCommand;
+
+ property SQLCommands[Index: integer]: TDASQLCommand read GetSQLCommands write SetSQLCommands; default;
+ end;
+
+ TROSEScriptLanguage = (rslPascalScript);
+
+ TDABusinessRuleScript = class(TPersistent)
+ private
+ fScriptLanguage: TROSEScriptLanguage;
+ fScript: string;
+ fDescription: string;
+ published
+ property Script: string read fScript write fScript;
+ property ScriptLanguage: TROSEScriptLanguage read fScriptLanguage write fScriptLanguage default rslPascalScript;
+ property Description: string read fDescription write fDescription;
+ end;
+
+ TDAClientBusinessRuleScript = class(TDABusinessRuleScript)
+ private
+ fRunOnClientAndServer: boolean;
+ fCompileOnServer: boolean;
+ published
+ constructor Create();
+ property CompileOnServer: boolean read fCompileOnServer write fCompileOnServer default true;
+ property RunOnClientAndServer: boolean read fRunOnClientAndServer write fRunOnClientAndServer default true;
+ end;
+
+ { TDADatasetRelationship }
+ TDADatasetRelationship = class(TCollectionItem)
+ private
+ fDetailFields: string;
+ fMasterFields: string;
+ fDetailDatasetName: string;
+ fMasterDatasetName: string;
+ fName: string;
+ fDescription: string;
+ fRelationshipType: TDARelationshipType;
+ protected
+ function GetDisplayName : string; override;
+ public
+ constructor Create(Collection: TCollection); override;
+ published
+ procedure Assign(Source : TPersistent); override;
+
+ property Name : string read fName write fName;
+ property MasterDatasetName : string read fMasterDatasetName write fMasterDatasetName;
+ property MasterFields : string read fMasterFields write fMasterFields;
+ property DetailDatasetName : string read fDetailDatasetName write fDetailDatasetName;
+ property DetailFields : string read fDetailFields write fDetailFields;
+ property Description: string read fDescription write fDescription;
+ property RelationshipType: TDARelationshipType read fRelationshipType write fRelationshipType;
+ end;
+
+ { TDADatasetRelationshipList }
+ TDADatasetRelationshipList = class(TList)
+ private
+ function GetItems(Index: integer): TDADatasetRelationship;
+ protected
+ public
+ function Add(aRelationship : TDADatasetRelationship) : integer; reintroduce;
+
+ property Items[Index : integer] : TDADatasetRelationship read GetItems; default;
+ end;
+
+ { TDADatasetRelationshipCollection }
+ TDADatasetRelationshipCollection = class(TSearcheableCollection)
+ private
+ function GetRelationShips(Index: integer): TDADatasetRelationship;
+ protected
+ function SetItemName(anItem: TCollectionItem; const aName: string): string; override;
+ function GetItemName(anItem: TCollectionItem): string; override;
+ public
+ constructor Create(aOwner : TComponent);
+ procedure GetDetails(const aMasterDatasetName: string; aList: TDADatasetRelationshipList);
+
+ function Add: TDADatasetRelationship; overload;
+ function RelationshipExists(const aMasterDatasetName, aDetailDatasetName, aMasterFields, aDetailFields: string): Boolean;
+ function RelationShipByName(const aName : string) : TDADatasetRelationship;
+
+ property RelationShips[Index : integer] : TDADatasetRelationship read GetRelationShips; default;
+ end;
+
+ { TDADataset }
+ TDADataset = class(TDASQLCommand)
+ private
+ fFields: TDAFieldCollection;
+ fBusinessClassID: string;
+ fBusinessRulesServer: TDABusinessRuleScript;
+ fBusinessRulesClient: TDAClientBusinessRuleScript;
+ fReadOnly: Boolean;
+
+ procedure SetFields(const Value: TDAFieldCollection);
+ procedure SetBusinessRulesClient(const Value: TDAClientBusinessRuleScript);
+ procedure SetBusinessRulesServer(const Value: TDABusinessRuleScript);
+
+ protected
+ public
+ constructor Create(Collection: TCollection); override;
+ destructor Destroy; override;
+
+ procedure Assign(aSource: TPersistent); override;
+
+ function FieldByName(const aName: string): TDAField;
+ function FindField(const aName: string): TDAField;
+ published
+ property Fields: TDAFieldCollection read fFields write SetFields;
+ property BusinessClassID : string read fBusinessClassID write fBusinessClassID;
+ property ReadOnly: Boolean read fReadOnly write fReadOnly default False;
+
+ property BusinessRulesClient: TDAClientBusinessRuleScript read fBusinessRulesClient write SetBusinessRulesClient;
+ property BusinessRulesServer: TDABusinessRuleScript read fBusinessRulesServer write SetBusinessRulesServer;
+ end;
+
+ { TDADatasetCollection }
+ TDADatasetCollection = class(TDASQLCommandCollection)
+ private
+ function GetDatasets(Index: integer): TDADataset;
+ procedure SetDatasets(Index: integer; const Value: TDADataset);
+ protected
+ function GetItemClass: TDASQLCommandClass; override;
+
+ public
+ function Add: TDADataset; reintroduce;
+
+ function DatasetByName(const aName: string): TDADataset;
+ function FindDatasetByName(const aName: string): TDADataset;
+
+ property Datasets[Index: integer]: TDADataset read GetDatasets write SetDatasets; default;
+ end;
+
+ { TDAJoinSourceTable }
+ TDAJoinSourceTable = class(TCollectionItem)
+ private
+ fName: String;
+ fJoinType: TDAJoinType;
+ fJoinConditions: TDAJoinConditionCollection;
+ protected
+ function GetDisplayName : string; override;
+ procedure SetName(const Value: string);
+ public
+ constructor Create(Collection: TCollection); override;
+ procedure Assign(aSource: TPersistent); override;
+ published
+ property Name: string read fName write SetName;
+ property JoinType: TDAJoinType read fJoinType write fJoinType;
+ property JoinConditions: TDAJoinConditionCollection read fJoinConditions;
+ end;
+
+ { TDAJoinSourceTableCollection }
+ TDAJoinSourceTableCollection = class(TSearcheableCollection)
+ private
+ function GetJoinSourceTables(Index: integer): TDAJoinSourceTable;
+ procedure SetJoinSourceTables(Index: integer; const Value: TDAJoinSourceTable);
+ protected
+ function SetItemName(anItem: TCollectionItem; const aName: string): string; override;
+ function GetItemName(anItem: TCollectionItem): string; override;
+ public
+ constructor Create(aOwner: TPersistent);
+ function Add: TDAJoinSourceTable; reintroduce;
+ function JoinSourceTableByName(const aName: string): TDAJoinSourceTable;
+ property JoinSourceTables[Index:Integer]: TDAJoinSourceTable read GetJoinSourceTables write SetJoinSourceTables;
+ end;
+
+ { TDAJoinCondition }
+ TDAJoinCondition = class(TCollectionItem)
+ private
+ fFromTableName: String;
+ fFromFieldName: String;
+ fToTableName: String;
+ fToFieldName: String;
+ published
+ property FromTableName: String read fFromTableName write fFromTableName;
+ property FromFieldName: String read fFromFieldName write fFromFieldName;
+ property ToTableName: String read fToTableName write fToTableName;
+ property ToFieldName: String read fToFieldName write fToFieldName;
+ end;
+
+ { TDAJoinConditionCollection }
+ TDAJoinConditionCollection = class(TOwnedCollection)
+ private
+ public
+ constructor Create(aOwner: TPersistent);
+ function Add: TDAJoinCondition; reintroduce;
+ end;
+
+
+ { TDAJoinDataTable }
+ TDAJoinDataTable = class(TDADataset)
+ private
+ fMasterTable: String;
+ fJoinSourceTables: TDAJoinSourceTableCollection;
+ procedure SetJoinSourceTables(const Value: TDAJoinSourceTableCollection);
+ protected
+ function GetParams: TDAParamCollection; override;
+ procedure SetParams(const Value: TDAParamCollection); override;
+ function GetStatements(): TDAStatementCollection; override;
+ procedure SetStatements(const Value: TDAStatementCollection); override;
+ function GetSQLCommandCollection: TDASQLCommandCollection; override;
+ public
+ constructor Create(Collection: TCollection); override;
+ destructor Destroy; override;
+ procedure Assign(aSource: TPersistent); override;
+ property Params;
+ property Statements;
+ published
+ property JoinSourceTables: TDAJoinSourceTableCollection read fJoinSourceTables write SetJoinSourceTables;
+ property MasterTable: String read fMasterTable write fMasterTable;
+ end;
+
+ TDAJoinDataTableClass = class of TDAJoinDataTable;
+
+ { TDAJoinedTableCollection }
+ TDAJoinDataTableCollection = class(TSearcheableCollection)
+ private
+ function GetJoinDataTables(Index: integer): TDAJoinDataTable;
+ procedure SetJoinDataTables(Index: integer; const Value: TDAJoinDataTable);
+ protected
+ //function GetItemClass: TDAJoinedTableClass; override;
+ function SetItemName(anItem: TCollectionItem; const aName: string): string; override;
+ function GetItemName(anItem: TCollectionItem): string; override;
+ public
+ constructor Create(aOwner : TComponent);
+ function Add: TDAJoinDataTable; reintroduce;
+ function JoinTableByName(const aName: string): TDAJoinDataTable;
+ function FindJoinTableByName(const aName: string): TDAJoinDataTable;
+ property JoinTables[Index: integer]: TDAJoinDataTable read GetJoinDataTables write SetJoinDataTables; default;
+ end;
+
+ {TDAUnionSourceTable}
+ TDAUnionSourceTable = class(TCollectionItem)
+ private
+ fName: string;
+ fColumnMappings: TDAColumnMappingCollection;
+ fReadOnly: Boolean;
+ procedure SetColumnMappings(const Value: TDAColumnMappingCollection);
+ public
+ constructor Create(Collection: TCollection); override;
+ destructor Destroy; override;
+ procedure Assign(Source: TPersistent); override;
+ published
+ property Name: string read fName write fName;
+ property ColumnMappings: TDAColumnMappingCollection read fColumnMappings write SetColumnMappings;
+ property IsReadOnly: Boolean read fReadOnly write fReadOnly;
+ end;
+
+ {TDAUnionSourceTableCollection}
+ TDAUnionSourceTableCollection = class(TSearcheableCollection)
+ private
+ function GetUnionSourceTables(Index: integer): TDAUnionSourceTable;
+ protected
+ function SetItemName(anItem: TCollectionItem; const aName: string): string; override;
+ function GetItemName(anItem: TCollectionItem): string; override;
+ public
+ constructor Create(aOwner : TPersistent);
+
+ function Add: TDAUnionSourceTable; reintroduce;
+ function UnionSourceTableByName(const aName : string) : TDAUnionSourceTable;
+
+ property UnionSourceTables[Index : integer] : TDAUnionSourceTable read GetUnionSourceTables; default;
+ end;
+
+ {TDAUnionDataTable}
+ TDAUnionDataTable = class(TDADataset)
+ private
+ fDefaultSourceTable: string;
+ fSourceTables: TDAUnionSourceTableCollection;
+ procedure SetSourceTables(Value: TDAUnionSourceTableCollection);
+ protected
+ public
+ constructor Create(Collection: TCollection); override;
+ destructor Destroy; override;
+ property Params;
+ property Statements;
+ published
+ property SourceTables: TDAUnionSourceTableCollection read fSourceTables write SetSourceTables;
+ property DefaultSourceTable: String read fDefaultSourceTable write fDefaultSourceTable;
+ end;
+
+ { TDAUnionDataTableCollection }
+ TDAUnionDataTableCollection = class(TSearcheableCollection)
+ private
+ function GetUnionDataTables(Index: integer): TDAUnionDataTable;
+ procedure SetUnionDataTables(Index: integer; const Value: TDAUnionDataTable);
+ protected
+ //function GetItemClass: TDAJoinedTableClass; override;
+ function SetItemName(anItem: TCollectionItem; const aName: string): string; override;
+ function GetItemName(anItem: TCollectionItem): string; override;
+ public
+ constructor Create(aOwner : TComponent);
+ function Add: TDAUnionDataTable; reintroduce;
+ function UnionDataTableByName(const aName: string): TDAUnionDataTable;
+ function FindUnionDataTableByName(const aName: string): TDAUnionDataTable;
+ property UnionDataTables[Index: integer]: TDAUnionDataTable read GetUnionDataTables write SetUnionDataTables; default;
+ end;
+
+ { TDAConnection }
+ TDAConnection = class(TCollectionItem)
+ private
+ fDescription: string;
+ fConnectionString: string;
+ fConnectionType: string;
+ fName: string;
+ fDefault: boolean;
+ fTag: integer;
+ procedure SetDefault(const Value: boolean);
+ procedure SetName(const Value: string);
+
+ protected
+ function GetDisplayName: string; override;
+ procedure SetDisplayName(const Value: string); override;
+
+ function GetConnectionString: string; virtual;
+ procedure SetConnectionString(const aValue: string); virtual;
+
+ public
+ procedure Assign(aSource: TPersistent); override;
+
+ published
+ property Name: string read fName write SetName;
+ property ConnectionString: string read GetConnectionString write SetConnectionString;
+ property Description: string read fDescription write fDescription;
+ property ConnectionType: string read fConnectionType write fConnectionType;
+ property Default: boolean read fDefault write SetDefault default False;
+ property Tag: integer read fTag write fTag default 0;
+ end;
+
+ { TDAConnectionCollection }
+ TDAConnectionCollection = class(TSearcheableCollection)
+ private
+ function GetConnections(Index: integer): TDAConnection;
+ procedure SetConnections(Index: integer; const Value: TDAConnection);
+ procedure ClearDefaults(iExceptFor: TDAConnection);
+ protected
+ function ItemName: string; override;
+ function SetItemName(anItem: TCollectionItem; const aName: string): string; override;
+ function GetItemName(anItem: TCollectionItem): string; override;
+ public
+ constructor Create(aOwner: TPersistent);
+
+ function Add: TDAConnection; reintroduce;
+ function ConnectionByName(const aName: string): TDAConnection;
+ function FindConnection(const aName: string; const aType: string): TDAConnection;
+
+ function GetDefaultConnection : TDAConnection;
+
+ property Connections[Index: integer]: TDAConnection read GetConnections write SetConnections; default;
+ property OnItemRenamed;
+ property OnItemRemoved;
+ end;
+
+ EDADriverAlreadyLoaded = class(EDADriverLoadException);
+ EDASchemaModelerOnly = class(EDADriverLoadException);
+
+ IDADataDictionary = interface
+ ['{34078D79-6310-494C-BA92-0FC187B275BE}']
+ procedure SetFields(const Value: TDADataDictionaryFieldCollection);
+ function GetFields: TDADataDictionaryFieldCollection;
+ property Fields: TDADataDictionaryFieldCollection read GetFields write SetFields;
+ end;
+
+ IDAHasDataDictionary = interface
+ ['{A25ADACE-BBD7-4A04-84A9-B9B699389E3D}']
+ function GetDataDictionary: IDADataDictionary;
+ property DataDictionary: IDADataDictionary read GetDataDictionary;
+ end;
+ { IDADriverManager
+ Provides access to all the functionality needed to load, unload and verify drivers.
+ Access to this interface is obtained using a TDADriverManager component.
+ There can only be one driver manager loaded at any give time in one application. }
+ IDADriverManager = interface
+ ['{5B6B8C91-F91A-4A25-8B6F-CF7959275682}']
+ // Properties readers/writers
+ function GetDrivers(Index: integer): IDADriver;
+ function GetDriverCount: integer;
+
+ // Methods
+ procedure LoadDriver(const aFileName: string);
+ procedure UnloadDriver(anIndex: integer);
+
+ procedure LoadDrivers;overload;
+ procedure LoadDrivers(const aDriverList: IROStrings; aIgnoreDuplicates: boolean = false; aIgnoreErrors: boolean = false);overload;
+ procedure UnloadAllDrivers;
+
+ function ListDrivers(const aDirectory: string; out FileNames: IROStrings): integer;
+
+ function FindDriver(const aDriverID: string; out Driver: IDADriver): boolean;
+ function DriverByDriverID(const aDriverID: string): IDADriver;
+
+ // Properties
+ property Drivers[Index: integer]: IDADriver read GetDrivers; default;
+ property DriverCount: integer read GetDriverCount;
+ end;
+
+ TDAAvailableDriverOption = (doAuxDriver, doServerName, doDatabaseName, doLogin, doCustom);
+ TDAAvailableDriverOptions = set of TDAAvailableDriverOption;
+
+ TDADriverHelpType = (dhConnectionWizard);
+
+ { IDADriver
+ An object implementing this interface is returned by the Data Abstract drivers. You get a reference to
+ it by calling the DLL's exported function GetDriverObject. If the DLL doesn't support this method, it is
+ not a Data Abstract driver. Once you retrieve a reference to this object you can query it for additional
+ interfaces such as IDAConnectionPool and obtain access to additional functionality. Not all drivers implement
+ the same number of interfaces. }
+
+ TDATraceSource = (tsUnknown, tsConnection, tsDataset, tsCommand);
+ TDATraceOption = (toPrepare,
+ toExecute,
+ toFetch,
+ toError,
+ toStmt,
+ toConnect,
+ toTransact,
+ toBlob,
+ toService,
+ toMisc,
+ toParams);
+ TDATraceOptions = set of TDATraceOption;
+
+ TDALogTraceEvent = procedure(Sender: TObject; const Text: string; Tag: integer) of object;
+
+ IDADriver = interface
+ ['{1829ABED-299B-4698-9803-DBABCF5443FA}']
+ // Properties readers/writers
+ function GetDriverID: string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetDescription: string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetMajVersion: byte; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetMinVersion: byte; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ // Methods
+ procedure Initialize; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure Finalize; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ function NewConnection(const aName: string = '';const aConnectionType: string = ''): IDAConnection; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF} overload; {deprecated;}
+ function NewConnection(const aConnectionManager: IDAConnectionManager; aConnectionDefinition: TDAConnection): IDAConnection; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF} overload;
+
+ procedure SetTraceOptions(TraceActive: boolean; TraceOptions: TDATraceOptions; Callback: TDALogTraceEvent); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ function GetAvailableDriverOptions: TDAAvailableDriverOptions; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetAvailableDriverOptionsEx(AuxDriver: string): TDAAvailableDriverOptions; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetDefaultCustomParameters: string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ // Properties
+ property DriverID: string read GetDriverID;
+ property Description: string read GetDescription;
+ property MajVersion: byte read GetMajVersion;
+ property MinVersion: byte read GetMinVersion;
+
+ procedure GetAuxDrivers(out List: IROStrings); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetAuxParams(const AuxDriver: string; out List: IROStrings); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetDefaultConnectionType(const AuxDriver: string): string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ end;
+
+ IDADriver30 = interface(IDADriver)
+ ['{F14A6526-CE1F-4A6B-BC4D-3892BA712FE2}']
+ function GetDriverHelp(aType: TDADriverHelpType): string;
+ end;
+
+ IDADriver40 = interface(IDADriver30)
+ ['{82903957-974A-4E1F-B91C-C07F608A96A9}']
+ function GetProviderDefaultCustomParameters(Provider: string): string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ end;
+
+ IDACanQueryDatabaseNames = interface
+ ['{67870220-37E2-4510-BD6A-627EADED75ED}']
+ function GetDatabaseNames: IROStrings;
+ end;
+
+ IDAFileBasedDatabase = interface
+ ['{C37EA8EE-9AC7-44F3-863C-EFB1581D4D57}']
+ function GetFileExtensions: IROStrings;
+ end;
+
+ IDADirectoryBasedDatabase = interface
+ ['{40C102F0-B86E-4CD6-AB3D-4B0903723A5D}']
+ end;
+
+ { IDAConnectionObjectAccess
+ Provides access to the internal connection component and facilitates access to its
+ properties in form of a collection of properties. This interface is useful when you want
+ to complete control of the internal object. In order to use this interface you need
+ to use ShareMem or FastShareMem. }
+ IDAConnectionObjectAccess = interface
+ ['{FF8F2319-4EAE-4A2B-8713-A6E6B3F5E48A}']
+ // Properties readers/writers
+ function GetConnectionObject: TObject; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetConnectionProperties(const aPropertyName: string): Variant; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetConnectionProperties(const aPropertyName: string; const aValue: Variant); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ // Properties
+ property ConnectionObject: TObject read GetConnectionObject;
+ property ConnectionProperties[const aPropertyName: string]: Variant read GetConnectionProperties write SetConnectionProperties;
+ end;
+
+ TDAQuoteCharArray = array[0..1] of char;
+
+ TDABeforeOpenDatasetEvent = procedure(const Sender: IDADataset) of object;
+ TDAAfterOpenDatasetEvent = procedure(const Sender: IDADataset; ActualSQL: string; ElapsedMilliseconds: Cardinal) of object;
+ TDAOpenDatasetErrorEvent = procedure(const Sender: IDADataset; ActualSQL: string; Error: Exception) of object;
+
+ TDABeforeExecuteCommandEvent = procedure(const Sender: IDASQLCommand) of object;
+ TDAAfterExecuteCommandEvent = procedure(const Sender: IDASQLCommand; ActualSQL: string; ElapsedMilliseconds: Cardinal) of object;
+ TDAExecuteCommandErrorEvent = procedure(const Sender: IDASQLCommand; ActualSQL: string; Error: Exception) of object;
+
+ { TDAWhereBuilder }
+
+ TDAWhereBuilder = class;
+ TDAWhereExpression = class(TObject)
+ private
+ public
+ class function ParseExpression(xr: IXmlNode): TDAWhereExpression;
+
+ procedure ReadFromXml(xr: IXmlNode); virtual; abstract;
+ procedure WriteToXml(sw: IXmlNode); virtual; abstract;
+ procedure Validate; virtual;
+ end;
+
+ TDABinaryOperator = (dboAnd, dboOr, dboXor, dboLess, dboLessOrEqual, dboGreater,
+ dboGreaterOrEqual, dboNotEqual, dboEqual, dboLike, dboIn, dboAddition, dboSubtraction,
+ dboMultiply, dboDivide);
+ TDAUnaryOperator = (duoNot, duoMinus);
+
+ TDAWhereBuilder = class
+ private
+ fExpression: TDAWhereExpression;
+ FColumnMapping: TDAColumnMappingCollection;// for TDAESQLCommand
+ fParams: TDAParamCollection;
+ function getXml: WideString;
+ procedure setXml(const aValue: WideString);
+ procedure SetColumnMapping(const Value: TDAColumnMappingCollection);
+ procedure SetParams(const Value: TDAParamCollection);
+ protected
+ function ReadFromXml(xr: IXmlNode): TDAWhereExpression; virtual;
+ procedure WriteToXml(sw: IXmlNode; const aExpression: TDAWhereExpression); virtual;
+ public
+ constructor Create;
+
+ destructor Destroy; override;
+
+ property Expression: TDAWhereExpression read fExpression write FExpression;
+
+ property Xml: WideString read GetXml write SetXml;
+ function NewBinaryExpression(aLeft, aRight: TDAWhereExpression; anOp: TDABinaryOperator): TDAWhereExpression;
+ function NewUnaryExpression(anExpression: TDAWhereExpression; anOp: TDAUnaryOperator): TDAWhereExpression;
+ function NewConstant(const aValue: Variant; aType: TDADataType): TDAWhereExpression;
+ function NewList(const aValues: array of TDAWhereExpression): TDAWhereExpression;
+ function NewParameter(const aParameterName: string): TDAWhereExpression;
+ function NewField(const aTableName,aFieldName: string): TDAWhereExpression;
+ function NewNull: TDAWhereExpression;
+ function NewMacro(const aName: string): TDAWhereExpression; overload;
+ function NewMacro(const aName: string; const aValues: array of TDAWhereExpression): TDAWhereExpression; overload;
+ procedure Clear;
+ function IsEmpty:Boolean;
+ property ColumnMapping: TDAColumnMappingCollection read FColumnMapping write SetColumnMapping;
+ property Params: TDAParamCollection read fParams write SetParams;
+ function ExpressionToXmlNode(const aExpression: TDAWhereExpression): IXMLNode;
+ function XMLToExpression(const aXML: widestring):TDAWhereExpression;
+ end;
+
+ TDAQueryBuilder = class;
+ TDASQLWhereBuilder = class(TDAWhereBuilder)
+ private
+ FId: Integer;
+ FConnection: IDAConnection;
+ FQueryBuilder: TDAQueryBuilder;
+ function GenerateParamName: String;
+ function GenerateParameter(const aParameterName: string):string;
+ function GetMappingTableField(const aDataSetField: string): string;
+ protected
+ function GenerateFieldName(aTablename, aFieldName: string):string; virtual;
+ function ProcessExpression(AExpression: TDAWhereExpression): string;
+ function ProcessBinaryExpression(AExpression: TDAWhereExpression): string; virtual; abstract;
+ function ProcessUnaryExpression(AExpression: TDAWhereExpression): string; virtual; abstract;
+ function ProcessConstantExpression(AExpression: TDAWhereExpression): string; virtual;
+ function ProcessListExpression(AExpression: TDAWhereExpression): string; virtual;
+ function ProcessParameterExpression(AExpression: TDAWhereExpression): string; virtual;
+ function ProcessFieldExpression(AExpression: TDAWhereExpression): string; virtual;
+ function ProcessNullExpression(AExpression: TDAWhereExpression): string; virtual; abstract;
+ function ProcessMacroExpression(AExpression: TDAWhereExpression): string; virtual;
+ public
+ constructor Create(AConnection: IDAConnection); overload;
+ constructor Create(AQueryBuilder: TDAQueryBuilder); overload;
+ function CreateWhereClause: string;
+ property Connection: IDAConnection read FConnection;
+ property QueryBuilder: TDAQueryBuilder read FQueryBuilder;
+ end;
+ { TDAQueryBuilder }
+
+ TDATableFieldCollectionItem = class(TCollectionItem)
+ private
+ FFieldName: string;
+ FTableName: string;
+ public
+ procedure Assign(Source: TPersistent); override;
+ property TableName: string read FTableName write FTableName;
+ property FieldName: string read FFieldName write FFieldName;
+ end;
+
+ TDASelectItem = TDATableFieldCollectionItem;
+ TDASelectCollection = TCollection;
+
+ TDAGroupByItem = TDATableFieldCollectionItem;
+ TDAGroupByCollection = TCollection;
+
+ TDAOrderByItem = TDATableFieldCollectionItem;
+ TDAOrderByCollection = TCollection;
+
+ TDAQueryBuilderOption = (qboSelectDistinct, qboGenerateSimpleSelect, qboGenerateDynamicWhereStatement);
+ TDAQueryBuilderOptions = set of TDAQueryBuilderOption;
+
+ TDAQueryBuilder = class(TPersistent)
+ private
+ // IDAConnection
+ FMainTable: TDAJoinDataTable;
+ FSelectCollection: TDASelectCollection;
+ FGroupByCollection: TDAGroupByCollection;
+ FOrderByCollection: TDAOrderByCollection;
+ FWhere: TDASQLWhereBuilder;
+ FOptions: TDAQueryBuilderOptions;
+ FConnection: IDAConnection;
+ FColumnMapping: TDAColumnMappingCollection;
+ procedure SetColumnMapping(const Value: TDAColumnMappingCollection);
+ function GetWhereBuilder: TDASQLWhereBuilder;
+ protected
+ function GetMappingTableField(const aDataSetField: string): string;
+ procedure Validate; virtual;
+ function CreateWhereBuilder: TDASQLWhereBuilder; virtual; abstract;
+ function CreateSelectClause: string; virtual;
+ function CreateTableClause: string; virtual;abstract;
+ function CreateGroupByClause: string; virtual;
+ function CreateOrderByClause: string; virtual;
+ function GenerateFieldName(aTablename, aFieldName: string; aProcessMapping: Boolean = True):string; virtual;
+ function QuoteFieldNameIfNeeded(const aTableName, aFieldName: string): string; virtual;
+ function QuoteIdentifierIfNeeded(const iIdentifier: string): string; virtual;
+ function QuoteIdentifier(const iIdentifier: string): string; virtual;
+ function IdentifierNeedsQuoting(const iIdentifier: string):boolean;virtual;
+ public
+ constructor Create;
+ destructor Destroy; override;
+ function GenerateSelectSQL: string; virtual;
+ function CreateWhereClause: string; virtual;
+ procedure Assign(Source: TPersistent); override;
+ procedure Clear;
+ procedure AddSelect(ATable, AField: string);
+ procedure AddGroupBy(ATable, AField: string);
+ procedure AddOrderBy(ATable, AField: string);
+ procedure AddJoin(AJoinTable, AJoinFieldName, AJoinToTableName, AJoinToFieldName: string; AJoinType: TDAJoinType = jtInner); overload;
+ procedure AddJoin(AJoinTable: string; AJoinFieldNames: array of string; AJoinToTableName: string; AJoinToFieldNames: array of string; AJoinType: TDAJoinType = jtInner); overload;
+ procedure AddCrossJoin(ATable: string);
+ property Select: TDASelectCollection read FSelectCollection;
+ property MainTable: TDAJoinDataTable read FMainTable;
+ property Where: TDASQLWhereBuilder read GetWhereBuilder;
+ property GroupBy: TDAGroupByCollection read FGroupByCollection;
+ property OrderBy: TDAOrderByCollection read FOrderByCollection;
+ property Options: TDAQueryBuilderOptions read FOptions write FOptions;
+ property Connection: IDAConnection read FConnection write FConnection;
+ property ColumnMapping: TDAColumnMappingCollection read FColumnMapping write SetColumnMapping;
+ end;
+
+ IDABaseConnection = interface
+ ['{B96CFC5B-CE8A-4B6F-994E-2A82509B0F18}']
+ end;
+
+ { IDAConnection
+ Provides access to a connection object in a database and vendor independent manner.
+ Objects implementing IDAConnection are returned by the driver.
+ Each connection object might also implement additional interfaces that are specific to the
+ underlying database or the data-access framework. These additional interfaces are defined in
+ separate units. To find out what interfaces a connection implements you can check the source code
+ of the relative uDAxxxDriver.pas unit. }
+ IDAConnection = interface(IDABaseConnection)
+ ['{6D9C806F-65A5-43B3-8F07-4ED782A13A0A}']
+ // Properties readers/writers
+ function GetConnectionPool: IDAConnectionPool; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetConnectionPool(const Value: IDAConnectionPool); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetConnectionString: string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetConnectionString(Value: string); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetConnected: boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetConnected(Value: boolean); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetName: string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetOnAfterExecuteCommand: TDAAfterExecuteCommandEvent; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetOnAfterOpenDataset: TDAAfterOpenDatasetEvent; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetOnBeforeExecuteCommand: TDABeforeExecuteCommandEvent; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetOnBeforeOpenDataset: TDABeforeOpenDatasetEvent; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetOnExecuteCommandError: TDAExecuteCommandErrorEvent; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetOnOpenDatasetError: TDAOpenDatasetErrorEvent; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetOnAfterExecuteCommand(const Value: TDAAfterExecuteCommandEvent); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetOnAfterOpenDataset(const Value: TDAAfterOpenDatasetEvent); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetOnBeforeExecuteCommand(const Value: TDABeforeExecuteCommandEvent); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetOnBeforeOpenDataset(const Value: TDABeforeOpenDatasetEvent); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetOnExecuteCommandError(const Value: TDAExecuteCommandErrorEvent); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetOnOpenDatasetError(const Value: TDAOpenDatasetErrorEvent); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetConnectionType: string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ // Transaction support
+ function BeginTransaction: integer; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure CommitTransaction; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure RollbackTransaction; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetInTransaction: boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ // UserID/Password
+ function GetUserID: string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetUserID(const Value: string); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetPassword: string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetPassword(const Value: string); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ // Connection
+ procedure Open(const aUserID: string = ''; const aPassword: string = ''); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure Close; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ // Metadata
+ procedure GetTableNames(out List: IROStrings); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetViewNames(out List: IROStrings); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetStoredProcedureNames(out List: IROStrings); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetTableFields(const aTableName: string; out Fields: TDAFieldCollection); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetQueryFields(const aSQL: string; aParamsIfNeeded: TDAParamCollection; out Fields: TDAFieldCollection); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetViewFields(const aViewName: string; out Fields: TDAFieldCollection); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetStoredProcedureParams(const aStoredProcedureName: string; out Params: TDAParamCollection); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetForeignKeys(out ForeignKeys: TDADriverForeignKeyCollection); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ function GetQuoteChars: TDAQuoteCharArray; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function IdentifierNeedsQuoting(const iIdentifier: string): boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function QuoteIdentifierIfNeeded(const iIdentifier: string): string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function QuoteIdentifier(const iIdentifier: string): string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function QuoteFieldNameIfNeeded(const aTableName, aFieldName: string): string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function QuoteFieldName(const aTableName, aFieldName: string): string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetSPSelectSyntax(HasArguments: Boolean): string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ // Commands and datasets
+ function NewCommand(const Text: string; CommandType: TDASQLStatementType; const aCommandName: string = ''): IDASQLCommand; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function NewDataset(const SQL: string; const aDatasetName: string = ''): IDADataset; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetLastAutoInc(const GeneratorName: string = ''): integer; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ function isAlive: Boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ // Properties
+ property ConnectionString: string read GetConnectionString write SetConnectionString;
+ property Connected: boolean read GetConnected write SetConnected;
+ property Name: string read GetName;
+ property InTransaction: boolean read GetInTransaction;
+ property UserID: string read GetUserID write SetUserID;
+ property Password: string read GetPassword write SetPassword;
+ property ConnectionPool: IDAConnectionPool read GetConnectionPool write SetConnectionPool;
+ property ConnectionType: string read GetConnectionType;
+
+ property OnBeforeOpenDataset: TDABeforeOpenDatasetEvent read GetOnBeforeOpenDataset write SetOnBeforeOpenDataset;
+ property OnAfterOpenDataset: TDAAfterOpenDatasetEvent read GetOnAfterOpenDataset write SetOnAfterOpenDataset;
+ property OnOpenDatasetError: TDAOpenDatasetErrorEvent read GetOnOpenDatasetError write SetOnOpenDatasetError;
+ property OnBeforeExecuteCommand: TDABeforeExecuteCommandEvent read GetOnBeforeExecuteCommand write SetOnBeforeExecuteCommand;
+ property OnAfterExecuteCommand: TDAAfterExecuteCommandEvent read GetOnAfterExecuteCommand write SetOnAfterExecuteCommand;
+ property OnExecuteCommandError: TDAExecuteCommandErrorEvent read GetOnExecuteCommandError write SetOnExecuteCommandError;
+ // QueryBuilder
+ function GetQueryBuilder: TDAQueryBuilder; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetWhereBuilder: TDASQLWhereBuilder; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetUseMacroProcessor: Boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetUseMacroProcessor(Value:Boolean); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ property UseMacroProcessor: Boolean read GetUseMacroProcessor write SetUseMacroProcessor;
+ end;
+
+ IDAHETConnection = interface(IDABaseConnection)
+ ['{9471FB7A-F5C6-4420-A2E6-F2DD7C6535A7}']
+ function GetConnectionForObject(const aObjectName: string; aOpenConnection: boolean = false): IDAConnection;
+ end;
+
+ { IDATestableObject }
+ IDATestableObject = interface
+ ['{DC2C3CD1-9031-4B0A-97B9-563580611C25}']
+ procedure Test; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ end;
+
+ { IDAUseGenerators }
+ IDAUseGenerators = interface
+ ['{7963D550-361E-486A-AAD6-EFD12896F719}']
+ function GetNextAutoinc(const GeneratorName: string): integer; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ end;
+
+ IDACanQueryGeneratorsNames = interface
+ ['{E7C4A441-16B2-42BA-92DD-BD0F3EC39250}']
+ function GetGeneratorNames: IROStrings;
+ end;
+
+ { IDAConnectionManager }
+ IDAConnectionManager = interface
+ ['{C2C2B1DB-7D0A-4772-8DDF-5E5150A84827}']
+ function GetDefaultConnectionName: string;
+ function NewConnection(const aConnectionName: string;
+ OpenConnection: boolean = TRUE;
+ const UserID: string = '';
+ const Password: string = ''): IDAConnection;
+
+ procedure Clear;
+ end;
+ IDAConnectionPool = interface
+ ['{6E132C7B-A6AD-4ECB-B901-80000AC4B912}']
+ procedure ReleaseConnection(const Conn: IDAConnection);
+ end;
+
+ { IDASchema }
+ IDASchema = interface
+ ['{19C63BF1-9CAA-43B7-B49C-E3FE82F5A02E}']
+ function GetDatasetText(const aConnection: IDAConnection; const aName: string): string;
+ function GetCommandText(const aConnection: IDAConnection; const aName: string): string;
+
+ function NewDataset(const aConnection: IDAConnection; const aName: string;
+ aStatementName: string='';
+ OpenIt: boolean = false): IDADataset; overload;
+ function NewDataset(const aConnection: IDAConnection; const aName: string;
+ const ParamNames: array of string;
+ const ParamValues: array of Variant;
+ OpenIt: boolean = TRUE;
+ aStatementName: string=''): IDADataset; overload;
+ function NewDataset(const aConnection: IDAConnection; const aName: string;
+ aDynSelectFields: array of string;
+ aWhereClause: WideString;
+ aStatementName: string='';
+ OpenIt: boolean = false;
+ AlwaysGenerateDynamicWhereStatement: Boolean=False): IDADataset; overload;
+ function NewDataset(const aConnection: IDAConnection; const aName: string;
+ const ParamNames: array of string;
+ const ParamValues: array of Variant;
+ aDynSelectFields: array of string;
+ aWhereClause: WideString;
+ OpenIt: boolean = TRUE;
+ aStatementName: string=''): IDADataset; overload;
+
+ function NewCommand(const aConnection: IDAConnection; const aName: string;
+ aStatementName: string=''): IDASQLCommand; overload;
+ function NewCommand(const aConnection: IDAConnection; const aName: string;
+ const ParamNames: array of string;
+ const ParamValues: array of Variant;
+ ExecuteIt: boolean = TRUE;
+ aStatementName: string=''): IDASQLCommand; overload;
+
+ procedure Clear;
+ function MergeDataDictionaries: Boolean;
+ end;
+
+ { TDAWhere
+ Represents an abstraction of the WHERE condition of a SQL statement in an IDADataset. }
+ TDAWhere = class
+ private
+ fFields: TDAFieldCollection;
+ fClause: string;
+ fOnChange: TNotifyEvent;
+ fChanged,
+ fClientFields: boolean;
+ fLastWasCondition: Boolean;
+ fDefaultOperator: TDADefaultOperator;
+
+ function GetEmpty: boolean;
+ function GetNotEmpty: boolean;
+ function GetProperName(aField: TDACustomField) : string;
+
+ protected
+ public
+ constructor Create(const aFields: TDAFieldCollection; aClientFields : boolean);
+
+ procedure Clear;
+
+ procedure AddOperator(aOperator: TDASQLOperator);
+ function AddCondition(const FieldName: string;
+ Condition: TDASQLCondition;
+ const Value: Variant;
+ SkipIfEmptyValue: boolean = TRUE): boolean;overload;
+ function AddCondition(const FieldName: string;
+ Condition: TDASQLCondition): boolean;overload;
+ procedure AddValueGroup(const FieldName: string;
+ const Values: array of Variant);
+ procedure AddSpaces(Count: integer = 1);
+ procedure AddText(const someText: string; MapClientFields : boolean = TRUE);
+
+ procedure OpenBraket; deprecated;
+ procedure CloseBraket; deprecated;
+ procedure OpenBracket;
+ procedure CloseBracket;
+
+ function AddConditions(const FieldNames : array of string;
+ const Conditions : array of TDASQLCondition;
+ const Values: array of Variant;
+ const Operator: TDASQLOperator) : integer;
+
+ property OnChange: TNotifyEvent read fOnChange write fOnChange;
+
+ property Clause: string read fClause;
+ property Fields: TDAFieldCollection read fFields write fFields;
+ property Empty : boolean read GetEmpty;
+ property NotEmpty : boolean read GetNotEmpty;
+
+ property ClientFields : boolean read fClientFields;
+ property DefaultOperator: TDADefaultOperator read fDefaultOperator write fDefaultOperator;
+ property LastWasCondition: Boolean read fLastWasCondition write fLastWasCondition;
+ property Changed: Boolean read fChanged write fChanged;
+ end;
+
+ IDANativeField = interface
+ ['{2F8C9C7B-EBEA-4BD1-A486-3106DC26F67A}']
+ function GetNativeObject: TObject;
+ function isTFieldCompatible: Boolean;
+ function GetFieldName: string;
+ function GetDataType: TFieldType;
+ function GetSize: integer;
+ function GetDecimalPrecision: Integer;
+ procedure SetDecimalPrecision(Value: integer);
+ function GetDecimalScale: Integer;
+ procedure SetDecimalScale(Value: integer);
+ procedure SetDataType(Value: TFieldType);
+ //
+ property DecimalPrecision: Integer read GetDecimalPrecision write SetDecimalPrecision;
+ property DecimalScale: Integer read GetDecimalScale write SetDecimalScale;
+ property Size: Integer read GetSize;
+ property DataType: TFieldType read GetDataType write SetDataType;
+ property FieldName: string read GetFieldName;
+ end;
+
+
+ IDASQLCommandNativeObject = interface
+ ['{990F8327-C1F2-447C-A2D0-C712ACAA11CF}']
+ function GetNativeObject: TObject; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function IsTDatasetCompatible: Boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetNativeFields(Index: integer): IDANativeField;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function NativeFieldCount: Integer;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function NativeFindField(const FieldName: string): IDANativeField;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetNativeFieldData(Index: Integer; var Data: pointer; var DataSize: cardinal):Boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function CanFreeNativeFieldData: Boolean;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ //
+ property NativeFields[Index: Integer]: IDANativeField read GetNativeFields;
+ property NativeObject: TObject read GetNativeObject;
+ end;
+
+ { IDASQLCommand
+ Base interface for SQL commands. It defines the common functionality shared by queries and stored procedures
+ that is providing access to a parameter list and being able to execute a statement which affects a certain
+ number of records. }
+ IDASQLCommand = interface
+ ['{F57D2647-2DDE-4F69-86C5-CFACD6AC601F}']
+ // Properties readers/writers
+ function GetParams: TDAParamCollection; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetPrepared: boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetPrepared(Value: boolean); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetWhere: TDAWhere; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF} deprecated;
+ function GetDynamicWhere: TDAWhereBuilder; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetDynamicWhere(const Value: TDAWhereBuilder); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function SQLContainsDynamicWhere:boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetSQL: string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetSQL(const Value: string); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetDataset: TDataset; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetName: string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetOnAfterExecute: TDAAfterExecuteCommandEvent; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetOnBeforeExecute: TDABeforeExecuteCommandEvent; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetOnAfterExecute(const Value: TDAAfterExecuteCommandEvent); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetOnBeforeExecute(const Value: TDABeforeExecuteCommandEvent); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetOnExecuteError: TDAExecuteCommandErrorEvent; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetOnExecuteError(const Value: TDAExecuteCommandErrorEvent); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ // Methods
+ procedure RefreshParams; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function Execute: integer; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ function ParamByName(const aName: string): TDAParam; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ // Properties
+ property Name: string read GetName;
+ property Dataset: TDataSet read GetDataset;
+ property SQL: string read GetSQL write SetSQL;
+ property Params: TDAParamCollection read GetParams;
+ property Prepared: boolean read GetPrepared write SetPrepared;
+ {$WARN SYMBOL_DEPRECATED OFF}
+ property Where: TDAWhere read GetWhere;
+ {$WARN SYMBOL_DEPRECATED ON}
+ property DynamicWhere: TDAWhereBuilder read GetDynamicWhere write SetDynamicWhere;
+
+ property OnBeforeExecute: TDABeforeExecuteCommandEvent read GetOnBeforeExecute write SetOnBeforeExecute;
+ property OnAfterExecute: TDAAfterExecuteCommandEvent read GetOnAfterExecute write SetOnAfterExecute;
+ property OnExecuteError: TDAExecuteCommandErrorEvent read GetOnExecuteError write SetOnExecuteError;
+ end;
+
+ { IDAMustSetParams
+ Implemented only by few SQL commands when we need to call PSSetParams after the parameter values
+ are written. For internal use only. See TDAEDataset.DoSetActive }
+ IDAMustSetParams = interface
+ ['{575A8055-0200-44F1-AC5A-EF8604CBB489}']
+ procedure SetParamValues(Params: TDAParamCollection); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetParamValues(Params: TDAParamCollection); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ end;
+
+ { IDADataset
+ Provides access to a row set generated from a SQL select or a call to a stored procedure which
+ returns rows. IDADataset objects are created using the method IDAConnection.NewDataset.
+ Objects implementing this interface are equivalent to TDataset and in most cases simply wrap one. }
+ IDADataset = interface(IDASQLCommand)
+ ['{8A3E5056-A8B9-4455-B82C-67E48CC39EA5}']
+ // Properties readers/writers
+ function GetRecordCount: integer; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetFieldCount: integer; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetFields: TDAFieldCollection; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetActive: boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetActive(Value: boolean); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetEOF: boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetFieldValues(Index: integer): Variant; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetNames(Index: integer): string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetIsEmpty : boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetLogicalName : string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetLogicalName(aName : string); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ function GetOnAfterOpen: TDAAfterOpenDatasetEvent; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetOnBeforeOpen: TDABeforeOpenDatasetEvent; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetOnAfterOpen(const Value: TDAAfterOpenDatasetEvent); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetOnBeforeOpen(const Value: TDABeforeOpenDatasetEvent); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetOnOpenError: TDAOpenDatasetErrorEvent; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetOnOpenError(const Value: TDAOpenDatasetErrorEvent); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ // Methods
+ procedure Open; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure Close; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ procedure EnableControls; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure DisableControls; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function ControlsDisabled: Boolean;{$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+
+ procedure Next; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ function FieldByName(const aName: string): TDAField; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function FindField(const aName: string): TDAField; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ function GetCurrentRecIdValue: integer;
+ procedure SetCurrentRecIdValue(Value: integer);
+
+ function GetRowRecIDValue: integer;
+
+ procedure EnableConstraints; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure DisableConstraints; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ function Locate(const KeyFields: string; const KeyValues: Variant; Options: TLocateOptions): Boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function Lookup(const KeyFields: string; const KeyValues: Variant; const ResultFields: string): Variant; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ property RowRecIdValue: integer read GetRowRecIdValue;
+ property CurrentRecIdValue: integer read GetCurrentRecIdValue write SetCurrentRecIdValue;
+ // Properties
+ property IsEmpty : boolean read GetIsEmpty;
+(* property BOF: boolean read GetBOF;*)
+ property EOF: boolean read GetEOF;
+ property RecordCount: integer read GetRecordCount;
+ property Fields: TDAFieldCollection read GetFields;
+ property Active: boolean read GetActive write SetActive;
+ property FieldCount: integer read GetFieldCount;
+ property FieldValues[Index: integer]: Variant read GetFieldValues;
+ property Names[Index: integer]: string read GetNames;
+ property LogicalName : string read GetLogicalName write SetLogicalName;
+
+ property OnBeforeOpen: TDABeforeOpenDatasetEvent read GetOnBeforeOpen write SetOnBeforeOpen;
+ property OnAfterOpen: TDAAfterOpenDatasetEvent read GetOnAfterOpen write SetOnAfterOpen;
+ property OnOpenError: TDAOpenDatasetErrorEvent read GetOnOpenError write SetOnOpenError;
+
+ end;
+
+ IDADatasetEx = interface(IDADataset)
+ ['{BB588B03-620E-43AD-B77E-EFD35F303112}']
+ function GetBOF: boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure Refresh; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetBookMark: pointer; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GotoBookmark(Bookmark: TBookmark); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure FreeBookmark(Bookmark: TBookmark); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function BookmarkValid(Bookmark: TBookmark): Boolean; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetState : TDatasetState; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ property State : TDatasetState read GetState;
+ end;
+
+ { IDAEditableDataset }
+ IDAEditableDataset = interface(IDADatasetEx)
+ ['{D3E2147F-65B3-4D9D-8614-7270011FA7D5}']
+ procedure Edit; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure Insert; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure Post; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure Cancel; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure Append; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure Delete; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ procedure Prior; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure First; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure Last; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ procedure AddRecord(const FieldNames : array of string; const FieldValues : array of Variant); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ procedure EnableEventHandlers; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure DisableEventHandlers; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ end;
+
+ { IDAStoredProcedure
+ Provides access to stored database procedures.
+ IDAStoredProcedure objects are created using the method IDAConnection.NewStoredProcedure.}
+ IDAStoredProcedure = interface(IDASQLCommand)
+ ['{6D9C806F-65A5-43B3-8F07-4ED782A13A0A}']
+ // Properties readers/writers
+ function GetStoredProcedureName: string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetStoredProcedureName(const Name: string); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ // Methods
+ function Execute: integer; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+
+ // Properties
+ property StoredProcedureName: string read GetStoredProcedureName write SetStoredProcedureName;
+ end;
+
+ { IDADatasetPersist }
+ IDADatasetPersist = interface
+ ['{D6F850CD-9204-4953-A54F-1E622AA993B6}']
+ function Persist(const aQuery: IDADataset; MaxRecords: integer; out Data: IROStream): integer;
+ end;
+
+ { IDADatasetResolver }
+ IDADatasetResolver = interface
+ ['{D6F850CD-9204-4953-A54F-1E622AA993B6}']
+ procedure Resolve(const Data: IROStream; const aQuery: IDADataset; MaxErrors: integer);
+ end;
+
+ { IDALoginInfoAware }
+ IDALoginInfoAware = interface
+ ['{755615F0-4208-459A-B1C4-97EA5A3DB346}']
+ function GetLoginInfo : TDALoginInfo;
+ procedure SetLoginInfo(aValue : TDALoginInfo);
+
+ property LoginInfo : TDALoginInfo read GetLoginInfo write SetLoginInfo;
+ end;
+
+ { TDALoginInfoAware }
+ TDALoginInfoAware = class(TInterfacedObject, IDALoginInfoAware)
+ private
+ fLoginInfo : TDALoginInfo;
+
+ protected
+ { IDALoginInfoAware }
+ function GetLoginInfo : TDALoginInfo;
+ procedure SetLoginInfo(aValue : TDALoginInfo);
+
+ { IInterface }
+ function _AddRef: Integer; stdcall;
+ function _Release: Integer; stdcall;
+
+ end;
+
+ // not used yet
+ { IDASimpleClonedCursorsSupport }
+ IDASimpleClonedCursorsSupport = interface
+ ['{39D05665-5B13-4EC3-B31E-D39CBEA52AC6}']
+ function GetSimpleCloneSource : TObject;
+ end;
+
+ IDAMemDatasetBatchAdding = interface
+ ['{73A4A297-2938-46EB-8D0C-2F8FB58046E2}']
+ function AllocRecordBuffer: PAnsiChar;
+ procedure FreeRecordBuffer(var Buffer: PAnsiChar);
+ function GetFieldNativeBuffer(Buffer: PAnsiChar; Field: TField): Pointer;
+ function MakeBlobFromString(Blob:AnsiString): pointer;
+ procedure SetNullMask(Buffer: PAnsiChar; Field: TField; const Value: boolean);
+ procedure SetAnsiString(NativeBuf: Pointer; Field: TField; const Value: Ansistring);
+ procedure SetWideString(NativeBuf: Pointer; Field: TField; const Value: Widestring);
+ procedure AddRecordsfromList(AList: TList);
+ end;
+
+ { TDADataSource }
+ TDABaseDataSource = class(TDataSource)
+ end;
+
+const
+ DADataTypeNames: array[Low(TDADataType)..High(TDADataType)] of string = ('Unknown',
+ 'String',
+ 'DateTime',
+ 'Float',
+ 'Currency',
+ 'AutoInc',
+ 'Integer',
+ 'LargeInt',
+ 'Boolean',
+ 'Memo',
+ 'Blob',
+ 'WideString',
+ 'WideMemo',
+ 'LargeAutoInc',
+ 'Byte',
+ 'ShortInt',
+ 'Word',
+ 'SmallInt',
+ 'Cardinal',
+ 'LargeUInt',
+ 'Guid',
+ 'Xml',
+ 'Decimal',
+ 'SingleFloat');
+ DADataTypesMappings: array[TDADataType] of TFieldType = (
+ ftUnknown, ftString, ftDateTime, ftFloat, ftBCD, ftAutoInc, ftInteger,
+ ftLargeInt, ftBoolean, ftMemo, ftBlob, ftWideString,
+ {$IFNDEF DA_WideMemoSupport}ftMemo{$ELSE}ftWideMemo{$ENDIF DA_WideMemoSupport},
+ ftLargeInt, ftSmallint, ftSmallint, ftWord, ftSmallint, ftInteger, ftLargeint,
+ ftGuid, ftWideString, ftFMTBcd, ftFloat);
+
+function VCLTypeToDAType(aFieldType: TFieldType): TDADataType;
+function DATypeToVCLType(aDAType: TDADataType): TFieldType;
+
+{ Cross-platform GetTickCount }
+function ROGetTickCount: Cardinal;
+
+{ Variant converters }
+function GetVarBoolean(const Value: Variant): boolean;
+function GetVarCurrency(const Value: Variant): currency;
+function GetVarDateTime(const Value: Variant): TDateTime;
+function GetVarFloat(const Value: Variant): double;
+function GetVarInteger(const Value: Variant): integer;
+function GetVarString(const Value: Variant): string;
+function GetVarInt64(const Value: Variant): Int64;
+function GetVarWideString(const Value: Variant): WideString;
+function GetVarByte(const Value: Variant): Byte;
+function GetVarShortInt(const Value: Variant): ShortInt;
+function GetVarWord(const Value: Variant): Word;
+function GetVarSmallInt(const Value: Variant): SmallInt;
+function GetVarCardinal(const Value: Variant): Cardinal;
+function GetVarLargeUInt(const Value: Variant): Int64;
+function GetVarGuid(const Value: Variant): TGuid;
+function GetVarXml(const Value: Variant): IXMLNode;
+function GetVarDecimal(const Value: Variant): TBCD;
+function GetVarSingleFloat(const Value: Variant): Single;
+function TestDefaultValue(const DefaultValue: string; DataType: TDADataType): Boolean;
+
+{ Misc }
+function NewDatasetParam(anArray : TDADatasetParamArray; Name : string; Value : Variant) : TDADatasetParam;
+function NewDatasetRequestInfo(anArray : TDADatasetRequestInfoArray;
+ DatasetName : string;
+ ParamNames : array of string;
+ ParamValues : array of variant;
+ IncludeSchema : boolean = FALSE;
+ MaxRecords : integer = -1) : TDADatasetRequestInfo;
+
+procedure Params_ParseSQL(aParams: TParams; aSQL: String; DoCreate: Boolean; aQuoteChar: TDAQuoteCharArray; aUseDefaultChars: Boolean = False);
+
+implementation
+
+uses
+ {$IFDEF DataAbstract_Trial}
+ Forms, Dialogs, //Windows,
+ {$ENDIF DataAbstract_Trial}
+ TypInfo, Variants,
+ uDARes, uROBinaryHelpers, {uDAClasses, uDADataTable,} uDAWhere
+ {$IFDEF MSWINDOWS}
+ ,Windows
+ {$ENDIF}
+ {$IFDEF LINUX}
+ ,Libc
+ {$ENDIF LINUX};
+
+{ Cross-platform GetTickCount }
+{$IFDEF LINUX}
+// This has been grabbed from IdGlobal.pas. Needs to be tested under Kylix just in case
+function ROGetTickCount: Cardinal;
+var
+ tv: timeval;
+begin
+ gettimeofday(tv, nil);
+ {$RANGECHECKS OFF}
+ Result := int64(tv.tv_sec) * 1000 + tv.tv_usec div 1000;
+ {$RANGECHECKS ON}
+end;
+{$ENDIF}
+{$IFDEF MSWINDOWS}
+function ROGetTickCount: Cardinal;
+begin
+ result := Windows.GetTickCount;
+end;
+{$ENDIF}
+
+{ Variant converters }
+function GetVarBoolean(const Value: Variant): boolean;
+begin
+ if VarIsNull(Value) then
+ result := FALSE
+ else
+ result := Value;
+end;
+
+function GetVarCurrency(const Value: Variant): currency;
+begin
+ if VarIsNull(Value) then
+ result := 0
+ else
+ result := Value;
+end;
+
+function GetVarDateTime(const Value: Variant): TDateTime;
+begin
+ if VarIsNull(Value) then
+ result := 0
+ else
+ result := Value;
+end;
+
+function GetVarFloat(const Value: Variant): double;
+begin
+ if VarIsNull(Value) then
+ result := 0
+ else
+ result := Value;
+end;
+
+function GetVarInteger(const Value: Variant): integer;
+begin
+ if VarIsNull(Value) then
+ result := 0
+ else
+ result := Value;
+end;
+
+function GetVarString(const Value: Variant): string;
+begin
+ if VarIsNull(Value) then
+ result := ''
+ else
+ result := Value;
+end;
+
+function GetVarInt64(const Value: Variant): Int64;
+begin
+ if VarIsNull(Value) then
+ result := 0
+ else
+ result := Value;
+end;
+
+function GetVarWideString(const Value: Variant): WideString;
+begin
+ if VarIsnull(Value) then
+ Result := ''
+ else
+ Result := Value;
+end;
+
+function GetVarByte(const Value: Variant): Byte;
+begin
+ if VarIsnull(Value) then
+ Result := 0
+ else
+ Result := Value;
+end;
+
+function GetVarShortInt(const Value: Variant): ShortInt;
+begin
+ if VarIsnull(Value) then
+ Result := 0
+ else
+ Result := Value;
+end;
+
+function GetVarWord(const Value: Variant): Word;
+begin
+ if VarIsnull(Value) then
+ Result := 0
+ else
+ Result := Value;
+end;
+
+function GetVarSmallInt(const Value: Variant): SmallInt;
+begin
+ if VarIsnull(Value) then
+ Result := 0
+ else
+ Result := Value;
+end;
+
+function GetVarCardinal(const Value: Variant): Cardinal;
+begin
+ if VarIsnull(Value) then
+ Result := 0
+ else
+ Result := Value;
+end;
+
+function GetVarLargeUInt(const Value: Variant): Int64;
+begin
+ if VarIsnull(Value) then
+ Result := 0
+ else
+ Result := Value;
+end;
+
+function GetVarGuid(const Value: Variant): TGuid;
+begin
+ if VarIsnull(Value) then
+ FillChar(Result, sizeof(Result), 0)
+ else
+ Result := StringToGuid(Value);
+end;
+
+function GetVarXml(const Value: Variant): IXMLNode;
+var
+ lDoc: IXMLDocument;
+begin
+ if VarIsnull(Value) then
+ Result := nil
+ else begin
+ lDoc := NewROXmlDocument;
+ lDoc.New;
+ lDoc.XML := Value;
+ Result := lDoc.DocumentNode;
+ end;
+end;
+
+function GetVarDecimal(const Value: Variant): TBCD;
+begin
+ Result := VariantToBCD(Value);
+end;
+
+function GetVarSingleFloat(const Value: Variant): Single;
+begin
+ if VarIsnull(Value) then
+ Result := 0
+ else
+ Result := Value;
+end;
+
+
+function TestDefaultValue(const DefaultValue: string; DataType: TDADataType): Boolean;
+var
+ aDecimal: TDecimal;
+begin
+ try
+ case DataType of
+ datString: ;
+ datDateTime: VarAsType(DefaultValue, varDate);
+ datFloat: VarAsType(DefaultValue, varDouble);
+ datDecimal: if not VarByteArrayToDecimal(DefaultValue,aDecimal) then VarAsType(DefaultValue, VarFMTBcd);
+ datCurrency: VarAsType(DefaultValue, varCurrency);
+ datAutoInc,
+ datInteger: VarAsType(DefaultValue, varInteger);
+ datLargeInt: VarAsType(DefaultValue, varInt64);
+ datBoolean: VarAsType(DefaultValue, varBoolean);
+ datMemo: VarAsType(DefaultValue, varString);
+ datBlob: begin Result := False; exit; end;
+ datWideString: VarAsType(DefaultValue, varOleStr);
+ datWideMemo: VarAsType(DefaultValue, varOleStr);
+ else
+ begin
+ result := false;
+ exit;
+ end;
+ end;
+ result := true;
+ except
+ result := false;
+ end;
+end;
+
+{ EDADriverLoadException }
+
+constructor EDADriverLoadException.Create(anErrorCode: integer;
+ const anErrorMessage: string);
+begin
+ inherited Create(anErrorMessage);
+
+ fErrorCode := anErrorCode;
+end;
+
+function VCLTypeToDAType(aFieldType: TFieldType): TDADataType;
+begin
+ result := datUnknown;
+ case aFieldType of
+ ftUnknown: result := datUnknown;
+
+ ftAutoInc: result := datAutoInc;
+
+ ftGuid: Result:= datGuid;
+
+ ftFixedChar,
+ ftString: result := datString;
+
+ ftLargeint: result := datLargeInt;
+
+ ftSmallint: Result := datSmallInt;
+ ftWord: Result:= datWord;
+ ftInteger: result := datInteger;
+
+ ftCurrency: result := datFloat;
+ ftFloat: result := datFloat;
+ ftBCD: Result := datCurrency;
+ ftFMTBcd: Result := datDecimal;
+
+
+ ftTimeStamp,
+ ftDate,
+ ftTime,
+ ftDateTime: result := datDateTime;
+
+ ftMemo,
+ ftFmtMemo: result := datMemo;
+
+ ftBytes, ftTypedBinary,
+ ftVarBytes,
+ ftBlob,
+ ftGraphic,
+ ftOraBlob,
+ ftOraClob: result := datBlob;
+
+ ftBoolean: result := datBoolean;
+ ftWideString: Result := datWideString;
+ {$IFDEF DA_WideMemoSupport}
+ ftWideMemo: Result:= datWideMemo;
+ {$ENDIF DA_WideMemoSupport}
+ else
+ RaiseError(err_FieldTypeNotSupported, [GetEnumName(TypeInfo(TFieldType), Ord(aFieldType)), Ord(aFieldType)]);
+ end;
+end;
+
+function DATypeToVCLType(aDAType: TDADataType): TFieldType;
+begin
+ result := DADataTypesMappings[aDAType];
+end;
+
+{ Misc }
+function NewDatasetParam(anArray : TDADatasetParamArray; Name : string; Value : Variant) : TDADatasetParam;
+begin
+ result := anArray.Add;
+ result.Name := {$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(Name);
+ result.Value := Value;
+end;
+
+function NewDatasetRequestInfo(anArray : TDADatasetRequestInfoArray;
+ DatasetName : string;
+ ParamNames : array of string;
+ ParamValues : array of variant;
+ IncludeSchema : boolean = FALSE;
+ MaxRecords : integer = -1) : TDADatasetRequestInfo;
+var i : integer;
+begin
+ if (Length(ParamNames)<>Length(ParamValues))
+ then raise EROUserError.Create('ParamNames and ParamValues arrays don''t contain the same number of items');
+
+ result := anArray.Add;
+
+ result.DatasetName := {$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(DatasetName);
+ result.MaxRecords := MaxRecords;
+ result.IncludeSchema := IncludeSchema;
+
+ if (Length(ParamNames)>0) then begin
+ result.Params := TDADatasetParamArray.Create;
+ for i := 0 to (Length(ParamNames)-1) do
+ NewDatasetParam(result.Params, ParamNames[i], ParamValues[i]);
+ end
+ else result.Params := NIL;
+end;
+
+{ TDAStatementCollection }
+
+function TDAStatementCollection.Add: TDAStatement;
+begin
+ result := TDAStatement(inherited Add);
+end;
+
+function TDAStatementCollection.FindItem(const aName: string; const aStatementName: string=''; const aConnectionType: string = ''; aReturnDefault: Boolean = false): TDAStatement;
+var
+ i: integer;
+ lDef, lStatement:TDAStatement;
+begin
+ result := nil;
+ lDef := nil;
+ for i := 0 to (Count - 1) do begin
+ lStatement := Items[i] as TDAStatement;
+ if lStatement.Default then lDef := lStatement;
+ if
+ ((aConnectionType <> '') and (SameText(lStatement.ConnectionType, aConnectionType))) or
+ SameText(lStatement.Connection, aName) and
+ ((aStatementName = '') or SameText(lStatement.Name, aStatementName)) then begin
+ result := lStatement;
+ exit;
+ end;
+ end;
+ if aReturnDefault then result := lDef;
+end;
+
+constructor TDAStatementCollection.Create(aOwner: TPersistent; aSQLCommand: TDASQLCommand);
+begin
+ inherited Create(aOwner, TDAStatement);
+ FAllowEmptyName := True;
+ fSQLCommand := aSQLCommand;
+end;
+
+function TDAStatementCollection.GetItemName(
+ anItem: TCollectionItem): string;
+begin
+ Result := TDAStatement(anItem).Connection;
+end;
+
+function TDAStatementCollection.GetStatements(
+ Index: integer): TDAStatement;
+begin
+ result := TDAStatement(inherited Items[Index])
+end;
+
+function TDAStatementCollection.SetItemName(anItem: TCollectionItem;
+ const aName: string): string;
+begin
+ TDAStatement(anItem).Connection := aName;
+end;
+
+procedure TDAStatementCollection.SetStatements(Index: integer;
+ const Value: TDAStatement);
+begin
+ Statements[Index].Assign(Value);
+end;
+
+function TDAStatementCollection.StatementByName(
+ const aName: string): TDAStatement;
+begin
+ result := TDAStatement(inherited ItemByName(aName));
+end;
+
+{ TDABaseField }
+
+procedure TDABaseField.Assign(Source: TPersistent);
+begin
+ if (Source is TDABaseField) then begin
+ AssignField(TDABaseField(Source));
+ end
+ else begin
+ inherited;
+ end;
+end;
+
+procedure TDABaseField.AssignField(Source: TDABaseField);
+begin
+ fSize := Source.fSize;
+ fDescription := Source.fDescription;
+ fName := Source.fName;
+ fDataType := Source.fDataType;
+ fValue := Source.fValue;
+ fBlobType := Source.fBlobType;
+ fGeneratorName := Source.GeneratorName;
+ FDecimalPrecision := Source.FDecimalPrecision;
+ FDecimalScale := Source.FDecimalScale;
+end;
+
+{procedure TDABaseField.FixSize;
+begin
+ if (fDataType <> datString) then fSize := 0;
+end;}
+
+procedure TDABaseField.UpdateValueType;
+
+ function ConvertValueAccordingToDataType(aValue: Variant; aDataType: TDADataType): Variant;
+ begin
+ case aDataType of
+ datString: result := VarAsType(aValue, varString);
+ datDateTime: result := VarAsType(aValue, varDate);
+ datFloat: result := VarAsType(aValue, varDouble);
+ datCurrency: result := VarAsType(aValue, varCurrency);
+ datAutoInc: result := VarAsType(aValue, varInteger);
+ datInteger: result := VarAsType(aValue, varInteger);
+ datLargeInt: result := VarAsType(aValue, varInt64);
+ datBoolean: result := VarAsType(aValue, varBoolean);
+ datMemo: result := VarAsType(aValue, varString);
+// datBlob: result := VarAsType(aValue, varByte);
+ datWideString: result := VarAsType(aValue, varOleStr);
+ datWideMemo: result := VarAsType(aValue, varOleStr);
+ datLargeAutoInc: result := VarAsType(aValue, varInt64);
+ datByte: result := VarAsType(aValue, varByte);
+ datShortInt: result := VarAsType(aValue, varShortInt);
+ datWord: result := VarAsType(aValue, varWord);
+ datSmallInt: result := VarAsType(aValue, varSmallint);
+ datCardinal: result := VarAsType(aValue, varLongWord);
+ datLargeUInt: result := VarAsType(aValue, varInt64);
+ datGuid: result := VarAsType(aValue, varString);
+ datXml: result := VarAsType(aValue, varOleStr);
+ datDecimal: result := VarAsType(aValue, VarFMTBcd);
+ datSingleFloat: result := VarAsType(aValue, varSingle);
+ end;
+ end;
+
+var
+ lValue: Variant;
+begin
+ try
+ lValue := ConvertValueAccordingToDataType(fValue, fDataType);
+ if VarSameValue(fValue, lValue) then
+ fValue := lValue
+ else
+ fValue := ConvertValueAccordingToDataType(Unassigned, fDataType);
+ except
+ fValue := ConvertValueAccordingToDataType(Unassigned, fDataType);
+ end;
+end;
+
+function TDABaseField.GetDataType: TDADataType;
+begin
+ if not HasValidDictionaryField then begin
+ result := fDataType
+ end
+ else begin
+ result := GetDictionaryField().DataType;
+ end;
+end;
+
+function TDABaseField.GetDescription: string;
+begin
+ if not HasValidDictionaryField then begin
+ result := fDescription;
+ end
+ else begin
+ result := GetDictionaryField().Description;
+ end;
+end;
+
+function TDABaseField.GetName: string;
+begin
+ result := fName
+end;
+
+function TDABaseField.GetSize: integer;
+begin
+ if (DataType <> datString) and (DataType <> datWideString) then begin
+ result := 0;
+ end
+ else begin
+ if not HasValidDictionaryField then begin
+ result := fSize
+ end
+ else begin
+ result := GetDictionaryField().Size;
+ end;
+ end;
+end;
+
+function TDABaseField.GetValue: Variant;
+begin
+ result := fValue
+end;
+
+procedure TDABaseField.SetDataType(aValue: TDADataType);
+begin
+ if fDataType <> aValue then begin
+ fDataType := aValue;
+ if not (VarIsNull(Value) or VarIsEmpty(Value)) then
+ UpdateValueType;
+
+ //FixSize();
+ end;
+end;
+
+procedure TDABaseField.SetDescription(const Value: string);
+begin
+ fDescription := Value;
+end;
+
+procedure TDABaseField.SetName(const Value: string);
+var
+ lOldName: string;
+begin
+ lOldName := fName;
+ fName := Value;
+ if lOldName <> '' then
+ (Collection as TSearcheableCollection).TriggerOnItemRenamed(lOldName, fName);
+end;
+
+procedure TDABaseField.SetSize(Value: integer);
+begin
+ fSize := Value;
+ //FixSize();
+end;
+
+procedure TDABaseField.SetValue(const aValue: Variant);
+begin
+ fValue := aValue
+end;
+
+function TDABaseField.GetAsBoolean: boolean;
+begin
+ result := GetVarBoolean(Value);
+ //if VarIsNull(Value) then result := FALSE else result := Value;
+end;
+
+function TDABaseField.GetAsCurrency: currency;
+begin
+ result := GetVarCurrency(Value);
+ //if VarIsNull(Value) then result := 0 else result := Value;
+end;
+
+function TDABaseField.GetAsDateTime: TDateTime;
+begin
+ result := GetVarDateTime(Value);
+ //if VarIsNull(Value) then result := 0 else result := Value;
+end;
+
+function TDABaseField.GetAsFloat: double;
+begin
+ result := GetVarFloat(Value);
+ //if VarIsNull(Value) then result := 0 else result := Value;
+end;
+
+function TDABaseField.GetAsInteger: integer;
+begin
+ result := GetVarInteger(Value);
+ //if VarIsNull(Value) then result := 0 else result := Value;
+end;
+
+function TDABaseField.GetAsString: string;
+begin
+ result := GetVarString(Value);
+ //if VarIsNull(Value) then result := '' else result := Value;
+end;
+
+function TDABaseField.GetAsVariant: variant;
+begin
+ result := Value
+end;
+
+procedure TDABaseField.SetAsBoolean(const aValue: boolean);
+begin
+ Value := aValue;
+end;
+
+procedure TDABaseField.SetAsCurrency(const aValue: currency);
+begin
+ Value := aValue;
+end;
+
+procedure TDABaseField.SetAsDateTime(const aValue: TDateTime);
+begin
+ Value := aValue;
+end;
+
+procedure TDABaseField.SetAsFloat(const aValue: double);
+begin
+ Value := aValue;
+end;
+
+procedure TDABaseField.SetAsString(const aValue: string);
+begin
+ Value := aValue;
+end;
+
+procedure TDABaseField.SetAsVariant(const aValue: variant);
+begin
+ Value := aValue;
+end;
+
+procedure TDABaseField.SetAsInteger(const aValue: integer);
+begin
+ Value := aValue;
+end;
+
+function TDABaseField.GetDisplayName: string;
+begin
+ //result := Format('%s %-20s [%s, %d]', [GetName, '', GetEnumName(TypeInfo(TDADataType), Ord(DataType)), Size]);
+ result := GetName;
+end;
+
+function TDABaseField.GetNamePath: string;
+begin
+ if (Collection <> nil) then
+ result := Collection.GetNamePath + Name
+ else
+ result := inherited GetNamePath;
+
+ result := inherited GetNamePath;
+end;
+
+function TDABaseField.GetDictionaryEntry: string;
+begin
+ result := fDictionaryEntry
+end;
+
+procedure TDABaseField.SetDictionaryEntry(const Value: string);
+begin
+ fDictionaryEntry := Value
+end;
+
+function TDABaseField.FindDictionaryField: TDACustomField;
+var
+ lOwner: TObject;
+ lHasDict: IDAHasDataDictionary;
+ lDictionary: IDADataDictionary;
+begin
+ result := nil;
+ if DictionaryEntry = '' then exit;
+
+ lDictionary := TDACustomFieldCollection(Collection).DataDictionary;
+
+ { No Dictionary assigned? then try getting dictionary from owning Schema }
+ if not Assigned(lDictionary) then begin
+ lOwner := TDACustomFieldCollection(Collection).Owner;
+ if not (lOwner is TDADataSet) then exit;
+
+ lOwner := TDADatasetCollection(TDADataSet(lOwner).Collection).Owner;
+// if not (lOwner is TDASchema) then exit;
+
+// lDictionary := TDASchema(lOwner).DataDictionary;
+ if Supports(lOwner, IDAHasDataDictionary, lHasDict) then
+ lDictionary := lHasDict.DataDictionary;
+ end;
+
+ if Assigned(lDictionary) then
+ result := lDictionary.Fields.FindField(DictionaryEntry);
+end;
+
+function TDABaseField.GetDictionaryField: TDACustomField;
+begin
+ result := FindDictionaryField();
+ if not Assigned(result) then
+ RaiseError('Dictionary entry %s not found for field %s', [DictionaryEntry, Name])
+end;
+
+function TDABaseField.HasValidDictionaryField: Boolean;
+begin
+ result := (DictionaryEntry <> '') and
+ Assigned(FindDictionaryField());
+end;
+
+function TDABaseField.IsCompatibleV4: boolean;
+begin
+ Result:=False;
+end;
+
+function TDABaseField.StoreDataType: Boolean;
+begin
+ result := MergeDatadictionaries or not HasValidDictionaryField();
+end;
+
+
+function TDABaseField.StoreDecimalPrecision: Boolean;
+begin
+ Result:= (MergeDatadictionaries or (FDecimalPrecision <>0)) and not IsCompatibleV4;
+end;
+
+function TDABaseField.StoreDecimalScale: Boolean;
+begin
+ Result:= (MergeDatadictionaries or (FDecimalScale <>0)) and not IsCompatibleV4;
+end;
+
+function TDABaseField.StoreGeneratorName: Boolean;
+begin
+ result := MergeDatadictionaries or not HasValidDictionaryField();
+end;
+
+function TDABaseField.StoreDescription: Boolean;
+begin
+ result := MergeDatadictionaries or not HasValidDictionaryField();
+end;
+
+function TDABaseField.StoreSize: Boolean;
+begin
+ result := MergeDatadictionaries or (((DataType = datString) or (DataType = datWideString)) and (not HasValidDictionaryField()));
+end;
+
+function TDABaseField.GetBlobType: TDABlobType;
+begin
+ if HasValidDictionaryField
+ then result := GetDictionaryField().BlobType
+ else result := fBlobType
+end;
+
+function TDABaseField.GetGeneratorName: string;
+begin
+ if not HasValidDictionaryField then begin
+ result := fGeneratorName
+ end
+ else begin
+ result := GetDictionaryField().GeneratorName;
+ end;
+
+end;
+
+
+procedure TDABaseField.SetBlobType(const Value: TDABlobType);
+begin
+ fBlobType := Value;
+end;
+
+function TDABaseField.StoreBlobType: boolean;
+begin
+ result := HasValidDictionaryField;
+end;
+
+procedure TDABaseField.Clear;
+begin
+ Value := Null;
+end;
+
+procedure TDABaseField.SetGeneratorName(const aValue: string);
+begin
+ fGeneratorName := aValue
+end;
+
+procedure TDABaseField.SetDisplayName(const Value: string);
+begin
+ inherited;
+ fName := Value;
+end;
+
+function TDABaseField.GetAsLargeInt: int64;
+begin
+ Result := GetVarInt64(Value);
+end;
+
+procedure TDABaseField.SetAsLargeInt(const aValue: Int64);
+begin
+ Value := aValue;
+end;
+
+function TDABaseField.GetAsWideString: Widestring;
+begin
+ Result := GetVarWideString(Value);
+end;
+
+procedure TDABaseField.SetAsWideString(const aValue: Widestring);
+begin
+ Value := aValue;
+end;
+
+function TDABaseField.GetIsNull: boolean;
+begin
+ result := VarIsNull(Value);
+end;
+
+
+function TDABaseField.GetBlobSize: Integer;
+var
+ v: Variant;
+begin
+ v := GetValue;
+ if VarIsArray(v) then result := VarArrayHighBound(V, 1) - VarArrayLowBound(V, 1) + 1
+ else if VarIsStr(v) then result := Length(v) else
+ Result := 0;
+end;
+
+function TDABaseField.GetAsByte: Byte;
+begin
+ result := GetVarByte(Value);
+end;
+
+function TDABaseField.GetAsCardinal: Cardinal;
+begin
+ result := GetVarCardinal(Value);
+end;
+
+function TDABaseField.GetAsDecimal: TBcd;
+begin
+ result := GetVarDecimal(Value);
+end;
+
+function TDABaseField.GetAsGuid: TGUID;
+begin
+ result := GetVarGuid(Value);
+end;
+
+function TDABaseField.GetAsLargeUInt: Int64;
+begin
+ Result := GetVarInt64(Value);
+end;
+
+function TDABaseField.GetAsShortInt: ShortInt;
+begin
+ result := GetVarShortInt(Value);
+end;
+
+function TDABaseField.GetAsSingle: Single;
+begin
+ result := GetVarSingleFloat(Value);
+end;
+
+function TDABaseField.GetAsSmallInt: SmallInt;
+begin
+ result := GetVarSmallInt(Value);
+end;
+
+function TDABaseField.GetAsWord: Word;
+begin
+ result := GetVarWord(Value);
+end;
+
+function TDABaseField.GetAsXml: IXMLNode;
+begin
+ result := GetVarXml(Value);
+end;
+
+procedure TDABaseField.SetAsByte(const Value: Byte);
+begin
+ self.Value := Value;
+end;
+
+procedure TDABaseField.SetAsCardinal(const Value: Cardinal);
+begin
+ self.Value := Value;
+end;
+
+procedure TDABaseField.SetAsDecimal(const Value: TBcd);
+begin
+ self.Value := BCDToVariant(Value);
+end;
+
+procedure TDABaseField.SetAsGuid(const Value: TGUID);
+begin
+ self.Value := GuidToString(Value);
+end;
+
+procedure TDABaseField.SetAsLargeUInt(const Value: Int64);
+begin
+ self.Value := Value;
+end;
+
+procedure TDABaseField.SetAsShortInt(const Value: ShortInt);
+begin
+ self.Value := Value;
+end;
+
+procedure TDABaseField.SetAsSingle(const Value: Single);
+begin
+ self.Value := Value;
+end;
+
+procedure TDABaseField.SetAsSmallInt(const Value: SmallInt);
+begin
+ self.Value := Value;
+end;
+
+procedure TDABaseField.SetAsWord(const Value: Word);
+begin
+ self.Value := Value;
+end;
+
+procedure TDABaseField.SetAsXml(const Value: IXMLNode);
+begin
+ if Value = nil then
+ Self.Value := null
+ else
+ self.Value := Value.XML;
+end;
+
+procedure TDABaseField.SetDecimalPrecision(const Value: Integer);
+begin
+ FDecimalPrecision := Value;
+end;
+
+function TDABaseField.GetDecimalPrecision: Integer;
+begin
+ if not HasValidDictionaryField then begin
+ result := FDecimalPrecision
+ end
+ else begin
+ result := GetDictionaryField().DecimalPrecision;
+ end;
+end;
+
+function TDABaseField.GetDecimalScale: Integer;
+begin
+ if not HasValidDictionaryField then begin
+ result := FDecimalScale
+ end
+ else begin
+ result := GetDictionaryField().DecimalScale;
+ end;
+end;
+
+procedure TDABaseField.SetDecimalScale(const Value: Integer);
+begin
+ FDecimalScale := Value;
+end;
+
+function TDABaseField.MergeDatadictionaries: Boolean;
+var
+ lOwner: TObject;
+ lSchema: IDASchema;
+begin
+ result := false;
+ if DictionaryEntry = '' then exit;
+
+ lOwner := TDACustomFieldCollection(Collection).Owner;
+ if not (lOwner is TDADataSet) then exit;
+
+ lOwner := TDADatasetCollection(TDADataSet(lOwner).Collection).Owner;
+
+ if Supports(lOwner, IDASchema, lSchema) then
+ result := lSchema.MergeDataDictionaries;
+end;
+
+{ TDACustomField }
+
+constructor TDACustomField.Create(Collection: TCollection);
+begin
+ inherited;
+
+ fServerAutoRefresh := FALSE;
+ fCustomAttributes := TStringList.Create;
+ fVisible := TRUE;
+ fLogChanges := TRUE;
+end;
+
+destructor TDACustomField.Destroy;
+begin
+ fCustomAttributes.Free;
+ inherited;
+end;
+
+function TDACustomField.GetInPrimaryKey: boolean;
+begin
+ result := fInPrimaryKey
+end;
+
+function TDACustomField.GetRegExpression: string;
+begin
+ if not HasValidDictionaryField
+ then result := fRegExpression
+ else result := GetDictionaryField().RegExpression;
+end;
+
+function TDACustomField.GetDefaultValue: string;
+begin
+ if not HasValidDictionaryField
+ then result := fDefaultValue
+ else result := GetDictionaryField().DefaultValue;
+end;
+
+function TDACustomField.GetRequired: boolean;
+begin
+ if not HasValidDictionaryField
+ then result := fRequired
+ else result := GetDictionaryField().Required;
+end;
+
+function TDACustomField.GetDisplayLabel: string;
+begin
+ if not HasValidDictionaryField
+ then result := fDisplayLabel
+ else result := GetDictionaryField().DisplayLabel;
+
+ if (result='') then result := Name;
+end;
+
+function TDACustomField.GetDisplayWidth: integer;
+begin
+ if not HasValidDictionaryField
+ then result := fDisplayWidth
+ else result := GetDictionaryField().DisplayWidth;
+end;
+
+function TDACustomField.GetEditMask: string;
+begin
+ if not HasValidDictionaryField
+ then result := fEditMask
+ else result := GetDictionaryField().EditMask;
+end;
+
+function TDACustomField.GetReadOnly: boolean;
+begin
+ if not HasValidDictionaryField
+ then result := fReadOnly
+ else result := GetDictionaryField().ReadOnly;
+end;
+
+function TDACustomField.GetVisible: boolean;
+begin
+ if not HasValidDictionaryField
+ then result := fVisible
+ else result := GetDictionaryField().Visible;
+end;
+
+function TDACustomField.GetDisplayFormat: string;
+begin
+ if not HasValidDictionaryField
+ then result := fDisplayFormat
+ else result := GetDictionaryField().DisplayFormat;
+end;
+
+function TDACustomField.GetAlignment: TAlignment;
+begin
+ if not HasValidDictionaryField
+ then result := fAlignment
+ else result := GetDictionaryField().Alignment;
+end;
+
+function TDACustomField.GetEditFormat: string;
+begin
+ if not HasValidDictionaryField
+ then result := fEditFormat
+ else result := GetDictionaryField().EditFormat;
+end;
+
+procedure TDACustomField.SetInPrimaryKey(const Value: boolean);
+begin
+ fInPrimaryKey := Value
+end;
+
+procedure TDACustomField.SetRegExpression(const Value: string);
+begin
+ fRegExpression := Value
+end;
+
+procedure TDACustomField.LoadFromFile(const aFileName: string);
+begin
+ if (fField<>nil) then begin
+ if (fField is TBlobField) then TBlobField(fField).LoadFromFile(aFileName)
+ end
+ else RaiseError(err_FieldIsNotBound);
+end;
+
+procedure TDACustomField.SaveToFile(const aFileName: string);
+begin
+ if (fField<>nil) then begin
+ if (fField is TBlobField) then TBlobField(fField).SaveToFile(aFileName)
+ end
+ else RaiseError(err_FieldIsNotBound);
+end;
+
+procedure TDACustomField.LoadFromStream(const aStream: IROStream);
+begin
+ LoadFromStream(aStream.Stream);
+end;
+
+procedure TDACustomField.SaveToStream(const aStream: IROStream);
+begin
+ SaveToStream(aStream.Stream);
+end;
+
+function TDACustomField.GetValue: Variant;
+begin
+ if Assigned(fField) then begin
+ if fField.IsNull then Result := Null else
+ {$IFNDEF FPC}
+ if fField is TWideStringField then result := TWideStringField(fField).Value else
+ {$ENDIF}
+ {$IFDEF DELPHI10UP}
+ if fField is TWideMemoField then result := TWideMemoField(fField).Value else
+ {$ENDIF DELPHI10UP}
+ result := fField.Value;
+ end
+ else result := Null;
+end;
+
+procedure TDACustomField.SetValue(const Value: Variant);
+var
+ aDecimal: TDecimal;
+begin
+ if Assigned(fField) then begin
+ {$IFNDEF FPC}
+ if (fField is TWideStringField) and not VarIsNull( Value ) then
+ TWideStringField(fField).Value := Value else
+ {$ENDIF}
+ {$IFDEF DELPHI10UP}
+ if (fField is TWideMemoField) and not VarIsNull( Value ) then
+ fField.AsWideString := Value else
+ {$ENDIF DELPHI10UP}
+ if (fField is TLargeintField) and not VarIsNull( Value ) then
+ TLargeintField(fField).Value := Value else
+ if VarByteArrayToDecimal(Value,aDecimal) then
+ SetAsDecimal(DecimalToBCD(aDecimal)) else
+ fField.Value := Value
+ end
+ else RaiseError(err_FieldIsNotBound);
+end;
+
+procedure TDACustomField.Bind(aField: TField);
+begin
+ FNativeField:= nil;
+ fField := aField;
+
+ if Assigned(fField) then begin
+ fField.DisplayLabel := DisplayLabel;
+ fField.DisplayWidth := DisplayWidth;
+ {$IFNDEF FPC}
+ fField.EditMask := EditMask;
+ {$ENDIF FPC}
+ fField.ReadOnly := ReadOnly;
+ fField.Required := Required;
+ fField.Visible := Visible;
+ fField.Alignment := Alignment;
+
+ if (fField is TNumericField) then begin
+ TNumericField(fField).DisplayFormat := DisplayFormat;
+ TNumericField(fField).EditFormat := EditFormat;
+ end
+
+ else if (fField is TDateTimeField) then begin
+ TDateTimeField(fField).DisplayFormat := DisplayFormat
+ end
+{$IFDEF ftFMTBCD_Support}
+ else if (fField is TFMTBCDField) then begin
+ TFMTBCDField(fField).Precision := DecimalPrecision;
+ TFMTBCDField(fField).Size := DecimalScale;
+ end
+{$ENDIF}
+ else if (fField is TBCDField) then begin
+ TBCDField(fField).Precision := DecimalPrecision;
+ TBCDField(fField).Size := DecimalScale;
+ end
+ else if (fField is TBlobField) then begin
+{$IFDEF DA_WideMemoSupport}
+ if TBlobField(fField).BlobType <> ftWideMemo then
+{$ENDIF DA_WideMemoSupport}
+ TBlobField(fField).BlobType := BlobTypeMappings[BlobType];
+ end;
+
+ fField.OnValidate := InternalOnValidate;
+ fField.OnChange := InternalOnChange;
+
+ {fField.Lookup := Lookup;
+ if (LookupSource<>NIL) then
+ with TDADataSource(LookupSource) do
+ if Assigned(DataTable)
+ then fField.LookupDataSet := DataTable.Dataset;
+
+ fField.LookupKeyFields := LookupKeyFields;
+ fField.LookupCache := LookupCache;
+ fField.LookupResultField := LookupResultField;
+ fField.KeyFields := KeyFields;}
+ end;
+end;
+
+procedure TDACustomField.Unbind;
+begin
+ if (fField=NIL) then Exit;
+
+ fField.OnChange := nil;
+ fField.OnSetText := nil;
+ fField.OnGetText := nil;
+ fField.OnValidate := nil;
+
+ fField := nil;
+end;
+
+function TDACustomField.GetTableField: string;
+begin
+ result := fTableField
+end;
+
+procedure TDACustomField.SetTableField(const Value: string);
+begin
+ fTableField := Value;
+end;
+
+procedure TDACustomField.SetName(const Value: string);
+var
+ updatesc: boolean;
+begin
+ updatesc := (fTableField = '') or (fTableField = Name);
+
+ inherited;
+
+ if updatesc then fTableField := Value;
+end;
+
+function TDACustomField.GetCustomAttributes: TStrings;
+begin
+ if not HasValidDictionaryField then
+ result := fCustomAttributes
+ else
+ result := GetDictionaryField().fCustomAttributes;
+end;
+
+procedure TDACustomField.SetCustomAttributes(const Value: TStrings);
+begin
+ fCustomAttributes.Assign(Value);
+end;
+
+procedure TDACustomField.Assign(Source: TPersistent);
+begin
+ if (Source is TDACustomField) then begin
+ AssignField(TDACustomField(Source));
+ end
+ else begin
+ inherited;
+ end;
+end;
+
+procedure TDACustomField.AssignField(Source: TDABaseField);
+var
+ lSource: TDACustomField;
+begin
+ inherited;
+ lSource := TDACustomField(Source);
+
+ fField := nil; { Assigned DAField will always be unbound }
+ fTableField := lSource.fTableField;
+ fRequired := lSource.fRequired;
+ fInPrimaryKey := lSource.fInPrimaryKey;
+ fRegExpression := lSource.fRegExpression;
+ fDefaultValue := lSource.fDefaultValue;
+ fDictionaryEntry := lSource.fDictionaryEntry;
+ fDisplayWidth := lSource.fDisplayWidth;
+ fDisplayLabel := lSource.fDisplayLabel;
+ fDisplayFormat := lSource.DisplayFormat;
+
+ fReadOnly := lSource.fReadOnly;
+ fVisible := lSource.fVisible;
+ fEditMask := lSource.fEditMask;
+ fLogChanges := lSource.fLogChanges;
+ fCalculated := lSource.fCalculated;
+ fServerCalculated := lSource.fServerCalculated;
+
+ fEditFormat := lSource.EditFormat;
+ fAlignment := lSource.Alignment;
+
+ fOnChange := lSource.OnChange;
+ {fOnGetText := lSource.OnGetText;
+ fOnSetText := lSource.OnSetText;}
+ fOnValidate := lSource.OnValidate;
+
+ fLookupCache := lSource.LookupCache;
+ fLookupKeyFields := lSource.LookupKeyFields;
+ fLookupResultField := lSource.LookupResultField;
+ fKeyFields := lSource.KeyFields;
+ fLookupSource := lSource.LookupSource;
+ fLookup := lSource.Lookup;
+
+ //fCustomAttributes.Assign(lSource.fCustomAttributes);
+ fCustomAttributes.Text := lSource.fCustomAttributes.Text;
+
+ fServerAutoRefresh := lSource.ServerAutoRefresh;
+ fGeneratorName := lSource.GeneratorName;
+
+ fBusinessClassID := lSource.BusinessClassID;
+end;
+
+procedure TDACustomField.InternalOnChange(Sender: TField);
+begin
+ if not (Collection as TDACustomFieldCollection).FieldEventsDisabled then
+ begin
+ if assigned(TDACustomFieldCollection(Collection).OnFieldAfterUpdate) then
+ TDACustomFieldCollection(Collection).OnFieldAfterUpdate(Self);
+ if Assigned(fOnChange) then
+ fOnChange(Self);
+ end;
+end;
+
+procedure TDACustomField.InternalOnValidate(Sender: TField);
+begin
+ if not (Collection as TDACustomFieldCollection).FieldEventsDisabled then
+ begin
+ if assigned(TDACustomFieldCollection(Collection).OnFieldBeforeUpdate) then
+ TDACustomFieldCollection(Collection).OnFieldBeforeUpdate(Self);
+ if Assigned(fOnValidate) then
+ fOnValidate(Self);
+ end;
+end;
+
+function TDACustomField.IsCompatibleV4: boolean;
+begin
+ if Assigned(FieldCollection) then
+ Result := FieldCollection.IsCompatibleV4
+ else
+ Result := inherited IsCompatibleV4;
+end;
+
+procedure TDACustomField.SetDisplayLabel(const aValue: string);
+begin
+ fDisplayLabel := aValue;
+ if Assigned(fField) then fField.DisplayLabel := aValue;
+end;
+
+procedure TDACustomField.SetRequired(const aValue: boolean);
+begin
+ fRequired := aValue;
+ if Assigned(fField) then fField.Required := aValue;
+end;
+
+procedure TDACustomField.SetVisible(const aValue: boolean);
+begin
+ fVisible := aValue;
+ if Assigned(fField) then fField.Visible := aValue;
+end;
+
+procedure TDACustomField.SetDisplayWidth(const aValue: integer);
+begin
+ fDisplayWidth := aValue;
+ if Assigned(fField) then fField.DisplayWidth := aValue;
+end;
+
+procedure TDACustomField.SetEditMask(const aValue: string);
+begin
+ fEditMask := aValue;
+ {$IFNDEF FPC}
+ if Assigned(fField) then fField.EditMask := aValue;
+ {$ENDIF}
+end;
+
+procedure TDACustomField.SetReadOnly(const aValue: boolean);
+begin
+ fReadOnly := aValue;
+ if Assigned(fField) then fField.ReadOnly := aValue;
+end;
+
+procedure TDACustomField.SetDisplayFormat(const Value: string);
+begin
+ fDisplayFormat := Value;
+ if Assigned(fField) then begin
+ if (fField is TNumericField) then
+ TNumericField(fField).DisplayFormat := Value
+ else if (fField is TDateTimeField) then
+ TDateTimeField(fField).DisplayFormat := Value;
+ end;
+end;
+
+
+function TDACustomField.StoredExpression: Boolean;
+begin
+ Result:= not IsCompatibleV4;
+end;
+
+function TDACustomField.StoreDisplayLabel: Boolean;
+begin
+ result := MergeDatadictionaries or (not HasValidDictionaryField()) and (fDisplayLabel <> '') and (fDisplayLabel <> Name);
+end;
+
+
+function TDACustomField.StoredServerCalculated: Boolean;
+begin
+ Result:= not IsCompatibleV4;
+end;
+
+function TDAField.GetDisplayName: string;
+begin
+ result := Format('%s [%s, %d', [fName, GetEnumName(TypeInfo(TDADataType), Ord(DataType)), Size]);
+
+ if Required then
+ result := result+', REQUIRED';
+
+ result := result+']'
+end;
+
+function TDACustomField.GetOwner: TPersistent;
+begin
+ result := Collection;
+end;
+
+function TDACustomField.GetNamePath: string;
+begin
+ if (Collection <> nil) and (Collection.Owner <> nil) and (Collection.Owner is TComponent) then
+ result := TComponent(Collection.Owner).Name + '.' + FName
+ else
+ result := FName;
+end;
+
+procedure TDACustomField.SetAlignment(const Value: TAlignment);
+begin
+ fAlignment := Value;
+ if Assigned(fField) then fField.Alignment := Value;
+end;
+
+procedure TDACustomField.SetEditFormat(const Value: string);
+begin
+ fEditFormat := Value;
+
+ if Assigned(fField) then begin
+ if (fField is TNumericField) then TNumericField(fField).EditFormat := Value
+ end;
+end;
+
+procedure TDACustomField.SetKeyFields(const Value: string);
+begin
+ fKeyFields := Value;
+ if Assigned(fField)
+ then fField.KeyFields := Value;
+end;
+
+procedure TDACustomField.SetLookupCache(const Value: boolean);
+begin
+ fLookupCache := Value;
+ if Assigned(fField)
+ then fField.LookupCache := Value;
+end;
+
+procedure TDACustomField.SetLookupKeyFields(const Value: string);
+begin
+ fLookupKeyFields := Value;
+ if Assigned(fField)
+ then fField.LookupKeyFields := Value;
+end;
+
+procedure TDACustomField.SetLookupResultField(const Value: string);
+begin
+ fLookupResultField := Value;
+ if Assigned(fField)
+ then fField.LookupResultField := Value;
+end;
+
+type
+ THackField = class(TField)
+ end;
+
+procedure TDACustomField.SetLookupSource(const Value: TDataSource);
+begin
+ if Assigned(Value) and not (Value is TDABaseDataSource) then raise Exception.Create('LookupSource must be a TDADataSource');
+
+ fLookupSource := Value;
+ if Assigned(fField) then
+ if Assigned(Value)
+ then fField.LookupDataSet := Value.DataSet
+ else THackField(fField).Notification(fField.LookupDataSet,opRemove);
+end;
+
+procedure TDACustomField.SetCalculated(const Value: boolean);
+begin
+ fCalculated := Value;
+ if Value then begin
+ fLookup := FALSE;
+ fServerCalculated := false;
+ end;
+end;
+
+procedure TDACustomField.SetLookup(const Value: boolean);
+begin
+ fLookup := Value;
+ if Value then begin
+ fCalculated := FALSE;
+ end;
+end;
+
+function TDACustomField.GetFieldCollection: TDACustomFieldCollection;
+begin
+ result := TDACustomFieldCollection(Collection);
+end;
+
+procedure TDACustomField.SetBlobType(const Value: TDABlobType);
+begin
+ inherited;
+
+ if Assigned(fField) and (fField is TBlobField)
+ then TBlobField(fField).BlobType := BlobTypeMappings[Value];
+end;
+
+function TDACustomField.GetServerAutoRefresh: boolean;
+begin
+ result := fServerAutoRefresh
+end;
+
+procedure TDACustomField.SetServerAutoRefresh(const Value: boolean);
+begin
+ fServerAutoRefresh := Value;
+end;
+
+function TDACustomField.GetLogChanges: boolean;
+begin
+ if not HasValidDictionaryField
+ then result := fLogChanges
+ else result := GetDictionaryField().fLogChanges;
+ result := Result and not (fCalculated or fLookup)
+end;
+
+function TDACustomField.StoreProperties: boolean;
+begin
+ result := MergeDatadictionaries or not HasValidDictionaryField();
+end;
+
+function TDACustomField.GetOldValue: Variant;
+begin
+ if Assigned(fField)
+ then result := fField.OldValue
+ else result := Unassigned;
+end;
+
+function TDACustomField.GetSQLOrigin: string;
+begin
+ if fSQLOrigin=''
+ then result := TableField
+ else result := fSQLOrigin;
+end;
+
+procedure TDACustomField.FocusControl;
+begin
+ if Assigned(fField)
+ then fField.FocusControl;
+end;
+
+{procedure TDACustomField.SetBusinessRulesID(const Value: string);
+begin
+ BusinessClassID := Value;
+end;
+
+function TDACustomField.GetBusinessRulesID: string;
+begin
+ result := BusinessClassID;
+end;}
+
+function TDACustomField.GetBusinessClassID: string;
+begin
+ if not HasValidDictionaryField
+ then result := fBusinessClassID
+ else result := GetDictionaryField().BusinessClassID;
+end;
+
+procedure TDACustomField.SetBusinessClassID(const Value: string);
+begin
+ fBusinessClassID := Value;
+end;
+
+procedure TDACustomField.LoadFromStream(const aStream: TStream);
+begin
+ if (fField<>nil) then begin
+ if (fField is TBlobField) then TBlobField(fField).LoadFromStream(aStream)
+ end
+ else RaiseError(err_FieldIsNotBound);
+end;
+
+procedure TDACustomField.SaveToStream(const aStream: TStream);
+begin
+ if (fField<>nil) then begin
+ if (fField is TBlobField) then TBlobField(fField).SaveToStream(aStream)
+ end
+ else RaiseError(err_FieldIsNotBound);
+end;
+
+function TDACustomField.GetBlobSize: Integer;
+begin
+ if fField is TBlobField then
+ result := TBlobField(fField).BlobSize
+ else
+ Result := 0;
+end;
+
+procedure TDACustomField.SetServerCalculated(const Value: Boolean);
+begin
+ fServerCalculated := Value;
+ if Value then begin
+ Readonly := True;
+ LogChanges := False;
+ Calculated := False;
+ InPrimaryKey := False;
+ end;
+end;
+
+procedure TDACustomField.SetExpression(const Value: string);
+begin
+ fExpression := Value;
+ if value <> '' then
+ Calculated := true; // will unset lookup & server calculated
+end;
+
+function TDACustomField.GetAsBoolean: boolean;
+begin
+ if Assigned(fField) then begin
+ if fField is TNumericField then
+ Result:= fField.AsInteger <> 0
+ else
+ Result:= fField.AsBoolean;
+ end
+ else begin
+ Result:= inherited GetAsBoolean;
+ end;
+end;
+
+function TDACustomField.GetAsCurrency: currency;
+begin
+ if Assigned(fField) then
+ Result:= fField.AsCurrency
+ else
+ Result:= inherited GetAsCurrency;
+end;
+
+function TDACustomField.GetAsDateTime: TDateTime;
+begin
+ if Assigned(fField) then
+ Result:= fField.AsDateTime
+ else
+ Result:= inherited GetAsDateTime;
+end;
+
+function TDACustomField.GetAsFloat: double;
+begin
+ if Assigned(fField) then
+ Result:= fField.AsFloat
+ else
+ Result:= inherited GetAsFloat;
+end;
+
+function TDACustomField.GetAsInteger: integer;
+begin
+ if Assigned(fField) then
+ Result:= fField.AsInteger
+ else
+ Result:= inherited GetAsInteger;
+end;
+
+function TDACustomField.GetAsLargeInt: int64;
+begin
+ if Assigned(fField) and (fField.DataType = ftLargeInt) then
+ Result:= TLargeintField(fField).AsLargeint
+ else
+ result:= inherited GetAsLargeInt;
+end;
+
+function TDACustomField.GetAsString: string;
+begin
+ if Assigned(fField) then
+ Result:= fField.AsString
+ else
+ Result:= inherited GetAsString;
+end;
+
+function TDACustomField.GetAsVariant: variant;
+begin
+ if Assigned(fField) then
+ Result:= fField.AsVariant
+ else
+ Result:= inherited GetAsVariant;
+end;
+
+function TDACustomField.GetAsWideString: Widestring;
+begin
+ if Assigned(fField) and (fField.DataType = ftWideString) then begin
+ if GetIsNull then
+ Result:=''
+ else
+ {$IFNDEF FPC}
+ Result := TWideStringField(fField).Value;
+ {$ELSE}
+ REsult:= inherited GetAsWideString;
+ {$ENDIF}
+ end
+ {$IFDEF DA_WideMemoSupport}
+ else if Assigned(fField) and (fField.DataType = ftWideMemo) then
+ Result := TWideMemoField(fField).Value
+ {$ENDIF DA_WideMemoSupport}
+ else
+ Result := inherited GetAsWideString;
+end;
+
+function TDACustomField.GetIsNull: boolean;
+begin
+ if Assigned(fField) then
+ Result:= fField.IsNull
+ else
+ Result:= inherited GetIsNull;
+end;
+
+procedure TDACustomField.SetAsBoolean(const aValue: boolean);
+begin
+ if Assigned(fField) then begin
+ if fField is TNumericField then
+ fField.AsInteger := Ord(aValue)
+ else
+ fField.AsBoolean := aValue;
+ end
+ else begin
+ inherited SetAsBoolean(aValue);
+ end;
+end;
+
+procedure TDACustomField.SetAsCurrency(const aValue: currency);
+begin
+ if Assigned(fField) then
+ fField.AsCurrency := aValue
+ else
+ inherited SetAsCurrency(aValue);
+end;
+
+procedure TDACustomField.SetAsDateTime(const aValue: TDateTime);
+begin
+ if Assigned(fField) then
+ fField.AsDateTime := aValue
+ else
+ inherited SetAsDateTime(aValue);
+end;
+
+procedure TDACustomField.SetAsFloat(const aValue: double);
+begin
+ if Assigned(fField) then
+ fField.AsFloat := aValue
+ else
+ inherited SetAsFloat(aValue);
+end;
+
+procedure TDACustomField.SetAsInteger(const aValue: integer);
+begin
+ if Assigned(fField) then
+ fField.AsInteger := aValue
+ else
+ inherited SetAsInteger(aValue);
+end;
+
+procedure TDACustomField.SetAsLargeInt(const aValue: Int64);
+begin
+ if Assigned(fField) and (fField.DataType = ftLargeInt) then
+ TLargeintField(fField).AsLargeInt := aValue
+ else
+ inherited SetAsLargeInt(aValue);
+end;
+
+procedure TDACustomField.SetAsString(const aValue: string);
+begin
+ if Assigned(fField) then
+ fField.AsString := aValue
+ else
+ inherited SetAsString(aValue);
+end;
+
+procedure TDACustomField.SetAsVariant(const aValue: variant);
+begin
+ if Assigned(fField) then
+ fField.AsVariant := aValue
+ else
+ inherited SetAsVariant(aValue);
+end;
+
+procedure TDACustomField.SetAsWideString(const aValue: Widestring);
+begin
+{$IFNDEF FPC}
+ if (fField<>nil) and (fField.DataType = ftWideString) then TWideStringField(fField).Value := aValue else
+{$ENDIF}
+{$IFDEF DA_WideMemoSupport}
+ if (fField<>nil) and (fField.DataType = ftWideMemo) then TWideMemoField(fField).Value := aValue else
+{$ENDIF}
+ inherited SetAsWideString(aValue);
+end;
+
+function TDACustomField.GetAsByte: Byte;
+begin
+ Result := GetAsSmallInt;
+end;
+
+function TDACustomField.GetAsCardinal: Cardinal;
+begin
+ Result := GetAsInteger;
+end;
+
+function TDACustomField.GetAsDecimal: TBcd;
+begin
+{$IFDEF ftFMTBCD_Support}
+ if Assigned(fField) and (fField.DataType = ftFmtBcd) then
+ result := TFMTBCDField(fField).AsBCD
+ else
+{$ENDIF}
+ if Assigned(fField) and (fField.DataType = ftBcd) then
+ {$IFNDEF FPC}
+ result := TBCDField(fField).AsBCD
+ {$ELSE}
+ Result := CurrToBCD(TBCDField(fField).Value)
+ {$ENDIF}
+ else
+ result := inherited GetAsDecimal;
+end;
+
+function TDACustomField.GetAsGuid: TGUID;
+begin
+{$IFNDEF FPC}
+ if Assigned(fField) and (fField.DataType = ftGuid) then
+ result := TGuidField(fField).AsGuid
+ else
+{$ENDIF}
+ result := inherited GetAsGuid;
+end;
+
+function TDACustomField.GetAsLargeUInt: Int64;
+begin
+ result := GetAsLargeInt;
+end;
+
+function TDACustomField.GetAsShortInt: ShortInt;
+begin
+ Result := GetAsSmallInt;
+end;
+
+function TDACustomField.GetAsSingle: Single;
+begin
+ if Assigned(fField) then
+ result := fField.AsFloat
+ else
+ Result := inherited GetAsSingle;
+end;
+
+function TDACustomField.GetAsSmallInt: SmallInt;
+begin
+ if Assigned(fField) and (fField.DataType = ftSmallint) then
+ result := TSmallintField(fField).Value
+ else
+ result := inherited GetAsSmallInt;
+end;
+
+function TDACustomField.GetAsWord: Word;
+begin
+ if Assigned(fField) and (fField.DataType = ftWord) then
+ result := TWordField(fField).AsInteger
+ else
+ result := inherited GetAsWord;
+end;
+
+function TDACustomField.GetAsXml: IXMLNode;
+var
+ s: string;
+ lDoc: IXMLDocument;
+begin
+ s := GetAsWideString;
+ if s = '' then result := nil else begin
+ lDoc := NewROXmlDocument;
+ lDoc.New;
+ lDoc.XML := s;
+ Result := lDoc.DocumentNode;
+ end;
+end;
+
+procedure TDACustomField.SetAsByte(const Value: Byte);
+begin
+ SetAsSmallInt(Value);
+end;
+
+procedure TDACustomField.SetAsCardinal(const Value: Cardinal);
+begin
+ SetAsInteger(Value);
+end;
+
+procedure TDACustomField.SetAsDecimal(const Value: TBcd);
+{$IFDEF FPC}
+var
+ lCur: Currency;
+{$ENDIF}
+begin
+{$IFDEF ftFMTBCD_Support}
+ if (fField<>nil) and (fField.DataType = ftFMTBcd) then
+ TFMTBCDField(fField).AsBCD := Value
+ else
+{$ENDIF}
+ if (fField<>nil) and (fField.DataType = ftBcd) then begin
+ {$IFNDEF FPC}
+ TBCDField(fField).AsBCD := Value
+ {$ELSE}
+ lCur := 0;
+ if BCDToCurr(Value, lCur) then
+ TBCDField(fField).Value := lCur
+ else
+ TBCDField(fField).AsFloat := BCDToDouble(Value)
+ {$ENDIF}
+ end
+ else
+ inherited SetAsDecimal(Value);
+end;
+
+procedure TDACustomField.SetAsGuid(const Value: TGUID);
+begin
+{$IFNDEF FPC}
+ if (fField<>nil) and (fField.DataType = ftGuid) then
+ TGuidField(fField).AsGuid := Value
+ else
+{$ENDIF}
+ inherited SetAsGuid(Value);
+end;
+
+procedure TDACustomField.SetAsLargeUInt(const Value: Int64);
+begin
+ SetAsLargeInt(Value);
+end;
+
+procedure TDACustomField.SetAsShortInt(const Value: ShortInt);
+begin
+ SetAsSmallInt(Value);
+end;
+
+procedure TDACustomField.SetAsSingle(const Value: Single);
+begin
+ if Assigned(fField) then
+ SetAsFloat(Value)
+ else
+ inherited SetAsSingle(Value);
+end;
+
+procedure TDACustomField.SetAsSmallInt(const Value: SmallInt);
+begin
+ if Assigned(fField) and (fField.DataType = ftSmallint) then
+ TSmallintField(fField).Value := Value
+ else
+ inherited SetAsSmallInt(Value);
+end;
+
+procedure TDACustomField.SetAsWord(const Value: Word);
+begin
+ if Assigned(fField) and (fField.DataType = ftWord) then
+ TWordField(fField).AsInteger := Value
+ else
+ inherited SetAsWord(Value);
+end;
+
+procedure TDACustomField.SetAsXml(const Value: IXMLNode);
+begin
+ if (Value = nil) then
+ AsVariant := Null
+ else begin
+ SetAsWideString(Value.Xml);
+ end;
+end;
+
+procedure TDACustomField.SetDecimalPrecision(const Value: Integer);
+begin
+ inherited;
+ if Assigned(fField) then begin
+{$IFDEF ftFMTBCD_Support}
+ if fField is TFMTBCDField then TFMTBCDField(fField).Precision:=Value
+ else
+{$ENDIF}
+ if fField is TBCDField then TBCDField(fField).Precision:=Value;
+ end;
+end;
+
+function TDACustomField.GetDecimalPrecision: Integer;
+begin
+ Result:=inherited GetDecimalPrecision;
+ if Assigned(fField) then begin
+{$IFDEF ftFMTBCD_Support}
+ if fField is TFMTBCDField then Result := TFMTBCDField(fField).Precision
+ else
+{$ENDIF}
+ if fField is TBCDField then Result := TBCDField(fField).Precision;
+ end;
+end;
+
+function TDACustomField.GetDecimalScale: Integer;
+begin
+ Result:=inherited GetDecimalScale;
+ if Assigned(fField) then begin
+{$IFDEF ftFMTBCD_Support}
+ if fField is TFMTBCDField then Result := TFMTBCDField(fField).Size
+ else
+{$ENDIF}
+ if fField is TBCDField then Result := TBCDField(fField).Size;
+ end;
+end;
+
+procedure TDACustomField.SetDecimalScale(const Value: Integer);
+begin
+ inherited;
+ if Assigned(fField) then begin
+{$IFDEF ftFMTBCD_Support}
+ if fField is TFMTBCDField then TFMTBCDField(fField).Size:=Value
+ else
+{$ENDIF}
+ if fField is TBCDField then TBCDField(fField).Size:=Value;
+ end;
+end;
+
+procedure TDACustomField.Bind(aField: IDANativeField);
+begin
+ {$IFDEF Drivers_CompatibilityMode}
+ if aField.isTFieldCompatible then
+ Self.Bind(TField(aField.GetNativeObject))
+ else
+ {$ENDIF}
+ begin
+ if Assigned(aField) then begin
+ {$IFNDEF Drivers_CompatibilityMode}
+ if aField.isTFieldCompatible then fField := TField(aField.GetNativeObject);
+ {$ENDIF}
+ if DataType in [datFloat, datCurrency, datAutoInc, datInteger, datLargeInt,
+ datShortInt, datWord, datSmallInt, datCardinal, datLargeUInt,
+ datDecimal, datSingleFloat] then begin
+ aField.DecimalPrecision := DecimalPrecision;
+ aField.DecimalScale := DecimalScale;
+ end;
+ if DataType in [datBlob,datMemo,datWideMemo] then
+ {$IFDEF DA_WideMemoSupport}
+ if aField.DataType <> ftWideMemo then
+ {$ENDIF}
+ if BlobType <> dabtUnknown then
+ aField.DataType := BlobTypeMappings[BlobType];
+ end;
+ end;
+ fNativeField := aField;
+end;
+
+{ TDACustomFieldCollection }
+
+constructor TDACustomFieldCollection.Create(aOwner: TPersistent; aFieldClass: TDAFieldClass);
+begin
+ inherited Create(aOwner, aFieldClass);
+end;
+
+function TDACustomFieldCollection.Add: TDAField;
+begin
+ result := TDAField(inherited Add);
+end;
+
+function TDACustomFieldCollection.Add(const aName: string; aType: TDADataType; aSize: integer): TDACustomField;
+begin
+ result := Add;
+ result.Name := aName;
+ result.DataType := aType;
+ result.Size := aSize;
+end;
+
+procedure TDACustomFieldCollection.Bind(aDataset: TDataset);
+var
+ i: integer;
+ lDAField: TDACustomField;
+ lField: TField;
+begin
+ Check(aDataset = nil, err_InvalidDataset);
+ try
+ for i := 0 to (Count - 1) do begin
+ lDAField := Fields[i];
+ lField := aDataset.FindField(lDAField.SQLOrigin);
+ if (not Assigned(lField)) and (not lDAField.Calculated) and not (lDAField.ServerCalculated) and not (lDAField.Lookup) then
+ RaiseError(err_CannotFindField, [lDAField.SQLOrigin])
+ else
+ lDAField.Bind(lField);
+ end;
+ except
+ Unbind;
+ raise;
+ end;
+end;
+
+procedure TDACustomFieldCollection.Assign(Source: TPersistent);
+begin
+ if (Source is TDACustomFieldCollection) then begin
+ AssignFieldCollection(TDACustomFieldCollection(Source));
+ end
+ else
+ inherited;
+end;
+
+procedure TDACustomFieldCollection.AssignFieldCollection(Source: TDACustomFieldCollection);
+var
+ i: integer;
+ src: TDACustomFieldCollection;
+ fld: TDAField;
+begin
+ src := TDACustomFieldCollection(Source);
+
+ Clear;
+
+ if not Assigned(Source) then Exit;
+
+ for i := 0 to (src.Count - 1) do begin
+ fld := Add;
+ fld.AssignField(src[i]);
+ end;
+end;
+
+function TDACustomFieldCollection.FieldByName(const aName: string): TDACustomField;
+begin
+ result := TDACustomField(inherited ItemByName(aName))
+end;
+
+function TDACustomFieldCollection.FindField(const aName: string): TDACustomField;
+begin
+ result := TDACustomField(inherited FindItem(aName))
+end;
+
+function TDACustomFieldCollection.GetFields(Index: integer): TDACustomField;
+begin
+ result := TDACustomField(inherited Items[Index])
+end;
+
+procedure TDACustomFieldCollection.SetFields(Index: integer; const Value: TDACustomField);
+begin
+ Fields[Index].Assign(Value);
+end;
+
+procedure TDACustomFieldCollection.Unbind;
+var
+ i: integer;
+begin
+ for i := 0 to (Count - 1) do
+ Fields[i].Unbind;
+end;
+
+function TDACustomFieldCollection.GetItemName(
+ anItem: TCollectionItem): string;
+begin
+ Result:= TDACustomField(anItem).Name;
+end;
+
+function TDACustomFieldCollection.SetItemName(anItem: TCollectionItem;
+ const aName: string): string;
+begin
+ TDACustomField(anItem).Name := aName;
+end;
+
+procedure TDACustomFieldCollection.Bind(
+ aNativeObject: IDASQLCommandNativeObject);
+var
+ i: integer;
+ lDAField: TDACustomField;
+ lField: IDANativeField;
+begin
+{$IFDEF Drivers_CompatibilityMode}
+ if (aNativeObject <> nil) and aNativeObject.IsTDatasetCompatible then
+ Bind(TDataset(aNativeObject.NativeObject))
+ else
+{$ENDIF}
+ try
+ for i := 0 to (Count - 1) do begin
+ lDAField := Fields[i];
+ lField := aNativeObject.NativeFindField(lDAField.SQLOrigin);
+ if (not Assigned(lField)) and (not lDAField.Calculated) and not (lDAField.ServerCalculated) and not (lDAField.Lookup) then
+ RaiseError(err_CannotFindField, [lDAField.SQLOrigin])
+ else
+ lDAField.Bind(lField);
+ end;
+ except
+ Unbind;
+ raise;
+ end;
+end;
+
+{ TDAFieldCollection }
+
+constructor TDAFieldCollection.Create(aOwner: TPersistent);
+begin
+ inherited Create(aOwner, TDAField);
+end;
+
+function TDAFieldCollection.FieldByName(const aName: string): TDAField;
+begin
+ result := TDAField(inherited ItemByName(aName))
+end;
+
+function TDAFieldCollection.FindField(const aName: string): TDAField;
+begin
+ result := TDAField(inherited FindItem(aName))
+end;
+
+function TDAFieldCollection.GetFields(Index: integer): TDAField;
+begin
+ result := TDAField(inherited Items[Index])
+end;
+
+procedure TDAFieldCollection.SetFields(Index: integer; const Value: TDAField);
+begin
+ Fields[Index].Assign(Value);
+end;
+
+{ TDAParam }
+
+function TDAParam.GetParamType: TDAParamType;
+begin
+ result := fParamType;
+end;
+
+procedure TDAParam.LoadFromFile(const aFileName: string);
+begin
+ LoadFromStream(NewROStream(TFileStream.Create(aFileName, fmOpenRead), TRUE));
+end;
+
+procedure TDAParam.SaveToFile(const aFileName: string);
+begin
+ SaveToStream(NewROStream(TFileStream.Create(aFileName, fmCreate), TRUE));
+end;
+
+procedure TDAParam.LoadFromStream(const aStream: IROStream);
+begin
+ Value := VariantBinaryFromRawBinary(aStream.Stream);
+end;
+
+procedure TDAParam.SaveToStream(const aStream: IROStream);
+begin
+ VariantBinaryToRawBinary(Value, aStream.Stream);
+end;
+
+procedure TDAParam.SetParamType(Value: TDAParamType);
+begin
+ fParamType := Value;
+end;
+
+procedure TDAParam.AssignField(Source: TDABaseField);
+begin
+ inherited;
+ if Source is TDAParam then
+ ParamType := TDAParam(Source).ParamType;
+end;
+
+procedure TDAParam.SetValue(const aValue: Variant);
+var
+ d: TDecimal;
+begin
+ if VarByteArrayToDecimal(aValue,d) then
+ asString := DecimalToString(d,DecimalSeparator)
+ else
+ inherited SetValue(aValue);
+end;
+
+procedure TDAParam.AssignParam(Source: TDAParam);
+begin
+ inherited AssignField(Source);
+ ParamType := Source.ParamType;
+end;
+
+{ TDAParamCollection }
+
+function TDAParamCollection.Add: TDAParam;
+begin
+ result := TDAParam(inherited Add)
+end;
+
+constructor TDAParamCollection.Create(aOwner: TPersistent);
+begin
+ inherited Create(aOwner, TDAParam);
+end;
+
+function TDAParamCollection.FindParam(
+ const aParamName: string): TDAParam;
+begin
+ result := TDAParam(inherited FindItem(aParamName));
+end;
+
+function TDAParamCollection.GetParams(Index: integer): TDAParam;
+begin
+ result := TDAParam(inherited Items[Index])
+end;
+
+function TDAParamCollection.ParamByName(const aName: string): TDAParam;
+begin
+ result := TDAParam(inherited ItembyName(aName))
+end;
+
+procedure TDAParamCollection.ReadValues(InputParams: TParams);
+var
+ i: integer;
+ par: TDAParam;
+begin
+ for i := 0 to (Count - 1) do begin
+ par := Params[i];
+ par.Value := InputParams.ParamByName(par.Name).Value;
+ end;
+end;
+
+procedure TDAParamCollection.SetParams(Index: integer; const Value: TDAParam);
+begin
+ Params[Index].Assign(Value);
+end;
+
+procedure TDAParamCollection.WriteValues(OutputParams: TParams);
+var
+ i: integer;
+ par: TDAParam;
+ outpar: TParam;
+begin
+ for i := 0 to (Count - 1) do begin
+ par := Params[i];
+ outpar := OutputParams.ParamByName(par.Name);
+ if par.DataType = datBlob then begin
+ outpar.DataType := ftBlob;
+ outpar.Value := VariantBinaryToString(par.Value);
+ { ToDo: make sure this is valid for ALL Data Drivers, only tested with IBX so far. mh. }
+ end
+ else begin
+ outpar.Value := par.Value;
+ end;
+ //outpar.Size := par.Size; // Seems to fix an ADO problem with size of parameters with SDAC
+ end;
+end;
+
+procedure TDAParamCollection.Assign(Source: TPersistent);
+begin
+ if (Source is TDAParamCollection) then begin
+ AssignParamCollection(TDAParamCollection(Source))
+ end
+ else
+ inherited;
+end;
+
+procedure TDAParamCollection.AssignParamCollection(Source: TDAParamCollection);
+var
+ i: integer;
+begin
+ Clear;
+ for i := 0 to (Source.Count - 1) do
+ Add.AssignParam(Source[i]);
+end;
+
+function TDAParamCollection.GetHasInputParams: boolean;
+var
+ i: Integer;
+begin
+ result := false;
+ for i := 0 to Count-1 do begin
+ if Params[i].ParamType in [daptUnknown, daptInput, daptInputOutput] then begin
+ result := true;
+ exit;
+ end;
+ end; { for }
+end;
+
+function TDAParamCollection.GetItemName(anItem: TCollectionItem): string;
+begin
+ Result := TDAParam(anItem).Name;
+end;
+
+function TDAParamCollection.SetItemName(anItem: TCollectionItem;
+ const aName: string): string;
+begin
+ TDAParam(anItem).Name := aName;
+end;
+
+{ TDASQLCommand }
+
+procedure TDASQLCommand.Assign(aSource: TPersistent);
+var
+ lSource: TDASQLCommand;
+begin
+ if (aSource is TDASQLCommand) then begin
+ lSource := TDASQLCommand(aSource);
+ fName := lSource.fName;
+ fDescription := lSource.fDescription;
+ fStatements.Assign(lSource.fStatements);
+ fParams.Assign(lSource.fParams);
+ fCustomAttributes.Assign(lSource.CustomAttributes);
+ end
+ else begin
+ inherited;
+ end;
+end;
+
+constructor TDASQLCommand.Create(Collection: TCollection);
+begin
+ inherited;
+ fIsPublic := true;
+ fStatements := TDAStatementCollection.Create(nil, Self);
+ fParams := TDAParamCollection.Create(nil);
+ fCustomAttributes := TStringList.Create;
+end;
+
+destructor TDASQLCommand.Destroy;
+begin
+ fCustomAttributes.Free;
+ fStatements.Free;
+ fParams.Free;
+
+ inherited;
+end;
+
+function TDASQLCommand.GetDisplayName: string;
+begin
+ result := Name;
+end;
+
+function TDASQLCommand.GetParams: TDAParamCollection;
+begin
+ result := fParams;
+end;
+
+function TDASQLCommand.GetSQLCommandCollection: TDASQLCommandCollection;
+begin
+ result := TDASQLCommandCollection(Collection);
+end;
+
+function TDASQLCommand.ParamByName(const aName: string): TDAParam;
+begin
+ result := fParams.ParamByName(aName)
+end;
+
+procedure TDASQLCommand.SetCustomAttributes(const Value: TStrings);
+begin
+ fCustomAttributes.Assign(Value);
+end;
+
+procedure TDASQLCommand.SetDisplayName(const Value: string);
+begin
+ inherited;
+ SetName(Value);
+end;
+
+procedure TDASQLCommand.SetName(const Value: string);
+var
+ lOldName: string;
+begin
+ lOldName := fName;
+ fName := Value;
+ if lOldName <> '' then
+ (Collection as TSearcheableCollection).TriggerOnItemRenamed(lOldName, fName);
+end;
+
+procedure TDASQLCommand.SetParams(const Value: TDAParamCollection);
+begin
+ fParams.Assign(Value);
+end;
+
+procedure TDASQLCommand.SetStatements(const Value: TDAStatementCollection);
+begin
+ fStatements.Assign(Value);
+end;
+
+function TDASQLCommand.GetStatements(): TDAStatementCollection;
+begin
+ result := fStatements;
+end;
+
+
+{ TDADataset }
+
+procedure TDADataset.Assign(aSource: TPersistent);
+var
+ lSource: TDADataset;
+begin
+ if (aSource is TDADataset) then begin
+ inherited; { Need to work the TDASQLCommand, too}
+ lSource := TDADataset(aSource);
+ fFields.Assign(lSource.Fields);
+ end
+ else begin
+ inherited;
+ end;
+end;
+
+constructor TDADataset.Create(Collection: TCollection);
+begin
+ inherited;
+ fFields := TDAFieldCollection.Create(self);
+ fBusinessRulesServer := TDABusinessRuleScript.Create();
+ fBusinessRulesClient := TDAClientBusinessRuleScript.Create();
+end;
+
+destructor TDADataset.Destroy;
+begin
+ FreeAndNil(fFields);
+ FreeAndNil(fBusinessRulesServer);
+ FreeAndNil(fBusinessRulesClient);
+ inherited;
+end;
+
+function TDADataset.FieldByName(const aName: string): TDAField;
+begin
+ result := Fields.FieldByName(aName)
+end;
+
+function TDADataset.FindField(const aName: string): TDAField;
+begin
+ result := Fields.FindField(aName)
+end;
+
+procedure TDADataset.SetBusinessRulesClient(const Value: TDAClientBusinessRuleScript);
+begin
+ fBusinessRulesClient.Assign(Value);
+end;
+
+procedure TDADataset.SetBusinessRulesServer(const Value: TDABusinessRuleScript);
+begin
+ fBusinessRulesServer.Assign(Value);
+end;
+
+procedure TDADataset.SetFields(const Value: TDAFieldCollection);
+begin
+ fFields.Assign(Value);
+end;
+
+{ TDASQLCommandCollection }
+
+function TDASQLCommandCollection.Add: TDASQLCommand;
+begin
+ result := TDASQLCommand(inherited Add)
+end;
+
+constructor TDASQLCommandCollection.Create(aOwner: TComponent);
+begin
+ inherited Create(aOwner, GetItemClass);
+end;
+
+function TDASQLCommandCollection.GetItemClass: TDASQLCommandClass;
+begin
+ result := TDASQLCommand;
+end;
+
+function TDASQLCommandCollection.GetItemName(
+ anItem: TCollectionItem): string;
+begin
+ Result := TDASQLCommand(anItem).Name;
+end;
+
+function TDASQLCommandCollection.GetSQLCommands(
+ Index: integer): TDASQLCommand;
+begin
+ result := TDASQLCommand(inherited Items[Index]);
+end;
+
+function TDASQLCommandCollection.SetItemName(anItem: TCollectionItem;
+ const aName: string): string;
+begin
+ TDASQLCommand(anItem).Name := aName;
+end;
+
+procedure TDASQLCommandCollection.SetSQLCommands(Index: integer;
+ const Value: TDASQLCommand);
+begin
+ SQLCommands[Index].Assign(Value);
+end;
+
+function TDASQLCommandCollection.SQLCommandByName(
+ const aName: string): TDASQLCommand;
+begin
+ result := TDASQLCommand(inherited ItemByName(aName));
+end;
+
+{ TDADatasetCollection }
+
+function TDADatasetCollection.Add: TDADataset;
+begin
+ result := TDADataset(inherited Add);
+end;
+
+function TDADatasetCollection.DatasetByName(const aName: string): TDADataset;
+begin
+ result := TDADataset(inherited ItemByName(aName));
+end;
+
+function TDADatasetCollection.FindDatasetByName(const aName: string): TDADataset;
+begin
+ result := TDADataset(inherited FindItem(aName));
+end;
+
+function TDADatasetCollection.GetDatasets(Index: integer): TDADataset;
+begin
+ result := TDADataset(inherited Items[Index]);
+end;
+
+function TDADatasetCollection.GetItemClass: TDASQLCommandClass;
+begin
+ result := TDADataset;
+end;
+
+procedure TDADatasetCollection.SetDatasets(Index: integer;
+ const Value: TDADataset);
+begin
+ Datasets[Index].Assign(Value);
+end;
+
+{ TDAConnectionCollection }
+
+function TDAConnectionCollection.Add: TDAConnection;
+begin
+ result := TDAConnection(inherited Add);
+end;
+
+procedure TDAConnectionCollection.ClearDefaults(iExceptFor: TDAConnection);
+var
+ i: integer;
+begin
+ for i := 0 to Count - 1 do begin
+ if (Connections[i] <> iExceptFor) then Connections[i].Default := false;
+ end;
+end;
+
+function TDAConnectionCollection.ConnectionByName(
+ const aName: string): TDAConnection;
+begin
+ result := TDAConnection(inherited ItemByName(aName));
+end;
+
+constructor TDAConnectionCollection.Create(aOwner: TPersistent);
+begin
+ inherited Create(aOwner, TDAConnection);
+end;
+
+function TDAConnectionCollection.FindConnection(const aName,
+ aType: string): TDAConnection;
+var
+ i: Integer;
+begin
+ if aName <> '' then begin
+ for i := 0 to Count -1 do begin
+ if GetConnections(i).Name = aName then begin
+ Result := GetConnections(i);
+ exit;
+ end;
+ end;
+ end;
+ if aType <> '' then begin
+ for i := 0 to Count -1 do begin
+ if GetConnections(i).ConnectionType = aType then begin
+ Result := GetConnections(i);
+ exit;
+ end;
+ end;
+ end;
+ result := nil;
+end;
+
+function TDAConnectionCollection.GetConnections(
+ Index: integer): TDAConnection;
+begin
+ result := TDAConnection(inherited Items[Index]);
+end;
+
+function TDAConnectionCollection.GetDefaultConnection: TDAConnection;
+begin
+ result := inherited GetDefaultItem as TDAConnection;
+end;
+
+function TDAConnectionCollection.GetItemName(
+ anItem: TCollectionItem): string;
+begin
+ Result := TDAConnection(anItem).Name;
+end;
+
+function TDAConnectionCollection.ItemName: string;
+begin
+ result := 'connection';
+end;
+
+procedure TDAConnectionCollection.SetConnections(Index: integer;
+ const Value: TDAConnection);
+begin
+ Connections[Index].Assign(Value);
+end;
+
+function TDAConnectionCollection.SetItemName(anItem: TCollectionItem;
+ const aName: string): string;
+begin
+ TDAConnection(anItem).Name := aName;
+end;
+
+{ TDAConnection }
+
+procedure TDAConnection.Assign(aSource: TPersistent);
+var
+ lSource: TDAConnection;
+begin
+ if (aSource is TDAConnection) then begin
+ lSource := TDAConnection(aSource);
+ fDescription := lSource.fDescription;
+ ConnectionString := lSource.ConnectionString;
+ ConnectionType := lSource.ConnectionType;
+ fName := '_____' + lSource.fName;
+ fDefault := false;
+ end
+ else begin
+ inherited;
+ end;
+end;
+
+function TDAConnection.GetConnectionString: string;
+begin
+ result := fConnectionString;
+end;
+
+function TDAConnection.GetDisplayName: string;
+begin
+ if (Trim(Name) = '') then
+ result := ''
+ else
+ result := Name;
+
+ //if Default then result := result+' - [Default]';
+end;
+
+procedure TDAConnection.SetConnectionString(const aValue: string);
+begin
+ if fConnectionString <> aValue then
+ fConnectionString := aValue;
+end;
+
+procedure TDAConnection.SetDefault(const Value: boolean);
+begin
+ if (fDefault <> Value) then begin
+ fDefault := Value;
+ if Default then begin
+ (Collection as TDAConnectionCollection).ClearDefaults(self);
+ end;
+ end;
+end;
+
+procedure TDAConnection.SetDisplayName(const Value: string);
+begin
+ inherited;
+ SetName(Value);
+end;
+
+procedure TDAConnection.SetName(const Value: string);
+var
+ lOldName: string;
+begin
+ if (Value <> fName) then begin
+ lOldName := fName;
+ fName := Value;
+ if lOldName <> '' then
+ (Collection as TDAConnectionCollection).TriggerOnItemRenamed(lOldName, fName);
+ end;
+end;
+
+{ TDAStatement }
+
+procedure TDAStatement.Assign(aSource: TPersistent);
+var
+ lSource: TDAStatement;
+begin
+ if (aSource is TDAStatement) then begin
+ lSource := TDAStatement(aSource);
+ fSQL := lSource.fSQL;
+ fStatementType := lSource.fStatementType;
+ fConnection := lSource.fConnection;
+ fConnectionType := lSource.fConnectionType;
+ fColumnMappings.Assign(lSource.fColumnMappings);
+ fTargetTable := lSource.fTargetTable;
+ fDefault := lSource.fDefault;
+ end
+ else begin
+ inherited;
+ end;
+end;
+
+constructor TDAStatement.Create(Collection: TCollection);
+begin
+ inherited;
+ fColumnMappings := TDAColumnMappingCollection.Create(Self);
+end;
+
+destructor TDAStatement.Destroy;
+begin
+ fColumnMappings.Free;
+
+ inherited;
+end;
+
+function TDAStatement.GetDisplayName: string;
+begin
+ if Connection <> '' then
+ result := Connection
+ else
+ if ConnectionType <> '' then
+ result := '[' + ConnectionType + ']'
+ else
+ if Name <> '' then
+ result := Name
+ else
+ result := '';
+end;
+
+function TDAStatement.GetNeedsParams: boolean;
+const
+ arr: TDAQuoteCharArray = ('"','"');
+var
+ lParams: TParams;
+begin
+ lParams := TParams.Create;
+ try
+ Params_ParseSQL(lParams,SQL, True, arr, True);
+ result := (lParams.Count > 0);
+ finally
+ lParams.Free;
+ end;
+end;
+
+function TDAStatement.GetStatementCollection: TDAStatementCollection;
+begin
+ result := TDAStatementCollection(Collection);
+end;
+
+procedure TDAStatement.SetColumnMappings(
+ const Value: TDAColumnMappingCollection);
+begin
+ fColumnMappings.Assign(Value);
+end;
+
+procedure TDAStatement.SetSQL(const Value: string);
+begin
+ fSQL := Value;
+end;
+
+function TDAStatement.StoreSQL: Boolean;
+begin
+ Result := fStatementType <> stAutoSQL;
+end;
+
+{ TDAColumnMappingCollection }
+
+function TDAColumnMappingCollection.Add: TDAColumnMapping;
+begin
+ result := TDAColumnMapping(inherited Add);
+end;
+
+procedure TDAColumnMappingCollection.AssignColumnMapping(aSource: TPersistent);
+var
+ i: Integer;
+begin
+ Clear;
+ for i := 0 to TDAColumnMappingCollection(aSource).Count -1 do begin
+ Add.AssignFieldMapping(TDAColumnMappingCollection(aSource)[i]);
+ end;
+end;
+
+constructor TDAColumnMappingCollection.Create(aOwner: TPersistent);
+begin
+ inherited Create(aOwner, TDAColumnMapping);
+end;
+
+function TDAColumnMappingCollection.FindMappingByDatasetField(
+ const aDatasetField: string): TDAColumnMapping;
+var
+ i: integer;
+begin
+ result := nil;
+
+ for i := 0 to (Count - 1) do
+ if SameText(ColumnMappings[i].DatasetField, aDatasetField) then begin
+ result := ColumnMappings[i];
+ Exit;
+ end;
+end;
+
+function TDAColumnMappingCollection.GetColumnMappings(
+ Index: integer): TDAColumnMapping;
+begin
+ result := TDAColumnMapping(inherited Items[Index])
+end;
+
+function TDAColumnMappingCollection.GetItemName(
+ anItem: TCollectionItem): string;
+begin
+ result := TDAColumnMapping(anItem).DatasetField;
+end;
+
+function TDAColumnMappingCollection.MappingByDatasetField(
+ const aDatasetField: string): TDAColumnMapping;
+begin
+ result := TDAColumnMapping(inherited ItemByName(aDatasetField))
+end;
+
+function TDAColumnMappingCollection.MappingByTableField(
+ const aTableField: string): TDAColumnMapping;
+var
+ i: integer;
+begin
+ result := nil;
+
+ for i := 0 to (Count - 1) do
+ if SameText(ColumnMappings[i].TableField, aTableField) then begin
+ result := ColumnMappings[i];
+ Exit;
+ end;
+
+ RaiseError('Cannot find mapping for table field %s', [aTableField]);
+end;
+
+procedure TDAColumnMappingCollection.SetColumnMappings(Index: integer;
+ const Value: TDAColumnMapping);
+begin
+ TDAColumnMapping(inherited Items[Index]).AssignTo(Value);
+end;
+
+function TDAColumnMappingCollection.SetItemName(anItem: TCollectionItem;
+ const aName: string): string;
+begin
+ TDAColumnMapping(anItem).DatasetField := aName;
+end;
+
+{ TDAWhere }
+
+function TDAWhere.GetProperName(aField: TDACustomField) : string;
+begin
+ if fClientFields
+ then result := ClientFieldPrefix+aField.Name
+ else result := aField.TableField
+end;
+
+function TDAWhere.AddCondition(const FieldName: string;
+ Condition: TDASQLCondition; const Value: Variant; SkipIfEmptyValue: boolean = TRUE): boolean;
+var
+ isstr, isnull, isfloat, isCurr: boolean;
+ fld: TDACustomField;
+ fieldnametouse : string;
+ str: string;
+ oldDecimalSeparator: Char;
+begin
+ result := FALSE;
+
+ fld := fFields.FindField(FieldName);
+
+ isnull := VarIsNull(Value) or (VarIsType(Value, [varString, varOleStr]) and (Value = ''))
+ or (VarIsType(Value, [varDate]) and (Value = 0));
+ if isnull and SkipIfEmptyValue then Exit;
+ if fLastWasCondition then
+ begin
+ case fDefaultOperator of
+ doAnd: AddOperator(opAND);
+ doOr: AddOperator(opOR);
+ end;
+ end;
+ fLastWasCondition := True;
+
+ if fld <> nil then
+ fieldnametouse := GetProperName(fld) // Changed by AleF: WHERE clauses cannot work with field aliases like "FieldA as XYZ"
+ else
+ fieldnametouse := FieldName;
+
+ fClause := fClause + '(' + fieldnametouse + ' ' + StrSQLCondition[Condition] + ' ';
+
+ isstr := (fld <> nil) and (fld.DataType in [datWideString, datWideMemo, datString, datDateTime, datMemo]);
+ isfloat := (fld <> nil) and (fld.DataType in [datFloat, datSingleFloat]);
+ isCurr :=(fld <> nil) and (fld.DataType in [datCurrency]);
+
+ case Condition of
+ cIsNull, cIsNotNull:begin
+ fClause := TrimRight(fClause) + ')';
+ end;
+ else begin
+ if isstr then begin
+ str := VarToStr(Value);
+ if Condition = cIn then
+ fClause := fClause + '(' + str + '))'
+ else
+ fClause := fClause + '''' + str + ''')'
+ end
+ else begin
+ if isfloat or isCurr then begin
+ oldDecimalSeparator := DecimalSeparator;
+ DecimalSeparator := '.';
+ try
+ if isfloat then str:= FloatToStr(Value)
+ else str:=CurrToStrF(Value,ffGeneral,4);
+ finally
+ DecimalSeparator := oldDecimalSeparator;
+ end;
+ end
+ else
+ str := VarToStr(Value);
+ if Condition = cIn then
+ fClause := fClause + '(' + str + '))'
+ else
+ fClause := fClause + str + ')';
+ end;
+ end;
+ end;
+ result := TRUE;
+ Changed := True;
+
+ if Assigned(OnChange) then OnChange(Self);
+end;
+
+procedure TDAWhere.AddValueGroup(const FieldName: string;
+ const Values: array of Variant);
+var
+ fld: TDAField;
+ isstr: boolean;
+ cnt, i: integer;
+ fieldnametouse : string;
+begin
+ fld := fFields.FieldByName(FieldName);
+
+ if fLastWasCondition then
+ begin
+ case fDefaultOperator of
+ doAnd: AddOperator(opAND);
+ doOr: AddOperator(opOR);
+ end;
+ end;
+ fLastWasCondition := True;
+
+ fieldnametouse := GetProperName(fld); // Changed by AleF: WHERE clauses cannot work with field aliases like "FieldA as XYZ"
+
+ if (Length(Values) > 0) then begin
+ isstr := (fld.DataType in [datWideString, datWideMemo, datString, datDateTime, datMemo]);
+
+ fClause := fClause + '(' + fieldnametouse + ' ' + StrSQLCondition[cIn] + ' (';
+
+ cnt := High(Values);
+ for i := 0 to cnt do begin
+ if isstr then
+ fClause := fClause + '''' + VarToStr(Values[i]) + ''''
+ else
+ fClause := fClause + VarToStr(Values[i]) + '';
+
+ if (i < cnt) then fClause := fClause + ', ';
+ end;
+ fClause := fClause + '))';
+ end;
+ Changed := True;
+ if Assigned(OnChange) then OnChange(Self);
+end;
+
+constructor TDAWhere.Create(const aFields: TDAFieldCollection; aClientFields : boolean);
+begin
+ inherited Create;
+ fDefaultOperator := doAnd;
+ fFields := aFields;
+ fClientFields := aClientFields;
+end;
+
+{$WARN SYMBOL_DEPRECATED OFF} // Delphi warns you about implementing a method that's deprecated in the interface.
+
+procedure TDAWhere.OpenBraket;
+begin
+ OpenBracket();
+end;
+
+procedure TDAWhere.CloseBraket;
+begin
+ CloseBracket();
+end;
+
+{$WARN SYMBOL_DEPRECATED ON}
+
+procedure TDAWhere.OpenBracket;
+begin
+ fClause := fClause + '(';
+ Changed := True;
+ if Assigned(OnChange) then OnChange(Self);
+end;
+
+procedure TDAWhere.CloseBracket;
+begin
+ fClause := fClause + ')';
+ Changed := True;
+ if Assigned(OnChange) then OnChange(Self);
+end;
+
+procedure TDAWhere.AddOperator(aOperator: TDASQLOperator);
+begin
+ fClause := fClause + ' ' + StrSQLOperator[aOperator] + ' ';
+ Changed := True;
+ fLastWasCondition := False;
+ if Assigned(OnChange) then OnChange(Self);
+end;
+
+procedure TDAWhere.Clear;
+begin
+ fClause := '';
+ fLastWasCondition := false;
+ Changed := True;
+ if Assigned(OnChange) then OnChange(Self);
+end;
+
+procedure TDAWhere.AddText(const someText: string; MapClientFields : boolean = TRUE);
+var s : string;
+ i : integer;
+begin
+ s := someText;
+
+ if MapClientFields then begin
+ for i := 0 to (Fields.Count-1) do
+ s := StringReplace(s, ClientFieldPrefix+Fields[i].Name, Fields[i].TableField, [rfReplaceAll, rfIgnoreCase]);
+ end;
+
+ fClause := fClause + s;
+
+ Changed := True;
+ if Assigned(OnChange) then OnChange(Self);
+end;
+
+procedure TDAWhere.AddSpaces(Count: integer = 1);
+var
+ i: integer;
+begin
+ for i := 1 to Count do
+ fClause := fClause + ' ';
+
+ Changed := True;
+ if Assigned(OnChange) then OnChange(Self);
+end;
+
+function TDAWhere.GetEmpty: boolean;
+begin
+ result := Trim(fClause)=''
+end;
+
+function TDAWhere.GetNotEmpty: boolean;
+begin
+ result := not Empty
+end;
+
+function TDAWhere.AddConditions(const FieldNames: array of string;
+ const Conditions: array of TDASQLCondition;
+ const Values: array of Variant;
+ const Operator: TDASQLOperator): integer;
+var i : integer;
+ isnull : boolean;
+ oldclause : string;
+ oldonchange : TNotifyEvent;
+begin
+ result := 0;
+ oldclause := fClause;
+ oldonchange := OnChange;
+ OnChange := NIL;
+ try
+ for i := 0 to Length(FieldNames)-1 do begin
+ isnull := VarIsNull(Values[i]) or (VarIsType(Values[i], [varString, varOleStr]) and (Values[i] = ''));
+ if isnull then Continue;
+
+ if NotEmpty then AddOperator(Operator);
+ AddCondition(FieldNames[i], Conditions[i], Values[i], TRUE);
+ Inc(result);
+ end;
+ finally
+ // This is to avoid OnChange fireing for each condition in the loop above
+ OnChange := oldonchange;
+ Changed := True;
+ if Assigned(OnChange) then OnChange(Self);
+ end;
+end;
+
+function TDAWhere.AddCondition(const FieldName: string;
+ Condition: TDASQLCondition): boolean;
+begin
+ Result:=AddCondition(FieldName,Condition,0);
+end;
+
+{ TDAColumnMapping }
+
+procedure TDAColumnMapping.Assign(aSource: TPersistent);
+var
+ lSource: TDAColumnMapping;
+begin
+ if (aSource is TDAColumnMapping) then begin
+ lSource := TDAColumnMapping(aSource);
+ fDatasetField := lSource.fDatasetField;
+ fTableField := lSource.fTableField;
+ end
+ else begin
+ inherited;
+ end;
+end;
+
+procedure TDAColumnMapping.AssignFieldMapping(aSource: TPersistent);
+var
+ lSource: TDAColumnMapping;
+begin
+ lSource := TDAColumnMapping(aSource);
+ fDatasetField := lSource.fDatasetField;
+ fTableField := lSource.fTableField;
+ fSQLOrigin := lSource.fSQLOrigin;
+end;
+
+function TDAColumnMapping.GetSQLOrigin: string;
+begin
+ if (fSQLOrigin='')
+ then result := TableField
+ else result := fSQLOrigin
+end;
+
+procedure TDAColumnMapping.SetDatasetField(const Value: string);
+begin
+ fDatasetField := Trim(Value);
+end;
+
+procedure TDAColumnMapping.SetSQLOrigin(const Value: string);
+begin
+ fSQLOrigin:= Trim(Value)
+end;
+
+procedure TDAColumnMapping.SetTableField(const Value: string);
+begin
+ fTableField := Trim(Value);
+end;
+
+function TDAColumnMapping.StoreSQLOrigin: Boolean;
+begin
+ result := (fSQLOrigin <> fTableField) and (Trim(fSQLOrigin)<>'')
+end;
+
+{ TDAClientBusinessRuleScript }
+
+constructor TDAClientBusinessRuleScript.Create;
+begin
+ inherited;
+ fRunOnClientAndServer := true;
+ fCompileOnServer := true;
+end;
+
+{ TDADriverForeignKey }
+
+function TDADriverForeignKey.GetValue(const Index: Integer): string;
+begin
+ result := fValues[Index];
+end;
+
+procedure TDADriverForeignKey.SetValue(const Index: Integer; const Value: string);
+begin
+ fValues[Index] := Value;
+end;
+
+{ TDADriverForeignKeyCollection }
+
+constructor TDADriverForeignKeyCollection.Create(aOwner: TPersistent);
+begin
+ inherited Create(aOwner, TDADriverForeignKey);
+end;
+
+function TDADriverForeignKeyCollection.Add: TDADriverForeignKey;
+begin
+ result := TDADriverForeignKey(inherited Add());
+end;
+
+function TDADriverForeignKeyCollection.GetForeignKeys(Index: integer): TDADriverForeignKey;
+begin
+ result := TDADriverForeignKey(inherited Items[Index]);
+end;
+
+procedure TDADriverForeignKeyCollection.SetForeignKeys(Index: integer; const Value: TDADriverForeignKey);
+begin
+ inherited Items[Index].Assign(Value);
+end;
+
+{ TDAUpdateRuleCollection }
+
+function TDAUpdateRuleCollection.Add: TDAUpdateRule;
+begin
+ result := inherited Add() as TDAUpdateRule;
+end;
+
+constructor TDAUpdateRuleCollection.Create(aOwner : TComponent);
+begin
+ inherited Create(aOwner, TDAUpdateRule);
+end;
+
+function TDAUpdateRuleCollection.GetItemName(
+ anItem: TCollectionItem): string;
+begin
+ Result := TDAUpdateRule(anItem).Name;
+end;
+
+function TDAUpdateRuleCollection.GetUpdateRules(
+ Index: integer): TDAUpdateRule;
+begin
+ result := TDAUpdateRule(inherited Items[Index]);
+end;
+
+function TDAUpdateRuleCollection.SetItemName(anItem: TCollectionItem;
+ const aName: string): string;
+begin
+ TDAUpdateRule(anItem).Name := aName;
+end;
+
+function TDAUpdateRuleCollection.UpdateRuleByName(
+ const aName: string): TDAUpdateRule;
+begin
+ result := ItemByName(aName) as TDAUpdateRule;
+end;
+
+{ TDAUpdateRule }
+
+procedure TDAUpdateRule.Assign(aSource: TPersistent);
+var
+ lSource: TDAUpdateRule;
+begin
+ lSource := aSource as TDAUpdateRule;
+ fDatasetName := lSource.fDatasetName;
+ fName := lSource.fName;
+ fDoUpdate := lSource.fDoUpdate;
+ fDoInsert := lSource.fDoInsert;
+ fDoDelete := lSource.fDoDelete;
+ fFailureBehavior := lSource.fFailureBehavior;
+end;
+
+constructor TDAUpdateRule.Create(aCollection: TCollection);
+begin
+ inherited;
+
+ fDoUpdate := true;
+ fDoInsert := true;
+ fDoDelete := true;
+ fFailureBehavior := fbRaiseException;
+end;
+
+function TDAUpdateRule.GetChangeTypes: TDAChangeTypes;
+begin
+ result := [];
+ if DoUpdate then Include(result,ctUpdate);
+ if DoInsert then Include(result,ctInsert);
+ if DoDelete then Include(result,ctDelete);
+end;
+
+function TDAUpdateRule.GetDisplayName: string;
+begin
+ result := Name;
+ if (result='') then result := '';
+end;
+
+{ TDADatasetRelationshipCollection }
+
+function TDADatasetRelationshipCollection.Add: TDADatasetRelationship;
+begin
+ result := inherited Add() as TDADatasetRelationship;
+end;
+
+constructor TDADatasetRelationshipCollection.Create(aOwner: TComponent);
+begin
+ inherited Create(aOwner, TDADatasetRelationship);
+end;
+
+procedure TDADatasetRelationshipCollection.GetDetails(const aMasterDatasetName: string; aList: TDADatasetRelationshipList);
+var i : integer;
+begin
+ aList.Clear;
+ for i := 0 to (Count-1) do begin
+ if SameText(aMasterDatasetName, RelationShips[i].MasterDatasetName) then begin
+ aList.Add(RelationShips[i]);
+ end;
+ end;
+end;
+
+function TDADatasetRelationshipCollection.GetItemName(
+ anItem: TCollectionItem): string;
+begin
+ Result := TDADatasetRelationship(anItem).Name;
+end;
+
+function TDADatasetRelationshipCollection.GetRelationShips(
+ Index: integer): TDADatasetRelationship;
+begin
+ result := TDADatasetRelationship(inherited Items[Index]);
+end;
+
+function TDADatasetRelationshipCollection.RelationShipByName(
+ const aName: string): TDADatasetRelationship;
+begin
+ result := ItemByName(aName) as TDADatasetRelationship;
+end;
+
+function TDADatasetRelationshipCollection.RelationshipExists(
+ const aMasterDatasetName, aDetailDatasetName, aMasterFields,
+ aDetailFields: string): Boolean;
+var
+ i: integer;
+begin
+ result := false;
+ for i := 0 to Count - 1 do
+ with RelationShips[i] do
+ if (MasterDatasetName = aMasterDatasetName) and (DetailDatasetName = aDetailDatasetName)
+ and (MasterFields = aMasterFields) and (DetailFields = aDetailFields) then begin
+ result := true;
+ exit;
+ end;
+end;
+
+function TDADatasetRelationshipCollection.SetItemName(
+ anItem: TCollectionItem; const aName: string): string;
+begin
+ TDADatasetRelationship(anItem).Name := aName;
+end;
+
+{ TDADatasetRelationship }
+
+procedure TDADatasetRelationship.Assign(Source: TPersistent);
+var src : TDADatasetRelationship;
+begin
+ if (Source is TDADatasetRelationship) then begin
+ src := TDADatasetRelationship(Source);
+
+ Name := src.Name;
+ MasterDatasetName := src.MasterDatasetName;
+ MasterFields := src.MasterFields;
+ DetailDatasetName := src.DetailDatasetName;
+ DetailFields := src.DetailFields;
+ end
+ else inherited;
+end;
+
+function TDADatasetRelationship.GetDisplayName: string;
+begin
+ result := Format('%s: %s (%s) --> %s (%s)', [fName, fDetailDatasetName, fDetailFields, fMasterDatasetName, fMasterFields]);
+end;
+
+{ TDADatasetRelationshipList }
+
+function TDADatasetRelationshipList.Add(
+ aRelationship: TDADatasetRelationship): integer;
+begin
+ result := inherited Add(aRelationship)
+end;
+
+function TDADatasetRelationshipList.GetItems(
+ Index: integer): TDADatasetRelationship;
+begin
+ result := TDADatasetRelationship(inherited Items[Index]);
+end;
+
+{ TDALoginInfoAware }
+
+function TDALoginInfoAware._AddRef: Integer;
+begin
+ result := -1;
+end;
+
+function TDALoginInfoAware._Release: Integer;
+begin
+ result := -1;
+end;
+
+function TDALoginInfoAware.GetLoginInfo: TDALoginInfo;
+begin
+ result := fLoginInfo
+end;
+
+procedure TDALoginInfoAware.SetLoginInfo(aValue: TDALoginInfo);
+begin
+ fLoginInfo := aValue;
+end;
+
+{ TDAJoinDataTableCollection }
+
+constructor TDAJoinDataTableCollection.Create(aOwner : TComponent);
+begin
+ inherited Create(aOwner, TDAJoinDataTable);
+end;
+
+function TDAJoinDataTableCollection.GetJoinDataTables(Index: integer): TDAJoinDataTable;
+begin
+ result := TDAJoinDataTable(inherited Items[Index]);
+end;
+
+procedure TDAJoinDataTableCollection.SetJoinDataTables(Index: integer; const Value: TDAJoinDataTable);
+begin
+ JoinTables[Index].Assign(Value);
+end;
+
+{
+function TDAJoinedTableCollection.GetItemClass: TDASQLCommandClass;
+begin
+ result := TDAJoinedTable;
+end;
+}
+
+function TDAJoinDataTableCollection.Add: TDAJoinDataTable;
+begin
+ result := TDAJoinDataTable(inherited Add);
+end;
+
+function TDAJoinDataTableCollection.JoinTableByName(const aName: string): TDAJoinDataTable;
+begin
+ result := TDAJoinDataTable(inherited ItemByName(aName));
+end;
+
+function TDAJoinDataTableCollection.FindJoinTableByName(const aName: string): TDAJoinDataTable;
+begin
+ result := TDAJoinDataTable(inherited FindItem(aName));
+end;
+
+function TDAJoinDataTableCollection.GetItemName(
+ anItem: TCollectionItem): string;
+begin
+ Result := TDAJoinDataTable(anItem).Name;
+end;
+
+function TDAJoinDataTableCollection.SetItemName(anItem: TCollectionItem;
+ const aName: string): string;
+begin
+ TDAJoinDataTable(anItem).Name := aName;
+end;
+
+{ TDAJoinSourceTableCollection }
+
+function TDAJoinSourceTableCollection.GetJoinSourceTables(Index: integer): TDAJoinSourceTable;
+begin
+ result := TDAJoinSourceTable(inherited Items[Index])
+end;
+
+procedure TDAJoinSourceTableCollection.SetJoinSourceTables(Index: integer; const Value: TDAJoinSourceTable);
+begin
+ TDAJoinSourceTable(inherited Items[Index]).AssignTo(Value);
+end;
+
+constructor TDAJoinSourceTableCollection.Create(aOwner: TPersistent);
+begin
+ inherited Create(aOwner, TDAJoinSourceTable);
+end;
+
+function TDAJoinSourceTableCollection.Add: TDAJoinSourceTable;
+begin
+ result := TDAJoinSourceTable(inherited Add);
+end;
+
+function TDAJoinSourceTableCollection.JoinSourceTableByName(const aName: string): TDAJoinSourceTable;
+begin
+ result := TDAJoinSourceTable(inherited ItemByName(aName));
+end;
+{
+function TDAJoinedTableItemCollection.GetItemClass: TDAJoinedTableItem;
+begin
+ result := TDAJoinedTableItem;
+end;
+}
+
+function TDAJoinSourceTableCollection.GetItemName(
+ anItem: TCollectionItem): string;
+begin
+ Result := TDAJoinSourceTable(anItem).Name;
+end;
+
+function TDAJoinSourceTableCollection.SetItemName(anItem: TCollectionItem;
+ const aName: string): string;
+begin
+ TDAJoinSourceTable(anItem).Name := aName;
+end;
+
+{ TDAJoinDataTable }
+constructor TDAJoinDataTable.Create(Collection: TCollection);
+begin
+ inherited;
+ fJoinSourceTables := TDAJoinSourceTableCollection.Create(self);
+end;
+
+destructor TDAJoinDataTable.Destroy;
+begin
+ FreeAndNil(fJoinSourceTables);
+ inherited;
+end;
+
+procedure TDAJoinDataTable.Assign(aSource: TPersistent);
+var
+ lSource: TDAJoinDataTable;
+begin
+ if (aSource is TDAJoinDataTable) then begin
+ inherited; { Need to work the TDASQLCommand, too}
+ lSource := TDAJoinDataTable(aSource);
+ fJoinSourceTables.Assign(lSource.fJoinSourceTables);
+ fMasterTable:= lSource.fMasterTable;
+ end
+ else begin
+ inherited;
+ end;
+end;
+
+procedure TDAJoinDataTable.SetJoinSourceTables(const Value: TDAJoinSourceTableCollection);
+begin
+ fJoinSourceTables.Assign(Value);
+end;
+
+function TDAJoinDataTable.GetParams: TDAParamCollection;
+begin
+ result := nil;
+end;
+
+procedure TDAJoinDataTable.SetParams(const Value: TDAParamCollection);
+begin
+ // Do Nothing
+end;
+
+function TDAJoinDataTable.GetStatements(): TDAStatementCollection;
+begin
+ result := nil;
+end;
+
+procedure TDAJoinDataTable.SetStatements(const Value: TDAStatementCollection);
+begin
+ // Do Nothing
+end;
+
+function TDAJoinDataTable.GetSQLCommandCollection: TDASQLCommandCollection;
+begin
+ result := nil;
+end;
+
+
+{ TDAJoinSourceTable }
+constructor TDAJoinSourceTable.Create(Collection: TCollection);
+begin
+ inherited;
+ fJoinConditions := TDAJoinConditionCollection.Create(Self);
+end;
+
+function TDAJoinSourceTable.GetDisplayName: string;
+begin
+ if (Trim(Name) = '') then
+ result := ''
+ else
+ result := Name;
+end;
+
+procedure TDAJoinSourceTable.SetName(const Value: string);
+var
+ lOldName: string;
+begin
+ lOldName := fName;
+ fName := Value;
+ if lOldName <> '' then
+ (Collection as TSearcheableCollection).TriggerOnItemRenamed(lOldName, fName);
+end;
+
+procedure TDAJoinSourceTable.Assign(aSource: TPersistent);
+var
+ lSource: TDAJoinSourceTable;
+begin
+ if (aSource is TDAJoinSourceTable) then begin
+ lSource := TDAJoinSourceTable(aSource);
+ fName:= lSource.fName;
+ fJoinType:= lSource.fJoinType;
+ fJoinConditions.Assign(lSource.fJoinConditions);
+ end
+ else begin
+ inherited;
+ end;
+end;
+
+{ TDAJoinConditionCollection }
+constructor TDAJoinConditionCollection.Create(aOwner: TPersistent);
+begin
+ inherited Create(aOwner, TDAJoinCondition);
+end;
+
+function TDAJoinConditionCollection.Add: TDAJoinCondition;
+begin
+ result := TDAJoinCondition(inherited Add);
+end;
+
+constructor TDADatasetRelationship.Create(Collection: TCollection);
+begin
+ inherited Create(Collection);
+ fRelationshipType := rtForeignKey;
+end;
+
+{ TDATableFieldCollectionItem }
+
+procedure TDATableFieldCollectionItem.Assign(Source: TPersistent);
+begin
+ inherited;
+ if Source is TDATableFieldCollectionItem then begin
+ self.FFieldName := TDATableFieldCollectionItem(Source).FieldName;
+ self.FTableName := TDATableFieldCollectionItem(Source).TableName;
+ end;
+end;
+
+
+{ TDAQueryBuilder }
+
+procedure TDAQueryBuilder.AddCrossJoin(ATable: string);
+begin
+ with FMainTable.JoinSourceTables.Add do begin
+ JoinType := jtCross;
+ Name := ATable;
+ end;
+end;
+
+procedure TDAQueryBuilder.AddGroupBy(ATable, AField: string);
+begin
+ with TDAGroupByItem(FGroupByCollection.Add) do begin
+ TableName := aTable;
+ FieldName := AField;
+ end;
+end;
+
+procedure TDAQueryBuilder.AddJoin(AJoinTable, AJoinFieldName,
+ AJoinToTableName, AJoinToFieldName: string; AJoinType: TDAJoinType);
+begin
+ with FMainTable.JoinSourceTables.Add do begin
+ JoinType := AJoinType;
+ Name := AJoinTable;
+ with JoinConditions.Add do begin
+ FromTableName := AJoinTable;
+ FromFieldName := AJoinFieldName;
+ ToTableName := AJoinToTableName;
+ ToFieldName := AJoinToFieldName;
+ end;
+ end;
+end;
+
+procedure TDAQueryBuilder.AddJoin(AJoinTable: string;
+ AJoinFieldNames: array of string; AJoinToTableName: string;
+ AJoinToFieldNames: array of string; AJoinType: TDAJoinType);
+var
+ i: integer;
+begin
+ if High(AJoinToFieldNames) <> High(AJoinFieldNames) then raise Exception.Create('Can''t create join: AJoinFieldNames and AJoinToFieldNames should contain equal members count');
+ with FMainTable.JoinSourceTables.Add do begin
+ JoinType := AJoinType;
+ Name := AJoinTable;
+ For i:=0 to High(AJoinToFieldNames) do
+ with JoinConditions.Add do begin
+ FromTableName := AJoinTable;
+ FromFieldName := AJoinFieldNames[i];
+ ToTableName := AJoinToTableName;
+ ToFieldName := AJoinToFieldNames[i];
+ end;
+ end;
+end;
+
+procedure TDAQueryBuilder.AddOrderBy(ATable, AField: string);
+begin
+ with TDAOrderByItem(FOrderByCollection.Add) do begin
+ TableName := aTable;
+ FieldName := AField;
+ end;
+end;
+
+procedure TDAQueryBuilder.AddSelect(ATable, AField: string);
+begin
+ with TDASelectItem(FSelectCollection.Add) do begin
+ TableName := aTable;
+ FieldName := AField;
+ end;
+end;
+
+procedure TDAQueryBuilder.Assign(Source: TPersistent);
+begin
+ inherited;
+ if Source is TDAQueryBuilder then begin
+ FMainTable.Assign(TDAQueryBuilder(Source).MainTable);
+ FSelectCollection.Assign(TDAQueryBuilder(Source).Select);
+ FGroupByCollection.Assign(TDAQueryBuilder(Source).GroupBy);
+ FOrderByCollection.Assign(TDAQueryBuilder(Source).OrderBy);
+ FOptions:=TDAQueryBuilder(Source).FOptions;
+ FConnection:=TDAQueryBuilder(Source).Connection;
+ if (TDAQueryBuilder(Source).FWhere <> nil) or (FWhere <> nil) then
+ Where.Xml:=TDAQueryBuilder(Source).Where.Xml;
+ end;
+end;
+
+procedure TDAQueryBuilder.Clear;
+begin
+ FMainTable.MasterTable := '';
+ FMainTable.JoinSourceTables.Clear;
+ FSelectCollection.Clear;
+ if FWhere <> nil then FWhere.Clear;
+ FGroupByCollection.Clear;
+ FOrderByCollection.Clear;
+end;
+
+constructor TDAQueryBuilder.Create;
+begin
+ inherited Create;
+ FSelectCollection := TDASelectCollection.Create(TDASelectItem);
+ FMainTable := TDAJoinDataTable.Create(nil);
+ FGroupByCollection := TDAGroupByCollection.Create(TDAGroupByItem);
+ FOrderByCollection := TDAOrderByCollection.Create(TDAOrderByItem);
+ FColumnMapping := TDAColumnMappingCollection.Create(Self);
+ FWhere := nil;
+ FOptions := [];
+ Clear;
+end;
+
+function TDAQueryBuilder.CreateGroupByClause: string;
+var
+ i: integer;
+begin
+ Result := '';
+ for i := 0 to GroupBy.Count - 1 do begin
+ if i <> 0 then Result := Result + ', ';
+ with TDAGroupByItem(GroupBy.Items[i]) do
+ Result := Result + GenerateFieldName(TableName, FieldName);
+ end;
+end;
+
+function TDAQueryBuilder.CreateOrderByClause: string;
+var
+ i: integer;
+begin
+ Result := '';
+ for i := 0 to OrderBy.Count - 1 do begin
+ if i <> 0 then Result := Result + ', ';
+ with TDAOrderByItem(OrderBy.Items[i]) do
+ Result := Result + GenerateFieldName(TableName, FieldName);
+ end;
+end;
+
+function TDAQueryBuilder.CreateSelectClause: string;
+var
+ i,j: integer;
+ lflds: TDAFieldCollection;
+ lquotedtablename: string;
+begin
+ Result := '';
+ if Select.Count = 0 then begin
+ if not (qboGenerateSimpleSelect in FOptions) and Assigned(FConnection) then begin
+ FConnection.GetTableFields(MainTable.MasterTable, lflds);
+ if Assigned(lflds) then try
+ if MainTable.JoinSourceTables.Count =0 then
+ lquotedtablename := ''
+ else
+ lquotedtablename:=QuoteIdentifierIfNeeded(MainTable.MasterTable)+'.';
+ For i:= 0 to lflds.Count -1 do
+ Result := Result + lquotedtablename+QuoteFieldNameIfNeeded(MainTable.MasterTable, lflds.Fields[i].Name)+', '
+ finally
+ lFlds.Free;
+ end;
+ For j:= 0 to MainTable.JoinSourceTables.Count - 1 do
+ with TDAJoinSourceTable(MainTable.JoinSourceTables.Items[j]) do begin
+ lquotedtablename:=QuoteIdentifierIfNeeded(Name)+'.';
+ FConnection.GetTableFields(name, lflds);
+ if Assigned(lflds) then try
+ For i:= 0 to lflds.Count -1 do
+ Result := Result + lquotedtablename+QuoteFieldNameIfNeeded(Name, lflds.Fields[i].Name)+', '
+ finally
+ lFlds.Free;
+ end;
+ end;
+ end;
+ end else begin
+ for i := 0 to Select.Count - 1 do begin
+ with TDASelectItem(Select.Items[i]) do
+ Result := Result + GenerateFieldName(TableName, FieldName)+', ';
+ end;
+ end;
+ if Length(Result) > 2 then SetLength(Result, Length(Result)-2);
+ if Result = '' then Result:='*';
+end;
+
+function TDAQueryBuilder.CreateWhereClause: string;
+begin
+ if FWhere = nil then
+ Result := ''
+ else
+ Result := FWhere.CreateWhereClause;
+end;
+
+destructor TDAQueryBuilder.Destroy;
+begin
+ FColumnMapping.Free;
+ FWhere.Free;
+ FOrderByCollection.Free;
+ FGroupByCollection.Free;
+ FSelectCollection.Free;
+ FMainTable.Free;
+ inherited;
+end;
+
+function TDAQueryBuilder.GenerateFieldName(aTablename,
+ aFieldName: string; aProcessMapping: Boolean): string;
+begin
+ if aProcessMapping then aFieldName:= GetMappingTableField(aFieldName);
+ if aTableName <> '' then
+ Result := QuoteIdentifierIfNeeded(aTableName) + '.' + QuoteFieldNameIfNeeded(aTableName, aFieldName)
+ else
+ Result := QuoteFieldNameIfNeeded(aTableName, aFieldName);
+end;
+
+function TDAQueryBuilder.GenerateSelectSQL: string;
+const
+ c_Indent = ' ';
+ c_Lenght = 47;
+
+ function CompactString(AStr: String): string;
+ var
+ p,p1: Pchar;
+ s: string;
+ begin
+ Result:='';
+ p:=Pchar(AStr);
+ repeat
+ p1:=p;
+ repeat
+ p1:=StrPos(p1, ',');
+ if p1 <> nil then inc(p1);
+ until (p1 = nil) or (p1-p > c_lenght);
+ if p1 = nil then begin
+ s:=p;
+ end else begin
+ inc(p1);
+ SetString(s,p, p1-p);
+ end;
+ p:=p1;
+ Result:=Result+sLineBreak +c_Indent+ s;
+ until p = nil;
+ end;
+
+var
+ lSelect, lTable, lWhere, lGroupBy, lOrderBy: string;
+begin
+ Validate;
+ lSelect := CompactString(CreateSelectClause);
+ lTable := CreateTableClause;
+ lWhere := CreateWhereClause;
+ lGroupBy := CreateGroupByClause;
+ lOrderBy := CreateOrderByClause;
+ Result :=
+ 'SELECT' + lSelect + sLinebreak +
+ 'FROM' + sLineBreak + c_Indent + lTable;
+ if (qboGenerateDynamicWhereStatement in Options) and (lWhere = '') then lWhere := '{WHERE}';
+ if lWhere <> '' then Result := Result + sLineBreak + 'WHERE' + sLineBreak + c_Indent + lWhere;
+ if lGroupBy <> '' then Result := Result + sLineBreak + 'GROUP BY' + sLineBreak + c_Indent + lGroupBy;
+ if lOrderBy <> '' then Result := Result + sLineBreak + 'ORDER BY' + sLineBreak + c_Indent + lOrderBy;
+end;
+
+function TDAQueryBuilder.GetMappingTableField(
+ const aDataSetField: string): string;
+var
+ lColumnMapping: TDAColumnMapping;
+begin
+ lColumnMapping := FColumnMapping.FindMappingByDatasetField(aDataSetField);
+ if Assigned(lColumnMapping) then
+ Result := lColumnMapping.TableField
+ else
+ Result := aDataSetField;
+end;
+
+function TDAQueryBuilder.GetWhereBuilder: TDASQLWhereBuilder;
+begin
+ if FWhere = nil then FWhere := CreateWhereBuilder;
+ Result:= FWhere;
+end;
+
+function TDAQueryBuilder.IdentifierNeedsQuoting(
+ const iIdentifier: string): boolean;
+var
+ i: integer;
+begin
+ if Assigned(Connection) then
+ Result := Connection.IdentifierNeedsQuoting(iIdentifier)
+ else begin
+ Result := False;
+ for i := 1 to Length(iIdentifier) do begin
+ Result := not CharInSet(iIdentifier[i], ['a'..'z', 'A'..'Z', '0'..'9', '_', '.']);
+ if Result then Break;
+ end;
+ end;
+end;
+
+function TDAQueryBuilder.QuoteFieldNameIfNeeded(const aTableName,
+ aFieldName: string): string;
+begin
+ if Assigned(Connection) then
+ Result := Connection.QuoteFieldNameIfNeeded(aTableName, aFieldName)
+ else
+ Result := {aTableName + '.' +} QuoteIdentifierIfNeeded(aFieldName);
+end;
+
+function TDAQueryBuilder.QuoteIdentifier(
+ const iIdentifier: string): string;
+begin
+ if Assigned(Connection) then
+ Result := Connection.QuoteIdentifier(iIdentifier)
+ else
+ Result := '''' + iIdentifier + '''';
+end;
+
+function TDAQueryBuilder.QuoteIdentifierIfNeeded(
+ const iIdentifier: string): string;
+begin
+ if Assigned(Connection) then
+ Result := Connection.QuoteIdentifierIfNeeded(iIdentifier)
+ else if IdentifierNeedsQuoting(iIdentifier) then
+ Result := QuoteIdentifier(iIdentifier)
+ else
+ Result := iIdentifier;
+end;
+
+procedure TDAQueryBuilder.SetColumnMapping(
+ const Value: TDAColumnMappingCollection);
+begin
+ FColumnMapping.AssignColumnMapping(Value);
+end;
+
+procedure TDAQueryBuilder.Validate;
+begin
+ if FMainTable.MasterTable = '' then raise Exception.Create('Please specify MainTable.MasterTable');
+end;
+
+{ TDAWhereBuilder }
+
+const
+ c_DAWhereBuilderLocalName = 'query';
+ c_DAWhereBuilderNamespaceURI = 'http://www.remobjects.com/schemas/dataabstract/queries/5.0';
+ c_DAWhereBuilderwhere = 'where';
+procedure TDAWhereBuilder.Clear;
+begin
+ FreeAndNil(FExpression);
+ FColumnMapping.Clear;
+ fParams.Clear;
+end;
+
+constructor TDAWhereBuilder.Create;
+begin
+ inherited Create;
+ FColumnMapping := TDAColumnMappingCollection.Create(nil);
+ fParams := TDAParamCollection.Create(nil);
+end;
+
+destructor TDAWhereBuilder.Destroy;
+begin
+ Clear;
+ fParams.Free;
+ FColumnMapping.Free;
+ inherited Destroy;
+end;
+
+function TDAWhereBuilder.ExpressionToXmlNode(
+ const aExpression: TDAWhereExpression): IXMLNode;
+var
+ doc: IXMLDocument;
+ el: IXMLNode;
+begin
+ doc := NewROXmlDocument;
+ doc.New(c_DAWhereBuilderLocalName);
+ el := doc.DocumentNode;
+ el.AddAttribute('xmlns', c_DAWhereBuilderNamespaceURI);
+ el.AddAttribute('version', '5.0');
+ WriteToXml(el,aExpression);
+ result := doc.DocumentNode;
+end;
+
+function TDAWhereBuilder.getXml: WideString;
+begin
+ Result:= ExpressionToXmlNode(fExpression).Document.XML;
+end;
+
+function TDAWhereBuilder.IsEmpty: Boolean;
+begin
+ Result:= fExpression = nil;
+end;
+
+function TDAWhereBuilder.NewBinaryExpression(aLeft,
+ aRight: TDAWhereExpression; anOp: TDABinaryOperator): TDAWhereExpression;
+begin
+ Result := TDABinaryExpression.Create(aLeft, aRight, anOp);
+end;
+
+function TDAWhereBuilder.NewConstant(const aValue: Variant;
+ aType: TDADataType): TDAWhereExpression;
+begin
+ Result := TDAConstantExpression.Create(aValue, aType);
+end;
+
+function TDAWhereBuilder.NewField(
+ const aTableName,aFieldName: string): TDAWhereExpression;
+begin
+ Result := TDAFieldExpression.Create(aTableName,aFieldName);
+end;
+
+function TDAWhereBuilder.NewList(
+ const aValues: array of TDAWhereExpression): TDAWhereExpression;
+begin
+ result := TDAListExpression.Create(aValues);
+end;
+
+function TDAWhereBuilder.NewMacro(const aName: string;
+ const aValues: array of TDAWhereExpression): TDAWhereExpression;
+begin
+ Result := TDAMacroExpression.Create(aName, aValues);
+end;
+
+function TDAWhereBuilder.NewMacro(const aName: string): TDAWhereExpression;
+begin
+ Result := TDAMacroExpression.Create(aName);
+end;
+
+function TDAWhereBuilder.NewNull: TDAWhereExpression;
+begin
+ Result := TDANullExpression.Create;
+end;
+
+function TDAWhereBuilder.NewParameter(
+ const aParameterName: string): TDAWhereExpression;
+begin
+ Result := TDAParameterExpression.Create(aParameterName);
+end;
+
+function TDAWhereBuilder.NewUnaryExpression(
+ anExpression: TDAWhereExpression;
+ anOp: TDAUnaryOperator): TDAWhereExpression;
+begin
+ Result := TDAUnaryExpression.Create(anExpression, anOp);
+end;
+
+function TDAWhereBuilder.ReadFromXml(xr: IXmlNode): TDAWhereExpression;
+begin
+ xr := SelectNodeLocal(xr, c_DAWhereBuilderwhere);
+ if (xr = nil) then raise Exception.Create('"'+c_DAWhereBuilderwhere+'" tag expected');
+ if xr.ChildrenCount > 0 then
+ Result := TDAWhereExpression.ParseExpression(xr.FirstChild)
+ else
+ Result := nil;
+end;
+
+procedure TDAWhereBuilder.SetColumnMapping(
+ const Value: TDAColumnMappingCollection);
+begin
+ FColumnMapping.AssignColumnMapping(Value);
+end;
+
+procedure TDAWhereBuilder.SetParams(const Value: TDAParamCollection);
+begin
+ fParams.AssignParamCollection(Value);
+end;
+
+procedure TDAWhereBuilder.setXml(const aValue: WideString);
+begin
+ Clear;
+ fExpression:=XMLToExpression(aValue);
+end;
+
+procedure TDAWhereBuilder.WriteToXml(sw: IXmlNode; const aExpression: TDAWhereExpression);
+begin
+ sw := sw.Add(c_DAWhereBuilderwhere);
+ if aExpression <> nil then
+ aExpression.WriteToXml(sw);
+end;
+
+function TDAWhereBuilder.XMLToExpression(
+ const aXML: widestring): TDAWhereExpression;
+var
+ doc: IXMLDocument;
+ el: IXMLNode;
+begin
+ doc := NewROXmlDocument;
+ doc.New();
+ doc.XML := aXML;
+ el := doc.DocumentNode;
+ if (el.LocalName <> c_DAWhereBuilderLocalName) or (el.NamespaceURI <> c_DAWhereBuilderNamespaceURI) then raise Exception.Create('Not a DataAbstract query xml');
+ Result:= ReadFromXml(el);
+end;
+
+{ TDAWhereExpression }
+
+class function TDAWhereExpression.ParseExpression(xr: IXmlNode): TDAWhereExpression;
+begin
+ Result := CreateWhereExpression(xr.LocalName);
+ Result.ReadFromXml(xr);
+end;
+
+procedure TDAWhereExpression.Validate;
+begin
+// nothing
+end;
+
+{ TDAUnionDataTable }
+constructor TDAUnionDataTable.Create(Collection: TCollection);
+begin
+ inherited;
+ fSourceTables := TDAUnionSourceTableCollection.Create(Self);
+end;
+
+destructor TDAUnionDataTable.Destroy;
+begin
+ FreeAndNil(fSourceTables);
+ inherited;
+end;
+
+procedure TDAUnionDataTable.SetSourceTables(Value: TDAUnionSourceTableCollection);
+begin
+ fSourceTables.Assign(Value);
+end;
+
+{ TDAUnionSourceTableCollection }
+function TDAUnionSourceTableCollection.Add: TDAUnionSourceTable;
+begin
+ result := inherited Add() as TDAUnionSourceTable;
+end;
+
+constructor TDAUnionSourceTableCollection.Create(aOwner : TPersistent);
+begin
+ inherited Create(aOwner, TDAUnionSourceTable);
+end;
+
+function TDAUnionSourceTableCollection.GetItemName(
+ anItem: TCollectionItem): string;
+begin
+ Result := TDAUnionSourceTable(anItem).Name;
+end;
+
+function TDAUnionSourceTableCollection.GetUnionSourceTables(
+ Index: integer): TDAUnionSourceTable;
+begin
+ result := TDAUnionSourceTable(inherited Items[Index]);
+end;
+
+function TDAUnionSourceTableCollection.SetItemName(anItem: TCollectionItem;
+ const aName: string): string;
+begin
+ TDAUnionSourceTable(anItem).Name := aName;
+end;
+
+function TDAUnionSourceTableCollection.UnionSourceTableByName(
+ const aName: string): TDAUnionSourceTable;
+begin
+ result := ItemByName(aName) as TDAUnionSourceTable
+end;
+
+{ TDAUnionSourceTable }
+procedure TDAUnionSourceTable.Assign(Source: TPersistent);
+begin
+ if Source is TDAUnionSourceTable then begin
+ Name := TDAUnionSourceTable(Source).Name;
+ IsReadonly := TDAUnionSourceTable(Source).IsReadOnly;
+ ColumnMappings.Assign(TDAUnionSourceTable(Source).ColumnMappings);
+ end;
+end;
+
+constructor TDAUnionSourceTable.Create(Collection: TCollection);
+begin
+ inherited;
+ fColumnMappings := TDAColumnMappingCollection.Create(Self);
+end;
+
+destructor TDAUnionSourceTable.Destroy;
+begin
+ FreeAndNil(fColumnMappings);
+ inherited;
+end;
+
+procedure TDAUnionSourceTable.SetColumnMappings(const Value: TDAColumnMappingCollection);
+begin
+ fColumnMappings.Assign(Value);
+end;
+
+{ TDAUnionDataTableCollection }
+constructor TDAUnionDataTableCollection.Create(aOwner : TComponent);
+begin
+ inherited Create(aOwner, TDAUnionDataTable);
+end;
+
+function TDAUnionDataTableCollection.GetUnionDataTables(Index: integer): TDAUnionDataTable;
+begin
+ result := TDAUnionDataTable(inherited Items[Index]);
+end;
+
+procedure TDAUnionDataTableCollection.SetUnionDataTables(Index: integer; const Value: TDAUnionDataTable);
+begin
+ UnionDataTables[Index].Assign(Value);
+end;
+
+function TDAUnionDataTableCollection.Add: TDAUnionDataTable;
+begin
+ result := TDAUnionDataTable(inherited Add);
+end;
+
+function TDAUnionDataTableCollection.UnionDataTableByName(const aName: string): TDAUnionDataTable;
+begin
+ result := TDAUnionDataTable(inherited ItemByName(aName));
+end;
+
+function TDAUnionDataTableCollection.FindUnionDataTableByName(const aName: string): TDAUnionDataTable;
+begin
+ result := TDAUnionDataTable(inherited FindItem(aName));
+end;
+
+
+
+function TDAUnionDataTableCollection.GetItemName(
+ anItem: TCollectionItem): string;
+begin
+ Result := TDAUnionDataTable(anItem).Name;
+end;
+
+function TDAUnionDataTableCollection.SetItemName(anItem: TCollectionItem;
+ const aName: string): string;
+begin
+ TDAUnionDataTable(anItem).Name := aName;
+end;
+
+{ TDASQLWhereBuilder }
+
+constructor TDASQLWhereBuilder.Create(AConnection: IDAConnection);
+begin
+ inherited Create;
+ FConnection:= AConnection;
+end;
+
+constructor TDASQLWhereBuilder.Create(AQueryBuilder: TDAQueryBuilder);
+begin
+ inherited Create;
+ FQueryBuilder:= AQueryBuilder;
+end;
+
+function TDASQLWhereBuilder.CreateWhereClause: string;
+begin
+ FId:=0;
+ Params.Clear;
+ Expression.Validate;
+ Result:= ProcessExpression(Expression);
+end;
+
+
+function TDASQLWhereBuilder.GenerateFieldName(aTablename,
+ aFieldName: string): string;
+begin
+ aFieldName:= GetMappingTableField(aFieldName);
+ if FQueryBuilder <> nil then
+ Result := FQueryBuilder.GenerateFieldName(aTablename,aFieldName,False)
+ else
+ if FConnection <> nil then begin
+ if aTableName <> '' then
+ Result := FConnection.QuoteIdentifierIfNeeded(aTableName) + '.' + FConnection.QuoteFieldNameIfNeeded(aTableName, aFieldName)
+ else
+ Result := FConnection.QuoteFieldNameIfNeeded(aTableName, aFieldName);
+ end
+ else
+ Result:= aFieldName;
+end;
+
+function TDASQLWhereBuilder.GenerateParameter(
+ const aParameterName: string): string;
+begin
+ Result:= ':'+aParameterName;
+end;
+
+function TDASQLWhereBuilder.GenerateParamName: String;
+begin
+ fId := fId + 1;
+ result := Format('P%d', [fId]);
+end;
+
+function TDASQLWhereBuilder.GetMappingTableField(
+ const aDataSetField: string): string;
+var
+ lColumnMapping: TDAColumnMapping;
+begin
+ lColumnMapping := FColumnMapping.FindMappingByDatasetField(aDataSetField);
+ if Assigned(lColumnMapping) then
+ Result := lColumnMapping.TableField
+ else
+ Result := aDataSetField;
+end;
+
+function TDASQLWhereBuilder.ProcessConstantExpression(
+ AExpression: TDAWhereExpression): string;
+const
+ const_prefix = 'DACONST_';
+begin
+ With Params.Add do begin
+ ParamType := daptInput;
+ Value := TDAConstantExpression(AExpression).Value;
+ DataType := TDAConstantExpression(AExpression).aType;
+ Name := GenerateParamName();
+ Result:= GenerateParameter(Name);
+ end;
+end;
+
+function TDASQLWhereBuilder.ProcessExpression(
+ AExpression: TDAWhereExpression): string;
+begin
+ Result := '';
+ if AExpression = nil then Exit;
+ if AExpression is TDABinaryExpression then Result := ProcessBinaryExpression(TDABinaryExpression(AExpression))
+ else if AExpression is TDAUnaryExpression then Result := ProcessUnaryExpression(TDAUnaryExpression(AExpression))
+ else if AExpression is TDAConstantExpression then Result := ProcessConstantExpression(TDAConstantExpression(AExpression))
+ else if AExpression is TDAListExpression then Result := ProcessListExpression(TDAListExpression(AExpression))
+ else if AExpression is TDAParameterExpression then Result := ProcessParameterExpression(TDAParameterExpression(AExpression))
+ else if AExpression is TDAFieldExpression then Result := ProcessFieldExpression(TDAFieldExpression(AExpression))
+ else if AExpression is TDANullExpression then Result := ProcessNullExpression(TDANullExpression(AExpression))
+ else if AExpression is TDAMacroExpression then Result := ProcessMacroExpression(TDAMacroExpression(AExpression))
+ else ;
+end;
+
+function TDASQLWhereBuilder.ProcessFieldExpression(
+ AExpression: TDAWhereExpression): string;
+begin
+ with TDAFieldExpression(AExpression) do
+ Result:= GenerateFieldName(TableName, FieldName);
+end;
+
+function TDASQLWhereBuilder.ProcessListExpression(
+ AExpression: TDAWhereExpression): string;
+var
+ i: integer;
+begin
+ Result := '';
+ with TDAListExpression(AExpression) do
+ for i := 0 to Count - 1 do begin
+ if i > 0 then Result := Result + ', ';
+ Result := Result + ProcessExpression(Item[i]);
+ end;
+end;
+
+function TDASQLWhereBuilder.ProcessMacroExpression(
+ AExpression: TDAWhereExpression): string;
+var
+ s1: string;
+ i: integer;
+begin
+ with TDAMacroExpression(AExpression) do begin
+ Result := '{' + Name;
+ s1 := '}';
+ if Count > 0 then begin
+ Result := Result + '(';
+ for i := 0 to Count - 1 do begin
+ if i > 0 then Result := Result + ', ';
+ Result := Result + ProcessExpression(Item[i]);
+ end;
+ Result := Result + ')';
+ end;
+ end;
+ Result := Result + s1;
+end;
+
+function TDASQLWhereBuilder.ProcessParameterExpression(
+ AExpression: TDAWhereExpression): string;
+begin
+ with TDAParameterExpression(AExpression) do
+ Result := GenerateParameter(ParameterName);
+end;
+
+procedure Params_ParseSQL(aParams: TParams; aSQL: String; DoCreate: Boolean; aQuoteChar: TDAQuoteCharArray; aUseDefaultChars: Boolean = False);
+const
+ c_defaultchars = ['[',']','"','`',''''];
+var
+ lSQL: string;
+ i: integer;
+ lName: string;
+ lLen: integer;
+begin
+ { Bug in ParseSQL modified passed in string; use UniqueString to prevent corrupting the original! }
+ lSQL := aSQL;
+ UniqueString(lSQL);
+ aParams.ParseSQL(lSQL, DoCreate);
+ for i:=0 to aParams.Count -1 do begin
+ lName := aParams[i].Name;
+ lLen := Length(lName);
+ // it fixes problem when used non-standard quotes like [ and ]
+ if (lLen > 2) and (
+ (not aUseDefaultChars and (lName[1] = aQuoteChar[0]) and (lName[lLen] = aQuoteChar[1])) or
+ (aUseDefaultChars and CharInSet(lName[1], c_defaultchars) and CharInSet(lName[lLen], c_defaultchars))) then begin
+ lName := Copy(lName,2, lLen -2 );
+ aParams[i].Name:= lName;
+ end
+ // bug in BDS2006, when TParams.ParseSQL parses "ORDERS" as ORDERS"
+ {$IFDEF BDS4}
+ else if (lLen > 1) and (
+ (aUseDefaultChars and (lName[lLen] in c_defaultchars)) or (not aUseDefaultChars and (lName[lLen] = aQuoteChar[1]))) then begin
+ SetLength(lName, lLen - 1);
+ aParams[i].Name:= lName;
+ end
+ {$ENDIF}
+ ;
+ end;
+end;
+
+{$IFDEF DataAbstract_Trial}
+{$INCLUDE DataAbstract_Trial.inc}
+{$ENDIF DataAbstract_Trial}
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDAInterfacesEx.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAInterfacesEx.pas
new file mode 100644
index 0000000..d9ba34b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAInterfacesEx.pas
@@ -0,0 +1,37 @@
+unit uDAInterfacesEx;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ uDAInterfaces;
+
+type
+ IDAConnectionMetaData = interface(IDAConnection)
+ ['{ACDD5335-B7CB-4E0F-8241-4A323D4731F1}']
+ end;
+
+ IDAConnectionModelling = interface(IDAConnection)
+ ['{ACDD5335-B7CB-4E0F-8241-4A323D4731F1}']
+
+ function FieldToDeclaration(aField: TDAField): string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function BuildCreateTableSQL(aDataSet: TDADataSet; const aOverrideName: string = ''): string; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure CreateTable(aDataSet: TDADataSet; const aOverrideName: string = ''); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ end;
+
+implementation
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDAKDBInfo.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAKDBInfo.pas
new file mode 100644
index 0000000..c0f4ef0
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAKDBInfo.pas
@@ -0,0 +1,325 @@
+unit uDAKDBInfo;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ Classes,
+ kdbInfo, kdbstruc,
+ uDAInterfaces, uDAClasses;
+
+type
+ TDAKDBConnectionInfo = class(TKDBInfo)
+ private
+ fConnection: IDAConnection;
+ fDatabaseName: string;
+ procedure AddGroupWithFields(aStructure: TKDBStructure; aTable: TDSTable);
+ protected
+ procedure TablesByDatabase(TablesList : TStrings); override;
+ procedure FieldsByTable(const TableName : string; FieldsList : TDBFieldList); override;
+ procedure AvailableDatabases(DBList : TStrings); override; //NEW: replacement for GetDatabaseNames
+ public
+ property Connection: IDAConnection read fConnection write fConnection;
+ property DatabaseName: string read fDatabaseName write fDatabaseName;
+
+ procedure GetSQLValues(SQL : String; AValues,AItems : TStrings); override;
+
+ procedure FillStructure(aStructure: TKDBStructure);
+ end;
+
+ TDAKDBSchemaInfo = class(TKDBInfo)
+ private
+ fSchema: TDASchema;
+ fDatabaseName: string;
+ procedure AddGroupWithFields(aStructure: TKDBStructure; aTable: TDSTable);
+ procedure SetSchema(const Value: TDASchema);
+ protected
+ procedure TablesByDatabase(TablesList : TStrings); override;
+ procedure FieldsByTable(const TableName : string; FieldsList : TDBFieldList); override;
+ procedure AvailableDatabases(DBList : TStrings); override; //NEW: replacement for GetDatabaseNames
+
+ procedure Notification(AComponent: TComponent; Operation: TOperation); override;
+ public
+ property Schema: TDASchema read fSchema write SetSchema;
+ property DatabaseName: string read fDatabaseName write fDatabaseName;
+
+ procedure GetSQLValues(SQL : String; AValues,AItems : TStrings); override;
+
+ procedure FillStructure(aStructure: TKDBStructure);
+ end;
+
+implementation
+
+uses
+ uROClasses, sqglobal, SysUtils, Math;
+
+{ TDAKDBConnectionInfo }
+
+procedure TDAKDBConnectionInfo.FieldsByTable(const TableName: string; FieldsList: TDBFieldList);
+var
+ lNewField: TDBFieldInfo;
+ i: Integer;
+ lFields: TDAFieldCollection;
+begin
+ inherited;
+ fConnection.GetTableFields(TableName, lFields);
+ FieldsList.Clear();
+ for i := 0 to lFields.Count-1 do begin
+ lNewField := TDBFieldInfo.Create();
+ lNewField.FieldName := lFields[i].Name;
+ lNewField.FieldSize := lFields[i].Size;
+ lNewField.FieldType := DATypeToVCLType(lFields[i].DataType);
+ FieldsList.Add(lNewField);
+ end; { for }
+end;
+
+
+procedure TDAKDBConnectionInfo.AvailableDatabases(DBList : TStrings);
+ //NEW: previously realization of GetDatabaseNames, name Alist replaced with DBList
+begin
+ inherited;
+ DBList.Clear();
+ DBList.Add(DatabaseName);
+end;
+
+procedure TDAKDBConnectionInfo.GetSQLValues(SQL: String; AValues, AItems: TStrings);
+begin
+ inherited;
+
+end;
+
+procedure TDAKDBConnectionInfo.TablesByDatabase(TablesList: TStrings);
+var
+ lROStrings: IROStrings;
+begin
+ inherited;
+ fConnection.GetTableNames(lROStrings);
+ TablesList.Clear();
+ TablesList.Text := lROStrings.Text;
+end;
+
+
+
+
+
+
+procedure TDAKDBConnectionInfo.AddGroupWithFields(aStructure: TKDBStructure; aTable: TDSTable);
+var
+ G : TDSFieldGroup;
+ //LastRootNode, GroupNode : TTreeNode;
+ I,Idx : integer;
+ TblFields : TStrings;
+begin
+ TblFields := TStringList.Create;
+ try
+ G := TDSFieldGroup.Create(aStructure);
+ G.GroupName := ATable.TableName;
+ aStructure.FieldGroups.Add(G);
+ //FillGroupsCombo;
+
+ {LastRootNode := nil;
+ if not chbRootFirst.Checked then
+ begin
+ for I := tvFields.Items.Count - 1 downto 0 do
+ if tvFields.Items[I].Parent <> nil then
+ begin
+ if I <> tvFields.Items.Count - 1 then
+ LastRootNode := tvFields.Items[I + 1];
+ break;
+ end;
+ end;}
+
+ {if LastRootNode = nil then
+ GroupNode := tvFields.Items.AddObject(nil, G.GroupName, G)
+ else
+ GroupNode := tvFields.Items.InsertObject(LastRootNode, G.GroupName, G);}
+
+// ShowField(tvFields);
+
+ aStructure.DatabaseInfo.GetFieldNamesByTable(aTable.TableName, TblFields);
+
+ for I := 0 to TblFields.Count - 1 do
+ begin
+ Idx := aStructure.AddField(kfkData, TblFields[I], aTable.TableName+'.'+TblFields[I], ATable);
+ aStructure.Fields[Idx].AddAppliedOperators;
+ aStructure.Fields[Idx].Group := G;
+ //AddFieldNodeTo(GroupNode, aStructure.Fields[Idx]);
+ end;
+
+ finally
+ TblFields.Free;
+ end;
+end;
+
+procedure TDAKDBConnectionInfo.FillStructure(aStructure: TKDBStructure);
+var
+ lLink: TDSLink;
+ lFKs: TDADriverForeignKeyCollection;
+ i: Integer;
+ sl: TStringList;
+ lTable: integer;
+begin
+ sl := TStringList.Create();
+ try
+
+ aStructure.ClearStructure();
+ aStructure.AddDefOperators(true);
+
+ GetTableNames(sl);
+ sl.Sort;
+ for i := 0 to (sl.Count-1) do begin
+ lTable := aStructure.AddTable(sl[i],sl[i]);
+ AddGroupWithFields(aStructure, aStructure.Tables[lTable]);
+ end;
+
+ Connection.GetForeignKeys(lFKs);
+ try
+ for i := 0 to lFKs.Count-1 do begin
+ lLink := TDSLink.Create();
+ lLink.Table1 := aStructure.TableByName(0, lFKs[i].FKTable);
+ lLink.Table2 := aStructure.TableByName(0, lFKs[i].PKTable);
+ lLink.Fields1.Text := lFKs[i].FKField;
+ lLink.Fields2.Text := lFKs[i].PKField;
+ aStructure.AddLinkByRef(lLink)
+ end;
+
+ finally
+ FreeAndNil(lFKs);
+ end;
+
+
+ finally
+ sl.Free();
+ end;
+
+end;
+
+{ TDAKDBSchemaInfo }
+
+procedure TDAKDBSchemaInfo.AddGroupWithFields(aStructure: TKDBStructure; aTable: TDSTable);
+begin
+
+end;
+
+procedure TDAKDBSchemaInfo.FieldsByTable(const TableName: string; FieldsList: TDBFieldList);
+var
+ lDataSet: TDADataSet;
+ lNewField: TDBFieldInfo;
+ i: Integer;
+begin
+ inherited;
+
+ lDataSet := Schema.Datasets.FindItem(TableName) as TDADataSet;
+ if not Assigned(lDataSet) then
+ RaiseError('DataSet %s not found in Schema',[TableName]);
+
+ FieldsList.Clear();
+ for i := 0 to lDataSet.Fields.Count-1 do begin
+ lNewField := TDBFieldInfo.Create();
+ lNewField.FieldName := lDataSet.Fields[i].Name;
+ lNewField.FieldSize := lDataSet.Fields[i].Size;
+ lNewField.FieldType := DATypeToVCLType(lDataSet.Fields[i].DataType);
+ FieldsList.Add(lNewField);
+ end; { for }
+end;
+
+procedure TDAKDBSchemaInfo.FillStructure(aStructure: TKDBStructure);
+var
+ lLink: TDSLink;
+ lFK: TDADatasetRelationship;
+ i: Integer;
+ sl: TStringList;
+ lTable: integer;
+begin
+
+ aStructure.ClearStructure();
+ aStructure.AddDefOperators(true);
+
+ sl := TStringList.Create();
+ try
+ GetTableNames(sl);
+ sl.Sort;
+ for i := 0 to (sl.Count-1) do begin
+ lTable := aStructure.AddTable(sl[i],sl[i]);
+ AddGroupWithFields(aStructure, aStructure.Tables[lTable]);
+ end;
+ finally
+ sl.Free();
+ end;
+
+ for i := 0 to Schema.Relationships.Count-1 do begin
+ lLink := TDSLink.Create();
+ lFK := Schema.Relationships[i];
+ lLink.Table1 := aStructure.TableByName(0, lFK.DetailDatasetName);
+ lLink.Table2 := aStructure.TableByName(0, lFK.MasterDatasetName);
+
+ //ToDo: add list
+ //lLink.Fields1.Text := lFK.DetailFields;
+ //lLink.Fields2.Text := lFK.MasterFields;
+ aStructure.AddLinkByRef(lLink)
+ end;
+
+end;
+
+procedure TDAKDBSchemaInfo.AvailableDatabases(DBList : TStrings);
+ //NEW: previously realization of GetDatabaseNames, name Alist replaced with DBList
+begin
+ inherited;
+ DBList.Clear();
+ DBList.Add(DatabaseName);
+end;
+
+procedure TDAKDBSchemaInfo.TablesByDatabase(TablesList: TStrings);
+var
+ i: Integer;
+begin
+ inherited;
+ TablesList.BeginUpdate();
+ try
+ TablesList.Clear();
+ for i := 0 to Schema.Datasets.Count-1 do begin
+ TablesList.Add(Schema.Datasets[i].Name);
+ end; { for }
+ finally
+ TablesList.EndUpdate();
+ end;
+end;
+
+procedure TDAKDBSchemaInfo.GetSQLValues(SQL: String; AValues,
+ AItems: TStrings);
+begin
+ inherited;
+
+end;
+
+procedure TDAKDBSchemaInfo.Notification(AComponent: TComponent;
+ Operation: TOperation);
+begin
+ inherited;
+ if Operation <> opRemove then exit;
+ if AComponent = Schema then Schema := nil;
+end;
+
+procedure TDAKDBSchemaInfo.SetSchema(const Value: TDASchema);
+begin
+ if (fSchema <> Value) then begin
+ fSchema := Value;
+ if Assigned(fSchema) then fSchema.FreeNotification(self);
+ end;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDAMacroProcessors.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAMacroProcessors.pas
new file mode 100644
index 0000000..c83e81b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAMacroProcessors.pas
@@ -0,0 +1,509 @@
+unit uDAMacroProcessors;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses uDAEngine;
+
+(*
+ Macros:
+
+ -------------------- Date --------------------
+
+ Returns the current date from the server
+
+ Syntax: {Date()}
+ Example: SELECT * FROM Table WHERE OrderDate>{Date()}
+
+ Parameters: this macro has no parameters
+
+ -------------------- Time --------------------
+
+ Returns the current time from the server
+
+ Syntax: {Time()}
+ Example: SELECT * FROM Table WHERE OrderDate>{Time()}
+
+ Parameters: this macro has no parameters
+
+ -------------------- DateTime --------------------
+
+ Returns the current datetime from the server
+
+ Syntax: {DateTime()}
+ Example: SELECT * FROM Table WHERE OrderDate>{DateTime()}
+
+ Parameters: this macro has no parameters
+
+ -------------------- AddTime --------------------
+
+ Returns a new datetime value based on adding an interval to the specified date.
+ Not all databases support this macro.
+
+ Syntax: {AddTime(, , )}
+ Example: SELECT * FROM Table WHERE OrderDate>{AddTime(Date(), 2, day)}
+
+ Parameters: : a valid date
+ : number of days, weeks, etc as per next parameter
+ : day, week, year, hour, min, sec
+
+ -------------------- FormatDateTime --------------------
+
+ Formats the specified datetime to the datetime format used by the database
+
+ Syntax: {FormatDateTime()}
+ Example: SELECT * FROM Table WHERE OrderDate>{FormatDateTime('12/22/2003 15:22:34.123')}
+
+ Parameters: : a string expression representing a data in format MM/DD/YYYY HH24:MM:SS.MS
+
+ -------------------- FormatDate --------------------
+
+ Formats the specified date to the date format used by the database
+
+ Syntax: {FormatDateTime()}
+ Example: SELECT * FROM Table WHERE OrderDate>{FormatDate('12/22/2003')}
+
+ Parameters: : a string expression representing a data in format MM/DD/YYYY
+
+ -------------------- Length --------------------
+
+ Returns the length of the given string
+
+ Syntax: {Length()}
+ Example: SELECT * FROM Table WHERE {Length(CustomerID)}>3
+
+ Parameters: : a text string
+
+ -------------------- LowerCase --------------------
+
+ Converts the given string to lower case
+
+ Syntax: {LowerCase()}
+ Example: SELECT * FROM Table WHERE {LowerCase(CustomerID)}='alfki'
+
+ Parameters: : a text string
+
+ -------------------- UpperCase --------------------
+
+ Converts the given string to upper case
+
+ Syntax: {UpperCase()}
+ Example: SELECT * FROM Table WHERE {UpperCase(CustomerID)}='ALFKI'
+
+ Parameters: : a text string
+
+ -------------------- TrimLeft --------------------
+
+ Removes the leading spaces from a string
+
+ Syntax: {TrimLeft()}
+ Example: SELECT * FROM Table WHERE {TrimLeft(CustomerID)}='ALFKI'
+
+ Parameters: : a text string
+
+ -------------------- TrimRight --------------------
+
+ Removes the trailing spaces from a string
+
+ Syntax: {TrimRight()}
+ Example: SELECT * FROM Table WHERE {TrimRight(CustomerID)}='ALFKI'
+
+ Parameters: : a text string
+
+ -------------------- Copy --------------------
+
+ Returns characters starting from from
+
+ Syntax: {Copy(, , )}
+ Example: SELECT * FROM Table WHERE OrderDate>{Date()}
+
+ Parameters:
+ : a field name or a string
+ : the position from where to start copying
+ : the number of characters to copy
+
+ -------------------- NoLockHint --------------------
+
+ Returns (NOLOCK) for MSSQL server and empty string for other databases
+
+ Syntax: {NoLockHint}
+ Example: SELECT * FROM Table {NoLockHint}
+
+*)
+
+type { TDAMSSQLMacroProcessor }
+ TDAMSSQLMacroProcessor = class(TDASQLMacroProcessor)
+ protected
+ function DateTime(Sender: TObject; const Parameters: array of string): string; override;
+
+ function AddTime(Sender: TObject; const Parameters: array of string): string; override;
+
+ function Length(Sender: TObject; const Parameters: array of string): string; override;
+ function LowerCase(Sender: TObject; const Parameters: array of string): string; override;
+ function UpperCase(Sender: TObject; const Parameters: array of string): string; override;
+ function TrimLeft(Sender: TObject; const Parameters: array of string): string; override;
+ function TrimRight(Sender: TObject; const Parameters: array of string): string; override;
+ function Copy(Sender: TObject; const Parameters: array of string): string; override;
+ function Nolock(Sender: TObject; const Parameters: array of string): string; override;
+
+ public
+ constructor Create;
+ end;
+ TMSSQLMacroProcessor = TDAMSSQLMacroProcessor;
+
+ { TDAIBMacroProcessor }
+ TDAIBMacroProcessor = class(TDASQLMacroProcessor)
+ protected
+ function DateTime(Sender: TObject; const Parameters: array of string): string; override;
+
+ function AddTime(Sender: TObject; const Parameters: array of string): string; override;
+
+ function Length(Sender: TObject; const Parameters: array of string): string; override;
+ function LowerCase(Sender: TObject; const Parameters: array of string): string; override;
+ function UpperCase(Sender: TObject; const Parameters: array of string): string; override;
+ function TrimLeft(Sender: TObject; const Parameters: array of string): string; override;
+ function TrimRight(Sender: TObject; const Parameters: array of string): string; override;
+ function Copy(Sender: TObject; const Parameters: array of string): string; override;
+ function Nolock(Sender: TObject; const Parameters: array of string): string; override;
+
+ public
+ constructor Create;
+ end;
+ TIBMacroProcessor = TDAIBMacroProcessor;
+
+ { TDAOracleMacroProcessor }
+ TDAOracleMacroProcessor = class(TDASQLMacroProcessor)
+ function DateTime(Sender: TObject; const Parameters: array of string): string; override;
+
+ function AddTime(Sender: TObject; const Parameters: array of string): string; override;
+
+ function Length(Sender: TObject; const Parameters: array of string): string; override;
+ function LowerCase(Sender: TObject; const Parameters: array of string): string; override;
+ function UpperCase(Sender: TObject; const Parameters: array of string): string; override;
+ function TrimLeft(Sender: TObject; const Parameters: array of string): string; override;
+ function TrimRight(Sender: TObject; const Parameters: array of string): string; override;
+ function Copy(Sender: TObject; const Parameters: array of string): string; override;
+ function FormatDate(Sender: TObject; const Parameters: array of string): string; override;
+ function FormatDateTime(Sender: TObject; const Parameters: array of string): string; override;
+ function Nolock(Sender: TObject; const Parameters: array of string): string; override;
+
+ public
+ constructor Create;
+ end;
+ TOracleMacroProcessor = TDAOracleMacroProcessor;
+
+ { TDADBISAMMacroProcessor }
+ TDADBISAMMacroProcessor = class(TDASQLMacroProcessor)
+ function DateTime(Sender: TObject; const Parameters: array of string): string; override;
+
+ function AddTime(Sender: TObject; const Parameters: array of string): string; override;
+
+ function Length(Sender: TObject; const Parameters: array of string): string; override;
+ function LowerCase(Sender: TObject; const Parameters: array of string): string; override;
+ function UpperCase(Sender: TObject; const Parameters: array of string): string; override;
+ function TrimLeft(Sender: TObject; const Parameters: array of string): string; override;
+ function TrimRight(Sender: TObject; const Parameters: array of string): string; override;
+ function Copy(Sender: TObject; const Parameters: array of string): string; override;
+ function Nolock(Sender: TObject; const Parameters: array of string): string; override;
+
+ public
+ constructor Create;
+ end;
+ TDBISAMMacroProcessor = TDADBISAMMacroProcessor;
+
+implementation
+
+uses SysUtils;
+
+{ TDAMSSQLMacroProcessor }
+
+constructor TDAMSSQLMacroProcessor.Create;
+begin
+ inherited Create('yyyy-mm-dd', 'yyyy-mm-dd hh:nn:ss.zzz', FALSE, '@');
+end;
+
+function TDAMSSQLMacroProcessor.AddTime(Sender: TObject;
+ const Parameters: array of string): string;
+begin
+ result := Format('dateadd(%s, %s, %s)', [Parameters[2], Parameters[1], Parameters[0]]);
+end;
+
+function TDAMSSQLMacroProcessor.Copy(Sender: TObject;
+ const Parameters: array of string): string;
+begin
+ result := Format('substring(%s, %s, %s)', [Parameters[0], Parameters[1], Parameters[2]]);
+end;
+
+function TDAMSSQLMacroProcessor.DateTime(Sender: TObject;
+ const Parameters: array of string): string;
+begin
+ result := 'GetDate()';
+end;
+
+function TDAMSSQLMacroProcessor.Length(Sender: TObject;
+ const Parameters: array of string): string;
+begin
+ result := 'len(' + Parameters[0] + ')'
+end;
+
+function TDAMSSQLMacroProcessor.LowerCase(Sender: TObject;
+ const Parameters: array of string): string;
+begin
+ result := 'lower(' + Parameters[0] + ')'
+end;
+
+function TDAMSSQLMacroProcessor.TrimLeft(Sender: TObject;
+ const Parameters: array of string): string;
+begin
+ result := 'ltrim(' + Parameters[0] + ')'
+end;
+
+function TDAMSSQLMacroProcessor.TrimRight(Sender: TObject;
+ const Parameters: array of string): string;
+begin
+ result := 'rtrim(' + Parameters[0] + ')'
+end;
+
+function TDAMSSQLMacroProcessor.UpperCase(Sender: TObject;
+ const Parameters: array of string): string;
+begin
+ result := 'upper(' + Parameters[0] + ')'
+end;
+
+function TDAMSSQLMacroProcessor.Nolock(Sender: TObject; const Parameters: array of string): string;
+begin
+ result := ' (NOLOCK) ';
+end;
+
+{ TDAIBMacroProcessor }
+
+constructor TDAIBMacroProcessor.Create;
+begin
+ inherited Create('yyyy-mm-dd', 'yyyy-mm-dd hh:mm:ss.zzz', FALSE);
+end;
+
+function TDAIBMacroProcessor.AddTime(Sender: TObject;
+ const Parameters: array of string): string;
+begin
+ result := '???'
+end;
+
+function TDAIBMacroProcessor.Copy(Sender: TObject;
+ const Parameters: array of string): string;
+begin
+ result := Format('substring(%s from %s for %s)', [Parameters[0], Parameters[1], Parameters[2]]);
+end;
+
+function TDAIBMacroProcessor.DateTime(Sender: TObject;
+ const Parameters: array of string): string;
+begin
+ result := '(select current_timestamp from rdb$database)';
+end;
+
+function TDAIBMacroProcessor.Length(Sender: TObject;
+ const Parameters: array of string): string;
+begin
+ result := Format('char_length(%s)', [Parameters[0]]);
+end;
+
+function TDAIBMacroProcessor.LowerCase(Sender: TObject;
+ const Parameters: array of string): string;
+begin
+ result := 'lower(' + Parameters[0] + ')'
+end;
+
+function TDAIBMacroProcessor.TrimLeft(Sender: TObject;
+ const Parameters: array of string): string;
+begin
+ result := 'trim ( leading from ' + Parameters[0] + ')'
+end;
+
+function TDAIBMacroProcessor.TrimRight(Sender: TObject;
+ const Parameters: array of string): string;
+begin
+ result := 'trim ( trailing from ' + Parameters[0] + ')'
+end;
+
+function TDAIBMacroProcessor.UpperCase(Sender: TObject;
+ const Parameters: array of string): string;
+begin
+ result := 'upper(' + Parameters[0] + ')'
+end;
+
+function TDAIBMacroProcessor.Nolock(Sender: TObject; const Parameters: array of string): string;
+begin
+ result := '';
+end;
+
+{ TDAOracleMacroProcessor }
+
+constructor TDAOracleMacroProcessor.Create;
+begin
+ inherited Create('MM/DD/YYYY', 'MM/DD/YYYY HH:MM:SS.ZZZ', FALSE);
+end;
+
+function TDAOracleMacroProcessor.FormatDate(Sender: TObject;
+ const Parameters: array of string): string;
+begin
+ result := StringReplace('TO_DATE(''' + Parameters[0] + ''', ''MM/DD/YYYY'')', '''''', '''', [rfReplaceAll]);
+end;
+
+function TDAOracleMacroProcessor.FormatDateTime(Sender: TObject;
+ const Parameters: array of string): string;
+begin
+ result := StringReplace('TO_DATE(''' + Parameters[0] + ''', ''MM/DD/YYYY HH24:MI:SS.FF3'')', '''''', '''', [rfReplaceAll]);
+end;
+
+function TDAOracleMacroProcessor.AddTime(Sender: TObject;
+ const Parameters: array of string): string;
+begin
+ result := Parameters[0] + '+';
+
+ if SameText(Parameters[2], 'DAY') then
+ result := result + Parameters[1]
+ else if SameText(Parameters[2], 'WEEK') then
+ result := result + Parameters[1] + '*7'
+ else if SameText(Parameters[2], 'YEAR') then
+ result := result + Parameters[1] + '*365'
+ else if SameText(Parameters[2], 'HOUR') then
+ result := result + Parameters[1] + '/24'
+ else if SameText(Parameters[2], 'MIN') then
+ result := result + Parameters[1] + '/1440'
+ else if SameText(Parameters[2], 'SEC') then
+ result := result + Parameters[1] + '/86400';
+end;
+
+function TDAOracleMacroProcessor.Copy(Sender: TObject;
+ const Parameters: array of string): string;
+begin
+ result := Format('SUBSTR(%s, %s, %s)', [Parameters[0], Parameters[1], Parameters[2]]);
+end;
+
+function TDAOracleMacroProcessor.DateTime(Sender: TObject;
+ const Parameters: array of string): string;
+begin
+ result := 'SYSDATE'
+end;
+
+function TDAOracleMacroProcessor.Length(Sender: TObject;
+ const Parameters: array of string): string;
+begin
+ result := Format('LENGTH(%s)', [Parameters[0]]);
+end;
+
+function TDAOracleMacroProcessor.LowerCase(Sender: TObject;
+ const Parameters: array of string): string;
+begin
+ result := Format('LOWER(%s)', [Parameters[0]]);
+end;
+
+function TDAOracleMacroProcessor.TrimLeft(Sender: TObject;
+ const Parameters: array of string): string;
+begin
+ result := Format('TRIM(%s)', [Parameters[0]]);
+end;
+
+function TDAOracleMacroProcessor.TrimRight(Sender: TObject;
+ const Parameters: array of string): string;
+begin
+ result := Format('TRIM(%s)', [Parameters[0]]);
+end;
+
+function TDAOracleMacroProcessor.UpperCase(Sender: TObject;
+ const Parameters: array of string): string;
+begin
+ result := Format('UPPER(%s)', [Parameters[0]]);
+end;
+
+function TDAOracleMacroProcessor.Nolock(Sender: TObject; const Parameters: array of string): string;
+begin
+ result := '';
+end;
+{ TDADBISAMMacroProcessor }
+
+constructor TDADBISAMMacroProcessor.Create;
+begin
+ inherited Create('MM/DD/YYYY', 'MM/DD/YYYY HH:MM:SS.ZZZ', FALSE);
+end;
+
+function TDADBISAMMacroProcessor.AddTime(Sender: TObject;
+ const Parameters: array of string): string;
+begin
+ result := Parameters[0] + '+';
+
+ if SameText(Parameters[2], 'DAY') then
+ result := result + Parameters[1]
+ else if SameText(Parameters[2], 'WEEK') then
+ result := result + Parameters[1] + '*7'
+ else if SameText(Parameters[2], 'YEAR') then
+ result := result + Parameters[1] + '*365'
+ else if SameText(Parameters[2], 'HOUR') then
+ result := result + Parameters[1] + '/24'
+ else if SameText(Parameters[2], 'MIN') then
+ result := result + Parameters[1] + '/1440'
+ else if SameText(Parameters[2], 'SEC') then
+ result := result + Parameters[1] + '/86400';
+end;
+
+function TDADBISAMMacroProcessor.Copy(Sender: TObject;
+ const Parameters: array of string): string;
+begin
+ result := Format('SUBSTRING(%s FROM %s FOR %s)', [Parameters[0], Parameters[1], Parameters[2]]);
+end;
+
+function TDADBISAMMacroProcessor.DateTime(Sender: TObject;
+ const Parameters: array of string): string;
+begin
+ result := 'CURRENT_TIMESTAMP'
+end;
+
+function TDADBISAMMacroProcessor.Length(Sender: TObject;
+ const Parameters: array of string): string;
+begin
+ result := Format('LENGTH(%s)', [Parameters[0]]);
+end;
+
+function TDADBISAMMacroProcessor.LowerCase(Sender: TObject;
+ const Parameters: array of string): string;
+begin
+ result := Format('LOWER(%s)', [Parameters[0]]);
+end;
+
+function TDADBISAMMacroProcessor.TrimLeft(Sender: TObject;
+ const Parameters: array of string): string;
+begin
+ result := Format('TRIM(LEADING '' '' FROM %s)', [Parameters[0]]);
+end;
+
+function TDADBISAMMacroProcessor.TrimRight(Sender: TObject;
+ const Parameters: array of string): string;
+begin
+ result := Format('TRIM(TRAILING '' '' FROM %s)', [Parameters[0]]);
+end;
+
+function TDADBISAMMacroProcessor.UpperCase(Sender: TObject;
+ const Parameters: array of string): string;
+begin
+ result := Format('UPPER(%s)', [Parameters[0]]);
+end;
+
+function TDADBISAMMacroProcessor.Nolock(Sender: TObject; const Parameters: array of string): string;
+begin
+ result := '';
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDAMacros.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAMacros.pas
new file mode 100644
index 0000000..4693bd6
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAMacros.pas
@@ -0,0 +1,894 @@
+unit uDAMacros;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ SysUtils, Classes;
+
+type
+ TROPasToken = (
+ CSTI_EOF,
+ {Items that are used internally}
+ CSTIINT_Comment,
+ CSTIINT_WhiteSpace,
+ {Tokens}
+ CSTI_Identifier,
+ CSTI_SemiColon,
+ CSTI_Comma,
+ CSTI_Period,
+ CSTI_Colon,
+ CSTI_OpenRound,
+ CSTI_CloseRound,
+ CSTI_OpenBlock,
+ CSTI_CloseBlock,
+ CSTI_Assignment,
+ CSTI_Equal,
+ CSTI_NotEqual,
+ CSTI_Smaller,
+ CSTI_SmallerEqual,
+ CSTI_Greater,
+ CSTI_GreaterEqual,
+ CSTI_Plus,
+ CSTI_Minus,
+ CSTI_Divide,
+ CSTI_Multiply,
+ CSTI_Integer,
+ CSTI_Real,
+ CSTI_String,
+ CSTI_Date,
+ CSTI_HexInt,
+ CSTI_Modulus,
+ CSTII_In,
+ CSTII_like,
+ CSTII_And,
+ CSTII_Or,
+ CSTII_Xor,
+ CSTII_Not,
+ CSTII_IsNull,
+ CSTII_IsNotNull
+ );
+ {TROParserErrorKind is used to store the parser error}
+ TROParserErrorKind = (iNoError, iCommentError, iStringError, iCharError, iSyntaxError);
+ TROParserErrorEvent = procedure(Parser: TObject; Kind: TROParserErrorKind) of object;
+
+ {TROPacalParser is the parser used to parse the current script}
+ TROPascalParser = class(TObject)
+ private
+ FData: string;
+ FRow,
+ FCol: Cardinal;
+ FLastEnterPos: Longint;
+ FText: PChar;
+ FRealPosition, FTokenLength: Cardinal;
+ FTokenId: TROPasToken;
+ FToken: string;
+ FOriginalToken: string;
+ FParserError: TROParserErrorEvent;
+ fOpenBlockEscape: Boolean;
+ // only applicable when Token in [CSTI_Identifier, CSTI_Integer, CSTI_Real, CSTI_String, CSTI_Char, CSTI_HexInt]
+ procedure SkipWhiteSpaces(var ci: cardinal);
+ public
+ { means you can use [something] to escape identifiers}
+ property OpenBlockEscape: Boolean read fOpenBlockEscape write fOpenBlockEscape;
+ {Go to the next token}
+ procedure Next;
+ {Return the token in case it is a string, char, integer, number or idenTROier}
+ property GetToken: string read FToken;
+ {Return the token but do not uppercase it}
+ property OriginalToken: string read FOriginalToken;
+ {The current token position}
+ property CurrTokenPos: Cardinal read FRealPosition;
+ {The current token ID}
+ property CurrTokenID: TROPasToken read FTokenId;
+ {Row}
+ property Row: Cardinal read FRow;
+ {Column}
+ property Col: Cardinal read FCol;
+ {Load a script}
+ procedure SetText(const Data: string);
+ {Parser error event will be called on (syntax) errors in the script}
+ property OnParserError: TROParserErrorEvent read FParserError write FParserError;
+ end;
+
+ TExternalProc = function(Sender: TObject; const Parameters: array of string): string of object;
+
+ TROMacroProc = class
+ private
+ FExternalProc: TExternalProc;
+ FExternalName: string;
+ FExternalNameHash: Longint;
+ fParamCount: integer;
+ public
+ property ExternalName: string read FExternalName write FExternalName;
+ property ExternalNameHash: Integer read FExternalNameHash write FExternalNameHash;
+ property ExternalProc: TExternalProc read FExternalProc write FExternalProc;
+ property ParamCount: integer read fParamCount write fParamCount;
+ end;
+
+ TROMacroVar = class
+ private
+ FName: string;
+ FNameHash: Longint;
+ FValue: string;
+ public
+ constructor Create(const aName: string);
+ property Name: string read FName;
+ property NameHash: Longint read FNameHash;
+ property Value: string read FValue write FValue;
+ end;
+
+ TOnUnknownIdentifier = function(Sender: TObject; const Name, OrgName: string; var Value: string): Boolean of object;
+ TROMacroParser = class(TInterfacedObject)
+ private
+ FProcs: TList;
+ FVars: TList;
+ FOnUnknownIdentifier: TOnUnknownIdentifier;
+ FParser: TROPascalParser;
+ procedure ParserError(Parser: TObject; Kind: TROParserErrorKind);
+ function GetVarCount: Longint;
+ function GetVarNo(I: Integer): TROMacroVar;
+ public
+ property OnUnknownIdentifier: TOnUnknownIdentifier read FOnUnknownIdentifier write FOnUnknownIdentifier;
+
+ procedure ClearProcs;
+ procedure RegisterProc(const Name: string; ExProc: TExternalProc; aParamCount: integer);
+
+ property VariableCount: Longint read GetVarCount;
+ property Variable[I: Longint]: TROMacroVar read GetVarNo;
+
+ procedure DeleteVariable(I: Longint);
+ procedure ClearVariables;
+ function AddVariable(const Name: string): TROMacroVar;
+ function IndexOfName(const aName: string): integer;
+ constructor Create;
+
+ function EvalToken(const Text: string): string;
+ function Eval(const Text: string; TextDelimiter: char = ''''): string;
+
+ destructor Destroy; override;
+ end;
+
+function MakeHash(const s: string): Longint;
+function FastUppercase(const s: string): string;
+
+implementation
+uses
+ uROClasses;
+
+function MakeHash(const s: string): Longint;
+{small hash maker}
+var
+ I: Integer;
+begin
+ Result := 0;
+ for I := 1 to Length(s) do
+ Result := ((Result shl 7) or (Result shr 25)) + Ord(s[I]);
+end;
+
+function FastUppercase(const s: string): string;
+begin
+ Result := Uppercase(s);
+end;
+
+procedure TROPascalParser.Next;
+var
+ Err: TROParserErrorKind;
+
+ function _GetToken(CurrTokenPos, CurrTokenLen: Cardinal): string;
+ var
+ s: string;
+ begin
+ SetLength(s, CurrTokenLen);
+ Move(FText[CurrTokenPos], S[1], CurrtokenLen);
+ Result := s;
+ end;
+
+ function ParseToken(var CurrTokenPos, CurrTokenLen: Cardinal; var CurrTokenId: TROPasToken): TROParserErrorKind;
+ {Parse the token}
+ var
+ ct, ci, cx: Cardinal;
+ s: string;
+ hs: Boolean;
+ begin
+ ParseToken := iNoError;
+ ct := CurrTokenPos;
+ case FText[ct] of
+ #0: begin
+ CurrTokenId := CSTI_EOF;
+ CurrTokenLen := 0;
+ end;
+ 'A'..'Z', 'a'..'z', '_': begin
+ ci := ct + 1;
+ while CharInSet(FText[ci], ['_', '0'..'9', 'a'..'z', 'A'..'Z']) do begin
+ Inc(ci);
+ end;
+ CurrTokenLen := ci - ct;
+ CurrTokenId := CSTI_Identifier;
+ s := FastUppercase(_GetToken(CurrTokenPos, CurrTokenLen));
+ case s[1] of
+ 'I': if s = 'IN' then begin
+ CurrTokenId := CSTII_In;
+ end
+ else if s = 'IS' then begin
+ SkipWhiteSpaces(ci);
+ cx:=ci;
+ while CharInSet(FText[ci], ['a'..'z', 'A'..'Z']) do Inc(ci);
+ s := FastUppercase(_GetToken(cx, ci-cx));
+ if s = 'NULL' then begin //is null
+ CurrTokenLen := ci - ct;
+ CurrTokenId := CSTII_IsNull;
+ end
+ else if s = 'NOT' then begin
+ SkipWhiteSpaces(ci);
+ cx:=ci;
+ while CharInSet(FText[ci], ['a'..'z', 'A'..'Z']) do Inc(ci);
+ s := FastUppercase(_GetToken(cx, ci-cx));
+ if s = 'NULL' then begin //is not null
+ CurrTokenLen := ci - ct;
+ CurrTokenId := CSTII_IsNotNull;
+ end
+ end;
+ end;
+ 'L': if s = 'LIKE' then CurrTokenId := CSTII_like;
+ 'A': if s = 'AND' then CurrTokenId := CSTII_And;
+ 'O': if s = 'OR' then CurrTokenId := CSTII_Or;
+ 'X': if s = 'XOR' then CurrTokenId := CSTII_Xor;
+ 'N': if s = 'NOT' then CurrTokenId := CSTII_Not;
+ end;
+
+ end;
+ '$': begin
+ ci := ct + 1;
+
+ while CharInSet(FText[ci], ['0'..'9', 'a'..'f', 'A'..'F']) do
+ Inc(ci);
+
+ CurrTokenId := CSTI_HexInt;
+ CurrTokenLen := ci - ct;
+ end;
+
+ '0'..'9': begin
+ hs := False;
+ ci := ct;
+ while CharInSet(FText[ci], ['0'..'9']) do begin
+ Inc(ci);
+ if (FText[ci] = '.') and (not hs) then begin
+ if FText[ci + 1] = '.' then break;
+ hs := True;
+ Inc(ci);
+ end;
+ end;
+
+ if hs then
+ CurrTokenId := CSTI_Real
+ else
+ CurrTokenId := CSTI_Integer;
+
+ CurrTokenLen := ci - ct;
+ end;
+
+ #39: begin
+ ci := ct + 1;
+ while (FText[ci] <> #0) and (FText[ci] <> #13) and
+ (FText[ci] <> #10) and (FText[ci] <> #39) do begin
+ Inc(ci);
+ while (FText[ci] = #39) and (FText[ci + 1] = #39) do
+ Inc(ci, 2);
+ end;
+ if FText[ci] = #39 then
+ CurrTokenId := CSTI_String
+ else begin
+ CurrTokenId := CSTI_String;
+ ParseToken := iStringError;
+ end;
+ CurrTokenLen := ci - ct + 1;
+ end;
+ '#': begin
+ ci := ct + 1;
+ while CharInSet(FText[ci], ['0'..'9', '/']) do begin
+ Inc(ci);
+ end;
+ if FText[ci] <> '#' then begin
+ ParseToken := iCharError;
+ CurrTokenId := CSTI_Date;
+ end
+ else begin
+ inc(ci);
+ CurrTokenId := CSTI_Date;
+ end;
+ CurrTokenLen := ci - ct;
+ end;
+ '=': begin
+ CurrTokenId := CSTI_Equal;
+ CurrTokenLen := 1;
+ end;
+ '>': begin
+ if FText[ct + 1] = '=' then begin
+ CurrTokenid := CSTI_GreaterEqual;
+ CurrTokenLen := 2;
+ end
+ else begin
+ CurrTokenid := CSTI_Greater;
+ CurrTokenLen := 1;
+ end;
+ end;
+ '<': begin
+ if FText[ct + 1] = '=' then begin
+ CurrTokenId := CSTI_SmallerEqual;
+ CurrTokenLen := 2;
+ end
+ else if FText[ct + 1] = '>' then begin
+ CurrTokenId := CSTI_NotEqual;
+ CurrTokenLen := 2;
+ end
+ else begin
+ CurrTokenId := CSTI_Smaller;
+ CurrTokenLen := 1;
+ end;
+ end;
+ ')': begin
+ CurrTokenId := CSTI_CloseRound;
+ CurrTokenLen := 1;
+ end;
+ '(': begin
+ if FText[ct + 1] = '*' then begin
+ ci := ct + 1;
+ while (FText[ci] <> #0) do begin
+ if (FText[ci] = #13) then begin
+ if FText[ci + 1] = #10 then
+ Inc(ci);
+ FLastEnterPos := ci;
+ Inc(FRow);
+ end
+ else if FText[ci] = #10 then begin
+ FLastEnterPos := ci;
+ Inc(FRow);
+ end;
+ if (FText[ci] = '*') and (FText[ci + 1] = ')') then
+ Break;
+ Inc(ci);
+ end;
+ if (FText[ci] = #0) then begin
+ CurrTokenId := CSTIINT_Comment;
+ ParseToken := iCommentError;
+ end
+ else begin
+ CurrTokenId := CSTIINT_Comment;
+ Inc(ci, 2);
+ end;
+ CurrTokenLen := ci - ct;
+ end
+ else begin
+ CurrTokenId := CSTI_OpenRound;
+ CurrTokenLen := 1;
+ end;
+ end;
+ '[': begin
+ if fOpenBlockEscape then begin
+ ci := ct + 1;
+ while not CharInSet(FText[ci], [']', #0]) do begin
+ if FText[ci] = '\' then
+ inc(Ci);
+ Inc(ci);
+ end;
+ if FText[ci] = ']' then Inc(ci);
+ CurrTokenLen := ci - ct;
+ CurrTokenId := CSTI_Identifier;
+ end else begin
+ CurrTokenId := CSTI_OpenBlock;
+ CurrTokenLen := 1;
+ end;
+ end;
+ ']': begin
+ CurrTokenId := CSTI_CloseBlock;
+ CurrTokenLen := 1;
+ end;
+ ',': begin
+ CurrTokenId := CSTI_Comma;
+ CurrTokenLen := 1;
+ end;
+ '.': begin
+ CurrTokenId := CSTI_Period;
+ CurrTokenLen := 1;
+ end;
+ ';': begin
+ CurrTokenId := CSTI_Semicolon;
+ CurrTokenLen := 1;
+ end;
+ ':': begin
+ if FText[ct + 1] = '=' then begin
+ CurrTokenId := CSTI_Assignment;
+ CurrTokenLen := 2;
+ end
+ else begin
+ CurrTokenId := CSTI_Colon;
+ CurrTokenLen := 1;
+ end;
+ end;
+ '+': begin
+ CurrTokenId := CSTI_Plus;
+ CurrTokenLen := 1;
+ end;
+ '-': begin
+ CurrTokenId := CSTI_Minus;
+ CurrTokenLen := 1;
+ end;
+ '%': begin
+ CurrTokenId := CSTI_Modulus;
+ CurrTokenLen := 1;
+ end;
+ '*': begin
+ CurrTokenId := CSTI_Multiply;
+ CurrTokenLen := 1;
+ end;
+ '/': begin
+ if FText[ct + 1] = '/' then begin
+ ci := ct + 1;
+ while (FText[ci] <> #0) and (FText[ci] <> #13) and (FText[ci] <> #10) do begin
+ Inc(ci);
+ end;
+ if (FText[ci] = #0) then begin
+ CurrTokenId := CSTIINT_Comment;
+ ParseToken := iCommentError;
+ end
+ else begin
+ if (FText[ci] = #13) and (FText[ci + 1] = #10) then
+ Inc(ci);
+ Inc(FRow);
+ FLastEnterPos := ci;
+
+ CurrTokenId := CSTIINT_Comment;
+ end;
+ CurrTokenLen := ci - ct + 1;
+ end
+ else begin
+ CurrTokenId := CSTI_Divide;
+ CurrTokenLen := 1;
+ end;
+ end;
+ #32, #9, #13, #10: begin
+ ci := ct + 1;
+ SkipWhiteSpaces(ci);
+ CurrTokenId := CSTIINT_WhiteSpace;
+ CurrTokenLen := ci - ct;
+ end;
+ '{': begin
+ ci := ct + 1;
+ while (FText[ci] <> #0) and (FText[ci] <> '}') do begin
+ if (FText[ci] = #13) then begin
+ if FText[ci + 1] = #10 then
+ Inc(ci);
+ FLastEnterPos := ci;
+ Inc(FRow);
+ end
+ else if FText[ci] = #10 then begin
+ FLastEnterPos := ci;
+ Inc(FRow);
+ end;
+ Inc(ci);
+ end;
+ if (FText[ci] = #0) then begin
+ CurrTokenId := CSTIINT_Comment;
+ ParseToken := iCommentError;
+ end
+ else
+ CurrTokenId := CSTIINT_Comment;
+ CurrTokenLen := ci - ct + 1;
+ end;
+ else begin
+ ParseToken := iSyntaxError;
+ CurrTokenId := CSTIINT_Comment;
+ CurrTokenLen := 1;
+ end;
+ end;
+ end;
+ //-------------------------------------------------------------------
+begin
+ if FText = nil then begin
+ FTokenLength := 0;
+ FRealPosition := 0;
+ FRow := 1;
+ FLastEnterPos := 0;
+ FTokenId := CSTI_EOF;
+ Exit;
+ end;
+ repeat
+ FRealPosition := FRealPosition + FTokenLength;
+ Err := ParseToken(FRealPosition, FTokenLength, FTokenID);
+ if Err <> iNoError then begin
+ FTokenLength := 0;
+ FTokenId := CSTI_EOF;
+ FToken := '';
+ FOriginalToken := '';
+ FCol := Longint(FRealPosition) - FLastEnterPos;
+ if @FParserError <> nil then FParserError(Self, Err);
+ exit;
+ end;
+ case FTokenID of
+ CSTIINT_Comment, CSTIINT_WhiteSpace: Continue;
+ CSTI_Integer, CSTI_Real, CSTI_String, CSTI_Date, CSTI_HexInt: begin
+ FOriginalToken := _GetToken(FRealPosition, FTokenLength);
+ FToken := FOriginalToken;
+ end;
+ CSTI_Identifier: begin
+ FOriginalToken := _GetToken(FRealPosition, FTokenLength);
+ FToken := FastUppercase(FOriginalToken);
+ end;
+ else begin
+ FOriginalToken := '';
+ FToken := '';
+ end;
+ end;
+ Break;
+ until False;
+ FCol := Longint(FRealPosition) - FLastEnterPos;
+end;
+
+procedure TROPascalParser.SetText(const Data: string);
+begin
+ FData := Data;
+ FText := Pointer(FData);
+ FTokenLength := 0;
+ FRealPosition := 0;
+ FRow := 1;
+ FLastEnterPos := -1;
+ FTokenId := CSTI_EOF;
+ Next;
+end;
+
+{ TROMacroParser }
+
+function TROMacroParser.AddVariable(const Name: string): TROMacroVar;
+begin
+ Result := TROMacroVar.Create(Uppercase(Name));
+ FVars.Add(Result);
+end;
+
+procedure TROMacroParser.ClearProcs;
+var
+ i: Longint;
+begin
+ for i := FProcs.Count - 1 downto 0 do begin
+ TROMacroProc(FPRocs[i]).Free;
+ end;
+ FProcs.Clear;
+end;
+
+procedure TROMacroParser.ClearVariables;
+var
+ i: Longint;
+begin
+ for i := FVars.Count - 1 downto 0 do begin
+ TROMacroVar(FVars[i]).Free;
+ end;
+ FVars.Clear;
+end;
+
+constructor TROMacroParser.Create;
+begin
+ inherited Create;
+ FProcs := TList.Create;
+ FVars := TList.Create;
+ FParser := TROPascalParser.Create;
+ FParser.OnParserError := ParserError;
+end;
+
+procedure TROMacroParser.DeleteVariable(I: Integer);
+var
+ f: TROMacroVar;
+begin
+ f := FVars[i];
+ FVars.Delete(i);
+ f.Free;
+end;
+
+destructor TROMacroParser.Destroy;
+begin
+ FParser.Free;
+ ClearProcs;
+ ClearVariables;
+ FProcs.Free;
+ FVars.Free;
+ inherited Destroy;
+end;
+
+function MKString(const s: string): string;
+begin
+ Result := StringReplace(s, #39#39, #39, [rfReplaceAll]);
+ Delete(Result, 1, 1);
+ Delete(Result, Length(Result), 1);
+end;
+
+function SQLEscapeStr(const s: string): string;
+var
+ i, l: Longint;
+ c: char;
+begin
+ SetLength(Result, Length(s) + 10);
+ Result[1] := '''';
+ i := 1;
+ l := 1;
+ while i <= length(s) do begin
+ case s[i] of
+ #13: c := 'r';
+ #10: c := 'n';
+ #9: c := 't';
+ '\': c := '\';
+ #39: c := #39;
+ '"': c := '"';
+ else
+ c := #0;
+ end;
+ if c = #0 then begin
+ inc(l);
+ if L > Length(Result) then
+ SetLength(Result, l + 10);
+ Result[l] := s[i];
+ end
+ else begin
+ inc(l, 2);
+ if L > Length(Result) then
+ SetLength(Result, l + 10);
+ Result[l - 1] := '\';
+ Result[l] := c;
+ end;
+ Inc(i);
+ end;
+ SetLength(Result, l + 1);
+ Result[l + 1] := '''';
+end;
+
+type
+ TOperator = (opFirst, opAdd);
+
+function TROMacroParser.EvalToken(const Text: string): string;
+
+ function Evaluate: string;
+ var
+ h, i: Longint;
+ b: Boolean;
+ resval: string;
+
+ procedure CheckParamCount(P: TROMacroProc; Params: array of string);
+ begin
+ if (Length(Params) < P.ParamCount) then
+ raise Exception.CreateFmt('Invalid number of parameters. %d given, %d expected.',
+ [Length(Params), P.ParamCount])
+ end;
+
+ function CallProc(P: TROMacroProc): string;
+ var
+ Params: array of string;
+ s: string;
+ begin
+ Params:=nil;
+ FParser.Next;
+ if FParser.CurrTokenId <> CSTI_OpenRound then begin
+ CheckParamCount(P, Params);
+ Result := P.ExternalProc(Self, Params);
+ exit;
+ end;
+ FParser.Next;
+ while FParser.CurrTokenID <> CSTI_CloseRound do begin
+ s := Evaluate;
+ SetLength(Params, Length(Params) + 1);
+ Params[Length(Params) - 1] := s;
+ if FParser.CurrTokenId = CSTI_CloseRound then begin
+ Break;
+ end;
+ if FParser.CurrTokenId <> CSTI_Comma then
+ raise Exception.Create('[' + IntToStr(FParser.Row) + ':' + IntToStr(FParser.Col) + ']: Closing parenthesis expected');
+ FParser.Next;
+ end;
+ FParser.Next;
+
+ CheckParamCount(P, Params);
+ Result := P.ExternalProc(Self, Params);
+ end;
+ begin
+ Result := '';
+ while true do begin
+ case FParser.CurrTokenID of
+ CSTI_Identifier: begin
+ h := MakeHash(FParser.GetToken);
+ b := False;
+ for i := 0 to FProcs.Count - 1 do begin
+ with TROMacroProc(FProcs[i]) do begin
+ if (ExternalNameHash = h) and SameText(ExternalName, FParser.GetToken) then begin
+ resval := CallProc(TROMacroProc(FProcs[i]));
+ b := True;
+ end;
+ end;
+ end;
+ if (not b) then begin
+ for i := 0 to FVars.Count - 1 do begin
+ with TROMacroVar(FVars[i]) do begin
+ if (NameHash = h) and (Name = FParser.GetToken) then begin
+ FParser.Next;
+ resval := Value;
+ b := True;
+ break;
+ end;
+ end;
+ end;
+ end;
+ if (not b) and (@FOnUnknownIdentifier <> nil) then begin
+ b := FOnUnknownIdentifier(Self, FParser.GetToken, FParser.OriginalToken, resval);
+ if b then FParser.Next;
+ end;
+ if not b then
+ raise Exception.Create('[' + IntToStr(FParser.Row) + ':' + IntToStr(FParser.Col) + ']: Unknown identifier ' + FParser.GetToken);
+ end;
+ CSTI_Real, CSTI_Integer: begin
+ Resval := FParser.GetToken;
+ FParser.Next;
+ end;
+ CSTI_HexInt: begin
+ Resval := IntToStr(StrToInt(FParser.GetToken));
+ FParser.Next;
+ end;
+ CSTI_String, CSTI_Date: begin
+ Resval := '';
+ while (FParser.CurrTokenId = CSTI_String) or (FParser.CurrTokenId = CSTI_Date) do begin
+ if FParser.CurrTokenId = CSTI_String then
+ Resval := resval + MKString(FParser.GetToken)
+ else
+ Resval := resval + FParser.GetToken;
+ FParser.Next;
+ end;
+ ResVal := SQLEscapeStr(ResVal);
+ end;
+ end;
+ Result := Result + ResVal;
+ case FParser.CurrTokenId of
+ CSTI_Minus: Result := Result + ' - ';
+ CSTI_Plus: Result := Result + ' + ';
+ else
+ Break;
+ end;
+ FParser.Next;
+ end;
+ end;
+begin
+ FParser.SetText(Text);
+ Result := Evaluate();
+ if FParser.CurrTokenID <> CSTI_EOF then
+ // Raise Exception.Create('['+IntToStr(FParser.Row)+':'+IntToStr(FParser.Col)+']: End of expression expected');
+end;
+
+const
+ LenInc = 32;
+
+function TROMacroParser.Eval(const Text: string; TextDelimiter: char = ''''): string;
+var
+ start, i, l: Longint;
+ InStr: Boolean;
+ s: string;
+begin
+ SetLength(Result, Length(Text) + LenInc);
+ i := 1;
+ l := 0;
+ InStr := False;
+ while i <= length(Text) do begin
+ if Text[i] = '''' then
+ InStr := not InStr;
+ if (Text[i] = '{') and not (InStr) then begin
+ start := i;
+ inc(i);
+ InStr := False;
+ while i <= Length(Text) do begin
+ case Text[i] of
+ #39: InStr := not InStr;
+ '}': if not InStr then Break;
+ end;
+ Inc(i);
+ end;
+ s := EvalToken(Copy(Text, Start + 1, I - Start - 1));
+ if L + Length(s) > Length(Result) then
+ SetLength(Result, l + Length(s) + LenInc);
+ Start := 1;
+ while Start <= Length(s) do begin
+ Inc(l);
+ Result[l] := s[Start];
+ Inc(Start);
+ end;
+ Inc(i);
+ end
+ else begin
+ inc(l);
+ if L > Length(Result) then
+ SetLength(Result, l + LenInc);
+ Result[l] := Text[i];
+ Inc(i);
+ end;
+ end;
+ SetLength(Result, l);
+end;
+
+function TROMacroParser.GetVarCount: Longint;
+begin
+ Result := FVars.Count;
+end;
+
+function TROMacroParser.GetVarNo(I: Integer): TROMacroVar;
+begin
+ Result := FVars[i];
+end;
+
+procedure TROMacroParser.ParserError(Parser: TObject;
+ Kind: TROParserErrorKind);
+var
+ err: string;
+begin
+ case Kind of
+ iCommentError: err := 'Comment Error';
+ iCharError, iStringError: err := 'String error';
+ else
+ err := 'Syntax Error';
+ end;
+
+ raise Exception.Create('[' + IntToStr(FParser.Row) + ':' + IntToStr(FParser.Col) + ']: ' + err);
+end;
+
+procedure TROMacroParser.RegisterProc(const Name: string; ExProc: TExternalProc; aParamCount: integer);
+var
+ R: TROMacroProc;
+begin
+ R := TROMacroProc.Create;
+ r.ExternalName := UpperCase(Name);
+ r.ExternalNameHash := MakeHash(r.ExternalName);
+ r.ExternalProc := ExProc;
+ r.ParamCount := aParamCount;
+
+ FProcs.Add(r);
+end;
+
+function TROMacroParser.IndexOfName(const aName: string): integer;
+begin
+ For Result:= 0 to FVars.Count -1 do
+ if SameText(aName, TROMacroVar(FVars[Result]).Name) then Exit;
+ Result:=-1;
+end;
+
+{ TROMacroVar }
+
+constructor TROMacroVar.Create(const aName: string);
+begin
+ inherited Create;
+ FName := aName;
+ FNameHash := MakeHash(aName);
+end;
+
+procedure TROPascalParser.SkipWhiteSpaces(var ci: cardinal);
+begin
+ while CharInSet(FText[ci], [#32, #9, #13, #10]) do begin
+ if (FText[ci] = #13) then begin
+ if FText[ci + 1] = #10 then
+ Inc(ci);
+ FLastEnterPos := ci;
+ Inc(FRow);
+ end
+ else if FText[ci] = #10 then begin
+ FLastEnterPos := ci;
+ Inc(FRow);
+ end;
+ Inc(ci);
+ end;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDAMemDataTable.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAMemDataTable.pas
new file mode 100644
index 0000000..a49570a
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAMemDataTable.pas
@@ -0,0 +1,560 @@
+unit uDAMemDataTable;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ Classes,DB, uDAInterfaces,
+ uDADataTable, uDAMemDataset;
+
+type
+ TDAMemDataset = class(TDAMemoryDataset, IDADataTableDataset)
+ private
+ FDeletedRecordsList: TStringList;
+ FLogDeletedRecords: Boolean;
+ procedure ClearDeletedRecords;
+ protected
+ function GetDataTable: TDADataTable; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure InternalRefresh; override;
+ procedure InternalInitFieldDefs; override;
+ procedure InternalOpen; override;
+ function GetStateFieldValue(State: TDataSetState;Field: TField): Variant; {$IFNDEF FPC}override;{$ENDIF}
+ procedure InternalDelete; override;
+ procedure InternalInsert; override;
+ procedure InternalPost; override;
+ procedure InternalClose; override;
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy;override;
+ end;
+
+ TDAMemDataTable = class(TDADataTable,IDAMemDatasetBatchAdding,IDARangeController)
+ private
+ fMemDataset: TDAMemDataset;
+ fWasReadonly: Boolean;
+ function GetIndexDefs: TIndexDefs;
+ function GetIndexName: string;
+ procedure SetIndexDefs(const Value: TIndexDefs);
+ procedure SetIndexName(const Value: string);
+ function GetIndexFieldNames: string;
+ procedure SetIndexFieldNames(const Value: string);
+ function GetAutoCompactRecords: boolean;
+ procedure SetAutoPackRecords(const Value: boolean);
+ protected
+ // IDAMemDatasetBatchAdding
+ function AllocRecordBuffer: PAnsiChar;
+ procedure FreeRecordBuffer(var Buffer: PAnsiChar);
+ function GetFieldNativeBuffer(Buffer: PAnsiChar; Field: TField): Pointer;
+ function MakeBlobFromString(Blob:AnsiString):pointer;
+ procedure SetNullMask(Buffer: PAnsiChar; Field: TField; const Value: boolean);
+ procedure SetAnsiString(NativeBuf: Pointer; Field: TField; const Value: Ansistring);
+ procedure SetWideString(NativeBuf: Pointer; Field: TField; const Value: Widestring);
+ procedure AddRecordsfromList(AList: TList);
+ protected
+ function GetDatasetClass: TDatasetClass; override;
+ procedure CreateInternalFields(aDataset: TDataset; someFieldDefinitions: TDAFieldCollection); override;
+ // procedure DoAfterCloseDataset; override;
+ procedure DoSort(const FieldNames: array of string; const Directions: array of TDASortDirection); override;
+
+ procedure SetMasterSource(const Value: TDADataSource); override;
+ function GetMasterSource: TDADataSource; override;
+ procedure SetDetailsFields(const Value: string); override;
+ procedure SetMasterFields(const Value: string); override;
+ function GetDetailFields: string; override;
+ function GetMasterFields: string; override;
+
+ function GetFilter: string; override;
+ function GetFiltered: boolean; override;
+ procedure SetFilter(const Value: string); override;
+ procedure SetFiltered(const Value: boolean); override;
+ function GetReadOnly: boolean; override;
+ procedure SetReadOnly(const Value: boolean); override;
+ public
+ constructor Create(aOwner: TComponent); override;
+ procedure EnableConstraints; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure DisableConstraints; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure CloneCursor(Source: TDADataTable); override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ { IDARangeController }
+ procedure ApplyRange; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure CancelRange; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetRange(const StartValues, EndValues: array of const); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure EditRangeEnd; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure EditRangeStart; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetRangeEnd; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure SetRangeStart; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ //
+ procedure SetKey;
+ procedure EditKey;
+ function FindKey(const KeyValues: array of const): Boolean;
+ procedure FindNearest(const KeyValues: array of const);
+ function GotoKey: Boolean;
+ procedure GotoNearest;
+ function LocateByIndex(const aIndexName: string; const KeyValues: Variant): Boolean;
+ function LookupByIndex(const aIndexName: string; const KeyValues: Variant; const ResultFields: string): Variant;
+ procedure PrepareIndexForSorting(const aIndexName: string = '');
+ published
+ property IndexDefs: TIndexDefs read GetIndexDefs write SetIndexDefs;
+ property IndexName: string read GetIndexName write SetIndexName;
+ property IndexFieldNames: string read GetIndexFieldNames write SetIndexFieldNames;
+ property AutoCompactRecords: boolean read GetAutoCompactRecords write SetAutoPackRecords default False;
+ end;
+
+
+implementation
+
+uses SysUtils;
+
+{ TDAMemDataset }
+
+
+procedure TDAMemDataset.ClearDeletedRecords;
+var
+ buf: Dataset_PAnsiChar;
+begin
+ while FDeletedRecordsList.Count <> 0 do begin
+ buf := Pointer(FDeletedRecordsList.Objects[FDeletedRecordsList.Count-1]);
+ FreeRecordBuffer(Buf);
+ FDeletedRecordsList.Delete(FDeletedRecordsList.Count-1);
+ end;
+end;
+
+constructor TDAMemDataset.Create(AOwner: TComponent);
+begin
+ inherited;
+ FDeletedRecordsList := TStringList.Create;
+ FLogDeletedRecords := True;
+end;
+
+destructor TDAMemDataset.Destroy;
+begin
+ inherited;
+ ClearDeletedRecords;
+ FDeletedRecordsList.Free;
+end;
+
+function TDAMemDataset.GetDataTable: TDADataTable;
+begin
+ result := TDADataTable(Owner);
+end;
+
+function TDAMemDataset.GetStateFieldValue(State: TDataSetState;
+ Field: TField): Variant;
+begin
+ if (State = dsOldValue) and (Self.State in [dsEdit, dsInsert]) then
+ Result := TDAMemDataTable(GetDataTable).fOldValues[Field.Index]
+ else
+ {$IFNDEF FPC} result := Inherited GetStateFieldValue(State, Field){$ENDIF};
+end;
+
+procedure TDAMemDataset.InternalClose;
+begin
+ ClearDeletedRecords;
+ inherited;
+end;
+
+procedure TDAMemDataset.InternalDelete;
+var
+ buf: pointer;
+begin
+ if FLogDeletedRecords and (GetDataTable.LogChanges) then begin
+ buf := CreateMemDatasetRecord(mrEmpty,0,True);
+ RecordToBuffer(CurrentRecord, buf);
+ FDeletedRecordsList.AddObject(Self.Fields[0].AsString, buf);
+ end;
+ inherited;
+end;
+
+procedure TDAMemDataset.InternalInitFieldDefs;
+begin
+ inherited;
+end;
+
+procedure TDAMemDataset.InternalInsert;
+var
+ fCurRec: String;
+ i: integer;
+ buf1: Pointer;
+begin
+ if FLogDeletedRecords then begin
+ fCurRec := IntToStr(GetDataTable.CurrRecId);
+ i := FDeletedRecordsList.IndexOf(fCurRec);
+ if i <> -1 then begin
+ buf1:=ActiveBuffer;
+ DuplicateBuffer(Pointer(FDeletedRecordsList.Objects[i]), buf1, True);
+ end;
+ end;
+ inherited;
+end;
+
+procedure TDAMemDataset.InternalOpen;
+begin
+ inherited;
+end;
+
+procedure TDAMemDataset.InternalPost;
+var
+ i: integer;
+ buf: Dataset_PAnsiChar;
+begin
+ inherited;
+ if FLogDeletedRecords and (State = dsInsert) then begin
+ i := FDeletedRecordsList.IndexOf(Fields[0].AsString);
+ if i <> -1 then begin
+ buf := pointer(FDeletedRecordsList.Objects[i]);
+ FreeRecordBuffer(buf);
+ FDeletedRecordsList.Delete(i);
+ end;
+ end;
+end;
+
+procedure TDAMemDataset.InternalRefresh;
+begin
+ inherited;
+end;
+
+{ TDAMemDataTable }
+
+
+procedure TDAMemDataTable.AddRecordsfromList(AList: TList);
+var
+ i: integer;
+ Buffer: PAnsiChar;
+ FRecIDOffset: Cardinal;
+begin
+ FRecIDOffset := fMemDataset.GetBin2FieldOffset(0);
+ // setup RecID
+ For i:=0 to AList.Count-1 do begin
+ buffer:=AList[i];
+ PCardinal(PMemDatasetrecord_Native(Buffer)^.Data+FRecIDOffset)^:=CurrRecId;
+ fMemDataset.SetNullMask(PMemDatasetrecord_Native(Buffer)^.Data,0,False); //RECID
+ CurrRecId:=CurrRecId+1;
+ end;
+ fMemDataset.AddRecordsfromList(AList);
+ fMemDataset.ProcessFilter;
+end;
+
+function TDAMemDataTable.AllocRecordBuffer: PAnsiChar;
+begin
+ Result:= Pointer(fMemDataset.CreateMemDatasetRecord(mrBin2Style,0,False));
+end;
+
+procedure TDAMemDataTable.ApplyRange;
+begin
+ fMemDataset.ApplyRange;
+end;
+
+procedure TDAMemDataTable.CancelRange;
+begin
+ fMemDataset.CancelRange;
+end;
+
+procedure TDAMemDataTable.CloneCursor(Source: TDADataTable);
+begin
+ if Source = nil then Exception.Create('CloneCursor. Source should be specified.');
+ if not (Source is TDAMemDataTable) then Exception.Create('Can''t clone cursor from ' + Source.ClassName);
+
+ if Active then raise Exception.Create('Datatable is already open');
+
+ try
+ fCloneSource := Source;
+
+ Fields.Clear;
+ Fields.Assign(Source.Fields);
+
+ // Proceeds
+ fMemDataset.CloneCursor(Source.Dataset as TDAMemDataset, False);
+
+ RecIDField := fMemDataset.FieldByName(RecIDFieldName) as TIntegerField;
+ RecIDField.Visible := FALSE;
+
+ Fields.Bind(fMemDataset);
+
+ // Prepares the delta
+ Delta := Source.Delta;
+
+ // Finishes to prepare the internal dataset (descendant might need additional customization and might not be open)
+ DoBeforeOpenDataset;
+ if not Dataset.Active then Dataset.Open;
+ DoAfterOpenDataset;
+ except
+ // Restores the previous state
+ fCloneSource := NIL;
+ Delta := NIL;
+
+ raise;
+ end;
+end;
+
+constructor TDAMemDataTable.Create(aOwner: TComponent);
+begin
+ inherited;
+ fMemDataset := TDAMemDataset(Dataset);
+end;
+
+procedure TDAMemDataTable.CreateInternalFields(aDataset: TDataset;
+ someFieldDefinitions: TDAFieldCollection);
+begin
+ inherited;
+ fMemDataset.Open;
+end;
+
+procedure TDAMemDataTable.DisableConstraints;
+begin
+ fWasReadonly := ReadOnly;
+ ReadOnly := False;
+// fMemDataset.DisableConstraints;
+end;
+
+procedure TDAMemDataTable.DoSort(const FieldNames: array of string;
+ const Directions: array of TDASortDirection);
+var
+ i: integer;
+ s,s1: string;
+begin
+ if Length(FieldNames) <> Length(Directions) then DatabaseError('Can''t perform sorting: FieldNames and Directions should have same dimension.');
+ s := '';
+ s1:='';
+ for i := Low(FieldNames) to High(FieldNames) do begin
+ s := s + FieldNames[i] + ';';
+ if Directions[i] = sdDescending then
+ s1 := s1 + FieldNames[i] + ';';
+ end;
+ fMemDataset.SortOnFields(s,'',s1);
+end;
+
+procedure TDAMemDataTable.EditKey;
+begin
+ fMemDataset.EditKey;
+end;
+
+procedure TDAMemDataTable.EditRangeEnd;
+begin
+ fMemDataset.EditRangeEnd;
+end;
+
+procedure TDAMemDataTable.EditRangeStart;
+begin
+ fMemDataset.EditRangeStart;
+end;
+
+procedure TDAMemDataTable.EnableConstraints;
+begin
+ //fMemDataset.EnableConstraints;
+ ReadOnly := fWasReadonly;
+end;
+
+function TDAMemDataTable.FindKey(const KeyValues: array of const): Boolean;
+begin
+ Result := fMemDataset.FindKey(KeyValues);
+end;
+
+procedure TDAMemDataTable.FindNearest(const KeyValues: array of const);
+begin
+ fMemDataset.FindNearest(KeyValues);
+end;
+
+procedure TDAMemDataTable.FreeRecordBuffer(var Buffer: PAnsiChar);
+begin
+ fMemDataset.FreeMemDatasetRecord(PMemDatasetrecord_Native(Buffer));
+ Buffer := nil;
+end;
+
+function TDAMemDataTable.GetAutoCompactRecords: boolean;
+begin
+ Result := fMemDataset.AutoCompactRecords;
+end;
+
+function TDAMemDataTable.GetDatasetClass: TDatasetClass;
+begin
+ Result := TDAMemDataset;
+end;
+
+function TDAMemDataTable.GetDetailFields: string;
+begin
+ result := fMemDataset.DetailFields;
+end;
+
+function TDAMemDataTable.GetFieldNativeBuffer(Buffer: PAnsiChar;
+ Field: TField): Pointer;
+begin
+ Result:= fMemDataset.IntFindFieldData(PMemDatasetrecord_Native(Buffer)^.Data, Field, True);
+end;
+
+function TDAMemDataTable.GetFilter: string;
+begin
+ Result := fMemDataset.Filter;
+end;
+
+function TDAMemDataTable.GetFiltered: boolean;
+begin
+ Result := fMemDataset.Filtered;
+end;
+
+function TDAMemDataTable.GetIndexDefs: TIndexDefs;
+begin
+ result := fMemDataset.IndexDefs;
+end;
+
+function TDAMemDataTable.GetIndexFieldNames: string;
+begin
+ Result := fMemDataset.IndexFieldNames;
+end;
+
+function TDAMemDataTable.GetIndexName: string;
+begin
+ result := fMemDataset.IndexName;
+end;
+
+function TDAMemDataTable.GetMasterFields: string;
+begin
+ result := fMemDataset.MasterFields
+end;
+
+function TDAMemDataTable.GetMasterSource: TDADataSource;
+begin
+ result := TDADataSource(fMemDataset.DataSource);
+end;
+
+function TDAMemDataTable.GetReadOnly: boolean;
+begin
+ Result := fMemDataset.ReadOnly;
+end;
+
+function TDAMemDataTable.GotoKey: Boolean;
+begin
+ Result := fMemDataset.GotoKey;
+end;
+
+procedure TDAMemDataTable.GotoNearest;
+begin
+ fMemDataset.GotoNearest;
+end;
+
+function TDAMemDataTable.LocateByIndex(const aIndexName: string;
+ const KeyValues: Variant): Boolean;
+begin
+ Result:= fMemDataset.LocateByIndex(aIndexName,KeyValues);
+end;
+
+function TDAMemDataTable.LookupByIndex(const aIndexName: string;
+ const KeyValues: Variant; const ResultFields: string): Variant;
+begin
+ Result:= fMemDataset.LookupByIndex(aIndexName,KeyValues,ResultFields);
+end;
+
+function TDAMemDataTable.MakeBlobFromString(Blob: AnsiString): pointer;
+begin
+ Result:= fMemDataset.MakeBlobFromString(Blob);
+end;
+
+procedure TDAMemDataTable.PrepareIndexForSorting(const aIndexName: string);
+begin
+ fMemDataset.PrepareIndexForSorting(aIndexName);
+end;
+
+procedure TDAMemDataTable.SetAnsiString(NativeBuf: Pointer; Field: TField;
+ const Value: Ansistring);
+begin
+ fMemDataset.SetAnsiString(NativeBuf,Field, Value);
+end;
+
+procedure TDAMemDataTable.SetAutoPackRecords(const Value: boolean);
+begin
+ fMemDataset.AutoCompactRecords := Value;
+end;
+
+procedure TDAMemDataTable.SetDetailsFields(const Value: string);
+begin
+ fMemDataset.DetailFields := Value
+end;
+
+procedure TDAMemDataTable.SetFilter(const Value: string);
+begin
+ fMemDataset.Filter := Value;
+end;
+
+procedure TDAMemDataTable.SetFiltered(const Value: boolean);
+begin
+ fMemDataset.Filtered := Value;
+end;
+
+procedure TDAMemDataTable.SetIndexDefs(const Value: TIndexDefs);
+begin
+ fMemDataset.IndexDefs.Assign(Value);
+end;
+
+procedure TDAMemDataTable.SetIndexFieldNames(const Value: string);
+begin
+ fMemDataset.IndexFieldNames := Value;
+end;
+
+procedure TDAMemDataTable.SetIndexName(const Value: string);
+begin
+ fMemDataset.IndexName:=Value;
+end;
+
+procedure TDAMemDataTable.SetKey;
+begin
+ fMemDataset.SetKey;
+end;
+
+procedure TDAMemDataTable.SetMasterFields(const Value: string);
+begin
+ inherited;
+ fMemDataset.MasterFields := Value
+end;
+
+procedure TDAMemDataTable.SetMasterSource(const Value: TDADataSource);
+begin
+ fMemDataset.MasterSource := Value;
+ inherited;
+end;
+
+procedure TDAMemDataTable.SetNullMask(Buffer: PAnsiChar; Field: TField;
+ const Value: boolean);
+begin
+ fMemDataset.SetNullMask(Dataset_PAnsiChar(Buffer),Field.Index,Value);
+end;
+
+procedure TDAMemDataTable.SetRange(const StartValues,
+ EndValues: array of const);
+begin
+ fMemDataset.SetRange(StartValues, EndValues);
+end;
+
+procedure TDAMemDataTable.SetRangeEnd;
+begin
+ fMemDataset.SetRangeEnd;
+end;
+
+procedure TDAMemDataTable.SetRangeStart;
+begin
+ fMemDataset.SetRangeStart;
+end;
+
+procedure TDAMemDataTable.SetReadOnly(const Value: boolean);
+begin
+ fMemDataset.ReadOnly := Value;
+end;
+
+procedure TDAMemDataTable.SetWideString(NativeBuf: Pointer; Field: TField;
+ const Value: Widestring);
+begin
+ fMemDataset.SetWideString(NativeBuf, Field, Value);
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDAMemDataset.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAMemDataset.pas
new file mode 100644
index 0000000..32047ec
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAMemDataset.pas
@@ -0,0 +1,4648 @@
+unit uDAMemDataset;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up }
+{ platform: Win32 }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+{.$DEFINE MEMDATASET_DEBUG}
+{$DEFINE CHECK_RANGE}
+{$DEFINE USE_REALLOC}
+// defer to .XX
+{.$DEFINE MEM_PACKETRECORDS}
+
+uses
+ {$IFDEF MSWINDOWS}Windows,{$ENDIF}
+ Classes, DB, uDAExpressionEvaluator;
+
+type
+{$IFDEF DELPHI2008UP}
+ Dataset_PAnsiChar = PByte;
+{$ELSE}
+ Dataset_PAnsiChar = PAnsiChar;
+{$ENDIF}
+
+
+ {$IFDEF DELPHI2008UP}
+ TMemBookmarkData = TBookmarkData;
+ {$ELSE}
+ TMemBookmarkData = TBookmarkStr;
+ {$ENDIF}
+
+ TDAMemoryDataset = class;
+ PBookmarkData = ^TBookmarkData;
+ TBookmarkData = Pointer;
+ PRecInfo = ^TRecInfo;
+ TRecInfo = packed record
+ Bookmark: TBookmarkData;
+ BookmarkFlag: TBookmarkFlag;
+ end;
+
+ TOffsetArray = array of Cardinal;
+ PBLOBRecord = ^TBLOBRecord;
+ TBLOBRecord = packed record
+ size: Cardinal;
+ Data: WideChar;
+ end;
+
+ TSortRecord = record
+ data: PAnsiChar;
+ position: integer;
+ end;
+
+ PSortRecordList = ^TSortRecordList;
+ TSortRecordList = array[0..MaxListSize - 1] of TSortRecord;
+
+ // these operators are used in Assign and go beyond simply copying
+ // mlaCopy = dest becomes a copy of the source
+ // mlaAnd = intersection of the two lists
+ // mlaOr = union of the two lists
+ // mlaXor = only those not in both lists
+ // the last two operators can actually be thought of as binary operators but
+ // their implementation has been optimized over their binary equivalent.
+ // mlaSrcUnique = only those unique to source (same as mlaAnd followed by mlaXor)
+ // mlaDestUnique = only those unique to dest (same as mlaOr followed by mlaXor)
+ TMemListAssignOp = (mlaCopy, mlaAnd, mlaOr, mlaXor, mlaSrcUnique, mlaDestUnique);
+
+ TMemList = class(TObject)
+ private
+ FList: PPointerList;
+ FSortList:PSortRecordList;
+ FCount: Integer;
+ FCapacity: Integer;
+ FNeedRefresh: boolean;
+ procedure QuickSort(L, R: Integer);
+ procedure Sort;
+ function intIndexOf(Item: PAnsiChar): Integer;
+ protected
+ function Get(Index: Integer): Pointer;
+ procedure Grow; virtual;
+ procedure Put(Index: Integer; Item: Pointer);
+ procedure SetCapacity(NewCapacity: Integer);
+ procedure SetCount(NewCount: Integer);
+ public
+ constructor Create;
+ destructor Destroy; override;
+ function Add(Item: Pointer): Integer;
+ procedure Clear; virtual;
+ procedure Delete(Index: Integer);
+ class procedure Error(const Msg: string; Data: Integer); overload; virtual;
+ class procedure Error(Msg: PResStringRec; Data: Integer); overload;
+ procedure Exchange(Index1, Index2: Integer);
+ function Expand: TMemList;
+ function Extract(Item: Pointer): Pointer;
+ function First: Pointer;
+ function IndexOf(Item: Pointer): Integer;
+ procedure Insert(Index: Integer; Item: Pointer);
+ function Last: Pointer;
+ procedure Move(CurIndex, NewIndex: Integer);
+ function Remove(Item: Pointer): Integer;
+ procedure Pack;
+ procedure Assign(ListA: TMemList; AOperator: TMemListAssignOp = mlaCopy; ListB: TMemList = nil);
+ property Capacity: Integer read FCapacity write SetCapacity;
+ property Count: Integer read FCount write SetCount;
+ property Items[Index: Integer]: Pointer read Get write Put; default;
+ property List: PPointerList read FList;
+ end;
+
+ TThreadMemList = class
+ private
+ FList: TMemList;
+ FLock: TRTLCriticalSection;
+ FReadLock: Integer;
+ public
+ constructor Create;
+ destructor Destroy; override;
+ procedure Add(Item: Pointer);
+ procedure Clear;
+ function LockListForReading: TMemList;
+ function LockListForWriting: TMemList;
+ procedure Remove(Item: Pointer);
+ procedure UnlockListForReading;
+ procedure UnlockListForWriting;
+ end;
+
+ TMemDataSetNotification = (mdnInsert, mdnModify, mdnDelete, mdnBatchAdding);
+
+ TDAValueStruct = packed record
+ Value: variant;
+ AsAnsiString: AnsiString;
+ AsWideString: WideString;
+ end;
+
+ TMemKeyIndex = (kiLookup, kiRangeStart, kiRangeEnd, kiCurRangeStart, kiCurRangeEnd, kiSave);
+
+ PMemKeyBuffer = ^TMemKeyBuffer;
+ TMemKeyBuffer = record
+ Modified: Boolean;
+ Exclusive: Boolean;
+ FieldCount: Integer;
+ Data: record end; // native bin2 format
+ end;
+
+{$IFDEF BDS4UP}{$REGION 'MEM_PACKETRECORDS'}{$ENDIF BDS4UP}
+ {$IFDEF MEM_PACKETRECORDS}
+
+ TMemPackedRecords = class;
+
+ TMemPackedRecord = class
+ private
+ fBuffer: PAnsiChar;
+ FOwner: TMemPackedRecords;
+ function GetValues(Index: Integer): Variant;
+ procedure SetValues(Index: Integer; const Value: Variant);
+ function GetIsNull(Index: Integer): Boolean;
+ procedure SetIsNull(Index: Integer; const Value: Boolean);
+ function GetValuesByFieldName(AName: string): Variant;
+ procedure SetValuesByFieldName(AName: string; const Value: Variant);
+ public
+ constructor Create(AOwner: TMemPackedRecords);
+ destructor Destroy; override;
+ property isNull[Index: Integer]: Boolean read GetIsNull write SetIsNull;
+ property Values[Index: Integer]: Variant read GetValues write SetValues;
+ property ValuesByFieldName[AName: string]: Variant read GetValuesByFieldName write SetValuesByFieldName;
+ end;
+
+ TMemPackedRecords = class
+ private
+ fOwner: TDAMemoryDataset;
+ fList: TList;
+ function GetCount: Integer;
+ function GetItems(Index: Integer): TMemPackedRecord;
+ public
+ constructor Create(AOwner: TDAMemoryDataset);
+ destructor Destroy; override;
+ procedure Clear;
+ function Add: TMemPackedRecord;
+ procedure Delete(aIndex: integer);
+ property Items[Index: Integer]: TMemPackedRecord read GetItems;
+ property Count: Integer read GetCount;
+ end;
+ {$ENDIF MEM_PACKETRECORDS}
+
+{$IFDEF BDS4UP}{$ENDREGION}{$ENDIF BDS4UP}
+ TDAMemIndex = class
+ private
+ FOwner: TDAMemoryDataset;
+ FSortDescMode: Boolean;
+ FIndexCaseInsList: TList;
+ FIndexDescFields: TList;
+ FIndexFieldNameList: TList;
+ FDataList: TMemList;
+ FInitFromIndexDef: Boolean;
+ FLastSorted: TDateTime;
+ FIndexDef_Options: TIndexOptions;
+ FIndexDef_Fields: string;
+ FIndexDef_DescFields: string;
+ FIndexDef_CaseInsFields: String;
+ FInit_FieldNames: String;
+ FInit_CaseInsFields: String;
+ FInit_DescFields: String;
+ procedure Init(const AFieldNames: string; const CaseInsFields: string = ''; const DescFields: string='');overload;
+ procedure Init(const Fields: string; CaseInsensitive, Descending: Boolean);overload;
+ procedure Init(AIndexDef: TIndexDef); overload;
+ function GetDataList: TMemList;
+ procedure Clear;
+ function IsValid: boolean;
+ procedure UpdateIndex(AIndexDef: TIndexDef);
+ function isCanUsed(const Fields: string; CaseInsensitive: Boolean): boolean;
+ property IndexFieldNameList: TList read FIndexFieldNameList;
+ property IndexCaseInsList: TList read FIndexCaseInsList;
+ property IndexDescFields: TList read FIndexDescFields;
+ property SortDescMode : Boolean read FSortDescMode;
+ property DataList: TMemList read GetDataList;
+ property LastSorted: TDateTime read FLastSorted write FLastSorted;
+ public
+ constructor Create(AOwner: TDAMemoryDataset);
+ destructor Destroy; override;
+ end;
+
+ PMemLocateStruct = ^TMemLocateStruct;
+ TMemLocateStruct = record
+ lWorkList: TMemList;
+ lFields: TList;
+ lFieldIndexes: array of integer;
+ lOffsets: array of cardinal;
+ lValues: array of TDAValueStruct;
+ lDatatypes: array of TFieldType;
+ lnull: array of boolean;
+ ldesc: array of boolean;
+ lcaseIns: array of boolean;
+ end;
+
+ TmrMode = (mrEmpty, mrBin2Style, mrBin3Style);
+
+ {BitMask: AnsiChar;
+ offsetDataSize: byte;
+ case integer of
+ 1:( byteOffset: array [0..0] of byte);
+ 2:( WordOffset: array [0..0] of word);
+ 4:( CardinalOffset: array [0..0] of Cardinal);
+ }
+ PMemDatasetrecord_Native = ^TMemDatasetrecord_Native;
+ TMemDatasetrecord_Native = packed record
+ Ident: TmrMode;
+ Data: Dataset_PAnsiChar;
+ end;
+
+ PMemDatasetrecord = ^TMemDatasetrecord;
+ TMemDatasetrecord = packed record
+ Ident: TmrMode;
+ Data: Dataset_PAnsiChar;
+ BookmarkData: TRecInfo;
+ CalcData: byte;
+// FBookMarkOffset := FNativeRecordSize;
+// FCalculatedOffset := FBookMarkOffset + SizeOf(TRecInfo);
+// FDatasetBufferSize := FCalculatedOffset + CalcFieldsSize;
+ end;
+
+ TMemLocateCompare = function (buf1: pointer; aValue:TDAValueStruct; aDataType: TFieldType;aSortCaseInsensitive:Boolean; abin2: boolean): boolean of Object;
+ TDAMemDatasetCompare = function(p1, p2: PMemDatasetrecord_Native; AIndex: TDAMemIndex): Integer of object;
+
+ { TDAMemoryDataset }
+ TDAMemoryDataset = class(TDataset)
+ private
+ FRecordsList: TThreadMemList;
+ FDataList: TMemList;
+ FRecordPos: integer;
+ FActive: Boolean;
+ FOffsets: TOffsetArray; // FOffset[0] = FNullMask
+ FDataSizeArray:TOffsetArray;
+ FNativeRecordSize: Cardinal;
+// FBookMarkOffset: Integer; // = FNativeRecordSize
+// FCalculatedOffset: Integer; // FBookMarkOffset + BookMark data size
+ FDatasetBufferSize: Cardinal; // FCalculatedOffset+ Calc fields size
+ FNullMaskSize: Cardinal;
+ FMasterDataLink: TMasterDataLink;
+ FFilterBuffer: Dataset_PAnsiChar;
+ FIndexName: string;
+ FDataTypeArray: array of TFieldType;
+ FStoreStringsAsReference: boolean;
+ FExpressionEvaluator: TDAExpressionEvaluator;
+ FExpressionBuffer: PMemDatasetrecord_Native;
+ {$IFDEF MSWINDOWS}
+ FSortLocale: LCID;
+ {$ENDIF MSWINDOWS}
+ FFieldsIndex: Boolean;
+ FIndexDefs: TIndexDefs;
+ FCloneSource: TDAMemoryDataset;
+ FCloneClientList:TThreadList;
+ FReadOnly: Boolean;
+ FDetailFields: string;
+ FDetailsFieldNameList: TList;
+ FRangeActive: boolean;
+ fUseIndexinLocate: Boolean;
+// FNeedRefreshIndexConditional: Boolean;
+{$IFDEF MEM_PACKETRECORDS}
+ fPackedMode: Boolean;
+{$ENDIF MEM_PACKETRECORDS}
+ FHasReferencedFields: boolean;
+ FLastUpdate: TDateTime;
+ f_DefaultIndexRecord: TDAMemIndex;
+ FIndexList: TList;
+ FAutoCompactRecords: Boolean;
+ procedure ConvertBin3ToBin2Record(Buffer: PMemDatasetrecord_Native);
+ procedure ConvertBin2ToBin3Record(ASource : PMemDatasetrecord_Native);
+ function Bin2ToBin3(ASource: Dataset_PAnsiChar): Dataset_PAnsiChar;
+ function CalcFieldLen(aDataType: TFieldType; aSize: Integer): integer;
+ procedure CalculateOffsets;
+ procedure ClearRecords;
+ procedure ClearFieldByFieldType(FieldBuffer: pointer; ADataType: TFieldType);
+ procedure ClearBin2Field(Buffer: Dataset_PAnsiChar; AField: TField);
+ function IsReferencedField(ADataType: TFieldType):Boolean;
+ function GetNullMask(Buffer: Dataset_PAnsiChar; const AIndex: Integer): boolean;
+ function IntFindRecordID(Buf: pointer): Integer;
+ function GetActiveRecBuf(var RecBuf: Dataset_PAnsiChar): Boolean;
+ procedure InternalSetFieldData(Field: TField; Buffer: Pointer);
+ procedure IntAssignRecord(Source, Dest: PMemDatasetrecord_Native);
+ procedure SetBlobData(Field: TField; Buffer: PMemDatasetrecord_Native; Value: PBLOBRecord);
+ function GetMasterFields: string;
+ procedure SetDataSource(const Value: TDataSource);
+ procedure SetMasterFields(const Value: string);
+ function GetIndexFieldNames: string;
+ procedure SetIndexFieldNames(const Value: string);
+ function InternalGetRecord(Buffer: PMemDatasetRecord; GetMode: TGetMode; DoCheck: Boolean): TGetResult;
+ procedure DoSort(AIndex: TDAMemIndex);
+ procedure QuickSort(L, R: Integer; SCompare: TDAMemDatasetCompare; AIndex: TDAMemIndex);
+ function Compare(i1, i2: PMemDatasetrecord_Native;AIndex: TDAMemIndex): Integer;
+ function CompareValues(buf1, buf2: pointer; aDataType: TFieldType;aSortCaseInsensitive:Boolean; aBin2_1, aBin2_2: Boolean): integer;
+ function CompareValues2(buf1: pointer; aValue: TDAValueStruct; aDataType: TFieldType;aSortCaseInsensitive:Boolean; aBin2: boolean): integer;
+ function CompareValues2_full(buf1: pointer; aValue: TDAValueStruct; aDataType: TFieldType;aSortCaseInsensitive:Boolean; abin2: boolean): boolean;
+ function CompareValues2_partial(buf1: pointer; aValue: TDAValueStruct; aDataType: TFieldType;aSortCaseInsensitive: Boolean; abin2: boolean): boolean;
+ function CompareValues_Range(buf: PMemDatasetrecord_Native; keybuffer: PMemKeyBuffer): integer;
+ procedure DoFilterRecords;
+ function ApplyMasterFilter: boolean;
+ procedure ApplyRangeFilter;
+ function FilterRecord(buf: PMemDatasetrecord_Native; AUseEvent: Boolean):Boolean;
+ procedure SetStoreStringAsReference(const Value: Boolean);
+ procedure EEGetValue(Sender: TDAExpressionEvaluator; const aIdentifier: string; out aValue: Variant);
+ function GetVarValueFromBuffer(Buffer: pointer; Field: TField;abin2: boolean):variant;
+ function IsActiveFilter: Boolean;
+ function GetIndexDefs: TIndexDefs;
+ procedure SetIndexDefs(const Value: TIndexDefs);
+ function GetIndexName: string;
+ procedure SetIndexName(const Value: string);
+ procedure SetIndex(const Value: string; FieldsIndex: Boolean);
+ procedure ValidateFieldForIndex(aField: TField);
+ function IntGetRecordList: TThreadMemList;
+ procedure RegisterClient(const AClient: TDAMemoryDataset);
+ procedure UnregisterClient(const AClient: TDAMemoryDataset);
+ procedure UnregisterAllClients;
+ procedure DetachFromSource;
+ procedure NotifyClients(Buf: PMemDatasetrecord_Native; Operation: TMemDataSetNotification; ASender: TDAMemoryDataset);
+ procedure RecordNotification(Buf: PMemDatasetrecord_Native; Operation: TMemDataSetNotification);
+ procedure IntInsertBuffer(Buffer: PMemDatasetrecord_Native; ASender: TDAMemoryDataset=nil);
+ procedure IntRemoveBuffer(Buffer: PMemDatasetrecord_Native; ASender: TDAMemoryDataset = nil);
+ procedure IntUpdateBuffer(Buffer: PMemDatasetrecord_Native; ASender: TDAMemoryDataset = nil);
+ procedure SetReadOnly(const Value: Boolean);
+ procedure SetDetailsFields(const Value: string);
+ procedure InitDetailFieldNamesList;
+ function GetIndexFields: string;
+ function internalGotoKey(const KeyBuffer: PMemKeyBuffer;isNearest: Boolean):Boolean;
+ procedure RefreshIndexConditional;
+ procedure MemList_ClearRecords(aMemList: TMemList);
+ procedure IndexList_Clear;
+ function LocateWithIndex(const LocateStruct: PMemLocateStruct; Buffer: PMemDatasetrecord): boolean;
+ procedure UpdateMemIndexes(AIndex: integer = -1);
+ procedure LocalBufferToDatasetBuffer(LocalBuf: PMemDatasetrecord_Native; DatasetBuffer: PMemDatasetrecord);
+ function LocateRecordByIndex(const aIndexName: string; const KeyValues: Variant; SyncCursor: Boolean): Boolean;
+ function intLocateRecordByIndex(aIndex: TDAMemIndex; const KeyValues: Variant; SyncCursor: Boolean): Boolean;
+ procedure InitMemLocateStruct(AStruct: PMemLocateStruct; const KeyValues: Variant);
+ function CreateBin3Struct(const ASize:Cardinal): Dataset_PAnsiChar;
+ function GetBin3Offset(Buffer: Dataset_PAnsiChar;const aFieldNo:integer):cardinal;
+ Procedure FreeBin3Buffer(Buffer: Dataset_PAnsiChar);
+ procedure SetAutoPackRecords(const Value: boolean);
+ private
+ { Set range }
+ FKeyBuffers: array[TMemKeyIndex] of PMemKeyBuffer;
+ FKeyBuffer: PMemKeyBuffer;
+ procedure AllocKeyBuffers;
+ procedure FreeKeyBuffers;
+ procedure SetKeyBuffer(KeyIndex: TMemKeyIndex; Clear: Boolean);
+ procedure SetKeyFields(KeyIndex: TMemKeyIndex; const Values: array of const);
+ function InitKeyBuffer(Buffer: PMemKeyBuffer): PMemKeyBuffer;
+ protected
+ function CreateMemDatasetRecord(const AType:TmrMode; ABin3Size: Cardinal = 0; ADatasetCompatible: Boolean =False):PMemDatasetrecord_Native;
+ procedure FreeMemDatasetRecord(Buffer: PMemDatasetrecord_Native);
+ protected
+ // for IDAMemDatasetBatchAdding
+ procedure SetNullMask(Buffer: Dataset_PAnsiChar; const AIndex: Integer; const Value: boolean);
+ function IntFindFieldData(Buffer: PMemDatasetrecord_Native; Field: TField): Pointer; overload;
+ function IntFindFieldData(Buffer: Dataset_PAnsiChar; Field: TField; aBin2: Boolean): Pointer; overload;
+ function MakeBlobFromString(Blob: AnsiString):PBLOBRecord;
+ function GetBin2FieldOffset(const aFieldNo:integer):cardinal;
+ procedure SetAnsiString(NativeBuf: Pointer; Field: TField; const Value: Ansistring);
+ procedure SetWideString(NativeBuf: Pointer; Field: TField; const Value: Widestring);
+ procedure ProcessFilter;
+ procedure AddRecordsfromList(AList: TList);
+ procedure ClearBin2Buffer(Buffer: Dataset_PAnsiChar);
+ Procedure FreeBin2Buffer(Buffer: Dataset_PAnsiChar);
+ function CreateBin2Struct: Dataset_PAnsiChar;
+ protected
+ procedure DuplicateBuffer(Source, Dest: PMemDatasetrecord_Native; ACanPack:boolean);
+ procedure RecordToBuffer(RecNo: integer; Buffer: PMemDatasetRecord);
+ property MasterDataLink: TMasterDataLink read FMasterDataLink;
+ procedure MasterChanged(Sender: TObject); virtual;
+ procedure MasterDisabled(Sender: TObject); virtual;
+ function LocateRecord(const KeyFields: string; const KeyValues: Variant; Options: TLocateOptions; SyncCursor: Boolean): Boolean;
+ protected // tdataset
+ { IProviderSupport }
+ function PSGetIndexDefs(IndexTypes: TIndexOptions): TIndexDefs; {$IFNDEF FPC}override;{$ENDIF}
+ procedure Notification(AComponent: TComponent; Operation: TOperation); override;
+ protected
+ procedure PostKeyBuffer(Commit: Boolean);
+ function GetIsIndexField(Field: TField): Boolean; override;
+ procedure DoOnNewRecord; override;
+ function GetRecord(Buffer: Dataset_PAnsiChar; GetMode: TGetMode; DoCheck: Boolean): TGetResult; override;
+ procedure InternalClose; override;
+ procedure InternalHandleException; override;
+ procedure InternalInitFieldDefs; override;
+ procedure InternalOpen; override;
+ function IsCursorOpen: Boolean; override;
+ function AllocRecordBuffer: Dataset_PAnsiChar; override;
+ procedure FreeRecordBuffer(var Buffer: Dataset_PAnsiChar); override;
+ procedure GetBookmarkData(Buffer: Dataset_PAnsiChar; Data: Pointer); override;
+ function GetBookmarkFlag(Buffer: Dataset_PAnsiChar): TBookmarkFlag; override;
+ function GetRecordSize: Word; override;
+ procedure InternalAddRecord(Buffer: Pointer; Append: Boolean); override;
+ procedure InternalDelete; override;
+ procedure InternalFirst; override;
+ procedure InternalGotoBookmark(Bookmark: Pointer); override;
+ procedure InternalInitRecord(Buffer: Dataset_PAnsiChar); override;
+ procedure InternalLast; override;
+ procedure InternalPost; override;
+ procedure InternalSetToRecord(Buffer: Dataset_PAnsiChar); override;
+ procedure SetBookmarkFlag(Buffer: Dataset_PAnsiChar; Value: TBookmarkFlag); override;
+ procedure SetBookmarkData(Buffer: Dataset_PAnsiChar; Data: Pointer); override;
+ procedure SetFieldData(Field: TField; Buffer: Pointer); overload; override;
+ function GetRecordCount: Integer; override;
+ function GetRecNo: Integer; override;
+ procedure SetRecNo(Value: Integer); override;
+ procedure OpenCursor(InfoQuery: Boolean); override;
+ procedure DataConvert(Field: TField; Source, Dest: Pointer; ToNative: Boolean); override;
+ function GetDataSource: TDataSource; override;
+ procedure SetFiltered(Value: Boolean); override;
+ procedure SetFilterOptions(Value: TFilterOptions); override;
+ procedure SetFilterText(const Value: string); override;
+ procedure SetOnFilterRecord(const Value: TFilterRecordEvent); override;
+ procedure DoAfterOpen; override;
+ procedure UpdateIndexDefs; override;
+ procedure DefChanged(Sender: TObject); {$IFNDEF FPC}override;{$ENDIF}
+ procedure intInsertRecord(Buf: PMemDatasetrecord_Native);
+ function GetCanModify: Boolean; override;
+ protected
+ procedure SwitchToIndex(const IndexName: string);
+ property RangeActive:boolean read FRangeActive;
+ public //from TDataset `
+ function GetFieldData(Field: TField; Buffer: Pointer): Boolean; override;
+ function CreateBlobStream(Field: TField; Mode: TBlobStreamMode): TStream; override;
+// procedure GetDetailLinkFields(MasterFields, DetailFields: TList); {$IFNDEF FPC}override;{$ENDIF}
+ function Locate(const KeyFields: string; const KeyValues: Variant; Options: TLocateOptions): Boolean; override;
+ function Lookup(const KeyFields: string; const KeyValues: Variant; const ResultFields: string): Variant; override;
+ function LocateByIndex(const aIndexName: string; const KeyValues: Variant): Boolean;
+ function LookupByIndex(const aIndexName: string; const KeyValues: Variant; const ResultFields: string): Variant;
+ procedure PrepareIndexForSorting(const aIndexName: string = '');
+ function CompareBookmarks(Bookmark1, Bookmark2: TBookmark): Integer; override;
+ function BookmarkValid(Bookmark: TBookmark): Boolean; override;
+ {$IFNDEF MEMDATASET_DEBUG}
+ protected // postponed to .31
+ {$ENDIF MEMDATASET_DEBUG}
+ property UseIndexinLocate: Boolean read fUseIndexinLocate write fUseIndexinLocate;
+ procedure SortOnFields(AIndex: TDAMemIndex);overload;
+ Function CalculateRecordsSize: Cardinal;
+ procedure CompactRecords;
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ procedure SortOnFields(const Fields: string; CaseInsensitive: Boolean = False; Descending: Boolean = False);overload;
+ procedure SortOnFields(const Fields, CaseInsFields, DescFields: string);overload;
+ procedure SortOnFields;overload;
+ procedure GetIndexNames(List: TStrings);
+ procedure AddIndex(const Name, Fields: string; const DescFields: string = ''; const CaseInsFields: string = '');
+ procedure DeleteIndex(const Name: string);
+ procedure CloneCursor(Source: TDAMemoryDataset; Reset: Boolean; KeepSettings: Boolean = False); virtual;
+ property StoreStringAsReference: Boolean read FStoreStringsAsReference write SetStoreStringAsReference;
+ property CloneSource: TDAMemoryDataset read FCloneSource;
+ procedure Post; override;
+ procedure Cancel; override;
+ {$IFDEF MSWINDOWS}
+ property SortLocale: LCID read FSortLocale write FSortLocale;
+ {$ENDIF MSWINDOWS}
+ property AutoCompactRecords: boolean read FAutoCompactRecords write SetAutoPackRecords;
+{$IFDEF BDS4UP}{$REGION 'MEM_PACKETRECORDS'}{$ENDIF BDS4UP}
+{$IFDEF MEM_PACKETRECORDS}
+ // packed adding
+ protected
+ function GetPackedMode: Boolean;
+ procedure SetPackedMode(const Value: Boolean);
+ Property PackedMode: Boolean read GetPackedMode write SetPackedMode;
+ procedure PackedRecordListClear;
+ public
+ Procedure StartPackedMode;
+ Procedure CommitPackedMode;
+ Procedure CancelPackedMode;
+{$ENDIF MEM_PACKETRECORDS}
+{$IFDEF BDS4UP}{$ENDREGION}{$ENDIF BDS4UP}
+ public { Set range }
+ procedure ApplyRange;
+ procedure CancelRange;
+ procedure SetRange(const StartValues, EndValues: array of const);
+ procedure EditRangeEnd;
+ procedure EditRangeStart;
+ procedure SetRangeEnd;
+ procedure SetRangeStart;
+ //
+ procedure SetKey;
+ procedure EditKey;
+ function FindKey(const KeyValues: array of const): Boolean;
+ procedure FindNearest(const KeyValues: array of const);
+ function GotoKey: Boolean;
+ procedure GotoNearest;
+ published
+ property Active;
+ property FieldDefs;
+ property OnFilterRecord;
+ property IndexFieldNames: string read GetIndexFieldNames write SetIndexFieldNames;
+ property IndexName: string read GetIndexName write SetIndexName;
+ property IndexDefs: TIndexDefs read GetIndexDefs write SetIndexDefs;
+ property MasterFields: string read GetMasterFields write SetMasterFields;
+ property MasterSource: TDataSource read GetDataSource write SetDataSource;
+ property DetailFields: string read FDetailFields write SetDetailsFields;
+ property ReadOnly: Boolean read FReadOnly write SetReadOnly default False;
+ property Filter;
+ property Filtered;
+ property BeforeOpen;
+ property AfterOpen;
+ property BeforeClose;
+ property AfterClose;
+ property BeforeInsert;
+ property AfterInsert;
+ property BeforeEdit;
+ property AfterEdit;
+ property BeforePost;
+ property AfterPost;
+ property BeforeCancel;
+ property AfterCancel;
+ property BeforeDelete;
+ property AfterDelete;
+ property BeforeScroll;
+ property AfterScroll;
+ property BeforeRefresh;
+ property AfterRefresh;
+ property OnCalcFields;
+ property OnDeleteError;
+ property OnEditError;
+ property OnNewRecord;
+ property OnPostError;
+ end;
+
+ TDABlobStream = class(TMemoryStream)
+ private
+ FField: TBlobField;
+ FDataSet: TDAMemoryDataset;
+ FBuffer: PMemDatasetrecord_Native;
+ FMode: TBlobStreamMode;
+ FOpened: Boolean;
+ FModified: Boolean;
+ FPosition: Longint;
+ FCached: Boolean;
+ function GetBlobSize: Longint;
+ procedure GetBLOBRecordFromRecord(Field: TField; out aLocked:Boolean; out blob_size: integer; out blob_data: pointer);
+ function GetBLOBRecordFromBuffer(Buffer: PMemDatasetrecord_Native; Field: TField; out blob_size: integer; out blob_data: pointer): PBLOBRecord;
+ procedure Truncate;
+ public
+ constructor Create(Field: TBlobField; Mode: TBlobStreamMode);
+ destructor Destroy; override;
+ function Read(var Buffer; Count: Longint): Longint; override;
+ function Write(const Buffer; Count: Longint): Longint; override;
+ function Seek(Offset: Longint; Origin: Word): Longint; override;
+ end;
+
+var
+ MaxStringSizeInline : integer = 4096;
+
+implementation
+uses
+ uROClasses, uROBinaryHelpers,
+ Variants, SysUtils,{$IFDEF FPC}dbconst,{$ELSE}DBConsts,{$ENDIF}
+ {$IFNDEF FPC}Forms, SqlTimSt,{$ENDIF} FMTBcd, RTLConsts, Math;
+
+const
+ guidsize = 38; { Length(GuidString) }
+
+resourcestring
+ SNoDetailFilter = 'Filter property cannot be used for detail tables';
+const
+ ft_Inline = [ftSmallint, ftInteger, ftWord, ftBoolean, ftFloat,
+ ftCurrency, ftDate, ftTime, ftDateTime, ftAutoInc,
+ ftLargeint, {$IFNDEF FPC}ftTimeStamp,{$ENDIF} ftBCD, ftFMTBCD, ftGuid];
+ ft_BlobTypes = [ftBlob, ftMemo,{$IFDEF DA_WideMemoSupport}ftWideMemo,{$ENDIF DA_WideMemoSupport} ftGraphic, ftFmtMemo, ftParadoxOle, ftDBaseOle, ftTypedBinary, ftOraBlob, ftOraClob];
+ ft_Strings = [ftString, ftWideString, ftFixedChar];
+ ft_AnsiStringValues = [ftString, ftFixedChar, ftGuid];
+ ft_WideStringValues = [ftWideString];
+ ft_Supported = ft_Inline + ft_BlobTypes + ft_Strings;
+// ft_UnSupported = [ftADT, ftArray, ftReference, ftDataSet, ftBytes, ftVarBytes] + [ftVariant];
+type
+ PCardinalArray = ^TCardinalArray;
+ TCardinalArray = array [0..MaxListSize - 1] of Cardinal;
+
+function CreateBlobRecord(ASize: cardinal = 0; AInit: Boolean = False): PBlobRecord;
+begin
+ {$IFDEF FPC}
+ Result := nil;
+ {$ENDIF FPC}
+ GetMem(Result, ASize + SizeOf(TBLOBRecord));
+ FillChar(Result^, sizeof(TBLOBRecord), 0);
+ Result.size:=ASize;
+ if AInit then FillChar(Result.Data, Asize, 0);
+end;
+
+procedure FreeBlobRecord(buf: Pointer);
+begin
+// if buf = nil then Exit;
+ FreeMem(buf);
+end;
+
+{ TMemList }
+
+destructor TMemList.Destroy;
+begin
+ Clear;
+end;
+
+function TMemList.Add(Item: Pointer): Integer;
+begin
+ Result := FCount;
+ if Result = FCapacity then Grow;
+ FList^[Result] := Item;
+ Inc(FCount);
+ FNeedRefresh:=True;
+end;
+
+procedure TMemList.Clear;
+begin
+ SetCount(0);
+ SetCapacity(0);
+ ReallocMem(FSortList,0);
+ FNeedRefresh:=True;
+end;
+
+procedure TMemList.Delete(Index: Integer);
+begin
+ if (Index < 0) or (Index >= FCount) then Error(@SListIndexError, Index);
+ Dec(FCount);
+ if Index < FCount then
+ System.Move(FList^[Index + 1], FList^[Index],(FCount - Index) * SizeOf(Pointer));
+ fNeedRefresh:=True;
+end;
+
+class procedure TMemList.Error(const Msg: string; Data: Integer);
+ {$IFNDEF FPC}
+ function ReturnAddr: Pointer;
+ asm
+ MOV EAX,[EBP+4]
+ end;
+ {$ENDIF}
+begin
+ raise EListError.CreateFmt(Msg, [Data]) at {$IFNDEF FPC}ReturnAddr{$ELSE}get_caller_addr(get_frame){$ENDIF};
+end;
+
+class procedure TMemList.Error(Msg: PResStringRec; Data: Integer);
+begin
+ TMemList.Error(LoadResString(Msg), Data);
+end;
+
+procedure TMemList.Exchange(Index1, Index2: Integer);
+var
+ Item: Pointer;
+begin
+ if (Index1 < 0) or (Index1 >= FCount) then Error(@SListIndexError, Index1);
+ if (Index2 < 0) or (Index2 >= FCount) then Error(@SListIndexError, Index2);
+ Item := FList^[Index1];
+ FList^[Index1] := FList^[Index2];
+ FList^[Index2] := Item;
+ FNeedRefresh:=True;
+end;
+
+function TMemList.Expand: TMemList;
+begin
+ if FCount = FCapacity then Grow;
+ Result := Self;
+end;
+
+function TMemList.First: Pointer;
+begin
+ Result := Get(0);
+end;
+
+function TMemList.Get(Index: Integer): Pointer;
+begin
+ if (Index < 0) or (Index >= FCount) then Error(@SListIndexError, Index);
+ Result := FList^[Index];
+end;
+
+procedure TMemList.Grow;
+var
+ Delta: Integer;
+begin
+ if FCapacity > 64 then
+ Delta := FCapacity div 4
+ else
+ if FCapacity > 8 then
+ Delta := 16
+ else
+ Delta := 4;
+ SetCapacity(FCapacity + Delta);
+end;
+
+function TMemList.IndexOf(Item: Pointer): Integer;
+begin
+ Sort;
+ Result := intIndexOf(Item);
+ if Result > -1 then Result:= FSortList^[Result].position;
+end;
+
+procedure TMemList.Insert(Index: Integer; Item: Pointer);
+begin
+ if (Index < 0) or (Index > FCount) then Error(@SListIndexError, Index);
+ if FCount = FCapacity then Grow;
+ if Index < FCount then
+ System.Move(FList^[Index], FList^[Index + 1], (FCount - Index) * SizeOf(Pointer));
+ FList^[Index] := Item;
+ Inc(FCount);
+ fNeedRefresh:=True;
+end;
+
+function TMemList.Last: Pointer;
+begin
+ Result := Get(FCount - 1);
+end;
+
+procedure TMemList.Move(CurIndex, NewIndex: Integer);
+var
+ Item: Pointer;
+begin
+ if CurIndex <> NewIndex then
+ begin
+ if (NewIndex < 0) or (NewIndex >= FCount) then Error(@SListIndexError, NewIndex);
+ Item := Get(CurIndex);
+ FList^[CurIndex] := nil;
+ Delete(CurIndex);
+ Insert(NewIndex, nil);
+ FList^[NewIndex] := Item;
+ FNeedRefresh:=True;
+ end;
+end;
+
+procedure TMemList.Put(Index: Integer; Item: Pointer);
+begin
+ if (Index < 0) or (Index >= FCount) then Error(@SListIndexError, Index);
+ if Item <> FList^[Index] then
+ begin
+ FList^[Index] := Item;
+ fNeedRefresh:=True;
+ end;
+end;
+
+function TMemList.Remove(Item: Pointer): Integer;
+begin
+ Result := IndexOf(Item);
+ if Result >= 0 then begin
+ Delete(Result);
+ FNeedRefresh:=True;
+ end
+end;
+
+procedure TMemList.Pack;
+var
+ I: Integer;
+begin
+ for I := FCount - 1 downto 0 do
+ if Items[I] = nil then
+ Delete(I);
+ FNeedRefresh:=True;
+end;
+
+procedure TMemList.SetCapacity(NewCapacity: Integer);
+begin
+ if (NewCapacity < FCount) or (NewCapacity > MaxListSize) then Error(@SListCapacityError, NewCapacity);
+ if NewCapacity <> FCapacity then
+ begin
+ ReallocMem(FList, NewCapacity * SizeOf(Pointer));
+ FCapacity := NewCapacity;
+ end;
+end;
+
+procedure TMemList.SetCount(NewCount: Integer);
+begin
+ if (NewCount < 0) or (NewCount > MaxListSize) then Error(@SListCountError, NewCount);
+ if NewCount > FCapacity then SetCapacity(NewCount);
+ if NewCount > FCount then FillChar(FList^[FCount], (NewCount - FCount) * SizeOf(Pointer), 0);
+ FCount := NewCount;
+ FNeedRefresh:=True;
+end;
+
+procedure TMemList.QuickSort(L, R: Integer);
+var
+ I, J, P : integer;
+ k: TSortRecord;
+begin
+ repeat
+ I := L;
+ J := R;
+ P := (L + R) shr 1;
+ repeat
+ while FSortList^[i].Data < FSortList^[P].Data do Inc(I);
+ while FSortList^[J].Data > FSortList^[P].Data do Dec(J);
+ if I <= J then
+ begin
+ k:= FSortList^[i];
+ FSortList^[i]:=FSortList^[j];
+ FSortList^[j]:=k;
+ if P = I then P := J
+ else if P = J then P := I;
+ Inc(I);
+ Dec(J);
+ end;
+ until I > J;
+ if L < J then QuickSort(L, J);
+ L := I;
+ until I >= R;
+end;
+
+procedure TMemList.Sort;
+var
+ i: integer;
+begin
+ if FNeedRefresh and (FList <> nil) and (Count > 0) then begin
+ ReallocMem(FSortList, Capacity * SizeOf(TSortRecord));
+ For i:=0 to Count -1 do begin
+ FSortList^[i].data:= FList^[I];
+ FSortList^[i].position:= i;
+ end;
+ QuickSort(0, Count - 1);
+ FNeedRefresh:=False;
+ end;
+end;
+
+function TMemList.Extract(Item: Pointer): Pointer;
+var
+ I: Integer;
+begin
+ Result := nil;
+ I := IndexOf(Item);
+ if I >= 0 then
+ begin
+ Result := Item;
+ FList^[I] := nil;
+ Delete(I);
+ end;
+end;
+
+
+procedure TMemList.Assign(ListA: TMemList; AOperator: TMemListAssignOp; ListB: TMemList);
+var
+ I: Integer;
+ LTemp, LSource: TMemList;
+begin
+ FNeedRefresh:=True;
+ // ListB given?
+ if ListB <> nil then
+ begin
+ LSource := ListB;
+ Assign(ListA);
+ end
+ else
+ LSource := ListA;
+
+ // on with the show
+ case AOperator of
+
+ // 12345, 346 = 346 : only those in the new list
+ mlaCopy:
+ begin
+ Clear;
+ Capacity := LSource.Capacity;
+ for I := 0 to LSource.Count - 1 do
+ Add(LSource[I]);
+ end;
+
+ // 12345, 346 = 34 : intersection of the two lists
+ mlaAnd:
+ for I := Count - 1 downto 0 do
+ if LSource.IndexOf(Items[I]) = -1 then
+ Delete(I);
+
+ // 12345, 346 = 123456 : union of the two lists
+ mlaOr:
+ for I := 0 to LSource.Count - 1 do
+ if IndexOf(LSource[I]) = -1 then
+ Add(LSource[I]);
+
+ // 12345, 346 = 1256 : only those not in both lists
+ mlaXor:
+ begin
+ LTemp := TMemList.Create; // Temp holder of 4 byte values
+ try
+ LTemp.Capacity := LSource.Count;
+ for I := 0 to LSource.Count - 1 do
+ if IndexOf(LSource[I]) = -1 then
+ LTemp.Add(LSource[I]);
+ for I := Count - 1 downto 0 do
+ if LSource.IndexOf(Items[I]) <> -1 then
+ Delete(I);
+ I := Count + LTemp.Count;
+ if Capacity < I then
+ Capacity := I;
+ for I := 0 to LTemp.Count - 1 do
+ Add(LTemp[I]);
+ finally
+ LTemp.Free;
+ end;
+ end;
+
+ // 12345, 346 = 125 : only those unique to source
+ mlaSrcUnique:
+ for I := Count - 1 downto 0 do
+ if LSource.IndexOf(Items[I]) <> -1 then
+ Delete(I);
+
+ // 12345, 346 = 6 : only those unique to dest
+ mlaDestUnique:
+ begin
+ LTemp := TMemList.Create;
+ try
+ LTemp.Capacity := LSource.Count;
+ for I := LSource.Count - 1 downto 0 do
+ if IndexOf(LSource[I]) = -1 then
+ LTemp.Add(LSource[I]);
+ Assign(LTemp);
+ finally
+ LTemp.Free;
+ end;
+ end;
+ end;
+end;
+
+function TMemList.intIndexOf(Item: PAnsiChar): Integer;
+var
+ L, H, I, C : integer;
+ Res : boolean;
+begin
+ Res := False;
+ L := 0;
+ H := FCount - 1;
+ while L <= H do
+ begin
+ I := (L + H) shr 1;
+ C := FSortList^[i].Data - Item;
+ if C < 0 then
+ L := I + 1
+ else
+ begin
+ H := I - 1;
+ if C = 0 then Res := True;
+ end;
+ end;
+ if Res then
+ Result := L
+ else
+ Result := -1;
+end;
+
+constructor TMemList.Create;
+begin
+ inherited;
+end;
+
+{ TDAMemoryDataset }
+
+function TDAMemoryDataset.AllocRecordBuffer: Dataset_PAnsiChar;
+begin
+ Result:= Dataset_PAnsiChar(CreateMemDatasetRecord(mrEmpty, 0, True));
+end;
+
+procedure TDAMemoryDataset.CalculateOffsets;
+var
+ i: integer;
+ lField: TField;
+ llen: cardinal;
+begin
+ if not FStoreStringsAsReference then begin
+ for i := 0 to FieldCount - 1 do
+ with Fields[i] do
+ if (DataType in ft_Strings) and (Size >= MaxStringSizeInline) then begin
+ FStoreStringsAsReference := True;
+ Break;
+ end;
+ end;
+ SetLength(FOffsets, FieldCount + 1);
+ SetLength(FDataSizeArray,FieldCount);
+ SetLength(FDataTypeArray,FieldCount);
+ // FOffsets[FieldCount+1] = BookMarkOffset
+ FNullMaskSize := (FieldCount + 7) div 8;
+ FOffsets[0] := FNullMaskSize;
+ FHasReferencedFields := FStoreStringsAsReference;
+ for i := 0 to FieldCount - 1 do begin
+ lField := Fields[i];
+ FDataTypeArray[i]:=lField.DataType;
+ llen:=CalcFieldLen(lField.DataType,lField.Size);
+ FDataSizeArray[i] := llen;
+ FOffsets[i + 1] := FOffsets[i] + llen;
+ FHasReferencedFields := FHasReferencedFields or IsReferencedField(lField.DataType);
+ end;
+ FNativeRecordSize := FOffsets[FieldCount];
+
+ //
+
+// FBookMarkOffset := FNativeRecordSize;
+// FCalculatedOffset := FBookMarkOffset + SizeOf(TRecInfo);
+// FDatasetBufferSize := FCalculatedOffset + CalcFieldsSize;
+ FDatasetBufferSize := SizeOf(TMemDatasetrecord)+CalcFieldsSize;
+end;
+
+procedure TDAMemoryDataset.ClearFieldByFieldType(FieldBuffer: pointer; ADataType: TFieldType);
+begin
+ case ADataType of
+ ftString, ftFixedChar: begin
+ PAnsiString(FieldBuffer)^ := '';
+ PPointer(FieldBuffer)^ := nil;
+ end;
+ ftWideString: begin
+ PWideString(FieldBuffer)^ := '';
+ PPointer(FieldBuffer)^ := nil;
+ end;
+ else
+ if ADataType in ft_BlobTypes then begin
+ FreeBlobRecord(PPointer(FieldBuffer)^);
+ PPointer(FieldBuffer)^ := nil;
+ end;
+ end;
+end;
+
+procedure TDAMemoryDataset.ClearBin2Field(Buffer: Dataset_PAnsiChar; AField: TField);
+begin
+ if GetNullMask(Buffer, AField.Index) then Exit;
+ if IsReferencedField(AField.DataType) then
+ ClearFieldByFieldType(IntFindFieldData(Buffer, AField, True), AField.DataType);
+ SetNullMask(Buffer, AField.Index, True);
+end;
+
+procedure TDAMemoryDataset.ClearRecords;
+var
+ aList: TMemList;
+begin
+ FDataList.Clear;
+{$IFDEF MEM_PACKETRECORDS}
+ PackedRecordListClear;
+{$ENDIF MEM_PACKETRECORDS}
+ UnregisterAllClients;
+ AList := FRecordsList.LockListForWriting;
+ try
+ MemList_ClearRecords(aList);
+ finally
+ FRecordsList.UnlockListForWriting;
+ end;
+end;
+
+constructor TDAMemoryDataset.Create(AOwner: TComponent);
+begin
+ inherited;
+{$IFDEF MEM_PACKETRECORDS}
+ fPackedMode := False;
+{$ENDIF MEM_PACKETRECORDS}
+ FRecordsList := TThreadMemList.Create;
+ FDataList := TMemList.Create;
+ FMasterDataLink := TMasterDataLink.Create(Self);
+ FMasterDataLink.OnMasterChange := MasterChanged;
+ FMasterDataLink.OnMasterDisable := MasterDisabled;
+ f_DefaultIndexRecord := TDAMemIndex.Create(Self);
+// FIndexFieldNameList := TList.Create;
+// FIndexCaseInsList := TList.Create;
+// FIndexDescFields := TList.Create;
+ FDetailsFieldNameList := TList.Create;
+
+ {$IFDEF MSWINDOWS}
+ FSortLocale := LOCALE_USER_DEFAULT;
+ {$ENDIF MSWINDOWS}
+ FStoreStringsAsReference:=False;
+ FExpressionEvaluator:= TDAStdExpressionEvaluator.Create;
+ FExpressionEvaluator.OnGetValue := EEGetValue;
+ FExpressionEvaluator.UseWildcardsInEqual:= True; // FilterOptions = []
+ FExpressionEvaluator.StringCaseInsensitive:= False; // FilterOptions = []
+ fUseIndexinLocate:=True;
+ FIndexList := TList.Create;
+ FAutoCompactRecords := False;
+end;
+
+function TDAMemoryDataset.CreateBlobStream(Field: TField;
+ Mode: TBlobStreamMode): TStream;
+begin
+ Result := TDABlobStream.Create(TBlobField(Field), Mode);
+end;
+
+destructor TDAMemoryDataset.Destroy;
+begin
+ inherited;
+ IndexList_Clear;
+ FDetailsFieldNameList.Free;
+ FExpressionEvaluator.Free;
+// FIndexFieldNameList.Free;
+// FIndexCaseInsList.Free;
+// FIndexDescFields.Free;
+ f_DefaultIndexRecord.Free;
+ FMasterDataLink.Free;
+ FIndexList.Free;
+ FDataList.Free;
+ FRecordsList.Free;
+ FIndexDefs.Free;
+ if FCloneClientList <> nil then FCloneClientList.Free;
+end;
+
+procedure TDAMemoryDataset.DuplicateBuffer(Source, Dest: PMemDatasetrecord_Native;ACanPack:boolean);
+var
+ i: Cardinal;
+ p, p2: PBlobRecord;
+ lbin3: Dataset_PAnsiChar;
+begin
+{$IFDEF MEMDATASET_DEBUG}
+// if not ((Source.Ident in [mrEmpty..mrBin3Style]) and(Dest.Ident in [mrEmpty..mrBin3Style])) then DatabaseError('TDAMemoryDataset.DuplicateBuffer: Data are damaged');
+{$ENDIF MEMDATASET_DEBUG}
+ case Source.Ident of
+ mrEmpty: begin
+ case Dest.Ident of
+ mrEmpty :;
+ mrBin2Style: FreeBin2Buffer(Dest.Data);
+ mrBin3Style: FreeBin3Buffer(Dest.Data);
+ end;
+ Dest.Data := nil;
+ Dest.Ident := mrEmpty;
+ end;
+ mrBin3Style: begin
+ I := GetBin3Offset(Source.Data, FieldCount);
+ {$IFDEF USE_REALLOC}
+ case Dest.Ident of
+ mrEmpty : Dest.Data := CreateBin3Struct(i);
+ mrBin2Style: begin
+ ClearBin2Buffer(Dest.Data);
+ if i < FNativeRecordSize then begin
+ ReallocMem(Dest.Data,i);
+ end
+ else begin
+ FreeMem(Dest.Data);
+ Dest.Data := CreateBin3Struct(i);
+ end;
+ end;
+ mrBin3Style: begin
+ if i <= GetBin3Offset(Dest.Data, FieldCount) then begin
+ ReallocMem(Dest.Data,i)
+ end
+ else begin
+ FreeMem(Dest.Data);
+ Dest.Data := CreateBin3Struct(i);
+ end;
+ end;
+ end;
+ {$ELSE}
+ case Dest.Ident of
+ mrBin2Style: FreeBin2Buffer(Dest.Data);
+ mrBin3Style: FreeBin3Buffer(Dest.Data);
+ end;
+ Dest.Data := CreateBin3Struct(i);
+ {$ENDIF}
+ Move(pointer(Source.Data)^, pointer(Dest.Data)^, i);
+ Dest.Ident := mrBin3Style;
+ end;
+ mrBin2Style: begin
+ if Dest.Ident = mrBin3Style then FreeBin3Buffer(Dest.Data);
+ if ACanPack and FAutoCompactRecords then
+ lbin3 := Bin2ToBin3(Source.Data)
+ else
+ lbin3 := nil;
+ if lbin3 <> nil then begin
+ if Dest.Ident = mrBin2Style then FreeBin2Buffer(Dest.Data);
+ Dest.Ident := mrBin3Style;
+ Dest.Data := lbin3;
+ end
+ else begin
+ if Dest.Ident = mrBin2Style then
+ ClearBin2Buffer(Dest.Data)
+ else
+ Dest.Data := CreateBin2Struct;
+ Dest.Ident := mrBin2Style;
+ if not FHasReferencedFields then begin
+ Move(pointer(Source.Data)^, pointer(Dest.Data)^, FNativeRecordSize);
+ end
+ else begin
+ Move(pointer(Source.Data)^, pointer(Dest.Data)^, FNullMaskSize);
+
+ for I := 0 to FieldCount - 1 do begin
+ if (not GetNullMask(Source.Data, i)) then begin
+ if not IsReferencedField(FDataTypeArray[i]) then begin
+ Move(pointer(Source.Data + FOffsets[i])^, pointer(Dest.Data + FOffsets[i])^, FDataSizeArray[i])
+ end
+ else begin
+ case FDataTypeArray[i] of
+ ftString,ftFixedChar: PAnsiString(Dest.Data + FOffsets[i])^ := PAnsiString(Source.Data + FOffsets[i])^;
+ ftWideString: PWideString(Dest.Data + FOffsets[i])^ := PWideString(Source.Data + FOffsets[i])^;
+ else
+ if FDataTypeArray[i] in ft_BlobTypes then begin
+ p := PPointer(Source.Data + FOffsets[i])^;
+ if p <> nil then begin
+ p2 := CreateBlobRecord(PBlobRecord(p)^.size);
+ Move(pointer(p)^, pointer(p2)^, p^.size + SizeOf(TBlobRecord));
+ PPointer(Dest.Data + FOffsets[i])^ := p2;
+ end
+ else begin
+ SetNullMask(Dest.Data, i, True);
+ end;
+ end;
+ end;
+ end;
+ end;
+ end;
+ end;
+ end;
+ end;
+ end;
+end;
+
+procedure TDAMemoryDataset.EEGetValue(Sender: TDAExpressionEvaluator; const aIdentifier: string; out aValue: Variant);
+begin
+ aValue:= GetVarValueFromBuffer(FExpressionBuffer^.Data, FieldByName(aIdentifier), FExpressionBuffer^.Ident = mrBin2Style);
+end;
+
+procedure TDAMemoryDataset.ProcessFilter;
+begin
+ CheckBrowseMode;
+ DoFilterRecords;
+end;
+
+function TDAMemoryDataset.FilterRecord(buf: PMemDatasetrecord_Native; AUseEvent: Boolean): Boolean;
+begin
+ Result:=True;
+ if FRangeActive then begin
+ IntGetRecordList.LockListForReading;
+ try
+ Result := (CompareValues_Range(buf,FKeyBuffers[kiCurRangeStart]) >=0) and
+ (CompareValues_Range(buf,FKeyBuffers[kiCurRangeEnd]) <=0);
+ finally
+ IntGetRecordList.UnlockListForReading;
+ end;
+ end;
+ if Result and (Filter <> '') then begin
+ IntGetRecordList.LockListForReading;
+ try
+ FExpressionBuffer:=buf;
+ Result := FExpressionEvaluator.Evaluate(Filter);
+ finally
+ IntGetRecordList.UnlockListForReading;
+ end;
+ end;
+ if Result and AUseEvent and Assigned(OnFilterRecord) then OnFilterRecord(Self, Result);
+end;
+
+procedure TDAMemoryDataset.FreeRecordBuffer(var Buffer: Dataset_PAnsiChar);
+begin
+ FreeMemDatasetRecord(pointer(Buffer));
+ Buffer := nil;
+end;
+
+function TDAMemoryDataset.GetActiveRecBuf(var RecBuf: Dataset_PAnsiChar): Boolean;
+begin
+ case State of
+ dsBrowse:
+ if IsEmpty then
+ RecBuf := nil
+ else
+ RecBuf := ActiveBuffer;
+ dsEdit, dsInsert, dsNewValue: RecBuf := ActiveBuffer;
+ dsCalcFields: RecBuf := CalcBuffer;
+ dsFilter: RecBuf := FFilterBuffer;
+ dsSetKey: RecBuf := Dataset_PAnsiChar(FKeyBuffer) + SizeOf(TMemKeyBuffer);
+ else
+ RecBuf := nil;
+ end;
+ Result := RecBuf <> nil;
+end;
+
+procedure TDAMemoryDataset.GetBookmarkData(Buffer: Dataset_PAnsiChar; Data: Pointer);
+begin
+ Move(PMemDatasetrecord(Buffer)^.BookmarkData.Bookmark, Data^, SizeOf(TBookmarkData));
+end;
+
+function TDAMemoryDataset.GetBookmarkFlag(Buffer: Dataset_PAnsiChar): TBookmarkFlag;
+begin
+ Result := PMemDatasetrecord(Buffer)^.BookmarkData.BookmarkFlag;
+end;
+
+function TDAMemoryDataset.GetFieldData(Field: TField; Buffer: Pointer): Boolean;
+var
+ RecBuf: Dataset_PAnsiChar;
+ Data: Dataset_PAnsiChar;
+ // VarData : Variant;
+ Len: integer;
+ k,k1: Cardinal;
+begin
+ Result := False;
+ {$IFDEF FPC}
+ RecBuf := nil;
+ {$ENDIF FPC}
+ if not GetActiveRecBuf(RecBuf) then Exit;
+ Result := (PMemDatasetrecord_Native(RecBuf)^.Ident in [mrBin2Style, mrBin3Style]) and
+ (Field.DataType in ft_Supported) and
+ not GetNullMask(PMemDatasetrecord_Native(RecBuf)^.Data, Field.Index);
+ if Result and (Buffer <> nil) then begin
+ case PMemDatasetrecord_Native(RecBuf)^.Ident of
+ mrBin2Style: begin
+ Data := PMemDatasetrecord_Native(RecBuf)^.Data + FOffsets[Field.Index];
+ if Data = nil then begin
+ Result:=False;
+ Exit;
+ end;
+ {if Field.DataType = ftVariant then
+ begin
+ VarData := PVariant(Data)^;
+ PVariant(Buffer)^ := VarData;
+ end
+ else}
+ if not IsReferencedField(Field.DataType) then begin
+ Move(Data^, Buffer^, FDataSizeArray[Field.Index])
+ end else begin
+ case Field.DataType of
+ ftString,ftFixedChar: begin
+ len := Length(PAnsiString(Data)^);
+ if Len > Field.Size then Len := Field.Size;
+ Move(pointer(PAnsiString(Data)^)^, buffer^, len*SizeOf(AnsiChar));
+ PAnsiChar(buffer)[Len] := #0;
+ end;
+ ftWideString: begin
+ len := Length(PWideString(Data)^);
+ if Len > Field.Size then Len := Field.Size;
+ Move(pointer(PWideString(Data)^)^, buffer^, len * sizeOf(WideChar));
+ PWideChar(buffer)[Len] := #0;
+ end;
+ else
+ if Field.DataType in ft_BlobTypes then DatabaseError('GetFieldData: BlobType');
+ end;
+ end;
+ end;
+ mrBin3Style: begin
+ Data :=PMemDatasetrecord_Native(RecBuf)^.Data;
+ k := GetBin3Offset(Data,Field.Index);
+ k1 := GetBin3Offset(Data,Field.Index+1);
+ Move((Data+k)^, buffer^, k1-k);
+ end;
+ end;
+ end;
+end;
+
+function TDAMemoryDataset.GetRecNo: Integer;
+begin
+ UpdateCursorPos;
+ if (FRecordPos = -1) and (RecordCount > 0) then
+ Result := 1
+ else
+ Result := FRecordPos + 1;
+end;
+
+function TDAMemoryDataset.InternalGetRecord(Buffer: PMemDatasetRecord; GetMode: TGetMode;
+ DoCheck: Boolean): TGetResult;
+begin
+ if Buffer = nil then begin
+ Result := grError;
+ Exit;
+ end;
+
+ Result := grOk;
+ case GetMode of
+ gmCurrent: begin
+ if (FRecordPos = -1) and (RecordCount > 0) then FRecordPos := 0;
+ if (FRecordPos < 0) or (FRecordPos >= RecordCount) then Result := grError;
+ end;
+ gmPrior:
+ if FRecordPos <= 0 then begin
+ Result := grBOF;
+ FRecordPos := -1;
+ end
+ else
+ Dec(FRecordPos);
+ gmNext:
+ if FRecordPos >= RecordCount - 1 then
+ Result := grEOF
+ else
+ Inc(FRecordPos);
+ end;
+ if Result = grOk then begin
+ RecordToBuffer(FRecordPos, Buffer);
+ GetCalcFields(Dataset_PAnsiChar(Buffer));
+ end
+ else if (Result = grError) and DoCheck then
+ DatabaseError('No data found');
+end;
+
+function TDAMemoryDataset.GetRecordCount: Integer;
+begin
+ Result := FDataList.Count;
+end;
+
+function TDAMemoryDataset.GetRecordSize: Word;
+begin
+ Result := FDatasetBufferSize;
+end;
+
+function TDAMemoryDataset.GetVarValueFromBuffer(Buffer: pointer; Field: TField; abin2: boolean): variant;
+var
+ buf: PAnsiChar;
+ p: pointer;
+ lLen: cardinal;
+begin
+ if GetNullMask(Buffer,Field.Index) then begin
+ Result := Null;
+ end
+ else begin
+ buf := IntFindFieldData(Buffer,Field,aBin2);
+ case Field.DataType of
+ ftString, ftFixedChar: begin
+ if abin2 and FStoreStringsAsReference then
+ Result := PAnsistring(Buf)^
+ else
+ Result := Ansistring(PAnsiChar(Buf));
+ end;
+ ftWideString: begin
+ if abin2 and FStoreStringsAsReference then
+ Result := PWidestring(Buf)^
+ else
+ Result := WideString(PWideChar(Buf))
+ end;
+ ftSmallint: Result := PSmallint(buf)^;
+ ftInteger, ftDate, ftTime, ftAutoInc: Result := PInteger(buf)^;
+ ftWord: Result := PWord(buf)^;
+ ftBoolean: Result := PWordBool(buf)^;
+ ftFloat, ftCurrency: Result := PDouble(Buf)^;
+ ftDateTime: Result := TimeStampToDateTime(MSecsToTimeStamp({$IFDEF FPC}Trunc{$ENDIF}( PDateTime(Buf)^)));
+ ftBcd: Result := PCurrency(buf)^;
+ ftFMTBCD: Result := BCDToVariant(PBcd(buf)^);
+ ftLargeint: Result := PInt64(Buf)^;
+ {$IFNDEF FPC}
+ ftTimeStamp: Result := VarSQLTimeStampCreate(PSQLTimeStamp(Buf)^);
+ {$ENDIF FPC}
+ ftGuid: Result:= AnsiString(PAnsiChar(Buf));
+ else
+ if abin2 then
+ lLen:=PBLOBRecord(buf)^.size
+ else
+ lLen := GetBin3Offset(Buffer, Field.Index+1)-GetBin3Offset(Buffer, Field.Index);
+ Result := VarArrayCreate([0,lLen-1],varByte);
+ p := VarArrayLock(Result);
+ try
+ if abin2 then
+ move(PBLOBRecord(buf)^.Data, p^,PBLOBRecord(buf)^.size)
+ else
+ Move(buf^, p^, lLen);
+ finally
+ VarArrayUnlock(Result);
+ end;
+ end;
+ end;
+end;
+
+procedure TDAMemoryDataset.IntAssignRecord(Source, Dest: PMemDatasetrecord_Native);
+begin
+ if State = dsFilter then DatabaseError(SNotEditing);
+ DuplicateBuffer(Source, Dest,True);
+end;
+
+
+procedure TDAMemoryDataset.InternalAddRecord(Buffer: Pointer; Append: Boolean);
+var
+ RecPos: Integer;
+ Rec: PMemDatasetrecord_Native;
+begin
+ Rec := CreateMemDatasetRecord(mrEmpty,0,False);
+ if Append then
+ RecPos := FDataList.Add(Rec)
+ else begin
+ if FRecordPos = -1 then
+ RecPos := 0
+ else
+ RecPos := FRecordPos;
+ FDataList.Insert(RecNo, Rec);
+ end;
+ FRecordPos := RecPos;
+ // SetAutoIncFields(Buffer);
+ IntAssignRecord(Buffer, Rec);
+ IntInsertBuffer(Rec);
+end;
+
+procedure TDAMemoryDataset.InternalClose;
+var
+ i: integer;
+begin
+ f_DefaultIndexRecord.Clear;
+ For i:=0 to FIndexList.Count-1 do
+ TDAMemIndex(FIndexList[i]).Clear;
+
+// FIndexFieldNameList.Clear;
+// FIndexCaseInsList.Clear;
+// FIndexDescFields.Clear;
+ UnregisterClient(Self);
+ ClearRecords;
+ FreeKeyBuffers;
+ FCloneSource := nil;
+ BindFields(False);
+ if DefaultFields then DestroyFields;
+ SetLength(FDataTypeArray,0);
+ SetLength(FOffsets, 0);
+ SetLength(FDataSizeArray,0);
+ FActive := False;
+end;
+
+procedure TDAMemoryDataset.InternalDelete;
+var
+ f: boolean;
+begin
+ IntRemoveBuffer(FDataList.Items[FRecordPos]);
+ f := f_DefaultIndexRecord.LastSorted > FLastUpdate;
+ FLastUpdate := Now;
+ if f then f_DefaultIndexRecord.LastSorted :=Now;
+end;
+
+procedure TDAMemoryDataset.InternalFirst;
+begin
+ FRecordPos := -1;
+end;
+
+procedure TDAMemoryDataset.InternalGotoBookmark(Bookmark: Pointer);
+var
+ lRecNo: Integer;
+begin
+ lRecNo := IntFindRecordID(TBookMarkData(PPointer(Bookmark)^));
+ if lRecNo <> -1 then
+ FRecordPos := lRecNo
+ else
+ DatabaseError('Bookmark not found');
+end;
+
+procedure TDAMemoryDataset.InternalHandleException;
+begin
+ {$IFDEF FPC}
+ inherited;
+ {$ELSE}
+ Application.HandleException(Self);
+ {$ENDIF}
+end;
+
+procedure TDAMemoryDataset.InternalInitFieldDefs;
+begin
+ // inherited InternalInitFieldDefs;
+end;
+
+procedure TDAMemoryDataset.InternalInitRecord(Buffer: Dataset_PAnsiChar);
+begin
+ with PMemDatasetrecord_Native(Buffer)^ do begin
+ case Ident of
+ mrEmpty:;
+ mrBin2Style: FreeBin2Buffer(Data);
+ mrBin3Style: FreeBin3Buffer(Data);
+ end;
+ Ident := mrEmpty;
+ Data := nil;
+ end;
+end;
+
+procedure TDAMemoryDataset.InternalLast;
+begin
+ FRecordPos := RecordCount;
+end;
+
+procedure TDAMemoryDataset.InternalOpen;
+begin
+ BookmarkSize := SizeOf(TBookmarkData);
+ FieldDefs.Update;
+ IndexDefs.Updated := False;
+ if DefaultFields then CreateFields;
+ BindFields(True);
+ CalculateOffsets;
+ RegisterClient(Self);
+ AllocKeyBuffers;
+ FLastUpdate:=Now;
+ if FDetailFields <> '' then InitDetailFieldNamesList;
+ if FIndexName <> '' then f_DefaultIndexRecord.Init(GetIndexFields);
+ DoFilterRecords;
+ InternalFirst;
+end;
+
+procedure TDAMemoryDataset.InternalPost;
+var
+ Rec: Pointer;
+begin
+{$IFDEF DELPHI6UP}
+ inherited InternalPost;
+{$ENDIF}
+ if State = dsEdit then begin
+ Rec:=FDataList[FRecordPos];
+ IntGetRecordList.LockListForWriting;
+ try
+ IntAssignRecord(pointer(ActiveBuffer), Rec);
+ finally
+ IntGetRecordList.UnlockListForWriting;
+ end;
+ IntUpdateBuffer(Rec);
+ end
+ else begin
+ // if State in [dsInsert] then SetAutoIncFields(ActiveBuffer);
+ Rec := CreateMemDatasetRecord(mrEmpty,0,False);
+ IntAssignRecord(Pointer(ActiveBuffer), Rec);
+ intInsertRecord(Rec);
+ IntInsertBuffer(Rec);
+ end;
+ FLastUpdate := now;
+end;
+
+procedure TDAMemoryDataset.InternalSetFieldData(Field: TField; Buffer: Pointer);
+var
+ RecBuf: Dataset_PAnsiChar;
+ Data: PAnsiChar;
+ nativeData: Dataset_PAnsiChar;
+begin
+ {$IFDEF FPC}
+ RecBuf := nil;
+ {$ENDIF FPC}
+ GetActiveRecBuf(RecBuf);
+ ConvertBin3ToBin2Record(PMemDatasetrecord_Native(RecBuf));
+ with Field do begin
+ if State = dsSetKey then
+ nativeData := RecBuf
+ else
+ nativeData := PMemDatasetrecord_Native(RecBuf)^.Data;
+ Data := IntFindFieldData(nativeData, Field, True);
+ if Data <> nil then begin
+ {
+ if DataType = ftVariant then begin
+ if Buffer <> nil then
+ VarData := PVariant(Buffer)^
+ else
+ VarData := EmptyParam;
+ PVariant(Data)^ := VarData;
+ end else
+ }
+ if not IsReferencedField(DataType) then begin
+ if Buffer <> nil then begin
+ Move(Buffer^, Data^, FDataSizeArray[Field.Index]);
+ SetNullMask(nativeData, Index, False);
+ end
+ else
+ SetNullMask(nativeData, Index, True);
+ end
+ else begin
+ if Buffer <> nil then begin
+ if DataType in [ftString,ftFixedChar] then begin
+ PAnsiString(Data)^ := PAnsiChar(buffer);
+ SetNullMask(nativeData, Index, False);
+ end
+ else if DataType = ftWideString then begin
+ PWideString(Data)^ := PWideChar(buffer);
+ SetNullMask(nativeData, Index, False);
+ end;
+ end
+ else
+ SetNullMask(nativeData, Index, True);
+ end;
+ end;
+ end;
+end;
+
+procedure TDAMemoryDataset.InternalSetToRecord(Buffer: Dataset_PAnsiChar);
+begin
+ InternalGotoBookmark(@PMemDatasetRecord(Buffer)^.BookmarkData.Bookmark);
+end;
+
+function TDAMemoryDataset.IntFindFieldData(Buffer: Dataset_PAnsiChar;
+ Field: TField; aBin2: Boolean): Pointer;
+begin
+ if (Buffer <> nil) and (Field.DataType in ft_Supported) then begin
+ if aBin2 then
+ Result := (Buffer + FOffsets[Field.Index])
+ else
+ Result := Buffer + GetBin3Offset(Buffer,Field.Index);
+ end
+ else
+ Result := nil;
+end;
+
+function TDAMemoryDataset.IntFindFieldData(Buffer: PMemDatasetrecord_Native;Field: TField): Pointer;
+begin
+ if (Buffer <> nil) then
+ Result := IntFindFieldData(Buffer^.Data,Field, Buffer^.Ident = mrBin2Style)
+ else
+ Result := nil;
+end;
+
+function TDAMemoryDataset.IntFindRecordID(Buf: pointer): Integer;
+begin
+ Result := FDataList.IndexOf(Buf);
+end;
+
+function TDAMemoryDataset.IsActiveFilter: Boolean;
+begin
+ Result := (Filtered and (Filter <> '')) or FRangeActive;
+end;
+
+function TDAMemoryDataset.IsCursorOpen: Boolean;
+begin
+ Result := FActive;
+end;
+
+function TDAMemoryDataset.IsReferencedField(ADataType: TFieldType): Boolean;
+begin
+ Result:= (FStoreStringsAsReference and (ADataType in ft_Strings)) or
+ (ADataType in ft_BlobTypes);
+end;
+
+procedure TDAMemoryDataset.OpenCursor(InfoQuery: Boolean);
+var
+ i: integer;
+ lfld, lfld2: TField;
+begin
+ if not InfoQuery then begin
+ if FCloneSource <> nil then begin
+ Fields.Clear;
+ // creating
+ FieldDefs.Assign(FCloneSource.FieldDefs);
+ for i:=0 to FieldDefs.Count-1 do
+ FieldDefs[i].CreateField(Self).DataSet := Self;
+ // creating lookups
+ For i:=0 to FCloneSource.Fields.Count-1 do begin
+ lfld2 := FCloneSource.Fields[i];
+ if lfld2.FieldKind in [fkCalculated,fkLookup] then begin
+ lfld := TField(lfld2.NewInstance).Create(Self);
+ lfld.Name := Self.Name + lfld2.FieldName;
+ lfld.FieldName := lfld2.FieldName;
+ lfld.DataSet := Self;
+ if (lfld2 is TStringField) or (lfld2 is TWideStringField) then lfld.Size := lfld2.Size;
+ lfld.FieldKind := lfld2.FieldKind;
+ lfld.Required := lfld2.Required;
+ {$IFNDEF FPC}
+ lfld.Lookup := lfld2.Lookup;
+ {$ENDIF}
+ lfld.LookupDataSet := lfld2.LookupDataSet;
+ lfld.LookupKeyFields := lfld2.LookupKeyFields;
+ lfld.LookupCache := lfld2.LookupCache;
+ lfld.LookupResultField := lfld2.LookupResultField;
+ lfld.KeyFields := lfld2.KeyFields;
+ end;
+ end;
+ for i := 0 to FCloneSource.Fields.Count-1 do
+ FieldByName(FCloneSource.Fields[i].FieldName).Index := i + 1;
+ end
+ else begin
+ if FieldCount > 0 then FieldDefs.Clear;
+ InitFieldDefsFromFields;
+ end;
+ FExpressionEvaluator.UseTrueFalseinVariableName:=False;
+ For i:=0 to Fields.Count-1 do begin
+ // eugene: 20080407 - SameText
+ if SameText(Fields[i].FieldName,'True') or SameText(Fields[i].FieldName,'False') then begin
+ FExpressionEvaluator.UseTrueFalseinVariableName:=True;
+ Break;
+ end;
+ end;
+ end;
+ FActive := True;
+ inherited OpenCursor(InfoQuery);
+end;
+
+function TDAMemoryDataset.GetNullMask(Buffer: Dataset_PAnsiChar; const AIndex: Integer): boolean;
+begin
+ Result := (ord(Buffer[AIndex shr 3]) shr (AIndex and 7)) and 1 = 1;
+end;
+
+procedure TDAMemoryDataset.RecordToBuffer(RecNo: integer; Buffer: PMemDatasetRecord);
+begin
+ IntGetRecordList.LockListForReading;
+ try
+ with Buffer^.BookmarkData do begin
+ Bookmark := TBookmarkData(FDataList[RecNo]);
+ BookmarkFlag := bfCurrent;
+ end;
+ DuplicateBuffer(FDataList[RecNo], Pointer(Buffer),False);
+ finally
+ IntGetRecordList.UnlockListForReading;
+ end;
+end;
+
+procedure TDAMemoryDataset.SetAnsiString(NativeBuf: Pointer; Field: TField;
+ const Value: Ansistring);
+var
+ len: integer;
+begin
+ if FStoreStringsAsReference then
+ PAnsiString(NativeBuf)^:=Value
+ else begin
+ len := Length(Value);
+ if Len > Field.Size then len:= Field.Size;
+ move(Pointer(Value)^,NativeBuf^,len*SizeOf(AnsiChar));
+ PAnsiChar(NativeBuf)[len]:=#0;
+ end;
+end;
+
+procedure TDAMemoryDataset.SetBlobData(Field: TField; Buffer: PMemDatasetrecord_Native;
+ Value: PBLOBRecord);
+begin
+ ConvertBin3ToBin2Record(Buffer);
+ if PPointer(Buffer.Data + FOffsets[Field.Index])^ <> Value then begin
+ FreeBlobRecord(PPointer(Buffer.Data + FOffsets[Field.Index])^);
+ PPointer(Buffer.Data + FOffsets[Field.Index])^ := Value;
+ SetNullMask(Buffer.Data, Field.Index, False);
+ end;
+end;
+
+procedure TDAMemoryDataset.SetBookmarkData(Buffer: Dataset_PAnsiChar; Data: Pointer);
+begin
+ Move(Data^, PMemDatasetRecord(Buffer)^.BookmarkData.Bookmark, SizeOf(TBookmarkData));
+end;
+
+procedure TDAMemoryDataset.SetBookmarkFlag(Buffer: Dataset_PAnsiChar; Value: TBookmarkFlag);
+begin
+ PMemDatasetRecord(Buffer)^.BookmarkData.BookmarkFlag := Value;
+end;
+
+procedure TDAMemoryDataset.SetFieldData(Field: TField; Buffer: Pointer);
+begin
+ if (State = dsSetKey) and ((Field.FieldNo < 0) or f_DefaultIndexRecord.IsValid and not Field.IsIndexField) then DatabaseErrorFmt(SNotIndexField, [Field.DisplayName]);
+ if not (State in dsWriteModes) then DatabaseError(SNotEditing);
+ with Field do begin
+ if FieldNo > 0 then begin
+ if State in [dsCalcFields, dsFilter] then DatabaseError(SNotEditing);
+ if ReadOnly and not (State in [dsSetKey, dsFilter]) then DatabaseErrorFmt({$IFDEF FPC}SReadOnlyField{$ELSE}SFieldReadOnly{$ENDIF}, [DisplayName]);
+ Validate(Buffer);
+ end;
+ if FieldKind <> fkInternalCalc then begin
+ InternalSetFieldData(Field, Buffer);
+ end;
+ if not (State in [dsCalcFields, dsInternalCalc, dsFilter, dsNewValue]) then DataEvent(deFieldChange, Longint(Field));
+ end;
+end;
+
+procedure TDAMemoryDataset.SetNullMask(Buffer: Dataset_PAnsiChar; const AIndex: Integer; const Value: boolean);
+var
+ i: byte;
+begin
+ i := AIndex shr 3;
+ if Value then
+ Buffer[I] := {$IFNDEF DELPHI2008UP}AnsiChar{$ENDIF}(ord(Buffer[I]) or (1 shl (AIndex and 7)))
+ else
+ Buffer[I] := {$IFNDEF DELPHI2008UP}AnsiChar{$ENDIF}(ord(Buffer[I]) and not (1 shl (AIndex and 7)))
+end;
+
+procedure TDAMemoryDataset.SetOnFilterRecord(const Value: TFilterRecordEvent);
+begin
+ inherited;
+ if Active and Filtered then First;
+end;
+
+procedure TDAMemoryDataset.SetRecNo(Value: Integer);
+begin
+ if (Value > 0) and (Value <= RecordCount) then begin
+ DoBeforeScroll;
+ FRecordPos := Value - 1;
+ Resync([]);
+ DoAfterScroll;
+ end;
+end;
+
+procedure TDAMemoryDataset.DataConvert(Field: TField; Source,
+ Dest: Pointer; ToNative: Boolean);
+{$IFNDEF DELPHI10UP}
+var
+ len: integer;
+{$ENDIF DELPHI10UP}
+begin
+ Case Field.Datatype of
+ ftBCD: PCurrency(Dest)^ := PCurrency(Source)^;
+{$IFNDEF DELPHI10UP}
+ ftWideString: begin
+ if ToNative then begin
+ len := Length(PWideString(Source)^);
+ Move(PWideChar(Source^)^, PWideChar(Dest)^, len * SizeOf(WideChar));
+ PWideChar(Dest)[Len] := #0;
+ end
+ else begin
+ len := Length(PWideChar(Source));
+ SetString(WideString(Dest^), PWideChar(Source), Len);
+ end;
+ end
+{$ENDIF DELPHI10UP}
+ else
+ inherited DataConvert(Field, Source, Dest, ToNative);
+ end;
+end;
+
+function TDAMemoryDataset.GetDataSource: TDataSource;
+begin
+ Result := MasterDataLink.DataSource;
+end;
+
+function TDAMemoryDataset.GetMasterFields: string;
+begin
+ Result := MasterDataLink.FieldNames;
+end;
+
+{$IFDEF FPC}
+const
+ SCircularDataLink = 'Circular datalinks are not allowed';
+{$ENDIF}
+procedure TDAMemoryDataset.SetDataSource(const Value: TDataSource);
+begin
+ if IsLinkedTo(Value) then DatabaseError(SCircularDataLink, Self);
+ if MasterDataLink.DataSource <> Value then DataEvent(dePropertyChange, 0);
+ MasterDataLink.DataSource := Value;
+end;
+
+procedure TDAMemoryDataset.SetMasterFields(const Value: string);
+begin
+ if (Value <> '') and (Filter <> '') then DatabaseError(SNoDetailFilter, Self);
+ if MasterDataLink.FieldNames <> Value then DataEvent(dePropertyChange, 0);
+ MasterDataLink.FieldNames := Value;
+end;
+
+function TDAMemoryDataset.GetIndexFieldNames: string;
+begin
+ if FFieldsIndex then Result := FIndexName else Result := '';
+end;
+
+procedure TDAMemoryDataset.SetIndexFieldNames(const Value: string);
+begin
+ SetIndex(Value, True);
+end;
+
+function TDAMemoryDataset.GetRecord(Buffer: Dataset_PAnsiChar; GetMode: TGetMode;
+ DoCheck: Boolean): TGetResult;
+var
+ Accept: Boolean;
+ SaveState: TDataSetState;
+begin
+ if Filtered and Assigned(OnFilterRecord) then begin
+ FFilterBuffer := Buffer;
+ SaveState := SetTempState(dsFilter);
+ try
+ Accept := True;
+ repeat
+ Result := InternalGetRecord(Pointer(Buffer), GetMode, DoCheck);
+ if Result = grOK then begin
+ OnFilterRecord(Self, Accept);
+ if not Accept and (GetMode = gmCurrent) then
+ Result := grError;
+ end;
+ until Accept or (Result <> grOK);
+ except
+ ApplicationHandleException(Self);
+ Result := grError;
+ end;
+ RestoreState(SaveState);
+ end else
+ Result := InternalGetRecord(Pointer(Buffer), GetMode, DoCheck)
+end;
+
+procedure TDAMemoryDataset.SetFiltered(Value: Boolean);
+begin
+ if Active and (Value <> Filtered) then begin
+ inherited;
+ if (Filter <> '') then
+ ProcessFilter
+ else if Assigned(OnFilterRecord) then First;
+ end
+ else
+ inherited;
+end;
+
+procedure TDAMemoryDataset.SetFilterOptions(Value: TFilterOptions);
+begin
+ if (Value <> FilterOptions) then begin
+ inherited;
+ FExpressionEvaluator.StringCaseInsensitive := foCaseInsensitive in FilterOptions;
+ FExpressionEvaluator.UseWildcardsInEqual := not (foNoPartialCompare in FilterOptions);
+ if Active and Filtered then ProcessFilter;
+ end;
+end;
+
+procedure TDAMemoryDataset.SetFilterText(const Value: string);
+begin
+ if Active and Filtered and (Value <> Filter) then begin
+ inherited;
+ ProcessFilter;
+ end
+ else
+ inherited;
+end;
+
+procedure TDAMemoryDataset.DoSort(AIndex: TDAMemIndex);
+var
+ pos: TBookmarkData;
+ lRecList:TThreadMemList;
+ LList:TMemList;
+ lflag: boolean;
+ loldRangeActive: Boolean;
+begin
+ if Active and (FieldCount > 0) and (FDataList.Count <> 0) then begin
+ if AIndex = f_DefaultIndexRecord then begin
+ loldRangeActive := FRangeActive;
+ FRangeActive := False;
+ try
+ if (FRecordPos<>-1) and (FRecordPos >= FDataList.Count) then
+ pos := FDataList[FRecordPos]
+ else
+ pos := nil;
+ try
+ lRecList:=IntGetRecordList;
+ LList:=lRecList.LockListForReading;
+ try
+ lflag:=(not AIndex.IsValid) and (FDataList.Count = LList.Count);
+ if lFlag then
+ FDataList.Assign(LList)
+ else begin
+ QuickSort(0, FDataList.Count - 1, Compare, AIndex);
+ end;
+ finally
+ lRecList.UnlockListForReading;
+ end;
+ AIndex.LastSorted := Now;
+ SetBufListSize(0);
+ try
+ SetBufListSize(BufferCount + 1);
+ except
+ SetState(dsInactive);
+ CloseCursor;
+ raise;
+ end;
+ {$IFDEF FPC}
+ RecalcBufListSize;
+ {$ENDIF}
+ finally
+ if pos = nil then
+ FRecordPos := -1
+ else
+ FRecordPos := IntFindRecordID(pos);
+ if (FRecordPos = -1) and (RecordCount > 0) then FRecordPos := 0;
+ end;
+ finally
+ FRangeActive := loldRangeActive;
+ end;
+ Resync([]);
+ end
+ else begin
+ if AIndex.IsValid then begin
+ if FLastUpdate > AIndex.LastSorted then begin
+ AIndex.DataList.Assign(FDataList);
+ QuickSort(0, AIndex.DataList.Count - 1, Compare, AIndex);
+ AIndex.LastSorted := Now;
+ end;
+ end;
+ end;
+ end;
+end;
+
+procedure TDAMemoryDataset.QuickSort(L, R: Integer; SCompare: TDAMemDatasetCompare;AIndex: TDAMemIndex);
+var
+ I, J: Integer;
+ P: pointer;
+ llist: TMemList;
+begin
+ lList := AIndex.DataList;
+ repeat
+ I := L;
+ J := R;
+ P := lList[(L + R) shr 1];
+ repeat
+ while SCompare(lList[I], P, AIndex) < 0 do Inc(I);
+ while SCompare(lList[j], P, AIndex) > 0 do Dec(J);
+ if I <= J then begin
+ lList.Exchange(I, J);
+ Inc(I);
+ Dec(J);
+ end;
+ until I > J;
+ if L < J then QuickSort(L, J, SCompare, AIndex);
+ L := I;
+ until I >= R;
+end;
+
+function TDAMemoryDataset.Compare(i1, i2: PMemDatasetrecord_Native; AIndex: TDAMemIndex): Integer;
+var
+ buf1, buf2: Dataset_PAnsiChar;
+ i: integer;
+ Field: TField;
+ p1, p2: PAnsiChar;
+ lList: TMemList;
+ lbin2_1,lbin2_2: Boolean;
+begin
+ buf1 := i1^.Data;
+ buf2 := i2^.Data;
+ Result := 0;
+ if AIndex.IsValid then begin
+ lbin2_1 := i1^.Ident = mrBin2Style;
+ lbin2_2 := i2^.Ident = mrBin2Style;
+ for i := 0 to AIndex.IndexFieldNameList.Count - 1 do begin
+ Field := AIndex.IndexFieldNameList[i];
+ if not GetNullMask(buf1, Field.Index) then
+ p1 := intFindFieldData(buf1, Field, lbin2_1)
+ else
+ p1 := nil;
+ if not GetNullMask(buf2, Field.Index) then
+ p2 := intFindFieldData(buf2, Field, lbin2_2)
+ else
+ p2 := nil;
+ if (p1 <> nil) and (p2 <> nil) then begin
+ Result := CompareValues(p1, p2, Field.DataType, AIndex.IndexCaseInsList[i] <> nil, lBin2_1, lBin2_2)
+ end
+ else
+ if p1 <> nil then Result := 1
+ else if p2 <> nil then Result := -1
+ else continue;
+ if AIndex.IndexDescFields[i] <> nil then Result := -Result;
+ if Result <> 0 then Exit;
+ end;
+ end;
+ if Result = 0 then begin
+ lList:=IntGetRecordList.LockListForReading;
+ try
+ Result := lList.IndexOf(buf1) - lList.IndexOf(buf2);
+ finally
+ IntGetRecordList.UnlockListForReading;
+ end;
+ if AIndex.SortDescMode then Result := -Result;
+ end;
+end;
+
+function WordBoolCompare(val1, val2: WordBool): integer;
+begin
+ if val2 and not val1 then Result := -1
+ else if val1 and not val2 then Result := 1
+ else Result := 0;
+end;
+
+function Int64Compare(val1, val2: Int64): integer;
+begin
+ if val1 > val2 then Result := 1
+ else if val2 > val1 then Result := -1
+ else Result := 0;
+end;
+
+function IntegerCompare(val1, val2: integer): integer;
+begin
+ if val1 > val2 then Result := 1
+ else if val2 > val1 then Result := -1
+ else Result := 0;
+end;
+
+function DoubleCompare(val1, val2: double): integer;
+begin
+ if val1 > val2 then Result := 1
+ else if val2 > val1 then Result := -1
+ else Result := 0;
+end;
+
+function TDateTimeCompare(val1, val2: TDateTime): integer;
+begin
+ if val1 > val2 then Result := 1
+ else if val2 > val1 then Result := -1
+ else Result := 0;
+end;
+
+function CurrencyCompare(val1, val2: Currency): integer;
+begin
+ if val1 > val2 then Result := 1
+ else if val2 > val1 then Result := -1
+ else Result := 0;
+end;
+
+
+function TDAMemoryDataset.CompareValues(buf1, buf2: pointer;aDataType: TFieldType;aSortCaseInsensitive:Boolean; aBin2_1, aBin2_2: Boolean): integer;
+begin
+ Result := 0;
+ case aDataType of
+ ftString, ftFixedChar: begin
+ if FStoreStringsAsReference then begin
+ case (ord(aBin2_1) shl 1) or ord(aBin2_2) of
+ 0 { 00b }: Result:= ROAnsiCompare(PAnsiChar(Buf1),PAnsiChar(Buf2),aSortCaseInsensitive {$IFDEF MSWINDOWS},FSortLocale {$ENDIF MSWINDOWS});
+ 1 { 01b }: Result:= ROAnsiCompare(PAnsiChar(Buf1),PAnsiString(Buf2)^,aSortCaseInsensitive {$IFDEF MSWINDOWS},FSortLocale {$ENDIF MSWINDOWS});
+ 2 { 10b }: Result:= ROAnsiCompare(PAnsiString(Buf1)^,PAnsiChar(Buf2),aSortCaseInsensitive {$IFDEF MSWINDOWS},FSortLocale {$ENDIF MSWINDOWS});
+ 3 { 11b }: Result:= ROAnsiCompare(PAnsiString(Buf1)^,PAnsiString(Buf2)^,aSortCaseInsensitive {$IFDEF MSWINDOWS},FSortLocale {$ENDIF MSWINDOWS});
+ end;
+ end
+ else begin
+ Result:= ROAnsiCompare(PAnsiChar(Buf1),PAnsiChar(Buf2),aSortCaseInsensitive {$IFDEF MSWINDOWS},FSortLocale {$ENDIF MSWINDOWS});
+ end;
+ end;
+ ftWideString: begin
+ if FStoreStringsAsReference then begin
+ case (ord(aBin2_1) shl 1) OR ord(aBin2_2) of
+ 0 { 00b }: Result:= ROWideCompare(PWideChar(Buf1),PWideChar(Buf2),aSortCaseInsensitive {$IFDEF MSWINDOWS},FSortLocale {$ENDIF MSWINDOWS});
+ 1 { 01b }: Result:= ROWideCompare(PWideChar(Buf1),PWideString(Buf2)^,aSortCaseInsensitive {$IFDEF MSWINDOWS},FSortLocale {$ENDIF MSWINDOWS});
+ 2 { 10b }: Result:= ROWideCompare(PWideString(Buf1)^,PWideChar(Buf2),aSortCaseInsensitive {$IFDEF MSWINDOWS},FSortLocale {$ENDIF MSWINDOWS});
+ 3 { 11b }: Result:= ROWideCompare(PWideString(Buf1)^,PWideString(Buf2)^,aSortCaseInsensitive {$IFDEF MSWINDOWS},FSortLocale {$ENDIF MSWINDOWS});
+ end;
+ end
+ else begin
+ Result:= ROWideCompare(PWideChar(Buf1),PWideChar(Buf2),aSortCaseInsensitive {$IFDEF MSWINDOWS},FSortLocale {$ENDIF MSWINDOWS});
+ end;
+ end;
+ ftGuid: Result := StrLIComp(PAnsiChar(Buf1), PAnsiChar(Buf2),guidsize);
+ ftSmallint: Result := IntegerCompare(PSmallInt(buf1)^, PSmallInt(buf2)^);
+ ftInteger, ftDate, ftTime, ftAutoInc: Result := IntegerCompare(PInteger(buf1)^, PInteger(buf2)^);
+ ftWord: Result := IntegerCompare(PWord(buf1)^, PWord(buf2)^);
+ ftBoolean: Result := WordBoolCompare(PWordBool(buf1)^, PWordBool(buf2)^);
+ ftFloat, ftCurrency: Result := DoubleCompare(PDouble(Buf1)^, PDouble(Buf2)^);
+ ftDateTime: Result := TDateTimeCompare(PDateTime(Buf1)^, PDateTime(Buf2)^);
+ ftBcd: Result := CurrencyCompare(PCurrency(Buf1)^, PCurrency(Buf2)^);
+ ftFMTBCD: Result := BcdCompare(PBcd(buf1)^, PBcd(buf2)^);
+ ftLargeint: Result := Int64Compare(PInt64(Buf1)^, PInt64(Buf2)^);
+ {$IFNDEF FPC}
+ ftTimeStamp: Result := DoubleCompare(SQLTimeStampToDateTime(PSQLTimeStamp(Buf1)^), SQLTimeStampToDateTime(PSQLTimeStamp(Buf2)^));
+ {$ENDIF FPC}
+ else
+ end;
+end;
+
+procedure TDAMemoryDataset.SortOnFields(const Fields: string;
+ CaseInsensitive, Descending: Boolean);
+begin
+ if FActive then begin
+ if (Fields = '') and (FIndexName <> '') then begin
+ // default sorting
+ if FFieldsIndex then
+ SortOnFields(IndexFieldNames)
+ else
+ SwitchToIndex(IndexName);
+ f_DefaultIndexRecord.LastSorted := Now;
+ end
+ else begin
+ if Fields = '' then
+ f_DefaultIndexRecord.Init(IndexFieldNames, CaseInsensitive, Descending)
+ else
+ f_DefaultIndexRecord.Init(Fields, CaseInsensitive, Descending);
+ SortOnFields(f_DefaultIndexRecord);
+ end;
+ end;
+end;
+
+procedure TDAMemoryDataset.SetStoreStringAsReference(const Value: Boolean);
+begin
+ CheckInactive;
+ FStoreStringsAsReference := Value;
+end;
+
+procedure TDAMemoryDataset.SetWideString(NativeBuf: Pointer; Field: TField;
+ const Value: Widestring);
+var
+ len: integer;
+begin
+ if FStoreStringsAsReference then
+ PWideString(NativeBuf)^:=Value
+ else begin
+ len := Length(Value);
+ if Len > Field.Size then len:= Field.Size;
+ move(Pointer(Value)^,NativeBuf^,len*Sizeof(WideChar));
+ PWideChar(NativeBuf)[len]:=#0;
+ end;
+end;
+
+procedure TDAMemoryDataset.DoAfterOpen;
+begin
+ if not IsEmpty then SortOnFields();
+ inherited;
+end;
+
+procedure TDAMemoryDataset.MasterChanged(Sender: TObject);
+begin
+ ProcessFilter;
+end;
+
+procedure TDAMemoryDataset.MasterDisabled(Sender: TObject);
+begin
+ DataEvent(dePropertyChange, 0);
+ DoFilterRecords;
+end;
+(*
+procedure TDAMemoryDataset.GetDetailLinkFields(MasterFields,
+ DetailFields: TList);
+begin
+ { TODO : GetDetailLinkFields }
+ inherited GetDetailLinkFields(MasterFields, DetailFields);
+end;
+*)
+
+procedure TDAMemoryDataset.DoFilterRecords;
+var
+ i: integer;
+ pos: TBookmarkData;
+begin
+ if (FDataList.Count > 0) and (FRecordPos <> -1) and (FRecordPos < FDataList.Count) then
+ pos := FDataList[FRecordPos]
+ else
+ pos := nil;
+ //==============================
+ if ApplyMasterFilter then pos := nil;
+ if FRangeActive then begin
+ ApplyRangeFilter;
+ pos := nil;
+ end;
+ // apply filters
+ if IsActiveFilter then begin
+ for i := FDataList.Count-1 downto 0 do
+ if not FilterRecord(FDataList.List[i], False) then
+ FDataList.Delete(i);
+ end;
+ //==============================
+ if FIndexName <> '' then SortOnFields;
+ if Active then begin
+ if pos = nil then
+ FRecordPos := -1
+ else
+ FRecordPos := IntFindRecordID(pos);
+ if (FRecordPos = -1) then First;
+ if (RecordCount > 0) then FRecordPos := 0;
+ Resync([]);
+ end;
+end;
+
+function TDAMemoryDataset.MakeBlobFromString(Blob: AnsiString): PBLOBRecord;
+var
+ s: integer;
+begin
+ s:= Length(blob);
+ Result:=CreateBlobRecord(s);
+ Move(Pointer(blob)^, PBlobRecord(Result)^.Data, s * SizeOf(AnsiChar));
+end;
+
+procedure TDAMemoryDataset.IntInsertBuffer(Buffer: PMemDatasetrecord_Native;ASender: TDAMemoryDataset);
+begin
+ if ASender = nil then ASender:=Self;
+ if FCloneSource <> nil then
+ FCloneSource.IntInsertBuffer(Buffer, aSender)
+ else begin
+ FRecordsList.Add(Buffer);
+ NotifyClients(Buffer, mdnInsert, ASender);
+ end;
+end;
+
+function TDAMemoryDataset.GetBin2FieldOffset(
+ const aFieldNo: integer): cardinal;
+begin
+ if aFieldNo < FieldCount then
+ Result:=FOffsets[aFieldNo]
+ else
+ Result:=0;
+end;
+
+procedure TDAMemoryDataset.DoOnNewRecord;
+var
+ I: Integer;
+begin
+ if FMasterDataLink.Active and (FMasterDataLink.Fields.Count > 0) then
+ for I := 0 to FMasterDataLink.Fields.Count - 1 do
+ if FDetailsFieldNameList.Count > i then
+ TField(FDetailsFieldNameList[I]).Assign(TField(FMasterDataLink.Fields[I]));
+ inherited;
+end;
+
+function TDAMemoryDataset.Locate(const KeyFields: string;
+ const KeyValues: Variant; Options: TLocateOptions): Boolean;
+begin
+ DoBeforeScroll;
+ Result := LocateRecord(KeyFields, KeyValues, Options, True);
+ if Result then
+ begin
+ Resync([rmExact, rmCenter]);
+ DoAfterScroll;
+ end;
+end;
+
+function TDAMemoryDataset.LocateRecord(const KeyFields: string; const KeyValues: Variant; Options: TLocateOptions; SyncCursor: Boolean): Boolean;
+var
+ Buffer: PMemDatasetrecord;
+ lLocateStr: TMemLocateStruct;
+
+ function LocateWithOutIndex: boolean;
+ var
+ i,j: integer;
+ k: boolean;
+ lCaseInsensitive: boolean;
+ f: TMemLocateCompare;
+ buf: Dataset_PAnsiChar;
+ lBin2: Boolean;
+ begin
+ if loPartialKey in Options then
+ f := CompareValues2_partial
+ else
+ f := CompareValues2_full;
+ lCaseInsensitive:= loCaseInsensitive in Options;
+ with lLocateStr do begin
+ Result:=False;
+ For i:= 0 to lWorkList.Count - 1 do begin
+ k := False;
+ buf := PMemDatasetrecord_Native(lWorkList[i])^.Data;
+ lBin2 := PMemDatasetrecord_Native(lWorkList[i])^.Ident = mrBin2Style;
+ For j:=0 to lFields.Count-1 do begin
+ if ((buf = nil) or GetNullMask(buf,lFieldIndexes[j])) = lnull[j] then begin
+ if lnull[j] then
+ k := True // null | null
+ else
+ if lBin2 then
+ k := f(buf+lOffsets[j], lValues[j], lDatatypes[j], lCaseInsensitive, True)
+ else
+ k := f(buf+GetBin3Offset(buf,lFieldIndexes[j]), lValues[j], lDatatypes[j], lCaseInsensitive, False);
+ end
+ else
+ k:=False;
+ if not k then Break;
+ end;
+ if k then begin
+ RecordToBuffer(i, Buffer);
+ Result:=True;
+ Break;
+ end;
+ end;
+ end;
+ end;
+
+ function SearchIndex_Direct: TDAMemIndex;
+ var
+ i: integer;
+ begin
+ Result := f_DefaultIndexRecord;
+ if Result.isCanUsed(KeyFields,loCaseInsensitive in Options) then Exit;
+ for i:= 0 to FIndexList.Count - 1 do begin
+ Result := TDAMemIndex(FIndexList[i]);
+ if Result.isCanUsed(KeyFields,loCaseInsensitive in Options) then Exit;
+ end;
+ Result := nil;
+ end;
+
+var
+ lBookmark: TMemBookmarkData;
+ lLocalIndex: TDAMemIndex;
+begin
+ Result := False;
+
+ // try to use indexes
+ if not (loPartialKey in Options) then begin
+ UpdateMemIndexes(-1);
+ // try to use indexes
+ lLocalIndex := SearchIndex_Direct;
+ if lLocalIndex <> nil then begin
+ Result := intLocateRecordByIndex(lLocalIndex,KeyValues,SyncCursor);
+ exit;
+ end;
+ end;
+
+ SetLength(lBookmark, BookmarkSize);
+ FillChar(lBookmark, BookmarkSize, 0);
+ if Self.State <> dsBrowse then CheckBrowseMode;
+ CursorPosChanged;
+ Buffer := Pointer(TempBuffer);
+ if IsEmpty then Exit;
+ FillChar(lLocateStr, SizeOf(TMemLocateStruct),0);
+ try
+ lLocateStr.lFields := TList.Create;
+ try
+ GetFieldList(lLocateStr.lFields,KeyFields);
+ if lLocateStr.lFields.Count = 0 then Exit;
+ InitMemLocateStruct(@lLocateStr, KeyValues);
+ lLocateStr.lWorkList:= FDataList;
+ IntGetRecordList.LockListForReading;
+ try
+ result:= LocateWithOutIndex;
+ if Result then begin
+ SetLength(lBookmark, BookmarkSize);
+ GetBookmarkData(Pointer(Buffer), Pointer(lBookmark));
+ end;
+ finally
+ IntGetRecordList.UnlockListForReading;
+ end;
+ finally
+ lLocateStr.lFields.Free;
+ end;
+ finally
+ if Result then
+ if SyncCursor then begin
+ Bookmark := lBookmark;
+ UpdateCursorPos;
+ if EOF or BOF then Result := False;
+ end;
+ end;
+end;
+
+function TDAMemoryDataset.Lookup(const KeyFields: string;
+ const KeyValues: Variant; const ResultFields: string): Variant;
+begin
+ Result := Null;
+ if LocateRecord(KeyFields, KeyValues, [], False) then
+ begin
+ SetTempState(dsCalcFields);
+ try
+ CalculateFields(TempBuffer);
+ Result := FieldValues[ResultFields];
+ finally
+ RestoreState(dsBrowse);
+ end;
+ end;
+end;
+
+function TDAMemoryDataset.CompareValues2(buf1: pointer; aValue: TDAValueStruct; aDataType: TFieldType; aSortCaseInsensitive: Boolean;aBin2: boolean): integer;
+var
+ str1: Ansistring;
+ wstr1: WideString;
+begin
+ Result := 0;
+ case aDataType of
+ ftString, ftFixedChar: begin
+ if abin2 and FStoreStringsAsReference then
+ str1:=PAnsiString(Buf1)^
+ else
+ str1:=PAnsiChar(Buf1);
+ Result:= ROAnsiCompare(str1, aValue.AsAnsiString, aSortCaseInsensitive {$IFDEF MSWINDOWS},FSortLocale {$ENDIF MSWINDOWS});
+ end;
+ ftWideString: begin
+ if abin2 and FStoreStringsAsReference then
+ wstr1:=PWideString(Buf1)^
+ else
+ wstr1:=PWideChar(Buf1);
+ Result:= ROWideCompare(wstr1, aValue.AsWideString, aSortCaseInsensitive {$IFDEF MSWINDOWS},FSortLocale {$ENDIF MSWINDOWS});
+ end;
+ ftGuid: begin
+ SetString(str1, PAnsiChar(buf1), guidsize);
+ Result := ROAnsiCompare(str1, aValue.AsAnsiString, True);
+ end;
+ ftSmallint: Result := IntegerCompare(PSmallInt(buf1)^, aValue.value);
+ ftInteger, ftDate, ftTime, ftAutoInc: Result := IntegerCompare(PInteger(buf1)^, aValue.Value);
+ ftWord: Result := IntegerCompare(PWord(buf1)^, aValue.Value);
+ ftBoolean: Result := WordBoolCompare(PWordBool(buf1)^, aValue.Value);
+ ftFloat, ftCurrency: Result := DoubleCompare(PDouble(Buf1)^, aValue.Value);
+ ftDateTime: Result := TDateTimeCompare(PDateTime(Buf1)^, TimeStampToMSecs(DateTimeToTimeStamp(aValue.Value)));
+ ftBcd: Result := CurrencyCompare(PCurrency(buf1)^,aValue.Value);
+ ftFMTBCD: Result := BcdCompare(PBcd(buf1)^, VariantToBCD(aValue.Value));
+ ftLargeint: Result := Int64Compare(PInt64(Buf1)^, aValue.Value);
+ {$IFNDEF FPC}
+ ftTimeStamp: Result := DoubleCompare(SQLTimeStampToDateTime(PSQLTimeStamp(Buf1)^), SQLTimeStampToDateTime(VarToSQLTimeStamp(aValue.Value)));
+ {$ENDIF FPC}
+ else
+ end;
+end;
+
+
+function TDAMemoryDataset.CompareBookmarks(Bookmark1,
+ Bookmark2: TBookmark): Integer;
+var
+ idx1, idx2: integer;
+begin
+ if (Bookmark1 = nil) and (BookMark2 = nil) then
+ Result:=0
+ else if (Bookmark1 <> nil) and (BookMark2 = nil) then
+ Result := 1
+ else if (Bookmark1 = nil) and (BookMark2 <> nil) then
+ Result := -1
+ else begin
+ idx1 := IntFindRecordID(TBookMarkData(PPointer(Bookmark1)^));
+ idx2 := IntFindRecordID(TBookMarkData(PPointer(Bookmark2)^));
+ if idx1 > idx2 then
+ Result := 1
+ else if idx1 < idx2 then
+ Result := -1
+ else
+ Result:=0;
+ end;
+end;
+
+function TDAMemoryDataset.BookmarkValid(Bookmark: TBookmark): Boolean;
+begin
+ Result := IntFindRecordID(TBookMarkData(PPointer(Bookmark)^)) <> -1;
+end;
+
+function TDAMemoryDataset.GetIndexDefs: TIndexDefs;
+begin
+ if FIndexDefs = nil then
+ FIndexDefs := TIndexDefs.Create(Self);
+ Result := FIndexDefs;
+end;
+
+procedure TDAMemoryDataset.SetIndexDefs(const Value: TIndexDefs);
+begin
+ IndexDefs.Assign(Value);
+end;
+
+function TDAMemoryDataset.PSGetIndexDefs(
+ IndexTypes: TIndexOptions): TIndexDefs;
+begin
+ Result := inherited GetIndexDefs(IndexDefs, IndexTypes);
+end;
+
+procedure TDAMemoryDataset.UpdateIndexDefs;
+begin
+ inherited;
+end;
+
+function TDAMemoryDataset.GetIndexName: string;
+begin
+ if FFieldsIndex then Result := '' else Result := FIndexName;
+end;
+
+procedure TDAMemoryDataset.SetIndexName(const Value: string);
+begin
+ SetIndex(Value, Value = '');
+end;
+
+procedure TDAMemoryDataset.SetIndex(const Value: string;
+ FieldsIndex: Boolean);
+begin
+ if FActive then begin
+ CheckBrowseMode;
+ UpdateCursorPos;
+ if (FIndexName <> Value) or (FFieldsIndex <> FieldsIndex) then begin
+ FIndexName := Value;
+ FFieldsIndex := FieldsIndex;
+ if FieldsIndex or (Value = '') then begin
+ SortOnFields(Value, False, False);
+ end
+ else
+ SwitchToIndex(Value);
+ end;
+ end;
+ FIndexName := Value;
+ FFieldsIndex := FieldsIndex;
+ f_DefaultIndexRecord.LastSorted := Now;
+end;
+
+
+procedure TDAMemoryDataset.SwitchToIndex(const IndexName: string);
+var
+ i: integer;
+begin
+ if FActive then begin
+ i:= IndexDefs.IndexOf(IndexName);
+ if i = -1 then DatabaseErrorFmt(SIndexNotFound,[IndexName]);
+ f_DefaultIndexRecord.Init(IndexDefs[i]);
+ f_DefaultIndexRecord.FInitFromIndexDef:= False;
+ SortOnFields(f_DefaultIndexRecord);
+ end;
+end;
+
+procedure TDAMemoryDataset.GetIndexNames(List: TStrings);
+begin
+ IndexDefs.Update;
+ IndexDefs.GetItemNames(List);
+end;
+
+procedure TDAMemoryDataset.AddIndex(const Name, Fields, DescFields,
+ CaseInsFields: string);
+var
+ lIndexDef: TIndexDef;
+begin
+ lIndexDef := IndexDefs.AddIndexDef;
+ lIndexDef.Name := Name;
+ lIndexDef.Fields := Fields;
+ lIndexDef.DescFields := DescFields;
+ lIndexDef.CaseInsFields := CaseInsFields;
+end;
+
+procedure TDAMemoryDataset.DeleteIndex(const Name: string);
+var
+ i: integer;
+begin
+ i:=IndexDefs.IndexOf(Name);
+ if i <> -1 then IndexDefs.Delete(i);
+end;
+
+{$IFDEF FPC}
+const
+ SInvalidCalcType = 'Field ''%s'' cannot be a calculated or lookup field';
+{$ENDIF}
+
+procedure TDAMemoryDataset.ValidateFieldForIndex(aField: TField);
+begin
+ if not ((aField.FieldKind =fkData) and (aField.DataType in ft_Supported - ft_BlobTypes)) then
+ DatabaseErrorFmt(SInvalidCalcType, [aField.DisplayName]);
+end;
+
+{$IFDEF DELPHI10UP}
+{$WARN SYMBOL_DEPRECATED OFF}
+{$ENDIF DELPHI10UP}
+procedure TDAMemoryDataset.SortOnFields(const Fields, CaseInsFields, DescFields: string);
+begin
+ if FActive then begin
+ f_DefaultIndexRecord.Init(Fields,CaseInsFields,DescFields);
+ SortOnFields(f_DefaultIndexRecord);
+ end;
+end;
+{$IFDEF DELPHI10UP}
+{$WARN SYMBOL_DEPRECATED ON}
+{$ENDIF DELPHI10UP}
+
+procedure TDAMemoryDataset.SortOnFields;
+begin
+ SortOnFields('');
+end;
+
+procedure TDAMemoryDataset.DefChanged(Sender: TObject);
+begin
+ {$IFNDEF FPC}
+ inherited;
+ {$ENDIF}
+ if Sender = FIndexDefs then
+ UpdateMemIndexes;
+ if (not FFieldsIndex) and (FIndexName <> '') then begin
+ if FIndexDefs.Count = 0 then FIndexName:='';
+ SortOnFields;
+ end;
+end;
+
+function CompareAnsiStrPartial(const aStr1, aStr2: AnsiString; aSortCaseInsensitive:Boolean): boolean;
+var
+ l1: integer;
+ l2: Integer;
+ k: AnsiString;
+begin
+ l1 := Length(aStr1);
+ l2 := Length(aStr2);
+ if (l1 > l2) or (l1 = 0) then
+ Result := False
+ else begin
+ if l1 = l2 then
+ k := aStr2
+ else
+ SetString(k,PAnsiChar(aStr2), l1);
+ Result := ROAnsiCompare(aStr1, k , aSortCaseInsensitive) = 0;
+ end;
+end;
+
+function CompareWideStrPartial(const aStr1, aStr2: WideString; aSortCaseInsensitive:Boolean): boolean;
+var
+ l1: integer;
+ l2: Integer;
+ k: WideString;
+begin
+ l1 := Length(aStr1);
+ l2 := Length(aStr2);
+ if (l1 > l2) or (l1 = 0) then
+ Result := False
+ else begin
+ if l1 = l2 then
+ k := aStr2
+ else
+ SetString(k, PWideChar(aStr2), l1);
+ Result := ROWideCompare(aStr1, k , aSortCaseInsensitive) = 0;
+ end;
+end;
+
+function TDAMemoryDataset.CompareValues2_partial(buf1: pointer; aValue: TDAValueStruct; aDataType: TFieldType; aSortCaseInsensitive:Boolean;abin2: boolean): boolean;
+var
+ str1: AnsiString;
+ wstr1: widestring;
+begin
+ Result := False;
+ case aDataType of
+ ftString, ftFixedChar: begin
+ if abin2 and FStoreStringsAsReference then
+ str1 := PAnsiString(Buf1)^
+ else
+ str1 := PAnsiChar(Buf1);
+ Result := CompareAnsiStrPartial(aValue.AsAnsiString, str1, aSortCaseInsensitive);
+ end;
+ ftWideString: begin
+ if abin2 and FStoreStringsAsReference then
+ wstr1 := PWideString(Buf1)^
+ else
+ wstr1 := PWideChar(Buf1);
+ Result := CompareWideStrPartial(aValue.AsWideString, wstr1, aSortCaseInsensitive);
+ end;
+ ftGuid: begin
+ SetString(str1, PAnsiChar(buf1), guidsize);
+ Result := CompareAnsiStrPartial(aValue.AsAnsiString, str1, aSortCaseInsensitive);
+ end;
+ ftSmallint: Result := pos(VarToStr(aValue.Value), IntToStr(PSmallInt(buf1)^)) = 1;
+ ftInteger, ftDate, ftTime, ftAutoInc: Result := pos(VarToStr(aValue.Value), IntToStr(PInteger(buf1)^)) = 1;
+ ftWord: Result := pos(VarToStr(aValue.Value), IntToStr(PWord(buf1)^)) = 1;
+ ftBoolean: Result:= PWordBool(buf1)^ = aValue.Value;
+ ftFloat, ftCurrency: Result := pos(VarToStr(aValue.Value), FloatToStr(PDouble(buf1)^)) = 1;
+ ftDateTime: Result := pos(VarToStr(aValue.Value), DateToStr(TimeStampToDateTime(MSecsToTimeStamp({$IFDEF FPC}Trunc{$ENDIF}(PDateTime(buf1)^))))) = 1;
+ ftBcd: Result := Pos(VarToStr(aValue.Value), CurrToStr(PCurrency(Buf1)^)) = 1;
+ ftFMTBCD: Result :=pos(VarToStr(aValue.Value), BcdToStr(PBcd(buf1)^)) = 1;
+ ftLargeint: Result := pos(VarToStr(aValue.Value), IntToStr(PInt64(buf1)^)) = 1;
+ {$IFNDEF FPC}
+ ftTimeStamp: Result := pos(VarToStr(aValue.Value), DateTimeToStr(SQLTimeStampToDateTime(PSQLTimeStamp(Buf1)^))) = 1;
+ {$ENDIF FPC}
+ else
+ end;
+end;
+
+procedure TDAMemoryDataset.Notification(AComponent: TComponent;
+ Operation: TOperation);
+begin
+ inherited;
+ if (Operation = opRemove) and (AComponent = FCloneSource) then
+ DetachFromSource;
+end;
+
+procedure TDAMemoryDataset.CloneCursor(Source: TDAMemoryDataset; Reset: Boolean; KeepSettings: Boolean = False);
+begin
+ Source.CheckActive;
+ Close;
+ Source.UpdateCursorPos;
+ FCloneSource := Source;
+ if Reset then begin
+ Filtered := False;
+ Filter := '';
+ OnFilterRecord := nil;
+ IndexDefs.Clear;
+ IndexName := '';
+ MasterSource := nil;
+ MasterFields := '';
+ DetailFields := '';
+ ReadOnly := False;
+ end
+ else if not KeepSettings then begin
+ Filter := Source.Filter;
+ OnFilterRecord := Source.OnFilterRecord;
+ Filtered := Source.Filtered;
+ IndexDefs.Assign(Source.IndexDefs);
+ if Source.IndexName <> '' then
+ IndexName := Source.IndexName
+ else
+ IndexFieldNames := Source.IndexFieldNames;
+ MasterSource := Source.MasterSource;
+ MasterFields := Source.MasterFields;
+ DetailFields := Source.DetailFields;
+ ReadOnly := Source.ReadOnly;
+ end;
+ Open;
+ if Reset then Resync([]);
+end;
+
+procedure TDAMemoryDataset.IntRemoveBuffer(Buffer: PMemDatasetrecord_Native; ASender: TDAMemoryDataset);
+begin
+ if FCloneSource <> nil then
+ FCloneSource.IntRemoveBuffer(Buffer,ASender)
+ else begin
+ NotifyClients(Buffer,mdnDelete,ASender);
+ with FRecordsList.LockListForWriting do try
+ Remove(Buffer);
+ FreeMemDatasetRecord(Buffer);
+ finally
+ FRecordsList.UnlockListForWriting;
+ end;
+ end;
+end;
+
+function TDAMemoryDataset.IntGetRecordList: TThreadMemList;
+begin
+ if FCloneSource <> nil then
+ Result:= FCloneSource.IntGetRecordList
+ else
+ Result:=FRecordsList;
+end;
+
+
+procedure TDAMemoryDataset.RegisterClient(const AClient: TDAMemoryDataset);
+begin
+ if FCloneSource <> nil then begin
+ FCloneSource.RegisterClient(AClient);
+ end
+ else begin
+ if FCloneClientList = nil then FCloneClientList:=TThreadList.Create;
+ FCloneClientList.Add(AClient);
+ end;
+end;
+
+procedure TDAMemoryDataset.UnregisterClient(const AClient: TDAMemoryDataset);
+begin
+ if FCloneSource <> nil then begin
+ FCloneSource.UnregisterClient(AClient);
+ end
+ else begin
+ if FCloneClientList <> nil then
+ FCloneClientList.Remove(AClient);
+ end;
+end;
+
+procedure TDAMemoryDataset.UnregisterAllClients;
+var
+ i: integer;
+ lList: TList;
+ lClient: TDAMemoryDataset;
+begin
+ if FCloneClientList <> nil then begin
+ lList:= FCloneClientList.LockList;
+ try
+ for i:= lList.Count-1 downto 0 do begin
+ lClient:= TDAMemoryDataset(lList[i]);
+ if Assigned(lClient) then lClient.DetachFromSource;
+ end;
+ lList.Clear;
+ finally
+ FCloneClientList.UnlockList;
+ end;
+ end;
+end;
+
+procedure TDAMemoryDataset.DetachFromSource;
+begin
+ FDataList.Clear;
+ FCloneSource := nil;
+ InternalFirst;
+ Resync([]);
+end;
+
+procedure TDAMemoryDataset.NotifyClients(Buf: PMemDatasetrecord_Native; Operation: TMemDataSetNotification;ASender: TDAMemoryDataset);
+var
+ i: integer;
+begin
+ if FCloneClientList <> nil then
+ with FCloneClientList.LockList do try
+ For i:=0 to Count -1 do
+ if ASender <> TDAMemoryDataset(Items[i]) then
+ TDAMemoryDataset(Items[i]).RecordNotification(Buf,Operation);
+ finally
+ FCloneClientList.UnlockList;
+ end;
+end;
+
+
+procedure TDAMemoryDataset.RecordNotification(Buf: PMemDatasetrecord_Native; Operation: TMemDataSetNotification);
+var
+ i: integer;
+begin
+ case Operation of
+ mdnInsert:
+ begin
+ intInsertRecord(Buf);
+ end;
+ mdnModify:
+ if IsActiveFilter and not FilterRecord(Buf, True) then begin
+ i := FDataList.Remove(buf);
+ if (i <> -1) and (i = FRecordPos) and (FRecordPos >= RecordCount) then Dec(FRecordPos);
+ end;
+ mdnDelete:
+ begin
+ i := FDataList.Remove(buf);
+ if (i <> -1) and (i = FRecordPos) and (FRecordPos >= RecordCount) then Dec(FRecordPos);
+ end;
+ mdnBatchAdding:
+ begin
+ ProcessFilter;
+ end;
+ end;
+ DataEvent(deUpdateState, 0);
+// Refresh;
+ Resync([]);
+end;
+
+procedure TDAMemoryDataset.IntUpdateBuffer(Buffer: PMemDatasetrecord_Native; ASender: TDAMemoryDataset);
+begin
+ if ASender = nil then ASender:=Self;
+ if FCloneSource <> nil then
+ FCloneSource.IntUpdateBuffer(Buffer, ASender)
+ else begin
+ NotifyClients(Buffer,mdnModify,ASender);
+ end;
+end;
+
+procedure TDAMemoryDataset.intInsertRecord(Buf: PMemDatasetrecord_Native);
+var
+ lCount: integer;
+ RecPos: integer;
+begin
+ if not IsActiveFilter or FilterRecord(Buf, True) then begin
+ if State = dsInsert then begin
+ lCount:= IntGetRecordList.lockListForReading.Count;
+ IntGetRecordList.UnlockListForReading;
+ if FRecordPos >= lCount then begin
+ FDataList.Add(Buf);
+ FRecordPos := RecordCount - 1;
+ end
+ else begin
+ if FRecordPos = -1 then
+ RecPos := 0
+ else
+ RecPos := FRecordPos;
+ FDataList.Insert(RecPos, Buf);
+ FRecordPos := RecPos;
+ end;
+ end
+ else begin
+ FDataList.Add(Buf);
+ end;
+ end;
+end;
+
+procedure TDAMemoryDataset.AddRecordsfromList(AList: TList);
+var
+ old_count: integer;
+ i: integer;
+begin
+ with IntGetRecordList.LockListForWriting do try
+ old_count:=Count;
+ Count:=old_count+AList.Count;
+ System.Move(AList.List^, PAnsiChar(List^[old_Count]), AList.Count*SizeOf(Pointer));
+ if FAutoCompactRecords then
+ For i := old_count to Count -1 do
+ ConvertBin2ToBin3Record(List^[i]);
+ finally
+ IntGetRecordList.UnlockListForWriting;
+ end;
+ if (AList.Count > 0) then FLastUpdate := Now;
+ AList.Clear;
+ NotifyClients(nil, mdnBatchAdding, nil);
+end;
+
+function TDAMemoryDataset.CalcFieldLen(aDataType: TFieldType;
+ aSize: Integer): integer;
+begin
+ if not (aDataType in ft_Supported) then
+ Result := 0
+ else if IsReferencedField(aDataType) then
+ Result := sizeof(Pointer)
+ else case aDataType of
+ ftSmallint: Result := SizeOf(Smallint);
+ ftInteger, ftAutoInc: Result := SizeOf(Integer);
+ ftWord: Result := SizeOf(Word);
+ ftBoolean: Result := SizeOf(WordBool);
+ ftFloat, ftCurrency: Result := SizeOf(Double);
+ ftDate, ftTime: Result := SizeOf(Integer);
+ ftDateTime: Result := SizeOf(TDateTime);
+ ftLargeint: Result := SizeOf(Largeint);
+ {$IFNDEF FPC}
+ ftTimeStamp: Result := SizeOf(TSQLTimeStamp);
+ {$ENDIF}
+ ftFMTBCD: Result := SizeOf(TBcd);
+ ftBCD: Result := SizeOf(Currency);
+ ftGuid: Result := GuidSize+1;
+ ftString,ftFixedChar: Result := (aSize + 1)* Sizeof(AnsiChar);
+ ftWideString: Result := (aSize + 1) * Sizeof(WideChar);
+ else
+ Result:=0;
+ end;
+end;
+
+procedure TDAMemoryDataset.SetReadOnly(const Value: Boolean);
+begin
+ FReadOnly := Value;
+end;
+
+function TDAMemoryDataset.GetCanModify: Boolean;
+begin
+ Result := not FReadOnly;
+end;
+
+procedure TDAMemoryDataset.ApplyRange;
+begin
+ CheckBrowseMode;
+ if not (BuffersEqual(FKeyBuffers[kiRangeStart], FKeyBuffers[kiCurRangeStart], SizeOf(TMemKeyBuffer) + FNativeRecordSize) and
+ BuffersEqual(FKeyBuffers[kiRangeEnd], FKeyBuffers[kiCurRangeEnd], SizeOf(TMemKeyBuffer) + FNativeRecordSize)) then begin
+ Move(FKeyBuffers[kiRangeStart]^, FKeyBuffers[kiCurRangeStart]^, SizeOf(TMemKeyBuffer) + FNativeRecordSize);
+ Move(FKeyBuffers[kiRangeEnd]^, FKeyBuffers[kiCurRangeEnd]^, SizeOf(TMemKeyBuffer) + FNativeRecordSize);
+ FRangeActive:=(FKeyBuffers[kiCurRangeStart]<>nil) and (FKeyBuffers[kiCurRangeEnd]<>nil);
+ RefreshIndexConditional;
+ InternalFirst;
+ DoFilterRecords;
+ First;
+ end;
+end;
+
+procedure TDAMemoryDataset.CancelRange;
+begin
+ CheckBrowseMode;
+ UpdateCursorPos;
+ FRangeActive := False;
+ if FKeyBuffers[kiCurRangeStart].Modified or FKeyBuffers[kiCurRangeEnd].Modified then begin
+ InitKeyBuffer(FKeyBuffers[kiCurRangeStart]);
+ InitKeyBuffer(FKeyBuffers[kiCurRangeEnd]);
+ end;
+ DoFilterRecords;
+end;
+
+procedure TDAMemoryDataset.EditRangeEnd;
+begin
+ SetKeyBuffer(kiRangeEnd, False);
+end;
+
+procedure TDAMemoryDataset.EditRangeStart;
+begin
+ SetKeyBuffer(kiRangeStart, False);
+end;
+
+procedure TDAMemoryDataset.SetRange(const StartValues,
+ EndValues: array of const);
+begin
+ CheckBrowseMode;
+ SetKeyFields(kiRangeStart, StartValues);
+ SetKeyFields(kiRangeEnd, EndValues);
+ ApplyRange;
+end;
+
+procedure TDAMemoryDataset.SetRangeEnd;
+begin
+ SetKeyBuffer(kiRangeEnd, True);
+end;
+
+procedure TDAMemoryDataset.SetRangeStart;
+begin
+ SetKeyBuffer(kiRangeStart, True);
+end;
+
+procedure TDAMemoryDataset.SetKeyBuffer(KeyIndex: TMemKeyIndex; Clear: Boolean);
+begin
+ CheckBrowseMode;
+ RefreshIndexConditional;
+ FKeyBuffer := FKeyBuffers[KeyIndex];
+ Move(FKeyBuffer^, FKeyBuffers[kiSave]^, SizeOf(TMemKeyBuffer) + FNativeRecordSize);
+ if Clear then InitKeyBuffer(FKeyBuffer);
+ FKeyBuffer.FieldCount:= f_DefaultIndexRecord.IndexFieldNameList.Count;
+ SetState(dsSetKey);
+ SetModified(FKeyBuffer.Modified);
+ DataEvent(deDataSetChange, 0);
+end;
+
+procedure TDAMemoryDataset.SetKeyFields(KeyIndex: TMemKeyIndex; const Values: array of const);
+var
+ I: Integer;
+ k: integer;
+ SaveState: TDataSetState;
+begin
+ RefreshIndexConditional;
+ if f_DefaultIndexRecord.IndexFieldNameList.Count = 0 then DatabaseError(SNoFieldIndexes, Self);
+ SaveState := SetTempState(dsSetKey);
+ try
+ if f_DefaultIndexRecord.IndexFieldNameList.Count >= High(Values)-Low(Values)+1 then
+ k:= High(Values)-Low(Values)+1
+ else begin
+ k:= f_DefaultIndexRecord.IndexFieldNameList.Count;
+ {$IFDEF CHECK_RANGE}
+ DatabaseError('Can''t assign values: array size is larger than possible',Self);
+ {$ENDIF CHECK_RANGE}
+ end;
+ FKeyBuffer := InitKeyBuffer(FKeyBuffers[KeyIndex]);
+ for I := 0 to k-1 do
+ TField(f_DefaultIndexRecord.IndexFieldNameList[i]).AssignValue(Values[I]);
+ FKeyBuffer^.FieldCount := High(Values) + 1;
+ FKeyBuffer^.Modified := Modified;
+ finally
+ RestoreState(SaveState);
+ end;
+end;
+
+procedure TDAMemoryDataset.AllocKeyBuffers;
+var
+ KeyIndex: TMemKeyIndex;
+begin
+ try
+ for KeyIndex := Low(TMemKeyIndex) to High(TMemKeyIndex) do
+ FKeyBuffers[KeyIndex] := AllocMem(SizeOf(TMemKeyBuffer) + FNativeRecordSize);
+ if Assigned(FCloneSource) then
+ for KeyIndex := Low(TMemKeyIndex) to High(TMemKeyIndex) do
+ Move(FCloneSource.FKeyBuffers[KeyIndex]^, FKeyBuffers[KeyIndex]^, SizeOf(TMemKeyBuffer) + FNativeRecordSize);
+ except
+ FreeKeyBuffers;
+ raise;
+ end;
+end;
+
+procedure TDAMemoryDataset.FreeKeyBuffers;
+var
+ KeyIndex: TMemKeyIndex;
+begin
+ for KeyIndex := Low(TMemKeyIndex) to High(TMemKeyIndex) do
+ DisposeMem(FKeyBuffers[KeyIndex], SizeOf(TMemKeyBuffer) + FNativeRecordSize);
+end;
+
+function TDAMemoryDataset.InitKeyBuffer(Buffer: PMemKeyBuffer): PMemKeyBuffer;
+begin
+ FillChar(Buffer^, SizeOf(TMemKeyBuffer) + FNativeRecordSize, 0);
+ Result := Buffer;
+end;
+
+procedure TDAMemoryDataset.SetDetailsFields(const Value: string);
+begin
+ if FDetailFields <> Value then begin
+ FDetailFields := Value;
+ if Active then begin
+ InitDetailFieldNamesList;
+ DoFilterRecords;
+ end;
+ DataEvent(dePropertyChange, 0);
+ end;
+end;
+
+{$IFDEF DELPHI10UP}
+{$WARN SYMBOL_DEPRECATED OFF}
+{$ENDIF DELPHI10UP}
+procedure TDAMemoryDataset.InitDetailFieldNamesList;
+var
+ pos1: integer;
+ fld: TField;
+begin
+ FDetailsFieldNameList.Clear;
+ if FDetailFields = '' then Exit;;
+ Pos1 := 1;
+ while Pos1 <= Length(FDetailFields) do begin
+ Fld := FieldByName(ExtractFieldName(FDetailFields, Pos1));
+ ValidateFieldForIndex(Fld);
+ FDetailsFieldNameList.Add(Fld);
+ end;
+end;
+{$IFDEF DELPHI10UP}
+{$WARN SYMBOL_DEPRECATED ON}
+{$ENDIF DELPHI10UP}
+
+function TDAMemoryDataset.ApplyMasterFilter:boolean;
+var
+ i, j: integer;
+ MasterArray: array of TDAValueStruct;
+ buf: PAnsiChar;
+ flag: boolean;
+ fld_cnt: integer;
+ str: Ansistring;
+ lList: TMemList;
+ ldata: Dataset_PAnsiChar;
+ lBin2: Boolean;
+begin
+ FDataList.Clear;
+ if (MasterSource = nil) or (MasterSource.DataSet = nil) or
+ (not MasterSource.DataSet.Active) or (MasterDataLink.Fields.Count = 0) or
+ (FDetailsFieldNameList.Count = 0) then begin
+ // not filtered!
+ lList:=IntGetRecordList.LockListForReading;
+ try
+ FDataList.Assign(LList);
+ finally
+ IntGetRecordList.UnlockListForReading;
+ end;
+ SortOnFields;
+ Result := False;
+ end
+ else begin
+ fld_cnt := MasterDataLink.Fields.Count;
+ if FDetailsFieldNameList.Count < fld_cnt then fld_cnt := FDetailsFieldNameList.Count;
+ SetLength(MasterArray, fld_cnt);
+ for i := 0 to fld_cnt - 1 do begin
+ if TField(MasterDataLink.Fields[i]).DataType in ft_AnsiStringValues then
+ MasterArray[i].AsAnsiString := TField(MasterDataLink.Fields[i]).{$IFDEF DELPHI2008UP}asAnsiString{$ELSE}asString{$ENDIF}
+ else if TField(MasterDataLink.Fields[i]).DataType in ft_WideStringValues then
+ MasterArray[i].AsWideString := TWideStringField(MasterDataLink.Fields[i]).Value
+ else
+ MasterArray[i].Value := TField(MasterDataLink.Fields[i]).Value;
+ end;
+ lList:= IntGetRecordList.LockListForReading;
+ try
+ FDataList.Capacity := lList.Count;
+ for i := 0 to LList.Count - 1 do begin
+ flag := true;
+ ldata := PMemDatasetrecord_Native(LList.FList^[i])^.Data;
+ lBin2 := PMemDatasetrecord_Native(LList.FList^[i])^.Ident = mrBin2Style;
+ for j := 0 to fld_cnt - 1 do begin
+ buf := IntFindFieldData(ldata, TField(FDetailsFieldNameList[j]), lBin2);
+ if (buf <> nil) then
+ case TField(FDetailsFieldNameList[j]).DataType of
+ ftString, ftFixedChar: begin
+ if lBin2 and FStoreStringsAsReference then
+ flag := ROAnsiCompare(PAnsistring(Buf)^, MasterArray[j].AsAnsiString, True {$IFDEF MSWINDOWS}, FSortLocale {$ENDIF}) = 0
+ else
+ flag := ROAnsiCompare(PAnsiChar(Buf), MasterArray[j].AsAnsiString, True {$IFDEF MSWINDOWS}, FSortLocale {$ENDIF}) = 0
+ end;
+ ftWideString: begin
+ if lBin2 and FStoreStringsAsReference then
+ flag := ROWideCompare(PWidestring(Buf)^, MasterArray[j].AsWideString,True {$IFDEF MSWINDOWS}, FSortLocale {$ENDIF}) = 0
+ else
+ flag := ROWideCompare(PWideChar(Buf), MasterArray[j].AsWideString,True {$IFDEF MSWINDOWS}, FSortLocale {$ENDIF}) = 0
+ end;
+ ftSmallint: flag := PSmallint(buf)^ = MasterArray[j].value;
+ ftInteger, ftDate, ftTime, ftAutoInc: Flag := PInteger(buf)^ = MasterArray[j].value;
+ ftWord: flag := PWord(buf)^ = MasterArray[j].value;
+ ftBoolean: flag := PWordBool(buf)^ = wordbool(MasterArray[j].value);
+ ftFloat, ftCurrency: flag := PDouble(Buf)^ = MasterArray[j].value;
+ ftDateTime: flag := PDateTime(Buf)^ = MasterArray[j].value;
+ ftBcd: flag := PCurrency(Buf)^ = MasterArray[j].value;
+ ftFMTBCD: flag := BcdCompare(PBcd(buf)^, VariantToBCD(MasterArray[j].value)) = 0;
+ ftLargeint: flag := PInt64(Buf)^ = MasterArray[j].value;
+ {$IFNDEF FPC}
+ ftTimeStamp: flag := SQLTimeStampToDateTime(PSQLTimeStamp(Buf)^) = SQLTimeStampToDateTime(VarToSQLTimeStamp(MasterArray[j].value));
+ {$ENDIF FPC}
+ ftGuid: begin
+ SetString(str, PAnsiChar(Buf), guidsize);
+ flag := ROAnsiCompare(str, MasterArray[j].AsAnsiString, True) = 0;
+ end;
+ end
+ else
+ Flag := not VarIsNull(MasterArray[j].value);
+ if not flag then Break;
+ end;
+ if flag then FDataList.Add(lList.FList^[i]);
+ end;
+ finally
+ IntGetRecordList.UnlockListForReading;
+ end;
+ Result := true;
+ end;
+end;
+
+function TDAMemoryDataset.CompareValues_Range(buf: PMemDatasetrecord_Native; keybuffer: PMemKeyBuffer): integer;
+var
+ i, lFieldCount: integer;
+ p1,p2: PAnsiChar;
+ lField: TField;
+ lBuf, lbuf2: Dataset_PAnsiChar;
+ lbin2_1,lbin2_2 :Boolean;
+begin
+ if f_DefaultIndexRecord.IndexFieldNameList.Count >= keybuffer^.FieldCount then begin
+ lFieldCount := keybuffer^.FieldCount
+ end
+ else begin
+ lFieldCount := f_DefaultIndexRecord.IndexFieldNameList.Count;
+ {$IFDEF CHECK_RANGE}
+ DatabaseError('Error during applying range');
+ {$ENDIF CHECK_RANGE}
+ end;
+ Result := 0;
+ lbuf := buf^.Data;
+ lbuf2 := @keybuffer.Data;
+ lbin2_1 := buf^.Ident = mrBin2Style;
+ lbin2_2 := True;
+ For i:=0 to lFieldCount-1 do begin
+ lField := TField(f_DefaultIndexRecord.IndexFieldNameList[i]);
+
+ if (lBuf <> nil) and not GetNullMask(lbuf, lField.Index) then
+ p1 := intFindFieldData(lbuf, lField, lbin2_1)
+ else
+ p1 := nil;
+
+ if not GetNullMask(lbuf2, lField.Index) then
+ p2 := intFindFieldData(lbuf2, lField, lbin2_2)
+ else
+ p2 := nil;
+
+ if (p1 <> nil) and (p2 <> nil) then
+ Result := CompareValues(p1, p2, lField.DataType, f_DefaultIndexRecord.IndexCaseInsList[i] <> nil, lbin2_1, lbin2_2)
+ else if p1 <> nil then Result := 1
+ else if p2 <> nil then Result := -1
+ else Continue;
+
+ if Result <> 0 then break;
+ end;
+end;
+
+procedure TDAMemoryDataset.ApplyRangeFilter;
+begin
+ { TODO : Can be optimized here }
+end;
+
+function TDAMemoryDataset.CompareValues2_full(buf1: pointer;
+ aValue: TDAValueStruct; aDataType: TFieldType;
+ aSortCaseInsensitive: Boolean; abin2: boolean): boolean;
+begin
+ Result := CompareValues2(buf1,aValue,aDataType,aSortCaseInsensitive, abin2) = 0;
+end;
+
+
+function TDAMemoryDataset.FindKey(const KeyValues: array of const): Boolean;
+begin
+ CheckBrowseMode;
+ SetKeyFields(kiLookup, KeyValues);
+ Result := GotoKey;
+end;
+
+procedure TDAMemoryDataset.FindNearest(const KeyValues: array of const);
+begin
+ CheckBrowseMode;
+ SetKeyFields(kiLookup, KeyValues);
+ GotoNearest;
+end;
+
+function TDAMemoryDataset.GotoKey: Boolean;
+begin
+ Result := internalGotoKey(FKeyBuffers[kiLookup], False);
+end;
+
+procedure TDAMemoryDataset.GotoNearest;
+begin
+ internalGotoKey(FKeyBuffers[kiLookup], True);
+end;
+
+procedure TDAMemoryDataset.EditKey;
+begin
+ SetKeyBuffer(kiLookup, False);
+end;
+
+procedure TDAMemoryDataset.SetKey;
+begin
+ SetKeyBuffer(kiLookup, True);
+end;
+
+function TDAMemoryDataset.GetIndexFields: string;
+var
+ i: integer;
+begin
+ Result := '';
+ if FIndexName <> '' then begin
+ if FFieldsIndex then begin
+ Result:=FIndexName
+ end
+ else begin
+ i:= IndexDefs.IndexOf(FIndexName);
+ if i = -1 then DatabaseErrorFmt(SIndexNotFound,[FIndexName]);
+ Result:=IndexDefs[i].Fields;
+ end;
+ end;
+end;
+
+function TDAMemoryDataset.internalGotoKey(const KeyBuffer: PMemKeyBuffer;
+ isNearest: Boolean): Boolean;
+var
+ L, H, I, C : integer;
+begin
+ CheckBrowseMode;
+ DoBeforeScroll;
+ RefreshIndexConditional;
+ if not isNearest then CursorPosChanged;
+ KeyBuffer.FieldCount:= f_DefaultIndexRecord.IndexFieldNameList.Count;
+ IntGetRecordList.LockListForReading;
+ try
+ Result := False;
+ if isNearest then l:= FRecordPos else L := 0;
+ H := FDataList.Count - 1;
+ while L <= H do
+ begin
+ I := (L + H) shr 1;
+ c := CompareValues_Range(FDataList.List[i],KeyBuffer);
+ if C < 0 then
+ L := I + 1
+ else
+ begin
+ H := I - 1;
+ if C = 0 then Result := True;
+ end;
+ end;
+ if Result then
+ FRecordPos := l
+ else if isNearest then begin
+ if L + 1 <= H then
+ FRecordPos := L+1
+ else
+ FRecordPos := L;
+ end;
+ finally
+ IntGetRecordList.UnlockListForReading;
+ end;
+ if not isNearest then begin
+ if Result then begin
+ Resync([rmExact, rmCenter]);
+ DoAfterScroll;
+ end;
+ end else begin
+ Resync([rmCenter]);
+ DoAfterScroll;
+ end;
+end;
+
+function TDAMemoryDataset.GetIsIndexField(Field: TField): Boolean;
+begin
+ with Field do
+ Result:= (FieldNo > 0) and (f_DefaultIndexRecord.IndexFieldNameList.IndexOf(Field) >= 0);
+end;
+
+procedure TDAMemoryDataset.PostKeyBuffer(Commit: Boolean);
+begin
+ DataEvent(deCheckBrowseMode, 0);
+ if Commit then
+ FKeyBuffer.Modified := Modified else
+ Move(FKeyBuffers[kiSave]^, FKeyBuffer^, SizeOf(TMemKeyBuffer) + FNativeRecordSize);
+ SetState(dsBrowse);
+ DataEvent(deDataSetChange, 0);
+end;
+
+procedure TDAMemoryDataset.Post;
+begin
+ inherited;
+ if State = dsSetKey then PostKeyBuffer(True);
+end;
+
+procedure TDAMemoryDataset.Cancel;
+begin
+ inherited;
+ if State = dsSetKey then PostKeyBuffer(False);
+end;
+
+procedure TDAMemoryDataset.RefreshIndexConditional;
+begin
+ if FLastUpdate > f_DefaultIndexRecord.LastSorted then SortOnFields;
+end;
+
+{$IFDEF BDS4UP}{$REGION 'MEM_PACKETRECORDS'}{$ENDIF BDS4UP}
+{$IFDEF MEM_PACKETRECORDS}
+procedure TDAMemoryDataset.CancelPackedMode;
+begin
+{ TODO : }
+ PackedRecordListClear;
+ PackedMode := False;
+end;
+
+procedure TDAMemoryDataset.CommitPackedMode;
+begin
+{ TODO : ApplyChanges }
+ PackedMode := False;
+end;
+
+procedure TDAMemoryDataset.StartPackedMode;
+begin
+ PackedMode := True;
+{ TODO : }
+end;
+
+function TDAMemoryDataset.GetPackedMode: Boolean;
+begin
+{ if FCloneSource <> nil then
+ Result:= FCloneSource.PackedMode
+ else
+}
+ Result := fPackedMode;
+end;
+
+procedure TDAMemoryDataset.SetPackedMode(const Value: Boolean);
+begin
+ if Value and (Value = GetPackedMode) then DatabaseError('Dataset already in packed mode');
+{ if FCloneSource <> nil then
+ FCloneSource.PackedMode := Value
+ else }
+ fPackedMode := Value;
+end;
+
+procedure TDAMemoryDataset.PackedRecordListClear;
+begin
+// MemList_ClearRecords(FPackedRecordsList);
+end;
+{$ENDIF MEM_PACKETRECORDS}
+{$IFDEF BDS4UP}{$ENDREGION}{$ENDIF BDS4UP}
+
+procedure TDAMemoryDataset.MemList_ClearRecords(aMemList: TMemList);
+var
+ i: integer;
+begin
+ for i := aMemList.Count - 1 downto 0 do
+ FreeMemDatasetRecord(aMemList.List[i]);
+ aMemList.Clear;
+end;
+
+function TDAMemoryDataset.LocateByIndex(const aIndexName: string;
+ const KeyValues: Variant): Boolean;
+begin
+ DoBeforeScroll;
+ Result := LocateRecordByIndex(aIndexName, KeyValues, True);
+ if Result then
+ begin
+ Resync([rmExact, rmCenter]);
+ DoAfterScroll;
+ end;
+end;
+
+function TDAMemoryDataset.LookupByIndex(const aIndexName: string;
+ const KeyValues: Variant; const ResultFields: string): Variant;
+begin
+ Result := Null;
+ if LocateRecordByIndex(aIndexName, KeyValues, False) then
+ begin
+ SetTempState(dsCalcFields);
+ try
+ CalculateFields(TempBuffer);
+ Result := FieldValues[ResultFields];
+ finally
+ RestoreState(dsBrowse);
+ end;
+ end;
+end;
+
+function TDAMemoryDataset.LocateRecordByIndex(const aIndexName: string;
+ const KeyValues: Variant; SyncCursor: Boolean): Boolean;
+var
+ i: integer;
+ lIndex: TDAMemIndex;
+begin
+ i:= IndexDefs.IndexOf(aIndexName);
+ if i = -1 then DatabaseErrorFmt(SIndexNotFound,[aIndexName]);
+ UpdateMemIndexes(i);
+ lIndex := TDAMemIndex(FIndexList[i]);
+ DoSort(lIndex);
+ Result:= intLocateRecordByIndex(lIndex, KeyValues, SyncCursor);
+end;
+
+procedure TDAMemoryDataset.SortOnFields(AIndex: TDAMemIndex);
+begin
+ if FActive then DoSort(AIndex);
+end;
+
+procedure TDAMemoryDataset.IndexList_Clear;
+begin
+ While FIndexList.Count >0 do begin
+ TDAMemIndex(FIndexList.Last).Free;
+ FIndexList.Delete(FIndexList.Count-1);
+ end;
+end;
+
+function TDAMemoryDataset.LocateWithIndex(const LocateStruct: PMemLocateStruct; Buffer: PMemDatasetrecord): boolean;
+var
+ L, H, I, C,j : integer;
+ lBin2: Boolean;
+ lBuf: Dataset_PAnsiChar;
+begin
+ with LocateStruct^ do begin
+ Result := False;
+ L := 0;
+ H := lWorkList.Count - 1;
+ while L <= H do
+ begin
+ I := (L + H) shr 1;
+ c:=0;
+ lBuf:=PMemDatasetrecord_Native(lWorkList[i])^.Data;
+ lBin2:=PMemDatasetrecord_Native(lWorkList[i])^.Ident = mrBin2Style;
+ For j:=0 to lFields.Count-1 do begin
+ if GetNullMask(lBuf ,lFieldIndexes[j]) = lnull[j] then begin
+ if lnull[j] then
+ c := 0 // null | null
+ else
+ if lBin2 then
+ c := CompareValues2(lBuf + lOffsets[j], lValues[j], lDatatypes[j], lcaseIns[j],True) // not null | not null
+ else
+ c := CompareValues2(lBuf + GetBin3Offset(lBuf,lFieldIndexes[j]), lValues[j], lDatatypes[j], lcaseIns[j],True) // not null | not null
+ end
+ else begin
+ if lNull[j] then
+ c := 1 // not null | null
+ else
+ c := -1; // null | not null
+ end;
+ if c <> 0 then begin
+ if ldesc[j] then c:=-c;
+ Break;
+ end;
+ end;
+ if (C < 0) then
+ L := I + 1
+ else
+ begin
+ H := I - 1;
+ if C = 0 then Result := True;
+ end;
+ end;
+ if Result then LocalBufferToDatasetBuffer(lWorkList[l],Buffer);
+ end;
+end;
+
+procedure TDAMemoryDataset.UpdateMemIndexes(AIndex: integer = -1);
+var
+ i: integer;
+begin
+ if Active then begin
+ While FIndexDefs.Count > FIndexList.Count do
+ FIndexList.Add(TDAMemIndex.Create(self));
+
+ While FIndexDefs.Count < FIndexList.Count do begin
+ TDAMemIndex(FIndexList.Last).Free;
+ FIndexList.Delete(FIndexList.Count-1);
+ end;
+
+ if AIndex <> -1 then begin
+ TDAMemIndex(FIndexList[AIndex]).UpdateIndex(FIndexDefs[AIndex]);
+ end
+ else begin
+ For i:= 0 to FIndexDefs.Count -1 do
+ TDAMemIndex(FIndexList[i]).UpdateIndex(FIndexDefs[i]);
+ end;
+ end;
+end;
+
+procedure TDAMemoryDataset.LocalBufferToDatasetBuffer(LocalBuf: PMemDatasetrecord_Native; DatasetBuffer: PMemDatasetrecord);
+begin
+ IntGetRecordList.LockListForReading;
+ try
+ with DatasetBuffer^.BookmarkData do begin
+ Bookmark := TBookmarkData(LocalBuf);
+ BookmarkFlag := bfCurrent;
+ end;
+ DuplicateBuffer(LocalBuf, Pointer(DatasetBuffer),False);
+ finally
+ IntGetRecordList.UnlockListForReading;
+ end;
+end;
+
+procedure TDAMemoryDataset.PrepareIndexForSorting(const aIndexName: string = '');
+var
+ i: integer;
+begin
+ if aIndexName = '' then begin
+ UpdateMemIndexes(-1);
+ For i := 0 to IndexDefs.Count-1 do
+ DoSort(TDAMemIndex(FIndexList[i]));
+ end
+ else begin
+ i:= IndexDefs.IndexOf(aIndexName);
+ if i = -1 then DatabaseErrorFmt(SIndexNotFound,[aIndexName]);
+ UpdateMemIndexes(i);
+ DoSort(TDAMemIndex(FIndexList[i]));
+ end;
+end;
+
+function TDAMemoryDataset.intLocateRecordByIndex(aIndex: TDAMemIndex;
+ const KeyValues: Variant; SyncCursor: Boolean): Boolean;
+var
+ i: integer;
+ Buffer: PMemDatasetrecord;
+ lBookmark: TMemBookmarkData;
+ lLocateStr: TMemLocateStruct;
+begin
+ Result := False;
+ SetLength(lBookmark, BookmarkSize);
+ FillChar(lBookmark, BookmarkSize, 0);
+ if Self.State <> dsBrowse then CheckBrowseMode;
+ CursorPosChanged;
+ Buffer := pointer(TempBuffer);
+ if IsEmpty then Exit;
+ try
+ FillChar(lLocateStr, SizeOf(TMemLocateStruct),0);
+ lLocateStr.lFields := aIndex.IndexFieldNameList;
+ InitMemLocateStruct(@lLocateStr, KeyValues);
+ for i:=0 to lLocateStr.lFields.Count-1 do begin
+ lLocateStr.ldesc[i]:=aIndex.IndexDescFields[i]<>nil;
+ lLocateStr.lcaseIns[i] := aIndex.IndexCaseInsList[i]<>nil;
+ end;
+ lLocateStr.lWorkList:= aIndex.DataList;
+ Result := LocateWithIndex(@lLocateStr,Buffer);
+ if Result then begin
+ SetLength(lBookmark, BookmarkSize);
+ GetBookmarkData(pointer(Buffer), Pointer(lBookmark));
+ end;
+ finally
+ if Result then
+ if SyncCursor then begin
+ Bookmark := lBookmark;
+ UpdateCursorPos;
+ if EOF or BOF then Result := False;
+ end;
+ end;
+end;
+
+procedure TDAMemoryDataset.InitMemLocateStruct(AStruct: PMemLocateStruct;
+ const KeyValues: Variant);
+var
+ i: integer;
+begin
+ with AStruct^ do begin
+ SetLength(lOffsets,lFields.Count);
+ SetLength(lDatatypes,lFields.Count);
+ SetLength(lValues,lFields.Count);
+ SetLength(lnull,lFields.Count);
+ SetLength(ldesc,lFields.Count);
+ SetLength(lcaseIns,lFields.Count);
+ SetLength(lFieldIndexes,lFields.Count);
+ for i:=0 to lFields.Count-1 do begin
+ lFieldIndexes[i]:=TField(lFields[i]).Index;
+ lOffsets[i] := GetBin2FieldOffset(lFieldIndexes[i]);
+ lDatatypes[i] := TField(lFields[i]).DataType;
+ if lFields.Count = 1 then
+ lValues[i].Value := KeyValues
+ else
+ lValues[i].Value := KeyValues[i];
+ lnull[i]:=VarIsEmpty(lValues[i].Value) or VarIsNull(lValues[i].Value);
+ if lDatatypes[i] in ft_AnsiStringValues then
+ lValues[i].AsAnsiString := {$IFDEF UNICODE}AnsiToUtf8{$ENDIF}(VarToStr(lValues[i].Value))
+ else if lDatatypes[i] in ft_WideStringValues then
+ lValues[i].AsWideString := VarToWideStr(lValues[i].Value)
+ else if lDatatypes[i] = ftDateTime then begin
+ case TVarData(lValues[i].Value).VType of
+ varString, varOleStr: lValues[i].Value := StrToDate(lValues[i].Value);
+ end;
+ end;
+ end;
+ end;
+end;
+
+
+function TDAMemoryDataset.CreateBin3Struct(const ASize: Cardinal): Dataset_PAnsiChar;
+begin
+ {$IFDEF FPC}
+ Result := nil;
+ {$ENDIF FPC}
+ GetMem(Result, ASize);
+end;
+
+function TDAMemoryDataset.GetBin3Offset(Buffer: Dataset_PAnsiChar;
+ const aFieldNo: integer): cardinal;
+begin
+ case pByte(buffer+FNullMaskSize)^ of
+ sizeOf(Byte): Result := PByteArray(Buffer+FNullMaskSize+1)^[aFieldNo];
+ sizeOf(word): Result := PWordArray(Buffer+FNullMaskSize+1)^[aFieldNo];
+ sizeOf(Cardinal): Result := PCardinalArray(Buffer+FNullMaskSize+1)^[aFieldNo];
+ else
+ raise Exception.Create('incompatible buffer format');
+ Result := 0;
+ end;
+end;
+
+function TDAMemoryDataset.CreateMemDatasetRecord(const AType: TmrMode;
+ ABin3Size: Cardinal;
+ ADatasetCompatible: Boolean): PMemDatasetrecord_Native;
+var
+ lRecordSize: Cardinal;
+begin
+ if ADatasetCompatible then
+ lRecordSize := SizeOf(TMemDatasetrecord)
+ else
+ lRecordSize := SizeOf(TMemDatasetrecord_Native);
+ {$IFDEF FPC}
+ Result := nil;
+ {$ENDIF}
+ GetMem(Result, lRecordSize);
+ FillChar(Result^,lRecordSize,0);
+ Result.Ident := AType;
+ case AType of
+ mrEmpty: ;
+ mrBin2Style: Result.Data := CreateBin2Struct;
+ mrBin3Style: Result.Data := CreateBin3Struct(ABin3Size);
+ end;
+end;
+
+function TDAMemoryDataset.CreateBin2Struct: Dataset_PAnsiChar;
+begin
+ {$IFDEF FPC}
+ Result := nil;
+ {$ENDIF FPC}
+ GetMem(Result, FNativeRecordSize);
+ FillChar(Result^, FNullMaskSize, $FF);
+ FillChar((Result+FNullMaskSize)^, FNativeRecordSize-FNullMaskSize, 0);
+end;
+
+procedure TDAMemoryDataset.FreeMemDatasetRecord(Buffer: PMemDatasetrecord_Native);
+begin
+ if Buffer <> nil then begin
+ with buffer^ do
+ case Ident of
+ mrBin2Style: FreeBin2Buffer(Data);
+ mrBin3Style: FreeBin3Buffer(Data);
+ mrEmpty:;
+ end;
+ FreeMem(Buffer);
+ end;
+end;
+
+procedure TDAMemoryDataset.FreeBin2Buffer(Buffer: Dataset_PAnsiChar);
+begin
+ if buffer <> nil then ClearBin2Buffer(Buffer);
+ FreeMem(buffer);
+end;
+
+procedure TDAMemoryDataset.FreeBin3Buffer(Buffer: Dataset_PAnsiChar);
+begin
+ FreeMem(buffer);
+end;
+
+procedure TDAMemoryDataset.ConvertBin3ToBin2Record(Buffer: PMemDatasetrecord_Native);
+var
+ i: integer;
+ source, dest: Dataset_PAnsiChar;
+ k,k1: cardinal;
+ p2: PBlobRecord;
+begin
+ case Buffer^.Ident of
+ mrEmpty: begin
+ Buffer^.Data := CreateBin2Struct;
+ Buffer^.Ident := mrBin2Style;
+ end;
+ mrBin2Style: ; //nothing
+ mrBin3Style: begin
+ source := Buffer^.Data;
+ Dest := CreateBin2Struct;
+ Buffer.Data:= Pointer(dest);
+ Buffer.Ident := mrBin2Style;
+ try
+ Move(pointer(Source)^, pointer(Dest)^, FNullMaskSize);
+
+ for I := 0 to FieldCount - 1 do begin
+ if (not GetNullMask(Source, i)) then begin
+ k := GetBin3Offset(Source, i);
+ k1:= GetBin3Offset(Source, i+1);
+ if not IsReferencedField(FDataTypeArray[i]) then begin
+ Move(pointer(Source + k)^, pointer(Dest + FOffsets[i])^, k1-k)
+ end
+ else begin
+ case FDataTypeArray[i] of
+ ftString,ftFixedChar: PAnsiString(Dest + FOffsets[i])^ := PAnsiString(Source + k)^;
+ ftWideString: PWideString(Dest + FOffsets[i])^ := PWideString(Source + k)^;
+ else
+ if FDataTypeArray[i] in ft_BlobTypes then begin
+ p2 := CreateBlobRecord(k1-k);
+ Move(pointer(Source + k)^, pointer(@p2.Data)^, k1-k);
+ PPointer(Dest + FOffsets[i])^ := p2;
+ end;
+ end;
+ end;
+ end;
+ end;
+ finally
+ FreeBin3Buffer(source);
+ end;
+ end;
+ end;
+end;
+
+function TDAMemoryDataset.CalculateRecordsSize: Cardinal;
+var
+ i,j: integer;
+ List: TMemList;
+ buf: Dataset_PAnsiChar;
+begin
+ if FCloneSource <> nil then
+ Result := FCloneSource.CalculateRecordsSize
+ else begin
+ Result:=0;
+ List:=FRecordsList.LockListForReading;
+ try
+ inc(Result, SizeOf(TMemDatasetrecord_Native)*List.Count);
+ For i:= 0 To List.Count-1 do begin
+ buf:=PMemDatasetrecord_Native(List[i])^.Data;
+ case PMemDatasetrecord_Native(List[i])^.Ident of
+ mrBin2Style : begin
+ inc(Result,FNativeRecordSize);
+ For j := 0 to FieldCount-1 do begin
+ if not GetNullMask(buf,j) then begin
+ if FDataTypeArray[j] in ft_BlobTypes then
+ inc(Result, PBlobRecord(PPointer(buf + FOffsets[j])^)^.size)
+ else if FStoreStringsAsReference then
+ case FDataTypeArray[j] of
+ ftString, ftFixedChar : inc(Result,Length(PAnsiString(buf + FOffsets[j])^)*SizeOf(AnsiChar));
+ ftWideString:inc(Result,Length(PWideString(buf + FOffsets[j])^)*SizeOf(WideChar));
+ end;
+ end;
+ end;
+ end;
+ mrBin3Style : inc(Result,GetBin3Offset(buf,FieldCount));
+ end;
+ end;
+ finally
+ FRecordsList.UnlockListForReading;
+ end;
+ end;
+end;
+
+procedure TDAMemoryDataset.ClearBin2Buffer(Buffer: Dataset_PAnsiChar);
+var
+ i: integer;
+begin
+ if FHasReferencedFields then begin
+ for I := 0 to FieldCount - 1 do
+ if (not GetNullMask(Buffer, i)) and
+ IsReferencedField(FDataTypeArray[i]) and
+ (PPointer(Buffer + FOffsets[i])^ <> nil) then
+ ClearFieldByFieldType(Buffer + FOffsets[i], FDataTypeArray[i]);
+ end;
+end;
+
+function WStrLen(const Str: PWideChar): Cardinal;
+var
+ P : PWideChar;
+begin
+ P := Str;
+ while (P^ <> #0) do Inc(P);
+ Result := (P - Str);
+end;
+
+procedure TDAMemoryDataset.ConvertBin2ToBin3Record(ASource : PMemDatasetrecord_Native);
+var
+ lbin2, lbin3: Dataset_PAnsiChar;
+begin
+ if ASource^.Ident = mrBin2Style then begin
+ lbin2 := ASource^.Data;
+ lBin3 := Bin2ToBin3(lBin2);
+ if lbin3 <> nil then begin
+ FreeBin2Buffer(lBin2);
+ ASource^.Data := lBin3;
+ ASource^.Ident := mrBin3Style;
+ end;
+ end;
+end;
+
+procedure TDAMemoryDataset.CompactRecords;
+var
+ List: TMemList;
+ i: integer;
+begin
+ if FCloneSource <> nil then
+ FCloneSource.CompactRecords
+ else begin
+ List := FRecordsList.LockListForWriting;
+ try
+ for i:= 0 to List.Count -1 do
+ try
+ ConvertBin2ToBin3Record(List.FList^[i]);
+ except
+ FAutoCompactRecords := FAutoCompactRecords;
+ end;
+ finally
+ FRecordsList.UnlockListForWriting;
+ end;
+ end;
+end;
+
+function TDAMemoryDataset.Bin2ToBin3(ASource: Dataset_PAnsiChar): Dataset_PAnsiChar;
+var
+ i: integer;
+ p1: Dataset_PAnsiChar;
+ lBin2RecordSize, dx: cardinal;
+ lBlobPresent: boolean;
+ loffsets: array of cardinal;
+ lBin2DataSize: array of cardinal;
+ lDatatypeSize: Byte;
+ buf: Dataset_PAnsiChar;
+begin
+ Result := nil;
+ lBin2RecordSize := 0;
+ lBlobPresent := False;
+ SetLength(loffsets, FieldCount+1);
+ SetLength(lBin2DataSize, FieldCount);
+ loffsets[0] := 0;
+ For i := 0 to FieldCount-1 do begin
+ if GetNullMask(ASource, i) then begin
+ lBin2DataSize[i] := 0;
+ end
+ else begin
+ if FDataTypeArray[i] in ft_BlobTypes then begin
+ lBlobPresent := True;
+ lBin2DataSize[i] := PBlobRecord(PPointer(ASource + FOffsets[i])^)^.size;
+ end
+ else if FDataTypeArray[i] in [ftString, ftFixedChar] then begin
+ if FStoreStringsAsReference then
+ lBin2DataSize[i] := Length(PAnsiString(ASource + FOffsets[i])^)
+ else
+ lBin2DataSize[i] := StrLen(PAnsiChar(ASource + FOffsets[i]));
+ inc(lBin2DataSize[i],SizeOf(AnsiChar)); // #0
+ end
+ else if FDataTypeArray[i] in [ftWideString] then begin
+ if FStoreStringsAsReference then
+ lBin2DataSize[i] := Length(PWideString(ASource + FOffsets[i])^)*SizeOf(WideChar)
+ else
+ lBin2DataSize[i] := WStrLen(PWideChar(ASource + FOffsets[i]))*SizeOf(WideChar);
+ inc(lBin2DataSize[i], SizeOf(WideChar)); // #0
+ end
+ else
+ lBin2DataSize[i]:= FDataSizeArray[i];
+ end;
+ loffsets[i+1] := loffsets[i]+ lBin2DataSize[i];
+ inc(lBin2RecordSize, lBin2DataSize[i]);
+ end;
+ inc(lBin2RecordSize, FNullMaskSize+SizeOf(Byte));
+ if lBin2RecordSize <= $FF - (Cardinal(FieldCount)+1)*SizeOf(Byte) then
+ lDatatypeSize := SizeOf(Byte)
+ else if lBin2RecordSize <= $FFFF - Cardinal(FieldCount+1)*SizeOf(Word) then
+ lDatatypeSize := SizeOf(Word)
+ else
+ lDatatypeSize := SizeOf(Cardinal);
+ inc(lBin2RecordSize,(FieldCount+1)*lDatatypeSize);
+ if (FNativeRecordSize > lBin2RecordSize) or FStoreStringsAsReference or lBlobPresent then begin
+ // convert it!
+ Result:=CreateBin3Struct(lBin2RecordSize);
+ p1 := Result;
+ move(ASource^, p1^, FNullMaskSize);
+ PByte(p1 + FNullMaskSize)^ := lDatatypeSize;
+ dx:=FNullMaskSize+SizeOf(Byte);
+ inc(p1, dx);
+ inc(dx,(FieldCount+1)*lDatatypeSize);
+ case lDatatypeSize of
+ SizeOf(Byte): for i:=0 to FieldCount do PBytearray(p1)^[i] := loffsets[i]+dx;
+ SizeOf(Word): for i:=0 to FieldCount do PWordArray(p1)^[i] := loffsets[i]+dx;
+ SizeOf(Cardinal): for i:=0 to FieldCount do PCardinalArray(p1)^[i] := loffsets[i]+dx;
+ end;
+ inc(p1, (FieldCount+1)*lDatatypeSize);
+ for i:=0 to FieldCount-1 do begin
+ if lBin2DataSize[i] > 0 then begin
+ buf := ASource + FOffsets[i];
+ if FDataTypeArray[i] in ft_BlobTypes then begin
+ move(PBlobRecord(PPointer(buf)^)^.Data, p1^,lBin2DataSize[i]);
+ end
+ else if FDataTypeArray[i] in [ftString, ftFixedChar] then begin
+ dx := lBin2DataSize[i]-SizeOf(AnsiChar);
+ if FStoreStringsAsReference then
+ Move(pointer(PAnsiString(buf)^)^, p1^, dx)
+ else
+ move(buf^, p1^, dx);
+ PAnsiChar(p1+dx)^ := #0;
+ end
+ else if FDataTypeArray[i] in [ftWideString] then begin
+ dx := lBin2DataSize[i] - SizeOf(WideChar);
+ if FStoreStringsAsReference then
+ Move(pointer(PWideString(buf)^)^, p1^, dx)
+ else
+ move(buf^, p1^, dx);
+ PWideChar(p1+dx)^ := #0;
+ end
+ else
+ move(buf^, p1^, lBin2DataSize[i]);
+ inc(p1, lBin2DataSize[i]);
+ end;
+ end;
+ end;
+end;
+
+
+procedure TDAMemoryDataset.SetAutoPackRecords(const Value: boolean);
+begin
+ FAutoCompactRecords := Value;
+ if FAutoCompactRecords then CompactRecords;
+end;
+
+{ TDABlobStream }
+
+constructor TDABlobStream.Create(Field: TBlobField; Mode: TBlobStreamMode);
+var
+ lbuf: Dataset_PAnsiChar;
+begin
+ inherited Create;
+ FMode := Mode;
+ FField := Field;
+ FDataSet := FField.DataSet as TDAMemoryDataset;
+ if not FDataSet.GetActiveRecBuf(lBuf) then Exit;
+ FBuffer := PMemDatasetrecord_Native(lBuf);
+ if not FField.Modified and (Mode <> bmRead) then begin
+ if FField.ReadOnly then DatabaseErrorFmt({$IFDEF FPC}SReadOnlyField{$ELSE}SFieldReadOnly{$ENDIF}, [FField.DisplayName]);
+ if not (FDataSet.State in [dsEdit, dsInsert]) then DatabaseError(SNotEditing);
+ FCached := True;
+ end
+ else
+ FCached := (lBuf = FDataSet.ActiveBuffer);
+ FOpened := True;
+ if Mode = bmWrite then Truncate;
+end;
+
+destructor TDABlobStream.Destroy;
+begin
+ if FOpened and FModified then FField.Modified := True;
+ if FModified then try
+ FDataSet.DataEvent(deFieldChange, Longint(FField));
+ except
+ {$IFDEF FPC}
+ if assigned(classes.ApplicationHandleException) then
+ classes.ApplicationHandleException(self)
+ else
+ ShowException(ExceptObject,ExceptAddr);
+ {$ELSE}
+ Application.HandleException(Self);
+ {$ENDIF}
+ end;
+ inherited Destroy;
+end;
+
+procedure TDABlobStream.GetBLOBRecordFromRecord(Field: TField; out aLocked:Boolean; out blob_size: integer; out blob_data: pointer);
+var
+ Pos: Integer;
+begin
+ Pos := FDataSet.FRecordPos;
+ if (Pos < 0) and (FDataSet.RecordCount > 0) then
+ Pos := 0
+ else if Pos >= FDataSet.RecordCount then
+ Pos := FDataSet.RecordCount - 1;
+ if (Pos >= 0) and (Pos < FDataSet.RecordCount) then begin
+ GetBLOBRecordFromBuffer(FDataSet.IntGetRecordList.LockListForReading[Pos], Field, blob_size, blob_data);
+ ALocked:=True;
+ end
+ else begin
+ blob_data:=nil;
+ blob_size:=0;
+ end;
+end;
+
+function TDABlobStream.GetBlobSize: Longint;
+var
+ llocked: Boolean;
+ ldata: pointer;
+begin
+ Result := 0;
+ if FOpened then begin
+ if FCached then begin
+ GetBLOBRecordFromBuffer(FBuffer, FField,Result,ldata);
+ end
+ else begin
+ GetBLOBRecordFromRecord(FField, llocked,Result, ldata);
+ if llocked then FDataSet.IntGetRecordList.UnlockListForReading;
+ end;
+ end;
+end;
+
+function TDABlobStream.GetBLOBRecordFromBuffer(Buffer: PMemDatasetrecord_Native; Field: TField;out blob_size: integer; out blob_data: pointer): PBLOBRecord;
+begin
+ case Buffer^.Ident of
+ mrBin2Style: begin
+ Result := PPointer(FDataSet.IntFindFieldData(Buffer^.Data, Field, True))^;
+ if Result <> nil then begin
+ with Result^ do begin
+ blob_data := @Data;
+ blob_size := size;
+ end;
+ end
+ else begin
+ blob_data := nil;
+ blob_size := 0;
+ end;
+ end;
+ mrBin3Style: begin
+ blob_size := FDataSet.GetBin3Offset(Buffer^.Data,Field.Index+1)-FDataSet.GetBin3Offset(Buffer^.Data,Field.Index);
+ blob_data := FDataSet.IntFindFieldData(Buffer^.Data, Field, False);
+ Result := nil;
+ end;
+ else
+ blob_data := nil;
+ blob_size := 0;
+ Result := nil;
+ end;
+end;
+
+function TDABlobStream.Read(var Buffer; Count: Integer): Longint;
+var
+ llocked: boolean;
+ lData: pointer;
+ lSize: integer;
+begin
+ llocked:=False;
+ Result := 0;
+ if FOpened then begin
+ if Count > Size - FPosition then
+ Result := Size - FPosition
+ else
+ Result := Count;
+ if Result > 0 then begin
+ if FCached then
+ GetBLOBRecordFromBuffer(FBuffer, FField,lSize,lData)
+ else
+ GetBLOBRecordFromRecord(FField,llocked,lSize,lData);
+ try
+ if lSize <> 0 then begin
+ Move(Dataset_PAnsiChar(lData)[FPosition], Buffer, Result);
+ Inc(FPosition, Result);
+ end;
+ finally
+ if llocked then FDataSet.IntGetRecordList.UnlockListForReading;
+ end;
+ end;
+ end;
+end;
+
+function TDABlobStream.Seek(Offset: Integer; Origin: Word): Longint;
+begin
+ case Origin of
+ soFromBeginning: FPosition := Offset;
+ soFromCurrent: Inc(FPosition, Offset);
+ soFromEnd: FPosition := GetBlobSize + Offset;
+ end;
+ Result := FPosition;
+end;
+
+procedure TDABlobStream.Truncate;
+begin
+ if FOpened and FCached and (FMode <> bmRead) then begin
+ FDataset.ConvertBin3ToBin2Record(FBuffer);
+ FDataset.ClearBin2Field(FBuffer^.Data, FField);
+ FModified := True;
+ end;
+end;
+
+function TDABlobStream.Write(const Buffer; Count: Integer): Longint;
+var
+ Temp: PBLOBRecord;
+ lblobSize: integer;
+ lBlobData: pointer;
+begin
+ Result := 0;
+ if FOpened and FCached and (FMode <> bmRead) then begin
+ Temp := GetBLOBRecordFromBuffer(FBuffer, FField,lblobSize,lBlobData);
+ if temp = nil then begin
+ temp := CreateBlobRecord(FPosition + Count);
+ end
+ else if Temp.size + SizeOf(TBLOBRecord) < Cardinal(FPosition + Count) then begin
+ ReallocMem(temp, SizeOf(TBLOBRecord) + FPosition); // compact date before realloc
+ ReallocMem(temp, SizeOf(TBLOBRecord) + FPosition + Count);
+ inc(Temp.size, Count);
+ end;
+ Move(Buffer, PAnsiChar(@Temp.Data)[FPosition], Count);
+ FDataset.SetBlobData(FField, FBuffer, Temp);
+ Inc(FPosition, Count);
+ Result := Count;
+ FModified := True;
+ end;
+end;
+
+{ TThreadMemList }
+
+procedure TThreadMemList.Add(Item: Pointer);
+begin
+ LockListForWriting;
+ try
+ FList.Add(Item);
+ finally
+ UnlockListForWriting;
+ end;
+end;
+
+procedure TThreadMemList.Clear;
+begin
+ LockListForWriting;
+ try
+ FList.Clear;
+ finally
+ UnlockListForWriting;
+ end;
+end;
+
+constructor TThreadMemList.Create;
+begin
+ inherited Create;
+ {$IFDEF FPC}
+ InitCriticalSection(FLock);
+ {$ELSE}
+ InitializeCriticalSection(FLock);
+ {$ENDIF}
+ FList := TMemList.Create;
+ FReadLock:=0;
+end;
+
+destructor TThreadMemList.Destroy;
+begin
+ LockListForWriting; // Make sure nobody else is inside the list.
+ try
+ FList.Free;
+ inherited Destroy;
+ finally
+ UnlockListForWriting;
+ {$IFDEF FPC}
+ DoneCriticalSection(FLock);
+ {$ELSE}
+ DeleteCriticalSection(FLock);
+ {$ENDIF}
+ end;
+end;
+
+function TThreadMemList.LockListForReading: TMemList;
+begin
+ if FReadLock = 0 then EnterCriticalSection(FLock);
+ inc(FReadLock);
+ Result := FList;
+end;
+
+function TThreadMemList.LockListForWriting: TMemList;
+begin
+ EnterCriticalSection(FLock);
+ Result := FList;
+end;
+
+procedure TThreadMemList.Remove(Item: Pointer);
+begin
+ LockListForWriting;
+ try
+ FList.Remove(Item);
+ finally
+ UnlockListForWriting;
+ end;
+end;
+
+
+procedure TThreadMemList.UnlockListForReading;
+begin
+ Dec(FReadLock);
+ if FReadLock = 0 then LeaveCriticalSection(FLock);
+end;
+
+procedure TThreadMemList.UnlockListForWriting;
+begin
+ LeaveCriticalSection(FLock);
+end;
+
+{$IFDEF BDS4UP}{$REGION 'MEM_PACKETRECORDS'}{$ENDIF BDS4UP}
+{$IFDEF MEM_PACKETRECORDS}
+{ TMemPackedRecord }
+
+constructor TMemPackedRecord.Create(AOwner: TMemPackedRecords);
+begin
+ fOwner := AOwner;
+ if AOwner = nil then DatabaseError('AOwner should be assigned');
+ fBuffer:= AOwner.fOwner.IntAllocRecordBuffer(True);
+end;
+
+destructor TMemPackedRecord.Destroy;
+begin
+ fOwner.fOwner.IntFreeRecordBuffer(fBuffer);
+ inherited;
+end;
+
+function TMemPackedRecord.GetIsNull(Index: Integer): Boolean;
+begin
+ Result := fOwner.fOwner.GetNullMask(fBuffer,Index);
+end;
+
+function TMemPackedRecord.GetValues(Index: Integer): Variant;
+begin
+ Result := FOwner.fOwner.GetVarValueFromBuffer(fBuffer,FOwner.fOwner.Fields[Index]);
+end;
+
+function TMemPackedRecord.GetValuesByFieldName(AName: string): Variant;
+begin
+ Result := FOwner.fOwner.GetVarValueFromBuffer(fBuffer,FOwner.fOwner.FieldByName(AName));
+end;
+
+procedure TMemPackedRecord.SetIsNull(Index: Integer; const Value: Boolean);
+begin
+ fOwner.fOwner.ClearBin2Field(fBuffer,fOwner.fOwner.Fields[Index]);
+ fOwner.fOwner.SetNullMask(fBuffer,Index,Value);
+end;
+
+procedure TMemPackedRecord.SetValues(Index: Integer; const Value: Variant);
+begin
+
+end;
+
+procedure TMemPackedRecord.SetValuesByFieldName(AName: string;
+ const Value: Variant);
+begin
+
+end;
+
+{ TMemPackedRecords }
+
+function TMemPackedRecords.Add: TMemPackedRecord;
+begin
+ Result:= TMemPackedRecord.Create(Self);
+ fList.Add(Result);
+end;
+
+procedure TMemPackedRecords.Clear;
+var
+ i: integer;
+begin
+ For i:= 0 to fList.Count - 1 do
+ TMemPackedRecord(fList[i]).Free;
+ fList.Clear;
+end;
+
+constructor TMemPackedRecords.Create(AOwner: TDAMemoryDataset);
+begin
+ fOwner := AOwner;
+ fList := TList.Create;
+end;
+
+procedure TMemPackedRecords.Delete(aIndex: integer);
+var
+ lRec: TMemPackedRecord;
+begin
+ lRec := TMemPackedRecord(fList.Items[aIndex]);
+ fList.Delete(aIndex);
+ lRec.Free;
+end;
+
+destructor TMemPackedRecords.Destroy;
+begin
+ Clear;
+ fList.Free;
+ inherited;
+end;
+
+function TMemPackedRecords.GetCount: Integer;
+begin
+ Result:= fList.Count;
+end;
+
+function TMemPackedRecords.GetItems(Index: Integer): TMemPackedRecord;
+begin
+ Result := TMemPackedRecord(fList[Index]);
+end;
+{$ENDIF MEM_PACKETRECORDS}
+{$IFDEF BDS4UP}{$ENDREGION}{$ENDIF BDS4UP}
+
+{ TDAMemIndex }
+
+procedure TDAMemIndex.Clear;
+begin
+ FInit_FieldNames:= '';
+ FInit_CaseInsFields:='';
+ FInit_DescFields:='';
+ FIndexDef_Options:= [];
+ FIndexDef_Fields:='';
+ FIndexDef_DescFields:='';
+ FIndexDef_CaseInsFields:='';
+ FIndexCaseInsList.Clear;
+ FIndexDescFields.Clear;
+ FIndexFieldNameList.Clear;
+ FSortDescMode := False;
+ FDataList.Clear;
+ FLastSorted := 0;
+end;
+
+constructor TDAMemIndex.Create(AOwner: TDAMemoryDataset);
+begin
+ inherited Create;
+ FOwner := AOwner;
+ FIndexCaseInsList:= TList.Create;
+ FIndexDescFields := TList.Create;
+ FIndexFieldNameList := TList.Create;
+ FSortDescMode := False;
+ FInitFromIndexDef := False;
+ FLastSorted := 0;
+ FDataList:=TMemList.Create;
+end;
+
+destructor TDAMemIndex.Destroy;
+begin
+ Clear;
+ FIndexCaseInsList.Free;
+ FIndexDescFields.Free;
+ FIndexFieldNameList.Free;
+ FDataList.Free;
+ inherited;
+end;
+
+{$IFDEF DELPHI10UP}
+{$WARN SYMBOL_DEPRECATED OFF}
+{$ENDIF DELPHI10UP}
+procedure TDAMemIndex.Init(const AFieldNames: string; const CaseInsFields: string = ''; const DescFields: string='');
+var
+ pos1: integer;
+ fld: TField;
+ j: integer;
+begin
+ Clear;
+ FInit_FieldNames:= AFieldNames;
+ FInit_CaseInsFields:=CaseInsFields;
+ FInit_DescFields:=DescFields;
+
+ Pos1 := 1;
+ while Pos1 <= Length(AFieldNames) do begin
+ Fld := FOwner.FieldByName(ExtractFieldName(AFieldNames, Pos1));
+ FOwner.ValidateFieldForIndex(Fld);
+ FIndexFieldNameList.Add(Fld);
+ end;
+
+ //CaseInsFields
+ FIndexCaseInsList.Count := FIndexFieldNameList.Count;
+ Pos1 := 1;
+ while Pos1 <= Length(CaseInsFields) do begin
+ Fld := FOwner.FieldByName(ExtractFieldName(CaseInsFields, Pos1));
+ j := FIndexFieldNameList.IndexOf(Fld);
+ if j <> -1 then FIndexCaseInsList[j]:=pointer(1) ;
+ end;
+
+ // DescFields
+ FIndexDescFields.Count := FIndexFieldNameList.Count;
+ Pos1 := 1;
+ while Pos1 <= Length(DescFields) do begin
+ Fld := FOwner.FieldByName(ExtractFieldName(DescFields, Pos1));
+ j:= IndexFieldNameList.IndexOf(Fld);
+ if j <> -1 then FIndexDescFields[j]:=pointer(1);
+ end;
+end;
+{$IFDEF DELPHI10UP}
+{$WARN SYMBOL_DEPRECATED ON}
+{$ENDIF DELPHI10UP}
+
+
+function TDAMemIndex.GetDataList: TMemList;
+begin
+ if FInitFromIndexDef then
+ Result := FDataList
+ else
+ Result := FOwner.FDataList;
+end;
+
+procedure TDAMemIndex.Init(AIndexDef: TIndexDef);
+var
+ lCaseInsField, lDescFields: string;
+begin
+ lCaseInsField := AIndexDef.CaseInsFields;
+ if (lCaseInsField = '') and (ixCaseInsensitive in AIndexDef.Options) then
+ lCaseInsField := AIndexDef.Fields;
+ lDescFields := AIndexDef.DescFields;
+ if (lDescFields = '') and (ixDescending in AIndexDef.Options) then
+ lDescFields := AIndexDef.Fields;
+ Init(AIndexDef.Fields, lCaseInsField,lDescFields);
+ FInitFromIndexDef := True;
+ FIndexDef_Options:=AIndexDef.Options;
+ FIndexDef_Fields:=AIndexDef.Fields;
+ FIndexDef_DescFields:=AIndexDef.DescFields;
+ FIndexDef_CaseInsFields:=AIndexDef.CaseInsFields;
+end;
+
+procedure TDAMemIndex.Init(const Fields: string; CaseInsensitive,
+ Descending: Boolean);
+var
+ i: integer;
+begin
+ Init(Fields);
+
+ if CaseInsensitive then FInit_CaseInsFields := FInit_FieldNames;
+ for i:= 0 to IndexCaseInsList.Count-1 do
+ IndexCaseInsList[i]:= Pointer({$IFDEF FPC}PtrUInt{$ELSE}cardinal{$ENDIF}(ord(CaseInsensitive)));
+
+ if Descending then FInit_DescFields := FInit_FieldNames;
+ FSortDescMode:= Descending;
+ for i:= 0 to IndexDescFields.Count-1 do
+ IndexDescFields[i]:= Pointer({$IFDEF FPC}PtrUInt{$ELSE}cardinal{$ENDIF}(ord(Descending)));
+end;
+
+function TDAMemIndex.IsValid: boolean;
+begin
+ Result := FIndexFieldNameList.Count > 0;
+end;
+
+procedure TDAMemIndex.UpdateIndex(AIndexDef: TIndexDef);
+begin
+ if not ((AIndexDef.Fields = FIndexDef_Fields) and
+ (AIndexDef.CaseInsFields = FIndexDef_CaseInsFields) and
+ (AIndexDef.DescFields = FIndexDef_DescFields) and
+ (AIndexDef.Options = FIndexDef_Options)) then Init(AIndexDef);
+end;
+
+function TDAMemIndex.isCanUsed(const Fields: string; CaseInsensitive: Boolean): boolean;
+var
+ lcase: string;
+begin
+ if CaseInsensitive then lcase:= Fields else lcase := '';
+ Result :=
+ IsValid and
+ (FLastSorted > FOwner.FLastUpdate) and
+ // eugene: 20080407: AnsiSameText
+ AnsiSameText(FInit_FieldNames,Fields) and
+ AnsiSameText(FInit_CaseInsFields,lcase) and
+ (AnsiSameText(FInit_DescFields,Fields) or (FInit_DescFields=''));
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDAMySQLInterfaces.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAMySQLInterfaces.pas
new file mode 100644
index 0000000..c9141cd
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAMySQLInterfaces.pas
@@ -0,0 +1,682 @@
+unit uDAMySQLInterfaces;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ SysUtils,
+ uDAInterfaces, uDAEngine, uROClasses;
+
+type
+ { IDAMySQLConnection
+ For identification purposes Implemented by all MySQL connections }
+ IDAMySQLConnection = interface(IDAConnection)
+ ['{EB62495C-E922-45B3-B8DC-5DFCD787D3C8}']
+ end;
+
+ TDAMySQLDriver = class(TDAEDriver)
+ protected
+ function GetAvailableDriverOptions: TDAAvailableDriverOptions; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure GetAuxParams(const AuxDriver: string; out List: IROStrings); override;
+ function GetDefaultCustomParameters: string; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ public
+ end;
+
+ TDAMySQLConnection = class(TDAEConnection, IDAMySQLConnection, IDACanQueryDatabaseNames)
+ private
+ protected
+ function GetTableSchema: string; virtual;
+ function useUnicode:Boolean; virtual;
+ protected
+ function DoGetLastAutoInc(const GeneratorName: string): integer; override;
+ procedure DoGetStoredProcedureNames(out List: IROStrings); override;
+ function GetDatabaseNames: IROStrings;
+ procedure DoGetTableNames(out List: IROStrings); override;
+ procedure DoGetViewNames(out List: IROStrings); override;
+ procedure DoGetForeignKeys(out ForeignKeys: TDADriverForeignKeyCollection); override;
+ procedure DoGetTableFields(const aTableName: string; out Fields: TDAFieldCollection); override;
+ procedure DoGetStoredProcedureParams(const aStoredProcedureName: string; out Params: TDAParamCollection); override;
+ function IdentifierNeedsQuoting(const iIdentifier: string): boolean; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ public
+ end;
+
+function MySQL_GetLastAutoInc(const GeneratorName: string; Query: IDADataset): integer;
+function MYSQL_GetDefaultCustomParameters: string;
+procedure MYSQL_GetAuxParams(List: IROStrings);
+function MYSQL_GetDatabaseNames(Query: IDADataset): IROStrings;
+procedure MYSQL_DoGetNames(Query: IDADataset; AList: IROStrings; AObjectType: TDAObjecttype; aSchema: string);
+procedure MYSQL_DoGetForeignKeys(Query: IDADataset; ForeignKeys: TDADriverForeignKeyCollection; aSchema: string);
+procedure MYSQL_DoGetTableFields(const aTableName: string; Query: IDADataset; out Fields: TDAFieldCollection; aSchema: string; useUnicode: Boolean=False);
+procedure MYSQL_DoGetStoredProcedureParams(const aStoredProcedureName: string; Query: IDADataset; out Params: TDAParamCollection; aSchema: string);
+function MYSQL_IdentifierNeedsQuoting(const iIdentifier: string): boolean;
+
+const
+ MySQL_DriverType = 'MySQL';
+
+implementation
+uses
+ uDAUtils, StrUtils;
+
+var
+ mysql_reservedwords : array of string;
+
+function MySQL_GetLastAutoInc(const GeneratorName: string; Query: IDADataset): integer;
+begin
+ try
+ Query.SQL := 'SELECT LAST_INSERT_ID()';
+ Query.Open;
+ Result := Query.Fields[0].AsInteger;
+ finally
+ Query := nil;
+ end;
+end;
+
+function MYSQL_GetDefaultCustomParameters: string;
+begin
+ Result := 'Port=3306;';
+end;
+
+procedure MYSQL_GetAuxParams(List: IROStrings);
+begin
+ List.Add('Port=');
+end;
+{ TDAMySQLDriver }
+
+procedure TDAMySQLDriver.GetAuxParams(const AuxDriver: string;
+ out List: IROStrings);
+begin
+ inherited;
+ MYSQL_GetAuxParams(List);
+end;
+
+function TDAMySQLDriver.GetAvailableDriverOptions: TDAAvailableDriverOptions;
+begin
+ result := [doServerName, doDatabaseName, doLogin, doCustom];
+end;
+
+function TDAMySQLDriver.GetDefaultCustomParameters: string;
+begin
+ Result := MYSQL_GetDefaultCustomParameters;
+end;
+
+function MYSQL_GetDatabaseNames(Query: IDADataset): IROStrings;
+begin
+ Result := NewROStrings;
+ try
+ Query.SQL := 'SHOW DATABASES';
+ Query.Open;
+ while not Query.Eof do begin
+ Result.Add(Query.Fields[0].AsString);
+ Query.Next;
+ end;
+ finally
+ Query := nil;
+ end;
+end;
+
+procedure MYSQL_DoGetNames(Query: IDADataset; AList: IROStrings; AObjectType: TDAObjecttype; aSchema: string);
+const
+ sDoGetTableNames =
+ 'SELECT TABLE_NAME ' +
+ 'FROM INFORMATION_SCHEMA.TABLES ' +
+ 'WHERE TABLE_TYPE = ''%s'' AND TABLE_SCHEMA = ''%s''';
+ sDOGetProcedures =
+ 'SELECT ROUTINE_NAME ' +
+ 'FROM INFORMATION_SCHEMA.ROUTINES ' +
+ 'WHERE ROUTINE_TYPE = ''PROCEDURE'' AND ROUTINE_SCHEMA = ''%s''';
+begin
+ try
+ case AObjectType of
+ dotTable: Query.SQL := Format(sDoGetTableNames, ['BASE TABLE', aSchema]);
+ dotView: Query.SQL := Format(sDoGetTableNames, ['VIEW', aSchema]);
+ dotProcedure: Query.SQL := Format(sDOGetProcedures, [aSchema]);
+ end;
+ Query.Open;
+ while not Query.Eof do begin
+ Alist.Add(Query.Fields[0].AsString);
+ Query.Next;
+ end;
+ finally
+ Query := nil;
+ end;
+end;
+
+procedure MYSQL_DoGetForeignKeys(Query: IDADataset; ForeignKeys: TDADriverForeignKeyCollection; aSchema: string);
+var
+ lCurrConstraint : string;
+ lCurrFK : TDADriverForeignKey;
+const
+ sFK_SQL =
+ 'SELECT ' +
+ 'TABLE_NAME, REFERENCED_TABLE_NAME, COLUMN_NAME, REFERENCED_COLUMN_NAME ' +
+ 'FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE ' +
+ 'WHERE CONSTRAINT_SCHEMA=''%s'' AND REFERENCED_TABLE_NAME IS NOT NULL';
+begin
+ lCurrConstraint := '';
+ lCurrFK := nil;
+ try
+ Query.SQL := Format(sFK_SQL, [aSchema]);
+ Query.Open;
+
+ ForeignKeys.Clear;
+ while (not Query.EOF) do begin
+
+ if lCurrConstraint <> Query.Fields[0].AsString + '|' + Query.Fields[1].AsString then begin
+ lCurrConstraint := Query.Fields[0].AsString + '|' + Query.Fields[1].AsString;
+
+ lCurrFK := ForeignKeys.Add();
+ with lCurrFK do begin
+ PKTable := TrimRight(Query.Fields[0].AsString);
+ FKTable := TrimRight(Query.Fields[1].AsString);
+ PKField := TrimRight(Query.Fields[2].AsString);
+ FKField := TrimRight(Query.Fields[3].AsString);
+ end;
+ end else begin
+ with lCurrFK do begin
+ PKField := PKField + ';' + TrimRight(Query.Fields[2].AsString);
+ FKField := FKField + ';' + TrimRight(Query.Fields[3].AsString);
+ end;
+ end;
+ Query.Next;
+ end;
+ finally
+ Query := nil;
+ end;
+end;
+
+function MySQLDataTypeToDA(aDataType: string; Unicode, AutoInc, Unsigned: boolean): TDADataType;
+begin
+ aDataType := LowerCase(aDataType);
+ if (aDAtaType = 'char') or (aDAtaType = 'varchar') or
+ (aDAtaType = 'binary') or (aDAtaType = 'varbinary') or
+ (aDataType = 'enum') or (aDataType = 'set') then begin
+ if Unicode then
+ Result := datWideString
+ else
+ Result := datString;
+ end
+ else if (aDataType = 'text') or (aDataType = 'longtext') or
+ (aDataType = 'tinytext') or (aDataType = 'mediumtext') then begin
+ if Unicode then
+ Result := datWideMemo
+ else
+ Result := datMemo;
+ end
+ else if (aDataType = 'blob') or (aDataType = 'tinyblob') or
+ (aDataType = 'mediumblob') or (aDataType = 'longblob') then
+ Result := datBlob
+ else if (aDataType = 'date') or (aDataType = 'time') or (aDataType = 'datetime') or (aDataType = 'timestamp') then
+ result := datDateTime
+ else if (aDataType = 'bit') then
+ Result := datLargeUInt
+ else if (aDataType = 'tinyint') then begin
+ if Unsigned then
+ result := datByte
+ else
+ result := datShortInt
+ end
+ else if (aDataType = 'smallint') then begin
+ if Unsigned then
+ Result := datWord
+ else
+ Result := datSmallInt
+ end
+ else if (aDataType = 'year') then
+ Result := datWord
+ else if (aDataType = 'mediumint') or (aDataType = 'int') or (aDataType = 'integer') then begin
+ if AutoInc then
+ Result := datAutoInc
+ else if Unsigned then
+ Result := datCardinal
+ else
+ result := datInteger
+ end
+ else if (aDataType = 'bigint') then begin
+ if AutoInc then
+ Result := datLargeAutoInc
+ else if Unsigned then
+ Result := datLargeUInt
+ else
+ result := datLargeInt
+ end
+ else if (aDataType = 'float') then begin
+ Result := datSingleFloat
+ end
+ else if (aDataType = 'double') then begin
+ Result := datFloat
+ end
+ else if (aDataType = 'decimal') then
+ result := datDecimal
+ else
+ result := datUnknown;
+end;
+
+procedure MYSQL_DoGetTableFields(const aTableName: string; Query: IDADataset; out Fields: TDAFieldCollection; aSchema: string; useUnicode: Boolean);
+const
+ sGetTableFields =
+ 'SELECT ' +
+ //TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, ORDINAL_POSITION, COLUMN_DEFAULT, IS_NULLABLE, DATA_TYPE, CHARACTER_MAXIMUM_LENGTH, CHARACTER_OCTET_LENGTH, CHARACTER_SET_NAME, COLLATION_NAME, COLUMN_TYPE, COLUMN_KEY, EXTRA, PRIVILEGES, COLUMN_COMMENT
+ 'COLUMN_NAME, DATA_TYPE, IS_NULLABLE, COLUMN_DEFAULT, CHARACTER_MAXIMUM_LENGTH, CHARACTER_SET_NAME, COLUMN_KEY, COLUMN_COMMENT, EXTRA, COLUMN_TYPE,NUMERIC_PRECISION, NUMERIC_SCALE ' +
+ 'FROM INFORMATION_SCHEMA.COLUMNS ' +
+ 'WHERE ' +
+ '(TABLE_SCHEMA = ''%s'') AND (TABLE_NAME = ''%s'') ' +
+ 'ORDER BY ORDINAL_POSITION';
+var
+ fld : TDAField;
+begin
+ try
+ Query.SQL := Format(sGetTableFields, [aSchema, aTableName]);
+ Query.Open;
+ Fields := TDAFieldCollection.Create(nil);
+ while not Query.Eof do begin
+ fld := Fields.Add;
+ fld.Name := Query.Fields[0].AsString;
+ fld.Required := Query.Fields[2].AsString <> 'YES';
+ if not Query.Fields[3].IsNull then
+ fld.DefaultValue := Query.Fields[3].AsString;
+ fld.Size := Query.Fields[4].AsInteger;
+ fld.InPrimaryKey := SameText(Query.Fields[6].AsString, 'PRI');
+ fld.Description := Query.Fields[7].AsString;
+ fld.DataType := MysqlDataTypeToDA(Query.Fields[1].asString, useUnicode and ( sametext(Query.Fields[5].AsString, 'utf8') or sametext(Query.Fields[5].AsString, 'ucs2')), SameText(Query.Fields[8].AsString, 'auto_increment'), pos(' unsigned',LowerCase(Query.Fields[9].AsString))>0);
+ if fld.DataType = datDecimal then begin
+ fld.DecimalPrecision:=Query.Fields[10].AsInteger;
+ fld.DecimalScale:=Query.Fields[11].AsInteger;
+ end;
+ if fld.DefaultValue <> '' then begin
+ if not TestDefaultValue(fld.DefaultValue, fld.DataType) then
+ fld.DefaultValue := '';
+ end;
+ Query.Next;
+ end;
+ finally
+ Query := nil;
+ end;
+end;
+
+procedure MYSQL_DoGetStoredProcedureParams(const aStoredProcedureName: string; Query: IDADataset; out Params: TDAParamCollection; aSchema: string);
+const
+ sSQL = 'SELECT PARAM_LIST FROM MYSQL.PROC WHERE DB = ''%s'' AND NAME = ''%s''';
+ sError = 'Can''t parse procedures params';
+ aValidChars = ['A'..'Z', 'a'..'z', '0'..'9','_'];
+var
+ par : TDAParam;
+ s, s1 : string;
+ p, p1 : pchar;
+begin
+ try
+ Query.SQL := Format(sSQL, [aSchema, aStoredProcedureName]);
+ Query.Open;
+ Params := TDAParamCollection.Create(nil);
+ if (not Query.Eof) and (not Query.Fields[0].IsNull) then begin
+ s := Query.Fields[0].AsString;
+ p := Pchar(s);
+ repeat
+ while p^ = ',' do inc(p);
+ while p^ = ' ' do inc(p);
+ if p^ = #0 then Exit;
+ par := Params.Add;
+ p1 := p;
+ while CharInSet(p1^ , aValidChars) do inc(p1);
+ if p1^ = #0 then exit;
+ SetString(s1, p, p1 - p);
+ s1 := Lowercase(s1);
+ if s1 = 'in' then par.ParamType := daptInput
+ else if s1 = 'out' then par.ParamType := daptOutput
+ else if s1 = 'inout' then par.ParamType := daptInputOutput;
+ if par.ParamType <> daptUnknown then begin
+ while p1^ = ' ' do inc(p1);
+ p := p1;
+ while CharInSet(p1^ , aValidChars) do inc(p1);
+ if p1^ = #0 then exit;
+ SetString(s1, p, p1 - p);
+ end
+ else begin
+ par.ParamType := daptInput;
+ end;
+ par.Name := s1;
+ while p1^ = ' ' do inc(p1);
+ p := p1;
+ while CharInSet(p1^, aValidChars) do inc(p1);
+ SetString(s1, p, p1 - p);
+ par.DataType := MysqlDataTypeToDA(s1, sametext(s1, 'utf8') or sametext(s1, 'ucs2'), False, pos(' unsigned',s1)>0);
+ if p1^ = #0 then exit;
+ while p1^ = ' ' do inc(p1);
+ p := p1;
+ until p^ <> ',';
+ end;
+ finally
+ Query := nil;
+ end;
+end;
+
+function MYSQL_IdentifierNeedsQuoting(const iIdentifier: string): boolean;
+begin
+ result := TestIdentifier(iIdentifier, mysql_reservedwords);
+end;
+
+{ TDAMySQLConnection }
+
+procedure TDAMySQLConnection.DoGetForeignKeys(
+ out ForeignKeys: TDADriverForeignKeyCollection);
+begin
+ inherited;
+ MYSQL_DoGetForeignKeys(GetDatasetClass.Create(Self), ForeignKeys, GetTableSchema);
+end;
+
+function TDAMySQLConnection.DoGetLastAutoInc(
+ const GeneratorName: string): integer;
+begin
+ Result := MySQL_GetLastAutoInc(GeneratorName, GetDatasetClass.Create(Self));
+end;
+
+procedure TDAMySQLConnection.DoGetStoredProcedureNames(
+ out List: IROStrings);
+begin
+ inherited;
+ MYSQL_DoGetNames(GetDatasetClass.Create(Self), List, dotProcedure, GetTableSchema);
+end;
+
+procedure TDAMySQLConnection.DoGetStoredProcedureParams(
+ const aStoredProcedureName: string; out Params: TDAParamCollection);
+begin
+ MYSQL_DoGetStoredProcedureParams(aStoredProcedureName, GetDatasetClass.Create(Self), Params, GetTableSchema);
+end;
+
+procedure TDAMySQLConnection.DoGetTableFields(const aTableName: string;
+ out Fields: TDAFieldCollection);
+begin
+ MYSQL_DoGetTableFields(QuoteIdentifierIfNeeded(aTableName), GetDatasetClass.Create(Self), Fields, GetTableSchema,useUnicode);
+end;
+
+procedure TDAMySQLConnection.DoGetTableNames(out List: IROStrings);
+begin
+ inherited;
+ MYSQL_DoGetNames(GetDatasetClass.Create(Self), List, dotTable, GetTableSchema);
+end;
+
+procedure TDAMySQLConnection.DoGetViewNames(out List: IROStrings);
+begin
+ inherited;
+ MYSQL_DoGetNames(GetDatasetClass.Create(Self), List, dotView, GetTableSchema);
+end;
+
+function TDAMySQLConnection.GetDatabaseNames: IROStrings;
+begin
+ Result := MYSQL_GetDatabaseNames(GetDatasetClass.Create(Self));
+end;
+
+function TDAMySQLConnection.GetTableSchema: string;
+begin
+ with TDAConnectionStringParser.Create(GetConnectionString) do try
+ Result := Database;
+ finally
+ Free;
+ end;
+end;
+
+procedure MYSQL_InitializeReservedWords;
+begin
+ SetLength(mysql_reservedwords, 230);
+ // sorted with TStringList.Sort (bds2007)
+ mysql_reservedwords[0] := '_BINARY';
+ mysql_reservedwords[1] := 'ACTION';
+ mysql_reservedwords[2] := 'ADD';
+ mysql_reservedwords[3] := 'ALL';
+ mysql_reservedwords[4] := 'ALTER';
+ mysql_reservedwords[5] := 'ANALYZE';
+ mysql_reservedwords[6] := 'AND';
+ mysql_reservedwords[7] := 'AS';
+ mysql_reservedwords[8] := 'ASC';
+ mysql_reservedwords[9] := 'ASENSITIVE';
+ mysql_reservedwords[10] := 'BEFORE';
+ mysql_reservedwords[11] := 'BETWEEN';
+ mysql_reservedwords[12] := 'BIGINT';
+ mysql_reservedwords[13] := 'BINARY';
+ mysql_reservedwords[14] := 'BIT';
+ mysql_reservedwords[15] := 'BLOB';
+ mysql_reservedwords[16] := 'BOTH';
+ mysql_reservedwords[17] := 'BY';
+ mysql_reservedwords[18] := 'CALL';
+ mysql_reservedwords[19] := 'CASCADE';
+ mysql_reservedwords[20] := 'CASE';
+ mysql_reservedwords[21] := 'CHANGE';
+ mysql_reservedwords[22] := 'CHAR';
+ mysql_reservedwords[23] := 'CHARACTER';
+ mysql_reservedwords[24] := 'CHECK';
+ mysql_reservedwords[25] := 'COLLATE';
+ mysql_reservedwords[26] := 'COLUMN';
+ mysql_reservedwords[27] := 'CONDITION';
+ mysql_reservedwords[28] := 'CONSTRAINT';
+ mysql_reservedwords[29] := 'CONTINUE';
+ mysql_reservedwords[30] := 'CONVERT';
+ mysql_reservedwords[31] := 'CREATE';
+ mysql_reservedwords[32] := 'CROSS';
+ mysql_reservedwords[33] := 'CURRENT_DATE';
+ mysql_reservedwords[34] := 'CURRENT_TIME';
+ mysql_reservedwords[35] := 'CURRENT_TIMESTAMP';
+ mysql_reservedwords[36] := 'CURRENT_USER';
+ mysql_reservedwords[37] := 'CURSOR';
+ mysql_reservedwords[38] := 'DATABASE';
+ mysql_reservedwords[39] := 'DATABASES';
+ mysql_reservedwords[40] := 'DATE';
+ mysql_reservedwords[41] := 'DAY_HOUR';
+ mysql_reservedwords[42] := 'DAY_MICROSECOND';
+ mysql_reservedwords[43] := 'DAY_MINUTE';
+ mysql_reservedwords[44] := 'DAY_SECOND';
+ mysql_reservedwords[45] := 'DEC';
+ mysql_reservedwords[46] := 'DECIMAL';
+ mysql_reservedwords[47] := 'DECLARE';
+ mysql_reservedwords[48] := 'DEFAULT';
+ mysql_reservedwords[49] := 'DELAYED';
+ mysql_reservedwords[50] := 'DELETE';
+ mysql_reservedwords[51] := 'DESC';
+ mysql_reservedwords[52] := 'DESCRIBE';
+ mysql_reservedwords[53] := 'DETERMINISTIC';
+ mysql_reservedwords[54] := 'DISTINCT';
+ mysql_reservedwords[55] := 'DISTINCTROW';
+ mysql_reservedwords[56] := 'DIV';
+ mysql_reservedwords[57] := 'DOUBLE';
+ mysql_reservedwords[58] := 'DROP';
+ mysql_reservedwords[59] := 'DUAL';
+ mysql_reservedwords[60] := 'EACH';
+ mysql_reservedwords[61] := 'ELSE';
+ mysql_reservedwords[62] := 'ELSEIF';
+ mysql_reservedwords[63] := 'ENCLOSED';
+ mysql_reservedwords[64] := 'ENUM';
+ mysql_reservedwords[65] := 'ESCAPED';
+ mysql_reservedwords[66] := 'EXISTS';
+ mysql_reservedwords[67] := 'EXIT';
+ mysql_reservedwords[68] := 'EXPLAIN';
+ mysql_reservedwords[69] := 'FALSE';
+ mysql_reservedwords[70] := 'FETCH';
+ mysql_reservedwords[71] := 'FLOAT';
+ mysql_reservedwords[72] := 'FLOAT4';
+ mysql_reservedwords[73] := 'FLOAT8';
+ mysql_reservedwords[74] := 'FOR';
+ mysql_reservedwords[75] := 'FORCE';
+ mysql_reservedwords[76] := 'FOREIGN';
+ mysql_reservedwords[77] := 'FROM';
+ mysql_reservedwords[78] := 'FULLTEXT';
+ mysql_reservedwords[79] := 'GRANT';
+ mysql_reservedwords[80] := 'GROUP';
+ mysql_reservedwords[81] := 'HAVING';
+ mysql_reservedwords[82] := 'HIGH_PRIORITY';
+ mysql_reservedwords[83] := 'HOUR_MICROSECOND';
+ mysql_reservedwords[84] := 'HOUR_MINUTE';
+ mysql_reservedwords[85] := 'HOUR_SECOND';
+ mysql_reservedwords[86] := 'IF';
+ mysql_reservedwords[87] := 'IGNORE';
+ mysql_reservedwords[88] := 'IN';
+ mysql_reservedwords[89] := 'INDEX';
+ mysql_reservedwords[90] := 'INFILE';
+ mysql_reservedwords[91] := 'INNER';
+ mysql_reservedwords[92] := 'INOUT';
+ mysql_reservedwords[93] := 'INSENSITIVE';
+ mysql_reservedwords[94] := 'INSERT';
+ mysql_reservedwords[95] := 'INT';
+ mysql_reservedwords[96] := 'INT1';
+ mysql_reservedwords[97] := 'INT2';
+ mysql_reservedwords[98] := 'INT3';
+ mysql_reservedwords[99] := 'INT4';
+ mysql_reservedwords[100] := 'INT8';
+ mysql_reservedwords[101] := 'INTEGER';
+ mysql_reservedwords[102] := 'INTERVAL';
+ mysql_reservedwords[103] := 'INTO';
+ mysql_reservedwords[104] := 'IS';
+ mysql_reservedwords[105] := 'ITERATE';
+ mysql_reservedwords[106] := 'JOIN';
+ mysql_reservedwords[107] := 'KEY';
+ mysql_reservedwords[108] := 'KEYS';
+ mysql_reservedwords[109] := 'KILL';
+ mysql_reservedwords[110] := 'LEADING';
+ mysql_reservedwords[111] := 'LEAVE';
+ mysql_reservedwords[112] := 'LEFT';
+ mysql_reservedwords[113] := 'LIKE';
+ mysql_reservedwords[114] := 'LIMIT';
+ mysql_reservedwords[115] := 'LINES';
+ mysql_reservedwords[116] := 'LOAD';
+ mysql_reservedwords[117] := 'LOCALTIME';
+ mysql_reservedwords[118] := 'LOCALTIMESTAMP';
+ mysql_reservedwords[119] := 'LOCK';
+ mysql_reservedwords[120] := 'LONG';
+ mysql_reservedwords[121] := 'LONGBLOB';
+ mysql_reservedwords[122] := 'LONGTEXT';
+ mysql_reservedwords[123] := 'LOOP';
+ mysql_reservedwords[124] := 'LOW_PRIORITY';
+ mysql_reservedwords[125] := 'MATCH';
+ mysql_reservedwords[126] := 'MEDIUMBLOB';
+ mysql_reservedwords[127] := 'MEDIUMINT';
+ mysql_reservedwords[128] := 'MEDIUMTEXT';
+ mysql_reservedwords[129] := 'MIDDLEINT';
+ mysql_reservedwords[130] := 'MINUTE_MICROSECOND';
+ mysql_reservedwords[131] := 'MINUTE_SECOND';
+ mysql_reservedwords[132] := 'MOD';
+ mysql_reservedwords[133] := 'MODIFIES';
+ mysql_reservedwords[134] := 'NATURAL';
+ mysql_reservedwords[135] := 'NO';
+ mysql_reservedwords[136] := 'NO_WRITE_TO_BINLOG';
+ mysql_reservedwords[137] := 'NOT';
+ mysql_reservedwords[138] := 'NULL';
+ mysql_reservedwords[139] := 'NUMERIC';
+ mysql_reservedwords[140] := 'ON';
+ mysql_reservedwords[141] := 'OPTIMIZE';
+ mysql_reservedwords[142] := 'OPTION';
+ mysql_reservedwords[143] := 'OPTIONALLY';
+ mysql_reservedwords[144] := 'OR';
+ mysql_reservedwords[145] := 'ORDER';
+ mysql_reservedwords[146] := 'OUT';
+ mysql_reservedwords[147] := 'OUTER';
+ mysql_reservedwords[148] := 'OUTFILE';
+ mysql_reservedwords[149] := 'PRECISION';
+ mysql_reservedwords[150] := 'PRIMARY';
+ mysql_reservedwords[151] := 'PROCEDURE';
+ mysql_reservedwords[152] := 'PURGE';
+ mysql_reservedwords[153] := 'RAID0';
+ mysql_reservedwords[154] := 'READ';
+ mysql_reservedwords[155] := 'READS';
+ mysql_reservedwords[156] := 'REAL';
+ mysql_reservedwords[157] := 'REFERENCES';
+ mysql_reservedwords[158] := 'REGEXP';
+ mysql_reservedwords[159] := 'RELEASE';
+ mysql_reservedwords[160] := 'RENAME';
+ mysql_reservedwords[161] := 'REPEAT';
+ mysql_reservedwords[162] := 'REPLACE';
+ mysql_reservedwords[163] := 'REQUIRE';
+ mysql_reservedwords[164] := 'RESTRICT';
+ mysql_reservedwords[165] := 'RETURN';
+ mysql_reservedwords[166] := 'REVOKE';
+ mysql_reservedwords[167] := 'RIGHT';
+ mysql_reservedwords[168] := 'RLIKE';
+ mysql_reservedwords[169] := 'SCHEMA';
+ mysql_reservedwords[170] := 'SCHEMAS';
+ mysql_reservedwords[171] := 'SECOND_MICROSECOND';
+ mysql_reservedwords[172] := 'SELECT';
+ mysql_reservedwords[173] := 'SENSITIVE';
+ mysql_reservedwords[174] := 'SEPARATOR';
+ mysql_reservedwords[175] := 'SET';
+ mysql_reservedwords[176] := 'SHOW';
+ mysql_reservedwords[177] := 'SMALLINT';
+ mysql_reservedwords[178] := 'SONAME';
+ mysql_reservedwords[179] := 'SPATIAL';
+ mysql_reservedwords[180] := 'SPECIFIC';
+ mysql_reservedwords[181] := 'SQL';
+ mysql_reservedwords[182] := 'SQL_BIG_RESULT';
+ mysql_reservedwords[183] := 'SQL_CALC_FOUND_ROWS';
+ mysql_reservedwords[184] := 'SQL_SMALL_RESULT';
+ mysql_reservedwords[185] := 'SQLEXCEPTION';
+ mysql_reservedwords[186] := 'SQLSTATE';
+ mysql_reservedwords[187] := 'SQLWARNING';
+ mysql_reservedwords[188] := 'SSL';
+ mysql_reservedwords[189] := 'STARTING';
+ mysql_reservedwords[190] := 'STRAIGHT_JOIN';
+ mysql_reservedwords[191] := 'TABLE';
+ mysql_reservedwords[192] := 'TERMINATED';
+ mysql_reservedwords[193] := 'TEXT';
+ mysql_reservedwords[194] := 'THEN';
+ mysql_reservedwords[195] := 'TIME';
+ mysql_reservedwords[196] := 'TIMESTAMP';
+ mysql_reservedwords[197] := 'TINYBLOB';
+ mysql_reservedwords[198] := 'TINYINT';
+ mysql_reservedwords[199] := 'TINYTEXT';
+ mysql_reservedwords[200] := 'TO';
+ mysql_reservedwords[201] := 'TRAILING';
+ mysql_reservedwords[202] := 'TRIGGER';
+ mysql_reservedwords[203] := 'TRUE';
+ mysql_reservedwords[204] := 'UNDO';
+ mysql_reservedwords[205] := 'UNION';
+ mysql_reservedwords[206] := 'UNIQUE';
+ mysql_reservedwords[207] := 'UNLOCK';
+ mysql_reservedwords[208] := 'UNSIGNED';
+ mysql_reservedwords[209] := 'UPDATE';
+ mysql_reservedwords[210] := 'USAGE';
+ mysql_reservedwords[211] := 'USE';
+ mysql_reservedwords[212] := 'USING';
+ mysql_reservedwords[213] := 'UTC_DATE';
+ mysql_reservedwords[214] := 'UTC_TIME';
+ mysql_reservedwords[215] := 'UTC_TIMESTAMP';
+ mysql_reservedwords[216] := 'VALUES';
+ mysql_reservedwords[217] := 'VARBINARY';
+ mysql_reservedwords[218] := 'VARCHAR';
+ mysql_reservedwords[219] := 'VARCHARACTER';
+ mysql_reservedwords[220] := 'VARYING';
+ mysql_reservedwords[221] := 'WHEN';
+ mysql_reservedwords[222] := 'WHERE';
+ mysql_reservedwords[223] := 'WHILE';
+ mysql_reservedwords[224] := 'WITH';
+ mysql_reservedwords[225] := 'WRITE';
+ mysql_reservedwords[226] := 'X509';
+ mysql_reservedwords[227] := 'XOR';
+ mysql_reservedwords[228] := 'YEAR_MONTH';
+ mysql_reservedwords[229] := 'ZEROFILL';
+end;
+
+function TDAMySQLConnection.IdentifierNeedsQuoting(
+ const iIdentifier: string): boolean;
+begin
+ Result := inherited IdentifierNeedsQuoting(iIdentifier) or MYSQL_IdentifierNeedsQuoting(iIdentifier);
+end;
+
+function TDAMySQLConnection.useUnicode: Boolean;
+begin
+ Result:=False;
+end;
+
+initialization
+ mysql_InitializeReservedWords;
+finalization
+ mysql_reservedwords := nil;
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDAOracleInterfaces.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAOracleInterfaces.pas
new file mode 100644
index 0000000..d9ec9fe
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAOracleInterfaces.pas
@@ -0,0 +1,594 @@
+unit uDAOracleInterfaces;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ uROClasses,
+ uDAInterfaces, uDAEngine;
+
+type
+ { IDAOracleConnection
+ For identification purposes Implemented by all Oracle connections }
+ IDAOracleConnection = interface(IDAConnection)
+ ['{C7C88680-12BF-402A-8843-80016429BAC1}']
+ end;
+ IOracleConnection = IDAOracleConnection;
+
+ TDAOracleLockMode = (olmNone, olmLockImmediate, olmLockDelayed);
+
+ TDAOracleOption = (opAutoClose,
+ opDefaultValues,
+ opLongStrings,
+ opQueryRecCount,
+ opCacheLobs,
+ opDeferredLobRead,
+ opKeepPrepared);
+ TDAOracleOptions = set of TDAOracleOption;
+
+ { IOracleDataset
+ Provides access to features of ODAC mostly which might or might not be mappable
+ to other drivers for Oracle. }
+ IDAOracleDataset = interface
+ ['{D555E209-0ED7-40D4-B97B-7C2044453E70}']
+ function GetLockMode: TDAOracleLockMode;
+ procedure SetLockMode(Value: TDAOracleLockMode);
+
+ function GetOptions: TDAOracleOptions;
+ procedure SetOptions(Value: TDAOracleOptions);
+
+ property LockMode: TDAOracleLockMode read GetLockMode write SetLockMode;
+ property Options: TDAOracleOptions read GetOptions write SetOptions;
+ end;
+ IOracleDataset = IDAOracleDataset;
+
+ TDAOracleDriver = class(TDAEDriver)
+ protected
+ function GetDefaultConnectionType(const AuxDriver: string): string; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ end;
+
+ TDAOracleConnection = class(TDAEConnection, IDAOracleConnection, IDAUseGenerators)
+ protected
+ function CreateCompatibleQuery: IDADataset; virtual;
+ function IdentifierNeedsQuoting(const iIdentifier: string): boolean; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ function GetQuoteChars: TDAQuoteCharArray; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure DoGetForeignKeys(out ForeignKeys: TDADriverForeignKeyCollection); override;
+ function GetSPSelectSyntax(HasArguments: Boolean): String; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure DoGetTableNames(out List: IROStrings); override;
+ procedure DoGetViewNames(out List: IROStrings); override;
+ procedure DoGetStoredProcedureNames(out List: IROStrings); override;
+ procedure DoGetTableFields(const aTableName: string; out Fields: TDAFieldCollection); override;
+ function DoGetLastAutoInc(const GeneratorName: string): integer; override;
+ function CreateMacroProcessor: TDASQLMacroProcessor; override;
+ procedure DoGetStoredProcedureParams(const aStoredProcedureName: string; out Params: TDAParamCollection); override;
+ // IDAUseGenerators
+ function GetNextAutoinc(const GeneratorName: string): integer; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ public
+ end;
+
+function Oracle_CreateMacroProcessor: TDASQLMacroProcessor;
+function Oracle_GetSPSelectSyntax(HasArguments: Boolean): String;
+function Oracle_DoGetLastAutoInc(const GeneratorName: string;Query: IDADataset): integer;
+function Oracle_GetNextAutoinc(const GeneratorName: string;Query: IDADataset): integer;
+procedure Oracle_DoGetNames(Query: IDADataset; AList: IROStrings; AObjectType: TDAObjecttype);
+procedure Oracle_DoGetTableFields(const aTableName: string; Query: IDADataset; out Fields: TDAFieldCollection);
+Procedure Oracle_DoGetForeignKeys(Query: IDADataset;ForeignKeys: TDADriverForeignKeyCollection);
+function Oracle_IdentifierNeedsQuoting(const iIdentifier: string): boolean;
+function Oracle_GetQuoteChars: TDAQuoteCharArray;
+procedure Oracle_DoGetStoredProcedureParams(const aStoredProcedureName: string; Query: IDADataset; out Params: TDAParamCollection);
+
+const
+ Oracle_DriverType = 'Oracle';
+
+implementation
+uses
+ uDAMacroProcessors, SysUtils;
+
+var
+ Oracle_reservedwords: array of string;
+
+function Oracle_CreateMacroProcessor: TDASQLMacroProcessor;
+begin
+ Result := TDAOracleMacroProcessor.Create;
+end;
+
+function Oracle_GetSPSelectSyntax(HasArguments: Boolean): String;
+begin
+ if HasArguments then
+ Result := 'CALL {0}({1})'
+ else
+ Result := 'CALL {0}';
+end;
+
+function Oracle_DoGetLastAutoInc(const GeneratorName: string;Query: IDADataset): integer;
+begin
+ try
+ Query.SQL := 'SELECT ' + GeneratorName + '.Currval FROM dual';
+ Query.Open;
+ result := Query.Fields[0].Value;
+ finally
+ Query := nil;
+ end;
+end;
+
+function Oracle_GetNextAutoinc(const GeneratorName: string;Query: IDADataset): integer;
+begin
+ try
+ Query.SQL := 'SELECT ' + GeneratorName + '.Nextval FROM dual';
+ Query.Open;
+ result := Query.Fields[0].Value;
+ finally
+ Query := nil;
+ end;
+end;
+
+procedure Oracle_DoGetNames(Query: IDADataset; AList: IROStrings; AObjectType: TDAObjecttype);
+const
+ sql = 'SELECT OBJECT_NAME FROM USER_OBJECTS WHERE OBJECT_TYPE = ''%s''';
+
+ procedure _ExecSQL(aObject: string);
+ begin
+ Query.Close;
+ Query.SQL := Format(sql,[aObject]);
+ Query.Open;
+ while not Query.EOF do begin
+ AList.Add(Trim(Query.Fields[0].AsString));
+ Query.Next;
+ end;
+ Query.Close;
+ end;
+
+begin
+ AList.Clear;
+ try
+ case AObjectType of
+ dotTable: _ExecSQL('TABLE');
+ dotView: _ExecSQL('VIEW');
+ dotProcedure: begin
+ _ExecSQL('PROCEDURE');
+ _ExecSQL('FUNCTION');
+ end;
+ else
+ end;
+ finally
+ Query := nil;
+ end;
+ AList.Sorted:=True;
+ AList.Sorted:=False;
+end;
+
+function OracleTypeToDADataType(const aTypeName: string; const aDataPrecision,aDataScale: integer):TDADataType;
+begin
+ if (aTypeName = 'VARCHAR2') or (aTypeName = 'VARCHAR') or (aTypeName = 'CHAR') then Result := datString
+ else if (aTypeName = 'NVARCHAR2') or (aTypeName = 'NCHAR') OR (aTypeName = 'NCHAR VARYING') then Result := datWideString
+ else if aTypeName = 'FLOAT' then Result := datFloat
+ else if aTypeName = 'NUMBER' then begin
+ if aDataScale <= 0 then begin
+ case aDataPrecision of
+ 0: Result := datFloat;
+ 1,2: Result := datShortInt;
+ 3,4: Result := datSmallInt;
+ 5..9: Result := datInteger;
+ else
+ Result := datLargeInt;
+ end;
+ end
+ else Result:= datDecimal;
+ end
+ else if (aTypeName = 'RAW') or (aTypeName = 'LONG RAW') OR
+ (aTypeName = 'BLOB') OR (aTypeName = 'LOB') OR
+ (aTypeName = 'BFILE') OR (aTypeName = 'CFILE') then Result:= datBlob
+ else if (aTypeName = 'DATE') OR
+ (aTypeName = 'TIME') OR (aTypeName = 'TIME WITH TIME ZONE') OR
+ (aTypeName = 'TIMESTAMP') OR (aTypeName = 'TIMESTAMP WITH TIME ZONE') OR (aTypeName = 'TIMESTAMP WITH LOCAL TIME ZONE') then Result:= datDateTime
+ { else if aTypeName = 'YEAR' then Result:= datSmallInt
+ else if (aTypeName = 'MONTH') or (aTypeName = 'DAY') or (aTypeName = 'HOUR') or (aTypeName = 'MINUTE') or (aTypeName = 'TIMEZONE_MINUTE') then Result:= datByte
+ else if (aTypeName = 'SECOND') then Result:= datFloat
+ else if (aTypeName = 'TIMEZONE_HOUR') then Result:= datShortInt }
+ else if (aTypeName = 'LONG') or (aTypeName = 'CLOB') then Result:= datMemo
+ else if (aTypeName = 'NCLOB') then Result:= datWideMemo
+ else if (aTypeName = 'ROWID') or (aTypeName = 'UROWID') then Result:= datString
+ else if (aTypeName = 'BINARY_INTEGER') OR (aTypeName = 'NATIVE INTEGER') then Result := datInteger
+//else if (aTypeName = 'REF CURSOR') then Result:= ???
+//else if (aTypeName = 'MLSLABEL') then Result:= ???
+//else if (aTypeName = 'REF') then Result:= ???
+//else if (aTypeName = 'OBJECT') then Result:= ???
+//else if (aTypeName = 'TABLE') then Result:= ???
+//else if (aTypeName = 'VARRAY') then Result:= ???
+//else if (aTypeName = 'INTERVAL YEAR TO MONTH') then Result:= ???
+//else if (aTypeName = 'INTERVAL DAY TO SECOND') then Result:= ???
+//else if (aTypeName = 'PL/SQL RECORD') then Result:= ???
+//else if (aTypeName = 'PL/SQL TABLE') then Result:= ???
+ else if aTypeName = 'PL/SQL BOOLEAN' then Result := datBoolean
+ else Result:= datUnknown;
+end;
+
+procedure Oracle_DoGetStoredProcedureParams(const aStoredProcedureName: string; Query: IDADataset; out Params: TDAParamCollection);
+const
+ sSPP_SQL = 'SELECT ARGUMENT_NAME, DATA_TYPE, IN_OUT, DATA_LENGTH, DATA_PRECISION, DATA_SCALE, PLS_TYPE '+
+ 'FROM USER_ARGUMENTS '+
+ 'WHERE ((IN_OUT = ''IN'' AND ARGUMENT_NAME IS NOT NULL) OR IN_OUT = ''OUT'' OR IN_OUT = ''IN/OUT'') AND OBJECT_NAME = ''%S'' '+
+ 'ORDER BY POSITION';
+begin
+ Params := TDAParamCollection.Create(nil);
+ try
+ Query.SQL := Format(sSPP_SQL,[aStoredProcedureName]);
+ Query.Open;
+ while not Query.EOF do begin
+ With Params.Add do begin
+ Name := Query.Fields[0].AsString;
+ if Query.Fields[2].AsString = 'IN' then
+ ParamType := daptInput
+ else if Query.Fields[2].AsString = 'IN/OUT'
+ then ParamType := daptInputOutput
+ else if Query.Fields[2].AsString = 'OUT' then begin
+ if Name = '' then begin
+ Name:= 'RESULT';
+ ParamType := daptResult;
+ end
+ else begin
+ ParamType := daptInputOutput;
+ end;
+ end
+ else
+ ParamType := daptUnknown;
+ DataType := OracleTypeToDADataType(Query.Fields[1].AsString, Query.Fields[4].AsInteger, Query.Fields[5].AsInteger);
+ Size := Query.Fields[3].AsInteger;
+
+ if DataType = datDecimal then begin
+ DecimalPrecision := Query.Fields[4].AsInteger;
+ DecimalScale := Query.Fields[5].AsInteger;
+ if DecimalScale < 0 then DecimalScale := 0;
+ end;
+ end;
+ Query.Next;
+ end;
+ finally
+ Query := nil;
+ end;
+end;
+
+
+procedure Oracle_DoGetTableFields(const aTableName: string; Query: IDADataset; out Fields: TDAFieldCollection);
+const // CHARACTER_SET_NAME, CHAR_LENGTH
+ SQL_TABLEINFO ='SELECT C.COLUMN_NAME, C.DATA_TYPE, C.DATA_LENGTH, C.DATA_PRECISION, C.DATA_SCALE, C.NULLABLE, C.DATA_LENGTH, CC.COMMENTS '+
+ 'FROM ALL_TAB_COLUMNS C LEFT OUTER JOIN ALL_COL_COMMENTS CC on (CC.TABLE_NAME = C.TABLE_NAME AND CC.COLUMN_NAME = C.COLUMN_NAME) '+
+ 'WHERE (C.TABLE_NAME=''%s'')';
+ SQL_PRIMARYKEY = 'SELECT ACC.COLUMN_NAME, ACC.POSITION FROM USER_CONSTRAINTS AC, USER_CONS_COLUMNS ACC '+
+ 'WHERE (AC.TABLE_NAME=''%s'') AND (ACC.TABLE_NAME = AC.TABLE_NAME) AND '+
+ '(AC.CONSTRAINT_NAME = ACC.CONSTRAINT_NAME) AND AC.CONSTRAINT_TYPE = ''P''';
+var
+ fld: TDAField;
+ ltable: string;
+ ldt: TDADataType;
+begin
+ Fields := TDAFieldCollection.Create(nil);
+ try
+ ltable := aTableName;
+ ltable:= AnsiDequotedStr(ltable,'"');
+ Query.Close;
+ Query.SQL:= Format(SQL_TABLEINFO, [ltable]);
+ Query.Open;
+ While not Query.Eof do begin
+ fld := Fields.Add;
+ fld.Name:=Query.Fields[0].AsString;
+ ldt:=OracleTypeToDADataType(Query.Fields[1].AsString,Query.Fields[3].AsInteger,Query.Fields[4].AsInteger);
+ fld.DataType:=ldt;
+ If ldt = datDecimal then begin
+ fld.DecimalPrecision :=Query.Fields[3].AsInteger;
+ fld.DecimalScale :=Query.Fields[4].AsInteger;
+ if fld.DecimalScale < 0 then fld.DecimalScale := 0;
+ end;
+ fld.Required := Query.Fields[5].AsString = 'N';
+ if ldt in [datString, datWideString] then begin
+ if (Query.Fields[1].AsString = 'ROWID') or (Query.Fields[1].AsString = 'UROWID') then
+ fld.Size := 18
+ else
+ fld.Size := Query.Fields[6].AsInteger;
+ end;
+ fld.Description := Query.Fields[7].AsString;
+ Query.Next;
+ end;
+
+ // pk
+ Query.Close;
+ Query.SQL:= Format(SQL_PRIMARYKEY,[aTableName]);
+ Query.Open;
+ While not Query.Eof do begin
+ fld := Fields.FindField(Trim(Query.Fields[0].AsString));
+ if Fld <> nil then fld.InPrimaryKey := True;
+ Query.Next;
+ end;
+ finally
+ Query := nil;
+ end;
+end;
+
+Procedure Oracle_DoGetForeignKeys(Query: IDADataset;ForeignKeys: TDADriverForeignKeyCollection);
+var
+ lCurrConstraint: string;
+ lCurrFK: TDADriverForeignKey;
+const
+ sFK_SQL = 'SELECT AC.CONSTRAINT_NAME, AC_PK.TABLE_NAME, AC_FK.TABLE_NAME, AC_PK.COLUMN_NAME, AC_FK.COLUMN_NAME, '+
+ 'AC_FK.POSITION FROM USER_CONSTRAINTS AC, USER_CONS_COLUMNS AC_PK, USER_CONS_COLUMNS AC_FK WHERE (AC.CONSTRAINT_TYPE = ''R'') AND '+
+ '((AC.CONSTRAINT_NAME = AC_PK.CONSTRAINT_NAME) ) AND ((AC.R_CONSTRAINT_NAME = AC_FK.CONSTRAINT_NAME) '+
+ ') AND (AC_FK.POSITION = AC_PK.POSITION) ORDER BY 1,2,3,6';
+begin
+ lCurrConstraint := '';
+ lCurrFK := nil;
+ try
+ Query.SQL := sFK_SQL;
+ Query.Open;
+
+ ForeignKeys.Clear;
+ while (not Query.EOF) do begin
+
+ if lCurrConstraint <> Query.Fields[0].AsString then begin
+ lCurrConstraint := Query.Fields[0].AsString;
+ lCurrFK := ForeignKeys.Add();
+ with lCurrFK do begin
+ PKTable := TrimRight(Query.Fields[1].AsString);
+ FKTable := TrimRight(Query.Fields[2].AsString);
+ PKField := TrimRight(Query.Fields[3].AsString);
+ FKField := TrimRight(Query.Fields[4].AsString);
+ end;
+ end else begin
+ with lCurrFK do begin
+ PKField := PKField + ';' + TrimRight(Query.Fields[3].AsString);
+ FKField := FKField + ';' + TrimRight(Query.Fields[4].AsString);
+ end;
+ end;
+ Query.Next;
+ end;
+ finally
+ Query := nil;
+ end;
+end;
+
+function Oracle_IdentifierIsQuoted(const iIdentifier: string): boolean;
+var
+ lQuoteChars: TDAQuoteCharArray;
+ lLength:integer;
+begin
+ lQuoteChars := Oracle_GetQuoteChars;
+ lLength := Length(iIdentifier);
+ result := (lLength > 2) and (iIdentifier[1] = lQuoteChars[0]) and (iIdentifier[lLength] = lQuoteChars[1]);
+end;
+
+function Oracle_IdentifierNeedsQuoting(const iIdentifier: string): boolean;
+begin
+ result := false;
+ if Oracle_IdentifierIsQuoted(iIdentifier) then Exit;
+ Result:=
+ ((UpperCase(iIdentifier) <> iIdentifier) and
+ (LowerCase(iIdentifier) <> iIdentifier)) or
+ (pos('_', iIdentifier) = 1);
+
+ Result := Result or TestIdentifier(iIdentifier,Oracle_reservedwords);
+end;
+
+function Oracle_GetQuoteChars: TDAQuoteCharArray;
+begin
+ Result[0] := '"';
+ Result[1] := '"';
+end;
+
+procedure Oracle_InitializeReservedWords;
+begin
+ SetLength(Oracle_reservedwords, 109);
+ // sorted with TStringList.Sort (bds2007)
+ Oracle_reservedwords[0] := 'ACCESS';
+ Oracle_reservedwords[1] := 'ADD';
+ Oracle_reservedwords[2] := 'ALL';
+ Oracle_reservedwords[3] := 'ALTER';
+ Oracle_reservedwords[4] := 'AND';
+ Oracle_reservedwords[5] := 'ANY';
+ Oracle_reservedwords[6] := 'AS';
+ Oracle_reservedwords[7] := 'ASC';
+ Oracle_reservedwords[8] := 'AUDIT';
+ Oracle_reservedwords[9] := 'BETWEEN';
+ Oracle_reservedwords[10] := 'BY';
+ Oracle_reservedwords[11] := 'CHAR';
+ Oracle_reservedwords[12] := 'CHECK';
+ Oracle_reservedwords[13] := 'CLUSTER';
+ Oracle_reservedwords[14] := 'COLUMN';
+ Oracle_reservedwords[15] := 'COMMENT';
+ Oracle_reservedwords[16] := 'COMPRESS';
+ Oracle_reservedwords[17] := 'CONNECT';
+ Oracle_reservedwords[18] := 'CREATE';
+ Oracle_reservedwords[19] := 'CURRENT';
+ Oracle_reservedwords[20] := 'DATE';
+ Oracle_reservedwords[21] := 'DECIMAL';
+ Oracle_reservedwords[22] := 'DEFAULT';
+ Oracle_reservedwords[23] := 'DELETE';
+ Oracle_reservedwords[24] := 'DESC';
+ Oracle_reservedwords[25] := 'DISTINCT';
+ Oracle_reservedwords[26] := 'DROP';
+ Oracle_reservedwords[27] := 'ELSE';
+ Oracle_reservedwords[28] := 'EXCLUSIVE';
+ Oracle_reservedwords[29] := 'EXISTS';
+ Oracle_reservedwords[30] := 'FILE';
+ Oracle_reservedwords[31] := 'FLOAT';
+ Oracle_reservedwords[32] := 'FOR';
+ Oracle_reservedwords[33] := 'FROM';
+ Oracle_reservedwords[34] := 'GRANT';
+ Oracle_reservedwords[35] := 'GROUP';
+ Oracle_reservedwords[36] := 'HAVING';
+ Oracle_reservedwords[37] := 'IDENTIFIED';
+ Oracle_reservedwords[38] := 'IMMEDIATE';
+ Oracle_reservedwords[39] := 'IN';
+ Oracle_reservedwords[40] := 'INCREMENT';
+ Oracle_reservedwords[41] := 'INDEX';
+ Oracle_reservedwords[42] := 'INITIAL';
+ Oracle_reservedwords[43] := 'INSERT';
+ Oracle_reservedwords[44] := 'INTEGER';
+ Oracle_reservedwords[45] := 'INTERSECT';
+ Oracle_reservedwords[46] := 'INTO';
+ Oracle_reservedwords[47] := 'IS';
+ Oracle_reservedwords[48] := 'LEVEL';
+ Oracle_reservedwords[49] := 'LIKE';
+ Oracle_reservedwords[50] := 'LOCK';
+ Oracle_reservedwords[51] := 'LONG';
+ Oracle_reservedwords[52] := 'MAXEXTENTS';
+ Oracle_reservedwords[53] := 'MINUS';
+ Oracle_reservedwords[54] := 'MLSLABEL';
+ Oracle_reservedwords[55] := 'MODE';
+ Oracle_reservedwords[56] := 'MODIFY';
+ Oracle_reservedwords[57] := 'NOAUDIT';
+ Oracle_reservedwords[58] := 'NOCOMPRESS';
+ Oracle_reservedwords[59] := 'NOT';
+ Oracle_reservedwords[60] := 'NOWAIT';
+ Oracle_reservedwords[61] := 'NULL';
+ Oracle_reservedwords[62] := 'NUMBER';
+ Oracle_reservedwords[63] := 'OF';
+ Oracle_reservedwords[64] := 'OFFLINE';
+ Oracle_reservedwords[65] := 'ON';
+ Oracle_reservedwords[66] := 'ONLINE';
+ Oracle_reservedwords[67] := 'OPTION';
+ Oracle_reservedwords[68] := 'OR';
+ Oracle_reservedwords[69] := 'ORDER';
+ Oracle_reservedwords[70] := 'PCTFREE';
+ Oracle_reservedwords[71] := 'PRIOR';
+ Oracle_reservedwords[72] := 'PRIVILEGES';
+ Oracle_reservedwords[73] := 'PUBLIC';
+ Oracle_reservedwords[74] := 'RAW';
+ Oracle_reservedwords[75] := 'RENAME';
+ Oracle_reservedwords[76] := 'RESOURCE';
+ Oracle_reservedwords[77] := 'REVOKE';
+ Oracle_reservedwords[78] := 'ROW';
+ Oracle_reservedwords[79] := 'ROWID';
+ Oracle_reservedwords[80] := 'ROWNUM';
+ Oracle_reservedwords[81] := 'ROWS';
+ Oracle_reservedwords[82] := 'SELECT';
+ Oracle_reservedwords[83] := 'SESSION';
+ Oracle_reservedwords[84] := 'SET';
+ Oracle_reservedwords[85] := 'SHARE';
+ Oracle_reservedwords[86] := 'SIZE';
+ Oracle_reservedwords[87] := 'SMALLINT';
+ Oracle_reservedwords[88] := 'START';
+ Oracle_reservedwords[89] := 'SUCCESSFUL';
+ Oracle_reservedwords[90] := 'SYNONYM';
+ Oracle_reservedwords[91] := 'SYSDATE';
+ Oracle_reservedwords[92] := 'TABLE';
+ Oracle_reservedwords[93] := 'THEN';
+ Oracle_reservedwords[94] := 'TO';
+ Oracle_reservedwords[95] := 'TRIGGER';
+ Oracle_reservedwords[96] := 'UID';
+ Oracle_reservedwords[97] := 'UNION';
+ Oracle_reservedwords[98] := 'UNIQUE';
+ Oracle_reservedwords[99] := 'UPDATE';
+ Oracle_reservedwords[100] := 'USER';
+ Oracle_reservedwords[101] := 'VALIDATE';
+ Oracle_reservedwords[102] := 'VALUES';
+ Oracle_reservedwords[103] := 'VARCHAR';
+ Oracle_reservedwords[104] := 'VARCHAR2';
+ Oracle_reservedwords[105] := 'VIEW';
+ Oracle_reservedwords[106] := 'WHENEVER';
+ Oracle_reservedwords[107] := 'WHERE';
+ Oracle_reservedwords[108] := 'WITH';
+end;
+{ TDAOracleDriver }
+
+function TDAOracleDriver.GetDefaultConnectionType(
+ const AuxDriver: string): string;
+begin
+ Result := Oracle_DriverType;
+end;
+
+{ TDAOracleConnection }
+
+function TDAOracleConnection.CreateCompatibleQuery: IDADataset;
+begin
+ Result := GetDatasetClass.Create(Self);
+end;
+
+function TDAOracleConnection.CreateMacroProcessor: TDASQLMacroProcessor;
+begin
+ result := Oracle_CreateMacroProcessor;
+end;
+
+procedure TDAOracleConnection.DoGetForeignKeys(
+ out ForeignKeys: TDADriverForeignKeyCollection);
+begin
+ inherited DoGetForeignKeys(ForeignKeys);
+ Oracle_DoGetForeignKeys(CreateCompatibleQuery, ForeignKeys);
+end;
+
+function TDAOracleConnection.DoGetLastAutoInc(
+ const GeneratorName: string): integer;
+begin
+ Result := Oracle_DoGetLastAutoInc(GeneratorName,CreateCompatibleQuery);
+end;
+
+procedure TDAOracleConnection.DoGetStoredProcedureNames(
+ out List: IROStrings);
+begin
+ inherited DoGetStoredProcedureNames(List);
+ Oracle_DoGetNames(CreateCompatibleQuery, List, dotProcedure);
+end;
+
+procedure TDAOracleConnection.DoGetStoredProcedureParams(
+ const aStoredProcedureName: string; out Params: TDAParamCollection);
+begin
+ Oracle_DoGetStoredProcedureParams(aStoredProcedureName,CreateCompatibleQuery,Params);
+end;
+
+procedure TDAOracleConnection.DoGetTableFields(const aTableName: string;
+ out Fields: TDAFieldCollection);
+begin
+ Oracle_DoGetTableFields(QuoteIdentifierIfNeeded(aTableName), CreateCompatibleQuery, Fields);
+end;
+
+procedure TDAOracleConnection.DoGetTableNames(out List: IROStrings);
+begin
+ inherited DoGetTableNames(List);
+ Oracle_DoGetNames(CreateCompatibleQuery, List, dotTable);
+end;
+
+procedure TDAOracleConnection.DoGetViewNames(out List: IROStrings);
+begin
+ inherited DoGetViewNames(List);
+ Oracle_DoGetNames(CreateCompatibleQuery, List, dotView);
+end;
+
+function TDAOracleConnection.GetNextAutoinc(
+ const GeneratorName: string): integer;
+begin
+ Result := Oracle_GetNextAutoinc(GeneratorName, CreateCompatibleQuery);
+end;
+
+function TDAOracleConnection.GetQuoteChars: TDAQuoteCharArray;
+begin
+ Result := Oracle_GetQuoteChars;
+end;
+
+function TDAOracleConnection.GetSPSelectSyntax(
+ HasArguments: Boolean): String;
+begin
+ Result:= Oracle_GetSPSelectSyntax(HasArguments);
+end;
+
+function TDAOracleConnection.IdentifierNeedsQuoting(
+ const iIdentifier: string): boolean;
+begin
+ Result:= inherited IdentifierNeedsQuoting(iIdentifier) or Oracle_IdentifierNeedsQuoting(iIdentifier);
+end;
+
+initialization
+ Oracle_InitializeReservedWords;
+finalization
+ Oracle_reservedwords:=nil;
+end.
\ No newline at end of file
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDAPSScriptingProvider.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAPSScriptingProvider.pas
new file mode 100644
index 0000000..93f8526
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAPSScriptingProvider.pas
@@ -0,0 +1,210 @@
+unit uDAPSScriptingProvider;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ Classes,
+ uDAScriptingProvider, uDAInterfaces, uDABusinessProcessor, uDADataTable,
+ uPSComponent, uDAPascalScript,
+ uPSComponent_DB, uPSComponent_Default;
+
+type
+ TDAPSScriptingProvider = class;
+ TDAPSScript = class(TPSScript)
+ private
+ fProvider: TDAPSScriptingProvider;
+ protected
+ function DoOnGetNotificationVariant (const Name: string): Variant; override;
+ procedure DoOnSetNotificationVariant (const Name: string; V: Variant); override;
+ procedure DoOnCompile; override;
+ end;
+ TDAPSScriptingProvider = class(TDAScriptingProvider, IDADataTableScriptingProvider, IDABusinessProcessorScriptingProvider)
+ private
+ fDataTablePlugin: TDAPSDataTableRulesPlugin;
+ fBusinessProcessor: TDABusinessProcessor;
+ fDataTable: TDADataTable;
+ fScript: TPSScript;
+ fPluginClasses: TPSImport_Classes;
+ fPluginDB: TPSImport_DB;
+ fPluginDateUtils: TPSImport_DateUtils;
+
+ procedure RunDataTableScript(aDataTable: TDADataTable; const aScript: string; const aMethod: string; aLanguage:TROSEScriptLanguage);
+ procedure RunBusinessProcessorScript(aBusinessProcessor: TDABusinessProcessor; const aScript: string; const aMethod: string; aLanguage:TROSEScriptLanguage);
+
+ procedure OnCompile(Sender: TPSScript);
+ function OnGetNotificationVariant(Sender: TPSScript; const Name: string): Variant;
+ procedure OnSetNotificationVariant(Sender: TPSScript; const Name: string; V: Variant);
+
+ //procedure OnVerifyProc(Sender: TPSScript; Proc: TPSInternalProcedure; const Decl: string; var Error: Boolean);
+
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+
+ procedure PrepareForDataTable(aDataTable: TDADataTable);
+ procedure PrepareForBusinessProcessor(aBusinessProcessor: TDABusinessProcessor);
+
+ published
+ property ScriptEngine: TPSScript read fScript;
+ property PluginClasses: TPSImport_Classes read fPluginClasses;
+ property PluginDB: TPSImport_DB read fPluginDB;
+ property PluginDateUtils: TPSImport_DateUtils read fPluginDateUtils;
+ end;
+
+implementation
+
+uses
+ SysUtils, uROClasses;
+
+{ TDADataTableScripter }
+
+constructor TDAPSScriptingProvider.Create(AOwner: TComponent);
+begin
+ inherited;
+ fScript := TDAPSScript.Create(self);
+ TDAPSScript(fScript).fProvider := Self;
+ fScript.Name := 'ScriptEngine';
+ fScript.SetSubComponent(true);
+ //fScript.OnVerifyProc := OnVerifyProc;
+ fScript.CompilerOptions := [icAllowNoBegin, icAllowNoEnd, icBooleanShortCircuit];
+ fPluginClasses := TPSImport_Classes.Create(self);
+ fPluginClasses.Name := 'PluginClasses';
+ fPluginDB := TPSImport_DB.Create(self);
+ fPluginDB.Name := 'PluginDB';
+ fPluginDateUtils := TPSImport_DateUtils.Create(self);
+ fPluginDateUtils.Name := 'PluginDateUtils';
+ (fScript.Plugins.Add() as TPSPluginItem).Plugin := fPluginClasses;
+ (fScript.Plugins.Add() as TPSPluginItem).Plugin := fPluginDB;
+ (fScript.Plugins.Add() as TPSPluginItem).Plugin := fPluginDateUtils;
+end;
+
+destructor TDAPSScriptingProvider.Destroy;
+begin
+ FreeAndNil(fScript);
+ inherited;
+end;
+
+procedure TDAPSScriptingProvider.OnCompile(Sender: TPSScript);
+var
+ i: Integer;
+begin
+ if Assigned(fDataTable) then begin
+ for i := 0 to fDataTable.Fields.Count-1 do begin
+ fScript.AddRegisteredVariable(fDataTable.Fields[i].Name, '!NOTIFICATIONVARIANT');
+ end; { for }
+ end;
+
+ if Assigned(fBusinessProcessor) then begin
+ //ToDo:
+ end;
+end;
+
+{procedure TDAPSScriptingProvider.OnVerifyProc(Sender: TPSScript; Proc: TPSInternalProcedure; const Decl: string; var Error: Boolean);
+begin
+ if Proc.Decl.ParamCount = 0 then
+ Proc.aExport := etExportDecl;
+end;}
+
+function TDAPSScriptingProvider.OnGetNotificationVariant(Sender: TPSScript; const Name: string): Variant;
+begin
+ result := fDataTable.Fields.FieldByName(Name).Value;
+end;
+
+procedure TDAPSScriptingProvider.OnSetNotificationVariant(Sender: TPSScript; const Name: string; V: Variant);
+begin
+ fDataTable.Fields.FieldByName(Name).Value := V;
+end;
+
+procedure TDAPSScriptingProvider.PrepareForBusinessProcessor(aBusinessProcessor: TDABusinessProcessor);
+begin
+
+end;
+
+procedure TDAPSScriptingProvider.PrepareForDataTable(aDataTable: TDADataTable);
+begin
+ fDataTable := aDataTable;
+ fBusinessProcessor := nil;
+ fScript.Defines.Text := 'DATA_ABSTRACT_SCRIPT'#13#10'DATA_ABSTRACT_SCRIPT_CLIENT';
+ if not assigned(fDataTablePlugin) then begin
+ fDataTablePlugin := TDAPSDataTableRulesPlugin.Create(self);
+ fDataTablePlugin.DataTable := aDataTable;
+ (fScript.Plugins.Add() as TPSPluginItem).Plugin := fDataTablePlugin;
+ end;
+end;
+
+
+procedure TDAPSScriptingProvider.RunBusinessProcessorScript(
+ aBusinessProcessor: TDABusinessProcessor; const aScript, aMethod: string;
+ aLanguage: TROSEScriptLanguage);
+begin
+ fDataTable := nil;
+ FreeAndNil(fDataTablePlugin);
+ fBusinessProcessor := aBusinessProcessor;
+ fScript.Defines.Text := 'DATA_ABSTRACT_SCRIPT'#13#10'DATA_ABSTRACT_SCRIPT_SERVER';
+ //(fScript.Plugins.Add() as TPSPluginItem).Plugin := TDAPSDataTableRulesPlugin.Create(self);
+end;
+
+type
+ TScriptMethod = procedure of object;
+
+procedure TDAPSScriptingProvider.RunDataTableScript(aDataTable: TDADataTable; const aScript, aMethod: string; aLanguage: TROSEScriptLanguage);
+var
+ lMessages: string;
+ i: Integer;
+ lMethod: TScriptMethod;
+begin
+ if fDataTable <> aDataTable then begin
+ PrepareForDataTable(aDataTable);
+ end;
+ if aScript <> fScript.Script.Text then begin
+ fScript.Script.Text := aScript;
+ if not fScript.Compile then begin
+ lMessages := '';
+ for i := 0 to fScript.CompilerMessageCount-1 do begin
+ lMessages := lMessages+#13#10+fScript.CompilerMessages[i].MessageToString;
+ end; { for }
+ RaiseError('There were errors compiling the business rule script for %s.'#13+lMessages,[aDataTable.Name], EDAScriptCompileError);
+ end;
+ end;
+
+ fDataTablePlugin.DataTable := aDataTable;
+ lMethod := TScriptMethod(fScript.GetProcMethod(aMethod));
+ if assigned(@lMethod) then
+ lMethod();
+end;
+
+{ TDAPSScript }
+
+procedure TDAPSScript.DoOnCompile;
+begin
+ inherited;
+ fProvider.OnCompile(Self);
+end;
+
+function TDAPSScript.DoOnGetNotificationVariant(
+ const Name: string): Variant;
+begin
+ Result := fProvider.OnGetNotificationVariant(Self, Name);
+end;
+
+procedure TDAPSScript.DoOnSetNotificationVariant(const Name: string;
+ V: Variant);
+begin
+ fProvider.OnSetNotificationVariant(Self, Name, V);
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDAPascalScript.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAPascalScript.pas
new file mode 100644
index 0000000..8ee4594
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAPascalScript.pas
@@ -0,0 +1,1206 @@
+unit uDAPascalScript;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ SysUtils, Classes, uPSComponent, uPSCompiler, uPSRuntime, uDADataTable,
+ uDAInterfaces, db;
+
+type
+ TDAPSDataTableRulesPlugin = class;
+ TDAPSDataTableRules = class(TDADataTableRules)
+ private
+ FSE: TPSScript;
+ procedure SetSE(const Value: TPSScript);
+ protected
+ procedure BeforeOpen(Sender: TDADataTable); override;
+ procedure AfterOpen(Sender: TDADataTable); override;
+ procedure BeforeClose(Sender: TDADataTable); override;
+ procedure AfterClose(Sender: TDADataTable); override;
+ procedure BeforeInsert(Sender: TDADataTable); override;
+ procedure AfterInsert(Sender: TDADataTable); override;
+ procedure BeforeEdit(Sender: TDADataTable); override;
+ procedure AfterEdit(Sender: TDADataTable); override;
+ procedure BeforePost(Sender: TDADataTable); override;
+ procedure AfterPost(Sender: TDADataTable); override;
+ procedure BeforeCancel(Sender: TDADataTable); override;
+ procedure AfterCancel(Sender: TDADataTable); override;
+ procedure BeforeDelete(Sender: TDADataTable); override;
+ procedure AfterDelete(Sender: TDADataTable); override;
+ procedure BeforeScroll(Sender: TDADataTable); override;
+ procedure AfterScroll(Sender: TDADataTable); override;
+ procedure BeforeRefresh(Sender: TDADataTable); override;
+ procedure AfterRefresh(Sender: TDADataTable); override;
+ procedure OnCalcFields(Sender: TDADataTable); override;
+ procedure OnNewRecord(Sender: TDADataTable); override;
+
+ procedure Setup(const Dataset: TDADataTable);
+ procedure ExecuteProc(Dataset: TDADataTable; const Name: string);
+ public
+ property SE: TPSScript read FSE write SetSE;
+ end;
+
+ TDAPSDataTableRulesPlugin = class(TPsPlugin)
+ private
+ fDataTable: TDADataTable;
+ fScriptEngine: TPSScript;
+ procedure SetDataTable(const Value: TDADataTable);
+ public
+ procedure CompOnUses(CompExec: TPSScript); override;
+ procedure CompileImport1(CompExec: TPSScript); override;
+ procedure ExecImport2(CompExec: TPSScript; const ri: TPSRuntimeClassImporter); override;
+ property DataTable: TDADataTable read fDataTable write SetDataTable;
+ end;
+
+implementation
+
+uses
+{$IFDEF FPC}
+ fpgtkext,
+{$ENDIF}
+ uDAScriptingProvider, Dialogs, uROClasses;
+//uses
+// uDADataTable;
+
+procedure SIRegister_TDADataTable(CL: TIFPSPascalCompiler);
+begin
+ //with RegClassS(CL,'TComponent', 'TDADataTable') do
+ with CL.AddClassN(CL.FindClass('TComponent'), 'TDADataTable') do begin
+ RegisterProperty('Active', 'boolean', iptrw);
+ RegisterProperty('Fields', 'TDAFieldCollection', iptrw);
+ RegisterProperty('Params', 'TDAParamCollection', iptrw);
+ RegisterProperty('LogChanges', 'boolean', iptrw);
+ RegisterProperty('RemoteFetchEnabled', 'boolean', iptrw);
+ RegisterProperty('MasterFields', 'string', iptrw);
+ RegisterProperty('DetailFields', 'string', iptrw);
+ RegisterProperty('MasterRequestMappings', 'TStrings', iptrw);
+ RegisterProperty('DetailOptions', 'TDADetailOptions', iptrw);
+ RegisterProperty('MasterOptions', 'TDAMasterOptions', iptrw);
+ RegisterProperty('Filtered', 'boolean', iptrw);
+ RegisterProperty('Filter', 'string', iptrw);
+ RegisterProperty('LogicalName', 'string', iptrw);
+ RegisterProperty('BusinessRulesID', 'string', iptrw);
+ RegisterProperty('State','TDataSetState',iptR);
+ end;
+end;
+
+procedure SIRegister_TDAParamCollection(CL: TIFPSPascalCompiler);
+begin
+ //with RegClassS(CL,'TSearcheableInterfacedCollection', 'TDAParamCollection') do
+ with CL.AddClassN(CL.FindClass('TSearcheableInterfacedCollection'), 'TDAParamCollection') do begin
+ RegisterMethod('Constructor Create( aOwner : TPersistent)');
+ RegisterMethod('Procedure WriteValues( OutputParams : TParams)');
+ RegisterMethod('Procedure ReadValues( InputParams : TParams)');
+ RegisterMethod('Function Add : TDAParam');
+ RegisterMethod('Function ParamByName( const aName : string) : TDAParam');
+ RegisterMethod('Function FindParam( const aParamName : string) : TDAParam');
+ RegisterMethod('Procedure AssignParamCollection( Source : TDAParamCollection)');
+ RegisterProperty('Params', 'TDAParam integer', iptrw);
+ SetDefaultPropery('Params');
+ RegisterProperty('HasInputParams', 'boolean', iptr);
+ end;
+end;
+
+procedure SIRegister_TDAParam(CL: TIFPSPascalCompiler);
+begin
+ //with RegClassS(CL,'TDABaseField', 'TDAParam') do
+ with CL.AddClassN(CL.FindClass('TDABaseField'), 'TDAParam') do begin
+ RegisterMethod('Procedure SaveToStream( const aStream : IROStream)');
+ RegisterMethod('Procedure LoadFromStream( const aStream : IROStream)');
+ RegisterMethod('Procedure SaveToFile( const aFileName : string)');
+ RegisterMethod('Procedure LoadFromFile( const aFileName : string)');
+ RegisterProperty('ParamType', 'TDAParamType', iptrw);
+ end;
+end;
+
+procedure SIRegister_TDAFieldCollection(CL: TIFPSPascalCompiler);
+begin
+ //with RegClassS(CL,'TDACustomFieldCollection', 'TDAFieldCollection') do
+ with CL.AddClassN(CL.FindClass('TDACustomFieldCollection'), 'TDAFieldCollection') do begin
+ RegisterMethod('Constructor Create( aOwner : TPersistent)');
+ RegisterMethod('Function FieldByName( const aName : string) : TDAField');
+ RegisterMethod('Function FindField( const aName : string) : TDAField');
+ RegisterProperty('Fields', 'TDAField integer', iptrw);
+ SetDefaultPropery('Fields');
+ end;
+end;
+
+procedure SIRegister_TDACustomFieldCollection(CL: TIFPSPascalCompiler);
+begin
+ //with RegClassS(CL,'TSearcheableInterfacedCollection', 'TDACustomFieldCollection') do
+ with CL.AddClassN(CL.FindClass('TSearcheableInterfacedCollection'), 'TDACustomFieldCollection') do begin
+ RegisterMethod('Procedure Bind( aDataset : TDataset)');
+ RegisterMethod('Procedure Unbind');
+ RegisterProperty('FieldEventsDisabled', 'boolean', iptrw);
+ RegisterMethod('Procedure AssignFieldCollection( Source : TDACustomFieldCollection)');
+ RegisterMethod('Function FieldByName( const aName : string) : TDACustomField');
+ RegisterMethod('Function FindField( const aName : string) : TDACustomField');
+ RegisterMethod('Procedure MoveItem( iFromIndex, iToIndex : integer)');
+ RegisterProperty('DataDictionary', 'IDADataDictionary', iptrw);
+ RegisterProperty('Fields', 'TDACustomField integer', iptrw);
+ SetDefaultPropery('Fields');
+ end;
+end;
+
+procedure SIRegister_TDADataDictionaryField(CL: TIFPSPascalCompiler);
+begin
+ //with RegClassS(CL,'TDACustomField', 'TDADataDictionaryField') do
+ with CL.AddClassN(CL.FindClass('TDACustomField'), 'TDADataDictionaryField') do begin
+ end;
+end;
+
+procedure SIRegister_TDAField(CL: TIFPSPascalCompiler);
+begin
+ //with RegClassS(CL,'TDACustomField', 'TDAField') do
+ with CL.AddClassN(CL.FindClass('TDACustomField'), 'TDAField') do begin
+ end;
+end;
+
+procedure SIRegister_TDACustomField(CL: TIFPSPascalCompiler);
+begin
+ //with RegClassS(CL,'TDABaseField', 'TDACustomField') do
+ with CL.AddClassN(CL.FindClass('TDABaseField'), 'TDACustomField') do begin
+ RegisterMethod('Procedure Bind( aField : TField)');
+ RegisterMethod('Procedure Unbind');
+ RegisterMethod('Procedure SaveToStream( const aStream : IROStream)');
+ RegisterMethod('Procedure LoadFromStream( const aStream : IROStream)');
+ RegisterMethod('Procedure SaveToFile( const aFileName : string)');
+ RegisterMethod('Procedure LoadFromFile( const aFileName : string)');
+ RegisterProperty('FieldCollection', 'TDACustomFieldCollection', iptr);
+ RegisterProperty('TableField', 'string', iptrw);
+ RegisterProperty('IsNull', 'boolean', iptr);
+ RegisterProperty('InPrimaryKey', 'boolean', iptrw);
+ RegisterProperty('Calculated', 'boolean', iptrw);
+ RegisterProperty('Lookup', 'boolean', iptrw);
+ RegisterProperty('LookupSource', 'TDataSource', iptrw);
+ RegisterProperty('LookupKeyFields', 'string', iptrw);
+ RegisterProperty('LookupResultField', 'string', iptrw);
+ RegisterProperty('KeyFields', 'string', iptrw);
+ RegisterProperty('LookupCache', 'boolean', iptrw);
+ RegisterProperty('LogChanges', 'boolean', iptrw);
+ RegisterProperty('RegExpression', 'string', iptrw);
+ RegisterProperty('DefaultValue', 'string', iptrw);
+ RegisterProperty('Required', 'boolean', iptrw);
+ RegisterProperty('DisplayWidth', 'integer', iptrw);
+ RegisterProperty('DisplayLabel', 'string', iptrw);
+ RegisterProperty('EditMask', 'string', iptrw);
+ RegisterProperty('Visible', 'boolean', iptrw);
+ RegisterProperty('ReadOnly', 'boolean', iptrw);
+ RegisterProperty('CustomAttributes', 'TStrings', iptrw);
+ RegisterProperty('DisplayFormat', 'string', iptrw);
+ RegisterProperty('BusinessRulesID', 'string', iptrw);
+ RegisterProperty('EditFormat', 'string', iptrw);
+ RegisterProperty('Alignment', 'TAlignment', iptrw);
+ end;
+end;
+
+procedure SIRegister_TDABaseField(CL: TIFPSPascalCompiler);
+begin
+ //with RegClassS(CL,'TCollectionItem', 'TDABaseField') do
+ with CL.AddClassN(CL.FindClass('TCollectionItem'), 'TDABaseField') do begin
+ RegisterProperty('Value', 'Variant', iptrw);
+ RegisterMethod('Procedure AssignField( Source : TDABaseField)');
+ RegisterMethod('Function HasValidDictionaryField : Boolean');
+ RegisterProperty('AsBoolean', 'boolean', iptrw);
+ RegisterProperty('AsCurrency', 'currency', iptrw);
+ RegisterProperty('AsDateTime', 'TDateTime', iptrw);
+ RegisterProperty('AsFloat', 'double', iptrw);
+ RegisterProperty('AsInteger', 'integer', iptrw);
+ RegisterProperty('AsString', 'string', iptrw);
+ RegisterProperty('AsVariant', 'variant', iptrw);
+ RegisterProperty('DictionaryEntry', 'string', iptrw);
+ RegisterProperty('Name', 'string', iptrw);
+ RegisterProperty('DataType', 'TDADataType', iptrw);
+ RegisterProperty('Size', 'integer', iptrw);
+ RegisterProperty('Description', 'string', iptrw);
+ RegisterProperty('BlobType', 'TDABlobType', iptrw);
+ end;
+end;
+
+procedure SIRegister_uDA(CL: TIFPSPascalCompiler);
+begin
+ CL.AddTypeS('TDAPersistFormat', '( pfBinary, pfXML )');
+ CL.AddTypeS('TDAParamType', '( daptUnknown, daptInput, daptOutput, daptInputO'
+ + 'utput, daptResult )');
+ CL.AddTypeS('TDADataType', '( datUnknown, datString, datDateTime, datFloat, d'
+ + 'atCurrency, datAutoInc, datInteger, datLargeInt, datBoolean, datMemo, datB'
+ + 'lob, datWideString, datWideMemo, datLargeAutoInc, datByte, datShortInt, '
+ + 'datWord, datSmallInt, datCardinal, datLargeUInt, datGuid, datXml, datDecimal, datSingleFloat )');
+ CL.AddTypeS('TDABlobType', '( dabtUnknown, dabtBlob, dabtMemo, dabtOraBlob, d'
+ + 'abtOraClob, dabtGraphic,dabtTypedBinary)');
+ SIRegister_TDABaseField(CL);
+ CL.AddClassN(CL.FindClass('TOBJECT'), 'TDACustomFieldCollection');
+ SIRegister_TDACustomField(CL);
+ SIRegister_TDAField(CL);
+ SIRegister_TDADataDictionaryField(CL);
+ SIRegister_TDACustomFieldCollection(CL);
+ SIRegister_TDAFieldCollection(CL);
+ SIRegister_TDAParam(CL);
+ SIRegister_TDAParamCollection(CL);
+ SIRegister_TDADataTable(CL);
+end;
+
+(* === run-time registration functions === *)
+
+procedure TDADataTableBusinessRulesID_W(Self: TDADataTable; const T: string);
+begin
+ Self.BusinessRulesID := T;
+end;
+
+procedure TDADataTableBusinessRulesID_R(Self: TDADataTable; var T: string);
+begin
+ T := Self.BusinessRulesID;
+end;
+
+procedure TDADataTableLogicalName_W(Self: TDADataTable; const T: string);
+begin
+ Self.LogicalName := T;
+end;
+
+procedure TDADataTableLogicalName_R(Self: TDADataTable; var T: string);
+begin
+ T := Self.LogicalName;
+end;
+
+procedure TDADataTableFilter_W(Self: TDADataTable; const T: string);
+begin
+ Self.Filter := T;
+end;
+
+procedure TDADataTableFilter_R(Self: TDADataTable; var T: string);
+begin
+ T := Self.Filter;
+end;
+
+procedure TDADataTableFiltered_W(Self: TDADataTable; const T: boolean);
+begin
+ Self.Filtered := T;
+end;
+
+procedure TDADataTableFiltered_R(Self: TDADataTable; var T: boolean);
+begin
+ T := Self.Filtered;
+end;
+
+procedure TDADataTableMasterOptions_W(Self: TDADataTable; const T: TDAMasterOptions);
+begin
+ Self.MasterOptions := T;
+end;
+
+procedure TDADataTableMasterOptions_R(Self: TDADataTable; var T: TDAMasterOptions);
+begin
+ T := Self.MasterOptions;
+end;
+
+procedure TDADataTableDetailOptions_W(Self: TDADataTable; const T: TDADetailOptions);
+begin
+ Self.DetailOptions := T;
+end;
+
+procedure TDADataTableDetailOptions_R(Self: TDADataTable; var T: TDADetailOptions);
+begin
+ T := Self.DetailOptions;
+end;
+
+procedure TDADataTableMasterRequestMappings_W(Self: TDADataTable; const T: TStrings);
+begin
+ Self.MasterRequestMappings := T;
+end;
+
+procedure TDADataTableMasterRequestMappings_R(Self: TDADataTable; var T: TStrings);
+begin
+ T := Self.MasterRequestMappings;
+end;
+
+procedure TDADataTableDetailFields_W(Self: TDADataTable; const T: string);
+begin
+ Self.DetailFields := T;
+end;
+
+procedure TDADataTableDetailFields_R(Self: TDADataTable; var T: string);
+begin
+ T := Self.DetailFields;
+end;
+
+procedure TDADataTableMasterFields_W(Self: TDADataTable; const T: string);
+begin
+ Self.MasterFields := T;
+end;
+
+procedure TDADataTableMasterFields_R(Self: TDADataTable; var T: string);
+begin
+ T := Self.MasterFields;
+end;
+
+procedure TDADataTableRemoteFetchEnabled_W(Self: TDADataTable; const T: boolean);
+begin
+ Self.RemoteFetchEnabled := T;
+end;
+
+procedure TDADataTableRemoteFetchEnabled_R(Self: TDADataTable; var T: boolean);
+begin
+ T := Self.RemoteFetchEnabled;
+end;
+
+procedure TDADataTableLogChanges_W(Self: TDADataTable; const T: boolean);
+begin
+ Self.LogChanges := T;
+end;
+
+procedure TDADataTableLogChanges_R(Self: TDADataTable; var T: boolean);
+begin
+ T := Self.LogChanges;
+end;
+
+procedure TDADataTableParams_W(Self: TDADataTable; const T: TDAParamCollection);
+begin
+ Self.Params := T;
+end;
+
+procedure TDADataTableParams_R(Self: TDADataTable; var T: TDAParamCollection);
+begin
+ T := Self.Params;
+end;
+
+procedure TDADataTableFields_W(Self: TDADataTable; const T: TDAFieldCollection);
+begin
+ Self.Fields := T;
+end;
+
+procedure TDADataTableFields_R(Self: TDADataTable; var T: TDAFieldCollection);
+begin
+ T := Self.Fields;
+end;
+
+procedure TDADataTableActive_W(Self: TDADataTable; const T: boolean);
+begin
+ Self.Active := T;
+end;
+
+procedure TDADataTableActive_R(Self: TDADataTable; var T: boolean);
+begin
+ T := Self.Active;
+end;
+
+procedure TDAParamCollectionHasInputParams_R(Self: TDAParamCollection; var T: boolean);
+begin
+ T := Self.HasInputParams;
+end;
+
+procedure TDAParamCollectionParams_W(Self: TDAParamCollection; const T: TDAParam; const t1: integer);
+begin
+ Self.Params[t1] := T;
+end;
+
+procedure TDAParamCollectionParams_R(Self: TDAParamCollection; var T: TDAParam; const t1: integer);
+begin
+ T := Self.Params[t1];
+end;
+
+procedure TDAParamParamType_W(Self: TDAParam; const T: TDAParamType);
+begin
+ Self.ParamType := T;
+end;
+
+procedure TDAParamParamType_R(Self: TDAParam; var T: TDAParamType);
+begin
+ T := Self.ParamType;
+end;
+
+procedure TDAFieldCollectionFields_W(Self: TDAFieldCollection; const T: TDAField; const t1: integer);
+begin
+ Self.Fields[t1] := T;
+end;
+
+procedure TDAFieldCollectionFields_R(Self: TDAFieldCollection; var T: TDAField; const t1: integer);
+begin
+ T := Self.Fields[t1];
+end;
+
+procedure TDACustomFieldCollectionFields_W(Self: TDACustomFieldCollection; const T: TDACustomField; const t1: integer);
+begin
+ Self.Fields[t1] := T;
+end;
+
+procedure TDACustomFieldCollectionFields_R(Self: TDACustomFieldCollection; var T: TDACustomField; const t1: integer);
+begin
+ T := Self.Fields[t1];
+end;
+
+procedure TDACustomFieldCollectionDataDictionary_W(Self: TDACustomFieldCollection; const T: IDADataDictionary);
+begin
+ Self.DataDictionary := T;
+end;
+
+procedure TDACustomFieldCollectionDataDictionary_R(Self: TDACustomFieldCollection; var T: IDADataDictionary);
+begin
+ T := Self.DataDictionary;
+end;
+
+procedure TDACustomFieldCollectionFieldEventsDisabled_W(Self: TDACustomFieldCollection; const T: boolean);
+begin
+ Self.FieldEventsDisabled := T;
+end;
+
+procedure TDACustomFieldCollectionFieldEventsDisabled_R(Self: TDACustomFieldCollection; var T: boolean);
+begin
+ T := Self.FieldEventsDisabled;
+end;
+
+procedure TDACustomFieldAlignment_W(Self: TDACustomField; const T: TAlignment);
+begin
+ Self.Alignment := T;
+end;
+
+procedure TDACustomFieldAlignment_R(Self: TDACustomField; var T: TAlignment);
+begin
+ T := Self.Alignment;
+end;
+
+procedure TDACustomFieldEditFormat_W(Self: TDACustomField; const T: string);
+begin
+ Self.EditFormat := T;
+end;
+
+procedure TDACustomFieldEditFormat_R(Self: TDACustomField; var T: string);
+begin
+ T := Self.EditFormat;
+end;
+
+procedure TDACustomFieldBusinessRulesID_W(Self: TDACustomField; const T: string);
+begin
+ Self.BusinessClassID := T;
+end;
+
+procedure TDACustomFieldBusinessRulesID_R(Self: TDACustomField; var T: string);
+begin
+ T := Self.BusinessClassID;
+end;
+
+procedure TDACustomFieldDisplayFormat_W(Self: TDACustomField; const T: string);
+begin
+ Self.DisplayFormat := T;
+end;
+
+procedure TDACustomFieldDisplayFormat_R(Self: TDACustomField; var T: string);
+begin
+ T := Self.DisplayFormat;
+end;
+
+procedure TDACustomFieldCustomAttributes_W(Self: TDACustomField; const T: TStrings);
+begin
+ Self.CustomAttributes := T;
+end;
+
+procedure TDACustomFieldCustomAttributes_R(Self: TDACustomField; var T: TStrings);
+begin
+ T := Self.CustomAttributes;
+end;
+
+procedure TDACustomFieldReadOnly_W(Self: TDACustomField; const T: boolean);
+begin
+ Self.ReadOnly := T;
+end;
+
+procedure TDACustomFieldReadOnly_R(Self: TDACustomField; var T: boolean);
+begin
+ T := Self.ReadOnly;
+end;
+
+procedure TDACustomFieldVisible_W(Self: TDACustomField; const T: boolean);
+begin
+ Self.Visible := T;
+end;
+
+procedure TDACustomFieldVisible_R(Self: TDACustomField; var T: boolean);
+begin
+ T := Self.Visible;
+end;
+
+procedure TDACustomFieldEditMask_W(Self: TDACustomField; const T: string);
+begin
+ Self.EditMask := T;
+end;
+
+procedure TDACustomFieldEditMask_R(Self: TDACustomField; var T: string);
+begin
+ T := Self.EditMask;
+end;
+
+procedure TDACustomFieldDisplayLabel_W(Self: TDACustomField; const T: string);
+begin
+ Self.DisplayLabel := T;
+end;
+
+procedure TDACustomFieldDisplayLabel_R(Self: TDACustomField; var T: string);
+begin
+ T := Self.DisplayLabel;
+end;
+
+procedure TDACustomFieldDisplayWidth_W(Self: TDACustomField; const T: integer);
+begin
+ Self.DisplayWidth := T;
+end;
+
+procedure TDACustomFieldDisplayWidth_R(Self: TDACustomField; var T: integer);
+begin
+ T := Self.DisplayWidth;
+end;
+
+procedure TDACustomFieldRequired_W(Self: TDACustomField; const T: boolean);
+begin
+ Self.Required := T;
+end;
+
+procedure TDACustomFieldRequired_R(Self: TDACustomField; var T: boolean);
+begin
+ T := Self.Required;
+end;
+
+procedure TDACustomFieldDefaultValue_W(Self: TDACustomField; const T: string);
+begin
+ Self.DefaultValue := T;
+end;
+
+procedure TDACustomFieldDefaultValue_R(Self: TDACustomField; var T: string);
+begin
+ T := Self.DefaultValue;
+end;
+
+procedure TDACustomFieldRegExpression_W(Self: TDACustomField; const T: string);
+begin
+ Self.RegExpression := T;
+end;
+
+procedure TDACustomFieldRegExpression_R(Self: TDACustomField; var T: string);
+begin
+ T := Self.RegExpression;
+end;
+
+procedure TDACustomFieldLogChanges_W(Self: TDACustomField; const T: boolean);
+begin
+ Self.LogChanges := T;
+end;
+
+procedure TDACustomFieldLogChanges_R(Self: TDACustomField; var T: boolean);
+begin
+ T := Self.LogChanges;
+end;
+
+procedure TDACustomFieldLookupCache_W(Self: TDACustomField; const T: boolean);
+begin
+ Self.LookupCache := T;
+end;
+
+procedure TDACustomFieldLookupCache_R(Self: TDACustomField; var T: boolean);
+begin
+ T := Self.LookupCache;
+end;
+
+procedure TDACustomFieldKeyFields_W(Self: TDACustomField; const T: string);
+begin
+ Self.KeyFields := T;
+end;
+
+procedure TDACustomFieldKeyFields_R(Self: TDACustomField; var T: string);
+begin
+ T := Self.KeyFields;
+end;
+
+procedure TDACustomFieldLookupResultField_W(Self: TDACustomField; const T: string);
+begin
+ Self.LookupResultField := T;
+end;
+
+procedure TDACustomFieldLookupResultField_R(Self: TDACustomField; var T: string);
+begin
+ T := Self.LookupResultField;
+end;
+
+procedure TDACustomFieldLookupKeyFields_W(Self: TDACustomField; const T: string);
+begin
+ Self.LookupKeyFields := T;
+end;
+
+procedure TDACustomFieldLookupKeyFields_R(Self: TDACustomField; var T: string);
+begin
+ T := Self.LookupKeyFields;
+end;
+
+procedure TDACustomFieldLookupSource_W(Self: TDACustomField; const T: TDataSource);
+begin
+ Self.LookupSource := T;
+end;
+
+procedure TDACustomFieldLookupSource_R(Self: TDACustomField; var T: TDataSource);
+begin
+ T := Self.LookupSource;
+end;
+
+procedure TDACustomFieldLookup_W(Self: TDACustomField; const T: boolean);
+begin
+ Self.Lookup := T;
+end;
+
+procedure TDACustomFieldLookup_R(Self: TDACustomField; var T: boolean);
+begin
+ T := Self.Lookup;
+end;
+
+procedure TDACustomFieldCalculated_W(Self: TDACustomField; const T: boolean);
+begin
+ Self.Calculated := T;
+end;
+
+procedure TDACustomFieldCalculated_R(Self: TDACustomField; var T: boolean);
+begin
+ T := Self.Calculated;
+end;
+
+procedure TDACustomFieldInPrimaryKey_W(Self: TDACustomField; const T: boolean);
+begin
+ Self.InPrimaryKey := T;
+end;
+
+procedure TDACustomFieldInPrimaryKey_R(Self: TDACustomField; var T: boolean);
+begin
+ T := Self.InPrimaryKey;
+end;
+
+procedure TDACustomFieldIsNull_R(Self: TDACustomField; var T: boolean);
+begin
+ T := Self.IsNull;
+end;
+
+procedure TDACustomFieldTableField_W(Self: TDACustomField; const T: string);
+begin
+ Self.TableField := T;
+end;
+
+procedure TDACustomFieldTableField_R(Self: TDACustomField; var T: string);
+begin
+ T := Self.TableField;
+end;
+
+procedure TDACustomFieldFieldCollection_R(Self: TDACustomField; var T: TDACustomFieldCollection);
+begin
+ T := Self.FieldCollection;
+end;
+
+procedure TDABaseFieldBlobType_W(Self: TDABaseField; const T: TDABlobType);
+begin
+ Self.BlobType := T;
+end;
+
+procedure TDABaseFieldBlobType_R(Self: TDABaseField; var T: TDABlobType);
+begin
+ T := Self.BlobType;
+end;
+
+procedure TDABaseFieldDescription_W(Self: TDABaseField; const T: string);
+begin
+ Self.Description := T;
+end;
+
+procedure TDABaseFieldDescription_R(Self: TDABaseField; var T: string);
+begin
+ T := Self.Description;
+end;
+
+procedure TDABaseFieldSize_W(Self: TDABaseField; const T: integer);
+begin
+ Self.Size := T;
+end;
+
+procedure TDABaseFieldSize_R(Self: TDABaseField; var T: integer);
+begin
+ T := Self.Size;
+end;
+
+procedure TDABaseFieldDataType_W(Self: TDABaseField; const T: TDADataType);
+begin
+ Self.DataType := T;
+end;
+
+procedure TDABaseFieldDataType_R(Self: TDABaseField; var T: TDADataType);
+begin
+ T := Self.DataType;
+end;
+
+procedure TDABaseFieldName_W(Self: TDABaseField; const T: string);
+begin
+ Self.Name := T;
+end;
+
+procedure TDABaseFieldName_R(Self: TDABaseField; var T: string);
+begin
+ T := Self.Name;
+end;
+
+procedure TDABaseFieldDictionaryEntry_W(Self: TDABaseField; const T: string);
+begin
+ Self.DictionaryEntry := T;
+end;
+
+procedure TDABaseFieldDictionaryEntry_R(Self: TDABaseField; var T: string);
+begin
+ T := Self.DictionaryEntry;
+end;
+
+procedure TDABaseFieldAsVariant_W(Self: TDABaseField; const T: variant);
+begin
+ Self.AsVariant := T;
+end;
+
+procedure TDABaseFieldAsVariant_R(Self: TDABaseField; var T: variant);
+begin
+ T := Self.AsVariant;
+end;
+
+procedure TDABaseFieldAsString_W(Self: TDABaseField; const T: string);
+begin
+ Self.AsString := T;
+end;
+
+procedure TDABaseFieldAsString_R(Self: TDABaseField; var T: string);
+begin
+ T := Self.AsString;
+end;
+
+procedure TDABaseFieldAsInteger_W(Self: TDABaseField; const T: integer);
+begin
+ Self.AsInteger := T;
+end;
+
+procedure TDABaseFieldAsInteger_R(Self: TDABaseField; var T: integer);
+begin
+ T := Self.AsInteger;
+end;
+
+procedure TDABaseFieldAsFloat_W(Self: TDABaseField; const T: double);
+begin
+ Self.AsFloat := T;
+end;
+
+procedure TDABaseFieldAsFloat_R(Self: TDABaseField; var T: double);
+begin
+ T := Self.AsFloat;
+end;
+
+procedure TDABaseFieldAsDateTime_W(Self: TDABaseField; const T: TDateTime);
+begin
+ Self.AsDateTime := T;
+end;
+
+procedure TDABaseFieldAsDateTime_R(Self: TDABaseField; var T: TDateTime);
+begin
+ T := Self.AsDateTime;
+end;
+
+procedure TDABaseFieldAsCurrency_W(Self: TDABaseField; const T: currency);
+begin
+ Self.AsCurrency := T;
+end;
+
+procedure TDABaseFieldAsCurrency_R(Self: TDABaseField; var T: currency);
+begin
+ T := Self.AsCurrency;
+end;
+
+procedure TDABaseFieldAsBoolean_W(Self: TDABaseField; const T: boolean);
+begin
+ Self.AsBoolean := T;
+end;
+
+procedure TDABaseFieldAsBoolean_R(Self: TDABaseField; var T: boolean);
+begin
+ T := Self.AsBoolean;
+end;
+
+procedure TDABaseFieldValue_W(Self: TDABaseField; const T: Variant);
+begin
+ Self.Value := T;
+end;
+
+procedure TDABaseFieldValue_R(Self: TDABaseField; var T: Variant);
+begin
+ T := Self.Value;
+end;
+
+procedure TDADataTableState_R(Self: TDADataTable; var T: TDataSetState);
+begin
+ T := Self.State;
+end;
+
+procedure RIRegister_TDADataTable(CL: TIFPSRuntimeClassImporter);
+begin
+ with CL.Add(TDADataTable) do begin
+ RegisterPropertyHelper(@TDADataTableActive_R, @TDADataTableActive_W, 'Active');
+ RegisterPropertyHelper(@TDADataTableFields_R, @TDADataTableFields_W, 'Fields');
+ RegisterPropertyHelper(@TDADataTableParams_R, @TDADataTableParams_W, 'Params');
+ RegisterPropertyHelper(@TDADataTableLogChanges_R, @TDADataTableLogChanges_W, 'LogChanges');
+ RegisterPropertyHelper(@TDADataTableRemoteFetchEnabled_R, @TDADataTableRemoteFetchEnabled_W, 'RemoteFetchEnabled');
+ RegisterPropertyHelper(@TDADataTableMasterFields_R, @TDADataTableMasterFields_W, 'MasterFields');
+ RegisterPropertyHelper(@TDADataTableDetailFields_R, @TDADataTableDetailFields_W, 'DetailFields');
+ RegisterPropertyHelper(@TDADataTableMasterRequestMappings_R, @TDADataTableMasterRequestMappings_W, 'MasterRequestMappings');
+ RegisterPropertyHelper(@TDADataTableDetailOptions_R, @TDADataTableDetailOptions_W, 'DetailOptions');
+ RegisterPropertyHelper(@TDADataTableMasterOptions_R, @TDADataTableMasterOptions_W, 'MasterOptions');
+ RegisterPropertyHelper(@TDADataTableFiltered_R, @TDADataTableFiltered_W, 'Filtered');
+ RegisterPropertyHelper(@TDADataTableFilter_R, @TDADataTableFilter_W, 'Filter');
+ RegisterPropertyHelper(@TDADataTableLogicalName_R, @TDADataTableLogicalName_W, 'LogicalName');
+ RegisterPropertyHelper(@TDADataTableBusinessRulesID_R, @TDADataTableBusinessRulesID_W, 'BusinessRulesID');
+ RegisterPropertyHelper(@TDADataTableState_R, nil, 'State');
+ end;
+end;
+
+procedure RIRegister_TDAParamCollection(CL: TIFPSRuntimeClassImporter);
+begin
+ with CL.Add(TDAParamCollection) do begin
+ RegisterConstructor(@TDAParamCollection.Create, 'Create');
+ RegisterMethod(@TDAParamCollection.WriteValues, 'WriteValues');
+ RegisterMethod(@TDAParamCollection.ReadValues, 'ReadValues');
+ RegisterMethod(@TDAParamCollection.Add, 'Add');
+ RegisterMethod(@TDAParamCollection.ParamByName, 'ParamByName');
+ RegisterMethod(@TDAParamCollection.FindParam, 'FindParam');
+ RegisterMethod(@TDAParamCollection.AssignParamCollection, 'AssignParamCollection');
+ RegisterPropertyHelper(@TDAParamCollectionParams_R, @TDAParamCollectionParams_W, 'Params');
+ RegisterPropertyHelper(@TDAParamCollectionHasInputParams_R, nil, 'HasInputParams');
+ end;
+end;
+
+procedure RIRegister_TDAParam(CL: TIFPSRuntimeClassImporter);
+begin
+ with CL.Add(TDAParam) do begin
+ RegisterMethod(@TDAParam.SaveToStream, 'SaveToStream');
+ RegisterMethod(@TDAParam.LoadFromStream, 'LoadFromStream');
+ RegisterMethod(@TDAParam.SaveToFile, 'SaveToFile');
+ RegisterMethod(@TDAParam.LoadFromFile, 'LoadFromFile');
+ RegisterPropertyHelper(@TDAParamParamType_R, @TDAParamParamType_W, 'ParamType');
+ end;
+end;
+
+procedure RIRegister_TDAFieldCollection(CL: TIFPSRuntimeClassImporter);
+begin
+ with CL.Add(TDAFieldCollection) do begin
+ RegisterConstructor(@TDAFieldCollection.Create, 'Create');
+ RegisterMethod(@TDAFieldCollection.FieldByName, 'FieldByName');
+ RegisterMethod(@TDAFieldCollection.FindField, 'FindField');
+ RegisterPropertyHelper(@TDAFieldCollectionFields_R, @TDAFieldCollectionFields_W, 'Fields');
+ end;
+end;
+
+procedure RIRegister_TDACustomFieldCollection(CL: TIFPSRuntimeClassImporter);
+begin
+ with CL.Add(TDACustomFieldCollection) do begin
+ RegisterMethod(@TDACustomFieldCollection.Bind, 'Bind');
+ RegisterMethod(@TDACustomFieldCollection.Unbind, 'Unbind');
+ RegisterPropertyHelper(@TDACustomFieldCollectionFieldEventsDisabled_R, @TDACustomFieldCollectionFieldEventsDisabled_W, 'FieldEventsDisabled');
+ RegisterMethod(@TDACustomFieldCollection.AssignFieldCollection, 'AssignFieldCollection');
+ RegisterMethod(@TDACustomFieldCollection.FieldByName, 'FieldByName');
+ RegisterMethod(@TDACustomFieldCollection.FindField, 'FindField');
+ RegisterMethod(@TDACustomFieldCollection.MoveItem, 'MoveItem');
+ RegisterPropertyHelper(@TDACustomFieldCollectionDataDictionary_R, @TDACustomFieldCollectionDataDictionary_W, 'DataDictionary');
+ RegisterPropertyHelper(@TDACustomFieldCollectionFields_R, @TDACustomFieldCollectionFields_W, 'Fields');
+ end;
+end;
+
+procedure RIRegister_TDADataDictionaryField(CL: TIFPSRuntimeClassImporter);
+begin
+ with CL.Add(TDADataDictionaryField) do begin
+ end;
+end;
+
+procedure RIRegister_TDAField(CL: TIFPSRuntimeClassImporter);
+begin
+ with CL.Add(TDAField) do begin
+ end;
+end;
+
+procedure RIRegister_TDACustomField(CL: TIFPSRuntimeClassImporter);
+begin
+ with CL.Add(TDACustomField) do begin
+ RegisterMethod(@TDACustomField.Bind, 'Bind');
+ RegisterMethod(@TDACustomField.Unbind, 'Unbind');
+ RegisterMethod(@TDACustomField.SaveToStream, 'SaveToStream');
+ RegisterMethod(@TDACustomField.LoadFromStream, 'LoadFromStream');
+ RegisterMethod(@TDACustomField.SaveToFile, 'SaveToFile');
+ RegisterMethod(@TDACustomField.LoadFromFile, 'LoadFromFile');
+ RegisterPropertyHelper(@TDACustomFieldFieldCollection_R, nil, 'FieldCollection');
+ RegisterPropertyHelper(@TDACustomFieldTableField_R, @TDACustomFieldTableField_W, 'TableField');
+ RegisterPropertyHelper(@TDACustomFieldIsNull_R, nil, 'IsNull');
+ RegisterPropertyHelper(@TDACustomFieldInPrimaryKey_R, @TDACustomFieldInPrimaryKey_W, 'InPrimaryKey');
+ RegisterPropertyHelper(@TDACustomFieldCalculated_R, @TDACustomFieldCalculated_W, 'Calculated');
+ RegisterPropertyHelper(@TDACustomFieldLookup_R, @TDACustomFieldLookup_W, 'Lookup');
+ RegisterPropertyHelper(@TDACustomFieldLookupSource_R, @TDACustomFieldLookupSource_W, 'LookupSource');
+ RegisterPropertyHelper(@TDACustomFieldLookupKeyFields_R, @TDACustomFieldLookupKeyFields_W, 'LookupKeyFields');
+ RegisterPropertyHelper(@TDACustomFieldLookupResultField_R, @TDACustomFieldLookupResultField_W, 'LookupResultField');
+ RegisterPropertyHelper(@TDACustomFieldKeyFields_R, @TDACustomFieldKeyFields_W, 'KeyFields');
+ RegisterPropertyHelper(@TDACustomFieldLookupCache_R, @TDACustomFieldLookupCache_W, 'LookupCache');
+ RegisterPropertyHelper(@TDACustomFieldLogChanges_R, @TDACustomFieldLogChanges_W, 'LogChanges');
+ RegisterPropertyHelper(@TDACustomFieldRegExpression_R, @TDACustomFieldRegExpression_W, 'RegExpression');
+ RegisterPropertyHelper(@TDACustomFieldDefaultValue_R, @TDACustomFieldDefaultValue_W, 'DefaultValue');
+ RegisterPropertyHelper(@TDACustomFieldRequired_R, @TDACustomFieldRequired_W, 'Required');
+ RegisterPropertyHelper(@TDACustomFieldDisplayWidth_R, @TDACustomFieldDisplayWidth_W, 'DisplayWidth');
+ RegisterPropertyHelper(@TDACustomFieldDisplayLabel_R, @TDACustomFieldDisplayLabel_W, 'DisplayLabel');
+ RegisterPropertyHelper(@TDACustomFieldEditMask_R, @TDACustomFieldEditMask_W, 'EditMask');
+ RegisterPropertyHelper(@TDACustomFieldVisible_R, @TDACustomFieldVisible_W, 'Visible');
+ RegisterPropertyHelper(@TDACustomFieldReadOnly_R, @TDACustomFieldReadOnly_W, 'ReadOnly');
+ RegisterPropertyHelper(@TDACustomFieldCustomAttributes_R, @TDACustomFieldCustomAttributes_W, 'CustomAttributes');
+ RegisterPropertyHelper(@TDACustomFieldDisplayFormat_R, @TDACustomFieldDisplayFormat_W, 'DisplayFormat');
+ RegisterPropertyHelper(@TDACustomFieldBusinessRulesID_R, @TDACustomFieldBusinessRulesID_W, 'BusinessRulesID');
+ RegisterPropertyHelper(@TDACustomFieldEditFormat_R, @TDACustomFieldEditFormat_W, 'EditFormat');
+ RegisterPropertyHelper(@TDACustomFieldAlignment_R, @TDACustomFieldAlignment_W, 'Alignment');
+ end;
+end;
+
+procedure RIRegister_TDABaseField(CL: TIFPSRuntimeClassImporter);
+begin
+ with CL.Add(TDABaseField) do begin
+ RegisterPropertyHelper(@TDABaseFieldValue_R, @TDABaseFieldValue_W, 'Value');
+ RegisterVirtualMethod(@TDABaseField.AssignField, 'AssignField');
+ RegisterMethod(@TDABaseField.HasValidDictionaryField, 'HasValidDictionaryField');
+ RegisterPropertyHelper(@TDABaseFieldAsBoolean_R, @TDABaseFieldAsBoolean_W, 'AsBoolean');
+ RegisterPropertyHelper(@TDABaseFieldAsCurrency_R, @TDABaseFieldAsCurrency_W, 'AsCurrency');
+ RegisterPropertyHelper(@TDABaseFieldAsDateTime_R, @TDABaseFieldAsDateTime_W, 'AsDateTime');
+ RegisterPropertyHelper(@TDABaseFieldAsFloat_R, @TDABaseFieldAsFloat_W, 'AsFloat');
+ RegisterPropertyHelper(@TDABaseFieldAsInteger_R, @TDABaseFieldAsInteger_W, 'AsInteger');
+ RegisterPropertyHelper(@TDABaseFieldAsString_R, @TDABaseFieldAsString_W, 'AsString');
+ RegisterPropertyHelper(@TDABaseFieldAsVariant_R, @TDABaseFieldAsVariant_W, 'AsVariant');
+ RegisterPropertyHelper(@TDABaseFieldDictionaryEntry_R, @TDABaseFieldDictionaryEntry_W, 'DictionaryEntry');
+ RegisterPropertyHelper(@TDABaseFieldName_R, @TDABaseFieldName_W, 'Name');
+ RegisterPropertyHelper(@TDABaseFieldDataType_R, @TDABaseFieldDataType_W, 'DataType');
+ RegisterPropertyHelper(@TDABaseFieldSize_R, @TDABaseFieldSize_W, 'Size');
+ RegisterPropertyHelper(@TDABaseFieldDescription_R, @TDABaseFieldDescription_W, 'Description');
+ RegisterPropertyHelper(@TDABaseFieldBlobType_R, @TDABaseFieldBlobType_W, 'BlobType');
+ end;
+end;
+
+procedure RIRegister_uDA(CL: TIFPSRuntimeClassImporter);
+begin
+ RIRegister_TDABaseField(CL);
+ RIRegister_TDACustomField(CL);
+ RIRegister_TDAField(CL);
+ RIRegister_TDADataDictionaryField(CL);
+ RIRegister_TDACustomFieldCollection(CL);
+ RIRegister_TDAFieldCollection(CL);
+ RIRegister_TDAParam(CL);
+ RIRegister_TDAParamCollection(CL);
+ RIRegister_TDADataTable(CL);
+end;
+
+{ TDAPSDataTableRulesPlugin }
+
+function PSNewGuid: string;
+begin
+ result := NewGuidAsString();
+end;
+
+procedure PSRaiseError(const aMsg: string);
+begin
+ raise EDAScriptError.Create(aMsg);
+end;
+
+procedure PSAbort;
+begin
+ Abort;
+end;
+
+{$IFDEF FPC}
+Procedure ShowMessage(const msg: string);
+begin
+ fpgtkext.ShowMessage('',msg);
+end;
+{$ENDIF}
+
+procedure TDAPSDataTableRulesPlugin.CompileImport1(CompExec: TPSScript);
+begin
+ fScriptEngine := CompExec;
+ SIRegister_uDA(CompExec.Comp);
+ CompExec.AddRegisteredVariable('Table', 'TDADataTable');
+ CompExec.AddFunction(@ShowMessage,'procedure ShowMessage(const Msg: string);');
+ CompExec.AddFunction(@PSRaiseError,'procedure RaiseError(const aMsg: string);');
+ CompExec.AddFunction(@PSAbort,'procedure Abort;');
+ CompExec.AddFunction(@PSNewGuid,'function NewGuid: string;');
+end;
+
+procedure TDAPSDataTableRulesPlugin.CompOnUses(CompExec: TPSScript);
+begin
+ fScriptEngine := CompExec;
+end;
+
+procedure TDAPSDataTableRulesPlugin.ExecImport2(CompExec: TPSScript;
+ const ri: TPSRuntimeClassImporter);
+begin
+ fScriptEngine := CompExec;
+ RIRegister_uDA(ri);
+ CompExec.SetVarToInstance('Table', fDataTable);
+end;
+
+procedure TDAPSDataTableRulesPlugin.SetDataTable(
+ const Value: TDADataTable);
+begin
+ fDataTable := Value;
+ if (fScriptEngine <> nil) then
+ fScriptEngine.SetVarToInstance('Table', fDataTable);
+end;
+
+{ TDAPSDataTableRules }
+
+procedure TDAPSDataTableRules.AfterCancel(Sender: TDADataTable);
+begin
+ ExecuteProc(Sender, 'AfterCancel');
+end;
+
+procedure TDAPSDataTableRules.AfterClose(Sender: TDADataTable);
+begin
+ ExecuteProc(Sender, 'AfterClose');
+end;
+
+procedure TDAPSDataTableRules.AfterDelete(Sender: TDADataTable);
+begin
+ ExecuteProc(Sender, 'AfterDelete');
+end;
+
+procedure TDAPSDataTableRules.AfterEdit(Sender: TDADataTable);
+begin
+ ExecuteProc(Sender, 'AfterEdit');
+end;
+
+procedure TDAPSDataTableRules.AfterInsert(Sender: TDADataTable);
+begin
+ ExecuteProc(Sender, 'AfterInsert');
+end;
+
+procedure TDAPSDataTableRules.AfterOpen(Sender: TDADataTable);
+begin
+ ExecuteProc(Sender, 'AfterOpen');
+end;
+
+procedure TDAPSDataTableRules.AfterPost(Sender: TDADataTable);
+begin
+ ExecuteProc(Sender, 'AfterPost');
+end;
+
+procedure TDAPSDataTableRules.AfterRefresh(Sender: TDADataTable);
+begin
+ ExecuteProc(Sender, 'AfterRefresh');
+end;
+
+procedure TDAPSDataTableRules.AfterScroll(Sender: TDADataTable);
+begin
+ ExecuteProc(Sender, 'AfterScroll');
+end;
+
+procedure TDAPSDataTableRules.BeforeCancel(Sender: TDADataTable);
+begin
+ ExecuteProc(Sender, 'BeforeCancel');
+end;
+
+procedure TDAPSDataTableRules.BeforeClose(Sender: TDADataTable);
+begin
+ ExecuteProc(Sender, 'BeforeClose');
+end;
+
+procedure TDAPSDataTableRules.BeforeDelete(Sender: TDADataTable);
+begin
+ ExecuteProc(Sender, 'BeforeDelete');
+end;
+
+procedure TDAPSDataTableRules.BeforeEdit(Sender: TDADataTable);
+begin
+ ExecuteProc(Sender, 'BeforeEdit');
+end;
+
+procedure TDAPSDataTableRules.BeforeInsert(Sender: TDADataTable);
+begin
+ ExecuteProc(Sender, 'BeforeInsert');
+end;
+
+procedure TDAPSDataTableRules.BeforeOpen(Sender: TDADataTable);
+begin
+ ExecuteProc(Sender, 'BeforeOpen');
+end;
+
+procedure TDAPSDataTableRules.BeforePost(Sender: TDADataTable);
+begin
+ ExecuteProc(Sender, 'BeforePost');
+end;
+
+procedure TDAPSDataTableRules.BeforeRefresh(Sender: TDADataTable);
+begin
+ ExecuteProc(Sender, 'BeforeRefresh');
+end;
+
+procedure TDAPSDataTableRules.BeforeScroll(Sender: TDADataTable);
+begin
+ ExecuteProc(Sender, 'BeforeScroll');
+end;
+
+procedure TDAPSDataTableRules.ExecuteProc(Dataset: TDADataTable;
+ const Name: string);
+var
+ ProcNo: Cardinal;
+begin
+ if FSE = nil then raise Exception.Create('No script engine attached');
+ Setup(Dataset);
+ ProcNo := FSE.Exec.GetProc(Name);
+ if ProcNo <> InvalidVal then {// Nothing to do} begin
+ FSE.Exec.RunProc(nil, ProcNo);
+ FSE.Exec.RaiseCurrentException;
+ end;
+end;
+
+procedure TDAPSDataTableRules.OnCalcFields(Sender: TDADataTable);
+begin
+ ExecuteProc(Sender, 'OnCalcFields');
+end;
+
+procedure TDAPSDataTableRules.OnNewRecord(Sender: TDADataTable);
+begin
+ ExecuteProc(Sender, 'OnNewRecord');
+end;
+
+procedure TDAPSDataTableRules.SetSE(const Value: TPSScript);
+var
+ lPlugin: TPSPlugin;
+ i: Integer;
+begin
+ if Value = nil then begin
+ FSE := nil
+ end
+ else begin
+ // ToDo: use GetPlugin() lateron.
+ lPlugin := nil;
+ for i := 0 to Value.Plugins.Count-1 do begin
+ if Assigned(Value.Plugins.Items[i]) and ((Value.Plugins.Items[i] as TPSPluginItem).Plugin is TDAPSDataTableRulesPlugin) then
+ lPlugin := (Value.Plugins.Items[i] as TPSPluginItem).Plugin;
+ end; { for }
+ if lPlugin = nil then begin
+ FSE := nil;
+ raise Exception.Create('No TDAPSDataTableRulesPlugin plugin attached to the script engine.');
+ end;
+ FSE := Value;
+ end;
+end;
+
+procedure TDAPSDataTableRules.Setup(const Dataset: TDADataTable);
+begin
+ FSE.SetVarToInstance('Table', Dataset);
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDAPleaseWaitForm.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAPleaseWaitForm.pas
new file mode 100644
index 0000000..5eb2bb6
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAPleaseWaitForm.pas
@@ -0,0 +1,117 @@
+unit uDAPleaseWaitForm;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ {$IFDEF FPC}LResources,{$ENDIF}
+ uROPleaseWaitForm,
+ Classes;
+
+type
+ IROPleaseWaitForm = interface
+ ['{32003A95-B7F4-4ED6-B65E-78B4204DF2AF}']
+ procedure Show(const iCaption:string=''); overload;
+ procedure Hide;
+ procedure Free;
+ end;
+
+function CreatePleaseWaitForm(aOwner: TComponent; const aCaption: string; aShow: boolean; aLogo:string; aWindowCaption:string=''): IROPleaseWaitForm; overload;
+function CreatePleaseWaitForm(aOwner: TComponent; const aCaption: string; aShow: boolean = true): IROPleaseWaitForm; overload;
+function CreatePleaseWaitForm(const aCaption: string; aShow: boolean = true): IROPleaseWaitForm; overload;
+
+implementation
+
+uses
+ Graphics,
+ SysUtils;
+
+{$IFNDEF FPC}
+ {$IFDEF MSWINDOWS}
+ {$R IDE\DataAbstract_IDE_AdditionalResources.res}
+ {$ENDIF}
+
+ {$IFDEF LINUX}
+ {$R IDE/DataAbstract_IDE_AdditionalResources.res}
+ {$ENDIF}
+{$ENDIF FPC}
+
+type
+ TROPleaseWaitFormWrapper = class(TInterfacedObject, IROPleaseWaitForm)
+ private
+ fForm: TPleaseWaitForm;
+ public
+ constructor Create(aForm: TPleaseWaitForm);
+ destructor Destroy; override;
+ procedure Show(const iCaption:string=''); overload;
+ procedure Hide;
+ procedure Free;
+ end;
+
+function CreatePleaseWaitForm(aOwner: TComponent; const aCaption: string; aShow: boolean; aLogo:string; aWindowCaption:string): IROPleaseWaitForm; overload;
+var
+ lBitmap: TBitmap;
+begin
+ if aWindowCaption = '' then aWindowCaption := 'Data Abstract';
+ lBitmap := TBitmap.Create();
+ lBitmap.LoadFromResourceName(hInstance, aLogo);
+ result := TROPleaseWaitFormWrapper.Create(TPleaseWaitForm.Create(aOwner, aCaption, aWindowCaption, lBitmap, true));
+ if aShow then result.Show();
+end;
+
+function CreatePleaseWaitForm(aOwner: TComponent; const aCaption: string; aShow: boolean = true): IROPleaseWaitForm;
+begin
+ result := CreatePleaseWaitForm(aOWner, aCaption, aShow, 'dalogo');
+end;
+
+function CreatePleaseWaitForm(const aCaption: string; aShow: boolean = true): IROPleaseWaitForm;
+begin
+ result := CreatePleaseWaitForm(nil, aCaption, aShow);
+end;
+
+{ TROPleaseWaitFormWrapper }
+
+constructor TROPleaseWaitFormWrapper.Create(aForm: TPleaseWaitForm);
+begin
+ fForm := aForm;
+end;
+
+destructor TROPleaseWaitFormWrapper.Destroy;
+begin
+ FreeAndNil(fForm);
+ inherited;
+end;
+
+procedure TROPleaseWaitFormWrapper.Free;
+begin
+ { no-op }
+end;
+
+procedure TROPleaseWaitFormWrapper.Hide;
+begin
+ fForm.Hide();
+end;
+
+procedure TROPleaseWaitFormWrapper.Show(const iCaption: string='');
+begin
+ fForm.Show(iCaption);
+end;
+
+{$IFDEF FPC}
+initialization
+ {$I IDE/DataAbstract_IDE_AdditionalResources.lrs}
+{$ENDIF}
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDAPostgresInterfaces.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAPostgresInterfaces.pas
new file mode 100644
index 0000000..8266dc1
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAPostgresInterfaces.pas
@@ -0,0 +1,573 @@
+unit uDAPostgresInterfaces;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ SysUtils,
+ uDAInterfaces, uDAEngine, uROClasses;
+
+type
+ { IDAPostgresConnection
+ For identification purposes Implemented by all Postgres connections }
+ IDAPostgresConnection = interface(IDAConnection)
+ ['{D8EADB7E-7AA0-48FF-9E7D-34853F999BFC}']
+ end;
+
+ TDAPostgresDriver = class(TDAEDriver)
+ protected
+ function GetDefaultConnectionType(const AuxDriver: string): string; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ public
+ end;
+
+ TDAEPostgresConnection = class(TDAEConnection, IDAPostgresConnection, IDACanQueryDatabaseNames, IDAUseGenerators)
+ protected
+ function DoGetLastAutoInc(const GeneratorName: string): integer; override;
+ procedure DoGetTableFields(const aTableName: string; out Fields: TDAFieldCollection); override;
+ procedure DoGetTableNames(out List: IROStrings); override;
+ procedure DoGetViewNames(out List: IROStrings); override;
+ procedure DoGetStoredProcedureNames(out List: IROStrings); override;
+ procedure DoGetForeignKeys(out ForeignKeys: TDADriverForeignKeyCollection); override;
+ function GetSPSelectSyntax(HasArguments: Boolean): string; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ procedure DoGetStoredProcedureParams(const aStoredProcedureName: string; out Params: TDAParamCollection); override;
+ function IdentifierNeedsQuoting(const iIdentifier: string): boolean; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ // IDACanQueryDatabaseNames
+ function GetDatabaseNames: IROStrings;
+ // IDAUseGenerators
+ function GetNextAutoinc(const GeneratorName: string): integer; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ end;
+
+function Postgres_GetDatabaseNames(aConnection: TDAEConnection): IROStrings;
+function Postgres_DoGetLastAutoInc(const GeneratorName: string; Query: IDADataset): integer;
+function Postgres_GetNextAutoInc(const GeneratorName: string; Query: IDADataset): integer;
+procedure Postgres_DoGetTableFields(const aTableName: string; Query: IDADataset; out Fields: TDAFieldCollection);
+procedure Postgres_DoGetNames(Query: IDADataset; AList: IROStrings; AObjectType: TDAObjecttype);
+function PostgresDataTypeToDA(aDataType: string; Unicode: Boolean=False): TDADataType;
+procedure Postgres_DoGetForeignKeys(Query: IDADataset;ForeignKeys: TDADriverForeignKeyCollection);
+function Postgres_GetSPSelectSyntax(HasArguments: Boolean): String;
+procedure Postgres_DoGetStoredProcedureParams(const aStoredProcedureName: string; Query: IDADataset; out Params: TDAParamCollection);
+function Postgres_IdentifierNeedsQuoting(const iIdentifier: string): boolean;
+
+const
+ PostgreSQL_DriverType = 'PostgreSQL';
+
+implementation
+
+var
+ postgres_reservedwords: array of string;
+
+const
+ Postgres_MasterDatabase = 'template1';
+ Postgres_GetDatabaseNames_SQL = 'SELECT datname FROM pg_database ORDER BY datname';
+
+function PostgresDataTypeToDA(aDataType: string; Unicode: Boolean): TDADataType;
+begin
+ aDataType := LowerCase(aDataType);
+ if pos(' ', aDataType) <> 0 then Delete(aDataType, Pos(' ', aDataType), MaxInt);
+ if (aDAtaType = 'varchar') or (aDataType = 'character varying') or
+ (aDataType = 'character') or (aDataType = 'char') or
+ (aDataType = '"char"') or (aDataType = 'name') then begin
+ if Unicode then
+ Result := datWideString
+ else
+ Result := datString;
+ end
+ else if aDataType = 'text' then begin
+ if Unicode then
+ Result := datWideMemo
+ else
+ Result := datMemo;
+ end
+ else if (aDataType = 'blob') or (aDataType = 'binary') or
+ (aDataType = 'varbinary') or (aDataType = 'bytea') or
+ (aDataType = 'binary large object') then
+ Result := datBlob
+ else if (aDataType = 'date') or (aDataType = 'absdate') or
+ (aDataType = 'time') or (aDataType = 'timetz') or
+ (aDataType = 'datetime') or
+ (aDataType = 'timestamp') or (aDataType = 'timestamptz') or
+ (aDataType = 'year') then
+ result := datDateTime
+ else if (aDataType = 'single') or
+ (aDataType = 'real') or (aDataType = 'float4') then
+ Result := datSingleFloat
+ else if (aDataType = 'double') or
+ (aDataType = 'float') or
+ (aDataType = 'doubleprecision') or (aDataType = 'float8') then
+ Result := datFloat
+ else if (aDataType = 'bit') or (aDataType = 'boolean') or (aDataType = 'bool') then
+ Result := datBoolean
+ else if (aDataType = 'bigint') or (aDataType = 'int8') then
+ result := datLargeInt
+ else if (aDataType = 'decimal') or (aDataType = 'numeric') then
+ result := datDecimal
+ else if (aDataType = 'money') then
+ result := datCurrency
+ else if (aDataType = 'serial') or (aDataType = 'serial4') then
+ result := datAutoInc
+ else if (aDataType = 'bigserial') or (aDataType = 'serial8') then
+ result := datLargeAutoInc
+ else if (aDataType = 'smallint') or (aDataType = 'int2') then
+ result := datSmallInt
+ else if (aDataType = 'shortint') or (aDataType = 'int1') then
+ result := datShortInt
+ else if (aDataType = 'enum') or
+ (aDataType = 'int4') or (adatatype = 'int') or (adatatype = 'integer') or
+ (aDataType = 'tinyint') then
+ result := datInteger
+ else
+ result := datUnknown;
+end;
+
+function Postgres_GetDatabaseNames(aConnection: TDAEConnection): IROStrings;
+begin
+ Result := Engine_GetDatabaseNames(aConnection, Postgres_MasterDatabase, Postgres_GetDatabaseNames_SQL);
+end;
+
+function Postgres_DoGetLastAutoInc(const GeneratorName: string; Query: IDADataset): integer;
+begin
+ try
+ Query.SQL := 'SELECT currval(''' + GeneratorName + ''')';
+ Query.Open;
+ result := Query.Fields[0].Value;
+ finally
+ Query := nil;
+ end;
+end;
+
+function Postgres_GetNextAutoInc(const GeneratorName: string; Query: IDADataset): integer;
+begin
+ try
+ Query.SQL := 'SELECT nextval(''' + GeneratorName + ''')';
+ Query.Open;
+ result := Query.Fields[0].Value;
+ finally
+ Query := nil;
+ end;
+end;
+
+procedure Postgres_DoGetTableFields(const aTableName: string; Query: IDADataset; out Fields: TDAFieldCollection);
+const
+ main_sql = 'SELECT COLUMN_NAME, DATA_TYPE, IS_NULLABLE, COLUMN_DEFAULT, CHARACTER_MAXIMUM_LENGTH, CHARACTER_SET_NAME, NUMERIC_PRECISION, NUMERIC_SCALE ' +
+ 'FROM INFORMATION_SCHEMA.COLUMNS ' +
+ 'WHERE TABLE_NAME=''{tbl}'' and TABLE_SCHEMA=''{schem}'' ' +
+ 'ORDER BY ORDINAL_POSITION';
+ pk_sql = 'SELECT COLUMN_NAME ' +
+ 'FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE ' +
+ 'WHERE TABLE_NAME=''{tbl}'' and TABLE_SCHEMA=''{schem}'' AND CONSTRAINT_NAME like ''%_pkey''';
+var
+ fld : TDAField;
+ lSchema, lTable : string;
+ p1 : integer;
+ s : string;
+begin
+ Fields := TDAFieldCollection.Create(nil);
+ try
+ {
+ Query.SQL := 'SELECT * FROM ' + aTableName + ' WHERE 1=0';
+ Query.Open;
+ Fields.Assign(Query.Fields);
+ Query.Close;
+ }
+ Query.SQL := main_sql;
+ lTable := aTableName;
+ if pos('.', lTable) = 0 then begin
+ lSchema := 'public'
+ end else begin
+ lSchema := copy(lTable, 1, pos('.', lTable) - 1);
+ Delete(lTable, 1, pos('.', lTable));
+ end;
+ Query.SQL := StringReplace(Query.SQL, '{tbl}', lTable, []);
+ Query.SQL := StringReplace(Query.SQL, '{schem}', lSchema, []);
+ Query.Open;
+ while not Query.Eof do begin
+ fld := Fields.Add;
+ fld.Name:=Query.Fields[0].AsString;
+ fld.Required := Query.Fields[2].AsString <> 'YES';
+ fld.DefaultValue := Query.Fields[3].AsString;
+ fld.DataType := PostgresDataTypeToDA(Query.Fields[1].asString, sametext(Query.Fields[5].AsString, 'utf8') or sametext(Query.Fields[5].AsString, 'utf16'));
+ if fld.DataType = datDecimal then begin
+ fld.DecimalPrecision := Query.Fields[6].asInteger;
+ fld.DecimalScale := Query.Fields[7].asInteger;
+ end;
+ if Query.Fields[1].asString = '"char"' then fld.size := 1
+ else if Query.Fields[1].asString = 'name' then fld.size := 63
+ else fld.Size := Query.Fields[4].AsInteger;
+
+ if fld.DefaultValue <> '' then begin
+ if pos('nextval(', fld.DefaultValue) = 1 then begin
+ case fld.DataType of
+ datInteger: fld.DataType := datAutoInc;
+ datLargeInt: fld.DataType := datLargeAutoInc;
+ else
+ fld.DefaultValue := '';
+ end;
+ if fld.DefaultValue <> '' then begin
+ s := fld.DefaultValue;
+ p1 := pos('''', s);
+ Delete(s, 1, p1);
+ p1 := pos('''', s);
+ fld.GeneratorName := Copy(s, 1, p1 - 1);
+ fld.DefaultValue := '';
+ end;
+ end else if not TestDefaultValue(fld.DefaultValue, fld.DataType) then begin
+ fld.DefaultValue := '';
+ end;
+ end;
+ Query.Next;
+ end;
+ Query.Close;
+ Query.SQL := pk_sql;
+ Query.SQL := StringReplace(Query.SQL, '{tbl}', lTable, []);
+ Query.SQL := StringReplace(Query.SQL, '{schem}', lSchema, []);
+ Query.Open;
+ while not Query.Eof do begin
+ fld := Fields.FindField(Query.Fields[0].AsString);
+ if fld <> nil then
+ fld.InPrimaryKey := true;
+ Query.Next;
+ end;
+ finally
+ Query := nil;
+ end;
+end;
+
+procedure Postgres_DoGetNames(Query: IDADataset; AList: IROStrings; AObjectType: TDAObjecttype);
+const
+ c_select = 'SELECT pg_namespace.nspname, pg_class.relname FROM pg_class, pg_namespace '+
+ 'WHERE (pg_class.relkind = ''r'') AND (pg_namespace.oid = pg_class.relnamespace) AND '+
+ '(pg_namespace.nspname NOT LIKE ''pg_%'') AND (pg_namespace.nspname NOT LIKE ''information_schema'') ORDER BY 1,2';
+ c_stored = 'SELECT pg_namespace.nspname, pg_proc.proname '+
+ 'FROM pg_namespace, pg_proc '+
+ 'WHERE pg_namespace.oid = pg_proc.pronamespace and '+
+ '(pg_namespace.nspname NOT LIKE ''pg_%'') AND (pg_namespace.nspname NOT LIKE ''information_schema'') ORDER BY 1,2';
+ c_view = 'SELECT pg_namespace.nspname, pg_class.relname FROM pg_class, pg_namespace '+
+ 'WHERE (pg_class.relkind = ''v'') AND (pg_namespace.oid = pg_class.relnamespace) AND '+
+ '(pg_namespace.nspname NOT LIKE ''pg_%'') AND (pg_namespace.nspname NOT LIKE ''information_schema'') ORDER BY 1,2';
+begin
+ try
+ case AObjectType of
+ dotTable: Query.SQL := c_select;
+ dotProcedure: Query.SQL := c_stored;
+ dotView: Query.SQL := c_view;
+ else
+ end;
+ Query.Open;
+ while not Query.EOF do begin
+ if SameText(Query.fields[0].AsString, 'public') then
+ AList.Add(Trim(Query.Fields[1].AsString))
+ else
+ AList.Add(Trim(Query.Fields[0].AsString)+'.'+Trim(Query.Fields[1].AsString));
+ Query.Next;
+ end;
+ Query.Close;
+ finally
+ Query := nil;
+ end;
+end;
+
+procedure Postgres_DoGetForeignKeys(Query: IDADataset;ForeignKeys: TDADriverForeignKeyCollection);
+const
+ s_sql = 'select c.conname,s.seq,fn.nspname,f.relname,fa.attname,pn.nspname,p.relname,pa.attname '+
+ 'from pg_constraint c join pg_class p ON (c.conrelid = p.oid) join pg_namespace pn ON (p.relnamespace = pn.oid) '+
+ 'join pg_class f ON (c.confrelid = f.oid) join pg_namespace fn ON (f.relnamespace = fn.oid) '+
+ 'join (select s.seq from generate_series(0,100) as s(seq)) as s on ( s.seq BETWEEN array_lower(conkey,1) and array_upper(conkey,1)) '+
+ 'join pg_attribute pa ON ((c.conrelid = pa.attrelid) and (pa.attnum = c.conkey[s.seq])) '+
+ 'join pg_attribute fa ON ((c.confrelid = fa.attrelid) and (fa.attnum = c.confkey[s.seq])) '+
+ 'WHERE c.contype=''f'' ORDER by 1,3,4,2';
+var
+ lCurrConstraint: string;
+ lCurrFK: TDADriverForeignKey;
+begin
+ lCurrConstraint:='';
+ lCurrFK := nil;
+ ForeignKeys.Clear;
+ try
+ Query.SQL := s_sql;
+ Query.Open;
+ while not Query.Eof do begin
+ if lCurrConstraint <> Query.Fields[0].AsString then begin
+ lCurrConstraint := Query.Fields[0].AsString;
+ lCurrFK := ForeignKeys.Add();
+ with lCurrFK do begin
+ Name := Trim(Query.Fields[0].AsString);
+ if not SameText(Query.fields[2].AsString, 'public') then
+ PKTable := Format('%s.%s', [Trim(Query.Fields[2].AsString), Trim(Query.Fields[3].AsString)])
+ else
+ PKTable := Trim(Query.Fields[3].AsString);
+ if not SameText(Query.fields[5].AsString, 'public') then
+ FKTable := Format('%s.%s', [Trim(Query.fields[5].AsString), Trim(Query.fields[6].AsString)])
+ else
+ FKTable := Trim(Query.fields[6].AsString);
+ PKField := Trim(Query.Fields[4].AsString);
+ FKField := Trim(Query.Fields[7].AsString);
+ end
+ end
+ else
+ with lCurrFK do begin
+ PKField := PKField + ';' + TrimRight(Query.Fields[4].AsString);
+ FKField := FKField + ';' + TrimRight(Query.Fields[7].AsString);
+ end;
+ Query.Next;
+ end;
+ Query.Close;
+ finally
+ Query := nil;
+ end;
+end;
+
+function Postgres_GetSPSelectSyntax(HasArguments: Boolean): String;
+begin
+ if HasArguments then
+ Result := 'SELECT * FROM {0}({1})'
+ else
+ Result := 'SELECT * FROM {0}()';
+end;
+
+procedure Postgres_DoGetStoredProcedureParams(const aStoredProcedureName: string; Query: IDADataset; out Params: TDAParamCollection);
+const
+ s_sql= 'select ns.nspname as schema,p.proname as name, ' +
+ // '/* p.pronargs,p.proretset,p.prorettype,p.proargtypes,p.proallargtypes,p.proargmodes,p.proargnames,*/ ' +
+ 'COALESCE(s.seq,1) as paramnumber,ipt.typname as paramtype, ' +
+ 'COALESCE(p.proargmodes[s.seq], case when (p.pronargs < s.seq) then ''r'' else ''i'' end) as parammode, ' +
+ 'COALESCE(p.proargnames[s.seq], case when (p.proargmodes[s.seq] is null) and (p.pronargs < s.seq) then ''result'' else ''$''||s.seq end) as paramname '+
+ 'from pg_proc p '+
+ 'join pg_namespace ns on ((p.pronamespace = ns.oid)) '+ // and (ns.nspname not like ''pg_%'') and (ns.nspname <> ''information_schema'')) ' +
+ 'join (select s.seq from generate_series(0,100) as s(seq)) as s on (s.seq between COALESCE(array_lower(p.proallargtypes,1),1) and COALESCE(array_upper(p.proallargtypes,1),p.pronargs+1)) ' +
+ 'join pg_type ipt on (COALESCE(p.proargtypes[s.seq-1],p.proallargtypes[s.seq-1],prorettype) =ipt.oid) ';
+ s_where='where (ns.nspname = ''%s'') and (p.proname = ''%s'') ';
+ s_order='order by schema,name,paramnumber';
+var
+ schema, proc:string;
+ s: string;
+begin
+ Params := TDAParamCollection.Create(nil);
+ if Pos('.', aStoredProcedureName) > 0 then
+ begin
+ schema := Trim(Copy(aStoredProcedureName, 1, Pos('.', aStoredProcedureName) - 1));
+ proc := Trim(Copy(aStoredProcedureName, Pos('.', aStoredProcedureName) + 1, Length(aStoredProcedureName)));
+ end else
+ begin
+ schema := 'public';
+ proc := aStoredProcedureName;
+ end;
+ Query.SQL:= s_sql+ Format(s_where,[schema,proc])+s_order;
+ Query.Open;
+ while not Query.EOF do begin
+ With Params.Add do begin
+ s:= Query.Fields[4].AsString;
+ if s = 'r' then ParamType:=daptResult
+ else if s = 'o' then ParamType:=daptOutput
+ else if s = 'b' then ParamType:=daptInputOutput
+ else ParamType:=daptInput;
+ Name := Query.Fields[5].AsString;
+ DataType := PostgresDataTypeToDA(Query.Fields[3].AsString);
+ end;
+ Query.Next;
+ end;
+end;
+
+function Postgres_IdentifierNeedsQuoting(const iIdentifier: string): boolean;
+begin
+ Result:= (LowerCase(iIdentifier) <> iIdentifier) or TestIdentifier(iIdentifier, postgres_reservedwords);
+end;
+
+{ TDAEPostgresConnection }
+
+procedure TDAEPostgresConnection.DoGetForeignKeys(
+ out ForeignKeys: TDADriverForeignKeyCollection);
+begin
+ inherited;
+ Postgres_DoGetForeignKeys(GetDatasetClass.Create(Self),ForeignKeys);
+end;
+
+function TDAEPostgresConnection.DoGetLastAutoInc(
+ const GeneratorName: string): integer;
+begin
+ Result := Postgres_DoGetLastAutoInc(GeneratorName, GetDatasetClass.Create(Self));
+end;
+
+procedure TDAEPostgresConnection.DoGetStoredProcedureNames(
+ out List: IROStrings);
+begin
+ inherited;
+ Postgres_DoGetNames(GetDatasetClass.Create(Self),List,dotProcedure);
+end;
+
+procedure TDAEPostgresConnection.DoGetStoredProcedureParams(
+ const aStoredProcedureName: string; out Params: TDAParamCollection);
+begin
+ inherited;
+ exit;
+// Postgres_DoGetStoredProcedureParams(aStoredProcedureName, GetDatasetClass.Create(Self), Params);
+end;
+
+procedure TDAEPostgresConnection.DoGetTableFields(const aTableName: string;
+ out Fields: TDAFieldCollection);
+begin
+ Postgres_DoGetTableFields(aTableName, GetDatasetClass.Create(Self), Fields);
+end;
+
+procedure TDAEPostgresConnection.DoGetTableNames(out List: IROStrings);
+begin
+ inherited;
+ Postgres_DoGetNames(GetDatasetClass.Create(Self),List,dotTable);
+end;
+
+procedure TDAEPostgresConnection.DoGetViewNames(out List: IROStrings);
+begin
+ inherited;
+ Postgres_DoGetNames(GetDatasetClass.Create(Self), List, dotView);
+end;
+
+function TDAEPostgresConnection.GetDatabaseNames: IROStrings;
+begin
+ Result := Postgres_GetDatabaseNames(Self);
+end;
+
+function TDAEPostgresConnection.GetNextAutoinc(
+ const GeneratorName: string): integer;
+begin
+ Result := Postgres_GetNextAutoInc(GeneratorName, GetDatasetClass.Create(Self));
+end;
+
+function TDAEPostgresConnection.GetSPSelectSyntax(
+ HasArguments: Boolean): string;
+begin
+ Result:= Postgres_GetSPSelectSyntax(HasArguments);
+end;
+
+function TDAEPostgresConnection.IdentifierNeedsQuoting(
+ const iIdentifier: string): boolean;
+begin
+ Result:= inherited IdentifierNeedsQuoting(iIdentifier) or Postgres_IdentifierNeedsQuoting(iIdentifier);
+end;
+
+{ TDAPostgresDriver }
+
+function TDAPostgresDriver.GetDefaultConnectionType(
+ const AuxDriver: string): string;
+begin
+ Result:= PostgreSQL_DriverType;
+end;
+
+procedure postgres_InitializeReservedWords;
+begin
+ SetLength(postgres_reservedwords, 95);
+ // sorted with TStringList.Sort (bds2007)
+ postgres_reservedwords[0] := 'ALL';
+ postgres_reservedwords[1] := 'ANALYSE';
+ postgres_reservedwords[2] := 'ANALYZE';
+ postgres_reservedwords[3] := 'AND';
+ postgres_reservedwords[4] := 'ANY';
+ postgres_reservedwords[5] := 'ARRAY';
+ postgres_reservedwords[6] := 'AS';
+ postgres_reservedwords[7] := 'ASC';
+ postgres_reservedwords[8] := 'ASYMMETRIC';
+ postgres_reservedwords[9] := 'AUTHORIZATION';
+ postgres_reservedwords[10] := 'BETWEEN';
+ postgres_reservedwords[11] := 'BINARY';
+ postgres_reservedwords[12] := 'BOTH';
+ postgres_reservedwords[13] := 'CASE';
+ postgres_reservedwords[14] := 'CAST';
+ postgres_reservedwords[15] := 'CHECK';
+ postgres_reservedwords[16] := 'COLLATE';
+ postgres_reservedwords[17] := 'COLUMN';
+ postgres_reservedwords[18] := 'CONSTRAINT';
+ postgres_reservedwords[19] := 'CREATE';
+ postgres_reservedwords[20] := 'CROSS';
+ postgres_reservedwords[21] := 'CURRENT_DATE';
+ postgres_reservedwords[22] := 'CURRENT_ROLE';
+ postgres_reservedwords[23] := 'CURRENT_TIME';
+ postgres_reservedwords[24] := 'CURRENT_TIMESTAMP';
+ postgres_reservedwords[25] := 'CURRENT_USER';
+ postgres_reservedwords[26] := 'DEFAULT';
+ postgres_reservedwords[27] := 'DEFERRABLE';
+ postgres_reservedwords[28] := 'DESC';
+ postgres_reservedwords[29] := 'DISTINCT';
+ postgres_reservedwords[30] := 'DO';
+ postgres_reservedwords[31] := 'ELSE';
+ postgres_reservedwords[32] := 'END';
+ postgres_reservedwords[33] := 'EXCEPT';
+ postgres_reservedwords[34] := 'FALSE';
+ postgres_reservedwords[35] := 'FOR';
+ postgres_reservedwords[36] := 'FOREIGN';
+ postgres_reservedwords[37] := 'FREEZE';
+ postgres_reservedwords[38] := 'FROM';
+ postgres_reservedwords[39] := 'FULL';
+ postgres_reservedwords[40] := 'GRANT';
+ postgres_reservedwords[41] := 'GROUP';
+ postgres_reservedwords[42] := 'HAVING';
+ postgres_reservedwords[43] := 'ILIKE';
+ postgres_reservedwords[44] := 'IN';
+ postgres_reservedwords[45] := 'INITIALLY';
+ postgres_reservedwords[46] := 'INNER';
+ postgres_reservedwords[47] := 'INTERSECT';
+ postgres_reservedwords[48] := 'INTO';
+ postgres_reservedwords[49] := 'IS';
+ postgres_reservedwords[50] := 'ISNULL';
+ postgres_reservedwords[51] := 'JOIN';
+ postgres_reservedwords[52] := 'LEADING';
+ postgres_reservedwords[53] := 'LEFT';
+ postgres_reservedwords[54] := 'LIKE';
+ postgres_reservedwords[55] := 'LIMIT';
+ postgres_reservedwords[56] := 'LOCALTIME';
+ postgres_reservedwords[57] := 'LOCALTIMESTAMP';
+ postgres_reservedwords[58] := 'NATURAL';
+ postgres_reservedwords[59] := 'NEW';
+ postgres_reservedwords[60] := 'NOT';
+ postgres_reservedwords[61] := 'NOTNULL';
+ postgres_reservedwords[62] := 'NULL';
+ postgres_reservedwords[63] := 'OFF';
+ postgres_reservedwords[64] := 'OFFSET';
+ postgres_reservedwords[65] := 'OLD';
+ postgres_reservedwords[66] := 'ON';
+ postgres_reservedwords[67] := 'ONLY';
+ postgres_reservedwords[68] := 'OR';
+ postgres_reservedwords[69] := 'ORDER';
+ postgres_reservedwords[70] := 'OUTER';
+ postgres_reservedwords[71] := 'OVERLAPS';
+ postgres_reservedwords[72] := 'PLACING';
+ postgres_reservedwords[73] := 'PRIMARY';
+ postgres_reservedwords[74] := 'REFERENCES';
+ postgres_reservedwords[75] := 'RETURNING';
+ postgres_reservedwords[76] := 'RIGHT';
+ postgres_reservedwords[77] := 'SELECT';
+ postgres_reservedwords[78] := 'SESSION_USER';
+ postgres_reservedwords[79] := 'SIMILAR';
+ postgres_reservedwords[80] := 'SOME';
+ postgres_reservedwords[81] := 'SYMMETRIC';
+ postgres_reservedwords[82] := 'TABLE';
+ postgres_reservedwords[83] := 'THEN';
+ postgres_reservedwords[84] := 'TO';
+ postgres_reservedwords[85] := 'TRAILING';
+ postgres_reservedwords[86] := 'TRUE';
+ postgres_reservedwords[87] := 'UNION';
+ postgres_reservedwords[88] := 'UNIQUE';
+ postgres_reservedwords[89] := 'USER';
+ postgres_reservedwords[90] := 'USING';
+ postgres_reservedwords[91] := 'VERBOSE';
+ postgres_reservedwords[92] := 'WHEN';
+ postgres_reservedwords[93] := 'WHERE';
+ postgres_reservedwords[94] := 'WITH';
+end;
+
+initialization
+ postgres_InitializeReservedWords;
+finalization
+ postgres_reservedwords := nil;
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDAPoweredByDataAbstractButton.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAPoweredByDataAbstractButton.pas
new file mode 100644
index 0000000..cdc87e3
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAPoweredByDataAbstractButton.pas
@@ -0,0 +1,55 @@
+unit uDAPoweredByDataAbstractButton;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ {$IFDEF FPC}LResources,{$ENDIF}
+ {$IFDEF MSWINDOWS} Windows, {$ENDIF}
+ uROPoweredByRemObjectsButton,SysUtils,Classes,
+ Graphics, Controls;
+
+{$IFNDEF FPC}
+ {$R uDAPoweredByDataAbstractButton.res}
+{$ENDIF FPC}
+
+type
+ TDAPoweredByDataAbstractButton = class(TROPoweredByRemObjectsButton)
+ protected
+ procedure GetBitmap; override;
+ end;
+
+implementation
+
+const
+ STR_POWERED_BY_DATAABSTRACT_CLIENT = 'POWERED_BY_DATAABSTRACT_CLIENT';
+ STR_POWERED_BY_DATAABSTRACT_SERVER = 'POWERED_BY_DATAABSTRACT_SERVER';
+
+{ TDAPoweredByDataAbstractButton }
+
+procedure TDAPoweredByDataAbstractButton.GetBitmap;
+begin
+ case ApplicationType of
+ atServer: Bitmap.LoadFromResourceName(hInstance,STR_POWERED_BY_DATAABSTRACT_SERVER);
+ atClient: Bitmap.LoadFromResourceName(hInstance,STR_POWERED_BY_DATAABSTRACT_CLIENT);
+ end; { case }
+end;
+
+{$IFDEF FPC}
+initialization
+ {$I uDAPoweredByDataAbstractButton.lrs}
+{$ENDIF}
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDAPoweredByDataAbstractButton.res b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAPoweredByDataAbstractButton.res
new file mode 100644
index 0000000..fa1fb3d
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAPoweredByDataAbstractButton.res differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDAReconcileDialog.dfm b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAReconcileDialog.dfm
new file mode 100644
index 0000000..212ee4b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAReconcileDialog.dfm
@@ -0,0 +1,555 @@
+object ReconcileDialogForm: TReconcileDialogForm
+ Left = 354
+ Top = 231
+ Width = 541
+ Height = 403
+ BorderStyle = bsSizeToolWin
+ BorderWidth = 5
+ Caption = 'One or more updates failed to apply on the server...'
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poOwnerFormCenter
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ DesignSize = (
+ 515
+ 357)
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Label1: TLabel
+ Left = 264
+ Top = 154
+ Width = 238
+ Height = 39
+ Anchors = [akLeft, akRight, akBottom]
+ Caption =
+ 'Skip over this change and ignore the error. You can try and corr' +
+ 'ect the problem by modifying data, or reapply the change again a' +
+ 't a later time.'
+ WordWrap = True
+ end
+ object Label2: TLabel
+ Left = 264
+ Top = 210
+ Width = 225
+ Height = 26
+ Anchors = [akLeft, akRight, akBottom]
+ Caption =
+ 'Cancel the changes you made and restore the record to its origin' +
+ 'al values.'
+ WordWrap = True
+ end
+ object Label3: TLabel
+ Left = 264
+ Top = 266
+ Width = 230
+ Height = 39
+ Anchors = [akLeft, akRight, akBottom]
+ Caption =
+ 'Show a dialog with details of the changes made to the record sin' +
+ 'ce it was last retrieved from or applied to the server.'
+ WordWrap = True
+ end
+ object SkipButton: TButton
+ Left = 161
+ Top = 154
+ Width = 96
+ Height = 25
+ Anchors = [akLeft, akBottom]
+ Caption = '&Skip Change'
+ TabOrder = 3
+ OnClick = SkipButtonClick
+ end
+ object CancelButton: TButton
+ Left = 161
+ Top = 210
+ Width = 96
+ Height = 25
+ Anchors = [akLeft, akBottom]
+ Caption = '&Cancel Change'
+ TabOrder = 4
+ OnClick = CancelButtonClick
+ end
+ object SkipAllButton: TButton
+ Left = 0
+ Top = 332
+ Width = 75
+ Height = 25
+ Anchors = [akLeft, akBottom]
+ Caption = 'Skip &All'
+ TabOrder = 1
+ OnClick = SkipAllButtonClick
+ end
+ object CancelAllButton: TButton
+ Left = 80
+ Top = 332
+ Width = 75
+ Height = 25
+ Anchors = [akLeft, akBottom]
+ Caption = 'Cancel A&ll'
+ TabOrder = 2
+ OnClick = CancelAllButtonClick
+ end
+ object ShowDetailButton: TButton
+ Left = 161
+ Top = 266
+ Width = 96
+ Height = 25
+ Anchors = [akLeft, akBottom]
+ Caption = 'Show &Details'
+ TabOrder = 5
+ OnClick = ShowDetailButtonClick
+ end
+ object TreeView: TTreeView
+ Left = 0
+ Top = 0
+ Width = 155
+ Height = 327
+ Anchors = [akLeft, akTop, akBottom]
+ HideSelection = False
+ Indent = 20
+ MultiSelectStyle = []
+ ReadOnly = True
+ RowSelect = True
+ ShowButtons = False
+ ShowLines = False
+ ShowRoot = False
+ StateImages = ImageList
+ TabOrder = 0
+ OnClick = ListBoxClick
+ end
+ object btn_Cancel: TButton
+ Left = 440
+ Top = 332
+ Width = 75
+ Height = 25
+ Anchors = [akRight, akBottom]
+ Cancel = True
+ Caption = 'Close'
+ ModalResult = 2
+ TabOrder = 6
+ end
+ object memMessageError: TMemo
+ Left = 160
+ Top = 0
+ Width = 353
+ Height = 145
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ Color = clBtnFace
+ ReadOnly = True
+ ScrollBars = ssVertical
+ TabOrder = 7
+ end
+ object ImageList: TImageList
+ Left = 59
+ Top = 124
+ Bitmap = {
+ 494C010105000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
+ 0000000000003600000028000000400000003000000001002000000000000030
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000D6C00000D
+ 6C00000C5D00000A5100000A4F00000A4F00000A4F00000A4F00000A4F00000A
+ 4F00000A4F000008400000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000000000001397000017B9000016
+ B5000015AA000013A0000013A00000139700001397000013A000001397000013
+ 97000013A000000F7A0000084000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000017B900001CE200001A
+ D5000018CA000018C6000016B5000016B5000015AA000015AA000016B5000015
+ AA000016B5000013A000000A4F00000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000018C600001EF000001C
+ E200001AD5000018C6000018C6000016B5000016B5000015AA000013A0000015
+ AA000015AA000013A000000A4F00000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000018CA000224FF00001E
+ F000001CE200001AD5000018CA000018C6000016B5000016B5000015AA000013
+ A0000017B90000139700000A4F00000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000018CA00163BFF000528
+ FF00001EF000001CE200001AD5000018CA000018CA000017B9000016B5000015
+ AA000015AA000013A000000A4F00000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000018CA003559FF000F35
+ FF000224FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000017
+ B9000016B5000013A000000A4F00000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000018CA004E6EFF00193F
+ FF000224FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000018
+ C6000018C60000139D00000C5D00000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000018CA005A79FF002146
+ FF00092DFF000224FF00001EF000001DEE00001DEE00001CE200001AD5000018
+ CA000018CA000016B500000D6C00000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000018CA006682FF002D51
+ FF00163BFF000F35FF000224FF00001FFF00001EF000001EF000001DEE00001C
+ DE00001CDE000017B900000F7A00000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000018CA007690FF004163
+ FF00193FFF00163BFF00092DFF000528FF000224FF000224FF00001DEE00001D
+ EE00001CE2000018C60000118700000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000018CA007F98FF00728C
+ FF005676FF004163FF003559FF00284CFF00163BFF000224FF00001FFF00001D
+ EE00001DEE00001CDE0000139700000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000018CA005877FF007F98
+ FF00839CFF007690FF006682FF004E6EFF00284CFF000F35FF000224FF00001F
+ FF00001DEE00001CE2000013A000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000001DEE00092D
+ FF000F35FF00092DFF000528FF000224FF00001DEE00001CDE00001AD5000018
+ CA00001AD5000016B50000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000015F05000269090002640700005E0400004D0300000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000002C2C6C0005056300000065000000600000004F00000000000000
+ 0000000000000000000000000000000000000000000000000000000D6C00000D
+ 6C00000C5D00000A5100000A4F00000A4F00000A4F00000A4F00000A4F00000A
+ 4F00000A4F000008400000000000000000000000000000000000000D6C00000D
+ 6C00000C5D00000A5100000A4F00000A4F00000A4F00000A4F00000A4F00000A
+ 4F00000A4F000008400000000000000000000000000000000000000000000271
+ 08000C98220011B62F000DB4250009B21C0006B0160001AE0B0000910700005B
+ 0400000000000000000000000000000000000000000000000000000000002929
+ AC000000840000008E0000008E0000008F0000008C0000008800000081000101
+ 54000000000000000000000000000000000000000000001397000017B9000016
+ B5000015AA000013A0000013A00000139700001397000013A000001397000013
+ 97000013A000000F7A00000840000000000000000000001397000017B9000016
+ B5000015AA000013A0000013A00000139700001397000013A000001397000013
+ 97000013A000000F7A0000084000000000000000000000000000078414001CB6
+ 45001BBA440017B83A0012B630000EB426001AB72D0008B21B0004AF110000AD
+ 09000067050000000000000000000000000000000000000000002929AC000000
+ 96000000970000009B0000009F000000A00000009D000000970000008F000000
+ 880000006200000000000000000000000000000000000017B900001CE200001A
+ D5000018CA000018C6000016B5000016B5000015AA000015AA000016B5000015
+ AA000016B5000013A000000A4F0000000000000000000017B900001CE200001A
+ D1000019CC000018C6000016B5000016B5000015AA000015AA000016B5000015
+ AA000016B5000013A000000A4F00000000000000000004860B0023B7530024BE
+ 580021BD51001CBA45001ABA430012B630000EB426000EB426000AB21D0007B1
+ 180002AE0D00005F04000000000000000000000000002929AC000101A3000808
+ 9E009999D4006868D0000000AC000000AE000000A9004848B800B7B7E3002727
+ A50000008C00010152000000000000000000000000000018C600001EF000001C
+ E200001AD5000018C6000018C6000016B5000016B5000015AA000013A0000015
+ AA000015AA000013A000000A4F0000000000000000000018C600001EF000001C
+ E200001AD1000018C6003653D300EAEEFA008899E000061FAF000013A0000015
+ AA000015AA000013A000000A4F00000000000000000017A437002EC26B002CC1
+ 660025BF5A0021BD5100FFFFFF001ABA430012B6300013B6310011B62E000BB3
+ 210009B21C00059712000000000000000000000000002929AC000000AB002828
+ A300DEDED200FEFEFF006464D4000000B3004646C000E7E7EC00FFFFF7005E5E
+ B70000009A00020287000000000000000000000000000018CA000224FF00001E
+ F000001CE200001AD5000018C600FFFFFF00F4F7FF000016B5000015AA000013
+ A0000017B90000139700000A4F0000000000000000000019CC000224FF00001E
+ F0009AACF6000624D7000019CC009AAAEB00FFFFFF008899E0000015AA000015
+ AA000015AA000013A000000A4F00000000000091020028BB5E002EC26B002EC2
+ 6B002EC26B00FFFFFF00FFFFFF00FFFFFF001ABA43001ABA430015B8380012B6
+ 30000FB52A000AB21D0002670800000000004B4BD3000707B1000303B9000000
+ C2004C4CA700E6E6D900FCFCFF009E9EE600E8E9F400FFFFF1007575B9000606
+ B1000101AB000202A00013145D0000000000000000000018CA00163BFF000528
+ FF00001EF000001CE200001BD900FFFFFF00FFFFFF000017B9000016B5000015
+ AA000015AA000013A000000A4F0000000000000000000019CC00163BFF000528
+ FF00FFFFFF00768FF300001AD1003654DE00FFFFFF00ADBBEE000016B5000015
+ AA000016B50000139700000A4F0000000000009701002EC26B002EC26B002EC2
+ 6B00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF001ABA43001ABA43000EB4
+ 260014B7340011B62F0005771000000000004B4BD3000808BB000707C8000505
+ D1000000C8005353B600F2F2ED00FFFFFF00FFFFFC007575C9000000BE000101
+ C3000303B8000303AC0010106F0000000000000000000018CA003559FF000F35
+ FF000224FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000017
+ B9000016B5000013A000000A4F0000000000000000000019CC003559FF000F35
+ FF00FFFFFF00FFFFFF00768FF300EAEEFA00FFFFFF00889CEB000018C6000016
+ B5000016B5000013A000000A4F000000000000A001002EC26B002EC26B002EC2
+ 6B00FFFFFF00FFFFFF002EC26B00FFFFFF00FFFFFF00FFFFFF001ABA43001ABA
+ 43001BBA440017B83A000A8D1B00000000004B4BD3000C0CC9000D0DD8000B0B
+ DC000000D6003C3DCE00EEEFED00FFFFFF00FFFFFD005858DB000000CA000303
+ CB000606C5000606B8001212790000000000000000000018CA004E6EFF00193F
+ FF000224FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000018
+ C6000018C6000013A000000A510000000000000000000019CC004D6DFF00193F
+ FF004D6DFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00EAEEFA001C3BD5000018
+ C6000017B9000015AA00000A51000000000000A4010033C36E002EC26B002EC2
+ 6B00FFFFFF002EC26B002EC26B002EC26B00FFFFFF00FFFFFF00FFFFFF002BBF
+ 640021BD51001CBA4500077F1300000000004B4BD3001414D8001717EA000B0B
+ F1004343DB00E4E4EA00FDFDF500BABAD400EAEAE800FEFEFF006363E5000303
+ D7000A0ACF000A0AC30021217F0000000000000000000018CA005A79FF002146
+ FF00092DFF000224FF00001EF000FFFFFF00FFFFFF00001CE200001BD9000018
+ CA000018CA000016B500000D6C0000000000000000000019CC005A79FF002146
+ FF00092DFF00294DFF006681F8004565F400C1CCFB00FFFFFF00EAEEFA001C3B
+ D5000019CC000016B500000D6C000000000000AD000044C665003FC776002EC2
+ 6B003AC573002EC26B002EC26B002EC26B002EC26B00FFFFFF00FFFFFF002BBF
+ 640025BF5A0023BE5700047E0D00000000004B4BD3002626E5002222FB003F3F
+ E900DCDCE500FDFDEE007373C5000303D7005151B000E3E3D600FFFFFE006161
+ E5000808DB000F0FCA001212790000000000000000000018CA006682FF002D51
+ FF00163BFF000F35FF000224FF00FFFFFF00FFFFFF00001DEE00001CE200001C
+ E200001BD9000017B900000F7A0000000000000000000019CC006681F8002D51
+ FF00163BFF000F35FF000224FF00001FFF000528FF00EAEEFA00FFFFFF00EAEE
+ FA00001BD9000017B900000F7A00000000000000000031BE3C0072D5950052CC
+ 820035C470003AC573002EC26B002EC26B002EC26B002EC26B00FFFFFF002BBF
+ 64002DC26A001AA73E000000000000000000000000003131FB003232FF005252
+ ED00B3B3C2007777CA000000EA000000EC000000E8005252B400ADADB0004D4D
+ E1001818ED001818B1000000000000000000000000000018CA007690FF004163
+ FF00193FFF00163BFF00092DFF000528FF000224FF000224FF00001EF000001D
+ EE00001CE2000018CA000011870000000000000000000019CC007690FF004163
+ FF00193FFF00163BFF00092DFF000528FF000224FF001C41FF00EAEEFA00C1CC
+ FB00001CE2000019CC0000118700000000000000000000B7000075D6830082DA
+ A00066D28E0044C879003AC573002EC26B002EC26B002EC26B0028BD5E002BBF
+ 64002BBF640003870A000000000000000000000000003131FB003E3EFB005353
+ FF006868EF005757F9003838FF002525FD002929FF003838FC004242EB003232
+ FF001F1FE9003131FB000000000000000000000000000018CA007F98FF00728C
+ FF005676FF004163FF003559FF00284CFF00163BFF000224FF00001FF900001D
+ EE00001EF000001BD9000013A00000000000000000000019CC007F98FF00728C
+ FF005676FF004163FF003559FF002449FF00193FFF000224FF000224FF00001E
+ F000001EF000001BD9000013A0000000000000000000000000000FBC100077D7
+ 800098E0AD0076D798005ACE86003AC573002EC26B002EC26B002EC26B0028BD
+ 5E000998170000000000000000000000000000000000000000003131FB004949
+ FD006E6EFF009191FF009393FF008484FF007676FF006767FF005151FF003131
+ FB003131FB00000000000000000000000000000000000018CA005877FF007F98
+ FF00839CFF007690FF006682FF004E6EFF00284CFF000F35FF000224FF00001F
+ F900001FF900001CE2000013A00000000000000000000019CC005877FF007F98
+ FF00839CFF007690FF006681F8004D6DFF00294DFF000F35FF00001FFF00001F
+ FF00001FFF00001BD9000013A0000000000000000000000000000000000000B8
+ 000047CB490084DA91008CDCA6006AD391004ECB7F002DBF610017B13600049C
+ 0A00000000000000000000000000000000000000000000000000000000003131
+ FB003131FB006969FE008787FF009292FF007676FF005353FF005151F3003131
+ FB00000000000000000000000000000000000000000000000000001DEE00092D
+ FF000F35FF00092DFF000528FF000224FF00001DEE00001BD900001AD5000018
+ CA00001AD5000016B50000000000000000000000000000000000001DEE00092D
+ FF000F35FF00092DFF000528FF000224FF00001DEE00001BD900001AD1000019
+ CC000019CC000017B90000000000000000000000000000000000000000000000
+ 00000000000000B8000000B6000000AE000000AD000000A60100000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000003131FB003131FB003131FB003131FB003131FB00000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000424D3E000000000000003E000000
+ 2800000040000000300000000100010000000000800100000000000000000000
+ 000000000000000000000000FFFFFF0000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000FFFF000000000000C003000000000000
+ 8001000000000000800100000000000080010000000000008001000000000000
+ 8001000000000000800100000000000080010000000000008001000000000000
+ 8001000000000000800100000000000080010000000000008001000000000000
+ C003000000000000FFFF000000000000FFFFFFFFFFFFFFFFF83FF83FC003C003
+ E00FE00F80018001C007C0078001800180038003800180018003800380018001
+ 0001000180018001000100018001800100010001800180010001000180018001
+ 000100018001800180038003800180018003800380018001C007C00780018001
+ E00FE00FC003C003F83FF83FFFFFFFFF00000000000000000000000000000000
+ 000000000000}
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDAReconcileDialog.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAReconcileDialog.pas
new file mode 100644
index 0000000..24ce0a1
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAReconcileDialog.pas
@@ -0,0 +1,362 @@
+unit uDAReconcileDialog;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ {$IFDEF MSWINDOWS} Windows,{$ENDIF} SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, StdCtrls, uDADelta, uDADatatable, ComCtrls,
+ {$IFDEF FPC} buttons,LResources,LCLType,{$ENDIF}
+ uDARemoteDataAdapter, ImgList;
+
+type
+ TReconcileDialogForm = class(TForm)
+ SkipButton: TButton;
+ CancelButton: TButton;
+ SkipAllButton: TButton;
+ CancelAllButton: TButton;
+ ShowDetailButton: TButton;
+ TreeView: TTreeView;
+ ImageList: TImageList;
+ Label1: TLabel;
+ Label2: TLabel;
+ Label3: TLabel;
+ btn_Cancel: TButton;
+ memMessageError: TMemo;
+ procedure SkipButtonClick(Sender: TObject);
+ procedure CancelButtonClick(Sender: TObject);
+ procedure SkipAllButtonClick(Sender: TObject);
+ procedure CancelAllButtonClick(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ procedure FormDestroy(Sender: TObject);
+ procedure ShowDetailButtonClick(Sender: TObject);
+ procedure ListBoxClick(Sender: TObject);
+ private
+ { Private declarations }
+ ChangeList: TList;
+ TableList: TList;
+ RDA: TDARemoteDataAdapter;
+ procedure CancelChange(aNode: TTreeNode);
+ procedure SkipChange(aNode: TTreeNode);
+ procedure SkipAllChanges;
+ procedure CancelAllChanges;
+ procedure Setup;
+ function FindDatatable(ADelta: IDADelta): TDADatatable;
+ procedure DeleteNodeFromTreeView(aNode: TTreeNode);
+ end;
+
+var
+ ReconcileDialogForm: TReconcileDialogForm;
+
+procedure ReconcileDialog(RemoteDataAdapter: TDARemoteDataAdapter; var AFailedDeltaList: TList; aTableList: TList);
+
+implementation
+
+uses
+ uDAReconcileDialogDetails, uDAInterfaces;
+
+{$IFNDEF FPC}
+ {$R *.dfm}
+{$ENDIF}
+
+
+function GenerateNodeCaption(aChange: TDADeltaChange): String;
+var
+ j: integer;
+begin
+ Result := aChange.Delta.LogicalName + ':';
+ for j := 0 to aChange.Delta.KeyFieldCount - 1 do begin
+ if j > 0 then Result := Result + ';';
+ if aChange.ChangeType = ctDelete then
+ Result := Result + VarToStr(aChange.OldValueByName[aChange.Delta.KeyFieldNames[j]])
+ else
+ Result := Result + VarToStr(aChange.NewValueByName[aChange.Delta.KeyFieldNames[j]]);
+ end;
+end;
+
+
+procedure ReconcileDialog_ruoOnPost(RemoteDataAdapter: TDARemoteDataAdapter; aChange: TDADeltaChange; aTable: TDADataTable);
+var
+ lAction: TDAReconcileDialogAction;
+ lHandled: Boolean;
+begin
+ lAction := rdlgRevert;
+ lHandled:=False;
+ if Assigned(RemoteDataAdapter) and Assigned(RemoteDataAdapter.OnShowReconcileRecordInAppUI) then
+ RemoteDataAdapter.OnShowReconcileRecordInAppUI(RemoteDataAdapter, aChange, aTable, lHandled,lAction);
+ if not lHandled then
+ ReconcileDialogShowDetails(aChange, aTable, GenerateNodeCaption(aChange), lAction);
+ case lAction of
+ rdlgSkip: Raise Exception.Create('rdlgSkip can''t be used for tables in the ruoOnPost mode.');
+ rdlgCancel: Raise Exception.Create('rdlgCancel can''t be used for tables in the ruoOnPost mode.');
+ rdlgNone: Raise Exception.Create('rdlgNone can''t be used for tables in the ruoOnPost mode.');
+ rdlgRepost: begin
+ aChange.Status := csPending;
+ aTable.ApplyUpdates();
+ end;
+ rdlgRevert: aTable.CancelUpdateChange(aChange);
+ end;
+end;
+
+procedure ReconcileDialog(RemoteDataAdapter: TDARemoteDataAdapter; var AFailedDeltaList: TList; aTableList: TList);
+begin
+ if (AFailedDeltaList.Count = 1) and (aTableList.Count = 1) and
+ (AnsiSameText(TDADeltaChange(AFailedDeltaList[0]).Delta.LogicalName, TDADataTable(aTableList[0]).LogicalName)) and
+ (ruoOnPost in TDADataTable(aTableList[0]).RemoteUpdatesOptions) then begin
+ ReconcileDialog_ruoOnPost(RemoteDataAdapter,TDADeltaChange(AFailedDeltaList[0]), TDADataTable(aTableList[0]));
+ AFailedDeltaList.Clear;
+ end
+ else begin
+ with TReconcileDialogForm.Create(Application) do try
+ RDA:=RemoteDataAdapter;
+ ChangeList.Assign(AFailedDeltaList);
+ TableList.Assign(aTableList);
+ Setup;
+ ShowModal;
+ AFailedDeltaList.Assign(ChangeList);
+ finally
+ Release;
+ end;
+ end;
+end;
+
+procedure TReconcileDialogForm.SkipButtonClick(Sender: TObject);
+begin
+ SkipChange(TreeView.Selected);
+end;
+
+procedure TReconcileDialogForm.CancelButtonClick(Sender: TObject);
+begin
+ CancelChange(TreeView.Selected);
+end;
+
+procedure TReconcileDialogForm.SkipAllButtonClick(Sender: TObject);
+begin
+ SkipAllChanges;
+end;
+
+procedure TReconcileDialogForm.CancelAllButtonClick(Sender: TObject);
+begin
+ CancelAllChanges;
+end;
+
+procedure TReconcileDialogForm.CancelAllChanges;
+begin
+ if Application.MessageBox('Do you want cancel all changes?', 'Cancel All', MB_YESNO) = IDYES then begin
+ while TreeView.Items.Count > 0 do
+ CancelChange(TreeView.Items[0]);
+ ModalResult := mrOk;
+ end;
+end;
+
+procedure TReconcileDialogForm.SkipAllChanges;
+begin
+ if Application.MessageBox('Do you want skip all changes?', 'Skip All', MB_YESNO) = IDYES then
+ ModalResult := mrOk;
+end;
+
+procedure TReconcileDialogForm.FormCreate(Sender: TObject);
+begin
+ inherited;
+ ChangeList := TList.Create;
+ TableList := TList.Create;
+end;
+
+procedure TReconcileDialogForm.FormDestroy(Sender: TObject);
+begin
+ ChangeList.Free;
+ TableList.Free;
+ inherited;
+end;
+
+procedure TReconcileDialogForm.ShowDetailButtonClick(Sender: TObject);
+var
+ lChange: TDADeltaChange;
+ lHandled: Boolean;
+ lAction: TDAReconcileDialogAction;
+begin
+ lChange := TDADeltaChange(Treeview.Selected.Data);
+ Hide;
+ try
+ lAction:= rdlgNone;
+ lHandled:=False;
+ if Assigned(rda) and Assigned(rda.OnShowReconcileRecordInAppUI) then
+ rda.OnShowReconcileRecordInAppUI(RDA, lChange, FindDatatable(lChange.Delta),lHandled,lAction);
+ if not lHandled then
+ ReconcileDialogShowDetails(lChange, FindDatatable(lChange.Delta), Treeview.Selected.Text, lAction);
+ finally
+ Show;
+ end;
+ case lAction of
+ rdlgSkip: SkipButton.Click;
+ rdlgCancel: CancelButton.Click;
+ rdlgRepost: Raise Exception.Create('rdlgRepost can be used only for tables in the ruoOnPost mode.');
+ rdlgRevert: Raise Exception.Create('rdlgRevert can be used only for tables in the ruoOnPost mode.');
+ end;
+end;
+
+procedure TReconcileDialogForm.Setup;
+var
+ i: integer;
+ change: TDADeltaChange;
+ anode: TTreeNode;
+begin
+ TreeView.Items.Clear;
+ for i := 0 to ChangeList.Count - 1 do begin
+ change := TDADeltaChange(ChangeList[i]);
+ anode := TreeView.Items.AddChildObject(nil, GenerateNodeCaption(Change), Change);
+ case Change.ChangeType of
+ ctInsert: aNode.StateIndex := 2;
+ ctUpdate: aNode.StateIndex := 3;
+ ctDelete: aNode.StateIndex := 4;
+ end;
+ end;
+ if TreeView.Items.Count > 0 then begin
+ TreeView.Items[0].Selected := True;
+ ListBoxClick(TreeView);
+ end;
+end;
+
+procedure TReconcileDialogForm.CancelChange(aNode: TTreeNode);
+
+ procedure DeleteChangeFromTreeView(aChange: TDADeltaChange);
+ var
+ i: integer;
+ begin
+ for i := TreeView.Items.Count - 1 downto 0 do
+ if TreeView.Items[i].Data = aChange then begin
+ TreeView.Items[i].Delete;
+ Break;
+ end;
+ end;
+
+var
+ lTable: TDADatatable;
+ details: TList;
+ detailChange: TDADeltaChange;
+ i, j, k: integer;
+ ChangePKValueArray: array of Variant;
+ lNeedDeleteChange: boolean;
+ keyvalue: variant;
+ aChange: TDADeltaChange;
+begin
+ aChange := TDADeltaChange(ANode.Data);
+ if aChange <> nil then begin
+ ChangeList.Remove(aChange);
+ lTable := FindDatatable(aChange.Delta);
+ if lTable <> nil then begin
+ // remove changes for detail tables
+ details := lTable.GetDetailTablesforApplyUpdate;
+ try
+ if Details.Count > 0 then begin
+ SetLength(ChangePKValueArray, aChange.Delta.KeyFieldCount);
+ for i := 1 to aChange.Delta.KeyFieldCount do begin
+ if aChange.ChangeType = ctInsert then
+ keyvalue := aChange.NewValueByName[aChange.Delta.KeyFieldNames[i - 1]]
+ else
+ keyvalue := aChange.OldValueByName[aChange.Delta.KeyFieldNames[i - 1]];
+ ChangePKValueArray[0] := keyvalue;
+ end;
+
+ for i := 0 to details.Count - 1 do begin
+ for j := 0 to TDADataTable(details[i]).Delta.Count - 1 do begin
+ detailChange := TDADataTable(details[i]).Delta.Changes[j];
+ if detailChange.Status <> csResolved then begin
+ lNeedDeleteChange := True;
+ for k := 0 to aChange.Delta.KeyFieldCount - 1 do begin
+ if detailChange.ChangeType = ctInsert then
+ keyvalue := detailChange.NewValueByName[aChange.Delta.KeyFieldNames[k]]
+ else
+ keyvalue := detailChange.oldValueByName[aChange.Delta.KeyFieldNames[k]];
+ if not VarSameValue(keyValue, ChangePKValueArray[k]) then begin
+ lNeedDeleteChange := False;
+ Break;
+ end;
+ end;
+ if lNeedDeleteChange then DeleteChangeFromTreeView(detailChange);
+ end;
+ end;
+ end;
+ end;
+ finally
+ details.Free;
+ end;
+ DeleteNodeFromTreeView(aNode);
+ lTable.CancelUpdateChange(aChange);
+ end;
+ end;
+ if Treeview.Items.Count = 0 then ModalResult := MrOk;
+end;
+
+procedure TReconcileDialogForm.SkipChange(aNode: TTreeNode);
+begin
+ DeleteNodeFromTreeView(ANode);
+ if Treeview.Items.Count = 0 then ModalResult := MrOk;
+end;
+
+procedure TReconcileDialogForm.ListBoxClick(Sender: TObject);
+var
+ s: string;
+ change: TDADeltaChange;
+ i: integer;
+begin
+ if Treeview.Selected <> nil then begin
+ change := TDADeltaChange(Treeview.Selected.Data);
+ s := 'A problem occured while ';
+ case change.ChangeType of
+ ctInsert: s := s + 'inserting';
+ ctUpdate: s := s + 'updating';
+ ctDelete: s := s + 'deleting';
+ end;
+ s := s + ' a record in table "' + change.Delta.LogicalName + '", record "';
+ for i := 1 to Change.Delta.KeyFieldCount do begin
+ if i <> 1 then s := s + ';';
+ if Change.ChangeType = ctInsert then
+ s := s + VarToStr(Change.NewValueByName[Change.Delta.KeyFieldNames[i - 1]])
+ else
+ s := s + VarToStr(Change.OldValueByName[Change.Delta.KeyFieldNames[i - 1]]);
+ end;
+ s := s + '"'+ sLineBreak + sLineBreak + change.Message;
+ if Assigned(RDA) and Assigned(RDA.OnGenerateRecordMessage) then RDA.OnGenerateRecordMessage(RDA, change,FindDatatable(change.Delta),s);
+ //lMessageError.Caption:=s;
+ memMessageError.Lines.Text := s;
+ end;
+end;
+
+function TReconcileDialogForm.FindDatatable(ADelta: IDADelta): TDADatatable;
+var
+ i: integer;
+begin
+ Result := nil;
+ for i := 0 to TableList.Count - 1 do
+ if AnsiSameText(ADelta.LogicalName, TDADatatable(TableList[i]).LogicalName) then begin
+ Result := TDADatatable(TableList[i]);
+ Break;
+ end;
+end;
+
+procedure TReconcileDialogForm.DeleteNodeFromTreeView(aNode: TTreeNode);
+begin
+ aNode.Delete;
+ ListBoxClick(TreeView);
+end;
+
+{$IFDEF FPC}
+initialization
+ {$I uDAReconcileDialog.lrs}
+{$ENDIF}
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDAReconcileDialogDetails.dfm b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAReconcileDialogDetails.dfm
new file mode 100644
index 0000000..be09386
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAReconcileDialogDetails.dfm
@@ -0,0 +1,99 @@
+object ReconcileDialogDetailsForm: TReconcileDialogDetailsForm
+ Left = 358
+ Top = 218
+ Width = 500
+ Height = 299
+ BorderIcons = [biSystemMenu]
+ Caption = 'Details for Change to '#39'%s'#39
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poOwnerFormCenter
+ OnCreate = FormCreate
+ PixelsPerInch = 96
+ TextHeight = 13
+ object ScrollBox: TScrollBox
+ Left = 0
+ Top = 49
+ Width = 484
+ Height = 179
+ Align = alClient
+ BevelInner = bvNone
+ BevelOuter = bvNone
+ BorderStyle = bsNone
+ TabOrder = 0
+ end
+ object BottomPanel: TPanel
+ Left = 0
+ Top = 228
+ Width = 484
+ Height = 35
+ Align = alBottom
+ BevelOuter = bvNone
+ TabOrder = 1
+ DesignSize = (
+ 484
+ 35)
+ object OkButton: TButton
+ Left = 185
+ Top = 5
+ Width = 95
+ Height = 25
+ Anchors = [akLeft, akBottom]
+ Caption = '&Skip Change'
+ Default = True
+ ModalResult = 1
+ TabOrder = 0
+ end
+ object CloseButton: TButton
+ Left = 385
+ Top = 5
+ Width = 95
+ Height = 25
+ Anchors = [akLeft, akBottom]
+ Cancel = True
+ Caption = 'Close'
+ ModalResult = 7
+ TabOrder = 1
+ end
+ object CancelButton: TButton
+ Left = 285
+ Top = 5
+ Width = 95
+ Height = 25
+ Anchors = [akLeft, akBottom]
+ Caption = '&Cancel Change'
+ ModalResult = 2
+ TabOrder = 2
+ end
+ end
+ object TopPanel: TPanel
+ Left = 0
+ Top = 0
+ Width = 484
+ Height = 49
+ Align = alTop
+ BevelOuter = bvNone
+ TabOrder = 2
+ DesignSize = (
+ 484
+ 49)
+ object memMessageError: TMemo
+ Left = 0
+ Top = 0
+ Width = 484
+ Height = 49
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ BevelInner = bvNone
+ BevelOuter = bvNone
+ BorderStyle = bsNone
+ Color = clBtnFace
+ ScrollBars = ssVertical
+ TabOrder = 0
+ end
+ end
+end
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDAReconcileDialogDetails.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAReconcileDialogDetails.pas
new file mode 100644
index 0000000..967f236
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAReconcileDialogDetails.pas
@@ -0,0 +1,277 @@
+unit uDAReconcileDialogDetails;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+uses
+ SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, StdCtrls, ExtCtrls, uDADelta, uDADataTable, DB,
+ {$IFDEF FPC} buttons,LResources,{$ENDIF}
+ uDARemoteDataAdapter;
+
+type
+ TReconcileDialogDetailsForm = class(TForm)
+ ScrollBox: TScrollBox;
+ BottomPanel: TPanel;
+ OkButton: TButton;
+ CloseButton: TButton;
+ TopPanel: TPanel;
+ CancelButton: TButton;
+ memMessageError: TMemo;
+ procedure FormCreate(Sender: TObject);
+ private
+ { Private declarations }
+ dbeditHeight, labelheight: integer;
+ FChange: TDADeltaChange;
+ Datasource: TDADataSource;
+ procedure Setup;
+ procedure GenerateControls;
+ procedure OnFieldValueChanged(Sender: TObject);
+ public
+ { Public declarations }
+
+ end;
+
+var
+ ReconcileDialogDetailsForm: TReconcileDialogDetailsForm;
+
+procedure ReconcileDialogShowDetails(AChange: TDADeltaChange; aTable: TDADataTable; aCaption: string; var AAction: TDAReconcileDialogAction);
+implementation
+uses
+ uDAInterfaces, uROClasses, dbCtrls;
+
+{$IFNDEF FPC}
+ {$R *.dfm}
+{$ENDIF}
+
+const
+ labelWidth = 100;
+ editWidth = 200;
+ c_Color: TColor = clMoneyGreen;
+
+procedure ReconcileDialogShowDetails(AChange: TDADeltaChange; aTable: TDADataTable; aCaption: string; var AAction: TDAReconcileDialogAction);
+var
+ FFiltered: Boolean;
+ FMasterDS: TDADataSource;
+ FRemoteFetchEnabled: Boolean;
+ FMasterFields: string;
+ r: integer;
+begin
+ with TReconcileDialogDetailsForm.Create(Application) do try
+ Caption := Format(Caption, [aCaption]);
+ FChange := AChange;
+ FFiltered := ATable.Filtered;
+ FMasterDS := aTable.MasterSource;
+ FMasterFields := aTable.MasterFields;
+ FRemoteFetchEnabled := aTable.RemoteFetchEnabled;
+ try
+ ATable.Filtered := False;
+ aTable.MasterSource := nil;
+ aTable.MasterFields := '';
+ aTable.RemoteFetchEnabled := False;
+ DataSource.DataTable := aTable;
+ Setup;
+ r := ShowModal;
+ if (ruoOnPost in aTable.RemoteUpdatesOptions) then begin
+ case r of
+ mrOk: AAction := rdlgRepost;
+ mrCancel: AAction := rdlgRevert;
+ end;
+ DataSource.DataTable.Delta.EndChange;
+ end
+ else begin
+ case r of
+ mrOk: AAction := rdlgSkip;
+ mrCancel: AAction := rdlgCancel;
+ else AAction := rdlgNone;
+ end;
+ if DataSource.DataTable.State in [dsEdit, dsInsert] then DataSource.DataTable.Post;
+ end;
+ finally
+ aTable.RemoteFetchEnabled := FRemoteFetchEnabled;
+ aTable.Filtered := FFiltered;
+ aTable.MasterSource := FMasterDS;
+ aTable.MasterFields := FMasterFields
+ end;
+ finally
+ Release;
+ end;
+end;
+
+{ TShowDetailsForm }
+
+procedure TReconcileDialogDetailsForm.Setup;
+begin
+ if FChange.ChangeType <> ctDelete then
+ with DataSource.DataTable do
+ if not (ruoOnPost in RemoteUpdatesOptions) and not Locate(RecIDFieldName, FChange.RecID, []) then RaiseError('Couldn''t find record #' + FormatRecIDString(FChange.RecID));
+ GenerateControls;
+ memMessageError.Lines.Text := FChange.Message;
+
+ if (ruoOnPost in DataSource.DataTable.RemoteUpdatesOptions) then begin
+ OkButton.Left := CancelButton.Left;
+ OkButton.Enabled := False;
+ OkButton.Visible := FChange.ChangeType <> ctDelete ;
+ OkButton.Caption := 'Update';
+ CancelButton.Left := CloseButton.Left;
+ CancelButton.Caption := 'Revert';
+ CloseButton.Visible := False;
+ CloseButton.Enabled := False;
+ ActiveControl := CancelButton;
+ DataSource.DataTable.Delta.StartChange(ctUpdate);
+ end;
+end;
+
+procedure TReconcileDialogDetailsForm.OnFieldValueChanged(Sender: TObject);
+begin
+ OkButton.Enabled := True;
+ OkButton.Caption := 'Update';
+end;
+
+procedure TReconcileDialogDetailsForm.GenerateControls;
+var
+ i: integer;
+ aField: string;
+ aTop, aleft: integer;
+ FLabel: TLabel;
+ FdbEdit: TDBEdit;
+ FEdit: TEdit;
+begin
+ aleft := 7;
+ aTop := 7;
+ for i := 0 to FChange.Delta.LoggedFieldCount - 1 do begin
+ aField := FChange.Delta.LoggedFieldNames[i];
+ aTop := 7 + (3 + dbeditHeight) * i;
+ aleft := 7;
+
+ FLabel := TLabel.Create(Self);
+ with FLabel do begin
+ Parent := ScrollBox;
+ Name := 'l_' + aField;
+ Caption := aField;
+ Left := aleft;
+ Top := (dbeditHeight - Height) div 2 + aTop + 1;
+ Width := labelWidth;
+ aleft := aleft + 7 + labelWidth;
+ Font.Name := 'Tahoma';
+ end;
+
+ if FChange.ChangeType in [ctInsert, ctUpdate] then begin
+ if Self.DataSource.DataTable.FieldByName(aField).DataType = datBlob then begin
+ FEdit := TEdit.Create(Self);
+ with FEdit do begin
+ Name := 'dbe_' + aField;
+ Parent := ScrollBox;
+ Left := aleft;
+ aleft := aleft + 7 + editWidth;
+ Top := aTop;
+ Width := editWidth;
+ ReadOnly := True;
+ Text := '[blob]';
+ Font.Name := 'Tahoma';
+ end;
+ end
+ else begin
+ FdbEdit := TDBEdit.Create(Self);
+ with FdbEdit do begin
+ Name := 'dbe_' + aField;
+ DataSource := Self.DataSource;
+ Parent := ScrollBox;
+ DataField := aField;
+ Left := aleft;
+ Top := aTop;
+ Width := editWidth;
+ aleft := aleft + 7 + editWidth;
+ OnChange := OnFieldValueChanged;
+ if (FChange.ChangeType = ctUpdate) and
+ not ROVariantsEqual(FChange.OldValues[i], FChange.NewValues[i]) then
+ Color := c_Color;
+ Font.Name := 'Tahoma';
+ end;
+ end;
+ end;
+
+ if FChange.ChangeType in [ctUpdate, ctDelete] then begin
+ FEdit := TEdit.Create(Self);
+ with FEdit do begin
+ Name := 'e_' + aField;
+ Parent := ScrollBox;
+ Left := aleft;
+ aleft := aleft + 7 + editWidth;
+ Top := aTop;
+ Width := editWidth;
+ ReadOnly := True;
+ Color := clBtnFace;
+ Font.Name := 'Tahoma';
+ if Self.DataSource.DataTable.FieldByName(aField).DataType = datBlob then begin
+ Text := '[blob]'
+ end
+ else begin
+ case FChange.ChangeType of
+ ctDelete: text := VarToStr(FChange.OldValues[i]);
+ ctUpdate: begin
+ if not Self.DataSource.DataTable.HasReducedDelta then
+ text := VarToStr(FChange.OldValues[i])
+ else
+ if not VarIsEmpty(FChange.OldValues[i]) then
+ text := VarToStr(FChange.OldValues[i])
+ else text := Self.DataSource.DataTable.FieldByName(aField).AsString;
+ end;
+ end;
+ end;
+ end;
+ end;
+ end;
+ inc(aTop, 20);
+ inc(aLeft, 7);
+ //ScrollBox.HorzScrollBar.Range := aleft;
+ Self.ClientWidth := aleft + ScrollBox.VertScrollBar.Size + 2;
+ Self.Constraints.MinWidth := Self.Width;
+ Self.Constraints.MaxWidth := Self.Width;
+
+
+ CloseButton.left := Self.ClientWidth - 7 - CloseButton.Width;
+ CancelButton.Left := CloseButton.left - 5 - CancelButton.Width;
+ OkButton.Left := CancelButton.left - 5 - OkButton.Width;
+
+ ScrollBox.VertScrollBar.Range := aTop;
+ if Screen.Height > Self.Height + (aTop - ScrollBox.Height) then
+ Self.Height := Self.Height + (aTop - ScrollBox.Height)
+ else
+ Self.Height := Screen.Height;
+end;
+
+procedure TReconcileDialogDetailsForm.FormCreate(Sender: TObject);
+begin
+ inherited;
+ with TDBEdit.Create(Self) do try
+ dbeditHeight := Height;
+ finally
+ free;
+ end;
+ with TLabel.Create(Self) do try
+ labelheight := Height;
+ finally
+ free;
+ end;
+ Datasource := TDADataSource.Create(Self);
+end;
+
+{$IFDEF FPC}
+initialization
+ {$I uDAReconcileDialogDetails.lrs}
+{$ENDIF}
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDARegExpr.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDARegExpr.pas
new file mode 100644
index 0000000..8b59f90
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDARegExpr.pas
@@ -0,0 +1,4290 @@
+unit uDARegExpr;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright 1999-2000 by Andrey V. Sorokin }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Please see the comments below for licensing issues of this source file. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+{$B-}
+
+(*
+ TRegExpr library
+ Regular Expressions for Delphi
+
+ Author:
+ Andrey V. Sorokin
+ St-Petersburg
+ Russia
+ anso@mail.ru, anso@usa.net
+ http://anso.da.ru
+ http://anso.virtualave.net
+
+This library is derived from Henry Spencer sources.
+I translated the C sources into Object Pascal,
+implemented object wrapper and some new features.
+Many features suggested or partially implemented
+by TRegExpr's users (see Gratitude below).
+
+---------------------------------------------------------------
+ Legal issues
+---------------------------------------------------------------
+ Copyright (c) 1999-00 by Andrey V. Sorokin
+
+ This software is provided as it is, without any kind of warranty
+ given. Use it at your own risk.
+
+ You may use this software in any kind of development, including
+ comercial, redistribute, and modify it freely, under the
+ following restrictions :
+ 1. The origin of this software may not be mispresented, you must
+ not claim that you wrote the original software. If you use
+ this software in any kind of product, it would be appreciated
+ that there in a information box, or in the documentation would
+ be an acknowledgmnent like this
+ Partial Copyright (c) 2000 by Andrey V. Sorokin
+ 2. You may not have any income from distributing this source
+ to other developers. When you use this product in a comercial
+ package, the source may not be charged seperatly.
+
+
+---------------------------------------------------------------
+ Legal issues for the original C sources:
+---------------------------------------------------------------
+ * Copyright (c) 1986 by University of Toronto.
+ * Written by Henry Spencer. Not derived from licensed software.
+ *
+ * Permission is granted to anyone to use this software for any
+ * purpose on any computer system, and to redistribute it freely,
+ * subject to the following restrictions:
+ * 1. The author is not responsible for the consequences of use of
+ * this software, no matter how awful, even if they arise
+ * from defects in it.
+ * 2. The origin of this software must not be misrepresented, either
+ * by explicit claim or by omission.
+ * 3. Altered versions must be plainly marked as such, and must not
+ * be misrepresented as being the original software.
+
+
+---------------------------------------------------------------
+ Gratitudes
+---------------------------------------------------------------
+ Guido Muehlwitz
+ found and fixed ugly bug in big string processing
+ Stephan Klimek
+ testing in CPPB and suggesting/implementing many features
+ Steve Mudford
+ implemented Offset parameter
+ Martin Baur
+ usefull suggetions, help translation into German
+ Yury Finkel
+ Implemented UniCode support, found and fixed some bugs
+ Ralf Junker
+ Implemented some features, many optimization suggestions
+ Filip Jirsák and Matthew Winter (wintermi@yahoo.com)
+ Help in Implementation non-greedy mode
+ Kit Eason
+ many examples for introduction help section
+ Juergen Schroth
+ bug hunting and usefull suggestions
+ Simeon Lilov
+ help translation into Bulgarian
+ Martin Ledoux
+ help translation into French
+ Diego Calp (mail@diegocalp.com), Argentina
+ help translation into Spanish
+
+ And many others - for big work of bug hunting !
+
+I am still looking for person who can help me to translate
+this documentation into other languages (especially German)
+
+
+---------------------------------------------------------------
+ To do
+---------------------------------------------------------------
+
+-=- VCL-version of TRegExpr - for dummies ;) and TRegExprEdit
+(replacement for TMaskEdit).
+Actually, I am writing non-VCL aplications (with web-based
+interfaces), so I don't need VCL's TRegExpr for myself.
+Will it be really usefull ?
+
+-=- working with pascal-style string.
+Now pascal-strings converted into PChar, so
+you can't find r.e. in strings with #0 -chars.
+(suggested by Pavel O).
+
+-=- put precalculated lengths into EXACTLY[CI] !
+
+-=- fInputString as string (suggested by Ralf Junker)
+
+-=- Add regstart optimization for case-insensitive mode ?
+ Or complitely remove because FirstCharSet is faster ?
+
+-=- "Russian Ranges" --> National ranges (use property WordChars ?
+for ordering letters in ranges by its order in WirdsChars if modifier /r is On)
+
+-=- FirstCharSet as array [#0 .. #255] of REChar ?
+(2x faster then set of REChar)
+
+-=- p-code optimization (remove BRANCH-to-EEND, COMMENT, BACK(?)
+ merge EXACTLY etc).
+
+-=- !!!!!!!! bug found by Lars Karlslund
+ "If I do '(something|^$)' on '' I get false (which is wrong ...)."
+
+-=- There are no special command for files (Johan Smit).
+
+I need your suggestions !
+What are more importent in this list ?
+Did I forget anything ?
+
+
+---------------------------------------------------------------
+ History
+---------------------------------------------------------------
+Legend:
+ (+) added feature
+ (-) fixed bug
+ (^) upgraded implementation
+
+ v. 0.947 2001.10.03
+ -=- (+) Word boundary (\b & \B) metachar
+ -=- (-) Bug in processing predefined char.classes in non-UseSetOfChar mode
+ -=- (+) Spanish help - translated by Diego Calp (mail@diegocalp.com), Argentina
+ -=- (+) VersionMajor/Minor class method of TRegExpr ;)
+ -=- (-) Bug in CompileRegExpr, Thanks to Oleg Orlov
+ -=- (^) Method RegExprSubExpressions wasn't compatible with D2-D3.
+ Thanks to Eugene Tarasov for bug report.
+ -=- (+) Method Replace can now do substitution as well (see documentation)
+ Thanks to Warren Bare, Ken Friesen and many others who suggested it.
+ -=- (+) Updated ReplaceRegExpr to use new Replace method functionality
+ -=- (^) Restored UniCode compatibility lost in some previous version
+ Thanks to Stephan Klimek for bug report
+ -=- (^) Updated TestRE project, new examples for Replace with substitution
+ included.
+
+ v. 0.942+ 2001.03.01
+ -=- (+) Published French help for TRegExpr,
+ translated by Martin Ledoux
+
+ v. 0.942 2001.02.12
+ -=- (-) Range-check error in DEMO-project (due to bug in
+ RegExprSubExpressions), Thanks to Juergen Schroth
+ -=- (^) RegExprSubExpressions - added error codes for "unclosed "[" error
+ -=- (^) Help file bug fixing
+
+ v. 0.941 2001.02.01
+ -=- (^) Attension! Behaviour of '\w', '\W' was changed! Now it really
+ match alphanum characters and '_' as described in documentation,
+ not only alpha as it was before. Thanks to Vadim Alexandrov.
+ If You want to restore previous behaviour, reassign
+ RegExprWordChars (exclude '0123456789' from it).
+ -=- (+) Full compatible with recommended at unicode.org implementation
+ of modifier /m, including DOS-styled line separators (\r\n) mixed
+ with Unix styled (\n) - see properties LineSeparators, LinePairedSeparator
+ -=- (^) Attension! Behaviour of '.' was changed! Now if modifier /s is off
+ it doesn't match all chars from LineSeparators and LinePairedSeparator (by
+ default \r and \n)
+ -=- (^) Attension! To prevent unneeded recompilation of r.e., now assignment
+ to Expression or changing modifiers doesn't cause immidiate [re]compilation.
+ So, now You don't get exception while assigning wrong expression, but can
+ get exception while calling Exec[Next], Substitute, Dump, etc if there
+ are errors in Expression or other properties.
+ -=- (+) Non-greedy style iterators (like '*?'), modifier /g.
+ Implemented with help from Matthew Winter and Filip Jirsák
+ -=- (+) /x modifier (eXtended syntax - allow formating r.e., see description
+ in the help)
+ -=- (+) Procedure Compile to [re]compile r.e. Usefull for GUI r.e. editors
+ and so on (to check all properties validity).
+ -=- (+) FAQ in documentation. I am too lazy to answer to the same
+ questions again and again :( Please, read the FAQ before sending
+ question to me!
+ -=- (^) DEMO project have been significantly improved. Now this is the
+ real r.e. debugger! Thanks to Jon Smith for his ideas.
+ -=- (+) function RegExprSubExpressions, usefull for GUI editors of
+ r.e. (see example of using in TestRExp.dpr project)
+ -=- (+) HyperLinkDecorator unit - practical example of TRegExpr
+ using (see description in the help file)
+ -=- (-) Range checking error in some cases if ComplexBraces defined
+ Thanks to Juergen Schroth
+ -=- (^) 'ComplexBraces' now is defined by default
+ -=- (+) Kit Eason sent to me many examples for 'Syntax' help section
+ and I decided to complitely rewrite this section. I hope, You'll enjoy
+ the results ;)
+ -=- (+) The \A and \Z metacharacters are just like "^" and "$", except
+ that they won't match multiple times when the modifier /m is used
+
+ v. 0.939 2000.10.04
+ -=- (-) Bug in Substitute method ($10.. didn't work properly)
+ Thanks to Serge S Klochkovski
+
+ v. 0.938 2000.07.23
+ -=- (^) Exeptions now jump to appropriate source line, not
+ to Error procedure (I am not quite sure this is safe for
+ all compiler versions. You can turn it off - remove
+ reRealExceptionAddr definition below).
+ -=- (^) Forgotten BSUBEXP[CI] in FillFirstCharSet caused
+ exeption 'memory corruption' in case if back reference can
+ be first op, like this: (a)*\1 (first subexpression can be
+ skipped and we'll start matching with back reference..).
+
+ v. 0.937 2000.06.12
+ -=- (-) Bug in optimization engine (since v.0.934). In some cases
+ TRegExpr didn't catch right strings.
+ Thanks to Matthias Fichtner
+
+ v. 0.936 2000.04.22
+ -=- (+) Back references, like , see
+ manual for details
+ -=- (+) Wide hex char support, like '\x{263a}'
+
+ v. 0.935 2000.04.19 (by Yury Finkel)
+ -=- (-) fInvertCase now isn't readonly ;)
+ -=- (-) UniCode mode compiling errors
+
+ v. 0.934 2000.04.17
+ -=- (^) New ranges implementation (range matching now is very fast
+ - uses one(!) CPU instruction)
+ -=- (^) Internal p-code structure converted into 32-bits - works
+ faster and now there is no 64K limit for compiled r.e.
+ -=- (^) '{m,n}' now use 32-bits arguments (up to 2147483646) - specially
+ for Dmitry Veprintsev ;)
+ -=- (^) Ranges now support metachars: [\n-\x0D] -> #10,#11,#12,#13;
+ Changed '-' processing, now it's like in Perl:
+ [\d-t] -> '0'..'9','-','t'; []-a] -> ']'..'a'
+ -=- (-) Bug with \t and etc macro (they worked only in ranges)
+ Thanks to Yury Finkel
+ -=- (^) Added new preprocessing optimization (see FirstCharSet).
+ Incredible fast (!). But be carefull it isn's properly tested.
+ You can switch it Off - remove UseFirstCharSet definition.
+ -=- (^) Many other speed optimizations
+ -=- (-) Case-insensitive mode now support system-defined national
+ charset (due to bug in v.0.90 .. 0.926 supported only english one)
+ -=- (^) Case-insensitive mode implemented with InvertCase (param &
+ result of REChar type) - works 10 .. 100 times faster.
+ -=- (^) Match and ExecNext interfaces optimized, added IsProgrammOk
+ by Ralf Junker
+ -=- (^) Increased NSUBEXP (now 15) and fixed code for this, now you
+ can simply increase NSUBEXP constant by yourself.
+ Suggested by Alexander V. Akimov.
+ -=- (^+) Substitute adapted for NSUBEXP > 10 and significant (!)
+ optimized, improved error checking.
+ ATTENTION! Read new Substitute description - syntax was changed !
+ -=- (+) SpaceChars & WordChars property - now you may change chars
+ treated as \s & \w. By defauled assigned RegExprSpaceChars/WordChars
+ -=- (+) Now \s and \w supported in ranges
+ -=- (-) Infinite loop if end of range=#$FF
+ Thanks to Andrey Kolegov
+ -=- (+) Function QuoteRegExprMetaChars (see description)
+ -=- (+) UniCode support - sorry, works VERY slow (remove '.' from
+ {.$DEFINE UniCode} after this comment for unicode version).
+ Implemented by Yury Finkel
+
+ v. 0.926 2000.02.26
+ -=- (-) Old bug derived from H.Spencer sources - SPSTART was
+ set for '?' and '*' instead of '*', '{m,n}' and '+'.
+ -=- (-^) Now {m,n} works like Perl's one - error occures only
+ if m > n or n > BracesMax (BracesMax = 255 in this version).
+ In other cases (no m or nondigit symbols in m or n values,
+ or no '}') symbol '{' will be compiled as literal.
+ Note: so, you must include m value (use {0,n} instead of {,n}).
+ Note: {m,} will be compiled as {m,BracesMax}.
+ -=- (-^) CaseInsensitive mode now support ranges
+ '(?i)[a]' == '[aA]'
+ -=- (^) Roman-number template in TestRExp ;)
+ -=- (+^) Beta version of complex-braces - like ((abc){1,2}|d){3}
+ By default its turned off. If you want take part in beta-testing,
+ please, remove '.' from {.$DEFINE ComplexBraces} below this comments.
+ -=- (-^) Removed \b metachar (in Perl it isn't BS as in my implementation,
+ but word bound)
+ -=- (+) Add /s modifier. Bu I am not sure that it's ok for Windows.
+ I implemented it as [^\n] for '.' metachar in non-/s mode.
+ But lines separated by \n\r in windows. I need you suggestions !
+ -=- (^) Sorry, but I had to rename Modifiers to ModifierStr
+ (ModifierS uses for /s now)
+
+ v. 0.91 2000.02.02
+ -=- (^) some changes in documentation and demo-project.
+
+ v. 0.90 2000.01.31
+ -=- (+) implemented braces repetitions {min,max}.
+ Sorry - only simple cases now - like '\d{2,3}'
+ or '[a-z1-9]{,7}', but not (abc){2,3} ..
+ I still too short in time.
+ Wait for future versions of TRegExpr or
+ implement it by youself and share with me ;)
+ -=- (+) implemented case-insensitive modifier and way
+ to work with other modifiers - see properties
+ Modifiers, Modifier, ModifierI
+ and (?ismx-ismx) Perl extension.
+ You may use global variables RegExpr* for assigning
+ default modifier values.
+ -=- (+) property ExtSyntaxEnabled changed to 'r'-modifier
+ (russian extensions - see documentation)
+ -=- (+) implemented (?#comment) Perl extension - very hard
+ and usefull work ;)
+ -=- (^) property MatchCount renamed to SubExprMatchCount.
+ Sorry for any inconvenients, but it's because new
+ version works slightly different and if you used
+ MatchCount in your programms you have to rethink
+ it ! (see comments to this property)
+ -=- (+) add InputString property - stores input string
+ from last Exec call. You may directly assign values
+ to this property for using in ExecPos method.
+ -=- (+) add ExecPos method - for working with assigned
+ to InputString property. You may use it like this
+ InputString := AString;
+ ExecPos;
+ or this
+ InputString := AString;
+ ExecPos (AOffset);
+ Note: ExecPos without parameter works only in
+ Delphi 4 or higher.
+ -=- (+) add ExecNext method - simple and fast (!) way to finding
+ multiple occurences of r.e. in big input string.
+ -=- (^) Offset parameter removed from Exec method, if you
+ used it in your programs, please replace all
+ Exec (AString, AOffset)
+ with combination
+ InputString := AString; ExecPos (AOffset)
+ Sorry for any inconvenients, but old design
+ (see v.0.81) was too ugly :(
+ In addition, multiple Exec calls with same input
+ string produce fool overhead because each Exec
+ reallocate input string buffer.
+ -=- (^) optimized implementation of Substitution,
+ Replace and Split methods
+ -=- (-) fixed minor bug - if r.e. compilation raise error
+ during second pass (!!! I think it's impossible
+ in really practice), TRegExpr stayed in 'compiled'
+ state.
+ -=- (-) fixed bug - Dump method didn't check program existance
+ and raised 'access violation' if previouse Exec
+ was finished with error.
+ -=- (+) changed error handling (see functions Error, ErrorMsg,
+ LastError, property CompilerErrorPos, type ERegExpr).
+ -=- (-^) TRegExpr.Replace, Split and ExecNext made a infinite
+ loop in case of r.e. match empty-string.
+ Now ExecNext moves by MatchLen if MatchLen <> 0
+ and by +1 if MatchLen = 0
+ Thanks to Jon Smith and George Tasker for bugreports.
+ -=- (-) While playing with null-matchs I discovered, that
+ null-match at tail of input string is never found.
+ Well, I fixed this, but I am not sure this is safe
+ (MatchPos[0]=length(AInputString)+1, MatchLen = 0).
+ Any suggetions are very appreciated.
+ -=- (^) Demo project and documentation was upgraded
+ -=- (^) Documentation and this version was published on my home page
+ http://anso.da.ru
+
+
+ v. 0.81 1999.12.25 // Merry Christmas ! :)
+ -=- added \s (AnySpace) and \S (NotSpace) meta-symbols
+ - implemented by Stephan Klimek with minor fixes by AVS
+ -=- added \f, \a and \b chars (translates into FF, BEL, BS)
+ -=- removed meta-symbols 'ö' & 'Ö' - sorry for any inconvenients
+ -=- added Match property (== copy (InputStr, MatchPos [Idx], MatchLen [Idx]))
+ -=- added extra parameter Offset to Exec method
+ (thanks to Steve Mudford)
+
+ v. 0.7 1999.08.22
+ -=- fixed bug - in some cases the r.e. [^...]
+ incorrectly processed (as any symbol)
+ (thanks to Jan Korycan)
+ -=- Some changes and improvements in TestRExp.dpr
+
+ v. 0.6 1999.08.13 (Friday 13 !)
+ -=- changed header of TRegExpr.Substitute
+ -=- added Split, Replace & appropriate
+ global wrappers (thanks to Stephan Klimek for suggetions)
+
+ v. 0.5 1999.08.12
+ -=- TRegExpr.Substitute routine added
+ -=- Some changes and improvements in TestRExp.dpr
+ -=- Fixed bug in english version of documentation
+ (Thanks to Jon Buckheit)
+
+ v. 0.4 1999.07.20
+ -=- Fixed bug with parsing of strings longer then 255 bytes
+ (thanks to Guido Muehlwitz)
+ -=- Fixed bug in RegMatch - mathes only first occurence of r.e.
+ (thanks to Stephan Klimek)
+
+ v. 0.3 1999.06.13
+ -=- ExecRegExpr function
+
+ v. 0.2 1999.06.10
+ -=- packed into object-pascal class
+ -=- code slightly rewriten for pascal
+ -=- now macro correct proceeded in ranges
+ -=- r.e.ranges syntax extended for russian letters ranges:
+ à-ÿ - replaced with all small russian letters (Win1251)
+ À-ß - replaced with all capital russian letters (Win1251)
+ à-ß - replaced with all russian letters (Win1251)
+ -=- added macro '\d' (opcode ANYDIGIT) - match any digit
+ -=- added macro '\D' (opcode NOTDIGIT) - match not digit
+ -=- added macro '\w' (opcode ANYLETTER) - match any english letter or '_'
+ -=- added macro '\W' (opcode NOTLETTER) - match not english letter or '_'
+ (all r.e.syntax extensions may be turned off by flag ExtSyntax)
+
+ v. 0.1 1999.06.09
+ first version, with bugs, without help => must die :(
+
+*)
+
+interface
+
+{$DEFINE DebugRegExpr} // define for dump/trace enabling
+
+{$IFNDEF cpu64}
+{$DEFINE reRealExceptionAddr} // if defined then exceptions will
+// jump to appropriate source line, not to Error procedure
+{$ENDIF}
+
+{$DEFINE ComplexBraces} // define for beta-version of braces
+// (in stable version it works only for simple cases)
+
+{.$DEFINE UniCode} // define for Unicode support
+
+{$IFNDEF UniCode} // optionts applicable only for non-UniCode
+ {$DEFINE UseSetOfChar} // Significant optimization by using set of char
+{$ENDIF}
+
+{$IFDEF UseSetOfChar}
+ {$DEFINE UseFirstCharSet} // Significant optimization inm some cases
+{$ENDIF}
+
+// Determine version (for using 'params by default')
+{$IFNDEF FPC}
+ {$IFNDEF VER80} { Delphi 1.0}
+ {$IFNDEF VER90} { Delphi 2.0}
+ {$IFNDEF VER93} { C++Builder 1.0}
+ {$IFNDEF VER100} { Borland Delphi 3.0}
+ {$DEFINE D4_} { Delphi 4.0 or higher}
+ {$ENDIF}
+ {$ENDIF}
+ {$ENDIF}
+ {$ENDIF}
+{$ENDIF}
+{.$IFNDEF VER110} { Borland C++Builder 3.0}
+{.$IFNDEF VER120} {Borland Delphi 4.0}
+
+
+uses
+ Classes, // TStrings in Split method
+ SysUtils; // Exception
+
+type
+ {$IFDEF UniCode}
+ PRegExprChar = PWideChar;
+ RegExprString = WideString;
+ REChar = WideChar;
+ {$ELSE}
+ PRegExprChar = PChar;
+ RegExprString = string;
+ REChar = Char;
+ {$ENDIF}
+ TREOp = REChar; // internal p-code type //###0.933
+ PREOp = ^TREOp;
+ TRENextOff = integer; // internal Next "pointer" (offset to current p-code) //###0.933
+ PRENextOff = ^TRENextOff; // used for extracting Next "pointers" from compiled r.e. //###0.933
+ TREBracesArg = integer; // type of {m,n} arguments
+ PREBracesArg = ^TREBracesArg;
+
+const
+ REOpSz = SizeOf (TREOp) div SizeOf (REChar); // size of p-code in RegExprString units
+ RENextOffSz = SizeOf (TRENextOff) div SizeOf (REChar); // size of Next 'pointer' -"-
+ REBracesArgSz = SizeOf (TREBracesArg) div SizeOf (REChar); // size of BRACES arguments -"-
+
+type
+ TRegExprInvertCaseFunction = function (const Ch : REChar) : REChar
+ of object;
+
+const
+ RegExprModifierI : boolean = False; // default value for ModifierI
+ RegExprModifierR : boolean = True; // default value for ModifierR
+ RegExprModifierS : boolean = True; // default value for ModifierS
+ RegExprModifierG : boolean = True; // default value for ModifierG
+ RegExprModifierM : boolean = False; // default value for ModifierM
+ RegExprModifierX : boolean = False; // default value for ModifierX
+ RegExprSpaceChars : RegExprString = // default value for SpaceChars
+ ' '#$9#$A#$D#$C;
+ RegExprWordChars : RegExprString = // default value for WordChars
+ '0123456789' //###0.940
+ + 'abcdefghijklmnopqrstuvwxyz'
+ + 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_';
+ RegExprLineSeparators : RegExprString =// default value for LineSeparators
+ #$d#$a{$IFDEF UniCode}+#$b#$c#$2028#$2029#$85{$ENDIF}; //###0.947
+ RegExprLinePairedSeparator : RegExprString =// default value for LinePairedSeparator
+ #$d#$a;
+ { if You need Unix-styled line separators (only \n), then use:
+ RegExprLineSeparators = #$a;
+ RegExprLinePairedSeparator = '';
+ }
+
+
+const
+ NSUBEXP = 15; // max number of subexpression //###0.929
+ // Cannot be more than NSUBEXPMAX
+ // Be carefull - don't use values which overflow CLOSE opcode
+ // (in this case you'll get compiler erorr).
+ // Big NSUBEXP will cause more slow work and more stack required
+ NSUBEXPMAX = 255; // Max possible value for NSUBEXP. //###0.945
+ // Don't change it! It's defined by internal TRegExpr design.
+
+ MaxBracesArg = $7FFFFFFF - 1; // max value for {n,m} arguments //###0.933
+
+ {$IFDEF ComplexBraces}
+ LoopStackMax = 10; // max depth of loops stack //###0.925
+ {$ENDIF}
+
+ TinySetLen = 3;
+ // if range includes more then TinySetLen chars, //###0.934
+ // then use full (32 bytes) ANYOFFULL instead of ANYOF[BUT]TINYSET
+ // !!! Attension ! If you change TinySetLen, you must
+ // change code marked as "//!!!TinySet"
+
+
+type
+
+{$IFDEF UseSetOfChar}
+ PSetOfREChar = ^TSetOfREChar;
+ TSetOfREChar = set of REChar;
+{$ENDIF}
+
+ TRegExpr = class
+ private
+ startp : array [0 .. NSUBEXP - 1] of PRegExprChar; // founded expr starting points
+ endp : array [0 .. NSUBEXP - 1] of PRegExprChar; // founded expr end points
+
+ {$IFDEF ComplexBraces}
+ LoopStack : array [1 .. LoopStackMax] of integer; // state before entering loop
+ LoopStackIdx : integer; // 0 - out of all loops
+ {$ENDIF}
+
+ // The "internal use only" fields to pass info from compile
+ // to execute that permits the execute phase to run lots faster on
+ // simple cases.
+ regstart : REChar; // char that must begin a match; '\0' if none obvious
+ reganch : REChar; // is the match anchored (at beginning-of-line only)?
+ regmust : PRegExprChar; // string (pointer into program) that match must include, or nil
+ regmlen : integer; // length of regmust string
+ // Regstart and reganch permit very fast decisions on suitable starting points
+ // for a match, cutting down the work a lot. Regmust permits fast rejection
+ // of lines that cannot possibly match. The regmust tests are costly enough
+ // that regcomp() supplies a regmust only if the r.e. contains something
+ // potentially expensive (at present, the only such thing detected is * or +
+ // at the start of the r.e., which can involve a lot of backup). Regmlen is
+ // supplied because the test in regexec() needs it and regcomp() is computing
+ // it anyway.
+ {$IFDEF UseFirstCharSet} //###0.929
+ FirstCharSet : TSetOfREChar;
+ {$ENDIF}
+
+ // work variables for Exec's routins - save stack in recursion}
+ reginput : PRegExprChar; // String-input pointer.
+ fInputStart : PRegExprChar; // Pointer to first char of input string.
+ fInputEnd : PRegExprChar; // Pointer to char AFTER last char of input string
+
+ // work variables for compiler's routines
+ regparse : PRegExprChar; // Input-scan pointer.
+ regnpar : integer; // count.
+ regdummy : char;
+ regcode : PRegExprChar; // Code-emit pointer; @regdummy = don't.
+ regsize : integer; // Code size.
+
+ regexpbeg : PRegExprChar; // only for error handling. Contains
+ // pointer to beginning of r.e. while compiling
+ fExprIsCompiled : boolean; // true if r.e. successfully compiled
+
+ // programm is essentially a linear encoding
+ // of a nondeterministic finite-state machine (aka syntax charts or
+ // "railroad normal form" in parsing technology). Each node is an opcode
+ // plus a "next" pointer, possibly plus an operand. "Next" pointers of
+ // all nodes except BRANCH implement concatenation; a "next" pointer with
+ // a BRANCH on both ends of it is connecting two alternatives. (Here we
+ // have one of the subtle syntax dependencies: an individual BRANCH (as
+ // opposed to a collection of them) is never concatenated with anything
+ // because of operator precedence.) The operand of some types of node is
+ // a literal string; for others, it is a node leading into a sub-FSM. In
+ // particular, the operand of a BRANCH node is the first node of the branch.
+ // (NB this is *not* a tree structure: the tail of the branch connects
+ // to the thing following the set of BRANCHes.) The opcodes are:
+ programm : PRegExprChar; // Unwarranted chumminess with compiler.
+
+ fExpression : PRegExprChar; // source of compiled r.e.
+ fInputString : PRegExprChar; // input string
+
+ fLastError : integer; // see Error, LastError
+
+ fModifiers : integer; // modifiers
+ fCompModifiers : integer; // compiler's copy of modifiers
+ fProgModifiers : integer; // modifiers values from last programm compilation
+
+ fSpaceChars : RegExprString; //###0.927
+ fWordChars : RegExprString; //###0.929
+ fInvertCase : TRegExprInvertCaseFunction; //###0.927
+
+ fLineSeparators : RegExprString; //###0.941
+ fLinePairedSeparatorAssigned : boolean;
+ fLinePairedSeparatorHead,
+ fLinePairedSeparatorTail : REChar;
+ {$IFNDEF UniCode}
+ fLineSeparatorsSet : set of REChar;
+ {$ENDIF}
+
+ procedure InvalidateProgramm;
+ // Mark programm as have to be [re]compiled
+
+ function IsProgrammOk : boolean; //###0.941
+ // Check if we can use precompiled r.e. or
+ // [re]compile it if something changed
+
+ function GetExpression : RegExprString;
+ procedure SetExpression (const s : RegExprString);
+
+ function GetModifierStr : RegExprString;
+ class function ParseModifiersStr (const AModifiers : RegExprString;
+ var AModifiersInt : integer) : boolean; //###0.941 class function now
+ // Parse AModifiers string and return true and set AModifiersInt
+ // if it's in format 'ismxrg-ismxrg'.
+ procedure SetModifierStr (const AModifiers : RegExprString);
+
+ function GetModifier (AIndex : integer) : boolean;
+ procedure SetModifier (AIndex : integer; ASet : boolean);
+
+ procedure Error (AErrorID : integer); virtual; // error handler.
+ // Default handler raise exception ERegExpr with
+ // Message = ErrorMsg (AErrorID), ErrorCode = AErrorID
+ // and CompilerErrorPos = value of property CompilerErrorPos.
+
+
+ {==================== Compiler section ===================}
+ function CompileRegExpr (exp : PRegExprChar) : boolean;
+ // compile a regular expression into internal code
+
+ procedure Tail (p : PRegExprChar; val : PRegExprChar);
+ // set the next-pointer at the end of a node chain
+
+ procedure OpTail (p : PRegExprChar; val : PRegExprChar);
+ // regoptail - regtail on operand of first argument; nop if operandless
+
+ function EmitNode (op : TREOp) : PRegExprChar;
+ // regnode - emit a node, return location
+
+ procedure EmitC (b : REChar);
+ // emit (if appropriate) a byte of code
+
+ procedure InsertOperator (op : TREOp; opnd : PRegExprChar; sz : integer); //###0.90
+ // insert an operator in front of already-emitted operand
+ // Means relocating the operand.
+
+ function ParseReg (paren : integer; var flagp : integer) : PRegExprChar;
+ // regular expression, i.e. main body or parenthesized thing
+
+ function ParseBranch (var flagp : integer) : PRegExprChar;
+ // one alternative of an | operator
+
+ function ParsePiece (var flagp : integer) : PRegExprChar;
+ // something followed by possible [*+?]
+
+ function ParseAtom (var flagp : integer) : PRegExprChar;
+ // the lowest level
+
+ function GetCompilerErrorPos : integer;
+ // current pos in r.e. - for error hanling
+
+ {$IFDEF UseFirstCharSet} //###0.929
+ procedure FillFirstCharSet (prog : PRegExprChar);
+ {$ENDIF}
+
+ {===================== Mathing section ===================}
+ function regrepeat (p : PRegExprChar; AMax : integer) : integer;
+ // repeatedly match something simple, report how many
+
+ function regnext (p : PRegExprChar) : PRegExprChar;
+ // dig the "next" pointer out of a node
+
+ function MatchPrim (prog : PRegExprChar) : boolean;
+ // recursively matching routine
+
+ function RegMatch (str : PRegExprChar) : boolean;
+ // try match at specific point, uses MatchPrim for real work
+
+ function ExecPrim (AOffset: integer) : boolean;
+ // Exec for stored InputString
+
+ {$IFDEF DebugRegExpr}
+ function DumpOp (op : REChar) : RegExprString;
+ {$ENDIF}
+
+ function GetSubExprMatchCount : integer;
+ function GetMatchPos (Idx : integer) : integer;
+ function GetMatchLen (Idx : integer) : integer;
+ function GetMatch (Idx : integer) : RegExprString;
+
+ function GetInputString : RegExprString;
+ procedure SetInputString (const AInputString : RegExprString);
+
+ {$IFNDEF UseSetOfChar}
+ function StrScanCI (s : PRegExprChar; ch : REChar) : PRegExprChar; //###0.928
+ {$ENDIF}
+
+ procedure SetLineSeparators (const AStr : RegExprString);
+ procedure SetLinePairedSeparator (const AStr : RegExprString);
+ function GetLinePairedSeparator : RegExprString;
+
+ public
+ constructor Create;
+ destructor Destroy; override;
+
+ class function VersionMajor : integer; //###0.944
+ class function VersionMinor : integer; //###0.944
+
+ property Expression : RegExprString read GetExpression write SetExpression;
+ // Regular expression.
+ // For optimization, TRegExpr will automatically compiles it into 'P-code'
+ // (You can see it with help of Dump method) and stores in internal
+ // structures. Real [re]compilation occures only when it really needed -
+ // while calling Exec[Next], Substitute, Dump, etc
+ // and only if Expression or other P-code affected properties was changed
+ // after last [re]compilation.
+ // If any errors while [re]compilation occures, Error method is called
+ // (by default Error raises exception - see below)
+
+ property ModifierStr : RegExprString read GetModifierStr write SetModifierStr;
+ // Set/get default values of r.e.syntax modifiers. Modifiers in
+ // r.e. (?ismx-ismx) will replace this default values.
+ // If you try to set unsupported modifier, Error will be called
+ // (by defaul Error raises exception ERegExpr).
+
+ property ModifierI : boolean index 1 read GetModifier write SetModifier;
+ // Modifier /i - caseinsensitive, initialized from RegExprModifierI
+
+ property ModifierR : boolean index 2 read GetModifier write SetModifier;
+ // Modifier /r - use r.e.syntax extended for russian,
+ // (was property ExtSyntaxEnabled in previous versions)
+ // If true, then à-ÿ additional include russian letter '¸',
+ // À-ß additional include '¨', and à-ß include all russian symbols.
+ // You have to turn it off if it may interfere with you national alphabet.
+ // , initialized from RegExprModifierR
+
+ property ModifierS : boolean index 3 read GetModifier write SetModifier;
+ // Modifier /s - '.' works as any char (else as [^\n]),
+ // , initialized from RegExprModifierS
+
+ property ModifierG : boolean index 4 read GetModifier write SetModifier;
+ // Switching off modifier /g switchs all operators in
+ // non-greedy style, so if ModifierG = False, then
+ // all '*' works as '*?', all '+' as '+?' and so on.
+ // , initialized from RegExprModifierG
+
+ property ModifierM : boolean index 5 read GetModifier write SetModifier;
+ // Treat string as multiple lines. That is, change `^' and `$' from
+ // matching at only the very start or end of the string to the start
+ // or end of any line anywhere within the string.
+ // , initialized from RegExprModifierM
+
+ property ModifierX : boolean index 6 read GetModifier write SetModifier;
+ // Modifier /x - eXtended syntax, allow r.e. text formatting,
+ // see description in the help. Initialized from RegExprModifierX
+
+ function Exec (const AInputString : RegExprString) : boolean;
+ // match a programm against a string AInputString
+ // !!! Exec store AInputString into InputString property
+
+ function ExecNext : boolean;
+ // find next match:
+ // Exec (AString); ExecNext;
+ // works same as
+ // Exec (AString);
+ // if MatchLen [0] = 0 then ExecPos (MatchPos [0] + 1)
+ // else ExecPos (MatchPos [0] + MatchLen [0]);
+ // but it's more simpler !
+
+ function ExecPos (AOffset: integer {$IFDEF D4_}= 1{$ENDIF}) : boolean;
+ // find match for InputString starting from AOffset position
+ // (AOffset=1 - first char of InputString)
+
+ property InputString : RegExprString read GetInputString write SetInputString;
+ // returns current input string (from last Exec call or last assign
+ // to this property).
+ // Any assignment to this property clear Match* properties !
+
+ function Substitute (const ATemplate : RegExprString) : RegExprString;
+ // Returns ATemplate with '$&' or '$0' replaced by whole r.e.
+ // occurence and '$n' replaced by occurence of subexpression #n.
+ // Since v.0.929 '$' used instead of '\' (for future extensions
+ // and for more Perl-compatibility) and accept more then one digit.
+ // If you want place into template raw '$' or '\', use prefix '\'
+ // Example: '1\$ is $2\\rub\\' -> '1$ is \rub\'
+ // If you want to place raw digit after '$n' you must delimit
+ // n with curly braces '{}'.
+ // Example: 'a$12bc' -> 'abc'
+ // 'a${1}2bc' -> 'a2bc'.
+
+ procedure Split (AInputStr : RegExprString; APieces : TStrings);
+ // Split AInputStr into APieces by r.e. occurencies
+ // Internally calls Exec[Next]
+
+ function Replace (AInputStr : RegExprString;
+ const AReplaceStr : RegExprString;
+ AUseSubstitution : boolean{$IFDEF D4_}= False{$ENDIF}) //###0.946
+ : RegExprString;
+ // Returns AInputStr with r.e. occurencies replaced by AReplaceStr
+ // If AUseSubstitution is true, then AReplaceStr will be used
+ // as template for Substitution methods.
+ // For example:
+ // Expression := '({-i}block|var)\s*\(\s*([^ ]*)\s*\)\s*';
+ // Replace ('BLOCK( test1)', 'def "$1" value "$2"', True);
+ // will return: def 'BLOCK' value 'test1'
+ // Replace ('BLOCK( test1)', 'def "$1" value "$2"')
+ // will return: def "$1" value "$2"
+ // Internally calls Exec[Next]
+
+ property SubExprMatchCount : integer read GetSubExprMatchCount;
+ // Number of subexpressions has been found in last Exec* call.
+ // If there are no subexpr. but whole expr was found (Exec* returned True),
+ // then SubExprMatchCount=0, if no subexpressions nor whole
+ // r.e. found (Exec* returned false) then SubExprMatchCount=-1.
+ // Note, that some subexpr. may be not found and for such
+ // subexpr. MathPos=MatchLen=-1 and Match=''.
+ // For example: Expression := '(1)?2(3)?';
+ // Exec ('123'): SubExprMatchCount=2, Match[0]='123', [1]='1', [2]='3'
+ // Exec ('12'): SubExprMatchCount=1, Match[0]='12', [1]='1'
+ // Exec ('23'): SubExprMatchCount=2, Match[0]='23', [1]='', [2]='3'
+ // Exec ('2'): SubExprMatchCount=0, Match[0]='2'
+ // Exec ('7') - return False: SubExprMatchCount=-1
+
+ property MatchPos [Idx : integer] : integer read GetMatchPos;
+ // pos of entrance subexpr. #Idx into tested in last Exec*
+ // string. First subexpr. have Idx=1, last - MatchCount,
+ // whole r.e. have Idx=0.
+ // Returns -1 if in r.e. no such subexpr. or this subexpr.
+ // not found in input string.
+
+ property MatchLen [Idx : integer] : integer read GetMatchLen;
+ // len of entrance subexpr. #Idx r.e. into tested in last Exec*
+ // string. First subexpr. have Idx=1, last - MatchCount,
+ // whole r.e. have Idx=0.
+ // Returns -1 if in r.e. no such subexpr. or this subexpr.
+ // not found in input string.
+ // Remember - MatchLen may be 0 (if r.e. match empty string) !
+
+ property Match [Idx : integer] : RegExprString read GetMatch;
+ // == copy (InputString, MatchPos [Idx], MatchLen [Idx])
+ // Returns '' if in r.e. no such subexpr. or this subexpr.
+ // not found in input string.
+
+ function LastError : integer;
+ // Returns ID of last error, 0 if no errors (unusable if
+ // Error method raises exception) and clear internal status
+ // into 0 (no errors).
+
+ function ErrorMsg (AErrorID : integer) : RegExprString; virtual;
+ // Returns Error message for error with ID = AErrorID.
+
+ property CompilerErrorPos : integer read GetCompilerErrorPos;
+ // Returns pos in r.e. there compiler stopped.
+ // Usefull for error diagnostics
+
+ property SpaceChars : RegExprString read fSpaceChars write fSpaceChars; //###0.927
+ // Contains chars, treated as /s (initially filled with RegExprSpaceChars
+ // global constant)
+
+ property WordChars : RegExprString read fWordChars write fWordChars; //###0.929
+ // Contains chars, treated as /w (initially filled with RegExprWordChars
+ // global constant)
+
+ property LineSeparators : RegExprString read fLineSeparators write SetLineSeparators; //###0.941
+ // line separators (like \n in Unix)
+
+ property LinePairedSeparator : RegExprString read GetLinePairedSeparator write SetLinePairedSeparator; //###0.941
+ // paired line separator (like \r\n in DOS and Windows).
+ // must contain exactly two chars or no chars at all
+
+ class function InvertCaseFunction (const Ch : REChar) : REChar;
+ // Converts Ch into upper case if it in lower case or in lower
+ // if it in upper (uses current system local setings)
+
+ property InvertCase : TRegExprInvertCaseFunction read fInvertCase write fInvertCase; //##0.935
+ // Set this property if you want to override case-insensitive functionality.
+ // Create set it to RegExprInvertCaseFunction (InvertCaseFunction by default)
+
+ procedure Compile; //###0.941
+ // [Re]compile r.e. Usefull for example for GUI r.e. editors (to check
+ // all properties validity).
+
+ {$IFDEF DebugRegExpr}
+ function Dump : RegExprString;
+ // dump a compiled regexp in vaguely comprehensible form
+ {$ENDIF}
+ end;
+
+ ERegExpr = class (Exception)
+ public
+ ErrorCode : integer;
+ CompilerErrorPos : integer;
+ end;
+
+const
+ RegExprInvertCaseFunction : TRegExprInvertCaseFunction = nil;//TRegExpr.InvertCaseFunction;
+ // defaul for InvertCase property
+
+function ExecRegExpr (const ARegExpr, AInputStr : RegExprString) : boolean;
+// true if string AInputString match regular expression ARegExpr
+// ! will raise exeption if syntax errors in ARegExpr
+
+procedure SplitRegExpr (const ARegExpr, AInputStr : RegExprString; APieces : TStrings);
+// Split AInputStr into APieces by r.e. ARegExpr occurencies
+
+function ReplaceRegExpr (const ARegExpr, AInputStr, AReplaceStr : RegExprString;
+ AUseSubstitution : boolean{$IFDEF D4_}= False{$ENDIF}) : RegExprString; //###0.947
+// Returns AInputStr with r.e. occurencies replaced by AReplaceStr
+// If AUseSubstitution is true, then AReplaceStr will be used
+// as template for Substitution methods.
+// For example:
+// ReplaceRegExpr ('({-i}block|var)\s*\(\s*([^ ]*)\s*\)\s*',
+// 'BLOCK( test1)', 'def "$1" value "$2"', True)
+// will return: def 'BLOCK' value 'test1'
+// ReplaceRegExpr ('({-i}block|var)\s*\(\s*([^ ]*)\s*\)\s*',
+// 'BLOCK( test1)', 'def "$1" value "$2"')
+// will return: def "$1" value "$2"
+
+function QuoteRegExprMetaChars (const AStr : RegExprString) : RegExprString;
+// Replace all metachars with its safe representation,
+// for example 'abc$cd.(' converts into 'abc\$cd\.\('
+// This function usefull for r.e. autogeneration from
+// user input
+
+function RegExprSubExpressions (const ARegExpr : string;
+ ASubExprs : TStrings; AExtendedSyntax : boolean{$IFDEF D4_}= False{$ENDIF}) : integer;
+// Makes list of subexpressions found in ARegExpr r.e.
+// In ASubExps every item represent subexpression,
+// from first to last, in format:
+// String - subexpression text (without '()')
+// low word of Object - starting position in ARegExpr, including '('
+// if exists! (first position is 1)
+// high word of Object - length, including starting '(' and ending ')'
+// if exist!
+// AExtendedSyntax - must be True if modifier /m will be On while
+// using the r.e.
+// Usefull for GUI editors of r.e. etc (You can find example of using
+// in TestRExp.dpr project)
+// Returns
+// 0 Success. No unbalanced brackets was found;
+// -1 There are not enough closing brackets ')';
+// -(n+1) At position n was found opening '[' without //###0.942
+// corresponding closing ']';
+// n At position n was found closing bracket ')' without
+// corresponding opening '('.
+// If Result <> 0, then ASubExpr can contain empty items or illegal ones
+
+
+implementation
+
+uses
+ {$IFDEF LINUX}
+ Libc, // CharUpper/Lower
+ {$ENDIF}
+ uROClasses;
+
+const
+ TRegExprVersionMajor : integer = 0;
+ TRegExprVersionMinor : integer = 947;
+ // don't use this const directly, use TRegExpr.VersionXXX instead
+
+ MaskModI = 1; // modifier /i bit in fModifiers
+ MaskModR = 2; // -"- /r
+ MaskModS = 4; // -"- /s
+ MaskModG = 8; // -"- /g
+ MaskModM = 16; // -"- /m
+ MaskModX = 32; // -"- /x
+
+ {$IFDEF UniCode}
+ XIgnoredChars = ' '#9#$d#$a;
+ {$ELSE}
+ XIgnoredChars = [' ', #9, #$d, #$a];
+ {$ENDIF}
+
+{=============================================================}
+{=================== WideString functions ====================}
+{=============================================================}
+
+{$IFDEF UniCode}
+
+function StrPCopy (Dest: PRegExprChar; const Source: RegExprString): PRegExprChar;
+ var
+ i, Len : Integer;
+ begin
+ Len := length (Source); //###0.932
+ for i := 1 to Len do
+ Dest [i - 1] := Source [i];
+ Dest [Len] := #0;
+ Result := Dest;
+ end; { of function StrPCopy
+--------------------------------------------------------------}
+
+function StrLCopy (Dest, Source: PRegExprChar; MaxLen: Cardinal): PRegExprChar;
+ var i: Integer;
+ begin
+ for i := 0 to MaxLen - 1 do
+ Dest [i] := Source [i];
+ Result := Dest;
+ end; { of function StrLCopy
+--------------------------------------------------------------}
+
+function StrLen (Str: PRegExprChar): Cardinal;
+ begin
+ Result:=0;
+ while Str [result] <> #0
+ do Inc (Result);
+ end; { of function StrLen
+--------------------------------------------------------------}
+
+function StrPos (Str1, Str2: PRegExprChar): PRegExprChar;
+ var n: Integer;
+ begin
+ Result := nil;
+ n := Pos (RegExprString (Str2), RegExprString (Str1));
+ if n = 0
+ then EXIT;
+ Result := Str1 + n - 1;
+ end; { of function StrPos
+--------------------------------------------------------------}
+
+function StrLComp (Str1, Str2: PRegExprChar; MaxLen: Cardinal): Integer;
+ var S1, S2: RegExprString;
+ begin
+ S1 := Str1;
+ S2 := Str2;
+ if Copy (S1, 1, MaxLen) > Copy (S2, 1, MaxLen)
+ then Result := 1
+ else
+ if Copy (S1, 1, MaxLen) < Copy (S2, 1, MaxLen)
+ then Result := -1
+ else Result := 0;
+ end; { function StrLComp
+--------------------------------------------------------------}
+
+function StrScan (Str: PRegExprChar; Chr: WideChar): PRegExprChar;
+ begin
+ Result := nil;
+ while (Str^ <> #0) and (Str^ <> Chr)
+ do Inc (Str);
+ if (Str^ <> #0)
+ then Result := Str;
+ end; { of function StrScan
+--------------------------------------------------------------}
+
+{$ENDIF}
+
+
+{=============================================================}
+{===================== Global functions ======================}
+{=============================================================}
+
+function ExecRegExpr (const ARegExpr, AInputStr : RegExprString) : boolean;
+ var r : TRegExpr;
+ begin
+ r := TRegExpr.Create;
+ try
+ r.Expression := ARegExpr;
+ Result := r.Exec (AInputStr);
+ finally r.Free;
+ end;
+ end; { of function ExecRegExpr
+--------------------------------------------------------------}
+
+procedure SplitRegExpr (const ARegExpr, AInputStr : RegExprString; APieces : TStrings);
+ var r : TRegExpr;
+ begin
+ APieces.Clear;
+ r := TRegExpr.Create;
+ try
+ r.Expression := ARegExpr;
+ r.Split (AInputStr, APieces);
+ finally r.Free;
+ end;
+ end; { of procedure SplitRegExpr
+--------------------------------------------------------------}
+
+function ReplaceRegExpr (const ARegExpr, AInputStr, AReplaceStr : RegExprString;
+ AUseSubstitution : boolean{$IFDEF D4_}= False{$ENDIF}) : RegExprString;
+ var r : TRegExpr;
+ begin
+ r := TRegExpr.Create;
+ try
+ r.Expression := ARegExpr;
+ Result := r.Replace (AInputStr, AReplaceStr, AUseSubstitution); //###0.947
+ finally r.Free;
+ end;
+ end; { of function ReplaceRegExpr
+--------------------------------------------------------------}
+
+function QuoteRegExprMetaChars (const AStr : RegExprString) : RegExprString;
+ const
+ RegExprMetaSet : RegExprString = '^$.[()|?+*\{'
+ + ']}'; // - this last are additional to META.
+ // Very similar to META array, but slighly changed.
+ // !Any changes in META array must be synchronized with this set.
+ var
+ i, i0, Len : integer;
+ begin
+ Result := '';
+ Len := length (AStr);
+ i := 1;
+ i0 := i;
+ while i <= Len do begin
+ if Pos (AStr [i], RegExprMetaSet) > 0 then begin
+ Result := Result + System.Copy (AStr, i0, i - i0)
+ + '\' + AStr [i];
+ i0 := i + 1;
+ end;
+ inc (i);
+ end;
+ Result := Result + System.Copy (AStr, i0, MaxInt); // Tail
+ end; { of function QuoteRegExprMetaChars
+--------------------------------------------------------------}
+
+function RegExprSubExpressions (const ARegExpr : string;
+ ASubExprs : TStrings; AExtendedSyntax : boolean{$IFDEF D4_}= False{$ENDIF}) : integer;
+ type
+ TStackItemRec = record //###0.945
+ SubExprIdx : integer;
+ StartPos : integer;
+ end;
+ TStackArray = packed array [0 .. NSUBEXPMAX - 1] of TStackItemRec;
+ var
+ Len, SubExprLen : integer;
+ i, i0 : integer;
+ Modif : integer;
+ Stack : ^TStackArray; //###0.945
+ StackIdx, StackSz : integer;
+ begin
+ Result := 0; // no unbalanced brackets found at this very moment
+
+ ASubExprs.Clear; // I don't think that adding to non empty list
+ // can be usefull, so I simplified algorithm to work only with empty list
+
+ Len := length (ARegExpr); // some optimization tricks
+
+ // first we have to calculate number of subexpression to reserve
+ // space in Stack array (may be we'll reserve more then need, but
+ // it's faster then memory reallocation during parsing)
+ StackSz := 1; // add 1 for entire r.e.
+ for i := 1 to Len do
+ if ARegExpr [i] = '('
+ then inc (StackSz);
+// SetLength (Stack, StackSz); //###0.945
+ GetMem (Stack, SizeOf (TStackItemRec) * StackSz);
+ try
+
+ StackIdx := 0;
+ i := 1;
+ while (i <= Len) do begin
+ case ARegExpr [i] of
+ '(': begin
+ if (i < Len) and (ARegExpr [i + 1] = '?') then begin
+ // this is not subexpression, but comment or other
+ // Perl extension. We must check is it (?ismxrg-ismxrg)
+ // and change AExtendedSyntax if /x is changed.
+ inc (i, 2); // skip '(?'
+ i0 := i;
+ while (i <= Len) and (ARegExpr [i] <> ')')
+ do inc (i);
+ if i > Len
+ then Result := -1 // unbalansed '('
+ else
+ if TRegExpr.ParseModifiersStr (System.Copy (ARegExpr, i, i - i0), Modif)
+ then AExtendedSyntax := (Modif and MaskModX) <> 0;
+ end
+ else begin // subexpression starts
+ ASubExprs.Add (''); // just reserve space
+ with Stack [StackIdx] do begin
+ SubExprIdx := ASubExprs.Count - 1;
+ StartPos := i;
+ end;
+ inc (StackIdx);
+ end;
+ end;
+ ')': begin
+ if StackIdx = 0
+ then Result := i // unbalanced ')'
+ else begin
+ dec (StackIdx);
+ with Stack [StackIdx] do begin
+ SubExprLen := i - StartPos + 1;
+ ASubExprs.Objects [SubExprIdx] :=
+ TObject (StartPos or (SubExprLen ShL 16));
+ ASubExprs [SubExprIdx] := System.Copy (
+ ARegExpr, StartPos + 1, SubExprLen - 2); // add without brackets
+ end;
+ end;
+ end;
+ '\': inc (i); // skip quoted symbol
+ '[': begin
+ // we have to skip character ranges at once, because they can
+ // contain '#', and '#' in it must NOT be recognized as eXtended
+ // comment beginning!
+ i0 := i;
+ inc (i);
+ if ARegExpr [i] = ']' // cannot be 'emty' ranges - this interpretes
+ then inc (i); // as ']' by itself
+ while (i <= Len) and (ARegExpr [i] <> ']') do
+ if ARegExpr [i] = '\' //###0.942
+ then inc (i, 2) // skip 'escaped' char to prevent stopping at '\]'
+ else inc (i);
+ if (i > Len) or (ARegExpr [i] <> ']') //###0.942
+ then Result := - (i0 + 1); // unbalansed '[' //###0.942
+ end;
+ '#': if AExtendedSyntax then begin
+ // skip eXtended comments
+ while (i <= Len) and (ARegExpr [i] <> #$d) and (ARegExpr [i] <> #$a)
+ // do not use [#$d, #$a] due to UniCode compatibility
+ do inc (i);
+ while (i + 1 <= Len) and ((ARegExpr [i + 1] = #$d) or (ARegExpr [i + 1] = #$a))
+ do inc (i); // attempt to work with different kinds of line separators
+ // now we are at the line separator that must be skipped.
+ end;
+ // here is no 'else' clause - we simply skip ordinary chars
+ end; // of case
+ inc (i); // skip scanned char
+ // ! can move after Len due to skipping quoted symbol
+ end;
+
+ // check brackets balance
+ if StackIdx <> 0
+ then Result := -1; // unbalansed '('
+
+ // check if entire r.e. added
+ if (ASubExprs.Count = 0)
+ or ((integer (ASubExprs.Objects [0]) and $FFFF) <> 1)
+ or (((integer (ASubExprs.Objects [0]) ShR 16) and $FFFF) <> Len)
+ // whole r.e. wasn't added because it isn't bracketed
+ // well, we add it now:
+ then ASubExprs.InsertObject (0, ARegExpr, TObject ((Len ShL 16) or 1));
+
+ finally FreeMem (Stack);
+ end;
+ end; { of function RegExprSubExpressions
+--------------------------------------------------------------}
+
+
+
+const
+ MAGIC = TREOp (216);// programm signature
+
+// name opcode opnd? meaning
+ EEND = TREOp (0); // - End of program
+ BOL = TREOp (1); // - Match "" at beginning of line
+ EOL = TREOp (2); // - Match "" at end of line
+ ANY = TREOp (3); // - Match any one character
+ ANYOF = TREOp (4); // Str Match any character in string Str
+ ANYBUT = TREOp (5); // Str Match any char. not in string Str
+ BRANCH = TREOp (6); // Node Match this alternative, or the next
+ BACK = TREOp (7); // - Jump backward (Next < 0)
+ EXACTLY = TREOp (8); // Str Match string Str
+ NOTHING = TREOp (9); // - Match empty string
+ STAR = TREOp (10); // Node Match this (simple) thing 0 or more times
+ PLUS = TREOp (11); // Node Match this (simple) thing 1 or more times
+ ANYDIGIT = TREOp (12); // - Match any digit (equiv [0-9])
+ NOTDIGIT = TREOp (13); // - Match not digit (equiv [0-9])
+ ANYLETTER = TREOp (14); // - Match any letter from property WordChars
+ NOTLETTER = TREOp (15); // - Match not letter from property WordChars
+ ANYSPACE = TREOp (16); // - Match any space char (see property SpaceChars)
+ NOTSPACE = TREOp (17); // - Match not space char (see property SpaceChars)
+ BRACES = TREOp (18); // Node,Min,Max Match this (simple) thing from Min to Max times.
+ // Min and Max are TREBracesArg
+ COMMENT = TREOp (19); // - Comment ;)
+ EXACTLYCI = TREOp (20); // Str Match string Str case insensitive
+ ANYOFCI = TREOp (21); // Str Match any character in string Str, case insensitive
+ ANYBUTCI = TREOp (22); // Str Match any char. not in string Str, case insensitive
+ LOOPENTRY = TREOp (23); // Node Start of loop (Node - LOOP for this loop)
+ LOOP = TREOp (24); // Node,Min,Max,LoopEntryJmp - back jump for LOOPENTRY.
+ // Min and Max are TREBracesArg
+ // Node - next node in sequence,
+ // LoopEntryJmp - associated LOOPENTRY node addr
+ ANYOFTINYSET= TREOp (25); // Chrs Match any one char from Chrs (exactly TinySetLen chars)
+ ANYBUTTINYSET=TREOp (26); // Chrs Match any one char not in Chrs (exactly TinySetLen chars)
+ ANYOFFULLSET= TREOp (27); // Set Match any one char from set of char
+ // - very fast (one CPU instruction !) but takes 32 bytes of p-code
+ BSUBEXP = TREOp (28); // Idx Match previously matched subexpression #Idx (stored as REChar) //###0.936
+ BSUBEXPCI = TREOp (29); // Idx -"- in case-insensitive mode
+
+ // Non-Greedy Style Ops //###0.940
+ STARNG = TREOp (30); // Same as START but in non-greedy mode
+ PLUSNG = TREOp (31); // Same as PLUS but in non-greedy mode
+ BRACESNG = TREOp (32); // Same as BRACES but in non-greedy mode
+ LOOPNG = TREOp (33); // Same as LOOP but in non-greedy mode
+
+ // Multiline mode \m
+ BOLML = TREOp (34); // - Match "" at beginning of line
+ EOLML = TREOp (35); // - Match "" at end of line
+ ANYML = TREOp (36); // - Match any one character
+
+ // Word boundary
+ BOUND = TREOp (37); // Match "" between words //###0.943
+ NOTBOUND = TREOp (38); // Match "" not between words //###0.943
+
+ // !!! Change OPEN value if you add new opcodes !!!
+
+ OPEN = TREOp (39); // - Mark this point in input as start of \n
+ // OPEN + 1 is \1, etc.
+ CLOSE = TREOp (ord (OPEN) + NSUBEXP);
+ // - Analogous to OPEN.
+
+ // !!! Don't add new OpCodes after CLOSE !!!
+
+// We work with p-code thru pointers, compatible with PRegExprChar.
+// Note: all code components (TRENextOff, TREOp, TREBracesArg, etc)
+// must have lengths that can be divided by SizeOf (REChar) !
+// A node is TREOp of opcode followed Next "pointer" of TRENextOff type.
+// The Next is a offset from the opcode of the node containing it.
+// An operand, if any, simply follows the node. (Note that much of
+// the code generation knows about this implicit relationship!)
+// Using TRENextOff=integer speed up p-code processing.
+
+// Opcodes description:
+//
+// BRANCH The set of branches constituting a single choice are hooked
+// together with their "next" pointers, since precedence prevents
+// anything being concatenated to any individual branch. The
+// "next" pointer of the last BRANCH in a choice points to the
+// thing following the whole choice. This is also where the
+// final "next" pointer of each individual branch points; each
+// branch starts with the operand node of a BRANCH node.
+// BACK Normal "next" pointers all implicitly point forward; BACK
+// exists to make loop structures possible.
+// STAR,PLUS,BRACES '?', and complex '*' and '+', are implemented as
+// circular BRANCH structures using BACK. Complex '{min,max}'
+// - as pair LOOPENTRY-LOOP (see below). Simple cases (one
+// character per match) are implemented with STAR, PLUS and
+// BRACES for speed and to minimize recursive plunges.
+// LOOPENTRY,LOOP {min,max} are implemented as special pair
+// LOOPENTRY-LOOP. Each LOOPENTRY initialize loopstack for
+// current level.
+// OPEN,CLOSE are numbered at compile time.
+
+
+{=============================================================}
+{================== Error handling section ===================}
+{=============================================================}
+
+const
+ reeOk = 0;
+ reeCompNullArgument = 100;
+ reeCompRegexpTooBig = 101;
+ reeCompParseRegTooManyBrackets = 102;
+ reeCompParseRegUnmatchedBrackets = 103;
+ reeCompParseRegUnmatchedBrackets2 = 104;
+ reeCompParseRegJunkOnEnd = 105;
+ reePlusStarOperandCouldBeEmpty = 106;
+ reeNestedSQP = 107;
+ reeBadHexDigit = 108;
+ reeInvalidRange = 109;
+ reeParseAtomTrailingBackSlash = 110;
+ reeNoHexCodeAfterBSlashX = 111;
+ reeHexCodeAfterBSlashXTooBig = 112;
+ reeUnmatchedSqBrackets = 113;
+ reeInternalUrp = 114;
+ reeQPSBFollowsNothing = 115;
+ reeTrailingBackSlash = 116;
+ reeRarseAtomInternalDisaster = 119;
+ reeBRACESArgTooBig = 122;
+ reeBracesMinParamGreaterMax = 124;
+ reeUnclosedComment = 125;
+ reeComplexBracesNotImplemented = 126;
+ reeUrecognizedModifier = 127;
+ reeBadLinePairedSeparator = 128;
+ reeRegRepeatCalledInappropriately = 1000;
+ reeMatchPrimMemoryCorruption = 1001;
+ reeMatchPrimCorruptedPointers = 1002;
+ reeNoExpression = 1003;
+ reeCorruptedProgram = 1004;
+ reeNoInpitStringSpecified = 1005;
+ reeOffsetMustBeGreaterThen0 = 1006;
+ reeExecNextWithoutExec = 1007;
+ reeGetInputStringWithoutInputString = 1008;
+ reeDumpCorruptedOpcode = 1011;
+ reeModifierUnsupported = 1013;
+ reeLoopStackExceeded = 1014;
+ reeLoopWithoutEntry = 1015;
+
+function TRegExpr.ErrorMsg (AErrorID : integer) : RegExprString;
+ begin
+ case AErrorID of
+ reeOk: Result := 'No errors';
+ reeCompNullArgument: Result := 'TRegExpr(comp): Null Argument';
+ reeCompRegexpTooBig: Result := 'TRegExpr(comp): Regexp Too Big';
+ reeCompParseRegTooManyBrackets: Result := 'TRegExpr(comp): ParseReg Too Many ()';
+ reeCompParseRegUnmatchedBrackets: Result := 'TRegExpr(comp): ParseReg Unmatched ()';
+ reeCompParseRegUnmatchedBrackets2: Result := 'TRegExpr(comp): ParseReg Unmatched ()';
+ reeCompParseRegJunkOnEnd: Result := 'TRegExpr(comp): ParseReg Junk On End';
+ reePlusStarOperandCouldBeEmpty: Result := 'TRegExpr(comp): *+ Operand Could Be Empty';
+ reeNestedSQP: Result := 'TRegExpr(comp): Nested *?+';
+ reeBadHexDigit: Result := 'TRegExpr(comp): Bad Hex Digit';
+ reeInvalidRange: Result := 'TRegExpr(comp): Invalid [] Range';
+ reeParseAtomTrailingBackSlash: Result := 'TRegExpr(comp): Parse Atom Trailing \';
+ reeNoHexCodeAfterBSlashX: Result := 'TRegExpr(comp): No Hex Code After \x';
+ reeHexCodeAfterBSlashXTooBig: Result := 'TRegExpr(comp): Hex Code After \x Is Too Big';
+ reeUnmatchedSqBrackets: Result := 'TRegExpr(comp): Unmatched []';
+ reeInternalUrp: Result := 'TRegExpr(comp): Internal Urp';
+ reeQPSBFollowsNothing: Result := 'TRegExpr(comp): ?+*{ Follows Nothing';
+ reeTrailingBackSlash: Result := 'TRegExpr(comp): Trailing \';
+ reeRarseAtomInternalDisaster: Result := 'TRegExpr(comp): RarseAtom Internal Disaster';
+ reeBRACESArgTooBig: Result := 'TRegExpr(comp): BRACES Argument Too Big';
+ reeBracesMinParamGreaterMax: Result := 'TRegExpr(comp): BRACE Min Param Greater then Max';
+ reeUnclosedComment: Result := 'TRegExpr(comp): Unclosed (?#Comment)';
+ reeComplexBracesNotImplemented: Result := 'TRegExpr(comp): If you want take part in beta-testing BRACES ''{min,max}'' and non-greedy ops ''*?'', ''+?'', ''??'' for complex cases - remove ''.'' from {.$DEFINE ComplexBraces}';
+ reeUrecognizedModifier: Result := 'TRegExpr(comp): Urecognized Modifier';
+ reeBadLinePairedSeparator: Result := 'TRegExpr(comp): LinePairedSeparator must countain two different chars or no chars at all';
+
+ reeRegRepeatCalledInappropriately: Result := 'TRegExpr(exec): RegRepeat Called Inappropriately';
+ reeMatchPrimMemoryCorruption: Result := 'TRegExpr(exec): MatchPrim Memory Corruption';
+ reeMatchPrimCorruptedPointers: Result := 'TRegExpr(exec): MatchPrim Corrupted Pointers';
+ reeNoExpression: Result := 'TRegExpr(exec): Not Assigned Expression Property';
+ reeCorruptedProgram: Result := 'TRegExpr(exec): Corrupted Program';
+ reeNoInpitStringSpecified: Result := 'TRegExpr(exec): No Inpit String Specified';
+ reeOffsetMustBeGreaterThen0: Result := 'TRegExpr(exec): Offset Must Be Greater Then 0';
+ reeExecNextWithoutExec: Result := 'TRegExpr(exec): ExecNext Without Exec[Pos]';
+ reeGetInputStringWithoutInputString: Result := 'TRegExpr(exec): GetInputString Without InputString';
+ reeDumpCorruptedOpcode: Result := 'TRegExpr(dump): Corrupted Opcode';
+ reeLoopStackExceeded: Result := 'TRegExpr(exec): Loop Stack Exceeded';
+ reeLoopWithoutEntry: Result := 'TRegExpr(exec): Loop Without LoopEntry !';
+ else Result := 'Unknown error';
+ end;
+ end; { of procedure TRegExpr.Error
+--------------------------------------------------------------}
+
+function TRegExpr.LastError : integer;
+ begin
+ Result := fLastError;
+ fLastError := reeOk;
+ end; { of function TRegExpr.LastError
+--------------------------------------------------------------}
+
+
+{=============================================================}
+{===================== Common section ========================}
+{=============================================================}
+
+class function TRegExpr.VersionMajor : integer; //###0.944
+ begin
+ Result := TRegExprVersionMajor;
+ end; { of class function TRegExpr.VersionMajor
+--------------------------------------------------------------}
+
+class function TRegExpr.VersionMinor : integer; //###0.944
+ begin
+ Result := TRegExprVersionMinor;
+ end; { of class function TRegExpr.VersionMinor
+--------------------------------------------------------------}
+
+constructor TRegExpr.Create;
+ begin
+ inherited;
+ programm := nil;
+ fExpression := nil;
+ fInputString := nil;
+
+ regexpbeg := nil;
+ fExprIsCompiled := false;
+
+ ModifierI := RegExprModifierI;
+ ModifierR := RegExprModifierR;
+ ModifierS := RegExprModifierS;
+ ModifierG := RegExprModifierG;
+ ModifierM := RegExprModifierM; //###0.940
+
+ SpaceChars := RegExprSpaceChars; //###0.927
+ WordChars := RegExprWordChars; //###0.929
+ fInvertCase := RegExprInvertCaseFunction; //###0.927
+
+ fLineSeparators := RegExprLineSeparators; //###0.941
+ LinePairedSeparator := RegExprLinePairedSeparator; //###0.941
+ end; { of constructor TRegExpr.Create
+--------------------------------------------------------------}
+
+destructor TRegExpr.Destroy;
+ begin
+ if programm <> nil
+ then FreeMem (programm);
+ if fExpression <> nil
+ then FreeMem (fExpression);
+ if fInputString <> nil
+ then FreeMem (fInputString);
+ end; { of destructor TRegExpr.Destroy
+--------------------------------------------------------------}
+
+function LoCase (ch: Char): Char;
+begin
+ if CharInSet(ch, ['A'..'Z']) then
+ LoCase := chr(ord(ch) xor 32)
+ else
+ LoCase := ch
+end; { LoCase }
+
+class function TRegExpr.InvertCaseFunction (const Ch : REChar) : REChar;
+ begin
+ {$IFDEF UniCode}
+ if Ch >= #128
+ then Result := Ch
+ else
+ {$ENDIF}
+ begin
+ Result := REChar (UpCase(Ch));
+ if Result = Ch
+ then Result := REChar (LoCase(Ch));
+ end;
+ end; { of function TRegExpr.InvertCaseFunction
+--------------------------------------------------------------}
+
+function TRegExpr.GetExpression : RegExprString;
+ begin
+ if fExpression <> nil
+ then Result := fExpression
+ else Result := '';
+ end; { of function TRegExpr.GetExpression
+--------------------------------------------------------------}
+
+procedure TRegExpr.SetExpression (const s : RegExprString);
+ begin
+ if (s <> fExpression) or not fExprIsCompiled then begin
+ fExprIsCompiled := false;
+ if fExpression <> nil then begin
+ FreeMem (fExpression);
+ fExpression := nil;
+ end;
+ if s <> '' then begin
+ GetMem (fExpression, (length (s) + 1) * SizeOf (REChar));
+ StrPCopy (fExpression, s);
+ InvalidateProgramm; //###0.941
+ end;
+ end;
+ end; { of procedure TRegExpr.SetExpression
+--------------------------------------------------------------}
+
+function TRegExpr.GetSubExprMatchCount : integer;
+ begin
+ if Assigned (fInputString) then begin
+ Result := NSUBEXP - 1;
+ while (Result > 0) and ((startp [Result] = nil)
+ or (endp [Result] = nil))
+ do dec (Result);
+ end
+ else Result := -1;
+ end; { of function TRegExpr.GetSubExprMatchCount
+--------------------------------------------------------------}
+
+function TRegExpr.GetMatchPos (Idx : integer) : integer;
+ begin
+ if (Idx >= 0) and (Idx < NSUBEXP) and Assigned (fInputString)
+ and Assigned (startp [Idx]) and Assigned (endp [Idx]) then begin
+ Result := (startp [Idx] - fInputString) + 1;
+ end
+ else Result := -1;
+ end; { of function TRegExpr.GetMatchPos
+--------------------------------------------------------------}
+
+function TRegExpr.GetMatchLen (Idx : integer) : integer;
+ begin
+ if (Idx >= 0) and (Idx < NSUBEXP) and Assigned (fInputString)
+ and Assigned (startp [Idx]) and Assigned (endp [Idx]) then begin
+ Result := endp [Idx] - startp [Idx];
+ end
+ else Result := -1;
+ end; { of function TRegExpr.GetMatchLen
+--------------------------------------------------------------}
+
+function TRegExpr.GetMatch (Idx : integer) : RegExprString;
+ begin
+ if (Idx >= 0) and (Idx < NSUBEXP) and Assigned (fInputString)
+ and Assigned (startp [Idx]) and Assigned (endp [Idx])
+ //then Result := copy (fInputString, MatchPos [Idx], MatchLen [Idx]) //###0.929
+ then SetString (Result, startp [idx], endp [idx] - startp [idx])
+ else Result := '';
+ end; { of function TRegExpr.GetMatch
+--------------------------------------------------------------}
+
+function TRegExpr.GetModifierStr : RegExprString;
+ begin
+ Result := '-';
+
+ if ModifierI
+ then Result := 'i' + Result
+ else Result := Result + 'i';
+ if ModifierR
+ then Result := 'r' + Result
+ else Result := Result + 'r';
+ if ModifierS
+ then Result := 's' + Result
+ else Result := Result + 's';
+ if ModifierG
+ then Result := 'g' + Result
+ else Result := Result + 'g';
+ if ModifierM
+ then Result := 'm' + Result
+ else Result := Result + 'm';
+ if ModifierX
+ then Result := 'x' + Result
+ else Result := Result + 'x';
+
+ if Result [length (Result)] = '-' // remove '-' if all modifiers are 'On'
+ then System.Delete (Result, length (Result), 1);
+ end; { of function TRegExpr.GetModifierStr
+--------------------------------------------------------------}
+
+class function TRegExpr.ParseModifiersStr (const AModifiers : RegExprString;
+var AModifiersInt : integer) : boolean;
+// !!! Be carefull - this is class function and must not use object instance fields
+ var
+ i : integer;
+ IsOn : boolean;
+ Mask : integer;
+ begin
+ Result := true;
+ IsOn := true;
+ Mask := 0; // prevent compiler warning
+ for i := 1 to length (AModifiers) do
+ if AModifiers [i] = '-'
+ then IsOn := false
+ else begin
+ if Pos (AModifiers [i], 'iI') > 0
+ then Mask := MaskModI
+ else if Pos (AModifiers [i], 'rR') > 0
+ then Mask := MaskModR
+ else if Pos (AModifiers [i], 'sS') > 0
+ then Mask := MaskModS
+ else if Pos (AModifiers [i], 'gG') > 0
+ then Mask := MaskModG
+ else if Pos (AModifiers [i], 'mM') > 0
+ then Mask := MaskModM
+ else if Pos (AModifiers [i], 'xX') > 0
+ then Mask := MaskModX
+ else begin
+ Result := false;
+ EXIT;
+ end;
+ if IsOn
+ then AModifiersInt := AModifiersInt or Mask
+ else AModifiersInt := AModifiersInt and not Mask;
+ end;
+ end; { of function TRegExpr.ParseModifiersStr
+--------------------------------------------------------------}
+
+procedure TRegExpr.SetModifierStr (const AModifiers : RegExprString);
+ begin
+ if not ParseModifiersStr (AModifiers, fModifiers)
+ then Error (reeModifierUnsupported);
+ end; { of procedure TRegExpr.SetModifierStr
+--------------------------------------------------------------}
+
+function TRegExpr.GetModifier (AIndex : integer) : boolean;
+ var
+ Mask : integer;
+ begin
+ Result := false;
+ case AIndex of
+ 1: Mask := MaskModI;
+ 2: Mask := MaskModR;
+ 3: Mask := MaskModS;
+ 4: Mask := MaskModG;
+ 5: Mask := MaskModM;
+ 6: Mask := MaskModX;
+ else begin
+ Error (reeModifierUnsupported);
+ EXIT;
+ end;
+ end;
+ Result := (fModifiers and Mask) <> 0;
+ end; { of function TRegExpr.GetModifier
+--------------------------------------------------------------}
+
+procedure TRegExpr.SetModifier (AIndex : integer; ASet : boolean);
+ var
+ Mask : integer;
+ begin
+ case AIndex of
+ 1: Mask := MaskModI;
+ 2: Mask := MaskModR;
+ 3: Mask := MaskModS;
+ 4: Mask := MaskModG;
+ 5: Mask := MaskModM;
+ 6: Mask := MaskModX;
+ else begin
+ Error (reeModifierUnsupported);
+ EXIT;
+ end;
+ end;
+ if ASet
+ then fModifiers := fModifiers or Mask
+ else fModifiers := fModifiers and not Mask;
+ end; { of procedure TRegExpr.SetModifier
+--------------------------------------------------------------}
+
+
+{=============================================================}
+{==================== Compiler section =======================}
+{=============================================================}
+
+procedure TRegExpr.InvalidateProgramm;
+ begin
+ if programm <> nil then begin
+ FreeMem (programm);
+ programm := nil;
+ end;
+ end; { of procedure TRegExpr.InvalidateProgramm
+--------------------------------------------------------------}
+
+procedure TRegExpr.Compile; //###0.941
+ begin
+ if fExpression = nil then begin // No Expression assigned
+ Error (reeNoExpression);
+ EXIT;
+ end;
+ CompileRegExpr (fExpression);
+ end; { of procedure TRegExpr.Compile
+--------------------------------------------------------------}
+
+function TRegExpr.IsProgrammOk : boolean;
+ {$IFNDEF UniCode}
+ var
+ i : integer;
+ {$ENDIF}
+ begin
+ Result := false;
+
+ // check modifiers
+ if fModifiers <> fProgModifiers //###0.941
+ then InvalidateProgramm;
+
+ // can we optimize line separators by using sets?
+ {$IFNDEF UniCode}
+ fLineSeparatorsSet := [];
+ for i := 1 to length (fLineSeparators)
+ do System.Include (fLineSeparatorsSet, fLineSeparators [i]);
+ {$ENDIF}
+
+ // [Re]compile if needed
+ if programm = nil
+ then Compile; //###0.941
+
+ // check [re]compiled programm
+ if programm = nil
+ then EXIT // error was set/raised by Compile (was reeExecAfterCompErr)
+ else if programm [0] <> MAGIC // Program corrupted.
+ then Error (reeCorruptedProgram)
+ else Result := true;
+ end; { of function TRegExpr.IsProgrammOk
+--------------------------------------------------------------}
+
+procedure TRegExpr.Tail (p : PRegExprChar; val : PRegExprChar);
+// set the next-pointer at the end of a node chain
+ var
+ scan : PRegExprChar;
+ temp : PRegExprChar;
+ begin
+ if p = @regdummy
+ then EXIT;
+ // Find last node.
+ scan := p;
+ REPEAT
+ temp := regnext (scan);
+ if temp = nil
+ then BREAK;
+ scan := temp;
+ UNTIL false;
+ // Set Next 'pointer'
+ PRENextOff (scan + REOpSz)^ := val - scan; //###0.933
+ end; { of procedure TRegExpr.Tail
+--------------------------------------------------------------}
+
+procedure TRegExpr.OpTail (p : PRegExprChar; val : PRegExprChar);
+// regtail on operand of first argument; nop if operandless
+ begin
+ // "Operandless" and "op != BRANCH" are synonymous in practice.
+ if (p = nil) or (p = @regdummy) or (PREOp (p)^ <> BRANCH)
+ then EXIT;
+ Tail (p + REOpSz + RENextOffSz, val); //###0.933
+ end; { of procedure TRegExpr.OpTail
+--------------------------------------------------------------}
+
+function TRegExpr.EmitNode (op : TREOp) : PRegExprChar; //###0.933
+// emit a node, return location
+ begin
+ Result := regcode;
+ if Result <> @regdummy then begin
+ PREOp (regcode)^ := op;
+ inc (regcode, REOpSz);
+ PRENextOff (regcode)^ := 0; // Next "pointer" := nil
+ inc (regcode, RENextOffSz);
+ end
+ else inc (regsize, REOpSz + RENextOffSz); // compute code size without code generation
+ end; { of function TRegExpr.EmitNode
+--------------------------------------------------------------}
+
+procedure TRegExpr.EmitC (b : REChar);
+// emit a byte to code
+ begin
+ if regcode <> @regdummy then begin
+ regcode^ := b;
+ inc (regcode);
+ end
+ else inc (regsize); // Type of p-code pointer always is ^REChar
+ end; { of procedure TRegExpr.EmitC
+--------------------------------------------------------------}
+
+procedure TRegExpr.InsertOperator (op : TREOp; opnd : PRegExprChar; sz : integer);
+// insert an operator in front of already-emitted operand
+// Means relocating the operand.
+ var
+ src, dst, place : PRegExprChar;
+ i : integer;
+ begin
+ if regcode = @regdummy then begin
+ inc (regsize, sz);
+ EXIT;
+ end;
+ src := regcode;
+ inc (regcode, sz);
+ dst := regcode;
+ while src > opnd do begin
+ dec (dst);
+ dec (src);
+ dst^ := src^;
+ end;
+ place := opnd; // Op node, where operand used to be.
+ PREOp (place)^ := op;
+ inc (place, REOpSz);
+ for i := 1 + REOpSz to sz do begin
+ place^ := #0;
+ inc (place);
+ end;
+ end; { of procedure TRegExpr.InsertOperator
+--------------------------------------------------------------}
+
+function strcspn (s1 : PRegExprChar; s2 : PRegExprChar) : integer;
+// find length of initial segment of s1 consisting
+// entirely of characters not from s2
+ var scan1, scan2 : PRegExprChar;
+ begin
+ Result := 0;
+ scan1 := s1;
+ while scan1^ <> #0 do begin
+ scan2 := s2;
+ while scan2^ <> #0 do
+ if scan1^ = scan2^
+ then EXIT
+ else inc (scan2);
+ inc (Result);
+ inc (scan1)
+ end;
+ end; { of function strcspn
+--------------------------------------------------------------}
+
+const
+// Flags to be passed up and down.
+ HASWIDTH = 01; // Known never to match nil string.
+ SIMPLE = 02; // Simple enough to be STAR/PLUS/BRACES operand.
+ SPSTART = 04; // Starts with * or +.
+ WORST = 0; // Worst case.
+ META : array [0 .. 12] of REChar = (
+ '^', '$', '.', '[', '(', ')', '|', '?', '+', '*', '\', '{', #0);
+ // Any modification must be synchronized with QuoteRegExprMetaChars !!!
+
+{$IFDEF UniCode}
+ RusRangeLo : array [0 .. 33] of REChar =
+ (#$430,#$431,#$432,#$433,#$434,#$435,#$451,#$436,#$437,
+ #$438,#$439,#$43A,#$43B,#$43C,#$43D,#$43E,#$43F,
+ #$440,#$441,#$442,#$443,#$444,#$445,#$446,#$447,
+ #$448,#$449,#$44A,#$44B,#$44C,#$44D,#$44E,#$44F,#0);
+ RusRangeHi : array [0 .. 33] of REChar =
+ (#$410,#$411,#$412,#$413,#$414,#$415,#$401,#$416,#$417,
+ #$418,#$419,#$41A,#$41B,#$41C,#$41D,#$41E,#$41F,
+ #$420,#$421,#$422,#$423,#$424,#$425,#$426,#$427,
+ #$428,#$429,#$42A,#$42B,#$42C,#$42D,#$42E,#$42F,#0);
+ RusRangeLoLow = #$430{'à'};
+ RusRangeLoHigh = #$44F{'ÿ'};
+ RusRangeHiLow = #$410{'À'};
+ RusRangeHiHigh = #$42F{'ß'};
+{$ELSE}
+ RusRangeLo = 'àáâãä叿çèéêëìíîïðñòóôõö÷øùúûüýþÿ';
+ RusRangeHi = 'ÀÁÂÃÄŨÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞß';
+ RusRangeLoLow = 'à';
+ RusRangeLoHigh = 'ÿ';
+ RusRangeHiLow = 'À';
+ RusRangeHiHigh = 'ß';
+{$ENDIF}
+
+function TRegExpr.CompileRegExpr (exp : PRegExprChar) : boolean;
+// compile a regular expression into internal code
+// We can't allocate space until we know how big the compiled form will be,
+// but we can't compile it (and thus know how big it is) until we've got a
+// place to put the code. So we cheat: we compile it twice, once with code
+// generation turned off and size counting turned on, and once "for real".
+// This also means that we don't allocate space until we are sure that the
+// thing really will compile successfully, and we never have to move the
+// code and thus invalidate pointers into it. (Note that it has to be in
+// one piece because free() must be able to free it all.)
+// Beware that the optimization-preparation code in here knows about some
+// of the structure of the compiled regexp.
+ var
+ scan, longest : PRegExprChar;
+ len : cardinal;
+ flags : integer;
+ begin
+ Result := false; // life too dark
+
+ regparse := nil; // for correct error handling
+ regexpbeg := exp;
+ try
+
+ if programm <> nil then begin
+ FreeMem (programm);
+ programm := nil;
+ end;
+
+ if exp = nil then begin
+ Error (reeCompNullArgument);
+ EXIT;
+ end;
+
+ fProgModifiers := fModifiers;
+ // well, may it's paranoia. I'll check it later... !!!!!!!!
+
+ // First pass: determine size, legality.
+ fCompModifiers := fModifiers;
+ regparse := exp;
+ regnpar := 1;
+ regsize := 0;
+ regcode := @regdummy;
+ EmitC (MAGIC);
+ if ParseReg (0, flags) = nil
+ then EXIT;
+
+ // Small enough for 2-bytes programm pointers ?
+ // ###0.933 no real p-code length limits now :)))
+// if regsize >= 64 * 1024 then begin
+// Error (reeCompRegexpTooBig);
+// EXIT;
+// end;
+
+ // Allocate space.
+ GetMem (programm, regsize * SizeOf (REChar));
+
+ // Second pass: emit code.
+ fCompModifiers := fModifiers;
+ regparse := exp;
+ regnpar := 1;
+ regcode := programm;
+ EmitC (MAGIC);
+ if ParseReg (0, flags) = nil
+ then EXIT;
+
+ // Dig out information for optimizations.
+ {$IFDEF UseFirstCharSet} //###0.929
+ FirstCharSet := [];
+ FillFirstCharSet (programm + REOpSz);
+ {$ENDIF}
+ regstart := #0; // Worst-case defaults.
+ reganch := #0;
+ regmust := nil;
+ regmlen := 0;
+ scan := programm + REOpSz; // First BRANCH.
+ if PREOp (regnext (scan))^ = EEND then begin // Only one top-level choice.
+ scan := scan + REOpSz + RENextOffSz;
+
+ // Starting-point info.
+ if PREOp (scan)^ = EXACTLY
+ then regstart := (scan + REOpSz + RENextOffSz)^
+ else if PREOp (scan)^ = BOL
+ then inc (reganch);
+
+ // If there's something expensive in the r.e., find the longest
+ // literal string that must appear and make it the regmust. Resolve
+ // ties in favor of later strings, since the regstart check works
+ // with the beginning of the r.e. and avoiding duplication
+ // strengthens checking. Not a strong reason, but sufficient in the
+ // absence of others.
+ if (flags and SPSTART) <> 0 then begin
+ longest := nil;
+ len := 0;
+ while scan <> nil do begin
+ if (PREOp (scan)^ = EXACTLY)
+ and (strlen (scan + REOpSz + RENextOffSz) >= len) then begin
+ longest := scan + REOpSz + RENextOffSz;
+ len := strlen (longest);
+ end;
+ scan := regnext (scan);
+ end;
+ regmust := longest;
+ regmlen := len;
+ end;
+ end;
+
+ Result := true;
+
+ finally begin
+ if not Result
+ then InvalidateProgramm;
+ regexpbeg := nil;
+ fExprIsCompiled := Result; //###0.944
+ end;
+ end;
+
+ end; { of function TRegExpr.CompileRegExpr
+--------------------------------------------------------------}
+
+function TRegExpr.ParseReg (paren : integer; var flagp : integer) : PRegExprChar;
+// regular expression, i.e. main body or parenthesized thing
+// Caller must absorb opening parenthesis.
+// Combining parenthesis handling with the base level of regular expression
+// is a trifle forced, but the need to tie the tails of the branches to what
+// follows makes it hard to avoid.
+ var
+ ret, br, ender : PRegExprChar;
+ parno : integer;
+ flags : integer;
+ SavedModifiers : integer;
+ begin
+ Result := nil;
+ flagp := HASWIDTH; // Tentatively.
+ parno := 0; // eliminate compiler stupid warning
+ SavedModifiers := fCompModifiers;
+
+ // Make an OPEN node, if parenthesized.
+ if paren <> 0 then begin
+ if regnpar >= NSUBEXP then begin
+ Error (reeCompParseRegTooManyBrackets);
+ EXIT;
+ end;
+ parno := regnpar;
+ inc (regnpar);
+ ret := EmitNode (TREOp (ord (OPEN) + parno));
+ end
+ else ret := nil;
+
+ // Pick up the branches, linking them together.
+ br := ParseBranch (flags);
+ if br = nil then begin
+ Result := nil;
+ EXIT;
+ end;
+ if ret <> nil
+ then Tail (ret, br) // OPEN -> first.
+ else ret := br;
+ if (flags and HASWIDTH) = 0
+ then flagp := flagp and not HASWIDTH;
+ flagp := flagp or flags and SPSTART;
+ while (regparse^ = '|') do begin
+ inc (regparse);
+ br := ParseBranch (flags);
+ if br = nil then begin
+ Result := nil;
+ EXIT;
+ end;
+ Tail (ret, br); // BRANCH -> BRANCH.
+ if (flags and HASWIDTH) = 0
+ then flagp := flagp and not HASWIDTH;
+ flagp := flagp or flags and SPSTART;
+ end;
+
+ // Make a closing node, and hook it on the end.
+ if paren <> 0
+ then ender := EmitNode (TREOp (ord (CLOSE) + parno))
+ else ender := EmitNode (EEND);
+ Tail (ret, ender);
+
+ // Hook the tails of the branches to the closing node.
+ br := ret;
+ while br <> nil do begin
+ OpTail (br, ender);
+ br := regnext (br);
+ end;
+
+ // Check for proper termination.
+ if paren <> 0 then
+ if regparse^ <> ')' then begin
+ Error (reeCompParseRegUnmatchedBrackets);
+ EXIT;
+ end
+ else inc (regparse); // skip trailing ')'
+ if (paren = 0) and (regparse^ <> #0) then begin
+ if regparse^ = ')'
+ then Error (reeCompParseRegUnmatchedBrackets2)
+ else Error (reeCompParseRegJunkOnEnd);
+ EXIT;
+ end;
+ fCompModifiers := SavedModifiers; // restore modifiers of parent
+ Result := ret;
+ end; { of function TRegExpr.ParseReg
+--------------------------------------------------------------}
+
+function TRegExpr.ParseBranch (var flagp : integer) : PRegExprChar;
+// one alternative of an | operator
+// Implements the concatenation operator.
+ var
+ ret, chain, latest : PRegExprChar;
+ flags : integer;
+ begin
+ flagp := WORST; // Tentatively.
+
+ ret := EmitNode (BRANCH);
+ chain := nil;
+ while (regparse^ <> #0) and (regparse^ <> '|')
+ and (regparse^ <> ')') do begin
+ latest := ParsePiece (flags);
+ if latest = nil then begin
+ Result := nil;
+ EXIT;
+ end;
+ flagp := flagp or flags and HASWIDTH;
+ if chain = nil // First piece.
+ then flagp := flagp or flags and SPSTART
+ else Tail (chain, latest);
+ chain := latest;
+ end;
+ if chain = nil // Loop ran zero times.
+ then EmitNode (NOTHING);
+ Result := ret;
+ end; { of function TRegExpr.ParseBranch
+--------------------------------------------------------------}
+
+function TRegExpr.ParsePiece (var flagp : integer) : PRegExprChar;
+// something followed by possible [*+?{]
+// Note that the branching code sequences used for ? and the general cases
+// of * and + and { are somewhat optimized: they use the same NOTHING node as
+// both the endmarker for their branch list and the body of the last branch.
+// It might seem that this node could be dispensed with entirely, but the
+// endmarker role is not redundant.
+ function parsenum (AStart, AEnd : PRegExprChar) : TREBracesArg;
+ begin
+ Result := 0;
+ if AEnd - AStart + 1 > 8 then begin // prevent stupid scanning
+ Error (reeBRACESArgTooBig);
+ EXIT;
+ end;
+ while AStart <= AEnd do begin
+ Result := Result * 10 + (ord (AStart^) - ord ('0'));
+ inc (AStart);
+ end;
+ if (Result > MaxBracesArg) or (Result < 0) then begin
+ Error (reeBRACESArgTooBig);
+ EXIT;
+ end;
+ end;
+
+ var
+ op : REChar;
+ NonGreedyOp, NonGreedyCh : boolean; //###0.940
+ TheOp : TREOp; //###0.940
+ NextNode : PRegExprChar;
+ flags : integer;
+ BracesMin, Bracesmax : TREBracesArg;
+ p, savedparse : PRegExprChar;
+
+ procedure EmitComplexBraces (ABracesMin, ABracesMax : TREBracesArg;
+ ANonGreedyOp : boolean); //###0.940
+ {$IFDEF ComplexBraces}
+ var
+ off : integer;
+ {$ENDIF}
+ begin
+ {$IFNDEF ComplexBraces}
+ Error (reeComplexBracesNotImplemented);
+ {$ELSE}
+ if ANonGreedyOp
+ then TheOp := LOOPNG
+ else TheOp := LOOP;
+ InsertOperator (LOOPENTRY, Result, REOpSz + RENextOffSz);
+ NextNode := EmitNode (TheOp);
+ if regcode <> @regdummy then begin
+ off := (Result + REOpSz + RENextOffSz)
+ - (regcode - REOpSz - RENextOffSz); // back to Atom after LOOPENTRY
+ PREBracesArg (regcode)^ := ABracesMin;
+ inc (regcode, REBracesArgSz);
+ PREBracesArg (regcode)^ := ABracesMax;
+ inc (regcode, REBracesArgSz);
+ PRENextOff (regcode)^ := off;
+ inc (regcode, RENextOffSz);
+ end
+ else inc (regsize, REBracesArgSz * 2 + RENextOffSz);
+ Tail (Result, NextNode); // LOOPENTRY -> LOOP
+ if regcode <> @regdummy then
+ Tail (Result + REOpSz + RENextOffSz, NextNode); // Atom -> LOOP
+ {$ENDIF}
+ end;
+
+ procedure EmitSimpleBraces (ABracesMin, ABracesMax : TREBracesArg;
+ ANonGreedyOp : boolean); //###0.940
+ begin
+ if ANonGreedyOp //###0.940
+ then TheOp := BRACESNG
+ else TheOp := BRACES;
+ InsertOperator (TheOp, Result, REOpSz + RENextOffSz + REBracesArgSz * 2);
+ if regcode <> @regdummy then begin
+ PREBracesArg (Result + REOpSz + RENextOffSz)^ := ABracesMin;
+ PREBracesArg (Result + REOpSz + RENextOffSz + REBracesArgSz)^ := ABracesMax;
+ end;
+ end;
+
+ begin
+ Result := ParseAtom (flags);
+ if Result = nil
+ then EXIT;
+
+ op := regparse^;
+ if not ((op = '*') or (op = '+') or (op = '?') or (op = '{')) then begin
+ flagp := flags;
+ EXIT;
+ end;
+ if ((flags and HASWIDTH) = 0) and (op <> '?') then begin
+ Error (reePlusStarOperandCouldBeEmpty);
+ EXIT;
+ end;
+
+ case op of
+ '*': begin
+ flagp := WORST or SPSTART;
+ NonGreedyCh := (regparse + 1)^ = '?'; //###0.940
+ NonGreedyOp := NonGreedyCh or ((fCompModifiers and MaskModG) = 0); //###0.940
+ if (flags and SIMPLE) = 0 then begin
+ if NonGreedyOp //###0.940
+ then EmitComplexBraces (0, MaxBracesArg, NonGreedyOp)
+ else begin // Emit x* as (x&|), where & means "self".
+ InsertOperator (BRANCH, Result, REOpSz + RENextOffSz); // Either x
+ OpTail (Result, EmitNode (BACK)); // and loop
+ OpTail (Result, Result); // back
+ Tail (Result, EmitNode (BRANCH)); // or
+ Tail (Result, EmitNode (NOTHING)); // nil.
+ end
+ end
+ else begin // Simple
+ if NonGreedyOp //###0.940
+ then TheOp := STARNG
+ else TheOp := STAR;
+ InsertOperator (TheOp, Result, REOpSz + RENextOffSz);
+ end;
+ if NonGreedyCh //###0.940
+ then inc (regparse); // Skip extra char ('?')
+ end; { of case '*'}
+ '+': begin
+ flagp := WORST or SPSTART or HASWIDTH;
+ NonGreedyCh := (regparse + 1)^ = '?'; //###0.940
+ NonGreedyOp := NonGreedyCh or ((fCompModifiers and MaskModG) = 0); //###0.940
+ if (flags and SIMPLE) = 0 then begin
+ if NonGreedyOp //###0.940
+ then EmitComplexBraces (1, MaxBracesArg, NonGreedyOp)
+ else begin // Emit x+ as x(&|), where & means "self".
+ NextNode := EmitNode (BRANCH); // Either
+ Tail (Result, NextNode);
+ Tail (EmitNode (BACK), Result); // loop back
+ Tail (NextNode, EmitNode (BRANCH)); // or
+ Tail (Result, EmitNode (NOTHING)); // nil.
+ end
+ end
+ else begin // Simple
+ if NonGreedyOp //###0.940
+ then TheOp := PLUSNG
+ else TheOp := PLUS;
+ InsertOperator (TheOp, Result, REOpSz + RENextOffSz);
+ end;
+ if NonGreedyCh //###0.940
+ then inc (regparse); // Skip extra char ('?')
+ end; { of case '+'}
+ '?': begin
+ flagp := WORST;
+ NonGreedyCh := (regparse + 1)^ = '?'; //###0.940
+ NonGreedyOp := NonGreedyCh or ((fCompModifiers and MaskModG) = 0); //###0.940
+ if NonGreedyOp then begin //###0.940 // We emit x?? as x{0,1}?
+ if (flags and SIMPLE) = 0
+ then EmitComplexBraces (0, 1, NonGreedyOp)
+ else EmitSimpleBraces (0, 1, NonGreedyOp);
+ end
+ else begin // greedy '?'
+ InsertOperator (BRANCH, Result, REOpSz + RENextOffSz); // Either x
+ Tail (Result, EmitNode (BRANCH)); // or
+ NextNode := EmitNode (NOTHING); // nil.
+ Tail (Result, NextNode);
+ OpTail (Result, NextNode);
+ end;
+ if NonGreedyCh //###0.940
+ then inc (regparse); // Skip extra char ('?')
+ end; { of case '?'}
+ '{': begin
+ savedparse := regparse;
+ // !!!!!!!!!!!!
+ // Filip Jirsak's note - what will happen, when we are at the end of regparse?
+ inc (regparse);
+ p := regparse;
+ while Pos (regparse^, '0123456789') > 0 // MUST appear
+ do inc (regparse);
+ if (regparse^ <> '}') and (regparse^ <> ',') or (p = regparse) then begin
+ regparse := savedparse;
+ flagp := flags;
+ EXIT;
+ end;
+ BracesMin := parsenum (p, regparse - 1);
+ if regparse^ = ',' then begin
+ inc (regparse);
+ p := regparse;
+ while Pos (regparse^, '0123456789') > 0
+ do inc (regparse);
+ if regparse^ <> '}' then begin
+ regparse := savedparse;
+ EXIT;
+ end;
+ if p = regparse
+ then BracesMax := MaxBracesArg
+ else BracesMax := parsenum (p, regparse - 1);
+ end
+ else BracesMax := BracesMin; // {n} == {n,n}
+ if BracesMin > BracesMax then begin
+ Error (reeBracesMinParamGreaterMax);
+ EXIT;
+ end;
+ if BracesMin > 0
+ then flagp := WORST;
+ if BracesMax > 0
+ then flagp := flagp or HASWIDTH or SPSTART;
+
+ NonGreedyCh := (regparse + 1)^ = '?'; //###0.940
+ NonGreedyOp := NonGreedyCh or ((fCompModifiers and MaskModG) = 0); //###0.940
+ if (flags and SIMPLE) <> 0
+ then EmitSimpleBraces (BracesMin, BracesMax, NonGreedyOp)
+ else EmitComplexBraces (BracesMin, BracesMax, NonGreedyOp);
+ if NonGreedyCh //###0.940
+ then inc (regparse); // Skip extra char '?'
+ end; // of case '{'
+// else // here we can't be
+ end; { of case op}
+
+ inc (regparse);
+ if (regparse^ = '*') or (regparse^ = '+') or (regparse^ = '?') or (regparse^ = '{') then begin
+ Error (reeNestedSQP);
+ EXIT;
+ end;
+ end; { of function TRegExpr.ParsePiece
+--------------------------------------------------------------}
+
+function TRegExpr.ParseAtom (var flagp : integer) : PRegExprChar;
+// the lowest level
+// Optimization: gobbles an entire sequence of ordinary characters so that
+// it can turn them into a single node, which is smaller to store and
+// faster to run. Backslashed characters are exceptions, each becoming a
+// separate node; the code is simpler that way and it's not worth fixing.
+ var
+ ret : PRegExprChar;
+ flags : integer;
+ RangeBeg, RangeEnd : REChar;
+ CanBeRange : boolean;
+ len : integer;
+ ender : REChar;
+ begmodfs : PRegExprChar;
+
+ {$IFDEF UseSetOfChar} //###0.930
+ RangePCodeBeg : PRegExprChar;
+ RangePCodeIdx : integer;
+ RangeIsCI : boolean;
+ RangeSet : TSetOfREChar;
+ RangeLen : integer;
+ RangeChMin, RangeChMax : REChar;
+ {$ENDIF}
+
+ procedure EmitExactly (ch : REChar);
+ begin
+ if (fCompModifiers and MaskModI) <> 0
+ then ret := EmitNode (EXACTLYCI)
+ else ret := EmitNode (EXACTLY);
+ EmitC (ch);
+ EmitC (#0);
+ flagp := flagp or HASWIDTH or SIMPLE;
+ end;
+
+ procedure EmitStr (const s : RegExprString);
+ var i : integer;
+ begin
+ for i := 1 to length (s)
+ do EmitC (s [i]);
+ end;
+
+ function HexDig (ch : REChar) : integer;
+ begin
+ Result := 0;
+ if (ch >= 'a') and (ch <= 'f')
+ then ch := REChar (ord (ch) - (ord ('a') - ord ('A')));
+ if (ch < '0') or (ch > 'F') or ((ch > '9') and (ch < 'A')) then begin
+ Error (reeBadHexDigit);
+ EXIT;
+ end;
+ Result := ord (ch) - ord ('0');
+ if ch >= 'A'
+ then Result := Result - (ord ('A') - ord ('9') - 1);
+ end;
+
+ function EmitRange (AOpCode : REChar) : PRegExprChar;
+ begin
+ {$IFDEF UseSetOfChar}
+ case AOpCode of
+ ANYBUTCI, ANYBUT:
+ Result := EmitNode (ANYBUTTINYSET);
+ else // ANYOFCI, ANYOF
+ Result := EmitNode (ANYOFTINYSET);
+ end;
+ case AOpCode of
+ ANYBUTCI, ANYOFCI:
+ RangeIsCI := True;
+ else // ANYBUT, ANYOF
+ RangeIsCI := False;
+ end;
+ RangePCodeBeg := regcode;
+ RangePCodeIdx := regsize;
+ RangeLen := 0;
+ RangeSet := [];
+ RangeChMin := #255;
+ RangeChMax := #0;
+ {$ELSE}
+ Result := EmitNode (AOpCode);
+ // ToDo:
+ // !!!!!!!!!!!!! Implement ANYOF[BUT]TINYSET generation for UniCode !!!!!!!!!!
+ {$ENDIF}
+ end;
+
+{$IFDEF UseSetOfChar}
+ procedure EmitRangeCPrim (b : REChar); //###0.930
+ begin
+ if b in RangeSet
+ then EXIT;
+ inc (RangeLen);
+ if b < RangeChMin
+ then RangeChMin := b;
+ if b > RangeChMax
+ then RangeChMax := b;
+ Include (RangeSet, b);
+ end;
+ {$ENDIF}
+
+ procedure EmitRangeC (b : REChar);
+ {$IFDEF UseSetOfChar}
+ var
+ Ch : REChar;
+ {$ENDIF}
+ begin
+ CanBeRange := false;
+ {$IFDEF UseSetOfChar}
+ if b <> #0 then begin
+ EmitRangeCPrim (b); //###0.930
+ if RangeIsCI
+ then EmitRangeCPrim (InvertCase (b)); //###0.930
+ end
+ else begin
+ Assert (RangeLen > 0, 'TRegExpr.ParseAtom(subroutine EmitRangeC): empty range'); // impossible, but who knows..
+ Assert (RangeChMin <= RangeChMax, 'TRegExpr.ParseAtom(subroutine EmitRangeC): RangeChMin > RangeChMax'); // impossible, but who knows..
+ if RangeLen <= TinySetLen then begin // emit "tiny set"
+ if regcode = @regdummy then begin
+ regsize := RangePCodeIdx + TinySetLen; // RangeChMin/Max !!!
+ EXIT;
+ end;
+ regcode := RangePCodeBeg;
+ for Ch := RangeChMin to RangeChMax do //###0.930
+ if Ch in RangeSet then begin
+ regcode^ := Ch;
+ inc (regcode);
+ end;
+ // fill rest:
+ while regcode < RangePCodeBeg + TinySetLen do begin
+ regcode^ := RangeChMax;
+ inc (regcode);
+ end;
+ end
+ else begin
+ if regcode = @regdummy then begin
+ regsize := RangePCodeIdx + SizeOf (TSetOfREChar);
+ EXIT;
+ end;
+ if (RangePCodeBeg - REOpSz - RENextOffSz)^ = ANYBUTTINYSET
+ then RangeSet := [#0 .. #255] - RangeSet;
+ PREOp (RangePCodeBeg - REOpSz - RENextOffSz)^ := ANYOFFULLSET;
+ regcode := RangePCodeBeg;
+ Move (RangeSet, regcode^, SizeOf (TSetOfREChar));
+ inc (regcode, SizeOf (TSetOfREChar));
+ end;
+ end;
+ {$ELSE}
+ EmitC (b);
+ {$ENDIF}
+ end;
+
+ procedure EmitSimpleRangeC (b : REChar);
+ begin
+ RangeBeg := b;
+ EmitRangeC (b);
+ CanBeRange := true;
+ end;
+
+ procedure EmitRangeStr (const s : RegExprString);
+ var i : integer;
+ begin
+ for i := 1 to length (s)
+ do EmitRangeC (s [i]);
+ end;
+
+ function UnQuoteChar (var APtr : PRegExprChar) : REChar; //###0.934
+ begin
+ case APtr^ of
+ 't': Result := #$9; // tab (HT/TAB)
+ 'n': Result := #$a; // newline (NL)
+ 'r': Result := #$d; // car.return (CR)
+ 'f': Result := #$c; // form feed (FF)
+ 'a': Result := #$7; // alarm (bell) (BEL)
+ 'e': Result := #$1b; // escape (ESC)
+ 'x': begin // hex char
+ Result := #0;
+ inc (APtr);
+ if APtr^ = #0 then begin
+ Error (reeNoHexCodeAfterBSlashX);
+ EXIT;
+ end;
+ if APtr^ = '{' then begin // \x{nnnn} //###0.936
+ REPEAT
+ inc (APtr);
+ if APtr^ = #0 then begin
+ Error (reeNoHexCodeAfterBSlashX);
+ EXIT;
+ end;
+ if APtr^ <> '}' then begin
+ if (Ord (Result)
+ ShR (SizeOf (REChar) * 8 - 4)) and $F <> 0 then begin
+ Error (reeHexCodeAfterBSlashXTooBig);
+ EXIT;
+ end;
+ Result := REChar ((Ord (Result) ShL 4) or HexDig (APtr^));
+ // HexDig will cause Error if bad hex digit found
+ end
+ else BREAK;
+ UNTIL False;
+ end
+ else begin
+ Result := REChar (HexDig (APtr^));
+ // HexDig will cause Error if bad hex digit found
+ inc (APtr);
+ if APtr^ = #0 then begin
+ Error (reeNoHexCodeAfterBSlashX);
+ EXIT;
+ end;
+ Result := REChar ((Ord (Result) ShL 4) or HexDig (APtr^));
+ // HexDig will cause Error if bad hex digit found
+ end;
+ end;
+ else Result := APtr^;
+ end;
+ end;
+
+ begin
+ Result := nil;
+ flagp := WORST; // Tentatively.
+
+ inc (regparse);
+ case (regparse - 1)^ of
+ '^': if ((fCompModifiers and MaskModM) = 0)
+ or ((fLineSeparators = '') and not fLinePairedSeparatorAssigned)
+ then ret := EmitNode (BOL)
+ else ret := EmitNode (BOLML);
+ '$': if ((fCompModifiers and MaskModM) = 0)
+ or ((fLineSeparators = '') and not fLinePairedSeparatorAssigned)
+ then ret := EmitNode (EOL)
+ else ret := EmitNode (EOLML);
+ '.':
+ if (fCompModifiers and MaskModS) <> 0 then begin
+ ret := EmitNode (ANY);
+ flagp := flagp or HASWIDTH or SIMPLE;
+ end
+ else begin // not /s, so emit [^:LineSeparators:]
+ ret := EmitNode (ANYML);
+ flagp := flagp or HASWIDTH; // not so simple ;)
+// ret := EmitRange (ANYBUT);
+// EmitRangeStr (LineSeparators); //###0.941
+// EmitRangeStr (LinePairedSeparator); // !!! isn't correct if have to accept only paired
+// EmitRangeC (#0);
+// flagp := flagp or HASWIDTH or SIMPLE;
+ end;
+ '[': begin
+ if regparse^ = '^' then begin // Complement of range.
+ if (fCompModifiers and MaskModI) <> 0
+ then ret := EmitRange (ANYBUTCI)
+ else ret := EmitRange (ANYBUT);
+ inc (regparse);
+ end
+ else
+ if (fCompModifiers and MaskModI) <> 0
+ then ret := EmitRange (ANYOFCI)
+ else ret := EmitRange (ANYOF);
+
+ CanBeRange := false;
+
+ if (regparse^ = ']') then begin
+ EmitSimpleRangeC (regparse^); // []-a] -> ']' .. 'a'
+ inc (regparse);
+ end;
+
+ while (regparse^ <> #0) and (regparse^ <> ']') do begin
+ if (regparse^ = '-')
+ and ((regparse + 1)^ <> #0) and ((regparse + 1)^ <> ']')
+ and CanBeRange then begin
+ inc (regparse);
+ RangeEnd := regparse^;
+ if RangeEnd = '\' then begin
+// Eugene: 20080407
+// {$IFDEF UniCode} //###0.935
+// if (ord ((regparse + 1)^) < 256)
+// and (char ((regparse + 1)^) in ['d', 'D', 's', 'S', 'w', 'W']) then begin
+// {$ELSE}
+ if CharInSet((regparse + 1)^ , ['d', 'D', 's', 'S', 'w', 'W']) then begin
+// {$ENDIF}
+ EmitRangeC ('-'); // or treat as error ?!!
+ CONTINUE;
+ end;
+ inc (regparse);
+ RangeEnd := UnQuoteChar (regparse);
+ end;
+
+ // r.e.ranges extension for russian
+ if ((fCompModifiers and MaskModR) <> 0)
+ and (RangeBeg = RusRangeLoLow) and (RangeEnd = RusRangeLoHigh) then begin
+ EmitRangeStr (RusRangeLo);
+ end
+ else if ((fCompModifiers and MaskModR) <> 0)
+ and (RangeBeg = RusRangeHiLow) and (RangeEnd = RusRangeHiHigh) then begin
+ EmitRangeStr (RusRangeHi);
+ end
+ else if ((fCompModifiers and MaskModR) <> 0)
+ and (RangeBeg = RusRangeLoLow) and (RangeEnd = RusRangeHiHigh) then begin
+ EmitRangeStr (RusRangeLo);
+ EmitRangeStr (RusRangeHi);
+ end
+ else begin // standard r.e. handling
+ if RangeBeg > RangeEnd then begin
+ Error (reeInvalidRange);
+ EXIT;
+ end;
+ inc (RangeBeg);
+ EmitRangeC (RangeEnd); // prevent infinite loop if RangeEnd=$ff
+ while RangeBeg < RangeEnd do begin //###0.929
+ EmitRangeC (RangeBeg);
+ inc (RangeBeg);
+ end;
+ end;
+ inc (regparse);
+ end
+ else begin
+ if regparse^ = '\' then begin
+ inc (regparse);
+ if regparse^ = #0 then begin
+ Error (reeParseAtomTrailingBackSlash);
+ EXIT;
+ end;
+ case regparse^ of // r.e.extensions
+ 'd': EmitRangeStr ('0123456789');
+ 'w': EmitRangeStr (WordChars);
+ 's': EmitRangeStr (SpaceChars);
+ else EmitSimpleRangeC (UnQuoteChar (regparse));
+ end; { of case}
+ end
+ else EmitSimpleRangeC (regparse^);
+ inc (regparse);
+ end;
+ end; { of while}
+ EmitRangeC (#0);
+ if regparse^ <> ']' then begin
+ Error (reeUnmatchedSqBrackets);
+ EXIT;
+ end;
+ inc (regparse);
+ flagp := flagp or HASWIDTH or SIMPLE;
+ end;
+ '(': begin
+ if regparse^ = '?' then begin
+ // check for extended Perl syntax : (?..)
+ if (regparse + 1)^ = '#' then begin // (?#comment)
+ inc (regparse, 2); // find closing ')'
+ while (regparse^ <> #0) and (regparse^ <> ')')
+ do inc (regparse);
+ if regparse^ <> ')' then begin
+ Error (reeUnclosedComment);
+ EXIT;
+ end;
+ inc (regparse); // skip ')'
+ ret := EmitNode (COMMENT); // comment
+ end
+ else begin // modifiers ?
+ inc (regparse); // skip '?'
+ begmodfs := regparse;
+ while (regparse^ <> #0) and (regparse^ <> ')')
+ do inc (regparse);
+ if (regparse^ <> ')')
+ or not ParseModifiersStr (copy (begmodfs, 1, (regparse - begmodfs)), fCompModifiers) then begin
+ Error (reeUrecognizedModifier);
+ EXIT;
+ end;
+ inc (regparse); // skip ')'
+ ret := EmitNode (COMMENT); // comment
+// Error (reeQPSBFollowsNothing);
+// EXIT;
+ end;
+ end
+ else begin
+ ret := ParseReg (1, flags);
+ if ret = nil then begin
+ Result := nil;
+ EXIT;
+ end;
+ flagp := flagp or flags and (HASWIDTH or SPSTART);
+ end;
+ end;
+ #0, '|', ')': begin // Supposed to be caught earlier.
+ Error (reeInternalUrp);
+ EXIT;
+ end;
+ '?', '+', '*': begin
+ Error (reeQPSBFollowsNothing);
+ EXIT;
+ end;
+ '\': begin
+ if regparse^ = #0 then begin
+ Error (reeTrailingBackSlash);
+ EXIT;
+ end;
+ case regparse^ of // r.e.extensions
+ 'b': ret := EmitNode (BOUND); //###0.943
+ 'B': ret := EmitNode (NOTBOUND); //###0.943
+ 'A': ret := EmitNode (BOL); //###0.941
+ 'Z': ret := EmitNode (EOL); //###0.941
+ 'd': begin // r.e.extension - any digit ('0' .. '9')
+ ret := EmitNode (ANYDIGIT);
+ flagp := flagp or HASWIDTH or SIMPLE;
+ end;
+ 'D': begin // r.e.extension - not digit ('0' .. '9')
+ ret := EmitNode (NOTDIGIT);
+ flagp := flagp or HASWIDTH or SIMPLE;
+ end;
+ 's': begin // r.e.extension - any space char
+ {$IFDEF UseSetOfChar}
+ ret := EmitRange (ANYOF);
+ EmitRangeStr (SpaceChars);
+ EmitRangeC (#0);
+ {$ELSE}
+ ret := EmitNode (ANYSPACE);
+ {$ENDIF}
+ flagp := flagp or HASWIDTH or SIMPLE;
+ end;
+ 'S': begin // r.e.extension - not space char
+ {$IFDEF UseSetOfChar}
+ ret := EmitRange (ANYBUT);
+ EmitRangeStr (SpaceChars);
+ EmitRangeC (#0);
+ {$ELSE}
+ ret := EmitNode (NOTSPACE);
+ {$ENDIF}
+ flagp := flagp or HASWIDTH or SIMPLE;
+ end;
+ 'w': begin // r.e.extension - any english char / digit / '_'
+ {$IFDEF UseSetOfChar}
+ ret := EmitRange (ANYOF);
+ EmitRangeStr (WordChars);
+ EmitRangeC (#0);
+ {$ELSE}
+ ret := EmitNode (ANYLETTER);
+ {$ENDIF}
+ flagp := flagp or HASWIDTH or SIMPLE;
+ end;
+ 'W': begin // r.e.extension - not english char / digit / '_'
+ {$IFDEF UseSetOfChar}
+ ret := EmitRange (ANYBUT);
+ EmitRangeStr (WordChars);
+ EmitRangeC (#0);
+ {$ELSE}
+ ret := EmitNode (NOTLETTER);
+ {$ENDIF}
+ flagp := flagp or HASWIDTH or SIMPLE;
+ end;
+ '1' .. '9': begin //###0.936
+ if (fCompModifiers and MaskModI) <> 0
+ then ret := EmitNode (BSUBEXPCI)
+ else ret := EmitNode (BSUBEXP);
+ EmitC (REChar (ord (regparse^) - ord ('0')));
+ flagp := flagp or HASWIDTH or SIMPLE;
+ end;
+ else EmitExactly (UnQuoteChar (regparse));
+ end; { of case}
+ inc (regparse);
+ end;
+ else begin
+ dec (regparse);
+ if ((fCompModifiers and MaskModX) <> 0) and // check for eXtended syntax
+ ((regparse^ = '#')
+ or ({$IFDEF UniCode}StrScan (XIgnoredChars, regparse^) <> nil //###0.947
+ {$ELSE}regparse^ in XIgnoredChars{$ENDIF})) then begin //###0.941 \x
+ if regparse^ = '#' then begin // Skip eXtended comment
+ // find comment terminator (group of \n and/or \r)
+ while (regparse^ <> #0) and (regparse^ <> #$d) and (regparse^ <> #$a)
+ do inc (regparse);
+ while (regparse^ = #$d) or (regparse^ = #$a) // skip comment terminator
+ do inc (regparse); // attempt to support different type of line separators
+ end
+ else begin // Skip the blanks!
+ while {$IFDEF UniCode}StrScan (XIgnoredChars, regparse^) <> nil //###0.947
+ {$ELSE}regparse^ in XIgnoredChars{$ENDIF}
+ do inc (regparse);
+ end;
+ ret := EmitNode (COMMENT); // comment
+ end
+ else begin
+ len := strcspn (regparse, META);
+ if len <= 0 then
+ if regparse^ <> '{' then begin
+ Error (reeRarseAtomInternalDisaster);
+ EXIT;
+ end
+ else len := strcspn (regparse + 1, META) + 1; // bad {n,m} - compile as EXATLY
+ ender := (regparse + len)^;
+ if (len > 1)
+ and ((ender = '*') or (ender = '+') or (ender = '?') or (ender = '{'))
+ then dec (len); // Back off clear of ?+*{ operand.
+ flagp := flagp or HASWIDTH;
+ if len = 1
+ then flagp := flagp or SIMPLE;
+ if (fCompModifiers and MaskModI) <> 0
+ then ret := EmitNode (EXACTLYCI)
+ else ret := EmitNode (EXACTLY);
+ while (len > 0)
+ and (((fCompModifiers and MaskModX) = 0) or (regparse^ <> '#')) do begin
+ if ((fCompModifiers and MaskModX) = 0) or not ( //###0.941
+ {$IFDEF UniCode}StrScan (XIgnoredChars, regparse^) <> nil //###0.947
+ {$ELSE}regparse^ in XIgnoredChars{$ENDIF} )
+ then EmitC (regparse^);
+ inc (regparse);
+ dec (len);
+ end;
+ EmitC (#0);
+ end; { of if not comment}
+ end; { of case else}
+ end; { of case}
+
+ Result := ret;
+ end; { of function TRegExpr.ParseAtom
+--------------------------------------------------------------}
+
+function TRegExpr.GetCompilerErrorPos : integer;
+ begin
+ Result := 0;
+ if (regexpbeg = nil) or (regparse = nil)
+ then EXIT; // not in compiling mode ?
+ Result := regparse - regexpbeg;
+ end; { of function TRegExpr.GetCompilerErrorPos
+--------------------------------------------------------------}
+
+
+{=============================================================}
+{===================== Matching section ======================}
+{=============================================================}
+
+{$IFNDEF UseSetOfChar}
+function TRegExpr.StrScanCI (s : PRegExprChar; ch : REChar) : PRegExprChar; //###0.928 - now method of TRegExpr
+ begin
+ while (s^ <> #0) and (s^ <> ch) and (s^ <> InvertCase (ch))
+ do inc (s);
+ if s^ <> #0
+ then Result := s
+ else Result := nil;
+ end; { of function TRegExpr.StrScanCI
+--------------------------------------------------------------}
+{$ENDIF}
+
+function TRegExpr.regrepeat (p : PRegExprChar; AMax : integer) : integer;
+// repeatedly match something simple, report how many
+ var
+ scan : PRegExprChar;
+ opnd : PRegExprChar;
+ TheMax : integer;
+ {Ch,} InvCh : REChar; //###0.931
+ sestart, seend : PRegExprChar; //###0.936
+ begin
+ Result := 0;
+ scan := reginput;
+ opnd := p + REOpSz + RENextOffSz; //OPERAND
+ TheMax := fInputEnd - scan;
+ if TheMax > AMax
+ then TheMax := AMax;
+ case PREOp (p)^ of
+ ANY: begin
+ // note - ANYML cannot be proceeded in regrepeat because can skip
+ // more than one char at once
+ Result := TheMax;
+ inc (scan, Result);
+ end;
+ EXACTLY: begin // in opnd can be only ONE char !!!
+// Ch := opnd^; // store in register //###0.931
+ while (Result < TheMax) and (opnd^ = scan^) do begin
+ inc (Result);
+ inc (scan);
+ end;
+ end;
+ EXACTLYCI: begin // in opnd can be only ONE char !!!
+// Ch := opnd^; // store in register //###0.931
+ while (Result < TheMax) and (opnd^ = scan^) do begin // prevent unneeded InvertCase //###0.931
+ inc (Result);
+ inc (scan);
+ end;
+ if Result < TheMax then begin //###0.931
+ InvCh := InvertCase (opnd^); // store in register
+ while (Result < TheMax) and
+ ((opnd^ = scan^) or (InvCh = scan^)) do begin
+ inc (Result);
+ inc (scan);
+ end;
+ end;
+ end;
+ BSUBEXP: begin //###0.936
+ sestart := startp [ord (opnd^)];
+ if sestart = nil
+ then EXIT;
+ seend := endp [ord (opnd^)];
+ if seend = nil
+ then EXIT;
+ REPEAT
+ opnd := sestart;
+ while opnd < seend do begin
+ if (scan >= fInputEnd) or (scan^ <> opnd^)
+ then EXIT;
+ inc (scan);
+ inc (opnd);
+ end;
+ inc (Result);
+ reginput := scan;
+ UNTIL Result >= AMax;
+ end;
+ BSUBEXPCI: begin //###0.936
+ sestart := startp [ord (opnd^)];
+ if sestart = nil
+ then EXIT;
+ seend := endp [ord (opnd^)];
+ if seend = nil
+ then EXIT;
+ REPEAT
+ opnd := sestart;
+ while opnd < seend do begin
+ if (scan >= fInputEnd) or
+ ((scan^ <> opnd^) and (scan^ <> InvertCase (opnd^)))
+ then EXIT;
+ inc (scan);
+ inc (opnd);
+ end;
+ inc (Result);
+ reginput := scan;
+ UNTIL Result >= AMax;
+ end;
+ ANYDIGIT:
+ while (Result < TheMax) and
+ (scan^ >= '0') and (scan^ <= '9') do begin
+ inc (Result);
+ inc (scan);
+ end;
+ NOTDIGIT:
+ while (Result < TheMax) and
+ ((scan^ < '0') or (scan^ > '9')) do begin
+ inc (Result);
+ inc (scan);
+ end;
+ {$IFNDEF UseSetOfChar} //###0.929
+ ANYLETTER:
+ while (Result < TheMax) and
+ (Pos (scan^, fWordChars) > 0) //###0.940
+ { ((scan^ >= 'a') and (scan^ <= 'z') !! I've forgotten (>='0') and (<='9')
+ or (scan^ >= 'A') and (scan^ <= 'Z') or (scan^ = '_'))} do begin
+ inc (Result);
+ inc (scan);
+ end;
+ NOTLETTER:
+ while (Result < TheMax) and
+ (Pos (scan^, fWordChars) <= 0) //###0.940
+ { not ((scan^ >= 'a') and (scan^ <= 'z') !! I've forgotten (>='0') and (<='9')
+ or (scan^ >= 'A') and (scan^ <= 'Z')
+ or (scan^ = '_'))} do begin
+ inc (Result);
+ inc (scan);
+ end;
+ ANYSPACE:
+ while (Result < TheMax) and
+ (Pos (scan^, fSpaceChars) > 0) do begin
+ inc (Result);
+ inc (scan);
+ end;
+ NOTSPACE:
+ while (Result < TheMax) and
+ (Pos (scan^, fSpaceChars) <= 0) do begin
+ inc (Result);
+ inc (scan);
+ end;
+ {$ENDIF}
+ ANYOFTINYSET: begin
+ while (Result < TheMax) and //!!!TinySet
+ ((scan^ = opnd^) or (scan^ = (opnd + 1)^)
+ or (scan^ = (opnd + 2)^)) do begin
+ inc (Result);
+ inc (scan);
+ end;
+ end;
+ ANYBUTTINYSET: begin
+ while (Result < TheMax) and //!!!TinySet
+ (scan^ <> opnd^) and (scan^ <> (opnd + 1)^)
+ and (scan^ <> (opnd + 2)^) do begin
+ inc (Result);
+ inc (scan);
+ end;
+ end;
+ {$IFDEF UseSetOfChar} //###0.929
+ ANYOFFULLSET: begin
+ while (Result < TheMax) and
+ (scan^ in PSetOfREChar (opnd)^) do begin
+ inc (Result);
+ inc (scan);
+ end;
+ end;
+ {$ELSE}
+ ANYOF:
+ while (Result < TheMax) and
+ (StrScan (opnd, scan^) <> nil) do begin
+ inc (Result);
+ inc (scan);
+ end;
+ ANYBUT:
+ while (Result < TheMax) and
+ (StrScan (opnd, scan^) = nil) do begin
+ inc (Result);
+ inc (scan);
+ end;
+ ANYOFCI:
+ while (Result < TheMax) and (StrScanCI (opnd, scan^) <> nil) do begin
+ inc (Result);
+ inc (scan);
+ end;
+ ANYBUTCI:
+ while (Result < TheMax) and (StrScanCI (opnd, scan^) = nil) do begin
+ inc (Result);
+ inc (scan);
+ end;
+ {$ENDIF}
+ else begin // Oh dear. Called inappropriately.
+ Result := 0; // Best compromise.
+ Error (reeRegRepeatCalledInappropriately);
+ EXIT;
+ end;
+ end; { of case}
+ reginput := scan;
+ end; { of function TRegExpr.regrepeat
+--------------------------------------------------------------}
+
+function TRegExpr.regnext (p : PRegExprChar) : PRegExprChar;
+// dig the "next" pointer out of a node
+ var offset : TRENextOff;
+ begin
+ if p = @regdummy then begin
+ Result := nil;
+ EXIT;
+ end;
+ offset := PRENextOff (p + REOpSz)^; //###0.933 inlined NEXT
+ if offset = 0
+ then Result := nil
+ else Result := p + offset;
+ end; { of function TRegExpr.regnext
+--------------------------------------------------------------}
+
+function TRegExpr.MatchPrim (prog : PRegExprChar) : boolean;
+// recursively matching routine
+// Conceptually the strategy is simple: check to see whether the current
+// node matches, call self recursively to see whether the rest matches,
+// and then act accordingly. In practice we make some effort to avoid
+// recursion, in particular by going through "ordinary" nodes (that don't
+// need to know whether the rest of the match failed) by a loop instead of
+// by recursion.
+ var
+ scan : PRegExprChar; // Current node.
+ next : PRegExprChar; // Next node.
+ len : integer;
+ opnd : PRegExprChar;
+ no : integer;
+ save : PRegExprChar;
+ nextch : REChar;
+ BracesMin, BracesMax : integer; // we use integer instead of TREBracesArg for better support */+
+ {$IFDEF ComplexBraces}
+ SavedLoopStack : array [1 .. LoopStackMax] of integer; // :(( very bad for recursion
+ SavedLoopStackIdx : integer; //###0.925
+ {$ENDIF}
+ begin
+ Result := false;
+ scan := prog;
+
+ while scan <> nil do begin
+ len := PRENextOff (scan + 1)^; //###0.932 inlined regnext
+ if len = 0
+ then next := nil
+ else next := scan + len;
+
+ case scan^ of
+ NOTBOUND, //###0.943 //!!! think about UseSetOfChar !!!
+ BOUND:
+ if (scan^ = BOUND)
+ xor (
+ ((reginput = fInputStart) or (Pos ((reginput - 1)^, fWordChars) <= 0))
+ and (reginput^ <> #0) and (Pos (reginput^, fWordChars) > 0)
+ or
+ (reginput <> fInputStart) and (Pos ((reginput - 1)^, fWordChars) > 0)
+ and ((reginput^ = #0) or (Pos (reginput^, fWordChars) <= 0)))
+ then EXIT;
+
+ BOL: if reginput <> fInputStart
+ then EXIT;
+ EOL: if reginput^ <> #0
+ then EXIT;
+ BOLML: if reginput > fInputStart then begin
+ nextch := (reginput - 1)^;
+ if (nextch <> fLinePairedSeparatorTail)
+ or ((reginput - 1) <= fInputStart)
+ or ((reginput - 2)^ <> fLinePairedSeparatorHead)
+ then begin
+ if (nextch = fLinePairedSeparatorHead)
+ and (reginput^ = fLinePairedSeparatorTail)
+ then EXIT; // don't stop between paired separator
+ if
+ {$IFNDEF UniCode}
+ not (nextch in fLineSeparatorsSet)
+ {$ELSE}
+ (pos (nextch, fLineSeparators) <= 0)
+ {$ENDIF}
+ then EXIT;
+ end;
+ end;
+ EOLML: if reginput^ <> #0 then begin
+ nextch := reginput^;
+ if (nextch <> fLinePairedSeparatorHead)
+ or ((reginput + 1)^ <> fLinePairedSeparatorTail)
+ then begin
+ if (nextch = fLinePairedSeparatorTail)
+ and (reginput > fInputStart)
+ and ((reginput - 1)^ = fLinePairedSeparatorHead)
+ then EXIT; // don't stop between paired separator
+ if
+ {$IFNDEF UniCode}
+ not (nextch in fLineSeparatorsSet)
+ {$ELSE}
+ (pos (nextch, fLineSeparators) <= 0)
+ {$ENDIF}
+ then EXIT;
+ end;
+ end;
+ ANY: begin
+ if reginput^ = #0
+ then EXIT;
+ inc (reginput);
+ end;
+ ANYML: begin //###0.941
+ if (reginput^ = #0)
+ or ((reginput^ = fLinePairedSeparatorHead)
+ and ((reginput + 1)^ = fLinePairedSeparatorTail))
+ or {$IFNDEF UniCode} (reginput^ in fLineSeparatorsSet)
+ {$ELSE} (pos (reginput^, fLineSeparators) > 0) {$ENDIF}
+ then EXIT;
+ inc (reginput);
+ end;
+ ANYDIGIT: begin
+ if (reginput^ = #0) or (reginput^ < '0') or (reginput^ > '9')
+ then EXIT;
+ inc (reginput);
+ end;
+ NOTDIGIT: begin
+ if (reginput^ = #0) or ((reginput^ >= '0') and (reginput^ <= '9'))
+ then EXIT;
+ inc (reginput);
+ end;
+ {$IFNDEF UseSetOfChar} //###0.929
+ ANYLETTER: begin
+ if (reginput^ = #0) or (Pos (reginput^, fWordChars) <= 0) //###0.943
+ then EXIT;
+ inc (reginput);
+ end;
+ NOTLETTER: begin
+ if (reginput^ = #0) or (Pos (reginput^, fWordChars) > 0) //###0.943
+ then EXIT;
+ inc (reginput);
+ end;
+ ANYSPACE: begin
+ if (reginput^ = #0) or not (Pos (reginput^, fSpaceChars) > 0) //###0.943
+ then EXIT;
+ inc (reginput);
+ end;
+ NOTSPACE: begin
+ if (reginput^ = #0) or (Pos (reginput^, fSpaceChars) > 0) //###0.943
+ then EXIT;
+ inc (reginput);
+ end;
+ {$ENDIF}
+ EXACTLYCI: begin
+ opnd := scan + REOpSz + RENextOffSz; // OPERAND
+ // Inline the first character, for speed.
+ if (opnd^ <> reginput^)
+ and (InvertCase (opnd^) <> reginput^)
+ then EXIT;
+ len := strlen (opnd);
+ //###0.929 begin
+ no := len;
+ save := reginput;
+ while no > 1 do begin
+ inc (save);
+ inc (opnd);
+ if (opnd^ <> save^)
+ and (InvertCase (opnd^) <> save^)
+ then EXIT;
+ dec (no);
+ end;
+ //###0.929 end
+ inc (reginput, len);
+ end;
+ EXACTLY: begin
+ opnd := scan + REOpSz + RENextOffSz; // OPERAND
+ // Inline the first character, for speed.
+ if opnd^ <> reginput^
+ then EXIT;
+ len := strlen (opnd);
+ //###0.929 begin
+ no := len;
+ save := reginput;
+ while no > 1 do begin
+ inc (save);
+ inc (opnd);
+ if opnd^ <> save^
+ then EXIT;
+ dec (no);
+ end;
+ //###0.929 end
+ inc (reginput, len);
+ end;
+ BSUBEXP: begin //###0.936
+ no := ord ((scan + REOpSz + RENextOffSz)^);
+ if startp [no] = nil
+ then EXIT;
+ if endp [no] = nil
+ then EXIT;
+ save := reginput;
+ opnd := startp [no];
+ while opnd < endp [no] do begin
+ if (save >= fInputEnd) or (save^ <> opnd^)
+ then EXIT;
+ inc (save);
+ inc (opnd);
+ end;
+ reginput := save;
+ end;
+ BSUBEXPCI: begin //###0.936
+ no := ord ((scan + REOpSz + RENextOffSz)^);
+ if startp [no] = nil
+ then EXIT;
+ if endp [no] = nil
+ then EXIT;
+ save := reginput;
+ opnd := startp [no];
+ while opnd < endp [no] do begin
+ if (save >= fInputEnd) or
+ ((save^ <> opnd^) and (save^ <> InvertCase (opnd^)))
+ then EXIT;
+ inc (save);
+ inc (opnd);
+ end;
+ reginput := save;
+ end;
+ ANYOFTINYSET: begin
+ if (reginput^ = #0) or //!!!TinySet
+ ((reginput^ <> (scan + REOpSz + RENextOffSz)^)
+ and (reginput^ <> (scan + REOpSz + RENextOffSz + 1)^)
+ and (reginput^ <> (scan + REOpSz + RENextOffSz + 2)^))
+ then EXIT;
+ inc (reginput);
+ end;
+ ANYBUTTINYSET: begin
+ if (reginput^ = #0) or //!!!TinySet
+ (reginput^ = (scan + REOpSz + RENextOffSz)^)
+ or (reginput^ = (scan + REOpSz + RENextOffSz + 1)^)
+ or (reginput^ = (scan + REOpSz + RENextOffSz + 2)^)
+ then EXIT;
+ inc (reginput);
+ end;
+ {$IFDEF UseSetOfChar} //###0.929
+ ANYOFFULLSET: begin
+ if (reginput^ = #0)
+ or not (reginput^ in PSetOfREChar (scan + REOpSz + RENextOffSz)^)
+ then EXIT;
+ inc (reginput);
+ end;
+ {$ELSE}
+ ANYOF: begin
+ if (reginput^ = #0) or (StrScan (scan + REOpSz + RENextOffSz, reginput^) = nil)
+ then EXIT;
+ inc (reginput);
+ end;
+ ANYBUT: begin
+ if (reginput^ = #0) or (StrScan (scan + REOpSz + RENextOffSz, reginput^) <> nil)
+ then EXIT;
+ inc (reginput);
+ end;
+ ANYOFCI: begin
+ if (reginput^ = #0) or (StrScanCI (scan + REOpSz + RENextOffSz, reginput^) = nil)
+ then EXIT;
+ inc (reginput);
+ end;
+ ANYBUTCI: begin
+ if (reginput^ = #0) or (StrScanCI (scan + REOpSz + RENextOffSz, reginput^) <> nil)
+ then EXIT;
+ inc (reginput);
+ end;
+ {$ENDIF}
+ NOTHING: ;
+ COMMENT: ;
+ BACK: ;
+ Succ (OPEN) .. TREOp (Ord (OPEN) + NSUBEXP - 1) : begin //###0.929
+ no := ord (scan^) - ord (OPEN);
+// save := reginput;
+ save := startp [no]; //###0.936
+ startp [no] := reginput; //###0.936
+ Result := MatchPrim (next);
+ if not Result //###0.936
+ then startp [no] := save;
+// if Result and (startp [no] = nil)
+// then startp [no] := save;
+ // Don't set startp if some later invocation of the same
+ // parentheses already has.
+ EXIT;
+ end;
+ Succ (CLOSE) .. TREOp (Ord (CLOSE) + NSUBEXP - 1): begin //###0.929
+ no := ord (scan^) - ord (CLOSE);
+// save := reginput;
+ save := endp [no]; //###0.936
+ endp [no] := reginput; //###0.936
+ Result := MatchPrim (next);
+ if not Result //###0.936
+ then endp [no] := save;
+// if Result and (endp [no] = nil)
+// then endp [no] := save;
+ // Don't set endp if some later invocation of the same
+ // parentheses already has.
+ EXIT;
+ end;
+ BRANCH: begin
+ if (next^ <> BRANCH) // No choice.
+ then next := scan + REOpSz + RENextOffSz // Avoid recursion
+ else begin
+ REPEAT
+ save := reginput;
+ Result := MatchPrim (scan + REOpSz + RENextOffSz);
+ if Result
+ then EXIT;
+ reginput := save;
+ scan := regnext (scan);
+ UNTIL (scan = nil) or (scan^ <> BRANCH);
+ EXIT;
+ end;
+ end;
+ {$IFDEF ComplexBraces}
+ LOOPENTRY: begin //###0.925
+ no := LoopStackIdx;
+ inc (LoopStackIdx);
+ if LoopStackIdx > LoopStackMax then begin
+ Error (reeLoopStackExceeded);
+ EXIT;
+ end;
+ save := reginput;
+ LoopStack [LoopStackIdx] := 0; // init loop counter
+ Result := MatchPrim (next); // execute LOOP
+ LoopStackIdx := no; // cleanup
+ if Result
+ then EXIT;
+ reginput := save;
+ EXIT;
+ end;
+ LOOP, LOOPNG: begin //###0.940
+ if LoopStackIdx <= 0 then begin
+ Error (reeLoopWithoutEntry);
+ EXIT;
+ end;
+ opnd := scan + PRENextOff (scan + REOpSz + RENextOffSz + 2 * REBracesArgSz)^;
+ BracesMin := PREBracesArg (scan + REOpSz + RENextOffSz)^;
+ BracesMax := PREBracesArg (scan + REOpSz + RENextOffSz + REBracesArgSz)^;
+ save := reginput;
+ if LoopStack [LoopStackIdx] >= BracesMin then begin // Min alredy matched - we can work
+ if scan^ = LOOP then begin
+ // greedy way - first try to max deep of greed ;)
+ if LoopStack [LoopStackIdx] < BracesMax then begin
+ inc (LoopStack [LoopStackIdx]);
+ no := LoopStackIdx;
+ Result := MatchPrim (opnd);
+ LoopStackIdx := no;
+ if Result
+ then EXIT;
+ reginput := save;
+ end;
+ dec (LoopStackIdx); // Fail. May be we are too greedy? ;)
+ Result := MatchPrim (next);
+ if not Result
+ then reginput := save;
+ EXIT;
+ end
+ else begin
+ // non-greedy - try just now
+ Result := MatchPrim (next);
+ if Result
+ then EXIT
+ else reginput := save; // failed - move next and try again
+ if LoopStack [LoopStackIdx] < BracesMax then begin
+ inc (LoopStack [LoopStackIdx]);
+ no := LoopStackIdx;
+ Result := MatchPrim (opnd);
+ LoopStackIdx := no;
+ if Result
+ then EXIT;
+ reginput := save;
+ end;
+ dec (LoopStackIdx); // Failed - back up
+ EXIT;
+ end
+ end
+ else begin // first match a min_cnt times
+ inc (LoopStack [LoopStackIdx]);
+ no := LoopStackIdx;
+ Result := MatchPrim (opnd);
+ LoopStackIdx := no;
+ if Result
+ then EXIT;
+ dec (LoopStack [LoopStackIdx]);
+ reginput := save;
+ EXIT;
+ end;
+ end;
+ {$ENDIF}
+ STAR, PLUS, BRACES, STARNG, PLUSNG, BRACESNG: begin
+ // Lookahead to avoid useless match attempts when we know
+ // what character comes next.
+ nextch := #0;
+ if next^ = EXACTLY
+ then nextch := (next + REOpSz + RENextOffSz)^;
+ BracesMax := MaxInt; // infinite loop for * and + //###0.92
+ if (scan^ = STAR) or (scan^ = STARNG)
+ then BracesMin := 0 // STAR
+ else if (scan^ = PLUS) or (scan^ = PLUSNG)
+ then BracesMin := 1 // PLUS
+ else begin // BRACES
+ BracesMin := PREBracesArg (scan + REOpSz + RENextOffSz)^;
+ BracesMax := PREBracesArg (scan + REOpSz + RENextOffSz + REBracesArgSz)^;
+ end;
+ save := reginput;
+ opnd := scan + REOpSz + RENextOffSz;
+ if (scan^ = BRACES) or (scan^ = BRACESNG)
+ then inc (opnd, 2 * REBracesArgSz);
+
+ if (scan^ = PLUSNG) or (scan^ = STARNG) or (scan^ = BRACESNG) then begin
+ // non-greedy mode
+ BracesMax := regrepeat (opnd, BracesMax); // don't repeat more than BracesMax
+ // Now we know real Max limit to move forward (for recursion 'back up')
+ // In some cases it can be faster to check only Min positions first,
+ // but after that we have to check every position separtely instead
+ // of fast scannig in loop.
+ no := BracesMin;
+ while no <= BracesMax do begin
+ reginput := save + no;
+ // If it could work, try it.
+ if (nextch = #0) or (reginput^ = nextch) then begin
+ {$IFDEF ComplexBraces}
+ System.Move (LoopStack, SavedLoopStack, SizeOf (LoopStack)); //###0.925
+ SavedLoopStackIdx := LoopStackIdx;
+ {$ENDIF}
+ if MatchPrim (next) then begin
+ Result := true;
+ EXIT;
+ end;
+ {$IFDEF ComplexBraces}
+ System.Move (SavedLoopStack, LoopStack, SizeOf (LoopStack));
+ LoopStackIdx := SavedLoopStackIdx;
+ {$ENDIF}
+ end;
+ inc (no); // Couldn't or didn't - move forward.
+ end; { of while}
+ EXIT;
+ end
+ else begin // greedy mode
+ no := regrepeat (opnd, BracesMax); // don't repeat more than max_cnt
+ while no >= BracesMin do begin
+ // If it could work, try it.
+ if (nextch = #0) or (reginput^ = nextch) then begin
+ {$IFDEF ComplexBraces}
+ System.Move (LoopStack, SavedLoopStack, SizeOf (LoopStack)); //###0.925
+ SavedLoopStackIdx := LoopStackIdx;
+ {$ENDIF}
+ if MatchPrim (next) then begin
+ Result := true;
+ EXIT;
+ end;
+ {$IFDEF ComplexBraces}
+ System.Move (SavedLoopStack, LoopStack, SizeOf (LoopStack));
+ LoopStackIdx := SavedLoopStackIdx;
+ {$ENDIF}
+ end;
+ dec (no); // Couldn't or didn't - back up.
+ reginput := save + no;
+ end; { of while}
+ EXIT;
+ end;
+ end;
+ EEND: begin
+ Result := true; // Success!
+ EXIT;
+ end;
+ else begin
+ Error (reeMatchPrimMemoryCorruption);
+ EXIT;
+ end;
+ end; { of case scan^}
+ scan := next;
+ end; { of while scan <> nil}
+
+ // We get here only if there's trouble -- normally "case EEND" is the
+ // terminating point.
+ Error (reeMatchPrimCorruptedPointers);
+ end; { of function TRegExpr.MatchPrim
+--------------------------------------------------------------}
+
+{$IFDEF UseFirstCharSet} //###0.929
+procedure TRegExpr.FillFirstCharSet (prog : PRegExprChar);
+ var
+ scan : PRegExprChar; // Current node.
+ next : PRegExprChar; // Next node.
+ opnd : PRegExprChar;
+ min_cnt : integer;
+ begin
+ scan := prog;
+ while scan <> nil do begin
+ next := regnext (scan);
+ case PREOp (scan)^ of
+ BSUBEXP, BSUBEXPCI: begin //###0.938
+ FirstCharSet := [#0 .. #255]; // :((( we cannot
+ // optimize r.e. if it starts with back reference
+ EXIT;
+ end;
+ BOL, BOLML: ; // EXIT; //###0.937
+ EOL, EOLML: ; // EXIT; //###0.937
+ BOUND, NOTBOUND: ; //###0.943 ?!!
+ ANY, ANYML: begin // we can better define ANYML !!!
+ FirstCharSet := [#0 .. #255]; //###0.930
+ EXIT;
+ end;
+ ANYDIGIT: begin
+ FirstCharSet := FirstCharSet + ['0' .. '9'];
+ EXIT;
+ end;
+ NOTDIGIT: begin
+ FirstCharSet := [#0 .. #255] - ['0' .. '9'];
+ EXIT;
+ end;
+ EXACTLYCI: begin
+ Include (FirstCharSet, (scan + REOpSz + RENextOffSz)^);
+ Include (FirstCharSet, InvertCase ((scan + REOpSz + RENextOffSz)^));
+ EXIT;
+ end;
+ EXACTLY: begin
+ Include (FirstCharSet, (scan + REOpSz + RENextOffSz)^);
+ EXIT;
+ end;
+ ANYOFFULLSET: begin
+ FirstCharSet := FirstCharSet + PSetOfREChar (scan + REOpSz + RENextOffSz)^;
+ EXIT;
+ end;
+ ANYOFTINYSET: begin
+ //!!!TinySet
+ Include (FirstCharSet, (scan + REOpSz + RENextOffSz)^);
+ Include (FirstCharSet, (scan + REOpSz + RENextOffSz + 1)^);
+ Include (FirstCharSet, (scan + REOpSz + RENextOffSz + 2)^);
+ // ... // up to TinySetLen
+ EXIT;
+ end;
+ ANYBUTTINYSET: begin
+ //!!!TinySet
+ FirstCharSet := [#0 .. #255];
+ Exclude (FirstCharSet, (scan + REOpSz + RENextOffSz)^);
+ Exclude (FirstCharSet, (scan + REOpSz + RENextOffSz + 1)^);
+ Exclude (FirstCharSet, (scan + REOpSz + RENextOffSz + 2)^);
+ // ... // up to TinySetLen
+ EXIT;
+ end;
+ NOTHING: ;
+ COMMENT: ;
+ BACK: ;
+ Succ (OPEN) .. TREOp (Ord (OPEN) + NSUBEXP - 1) : begin //###0.929
+ FillFirstCharSet (next);
+ EXIT;
+ end;
+ Succ (CLOSE) .. TREOp (Ord (CLOSE) + NSUBEXP - 1): begin //###0.929
+ FillFirstCharSet (next);
+ EXIT;
+ end;
+ BRANCH: begin
+ if (PREOp (next)^ <> BRANCH) // No choice.
+ then next := scan + REOpSz + RENextOffSz // Avoid recursion.
+ else begin
+ REPEAT
+ FillFirstCharSet (scan + REOpSz + RENextOffSz);
+ scan := regnext (scan);
+ UNTIL (scan = nil) or (PREOp (scan)^ <> BRANCH);
+ EXIT;
+ end;
+ end;
+ {$IFDEF ComplexBraces}
+ LOOPENTRY: begin //###0.925
+// LoopStack [LoopStackIdx] := 0; //###0.940 line removed
+ FillFirstCharSet (next); // execute LOOP
+ EXIT;
+ end;
+ LOOP, LOOPNG: begin //###0.940
+ opnd := scan + PRENextOff (scan + REOpSz + RENextOffSz + REBracesArgSz * 2)^;
+ min_cnt := PREBracesArg (scan + REOpSz + RENextOffSz)^;
+ FillFirstCharSet (opnd);
+ if min_cnt = 0
+ then FillFirstCharSet (next);
+ EXIT;
+ end;
+ {$ENDIF}
+ STAR, STARNG: //###0.940
+ FillFirstCharSet (scan + REOpSz + RENextOffSz);
+ PLUS, PLUSNG: begin //###0.940
+ FillFirstCharSet (scan + REOpSz + RENextOffSz);
+ EXIT;
+ end;
+ BRACES, BRACESNG: begin //###0.940
+ opnd := scan + REOpSz + RENextOffSz + REBracesArgSz * 2;
+ min_cnt := PREBracesArg (scan + REOpSz + RENextOffSz)^; // BRACES
+ FillFirstCharSet (opnd);
+ if min_cnt > 0
+ then EXIT;
+ end;
+ EEND: begin
+ EXIT;
+ end;
+ else begin
+ Error (reeMatchPrimMemoryCorruption);
+ EXIT;
+ end;
+ end; { of case scan^}
+ scan := next;
+ end; { of while scan <> nil}
+ end; { of procedure FillFirstCharSet;
+--------------------------------------------------------------}
+{$ENDIF}
+
+function TRegExpr.RegMatch (str : PRegExprChar) : boolean;
+// try match at specific point
+ var i : integer;
+ begin
+ for i := 0 to NSUBEXP - 1 do begin
+ startp [i] := nil;
+ endp [i] := nil;
+ end;
+ reginput := str;
+ Result := MatchPrim (programm + REOpSz);
+ if Result then begin
+ startp [0] := str;
+ endp [0] := reginput;
+ end;
+ end; { of function TRegExpr.RegMatch
+--------------------------------------------------------------}
+
+function TRegExpr.Exec (const AInputString : RegExprString) : boolean;
+ begin
+ InputString := AInputString;
+ Result := ExecPrim (1);
+ end; { of function TRegExpr.Exec
+--------------------------------------------------------------}
+
+function TRegExpr.ExecPrim (AOffset: integer) : boolean;
+ var
+ s : PRegExprChar;
+ StartPtr: PRegExprChar;
+ InputLen : integer;
+ begin
+ Result := false; // Be paranoid...
+
+ if not IsProgrammOk //###0.929
+ then EXIT;
+
+ // Check InputString presence
+ if not Assigned (fInputString) then begin
+ Error (reeNoInpitStringSpecified);
+ EXIT;
+ end;
+
+ InputLen := length (fInputString);
+
+ //Check that the start position is not negative
+ if AOffset < 1 then begin
+ Error (reeOffsetMustBeGreaterThen0);
+ EXIT;
+ end;
+ // Check that the start position is not longer than the line
+ // If so then exit with nothing found
+ if AOffset > (InputLen + 1) // for matching empty string after last char.
+ then EXIT;
+
+ StartPtr := fInputString + AOffset - 1;
+
+ // If there is a "must appear" string, look for it.
+ if regmust <> nil then begin
+ s := StartPtr;
+ REPEAT
+ s := StrScan (s, regmust [0]);
+ if s <> nil then begin
+ if StrLComp (s, regmust, regmlen) = 0
+ then BREAK; // Found it.
+ inc (s);
+ end;
+ UNTIL s = nil;
+ if s = nil // Not present.
+ then EXIT;
+ end;
+
+ // Mark beginning of line for ^ .
+ fInputStart := fInputString;
+
+ // Pointer to end of input stream - for
+ // pascal-style string processing (may include #0)
+ fInputEnd := fInputString + InputLen;
+
+ {$IFDEF ComplexBraces}
+ // no loops started
+ LoopStackIdx := 0; //###0.925
+ {$ENDIF}
+
+ // Simplest case: anchored match need be tried only once.
+ if reganch <> #0 then begin
+ Result := RegMatch (StartPtr);
+ EXIT;
+ end;
+
+ // Messy cases: unanchored match.
+ s := StartPtr;
+ if regstart <> #0 then // We know what char it must start with.
+ REPEAT
+ s := StrScan (s, regstart);
+ if s <> nil then begin
+ Result := RegMatch (s);
+ if Result
+ then EXIT;
+ inc (s);
+ end;
+ UNTIL s = nil
+ else begin // We don't - general case.
+ {$IFDEF UseFirstCharSet} //###0.929
+ while s^ <> #0 do begin
+ if s^ in FirstCharSet
+ then Result := RegMatch (s);
+ if Result
+ then EXIT;
+ inc (s);
+ end;
+ {$ELSE}
+ REPEAT
+ Result := RegMatch (s);
+ if Result
+ then EXIT;
+ inc (s);
+ UNTIL s^ = #0;
+ {$ENDIF}
+ end;
+ // Failure
+ end; { of function TRegExpr.ExecPrim
+--------------------------------------------------------------}
+
+function TRegExpr.ExecNext : boolean;
+ var offset : integer;
+ begin
+ Result := false;
+ if not Assigned (startp[0]) or not Assigned (endp[0]) then begin
+ Error (reeExecNextWithoutExec);
+ EXIT;
+ end;
+// Offset := MatchPos [0] + MatchLen [0];
+// if MatchLen [0] = 0
+ Offset := endp [0] - fInputString + 1; //###0.929
+ if endp [0] = startp [0] //###0.929
+ then inc (Offset); // prevent infinite looping if empty string match r.e.
+ Result := ExecPrim (Offset);
+ end; { of function TRegExpr.ExecNext
+--------------------------------------------------------------}
+
+function TRegExpr.ExecPos (AOffset: integer {$IFDEF D4_}= 1{$ENDIF}) : boolean;
+ begin
+ Result := ExecPrim (AOffset);
+ end; { of function TRegExpr.ExecPos
+--------------------------------------------------------------}
+
+function TRegExpr.GetInputString : RegExprString;
+ begin
+ if not Assigned (fInputString) then begin
+ Error (reeGetInputStringWithoutInputString);
+ EXIT;
+ end;
+ Result := fInputString;
+ end; { of function TRegExpr.GetInputString
+--------------------------------------------------------------}
+
+procedure TRegExpr.SetInputString (const AInputString : RegExprString);
+ var
+ Len : integer;
+ i : integer;
+ begin
+ // clear Match* - before next Exec* call it's undefined
+ for i := 0 to NSUBEXP - 1 do begin
+ startp [i] := nil;
+ endp [i] := nil;
+ end;
+
+ // need reallocation of input string buffer ?
+ Len := length (AInputString);
+ if Assigned (fInputString) and (Length (fInputString) <> Len) then begin
+ FreeMem (fInputString);
+ fInputString := nil;
+ end;
+ // buffer [re]allocation
+ if not Assigned (fInputString)
+ then GetMem (fInputString, (Len + 1) * SizeOf (REChar));
+
+ // copy input string into buffer
+ {$IFDEF UniCode}
+ StrPCopy (fInputString, Copy (AInputString, 1, Len)); //###0.927
+ {$ELSE}
+ StrLCopy (fInputString, PRegExprChar (AInputString), Len);
+ {$ENDIF}
+
+ {
+ fInputString : string;
+ fInputStart, fInputEnd : PRegExprChar;
+
+ SetInputString:
+ fInputString := AInputString;
+ UniqueString (fInputString);
+ fInputStart := PChar (fInputString);
+ Len := length (fInputString);
+ fInputEnd := PRegExprChar (integer (fInputStart) + Len); ??
+ !! startp/endp âñå ðàâíî áóäåò îïàñíî èñïîëüçîâàòü ?
+ }
+ end; { of procedure TRegExpr.SetInputString
+--------------------------------------------------------------}
+
+procedure TRegExpr.SetLineSeparators (const AStr : RegExprString);
+ begin
+ if AStr <> fLineSeparators then begin
+ fLineSeparators := AStr;
+ InvalidateProgramm;
+ end;
+ end; { of procedure TRegExpr.SetLineSeparators
+--------------------------------------------------------------}
+
+procedure TRegExpr.SetLinePairedSeparator (const AStr : RegExprString);
+ begin
+ if length (AStr) = 2 then begin
+ if AStr [1] = AStr [2] then begin
+ // it's impossible for our 'one-point' checking to support
+ // two chars separator for identical chars
+ Error (reeBadLinePairedSeparator);
+ EXIT;
+ end;
+ if not fLinePairedSeparatorAssigned
+ or (AStr [1] <> fLinePairedSeparatorHead)
+ or (AStr [2] <> fLinePairedSeparatorTail) then begin
+ fLinePairedSeparatorAssigned := true;
+ fLinePairedSeparatorHead := AStr [1];
+ fLinePairedSeparatorTail := AStr [2];
+ InvalidateProgramm;
+ end;
+ end
+ else if length (AStr) = 0 then begin
+ if fLinePairedSeparatorAssigned then begin
+ fLinePairedSeparatorAssigned := false;
+ InvalidateProgramm;
+ end;
+ end
+ else Error (reeBadLinePairedSeparator);
+ end; { of procedure TRegExpr.SetLinePairedSeparator
+--------------------------------------------------------------}
+
+function TRegExpr.GetLinePairedSeparator : RegExprString;
+ begin
+ if fLinePairedSeparatorAssigned then begin
+ {$IFDEF UniCode}
+ // Here is some UniCode 'magic'
+ // If You do know better decision to concatenate
+ // two WideChars, please, let me know!
+ Result := fLinePairedSeparatorHead; //###0.947
+ Result := Result + fLinePairedSeparatorTail;
+ {$ELSE}
+ Result := fLinePairedSeparatorHead + fLinePairedSeparatorTail;
+ {$ENDIF}
+ end
+ else Result := '';
+ end; { of function TRegExpr.GetLinePairedSeparator
+--------------------------------------------------------------}
+
+function TRegExpr.Substitute (const ATemplate : RegExprString) : RegExprString;
+// perform substitutions after a regexp match
+// completely rewritten in 0.929
+ var
+ TemplateLen : integer;
+ TemplateBeg, TemplateEnd : PRegExprChar;
+ p, p0, ResultPtr : PRegExprChar;
+ ResultLen : integer;
+ n : integer;
+ Ch : REChar;
+ function ParseVarName (var APtr : PRegExprChar) : integer;
+ // extract name of variable (digits, may be enclosed with
+ // curly braces) from APtr^, uses TemplateEnd !!!
+ const
+ Digits = ['0' .. '9'];
+ var
+ p : PRegExprChar;
+ Delimited : boolean;
+ begin
+ Result := 0;
+ p := APtr;
+ Delimited := (p < TemplateEnd) and (p^ = '{');
+ if Delimited
+ then inc (p); // skip left curly brace
+ if (p < TemplateEnd) and (p^ = '&')
+ then inc (p) // this is '$&' or '${&}'
+ else
+ while (p < TemplateEnd) and
+// Eugene: 20080407
+// {$IFDEF UniCode} //###0.935
+// (ord (p^) < 256) and (char (p^) in Digits)
+// {$ELSE}
+ CharInSet(p^ , Digits)
+// {$ENDIF}
+ do begin
+ Result := Result * 10 + (ord (p^) - ord ('0')); //###0.939
+ inc (p);
+ end;
+ if Delimited then
+ if (p < TemplateEnd) and (p^ = '}')
+ then inc (p) // skip right curly brace
+ else p := APtr; // isn't properly terminated
+ if p = APtr
+ then Result := -1; // no valid digits found or no right curly brace
+ APtr := p;
+ end;
+ begin
+ // Check programm and input string
+ if not IsProgrammOk
+ then EXIT;
+ if not Assigned (fInputString) then begin
+ Error (reeNoInpitStringSpecified);
+ EXIT;
+ end;
+ // Prepare for working
+ TemplateLen := length (ATemplate);
+ if TemplateLen = 0 then begin // prevent nil pointers
+ Result := '';
+ EXIT;
+ end;
+ TemplateBeg := pointer (ATemplate);
+ TemplateEnd := TemplateBeg + TemplateLen;
+ // Count result length for speed optimization.
+ ResultLen := 0;
+ p := TemplateBeg;
+ while p < TemplateEnd do begin
+ Ch := p^;
+ inc (p);
+ if Ch = '$'
+ then n := ParseVarName (p)
+ else n := -1;
+ if n >= 0 then begin
+ if (n < NSUBEXP) and Assigned (startp [n]) and Assigned (endp [n])
+ then inc (ResultLen, endp [n] - startp [n]);
+ end
+ else begin
+ if (Ch = '\') and (p < TemplateEnd)
+ then inc (p); // quoted or special char followed
+ inc (ResultLen);
+ end;
+ end;
+ // Get memory. We do it once and it significant speed up work !
+ if ResultLen = 0 then begin
+ Result := '';
+ EXIT;
+ end;
+ SetString (Result, nil, ResultLen);
+ // Fill Result
+ ResultPtr := pointer (Result);
+ p := TemplateBeg;
+ while p < TemplateEnd do begin
+ Ch := p^;
+ inc (p);
+ if Ch = '$'
+ then n := ParseVarName (p)
+ else n := -1;
+ if n >= 0 then begin
+ p0 := startp [n];
+ if (n < NSUBEXP) and Assigned (p0) and Assigned (endp [n]) then
+ while p0 < endp [n] do begin
+ ResultPtr^ := p0^;
+ inc (ResultPtr);
+ inc (p0);
+ end;
+ end
+ else begin
+ if (Ch = '\') and (p < TemplateEnd) then begin // quoted or special char followed
+ Ch := p^;
+ inc (p);
+ end;
+ ResultPtr^ := Ch;
+ inc (ResultPtr);
+ end;
+ end;
+ end; { of function TRegExpr.Substitute
+--------------------------------------------------------------}
+
+procedure TRegExpr.Split (AInputStr : RegExprString; APieces : TStrings);
+ var PrevPos : integer;
+ begin
+ PrevPos := 1;
+ if Exec (AInputStr) then
+ REPEAT
+ APieces.Add (System.Copy (AInputStr, PrevPos, MatchPos [0] - PrevPos));
+ PrevPos := MatchPos [0] + MatchLen [0];
+ UNTIL not ExecNext;
+ APieces.Add (System.Copy (AInputStr, PrevPos, MaxInt)); // Tail
+ end; { of procedure TRegExpr.Split
+--------------------------------------------------------------}
+
+function TRegExpr.Replace (AInputStr : RegExprString; const AReplaceStr : RegExprString;
+ AUseSubstitution : boolean{$IFDEF D4_}= False{$ENDIF}) : RegExprString;
+ var PrevPos : integer;
+ begin
+ Result := '';
+ PrevPos := 1;
+ if Exec (AInputStr) then
+ REPEAT
+ Result := Result + System.Copy (AInputStr, PrevPos,
+ MatchPos [0] - PrevPos);
+ if AUseSubstitution //###0.946
+ then Result := Result + Substitute (AReplaceStr)
+ else Result := Result + AReplaceStr;
+ PrevPos := MatchPos [0] + MatchLen [0];
+ UNTIL not ExecNext;
+ Result := Result + System.Copy (AInputStr, PrevPos, MaxInt); // Tail
+ end; { of function TRegExpr.Replace
+--------------------------------------------------------------}
+
+
+{=============================================================}
+{====================== Debug section ========================}
+{=============================================================}
+
+{$IFDEF DebugRegExpr}
+function TRegExpr.DumpOp (op : TREOp) : RegExprString;
+// printable representation of opcode
+ begin
+ case op of
+ BOL: Result := 'BOL';
+ EOL: Result := 'EOL';
+ BOLML: Result := 'BOLML';
+ EOLML: Result := 'EOLML';
+ BOUND: Result := 'BOUND'; //###0.943
+ NOTBOUND: Result := 'NOTBOUND'; //###0.943
+ ANY: Result := 'ANY';
+ ANYML: Result := 'ANYML'; //###0.941
+ ANYLETTER: Result := 'ANYLETTER';
+ NOTLETTER: Result := 'NOTLETTER';
+ ANYDIGIT: Result := 'ANYDIGIT';
+ NOTDIGIT: Result := 'NOTDIGIT';
+ ANYSPACE: Result := 'ANYSPACE';
+ NOTSPACE: Result := 'NOTSPACE';
+ ANYOF: Result := 'ANYOF';
+ ANYBUT: Result := 'ANYBUT';
+ ANYOFCI: Result := 'ANYOF/CI';
+ ANYBUTCI: Result := 'ANYBUT/CI';
+ BRANCH: Result := 'BRANCH';
+ EXACTLY: Result := 'EXACTLY';
+ EXACTLYCI: Result := 'EXACTLY/CI';
+ NOTHING: Result := 'NOTHING';
+ COMMENT: Result := 'COMMENT';
+ BACK: Result := 'BACK';
+ EEND: Result := 'END';
+ BSUBEXP: Result := 'BSUBEXP';
+ BSUBEXPCI: Result := 'BSUBEXP/CI';
+ Succ (OPEN) .. TREOp (Ord (OPEN) + NSUBEXP - 1): //###0.929
+ Result := Format ('OPEN[%d]', [ord (op) - ord (OPEN)]);
+ Succ (CLOSE) .. TREOp (Ord (CLOSE) + NSUBEXP - 1): //###0.929
+ Result := Format ('CLOSE[%d]', [ord (op) - ord (CLOSE)]);
+ STAR: Result := 'STAR';
+ PLUS: Result := 'PLUS';
+ BRACES: Result := 'BRACES';
+ {$IFDEF ComplexBraces}
+ LOOPENTRY: Result := 'LOOPENTRY'; //###0.925
+ LOOP: Result := 'LOOP'; //###0.925
+ LOOPNG: Result := 'LOOPNG'; //###0.940
+ {$ENDIF}
+ ANYOFTINYSET: Result:= 'ANYOFTINYSET';
+ ANYBUTTINYSET:Result:= 'ANYBUTTINYSET';
+ {$IFDEF UseSetOfChar} //###0.929
+ ANYOFFULLSET: Result:= 'ANYOFFULLSET';
+ {$ENDIF}
+ STARNG: Result := 'STARNG'; //###0.940
+ PLUSNG: Result := 'PLUSNG'; //###0.940
+ BRACESNG: Result := 'BRACESNG'; //###0.940
+ else Error (reeDumpCorruptedOpcode);
+ end; {of case op}
+ Result := ':' + Result;
+ end; { of function TRegExpr.DumpOp
+--------------------------------------------------------------}
+
+function TRegExpr.Dump : RegExprString;
+// dump a regexp in vaguely comprehensible form
+ var
+ s : PRegExprChar;
+ op : TREOp; // Arbitrary non-END op.
+ next : PRegExprChar;
+ i : integer;
+{$IFDEF UseSetOfChar} //###0.929
+ Ch : REChar;
+{$ENDIF}
+ begin
+ if not IsProgrammOk //###0.929
+ then EXIT;
+
+ op := EXACTLY;
+ Result := '';
+ s := programm + REOpSz;
+ while op <> EEND do begin // While that wasn't END last time...
+ op := s^;
+ Result := Result + Format ('%2d%s', [s - programm, DumpOp (s^)]); // Where, what.
+ next := regnext (s);
+ if next = nil // Next ptr.
+ then Result := Result + ' (0)'
+ else Result := Result + Format (' (%d) ', [(s - programm) + (next - s)]);
+ inc (s, REOpSz + RENextOffSz);
+ if (op = ANYOF) or (op = ANYOFCI) or (op = ANYBUT) or (op = ANYBUTCI)
+ or (op = EXACTLY) or (op = EXACTLYCI) then begin
+ // Literal string, where present.
+ while s^ <> #0 do begin
+ Result := Result + s^;
+ inc (s);
+ end;
+ inc (s);
+ end;
+ if (op = ANYOFTINYSET) or (op = ANYBUTTINYSET) then begin
+ for i := 1 to TinySetLen do begin
+ Result := Result + s^;
+ inc (s);
+ end;
+ end;
+ if (op = BSUBEXP) or (op = BSUBEXPCI) then begin
+ Result := Result + ' \' + IntToStr (Ord (s^));
+ inc (s);
+ end;
+ {$IFDEF UseSetOfChar} //###0.929
+ if op = ANYOFFULLSET then begin
+ for Ch := #0 to #255 do
+ if Ch in PSetOfREChar (s)^ then
+ if Ch < ' '
+ then Result := Result + '#' + IntToStr (Ord (Ch)) //###0.936
+ else Result := Result + Ch;
+ inc (s, SizeOf (TSetOfREChar));
+ end;
+ {$ENDIF}
+ if (op = BRACES) or (op = BRACESNG) then begin //###0.941
+ // show min/max argument of BRACES operator
+ Result := Result + Format ('{%d,%d}', [PREBracesArg (s)^, PREBracesArg (s + REBracesArgSz)^]);
+ inc (s, REBracesArgSz * 2);
+ end;
+ {$IFDEF ComplexBraces}
+ if (op = LOOP) or (op = LOOPNG) then begin //###0.940
+ Result := Result + Format (' -> (%d) {%d,%d}', [
+ (s - programm - (REOpSz + RENextOffSz)) + PRENextOff (s + 2 * REBracesArgSz)^,
+ PREBracesArg (s)^, PREBracesArg (s + REBracesArgSz)^]);
+ inc (s, 2 * REBracesArgSz + RENextOffSz);
+ end;
+ {$ENDIF}
+ Result := Result + #$d#$a;
+ end; { of while}
+
+ // Header fields of interest.
+
+ if regstart <> #0
+ then Result := Result + 'start ' + regstart;
+ if reganch <> #0
+ then Result := Result + 'anchored ';
+ if regmust <> nil
+ then Result := Result + 'must have ' + regmust;
+ {$IFDEF UseFirstCharSet} //###0.929
+ Result := Result + #$d#$a'FirstCharSet:';
+ for Ch := #0 to #255 do
+ if Ch in FirstCharSet
+ then Result := Result + Ch;
+ {$ENDIF}
+ Result := Result + #$d#$a;
+ end; { of function TRegExpr.Dump
+--------------------------------------------------------------}
+{$ENDIF}
+
+{$IFDEF reRealExceptionAddr}
+{$OPTIMIZATION ON}
+// ReturnAddr works correctly only if compiler optimization is ON
+// I placed this method at very end of unit because there are no
+// way to restore compiler optimization flag ...
+{$ENDIF}
+procedure TRegExpr.Error (AErrorID : integer);
+{$IFDEF reRealExceptionAddr}
+ function ReturnAddr : pointer; //###0.938
+ asm
+ mov eax,[ebp+4]
+ end;
+{$ENDIF}
+ var
+ e : ERegExpr;
+ begin
+ fLastError := AErrorID; // dummy stub - useless because will raise exception
+ if AErrorID < 1000 // compilation error ?
+ then e := ERegExpr.Create (ErrorMsg (AErrorID) // yes - show error pos
+ + ' (pos ' + IntToStr (CompilerErrorPos) + ')')
+ else e := ERegExpr.Create (ErrorMsg (AErrorID));
+ e.ErrorCode := AErrorID;
+ e.CompilerErrorPos := CompilerErrorPos;
+ raise e
+ {$IFDEF reRealExceptionAddr}
+ At ReturnAddr; //###0.938
+ {$ENDIF}
+ end; { of procedure TRegExpr.Error
+--------------------------------------------------------------}
+
+// be carefull - placed here code will be always compiled with
+// compiler optimization flag
+initialization
+ RegExprInvertCaseFunction := TRegExpr.InvertCaseFunction;
+end.
+
+
+
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDARemoteCommand.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDARemoteCommand.pas
new file mode 100644
index 0000000..269c565
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDARemoteCommand.pas
@@ -0,0 +1,160 @@
+unit uDARemoteCommand;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ Classes, uRORemoteService, DataAbstract4_Intf,
+ uDAInterfaces, uRODynamicRequest, uROTypes;
+
+type
+ { TRORemoteCommandRequest }
+ TRORemoteCommandRequest = class(TRODynamicRequest)
+ private
+ fOutgoingCommandNameParameter: string;
+ fOutgoingParametersParameter: string;
+ fIncomingAffectedRowsParameter: string;
+ fIncomingParametersParameter: string;
+ public
+ constructor Create(aOwner : TComponent); override;
+ procedure SetupDefaultRequest; virtual;
+ published
+ property OutgoingCommandNameParameter: string read fOutgoingCommandNameParameter write fOutgoingCommandNameParameter;
+ property OutgoingParametersParameter: string read fOutgoingParametersParameter write fOutgoingParametersParameter;
+ property IncomingAffectedRowsParameter: string read fIncomingAffectedRowsParameter write fIncomingAffectedRowsParameter;
+ property IncomingParametersParameter: string read fIncomingParametersParameter write fIncomingParametersParameter;
+ end;
+
+ { TDARemoteCommand }
+ TDARemoteCommand = class(TComponent)
+ private
+ fRemoteService: TRORemoteService;
+ fExecuteCall: TRORemoteCommandRequest;
+ procedure SetRemoteService(const Value: TRORemoteService);
+ procedure FillCommandParams(aDataParameterArray: DataParameterArray; aCommandParam: TRORequestParam);
+ public
+ constructor Create(aOwner: TComponent); override;
+ destructor Destroy; override;
+ function Execute(aCommandName: string; aInputParameters: DataParameterArray): integer; overload;
+ function Execute(aCommandName: string; aParamNames: array of string; aParamValues: array of variant): integer; overload;
+ published
+ property RemoteService: TRORemoteService read fRemoteService write SetRemoteService;
+ property ExecuteCall: TRORemoteCommandRequest read fExecuteCall write fExecuteCall;
+ end;
+
+implementation
+
+uses
+ SysUtils, Dialogs, uRODL;
+
+{ TRORemoteCommandRequest }
+constructor TRORemoteCommandRequest.Create(aOwner : TComponent);
+begin
+ inherited;
+ Self.SetupDefaultRequest();
+end;
+
+procedure TRORemoteCommandRequest.SetupDefaultRequest;
+begin
+ Params.Clear();
+ OutgoingCommandNameParameter := Params.Add('aCommandName', rtString, fIn).Name;
+ OutgoingParametersParameter := Params.Add('aParameterArray', rtUserDefined, fIn, 'DataParameterArray').Name;
+ IncomingAffectedRowsParameter := Params.Add('Result', rtInteger, fResult).Name;
+ IncomingParametersParameter := '';
+
+ MethodName := 'ExecuteCommand';
+end;
+
+{ TDARemoteCommand }
+constructor TDARemoteCommand.Create(aOwner: TComponent);
+begin
+ inherited;
+ fExecuteCall := TRORemoteCommandRequest.Create(Self);
+ fExecuteCall.Name := 'RemoteCommandRequest';
+end;
+
+destructor TDARemoteCommand.Destroy;
+begin
+ if Assigned(fExecuteCall) then fExecuteCall.Free();
+ inherited;
+end;
+
+procedure TDARemoteCommand.SetRemoteService(const Value: TRORemoteService);
+begin
+ if Value <> fRemoteService then begin
+ fRemoteService := Value;
+ if assigned(fRemoteService) then fRemoteService.FreeNotification(self);
+ fExecuteCall.RemoteService := fRemoteService;
+ end;
+end;
+
+function TDARemoteCommand.Execute(aCommandName: string; aInputParameters: DataParameterArray): integer;
+var
+ lParam : TRORequestParam;
+begin
+ result := 0;
+ if not Assigned(fExecuteCall) then raise Exception.Create('ExecuteCall is unassigned');
+ if (Length(fExecuteCall.OutgoingCommandNameParameter)>0) then
+ fExecuteCall.ParamByName(fExecuteCall.OutgoingCommandNameParameter).Value := aCommandName;
+ if (Length(fExecuteCall.OutgoingParametersParameter)>0) then begin
+ lParam := fExecuteCall.Params.FindParam(fExecuteCall.OutgoingParametersParameter);
+ if Assigned(lParam) then FillCommandParams(aInputParameters, lparam);
+ end;
+
+ fExecuteCall.Execute();
+
+ if (Length(fExecuteCall.IncomingAffectedRowsParameter)>0) then
+ result := Integer(fExecuteCall.ParamByName(fExecuteCall.IncomingAffectedRowsParameter).Value);
+end;
+
+function TDARemoteCommand.Execute(aCommandName: string; aParamNames: array of string; aParamValues: array of variant): integer;
+var
+ i, idx: Integer;
+ lInputParameters: DataParameterArray;
+begin
+ lInputParameters := DataParameterArray.Create();
+ if (High(aParamNames) <> High(aParamValues)) then raise Exception.Create('Error in parameters. Count of parameter values doesn''t correspond to count of parameters');
+
+ for i := Low(aParamNames) to High(aParamNames) do begin
+ idx := lInputParameters.Add(DataParameter.Create());
+ lInputParameters[idx].Name := aParamNames[i];
+ lInputParameters[idx].Value := aParamValues[i];
+ end;
+
+ result := Self.Execute(aCommandName, lInputParameters);
+end;
+
+procedure TDARemoteCommand.FillCommandParams(aDataParameterArray: DataParameterArray; aCommandParam: TRORequestParam);
+var
+ lArray: DataParameterArray;
+ lParam: DataParameter;
+ i: integer;
+begin
+ if (aCommandParam.DataType <> rtUserDefined) or (aCommandParam.TypeName <> 'DataParameterArray') then exit;
+
+ lArray := DataParameterArray.Create();
+
+ for i := 0 to aDataParameterArray.Count - 1 do begin
+ lParam := lArray.Add();
+ lParam.Name := aDataParameterArray[i].Name;
+ lParam.Value := aDataParameterArray[i].Value;
+ end;
+
+ aCommandParam.AsComplexType := lArray;
+ aCommandParam.OwnsComplexType := true;
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDARemoteDataAdapter.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDARemoteDataAdapter.pas
new file mode 100644
index 0000000..d21ec04
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDARemoteDataAdapter.pas
@@ -0,0 +1,1044 @@
+unit uDARemoteDataAdapter;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ Classes,
+ uRODynamicRequest, uRORemoteService,
+ uDAInterfaces, uDAClasses, uDADataStreamer, uDADataTable, uDADelta,
+ uDARemoteDataAdapterRequests, DataAbstract4_Intf;
+
+type
+ TDARequestEvent = procedure(Sender: TObject; Request: TRODynamicRequest) of object;
+ TDAApplyUpdatesEvent = procedure(Sender: TObject; aTable: TDADataTable; const Delta: IDADelta) of object;
+ TDAFailureBehavior = (fbNone, fbRaiseException, fbShowReconcile, fbBoth);
+ TDABeforeProcessFailuresEvent = procedure(Sender: TObject; aTablesList: TList; aFailedDeltas: TList; var aFailureBehavior: TDAFailureBehavior) of object;
+ TDAOnGenerateRecordMessage = procedure(Sender: TObject; aChange: TDADeltaChange; ADatatable: TDADataTable; var aMessage: string) of object;
+
+ TDAReconcileDialogAction = (rdlgNone,rdlgSkip,rdlgCancel, rdlgRepost, rdlgRevert);
+ TDAShowReconcileRecordInAppUIEvent = procedure(Sender: TObject; aChange: TDADeltaChange; aDatatable: TDADataTable; var aHandled: Boolean; var aAction: TDAReconcileDialogAction) of object;
+ TDAShowReconcleDialogEvent = procedure(Sender: TObject; var AFailedDeltaList: TList; aTableList: TList; var aHandled: boolean) of object;
+
+ { TDARemoteDataAdapter }
+ TDARemoteDataAdapter = class(TDABaseRemoteDataAdapter)
+ private
+ fGetDataCall: TDAGetDataRequest;
+ fGetSchemaCall: TDAGetSchemaRequest;
+ fUpdateDataCall: TDAUpdateDataRequest;
+ fGetScriptsCall: TDAGetScriptsRequest;
+ fRemoteService: TRORemoteService;
+ fDataStreamer: TDADataStreamer;
+ fSchema: TDASchema;
+ fCacheSchema: boolean;
+
+ fBeforeGetDataCall, fAfterGetDataCall,
+ fBeforeGetSchemaCall, fAfterGetSchemaCall,
+ fBeforeGetScriptsCall, fAfterGetScriptsCall,
+ fBeforeUpdateDataCall, fAfterUpdateDataCall: TDARequestEvent;
+ fBeforeApplyUpdates, fAfterApplyUpdates: TDAApplyUpdatesEvent;
+ fBeforeProcessFailures: TDABeforeProcessFailuresEvent;
+ fAutoFillScripts: Boolean;
+ FFailureBehavior: TDAFailureBehavior;
+ FOnGenerateRecordMessage: TDAOnGenerateRecordMessage;
+ fOnShowReconcleRecordInAppUI: TDAShowReconcileRecordinAppUIEvent;
+ fOnShowReconcleDialog: TDAShowReconcleDialogEvent;
+ FDynamicSelect: Boolean;
+
+ procedure SetCacheSchema(const Value: boolean);
+ function CreateTableRequestInfo(aTable: TDADataTable; aIncludeSchema: boolean; aDynamicWhereExpression: TDAWhereExpression = nil): TableRequestInfo;
+ procedure DoGetSchemaCall;
+ function GetSchema: TDASchema;
+ procedure FillTableNamesParam(aTables: array of TDADataTable; aParam: TRORequestParam);
+ procedure SetDataStreamer(const Value: TDADataStreamer);
+ procedure SetRemoteService(const Value: TRORemoteService);
+ procedure FillTableParams(aTables: array of TDADataTable; aParam: TRORequestParam);
+ procedure ThrowFailures(ATableList,AFailedDeltas:TList);
+ protected
+ procedure Notification(AComponent: TComponent; Operation: TOperation); override;
+ function GetDataStreamer: TDADataStreamer; override;
+ procedure Loaded; override;
+
+ { backward compatibility: to provide access to these in the legacy events in TDADataTable}
+ function Get_GetSchemaCall: TDARemoteRequest; override;
+ function Get_GetDataCall: TDARemoteRequest; override;
+ function Get_UpdateDataCall: TDARemoteRequest; override;
+ function Get_GetScriptsCall: TDARemoteRequest; override;
+ public
+ constructor Create(aOwner: TComponent); override;
+ destructor Destroy; override;
+ procedure SetupDefaultRequestV3;
+ procedure SetupDefaultRequest;
+
+ procedure CheckProperties;
+
+ function ApplyUpdates(aTables: array of TDADataTable; aRefetchAll: boolean = false): boolean; override;
+ procedure Fill(aTables: array of TDADataTable; aSaveCursor: boolean=false; aIncludeSchema: boolean=false); overload; override;
+ procedure Fill(aTables: array of TDADataTable; aTableRequestInfoArray: array of TableRequestInfo; aSaveCursor: boolean=false; aIncludeSchema: boolean=false); overload; override;
+ procedure Fill(aTables: array of TDADataTable; aWhereClauses : array of TDAWhereExpression; aSaveCursor: boolean=false; aIncludeSchema: boolean=false); overload; override;
+ procedure FillSchema(aTables: array of TDADataTable; aPreserveLookupFields: boolean = false; aPreserveClientCalcFields : boolean = false); override;
+ procedure FillScripts(aTables: array of TDADataTable); override;
+
+ function ReadSchema(aForceReRead: boolean = false): TDASchema;
+ procedure FlushSchema;
+ property Schema: TDASchema read GetSchema;
+
+ published
+ property GetSchemaCall: TDAGetSchemaRequest read fGetSchemaCall;
+ property GetDataCall: TDAGetDataRequest read fGetDataCall;
+ property UpdateDataCall: TDAUpdateDataRequest read fUpdateDataCall;
+ property GetScriptsCall: TDAGetScriptsRequest read fGetScriptsCall;
+ property RemoteService: TRORemoteService read fRemoteService write SetRemoteService;
+ property DataStreamer: TDADataStreamer read fDataStreamer write SetDataStreamer;
+
+ property CacheSchema: boolean read fCacheSchema write SetCacheSchema default false;
+ property AutoFillScripts: Boolean read fAutoFillScripts write fAutoFillScripts default false;
+
+ property BeforeGetDataCall: TDARequestEvent read fBeforeGetDataCall write fBeforeGetDataCall;
+ property AfterGetDataCall: TDARequestEvent read fAfterGetDataCall write fAfterGetDataCall;
+ property BeforeGetSchemaCall: TDARequestEvent read fBeforeGetSchemaCall write fBeforeGetSchemaCall;
+ property AfterGetSchemaCall: TDARequestEvent read fAfterGetSchemaCall write fAfterGetSchemaCall;
+ property BeforeGetScriptsCall: TDARequestEvent read fBeforeGetScriptsCall write fBeforeGetScriptsCall;
+ property AfterGetScriptsCall: TDARequestEvent read fAfterGetScriptsCall write fAfterGetScriptsCall;
+ property BeforeUpdateDataCall: TDARequestEvent read fBeforeUpdateDataCall write fBeforeUpdateDataCall;
+ property AfterUpdateDataCall: TDARequestEvent read fAfterUpdateDataCall write fAfterUpdateDataCall;
+ property BeforeApplyUpdates: TDAApplyUpdatesEvent read fBeforeApplyUpdates write fBeforeApplyUpdates;
+ property AfterApplyUpdates: TDAApplyUpdatesEvent read fAfterApplyUpdates write fAfterApplyUpdates;
+ property BeforeProcessFailures: TDABeforeProcessFailuresEvent read fBeforeProcessFailures write fBeforeProcessFailures;
+ property FailureBehavior: TDAFailureBehavior read FFailureBehavior write FFailureBehavior default fbBoth;
+ property OnGenerateRecordMessage: TDAOnGenerateRecordMessage read FOnGenerateRecordMessage write FOnGenerateRecordMessage;
+
+ property OnShowReconcleDialog:TDAShowReconcleDialogEvent read fOnShowReconcleDialog write fOnShowReconcleDialog;
+ property OnShowReconcileRecordInAppUI: TDAShowReconcileRecordInAppUIEvent read fOnShowReconcleRecordInAppUI write fOnShowReconcleRecordInAppUI;
+
+ property DynamicSelect: Boolean read FDynamicSelect write FDynamicSelect default False;
+ end;
+
+implementation
+
+uses
+ SysUtils, DB, TypInfo, Variants,
+ uRODL, uROTypes, uROXMLIntf, uROClasses, uDAReconcileDialog;
+
+{ TDARemoteDataAdapter }
+
+procedure TDARemoteDataAdapter.FillTableNamesParam(aTables: array of TDADataTable; aParam: TRORequestParam);
+var
+ lArray: StringArray;
+ i: integer;
+begin
+ case aParam.DataType of
+ rtString: begin // v3 style string
+ if Length(aTables) <> 1 then
+ raise Exception.Create('The current GetDataCall configuration does not allow fetching multiple data tables at once.');
+ aParam.AsString := aTables[Low(aTables)].LogicalName;
+ end;
+ rtUserDefined: begin // v4 style string array
+ lArray := StringArray.Create();
+ lArray.Resize(Length(aTables));
+ for i := Low(aTables) to High(aTables) do
+ lArray[i-Low(aTables)] := AnsiToUtf8(aTables[i].LogicalName);
+ aParam.AsComplexType := lArray;
+ aParam.OwnsComplexType := true;
+ end;
+ end;
+end;
+
+
+type
+ TDATableOptions = record
+ // Fill
+ Bookmark: TBookMark;
+ GoFirst, OldLogChanges: boolean;
+ OldPos: cardinal;
+ // FillSchema
+ FieldHandlers : TStringList;
+ end;
+
+
+procedure TDARemoteDataAdapter.FillTableParams(
+ aTables: array of TDADataTable; aParam: TRORequestParam);
+var
+ lArray: DataParameterArray;
+ lParam: DataParameter;
+ lTable: TDADataTable;
+ j: integer;
+ lList: TStringList;
+begin
+ lArray:=nil; // prevert "W1036 Variable 'lArray' might not have been initialized"
+ case aParam.DataType of
+ rtString: begin // v3 style string
+ if Length(aTables) <> 1 then raise Exception.Create('The current GetDataCall configuration does not allow fetching multiple data tables');
+ with aTables[Low(aTables)].Params do begin
+ if Count<>0 then begin
+ lList:= TStringList.Create;
+ try
+ for j := 0 to Count - 1 do
+ lList.Values[Params[j].Name]:=Params[j].AsString;
+ aParam.AsString:= lList.Text;
+ finally
+ lList.Free;
+ end;
+ end;
+ end;
+ end;
+ rtUserDefined: begin
+ if aParam.TypeName = 'DataParameterArray' then
+ lArray := DataParameterArray.Create();
+
+ lTable := aTables[Low(aTables)];
+ for j := 0 to lTable.Params.Count-1 do begin
+ lParam := lArray.Add();
+ lParam.Name := AnsiToUtf8(lTable.Params[j].Name);
+ lParam.Value := lTable.Params[j].Value;
+ end;
+
+ aParam.AsComplexType := lArray;
+ aParam.OwnsComplexType := true;
+ end;
+ end;
+end;
+
+procedure TDARemoteDataAdapter.Fill(aTables: array of TDADataTable; aTableRequestInfoArray: array of TableRequestInfo; aSaveCursor: boolean=false; aIncludeSchema: boolean=false);
+var
+ lSavedOptions: array of TDATableOptions;
+ lHasTableNamesParameter: Boolean;
+ lParam, lResultParam: TRORequestParam;
+ i: integer;
+ ltablearray: array of TDADataTable;
+ ltableList: TList;
+ llocalList: TList;
+ ltbl: TDADataTable;
+ lArray: TableRequestInfoArray;
+begin
+ if Length(aTables) <> Length(aTableRequestInfoArray) then raise Exception.Create('aTables and aTableRequestInfoArray should contain equal members count.');
+
+ CheckProperties;
+
+ ltableList := TList.Create;
+ llocalList := TList.Create;
+ lArray:= TableRequestInfoArray.Create;
+ try
+ try
+ for i := Low(aTables) to High(aTables) do begin
+ ltbl:=aTables[i];
+ if ltbl = nil then continue;
+ if ltableList.IndexOf(ltbl) = -1 then ltableList.Add(ltbl);
+ ltbl.GetDetailTablesforAllinOneFetch(ltableList,llocalList,True);
+ end;
+ SetLength(ltablearray,ltableList.Count);
+ for i := 0 to ltableList.Count - 1 do
+ ltablearray[i]:=TDADataTable(ltableList[i]);
+ for i := 0 to High(ltablearray) do
+ lArray.Add(nil);
+ for i := 0 to High(aTableRequestInfoArray) do
+ lArray.Items[ltableList.IndexOf(aTables[i])]:=aTableRequestInfoArray[i];
+ for i := 0 to lArray.Count-1 do
+ if lArray.Items[i] = nil then lArray.Items[i]:= CreateTableRequestInfo(ltablearray[i],aIncludeSchema);
+ finally
+ ltableList.Free;
+ llocalList.Free;
+ end;
+ if length(ltablearray) = 0 then Exit;
+ SetLength(lSavedOptions, length(ltablearray));
+ try
+ for i := 0 to High(ltablearray) do begin
+ ltbl:= ltablearray[i];
+ lSavedOptions[i].OldLogChanges := ltbl.LogChanges;
+ ltbl.LogChanges := false;
+ ltbl.InternalSetFetching(true);
+
+ if ltbl.Active then begin
+ lSavedOptions[i].GoFirst := false;
+ if aSaveCursor then
+ lSavedOptions[i].Bookmark := ltbl.GetBookMark;
+ end
+ else begin
+ lSavedOptions[i].GoFirst := true;
+ end;
+ end;
+
+ try
+
+ lParam := GetDataCall.Params.FindParam(GetDataCall.OutgoingTableNamesParameter);
+ lHasTableNamesParameter := assigned(lParam);
+ if lHasTableNamesParameter then
+ FillTableNamesParam(ltablearray, lParam)
+ else if Length(ltablearray) <> 1 then
+ raise Exception.Create('The current GetDataCall configuration does not allow fetching multiple data tables');
+
+ if Length(GetDataCall.OutgoingTableRequestInfosParameter) > 0 then begin
+ lParam := GetDataCall.Params.FindParam(GetDataCall.OutgoingTableRequestInfosParameter);
+ if Assigned(lParam) then begin
+ if (lParam.DataType = rtUserDefined) and (lParam.TypeName = 'TableRequestInfoArray') then begin
+ lParam.AsComplexType := lArray;
+ end;
+ end;
+ end;
+
+ if (GetDataCall.OutgoingParamsParameter <> '') then begin // v3 style call
+ lParam := GetDataCall.Params.FindParam(GetDataCall.OutgoingParamsParameter);
+ if Assigned(lParam) then
+ FillTableParams(ltablearray, lParam);
+ end;
+
+ if (GetDataCall.OutgoingMaxRecordsParameter <> '') then begin // v3 style call
+ if Length(ltablearray) <> 1 then
+ for i := 0 to High(ltablearray) do
+ if ltablearray[i].MaxRecords <> -1 then
+ raise Exception.Create('The current GetDataCall configuration does not allow fetching multiple data tables with a limited record count.');
+ lParam := GetDataCall.Params.FindParam(GetDataCall.OutgoingMaxRecordsParameter);
+ if Assigned(lParam) and (Length(ltablearray) > 0) then lParam.AsInteger := ltablearray[0].MaxRecords;
+ end;
+
+ if (GetDataCall.OutgoingIncludeSchemaParameter <> '') then begin // v3 style call
+ lParam := GetDataCall.Params.FindParam(GetDataCall.OutgoingIncludeSchemaParameter);
+ if Assigned(lParam) then lParam.AsBoolean := aIncludeSchema;
+ end;
+
+ if Assigned(fBeforeGetDataCall) then fBeforeGetDataCall(Self, GetDataCall);
+
+ GetDataCall.Execute();
+ lResultParam := GetDataCall.Params.FindParam(GetDataCall.IncomingDataParameter);
+
+ if Assigned(fAfterGetDataCall) then fAfterGetDataCall(Self, GetDataCall);
+
+ if not assigned(lResultParam) or (lResultParam.DataType <> rtBinary) then
+ raise Exception.Create('Result parameter of GetDataCall is not properly defined.');
+
+ if not assigned(lResultParam.AsBinary) then raise Exception.Create('The server returned a nil buffer.');
+
+ {todo?: oldpos := lResultParam.AsBinary.Position;
+ if Assigned(fOnAfterDataRequestCall) then fOnAfterDataRequestCall(Self, DataRequestCall);
+ if Assigned(fOnReceiveDataStream) then fOnReceiveDataStream(Self, data);
+ lResultParam.AsBinary.Position := oldpos;}
+
+ // Reads the data
+ DataStreamer.Initialize(lResultParam.AsBinary, aiRead);
+ try
+
+ // part 1 - reading schema
+ for i := Low(ltablearray) to High(ltablearray) do
+ begin
+ //if aTables[i].Opening then begin
+ ltbl:= ltablearray[i];
+ if lArray[i].IncludeSchema and not (soIgnoreStreamSchema in ltbl.StreamingOptions) then begin
+ if not lHasTableNamesParameter and (DataStreamer.DatasetCount = 1) then
+ DataStreamer.ReadDataset(DataStreamer.DatasetNames[0], ltbl, true, false)
+ else
+ DataStreamer.ReadDataset(ltbl.LogicalName, ltbl, true, false);
+ end;
+ if not ltbl.Active then ltbl.InitializeDataTable;
+ //end;
+ end;
+
+ // part 2 - reading data
+ for i := Low(ltablearray) to High(ltablearray) do begin
+ ltbl:= ltablearray[i];
+ if not lHasTableNamesParameter and (DataStreamer.DatasetCount = 1) then
+ DataStreamer.ReadDataset(DataStreamer.DatasetNames[0], ltbl, false, true)
+ else
+ DataStreamer.ReadDataset(ltbl.LogicalName, ltbl, false, true);
+ if (moAllInOneFetch in ltbl.MasterOptions) then begin
+ ltbl.DoCascadeOperation(DataStreamer, moAllInOneFetch);
+ end;
+ end;
+ finally
+ DataStreamer.Finalize;
+ end;
+
+ finally
+ lParam := GetDataCall.Params.FindParam(GetDataCall.OutgoingTableRequestInfosParameter);
+ if Assigned(lParam) then lParam.ClearValue;
+ lParam := GetDataCall.Params.FindParam(GetDataCall.OutgoingParamsParameter);
+ if Assigned(lParam) then lParam.ClearValue;
+ lParam := GetDataCall.Params.FindParam(GetDataCall.IncomingDataParameter);
+ if Assigned(lParam) then lParam.ClearValue;
+
+
+ for i := 0 to High(ltablearray) do begin
+ ltbl:= ltablearray[i];
+ if ltbl.Active then begin
+ if lSavedOptions[i].GoFirst then begin
+ ltbl.First;
+ end
+ else begin
+ if aSaveCursor then begin
+ ltbl.GotoBookmark(lSavedOptions[i].Bookmark);
+ ltbl.FreeBookmark(lSavedOptions[i].Bookmark);
+ end;
+ end;
+ end;
+
+ ltbl.LogChanges := lSavedOptions[i].OldLogChanges;
+ ltbl.InternalSetFetching(false);
+ end;
+
+ end;
+ if fAutoFillScripts then FillScripts(ltablearray);
+ finally
+ SetLength(lSavedOptions,0);
+ SetLength(ltablearray,0);
+ end;
+ finally
+ lArray.Free;
+ end;
+end;
+
+procedure TDARemoteDataAdapter.DoGetSchemaCall;
+begin
+ //ToDo: handle aFilter parameter?
+ if Assigned(fBeforeGetSchemaCall) then fBeforeGetSchemaCall(Self, GetSchemaCall);
+ GetSchemaCall.Execute();
+ if Assigned(fAfterGetSchemaCall) then fAfterGetSchemaCall(Self, GetSchemaCall);
+end;
+
+procedure TDARemoteDataAdapter.Fill(aTables: array of TDADataTable; aSaveCursor: boolean=false; aIncludeSchema: boolean=false);
+var
+ lTableRequestInfoArray: array of TableRequestInfo;
+ lTables: array of TDADataTable;
+ i,j: integer;
+begin
+ SetLength(lTableRequestInfoArray, Length(aTables));
+ SetLength(lTables, Length(aTables));
+ j:=0;
+ for i := 0 to High(aTables) do begin
+ if aTables[i] <> nil then begin
+ lTables[j]:=aTables[i];
+ lTableRequestInfoArray[j]:= CreateTableRequestInfo(aTables[j],aIncludeSchema);
+ inc(j);
+ end;
+ end;
+ SetLength(lTables, j);
+ SetLength(lTableRequestInfoArray, j);
+ Fill(lTables, lTableRequestInfoArray, aSaveCursor, aIncludeSchema);
+end;
+
+procedure TDARemoteDataAdapter.Fill(aTables: array of TDADataTable; aWhereClauses: array of TDAWhereExpression; aSaveCursor, aIncludeSchema: boolean);
+var
+ lTableRequestInfoArray: array of TableRequestInfo;
+ lTables: array of TDADataTable;
+ i,j: integer;
+begin
+ if Length(aTables) <> Length(aWhereClauses) then raise Exception.Create('aTables and aWhereClauses should contain equal members count.');
+ SetLength(lTableRequestInfoArray, Length(aTables));
+ SetLength(lTables, Length(aTables));
+ j:=0;
+ for i := 0 to High(aTables) do begin
+ if aTables[i] <> nil then begin
+ lTables[j]:=aTables[i];
+ lTableRequestInfoArray[j]:= CreateTableRequestInfo(aTables[j],aIncludeSchema);
+ inc(j);
+ end;
+ end;
+ SetLength(lTables, j);
+ SetLength(lTableRequestInfoArray, j);
+ Fill(lTables, lTableRequestInfoArray, aSaveCursor,aIncludeSchema);
+end;
+
+procedure TDARemoteDataAdapter.FillSchema(aTables: array of TDADataTable; aPreserveLookupFields, aPreserveClientCalcFields: boolean);
+type
+ THandlerArray = array[0..1] of TMethod;
+ PHandlerArray = ^THandlerArray;
+
+const
+ HandlersToSave : array[0..1] of string = ('OnChange', 'OnValidate');
+
+var
+ lSavedOptions: array of TDATableOptions;
+ i, j, k, lIndex: integer;
+ lHandlers : PHandlerArray;
+ lResultParam: TRORequestParam;
+ lSchema: TDASchema;
+ lDataTableSchema: TDADataset;
+ lookupfields : TDAFieldCollection;
+ clientcalcfields : TDAFieldCollection;
+ lField: TDAField;
+begin
+ CheckProperties;
+
+ SetLength(lSavedOptions, Length(aTables));
+
+ for i := Low(aTables) to High(aTables) do
+ if aTables[i].Active then aTables[i].Close();
+
+ lookupfields := nil;
+ clientcalcfields := nil;
+
+ for i := Low(aTables) to High(aTables) do
+ aTables[i].Fields.FieldEventsDisabled := true;
+ try
+
+ for i := Low(aTables) to High(aTables) do begin
+ lSavedOptions[i-Low(aTables)].FieldHandlers := TStringList.Create;
+
+ { Saves the current event handler pointers }
+ for j := 0 to aTables[i].Fields.Count-1 do begin
+ New(lHandlers);
+ for k := Low(HandlersToSave) to High(HandlersToSave) do
+ lHandlers[k] := GetMethodProp(aTables[i].Fields[j], HandlersToSave[k]);
+ lSavedOptions[i-Low(aTables)].FieldHandlers.AddObject(aTables[i].Fields[j].Name, TObject(lHandlers));
+ end;
+
+ { Save lookup and calced fields}
+ if aPreserveLookupFields then begin
+ lookupfields := TDAFieldCollection.Create(nil);
+ lookupfields.Assign(aTables[i].Fields);
+ for j := (lookupfields.Count-1) downto 0 do
+ if not (lookupfields[j] as TDACustomField).Lookup then
+ lookupfields.Delete(j);
+ end;
+
+ if aPreserveClientCalcFields then begin
+ clientcalcfields := TDAFieldCollection.Create(nil);
+ clientcalcfields.Assign(aTables[i].Fields);
+ for j :=(clientcalcfields.Count-1) downto 0 do
+ if not (clientcalcfields[j] as TDACustomField).Calculated then
+ clientcalcfields.Delete(j);
+ end;
+
+ aTables[i].Fields.Clear;
+ end;
+
+ try
+ lResultParam := GetSchemaCall.Params.FindParam(GetSchemaCall.IncomingSchemaParameter);
+ if not assigned(lResultParam) then
+ raise Exception.Create('Result parameter of GetSchemaCall is not defined.');
+
+ case lResultParam.DataType of
+ rtBinary:begin
+ DoGetSchemaCall();
+ if not assigned(lResultParam.AsBinary) or (lResultParam.AsBinary.Size = 0 ) then
+ raise Exception.Create('Server returned an empty buffer for schema.');
+ DataStreamer.Initialize(lResultParam.AsBinary, aiRead);
+ try
+ if (DataStreamer.DatasetCount = 0) then raise Exception.Create('Stream does not contain any dataset');
+ for i := Low(aTables) to High(aTables) do
+ DataStreamer.ReadDataset(aTables[i].LogicalName, aTables[i], true, false);
+ finally
+ DataStreamer.Finalize;
+ end;
+ end;
+ rtString:begin
+ lSchema := Schema;
+ for i := Low(aTables) to High(aTables) do begin
+ lDataTableSchema := lSchema.Datasets.FindDatasetByName(aTables[i].LogicalName);
+ if not assigned(lDataTableSchema) then
+ lDataTableSchema := lSchema.UnionDataTables.FindUnionDataTableByName(aTables[i].LogicalName);
+ if not assigned(lDataTableSchema) then
+ lDataTableSchema := lSchema.JoinDataTables.FindJoinTableByName(aTables[i].LogicalName);
+ if not assigned(lDataTableSchema) then raise Exception.CreateFmt('Data table "%s" was not found in schema.',[aTables[i].LogicalName]);
+
+ aTables[i].Fields.AssignFieldCollection(lDataTableSchema.Fields);
+ // ToDo: the code below is shared with TableWizard. Refactor.
+ if lDataTableSchema is TDAUnionDataTable then begin
+ if not Assigned(aTables[i].Fields.FindField(def_SourceTableFieldName) as TDAField) then begin
+ lField := aTables[i].Fields.Add();
+ lField.Name := def_SourceTableFieldName;
+ lField.DataType := datInteger;
+ lField.InPrimaryKey := True;
+ lField.ServerAutoRefresh := True;
+ end;
+ end;
+ aTables[i].Params.AssignParamCollection(lDataTableSchema.Params);
+ aTables[i].CustomAttributes.Assign(lDataTableSchema.CustomAttributes);
+ end;
+ end;
+ else
+ raise Exception.Create('Result parameter of GetSchemaCall is not properly defined as String or Binary.');
+ end;
+ finally
+ { Save lookup and calced fields}
+ if aPreserveLookupFields then
+ for i := Low(aTables) to High(aTables) do
+ for j := 0 to (lookupfields.Count-1) do
+ aTables[i].Fields.Add.Assign(lookupfields[j]);
+ if aPreserveClientCalcFields then
+ for i := Low(aTables) to High(aTables) do
+ for j := 0 to (clientcalcfields.Count-1) do
+ if not Assigned(aTables[i].Fields.FindField(clientcalcfields[j].Name)) then
+ aTables[i].Fields.Add.Assign(clientcalcfields[j]);
+
+ { restores the old event handler pointers }
+ for i := Low(aTables) to High(aTables) do begin
+ for j := 0 to aTables[i].Fields.Count-1 do begin
+ lIndex := lSavedOptions[i-Low(aTables)].FieldHandlers.IndexOf(aTables[i].Fields[j].Name);
+ if lIndex >= 0 then begin
+ lHandlers := PHandlerArray(lSavedOptions[i-Low(aTables)].FieldHandlers.Objects[lIndex]);
+ for k := Low(HandlersToSave) to High(HandlersToSave) do
+ SetMethodProp(aTables[i].Fields[j], HandlersToSave[k], lHandlers[k]);
+ Dispose(lHandlers);
+ end;
+ end;
+ lSavedOptions[i-Low(aTables)].FieldHandlers.Free();
+ end;
+ end;
+
+ finally
+ lResultParam := GetSchemaCall.Params.FindParam(GetSchemaCall.IncomingSchemaParameter);
+ if Assigned(lResultParam) then lResultParam.ClearValue;
+
+ clientcalcfields.Free;
+ lookupfields.Free;
+ for i := Low(aTables) to High(aTables) do
+ aTables[i].Fields.FieldEventsDisabled := false;
+ end;
+end;
+
+procedure TDARemoteDataAdapter.FillScripts(aTables: array of TDADataTable);
+var
+ lXml: IXMLDocument;
+ lScriptNode: IXMLNode;
+ lParam: TDARemoteRequestParam;
+ lResultParam: TRORequestParam;
+ i: integer;
+begin
+ CheckProperties;
+
+ if GetScriptsCall.MethodName = '' then
+ raise Exception.Create('GetScriptsCall.MethodName must be configured to retrieve scripts.');
+
+ try
+ lParam := GetScriptsCall.Params.FindParam(GetScriptsCall.OutgoingTableNamesParameter);
+ if assigned(lParam) then FillTableNamesParam(aTables, lParam);
+
+ GetScriptsCall.Execute();
+
+ lResultParam := GetScriptsCall.Params.FindParam(GetScriptsCall.IncomingScriptParameter);
+
+ if not assigned(lResultParam) or (lResultParam.DataType <> rtString) then
+ raise Exception.Create('Result parameter of GetScriptsCall is not properly defined.');
+
+ if Assigned(fBeforeGetScriptsCall) then fBeforeGetScriptsCall(Self, GetScriptsCall);
+ GetScriptsCall.Execute();
+ if Assigned(fAfterGetScriptsCall) then fAfterGetScriptsCall(Self, GetScriptsCall);
+
+ lXml := NewROXmlDocument;
+ lXml.New;
+ lXml.XML := {$IFDEF UNICODE}UTF8ToWideString{$ELSE}UTF8Decode{$ENDIF}(lResultParam.AsString);
+ for i := Low(aTables) to High(aTables) do begin
+ lScriptNode := lXml.DocumentNode.GetNodeByName(aTables[i].Logicalname);
+ if assigned(lScriptNode) then
+ aTables[i].ScriptCode.Text := VarToWideStr(lScriptNode.Value)
+ else
+ aTables[i].ScriptCode.Text := '';
+ end;
+ finally
+ lParam := GetScriptsCall.Params.FindParam(GetScriptsCall.OutgoingTableNamesParameter);
+ if assigned(lParam) then lParam.ClearValue;
+ lParam := GetScriptsCall.Params.FindParam(GetScriptsCall.IncomingScriptParameter);
+ if assigned(lParam) then lParam.ClearValue;
+ end;
+end;
+
+function TDARemoteDataAdapter.GetDataStreamer: TDADataStreamer;
+begin
+ result := fDataStreamer;
+end;
+
+{$IFDEF FPC}
+procedure List_Union(List1,List2: TList);
+var
+ i: integer;
+begin
+ if List1 = List2 then Exit;
+ for i := 0 to List2.Count-1 do
+ if List1.IndexOf(List2[i])=-1 then
+ List1.Add(List2[i]);
+end;
+{$ENDIF}
+function TDARemoteDataAdapter.ApplyUpdates(aTables: array of TDADataTable; aRefetchAll: boolean): boolean;
+var
+ i,j: integer;
+ lParam, lResultparam: TRORequestParam;
+ details: TList;
+ dt: TDADataTable;
+ lFailedDeltas: TList;
+ lTablesList: TList;
+ lTables: array of TDADataTable;
+begin
+ CheckProperties;
+
+ result := false;
+
+ try
+ { Fill Input Parameters }
+ lParam := UpdateDataCall.Params.FindParam(UpdateDataCall.OutgoingDeltaParameter);
+ if not assigned(lParam) or (lParam.DataType <> rtBinary) then
+ raise Exception.Create('OutgoingDeltaParameter parameter of UpdateDataCall is not properly defined.');
+ lParam.ClearValue();
+
+ SetLength(lTables,Length(aTables));
+ j:=0;
+ for i := Low(aTables) to High(aTables) do
+ if Assigned(aTables[i]) and aTables[i].Active and aTables[i].DeltaInitialized then begin
+ lTables[j]:=aTables[i];
+ inc(j);
+ with aTables[i] do
+ if not (ruoOnPost in RemoteUpdatesOptions) and (State in [dsInsert, dsEdit]) then Post;
+ end;
+ SetLength(lTables,j);
+
+ DataStreamer.Initialize(lParam.AsBinary, aiWrite);
+ try
+ for i := Low(lTables) to High(lTables) do begin
+ //fBeforeApplyUpdates
+ if Assigned(fBeforeApplyUpdates) then fBeforeApplyUpdates(Self, lTables[i], lTables[i].Delta);
+ details:= lTables[i].GetDetailTablesforApplyUpdate;
+ try
+ for j := 0 to details.Count-1 do begin
+ dt:= TDADataTable(details[j]);
+ if Assigned(dt.RemoteDataAdapter) and
+ Assigned(TDARemoteDataAdapter(dt.RemoteDataAdapter).fBeforeApplyUpdates) then TDARemoteDataAdapter(dt.RemoteDataAdapter).fBeforeApplyUpdates(dt.RemoteDataAdapter, dt, dt.Delta);
+ end;
+ finally
+ details.free;
+ end;
+
+ lTables[i].WriteDeltaToStream(DataStreamer);
+ end;
+ finally
+ DataStreamer.Finalize;
+ end;
+
+ { Make call }
+ if DataStreamer.DeltaCount > 0 then begin
+ if Assigned(fBeforeUpdateDataCall) then fBeforeUpdateDataCall(Self, UpdateDataCall);
+ UpdateDataCall.Execute();
+ if Assigned(fAfterUpdateDataCall) then fAfterUpdateDataCall(Self, UpdateDataCall);
+
+ { Get Output Parameters }
+ if UpdateDataCall.IncomingDeltaParameter <> '' then begin // If the result parameter isn't set, we shouldn't check for a result.
+
+ lResultParam := UpdateDataCall.Params.FindParam(UpdateDataCall.IncomingDeltaParameter);
+ if not assigned(lResultParam) or (lResultParam.DataType <> rtBinary) then
+ raise Exception.Create('IncomingDeltaParameter parameter of UpdateDataCall is not properly defined.');
+
+ // Reads the incoming delta, including the details
+ if assigned(lResultParam.AsBinary) and (lResultParam.AsBinary.Size > 0) then begin
+ lFailedDeltas := TList.Create;
+ try
+ DataStreamer.Initialize(lResultParam.AsBinary, aiReadFromBeginning);
+ try
+ for i := Low(lTables) to High(lTables) do
+ lTables[i].ReadDeltaFromStream(DataStreamer, lFailedDeltas);
+ finally
+ DataStreamer.Finalize;
+ end;
+ for i := Low(lTables) to High(lTables) do
+ lTables[i].MergeDelta;
+
+ lTablesList:= TList.Create;
+ try
+ for i := Low(lTables) to High(lTables) do begin
+ lTablesList.Add(lTables[i]);
+ details:= lTables[i].GetDetailTablesforApplyUpdate;
+ try
+ {$IFDEF FPC}
+ List_Union(lTablesList,Details)
+ {$ELSE}
+ lTablesList.Assign(Details, laOr);
+ {$ENDIF}
+ finally
+ details.Free;
+ end;
+ end;
+ ThrowFailures(lTablesList,lFailedDeltas);
+ finally
+ lTablesList.Free;
+ end;
+ //fAfterApplyUpdates
+ for i := Low(lTables) to High(lTables) do begin
+ if Assigned(fAfterApplyUpdates) then fAfterApplyUpdates(Self, lTables[i], nil);
+ details:= lTables[i].GetDetailTablesforApplyUpdate;
+ try
+ for j := 0 to details.Count-1 do begin
+ dt:= TDADataTable(details[j]);
+ if Assigned(dt.RemoteDataAdapter) and
+ Assigned(TDARemoteDataAdapter(dt.RemoteDataAdapter).fAfterApplyUpdates) then TDARemoteDataAdapter(dt.RemoteDataAdapter).fAfterApplyUpdates(dt.RemoteDataAdapter, dt, nil);
+ end;
+ finally
+ details.free;
+ end;
+ end;
+ finally
+ lFailedDeltas.Free;
+ end;
+ end;
+ end
+ else begin
+ for i := Low(lTables) to High(lTables) do
+ lTables[i].MergeDelta;
+ end;
+ end;
+
+ result := true;
+ finally
+ lResultParam := UpdateDataCall.Params.FindParam(UpdateDataCall.IncomingDeltaParameter);
+ if assigned(lResultParam) then lResultParam.ClearValue;
+ lParam := UpdateDataCall.Params.FindParam(UpdateDataCall.OutgoingDeltaParameter);
+ if assigned(lParam) then lParam.ClearValue;
+ end;
+
+ if aRefetchAll and result then begin
+ for i := Low(lTables) to High(lTables) do
+ if lTables[i].Active then lTables[i].Close();
+ for i := Low(lTables) to High(lTables) do
+ lTables[i].Open();
+ end;
+end;
+
+constructor TDARemoteDataAdapter.Create(aOwner: TComponent);
+begin
+ inherited;
+ fGetSchemaCall := TDAGetSchemaRequest.Create(self);
+ fGetDataCall := TDAGetDataRequest.Create(self);
+ fUpdateDataCall := TDAUpdateDataRequest.Create(self);
+ fGetScriptsCall := TDAGetScriptsRequest.Create(self);
+
+ fGetSchemaCall.Name := 'GetSchemaCall';
+ fGetDataCall.Name := 'GetDataCall';
+ fUpdateDataCall.Name := 'UpdateDataCall';
+ fGetScriptsCall.Name := 'GetScriptsCall';
+ FFailureBehavior := fbBoth;
+ FDynamicSelect := False;
+ SetupDefaultRequest;
+end;
+
+function TDARemoteDataAdapter.CreateTableRequestInfo(aTable: TDADataTable; aIncludeSchema: boolean; aDynamicWhereExpression: TDAWhereExpression = nil): TableRequestInfo;
+var
+ lParam: DataParameter;
+ j: integer;
+ lExpression: TDAWhereExpression;
+begin
+ if aDynamicWhereExpression <> nil then
+ lExpression := aDynamicWhereExpression
+ else
+ lExpression := aTable.DynamicWhere.Expression;
+ if lExpression <> nil then lExpression.Validate;
+
+ if FDynamicSelect or (lExpression <> nil) then begin
+ Result := TableRequestInfoV5.Create();
+ if FDynamicSelect then begin
+ TableRequestInfoV5(Result).DynamicSelectFieldNames := StringArray.Create;
+ For j:=0 to aTable.FieldCount-1 do
+ if not aTable.Fields[j].Lookup then
+ TableRequestInfoV5(Result).DynamicSelectFieldNames.Add(AnsiToUtf8(aTable.Fields[j].Name));
+ end;
+ if lExpression <> nil then
+ TableRequestInfoV5(Result).WhereClause:=aTable.DynamicWhere.ExpressionToXmlNode(lExpression);
+ end
+ else
+ Result := TableRequestInfo.Create();
+
+ Result.MaxRecords := aTable.MaxRecords;
+ Result.IncludeSchema := aIncludeSchema and not (soIgnoreStreamSchema in aTable.StreamingOptions);
+ Result.UserFilter := AnsiToUtf8(aTable.Where.Clause);
+ for j := 0 to aTable.Params.Count-1 do begin
+ lParam := Result.Parameters.Add();
+ lParam.Name := AnsiToUtf8(aTable.Params[j].Name);
+ lParam.Value := aTable.Params[j].Value;
+ end;
+end;
+
+destructor TDARemoteDataAdapter.Destroy;
+begin
+ FreeAndNil(fGetSchemaCall);
+ FreeAndNil(fGetDataCall);
+ FreeAndNil(fUpdateDataCall);
+ FreeAndNil(fGetScriptsCall);
+ FreeAndNil(fSchema);
+ inherited;
+end;
+
+procedure TDARemoteDataAdapter.Notification(AComponent: TComponent; Operation: TOperation);
+begin
+ inherited;
+ if Operation = opRemove then begin
+ if AComponent = DataStreamer then DataStreamer := nil
+ else if AComponent = RemoteService then RemoteService := nil;
+ end;
+end;
+
+procedure TDARemoteDataAdapter.SetDataStreamer(const Value: TDADataStreamer);
+begin
+ if Value <> fDataStreamer then begin
+ fDataStreamer := Value;
+ if assigned(fDataStreamer) then fDataStreamer.FreeNotification(self);
+
+ end;
+end;
+
+procedure TDARemoteDataAdapter.SetRemoteService(const Value: TRORemoteService);
+begin
+ if Value <> fRemoteService then begin
+ fRemoteService := Value;
+ if assigned(fRemoteService) then fRemoteService.FreeNotification(self);
+ GetSchemaCall.RemoteService := fRemoteService;
+ GetDataCall.RemoteService := fRemoteService;
+ UpdateDataCall.RemoteService := fRemoteService;
+ GetScriptsCall.RemoteService := fRemoteService;
+ end;
+end;
+
+{ Schema }
+
+procedure TDARemoteDataAdapter.SetCacheSchema(const Value: boolean);
+begin
+ fCacheSchema := Value;
+ if not fCacheSchema then
+ FlushSchema();
+end;
+
+function TDARemoteDataAdapter.GetSchema: TDASchema;
+begin
+ result := ReadSchema(not fCacheSchema);
+end;
+
+function TDARemoteDataAdapter.Get_GetDataCall: TDARemoteRequest;
+begin
+ result := GetDataCall;
+end;
+
+function TDARemoteDataAdapter.Get_GetSchemaCall: TDARemoteRequest;
+begin
+ result := GetSchemaCall;
+end;
+
+function TDARemoteDataAdapter.Get_GetScriptsCall: TDARemoteRequest;
+begin
+ result := GetScriptsCall;
+end;
+
+function TDARemoteDataAdapter.Get_UpdateDataCall: TDARemoteRequest;
+begin
+ result := UpdateDataCall;
+end;
+
+function TDARemoteDataAdapter.ReadSchema(aForceReRead: boolean): TDASchema;
+var
+ lResultParam: TRORequestParam;
+begin
+ CheckProperties;
+
+ lResultParam := GetSchemaCall.Params.FindParam(GetSchemaCall.IncomingSchemaParameter);
+ if not assigned(lResultParam) then
+ raise Exception.Create('Result parameter of GetSchemaCall is not defined.');
+ if not (lResultParam.DataType in [rtString]) then
+ raise Exception.Create('Result parameter of GetSchemaCall is not properly defined as String.');
+
+ if aForceReRead then
+ FreeAndNil(fSchema);
+
+ if not assigned(fSchema) then try
+ DoGetSchemaCall();
+
+ FreeAndNil(fSchema);
+ fSchema := TDASchema.Create(nil);
+ try
+ fSchema.LoadFromXml(Utf8ToAnsi(lResultParam.AsString));
+ except
+ fSchema.LoadFromXml(lResultParam.AsString); // try to load schema as plain text
+ end;
+ finally
+ if Assigned(lResultParam) then lResultParam.ClearValue;
+ end;
+ result := fSchema;
+end;
+
+procedure TDARemoteDataAdapter.FlushSchema;
+begin
+ FreeAndNil(fSchema);
+end;
+
+procedure TDARemoteDataAdapter.SetupDefaultRequest;
+begin
+ GetSchemaCall.SetupDefaultRequest();
+ GetDataCall.SetupDefaultRequest();
+ UpdateDataCall.SetupDefaultRequest();
+ GetScriptsCall.SetupDefaultRequest();
+end;
+
+procedure TDARemoteDataAdapter.SetupDefaultRequestV3;
+begin
+ GetSchemaCall.SetupDefaultRequestV3();
+ GetDataCall.SetupDefaultRequestV3();
+ UpdateDataCall.SetupDefaultRequestV3();
+ GetScriptsCall.SetupDefaultRequestV3();
+end;
+
+procedure TDARemoteDataAdapter.CheckProperties;
+begin
+ Check(not assigned(DataStreamer), Name + '.DataStreamer must be assigned.');
+ Check(not assigned(RemoteService), Name + '.RemoteService must be assigned.');
+ RemoteService.CheckProperties();
+end;
+
+procedure TDARemoteDataAdapter.Loaded;
+begin
+ inherited;
+ {$IFDEF DELPHI6}
+ // Delphi 6 doesn't call Loaded of any of the sub components.
+ fGetDataCall.Loaded;
+ fGetSchemaCall.Loaded;
+ fUpdateDataCall.Loaded;
+ fGetScriptsCall.Loaded;
+ {$ENDIF}
+end;
+
+procedure TDARemoteDataAdapter.ThrowFailures(ATableList, AFailedDeltas: TList);
+var
+ lFailureBehavior: TDAFailureBehavior;
+ lExceptionMessage: string;
+ i,j: integer;
+ lHandled: boolean;
+begin
+ if AFailedDeltas.Count >0 then begin
+ lFailureBehavior:= FFailureBehavior;
+ if Assigned(fBeforeProcessFailures) then fBeforeProcessFailures(Self, ATableList, AFailedDeltas, lFailureBehavior);
+ //(fbNone, fbRaiseException, fbShowReconcile, fbBoth);
+ if lFailureBehavior in [fbShowReconcile, fbBoth] then begin
+ lHandled := false;
+ if assigned(OnShowReconcleDialog) then OnShowReconcleDialog(self, AFailedDeltas, ATableList, lHandled);
+ if not lHandled then ReconcileDialog(Self, AFailedDeltas, ATableList);
+ end;
+ if (AFailedDeltas.Count >0) and (lFailureBehavior in [fbRaiseException, fbBoth]) then begin
+ lExceptionMessage := 'One or more updates failed to apply on the server.'+sLineBreak;
+ for i := 0 to AFailedDeltas.Count-1 do begin
+ lExceptionMessage := lExceptionMessage + sLineBreak ;
+ With TDADeltaChange(AFailedDeltas[i]), Delta do
+ for j := 0 to KeyFieldCount-1 do
+ begin
+
+ if ChangeType = uDAInterfaces.ctDelete then
+ lExceptionMessage := lExceptionMessage + VarToStr(OldValueByName[KeyFieldNames[j]])
+ else
+ lExceptionMessage := lExceptionMessage + VarToStr(NewValueByName[KeyFieldNames[j]]);
+
+ if j = KeyFieldCount-1 then
+ lExceptionMessage := lExceptionMessage + ': '
+ else
+ lExceptionMessage := lExceptionMessage + ', ';
+ end;
+ lExceptionMessage := lExceptionMessage + TDADeltaChange(AFailedDeltas[i]).Message;
+ if i = 10 then break;
+ end;
+ RaiseError(lExceptionMessage);
+ end;
+ end;
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDARemoteDataAdapterRequests.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDARemoteDataAdapterRequests.pas
new file mode 100644
index 0000000..0778c42
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDARemoteDataAdapterRequests.pas
@@ -0,0 +1,317 @@
+unit uDARemoteDataAdapterRequests;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ Classes,
+ uRODynamicRequest;
+
+type
+ { TDARemoteDataAdapterRequest }
+ TDARemoteDataAdapterRequest = class(TRODynamicRequest)
+ private
+ fDefault: boolean;
+ procedure SetDefault(const Value: boolean);
+ protected
+ function IsNotDefault: boolean;
+ procedure MethodNameChanged; override;
+ public
+ procedure Loaded; override;
+ constructor Create(aOwner: TComponent); override;
+ procedure SetupDefaultRequestV3; virtual; abstract;
+ procedure SetupDefaultRequest; virtual;
+ published
+ property Default: boolean read fDefault write SetDefault default true;
+ property Params stored IsNotDefault;
+ property MethodName stored IsNotDefault;
+ end;
+
+ TDAGetSchemaRequest = class(TDARemoteDataAdapterRequest)
+ private
+ fIncomingSchemaParameter: string;
+ fOutgoingFilterParameter: string;
+ procedure SetIncomingSchemaParameter(const Value: string);
+ procedure SetOutgoingFilterParameter(const Value: string);
+ public
+ procedure SetupDefaultRequestV3; override;
+ procedure SetupDefaultRequest; override;
+ published
+ property IncomingSchemaParameter: string read fIncomingSchemaParameter write SetIncomingSchemaParameter stored IsNotDefault;
+ property OutgoingFilterParameter: string read fOutgoingFilterParameter write SetOutgoingFilterParameter stored IsNotDefault;
+ end;
+
+ TDAGetDataRequest = class(TDARemoteDataAdapterRequest)
+ private
+ fIncomingDataParameter: string;
+ fOutgoingTableNamesParameter: string;
+ fOutgoingIncludeSchemaParameter: string;
+ fOutgoingMaxRecordsParameter: string;
+ fOutgoingParamsParameter: string;
+ fOutgoingTableRequestInfosParameter: string;
+ procedure SetIncomingDataParameter(const Value: string);
+ procedure SetOutgoingIncludeSchemaParameter(const Value: string);
+ procedure SetOutgoingMaxRecordsParameter(const Value: string);
+ procedure SetOutgoingParamsParameter(const Value: string);
+ procedure SetOutgoingTableNamesParameter(const Value: string);
+ procedure SetOutgoingTableRequestInfosParameter(const Value: string);
+ public
+ procedure SetupDefaultRequestV3; override;
+ procedure SetupDefaultRequest; override;
+ published
+ property OutgoingTableNamesParameter: string read fOutgoingTableNamesParameter write SetOutgoingTableNamesParameter stored IsNotDefault;
+ property OutgoingTableRequestInfosParameter: string read fOutgoingTableRequestInfosParameter write SetOutgoingTableRequestInfosParameter stored IsNotDefault;
+ property IncomingDataParameter: string read fIncomingDataParameter write SetIncomingDataParameter stored IsNotDefault;
+
+ property OutgoingParamsParameter: string read fOutgoingParamsParameter write SetOutgoingParamsParameter stored IsNotDefault;
+ property OutgoingIncludeSchemaParameter: string read fOutgoingIncludeSchemaParameter write SetOutgoingIncludeSchemaParameter stored IsNotDefault;
+ property OutgoingMaxRecordsParameter: string read fOutgoingMaxRecordsParameter write SetOutgoingMaxRecordsParameter stored IsNotDefault;
+
+ end;
+
+ TDAUpdateDataRequest = class(TDARemoteDataAdapterRequest)
+ private
+ fOutgoingDeltaParameter: string;
+ fIncomingDeltaParameter: string;
+ procedure SetIncomingDeltaParameter(const Value: string);
+ procedure SetOutgoingDeltaParameter(const Value: string);
+ public
+ procedure SetupDefaultRequestV3; override;
+ procedure SetupDefaultRequest; override;
+ published
+ property OutgoingDeltaParameter: string read fOutgoingDeltaParameter write SetOutgoingDeltaParameter stored IsNotDefault;
+ property IncomingDeltaParameter: string read fIncomingDeltaParameter write SetIncomingDeltaParameter stored IsNotDefault;
+ end;
+
+ TDAGetScriptsRequest = class(TDARemoteDataAdapterRequest)
+ private
+ fIncomingScriptParameter: string;
+ fOutgoingTableNamesParameter: string;
+ procedure SetIncomingScriptParameter(const Value: string);
+ procedure SetOutgoingTableNamesParameter(const Value: string);
+ public
+ procedure SetupDefaultRequestV3; override;
+ procedure SetupDefaultRequest; override;
+ published
+ property OutgoingTableNamesParameter: string read fOutgoingTableNamesParameter write SetOutgoingTableNamesParameter stored IsNotDefault;
+ property IncomingScriptParameter: string read fIncomingScriptParameter write SetIncomingScriptParameter stored IsNotDefault;
+ end;
+
+implementation
+
+uses
+ uRODL, uROTypes;
+
+{ TDARemoteDataAdapterRequest }
+
+constructor TDARemoteDataAdapterRequest.Create(aOwner: TComponent);
+begin
+ inherited;
+ SetSubComponent(true);
+ fDefault := true;
+end;
+
+function TDARemoteDataAdapterRequest.IsNotDefault: boolean;
+begin
+ result := not fDefault;
+end;
+
+procedure TDARemoteDataAdapterRequest.Loaded;
+begin
+ inherited;
+ if Default then
+ SetupDefaultRequest();
+end;
+
+procedure TDARemoteDataAdapterRequest.MethodNameChanged;
+begin
+ inherited;
+ Default := false;
+end;
+
+procedure TDARemoteDataAdapterRequest.SetDefault(const Value: boolean);
+begin
+ if fDefault <> Value then begin
+ fDefault := Value;
+ if fDefault then SetupDefaultRequest;
+ end;
+end;
+
+procedure TDARemoteDataAdapterRequest.SetupDefaultRequest;
+begin
+ fDefault := true;
+end;
+
+{ TDAGetSchemaRequest }
+
+procedure TDAGetSchemaRequest.SetIncomingSchemaParameter(const Value: string);
+begin
+ fIncomingSchemaParameter := Value;
+ Default := false;
+end;
+
+procedure TDAGetSchemaRequest.SetOutgoingFilterParameter(const Value: string);
+begin
+ fOutgoingFilterParameter := Value;
+ Default := false;
+end;
+
+procedure TDAGetSchemaRequest.SetupDefaultRequest;
+begin
+ Params.Clear();
+ OutgoingFilterParameter := Params.Add('aFilter', rtString, fIn).Name;
+ IncomingSchemaParameter := Params.Add('Result', rtString, fResult).Name;
+ MethodName := 'GetSchema';
+ inherited;
+end;
+
+procedure TDAGetSchemaRequest.SetupDefaultRequestV3;
+begin
+ Params.Clear();
+ OutgoingFilterParameter := '';
+ IncomingSchemaParameter := Params.Add('Result', rtString, fResult).Name;
+ MethodName := 'GetSchemaAsXML';
+ Default := false;
+end;
+
+{ TDAGetDataRequest }
+
+procedure TDAGetDataRequest.SetIncomingDataParameter(const Value: string);
+begin
+ fIncomingDataParameter := Value;
+ Default := false;
+end;
+
+procedure TDAGetDataRequest.SetOutgoingIncludeSchemaParameter(const Value: string);
+begin
+ fOutgoingIncludeSchemaParameter := Value;
+ Default := false;
+end;
+
+procedure TDAGetDataRequest.SetOutgoingMaxRecordsParameter(const Value: string);
+begin
+ fOutgoingMaxRecordsParameter := Value;
+ Default := false;
+end;
+
+procedure TDAGetDataRequest.SetOutgoingParamsParameter(const Value: string);
+begin
+ fOutgoingParamsParameter := Value;
+ Default := false;
+end;
+
+procedure TDAGetDataRequest.SetOutgoingTableNamesParameter(const Value: string);
+begin
+ fOutgoingTableNamesParameter := Value;
+ Default := false;
+end;
+
+procedure TDAGetDataRequest.SetOutgoingTableRequestInfosParameter(const Value: string);
+begin
+ fOutgoingTableRequestInfosParameter := Value;
+ Default := false;
+end;
+
+procedure TDAGetDataRequest.SetupDefaultRequest;
+begin
+ Params.Clear();
+ OutgoingTableNamesParameter := Params.Add('aTableNameArray', rtUserDefined, fIn, 'StringArray').Name;
+ OutgoingTableRequestInfosParameter := Params.Add('aTableRequestInfoArray', rtUserDefined, fIn, 'TableRequestInfoArray').Name;
+ OutgoingParamsParameter := '';
+ OutgoingIncludeSchemaParameter := '';
+ OutgoingMaxRecordsParameter := '';
+ IncomingDataParameter := Params.Add('Result', rtBinary, fResult).Name;
+ MethodName := 'GetData';
+ inherited;
+end;
+
+procedure TDAGetDataRequest.SetupDefaultRequestV3;
+begin
+ Params.Clear();
+ OutgoingTableNamesParameter := Params.Add('DatasetName', rtString, fIn).Name;
+ OutgoingParamsParameter := Params.Add('Params', rtString, fIn).Name;
+ OutgoingIncludeSchemaParameter := Params.Add('IncludeSchema', rtBoolean, fIn).Name;
+ OutgoingMaxRecordsParameter := Params.Add('MaxRecords', rtInteger, fIn).Name;
+ IncomingDataParameter := Params.Add('Result', rtBinary, fResult).Name;
+ MethodName := 'GetDatasetData';
+ Default := false;
+end;
+
+{ TDAUpdateDataRequest }
+
+procedure TDAUpdateDataRequest.SetIncomingDeltaParameter(const Value: string);
+begin
+ fIncomingDeltaParameter := Value;
+ Default := false;
+end;
+
+procedure TDAUpdateDataRequest.SetOutgoingDeltaParameter(const Value: string);
+begin
+ fOutgoingDeltaParameter := Value;
+ Default := false;
+end;
+
+procedure TDAUpdateDataRequest.SetupDefaultRequest;
+begin
+ Params.Clear();
+ OutgoingDeltaParameter := Params.Add('aDelta', rtBinary, fIn).Name;
+ IncomingDeltaParameter := Params.Add('Result', rtBinary, fResult).Name;
+ MethodName := 'UpdateData';
+ inherited;
+end;
+
+procedure TDAUpdateDataRequest.SetupDefaultRequestV3;
+begin
+ Params.Clear();
+ OutgoingDeltaParameter := Params.Add('Delta', rtBinary, fIn).Name;
+ IncomingDeltaParameter := Params.Add('Result', rtBinary, fResult).Name;
+ MethodName := 'UpdateData';
+ Default := false;
+end;
+
+{ TDAGetScriptsRequest }
+
+procedure TDAGetScriptsRequest.SetIncomingScriptParameter(const Value: string);
+begin
+ fIncomingScriptParameter := Value;
+ Default := false;
+end;
+
+procedure TDAGetScriptsRequest.SetOutgoingTableNamesParameter(const Value: string);
+begin
+ fOutgoingTableNamesParameter := Value;
+ Default := false;
+end;
+
+procedure TDAGetScriptsRequest.SetupDefaultRequest;
+begin
+ Params.Clear();
+ OutgoingTableNamesParameter := Params.Add('DatasetNames', rtString, fIn).Name;
+ IncomingScriptParameter := Params.Add('Result', rtString, fResult).Name;
+ MethodName := 'GetDatasetScripts';
+ inherited;
+end;
+
+procedure TDAGetScriptsRequest.SetupDefaultRequestV3;
+begin
+ Params.Clear();
+ OutgoingTableNamesParameter := Params.Add('DatasetNames', rtString, fIn).Name;
+ IncomingScriptParameter := Params.Add('Result', rtString, fResult).Name;
+ MethodName := 'GetDatasetScripts';
+ Default := false;
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDARes.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDARes.pas
new file mode 100644
index 0000000..7936f66
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDARes.pas
@@ -0,0 +1,99 @@
+unit uDARes;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+//uses uDAInterfaces;
+
+resourcestring
+ err_ChangeLogAlreadyStarted = 'StartChange has already been called; cannot log more than one change at a time.';
+ err_NotAttachedToDataTable = 'Delta is not attached to a DataTable';
+ err_DeltaAttachedToDataTable = 'Cannot perform this operation on a delta that is attached to a DataTable';
+ err_DriverProcAlreadyRegistered = 'DriverProc 0x%0.8x is already registered';
+ err_DriverManagerNotCreated = 'A Data Abstract DriverManager is not currently instantiated';
+ err_DriverManagerAlreadyCreated = 'An instance of a TDADriverManager was already initialized. Only one driver manager per module is allowed';
+ err_DatasetNotAssigned = 'Dataset is not assigned';
+ err_VariantNotSupported = 'Variant type %d is not supported';
+ err_InvalidDestination = 'Invalid destination';
+ err_DriverManagerNotAssigned = 'Driver Manager is not assigned';
+ err_ConnectionManagerNotAssigned = 'Connection Manager is not assigned';
+ err_FieldTypeNotSupported = 'FieldType %s (%d) is not supported';
+ err_NotSupported = 'Not supported';
+ err_DataTypeNotSupportedByRemoteRequest = 'DataType is not supported by RemoteRequest';
+ err_InvalidDataset = 'Invalid or NIL dataset';
+ err_CannotMakeNILDefault = 'Cannot set NIL';
+ err_DifferentOwnerCollection = 'The connection definition is not owned by this collection';
+ err_CannotFindItem = 'Cannot find %s "%s" in collection of type %s';
+ err_InvalidCollectionType = 'Invalid collection type';
+ err_InvalidOwner = 'Invalid owner';
+ err_DriverAlreadyLoaded = 'Driver %s is already loaded';
+ err_DriverIsNotLoaded = 'Driver %s was not loaded';
+ err_InvalidDLL = '%s is not a valid Data Abstract driver';
+ err_UnknownDriver = 'Unknown driver %s';
+ err_UnknownParameter = 'Unknown parameter %s';
+ err_FieldIsNotBound = 'Field is not bound';
+ err_CannotFindField = 'Cannot find field %s';
+ err_LoadPackageFailed = 'LoadPackage failed for file %s';
+ err_InvalidDriverReference = 'The driver in %s could not be loaded';
+ err_CannotFindStatement = 'Cannot find statement %s for connection %s';
+ err_CannotFindDefaultItem = 'Cannot find default %s';
+ err_PoolIsNotEmpty = 'Cannot perform this operation when connections are pooled';
+ err_MaxPoolSizeReached = 'Maximum pool size reached. Cannot create a new connection';
+ err_CannotAccessThisProperty = 'Cannot access this property with the current DataType value';
+ err_LAMEDataset = '%s does not implement IProviderSupport or implements it incorrectly';
+ err_HETConnectionNotSupportedInV3 = 'HET Connections are not supported by te legacy v3 DARemoteService';
+ err_DARDMInvalidSchema = 'Schema must be assigned and must point to a ConnectionManager';
+ err_DARDMMissingConnectionName = 'Cannot acquire a connection without a ConnectionName or a OnBeforeAcquireConnection event handler';
+ err_DARDMUnassignedAdapter = 'DataAdapter is not assigned';
+ err_DARDMConnectionIsNotAssigned = 'Connection is not assigned';
+ err_DARDMCannotFindProxessorForDelta = 'Cannot find a business processor for delta "%s"';
+
+ err_NeedShareMem = 'To use dynamically loaded drivers, you must build your application with ShareMem.';
+
+ err_ExecuteSQLCommandNotAllowed = 'ExecuteSQLCommand is not enabled for this server.';
+
+ err_DatasetNotAccessible = 'Access to dataset %s has not been permitted.';
+ err_CommandNotAccessible = 'executon of command %s has not been permitted.';
+ err_SQLNotPermitted = 'Execution of the specified SQL statement has not been permitted.';
+
+
+const
+ // Connection strings
+ ds_Separator = '?';
+ ds_Database = 'Database';
+ ds_UserID = 'UserID';
+ ds_Password = 'Password';
+ ds_Server = 'Server';
+ ds_AuxDriver = 'AuxDriver';
+
+ // IDE
+ DAPalettePageName = 'RemObjects Data Abstract';
+
+ // Driver access
+ DAFileExtDriver = '.dad';
+ drv_AllDrivers = 'DA*Drv' + DAFileExtDriver; // Driver names are in the format DAxxxxDrv.dad
+
+ // Schema Modeler related
+ DAFileExtSchemaFile = '.daSchema';
+ DAFileExtConnectionMgrFile = '.daConnections';
+ DAFileExtDataDictionaryFile = '.daDictionary';
+ DAFileExtDiagramsFile = '.daDiagrams';
+ DAFileExtConfigFile = '.daConfig';
+
+implementation
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDASQL92Interfaces.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDASQL92Interfaces.pas
new file mode 100644
index 0000000..80ca567
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDASQL92Interfaces.pas
@@ -0,0 +1,269 @@
+unit uDASQL92Interfaces;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Driver Library }
+{ }
+{ compiler: Delphi 6 and up }
+{ platform: Win32 }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+function SQL92_IdentifierNeedsQuoting(const iIdentifier: string): boolean;
+
+implementation
+uses
+ SysUtils, uDAEngine;
+
+var
+ sql92_reservedwords : array of string;
+
+function SQL92_IdentifierNeedsQuoting(const iIdentifier: string): boolean;
+begin
+ Result := (pos('.', iIdentifier) > 0) or TestIdentifier(iIdentifier,sql92_reservedwords);
+end;
+
+procedure SQL92_InitializeReservedWords;
+begin
+ SetLength(sql92_reservedwords, 225);
+ // sorted with TStringList.Sort (bds2007)
+ sql92_reservedwords[0] := 'ABSOLUTE';
+ sql92_reservedwords[1] := 'ACTION';
+ sql92_reservedwords[2] := 'ADD';
+ sql92_reservedwords[3] := 'ALL';
+ sql92_reservedwords[4] := 'ALLOCATE';
+ sql92_reservedwords[5] := 'ALTER';
+ sql92_reservedwords[6] := 'AND';
+ sql92_reservedwords[7] := 'ANY';
+ sql92_reservedwords[8] := 'ARE';
+ sql92_reservedwords[9] := 'AS';
+ sql92_reservedwords[10] := 'ASC';
+ sql92_reservedwords[11] := 'ASSERTION';
+ sql92_reservedwords[12] := 'AT';
+ sql92_reservedwords[13] := 'AUTHORIZATION';
+ sql92_reservedwords[14] := 'AVG';
+ sql92_reservedwords[15] := 'BEGIN';
+ sql92_reservedwords[16] := 'BETWEEN';
+ sql92_reservedwords[17] := 'BIT';
+ sql92_reservedwords[18] := 'BIT_LENGTH';
+ sql92_reservedwords[19] := 'BOTH';
+ sql92_reservedwords[20] := 'BY';
+ sql92_reservedwords[21] := 'CASCADE';
+ sql92_reservedwords[22] := 'CASCADED';
+ sql92_reservedwords[23] := 'CASE';
+ sql92_reservedwords[24] := 'CAST';
+ sql92_reservedwords[25] := 'CATALOG';
+ sql92_reservedwords[26] := 'CHAR';
+ sql92_reservedwords[27] := 'CHAR_LENGTH';
+ sql92_reservedwords[28] := 'CHARACTER';
+ sql92_reservedwords[29] := 'CHARACTER_LENGTH';
+ sql92_reservedwords[30] := 'CHECK';
+ sql92_reservedwords[31] := 'CLOSE';
+ sql92_reservedwords[32] := 'COALESCE';
+ sql92_reservedwords[33] := 'COLLATE';
+ sql92_reservedwords[34] := 'COLLATION';
+ sql92_reservedwords[35] := 'COLUMN';
+ sql92_reservedwords[36] := 'COMMIT';
+ sql92_reservedwords[37] := 'CONNECT';
+ sql92_reservedwords[38] := 'CONNECTION';
+ sql92_reservedwords[39] := 'CONSTRAINT';
+ sql92_reservedwords[40] := 'CONSTRAINTS';
+ sql92_reservedwords[41] := 'CONTINUE';
+ sql92_reservedwords[42] := 'CONVERT';
+ sql92_reservedwords[43] := 'CORRESPONDING';
+ sql92_reservedwords[44] := 'COUNT';
+ sql92_reservedwords[45] := 'CREATE';
+ sql92_reservedwords[46] := 'CROSS';
+ sql92_reservedwords[47] := 'CURRENT';
+ sql92_reservedwords[48] := 'CURRENT_DATE';
+ sql92_reservedwords[49] := 'CURRENT_TIME';
+ sql92_reservedwords[50] := 'CURRENT_TIMESTAMP';
+ sql92_reservedwords[51] := 'CURRENT_USER';
+ sql92_reservedwords[52] := 'DATE';
+ sql92_reservedwords[53] := 'DAY';
+ sql92_reservedwords[54] := 'DEALLOCATE';
+ sql92_reservedwords[55] := 'DEC';
+ sql92_reservedwords[56] := 'DECIMAL';
+ sql92_reservedwords[57] := 'DECLARE';
+ sql92_reservedwords[58] := 'DEFAULT';
+ sql92_reservedwords[59] := 'DEFERRABLE';
+ sql92_reservedwords[60] := 'DEFERRED';
+ sql92_reservedwords[61] := 'DELETE';
+ sql92_reservedwords[62] := 'DESC';
+ sql92_reservedwords[63] := 'DESCRIBE';
+ sql92_reservedwords[64] := 'DESCRIPTOR';
+ sql92_reservedwords[65] := 'DIAGNOSTICS';
+ sql92_reservedwords[66] := 'DISCONNECT';
+ sql92_reservedwords[67] := 'DISTINCT';
+ sql92_reservedwords[68] := 'DOMAIN';
+ sql92_reservedwords[69] := 'DOUBLE';
+ sql92_reservedwords[70] := 'DROP';
+ sql92_reservedwords[71] := 'ELSE';
+ sql92_reservedwords[72] := 'END';
+ sql92_reservedwords[73] := 'END-EXEC';
+ sql92_reservedwords[74] := 'ESCAPE';
+ sql92_reservedwords[75] := 'EXCEPT';
+ sql92_reservedwords[76] := 'EXCEPTION';
+ sql92_reservedwords[77] := 'EXEC';
+ sql92_reservedwords[78] := 'EXECUTE';
+ sql92_reservedwords[79] := 'EXISTS';
+ sql92_reservedwords[80] := 'EXTERNAL';
+ sql92_reservedwords[81] := 'EXTRACT';
+ sql92_reservedwords[82] := 'FALSE';
+ sql92_reservedwords[83] := 'FETCH';
+ sql92_reservedwords[84] := 'FLOAT';
+ sql92_reservedwords[85] := 'FOR';
+ sql92_reservedwords[86] := 'FOREIGN';
+ sql92_reservedwords[87] := 'FOUND';
+ sql92_reservedwords[88] := 'FROM';
+ sql92_reservedwords[89] := 'FULL';
+ sql92_reservedwords[90] := 'GET';
+ sql92_reservedwords[91] := 'GLOBAL';
+ sql92_reservedwords[92] := 'GO';
+ sql92_reservedwords[93] := 'GOTO';
+ sql92_reservedwords[94] := 'GRANT';
+ sql92_reservedwords[95] := 'GROUP';
+ sql92_reservedwords[96] := 'HAVING';
+ sql92_reservedwords[97] := 'HOUR';
+ sql92_reservedwords[98] := 'IDENTITY';
+ sql92_reservedwords[99] := 'IMMEDIATE';
+ sql92_reservedwords[100] := 'IN';
+ sql92_reservedwords[101] := 'INDICATOR';
+ sql92_reservedwords[102] := 'INITIALLY';
+ sql92_reservedwords[103] := 'INNER';
+ sql92_reservedwords[104] := 'INPUT';
+ sql92_reservedwords[105] := 'INSENSITIVE';
+ sql92_reservedwords[106] := 'INSERT';
+ sql92_reservedwords[107] := 'INT';
+ sql92_reservedwords[108] := 'INTEGER';
+ sql92_reservedwords[109] := 'INTERSECT';
+ sql92_reservedwords[110] := 'INTERVAL';
+ sql92_reservedwords[111] := 'INTO';
+ sql92_reservedwords[112] := 'IS';
+ sql92_reservedwords[113] := 'ISOLATION';
+ sql92_reservedwords[114] := 'JOIN';
+ sql92_reservedwords[115] := 'KEY';
+ sql92_reservedwords[116] := 'LANGUAGE';
+ sql92_reservedwords[117] := 'LAST';
+ sql92_reservedwords[118] := 'LEADING';
+ sql92_reservedwords[119] := 'LEFT';
+ sql92_reservedwords[120] := 'LEVEL';
+ sql92_reservedwords[121] := 'LIKE';
+ sql92_reservedwords[122] := 'LOCAL';
+ sql92_reservedwords[123] := 'LOWER';
+ sql92_reservedwords[124] := 'MATCH';
+ sql92_reservedwords[125] := 'MAX';
+ sql92_reservedwords[126] := 'MIN';
+ sql92_reservedwords[127] := 'MINUTE';
+ sql92_reservedwords[128] := 'MODULE';
+ sql92_reservedwords[129] := 'MONTH';
+ sql92_reservedwords[130] := 'NAMES';
+ sql92_reservedwords[131] := 'NATIONAL';
+ sql92_reservedwords[132] := 'NATURAL';
+ sql92_reservedwords[133] := 'NCHAR';
+ sql92_reservedwords[134] := 'NEXT';
+ sql92_reservedwords[135] := 'NO';
+ sql92_reservedwords[136] := 'NOT';
+ sql92_reservedwords[137] := 'NULL';
+ sql92_reservedwords[138] := 'NULLIF';
+ sql92_reservedwords[139] := 'NUMERIC';
+ sql92_reservedwords[140] := 'OCTET_LENGTH';
+ sql92_reservedwords[141] := 'OF';
+ sql92_reservedwords[142] := 'ON';
+ sql92_reservedwords[143] := 'ONLY';
+ sql92_reservedwords[144] := 'OPEN';
+ sql92_reservedwords[145] := 'OPTION';
+ sql92_reservedwords[146] := 'OR';
+ sql92_reservedwords[147] := 'ORDER';
+ sql92_reservedwords[148] := 'OUTER';
+ sql92_reservedwords[149] := 'OUTPUT';
+ sql92_reservedwords[150] := 'OVERLAPS';
+ sql92_reservedwords[151] := 'PAD';
+ sql92_reservedwords[152] := 'PARTIAL';
+ sql92_reservedwords[153] := 'POSITION';
+ sql92_reservedwords[154] := 'PRECISION';
+ sql92_reservedwords[155] := 'PREPARE';
+ sql92_reservedwords[156] := 'PRESERVE';
+ sql92_reservedwords[157] := 'PRIMARY';
+ sql92_reservedwords[158] := 'PRIOR';
+ sql92_reservedwords[159] := 'PRIVILEGES';
+ sql92_reservedwords[160] := 'PROCEDURE';
+ sql92_reservedwords[161] := 'PUBLIC';
+ sql92_reservedwords[162] := 'READ';
+ sql92_reservedwords[163] := 'REAL';
+ sql92_reservedwords[164] := 'REFERENCES';
+ sql92_reservedwords[165] := 'RELATIVE';
+ sql92_reservedwords[166] := 'RESTRICT';
+ sql92_reservedwords[167] := 'REVOKE';
+ sql92_reservedwords[168] := 'RIGHT';
+ sql92_reservedwords[169] := 'ROLLBACK';
+ sql92_reservedwords[170] := 'ROWS';
+ sql92_reservedwords[171] := 'SCHEMA';
+ sql92_reservedwords[172] := 'SCROLL';
+ sql92_reservedwords[173] := 'SECTION';
+ sql92_reservedwords[174] := 'SELECT';
+ sql92_reservedwords[175] := 'SESSION';
+ sql92_reservedwords[176] := 'SESSION_USER';
+ sql92_reservedwords[177] := 'SET';
+ sql92_reservedwords[178] := 'SIZE';
+ sql92_reservedwords[179] := 'SMALLINT';
+ sql92_reservedwords[180] := 'SOME';
+ sql92_reservedwords[181] := 'SPACE';
+ sql92_reservedwords[182] := 'SQL';
+ sql92_reservedwords[183] := 'SQLCODE';
+ sql92_reservedwords[184] := 'SQLERROR';
+ sql92_reservedwords[185] := 'SQLSTATE';
+ sql92_reservedwords[186] := 'SQLWARNING';
+ sql92_reservedwords[187] := 'SUBSTRING';
+ sql92_reservedwords[188] := 'SUM';
+ sql92_reservedwords[189] := 'SYSTEM_USER';
+ sql92_reservedwords[190] := 'TABLE';
+ sql92_reservedwords[191] := 'TEMPORARY';
+ sql92_reservedwords[192] := 'THEN';
+ sql92_reservedwords[193] := 'TIME';
+ sql92_reservedwords[194] := 'TIMESTAMP';
+ sql92_reservedwords[195] := 'TIMEZONE_HOUR';
+ sql92_reservedwords[196] := 'TIMEZONE_MINUTE';
+ sql92_reservedwords[197] := 'TO';
+ sql92_reservedwords[198] := 'TRAILING';
+ sql92_reservedwords[199] := 'TRANSACTION';
+ sql92_reservedwords[200] := 'TRANSLATE';
+ sql92_reservedwords[201] := 'TRANSLATION';
+ sql92_reservedwords[202] := 'TRIM';
+ sql92_reservedwords[203] := 'TRUE';
+ sql92_reservedwords[204] := 'UNION';
+ sql92_reservedwords[205] := 'UNIQUE';
+ sql92_reservedwords[206] := 'UNKNOWN';
+ sql92_reservedwords[207] := 'UPDATE';
+ sql92_reservedwords[208] := 'UPPER';
+ sql92_reservedwords[209] := 'USAGE';
+ sql92_reservedwords[210] := 'USER';
+ sql92_reservedwords[211] := 'USING';
+ sql92_reservedwords[212] := 'VALUE';
+ sql92_reservedwords[213] := 'VALUES';
+ sql92_reservedwords[214] := 'VARCHAR';
+ sql92_reservedwords[215] := 'VARYING';
+ sql92_reservedwords[216] := 'VIEW';
+ sql92_reservedwords[217] := 'WHEN';
+ sql92_reservedwords[218] := 'WHENEVER';
+ sql92_reservedwords[219] := 'WHERE';
+ sql92_reservedwords[220] := 'WITH';
+ sql92_reservedwords[221] := 'WORK';
+ sql92_reservedwords[222] := 'WRITE';
+ sql92_reservedwords[223] := 'YEAR';
+ sql92_reservedwords[224] := 'ZONE';
+end;
+
+initialization
+ sql92_InitializeReservedWords;
+finalization
+ sql92_reservedwords := nil;
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDASQL92QueryBuilder.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDASQL92QueryBuilder.pas
new file mode 100644
index 0000000..0580a8b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDASQL92QueryBuilder.pas
@@ -0,0 +1,179 @@
+unit uDASQL92QueryBuilder;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ Classes,
+ uDAInterfaces,
+ uDAWhere;
+
+type
+ TDASQL92WhereBuilder = class(TDASQLWhereBuilder)
+ protected
+ function ProcessBinaryExpression(AExpression: TDAWhereExpression): string; override;
+ function ProcessUnaryExpression(AExpression: TDAWhereExpression): string; override;
+ function ProcessNullExpression(AExpression: TDAWhereExpression): string; override;
+ end;
+
+ TDASQL92QueryBuilder = class(TDAQueryBuilder)
+ protected
+ function CreateWhereBuilder: TDASQLWhereBuilder; override;
+ function CreateTableClause: string; override;
+ function IdentifierNeedsQuoting(const iIdentifier: string):boolean;override;
+ function QuoteStringId(aValue: string): string;
+ end;
+
+implementation
+uses
+ SysUtils, uROXMLIntf, uDASQL92Interfaces;
+
+const
+ c_Indent = ' ';
+
+ { TDASQL92QueryBuilder }
+
+function TDASQL92QueryBuilder.CreateTableClause: string;
+var
+ i, j: integer;
+ s: string;
+begin
+ Result := QuoteIdentifierIfNeeded(MainTable.MasterTable);
+ for i := 0 to MainTable.JoinSourceTables.Count - 1 do
+ with TDAJoinSourceTable(MainTable.JoinSourceTables.Items[i]) do begin
+ if (JoinConditions.Count = 0) or (JoinType = jtCross) then
+ Result := Result + ',' + QuoteIdentifierIfNeeded(Name)
+ else begin
+ case JoinType of
+ jtInner: s := 'INNER';
+ jtLeftOuter: s := 'LEFT OUTER';
+ jtRightOuter: s := 'RIGHT OUTER';
+ jtFullOuter: s := 'FULL OUTER';
+ end;
+ Result := Result + sLineBreak + c_Indent + Format('%s JOIN %s ON (', [s, QuoteIdentifierIfNeeded(Name)]);
+ for j := 0 to JoinConditions.Count - 1 do begin
+ if J > 0 then Result := Result + ' and ';
+ with TDAJoinCondition(JoinConditions.Items[j]) do begin
+ Result := Result + Format('(%s = %s)', [
+ GenerateFieldName(FromTableName, FromFieldName),
+ GenerateFieldName(ToTableName, ToFieldName)]);
+ end;
+ Result := Result + ')';
+ end;
+ end;
+ end;
+end;
+
+function TDASQL92QueryBuilder.CreateWhereBuilder: TDASQLWhereBuilder;
+begin
+ Result := TDASQL92WhereBuilder.Create(Self);
+end;
+
+function TDASQL92QueryBuilder.IdentifierNeedsQuoting(
+ const iIdentifier: string): boolean;
+begin
+ Result:= inherited IdentifierNeedsQuoting(iIdentifier) or SQL92_IdentifierNeedsQuoting(iIdentifier);
+end;
+
+function TDASQL92QueryBuilder.QuoteStringId(aValue: string): string;
+begin
+ Result:= AnsiQuotedStr(aValue,'''');
+end;
+
+{ TDASQL92WhereBuilder }
+
+function TDASQL92WhereBuilder.ProcessBinaryExpression(
+ AExpression: TDAWhereExpression): string;
+const
+ TDABinaryOperatorStr: array[TDABinaryOperator] of string =
+ ('AND', 'OR', '' {dboXor}, '<', '<=', '>', '>=', '<>', '=', 'LIKE', '' {dboIn}, '+', '-', '*', '/');
+
+ function ExpressionisNull(aExpr: TDAWhereExpression): boolean;
+ begin
+ result := (AExpr is TDANullExpression);
+ end;
+
+ function ExpressionisNotNull(aExpr: TDAWhereExpression): boolean;
+ begin
+ result :=
+ ((AExpr is TDAUnaryExpression) and
+ (TDAUnaryExpression(AExpr).Operator = duoNot) and
+ (TDAUnaryExpression(AExpr).Expression is TDANullExpression));
+ end;
+
+var
+ lLeft, lRight: string;
+ lLeftisNull, lRightisNull: boolean;
+ s,s1,s2: string;
+ s_Null: string;
+begin
+ Result := '';
+ With TDABinaryExpression(AExpression) do begin
+ lLeft := ProcessExpression(Left);
+ lRight := ProcessExpression(Right);
+ lRightisNull := ExpressionisNull(Right) or ExpressionisNotNull(Right);
+ lLeftisNull := ExpressionisNull(Left) or ExpressionisNotNull(Left);
+
+ if Operator = dboXor then
+ // A xor B = (A and not B) or (not A and B)
+ result := Format('((%s AND NOT %s) OR' + sLineBreak + '(NOT %0:s AND %1:s))', [lLeft, lRight])
+ else if lRightisNull or lLeftisNull then begin
+ s_Null:= ProcessNullExpression(nil);
+ if lRightisNull then s2:= '%0:s' else s2:='%1:s';
+ if (lRightisNull and ExpressionisNotNull(Right)) or (lLeftisNull and ExpressionisNotNull(Left)) then begin
+ s := '('+s2+' IS NOT '+s_Null+')';
+ s1 := '('+s2+' IS '+s_Null+')';
+ end
+ else begin
+ s := '('+s2+' IS '+s_Null+')';
+ s1 := '('+s2+' IS NOT '+s_Null+')';
+ end;
+ if Operator in [dboNotEqual,dboLess,dboGreater] then
+ Result := Format(s1, [lLeft, lRight])
+ else
+ Result := Format(s, [lLeft, lRight]);
+ end
+ else if Operator = dboIn then
+ result := Format('(%s IN (%s))', [lLeft, lRight])
+ else
+ result := Format('(%s %s %s)', [lLeft, TDABinaryOperatorStr[Operator], lRight]);
+ end;
+end;
+
+function TDASQL92WhereBuilder.ProcessNullExpression(
+ AExpression: TDAWhereExpression): string;
+begin
+ Result := 'NULL';
+end;
+
+function TDASQL92WhereBuilder.ProcessUnaryExpression(
+ AExpression: TDAWhereExpression): string;
+var
+ lExpr: string;
+begin
+ with TDAUnaryExpression(AExpression) do begin
+ lExpr := ProcessExpression(Expression);
+ case Operator of
+ duoNot: Result := 'NOT ' + lExpr;
+ duoMinus: Result := '-' + lExpr;
+ else
+ Result := '';
+ end;
+ end;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDASQLiteInterfaces.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDASQLiteInterfaces.pas
new file mode 100644
index 0000000..b4ae054
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDASQLiteInterfaces.pas
@@ -0,0 +1,254 @@
+unit uDASQLiteInterfaces;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ uDAInterfaces, uDAEngine, uROClasses;
+
+type
+ { IDASQLiteConnection
+ For identification purposes Implemented by all SQLite connections }
+ IDASQLiteConnection = interface(IDAConnection)
+ ['{C6249278-7BBB-4E4F-849B-A9AA7C9ACD66}']
+ end;
+
+ TDASQLiteDriver = class(TDAEDriver)
+ protected
+ function GetDefaultConnectionType(const AuxDriver: string): string; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ end;
+
+ TDASQLiteConnection = class(TDAEConnection, IDAFileBasedDatabase, IDASQLiteConnection)
+ protected
+ procedure DoGetTableNames(out List: IROStrings); override;
+ procedure DoGetStoredProcedureNames(out List: IROStrings); override;
+ procedure DoGetViewNames(out List: IROStrings); override;
+ function IdentifierNeedsQuoting(const iIdentifier: string): boolean; override; {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
+ //IDAFileBasedDatabase
+ function GetFileExtensions: IROStrings;
+ end;
+
+
+function SQLite_GetFileExtensions: IROStrings;
+procedure SQLite_GetObjectNames(Query: IDADataset;AList: IROStrings; AObjectType: TDAObjecttype);
+function SQLite_IdentifierNeedsQuoting(const iIdentifier: string): boolean;
+
+const
+ SQLite_DriverType = 'SQLite';
+
+implementation
+uses
+ SysUtils;
+
+var
+ sqlite_reservedwords : array of string;
+
+function SQLite_GetFileExtensions: IROStrings;
+begin
+ Result := TROStrings.Create;
+ result.Add('*.SQB;*.DB3;*.DB;*.DBB;SQLite Database (*.sqb,*.db3,*.db,*.dbb)');
+ result.Add('*.*;All files (*.*)');
+end;
+
+procedure SQLite_GetObjectNames(Query: IDADataset;AList: IROStrings; AObjectType: TDAObjecttype);
+begin
+ try
+ case AObjectType of
+ dotTable: Query.SQL := 'SELECT name FROM sqlite_master WHERE type="table" ORDER BY name';
+ dotView: Query.SQL := 'SELECT name FROM sqlite_master WHERE type="view" ORDER BY name';
+ dotProcedure: Exit;
+ else
+ end;
+ Query.Open;
+ while not Query.EOF do begin
+ AList.Add(Trim(Query.Fields[0].AsString));
+ Query.Next;
+ end;
+ finally
+ Query:=nil;
+ end;
+end;
+
+function SQLite_IdentifierNeedsQuoting(const iIdentifier: string): boolean;
+begin
+ result := TestIdentifier(iIdentifier, sqlite_reservedwords);
+end;
+
+{ TDASQLiteDriver }
+
+function TDASQLiteDriver.GetDefaultConnectionType(
+ const AuxDriver: string): string;
+begin
+ Result:= SQLite_DriverType;
+end;
+
+{ TDASQLiteConnection }
+
+procedure TDASQLiteConnection.DoGetStoredProcedureNames(out List: IROStrings);
+begin
+ inherited;
+ SQLite_GetObjectNames(GetDatasetClass.Create(Self),List,dotProcedure);
+end;
+
+procedure TDASQLiteConnection.DoGetTableNames(out List: IROStrings);
+begin
+ inherited;
+ SQLite_GetObjectNames(GetDatasetClass.Create(Self),List,dotTable);
+end;
+
+procedure TDASQLiteConnection.DoGetViewNames(out List: IROStrings);
+begin
+ inherited;
+ SQLite_GetObjectNames(GetDatasetClass.Create(Self),List,dotView);
+end;
+
+function TDASQLiteConnection.GetFileExtensions: IROStrings;
+begin
+ Result:=SQLite_GetFileExtensions;
+end;
+
+function TDASQLiteConnection.IdentifierNeedsQuoting(
+ const iIdentifier: string): boolean;
+begin
+ Result := inherited IdentifierNeedsQuoting(iIdentifier) or SQLite_IdentifierNeedsQuoting(iIdentifier);
+end;
+
+
+procedure sqlite_InitializeReservedWords;
+begin
+ SetLength(sqlite_reservedwords,113);
+ // sorted with TStringList.Sort (bds2007)
+ sqlite_reservedwords[0] := 'ABORT';
+ sqlite_reservedwords[1] := 'ADD';
+ sqlite_reservedwords[2] := 'AFTER';
+ sqlite_reservedwords[3] := 'ALL';
+ sqlite_reservedwords[4] := 'ALTER';
+ sqlite_reservedwords[5] := 'ANALYZE';
+ sqlite_reservedwords[6] := 'AND';
+ sqlite_reservedwords[7] := 'AS';
+ sqlite_reservedwords[8] := 'ASC';
+ sqlite_reservedwords[9] := 'ATTACH';
+ sqlite_reservedwords[10] := 'AUTOINCREMENT';
+ sqlite_reservedwords[11] := 'BEFORE';
+ sqlite_reservedwords[12] := 'BEGIN';
+ sqlite_reservedwords[13] := 'BETWEEN';
+ sqlite_reservedwords[14] := 'BY';
+ sqlite_reservedwords[15] := 'CASCADE';
+ sqlite_reservedwords[16] := 'CASE';
+ sqlite_reservedwords[17] := 'CAST';
+ sqlite_reservedwords[18] := 'CHECK';
+ sqlite_reservedwords[19] := 'COLLATE';
+ sqlite_reservedwords[20] := 'COMMIT';
+ sqlite_reservedwords[21] := 'CONFLICT';
+ sqlite_reservedwords[22] := 'CONSTRAINT';
+ sqlite_reservedwords[23] := 'CREATE';
+ sqlite_reservedwords[24] := 'CROSS';
+ sqlite_reservedwords[25] := 'CURRENT_DATE';
+ sqlite_reservedwords[26] := 'CURRENT_TIME';
+ sqlite_reservedwords[27] := 'CURRENT_TIMESTAMP';
+ sqlite_reservedwords[28] := 'DATABASE';
+ sqlite_reservedwords[29] := 'DEFAULT';
+ sqlite_reservedwords[30] := 'DEFERRABLE';
+ sqlite_reservedwords[31] := 'DEFERRED';
+ sqlite_reservedwords[32] := 'DELETE';
+ sqlite_reservedwords[33] := 'DESC';
+ sqlite_reservedwords[34] := 'DETACH';
+ sqlite_reservedwords[35] := 'DISTINCT';
+ sqlite_reservedwords[36] := 'DROP';
+ sqlite_reservedwords[37] := 'EACH';
+ sqlite_reservedwords[38] := 'ELSE';
+ sqlite_reservedwords[39] := 'END';
+ sqlite_reservedwords[40] := 'ESCAPE';
+ sqlite_reservedwords[41] := 'EXCEPT';
+ sqlite_reservedwords[42] := 'EXCLUSIVE';
+ sqlite_reservedwords[43] := 'EXPLAIN';
+ sqlite_reservedwords[44] := 'FAIL';
+ sqlite_reservedwords[45] := 'FOR';
+ sqlite_reservedwords[46] := 'FOREIGN';
+ sqlite_reservedwords[47] := 'FROM';
+ sqlite_reservedwords[48] := 'FULL';
+ sqlite_reservedwords[49] := 'GLOB';
+ sqlite_reservedwords[50] := 'GROUP';
+ sqlite_reservedwords[51] := 'HAVING';
+ sqlite_reservedwords[52] := 'IF';
+ sqlite_reservedwords[53] := 'IGNORE';
+ sqlite_reservedwords[54] := 'IMMEDIATE';
+ sqlite_reservedwords[55] := 'IN';
+ sqlite_reservedwords[56] := 'INDEX';
+ sqlite_reservedwords[57] := 'INITIALLY';
+ sqlite_reservedwords[58] := 'INNER';
+ sqlite_reservedwords[59] := 'INSERT';
+ sqlite_reservedwords[60] := 'INSTEAD';
+ sqlite_reservedwords[61] := 'INTERSECT';
+ sqlite_reservedwords[62] := 'INTO';
+ sqlite_reservedwords[63] := 'IS';
+ sqlite_reservedwords[64] := 'ISNULL';
+ sqlite_reservedwords[65] := 'JOIN';
+ sqlite_reservedwords[66] := 'KEY';
+ sqlite_reservedwords[67] := 'LEFT';
+ sqlite_reservedwords[68] := 'LIKE';
+ sqlite_reservedwords[69] := 'LIMIT';
+ sqlite_reservedwords[70] := 'MATCH';
+ sqlite_reservedwords[71] := 'NATURAL';
+ sqlite_reservedwords[72] := 'NOT';
+ sqlite_reservedwords[73] := 'NOTNULL';
+ sqlite_reservedwords[74] := 'NULL';
+ sqlite_reservedwords[75] := 'OF';
+ sqlite_reservedwords[76] := 'OFFSET';
+ sqlite_reservedwords[77] := 'ON';
+ sqlite_reservedwords[78] := 'OR';
+ sqlite_reservedwords[79] := 'ORDER';
+ sqlite_reservedwords[80] := 'OUTER';
+ sqlite_reservedwords[81] := 'PLAN';
+ sqlite_reservedwords[82] := 'PRAGMA';
+ sqlite_reservedwords[83] := 'PRIMARY';
+ sqlite_reservedwords[84] := 'QUERY';
+ sqlite_reservedwords[85] := 'RAISE';
+ sqlite_reservedwords[86] := 'REFERENCES';
+ sqlite_reservedwords[87] := 'REINDEX';
+ sqlite_reservedwords[88] := 'RENAME';
+ sqlite_reservedwords[89] := 'REPLACE';
+ sqlite_reservedwords[90] := 'RESTRICT';
+ sqlite_reservedwords[91] := 'RIGHT';
+ sqlite_reservedwords[92] := 'ROLLBACK';
+ sqlite_reservedwords[93] := 'ROW';
+ sqlite_reservedwords[94] := 'SELECT';
+ sqlite_reservedwords[95] := 'SET';
+ sqlite_reservedwords[96] := 'TABLE';
+ sqlite_reservedwords[97] := 'TEMP';
+ sqlite_reservedwords[98] := 'TEMPORARY';
+ sqlite_reservedwords[99] := 'THEN';
+ sqlite_reservedwords[100] := 'TO';
+ sqlite_reservedwords[101] := 'TRANSACTION';
+ sqlite_reservedwords[102] := 'TRIGGER';
+ sqlite_reservedwords[103] := 'UNION';
+ sqlite_reservedwords[104] := 'UNIQUE';
+ sqlite_reservedwords[105] := 'UPDATE';
+ sqlite_reservedwords[106] := 'USING';
+ sqlite_reservedwords[107] := 'VACUUM';
+ sqlite_reservedwords[108] := 'VALUES';
+ sqlite_reservedwords[109] := 'VIEW';
+ sqlite_reservedwords[110] := 'VIRTUAL';
+ sqlite_reservedwords[111] := 'WHEN';
+ sqlite_reservedwords[112] := 'WHERE';
+end;
+
+initialization
+ sqlite_InitializeReservedWords;
+finalization
+ sqlite_reservedwords := nil;
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDAScriptingProvider.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAScriptingProvider.pas
new file mode 100644
index 0000000..5b31d51
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAScriptingProvider.pas
@@ -0,0 +1,102 @@
+unit uDAScriptingProvider;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ Classes, SysUtils;
+
+type
+ TScriptableComponent = class;
+ TDAScriptingProvider = class(TComponent)
+ private
+ FScriptableComponent: TScriptableComponent;
+ procedure SetScriptableComponent(const Value: TScriptableComponent);
+ protected
+ procedure Notification(AComponent: TComponent; Operation: TOperation); override;
+ published
+ property ScriptableComponent: TScriptableComponent read FScriptableComponent write SetScriptableComponent;
+ end;
+
+ IDAScriptingProvider = interface
+ ['{6D19A2F9-233A-4EE6-95EC-CDFCD7410C15}']
+ end;
+
+ EDAScriptError = class(Exception);
+ EDAScriptCompileError = class(EDAScriptError);
+
+ TScriptableComponent = class(TComponent)
+ private
+ fScriptingProvider: TDAScriptingProvider;
+ procedure SetScriptingProvider(const Value: TDAScriptingProvider);
+ protected
+ procedure Notification(AComponent: TComponent; Operation: TOperation); override;
+ published
+ property ScriptingProvider: TDAScriptingProvider read fScriptingProvider write SetScriptingProvider;
+ end;
+
+
+
+implementation
+
+{ TScriptableComponent }
+
+procedure TScriptableComponent.Notification(AComponent: TComponent;
+ Operation: TOperation);
+begin
+ inherited;
+ if (Operation = opRemove) then begin
+ if (AComponent = fScriptingProvider) then fScriptingProvider := nil;
+ end;
+end;
+
+procedure TScriptableComponent.SetScriptingProvider(const Value: TDAScriptingProvider);
+begin
+ if fScriptingProvider <> Value then begin
+ if fScriptingProvider <> nil then fScriptingProvider.ScriptableComponent:=nil;
+ if Value <> nil then Value.ScriptableComponent := Self;
+ if Assigned(fScriptingProvider) then fScriptingProvider.FreeNotification(self);
+ end;
+end;
+
+{ TDAScriptingProvider }
+
+procedure TDAScriptingProvider.Notification(AComponent: TComponent;
+ Operation: TOperation);
+begin
+ inherited;
+ if (Operation = opRemove) then begin
+ if (AComponent = FScriptableComponent) then FScriptableComponent := nil;
+ end;
+end;
+
+procedure TDAScriptingProvider.SetScriptableComponent(
+ const Value: TScriptableComponent);
+begin
+ if FScriptableComponent <> Value then begin
+ if FScriptableComponent <> nil then begin
+ FScriptableComponent.fScriptingProvider:=nil;
+ FScriptableComponent.RemoveFreeNotification(Self);
+ end;
+ FScriptableComponent := Value;
+ if Assigned(FScriptableComponent) then begin
+ FScriptableComponent.fScriptingProvider := Self;
+ FScriptableComponent.FreeNotification(Self);
+ end;
+ end;
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDAServerLog.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAServerLog.pas
new file mode 100644
index 0000000..73bcea9
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAServerLog.pas
@@ -0,0 +1,615 @@
+unit uDAServerLog;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ Classes, Contnrs, SysUtils, uROSessions, SyncObjs, uROTypes, uDAInterfaces,
+ uROXMLIntf, uROXMLSerializer;
+
+const
+ EmptyGUID: TGUID = '{00000000-0000-0000-0000-000000000000}';
+
+type
+ TDAServerLog = class;
+
+ { TDALogItem }
+ TDALogItem = class(TROComplexType)
+ private
+ fServerLog: TDAServerLog;
+ fCreationTime: TDateTime;
+ fSessionID: TGUID;
+ function GetSessionIDAsString: string;
+
+ protected
+ procedure AssignSession(aSession: TROSession); virtual;
+
+ public
+ constructor Create(aServerLog: TDAServerLog; aSession: TROSession); reintroduce;
+ destructor Destroy; override;
+
+ property ServerLog: TDAServerLog read fServerLog;
+ {$IFDEF FPC}
+ property SessionID: TGUID read fSessionID;
+ {$ENDIF}
+
+ published
+ {$IFNDEF FPC}
+ property SessionID: TGUID read fSessionID;
+ {$ENDIF}
+ property SessionIDAsString: string read GetSessionIDAsString;
+ property CreationTime: TDateTime read fCreationTime;
+ end;
+
+ { TDASessionLog }
+ TDASessionLog = class(TDALogItem)
+ private
+ fLoginInfo: TROComplexType;
+
+ protected
+ procedure AssignLoginInfo(aLoginInfo: TROComplexType); virtual;
+
+ public
+ constructor Create(aServerLog: TDAServerLog; aSession: TROSession; aLoginInfo: TROComplexType);
+ destructor Destroy; override;
+
+ published
+ property LoginInfo: TROComplexType read fLoginInfo;
+ end;
+
+ TDASessionLogClass = class of TDASessionLog;
+
+ { TDASQLCommandLog }
+ TDASQLCommandLog = class(TDALogItem)
+ private
+ fActualSQLText: string;
+ fElapsedMilliseconds: Cardinal;
+ fOriginalSQLText: string;
+ fParams: TDAParamCollection;
+ protected
+ public
+ constructor Create(aServerLog: TDAServerLog; aSession: TROSession;
+ const aCommand: IDASQLCommand;
+ aActualSQLText: string; aElapsedMilliseconds: Cardinal);
+ destructor Destroy; override;
+
+ property Params: TDAParamCollection read fParams;
+
+ published
+
+ property OriginalSQLText: string read fOriginalSQLText;
+ property ActualSQLText: string read fActualSQLText;
+ property ElapsedMilliseconds: cardinal read fElapsedMilliseconds;
+ end;
+
+ TDASQLCommandLogClass = class of TDASQLCommandLog;
+
+ { TDASQLErrorLog }
+ TDASQLErrorLog = class(TDASQLCommandLog)
+ private
+ fErrorMessage: string;
+ protected
+ public
+ constructor Create(aServerLog: TDAServerLog; aSession: TROSession;
+ aError: Exception; const aCommand: IDASQLCommand;
+ aActualSQLText: string);
+
+ property ErrorMessage: string read fErrorMessage;
+ end;
+
+ TDASQLErrorLogClass = class of TDASQLErrorLog;
+
+ { Events }
+ TDASessionLogEvent = procedure(Sender: TDAServerLog; SessionLog: TDASessionLog) of object;
+ TDASessionLogRemoveEvent = procedure(Sender: TDAServerLog; SessionLog: TDASessionLog; var RemoveRelatedLogs: boolean) of object;
+ TDASQLCommandLogEvent = procedure(Sender: TDAServerLog; SQLCommandLog: TDASQLCommandLog) of object;
+ TDASQLErrorLogEvent = procedure(Sender: TDAServerLog; SQLErrorLog: TDASQLErrorLog) of object;
+ TDALogClassesDefinitionEvent = procedure(Sender: TDAServerLog;
+ var aSessionLogClass: TDASessionLogClass;
+ var aSQLCommandLogClass: TDASQLCommandLogClass;
+ var aSQLErrorLogClass: TDASQLErrorLogClass) of object;
+
+ { TDAServerLog }
+ TDAServerLog = class(TComponent)
+ private
+ fSessionsLogs: TStringList;
+ fSQLCommandLogs,
+ fSQLErrorsLogs: TObjectList;
+ fOnAddSQLCommandLog: TDASQLCommandLogEvent;
+ fOnAddSQLErrorLog: TDASQLErrorLogEvent;
+ fOnAddSessionLog: TDASessionLogEvent;
+ fActive: boolean;
+ fOnRemoveSessionLog: TDASessionLogRemoveEvent;
+
+ fCriticalSessions,
+ fCriticalSQLCommands,
+ fCriticalSQLErrors: TCriticalSection;
+ fOnLogClassesDefinition: TDALogClassesDefinitionEvent;
+
+ fSessionLogClass: TDASessionLogClass;
+ fSQLCommandLogClass: TDASQLCommandLogClass;
+ fSQLErrorLogClass: TDASQLErrorLogClass;
+
+ function GetSQLCommandLogsCount: integer;
+ function GetSQLCommandLogs(Index: integer): TDASQLCommandLog;
+ function GetSQLErrorLogs(Index: integer): TDASQLErrorLog;
+ function GetSessionLogsCount: integer;
+ function GetSessionLogs(Index: integer): TDASessionLog;
+ function GetSQLErrorLogsCount: integer;
+
+ protected
+ procedure RegisterLogServer;
+ procedure UnRegisterLogServer;
+
+ procedure Loaded; override;
+
+ public
+ constructor Create(aOwner: TComponent); override;
+ destructor Destroy; override;
+
+ procedure SaveToXML(aFileName: string); overload;
+ procedure SaveToXML(const aXMLDocument: IXMLDocument); overload; virtual;
+
+ { Session logs }
+ function FindSessionLog(aSession: TROSession): TDASessionLog; overload;
+ function FindSessionLog(aSessionID: TGUID): TDASessionLog; overload;
+
+ function AddSessionLog(aSession: TROSession; aLoginInfo: TROComplexType): TDASessionLog;
+ procedure RemoveSessionLog(aSessionID: TGUID; aRemoveRelatedLogs: boolean); overload;
+ procedure RemoveSessionLog(aSession: TROSession; aRemoveRelatedLogs: boolean); overload;
+ procedure ClearSessionLogs(aRemoveRelatedLogs: boolean);
+
+ { SQL command logs }
+ function AddSQLCommandLog(aSession: TROSession; const aCommand: IDASQLCommand;
+ anActualSQLText: string; aElapsedMilliseconds: Cardinal): TDASQLCommandLog;
+ procedure ClearSQLCommandLogs; overload;
+ procedure ClearSQLCommandLogs(aSessionID: TGUID); overload;
+
+ { SQL error logs }
+ function AddSQLErrorLog(aSession: TROSession; aError: Exception; const aCommand: IDASQLCommand;
+ aActualSQLText: string): TDASQLErrorLog;
+ procedure ClearSQLErrorLogs; overload;
+ procedure ClearSQLErrorLogs(aSessionID: TGUID); overload;
+
+ { Properties }
+ property SessionLogs[Index: integer]: TDASessionLog read GetSessionLogs;
+ property SessionLogsCount: integer read GetSessionLogsCount;
+
+ property SQLCommandLogs[Index: integer]: TDASQLCommandLog read GetSQLCommandLogs;
+ property SQLCommandLogsCount: integer read GetSQLCommandLogsCount;
+
+ property SQLErrorLogs[Index: integer]: TDASQLErrorLog read GetSQLErrorLogs;
+ property SQLErrorLogsCount: integer read GetSQLErrorLogsCount;
+
+ published
+ property Active: boolean read fActive write fActive;
+
+ property OnAddSessionLog: TDASessionLogEvent read fOnAddSessionLog write fOnAddSessionLog;
+ property OnRemoveSessionLog: TDASessionLogRemoveEvent read fOnRemoveSessionLog write fOnRemoveSessionLog;
+ property OnAddSQLCommandLog: TDASQLCommandLogEvent read fOnAddSQLCommandLog write fOnAddSQLCommandLog;
+ property OnAddSQLErrorLog: TDASQLErrorLogEvent read fOnAddSQLErrorLog write fOnAddSQLErrorLog;
+ property OnLogClassesDefinition: TDALogClassesDefinitionEvent read fOnLogClassesDefinition write fOnLogClassesDefinition;
+ end;
+
+function ServerLog: TDAServerLog;
+
+implementation
+
+var _ServerLog: TDAServerLog;
+
+function ServerLog: TDAServerLog;
+begin
+ if not Assigned(_ServerLog)
+ then raise Exception.Create('No TDAServerLog have been registered');
+
+ result := _ServerLog;
+end;
+
+{ TDALogItem }
+
+procedure TDALogItem.AssignSession(aSession: TROSession);
+begin
+ if Assigned(aSession)
+ then fSessionID := aSession.SessionID
+ else fSessionID := EmptyGUID;
+end;
+
+constructor TDALogItem.Create(aServerLog: TDAServerLog; aSession: TROSession);
+begin
+ fCreationTime := Now;
+ fServerLog := aServerLog;
+ AssignSession(aSession);
+end;
+
+destructor TDALogItem.Destroy;
+begin
+ inherited;
+end;
+
+function TDALogItem.GetSessionIDAsString: string;
+begin
+ result := GUIDToString(fSessionID)
+end;
+
+{ TDASessionLog }
+
+procedure TDASessionLog.AssignLoginInfo(aLoginInfo: TROComplexType);
+begin
+ fLoginInfo := TROComplexTypeClass(aLoginInfo.ClassType).Create;
+ fLoginInfo.Assign(aLoginInfo);
+end;
+
+constructor TDASessionLog.Create(aServerLog: TDAServerLog; aSession: TROSession; aLoginInfo: TROComplexType);
+begin
+ inherited Create(aServerLog, aSession);
+
+ AssignLoginInfo(aLoginInfo);
+end;
+
+destructor TDASessionLog.Destroy;
+begin
+ FreeAndNIL(fLoginInfo);
+ inherited;
+end;
+
+{ TDASQLCommandLog }
+
+constructor TDASQLCommandLog.Create(aServerLog: TDAServerLog; aSession: TROSession;
+ const aCommand: IDASQLCommand; aActualSQLText: string; aElapsedMilliseconds: Cardinal);
+begin
+ inherited Create(aServerLog, aSession);
+
+ fElapsedMilliseconds := aElapsedMilliseconds;
+ fOriginalSQLText := aCommand.SQL;
+ fActualSQLText := aActualSQLText;
+ fParams := TDAParamCollection.Create(NIL);
+ if (aCommand.Params.Count>0)
+ then fParams.Assign(aCommand.Params);
+end;
+
+destructor TDASQLCommandLog.Destroy;
+begin
+ FreeAndNIL(fParams);
+ inherited;
+end;
+
+{ TDASQLErrorLog }
+
+constructor TDASQLErrorLog.Create(aServerLog: TDAServerLog; aSession: TROSession;
+ aError: Exception; const aCommand: IDASQLCommand; aActualSQLText: string);
+begin
+ inherited Create(aServerLog, aSession, aCommand, aActualSQLText, 0);
+
+ fErrorMessage := aError.Message;
+end;
+
+{ TDAServerLog }
+constructor TDAServerLog.Create(aOwner: TComponent);
+begin
+ inherited;
+
+ fCriticalSessions := TCriticalSection.Create;
+ fCriticalSQLCommands := TCriticalSection.Create;
+ fCriticalSQLErrors := TCriticalSection.Create;
+
+ fSessionsLogs := TStringList.Create;
+ fSessionsLogs.Sorted := TRUE;
+
+ fSQLCommandLogs := TObjectList.Create;
+ fSQLErrorsLogs := TObjectList.Create;
+end;
+
+destructor TDAServerLog.Destroy;
+begin
+ if not (csDesigning in ComponentState) then UnRegisterLogServer;
+
+ ClearSessionLogs(FALSE);
+ FreeAndNIL(fSessionsLogs);
+
+ ClearSQLCommandLogs;
+ FreeAndNIL(fSQLCommandLogs);
+
+ ClearSQLErrorLogs;
+ FreeAndNIL(fSQLErrorsLogs);
+
+ FreeAndNIL(fCriticalSessions);
+ FreeAndNIL(fCriticalSQLCommands);
+ FreeAndNIL(fCriticalSQLErrors);
+
+ inherited;
+end;
+
+procedure TDAServerLog.Loaded;
+begin
+ if (csDesigning in ComponentState) then Exit;
+
+ RegisterLogServer;
+
+ fSessionLogClass := TDASessionLog;
+ fSQLCommandLogClass := TDASQLCommandLog;
+ fSQLErrorLogClass := TDASQLErrorLog;
+
+ if Assigned(fOnLogClassesDefinition)
+ then fOnLogClassesDefinition(Self, fSessionLogClass, fSQLCommandLogClass, fSQLErrorLogClass);
+end;
+
+function TDAServerLog.AddSQLCommandLog(aSession: TROSession; const aCommand: IDASQLCommand;
+ anActualSQLText: string; aElapsedMilliseconds: Cardinal): TDASQLCommandLog;
+begin
+ result := NIL;
+ if not Active then Exit;
+
+ result := fSQLCommandLogClass.Create(Self, aSession, aCommand, anActualSQLText, aElapsedMilliseconds);
+
+ fCriticalSQLCommands.Enter;
+ try
+ fSQLCommandLogs.Add(result);
+
+ if Assigned(fOnAddSQLCommandLog)
+ then fOnAddSQLCommandLog(Self, result);
+ finally
+ fCriticalSQLCommands.Leave;
+ end;
+end;
+
+function TDAServerLog.AddSQLErrorLog(aSession: TROSession; aError: Exception; const aCommand: IDASQLCommand;
+ aActualSQLText: string): TDASQLErrorLog;
+begin
+ result := NIL;
+ if not Active then Exit;
+
+ result := fSQLErrorLogClass.Create(Self, aSession, aError, aCommand, aActualSQLText);
+ fCriticalSQLErrors.Enter;
+ try
+ fSQLErrorsLogs.Add(result);
+
+ if Assigned(OnAddSQLErrorLog)
+ then OnAddSQLErrorLog(Self, result);
+ finally
+ fCriticalSQLErrors.Leave;
+ end;
+end;
+
+function TDAServerLog.AddSessionLog(aSession: TROSession; aLoginInfo: TROComplexType): TDASessionLog;
+begin
+ result := NIL;
+ if not Active then Exit;
+
+ result := fSessionLogClass.Create(Self, aSession, aLoginInfo);
+
+ fCriticalSessions.Enter;
+ try
+ fSessionsLogs.AddObject(GUIDToString(aSession.SessionID), result);
+
+ if Assigned(fOnAddSessionLog)
+ then fOnAddSessionLog(Self, result);
+ finally
+ fCriticalSessions.Leave;
+ end;
+end;
+
+procedure TDAServerLog.RemoveSessionLog(aSessionID: TGUID; aRemoveRelatedLogs: boolean);
+var idx: integer;
+ removeRelated: boolean;
+begin
+ fCriticalSessions.Enter;
+ try
+ idx := fSessionsLogs.IndexOf(GUIDToString(aSessionID));
+ if (idx>=0) then begin
+ removeRelated := aRemoveRelatedLogs;
+
+ if Assigned(fOnRemoveSessionLog)
+ then fOnRemoveSessionLog(Self, TDASessionLog(fSessionsLogs.Objects[idx]), removeRelated);
+
+ fSessionsLogs.Objects[idx].Free;
+ fSessionsLogs.Delete(idx);
+
+ { Removes the entries associated to this session in the sql and errors lists }
+ if removeRelated then begin
+ ClearSQLCommandLogs(aSessionID);
+ ClearSQLErrorLogs(aSessionID);
+ end;
+ end;
+ finally
+ fCriticalSessions.Leave;
+ end;
+end;
+
+procedure TDAServerLog.RemoveSessionLog(aSession: TROSession; aRemoveRelatedLogs: boolean);
+begin
+ RemoveSessionLog(aSession.SessionID, aRemoveRelatedLogs);
+end;
+
+function TDAServerLog.GetSQLCommandLogsCount: integer;
+begin
+ result := fSQLCommandLogs.Count
+end;
+
+function TDAServerLog.GetSQLCommandLogs(Index: integer): TDASQLCommandLog;
+begin
+ result := TDASQLCommandLog(fSQLCommandLogs[Index])
+end;
+
+function TDAServerLog.GetSQLErrorLogsCount: integer;
+begin
+ result := fSQLErrorsLogs.Count
+end;
+
+function TDAServerLog.GetSQLErrorLogs(Index: integer): TDASQLErrorLog;
+begin
+ result := TDASQLErrorLog(fSQLErrorsLogs[Index])
+end;
+
+function TDAServerLog.GetSessionLogsCount: integer;
+begin
+ result := fSessionsLogs.Count
+end;
+
+function TDAServerLog.GetSessionLogs(Index: integer): TDASessionLog;
+begin
+ result := TDASessionLog(fSessionsLogs.Objects[Index])
+end;
+
+procedure TDAServerLog.RegisterLogServer;
+begin
+ if (_ServerLog<>NIL)
+ then raise Exception.Create('Only one instance of TDAServerLog is allowed');
+
+ _ServerLog := Self;
+end;
+
+procedure TDAServerLog.UnRegisterLogServer;
+begin
+ _ServerLog := NIL;
+end;
+
+procedure TDAServerLog.ClearSQLCommandLogs;
+begin
+ fCriticalSQLCommands.Enter;
+ try
+ fSQLCommandLogs.Clear;
+ finally
+ fCriticalSQLCommands.Leave;
+ end;
+end;
+
+procedure TDAServerLog.ClearSQLErrorLogs;
+begin
+ fCriticalSQLErrors.Enter;
+ try
+ fSQLErrorsLogs.Clear;
+ finally
+ fCriticalSQLErrors.Leave;
+ end;
+end;
+
+
+procedure TDAServerLog.ClearSQLCommandLogs(aSessionID: TGUID);
+var i: integer;
+begin
+ fCriticalSQLCommands.Enter;
+ try
+ for i := fSQLCommandLogs.Count-1 downto 0 do
+ if IsEqualGUID(TDASQLCommandLog(fSQLCommandLogs[i]).SessionID, aSessionID)
+ then fSQLCommandLogs.Delete(i);
+ finally
+ fCriticalSQLCommands.Leave;
+ end;
+end;
+
+procedure TDAServerLog.ClearSQLErrorLogs(aSessionID: TGUID);
+var i: integer;
+begin
+ fCriticalSQLErrors.Enter;
+ try
+ for i := fSQLErrorsLogs.Count-1 downto 0 do
+ if IsEqualGUID(TDASQLErrorLog(fSQLErrorsLogs[i]).SessionID, aSessionID)
+ then fSQLErrorsLogs.Delete(i);
+ finally
+ fCriticalSQLErrors.Leave;
+ end;
+end;
+
+procedure TDAServerLog.ClearSessionLogs(aRemoveRelatedLogs: boolean);
+var i: integer;
+ thisLog: TDASessionLog;
+begin
+ fCriticalSessions.Enter;
+ try
+ for i := 0 to (fSessionsLogs.Count-1) do begin
+ thisLog := TDASessionLog(fSessionsLogs.Objects[i]);
+
+ if aRemoveRelatedLogs then begin
+ ClearSQLCommandLogs(thisLog.SessionID);
+ ClearSQLErrorLogs(thisLog.SessionID);
+ end;
+
+ thisLog.Free;
+ end;
+
+ fSessionsLogs.Clear;
+ finally
+ fCriticalSessions.Leave;
+ end;
+end;
+
+
+function TDAServerLog.FindSessionLog(aSession: TROSession): TDASessionLog;
+begin
+ if (aSession<>NIL)
+ then result := FindSessionLog(aSession.SessionID)
+ else result := NIL;
+end;
+
+function TDAServerLog.FindSessionLog(aSessionID: TGUID): TDASessionLog;
+var idx: integer;
+begin
+ result := NIL;
+ idx := fSessionsLogs.IndexOf(GUIDToString(aSessionID));
+ if (idx>=0) then result := TDASessionLog(fSessionsLogs.Objects[idx]);
+end;
+
+procedure TDAServerLog.SaveToXML(aFileName: string);
+var doc: IXMLDocument;
+begin
+ doc := NewROXmlDocument;
+ doc.New('Log');
+ SaveToXML(doc);
+ doc.SaveToFile(aFileName);
+end;
+
+procedure TDAServerLog.SaveToXML(const aXMLDocument: IXMLDocument);
+var i: integer;
+ sessionLog: TDASessionLog;
+ sqlLog: TDASQLCommandLog;
+ errorLog: TDASQLErrorLog;
+begin
+ with TROXMLSerializer.Create(pointer(aXMLDocument.DocumentNode)) do try
+ SerializationOptions := [xsoSendUntyped];
+
+ for i := 0 to SessionLogsCount-1 do begin
+ sessionLog := SessionLogs[i];
+ Write(sessionLog.ClassName, sessionLog.ClassInfo, sessionLog);
+ end;
+
+ for i := 0 to SQLCommandLogsCount-1 do begin
+ sqlLog := SQLCommandLogs[i];
+ Write(sqlLog.ClassName, sqlLog.ClassInfo, sqlLog);
+ end;
+
+ for i := 0 to SQLErrorLogsCount-1 do begin
+ errorLog := SQLErrorLogs[i];
+ Write(errorLog.ClassName, errorLog.ClassInfo, errorLog);
+ end;
+
+ finally
+ Free;
+ end;
+end;
+
+initialization
+ RegisterROClass(TDASessionLog);
+ RegisterROClass(TDASQLCommandLog);
+ RegisterROClass(TDASQLErrorLog);
+
+finalization
+ FreeAndNIL(_ServerLog);
+
+ UnRegisterROClass(TDASessionLog);
+ UnRegisterROClass(TDASQLCommandLog);
+ UnRegisterROClass(TDASQLErrorLog);
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDASupportClasses.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDASupportClasses.pas
new file mode 100644
index 0000000..d848454
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDASupportClasses.pas
@@ -0,0 +1,412 @@
+unit uDASupportClasses;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses Classes;
+
+type
+ { TCollectionEvents }
+ TCollectionNotificationEvent = procedure(Item: TCollectionItem; Action: TCollectionNotification) of object;
+
+ { TInterfacedCollectionItem }
+ TInterfacedCollectionItem = class(TCollectionItem, IUnknown)
+ protected
+ function QueryInterface(const IID: TGUID; out Obj): HResult; stdcall;
+ function _AddRef: Integer; stdcall;
+ function _Release: Integer; stdcall;
+ end;
+
+ TDAItemRenamedEvent = procedure(aSender: TObject; const aOldName, aNewName: string) of object;
+ TDAItemRemovedEvent = procedure(aSender: TObject; const aName: string) of object;
+
+ { TSearcheableCollection }
+ TSearcheableCollection = class(TOwnedCollection)
+ private
+ fOnNotification: TCollectionNotificationEvent;
+ fOnItemRemoved: TDAItemRemovedEvent;
+ fOnItemRenamed: TDAItemRenamedEvent;
+
+ protected
+ FAllowEmptyName: Boolean;
+ function SetItemName(anItem: TCollectionItem; const aName: string): string; reintroduce; dynamic;
+ function GetItemName(anItem: TCollectionItem): string; reintroduce; dynamic;
+ function GetItemDefault(anItem: TCollectionItem): boolean; dynamic;
+
+ procedure Notify(Item: TCollectionItem; Action: TCollectionNotification); override;
+
+ function ItemName: string; virtual;
+
+ public
+ constructor Create(AOwner: TPersistent; ItemClass: TCollectionItemClass);
+ function ItemByName(const aName: string): TCollectionItem;
+ function FindItem(const aName: string): TCollectionItem; virtual;
+ function GetDefaultItem: TCollectionItem;
+
+ procedure TriggerOnItemRenamed(const iOldName, iNewName: string); virtual;
+ procedure TriggerOnItemRemoved(const iName: string); virtual;
+
+ function FindUniqueName(const iBaseName: string): string;
+ function FindUniqueNameEx(const iBaseName, iNumberedName: string): string;
+ function CloneItem(iIndex: integer): integer;
+
+ procedure MoveItem(iFromIndex, iToIndex: integer);
+
+ property OnNotification: TCollectionNotificationEvent read fOnNotification write fOnNotification;
+
+ property OnItemRenamed: TDAItemRenamedEvent read fOnItemRenamed write fOnItemRenamed;
+ property OnItemRemoved: TDAItemRemovedEvent read fOnItemRemoved write fOnItemRemoved;
+ end;
+
+ TSearcheableCollectionCached = class(TSearcheableCollection)
+ private
+ FNameList: TStringList;
+ fNeedRebuild: Boolean;
+ procedure RebuildList;
+ protected
+ procedure Notify(Item: TCollectionItem; Action: TCollectionNotification); override;
+ public
+ constructor Create(AOwner: TPersistent; ItemClass: TCollectionItemClass);
+ destructor Destroy; override;
+ procedure TriggerOnItemRenamed(const iOldName, iNewName: string); override;
+ procedure TriggerOnItemRemoved(const iName: string); override;
+ function FindItem(const aName: string): TCollectionItem; override;
+ end;
+
+ { TSearcheableInterfacedCollection }
+ TSearcheableInterfacedCollection = class(TSearcheableCollectionCached, IUnknown)
+ protected
+ function QueryInterface(const IID: TGUID; out Obj): HResult; stdcall;
+ function _AddRef: Integer; stdcall;
+ function _Release: Integer; stdcall;
+
+ // Required by most interfaces
+ function GetCount: integer;
+
+ end;
+
+ { TSearcheableInterfacedCollection }
+ TInterfacedCollection = class(TOwnedCollection, IUnknown)
+ protected
+ function QueryInterface(const IID: TGUID; out Obj): HResult; stdcall;
+ function _AddRef: Integer; stdcall;
+ function _Release: Integer; stdcall;
+
+ // Required by most interfaces
+ function GetCount: integer;
+
+ end;
+
+
+implementation
+
+uses uROClasses, uDARes, TypInfo, SysUtils;
+
+{ TInterfacedCollectionItem }
+
+function TInterfacedCollectionItem._AddRef: Integer;
+begin
+ result := -1;
+end;
+
+function TInterfacedCollectionItem._Release: Integer;
+begin
+ result := -1;
+end;
+
+function TInterfacedCollectionItem.QueryInterface(const IID: TGUID; out Obj): HResult;
+begin
+ if GetInterface(IID, Obj) then
+ Result := 0
+ else
+ Result := E_NOINTERFACE;
+end;
+
+{ TSearcheableInterfacedCollection }
+
+function TSearcheableInterfacedCollection._AddRef: Integer;
+begin
+ result := -1;
+end;
+
+function TSearcheableInterfacedCollection._Release: Integer;
+begin
+ result := -1;
+end;
+
+function TSearcheableInterfacedCollection.QueryInterface(const IID: TGUID;
+ out Obj): HResult;
+begin
+ if GetInterface(IID, Obj) then
+ Result := 0
+ else
+ Result := E_NOINTERFACE;
+end;
+
+function TSearcheableInterfacedCollection.GetCount: integer;
+begin
+ result := Count;
+end;
+
+{ TSearcheableCollection }
+
+function TSearcheableCollection.GetDefaultItem: TCollectionItem;
+var
+ i: integer;
+begin
+ result := nil;
+ for i := 0 to (Count - 1) do
+ if GetItemDefault(Items[i]) then begin
+ result := Items[i];
+ Exit;
+ end;
+
+ RaiseError(err_CannotFindDefaultItem,[ItemName]);
+end;
+
+function TSearcheableCollection.FindItem(
+ const aName: string): TCollectionItem;
+var
+ i: integer;
+ nme: string;
+begin
+ result := nil;
+ for i := 0 to (Count - 1) do begin
+ nme := GetItemName(Items[i]);
+ if SameText(nme, aName) then begin
+ result := Items[i];
+ Exit;
+ end;
+ end;
+end;
+
+function TSearcheableCollection.GetItemDefault(
+ anItem: TCollectionItem): boolean;
+begin
+ try
+ result := GetPropValue(anItem, 'Default', TRUE); // Defaul implementation. Not super-fast but for now's ok
+ except
+ on e: EPropertyError do
+ raise EPropertyError.CreateFmt('The %s collection doesn''t support Default items',[ClassName]);
+ else
+ raise;
+ end;
+end;
+
+function TSearcheableCollection.GetItemName(
+ anItem: TCollectionItem): string;
+begin
+ result := GetPropValue(anItem, 'Name', TRUE); // Defaul implementation. Not super-fast but for now's ok
+end;
+
+function TSearcheableCollection.ItemByName(
+ const aName: string): TCollectionItem;
+begin
+ { ToDo: This is not perfect, since not all collections will properly support GetDefaultItem. }
+ if (aName = '') then
+ result := GetDefaultItem
+ else
+ result := FindItem(aName);
+
+ Check(result = nil, err_CannotFindItem, [ItemName, aName, ClassName]);
+end;
+
+procedure TSearcheableCollection.Notify(Item: TCollectionItem;
+ Action: TCollectionNotification);
+begin
+ inherited;
+
+ if (not FAllowEmptyName) and (Action = cnAdded) then begin
+ if (GetItemName(Item) = '') then SetItemName(Item, 'Item' + IntToStr(Count));
+ end;
+
+ if Action = cnDeleting then
+ TriggerOnItemRemoved(GetItemName(Item));
+
+ if Assigned(fOnNotification) then fOnNotification(Item, Action);
+end;
+
+function TSearcheableCollection.SetItemName(anItem: TCollectionItem; const aName: string): string;
+begin
+ SetPropValue(anItem, 'Name', aName); // Defaul implementation. Not super-fast but for now's ok
+end;
+
+function TSearcheableCollection.CloneItem(iIndex: integer): integer;
+var
+ lOldItem, lNewItem: TCollectionItem;
+begin
+ lOldItem := Items[iIndex];
+ lNewItem := Add();
+ lNewItem.Assign(lOldItem);
+ lNewItem.DisplayName := FindUniqueNameEx('Copy of ' + lOldItem.DisplayName, 'Copy (%d) of ' + lOldItem.DisplayName);
+ result := lNewItem.Index;
+end;
+
+procedure TSearcheableCollection.MoveItem(iFromIndex, iToIndex: integer);
+var
+ lSave: TCollectionItem;
+ lOld: TCollectionItem;
+begin
+ if (iFromIndex < 0) or (iFromIndex >= Count) then raise ERangeError.CreateFmt('iFromIndex out of range (%d).', [iFromIndex]);
+ if (iToIndex < 0) or (iToIndex >= Count) then raise ERangeError.CreateFmt('iToIndex out of range (%d).', [iToIndex]);
+
+ lOld := Items[iFromIndex];
+
+ if iToIndex > iFromIndex then inc(iToIndex); //account for the old item that will be removed later
+
+ lSave := Insert(iToIndex);
+ lSave.Assign(lOld);
+ Delete(lOld.Index);
+end;
+
+function TSearcheableCollection.FindUniqueName(const iBaseName: string): string;
+var
+ lIndex: integer;
+begin
+ result := iBaseName;
+ lIndex := 0;
+ while Assigned(FindItem(result)) do begin
+ inc(lIndex);
+ result := iBaseName + IntToStr(lIndex);
+ end;
+end;
+
+function TSearcheableCollection.FindUniqueNameEx(const iBaseName, iNumberedName: string): string;
+var
+ lIndex: integer;
+begin
+ result := iBaseName;
+ lIndex := 0;
+ while Assigned(FindItem(result)) do begin
+ inc(lIndex);
+ result := Format(iNumberedName, [lIndex]);
+ end;
+end;
+
+function TSearcheableCollection.ItemName: string;
+begin
+ result := 'item';
+end;
+
+procedure TSearcheableCollection.TriggerOnItemRemoved(const iName: string);
+begin
+ if Assigned(OnItemRemoved) then OnItemRemoved(self, iName);
+end;
+
+procedure TSearcheableCollection.TriggerOnItemRenamed(const iOldName, iNewName: string);
+begin
+ if Assigned(OnItemRenamed) then OnItemRenamed(self, iOldName, iNewName);
+end;
+
+constructor TSearcheableCollection.Create(AOwner: TPersistent;
+ ItemClass: TCollectionItemClass);
+begin
+ inherited Create(AOwner,ItemClass);
+ FAllowEmptyName:=False;
+end;
+
+{ TInterfacedCollection }
+
+function TInterfacedCollection._AddRef: Integer;
+begin
+ result := -1;
+end;
+
+function TInterfacedCollection._Release: Integer;
+begin
+ result := -1;
+end;
+
+function TInterfacedCollection.GetCount: integer;
+begin
+ result := -1;
+end;
+
+function TInterfacedCollection.QueryInterface(const IID: TGUID;
+ out Obj): HResult;
+begin
+ if GetInterface(IID, Obj) then
+ Result := 0
+ else
+ Result := E_NOINTERFACE;
+end;
+
+{ TSearcheableCollectionCached }
+
+constructor TSearcheableCollectionCached.Create(AOwner: TPersistent;
+ ItemClass: TCollectionItemClass);
+begin
+ inherited Create(AOwner,ItemClass);
+ FNameList := TStringList.Create;
+ FNameList.CaseSensitive:=False;
+ fNeedRebuild := True;
+end;
+
+destructor TSearcheableCollectionCached.Destroy;
+begin
+ FNameList.Free;
+ inherited;
+end;
+
+function TSearcheableCollectionCached.FindItem(
+ const aName: string): TCollectionItem;
+var
+ i: integer;
+begin
+ if fNeedRebuild then RebuildList;
+ i := FNameList.IndexOf(aName);
+ if i = -1 then
+ Result := nil
+ else
+ Result := TCollectionItem(FNameList.Objects[i]);
+end;
+
+procedure TSearcheableCollectionCached.Notify(Item: TCollectionItem;
+ Action: TCollectionNotification);
+begin
+ fNeedRebuild := True;
+ inherited;
+end;
+
+procedure TSearcheableCollectionCached.RebuildList;
+var
+ i: integer;
+begin
+ FNameList.Sorted:=False;
+ FNameList.Clear;
+ FNameList.Capacity:= Self.Count;
+ for i := 0 to Count -1 do
+ FNameList.AddObject(GetItemName(Items[i]),Items[i]);
+ FNameList.Sorted:=True;
+ fNeedRebuild := False;
+end;
+
+procedure TSearcheableCollectionCached.TriggerOnItemRenamed(const iOldName,
+ iNewName: string);
+begin
+ fNeedRebuild := True;
+ inherited TriggerOnItemRenamed(iOldName, iNewName);
+end;
+
+procedure TSearcheableCollectionCached.TriggerOnItemRemoved(
+ const iName: string);
+begin
+ fNeedRebuild := True;
+ inherited TriggerOnItemRemoved(iName);
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDASybaseInterfaces.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDASybaseInterfaces.pas
new file mode 100644
index 0000000..247807b
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDASybaseInterfaces.pas
@@ -0,0 +1,801 @@
+unit uDASybaseInterfaces;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses uDAInterfaces, uDAEngine;
+
+type
+ { IDASybaseConnection
+ For identification purposes. Implemented by all Sybase connections }
+ IDASybaseConnection = interface(IDAConnection)
+ ['{901F16BC-4A56-4ADB-BFF9-87D23590C326}']
+ end;
+
+
+function Sybase_IdentifierNeedsQuoting(const iIdentifier: string): boolean;
+
+implementation
+uses
+ SysUtils;
+
+var
+ Sybase_reservedwords: array of string;
+
+function Sybase_IdentifierNeedsQuoting(const iIdentifier: string): boolean;
+begin
+ Result := TestIdentifier(iIdentifier, Sybase_reservedwords);
+end;
+
+procedure Sybase_InitializeReservedWords;
+begin
+// from http://publib.boulder.ibm.com/infocenter/Sybaseluw/v9r5/topic/com.ibm.Sybase.luw.sql.ref.doc/doc/r0001095.html
+ SetLength(Sybase_reservedwords, 747);
+ // sorted with TStringList.Sort (bds2007)
+ Sybase_reservedwords[0] := 'A';
+ Sybase_reservedwords[1] := 'ABORT';
+ Sybase_reservedwords[2] := 'ABS';
+ Sybase_reservedwords[3] := 'ABSOLUTE';
+ Sybase_reservedwords[4] := 'ACCESS';
+ Sybase_reservedwords[5] := 'ACOS';
+ Sybase_reservedwords[6] := 'ACQUIRE';
+ Sybase_reservedwords[7] := 'ACTION';
+ Sybase_reservedwords[8] := 'ACTIVATE';
+ Sybase_reservedwords[9] := 'ADA';
+ Sybase_reservedwords[10] := 'ADD';
+ Sybase_reservedwords[11] := 'ADDFORM';
+ Sybase_reservedwords[12] := 'ADMIN';
+ Sybase_reservedwords[13] := 'AFTER';
+ Sybase_reservedwords[14] := 'AGGREGATE';
+ Sybase_reservedwords[15] := 'ALIAS';
+ Sybase_reservedwords[16] := 'ALL';
+ Sybase_reservedwords[17] := 'ALLOCATE';
+ Sybase_reservedwords[18] := 'ALTER';
+ Sybase_reservedwords[19] := 'AN';
+ Sybase_reservedwords[20] := 'ANALYZE';
+ Sybase_reservedwords[21] := 'AND';
+ Sybase_reservedwords[22] := 'ANY';
+ Sybase_reservedwords[23] := 'APPEND';
+ Sybase_reservedwords[24] := 'ARCHIVE';
+ Sybase_reservedwords[25] := 'ARCHIVELOG';
+ Sybase_reservedwords[26] := 'ARE';
+ Sybase_reservedwords[27] := 'ARRAY';
+ Sybase_reservedwords[28] := 'ARRAYLEN';
+ Sybase_reservedwords[29] := 'AS';
+ Sybase_reservedwords[30] := 'ASC';
+ Sybase_reservedwords[31] := 'ASCII';
+ Sybase_reservedwords[32] := 'ASIN';
+ Sybase_reservedwords[33] := 'ASSERTION';
+ Sybase_reservedwords[34] := 'AT';
+ Sybase_reservedwords[35] := 'ATAN';
+ Sybase_reservedwords[36] := 'AUDIT';
+ Sybase_reservedwords[37] := 'AUTHORIZATION';
+ Sybase_reservedwords[38] := 'AVG';
+ Sybase_reservedwords[39] := 'AVGU';
+ Sybase_reservedwords[40] := 'BACKUP';
+ Sybase_reservedwords[41] := 'BECOME';
+ Sybase_reservedwords[42] := 'BEFORE';
+ Sybase_reservedwords[43] := 'BEGIN';
+ Sybase_reservedwords[44] := 'BETWEEN';
+ Sybase_reservedwords[45] := 'BIGINT';
+ Sybase_reservedwords[46] := 'BINARY';
+ Sybase_reservedwords[47] := 'BIND';
+ Sybase_reservedwords[48] := 'BINDING';
+ Sybase_reservedwords[49] := 'BIT';
+ Sybase_reservedwords[50] := 'BLOB';
+ Sybase_reservedwords[51] := 'BLOCK';
+ Sybase_reservedwords[52] := 'BODY';
+ Sybase_reservedwords[53] := 'BOOLEAN';
+ Sybase_reservedwords[54] := 'BOTH';
+ Sybase_reservedwords[55] := 'BREADTH';
+ Sybase_reservedwords[56] := 'BREAK';
+ Sybase_reservedwords[57] := 'BREAKDISPLAY';
+ Sybase_reservedwords[58] := 'BROWSE';
+ Sybase_reservedwords[59] := 'BUFFERPOOL';
+ Sybase_reservedwords[60] := 'BULK';
+ Sybase_reservedwords[61] := 'BY';
+ Sybase_reservedwords[62] := 'BYREF';
+ Sybase_reservedwords[63] := 'CACHE';
+ Sybase_reservedwords[64] := 'CALL';
+ Sybase_reservedwords[65] := 'CALLPROC';
+ Sybase_reservedwords[66] := 'CANCEL';
+ Sybase_reservedwords[67] := 'CAPTURE';
+ Sybase_reservedwords[68] := 'CASCADE';
+ Sybase_reservedwords[69] := 'CASCADED';
+ Sybase_reservedwords[70] := 'CASE';
+ Sybase_reservedwords[71] := 'CAST';
+ Sybase_reservedwords[72] := 'CATALOG';
+ Sybase_reservedwords[73] := 'CCSID';
+ Sybase_reservedwords[74] := 'CEILING';
+ Sybase_reservedwords[75] := 'CHANGE';
+ Sybase_reservedwords[76] := 'CHAR';
+ Sybase_reservedwords[77] := 'CHARACTER';
+ Sybase_reservedwords[78] := 'CHARTOROWID';
+ Sybase_reservedwords[79] := 'CHECK';
+ Sybase_reservedwords[80] := 'CHECKPOINT';
+ Sybase_reservedwords[81] := 'CHR';
+ Sybase_reservedwords[82] := 'CLASS';
+ Sybase_reservedwords[83] := 'CLEANUP';
+ Sybase_reservedwords[84] := 'CLEAR';
+ Sybase_reservedwords[85] := 'CLEARROW';
+ Sybase_reservedwords[86] := 'CLOB';
+ Sybase_reservedwords[87] := 'CLOSE';
+ Sybase_reservedwords[88] := 'CLUSTER';
+ Sybase_reservedwords[89] := 'CLUSTERED';
+ Sybase_reservedwords[90] := 'COALESCE';
+ Sybase_reservedwords[91] := 'COBOL';
+ Sybase_reservedwords[92] := 'COLGROUP';
+ Sybase_reservedwords[93] := 'COLLATE';
+ Sybase_reservedwords[94] := 'COLLATION';
+ Sybase_reservedwords[95] := 'COLLECTION';
+ Sybase_reservedwords[96] := 'COLUMN';
+ Sybase_reservedwords[97] := 'COMMAND';
+ Sybase_reservedwords[98] := 'COMMENT';
+ Sybase_reservedwords[99] := 'COMMIT';
+ Sybase_reservedwords[100] := 'COMMITTED';
+ Sybase_reservedwords[101] := 'COMPILE';
+ Sybase_reservedwords[102] := 'COMPLETION';
+ Sybase_reservedwords[103] := 'COMPLEX';
+ Sybase_reservedwords[104] := 'COMPRESS';
+ Sybase_reservedwords[105] := 'COMPUTE';
+ Sybase_reservedwords[106] := 'CONCAT';
+ Sybase_reservedwords[107] := 'CONFIRM';
+ Sybase_reservedwords[108] := 'CONNECT';
+ Sybase_reservedwords[109] := 'CONNECTION';
+ Sybase_reservedwords[110] := 'CONSTRAINT';
+ Sybase_reservedwords[111] := 'CONSTRAINTS';
+ Sybase_reservedwords[112] := 'CONSTRUCTOR';
+ Sybase_reservedwords[113] := 'CONTAINS';
+ Sybase_reservedwords[114] := 'CONTAINSTABLE';
+ Sybase_reservedwords[115] := 'CONTENTS';
+ Sybase_reservedwords[116] := 'CONTINUE';
+ Sybase_reservedwords[117] := 'CONTROLFILE';
+ Sybase_reservedwords[118] := 'CONTROLROW';
+ Sybase_reservedwords[119] := 'CONVERT';
+ Sybase_reservedwords[120] := 'COPY';
+ Sybase_reservedwords[121] := 'CORRESPONDING';
+ Sybase_reservedwords[122] := 'COS';
+ Sybase_reservedwords[123] := 'COUNT';
+ Sybase_reservedwords[124] := 'COUNTU';
+ Sybase_reservedwords[125] := 'CREATE';
+ Sybase_reservedwords[126] := 'CROSS';
+ Sybase_reservedwords[127] := 'CUBE';
+ Sybase_reservedwords[128] := 'CURRENT';
+ Sybase_reservedwords[129] := 'CURRENT_DATE';
+ Sybase_reservedwords[130] := 'CURRENT_PATH';
+ Sybase_reservedwords[131] := 'CURRENT_ROLE';
+ Sybase_reservedwords[132] := 'CURRENT_TIME';
+ Sybase_reservedwords[133] := 'CURRENT_TIMESTAMP';
+ Sybase_reservedwords[134] := 'CURRENT_USER';
+ Sybase_reservedwords[135] := 'CURSOR';
+ Sybase_reservedwords[136] := 'CVAR';
+ Sybase_reservedwords[137] := 'CYCLE';
+ Sybase_reservedwords[138] := 'DATA';
+ Sybase_reservedwords[139] := 'DATABASE';
+ Sybase_reservedwords[140] := 'DATAFILE';
+ Sybase_reservedwords[141] := 'DATAHANDLER';
+ Sybase_reservedwords[142] := 'DATAPAGES';
+ Sybase_reservedwords[143] := 'DATE';
+ Sybase_reservedwords[144] := 'DAY';
+ Sybase_reservedwords[145] := 'DAYOFMONTH';
+ Sybase_reservedwords[146] := 'DAYOFWEEK';
+ Sybase_reservedwords[147] := 'DAYOFYEAR';
+ Sybase_reservedwords[148] := 'DAYS';
+ Sybase_reservedwords[149] := 'DBA';
+ Sybase_reservedwords[150] := 'DBCC';
+ Sybase_reservedwords[151] := 'DBSPACE';
+ Sybase_reservedwords[152] := 'DEALLOCATE';
+ Sybase_reservedwords[153] := 'DEC';
+ Sybase_reservedwords[154] := 'DECIMAL';
+ Sybase_reservedwords[155] := 'DECLARATION';
+ Sybase_reservedwords[156] := 'DECLARE';
+ Sybase_reservedwords[157] := 'DECODE';
+ Sybase_reservedwords[158] := 'DEFAULT';
+ Sybase_reservedwords[159] := 'DEFERRABLE';
+ Sybase_reservedwords[160] := 'DEFERRED';
+ Sybase_reservedwords[161] := 'DEFINE';
+ Sybase_reservedwords[162] := 'DEFINITION';
+ Sybase_reservedwords[163] := 'DEGREES';
+ Sybase_reservedwords[164] := 'DELETE';
+ Sybase_reservedwords[165] := 'DELETEROW';
+ Sybase_reservedwords[166] := 'DENY';
+ Sybase_reservedwords[167] := 'DEPTH';
+ Sybase_reservedwords[168] := 'DEREF';
+ Sybase_reservedwords[169] := 'DESC';
+ Sybase_reservedwords[170] := 'DESCRIBE';
+ Sybase_reservedwords[171] := 'DESCRIPTOR';
+ Sybase_reservedwords[172] := 'DESTROY';
+ Sybase_reservedwords[173] := 'DESTRUCTOR';
+ Sybase_reservedwords[174] := 'DETERMINISTIC';
+ Sybase_reservedwords[175] := 'DHTYPE';
+ Sybase_reservedwords[176] := 'DIAGNOSTICS';
+ Sybase_reservedwords[177] := 'DICTIONARY';
+ Sybase_reservedwords[178] := 'DIRECT';
+ Sybase_reservedwords[179] := 'DISABLE';
+ Sybase_reservedwords[180] := 'DISCONNECT';
+ Sybase_reservedwords[181] := 'DISK';
+ Sybase_reservedwords[182] := 'DISMOUNT';
+ Sybase_reservedwords[183] := 'DISPLAY';
+ Sybase_reservedwords[184] := 'DISTINCT';
+ Sybase_reservedwords[185] := 'DISTRIBUTE';
+ Sybase_reservedwords[186] := 'DISTRIBUTED';
+ Sybase_reservedwords[187] := 'DO';
+ Sybase_reservedwords[188] := 'DOMAIN';
+ Sybase_reservedwords[189] := 'DOUBLE';
+ Sybase_reservedwords[190] := 'DOWN';
+ Sybase_reservedwords[191] := 'DROP';
+ Sybase_reservedwords[192] := 'DUMMY';
+ Sybase_reservedwords[193] := 'DUMP';
+ Sybase_reservedwords[194] := 'DYNAMIC';
+ Sybase_reservedwords[195] := 'EACH';
+ Sybase_reservedwords[196] := 'EDITPROC';
+ Sybase_reservedwords[197] := 'ELSE';
+ Sybase_reservedwords[198] := 'ELSEIF';
+ Sybase_reservedwords[199] := 'ENABLE';
+ Sybase_reservedwords[200] := 'END';
+ Sybase_reservedwords[201] := 'ENDDATA';
+ Sybase_reservedwords[202] := 'ENDDISPLAY';
+ Sybase_reservedwords[203] := 'ENDEXEC';
+ Sybase_reservedwords[204] := 'END-EXEC';
+ Sybase_reservedwords[205] := 'ENDFORMS';
+ Sybase_reservedwords[206] := 'ENDIF';
+ Sybase_reservedwords[207] := 'ENDLOOP';
+ Sybase_reservedwords[208] := 'ENDSELECT';
+ Sybase_reservedwords[209] := 'ENDWHILE';
+ Sybase_reservedwords[210] := 'EQUALS';
+ Sybase_reservedwords[211] := 'ERASE';
+ Sybase_reservedwords[212] := 'ERRLVL';
+ Sybase_reservedwords[213] := 'ERROREXIT';
+ Sybase_reservedwords[214] := 'ESCAPE';
+ Sybase_reservedwords[215] := 'EVENTS';
+ Sybase_reservedwords[216] := 'EVERY';
+ Sybase_reservedwords[217] := 'EXCEPT';
+ Sybase_reservedwords[218] := 'EXCEPTION';
+ Sybase_reservedwords[219] := 'EXCEPTIONS';
+ Sybase_reservedwords[220] := 'EXCLUDE';
+ Sybase_reservedwords[221] := 'EXCLUDING';
+ Sybase_reservedwords[222] := 'EXCLUSIVE';
+ Sybase_reservedwords[223] := 'EXEC';
+ Sybase_reservedwords[224] := 'EXECUTE';
+ Sybase_reservedwords[225] := 'EXISTS';
+ Sybase_reservedwords[226] := 'EXIT';
+ Sybase_reservedwords[227] := 'EXP';
+ Sybase_reservedwords[228] := 'EXPLAIN';
+ Sybase_reservedwords[229] := 'EXPLICIT';
+ Sybase_reservedwords[230] := 'EXTENT';
+ Sybase_reservedwords[231] := 'EXTERNAL';
+ Sybase_reservedwords[232] := 'EXTERNALLY';
+ Sybase_reservedwords[233] := 'EXTRACT';
+ Sybase_reservedwords[234] := 'FALSE';
+ Sybase_reservedwords[235] := 'FETCH';
+ Sybase_reservedwords[236] := 'FIELD';
+ Sybase_reservedwords[237] := 'FIELDPROC';
+ Sybase_reservedwords[238] := 'FILE';
+ Sybase_reservedwords[239] := 'FILLFACTOR';
+ Sybase_reservedwords[240] := 'FINALIZE';
+ Sybase_reservedwords[241] := 'FINALIZE';
+ Sybase_reservedwords[242] := 'FIRST';
+ Sybase_reservedwords[243] := 'FLOAT';
+ Sybase_reservedwords[244] := 'FLOOR';
+ Sybase_reservedwords[245] := 'FLOPPY';
+ Sybase_reservedwords[246] := 'FLUSH';
+ Sybase_reservedwords[247] := 'FOR';
+ Sybase_reservedwords[248] := 'FORCE';
+ Sybase_reservedwords[249] := 'FOREIGN';
+ Sybase_reservedwords[250] := 'FORMDATA';
+ Sybase_reservedwords[251] := 'FORMINIT';
+ Sybase_reservedwords[252] := 'FORMS';
+ Sybase_reservedwords[253] := 'FORTRAN';
+ Sybase_reservedwords[254] := 'FOUND';
+ Sybase_reservedwords[255] := 'FREE';
+ Sybase_reservedwords[256] := 'FREELIST';
+ Sybase_reservedwords[257] := 'FREELISTS';
+ Sybase_reservedwords[258] := 'FREETEXT';
+ Sybase_reservedwords[259] := 'FREETEXTTABLE';
+ Sybase_reservedwords[260] := 'FROM';
+ Sybase_reservedwords[261] := 'FULL';
+ Sybase_reservedwords[262] := 'FUNCTION';
+ Sybase_reservedwords[263] := 'GENERAL';
+ Sybase_reservedwords[264] := 'GET';
+ Sybase_reservedwords[265] := 'GETCURRENTCONNECTION';
+ Sybase_reservedwords[266] := 'GETFORM';
+ Sybase_reservedwords[267] := 'GETOPER';
+ Sybase_reservedwords[268] := 'GETROW';
+ Sybase_reservedwords[269] := 'GLOBAL';
+ Sybase_reservedwords[270] := 'GO';
+ Sybase_reservedwords[271] := 'GOTO';
+ Sybase_reservedwords[272] := 'GRANT';
+ Sybase_reservedwords[273] := 'GRANTED';
+ Sybase_reservedwords[274] := 'GRAPHIC';
+ Sybase_reservedwords[275] := 'GREATEST';
+ Sybase_reservedwords[276] := 'GROUP';
+ Sybase_reservedwords[277] := 'GROUPING';
+ Sybase_reservedwords[278] := 'GROUPS';
+ Sybase_reservedwords[279] := 'HASH';
+ Sybase_reservedwords[280] := 'HAVING';
+ Sybase_reservedwords[281] := 'HELP';
+ Sybase_reservedwords[282] := 'HELPFILE';
+ Sybase_reservedwords[283] := 'HOLDLOCK';
+ Sybase_reservedwords[284] := 'HOST';
+ Sybase_reservedwords[285] := 'HOUR';
+ Sybase_reservedwords[286] := 'HOURS';
+ Sybase_reservedwords[287] := 'IDENTIFIED';
+ Sybase_reservedwords[288] := 'IDENTITY';
+ Sybase_reservedwords[289] := 'IDENTITYCOL';
+ Sybase_reservedwords[290] := 'IF';
+ Sybase_reservedwords[291] := 'IFNULL';
+ Sybase_reservedwords[292] := 'IGNORE';
+ Sybase_reservedwords[293] := 'IIMESSAGE';
+ Sybase_reservedwords[294] := 'IIPRINTF';
+ Sybase_reservedwords[295] := 'IMMEDIATE';
+ Sybase_reservedwords[296] := 'IMPORT';
+ Sybase_reservedwords[297] := 'IN';
+ Sybase_reservedwords[298] := 'INCLUDE';
+ Sybase_reservedwords[299] := 'INCLUDING';
+ Sybase_reservedwords[300] := 'INCREMENT';
+ Sybase_reservedwords[301] := 'INDEX';
+ Sybase_reservedwords[302] := 'INDEXPAGES';
+ Sybase_reservedwords[303] := 'INDICATOR';
+ Sybase_reservedwords[304] := 'INITCAP';
+ Sybase_reservedwords[305] := 'INITIAL';
+ Sybase_reservedwords[306] := 'INITIALIZE';
+ Sybase_reservedwords[307] := 'INITIALLY';
+ Sybase_reservedwords[308] := 'INITRANS';
+ Sybase_reservedwords[309] := 'INITTABLE';
+ Sybase_reservedwords[310] := 'INNER';
+ Sybase_reservedwords[311] := 'INOUT';
+ Sybase_reservedwords[312] := 'INPUT';
+ Sybase_reservedwords[313] := 'INSENSITIVE';
+ Sybase_reservedwords[314] := 'INSERT';
+ Sybase_reservedwords[315] := 'INSERTROW';
+ Sybase_reservedwords[316] := 'INSTANCE';
+ Sybase_reservedwords[317] := 'INSTR';
+ Sybase_reservedwords[318] := 'INT';
+ Sybase_reservedwords[319] := 'INTEGER';
+ Sybase_reservedwords[320] := 'INTEGRITY';
+ Sybase_reservedwords[321] := 'INTERFACE';
+ Sybase_reservedwords[322] := 'INTERSECT';
+ Sybase_reservedwords[323] := 'INTERVAL';
+ Sybase_reservedwords[324] := 'INTO';
+ Sybase_reservedwords[325] := 'IS';
+ Sybase_reservedwords[326] := 'ISOLATION';
+ Sybase_reservedwords[327] := 'ITERATE';
+ Sybase_reservedwords[328] := 'JOIN';
+ Sybase_reservedwords[329] := 'KEY';
+ Sybase_reservedwords[330] := 'KILL';
+ Sybase_reservedwords[331] := 'LABEL';
+ Sybase_reservedwords[332] := 'LANGUAGE';
+ Sybase_reservedwords[333] := 'LARGE';
+ Sybase_reservedwords[334] := 'LAST';
+ Sybase_reservedwords[335] := 'LATERAL';
+ Sybase_reservedwords[336] := 'LAYER';
+ Sybase_reservedwords[337] := 'LEADING';
+ Sybase_reservedwords[338] := 'LEAST';
+ Sybase_reservedwords[339] := 'LEFT';
+ Sybase_reservedwords[340] := 'LENGTH';
+ Sybase_reservedwords[341] := 'LESS';
+ Sybase_reservedwords[342] := 'LEVEL';
+ Sybase_reservedwords[343] := 'LIKE';
+ Sybase_reservedwords[344] := 'LIMIT';
+ Sybase_reservedwords[345] := 'LINENO';
+ Sybase_reservedwords[346] := 'LINK';
+ Sybase_reservedwords[347] := 'LIST';
+ Sybase_reservedwords[348] := 'LISTS';
+ Sybase_reservedwords[349] := 'LOAD';
+ Sybase_reservedwords[350] := 'LOADTABLE';
+ Sybase_reservedwords[351] := 'LOCAL';
+ Sybase_reservedwords[352] := 'LOCALTIME';
+ Sybase_reservedwords[353] := 'LOCALTIMESTAMP';
+ Sybase_reservedwords[354] := 'LOCATE';
+ Sybase_reservedwords[355] := 'LOCATOR';
+ Sybase_reservedwords[356] := 'LOCK';
+ Sybase_reservedwords[357] := 'LOCKSIZE';
+ Sybase_reservedwords[358] := 'LOG';
+ Sybase_reservedwords[359] := 'LOGFILE';
+ Sybase_reservedwords[360] := 'LONG';
+ Sybase_reservedwords[361] := 'LONGINT';
+ Sybase_reservedwords[362] := 'LOWER';
+ Sybase_reservedwords[363] := 'LPAD';
+ Sybase_reservedwords[364] := 'LTRIM';
+ Sybase_reservedwords[365] := 'LVARBINARY';
+ Sybase_reservedwords[366] := 'LVARCHAR';
+ Sybase_reservedwords[367] := 'MAIN';
+ Sybase_reservedwords[368] := 'MANAGE';
+ Sybase_reservedwords[369] := 'MANUAL';
+ Sybase_reservedwords[370] := 'MAP';
+ Sybase_reservedwords[371] := 'MATCH';
+ Sybase_reservedwords[372] := 'MAX';
+ Sybase_reservedwords[373] := 'MAXDATAFILES';
+ Sybase_reservedwords[374] := 'MAXEXTENTS';
+ Sybase_reservedwords[375] := 'MAXINSTANCES';
+ Sybase_reservedwords[376] := 'MAXLOGFILES';
+ Sybase_reservedwords[377] := 'MAXLOGHISTORY';
+ Sybase_reservedwords[378] := 'MAXLOGMEMBERS';
+ Sybase_reservedwords[379] := 'MAXTRANS';
+ Sybase_reservedwords[380] := 'MAXVALUE';
+ Sybase_reservedwords[381] := 'MENUITEM';
+ Sybase_reservedwords[382] := 'MESSAGE';
+ Sybase_reservedwords[383] := 'MICROSECOND';
+ Sybase_reservedwords[384] := 'MICROSECONDS';
+ Sybase_reservedwords[385] := 'MIN';
+ Sybase_reservedwords[386] := 'MINEXTENTS';
+ Sybase_reservedwords[387] := 'MINUS';
+ Sybase_reservedwords[388] := 'MINUTE';
+ Sybase_reservedwords[389] := 'MINUTES';
+ Sybase_reservedwords[390] := 'MINVALUE';
+ Sybase_reservedwords[391] := 'MIRROREXIT';
+ Sybase_reservedwords[392] := 'MOD';
+ Sybase_reservedwords[393] := 'MODE';
+ Sybase_reservedwords[394] := 'MODIFIES';
+ Sybase_reservedwords[395] := 'MODIFY';
+ Sybase_reservedwords[396] := 'MODULE';
+ Sybase_reservedwords[397] := 'MONEY';
+ Sybase_reservedwords[398] := 'MONTH';
+ Sybase_reservedwords[399] := 'MONTHS';
+ Sybase_reservedwords[400] := 'MOUNT';
+ Sybase_reservedwords[401] := 'MOVE';
+ Sybase_reservedwords[402] := 'NAMED';
+ Sybase_reservedwords[403] := 'NAMES';
+ Sybase_reservedwords[404] := 'NATIONAL';
+ Sybase_reservedwords[405] := 'NATURAL';
+ Sybase_reservedwords[406] := 'NCHAR';
+ Sybase_reservedwords[407] := 'NCLOB';
+ Sybase_reservedwords[408] := 'NEW';
+ Sybase_reservedwords[409] := 'NEXT';
+ Sybase_reservedwords[410] := 'NHEADER';
+ Sybase_reservedwords[411] := 'NO';
+ Sybase_reservedwords[412] := 'NOARCHIVELOG';
+ Sybase_reservedwords[413] := 'NOAUDIT';
+ Sybase_reservedwords[414] := 'NOCACHE';
+ Sybase_reservedwords[415] := 'NOCHECK';
+ Sybase_reservedwords[416] := 'NOCOMPRESS';
+ Sybase_reservedwords[417] := 'NOCYCLE';
+ Sybase_reservedwords[418] := 'NOECHO';
+ Sybase_reservedwords[419] := 'NOMAXVALUE';
+ Sybase_reservedwords[420] := 'NOMINVALUE';
+ Sybase_reservedwords[421] := 'NONCLUSTERED';
+ Sybase_reservedwords[422] := 'NONE';
+ Sybase_reservedwords[423] := 'NOORDER';
+ Sybase_reservedwords[424] := 'NORESETLOGS';
+ Sybase_reservedwords[425] := 'NORMAL';
+ Sybase_reservedwords[426] := 'NOSORT';
+ Sybase_reservedwords[427] := 'NOT';
+ Sybase_reservedwords[428] := 'NOTFOUND';
+ Sybase_reservedwords[429] := 'NOTRIM';
+ Sybase_reservedwords[430] := 'NOWAIT';
+ Sybase_reservedwords[431] := 'NULL';
+ Sybase_reservedwords[432] := 'NULLIF';
+ Sybase_reservedwords[433] := 'NULLVALUE';
+ Sybase_reservedwords[434] := 'NUMBER';
+ Sybase_reservedwords[435] := 'NUMERIC';
+ Sybase_reservedwords[436] := 'NUMPARTS';
+ Sybase_reservedwords[437] := 'NVL';
+ Sybase_reservedwords[438] := 'OBID';
+ Sybase_reservedwords[439] := 'OBJECT';
+ Sybase_reservedwords[440] := 'ODBCINFO';
+ Sybase_reservedwords[441] := 'OF';
+ Sybase_reservedwords[442] := 'OFF';
+ Sybase_reservedwords[443] := 'OFFLINE';
+ Sybase_reservedwords[444] := 'OFFSETS';
+ Sybase_reservedwords[445] := 'OLD';
+ Sybase_reservedwords[446] := 'ON';
+ Sybase_reservedwords[447] := 'ONCE';
+ Sybase_reservedwords[448] := 'ONLINE';
+ Sybase_reservedwords[449] := 'ONLY';
+ Sybase_reservedwords[450] := 'OPEN';
+ Sybase_reservedwords[451] := 'OPENDATASOURCE';
+ Sybase_reservedwords[452] := 'OPENQUERY';
+ Sybase_reservedwords[453] := 'OPENROWSET';
+ Sybase_reservedwords[454] := 'OPERATION';
+ Sybase_reservedwords[455] := 'OPTIMAL';
+ Sybase_reservedwords[456] := 'OPTIMIZE';
+ Sybase_reservedwords[457] := 'OPTION';
+ Sybase_reservedwords[458] := 'OR';
+ Sybase_reservedwords[459] := 'ORDER';
+ Sybase_reservedwords[460] := 'ORDINALITY';
+ Sybase_reservedwords[461] := 'OUT';
+ Sybase_reservedwords[462] := 'OUTER';
+ Sybase_reservedwords[463] := 'OUTPUT';
+ Sybase_reservedwords[464] := 'OVER';
+ Sybase_reservedwords[465] := 'OVERLAPS';
+ Sybase_reservedwords[466] := 'OWN';
+ Sybase_reservedwords[467] := 'PACKAGE';
+ Sybase_reservedwords[468] := 'PAD';
+ Sybase_reservedwords[469] := 'PAGE';
+ Sybase_reservedwords[470] := 'PAGES';
+ Sybase_reservedwords[471] := 'PARALLEL';
+ Sybase_reservedwords[472] := 'PARAMETER';
+ Sybase_reservedwords[473] := 'PARAMETERS';
+ Sybase_reservedwords[474] := 'PART';
+ Sybase_reservedwords[475] := 'PARTIAL';
+ Sybase_reservedwords[476] := 'PASCAL';
+ Sybase_reservedwords[477] := 'PATH';
+ Sybase_reservedwords[478] := 'PCTFREE';
+ Sybase_reservedwords[479] := 'PCTINCREASE';
+ Sybase_reservedwords[480] := 'PCTINDEX';
+ Sybase_reservedwords[481] := 'PCTUSED';
+ Sybase_reservedwords[482] := 'PERCENT';
+ Sybase_reservedwords[483] := 'PERM';
+ Sybase_reservedwords[484] := 'PERMANENT';
+ Sybase_reservedwords[485] := 'PERMIT';
+ Sybase_reservedwords[486] := 'PI';
+ Sybase_reservedwords[487] := 'PIPE';
+ Sybase_reservedwords[488] := 'PLAN';
+ Sybase_reservedwords[489] := 'PLI';
+ Sybase_reservedwords[490] := 'POSITION';
+ Sybase_reservedwords[491] := 'POSTFIX';
+ Sybase_reservedwords[492] := 'POWER';
+ Sybase_reservedwords[493] := 'PRECISION';
+ Sybase_reservedwords[494] := 'PREFIX';
+ Sybase_reservedwords[495] := 'PREORDER';
+ Sybase_reservedwords[496] := 'PREPARE';
+ Sybase_reservedwords[497] := 'PRESERVE';
+ Sybase_reservedwords[498] := 'PRIMARY';
+ Sybase_reservedwords[499] := 'PRINT';
+ Sybase_reservedwords[500] := 'PRINTSCREEN';
+ Sybase_reservedwords[501] := 'PRIOR';
+ Sybase_reservedwords[502] := 'PRIQTY';
+ Sybase_reservedwords[503] := 'PRIVATE';
+ Sybase_reservedwords[504] := 'PRIVILEGES';
+ Sybase_reservedwords[505] := 'PROC';
+ Sybase_reservedwords[506] := 'PROCEDURE';
+ Sybase_reservedwords[507] := 'PROCESSEXIT';
+ Sybase_reservedwords[508] := 'PROFILE';
+ Sybase_reservedwords[509] := 'PROGRAM';
+ Sybase_reservedwords[510] := 'PROMPT';
+ Sybase_reservedwords[511] := 'PUBLIC';
+ Sybase_reservedwords[512] := 'PUTFORM';
+ Sybase_reservedwords[513] := 'PUTOPER';
+ Sybase_reservedwords[514] := 'PUTROW';
+ Sybase_reservedwords[515] := 'QUALIFICATION';
+ Sybase_reservedwords[516] := 'QUARTER';
+ Sybase_reservedwords[517] := 'QUOTA';
+ Sybase_reservedwords[518] := 'RADIANS';
+ Sybase_reservedwords[519] := 'RAISE';
+ Sybase_reservedwords[520] := 'RAISERROR';
+ Sybase_reservedwords[521] := 'RAND';
+ Sybase_reservedwords[522] := 'RANGE';
+ Sybase_reservedwords[523] := 'RAW';
+ Sybase_reservedwords[524] := 'READ';
+ Sybase_reservedwords[525] := 'READS';
+ Sybase_reservedwords[526] := 'READTEXT';
+ Sybase_reservedwords[527] := 'REAL';
+ Sybase_reservedwords[528] := 'RECONFIGURE';
+ Sybase_reservedwords[529] := 'RECORD';
+ Sybase_reservedwords[530] := 'RECOVER';
+ Sybase_reservedwords[531] := 'RECURSIVE';
+ Sybase_reservedwords[532] := 'REDISPLAY';
+ Sybase_reservedwords[533] := 'REF';
+ Sybase_reservedwords[534] := 'REFERENCES';
+ Sybase_reservedwords[535] := 'REFERENCING';
+ Sybase_reservedwords[536] := 'REGISTER';
+ Sybase_reservedwords[537] := 'RELATIVE';
+ Sybase_reservedwords[538] := 'RELEASE';
+ Sybase_reservedwords[539] := 'RELOCATE';
+ Sybase_reservedwords[540] := 'REMOVE';
+ Sybase_reservedwords[541] := 'RENAME';
+ Sybase_reservedwords[542] := 'REPEAT';
+ Sybase_reservedwords[543] := 'REPEATABLE';
+ Sybase_reservedwords[544] := 'REPEATED';
+ Sybase_reservedwords[545] := 'REPLACE';
+ Sybase_reservedwords[546] := 'REPLICATE';
+ Sybase_reservedwords[547] := 'REPLICATION';
+ Sybase_reservedwords[548] := 'RESET';
+ Sybase_reservedwords[549] := 'RESETLOGS';
+ Sybase_reservedwords[550] := 'RESOURCE';
+ Sybase_reservedwords[551] := 'RESTORE';
+ Sybase_reservedwords[552] := 'RESTRICT';
+ Sybase_reservedwords[553] := 'RESTRICTED';
+ Sybase_reservedwords[554] := 'RESULT';
+ Sybase_reservedwords[555] := 'RESUME';
+ Sybase_reservedwords[556] := 'RETRIEVE';
+ Sybase_reservedwords[557] := 'RETURN';
+ Sybase_reservedwords[558] := 'RETURNS';
+ Sybase_reservedwords[559] := 'REUSE';
+ Sybase_reservedwords[560] := 'REVOKE';
+ Sybase_reservedwords[561] := 'RIGHT';
+ Sybase_reservedwords[562] := 'ROLE';
+ Sybase_reservedwords[563] := 'ROLES';
+ Sybase_reservedwords[564] := 'ROLLBACK';
+ Sybase_reservedwords[565] := 'ROLLUP';
+ Sybase_reservedwords[566] := 'ROUTINE';
+ Sybase_reservedwords[567] := 'ROW';
+ Sybase_reservedwords[568] := 'ROWCOUNT';
+ Sybase_reservedwords[569] := 'ROWGUIDCOL';
+ Sybase_reservedwords[570] := 'ROWID';
+ Sybase_reservedwords[571] := 'ROWIDTOCHAR';
+ Sybase_reservedwords[572] := 'ROWLABEL';
+ Sybase_reservedwords[573] := 'ROWNUM';
+ Sybase_reservedwords[574] := 'ROWS';
+ Sybase_reservedwords[575] := 'ROWS';
+ Sybase_reservedwords[576] := 'RPAD';
+ Sybase_reservedwords[577] := 'RRN';
+ Sybase_reservedwords[578] := 'RTRIM';
+ Sybase_reservedwords[579] := 'RULE';
+ Sybase_reservedwords[580] := 'RUN';
+ Sybase_reservedwords[581] := 'RUNTIMESTATISTICS';
+ Sybase_reservedwords[582] := 'SAVE';
+ Sybase_reservedwords[583] := 'SAVEPOINT';
+ Sybase_reservedwords[584] := 'SCHEDULE';
+ Sybase_reservedwords[585] := 'SCHEMA';
+ Sybase_reservedwords[586] := 'SCN';
+ Sybase_reservedwords[587] := 'SCOPE';
+ Sybase_reservedwords[588] := 'SCREEN';
+ Sybase_reservedwords[589] := 'SCROLL';
+ Sybase_reservedwords[590] := 'SCROLLDOWN';
+ Sybase_reservedwords[591] := 'SCROLLUP';
+ Sybase_reservedwords[592] := 'SEARCH';
+ Sybase_reservedwords[593] := 'SECOND';
+ Sybase_reservedwords[594] := 'SECONDS';
+ Sybase_reservedwords[595] := 'SECQTY';
+ Sybase_reservedwords[596] := 'SECTION';
+ Sybase_reservedwords[597] := 'SEGMENT';
+ Sybase_reservedwords[598] := 'SELECT';
+ Sybase_reservedwords[599] := 'SEQUENCE';
+ Sybase_reservedwords[600] := 'SERIALIZABLE';
+ Sybase_reservedwords[601] := 'SERVICE';
+ Sybase_reservedwords[602] := 'SESSION';
+ Sybase_reservedwords[603] := 'SESSION_USER';
+ Sybase_reservedwords[604] := 'SET';
+ Sybase_reservedwords[605] := 'SETS';
+ Sybase_reservedwords[606] := 'SETUSER';
+ Sybase_reservedwords[607] := 'SETUSER';
+ Sybase_reservedwords[608] := 'SHARE';
+ Sybase_reservedwords[609] := 'SHARED';
+ Sybase_reservedwords[610] := 'SHORT';
+ Sybase_reservedwords[611] := 'SHUTDOWN';
+ Sybase_reservedwords[612] := 'SIGN';
+ Sybase_reservedwords[613] := 'SIMPLE';
+ Sybase_reservedwords[614] := 'SIN';
+ Sybase_reservedwords[615] := 'SIZE';
+ Sybase_reservedwords[616] := 'SLEEP';
+ Sybase_reservedwords[617] := 'SMALLINT';
+ Sybase_reservedwords[618] := 'SNAPSHOT';
+ Sybase_reservedwords[619] := 'SOME';
+ Sybase_reservedwords[620] := 'SORT';
+ Sybase_reservedwords[621] := 'SOUNDEX';
+ Sybase_reservedwords[622] := 'SPACE';
+ Sybase_reservedwords[623] := 'SPECIFIC';
+ Sybase_reservedwords[624] := 'SPECIFICTYPE';
+ Sybase_reservedwords[625] := 'SQL';
+ Sybase_reservedwords[626] := 'SQLBUF';
+ Sybase_reservedwords[627] := 'SQLCA';
+ Sybase_reservedwords[628] := 'SQLCODE';
+ Sybase_reservedwords[629] := 'SQLERROR';
+ Sybase_reservedwords[630] := 'SQLEXCEPTION';
+ Sybase_reservedwords[631] := 'SQLSTATE';
+ Sybase_reservedwords[632] := 'SQLWARNING';
+ Sybase_reservedwords[633] := 'SQRT';
+ Sybase_reservedwords[634] := 'START';
+ Sybase_reservedwords[635] := 'STATE';
+ Sybase_reservedwords[636] := 'STATEMENT';
+ Sybase_reservedwords[637] := 'STATIC';
+ Sybase_reservedwords[638] := 'STATISTICS';
+ Sybase_reservedwords[639] := 'STOGROUP';
+ Sybase_reservedwords[640] := 'STOP';
+ Sybase_reservedwords[641] := 'STORAGE';
+ Sybase_reservedwords[642] := 'STORPOOL';
+ Sybase_reservedwords[643] := 'STRUCTURE';
+ Sybase_reservedwords[644] := 'SUBMENU';
+ Sybase_reservedwords[645] := 'SUBPAGES';
+ Sybase_reservedwords[646] := 'SUBSTR';
+ Sybase_reservedwords[647] := 'SUBSTRING';
+ Sybase_reservedwords[648] := 'SUCCESSFUL';
+ Sybase_reservedwords[649] := 'SUFFIX';
+ Sybase_reservedwords[650] := 'SUM';
+ Sybase_reservedwords[651] := 'SUMU';
+ Sybase_reservedwords[652] := 'SWITCH';
+ Sybase_reservedwords[653] := 'SYNONYM';
+ Sybase_reservedwords[654] := 'SYSCAT';
+ Sybase_reservedwords[655] := 'SYSDATE';
+ Sybase_reservedwords[656] := 'SYSFUN';
+ Sybase_reservedwords[657] := 'SYSIBM';
+ Sybase_reservedwords[658] := 'SYSSTAT';
+ Sybase_reservedwords[659] := 'SYSTEM';
+ Sybase_reservedwords[660] := 'SYSTEM_USER';
+ Sybase_reservedwords[661] := 'SYSTIME';
+ Sybase_reservedwords[662] := 'SYSTIMESTAMP';
+ Sybase_reservedwords[663] := 'TABLE';
+ Sybase_reservedwords[664] := 'TABLEDATA';
+ Sybase_reservedwords[665] := 'TABLES';
+ Sybase_reservedwords[666] := 'TABLESPACE';
+ Sybase_reservedwords[667] := 'TAN';
+ Sybase_reservedwords[668] := 'TAPE';
+ Sybase_reservedwords[669] := 'TEMP';
+ Sybase_reservedwords[670] := 'TEMPORARY';
+ Sybase_reservedwords[671] := 'TERMINATE';
+ Sybase_reservedwords[672] := 'TEXTSIZE';
+ Sybase_reservedwords[673] := 'THAN';
+ Sybase_reservedwords[674] := 'THEN';
+ Sybase_reservedwords[675] := 'THREAD';
+ Sybase_reservedwords[676] := 'TIME';
+ Sybase_reservedwords[677] := 'TIMEOUT';
+ Sybase_reservedwords[678] := 'TIMESTAMP';
+ Sybase_reservedwords[679] := 'TIMEZONE_HOUR';
+ Sybase_reservedwords[680] := 'TIMEZONE_MINUTE';
+ Sybase_reservedwords[681] := 'TINYINT';
+ Sybase_reservedwords[682] := 'TO';
+ Sybase_reservedwords[683] := 'TOP';
+ Sybase_reservedwords[684] := 'TPE';
+ Sybase_reservedwords[685] := 'TRACING';
+ Sybase_reservedwords[686] := 'TRAILING';
+ Sybase_reservedwords[687] := 'TRAN';
+ Sybase_reservedwords[688] := 'TRANSACTION';
+ Sybase_reservedwords[689] := 'TRANSLATE';
+ Sybase_reservedwords[690] := 'TRANSLATION';
+ Sybase_reservedwords[691] := 'TREAT';
+ Sybase_reservedwords[692] := 'TRIGGER';
+ Sybase_reservedwords[693] := 'TRIGGERS';
+ Sybase_reservedwords[694] := 'TRIM';
+ Sybase_reservedwords[695] := 'TRUE';
+ Sybase_reservedwords[696] := 'TRUNCATE';
+ Sybase_reservedwords[697] := 'TSEQUAL';
+ Sybase_reservedwords[698] := 'TYPE';
+ Sybase_reservedwords[699] := 'UID';
+ Sybase_reservedwords[700] := 'UNCOMMITTED';
+ Sybase_reservedwords[701] := 'UNDER';
+ Sybase_reservedwords[702] := 'UNION';
+ Sybase_reservedwords[703] := 'UNIQUE';
+ Sybase_reservedwords[704] := 'UNKNOWN';
+ Sybase_reservedwords[705] := 'UNLIMITED';
+ Sybase_reservedwords[706] := 'UNLOADTABLE';
+ Sybase_reservedwords[707] := 'UNNEST';
+ Sybase_reservedwords[708] := 'UNSIGNED';
+ Sybase_reservedwords[709] := 'UNTIL';
+ Sybase_reservedwords[710] := 'UP';
+ Sybase_reservedwords[711] := 'UPDATE';
+ Sybase_reservedwords[712] := 'UPDATETEXT';
+ Sybase_reservedwords[713] := 'UPPER';
+ Sybase_reservedwords[714] := 'USAGE';
+ Sybase_reservedwords[715] := 'USE';
+ Sybase_reservedwords[716] := 'USER';
+ Sybase_reservedwords[717] := 'USING';
+ Sybase_reservedwords[718] := 'UUID';
+ Sybase_reservedwords[719] := 'VALIDATE';
+ Sybase_reservedwords[720] := 'VALIDPROC';
+ Sybase_reservedwords[721] := 'VALIDROW';
+ Sybase_reservedwords[722] := 'VALUE';
+ Sybase_reservedwords[723] := 'VALUES';
+ Sybase_reservedwords[724] := 'VARBINARY';
+ Sybase_reservedwords[725] := 'VARCHAR';
+ Sybase_reservedwords[726] := 'VARIABLE';
+ Sybase_reservedwords[727] := 'VARIABLES';
+ Sybase_reservedwords[728] := 'VARYING';
+ Sybase_reservedwords[729] := 'VCAT';
+ Sybase_reservedwords[730] := 'VERSION';
+ Sybase_reservedwords[731] := 'VIEW';
+ Sybase_reservedwords[732] := 'VOLUMES';
+ Sybase_reservedwords[733] := 'WAITFOR';
+ Sybase_reservedwords[734] := 'WEEK';
+ Sybase_reservedwords[735] := 'WHEN';
+ Sybase_reservedwords[736] := 'WHENEVER';
+ Sybase_reservedwords[737] := 'WHERE';
+ Sybase_reservedwords[738] := 'WHILE';
+ Sybase_reservedwords[739] := 'WITH';
+ Sybase_reservedwords[740] := 'WITHOUT';
+ Sybase_reservedwords[741] := 'WORK';
+ Sybase_reservedwords[742] := 'WRITE';
+ Sybase_reservedwords[743] := 'WRITETEXT';
+ Sybase_reservedwords[744] := 'YEAR';
+ Sybase_reservedwords[745] := 'YEARS';
+ Sybase_reservedwords[746] := 'ZONE';
+end;
+
+initialization
+ Sybase_InitializeReservedWords;
+finalization
+ Sybase_reservedwords := nil;
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDAUtils.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAUtils.pas
new file mode 100644
index 0000000..93de6f0
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAUtils.pas
@@ -0,0 +1,259 @@
+unit uDAUtils;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses Classes, DB, SysUtils, uDARes;
+
+const
+ // Directory aliases. DEFINE THEM IN UPPERCASE and do not translate
+ alias_System = '%SYSTEM%';
+ alias_ModuleDir = '%MODULE%';
+ alias_DABinDir = '%DABINDIR%';
+
+type
+ { TDAConnectionStringParser
+ Simple class that provides all the methods to work with Data Abstract connection strings.
+ Connection objects make use of this class in the method ApplyConnectionString. }
+ TDAConnectionStringParser = class
+ private
+ fServer: string;
+ fAuxDriver: string;
+ fPassword: string;
+ fUserID: string;
+ fDriverID: string;
+ fAuxParams: TStringList;
+ fDatabase: string;
+
+ function GetAuxParamNames(Index: integer): string;
+ function GetAuxParamsCount: integer;
+ function GetAuxParams(const Name: string): string;
+ procedure SetAuxParams(const Name, Value: string);
+ function GetAuxParamsString: string;
+
+ protected
+ public
+ constructor Create(const aConnectionString: string = '');
+ destructor Destroy; override;
+
+ procedure Clear;
+
+ class function ExtractDriverID(const aConnectionString: string): string;
+
+ procedure Parse(const aConnectionString: string);
+ function BuildString: string;
+
+ property DriverID: string read fDriverID write fDriverID;
+ property Server: string read fServer write fServer;
+ property Database: string read fDatabase write fDatabase;
+ property UserID: string read fUserID write fUserID;
+ property Password: string read fPassword write fPassword;
+ property AuxDriver: string read fAuxDriver write fAuxDriver;
+
+ property AuxParams[const Name: string]: string read GetAuxParams write SetAuxParams;
+ property AuxParamNames[Index: integer]: string read GetAuxParamNames;
+ property AuxParamsCount: integer read GetAuxParamsCount;
+ property AuxParamsString: string read GetAuxParamsString;
+ end;
+
+// Misc
+function TranslateFileName(const aFileName: string): string;
+function GetSystemDir: string;
+function GetModulePath: string;
+
+{$IFDEF FPC}
+type
+ IProviderSupport = interface
+ procedure PSExecute;
+ function PSGetParams: TParams;
+ end;
+{$ENDIF}
+function GetProviderSupport(aDataset: TDataset): IProviderSupport;
+
+implementation
+
+uses
+ {$IFDEF MSWINDOWS}Windows, {$ENDIF}
+ TypInfo, uROClasses;
+
+// Misc
+
+function TranslateFileName(const aFileName: string): string;
+var
+ i: integer;
+begin
+ result := aFileName;
+ i := Pos(alias_System, UpperCase(aFileName));
+ if (i > 0) then begin
+ Delete(result, i, Length(alias_System));
+ Insert(GetSystemDir, result, i);
+ end;
+
+ i := Pos(alias_ModuleDir, UpperCase(aFileName));
+ if (i > 0) then begin
+ Delete(result, i, Length(alias_ModuleDir));
+ Insert(GetModulePath, result, i);
+ end;
+end;
+
+function GetSystemDir: string;
+{$IFDEF MSWINDOWS}
+var
+ osdir: array[0..MAX_PATH] of char;
+ {$ENDIF}
+begin
+ {$IFDEF MSWINDOWS}
+ GetSystemDirectory(osdir, SizeOf(osdir));
+ result := ExcludeTrailingPathDelimiter(osdir);
+ {$ELSE}
+ Result := '';
+ RaiseError(err_NotSupported);
+ {$ENDIF}
+end;
+
+function GetModulePath: string;
+begin
+ result := ExcludeTrailingPathDelimiter(ExtractFilePath({$IFDEF FPC}ParamStr(0){$ELSE}GetModuleName(hInstance){$ENDIF}));
+end;
+
+function GetProviderSupport(aDataset: TDataset): IProviderSupport;
+begin
+ {$IFDEF DELPHI7UP}
+ result := aDataset as IProviderSupport;
+ {$ELSE}{$IFNDEF FPC}
+ result := IProviderSupport(aDataset);
+ {$ELSE}
+ result:=nil;
+ {$ENDIF}{$ENDIF}
+end;
+
+{ TDAConnectionStringParser }
+
+constructor TDAConnectionStringParser.Create(const aConnectionString: string = '');
+begin
+ inherited Create;
+
+ fAuxParams := TStringList.Create;
+ {fAuxParams.Duplicates := dupError;
+ fAuxParams.Sorted := TRUE;}
+
+ if (aConnectionString <> '') then Parse(aConnectionString);
+end;
+
+destructor TDAConnectionStringParser.Destroy;
+begin
+ fAuxParams.Free;
+
+ inherited;
+end;
+
+procedure TDAConnectionStringParser.Clear;
+begin
+ fServer := '';
+ fDatabase := '';
+ fAuxDriver := '';
+ fPassword := '';
+ fUserID := '';
+ fDriverID := '';
+ fAuxParams.Clear;
+end;
+
+procedure TDAConnectionStringParser.Parse(const aConnectionString: string);
+var
+ pars: IROStrings;
+ i: integer;
+ str: string;
+begin
+ Clear;
+
+ // ADO?Server=127.0.0.1;UserID=sa;Password=lemmein;AuxDriver=SQLOLEDB.1;Params1=abc;Param2=CDE
+ str := Trim(aConnectionString);
+
+ // Extracts the driver name
+ fDriverID := ExtractDriverID(str);
+ Delete(str, 1, Pos(ds_Separator, str));
+
+ // Extracts the rest of the parameters
+ pars := ListStringElements(str);
+
+ fAuxDriver := pars.ExtractValue(ds_AuxDriver);
+ fDatabase := pars.ExtractValue(ds_Database);
+ fUserID := pars.ExtractValue(ds_UserID);
+ fPassword := pars.ExtractValue(ds_Password);
+ fServer := pars.ExtractValue(ds_Server);
+
+ for i := 0 to (pars.Count - 1) do
+ AuxParams[pars.Names[i]] := pars.Values[pars.Names[i]];
+end;
+
+function TDAConnectionStringParser.GetAuxParamNames(
+ Index: integer): string;
+begin
+ result := fAuxParams.Names[Index]
+end;
+
+function TDAConnectionStringParser.GetAuxParamsCount: integer;
+begin
+ result := fAuxParams.Count
+end;
+
+function TDAConnectionStringParser.GetAuxParams(
+ const Name: string): string;
+begin
+ result := fAuxParams.Values[Name]
+end;
+
+procedure TDAConnectionStringParser.SetAuxParams(const Name,
+ Value: string);
+begin
+ fAuxParams.Values[Name] := Value
+end;
+
+function TDAConnectionStringParser.BuildString: string;
+var
+ i: integer;
+begin
+ result := fDriverID + ds_Separator;
+
+ if (fAuxDriver <> '') then result := result + ds_AuxDriver + '=' + fAuxDriver+';';
+ if (fDatabase <> '') then result := result + ds_Database + '=' + fDatabase+';';
+ if (fUserID <> '') then result := result + ds_UserID + '=' + fUserID+';';
+ if (fPassword <> '') then result := result + ds_Password + '=' + fPassword+';';
+ if (fServer <> '') then result := result + ds_Server + '=' + fServer+';';
+
+ for i := 0 to (fAuxParams.Count - 1) do
+ result := result + fAuxParams.Names[i] + '=' + fAuxParams.Values[fAuxParams.Names[i]]+';';
+end;
+
+class function TDAConnectionStringParser.ExtractDriverID(
+ const aConnectionString: string): string;
+var
+ str: string;
+begin
+ str := Trim(aConnectionString);
+ result := Trim(Copy(str, 1, Pos(ds_Separator, str) - 1));
+end;
+
+function TDAConnectionStringParser.GetAuxParamsString: string;
+var
+ i: integer;
+begin
+ result := '';
+ for i := 0 to (AuxParamsCount - 1) do
+ result := result + AuxParamNames[i] + '=' + AuxParams[AuxParamNames[i]] +';';
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDAWhere.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAWhere.pas
new file mode 100644
index 0000000..ed70707
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAWhere.pas
@@ -0,0 +1,1044 @@
+unit uDAWhere;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ SysUtils, Classes, uDAInterfaces, DateUtils, uROBinaryHelpers,
+ uROCompression, uROXMLIntf, uROClientIntf, FMTBcd;
+
+type
+ TDABinaryExpression = class(TDAWhereExpression)
+ private
+ fLeft,
+ fRight: TDAWhereExpression;
+ fOperator: TDABinaryOperator;
+ public
+ constructor Create(aLeft, aRight: TDAWhereExpression; anOp: TDABinaryOperator); overload;
+ destructor Destroy; override;
+
+ property Left: TDAWhereExpression read fLeft write fLeft;
+ property Right: TDAWhereExpression read fRight write fRight;
+ property Operator: TDABinaryOperator read fOperator write fOperator;
+
+ procedure ReadFromXml(xr: IXmlNode); override;
+ procedure WriteToXml(sw: IXmlNode); override;
+ procedure Validate; override;
+ end;
+
+ TDAUnaryExpression = class(TDAWhereExpression)
+ private
+ fExpression: TDAWhereExpression;
+ fOperator: TDAUnaryOperator;
+ public
+ constructor Create(anExpression: TDAWhereExpression; anOp: TDAUnaryOperator); overload;
+
+ destructor Destroy; override;
+
+ property Expression: TDAWhereExpression read fExpression write fExpression;
+ property Operator: TDAUnaryOperator read fOperator write fOperator;
+
+ procedure ReadFromXml(xr: IXmlNode); override;
+ procedure WriteToXml(sw: IXmlNode); override;
+ procedure Validate; override;
+ end;
+
+ TDAConstantExpression = class(TDAWhereExpression)
+ private
+ fType: TDADataType;
+ fValue: Variant;
+ procedure SetValue(const Value: Variant);
+ public
+ class function SerializeObject(const v: Variant; dt: TDADataType): string;
+ class function DeserializeObject(const s: string; dt: TDADataType): Variant;
+
+ constructor Create(const aValue: Variant); overload;
+ constructor Create(const aValue: Variant; aType: TDADataType); overload;
+
+ property aType: TDADataType read fType write fType;
+ property Value: Variant read fValue write SetValue;
+
+ procedure ReadFromXml(xr: IXmlNode); override;
+ procedure WriteToXml(sw: IXmlNode); override;
+ end;
+
+ TDAListExpression = class(TDAWhereExpression)
+ private
+ FItems: TList;
+ function GetItem(idx: Integer): TDAWhereExpression;
+ procedure SetItem(idx: Integer; aValue: TDAWhereExpression);
+ function GetCount: Integer;
+ public
+ constructor Create(const aValues: array of TDAWhereExpression); overload;
+ constructor Create; overload;
+
+ destructor Destroy; override;
+
+ property Count: Integer read GetCount;
+ property Item[idx: Integer]: TDAWhereExpression read getItem write setItem; default;
+
+ procedure Add(aValue: TDAWhereExpression);
+ procedure Delete(index: Integer);
+ procedure Remove(aValue: TDAWhereExpression);
+ procedure Insert(Position: Integer; aValue: TDAWhereExpression);
+
+ procedure ReadFromXml(xr: IXmlNode); override;
+ procedure WriteToXml(sw: IXmlNode); override;
+ procedure Validate; override;
+ end;
+
+ TDAParameterExpression = class(TDAWhereExpression)
+ private
+ fParameterName: string;
+ public
+ constructor Create(const aParameterName: string); overload;
+
+ property ParameterName: string read fParameterName write fParameterName;
+
+ procedure ReadFromXml(xr: IXmlNode); override;
+ procedure WriteToXml(sw: IXmlNode); override;
+ procedure Validate; override;
+ end;
+
+ TDAFieldExpression = class(TDAWhereExpression)
+ private
+ fFieldName: string;
+ fTableName: string;
+ public
+ constructor Create(const aTableName, aFieldName: string); overload;
+
+ property TableName: string read fTableName write fTableName;
+ property FieldName: string read fFieldName write fFieldName;
+
+ procedure ReadFromXml(xr: IXmlNode); override;
+ procedure WriteToXml(sw: IXmlNode); override;
+ procedure Validate; override;
+ end;
+
+ TDANullExpression = class(TDAWhereExpression)
+ public
+ procedure ReadFromXml(xr: IXmlNode); override;
+ procedure WriteToXml(sw: IXmlNode); override;
+ end;
+
+ TDAMacroExpression = class(TDAWhereExpression)
+ private
+ FItems: TList;
+ fName: string;
+ function GetItem(idx: Integer): TDAWhereExpression;
+ procedure SetItem(idx: Integer; aValue: TDAWhereExpression);
+ function GetCount: Integer;
+ public
+ constructor Create; overload;
+ constructor Create(const aName: string); overload;
+ constructor Create(const aName: string; const aValues: array of TDAWhereExpression); overload;
+
+ destructor Destroy; override;
+
+ property Name: string read fName write fName;
+
+ property Count: Integer read GetCount;
+ property Item[idx: Integer]: TDAWhereExpression read GetItem write SetItem; default;
+
+ procedure Add(aValue: TDAWhereExpression);
+ procedure Delete(index: Integer);
+ procedure Remove(aValue: TDAWhereExpression);
+ procedure Insert(Position: Integer; aValue: TDAWhereExpression);
+
+ procedure ReadFromXml(xr: IXmlNode); override;
+ procedure WriteToXml(sw: IXmlNode); override;
+ procedure Validate; override;
+ end;
+
+ TDASelectWhereBuilder = class;
+ TDASelectWhereItem = class(TObject) // abstract
+ private
+ fOwner: TDASelectWhereBuilder;
+ public
+ constructor Create(anOwner: TDASelectWhereBuilder);
+
+ property Owner: TDASelectWhereBuilder read fOwner;
+
+ procedure ReadFromXml(xr: IXmlNode); virtual; abstract;
+ procedure WriteToXml(sw: IXmlNode); virtual; abstract;
+ end;
+
+ TDASelectWhereField = class(TDASelectWhereItem)
+ private
+ fAlias, fFieldName: string;
+ public
+ constructor Create(anOwner: TDASelectWhereBuilder); overload;
+ constructor Create(anOwner: TDASelectWhereBuilder; const aFieldName: String); overload;
+ constructor Create(anOwner: TDASelectWhereBuilder; const aFieldName, anAlias: string); overload;
+
+ property FieldName: string read fFieldName write fFieldName;
+ property Alias: string read fAlias write fAlias;
+
+ procedure ReadFromXml(xr: IXmlNode); override;
+ procedure WriteToXml(sw: IXmlNode); override;
+ end;
+
+ TDASelectWhereBuilder = class(TDAWhereBuilder)
+ private
+ fFields: TList;
+ fTableName: string;
+ function GetCount: Integer;
+ function GetItem(i: Integer): TDASelectWhereItem;
+ protected
+ function ReadFromXml(xr: IXmlNode):TDAWhereExpression; override;
+ procedure WriteToXml(sw: IXmlNode; const aExpression: TDAWhereExpression); override;
+ public
+ constructor Create;
+ destructor Destroy; override;
+
+
+ property TableName: string read fTableName write fTableName;
+ property Fields[i: Integer]: TDASelectWhereItem read GetItem;
+ property FieldCount: Integer read GetCount;
+
+ function AddField(aField: TDASelectWhereItem): Integer;
+ procedure DeleteField(index: Integer);
+ end;
+
+
+function CreateWhereExpression(AName: string): TDAWhereExpression;
+
+type
+ TWhereFieldsArray = array of string;
+
+function Where_ExtractFieldNames(const AWhereExpression: TDAWhereExpression): TWhereFieldsArray;
+function Where_RemapFieldNames(const aXML: widestring; aMappings: TDAColumnMappingCollection; aTargetTableName: String): widestring;
+
+implementation
+
+uses Variants, TypInfo, uROClasses;
+
+
+function Where_ExtractFieldNames(const AWhereExpression: TDAWhereExpression): TWhereFieldsArray;
+
+ procedure ProcessExpression(aExpression: TDAWhereExpression);
+ var
+ i: integer;
+ begin
+ if aExpression = nil then Exit;
+ if aExpression is TDABinaryExpression then begin
+ ProcessExpression(TDABinaryExpression(aExpression).fLeft);
+ ProcessExpression(TDABinaryExpression(aExpression).fRight);
+ end
+ else if aExpression is TDAUnaryExpression then begin
+ ProcessExpression(TDAUnaryExpression(aExpression).Expression);
+ end
+ else if aExpression is TDAListExpression then begin
+ with TDAListExpression(aExpression) do
+ for i := 0 to Count - 1 do
+ ProcessExpression(Item[i]);
+ end
+ else if aExpression is TDAFieldExpression then begin
+ SetLength(Result,Length(Result)+1);
+ with TDAFieldExpression(AExpression) do begin
+ //Result[High(Result)]:=TableName +'.'+ FieldName;
+ Result[High(Result)]:=FieldName;
+ end;
+ end;
+ end;
+
+begin
+ SetLength(Result,0);
+ ProcessExpression(AWhereExpression);
+end;
+
+function Where_RemapFieldNames(const aXML: widestring; aMappings: TDAColumnMappingCollection; aTargetTableName: String): widestring;
+
+ procedure ProcessExpression(aExpression: TDAWhereExpression);
+ var
+ i: integer;
+ lMapping : TDAColumnMapping;
+ begin
+ if aExpression = nil then Exit;
+ if aExpression is TDABinaryExpression then begin
+ ProcessExpression(TDABinaryExpression(aExpression).fLeft);
+ ProcessExpression(TDABinaryExpression(aExpression).fRight);
+ end
+ else if aExpression is TDAUnaryExpression then begin
+ ProcessExpression(TDAUnaryExpression(aExpression).Expression);
+ end
+ else if aExpression is TDAListExpression then begin
+ with TDAListExpression(aExpression) do
+ for i := 0 to Count - 1 do
+ ProcessExpression(Item[i]);
+ end
+ else if aExpression is TDAFieldExpression then begin
+ SetLength(Result,Length(Result)+1);
+ with TDAFieldExpression(AExpression) do begin
+ TableName := aTargetTableName;
+ lMapping := aMappings.FindMappingByDatasetField(FieldName);
+ if (assigned(lMapping)) then FieldName := lMapping.TableField;
+ end;
+ end;
+ end;
+
+begin
+ SetLength(Result,0);
+ if aXML <> '' then
+ with TDAWhereBuilder.Create do try
+ Xml:=aXML;
+ ProcessExpression(Expression);
+ result := Xml;
+ finally
+ free;
+ end;
+end;
+
+function CreateWhereExpression(AName: string): TDAWhereExpression;
+begin
+ if AName = 'binaryoperation' then
+ Result := TDABinaryExpression.Create
+ else if AName = 'unaryoperation' then
+ Result := TDAUnaryExpression.Create
+ else if AName = 'constant' then
+ Result := TDAConstantExpression.Create
+ else if AName = 'list' then
+ Result := TDAListExpression.Create
+ else if AName = 'parameter' then
+ Result := TDAParameterExpression.Create
+ else if AName = 'field' then
+ Result := TDAFieldExpression.Create
+ else if AName = 'null' then
+ Result := TDANullExpression.Create
+ else if AName = 'macro' then
+ Result := TDAMacroExpression.Create
+ else
+ raise Exception.Create('Unknown element type: '+AName);
+end;
+
+{ TDABinaryExpression }
+
+constructor TDABinaryExpression.Create(aLeft,aRight: TDAWhereExpression; anOp: TDABinaryOperator);
+begin
+ inherited Create;
+ fLeft := aLeft;
+ fRight := aRight;
+ fOperator := anOp;
+end;
+
+destructor TDABinaryExpression.Destroy;
+begin
+ fLeft.Free;
+ fRight.Free;
+ inherited Destroy;
+end;
+
+procedure TDABinaryExpression.ReadFromXml(xr: IXmlNode);
+begin
+ fOperator := TDABinaryOperator(GetEnumValue(typeinfo(TDABinaryOperator), 'dbo'+xr.GetAttributeValue('operator', 'Addition')));
+ FreeAndNil(fLeft);
+ FreeAndNil(fRight);
+ Left := TDAWhereExpression.ParseExpression(xr.FirstChild);
+ Right := TDAWhereExpression.ParseExpression(xr.FirstChild.NextSibling);
+end;
+
+procedure TDABinaryExpression.Validate;
+begin
+ inherited;
+ if Left = nil then raise Exception.Create('TDABinaryExpression.Left must be assigned.');
+ Left.Validate;
+ if Right = nil then raise Exception.Create('TDABinaryExpression.Right must be assigned.');
+ Right.Validate;
+end;
+
+procedure TDABinaryExpression.WriteToXml(sw: IXmlNode);
+var
+ lNode: IXMLNode;
+begin
+ lNode := sw.Add('binaryoperation');
+ lNode.AddAttribute('operator', Copy(GetEnumName(typeinfo(TDABinaryOperator), ord(fOperator)), 4, MaxInt));
+ if Left <> nil then Left.WriteToXml(lNode);
+ if Right <> nil then Right.WriteToXml(lNode);
+end;
+
+{ TDAUnaryExpression }
+
+constructor TDAUnaryExpression.Create(anExpression: TDAWhereExpression; anOp: TDAUnaryOperator);
+begin
+ inherited Create;
+ fExpression := anExpression;
+ fOperator := anOp;
+end;
+
+destructor TDAUnaryExpression.Destroy;
+begin
+ fExpression.Free;
+ inherited;
+end;
+
+procedure TDAUnaryExpression.ReadFromXml(xr: IXmlNode);
+begin
+ FreeAndNil(fExpression);
+ fOperator := TDAUnaryOperator(GetEnumValue(typeinfo(TDAUnaryOperator), 'duo'+xr.GetAttributeValue('operator', 'Not')));
+ fExpression := TDAWhereExpression.ParseExpression(xr.FirstChild);
+end;
+
+procedure TDAUnaryExpression.Validate;
+begin
+ inherited;
+ if Expression = nil then raise Exception.Create('TDAUnaryExpression.Expression must be assigned.');
+ Expression.Validate;
+end;
+
+procedure TDAUnaryExpression.WriteToXml(sw: IXmlNode);
+var
+ lNode: IXMLNode;
+begin
+ lNode := sw.Add('unaryoperation');
+ lNode.AddAttribute('operator', Copy(GetEnumName(typeinfo(TDAUnaryOperator), ord(fOperator)), 4, MaxInt));
+ if fExpression <> nil then fExpression.WriteToXml(lNode);
+end;
+
+{ TDAConstantExpression }
+
+constructor TDAConstantExpression.Create(const aValue: Variant);
+begin
+ inherited Create;
+ Value := aValue;
+end;
+
+constructor TDAConstantExpression.Create(const aValue: Variant; aType: TDADataType);
+begin
+ Create(aValue);
+ fType := aType;
+end;
+
+function GetVariantBase64(s: string): Variant;
+var ss: TStringStream;
+ binstream : TMemoryStream;
+begin
+ binstream := TMemoryStream.Create;
+ ss := TStringStream.Create(s);
+
+ try
+
+ DecodeStream(ss, binstream);
+ binstream.Position := 0;
+
+ Result := ReadVariantFromBinary(binstream);
+ finally
+ FreeAndNIL(ss);
+ FreeAndNIL(binstream);
+ end;
+end;
+
+class function TDAConstantExpression.DeserializeObject(const s: string;
+ dt: TDADataType): Variant;
+var
+ lTemp: Currency;
+ c: Integer;
+ lTemp2: Double;
+ lTemp3: Single;
+begin
+ case dt of
+ datGuid: if copy(s,1,1) <> '{' then result := '{'+s+'}' else result := s;
+ datXml: result := s;
+ datDecimal: result := BCDToVariant(StrToBcd(StringReplace(s, '.', DecimalSeparator, [])));
+ datSingleFloat:
+ begin
+ Val(s, lTemp3, c);
+ Result := lTemp3;
+ end;
+ datLargeAutoInc,
+ datCardinal,
+ datLargeUInt,
+ datLargeInt: Result := StrToInt64(s);
+ datBoolean: result := Lowercase(S) = 'true';
+ datAutoInc,
+ datByte,
+ datShortInt,
+ datWord,
+ datSmallInt,
+ datInteger: Result := STrToInt(S);
+ datBlob: Result := GetVariantBase64(s);
+ datCurrency:
+ begin
+ Int64((@lTemp)^) := StrToInt64(s);
+ Result := lTemp;
+ end;
+ datDateTime: Result := UnixToDateTime(StrToInt64(s));
+ datFloat:
+ begin
+ Val(s, lTemp2, c);
+ Result := lTemp2;
+ end;
+{
+ DataType.Memo: ;
+ DataType.String: ;
+ DataType.Unknown: ;
+ DataType.WideMemo: ;
+ DataType.WideString: ;
+ }
+ else
+ Result := s;
+ end;
+end;
+
+function GetBase64Variant(v: Variant): string;
+var ss: TStringStream;
+ binstream : TMemoryStream;
+begin
+ binstream := TMemoryStream.Create;
+ ss := TStringStream.Create('');
+
+ try
+ WriteVariantToBinary(v, binstream);
+ binstream.Position := 0;
+
+ EncodeStream(binstream, ss);
+ result := ss.DataString;
+ finally
+ FreeAndNIL(ss);
+ FreeAndNIL(binstream);
+ end;
+end;
+
+class function TDAConstantExpression.SerializeObject(const v: Variant;
+ dt: TDADataType): string;
+var
+ lTemp: Int64;
+begin
+ case dt of
+ datBoolean: if v then Result := 'True' else Result := 'False';
+ datGuid: begin Result := v; if Copy(Result, 1,1) = '{' then Result := Copy(Result, 2, Length(Result) -2); end;
+ datXml: result := v;
+ datDecimal: Result := StringReplace(BcdToStr(VariantToBCD(v)), DecimalSeparator, '.', []);
+ datSingleFloat: Result:= FloatToStr(Single(V)); //Str(Single(v), Result);
+
+ datLargeAutoInc,
+ datByte,
+ datShortInt,
+ datWord,
+ datSmallInt,
+ datCardinal,
+ datLargeUInt,
+ datLargeInt,
+ datAutoInc,
+ datInteger: begin
+ lTemp := v;
+ Result := IntTostr(lTemp);
+ end;
+ datBlob:
+ begin
+ Result := GetBase64Variant(v);
+ end;
+ datCurrency:
+ begin
+ Currency((@lTemp)^) := Currency(v);
+ Result := IntToStr(lTemp)
+ end;
+ datDateTime: Result := IntToStr(DateTimeToUnix(v));
+ datFloat: Result:= FloatToStr(Double(V)); //Str(Double(v), Result); // System.Str always emits .
+{
+ DataType.Memo: ;
+ DataType.String: ;
+ DataType.Unknown: ;
+ DataType.WideMemo: ;
+ DataType.WideString: ;
+}
+ else
+ Result := v;
+ end;
+end;
+
+procedure TDAConstantExpression.ReadFromXml(xr: IXmlNode);
+var
+ s: string;
+begin
+ s := xr.GetAttributeValue('type', '');
+ if s <> '' then begin
+ s := 'dat' + s;
+ fType := TDADataType(GetEnumValue(typeinfo(TDADataType), s));
+ end;
+ if xr.GetAttributeValue('null', '0') = '1' then begin
+ fValue := null;
+ end else begin
+ fValue := DeserializeObject(xr.Value, fType);
+ end;
+end;
+
+procedure TDAConstantExpression.WriteToXml(sw: IXmlNode);
+var
+ lNode: IXMLNode;
+begin
+ lNode := sw.Add('constant');
+ lNode.AddAttribute('type', Copy(GetEnumName(typeinfo(TDADataType), ord(fType)), 4, MaxInt));
+ if VarIsNull(fValue) or VarIsError(fValue) then
+ lNode.AddAttribute('null', '1')
+ else begin
+ lNode.AddAttribute('null', '0');
+ LNode.Value := SerializeObject(fValue, fType);
+ end;
+end;
+
+procedure TDAConstantExpression.SetValue(const Value: Variant);
+var
+ d: TDecimal;
+begin
+ if not ROVariantsEqual(fValue,Value) then begin
+ fValue := Value;
+ case VarType(fValue) of
+ varSmallint: fType := datSmallInt;
+ varInteger: fType := datInteger;
+ varSingle: fType := datSingleFloat;
+ varDouble: fType := datFloat;
+ varCurrency: fType := datCurrency;
+ varDate: fType := datDateTime;
+ varOleStr: fType := datWideString;
+ //varDispatch:
+ //varError:
+ varBoolean: fType := datBoolean;
+ //varVariant:
+ //varUnknown:
+ varShortInt: fType := datShortInt;
+ varByte: fType := datByte;
+ varWord: fType := datWord;
+ varLongWord: fType := datCardinal;
+ varInt64: fType := datLargeInt;
+ //varStrArg:
+ varString: fType := datString;
+ //varAny:
+ //varTypeMask:
+ //varByRef:
+ //: fType := datGuid;
+ //: fType := datXml;
+ //: fType := datDecimal;
+ //: fType := datLargeAutoInc;
+ //: fType := datLargeUInt;
+ //: fType := datAutoInc;
+ //: fType := datMemo;
+ //: fType := datWideMemo;
+ else
+ if fValue = varArray or varByte then begin
+ if VarByteArrayToDecimal(fValue,d) then
+ fType:= datDecimal
+ else
+ fType := datBlob;
+ end
+ else begin
+ fType:= datUnknown;
+ end;
+ end;
+ end;
+end;
+
+{ TDAListExpression }
+
+procedure TDAListExpression.Add(aValue: TDAWhereExpression);
+begin
+ FItems.Add(aValue);
+end;
+
+constructor TDAListExpression.Create(const aValues: array of TDAWhereExpression);
+var
+ i: Integer;
+begin
+ Create;
+ for i := 0 to Length(aValues) -1 do
+ Add(aValues[i]);
+end;
+
+constructor TDAListExpression.Create;
+begin
+ inherited Create;
+ FItems := TList.Create;
+end;
+
+function TDAListExpression.GetCount: Integer;
+begin
+ Result := FItems.Count;
+end;
+
+function TDAListExpression.GetItem(idx: Integer): TDAWhereExpression;
+begin
+ Result := TDAWhereExpression(fItems[idx]);
+end;
+
+procedure TDAListExpression.Insert(Position: Integer;
+ aValue: TDAWhereExpression);
+begin
+ fItems.Insert(Position, aValue);
+end;
+
+procedure TDAListExpression.ReadFromXml(xr: IXmlNode);
+var
+ i: Integer;
+ el: IXMLNode;
+begin
+ for i := 0 to xr.ChildrenCount -1 do begin
+ el := xr.Children[i];
+ Add(TDAWhereExpression.ParseExpression(el));
+ end;
+end;
+
+procedure TDAListExpression.WriteToXml(sw: IXmlNode);
+var
+ i: Integer;
+ el: IXMLNode;
+begin
+ el := sw.Add('list');
+ for i := 0 to Count -1 do begin
+ Item[i].WriteToXml(el);
+ end;
+end;
+
+procedure TDAListExpression.Remove(aValue: TDAWhereExpression);
+var
+ lIndex: Integer;
+begin
+ lIndex := FItems.IndexOf(aValue);
+ if lIndex <> -1 then
+ Delete(lIndex);
+end;
+
+procedure TDAListExpression.Delete(index: Integer);
+begin
+ TObject(FItems[index]).Free;
+ fItems.Delete(index);
+end;
+
+procedure TDAListExpression.SetItem(idx: Integer;
+ aValue: TDAWhereExpression);
+begin
+ fItems[idx] := aValue;
+end;
+
+destructor TDAListExpression.Destroy;
+var
+ i: Integer;
+begin
+ for i := fItems.Count -1 downto 0 do
+ TDAWhereExpression(fItems[i]).Free;
+ fItems.Free;
+ inherited Destroy;
+end;
+
+procedure TDAListExpression.Validate;
+var
+ i: Integer;
+begin
+ inherited;
+ for i:=0 to Count-1 do begin
+ if Item[i] = nil then raise Exception.CreateFmt('TDAListExpression.Item[%d] must be assigned.',[i]);
+ Item[i].Validate;
+ end;
+end;
+
+{ TDAParameterExpression }
+
+constructor TDAParameterExpression.Create(const aParameterName: string);
+begin
+ inherited Create;
+ fParameterName := aParameterName;
+end;
+
+procedure TDAParameterExpression.ReadFromXml(xr: IXmlNode);
+begin
+ fParameterName := xr.Value;
+end;
+
+procedure TDAParameterExpression.Validate;
+begin
+ inherited;
+ if ParameterName = '' then raise Exception.Create('TDAParameterExpression.ParameterName must be assigned.');
+end;
+
+procedure TDAParameterExpression.WriteToXml(sw: IXmlNode);
+var
+ el: IXmlNode;
+begin
+ el := sw.Add('parameter');
+ el.Value := fParameterName;
+end;
+
+{ TDAFieldExpression }
+
+constructor TDAFieldExpression.Create(const aTableName, aFieldName: string);
+begin
+ inherited Create;
+ fTableName := aTableName;
+ fFieldName := aFieldName;
+end;
+
+procedure TDAFieldExpression.ReadFromXml(xr: IXmlNode);
+begin
+ if xr.LocalName <> 'field' then raise Exception.Create('field tag expected');
+ fFieldName := VarToStr(xr.Value);
+ fTableName := xr.GetAttributeValue('tablename', '');
+end;
+
+procedure TDAFieldExpression.Validate;
+begin
+ inherited;
+ if FieldName = '' then raise Exception.Create('TDAFieldExpression.FieldName must be assigned.');
+end;
+
+procedure TDAFieldExpression.WriteToXml(sw: IXmlNode);
+var
+ el: IXMLNode;
+begin
+ el := sw.Add('field');
+ el.Value := fFieldName;
+ if fTableName <> '' then
+ el.AddAttribute('tablename', fTableName);
+end;
+
+{ TDANullExpression }
+
+procedure TDANullExpression.ReadFromXml(xr: IXmlNode);
+begin
+ // nothing to do.
+end;
+
+procedure TDANullExpression.WriteToXml(sw: IXmlNode);
+begin
+ sw.Add('null');
+end;
+
+{ TDAMacroExpression }
+
+procedure TDAMacroExpression.Add(aValue: TDAWhereExpression);
+begin
+ FItems.Add(aValue);
+end;
+
+constructor TDAMacroExpression.Create;
+begin
+ inherited Create;
+ FItems := TList.Create;
+end;
+
+constructor TDAMacroExpression.Create(const aName: string);
+begin
+ Create;
+ fName := aName;
+end;
+
+constructor TDAMacroExpression.Create(const aName: string; const aValues: array of TDAWhereExpression);
+var
+ i: Integer;
+begin
+ Create(aName);
+ for i := 0 to Length(aValues) -1 do
+ Add(aValues[i]);
+end;
+
+destructor TDAMacroExpression.Destroy;
+var
+ i: Integer;
+begin
+ for i := fItems.Count -1 downto 0 do
+ TObject(FItems[i]).Free;
+ fItems.Free;
+ inherited Destroy;
+end;
+
+function TDAMacroExpression.GetCount: Integer;
+begin
+ Result := FItems.Count;
+end;
+
+function TDAMacroExpression.GetItem(idx: Integer): TDAWhereExpression;
+begin
+ result := TDAWhereExpression(FItems[idx]);
+end;
+
+procedure TDAMacroExpression.Insert(Position: Integer;
+ aValue: TDAWhereExpression);
+begin
+ FItems.Insert(Position, aValue);
+end;
+
+procedure TDAMacroExpression.Remove(aValue: TDAWhereExpression);
+var
+ lIndex: Integer;
+begin
+ lIndex := FItems.IndexOf(aValue);
+ if lIndex <> -1 then
+ Delete(lIndex);
+end;
+
+procedure TDAMacroExpression.Delete(index: Integer);
+begin
+ TDAWhereExpression(FItems[index]).Free;
+ FItems.Delete(index);
+end;
+
+procedure TDAMacroExpression.SetItem(idx: Integer;
+ aValue: TDAWhereExpression);
+begin
+ FItems[idx] := aValue;
+end;
+
+procedure TDAMacroExpression.ReadFromXml(xr: IXmlNode);
+var
+ i: Integer;
+begin
+ fName := xr.GetAttributeValue('name', '');
+ for i := 0 to xr.ChildrenCount -1 do
+ Add(TDAWhereExpression.ParseExpression(xr.Children[i]));
+end;
+
+procedure TDAMacroExpression.WriteToXml(sw: IXmlNode);
+var
+ el: IXMLNode;
+ i: Integer;
+begin
+ el := sw.Add('macro');
+ el.AddAttribute('name', fName);
+ for i := 0 to Count -1 do
+ Item[i].WriteToXml(el);
+end;
+
+procedure TDAMacroExpression.Validate;
+var
+ i: integer;
+begin
+ inherited;
+ if Name = '' then raise Exception.Create('TDAMacroExpression.Name must be assigned.');
+ for i := 0 to Count -1 do begin
+ if Item[i] = nil then raise Exception.CreateFmt('TDAMacroExpression.Item[%d] must be assigned.',[i]);
+ Item[i].Validate;
+ end;
+end;
+
+{ TDASelectWhereItem }
+
+constructor TDASelectWhereItem.Create(anOwner: TDASelectWhereBuilder);
+begin
+ inherited Create;
+ fOwner := anOwner;
+end;
+
+{ TDASelectWhereField }
+
+constructor TDASelectWhereField.Create(anOwner: TDASelectWhereBuilder);
+begin
+ inherited Create(anOwner);
+end;
+
+constructor TDASelectWhereField.Create(anOwner: TDASelectWhereBuilder;
+ const aFieldName: String);
+begin
+ inherited Create(anOwner);
+ fFieldName := aFieldName;
+end;
+
+constructor TDASelectWhereField.Create(anOwner: TDASelectWhereBuilder;
+ const aFieldName, anAlias: string);
+begin
+ inherited Create(anOwner);
+ fFieldName := aFieldName;
+ fAlias := anAlias;
+end;
+
+procedure TDASelectWhereField.ReadFromXml(xr: IXmlNode);
+begin
+ if xr.LocalName <> 'field' then raise Exception.Create('field tag expected');
+ Alias := xr.GetAttributeValue('alias', '');
+ fFieldName := VarToStr(xr.Value);
+end;
+
+procedure TDASelectWhereField.WriteToXml(sw: IXmlNode);
+var
+ el: IXMLNode;
+begin
+ el := sw.Add('field');
+ el.Value := fFieldName;
+ if fAlias <> '' then
+ el.AddAttribute('alias', fAlias);
+end;
+
+{ TDASelectWhereBuilder }
+
+function TDASelectWhereBuilder.AddField(
+ aField: TDASelectWhereItem): Integer;
+begin
+ Result := fFields.Add(aField);
+end;
+
+constructor TDASelectWhereBuilder.Create;
+begin
+ inherited Create;
+ fFields := TList.Create;
+end;
+
+procedure TDASelectWhereBuilder.DeleteField(index: Integer);
+begin
+ TDASelectWhereItem(fFields[index]).Free;
+ fFields.Delete(index);
+end;
+
+destructor TDASelectWhereBuilder.Destroy;
+var
+ i: Integer;
+begin
+ for i := fFields.Count -1 downto 0 do
+ TDASelectWhereItem(fFields[i]).Free;
+ fFields.Free;
+ inherited Destroy;
+end;
+
+function TDASelectWhereBuilder.GetCount: Integer;
+begin
+ result := fFields.Count;
+end;
+
+function TDASelectWhereBuilder.GetItem(i: Integer): TDASelectWhereItem;
+begin
+ result := TDASelectWhereItem(fFields[i]);
+end;
+
+function TDASelectWhereBuilder.ReadFromXml(xr: IXmlNode):TDAWhereExpression;
+var
+ el: IXMLNode;
+ i: Integer;
+ sw: TDASelectWhereField;
+begin
+ el := SelectNodeLocal(xr, 'select');
+ if el = nil then raise Exception.Create('"select" node expected');
+ fTableName := el.GetNodeValue('table', '');
+ el := SelectNodeLocal(el, 'fields');
+ if el <> nil then begin
+ for i := 0 to el.ChildrenCount -1 do begin
+ sw := TDASelectWhereField.Create(self);
+ fFields.Add(sw);
+ sw.ReadFromXml(el.Children[i]);
+ end;
+ end;
+ Result:= inherited ReadFromXml(xr);
+end;
+
+procedure TDASelectWhereBuilder.WriteToXml(sw: IXmlNode; const aExpression: TDAWhereExpression);
+var
+ el: IXMLNode;
+ i: Integer;
+begin
+ el := sw.Add('where');
+ el.Add('table').Value := fTableName;
+ el := el.Add('fields');
+ for i := 0 to fFields.Count -1 do
+ Fields[i].WriteToXml(el);
+
+ inherited WriteToXml(sw,aExpression);
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDAXmlAdapter.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAXmlAdapter.pas
new file mode 100644
index 0000000..79569e3
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAXmlAdapter.pas
@@ -0,0 +1,826 @@
+unit uDAXMLAdapter;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses
+ Classes, TypInfo, SysUtils,
+ uROTypes, uROXMLIntf,
+ uDAInterfaces, uDADataStreamer, uDADelta;
+
+const
+ // Data stream node names
+ nn_DocumentName = 'XMLData';
+ nn_Schema = 'Schema';
+ nn_Datasets = 'Datasets';
+ nn_Fields = 'Fields';
+ nn_Field = 'Field';
+ nn_Params = 'Params';
+ nn_Param = 'Param';
+ nn_Row = 'Row';
+
+ // Delta stream node names
+ nn_Deltas = 'Deltas';
+
+ attr_RecId = 'RecId';
+
+
+type
+ TDAXMLSchemaOption = (soIncludeEmptyAttributes);
+ TDAXMLSchemaOptions = set of TDAXMLSchemaOption;
+
+ TDAXMLRowOption = (roCompressBlobs);
+ TDAXMLRowOptions = set of TDAXMLRowOption;
+
+ TDAXmlDataStreamerOption = (xaoUseDatasetXSLTs, xaoUseDeltaXSLTs);
+ TDAXmlDataStreamerOptions = set of TDAXmlDataStreamerOption;
+
+ { TDAXmlDataStreamer }
+ TDAXmlDataStreamer = class(TDADataStreamer)
+ private
+ fWriteXSLT,
+ fReadXSLT{,
+ fWriteDeltaXSLT,
+ fReadDeltaXSLT} : IXMLDocument;
+
+ fXMLDocument : IXMLDocument;
+ fSchemaRoot,
+ fRootNode,
+ fDatasetSchemaNode,
+ fDeltaSchemaNode,
+ fDatasetNode,
+ fDeltaNode : IXMLNode;
+
+ fDAFieldPropInfoList : PPropList;
+ fDAMemPropCount,
+ fDAFieldPropCount : integer;
+ fSchemaOptions: TDAXMLSchemaOptions;
+ fRowOptions: TDAXMLRowOptions;
+ fOptions: TDAXmlDataStreamerOptions;
+ fDocumentName: string;
+ fSkipNull: boolean;
+ param_proplistcount: integer;
+ param_PropList: PPropList;
+
+ procedure WriteBlobValue(const aDestination : IXMLNode; const anAttributeName : string; const aBlobValue : Variant);
+ function ReadBlobValue(const aSource: IXMLNode; const anAttributeName : string) : Variant;
+ function GetReadXSLT: IXMLDocument;
+ function GetWriteXSLT: IXMLDocument;
+ {function GetReadDeltaXSLT: IXMLDocument;
+ function GetWriteDeltaXSLT: IXMLDocument;}
+
+ function GetXMLDocument(var XMLDocument: IXMLDocument): IXMLDocument;
+ function SaveDocumentName: Boolean;
+ procedure SetDocumentName(const Value: string);
+ procedure ClearXMLNodes;
+
+ protected
+ function DoCreateStream: TStream; override;
+ procedure DoInitialize(Mode: TDAAdapterInitialization); override;
+ procedure DoFinalize; override;
+ function DoWriteDataset(const Source: IDADataset; Options: TDAWriteOptions; MaxRows: integer;ADynFieldNames: array of string): integer; override;
+ procedure DoWriteDelta(const Source: IDADelta); override;
+ procedure DoReadDataset(const DatasetName: string; const Destination: IDADataset; ApplySchema: boolean); override;
+ procedure DoReadDelta(const DeltaName: string; const Destination: IDADelta); override;
+
+ public
+ constructor Create(aOwner : TComponent); override;
+ destructor Destroy; override;
+
+ function GetTargetDataType: TRODataType; override;
+
+ property ReadXSLT : IXMLDocument read GetReadXSLT write fReadXSLT;
+ property WriteXSLT : IXMLDocument read GetWriteXSLT write fWriteXSLT;
+ {property ReadDeltaXSLT : IXMLDocument read GetReadDeltaXSLT write fReadDeltaXSLT;
+ property WriteDeltaXSLT : IXMLDocument read GetWriteDeltaXSLT write fWriteDeltaXSLT;}
+
+ published
+ property SkipNull : boolean read fSkipNull write fSkipNull default true;
+ property SchemaOptions : TDAXMLSchemaOptions read fSchemaOptions write fSchemaOptions;
+ property RowOptions : TDAXMLRowOptions read fRowOptions write fRowOptions;
+ property Options : TDAXmlDataStreamerOptions read fOptions write fOptions;
+ property DocumentName : string read fDocumentName write SetDocumentName stored SaveDocumentName;
+ end;
+
+ TDAXMLAdapter = class(TDAXmlDataStreamer) end deprecated;
+
+implementation
+
+uses
+ Variants, uROXMLSerializer, uROCompression, uROClasses, uROBinaryHelpers
+ {$IFNDEF LINUX}
+ ,uROZLib
+ {$ENDIF};
+
+const
+ XML_DateTimeFormat = 'yyyy-mm-dd"T"hh":"nn":"ss"."zzz';
+
+function XMLDateTimeToDateTime(const aXMLDateTime : string) : TDateTime;
+var year, month, day, hour, min, sec, msec : word;
+begin {yyyy-mm-ddThh:nn:ss.zzz}
+ year := StrToInt(Copy(aXMLDateTime,1,4));
+ month := StrToInt(Copy(aXMLDateTime,6,2));
+ day := StrToInt(Copy(aXMLDateTime,9,2));
+ hour := StrToInt(Copy(aXMLDateTime,12,2));
+ min := StrToInt(Copy(aXMLDateTime,15,2));
+ sec := StrToInt(Copy(aXMLDateTime,18,2));
+ msec := StrToInt(Copy(aXMLDateTime,21,3));
+
+ result := EncodeDate(year, month, day);
+ // The code below is required! Do not adjust
+ if (result<0)
+ then result := result-EncodeTime(hour, min, sec, msec)
+ else result := result+EncodeTime(hour, min, sec, msec)
+end;
+
+function DateTimeToXMLDateTime(aDateTime : TDateTime) : string;
+begin
+ Result := FormatDateTime(XML_DateTimeFormat, aDateTime);
+end;
+
+function WriteFloat(Val: Variant): String;
+begin
+ Result := FloatToStr(Val{$IFDEF DELPHI7UP},SOAPFormatSettings{$ENDIF});
+
+ {$IFNDEF DELPHI7UP}
+ if DecimalSeparator <> '.' then
+ ReplaceChar(Result, [DecimalSeparator], '.');
+ {$ENDIF}
+end;
+
+
+function ReadFloat(text: String): Variant;
+begin
+ {$IFNDEF DELPHI7UP}
+ if DecimalSeparator <> '.' then
+ ReplaceChar(text, ['.'], DecimalSeparator);
+ {$ENDIF}
+
+ Result := SOAPStrToFloat(text);
+end;
+
+{ TDAXmlDataStreamer }
+
+constructor TDAXmlDataStreamer.Create(aOwner: TComponent);
+begin
+ inherited;
+
+ fDocumentName := nn_DocumentName;
+
+ fSchemaOptions := [soIncludeEmptyAttributes];
+
+ fXMLDocument := NewROXmlDocument;
+
+ fWriteXSLT := NIL;
+ fReadXSLT := NIL;
+ {fWriteDeltaXSLT := NIL;
+ fReadDeltaXSLT := NIL;}
+
+ fOptions := [xaoUseDatasetXSLTs, xaoUseDeltaXSLTs];
+
+ fDAMemPropCount := GetTypeData(TDAField.ClassInfo).PropCount;
+ GetMem(fDAFieldPropInfoList, fDAMemPropCount*SizeOf(PPropInfo));
+ fDAFieldPropCount := GetPropList(TDAField.ClassInfo, tkProperties, fDAFieldPropInfoList);
+
+ GetMem(param_PropList, GetTypeData(TDAParam.ClassInfo).PropCount * SizeOf(PPropInfo));
+ param_proplistcount := GetPropList(TDAParam.ClassInfo, tkProperties, param_PropList);
+ fSkipNull := true;
+end;
+
+destructor TDAXmlDataStreamer.Destroy;
+begin
+ fWriteXSLT := NIL;
+ fReadXSLT := NIL;
+ {fWriteDeltaXSLT := NIL;
+ fReadDeltaXSLT := NIL;}
+
+ FreeMem(fDAFieldPropInfoList, fDAMemPropCount*SizeOf(PPropInfo));
+ FreeMem(param_PropList);
+
+ ClearXMLNodes;
+
+ inherited;
+end;
+
+function TDAXmlDataStreamer.GetTargetDataType: TRODataType;
+begin
+ result := rtString;
+end;
+
+function TDAXmlDataStreamer.DoCreateStream: TStream;
+begin
+ result := NIL;
+end;
+
+procedure TDAXmlDataStreamer.DoInitialize(Mode: TDAAdapterInitialization);
+var
+ i : integer;
+begin
+ ClearXMLNodes;
+ fXMLDocument.New(fDocumentName);
+
+ if (Mode in AdapterReadModes) then begin
+
+ fXMLDocument.LoadFromStream(Data);
+
+ // Applies the XSLT (if any). The resulting document MUST be a valid XML document
+ // that conforms to the Data Abstract XML format
+ if (fReadXSLT<>NIL)
+ then fXMLDocument.XML := fXMLDocument.Transform(fReadXSLT.XML);
+
+ // Parses the document
+ fRootNode := fXMLDocument.DocumentNode;
+
+ // Schema sections
+ fSchemaRoot := fRootNode.GetNodeByName(nn_Schema);
+ if (fSchemaRoot<>NIL) then begin
+ fDatasetSchemaNode := fSchemaRoot.GetNodeByName(nn_Datasets);
+ fDeltaSchemaNode := fSchemaRoot.GetNodeByName(nn_Deltas);
+ end;
+
+ // Data sections
+ fDatasetNode := fRootNode.GetNodeByName(nn_Datasets);
+ fDeltaNode := fRootNode.GetNodeByName(nn_Deltas);
+
+ if (fDatasetSchemaNode<>NIL) and (fDatasetSchemaNode.ChildrenCount>0) then begin
+ for i := 0 to (fDatasetSchemaNode.ChildrenCount-1) do
+ AddingDataset(fDatasetSchemaNode.Children[i].Name);
+ end
+ else if (fDatasetNode<>NIL) then begin
+ for i := 0 to (fDatasetNode.ChildrenCount-1) do
+ AddingDataset(fDatasetNode.Children[i].Name);
+ end;
+
+ if (fDeltaSchemaNode<>NIL) and (fDeltaSchemaNode.ChildrenCount>0) then begin
+ for i := 0 to (fDeltaSchemaNode.ChildrenCount-1) do
+ AddingDelta(fDeltaSchemaNode.Children[i].Name);
+ end
+ else if (fDeltaNode<>NIL) then begin
+ for i := 0 to (fDeltaNode.ChildrenCount-1) do
+ AddingDataset(fDeltaNode.Children[i].Name);
+ end;
+
+ end
+ else if (Mode in AdapterWriteModes) then begin
+ fRootNode := fXMLDocument.DocumentNode;
+ // Schema sections
+ fSchemaRoot := fRootNode.Add(nn_Schema);
+ fDatasetSchemaNode := fSchemaRoot.Add(nn_Datasets);
+ fDeltaSchemaNode := fSchemaRoot.Add(nn_Deltas);
+
+ // Data sections
+ fDatasetNode := fRootNode.Add(nn_Datasets);
+ fDeltaNode := fRootNode.Add(nn_Deltas);
+ end;
+end;
+
+procedure TDAXmlDataStreamer.DoFinalize;
+var finaldocument : string;
+begin
+ if (AdapterInitialization in AdapterWriteModes) then begin
+ // Removes the delta sections if they don't contain data
+ if (fDeltaSchemaNode.ChildrenCount=0) then begin
+ fSchemaRoot.Remove(fDeltaSchemaNode);
+ fDeltaSchemaNode := NIL;
+ end;
+
+ if (fDeltaNode.ChildrenCount=0) then begin
+ fRootNode.Remove(fDeltaNode);
+ fDeltaNode := NIL;
+ end;
+
+ // Removes the datasets sections if they don't contain data
+ if (fDatasetSchemaNode.ChildrenCount=0) then begin
+ fSchemaRoot.Remove(fDatasetSchemaNode);
+ fDatasetSchemaNode := NIL;
+ end;
+
+ if (fDatasetNode.ChildrenCount=0) then begin
+ fRootNode.Remove(fDatasetNode);
+ fDeltaNode := NIL;
+ end;
+
+ // Applies the XSLT (if any)
+ if (fWriteXSLT<>NIL)
+ then begin
+ // The resulting document might not be a valid XML document!!
+ finaldocument := fXMLDocument.Transform(fWriteXSLT.XML);
+ if (finaldocument<>'')
+ then Data.Write(finaldocument[1], Length(finaldocument));
+ end
+ else fXMLDocument.SaveToStream(Data);
+ end;
+ ClearXMLNodes;
+end;
+
+procedure TDAXmlDataStreamer.WriteBlobValue(const aDestination : IXMLNode; const anAttributeName : string; const aBlobValue : Variant);
+var ss, compressedstream : TStringStream;
+ binstream : Binary;
+begin
+ compressedstream := NIL;
+ binstream := Binary.Create;
+ ss := TStringStream.Create('');
+
+ try
+ //binstream := BinaryFromVariant(aBlobValue);//, ms.Stream);
+ WriteVariantToBinary(aBlobValue, binstream);
+ binstream.Position := 0;
+
+ if (roCompressBlobs in fRowOptions) then begin
+ compressedstream := TStringStream.Create('');
+ ZCompressStream(binstream, compressedstream);
+ compressedstream.Position := 0;
+
+ EncodeStream(compressedstream, ss);
+ end
+ else begin
+ EncodeStream(binstream, ss);
+ end;
+
+ aDestination.AddAttribute(anAttributeName, ss.DataString);
+
+ finally
+ FreeAndNIL(ss);
+ FreeAndNIL(compressedstream);
+ FreeAndNIL(binstream);
+ end;
+end;
+
+function TDAXmlDataStreamer.ReadBlobValue(const aSource: IXMLNode; const anAttributeName : string) : Variant;
+var data, compressedstream : TStringStream;
+ finaldata : IROStream;
+begin
+ compressedstream := NIL;
+
+ data := TStringStream.Create(aSource.GetAttributeValue(anAttributeName, NULL));
+ finaldata := NewROStream;
+
+ try
+ data.Position := 0;
+
+ if (roCompressBlobs in fRowOptions) then begin
+ compressedstream := TStringStream.Create('');
+ DecodeStream(data, compressedstream);
+ compressedstream.Position := 0;
+
+ ZDecompressStream(compressedstream, finaldata.Stream);
+ finaldata.Position := 0;
+ end
+ else begin
+ DecodeStream(data, finaldata.Stream);
+ end;
+
+ finaldata.Position := 0;
+ result := ReadVariantFromBinary(finaldata.Stream);
+
+ finally
+ FreeAndNIL(data);
+ FreeAndNIL(compressedstream);
+ end;
+end;
+
+procedure TDAXmlDataStreamer.DoReadDataset(const DatasetName: string;
+ const Destination: IDADataset; ApplySchema: boolean);
+var sourcenode : IXMLNode;
+ i, x : integer;
+ attr, node, scNode : IXMLNode;
+ fld : TDAField;
+ par: TDAParam;
+ val: Variant;
+ editable : IDAEditableDataset;
+ lName: string;
+begin
+ // Reads and applies the schema
+ if ApplySchema then begin
+ scNode := fDatasetSchemaNode.GetNodeByName(DatasetName);
+ if (scNode=NIL) then exit;//raise EROException.Create('Cannot find schema for dataset '+DatasetName)
+ sourcenode := scNode.GetNodeByName(nn_Fields); // For now we only have fields, so this is ok
+ if sourcenode <> nil then begin
+ Destination.Fields.Clear;
+
+ for i := 0 to (sourcenode.ChildrenCount-1) do begin
+ fld := Destination.Fields.Add;
+ node := sourcenode.Children[i];
+
+ for x := 0 to (fDAFieldPropCount-1) do begin
+ lName:= {$IFDEF UNICODE}Utf8ToAnsi{$ENDIF}(fDAFieldPropInfoList^[x].Name);
+ attr := node.GetAttributeByName(lName);
+ if (attr=NIL) then Continue;
+
+ if (fDAFieldPropInfoList^[x].PropType^.Kind<>tkClass) then SetPropValue(fld, lName, VarToStr(attr.Value));
+ end;
+ end;
+ end;
+
+ sourcenode := scNode.GetNodeByName(nn_Params); // For now we only have fields, so this is ok
+ if sourcenode <> nil then begin
+ Destination.Params.Clear;
+
+ for i := 0 to (sourcenode.ChildrenCount-1) do begin
+ par := Destination.Params.Add;
+ node := sourcenode.Children[i];
+
+ for x := 0 to (param_proplistcount-1) do begin
+ lName := {$IFDEF UNICODE}Utf8ToAnsi{$ENDIF}(param_PropList^[x].Name);
+ attr := node.GetAttributeByName(lName);
+ if (attr=NIL) then Continue;
+
+ if (param_PropList^[x].PropType^.Kind<>tkClass) then SetPropValue(par, lName, VarToStr(attr.Value));
+ end;
+ end;
+ end;
+
+ end
+ else begin
+ editable := Destination as IDAEditableDataset;
+ sourcenode := fDatasetNode.GetNodeByName(DatasetName);
+ if (sourcenode=NIL)
+ then raise EROException.Create('Cannot find schema for dataset '+DatasetName);
+
+ if not Destination.Active then Destination.Open;
+
+ {$IFDEF STORERECID}
+ Destination.CurrentRecIdValue := 0;
+ {$ENDIF}
+
+ Destination.DisableConstraints;
+ try
+ for i := 0 to sourcenode.ChildrenCount-1 do begin
+ editable.Append;
+
+ node := sourcenode.Children[i];
+
+ {$IFDEF STORERECID}
+ Destination.CurrentRecIdValue := node.GetAttributeValue(attr_RecId, -1);
+ for x := 1 to node.AttributeCount-1 do begin
+ {$ELSE}
+ for x := 0 to node.AttributeCount-1 do begin
+ {$ENDIF}
+ attr := node.Attributes[x];
+ fld := Destination.Fields.FieldByName(attr.Name);
+
+ if fld.Calculated or fld.Lookup then Continue;
+
+ if (attr.Value = '') and (fld.DataType <> datBlob) then begin
+ val := NULL;
+ end else begin
+ case fld.DataType of
+ datBlob : val := ReadBlobValue(node, attr.Name); // <--- MARC!!!
+ datDateTime : val := XMLDateTimeToDateTime(attr.Value);
+ datFloat,
+ datCurrency: val := ReadFloat(attr.Value);
+ // TODO -cAleF: remember to use the proper XML conversion routines here!
+ else val := attr.Value;
+ end;
+ end;
+
+ if Assigned(OnReadFieldValue) then OnReadFieldValue(fld, val);
+ fld.Value := val;
+
+ end;
+
+ editable.Post;
+ end;
+ finally
+ Destination.EnableConstraints;
+ end;
+ end;
+end;
+
+function TDAXmlDataStreamer.DoWriteDataset(const Source: IDADataset;
+ Options: TDAWriteOptions; MaxRows: integer; ADynFieldNames: array of string): integer;
+var i, x, max, k : integer;
+ subnode, node, scNode : IXMLNode;
+ s : string;
+ fld : TDAField;
+ val: Variant;
+ lfields: array of integer;
+ lName: string;
+begin
+ result := 0;
+
+ if Length(ADynFieldNames) > 0 then begin
+ SetLength(lfields, Length(ADynFieldNames));
+ For x:=0 to High(ADynFieldNames) do begin
+ fld:=Source.Fields.FindField(ADynFieldNames[x]);
+ if fld <> nil then
+ lfields[x]:= fld.Index
+ else
+ lfields[x]:= -1;
+ end;
+ end else begin
+ SetLength(lfields, Source.FieldCount);
+ For x:=0 to Source.FieldCount-1 do
+ lfields[x]:=x;
+ end;
+
+ // Writes the schema
+ if (woSchema in Options) or (Length(ADynFieldNames)>0) then begin
+ scNode := fDatasetSchemaNode.Add(Source.LogicalName);
+ node := scNode.Add(nn_Fields);
+
+ for i := 0 to high(lfields) do begin
+ subnode := node.Add(nn_Field);
+
+ for x := 0 to (fDAFieldPropCount-1) do begin
+ lName := {$IFDEF UNICODE}Utf8ToAnsi{$ENDIF}(fDAFieldPropInfoList^[x].Name);
+ s := VarToStr(GetPropValue(Source.Fields[lfields[i]], lName, TRUE));
+
+ if (s<>'') or (soIncludeEmptyAttributes in SchemaOptions) then subnode.AddAttribute(lName, s);
+ end;
+ end;
+ node := scNode.Add(nn_Params);
+
+ for i := 0 to (Source.Params.Count-1) do begin
+ subnode := node.Add(nn_Param);
+
+ for x := 0 to (param_proplistcount-1) do begin
+ lName := {$IFDEF UNICODE}Utf8ToAnsi{$ENDIF}(param_PropList^[x].Name);
+ s := VarToStr(GetPropValue(Source.Params[i], lName, TRUE));
+
+ if (s<>'') or (soIncludeEmptyAttributes in SchemaOptions)
+ then subnode.AddAttribute(lName, s);
+ end;
+ end;
+ end;
+
+ // Writes the data
+ if (woRows in Options) then begin
+ Source.DisableControls;
+ try
+ if not Source.Active then Source.Open;
+
+ k := 0;
+ max := MaxRows;
+ node := fDatasetNode.Add(Source.LogicalName);
+ //if (MaxRows<0) then cnt := source.RecordCount else cnt := MaxRows;
+ while (k<>max) and not source.EOF do begin
+ result := 0;
+
+ subnode := node.Add(nn_Row);
+
+ {$IFDEF STORERECID}
+ subnode.AddAttribute(attr_RecId, Source.GetRowRecIdValue);
+ {$ENDIF}
+
+ for x := 0 to high(lfields) do begin
+ fld := Source.Fields[lfields[x]];
+ val := Source.FieldValues[lfields[x]];
+ if Assigned(OnBeforeFieldValueSerialization) then OnBeforeFieldValueSerialization(fld, val);
+
+ if fld.Calculated or fld.Lookup or (fld.IsNull and fSkipNull) then Continue;
+
+ if Assigned(OnWriteFieldValue) then OnWriteFieldValue(fld, val);
+
+ if (VarIsEmpty(val) or VarIsNull(val)) and (fld.DataType <> datBlob) then begin
+ subnode.AddAttribute(fld.Name, VarToStr(Null))
+ end else begin
+ case fld.DataType of
+ datBlob : WriteBlobValue(subnode, fld.Name, val);// <--- MARC!!!
+ datDateTime : subnode.AddAttribute(fld.Name, DateTimeToXMLDateTime(val));
+ datFloat,
+ datCurrency: subnode.AddAttribute(fld.Name, WriteFloat(val));
+ // TODO -cAleF: remember to use the proper XML conversion reoutines here!
+ else subnode.AddAttribute(fld.Name, VarToStr(val));
+ end;
+ end;
+ end;
+
+ Source.Next;
+ Inc(k);
+ Inc(result);
+
+ if Source.EOF then Break;
+ end;
+ finally
+ Source.EnableControls;
+ end;
+ end;
+end;
+
+procedure TDAXmlDataStreamer.DoReadDelta(const DeltaName: string;
+ const Destination: IDADelta);
+var schema, rootnode, node, subnode : IXMLNode;
+ x, i : integer;
+ fieldname : string;
+ datatype : TDADataType;
+ changetype : TDAChangeType;
+ changestatus : TDAChangeStatus;
+ changemessage : string;
+ recid : integer;
+ change : TDADeltaChange;
+ val : Variant;
+begin
+ Destination.Clear(TRUE, TRUE);
+ schema := fDeltaSchemaNode.GetNodeByName(DeltaName);
+
+ // Logged fields and their types
+ rootnode := schema.GetNodeByName('LoggedFields');
+ for i := 0 to (rootnode.ChildrenCount-1) do begin
+ fieldname := rootnode.Children[i].GetAttributeByName('Name').Value;
+ datatype := TDADataType(GetEnumValue(TypeInfo(TDADataType), rootnode.Children[i].GetAttributeByName('DataType').Value));
+
+ Destination.AddFieldName(fieldname);
+ Destination.LoggedFieldTypes[i] := datatype;
+ end;
+
+ // Key fields
+ rootnode := schema.GetNodeByName('KeyFields');
+ for i := 0 to (rootnode.ChildrenCount-1) do begin
+ fieldname := rootnode.Children[i].GetAttributeByName('Name').Value;
+ Destination.AddKeyFieldName(fieldname);
+ end;
+
+ // Actual changes
+ rootnode := fDeltaNode.GetNodeByName(DeltaName);
+ for i := 0 to (rootnode.ChildrenCount-1) do begin
+ node := rootnode.Children[i];
+
+ recid := node.GetNodeByName('RecID').Value;
+ changetype := TDAChangeType(GetEnumValue(TypeInfo(TDAChangeType), node.GetNodeByName('ChangeType').Value));
+ changestatus := TDAChangeStatus(GetEnumValue(TypeInfo(TDAChangeStatus), node.GetNodeByName('Status').Value));
+ changemessage := node.GetNodeByName('Message').Value;
+
+ change := Destination.Add(recid, changetype, changestatus, changemessage);
+
+ subnode := node.GetNodeByName('OldValues');
+ for x := 0 to Destination.LoggedFieldCount-1 do begin
+ val := subnode.GetAttributeValue(Destination.LoggedFieldNames[x], Null);
+ if (val = '') and (Destination.LoggedFieldTypes[x] <> datblob) then begin
+ change.OldValues[x] := NULL;
+ end else begin
+ case Destination.LoggedFieldTypes[x] of
+ datBlob : change.OldValues[x] := ReadBlobValue(subnode, Destination.LoggedFieldNames[x]);
+ datDateTime : change.OldValues[x] := XMLDateTimeToDateTime(val);
+ datFloat,
+ datCurrency: change.OldValues[x] := ReadFloat(val);
+ else
+ change.OldValues[x] := val;
+ end;
+ end;
+ end;
+
+ subnode := node.GetNodeByName('NewValues');
+ for x := 0 to Destination.LoggedFieldCount-1 do begin
+ val := subnode.GetAttributeValue(Destination.LoggedFieldNames[x], Null);
+ if (val = '') and (Destination.LoggedFieldTypes[x] <> datblob) then begin
+ change.NewValues[x] := NULL;
+ end else begin
+ case Destination.LoggedFieldTypes[x] of
+ datBlob : change.NewValues[x] := ReadBlobValue(subnode, Destination.LoggedFieldNames[x]);
+ datDateTime : change.NewValues[x] := XMLDateTimeToDateTime(val);
+ datFloat,
+ datCurrency: change.NewValues[x] := ReadFloat(val);
+ else
+ change.NewValues[x] := val;
+ end;
+ end;
+ end;
+ end;
+end;
+
+
+procedure TDAXmlDataStreamer.DoWriteDelta(const Source: IDADelta);
+var rootnode, node, subnode : IXMLNode;
+ x, i : integer;
+begin
+ {
+
+
+
+
+
+
+
+
+ }
+
+ // Writes the schema of the delta
+ rootnode := fDeltaSchemaNode.Add(Source.LogicalName);
+ node := rootnode.Add('LoggedFields');
+ for i := 0 to (Source.LoggedFieldCount-1) do begin
+ subnode := node.Add('Field');
+ subnode.AddAttribute('Name', Source.LoggedFieldNames[i]);
+ subnode.AddAttribute('DataType', GetEnumName(TypeInfo(TDADataType), Ord(Source.LoggedFieldTypes[i])));
+ end;
+ node := rootnode.Add('KeyFields');
+ for i := 0 to (Source.KeyFieldCount-1) do begin
+ subnode := node.Add('Field');
+ subnode.AddAttribute('Name', Source.KeyFieldNames[i]);
+ end;
+
+ // Writes the actual changes
+ rootnode := fDeltaNode.Add(Source.LogicalName);
+ Source.RemoveUnchangedChanges;
+ for i := 0 to (Source.Count-1) do begin
+ node := rootnode.Add(nn_Row);
+
+ node.Add('RecID').Value := Source[i].RecID;
+ node.Add('ChangeType').Value := GetEnumName(TypeInfo(TDAChangeType), Ord(Source[i].ChangeType));
+ node.Add('Status').Value := GetEnumName(TypeInfo(TDAChangeStatus), Ord(Source[i].Status));
+ node.Add('Message').Value := Source[i].Message;
+
+ subnode := node.Add('OldValues');
+ for x := 0 to Source.LoggedFieldCount-1 do begin
+ if VarIsNull(Source.Changes[i].OldValues[x]) and (Source.LoggedFieldTypes[x] <> datblob) then begin
+ subnode.AddAttribute(Source.LoggedFieldNames[x], VarToStr(Null))
+ end else begin
+ case Source.LoggedFieldTypes[x] of
+ datblob: WriteBlobValue(subnode, Source.LoggedFieldNames[x], Source.Changes[i].OldValues[x]);
+ datDateTime : subnode.AddAttribute(Source.LoggedFieldNames[x], DateTimeToXMLDateTime(Source.Changes[i].OldValues[x]));
+ datFloat,
+ datCurrency: subnode.AddAttribute(Source.LoggedFieldNames[x], WriteFloat(Source.Changes[i].OldValues[x]));
+ // TODO -cAleF: remember to use the proper XML conversion reoutines here!
+ else subnode.AddAttribute(Source.LoggedFieldNames[x], VarToStr(Source.Changes[i].OldValues[x]));
+ end;
+ end;
+ end;
+
+ subnode := node.Add('NewValues');
+ for x := 0 to Source.LoggedFieldCount-1 do begin
+ if VarIsNull(Source.Changes[i].NewValues[x]) and (Source.LoggedFieldTypes[x] <> datblob) then begin
+ subnode.AddAttribute(Source.LoggedFieldNames[x], VarToStr(Null))
+ end else begin
+ case Source.LoggedFieldTypes[x] of
+ datblob: WriteBlobValue(subnode, Source.LoggedFieldNames[x], Source.Changes[i].NewValues[x]);
+ datDateTime : subnode.AddAttribute(Source.LoggedFieldNames[x], DateTimeToXMLDateTime(Source.Changes[i].NewValues[x]));
+ datFloat,
+ datCurrency: subnode.AddAttribute(Source.LoggedFieldNames[x], WriteFloat(Source.Changes[i].NewValues[x]));
+ // TODO -cAleF: remember to use the proper XML conversion reoutines here!
+ else subnode.AddAttribute(Source.LoggedFieldNames[x], VarToStr(Source.Changes[i].NewValues[x]));
+ end;
+ end;
+ end;
+ end;
+end;
+
+function TDAXmlDataStreamer.GetXMLDocument(var XMLDocument : IXMLDocument) : IXMLDocument;
+begin
+ if (XMLDocument=NIL) then begin
+ XMLDocument := NewROXmlDocument;
+ XMLDocument.New();
+ end;
+
+ result := XMLDocument;
+end;
+
+function TDAXmlDataStreamer.GetReadXSLT: IXMLDocument;
+begin
+ result := GetXMLDocument(fReadXSLT)
+end;
+
+{function TDAXmlDataStreamer.GetReadDeltaXSLT: IXMLDocument;
+begin
+ result := GetXMLDocument(fReadDeltaXSLT);
+end;}
+
+function TDAXmlDataStreamer.GetWriteXSLT: IXMLDocument;
+begin
+ result := GetXMLDocument(fWriteXSLT);
+end;
+
+{function TDAXmlDataStreamer.GetWriteDeltaXSLT: IXMLDocument;
+begin
+ result := GetXMLDocument(fWriteDeltaXSLT);
+end;}
+
+function TDAXmlDataStreamer.SaveDocumentName: Boolean;
+begin
+ result := fDocumentName<>nn_DocumentName
+end;
+
+procedure TDAXmlDataStreamer.SetDocumentName(const Value: string);
+var n : string;
+begin
+ n := Trim(Value);
+ if (n<>'')
+ then fDocumentName := n;
+end;
+
+procedure TDAXmlDataStreamer.ClearXMLNodes;
+begin
+ fXMLDocument := NIL;
+ fXMLDocument := NewROXmlDocument;
+
+ fSchemaRoot := NIL;
+ fRootNode := NIL;
+ fDatasetSchemaNode := NIL;
+ fDeltaSchemaNode := NIL;
+ fDatasetNode := NIL;
+ fDeltaNode := NIL;
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/Source/uDAXmlUtils.pas b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAXmlUtils.pas
new file mode 100644
index 0000000..f945eea
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/Source/uDAXmlUtils.pas
@@ -0,0 +1,640 @@
+unit uDAXMLUtils;
+
+{----------------------------------------------------------------------------}
+{ Data Abstract Library - Core Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the Data Abstract }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I DataAbstract.inc}
+
+interface
+
+uses Classes, TypInfo, uROXMLIntf, uDAInterfaces;
+
+const
+ // Misc
+ ValueNIL = 'NIL';
+
+ // Attribute names
+ attr_Type = 'Type';
+ attr_IsObject = 'IsObject';
+ attr_ByRef = 'ByRef';
+ attr_RefName = 'RefName';
+ attr_Owner = 'Owner';
+ attr_IsCollection = 'IsCollection';
+ attr_IsArray = 'IsArray';
+ attr_Count = 'Count';
+ attr_ItemClass = 'ItemClass';
+ attr_Item = 'Item';
+ attr_ClassName = 'ClassName';
+ attr_IsNull = 'IsNull';
+
+type
+ { Misc }
+ TROXMLStreamerOption = (soIncludeType);
+ TROXMLStreamerOptions = set of TROXMLStreamerOption;
+
+ { TROXMLStreamer }
+ TROXMLStreamer = class(TComponent)
+ private
+ fXMLStreamerOptions: TROXMLStreamerOptions;
+ fPropertiesToIgnore: TStringList;
+
+ procedure SetPropertiesToIgnore(const Value: TStrings);
+ function GetPropertiesToIgnore: TStrings;
+
+ protected
+ procedure SerializeSimpleType(const aTargetNode: IXMLNode; anObject: TObject; aPropertyInfo: PPropInfo);
+ procedure SerializeObject(const anObjectNode: IXMLNode; anObject: TObject; IsRoot: boolean = FALSE);
+
+ procedure DeserializeObject(const anObjectNode: IXMLNode; anObject: TObject; IsRoot: boolean = FALSE);
+
+ public
+ constructor Create(aOwner: TComponent); override;
+ destructor Destroy; override;
+
+ procedure Serialize(const aSource: TObject; const anObjectNode: IXMLNode; IsRoot: boolean = True); overload;
+ procedure Serialize(const aSource: TObject; aStream: TStream); overload;
+ procedure Deserialize(aStream: TStream; aDestination: TObject);
+
+ published
+ property StreamerOptions: TROXMLStreamerOptions read fXMLStreamerOptions write fXMLStreamerOptions;
+ property PropertiesToIgnore: TStrings read GetPropertiesToIgnore write SetPropertiesToIgnore;
+ end;
+
+// Quick access functions
+procedure SaveObjectToXMLNode(aSource: TObject; anObjectNode: IXMLNode; somePropertiesToIgnore: array of string; someStreamerOptions: TROXMLStreamerOptions = []; IsRoot: boolean = True);
+procedure SaveObjectToStream(aSource: TObject; aStream: TStream; somePropertiesToIgnore: array of string; someStreamerOptions: TROXMLStreamerOptions = []);
+procedure LoadObjectFromStream(aStream: TStream; aDestination: TObject; somePropertiesToIgnore: array of string);
+
+procedure SaveObjectToFile(aSource: TObject; const aFileName: string; somePropertiesToIgnore: array of string; someStreamerOptions: TROXMLStreamerOptions = []);
+procedure LoadObjectFromFile(const aFileName: string; aDestination: TObject; somePropertiesToIgnore: array of string);
+
+// Dataset oriented functions
+function DatasetToXML(
+ const aDataset : IDADataset;
+ const RootNodeName : string = '';
+ const RecordNodeName : string = 'Record';
+ IncludeSchema : boolean = TRUE) : IXMLDocument;
+
+procedure XMLToCommandParams(const aCommand : IDASQLCommand; const XML : string);
+function XMLToUpdateCommand(const aConnection : IDAConnection;
+ const aReferencedDataset : TDADataset;
+ const aTargetTableName : string;
+ const aXML : string) : IDASQLCommand;
+
+
+implementation
+
+uses SysUtils, uROTypes, Variants;
+
+procedure SaveObjectToXMLNode(aSource: TObject; anObjectNode: IXMLNode; somePropertiesToIgnore: array of string; someStreamerOptions: TROXMLStreamerOptions = []; IsRoot: boolean = True);
+var
+ i: integer;
+begin
+ with TROXMLStreamer.Create(nil) do try
+ for i := 0 to High(somePropertiesToIgnore) do
+ PropertiesToIgnore.Add(somePropertiesToIgnore[i]);
+
+ StreamerOptions := someStreamerOptions;
+ Serialize(aSource, anObjectNode,IsRoot);
+ finally
+ Free;
+ end;
+end;
+
+procedure SaveObjectToStream(aSource: TObject; aStream: TStream; somePropertiesToIgnore: array of string; someStreamerOptions: TROXMLStreamerOptions = []);
+var
+ i: integer;
+begin
+ with TROXMLStreamer.Create(nil) do try
+ for i := 0 to High(somePropertiesToIgnore) do
+ PropertiesToIgnore.Add(somePropertiesToIgnore[i]);
+
+ StreamerOptions := someStreamerOptions;
+ Serialize(aSource, aStream);
+ finally
+ Free;
+ end;
+end;
+
+procedure LoadObjectFromStream(aStream: TStream; aDestination: TObject; somePropertiesToIgnore: array of string);
+var
+ i: integer;
+begin
+ with TROXMLStreamer.Create(nil) do try
+ for i := 0 to High(somePropertiesToIgnore) do
+ PropertiesToIgnore.Add(somePropertiesToIgnore[i]);
+
+ Deserialize(aStream, aDestination);
+ finally
+ Free;
+ end;
+end;
+
+procedure SaveObjectToFile(aSource: TObject; const aFileName: string; somePropertiesToIgnore: array of string; someStreamerOptions: TROXMLStreamerOptions = []);
+var
+ fs: TFileStream;
+begin
+ fs := TFileStream.Create(aFileName, fmCreate);
+ try
+ SaveObjectToStream(aSource, fs, somePropertiesToIgnore, someStreamerOptions);
+ finally
+ fs.Free;
+ end;
+end;
+
+procedure LoadObjectFromFile(const aFileName: string; aDestination: TObject; somePropertiesToIgnore: array of string);
+var
+ fs: TFileStream;
+begin
+ fs := TFileStream.Create(aFileName, fmOpenRead + fmShareDenyWrite);
+ try
+ LoadObjectFromStream(fs, aDestination, somePropertiesToIgnore);
+ finally
+ fs.Free;
+ end;
+end;
+
+{ TROXMLStreamer }
+
+constructor TROXMLStreamer.Create(aOwner: TComponent);
+begin
+ inherited;
+
+ fPropertiesToIgnore := TStringList.Create;
+ fPropertiesToIgnore.Sorted := TRUE;
+ fPropertiesToIgnore.Duplicates := dupError;
+
+ fXMLStreamerOptions := [soIncludeType];
+end;
+
+destructor TROXMLStreamer.Destroy;
+begin
+ fPropertiesToIgnore.Free;
+
+ inherited;
+end;
+
+procedure TROXMLStreamer.Deserialize(aStream: TStream; aDestination: TObject);
+var
+ xml: IXMLDocument;
+begin
+ if (aStream = nil) then raise Exception.Create('Invalid stream');
+
+ xml := NewROXmlDocument;
+ xml.New('');
+ xml.LoadFromStream(aStream);
+
+ if (xml.DocumentNode.Value = ValueNIL) then
+ FreeAndNIL(aDestination)
+ else
+ DeserializeObject(xml.DocumentNode, aDestination, TRUE);
+end;
+
+procedure TROXMLStreamer.Serialize(const aSource: TObject; aStream: TStream);
+var
+ xml: IXMLDocument;
+begin
+ if (aStream = nil) then raise Exception.Create('Invalid stream');
+
+ xml := NewROXmlDocument;
+ try
+ if (aSource = nil) then begin
+ xml.New(ValueNIL);
+ Exit;
+ end
+ else
+ xml.New(aSource.ClassName);
+
+ // Serializes the object
+ SerializeObject(xml.DocumentNode, aSource, TRUE);
+ finally
+ xml.SaveToStream(aStream);
+ end;
+end;
+
+procedure TROXMLStreamer.SerializeSimpleType(const aTargetNode: IXMLNode; anObject: TObject; aPropertyInfo: PPropInfo);
+var
+ int64val: int64;
+ intval: integer;
+ dblval: double;
+ strval: string;
+ {$IFNDEF DELPHI5}wstrval: widestring;
+ {$ENDIF}
+ lName: string;
+begin
+ lName := {$IFDEF UNICODE}Utf8ToAnsi{$ENDIF}(aPropertyInfo^.Name);
+ case aPropertyInfo^.PropType^.Kind of
+ tkEnumeration: begin
+ //enuval := GetOrdProp(anObject, lName);
+ aTargetNode.Value := GetPropValue(anObject, lName, TRUE);
+ end;
+
+ tkInteger: begin
+ intval := GetOrdProp(anObject, lName);
+ aTargetNode.Value := intval;
+ end;
+
+ tkFloat: begin
+ dblval := GetFloatProp(anObject, lName);
+ aTargetNode.Value := dblval;
+ end;
+
+ tkLString,
+ tkString: begin
+ strval := GetStrProp(anObject, lName);
+ aTargetNode.Value := strval;
+ end;
+
+ tkInt64: begin
+ int64val := GetInt64Prop(anObject, lName);
+ aTargetNode.Value := int64val;
+ end;
+
+ tkWString: begin
+ {$IFDEF DELPHI5}
+ strval := GetStrProp(anObject, lName);
+ aTargetNode.Value := strval;
+ {$ELSE}
+ wstrval := GetWideStrProp(anObject, lName);
+ aTargetNode.Value := wstrval;
+ {$ENDIF}
+ end;
+
+ tkVariant, tkSet: begin
+ aTargetNode.Value := GetVariantProp(anObject, lName);
+ end;
+
+ else
+ raise Exception.Create(Format('Type not supported %s', [GetEnumName(TypeInfo(TTypeKind), Ord(aPropertyInfo^.PropType^.Kind))]))
+ end;
+end;
+
+procedure TROXMLStreamer.SerializeObject(const anObjectNode: IXMLNode; anObject: TObject; IsRoot: boolean = FALSE);
+var
+ props: PPropList;
+ x, cnt, i: integer;
+ subnode, node: IXMLNode;
+ coll: TCollection;
+ // Temporary variables
+ objval: TObject;
+ pdata: PTypeData;
+ lname: string;
+begin
+ if (anObject <> nil) and (anObject.ClassInfo <> nil) then begin
+ pdata := GetTypeData(anObject.ClassInfo);
+
+ if (pdata <> nil) then begin
+
+ cnt := pdata.PropCount;
+
+ if (cnt > 0) then begin
+ GetMem(props, cnt * SizeOf(PPropInfo));
+
+ try
+ cnt := GetPropList(PTypeInfo(anObject.ClassInfo), tkProperties, props);
+
+ for i := 0 to (cnt - 1) do begin
+ lName := {$IFDEF UNICODE}Utf8ToAnsi{$ENDIF}(props^[i]^.Name);
+ if IsRoot and (fPropertiesToIgnore.IndexOf(lName) >= 0)
+ or not IsStoredProp(anObject, props^[i]) then Continue;
+
+ node := anObjectNode.Add(lName);
+
+ with props^[i]^ do
+ // Class types
+ if (PropType^.Kind = tkClass) then begin
+ node.AddAttribute(attr_Type, props^[i]^.PropType^.Name); // Always set fo object types
+ objval := GetObjectProp(anObject, lName);
+ node.AddAttribute(attr_IsObject, XMLBooleans[TRUE]);
+
+ if Assigned(objval) then begin
+ // TComponent
+
+ if (objval is TStrings) then begin
+ node.Value := TStrings(objval).Text;
+ end else
+ if (objval is TComponent) then begin
+ if (TComponent(objval).Owner = anObject) then
+ SerializeObject(node, objval) // Owned sub-component
+ else begin
+ // Reference to another component
+ node.AddAttribute(attr_ByRef, XMLBooleans[TRUE]);
+ node.AddAttribute(attr_RefName, TComponent(objval).Name);
+ if (TComponent(objval).Owner <> nil) then node.AddAttribute(attr_Owner, TComponent(objval).Owner.Name);
+ end;
+ end
+
+ // TCollection
+ else if (objval is TCollection) then begin
+ coll := TCollection(objval);
+ node.AddAttribute(attr_IsCollection, XMLBooleans[TRUE]);
+ node.AddAttribute(attr_Count, coll.Count);
+ node.AddAttribute(attr_ItemClass, coll.ItemClass.ClassName);
+
+ for x := 0 to (coll.Count - 1) do begin
+ subnode := node.Add(attr_Item + IntToStr(x));
+ SerializeObject(subnode, coll.Items[x]);
+ end;
+ end
+
+ // Standard persistent class
+ else
+ SerializeObject(node, objval);
+ end
+
+ // NIL object
+ else
+ node.AddAttribute(attr_IsNull, XMLBooleans[TRUE]);
+ end
+
+ // Simple types
+ else begin
+ if (soIncludeType in fXMLStreamerOptions) then node.AddAttribute(attr_Type, props^[i]^.PropType^.Name);
+ SerializeSimpleType(node, anObject, props^[i]);
+ end;
+ end;
+ finally
+ FreeMem(props, cnt * SizeOf(PPropInfo));
+ end;
+ end
+
+(* // TROArray (they don't have properties so they will not fall in the previous block)
+ else if (anObject is TROArray) then begin
+ arr := TROArray(anObject);
+ anObjectNode.AddAttribute(attr_IsArray, XMLBooleans[TRUE]);
+ anObjectNode.AddAttribute(attr_Count, arr.Count);
+
+ if (arr.GetItemType<>NIL) then begin
+ anObjectNode.AddAttribute(attr_ItemClass, arr.GetItemType^.Name);
+ for x := 0 to (arr.Count-1) do begin
+ subnode := anObjectNode.Add(attr_Item+IntToStr(x));
+ SerializeObject(subnode, TObject(arr.GetItemRef(x)));
+ end;
+ end;
+ end*)
+ end;
+ end
+
+ else
+ anObjectNode.AddAttribute(attr_IsNull, XMLBooleans[TRUE]);
+end;
+
+procedure TROXMLStreamer.DeserializeObject(const anObjectNode: IXMLNode;
+ anObject: TObject; IsRoot: boolean = FALSE);
+var
+ props: PPropList;
+ x, cnt, i: integer;
+ node: IXMLNode;
+ coll: TCollection;
+
+ // Temporary variables
+ objval: TObject;
+ pdata: PTypeData;
+ collitem: TCollectionItem;
+ strVal: string;
+ lName: string;
+begin
+ if (anObjectNode.GetAttributeValue(attr_IsNull, XMLBooleans[FALSE]) = XMLBooleans[TRUE]) then begin
+ //anObject := NIL;
+ Exit;
+ end;
+
+ pdata := GetTypeData(anObject.ClassInfo);
+
+ if (pdata <> nil) then begin
+
+ cnt := pdata.PropCount;
+
+ if (cnt > 0) then begin
+ GetMem(props, cnt * SizeOf(PPropInfo));
+
+ try
+ cnt := GetPropList(PTypeInfo(anObject.ClassInfo), tkProperties, props);
+
+ for i := 0 to (cnt - 1) do begin
+ lname:= {$IFDEF UNICODE}Utf8ToAnsi {$ENDIF}(props^[i]^.Name);
+ if IsRoot and (fPropertiesToIgnore.IndexOf(lName) >= 0) then Continue;
+
+ node := anObjectNode.GetNodeByName(lName);
+ if (node = nil) then Continue; // Property was not streamed
+
+ with props^[i]^ do
+ // Class types
+ if (PropType^.Kind = tkClass) then begin
+ objval := GetObjectProp(anObject, lName);
+
+ if (objval = nil) then
+ Continue
+
+ else begin
+ // TComponent
+ if (objval is TStrings) then begin
+ TStrings(objval).Text := node.Value;
+ end else
+ if (objval is TComponent) then begin
+ if (TComponent(objval).Owner = anObject) then
+ DeserializeObject(node, objval) // Owned sub-component
+ else begin
+ // Reference to another component
+ {node.AddAttribute(attr_ByRef, XMLBooleans[TRUE]);
+ node.AddAttribute(attr_RefName, TComponent(objval).Name);
+ if (TComponent(objval).Owner<>NIL)
+ then node.AddAttribute(attr_Owner, TComponent(objval).Owner.Name);}
+ end;
+ end
+
+ // TCollection
+ else if (objval is TCollection) then begin
+ coll := TCollection(objval);
+ coll.Clear;
+
+ for x := 0 to (node.ChildrenCount - 1) do try
+ if SameText(Copy(node.Children[x].Name, 1, 4), attr_Item) then begin
+ collitem := coll.Add;
+ DeserializeObject(node.Children[x], collitem);
+ end;
+ except
+ raise
+ end;
+ end
+
+ // Standard persistent class
+ else
+ DeserializeObject(node, objval);
+ end
+ end
+
+ // Simple types
+ else begin
+ case PropType^.Kind of
+ tkEnumeration: begin
+ // If enumerated values are empty, it should just skip and leave the defaults.
+ // Not doing so generates a range check error.
+ strVal := VarToStr(node.Value);
+ if (strVal<>'')
+ then SetPropValue(anObject, lName, GetEnumValue(props^[i]^.PropType{$IFNDEF FPC}^{$ENDIF}, strVal));
+ end;
+ else
+ SetPropValue(anObject, lName, node.Value);
+ end;
+ end;
+ end;
+ finally
+ FreeMem(props, cnt * SizeOf(PPropInfo));
+ end;
+ end
+
+ // TROArray (they don't have properties so they will not fall in the previous block)
+(* else if (anObject is TROArray) then begin
+ arr := TROArray(anObject);
+ arr.Resize(anObjectNode.ChildrenCount-1);
+
+ if (arr.GetItemType<>NIL) then begin
+ arr.GetItemClass.Create
+ anObjectNode.AddAttribute(attr_ItemClass, arr.GetItemType^.Name);
+ for x := 0 to (arr.Count-1) do begin
+ subnode := anObjectNode.Add(attr_Item+IntToStr(x));
+ SerializeObject(subnode, TObject(arr.GetItemRef(x)));
+ end;
+ end;
+ end*)
+ end;
+end;
+
+procedure TROXMLStreamer.SetPropertiesToIgnore(const Value: TStrings);
+begin
+ fPropertiesToIgnore.Assign(Value);
+end;
+
+function TROXMLStreamer.GetPropertiesToIgnore: TStrings;
+begin
+ result := fPropertiesToIgnore;
+end;
+
+// Dataset oriented functions
+function DatasetToXML(
+ const aDataset : IDADataset;
+ const RootNodeName : string = '';
+ const RecordNodeName : string = 'Record';
+ IncludeSchema : boolean = TRUE) : IXMLDocument;
+var root, node : IXMLNode;
+ i : integer;
+begin
+ result := NewROXmlDocument;
+
+ if (RootNodeName<>'') then result.New(RootNodeName)
+ else begin
+ if (Trim(aDataset.Name)<>'') then result.New(aDataset.Name)
+ else result.New('Dataset');
+ end;
+
+ if not aDataset.Active then Exit;
+
+ root := result.DocumentNode;
+
+ if IncludeSchema then begin
+ end;
+
+ while not aDataset.EOF do try
+ node := root.Add(RecordNodeName);
+ for i := 0 to aDataset.FieldCount-1 do begin
+ node.Add(aDataset.Fields[i].Name).Value := aDataset.Fields[i].AsString;
+ end;
+ finally
+ aDataset.Next;
+ end;
+end;
+
+procedure XMLToCommandParams(const aCommand : IDASQLCommand; const XML : string);
+var xmldoc : IXMLDocument;
+ i : integer;
+ node : IXMLNode;
+ param : TDAParam;
+begin
+ xmldoc := NewROXmlDocument;
+ xmldoc.New('CommandParams');
+ xmldoc.XML := XML;
+
+ for i := 0 to (aCommand.Params.Count-1) do
+ aCommand.Params[i].Value := Null;
+
+ for i := 0 to (xmldoc.DocumentNode.ChildrenCount-1) do begin
+ node := xmldoc.DocumentNode.Children[i];
+ param := aCommand.Params.FindParam(node.Name);
+ if (param=NIL) then Continue;
+
+ param.Value := node.Value;
+ end;
+end;
+
+function XMLToUpdateCommand(const aConnection : IDAConnection;
+ const aReferencedDataset : TDADataset;
+ const aTargetTableName : string;
+ const aXML : string) : IDASQLCommand;
+const CRLF = #13#10;
+var fld : TDAField;
+ i : integer;
+ xmldoc : IXMLDocument;
+ nme, where, sql : string;
+begin
+ xmldoc := NewROXmlDocument;
+ xmldoc.New;
+ xmldoc.XML := aXML;
+
+ result := NIL;
+ if (xmldoc.DocumentNode.ChildrenCount=0)
+ then raise Exception.Create('Invalid XML document. Cannot generate an update statement');
+
+ sql := 'UPDATE '+aTargetTableName+' SET'+CRLF;
+ where := '';
+
+ with xmldoc do begin
+ for i := 0 to (DocumentNode.ChildrenCount-1) do begin
+ nme := DocumentNode.Children[i].Name;
+ fld := aReferencedDataset.Fields.FindField(nme);
+
+ if (fld=NIL) then begin
+ if (Pos('OLD_', UpperCase(nme))=1) then begin
+ if (where<>'') then where := where+' AND ';
+ nme := Copy(nme, 5, MaxInt);
+ fld := aReferencedDataset.Fields.FindField(nme);
+ if (fld=NIL) then Continue;
+ if (fld.DataType in [datWideString, datString, datDateTime])
+ then where := where+nme+'='+''''+VarToStr(DocumentNode.Children[i].Value)+''''
+ else where := where+nme+'='+VarToStr(DocumentNode.Children[i].Value);
+
+ end;
+ Continue;
+ end
+ else begin
+ sql := sql+fld.Name+'=';
+ if (fld.DataType in [datWideString, datString, datDateTime])
+ then sql := sql+''''+VarToStr(DocumentNode.Children[i].Value)+''''
+ else sql := sql+VarToStr(DocumentNode.Children[i].Value);
+ sql := sql+','+CRLF;
+ end;
+ end;
+ end;
+ sql := Copy(sql, 1, Length(sql)-3)+CRLF;
+
+ if (where<>'') then sql := sql+' WHERE '+where;
+
+ result := aConnection.NewCommand(sql, stSQL, 'UPDATE_'+aTargetTableName);
+end;
+
+procedure TROXMLStreamer.Serialize(const aSource: TObject; const anObjectNode: IXMLNode; IsRoot: boolean = True);
+begin
+ if (anObjectNode = nil) then raise Exception.Create('Invalid XMLNode.');
+ if (aSource <> nil) then SerializeObject(anObjectNode, aSource, IsRoot);
+end;
+
+end.
diff --git a/official/5.0.30.691/Data Abstract for Delphi/UNWISE.EXE b/official/5.0.30.691/Data Abstract for Delphi/UNWISE.EXE
new file mode 100644
index 0000000..80f5461
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/UNWISE.EXE differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/da.png b/official/5.0.30.691/Data Abstract for Delphi/da.png
new file mode 100644
index 0000000..e42fedc
Binary files /dev/null and b/official/5.0.30.691/Data Abstract for Delphi/da.png differ
diff --git a/official/5.0.30.691/Data Abstract for Delphi/license.txt b/official/5.0.30.691/Data Abstract for Delphi/license.txt
new file mode 100644
index 0000000..0c68c76
--- /dev/null
+++ b/official/5.0.30.691/Data Abstract for Delphi/license.txt
@@ -0,0 +1,86 @@
+*** REMOBJECTS SOFTWARE END USER LICENSE AGREEMENT ***
+
+Updated May 1, 2008
+
+IMPORTANT: PLEASE READ THIS DOCUMENT CAREFULLY AND IN ITS ENTIRETY BEFORE USING ANY SOFTWARE PRODUCT ACQUIRED FROM REMOBJECTS SOFTWARE.
+
+This document constitutes a LEGAL AGREEMENT between you, the End User (either an individual or an entity), and RemObjects Software, LLC.
+
+
+1. SCOPE
+
+This End User License Agreement ("EULA") covers all SOFTWARE PRODUCTS produced and sold by RemObjects Software, LLC. The sections of this EULA that contain information that pertain specifically to a certain product are properly marked as such.
+
+SOFTWARE PRODUCTS covered this EULA:
+
+* RemObjects AnyDAC
+* RemObjects Oxygene
+* RemObjects Data Abstract
+* RemObjects DebugServer
+* RemObjects Developer Studio
+* RemObjects Everwood
+* RemObjects Floss
+* RemObjects Internet Pack
+* RemObjects Hydra
+* RemObjects Pascal Script
+* RemObjects SDK
+
+
+2. DEFINITIONS
+
+SOFTWARE PRODUCTS: refers to one or more product as made available as a unified installation package.
+
+(LIBRARY) SOURCE CODE: refers to the source code shipped with any of the SOFTWARE PRODUCTS licensed to you, the End User, in the “Source” folder of the product installation.
+
+TOOLS: refers to ANY of the applications deployed with the SOFTWARE PRODUCTS in executable form, whether as auxiliary helper programs of a Library product or as main product. This includes but is not limited to any .EXE files and IDE integration.
+
+SAMPLE CODE: sample code is provided to you as part of the SOFTWARE PRODUCT license inside the “Samples” folder
+
+EXECUTABLE FORMAT refers to executable files such as .EXE and .DLL files build from your own source code, linking in code provided as part of the LIBRARY SOURCE CODE. It does not encompass Delphi .DCU or .BPL/.DCP files or any other format that would allow a third party to the provided file as a replacement for the LIBRARY SOURCE CODE
+
+
+3. COPYRIGHT
+
+This SOFTWARE PRODUCT is owned by RemObjects Software, LLC and is protected by copyright laws and international copyright treaties.
+
+All copyrights of this SOFTWARE PRODUCT, including but not limited to any source code, tools, documentation, images, text, and samples incorporated into the SOFTWARE PRODUCT, as well as those provided via Support Services or any of the RemObjects websites, are proprietary products of RemObjects Software, LLC and are protected by copyright law. You acquire only the right to use the SOFTWARE PRODUCT and do not acquire any rights of ownership. You acknowledge that the SOFTWARE PRODUCT and its source code remains a confidential trade secret of RemObjects Software, LLC. RemObjects Software, LLC may have trademarks, copyrights, patents or other intellectual property rights covering the SOFTWARE PRODUCT. You are not granted any license to these patents, trademarks, copyrights, or other intellectual property rights except as expressly provided herein. RemObjects Software, LLC reserves all rights not expressly granted.
+
+All names and logos of the SOFTWARE PRODUCTS defined in the SCOPE section of this EULA are trademarks or registered trademarks of RemObjects Software, LLC. These names and logos may only be used by the End User when referring to RemObjects Software, LLC or any of its products. These names and logos may not be used by the End User for branding or marketing purposes, without written consent from RemObjects Software, LLC.
+
+
+2. GRANT OF LICENSE
+
+BY INSTALLING, COPYING, OR OTHERWISE USING THE SOFTWARE PRODUCT, YOU AGREE TO BE BOUND BY ALL OF THE TERMS AND CONDITIONS OF THIS END USER LICENSE AGREEMENT. IF YOU DO NOT AGREE TO THE TERMS OF THIS AGREEMENT, YOU ARE NOT PERMITTED TO INSTALL, COPY, OR USE THE SOFTWARE PRODUCT. IF YOU REJECT THE TERMS OF THIS AGREEMENT WITHIN THIRTY (30) DAYS AFTER PURCHASING THE SOFTWARE PRODUCT, YOU MAY SEND AN EMAIL TO sales@remobjects.com AND REQUEST A FULL REFUND OF THE PURCHASE PRICE. IN ORDER TO RECEIVE THE REFUND, YOU MUST IRREVOCABLY UNINSTALL AND/OR DELETE ANY AND ALL COPIES OF THE SOFTWARE PRODUCT(S) YOU HAVE PURCHASED, AND PROVIDE CERTIFICATION OF SUCH TO REMOBJECTS.
+You may make one copy of the SOFTWARE PRODUCT solely for backup or archival purposes or transfer the SOFTWARE PRODUCT to a single hard disk provided you keep the original solely for backup or archival purposes.
+
+You may install the software on up to five computers, providing you are the only person using the software on these computers.
+
+You may not alter any of the programs or accompanying files without written permission from RemObjects Software, LLC. Any resale or commercial distribution of the SOFTWARE PRODUCT is strictly prohibited, unless RemObjects Software, LLC has given explicit written permission.
+
+You are not obtaining title to the SOFTWARE PRODUCT or any copyrights. You may not sublicense, rent, lease, convey, modify, translate, convert to another programming language, decompile, or disassemble the SOFTWARE PRODUCT for any purpose. RemObjects Software, LLC grants you as an individual, a personal, non exclusive license to install and use the SOFTWARE PRODUCT for the sole purpose of developing systems that are not in competition with the SOFTWARE PRODUCT, or any other products developed and sold by RemObjects Software, LLC.
+
+If you are an entity, RemObjects Software, LLC grants you the right to designate one individual within your organization to have the right to use the SOFTWARE PRODUCT in the manner described above.
+The named License you acquired is not transferrable to another individual or entity, unless you are given written permission by RemObjects Software, LLC.
+
+You may link against the LIBRARY SOURCE CODE and deploy it in EXECUTABLE FORMAT as part of your application; you may make changes to the LIBRARY SOURCE CODE and write extensions for your own use, and link against and deploy your changes in EXECUTABLE FORMAT. You may NOT deploy RemObjects Software’s source code to anyone.
+SAMPLE CODE for provided for your convenience and you may use it at your discretion. You may create your own products starting from the samples provided and consider this derived work as your own. You may also deploy such derived work in any way you see fit, including in source code form.
+
+Unless specifically stated on a per-tool basis, you may not deploy the TOOLS included with the SOFTWARE PRODUCT to anyone, neither standalone or as part of your own application; the tools are intended solely for use by yourself.
+In general, you may not distribute any part of the installed product, nor any license codes, license files or your website login to third parties.
+
+
+3. SUPPORT SERVICES
+
+RemObjects Software, LLC may provide the End User with Support Services related to the SOFTWARE PRODUCT. Support Services include free downloading of upgrades as covered by the original purchase, as well as technical support offered via NNTP-based newsgroups, e-mail or telephone. Use of Support Services is governed by RemObjects Software policies and programs described on the RemObjects website (www.remobjects.com/support) and may be subject to additional support charges depending on the type and level of support provided. Any supplemental software code provided to you as part of the Support Services shall be considered part of the SOFTWARE PRODUCT and is subject to the terms and conditions of this EULA.
+
+
+4. TERMINATION
+
+This License shall remain in effect only for so long as you are in compliance with the terms and conditions of this EULA. This License will terminate if you fail to comply with any of its terms or conditions. You may terminate it at any time by destroying your copies of the SOFTWARE PRODUCT. You agree, upon termination, to destroy all copies of the Product. Without prejudice to any other rights, RemObjects Software, LLC may terminate this EULA if you fail to comply with the terms. The provisions of this EULA that protect the proprietary rights of RemObjects Software, LLC and the LIMITATIONS OF WARRANTIES will continue to be in force even after any termination. Upon termination, RemObjects Software, LLC may also enforce any rights provided by law.
+
+
+5. LIMITATIONS OF WARRANTIES AND LIABILITY
+
+THIS SOFTWARE PRODUCT IS PROVIDED TO YOU "AS IS" WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE APPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. YOU ASSUME THE ENTIRE RISK AS TO THE ACCURACY AND THE USE OF THE SOFTWARE PRODUCT AND ALL OTHER RISK ARISING FROMTHE USE OR PERFORMANCE OF THIS SOFTWARE PRODUCT AND DOCUMENTATION.
+
+RemObjects Software, LLC SHALL NOT BE LIABLE FOR ANY DAMAGES WHATSOEVER ARISING FROM USE OF OR INABILITY TO USE THIS SOFTWARE PRODUCT, EVEN IF RemObjects Software, LLC HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL RemObjects Software, LLC BE LIABLE FOR ANY CONSEQUENTIAL, INCIDENTAL, DIRECT, INDIRECT, SPECIAL, PUNITIVE, OR OTHER DAMAGES WHATSOEVER, INCLUDING BUT NOT LIMITED TO DAMAGES OR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY LOSS, EVEN IF RemObjects Software, LLC HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. BECAUSE SOME STATES/JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, THE ABOVE LIMITATION MAY NOT APPLY.
diff --git a/official/5.0.30.691/Everwood/Bin/1033/RemObjects.Everwood.Resources.dll b/official/5.0.30.691/Everwood/Bin/1033/RemObjects.Everwood.Resources.dll
new file mode 100644
index 0000000..23b78e5
Binary files /dev/null and b/official/5.0.30.691/Everwood/Bin/1033/RemObjects.Everwood.Resources.dll differ
diff --git a/official/5.0.30.691/Everwood/Bin/EWSetRegistryPath.exe b/official/5.0.30.691/Everwood/Bin/EWSetRegistryPath.exe
new file mode 100644
index 0000000..49b5a72
Binary files /dev/null and b/official/5.0.30.691/Everwood/Bin/EWSetRegistryPath.exe differ
diff --git a/official/5.0.30.691/Everwood/Bin/Microsoft.VisualStudio.OLE.Interop.dll b/official/5.0.30.691/Everwood/Bin/Microsoft.VisualStudio.OLE.Interop.dll
new file mode 100644
index 0000000..bcdd96d
Binary files /dev/null and b/official/5.0.30.691/Everwood/Bin/Microsoft.VisualStudio.OLE.Interop.dll differ
diff --git a/official/5.0.30.691/Everwood/Bin/Microsoft.VisualStudio.Shell.Interop.8.0.dll b/official/5.0.30.691/Everwood/Bin/Microsoft.VisualStudio.Shell.Interop.8.0.dll
new file mode 100644
index 0000000..778b6ad
Binary files /dev/null and b/official/5.0.30.691/Everwood/Bin/Microsoft.VisualStudio.Shell.Interop.8.0.dll differ
diff --git a/official/5.0.30.691/Everwood/Bin/Microsoft.VisualStudio.Shell.Interop.dll b/official/5.0.30.691/Everwood/Bin/Microsoft.VisualStudio.Shell.Interop.dll
new file mode 100644
index 0000000..a4b7afe
Binary files /dev/null and b/official/5.0.30.691/Everwood/Bin/Microsoft.VisualStudio.Shell.Interop.dll differ
diff --git a/official/5.0.30.691/Everwood/Bin/Microsoft.VisualStudio.TextManager.Interop.dll b/official/5.0.30.691/Everwood/Bin/Microsoft.VisualStudio.TextManager.Interop.dll
new file mode 100644
index 0000000..553e141
Binary files /dev/null and b/official/5.0.30.691/Everwood/Bin/Microsoft.VisualStudio.TextManager.Interop.dll differ
diff --git a/official/5.0.30.691/Everwood/Bin/Microsoft.VisualStudio.VSIP.Helper.dll b/official/5.0.30.691/Everwood/Bin/Microsoft.VisualStudio.VSIP.Helper.dll
new file mode 100644
index 0000000..9ffccfb
Binary files /dev/null and b/official/5.0.30.691/Everwood/Bin/Microsoft.VisualStudio.VSIP.Helper.dll differ
diff --git a/official/5.0.30.691/Everwood/Bin/RemObjects.Everwood.BDS2.dll b/official/5.0.30.691/Everwood/Bin/RemObjects.Everwood.BDS2.dll
new file mode 100644
index 0000000..e9cc1a3
Binary files /dev/null and b/official/5.0.30.691/Everwood/Bin/RemObjects.Everwood.BDS2.dll differ
diff --git a/official/5.0.30.691/Everwood/Bin/RemObjects.Everwood.BDS3.dll b/official/5.0.30.691/Everwood/Bin/RemObjects.Everwood.BDS3.dll
new file mode 100644
index 0000000..31354bc
Binary files /dev/null and b/official/5.0.30.691/Everwood/Bin/RemObjects.Everwood.BDS3.dll differ
diff --git a/official/5.0.30.691/Everwood/Bin/RemObjects.Everwood.BDS4.dll b/official/5.0.30.691/Everwood/Bin/RemObjects.Everwood.BDS4.dll
new file mode 100644
index 0000000..c6bc4fd
Binary files /dev/null and b/official/5.0.30.691/Everwood/Bin/RemObjects.Everwood.BDS4.dll differ
diff --git a/official/5.0.30.691/Everwood/Bin/RemObjects.Everwood.BDS5.dll b/official/5.0.30.691/Everwood/Bin/RemObjects.Everwood.BDS5.dll
new file mode 100644
index 0000000..effee06
Binary files /dev/null and b/official/5.0.30.691/Everwood/Bin/RemObjects.Everwood.BDS5.dll differ
diff --git a/official/5.0.30.691/Everwood/Bin/RemObjects.Everwood.ShDocWv.dll b/official/5.0.30.691/Everwood/Bin/RemObjects.Everwood.ShDocWv.dll
new file mode 100644
index 0000000..d5528f0
Binary files /dev/null and b/official/5.0.30.691/Everwood/Bin/RemObjects.Everwood.ShDocWv.dll differ
diff --git a/official/5.0.30.691/Everwood/Bin/RemObjects.Everwood.VarReplacer.exe b/official/5.0.30.691/Everwood/Bin/RemObjects.Everwood.VarReplacer.exe
new file mode 100644
index 0000000..8d01880
Binary files /dev/null and b/official/5.0.30.691/Everwood/Bin/RemObjects.Everwood.VarReplacer.exe differ
diff --git a/official/5.0.30.691/Everwood/Bin/RemObjects.Everwood.VisualStudio.2005.dll b/official/5.0.30.691/Everwood/Bin/RemObjects.Everwood.VisualStudio.2005.dll
new file mode 100644
index 0000000..53ac7d8
Binary files /dev/null and b/official/5.0.30.691/Everwood/Bin/RemObjects.Everwood.VisualStudio.2005.dll differ
diff --git a/official/5.0.30.691/Everwood/Bin/RemObjects.Everwood.VisualStudio.dll b/official/5.0.30.691/Everwood/Bin/RemObjects.Everwood.VisualStudio.dll
new file mode 100644
index 0000000..cc363ef
Binary files /dev/null and b/official/5.0.30.691/Everwood/Bin/RemObjects.Everwood.VisualStudio.dll differ
diff --git a/official/5.0.30.691/Everwood/Bin/RemObjects.Everwood.dll b/official/5.0.30.691/Everwood/Bin/RemObjects.Everwood.dll
new file mode 100644
index 0000000..b9a4523
Binary files /dev/null and b/official/5.0.30.691/Everwood/Bin/RemObjects.Everwood.dll differ
diff --git a/official/5.0.30.691/Everwood/Bin/RemObjects_Everwood_D10.bpl b/official/5.0.30.691/Everwood/Bin/RemObjects_Everwood_D10.bpl
new file mode 100644
index 0000000..ecc3211
Binary files /dev/null and b/official/5.0.30.691/Everwood/Bin/RemObjects_Everwood_D10.bpl differ
diff --git a/official/5.0.30.691/Everwood/Bin/RemObjects_Everwood_D10.dcp b/official/5.0.30.691/Everwood/Bin/RemObjects_Everwood_D10.dcp
new file mode 100644
index 0000000..8d7018c
Binary files /dev/null and b/official/5.0.30.691/Everwood/Bin/RemObjects_Everwood_D10.dcp differ
diff --git a/official/5.0.30.691/Everwood/Bin/RemObjects_Everwood_D11.bpl b/official/5.0.30.691/Everwood/Bin/RemObjects_Everwood_D11.bpl
new file mode 100644
index 0000000..83a3f18
Binary files /dev/null and b/official/5.0.30.691/Everwood/Bin/RemObjects_Everwood_D11.bpl differ
diff --git a/official/5.0.30.691/Everwood/Bin/RemObjects_Everwood_D11.dcp b/official/5.0.30.691/Everwood/Bin/RemObjects_Everwood_D11.dcp
new file mode 100644
index 0000000..752d319
Binary files /dev/null and b/official/5.0.30.691/Everwood/Bin/RemObjects_Everwood_D11.dcp differ
diff --git a/official/5.0.30.691/Everwood/Bin/RemObjects_Everwood_D6.bpl b/official/5.0.30.691/Everwood/Bin/RemObjects_Everwood_D6.bpl
new file mode 100644
index 0000000..f79eeca
Binary files /dev/null and b/official/5.0.30.691/Everwood/Bin/RemObjects_Everwood_D6.bpl differ
diff --git a/official/5.0.30.691/Everwood/Bin/RemObjects_Everwood_D6.dcp b/official/5.0.30.691/Everwood/Bin/RemObjects_Everwood_D6.dcp
new file mode 100644
index 0000000..bbff810
Binary files /dev/null and b/official/5.0.30.691/Everwood/Bin/RemObjects_Everwood_D6.dcp differ
diff --git a/official/5.0.30.691/Everwood/Bin/RemObjects_Everwood_D7.bpl b/official/5.0.30.691/Everwood/Bin/RemObjects_Everwood_D7.bpl
new file mode 100644
index 0000000..56e7f97
Binary files /dev/null and b/official/5.0.30.691/Everwood/Bin/RemObjects_Everwood_D7.bpl differ
diff --git a/official/5.0.30.691/Everwood/Bin/RemObjects_Everwood_D7.dcp b/official/5.0.30.691/Everwood/Bin/RemObjects_Everwood_D7.dcp
new file mode 100644
index 0000000..6663254
Binary files /dev/null and b/official/5.0.30.691/Everwood/Bin/RemObjects_Everwood_D7.dcp differ
diff --git a/official/5.0.30.691/Everwood/Bin/RemObjects_Everwood_D9.bpl b/official/5.0.30.691/Everwood/Bin/RemObjects_Everwood_D9.bpl
new file mode 100644
index 0000000..7b6c1a7
Binary files /dev/null and b/official/5.0.30.691/Everwood/Bin/RemObjects_Everwood_D9.bpl differ
diff --git a/official/5.0.30.691/Everwood/Bin/RemObjects_Everwood_D9.dcp b/official/5.0.30.691/Everwood/Bin/RemObjects_Everwood_D9.dcp
new file mode 100644
index 0000000..7487b38
Binary files /dev/null and b/official/5.0.30.691/Everwood/Bin/RemObjects_Everwood_D9.dcp differ
diff --git a/official/5.0.30.691/Everwood/Bin/SHDocVw.dll b/official/5.0.30.691/Everwood/Bin/SHDocVw.dll
new file mode 100644
index 0000000..77b0ae8
Binary files /dev/null and b/official/5.0.30.691/Everwood/Bin/SHDocVw.dll differ
diff --git a/official/5.0.30.691/Everwood/Bin/temp/gacutil.exe b/official/5.0.30.691/Everwood/Bin/temp/gacutil.exe
new file mode 100644
index 0000000..951d5da
Binary files /dev/null and b/official/5.0.30.691/Everwood/Bin/temp/gacutil.exe differ
diff --git a/official/5.0.30.691/Everwood/Bin/temp/gacutil.exe.config b/official/5.0.30.691/Everwood/Bin/temp/gacutil.exe.config
new file mode 100644
index 0000000..7d4fa20
--- /dev/null
+++ b/official/5.0.30.691/Everwood/Bin/temp/gacutil.exe.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/official/5.0.30.691/Everwood/Source/Delphi/Everwood.inc b/official/5.0.30.691/Everwood/Source/Delphi/Everwood.inc
new file mode 100644
index 0000000..7f6a92f
--- /dev/null
+++ b/official/5.0.30.691/Everwood/Source/Delphi/Everwood.inc
@@ -0,0 +1,6 @@
+{$INCLUDE eDefines.inc}
+
+{$IFDEF FPC}
+ {$MODE DELPHI}
+{$ENDIF}
+
diff --git a/official/5.0.30.691/Everwood/Source/Delphi/EverwoodIDEResources.res b/official/5.0.30.691/Everwood/Source/Delphi/EverwoodIDEResources.res
new file mode 100644
index 0000000..12dee92
Binary files /dev/null and b/official/5.0.30.691/Everwood/Source/Delphi/EverwoodIDEResources.res differ
diff --git a/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D10.bdsproj b/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D10.bdsproj
new file mode 100644
index 0000000..786d0f4
--- /dev/null
+++ b/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D10.bdsproj
@@ -0,0 +1,180 @@
+
+
+
+
+ Delphi.Personality
+
+ 1.0
+ {C239782A-EA39-4CF9-91C2-955D92AF0504}
+
+
+
+
+ RemObjects_Everwood_D10.dpk
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 1
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+ RemObjects Everwood for Delphi
+ False
+
+
+
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10
+ ..\..\Dcu\D10
+ ..\;..\..\Dcu\D10
+
+ xDEBUG_EVERWOOD_SHOW_NEW_MODULE_CODE
+
+ False
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 1
+ 0
+ 1
+ 56
+ False
+ False
+ False
+ False
+ False
+ 1033
+ 1252
+
+
+ 1.0.1.56
+ 1.0.0.0
+
+
+
+
+
+
+
+
+
+ True
+
diff --git a/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D10.cfg b/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D10.cfg
new file mode 100644
index 0000000..9692106
--- /dev/null
+++ b/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D10.cfg
@@ -0,0 +1,45 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W+
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N0"..\..\Dcu\D10"
+-LE"..\..\Bin"
+-LN"..\..\Bin"
+-U"..\;..\..\Dcu\D10"
+-O"..\;..\..\Dcu\D10"
+-I"..\;..\..\Dcu\D10"
+-R"..\;..\..\Dcu\D10"
+-DxDEBUG_EVERWOOD_SHOW_NEW_MODULE_CODE
+-Z
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D10.dpk b/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D10.dpk
new file mode 100644
index 0000000..9465b2d
--- /dev/null
+++ b/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D10.dpk
@@ -0,0 +1,53 @@
+package RemObjects_Everwood_D10;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Everwood for Delphi'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+{$DEFINE xDEBUG_EVERWOOD_SHOW_NEW_MODULE_CODE}
+
+requires
+ rtl,
+ vcl,
+ vclie,
+ designide,
+ vclx;
+
+contains
+ uEWOTAWizards in 'uEWOTAWizards.pas',
+ uEWOTAHelpers in 'uEWOTAHelpers.pas',
+ uEWSampleInfo in 'uEWSampleInfo.pas' {SampleInfoForm},
+ uEWOTANewModuleExpert in 'uEWOTANewModuleExpert.pas',
+ RemObjects_Everwood_Reg in 'RemObjects_Everwood_Reg.pas',
+ uEWOTANewProjectExpert in 'uEWOTANewProjectExpert.pas',
+ uEWOTARepositoryExpert in 'uEWOTARepositoryExpert.pas',
+ uEWMenuManager in 'uEWMenuManager.pas',
+ uEWAbout in 'uEWAbout.pas',
+ uEWWizard in 'uEWWizard.pas' {EWWizardForm},
+ uEWTools in 'uEWTools.pas',
+ uEWOTAMessages in 'uEWOTAMessages.pas',
+ uEWStringTools in 'uEWStringTools.pas',
+ uEWHelpers in 'uEWHelpers.pas';
+
+end.
diff --git a/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D10.res b/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D10.res
new file mode 100644
index 0000000..3532edd
Binary files /dev/null and b/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D10.res differ
diff --git a/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D11.dpk b/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D11.dpk
new file mode 100644
index 0000000..0ac7aae
--- /dev/null
+++ b/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D11.dpk
@@ -0,0 +1,53 @@
+package RemObjects_Everwood_D11;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Everwood for Delphi'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+{$DEFINE xDEBUG_EVERWOOD_SHOW_NEW_MODULE_CODE}
+
+requires
+ rtl,
+ vcl,
+ vclie,
+ designide,
+ vclx;
+
+contains
+ uEWOTAWizards in 'uEWOTAWizards.pas',
+ uEWOTAHelpers in 'uEWOTAHelpers.pas',
+ uEWSampleInfo in 'uEWSampleInfo.pas' {SampleInfoForm},
+ uEWOTANewModuleExpert in 'uEWOTANewModuleExpert.pas',
+ RemObjects_Everwood_Reg in 'RemObjects_Everwood_Reg.pas',
+ uEWOTANewProjectExpert in 'uEWOTANewProjectExpert.pas',
+ uEWOTARepositoryExpert in 'uEWOTARepositoryExpert.pas',
+ uEWMenuManager in 'uEWMenuManager.pas',
+ uEWAbout in 'uEWAbout.pas',
+ uEWWizard in 'uEWWizard.pas' {EWWizardForm},
+ uEWTools in 'uEWTools.pas',
+ uEWOTAMessages in 'uEWOTAMessages.pas',
+ uEWStringTools in 'uEWStringTools.pas',
+ uEWHelpers in 'uEWHelpers.pas';
+
+end.
diff --git a/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D11.dproj b/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D11.dproj
new file mode 100644
index 0000000..29a0ca5
--- /dev/null
+++ b/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D11.dproj
@@ -0,0 +1,93 @@
+
+
+ {b7956419-311f-4137-a85b-371bb0f78d5d}
+ RemObjects_Everwood_D11.dpk
+ Debug
+ AnyCPU
+ DCC32
+ ..\..\Dcu\D11\RemObjects_Everwood_D11.bpl
+
+
+ 7.0
+ False
+ False
+ True
+ 0
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Bin
+ ..\..\Bin
+ ..\;..\..\Dcu\D11
+ ..\;..\..\Dcu\D11
+ ..\;..\..\Dcu\D11
+ ..\;..\..\Dcu\D11
+ xDEBUG_EVERWOOD_SHOW_NEW_MODULE_CODE;RELEASE
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ 7.0
+ True
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Dcu\D11
+ ..\..\Bin
+ ..\..\Bin
+ ..\;..\..\Dcu\D11
+ ..\;..\..\Dcu\D11
+ ..\;..\..\Dcu\D11
+ ..\;..\..\Dcu\D11
+ xDEBUG_EVERWOOD_SHOW_NEW_MODULE_CODE
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ Delphi.Personality
+ Package
+
+False False True False RemObjects Everwood for Delphi False True False True False 1 0 1 53 False False False False False 1033 1252 1.0.1.53 1.0.0.0 RemObjects_Everwood_D11.dpk
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D11.res b/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D11.res
new file mode 100644
index 0000000..3532edd
Binary files /dev/null and b/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D11.res differ
diff --git a/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D6.cfg b/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D6.cfg
new file mode 100644
index 0000000..8758c38
--- /dev/null
+++ b/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D6.cfg
@@ -0,0 +1,38 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W+
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\..\Dcu\D6"
+-LE"..\..\Bin"
+-LN"..\..\Bin"
+-DxDEBUG_EVERWOOD_SHOW_NEW_MODULE_CODE
+-Z
diff --git a/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D6.dof b/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D6.dof
new file mode 100644
index 0000000..32497d8
--- /dev/null
+++ b/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D6.dof
@@ -0,0 +1,165 @@
+[FileVersion]
+Version=7.0
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=1
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=1
+SymbolLibrary=1
+SymbolPlatform=1
+UnitLibrary=1
+UnitPlatform=1
+UnitDeprecated=1
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=1
+UnsafeCode=1
+UnsafeCast=1
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=RemObjects Everwood for Delphi
+[Directories]
+OutputDir=
+UnitOutputDir=..\..\Dcu\D6
+PackageDLLOutputDir=..\..\Bin
+PackageDCPOutputDir=..\..\Bin
+SearchPath=
+Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;vcldb;dsnapcon;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;dclOfficeXP;CDKSmp;CDKDesignTimeSupport;ES_CodeSite20;CDK;ESDelphiCommandCompiler;ESFileSearch;ESVisualCompositeExpert;EaglWk;ESGraphUtils;ESBase;ESVsCp;ESSampleComposites70;ESSampleCompositeEditors7;RzBz4070;cxCommonEditingVCLD7;cxEditorsVCLD7;dxThemeD7;cxLibraryVCLD7;cxDataD7;cxExtEditorsVCLD7;cxGridUtilsVCLD7;cxGridVCLD7;cxPageControlVCLD7;cxTreeListVCLD7;addict3_d6;dxBarD7;dxComnD7;dxBarDBNavD7;dxBarExtDBItemsD7;dxBarExtItemsD7;dxDockingD7;dxEdtrD7;dxELibD7;dxExELD7;EQGridD7;dxExRwD7;dxGrEdD7;dxDBEdD7;dxInsD7;dxLayoutControlD7;dxMasterViewD7;dxmdsd7;dxNavBarD7;dxObjInsD7;dxPageControlD7;dxPSCoreD7;dxsbD7;SynEdit_D7;tb2kComplete_70;EzSpecials_D7;PurposesoftD7;Rz252D70;Rz252N70;RemObjects_DataSnap_D7;DataAbstract_IDE_D7;DataAbstract_Core_D7;DataAbstract_DBXDriver_D7;DataAbstract_DiskDriver_D7;Nexus100ts70;Nexus100ll70;Nexus100tn70;Nexus100pt70;Nexus100tw70;ECQDBCD7;EQTLD7;sq7;cxExportVCLD7;SchemaModelerUtils_d7;CrTb2k;ESCore;CR_Standard;madBasic_;madDisAsm_;CSP20I70.bpl;
+Conditionals=xDEBUG_EVERWOOD_SHOW_NEW_MODULE_CODE
+DebugSourceDirs=
+UsePackages=0
+[Parameters]
+RunParams=
+HostApplication=
+Launcher=
+UseLauncher=0
+DebugCWD=
+[Language]
+ActiveLang=
+ProjectLang=
+RootDir=
+[Version Info]
+IncludeVerInfo=1
+AutoIncBuild=0
+MajorVer=0
+MinorVer=0
+Release=0
+Build=0
+Debug=0
+PreRelease=0
+Special=0
+Private=0
+DLL=0
+Locale=1033
+CodePage=1252
+[Version Info Keys]
+CompanyName=
+FileDescription=
+FileVersion=0.0.0.0
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+[Excluded Packages]
+R:\RemObjects SDK\Dcu\D6\RemObjects_Core_D6.bpl=RemObjects SDK - Core Library
+R:\Hydra\Trial\D6\Hydra_RO_D6.bpl=RemObjects' Hydra - RemObjects SDK Integration Library TRIAL
+R:\RemObjects SDK\Dcu\D6\RemObjects_RODX_D6.bpl=RemObjects SDK - RODXSock Library
+R:\RemObjects SDK\Dcu\D6\RemObjects_BPDX_D6.bpl=RemObjects SDK - BPDX Library
+R:\RemObjects SDK\Dcu\D6\RemObjects_DataSnap_D6.bpl=RemObjects SDK - DataSnap Integration Pack
+r:\RemObjects SDK\Dcu\d6\RemObjects_Indy_D6.bpl=RemObjects SDK - Indy Library
+R:\RemObjects SDK for Delphi\Dcu\D6\RemObjects_IDE_D6.bpl=RemObjects SDK - IDE Integration
+R:\Data Abstract\Dcu\D6\DataAbstract_Core_D6.bpl=RemObjects Data Abstract - Core Library
+R:\Data Abstract\Dcu\D6\DataAbstract_DBXDriver_D6.bpl=RemObjects Data Abstract - dbExpress Driver
+R:\Data Abstract\Dcu\D6\DataAbstract_DiskDriver_D6.bpl=RemObjects Data Abstract - Disk Driver
+R:\Data Abstract\Dcu\D6\DataAbstract_IBXDriver_D6.bpl=RemObjects Data Abstract - InterBase Express Driver
+R:\Data Abstract\Dcu\D6\DataAbstract_IDE_D6.bpl=RemObjects Data Abstract - IDE Package
+R:\RemObjects SDK\Dcu\D6\RemObjects_Enterprise_D6.bpl=RemObjects SDK - Enterprise Edition
+R:\Data Abstract\Dcu\D6\DataAbstract_ADODriver_D6.bpl=RemObjects Data Abstract - ADOExpress/dbGo Driver
+[HistoryLists\hlConditionals]
+Count=1
+Item0=xDEBUG_EVERWOOD_SHOW_NEW_MODULE_CODE
+[HistoryLists\hlUnitAliases]
+Count=1
+Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+[HistoryLists\hlUnitOutputDirectory]
+Count=1
+Item0=..\..\Dcu\D6
+[HistoryLists\hlBPLOutput]
+Count=1
+Item0=..\..\Dcu\D6
+[HistoryLists\hlDCPOutput]
+Count=1
+Item0=..\..\Dcu\D6
diff --git a/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D6.dpk b/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D6.dpk
new file mode 100644
index 0000000..cef08c6
--- /dev/null
+++ b/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D6.dpk
@@ -0,0 +1,53 @@
+package RemObjects_Everwood_D6;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Everwood for Delphi'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+{$DEFINE xDEBUG_EVERWOOD_SHOW_NEW_MODULE_CODE}
+
+requires
+ rtl,
+ vcl,
+ vclie,
+ designide,
+ vclx;
+
+contains
+ uEWOTAWizards in 'uEWOTAWizards.pas',
+ uEWOTAHelpers in 'uEWOTAHelpers.pas',
+ uEWSampleInfo in 'uEWSampleInfo.pas' {SampleInfoForm},
+ uEWOTANewModuleExpert in 'uEWOTANewModuleExpert.pas',
+ RemObjects_Everwood_Reg in 'RemObjects_Everwood_Reg.pas',
+ uEWOTANewProjectExpert in 'uEWOTANewProjectExpert.pas',
+ uEWOTARepositoryExpert in 'uEWOTARepositoryExpert.pas',
+ uEWMenuManager in 'uEWMenuManager.pas',
+ uEWAbout in 'uEWAbout.pas',
+ uEWWizard in 'uEWWizard.pas' {EWWizardForm},
+ uEWTools in 'uEWTools.pas',
+ uEWOTAMessages in 'uEWOTAMessages.pas',
+ uEWStringTools in 'uEWStringTools.pas',
+ uEWHelpers in 'uEWHelpers.pas';
+
+end.
diff --git a/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D6.res b/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D6.res
new file mode 100644
index 0000000..3532edd
Binary files /dev/null and b/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D6.res differ
diff --git a/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D7.cfg b/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D7.cfg
new file mode 100644
index 0000000..2132da9
--- /dev/null
+++ b/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D7.cfg
@@ -0,0 +1,47 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W+
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\..\Dcu\D7"
+-LE"..\..\Bin"
+-LN"..\..\Bin"
+-DxDEBUG_EVERWOOD_SHOW_NEW_MODULE_CODE
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D7.dof b/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D7.dof
new file mode 100644
index 0000000..5a17516
--- /dev/null
+++ b/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D7.dof
@@ -0,0 +1,135 @@
+[FileVersion]
+Version=7.0
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=1
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=RemObjects Everwood for Delphi
+[Directories]
+OutputDir=
+UnitOutputDir=..\..\Dcu\D7
+PackageDLLOutputDir=..\..\Bin
+PackageDCPOutputDir=..\..\Bin
+SearchPath=
+Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;vcldb;dsnapcon;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;dclOfficeXP;CDKSmp;CDKDesignTimeSupport;ES_CodeSite20;CDK;ESDelphiCommandCompiler;ESFileSearch;ESVisualCompositeExpert;EaglWk;ESGraphUtils;ESBase;ESVsCp;ESSampleComposites70;ESSampleCompositeEditors7;RzBz4070;cxCommonEditingVCLD7;cxEditorsVCLD7;dxThemeD7;cxLibraryVCLD7;cxDataD7;cxExtEditorsVCLD7;cxGridUtilsVCLD7;cxGridVCLD7;cxPageControlVCLD7;cxTreeListVCLD7;addict3_d6;dxBarD7;dxComnD7;dxBarDBNavD7;dxBarExtDBItemsD7;dxBarExtItemsD7;dxDockingD7;dxEdtrD7;dxELibD7;dxExELD7;EQGridD7;dxExRwD7;dxGrEdD7;dxDBEdD7;dxInsD7;dxLayoutControlD7;dxMasterViewD7;dxmdsd7;dxNavBarD7;dxObjInsD7;dxPageControlD7;dxPSCoreD7;dxsbD7;SynEdit_D7;tb2kComplete_70;EzSpecials_D7;PurposesoftD7;Rz252D70;Rz252N70;RemObjects_DataSnap_D7;DataAbstract_IDE_D7;DataAbstract_Core_D7;DataAbstract_DBXDriver_D7;DataAbstract_DiskDriver_D7;Nexus100ts70;Nexus100ll70;Nexus100tn70;Nexus100pt70;Nexus100tw70;ECQDBCD7;EQTLD7;sq7;cxExportVCLD7;SchemaModelerUtils_d7;CrTb2k;ESCore;CR_Standard;madBasic_;madDisAsm_;CSP20I70.bpl;
+Conditionals=xDEBUG_EVERWOOD_SHOW_NEW_MODULE_CODE
+DebugSourceDirs=
+UsePackages=0
+[Parameters]
+RunParams=
+HostApplication=
+Launcher=
+UseLauncher=0
+DebugCWD=
+[Language]
+ActiveLang=
+ProjectLang=
+RootDir=
+[Version Info]
+IncludeVerInfo=1
+AutoIncBuild=0
+MajorVer=1
+MinorVer=0
+Release=0
+Build=0
+Debug=0
+PreRelease=0
+Special=0
+Private=0
+DLL=0
+Locale=1033
+CodePage=1252
+[Version Info Keys]
+CompanyName=
+FileDescription=
+FileVersion=1.0.1.50
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
diff --git a/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D7.dpk b/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D7.dpk
new file mode 100644
index 0000000..ab11329
--- /dev/null
+++ b/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D7.dpk
@@ -0,0 +1,53 @@
+package RemObjects_Everwood_D7;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Everwood for Delphi'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+{$DEFINE xDEBUG_EVERWOOD_SHOW_NEW_MODULE_CODE}
+
+requires
+ rtl,
+ vcl,
+ vclie,
+ designide,
+ vclx;
+
+contains
+ uEWOTAWizards in 'uEWOTAWizards.pas',
+ uEWOTAHelpers in 'uEWOTAHelpers.pas',
+ uEWSampleInfo in 'uEWSampleInfo.pas' {SampleInfoForm},
+ uEWOTANewModuleExpert in 'uEWOTANewModuleExpert.pas',
+ RemObjects_Everwood_Reg in 'RemObjects_Everwood_Reg.pas',
+ uEWOTANewProjectExpert in 'uEWOTANewProjectExpert.pas',
+ uEWOTARepositoryExpert in 'uEWOTARepositoryExpert.pas',
+ uEWMenuManager in 'uEWMenuManager.pas',
+ uEWAbout in 'uEWAbout.pas',
+ uEWWizard in 'uEWWizard.pas' {EWWizardForm},
+ uEWTools in 'uEWTools.pas',
+ uEWOTAMessages in 'uEWOTAMessages.pas',
+ uEWStringTools in 'uEWStringTools.pas',
+ uEWHelpers in 'uEWHelpers.pas';
+
+end.
diff --git a/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D7.res b/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D7.res
new file mode 100644
index 0000000..3532edd
Binary files /dev/null and b/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D7.res differ
diff --git a/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D9.bdsproj b/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D9.bdsproj
new file mode 100644
index 0000000..1f3a8c7
--- /dev/null
+++ b/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D9.bdsproj
@@ -0,0 +1,176 @@
+
+
+
+
+ Delphi.Personality
+
+ 1.0
+ {C239782A-EA39-4CF9-91C2-955D92AF0504}
+
+
+
+
+ RemObjects_Everwood_D9.dpk
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 1
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True True
+ True
+
+
+
+ 0
+ 0
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+ RemObjects Everwood for Delphi False
+
+
+
+ ..\..\Dcu\D9
+ ..\..\Dcu\D9
+ ..\..\Dcu\D9
+ ..\;..\..\Dcu\D9
+
+ xDEBUG_EVERWOOD_SHOW_NEW_MODULE_CODE
+
+ False
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 3
+ 0
+ 1
+ 282
+ False
+ False
+ False
+ False
+ False
+ 1033
+ 1252
+
+
+ 3.0.1.282
+ 1.0.0.0
+
+
+
+
+
+
+
+
+ True
+
diff --git a/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D9.cfg b/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D9.cfg
new file mode 100644
index 0000000..cbc338d
--- /dev/null
+++ b/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D9.cfg
@@ -0,0 +1,45 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W+
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N"..\..\Dcu\D9"
+-LE"..\..\Bin"
+-LN"..\..\Bin"
+-U"..\;..\..\Dcu\D9"
+-O"..\;..\..\Dcu\D9"
+-I"..\;..\..\Dcu\D9"
+-R"..\;..\..\Dcu\D9"
+-DxDEBUG_EVERWOOD_SHOW_NEW_MODULE_CODE
+-Z
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D9.dof b/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D9.dof
new file mode 100644
index 0000000..6e0a739
--- /dev/null
+++ b/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D9.dof
@@ -0,0 +1,136 @@
+[FileVersion]
+Version=7.0
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=1
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=1
+SymbolLibrary=1
+SymbolPlatform=1
+UnitLibrary=1
+UnitPlatform=1
+UnitDeprecated=1
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=RemObjects Everwood for Delphi
+[Directories]
+OutputDir=
+UnitOutputDir=
+PackageDLLOutputDir=
+PackageDCPOutputDir=
+SearchPath=
+Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;Rave50CLX;Rave50VCL;dclOfficeXP;RemObjects_WebBroker_D7;RemObjects_Indy_D7;RemObjects_RODX_D7;RemObjects_BPDX_D7;DataAbstract_DBXDriver_D7;DataAbstract_Scripting_D7;PascalScript_RO_D7;IBO40FTS_D7;IBO40TRT_D7;IBO40CRT_D7;IBO40RPL_D7;IBO40VRT_D7;IBO40FRT_D7;IBO40XRT_D7;IBO40WRT_D7;IBO40WXDT_D7;IBO40WXRT_D7;CRControls70;dac70;dacvcl70;sdacvcl70;sdac70;DataAbstract_IDE_D7;cxLibraryVCLD7;dxBarD7;dxComnD7;dxBarDBNavD7;dxBarExtDBItemsD7;dxBarExtItemsD7;dxDockingD7;dxsbD7;cxEditorsVCLD7;dxThemeD7;cxDataD7;cxExtEditorsVCLD7;cxPageControlVCLD7;cxGridVCLD7;cxSchedulerVCLD7;cxTreeListVCLD7;cxVerticalGridVCLD7;cxSpreadSheetVCLD7;dxNavBarD7;cxWebD7;cxWebPascalScriptD7;cxWebSnapD7;cxWebTeeChartD7;dxMasterViewD7;dxmdsD7;dxdbtrD7;dxtrmdD7;dxorgcD7;dxdborD7;dxFlowChartD7;dxLayoutControlD7;dxLayoutControlcxEditAdaptersD7;dxPSCoreD7;dxPSTeeChartD7;dxPsPrVwAdvD7;dxPSLnksD7;dxPSdxOCLnkD7;dxPSdxMVLnkD7;dxPSdxLCLnkD7;dxPSdxFCLnkD7;dxPSdxDBTVLnkD7;dxPSdxDBOCLnkD7;dxPSDBTeeChartD7;dxPScxCommonD7;dxPScxTLLnkD7;dxPScxSSLnkD7;dxPScxScheduler2LnkD7;dxPScxPCProdD7;dxPScxGridLnkD7;dxPScxExtCommonD7;dxPScxVGridLnkD7;DataAbstract_Core_D7;Hydra_Core_D7;Hydra_RO_D7
+Conditionals=xDEBUG_EVERWOOD_SHOW_NEW_MODULE_CODE
+DebugSourceDirs=
+UsePackages=0
+[Parameters]
+RunParams=
+HostApplication=
+Launcher=
+UseLauncher=0
+DebugCWD=
+[Language]
+ActiveLang=
+ProjectLang=
+RootDir=C:\Program Files\Borland\Delphi7\Bin\
+[Version Info]
+IncludeVerInfo=1
+AutoIncBuild=0
+MajorVer=1
+MinorVer=0
+Release=0
+Build=0
+Debug=0
+PreRelease=0
+Special=0
+Private=0
+DLL=0
+Locale=1058
+CodePage=1251
+[Version Info Keys]
+CompanyName=
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+Comments=
diff --git a/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D9.dpk b/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D9.dpk
new file mode 100644
index 0000000..71083c0
--- /dev/null
+++ b/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D9.dpk
@@ -0,0 +1,53 @@
+package RemObjects_Everwood_D9;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Everwood for Delphi'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+{$DEFINE xDEBUG_EVERWOOD_SHOW_NEW_MODULE_CODE}
+
+requires
+ rtl,
+ vcl,
+ vclie,
+ designide,
+ vclx;
+
+contains
+ uEWOTAWizards in 'uEWOTAWizards.pas',
+ uEWOTAHelpers in 'uEWOTAHelpers.pas',
+ uEWSampleInfo in 'uEWSampleInfo.pas' {SampleInfoForm},
+ uEWOTANewModuleExpert in 'uEWOTANewModuleExpert.pas',
+ RemObjects_Everwood_Reg in 'RemObjects_Everwood_Reg.pas',
+ uEWOTANewProjectExpert in 'uEWOTANewProjectExpert.pas',
+ uEWOTARepositoryExpert in 'uEWOTARepositoryExpert.pas',
+ uEWMenuManager in 'uEWMenuManager.pas',
+ uEWAbout in 'uEWAbout.pas',
+ uEWWizard in 'uEWWizard.pas' {EWWizardForm},
+ uEWTools in 'uEWTools.pas',
+ uEWOTAMessages in 'uEWOTAMessages.pas',
+ uEWStringTools in 'uEWStringTools.pas',
+ uEWHelpers in 'uEWHelpers.pas';
+
+end.
diff --git a/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D9.res b/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D9.res
new file mode 100644
index 0000000..3532edd
Binary files /dev/null and b/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_D9.res differ
diff --git a/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_Reg.pas b/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_Reg.pas
new file mode 100644
index 0000000..d53aee4
--- /dev/null
+++ b/official/5.0.30.691/Everwood/Source/Delphi/RemObjects_Everwood_Reg.pas
@@ -0,0 +1,18 @@
+unit RemObjects_Everwood_Reg;
+
+interface
+
+{$IFDEF FPC}uses LResources;{$ENDIF}
+
+{$IFNDEF FPC}
+ {$R 'EverwoodIDEResources.res' 'EverwoodIDEResources.rc'}
+{$ENDIF}
+
+implementation
+
+{$IFDEF FPC}
+initialization
+ {$I EverwoodIDEResources.lrs}
+{$ENDIF}
+end.
+
diff --git a/official/5.0.30.691/Everwood/Source/Delphi/eDefines.inc b/official/5.0.30.691/Everwood/Source/Delphi/eDefines.inc
new file mode 100644
index 0000000..c671a44
--- /dev/null
+++ b/official/5.0.30.691/Everwood/Source/Delphi/eDefines.inc
@@ -0,0 +1,459 @@
+{----------------------------------------------------------------------------}
+{file: eDefines.inc }
+{type: Delphi include file }
+{ }
+{compiler: Borland Pascal 7, }
+{ Delphi 1-7, 2005-2007 for Win32 }
+{ Kylix 1-3, }
+{ C++Builder 1-6, 2006-2007 }
+{ Free Pascal Compiler 2.x }
+{ }
+{platforms: DOS, DPMI, Win16, Win32, Win64, Linux, Mac OS X }
+{ }
+{author: mh@elitedev.com }
+{ }
+{contents: Defines that can be flexibily used to determine the exact }
+{ compiler version used. }
+{ }
+{(c)opyright elitedevelopments software. all rights reserved. }
+{ http://www.elitedev.com }
+{ }
+{ Third Party component developers are encouraged to use the set of defines }
+{ established in this file, rather then their own system, for checking their }
+{ component libraries agains different versions of Delphi and C++Builder. }
+{ }
+{ This file may be distributed freely with both free and commercial source }
+{ libraries, but you are asked to please leave this comment in place, and }
+{ to return any improvements you make to this file to the maintainer that }
+{ is noted above. }
+{----------------------------------------------------------------------------}
+
+{----------------------------------------------------------------------------}
+{ Compiler and OS version defines: }
+{ }
+{ exact compiler versions: }
+{ }
+{ BP7 Borland Pascal 7.0 }
+{ DELPHI1 Delphi 1.0 (any Delphi) }
+{ DELPHI2 Delphi 2.0 }
+{ DELPHI3 Delphi 3.0 }
+{ DELPHI4 Delphi 4.0 }
+{ DELPHI5 Delphi 5.0 }
+{ DELPHI6 Delphi 6.0 }
+{ DELPHI7 Delphi 7.0 }
+{ DELPHI9 Delphi 2005 }
+{ DELPHI2005 Delphi 2005 }
+{ DELPHI2006 Delphi 2006 }
+{ DELPHI2007 Delphi 2007 }
+{ KYLIX1 Kylix 1.0 }
+{ KYLIX2 Kylix 2.0 }
+{ KYLIX3 Kylix 3.0 }
+{ CBUILDER1 C++Builder 1.0 }
+{ CBUILDER3 C++Builder 3.0 }
+{ CBUILDER4 C++Builder 4.0 }
+{ CBUILDER5 C++Builder 5.0 }
+{ }
+{ }
+{ minimum compiler versions: }
+{ }
+{ DELPHI1UP Delphi 1.0 and above (any Delphi) }
+{ DELPHI2UP Delphi 2.0 and above }
+{ DELPHI3UP Delphi 3.0 and above }
+{ DELPHI4UP Delphi 4.0 and above }
+{ DELPHI5UP Delphi 5.0 and above }
+{ DELPHI6UP Delphi 6.0 and above }
+{ DELPHI7UP Delphi 7.0 and above }
+{ DELPHI9UP Delphi 9.0 (2005) and above }
+{ DELPHI10UP Delphi 10.0 (2006) and above }
+{ DELPHI11UP Delphi 11.0 (2007) and above }
+{ DELPHI2005UP Delphi 2005 and above }
+{ DELPHI2006UP Delphi 2006 and above }
+{ DELPHI2007UP Delphi 2007 and above }
+{ KYLIX1UP Kylix 1.0 and above (any Kylix) }
+{ KYLIX2UP Kylix 2.0 and above (any Kylix) }
+{ KYLIX3UP Kylix 3.0 and above (any Kylix) }
+{ CBUILDER1UP C++Builder 1.0 and above or Delphi 2 and above }
+{ CBUILDER3UP C++Builder 3.0 and above or Delphi 3.0 and above }
+{ CBUILDER4UP C++Builder 4.0 and above or Delphi 4.0 and above }
+{ CBUILDER5UP C++Builder 5.0 and above or Delphi 5.0 and above }
+{ CBUILDER6UP C++Builder 5.0 and above or Delphi 5.0 and above }
+{ }
+{ }
+{ compiler types: }
+{ }
+{ BP Borland Pascal (not Delphi or C++Builder) }
+{ DELPHI any Delphi version (but not C++Builder or Kylix) }
+{ KYLIX any Kylix version (not Delphi or C++Builder for Windows) }
+{ CBUILDER any C++Builder for Windows (Pascal) }
+{ }
+{ }
+{ target platforms compiler types: }
+{ }
+{ DELPHI_16BIT 16bit Delphi (but not C++Builder!) }
+{ DELPHI_32BIT 32bit Delphi (but not C++Builder) }
+{ KYLIX_32BIT 32bit Kylix (but not C++Builder) }
+{ CBUILDER_32BIT 32bit C++Builer's Pascal (but not Delphi) }
+{ }
+{ }
+{ target cpu types }
+{ }
+{ CPU16 16bit Delphi or Borland Pascal }
+{ CPU32 32bit Delphi or Free Pascal }
+{ CPU64 64bit Free Pascal }
+{ }
+{ target platforms }
+{ }
+{ DOS any DOS (plain and DPMI) }
+{ REALMODE 16bit realmode DOS }
+{ PROTECTEDMODE 16bit DPMI DOS }
+{ }
+{ MSWINDOWS any Windows platform }
+{ WIN16 16bit Windows }
+{ WIN32 32bit Windows }
+{ WIN64 64bit Windows }
+{ DOTNET .NET }
+{ }
+{ LINUX any Linux platform }
+{ LINUX32 32bit Linux }
+{ LINUX64 64bit Linux }
+{ }
+{ DARWIN Any Mac OS X }
+{ DARWIN32 32bit Mac OS X }
+{ DARWIN64 64bit Mac OS X }
+{----------------------------------------------------------------------------}
+
+{ defines for Borland Pascal 7.0 }
+{$IFDEF VER70}
+ {$DEFINE BP}
+ {$DEFINE BP7}
+ {$DEFINE 16BIT}
+ {$DEFINE CPU16}
+
+ { defines for BP7 DOS real mode }
+ {$IFDEF MSDOS}
+ {$DEFINE DOS}
+ {$DEFINE REALMODE}
+ {$ENDIF}
+
+ { defines for BP7 DOS protected mode }
+ {$IFDEF DPMI}
+ {$DEFINE DOS}
+ {$DEFINE PROTECTEDMODE}
+ {$ENDIF}
+
+ { defines for BP7 Windows }
+ {$IFDEF WINDOWS}
+ {$DEFINE MSWINDOWS}
+ {$DEFINE WIN16}
+ {$ENDIF}
+{$ENDIF}
+
+{ defines for Delphi 1.0 thru 7.0 }
+{$IFNDEF LINUX}
+
+ { defines for Delphi 1.0 }
+ {$IFDEF VER80}
+ {$DEFINE DELPHI}
+ {$DEFINE DELPHI1}
+ {$DEFINE DELPHI1UP}
+ {$DEFINE DELPHI_16BIT}
+ {$DEFINE WIN16}
+ {$DEFINE 16BIT}
+ {$DEFINE CPU16}
+ {$ENDIF}
+
+ { defines for Delphi 2.0 }
+ {$IFDEF VER90}
+ {$DEFINE DELPHI}
+ {$DEFINE DELPHI2}
+ {$DEFINE DELPHI1UP}
+ {$DEFINE DELPHI2UP}
+ {$ENDIF}
+
+ { defines for C++Builder 1.0 }
+ {$IFDEF VER93}
+ {$DEFINE DELPHI1UP}
+ {$DEFINE DELPHI2UP}
+ {$DEFINE CBUILDER}
+ {$DEFINE CBUILDER1}
+ {$DEFINE CBUILDER1UP}
+ {$ENDIF}
+
+ { defines for Delphi 3.0 }
+ {$IFDEF VER100}
+ {$DEFINE DELPHI}
+ {$DEFINE DELPHI3}
+ {$DEFINE DELPHI1UP}
+ {$DEFINE DELPHI2UP}
+ {$DEFINE DELPHI3UP}
+ {$ENDIF}
+
+ { defines for C++Builder 3.0 }
+ {$IFDEF VER110}
+ {$DEFINE DELPHI1UP}
+ {$DEFINE DELPHI2UP}
+ {$DEFINE DELPHI3UP}
+ {$DEFINE CBUILDER}
+ {$DEFINE CBUILDER3}
+ {$DEFINE CBUILDER1UP}
+ {$DEFINE CBUILDER3UP}
+ {$ENDIF}
+
+ { defines for Delphi 4.0 }
+ {$IFDEF VER120}
+ {$DEFINE DELPHI}
+ {$DEFINE DELPHI4}
+ {$DEFINE DELPHI1UP}
+ {$DEFINE DELPHI2UP}
+ {$DEFINE DELPHI3UP}
+ {$DEFINE DELPHI4UP}
+ {$ENDIF}
+
+ { defines for C++Builder 4.0 }
+ {$IFDEF VER125}
+ {$DEFINE DELPHI1UP}
+ {$DEFINE DELPHI2UP}
+ {$DEFINE DELPHI3UP}
+ {$DEFINE DELPHI4UP}
+ {$DEFINE CBUILDER}
+ {$DEFINE CBUILDER4}
+ {$DEFINE CBUILDER1UP}
+ {$DEFINE CBUILDER3UP}
+ {$DEFINE CBUILDER4UP}
+ {$ENDIF}
+ { defines for Delphi 5.0 }
+ {$IFDEF VER130}
+ {$DEFINE DELPHI}
+ {$DEFINE DELPHI5}
+ {$DEFINE DELPHI1UP}
+ {$DEFINE DELPHI2UP}
+ {$DEFINE DELPHI3UP}
+ {$DEFINE DELPHI4UP}
+ {$DEFINE DELPHI5UP}
+ {$ENDIF}
+
+ { defines for C++Builder 5.0 }
+ {$IFDEF VER135}
+ {$DEFINE DELPHI1UP}
+ {$DEFINE DELPHI2UP}
+ {$DEFINE DELPHI3UP}
+ {$DEFINE DELPHI4UP}
+ {$DEFINE DELPHI5UP}
+ {$DEFINE CBUILDER}
+ {$DEFINE CBUILDER5}
+ {$DEFINE CBUILDER1UP}
+ {$DEFINE CBUILDER3UP}
+ {$DEFINE CBUILDER4UP}
+ {$DEFINE CBUILDER5UP}
+ {$ENDIF}
+
+ { defines for Delphi 6.0 }
+ {$IFDEF VER140}
+ {$DEFINE VER140UP}
+ {$DEFINE DELPHI}
+ {$DEFINE DELPHI6}
+ {$DEFINE DELPHI1UP}
+ {$DEFINE DELPHI2UP}
+ {$DEFINE DELPHI3UP}
+ {$DEFINE DELPHI4UP}
+ {$DEFINE DELPHI5UP}
+ {$DEFINE DELPHI6UP}
+ {$ENDIF}
+
+ { defines for Delphi 7.0 }
+ {$IFDEF VER150}
+ {$DEFINE VER140UP}
+ {$DEFINE DELPHI}
+ {$DEFINE DELPHI7}
+ {$DEFINE DELPHI1UP}
+ {$DEFINE DELPHI2UP}
+ {$DEFINE DELPHI3UP}
+ {$DEFINE DELPHI4UP}
+ {$DEFINE DELPHI5UP}
+ {$DEFINE DELPHI6UP}
+ {$DEFINE DELPHI7UP}
+ {$ENDIF}
+
+ { defines for Delphi 2005 }
+ {$IFDEF VER170}
+ {$DEFINE VER140UP}
+ {$DEFINE DELPHI}
+ {$DEFINE DELPHI9}
+ {$DEFINE DELPHI2005}
+ {$DEFINE DELPHI1UP}
+ {$DEFINE DELPHI2UP}
+ {$DEFINE DELPHI3UP}
+ {$DEFINE DELPHI4UP}
+ {$DEFINE DELPHI5UP}
+ {$DEFINE DELPHI6UP}
+ {$DEFINE DELPHI7UP}
+ {$DEFINE DELPHI9UP}
+ {$DEFINE DELPHI2005UP}
+ {$DEFINE BDS}
+ {$DEFINE BDS3}
+ {$DEFINE BDS3UP}
+ {$ENDIF}
+
+ { defines for Delphi 2006 }
+ {$IFDEF VER180}
+ {$DEFINE VER140UP}
+ {$DEFINE DELPHI}
+ {$DEFINE DELPHI10}
+ {$DEFINE DELPHI10A}
+ {$DEFINE DELPHI2006}
+ {$DEFINE DELPHI1UP}
+ {$DEFINE DELPHI2UP}
+ {$DEFINE DELPHI3UP}
+ {$DEFINE DELPHI4UP}
+ {$DEFINE DELPHI5UP}
+ {$DEFINE DELPHI6UP}
+ {$DEFINE DELPHI7UP}
+ {$DEFINE DELPHI9UP}
+ {$DEFINE DELPHI10UP}
+ {$DEFINE DELPHI2005UP}
+ {$DEFINE DELPHI2006UP}
+ {$DEFINE BDS}
+ {$DEFINE BDS4}
+ {$DEFINE BDS3UP}
+ {$DEFINE BDS4UP}
+ {$ENDIF}
+
+ { defines for Delphi 2007 }
+ {$IFDEF VER185}
+ {$UNDEF DELPHI10A} // declared in VER180
+ {$UNDEF DELPHI2006} // declared in VER180
+ {$UNDEF BDS4} // declared in VER180
+
+ {$DEFINE DELPHI10B}
+ {$DEFINE DELPHI10BUP}
+ {$DEFINE DELPHI11}
+ {$DEFINE DELPHI11UP}
+ {$DEFINE DELPHI2007}
+ {$DEFINE DELPHI2007UP}
+ {$DEFINE BDS5}
+ {$DEFINE BDS5UP}
+ {$ENDIF}
+
+ { defines for Delphi 2008 }
+ {$IFDEF VER200}
+ {$DEFINE VER140UP}
+ {$DEFINE DELPHI}
+
+ {$DEFINE DELPHI12}
+ {$DEFINE DELPHI1UP}
+ {$DEFINE DELPHI2UP}
+ {$DEFINE DELPHI3UP}
+ {$DEFINE DELPHI4UP}
+ {$DEFINE DELPHI5UP}
+ {$DEFINE DELPHI6UP}
+ {$DEFINE DELPHI7UP}
+ {$DEFINE DELPHI9UP}
+ {$DEFINE DELPHI10UP}
+ {$DEFINE DELPHI11UP}
+ {$DEFINE DELPHI12UP}
+
+ {$DEFINE DELPHI2008}
+ {$DEFINE DELPHI2005UP}
+ {$DEFINE DELPHI2006UP}
+ {$DEFINE DELPHI2007UP}
+ {$DEFINE DELPHI2008UP}
+
+ {$DEFINE BDS}
+ {$DEFINE BDS6}
+ {$DEFINE BDS3UP}
+ {$DEFINE BDS4UP}
+ {$DEFINE BDS5UP}
+ {$DEFINE BDS6UP}
+ {$DEFINE BDS6}
+ {$DEFINE BDS6UP}
+ {$ENDIF}
+
+ {$IFDEF WIN32}
+ {$DEFINE MSWINDOWS} //not automatically defined for Delphi 2 thru 5
+ {$DEFINE 32BIT}
+ {$DEFINE CPU32}
+ {$ENDIF}
+
+{$ENDIF MSWINDOWS}
+
+{ defines for "Delphi for .NET" }
+{$IFDEF CLR}
+ {$DEFINE DOTNET}
+{$ENDIF}
+
+{$IFDEF DELPHI}
+ {$IFDEF DELPHI2UP}
+ {$DEFINE DELPHI_32BIT}
+ {$ENDIF}
+{$ENDIF}
+
+{$IFDEF CBUILDER}
+ {$DEFINE CBUILDER_32BIT}
+{$ENDIF}
+
+{$IFNDEF FPC}
+
+ { Kylix 1.0 thru 3.0 }
+ {$IFDEF LINUX}
+
+ {$DEFINE VER140UP}
+
+ { Any Kylix }
+ {$DEFINE 32BIT}
+ {$DEFINE LINUX32}
+ {$DEFINE KYLIX_32BIT}
+ {$DEFINE KYLIX}
+ {$DEFINE KYLIX1UP}
+
+ {$IFDEF CONDITIONALEXPRESSIONS}
+ {$IF Declared(CompilerVersion)}
+
+ { Kylix 2.0 }
+ {$IF Declared(RTLVersion) and (RTLVersion = 14.1)}
+ {$DEFINE KYLIX2}
+ {$DEFINE KYLIX1UP}
+ {$DEFINE KYLIX2UP}
+ {$IFEND}
+
+ { Kylix 3.0 - Delphi portion }
+ {$IF Declared(RTLVersion) and (RTLVersion = 14.5)}
+ {$DEFINE KYLIX3}
+ {$DEFINE KYLIX1UP}
+ {$DEFINE KYLIX2UP}
+ {$DEFINE KYLIX3UP}
+ {$IFEND}
+
+ { Kylix 1.0 }
+ {$ELSE}
+ {$DEFINE KYLIX1}
+ {$IFEND}
+ {$ENDIF CONDITIONALEXPRESSIONS}
+
+ {$ENDIF LINUX}
+{$ENDIF}
+
+{ CPU }
+
+{$IFDEF FPC}
+ {$IFDEF MSWINDOWS}
+ {$IFDEF CPU64}
+ {$DEFINE WIN64}
+ {$ENDIF}
+ {$ENDIF}
+ {$IFDEF LINUX}
+ {$IFDEF CPU32}
+ {$DEFINE LINUX32}
+ {$ENDIF}
+ {$IFDEF CPU64}
+ {$DEFINE LINUX64}
+ {$ENDIF}
+ {$ENDIF}
+ {$IFDEF DARWIN}
+ {$IFDEF CPU32}
+ {$DEFINE DARWIN32}
+ {$ENDIF}
+ {$IFDEF CPU64}
+ {$DEFINE DARWIN64}
+ {$ENDIF}
+ {$ENDIF}
+{$ENDIF}
\ No newline at end of file
diff --git a/official/5.0.30.691/Everwood/Source/Delphi/uEWAbout.dfm b/official/5.0.30.691/Everwood/Source/Delphi/uEWAbout.dfm
new file mode 100644
index 0000000..532addc
--- /dev/null
+++ b/official/5.0.30.691/Everwood/Source/Delphi/uEWAbout.dfm
@@ -0,0 +1,4830 @@
+object AboutForm: TAboutForm
+ Left = 366
+ Top = 242
+ BorderIcons = []
+ BorderStyle = bsNone
+ Caption = 'About RemObjects SDK'
+ ClientHeight = 300
+ ClientWidth = 500
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWhite
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poMainFormCenter
+ OnClick = OnCloseClick
+ OnCreate = FormCreate
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Image1: TImage
+ Left = 0
+ Top = 0
+ Width = 500
+ Height = 300
+ AutoSize = True
+ Picture.Data = {
+ 07544269746D6170264E0200424D264E0200000000003604000028000000F401
+ 00002C0100000100080000000000F0490200C21E0000C21E0000000100000000
+ 000000000000000080000080000000808000800000008000800080800000C0C0
+ C000C0DCC000F0CAA600000000000B0B0B00151515001B1B1B00222222002B2B
+ 2B00333333003B3B3B00037F0100434343004B4B4B00535353005B5B5B006060
+ 60006A6A6A00727272007E7E7E000A81030017850800248A0D002C8D1000328E
+ 1200359014003B91160033921D003E9318003C96250037983200439419004996
+ 1B004D981C0053991E0044972300579B20005C9C2200539C2900449D3700629F
+ 24004FA03B0065A0250068A126006CA2280073A42A007AA72D007DA82E0067A3
+ 30006BA4310077A8360074AA3F007BAA3800429F40004DA244005BA5430062A7
+ 42006AAA450076AC44006FB15B0078B1540062AF600067B0620074B567007FB6
+ 61007DBA740080A92F0084AA31008BAC330087AE3C008BAF3D0091AE350094B0
+ 370095B038009BB23900A3B53C00A9B63E0083B24E008EB349009EB6450094B5
+ 4B009BB84E008CB5520085B5590090B95D00A2B74600AEB84000A3B94B00A8B9
+ 4800B3BA4200BABC4500A4BB5400B1BF560082BA6C009ABC610082BC760091BE
+ 7100C0BE4700C1BF4800ACC05E00B4C05700BEC15100B1C25F009AC27600AFC3
+ 6900BBC56500A3C57800BBCA7700BECB7800C4C04800CBC24B00D2C44D00D6C6
+ 5000D8C75000DCC85200E2CA5400E8CC5600ECCD5800F0CF5900F4D05B00F8D1
+ 5C00CDCB6A00D6CB6400D3CD6C00CBCD7300C4CD7B00DAD27800E8CF6000E4D0
+ 6900EDD36C00F4D36500F8D46600E3D27200EBD57500E3D57C00FAD87100FAD9
+ 7A00828282008D8D8D00929292009D9D9D0081BF8000A3A3A300ABABAB00B4B4
+ B400BEBEBE0088C1830096C6890098C99200A6C98400BDCD8200BFD18D00A1CE
+ 9C00ACD09A00BBD29500B8D49E00A9D1A200B3D5A600B8D7A800BED8AA00BFDF
+ BF00C1D28D00D3D58B00C0D49700CDD59200C4D59800CCD89C00D4DB9F00F4DA
+ 8200F8DC8400F0DC8B00E3DA9000ECDD9400F0DF9500ECE09E00F5E09700FAE2
+ 9800C2D7A200C1D9AB00C8DCAE00D6DCA000DADCA100D3DDA800D8DFAA00C0DE
+ BC00D0DFB100DEE0AC00CEE1BA00D3E0B200D9E1B400D6E3BD00E9E2A600F5E6
+ AB00F9E7AC00FBE8AD00ECE5B200F5E8B500FBEBB700F3EABE00FCEBB800C4C4
+ C400CDCDCD00C1DFC000D4D4D400DCDCDC00C7E1C200D7E6C800D1E7D000D3E8
+ D000DBEAD300E2E7C200E4EBCC00E9ECCE00F7ECC000FBEDC100F2EDC800FDF0
+ CC00E1ECD500ECEDD000F0EFD100EEF0DA00F4F0D300FAF2D500F5F3DD00F8F4
+ DE00E3E3E300EDEDED00E4F0E000EBF2E300F2F5E600FDF6E000F0F7EF00FCF8
+ E900F1F2F100F4F8F000FBFAF300FFFFFF000000000000000000F0FBFF00A4A0
+ A000808080000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFF
+ FF00000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000010161717150E0E0E0E0E0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0E0E0E0E0E11
+ 1717171717171717141311100E0C0B000000000B1617171717150E0E0E0E0E0E
+ 0E0C0D0D0C0D0D0C0D0D0C0D0C0D0C0D0C0D0C0D0C0D0C0C0C0C0C0C0C0C0C0C
+ 0C0C0D0E0E0E0E10171717170C00000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000013
+ 171717150E0F0E0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0E0E0F0E0E0E161717171717171717171717
+ 1717171713110F1417171717150F0E0F0E0F0E0E0C0D0D0D0D0D0D0D0C0D0D0C
+ 0D0C0D0C0D0C0D0C0D0C0D0D0C0D0C0D0C0D0C0D0C0D0D0E0F0E0E1317171717
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000D0B0000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000013171717140E0E0F0E0E0D0E0D
+ 0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0D0D0D
+ 0D0D0D0E0E0F0E0E111717171717171717171717171717171717171717171716
+ 0F0E0F0E0E0E0E0D0D0C0D0D0C0D0D0D0D0C0D0C0D0D0C0D0D0C0D0D0C0D0C0D
+ 0C0D0C0D0C0D0C0D0C0C0D0E0E0F0E1317171714000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000000000000000000F17160F0B00
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000015171717130E0E0E0E0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0E0E0E0F0E0E161617
+ 17171717171717171717171717171717171716100E0E0E0E0F0D0D0D0D0D0C0D
+ 0D0D0C0D0D0D0D0C0D0C0D0C0D0D0C0D0D0C0D0C0D0C0D0C0D0C0D0C0D0C0E0E
+ 0E0E0E1517171713000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000001117171717160F0B0000000000000000000000
+ 0000000000000000000000000000000000000000000000000000001717171713
+ 0E0F0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0E0E0E0E0F0E0E10101010131314151617171717
+ 171717171717100E0F0E0F0E0E0D0D0D0C0D0D0D0C0D0D0D0C0D0D0C0D0D0C0D
+ 0C0D0C0D0C0D0C0D0C0C0C0C0C0C0C0C0D0C0E0E0F0E0E161717171000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000000000000000000000B
+ 1117171717171717160F0B000000000000000000000000000000000000000000
+ 00000000000000000000000000000017171717100E0E0F0E0E0D0E0D0E0D0E0D
+ 0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0D0D0D0D0D0D0D0D
+ 0E0E0F0E0E0E0F0E0E0E0F0E0E0E0E0E0E0F10131415171717110E0E0E0E0E0E
+ 0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0C0D0D0C0D0D0C0D0D0C0D0C0D0C0D0C
+ 0D0C0D0C0C0D0E0E0E0F0E171717170E00000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000B1417171717171717171717160F
+ 0B00000000000000000000000000000000000000000000000000000000000000
+ 00000C17171717100E0F0E0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0E0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0E0E0E0F0E0E0E0F0E0E0E
+ 0F0E0F0E0F0E0E0E0F0E0E10100E0F0E0F0E0E0D0D0D0D0C0D0D0D0D0C0D0D0D
+ 0C0D0D0C0D0C0D0D0C0D0D0C0D0D0C0D0C0D0C0D0C0D0C0D0C0C0E0F0E0E1017
+ 1717170C00000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000C1516171717171617171717171717160F0B000000000000000000
+ 000000000000000000000000000000000000000000000C171717170F0E0E0E0F
+ 0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0D0D0D0D0D0D0D0D0D0E0D0D0D
+ 0D0D0D0D0D0D0D0D0D0E0E0E0E0F0E0E0E0F0E0E0E0F0E0E0E0F0E0E0E0E0F0E
+ 0E0E0E0E0E0E0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0D0C0D0D0C0D0C0D0C0D0C
+ 0D0C0D0C0D0C0D0C0D0C0D0C0D0D0E0E0E0F1116171717000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000C15171717171711
+ 0E111517171717171717160F0B00000000000000000000000000000000000000
+ 000000000000000000000E171717170E0F0E0E0E0E0D0E0D0E0D0E0D0E0D0E0D
+ 0E0D0E0D0D0D0D0E0D0E0D0E0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0E0E
+ 0E0E0E0F0E0E0F0E0E0E0E0F0E0E0F0E0F0E0E0E0F0E0F0E0E0E0C0D0D0D0D0C
+ 0D0D0D0C0D0D0D0D0C0D0D0C0D0D0C0D0D0C0D0D0C0D0C0D0C0C0C0C0C0C0C0D
+ 0C0D0F0E0E0E1317171715000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000C151717171717110E0E0F0E111517171717171717
+ 150E000000000000000000000000000000000000000000000000000000001016
+ 1717170E0E0F0E0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0E0D0E0D0D0D0D0D0D
+ 0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0E0D0E0E0E
+ 0E0E0E0E0E0E0F0E0E0E0E0F0D0D0D0D0C0D0D0D0D0C0D0D0D0C0D0D0D0D0C0D
+ 0C0D0C0D0C0D0C0D0C0D0D0C0D0C0D0C0D0C0D0C0D0D0E0F0E0E151717171300
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000E16
+ 17171717160F0F0E0E0E0E0E0F101617171717171717150E0000000000000000
+ 00000000000000000000000000000000000010171717150E0E0E0E0E0E0D0E0D
+ 0E0D0E0D0E0D0E0D0E0D0E0D0D0D0D0D0D0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0E0E0E0E0E0F0E0E0D
+ 0D0D0C0D0D0D0C0D0D0D0D0C0D0D0D0C0D0D0C0D0D0C0D0D0C0D0D0C0D0C0D0C
+ 0D0C0D0C0D0C0C0C0C0E0E0E0F0E161617171000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000E171717171716100E0E0F0E0F0E0E
+ 0E0F0E111517171717171717150E000000000000000000000000000000000000
+ 000000000B1016171717140F0E0F0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D
+ 0E0D0D0E0D0E0D0E0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0E0E0D0C0D0D0D0C0D0D0D0C0D0D0D
+ 0D0C0D0D0D0D0C0D0C0D0C0D0D0C0D0D0C0D0C0C0C0D0C0D0C0D0C0D0C0E0F0E
+ 0E0E171717170F00000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000E1717171717150F0E0E0F0E0E0E0F0E0E0E0E0E0F13161717171717
+ 1717150E0000000000000000000000000000000000000B10171717171717130E
+ 0E0E0E0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D0E0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0C0D0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0D0C0D0D0C0D
+ 0C0D0C0D0D0C0D0D0C0C0C0C0C0D0C0D0C0E0E0E0F10171717170C0000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000000000000E1717171717150F0E
+ 0F0E0E0E0F0E0E0F0E0F0E0E0E0E0F111617171717171717150E000000000000
+ 00000000000000000B0F1617171717171717130E0F0E0E0E0D0E0D0E0D0E0D0E
+ 0D0E0D0E0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C
+ 0D0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0C0D0D0C0D0D0C0D0C0D0C0C0D0C0D0C
+ 0D0C0D0C0D0F0E0E0E10171717170B0000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000E1717171717150F0E0E0E0E0F0E0E0E0E0E0E0E0F0E
+ 0F0E0E0F0E131617171717171717150E00000000000000000000000F15171717
+ 1717171716100F0E0E0F0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0E
+ 0D0E0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0D0C0D
+ 0D0D0C0D0C0D0C0D0C0D0D0C0D0D0D0C0D0C0D0C0C0C0C0C0D0E0F0E0F131617
+ 1716000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000000000000000000000000C1717
+ 171717150F0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0F0E0E0E0F1116171717
+ 17171717130C000000000000000C151717171717171716100F0E0E0E0F0E0E0D
+ 0E0D0D0D0D0D0D0D0D0D0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0D0C0D0D0C0D0C0D0D0C0D0C0D
+ 0C0D0C0D0C0D0C0D0C0D0C0D0D0E0E0E0E141717171300000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000C1517171717150F0E0E0E0E0F0E0E0E
+ 0E0E0E0D0E0E0E0E0F0E0E0E0F0E0E0E0F131617171717171717130C0000000B
+ 131717171717171716100F0E0E0E0F0E0E0E0F0D0D0E0D0E0D0E0D0E0D0E0D0E
+ 0D0D0E0D0D0D0D0D0D0D0D0E0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D
+ 0D0C0D0D0D0D0C0D0D0C0D0D0C0D0C0D0D0C0D0D0C0D0C0C0C0C0C0D0C0D0C0D
+ 0E0E0F0E0E151717171100000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000C1517171717150F0E0E0F0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0F0E
+ 0E0E0F0E0E0E0F111617171717171717130C0F1517171717171716100F0E0E0E
+ 0F0E0E0E0F0E0E0D0E0D0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0E0D0E0D0E0D0D
+ 0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0C0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0D0D0C0D0C
+ 0D0D0C0D0C0D0C0D0D0C0D0D0C0D0C0C0D0C0D0C0E0E0E0F0E17171717100000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000B1617171717150F0E0E
+ 0E0E0F0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E0E0E0F0E0E0E0F0E0E0E0F131717
+ 17171717171717171717171716130E0E0E0E0F0E0E0E0F0E0E0D0D0E0D0D0E0D
+ 0D0D0D0D0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0E0D0D0D0E0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0C0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0C0D0D0C0D0D0C0D0C0D0C0D
+ 0C0D0C0D0C0C0C0C0E0F0E0E0F171717170C0000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000B1417171717150F0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0D0E0E0E0E0E0D0E0E0F0E0E0E0F0E0E0F0F13171717171717171717171714
+ 0E0E0F0E0F0E0E0E0F0E0E0D0D0E0D0D0E0D0D0E0D0E0D0E0D0E0D0D0E0D0D0E
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0D0C
+ 0D0D0D0C0D0D0C0D0C0D0C0D0C0D0D0C0D0D0C0C0D0C0D0C0D0C0D0D0E0E0E0F
+ 10161717170B0000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000141717
+ 171716100E0E0E0E0F0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E0E0E0E0E0E0E
+ 0E0F0E0E0E0E0E0F0F131717171717171715100E0F0E0E0E0E0E0F0E0E0D0E0D
+ 0E0D0D0E0D0D0E0D0D0E0D0E0D0D0E0D0D0E0D0D0D0D0E0D0E0D0D0D0E0D0D0E
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0C0D0D0C
+ 0D0C0D0D0C0D0D0C0C0D0C0C0D0C0C0D0F0E0E0E131717171700000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000001117171717160F0E0F0E0F0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0E0E0F0E0F0E0E0E0F0F13
+ 17171716130E0E0F0E0E0F0E0F0E0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D
+ 0E0D0D0E0D0D0E0D0E0D0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D
+ 0D0D0C0D0D0D0D0C0D0D0D0C0D0D0C0D0D0C0D0D0C0D0C0D0C0D0C0D0C0C0D0C
+ 0C0D0C0D0E0F0E0E141717171300000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000101617171717100E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E
+ 0D0E0E0E0E0E0E0D0E0E0E0E0E0E0E0F0E0E0E0F0F13150F0E0F0E0E0E0F0E0E
+ 0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0E0D0D0E0D0D0E0D0D0D0D0D0D
+ 0E0D0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D
+ 0D0C0D0C0D0C0D0C0D0D0C0D0D0C0C0D0C0D0C0D0C0D0C0E0E0E0F0E15171717
+ 1300000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000E1717171717110E0E0E
+ 0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0D0E0E0D0E0E
+ 0E0E0E0E0F0E0E0E0E0F0E0E0E0E0E0F0E0E0E0E0D0E0D0E0D0E0D0E0D0E0D0D
+ 0E0D0D0E0D0E0D0D0E0D0D0E0D0D0E0D0E0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0C0D0D0C0D0D0C0D0D0C
+ 0D0D0C0D0C0C0C0D0C0D0C0E0E0F0E0E17171717100000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000C1517171717130E0F0E0F0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0D0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0E0E0E0F0E0F0E0E0E0F
+ 0E0F0E0E0E0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0D0D0E0D0D0E0D0D
+ 0E0D0D0E0D0D0D0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D
+ 0C0D0D0D0C0D0D0D0D0C0D0C0D0D0C0D0C0D0C0D0C0D0C0C0D0C0D0C0D0C0D0E
+ 0E0E0E0F171717170D0000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000000000000000B151717
+ 1717140E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E
+ 0E0E0E0D0E0E0D0E0E0D0E0E0E0E0E0E0E0F0E0E0E0E0E0E0D0E0D0E0D0E0D0E
+ 0D0E0D0E0D0E0D0D0E0D0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0E0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D
+ 0C0D0C0D0D0C0D0D0C0D0C0D0C0D0C0C0C0C0C0F0E0F0E10171717170C000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000001317171717150F0E0E0E0F0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E
+ 0D0E0E0E0E0E0F0E0F0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D0D0E0D0E
+ 0D0D0E0D0D0E0D0D0E0D0D0E0D0E0D0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0C0D0D0C0D0C0D0C0D0D0C0D0C
+ 0D0C0D0C0D0C0D0E0E0E0E11171717170B000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000001017171717160F0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0D0E0E0E0E0E0D0E0E0E0E0D0E0E0D0E0E0D0E0E0E0D0E0E0E0E0E0E0E0E0D0E
+ 0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0D0E0D0D0E0D0D0E0D0D0E0D0D
+ 0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D
+ 0D0D0C0D0D0C0D0D0C0D0D0C0D0D0C0D0C0D0C0C0C0C0D0C0D0C0D0F0E0F0E13
+ 17171717140B0000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000C1717171717100E0F0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E0E0E0E0E0D0E0E
+ 0D0E0E0D0E0E0D0E0D0E0E0D0E0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E
+ 0D0D0E0D0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0E0D0D0E0D0D0E0D0D
+ 0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0D0C0D0C0D0C0D0C
+ 0D0C0D0D0C0D0C0D0C0D0C0D0C0D0E0E0E0E0F131717171717160B0000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000B1517171717130E0E0E0E0F0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0E0D0E0E0D0E0E0D0E0E0E0D0E0E
+ 0D0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D
+ 0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D
+ 0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0C0D0D0C0D0C0D0D0C0D0C0D0C0C0C
+ 0C0C0E0E0F0E0E0E131717171717160D00000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000131717
+ 1717140E0F0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D
+ 0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0E0D0E0E0E0D0E0D0E0D0E0D0E0D
+ 0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0E
+ 0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D
+ 0C0D0C0D0C0D0C0D0D0C0D0C0D0D0C0D0C0D0C0D0C0D0E0E0E0E0F0E0E101617
+ 171717170E000000000000000000000000000000000000000000000000000000
+ 00000000000000000C0E110E0000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000F17171717160E0F0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0E0D0E0E0D0E
+ 0E0D0E0E0E0D0E0E0D0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D
+ 0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0E0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0C0D0C0D0D0C0D
+ 0C0D0C0C0C0D0C0D0C0C0C0E0E0F0E0E0F0E0F1617171717170E000000000000
+ 00000000000000000000000000000000000000000000000B0D0F141617171716
+ 0B00000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000C17171717150E0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0D0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0E0D0E0E0E0D
+ 0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E
+ 0D0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D
+ 0C0D0D0D0C0D0D0D0C0D0D0C0D0D0C0D0C0D0D0C0D0C0D0C0D0C0D0C0D0C0D0C
+ 0E0E0E0E0E0E0F0F1517171717170E0000000000000000000000000000000000
+ 000000000000000C0F1315161717171717171717130000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000000001317171717110E
+ 0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E
+ 0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E
+ 0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D
+ 0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0C0D0C
+ 0D0C0D0D0C0D0C0D0D0C0D0C0C0C0C0C0D0C0C0D0C0D0E0F0E0E0E0E0F151717
+ 171717110000000000000000000000000000000000000C0E1014171717171717
+ 1717171717171717171000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000B17171717160F0E0E0F0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E
+ 0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D0D0E0D0D
+ 0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0C0D0C0D0D0C0D0C0D0D0C0D
+ 0C0D0C0D0C0D0C0C0C0D0D0E0E0F0E0E0E0F1417171717171100000000000000
+ 00000000000B0D0F141517171717171717171717171717171717171717170C00
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00001016171717130E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0D0E0E0E0E0E0D0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E
+ 0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D
+ 0D0D0D0D0D0D0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D
+ 0D0D0C0D0D0D0C0D0D0C0D0C0D0D0C0D0C0D0C0D0C0D0C0C0C0D0C0D0C0C0C0D
+ 0E0E0F0E0E0E0F1317171717170E000000000000000C0F131516171717171717
+ 1717171717171717171615131013171717171400000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000B15161717170F0F0E0F
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E0E0E0E0E0D0E0E
+ 0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D
+ 0E0D0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0E0D0D0E0D0D0E0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0C0D0C0D0D0C
+ 0D0C0D0D0C0D0C0C0D0C0D0C0D0C0D0C0D0C0D0C0C0E0E0F0E0E0E0F13171717
+ 17170E000C0E101417171717171717171717171717171717171513110F0E0E0E
+ 0E0E151717171710000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000E17171717150E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E
+ 0E0D0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0E0D0D0E0D0D0E0D0D
+ 0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D
+ 0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0C0D0D0C0D0C0D0D0C0D0C0C0C0D0C
+ 0C0D0C0D0C0D0C0D0C0C0E0E0E0F0E0E0E141717171717161717171717171717
+ 1717171717171717151411100E0E0E0F0E0F0E0F0E0E0F16171717170B000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 1317171717100E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D
+ 0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D
+ 0E0D0E0D0E0D0E0D0E0D0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0E0D0D
+ 0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D
+ 0C0D0D0C0D0C0D0C0D0D0C0D0C0D0C0D0C0D0C0D0C0C0C0C0D0C0C0C0D0C0C0E
+ 0E0E0E0F0E0E1417171717171717171717171717171717171413100F0E0F0E0E
+ 0F0E0E0E0E0E0E0E0F0E0E111717171713000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000000C16171717160E0E0F0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0D0E0E0D0E0E
+ 0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D
+ 0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0E0D0D0E0D0D0E0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0C0D0C0D0D0C0D0C0D0D0C
+ 0D0C0D0C0D0C0C0D0C0D0C0D0C0D0C0D0C0D0C0D0E0E0E0E0F0E0E1517171717
+ 17171717171717151410100E0E0F0E0E0E0E0E0F0E0E0F0E0F0E0F0E0E0E0F0E
+ 15171717170E0000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000001117171717130E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0D0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D
+ 0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E
+ 0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D
+ 0C0D0D0D0C0D0D0D0D0C0D0D0C0D0D0C0D0C0D0C0D0D0C0D0C0D0C0D0C0D0C0C
+ 0C0D0C0C0D0C0D0C0D0E0E0E0E0E0F0E151717171717161413100E0E0E0F0E0E
+ 0E0E0E0F0E0F0E0E0E0F0E0E0E0E0E0E0E0E0E0E101617171716000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000000000000000000000000B1517
+ 1717160F0E0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E0E0E0E0D0E
+ 0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0E0D0E0D0E0D0E0D0E0D0E0D
+ 0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0E0D0D0E0D
+ 0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D
+ 0C0D0C0D0D0C0D0D0C0D0C0C0C0C0D0C0D0C0D0C0D0C0D0C0C0D0C0C0C0D0E0E
+ 0F0E0E0E0F151413100F0E0E0E0E0E0F0E0E0E0F0E0F0E0E0E0E0E0F0E0E0D0D
+ 0C0C0C0D0E0F0E0E0E1317171717110000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000001016171717140E0F0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E
+ 0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0E0D0D
+ 0E0D0D0E0D0D0E0D0D0E0D0D0D0E0D0D0D0D0D0D0D0D0D0E0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0C0D0D0C0D0C0D0D0C0D0C0D0C0D
+ 0C0D0C0C0C0C0D0C0C0C0D0C0D0C0D0C0D0C0D0D0E0E0F0E0E0E0F0E0E0F0E0F
+ 0E0F0E0E0E0F0E0E0E0E0E0F0E0D0D0C0C0C0C0C0C0C0C0C0E0E0E0F0E0F1517
+ 1717170C00000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000015171717170F0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0D0E0E0E0E0E0D0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E
+ 0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D0D0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D
+ 0D0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D
+ 0D0D0C0D0D0C0D0C0D0D0C0D0C0D0C0D0D0C0D0C0D0C0D0C0D0C0C0D0C0D0C0D
+ 0C0C0D0C0C0C0D0C0E0E0E0E0F0E0E0E0F0E0E0E0E0E0E0F0E0E0E0E0E0D0D0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0E0E0E0E0E1017171717130000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000C17171717
+ 150E0E0E0E0F0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0E0E0D0E0E0D
+ 0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D
+ 0E0D0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0C0D0C0D0D
+ 0C0D0D0C0D0C0C0D0C0C0D0C0D0C0D0C0D0C0D0C0D0C0C0D0C0D0C0C0C0E0E0F
+ 0E0E0F0E0E0E0F0E0F0E0E0E0D0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0D0F0E0F0E0E14171717170E00000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000001317171717110E0F0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E
+ 0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0E0D0D0E0D0D0E0D
+ 0D0E0D0D0E0D0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0D0C0D
+ 0D0D0C0D0D0D0C0D0D0D0C0D0D0C0D0D0C0D0C0D0D0C0D0C0D0D0C0C0D0C0C0D
+ 0C0D0C0D0C0C0C0C0C0D0C0D0C0C0D0C0C0C0E0E0E0F0E0E0F0E0E0D0D0D0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0E0E0E0E0F0F17171717
+ 1500000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000B17171717160E0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E
+ 0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D
+ 0E0D0E0D0E0D0E0D0E0D0D0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D
+ 0C0D0C0D0D0C0D0C0D0C0D0D0C0D0C0D0C0D0C0C0D0C0C0C0D0C0D0C0D0C0D0C
+ 0D0C0C0D0C0C0C0E0E0E0E0D0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0F0E0E0E0E13171717170F00000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000000001016171717130E
+ 0F0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E0E0E0E0E0E0D0E0E0D0E0E
+ 0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D0E
+ 0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0E0D0D0E0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0C0D0D0D0C0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0C0D0C0D0D0C0D0D0C0D0C
+ 0D0D0C0C0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0C0D0C0D0C0C0D0C0D0C0C0C0C
+ 0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0D
+ 0F0E0F0E0F161717171600000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000B15171717160F0E0E0F0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D
+ 0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D0D0E0D0D0E0D0D0E0D0D
+ 0E0D0D0E0D0D0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0D
+ 0C0D0D0D0C0D0D0D0C0D0D0C0D0C0D0C0D0D0C0D0C0D0C0D0C0D0C0C0C0D0C0C
+ 0D0C0D0C0C0C0D0C0D0C0C0C0C0C0C0C0C0C0D0C0D0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0E0E0E0E0E11171717171000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000E17171717140F0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E0E0E0E
+ 0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0E0D0E0D0E0D0E0D0E0D0E0D
+ 0E0D0E0D0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0E0D0D0E0D0D0D
+ 0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0D0C0D0D0C0D0D
+ 0C0D0D0C0D0C0D0D0C0D0C0D0C0C0D0C0D0C0D0C0C0C0C0D0C0D0C0D0C0D0C0D
+ 0C0D0C0D0C0C0C0C0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0D0F0E0F0E0E16171717150B000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000000000001417171717100E0F0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E
+ 0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0D0D0E0D
+ 0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0E0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C
+ 0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0D0C0D0C0D0D0C0D0D0C0D0C0D0D0C0D0C
+ 0D0C0D0C0C0C0D0C0D0C0D0C0D0C0C0C0C0C0C0C0C0C0C0C0D0C0C0C0C0C0C0D
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0E0E0E
+ 0F0E111717171711000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000C17171717150E0E0F0E0E0E0E0E0E0E0E0E0D0E0E
+ 0E0E0E0D0E0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E
+ 0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E
+ 0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D
+ 0D0D0C0D0D0C0D0C0D0C0D0C0D0D0C0D0C0D0C0C0D0C0C0D0C0D0C0D0C0D0C0D
+ 0C0D0C0D0C0D0C0C0C0C0C0C0C0C0D0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0D0E0E0E0E0E16161717170B000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 1117171717110F0E0E0F0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0D0E0E
+ 0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D
+ 0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0E0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0C0D0D0C0D
+ 0C0D0D0C0D0C0D0C0C0D0C0D0C0C0D0C0D0C0C0C0C0D0C0D0C0C0D0C0D0C0D0C
+ 0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0E0F0E0F0E111717171710000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000000B16171717160F0E0E0E0E0E
+ 0E0E0E0E0E0D0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D
+ 0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0D0D0E0D0D0E0D0D
+ 0E0D0D0E0D0D0E0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D
+ 0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0C0D0C0D0D0C0D0C0D0C0C0D0C0D0C0C
+ 0D0C0C0C0C0D0C0D0C0C0D0C0D0C0C0C0C0C0C0C0C0C0D0C0D0C0D0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0D0E0E0E0E0E
+ 1616171716000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000001016171717130E0F0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E
+ 0E0D0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E
+ 0D0E0D0E0D0E0D0D0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D
+ 0D0D0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C
+ 0D0C0D0C0D0D0C0D0C0D0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0C0C
+ 0D0C0D0C0D0C0C0C0C0C0C0C0C0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0E0E0F0E0E111717171710000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000001517
+ 1717170F0E0F0E0E0E0E0E0E0E0D0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E
+ 0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E
+ 0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0C0D0C0D0C0D0C0D0D
+ 0C0D0C0D0C0C0D0C0D0C0D0C0C0D0C0D0C0D0C0D0C0D0C0C0C0C0D0C0D0C0C0C
+ 0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0D0E0E0F0E0E1616171716000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000D17171717150E0E0F0E0E0E0E0E
+ 0E0E0E0D0E0E0E0E0E0D0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E
+ 0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D
+ 0D0E0D0D0D0D0D0D0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C
+ 0D0D0D0C0D0D0D0C0D0D0C0D0D0C0D0D0C0D0C0D0D0C0C0C0D0C0C0D0C0D0C0D
+ 0C0C0C0C0D0C0D0C0C0C0C0C0D0C0C0C0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0E0E0E0E0F101717
+ 17170E0000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000001317171717100F0E0E0F0E0E0E0D0E0E0E0E0E0D0E0E0E0E0E
+ 0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E
+ 0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D
+ 0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0C0D0D0C
+ 0D0D0C0D0D0C0D0C0D0C0D0C0C0D0C0C0C0C0C0D0C0D0C0D0C0D0C0D0C0D0C0C
+ 0C0C0D0C0D0C0C0C0D0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0D0E0F0E0E0E1617171715000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000C16171717
+ 160E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0E0D0E0E0D0E0E0D0E0E0D
+ 0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0E0D0D0E0D0D0E0D0D0E
+ 0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C
+ 0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0D0C0D0C0D0C0D0C0D0C0D0D0C0D0C0D0C
+ 0D0C0D0C0D0C0D0C0D0C0D0C0C0C0C0D0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0E0E0E0F0E13171717170D0000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000001017171717130E0F0E0E0E0E0E0E0E0E
+ 0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D
+ 0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D
+ 0D0E0D0D0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D
+ 0D0C0D0D0D0C0D0D0C0D0D0C0D0C0D0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D
+ 0C0D0C0C0D0C0C0C0D0C0C0C0C0D0C0C0D0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0D0E0E0E0E0F1617171713
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000B15171717160F0E0F0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E
+ 0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D
+ 0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0E0D0D0E0D0D0D0E0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0C0D0C0D0C0D0D
+ 0C0D0C0D0C0C0D0C0C0C0D0C0D0C0C0C0C0C0C0D0C0D0C0D0C0D0C0C0C0C0D0C
+ 0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0E0F0E0E0E14171717170B0000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000000001117171717110E
+ 0E0F0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D
+ 0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E
+ 0D0D0E0D0D0E0D0E0D0D0D0D0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D
+ 0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0C0D0C0D0D0C0D0D0D0C0C0D0C0D0C0C
+ 0C0D0C0D0C0D0C0C0D0C0D0C0D0C0D0C0D0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0D0E
+ 0F0E0E0F17171717100000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000B15171717160F0E0E0E0E0E0E0E0E0D0E0E0E0E
+ 0E0D0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D
+ 0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D
+ 0E0D0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C
+ 0D0D0C0D0D0C0D0C0D0D0C0D0C0D0C0D0C0C0D0C0D0C0D0C0D0C0D0C0C0D0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0D0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0E0E0F0E0E1517171716000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 1017171717110E0F0E0F0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E
+ 0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D0D
+ 0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0E0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0C0D0C0D0C0D0D0C0D0C0D0C
+ 0D0C0D0C0D0C0D0C0C0D0C0D0C0D0C0D0C0C0D0C0D0C0C0C0C0D0C0D0C0D0C0C
+ 0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0E0E0E0E0F10171717170E0000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000B15171717160E0E0E0F0E0E0E
+ 0E0E0D0E0E0E0E0E0D0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D
+ 0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D
+ 0D0E0D0E0D0D0E0D0D0D0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C
+ 0D0D0D0C0D0D0D0D0C0D0D0C0D0C0D0D0C0D0D0C0D0C0C0C0D0C0C0D0C0C0C0C
+ 0C0C0D0C0D0C0D0C0D0C0D0C0C0C0C0C0C0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0E0F0E0F0E0E
+ 0F16171717140000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000001017171717110E0F0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E
+ 0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E
+ 0D0E0D0E0D0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0E0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D
+ 0C0D0C0D0C0D0C0D0D0C0D0C0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0C
+ 0C0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0E0E0E0E0E0E0F151717171716000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000000000000000000B1517171716
+ 0E0E0E0E0F0E0E0D0E0E0E0E0E0D0E0E0E0E0E0E0D0E0E0D0E0D0E0E0D0E0E0D
+ 0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0E0D0D0E0D0D
+ 0E0D0D0E0D0D0E0D0D0E0D0E0D0D0D0D0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C
+ 0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0C0D0C0D0D0C0D0D0C0D0C0D0C0D0C
+ 0D0C0D0C0D0C0D0C0D0C0C0C0D0C0C0C0D0C0C0D0C0D0C0C0C0D0C0D0C0D0E15
+ 1415141514151415110C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0E0E0F0E0F0E0F1517171717150C000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000001017171717110E0F0E0E0E0E0E0E0E0E0D0E
+ 0E0E0E0E0D0E0E0E0E0D0E0E0E0D0E0E0D0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D
+ 0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D
+ 0D0E0D0D0D0D0D0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D
+ 0D0C0D0D0D0C0D0D0C0D0D0C0D0D0C0D0D0C0D0C0C0D0C0D0C0D0C0D0C0D0C0D
+ 0C0D0C0D0C0D0C0C0C0E151A9197CFE8F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3
+ CFCF939114130C0C0C0C0C0C0C0C0C0C0C0C0C0E0E0F0E0E0E0F151717171716
+ 0B00000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000015171717160E0E0E0F0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D
+ 0E0E0D0E0E0E0D0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E
+ 0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0E0D0D0D0E0D0D0E0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0C0D0C0D0C0D
+ 0C0D0D0C0D0C0C0D0C0C0C0C0C0C0C0C0C0D0C0C0C0D0C0C0E1791CFF0F3F3F3
+ F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3D29518130C
+ 0C0C0C0C0C0C0E0E0F0E0E0F0E1517171717160C000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000E17171717110E0F0E0E0E
+ 0E0E0E0E0E0D0E0E0E0E0D0E0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E
+ 0D0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D
+ 0E0D0D0E0D0D0D0D0D0E0D0D0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D
+ 0D0C0D0D0D0C0D0D0D0C0D0D0C0D0C0D0D0C0D0D0C0D0C0D0C0D0C0D0C0D0C0D
+ 0C0D0C0D0C0C0D0C0F1693D2F3F3F3F3F3F3F3F3F3F0CFCF9091901614141414
+ 141414131990909507D2F3F3F3F3F3F3F3F3F3F0971A130C0C0E0E0F0E0E0E0F
+ 1517171717160B00000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000014171717160F0E0E0E0F0E0E0E0E0D0E0E0E0E0D0E0E0E
+ 0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E
+ 0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0E
+ 0D0D0E0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0D
+ 0C0D0D0C0D0C0D0C0D0C0D0D0C0D0C0D0C0D0C0D0C0D0C0D0C101ACFF3F3F3F3
+ F3F3F3E8CF9116140C0C0C0C0C0B0C0B0C0B0B0B0B0B0B0B0B0B0B0B0B0B0B0F
+ 131995D0F3F3F3F3F3F3F3E893180E0E0E0F0E1517171717160C000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000000000000000C171717
+ 17130E0F0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D
+ 0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D0D0E
+ 0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0E0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0C0D0C0D0D0C0D0D0C0D0C0D
+ 0D0C0D0C0D0C0D0C0D0C0F1AD2F3F3F3F3F3F3D29316100C0C0C0C0C0C0C0C0C
+ 0C0C0B0C0C0B0C0B0C0B0C0B0B0B0B0B0B0B0B0B0B0B0B000B139097E9F3F3F3
+ F3F3F096140F1517171717160B00000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000011171717170F0E0E0F0E0E0E0E0E0E0E
+ 0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E
+ 0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D
+ 0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C
+ 0D0D0D0C0D0D0D0C0D0C0D0C0D0D0C0D0D0C0D0C0D0C0C0C0C0C0C0C1797F3F3
+ F3F3F3F096180F0C0D0C0C0D0C0C0C0C0C0C0C0C0C0B0C0C0B0C0C0B0C0B0B0C
+ 0B0B0B0B0B0B0B0B0B0B0B0B000B0B000B1392D0F3F3F3F3F3E995181717150C
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000B0C0E17171717140E0F0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E0E0E0E0E
+ 0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E
+ 0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0E0D0D
+ 0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0C0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0C0D0D0C
+ 0D0C0D0C0D0D0C0D0C0D0C0D0C0F91E8F3F3F3F3E996170D0D0D0D0D0D0D0C0C
+ 0D0C0C0C0C0C0C0C0C0C0C0C0B0C0B0C0B0C0B0B0C0B0B0B0B0B0B0B0B0B0B0B
+ 0B000B0B000B00000E19D0F3F3F3F3F3CF900C00000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000B0C1010131616171717171717100E0E0F
+ 0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E
+ 0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D
+ 0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D
+ 0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0C0D0D0C0D0D0C0D0C0D0D0C0D0C10
+ 96E9F3F3F3F397190E0D0D0D0D0D0D0D0D0D0D0C0C0D0C0C0C0C0C0C0C0C0C0B
+ 0C0C0C0B0C0B0C0B0C0B0B0B0B0B0B0B0B0B0B0B0B0B000B0B000B0B000B0010
+ 92E9F3F3F3F30714000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000000000000000000000000C0D0F
+ 131317171717171717171717171717160E0F0E0E0E0E0E0E0E0E0E0E0E0D0E0E
+ 0E0E0D0E0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D
+ 0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D
+ 0D0D0D0D0D0E0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0D0C0D0D
+ 0D0C0D0D0C0D0C0D0C0D0C0D0D0C0D0C0D1096F3F3F3F3F091110E0E0D0D0D0D
+ 0D0D0D0D0D0D0D0D0C0C0D0C0C0C0C0C0C0C0C0C0C0B0C0C0B0C0B0C0B0C0B0C
+ 0B0B0B0B0B0B0B0B0B0B0B000B0B000B00000B0000001707F3F3F3F3D3170000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000B0C0E10131517171717171717171717171717171717
+ 171717130E0E0E0F0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0D0E0E0D
+ 0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E
+ 0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0C0D0D0C0D0C
+ 0D0D0C0F95F3F3F3F3E8190E0E0D0E0D0E0E0D0D0D0D0D0D0D0D0D0D0D0C0C0D
+ 0C0C0C0C0C0C0C0C0C0C0C0B0C0C0B0C0B0B0C0B0B0B0B0B0B0B0B0B0B0B0B0B
+ 000B0B000B0B000B000B00001093F3F3F3F3D311000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000B0C101013161617
+ 17171717171717171717171717171717171717171614130F0E0F0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E
+ 0D0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D
+ 0E0D0D0E0D0D0E0D0D0D0E0D0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D
+ 0C0D0D0D0D0C0D0D0D0C0D0D0C0D0D0C0D0D0C0D0C0F91E9F3F3F3E8190E0E0E
+ 0E0E0E0D0E0D0E0D0D0D0D0D0D0D0D0D0D0D0C0C0D0C0C0C0C0C0C0C0C0C0B0C
+ 0C0B0C0B0C0B0B0C0B0C0B0B0B0B0B0B0B0B0B0B0B000B0B000B00000B000B00
+ 00000EF7F3F3F3F3070F00000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000C0D0F1313171717171717171717171717171717171717171717
+ 171715141311100E0E0F0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E
+ 0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E
+ 0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D
+ 0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0D0C
+ 0D0C0D0C0D0C0D0D17E8F3F3F3E8190E0E0E0E0E0E0E0E0E0D0E0D0E0D0D0D0D
+ 0D0D0D0D0D0D0D0C0C0D0C0C0C0C0C0C0C0C0C0C0C0B0C0C0B0C0B0B0C0B0B0B
+ 0B0B0B0B0B0B0B0B0B0B000B0B000B0B000B00000B0000000EF7F3F3F3F3910B
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000000000B161717171717
+ 17171717171717171717171717171717151313100F0E0E0F0E0E0E0E0F0E0E0E
+ 0E0E0F0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E0E0E0E0D0E0E0E0D0E0E0D0E0E0D
+ 0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D0D0E
+ 0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0E0D0D0D0E0D0D0E0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0C0D0D0C0D0D10CFF3F3F3F0
+ 190E0F0E0E0E0E0E0E0E0E0E0D0E0D0E0E0D0D0D0D0D0D0D0D0D0D0D0C0C0D0C
+ 0C0C0C0C0C0C0C0C0B0C0C0B0C0B0C0B0B0C0B0B0B0B0B0B0B0B0B0B0B0B0B00
+ 0B0B000B00000B00000B000000000E98F3F3F3E9170000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000D171717171717171717171717171717161413
+ 11100F0E0E0E0E0F0E0F0E0E0E0F0E0E0E0E0F0E0F0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0D0E0E0E0E0D0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E
+ 0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D
+ 0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0E0D0E0E0E0D0E0E
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D
+ 0D0D0C0D0D0D0D0C0D0C0D0D0C1AF0F3F3F392100F0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0D0E0D0E0D0D0D0D0D0D0D0D0D0D0C0C0D0C0C0C0C0C0C0C0C0C0C0C0B
+ 0C0C0B0C0B0B0C0B0C0B0B0B0B0B0B0B0B0B0B0B000B0B000B0B000B00000B00
+ 0000000013D3F3F3F3070D000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 001016171717171717171715141311100E0E0F0E0E0E0E0E0F0E0E0E0E0E0E0F
+ 0E0E0F0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E0E0E0E0D0E
+ 0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E
+ 0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0E0D0E0D0D0D0E0D0D0E0D
+ 0D0E0D0D0D0D0D0E0E0E0F0E0E0F0E0E0E0F0E0E0E0F0E0E0E0E0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0C0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0C10
+ CFF3F3F3D0130E0F0E0F0E0F0E0E0E0E0E0E0E0E0E0E0D0E0D0E0D0D0D0D0D0D
+ 0D0D0D0D0D0D0C0C0D0C0C0C0C0C0C0C0C0C0B0C0C0B0C0B0C0B0C0B0B0B0B0B
+ 0B0B0B0B0B0B0B0B0B000B0B000B000B000B00000B0000000000F8F3F3F3E917
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000000013171717161413100F0E0E
+ 0E0E0E0E0F0E0E0F0E0F0E0E0E0F0E0F0E0F0E0E0E0F0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0E0D0E0D0E0E0D0E0E0D0E0E
+ 0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D
+ 0E0D0D0E0D0D0E0D0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0E0E0E0E0E0F0E0E0E
+ 0F0E0E0F0E0E0E0F0E0E0E0E0E0E0E0E0E0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D
+ 0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0C19F0F3F3F0900F0F0E0F0E0F0E0E
+ 0F0E0E0E0E0E0E0E0E0E0E0D0E0D0E0E0D0D0D0D0D0D0D0D0D0D0D0C0C0D0C0C
+ 0C0C0C0C0C0C0C0C0C0B0C0C0B0C0B0C0B0C0B0B0B0B0B0B0B0B0B0B0B0B000B
+ 0B000B000B000B00000B00000000000E98F3F3F3960B00000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000017171717130E0E0E0E0E0F0E0F0E0E0E0E0F0E0E0E0F0E
+ 0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E
+ 0E0D0E0E0E0E0E0D0E0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0E0D0E0E0D0E0D0E
+ 0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0E0D0D
+ 0D0D0D0E0D0D0E0D0E0E0E0E0E0F0E0E0E0E0F0E0E0E0F0E0E0F0E0E0E0F0E0F
+ 0E0F0E0E0E0E0E0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0D0C0D0D0D0D0C0D0D0D
+ 0C0D0D0C0F95F3F3F3D0130F0F0F0F0E0F0F0E0F0E0F0E0E0E0E0E0E0E0E0E0E
+ 0E0E0D0E0D0E0D0D0D0D0D0D0D0D0D0D0C0C0D0C0C0C0C0C0C0C0C0C0B0C0C0B
+ 0C0B0C0B0B0B0C0B0B0B0B0B0B0B0B0B0B0B0B000B0B000B000B000B0000000B
+ 000000000019F3F3F3E80F000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000000000000000C171717
+ 17100E0F0E0F0E0E0E0E0F0E0F0E0E0E0F0E0E0E0F0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0E0D0E0E
+ 0D0E0E0D0E0E0D0E0E0E0D0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D
+ 0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0E0E0E0E0F
+ 0E0E0F0E0F0E0E0E0F0E0E0E0F0E0E0F0E0E0E0E0E0E0F0E0F0E0F0E0E0D0D0D
+ 0D0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0D0D0C0D0D0D0D10D2F3F3F3910F0F0F
+ 0F0E0F0F0E0F0E0F0E0E0F0E0E0E0E0E0E0E0E0E0E0D0E0D0E0D0D0D0D0D0D0D
+ 0D0D0D0D0D0C0C0D0C0C0C0C0C0C0C0C0C0C0C0B0C0C0B0C0B0C0B0C0B0B0B0B
+ 0B0B0B0B0B0B0B0B000B0B000B0000000B000B000000000000000FD0F3F3F319
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000010161717170E0E0E0F0E0E0F0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0D0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E
+ 0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E
+ 0D0D0E0D0D0E0D0D0D0E0D0D0E0E0E0E0F0E0E0E0F0E0E0E0E0F111313151515
+ 151515141313100F0E0E0E0E0E0E0E0E0E0F0E0D0D0D0D0D0D0D0C0D0D0D0C0D
+ 0D0D0D0C0D0D0D0D0C0D15F0F3F3E8150F0F0F0F0F0F0F0F0F0E0F0E0F0E0E0F
+ 0E0E0E0E0E0E0E0E0E0E0D0E0D0E0E0D0D0D0D0D0D0D0D0D0D0D0C0C0D0C0C0C
+ 0C0C0C0C0C0C0B0C0C0B0C0B0C0B0B0B0C0B0B0B0B0B0B0B0B0B0B0B0B000B0B
+ 000B0B000B00000B000000000000000C93F3F3F3930000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000013171717150F0E0E0E0E0E0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E
+ 0D0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D
+ 0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0E
+ 0E0E0E0F0E0E0F0E0E0E1114151717171717171717171717171717171513100E
+ 0F0E0F0E0E0E0E0E0E0D0D0C0D0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0D18F3F3
+ F398110F0F0F0F0F0F0F0F0F0E0F0F0E0F0F0E0E0F0E0E0E0E0E0E0E0E0E0E0E
+ 0E0D0E0D0E0D0D0D0D0D0D0D0D0D0D0C0C0D0C0C0C0C0C0C0C0C0C0C0C0B0C0C
+ 0B0C0B0C0B0C0B0B0B0B0B0B0B0B0B0B0B0B000B0B000B00000B00000B000B00
+ 000000000017E9F3F3D00B000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000000000000015171717130E0F0E
+ 0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E
+ 0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D
+ 0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0E0D0D0E0E0E0F0E0E0E0F0E0F13161717
+ 1717171717171717171717171717171717171715110F0E0E0F0E0F0E0E0E0D0D
+ 0D0D0C0D0D0D0C0D0D0D0C0D0D0D0D0C96F3F3F392100F0F0F0F0F0F0F0F0F0F
+ 0F0F0F0E0F0E0F0E0E0F0E0E0E0E0E0E0E0E0E0E0D0E0D0E0D0D0D0D0D0D0D0D
+ 0D0D0D0D0C0C0D0C0C0C0C0C0C0C0C0C0B0C0C0B0C0B0C0B0B0B0C0B0B0B0B0B
+ 0B0B0B0B0B0B0B000B0B000B0B000B00000B00000000000000000FE8F3F3D30F
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000B16171717110E0E0E0E0E0E0F0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0D0E0E0E0E0E0D0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E
+ 0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E
+ 0D0D0E0D0D0E0E0F0E0E0E0F0E0F141717171717171717171717171717171717
+ 17171717171717171716130F0E0E0E0E0F0E0E0E0C0D0D0D0C0D0D0D0C0D0D0D
+ 0C0D0D96F3F3F01A100F100F0F0F0F0F0F0F0F0F0F0F0E0F0F0E0F0F0E0E0F0E
+ 0E0E0E0E0E0E0E0E0E0D0E0D0E0E0D0D0D0D0D0D0D0D0D0D0D0C0C0D0C0C0C0C
+ 0C0C0C0C0C0C0C0B0C0C0B0C0B0C0B0C0B0B0B0B0B0B0B0B0B0B0B0B000B0B00
+ 0B000B000B00000B000000000000000BD0F3F3E90F0000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000000000000000000000C
+ 171717170F0F0E0F0E0E0E0E0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E0E0E0E0E0D
+ 0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D
+ 0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0E0F0E0E0E0F0E0F
+ 1317171717171717171717171313100F100F1013141717171717171717171716
+ 110F0E0E0E0E0F0E0E0C0D0D0D0D0C0D0D0D0C0D0D0ED2F3F3F015100F100F10
+ 0F100F0F0F0F0F0F0F0F0F0F0F0E0F0E0F0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E
+ 0D0E0D0E0D0D0D0D0D0D0D0D0D0D0C0C0D0C0C0C0C0C0C0C0C0C0B0C0C0B0C0B
+ 0C0B0B0B0C0B0B0B0B0B0B0B0B0B0B0B0B000B0B000B000B000B0000000B0000
+ 000000000BF7F3F3E90F00000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000010161717170E0E0E0E0E0F0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E
+ 0D0E0E0D0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D
+ 0E0D0D0E0D0D0E0D0D0E0D0E0E0E0E0F0E0E11161717171717171716110E0B00
+ 000000000000000000000C0F14171717171717171715100E0F0E0E0E0E0E0D0D
+ 0C0D0D0D0C0D0D0D0ED2F3F3F016100F100F100F100F0F0F0F0F0F0F0F0F0F0F
+ 0E0F0F0E0F0F0E0E0F0E0E0E0E0E0E0E0E0E0E0D0E0D0E0D0D0D0D0D0D0D0D0D
+ 0D0D0D0C0C0D0C0C0C0C0C0C0C0C0C0C0C0B0C0C0B0C0B0C0B0C0B0B0B0B0B0B
+ 0B0B0B0B0B0B000B0B000B000B000B000B00000000000000000093F3F3F31700
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000011171717150E0F0E0F0E0E0E0E0F0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E
+ 0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D
+ 0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0E0F
+ 0E0F0E0E0F1417171717171717130E0000000000000000000000000000000000
+ 000B101516171717171716110E0E0F0E0E0E0E0D0D0D0C0D0D0D0C0FD2F3F3D2
+ 11101010100F100F100F100F0F0F0F0F0F0F0F0F0F0F0F0E0F0E0F0E0E0F0E0E
+ 0E0E0E0E0E0E0E0E0D0E0D0E0E0D0D0D0D0D0D0D0D0D0D0D0C0C0D0C0C0C0C0C
+ 0C0C0C0C0B0C0C0B0C0B0C0B0B0B0C0B0B0B0B0B0B0B0B0B0B0B0B000B0B000B
+ 0000000B00000B000000000000000091F3F3F317000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000001417171714
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0D0E0E0D
+ 0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E
+ 0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0F0E0E0E0E101517171717171713
+ 0C00000000000000000000000000000000000000000000000E15171717171717
+ 140E0E0F0E0E0E0E0D0D0D0C0D0D0FD2F3F3D2131010101010100F100F100F0F
+ 100F0F0F0F0F0F0F0F0F0E0F0F0E0F0F0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0D
+ 0E0D0E0D0D0D0D0D0D0D0D0D0D0C0C0D0C0C0C0C0C0C0C0C0C0C0C0B0C0C0B0C
+ 0B0C0B0C0B0B0B0B0B0B0B0B0B0B0B0B000B0B000B0B00000B0000000B000000
+ 0000000017F3F3F3110000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000017171717130E0F0E0E0E0F0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0D0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E
+ 0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D0D0E0D0D0E0D0D0E0D0D
+ 0E0D0D0E0E0E0E0E0F0E10161717171717150C00000000000000000000000000
+ 000000000000000000000000000010151717171717150F0E0E0F0E0E0E0C0D0D
+ 0D0CCFF3F3D31110101010101010100F100F100F0F0F0F0F0F0F0F0F0F0F0F0F
+ 0F0E0F0E0F0E0E0F0E0E0E0E0E0E0E0E0E0E0D0E0D0E0D0D0D0D0D0D0D0D0D0D
+ 0D0D0C0C0D0C0C0C0C0C0C0C0C0C0B0C0C0B0C0B0C0B0B0B0C0B0B0B0B0B0B0B
+ 0B0B0B0B0B000B0B000B000B000B000B00000000000000000017F3F3E90F0000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000B17171717100E0E0F0E0E0E0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E
+ 0D0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0E0D0E0D0E0D0E0D0E0D
+ 0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0E0E0F0E0E0E101617
+ 1717171710000000000000000000000000000000000000000000000000000000
+ 0000000B141717171717150F0E0E0E0F0E0D0D0D0D96F3F3D213101010101010
+ 101010100F100F100F100F0F0F0F0F0F0F0F0F0F0E0F0F0E0F0F0E0E0F0E0E0E
+ 0E0E0E0E0E0E0E0D0E0D0E0E0D0D0D0D0D0D0D0D0D0D0D0C0C0D0C0C0C0C0C0C
+ 0C0C0C0C0C0B0C0C0B0C0B0C0B0C0B0B0B0B0B0B0B0B0B0B0B0B000B0B000B00
+ 0B000B00000B00000000000000001AF3F3E90F00000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000C171717170F0E0F0E0E
+ 0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E
+ 0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D
+ 0D0E0D0D0E0D0D0E0D0D0E0E0E0E0F0E101617171717150D0000000000000000
+ 0000000000000000000000000000000000000000000000000011171717171715
+ 0F0E0E0E0E0E0D0D93F3F3F0131011101010101010101010100F100F100F100F
+ 0F0F0F0F0F0F0F0F0F0F0F0E0F0E0F0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0D0E
+ 0D0E0D0D0D0D0D0D0D0D0D0D0C0C0D0C0C0C0C0C0C0C0C0C0B0C0C0B0C0B0C0B
+ 0B0B0C0B0B0B0B0B0B0B0B0B0B0B0B000B0B000B000B000B0000000B00000000
+ 00000093F3F3E90B000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000010161717170E0E0E0E0F0E0E0E0E0E0F0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0D0E0E0E0E0E0D0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E
+ 0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0E0F
+ 0E0E0E0F1617171717160C000000000000000000000000000000000000000000
+ 00000000000000000000000000000E1717171717140F0E0F0E0E0E19F3F3E916
+ 11101010101010101010101010100F100F100F0F100F0F0F0F0F0F0F0F0F0E0F
+ 0F0E0F0F0E0E0F0E0E0E0E0E0E0E0E0E0E0D0E0D0E0D0D0D0D0D0D0D0D0D0D0D
+ 0D0C0C0D0C0C0C0C0C0C0C0C0C0C0C0B0C0C0B0C0B0C0B0C0B0B0B0B0B0B0B0B
+ 0B0B0B0B000B0B000B000B000B000B00000000000000000093F3F3D00B000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000001017
+ 1717150E0F0E0E0E0E0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E0E0E0E0E0D
+ 0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D
+ 0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0E0E0F0E0F1517171717140B0000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000E1717171717130E0E0F0E16F3F3F31611101110111010101010101010
+ 1010100F100F100F0F0F0F0F0F0F0F0F0F0F0F0F0F0E0F0E0F0E0E0F0E0E0E0E
+ 0E0E0E0E0E0E0D0E0D0E0E0D0D0D0D0D0D0D0D0D0D0D0C0C0D0C0C0C0C0C0C0C
+ 0C0C0B0C0C0B0C0B0C0B0B0B0C0B0B0B0B0B0B0B0B0B0B0B0B000B0B000B0000
+ 000B00000B0000000000000000D0F3F393000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000013171717150E0E0F0E0E0E0F0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E
+ 0D0E0E0D0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D
+ 0E0D0D0E0D0F0E0E0E0E1317171717160B000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000E1717171717100E
+ 0E13E9F3F3901111101110101110101010101010101010100F100F100F100F0F
+ 0F0F0F0F0F0F0F0F0E0F0F0E0F0F0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0D0E0D
+ 0E0D0D0D0D0D0D0D0D0D0D0C0C0D0C0C0C0C0C0C0C0C0C0C0C0B0C0C0B0C0B0C
+ 0B0C0B0B0B0B0B0B0B0B0B0B0B0B000B0B000B0B00000B0000000B0000000000
+ 000BD0F3F31A0000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000013171717130F0E0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E
+ 0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D
+ 0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0E0D0D0E0D0D0E0D0E0E0E0F0E0F101717
+ 1717160B00000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000001016171717160E0FD2F3F39610111110111110
+ 101110101010101010101010100F100F100F100F0F0F0F0F0F0F0F0F0F0F0F0E
+ 0F0E0F0E0E0F0E0E0E0E0E0E0E0E0E0E0D0E0D0E0D0D0D0D0D0D0D0D0D0D0D0D
+ 0C0C0D0C0C0C0C0C0C0C0C0C0B0C0C0B0C0B0C0B0B0B0C0B0B0B0B0B0B0B0B0B
+ 0B0B0B000B0B000B000B000B000B000000000000000010E9F3F3110000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000000000017171717130E
+ 0E0F0E0E0E0E0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0D0E0E0D
+ 0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0E
+ 0D0D0D0D0E0D0D0E0D0D0D0E0E0E0E0E0F15171717170E000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000013171717171393F3F3D01111111111101110111011101010101010101010
+ 10100F100F100F0F100F0F0F0F0F0F0F0F0F0E0F0F0E0F0F0E0E0F0E0E0E0E0E
+ 0E0E0E0E0E0D0E0D0E0E0D0D0D0D0D0D0D0D0D0D0D0C0C0D0C0C0C0C0C0C0C0C
+ 0C0C0C0B0C0C0B0C0B0C0B0C0B0B0B0B0B0B0B0B0B0B0B0B000B0B000B000B00
+ 0B00000B0000000000000014F3F3E90B00000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000017171717100E0F0E0E0E0E0E0F0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0D0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E
+ 0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0E0D0D0E0D0D0E0D0E
+ 0F0E0F0E13171717171300000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000B1517171792F3F3F014
+ 11111110111110111011101011101010101010101010100F100F100F0F0F0F0F
+ 0F0F0F0F0F0F0F0F0F0E0F0E0F0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0D0E0D0E
+ 0D0D0D0D0D0D0D0D0D0D0C0C0D0C0C0C0C0C0C0C0C0C0B0C0C0B0C0B0C0B0B0B
+ 0C0B0B0B0B0B0B0B0B0B0B0B0B000B0B000B000B000B0000000B000000000000
+ 91F3F30700000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000C16171717100E0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E
+ 0D0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0E0D0E0D0E0D0E0D0E0D
+ 0E0D0E0D0E0D0D0E0D0E0D0D0E0D0D0E0D0D0E0E0E0E0E0F16171717150B0000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000D171718F0F3F31811111111111111111011101110
+ 1010101010101010101010100F100F100F100F0F0F0F0F0F0F0F0F0F0E0F0F0E
+ 0F0F0E0E0F0E0E0E0E0E0E0E0E0E0E0D0E0D0E0D0D0D0D0D0D0D0D0D0D0D0D0C
+ 0C0D0C0C0C0C0C0C0C0C0C0C0C0B0C0C0B0C0B0C0B0C0B0B0B0B0B0B0B0B0B0B
+ 0B0B000B0B000B000B000B000B0000000000000000D0F3F31900000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000111314131314131314131314100F100F0C0C0B0000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000C171717170F0F0E0E0E0E
+ 0F0E0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E
+ 0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D
+ 0D0E0D0D0E0D0E0F0E0F0E13171717170E000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 1317D0F3F3931111111111111111111110111011101110101010101010101010
+ 100F100F100F100F0F0F0F0F0F0F0F0F0F0F0F0E0F0E0F0E0E0F0E0E0E0E0E0E
+ 0E0E0E0E0D0E0D0E0E0D0D0D0D0D0D0D0D0D0D0D0C0C0D0C0C0C0C0C0C0C0C0C
+ 0B0C0C0B0C0B0C0B0B0B0C0B0B0B0B0B0B0B0B0B0B0B0B000B0B000B0000000B
+ 00000B0000000000000EE9F3F30F000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000B17171717
+ 17171717171717171717171717171717151310100C0B00000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000C171717170E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0D0E0E0E0E0E0D0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E
+ 0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0E0E0E0E0F16
+ 1717171500000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000000C93F3F3D213111111111111
+ 111111111110111011101110101010101010101010100F100F100F0F100F0F0F
+ 0F0F0F0F0F0F0E0F0F0E0F0F0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0D0E0D0E0D
+ 0D0D0D0D0D0D0D0D0D0C0C0D0C0C0C0C0C0C0C0C0C0C0C0B0C0C0B0C0B0C0B0C
+ 0B0B0B0B0B0B0B0B0B0B0B0B000B0B000B0B00000B0000000B000000000014F3
+ F3D0000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000001017171717171717171717171717171717
+ 171717171717171717171713100E0C0000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000101617
+ 17170E0F0E0E0F0E0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E0E0E0E0E0D
+ 0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D
+ 0E0D0E0D0D0E0D0D0E0D0D0E0D0E0E0F0E0E11171717170E0000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000BF0F3F31711111111111111111111111111101110111010
+ 11101010101010101010100F100F100F0F0F0F0F0F0F0F0F0F0F0F0F0F0E0F0E
+ 0F0E0E0F0E0E0E0E0E0E0E0E0E0E0D0E0D0E0D0D0D0D0D0D0D0D0D0D0D0D0C0C
+ 0D0C0C0C0C0C0C0C0C0C0B0C0C0B0C0B0C0B0B0B0C0B0B0B0B0B0B0B0B0B0B0B
+ 0B000B0B000B000B000B000B0000000000000096F3F31A000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000001617171717171717171717171717171717171717171717171717171717
+ 1717171713000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000010171717160E0E0E0F0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E
+ 0D0E0E0D0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D
+ 0D0E0E0E0F0E1517171715000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000096F3F393
+ 1311131111111111111111111111111011101110101010101010101010101010
+ 0F100F100F100F0F0F0F0F0F0F0F0F0F0E0F0F0E0F0F0E0E0F0E0E0E0E0E0E0E
+ 0E0E0E0D0E0D0E0E0D0D0D0D0D0D0D0D0D0D0D0C0C0D0C0C0C0C0C0C0C0C0C0C
+ 0C0B0C0C0B0C0B0C0B0C0B0B0B0B0B0B0B0B0B0B0B0B000B0B000B000B000B00
+ 000B00000000000CE9F3E90E0000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000E171717171413111313
+ 131514151514171717171717171717171717171717171717170B000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000010161717150E0F0E0E0E0E0E0E0F0E0E0F0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E
+ 0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D
+ 0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0E0D0D0E0D0E0E0F0E0E0F171717171000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000011F3F3D313111311131111111111111111
+ 1111111110111011101110101010101010101010100F100F100F100F0F0F0F0F
+ 0F0F0F0F0F0F0F0E0F0E0F0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0D0E0D0E0D0D
+ 0D0D0D0D0D0D0D0D0C0C0D0C0C0C0C0C0C0C0C0C0B0C0C0B0C0B0C0B0B0B0C0B
+ 0B0B0B0B0B0B0B0B0B0B0B000B0B000B000B000B0000000B0000000019F3F398
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000013171717160E0E0F0E0E0E0E0F0E0E0E0E0E0E101011
+ 131415171717171717171717170D000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000010171717150E0E
+ 0E0F0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0E0D0E0E0D
+ 0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0E
+ 0D0D0D0D0E0D0D0E0D0E0E0E0F11171717170B00000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000D3F3F31913111313111311111111111111111111111110111011101110
+ 101010101010101010100F100F100F0F100F0F0F0F0F0F0F0F0F0E0F0F0E0F0F
+ 0E0E0F0E0E0E0E0E0E0E0E0E0E0D0E0D0E0D0D0D0D0D0D0D0D0D0D0D0D0C0C0D
+ 0C0C0C0C0C0C0C0C0C0C0C0B0C0C0B0C0B0C0B0C0B0B0B0B0B0B0B0B0B0B0B0B
+ 000B0B000B000B000B000B00000000000007F3F3110000000000000000000000
+ 00000000000000000000000000000000000000000000000000000000000B1717
+ 1717130F0E0E0E0F0E0E0E0E0F0E0F0E0E0E0F0E0E0E0E0E0F10131515171717
+ 1710000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000013171717150E0F0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0D0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E
+ 0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0E0D0D0E0D0E0F0E0E
+ 0E14171717150000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000019F3F397131313111311
+ 131113111111111111111111111110111011101011101010101010101010100F
+ 100F100F0F0F0F0F0F0F0F0F0F0F0F0F0F0E0F0E0F0E0E0F0E0E0E0E0E0E0E0E
+ 0E0E0D0E0D0E0E0D0D0D0D0D0D0D0D0D0D0D0C0C0D0C0C0C0C0C0C0C0C0C0B0C
+ 0C0B0C0B0C0B0B0B0C0B0B0B0B0B0B0B0B0B0B0B0B000B0B000B0000000B0000
+ 0B0000000010F3F3D30000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000010171717170F0E0E0F0E0E0F0E0F0E
+ 0E0E0E0F0E0E0E0E0F0E0F0E0E0F0E0E0E151717171300000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0013171717150E0E0E0F0E0E0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D
+ 0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E
+ 0D0E0D0E0D0E0D0D0E0D0E0D0D0E0D0D0E0E0F0E0E1717171710000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000BF0F3F014131313111313111311111111111111111111
+ 11111110111011101010101010101010101010100F100F100F100F0F0F0F0F0F
+ 0F0F0F0F0E0F0F0E0F0F0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0D0E0D0E0D0D0D
+ 0D0D0D0D0D0D0D0C0C0D0C0C0C0C0C0C0C0C0C0C0C0B0C0C0B0C0B0C0B0C0B0B
+ 0B0B0B0B0B0B0B0B0B0B000B0B000B0B00000B0000000B00000093F3F3170000
+ 00000C0000000000000000000000000000000000000000000000000000000000
+ 000000000016171717140E0F0E0E0E0F0E0E0E0E0F0E0E0E0F0E0F0E0E0E0E0E
+ 0F0E0E0F0E131717171600000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000000013171717140E0F0E0E0E0E
+ 0F0E0E0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D
+ 0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0D0E
+ 0D0D0E0D0E0F0E0E0F171717170E000000000000000000000000000000000000
+ 00000000000000000000000000000000000000000000000000000000001AF3F3
+ F713131313131113131113111311111111111111111111111011101110111010
+ 1010101010101010100F100F100F100F0F0F0F0F0F0F0F0F0F0F0F0E0F0E0F0E
+ 0E0F0E0E0E0E0E0E0E0E0E0E0D0E0D0E0D0D0D0D0D0D0D0D0D0D0D0D0C0C0D0C
+ 0C0C0C0C0C0C0C0C0B0C0C0B0C0B0C0B0B0B0C0B0B0B0B0B0B0B0B0B0B0B0B00
+ 0B0B000B000B000B000B000000000CE9F3E90B000C1317150C00000000000000
+ 0000000000000000000000000000000000000000000000000E17171717110E0E
+ 0E0F0E0D0E0E0E0E0E0E0E0E0E0E0E0E0F0E0F0E0E0E0F0E0E10171717170B00
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000013171717130E0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0D0E0E0E0E0E0D0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E
+ 0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D0E0D0D0E0D0D0E0E0E0E0F10171717
+ 170C000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000BF0F3E8151313131313111311131311
+ 1113111111111111111111111110111011101110101010101010101010100F10
+ 0F100F0F100F0F0F0F0F0F0F0F0F0E0F0F0E0F0F0E0E0F0E0E0E0E0E0E0E0E0E
+ 0E0D0E0D0E0E0D0D0D0D0D0D0D0D0D0D0D0C0C0D0C0C0C0C0C0C0C0C0C0C0C0B
+ 0C0C0B0C0B0C0B0C0B0B0B0B0B0B0B0B0B0B0B0B000B0B000B000B000B00000B
+ 000000F8F3F3921417171717160B000000000000000000000000000000000000
+ 00000000000000000000000013171717160E0F0E0E0E0E0D0D0D0D0D0D0D0E0D
+ 0E0D0E0D0E0E0E0E0E0E0E0E0F0F171717170D00000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000131717
+ 17130E0F0E0E0E0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E0E0E0E0E0D0E
+ 0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E
+ 0D0E0D0D0E0D0E0D0D0E0D0E0E0F0E0E11171717170000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000001AF3F391131313131313131313111311131111111111111111111111
+ 111110111011101011101010101010101010100F100F100F0F0F0F0F0F0F0F0F
+ 0F0F0F0F0F0E0F0E0F0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0D0E0D0E0D0D0D0D
+ 0D0D0D0D0D0D0C0C0D0C0C0C0C0C0C0C0C0C0B0C0C0B0C0B0C0B0B0B0C0B0B0B
+ 0B0B0B0B0B0B0B0B0B000B0B000B000B000B0000000B000CE9F3F01817171717
+ 17160C000000000000000000000000000000000000000000000000000000000B
+ 17171717130E0E0F0E0E0D0E0D0E0D0E0D0E0D0D0E0D0D0D0D0D0D0D0E0E0E0F
+ 0E0E171717171000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000013171717130E0E0E0F0E0F0E0E0E0E
+ 0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E
+ 0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0D0D0E0D0D0D0E
+ 0E0E0E0F13161717160000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000000000000BF0F3E81313131313
+ 1313131311131311131113111111111111111111111111101110111010101010
+ 10101010101010100F100F100F100F0F0F0F0F0F0F0F0F0F0E0F0F0E0F0F0E0E
+ 0F0E0E0E0E0E0E0E0E0E0E0D0E0D0E0D0D0D0D0D0D0D0D0D0D0D0D0C0C0D0C0C
+ 0C0C0C0C0C0C0C0C0C0B0C0C0B0C0B0C0B0C0B0B0B0B0B0B0B0B0B0B0B0B000B
+ 0B000B000B000B000B000000F8F3F396171717171717160B0000000000000000
+ 0000000000000000000000000000000000000011171717170F0F0E0E0E0E0E0D
+ 0D0E0D0E0D0D0E0D0D0E0D0D0D0D0E0D0D0E0E0E0E0F14171717130000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000013171717130E0F0E0E0E0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E
+ 0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E
+ 0D0E0D0E0D0E0D0E0E0D0D0E0D0E0D0D0E0D0E0D0E0F0E0E1317171713000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000001AF3F3911313131313131313131313111313111311
+ 13111111111111111111111110111011101110101010101010101010100F100F
+ 100F100F0F0F0F0F0F0F0F0F0F0F0F0E0F0E0F0E0E0F0E0E0E0E0E0E0E0E0E0E
+ 0D0E0D0E0E0D0D0D0D0D0D0D0D0D0D0D0C0C0D0C0C0C0C0C0C0C0C0C0B0C0C0B
+ 0C0B0C0B0B0B0C0B0B0B0B0B0B0B0B0B0B0B0B000B0B000B0000000B00000B00
+ 0CE9F3E917171617171717170E00000000000000000000000000000000000000
+ 0000000000000B15171717150E0E0E0F0E0D0D0E0D0D0D0D0E0D0D0E0D0D0D0E
+ 0D0D0D0D0D0E0E0F0E0E13171717150000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000000001417171716130F
+ 0E0F0E0F0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0D0E0E0D0E
+ 0E0D0E0E0D0E0E0D0E0E0D0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E
+ 0D0D0E0D0D0E0D0E0E0E0E0F1117171713000000000000000000000000000000
+ 00000000000000000000000000000000000000000000000000000000000000D3
+ F3F0141314131313131313131313131113131113111111111111111111111111
+ 1110111011101110101010101010101010100F100F100F0F100F0F0F0F0F0F0F
+ 0F0F0E0F0F0E0F0F0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0D0E0D0E0D0D0D0D0D
+ 0D0D0D0D0D0C0C0D0C0C0C0C0C0C0C0C0C0C0C0B0C0C0B0C0B0C0B0C0B0B0B0B
+ 0B0B0B0B0B0B0B0B000B0B000B0B00000B0000000090F3F3910F0F1617171717
+ 170E0000000000000000000000000000000000000000000000000E1717171711
+ 0E0F0E0E0E0E0D0D0E0D0E0D0D0E0D0D0D0E0D0D0D0D0D0E0D0E0E0E0E0F1116
+ 1717170B00000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000001717171717171714100E0E0E0F0E0E0F0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0D0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E
+ 0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0D0E0D0D0E0D0D0D0E0E0F0E0E
+ 1317171713000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000017F3F39513141313131313131313
+ 1313131311131311131113111111111111111111111110111011101011101010
+ 101010101010100F100F100F0F0F0F0F0F0F0F0F0F0F0F0F0F0E0F0E0F0E0E0F
+ 0E0E0E0E0E0E0E0E0E0E0D0E0D0E0D0D0D0D0D0D0D0D0D0D0D0D0C0C0D0C0C0C
+ 0C0C0C0C0C0C0B0C0C0B0C0B0C0B0B0B0C0B0B0B0B0B0B0B0B0B0B0B0B000B0B
+ 000B000B000B000B000CF3F3D20E0E0F1517171717170E000000000000000000
+ 000000000000000000000000000014171717160E0F0E0E0E0E0D0D0E0D0D0D0E
+ 0D0D0E0D0E0D0D0E0D0E0D0D0D0D0E0F0E0E0F171717170C0000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0016171717171717171715110E0E0E0F0E0E0F0E0E0F0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D
+ 0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D
+ 0E0D0E0D0E0D0E0D0D0E0D0D0E0D0E0D0E0E0E0F111717171300000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000D0F3F31514131413141313131313131313131311131113111311
+ 111111111111111111111110111011101010101010101010101010100F100F10
+ 0F100F0F0F0F0F0F0F0F0F0F0E0F0F0E0F0F0E0E0F0E0E0E0E0E0E0E0E0E0E0D
+ 0E0D0E0E0D0D0D0D0D0D0D0D0D0D0D0C0C0D0C0C0C0C0C0C0C0C0C0C0C0B0C0C
+ 0B0C0B0C0B0C0B0B0B0B0B0B0B0B0B0B0B0B000B0B000B000B000B000000F7F3
+ F3160E0E0F1517171717170F0000000000000000000000000000000000000000
+ 000C17171717130E0E0E0F0E0D0E0D0D0E0D0E0D0E0D0D0E0D0D0D0D0D0D0D0D
+ 0D0E0E0E0E0F0E17171717100000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000B0E151717171717171717
+ 16130F0E0E0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D
+ 0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D
+ 0E0D0D0E0E0F0E0E131717171600000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000000000FF3F398131413
+ 1413131413131313131313131313131113111311131111111111111111111111
+ 10111011101110101010101010101010100F100F100F100F0F0F0F0F0F0F0F0F
+ 0F0F0F0E0F0E0F0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0D0E0D0E0D0D0D0D0D0D
+ 0D0D0D0D0C0C0D0C0C0C0C0C0C0C0C0C0B0C0C0B0C0B0C0B0B0B0C0B0B0B0B0B
+ 0B0B0B0B0B0B0B000B0B000B000B000B000010F3F3960F0E0E0F151717171717
+ 11000000000000000000000000000000000000000011171717170F0E0F0E0E0E
+ 0D0D0E0D0D0E0D0D0D0E0D0D0D0D0D0D0D0D0E0D0D0D0E0F0E0E0E1517171713
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000E13171717171717171716140F0E0F0E0E0F0E0F
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0D0E0E0E0E0E0D0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D
+ 0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0D0E0D0E0E0E0E0F11171717
+ 1700000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000093F3F318141413141314131313131313131313
+ 1313131113131111131111111111111111111111111011101110111010101010
+ 1010101010100F100F100F0F100F0F0F0F0F0F0F0F0F0E0F0F0E0F0F0E0E0F0E
+ 0E0E0E0E0E0E0E0E0E0D0E0D0E0D0D0D0D0D0D0D0D0D0D0D0D0C0C0D0C0C0C0C
+ 0C0C0C0C0C0C0C0B0C0C0B0C0B0C0B0C0B0B0B0B0B0B0B0B0B0B0B0B000B0B00
+ 0B000B000B0000D0F3F3100E0E0E0F1417171717171100000000000000000000
+ 00000000000000000B15171717150E0E0E0F0E0D0E0D0D0E0D0D0E0D0E0D0D0E
+ 0D0D0E0D0E0D0D0D0D0D0E0E0E0F0E1417171714000000000000000000000000
+ 000000000000000000000000000000000000000B0B0000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000C1117171717171717171714100E0E0E0E0E0E0F0E0E0F0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E0E0E0E0E0D0E
+ 0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E
+ 0D0E0D0D0D0E0D0E0D0D0D0D0F0E0E0E10171717170C00000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00E9F3E814141414131413141314131313131313131313131113131111131111
+ 1111111111111111111110111011101011101010101010101010100F100F100F
+ 0F0F0F0F0F0F0F0F0F0F0F0F0F0E0F0E0F0E0E0F0E0E0E0E0E0E0E0E0E0E0D0E
+ 0D0E0E0D0D0D0D0D0D0D0D0D0D0D0C0C0D0C0C0C0C0C0C0C0C0C0B0C0C0B0C0B
+ 0C0B0B0B0C0B0B0B0B0B0B0B0B0B0B0B0B000B0B000B00000B000B17F3F3190F
+ 0E0E0E0F1317171717171100000000000000000000000000000000000E171717
+ 17100F0E0E0E0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0E0D0E0D0D0E
+ 0F0E0E1117171717000000000000000000000000000000000000000000000000
+ 0000000000000E16150F00000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000B10161717171717
+ 17171715110F0E0F0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D
+ 0E0E0D0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0E0D0D0D0E0D0E0D
+ 0E0F0E0E0F171717170D00000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000014F3F3931414131414131413
+ 1413131313131313131313131311131311111311111111111111111111111110
+ 111011101010101010101010101010100F100F100F100F0F0F0F0F0F0F0F0F0F
+ 0E0F0F0E0F0F0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0D0E0D0E0D0D0D0D0D0D0D
+ 0D0D0D0C0C0D0C0C0C0C0C0C0C0C0C0C0C0B0C0C0B0C0B0C0B0C0B0B0B0B0B0B
+ 0B0B0B0B0B0B000B0B000B0B000B000CE9F3D20E0F0E0E0E0F13171717171713
+ 0B00000000000000000000000000000014171717160E0E0F0E0E0E0D0E0D0E0D
+ 0D0E0D0D0E0D0D0D0E0D0D0D0D0D0D0D0D0D0E0E0E0E0F10171717170C000000
+ 0000000000000000000000000000000000000000000000000B13171717171300
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000B0E15171717171717171715130F0E0E0E0E
+ 0F0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E
+ 0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E
+ 0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D0E0D0E0D0E0E0E0F0E0E16171717100000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000093F3F3171414141414131414131413141313131313131313
+ 1313111313111311131111111111111111111111101110111011101010101010
+ 10101010100F100F100F100F0F0F0F0F0F0F0F0F0F0F0F0E0F0E0F0E0E0F0E0E
+ 0E0E0E0E0E0E0E0E0D0E0D0E0D0D0D0D0D0D0D0D0D0D0D0D0C0C0D0C0C0C0C0C
+ 0C0C0C0C0B0C0C0B0C0B0C0B0B0B0C0B0B0B0B0B0B0B0B0B0B0B0B000B0B000B
+ 00000B00F7F3F3110E0F0E0E0E0F131717171717140B00000000000000000000
+ 0000000C17171717130E0E0E0F0E0D0E0D0D0D0E0D0D0E0D0D0E0D0D0D0D0E0D
+ 0E0D0D0D0D0D0D0E0F0E0E0E171717170F000000000000000000000000000000
+ 00000000000000000000001017171717171717160C0000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000E13171717171717171716140F0E0F0E0E0F0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0D0E0E0D0E
+ 0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D
+ 0E0D0D0D0D0D0D0D0E0E0E0E0F14171717140000000000000000000000000000
+ 00000000000000000000000000000000000000000000000000000000E9F3CF14
+ 1414141414141314131413131413131313131313131313111313111311111111
+ 11111111111111111110111011101110101010101010101010100F100F100F0F
+ 100F0F0F0F0F0F0F0F0F0E0F0F0E0F0F0E0E0F0E0E0E0E0E0E0E0E0E0E0D0E0D
+ 0E0E0D0D0D0D0D0D0D0D0D0D0D0C0C0D0C0C0C0C0C0C0C0C0C0C0C0B0C0C0B0C
+ 0B0C0B0C0B0B0B0B0B0B0B0B0B0B0B0B000B0B000B0B000B15F3F3900E0E0F0E
+ 0E0E0F111717171717140B00000000000000000000000011171717170F0E0F0E
+ 0E0E0D0D0E0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0E0D0D0D0D0E0E0E0F0E
+ 15171717110000000000000000000000000000000000000000000000000C1417
+ 1717171717171717171000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000C11161717
+ 17171717171714100E0E0E0E0F0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0D0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E
+ 0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D0E0D0E0D0E0D0F0E0E
+ 0E11171717170B00000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000014F3F39114141414141414141413141314
+ 1313131313131313131313131113131113111311111111111111111111111011
+ 1011101011101010101010101010100F100F100F0F0F0F0F0F0F0F0F0F0F0F0F
+ 0F0E0F0E0F0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0D0E0D0E0D0D0D0D0D0D0D0D
+ 0D0D0C0C0D0C0C0C0C0C0C0C0C0C0B0C0C0B0C0B0C0B0B0B0C0B0B0B0B0B0B0B
+ 0B0B0B0B0B000B0B000B00000BE9F3CF0E0E0E0F0E0E0E0F101717171717140B
+ 000000000000000000000B15171717140E0F0E0E0E0D0E0D0D0E0D0D0E0D0D0E
+ 0D0D0E0D0E0D0D0D0D0D0D0D0D0D0D0E0E0E0E0E141717171400000000000000
+ 0000000000000000000000000000000B1017171717171717171717171717130B
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000B1015171717171717171716110E0E
+ 0E0F0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D
+ 0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0E0D0E0D0E0D0E0D0E0D0E
+ 0D0E0D0E0D0D0E0D0E0D0D0E0D0E0D0E0D0E0F0E0F0F171717170F0000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000093F3F31714141414141414141413141413141314131313131313131313
+ 1311131113111311111111111111111111111110111011101010101010101010
+ 101010100F100F100F100F0F0F0F0F0F0F0F0F0F0E0F0F0E0F0F0E0E0F0E0E0E
+ 0E0E0E0E0E0E0E0D0E0D0E0D0D0D0D0D0D0D0D0D0D0D0D0C0C0D0C0C0C0C0C0C
+ 0C0C0C0C0C0B0C0C0B0C0B0C0B0C0B0B0B0B0B0B0B0B0B0B0B0B000B0B000B0B
+ 00F7F3F30F0E0E0E0F0E0E0E0F101717171717160B0000000000000C0E101417
+ 171717100F0E0E0F0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0E0D0E0D0D0D
+ 0D0D0D0E0E0F0E0E131717171700000000000000000000000000000000000000
+ 00000D16171717171717150F10161617171717160B0000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000B0E15171717171717171716130F0E0E0E0E0E0F0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D
+ 0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D0D
+ 0D0D0D0D0E0E0E0E0E0E15171717150000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000E9F3D3151414141414
+ 1414141414131413141313131313131313131313131313111311131113111111
+ 111111111111111110111011101110101010101010101010100F100F100F100F
+ 0F0F0F0F0F0F0F0F0F0F0F0E0F0E0F0E0E0F0E0E0E0E0E0E0E0E0E0E0D0E0D0E
+ 0E0D0D0D0D0D0D0D0D0D0D0D0C0C0D0C0C0C0C0C0C0C0C0C0B0C0C0B0C0B0C0B
+ 0B0B0C0B0B0B0B0B0B0B0B0B0B0B0B000B0B000B0017F3F3190E0E0E0E0F0E0E
+ 0E0F101717171717160B000C0F131617171717171717160E0E0E0F0E0D0E0D0D
+ 0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0E0D0D0D0D0D0E0E0F0E10171717
+ 170C0000000000000000000000000000000000000B1317171717171716110E0F
+ 0E0F141717171717170E00000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000D13
+ 171717171717171717140F0E0F0E0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E
+ 0E0E0D0E0E0E0E0D0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D
+ 0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0E0D0E0D0D0E0E0F0E0E1117
+ 1717170D00000000000000000000000000000000000000000000000000000000
+ 000000000000000000000FF3F395151414141414141414141414141314131413
+ 1413131313131313131313111313111113111111111111111111111111101110
+ 11101110101010101010101010100F100F100F0F100F0F0F0F0F0F0F0F0F0E0F
+ 0F0E0F0F0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0D0E0D0E0D0D0D0D0D0D0D0D0D
+ 0D0C0C0D0C0C0C0C0C0C0C0C0C0C0C0B0C0C0B0C0B0C0B0C0B0B0B0B0B0B0B0B
+ 0B0B0B0B000B0B000B0CF3F3960E0E0E0E0E0E0F0E0E0E101617171717161517
+ 17171717171717171717130E0F0E0E0E0E0D0E0D0D0E0D0D0E0D0D0E0D0E0D0E
+ 0D0D0D0D0E0D0D0D0D0D0D0D0F0E0E0E0F161717170E00000000000000000000
+ 000000000000001015171717171717140F0F0E0E0E0E0E111717171717171100
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000000C1116171717171717171715
+ 100E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E0E0E0E0D0E
+ 0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E
+ 0D0E0D0D0E0D0D0E0D0E0D0E0D0E0E0E0F0E0F16171717130000000000000000
+ 00000000000000000000000000000000000000000000000000000000000019F3
+ F319141415141414141414141414141314141314131413131313131313131313
+ 1113131111131111111111111111111111111011101110101110101010101010
+ 1010100F100F100F0F0F0F0F0F0F0F0F0F0F0F0F0F0E0F0E0F0E0E0F0E0E0E0E
+ 0E0E0E0E0E0E0D0E0D0E0D0D0D0D0D0D0D0D0D0D0D0D0C0C0D0C0C0C0C0C0C0C
+ 0C0C0B0C0C0B0C0B0C0B0B0B0C0B0B0B0B0B0B0B0B0B0B0B0B000B0B000BD0F3
+ E80E0E0E0D0E0E0E0E0F0E0E0F16171717171717171717171717171717170F0E
+ 0E0E0F0D0D0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D
+ 0E0E0F0E0E16171717100000000000000000000000000000000C141717171717
+ 1716100E0E0E0E0F0E0F0E0E10161717171717130B0000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000B101517171717171717160E0E0E0F0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0D0E0E0E0E0D0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D
+ 0E0E0D0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0D0D0D0D
+ 0D0D0E0F0E0E0E14171717170D00000000000000000000000000000000000000
+ 00000000000000000000000000000000000096F3F01514151414141414141414
+ 1414141413141314131313131313131313131313131113131111131111111111
+ 1111111111111110111011101010101010101010101010100F100F100F100F0F
+ 0F0F0F0F0F0F0F0F0E0F0F0E0F0F0E0E0F0E0E0E0E0E0E0E0E0E0E0D0E0D0E0E
+ 0D0D0D0D0D0D0D0D0D0D0D0C0C0D0C0C0C0C0C0C0C0C0C0C0C0B0C0C0B0C0B0C
+ 0B0C0B0B0B0B0B0B0B0B0B0B0B0B000B0B0090F3F3110E0E0E0D0E0E0E0E0F0E
+ 0E101617171717171717171717151413100F0F0E0F0E0E0E0D0E0D0D0E0D0D0E
+ 0D0D0E0D0D0D0D0E0D0D0D0D0D0E0D0D0D0D0D0D0E0E0E0E0F14171717150E0B
+ 00000000000000000000000B1017171717171717130F0E0F0E0F0E0E0E0E0F0E
+ 0E0F151717171717140B00000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0B0E151717171717170E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E
+ 0E0E0D0E0E0E0E0D0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E
+ 0D0E0D0E0D0E0D0E0D0E0D0D0E0D0E0D0E0D0E0D0E0D0E0E0E0F0E0F17171717
+ 150B000000000000000000000000000000000000000000000000000000000000
+ 000000000000E9F3CF1514151415141414141414141414141414131413141314
+ 1313131313131313131311131311131113111111111111111111111110111011
+ 101110101010101010101010100F100F100F100F0F0F0F0F0F0F0F0F0F0F0F0E
+ 0F0E0F0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0D0E0D0E0D0D0D0D0D0D0D0D0D0D
+ 0C0C0D0C0C0C0C0C0C0C0C0C0B0C0C0B0C0B0C0B0B0B0C0B0B0B0B0B0B0B0B0B
+ 0B0B0B000B0B13F3F3190E0E0E0D0E0E0E0E0E0F0E0E0F161717171717151310
+ 0F0E0E0E0F0E0E0E0E0E0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0E0D0D0D0E0D0E
+ 0D0D0D0D0D0D0D0D0E0E0F0E0E13171717171715110C00000000000000000D16
+ 171717171717150F0E0E0E0E0E0E0E0E0F0E0E0E0F0E0E141717171717150B00
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000000000000D13171717170F0E0E
+ 0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E0E0E0E0D0E0E0E0D0E0D
+ 0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D
+ 0D0D0D0E0D0E0D0E0D0E0D0E0E0E0E0E13171717171000000000000000000000
+ 000000000000000000000000000000000000000000000000000FF3F396141514
+ 1514151414141414141414141414131413141313141313131313131313131311
+ 1313111311111111111111111111111111101110111011101010101010101010
+ 10100F100F100F0F100F0F0F0F0F0F0F0F0F0E0F0F0E0F0F0E0E0F0E0E0E0E0E
+ 0E0E0E0E0E0D0E0D0E0D0D0D0D0D0D0D0D0D0D0D0D0C0C0D0C0C0C0C0C0C0C0C
+ 0C0C0C0B0C0C0B0C0B0C0B0C0B0F0B0B0B0B0B0B0B0B0B0B000B0BF3F3960E0D
+ 0E0E0D0E0E0E0E0E0E0F0E0F151514100F0E0E0E0E0F0E0E0E0F0E0F0E0E0E0D
+ 0D0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0E0E0E
+ 0F101617171717171717140E000000000B1317171717171716110E0F0E0F0E0F
+ 0E0F0D0D0D0E0F0E0E0E0F0E111717171717160B000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000C17171717100E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0D0E0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E
+ 0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0E0D0D0D0D0D0D0D0D0E0E
+ 0E0F0E0F0E16171717170C000000000000000000000000000000000000000000
+ 0000000000000000000000000017F3F31A151514151414151414141414141414
+ 1414141413141314131313131313131313131313111313111311131111111111
+ 11111111111110111011101011101010101010101010100F100F100F0F0F0F0F
+ 0F0F0F0F0F0F0F0F0F0E0F0E0F0E0E0F0E0E0E0E0E0E0E0E0E0E0D0E0D0E0E0D
+ 0D0D0D0D0D0D0D0D0D0D0C0C0D0C0C0C0C0C0C0C0C0C0B0C0C0B0C0B0C0B0B0D
+ 95970B0B0B0B0B0B0B0B0B0B0B000BD0F3D20E0E0D0E0E0D0E0E0E0F0E0E0E0E
+ 0E0F0E0E0E0E0F0E0E0E0F0E0E0E0E0E0F0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D
+ 0D0D0E0D0D0D0D0D0E0D0D0D0D0D0D0D0D0F0E0E0E0F15171717171717171717
+ 150E0B0E16171717171717140F0F0E0E0E0E0E0E0E0D0D0C0D0C0E0E0F0E0E0E
+ 0F101617171717160C0000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0017171717110F0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E0E0E
+ 0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D
+ 0E0D0E0D0D0E0D0D0E0D0E0D0E0D0E0D0E0D0D0E0E0E0E0E0F1017171717160B
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0091F3F315151514151514151414141414171414141414141314141314131413
+ 1313131313131313131113111311131111111111111111111111111011101110
+ 1010101010101010101010100F100F100F100F0F0F0F0F0F0F0F0F0F0E0F0F0E
+ 0F0F0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0D0E0D0E0D0D0D0D0D0D0D0D0D0D0C
+ 0C0D0C0C0C0C0C0C0C0C0C0C0C0B0C0C0B0C0DD2F3F00B0B0B0B0B0B0B0B0B0B
+ 0B0B0092F3F30E0E0E0D0E0E0D0E0E0E0E0F0E0F0E0E0E0F0E0E0E0F0E0E0E0F
+ 0E0F0E0E0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0E0D0E0D0D0D0D0D
+ 0D0D0D0D0D0E0E0F0E0E0E0F131616171717171717171717171717171716100E
+ 0E0E0E0F0E0F0E0E0C0D0C0D0D0C0D0E0E0E0F0E0E0E101617171717150C0000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000000014171717130E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0D0E0D0E0E0D0E0E0D0E
+ 0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0D0D0E
+ 0D0E0D0E0D0E0D0D0E0E0F0E0E0E1417171717140B0000000000000000000000
+ 00000000000000000000000000000000000000000007F3D31515151514151415
+ 1415141414D29815141414141413141314131314131313131313131313131311
+ 1311131113111111111111111111111110111011101110101010101010101010
+ 100F100F100F100F0F0F0F0F0F0F0F0F0F0F0F0E0F0E0F0E0E0F0E0E0E0E0E0E
+ 0E0E0E0E0D0E0D0E0D0D0D0D0D0D0D0D0D0D0D0D0C0C0D0C0C0C0C0C0C0C0C0C
+ 0B0C0C0B0C11E8F3F3F3110B0B0B0B0B0B0B0B0B0B0B0B19F3F3160D0E0E0D0E
+ 0E0D0E0E0E0E0E0E0E0F0E0E0F0E0E0E0F0E0E0E0E0D0D0E0D0E0D0D0E0D0D0E
+ 0D0D0E0D0D0E0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0E0E0E0E0F0E0E
+ 0E0E1114171717171717171717171717130F0E0F0E0F0E0E0E0E0D0C0D0D0C0D
+ 0C0D0C0D0D0E0E0E0F0E0E0F1617171717160B00000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000013171717150E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E
+ 0E0E0E0D0E0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E
+ 0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0E0D0D0D0D0D0D0D0E0D0E0E0E0E
+ 0F0E0F1517171717140B00000000000000000000000000000000000000000000
+ 000000000000000000E9F3D015151415151514151415141514F3F3F090141414
+ 1414141314131413131313131313131313131311131311111311111111111111
+ 111111111110111011101110101010101010101010100F100F100F0F100F0F0F
+ 0F0F0F0F0F0F0E0F0F0E0F0F0E0E0F0E0E0E0E0E0E0E0E0E0E0D0E0D0E0E0D0D
+ 0D0D0D0D0D0D0D0D0D0C0C0D0C0C0C0C0C0C0C0C0C0C0C0B11F0F3F3F3F31A0B
+ 0C0B0B0B0B0B0B0B0B0B0B13F3F3190E0E0D0E0E0D0E0E0D0E0E0F0E0E0E0F0E
+ 0E0E0E0E0D0E0D0E0D0E0D0D0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0E0D0D0D0D
+ 0D0D0D0E0D0D0D0D0D0D0D0D0D0E0E0F0E0E0E0F0E0E0E0E0F13161717171717
+ 1717150F0E0E0E0E0E0E0E0E0D0D0D0D0D0C0D0D0C0D0D0C0D0D0E0F0E0E0F0E
+ 101617171717160B000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000101617
+ 17160E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0E0D
+ 0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E
+ 0D0D0E0D0E0D0D0E0D0E0D0E0D0E0D0D0D0E0E0E0E0E0E101617171717140B00
+ 000000000000000000000000000000000000000000000000000000000BF3F396
+ 15151515151514151514151419F3F3F3F3CF1514141414131414131413141313
+ 1313131313131313111313111113111111111111111111111111101110111010
+ 11101010101010101010100F100F100F0F0F0F0F0F0F0F0F0F0F0F0F0F0E0F0E
+ 0F0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0D0E0D0E0D0D0D0D0D0D0D0D0D0D0C0C
+ 0D0C0C0C0C0C0C0C0C0C0B17F0F3F39FF3F3950B0B0B0B0B0B0B0B0B0B0B0B0B
+ F3F3910E0D0E0E0D0E0E0D0E0E0D0E0F0E0E0E0E0E0D0E0D0E0D0E0D0E0D0E0D
+ 0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0E0D0E0D0D0D0D0D0D0D0D0D0D
+ 0D0D0E0E0E0F0E0E0F0E0F0E0E0E0F111617171716130E0F0E0F0E0F0E0F0D0D
+ 0D0D0D0C0D0D0C0D0D0C0D0C0D0C0D0E0E0F0E0E0E0F1517171717160B000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000D171717170F0E0E0E0F0E0E0E0E0E
+ 0E0E0E0D0E0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E
+ 0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D0D0E0D0E0D
+ 0E0D0D0E0D0D0E0E0F0E0E0E101717171717160B000000000000000000000000
+ 0000000000000000000000000000000011F3F391151515151515151415141415
+ 91F3F3F3F3F3F090141414141314131413131413131313131313131313111313
+ 1111131111111111111111111111111011101110101010101010101010101010
+ 0F100F100F100F0F0F0F0F0F0F0F0F0F0E0F0F0E0F0F0E0E0F0E0E0E0E0E0E0E
+ 0E0E0E0D0E0D0E0D0D0D0D0D0D0D0D0D0D0D0D0C0C0D0C0C0C0C0C0C0C0C18F3
+ F3F39A02A7F3CF0B0C0B0C0B0B0B0B0B0B0B0B0BD3F3CF0E0E0D0E0E0D0E0E0D
+ 0E0E0D0E0E0E0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D0E0D0D0E0D0D0E0D0D0E0D
+ 0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0E0E0E0E0E0E0E
+ 0F0E0E0F0E1316150F0E0E0E0E0E0E0E0E0D0D0D0D0C0D0D0C0D0C0D0C0D0D0C
+ 0D0D0C0D0E0E0E0F0E0E0F1517171717160B0000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000B17171717100F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E
+ 0D0E0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D
+ 0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0D0D0D0D0E0D0D0E0D0E0E0E0F0E0E
+ 0E111717171717170F0000000000000000000000000000000000000000000000
+ 0000000017F3F31A15151515151515151514151495F3F370E3F3F3F3CF151414
+ 1414131413141313131313131313131313131113131113111311111111111111
+ 1111111110111011101110101010101010101010100F100F100F100F0F0F0F0F
+ 0F0F0F0F0F0F0F0E0F0E0F0E0E0F0E0E0E0E0E0E0E0E0E0E0D0E0D0E0E0D0D0D
+ 0D0D0D0D0D0D0D0D0C0C0D0C0C0C0C0C0C18F3F3F34402129FF3F30C0B0B0B0B
+ 0B0B0B0B0B0B0B0B07F3CF0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E
+ 0D0E0D0E0D0E0D0D0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0E0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0E0E0E0F0E0E0E0F0E0E0E0E0E0E0F0E0F
+ 0E0F0E0E0C0D0D0C0D0D0D0D0C0D0D0C0D0C0D0D0C0D0C0C0D0E0E0E0E0F0E0F
+ 1617171717160000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000000000016171717130E
+ 0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0D0E0E0D0E0E
+ 0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D
+ 0E0D0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0E0F0E0E0E11161717171717130C00
+ 0000000000000000000000000000000000000000000000001AF3F31515151515
+ 1515151515141515D2F3EC605DAEF3F3F3F09014141413141413141314131313
+ 1313131313131311131311131111111111111111111111111110111011101110
+ 101010101010101010100F100F100F0F100F0F0F0F0F0F0F0F0F0E0F0F0E0F0F
+ 0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0D0E0D0E0D0D0D0D0D0D0D0D0D0D0C0C0D
+ 0C0C0C0C18F3F3F34412121294F3F30F0C0B0C0B0C0B0B0B0B0B0B0B95F3F30E
+ 0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E
+ 0D0D0E0D0D0E0D0D0E0D0E0D0D0E0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0E0E0F0E0E0E0F0E0F0E0E0E0E0E0E0E0D0C0D0D0D0D0D0C0D0D
+ 0C0D0C0D0D0C0D0C0D0C0D0C0C0D0E0E0F0E0E0E0F1617171717140B00000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000013171717150E0E0F0E0E0E0E0E0E0E0E0E0E
+ 0E0E0D0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D
+ 0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D0D0E0D0D0E0D0E0D0E0D0D0E
+ 0D0D0E0D0E0E0E0F0E0E0E1016171717171717110B0000000000000000000000
+ 00000000000000000000000096F3F315151515151515151515151415D2F3DB60
+ 5D5D70E3F3F3F3CF151414131413141313131313131313131313131311131311
+ 131113111111111111111111111110111011101011101010101010101010100F
+ 100F100F0F0F0F0F0F0F0F0F0F0F0F0F0F0E0F0E0F0E0E0F0E0E0E0E0E0E0E0E
+ 0E0E0D0E0D0E0D0D0D0D0D0D0D0D0D0D0D0D0C0C0D0C0C19F3F3F34412121212
+ 3CF3F3140C0B0B0C0B0B0B0B0B0B0B0B90F3F30E0D0E0E0D0E0E0D0E0E0D0E0E
+ 0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0E0F0E
+ 0E0E0E0F0E0F0E0E0D0D0D0D0D0C0D0D0D0D0C0D0D0C0D0C0D0D0C0D0D0C0D0C
+ 0D0C0D0E0E0E0F0E0E101617171717140B000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000010161717170E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E
+ 0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D
+ 0E0D0E0D0E0D0D0E0D0D0E0D0D0D0D0D0D0E0D0D0E0D0D0E0D0E0E0E0F0E0E0E
+ 0F1417171717171717110C0000000000000000000000000000000000000B0E14
+ D2F3D216151515151515151515151514F3F3C16060605D5DAEF3F3F3F0901414
+ 1413141314131413131313131313131313111311131113111111111111111111
+ 11111110111011101010101010101010101010100F100F100F100F0F0F0F0F0F
+ 0F0F0F0F0E0F0F0E0F0F0E0E0F0E0E0E0E0E0E0E0E0E0E0D0E0D0E0E0D0D0D0D
+ 0D0D0D0D0D0D0D0C0C0D18F3F3F3441B1212121225F3F3180B0C0B0B0C0B0B0B
+ 0B0B0B0B18F3F3150E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D
+ 0E0D0E0D0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0E0D0E0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0E0F0E0E0E0E0E0E0D0D0D0C0D
+ 0D0D0D0C0D0D0D0C0D0C0D0D0C0D0C0D0C0D0C0D0C0C0C0C0E0E0E0F0E0E0F16
+ 171717170F000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000C17171717100E0F0E0E
+ 0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E
+ 0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E
+ 0D0E0D0E0D0D0E0D0D0E0D0D0D0D0D0E0E0F0E0E0F0E13171717171717171715
+ 100D0000000000000000000000000B0E13151717D2F3D2151615151515151515
+ 15151515F3F3BC606060605D5D70E3F3F3F3CF15141413141314131413131313
+ 1313131313131311131113111311111111111111111111111011101110111010
+ 1010101010101010100F100F100F100F0F0F0F0F0F0F0F0F0F0F0F0E0F0E0F0E
+ 0E0F0E0E0E0E0E0E0E0E0E0E0E0E0D0E0D0E0D0D0D0D0D0D0D0D0D0D0C19F3F3
+ F3441B1B121B121212F3F3910B0C0B0C0B0C0B0C0B0B0B0B14F3F3150E0E0D0E
+ 0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D0E0D0D0E0D0D0E
+ 0D0E0D0D0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0E0F0E0E0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0C0D0C0D
+ 0C0D0D0C0D0C0D0C0D0C0D0C0D0E0E0E0E0F0E15171717170B00000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000B16171717110E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0D0E0E0E0E0E0D0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E
+ 0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D
+ 0E0D0E0D0E0E0F0E0E0E0E0F151717171717171717171714130F100F100F1010
+ 1316171717171717F1F3D015151615151515151515151519F3F3A96160606060
+ 5D5D53AEF3F3F3F0901414131413141313131313131313131313131113131111
+ 1311111111111111111111111110111011101110101010101010101010100F10
+ 0F100F0F100F0F0F0F0F0F0F0F0F0E0F0F0E0F0F0E0E0F0E0E0E0E0E0E0E0E0E
+ 0E0D0E0D0E0D0D0D0D0D0D0D0D0D0D0D15F3F3F3441B1B1B121B121212F3F391
+ 0B0C0C0B0B0B0C0B0B0B0B0B14F3F3150E0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E
+ 0D0E0D0E0D0E0D0D0E0D0E0D0D0D0E0D0D0E0D0D0D0D0E0D0E0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0E
+ 0C0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0C0D0D0C0D0C0D0C0D0C0C0D0C0D0C
+ 0C0E0E0F0E0E1017171717110000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000E17
+ 171717140F0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E0E0E0E0E0D0E0E
+ 0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D
+ 0E0D0D0E0D0D0D0D0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0E0D0E0E0E0F0E0E0E
+ 0E101517171717171717171717171717171717171717171717171717F3F39616
+ 15161515151515151515151AF3F3836161606060605D5D536BDBF3F3F3CF1514
+ 1314131413141313131313131313131311131311111311111111111111111111
+ 111110111011101011101010101010101010100F100F100F0F0F0F0F0F0F0F0F
+ 0F0F0F0F0F0E0F0E0F0E0E0F0E0E0E0E0E0E0E0E0E0E0D0E0D0E0E0D0D0D0D0D
+ 0D0D0D13F0F3F3451B1B1B1B1B121B1212D6F3CF0C0B0C0B0C0B0B0C0B0B0B0B
+ 11F3F3900E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0E
+ 0D0E0D0D0E0D0D0E0D0E0D0D0D0D0E0D0D0E0D0E0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0D0C0D0D0D0D
+ 0C0D0D0C0D0D0C0D0D0C0D0D0C0C0D0C0C0D0C0D0C0E0E0E0E0F14171717170B
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000E1717171717150E0E0F0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E
+ 0E0D0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0E0D0E0D0D0E
+ 0D0D0E0D0D0E0D0D0D0D0D0D0D0E0E0E0E0F0E0F0E0E0E101417171717171717
+ 17171717171717171717171717171715F3F3961615161516151515151515151A
+ F3F383616161606060605D5D5353ABF2F3F3F091141413141313131313131313
+ 1313131313111313111113111111111111111111111111101110111010101010
+ 10101010101010100F100F100F100F0F0F0F0F0F0F0F0F0F0E0F0F0E0F0F0E0E
+ 0F0E0E0E0E0E0E0E0E0E0E0E0E0D0E0D0E0D0D0D0D0D11E9F3F3451B1B1B1B1B
+ 1B1B121B12A7F3CF0C0C0B0C0C0B0C0B0C0B0C0B0BF3F3910E0E0D0E0E0D0E0E
+ 0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0E0D0D0D
+ 0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0C0D0D0D0D0C0D0D0D0D0C0D0D0D0C0D0C0D0C0D0C0D0D0C0D
+ 0C0D0C0D0C0C0C0D0D0F0E0F0E0F171717171100000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000E1717171717150F0E0E0E0F0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D
+ 0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D
+ 0E0D0E0D0E0D0E0D0E0D0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0E0D0D0D
+ 0D0D0D0E0E0E0E0E0E0F0E0E0E0F101417171717171717171717171717171717
+ 1613100FF3F3961615161516151515151515151AF3F38368616161606060605D
+ 5D53536BDBF3F3F3D21614131413141313131313131313131313111313111311
+ 13111111111111111111111110111011101110101010101010101010100F100F
+ 100F100F0F0F0F0F0F0F0F0F0F0F0F0E0F0E0F0E0E0F0E0E0E0E0E0E0E0E0E0E
+ 0D0E0D0E0D0D0D0D0D0FD2F3F39F1C1B1B1B1B1B1B1B1B121BA7F3CF0C0C0B0C
+ 0B0C0B0C0B0B0B0B0BF3F3910E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E
+ 0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0E0D0D0D0D0E0D0D0D0D0E0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D
+ 0D0C0D0D0D0D0C0D0D0D0C0D0C0D0D0C0D0C0D0D0C0C0C0D0C0D0C0D0E0E0E0E
+ 0E14171717170B00000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000000000000E1717171717150F0E
+ 0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0D0E0E0D0E0E
+ 0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D
+ 0D0D0D0D0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0E0E0E0F0E0E0E0F
+ 0E0E0F0E0E10111315151717171716151413100F0E0F0E0EF3F3961616151615
+ 1615161515151593F3F3806868616161606060605D5D535353ABF2F3F3F09313
+ 1413141314131313131313131313131113131113111111111111111111111111
+ 1110111011101110101010101010101010100F100F100F0F100F0F0F0F0F0F0F
+ 0F0F0E0F0F0E0F0F0E0E0F0E0E0E0E0E0E0E0E0E0E0D0E0D0E0E0D0D0D97F3F3
+ A31B1B1C1B1B1B1B1B1B1B1B12D1F3CF0C0C0C0B0C0C0B0B0C0B0C0B0BF3F391
+ 0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D
+ 0D0E0D0E0D0D0E0D0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0D0D0C0D0D0C
+ 0D0C0D0D0C0D0C0C0D0C0D0C0D0C0D0D0E0F0E0F0F1717171713000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000E1717171717150F0E0E0E0E0F0E0E0E0E0E0E0E0E0E
+ 0E0E0D0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D
+ 0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D
+ 0D0E0D0D0D0D0D0D0E0D0D0D0D0D0E0E0E0F0E0E0E0F0E0E0E0F0E0E0E0E0E0E
+ 0E0E0E0F0E0E0F0E0E0E0E0FF3F39615161615161516151515151596F3F36869
+ 6868616161606060605D5D53535363DBF3F3F3D0171413141313131313131313
+ 1313131311131311131113111111111111111111111110111011101011101010
+ 101010101010100F100F100F0F0F0F0F0F0F0F0F0F0F0F0F0F0E0F0E0F0E0E0F
+ 0E0E0E0E0E0E0E0E0E0E0E0E0D0E0D0E93F3F3D61D1C1B1C1B1B1B1B1B1B1B1B
+ 1BA7F3CF0C0C0C0C0B0C0C0B0C0B0B0C0BF3F3910E0E0D0E0E0D0E0E0D0E0E0D
+ 0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0E0D0D0D0E0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0D0C0D0D0C0D0C0D0C0D0D0C0D0C0C0D
+ 0C0D0C0E0E0E0E0E14171717170C000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000000000000000000000000E1717
+ 171717150F0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E
+ 0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0E0D0E0D0E0D0E0D0E0D0E0D
+ 0E0D0E0D0E0D0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0E0D0D0D0D0D0E0D
+ 0D0D0D0D0E0E0E0F0E0E0E0F0E0E0E0F0E0F0E0F0E0F0E0E0E0F0E0E0F0E0E0E
+ F3F39616161615161615161516151596F3F37474686868616161606060605D5D
+ 53535352ABF2F3F3F09514131413141313131313131313131311131113111311
+ 111111111111111111111110111011101010101010101010101010100F100F10
+ 0F100F0F0F0F0F0F0F0F0F0F0E0F0F0E0F0F0E0E0F0E0E0E0E0E0E0E0E0E0E0D
+ 0E0D0E19F3F3EE1D1C1C1B1C1B1C1B1B1B1B1B1B1BD1F3CF0C0C0C0C0C0B0C0C
+ 0B0C0B0B0CF3F3910E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0E
+ 0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0E0D0D0E0D0E0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0D0C0D0D0D0C0D
+ 0D0D0D0C0D0C0D0C0D0D0C0D0D0C0D0C0C0D0C0C0C0C0D0F0E0F0E0F16171717
+ 1300000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000E1717171717150F0E0E0E0E0F0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E
+ 0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0D0D0D0D
+ 0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0E0D0D0D0D0D0D0E0E0E0E0E
+ 0F0E0E0E0F0E0E0E0E0E0E0F0E0E0E0F0E0E0F0EF3F396161616161516151615
+ 15151596F3F3747474696868616161606060605D5D535353525FD9F3F3F3D318
+ 1314131313131313131313131313131113111311131111111111111111111111
+ 10111011101110101010101010101010100F100F100F100F0F0F0F0F0F0F0F0F
+ 0F0F0F0E0F0E0F0E0E0F0E0E0E0E0E0E0E0E0E0E0D0E14E9F3F32E1C1C1C1C1B
+ 1C1B1C1B1B1B1B1B1BD1F3CF0C0C0C0C0B0C0C0B0C0B0C0B0BF3F3910E0E0D0E
+ 0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0E
+ 0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0C0D0D0C
+ 0D0C0C0D0C0D0C0D0C0D0E0E0E0E0E13171717170E0000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000E1717171717150F0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0D0E0E0E0E0E0D0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E
+ 0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D
+ 0D0D0D0D0E0D0D0D0D0D0E0D0D0D0D0D0D0E0D0E0E0F0E0E0E0E0F0E0F0E0E0E
+ 0F0E0E0E0E0E0D0DF3F39616161616161516151615161593F3F3827474746968
+ 68616161606060605D5D535353535273F2F3F3F3951314131413131313131313
+ 1313131113131111131111111111111111111111111011101110111010101010
+ 1010101010100F100F100F0F100F0F0F0F0F0F0F0F0F0E0F0F0E0F0F0E0E0F0E
+ 0E0E0E0E0E0E0E0E0E0FD2F3F3461C1C1C1C1C1C1B1C1B1C1B1B1B1B1BD1F3CF
+ 0C0C0C0C0C0C0C0B0C0C0B0C0BF3F3910E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E
+ 0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0E0D0D0D0D0D0E0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D
+ 0D0C0D0D0D0D0C0D0D0D0C0D0C0D0C0D0C0D0C0D0D0D0C0D0C0D0C0D0C0D0E0E
+ 0F0E0F1617171715000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000E1717171717150F0E0E
+ 0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E0E0E0E0E0D0E0E
+ 0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D
+ 0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0E0D0D0D0D0D0E0D0D0D0D0D
+ 0E0D0D0D0D0D0D0D0D0D0E0E0E0E0E0E0E0E0E0E0E0D0E0D0D0D0D0DF3F39616
+ 161616161615161615161590F3F38575747474686868616161606060605D5D53
+ 535352525FD9F3F3F3E819141314131313131313131313131113131111131111
+ 1111111111111111111110111011101011101010101010101010100F100F100F
+ 0F0F0F0F0F0F0F0F0F0F0F0F0F0E0F0E0F0E0E0F0E0E0E0E0E0E0E0E0E96F3F3
+ A31C1C1C1C1C1C1C1C1B1C1B1C1B1B1B1BD1F3CF0C0C0C0C0C0C0B0C0C0B0C0B
+ 0CF3F3910E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D
+ 0D0E0D0D0E0D0D0D0D0D0E0D0D0D0D0D0E0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0D0C0D0D0D0D0C0D0D0D
+ 0C0D0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0E0E0E0E0F11171717170E00000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000E1717171717150F0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E
+ 0E0D0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0D0D0D0D0D0E0D0D0E0D
+ 0D0E0D0D0E0D0D0D0D0D0E0D0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0DF3F3961616161616161615161515161A
+ F3F3857575747474696868616161606060605D5D53535352525270ECF3F3F396
+ 1513131313131313131313131311131311111311111111111111111111111110
+ 111011101010101010101010101010100F100F100F100F0F0F0F0F0F0F0F0F0F
+ 0E0F0F0E0F0F0E0E0F0E0E0E0E0E0E0E19F3F3D71E1C1C1C1C1C1C1C1C1C1B1C
+ 1B1C1B1B1BD1F3CF0C0C0C0C0C0C0C0C0C0B0C0C0BF3F3910E0E0D0E0E0D0E0E
+ 0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0D0E0D0D0E0D0D0E0D0D0E0D0E0D0D0D0D
+ 0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0D0D0C0D0D0C0D0D0C0D0D0C0D0C0C0C
+ 0C0C0C0C0D0E0F0E0E0E16161717150000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000000000000000E171717
+ 1717150F0E0E0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D
+ 0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D
+ 0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0E0D0D0E0D0D0E0D0E0D0D0D0D
+ 0E0D0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0DF3F39616161616161616161516161590F3F385757575747474696868
+ 616161606060605D5D5353535252525FBDF3F3F3F09014131313131313131313
+ 1313111313111311131111111111111111111111101791939393181010101010
+ 10101010100F100F100F100F0F0F0F0F0F0F0F0F0F0F0F0E0F0E0F0E0E0F0E0E
+ 0E0E0E14F0F3EE2E1D1C1D1C1C1C1C1C1C1C1C1B1C1B1C1B1BD7F3CF0C0C0C0C
+ 0C0C0C0C0B0C0C0B13F3F31A0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D
+ 0E0D0E0D0D0E0D0D0E0D0D0E0D0E0D0D0D0D0D0D0D0D0E0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D
+ 0D0D0D0C0D0D0D0C0D0C0D0C0D0C0D0D0C0D0C0D0C0D0C0D0E0E0E0F0E111717
+ 1717100000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000E1717171717150F0E0E0F0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0D0E0E0D0E0E
+ 0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0E0D
+ 0E0D0D0E0D0D0D0D0E0D0D0E0D0D0E0D0D0D0E0D0D0D0E0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0DF0F3D01616161616
+ 1616161615161590F3F3B275757575747474696868616161606060605D5D5353
+ 53535252516DE3F3F3F3D2161413131313131313131313111313111311111111
+ 1111111111111596F0F3F3F3F3F3F3F0971410101010101010100F100F100F0F
+ 100F0F0F0F0F0F0F0F0F0E0F0F0E0F0F0E0E0F0E0E0E10D2F3F3461D1C1D1C1C
+ 1C1C1C1C1C1C1B1C1B1C1B1C1BF3F3930C0C0C0C0C0C0C0C0C0C0C0B14F3F315
+ 0E0E0E0D0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0E0D0D0E0D0D0E0D0D
+ 0D0D0E0D0E0D0E0D0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0D0C0D0D0D0C0D0D0D0D0C0D0C0D0D0C0D
+ 0D0C0D0C0D0C0D0C0D0C0D0C0E0F0E0E0E16171717150B000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000E1717171717150F0E0E0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0D0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D
+ 0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0D0D0D0E0D0D0E0D0E0D0D0E0D0D
+ 0E0D0D0D0E0D0D0D0D0D0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0DCFF3D216161616161616161616151615F3F3C676
+ 76757575747474696868616161606060605D5D5353535252525251ADF2F3F3F0
+ 9513131313131313131313131113131113111311111111111597F3F3F3F3F3F3
+ F3F3F3F3F3F395131010101010100F10100F100F0F0F0F0F0F0F0F0F0F0F0F0F
+ 0F0E0F0E0F0E0E0F0E0E93F3F3A31D1D1C1D1C1D1C1C1C1C1C1C1C1C1C1B1C1B
+ 1BF3F3910C0C0C0C0C0C0C0C0C0C0B0C14F3F3150E0E0D0E0E0D0E0E0D0E0D0E
+ 0D0E0D0E0D0E0D0E0D0D0D0D0E0D0D0E0D0D0E0D0E0D0D0D0D0D0D0D0E0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0C0D0D0D0D0C0D0D0D0C0D0D0D0D0C0D0C0D0C0D0D0C0D0C0D0C0D0C0D0C0E
+ 0E0E0E0F10171717171000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000E1717171717150F0E0E0F
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E
+ 0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0E0D0E0D0E0D0E0D0E0D0E0D
+ 0E0D0E0D0E0D0E0D0E0D0D0E0D0D0D0E0D0D0E0D0D0E0D0E0D0D0D0E0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ CFF3D217161616161616161616161516F3F3CA76767575757574747469686861
+ 6161606060605D5D535353535252515262DAF3F3F3D319131313131313131313
+ 131113111311131111111493F0F3F3F3D5713A2F2F3A6ED5F3F3F3D315101010
+ 1010100F100F100F100F0F0F0F0F0F0F0F0F0F0F0E0F0F0E0F0F0E0E0F18F3F3
+ EA221D1D1D1C1D1C1D1C1C1C1C1C1C1C1C1C1B1C25F3F31A0C0D0C0C0C0C0C0C
+ 0C0C0C0C18F3F3150E0E0D0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0E
+ 0D0D0E0D0D0E0D0D0D0E0D0D0D0D0E0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0D
+ 0C0D0C0D0D0C0D0D0C0D0C0D0C0C0C0C0C0C0D0E0F0E0E0E1517171716000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000E1717171717150F0E0E0E0E0F0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E
+ 0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D
+ 0E0D0E0D0E0D0D0E0D0D0E0D0D0D0D0D0D0E0D0D0D0E0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D96F3F3161716161616161616
+ 16161615D3F3E477767676757575747474696868616161606060605D5D535353
+ 52525252515172F2F3F3F398151313131313131313131311131113111318E8F3
+ F3F3D55B323231312F2F2C2C5AE0F3F3F016101010101010100F100F100F100F
+ 0F0F0F0F0F0F0F0F0F0F0F0E0F0E0F0E10F0F3F3301D1D1D1D1D1C1D1C1D1C1C
+ 1C1C1C1C1C1C1C1B3DF3F3150D0C0D0C0C0C0C0C0C0C0C0C90F3F30E0D0E0E0E
+ 0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0E0D0E0D
+ 0E0D0D0D0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0C0D0D0D0D0C0D0D0D0D0C0D0D0D0C0D0C0D0C0D0C0D0D0C
+ 0D0C0D0C0D0C0E0E0E0F0E101717171711000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000E17171717
+ 17150F0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0D0E0E0E0E0E0D0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E
+ 0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D0D0E0D0D0E0D0D0D0E0D0D0E0D0D0D
+ 0E0D0D0E0D0D0D0E0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D91F3F317161716161616161616161616D2F3EF7776767676
+ 757575747474696868616161606060605D5D5353535352525251515CBDF3F3F3
+ F0921313131313131313131113131114CFF3F3F3F171333333323231312F2F2F
+ 2C37B9F3F3F016101010101010100F100F100F100F0F0F0F0F0F0F0F0F0F0E0F
+ 0F0E0F0ED0F3F3661D1D1D1D1D1D1D1C1D1C1D1C1C1C1C1C1C1C1C1C99F3F310
+ 0D0C0C0D0C0C0C0C0C0C0C0C93F3F30D0E0E0D0E0E0E0D0E0D0E0D0E0D0E0D0E
+ 0D0E0D0D0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0E0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D
+ 0D0D0D0C0D0D0D0D0C0D0D0C0D0D0C0D0D0C0D0C0D0C0D0C0D0C0E0F0E0E0E15
+ 171717170B000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000E1717171717150F0E0E0E0E0F0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E0E0E0E0E0D0E0E
+ 0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D
+ 0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0E0D0D0D0D0D0E0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D1AF3F31A
+ 17161716161616161616161696F3F37777777676757575757474746968686161
+ 61606060605D5D535353525252525151516ADAF3F3F3E8191313131313131313
+ 111392F0F3F3F3B83B3434333333323231312F2F2C2C2CB9F3F3E81310101010
+ 10100F10100F100F0F100F0F0F0F0F0F0F0F0F0F0F0E0F92F3F3D41E1E1D1D1D
+ 1D1D1D1D1C1D1C1D1C1C1C1C1C1C1C1B9BF3F30D0C0D0D0C0D0C0C0C0C0C0C0C
+ 07F3D20E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0E0D0D0E0D0D0E0D
+ 0D0E0D0D0E0D0E0D0D0E0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0D0C0D0D
+ 0C0D0D0C0D0C0D0C0C0D0C0D0C0E0E0E0E0F0F17171717110000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000E1717171717150F0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E
+ 0E0D0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D
+ 0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D15F3F390171716171616161616161616
+ 92F3F38D787777767676757575747474696868616161606060605D5D53535352
+ 525252515151519DF2F3F3F3D01913131313131319D3F3F3F3E0653434343433
+ 333333323231312F2F2F2C2CB9F3F3D0101010101010100F10100F100F0F0F0F
+ 0F0F0F0F0F0F0F0F0E0F15F3F3EE231E1D1E1D1D1D1D1D1D1D1C1D1C1D1C1C1C
+ 1C1C1C1CD1F3D20D0D0C0D0C0C0D0C0C0C0C0C0CE8F3CF0E0D0E0E0D0E0E0D0E
+ 0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0E
+ 0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0C0D0D0D0C0D0D0D0C0D0D0D0D0C0D0C0D0C0D0C0D0C0D0D0C0D0C0C0C0C
+ 0C0E0F0E0E0E14171717170B0000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000000E1717171717150F0E0E0E0E
+ 0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D
+ 0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D
+ 0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0D0E0D0D0E0D0D0D0D0D0D0E
+ 0D0D0E0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D10F3F39716171716171616161616161690F3F3B57878777776767575
+ 7575747474696868616161606060605D5D535353525252525151515156ADF3F3
+ F3F3CF19131692D3F3F3F3F1AA3535353434343433333333323231312F2F2C2C
+ 2CD5F3F393101010101010100F100F100F100F0F0F0F0F0F0F0F0F0F0F10E8F3
+ F3421E1E1E1E1D1E1D1D1D1D1D1D1C1D1C1D1C1C1C1C1C1CF3F3960D0D0D0C0D
+ 0D0C0D0C0C0C0C0CF3F3910E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D
+ 0E0D0E0D0D0E0D0D0E0D0D0E0D0D0D0E0D0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0D0C0D0D0D
+ 0C0D0D0D0D0C0D0C0D0D0C0D0C0D0C0D0C0D0C0D0D0E0E0F0E0F171717171300
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000E1717171717150F0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0E0D0E0E0D0E0E
+ 0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D0D
+ 0E0D0D0E0D0D0E0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0E0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0DF3F30717171717
+ 161716161616161616F3F3CD7978787777767676757575747474696868616161
+ 606060605D5D53535352525252515151515062C5F3F3F3F3F3F3F3F3F3F3C04C
+ 36363535343434343434333333323231312F2F2F2C37F1F3F318101010101010
+ 10100F100F100F100F0F0F0F0F0F0F0F0F96F3F39F1F1E1E1E1E1E1D1D1D1D1D
+ 1D1D1D1C1D1C1D1C1C1C1C2EF3F31A0D0D0D0D0C0D0C0C0D0C0C0C15F3F3190E
+ 0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0D0D0E0D0D0E0D0D0E0D0D
+ 0E0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0D0C0D0D0C0D0D0C0D0D0C
+ 0D0D0C0D0C0D0C0D0E0F0E0E0E14171717170C00000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000000000000000000E1717171717
+ 150F0E0E0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0D0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E
+ 0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0D0E0D0D
+ 0E0D0E0D0E0D0D0D0E0D0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0DCFF3E817171717171617161616161616D2F3EF
+ 797978787777767675757575747474696868616161606060605D5D5353535252
+ 52525151515150516FDAF3F3F3F3F3EBAC574A49493636353535343434343333
+ 3333323231312F2F2C2C5AF3F3E81310101010101010100F100F100F100F0F0F
+ 0F0F0F0F1AF3F3D81F1F1E1E1E1E1E1E1D1E1D1D1D1D1D1D1C1D1C1D1C1C1C48
+ F3F3150D0D0D0D0D0C0D0D0C0D0C0C18F3F3150E0E0D0E0E0D0E0D0E0D0E0D0E
+ 0D0E0D0E0D0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0E0D0D0E0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C
+ 0D0D0D0C0D0D0D0D0C0D0D0C0D0D0C0D0C0D0C0D0C0D0C0C0D0C0D0D0E0E0E0F
+ 0E17171717170C00000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000E1717171717150F0E0E0F0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E
+ 0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E
+ 0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0E0D0D0E0D0D0D0E0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D93F3F31717171717171617161616161697F3F3877979787877777676767575
+ 75747474696868616161606060605D5D535353525252525151515150504F5E9E
+ AC9E624B4A4A4A4A494936363535343434343433333333323231312F2F2F2CA2
+ F3F3931010101010101010100F100F100F0F100F0F0F0F13F0F3EE3E1F1F1F1F
+ 1E1E1E1E1E1D1E1D1D1D1D1D1D1C1D1C1D1C1CA3F3F30D0D0D0D0D0D0D0C0D0C
+ 0C0D0C93F3F30E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E
+ 0D0D0E0D0D0E0D0D0E0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0D0C0D0D0D0C0D0D0D0D0D0C
+ 0D0C0D0D0C0D0D0C0D0C0D0C0C0C0C0D0F0E0E0E0E1317171717130000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0E1717171717150F0E0E0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E
+ 0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D
+ 0D0E0D0D0E0D0D0E0D0E0D0D0D0D0D0D0D0D0D0D0E0D0D0E0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D19F3F39017171717171716
+ 171616161691F3F3B37A79797878777776767575757574747469686861616160
+ 6060605D5D535353525252525151515150504F4E4E4E4B4B4B4B4A4A4A494936
+ 363535353434343434333333323231312F2F2C37EBF3F3161010101010101010
+ 100F100F100F0F0F0F0F0FD2F3F3642020201F1F1F1E1E1E1E1E1D1D1D1D1D1D
+ 1D1D1C1D1C1D1CEEF3CF0D0D0D0D0D0D0D0D0C0D0D0C0DCFF3D20E0E0D0E0E0E
+ 0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D
+ 0E0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0C0D0D0D0D0C0D0D0D0C0D0D0D0C0D0C0D0C0D0C0D0D0C0D0C0D
+ 0C0D0C0C0E0E0F0E0E0E15171717170F00000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000E1717171717150F0E0E0F0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D
+ 0E0E0E0E0E0D0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E
+ 0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0E0D
+ 0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D13F3F39517171717171717161716161618F3F3CD7A7979
+ 7978787777767676757575747474696868616161606060605D5D535353525252
+ 525151515150504F4E4E4E4B4B4B4A4A4A4A4949363635353434343434333333
+ 33323231312F2F2F5AF3F3D0101010101010101010100F100F100F100F0F95F3
+ F3BF20211F201F1F1F1F1E1E1E1E1E1D1E1D1D1D1D1D1D1C1D1C2EF3F3920D0D
+ 0D0D0D0D0D0D0D0C0D0C0CF3F3960E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D
+ 0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0E0D0D0D0E0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D
+ 0D0C0D0D0D0C0D0D0C0D0D0C0D0D0C0D0C0C0D0C0D0C0D0C0D0E0E0F0E0E1017
+ 171717150B000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000B1717171717150F0E0E0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E0E0E0E0E0D0E0E0D
+ 0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E
+ 0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0E0D0D0E0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0DF3F3
+ D017171717171717171617161716D2F3F27A7A7A797978787777767675757575
+ 747474696868616161606060605D5D535353525252525151515150504F4E4E4E
+ 4B4B4B4B4A4A4A494936363535353434343433333333323231312F2F2CA2F3F3
+ 91101010101010101010100F100F100F1018F3F3EA2A2121202020201F1F1F1E
+ 1E1E1E1E1D1E1D1D1D1D1D1D1C1D48F3F3140E0D0D0D0D0D0D0D0D0D0C0D15F3
+ F3F80E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D
+ 0D0E0D0E0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0D0C0D0D0D0D0C0D0D0C0D0D0C0D0D
+ 0C0D0C0D0C0D0C0D0C0D0C0D0C0D0E0E0F0E0E13171717171100000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000001517171717
+ 0F0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E
+ 0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D
+ 0E0D0D0E0D0E0D0E0D0D0D0E0D0D0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0DCFF3F11717171717171717171617
+ 161695F3F38C7A7A7A7979787877777676767575757474746968686161616060
+ 60605D5D535353525252525151515150504F4E4E4E4B4B4B4A4A4A4A49493636
+ 3535343434343434333333323231312F2F38F1F3F01310101010101010101010
+ 0F100F1013F0F3F33F232121212020201F1F1F1F1E1E1E1E1E1D1D1D1D1D1D1D
+ 1D1CD7F3E80E0D0E0D0D0D0D0D0D0D0D0D0C91F3F3140D0E0E0D0E0D0E0D0E0D
+ 0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0E0D0D0D0D0D0D0E
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C
+ 0D0D0D0C0D0D0D0D0C0D0D0D0D0D0C0D0C0D0C0D0C0D0D0C0D0C0C0C0C0C0D0C
+ 0C0D0E0E0E0E0F0E16161717170C000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000F17171717100E0E0E0F0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E
+ 0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E
+ 0D0E0D0E0D0E0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0E0D0E0D0D0D0E0D0D
+ 0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D91F3F39017171717171717171716171619F3F3CB7B7A7A7A7979
+ 78787777767675757575747474696868616161606060605D5D53535352525252
+ 5151515150504F4E4E4E4B4B4B4B4A4A4A494936363535353434343433333333
+ 323231312F2F6EF3F30710101010101010101010100F1011D2F3F36E23232121
+ 2121202020201F1F1F1E1E1E1E1E1D1E1D1D1D1D1D24F3F3960E0D0E0D0E0D0D
+ 0D0D0D0D0D0DCFF3F00E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D
+ 0D0E0D0D0E0D0D0E0D0D0E0D0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0D0C0D
+ 0D0C0D0C0D0D0C0D0D0C0D0D0C0D0C0D0C0D0C0D0C0C0C0E0F0E0E0E10171717
+ 1713000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000B15171717140F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0E0D0E0E0D0E0E
+ 0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D
+ 0D0E0D0D0E0D0D0E0D0D0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0E0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D13F3F3951817
+ 1717171717171717161716E8F3EF7A7B7A7A7A79797878777776767575757574
+ 7474696868616161606060605D5D535353525252525151515150504F4E4E4E4B
+ 4B4B4A4A4A4A494936363535343434343433333333323231312F2FD5F3F39010
+ 101010101010101010100F97F3F3A52326232321212121202020201F1F1F1E1E
+ 1E1E1E1D1E1D1D1D1D48F3F3180D0E0E0D0E0D0D0D0D0D0D0D0FF3F3960D0E0E
+ 0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D
+ 0D0D0D0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0C0D0D0D0D0C0D0D0D0C0D0D0D0D0D0C0D0D0C0D0D0C0D0C0D0C
+ 0C0D0C0D0C0C0C0C0D0C0D0D0E0E0F0E0E15171717170C000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000000000000011171717170F0E0F
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0D0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E
+ 0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0E0D0D0E0D0D0E0D0D0E0D0E0D
+ 0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0DF0F3D21717171717171717171717161795
+ F3F3B17B7B7A7A7A797978787777767676757575747474696868616161606060
+ 605D5D535353525252525151515150504F4E4E4E4B4B4B4B4A4A4A4949363635
+ 35353434343434333333323231312F3AF1F3F0151010101010101010101091F3
+ F3D82D2623262323212121212020201F1F1F1F1E1E1E1E1E1D1D1D1D1DEAF3F0
+ 0E0E0D0E0D0E0D0E0D0D0D0D0D17F3F3190E0E0D0E0E0D0E0D0E0D0E0D0E0D0E
+ 0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0E0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D
+ 0D0C0D0D0D0C0D0D0D0C0D0C0D0C0D0C0D0D0C0D0C0C0D0C0D0C0D0C0D0C0C0D
+ 0E0E0E0E0F0F1617171715000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000C16171717130E0E0E0F0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E
+ 0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D
+ 0E0D0E0D0E0D0D0D0E0D0D0E0D0D0E0D0D0E0D0E0D0E0D0D0D0D0D0D0D0D0D0E
+ 0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D96F3F31818171717171717171717171619F3F3DC7C7B7A7A7A7A797978
+ 787777767675757575747474696868616161606060605D5D5353535252525251
+ 51515150504F4E4E4E4B4B4B4A4A4A4A49493636353534343434343333333332
+ 3231312F9CF3F3D31310101010101010101AF3F3F14026262626232323212121
+ 21202020201F1F1F1E1E1E1E1E1D1E1D3EF3F3930E0E0E0E0D0E0D0E0D0D0D0D
+ 0D96F3F3110E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D
+ 0E0D0D0E0D0D0D0D0D0E0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0D0C0D0D0C0D
+ 0D0C0D0D0C0D0C0C0D0C0C0C0D0C0D0C0C0D0C0C0D0E0F0E0E0E141717171717
+ 1717171717151313140F100F0F0C0C0C0B000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0013171717160F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E
+ 0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D0E0D0D0E0D
+ 0D0E0D0D0E0D0D0D0D0D0E0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D19F3F3931718171717
+ 1717171717171716D2F3F3887C7B7B7A7A7A7979787877777676767575757474
+ 74696868616161606060605D5D535353525252525151515150504F4E4E4E4B4B
+ 4B4B4A4A4A494936363535353434343433333333323231312FC2F3F307101110
+ 101010101AF3F3F343272727262626262323212121212020201F1F1F1F1E1E1E
+ 1E1E1D1EA3F3F3110E0E0E0E0E0D0E0D0E0D0D0D0DF0F3D20E0D0E0E0D0E0D0E
+ 0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0C0D0D0D0D0C0D0D0D0D0C0D0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D
+ 0C0D0C0D0C0D0C0D0C0E0E0E0F0E0F1617171717171717171717171717171717
+ 1717171717171717131413130000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000E17171717130E0F0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D
+ 0E0E0E0E0E0D0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D
+ 0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D0D0E0D0D0E0D0D0E0D0E0D0E0D0D
+ 0D0D0D0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0FF3F3D01717181717171717171717171793F3F3C7
+ 7B7B7B7B7A7A7A79797878777776767575757574747469686861616160606060
+ 5D5D535353525252525151515150504F4E4E4E4B4B4B4A4A4A4A494936363535
+ 3434343434343333333232313138E0F3F3D0131010101397F3F3F36727272727
+ 2626262623232321212121202020201F1F1F1E1E1E1E1E22F3F3CF0E0E0E0E0E
+ 0E0D0E0D0E0D0E0D17F3F3900E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D
+ 0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0E0D0D0D0E0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0D0C0D
+ 0D0D0D0D0C0D0D0C0D0D0C0D0D0C0D0C0D0C0D0C0C0C0C0D0C0D0C0C0D0C0E0E
+ 0E0E0E1317171717171717171717171717171717171717171717171717171717
+ 0D00000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000015171717160E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E0E0E0E0E0D0E0E0D
+ 0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E
+ 0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0E0D0D0D0E0D0D0E0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 97F3F31917171817171717171717171716E9F3F27C7C7B7B7B7A7A7A79797878
+ 7777767676757575747474696868616161606060605D5D535353525252525151
+ 515150504F4E4E4E4B4B4B4B4A4A4A4949363635353534343434333333333232
+ 313138E0F3F3F0969395F0F3F3F1672828282827272726262626232321212121
+ 2020201F1F1F1F1E1E1E1E9AF3F3190E0E0E0E0E0E0E0E0D0E0D0E0D96F3F311
+ 0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E
+ 0D0D0D0D0E0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0C0D0C0D0D0C0D0D0C
+ 0D0D0C0C0C0D0C0D0C0D0C0C0D0C0D0C0C0D0D0F0E0F0E0F1617171717171717
+ 1717171717171717171717171717171717171717110000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000F17
+ 171717110E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E
+ 0D0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D
+ 0E0D0D0D0D0E0D0D0D0D0D0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D19F3F3931817171817171717
+ 171717171796F3F3B67C7C7C7B7A7A7A7A797978787777767675757575747474
+ 696868616161606060605D5D535353525252525151515150504F4E4E4E4B4B4B
+ 4A4A4A4A4949363635353434343434333333333232313138D5F3F3F3F3F3F3F3
+ E041292828282827272727262626232323212121212020201F1F1F1F1E1E24EE
+ F3E80E0E0E0E0E0E0E0E0E0E0D0E0D0EE9F3D20E0E0D0E0D0E0D0E0D0E0D0E0D
+ 0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0E0D0D0D0E0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D
+ 0D0C0D0D0D0C0D0D0D0D0D0C0D0D0C0D0C0D0C0D0C0C0D0C0D0C0C0D0C0D0C0D
+ 0C0C0D0C0D0C0D0E0E0E0E0E0E0E0E0F10101010131313141514151717171717
+ 1717171717171717160000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000B15171717160E0E0E0E0F0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E
+ 0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E
+ 0D0E0D0E0D0E0D0E0D0D0E0D0E0D0D0E0D0D0E0D0D0E0D0E0D0D0E0D0E0D0D0D
+ 0D0D0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0FE9F3E81718171718171717171717171718F0F3EF7D7C7C
+ 7C7B7B7A7A7A797978787777767676757575747474696868616161606060605D
+ 5D535353525252525151515150504F4E4E4E4B4B4B4B4A4A4A49493636353535
+ 3434343434333333323231312F6EE0F3F3F3E06E292B29292928282827272727
+ 262626232323212121212020201F1F1F1F1E9AF3F3920E0F0E0E0E0E0E0E0E0E
+ 0D0E0D19F3F3900E0D0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E
+ 0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0D0C0D0D0D0C0D0D0D0C
+ 0D0C0D0D0C0D0C0D0D0C0D0C0C0D0C0C0D0C0D0C0D0C0D0C0C0D0C0D0F0E0F0E
+ 0F0E0E0E0E0E0E0F0E0E0E0E0E0F0E0E0E0E0F101010131313171717170D0000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000001016171717110E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0D0E0E0D0E0E0D
+ 0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D0D0D
+ 0D0E0D0D0E0D0D0E0D0D0E0D0E0D0D0D0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D96F3F3
+ 901718171718171717171717171796F3F3B67D7C7C7C7B7A7A7A7A7979787877
+ 77767675757575747474696868616161606060605D5D53535352525252515151
+ 5150504F4E4E4E4B4B4B4A4A4A4A494936363535343434343433333333323231
+ 31312F2C2C2C2C2B2B2B29292929282828272727272626262323232121212120
+ 20201F1F1F24EEF3F0100E0E0E0E0E0E0E0E0E0E0E0E0ECFF3F30F0E0E0D0E0D
+ 0E0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0E
+ 0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0D0C0D0D0C0D0C0D0D0C0D0C0D0C0C0D
+ 0C0C0D0C0C0D0C0C0C0D0C0D0C0C0C0C0E0E0E0E0E0F0E0F0E0F0E0E0E0F0E0F
+ 0E0E0E0F0E0E0E0E0E0E0E0F0E16171717110000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000B15171717
+ 160E0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0D0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E
+ 0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D
+ 0D0E0D0D0E0D0D0D0D0D0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D15F3F3CF1817181717181717171717
+ 171718F1F3EF897D7C7C7B7B7B7A7A7A79797878777776767675757574747469
+ 6868616161606060605D5D535353525252525151515150504F4E4E4E4B4B4B4B
+ 4A4A4A494936363535353434343433333333323231312F2F2F2C2C2C2B2B2B29
+ 29292928282827272727262626232323212121212020201F1F9AF3F3920F0E0E
+ 0F0E0E0E0E0E0E0E0E0E11F3F3960E0D0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D
+ 0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0E0D0D0D0E0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0D0C0D
+ 0D0D0D0C0D0D0C0D0C0D0D0C0D0D0C0D0C0D0C0D0C0D0C0D0C0C0D0C0D0C0C0D
+ 0C0D0C0C0E0E0F0E0E0E0E0E0E0E0E0F0E0E0E0E0E0F0E0E0F0E0F0E0F0E0E0E
+ 0E14171717150000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000001016171717110E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E
+ 0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E
+ 0D0E0D0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0E0D0D0D0D0D0E0D0D0E0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0DE8F3F0191718171817171817171717171797F3F3C77D7D7C7C7B
+ 7B7B7A7A7A797978787777767675757575747474696868616161606060605D5D
+ 535353525252525151515150504F4E4E4E4B4B4B4A4A4A4A4949363635353434
+ 34343434333333323231312F2F2C2C2C2C2B2B2B292929292828282727272726
+ 2626232323212121212020202AEEF3F0100F0E0F0E0E0E0E0E0E0E0E0E0E93F3
+ F3150E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D
+ 0D0E0D0E0D0D0D0E0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0D0D0D0C0D0D0C0D0C
+ 0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0C0D0C0C0D0C0C0C0C0E0D0E0E0E0E0E
+ 0F0E0E0E0F0E0F0E0E0E0F0E0E0E0E0E0E0F0E0F0E10171717170C0000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000B15171717160E0F0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E
+ 0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D0D0E0D
+ 0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D19F3F3961817
+ 181717181717171717171718F1F3F2897D7D7C7C7C7B7A7A7A7A797978787777
+ 767676757575747474696868616161606060605D5D5353535252525251515151
+ 50504F4E4E4E4B4B4B4B4A4A4A49493636353535343434343333333332323131
+ 2F2F2F2C2C2C2B2B2B2929292928282827272727262626232323212121212020
+ A4F3F31A0E0F0E0E0F0E0F0E0E0E0E0E0E0FF0F3E80E0D0E0E0D0E0D0E0D0E0D
+ 0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0E0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0C0D0D0D0C0D0D0D0D0C0D0D0C0D0C0D0C0D0D0C0D0D0C0C0D0C0D0C0C0C0D
+ 0C0D0C0D0C0C0D0C0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0D0C0D0C0E0D0D0E0E
+ 0E0E0E0F0E0E0E0E0E0F17171717100000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000000001016171717110E
+ 0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D
+ 0E0E0E0E0E0D0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D
+ 0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D
+ 0E0D0D0E0D0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0FE9F3E91817181718171718171717171717
+ 95F3F3DD7E7D7D7C7C7C7B7B7A7A7A7979787877777676757575757474746968
+ 68616161606060605D5D535353525252525151515150504F4E4E4E4B4B4B4A4A
+ 4A4A494936363535343434343433333333323231312F2F2C2C2C2C2B2B2B2929
+ 292928282827272727262626232323212121213EF3F3E80F0E0F0F0E0E0F0E0E
+ 0E0E0E0E0E92F3F3190E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E
+ 0D0D0E0D0D0E0D0D0E0D0D0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0D0C0D0D0D0C0D0D0D0D
+ 0D0C0D0D0C0D0C0D0D0C0D0C0D0C0C0C0D0C0D0C0D0C0C0D0C0D0C0D0C0C0C0D
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0E0F0E0E0E1417
+ 1717140000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000B15171717160F0E0E0E0F0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0E0E0D0E0E0D
+ 0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E
+ 0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0E0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D91F3F3931817181718171718171717171717E8F3F3AF7E7D7D7C7C7C7B
+ 7A7A7A7A797978787777767676757575747474696868616161606060605D5D53
+ 5353525252525151515150504F4E4E4E4B4B4B4B4A4A4A494936363535353434
+ 343434333333323231312F2F2F2C2C2C2B2B2B29292929282828272727272626
+ 26232323212121D8F3F3170F0F0E0F0E0F0E0F0E0F0E0E0E0EE8F3F00F0E0D0E
+ 0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D
+ 0D0D0D0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0C0D0D0D0D0C0D0D0D0C0D0D0D0C0D0C0D0D0C0D0C0D0D0C
+ 0C0D0C0D0C0D0C0C0C0D0C0D0C0C0D0C0D0C0C0C0C0D0C0D0C0D0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0D0E0F0E0F11171717170B0000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00001016171717130E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E
+ 0D0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D
+ 0E0D0D0E0D0D0E0D0E0D0D0E0D0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0EF3F3E91818171817
+ 18171718171717171791F3F3EF8A7E7D7D7C7C7B7B7B7A7A7A79797878777776
+ 7675757575747474696868616161606060605D5D535353525252525151515150
+ 504F4E4E4E4B4B4B4A4A4A4A494936363535343434343433333333323231312F
+ 2F2C2C2C2C2B2B2B2929292928282827272727262626232323219AF3F3980F0E
+ 0F0F0F0E0F0E0E0F0E0E0E0E19F3F3910E0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E
+ 0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D
+ 0D0D0D0C0D0D0D0C0D0D0C0D0C0D0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C
+ 0D0C0C0C0C0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0E0E0E0E0F171717170E0000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000B15161717160F0E0E0F
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E
+ 0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E
+ 0D0E0D0E0D0E0D0E0D0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D
+ 0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D96F3F393181718171817181717181717171797F3
+ F3CC7E7E7D7D7C7C7C7B7A7A7A7A797978787777767676757575747474696868
+ 616161606060605D5D535353525252525151515150504F4E4E4E4B4B4B4B4A4A
+ 4A494936363535353434343433333333323231312F2F2F2C2C2C2B2B2B292929
+ 292828282727272726262623233FF3F3F0110F0F0F0E0F0F0E0F0F0E0F0E0F0E
+ E8F3F00F0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0D0E0D0D0E0D0D0E0D
+ 0D0E0D0D0E0D0D0D0D0D0D0E0E0E0E0E0E0F0E0E0E0E0E0E0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0D0C0D0D0D0D0C0D0D0C0D0D0C
+ 0D0C0D0C0D0D0C0D0C0D0C0C0C0C0D0C0C0C0C0C0D0C0D0C0D0C0C0C0C0D0C0D
+ 0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0E0F0E0E0E1617171711
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000E17171717140E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0E0E0E0E0E0D0E
+ 0E0D0E0E0D0E0E0D0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0D
+ 0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0E0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 10F3F3E9181817181817171817171718171718E9F3F3B07E7E7D7D7C7C7B7B7B
+ 7A7A7A797978787777767675757575747474696868616161606060605D5D5353
+ 53525252525151515150504F4E4E4E4B4B4B4A4A4A4A49493636353534343434
+ 3434333333323231312F2F2C2C2C2C2B2B2B2929292928282827272727262626
+ 23D8F3F3180F0F0F0F0F0F0F0E0F0E0F0E0F0E92F3F3910E0E0E0D0E0E0D0E0D
+ 0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0E0F0E
+ 0E0E0F0E0E0E0F0E0F0E0E0E0F0E0E0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0C0D0D0D0C0D0D0D0D0C0D0D0D0D0D0C0D0C0D0D0C0D0D0C0D0C0C0C0C0D0C
+ 0D0C0C0D0C0D0C0D0C0D0C0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0E0E0E0F0E1417171715000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 1417171717100F0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0D0E0E0E0E0E0E0E0E0E0E0F0E0F0E0E0E0E0D0E0E0D0E0E0D0E0E0E0D0E0E
+ 0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D
+ 0E0D0D0D0D0D0E0D0D0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C91F3F39618181718171817
+ 1817171717171791F3F3F28A7E7E7D7D7C7C7B7B7B7A7A7A7979787877777676
+ 76757575747474696868616161606060605D5D53535352525252515151515050
+ 4F4E4E4E4B4B4B4B4A4A4A494936363535353434343433333333323231312F2F
+ 2F2C2C2C2B2B2B29292929282828272727272626A0F3F3980F0F0F0F0F0F0F0E
+ 0F0F0E0F0E0E10F0F3F00F0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E
+ 0D0D0E0D0D0E0D0D0E0D0D0E0D0E0E0E0E0F0E0E0F0E0E0F0E0E0E0E0E0E0F0E
+ 0E0E0E0E0E0E0E0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0D
+ 0C0D0D0C0D0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0C0D0C0C0C
+ 0C0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0D0E
+ 0E0E0E11171717170B0000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000000C17171717150E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0F0E0F0E
+ 0E0E0E0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D
+ 0E0D0D0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0E0D0D0E
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0EF0F3F119181718181718171817181717171797F3F3E5
+ 7F7E7E7D7D7C7C7B7B7B7A7A7A79797878777776767575757574747469686861
+ 6161606060605D5D535353525252525151515150504F4E4E4E4B4B4B4A4A4A4A
+ 494936363535343434343433333333323231312F2F2C2C2C2C2B2B2B29292929
+ 2828282727272747F3F3F0110F0F0F0F0F0F0F0F0F0F0E0F0E0F92F3F3910E0E
+ 0D0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D
+ 0E0E0E0F0E0E0E0F0E0E0E0E0F0E0F0E0F0E0E0E0F0E0F0E0E0E0E0E0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0D0D0C0D0C0D0D0C0D0D0C
+ 0D0D0C0D0C0C0D0C0D0C0D0C0D0C0D0C0C0D0C0D0C0D0C0C0C0D0C0D0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0F0E0F0E0F171717170D000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000001317171717110F0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0F0E0F0E0E0E0E0E0E0F0E0F0E0F0E0E0E0E0D0E0E
+ 0D0E0E0D0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0D0E0D0D0E0D
+ 0D0E0D0D0E0D0D0E0D0D0E0D0D0D0E0D0D0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D91F3
+ F398181817181817181717171817171717E8F3F3CC7F7E7E7D7D7C7C7C7B7A7A
+ 7A7A797978787777767676757575747474696868616161606060605D5D535353
+ 525252525151515150504F4E4E4E4B4B4B4B4A4A4A4949363635353534343434
+ 34333333323231312F2F2F2C2C2C2B2B2B29292929282828272740F1F3F3170F
+ 0F0F0F0F0F0F0F0F0F0E0F0F0E13F3F3E80F0E0E0D0E0E0D0E0D0E0D0E0D0E0D
+ 0E0D0E0D0E0D0D0E0D0E0D0D0E0D0D0E0D0D0E0E0F0E0E0E0E0F0E0E0E0F0E10
+ 10111110100F0E0F0E0E0E0F0E0F0E0E0F0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D
+ 0D0D0D0C0D0D0D0C0D0D0D0C0D0D0C0D0D0C0D0D0C0C0D0C0D0C0C0C0C0D0C0C
+ 0C0C0D0C0D0C0C0C0C0C0C0D0C0C0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0E0E0E0E0E1617171710000000000000000000000000000000
+ 00000000000000000000000000000000000000000000000000000000000B1617
+ 1717160F0E0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0F0E0F0E0E
+ 0E0E0F0E0F0E0F0E0E0E0E0E0E0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D
+ 0E0D0E0D0E0D0E0D0E0D0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D
+ 0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0DE8F3F390181817181718171817
+ 171817171718F1F3F3B77F7E7E7D7D7C7C7C7B7B7A7A7A797978787777767675
+ 757575747474696868616161606060605D5D535353525252525151515150504F
+ 4E4E4E4B4B4B4A4A4A4A494936363535343434343433333333323231312F2F2C
+ 2C2C2C2B2B2B292929292828282DD8F3F3910F0F100F0F0F0F0F0F0F0F0F0F0F
+ 0ED0F3F3190E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0D0E0D
+ 0D0E0D0D0E0E0E0E0E0F0E0F0E0E0F13141617171717171717171715110F0E0E
+ 0E0E0E0F0E0E0E0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0D0C0D0D
+ 0C0D0C0D0C0D0C0D0D0C0C0C0D0C0D0C0D0C0D0C0D0C0D0C0C0D0C0C0C0C0C0C
+ 0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0E0E0F0E0E
+ 1517171713000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000001016171717140E0F0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0F0E0F0E0E0E0F0E0E0F0E0E0E0E0E10111415150F0E
+ 0F0E0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E
+ 0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0E0D0D0D0D0D0D0E0D0D0E0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0C17F3F3D317181818181718171817171817171791F3F3F38F7F
+ 7E7E7D7D7C7C7C7B7A7A7A7A7979787877777676767575757474746968686161
+ 61606060605D5D535353525252525151515150504F4E4E4E4B4B4B4B4A4A4A49
+ 4936363535353434343433333333323231312F2F2F2C2C2C2B2B2B2929292928
+ 28D8F3F3970F100F0F0F0F0F0F0F0F0F0F0F0F0E18F3F3CF0E0D0E0E0D0E0E0D
+ 0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0E0D0D0E0D0D0E0E0E0F0E0E0E0E0E
+ 10151717171717171717171717171717171715110F0E0E0E0E0F0E0E0E0C0D0D
+ 0D0D0D0D0D0C0D0D0D0D0C0D0D0D0D0C0D0D0C0D0C0D0D0C0D0D0C0D0C0D0C0D
+ 0C0D0C0D0C0C0D0C0D0C0C0D0C0C0C0D0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0D0E0E0F0E131717171700000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000001517171717100E0E0F0E0E0E0E0E0E0E0E0E0F0E0F0E0E0E0F
+ 0E0E0F0E0E0E0F0E0F111315171717171717150F0E0E0F0E0E0E0E0E0D0E0E0D
+ 0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D
+ 0E0D0D0E0D0D0D0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0DCFF3F396
+ 18181718181718171817171817171793F3F3F28F7F7E7E7D7D7C7C7C7B7B7A7A
+ 7A797978787777767675757575747474696868616161606060605D5D53535352
+ 5252525151515150504F4E4E4E4B4B4B4A4A4A4A494936363535343434343434
+ 333333323231312F2F2C2C2C2C2B2B2B29292929A5F3F3D21110100F100F0F0F
+ 0F0F0F0F0F0F0F10F0F3F3140E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D
+ 0D0E0D0D0E0D0D0E0D0D0E0E0E0F0E0E0F0E1016171717171717171717171717
+ 171717171717171715110F0E0E0E0E0F0E0E0D0D0D0D0C0D0D0D0D0C0D0D0D0D
+ 0C0D0D0D0D0D0C0D0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0C0D0C0D0C0D
+ 0C0D0C0C0C0C0C0D0C0D0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0D0E0E0E0E10171717170C000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000C17171717
+ 160F0E0E0E0E0E0E0F0E0F0E0E0E0E0E0F0E0E0E0E0F0E0E1013141616171717
+ 17171717171717150F0E0E0E0F0E0E0E0E0D0E0E0D0E0E0E0D0E0D0E0D0E0D0E
+ 0D0E0D0E0D0E0D0E0D0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0E0D0D0D0D0D
+ 0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D10F0F3F01A1818171818171817181717
+ 1817171798F3F3F28F7F7E7E7D7D7C7C7C7B7A7A7A7A79797878777776767675
+ 7575747474696868616161606060605D5D535353525252525151515150504F4E
+ 4E4E4B4B4B4B4A4A4A494936363535353434343433333333323231312F2F2F2C
+ 2C2C2B2B2B2929A6F3F3E8130F100F100F100F100F0F0F0F0F0F0F95F3F3910E
+ 0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0E0F
+ 0E0E0E0F0E141717171717171717171717171717171717171717171717171510
+ 0E0F0E0E0E0E0E0D0D0D0D0D0C0D0D0D0D0C0D0D0D0D0C0D0D0C0D0C0D0C0D0D
+ 0C0D0D0C0C0D0C0C0C0C0C0C0C0D0C0C0C0D0C0C0D0C0C0D0C0D0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0F0E0F0E0F171717
+ 170D000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000001017171717140F0E0F0E0F0E0E0E0E0F
+ 0E0F0E0E0E0F0E101113151717171717171717171717171717171717150F0E0E
+ 0E0E0E0E0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D
+ 0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0C0D0D0D0D1AF3F3D318181817181817181718171718171717CFF3F3ED8A7F7E
+ 7E7D7D7C7C7C7B7B7A7A7A797978787777767675757575747474696868616161
+ 606060605D5D535353525252525151515150504F4E4E4E4B4B4B4A4A4A4A4949
+ 36363535343434343433333333323231312F2F2C2C2C2C2B2B2BA6F3F3F01610
+ 10100F100F100F0F0F0F0F0F0F0F18F3F3E80F0E0E0D0E0E0D0E0E0D0E0D0E0D
+ 0E0D0E0D0E0D0D0D0E0D0D0E0D0D0E0D0E0E0E0E0E0F0E101617171717171717
+ 15100D0C000000000C0D0F141717171717171717110E0E0F0E0E0E0E0C0D0D0D
+ 0D0C0D0D0D0D0C0D0D0D0D0C0D0D0C0D0D0C0D0C0D0C0D0D0C0C0D0C0D0C0D0C
+ 0D0C0D0C0D0C0D0C0C0C0C0C0C0C0C0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0E0E0E0E0E161717171000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000B1516171717100E0E0E0E0E0F0E0E0E0E0E0F111314171717171717
+ 1717171717171717171717151717171717150F0E0F0E0E0F0E0E0E0D0E0E0D0E
+ 0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D
+ 0E0D0D0E0D0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0CCFF3F3961818
+ 1817181817181718171718171717CFF3F3ED8E7F7E7E7D7D7C7C7C7B7A7A7A7A
+ 797978787777767676757575747474696868616161606060605D5D5353535252
+ 52525151515150504F4E4E4E4B4B4B4B4A4A4A49493636353535343434343433
+ 3333323231312F2F2F2C2C2C2BB9F3F3F0161010100F10100F100F100F0F0F0F
+ 0F11F0F3F3150E0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D
+ 0D0E0D0E0E0E0F0E0E0E1117171717171717110C000000000000000000000000
+ 0B1015171717171717140E0E0F0E0E0E0E0C0D0D0D0D0C0D0D0D0D0C0D0D0D0D
+ 0C0D0D0C0D0D0C0D0D0C0D0C0D0C0D0C0D0C0D0C0C0D0C0D0C0C0D0C0C0D0C0C
+ 0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0E0E0F0E0E151717171300000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000000000D17171717160F
+ 0E0F0E0E0E0F10131416171717171717171717171717171717171613100C0000
+ 0E1717171717150F0E0E0F0E0E0E0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D
+ 0E0D0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0C0D0D0D0D0D10F0F3F39018181818171818171817181717
+ 181717CFF3F3F28F7F7E7E7D7D7C7C7C7B7B7A7A7A7979787877777676757575
+ 75747474696868616161606060605D5D535353525252525151515150504F4E4E
+ 4E4B4B4B4A4A4A4A494936363535343434343433333333323231312F2F2C2C2C
+ B9F3F3F0161010101010100F10100F100F100F0F0FD0F3F3910E0D0E0E0D0E0E
+ 0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0D0E0E0F0E0E0F111617
+ 17171717110B000000000000000000000000000000000B0F161717171717140E
+ 0E0F0E0E0E0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0D0C0D0C0D0C0D0C0D0D0C0C
+ 0D0C0C0D0C0D0C0D0C0C0D0C0D0C0C0D0C0C0C0D0C0C0C0D0C0D0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0D0E0E0F0E14171717130000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000001117171717140E0F11141517171717171717
+ 1717171717171717171713100E0B000000000000000E1717171717150F0E0E0E
+ 0F0E0E0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D
+ 0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D
+ 0D0C0D19F3F3E81918181718181718171817171817171717CFF3F3F28F7F7E7E
+ 7D7D7C7C7C7B7A7A7A7A79797878777776767675757574747469686861616160
+ 6060605D5D535353525252525151515150504F4E4E4E4B4B4B4B4A4A4A494936
+ 363535353434343433333333323231312F2F2FB9F3F3F0161010101010101010
+ 0F10100F100F100F91F3F3D20D0E0E0D0E0E0D0E0E0E0D0E0D0E0D0E0D0E0D0E
+ 0D0D0E0D0D0E0D0D0E0D0E0E0E0E0E0F101717171717150C0000000000000000
+ 0000000000000000000000000B141717171717140E0E0F0E0E0E0D0D0D0D0C0D
+ 0D0D0C0D0D0D0D0C0D0C0D0D0C0D0D0C0D0C0D0C0C0D0C0C0C0C0C0D0C0D0C0C
+ 0C0D0C0C0C0D0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0D0E0F0E0E13171717170000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000B1516171717171717171717171717171717171717171715110F0C000000
+ 000000000000000000000E171717171715100E0E0E0E0E0E0E0E0E0D0E0D0E0D
+ 0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0D0D0C0D96F3F3D018181818
+ 18171818171817171817171717CFF3F3F2B77F7E7E7D7D7C7C7C7B7B7A7A7A79
+ 7978787777767675757575747474696868616161606060605D5D535353525252
+ 525151515150504F4E4E4E4B4B4B4A4A4A4A4949363635353434343434343333
+ 333232313138E0F3F3F016101010101010101010100F10100F0F1017F3F3F011
+ 0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0E0F
+ 0E0F0E101717171717130B000000000000000000000000000000000000000000
+ 0000111717171717110F0E0E0F0E0D0D0D0D0D0C0D0D0D0D0C0D0D0D0D0C0D0C
+ 0D0C0D0D0C0D0C0D0C0D0C0D0C0D0C0D0C0C0D0C0D0C0D0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0D0E0E0E
+ 0F10161717170B00000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000000000000C1717171717171717
+ 17171717171717171613100C000000000000000000000000000000000000000E
+ 171717171716100E0F0E0F0E0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E
+ 0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0C0D0D0D0D0C0FD2F3F396181817181817181718171817181718
+ 1717CFF3F3F3C97F7E7E7D7D7C7C7C7B7A7A7A7A797978787777767676757575
+ 747474696868616161606060605D5D535353525252525151515150504F4E4E4E
+ 4B4B4B4B4A4A4A494936363535353434343433333333323254EBF3F3E8161110
+ 101010101010101010100F10100F14F0F3F3170E0E0E0D0E0E0D0E0E0D0E0D0E
+ 0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0E0E0E0E0E0F161717171711000000
+ 0000000000000000000000000000000000000000000000111717171717100E0E
+ 0E0E0E0D0D0D0D0D0C0D0D0D0D0C0D0C0D0D0C0D0D0C0D0C0D0D0C0D0C0D0C0D
+ 0C0D0C0C0D0C0D0C0C0D0C0D0C0C0D0C0D0C0D0C0D0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0F0E0E0E10171717170C0000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000010171717171717171717171714100E0B00000000
+ 00000000000000000000000000000000000000000E171717171716110E0E0E0E
+ 0F0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D
+ 0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D
+ 0C13F0F3F392181818181817181817181717181717171793F3F3F3DF8A7E7E7D
+ 7D7C7C7C7B7B7A7A7A7979787877777676757575757474746968686161616060
+ 60605D5D535353525252525151515150504F4E4E4E4B4B4B4A4A4A4A49493636
+ 353534343434343333333371F1F3F3D31311101110111010101010101010100F
+ 1011D2F3F3930E0D0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D
+ 0D0E0D0D0E0E0F0E0F0E15171717171300000000000000000000000000000000
+ 0000000000000000000000001117171717160E0F0E0F0E0E0C0D0D0D0D0C0D0D
+ 0D0D0D0C0D0C0D0C0D0D0C0D0C0D0C0C0D0C0D0C0D0C0D0C0D0C0C0D0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0D0E0F0E0E0E171717170D0000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0014171717171715130F0C000000000000000000000000000000000000000000
+ 0000000000000000000C151717171717110F0E0E0E0E0E0E0D0E0D0E0D0E0D0E
+ 0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0E0D0D
+ 0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D17F3F3F1901818181818
+ 17181817181717181717171792F1F3F3EF8F7E7E7D7D7C7C7C7B7A7A7A7A7979
+ 78787777767676757575747474696868616161606060605D5D53535352525252
+ 5151515150504F4E4E4E4B4B4B4B4A4A4A49493636353535343434343439BAF3
+ F3F39713111011101110101010101010101010100F97F3F3CF0E0E0D0E0E0D0E
+ 0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D0D0E0D0E0E0E0E0E101717
+ 1717150B00000000000000000000000000000000000000000000000000000000
+ 001317171717130E0E0E0E0E0D0D0D0C0D0D0D0C0D0D0D0C0D0D0C0D0C0D0C0D
+ 0D0C0D0C0C0C0C0C0C0C0D0C0C0D0C0D0C0D0C0D0C0C0C0C0D0C0D0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0D0E0E0E0E0F0E0E1717
+ 1717100000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000C1513100D0B0000000000
+ 0000000000000000000000000000000000000000000000000000000000000C15
+ 1717171717110F0E0F0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E
+ 0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0E0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0C0D0D0D0C0D0D0D0C0D0D91F3F3F01918181718181718171817181718171817
+ 17F8E8F3F3F3C87E7E7D7D7C7C7C7B7B7A7A7A79797878777776767575757574
+ 7474696868616161606060605D5D535353525252525151515150504F4E4E4E4B
+ 4B4B4A4A4A4A4949363635353434343459E0F3F3F39211101111101110111010
+ 101010101010101097F3F3D20F0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E
+ 0D0E0D0D0E0D0E0D0D0E0D0E0E0F0E0F0E16171717170B000000000000000000
+ 0000000000000000000000000000000000000000000B15171717160F0F0E0E0F
+ 0D0D0D0D0D0C0D0D0D0C0D0D0C0D0D0C0D0D0C0D0C0C0D0C0D0C0D0C0D0C0C0D
+ 0C0D0C0D0C0C0C0C0D0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0E0E0E0F0E0E0E0F0E1517171710000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000B1417171717110E0E0E0E0E0D
+ 0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D
+ 0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D
+ 96F3F3E819181818181817181817181717181717171718CFF3F3F3ED8F7E7D7D
+ 7C7C7C7B7A7A7A7A797978787777767676757575747474696868616161606060
+ 605D5D535353525252525151515150504F4E4E4E4B4B4B4B4A4A4A4949363635
+ 353534A1F3F3F3E81711111111101110111011101110101010101091F3F3F014
+ 0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E
+ 0E0E0E0E11171717171000000000000000000000000000000000000000000000
+ 000000000000000000000E17171717130E0F0E0E0E0D0D0C0D0D0D0C0D0D0C0D
+ 0C0D0C0D0C0D0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0C0C0C0C0C0C
+ 0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0E0E0E0E0F
+ 0E0E0F0E0F111717171713000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000C17171717100F0E0F0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E
+ 0D0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0E
+ 0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0CCFF3F3E819181818181817
+ 18181718171718171717171792F1F3F3F3C8897D7D7C7C7B7B7B7A7A7A797978
+ 787777767675757575747474696868616161606060605D5D5353535252525251
+ 51515150504F4E4E4E4B4B4B4A4A4A4A494936363565EBF3F3F3971411111111
+ 11111110111011101010101010101AF3F3F0140D0E0E0E0D0E0E0D0E0E0D0E0E
+ 0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0E0F0E0F0E1517171716000000
+ 0000000000000000000000000000000000000000000000000000000000000015
+ 171717160E0E0E0F0E0D0D0D0D0C0D0D0D0D0C0D0D0C0D0D0C0D0C0D0C0D0C0D
+ 0C0D0C0D0C0D0C0D0C0C0C0C0C0D0C0C0D0C0C0D0C0C0C0D0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0D0E0E0E0F0E0E0E0F0E111617171717171300
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000000000000000D171717
+ 170F0E0E0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D
+ 0D0E0D0D0E0D0D0E0D0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D
+ 0D0D0C0D0D0D0C0D0D0FD2F3F3E8191818171818171817181718171817181717
+ 1718D0F3F3F3EFB77D7D7C7C7C7B7A7A7A7A7979787877777676767575757474
+ 74696868616161606060605D5D535353525252525151515150504F4E4E4E4B4B
+ 4B4B4A4A4A494955C5F3F3F3F01A111111111111111111111011101110111010
+ 10F8F3F3F3190E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D
+ 0E0D0D0E0D0D0E0E0E0E0E0F1717171710000000000000000000000000000000
+ 000000000000000000000000000000000000000E17171717110E0F0E0E0D0D0D
+ 0D0D0C0D0D0C0D0C0D0D0C0D0D0C0D0D0C0C0C0C0C0C0C0C0D0C0C0C0D0C0D0C
+ 0D0C0C0C0C0C0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0D
+ 0E0F0E0F0E0E0E0F0E1116171717171717171000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000010161717170E0E0F0E0E0E0D0E0D0E0D
+ 0E0D0E0D0E0D0E0D0E0D0D0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D
+ 0D0D0D0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0ED2
+ F3F3E8191818181818171818171817171817171717171792E9F3F3F3E5AF7D7C
+ 7C7B7B7B7A7A7A79797878777776767575757574747469686861616160606060
+ 5D5D535353525252525151515150504F4E4E4E4B4B4B4A4A4A4DAAF3F3F3F396
+ 141111111111111111111111111011101110111090F3F3F3190E0D0E0E0D0E0E
+ 0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D0D0E0D0E0E0F0E0F13
+ 161717170B000000000000000000000000000000000000000000000000000000
+ 000000000000000016171717140E0E0E0F0D0D0D0C0D0D0D0D0C0D0D0C0D0C0D
+ 0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0C0D0C0D0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0D0E0E0E0E0E0E0E0F0E1015171717
+ 17171717130C0000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000013171717150E0E0E0F0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D
+ 0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0E0D0D0E0D0D0D0D0D0D0E0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0D0ED2F3F3E81918181718181817
+ 1817181717181717181717171897F3F3F3F3E4AF7C7C7B7B7B7A7A7A79797878
+ 7777767676757575747474696868616161606060605D5D535353525252525151
+ 515150504F4E4E4E4B4B4B4DACF1F3F3F3D01713111311111111111111111111
+ 1111101110111090F3F3F3190E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E
+ 0D0E0D0E0D0E0D0E0D0D0E0D0D0D0E0E0E0E0E15171717140000000000000000
+ 0000000000000000000000000000000000000000000000000000000011171717
+ 160F0E0E0F0E0D0D0D0C0D0D0D0C0D0C0D0D0C0D0C0D0D0C0D0C0D0C0D0C0D0C
+ 0C0D0C0C0D0C0D0C0C0C0C0C0C0D0C0C0D0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0E0E0E0F0E0F0E0F0E0F1417171717171717150E0000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000000000000013171717140E0F0E
+ 0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D
+ 0D0E0D0D0E0D0D0D0D0D0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D
+ 0C0D0D0D0C0D0D0D0ED2F3F3E819181818181718181718171817181717171717
+ 171719CFF3F3F3F3E5B67C7B7B7B7A7A7A797978787777767675757575747474
+ 696868616161606060605D5D535353525252525151515150504F4E4E4E58C3F3
+ F3F3F3E89113111311111311111111111111111111111110111091F3F3F3190E
+ 0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0D0E0D0D0E
+ 0D0E0E0E0F0E0E17171717100000000000000000000000000000000000000000
+ 000000000000000000000000000000000D171717170F0F0E0E0E0D0D0D0D0C0D
+ 0D0C0D0C0D0C0D0D0C0D0C0D0C0D0C0D0C0D0C0D0C0C0D0C0C0C0C0C0D0C0C0C
+ 0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0E0E0E0F0E0E0E0E0E0F
+ 1317171717171717160F00000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000017171717130E0E0E0F0D0E0E0D0E0D0E0D0E0D0E
+ 0D0E0D0E0D0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0E0D0D0E0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0ED2F3
+ F3E99018181818171818171817181718171717171717171719CFF3F3F3F3EFC7
+ 887B7A7A7A7A797978787777767676757575747474696868616161606060605D
+ 5D535353525252525151515150504F9DDAF3F3F3F3E891131113131113131113
+ 1111111111111111111111111097F3F3F3190E0E0D0E0E0D0E0E0D0E0E0D0E0E
+ 0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0E0E0E0F0F171717170C
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000B16171717110E0E0F0E0D0D0D0D0D0C0D0D0C0D0D0C0D0C0D0C0D0C
+ 0C0C0C0C0C0C0C0C0D0C0D0C0D0C0D0C0C0C0D0C0C0C0C0C0D0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0D0E0E0F0E0E0E0F0E0F1316171717171717170F0B000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000000000000000000000B
+ 17171717100E0F0E0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D
+ 0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0E0D0D0D0E0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0D0D0ED2F3F3F1911818181817181817
+ 181717171817181717171717171719CFF3F3F3F3F3E5B4867A7A7A7979787877
+ 77767675757575747474696868616161606060605D5D53535352525252515151
+ 6AC4F1F3F3F3F3D3911313131313131113111311131111111111111111111113
+ 07F3F3F0180E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D
+ 0E0D0D0E0D0D0E0D0D0E0E0F0E0E10171717170B000000000000000000000000
+ 0000000000000000000000000000000000000000000000000016171717130E0E
+ 0E0E0D0D0D0C0D0D0C0D0D0C0D0D0C0D0D0C0C0D0C0D0C0D0C0D0C0D0C0D0C0D
+ 0C0D0C0C0D0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0D0E0F0E0E0E
+ 0E0F0E0E111616171717171717110B0000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000C171717170F0E0E0E0F0D0E0D
+ 0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D
+ 0D0D0D0E0D0D0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0D0C0D0D0D0C0D
+ 0D0D0C0D0D0D0C0D95F3F3F3F718181818171818171817181717171717171717
+ 171717171896E9F3F3F3F3F3E4B5877A79797878777776767675757574747469
+ 6868616161606060605D5D53535352525F73C4F2F3F3F3F3F397191313131313
+ 13131313131113111311131111111111111115D3F3F3F0140D0E0E0D0E0E0D0E
+ 0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0E0E0E
+ 0E0F111717171700000000000000000000000000000000000000000000000000
+ 0000000000000000000000000013171717130E0F0E0E0E0C0D0D0D0C0D0C0D0C
+ 0D0C0D0C0D0D0C0D0C0D0C0D0C0D0C0C0D0C0D0C0D0C0D0C0C0C0C0C0D0C0D0C
+ 0D0C0C0C0C0C0C0C0C0C0C0C0D0E0E0E0E0F0E0F0E0E10151717171717171713
+ 0C00000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000010161717170E0F0E0E0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D
+ 0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0E0D0D0E0D0D0D
+ 0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0C0D93F3F3
+ F3CF191818181817181817181718171718171717171717171717169207F3F3F3
+ F3F3F3EFCDB58B78787777767675757575747474696868616161606060605D5D
+ 6B84BEE3F3F3F3F3F3F3D3921514131313131313131313131311131311131111
+ 111111111118F0F3F3D2140E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D
+ 0E0D0E0D0E0D0E0D0D0E0D0D0D0E0D0D0E0D0E0F0E0E13171717170000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0013171717150E0E0F0E0E0D0C0D0D0D0C0D0D0C0D0D0C0D0C0D0C0C0D0C0D0C
+ 0D0C0D0C0C0C0C0C0C0C0C0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0D
+ 0E0E0F0E0E0E0E0E0F1517171717171717150D00000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000001017171715
+ 0E0E0F0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D
+ 0D0E0D0D0E0D0D0E0D0E0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D
+ 0D0C0D0D0D0D0C0D0D0D0C0D0D0D0C0D0C0D18F0F3F3E81A1817181817181817
+ 18171817171717171717171717171716171892CFF0F3F3F3F3F3F3F3E7DEC6B2
+ 858176757575747474696868616C8383BBC1DBF2F3F3F3F3F3F3F3D393161414
+ 13141314131313131313131313131113131113111311111193F3F3F3970F0E0E
+ 0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D
+ 0E0D0D0E0D0E0E0E0E0F11171717170000000000000000000000000000000000
+ 00000000000000000000000000000000000000000013171717150E0E0E0E0E0C
+ 0D0D0D0C0D0C0D0D0C0D0D0C0D0C0D0C0C0C0C0C0C0C0D0C0D0C0D0C0D0C0C0D
+ 0C0C0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0D0E0E0E0F0E0F0E1417171717
+ 171717160F000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000013171717140F0E0E0E0E0E0E0D0E0D0E0D
+ 0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D
+ 0D0E0D0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0D
+ 0C0D0D0C0D0D0D14E8F3F3F1F718181818171817181717181717181717171717
+ 1717171716171616169096D2F3F3F3F3F3F3F3F3F3F3F3F3F3E6E2E2E2E2F3F3
+ F3F3F3F3F3F3F3F3F3F3F3E89891151414131413141314131313131313131313
+ 1313131113111311131115D0F3F3F3920E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E
+ 0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0E0F0E0E1317
+ 1717170000000000000000000000000000000000000000000000000000000000
+ 00000000000000000013171717140E0F0E0E0E0D0D0C0D0D0C0D0C0D0C0D0C0D
+ 0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0C0C0D0C0C0C0C0D0C0C0C0C0C
+ 0C0C0C0C0C0C0C0D0E0F0E0E0F11171717171717171510000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000016171717130E0E0F0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0E
+ 0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0E0D0D0D0D0D0D0E0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0D0C0D0C0D0E0E1098F3F3
+ F3D0191818181718181718171817171717171717171717171716171617161616
+ 16909507D2F0F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3D3CF95901614
+ 14141414141414141314131413141313131313131313131313111311131AF0F3
+ F3F0180D0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E
+ 0D0E0D0E0D0E0D0D0E0D0D0E0D0E0E0E0E0F1017171717000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000141717
+ 17130E0E0F0E0D0D0D0D0C0D0D0C0D0D0C0D0D0C0D0C0D0C0D0C0D0C0D0C0D0C
+ 0D0C0D0C0D0C0C0C0C0C0D0C0D0C0C0D0C0C0C0C0C0C0C0C0C0C0C0D0E0E0E0F
+ 1317171717171717110B00000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000B16171717100E0F0E0E
+ 0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D
+ 0E0D0D0E0D0E0D0E0D0D0D0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C
+ 0D0D0D0C0D0D0D0D0C0D0D0C0D0E0E0E0E0E90F3F3F3F1921818181718181718
+ 1718171718171717171717171717161716161616161616161616159090F79696
+ 96D2D2D2D2D298969596901A1715141514151414141414141414141314141314
+ 13131313131313131313131313111314CFF3F3F3CF110E0E0E0E0D0E0E0D0E0E
+ 0D0E0E0D0E0E0D0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0D0E0D0D0E0D0D
+ 0D0D0E0F0E0E10171717170C0000000000000000000000000000000000000000
+ 000000000000000000000000000000000017171717110F0E0E0E0D0D0D0D0C0D
+ 0C0D0C0D0D0C0D0D0C0D0C0D0C0D0C0D0C0C0C0C0C0C0C0C0C0C0D0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0D0E0F0E0E131717171717130C00000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000C17171717100E0E0E0F0D0E0E0D0E0D0E0D0E0D0E0D
+ 0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0E0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0D0C0D
+ 0C0E0E0F0E0E0F14D3F3F3F3D019181817181718171817181717171717171717
+ 1717171617161616161616161616161516151516151515151515151515151515
+ 1514151415141414141414141414141414131413141314131313131313131313
+ 131390F0F3F3F3920E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E
+ 0D0E0D0E0D0E0D0E0D0E0E0D0E0D0D0E0D0D0E0D0E0D0E0E0E0F0E171717170E
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000C17171717100E0E0F0E0D0D0D0D0C0D0D0C0D0C0D0C0D0C0C0C0C0C
+ 0C0C0C0C0D0C0D0C0D0C0D0C0D0C0C0D0C0C0C0C0C0D0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0D0E0E0E0F11171717160C000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000F17
+ 1717170E0F0E0E0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D0D0E0D
+ 0D0E0D0D0E0D0D0E0D0D0E0D0E0D0D0E0D0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C
+ 0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0E0E0E0F0E15171796F3F3
+ F3F1961818181817181718171718171717171717171717171617161716161616
+ 1616161615161615161515151515151515151515151415151415141414141414
+ 141414141414141314131413141313131313131317D2F3F3F3D2140E0E0E0E0D
+ 0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D
+ 0D0E0D0D0E0D0D0E0D0E0E0F0E0E0E1617171711000000000000000000000000
+ 0000000000000000000000000000000000000000000000000F171717170E0F0E
+ 0E0E0D0D0C0D0D0C0D0D0C0D0D0C0D0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D
+ 0C0C0C0C0D0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0D0E0F0E0E13171717
+ 1300000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000010161717160E0E0F0E0E0E0D0E0D
+ 0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E
+ 0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D
+ 0D0C0D0D0D0C0D0D0C0E0F0E0E0E171717171AE8F3F3F3E99118171818171718
+ 1717181717171717171717171716171616161616161616161615161515161516
+ 1515151515151515151514151414151415141414141414141414141314141314
+ 1313131313131697F3F3F3F0920E0D0E0E0E0E0E0D0E0E0E0D0E0E0D0E0E0D0E
+ 0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0D0D0E0E
+ 0E0F0E1417171715000000000000000000000000000000000000000000000000
+ 00000000000000000000000014171717150E0E0E0F0E0C0D0D0C0D0C0D0C0D0C
+ 0D0D0C0D0C0D0C0D0C0D0C0C0D0C0D0C0D0C0D0C0C0D0C0C0C0C0C0D0C0D0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0D0E0E0E0F13171717130000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000013171717150E0E0E0E0E0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D
+ 0E0D0D0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0E0D0D0E0E0E0E0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0C0D0C0E0E0E
+ 0F0E17171717171390E9F3F3F3D3911718181718171817171817171717171717
+ 1717161716161616161616161616151616151615151515151515151515151515
+ 14151415141414141414141414141414131413141314131315F7F0F3F3F39811
+ 0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E
+ 0D0E0D0E0D0E0D0E0D0D0D0E0D0D0E0D0E0D0E0E0E0E0E10171717170E000000
+ 000000000000000000000000000000000000000000000000000000000000000C
+ 17171717110F0E0E0E0E0D0C0D0D0C0D0D0C0D0D0C0D0C0C0D0C0D0C0D0C0D0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0E
+ 0E0F0E0E15171717130000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000000000015171717130E
+ 0F0E0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D
+ 0D0E0D0D0E0D0D0E0D0E0D0D0D0D0E0F0E0E0E0F0E0E0E0E0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D
+ 0D0C0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0E0F0E0E10171717170E00000BF7F3
+ F3F3F3D391171818171718171717171717171717171717161716161616161616
+ 1616161516151516151615151515151515151515141515141514151414141414
+ 1414141414141314131415F7F0F3F3F3E8160E0D0E0E0E0E0E0D0E0E0E0E0D0E
+ 0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D0E0D
+ 0D0E0D0D0D0E0D0E0F0E0F0E1617171715000000000000000000000000000000
+ 0000000000000000000000000000000000000011171717170F0E0F0E0E0D0D0D
+ 0C0D0D0C0D0D0C0D0C0D0D0C0C0C0C0C0C0C0D0C0D0C0D0C0D0C0D0C0C0D0C0C
+ 0C0C0C0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0D0E0E0E0F1417171710000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000017171717110E0E0F0E0E0E0E0D0E0D0E0D0E
+ 0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0E0D0D0D
+ 0E0E0E0E0E0F0E0E0E0F0E0E0E0E0E0E0E0E0E0D0D0E0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C
+ 0D0D0D0C0D0E0E0E0F101717171700000000000E96F3F3F3F3D3921817181718
+ 1717181717171717171717171617161616161616161616161516161516151515
+ 151515151515151515141514151414141414141414141414141413141696F0F3
+ F3F3E8190E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D
+ 0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D0D0E0D0E0D0D0E0E0E0E0E
+ 13171717170E0000000000000000000000000000000000000000000000000000
+ 0000000000000B17171717150E0E0E0F0E0D0D0D0C0D0C0D0C0D0C0D0D0C0C0D
+ 0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0C0D0C0D0C0D0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0E0F0E0E0E1617171710000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000C17171717100F0E0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0D
+ 0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0E0D0E0E0F0E0E0E0F0E0E0E0E0F
+ 0E0E0F0E0E0E0E0E0F0E0E0E0E0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0C0D0F0E0E0E131717
+ 1717000000000000001107F3F3F3F3E996181817181717171717171717171717
+ 1716171616161616161616161615161515161516151515151515151515151514
+ 15141514151414141414141414141998F3F3F3F3E8190E0E0E0E0E0E0E0E0E0D
+ 0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E
+ 0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0F0E0F0E0F17171717150B0000000000
+ 0000000000000000000000000000000000000000000000000000131717171710
+ 0E0F0E0E0E0C0D0D0D0C0D0D0C0D0D0C0D0D0C0D0C0D0C0D0C0C0D0C0D0C0D0C
+ 0D0C0C0C0C0C0C0C0C0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0E0E0F0E0E
+ 171717170F000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000D171717170F0E0E0F0E0E
+ 0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D
+ 0D0E0D0E0D0E0D0E0E0E0E0F0E0E0E0F0E0F0E0E0F0E0E0E0F0E0F0E0E0E0F0E
+ 0E0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C
+ 0D0D0D0C0D0D0D0C0D0D0D0C0D0E0F0E0E131717171500000000000000000011
+ F7F3F3F3F3F0CF91171817171817171717171717171716171616161616161616
+ 1616151616151615151515151515151515151514151514151414141414141415
+ 93E8F3F3F3F3E8190E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E0E0E0D0E0E0D0E0E
+ 0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D
+ 0E0D0E0D0E0E0E0E0E1317171717110000000000000000000000000000000000
+ 000000000000000000000000000F17171717150E0E0E0E0F0D0D0C0D0C0D0C0D
+ 0D0C0D0C0D0C0D0C0D0C0D0C0D0C0C0C0C0C0C0C0C0D0C0C0D0C0C0C0D0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0E0E0E0F0F171717170C00000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000010161717160E0E0F0E0E0E0E0D0E0D0E0D0E0D0E0D0E0D
+ 0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0E0D0D0E0E0F0E0E
+ 0F1111100E0E0E0F0E0E0F0E0E0E0E0E0F0E0E0F0E0E0E0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D
+ 0E0E0E0F0E141717171300000000000000000000000E91E9F3F3F3F3E998F817
+ 1717171717171717171717161716161616161616161616151615151615161515
+ 151515151515151514151415141514141691CFF3F3F3F3F3CF190E0E0E0E0E0E
+ 0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D
+ 0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0E0F0E0F0E0F1617
+ 1717170E00000000000000000000000000000000000000000000000000000000
+ 0C17171717170F0F0E0F0E0E0C0D0D0C0D0D0C0D0C0D0D0C0D0C0C0C0C0C0C0C
+ 0D0C0D0C0D0C0D0C0D0C0C0C0C0C0D0C0C0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0F0E0E0E10171717170C00000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000131717
+ 17150E0E0E0E0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E
+ 0D0D0E0D0D0E0D0D0E0D0D0D0D0E0E0F0E0E0E0F131717171715141311100E0F
+ 0E0F0E0E0E0F0E0E0F0E0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C
+ 0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0C0D0D0E0F0E0E15171717130000
+ 00000000000000000000000B17D0F3F3F3F3F3E9989217171717171717171717
+ 1617161616161616161616161516161516151515151515151515151515151415
+ 141793CFF3F3F3F3F3F093110E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E0E
+ 0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D
+ 0D0E0D0D0E0D0D0E0D0E0D0E0D0E0E0E0E0E1017171717170E00000000000000
+ 000000000000000000000000000000000000000C1517171717130E0E0E0E0E0D
+ 0D0D0D0D0C0D0D0C0D0C0D0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0C
+ 0D0C0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0D0E0F0E0E1117171717
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000014171717130F0E0F0E0E0E0E0D0E0D
+ 0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0E
+ 0D0E0E0E0E0F0E131717171717171717171717171515141313130F0E0E0E0E0E
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D
+ 0D0C0D0D0D0D0C0D0E0E0E0E0F14171717100000000000000000000000000000
+ 00000E91D3F3F3F3F3F3F3D39790171717171717171617161616161616161616
+ 1615161515161516151515151515151515189298E8F3F3F3F3F3F398170E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E
+ 0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0E0D
+ 0D0E0E0F0E0F0E1317171717170E000000000000000000000000000000000000
+ 0000000000000C1517171717150E0F0E0F0E0E0D0C0D0C0D0C0D0C0D0D0C0D0C
+ 0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0C0C0D0C0C0C0C0C0C0D0C0D0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0D0E0E0F0E13171717170E0000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000017171717130E0E0E0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E
+ 0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0E0F0E0F0E0E111717171717
+ 1717171717171717171717171717140E0F0E0E0E0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0E0E0F0E
+ 0E1717171710000000000000000000000000000000000000000F92D3F3F3F3F3
+ F3F3F3E807959118161716171616161616161616161615161615161515151515
+ 199195D2F0F3F3F3F3F3F3F098190F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D
+ 0E0E0E0E0E0D0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E
+ 0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0E0E0E0E0E0E15171717
+ 171710000000000000000000000000000000000000000000000F171717171716
+ 0E0E0E0E0E0E0D0D0D0D0D0C0D0C0D0C0D0D0C0D0C0D0C0D0C0D0C0C0C0C0C0C
+ 0C0C0C0D0C0C0C0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0E0E
+ 0E0E0F1417171717171100000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000C16171717100E0F
+ 0E0E0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D
+ 0D0E0D0D0E0D0D0E0E0E0E0E0E11171717171717171717171717171717171717
+ 1717170F0E0F0E0E0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D
+ 0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0C0E0E0E0F0E171717170E000000000000
+ 000000000000000000000000000000000E1896F0F3F3F3F3F3F3F3F3F3D2D296
+ 9695909090909090909090909091969607D2E9F3F3F3F3F3F3F3F3F3D293160E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0D
+ 0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D0D0E0D0D
+ 0E0D0D0E0D0E0D0E0D0D0E0E0F0E0F0E0F151717171717140C00000000000000
+ 00000000000000000000000B131717171717160F0F0E0F0E0F0D0D0D0C0D0D0C
+ 0D0D0C0D0C0D0C0D0C0C0C0C0C0C0D0C0D0C0D0C0D0C0D0C0D0C0C0D0C0C0D0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0E0F0E0E0E10151717171717130B
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000C171717170F0E0E0F0E0E0D0E0E0D0E0D0E0D0E
+ 0D0E0D0E0D0E0D0E0D0D0D0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0E0E0F0E0F0E
+ 101617171717110C0F1013161717171717171717171717140E0E0F0E0E0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C
+ 0D0D0D0C0E0F0E0E0F171717170C000000000000000000000000000000000000
+ 00000000000000000F1793D0F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3
+ F3F3F3F3F3F3F3F3F3F3F3F0CF9216100E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E
+ 0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0E0D0D0E0D0E0D0E0D0D0D0D0D0E
+ 0E0E0E0E0E0F15171717171717110C00000000000000000000000000000B1117
+ 1717171717160F0E0E0F0E0E0E0C0D0D0D0C0D0D0C0D0D0C0D0D0C0D0C0D0C0D
+ 0C0D0C0D0C0D0C0D0C0D0C0C0C0D0C0C0C0C0C0D0C0D0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0E0E0F0E0E0F0E151717171717140C0000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 10161717170E0F0E0E0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E
+ 0D0D0E0D0D0E0D0D0E0D0D0E0D0E0E0E0E0E0E10161717171714000000000000
+ 000C0C100F131315171717170F0E0E0E0E0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0E0E0E0F10161717
+ 170C000000000000000000000000000000000000000000000000000000000000
+ 000F151A9307D3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F307CF979590180E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E
+ 0D0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0D0D
+ 0E0D0D0E0D0D0D0E0D0D0D0D0D0D0D0E0D0D0D0D0E0F0E0F0E0E0F1317171717
+ 171717140F0B00000000000000000B0E1317171717171717150F0E0F0E0E0E0E
+ 0D0D0D0C0D0D0C0D0C0D0C0D0C0D0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C
+ 0C0C0C0C0D0C0C0C0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0D0E0E0F0E0E
+ 0E0E141717171717160B00000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000011171717150E0E0E0F0E0D0E
+ 0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D
+ 0E0E0F0E0F0E0F1617171717140B000000000000000000000000000C17171717
+ 140E0F0E0E0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C
+ 0D0D0D0C0D0D0D0C0D0D0C0D0E0F0E0E10171717170000000000000000000000
+ 00000000000000000000000000000000000000000000000000000000000F1311
+ 111311111311111311110B0000000C17171717100E0F0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D
+ 0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0E0D0D0E0D0E
+ 0D0E0D0D0D0E0D0D0D0E0E0E0E0F0E0E11161717171717171717171314100F14
+ 1316171717171717171717130E0E0E0E0E0F0E0D0C0D0D0D0D0C0D0D0C0D0D0C
+ 0D0C0D0C0C0D0C0D0C0C0C0C0C0C0C0C0C0C0C0D0C0C0D0C0C0C0C0D0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0D0E0E0E0F0E0E0E111717171717170E00
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000013171717140F0E0E0E0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E
+ 0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0E0F0E0E0E0F151717171715
+ 0B00000000000000000000000000000013171717170F0E0F0E0E0E0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0D0C0D
+ 0E0E0E0F13161717170000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000B16171717110E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0D0E0E0E0E0D0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E
+ 0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0E0D0E0D0D0E0D0D0D0D0D0D0E0F
+ 0E0E0E0F0E0F1417171717171717171717171717171717171717171717150F0E
+ 0F0E0F0E0E0E0D0D0D0D0C0D0C0D0C0D0D0C0D0D0C0D0C0D0C0C0C0C0D0C0D0C
+ 0D0C0D0C0D0C0D0C0C0C0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0E0E0E0F0E0F0E1016171717171710000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000017171717
+ 130E0F0E0E0F0E0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0E0D
+ 0D0E0D0D0E0D0E0E0E0E0E0F0E1517171717160C000000000000000000000000
+ 000000000C17171717140E0E0F0E0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0C0D0D0D0D0C0D0D0D0D0C0D0D0D0C0D0D0D0D0F0E0E0E1317171714000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000016171717130F0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E
+ 0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0D0E0D0D0E
+ 0D0D0E0D0D0D0D0D0D0D0D0D0D0D0E0D0E0D0D0E0E0F0E0E0E0E0E1014171717
+ 17171717171717171717171717171715100E0F0E0E0E0E0F0E0C0D0D0C0D0D0D
+ 0D0C0D0C0D0C0D0C0D0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0C0D0C0C0C
+ 0C0D0C0D0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0E0E0E0E0E0E
+ 0F0F161617171717130000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000B16171717100E0E0F0E0E0E0E0E0E0E0D
+ 0E0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D0D0D0D0E0D0D0E0D0D0E0E0E0F0E0E0E
+ 1417171717160B00000000000000000000000000000000000013171717170F0E
+ 0E0E0E0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0D0C0D0D0D0D0C0D0D0D
+ 0D0C0D0D0D0C0D0D0E0F0E0E1417171713000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000013171717150E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E
+ 0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0E0D0E0D0E0D0D
+ 0E0D0D0D0D0D0D0D0E0E0E0F0E0F0E0E0E0F1115171717171717171717171717
+ 16130F0E0E0E0E0E0F0E0E0E0D0D0C0D0D0D0C0D0D0C0D0D0C0D0D0C0D0C0D0C
+ 0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0D0F0E0F0E0E0E0F151717171717140B00
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000C1717171716110E0E0E0F0E0E0F0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E
+ 0D0E0D0D0E0D0E0D0D0E0D0D0E0E0E0E0E0F0E1417171717170E000000000000
+ 000000000000000000000000000C17171717140E0F0E0E0E0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0C0D0D0D0D0C0D0D0D0D0C0D0D0D0D0C0D0D0C0E0E0E0F0E
+ 1517171713000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000010
+ 161717170E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D
+ 0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E
+ 0D0E0D0E0D0D0E0D0D0E0D0D0E0D0E0D0E0D0D0D0D0D0D0D0D0E0D0D0D0E0E0E
+ 0E0E0E0F0E0E0F0E0F101114151415141413100F0E0E0F0E0F0E0F0E0E0E0E0C
+ 0D0D0D0D0C0D0D0C0D0D0C0D0D0C0D0D0C0D0C0D0C0D0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0D0C0C0C0C0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0D0E0E0E0F0E0E0E141717171717160B000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000000000000F171717171717150F
+ 0E0E0F0E0E0E0E0E0E0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0E0D0D0E0D0D0E0D
+ 0E0E0F0E0E0E1316171717170E00000000000000000000000000000000000000
+ 000013171717170F0E0F0E0E0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D
+ 0D0D0C0D0D0D0D0C0D0D0D0D0C0D0D0E0E0E0E0E151717171000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000C17171717100E0F0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0D0E0E0D0E0E
+ 0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D0D0E0D0D0E0D
+ 0D0D0D0D0D0D0D0D0D0E0D0E0D0D0D0D0D0D0D0E0E0F0E0E0E0F0E0E0E0E0F0E
+ 0E0E0F0E0E0E0F0E0F0E0E0E0E0E0E0E0E0D0D0D0D0C0D0D0D0D0D0C0D0C0D0C
+ 0D0C0D0C0D0C0D0C0C0C0D0C0D0C0D0C0D0C0D0C0D0C0C0C0C0C0D0C0D0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0D0E0E0E0F0E0E
+ 0E111717171717170E0000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000B1317171717171717130F0E0E0F0E0F0E0E0E0E0E
+ 0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D0D0E0D0D0E0F0E0E0F0E11171717171710
+ 000000000000000000000000000000000000000000000C17171717140E0E0F0E
+ 0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0D0D0C0D0D
+ 0D0C0D0E0E0F0E0E171717171000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000B16171717110E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D
+ 0E0D0E0D0E0D0E0D0D0E0D0E0D0D0E0D0D0E0D0D0E0D0E0D0D0E0D0E0D0D0D0D
+ 0D0E0D0D0D0D0D0D0D0E0E0F0E0E0E0F0E0E0E0E0F0E0E0F0E0E0E0E0E0E0F0E
+ 0F0E0E0D0D0D0C0D0D0D0D0C0D0D0D0C0D0C0D0D0C0D0C0D0D0C0C0D0C0D0C0D
+ 0C0D0C0D0C0D0C0D0C0D0C0C0C0C0C0C0C0D0C0D0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0E0E0E0F0E0F0E11161717171717100000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000D1517171717171716110F0E0E0E0E0F0E0E0E0E0E0D0E0D0E0D0E0D0D0E0D
+ 0E0D0D0E0D0D0E0E0E0E0F0E1017171717171100000000000000000000000000
+ 000000000000000000000013171717170F0E0E0E0F0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0C0D0D0D0D0C0D0D0D0D0C0D0D0D0D0C0D0D0C0E0E0E0F0E17171717
+ 0D00000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000014171717
+ 140F0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0D0E0E
+ 0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D
+ 0D0E0D0D0E0D0D0E0D0E0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0E
+ 0E0E0F0E0E0F0E0E0E0F0E0E0F0E0F0E0F0E0E0E0E0D0D0D0D0D0D0C0D0D0D0D
+ 0C0D0D0C0D0D0C0D0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C
+ 0D0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0E0E0E0E0E0E0E0F1617171717171300000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000B101717171717171715
+ 110E0F0E0E0E0F0E0E0E0E0E0D0E0D0E0D0E0D0D0D0E0D0D0E0E0E0F0E0E0E10
+ 161717171713000000000000000000000000000000000000000000000000000C
+ 17171717140E0F0E0E0E0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0D0C
+ 0D0D0D0D0C0D0D0D0D0C0D0E0F0E0E0F171717170C0000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000010171717160E0E0F0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D
+ 0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D
+ 0D0D0D0D0E0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0E0E0E0E0F0E0E0E0E0F
+ 0E0E0E0E0E0E0D0D0D0D0C0D0D0C0D0D0D0C0D0D0D0D0C0D0C0D0C0D0C0D0D0C
+ 0D0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0D0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0D0F0E0F0E0F0E
+ 0F151717171717140B0000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000C131717171717171715100E0F0E0E0E0F0E0E0F
+ 0E0E0D0E0D0D0E0D0E0D0D0E0E0E0E0E0F0E101617171717140B000000000000
+ 000000000000000000000000000000000000000013171717170F0E0E0F0E0E0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0D0D0C0D0D0C0D0E
+ 0E0E0F10171717170B0000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000D17171717100E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D
+ 0E0E0E0E0D0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E
+ 0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0E0D0E0D0E0D0E0D0D0D0D0D0E0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0E0E0E0E0D0E0D0E0D0D0C0D0D0D0D0D0C
+ 0D0D0D0C0D0D0D0C0D0D0D0C0D0D0C0D0D0C0D0D0C0D0C0C0D0C0D0C0D0C0D0C
+ 0D0C0D0C0D0C0D0C0C0C0D0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0E0E0E0E0E0E0F131717171717160B0000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000D151717171717171715100E0F0E0E0E0F0E0E0E0E0E0E0D0D0E0D0D0E0D
+ 0E0E0F0E0E0F1517171717140B00000000000000000000000000000000000000
+ 00000000000000000C17171717150E0E0E0E0E0D0D0D0D0D0D0D0D0D0D0D0C0D
+ 0D0D0C0D0D0D0C0D0D0D0D0C0D0D0D0D0D0C0D0F0E0E0E111717171700000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000B16171717110E0F
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E
+ 0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0D0E0D0D0E0D0D
+ 0E0D0D0E0D0E0D0D0D0D0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0D0C0D0D0D0D0C0D0D0D0C0D0D
+ 0C0D0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0C0C0C0C0D0C0C0C
+ 0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0E0F0E0F0E0E0E131717171717160E00000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000000000000B0F16171717171717
+ 1714100E0F0E0E0E0F0E0E0E0E0E0E0D0E0D0E0E0F0E0E0E0F1517171717160B
+ 0000000000000000000000000000000000000000000000000000000000131717
+ 1717100F0E0F0E0E0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D
+ 0D0C0D0D0D0C0D0E0F0E0E131717171700000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000014171717150E0E0F0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D
+ 0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0E
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0C0D0D0D0D0C0D0D0D0D0C0D0D0C0D0C0D0C0D0C0D0D0C0D0C0D0C0D
+ 0C0D0C0D0C0D0C0D0C0D0C0D0C0C0D0C0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0E0E0E0E0F0E0E
+ 1116171717171600000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000B10171717171717171715100E0F0E0E0F0E0F
+ 0E0E0E0E0E0E0E0E0E0E0F0E1517171717150C00000000000000000000000000
+ 00000000000000000000000000000000000C17171717150E0E0E0E0E0D0D0D0D
+ 0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0D0E0E0F0E13
+ 1717171300000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0010161717170F0E0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E
+ 0E0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E
+ 0D0E0D0D0E0D0D0E0D0D0E0D0E0D0E0D0E0D0D0D0D0D0D0E0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0D0C
+ 0D0D0D0D0D0C0D0C0D0D0C0D0C0D0C0C0D0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0D0C0C0C0C0C0C0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0E0E0E0E0F0E0E0F17171717130000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000B11171717171717171716100F0E0E0E0E0F0E0F0E0E0E0F0E0F0E0E14
+ 17171717170C0000000000000000000000000000000000000000000000000000
+ 0000000000001317171717100E0F0E0E0E0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D
+ 0C0D0D0D0C0D0D0D0C0D0D0D0D0C0E0E0E0E0E15171717130000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000C17171717110E0F0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0E0E0E0D0E0E0D0E0E0D0E0E0D0E0D
+ 0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D0D0E0D0D0E0D0D0E
+ 0D0E0D0D0D0D0D0E0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0C0D0D0C0D0C0D0D
+ 0C0D0D0C0C0C0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0C0C0D0C0C0D0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0D0F0E0E0E0F0F171717170E0000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000000000B111717171717
+ 17171716130F0F0E0E0E0E0E0F0E0E0E0E0E1317171717170E00000000000000
+ 00000000000000000000000000000000000000000000000000000B1717171715
+ 0E0E0F0E0E0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D
+ 0D0C0E0E0F0E0E15171717110000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000016171717140E0E0E0F0E0E0E0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0D0E0E0D0E0E0E0D0E0D0E0E0D0E0D0E0D0E0D0E
+ 0D0E0D0E0D0D0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0E0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D
+ 0D0D0C0D0D0D0C0D0D0D0D0D0C0D0C0D0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C
+ 0D0C0D0C0D0C0D0C0C0D0C0C0D0C0C0D0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0D0E0F0E0E131717
+ 17170B0000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000B1117171717171717171714100F0E0F0E
+ 0E0E0F0E0F1117171717170E0000000000000000000000000000000000000000
+ 0000000000000000000000000000001117171717100E0E0E0F0D0D0D0D0D0D0D
+ 0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0D0D0D0E0E0E0F0E1616171710
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000001117
+ 1717160F0E0E0E0E0F0E0F0E0F0E0F0E0F0E0E0F0E0F0E0E0E0E0E0E0E0E0E0E
+ 0E0E0E0D0E0D0E0E0E0D0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E
+ 0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0D0C0D0D0D0C0D0D0D
+ 0C0D0D0C0D0D0C0D0D0C0D0C0D0C0C0D0C0D0C0D0C0D0C0D0C0D0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0E0E0E0F0E161717171300000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000B1116171717171717171716130F0E0F0E0E0E1117171717171100
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000B17171717150E0F0E0E0E0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D
+ 0D0D0C0D0D0D0D0E0E0E0E0F0E0E0E1717171710000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000D17171717110E0F0E0E0E0F0E0E
+ 0E0E0E0E0E0F0E0E0E0E0E0F0E0F0E0F0E0F0E0F0E0E0E0E0D0E0E0D0E0E0E0D
+ 0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0E0D
+ 0D0E0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0D0C0D0D0C0D0C0D0C0D0C0D0D0C0D
+ 0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0D0C0C0D0C0C0D0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0D
+ 0E0F0E0E10161717170E00000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000B0F151717
+ 1717171717171715110F0E101617171717110000000000000000000000000000
+ 0000000000000000000000000000000000000000000000001117171717100E0E
+ 0F0E0E0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0C0D0E0D0E0E0E0E0E0F0E0E
+ 0E0F0E171717170C000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000016171717150F0E0E0F0E0E0E0F0E0F0E0F0E0E0E0F0E0F0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0E0D0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E
+ 0D0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0D0C
+ 0D0D0D0D0C0D0D0C0D0C0D0D0C0D0D0C0D0C0C0C0C0D0C0D0C0D0C0D0C0D0C0D
+ 0C0D0C0C0C0C0C0C0C0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0E0E0E0E0F13171717170B0000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000E14171717171717171717171516
+ 1717171713000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000B17171717150E0E0E0E0E0D0D0D0D0D0D0D0C0D
+ 0D0D0C0D0D0D0E0E0E0E0E0E0F0E0F0E0E0E0E0F0E0E10171717170C00000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000001117171717
+ 1717171715151514131313101010100E0E0E0E0F0E0F0E0F0E0F0E0F0E0E0E0E
+ 0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E
+ 0D0D0E0D0D0D0E0D0D0D0D0E0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0D0D0D0C0D0D0C0D
+ 0D0C0D0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0C0C0D0C0C0D0C0C0D0C0C
+ 0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0E0E0F0E0E1617171713000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000C1115171717171717171717171717140B00000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 001117171717100F0E0F0E0E0D0D0D0D0D0D0D0D0E0E0E0E0E0E0E0E0F0E0F0E
+ 0E0E0E0F0E0F0E0E0E1113171717170B00000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000D17171717171717171717171717171717
+ 17171717171716151514131313100E0E0E0F0E0E0D0E0E0D0E0E0D0E0D0E0D0E
+ 0D0E0D0E0D0E0D0E0D0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0E0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0C0D0D0D0C0D0D0D0D0C0D0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0C0D0C
+ 0D0C0D0C0D0C0D0C0D0C0C0C0D0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0D0E0F0E0E10
+ 171717170E000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000B0E
+ 14171717171717171717140B0000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000B17171717150E0E0E0E0E
+ 0E0E0E0E0E0E0E0E0E0E0E0F0E0F0E0E0E0E0E0E0F0E0E0E0E0F111417171717
+ 1717170000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000016171717171717171717171717171717171717171717171717171717
+ 17160F0E0E0E0E0E0E0E0D0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0E0D
+ 0D0E0D0D0E0D0D0E0D0D0E0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0D0C0D0D0D0C0D0D0D
+ 0D0D0C0D0D0C0D0C0D0D0C0D0D0C0D0C0D0C0C0C0C0C0C0C0C0C0C0C0D0C0C0C
+ 0C0C0C0C0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0E0E0E0E0F14171717160000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000B10151617171717160C00
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000001117171717100E0F0E0E0E0E0E0E0F0E0F0E0F0E0E0E
+ 0E0E0F0E0F0E0F0E0E0F11141617171717171717171716000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000001017171717171717
+ 17171717171717171717171717171717171717171717130E0F0E0E0E0E0D0E0E
+ 0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D
+ 0E0D0D0D0E0D0E0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0C0D0D0D0D0C0D0D0D0C0D0D0D0C0D0C0D0D0C0D0C0D0C
+ 0C0C0C0C0D0C0D0C0D0C0D0C0D0C0D0C0C0D0C0C0C0D0C0C0D0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0E0F0E0E0F16171717110000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000C101517160B0000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000B17
+ 171717150E0E0F0E0F0E0F0E0E0E0E0E0E0F0E0F0E0E0E0E0E10131416171717
+ 1717171717171717171711000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000B0C0C0C100F101013131415171717171717
+ 17171717171717171717160F0E0F0E0E0E0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E
+ 0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C
+ 0D0D0D0D0C0D0D0D0C0D0D0C0D0C0D0D0C0D0D0D0C0D0C0D0C0D0C0D0C0D0C0D
+ 0C0D0C0D0C0C0D0C0C0C0C0C0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0E0E0E0F0E11171717170C
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000C0C000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000001117171717100E0E0E0E0E0E0E
+ 0F0E0F0E0E0E0E0F10131415171717171717171717171717171716130E0B0000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000C0C0C0D100F101114141717171714
+ 0E0E0F0E0E0E0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D
+ 0D0E0D0D0E0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0D0C0D0D0D0D0C0D0D0C0D0D
+ 0C0D0C0D0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0C0C0C0D0C0D0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0E0F0E0E0E161717171500000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000B17171717150F0E0F0E0F0E0E101011131415171717171717
+ 171717171717171717171714100D000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000001417171717100E0E0F0E0E0E0D0E0E0D0E
+ 0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0E
+ 0D0E0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0C0D0D0D0C0D0D0D0D0C0D0D0D0D0D0C0D0C0D0D0C0D0C0D0D0C0C0D0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0D0C0C0C0C0C0C0D0C0D0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0D0E0E0E
+ 0F10171717170F00000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000011171717
+ 17141314151517171717171717171717171717171717171717171715110E0B00
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000C17171717150E0E0E0E0E0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D
+ 0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D
+ 0D0C0D0D0C0D0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C
+ 0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0F0E0F0E0E15171717150B0000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000B171717171717171717171717171717
+ 171717171717171717171714100E0B0000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000001317171717110F0E
+ 0F0E0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E
+ 0D0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0C0D0D0D0D0C0D0D0D0C0D0D0D0D0D0C0D0C0D0D0C0D0D
+ 0C0D0D0C0C0C0D0C0D0C0D0C0D0C0D0C0D0C0C0C0C0D0C0D0C0C0D0C0D0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0D0E0E0E0E101717171711000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000011171717171717171717171717171717171717171713110F0C0000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000B17171717160F0E0E0E0F0E0E0D0E0D0E0D0E0D
+ 0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0E0D0E0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C
+ 0D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0C0D0D0C0D0D0C0C0D0C0D0C0D0C0D0C0D
+ 0C0D0C0D0C0D0C0C0C0C0C0C0D0C0C0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0E0F0E0F0E14171717
+ 170B000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000000000B151717171717
+ 17171717171717151311100C0B00000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 001016171717140E0F0E0E0E0E0E0D0E0D0E0D0E0D0E0D0E0D0D0D0E0D0D0E0D
+ 0D0E0D0D0E0D0D0E0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0D0C0D
+ 0D0C0D0C0D0C0D0C0D0D0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0D0C0D0C0D0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0D0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0D0E0E0E0E0F17171717130000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000010161715131411100F0D0C0B000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000001517171717100E0E0F0E
+ 0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0E0D0D
+ 0D0E0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0C0D0C0D0D0C0D0D0C0D0C0D0C
+ 0D0C0D0C0D0C0D0C0D0C0D0C0D0C0C0C0C0C0C0C0C0D0C0D0C0C0C0C0C0C0C0C
+ 0C0C0C0C0E0E0F0E0E0E0E0D0D0D0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0E0F
+ 0E0F0E14171717170C0000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000F17171717110F0E0E0E0E0E0D0E0D0E0D0E0D0E0D0E
+ 0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0E0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0D0C0D0D
+ 0D0C0D0D0D0D0D0C0D0D0C0D0C0D0C0D0C0D0C0C0D0C0D0C0D0C0D0C0D0C0D0C
+ 0C0D0C0C0C0D0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0E0F0E0E0E0F0E0E0E
+ 0F0E0E0E0E0E0E0D0D0D0C0C0C0C0C0C0C0D0E0E0E0E0F171717171300000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000000000000000000000110B0000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000001517
+ 1717160F0E0E0F0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D
+ 0E0D0D0E0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0D0C0D0D0D0C0D0D0D0C0D0C0D0D
+ 0C0D0D0C0D0C0D0C0C0D0C0D0C0D0C0D0C0D0C0D0C0C0D0C0C0C0C0C0C0D0C0D
+ 0C0C0C0C0C0C0C0C0C0C0E0E0E0E0F0E0E0E0F0E0E0E0F0E0E0E0E0F0E0E0E0E
+ 0E0E0E0D0D0F0E0F0E0E14171717170C00000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000BF3F3070F000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000E17171717130E0E0F0E0E0E0D0E0D
+ 0E0D0E0D0E0D0E0D0D0D0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D0D0D0E0D0D0D
+ 0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0C0D0D0D0C0D0D0D0D0C0D0D0D0C0D0D0C0D0C0D0D0C0D0D0C0D0C0D0C0C0C0C
+ 0C0C0C0C0C0C0C0D0C0C0C0D0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0D0E0E
+ 0F0E0E0E0F0E0E0E0F0E0E0F0E0F0E0E0E0F0E0F0E0E0E0E0E0E0E0E0F0F1717
+ 1717130000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000E93D3F3F3140000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000013171717160F0E0E0E0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0E0D
+ 0D0E0D0D0E0D0D0E0D0D0E0D0E0D0D0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0D0C0D0D0D0D0C
+ 0D0D0C0D0C0D0D0C0D0C0D0C0D0C0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0C0C0C
+ 0C0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0D0E0F0E0E0E0F100F0F0E0E0E0F0E0E
+ 0E0E0E0F0E0E0E0E0E0F0E0F0E0F0E0E0E15171717170C000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000000000096F3E90B0000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000C17171717130E0F
+ 0E0F0E0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D
+ 0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0D0D0D0C0D0D0C0D0C0D0D0C0D
+ 0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0C0C0D0C0C0C0D0C0C0C0C0C0C
+ 0C0C0C0D0E0E0E0E0F0E15171717161514131110100E0E0E0F0E0F0E0E0E0F0E
+ 0E0E0F0E10171717171300000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000EF3F3170000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000013171717170F0E0E0E0E0E0D0E0D0E0D0E0D0E0D
+ 0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0D0D0E0D0D0E0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D
+ 0D0C0D0D0D0D0C0D0D0C0D0C0D0C0D0D0C0D0C0D0C0C0D0C0D0C0D0C0D0C0D0C
+ 0D0C0D0C0C0C0C0D0C0C0C0D0C0C0D0C0C0C0C0C0C0C0C0E0E0F0E0E0E141717
+ 17171717171717171717171514131110100E0E0E0F0E0E0E16171717170B0000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000D3F3910000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000000000000000000000C
+ 17171717140E0F0E0F0E0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D
+ 0E0D0D0E0D0D0E0D0D0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0D0C0D0D0D0C0D0D0D0D0D0C0D0D
+ 0C0D0C0D0C0D0D0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0D0C0D0C0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0E0E0F0E0E0F11171717171717171717171717171717
+ 1717171717171715141313131717171711000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00001A1A1100000000000011F81A00000000000E1A9607961A140B000000171A
+ 17000000000011F81A00000000000E1A1A0D0000000000000B1791079891170B
+ 0000000000000011F811000E1A96071A0E00000000000007F307000000000000
+ 11F80798931A1100000000000000171A079891170B000000000B1998981A0000
+ 0F19960793190B00000000000000000000171A1A1A1A1A1A1A1A1A1700000000
+ 0011F8190000000000000000000B199307981A90191717171792920E0E0E0E0D
+ 0E0D0E0D1491910E0D0E0D0D0E1991170E0D0E0D0D0E0D0D11F896CF93170D0D
+ 0D0E0D0D0D0D0D139197CF91130D0D0D0D0D0D0D0D0D1995CF93150D0D91910D
+ 0C0D0D0D0C0D0D0D0D0C0D0D0D0C0D0D0D0C0D0C0D0D0C0D0D0C0D0C0D0C0D0C
+ 0D0C0D0C0D0C0D0C0D0C0D0C0C0C0C0C0D0C0C0C0D0C0C0C0C0C0C0C0C0E0E0E
+ 0E0E0F1017171717171717171717171717171717171717171717171717171717
+ 1717171600000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000000000F3F31A00000000000007
+ F3960000000B92F3F3F3F3F3F3F39200000007F39800000000001AF3F3000000
+ 000011F3F311000000000017E9F3F3F3F3F3F3E91A0000000000001AF31A17F3
+ F3F3F3F3F391000000000007F398000000000E98F3F3F3F3F3F3F31400000000
+ 14F0F3F3F3F3F3F31A0000000BF0F3F3F3F3000FF3F3F3F3F3F3E91700000000
+ 000000000007F3F3F3F3F3F3F3F3F3980000000000D3F3F30F00000000000000
+ 19E9F3F3F3F3F3F3E817171492F3F30E0E0E0D0E0D0E0D0E96F3F3130E0D0E0D
+ 0DF0F3E80D0D0D0E0D0D0E1AF0F3F3F3F3F3E8140D0D0D0E0D0F93F3F3F3F3F3
+ F3CF0F0D0D0D0D0D13D2F3F3F3F3F39717F3F30D0D0D0C0D0D0D0C0D0D0D0D0C
+ 0D0D0D0C0D0D0C0D0C0D0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0C0C
+ 0C0C0D0C0C0D0C0C0C0C0C0C0C0C0C0C0E0E0F0E0F0E0F1717171717110E1011
+ 1315171717171717171717171717171717171717171717100000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000F3F31A00000000000BF3F31900000007F3F31A0E0000
+ 11191100000007F39800000000001AF3F3000000000011F3F3110000000093F3
+ F3071400000F92F3F3D00B000000001AF3E9F39610000E1AF3F3910000000007
+ F3980000000BF0F3E9170B000B13910B00000014F3F3D3170B000E160F000000
+ 19F3F316000E000007170D000E93F3E90E000000000000000007F3D011131111
+ 131111100000000011F3F3F3930000000000001AF3F396100000179393161710
+ 92F3F30E0E0E0E0D0E0D0E0DE8F0F3930E0D0D0E17F3F3F3110D0E0D0E0D91F3
+ F393100D15D2F3F0130E0D0D0DCFF3F01A0F0D19E9F3D20F0D0D0D0FE8F3F019
+ 0D0E19F0E8F3F30D0C0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0C0D0D0C0D0C0D0C
+ 0D0D0C0C0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0C0C0C0C0C0D0C0D0C0C0C
+ 0C0C0C0E0E0E0E0F0E0F171717171713000000000000000B0C0E101113151717
+ 1717171717171717171715000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000000000000000000F3F3
+ 1A000000000011F3F30F000017F3F3110000000000000000000007F398000000
+ 00001AF3F3000000000011F3F3110000001AF3F31A00000000000011F0F39600
+ 0000001AF3F396000000000019F3F30D00000007F39800000093F3E90B000000
+ 0000000000000BF0F3D00B00000000000000000096F3D0000000000000000000
+ 000BF3F319000000000000000007F30700000000000000000000000093F393F3
+ E90B000000000EF3F31A0000000B17171717150E92F3F30E0E0D0E0D0E0D0E13
+ F3CFD2E80E0D0E0D96F393F31A0E0D0D0D11F3F3910D0E0D0D0FD2F3E80D0D0D
+ 19F3F3150D0D0D0D13F0F3960D0D0D91F3F3130D0D0D0D15F3F3F30D0D0D0C0D
+ 0D0D0C0D0D0D0C0D0D0D0D0D0C0D0C0D0D0C0D0D0C0D0C0D0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0D0C0C0D0C0C0D0C0C0C0C0C0C0C0C0C0C0E0E0F0E0E0E10161717
+ 1717140B0000000000000000000000000000000B0C0E10111315171717170D00
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000F3F31A00000000001AF3E9000000
+ D0F393000000000000000000000007F39800000000001AF3F3000000000011F3
+ F31100000EF3F396000000000000000019F3F3110000001AF3F30E0000000000
+ 00D3F39100000007F39800000BF3F3170000000000000000000017F3F3110000
+ 000000000000000007F307000000000000000000000BF3F31A00000000000000
+ 0007F39800000000000000000000000BF0F31197F3170000000091F3D3000000
+ 001016171717100E92F3F30E0E0E0D0E0D0E0D92F39193F3130E0D0DF0F311F3
+ D20D0E0D0E93F3E90D0D0D0D0D0D15F3F3170E0DD2F3970D0D0D0D0D0D91F3F3
+ 0F0D0DE8F3960D0D0D0D0D0D97F3F30D0D0D0D0C0D0D0D0D0C0D0D0D0C0D0D0C
+ 0D0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0C0C0C0C0C0C0C
+ 0C0C0C0C0D0C0C0C0D0E0E0E0E0F0E0F1517171717150B000000000000000000
+ 0000000000000000000000000000000B0C0C0000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000F3F31A000000000007F396000000F3F317000000000000000000
+ 000007F39800000000001AF3F3000000000011F3F311000091F3F30E00000000
+ 0000000000D0F3960000001AF3F30000000000000093F30700000007F3980000
+ 11F3F30E0000000000000000000091F3D3000000000000000000000007F39800
+ 00000000000000000E96F3F30F000000000000000007F3980000000000000000
+ 00000017F3E90017F3D00000000007F3930000000B15171717160E0E92F3F30E
+ 0D0E0D0E0D0E0DD2F31717F3930D0E13F3970EE8F3100E0D0DCFF3960D0D0D0E
+ 0D0D0DF0F3930D0DF3F3190D0D0D0D0D0D13F3F3170D0FF3F3180D0D0D0D0D0D
+ 91F3F30D0D0C0D0D0D0C0D0D0D0D0C0D0D0D0D0C0D0C0D0D0C0D0D0C0D0C0D0C
+ 0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0C0D0C0D0C0C0C0C0C0C0D0E0F0E
+ 0E0E0F1517171717160B00000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000F3F31A000000
+ 000EF3F317000011F3F31911111311111311110E000007F39800000000001AF3
+ F3000000000011F3F3110000D0F3960000000000000000000019F3F30B00001A
+ F3F3000000000000001AF3E900000007F39800001AF3F3111311111311111311
+ 0B0007F307000000000000000000000007F3980000000000000011F7F3F3F31A
+ 00000000000000000007F3980000000000000000000000D0F3910000E9F30F00
+ 0000F3F3931113111791909091160E0E92F3F30E0D0E0D0E0D0E11F3F30F0EF0
+ E80D0D93F3F80D96F3F80D0E0DF3F3910E0D0D0D0D0E0DCFF3CF0D15F3F3150D
+ 0D0D0D0D0D0DF3F3910D15F3F3150D0D0D0D0D0D91F3F30D0D0D0D0C0D0D0D0C
+ 0D0D0D0D0C0D0D0D0C0D0C0D0D0C0D0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D
+ 0C0D0C0C0C0D0C0C0C0C0D0C0C0C0C0C0C0E0E0F0E0F1617171717150C000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000F3F31A0000000B97F3D30B000013F3F3F3F3
+ F3F3F3F3F3F3F31A000007F39800000000001AF3F3000000000011F3F311000B
+ F3F319000000000000000000000FF3F31100001AF3F3000000000000001AF3F3
+ 00000007F39800001AF3F3F3F3F3F3F3F3F3F3F3110096F30700000000000000
+ 0000000007F39800000000000093F3F3F398110000000000000000000007F398
+ 000000000000000000000EF3F30F000093F393000000F3F3F3F3F3F3F3F3F3F3
+ F3CF0F0E92F3F30E0D0E0D0E0D0E1AF3D20E0D97F3140DE8F3110D17F3D20E0D
+ 0DF3F3910D0D0D0D0D0D0DCFF3CF0D15F3F3150D0D0D0D0D0D0DF3F3910D15F3
+ F3150D0D0D0D0D0D91F3F30D0D0C0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0C0D0C
+ 0D0C0D0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0D0C0C0C0C0C0C0D0C0C0C0C
+ 0C0C0C0C0C0E0E0E0E0E16171717160C00000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000F3F3071A1A92D3F3E91000000000F3F3931A1A1A1A1A1AF3F31A000007F3
+ 9800000000001AF3F3000000000011F3F3110013F3F311000000000000000000
+ 0000F3F31900001AF3F30000000000000093F3D000000007F398000011F3F31A
+ 1A1A1A1A1A93F3F31100F8F3E9000000000000000000000007F3980000000000
+ 91F3F3961000000000000000000000000007F3980000000000000000000091F3
+ D300000014F3E90B000007F3981A1A92969697E8F3CF0E0E92F3F30F0E0D0E0D
+ 0E0D97F3910E0D19F39313F3D20D0E0FF3F3110D0ECFF3960D0E0D0E0D0D0EE9
+ F3960D0DF3F3190D0D0D0D0D0D13F3F3190D0DF3F3190D0D0D0D0D0D91F3F30C
+ 0D0D0D0C0D0D0D0C0D0D0D0C0D0D0C0D0C0D0D0C0D0D0C0D0C0D0C0D0C0D0C0D
+ 0C0D0C0D0C0D0C0D0C0C0D0C0C0C0C0C0C0C0D0C0C0C0C0C0C0E0E0F0E0E1417
+ 1717140000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000000000F3F3F3F3F3F3F3F31A00
+ 00000000D0F31A00000000000BF3F311000007F3D3000000000091F3F30B0000
+ 000017F3F30E0011F3F3110000000000000000000000F3F31A00001AF3F31100
+ 0000000000D3F39300000007F39800000BF3F311000000000014F3F300000FF3
+ F3110000000000000000000007F3980000000000E9F396000000000000000000
+ 000000000007F3E907980798079891000000E9F31A00000000E9F317000091F3
+ 07000015171717E8F3920E0F91F3F3190E0D0E0D0E0FF3F3150E0D0FF3D290F3
+ 910E0D0DCFF3F80D0D93F3F00D0D0D0D0D0D15F3F3190D0DD2F3970D0D0D0D0D
+ 0D91F3F3110D0DD2F3970D0D0D0D0D0D96F3F30D0D0C0D0D0D0C0D0D0D0C0D0D
+ 0D0D0C0D0D0C0D0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0C0C0C0C0D
+ 0C0D0C0D0C0C0C0C0C0C0C0C0C0D0E0E0F0E11171717170B0000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000F3F39311131119D3F3D00B00000017F3E90B00000000
+ 19F3E900000007F3F31900000000D3F3F31A0000000007F3D3000011F3F31100
+ 00000000000000000000F3F31A00001AF3F3D0000000000019F3F31100000007
+ F39800000093F307000000000096F39600000007F3D30B000000000000000000
+ 07F3980000000000E9F31A000000000000000000000000000007F3F3F3F3F3F3
+ F3F307000014F3F30E0000000093F3D000000EF3F3110E1717171AF3F3140E0E
+ 92F3F3F0110E0D0E0D17F3F30E0D0E0D97F397F3130E0D0E1AF3D20E0D11F3F3
+ 910D0D0D0E0DCFF3F00D0D0D19F3F3150D0D0D0D0FF0F3970D0D0D19F3F3150D
+ 0D0D0D13F3F3F30D0D0D0D0C0D0D0D0C0D0D0D0C0D0D0C0D0C0D0C0D0C0D0D0C
+ 0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0C0C0C0C0C0C0D0C0D0C0C0C0C0C
+ 0C0C0F0E0E0F0F171717170D0000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000000000000000000F3F3
+ F8000000000BD0F3070000000096F3D011000019F3F31800000007F3E9E9190B
+ 0E93F3F393F31A0B0BF8F3F31A000000F3F319000000000000000000000EF3F3
+ 1100001AF3F3D3D011000E1AF3F3960000000007F3980000000BE8F3960E000B
+ F7F3F30F0000000EE9F3D3170B000E160F000F13D0F3D01113110B0092F3E914
+ 000E161700000000000000000007F39800000000000000000096F3D000000000
+ 000FF3F30E000019F3E991171790F1F3980E0F0E92F3D2F0F093910E0D96F397
+ 0E0D0D0E19F3F3E80D0D0D0D13F3F3110D0D19F3F393110D13CFF3F3170D0D0D
+ 0D96F3F01A0F0D17E8F3F0110D0D0D0DCFF3F0190E0F18F0F3F3F30D0D0C0D0D
+ 0D0C0D0D0D0C0D0D0D0C0D0C0D0D0C0D0D0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0D0C0C0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0E0E0F0E0E1617171710
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000F3F31A000000000010F3F30F0000
+ 000093F3F3F3F3F3F3910000000007F31A93F3F3F3F3F393001AF3F3F3F3F307
+ 00000000D3F3930000000000000000000017F3F30D00001AF3F30FE8F3F3F3F3
+ F3070B0000000007F398000000000BD0F3F3F3F3F3E91700000000000E98F3F3
+ F3F3F3F3190007F3F3F3F3F3F3F311000B07F3F3F3F3F3D00000000000000000
+ 0007F39800000000000000000EF3F318000000000000D3F39100000017F3F3F3
+ F3F3F3CF100E0E0E91F39317F3F3F30E0DF0F3900E0D0E0D0FF3F3930D0E0D0E
+ 0DE8F3F80E0D0D19F0F3F3F3F3F3F0170D0D0D0D0D0D93F3F3F3F3F3F3D2130D
+ 0D0D0D0D0FCFF3F3F3F3F3D293F3F30C0D0D0D0C0D0D0D0C0D0D0D0C0D0D0C0D
+ 0C0D0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0C0D0C0D0C0C0C0D0C0C
+ 0C0C0C0C0C0C0C0C0C0C0E0E0E0E0F1417171714000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000F3F31A000000000000F3F31A00000000000F929898910F000000
+ 0000171A0E0011929893110000000F92989317000000000091F3E90B00000000
+ 000000000096F3D30000001AF3F3000B1793079111000000000000171A170000
+ 0000000014F79898190D00000000000000000FF8930793190F00171AD3F3D31A
+ 1AF80E00000011929896190D00000000000000000007F3980000000000000000
+ 0FF81A0E00000000000014F819000000001695D2D2CF180E0F0E0E0E1691150E
+ 1196CF0E119191110E0D0D0D0D1991110D0E0D0D0E1991170D0D0D0D0F1993CF
+ 93190F0D0D0D0D0D0D0D0D111A96CF91170D0D0D0D0D0D0D0D0D1593CF96180D
+ 91F3F30D0D0C0D0D0D0C0D0D0D0C0D0D0C0D0D0C0D0C0D0C0D0D0C0D0C0D0C0D
+ 0C0D0C0D0C0D0C0D0C0D0C0C0C0C0C0D0C0C0D0C0D0C0C0C0C0C0C0C0C0C0D0E
+ 0F0E0E11171717170B0000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000F3F31A000000
+ 00000BF3F31A0000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000EF3F31A000000000000000011F3F31A0000001A
+ F3F3000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000007F30700000000000000000000000000
+ 00000000000000000007F3980000000000000000000000000000000000000000
+ 000000000C17171717140E0E0E0F0E0E0D0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D
+ 0E0D0D0E0D0D0E0D0D0D0D0E0D0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D91F3F30C0D0D0DCF150D9118
+ 0DD2190CCF150D0C0D0D0C0D0C0D0C0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C
+ 0C0C0C0C0C0C0C0C0C0D0C0C0C0C0C0C0C0C0C0E0E0F0E10161717170D000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000F3F31A000000000017F3F30F000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 001AF3F3110000000000000BE8F3D30B0000001AF3F300000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000007F3980000000000000000000000000000000000000000000007F398
+ 00000000000000000000000000000000000000000000000013171717170F0E0F
+ 0E0E0E0E0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0E0D
+ 0E0D0D0D0E0E0E0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D91F3F30D0D0C0DCF150D919110CF970DCF150D0C0D0C0D0D
+ 0C0D0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0D0C0D0C0D0C0C0D0C0D0C0C0C0C0C
+ 0C0C0C0C0C0C0C0E0E0E0E0E1717171710000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000F3F31A0000000017E9F3D000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000093F3F31A0B00000014F0
+ F3E910000000001AF3F30000000000000000000000000091F391000000000000
+ 000000000000000000000000000000000000000000000000000F170000000000
+ 000000000000000000000000000000000007F398000000000000000000000000
+ 00000000000000000000000B17171717160F0E0E0E0F0E0E0E0D0E0D0E0D0E0D
+ 0E0D0E0D0D0E0D0D0E0D0D0E0D0D0E0D0E0D0D0D0D0D0E0E0E0F0E0E0F0E0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D91F3F30C
+ 0D0D0DCF150D1A911A1A9710CF100D0D0C0D0C0D0D0C0D0C0D0C0D0C0D0C0D0C
+ 0D0C0D0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0E0E0F0E0E
+ 1417171714000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000000000F3F3F3079807F3F3F3D0
+ 1000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000001AF3F3F30798E9F3F3D01000000000001AF3F30000
+ 0000000000000000000000F3F3F3000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000007F3F3F3F3F3F3F3F3F3110000000000000000000000000000000B
+ 1517171717150F0E0E0E0E0E0E0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D
+ 0E0D0D0D0D0E0D0E0D0E0E0E0E0E0E0F0E0E0E0E0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D91F3F30D0C0D0DCF150D1591D210191A
+ F30D0C0D0D0C0D0C0D0D0C0C0D0C0D0C0D0C0D0C0D0C0D0C0C0C0C0D0C0D0C0C
+ 0C0C0D0C0D0C0C0C0C0C0C0C0C0C0C0D0E0E0F0E11171717170B000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000009307D0F3F3F3D0961700000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0E9198E9F3D39617000000000000001AF3F3000000000000000000000000001A
+ F31A000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000091079807980798
+ 0798070F000000000000000000000000000000000C1517171717150F0E0F0E0E
+ 0F0E0D0E0D0E0D0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0E0D0D0D0E0E0E0F
+ 0E0F0E0E0E0F0E0E0E0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D91F3F30C0D0D0DCF150D1596D20C0F07F30D0C0D0C0D0D0C0D0C0D0C
+ 0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0C0C0C0D0C0D0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0F0E0E0F0F171717170D000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000001798070000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000C1517171717150F0E0E0F0E0E0E0E0D0E0D0E0D0E0D0D
+ 0E0D0D0E0D0D0E0D0D0E0D0E0D0D0E0E0F0E0E0E0F0E0E0F0E0E0E0F0E0E0E0E
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D18CFCF0D0D1891E8
+ 969117E8180D0C96E90D0D0C0D0C0D0D0C0C0C0D0C0C0C0C0C0C0C0C0C0C0C0D
+ 0C0C0C0C0C0C0C0C0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0E0E0F0E0E161717
+ 1710000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000D17
+ 17171717150F0E0E0E0F0E0E0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0D0D0D
+ 0E0E0E0E0E0F0E0E0E10130F0E0F0E0E0E0F0E0E0F0E0E0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D13151515150E150F0C0D10130D0C0D
+ 0D0C0D0C0D0D0C0D0C0D0C0D0C0D0C0D0C0D0C0C0D0C0D0C0D0C0D0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0E0E0E0E0F141717171400000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000E1717171717150F0E0E0E0E0E
+ 0E0E0D0E0D0E0D0E0D0D0E0D0D0E0D0D0E0D0E0E0E0E0F0E0E0E0F0E13171717
+ 140F0E0F0E0E0E0F0E0E0E0E0E0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C
+ 0D0D0C0D0D0C0D0D0C0D0D0D0D0D0C0D0C0D0D0C0D0D0C0D0C0C0D0C0D0C0D0D
+ 0D0C0D0C0D0C0D0C0C0C0C0C0C0C0C0C0D0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0D0E0F0E0E11171717170B000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000E1717171717150F0E0F0E0E0E0E0E0D0E0D0D0D0E0D0D0E
+ 0D0D0E0D0D0E0E0E0E0F0E0E0F0E1016171717171717130F0F0E0E0E0E0F0E0E
+ 0E0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0D0D0C0D0D
+ 0C0D0D0C0D0C0D0C0D0C0D0C0D0C0C0D0E0E0E0E0E0D0C0D0C0D0C0D0C0C0D0C
+ 0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0E0E0F0E10161717170D00
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000000000000000000000000E1717
+ 171717150F0E0E0F0E0E0E0E0D0E0D0E0D0E0D0D0E0D0D0E0E0E0E0F0E0E0E0F
+ 0E141717171717171717171715110E0F0E0E0F0E0F0E0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0D0D0D0C0D0D0C0D0D0D0C0D0D0D0D0C0D0D0C0D0C0D0D0C0D0C0D0D0D
+ 0E0E0E0E0E0E0E0F0E0E0D0C0C0C0D0C0D0C0C0C0D0C0C0C0C0C0D0C0C0C0C0C
+ 0C0C0C0C0C0C0C0C0C0E0E0E0E0E171717171000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000E1717171717150F0E0E0E0F0E0E
+ 0E0E0D0D0D0D0E0D0D0E0E0E0E0F0E0E0E0F0E11161717171717171717171717
+ 171716130F0E0E0E0E0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D
+ 0D0D0D0C0D0D0D0D0D0C0D0D0C0D0E0D0E0E0E0E0E0E0F0E0F0E0E0E0F0E0E0D
+ 0D0C0C0D0C0C0D0C0C0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0E0E0F
+ 0E0E141717171400000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000E171717171716100E0E0E0F0E0E0E0E0D0E0D0D0E0D0E0E0E
+ 0E0E0E0F0E0F15171717171717160F13171717171717171717130F0E0F0E0E0D
+ 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0D0C0D0D0D0D0C0D0D0C0D0D0D0E
+ 0E0F0E0E0E0F0E0F0E0E0E0E0E0F0E0E0E0E0F0E0D0D0C0C0C0C0C0C0C0D0C0C
+ 0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0D0E0E0F0E11171717170B00000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000000000000000E171717
+ 171716100F0E0E0E0F0E0E0E0D0E0D0E0E0E0F0E0F0E0E0E1317171717171717
+ 110B00000C1317171717171717150E0E0E0E0E0D0D0D0D0D0D0D0D0D0D0D0D0D
+ 0D0D0D0C0D0D0D0D0C0D0D0D0D0C0D0D0C0D0E0E0E0E0E0F0E0E0E0E0F0E0F0E
+ 0E0E0F0E0F0E0E0E0E0D0D0C0D0C0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
+ 0C0C0C0C0C0C0F0E0E0F0F171717170D00000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000E161717171717110E0F0E0E0E0E0E
+ 0E0D0E0E0F0E0E0E0E0F1016161717171717150C0000000000000B1016171717
+ 17170E0F0E0E0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0D0C0D
+ 0D0D0D0D0C0D0E0F0E0F0E0E0E0F0E0E0E0E0F10131517110E0E0F0E0F0E0D0C
+ 0C0C0C0C0C0C0D0C0D0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0E0E0F0E0E16
+ 1717171000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000C151717171717140E0E0F0E0E0F0E0E0F0E0E0E0F0E0F131717
+ 171717171710000000000000000000000B0F171717170F0E0F0E0E0D0D0D0D0D
+ 0D0D0D0D0D0D0D0D0D0D0D0C0D0D0D0C0D0D0D0D0C0D0D0C0D0E0E0E0E0E0E0F
+ 0E0E10131415171717171717110E0E0E0E0E0E0E0C0D0C0C0D0C0C0C0C0D0C0C
+ 0C0C0C0C0C0C0C0C0C0C0C0C0C0C0E0E0E0E0F14171717140000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000}
+ OnClick = OnCloseClick
+ end
+ object Label1: TLabel
+ Left = 8
+ Top = 264
+ Width = 312
+ Height = 13
+ Caption = 'Copyright RemObjects Software, 2002-2004. All rights reserved.'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWhite
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ ParentFont = False
+ Transparent = True
+ OnClick = OnCloseClick
+ end
+ object lbl_Version: TLabel
+ Left = 0
+ Top = 31
+ Width = 500
+ Height = 16
+ Alignment = taCenter
+ AutoSize = False
+ Caption = '[]'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWhite
+ Font.Height = -13
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ ParentFont = False
+ Transparent = True
+ end
+ object Label7: TLabel
+ Left = 8
+ Top = 280
+ Width = 91
+ Height = 13
+ Caption = 'Visit our website at'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWhite
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ ParentFont = False
+ Transparent = True
+ end
+ object Label3: TLabel
+ Left = 102
+ Top = 280
+ Width = 136
+ Height = 13
+ Cursor = crHandPoint
+ Caption = 'http://www.remobjects.com'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWhite
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = [fsUnderline]
+ ParentFont = False
+ Transparent = True
+ OnClick = Label3Click
+ end
+ object btn_Cancel: TButton
+ Left = 418
+ Top = 272
+ Width = 77
+ Height = 25
+ Cancel = True
+ Caption = 'btn_Cancel'
+ Default = True
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWhite
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ ParentFont = False
+ TabOrder = 0
+ OnClick = OnCloseClick
+ end
+end
diff --git a/official/5.0.30.691/Everwood/Source/Delphi/uEWAbout.pas b/official/5.0.30.691/Everwood/Source/Delphi/uEWAbout.pas
new file mode 100644
index 0000000..f28a139
--- /dev/null
+++ b/official/5.0.30.691/Everwood/Source/Delphi/uEWAbout.pas
@@ -0,0 +1,121 @@
+unit uEWAbout;
+
+{$I Everwood.inc}
+interface
+
+uses
+ {$IFDEF FPC}LCLIntf, LResources,{$ENDIF}
+ {$IFDEF MSWINDOWS}Windows,{$ENDIF}
+ SysUtils, Classes, Graphics, Controls, Forms,
+ Dialogs, StdCtrls, ExtCtrls;
+
+type
+ TAboutForm = class(TForm)
+ Image1: TImage;
+ Label1: TLabel;
+ Label3: TLabel;
+ btn_Cancel: TButton;
+ lbl_Version: TLabel;
+ Label7: TLabel;
+ procedure OnCloseClick(Sender: TObject);
+ procedure Label3Click(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+function VersionBuildNo(iInstance:THandle):integer;
+
+var
+ AboutForm: TAboutForm;
+ sVersionName : string = '';
+
+implementation
+
+uses ShellAPI;
+
+{$IFNDEF FPC}
+ {$R *.dfm}
+{$ENDIF}
+
+type TVersion = record
+ Major,Minor,Release,Build:word;
+ end;
+
+function GetFileVersion(iFileName:string):TVersion;
+var whocares:dword;
+ Size:dword;
+ Data:pointer;
+ FixedData:pVSFixedFileInfo;
+begin
+ {$IFDEF FPC}
+ Data := nil;
+ FixedData := nil;
+ whocares := 0;
+ {$ENDIF}
+ Size := GetFileVersionInfoSize(pChar(iFileName), whocares);
+ if Size > 0 then begin
+ GetMem(Data,Size);
+ try
+ if GetFileVersionInfo(pChar(iFileName),0,Size,Data) then begin
+ Size := sizeof(TVSFixedFileInfo);
+ if VerQueryValue(Data,'\',pointer(FixedData),Size) then begin
+ result.Major := HiWord(FixedData^.dwFileVersionMS);
+ result.Minor := LoWord(FixedData^.dwFileVersionMS);
+ result.Release := HiWord(FixedData^.dwFileVersionLS);
+ result.Build := LoWord(FixedData^.dwFileVersionLS);
+ end;
+ end;
+ finally
+ FreeMem(Data);
+ end;
+ end;
+end;
+
+function GetModuleName(iInstance:THandle):string;
+var Buffer: array[0..MAX_PATH] of Char;
+begin
+ SetString(result, Buffer, GetModuleFileName(iInstance, Buffer, MAX_PATH));
+end;
+
+function VersionStringLong:string;
+var Version:TVersion;
+begin
+ Version := GetFileVersion(GetModuleName(hInstance));
+ result := IntToStr(Version.Major)+'.'+IntToStr(Version.Minor)+'.'+
+ IntToStr(Version.Release)+'.'+IntToStr(Version.Build){+'.'+
+ FormatDateTime('yymmdd', CompileTime);}
+end;
+
+function VersionBuildNo(iInstance:THandle):integer;
+var Version:TVersion;
+begin
+ Version := GetFileVersion(GetModuleName(iInstance));
+ result := Version.Build;
+end;
+
+procedure TAboutForm.OnCloseClick(Sender: TObject);
+begin
+ Close();
+end;
+
+procedure TAboutForm.Label3Click(Sender: TObject);
+begin
+ ShellExecute(Handle,'open','http://www.remobjects.com',nil,nil,SW_SHOWNORMAL);
+end;
+
+procedure TAboutForm.FormCreate(Sender: TObject);
+begin
+ lbl_Version.Caption := 'Version '+VersionStringLong();
+ if sVersionName <> '' then
+ lbl_Version.Caption := sVersionName+' - '+lbl_Version.Caption;
+ btn_Cancel.Left := Width + 10;
+end;
+
+{$IFDEF FPC}
+initialization
+ {$i uEWAbout.lrs}
+{$ENDIF FPC}
+end.
diff --git a/official/5.0.30.691/Everwood/Source/Delphi/uEWHelpers.pas b/official/5.0.30.691/Everwood/Source/Delphi/uEWHelpers.pas
new file mode 100644
index 0000000..83a9d2a
--- /dev/null
+++ b/official/5.0.30.691/Everwood/Source/Delphi/uEWHelpers.pas
@@ -0,0 +1,108 @@
+unit uEWHelpers;
+
+{$I Everwood.inc}
+
+interface
+
+{$IFDEF DELPHI5}
+uses
+ FileCtrl;
+
+type
+ THandle = Integer;
+{$ENDIF}
+
+function SelectDirectory(const AppHandle: THandle; const Caption: string;
+ const Root: WideString; var Directory: string): Boolean;
+
+implementation
+
+{$IFDEF FPC}
+uses Dialogs;
+{$ELSE}
+uses {$IFDEF MSWINDOWS}Windows, ActiveX, ShlObj, {$ENDIF} SysUtils, Forms;
+{$ENDIF}
+
+{$IFDEF FPC}
+function SelectDirectory(const AppHandle: THandle; const Caption: string;
+ const Root: WideString; var Directory: string): Boolean;
+var
+ str: Ansistring;
+begin
+ // now only Ansi version
+ str := Directory;
+ Result := Dialogs.SelectDirectory(Caption, Root, str);
+ if Result then Directory := str;
+end;
+{$ELSE}
+function SelectDirCB(Wnd: HWND; uMsg: UINT; lParam, lpData: LPARAM): Integer stdcall;
+begin
+ if (uMsg = BFFM_INITIALIZED) and (lpData <> 0) then
+ SendMessage(Wnd, BFFM_SETSELECTION, Integer(True), lpdata);
+ result := 0;
+end;
+
+function SelectDirectory(const AppHandle: THandle; const Caption: string;
+ const Root: WideString; var Directory: string): Boolean;
+var
+ WindowList: Pointer;
+ BrowseInfo: TBrowseInfo;
+ Buffer: PChar;
+ OldErrorMode: Cardinal;
+ RootItemIDList, ItemIDList: PItemIDList;
+ ShellMalloc: IMalloc;
+ IDesktopFolder: IShellFolder;
+ Eaten, Flags: LongWord;
+begin
+ Result := False;
+ if not DirectoryExists(Directory) then
+ Directory := '';
+ FillChar(BrowseInfo, SizeOf(BrowseInfo), 0);
+ if (ShGetMalloc(ShellMalloc) = S_OK) and (ShellMalloc <> nil) then
+ begin
+ Buffer := ShellMalloc.Alloc(MAX_PATH);
+ try
+ RootItemIDList := nil;
+ if Root <> '' then
+ begin
+ SHGetDesktopFolder(IDesktopFolder);
+ IDesktopFolder.ParseDisplayName(AppHandle, nil,
+ POleStr(Root), Eaten, RootItemIDList, Flags);
+ end;
+ with BrowseInfo do
+ begin
+ hwndOwner := AppHandle;
+ pidlRoot := RootItemIDList;
+ pszDisplayName := Buffer;
+ lpszTitle := PChar(Caption);
+ ulFlags := BIF_RETURNONLYFSDIRS or
+ {$IFDEF DELPHI7UP} BIF_NEWDIALOGSTYLE {$ELSE} $0040 {$ENDIF};
+ if Directory <> '' then
+ begin
+ lpfn := SelectDirCB;
+ lParam := Integer(PChar(Directory));
+ end;
+ end;
+ WindowList := DisableTaskWindows(0);
+ OldErrorMode := SetErrorMode(SEM_FAILCRITICALERRORS);
+ try
+ ItemIDList := ShBrowseForFolder(BrowseInfo);
+ finally
+ SetErrorMode(OldErrorMode);
+ EnableTaskWindows(WindowList);
+ end;
+ Result := ItemIDList <> nil;
+ if Result then
+ begin
+ ShGetPathFromIDList(ItemIDList, Buffer);
+ ShellMalloc.Free(ItemIDList);
+ Directory := Buffer;
+ end;
+ finally
+ ShellMalloc.Free(Buffer);
+ end;
+ end;
+end;
+{$ENDIF}
+
+end.
diff --git a/official/5.0.30.691/Everwood/Source/Delphi/uEWMenuManager.pas b/official/5.0.30.691/Everwood/Source/Delphi/uEWMenuManager.pas
new file mode 100644
index 0000000..458d836
--- /dev/null
+++ b/official/5.0.30.691/Everwood/Source/Delphi/uEWMenuManager.pas
@@ -0,0 +1,388 @@
+unit uEWMenuManager;
+
+{$INCLUDE eDefines.inc}
+
+interface
+
+uses
+ Classes, Menus, ToolsAPI, ExtCtrls, Controls;
+
+const
+ sPersonalityDelphiWin32 = 'Delphi.Personality';
+ sPersonalityDelphiDotNet = 'DelphiDotNet.Personality';
+ sPersonalityCSharpDotNet = 'CSharp.Personality';
+ sPersonalityCppBuilderWin32 = 'CPlusPlusBuilder.Personality';
+ sPersonalityVisualBasicDotNet = 'VB.Personality';
+
+type
+ TEWPersonality = (pAny, pNone, pUnknown, pDelphiWin32, pDelphiDotNet, pCSharpDotNet, pCppBuilderWin32, pVisualBasicDotNet);
+ TEWPersonalitySet = set of TEWPersonality;
+
+ TMenuItemEx = class;
+
+ TEWMenuItem = class
+ private
+ fMenuItem: TMenuItemEx;
+ fPersonality: TEWPersonalitySet;
+ fVisible: boolean;
+ public
+ constructor Create(aMenuItem: TMenuItemEx);
+ procedure SetGlyph(aImageList: TImageList; aIndex: integer);
+ property MenuItem: TMenuItemEx read fMenuItem;
+ property Personality: TEWPersonalitySet read fPersonality write fPersonality;
+ property Visible: boolean read fVisible write fVisible;
+ end;
+
+ TMenuItemEx = class(TMenuItem)
+ private
+ fInfo: TEWMenuItem;
+ public
+ property Info: TEWMenuItem read fInfo write fInfo;
+ end;
+
+ TEWMenu = class
+ private
+ fName: string;
+ fMenu: TMenuItem;
+ fRefCount: integer;
+ fOnPopup: TNotifyEvent;
+ procedure _OnPopup(aSender: TObject);
+ public
+ constructor Create(const aName: string);
+ destructor Destroy; override;
+
+ function CreateMenuItem(const aCaption: string; aImageIndex: integer; aPersonality: TEWPersonalitySet): TEWMenuItem;
+ function DestroyMenuItem(var aMenu: TEWMenuItem): boolean;
+
+ property Name: string read fName;
+ property Menu: TMenuItem read fMenu;
+
+ property OnPopup: TNotifyEvent read fOnPopup write fOnPopup;
+
+ end;
+
+ TEWMenuManager = class
+ private
+ fMenus: TStringList;
+ fEWMenu: TMenuItem;
+ procedure OnABoutclick(Sender: TObject);
+ public
+ constructor Create;
+ Destructor Destroy; override;
+ procedure Initialize;
+
+ function CreateMenu(const aName: string): TEWMenu;
+ function DestroyMenu(var aMenu: TEWMenu): boolean;
+ end;
+
+var
+ MenuManager: TEWMenuManager;
+
+implementation
+
+uses
+ {$IFDEF DELPHI5}DsgnIntf, Windows,{$ENDIF}
+ {$IFDEF DELPHI6UP}DesignEditors, DesignIntf, ExtActns,{$ENDIF}
+ Forms, SysUtils, Dialogs, uEWAbout, Graphics, uEWOTAHelpers;
+
+{ TEWMenuManager }
+
+{ TODO: use
+
+ procedure MenuBeginUpdate;
+ procedure MenuEndUpdate;
+}
+
+constructor TEWMenuManager.Create;
+begin
+ {fTimer := TTimer.Create(nil);
+ fTimer.OnTimer := TimerInitialize;
+ fTimer.Interval := 60000;
+ fTimer.Enabled := true;
+ ShowMessage('Create!');}
+end;
+
+procedure TEWMenuManager.Initialize;
+var
+ lMainMenu: TMainMenu;
+ lHelpMenu: TMenuItem;
+ lServices: INTAServices;
+ i: integer;
+begin
+ if Assigned(fMenus) then exit;
+
+ fMenus := TStringList.Create();
+
+ //try
+
+ if not Assigned(BorlandIDEServices) then
+ raise Exception.Create('Cannot access BorlandIDEServices.');
+
+ //{$IFDEF BDS}
+ //lServices := BorlandIDEServices.GetService(INTAServices) as INTAServices;
+ //{$ELSE}
+ lServices := (BorlandIDEServices as INTAServices);
+ //{$ENDIF}
+
+ if not Assigned(lServices) then
+ raise Exception.Create('Cannot access INTAServices.');
+
+ lMainMenu := lServices.MainMenu;
+
+ for i := 0 to lMainMenu.Items.Count-1 do begin
+
+ if lMainMenu.Items[i].Name = 'HelpMenu' then begin
+ lHelpMenu := lMainMenu.Items[i];
+
+ fEWMenu := TMenuItem.Create(nil);
+ fEWMenu.Caption := 'About RemObjects Everwood™';
+ fEWMenu.OnClick := OnAboutClick;
+
+ lHelpMenu.Insert(lHelpMenu.Count-1, fEWMenu);
+ end;
+ end; { for }
+ {except
+ ShowMessage('Error getting Main Menu');
+ end;}
+
+end;
+
+destructor TEWMenuManager.Destroy;
+var
+ i: Integer;
+begin
+ if Assigned(fMenus) then begin
+ for i := 0 to fMenus.Count-1 do begin
+ fMenus.Objects[i].Free();
+ fMenus.Objects[i] := nil;
+ end; { for }
+ end;
+ FreeAndNil(fMenus);
+ FreeAndNil(fEWMenu);
+end;
+
+function TEWMenuManager.CreateMenu(const aName: string): TEWMenu;
+var
+ lIndex: integer;
+begin
+ Initialize();
+ lIndex := fMenus.IndexOf(aName);
+ if lIndex > -1 then begin
+ result := fMenus.Objects[lIndex] as TEWMenu
+ end
+ else begin
+ result := TEWMenu.Create(aName);
+ fMenus.AddObject(aName, result);
+ end;
+end;
+
+
+function TEWMenuManager.DestroyMenu(var aMenu: TEWMenu): boolean;
+var
+ lIndex: integer;
+begin
+ Initialize();
+ lIndex := fMenus.IndexOfObject(aMenu);
+ if lIndex > -1 then begin
+ dec(aMenu.fRefCount);
+ if aMenu.fRefCount = 0 then begin
+ fMenus.Delete(lIndex);
+ aMenu.Free();
+ result := true;
+ end
+ else begin
+ result := false;
+ end;
+ end
+ else
+ result := false;
+ aMenu := nil;
+end;
+
+{ TEWMenu }
+
+constructor TEWMenu.Create(const aName: string);
+var
+ lMainMenu: TMainMenu;
+begin
+ inherited Create();
+ fName := aName;
+ fRefCount := 1;
+
+ fMenu := TMenuItem.Create(nil);
+ fMenu.Caption := aName;
+ fMenu.OnClick := _OnPopup;
+
+ lMainMenu := (BorlandIDEServices as INTAServices).MainMenu;
+ lMainMenu.Items.Insert(lMainMenu.Items.Count-2, fMenu);
+
+ with CreateMenuItem('NOOPTIONS', -1, [pAny]) do begin
+ MenuItem.Enabled := false;
+ end;
+
+end;
+
+function TEWMenu.CreateMenuItem(const aCaption: string; aImageIndex: integer; aPersonality: TEWPersonalitySet): TEWMenuItem;
+var
+ lMenuItem: TMenuItemEx;
+begin
+ lMenuItem := TMenuItemEx.Create(fMenu);
+ lMenuItem.Caption := aCaption;
+ lMenuItem.ImageIndex := aImageIndex;
+ result := TEWMenuItem.Create(lMenuItem);
+ result.Personality := aPersonality;
+ lMenuItem.Info := result;
+ fMenu.Add(lMenuItem);
+end;
+
+destructor TEWMenu.Destroy;
+begin
+ FreeAndNil(fMenu);
+ inherited;
+end;
+
+function TEWMenu.DestroyMenuItem(var aMenu: TEWMenuItem): boolean;
+begin
+ result := false;
+end;
+
+
+//ToDO: exract
+function ModuleServices: IOTAModuleServices;
+begin
+ result := (BorlandIDEServices as IOTAModuleServices);
+end;
+
+
+function CurrentProject: IOTAProject;
+var
+ services: IOTAModuleServices;
+ module: IOTAModule;
+ project: IOTAProject;
+ projectgroup: IOTAProjectGroup;
+ multipleprojects: Boolean;
+ i: Integer;
+begin
+ result := nil;
+
+ multipleprojects := False;
+ services := ModuleServices;
+
+ if (services = nil) then Exit;
+
+ for I := 0 to (services.ModuleCount - 1) do begin
+ module := services.Modules[I];
+ if (module.QueryInterface(IOTAProjectGroup, ProjectGroup) = S_OK) then begin
+ result := ProjectGroup.ActiveProject;
+ Exit;
+ end
+
+ else if module.QueryInterface(IOTAProject, Project) = S_OK then begin
+ if (result = nil) then
+ result := Project // Found the first project, so save it
+ else
+ multipleprojects := True; // It doesn't look good, but keep searching for a project group
+ end;
+ end;
+
+ if multipleprojects then result := nil;
+end;
+
+procedure TEWMenu._OnPopup(aSender: TObject);
+var
+ i: integer;
+ s: string;
+ lPersonality: TEWPersonality;
+ lAnyMenusVisible: boolean;
+begin
+ if assigned(OnPopup) then OnPopup(self);
+
+ //ToDo: optimize 2 calls to CurrentProject
+ if CurrentProject <> nil then begin
+ {$IFDEF DELPHI9UP}
+ s := CurrentProject.Personality;
+
+ if SameText(s, sPersonalityDelphiWin32) then
+ lPersonality := pDelphiWin32
+ else if SameText(s, sPersonalityDelphiDotNet) then
+ lPersonality := pDelphiDotNet
+ else if SameText(s, sPersonalityDelphiDotNet) then
+ lPersonality := pDelphiDotNet
+ else if SameText(s, sPersonalityCSharpDotNet) then
+ lPersonality := pCSharpDotNet
+ else if SameText(s, sPersonalityVisualBasicDotNet) then
+ lPersonality := pVisualBasicDotNet
+ else if SameText(s, sPersonalityCppBuilderWin32) then
+ lPersonality := pCppBuilderWin32
+ else
+ lPersonality := pUnknown;
+
+ s := LanguageFromPersonality(CurrentProject);
+
+ fMenu.Items[0].Caption := Format('',[s]);
+ {$ELSE}
+ lPersonality := pDelphiWin32;
+ fMenu.Items[0].Caption := Format('',[s]);
+ {$ENDIF DELPHI9UP}
+ end
+ else begin
+ lPersonality := pNone;
+ fMenu.Items[0].Caption := '';
+ end;
+
+ lAnyMenusVisible := false;
+ for i := 1 to fMenu.Count-1 do begin
+ if fMenu.Items[i] is TMenuItemEx then begin
+ with (fMenu.Items[i] as TMenuItemEx).Info do begin
+ fMenu.Items[i].Visible := Visible
+ and
+ ((pAny in Personality) or (lPersonality in Personality));
+ if fMenu.Items[i].Visible then lAnyMenusVisible := true;
+
+ end;
+ end;
+ end;
+
+ fMenu.Items[0].Visible := not lAnyMenusVisible;
+
+end;
+
+{ TEWMenuItem }
+
+constructor TEWMenuItem.Create(aMenuItem: TMenuItemEx);
+begin
+ inherited Create();
+ fMenuItem := aMenuItem;
+ fVisible := true;
+end;
+
+procedure TEWMenuManager.OnABoutclick(Sender: TObject);
+begin
+ with TAboutForm.Create(Application) do try
+ Position := poScreenCenter;
+ ShowModal();
+ finally
+ Free();
+ end
+end;
+
+procedure TEWMenuItem.SetGlyph(aImageList: TImageList; aIndex: integer);
+var
+ lBitmap: TBitmap;
+begin
+ lBitmap := TBitmap.Create();
+ try
+ aImageList.GetBitmap(aIndex ,lBitmap);
+ MenuItem.ImageIndex := (BorlandIDEServices as INTAServices).AddMasked(lBitmap, clFuchsia);
+ finally
+ lBitmap.Free();
+ end;
+end;
+
+initialization
+ MenuManager := TEWMenuManager.Create();
+finalization
+ FreeAndNil(MenuManager);
+end.
+
+
diff --git a/official/5.0.30.691/Everwood/Source/Delphi/uEWOTAHelpers.pas b/official/5.0.30.691/Everwood/Source/Delphi/uEWOTAHelpers.pas
new file mode 100644
index 0000000..1a381e0
--- /dev/null
+++ b/official/5.0.30.691/Everwood/Source/Delphi/uEWOTAHelpers.pas
@@ -0,0 +1,390 @@
+unit uEWOTAHelpers;
+
+{$I Everwood.inc}
+
+interface
+
+uses
+ {$IFDEF DELPHI5}ComObj,{$ENDIF}
+ ToolsAPI, Classes;
+
+function GetDelphiVersion: Integer;
+
+function GetDllPath: String;
+
+function ModuleServices: IOTAModuleServices;
+function CurrentProject: IOTAProject;
+function ProjectByName(const aName: string): IOTAProject;
+function CurrentProjectGroup: IOTAProjectGroup;
+
+function GetUniqueProjectFilename(aProject: IOTAProject; aName: string): string;
+
+function FindModuleByUnitName(const aProject: IOTAProject; const aModuleName: string): IOTAModule;
+
+function RemoveInitialT(const aString:string):string;
+function AddInitialT(const aString:string):string;
+
+function ProjectName: string;
+
+function LoadStringFromFile(iFilename:string):string;
+procedure SaveStringToFile(const iFilename,iString:string);
+
+function ReplaceVariables(const aString: string; aVariables: TStrings): string;
+
+function ReadModuleSource(const aModule: IOTAModule): string;
+procedure WriteModuleSource(const aModule: IOTAModule; const aCode, aHeader: string);
+procedure AddOrReplaceNamedModule(const aProject: IOTAProject; aName, aCode: string);
+
+function LanguageFromPersonality(aProject: IOTAProject): string;
+function LanguageFromPersonalityEx(aProject: IOTAProject): string;
+
+implementation
+
+uses {$IFDEF MSWINDOWS}Windows, ActiveX, {$ENDIF} SysUtils, Forms, uEWHelpers;
+
+function LoadStringFromFile(iFilename:string):string;
+var t:text;
+ s:string;
+begin
+ try
+ AssignFile(t,iFilename);
+ Reset(t);
+ try
+ result := '';
+ while not Eof(t) do begin
+ Readln(t,s);
+ result := result+s+#13#10;
+ end;
+ finally
+ CloseFile(t);
+ end;
+ except
+ on E:Exception do
+ raise EInOutError.Create('Error loading file '+iFilename+' ('+E.ClassName+': '+E.Message+')');
+ end;
+end;
+
+procedure SaveStringToFile(const iFilename,iString:string);
+var t:TextFile;
+begin
+ try
+ AssignFile(t,iFilename);
+ Rewrite(t);
+ try
+ Write(t,iString);
+ finally
+ CloseFile(t);
+ end;
+ except
+ on E:Exception do
+ raise EInOutError.Create('Error saving file '+iFilename+' ('+E.ClassName+': '+E.Message+')');
+ end;
+end;
+
+function NewGuid:TGUID;
+begin
+ {$IFDEF MSWINDOWS}
+ CoCreateGuid(result);
+ {$ENDIF MSWINDOWS}
+ {$IFDEF LINUX}
+ CreateGuid(result);
+ {$ENDIF}
+end;
+
+function NewGuidAsString:string;
+begin
+ result := GuidToString(NewGuid());
+end;
+
+function NewGuidAsStringNoBrackets:string;
+begin
+ result := GuidToString(NewGuid());
+ result := Copy(result,2,Length(result)-2);
+end;
+
+function ReplaceVariables(const aString: string; aVariables: TStrings): string;
+var
+ i:integer;
+begin
+ { No, this isn't efficient code. But given the fact that this is used at designtime and
+ in a place where the execution is abolutely not time-critical, clarity is preferable to
+ efficiency, imho. mh. }
+
+ result := aString;
+ if Assigned(aVariables) then begin
+ for i := 0 to aVariables.Count-1 do begin
+ result := StringReplace(result,'$('+aVariables.Names[i]+')',aVariables.Values[aVariables.Names[i]],[rfReplaceAll,rfIgnoreCase]);
+ end;
+ end;
+ result := StringReplace(result,'$(NewID)',NewGuidAsString(),[rfReplaceAll,rfIgnoreCase]);
+ result := StringReplace(result,'$(NewID2)',NewGuidAsStringNoBrackets(),[rfReplaceAll,rfIgnoreCase]);
+end;
+
+function ProjectName: string;
+var
+ lProjectName:string;
+begin
+ if Assigned(CurrentProject()) then begin
+ lProjectName := (CurrentProject as IOTAModule).FileName;
+ lProjectName := ChangeFileExt(ExtractFileName(lProjectName),'');
+ end
+ else begin
+ lProjectName := '';
+ end;
+ result := lProjectName;
+end;
+
+function RemoveInitialT(const aString:string):string;
+begin
+ result := aString;
+ if (result <> '') and (result[1] = 'T') then Delete(result,1,1);
+end;
+
+function AddInitialT(const aString:string):string;
+begin
+ result := aString;
+ if (result <> '') and (result[1] <> 'T') then result := 'T'+result;
+end;
+
+function GetDllPath: String;
+var TheFileName : array[0..MAX_PATH] of char;
+begin
+ FillChar(TheFileName, SizeOf(TheFileName), #0);
+ {$IFDEF KYLIX}System.{$ENDIF}GetModuleFileName(hInstance, TheFileName, sizeof(TheFileName));
+ Result := ExtractFilePath(TheFileName);
+end;
+
+function ModuleServices: IOTAModuleServices;
+begin
+ result := (BorlandIDEServices as IOTAModuleServices);
+end;
+
+function CurrentProject: IOTAProject;
+var
+ services: IOTAModuleServices;
+ module: IOTAModule;
+ project: IOTAProject;
+ projectgroup: IOTAProjectGroup;
+ multipleprojects: Boolean;
+ i: Integer;
+begin
+ result := nil;
+
+ multipleprojects := False;
+ services := ModuleServices;
+
+ if (services = nil) then Exit;
+
+ for I := 0 to (services.ModuleCount - 1) do begin
+ module := services.Modules[I];
+ if (module.QueryInterface(IOTAProjectGroup, ProjectGroup) = S_OK) then begin
+ result := ProjectGroup.ActiveProject;
+ Exit;
+ end
+
+ else if module.QueryInterface(IOTAProject, Project) = S_OK then begin
+ if (result = nil) then
+ result := Project // Found the first project, so save it
+ else
+ multipleprojects := True; // It doesn't look good, but keep searching for a project group
+ end;
+ end;
+
+ if multipleprojects then result := nil;
+end;
+
+function ProjectByName(const aName: string): IOTAProject;
+var
+ services: IOTAModuleServices;
+ module: IOTAModule;
+ project: IOTAProject;
+ i: Integer;
+begin
+ result := nil;
+
+ services := ModuleServices;
+
+ if (services = nil) then Exit;
+
+ for I := 0 to (services.ModuleCount - 1) do begin
+ module := services.Modules[I];
+ if module.QueryInterface(IOTAProject, Project) = S_OK then begin
+ if module.FileName = aName then begin
+ result := Project;
+ exit;
+ end;
+ end;
+ end;
+end;
+
+function CurrentProjectGroup: IOTAProjectGroup;
+var
+ services: IOTAModuleServices;
+ i: Integer;
+begin
+ Result := nil;
+ services := ModuleServices;
+ for i := 0 to ModuleServices.ModuleCount - 1 do begin
+ if Supports(ModuleServices.Modules[i], IOTAProjectGroup, Result) then begin
+ Break;
+ end;
+ end;
+end;
+
+function GetUniqueProjectFilename(aProject: IOTAProject; aName: string): string;
+var
+ lBaseName, lName: string;
+ lCount: integer;
+
+ function ProjectHasFile: boolean;
+ var
+ i: integer;
+ begin
+ result := false;
+ for i := 0 to aProject.GetModuleCount-1 do begin
+ if (aProject.GetModule(i).Name = lName) or (aProject.GetModule(i).Name = ChangeFileExt(lName, '')) then begin
+ result := true;
+ break;
+ end;
+ end;
+ end;
+
+begin
+ lName := aName;
+ lBaseName := ChangeFileExt(aName, '');
+ lCount := 0;
+ while ProjectHasFile() do begin
+ inc(lCount);
+ lName := lBaseName+IntToStr(lCount)+ExtractFileExt(aName);
+ end;
+ result := lName;
+end;
+
+function FindModuleByUnitName(const aProject: IOTAProject; const aModuleName: string): IOTAModule;
+var
+ i: integer;
+begin
+ result := nil;
+ for i := 0 to aProject.GetModuleCount - 1 do
+ if (CompareText(ExtractFileName(aModuleName), ExtractFileName(aProject.GetModule(i).FileName)) = 0) then begin
+ result := aProject.GetModule(i).OpenModule;
+ Exit;
+ end;
+end;
+
+
+const
+ MaxSourceSize = 10000;
+
+function ReadModuleSource(const aModule: IOTAModule): string;
+var
+ l, i: integer;
+ editor: IOTASourceEditor;
+ reader: IOTAEditReader;
+begin
+ result := '';
+ with aModule do
+ for i := 0 to GetModuleFileCount - 1 do begin
+ if Supports(GetModuleFileEditor(i), IOTASourceEditor, editor) then begin
+ // TODO: find a way not to depend on files smaller than 10k... I only use this for DPRs so it's fine for now
+ SetLength(result, MaxSourceSize);
+ //l := 0; to remove warning
+
+ reader := editor.CreateReader;
+ l := reader.GetText(0, @result[1], MaxSourceSize);
+ reader := nil;
+
+ SetLength(result, l);
+ Exit;
+ end;
+ end;
+end;
+
+procedure WriteModuleSource(const aModule: IOTAModule; const aCode, aHeader: string);
+var
+ i: integer;
+ lEditor: IOTASourceEditor;
+ writer: IOTAEditWriter;
+begin
+ with aModule do begin
+ for i := 0 to GetModuleFileCount - 1 do begin
+ if Supports(GetModuleFileEditor(i), IOTASourceEditor, lEditor) then begin
+ if LowerCase(ExtractFileExt(GetModuleFileEditor(i).FileName)) = '.h' then begin
+ if aHeader <> '' then begin
+ writer := lEditor.CreateWriter;
+ writer.DeleteTo(MaxInt);
+ writer.Insert(PChar(aHeader));
+ writer := nil;
+ end;
+ end
+ else begin
+ writer := lEditor.CreateWriter;
+ writer.DeleteTo(MaxInt);
+ writer.Insert(PChar(aCode));
+ writer := nil;
+ end;
+ end;
+ end;
+ end;
+end;
+
+procedure AddOrReplaceNamedModule(const aProject: IOTAProject; aName, aCode: string);
+var
+ lModule: IOTAModule;
+begin
+ lModule := FindModuleByUnitName(aProject, aName);
+ if assigned(lModule) then begin
+ WriteModuleSource(lModule, aCode, '');
+ end
+ else begin
+ aName := ExtractFilePath(CurrentProject.FileName)+aName;
+ SaveStringToFile(aName, aCode);
+ CurrentProject.AddFile(aName, true);
+ lModule := FindModuleByUnitName(CurrentProject, aName);
+ {$IFDEF DELPHI9UP}
+ if assigned(lModule) then lModule.Show();
+ {$ENDIF DELPHI9UP}
+ end;
+end;
+
+function GetDelphiVersion: Integer;
+begin
+{$IFDEF DELPHI5}
+ result := 5;
+{$ELSE}
+{$IFDEF DELPHI2007}
+ result := 11;
+{$ELSE}
+ result := Trunc(RTLVersion)-8;
+{$ENDIF}
+{$ENDIF}
+end;
+
+function LanguageFromPersonality(aProject: IOTAProject): string;
+{$IFDEF BDS}
+var s: string;
+{$ENDIF}
+begin
+ {$IFDEF BDS}
+ s := aProject.Personality;
+ if s = sDelphiPersonality then result := 'Delphi for Win32'
+ else if s = sDelphiDotNetPersonality then result := 'Delphi for .NET'
+ else if s = sCSharpPersonality then result := 'C#'
+ else if s = sVBPersonality then result := 'Visual Basic'
+ else if s = sCBuilderPersonality then result := 'C++'
+ else result := 'Unknown';
+ {$ELSE}
+ result := 'Delphi for Win32';
+ {$ENDIF}
+end;
+
+function LanguageFromPersonalityEx(aProject: IOTAProject): string;
+begin
+ result := LanguageFromPersonality(aProject);
+ {$IFDEF BDS}
+ if result = 'Delphi for .NET' then
+ result := result+'/'+IntToStr(GetDelphiVersion);
+ {$ENDIF}
+end;
+
+end.
diff --git a/official/5.0.30.691/Everwood/Source/Delphi/uEWOTAMessages.pas b/official/5.0.30.691/Everwood/Source/Delphi/uEWOTAMessages.pas
new file mode 100644
index 0000000..13097d0
--- /dev/null
+++ b/official/5.0.30.691/Everwood/Source/Delphi/uEWOTAMessages.pas
@@ -0,0 +1,56 @@
+unit uEWOTAMessages;
+
+{$INCLUDE eDefines.inc}
+
+interface
+
+procedure ClearIDEMessages(const aGroupName: string);
+procedure AddIDEMessage(const aGroupName: string; const aMessageStr: string; aLine : integer = -1; aColumn: integer = -1; const aFileName: string = ''; const aPrefixStr: string = '');
+
+implementation
+
+uses
+ ToolsAPI;
+
+{$IFDEF DELPHI7UP}
+procedure ClearIDEMessages(const aGroupName: string);
+var
+ lGroup: IOTAMessageGroup;
+begin
+ with BorlandIDEServices as IOTAMessageServices60 do begin
+ lGroup := GetGroup(aGroupName);
+ if Assigned(lGroup) then
+ RemoveMessageGroup(lGroup);
+ end;
+end;
+
+procedure AddIDEMessage(const aGroupName: string; const aMessageStr: string; aLine: integer = -1; aColumn: integer = -1; const aFileName: string = ''; const aPrefixStr: string = '');
+var
+ lGroup: IOTAMessageGroup;
+ lDummyLineRef: pointer;
+ lPrefix: string;
+begin
+ with BorlandIDEServices as IOTAMessageServices60 do begin
+ lGroup := GetGroup(aGroupName);
+ ShowMessageView(lGroup);
+ if not Assigned(lGroup) then lGroup := AddMessageGroup(aGroupName);
+
+ lPrefix := aPrefixStr;
+ if lPrefix = '' then lPrefix := 'Note';
+ AddToolMessage(aFilename, aMessageStr, lPrefix, aLine, aColumn, nil, lDummyLineRef, lGroup);
+ end;
+end;
+
+{$ELSE}
+
+procedure ClearIDEMessages(const aGroupName: string);
+begin
+end;
+
+procedure AddIDEMessage(const aGroupName: string; const aMessageStr: string; aLine : integer = -1; aColumn: integer = -1; const aFileName: string = ''; const aPrefixStr: string = '');
+begin
+end;
+
+{$ENDIF}
+
+end.
diff --git a/official/5.0.30.691/Everwood/Source/Delphi/uEWOTANewModuleExpert.pas b/official/5.0.30.691/Everwood/Source/Delphi/uEWOTANewModuleExpert.pas
new file mode 100644
index 0000000..bd6e6ea
--- /dev/null
+++ b/official/5.0.30.691/Everwood/Source/Delphi/uEWOTANewModuleExpert.pas
@@ -0,0 +1,16 @@
+unit uEWOTANewModuleExpert;
+
+interface
+
+uses
+ {$IFDEF DELPHI5}DsgnIntf,{$ENDIF}
+ {$IFDEF DELPHI6UP}DesignEditors,{$ENDIF}
+ ToolsAPI, Classes, uEWOTARepositoryExpert;
+
+type
+ TEWNewModuleExpert = class(TEWRepositoryExpert, IOTAFormWizard)
+ end;
+
+implementation
+
+end.
diff --git a/official/5.0.30.691/Everwood/Source/Delphi/uEWOTANewProjectExpert.pas b/official/5.0.30.691/Everwood/Source/Delphi/uEWOTANewProjectExpert.pas
new file mode 100644
index 0000000..a089160
--- /dev/null
+++ b/official/5.0.30.691/Everwood/Source/Delphi/uEWOTANewProjectExpert.pas
@@ -0,0 +1,16 @@
+unit uEWOTANewProjectExpert;
+
+interface
+
+uses
+ {$IFDEF DELPHI5}DsgnIntf,{$ENDIF}
+ {$IFDEF DELPHI6UP}DesignEditors,{$ENDIF}
+ ToolsAPI, Classes, uEWOTARepositoryExpert;
+
+type
+ TEWNewProjectExpert = class(TEWRepositoryExpert, IOTAProjectWizard)
+ end;
+
+implementation
+
+end.
diff --git a/official/5.0.30.691/Everwood/Source/Delphi/uEWOTARepositoryExpert.pas b/official/5.0.30.691/Everwood/Source/Delphi/uEWOTARepositoryExpert.pas
new file mode 100644
index 0000000..7b7ecde
--- /dev/null
+++ b/official/5.0.30.691/Everwood/Source/Delphi/uEWOTARepositoryExpert.pas
@@ -0,0 +1,284 @@
+unit uEWOTARepositoryExpert;
+
+{$I Everwood.inc}
+
+interface
+
+uses
+ {$IFDEF DELPHI5}DsgnIntf,{$ENDIF}
+ {$IFDEF DELPHI6UP}DesignEditors,{$ENDIF}
+ Windows, Classes, ToolsAPI;
+
+{$IFNDEF BDS}
+const
+ sDelphiPersonality = 'Delphi.Personality';
+{$ENDIF}
+
+{$IFDEF DELPHI5}
+ dAny = 'Any';
+{$ENDIF}
+
+type
+ TEWRepositoryExpert = class(TInterfacedObject, IOTAWizard, IOTARepositoryWizard{$IFDEF DELPHI6UP}, IOTARepositoryWizard60{$ENDIF} {$IFDEF BDS}, IOTARepositoryWizard80{$ENDIF})
+ private
+ fIcon: Cardinal;
+ fPersonality: string;
+ protected
+ procedure AfterSave; virtual;
+ procedure BeforeSave; virtual;
+ procedure Destroyed; virtual;
+ procedure Modified; virtual;
+
+ procedure Execute; virtual;
+ function GetAuthor: String; virtual;
+ function GetComment: String; virtual;
+ function GetGlyph: {$IFDEF DELPHI5}HICON{$ELSE}Cardinal{$ENDIF};
+ function GetIDString: String;
+ function GetInternalIDString: String; virtual; abstract;
+ function GetName: String; virtual; abstract;
+ function GetPage: String; virtual; abstract;
+ function GetState: TWizardState; virtual;
+ function GetDesigner: String; virtual;
+
+ {$IFDEF BDS}
+ function GetGalleryCategory: IOTAGalleryCategory; virtual;
+ {$ENDIF}
+ function GetPersonality: string; virtual;
+
+ function LoadGlyph: Cardinal; virtual;
+
+ function CreateNewModuleFromTemplateFile(const aTemplateFile: string; const aName, aAncestor: string; aVariables: TStrings=nil):IOTAModule;
+ function CreateNewModuleFromString(const aTemplateString: string; const aName, aAncestor: string; aVariables: TStrings=nil):IOTAModule;
+ function CreateNewProject:IOTAProject;
+ function CreateNewProjectFromTemplateFile(aTemplateFile: string; aProjectFileName: string; aVariables: TStrings=nil):IOTAProject;
+ function CreateNewProjectFromTemplateFolder(const aTemplateFileName: string; const aProjectFileName: string; aVariables: TStrings=nil):IOTAProject;
+
+ public
+ constructor Create(aPersonality: string = sDelphiPersonality);
+ end;
+
+
+implementation
+
+uses
+ SysUtils, uEWOTAWizards, Dialogs, uEWOTAHelpers;
+
+{ TEWRepositoryExpert }
+
+procedure TEWRepositoryExpert.AfterSave;
+begin
+
+end;
+
+procedure TEWRepositoryExpert.BeforeSave;
+begin
+
+end;
+
+constructor TEWRepositoryExpert.Create(aPersonality: string);
+begin
+ fPersonality := aPersonality;
+end;
+
+function TEWRepositoryExpert.CreateNewModuleFromString(const aTemplateString, aName, aAncestor: string; aVariables: TStrings): IOTAModule;
+var
+ lModuleServices: IOTAModuleServices;
+// lSourceTemplate,lDfmTemplate: string;
+// lDfmTemplateFile: string;
+begin
+ if BorlandIDEServices.QueryInterface(IOTAModuleServices, lModuleServices) = S_OK then
+ result := lModuleServices.CreateModule(TEWFormCreator.Create(aTemplateString,
+ '',
+ aName, aAncestor, aVariables));
+end;
+
+function TEWRepositoryExpert.CreateNewModuleFromTemplateFile(const aTemplateFile: string; const aName, aAncestor: string; aVariables: TStrings):IOTAModule;
+var
+ lModuleServices: IOTAModuleServices;
+ lSourceTemplate,lDfmTemplate: string;
+ lDfmTemplateFile: string;
+begin
+ lSourceTemplate := LoadStringFromFile(aTemplateFile);
+
+ lDfmTemplate := '';
+ lDfmTemplateFile := ChangeFileExt(aTemplateFile,'.dfm');
+ if FileExists(lDfmTemplateFile) then begin
+ lDfmTemplate := LoadStringFromFile(lDfmTemplateFile);
+ end;
+
+ if BorlandIDEServices.QueryInterface(IOTAModuleServices, lModuleServices) = S_OK then
+ result := lModuleServices.CreateModule(TEWFormCreator.Create(lSourceTemplate,
+ lDfmTemplate,
+ aName, aAncestor, aVariables));
+end;
+
+function TEWRepositoryExpert.CreateNewProject: IOTAProject;
+var
+ lModuleServices: IOTAModuleServices;
+begin
+ if BorlandIDEServices.QueryInterface(IOTAModuleServices, lModuleServices) = S_OK then
+ result := lModuleServices.CreateModule(TEWProjectCreator.Create('', '', nil)) as IOTAProject;
+end;
+
+function TEWRepositoryExpert.CreateNewProjectFromTemplateFile(aTemplateFile: string; aProjectFileName: string; aVariables: TStrings): IOTAProject;
+{$IFNDEF BDS}
+var
+ lModuleServices: IOTAModuleServices;
+{$ENDIF}
+begin
+ result := NIL;
+ {$IFDEF BDS} // AleF: Fixed a typo here. It said BSD!!!
+ aProjectFileName := ChangeFileExt(aProjectFileName, '.bdsproj');
+ if FileExists(aProjectFileName) then begin
+ (BorlandIDEServices as IOTAActionServices).OpenProject(aProjectFileName, false); // Vynnyk: Rolled back - because not compilable
+ result := (BorlandIDEServices as IOTAModuleServices).GetActiveProject;
+ end;
+ {$ELSE}
+ if BorlandIDEServices.QueryInterface(IOTAModuleServices, lModuleServices) = S_OK then begin
+ result := lModuleServices.CreateModule(TEWProjectCreator.Create(aTemplateFile, aProjectFileName, aVariables)) as IOTAProject;
+ end;
+ {$ENDIF}
+end;
+
+function TEWRepositoryExpert.CreateNewProjectFromTemplateFolder(const aTemplateFileName: string; const aProjectFileName: string; aVariables: TStrings): IOTAProject;
+var
+ lString, lName, lFileExt: string;
+ lOk: dword;
+ lTemplateFolder, lProjectFolder: string;
+ lSearch: TSearchRec;
+begin
+ lTemplateFolder := ExtractFilePath(aTemplateFileName);
+ lProjectFolder := ExtractFilePath(aProjectFileName);
+
+ if not FileExists(aTemplateFileName) then
+ raise Exception.Create('Template not found at '+ExtractFilePath(aTemplateFileName));
+
+ lOk := FindFirst(lTemplateFolder+'*.*',faAnyFile,lSearch);
+ try
+ while lOk = 0 do try
+ if (lSearch.Attr and faDirectory) = 0 then begin
+ {$IFNDEF BDS}
+ if ExtractFileExt(lSearch.Name) = '.bdsproj' then
+ Continue;
+ {$ENDIF}
+
+ lFileExt := ExtractFileExt(lSearch.Name);
+ lName := ReplaceVariables(lSearch.Name, aVariables);
+ if SameText(lFileExt,'.res') then begin
+ CopyFile(pChar(lTemplateFolder+lSearch.Name), pChar(lProjectFolder+lName),false);
+ end
+ else begin
+ lString := ReplaceVariables(LoadStringFromFile(lTemplateFolder+lSearch.Name), aVariables);
+ SaveStringToFile(lProjectFolder+lName,lString);
+ end;
+ end;
+ finally
+ lOk := FindNext(lSearch);
+ end; { while }
+ finally
+ FindClose(lSearch);
+ end;
+ result := CreateNewProjectFromTemplateFile(aTemplateFileName, aProjectFileName, aVariables);
+end;
+
+procedure TEWRepositoryExpert.Destroyed;
+begin
+end;
+
+procedure TEWRepositoryExpert.Execute;
+begin
+end;
+
+function TEWRepositoryExpert.GetAuthor: String;
+begin
+ result := 'RemObjects Software'
+end;
+
+function TEWRepositoryExpert.GetComment: String;
+begin
+
+end;
+
+function TEWRepositoryExpert.GetDesigner: String;
+begin
+ Result := dAny;
+end;
+
+function TEWRepositoryExpert.GetGlyph: {$IFDEF DELPHI5}HICON{$ELSE}Cardinal{$ENDIF};
+begin
+ { We'll cache the Glpyh locally so it won't be loaded again and again.
+ Apparently Delphi doesn't free the Glpyh, so this would leak otherwise }
+
+ if fIcon = 0 then fIcon := LoadGlyph();
+ result := fIcon;
+end;
+
+function TEWRepositoryExpert.GetIDString: String;
+begin
+ result := GetInternalIDString+'.'+fPersonality;
+end;
+
+function TEWRepositoryExpert.LoadGlyph: Cardinal;
+begin
+ result := LoadIcon(hInstance,'EverwoodWizardStandardIcon');
+end;
+
+
+function TEWRepositoryExpert.GetState: TWizardState;
+begin
+ result := [wsEnabled];
+end;
+
+procedure TEWRepositoryExpert.Modified;
+begin
+
+end;
+
+{$IFDEF BDS}
+function TEWRepositoryExpert.GetGalleryCategory: IOTAGalleryCategory;
+var
+ lGalleryCategory: string;
+ lGalleryManager: IOTAGalleryCategoryManager;
+ lGallery: IOTAGalleryCategory;
+begin
+ if fPersonality = sDelphiPersonality then
+ lGalleryCategory := sCategoryDelphiNew
+ else if fPersonality = sCBuilderPersonality then
+ lGalleryCategory := sCategoryCBuilderNew
+ else if fPersonality = sDelphiDotNetPersonality then
+ lGalleryCategory := sCategoryDelphiDotNetNew
+ else if fPersonality = sCSharpPersonality then
+ lGalleryCategory := sCategoryCSharpNew
+ else if fPersonality = sVBPersonality then
+ lGalleryCategory := sCategoryVBNew
+ else
+ exit;
+
+ lGalleryManager := (BorlandIDEServices as IOTAGalleryCategoryManager);
+
+ lGallery := lGalleryManager.FindCategory(lGalleryCategory);
+ if assigned(lGallery) then begin
+
+ if fPersonality = sVBPersonality then
+ ShowMessage(lGalleryCategory+' '+fPersonality+' '+GetName+ ' - '+lGallery.DisplayName);
+
+ result := lGalleryManager.FindCategory(GetPage());
+ if not assigned(result) then begin
+ lGalleryManager.AddCategory(lGallery, GetPage()+'.'+fPersonality, GetPage());
+ end;
+ end
+ else begin
+ result := lGalleryManager.FindCategory(sCategoryGalileoOther);
+ end;
+
+end;
+{$ENDIF}
+
+function TEWRepositoryExpert.GetPersonality: string;
+begin
+ result := fPersonality;
+end;
+
+end.
+
+
diff --git a/official/5.0.30.691/Everwood/Source/Delphi/uEWOTAWizards.pas b/official/5.0.30.691/Everwood/Source/Delphi/uEWOTAWizards.pas
new file mode 100644
index 0000000..987617c
--- /dev/null
+++ b/official/5.0.30.691/Everwood/Source/Delphi/uEWOTAWizards.pas
@@ -0,0 +1,345 @@
+unit uEWOTAWizards;
+
+{----------------------------------------------------------------------------}
+{ RemObjects' Everwood - IDE Library
+{
+{ compiler: Delphi 6 and up, Kylix 3 and up
+{ platform: Win32, Linux
+{
+{ (c)opyright RemObjects Software. all rights reserved.
+{
+{ Using this code requires a valid license of Everwood
+{ which can be obtained at http://www.remobjects.com.
+{----------------------------------------------------------------------------}
+
+{$I Everwood.inc}
+
+interface
+
+uses
+ {$IFDEF DELPHI5}DsgnIntf,{$ENDIF}
+ {$IFDEF DELPHI6UP}DesignEditors,{$ENDIF}
+ SysUtils, Classes,
+ Dialogs, ToolsAPI;
+
+type
+ TEWSourceFile = class(TInterfacedObject, IOTAFile)
+ private
+ fAge: TDateTime;
+ fSource:string;
+ public
+ function GetSource: string;
+ function GetAge: TDateTime;
+ constructor Create(const iSource:string);
+ end;
+
+ TEWCreator = class(TInterfacedObject, IOTACreator)
+ private
+ fVariables: TStrings;
+ fAncestorName: String;
+ fName: string;
+ public
+ constructor Create(const aName, aAncestorName:string; aVariables:TStrings);
+ destructor Destroy; override;
+
+ function GetCreatorType: string; virtual; abstract;
+ function GetExisting: Boolean;
+ function GetFileSystem: string;
+ function GetOwner: IOTAModule; virtual;
+ function GetUnnamed: Boolean; virtual;
+
+ function CreateOTAFile(const aTemplate: string; const ModuleIdent: string=''; const FormIdent: string =''; const AncestorIdent: string=''): IOTAFile;
+
+ end;
+
+ TEWFormCreator = class(TEWCreator, IOTAModuleCreator)
+ public
+ constructor Create(const aCodeTemplate, aDfmTemplate, aName, aAncestor:string; aVariables:TStrings);
+
+ function GetCreatorType: string; override;
+
+ function GetAncestorName: string;
+ function GetImplFileName: string;
+ function GetIntfFileName: string;
+ function GetFormName: string;
+ function GetMainForm: Boolean;
+ function GetShowForm: Boolean;
+ function GetShowSource: Boolean;
+ function NewFormFile(const FormIdent, AncestorIdent: string): IOTAFile;
+ function NewImplSource(const ModuleIdent, FormIdent, AncestorIdent: string): IOTAFile;
+ function NewIntfSource(const ModuleIdent, FormIdent, AncestorIdent: string): IOTAFile;
+
+ procedure FormCreated(const FormEditor: IOTAFormEditor);
+
+ private
+ fCodeTemplate, fDfmTemplate: String;
+ end;
+
+ TEWProjectCreator = class(TEWCreator, IOTAProjectCreator, IOTAProjectCreator50{$IFDEF BDS}, IOTAProjectCreator80{$ENDIF})
+ public
+ constructor Create(const aCodeTemplateFile, aName:string; aVariables:TStrings);
+
+ function GetCreatorType: string; override;
+ function GetOwner: IOTAModule; override;
+ function GetUnnamed: Boolean; override;
+
+ function GetFileName: string;
+ function GetOptionFileName: string;
+ function GetShowSource: Boolean;
+ procedure NewDefaultModule;
+ function NewOptionSource(const ProjectName: string): IOTAFile;
+ procedure NewProjectResource(const Project: IOTAProject);
+ function NewProjectSource(const ProjectName: string): IOTAFile;
+
+ procedure NewDefaultProjectModule(const Project: IOTAProject); virtual;
+
+ {$IFDEF BDS}
+ function GetProjectPersonality: string;
+ {$ENDIF}
+
+ private
+ fCodeTemplateFile: string;
+ end;
+
+implementation
+
+uses
+ uEWOTAHelpers, Windows;
+
+{ TEWCreator }
+
+constructor TEWCreator.Create(const aName, aAncestorName:string; aVariables:TStrings);
+begin
+ fName := aName;
+ fAncestorName := aAncestorName;
+ fVariables := aVariables;
+end;
+
+destructor TEWCreator.Destroy;
+begin
+ inherited;
+end;
+
+function TEWCreator.GetExisting: Boolean;
+begin
+ result := false;
+end;
+
+function TEWCreator.GetFileSystem: string;
+begin
+ result := '';
+end;
+
+function TEWCreator.GetOwner: IOTAModule;
+begin
+ result := CurrentProject();
+end;
+
+function TEWCreator.GetUnnamed: Boolean;
+begin
+ result := true;
+end;
+
+function TEWCreator.CreateOTAFile(const aTemplate: string; const ModuleIdent, FormIdent, AncestorIdent: string): IOTAFile;
+var
+ i: integer;
+ lCode: string;
+begin
+ lCode := aTemplate;
+
+ { No, this isn't efficient code. But given the fact that this is used at designtime and
+ in a place where the execution is abolutely not time-critical, clarity is preferable to
+ efficiency, imho. mh. }
+
+ if ModuleIdent <> '' then begin
+ lCode := StringReplace(lCode,'$(Module)',ModuleIdent,[rfReplaceAll,rfIgnoreCase]);
+ end;
+ if FormIdent <> '' then begin
+ lCode := StringReplace(lCode,'$(FormName)',RemoveInitialT(FormIdent),[rfReplaceAll,rfIgnoreCase]);
+ lCode := StringReplace(lCode,'$(FormClass)',AddInitialT(FormIdent),[rfReplaceAll,rfIgnoreCase]);
+ end;
+ if AncestorIdent <> ''then begin
+ lCode := StringReplace(lCode,'$(Ancestor)',AncestorIdent,[rfReplaceAll,rfIgnoreCase]);
+ end;
+ lCode := StringReplace(lCode,'$(Project)',ProjectName,[rfReplaceAll,rfIgnoreCase]);
+ if Assigned(fVariables) then begin
+ for i := 0 to fVariables.Count-1 do begin
+ lCode := StringReplace(lCode,'$('+fVariables.Names[i]+')',fVariables.Values[fVariables.Names[i]],[rfReplaceAll,rfIgnoreCase]);
+ end;
+ end;
+ lCode := StringReplace(lCode,'$((','$(',[rfReplaceAll,rfIgnoreCase]);
+ {$IFDEF DEBUG_EVERWOOD_SHOW_NEW_MODULE_CODE}
+ ShowMessage(lCode);
+ {$ENDIF DEBUG_EVERWOOD_SHOW_NEW_MODULE_CODE}
+ result := TEWSourceFile.Create(lCode);
+end;
+
+{ TEWFormCreator }
+
+constructor TEWFormCreator.Create(const aCodeTemplate, aDfmTemplate, aName, aAncestor: string; aVariables: TStrings);
+begin
+ inherited Create(aName, aAncestor, aVariables);
+ fCodeTemplate := aCodeTemplate;
+ fDfmTemplate := aDfmTemplate;
+end;
+
+function TEWFormCreator.GetCreatorType: string;
+begin
+ result := sForm;
+end;
+
+procedure TEWFormCreator.FormCreated(const FormEditor: IOTAFormEditor);
+begin
+
+end;
+
+function TEWFormCreator.GetAncestorName: string;
+begin
+ result := fAncestorName;
+end;
+
+function TEWFormCreator.GetFormName: string;
+begin
+ result := '';
+end;
+
+function TEWFormCreator.GetImplFileName: string;
+begin
+ result := IncludeTrailingBackslash(ExtractFilePath(CurrentProject.FileName))+GetUniqueProjectFilename(CurrentProject, fName);
+end;
+
+function TEWFormCreator.GetIntfFileName: string;
+begin
+ result := '';
+end;
+
+function TEWFormCreator.GetMainForm: Boolean;
+begin
+ result := false;
+end;
+
+function TEWFormCreator.GetShowForm: Boolean;
+begin
+ result := true;
+end;
+
+function TEWFormCreator.GetShowSource: Boolean;
+begin
+ result := true;
+end;
+
+function TEWFormCreator.NewFormFile(const FormIdent, AncestorIdent: string): IOTAFile;
+begin
+ {$IFDEF DEBUG_EVERWOOD_SHOW_NEW_MODULE_CODE}
+ ShowMessage('dfm: '+FormIdent+' - '+AncestorIdent);
+ {$ENDIF DEBUG_EVERWOOD_SHOW_NEW_MODULE_CODE}
+ result := TEWSourceFile.Create(Format(fDfmTemplate,['',RemoveInitialT(FormIdent),ProjectName]));
+ result := CreateOTAFile(fDfmTemplate, '$(Module)', FormIdent, AncestorIdent);
+end;
+
+function TEWFormCreator.NewImplSource(const ModuleIdent, FormIdent, AncestorIdent: string): IOTAFile;
+begin
+ {$IFDEF DEBUG_EVERWOOD_SHOW_NEW_MODULE_CODE}
+ ShowMessage('pas: '+ModuleIdent+' - '+FormIdent+' - '+AncestorIdent);
+ {$ENDIF DEBUG_EVERWOOD_SHOW_NEW_MODULE_CODE}
+ result := CreateOTAFile(fCodeTemplate, ModuleIdent, FormIdent, AncestorIdent);
+end;
+
+function TEWFormCreator.NewIntfSource(const ModuleIdent, FormIdent, AncestorIdent: string): IOTAFile;
+begin
+ result := nil;
+end;
+
+{ TEWProjectCreator }
+
+constructor TEWProjectCreator.Create(const aCodeTemplateFile, aName: string; aVariables: TStrings);
+begin
+ inherited Create(aName, '', aVariables);
+ fCodeTemplateFile := aCodeTemplateFile;
+end;
+
+function TEWProjectCreator.GetCreatorType: string;
+begin
+ result := sLibrary;
+end;
+
+function TEWProjectCreator.GetFileName: string;
+begin
+ result := fName;
+end;
+
+function TEWProjectCreator.GetOptionFileName: string;
+begin
+ result := '';
+end;
+
+function TEWProjectCreator.GetOwner: IOTAModule;
+begin
+ result := CurrentProjectGroup;
+end;
+
+function TEWProjectCreator.GetShowSource: Boolean;
+begin
+ result := false;
+end;
+
+function TEWProjectCreator.GetUnnamed: Boolean;
+begin
+ result := (fName = '');
+end;
+
+procedure TEWProjectCreator.NewDefaultModule;
+begin
+
+end;
+
+procedure TEWProjectCreator.NewDefaultProjectModule(const Project: IOTAProject);
+begin
+end;
+
+{$IFDEF BDS}
+function TEWProjectCreator.GetProjectPersonality: string;
+begin
+ result := sDelphiPersonality;
+end;
+{$ENDIF}
+
+function TEWProjectCreator.NewOptionSource(const ProjectName: string): IOTAFile;
+begin
+ result := nil;
+end;
+
+procedure TEWProjectCreator.NewProjectResource(const Project: IOTAProject);
+begin
+ CopyFile(pChar(ChangeFileExt(fCodeTemplateFile,'.res')),pChar(ChangeFileExt(Project.FileName,'.res')),false);
+end;
+
+function TEWProjectCreator.NewProjectSource(const ProjectName: string): IOTAFile;
+begin
+ //ShowMessage('x:'+ProjectName);
+ if fCodeTemplateFile <> '' then
+ result := CreateOTAFile(LoadStringFromFile(fCodeTemplateFile),ProjectName)
+ else
+ result := nil;
+end;
+
+{ TEWSourceFile }
+
+constructor TEWSourceFile.Create(const iSource: string);
+begin
+ inherited Create();
+ fSource := iSource;
+ fAge := Now;
+end;
+
+function TEWSourceFile.GetAge: TDateTime;
+begin
+ result := fAge;
+end;
+
+function TEWSourceFile.GetSource: string;
+begin
+ result := fSource;
+end;
+
+end.
diff --git a/official/5.0.30.691/Everwood/Source/Delphi/uEWSampleInfo.dfm b/official/5.0.30.691/Everwood/Source/Delphi/uEWSampleInfo.dfm
new file mode 100644
index 0000000..4b59d08
--- /dev/null
+++ b/official/5.0.30.691/Everwood/Source/Delphi/uEWSampleInfo.dfm
@@ -0,0 +1,566 @@
+object SampleInfoForm: TSampleInfoForm
+ Left = 283
+ Top = 227
+ AutoScroll = False
+ BorderWidth = 3
+ Caption = 'SampleInfoForm'
+ ClientHeight = 358
+ ClientWidth = 578
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ FormStyle = fsStayOnTop
+ Icon.Data = {
+ 0000010003003030000001002000A8250000360000002020000001002000A810
+ 0000DE2500001010000001002000680400008636000028000000300000006000
+ 0000010020000000000080250000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000001616163F1414144F1212127F1111117F0F0F0F7F0D0D
+ 0D7F0C0C0C7F0A0A0A6F0909093F0808080F0000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000000000000000001E1E1E1F1C1C
+ 1C6F1A1A1ABF181818FF171717FF151515FF131313FF121212FF101010FF0F0F
+ 0FFF0D0D0DFF0B0B0BFF0A0A0AFF080808FF060606DF0505059F0404044F0000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000002222225F202020BF1F1F1FFF1D1D
+ 1DFF1C1C1CFF1A1A1AFF181818FF171717FF151515FF131313FF121212FF1010
+ 10FF0F0F0FFF0D0D0DFF0B0B0BFF0A0A0AFF080808FF060606FF050505FF0303
+ 03DF0202027F0202020F00000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000002727273F252525CF242424FF222222FF202020FF1F1F
+ 1FFF1D1D1DFF1C1C1CFF1A1A1AFF181818FF171717FF151515FF131313FF1212
+ 12FF101010FF0F0F0FFF0D0D0DFF0B0B0BFF0A0A0AFF080808FF060606FF0505
+ 05FF030303FF020202EF0000007F000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00002C2C2C0F2A2A2AAF292929FF272727FF252525FF242424FF222222FF2020
+ 20FF1F1F1FFF1D1D1DFF1C1C1CFF1A1A1AFF181818FF171717FF151515FF1313
+ 13FF121212FF101010FF0F0F0FFF0D0D0DFF0B0B0BFF0A0A0AFF080808FF0606
+ 06FF050505FF030303FF020202FF000000CF0000002F00000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000002F2F
+ 2F2F2E2E2EDF2C2C2CFF2A2A2AFF292929FF272727FF252525FF242424FF2222
+ 22FF202020FF1F1F1FFF1D1D1DFF1C1C1CFF1A1A1AFF181818FF171717FF1515
+ 15FF131313FF121212FF101010FF0F0F0FFF0D0D0DFF0B0B0BFF0A0A0AFF0808
+ 08FF060606FF050505FF030303FF020202FF000000FF0000006F000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000000000000000003232324F3131
+ 31EF2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF292929FF272727FF252525FF2424
+ 24FF222222FF202020FF1F1F1FFF1D1D1DFF1C1C1CFF1A1A1AFF181818FF1717
+ 17FF151515FF131313FF121212FF101010FF0F0F0FFF0D0D0DFF0B0B0BFF0A0A
+ 0AFF080808FF060606FF050505FF030303FF020202FF000000FF0000009F0000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000003636365F343434FF3232
+ 32FF313131FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF292929FF272727FF2525
+ 25FF242424FF222222FF202020FF1F1F1FFF1D1D1DFF1C1C1CFF1A1A1AFF1818
+ 18FF171717FF151515FF131313FF121212FF101010FF0F0F0FFF0D0D0DFF0B0B
+ 0BFF0A0A0AFF080808FF060606FF050505FF030303FF020202FF000000FF0000
+ 009F000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000003939393F373737FF363636FF3434
+ 34FF323232FF313131FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF292929FF2727
+ 27FF252525FF242424FF222222FF202020FF1F1F1FFF1D1D1DFF1C1C1CFF1A1A
+ 1AFF181818FF171717FF151515FF131313FF121212FF101010FF0F0F0FFF0D0D
+ 0DFF0B0B0BFF0A0A0AFF080808FF060606FF050505FF030303FF020202FF0000
+ 00FF0000009F0000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000003C3C3C1F3B3B3BEF393939FF373737FF3636
+ 36FF343434FF323232FF313131FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF2929
+ 29FF272727FF252525FF242424FF222222FF202020FF1F1F1FFF1D1D1DFF1C1C
+ 1CFF1A1A1AFF181818FF171717FF151515FF131313FF121212FF101010FF0F0F
+ 0FFF0D0D0DFF0B0B0BFF0A0A0AFF080808FF060606FF050505FF030303FF0202
+ 02FF000000FF0000005F00000000000000000000000000000000000000000000
+ 00000000000000000000000000003E3E3ECF3C3C3CFF3B3B3BFF393939FF3737
+ 37FF363636FF343434FF323232FF313131FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A
+ 2AFF292929FF272727FF252525FF242424FF222222FF202020FF1F1F1FFF1D1D
+ 1DFF1C1C1CFF1A1A1AFF181818FF171717FF151515FF131313FF121212FF1010
+ 10FF0F0F0FFF0D0D0DFF0B0B0BFF0A0A0AFF080808FF060606FF050505FF0303
+ 03FF020202FF000000FF0000002F000000000000000000000000000000000000
+ 000000000000000000004141417F404040FF3E3E3EFF3C3C3CFF3B3B3BFF3939
+ 39FF373737FF363636FF343434FF323232FF313131FF2F2F2FFF2E2E2EFF2C2C
+ 2CFF2A2A2AFF292929FF272727FF252525FF242424FF222222FF202020FF1F1F
+ 1FFF1D1D1DFF1C1C1CFF1A1A1AFF181818FF171717FF151515FF131313FF1212
+ 12FF101010FF0F0F0FFF0D0D0DFF0B0B0BFF0A0A0AFF080808FF060606FF0505
+ 05FF030303FF020202FF000000CF000000000000000000000000000000000000
+ 0000000000004444441F424242EF414141FF404040FF3E3E3EFF3C3C3CFF3B3B
+ 3BFF393939FF373737FF363636FF343434FF323232FF313131FF2F2F2FFF2E2E
+ 2EFF2C2C2CFF2A2A2AFF292929FF272727FF252525FF242424FF222222FF2020
+ 20FF1F1F1FFF1D1D1DFF1C1C1CFF1A1A1AFF181818FF171717FF151515FF1313
+ 13FF121212FF101010FF0F0F0FFF0D0D0DFF0B0B0BFF0A0A0AFF080808FF0606
+ 06FF050505FF030303FF020202FF0101015F0000000000000000000000000000
+ 0000000000004646469F444444FF424242FF414141FF404040FF3E3E3EFF3C3C
+ 3CFF3B3B3BFF393939FF373737FF363636FF343434FF323232FF313131FF2F2F
+ 2FFF2E2E2EFF2C2C2CFF2A2A2AFF292929FF272727FF252525FF242424FF2222
+ 22FF202020FF1F1F1FFF1D1D1DFF1C1C1CFF1A1A1AFF181818FF171717FF1515
+ 15FF131313FF121212FF101010FF0F0F0FFF0D0D0DFF0B0B0BFF0A0A0AFF0808
+ 08FF060606FF050505FF030303FF020202EF0202020F00000000000000000000
+ 00004949491F474747FF464646FF444444FF424242FF414141FF404040FF3E3E
+ 3EFF3C3C3CFF3B3B3BFF393939FF373737FF363636FF343434FF323232FF3131
+ 31FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF292929FF272727FF252525FF2424
+ 24FF222222FF202020FF1F1F1FFF1D1D1DFF1C1C1CFF1A1A1AFF181818FF1717
+ 17FF151515FF131313FF121212FF101010FF0F0F0FFF0D0D0DFF0B0B0BFF0A0A
+ 0AFF080808FF060606FF050505FF030303FF0202025F00000000000000000000
+ 00004B4B4B7F494949FF474747FF464646FF444444FF424242FF414141FF4040
+ 40FF3E3E3EFF3C3C3CFF3B3B3BFF393939FF373737FF363636FF343434FF3232
+ 32FF313131FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF292929FF272727FF2525
+ 25FF242424FF222222FF202020FF1F1F1FFF1D1D1DFF1C1C1CFF1A1A1AFF1818
+ 18FF171717FF151515FF131313FF121212FF101010FF0F0F0FFF0D0D0DFF0B0B
+ 0BFF0A0A0AFF080808FF060606FF050505FF030303DF00000000000000000000
+ 00004C4C4CDF4B4B4BFF494949FF474747FF464646FF444444FF424242FF4141
+ 41FF404040FF3E3E3EFF3C3C3CFF3B3B3BFF393939FF373737FF363636FF3434
+ 34FF323232FF313131FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF292929FF2727
+ 27FF252525FF242424FF222222FF202020FF1F1F1FFF1D1D1DFF1C1C1CFF1A1A
+ 1AFF181818FF171717FF151515FF131313FF121212FF101010FF0F0F0FFF0D0D
+ 0DFF0B0B0BFF0A0A0AFF080808FF060606FF050505FF0404042F000000004F4F
+ 4F2F4E4E4EFF4C4C4CFF4B4B4BFF494949FF474747FF464646FF444444FF4242
+ 42FF414141FF404040FF3E3E3EFF3C3C3CFF3B3B3BFF393939FF373737FF3636
+ 36FF343434FF323232FF313131FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF2929
+ 29FF272727FF252525FF242424FF222222FF202020FF1F1F1FFF1D1D1DFF1C1C
+ 1CFF1A1A1AFF181818FF171717FF151515FF131313FF121212FF101010FF0F0F
+ 0FFF0D0D0DFF0B0B0BFF0A0A0AFF080808FF060606FF0505058F000000005151
+ 516F505050FF4E4E4EFF4C4C4CFF4B4B4BFF494949FF474747FF464646FF4444
+ 44FF424242FF414141FF404040FF3E3E3EFF3C3C3CFF3B3B3BFF393939FF3737
+ 37FF363636FF343434FF323232FF313131FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A
+ 2AFF292929FF272727FF252525FF242424FF222222FF202020FF1F1F1FFF1D1D
+ 1DFF1C1C1CFF1A1A1AFF181818FF171717FF151515FF131313FF121212FF1010
+ 10FF0F0F0FFF0D0D0DFF0B0B0BFF0A0A0AFF080808FF070707CF000000005353
+ 53AF515151FF505050FF4E4E4EFF4C4C4CFF4B4B4BFF494949FF474747FF4646
+ 46FF444444FF424242FF414141FF404040FF3E3E3EFF3C3C3CFF3B3B3BFF3939
+ 39FF373737FF363636FF343434FF323232FF313131FF2F2F2FFF2E2E2EFF2C2C
+ 2CFF2A2A2AFF292929FF272727FF252525FF242424FF222222FF202020FF1F1F
+ 1FFF1D1D1DFF1C1C1CFF1A1A1AFF181818FF171717FF151515FF131313FF1212
+ 12FF0F170FFF0C230CFF0D0D0DFF0B0B0BFF0A0A0AFF080808FF000000005454
+ 54CF535353FF515151FF505050FF61624CFF7C8246FF4B4B4BFF494949FF4747
+ 47FF464646FF444444FF424242FF414141FF404040FF3E3E3EFF3C3C3CFF3B3B
+ 3BFF393939FF373737FF363636FF343434FF323232FF313131FF2F2F2FFF2E2E
+ 2EFF2C2C2CFF2A2A2AFF292929FF272727FF252525FF242424FF222222FF2020
+ 20FF1F1F1FFF1D1D1DFF1C1C1CFF1A1A1AFF181818FF171717FF151515FF121A
+ 12FF056A04FF065406FF0F0F0FFF0D0D0DFF0B0B0BFF0A0A0AFF0909092F5656
+ 56FF545454FF535353FF515151FF83864AFFB2BA42FF9AA342FF5C5F48FF4949
+ 49FF474747FF464646FF444444FF424242FF414141FF404040FF3E3E3EFF3C3C
+ 3CFF3B3B3BFF393939FF373737FF363636FF343434FF323232FF313131FF2F2F
+ 2FFF2E2E2EFF2C2C2CFF2A2A2AFF292929FF272727FF252525FF242424FF2222
+ 22FF202020FF1F1F1FFF1D1D1DFF1C1C1CFF1A1A1AFF181818FF161D15FF0A6C
+ 06FF057F01FF066305FF101010FF0F0F0FFF0D0D0DFF0B0B0BFF0A0A0A3F5858
+ 58FF565656FF545454FF535353FF87874CFFB8BC44FFB2BA42FFABB73FFF7880
+ 44FF494949FF474747FF464646FF444444FF424242FF414141FF404040FF3E3E
+ 3EFF3C3C3CFF3B3B3BFF393939FF373737FF363636FF343434FF323232FF3131
+ 31FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF292929FF272727FF252525FF2424
+ 24FF222222FF202020FF1F1F1FFF1D1D1DFF1C1C1CFF192019FF0F6E08FF0A81
+ 03FF078002FF057802FF121212FF101010FF0F0F0FFF0D0D0DFF0C0C0C7F5959
+ 59FF585858FF565656FF545454FF8B894EFFBEBE47FFB8BC44FFB2BA42FFABB7
+ 3FFF9AA83FFF5F6446FF474747FF464646FF444444FF424242FF414141FF4040
+ 40FF3E3E3EFF3C3C3CFF3B3B3BFF393939FF373737FF363636FF343434FF3232
+ 32FF313131FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF292929FF272727FF2525
+ 25FF242424FF222222FF202020FF1F1F1FFF1D1D1DFF156A0CFF108306FF0C82
+ 04FF0A8103FF078002FF131313FF121212FF101010FF0F0F0FFF0D0D0D7F5B5B
+ 5BFF595959FF585858FF565656FF9E994FFFC5C049FFBEBE47FFB8BC44FFB2BA
+ 42FFABB73FFFA5B53DFF7A8541FF4D4E46FF464646FF444444FF424242FF4141
+ 41FF404040FF3E3E3EFF3C3C3CFF3B3B3BFF393939FF373737FF363636FF3434
+ 34FF323232FF313131FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF292929FF2727
+ 27FF252525FF242424FF222222FF202020FF1C5913FF168508FF138407FF1083
+ 06FF0C8204FF0A8103FF151515FF131313FF121212FF101010FF0F0F0F7F5D5D
+ 5DFF5B5B5BFF595959FF585858FF938D52FFCCC24CFFC5C049FFBEBE47FFB8BC
+ 44FFB2BA42FFABB73FFFA5B53DFF94A63DFF5C6244FF464646FF444444FF4242
+ 42FF414141FF404040FF3E3E3EFF3C3C3CFF3B3B3BFF393939FF373737FF3636
+ 36FF343434FF323232FF313131FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A2AFF2929
+ 29FF272727FF252525FF242424FF22421BFF1E880BFF1A8609FF168508FF1384
+ 07FF108306FF0C8204FF171717FF151515FF131313FF121212FF1111117F5E5E
+ 5EFF5D5D5DFF5B5B5BFF595959FF988F54FFD2C54EFFCCC24CFFC5C049FFBEBE
+ 47FFB8BC44FFB2BA42FFABB73FFFA5B53DFF9FB33BFF80903DFF4B4C45FF4444
+ 44FF424242FF414141FF404040FF3E3E3EFF506335FF64942AFF64A025FF5E9E
+ 23FF4A6F2AFF363A32FF323232FF313131FF2F2F2FFF2E2E2EFF2C2C2CFF2A2A
+ 2AFF292929FF272727FF263222FF26840FFF22890CFF1E880BFF1A8609FF1685
+ 08FF138407FF126F09FF181818FF171717FF151515FF131313FF1212124F6060
+ 60EF5E5E5EFF5D5D5DFF5B5B5BFF8B8357FFD9C751FFD2C54EFFCCC24CFFC5C0
+ 49FFBEBE47FFB8BC44FFB2BA42FFABB73FFFA5B53DFF9FB33BFF94AA3AFF6D7A
+ 3EFF444444FF424242FF494E3FFF6C8D32FF75A52BFF6FA329FF6AA127FF64A0
+ 25FF5E9E23FF518226FF343434FF323232FF313131FF2F2F2FFF2E2E2EFF2C2C
+ 2CFF2A2A2AFF292929FF2C7416FF2A8C0FFF268B0EFF22890CFF1E880BFF1A86
+ 09FF168508FF156A0CFF1A1A1AFF181818FF171717FF151515FF1414143F6161
+ 61BF606060FF5E5E5EFF5D5D5DFF75705AFFE0C953FFD9C751FFD2C54EFFCCC2
+ 4CFFC5C049FFBEBE47FFB8BC44FFB2BA42FFABB73FFFA5B53DFF9FB33BFF98B1
+ 39FF89A238FF7B9338FF86AB32FF80A930FF7BA72DFF75A52BFF6FA329FF6AA1
+ 27FF64A025FF5E9E23FF48692BFF343434FF323232FF313131FF2F2F2FFF2E2E
+ 2EFF2C2C2CFF305D1FFF338F13FF2E8D11FF2A8C0FFF268B0EFF22890CFF1E88
+ 0BFF1A8609FF1A5113FF1C1C1CFF1A1A1AFF181818FF171717FF1515150F6363
+ 638F616161FF606060FF5E5E5EFF5D5D5DFFDEC456FFE0C953FFD9C751FFD2C5
+ 4EFFCCC24CFFC5C049FFBEBE47FFB8BC44FFB2BA42FFABB73FFFA5B53DFF9FB3
+ 3BFF98B139FF92AF36FF8CAD34FF86AB32FF80A930FF7BA72DFF75A52BFF6FA3
+ 29FF6AA127FF64A025FF5E9E23FF3A4233FF343434FF323232FF313131FF2F2F
+ 2FFF324728FF3C9216FF379014FF338F13FF2E8D11FF2A8C0FFF268B0EFF2289
+ 0CFF1E880BFF1E3919FF1D1D1DFF1C1C1CFF1A1A1AFF181818DF000000006464
+ 644F636363FF616161FF606060FF5E5E5EFFB6A35AFFE7CB56FFE0C953FFD9C7
+ 51FFD2C54EFFCCC24CFFC5C049FFBEBE47FFB8BC44FFB2BA42FFABB73FFFA5B5
+ 3DFF9FB33BFF98B139FF92AF36FF8CAD34FF86AB32FF80A930FF7BA72DFF75A5
+ 2BFF6FA329FF6AA127FF64A025FF558428FF363636FF343434FF323232FF3237
+ 2FFF448F1BFF409318FF3C9216FF379014FF338F13FF2E8D11FF2A8C0FFF268B
+ 0EFF22820EFF202020FF1F1F1FFF1D1D1DFF1C1C1CFF1A1A1A9F000000006666
+ 660F656565FF636363FF616161FF606060FF837B5DFFEDCE58FFE7CB56FFE0C9
+ 53FFD9C751FFD2C54EFFCCC24CFFC5C049FFBEBE47FFB8BC44FFB2BA42FFABB7
+ 3FFFA5B53DFF9FB33BFF98B139FF92AF36FF8CAD34FF86AB32FF80A930FF7BA7
+ 2DFF75A52BFF6FA329FF6AA127FF64A025FF50772BFF363636FF363A33FF4A85
+ 21FF4A971BFF459519FF409318FF3C9216FF379014FF338F13FF2E8D11FF2A8C
+ 0FFF256416FF222222FF202020FF1F1F1FFF1D1D1DFF1C1C1C5F000000000000
+ 0000666666AF656565FF636363FF616161FF606060FFE1C25BFFEDCE58FFE7CB
+ 56FFE0C953FFD9C751FFD2C54EFFCCC24CFFC5C049FFBEBE47FFB8BC44FFB2BA
+ 42FFABB73FFFA5B53DFF9FB33BFF98B139FF92AF36FF8CAD34FF86AB32FF80A9
+ 30FF7BA72DFF75A52BFF6FA329FF6AA127FF64A025FF578B27FF579522FF549A
+ 1FFF4F981DFF4A971BFF459519FF409318FF3C9216FF379014FF338F13FF2E8D
+ 11FF263222FF242424FF222222FF202020FF1F1F1FFF1E1E1E0F000000000000
+ 00006767674F666666FF656565FF636363FF616161FF90845FFFF4D05BFFEDCE
+ 58FFE7CB56FFE0C953FFD9C751FFD2C54EFFCCC24CFFC5C049FFBEBE47FFB8BC
+ 44FFB2BA42FFABB73FFFA5B53DFF9FB33BFF98B139FF92AF36FF8CAD34FF86AB
+ 32FF80A930FF7BA72DFF75A52BFF6FA329FF6AA127FF64A025FF5E9E23FF599C
+ 21FF549A1FFF4F981DFF4A971BFF459519FF409318FF3C9216FF379014FF2F68
+ 1BFF272727FF252525FF242424FF222222FF2121219F00000000000000000000
+ 000000000000686868DF666666FF656565FF636363FF616161FFD4B65EFFF4D0
+ 5BFFEDCE58FFE7CB56FFE0C953FFD9C751FFD2C54EFFCCC24CFFC5C049FFBEBE
+ 47FFB8BC44FFB2BA42FFABB73FFFA5B53DFF9FB33BFF98B139FF92AF36FF8CAD
+ 34FF86AB32FF80A930FF7BA72DFF75A52BFF6FA329FF6AA127FF64A025FF5E9E
+ 23FF599C21FF549A1FFF4F981DFF4A971BFF459519FF409318FF3B8B17FF2C37
+ 27FF292929FF272727FF252525FF242424FF2222221F00000000000000000000
+ 0000000000006969695F686868FF666666FF656565FF636363FF757061FFF2CB
+ 5DFFF4D05BFFEDCE58FFE7CB56FFE0C953FFD9C751FFD2C54EFFCCC24CFFC5C0
+ 49FFBEBE47FFB8BC44FFB2BA42FFABB73FFFA5B53DFF9FB33BFF98B139FF92AF
+ 36FF8CAD34FF86AB32FF80A930FF7BA72DFF75A52BFF6FA329FF6AA127FF64A0
+ 25FF5E9E23FF599C21FF549A1FFF4F981DFF4A971BFF459519FF345425FF2C2C
+ 2CFF2A2A2AFF292929FF272727FF2525259F0000000000000000000000000000
+ 00000000000000000000696969BF686868FF666666FF656565FF636363FF9385
+ 61FFFBD35DFFF4D05BFFEDCE58FFE7CB56FFE0C953FFD9C751FFD2C54EFFCCC2
+ 4CFFC5C049FFBEBE47FFB8BC44FFB2BA42FFABB73FFFA5B53DFF9FB33BFF98B1
+ 39FF92AF36FF8CAD34FF86AB32FF80A930FF7BA72DFF75A52BFF6FA329FF6AA1
+ 27FF64A025FF5E9E23FF599C21FF549A1FFF4F981DFF417023FF2F2F2FFF2E2E
+ 2EFF2C2C2CFF2A2A2AFF292929FF2727271F0000000000000000000000000000
+ 000000000000000000006B6B6B2F6A6A6AFF686868FF666666FF656565FF6363
+ 63FF9D8C61FFFBD35DFFF4D05BFFEDCE58FFE7CB56FFE0C953FFD9C751FFD2C5
+ 4EFFCCC24CFFC5C049FFBEBE47FFB8BC44FFB2BA42FFABB73FFFA5B53DFF9FB3
+ 3BFF98B139FF92AF36FF8CAD34FF86AB32FF80A930FF7BA72DFF75A52BFF6FA3
+ 29FF6AA127FF64A025FF5E9E23FF599C21FF4C8124FF323232FF313131FF2F2F
+ 2FFF2E2E2EFF2C2C2CFF2A2A2A7F000000000000000000000000000000000000
+ 00000000000000000000000000006B6B6B6F6A6A6AFF686868FF666666FF6565
+ 65FF636363FF9D8C61FFFBD35DFFF4D05BFFEDCE58FFE7CB56FFE0C953FFD9C7
+ 51FFD2C54EFFCCC24CFFC5C049FFBEBE47FFB8BC44FFB2BA42FFABB73FFFA5B5
+ 3DFF9FB33BFF98B139FF92AF36FF8CAD34FF86AB32FF80A930FF7BA72DFF75A5
+ 2BFF6FA329FF6AA127FF64A025FF50772BFF383C34FF343434FF323232FF3131
+ 31FF2F2F2FFF2E2E2EBF00000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000006B6B6B9F6A6A6AFF686868FF6666
+ 66FF656565FF636363FF938561FFF2CB5DFFF4D05BFFEDCE58FFE7CB56FFE0C9
+ 53FFD9C751FFD2C54EFFCCC24CFFC5C049FFBEBE47FFB8BC44FFB2BA42FFABB7
+ 3FFFA5B53DFF9FB33BFF98B139FF92AF36FF8CAD34FF86AB32FF80A930FF7BA7
+ 2DFF75A52BFF6FA329FF557430FF393939FF373737FF363636FF343434FF3232
+ 32FF313131EF3030300F00000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000006B6B6BCF6A6A6AFF6868
+ 68FF666666FF656565FF636363FF6B6961FFCAAF5EFFF4D05BFFEDCE58FFE7CB
+ 56FFE0C953FFD9C751FFD2C54EFFCCC24CFFC5C049FFBEBE47FFB8BC44FFB2BA
+ 42FFABB73FFFA5B53DFF9FB33BFF98B139FF92AF36FF8CAD34FF86AB32FF80A9
+ 30FF739A30FF4B5839FF3C3C3CFF3B3B3BFF393939FF373737FF363636FF3434
+ 34EF3232322F0000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000006B6B6B0F6B6B6BBF6A6A
+ 6AFF686868FF666666FF656565FF636363FF616161FF867D5FFFCEB45BFFEDCE
+ 58FFE7CB56FFE0C953FFD9C751FFD2C54EFFCCC24CFFC5C049FFBEBE47FFB8BC
+ 44FFB2BA42FFABB73FFFA5B53DFF9FB33BFF98B139FF92AF36FF83A036FF6477
+ 3AFF414141FF404040FF3E3E3EFF3C3C3CFF3B3B3BFF393939FF373737EF3636
+ 362F000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000006B6B
+ 6B9F6A6A6AFF686868FF666666FF656565FF636363FF616161FF606060FF7A74
+ 5EFFAD9C5AFFD5BD56FFE0C953FFD9C751FFD2C54EFFCCC24CFFC5C049FFBEBE
+ 47FFB8BC44FFB2BA42FFABB73FFF9FAF3EFF83923FFF606843FF464646FF4444
+ 44FF424242FF414141FF404040FF3E3E3EFF3C3C3CFF3B3B3BCF3939392F0000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00006B6B6B6F6A6A6AEF686868FF666666FF656565FF636363FF616161FF6060
+ 60FF5E5E5EFF5D5D5DFF6C695AFF7A7558FF988F54FF938D52FF8F8B50FF8B89
+ 4EFF87874CFF70714CFF61624CFF4C4C4CFF4B4B4BFF494949FF474747FF4646
+ 46FF444444FF424242FF414141FF404040FF3E3E3EAF3D3D3D0F000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000006B6B6B1F696969BF686868FF666666FF656565FF636363FF6161
+ 61FF606060FF5E5E5EFF5D5D5DFF5B5B5BFF595959FF585858FF565656FF5454
+ 54FF535353FF515151FF505050FF4E4E4EFF4C4C4CFF4B4B4BFF494949FF4747
+ 47FF464646FF444444FF424242DF4141414F0000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000006969693F686868BF666666FF656565FF6363
+ 63FF616161FF606060FF5E5E5EFF5D5D5DFF5B5B5BFF595959FF585858FF5656
+ 56FF545454FF535353FF515151FF505050FF4E4E4EFF4C4C4CFF4B4B4BFF4949
+ 49FF474747EF4646467F4545450F000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000006767673F6666669F6565
+ 65EF636363FF616161FF606060FF5E5E5EFF5D5D5DFF5B5B5BFF595959FF5858
+ 58FF565656FF545454FF535353FF515151FF505050FF4E4E4EFF4C4C4CAF4A4A
+ 4A5F000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00006464643F6363637F616161AF606060CF5E5E5EFF5D5D5DFF5B5B5BFF5959
+ 59FF585858FF565656DF545454BF5252528F5151514F5050500F000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000000000000000000FFFF
+ E007FFFF0000FFFE0000FFFF0000FFF800001FFF0000FFE000000FFF0000FF80
+ 000003FF0000FF00000001FF0000FE00000000FF0000FC000000007F0000F800
+ 0000003F0000F0000000001F0000F0000000000F0000E0000000000F0000C000
+ 000000070000C000000000030000800000000003000080000000000300008000
+ 0000000100000000000000010000000000000001000000000000000100000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000010000000000000001000000000000000100008000
+ 0000000100008000000000030000C000000000030000C000000000070000E000
+ 000000070000E0000000000F0000F0000000001F0000F8000000001F0000FC00
+ 0000003F0000FC000000007F0000FF00000000FF0000FF80000001FF0000FFC0
+ 000007FF0000FFF000000FFF0000FFFC00007FFF0000FFFF8001FFFF00002800
+ 0000200000004000000001002000000000008010000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000001A1A1A2F1717176F1515158F1212
+ 12BF101010BF0D0D0DBF0B0B0BAF0909097F0707074F0505050F000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000002424240F2121217F1E1E1EDF1C1C1CFF191919FF171717FF1414
+ 14FF121212FF101010FF0D0D0DFF0B0B0BFF080808FF060606FF040404AF0202
+ 023F000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00002828287F252525EF232323FF212121FF1E1E1EFF1C1C1CFF191919FF1717
+ 17FF141414FF121212FF101010FF0D0D0DFF0B0B0BFF080808FF060606FF0303
+ 03FF010101BF0000002F00000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000000000000000003030301F2D2D
+ 2DCF2A2A2AFF282828FF252525FF232323FF212121FF1E1E1EFF1C1C1CFF1919
+ 19FF171717FF141414FF121212FF101010FF0D0D0DFF0B0B0BFF080808FF0606
+ 06FF030303FF010101FF0000007F000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000003434342F323232EF2F2F
+ 2FFF2D2D2DFF2A2A2AFF282828FF252525FF232323FF212121FF1E1E1EFF1C1C
+ 1CFF191919FF171717FF141414FF121212FF101010FF0D0D0DFF0B0B0BFF0808
+ 08FF060606FF030303FF010101FF0000009F0000000000000000000000000000
+ 0000000000000000000000000000000000003939392F373737EF343434FF3232
+ 32FF2F2F2FFF2D2D2DFF2A2A2AFF282828FF252525FF232323FF212121FF1E1E
+ 1EFF1C1C1CFF191919FF171717FF141414FF121212FF101010FF0D0D0DFF0B0B
+ 0BFF080808FF060606FF030303FF010101FF0000009F00000000000000000000
+ 00000000000000000000000000003E3E3E0F3C3C3CCF393939FF373737FF3434
+ 34FF323232FF2F2F2FFF2D2D2DFF2A2A2AFF282828FF252525FF232323FF2121
+ 21FF1E1E1EFF1C1C1CFF191919FF171717FF141414FF121212FF101010FF0D0D
+ 0DFF0B0B0BFF080808FF060606FF030303FF010101FF0000007F000000000000
+ 00000000000000000000000000004040408F3E3E3EFF3C3C3CFF393939FF3737
+ 37FF343434FF323232FF2F2F2FFF2D2D2DFF2A2A2AFF282828FF252525FF2323
+ 23FF212121FF1E1E1EFF1C1C1CFF191919FF171717FF141414FF121212FF1010
+ 10FF0D0D0DFF0B0B0BFF080808FF060606FF030303FF010101FF0000002F0000
+ 000000000000000000004545453F434343FF404040FF3E3E3EFF3C3C3CFF3939
+ 39FF373737FF343434FF323232FF2F2F2FFF2D2D2DFF2A2A2AFF282828FF2525
+ 25FF232323FF212121FF1E1E1EFF1C1C1CFF191919FF171717FF141414FF1212
+ 12FF101010FF0D0D0DFF0B0B0BFF080808FF060606FF030303FF010101BF0000
+ 00000000000000000000474747BF454545FF434343FF404040FF3E3E3EFF3C3C
+ 3CFF393939FF373737FF343434FF323232FF2F2F2FFF2D2D2DFF2A2A2AFF2828
+ 28FF252525FF232323FF212121FF1E1E1EFF1C1C1CFF191919FF171717FF1414
+ 14FF121212FF101010FF0D0D0DFF0B0B0BFF080808FF060606FF030303FF0202
+ 023F000000004C4C4C1F4A4A4AFF484848FF454545FF434343FF404040FF3E3E
+ 3EFF3C3C3CFF393939FF373737FF343434FF323232FF2F2F2FFF2D2D2DFF2A2A
+ 2AFF282828FF252525FF232323FF212121FF1E1E1EFF1C1C1CFF191919FF1717
+ 17FF141414FF121212FF101010FF0D0D0DFF0B0B0BFF080808FF060606FF0404
+ 04AF000000004E4E4E6F4D4D4DFF4A4A4AFF484848FF454545FF434343FF4040
+ 40FF3E3E3EFF3C3C3CFF393939FF373737FF343434FF323232FF2F2F2FFF2D2D
+ 2DFF2A2A2AFF282828FF252525FF232323FF212121FF1E1E1EFF1C1C1CFF1919
+ 19FF171717FF141414FF121212FF101010FF0D0D0DFF0B0B0BFF080808FF0606
+ 06FF0505050F515151BF4F4F4FFF4D4D4DFF4A4A4AFF484848FF454545FF4343
+ 43FF404040FF3E3E3EFF3C3C3CFF393939FF373737FF343434FF323232FF2F2F
+ 2FFF2D2D2DFF2A2A2AFF282828FF252525FF232323FF212121FF1E1E1EFF1C1C
+ 1CFF191919FF171717FF141414FF121212FF101010FF0D0D0DFF0B0B0BFF0808
+ 08FF0707073F545454EF515151FF4F4F4FFF777B47FF4A4A4AFF484848FF4545
+ 45FF434343FF404040FF3E3E3EFF3C3C3CFF393939FF373737FF343434FF3232
+ 32FF2F2F2FFF2D2D2DFF2A2A2AFF282828FF252525FF232323FF212121FF1E1E
+ 1EFF1C1C1CFF191919FF171717FF141414FF0C3B0BFF093F08FF0D0D0DFF0B0B
+ 0BFF0909097F565656FF545454FF515151FFB5BB44FF9BA442FF5B5E47FF4848
+ 48FF454545FF434343FF404040FF3E3E3EFF3C3C3CFF393939FF373737FF3434
+ 34FF323232FF2F2F2FFF2D2D2DFF2A2A2AFF282828FF252525FF232323FF2121
+ 21FF1E1E1EFF1C1C1CFF191919FF0F530CFF068002FF094F08FF101010FF0D0D
+ 0DFF0B0B0B8F595959FF565656FF545454FFBFBE47FFB5BB44FFACB840FF7D86
+ 43FF4D4E47FF454545FF434343FF404040FF3E3E3EFF3C3C3CFF393939FF3737
+ 37FF343434FF323232FF2F2F2FFF2D2D2DFF2A2A2AFF282828FF252525FF2323
+ 23FF212121FF1E1E1EFF194314FF0E8305FF0A8103FF0A6506FF121212FF1010
+ 10FF0D0D0DBF5B5B5BFF595959FF565656FFC9C24BFFBFBE47FFB5BB44FFACB8
+ 40FF98A73EFF5D6244FF454545FF434343FF404040FF3E3E3EFF3C3C3CFF3939
+ 39FF373737FF343434FF323232FF2F2F2FFF2D2D2DFF2A2A2AFF282828FF2525
+ 25FF232323FF203A1BFF198609FF138407FF0E8305FF0D6608FF141414FF1212
+ 12FF101010BF5E5E5EFF5B5B5BFF595959FFD3C54FFFC9C24BFFBFBE47FFB5BB
+ 44FFACB840FFA2B43CFF7B8A3EFF4A4C44FF434343FF404040FF3E3E3EFF4F62
+ 34FF5B862AFF517D29FF3B4730FF323232FF2F2F2FFF2D2D2DFF2A2A2AFF2828
+ 28FF262C24FF24830FFF1E880BFF198609FF138407FF135B0DFF171717FF1414
+ 14FF1212129F606060FF5E5E5EFF5B5B5BFFD5C153FFD3C54FFFC9C24BFFBFBE
+ 47FFB5BB44FFACB840FFA2B43CFF94AB3AFF67733FFF58633DFF6F8E33FF76A5
+ 2CFF6DA228FF65A025FF5A9724FF363B33FF323232FF2F2F2FFF2D2D2DFF2A2A
+ 2AFF2E6E19FF2A8C10FF248A0DFF1E880BFF198609FF185011FF191919FF1717
+ 17FF1515157F626262BF606060FF5E5E5EFFBBA857FFDDC852FFD3C54FFFC9C2
+ 4BFFBFBE47FFB5BB44FFACB840FFA2B43CFF99B139FF90AE35FF87AB32FF7EA8
+ 2FFF76A52CFF6DA228FF65A025FF517D29FF343434FF323232FF2F2F2FFF3459
+ 23FF389115FF318E12FF2A8C10FF248A0DFF1E880BFF1D3819FF1C1C1CFF1919
+ 19FF1717175F6464648F626262FF606060FF94885CFFE7CC56FFDDC852FFD3C5
+ 4FFFC9C24BFFBFBE47FFB5BB44FFACB840FFA2B43CFF99B139FF90AE35FF87AB
+ 32FF7EA82FFF76A52CFF6DA228FF65A025FF465D2FFF343434FF37452EFF4695
+ 1AFF3F9317FF389115FF318E12FF2A8C10FF24830FFF212121FF1E1E1EFF1C1C
+ 1CFF1919191F6666662F656565FF626262FF6A6760FFE8C85AFFE7CC56FFDDC8
+ 52FFD3C54FFFC9C24BFFBFBE47FFB5BB44FFACB840FFA2B43CFF99B139FF90AE
+ 35FF87AB32FF7EA82FFF76A52CFF6DA228FF65A025FF4F772AFF539421FF4E98
+ 1DFF46951AFF3F9317FF389115FF318E12FF296618FF232323FF212121FF1E1E
+ 1ECF0000000000000000676767DF656565FF626262FFAD995FFFF2D05AFFE7CC
+ 56FFDDC852FFD3C54FFFC9C24BFFBFBE47FFB5BB44FFACB840FFA2B43CFF99B1
+ 39FF90AE35FF87AB32FF7EA82FFF76A52CFF6DA228FF65A025FF5D9D22FF559A
+ 1FFF4E981DFF46951AFF3F9317FF378A16FF293525FF252525FF232323FF2121
+ 215F00000000000000006969695F676767FF656565FF6C6A62FFE8C45EFFF2D0
+ 5AFFE7CC56FFDDC852FFD3C54FFFC9C24BFFBFBE47FFB5BB44FFACB840FFA2B4
+ 3CFF99B139FF90AE35FF87AB32FF7EA82FFF76A52CFF6DA228FF65A025FF5D9D
+ 22FF559A1FFF4E981DFF46951AFF355923FF2A2A2AFF282828FF252525DF2424
+ 240F000000000000000000000000696969CF676767FF656565FF807862FFF2CC
+ 5DFFF2D05AFFE7CC56FFDDC852FFD3C54FFFC9C24BFFBFBE47FFB5BB44FFACB8
+ 40FFA2B43CFF99B139FF90AE35FF87AB32FF7EA82FFF76A52CFF6DA228FF65A0
+ 25FF5D9D22FF559A1FFF437124FF2F2F2FFF2D2D2DFF2A2A2AFF2929295F0000
+ 00000000000000000000000000006B6B6B2F6A6A6AFF676767FF656565FF8078
+ 62FFF2CC5DFFF2D05AFFE7CC56FFDDC852FFD3C54FFFC9C24BFFBFBE47FFB5BB
+ 44FFACB840FFA2B43CFF99B139FF90AE35FF87AB32FF7EA82FFF76A52CFF6DA2
+ 28FF65A025FF517D29FF363B33FF323232FF2F2F2FFF2D2D2DAF000000000000
+ 0000000000000000000000000000000000006B6B6B5F6A6A6AFF676767FF6565
+ 65FF807862FFDEBD5EFFF2D05AFFE7CC56FFDDC852FFD3C54FFFC9C24BFFBFBE
+ 47FFB5BB44FFACB840FFA2B43CFF99B139FF90AE35FF87AB32FF7EA82FFF76A5
+ 2CFF577531FF393939FF373737FF343434FF323232CF3030300F000000000000
+ 000000000000000000000000000000000000000000006B6B6B5F6A6A6AFF6767
+ 67FF656565FF626262FFAD995FFFE8C85AFFE7CC56FFDDC852FFD3C54FFFC9C2
+ 4BFFBFBE47FFB5BB44FFACB840FFA2B43CFF99B139FF90AE35FF769136FF505A
+ 3CFF3E3E3EFF3C3C3CFF393939FF363636DF3535350F00000000000000000000
+ 00000000000000000000000000000000000000000000000000006B6B6B5F6A6A
+ 6AEF676767FF656565FF626262FF6A6760FF94885CFFBBA857FFCCBA53FFD3C5
+ 4FFFC9C24BFFBFBE47FFB5BB44FF939D43FF7B8642FF575B45FF454545FF4343
+ 43FF404040FF3E3E3EFF3C3C3CCF3939390F0000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000006B6B
+ 6B2F696969BF676767FF656565FF626262FF606060FF5E5E5EFF5B5B5BFF5959
+ 59FF565656FF545454FF515151FF4F4F4FFF4D4D4DFF4A4A4AFF484848FF4545
+ 45FF434343FF4040407F00000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000006969695F676767CF656565FF626262FF606060FF5E5E5EFF5B5B
+ 5BFF595959FF565656FF545454FF515151FF4F4F4FFF4D4D4DFF4A4A4AFF4747
+ 479F4545451F0000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000006666662F6464647F626262BF606060EF5E5E
+ 5EFF5B5B5BFF595959FF565656FF545454CF5151519F4E4E4E5F4D4D4D0F0000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000FFE007FFFF0001FFFE00007FF800003FF000001FE000000FC000
+ 0007C00000038000000380000001000000010000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000018000
+ 000180000001C0000003C0000007E0000007F000000FF800001FFC00007FFF00
+ 00FFFFC003FF2800000010000000200000000100200000000000400400000000
+ 0000000000000000000000000000000000000000000000000000000000002222
+ 223F1D1D1D9F181818CF131313FF0E0E0EFF090909BF0505058F0202021F0000
+ 000000000000000000000000000000000000000000003030300F2B2B2BAF2626
+ 26FF212121FF1C1C1CFF171717FF131313FF0E0E0EFF090909FF040404FF0101
+ 017F000000000000000000000000000000003A3A3A0F353535CF303030FF2B2B
+ 2BFF262626FF212121FF1C1C1CFF171717FF131313FF0E0E0EFF090909FF0404
+ 04FF0101019F0000000000000000000000003E3E3EBF3A3A3AFF353535FF3030
+ 30FF2B2B2BFF262626FF212121FF1C1C1CFF171717FF131313FF0E0E0EFF0909
+ 09FF040404FF0101017F000000004747475F434343FF3E3E3EFF3A3A3AFF3535
+ 35FF303030FF2B2B2BFF262626FF212121FF1C1C1CFF171717FF131313FF0E0E
+ 0EFF090909FF040404FF0202021F4D4D4DAF484848FF434343FF3E3E3EFF3A3A
+ 3AFF353535FF303030FF2B2B2BFF262626FF212121FF1C1C1CFF171717FF1313
+ 13FF0E0E0EFF090909FF0505057F525252FF595B4CFF484848FF434343FF3E3E
+ 3EFF3A3A3AFF353535FF303030FF2B2B2BFF262626FF212121FF1C1C1CFF1717
+ 17FF10270FFF0C1B0CFF090909BF575757FF88884DFF9DA443FF5F6345FF4343
+ 43FF3E3E3EFF3A3A3AFF353535FF303030FF2B2B2BFF262626FF212121FF1B30
+ 18FF0C7B05FF0C420BFF0E0E0EEF5C5C5CFF948E53FFC2BF48FFAEB841FF7984
+ 40FF484A42FF3E3E3EFF4C6032FF41552EFF303030FF2B2B2BFF262C25FF207C
+ 0EFF158508FF12460FFF131313EF616161FFA19459FFD6C64FFFC2BF48FFAEB8
+ 41FF97AB3BFF819F35FF78A62DFF67A126FF3F4E30FF303030FF346B1DFF2C8D
+ 10FF20890CFF1B3617FF181818BF656565CF7D7660FFEACD57FFD6C64FFFC2BF
+ 48FFAEB841FF9BB23AFF89AC33FF78A62DFF659A28FF496E29FF48961AFF3991
+ 15FF2C8611FF212121FF1D1D1D8F6969695F656565FFD5B65EFFEACD57FFD6C6
+ 4FFFC2BF48FFAEB841FF9BB23AFF89AC33FF78A62DFF67A126FF579B20FF4896
+ 1AFF335E20FF262626FF2222221F000000006A6A6ACF6F6D65FFDEBE5EFFEACD
+ 57FFD6C64FFFC2BF48FFAEB841FF9BB23AFF89AC33FF78A62DFF67A126FF4C7B
+ 26FF303030FF2B2B2B8F00000000000000006B6B6B2F6A6A6AEF6F6D65FFD5B6
+ 5EFFEACD57FFD6C64FFFC2BF48FFAEB841FF9BB23AFF89AC33FF5E7934FF3A3A
+ 3AFF353535CF3030300F0000000000000000000000006B6B6B2F6A6A6ACF6565
+ 65FF7D7660FFA19459FF948E53FF88884DFF767C47FF525546FF434343FF3E3E
+ 3EAF3A3A3A0F0000000000000000000000000000000000000000000000006969
+ 695F656565BF616161FF5C5C5CFF575757FF525252EF4D4D4DAF4848483F0000
+ 0000000000000000000000000000F00F0000C007000080030000800100000000
+ 0000000000000000000000000000000000000000000000000000000000008001
+ 000080010000C0030000F00F0000}
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnClose = FormClose
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Panel1: TPanel
+ Left = 0
+ Top = 333
+ Width = 578
+ Height = 25
+ Align = alBottom
+ BevelOuter = bvNone
+ TabOrder = 0
+ DesignSize = (
+ 578
+ 25)
+ object sbPrint: TSpeedButton
+ Left = 0
+ Top = 4
+ Width = 52
+ Height = 21
+ Caption = 'Print'
+ Flat = True
+ Glyph.Data = {
+ 36030000424D3603000000000000360000002800000010000000100000000100
+ 18000000000000030000120B0000120B00000000000000000000FF00FFFF00FF
+ FF00FFFF00FF6C6A6A6C6A6AFF00FFFF00FF6C6A6A6C6A6AFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6C6A6AAAA7A7A19F9F6C6A6A6C
+ 6A6A6C6A6AE5E3E36C6A6A6C6A6A6C6A6AFF00FFFF00FFFF00FFFF00FFFF00FF
+ 6C6A6ADAD9D9A19F9FA19F9FA19F9F3736363535356C6D6DBFBFBFE1E2E2B7B6
+ B66C6A6A6C6A6A6C6A6AFF00FF6C6A6AD4D3D3CACACA8E8C8C8E8C8C8E8C8C3C
+ 3B3B0A090A0707070B0B0B0707077A7A7ABBBBBB6C6A6AFF00FF6C6A6ACACACA
+ CACACA8E8C8CD7D4D4CECBCBBFBCBCB1AFAFA3A0A08886865E5B5C0707070909
+ 090808086C6A6A7673736C6A6ACACACA8E8C8CEFEEEEFFFEFEFBFAFAE3E0E1DE
+ DEDEDEDDDDCFCECEBDBCBCADABAB8B89895856567A78787573736C6A6A8E8C8C
+ FFFFFFFEFCFCFAFAFAD5D4D5989193A09899B2ABACC4C0C1D7D7D7D8D8D8C7C6
+ C6B7B6B6918F8F6C6969FF00FF6C6A6A6C6A6AEDEBEBB1A6A77A6F728A838896
+ 92959690919D97989A93959E9899BBBABAD1D1D1C2C2C26C6A6AFF00FFFF00FF
+ FF00FF6C6A6ABB897FA7876D8B6F647D67606F62657973798F8B8EA9A3A4CBCA
+ CAC1C1C16C6A6AFF00FFFF00FFFF00FFFF00FFFF00FFBD8281FFE3B4FFD39FE9
+ B281C99973BA916CBD8281807D7E6C6A6A6C6A6AFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFBD8281FFE0B8FFD3A7FFD09DFFCE90FFC688BD8281FF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFC08683FFE7CFFFE0C0FFD9B2FF
+ D3A5FFD099BD8281FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFBD8281FEEBD8FFE6CCFFDEBDFFD8B1FED3A4BD8281FF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFBD8281FFFFF2FFFFF2FFEBD8FFE5CAFF
+ E1BDF3C7A7BD8281FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ BD8281BD8281BD8281FBEFE2FBE3CFFBDDC2BD8281FF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFBD8281BD8281BD
+ 8281FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
+ OnClick = sbPrintClick
+ end
+ object cb_DontShow: TCheckBox
+ Left = 451
+ Top = 5
+ Width = 126
+ Height = 18
+ Anchors = [akTop, akRight]
+ Caption = 'Don'#39't Show This Again'
+ TabOrder = 0
+ OnClick = cb_DontShowClick
+ end
+ end
+ object wb_Browser: TWebBrowser
+ Left = 0
+ Top = 0
+ Width = 578
+ Height = 333
+ Align = alClient
+ TabOrder = 1
+ ControlData = {
+ 4C000000BD3B00006B2200000000000000000000000000000000000000000000
+ 000000004C000000000000000000000001000000E0D057007335CF11AE690800
+ 2B2E126208000000000000004C0000000114020000000000C000000000000046
+ 8000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000100000000000000000000000000000000000000}
+ end
+end
diff --git a/official/5.0.30.691/Everwood/Source/Delphi/uEWSampleInfo.pas b/official/5.0.30.691/Everwood/Source/Delphi/uEWSampleInfo.pas
new file mode 100644
index 0000000..7eeb3d5
--- /dev/null
+++ b/official/5.0.30.691/Everwood/Source/Delphi/uEWSampleInfo.pas
@@ -0,0 +1,140 @@
+unit uEWSampleInfo;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
+ Dialogs, StdCtrls, OleCtrls, SHDocVw, ExtCtrls, ToolsApi, Buttons;
+
+type
+ TSampleInfoForm = class(TForm)
+ Panel1: TPanel;
+ wb_Browser: TWebBrowser;
+ cb_DontShow: TCheckBox;
+ sbPrint: TSpeedButton;
+ procedure FormClose(Sender: TObject; var Action: TCloseAction);
+ procedure sbPrintClick(Sender: TObject);
+ procedure cb_DontShowClick(Sender: TObject);
+ private
+ fIniFile: string;
+ public
+ class procedure RunSampleInfo(const aFilename:string);
+ end;
+
+ TProjectNotification = class(TInterfacedObject, IOTAIDENotifier)
+ public
+ procedure AfterCompile(Succeeded: Boolean);
+ procedure AfterSave;
+ procedure BeforeCompile(const Project: IOTAProject; var Cancel: Boolean);
+ procedure BeforeSave;
+ procedure Destroyed;
+ procedure FileNotification(NotifyCode: TOTAFileNotification; const FileName: String; var Cancel: Boolean);
+ procedure Modified;
+ end;
+
+implementation
+
+uses
+ IniFiles;
+
+{$R *.dfm}
+
+{ TProjectNotification }
+
+procedure TProjectNotification.AfterCompile(Succeeded: Boolean);
+begin
+end;
+
+procedure TProjectNotification.AfterSave;
+begin
+end;
+
+procedure TProjectNotification.BeforeCompile(const Project: IOTAProject; var Cancel: Boolean);
+begin
+end;
+
+procedure TProjectNotification.BeforeSave;
+begin
+end;
+
+procedure TProjectNotification.Destroyed;
+begin
+end;
+
+procedure TProjectNotification.FileNotification(NotifyCode: TOTAFileNotification; const FileName: String; var Cancel: Boolean);
+var
+ lFileExt: string;
+begin
+ case NotifyCode of { }
+ ofnFileOpened:begin
+ lFileExt := ExtractFileExt(Filename);
+ if SameText(lFileExt,'.dpr') or SameText(lFileExt,'.dpk') or SameText(lFileExt,'.bpg') or SameText(lFileExt,'.bdsproj') or SameText(lFileExt,'.bdsgroup') or SameText(lFileExt,'.dproj') or SameText(lFileExt,'.groupproj') then begin
+ TSampleInfoForm.RunSampleInfo(Filename);
+ end;
+ end;
+ end; { case }
+end;
+
+procedure TProjectNotification.Modified;
+begin
+end;
+
+{ TSampleInfoForm }
+
+var
+ gLastForm: TSampleInfoForm;
+
+class procedure TSampleInfoForm.RunSampleInfo(const aFilename: string);
+var
+ lHelpFile,lIniFile: string;
+begin
+ lHelpFile := ChangeFileExt(aFilename,'.sample.html');
+ lIniFile := ChangeFileExt(lHelpFile,'.ini');
+ if FileExists(lHelpFile) then begin
+
+ with TMemIniFile.Create(lIniFile) do try
+ if ReadBool('Options','DontShow',false) then exit;
+ finally
+ Free();
+ end;
+
+ FreeAndNil(gLastForm);
+ gLastForm := self.Create(Application);
+ with gLastForm do begin
+ Caption := 'Helpful tips about the '+ChangeFileExt(ExtractFileName(aFilename),'')+' project';
+ wb_Browser.Navigate(lHelpFile);
+ fIniFile := lIniFile;
+ Show();
+ end;
+ end;
+end;
+
+procedure TSampleInfoForm.FormClose(Sender: TObject; var Action: TCloseAction);
+begin
+ gLastForm := nil;
+ Release();
+end;
+
+var gNotify:integer;
+
+procedure TSampleInfoForm.sbPrintClick(Sender: TObject);
+var temp : OleVariant;
+begin
+ wb_Browser.ExecWB(OLECMDID_PRINT, OLECMDEXECOPT_PROMPTUSER, temp, temp);
+end;
+
+procedure TSampleInfoForm.cb_DontShowClick(Sender: TObject);
+begin
+ with TMemIniFile.Create(fIniFile) do try
+ WriteBool('Options','DontShow',cb_DontShow.Checked);
+ UpdateFile();
+ finally
+ Free();
+ end;
+end;
+
+initialization
+ gNotify := (BorlandIDEServices as IOTAServices).AddNotifier(TProjectNotification.Create());
+finalization
+ (BorlandIDEServices as IOTAServices).RemoveNotifier(gNotify);
+end.
diff --git a/official/5.0.30.691/Everwood/Source/Delphi/uEWStringTools.pas b/official/5.0.30.691/Everwood/Source/Delphi/uEWStringTools.pas
new file mode 100644
index 0000000..937c11c
--- /dev/null
+++ b/official/5.0.30.691/Everwood/Source/Delphi/uEWStringTools.pas
@@ -0,0 +1,47 @@
+unit uEWStringTools;
+
+interface
+
+type
+ TStringArray = array of string;
+
+function SplitString(const iString:string; iSeparator:char):TStringArray; overload;
+
+implementation
+
+uses
+ SysUtils;
+
+function SplitString(const iString:string; iSeparator:char):TStringArray;
+var i,Len,Start,Count:integer;
+begin
+ if iString = '' then begin
+ SetLength(result,0);
+ exit;
+ end;
+
+ SetLength(result,2);
+ i := 1;//0;
+ Len := Length(iString);
+ Start := 1;
+ Count := 0;
+ while i <= Len do begin
+ if iString[i] = iSeparator then begin
+ if Count > Length(result)-1 then SetLength(result,Length(result)*2);
+ result[Count] := Trim(Copy(iString,Start,i-Start));
+ Start := i+1;
+ inc(Count);
+ end;
+ inc(i);
+ end;
+
+ if Count < Length(result)+1 then SetLength(result,Length(result)*2);
+ result[Count] := Trim(Copy(iString,Start,Len-Start+1));
+ inc(Count);
+
+ if Count > 0 then begin
+ SetLength(result,Count);
+ end;
+end;
+
+end.
diff --git a/official/5.0.30.691/Everwood/Source/Delphi/uEWTools.pas b/official/5.0.30.691/Everwood/Source/Delphi/uEWTools.pas
new file mode 100644
index 0000000..5aab43e
--- /dev/null
+++ b/official/5.0.30.691/Everwood/Source/Delphi/uEWTools.pas
@@ -0,0 +1,17 @@
+unit uEWTools;
+
+interface
+
+uses
+ Windows;
+
+function IsKeyDown(VirtualKeyCode:Integer=VK_SHIFT): Boolean;
+
+implementation
+
+function IsKeyDown(VirtualKeyCode:Integer=VK_SHIFT): Boolean;
+begin
+ Result := GetKeyState(VirtualKeyCode) and $80 <> 0;
+end;
+
+end.
diff --git a/official/5.0.30.691/Everwood/Source/Delphi/uEWWizard.dfm b/official/5.0.30.691/Everwood/Source/Delphi/uEWWizard.dfm
new file mode 100644
index 0000000..4f8e8cb
--- /dev/null
+++ b/official/5.0.30.691/Everwood/Source/Delphi/uEWWizard.dfm
@@ -0,0 +1,412 @@
+object EWWizardForm: TEWWizardForm
+ Left = 344
+ Top = 238
+ BorderStyle = bsDialog
+ Caption = 'New Wizard...'
+ ClientHeight = 292
+ ClientWidth = 452
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Bevel1: TBevel
+ Left = 0
+ Top = 42
+ Width = 452
+ Height = 2
+ Align = alTop
+ Shape = bsBottomLine
+ end
+ object Panel1: TPanel
+ Left = 0
+ Top = 0
+ Width = 452
+ Height = 42
+ Align = alTop
+ BevelOuter = bvNone
+ Color = clWhite
+ TabOrder = 0
+ object Image1: TImage
+ Left = 5
+ Top = 5
+ Width = 32
+ Height = 32
+ AutoSize = True
+ end
+ object Label1: TLabel
+ Left = 43
+ Top = 5
+ Width = 111
+ Height = 13
+ Caption = 'RemObjects Wizard'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = [fsBold]
+ ParentFont = False
+ end
+ object Label2: TLabel
+ Left = 45
+ Top = 21
+ Width = 48
+ Height = 13
+ Caption = 'Bla Bla Bla'
+ end
+ end
+ object pc_Pages: TPageControl
+ Left = 0
+ Top = 44
+ Width = 452
+ Height = 213
+ ActivePage = ts_Welcome
+ Align = alClient
+ Style = tsFlatButtons
+ TabOrder = 1
+ object ts_Welcome: TTabSheet
+ Caption = 'Welcome'
+ object Label3: TLabel
+ Left = 8
+ Top = 8
+ Width = 201
+ Height = 13
+ Caption = 'Welcome to the New Project Wizard'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = [fsBold]
+ ParentFont = False
+ end
+ object Label4: TLabel
+ Left = 24
+ Top = 24
+ Width = 31
+ Height = 13
+ Caption = 'Bla Bla'
+ end
+ end
+ object ts_Finish: TTabSheet
+ Caption = 'Finish'
+ ImageIndex = 2
+ object Label5: TLabel
+ Left = 8
+ Top = 8
+ Width = 32
+ Height = 13
+ Caption = 'Done!'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = [fsBold]
+ ParentFont = False
+ end
+ object Label6: TLabel
+ Left = 24
+ Top = 24
+ Width = 413
+ Height = 13
+ Caption =
+ 'The Wizard is now ready to create your with the optio' +
+ 'ns selected below:'
+ end
+ object lv_Options: TListView
+ Left = 24
+ Top = 40
+ Width = 393
+ Height = 161
+ Color = clBtnFace
+ Columns = <
+ item
+ Caption = 'Option'
+ Width = -1
+ WidthType = (
+ -1)
+ end
+ item
+ Caption = 'Value'
+ Width = -1
+ WidthType = (
+ -1)
+ end>
+ ColumnClick = False
+ ReadOnly = True
+ RowSelect = True
+ TabOrder = 0
+ ViewStyle = vsReport
+ end
+ end
+ end
+ object Panel2: TPanel
+ Left = 0
+ Top = 257
+ Width = 452
+ Height = 35
+ Align = alBottom
+ BevelOuter = bvNone
+ TabOrder = 2
+ object btn_Finish: TBitBtn
+ Left = 372
+ Top = 5
+ Width = 75
+ Height = 25
+ Hint = 'This is Finish, but not the End'
+ Anchors = [akTop, akRight]
+ Caption = 'Finish'
+ Default = True
+ ModalResult = 1
+ TabOrder = 0
+ Visible = False
+ Glyph.Data = {
+ 36060000424D3606000000000000360000002800000020000000100000000100
+ 18000000000000060000220B0000220B00000000000000000000FF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF811E00FF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FF787878FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF811E00
+ 811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FF787878787878FF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ 811E00811E00811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FF787878787878787878FF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FF811E0095440F811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF787878898989787878FF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FF811E00A7632F811E00811E00FF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF7878789F9F9F78787878
+ 7878FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FF811E00BF8B62CCA17E811E00811E00FF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF787878B8B8B8C6
+ C6C6787878787878FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FF811E00D8B69CE6D1BFE7D3C4811E00FF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF787878D1
+ D1D1E0E0E0E2E2E2787878FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FF811E00F0E2D9FCF7F2FAF0E6811E00811E
+ 00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF78
+ 7878EBEBEBF5F5F5F1F1F1787878787878FF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FF811E00D8AF96F4E2CFF0D7BDD8A784811E
+ 00811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF78
+ 7878D0D0D0E9E9E9E3E3E3CACACA787878787878FF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FF811E00F3DECAEFD4B8EBC9A7DAA67D811E00FF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF787878E7
+ E7E7E1E1E1DBDBDBC9C9C9787878FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FF811E00E7BB92E3B081E0A672D5925A811E
+ 00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF78
+ 7878D3D3D3CDCDCDC6C6C6BCBCBC787878FF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF811E00DA995ED78F50D38441CF7B
+ 35811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FF787878BFBFBFB8B8B8B2B2B2ACACAC787878FF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF811E00811E00811E00811E
+ 00811E00811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FF787878787878787878787878787878787878FF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
+ NumGlyphs = 2
+ end
+ object btn_Cancel: TBitBtn
+ Left = 5
+ Top = 5
+ Width = 75
+ Height = 25
+ Cancel = True
+ Caption = 'Cancel'
+ ModalResult = 2
+ TabOrder = 1
+ Glyph.Data = {
+ 36060000424D3606000000000000360000002800000020000000100000000100
+ 18000000000000060000C40E0000C40E00000000000000000000FF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FF00009A00009AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF00009A0000
+ 9AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6B6B6B6BFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FF6B6B6B6B6B6BFF00FFFF00FFFF00FFFF00FFFF00FF
+ 00009A174AFD103BF400009AFF00FFFF00FFFF00FFFF00FF00009A002CF80030
+ FC00009AFF00FFFF00FFFF00FFFF00FF6B6B6BA8A8A8A0A0A06B6B6BFF00FFFF
+ 00FFFF00FFFF00FF6B6B6B9A9A9A9C9C9C6B6B6BFF00FFFF00FFFF00FFFF00FF
+ 00009A1A47F81A4CFF123BF100009AFF00FFFF00FF00009A012DF60132FF002A
+ F300009AFF00FFFF00FFFF00FFFF00FF6B6B6BA7A7A7AAAAAA9F9F9F6B6B6BFF
+ 00FFFF00FF6B6B6B9999999E9E9E9797976B6B6BFF00FFFF00FFFF00FFFF00FF
+ FF00FF00009A1C47F61B4DFF143EF400009A00009A002DF80134FF032BF20000
+ 9AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BA7A7A7ABABABA2A2A26B
+ 6B6B6B6B6B9A9A9A9E9E9E9898986B6B6BFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FF00009A1D48F61D50FF103DFB0431FE0132FF002CF600009AFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BA7A7A7ACACACA3
+ A3A39F9F9F9E9E9E9999996B6B6BFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FF00009A1A48F91342FF0C3CFF0733F600009AFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BA7A7A7A7
+ A7A7A3A3A39C9C9C6B6B6BFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FF00009A214EFC1D4BFF1847FF1743F600009AFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BACACACAC
+ ACACA9A9A9A4A4A46B6B6BFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FF00009A2E5BF92C5FFF224DF8204BF82355FF1B46F600009AFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BB1B1B1B3B3B3AB
+ ABABAAAAAAAFAFAFA6A6A66B6B6BFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FF00009A3664FA386BFF2D59F400009A00009A224CF42558FF1D49F60000
+ 9AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BB6B6B6B9B9B9AEAEAE6B
+ 6B6B6B6B6BA9A9A9B0B0B0A7A7A76B6B6BFF00FFFF00FFFF00FFFF00FFFF00FF
+ 00009A4071FA4274FF325DF100009AFF00FFFF00FF00009A224DF1275AFF204C
+ F800009AFF00FFFF00FFFF00FFFF00FF6B6B6BBBBBBBBEBEBEAFAFAF6B6B6BFF
+ 00FFFF00FF6B6B6BA7A7A7B1B1B1AAAAAA6B6B6BFF00FFFF00FFFF00FFFF00FF
+ 00009A497AFC3B66F300009AFF00FFFF00FFFF00FFFF00FF00009A2550F42655
+ FA00009AFF00FFFF00FFFF00FFFF00FF6B6B6BC0C0C0B5B5B56B6B6BFF00FFFF
+ 00FFFF00FFFF00FF6B6B6BAAAAAAAEAEAE6B6B6BFF00FFFF00FFFF00FFFF00FF
+ FF00FF00009A00009AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF00009A0000
+ 9AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6B6B6B6BFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FF6B6B6B6B6B6BFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
+ NumGlyphs = 2
+ end
+ object btn_Next: TBitBtn
+ Left = 372
+ Top = 5
+ Width = 75
+ Height = 25
+ Anchors = [akTop, akRight]
+ Caption = '&Next'
+ Default = True
+ TabOrder = 2
+ OnClick = btn_NextClick
+ Glyph.Data = {
+ 36060000424D3606000000000000360000002800000020000000100000000100
+ 18000000000000060000130B0000130B00000000000000000000FF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ 0B7C15097A14087110056A0C04670B04670C04670C04670C04670C04670C0467
+ 0C045709FF00FFFF00FFFF00FFFF00FF9C9C9C9C9C9C98989896969695959595
+ 9595959595959595959595959595959595909090FF00FFFF00FFFF00FF129A28
+ 1AB03A15AF3211AB270DA81F08A61808A51608A51608A61708A61708A51708AB
+ 18078D12045708FF00FFFF00FFA8A8A8B0B0B0AEAEAEACACACAAAAAAA8A8A8A8
+ A8A8A8A8A8A8A8A8A8A8A8A8A8A8A9A9A9A0A0A0909090FF00FFFF00FF1BAD3C
+ 25C5541EC0451ABE3A15BD3110BA270BB81D09B81909B81A09B81A09B71A09BE
+ 1C08AB1704670CFF00FFFF00FFB0B0B0B9B9B9B5B5B5B4B4B4B2B2B2B0B0B0AD
+ ADADADADADADADADADADADADADADAFAFAFA9A9A9959595FF00FFFF00FF20B445
+ 31C46429BF5322BB481BBA3D17B73312B4290DB3200AB21909B11809B01809B7
+ 1A08A61704680CFF00FFFF00FFB3B3B3BCBCBCB8B8B8B5B5B5B3B3B3B1B1B1AF
+ AFAFADADADACACACACACACABABABADADADA8A8A8959595FF00FFFF00FF22B548
+ 3FC87635C367FEFEFE23BC4E1DBA4218B838FEFEFE0EB4240AB31C09B11809B8
+ 1A08A61704670CFF00FFFF00FFB3B3B3C0C0C0BCBCBCFEFEFEB5B5B5B3B3B3B1
+ B1B1FEFEFEADADADACACACACACACADADADA8A8A8959595FF00FFFF00FF21B548
+ 58D08A46C97AFEFEFEFEFEFE24BD501FBB46FEFEFEFEFEFE10B4290CB21F09B7
+ 1A08A61604670CFF00FFFF00FFB3B3B3CACACAC3C3C3FEFEFEFEFEFEB6B6B6B4
+ B4B4FEFEFEFEFEFEAEAEAEACACACADADADA8A8A8959595FF00FFFF00FF21B548
+ 77D89F52CC813BC772FEFEFEFEFEFE26BE5421BD4AFEFEFEFEFEFE13B52D0DBA
+ 230AA71804680BFF00FFFF00FFB3B3B3D5D5D5C8C8C8C0C0C0FEFEFEFEFEFEB7
+ B7B7B5B5B5FEFEFEFEFEFEB0B0B0AFAFAFA8A8A8959595FF00FFFF00FF21B548
+ 8ADEAC5DD08A42C87637C56EFEFEFEFEFEFE27BF5822BD4FFEFEFEFEFEFE14BB
+ 310EA922066F0EFF00FFFF00FFB3B3B3DCDCDCCCCCCCC2C2C2BEBEBEFEFEFEFE
+ FEFEB8B8B8B5B5B5FEFEFEFEFEFEB1B1B1AAAAAA989898FF00FFFF00FF21B548
+ 95E0B365D28F48CA7AFEFEFEFEFEFE30C3692EC265FEFEFEFEFEFE1FBB461BBE
+ 3E14AE2F0A7A14FF00FFFF00FFB3B3B3E0E0E0CECECEC4C4C4FEFEFEFEFEFEBB
+ BBBBBBBBBBFEFEFEFEFEFEB4B4B4B4B4B4ADADAD9C9C9CFF00FFFF00FF21B548
+ 9DE3B96FD597FEFEFEFEFEFE40C87439C570FEFEFEFEFEFE2BC16027BF5523C0
+ 4E1BB23C0D851AFF00FFFF00FFB3B3B3E3E3E3D2D2D2FEFEFEFEFEFEC1C1C1BF
+ BFBFFEFEFEFEFEFEB9B9B9B8B8B8B7B7B7B0B0B0A0A0A0FF00FFFF00FF21B548
+ A9E6C280DAA3FEFEFE59CF874DCC7E44C978FEFEFE39C57032C36B2DC1632AC2
+ 5D20B548108F1FFF00FFFF00FFB3B3B3E7E7E7D8D8D8FEFEFECACACAC6C6C6C2
+ C2C2FEFEFEBFBFBFBCBCBCBABABAB9B9B9B3B3B3A4A4A4FF00FFFF00FF21B549
+ AEE8C5A6E5BF91DFAF86DBA778D79D67D39159CF8744C97836C56E32C36C30C5
+ 6A27BB57139C26FF00FFFF00FFB3B3B3E9E9E9E6E6E6DFDFDFDADADAD5D5D5D0
+ D0D0CACACAC2C2C2BDBDBDBCBCBCBCBCBCB7B7B7A8A8A8FF00FFFF00FF22B548
+ 92E0B3AEE8C6B1E9C8A9E6C29BE3B887DDAA6AD5964FCD823BC77436C57034C8
+ 732BBF5E14A428FF00FFFF00FFB3B3B3DFDFDFE9E9E9EAEAEAE7E7E7E2E2E2DB
+ DBDBD0D0D0C7C7C7C0C0C0BDBDBDBEBEBEB9B9B9ABABABFF00FFFF00FFFF00FF
+ 38BB5A51C57053C57151C56F4CC36B42C06437BC5A2EB95325B74A23B54B23B7
+ 4A1AAF39FF00FFFF00FFFF00FFFF00FFBBBBBBC5C5C5C6C6C6C5C5C5C3C3C3C0
+ C0C0BBBBBBB8B8B8B5B5B5B4B4B4B4B4B4B0B0B0FF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
+ Layout = blGlyphRight
+ NumGlyphs = 2
+ end
+ object btn_Back: TBitBtn
+ Left = 292
+ Top = 5
+ Width = 75
+ Height = 25
+ Anchors = [akTop, akRight]
+ Caption = 'Back'
+ Enabled = False
+ TabOrder = 3
+ OnClick = btn_BackClick
+ Glyph.Data = {
+ 36060000424D3606000000000000360000002800000020000000100000000100
+ 18000000000000060000130B0000130B00000000000000000000FF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ 0B7C15097A14087110056A0C04670B04670C04670C04670C04670C04670C0467
+ 0C045709FF00FFFF00FFFF00FFFF00FF9D9D9D9C9C9C99999996969695959595
+ 9595959595959595959595959595959595919191FF00FFFF00FFFF00FF129A28
+ 1AB03A15AF3211AB270DA81F08A61808A51608A51608A61708A61708A51708AB
+ 18078D12045708FF00FFFF00FFA8A8A8B1B1B1AEAEAEADADADAAAAAAA9A9A9A8
+ A8A8A8A8A8A9A9A9A9A9A9A8A8A8A9A9A9A1A1A1919191FF00FFFF00FF1BAD3C
+ 25C5541EC0451ABE3A15BD3110BA270BB81D09B81909B81A09B81A09B71A09BE
+ 1C08AB1704670CFF00FFFF00FFB0B0B0B9B9B9B6B6B6B4B4B4B2B2B2B1B1B1AE
+ AEAEADADADADADADADADADADADADAFAFAFA9A9A9959595FF00FFFF00FF20B445
+ 31C46429BF5322BB481BBA3D17B73312B4290DB3200AB21909B11809B01809B7
+ 1A08A61704680CFF00FFFF00FFB3B3B3BCBCBCB9B9B9B5B5B5B3B3B3B1B1B1AF
+ AFAFADADADADADADACACACABABABADADADA9A9A9969696FF00FFFF00FF22B548
+ 3FC87635C3672BBF5723BC4E1DBA42FEFEFE13B72E0EB4240AB31CFEFEFE09B8
+ 1A08A61704670CFF00FFFF00FFB4B4B4C1C1C1BDBDBDB9B9B9B6B6B6B4B4B4FE
+ FEFEB1B1B1AEAEAEADADADFEFEFEADADADA9A9A9959595FF00FFFF00FF21B548
+ 58D08A46C97A34C5692CBF5DFEFEFEFEFEFE1ABA3D16B733FEFEFEFEFEFE09B7
+ 1A08A61604670CFF00FFFF00FFB4B4B4CBCBCBC3C3C3BDBDBDB9B9B9FEFEFEFE
+ FEFEB3B3B3B1B1B1FEFEFEFEFEFEADADADA9A9A9959595FF00FFFF00FF21B548
+ 77D89F52CC813BC772FEFEFEFEFEFE26BE5421BD4AFEFEFEFEFEFE13B52D0DBA
+ 230AA71804680BFF00FFFF00FFB4B4B4D5D5D5C8C8C8C0C0C0FEFEFEFEFEFEB8
+ B8B8B6B6B6FEFEFEFEFEFEB0B0B0AFAFAFA9A9A9969696FF00FFFF00FF21B548
+ 8ADEAC5DD08AFEFEFEFEFEFE2FC3682CC162FEFEFEFEFEFE1EBB4418B93A14BB
+ 310EA922066F0EFF00FFFF00FFB4B4B4DDDDDDCCCCCCFEFEFEFEFEFEBCBCBCBA
+ BABAFEFEFEFEFEFEB4B4B4B2B2B2B1B1B1ABABAB989898FF00FFFF00FF21B548
+ 95E0B365D28F48CA7AFEFEFEFEFEFE30C3692EC265FEFEFEFEFEFE1FBB461BBE
+ 3E14AE2F0A7A14FF00FFFF00FFB4B4B4E0E0E0CECECEC5C5C5FEFEFEFEFEFEBC
+ BCBCBBBBBBFEFEFEFEFEFEB5B5B5B4B4B4AEAEAE9D9D9DFF00FFFF00FF21B548
+ 9DE3B96FD59757CE854ECC7FFEFEFEFEFEFE35C56D30C368FEFEFEFEFEFE23C0
+ 4E1BB23C0D851AFF00FFFF00FFB4B4B4E3E3E3D2D2D2C9C9C9C7C7C7FEFEFEFE
+ FEFEBDBDBDBCBCBCFEFEFEFEFEFEB7B7B7B1B1B1A1A1A1FF00FFFF00FF21B548
+ A9E6C280DAA35ED08A59CF874DCC7EFEFEFE43C87739C57032C36BFEFEFE2AC2
+ 5D20B548108F1FFF00FFFF00FFB4B4B4E7E7E7D9D9D9CDCDCDCBCBCBC6C6C6FE
+ FEFEC2C2C2BFBFBFBCBCBCFEFEFEBABABAB3B3B3A4A4A4FF00FFFF00FF21B549
+ AEE8C5A6E5BF91DFAF86DBA778D79D67D39159CF8744C97836C56E32C36C30C5
+ 6A27BB57139C26FF00FFFF00FFB4B4B4E9E9E9E6E6E6DFDFDFDADADAD5D5D5D0
+ D0D0CBCBCBC3C3C3BDBDBDBCBCBCBCBCBCB7B7B7A9A9A9FF00FFFF00FF22B548
+ 92E0B3AEE8C6B1E9C8A9E6C29BE3B887DDAA6AD5964FCD823BC77436C57034C8
+ 732BBF5E14A428FF00FFFF00FFB4B4B4E0E0E0E9E9E9EBEBEBE7E7E7E3E3E3DC
+ DCDCD1D1D1C7C7C7C0C0C0BDBDBDBEBEBEB9B9B9ABABABFF00FFFF00FFFF00FF
+ 38BB5A51C57053C57151C56F4CC36B42C06437BC5A2EB95325B74A23B54B23B7
+ 4A1AAF39FF00FFFF00FFFF00FFFF00FFBCBCBCC5C5C5C6C6C6C5C5C5C3C3C3C0
+ C0C0BCBCBCB8B8B8B5B5B5B4B4B4B5B5B5B0B0B0FF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
+ NumGlyphs = 2
+ end
+ end
+end
diff --git a/official/5.0.30.691/Everwood/Source/Delphi/uEWWizard.pas b/official/5.0.30.691/Everwood/Source/Delphi/uEWWizard.pas
new file mode 100644
index 0000000..28d5587
--- /dev/null
+++ b/official/5.0.30.691/Everwood/Source/Delphi/uEWWizard.pas
@@ -0,0 +1,259 @@
+unit uEWWizard;
+
+{----------------------------------------------------------------------------}
+{ RemObjects' Hydra - IDE Library }
+{ }
+{ compiler: Delphi 6 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of Hydra }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$I Everwood.inc}
+
+interface
+
+uses
+ {$IFDEF FPC}LCLIntf, LResources,{$ENDIF}
+ SysUtils, Classes, Graphics, Controls, Forms,
+ Dialogs, StdCtrls, Buttons, ExtCtrls, ComCtrls;
+
+type
+ TEWWizardForm = class(TForm)
+ Panel1: TPanel;
+ Image1: TImage;
+ Label1: TLabel;
+ Label2: TLabel;
+ Bevel1: TBevel;
+ pc_Pages: TPageControl;
+ ts_Welcome: TTabSheet;
+ ts_Finish: TTabSheet;
+ Panel2: TPanel;
+ btn_Finish: TBitBtn;
+ btn_Cancel: TBitBtn;
+ Label3: TLabel;
+ Label4: TLabel;
+ btn_Next: TBitBtn;
+ btn_Back: TBitBtn;
+ Label5: TLabel;
+ Label6: TLabel;
+ lv_Options: TListView;
+ procedure btn_NextClick(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ procedure btn_BackClick(Sender: TObject);
+ procedure FormDestroy(Sender: TObject);
+ private
+ fInEnterPage: boolean;
+ fActiveControl: TWinControl;
+ fValues: TStrings;
+ fNextPage: integer;
+ fPreviousPage: integer;
+ function GetActiveControl: TWinControl;
+ procedure SetActiveControl(const Value: TWinControl);
+ function GetNextPage: integer;
+ function GetPreviousPage: integer;
+ protected
+ procedure OnEnterPage(aPage:TTabSheet; aMovingForward:boolean); virtual;
+ procedure OnLeavePage(aPage:TTabSheet; aMovingForward:boolean); virtual;
+ procedure AfterEnterPage(aPage:TTabSheet; aMovingForward:boolean); virtual;
+
+ function CleanPascalString(const aString: string): string;
+ public
+ property Values:TStrings read fValues;
+ function Execute:boolean; overload;
+ class function Execute(aOwner: TComponent): boolean; overload;
+ property ActiveControl: TWinControl read GetActiveControl write SetActiveControl;
+ property NextPage: integer read GetNextPage write fNextPage;
+ property PreviousPage: integer read GetPreviousPage write fPreviousPage;
+ end;
+
+implementation
+
+// uses FileCtrl;
+{$IFNDEF FPC}
+{$R *.dfm}
+{$ENDIF FPC}
+
+{ THYNewProjectWizardForm }
+
+procedure TEWWizardForm.FormCreate(Sender: TObject);
+var
+ i: integer;
+begin
+ for i := 0 to ComponentCount-1 do begin
+ if Components[i] is TTabSheet then TTabSheet(Components[i]).TabVisible := false;
+ end;
+
+ fValues := TStringList.Create();
+
+ Height := Height-16;
+ pc_Pages.ActivePageIndex := 0;
+ OnEnterPage(pc_Pages.Pages[0],true);
+
+ fNextPage := -1;
+ fPreviousPage := -1;
+end;
+
+procedure TEWWizardForm.FormDestroy(Sender: TObject);
+begin
+ FreeAndNil(fValues);
+end;
+
+function TEWWizardForm.CleanPascalString(const aString:string):string;
+begin
+ result := aString;
+ result := StringReplace(result,'''','''''',[rfReplaceAll]); { replace quotes with double quotes }
+ result := StringReplace(result,#13#10,'''#13#10''',[rfReplaceAll]);
+ result := ''''+result+'''';
+end;
+
+
+procedure TEWWizardForm.btn_NextClick(Sender: TObject);
+begin
+ if pc_Pages.ActivePageIndex+1 < pc_Pages.PageCount then begin
+ fInEnterPage := true;
+ try
+ OnLeavePage(pc_Pages.Pages[pc_Pages.ActivePageIndex],true);
+ OnEnterPage(pc_Pages.Pages[NextPage],true);
+ finally
+ fInEnterPage := false;
+ end;
+ fPreviousPage := pc_Pages.ActivePageIndex;
+ pc_Pages.ActivePageIndex := NextPage;
+ if Assigned(fActiveControl) then begin
+ inherited ActiveControl := fActiveControl;
+ fActiveControl := nil;
+ end;
+ end;
+ fNextPage := -1;
+ AfterEnterPage(pc_Pages.ActivePage, true);
+end;
+
+procedure TEWWizardForm.btn_BackClick(Sender: TObject);
+begin
+ if pc_Pages.ActivePageIndex > 0 then begin
+ fInEnterPage := true;
+ try
+ OnLeavePage(pc_Pages.Pages[pc_Pages.ActivePageIndex],false);
+ OnEnterPage(pc_Pages.Pages[PreviousPage],false);
+ finally
+ fInEnterPage := false;
+ end;
+ pc_Pages.ActivePageIndex := PreviousPage;
+ if Assigned(fActiveControl) then begin
+ inherited ActiveControl := fActiveControl;
+ fActiveControl := nil;
+ end;
+ end;
+ fNextPage := -1;
+ fPreviousPage := -1;
+ AfterEnterPage(pc_Pages.ActivePage, false);
+end;
+
+
+procedure TEWWizardForm.OnEnterPage(aPage: TTabSheet; aMovingForward: boolean);
+var
+ i: integer;
+begin
+ {$IFDEF FPC}
+ if aMovingForward then btn_Finish.Visible := false else // for prevent warnings
+ {$ENDIF}
+ btn_Finish.Visible := false;
+ btn_Next.Visible := true;
+ if aPage = ts_Welcome then begin
+ btn_Back.Enabled := false;
+ btn_Next.Enabled := true;
+ ActiveControl := btn_Next;
+ end
+ else if aPage = ts_Finish then begin
+ {$IFNDEF FPC}
+ lv_Options.Items.BeginUpdate();
+ {$ENDIF}
+ try
+ lv_Options.Items.Clear();
+ for i := 0 to Values.Count-1 do begin
+ with lv_Options.Items.Add() do begin
+ Caption := Values.Names[i];
+ SubItems.Add(Values.Values[Values.Names[i]]);
+ end;
+ end; { for }
+ btn_Finish.Visible := true;
+ btn_Finish.Enabled := true;
+ btn_Next.Visible := false;
+ ActiveControl := btn_Finish;
+ finally
+ {$IFNDEF FPC}
+ lv_Options.Items.EndUpdate();
+ {$ENDIF}
+ end;
+ end
+ else { default for custom added pages } begin
+ btn_Back.Enabled := true;
+ btn_Next.Enabled := true;
+ end;
+end;
+
+procedure TEWWizardForm.OnLeavePage(aPage: TTabSheet; aMovingForward: boolean);
+begin
+end;
+
+function TEWWizardForm.Execute: boolean;
+begin
+ result := (ShowModal() = 1); // idOk=1
+end;
+
+class function TEWWizardForm.Execute(aOwner: TComponent): boolean;
+begin
+ with self.Create(aOwner) do try
+ result := Execute();
+ finally
+ Free();
+ end;
+end;
+
+function TEWWizardForm.GetActiveControl: TWinControl;
+begin
+ if Assigned(fActiveControl) then
+ result := fActiveControl
+ else
+ result := inherited ActiveControl;
+end;
+
+procedure TEWWizardForm.SetActiveControl(const Value: TWinControl);
+begin
+ if fInEnterPage then begin
+ fActiveControl := Value;
+ end
+ else begin
+ inherited ActiveControl := Value;
+ fActiveControl := nil;
+ end;
+end;
+
+function TEWWizardForm.GetNextPage: integer;
+begin
+ Result := fNextPage;
+ if result = -1 then result := pc_Pages.ActivePageIndex+1;
+end;
+
+function TEWWizardForm.GetPreviousPage: integer;
+begin
+ Result := fPreviousPage;
+ if result = -1 then result := pc_Pages.ActivePageIndex-1;
+end;
+
+procedure TEWWizardForm.AfterEnterPage(aPage: TTabSheet;
+ aMovingForward: boolean);
+begin
+
+end;
+
+{$IFDEF FPC}
+initialization
+ {$i uEWWizard.lrs}
+{$ENDIF}
+end.
+
diff --git a/official/5.0.30.691/Everwood/Welcome/Data Abstract/Welcome.png b/official/5.0.30.691/Everwood/Welcome/Data Abstract/Welcome.png
new file mode 100644
index 0000000..249fb6f
Binary files /dev/null and b/official/5.0.30.691/Everwood/Welcome/Data Abstract/Welcome.png differ
diff --git a/official/5.0.30.691/Everwood/Welcome/RemObjects SDK/Thumbs.db b/official/5.0.30.691/Everwood/Welcome/RemObjects SDK/Thumbs.db
new file mode 100644
index 0000000..678fe12
Binary files /dev/null and b/official/5.0.30.691/Everwood/Welcome/RemObjects SDK/Thumbs.db differ
diff --git a/official/5.0.30.691/Everwood/Welcome/RemObjects SDK/Welcome.png b/official/5.0.30.691/Everwood/Welcome/RemObjects SDK/Welcome.png
new file mode 100644
index 0000000..bfcac33
Binary files /dev/null and b/official/5.0.30.691/Everwood/Welcome/RemObjects SDK/Welcome.png differ
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Bin/PSUnitImporter.exe b/official/5.0.30.691/Pascal Script for Delphi/Bin/PSUnitImporter.exe
new file mode 100644
index 0000000..87885a4
Binary files /dev/null and b/official/5.0.30.691/Pascal Script for Delphi/Bin/PSUnitImporter.exe differ
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Changes.txt b/official/5.0.30.691/Pascal Script for Delphi/Changes.txt
new file mode 100644
index 0000000..386b89d
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Changes.txt
@@ -0,0 +1,187 @@
+==========
+ 3.0.3.57
+==========
+
+- NEW Support for Borland Developer Studio 2006
+
+==========
+ 3.0.3.53
+==========
+- Updated RemObjects SDk integration for Indy 10 / RO .349
+
+==========
+ 3.0.3.51
+==========
+- Support for Delphi 2005
+- Allow overriding internal procs.
+- Add importdecl to old style AddFunction ImportDecl.
+- New compiletime support functions
+- getconst/getconstcount
+- allow interface to be registered more than once and in any order
+- widestring published properties support.
+- Fix. Var parameter types weren't always checked.
+- fixes for CHAR consts.
+- Eliminate "Comparing signed and unsigned types" warnings (on D5) (jr)
+
+
+==========
+ 3.0.3.39
+==========
+- strtoint now throws an exception for invalid numbers.
+- Compiler fix: Check var parameters.
+- Docs update
+- Fixes in the import tool
+- Added a few new functions to make it earlier to add variable pointers to the script.
+- Added a few new samples
+- New Help system
+
+==========
+ 3.0.3.37
+==========
+
+- Classes and units renamed
+- product integrated into RemObjects Software product line
+
+==========
+ 3.0.1.33 (17 January 2004)
+==========
+- IDispatch Support now uses Variant for dynamic invocation
+- Smaller tweaks related to IDispatch
+
+==========
+ 3.0.1.32 (16 January 2004)
+==========
+- IDispatch type support
+- Dynamic Invoke using IDispatch
+- Removed Export mode, no need to set it anymore
+- RunProcP, RunProcPN functions, invoke IFPS3 functions with with 1 command
+- TIFPS3CompExec.ExecuteFunction wrapper for RunProcPN
+- Small Fix
+- Included missing .dpk
+
+==========
+ 3.0.1.31 (16 December 2003)
+==========
+- Fixes release
+
+==========
+ 3.0.1.30 (25 November 2003)
+==========
+- Better Interface support
+- Lot's of fixes and improvements
+- Records and other complex types passing to events
+- Adding regular variables to the script
+- PreProcessing
+
+==========
+ 3.0.1.21 (28 August 2003)
+==========
+- Speed Improvements
+- Default array properties
+- A few D5/BCC5 compatiblity changes
+- Help files update
+- SET properties
+- A few other fixes
+- Static arrays
+- With
+- Sets
+- Calling Interfaces (IUnknown etc)
+- AS/IS support (classes)
+- fixes
+- Speed Improvements
+- A small fix.
+
+==========
+ 3.0.1.20 beta 5 (31 July 2003)
+==========
+- Fix in codegen with some expressions
+- All Get* and Add* Method of the exec are now uppercasing their params
+- Removed AddExportVariable, now all variables are "exported"
+- Added an VGetAsString function that returns the string value of any variant.
+- Default array properties.
+
+==========
+ 3.0.1.20 beta 4 (26 July 2003)
+==========
+This release doesn't contain any new features, only fixes.
+
+==========
+ 3.0.1.20 beta 3 (05 May 2003)
+==========
+Changes since last beta:
+- A few D5/BCC5 compatiblity changes
+- Help files update
+- SET properties
+- A few other fixes
+
+==========
+ 3.0.1.20 beta 2 (02 April 2003)
+==========
+What's new: - Static arrays
+- With
+- Sets
+- Calling Interfaces (IUnknown etc)
+- AS/IS support (classes)
+- Assigned fixed
+- IFPS3 raises an exception when one of the Add* functions fail or when a scripted Event fails
+- A lot of fixes
+
+==========
+ 3.0.1.04 stable (09 March 2003)
+==========
+- A few fixes
+
+==========
+ 3.0.1.03 stable (14 January 2003)
+==========
+- New datetime library
+- Besides Open Array now also Dynamic Array (D4+) support
+- A few fixes
+
+==========
+ 3.0.1.02.1 stable (07 November 2002)
+==========
+- WideString/WideChar support
+- Some small fixes
+
+==========
+ 3.0.1.02 stable (26 August 2002)
+==========
+- Compiler speed improvements.
+- Couple of small changes.
+
+==========
+ 3.0.1.01.1 (08 July 2002)
+==========
+- Additions/Changes: Variant and Int64 support in calling library
+- Forward procedures
+- Automaticly adding published properties
+- Try/Finally/Except/End support
+- Open Array parameters in calling library
+- Component Wrapper
+
+==========
+ 3.0.1.01 (20 June 2002)
+==========
+- Added a lot of new imported classes
+- Added support for casting
+- Some fixes and changes
+
+==========
+ 3.0.1.00.3 stable (07 June 2002)
+==========
+- Kylix Demo
+- Dll Library updated for Kylix
+- Variant type
+- array constants
+- Procedural Variables
+- Nil
+- Events
+- Some fixes
+
+==========
+ 3.0.1.00.2 (15 May 2002)
+==========
+- Record support for class calling library.
+- Couple of new support functions.
+- Couple of fixes.
\ No newline at end of file
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Dcu/D10/PascalScript_Core_D10.bpl b/official/5.0.30.691/Pascal Script for Delphi/Dcu/D10/PascalScript_Core_D10.bpl
new file mode 100644
index 0000000..3be9ff2
Binary files /dev/null and b/official/5.0.30.691/Pascal Script for Delphi/Dcu/D10/PascalScript_Core_D10.bpl differ
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Dcu/D10/PascalScript_Core_D10.dcp b/official/5.0.30.691/Pascal Script for Delphi/Dcu/D10/PascalScript_Core_D10.dcp
new file mode 100644
index 0000000..b7bbad3
Binary files /dev/null and b/official/5.0.30.691/Pascal Script for Delphi/Dcu/D10/PascalScript_Core_D10.dcp differ
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Dcu/D10/PascalScript_RO_D10.bpl b/official/5.0.30.691/Pascal Script for Delphi/Dcu/D10/PascalScript_RO_D10.bpl
new file mode 100644
index 0000000..6620894
Binary files /dev/null and b/official/5.0.30.691/Pascal Script for Delphi/Dcu/D10/PascalScript_RO_D10.bpl differ
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Dcu/D10/PascalScript_RO_D10.dcp b/official/5.0.30.691/Pascal Script for Delphi/Dcu/D10/PascalScript_RO_D10.dcp
new file mode 100644
index 0000000..64cbf73
Binary files /dev/null and b/official/5.0.30.691/Pascal Script for Delphi/Dcu/D10/PascalScript_RO_D10.dcp differ
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Dcu/D11/PascalScript_Core_D11.bpl b/official/5.0.30.691/Pascal Script for Delphi/Dcu/D11/PascalScript_Core_D11.bpl
new file mode 100644
index 0000000..8a6599c
Binary files /dev/null and b/official/5.0.30.691/Pascal Script for Delphi/Dcu/D11/PascalScript_Core_D11.bpl differ
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Dcu/D11/PascalScript_Core_D11.dcp b/official/5.0.30.691/Pascal Script for Delphi/Dcu/D11/PascalScript_Core_D11.dcp
new file mode 100644
index 0000000..2279f8b
Binary files /dev/null and b/official/5.0.30.691/Pascal Script for Delphi/Dcu/D11/PascalScript_Core_D11.dcp differ
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Dcu/D11/PascalScript_RO_D11.bpl b/official/5.0.30.691/Pascal Script for Delphi/Dcu/D11/PascalScript_RO_D11.bpl
new file mode 100644
index 0000000..9a6135e
Binary files /dev/null and b/official/5.0.30.691/Pascal Script for Delphi/Dcu/D11/PascalScript_RO_D11.bpl differ
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Dcu/D11/PascalScript_RO_D11.dcp b/official/5.0.30.691/Pascal Script for Delphi/Dcu/D11/PascalScript_RO_D11.dcp
new file mode 100644
index 0000000..39900c4
Binary files /dev/null and b/official/5.0.30.691/Pascal Script for Delphi/Dcu/D11/PascalScript_RO_D11.dcp differ
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Dcu/D6/PascalScript_Core_D6.bpl b/official/5.0.30.691/Pascal Script for Delphi/Dcu/D6/PascalScript_Core_D6.bpl
new file mode 100644
index 0000000..ef87474
Binary files /dev/null and b/official/5.0.30.691/Pascal Script for Delphi/Dcu/D6/PascalScript_Core_D6.bpl differ
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Dcu/D6/PascalScript_Core_D6.dcp b/official/5.0.30.691/Pascal Script for Delphi/Dcu/D6/PascalScript_Core_D6.dcp
new file mode 100644
index 0000000..a68eb15
Binary files /dev/null and b/official/5.0.30.691/Pascal Script for Delphi/Dcu/D6/PascalScript_Core_D6.dcp differ
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Dcu/D7/PascalScript_Core_D7.bpl b/official/5.0.30.691/Pascal Script for Delphi/Dcu/D7/PascalScript_Core_D7.bpl
new file mode 100644
index 0000000..3d4dd2f
Binary files /dev/null and b/official/5.0.30.691/Pascal Script for Delphi/Dcu/D7/PascalScript_Core_D7.bpl differ
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Dcu/D7/PascalScript_Core_D7.dcp b/official/5.0.30.691/Pascal Script for Delphi/Dcu/D7/PascalScript_Core_D7.dcp
new file mode 100644
index 0000000..58bceaa
Binary files /dev/null and b/official/5.0.30.691/Pascal Script for Delphi/Dcu/D7/PascalScript_Core_D7.dcp differ
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Dcu/D7/PascalScript_RO_D7.bpl b/official/5.0.30.691/Pascal Script for Delphi/Dcu/D7/PascalScript_RO_D7.bpl
new file mode 100644
index 0000000..eedd3c4
Binary files /dev/null and b/official/5.0.30.691/Pascal Script for Delphi/Dcu/D7/PascalScript_RO_D7.bpl differ
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Dcu/D7/PascalScript_RO_D7.dcp b/official/5.0.30.691/Pascal Script for Delphi/Dcu/D7/PascalScript_RO_D7.dcp
new file mode 100644
index 0000000..7046631
Binary files /dev/null and b/official/5.0.30.691/Pascal Script for Delphi/Dcu/D7/PascalScript_RO_D7.dcp differ
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Help/RegisterDelphiHelp.exe b/official/5.0.30.691/Pascal Script for Delphi/Help/RegisterDelphiHelp.exe
new file mode 100644
index 0000000..9536667
Binary files /dev/null and b/official/5.0.30.691/Pascal Script for Delphi/Help/RegisterDelphiHelp.exe differ
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Launch.exe b/official/5.0.30.691/Pascal Script for Delphi/Launch.exe
new file mode 100644
index 0000000..4b346d2
Binary files /dev/null and b/official/5.0.30.691/Pascal Script for Delphi/Launch.exe differ
diff --git a/official/5.0.30.691/Pascal Script for Delphi/License.txt b/official/5.0.30.691/Pascal Script for Delphi/License.txt
new file mode 100644
index 0000000..0c68c76
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/License.txt
@@ -0,0 +1,86 @@
+*** REMOBJECTS SOFTWARE END USER LICENSE AGREEMENT ***
+
+Updated May 1, 2008
+
+IMPORTANT: PLEASE READ THIS DOCUMENT CAREFULLY AND IN ITS ENTIRETY BEFORE USING ANY SOFTWARE PRODUCT ACQUIRED FROM REMOBJECTS SOFTWARE.
+
+This document constitutes a LEGAL AGREEMENT between you, the End User (either an individual or an entity), and RemObjects Software, LLC.
+
+
+1. SCOPE
+
+This End User License Agreement ("EULA") covers all SOFTWARE PRODUCTS produced and sold by RemObjects Software, LLC. The sections of this EULA that contain information that pertain specifically to a certain product are properly marked as such.
+
+SOFTWARE PRODUCTS covered this EULA:
+
+* RemObjects AnyDAC
+* RemObjects Oxygene
+* RemObjects Data Abstract
+* RemObjects DebugServer
+* RemObjects Developer Studio
+* RemObjects Everwood
+* RemObjects Floss
+* RemObjects Internet Pack
+* RemObjects Hydra
+* RemObjects Pascal Script
+* RemObjects SDK
+
+
+2. DEFINITIONS
+
+SOFTWARE PRODUCTS: refers to one or more product as made available as a unified installation package.
+
+(LIBRARY) SOURCE CODE: refers to the source code shipped with any of the SOFTWARE PRODUCTS licensed to you, the End User, in the “Source” folder of the product installation.
+
+TOOLS: refers to ANY of the applications deployed with the SOFTWARE PRODUCTS in executable form, whether as auxiliary helper programs of a Library product or as main product. This includes but is not limited to any .EXE files and IDE integration.
+
+SAMPLE CODE: sample code is provided to you as part of the SOFTWARE PRODUCT license inside the “Samples” folder
+
+EXECUTABLE FORMAT refers to executable files such as .EXE and .DLL files build from your own source code, linking in code provided as part of the LIBRARY SOURCE CODE. It does not encompass Delphi .DCU or .BPL/.DCP files or any other format that would allow a third party to the provided file as a replacement for the LIBRARY SOURCE CODE
+
+
+3. COPYRIGHT
+
+This SOFTWARE PRODUCT is owned by RemObjects Software, LLC and is protected by copyright laws and international copyright treaties.
+
+All copyrights of this SOFTWARE PRODUCT, including but not limited to any source code, tools, documentation, images, text, and samples incorporated into the SOFTWARE PRODUCT, as well as those provided via Support Services or any of the RemObjects websites, are proprietary products of RemObjects Software, LLC and are protected by copyright law. You acquire only the right to use the SOFTWARE PRODUCT and do not acquire any rights of ownership. You acknowledge that the SOFTWARE PRODUCT and its source code remains a confidential trade secret of RemObjects Software, LLC. RemObjects Software, LLC may have trademarks, copyrights, patents or other intellectual property rights covering the SOFTWARE PRODUCT. You are not granted any license to these patents, trademarks, copyrights, or other intellectual property rights except as expressly provided herein. RemObjects Software, LLC reserves all rights not expressly granted.
+
+All names and logos of the SOFTWARE PRODUCTS defined in the SCOPE section of this EULA are trademarks or registered trademarks of RemObjects Software, LLC. These names and logos may only be used by the End User when referring to RemObjects Software, LLC or any of its products. These names and logos may not be used by the End User for branding or marketing purposes, without written consent from RemObjects Software, LLC.
+
+
+2. GRANT OF LICENSE
+
+BY INSTALLING, COPYING, OR OTHERWISE USING THE SOFTWARE PRODUCT, YOU AGREE TO BE BOUND BY ALL OF THE TERMS AND CONDITIONS OF THIS END USER LICENSE AGREEMENT. IF YOU DO NOT AGREE TO THE TERMS OF THIS AGREEMENT, YOU ARE NOT PERMITTED TO INSTALL, COPY, OR USE THE SOFTWARE PRODUCT. IF YOU REJECT THE TERMS OF THIS AGREEMENT WITHIN THIRTY (30) DAYS AFTER PURCHASING THE SOFTWARE PRODUCT, YOU MAY SEND AN EMAIL TO sales@remobjects.com AND REQUEST A FULL REFUND OF THE PURCHASE PRICE. IN ORDER TO RECEIVE THE REFUND, YOU MUST IRREVOCABLY UNINSTALL AND/OR DELETE ANY AND ALL COPIES OF THE SOFTWARE PRODUCT(S) YOU HAVE PURCHASED, AND PROVIDE CERTIFICATION OF SUCH TO REMOBJECTS.
+You may make one copy of the SOFTWARE PRODUCT solely for backup or archival purposes or transfer the SOFTWARE PRODUCT to a single hard disk provided you keep the original solely for backup or archival purposes.
+
+You may install the software on up to five computers, providing you are the only person using the software on these computers.
+
+You may not alter any of the programs or accompanying files without written permission from RemObjects Software, LLC. Any resale or commercial distribution of the SOFTWARE PRODUCT is strictly prohibited, unless RemObjects Software, LLC has given explicit written permission.
+
+You are not obtaining title to the SOFTWARE PRODUCT or any copyrights. You may not sublicense, rent, lease, convey, modify, translate, convert to another programming language, decompile, or disassemble the SOFTWARE PRODUCT for any purpose. RemObjects Software, LLC grants you as an individual, a personal, non exclusive license to install and use the SOFTWARE PRODUCT for the sole purpose of developing systems that are not in competition with the SOFTWARE PRODUCT, or any other products developed and sold by RemObjects Software, LLC.
+
+If you are an entity, RemObjects Software, LLC grants you the right to designate one individual within your organization to have the right to use the SOFTWARE PRODUCT in the manner described above.
+The named License you acquired is not transferrable to another individual or entity, unless you are given written permission by RemObjects Software, LLC.
+
+You may link against the LIBRARY SOURCE CODE and deploy it in EXECUTABLE FORMAT as part of your application; you may make changes to the LIBRARY SOURCE CODE and write extensions for your own use, and link against and deploy your changes in EXECUTABLE FORMAT. You may NOT deploy RemObjects Software’s source code to anyone.
+SAMPLE CODE for provided for your convenience and you may use it at your discretion. You may create your own products starting from the samples provided and consider this derived work as your own. You may also deploy such derived work in any way you see fit, including in source code form.
+
+Unless specifically stated on a per-tool basis, you may not deploy the TOOLS included with the SOFTWARE PRODUCT to anyone, neither standalone or as part of your own application; the tools are intended solely for use by yourself.
+In general, you may not distribute any part of the installed product, nor any license codes, license files or your website login to third parties.
+
+
+3. SUPPORT SERVICES
+
+RemObjects Software, LLC may provide the End User with Support Services related to the SOFTWARE PRODUCT. Support Services include free downloading of upgrades as covered by the original purchase, as well as technical support offered via NNTP-based newsgroups, e-mail or telephone. Use of Support Services is governed by RemObjects Software policies and programs described on the RemObjects website (www.remobjects.com/support) and may be subject to additional support charges depending on the type and level of support provided. Any supplemental software code provided to you as part of the Support Services shall be considered part of the SOFTWARE PRODUCT and is subject to the terms and conditions of this EULA.
+
+
+4. TERMINATION
+
+This License shall remain in effect only for so long as you are in compliance with the terms and conditions of this EULA. This License will terminate if you fail to comply with any of its terms or conditions. You may terminate it at any time by destroying your copies of the SOFTWARE PRODUCT. You agree, upon termination, to destroy all copies of the Product. Without prejudice to any other rights, RemObjects Software, LLC may terminate this EULA if you fail to comply with the terms. The provisions of this EULA that protect the proprietary rights of RemObjects Software, LLC and the LIMITATIONS OF WARRANTIES will continue to be in force even after any termination. Upon termination, RemObjects Software, LLC may also enforce any rights provided by law.
+
+
+5. LIMITATIONS OF WARRANTIES AND LIABILITY
+
+THIS SOFTWARE PRODUCT IS PROVIDED TO YOU "AS IS" WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE APPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. YOU ASSUME THE ENTIRE RISK AS TO THE ACCURACY AND THE USE OF THE SOFTWARE PRODUCT AND ALL OTHER RISK ARISING FROMTHE USE OR PERFORMANCE OF THIS SOFTWARE PRODUCT AND DOCUMENTATION.
+
+RemObjects Software, LLC SHALL NOT BE LIABLE FOR ANY DAMAGES WHATSOEVER ARISING FROM USE OF OR INABILITY TO USE THIS SOFTWARE PRODUCT, EVEN IF RemObjects Software, LLC HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL RemObjects Software, LLC BE LIABLE FOR ANY CONSEQUENTIAL, INCIDENTAL, DIRECT, INDIRECT, SPECIAL, PUNITIVE, OR OTHER DAMAGES WHATSOEVER, INCLUDING BUT NOT LIMITED TO DAMAGES OR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY LOSS, EVEN IF RemObjects Software, LLC HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. BECAUSE SOME STATES/JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, THE ABOVE LIMITATION MAY NOT APPLY.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Pascal Script.ico b/official/5.0.30.691/Pascal Script for Delphi/Pascal Script.ico
new file mode 100644
index 0000000..26e084f
Binary files /dev/null and b/official/5.0.30.691/Pascal Script for Delphi/Pascal Script.ico differ
diff --git a/official/5.0.30.691/Pascal Script for Delphi/README.html b/official/5.0.30.691/Pascal Script for Delphi/README.html
new file mode 100644
index 0000000..1be5295
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/README.html
@@ -0,0 +1,58 @@
+
+
+
+Welcome to the RemObjects Pascal Script™ 3.0
+
+Support
+
+Support for RemObjects Pascal Script is available via our newsgroups at
+remobjects.public.pascalscript .
+
+You can use these newsgroups to report any problems or suggestions you might have in regards to PS, you can communicate with fellow Pascal Script users, and exchange ideas and solutions.
+
+
+ Updates, additional sample projects and additional third-party contributions for Pascal Script will be available on our website at www.remobjects.com?ps .
+
+
+Where to go from here
+
+ To get started using the Pascal Script, please visit our extensive article library available at
+ http://www.remobjects.com/articles .
+
+
+
+
+
+Thank you very much,
+
+Your RemObjects Team
+
+http://www.remobjects.com
+
+
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Console/sample1.dpr b/official/5.0.30.691/Pascal Script for Delphi/Samples/Console/sample1.dpr
new file mode 100644
index 0000000..dfc5f21
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Console/sample1.dpr
@@ -0,0 +1,59 @@
+program sample1;
+
+uses
+ uPSCompiler, uPSRuntime;
+
+function ScriptOnUses(Sender: TPSPascalCompiler; const Name: string): Boolean;
+{ the OnUses callback function is called for each "uses" in the script.
+ It's always called with the parameter 'SYSTEM' at the top of the script.
+ For example: uses ii1, ii2;
+ This will call this function 3 times. First with 'SYSTEM' then 'II1' and then 'II2'.
+}
+begin
+ if Name = 'SYSTEM' then
+ begin
+ Result := True;
+ end else
+ Result := False;
+end;
+
+procedure ExecuteScript(const Script: string);
+var
+ Compiler: TPSPascalCompiler;
+ { TPSPascalCompiler is the compiler part of the script engine. This will
+ translate a Pascal script into compiled data for the executer. }
+ Exec: TPSExec;
+ { TPSExec is the executer part of the script engine. It uses the output of
+ the compiler to run a script. }
+ Data: string;
+begin
+ Compiler := TPSPascalCompiler.Create; // create an instance of the compiler.
+ Compiler.OnUses := ScriptOnUses; // assign the OnUses event.
+ if not Compiler.Compile(Script) then begin // Compile the Pascal script into bytecode.
+ Compiler.Free;
+ // You could raise an exception here.
+ Exit;
+ end;
+
+ Compiler.GetOutput(Data); // Save the output of the compiler in the string Data.
+ Compiler.Free; // After compiling the script, there is no further need for the compiler.
+
+ Exec := TPSExec.Create; // Create an instance of the executer.
+ if not Exec.LoadData(Data) then begin // Load the data from the Data string.
+ { For some reason, the script could not be loaded. This is usually the case when a
+ library that has been used at compile time isn't registered at runtime. }
+ Exec.Free;
+ // You could raise an exception here.
+ Exit;
+ end;
+
+ Exec.RunScript; // Run the script.
+ Exec.Free; // Free the executer.
+end;
+
+const
+ Script = 'var s: string; begin s := ''Test''; S := s + ''ing;''; end.';
+
+begin
+ ExecuteScript(Script);
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Console/sample2.dpr b/official/5.0.30.691/Pascal Script for Delphi/Samples/Console/sample2.dpr
new file mode 100644
index 0000000..c85f5df
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Console/sample2.dpr
@@ -0,0 +1,80 @@
+program sample2;
+
+uses
+ uPSCompiler,
+ uPSRuntime,
+
+ Dialogs
+
+ ;
+
+procedure MyOwnFunction(const Data: string);
+begin
+ // Do something with Data
+ ShowMessage(Data);
+end;
+
+function ScriptOnUses(Sender: TPSPascalCompiler; const Name: string): Boolean;
+{ the OnUses callback function is called for each "uses" in the script.
+ It's always called with the parameter 'SYSTEM' at the top of the script.
+ For example: uses ii1, ii2;
+ This will call this function 3 times. First with 'SYSTEM' then 'II1' and then 'II2'.
+}
+begin
+ if Name = 'SYSTEM' then begin
+ Sender.AddDelphiFunction('procedure MyOwnFunction(Data: string)');
+ { This will register the function to the script engine. Now it can be used from
+ within the script.}
+
+ Result := True;
+ end else
+ Result := False;
+end;
+
+procedure ExecuteScript(const Script: string);
+var
+ Compiler: TPSPascalCompiler;
+ { TPSPascalCompiler is the compiler part of the script engine. This will
+ translate a Pascal script into compiled data for the executer. }
+ Exec: TPSExec;
+ { TPSExec is the executer part of the script engine. It uses the output of
+ the compiler to run a script. }
+ Data: string;
+begin
+ Compiler := TPSPascalCompiler.Create; // create an instance of the compiler.
+ Compiler.OnUses := ScriptOnUses; // assign the OnUses event.
+ if not Compiler.Compile(Script) then begin // Compile the Pascal script into bytecode.
+ Compiler.Free;
+ // You could raise an exception here.
+ Exit;
+ end;
+
+ Compiler.GetOutput(Data); // Save the output of the compiler in the string Data.
+ Compiler.Free; // After compiling the script, there is no further need for the compiler.
+
+ Exec := TPSExec.Create; // Create an instance of the executer.
+ Exec.RegisterDelphiFunction(@MyOwnFunction, 'MYOWNFUNCTION', cdRegister);
+ { This will register the function to the executer. The first parameter is the executer. The second parameter is a
+ pointer to the function. The third parameter is the name of the function (in uppercase). And the last parameter is the
+ calling convention (usually Register). }
+
+ if not Exec.LoadData(Data) then begin // Load the data from the Data string.
+ { For some reason the script could not be loaded. This is usually the case when a
+ library that has been used at compile time isn't registered at runtime. }
+ Exec.Free;
+ // You could raise an exception here.
+ Exit;
+ end;
+
+ Exec.RunScript; // Run the script.
+ Exec.Free; // Free the executer.
+end;
+
+
+
+const
+ Script = 'var s: string; begin s := ''Test''; S := s + ''ing;''; MyOwnFunction(s); end.';
+
+begin
+ ExecuteScript(Script);
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Console/sample3.dpr b/official/5.0.30.691/Pascal Script for Delphi/Samples/Console/sample3.dpr
new file mode 100644
index 0000000..f622656
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Console/sample3.dpr
@@ -0,0 +1,77 @@
+program sample3;
+
+uses
+ uPSC_dll,
+ uPSR_dll,
+ uPSCompiler,
+ uPSRuntime;
+
+function ScriptOnUses(Sender: TPSPascalCompiler; const Name: string): Boolean;
+{ the OnUses callback function is called for each "uses" in the script.
+ It's always called with the parameter 'SYSTEM' at the top of the script.
+ For example: uses ii1, ii2;
+ This will call this function 3 times. First with 'SYSTEM' then 'II1' and then 'II2'.
+}
+begin
+ if Name = 'SYSTEM' then begin
+ Sender.OnExternalProc := @DllExternalProc;
+ { Assign the dll library to the script engine. This function can be found in the uPSC_dll.pas file.
+ When you have assigned this, it's possible to do this in the script:
+
+ Function FindWindow(c1, c2: PChar): Cardinal; external 'FindWindow@user32.dll stdcall';
+
+ The syntax for the external string is 'functionname@dllname callingconvention'.
+ }
+
+ Result := True;
+ end else
+ Result := False;
+end;
+
+procedure ExecuteScript(const Script: string);
+var
+ Compiler: TPSPascalCompiler;
+ { TPSPascalCompiler is the compiler part of the script engine. This will
+ translate a Pascal script into compiled data for the executer. }
+ Exec: TPSExec;
+ { TPSExec is the executer part of the script engine. It uses the output of
+ the compiler to run a script. }
+ Data: string;
+begin
+ Compiler := TPSPascalCompiler.Create; // create an instance of the compiler.
+ Compiler.OnUses := ScriptOnUses; // assign the OnUses event.
+ if not Compiler.Compile(Script) then begin // Compile the Pascal script into bytecode.
+ Compiler.Free;
+ // You could raise an exception here.
+ Exit;
+ end;
+
+ Compiler.GetOutput(Data); // Save the output of the compiler in the string Data.
+ Compiler.Free; // After compiling the script, there is no further need for the compiler.
+
+ Exec := TPSExec.Create; // Create an instance of the executer.
+
+ RegisterDLLRuntime(Exec);
+ { Register the DLL runtime library. This can be found in the uPSR_dll.pas file.}
+
+ if not Exec.LoadData(Data) then begin // Load the data from the Data string.
+ { For some reason the script could not be loaded. This is usually the case when a
+ library that has been used at compile time isn't registered at runtime. }
+ Exec.Free;
+ // You could raise an exception here.
+ Exit;
+ end;
+
+ Exec.RunScript; // Run the script.
+ Exec.Free; // Free the executer.
+end;
+
+
+const
+ Script =
+ 'function MessageBox(hWnd: Longint; lpText, lpCaption: PChar; uType: Longint): Longint; external ''MessageBoxA@user32.dll stdcall'';'#13#10 +
+ 'var s: string; begin s := ''Test''; MessageBox(0, s, ''Caption Here!'', 0);end.';
+
+begin
+ ExecuteScript(Script);
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Console/sample4.dpr b/official/5.0.30.691/Pascal Script for Delphi/Samples/Console/sample4.dpr
new file mode 100644
index 0000000..f66827d
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Console/sample4.dpr
@@ -0,0 +1,107 @@
+program sample4;
+
+uses
+ uPSCompiler,
+ uPSRuntime,
+ uPSC_std,
+ uPSC_controls,
+ uPSC_stdctrls,
+ uPSC_forms,
+ uPSR_std,
+ uPSR_controls,
+ uPSR_stdctrls,
+ uPSR_forms,
+ forms
+
+ ;
+
+function ScriptOnUses(Sender: TPSPascalCompiler; const Name: string): Boolean;
+{ the OnUses callback function is called for each "uses" in the script.
+ It's always called with the parameter 'SYSTEM' at the top of the script.
+ For example: uses ii1, ii2;
+ This will call this function 3 times. First with 'SYSTEM' then 'II1' and then 'II2'.
+}
+begin
+ if Name = 'SYSTEM' then
+ begin
+ SIRegister_Std(Sender);
+ { This will register the declarations of these classes:
+ TObject, TPersistent, TComponent.
+ This procedure can be found in the uPSC_std.pas unit. }
+
+ SIRegister_Controls(Sender);
+ { This will register the declarations of these classes:
+ TControl, TWinControl, TFont, TStrings, TStringList, TCanvas, TGraphicControl.
+ This procedure can be found in the uPSC_controls.pas unit. }
+
+ SIRegister_Forms(Sender);
+ { This will register: TScrollingWinControl, TCustomForm, TForm and TApplication.
+ This procedure can be found in the uPSC_forms.pas unit. }
+
+ SIRegister_stdctrls(Sender);
+ { This will register: TButtonContol, TButton, TCustomCheckbox, TCheckBox, TCustomEdit, TEdit,
+ TCustomMemo, TMemo, TCustomLabel and TLabel.
+ This procedure can be found in the uPSC_stdctrls.pas unit. }
+
+ Result := True;
+ end else
+ Result := False;
+end;
+
+procedure ExecuteScript(const Script: string);
+var
+ Compiler: TPSPascalCompiler;
+ { TPSPascalCompiler is the compiler part of the script engine. This will
+ translate a Pascal script into compiled data for the executer. }
+ Exec: TPSExec;
+ { TPSExec is the executer part of the scriptengine. It uses the output of
+ the compiler to run a script. }
+ Data: string;
+ CI: TPSRuntimeClassImporter;
+begin
+ Compiler := TPSPascalCompiler.Create; // create an instance of the compiler.
+ Compiler.OnUses := ScriptOnUses; // assign the OnUses event.
+ if not Compiler.Compile(Script) then begin // Compile the Pascal script into bytecode.
+ Compiler.Free;
+ // You could raise an exception here.
+ Exit;
+ end;
+
+ Compiler.GetOutput(Data); // Save the output of the compiler in the string Data.
+ Compiler.Free; // After compiling the script, there is no need for the compiler anymore.
+
+ CI := TPSRuntimeClassImporter.Create;
+ { Create an instance of the runtime class importer.}
+
+ RIRegister_Std(CI); // uPSR_std.pas unit.
+ RIRegister_stdctrls(CI); // uPSR_stdctrls.pas unit.
+ RIRegister_Controls(CI); // uPSR_controls.pas unit.
+ RIRegister_Forms(CI); // uPSR_forms.pas unit.
+
+ Exec := TPSExec.Create; // Create an instance of the executer.
+
+ RegisterClassLibraryRuntime(Exec, CI);
+ // Assign the runtime class importer to the executer.
+
+ if not Exec.LoadData(Data) then begin // Load the data from the Data string.
+ { For some reason the script could not be loaded. This is usually the case when a
+ library that has been used at compile time isn't registered at runtime. }
+ Exec.Free;
+ // You could raise an exception here.
+ Exit;
+ end;
+
+ Exec.RunScript; // Run the script.
+ Exec.Free; // Free the executer.
+ CI.Free; // Free the runtime class importer.
+end;
+
+
+
+const
+ Script =
+ 'var f: TForm; i: Longint; begin f := TForm.CreateNew(f,0); f.Show; for i := 0 to 1000000 do; f.Hide; f.free; end.';
+
+begin
+ ExecuteScript(Script);
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Console/sample5.dpr b/official/5.0.30.691/Pascal Script for Delphi/Samples/Console/sample5.dpr
new file mode 100644
index 0000000..e9b969f
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Console/sample5.dpr
@@ -0,0 +1,112 @@
+program sample5;
+
+uses
+ uPSCompiler,
+ uPSRuntime,
+ uPSC_std,
+ uPSC_controls,
+ uPSC_stdctrls,
+ uPSC_forms,
+ uPSR_std,
+ uPSR_controls,
+ uPSR_stdctrls,
+ uPSR_forms,
+ forms
+
+ ;
+
+function ScriptOnUses(Sender: TPSPascalCompiler; const Name: string): Boolean;
+{ the OnUses callback function is called for each "uses" in the script.
+ It's always called with the parameter 'SYSTEM' at the top of the script.
+ For example: uses ii1, ii2;
+ This will call this function 3 times. First with 'SYSTEM' then 'II1' and then 'II2'.
+}
+begin
+ if Name = 'SYSTEM' then begin
+ SIRegister_Std(Sender);
+ { This will register the declarations of these classes:
+ TObject, TPersisent.
+ This procedure can be found in the uPSC_std.pas unit. }
+ SIRegister_Controls(Sender);
+ { This will register the declarations of these classes:
+ TControl, TWinControl, TFont, TStrings, TStringList, TGraphicControl.
+ This procedure can be found in the uPSC_controls.pas unit. }
+
+ SIRegister_Forms(Sender);
+ { This will register: TScrollingWinControl, TCustomForm, TForm and TApplication.
+ This procedure can be found in the uPSC_forms.pas unit. }
+
+ SIRegister_stdctrls(Sender);
+ { This will register: TButtonContol, TButton, TCustomCheckbox, TCheckBox, TCustomEdit,
+ TEdit, TCustomMemo, TMemo, TCustomLabel and TLabel.
+ This procedure can be found in the uPSC_stdctrls.pas unit. }
+
+ AddImportedClassVariable(Sender, 'Application', 'TApplication');
+ // Registers the application variable to the script engine.
+
+ Result := True;
+ end else
+ Result := False;
+end;
+
+procedure ExecuteScript(const Script: string);
+var
+ Compiler: TPSPascalCompiler;
+ { TPSPascalCompiler is the compiler part of the script engine. This will
+ translate a Pascal script into compiled data for the executer. }
+ Exec: TPSExec;
+ { TPSExec is the executer part of the script engine. It uses the output of
+ the compiler to run a script. }
+ Data: string;
+ CI: TPSRuntimeClassImporter;
+begin
+ Compiler := TPSPascalCompiler.Create; // create an instance of the compiler.
+ Compiler.OnUses := ScriptOnUses; // assign the OnUses event.
+ if not Compiler.Compile(Script) then begin // Compile the Pascal script into bytecode.
+ Compiler.Free;
+ // You could raise an exception here.
+ Exit;
+ end;
+
+ Compiler.GetOutput(Data); // Save the output of the compiler in the string Data.
+ Compiler.Free; // After compiling the script, there is no need for the compiler anymore.
+
+ CI := TPSRuntimeClassImporter.Create;
+ { Create an instance of the runtime class importer.}
+
+ RIRegister_Std(CI); // uPSR_std.pas unit.
+ RIRegister_Controls(CI); // uPSR_controls.pas unti.
+ RIRegister_stdctrls(CI); // uPSR_stdctrls.pas unit.
+ RIRegister_Forms(CI); // uPSR_forms.pas unit.
+
+ Exec := TPSExec.Create; // Create an instance of the executer.
+
+ RegisterClassLibraryRuntime(Exec, CI);
+ // Assign the runtime class importer to the executer.
+
+ if not Exec.LoadData(Data) then begin // Load the data from the Data string.
+ { For some reason the script could not be loaded. This is usually the case when a
+ library that has been used at compile time isn't registered at runtime. }
+ Exec.Free;
+ // You could raise an exception here.
+ Exit;
+ end;
+
+ SetVariantToClass(Exec.GetVarNo(Exec.GetVar('APPLICATION')), Application);
+ // This will set the script's Application variable to the real Application variable.
+
+ Exec.RunScript; // Run the script.
+ Exec.Free; // Free the executer.
+ CI.Free; // Free the runtime class importer.
+end;
+
+
+
+
+const
+ Script =
+ 'var f: TForm; i: Longint; begin f := TForm.CreateNew(f, 0); f.Show; while f.Visible do Application.ProcessMessages; F.free; end.';
+
+begin
+ ExecuteScript(Script);
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Console/sample6.dpr b/official/5.0.30.691/Pascal Script for Delphi/Samples/Console/sample6.dpr
new file mode 100644
index 0000000..af5fa9d
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Console/sample6.dpr
@@ -0,0 +1,130 @@
+program sample6;
+
+uses
+ uPSCompiler,
+ uPSUtils,
+ uPSRuntime,
+
+ Dialogs
+
+ ;
+
+procedure MyOwnFunction(const Data: string);
+begin
+ // Do something with Data
+ ShowMessage(Data);
+end;
+
+function ScriptOnExportCheck(Sender: TPSPascalCompiler; Proc: TPSInternalProcedure; const ProcDecl: string): Boolean;
+{
+ The OnExportCheck callback function is called for each function in the script
+ (also for the main proc, with '!MAIN' as a Proc^.Name). ProcDecl contains the
+ function's result type and parameter types using this format:
+ ProcDecl: ResultType + ' ' + Parameter1 + ' ' + Parameter2 + ' '+Parameter3 + .....
+ Parameter: ParameterType+TypeName
+ ParameterType is @ for a normal parameter and ! for a var parameter.
+ A result type of 0 means no result.
+}
+begin
+ if Proc.Name = 'TEST' then begin // Check if the proc is the Test proc we want.
+ // Check if the proc has the correct params.
+ if not ExportCheck(Sender, Proc, [0, btString], [pmIn]) then begin
+ { Something is wrong, so cause an error at the declaration position of the proc. }
+ Sender.MakeError('', ecTypeMismatch, '');
+ Result := False;
+ Exit;
+ end;
+ Result := True;
+ end else Result := True;
+end;
+
+function ScriptOnUses(Sender: TPSPascalCompiler; const Name: string): Boolean;
+{ the OnUses callback function is called for each "uses" in the script.
+ It's always called with the parameter 'SYSTEM' at the top of the script.
+ For example: uses ii1, ii2;
+ This will call this function 3 times. First with 'SYSTEM' then 'II1' and then 'II2'.
+}
+begin
+ if Name = 'SYSTEM' then begin
+ Sender.AddDelphiFunction('procedure MyOwnFunction(Data: string)');
+ { This will register the function to the script engine.
+ Now it can be used from within the script. }
+
+ Result := True;
+ end else
+ Result := False;
+end;
+
+procedure ExecuteScript(const Script: string);
+var
+ Compiler: TPSPascalCompiler;
+ { TPSPascalCompiler is the compiler part of the script engine. This will
+ translate a Pascal script into compiled data for the executer. }
+ Exec: TPSExec;
+ { TPSExec is the executer part of the script engine. It uses the output of
+ the compiler to run a script. }
+ Data: string;
+
+ N: PIfVariant; // the variant in which we are going to store the parameter
+ ParamList: TIfList; // the parameter list
+begin
+ Compiler := TPSPascalCompiler.Create; // create an instance of the compiler.
+ Compiler.OnUses := ScriptOnUses; // assign the OnUses event.
+
+ Compiler.OnExportCheck := ScriptOnExportCheck; // Assign the onExportCheck event.
+
+ if not Compiler.Compile(Script) then begin // Compile the Pascal script into bytecode.
+ Compiler.Free;
+ // You could raise an exception here.
+ Exit;
+ end;
+
+ Compiler.GetOutput(Data); // Save the output of the compiler in the string Data.
+ Compiler.Free; // After compiling the script, there is no further need for the compiler.
+
+ Exec := TPSExec.Create; // Create an instance of the executer.
+
+ Exec.RegisterDelphiFunction(@MyOwnFunction, 'MYOWNFUNCTION', cdRegister);
+ { This will register the function to the executer. The first parameter is the executer.
+ The second parameter is a pointer to the function.
+ The third parameter is the name of the function (in uppercase).
+ The last parameter is the calling convention (usually Register). }
+
+ if not Exec.LoadData(Data) then begin // Load the data from the Data string.
+ { For some reason the script could not be loaded. This is usually the case when a
+ library that has been used at compile time isn't registered at runtime. }
+ Exec.Free;
+ // You could raise an exception here.
+ Exit;
+ end;
+
+ ParamList := TIfList.Create; // Create the parameter list
+
+ N := CreateHeapVariant(Exec.FindType2(btString)); // create a variant for the string parameter
+ if n = nil then begin
+ { Something is wrong. Exit here }
+ ParamList.Free;
+ Exec.Free;
+ Exit;
+ end;
+ VSetString(n, 'Test Parameter!');
+ // Put something in the string parameter.
+
+ ParamList.Add(n); // Add it to the parameter list.
+
+ Exec.RunProc(ParamList, Exec.GetProc('TEST'));
+ { This will call the test proc that was exported before }
+
+ FreePIFVariantList(ParamList); // Cleanup the parameters (This will also free N)
+
+ Exec.Free; // Free the executer.
+end;
+
+
+
+const
+ Script = 'procedure test(s: string); begin MyOwnFunction(''Test is called: ''+s);end; begin end.';
+
+begin
+ ExecuteScript(Script);
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Console/sample7.dpr b/official/5.0.30.691/Pascal Script for Delphi/Samples/Console/sample7.dpr
new file mode 100644
index 0000000..a0f42d3
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Console/sample7.dpr
@@ -0,0 +1,142 @@
+program sample7;
+
+uses
+ uPSCompiler,
+ uPSRuntime,
+ uPSUtils,
+
+ Dialogs
+
+ ;
+
+procedure MyOwnFunction(const Data: string);
+begin
+ // Do something with Data
+ ShowMessage(Data);
+end;
+
+function ScriptOnExportCheck(Sender: TPSPascalCompiler; Proc: TPSInternalProcedure; const ProcDecl: string): Boolean;
+{
+ The OnExportCheck callback function is called for each function in the script
+ (also for the main proc, with '!MAIN' as a Proc^.Name). ProcDecl contains the
+ function's result type and parameter types using this format:
+ ProcDecl: ResultType + ' ' + Parameter1 + ' ' + Parameter2 + ' '+Parameter3 + .....
+ Parameter: ParameterType+TypeName
+ ParameterType is @ for a normal parameter and ! for a var parameter.
+ A result type of 0 means no result.
+}
+begin
+ if Proc.Name = 'TEST' then begin // Check if the proc is the Test proc we want.
+ if ProcDecl <> '0 @TSTRINGARRAY' then begin // Check if the proc has the correct params.
+ { Something is wrong, so cause an error. }
+ Sender.MakeError('', ecTypeMismatch, '');
+ Result := False;
+ Exit;
+ end;
+ { Export the proc; This is needed because PS doesn't store the name of a
+ function by default }
+ Result := True;
+ end else Result := True;
+end;
+
+function ScriptOnUses(Sender: TPSPascalCompiler; const Name: string): Boolean;
+{ the OnUses callback function is called for each "uses" in the script.
+ It's always called with the parameter 'SYSTEM' at the top of the script.
+ For example: uses ii1, ii2;
+ This will call this function 3 times. First with 'SYSTEM' then 'II1' and then 'II2'.
+}
+begin
+ if Name = 'SYSTEM' then begin
+
+ Sender.AddDelphiFunction('procedure MyOwnFunction(Data: string)');
+ { This will register the function to the script engine.
+ Now it can be used from within the script. }
+
+ Sender.AddTypeS('TSTRINGARRAY', 'array of string').ExportName := True;
+ { Add the type to the script engine (and export it) }
+
+ Result := True;
+ end else
+ Result := False;
+end;
+
+type
+ TStringArr = array[0..1] of string;
+
+procedure ExecuteScript(const Script: string);
+var
+ Compiler: TPSPascalCompiler;
+ { TPSPascalCompiler is the compiler part of the script engine. This will
+ translate a Pascal script into compiled data for the executer. }
+ Exec: TPSExec;
+ { TPSExec is the executer part of the script engine. It uses the output of
+ the compiler to run a script. }
+ Data: string;
+
+ N: PIfVariant;
+ { The variant in which we are going to store the parameter }
+ ParamList: TIfList;
+ { The parameter list}
+begin
+ Compiler := TPSPascalCompiler.Create; // create an instance of the compiler.
+ Compiler.OnUses := ScriptOnUses; // assign the OnUses event.
+
+ Compiler.OnExportCheck := ScriptOnExportCheck; // Assign the onExportCheck event.
+
+ if not Compiler.Compile(Script) then begin // Compile the Pascal script into bytecode.
+ Compiler.Free;
+ // You could raise an exception here.
+ Exit;
+ end;
+
+ Compiler.GetOutput(Data); // Save the output of the compiler in the string Data.
+ Compiler.Free; // After compiling the script, there is no need for the compiler anymore.
+
+ Exec := TPSExec.Create; // Create an instance of the executer.
+
+ Exec.RegisterDelphiFunction(@MyOwnFunction, 'MYOWNFUNCTION', cdRegister);
+
+ if not Exec.LoadData(Data) then // Load the data from the Data string.
+ begin
+ { For some reason the script could not be loaded. This is usually the case when a
+ library that has been used at compile time isn't registered at runtime. }
+ Exec.Free;
+ // You could raise an exception here.
+ Exit;
+ end;
+
+ ParamList := TIfList.Create; // Create the parameter list
+
+ n := CreateHeapVariant(Exec.GetTypeNo(Exec.GetType('TSTRINGARRAY')));
+ { Create a variant for the array parameter }
+ if n = nil then begin
+ { Something is wrong. Exit here }
+ ParamList.Free;
+ Exec.Free;
+ Exit;
+ end;
+
+ // Put two items in the array
+ PSDynArraySetLength(PPSVariantDynamicArray(n).Data, PPSVariantDynamicArray(n).VI.FType, 2);
+ TStringArr(PPSVariantDynamicArray(n).Data^)[0] := 'First item';
+ TStringArr(PPSVariantDynamicArray(n).Data^)[1] := 'Second item';
+ // Put something in the string parameter.
+
+ ParamList.Add(n); // Add it to the parameter list.
+
+ Exec.RunProc(ParamList, Exec.GetProc('TEST'));
+ { This will call the test proc that was exported before }
+
+ FreePIFVariantList(ParamList); // Cleanup the parameters (This will also free N)
+
+ Exec.Free; // Free the executer.
+end;
+
+
+
+const
+ Script = 'procedure test(s: tstringarray); var i: Longint; begin for i := 0 to GetArrayLength(S) -1 do MyOwnFunction(''Test is called: ''+s[i]);end; begin end.';
+
+begin
+ ExecuteScript(Script);
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Console/sample8.dpr b/official/5.0.30.691/Pascal Script for Delphi/Samples/Console/sample8.dpr
new file mode 100644
index 0000000..0df1366
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Console/sample8.dpr
@@ -0,0 +1,120 @@
+program sample8;
+
+uses
+ uPSCompiler,
+ uPSRuntime,
+ uPSUtils,
+
+ Dialogs
+
+ ;
+
+procedure MyOwnFunction(const Data: string);
+begin
+ // Do something with Data
+ ShowMessage(Data);
+end;
+
+function ScriptOnExportCheck(Sender: TPSPascalCompiler; Proc: TPSInternalProcedure; const ProcDecl: string): Boolean;
+{
+ The OnExportCheck callback function is called for each function in the script
+ (also for the main proc, with '!MAIN' as a Proc^.Name). ProcDecl contains the
+ function's result type and parameter types using this format:
+ ProcDecl: ResultType + ' ' + Parameter1 + ' ' + Parameter2 + ' '+Parameter3 + .....
+ Parameter: ParameterType+TypeName
+ ParameterType is @ for a normal parameter and ! for a var parameter.
+ A result type of 0 means no result.
+}
+begin
+ if Proc.Name = 'TEST' then begin // Check if the proc is the Test proc we want.
+ // Check if the proc has the correct params.
+ if not ExportCheck(Sender, Proc, [btString, btString], [pmIn]) then begin
+ { Something is wrong, so cause an error. }
+ Sender.MakeError('', ecTypeMismatch, '');
+ Result := False;
+ Exit;
+ end;
+ Result := True;
+ end else Result := True;
+end;
+
+function ScriptOnUses(Sender: TPSPascalCompiler; const Name: string): Boolean;
+{ the OnUses callback function is called for each "uses" in the script.
+ It's always called with the parameter 'SYSTEM' at the top of the script.
+ For example: uses ii1, ii2;
+ This will call this function 3 times. First with 'SYSTEM' then 'II1' and then 'II2'.
+}
+begin
+ if Name = 'SYSTEM' then begin
+
+ Sender.AddDelphiFunction('procedure MyOwnFunction(Data: string)');
+ { This will register the function to the script engine.
+ Now it can be used from within the script. }
+
+
+ Result := True;
+ end else
+ Result := False;
+end;
+
+type
+ TTestFunction = function (const s: string): string of object;
+ // Header of the test function added.
+
+procedure ExecuteScript(const Script: string);
+var
+ Compiler: TPSPascalCompiler;
+ { TPSPascalCompiler is the compiler part of the script engine. This will
+ translate a Pascal script into compiled data for the executer. }
+ Exec: TPSExec;
+ { TPSExec is the executer part of the script engine. It uses the output of
+ the compiler to run a script. }
+ Data: string;
+
+ TestFunc: TTestFunction;
+begin
+ Compiler := TPSPascalCompiler.Create; // create an instance of the compiler.
+ Compiler.OnUses := ScriptOnUses; // assign the OnUses event.
+
+ Compiler.OnExportCheck := ScriptOnExportCheck; // Assign the onExportCheck event.
+
+ // AllowNoBegin and AllowNoEnd allows it that begin and end are not required in a script.
+ Compiler.AllowNoBegin := True;
+ Compiler.AllowNoEnd := True;
+
+ if not Compiler.Compile(Script) then begin // Compile the Pascal script into bytecode.
+ Compiler.Free;
+ // You could raise an exception here.
+ Exit;
+ end;
+
+ Compiler.GetOutput(Data); // Save the output of the compiler in the string Data.
+ Compiler.Free; // After compiling the script, there is no need for the compiler anymore.
+
+ Exec := TPSExec.Create; // Create an instance of the executer.
+
+ Exec.RegisterDelphiFunction(@MyOwnFunction, 'MYOWNFUNCTION', cdRegister);
+
+ if not Exec.LoadData(Data) then begin // Load the data from the Data string.
+ { For some reason the script could not be loaded. This is usually the case when a
+ library that has been used at compile time isn't registered at runtime. }
+ Exec.Free;
+ // You could raise an exception here.
+ Exit;
+ end;
+
+ TestFunc := TTestFunction(Exec.GetProcAsMethodN('Test'));
+ if @TestFunc <> nil then
+ ShowMessage('Result from TestFunc(''test indata''): '+TestFunc('test indata'));
+
+ Exec.Free; // Free the executer.
+end;
+
+
+
+const
+ Script = 'function test(s: string): string; begin MyOwnFunction(''Test Called with param: ''+s); Result := ''Test Result: ''+s; end;';
+
+begin
+ ExecuteScript(Script);
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Debug/ide.dpr b/official/5.0.30.691/Pascal Script for Delphi/Samples/Debug/ide.dpr
new file mode 100644
index 0000000..e140813
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Debug/ide.dpr
@@ -0,0 +1,15 @@
+program ide;
+
+uses
+ Forms,
+ ide_editor in 'ide_editor.pas' {editor},
+ ide_debugoutput in 'ide_debugoutput.pas' {debugoutput};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(Teditor, editor);
+ Application.CreateForm(Tdebugoutput, debugoutput);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Debug/ide.res b/official/5.0.30.691/Pascal Script for Delphi/Samples/Debug/ide.res
new file mode 100644
index 0000000..a808583
Binary files /dev/null and b/official/5.0.30.691/Pascal Script for Delphi/Samples/Debug/ide.res differ
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Debug/ide_debugoutput.dfm b/official/5.0.30.691/Pascal Script for Delphi/Samples/Debug/ide_debugoutput.dfm
new file mode 100644
index 0000000..ef3b9e8
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Debug/ide_debugoutput.dfm
@@ -0,0 +1,27 @@
+object debugoutput: Tdebugoutput
+ Left = 192
+ Top = 107
+ Width = 530
+ Height = 366
+ Caption = 'Debug Output'
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ PixelsPerInch = 96
+ TextHeight = 13
+ object output: TMemo
+ Left = 0
+ Top = 0
+ Width = 522
+ Height = 339
+ Align = alClient
+ ReadOnly = True
+ ScrollBars = ssBoth
+ TabOrder = 0
+ WordWrap = False
+ end
+end
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Debug/ide_debugoutput.pas b/official/5.0.30.691/Pascal Script for Delphi/Samples/Debug/ide_debugoutput.pas
new file mode 100644
index 0000000..c25a91b
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Debug/ide_debugoutput.pas
@@ -0,0 +1,33 @@
+unit ide_debugoutput;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, StdCtrls;
+
+type
+ Tdebugoutput = class(TForm)
+ output: TMemo;
+ private
+ public
+ protected
+ procedure CreateParams(var Params: TCreateParams); override;
+ end;
+
+var
+ debugoutput: Tdebugoutput;
+
+implementation
+
+{$R *.dfm}
+
+{ Tdebugoutput }
+
+procedure Tdebugoutput.CreateParams(var Params: TCreateParams);
+begin
+ inherited CreateParams(Params);
+ Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
+end;
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Debug/ide_editor.dfm b/official/5.0.30.691/Pascal Script for Delphi/Samples/Debug/ide_editor.dfm
new file mode 100644
index 0000000..4cfab63
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Debug/ide_editor.dfm
@@ -0,0 +1,253 @@
+object editor: Teditor
+ Left = 234
+ Top = 166
+ Width = 696
+ Height = 480
+ Caption = 'Editor'
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ Menu = MainMenu1
+ OldCreateOrder = False
+ OnClick = FormClick
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Splitter1: TSplitter
+ Left = 0
+ Top = 346
+ Width = 688
+ Height = 3
+ Cursor = crVSplit
+ Align = alBottom
+ end
+ object ed: TSynEdit
+ Left = 0
+ Top = 0
+ Width = 688
+ Height = 346
+ Align = alClient
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -13
+ Font.Name = 'Courier New'
+ Font.Style = []
+ PopupMenu = PopupMenu1
+ TabOrder = 0
+ Gutter.Font.Charset = DEFAULT_CHARSET
+ Gutter.Font.Color = clWindowText
+ Gutter.Font.Height = -11
+ Gutter.Font.Name = 'Terminal'
+ Gutter.Font.Style = []
+ Highlighter = pashighlighter
+ Lines.Strings = (
+ 'Program test;'
+ 'begin'
+ 'end.')
+ OnSpecialLineColors = edSpecialLineColors
+ OnStatusChange = edStatusChange
+ RemovedKeystrokes = <
+ item
+ Command = ecContextHelp
+ ShortCut = 112
+ end>
+ AddedKeystrokes = <
+ item
+ Command = ecContextHelp
+ ShortCut = 16496
+ end>
+ end
+ object messages: TListBox
+ Left = 0
+ Top = 349
+ Width = 688
+ Height = 66
+ Align = alBottom
+ ItemHeight = 13
+ TabOrder = 1
+ end
+ object StatusBar1: TStatusBar
+ Left = 0
+ Top = 415
+ Width = 688
+ Height = 19
+ Panels = <
+ item
+ Width = 50
+ end>
+ end
+ object ce: TPSScriptDebugger
+ CompilerOptions = []
+ OnCompile = ceCompile
+ OnExecute = ceExecute
+ OnAfterExecute = ceAfterExecute
+ Plugins = <
+ item
+ Plugin = IFPS3CE_DateUtils1
+ end
+ item
+ Plugin = IFPS3CE_Std1
+ end
+ item
+ Plugin = IFPS3CE_Controls1
+ end
+ item
+ Plugin = IFPS3CE_StdCtrls1
+ end
+ item
+ Plugin = IFPS3CE_Forms1
+ end
+ item
+ Plugin = IFPS3DllPlugin1
+ end
+ item
+ Plugin = IFPS3CE_ComObj1
+ end>
+ MainFileName = 'Unnamed'
+ UsePreProcessor = True
+ OnNeedFile = ceNeedFile
+ OnIdle = ceIdle
+ OnLineInfo = ceLineInfo
+ OnBreakpoint = ceBreakpoint
+ Left = 592
+ Top = 112
+ end
+ object IFPS3DllPlugin1: TPSDllPlugin
+ Left = 560
+ Top = 112
+ end
+ object pashighlighter: TSynPasSyn
+ Left = 592
+ Top = 64
+ end
+ object PopupMenu1: TPopupMenu
+ Left = 592
+ Top = 16
+ object BreakPointMenu: TMenuItem
+ Caption = '&Set/Clear Breakpoint'
+ ShortCut = 116
+ OnClick = BreakPointMenuClick
+ end
+ end
+ object MainMenu1: TMainMenu
+ Left = 592
+ Top = 160
+ object File1: TMenuItem
+ Caption = '&File'
+ object New1: TMenuItem
+ Caption = '&New'
+ ShortCut = 16462
+ OnClick = New1Click
+ end
+ object N3: TMenuItem
+ Caption = '-'
+ end
+ object Open1: TMenuItem
+ Caption = '&Open'
+ ShortCut = 16463
+ OnClick = Open1Click
+ end
+ object Save1: TMenuItem
+ Caption = '&Save'
+ ShortCut = 16467
+ OnClick = Save1Click
+ end
+ object Saveas1: TMenuItem
+ Caption = 'Save &as'
+ OnClick = Saveas1Click
+ end
+ object N4: TMenuItem
+ Caption = '-'
+ end
+ object Exit1: TMenuItem
+ Caption = '&Exit'
+ OnClick = Exit1Click
+ end
+ end
+ object Run1: TMenuItem
+ Caption = '&Run'
+ object Decompile1: TMenuItem
+ Caption = '&Decompile'
+ OnClick = Decompile1Click
+ end
+ object N5: TMenuItem
+ Caption = '-'
+ end
+ object StepOver1: TMenuItem
+ Caption = '&Step Over'
+ ShortCut = 119
+ OnClick = StepOver1Click
+ end
+ object StepInto1: TMenuItem
+ Caption = '&Step Into'
+ ShortCut = 118
+ OnClick = StepInto1Click
+ end
+ object N1: TMenuItem
+ Caption = '-'
+ end
+ object Reset1: TMenuItem
+ Caption = '&Reset'
+ ShortCut = 16497
+ OnClick = Reset1Click
+ end
+ object N2: TMenuItem
+ Caption = '-'
+ end
+ object Run2: TMenuItem
+ Caption = '&Run'
+ ShortCut = 120
+ OnClick = Run2Click
+ end
+ end
+ end
+ object SaveDialog1: TSaveDialog
+ DefaultExt = 'ROPS'
+ Filter = 'ROPS Files|*.ROPS'
+ Options = [ofHideReadOnly, ofPathMustExist, ofEnableSizing]
+ Left = 200
+ Top = 104
+ end
+ object OpenDialog1: TOpenDialog
+ DefaultExt = 'ROPS'
+ Filter = 'ROPS Files|*.ROPS'
+ Options = [ofHideReadOnly, ofPathMustExist, ofFileMustExist, ofEnableSizing]
+ Left = 168
+ Top = 104
+ end
+ object IFPS3CE_Controls1: TPSImport_Controls
+ EnableStreams = True
+ EnableGraphics = True
+ EnableControls = True
+ Left = 328
+ Top = 40
+ end
+ object IFPS3CE_DateUtils1: TPSImport_DateUtils
+ Left = 328
+ Top = 72
+ end
+ object IFPS3CE_Std1: TPSImport_Classes
+ EnableStreams = True
+ EnableClasses = True
+ Left = 328
+ Top = 104
+ end
+ object IFPS3CE_Forms1: TPSImport_Forms
+ EnableForms = True
+ EnableMenus = True
+ Left = 328
+ Top = 136
+ end
+ object IFPS3CE_StdCtrls1: TPSImport_StdCtrls
+ EnableExtCtrls = True
+ EnableButtons = True
+ Left = 328
+ Top = 168
+ end
+ object IFPS3CE_ComObj1: TPSImport_ComObj
+ Left = 328
+ Top = 200
+ end
+end
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Debug/ide_editor.pas b/official/5.0.30.691/Pascal Script for Delphi/Samples/Debug/ide_editor.pas
new file mode 100644
index 0000000..8f3b12b
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Debug/ide_editor.pas
@@ -0,0 +1,410 @@
+unit ide_editor;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, SynEdit, SynEditHighlighter, SynHighlighterPas,
+ Menus, uPSCompiler, uPSRuntime, uPSDisassembly, uPSUtils, ExtCtrls,
+ StdCtrls, ComCtrls, uPSComponent_COM, uPSComponent_StdCtrls,
+ uPSComponent_Forms, uPSComponent_Default, uPSComponent_Controls, uPSComponent,
+ uPSDebugger;
+
+type
+ Teditor = class(TForm)
+ ce: TPSScriptDebugger;
+ IFPS3DllPlugin1: TPSDllPlugin;
+ pashighlighter: TSynPasSyn;
+ ed: TSynEdit;
+ PopupMenu1: TPopupMenu;
+ BreakPointMenu: TMenuItem;
+ MainMenu1: TMainMenu;
+ File1: TMenuItem;
+ Run1: TMenuItem;
+ StepOver1: TMenuItem;
+ StepInto1: TMenuItem;
+ N1: TMenuItem;
+ Reset1: TMenuItem;
+ N2: TMenuItem;
+ Run2: TMenuItem;
+ Exit1: TMenuItem;
+ messages: TListBox;
+ Splitter1: TSplitter;
+ SaveDialog1: TSaveDialog;
+ OpenDialog1: TOpenDialog;
+ N3: TMenuItem;
+ N4: TMenuItem;
+ New1: TMenuItem;
+ Open1: TMenuItem;
+ Save1: TMenuItem;
+ Saveas1: TMenuItem;
+ StatusBar1: TStatusBar;
+ Decompile1: TMenuItem;
+ N5: TMenuItem;
+ IFPS3CE_Controls1: TPSImport_Controls;
+ IFPS3CE_DateUtils1: TPSImport_DateUtils;
+ IFPS3CE_Std1: TPSImport_Classes;
+ IFPS3CE_Forms1: TPSImport_Forms;
+ IFPS3CE_StdCtrls1: TPSImport_StdCtrls;
+ IFPS3CE_ComObj1: TPSImport_ComObj;
+ procedure edSpecialLineColors(Sender: TObject; Line: Integer;
+ var Special: Boolean; var FG, BG: TColor);
+ procedure BreakPointMenuClick(Sender: TObject);
+ procedure ceLineInfo(Sender: TObject; const FileName: String; Position, Row, Col: Cardinal);
+ procedure Exit1Click(Sender: TObject);
+ procedure StepOver1Click(Sender: TObject);
+ procedure StepInto1Click(Sender: TObject);
+ procedure Reset1Click(Sender: TObject);
+ procedure ceIdle(Sender: TObject);
+ procedure Run2Click(Sender: TObject);
+ procedure ceExecute(Sender: TPSScript);
+ procedure ceAfterExecute(Sender: TPSScript);
+ procedure ceCompile(Sender: TPSScript);
+ procedure New1Click(Sender: TObject);
+ procedure Open1Click(Sender: TObject);
+ procedure Save1Click(Sender: TObject);
+ procedure Saveas1Click(Sender: TObject);
+ procedure edStatusChange(Sender: TObject; Changes: TSynStatusChanges);
+ procedure Decompile1Click(Sender: TObject);
+ function ceNeedFile(Sender: TObject; const OrginFileName: String;
+ var FileName, Output: String): Boolean;
+ procedure ceBreakpoint(Sender: TObject; const FileName: String; Position, Row, Col: Cardinal);
+ procedure FormClick(Sender: TObject);
+ private
+ FActiveLine: Longint;
+ FResume: Boolean;
+ FActiveFile: string;
+ function Compile: Boolean;
+ function Execute: Boolean;
+
+ procedure Writeln(const s: string);
+ procedure Readln(var s: string);
+ procedure SetActiveFile(const Value: string);
+
+ property aFile: string read FActiveFile write SetActiveFile;
+ public
+ function SaveCheck: Boolean;
+ end;
+
+var
+ editor: Teditor;
+
+implementation
+
+uses ide_debugoutput;
+
+{$R *.dfm}
+
+procedure Teditor.edSpecialLineColors(Sender: TObject; Line: Integer;
+ var Special: Boolean; var FG, BG: TColor);
+begin
+ if ce.HasBreakPoint(ce.MainFileName, Line) then
+ begin
+ Special := True;
+ if Line = FActiveLine then
+ begin
+ BG := clWhite;
+ FG := clRed;
+ end else
+ begin
+ FG := clWhite;
+ BG := clRed;
+ end;
+ end else
+ if Line = FActiveLine then
+ begin
+ Special := True;
+ FG := clWhite;
+ bg := clBlue;
+ end else Special := False;
+end;
+
+procedure Teditor.BreakPointMenuClick(Sender: TObject);
+var
+ Line: Longint;
+begin
+ Line := Ed.CaretY;
+ if ce.HasBreakPoint(ce.MainFileName, Line) then
+ ce.ClearBreakPoint(ce.MainFileName, Line)
+ else
+ ce.SetBreakPoint(ce.MainFileName, Line);
+ ed.Refresh;
+end;
+
+procedure Teditor.ceLineInfo(Sender: TObject; const FileName: String; Position, Row,
+ Col: Cardinal);
+begin
+ if ce.Exec.DebugMode <> dmRun then
+ begin
+ FActiveLine := Row;
+ if (FActiveLine < ed.TopLine +2) or (FActiveLine > Ed.TopLine + Ed.LinesInWindow -2) then
+ begin
+ Ed.TopLine := FActiveLine - (Ed.LinesInWindow div 2);
+ end;
+ ed.CaretY := FActiveLine;
+ ed.CaretX := 1;
+
+ ed.Refresh;
+ end;
+end;
+
+procedure Teditor.Exit1Click(Sender: TObject);
+begin
+ Close;
+end;
+
+procedure Teditor.StepOver1Click(Sender: TObject);
+begin
+ if ce.Exec.Status = isRunning then
+ ce.StepOver
+ else
+ begin
+ if Compile then
+ begin
+ ce.StepInto;
+ Execute;
+ end;
+ end;
+end;
+
+procedure Teditor.StepInto1Click(Sender: TObject);
+begin
+ if ce.Exec.Status = isRunning then
+ ce.StepInto
+ else
+ begin
+ if Compile then
+ begin
+ ce.StepInto;
+ Execute;
+ end;
+ end;
+end;
+
+procedure Teditor.Reset1Click(Sender: TObject);
+begin
+ if ce.Exec.Status = isRunning then
+ ce.Stop;
+end;
+
+function Teditor.Compile: Boolean;
+var
+ i: Longint;
+begin
+ ce.Script.Assign(ed.Lines);
+ Result := ce.Compile;
+ messages.Clear;
+ for i := 0 to ce.CompilerMessageCount -1 do
+ begin
+ Messages.Items.Add(ce.CompilerMessages[i].MessageToString);
+ end;
+ if Result then
+ Messages.Items.Add('Succesfully compiled');
+end;
+
+procedure Teditor.ceIdle(Sender: TObject);
+begin
+ Application.HandleMessage;
+ if FResume then
+ begin
+ FResume := False;
+ ce.Resume;
+ FActiveLine := 0;
+ ed.Refresh;
+ end;
+end;
+
+procedure Teditor.Run2Click(Sender: TObject);
+begin
+ if CE.Running then
+ begin
+ FResume := True
+ end else
+ begin
+ if Compile then
+ Execute;
+ end;
+end;
+
+procedure Teditor.ceExecute(Sender: TPSScript);
+begin
+ ce.SetVarToInstance('SELF', Self);
+ ce.SetVarToInstance('APPLICATION', Application);
+ Caption := 'Editor - Running';
+end;
+
+procedure Teditor.ceAfterExecute(Sender: TPSScript);
+begin
+ Caption := 'Editor';
+ FActiveLine := 0;
+ ed.Refresh;
+end;
+
+function Teditor.Execute: Boolean;
+begin
+ debugoutput.Output.Clear;
+ if CE.Execute then
+ begin
+ Messages.Items.Add('Succesfully Execute');
+ Result := True;
+ end else
+ begin
+ messages.Items.Add('Runtime Error: '+ce.ExecErrorToString + ' at ['+IntToStr(ce.ExecErrorRow)+':'+IntToStr(ce.ExecErrorCol)+'] bytecode pos:'+inttostr(ce.ExecErrorProcNo)+':'+inttostr(ce.ExecErrorByteCodePosition));
+ Result := False;
+ end;
+end;
+
+procedure Teditor.Writeln(const s: string);
+begin
+ debugoutput.output.Lines.Add(S);
+ debugoutput.Visible := True;
+end;
+
+procedure Teditor.ceCompile(Sender: TPSScript);
+begin
+ Sender.AddMethod(Self, @TEditor.Writeln, 'procedure Writeln(s: string)');
+ Sender.AddMethod(Self, @TEditor.Readln, 'procedure readln(var s: string)');
+ Sender.AddRegisteredVariable('Self', 'TForm');
+ Sender.AddRegisteredVariable('Application', 'TApplication');
+end;
+
+procedure Teditor.Readln(var s: string);
+begin
+ s := InputBox('Script', '', '');
+end;
+
+procedure Teditor.New1Click(Sender: TObject);
+begin
+ if SaveCheck then
+ begin
+ ed.ClearAll;
+ ed.Lines.Text := 'Program test;'#13#10'begin'#13#10'end.';
+ ed.Modified := False;
+ aFile := '';
+ end;
+end;
+
+procedure Teditor.Open1Click(Sender: TObject);
+begin
+ if SaveCheck then
+ begin
+ if OpenDialog1.Execute then
+ begin
+ ed.ClearAll;
+ ed.Lines.LoadFromFile(OpenDialog1.FileName);
+ ed.Modified := False;
+ aFile := OpenDialog1.FileName;
+ end;
+ end;
+end;
+
+procedure Teditor.Save1Click(Sender: TObject);
+begin
+ if aFile <> '' then
+ begin
+ ed.Lines.SaveToFile(aFile);
+ ed.Modified := False;
+ end else
+ SaveAs1Click(nil);
+end;
+
+procedure Teditor.Saveas1Click(Sender: TObject);
+begin
+ if SaveDialog1.Execute then
+ begin
+ aFile := SaveDialog1.FileName;
+ ed.Lines.SaveToFile(aFile);
+ ed.Modified := False;
+ end;
+end;
+
+function Teditor.SaveCheck: Boolean;
+begin
+ if ed.Modified then
+ begin
+ case MessageDlg('File has not been saved, save now?', mtConfirmation, mbYesNoCancel, 0) of
+ idYes:
+ begin
+ Save1Click(nil);
+ Result := aFile <> '';
+ end;
+ IDNO: Result := True;
+ else
+ Result := False;
+ end;
+ end else Result := True;
+end;
+
+procedure Teditor.edStatusChange(Sender: TObject;
+ Changes: TSynStatusChanges);
+begin
+ StatusBar1.Panels[0].Text := IntToStr(ed.CaretY)+':'+IntToStr(ed.CaretX)
+end;
+
+procedure Teditor.Decompile1Click(Sender: TObject);
+var
+ s: string;
+begin
+ if Compile then
+ begin
+ ce.GetCompiled(s);
+ IFPS3DataToText(s, s);
+ debugoutput.output.Lines.Text := s;
+ debugoutput.visible := true;
+ end;
+end;
+
+function Teditor.ceNeedFile(Sender: TObject; const OrginFileName: String;
+ var FileName, Output: String): Boolean;
+var
+ path: string;
+ f: TFileStream;
+begin
+ if aFile <> '' then
+ Path := ExtractFilePath(aFile)
+ else
+ Path := ExtractFilePath(ParamStr(0));
+ Path := Path + FileName;
+ try
+ F := TFileStream.Create(Path, fmOpenRead or fmShareDenyWrite);
+ except
+ Result := false;
+ exit;
+ end;
+ try
+ SetLength(Output, f.Size);
+ f.Read(Output[1], Length(Output));
+ finally
+ f.Free;
+ end;
+ Result := True;
+end;
+
+procedure Teditor.ceBreakpoint(Sender: TObject; const FileName: String; Position, Row,
+ Col: Cardinal);
+begin
+ FActiveLine := Row;
+ if (FActiveLine < ed.TopLine +2) or (FActiveLine > Ed.TopLine + Ed.LinesInWindow -2) then
+ begin
+ Ed.TopLine := FActiveLine - (Ed.LinesInWindow div 2);
+ end;
+ ed.CaretY := FActiveLine;
+ ed.CaretX := 1;
+
+ ed.Refresh;
+end;
+
+procedure Teditor.SetActiveFile(const Value: string);
+begin
+ FActiveFile := Value;
+ ce.MainFileName := ExtractFileName(FActiveFile);
+ if Ce.MainFileName = '' then
+ Ce.MainFileName := 'Unnamed';
+end;
+
+procedure Teditor.FormClick(Sender: TObject);
+begin
+ ShowMessage('BLA');
+end;
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Debug/readme.txt b/official/5.0.30.691/Pascal Script for Delphi/Samples/Debug/readme.txt
new file mode 100644
index 0000000..e4a5045
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Debug/readme.txt
@@ -0,0 +1 @@
+This demo requires SynEdit (http://synedit.sf.net) to compile.
\ No newline at end of file
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/Import.dpr b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/Import.dpr
new file mode 100644
index 0000000..f85d43c
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/Import.dpr
@@ -0,0 +1,17 @@
+program Import;
+
+uses
+ Forms,
+ fMain in 'fMain.pas' {MainForm},
+ fDwin in 'fDwin.pas' {dwin};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.Title := 'Import Sample';
+ Application.CreateForm(TMainForm, MainForm);
+ Application.CreateForm(Tdwin, dwin);
+ Application.Run;
+end.
+
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/Import.res b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/Import.res
new file mode 100644
index 0000000..67a114d
Binary files /dev/null and b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/Import.res differ
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/arraytest.rops b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/arraytest.rops
new file mode 100644
index 0000000..667646e
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/arraytest.rops
@@ -0,0 +1,22 @@
+Program IFSTest;
+type
+ TArrayOfByte = array of byte;
+
+procedure Test(x: TARrayOfByte);
+var
+ i: Integer;
+begin
+ for i := 0 to Getarraylength(X) -1 do
+ begin
+ writeln(inttostr(x[i]));
+ end;
+end;
+var
+ temp: TArrayOfByte;
+
+Begin
+ setarraylength(temp, 2);
+ temp[0] := 1;
+ temp[1] :=23;
+ test(temp);
+End.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/booleantest.rops b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/booleantest.rops
new file mode 100644
index 0000000..f09d50b
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/booleantest.rops
@@ -0,0 +1,15 @@
+Program IFSTest;
+var
+ x1, x2: integer;
+ b: boolean;
+Begin
+ x1 := 2;
+ x2 := 2;
+ b := x1 = x2;
+ if b then begin writeln('true'); end else begin writeln('false');end;
+ x1 := 2;
+ x2 := 4;
+ b := x1 = x2;
+ if b then begin writeln('true'); end else begin writeln('false');end;
+ writeln('done');
+End.
\ No newline at end of file
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/bytearray.rops b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/bytearray.rops
new file mode 100644
index 0000000..a970225
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/bytearray.rops
@@ -0,0 +1,14 @@
+Program IFSTest;
+type
+ TByteArray = array of byte;
+var
+ x: TByteARray;
+Begin
+ try
+ x[0] := 1;
+ // will cause an runtime error (Out Of Record Fields Range)
+ writeln('Not supposed to be here');
+ except
+ Writeln('Error, which is ok since we accessed a field outside it''s bounds');
+ end;
+End.
\ No newline at end of file
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/casetest.rops b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/casetest.rops
new file mode 100644
index 0000000..b45c335
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/casetest.rops
@@ -0,0 +1,12 @@
+Program IFSTest;
+var
+ b: Byte;
+Begin
+ for b := 0 to 2 do begin
+ case b of
+ 0: writeln('0');
+ 1: writeln('1');
+ else writeln('>1');
+ end;
+ end;
+End.
\ No newline at end of file
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/dlltest.rops b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/dlltest.rops
new file mode 100644
index 0000000..c2bd052
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/dlltest.rops
@@ -0,0 +1,19 @@
+Program IFSTest;
+// compile the demo application, minimize delphi and run this.
+function FindWindow(C1, C2: PChar): Longint; external 'FindWindowA@user32.dll stdcall';
+function ShowWindow(hWnd, nCmdShow: Longint): Integer; external 'ShowWindow@user32.dll stdcall';
+function SetWindowText(hWnd: Longint; Text: PChar): Longint; external 'SetWindowTextA@user32.dll stdcall';
+var
+ i: Longint;
+ wnd: Longint;
+Begin
+ wnd := Findwindow('', 'Innerfuse Pascal Script III');
+ SetWindowText(Wnd, 'This is DLL demo, it calls some windows user32 routines. This will hide this window for a few seconds');
+ for i := 0 to 200000 do begin end;
+ ShowWindow(Wnd, 0); // hide it
+ for i := 0 to 200000 do begin end;
+ SetWindowText(Wnd, 'Wasn''t that nice?');
+ ShowWindow(Wnd, 5); // show it
+ for i := 0 to 200000 do begin end;
+ SetWindowText(Wnd, 'Innerfuse Pascal Script III');
+End.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/exittest.rops b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/exittest.rops
new file mode 100644
index 0000000..682b825
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/exittest.rops
@@ -0,0 +1,14 @@
+Program IFSTest;
+procedure test;
+begin
+ writeln('1');
+ exit;
+ writeln('2');
+end;
+Begin
+ test;
+ writeln('3');
+ exit;
+ writeln('4');
+
+End.
\ No newline at end of file
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/fDwin.dfm b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/fDwin.dfm
new file mode 100644
index 0000000..e736445
Binary files /dev/null and b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/fDwin.dfm differ
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/fDwin.pas b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/fDwin.pas
new file mode 100644
index 0000000..1f20539
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/fDwin.pas
@@ -0,0 +1,27 @@
+unit fDwin;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ ExtCtrls, StdCtrls;
+
+type
+ Tdwin = class(TForm)
+ Memo1: TMemo;
+ Panel1: TPanel;
+ Button1: TButton;
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ dwin: Tdwin;
+
+implementation
+
+{$R *.dfm}
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/fMain.dfm b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/fMain.dfm
new file mode 100644
index 0000000..e5fc931
Binary files /dev/null and b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/fMain.dfm differ
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/fMain.pas b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/fMain.pas
new file mode 100644
index 0000000..81cb696
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/fMain.pas
@@ -0,0 +1,471 @@
+unit fMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ ExtCtrls, StdCtrls, uPSCompiler, uPSRuntime, uPSPreprocessor, uPSUtils,
+ Menus, uPSC_comobj, uPSR_comobj;
+
+type
+ TMainForm = class(TForm)
+ Memo1: TMemo;
+ Memo2: TMemo;
+ Splitter1: TSplitter;
+ MainMenu1: TMainMenu;
+ Toosl1: TMenuItem;
+ Compile1: TMenuItem;
+ CompilewithTimer1: TMenuItem;
+ File1: TMenuItem;
+ Exit1: TMenuItem;
+ N1: TMenuItem;
+ SaveAs1: TMenuItem;
+ Save1: TMenuItem;
+ Open1: TMenuItem;
+ New1: TMenuItem;
+ OpenDialog1: TOpenDialog;
+ SaveDialog1: TSaveDialog;
+ N2: TMenuItem;
+ Stop1: TMenuItem;
+ N3: TMenuItem;
+ CompileandDisassemble1: TMenuItem;
+ procedure Compile1Click(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ procedure Exit1Click(Sender: TObject);
+ procedure New1Click(Sender: TObject);
+ procedure Open1Click(Sender: TObject);
+ procedure Save1Click(Sender: TObject);
+ procedure SaveAs1Click(Sender: TObject);
+ procedure Memo1Change(Sender: TObject);
+ procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
+ procedure Stop1Click(Sender: TObject);
+ procedure CompileandDisassemble1Click(Sender: TObject);
+ procedure CompilewithTimer1Click(Sender: TObject);
+ private
+ fn: string;
+ changed: Boolean;
+ function SaveTest: Boolean;
+ public
+ { Public declarations }
+ end;
+
+var
+ MainForm: TMainForm;
+
+implementation
+
+uses
+ uPSDisassembly, uPSC_dll, uPSR_dll, uPSDebugger,
+ uPSR_std, uPSC_std, uPSR_stdctrls, uPSC_stdctrls,
+ uPSR_forms, uPSC_forms,
+
+ uPSC_graphics,
+ uPSC_controls,
+ uPSC_classes,
+ uPSR_graphics,
+ uPSR_controls,
+ uPSR_classes,
+ fDwin;
+
+{$R *.DFM}
+
+var
+ Imp: TPSRuntimeClassImporter;
+
+function StringLoadFile(const Filename: string): string;
+var
+ Stream: TStream;
+begin
+ Stream := TFileStream.Create(Filename, fmOpenread or fmSharedenywrite);
+ try
+ SetLength(Result, Stream.Size);
+ Stream.Read(Result[1], Length(Result));
+ finally
+ Stream.Free;
+ end;
+end;
+
+function OnNeedFile(Sender: TPSPreProcessor; const callingfilename: string; var FileName, Output: string): Boolean;
+var
+ s: string;
+begin
+ s := ExtractFilePath(callingfilename);
+ if s = '' then s := ExtractFilePath(Paramstr(0));
+ Filename := s + Filename;
+ if FileExists(Filename) then
+ begin
+ Output := StringLoadFile(Filename);
+ Result := True;
+ end else
+ Result := False;
+end;
+
+function MyOnUses(Sender: TPSPascalCompiler; const Name: string): Boolean;
+begin
+ if Name = 'SYSTEM' then
+ begin
+ TPSPascalCompiler(Sender).AddFunction('procedure Writeln(s: string);');
+ TPSPascalCompiler(Sender).AddFunction('function Readln(question: string): string;');
+ Sender.AddDelphiFunction('function ImportTest(S1: string; s2: Longint; s3: Byte; s4: word; var s5: string): string;');
+
+ Sender.AddConstantN('NaN', 'extended').Value.textended := 0.0 / 0.0;
+ Sender.AddConstantN('Infinity', 'extended').Value.textended := 1.0 / 0.0;
+ Sender.AddConstantN('NegInfinity', 'extended').Value.textended := - 1.0 / 0.0;
+
+ SIRegister_Std(Sender);
+ SIRegister_Classes(Sender, True);
+ SIRegister_Graphics(Sender, True);
+ SIRegister_Controls(Sender);
+ SIRegister_stdctrls(Sender);
+ SIRegister_Forms(Sender);
+ SIRegister_ComObj(Sender);
+
+ AddImportedClassVariable(Sender, 'Memo1', 'TMemo');
+ AddImportedClassVariable(Sender, 'Memo2', 'TMemo');
+ AddImportedClassVariable(Sender, 'Self', 'TForm');
+ AddImportedClassVariable(Sender, 'Application', 'TApplication');
+
+ Result := True;
+ end
+ else
+ begin
+ TPSPascalCompiler(Sender).MakeError('', ecUnknownIdentifier, '');
+ Result := False;
+ end;
+end;
+
+function MyWriteln(Caller: TPSExec; p: TIFExternalProcRec; Global, Stack: TPSStack): Boolean;
+var
+ PStart: Cardinal;
+begin
+ if Global = nil then begin result := false; exit; end;
+ PStart := Stack.Count - 1;
+ MainForm.Memo2.Lines.Add(Stack.GetString(PStart));
+ Result := True;
+end;
+
+function MyReadln(Caller: TPSExec; p: TIFExternalProcRec; Global, Stack: TPSStack): Boolean;
+var
+ PStart: Cardinal;
+begin
+ if Global = nil then begin result := false; exit; end;
+ PStart := Stack.Count - 2;
+ Stack.SetString(PStart + 1, InputBox(MainForm.Caption, Stack.GetString(PStart), ''));
+ Result := True;
+end;
+
+function ImportTest(S1: string; s2: Longint; s3: Byte; s4: word; var s5: string): string;
+begin
+ Result := s1 + ' ' + IntToStr(s2) + ' ' + IntToStr(s3) + ' ' + IntToStr(s4) + ' - OK!';
+ S5 := s5 + ' '+ result + ' - OK2!';
+end;
+
+var
+ IgnoreRunline: Boolean = False;
+ I: Integer;
+
+procedure RunLine(Sender: TPSExec);
+begin
+ if IgnoreRunline then Exit;
+ i := (i + 1) mod 15;
+ Sender.GetVar('');
+ if i = 0 then Application.ProcessMessages;
+end;
+
+function MyExportCheck(Sender: TPSPascalCompiler; Proc: TPSInternalProcedure; const ProcDecl: string): Boolean;
+begin
+ Result := True;
+end;
+
+
+procedure TMainForm.Compile1Click(Sender: TObject);
+var
+ x1: TPSPascalCompiler;
+ x2: TPSDebugExec;
+ xpre: TPSPreProcessor;
+ s, d: string;
+
+ procedure Outputtxt(const s: string);
+ begin
+ Memo2.Lines.Add(s);
+ end;
+
+ procedure OutputMsgs;
+ var
+ l: Longint;
+ b: Boolean;
+ begin
+ b := False;
+ for l := 0 to x1.MsgCount - 1 do
+ begin
+ Outputtxt(x1.Msg[l].MessageToString);
+ if (not b) and (x1.Msg[l] is TPSPascalCompilerError) then
+ begin
+ b := True;
+ Memo1.SelStart := X1.Msg[l].Pos;
+ end;
+ end;
+ end;
+begin
+ if tag <> 0 then exit;
+ Memo2.Clear;
+ xpre := TPSPreProcessor.Create;
+ try
+ xpre.OnNeedFile := OnNeedFile;
+ xpre.MainFileName := fn;
+ xpre.MainFile := Memo1.Text;
+ xpre.PreProcess(xpre.MainFileName, s);
+
+ x1 := TPSPascalCompiler.Create;
+ x1.OnExportCheck := MyExportCheck;
+ x1.OnUses := MyOnUses;
+ x1.OnExternalProc := DllExternalProc;
+ if x1.Compile(s) then
+ begin
+ Outputtxt('Succesfully compiled');
+ xpre.AdjustMessages(x1);
+ OutputMsgs;
+ if not x1.GetOutput(s) then
+ begin
+ x1.Free;
+ Outputtxt('[Error] : Could not get data');
+ exit;
+ end;
+ x1.GetDebugOutput(d);
+ x1.Free;
+ x2 := TPSDebugExec.Create;
+ try
+ RegisterDLLRuntime(x2);
+ RegisterClassLibraryRuntime(x2, Imp);
+ RIRegister_ComObj(x2);
+
+ tag := longint(x2);
+ if sender <> nil then
+ x2.OnRunLine := RunLine;
+ x2.RegisterFunctionName('WRITELN', MyWriteln, nil, nil);
+ x2.RegisterFunctionName('READLN', MyReadln, nil, nil);
+ x2.RegisterDelphiFunction(@ImportTest, 'IMPORTTEST', cdRegister);
+ if not x2.LoadData(s) then
+ begin
+ Outputtxt('[Error] : Could not load data: '+TIFErrorToString(x2.ExceptionCode, x2.ExceptionString));
+ tag := 0;
+ exit;
+ end;
+ x2.LoadDebugData(d);
+ SetVariantToClass(x2.GetVarNo(x2.GetVar('MEMO1')), Memo1);
+ SetVariantToClass(x2.GetVarNo(x2.GetVar('MEMO2')), Memo2);
+ SetVariantToClass(x2.GetVarNo(x2.GetVar('SELF')), Self);
+ SetVariantToClass(x2.GetVarNo(x2.GetVar('APPLICATION')), Application);
+
+ x2.RunScript;
+ if x2.ExceptionCode <> erNoError then
+ Outputtxt('[Runtime Error] : ' + TIFErrorToString(x2.ExceptionCode, x2.ExceptionString) +
+ ' in ' + IntToStr(x2.ExceptionProcNo) + ' at ' + IntToSTr(x2.ExceptionPos))
+ else
+ OutputTxt('Successfully executed');
+ finally
+ tag := 0;
+ x2.Free;
+ end;
+ end
+ else
+ begin
+ Outputtxt('Failed when compiling');
+ xpre.AdjustMessages(x1);
+ OutputMsgs;
+ x1.Free;
+ end;
+ finally
+ Xpre.Free;
+ end;
+end;
+
+procedure TMainForm.FormCreate(Sender: TObject);
+begin
+ Caption := 'RemObjects Pascal Script';
+ fn := '';
+ changed := False;
+ Memo1.Lines.Text := 'Program Test;'#13#10'Begin'#13#10'End.';
+end;
+
+procedure TMainForm.Exit1Click(Sender: TObject);
+begin
+ Close;
+end;
+
+procedure TMainForm.New1Click(Sender: TObject);
+begin
+ if not SaveTest then
+ exit;
+ Memo1.Lines.Text := 'Program Test;'#13#10'Begin'#13#10'End.';
+ Memo2.Lines.Clear;
+ fn := '';
+end;
+
+function TMainForm.SaveTest: Boolean;
+begin
+ if changed then
+ begin
+ case MessageDlg('File is not saved, save now?', mtWarning, mbYesNoCancel, 0) of
+ mrYes:
+ begin
+ Save1Click(nil);
+ Result := not changed;
+ end;
+ mrNo: Result := True;
+ else
+ Result := False;
+ end;
+ end
+ else
+ Result := True;
+end;
+
+procedure TMainForm.Open1Click(Sender: TObject);
+begin
+ if not SaveTest then
+ exit;
+ if OpenDialog1.Execute then
+ begin
+ Memo1.Lines.LoadFromFile(OpenDialog1.FileName);
+ changed := False;
+ Memo2.Lines.Clear;
+ fn := OpenDialog1.FileName;
+ end;
+end;
+
+procedure TMainForm.Save1Click(Sender: TObject);
+begin
+ if fn = '' then
+ begin
+ Saveas1Click(nil);
+ end
+ else
+ begin
+ Memo1.Lines.SaveToFile(fn);
+ changed := False;
+ end;
+end;
+
+procedure TMainForm.SaveAs1Click(Sender: TObject);
+begin
+ SaveDialog1.FileName := '';
+ if SaveDialog1.Execute then
+ begin
+ fn := SaveDialog1.FileName;
+ Memo1.Lines.SaveToFile(fn);
+ changed := False;
+ end;
+end;
+
+procedure TMainForm.Memo1Change(Sender: TObject);
+begin
+ changed := True;
+end;
+
+procedure TMainForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
+begin
+ CanClose := SaveTest;
+end;
+
+procedure TMainForm.Stop1Click(Sender: TObject);
+begin
+ if tag <> 0 then
+ TPSExec(tag).Stop;
+end;
+
+procedure TMainForm.CompileandDisassemble1Click(Sender: TObject);
+var
+ x1: TPSPascalCompiler;
+ xpre: TPSPreProcessor;
+ s, s2: string;
+
+ procedure OutputMsgs;
+ var
+ l: Integer;
+ b: Boolean;
+ begin
+ b := False;
+ for l := 0 to x1.MsgCount - 1 do
+ begin
+ Memo2.Lines.Add(x1.Msg[l].MessageToString);
+ if (not b) and (x1.Msg[l] is TPSPascalCompilerError) then
+ begin
+ b := True;
+ Memo1.SelStart := X1.Msg[l].Pos;
+ end;
+ end;
+ end;
+begin
+ if tag <> 0 then exit;
+ Memo2.Clear;
+ xpre := TPSPreProcessor.Create;
+ try
+ xpre.OnNeedFile := OnNeedFile;
+ xpre.MainFileName := fn;
+ xpre.MainFile := Memo1.Text;
+ xpre.PreProcess(xpre.MainFileName, s);
+ x1 := TPSPascalCompiler.Create;
+ x1.OnExternalProc := DllExternalProc;
+ x1.OnUses := MyOnUses;
+ if x1.Compile(s) then
+ begin
+ Memo2.Lines.Add('Successfully compiled');
+ xpre.AdjustMessages(x1);
+ OutputMsgs;
+ if not x1.GetOutput(s) then
+ begin
+ x1.Free;
+ Memo2.Lines.Add('[Error] : Could not get data');
+ exit;
+ end;
+ x1.Free;
+ IFPS3DataToText(s, s2);
+ dwin.Memo1.Text := s2;
+ dwin.showmodal;
+ end
+ else
+ begin
+ Memo2.Lines.Add('Failed when compiling');
+ xpre.AdjustMessages(x1);
+ OutputMsgs;
+ x1.Free;
+ end;
+ finally
+ xPre.Free;
+ end;
+end;
+
+
+procedure TMainForm.CompilewithTimer1Click(Sender: TObject);
+var
+ Freq, Time1, Time2: Comp;
+begin
+ if not QueryPerformanceFrequency(TLargeInteger((@Freq)^)) then
+ begin
+ ShowMessage('Your computer does not support Performance Timers!');
+ exit;
+ end;
+ QueryPerformanceCounter(TLargeInteger((@Time1)^));
+ IgnoreRunline := True;
+ try
+ Compile1Click(nil);
+ except
+ end;
+ IgnoreRunline := False;
+ QueryPerformanceCounter(TLargeInteger((@Time2)^));
+ Memo2.Lines.Add('Time: ' + Sysutils.FloatToStr((Time2 - Time1) / Freq) +
+ ' sec');
+end;
+
+initialization
+ Imp := TPSRuntimeClassImporter.Create;
+ RIRegister_Std(Imp);
+ RIRegister_Classes(Imp, True);
+ RIRegister_Graphics(Imp, True);
+ RIRegister_Controls(Imp);
+ RIRegister_stdctrls(imp);
+ RIRegister_Forms(Imp);
+finalization
+ Imp.Free;
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/fortest.rops b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/fortest.rops
new file mode 100644
index 0000000..5695ff5
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/fortest.rops
@@ -0,0 +1,9 @@
+Program IFSTest;
+var
+ i: Longint;
+Begin
+ for i := 0 to 9 do
+ begin
+ writeln('hello'+inttostr(i));
+ end;
+End.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/if.rops b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/if.rops
new file mode 100644
index 0000000..0db351c
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/if.rops
@@ -0,0 +1,9 @@
+Program IFSTest;
+var
+ a: boolean;
+Begin
+ a := true;
+ if a then begin ;end else
+ if a then begin ;end else;
+ writeln('5');
+End.
\ No newline at end of file
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/iformtest.rops b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/iformtest.rops
new file mode 100644
index 0000000..e8e14ba
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/iformtest.rops
@@ -0,0 +1,104 @@
+Program IFSTest;
+var
+ F, Form: TForm;
+ Labl: TLabel;
+ Button: TButton;
+ Edit: TEdit;
+ Memo: TMemo;
+ Stop: Boolean;
+procedure MyOnCloseQuery(Sender: TObject; var CanClose: Boolean);
+begin
+ CanClose := Stop;
+end;
+procedure c2(sender: TObject);
+begin
+ f.Close;
+end;
+
+procedure buttonclick(sender: TObject);
+var
+ l: TLabel;
+ b: TButton;
+begin
+ if Length(Edit.Text) < 5 then
+ begin
+ f := TForm.Create(self);
+ f.Width := 100;
+ f.Height := 100;
+ f.Position := poScreenCenter;
+ f.BorderStyle := bsDialog;
+ f.Caption := 'Error';
+ l := TLabel.Create(F);
+ l.parent := f;
+ l.Left := 10;
+ l.Top := 10;
+ l.Width := 100;
+ l.Height := 50;
+ l.Caption := 'Invalid name';
+ b := TButton.Create(f);
+ b.parent := f;
+ b.Left:=10;
+ b.Top := 40;
+ b.Caption := 'OK';
+ b.Default := True;
+ b.Cancel := True;
+ b.OnClick := @C2;
+ f.Visible := True;
+ form.Visible := False;
+ while f.Visible do
+ begin
+ Application.HandleMessage;
+ end;
+ Form.Visible := True;
+ end else begin
+ writeln('debug:'+Edit.Text);
+ Stop := True;
+ Form.Close;
+ end;
+end;
+Begin
+ Form := TForm.Create(self);
+ Form.Width := 400;
+ Form.Height := 300;
+ Form.BorderStyle := bsDialog;
+ Form.BorderIcons := [];
+ Form.OnCloseQuery := @MyOnCloseQuery;
+ Form.Caption := 'Name';
+ Form.Position := poScreenCenter;
+ Labl := TLabel.Create(Form);
+ Labl.Top := 120;
+ Labl.Left := 160;
+ Labl.Caption := 'Please type in your name:';
+ Labl.Parent := Form;
+ Edit := TEdit.Create(Form);
+ Edit.Font.Name := 'Tahoma';
+ Edit.SetBounds(160,160,80,24);
+ Edit.Parent := Form;
+ Button := TButton.Create(Form);
+ Button.Left := 160;
+ Button.Top := 200;
+ Button.Width := 80;
+ Button.Height := 24;
+ Button.Caption := '&OK';
+ Button.OnClick := @buttonclick;
+ Button.Parent := Form;
+ Button.Default := True;
+ Memo := TMemo.Create(Form);
+ Memo.Left := 10;
+ Memo.Width := 380;
+ Memo.Top := 10;
+ Memo.Height := 100;
+ Memo.Text := 'Welcome to Form Test.'#13#10#13#10'Type here your name (min 5 letters). You can''t exit this demo without it.';
+ Memo.Color := 0;
+ Memo.Font.Color := $FFFFFF;
+ Memo.Parent := Form;
+ Memo.Readonly := True;
+ Form.Visible := true;
+ stop := false;
+ while Form.Visible do
+ begin
+ Application.HandleMessage;
+ end;
+ Button.Free;
+ Form.Free;
+End.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/importtest.rops b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/importtest.rops
new file mode 100644
index 0000000..7564c50
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/importtest.rops
@@ -0,0 +1,16 @@
+Program IFSTest;
+var
+ a,b :string;
+Begin
+ a := 'test: ';
+ b := ImportTest('1', 2, 3, 4, a);
+ writeln(b);
+ writeln(a);
+{
+Output should be:
+
+1 2 3 4 - OK!
+1 2 3 4 - OK! - OK2!
+
+}
+End.
\ No newline at end of file
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/longfortest.rops b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/longfortest.rops
new file mode 100644
index 0000000..94eece2
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/longfortest.rops
@@ -0,0 +1,10 @@
+Program IFSTest;
+var
+ i, i2: Longint;
+Begin
+ for i := 0 to 1000000 do
+ begin
+ i2 := i -1;
+ end;
+ writeln(inttostr(i2));
+End.
\ No newline at end of file
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/rectest.rops b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/rectest.rops
new file mode 100644
index 0000000..79efab7
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/rectest.rops
@@ -0,0 +1,11 @@
+Program IFSTest;
+type
+ TMyRec = record a: Integer; b: string; end;
+var
+ s: TMyRec;
+Begin
+ s.a := 1234;
+ s.b := 'abc';
+ writeln(s.b);
+ writeln(inttostr(s.a));
+End.
\ No newline at end of file
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/stringtest.rops b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/stringtest.rops
new file mode 100644
index 0000000..76b4372
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/stringtest.rops
@@ -0,0 +1,8 @@
+Program test;
+var s: string;
+begin
+s:='123456789';
+s[1]:=s[2];
+writeln(s);
+end.
+
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/t1.rops b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/t1.rops
new file mode 100644
index 0000000..07a4d54
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/t1.rops
@@ -0,0 +1,6 @@
+Program test;
+var
+ i: Longint;
+begin
+ writeln('Really simple test');
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/t10.rops b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/t10.rops
new file mode 100644
index 0000000..403890a
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/t10.rops
@@ -0,0 +1,12 @@
+Program test;
+begin
+ writeln('1');
+ try
+ writeln('2');
+ raiseexception(erCustomError, 'TEST EXCEPTION');
+ writeln('3');
+ finally
+ writeln('4');
+ end;
+ writeln('5');
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/t11.rops b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/t11.rops
new file mode 100644
index 0000000..fd3b929
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/t11.rops
@@ -0,0 +1,57 @@
+Program IFSTest;
+var
+ F, Form: TForm;
+ i: Longint;
+ Labl: TLabel;
+ Button: TButton;
+ Edit: TEdit;
+ Memo: TMemo;
+ Stop: Boolean;
+
+Begin
+ Form := TForm.Create(self);
+ Form.Width := 400;
+ Form.Height := 300;
+ Form.BorderStyle := bsDialog;
+ Form.BorderIcons := [];
+ Form.Caption := 'Name';
+ Form.Position := poScreenCenter;
+ Labl := TLabel.Create(Form);
+ Labl.Top := 120;
+ Labl.Left := 160;
+ Labl.Caption := 'Please type in your name:';
+ Labl.Parent := Form;
+ Edit := TEdit.Create(Form);
+ Edit.Font.Name := 'Tahoma';
+ Edit.SetBounds(160,160,80,24);
+ Edit.Parent := Form;
+ Button := TButton.Create(Form);
+ Button.Left := 160;
+ Button.Top := 200;
+ Button.Width := 80;
+ Button.Height := 24;
+ Button.Caption := '&OK';
+ Button.Parent := Form;
+ Button.Default := True;
+ Memo := TMemo.Create(Form);
+ Memo.Left := 10;
+ Memo.Width := 380;
+ Memo.Top := 10;
+ Memo.Height := 100;
+ Memo.Text := 'Welcome to Form Test.'#13#10#13#10'Plase wait till the loop is over.';
+ Memo.Color := 0;
+ Memo.Font.Color := $FFFFFF;
+ Memo.Parent := Form;
+ Memo.Readonly := True;
+ Form.Visible := true;
+ Form.Refresh;
+ stop := false;
+ while Form.Visible do
+ begin
+ Application.ProcessMessages;
+ i := i + 1;
+ if i > 100000 then Break;
+ end;
+ Button.Free;
+ Form.Free;
+End.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/t2.rops b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/t2.rops
new file mode 100644
index 0000000..7904b33
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/t2.rops
@@ -0,0 +1,6 @@
+Program test;
+var
+ i: Longint;
+begin
+ for i := 0 to 100000 do ;
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/t3.rops b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/t3.rops
new file mode 100644
index 0000000..2819850
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/t3.rops
@@ -0,0 +1,4 @@
+Program test;
+begin
+ writeln('test');
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/t4.rops b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/t4.rops
new file mode 100644
index 0000000..f622aa5
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/t4.rops
@@ -0,0 +1,8 @@
+Program test;
+var
+ s: string;
+begin
+ s := 'test';
+ s := s + 'TESTED';
+ writeln(s);
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/t5.rops b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/t5.rops
new file mode 100644
index 0000000..a3ddab9
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/t5.rops
@@ -0,0 +1,9 @@
+Program test;
+var
+ s: string;
+begin
+ Writeln('Your name?');
+ s := readln(s);
+ s := s + 'TESTED';
+ writeln(s);
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/t6.rops b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/t6.rops
new file mode 100644
index 0000000..17617c1
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/t6.rops
@@ -0,0 +1,22 @@
+Program IFSTest;
+type
+ TArrayOfByte = array of byte;
+
+procedure Test(x: TARrayOfByte);
+var
+ i: Integer;
+begin
+ for i := 0 to Getarraylength(X) -1 do
+ begin
+ writeln(inttostr(x[i]));
+ end;
+end;
+var
+ temp: TArrayOfByte;
+
+Begin
+ setarraylength(temp, 2);
+ temp[0] := 1;
+ temp[1] :=23;
+ test(temp);
+End.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/t7.rops b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/t7.rops
new file mode 100644
index 0000000..5f54b91
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/t7.rops
@@ -0,0 +1,7 @@
+Program test;
+var
+ r: TObject;
+begin
+ r := TObject.Create;
+ r.Free;
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/t8.rops b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/t8.rops
new file mode 100644
index 0000000..2d6e691
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/t8.rops
@@ -0,0 +1,16 @@
+Program test;
+var
+ r: TObject;
+begin
+ if r = nil then Writeln('(r = nil) = true') else Writeln('(r = nil) = false');
+ if r <> nil then Writeln('(r <> nil) = true') else Writeln('(r <> nil) = false');
+ r := TObject.Create;
+ if r = nil then Writeln('(r = nil) = true') else Writeln('(r = nil) = false');
+ if r <> nil then Writeln('(r <> nil) = true') else Writeln('(r <> nil) = false');
+ r.Free;
+ if r = nil then Writeln('(r = nil) = true') else Writeln('(r = nil) = false');
+ if r <> nil then Writeln('(r <> nil) = true') else Writeln('(r <> nil) = false');
+ r := nil;
+ if r = nil then Writeln('(r = nil) = true') else Writeln('(r = nil) = false');
+ if r <> nil then Writeln('(r <> nil) = true') else Writeln('(r <> nil) = false');
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/t9.rops b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/t9.rops
new file mode 100644
index 0000000..c4e54ce
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/t9.rops
@@ -0,0 +1,16 @@
+Program test;
+var
+ t: TObject;
+ i: IUnknown;
+begin
+ t := TObject.Create;
+ try
+ try
+ i := t;
+ except
+ writeln('Expected Exception: Interface not supported');
+ end;
+ finally
+ t.Free;
+ end;
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/testdefine.rops b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/testdefine.rops
new file mode 100644
index 0000000..718bd69
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/testdefine.rops
@@ -0,0 +1,10 @@
+{.$DEFINE ERROR}
+
+// Remove the . before the define to
+// cause an error in textinclude.rops
+
+{$I testinclude.rops}
+begin
+ testproc();
+ writeln('test');
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/testinclude.rops b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/testinclude.rops
new file mode 100644
index 0000000..c9ae677
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/testinclude.rops
@@ -0,0 +1,12 @@
+{
+ This file is part of a DEFINE / INCLUDE test. Use
+ testdefine.rops file to execute this file.
+}
+
+procedure TestProc;
+begin
+ Writeln('Test Proc Called');
+ {$IFDEF ERROR}
+ Error!
+ {$ENDIF}
+end;
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/vartype.rops b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/vartype.rops
new file mode 100644
index 0000000..89f21a9
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/vartype.rops
@@ -0,0 +1,14 @@
+Program IFSTest;
+var
+ e: variant;
+Begin
+ e := null;
+ case VarType(e) of
+varempty :writeln('unassigned');
+varNull: Writeln('null');
+varstring: Writeln('String');
+ varInteger : writeln('VarInteger');
+varSingle: Writeln('Single');
+varDouble: Writeln('Double');
+ end;
+End.
\ No newline at end of file
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/wordole.rops b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/wordole.rops
new file mode 100644
index 0000000..9c8612d
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Import/wordole.rops
@@ -0,0 +1,7 @@
+Program test;
+var
+ WordDoc: Variant;
+begin
+ WordDoc := CreateOleObject('Word.Application');
+ WordDoc.Visible := True;
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/Import.dpr b/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/Import.dpr
new file mode 100644
index 0000000..83a86d3
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/Import.dpr
@@ -0,0 +1,16 @@
+program Import;
+
+uses
+ QForms,
+ fMain in 'fMain.pas' {MainForm},
+ fDwin in 'fDwin.pas' {dwin};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TMainForm, MainForm);
+ Application.CreateForm(Tdwin, dwin);
+ Application.Run;
+end.
+
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/arraytest.rops b/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/arraytest.rops
new file mode 100644
index 0000000..314bb89
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/arraytest.rops
@@ -0,0 +1,22 @@
+Program IFSTest;
+type
+ TArrayOfByte = array of byte;
+
+procedure Test(x: TARrayOfByte);
+var
+ i: Integer;
+begin
+ for i := 0 to Getarraylength(X) -1 do
+ begin
+ writeln(inttostr(x[i]));
+ end;
+end;
+var
+ temp: TArrayOfByte;
+
+Begin
+ setarraylength(temp, 2);
+ temp[0] := 1;
+ temp[1] :=23;
+ test(temp);
+End.
\ No newline at end of file
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/booleantest.rops b/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/booleantest.rops
new file mode 100644
index 0000000..f09d50b
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/booleantest.rops
@@ -0,0 +1,15 @@
+Program IFSTest;
+var
+ x1, x2: integer;
+ b: boolean;
+Begin
+ x1 := 2;
+ x2 := 2;
+ b := x1 = x2;
+ if b then begin writeln('true'); end else begin writeln('false');end;
+ x1 := 2;
+ x2 := 4;
+ b := x1 = x2;
+ if b then begin writeln('true'); end else begin writeln('false');end;
+ writeln('done');
+End.
\ No newline at end of file
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/bytearray.rops b/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/bytearray.rops
new file mode 100644
index 0000000..d4cd198
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/bytearray.rops
@@ -0,0 +1,9 @@
+Program IFSTest;
+type
+ TByteArray = array of byte;
+var
+ x: TByteARray;
+Begin
+ x[0] := 1;
+ // will cause an runtime error (Out Of Record Fields Range)
+End.
\ No newline at end of file
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/casetest.rops b/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/casetest.rops
new file mode 100644
index 0000000..b45c335
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/casetest.rops
@@ -0,0 +1,12 @@
+Program IFSTest;
+var
+ b: Byte;
+Begin
+ for b := 0 to 2 do begin
+ case b of
+ 0: writeln('0');
+ 1: writeln('1');
+ else writeln('>1');
+ end;
+ end;
+End.
\ No newline at end of file
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/exittest.rops b/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/exittest.rops
new file mode 100644
index 0000000..682b825
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/exittest.rops
@@ -0,0 +1,14 @@
+Program IFSTest;
+procedure test;
+begin
+ writeln('1');
+ exit;
+ writeln('2');
+end;
+Begin
+ test;
+ writeln('3');
+ exit;
+ writeln('4');
+
+End.
\ No newline at end of file
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/fDwin.dfm b/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/fDwin.dfm
new file mode 100644
index 0000000..c34c1b0
Binary files /dev/null and b/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/fDwin.dfm differ
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/fDwin.pas b/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/fDwin.pas
new file mode 100644
index 0000000..12138dc
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/fDwin.pas
@@ -0,0 +1,27 @@
+unit fDwin;
+
+interface
+
+uses
+ SysUtils, Classes, QGraphics, QControls, QForms, QDialogs, QStdCtrls,
+ QExtCtrls;
+
+type
+ Tdwin = class(TForm)
+ Memo1: TMemo;
+ Panel1: TPanel;
+ Button1: TButton;
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ dwin: Tdwin;
+
+implementation
+
+{$R *.dfm}
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/fMain.dfm b/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/fMain.dfm
new file mode 100644
index 0000000..91fa017
Binary files /dev/null and b/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/fMain.dfm differ
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/fMain.pas b/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/fMain.pas
new file mode 100644
index 0000000..9da7ed7
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/fMain.pas
@@ -0,0 +1,330 @@
+unit fMain;
+
+interface
+
+uses
+ Classes, QGraphics, QControls, QForms, QDialogs,
+ uPSCompiler, uPSRuntime, uPSUtils, QMenus, QTypes, QStdCtrls, QExtCtrls;
+
+type
+ TMainForm = class(TForm)
+ Memo1: TMemo;
+ Memo2: TMemo;
+ Splitter1: TSplitter;
+ MainMenu1: TMainMenu;
+ Toosl1: TMenuItem;
+ Compile1: TMenuItem;
+ File1: TMenuItem;
+ Exit1: TMenuItem;
+ N1: TMenuItem;
+ SaveAs1: TMenuItem;
+ Save1: TMenuItem;
+ Open1: TMenuItem;
+ New1: TMenuItem;
+ OpenDialog1: TOpenDialog;
+ SaveDialog1: TSaveDialog;
+ N2: TMenuItem;
+ Stop1: TMenuItem;
+ N3: TMenuItem;
+ CompileandDisassemble1: TMenuItem;
+ procedure Compile1Click(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ procedure Exit1Click(Sender: TObject);
+ procedure New1Click(Sender: TObject);
+ procedure Open1Click(Sender: TObject);
+ procedure Save1Click(Sender: TObject);
+ procedure SaveAs1Click(Sender: TObject);
+ procedure Memo1Change(Sender: TObject);
+ procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
+ procedure Stop1Click(Sender: TObject);
+ procedure CompileandDisassemble1Click(Sender: TObject);
+ private
+ fn: string;
+ changed: Boolean;
+ function SaveTest: Boolean;
+ public
+ { Public declarations }
+ end;
+
+var
+ MainForm: TMainForm;
+
+implementation
+uses
+ fDwin, uPSDisassembly, uPSC_dll, uPSR_dll;
+{$R *.dfm}
+
+function MyOnUses(Sender: TIFPSPascalCompiler; const Name: string): Boolean;
+begin
+ if Name = 'SYSTEM' then
+ begin
+ TIFPSPascalCompiler(Sender).AddFunction('procedure Writeln(s: string);');
+ TIFPSPascalCompiler(Sender).AddFunction('function Readln(question: string): string;');
+ Sender.AddConstantN('NaN', 'extended').SetExtended(0.0 / 0.0);
+ Sender.AddConstantN('Infinity', 'extended').SetExtended(1.0 / 0.0);
+ Sender.AddConstantN('NegInfinity', 'extended').SetExtended(1.0 / 0.0);
+ Sender.AddDelphiFunction('function ImportTest(S1: string; s2: Longint; s3: Byte; s4: word; var s5: string): string;');
+ Result := True;
+ end
+ else
+ begin
+ TIFPSPascalCompiler(Sender).MakeError('', ecUnknownIdentifier, '');
+ Result := False;
+ end;
+end;
+
+function MyWriteln(Caller: TIFPSExec; p: TPSExternalProcRec; Global, Stack: TIFPSStack): Boolean;
+begin
+ MainForm.Memo2.Lines.Add(Stack.GetString(-1));
+ Result := True;
+end;
+
+function MyReadln(Caller: TIFPSExec; p: TPSExternalProcRec; Global, Stack: TIFPSStack): Boolean;
+begin
+ Stack.SetString(-1,InputBox(MainForm.Caption, Stack.GetString(-2), ''));
+ Result := True;
+end;
+
+function ImportTest(S1: string; s2: Longint; s3: Byte; s4: word; var s5: string): string;
+begin
+ Result := s1 + ' ' + IntToStr(s2) + ' ' + IntToStr(s3) + ' ' + IntToStr(s4) + ' - OK!';
+ S5 := s5 + ' '+ result + ' - OK2!';
+end;
+
+var
+ I: Integer;
+
+procedure RunLine(Sender: TIFPSExec);
+begin
+ i := (i + 1) mod 15;
+ if i = 0 then Application.ProcessMessages;
+end;
+
+function MyExportCheck(Sender: TIFPSPascalCompiler; Proc: TIFPSInternalProcedure; const ProcDecl: string): Boolean;
+begin
+ Result := TRue;
+end;
+
+
+procedure TMainForm.Compile1Click(Sender: TObject);
+var
+ x1: TIFPSPascalCompiler;
+ x2: TIFPSExec;
+ s: string;
+
+ procedure Outputtxt(const s: string);
+ begin
+ Memo2.Lines.Add(s);
+ end;
+
+ procedure OutputMsgs;
+ var
+ l: Longint;
+ b: Boolean;
+ begin
+ b := False;
+ for l := 0 to x1.MsgCount - 1 do
+ begin
+ Outputtxt(x1.Msg[l].MessageToString);
+ if (not b) and (x1.Msg[l] is TPSPascalCompilerError) then
+ begin
+ b := True;
+ Memo1.SelStart := X1.Msg[l].Pos;
+ end;
+ end;
+ end;
+begin
+ if tag <> 0 then exit;
+ Memo2.Clear;
+ x1 := TIFPSPascalCompiler.Create;
+ x1.OnExportCheck := MyExportCheck;
+ x1.OnUses := MyOnUses;
+ x1.OnExternalProc := DllExternalProc;
+ if x1.Compile(Memo1.Text) then
+ begin
+ Outputtxt('Succesfully compiled');
+ OutputMsgs;
+ if not x1.GetOutput(s) then
+ begin
+ x1.Free;
+ Outputtxt('[Error] : Could not get data');
+ exit;
+ end;
+ x1.Free;
+ x2 := TIFPSExec.Create;
+ RegisterDLLRuntime(x2);
+ tag := longint(x2);
+ if sender <> nil then
+ x2.OnRunLine := RunLine;
+ x2.RegisterFunctionName('WRITELN', MyWriteln, nil, nil);
+ x2.RegisterFunctionName('READLN', MyReadln, nil, nil);
+ x2.RegisterDelphiFunction(@importtest, 'IMPORTTEST', cdRegister);
+ if not x2.LoadData(s) then begin
+ Outputtxt('[Error] : Could not load data');
+ x2.Free;
+ exit;
+ end;
+ x2.RunScript;
+ if x2.ExceptionCode <> ENoError then
+ Outputtxt('[Runtime Error] : ' + TIFErrorToString(x2.ExceptionCode, x2.ExceptionString) +
+ ' in ' + IntToStr(x2.ExceptionProcNo) + ' at ' + IntToSTr(x2.ExceptionPos))
+ else
+ OutputTxt('Successfully executed');
+
+ tag := 0;
+ x2.Free;
+ end
+ else
+ begin
+ Outputtxt('Failed when compiling');
+ OutputMsgs;
+ x1.Free;
+ end;
+end;
+
+procedure TMainForm.FormCreate(Sender: TObject);
+begin
+ Caption := 'RemObjects Pascal Script';
+ fn := '';
+ changed := False;
+ Memo1.Lines.Text := 'Program ROTEST;'#13#10'Begin'#13#10'End.';
+end;
+
+
+procedure TMainForm.Exit1Click(Sender: TObject);
+begin
+ Close;
+end;
+
+procedure TMainForm.New1Click(Sender: TObject);
+begin
+ if not SaveTest then
+ exit;
+ Memo1.Lines.Text := 'Program ROTEST;'#13#10'Begin'#13#10'End.';
+ Memo2.Lines.Clear;
+ fn := '';
+end;
+
+function TMainForm.SaveTest: Boolean;
+begin
+ if changed then
+ begin
+ case MessageDlg('File is not saved, save now?', mtWarning, mbYesNoCancel, 0) of
+ mrYes:
+ begin
+ Save1Click(nil);
+ Result := not changed;
+ end;
+ mrNo: Result := True;
+ else
+ Result := False;
+ end;
+ end
+ else
+ Result := True;
+end;
+
+procedure TMainForm.Open1Click(Sender: TObject);
+begin
+ if not SaveTest then
+ exit;
+ if OpenDialog1.Execute then
+ begin
+ Memo1.Lines.LoadFromFile(OpenDialog1.FileName);
+ changed := False;
+ Memo2.Lines.Clear;
+ fn := OpenDialog1.FileName;
+ end;
+end;
+
+procedure TMainForm.Save1Click(Sender: TObject);
+begin
+ if fn = '' then
+ begin
+ Saveas1Click(nil);
+ end
+ else
+ begin
+ Memo1.Lines.SaveToFile(fn);
+ changed := False;
+ end;
+end;
+
+procedure TMainForm.SaveAs1Click(Sender: TObject);
+begin
+ SaveDialog1.FileName := '';
+ if SaveDialog1.Execute then
+ begin
+ fn := SaveDialog1.FileName;
+ Memo1.Lines.SaveToFile(fn);
+ changed := False;
+ end;
+end;
+
+procedure TMainForm.Memo1Change(Sender: TObject);
+begin
+ changed := True;
+end;
+
+procedure TMainForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
+begin
+ CanClose := SaveTest;
+end;
+
+procedure TMainForm.Stop1Click(Sender: TObject);
+begin
+ if tag <> 0 then
+ TIFPSExec(tag).Stop;
+end;
+
+procedure TMainForm.CompileandDisassemble1Click(Sender: TObject);
+var
+ x1: TIFPSPascalCompiler;
+ s, s2: string;
+
+ procedure OutputMsgs;
+ var
+ l: Longint;
+ b: Boolean;
+ begin
+ b := False;
+ for l := 0 to x1.MsgCount - 1 do
+ begin
+ Memo2.Lines.Add(x1.Msg[l].MessageToString);
+ if (not b) and (x1.Msg[l] is TPSPascalCompilerError) then
+ begin
+ b := True;
+ Memo1.SelStart := X1.Msg[l].Pos;
+ end;
+ end;
+ end;
+begin
+ if tag <> 0 then exit;
+ Memo2.Clear;
+ x1 := TIFPSPascalCompiler.Create;
+ x1.OnExternalProc := DllExternalProc;
+ x1.OnUses := MyOnUses;
+ if x1.Compile(Memo1.Text) then
+ begin
+ Memo2.Lines.Add('Successfully compiled');
+ OutputMsgs;
+ if not x1.GetOutput(s) then
+ begin
+ x1.Free;
+ Memo2.Lines.Add('[Error] : Could not get data');
+ exit;
+ end;
+ x1.Free;
+ IFPS3DataToText(s, s2);
+ dwin.Memo1.Text := s2;
+ dwin.showmodal;
+ end
+ else
+ begin
+ Memo2.Lines.Add('Failed when compiling');
+ OutputMsgs;
+ x1.Free;
+ end;
+end;
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/fortest.rops b/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/fortest.rops
new file mode 100644
index 0000000..5695ff5
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/fortest.rops
@@ -0,0 +1,9 @@
+Program IFSTest;
+var
+ i: Longint;
+Begin
+ for i := 0 to 9 do
+ begin
+ writeln('hello'+inttostr(i));
+ end;
+End.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/if.rops b/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/if.rops
new file mode 100644
index 0000000..0db351c
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/if.rops
@@ -0,0 +1,9 @@
+Program IFSTest;
+var
+ a: boolean;
+Begin
+ a := true;
+ if a then begin ;end else
+ if a then begin ;end else;
+ writeln('5');
+End.
\ No newline at end of file
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/importtest.rops b/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/importtest.rops
new file mode 100644
index 0000000..7564c50
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/importtest.rops
@@ -0,0 +1,16 @@
+Program IFSTest;
+var
+ a,b :string;
+Begin
+ a := 'test: ';
+ b := ImportTest('1', 2, 3, 4, a);
+ writeln(b);
+ writeln(a);
+{
+Output should be:
+
+1 2 3 4 - OK!
+1 2 3 4 - OK! - OK2!
+
+}
+End.
\ No newline at end of file
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/longfortest.rops b/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/longfortest.rops
new file mode 100644
index 0000000..94eece2
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/longfortest.rops
@@ -0,0 +1,10 @@
+Program IFSTest;
+var
+ i, i2: Longint;
+Begin
+ for i := 0 to 1000000 do
+ begin
+ i2 := i -1;
+ end;
+ writeln(inttostr(i2));
+End.
\ No newline at end of file
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/rectest.rops b/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/rectest.rops
new file mode 100644
index 0000000..79efab7
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/rectest.rops
@@ -0,0 +1,11 @@
+Program IFSTest;
+type
+ TMyRec = record a: Integer; b: string; end;
+var
+ s: TMyRec;
+Begin
+ s.a := 1234;
+ s.b := 'abc';
+ writeln(s.b);
+ writeln(inttostr(s.a));
+End.
\ No newline at end of file
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/vartype.rops b/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/vartype.rops
new file mode 100644
index 0000000..ad4e635
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/Kylix/vartype.rops
@@ -0,0 +1,14 @@
+Program IFSTest;
+var
+ e: variant;
+Begin
+ e := null;
+ case VarType(e) of
+varempty :writeln('unassigned');
+varNull: Writeln('null');
+varstring: Writeln('String');
+ varInteger : writeln('VarInteger');
+varSingle: Writeln('Single');
+varDouble: Writeln('Double');
+ end;
+End.
\ No newline at end of file
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/RemObjects SDK Client/MegaDemo.RODL b/official/5.0.30.691/Pascal Script for Delphi/Samples/RemObjects SDK Client/MegaDemo.RODL
new file mode 100644
index 0000000..1bcf01a
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/RemObjects SDK Client/MegaDemo.RODL
@@ -0,0 +1,109 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/RemObjects SDK Client/MegaDemo.rops b/official/5.0.30.691/Pascal Script for Delphi/Samples/RemObjects SDK Client/MegaDemo.rops
new file mode 100644
index 0000000..27545a6
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/RemObjects SDK Client/MegaDemo.rops
@@ -0,0 +1,91 @@
+var
+ Message: TROBINMessage;
+ Channel: TRoIndyHttpChannel;
+ Service: NewService;
+ s: string;
+ i1, i2, i3: Integer;
+
+procedure TestPerson;
+var
+ inp, outp: TPerson;
+begin
+ inp.FirstName := 'First_Name';
+ inp.FirstName := 'Last_Name';
+ inp.Age := 100;
+ inp.Sex := sxFemale;
+ Writeln('Calling TestPerson:');
+ Service.EchoPerson(inp, outp);
+ Writeln('Test Result: FirstName: '+outp.FirstName+
+ ' LastName: '+outp.LastName + ' Age: '+inttostr(outp.Age));
+ if inp.Sex = sxMale then
+ Writeln('Male')
+ else
+ Writeln('Female');
+end;
+
+procedure TestStringArray;
+var
+ Str, Str2: TStringArray;
+ i: Longint;
+ s: string;
+begin
+ Str := ['first', 'second', 'third', 'fourth', 'fifth'];
+ Writeln('Passing [''first'', ''second'', ''third'', ''fourth'', ''fifth''] to TestStringArray:');
+ str2 := Service.TestStringArray(str);
+ for i := 0 to GetArrayLength(str2) -1 do
+ S := s + str2[i]+' ';
+ Writeln('Result: '+s);
+end;
+
+procedure TestIntegerArray;
+var
+ Str, Str2: TIntegerArray;
+ i: Longint;
+ s: string;
+begin
+ Str := [12, 34, 45, 67, 89];
+ Writeln('Passing [12, 34, 45, 67, 89] to TestIntegerArray:');
+ str2 := Service.TestIntegerArray(str);
+ for i := 0 to GetArrayLength(str2) -1 do
+ S := s + inttostr(str2[i])+' ';
+ Writeln('Result: '+s);
+end;
+
+begin
+ Message := TROBINMessage.Create(nil);
+ Message.UseCompression := False;
+ Channel := TRoIndyHTTPChannel.Create(nil);
+ Channel.TargetURL := 'http://localhost:8099/BIN';
+ Service := NewService.Create(Message, Channel);
+ try
+ TestPerson;
+ Writeln('MegaDemo Test');
+ Writeln('First number:');
+ readln(s);
+ i1 := StrToInt(s);
+ Writeln('Second number:');
+ readln(s);
+ i2 := StrToInt(s);
+ i3 := Service.Sum(i1,i2);
+ writeln(inttostr(i1)+'+'+inttostr(i2)+' -> Server, Result:'+inttostr(i3));
+
+ Writeln('Server Time:'+DateToStr(Service.GetServerTime));
+
+ TestStringArray;
+ TestIntegerArray;
+
+ Writeln('Custom Object As String: '+Service.CustomObjectAsString);
+
+ try
+ Writeln('Trying to raise an exception:');
+ Service.RaiseError;
+ Writeln('Exception Failed');
+ except
+ Writeln('Exception: '+ExceptionToString(ExceptionType, ExceptionParam));
+ end;
+ finally
+ Service := nil;
+ channel.Free;
+ message.Free;
+ end;
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/RemObjects SDK Client/TestApplication.dpr b/official/5.0.30.691/Pascal Script for Delphi/Samples/RemObjects SDK Client/TestApplication.dpr
new file mode 100644
index 0000000..3108f9c
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/RemObjects SDK Client/TestApplication.dpr
@@ -0,0 +1,14 @@
+program TestApplication;
+
+uses
+ Forms,
+ fMain in 'fMain.pas' {Form1};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.Title := 'Test Application';
+ Application.CreateForm(TForm1, Form1);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/RemObjects SDK Client/TestApplication.res b/official/5.0.30.691/Pascal Script for Delphi/Samples/RemObjects SDK Client/TestApplication.res
new file mode 100644
index 0000000..67a114d
Binary files /dev/null and b/official/5.0.30.691/Pascal Script for Delphi/Samples/RemObjects SDK Client/TestApplication.res differ
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/RemObjects SDK Client/fMain.dfm b/official/5.0.30.691/Pascal Script for Delphi/Samples/RemObjects SDK Client/fMain.dfm
new file mode 100644
index 0000000..8e7ea80
Binary files /dev/null and b/official/5.0.30.691/Pascal Script for Delphi/Samples/RemObjects SDK Client/fMain.dfm differ
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/RemObjects SDK Client/fMain.pas b/official/5.0.30.691/Pascal Script for Delphi/Samples/RemObjects SDK Client/fMain.pas
new file mode 100644
index 0000000..c1aad1e
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/RemObjects SDK Client/fMain.pas
@@ -0,0 +1,174 @@
+unit fMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ ExtCtrls, StdCtrls, uPSComponent, uPSCompiler, Menus, uPSRuntime,
+ uROPSServerLink, uPSComponent_Default;
+
+type
+ TForm1 = class(TForm)
+ Memo1: TMemo;
+ Memo2: TMemo;
+ Splitter1: TSplitter;
+ PSScript: TPSScript;
+ PS3DllPlugin: TPSDllPlugin;
+ MainMenu1: TMainMenu;
+ Program1: TMenuItem;
+ Compile1: TMenuItem;
+ PS3RemObjectsPlugin1: TPSRemObjectsSdkPlugin;
+ OpenDialog1: TOpenDialog;
+ OpenDialog2: TOpenDialog;
+ N1: TMenuItem;
+ OpenScript1: TMenuItem;
+ OpenRODL1: TMenuItem;
+ PSImport_Classes1: TPSImport_Classes;
+ PSImport_DateUtils1: TPSImport_DateUtils;
+ procedure IFPS3ClassesPlugin1CompImport(Sender: TObject;
+ x: TPSPascalCompiler);
+ procedure IFPS3ClassesPlugin1ExecImport(Sender: TObject; Exec: TPSExec;
+ x: TPSRuntimeClassImporter);
+ procedure PSScriptCompile(Sender: TPSScript);
+ procedure Compile1Click(Sender: TObject);
+ procedure PSScriptExecute(Sender: TPSScript);
+ procedure OpenRODL1Click(Sender: TObject);
+ procedure OpenScript1Click(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ Form1: TForm1;
+
+implementation
+uses
+ uPSR_std,
+ uPSC_std,
+ uPSR_stdctrls,
+ uPSC_stdctrls,
+ uPSR_forms,
+ uPSC_forms,
+ uPSC_graphics,
+ uPSC_controls,
+ uPSC_classes,
+ uPSR_graphics,
+ uPSR_controls,
+ uPSR_classes;
+
+{$R *.DFM}
+
+procedure TForm1.IFPS3ClassesPlugin1CompImport(Sender: TObject;
+ x: TIFPSPascalcompiler);
+begin
+ SIRegister_Std(x);
+ SIRegister_Classes(x, true);
+ SIRegister_Graphics(x, true);
+ SIRegister_Controls(x);
+ SIRegister_stdctrls(x);
+ SIRegister_Forms(x);
+end;
+
+procedure TForm1.IFPS3ClassesPlugin1ExecImport(Sender: TObject; Exec: TIFPSExec;
+ x: TIFPSRuntimeClassImporter);
+begin
+ RIRegister_Std(x);
+ RIRegister_Classes(x, True);
+ RIRegister_Graphics(x, True);
+ RIRegister_Controls(x);
+ RIRegister_stdctrls(x);
+ RIRegister_Forms(x);
+end;
+
+function ImportTest(S1: string; s2: Longint; s3: Byte; s4: word; var s5: string): string;
+begin
+ Result := s1 + ' ' + IntToStr(s2) + ' ' + IntToStr(s3) + ' ' + IntToStr(s4) + ' - OK!';
+ S5 := s5 + ' '+ result + ' - OK2!';
+end;
+
+procedure MyWriteln(const s: string);
+begin
+ Form1.Memo2.Lines.Add(s);
+end;
+
+function MyReadln(const question: string): string;
+begin
+ Result := InputBox(question, '', '');
+end;
+
+procedure TForm1.PSScriptCompile(Sender: TPSScript);
+begin
+ Sender.AddFunction(@MyWriteln, 'procedure Writeln(s: string);');
+ Sender.AddFunction(@MyReadln, 'function Readln(question: string): string;');
+ Sender.AddFunction(@ImportTest, 'function ImportTest(S1: string; s2: Longint; s3: Byte; s4: word; var s5: string): string;');
+ Sender.AddRegisteredVariable('Application', 'TApplication');
+ Sender.AddRegisteredVariable('Self', 'TForm');
+ Sender.AddRegisteredVariable('Memo1', 'TMemo');
+ Sender.AddRegisteredVariable('Memo2', 'TMemo');
+end;
+
+procedure TForm1.Compile1Click(Sender: TObject);
+ procedure OutputMessages;
+ var
+ l: Longint;
+ b: Boolean;
+ begin
+ b := False;
+
+ for l := 0 to PSScript.CompilerMessageCount - 1 do
+ begin
+ Memo2.Lines.Add('Compiler: '+ PSScript.CompilerErrorToStr(l));
+ if (not b) and (PSScript.CompilerMessages[l] is TIFPSPascalCompilerError) then
+ begin
+ b := True;
+ Memo1.SelStart := PSScript.CompilerMessages[l].Pos;
+ end;
+ end;
+ end;
+begin
+ Memo2.Lines.Clear;
+ PSScript.Script.Assign(Memo1.Lines);
+ Memo2.Lines.Add('Compiling');
+ if PSScript.Compile then
+ begin
+ OutputMessages;
+ Memo2.Lines.Add('Compiled succesfully');
+ if not PSScript.Execute then
+ begin
+ Memo1.SelStart := PSScript.ExecErrorPosition;
+ Memo2.Lines.Add(PSScript.ExecErrorToString +' at '+Inttostr(PSScript.ExecErrorProcNo)+'.'+Inttostr(PSScript.ExecErrorByteCodePosition));
+ end else Memo2.Lines.Add('Succesfully executed');
+ end else
+ begin
+ OutputMessages;
+ Memo2.Lines.Add('Compiling failed');
+ end;
+end;
+
+procedure TForm1.PSScriptExecute(Sender: TPSScript);
+begin
+ PSScript.SetVarToInstance('APPLICATION', Application);
+ PSScript.SetVarToInstance('SELF', Self);
+ PSScript.SetVarToInstance('MEMO1', Memo1);
+ PSScript.SetVarToInstance('MEMO2', Memo2);
+end;
+
+procedure TForm1.OpenRODL1Click(Sender: TObject);
+begin
+ if OpenDialog2.Execute then
+ begin
+ PS3RemObjectsPlugin1.RODLLoadFromFile(OpenDialog2.FileName);
+ end;
+end;
+
+procedure TForm1.OpenScript1Click(Sender: TObject);
+begin
+ if OpenDialog1.Execute then
+ begin
+ Memo1.Lines.LoadFromFile(OpenDialog1.FileName);
+ end;
+end;
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/TestApp/TestApplication.dpr b/official/5.0.30.691/Pascal Script for Delphi/Samples/TestApp/TestApplication.dpr
new file mode 100644
index 0000000..3108f9c
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/TestApp/TestApplication.dpr
@@ -0,0 +1,14 @@
+program TestApplication;
+
+uses
+ Forms,
+ fMain in 'fMain.pas' {Form1};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.Title := 'Test Application';
+ Application.CreateForm(TForm1, Form1);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/TestApp/TestApplication.res b/official/5.0.30.691/Pascal Script for Delphi/Samples/TestApp/TestApplication.res
new file mode 100644
index 0000000..67a114d
Binary files /dev/null and b/official/5.0.30.691/Pascal Script for Delphi/Samples/TestApp/TestApplication.res differ
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/TestApp/fMain.dfm b/official/5.0.30.691/Pascal Script for Delphi/Samples/TestApp/fMain.dfm
new file mode 100644
index 0000000..86c520a
Binary files /dev/null and b/official/5.0.30.691/Pascal Script for Delphi/Samples/TestApp/fMain.dfm differ
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Samples/TestApp/fMain.pas b/official/5.0.30.691/Pascal Script for Delphi/Samples/TestApp/fMain.pas
new file mode 100644
index 0000000..a5b69fe
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Samples/TestApp/fMain.pas
@@ -0,0 +1,147 @@
+unit fMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ ExtCtrls, StdCtrls, uPSComponent, uPSCompiler, Menus, uPSRuntime;
+
+type
+ TForm1 = class(TForm)
+ Memo1: TMemo;
+ Memo2: TMemo;
+ Splitter1: TSplitter;
+ PSScript: TPSScript;
+ PS3DllPlugin: TPSDllPlugin;
+ MainMenu1: TMainMenu;
+ Program1: TMenuItem;
+ Compile1: TMenuItem;
+ procedure IFPS3ClassesPlugin1CompImport(Sender: TObject;
+ x: TPSPascalCompiler);
+ procedure IFPS3ClassesPlugin1ExecImport(Sender: TObject; Exec: TPSExec;
+ x: TPSRuntimeClassImporter);
+ procedure PSScriptCompile(Sender: TPSScript);
+ procedure Compile1Click(Sender: TObject);
+ procedure PSScriptExecute(Sender: TPSScript);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ Form1: TForm1;
+
+implementation
+uses
+ uPSR_std,
+ uPSC_std,
+ uPSR_stdctrls,
+ uPSC_stdctrls,
+ uPSR_forms,
+ uPSC_forms,
+ uPSC_graphics,
+ uPSC_controls,
+ uPSC_classes,
+ uPSR_graphics,
+ uPSR_controls,
+ uPSR_classes;
+
+{$R *.DFM}
+
+procedure TForm1.IFPS3ClassesPlugin1CompImport(Sender: TObject;
+ x: TIFPSPascalcompiler);
+begin
+ SIRegister_Std(x);
+ SIRegister_Classes(x, true);
+ SIRegister_Graphics(x, true);
+ SIRegister_Controls(x);
+ SIRegister_stdctrls(x);
+ SIRegister_Forms(x);
+end;
+
+procedure TForm1.IFPS3ClassesPlugin1ExecImport(Sender: TObject; Exec: TIFPSExec;
+ x: TIFPSRuntimeClassImporter);
+begin
+ RIRegister_Std(x);
+ RIRegister_Classes(x, True);
+ RIRegister_Graphics(x, True);
+ RIRegister_Controls(x);
+ RIRegister_stdctrls(x);
+ RIRegister_Forms(x);
+end;
+
+function ImportTest(S1: string; s2: Longint; s3: Byte; s4: word; var s5: string): string;
+begin
+ Result := s1 + ' ' + IntToStr(s2) + ' ' + IntToStr(s3) + ' ' + IntToStr(s4) + ' - OK!';
+ S5 := s5 + ' '+ result + ' - OK2!';
+end;
+
+procedure MyWriteln(const s: string);
+begin
+ Form1.Memo2.Lines.Add(s);
+end;
+
+function MyReadln(const question: string): string;
+begin
+ Result := InputBox(question, '', '');
+end;
+
+procedure TForm1.PSScriptCompile(Sender: TPSScript);
+begin
+ Sender.AddFunction(@MyWriteln, 'procedure Writeln(s: string);');
+ Sender.AddFunction(@MyReadln, 'function Readln(question: string): string;');
+ Sender.AddFunction(@ImportTest, 'function ImportTest(S1: string; s2: Longint; s3: Byte; s4: word; var s5: string): string;');
+ Sender.AddRegisteredVariable('Application', 'TApplication');
+ Sender.AddRegisteredVariable('Self', 'TForm');
+ Sender.AddRegisteredVariable('Memo1', 'TMemo');
+ Sender.AddRegisteredVariable('Memo2', 'TMemo');
+end;
+
+procedure TForm1.Compile1Click(Sender: TObject);
+ procedure OutputMessages;
+ var
+ l: Longint;
+ b: Boolean;
+ begin
+ b := False;
+
+ for l := 0 to PSScript.CompilerMessageCount - 1 do
+ begin
+ Memo2.Lines.Add('Compiler: '+ PSScript.CompilerErrorToStr(l));
+ if (not b) and (PSScript.CompilerMessages[l] is TIFPSPascalCompilerError) then
+ begin
+ b := True;
+ Memo1.SelStart := PSScript.CompilerMessages[l].Pos;
+ end;
+ end;
+ end;
+begin
+ Memo2.Lines.Clear;
+ PSScript.Script.Assign(Memo1.Lines);
+ Memo2.Lines.Add('Compiling');
+ if PSScript.Compile then
+ begin
+ OutputMessages;
+ Memo2.Lines.Add('Compiled succesfully');
+ if not PSScript.Execute then
+ begin
+ Memo1.SelStart := PSScript.ExecErrorPosition;
+ Memo2.Lines.Add(PSScript.ExecErrorToString +' at '+Inttostr(PSScript.ExecErrorProcNo)+'.'+Inttostr(PSScript.ExecErrorByteCodePosition));
+ end else Memo2.Lines.Add('Succesfully executed');
+ end else
+ begin
+ OutputMessages;
+ Memo2.Lines.Add('Compiling failed');
+ end;
+end;
+
+procedure TForm1.PSScriptExecute(Sender: TPSScript);
+begin
+ PSScript.SetVarToInstance('APPLICATION', Application);
+ PSScript.SetVarToInstance('SELF', Self);
+ PSScript.SetVarToInstance('MEMO1', Memo1);
+ PSScript.SetVarToInstance('MEMO2', Memo2);
+end;
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/BuildPackages_D10.bdsgroup b/official/5.0.30.691/Pascal Script for Delphi/Source/BuildPackages_D10.bdsgroup
new file mode 100644
index 0000000..2f606c0
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/BuildPackages_D10.bdsgroup
@@ -0,0 +1,23 @@
+
+
+
+
+ Default.Personality
+
+ 1.0
+ {1AAFA68F-D7AE-44BA-927F-310105A7A640}
+
+
+
+
+
+
+
+ PascalScript_Core_D10.bdsproj
+ PascalScript_RO_D10.bdsproj
+ PascalScript_Core_D10.bpl PascalScript_RO_D10.bpl
+
+
+
+
+
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/BuildPackages_D11.groupproj b/official/5.0.30.691/Pascal Script for Delphi/Source/BuildPackages_D11.groupproj
new file mode 100644
index 0000000..8bf0c0a
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/BuildPackages_D11.groupproj
@@ -0,0 +1,44 @@
+
+
+ {301d154e-a852-4e08-89a3-6bfb2774fb38}
+
+
+
+
+
+
+
+ Default.Personality
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/BuildPackages_D6.bpg b/official/5.0.30.691/Pascal Script for Delphi/Source/BuildPackages_D6.bpg
new file mode 100644
index 0000000..3fe0ddd
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/BuildPackages_D6.bpg
@@ -0,0 +1,23 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = PascalScript_Core_D6.bpl PascalScript_RO_D6.bpl
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+PascalScript_Core_D6.bpl: PascalScript_Core_D6.dpk
+ $(DCC)
+
+PascalScript_RO_D6.bpl: PascalScript_RO_D6.dpk
+ $(DCC)
+
+
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/BuildPackages_D7.bpg b/official/5.0.30.691/Pascal Script for Delphi/Source/BuildPackages_D7.bpg
new file mode 100644
index 0000000..8e45715
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/BuildPackages_D7.bpg
@@ -0,0 +1,23 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = PascalScript_Core_D7.bpl PascalScript_RO_D7.bpl
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+PascalScript_Core_D7.bpl: PascalScript_Core_D7.dpk
+ $(DCC)
+
+PascalScript_RO_D7.bpl: PascalScript_RO_D7.dpk
+ $(DCC)
+
+
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript.inc b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript.inc
new file mode 100644
index 0000000..f2bb88f
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript.inc
@@ -0,0 +1,66 @@
+{----------------------------------------------------------------------------}
+{ RemObjects Pascal Script }
+{ }
+{ compiler: Delphi 2 and up, Kylix 3 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{----------------------------------------------------------------------------}
+
+
+{$INCLUDE eDefines.inc}
+
+{$IFDEF FPC}{$H+}{$MODE DELPHI}{$ENDIF}
+
+{$IFDEF VER125}{C4}{$B-}{$X+}{$T-}{$H+}{$ENDIF}
+{$IFDEF VER110}{C3}{$B-}{$X+}{$T-}{$H+}{$ENDIF}
+{$IFDEF VER93}{C1}{$B-}{$X+}{$T-}{$H+}{$ENDIF}
+
+{$IFDEF DELPHI4UP}
+ {$DEFINE PS_HAVEVARIANT}
+ {$DEFINE PS_DYNARRAY}
+{$ENDIF}
+
+{$IFNDEF FPC}
+ {$B-}{$X+}{$T-}{$H+}
+{$ELSE}
+ {$R-}{$Q-}
+{$ENDIF}
+
+{$IFNDEF FPC}
+{$IFNDEF DELPHI4UP}
+{$IFNDEF LINUX}
+ {$DEFINE PS_NOINT64}
+{$ENDIF}
+{$ENDIF}
+
+{$IFDEF DELPHI2}
+ {$DEFINE PS_NOINT64}
+ {$DEFINE PS_NOWIDESTRING}
+ {$B-}{$X+}{$T-}{$H+}
+{$ENDIF}
+
+{$IFDEF LINUX}{KYLIX}{$DEFINE CLX}{$DEFINE DELPHI3UP}{$DEFINE DELPHI6UP}{$ENDIF}
+{$ENDIF}
+{$R-}{$Q-}
+
+
+{
+Defines:
+ IFPS3_NOSMARTLIST - Don't use the smart list option
+}
+
+{$UNDEF DEBUG}
+
+{$IFDEF CLX}
+{$DEFINE PS_NOIDISPATCH} // not implemented
+{$ENDIF}
+
+{$IFDEF FPC}
+ {$DEFINE PS_HAVEVARIANT}
+ {$DEFINE PS_DYNARRAY}
+ {$DEFINE PS_NOIDISPATCH}
+ {$DEFINE DELPHI3UP}
+ {$DEFINE DELPHI6UP}
+{$ENDIF}
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D10.bdsproj b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D10.bdsproj
new file mode 100644
index 0000000..c4f76de
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D10.bdsproj
@@ -0,0 +1,181 @@
+
+
+
+
+ Delphi.Personality
+
+ 1.0
+ {7803B416-C1B3-4801-BCDB-CB1C64840119}
+
+
+
+
+ PascalScript_Core_D10.dpk
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 1
+ 1
+ 1
+ 1
+ True
+ True
+
+
+ False
+
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+ RemObjects Pascal Script - Core Package
+ False
+
+
+
+ ..\Dcu\D10
+ ..\Dcu\D10
+ ..\Dcu\D10
+ ..\Dcu\D10
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ 0
+ 3
+ 0
+ 30
+ 691
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1033
+ 1252
+
+
+ RemObjects Software
+
+ 3.0.30.691
+
+
+
+
+ Pascal Script
+ 3.0.0.0
+ Tuesday, March 21, 2006 1:32 PM
+ Monday, February 28, 2005 3:33 PM
+
+
+
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D10.cfg b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D10.cfg
new file mode 100644
index 0000000..a58e901
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D10.cfg
@@ -0,0 +1,51 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W+
+-$X+
+-$YD
+-$Z1
+-cg
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N0"..\Dcu\D10"
+-LE"..\Dcu\D10"
+-LN"..\Dcu\D10"
+-U"..\Dcu\D10"
+-O"..\Dcu\D10"
+-I"..\Dcu\D10"
+-R"..\Dcu\D10"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-SYMBOL_EXPERIMENTAL
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNIT_EXPERIMENTAL
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D10.dpk b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D10.dpk
new file mode 100644
index 0000000..27aaec8
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D10.dpk
@@ -0,0 +1,76 @@
+package PascalScript_Core_D10;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Pascal Script - Core Package'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl;
+
+contains
+ uPSC_extctrls in 'uPSC_extctrls.pas',
+ uPSC_forms in 'uPSC_forms.pas',
+ uPSC_graphics in 'uPSC_graphics.pas',
+ uPSC_menus in 'uPSC_menus.pas',
+ uPSC_std in 'uPSC_std.pas',
+ uPSC_stdctrls in 'uPSC_stdctrls.pas',
+ uPSCompiler in 'uPSCompiler.pas',
+ uPSComponent in 'uPSComponent.pas',
+ uPSComponent_COM in 'uPSComponent_COM.pas',
+ uPSComponent_Controls in 'uPSComponent_Controls.pas',
+ uPSComponent_DB in 'uPSComponent_DB.pas',
+ uPSComponent_Default in 'uPSComponent_Default.pas',
+ uPSComponent_Forms in 'uPSComponent_Forms.pas',
+ uPSComponent_StdCtrls in 'uPSComponent_StdCtrls.pas',
+ uPSDebugger in 'uPSDebugger.pas',
+ uPSDisassembly in 'uPSDisassembly.pas',
+ uPSPreProcessor in 'uPSPreProcessor.pas',
+ uPSR_buttons in 'uPSR_buttons.pas',
+ uPSR_classes in 'uPSR_classes.pas',
+ uPSR_comobj in 'uPSR_comobj.pas',
+ uPSR_controls in 'uPSR_controls.pas',
+ uPSR_dateutils in 'uPSR_dateutils.pas',
+ uPSR_DB in 'uPSR_DB.pas',
+ uPSR_dll in 'uPSR_dll.pas',
+ uPSR_extctrls in 'uPSR_extctrls.pas',
+ uPSR_forms in 'uPSR_forms.pas',
+ uPSR_graphics in 'uPSR_graphics.pas',
+ uPSR_menus in 'uPSR_menus.pas',
+ uPSR_std in 'uPSR_std.pas',
+ uPSR_stdctrls in 'uPSR_stdctrls.pas',
+ uPSRuntime in 'uPSRuntime.pas',
+ uPSUtils in 'uPSUtils.pas',
+ uPSC_buttons in 'uPSC_buttons.pas',
+ uPSC_classes in 'uPSC_classes.pas',
+ uPSC_comobj in 'uPSC_comobj.pas',
+ uPSC_controls in 'uPSC_controls.pas',
+ uPSC_dateutils in 'uPSC_dateutils.pas',
+ uPSC_DB in 'uPSC_DB.pas',
+ uPSC_dll in 'uPSC_dll.pas',
+ PascalScript_Core_Reg in 'PascalScript_Core_Reg.pas';
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D10.res b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D10.res
new file mode 100644
index 0000000..b0d3f6d
Binary files /dev/null and b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D10.res differ
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D11.dpk b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D11.dpk
new file mode 100644
index 0000000..b76593c
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D11.dpk
@@ -0,0 +1,76 @@
+package PascalScript_Core_D11;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Pascal Script - Core Package'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl;
+
+contains
+ uPSC_extctrls in 'uPSC_extctrls.pas',
+ uPSC_forms in 'uPSC_forms.pas',
+ uPSC_graphics in 'uPSC_graphics.pas',
+ uPSC_menus in 'uPSC_menus.pas',
+ uPSC_std in 'uPSC_std.pas',
+ uPSC_stdctrls in 'uPSC_stdctrls.pas',
+ uPSCompiler in 'uPSCompiler.pas',
+ uPSComponent in 'uPSComponent.pas',
+ uPSComponent_COM in 'uPSComponent_COM.pas',
+ uPSComponent_Controls in 'uPSComponent_Controls.pas',
+ uPSComponent_DB in 'uPSComponent_DB.pas',
+ uPSComponent_Default in 'uPSComponent_Default.pas',
+ uPSComponent_Forms in 'uPSComponent_Forms.pas',
+ uPSComponent_StdCtrls in 'uPSComponent_StdCtrls.pas',
+ uPSDebugger in 'uPSDebugger.pas',
+ uPSDisassembly in 'uPSDisassembly.pas',
+ uPSPreProcessor in 'uPSPreProcessor.pas',
+ uPSR_buttons in 'uPSR_buttons.pas',
+ uPSR_classes in 'uPSR_classes.pas',
+ uPSR_comobj in 'uPSR_comobj.pas',
+ uPSR_controls in 'uPSR_controls.pas',
+ uPSR_dateutils in 'uPSR_dateutils.pas',
+ uPSR_DB in 'uPSR_DB.pas',
+ uPSR_dll in 'uPSR_dll.pas',
+ uPSR_extctrls in 'uPSR_extctrls.pas',
+ uPSR_forms in 'uPSR_forms.pas',
+ uPSR_graphics in 'uPSR_graphics.pas',
+ uPSR_menus in 'uPSR_menus.pas',
+ uPSR_std in 'uPSR_std.pas',
+ uPSR_stdctrls in 'uPSR_stdctrls.pas',
+ uPSRuntime in 'uPSRuntime.pas',
+ uPSUtils in 'uPSUtils.pas',
+ uPSC_buttons in 'uPSC_buttons.pas',
+ uPSC_classes in 'uPSC_classes.pas',
+ uPSC_comobj in 'uPSC_comobj.pas',
+ uPSC_controls in 'uPSC_controls.pas',
+ uPSC_dateutils in 'uPSC_dateutils.pas',
+ uPSC_DB in 'uPSC_DB.pas',
+ uPSC_dll in 'uPSC_dll.pas',
+ PascalScript_Core_Reg in 'PascalScript_Core_Reg.pas';
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D11.dproj b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D11.dproj
new file mode 100644
index 0000000..21bb58a
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D11.dproj
@@ -0,0 +1,112 @@
+
+
+
+ {634be604-b73a-4b3d-bc81-719c905199e6}
+ PascalScript_Core_D11.dpk
+ Debug
+ AnyCPU
+ DCC32
+ ..\Dcu\D11\PascalScript_Core_D11.bpl
+
+
+ 7.0
+ False
+ False
+ True
+ 0
+ ..\Dcu\D10
+ ..\Dcu\D10
+ ..\Dcu\D10
+ ..\Dcu\D10
+ ..\Dcu\D10
+ ..\Dcu\D10
+ ..\Dcu\D10
+ ..\Dcu\D10
+ ..\Dcu\D10
+ RELEASE
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ 7.0
+ True
+ ..\Dcu\D11
+ ..\Dcu\D11
+ ..\Dcu\D11
+ ..\Dcu\D11
+ ..\Dcu\D11
+ ..\Dcu\D11
+ ..\Dcu\D11
+ ..\Dcu\D11
+ ..\Dcu\D11
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ Delphi.Personality
+ Package
+
+ False True False RemObjects Pascal Script - Core Package False True False True False 3 0 6 442 False False False False False 1033 1252 RemObjects Software 3.0.6.442 Pascal Script 3.0.0.0 Tuesday, March 21, 2006 1:32 PM Monday, February 28, 2005 3:33 PM PascalScript_Core_D11.dpk
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D11.res b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D11.res
new file mode 100644
index 0000000..b0d3f6d
Binary files /dev/null and b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D11.res differ
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D3.dof b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D3.dof
new file mode 100644
index 0000000..a71ae03
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D3.dof
@@ -0,0 +1,115 @@
+[FileVersion]
+Version=3.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=1
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=RemObjects Pascal Script - Core Package
+
+[Directories]
+OutputDir=s:\exe
+UnitOutputDir=..\Dcu\D3
+PackageDLLOutputDir=..\Dcu\D3
+PackageDCPOutputDir=..\Dcu\D3
+SearchPath=
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+ProductName=Pascal Script
+ProductVersion=3.0.0.0
+FileDescription=
+FileVersion=3.0.2.34
+OriginalFilename=
+
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D3.dpk b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D3.dpk
new file mode 100644
index 0000000..6fa0e11
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D3.dpk
@@ -0,0 +1,76 @@
+package PascalScript_Core_D3;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Pascal Script - Core Package'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl;
+
+contains
+ uPSC_extctrls in 'uPSC_extctrls.pas',
+ uPSC_forms in 'uPSC_forms.pas',
+ uPSC_graphics in 'uPSC_graphics.pas',
+ uPSC_menus in 'uPSC_menus.pas',
+ uPSC_std in 'uPSC_std.pas',
+ uPSC_stdctrls in 'uPSC_stdctrls.pas',
+ uPSCompiler in 'uPSCompiler.pas',
+ uPSComponent in 'uPSComponent.pas',
+ uPSComponent_COM in 'uPSComponent_COM.pas',
+ uPSComponent_Controls in 'uPSComponent_Controls.pas',
+ uPSComponent_DB in 'uPSComponent_DB.pas',
+ uPSComponent_Default in 'uPSComponent_Default.pas',
+ uPSComponent_Forms in 'uPSComponent_Forms.pas',
+ uPSComponent_StdCtrls in 'uPSComponent_StdCtrls.pas',
+ uPSDebugger in 'uPSDebugger.pas',
+ uPSDisassembly in 'uPSDisassembly.pas',
+ uPSPreProcessor in 'uPSPreProcessor.pas',
+ uPSR_buttons in 'uPSR_buttons.pas',
+ uPSR_classes in 'uPSR_classes.pas',
+ uPSR_comobj in 'uPSR_comobj.pas',
+ uPSR_controls in 'uPSR_controls.pas',
+ uPSR_dateutils in 'uPSR_dateutils.pas',
+ uPSR_DB in 'uPSR_DB.pas',
+ uPSR_dll in 'uPSR_dll.pas',
+ uPSR_extctrls in 'uPSR_extctrls.pas',
+ uPSR_forms in 'uPSR_forms.pas',
+ uPSR_graphics in 'uPSR_graphics.pas',
+ uPSR_menus in 'uPSR_menus.pas',
+ uPSR_std in 'uPSR_std.pas',
+ uPSR_stdctrls in 'uPSR_stdctrls.pas',
+ uPSRuntime in 'uPSRuntime.pas',
+ uPSUtils in 'uPSUtils.pas',
+ uPSC_buttons in 'uPSC_buttons.pas',
+ uPSC_classes in 'uPSC_classes.pas',
+ uPSC_comobj in 'uPSC_comobj.pas',
+ uPSC_controls in 'uPSC_controls.pas',
+ uPSC_dateutils in 'uPSC_dateutils.pas',
+ uPSC_DB in 'uPSC_DB.pas',
+ uPSC_dll in 'uPSC_dll.pas',
+ PascalScript_Core_Reg in 'PascalScript_Core_Reg.pas';
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D4.dof b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D4.dof
new file mode 100644
index 0000000..735a460
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D4.dof
@@ -0,0 +1,114 @@
+[FileVersion]
+Version=4.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=1
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=RemObjects Pascal Script - Core Package
+
+[Directories]
+UnitOutputDir=..\Dcu\D4
+PackageDLLOutputDir=..\Dcu\D4
+PackageDCPOutputDir=..\Dcu\D4
+SearchPath=
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+ProductName=Pascal Script
+ProductVersion=3.0.0.0
+FileDescription=
+FileVersion=3.0.2.34
+OriginalFilename=
+
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D4.dpk b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D4.dpk
new file mode 100644
index 0000000..d300a0e
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D4.dpk
@@ -0,0 +1,76 @@
+package PascalScript_Core_D4
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Pascal Script - Core Package'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl;
+
+contains
+ uPSC_extctrls in 'uPSC_extctrls.pas',
+ uPSC_forms in 'uPSC_forms.pas',
+ uPSC_graphics in 'uPSC_graphics.pas',
+ uPSC_menus in 'uPSC_menus.pas',
+ uPSC_std in 'uPSC_std.pas',
+ uPSC_stdctrls in 'uPSC_stdctrls.pas',
+ uPSCompiler in 'uPSCompiler.pas',
+ uPSComponent in 'uPSComponent.pas',
+ uPSComponent_COM in 'uPSComponent_COM.pas',
+ uPSComponent_Controls in 'uPSComponent_Controls.pas',
+ uPSComponent_DB in 'uPSComponent_DB.pas',
+ uPSComponent_Default in 'uPSComponent_Default.pas',
+ uPSComponent_Forms in 'uPSComponent_Forms.pas',
+ uPSComponent_StdCtrls in 'uPSComponent_StdCtrls.pas',
+ uPSDebugger in 'uPSDebugger.pas',
+ uPSDisassembly in 'uPSDisassembly.pas',
+ uPSPreProcessor in 'uPSPreProcessor.pas',
+ uPSR_buttons in 'uPSR_buttons.pas',
+ uPSR_classes in 'uPSR_classes.pas',
+ uPSR_comobj in 'uPSR_comobj.pas',
+ uPSR_controls in 'uPSR_controls.pas',
+ uPSR_dateutils in 'uPSR_dateutils.pas',
+ uPSR_DB in 'uPSR_DB.pas',
+ uPSR_dll in 'uPSR_dll.pas',
+ uPSR_extctrls in 'uPSR_extctrls.pas',
+ uPSR_forms in 'uPSR_forms.pas',
+ uPSR_graphics in 'uPSR_graphics.pas',
+ uPSR_menus in 'uPSR_menus.pas',
+ uPSR_std in 'uPSR_std.pas',
+ uPSR_stdctrls in 'uPSR_stdctrls.pas',
+ uPSRuntime in 'uPSRuntime.pas',
+ uPSUtils in 'uPSUtils.pas',
+ uPSC_buttons in 'uPSC_buttons.pas',
+ uPSC_classes in 'uPSC_classes.pas',
+ uPSC_comobj in 'uPSC_comobj.pas',
+ uPSC_controls in 'uPSC_controls.pas',
+ uPSC_dateutils in 'uPSC_dateutils.pas',
+ uPSC_DB in 'uPSC_DB.pas',
+ uPSC_dll in 'uPSC_dll.pas',
+ PascalScript_Core_Reg in 'PascalScript_Core_Reg.pas';
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D5.dof b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D5.dof
new file mode 100644
index 0000000..5b2a54e
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D5.dof
@@ -0,0 +1,114 @@
+[FileVersion]
+Version=5.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=1
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=RemObjects Pascal Script - Core Package
+
+[Directories]
+UnitOutputDir=..\Dcu\D5
+PackageDLLOutputDir=..\Dcu\D5
+PackageDCPOutputDir=..\Dcu\D5
+SearchPath=
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+ProductName=Pascal Script
+ProductVersion=3.0.0.0
+FileDescription=
+FileVersion=3.0.2.34
+OriginalFilename=
+
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D5.dpk b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D5.dpk
new file mode 100644
index 0000000..6c09f9a
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D5.dpk
@@ -0,0 +1,76 @@
+package PascalScript_Core_D5;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Pascal Script - Core Package'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl;
+
+contains
+ uPSC_extctrls in 'uPSC_extctrls.pas',
+ uPSC_forms in 'uPSC_forms.pas',
+ uPSC_graphics in 'uPSC_graphics.pas',
+ uPSC_menus in 'uPSC_menus.pas',
+ uPSC_std in 'uPSC_std.pas',
+ uPSC_stdctrls in 'uPSC_stdctrls.pas',
+ uPSCompiler in 'uPSCompiler.pas',
+ uPSComponent in 'uPSComponent.pas',
+ uPSComponent_COM in 'uPSComponent_COM.pas',
+ uPSComponent_Controls in 'uPSComponent_Controls.pas',
+ uPSComponent_DB in 'uPSComponent_DB.pas',
+ uPSComponent_Default in 'uPSComponent_Default.pas',
+ uPSComponent_Forms in 'uPSComponent_Forms.pas',
+ uPSComponent_StdCtrls in 'uPSComponent_StdCtrls.pas',
+ uPSDebugger in 'uPSDebugger.pas',
+ uPSDisassembly in 'uPSDisassembly.pas',
+ uPSPreProcessor in 'uPSPreProcessor.pas',
+ uPSR_buttons in 'uPSR_buttons.pas',
+ uPSR_classes in 'uPSR_classes.pas',
+ uPSR_comobj in 'uPSR_comobj.pas',
+ uPSR_controls in 'uPSR_controls.pas',
+ uPSR_dateutils in 'uPSR_dateutils.pas',
+ uPSR_DB in 'uPSR_DB.pas',
+ uPSR_dll in 'uPSR_dll.pas',
+ uPSR_extctrls in 'uPSR_extctrls.pas',
+ uPSR_forms in 'uPSR_forms.pas',
+ uPSR_graphics in 'uPSR_graphics.pas',
+ uPSR_menus in 'uPSR_menus.pas',
+ uPSR_std in 'uPSR_std.pas',
+ uPSR_stdctrls in 'uPSR_stdctrls.pas',
+ uPSRuntime in 'uPSRuntime.pas',
+ uPSUtils in 'uPSUtils.pas',
+ uPSC_buttons in 'uPSC_buttons.pas',
+ uPSC_classes in 'uPSC_classes.pas',
+ uPSC_comobj in 'uPSC_comobj.pas',
+ uPSC_controls in 'uPSC_controls.pas',
+ uPSC_dateutils in 'uPSC_dateutils.pas',
+ uPSC_DB in 'uPSC_DB.pas',
+ uPSC_dll in 'uPSC_dll.pas',
+ PascalScript_Core_Reg in 'PascalScript_Core_Reg.pas';
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D6.dof b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D6.dof
new file mode 100644
index 0000000..0d66647
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D6.dof
@@ -0,0 +1,119 @@
+[FileVersion]
+Version=6.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=1
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=RemObjects Pascal Script - Core Package
+
+[Directories]
+UnitOutputDir=..\Dcu\D6
+PackageDLLOutputDir=..\Dcu\D6
+PackageDCPOutputDir=..\Dcu\D6
+SearchPath=
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+ProductName=Pascal Script
+ProductVersion=3.0.0.0
+FileDescription=
+FileVersion=3.0.30.691
+OriginalFilename=
+
+[Version Info]
+MajorVer=3
+MinorVer=0
+Release=30
+Build=691
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D6.dpk b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D6.dpk
new file mode 100644
index 0000000..4bf9c7b
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D6.dpk
@@ -0,0 +1,76 @@
+package PascalScript_Core_D6;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Pascal Script - Core Package'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl;
+
+contains
+ uPSC_extctrls in 'uPSC_extctrls.pas',
+ uPSC_forms in 'uPSC_forms.pas',
+ uPSC_graphics in 'uPSC_graphics.pas',
+ uPSC_menus in 'uPSC_menus.pas',
+ uPSC_std in 'uPSC_std.pas',
+ uPSC_stdctrls in 'uPSC_stdctrls.pas',
+ uPSCompiler in 'uPSCompiler.pas',
+ uPSComponent in 'uPSComponent.pas',
+ uPSComponent_COM in 'uPSComponent_COM.pas',
+ uPSComponent_Controls in 'uPSComponent_Controls.pas',
+ uPSComponent_DB in 'uPSComponent_DB.pas',
+ uPSComponent_Default in 'uPSComponent_Default.pas',
+ uPSComponent_Forms in 'uPSComponent_Forms.pas',
+ uPSComponent_StdCtrls in 'uPSComponent_StdCtrls.pas',
+ uPSDebugger in 'uPSDebugger.pas',
+ uPSDisassembly in 'uPSDisassembly.pas',
+ uPSPreProcessor in 'uPSPreProcessor.pas',
+ uPSR_buttons in 'uPSR_buttons.pas',
+ uPSR_classes in 'uPSR_classes.pas',
+ uPSR_comobj in 'uPSR_comobj.pas',
+ uPSR_controls in 'uPSR_controls.pas',
+ uPSR_dateutils in 'uPSR_dateutils.pas',
+ uPSR_DB in 'uPSR_DB.pas',
+ uPSR_dll in 'uPSR_dll.pas',
+ uPSR_extctrls in 'uPSR_extctrls.pas',
+ uPSR_forms in 'uPSR_forms.pas',
+ uPSR_graphics in 'uPSR_graphics.pas',
+ uPSR_menus in 'uPSR_menus.pas',
+ uPSR_std in 'uPSR_std.pas',
+ uPSR_stdctrls in 'uPSR_stdctrls.pas',
+ uPSRuntime in 'uPSRuntime.pas',
+ uPSUtils in 'uPSUtils.pas',
+ uPSC_buttons in 'uPSC_buttons.pas',
+ uPSC_classes in 'uPSC_classes.pas',
+ uPSC_comobj in 'uPSC_comobj.pas',
+ uPSC_controls in 'uPSC_controls.pas',
+ uPSC_dateutils in 'uPSC_dateutils.pas',
+ uPSC_DB in 'uPSC_DB.pas',
+ uPSC_dll in 'uPSC_dll.pas',
+ PascalScript_Core_Reg in 'PascalScript_Core_Reg.pas';
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D6.res b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D6.res
new file mode 100644
index 0000000..b0d3f6d
Binary files /dev/null and b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D6.res differ
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D7.dof b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D7.dof
new file mode 100644
index 0000000..5ff35f1
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D7.dof
@@ -0,0 +1,122 @@
+[FileVersion]
+Version=7.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=1
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=RemObjects Pascal Script - Core Package
+
+[Directories]
+OutputDir=
+UnitOutputDir=..\Dcu\D7
+PackageDLLOutputDir=..\Dcu\D7
+PackageDCPOutputDir=..\Dcu\D7
+SearchPath=
+Packages=
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+ProductName=Pascal Script
+ProductVersion=3.0.0.0
+FileDescription=
+FileVersion=3.0.30.691
+OriginalFilename=
+CompileDate=Tuesday, March 21, 2006 1:32 PM
+
+[Version Info]
+MajorVer=3
+MinorVer=0
+Release=30
+Build=691
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D7.dpk b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D7.dpk
new file mode 100644
index 0000000..4695586
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D7.dpk
@@ -0,0 +1,76 @@
+package PascalScript_Core_D7;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Pascal Script - Core Package'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl;
+
+contains
+ uPSC_extctrls in 'uPSC_extctrls.pas',
+ uPSC_forms in 'uPSC_forms.pas',
+ uPSC_graphics in 'uPSC_graphics.pas',
+ uPSC_menus in 'uPSC_menus.pas',
+ uPSC_std in 'uPSC_std.pas',
+ uPSC_stdctrls in 'uPSC_stdctrls.pas',
+ uPSCompiler in 'uPSCompiler.pas',
+ uPSComponent in 'uPSComponent.pas',
+ uPSComponent_COM in 'uPSComponent_COM.pas',
+ uPSComponent_Controls in 'uPSComponent_Controls.pas',
+ uPSComponent_DB in 'uPSComponent_DB.pas',
+ uPSComponent_Default in 'uPSComponent_Default.pas',
+ uPSComponent_Forms in 'uPSComponent_Forms.pas',
+ uPSComponent_StdCtrls in 'uPSComponent_StdCtrls.pas',
+ uPSDebugger in 'uPSDebugger.pas',
+ uPSDisassembly in 'uPSDisassembly.pas',
+ uPSPreProcessor in 'uPSPreProcessor.pas',
+ uPSR_buttons in 'uPSR_buttons.pas',
+ uPSR_classes in 'uPSR_classes.pas',
+ uPSR_comobj in 'uPSR_comobj.pas',
+ uPSR_controls in 'uPSR_controls.pas',
+ uPSR_dateutils in 'uPSR_dateutils.pas',
+ uPSR_DB in 'uPSR_DB.pas',
+ uPSR_dll in 'uPSR_dll.pas',
+ uPSR_extctrls in 'uPSR_extctrls.pas',
+ uPSR_forms in 'uPSR_forms.pas',
+ uPSR_graphics in 'uPSR_graphics.pas',
+ uPSR_menus in 'uPSR_menus.pas',
+ uPSR_std in 'uPSR_std.pas',
+ uPSR_stdctrls in 'uPSR_stdctrls.pas',
+ uPSRuntime in 'uPSRuntime.pas',
+ uPSUtils in 'uPSUtils.pas',
+ uPSC_buttons in 'uPSC_buttons.pas',
+ uPSC_classes in 'uPSC_classes.pas',
+ uPSC_comobj in 'uPSC_comobj.pas',
+ uPSC_controls in 'uPSC_controls.pas',
+ uPSC_dateutils in 'uPSC_dateutils.pas',
+ uPSC_DB in 'uPSC_DB.pas',
+ uPSC_dll in 'uPSC_dll.pas',
+ PascalScript_Core_Reg in 'PascalScript_Core_Reg.pas';
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D7.res b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D7.res
new file mode 100644
index 0000000..b0d3f6d
Binary files /dev/null and b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_D7.res differ
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_Glyphs.RES b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_Glyphs.RES
new file mode 100644
index 0000000..aa4c040
Binary files /dev/null and b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_Glyphs.RES differ
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_K3.dpk b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_K3.dpk
new file mode 100644
index 0000000..bbc6bb3
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_K3.dpk
@@ -0,0 +1,76 @@
+package PascalScript_Core_K3;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Pascal Script - Core Package'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ dbrtl;
+
+contains
+ uPSC_extctrls in 'uPSC_extctrls.pas',
+ uPSC_forms in 'uPSC_forms.pas',
+ uPSC_graphics in 'uPSC_graphics.pas',
+ uPSC_menus in 'uPSC_menus.pas',
+ uPSC_std in 'uPSC_std.pas',
+ uPSC_stdctrls in 'uPSC_stdctrls.pas',
+ uPSCompiler in 'uPSCompiler.pas',
+ uPSComponent in 'uPSComponent.pas',
+ uPSComponent_COM in 'uPSComponent_COM.pas',
+ uPSComponent_Controls in 'uPSComponent_Controls.pas',
+ uPSComponent_DB in 'uPSComponent_DB.pas',
+ uPSComponent_Default in 'uPSComponent_Default.pas',
+ uPSComponent_Forms in 'uPSComponent_Forms.pas',
+ uPSComponent_StdCtrls in 'uPSComponent_StdCtrls.pas',
+ uPSDebugger in 'uPSDebugger.pas',
+ uPSDisassembly in 'uPSDisassembly.pas',
+ uPSPreProcessor in 'uPSPreProcessor.pas',
+ uPSR_buttons in 'uPSR_buttons.pas',
+ uPSR_classes in 'uPSR_classes.pas',
+ uPSR_comobj in 'uPSR_comobj.pas',
+ uPSR_controls in 'uPSR_controls.pas',
+ uPSR_dateutils in 'uPSR_dateutils.pas',
+ uPSR_DB in 'uPSR_DB.pas',
+ uPSR_dll in 'uPSR_dll.pas',
+ uPSR_extctrls in 'uPSR_extctrls.pas',
+ UPSR_forms in 'uPSR_forms.pas',
+ UPSR_graphics in 'uPSR_graphics.pas',
+ uPSR_menus in 'uPSR_menus.pas',
+ uPSR_std in 'uPSR_std.pas',
+ uPSR_stdctrls in 'uPSR_stdctrls.pas',
+ uPSRuntime in 'uPSRuntime.pas',
+ uPSUtils in 'uPSUtils.pas',
+ uPSC_buttons in 'uPSC_buttons.pas',
+ uPSC_classes in 'uPSC_classes.pas',
+ uPSC_comobj in 'uPSC_comobj.pas',
+ uPSC_controls in 'uPSC_controls.pas',
+ uPSC_dateutils in 'uPSC_dateutils.pas',
+ uPSC_DB in 'uPSC_DB.pas',
+ uPSC_dll in 'uPSC_dll.pas',
+ PascalScript_Core_Reg in 'PascalScript_Core_Reg.pas';
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_K3.kof b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_K3.kof
new file mode 100644
index 0000000..ee8a4da
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_K3.kof
@@ -0,0 +1,114 @@
+[FileVersion]
+Version=7.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=1
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=RemObjects Pascal Script - Core Package
+
+[Directories]
+UnitOutputDir=../Dcu/K3
+PackageDLLOutputDir=../Dcu/K3
+PackageDCPOutputDir=../Dcu/K3
+SearchPath=
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+ProductName=Pascal Script
+ProductVersion=3.0.0.0
+FileDescription=
+FileVersion=3.0.2.34
+OriginalFilename=
+
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_Reg.pas b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_Reg.pas
new file mode 100644
index 0000000..5987b51
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_Core_Reg.pas
@@ -0,0 +1,65 @@
+unit PascalScript_Core_Reg;
+
+{----------------------------------------------------------------------------
+/ RemObjects Pascal Script
+/
+/ compiler: Delphi 2 and up, Kylix 3 and up
+/ platform: Win32, Linux
+/
+/ (c)opyright RemObjects Software. all rights reserved.
+/
+----------------------------------------------------------------------------}
+
+{$I PascalScript.inc}
+
+interface
+
+{$IFNDEF FPC}
+{$R PascalScript_Core_Glyphs.res}
+{$ENDIF}
+
+procedure Register;
+
+implementation
+
+uses
+ Classes,
+ {$IFDEF FPC}
+ LResources,
+ {$ENDIF}
+ uPSComponent,
+ uPSDebugger,
+ uPSComponent_Default,
+ {$IFNDEF FPC}
+ uPSComponent_COM,
+ {$ENDIF}
+ uPSComponent_DB,
+ uPSComponent_Forms,
+ uPSComponent_Controls,
+ uPSComponent_StdCtrls;
+
+procedure Register;
+begin
+ RegisterComponents('Pascal Script', [TPSScript,
+ TPSScriptDebugger,
+ TPSDllPlugin,
+ TPSImport_Classes,
+ TPSImport_DateUtils,
+ {$IFNDEF FPC}
+ TPSImport_ComObj,
+ {$ENDIF}
+ TPSImport_DB,
+ TPSImport_Forms,
+ TPSImport_Controls,
+ TPSImport_StdCtrls,
+ TPSCustumPlugin]);
+end;
+
+
+{$IFDEF FPC}
+ initialization;
+ {$i pascalscript.lrs}
+{$ENDIF}
+
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_RO_D10.bdsproj b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_RO_D10.bdsproj
new file mode 100644
index 0000000..d0c2901
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_RO_D10.bdsproj
@@ -0,0 +1,179 @@
+
+
+
+
+ Delphi.Personality
+
+ 1.0
+ {5B47E7C8-6AAF-4215-8EC3-60B739B2B5F3}
+
+
+
+
+ PascalScript_RO_D10.dpk
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 1
+ 1
+ 1
+ 1
+ True
+ True
+
+
+ False
+
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+ RemObjects Pascal Script - RemObjects SDK 3.0 Integration
+ False
+
+
+
+ ..\Dcu\D9
+ ..\Dcu\D9
+
+ ..\Dcu\D9;$(BDS)\lib\Indy9;..\..\RemObjects SDK for Dephi\Dcu\D9
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ 0
+ 3
+ 0
+ 30
+ 691
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1033
+ 1252
+
+
+ RemObjects Software
+
+ 3.0.30.691
+
+
+
+
+ Pascal Script
+ 3.0.0.0
+ Tuesday, March 21, 2006 1:32 PM
+
+
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_RO_D10.cfg b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_RO_D10.cfg
new file mode 100644
index 0000000..347e85d
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_RO_D10.cfg
@@ -0,0 +1,50 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W+
+-$X+
+-$YD
+-$Z1
+-cg
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-N0"..\Dcu\D10"
+-LE"..\Dcu\D10"
+-U"..\Dcu\D10;c:\program files\borland\bds\4.0\lib\Indy9;..\..\RemObjects SDK for Dephi\Dcu\D10"
+-O"..\Dcu\D10;c:\program files\borland\bds\4.0\lib\Indy9;..\..\RemObjects SDK for Dephi\Dcu\D10"
+-I"..\Dcu\D10;c:\program files\borland\bds\4.0\lib\Indy9;..\..\RemObjects SDK for Dephi\Dcu\D10"
+-R"..\Dcu\D10;c:\program files\borland\bds\4.0\lib\Indy9;..\..\RemObjects SDK for Dephi\Dcu\D10"
+-Z
+-w-SYMBOL_DEPRECATED
+-w-SYMBOL_LIBRARY
+-w-SYMBOL_PLATFORM
+-w-SYMBOL_EXPERIMENTAL
+-w-UNIT_LIBRARY
+-w-UNIT_PLATFORM
+-w-UNIT_DEPRECATED
+-w-UNIT_EXPERIMENTAL
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_RO_D10.dpk b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_RO_D10.dpk
new file mode 100644
index 0000000..414bd0c
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_RO_D10.dpk
@@ -0,0 +1,47 @@
+package PascalScript_RO_D10;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Pascal Script - RemObjects SDK 4.0 Integration'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ {$IFDEF RemObjects_INDY9}
+ Indy,
+ {$ELSE}
+ IndyCore, IndySystem, IndyProtocols,
+ {$ENDIF}
+ PascalScript_Core_D10,
+ RemObjects_Core_D10,
+ RemObjects_Indy_D10,
+ dbrtl,
+ vcl,
+ vclx;
+
+contains
+ PascalScript_RO_Reg in 'PascalScript_RO_Reg.pas',
+ uROPSServerLink in 'uROPSServerLink.pas',
+ uROPSImports in 'uROPSImports.pas';
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_RO_D11.dpk b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_RO_D11.dpk
new file mode 100644
index 0000000..f0e2e8a
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_RO_D11.dpk
@@ -0,0 +1,47 @@
+package PascalScript_RO_D11;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Pascal Script - RemObjects SDK 5.0 Integration'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ {$IFDEF RemObjects_INDY9}
+ Indy,
+ {$ELSE}
+ IndyCore, IndySystem, IndyProtocols,
+ {$ENDIF}
+ PascalScript_Core_D11,
+ RemObjects_Core_D11,
+ RemObjects_Indy_D11,
+ dbrtl,
+ vcl,
+ vclx;
+
+contains
+ PascalScript_RO_Reg in 'PascalScript_RO_Reg.pas',
+ uROPSServerLink in 'uROPSServerLink.pas',
+ uROPSImports in 'uROPSImports.pas';
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_RO_D11.dproj b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_RO_D11.dproj
new file mode 100644
index 0000000..8c3c73a
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_RO_D11.dproj
@@ -0,0 +1,81 @@
+
+
+
+ {0eefdf9b-7853-40e5-9b29-b631f51beeda}
+ PascalScript_RO_D11.dpk
+ Debug
+ AnyCPU
+ DCC32
+ ..\Dcu\D11\PascalScript_RO_D11.bpl
+
+
+ 7.0
+ False
+ False
+ True
+ 0
+ ..\Dcu\D9
+ ..\Dcu\D9
+ ..\Dcu\D9
+ ..\Dcu\D9
+ ..\Dcu\D9;$(BDS)\lib\Indy9;..\..\RemObjects SDK for Dephi\Dcu\D9
+ ..\Dcu\D9;$(BDS)\lib\Indy9;..\..\RemObjects SDK for Dephi\Dcu\D9
+ ..\Dcu\D9;$(BDS)\lib\Indy9;..\..\RemObjects SDK for Dephi\Dcu\D9
+ ..\Dcu\D9;$(BDS)\lib\Indy9;..\..\RemObjects SDK for Dephi\Dcu\D9
+ RELEASE
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ 7.0
+ True
+ ..\Dcu\D11
+ ..\Dcu\D11
+ ..\Dcu\D11
+ ..\Dcu\D11
+ ..\Dcu\D11;..\..\RemObjects SDK for Dephi\Dcu\D11
+ ..\Dcu\D11;..\..\RemObjects SDK for Dephi\Dcu\D11
+ ..\Dcu\D11;..\..\RemObjects SDK for Dephi\Dcu\D11
+ ..\Dcu\D11;..\..\RemObjects SDK for Dephi\Dcu\D11
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ False
+ ..\Dcu\D11
+
+
+ Delphi.Personality
+ Package
+
+ False True False RemObjects Pascal Script - RemObjects SDK 5.0 Integration False False False True False 3 0 6 442 False False False False False 1033 1252 RemObjects Software 3.0.6.442 Pascal Script 3.0.0.0 Tuesday, March 21, 2006 1:32 PM PascalScript_RO_D11.dpk
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_RO_D6.dof b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_RO_D6.dof
new file mode 100644
index 0000000..0706699
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_RO_D6.dof
@@ -0,0 +1,114 @@
+[FileVersion]
+Version=6.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=1
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=RemObjects Pascal Script - RemObjects SDK 3.0 Integration
+
+[Directories]
+UnitOutputDir=..\Dcu\D6
+PackageDLLOutputDir=..\Dcu\D6
+PackageDCPOutputDir=
+SearchPath=..\Dcu\D6
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+ProductName=Pascal Script
+ProductVersion=3.0.0.0
+FileDescription=
+FileVersion=3.0.2.36
+OriginalFilename=
+
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_RO_D6.dpk b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_RO_D6.dpk
new file mode 100644
index 0000000..4d22bec
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_RO_D6.dpk
@@ -0,0 +1,43 @@
+package PascalScript_RO_D6;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Pascal Script - RemObjects SDK 4.0 Integration'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ indy,
+ PascalScript_Core_D6,
+ RemObjects_Core_D6,
+ RemObjects_Indy_D6,
+ dbrtl,
+ vcl,
+ vclx;
+
+contains
+ PascalScript_RO_Reg in 'PascalScript_RO_Reg.pas',
+ uROPSServerLink in 'uROPSServerLink.pas',
+ uROPSImports in 'uROPSImports.pas';
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_RO_D6.res b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_RO_D6.res
new file mode 100644
index 0000000..30e8017
Binary files /dev/null and b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_RO_D6.res differ
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_RO_D7.dof b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_RO_D7.dof
new file mode 100644
index 0000000..e9f87aa
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_RO_D7.dof
@@ -0,0 +1,122 @@
+[FileVersion]
+Version=7.0
+
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=1
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=0
+SymbolPlatform=0
+UnitLibrary=0
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=RemObjects Pascal Script - RemObjects SDK 3.0 Integration
+
+[Directories]
+OutputDir=
+UnitOutputDir=..\Dcu\D7
+PackageDLLOutputDir=..\Dcu\D7
+PackageDCPOutputDir=
+SearchPath=..\Dcu\D7
+Packages=
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+
+[Version Info Keys]
+CompanyName=RemObjects Software
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+ProductName=Pascal Script
+ProductVersion=3.0.0.0
+FileDescription=
+FileVersion=3.0.30.691
+OriginalFilename=
+Compile Date=Monday, February 28, 2005 3:33 PM
+
+[Version Info]
+MajorVer=3
+MinorVer=0
+Release=30
+Build=691
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_RO_D7.dpk b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_RO_D7.dpk
new file mode 100644
index 0000000..8ece2b8
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_RO_D7.dpk
@@ -0,0 +1,43 @@
+package PascalScript_RO_D7;
+
+{$R *.res}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION ON}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DESCRIPTION 'RemObjects Pascal Script - RemObjects SDK 4.0 Integration'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ indy,
+ PascalScript_Core_D7,
+ RemObjects_Core_D7,
+ RemObjects_Indy_D7,
+ dbrtl,
+ vcl,
+ vclx;
+
+contains
+ PascalScript_RO_Reg in 'PascalScript_RO_Reg.pas',
+ uROPSServerLink in 'uROPSServerLink.pas',
+ uROPSImports in 'uROPSImports.pas';
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_RO_D7.res b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_RO_D7.res
new file mode 100644
index 0000000..b0d3f6d
Binary files /dev/null and b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_RO_D7.res differ
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_RO_Glyphs.RES b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_RO_Glyphs.RES
new file mode 100644
index 0000000..3fcd355
Binary files /dev/null and b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_RO_Glyphs.RES differ
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_RO_Reg.pas b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_RO_Reg.pas
new file mode 100644
index 0000000..0006506
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/PascalScript_RO_Reg.pas
@@ -0,0 +1,34 @@
+unit PascalScript_RO_Reg;
+
+{----------------------------------------------------------------------------}
+{ RemObjects Pascal Script
+{
+{ compiler: Delphi 2 and up, Kylix 3 and up
+{ platform: Win32, Linux
+{
+{ (c)opyright RemObjects Software. all rights reserved.
+{
+{ Using this code requires a valid license of Pascal Script
+{ which can be obtained at http://www.remobjects.com.
+{----------------------------------------------------------------------------}
+
+{$I PascalScript.inc}
+
+interface
+
+{$R PascalScript_RO_Glyphs.res}
+
+procedure Register;
+
+implementation
+
+uses
+ Classes,
+ uROPSServerLink;
+
+procedure Register;
+begin
+ RegisterComponents('RemObjects Pascal Script', [TPSRemObjectsSdkPlugin]);
+end;
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/eDefines.inc b/official/5.0.30.691/Pascal Script for Delphi/Source/eDefines.inc
new file mode 100644
index 0000000..3fde647
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/eDefines.inc
@@ -0,0 +1,373 @@
+{----------------------------------------------------------------------------}
+{file: eDefines.inc }
+{type: Delphi include file }
+{ }
+{compiler: Borland Pascal 7, }
+{ Delphi 1-7, Delphi 2005 for Win32 }
+{ Kylix 1-3, }
+{ C++Builder 1-5 (Pascal Only) }
+{ }
+{platforms: DOS, DPMI, Win16, Win32, Linux }
+{ }
+{author: mh@elitedev.com }
+{date: 8/3/1997, last changed: 7/2/2002 for Delphi 7 and Kylix 3 }
+{ }
+{contents: Defines that can be flexibily used to determine the exact }
+{ compiler version used. }
+{ }
+{(c)opyright elitedevelopments. all rights reserved. }
+{ http://www.elitedev.com }
+{ }
+{ Third Party component developers are encouraged to use the set of defines }
+{ established in this file, rather then their own system, for checking their }
+{ component libraries agains different versions of Delphi and C++Builder. }
+{ }
+{ This file may be distributed freely with both free and commercial source }
+{ libraries, but you are asked to please leave this comment in place, and }
+{ to return any improvements you make to this file to the maintainer that }
+{ is noted above. }
+{----------------------------------------------------------------------------}
+
+{----------------------------------------------------------------------------}
+{ Compiler and OS version defines: }
+{ }
+{ exact compiler versions: }
+{ }
+{ BP7 Borland Pascal 7.0 }
+{ DELPHI1 Delphi 1.0 (any Delphi) }
+{ DELPHI2 Delphi 2.0 }
+{ DELPHI3 Delphi 3.0 }
+{ DELPHI4 Delphi 4.0 }
+{ DELPHI5 Delphi 5.0 }
+{ DELPHI6 Delphi 6.0 }
+{ DELPHI7 Delphi 7.0 }
+{ DELPHI9 Delphi 2005 }
+{ DELPHI2005 Delphi 2005 }
+{ KYLIX1 Kylix 1.0 }
+{ KYLIX2 Kylix 2.0 }
+{ KYLIX3 Kylix 3.0 }
+{ CBUILDER1 C++Builder 1.0 }
+{ CBUILDER3 C++Builder 3.0 }
+{ CBUILDER4 C++Builder 4.0 }
+{ CBUILDER5 C++Builder 5.0 }
+{ }
+{ }
+{ minimum compiler versions: }
+{ }
+{ DELPHI1UP Delphi 1.0 and above (any Delphi) }
+{ DELPHI2UP Delphi 2.0 and above }
+{ DELPHI3UP Delphi 3.0 and above }
+{ DELPHI4UP Delphi 4.0 and above }
+{ DELPHI5UP Delphi 5.0 and above }
+{ DELPHI6UP Delphi 6.0 and above }
+{ DELPHI7UP Delphi 7.0 and above }
+{ DELPHI9UP Delphi 9.0 and above }
+{ DELPHI2005UP Delphi 2005 and above }
+{ KYLIX1UP Kylix 1.0 and above (any Kylix) }
+{ KYLIX2UP Kylix 2.0 and above (any Kylix) }
+{ KYLIX3UP Kylix 3.0 and above (any Kylix) }
+{ CBUILDER1UP C++Builder 1.0 and above or Delphi 2 and above (any C++Builder) }
+{ CBUILDER3UP C++Builder 3.0 and above or Delphi 3.0 and above }
+{ CBUILDER4UP C++Builder 4.0 and above or Delphi 4.0 and above }
+{ CBUILDER5UP C++Builder 5.0 and above or Delphi 5.0 and above }
+{ CBUILDER6UP C++Builder 5.0 and above or Delphi 5.0 and above }
+{ }
+{ }
+{ compiler types: }
+{ }
+{ BP Borland Pascal (not Delphi or C++Builder) }
+{ DELPHI any Delphi version (but not C++Builder or Kylix) }
+{ KYLIX any Kylix version (not Delphi or C++Builder for Windows) }
+{ CBUILDER any C++Builder for Windows (Pascal) }
+{ }
+{ }
+{ target platforms compiler types: }
+{ }
+{ DELPHI_16BIT 16bit Delphi (but not C++Builder!) }
+{ DELPHI_32BIT 32bit Delphi (but not C++Builder) }
+{ KYLIX_32BIT 32bit Kylix (but not C++Builder) }
+{ CBUILDER_32BIT 32bit C++Builer's Pascal (but not Delphi) }
+{ }
+{ }
+{ target platforms }
+{ }
+{ DOS any DOS (plain and DPMI) }
+{ REALMODE 16bit realmode DOS }
+{ PROTECTEDMODE 16bit DPMI DOS }
+{ }
+{ MSWINDOWS any Windows platform }
+{ WIN16 16bit Windows }
+{ WIN32 32bit Windows }
+{ DOTNET .NET }
+{ }
+{ LINUX any Linux platform }
+{ LINUX32 32bit Linux }
+{----------------------------------------------------------------------------}
+
+{ defines for Borland Pascal 7.0 }
+{$IFDEF VER70}
+ {$DEFINE BP}
+ {$DEFINE BP7}
+ {$DEFINE 16BIT}
+
+ { defines for BP7 DOS real mode }
+ {$IFDEF MSDOS}
+ {$DEFINE DOS}
+ {$DEFINE REALMODE}
+ {$ENDIF}
+
+ { defines for BP7 DOS protected mode }
+ {$IFDEF DPMI}
+ {$DEFINE DOS}
+ {$DEFINE PROTECTEDMODE}
+ {$ENDIF}
+
+ { defines for BP7 Windows }
+ {$IFDEF WINDOWS}
+ {$DEFINE MSWINDOWS}
+ {$DEFINE WIN16}
+ {$ENDIF}
+{$ENDIF}
+
+{ defines for Delphi 1.0 thru 7.0 }
+{$IFNDEF LINUX}
+
+ { defines for Delphi 1.0 }
+ {$IFDEF VER80}
+ {$DEFINE DELPHI}
+ {$DEFINE DELPHI1}
+ {$DEFINE DELPHI1UP}
+ {$DEFINE DELPHI_16BIT}
+ {$DEFINE WIN16}
+ {$DEFINE 16BIT}
+ {$ENDIF}
+
+ { defines for Delphi 2.0 }
+ {$IFDEF VER90}
+ {$DEFINE DELPHI}
+ {$DEFINE DELPHI2}
+ {$DEFINE DELPHI1UP}
+ {$DEFINE DELPHI2UP}
+ {$ENDIF}
+
+ { defines for C++Builder 1.0 }
+ {$IFDEF VER93}
+ {$DEFINE DELPHI1UP}
+ {$DEFINE DELPHI2UP}
+ {$DEFINE CBUILDER}
+ {$DEFINE CBUILDER1}
+ {$DEFINE CBUILDER1UP}
+ {$ENDIF}
+
+ { defines for Delphi 3.0 }
+ {$IFDEF VER100}
+ {$DEFINE DELPHI}
+ {$DEFINE DELPHI3}
+ {$DEFINE DELPHI1UP}
+ {$DEFINE DELPHI2UP}
+ {$DEFINE DELPHI3UP}
+ {$ENDIF}
+
+ { defines for C++Builder 3.0 }
+ {$IFDEF VER110}
+ {$DEFINE DELPHI1UP}
+ {$DEFINE DELPHI2UP}
+ {$DEFINE DELPHI3UP}
+ {$DEFINE CBUILDER}
+ {$DEFINE CBUILDER3}
+ {$DEFINE CBUILDER1UP}
+ {$DEFINE CBUILDER3UP}
+ {$ENDIF}
+
+ { defines for Delphi 4.0 }
+ {$IFDEF VER120}
+ {$DEFINE DELPHI}
+ {$DEFINE DELPHI4}
+ {$DEFINE DELPHI1UP}
+ {$DEFINE DELPHI2UP}
+ {$DEFINE DELPHI3UP}
+ {$DEFINE DELPHI4UP}
+ {$ENDIF}
+
+ { defines for C++Builder 4.0 }
+ {$IFDEF VER125}
+ {$DEFINE DELPHI1UP}
+ {$DEFINE DELPHI2UP}
+ {$DEFINE DELPHI3UP}
+ {$DEFINE DELPHI4UP}
+ {$DEFINE CBUILDER}
+ {$DEFINE CBUILDER4}
+ {$DEFINE CBUILDER1UP}
+ {$DEFINE CBUILDER3UP}
+ {$DEFINE CBUILDER4UP}
+ {$ENDIF}
+ { defines for Delphi 5.0 }
+ {$IFDEF VER130}
+ {$DEFINE DELPHI}
+ {$DEFINE DELPHI5}
+ {$DEFINE DELPHI1UP}
+ {$DEFINE DELPHI2UP}
+ {$DEFINE DELPHI3UP}
+ {$DEFINE DELPHI4UP}
+ {$DEFINE DELPHI5UP}
+ {$ENDIF}
+
+ { defines for C++Builder 5.0 }
+ {$IFDEF VER135}
+ {$DEFINE DELPHI1UP}
+ {$DEFINE DELPHI2UP}
+ {$DEFINE DELPHI3UP}
+ {$DEFINE DELPHI4UP}
+ {$DEFINE DELPHI5UP}
+ {$DEFINE CBUILDER}
+ {$DEFINE CBUILDER5}
+ {$DEFINE CBUILDER1UP}
+ {$DEFINE CBUILDER3UP}
+ {$DEFINE CBUILDER4UP}
+ {$DEFINE CBUILDER5UP}
+ {$ENDIF}
+
+ { defines for Delphi 6.0 }
+ {$IFDEF VER140}
+ {$DEFINE VER140UP}
+ {$DEFINE DELPHI}
+ {$DEFINE DELPHI6}
+ {$DEFINE DELPHI1UP}
+ {$DEFINE DELPHI2UP}
+ {$DEFINE DELPHI3UP}
+ {$DEFINE DELPHI4UP}
+ {$DEFINE DELPHI5UP}
+ {$DEFINE DELPHI6UP}
+ {$ENDIF}
+
+ { defines for Delphi 7.0 }
+ {$IFDEF VER150}
+ {$DEFINE VER140UP}
+ {$DEFINE DELPHI}
+ {$DEFINE DELPHI7}
+ {$DEFINE DELPHI1UP}
+ {$DEFINE DELPHI2UP}
+ {$DEFINE DELPHI3UP}
+ {$DEFINE DELPHI4UP}
+ {$DEFINE DELPHI5UP}
+ {$DEFINE DELPHI6UP}
+ {$DEFINE DELPHI7UP}
+ {$ENDIF}
+
+ { defines for Delphi 2005 }
+ {$IFDEF VER170}
+ {$DEFINE VER140UP}
+ {$DEFINE DELPHI}
+ {$DEFINE DELPHI9}
+ {$DEFINE DELPHI2005}
+ {$DEFINE DELPHI1UP}
+ {$DEFINE DELPHI2UP}
+ {$DEFINE DELPHI3UP}
+ {$DEFINE DELPHI4UP}
+ {$DEFINE DELPHI5UP}
+ {$DEFINE DELPHI6UP}
+ {$DEFINE DELPHI7UP}
+ {$DEFINE DELPHI9UP}
+ {$DEFINE DELPHI2005UP}
+ {$DEFINE BDS}
+ {$DEFINE BDS3}
+ {$DEFINE BDS3UP}
+ {$ENDIF}
+
+ { defines for Delphi 2006 }
+ {$IFDEF VER180}
+ {$DEFINE VER140UP}
+ {$DEFINE DELPHI}
+ {$DEFINE DELPHI10}
+ {$DEFINE DELPHI2006}
+ {$DEFINE DELPHI1UP}
+ {$DEFINE DELPHI2UP}
+ {$DEFINE DELPHI3UP}
+ {$DEFINE DELPHI4UP}
+ {$DEFINE DELPHI5UP}
+ {$DEFINE DELPHI6UP}
+ {$DEFINE DELPHI7UP}
+ {$DEFINE DELPHI9UP}
+ {$DEFINE DELPHI10A}
+ {$DEFINE DELPHI10UP}
+ {$DEFINE DELPHI2005UP}
+ {$DEFINE DELPHI2006UP}
+ {$DEFINE BDS}
+ {$DEFINE BDS4}
+ {$DEFINE BDS3UP}
+ {$DEFINE BDS4UP}
+ {$ENDIF}
+
+ { defines for Delphi 2007 }
+ {$IFDEF VER185}
+ {$UNDEF DELPHI10A} // declared in VER180
+ {$UNDEF DELPHI2006} // declared in VER180
+ {$UNDEF BDS4} // declared in VER180
+
+ {$DEFINE DELPHI10B}
+ {$DEFINE DELPHI2007}
+ {$DEFINE DELPHI2007UP}
+ {$DEFINE BDS5}
+ {$DEFINE BDS5UP}
+ {$ENDIF}
+
+
+ {$IFDEF WIN32}
+ {$DEFINE MSWINDOWS} //not automatically defined for Delphi 2 thru 5
+ {$DEFINE 32BIT}
+ {$ENDIF}
+
+{$ENDIF MSWINDOWS}
+
+{ defines for "Delphi for .NET" }
+{$IFDEF CLR}
+ {$DEFINE DOTNET}
+{$ENDIF}
+
+{$IFDEF DELPHI}
+ {$IFDEF DELPHI2UP}
+ {$DEFINE DELPHI_32BIT}
+ {$ENDIF}
+{$ENDIF}
+
+{$IFDEF CBUILDER}
+ {$DEFINE CBUILDER_32BIT}
+{$ENDIF}
+
+{ defines for Kylix 1.0 thru 3.0 }
+{$IFDEF LINUX}
+
+ {$DEFINE VER140UP}
+
+ { Any Kylix }
+ {$DEFINE 32BIT}
+ {$DEFINE LINUX32}
+ {$DEFINE KYLIX_32BIT}
+ {$DEFINE KYLIX}
+ {$DEFINE KYLIX1UP}
+
+ {$IFDEF CONDITIONALEXPRESSIONS}
+ {$IF Declared(CompilerVersion)}
+
+ { Kylix 2.0 }
+ {$IF Declared(RTLVersion) and (RTLVersion = 14.1)}
+ {$DEFINE KYLIX2}
+ {$DEFINE KYLIX1UP}
+ {$DEFINE KYLIX2UP}
+ {$IFEND}
+
+ { Kylix 3.0 - Delphi portion }
+ {$IF Declared(RTLVersion) and (RTLVersion = 14.5)}
+ {$DEFINE KYLIX3}
+ {$DEFINE KYLIX1UP}
+ {$DEFINE KYLIX2UP}
+ {$DEFINE KYLIX3UP}
+ {$IFEND}
+
+ { Kylix 1.0 }
+ {$ELSE}
+ {$DEFINE KYLIX1}
+ {$IFEND}
+ {$ENDIF CONDITIONALEXPRESSIONS}
+
+{$ENDIF LINUX}
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/powerpc.inc b/official/5.0.30.691/Pascal Script for Delphi/Source/powerpc.inc
new file mode 100644
index 0000000..de25edc
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/powerpc.inc
@@ -0,0 +1,338 @@
+{ implementation of the powerpc osx abi for function calls in pascal script
+ Copyright (c) 2007 by Henry Vermaak (henry.vermaak@gmail.com) }
+
+{$ifndef darwin}
+ {$fatal This code is Darwin specific at the moment!}
+{$endif}
+
+{$ifndef cpu32}
+ {$fatal This code is 32bit specific at the moment!}
+{$endif}
+
+const
+ rtINT = 0;
+ rtINT64 = 1;
+ rtFLOAT = 2;
+
+type
+ Trint = array[1..8] of dword;
+ Trfloat = array[1..13] of double;
+
+{$goto on}
+{ define labels }
+label
+ rfloat_loop,
+ stack_loop,
+ load_regs,
+ int_result,
+ int64_result,
+ float_result,
+ asmcall_end;
+
+{ call a function from a pointer }
+{ resulttype: 0 = int, 1 = int64, 2 = float }
+function ppcasmcall(rint: Trint; rfloat: Trfloat; proc, stack: pointer; stacksize, resulttype: integer): pointer; assembler; nostackframe;
+asm
+ mflr r0
+ stw r0, 8(r1)
+
+ { save non-volatile register/s - make sure the stack size is sufficient! }
+ stw r31, -4(r1) { stacksize }
+
+ stwu r1, -240(r1) { create stack }
+
+ { get all the params into the stack }
+ stw r3, 48(r1) { rint }
+ stw r4, 52(r1) { rfloat }
+ stw r5, 56(r1) { proc }
+ stw r6, 60(r1) { stack }
+ stw r7, 64(r1) { stacksize }
+ stw r8, 68(r1) { resulttype }
+ { result is stored in 72(r1) and 76(r1) (if returning int64) }
+
+ { write rint array into stack }
+ lwz r2, 48(r1) { rint }
+ lfd f0, 0(r2)
+ stfd f0, 80(r1) { rint[1], rint[2] }
+ lfd f0, 8(r2)
+ stfd f0, 88(r1) { rint[3], rint[4] }
+ lfd f0, 16(r2)
+ stfd f0, 96(r1) { rint[5], rint[6] }
+ lfd f0, 24(r2)
+ stfd f0, 104(r1) { rint[7], rint[8] }
+
+ { write rfloat array into stack }
+ lwz r2, 52(r1) { rfloat }
+ addi r4, r1, 112 { rfloat[1] from here upwards (8 bytes apart) }
+ subi r2, r2, 8 { src }
+ subi r4, r4, 8 { dest }
+ li r3, 13 { counter }
+
+rfloat_loop:
+ subic. r3, r3, 1 { dec counter }
+ lfdu f0, 8(r2) { load rfloat[x] + update }
+ stfdu f0, 8(r4) { store rfloat[x] + update }
+ bne cr0, rfloat_loop
+
+ { create new stack }
+ mflr r0
+ stw r0, 8(r1)
+ mr r12, r1 { remember previous stack to fill in regs later }
+
+ lwz r31, 64(r12) { load stacksize into r31 }
+ neg r3, r31 { negate }
+ stwux r1, r1, r3 { create new stack }
+
+ { build up the stack here }
+ mr r3, r31 { counter }
+ subic. r3, r3, 24 { don't write first 24 }
+ blt cr0, load_regs { don't fill in stack if there is none }
+
+ lwz r2, 60(r12) { pointer to stack }
+ addi r2, r2, 24 { start of params }
+ subi r2, r2, 1 { src }
+
+ addi r4, r1, 24 { start of params }
+ subi r4, r4, 1 { dest }
+
+stack_loop:
+ subic. r3, r3, 1 { dec counter }
+ lbzu r5, 1(r2) { load stack + update }
+ stbu r5, 1(r4) { store stack + update }
+ bne cr0, stack_loop
+
+load_regs: { now load the registers from the previous stack in r12 }
+ lwz r3, 80(r12)
+ lwz r4, 84(r12)
+ lwz r5, 88(r12)
+ lwz r6, 92(r12)
+ lwz r7, 96(r12)
+ lwz r8, 100(r12)
+ lwz r9, 104(r12)
+ lwz r10, 108(r12)
+
+ lfd f1, 112(r12)
+ lfd f2, 120(r12)
+ lfd f3, 128(r12)
+ lfd f4, 136(r12)
+ lfd f5, 144(r12)
+ lfd f6, 152(r12)
+ lfd f7, 160(r12)
+ lfd f8, 168(r12)
+ lfd f9, 176(r12)
+ lfd f10, 184(r12)
+ lfd f11, 192(r12)
+ lfd f12, 200(r12)
+ lfd f13, 208(r12)
+
+ { now call this function }
+ lwz r2, 56(r12) { proc }
+ mtctr r2 { move to ctr }
+ bctrl { branch and link to ctr }
+
+ { restore stack - use stacksize in r31 }
+ add r1, r1, r31
+ lwz r0, 8(r1)
+ mtlr r0
+
+ { check resulttype and put appropriate pointer into r3 }
+ lwz r2, 68(r1) { resulttype }
+ cmpwi cr0, r2, 0 { int result? }
+ beq cr0, int_result { branch if equal }
+
+ cmpwi cr0, r2, 1 { single result? }
+ beq cr0, int64_result { branch if equal }
+
+
+float_result: { the result is a double}
+ stfd f1, 72(r1) { write f1 to result on stack }
+ b asmcall_end
+
+
+int64_result: { the result is a single }
+ stw r3, 72(r1) { write high dword to result on stack }
+ stw r4, 76(r1) { write low dword to result on stack }
+ b asmcall_end
+
+
+int_result: { the result is dword }
+ stw r3, 72(r1) { write r3 to result on stack }
+
+
+asmcall_end: { epilogue }
+ addi r3, r1, 72 { pointer to result on the stack }
+ addi r1, r1, 240 { restore stack }
+
+ { restore non-volatile register/s }
+ lwz r31, -4(r1)
+
+ lwz r0, 8(r1)
+ mtlr r0
+ blr
+end;
+
+function TPSExec.InnerfuseCall(_Self, Address: Pointer; CallingConv: TPSCallingConvention; Params: TPSList; res: PPSVariantIFC): Boolean;
+var
+ rint: Trint; { registers r3 to r10 }
+ rfloat: Trfloat; { registers f1 to f13 }
+ st: packed array of byte; { stack }
+ i, j, rindex, findex, stindex: integer;
+ fvar: PPSVariantIFC;
+
+ { add a dword to stack }
+ procedure addstackdword(value: dword);
+ begin
+ setlength(st, stindex+4);
+ pdword(@st[stindex])^ := value;
+ inc(stindex, 4);
+ end;
+
+ { add a float to stack }
+ procedure addstackfloat(value: pointer; size: integer);
+ begin
+ setlength(st, stindex + (size * 4));
+ if size = 1
+ then psingle(@st[stindex])^ := single(value^)
+ else pdouble(@st[stindex])^ := double(value^);
+ inc(stindex, size*4);
+ end;
+
+ { add to the general registers or overflow to stack }
+ procedure addgen(value: dword);
+ begin
+ if rindex <= 8
+ then begin
+ rint[rindex] := value;
+ inc(rindex);
+ addstackdword(value);
+ end
+ else begin
+ addstackdword(value);
+ end;
+ end;
+ { add to the float registers or overflow to stack }
+ { size = 1 for single, 2 for double }
+ procedure addfloat(value: pointer; size: integer);
+ begin
+ if findex <= 13
+ then begin
+ if size = 1
+ then rfloat[findex] := single(value^)
+ else rfloat[findex] := double(value^);
+ inc(findex);
+ inc(rindex, size);
+ addstackfloat(value, size);
+ end
+ else begin
+ addstackfloat(value, size);
+ end;
+ end;
+
+begin
+ rindex := 1;
+ findex := 1;
+ stindex := 24;
+ setlength(st, stindex);
+ Result := False;
+
+ { the pointer of the result needs to be passed first in the case of some result types }
+ if assigned(res)
+ then begin
+ case res.atype.basetype of
+ btStaticArray, btRecord: addgen(dword(res.dta));
+ end;
+ end;
+
+ { process all parameters }
+ for i := 0 to Params.Count-1 do begin
+ if Params[i] = nil
+ then Exit;
+ fvar := Params[i];
+
+ { cook dynamic arrays - fpc stores size-1 at @array-4 }
+ if (fvar.aType.BaseType = btArray)
+ then dec(pdword(pointer(fvar.dta^)-4)^);
+
+ if fvar.varparam
+ then begin { var param }
+ case fvar.aType.BaseType of
+ { add var params here }
+ btArray, btVariant, btSet, btStaticArray, btRecord, btInterface, btClass, {$IFNDEF PS_NOWIDESTRING} btWideString, btWideChar, {$ENDIF}
+ btU8, btS8, btU16, btS16, btU32, btS32, btSingle, btDouble, btExtended, btString, btPChar, btChar, btCurrency
+ {$IFNDEF PS_NOINT64}, bts64{$ENDIF}: addgen(dword(fvar.dta)); { TODO: test all }
+ else begin
+ writeln(stderr, 'Parameter type not recognised!');
+ Exit;
+ end;
+ end; { case }
+ end else begin { not a var param }
+ case fvar.aType.BaseType of
+// btArray, btVariant, btSet, btStaticArray, btRecord, btInterface, btClass, {$IFNDEF PS_NOWIDESTRING} btWideString, btWideChar, {$ENDIF}
+// btU8, btS8, btU16, btS16, btU32, btS32, btSingle, btDouble, btExtended, btString, btPChar, btChar, btCurrency
+// {$IFNDEF PS_NOINT64}, bts64{$ENDIF}: writeln('normal param');
+
+ { add normal params here }
+ btString: addgen(dword(pstring(fvar.dta)^));
+ btU8, btS8: addgen(dword(pbyte(fvar.dta)^));
+ btU16, BtS16: addgen(dword(pword(fvar.dta)^));
+ btU32, btS32: addgen(dword(pdword(fvar.dta)^));
+ btSingle: addfloat(fvar.dta, 1);
+ btDouble, btExtended: addfloat(fvar.dta, 2);
+ btPChar: addgen(dword(ppchar(fvar.dta)^));
+ btChar: addgen(dword(pchar(fvar.dta)^));
+ {$IFNDEF PS_NOINT64}bts64:{$ENDIF} begin
+ addgen(dword(pint64(fvar.dta)^ shr 32));
+ addgen(dword(pint64(fvar.dta)^ and $ffffffff));
+ end;
+ btStaticArray: addgen(dword(fvar.dta));
+ btRecord: for j := 0 to (fvar.atype.realsize div 4)-1 do
+ addgen(pdword(fvar.dta + j*4)^);
+ btArray: addgen(dword(fvar.dta^));
+
+ { TODO add and test }
+{ btVariant, btSet, btInterface, btClass }
+
+ else begin
+ writeln(stderr, 'Parameter type not implemented!');
+ Exit;
+ end;
+ end; { case }
+ end; { else }
+ end; { for }
+
+ if not assigned(res)
+ then begin
+ ppcasmcall(rint, rfloat, address, st, stindex, rtINT); { ignore return }
+ end
+ else begin
+ case res.atype.basetype of
+ { add result types here }
+ btString: pstring(res.dta)^ := pstring(ppcasmcall(rint, rfloat, address, st, stindex, rtINT))^;
+ btU8, btS8: pbyte(res.dta)^ := byte(pdword(ppcasmcall(rint, rfloat, address, st, stindex, rtINT))^);
+ btU16, btS16: pword(res.dta)^ := word(pdword(ppcasmcall(rint, rfloat, address, st, stindex, rtINT))^);
+ btU32, btS32: pdword(res.dta)^ := pdword(ppcasmcall(rint, rfloat, address, st, stindex, rtINT))^;
+ btSingle: psingle(res.dta)^ := pdouble(ppcasmcall(rint, rfloat, address, st, stindex, rtFLOAT))^;
+ btDouble, btExtended: pdouble(res.dta)^ := pdouble(ppcasmcall(rint, rfloat, address, st, stindex, rtFLOAT))^;
+ btPChar: ppchar(res.dta)^ := pchar(pdword(ppcasmcall(rint, rfloat, address, st, stindex, rtINT))^);
+ btChar: pchar(res.dta)^ := char(pdword(ppcasmcall(rint, rfloat, address, st, stindex, rtINT))^);
+ btStaticArray, btRecord: ppcasmcall(rint, rfloat, address, st, stindex, rtINT);
+ btArray: res.dta := ppcasmcall(rint, rfloat, address, st, stindex, rtINT);
+
+ { TODO add and test }
+
+ else begin
+ writeln(stderr, 'Result type not implemented!');
+ exit;
+ end; { else }
+ end; { case }
+ end;
+
+ { cook dynamic arrays - fpc stores size-1 at @array-4 }
+ for i := 0 to Params.Count-1 do begin
+ fvar := Params[i];
+ if (fvar.aType.BaseType = btArray)
+ then inc(pdword(pointer(fvar.dta^)-4)^);
+ end;
+
+ Result := True;
+end;
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/uPSC_DB.pas b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSC_DB.pas
new file mode 100644
index 0000000..4c83191
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSC_DB.pas
@@ -0,0 +1,892 @@
+{ Compiletime DB support }
+Unit uPSC_DB;
+{
+This file has been generated by UnitParser v0.4, written by M. Knight.
+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
+
+Licence :
+This software is provided 'as-is', without any expressed or implied
+warranty. In no event will the author be held liable for any damages
+arising from the use of this software.
+Permission is granted to anyone to use this software for any kind of
+application, and to alter it and redistribute it freely, subject to
+the following restrictions:
+1. The origin of this software must not be misrepresented, you must
+ not claim that you wrote the original software.
+2. Altered source versions must be plainly marked as such, and must
+ not be misrepresented as being the original software.
+3. You may not create a library that uses this library as a main part
+ of the program and sell that library.
+4. You must have a visible line in your programs aboutbox or
+ documentation that it is made using Innerfuse Script and where
+ Innerfuse Pascal Script can be found.
+5. This notice may not be removed or altered from any source
+ distribution.
+
+If you have any questions concerning this license write to Carlo Kok:
+ ck@carlo-kok.com or try the newsserver:
+ news://news.carlo-kok.com/
+}
+{$I PascalScript.inc}
+Interface
+uses
+ uPSCompiler;
+
+procedure SIRegisterTDATASET(CL: TPSPascalCompiler);
+procedure SIRegisterTPARAMS(CL: TPSPascalCompiler);
+procedure SIRegisterTPARAM(CL: TPSPascalCompiler);
+procedure SIRegisterTGUIDFIELD(CL: TPSPascalCompiler);
+procedure SIRegisterTVARIANTFIELD(CL: TPSPascalCompiler);
+procedure SIRegisterTREFERENCEFIELD(CL: TPSPascalCompiler);
+procedure SIRegisterTDATASETFIELD(CL: TPSPascalCompiler);
+procedure SIRegisterTARRAYFIELD(CL: TPSPascalCompiler);
+procedure SIRegisterTADTFIELD(CL: TPSPascalCompiler);
+procedure SIRegisterTOBJECTFIELD(CL: TPSPascalCompiler);
+procedure SIRegisterTGRAPHICFIELD(CL: TPSPascalCompiler);
+procedure SIRegisterTMEMOFIELD(CL: TPSPascalCompiler);
+procedure SIRegisterTBLOBFIELD(CL: TPSPascalCompiler);
+{$IFDEF DELPHI6UP}
+procedure SIRegisterTFMTBCDFIELD(CL: TPSPascalCompiler);
+{$ENDIF}
+procedure SIRegisterTBCDFIELD(CL: TPSPascalCompiler);
+procedure SIRegisterTVARBYTESFIELD(CL: TPSPascalCompiler);
+procedure SIRegisterTBYTESFIELD(CL: TPSPascalCompiler);
+procedure SIRegisterTBINARYFIELD(CL: TPSPascalCompiler);
+procedure SIRegisterTTIMEFIELD(CL: TPSPascalCompiler);
+procedure SIRegisterTDATEFIELD(CL: TPSPascalCompiler);
+procedure SIRegisterTDATETIMEFIELD(CL: TPSPascalCompiler);
+procedure SIRegisterTBOOLEANFIELD(CL: TPSPascalCompiler);
+procedure SIRegisterTCURRENCYFIELD(CL: TPSPascalCompiler);
+procedure SIRegisterTFLOATFIELD(CL: TPSPascalCompiler);
+procedure SIRegisterTAUTOINCFIELD(CL: TPSPascalCompiler);
+procedure SIRegisterTWORDFIELD(CL: TPSPascalCompiler);
+procedure SIRegisterTLARGEINTFIELD(CL: TPSPascalCompiler);
+procedure SIRegisterTSMALLINTFIELD(CL: TPSPascalCompiler);
+procedure SIRegisterTINTEGERFIELD(CL: TPSPascalCompiler);
+procedure SIRegisterTNUMERICFIELD(CL: TPSPascalCompiler);
+procedure SIRegisterTWIDESTRINGFIELD(CL: TPSPascalCompiler);
+procedure SIRegisterTSTRINGFIELD(CL: TPSPascalCompiler);
+procedure SIRegisterTFIELD(CL: TPSPascalCompiler);
+procedure SIRegisterTLOOKUPLIST(CL: TPSPascalCompiler);
+procedure SIRegisterTFIELDS(CL: TPSPascalCompiler);
+procedure SIRegisterTFIELDLIST(CL: TPSPascalCompiler);
+procedure SIRegisterTFIELDDEFLIST(CL: TPSPascalCompiler);
+procedure SIRegisterTFLATLIST(CL: TPSPascalCompiler);
+procedure SIRegisterTINDEXDEFS(CL: TPSPascalCompiler);
+procedure SIRegisterTINDEXDEF(CL: TPSPascalCompiler);
+procedure SIRegisterTFIELDDEFS(CL: TPSPascalCompiler);
+procedure SIRegisterTFIELDDEF(CL: TPSPascalCompiler);
+procedure SIRegisterTDEFCOLLECTION(CL: TPSPascalCompiler);
+procedure SIRegisterTNAMEDITEM(CL: TPSPascalCompiler);
+procedure SIRegister_DB(Cl: TPSPascalCompiler);
+
+implementation
+Uses Sysutils;
+
+Function RegClassS(cl : TPSPascalCompiler;Const InheritsFrom,Classname : String) : TPSCompileTimeClass;
+begin
+Result := cl.FindClass(Classname);
+if Result = nil then
+ Result := cl.AddClassN(cl.FindClass(InheritsFrom),Classname)
+else
+ Result.ClassInheritsFrom := cl.FindClass(InheritsFrom);
+end;
+
+procedure SIRegisterTDATASET(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TCOMPONENT','TDATASET') do
+ begin
+ RegisterMethod('Function ACTIVEBUFFER : PCHAR');
+ RegisterMethod('Procedure APPEND');
+ RegisterMethod('Procedure APPENDRECORD( const VALUES : array of const)');
+// RegisterMethod('Function BOOKMARKVALID( BOOKMARK : TBOOKMARK) : BOOLEAN');
+ RegisterMethod('Procedure CANCEL');
+ RegisterMethod('Procedure CHECKBROWSEMODE');
+ RegisterMethod('Procedure CLEARFIELDS');
+ RegisterMethod('Procedure CLOSE');
+ RegisterMethod('Function CONTROLSDISABLED : BOOLEAN');
+// RegisterMethod('Function COMPAREBOOKMARKS( BOOKMARK1, BOOKMARK2 : TBOOKMARK) : INTEGER');
+ RegisterMethod('Function CREATEBLOBSTREAM( FIELD : TFIELD; MODE : TBLOBSTREAMMODE) : TSTREAM');
+ RegisterMethod('Procedure CURSORPOSCHANGED');
+ RegisterMethod('Procedure DELETE');
+ RegisterMethod('Procedure DISABLECONTROLS');
+ RegisterMethod('Procedure EDIT');
+ RegisterMethod('Procedure ENABLECONTROLS');
+{$IFDEF DELPHI2006UP}
+ RegisterMethod('Function FIELDBYNAME( const FIELDNAME : WIDESTRING) : TFIELD');
+ RegisterMethod('Function FINDFIELD( const FIELDNAME : WideString) : TFIELD');
+{$ELSE}
+ RegisterMethod('Function FIELDBYNAME( const FIELDNAME : STRING) : TFIELD');
+ RegisterMethod('Function FINDFIELD( const FIELDNAME : STRING) : TFIELD');
+{$ENDIF}
+ RegisterMethod('Function FINDFIRST : BOOLEAN');
+ RegisterMethod('Function FINDLAST : BOOLEAN');
+ RegisterMethod('Function FINDNEXT : BOOLEAN');
+ RegisterMethod('Function FINDPRIOR : BOOLEAN');
+ RegisterMethod('Procedure FIRST');
+// RegisterMethod('Procedure FREEBOOKMARK( BOOKMARK : TBOOKMARK)');
+// RegisterMethod('Function GETBOOKMARK : TBOOKMARK');
+ RegisterMethod('Function GETCURRENTRECORD( BUFFER : PCHAR) : BOOLEAN');
+// RegisterMethod('Procedure GETDETAILDATASETS( LIST : TLIST)');
+// RegisterMethod('Procedure GETFIELDLIST( LIST : TLIST; const FIELDNAMES : STRING)');
+// RegisterMethod('Procedure GETDETAILLINKFIELDS( MASTERFIELDS, DETAILFIELDS : TLIST)');
+// RegisterMethod('Function GETBLOBFIELDDATA( FIELDNO : INTEGER; var BUFFER : TBLOBBYTEDATA) : INTEGER');
+ RegisterMethod('Procedure GETFIELDNAMES( LIST : TSTRINGS)');
+// RegisterMethod('Procedure GOTOBOOKMARK( BOOKMARK : TBOOKMARK)');
+ RegisterMethod('Procedure INSERT');
+ RegisterMethod('Procedure INSERTRECORD( const VALUES : array of const)');
+ RegisterMethod('Function ISEMPTY : BOOLEAN');
+ RegisterMethod('Function ISLINKEDTO( DATASOURCE : TDATASOURCE) : BOOLEAN');
+ RegisterMethod('Function ISSEQUENCED : BOOLEAN');
+ RegisterMethod('Procedure LAST');
+ RegisterMethod('Function LOCATE( const KEYFIELDS : STRING; const KEYVALUES : VARIANT; OPTIONS : TLOCATEOPTIONS) : BOOLEAN');
+ RegisterMethod('Function LOOKUP( const KEYFIELDS : STRING; const KEYVALUES : VARIANT; const RESULTFIELDS : STRING) : VARIANT');
+ RegisterMethod('Function MOVEBY( DISTANCE : INTEGER) : INTEGER');
+ RegisterMethod('Procedure NEXT');
+ RegisterMethod('Procedure OPEN');
+ RegisterMethod('Procedure POST');
+ RegisterMethod('Procedure PRIOR');
+ RegisterMethod('Procedure REFRESH');
+// RegisterMethod('Procedure RESYNC( MODE : TRESYNCMODE)');
+ RegisterMethod('Procedure SETFIELDS( const VALUES : array of const)');
+ RegisterMethod('Function TRANSLATE( SRC, DEST : PCHAR; TOOEM : BOOLEAN) : INTEGER');
+ RegisterMethod('Procedure UPDATECURSORPOS');
+ RegisterMethod('Procedure UPDATERECORD');
+ RegisterMethod('Function UPDATESTATUS : TUPDATESTATUS');
+ RegisterProperty('AGGFIELDS', 'TFIELDS', iptr);
+ RegisterProperty('BOF', 'BOOLEAN', iptr);
+// RegisterProperty('BOOKMARK', 'TBOOKMARKSTR', iptrw);
+ RegisterProperty('CANMODIFY', 'BOOLEAN', iptr);
+ RegisterProperty('DATASETFIELD', 'TDATASETFIELD', iptrw);
+ RegisterProperty('DATASOURCE', 'TDATASOURCE', iptr);
+ RegisterProperty('DEFAULTFIELDS', 'BOOLEAN', iptr);
+ RegisterProperty('DESIGNER', 'TDATASETDESIGNER', iptr);
+ RegisterProperty('EOF', 'BOOLEAN', iptr);
+ RegisterProperty('BLOCKREADSIZE', 'INTEGER', iptrw);
+ RegisterProperty('FIELDCOUNT', 'INTEGER', iptr);
+ RegisterProperty('FIELDDEFS', 'TFIELDDEFS', iptrw);
+ RegisterProperty('FIELDDEFLIST', 'TFIELDDEFLIST', iptr);
+ RegisterProperty('FIELDS', 'TFIELDS', iptr);
+ RegisterProperty('FIELDLIST', 'TFIELDLIST', iptr);
+ RegisterProperty('FIELDVALUES', 'VARIANT STRING', iptrw);
+ RegisterProperty('FOUND', 'BOOLEAN', iptr);
+{$IFDEF DELPHI6UP}
+ RegisterProperty('ISUNIDIRECTIONAL', 'BOOLEAN', iptr);
+{$ENDIF}
+ RegisterProperty('MODIFIED', 'BOOLEAN', iptr);
+ RegisterProperty('OBJECTVIEW', 'BOOLEAN', iptrw);
+ RegisterProperty('RECORDCOUNT', 'INTEGER', iptr);
+ RegisterProperty('RECNO', 'INTEGER', iptrw);
+ RegisterProperty('RECORDSIZE', 'WORD', iptr);
+ RegisterProperty('SPARSEARRAYS', 'BOOLEAN', iptrw);
+ RegisterProperty('STATE', 'TDATASETSTATE', iptr);
+ RegisterProperty('FILTER', 'STRING', iptrw);
+ RegisterProperty('FILTERED', 'BOOLEAN', iptrw);
+ RegisterProperty('FILTEROPTIONS', 'TFILTEROPTIONS', iptrw);
+ RegisterProperty('ACTIVE', 'BOOLEAN', iptrw);
+ RegisterProperty('AUTOCALCFIELDS', 'BOOLEAN', iptrw);
+ RegisterProperty('BEFOREOPEN', 'TDATASETNOTIFYEVENT', iptrw);
+ RegisterProperty('AFTEROPEN', 'TDATASETNOTIFYEVENT', iptrw);
+ RegisterProperty('BEFORECLOSE', 'TDATASETNOTIFYEVENT', iptrw);
+ RegisterProperty('AFTERCLOSE', 'TDATASETNOTIFYEVENT', iptrw);
+ RegisterProperty('BEFOREINSERT', 'TDATASETNOTIFYEVENT', iptrw);
+ RegisterProperty('AFTERINSERT', 'TDATASETNOTIFYEVENT', iptrw);
+ RegisterProperty('BEFOREEDIT', 'TDATASETNOTIFYEVENT', iptrw);
+ RegisterProperty('AFTEREDIT', 'TDATASETNOTIFYEVENT', iptrw);
+ RegisterProperty('BEFOREPOST', 'TDATASETNOTIFYEVENT', iptrw);
+ RegisterProperty('AFTERPOST', 'TDATASETNOTIFYEVENT', iptrw);
+ RegisterProperty('BEFORECANCEL', 'TDATASETNOTIFYEVENT', iptrw);
+ RegisterProperty('AFTERCANCEL', 'TDATASETNOTIFYEVENT', iptrw);
+ RegisterProperty('BEFOREDELETE', 'TDATASETNOTIFYEVENT', iptrw);
+ RegisterProperty('AFTERDELETE', 'TDATASETNOTIFYEVENT', iptrw);
+ RegisterProperty('BEFORESCROLL', 'TDATASETNOTIFYEVENT', iptrw);
+ RegisterProperty('AFTERSCROLL', 'TDATASETNOTIFYEVENT', iptrw);
+ RegisterProperty('BEFOREREFRESH', 'TDATASETNOTIFYEVENT', iptrw);
+ RegisterProperty('AFTERREFRESH', 'TDATASETNOTIFYEVENT', iptrw);
+ RegisterProperty('ONCALCFIELDS', 'TDATASETNOTIFYEVENT', iptrw);
+ RegisterProperty('ONDELETEERROR', 'TDATASETERROREVENT', iptrw);
+ RegisterProperty('ONEDITERROR', 'TDATASETERROREVENT', iptrw);
+ RegisterProperty('ONFILTERRECORD', 'TFILTERRECORDEVENT', iptrw);
+ RegisterProperty('ONNEWRECORD', 'TDATASETNOTIFYEVENT', iptrw);
+ RegisterProperty('ONPOSTERROR', 'TDATASETERROREVENT', iptrw);
+ end;
+end;
+
+procedure SIRegisterTPARAMS(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TCOLLECTION','TPARAMS') do
+ begin
+ RegisterMethod('Procedure ASSIGNVALUES( VALUE : TPARAMS)');
+ RegisterMethod('Procedure ADDPARAM( VALUE : TPARAM)');
+ RegisterMethod('Procedure REMOVEPARAM( VALUE : TPARAM)');
+ RegisterMethod('Function CREATEPARAM( FLDTYPE : TFIELDTYPE; const PARAMNAME : STRING; PARAMTYPE : TPARAMTYPE) : TPARAM');
+// RegisterMethod('Procedure GETPARAMLIST( LIST : TLIST; const PARAMNAMES : STRING)');
+ RegisterMethod('Function ISEQUAL( VALUE : TPARAMS) : BOOLEAN');
+ RegisterMethod('Function PARSESQL( SQL : STRING; DOCREATE : BOOLEAN) : STRING');
+ RegisterMethod('Function PARAMBYNAME( const VALUE : STRING) : TPARAM');
+ RegisterMethod('Function FINDPARAM( const VALUE : STRING) : TPARAM');
+ RegisterProperty('ITEMS', 'TPARAM INTEGER', iptrw);
+ RegisterProperty('PARAMVALUES', 'VARIANT STRING', iptrw);
+ end;
+end;
+
+procedure SIRegisterTPARAM(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TCOLLECTIONITEM','TPARAM') do
+ begin
+ RegisterMethod('Procedure ASSIGNFIELD( FIELD : TFIELD)');
+ RegisterMethod('Procedure ASSIGNFIELDVALUE( FIELD : TFIELD; const VALUE : VARIANT)');
+ RegisterMethod('Procedure CLEAR');
+// RegisterMethod('Procedure GETDATA( BUFFER : POINTER)');
+ RegisterMethod('Function GETDATASIZE : INTEGER');
+ RegisterMethod('Procedure LOADFROMFILE( const FILENAME : STRING; BLOBTYPE : TBLOBTYPE)');
+ RegisterMethod('Procedure LOADFROMSTREAM( STREAM : TSTREAM; BLOBTYPE : TBLOBTYPE)');
+// RegisterMethod('Procedure SETBLOBDATA( BUFFER : POINTER; SIZE : INTEGER)');
+// RegisterMethod('Procedure SETDATA( BUFFER : POINTER)');
+{$IFDEF DELPHI6UP}
+ RegisterProperty('ASBCD', 'CURRENCY', iptrw);
+{$ENDIF}
+{$IFDEF DELPHI6UP}
+ RegisterProperty('ASFMTBCD', 'TBCD', iptrw);
+{$ENDIF}
+ RegisterProperty('ASBLOB', 'TBLOBDATA', iptrw);
+ RegisterProperty('ASBOOLEAN', 'BOOLEAN', iptrw);
+ RegisterProperty('ASCURRENCY', 'CURRENCY', iptrw);
+ RegisterProperty('ASDATE', 'TDATETIME', iptrw);
+ RegisterProperty('ASDATETIME', 'TDATETIME', iptrw);
+ RegisterProperty('ASFLOAT', 'DOUBLE', iptrw);
+ RegisterProperty('ASINTEGER', 'LONGINT', iptrw);
+ RegisterProperty('ASSMALLINT', 'LONGINT', iptrw);
+ RegisterProperty('ASMEMO', 'STRING', iptrw);
+ RegisterProperty('ASSTRING', 'STRING', iptrw);
+ RegisterProperty('ASTIME', 'TDATETIME', iptrw);
+ RegisterProperty('ASWORD', 'LONGINT', iptrw);
+ RegisterProperty('BOUND', 'BOOLEAN', iptrw);
+ RegisterProperty('ISNULL', 'BOOLEAN', iptr);
+ RegisterProperty('NATIVESTR', 'STRING', iptrw);
+ RegisterProperty('TEXT', 'STRING', iptrw);
+ RegisterProperty('DATATYPE', 'TFIELDTYPE', iptrw);
+{$IFDEF DELPHI6UP}
+ RegisterProperty('PRECISION', 'INTEGER', iptrw);
+ RegisterProperty('NUMERICSCALE', 'INTEGER', iptrw);
+ RegisterProperty('SIZE', 'INTEGER', iptrw);
+{$ENDIF}
+ RegisterProperty('NAME', 'STRING', iptrw);
+ RegisterProperty('PARAMTYPE', 'TPARAMTYPE', iptrw);
+ RegisterProperty('VALUE', 'VARIANT', iptrw);
+ end;
+end;
+
+procedure SIRegisterTGUIDFIELD(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TFIELD','TGUIDFIELD') do
+ begin
+ end;
+end;
+
+procedure SIRegisterTVARIANTFIELD(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TFIELD','TVARIANTFIELD') do
+ begin
+ end;
+end;
+
+procedure SIRegisterTREFERENCEFIELD(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TDATASETFIELD','TREFERENCEFIELD') do
+ begin
+ RegisterProperty('REFERENCETABLENAME', 'STRING', iptrw);
+ end;
+end;
+
+procedure SIRegisterTDATASETFIELD(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TOBJECTFIELD','TDATASETFIELD') do
+ begin
+ RegisterProperty('NESTEDDATASET', 'TDATASET', iptr);
+ RegisterProperty('INCLUDEOBJECTFIELD', 'BOOLEAN', iptrw);
+ end;
+end;
+
+procedure SIRegisterTARRAYFIELD(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TOBJECTFIELD','TARRAYFIELD') do
+ begin
+ end;
+end;
+
+procedure SIRegisterTADTFIELD(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TOBJECTFIELD','TADTFIELD') do
+ begin
+ end;
+end;
+
+procedure SIRegisterTOBJECTFIELD(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TFIELD','TOBJECTFIELD') do
+ begin
+ RegisterProperty('FIELDCOUNT', 'INTEGER', iptr);
+ RegisterProperty('FIELDS', 'TFIELDS', iptr);
+ RegisterProperty('FIELDVALUES', 'VARIANT INTEGER', iptrw);
+ RegisterProperty('UNNAMED', 'BOOLEAN', iptr);
+ RegisterProperty('OBJECTTYPE', 'STRING', iptrw);
+ end;
+end;
+
+procedure SIRegisterTGRAPHICFIELD(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TBLOBFIELD','TGRAPHICFIELD') do
+ begin
+ end;
+end;
+
+procedure SIRegisterTMEMOFIELD(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TBLOBFIELD','TMEMOFIELD') do
+ begin
+ end;
+end;
+
+procedure SIRegisterTBLOBFIELD(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TFIELD','TBLOBFIELD') do
+ begin
+ RegisterMethod('Procedure LOADFROMFILE( const FILENAME : STRING)');
+ RegisterMethod('Procedure LOADFROMSTREAM( STREAM : TSTREAM)');
+ RegisterMethod('Procedure SAVETOFILE( const FILENAME : STRING)');
+ RegisterMethod('Procedure SAVETOSTREAM( STREAM : TSTREAM)');
+ RegisterProperty('BLOBSIZE', 'INTEGER', iptr);
+ RegisterProperty('MODIFIED', 'BOOLEAN', iptrw);
+ RegisterProperty('VALUE', 'STRING', iptrw);
+ RegisterProperty('TRANSLITERATE', 'BOOLEAN', iptrw);
+ RegisterProperty('BLOBTYPE', 'TBLOBTYPE', iptrw);
+{$IFDEF DELPHI6UP}
+ RegisterProperty('GRAPHICHEADER', 'BOOLEAN', iptrw);
+{$ENDIF}
+ end;
+end;
+
+{$IFDEF DELPHI6UP}
+procedure SIRegisterTFMTBCDFIELD(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TNUMERICFIELD','TFMTBCDFIELD') do
+ begin
+ RegisterProperty('VALUE', 'TBCD', iptrw);
+ RegisterProperty('CURRENCY', 'BOOLEAN', iptrw);
+ RegisterProperty('MAXVALUE', 'STRING', iptrw);
+ RegisterProperty('MINVALUE', 'STRING', iptrw);
+ RegisterProperty('PRECISION', 'INTEGER', iptrw);
+ end;
+end;
+{$ENDIF}
+
+procedure SIRegisterTBCDFIELD(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TNUMERICFIELD','TBCDFIELD') do
+ begin
+ RegisterProperty('VALUE', 'CURRENCY', iptrw);
+ RegisterProperty('CURRENCY', 'BOOLEAN', iptrw);
+ RegisterProperty('MAXVALUE', 'CURRENCY', iptrw);
+ RegisterProperty('MINVALUE', 'CURRENCY', iptrw);
+ RegisterProperty('PRECISION', 'INTEGER', iptrw);
+ end;
+end;
+
+procedure SIRegisterTVARBYTESFIELD(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TBYTESFIELD','TVARBYTESFIELD') do
+ begin
+ end;
+end;
+
+procedure SIRegisterTBYTESFIELD(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TBINARYFIELD','TBYTESFIELD') do
+ begin
+ end;
+end;
+
+procedure SIRegisterTBINARYFIELD(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TFIELD','TBINARYFIELD') do
+ begin
+ end;
+end;
+
+procedure SIRegisterTTIMEFIELD(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TDATETIMEFIELD','TTIMEFIELD') do
+ begin
+ end;
+end;
+
+procedure SIRegisterTDATEFIELD(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TDATETIMEFIELD','TDATEFIELD') do
+ begin
+ end;
+end;
+
+procedure SIRegisterTDATETIMEFIELD(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TFIELD','TDATETIMEFIELD') do
+ begin
+ RegisterProperty('VALUE', 'TDATETIME', iptrw);
+ RegisterProperty('DISPLAYFORMAT', 'STRING', iptrw);
+ end;
+end;
+
+procedure SIRegisterTBOOLEANFIELD(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TFIELD','TBOOLEANFIELD') do
+ begin
+ RegisterProperty('VALUE', 'BOOLEAN', iptrw);
+ RegisterProperty('DISPLAYVALUES', 'STRING', iptrw);
+ end;
+end;
+
+procedure SIRegisterTCURRENCYFIELD(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TFLOATFIELD','TCURRENCYFIELD') do
+ begin
+ end;
+end;
+
+procedure SIRegisterTFLOATFIELD(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TNUMERICFIELD','TFLOATFIELD') do
+ begin
+ RegisterProperty('VALUE', 'DOUBLE', iptrw);
+ RegisterProperty('CURRENCY', 'BOOLEAN', iptrw);
+ RegisterProperty('MAXVALUE', 'DOUBLE', iptrw);
+ RegisterProperty('MINVALUE', 'DOUBLE', iptrw);
+ RegisterProperty('PRECISION', 'INTEGER', iptrw);
+ end;
+end;
+
+procedure SIRegisterTAUTOINCFIELD(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TINTEGERFIELD','TAUTOINCFIELD') do
+ begin
+ end;
+end;
+
+procedure SIRegisterTWORDFIELD(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TINTEGERFIELD','TWORDFIELD') do
+ begin
+ end;
+end;
+
+procedure SIRegisterTLARGEINTFIELD(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TNUMERICFIELD','TLARGEINTFIELD') do
+ begin
+ RegisterProperty('ASLARGEINT', 'LARGEINT', iptrw);
+ RegisterProperty('VALUE', 'LARGEINT', iptrw);
+ RegisterProperty('MAXVALUE', 'LARGEINT', iptrw);
+ RegisterProperty('MINVALUE', 'LARGEINT', iptrw);
+ end;
+end;
+
+procedure SIRegisterTSMALLINTFIELD(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TINTEGERFIELD','TSMALLINTFIELD') do
+ begin
+ end;
+end;
+
+procedure SIRegisterTINTEGERFIELD(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TNUMERICFIELD','TINTEGERFIELD') do
+ begin
+ RegisterProperty('VALUE', 'LONGINT', iptrw);
+ RegisterProperty('MAXVALUE', 'LONGINT', iptrw);
+ RegisterProperty('MINVALUE', 'LONGINT', iptrw);
+ end;
+end;
+
+procedure SIRegisterTNUMERICFIELD(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TFIELD','TNUMERICFIELD') do
+ begin
+ RegisterProperty('DISPLAYFORMAT', 'STRING', iptrw);
+ RegisterProperty('EDITFORMAT', 'STRING', iptrw);
+ end;
+end;
+
+procedure SIRegisterTWIDESTRINGFIELD(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TSTRINGFIELD','TWIDESTRINGFIELD') do
+ begin
+ RegisterProperty('VALUE', 'WIDESTRING', iptrw);
+ end;
+end;
+
+procedure SIRegisterTSTRINGFIELD(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TFIELD','TSTRINGFIELD') do
+ begin
+ RegisterProperty('VALUE', 'STRING', iptrw);
+ RegisterProperty('FIXEDCHAR', 'BOOLEAN', iptrw);
+ RegisterProperty('TRANSLITERATE', 'BOOLEAN', iptrw);
+ end;
+end;
+
+procedure SIRegisterTFIELD(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TCOMPONENT','TFIELD') do
+ begin
+//RegisterMethod('Procedure ASSIGNVALUE( const VALUE : TVARREC)');
+ RegisterMethod('Procedure CLEAR');
+ RegisterMethod('Procedure FOCUSCONTROL');
+// RegisterMethod('Function GETDATA( BUFFER : POINTER; NATIVEFORMAT : BOOLEAN) : BOOLEAN');
+ RegisterMethod('Function ISVALIDCHAR( INPUTCHAR : CHAR) : BOOLEAN');
+ RegisterMethod('Procedure REFRESHLOOKUPLIST');
+// RegisterMethod('Procedure SETDATA( BUFFER : POINTER; NATIVEFORMAT : BOOLEAN)');
+ RegisterMethod('Procedure SETFIELDTYPE( VALUE : TFIELDTYPE)');
+// RegisterMethod('Procedure VALIDATE( BUFFER : POINTER)');
+{$IFDEF DELPHI6UP}
+ RegisterProperty('ASBCD', 'TBCD', iptrw);
+{$ENDIF}
+ RegisterProperty('ASBOOLEAN', 'BOOLEAN', iptrw);
+ RegisterProperty('ASCURRENCY', 'CURRENCY', iptrw);
+ RegisterProperty('ASDATETIME', 'TDATETIME', iptrw);
+ RegisterProperty('ASFLOAT', 'DOUBLE', iptrw);
+ RegisterProperty('ASINTEGER', 'LONGINT', iptrw);
+ RegisterProperty('ASSTRING', 'STRING', iptrw);
+ RegisterProperty('ASVARIANT', 'VARIANT', iptrw);
+ RegisterProperty('ATTRIBUTESET', 'STRING', iptrw);
+ RegisterProperty('CALCULATED', 'BOOLEAN', iptrw);
+ RegisterProperty('CANMODIFY', 'BOOLEAN', iptr);
+ RegisterProperty('CURVALUE', 'VARIANT', iptr);
+ RegisterProperty('DATASET', 'TDATASET', iptrw);
+ RegisterProperty('DATASIZE', 'INTEGER', iptr);
+ RegisterProperty('DATATYPE', 'TFIELDTYPE', iptr);
+ RegisterProperty('DISPLAYNAME', 'STRING', iptr);
+ RegisterProperty('DISPLAYTEXT', 'STRING', iptr);
+ RegisterProperty('EDITMASK', 'TEDITMASK', iptrw);
+ RegisterProperty('EDITMASKPTR', 'TEDITMASK', iptr);
+ RegisterProperty('EDITMASK', 'STRING', iptrw);
+ RegisterProperty('EDITMASKPTR', 'STRING', iptr);
+ RegisterProperty('FIELDNO', 'INTEGER', iptr);
+ RegisterProperty('FULLNAME', 'STRING', iptr);
+ RegisterProperty('ISINDEXFIELD', 'BOOLEAN', iptr);
+ RegisterProperty('ISNULL', 'BOOLEAN', iptr);
+ RegisterProperty('LOOKUP', 'BOOLEAN', iptrw);
+ RegisterProperty('LOOKUPLIST', 'TLOOKUPLIST', iptr);
+ RegisterProperty('NEWVALUE', 'VARIANT', iptrw);
+ RegisterProperty('OFFSET', 'INTEGER', iptr);
+ RegisterProperty('OLDVALUE', 'VARIANT', iptr);
+ RegisterProperty('PARENTFIELD', 'TOBJECTFIELD', iptrw);
+ RegisterProperty('SIZE', 'INTEGER', iptrw);
+ RegisterProperty('TEXT', 'STRING', iptrw);
+ RegisterProperty('VALIDCHARS', 'TFIELDCHARS', iptrw);
+ RegisterProperty('VALUE', 'VARIANT', iptrw);
+ RegisterProperty('ALIGNMENT', 'TALIGNMENT', iptrw);
+ RegisterProperty('AUTOGENERATEVALUE', 'TAUTOREFRESHFLAG', iptrw);
+ RegisterProperty('CUSTOMCONSTRAINT', 'STRING', iptrw);
+ RegisterProperty('CONSTRAINTERRORMESSAGE', 'STRING', iptrw);
+ RegisterProperty('DEFAULTEXPRESSION', 'STRING', iptrw);
+ RegisterProperty('DISPLAYLABEL', 'STRING', iptrw);
+ RegisterProperty('DISPLAYWIDTH', 'INTEGER', iptrw);
+ RegisterProperty('FIELDKIND', 'TFIELDKIND', iptrw);
+ RegisterProperty('FIELDNAME', 'STRING', iptrw);
+ RegisterProperty('HASCONSTRAINTS', 'BOOLEAN', iptr);
+ RegisterProperty('INDEX', 'INTEGER', iptrw);
+ RegisterProperty('IMPORTEDCONSTRAINT', 'STRING', iptrw);
+ RegisterProperty('LOOKUPDATASET', 'TDATASET', iptrw);
+ RegisterProperty('LOOKUPKEYFIELDS', 'STRING', iptrw);
+ RegisterProperty('LOOKUPRESULTFIELD', 'STRING', iptrw);
+ RegisterProperty('KEYFIELDS', 'STRING', iptrw);
+ RegisterProperty('LOOKUPCACHE', 'BOOLEAN', iptrw);
+ RegisterProperty('ORIGIN', 'STRING', iptrw);
+ RegisterProperty('PROVIDERFLAGS', 'TPROVIDERFLAGS', iptrw);
+ RegisterProperty('READONLY', 'BOOLEAN', iptrw);
+ RegisterProperty('REQUIRED', 'BOOLEAN', iptrw);
+ RegisterProperty('VISIBLE', 'BOOLEAN', iptrw);
+ RegisterProperty('ONCHANGE', 'TFIELDNOTIFYEVENT', iptrw);
+ RegisterProperty('ONGETTEXT', 'TFIELDGETTEXTEVENT', iptrw);
+ RegisterProperty('ONSETTEXT', 'TFIELDSETTEXTEVENT', iptrw);
+ RegisterProperty('ONVALIDATE', 'TFIELDNOTIFYEVENT', iptrw);
+ end;
+end;
+
+procedure SIRegisterTLOOKUPLIST(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TOBJECT','TLOOKUPLIST') do
+ begin
+ RegisterMethod('Constructor CREATE');
+ RegisterMethod('Procedure ADD( const AKEY, AVALUE : VARIANT)');
+ RegisterMethod('Procedure CLEAR');
+ RegisterMethod('Function VALUEOFKEY( const AKEY : VARIANT) : VARIANT');
+ end;
+end;
+
+procedure SIRegisterTFIELDS(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TOBJECT','TFIELDS') do
+ begin
+ RegisterMethod('Constructor CREATE( ADATASET : TDATASET)');
+ RegisterMethod('Procedure ADD( FIELD : TFIELD)');
+ RegisterMethod('Procedure CHECKFIELDNAME( const FIELDNAME : STRING)');
+ RegisterMethod('Procedure CHECKFIELDNAMES( const FIELDNAMES : STRING)');
+ RegisterMethod('Procedure CLEAR');
+ RegisterMethod('Function FINDFIELD( const FIELDNAME : STRING) : TFIELD');
+ RegisterMethod('Function FIELDBYNAME( const FIELDNAME : STRING) : TFIELD');
+ RegisterMethod('Function FIELDBYNUMBER( FIELDNO : INTEGER) : TFIELD');
+ RegisterMethod('Procedure GETFIELDNAMES( LIST : TSTRINGS)');
+ RegisterMethod('Function INDEXOF( FIELD : TFIELD) : INTEGER');
+ RegisterMethod('Procedure REMOVE( FIELD : TFIELD)');
+ RegisterProperty('COUNT', 'INTEGER', iptr);
+ RegisterProperty('DATASET', 'TDATASET', iptr);
+ RegisterProperty('FIELDS', 'TFIELD INTEGER', iptrw);
+ end;
+end;
+
+procedure SIRegisterTFIELDLIST(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TFLATLIST','TFIELDLIST') do
+ begin
+ RegisterMethod('Function FIELDBYNAME( const NAME : STRING) : TFIELD');
+ RegisterMethod('Function FIND( const NAME : STRING) : TFIELD');
+ RegisterProperty('FIELDS', 'TFIELD INTEGER', iptr);
+ end;
+end;
+
+procedure SIRegisterTFIELDDEFLIST(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TFLATLIST','TFIELDDEFLIST') do
+ begin
+ RegisterMethod('Function FIELDBYNAME( const NAME : STRING) : TFIELDDEF');
+ RegisterMethod('Function FIND( const NAME : STRING) : TFIELDDEF');
+ RegisterProperty('FIELDDEFS', 'TFIELDDEF INTEGER', iptr);
+ end;
+end;
+
+procedure SIRegisterTFLATLIST(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TSTRINGLIST','TFLATLIST') do
+ begin
+ RegisterMethod('Constructor CREATE( ADATASET : TDATASET)');
+ RegisterMethod('Procedure UPDATE');
+ RegisterProperty('DATASET', 'TDATASET', iptr);
+ end;
+end;
+
+procedure SIRegisterTINDEXDEFS(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TDEFCOLLECTION','TINDEXDEFS') do
+ begin
+ RegisterMethod('Constructor CREATE( ADATASET : TDATASET)');
+ RegisterMethod('Function ADDINDEXDEF : TINDEXDEF');
+ RegisterMethod('Function FIND( const NAME : STRING) : TINDEXDEF');
+ RegisterMethod('Procedure UPDATE');
+ RegisterMethod('Function FINDINDEXFORFIELDS( const FIELDS : STRING) : TINDEXDEF');
+ RegisterMethod('Function GETINDEXFORFIELDS( const FIELDS : STRING; CASEINSENSITIVE : BOOLEAN) : TINDEXDEF');
+ RegisterMethod('Procedure ADD( const NAME, FIELDS : STRING; OPTIONS : TINDEXOPTIONS)');
+ RegisterProperty('ITEMS', 'TINDEXDEF INTEGER', iptrw);
+ end;
+end;
+
+procedure SIRegisterTINDEXDEF(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TNAMEDITEM','TINDEXDEF') do
+ begin
+ RegisterMethod('Constructor CREATE( OWNER : TINDEXDEFS; const NAME, FIELDS : STRING; OPTIONS : TINDEXOPTIONS)');
+ RegisterProperty('FIELDEXPRESSION', 'STRING', iptr);
+ RegisterProperty('CASEINSFIELDS', 'STRING', iptrw);
+ RegisterProperty('DESCFIELDS', 'STRING', iptrw);
+ RegisterProperty('EXPRESSION', 'STRING', iptrw);
+ RegisterProperty('FIELDS', 'STRING', iptrw);
+ RegisterProperty('OPTIONS', 'TINDEXOPTIONS', iptrw);
+ RegisterProperty('SOURCE', 'STRING', iptrw);
+ RegisterProperty('GROUPINGLEVEL', 'INTEGER', iptrw);
+ end;
+end;
+
+procedure SIRegisterTFIELDDEFS(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TDEFCOLLECTION','TFIELDDEFS') do
+ begin
+ RegisterMethod('Constructor CREATE( AOWNER : TPERSISTENT)');
+ RegisterMethod('Function ADDFIELDDEF : TFIELDDEF');
+ RegisterMethod('Function FIND( const NAME : STRING) : TFIELDDEF');
+ RegisterMethod('Procedure UPDATE');
+ RegisterMethod('Procedure ADD( const NAME : STRING; DATATYPE : TFIELDTYPE; SIZE : INTEGER; REQUIRED : BOOLEAN)');
+ RegisterProperty('HIDDENFIELDS', 'BOOLEAN', iptrw);
+ RegisterProperty('ITEMS', 'TFIELDDEF INTEGER', iptrw);
+ RegisterProperty('PARENTDEF', 'TFIELDDEF', iptr);
+ end;
+end;
+
+procedure SIRegisterTFIELDDEF(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TNAMEDITEM','TFIELDDEF') do
+ begin
+// RegisterMethod('Constructor CREATE( OWNER : TFIELDDEFS; const NAME : STRING; DATATYPE : TFIELDTYPE; SIZE : INTEGER; REQUIRED : BOOLEAN; FIELDNO : INTEGER)');
+ RegisterMethod('Function ADDCHILD : TFIELDDEF');
+ RegisterMethod('Function CREATEFIELD( OWNER : TCOMPONENT; PARENTFIELD : TOBJECTFIELD; const FIELDNAME : STRING; CREATECHILDREN : BOOLEAN) : TFIELD');
+ RegisterMethod('Function HASCHILDDEFS : BOOLEAN');
+ RegisterProperty('FIELDCLASS', 'TFIELDCLASS', iptr);
+ RegisterProperty('FIELDNO', 'INTEGER', iptrw);
+ RegisterProperty('INTERNALCALCFIELD', 'BOOLEAN', iptrw);
+ RegisterProperty('PARENTDEF', 'TFIELDDEF', iptr);
+ RegisterProperty('REQUIRED', 'BOOLEAN', iptrw);
+ RegisterProperty('ATTRIBUTES', 'TFIELDATTRIBUTES', iptrw);
+ RegisterProperty('CHILDDEFS', 'TFIELDDEFS', iptrw);
+ RegisterProperty('DATATYPE', 'TFIELDTYPE', iptrw);
+ RegisterProperty('PRECISION', 'INTEGER', iptrw);
+ RegisterProperty('SIZE', 'INTEGER', iptrw);
+ end;
+end;
+
+procedure SIRegisterTDEFCOLLECTION(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TOWNEDCOLLECTION','TDEFCOLLECTION') do
+ begin
+// RegisterMethod('Constructor CREATE( ADATASET : TDATASET; AOWNER : TPERSISTENT; ACLASS : TCOLLECTIONITEMCLASS)');
+ RegisterMethod('Function FIND( const ANAME : STRING) : TNAMEDITEM');
+ RegisterMethod('Procedure GETITEMNAMES( LIST : TSTRINGS)');
+ RegisterMethod('Function INDEXOF( const ANAME : STRING) : INTEGER');
+ RegisterProperty('DATASET', 'TDATASET', iptr);
+ RegisterProperty('UPDATED', 'BOOLEAN', iptrw);
+ end;
+end;
+
+procedure SIRegisterTNAMEDITEM(CL: TPSPascalCompiler);
+Begin
+With RegClassS(cl,'TCOLLECTIONITEM','TNAMEDITEM') do
+ begin
+ RegisterProperty('NAME', 'STRING', iptrw);
+ end;
+end;
+
+procedure SIRegister_DB(Cl: TPSPascalCompiler);
+Begin
+cl.AddTypeS('TFieldType', '(ftUnknown, ftString, ftSmallint, ftInteger, ftWord, ftBoolean, ftFloat, ftCurrency, ftBCD, ftDate, ftTime, ftDateTime,'+
+ 'ftBytes, ftVarBytes, ftAutoInc, ftBlob, ftMemo, ftGraphic, ftFmtMemo, ftParadoxOle, ftDBaseOle, ftTypedBinary, ftCursor, ftFixedChar, ftWideString,'+
+ 'ftLargeint, ftADT, ftArray, ftReference, ftDataSet, ftOraBlob, ftOraClob, ftVariant, ftInterface, ftIDispatch, ftGuid, ftTimeStamp, ftFMTBcd)');
+
+ CL.AddTypeS('TDataSetState', '(dsInactive, dsBrowse, dsEdit, dsInsert, dsSetKey, dsCalcFields, dsFilter, dsNewValue, dsOldValue, dsCurValue, dsBlockRead, dsInternalCalc, dsOpening)');
+
+cl.addTypeS('TLocateOption','(loCaseInsensitive, loPartialKey)');
+cl.addtypes('TLocateOptions','set of TLocateOption');
+cl.addtypes('TUpdateStatus','(usUnmodified, usModified, usInserted, usDeleted)');
+cl.addtypes('TUpdateStatusSet', 'set of TUpdateStatus');
+
+ cl.addTypeS('TPARAMTYPE', 'BYTE');
+RegClassS(cl,'TComponent','TDATASET');
+RegClassS(cl,'TComponent','TFIELD');
+RegClassS(cl,'TComponent','TFIELDDEFS');
+RegClassS(cl,'TComponent','TINDEXDEFS');
+RegClassS(cl, 'TComponent', 'TObjectField');
+RegClassS(cl, 'TComponent', 'TDataLink');
+RegClassS(cl, 'TComponent', 'TDataSource');
+RegClassS(cl, 'TComponent', 'TParam');
+
+SIRegisterTNAMEDITEM(Cl);
+Cl.addTypeS('TDEFUPDATEMETHOD', 'Procedure');
+SIRegisterTDEFCOLLECTION(Cl);
+cl.AddConstantN('FAHIDDENCOL','LONGINT').Value.tu32 := 1;
+cl.AddConstantN('FAREADONLY','LONGINT').Value.tu32 := 2;
+cl.AddConstantN('FAREQUIRED','LONGINT').Value.tu32 := 4;
+cl.AddConstantN('FALINK','LONGINT').Value.tu32 := 8;
+cl.AddConstantN('FAUNNAMED','LONGINT').Value.tu32 := 16;
+cl.AddConstantN('FAFIXED','LONGINT').Value.tu32 := 32;
+cl.addTypeS('TFIELDATTRIBUTES', 'BYTE');
+SIRegisterTFIELDDEF(Cl);
+SIRegisterTFIELDDEFS(Cl);
+cl.AddConstantN('IXPRIMARY','LONGINT').Value.tu32 := 1;
+cl.AddConstantN('IXUNIQUE','LONGINT').Value.tu32 := 2;
+cl.AddConstantN('IXDESCENDING','LONGINT').Value.tu32 := 4;
+cl.AddConstantN('IXCASEINSENSITIVE','LONGINT').Value.tu32 := 8;
+cl.AddConstantN('IXEXPRESSION','LONGINT').Value.tu32 := 16;
+cl.AddConstantN('IXNONMAINTAINED','LONGINT').Value.tu32 := 32;
+cl.addTypeS('TINDEXOPTIONS', 'BYTE');
+SIRegisterTINDEXDEF(Cl);
+SIRegisterTINDEXDEFS(Cl);
+SIRegisterTFLATLIST(Cl);
+SIRegisterTFIELDDEFLIST(Cl);
+SIRegisterTFIELDLIST(Cl);
+cl.AddConstantN('FKDATA','LONGINT').Value.tu32 := 1;
+cl.AddConstantN('FKCALCULATED','LONGINT').Value.tu32 := 2;
+cl.AddConstantN('FKLOOKUP','LONGINT').Value.tu32 := 4;
+cl.AddConstantN('FKINTERNALCALC','LONGINT').Value.tu32 := 8;
+cl.AddConstantN('FKAGGREGATE','LONGINT').Value.tu32 := 16;
+cl.addTypeS('TFIELDKINDS', 'BYTE');
+SIRegisterTFIELDS(Cl);
+cl.AddConstantN('PFINUPDATE','LONGINT').Value.tu32 := 1;
+cl.AddConstantN('PFINWHERE','LONGINT').Value.tu32 := 2;
+cl.AddConstantN('PFINKEY','LONGINT').Value.tu32 := 4;
+cl.AddConstantN('PFHIDDEN','LONGINT').Value.tu32 :=8;
+cl.addTypeS('TPROVIDERFLAGS', 'BYTE');
+cl.addTypeS('TFIELDNOTIFYEVENT', 'Procedure ( SENDER : TFIELD)');
+cl.addTypeS('TFIELDGETTEXTEVENT', 'Procedure ( SENDER : TFIELD; var TEXT : S'
+ +'TRING; DISPLAYTEXT : BOOLEAN)');
+cl.addTypeS('TFIELDSETTEXTEVENT', 'Procedure ( SENDER : TFIELD; const TEXT :'
+ +' STRING)');
+cl.addTypeS('TAUTOREFRESHFLAG', '( ARNONE, ARAUTOINC, ARDEFAULT )');
+SIRegisterTLOOKUPLIST(Cl);
+SIRegisterTFIELD(Cl);
+SIRegisterTSTRINGFIELD(Cl);
+SIRegisterTWIDESTRINGFIELD(Cl);
+SIRegisterTNUMERICFIELD(Cl);
+SIRegisterTINTEGERFIELD(Cl);
+SIRegisterTSMALLINTFIELD(Cl);
+cl.addTypeS('LARGEINT', 'INT64');
+SIRegisterTLARGEINTFIELD(Cl);
+SIRegisterTWORDFIELD(Cl);
+SIRegisterTAUTOINCFIELD(Cl);
+SIRegisterTFLOATFIELD(Cl);
+SIRegisterTCURRENCYFIELD(Cl);
+SIRegisterTBOOLEANFIELD(Cl);
+SIRegisterTDATETIMEFIELD(Cl);
+SIRegisterTDATEFIELD(Cl);
+SIRegisterTTIMEFIELD(Cl);
+SIRegisterTBINARYFIELD(Cl);
+SIRegisterTBYTESFIELD(Cl);
+SIRegisterTVARBYTESFIELD(Cl);
+SIRegisterTBCDFIELD(Cl);
+{$IFDEF DELPHI6UP}
+SIRegisterTFMTBCDFIELD(Cl);
+{$ENDIF}
+cl.addTypeS('TBLOBTYPE', 'BYTE');
+SIRegisterTBLOBFIELD(Cl);
+SIRegisterTMEMOFIELD(Cl);
+SIRegisterTGRAPHICFIELD(Cl);
+SIRegisterTOBJECTFIELD(Cl);
+SIRegisterTADTFIELD(Cl);
+SIRegisterTARRAYFIELD(Cl);
+SIRegisterTDATASETFIELD(Cl);
+SIRegisterTREFERENCEFIELD(Cl);
+SIRegisterTVARIANTFIELD(Cl);
+SIRegisterTGUIDFIELD(Cl);
+cl.addTypeS('TBLOBDATA', 'STRING');
+cl.AddConstantN('PTUNKNOWN','LONGINT').Value.tu32 := 1;
+cl.AddConstantN('PTINPUT','LONGINT').Value.tu32 := 2;
+cl.AddConstantN('PTOUTPUT','LONGINT').Value.tu32 := 4;
+cl.AddConstantN('PTINPUTOUTPUT','LONGINT').Value.tu32 := 8;
+cl.AddConstantN('PTRESULT','LONGINT').Value.tu32 := 16;
+RegClassS(cl,'TObject','TPARAMS');
+SIRegisterTPARAM(Cl);
+SIRegisterTPARAMS(Cl);
+cl.addTypeS('TDATAACTION', '( DAFAIL, DAABORT, DARETRY )');
+cl.addTypeS('TBLOBSTREAMMODE', '( BMREAD, BMWRITE, BMREADWRITE )');
+cl.addTypeS('TDATAOPERATION', 'Procedure');
+cl.addTypeS('TDATASETNOTIFYEVENT', 'Procedure ( DATASET : TDATASET)');
+cl.addTypeS('TDATASETERROREVENT', 'Procedure ( DATASET : TDATASET; E : TObject'
+ +'; var ACTION : TDATAACTION)');
+cl.addTypeS('TFILTERRECORDEVENT', 'Procedure ( DATASET : TDATASET; var ACCEP'
+ +'T : BOOLEAN)');
+SIRegisterTDATASET(Cl);
+end;
+
+{$IFDEF USEIMPORTER}
+initialization
+CIImporter.AddCallBack(@SIRegister_DB,PT_ClassImport);
+{$ENDIF}
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/uPSC_buttons.pas b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSC_buttons.pas
new file mode 100644
index 0000000..52c0873
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSC_buttons.pas
@@ -0,0 +1,87 @@
+{ Compiletime Buttons support }
+unit uPSC_buttons;
+{$I PascalScript.inc}
+interface
+uses
+ uPSCompiler, uPSUtils;
+
+{
+ Will register files from:
+ Buttons
+
+ Requires
+ STD, classes, controls and graphics and StdCtrls
+}
+procedure SIRegister_Buttons_TypesAndConsts(Cl: TPSPascalCompiler);
+
+procedure SIRegisterTSPEEDBUTTON(Cl: TPSPascalCompiler);
+procedure SIRegisterTBITBTN(Cl: TPSPascalCompiler);
+
+procedure SIRegister_Buttons(Cl: TPSPascalCompiler);
+
+implementation
+
+procedure SIRegisterTSPEEDBUTTON(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TGRAPHICCONTROL'), 'TSPEEDBUTTON') do
+ begin
+ RegisterProperty('ALLOWALLUP', 'BOOLEAN', iptrw);
+ RegisterProperty('GROUPINDEX', 'INTEGER', iptrw);
+ RegisterProperty('DOWN', 'BOOLEAN', iptrw);
+ RegisterProperty('CAPTION', 'String', iptrw);
+ RegisterProperty('FONT', 'TFont', iptrw);
+ RegisterProperty('GLYPH', 'TBITMAP', iptrw);
+ RegisterProperty('LAYOUT', 'TBUTTONLAYOUT', iptrw);
+ RegisterProperty('MARGIN', 'INTEGER', iptrw);
+ RegisterProperty('NUMGLYPHS', 'BYTE', iptrw);
+ RegisterProperty('PARENTFONT', 'Boolean', iptrw);
+ RegisterProperty('PARENTSHOWHINT', 'Boolean', iptrw);
+ RegisterProperty('SPACING', 'INTEGER', iptrw);
+ RegisterProperty('ONCLICK', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONDBLCLICK', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONMOUSEDOWN', 'TMouseEvent', iptrw);
+ RegisterProperty('ONMOUSEMOVE', 'TMouseMoveEvent', iptrw);
+ RegisterProperty('ONMOUSEUP', 'TMouseEvent', iptrw);
+ end;
+end;
+
+procedure SIRegisterTBITBTN(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TBUTTON'), 'TBITBTN') do
+ begin
+ RegisterProperty('GLYPH', 'TBITMAP', iptrw);
+ RegisterProperty('KIND', 'TBITBTNKIND', iptrw);
+ RegisterProperty('LAYOUT', 'TBUTTONLAYOUT', iptrw);
+ RegisterProperty('MARGIN', 'INTEGER', iptrw);
+ RegisterProperty('NUMGLYPHS', 'BYTE', iptrw);
+ RegisterProperty('STYLE', 'TBUTTONSTYLE', iptrw);
+ RegisterProperty('SPACING', 'INTEGER', iptrw);
+ end;
+end;
+
+
+
+procedure SIRegister_Buttons_TypesAndConsts(Cl: TPSPascalCompiler);
+begin
+ Cl.AddTypeS('TButtonLayout', '(blGlyphLeft, blGlyphRight, blGlyphTop, blGlyphBottom)');
+ Cl.AddTypeS('TButtonState', '(bsUp, bsDisabled, bsDown, bsExclusive)');
+ Cl.AddTypeS('TButtonStyle', '(bsAutoDetect, bsWin31, bsNew)');
+ Cl.AddTypeS('TBitBtnKind', '(bkCustom, bkOK, bkCancel, bkHelp, bkYes, bkNo, bkClose, bkAbort, bkRetry, bkIgnore, bkAll)');
+
+end;
+
+procedure SIRegister_Buttons(Cl: TPSPascalCompiler);
+begin
+ SIRegister_Buttons_TypesAndConsts(cl);
+ SIRegisterTSPEEDBUTTON(cl);
+ SIRegisterTBITBTN(cl);
+end;
+
+// PS_MINIVCL changes by Martijn Laan (mlaan at wintax _dot_ nl)
+
+
+end.
+
+
+
+
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/uPSC_classes.pas b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSC_classes.pas
new file mode 100644
index 0000000..1534334
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSC_classes.pas
@@ -0,0 +1,320 @@
+{ Compiletime Classes support }
+unit uPSC_classes;
+
+{$I PascalScript.inc}
+interface
+uses
+ uPSCompiler, uPSUtils;
+
+{
+ Will register files from:
+ Classes (exception TPersistent and TComponent)
+
+ Register STD first
+
+}
+
+procedure SIRegister_Classes_TypesAndConsts(Cl: TPSPascalCompiler);
+
+procedure SIRegisterTStrings(cl: TPSPascalCompiler; Streams: Boolean);
+procedure SIRegisterTStringList(cl: TPSPascalCompiler);
+{$IFNDEF PS_MINIVCL}
+procedure SIRegisterTBITS(Cl: TPSPascalCompiler);
+{$ENDIF}
+procedure SIRegisterTSTREAM(Cl: TPSPascalCompiler);
+procedure SIRegisterTHANDLESTREAM(Cl: TPSPascalCompiler);
+{$IFNDEF PS_MINIVCL}
+procedure SIRegisterTMEMORYSTREAM(Cl: TPSPascalCompiler);
+{$ENDIF}
+procedure SIRegisterTFILESTREAM(Cl: TPSPascalCompiler);
+{$IFNDEF PS_MINIVCL}
+procedure SIRegisterTCUSTOMMEMORYSTREAM(Cl: TPSPascalCompiler);
+procedure SIRegisterTRESOURCESTREAM(Cl: TPSPascalCompiler);
+procedure SIRegisterTPARSER(Cl: TPSPascalCompiler);
+procedure SIRegisterTCOLLECTIONITEM(CL: TPSPascalCompiler);
+procedure SIRegisterTCOLLECTION(CL: TPSPascalCompiler);
+{$IFDEF DELPHI3UP}
+procedure SIRegisterTOWNEDCOLLECTION(CL: TPSPascalCompiler);
+{$ENDIF}
+{$ENDIF}
+
+procedure SIRegister_Classes(Cl: TPSPascalCompiler; Streams: Boolean{$IFDEF D4PLUS}=True{$ENDIF});
+
+implementation
+
+procedure SIRegisterTStrings(cl: TPSPascalCompiler; Streams: Boolean); // requires TPersistent
+begin
+ with Cl.AddClassN(cl.FindClass('TPersistent'), 'TSTRINGS') do
+ begin
+ IsAbstract := True;
+ RegisterMethod('function Add(S: string): Integer;');
+ RegisterMethod('procedure Append(S: string);');
+ RegisterMethod('procedure AddStrings(Strings: TStrings);');
+ RegisterMethod('procedure Clear;');
+ RegisterMethod('procedure Delete(Index: Integer);');
+ RegisterMethod('function IndexOf(const S: string): Integer; ');
+ RegisterMethod('procedure Insert(Index: Integer; S: string); ');
+ RegisterProperty('Count', 'Integer', iptR);
+ RegisterProperty('Text', 'String', iptrw);
+ RegisterProperty('CommaText', 'String', iptrw);
+ if Streams then
+ begin
+ RegisterMethod('procedure LoadFromFile(FileName: string); ');
+ RegisterMethod('procedure SaveToFile(FileName: string); ');
+ end;
+ RegisterProperty('Strings', 'String Integer', iptRW);
+ SetDefaultPropery('Strings');
+ RegisterProperty('Objects', 'TObject Integer', iptRW);
+
+ {$IFNDEF PS_MINIVCL}
+ RegisterMethod('procedure BeginUpdate;');
+ RegisterMethod('procedure EndUpdate;');
+ RegisterMethod('function Equals(Strings: TStrings): Boolean;');
+ RegisterMethod('procedure Exchange(Index1, Index2: Integer);');
+ RegisterMethod('function IndexOfName(Name: string): Integer;');
+ if Streams then
+ RegisterMethod('procedure LoadFromStream(Stream: TStream); ');
+ RegisterMethod('procedure Move(CurIndex, NewIndex: Integer); ');
+ if Streams then
+ RegisterMethod('procedure SaveToStream(Stream: TStream); ');
+ RegisterMethod('procedure SetText(Text: PChar); ');
+ RegisterProperty('Names', 'String Integer', iptr);
+ RegisterProperty('Values', 'String String', iptRW);
+ RegisterMethod('function ADDOBJECT(S:STRING;AOBJECT:TOBJECT):INTEGER');
+ RegisterMethod('function GETTEXT:PCHAR');
+ RegisterMethod('function INDEXOFOBJECT(AOBJECT:TOBJECT):INTEGER');
+ RegisterMethod('procedure INSERTOBJECT(INDEX:INTEGER;S:STRING;AOBJECT:TOBJECT)');
+ {$ENDIF}
+ end;
+end;
+
+procedure SIRegisterTSTRINGLIST(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TSTRINGS'), 'TSTRINGLIST') do
+ begin
+ RegisterMethod('function FIND(S:STRING;var INDEX:INTEGER):BOOLEAN');
+ RegisterMethod('procedure SORT');
+ RegisterProperty('DUPLICATES', 'TDUPLICATES', iptrw);
+ RegisterProperty('SORTED', 'BOOLEAN', iptrw);
+ RegisterProperty('ONCHANGE', 'TNOTIFYEVENT', iptrw);
+ RegisterProperty('ONCHANGING', 'TNOTIFYEVENT', iptrw);
+ end;
+end;
+
+{$IFNDEF PS_MINIVCL}
+procedure SIRegisterTBITS(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TObject'), 'TBITS') do
+ begin
+ RegisterMethod('function OPENBIT:INTEGER');
+ RegisterProperty('BITS', 'BOOLEAN INTEGER', iptrw);
+ RegisterProperty('SIZE', 'INTEGER', iptrw);
+ end;
+end;
+{$ENDIF}
+
+procedure SIRegisterTSTREAM(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TOBJECT'), 'TSTREAM') do
+ begin
+ IsAbstract := True;
+ RegisterMethod('function READ(BUFFER:STRING;COUNT:LONGINT):LONGINT');
+ RegisterMethod('function WRITE(BUFFER:STRING;COUNT:LONGINT):LONGINT');
+ RegisterMethod('function SEEK(OFFSET:LONGINT;ORIGIN:WORD):LONGINT');
+ RegisterMethod('procedure READBUFFER(BUFFER:STRING;COUNT:LONGINT)');
+ RegisterMethod('procedure WRITEBUFFER(BUFFER:STRING;COUNT:LONGINT)');
+ {$IFDEF DELPHI4UP}
+ RegisterMethod('function COPYFROM(SOURCE:TSTREAM;COUNT:INT64):LONGINT');
+ {$ELSE}
+ RegisterMethod('function COPYFROM(SOURCE:TSTREAM;COUNT:Integer):LONGINT');
+ {$ENDIF}
+ RegisterProperty('POSITION', 'LONGINT', iptrw);
+ RegisterProperty('SIZE', 'LONGINT', iptrw);
+ end;
+end;
+
+procedure SIRegisterTHANDLESTREAM(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TSTREAM'), 'THANDLESTREAM') do
+ begin
+ RegisterMethod('constructor CREATE(AHANDLE:INTEGER)');
+ RegisterProperty('HANDLE', 'INTEGER', iptr);
+ end;
+end;
+
+{$IFNDEF PS_MINIVCL}
+procedure SIRegisterTMEMORYSTREAM(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TCUSTOMMEMORYSTREAM'), 'TMEMORYSTREAM') do
+ begin
+ RegisterMethod('procedure CLEAR');
+ RegisterMethod('procedure LOADFROMSTREAM(STREAM:TSTREAM)');
+ RegisterMethod('procedure LOADFROMFILE(FILENAME:STRING)');
+ RegisterMethod('procedure SETSIZE(NEWSIZE:LONGINT)');
+ end;
+end;
+{$ENDIF}
+
+procedure SIRegisterTFILESTREAM(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('THANDLESTREAM'), 'TFILESTREAM') do
+ begin
+ RegisterMethod('constructor CREATE(FILENAME:STRING;MODE:WORD)');
+ end;
+end;
+
+{$IFNDEF PS_MINIVCL}
+procedure SIRegisterTCUSTOMMEMORYSTREAM(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TSTREAM'), 'TCUSTOMMEMORYSTREAM') do
+ begin
+ IsAbstract := True;
+ RegisterMethod('procedure SAVETOSTREAM(STREAM:TSTREAM)');
+ RegisterMethod('procedure SAVETOFILE(FILENAME:STRING)');
+ end;
+end;
+
+procedure SIRegisterTRESOURCESTREAM(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TCUSTOMMEMORYSTREAM'), 'TRESOURCESTREAM') do
+ begin
+ RegisterMethod('constructor CREATE(INSTANCE:THANDLE;RESNAME:STRING;RESTYPE:PCHAR)');
+ RegisterMethod('constructor CREATEFROMID(INSTANCE:THANDLE;RESID:INTEGER;RESTYPE:PCHAR)');
+ end;
+end;
+
+procedure SIRegisterTPARSER(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TOBJECT'), 'TPARSER') do
+ begin
+ RegisterMethod('constructor CREATE(STREAM:TSTREAM)');
+ RegisterMethod('procedure CHECKTOKEN(T:CHAR)');
+ RegisterMethod('procedure CHECKTOKENSYMBOL(S:STRING)');
+ RegisterMethod('procedure ERROR(IDENT:INTEGER)');
+ RegisterMethod('procedure ERRORSTR(MESSAGE:STRING)');
+ RegisterMethod('procedure HEXTOBINARY(STREAM:TSTREAM)');
+ RegisterMethod('function NEXTTOKEN:CHAR');
+ RegisterMethod('function SOURCEPOS:LONGINT');
+ RegisterMethod('function TOKENCOMPONENTIDENT:STRING');
+ RegisterMethod('function TOKENFLOAT:EXTENDED');
+ RegisterMethod('function TOKENINT:LONGINT');
+ RegisterMethod('function TOKENSTRING:STRING');
+ RegisterMethod('function TOKENSYMBOLIS(S:STRING):BOOLEAN');
+ RegisterProperty('SOURCELINE', 'INTEGER', iptr);
+ RegisterProperty('TOKEN', 'CHAR', iptr);
+ end;
+end;
+
+procedure SIRegisterTCOLLECTIONITEM(CL: TPSPascalCompiler);
+Begin
+ if cl.FindClass('TCOLLECTION') = nil then cl.AddClassN(cl.FindClass('TPERSISTENT'), 'TCOLLECTION');
+ With cl.AddClassN(cl.FindClass('TPERSISTENT'),'TCOLLECTIONITEM') do
+ begin
+ RegisterMethod('Constructor CREATE( COLLECTION : TCOLLECTION)');
+ RegisterProperty('COLLECTION', 'TCOLLECTION', iptrw);
+{$IFDEF DELPHI3UP} RegisterProperty('ID', 'INTEGER', iptr); {$ENDIF}
+ RegisterProperty('INDEX', 'INTEGER', iptrw);
+{$IFDEF DELPHI3UP} RegisterProperty('DISPLAYNAME', 'STRING', iptrw); {$ENDIF}
+ end;
+end;
+
+procedure SIRegisterTCOLLECTION(CL: TPSPascalCompiler);
+var
+ cr: TPSCompileTimeClass;
+Begin
+ cr := CL.FindClass('TCOLLECTION');
+ if cr = nil then cr := cl.AddClassN(cl.FindClass('TPERSISTENT'), 'TCOLLECTION');
+With cr do
+ begin
+// RegisterMethod('Constructor CREATE( ITEMCLASS : TCOLLECTIONITEMCLASS)');
+{$IFDEF DELPHI3UP} RegisterMethod('Function OWNER : TPERSISTENT'); {$ENDIF}
+ RegisterMethod('Function ADD : TCOLLECTIONITEM');
+ RegisterMethod('Procedure BEGINUPDATE');
+ RegisterMethod('Procedure CLEAR');
+{$IFDEF DELPHI5UP} RegisterMethod('Procedure DELETE( INDEX : INTEGER)'); {$ENDIF}
+ RegisterMethod('Procedure ENDUPDATE');
+{$IFDEF DELPHI3UP} RegisterMethod('Function FINDITEMID( ID : INTEGER) : TCOLLECTIONITEM'); {$ENDIF}
+{$IFDEF DELPHI3UP} RegisterMethod('Function INSERT( INDEX : INTEGER) : TCOLLECTIONITEM'); {$ENDIF}
+ RegisterProperty('COUNT', 'INTEGER', iptr);
+{$IFDEF DELPHI3UP} RegisterProperty('ITEMCLASS', 'TCOLLECTIONITEMCLASS', iptr); {$ENDIF}
+ RegisterProperty('ITEMS', 'TCOLLECTIONITEM INTEGER', iptrw);
+ end;
+end;
+
+{$IFDEF DELPHI3UP}
+procedure SIRegisterTOWNEDCOLLECTION(CL: TPSPascalCompiler);
+Begin
+With Cl.AddClassN(cl.FindClass('TCOLLECTION'),'TOWNEDCOLLECTION') do
+ begin
+// RegisterMethod('Constructor CREATE( AOWNER : TPERSISTENT; ITEMCLASS : TCOLLECTIONITEMCLASS)');
+ end;
+end;
+{$ENDIF}
+{$ENDIF}
+
+procedure SIRegister_Classes_TypesAndConsts(Cl: TPSPascalCompiler);
+begin
+ cl.AddConstantN('soFromBeginning', 'Longint').Value.ts32 := 0;
+ cl.AddConstantN('soFromCurrent', 'Longint').Value.ts32 := 1;
+ cl.AddConstantN('soFromEnd', 'Longint').Value.ts32 := 2;
+ cl.AddConstantN('toEOF', 'Char').Value.tchar := #0;
+ cl.AddConstantN('toSymbol', 'Char').Value.tchar := #1;
+ cl.AddConstantN('toString', 'Char').Value.tchar := #2;
+ cl.AddConstantN('toInteger', 'Char').Value.tchar := #3;
+ cl.AddConstantN('toFloat', 'Char').Value.tchar := #4;
+ cl.AddConstantN('fmCreate', 'Longint').Value.ts32 := $FFFF;
+ cl.AddConstantN('fmOpenRead', 'Longint').Value.ts32 := 0;
+ cl.AddConstantN('fmOpenWrite', 'Longint').Value.ts32 := 1;
+ cl.AddConstantN('fmOpenReadWrite', 'Longint').Value.ts32 := 2;
+ cl.AddConstantN('fmShareCompat', 'Longint').Value.ts32 := 0;
+ cl.AddConstantN('fmShareExclusive', 'Longint').Value.ts32 := $10;
+ cl.AddConstantN('fmShareDenyWrite', 'Longint').Value.ts32 := $20;
+ cl.AddConstantN('fmShareDenyRead', 'Longint').Value.ts32 := $30;
+ cl.AddConstantN('fmShareDenyNone', 'Longint').Value.ts32 := $40;
+ cl.AddConstantN('SecsPerDay', 'Longint').Value.ts32 := 86400;
+ cl.AddConstantN('MSecPerDay', 'Longint').Value.ts32 := 86400000;
+ cl.AddConstantN('DateDelta', 'Longint').Value.ts32 := 693594;
+ cl.AddTypeS('TAlignment', '(taLeftJustify, taRightJustify, taCenter)');
+ cl.AddTypeS('THelpEvent', 'function (Command: Word; Data: Longint; var CallHelp: Boolean): Boolean');
+ cl.AddTypeS('TGetStrProc', 'procedure(const S: string)');
+ cl.AddTypeS('TDuplicates', '(dupIgnore, dupAccept, dupError)');
+ cl.AddTypeS('TOperation', '(opInsert, opRemove)');
+ cl.AddTypeS('THANDLE', 'Longint');
+
+ cl.AddTypeS('TNotifyEvent', 'procedure (Sender: TObject)');
+end;
+
+procedure SIRegister_Classes(Cl: TPSPascalCompiler; Streams: Boolean);
+begin
+ SIRegister_Classes_TypesAndConsts(Cl);
+ if Streams then
+ SIRegisterTSTREAM(Cl);
+ SIRegisterTStrings(cl, Streams);
+ SIRegisterTStringList(cl);
+ {$IFNDEF PS_MINIVCL}
+ SIRegisterTBITS(cl);
+ {$ENDIF}
+ if Streams then
+ begin
+ SIRegisterTHANDLESTREAM(Cl);
+ SIRegisterTFILESTREAM(Cl);
+ {$IFNDEF PS_MINIVCL}
+ SIRegisterTCUSTOMMEMORYSTREAM(Cl);
+ SIRegisterTMEMORYSTREAM(Cl);
+ SIRegisterTRESOURCESTREAM(Cl);
+ {$ENDIF}
+ end;
+ {$IFNDEF PS_MINIVCL}
+ SIRegisterTPARSER(Cl);
+ SIRegisterTCOLLECTIONITEM(Cl);
+ SIRegisterTCOLLECTION(Cl);
+ {$IFDEF DELPHI3UP}
+ SIRegisterTOWNEDCOLLECTION(Cl);
+ {$ENDIF}
+ {$ENDIF}
+end;
+
+// PS_MINIVCL changes by Martijn Laan (mlaan at wintax _dot_ nl)
+
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/uPSC_comobj.pas b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSC_comobj.pas
new file mode 100644
index 0000000..3573a6e
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSC_comobj.pas
@@ -0,0 +1,28 @@
+{ compiletime ComObj support }
+unit uPSC_comobj;
+
+{$I PascalScript.inc}
+interface
+uses
+ uPSCompiler, uPSUtils;
+
+{
+
+Will register:
+
+function CreateOleObject(const ClassName: string): IDispatch;
+function GetActiveOleObject(const ClassName: string): IDispatch;
+
+}
+
+procedure SIRegister_ComObj(cl: TPSPascalCompiler);
+
+implementation
+
+procedure SIRegister_ComObj(cl: TPSPascalCompiler);
+begin
+ cl.AddDelphiFunction('function CreateOleObject(const ClassName: string): IDispatch;');
+ cl.AddDelphiFunction('function GetActiveOleObject(const ClassName: string): IDispatch;');
+end;
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/uPSC_controls.pas b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSC_controls.pas
new file mode 100644
index 0000000..b092eb4
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSC_controls.pas
@@ -0,0 +1,236 @@
+{ Compiletime Controls support }
+unit uPSC_controls;
+{$I PascalScript.inc}
+interface
+uses
+ uPSCompiler, uPSUtils;
+
+{
+ Will register files from:
+ Controls
+
+ Register the STD, Classes (at least the types&consts) and Graphics libraries first
+
+}
+
+procedure SIRegister_Controls_TypesAndConsts(Cl: TPSPascalCompiler);
+
+procedure SIRegisterTControl(Cl: TPSPascalCompiler);
+procedure SIRegisterTWinControl(Cl: TPSPascalCompiler);
+procedure SIRegisterTGraphicControl(cl: TPSPascalCompiler);
+procedure SIRegisterTCustomControl(cl: TPSPascalCompiler);
+procedure SIRegisterTDragObject(cl: TPSPascalCompiler);
+
+procedure SIRegister_Controls(Cl: TPSPascalCompiler);
+
+
+implementation
+
+procedure SIRegisterTControl(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TComponent'), 'TCONTROL') do
+ begin
+ RegisterMethod('constructor Create(AOwner: TComponent);');
+ RegisterMethod('procedure BringToFront;');
+ RegisterMethod('procedure Hide;');
+ RegisterMethod('procedure Invalidate;virtual;');
+ RegisterMethod('procedure refresh;');
+ RegisterMethod('procedure Repaint;virtual;');
+ RegisterMethod('procedure SendToBack;');
+ RegisterMethod('procedure Show;');
+ RegisterMethod('procedure Update;virtual;');
+ RegisterMethod('procedure SetBounds(x,y,w,h: Integer);virtual;');
+ RegisterProperty('Left', 'Integer', iptRW);
+ RegisterProperty('Top', 'Integer', iptRW);
+ RegisterProperty('Width', 'Integer', iptRW);
+ RegisterProperty('Height', 'Integer', iptRW);
+ RegisterProperty('Hint', 'String', iptRW);
+ RegisterProperty('Align', 'TAlign', iptRW);
+ RegisterProperty('ClientHeight', 'Longint', iptRW);
+ RegisterProperty('ClientWidth', 'Longint', iptRW);
+ RegisterProperty('ShowHint', 'Boolean', iptRW);
+ RegisterProperty('Visible', 'Boolean', iptRW);
+ RegisterProperty('ENABLED', 'BOOLEAN', iptrw);
+ RegisterProperty('CURSOR', 'TCURSOR', iptrw);
+
+ {$IFNDEF PS_MINIVCL}
+ RegisterMethod('function Dragging: Boolean;');
+ RegisterMethod('function HasParent: Boolean');
+ RegisterMethod('procedure BEGINDRAG(IMMEDIATE:BOOLEAN)');
+ RegisterMethod('function CLIENTTOSCREEN(POINT:TPOINT):TPOINT');
+ RegisterMethod('procedure ENDDRAG(DROP:BOOLEAN)');
+ {$IFNDEF CLX}
+ RegisterMethod('function GETTEXTBUF(BUFFER:PCHAR;BUFSIZE:INTEGER):INTEGER');
+ RegisterMethod('function GETTEXTLEN:INTEGER');
+ RegisterMethod('procedure SETTEXTBUF(BUFFER:PCHAR)');
+ RegisterMethod('function PERFORM(MSG:CARDINAL;WPARAM,LPARAM:LONGINT):LONGINT');
+ {$ENDIF}
+ RegisterMethod('function SCREENTOCLIENT(POINT:TPOINT):TPOINT');
+ {$ENDIF}
+ end;
+end;
+
+procedure SIRegisterTWinControl(Cl: TPSPascalCompiler); // requires TControl
+begin
+ with Cl.AddClassN(cl.FindClass('TControl'), 'TWINCONTROL') do
+ begin
+
+ with Cl.FindClass('TControl') do
+ begin
+ RegisterProperty('Parent', 'TWinControl', iptRW);
+ end;
+
+ {$IFNDEF CLX}
+ RegisterProperty('Handle', 'Longint', iptR);
+ {$ENDIF}
+ RegisterProperty('Showing', 'Boolean', iptR);
+ RegisterProperty('TabOrder', 'Integer', iptRW);
+ RegisterProperty('TabStop', 'Boolean', iptRW);
+ RegisterMethod('function CANFOCUS:BOOLEAN');
+ RegisterMethod('function FOCUSED:BOOLEAN');
+ RegisterProperty('CONTROLS', 'TCONTROL INTEGER', iptr);
+ RegisterProperty('CONTROLCOUNT', 'INTEGER', iptr);
+
+ {$IFNDEF PS_MINIVCL}
+ RegisterMethod('function HandleAllocated: Boolean;');
+ RegisterMethod('procedure HandleNeeded;');
+ RegisterMethod('procedure EnableAlign;');
+ RegisterMethod('procedure RemoveControl(AControl: TControl);');
+ RegisterMethod('procedure InsertControl(AControl: TControl);');
+ RegisterMethod('procedure Realign;');
+ RegisterMethod('procedure ScaleBy(M, D: Integer);');
+ RegisterMethod('procedure ScrollBy(DeltaX, DeltaY: Integer);');
+ RegisterMethod('procedure SetFocus; virtual;');
+ {$IFNDEF CLX}
+ RegisterMethod('procedure PAINTTO(DC:Longint;X,Y:INTEGER)');
+ {$ENDIF}
+
+ RegisterMethod('function CONTAINSCONTROL(CONTROL:TCONTROL):BOOLEAN');
+ RegisterMethod('procedure DISABLEALIGN');
+ RegisterMethod('procedure UPDATECONTROLSTATE');
+
+ RegisterProperty('BRUSH', 'TBRUSH', iptr);
+ RegisterProperty('HELPCONTEXT', 'LONGINT', iptrw);
+ {$ENDIF}
+ end;
+end;
+procedure SIRegisterTGraphicControl(cl: TPSPascalCompiler); // requires TControl
+begin
+ Cl.AddClassN(cl.FindClass('TControl'), 'TGRAPHICCONTROL');
+end;
+
+procedure SIRegisterTCustomControl(cl: TPSPascalCompiler); // requires TWinControl
+begin
+ Cl.AddClassN(cl.FindClass('TWinControl'), 'TCUSTOMCONTROL');
+end;
+
+procedure SIRegister_Controls_TypesAndConsts(Cl: TPSPascalCompiler);
+begin
+{$IFNDEF FPC}
+ Cl.addTypeS('TEShiftState','(ssShift, ssAlt, ssCtrl, ssLeft, ssRight, ssMiddle, ssDouble)');
+ {$ELSE}
+ Cl.addTypeS('TEShiftState','(ssShift, ssAlt, ssCtrl, ssLeft, ssRight, ssMiddle, ssDouble,' +
+ 'ssMeta, ssSuper, ssHyper, ssAltGr, ssCaps, ssNum,ssScroll,ssTriple,ssQuad)');
+ {$ENDIF}
+ Cl.addTypeS('TShiftState','set of TEShiftState');
+ cl.AddTypeS('TMouseButton', '(mbLeft, mbRight, mbMiddle)');
+ cl.AddTypeS('TDragMode', '(dmManual, dmAutomatic)');
+ cl.AddTypeS('TDragState', '(dsDragEnter, dsDragLeave, dsDragMove)');
+ cl.AddTypeS('TDragKind', '(dkDrag, dkDock)');
+ cl.AddTypeS('TMouseEvent', 'procedure (Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);');
+ cl.AddTypeS('TMouseMoveEvent', 'procedure(Sender: TObject; Shift: TShiftState; X, Y: Integer);');
+ cl.AddTypeS('TKeyEvent', 'procedure (Sender: TObject; var Key: Word; Shift: TShiftState);');
+ cl.AddTypeS('TKeyPressEvent', 'procedure(Sender: TObject; var Key: Char);');
+ cl.AddTypeS('TDragOverEvent', 'procedure(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean)');
+ cl.AddTypeS('TDragDropEvent', 'procedure(Sender, Source: TObject;X, Y: Integer)');
+ cl.AddTypeS('HWND', 'Longint');
+
+ cl.AddTypeS('TEndDragEvent', 'procedure(Sender, Target: TObject; X, Y: Integer)');
+
+ cl.addTypeS('TAlign', '(alNone, alTop, alBottom, alLeft, alRight, alClient)');
+
+ cl.addTypeS('TAnchorKind', '(akTop, akLeft, akRight, akBottom)');
+ cl.addTypeS('TAnchors','set of TAnchorKind');
+ cl.AddTypeS('TModalResult', 'Integer');
+ cl.AddTypeS('TCursor', 'Integer');
+ cl.AddTypeS('TPoint', 'record x,y: Longint; end;');
+
+ cl.AddConstantN('mrNone', 'Integer').Value.ts32 := 0;
+ cl.AddConstantN('mrOk', 'Integer').Value.ts32 := 1;
+ cl.AddConstantN('mrCancel', 'Integer').Value.ts32 := 2;
+ cl.AddConstantN('mrAbort', 'Integer').Value.ts32 := 3;
+ cl.AddConstantN('mrRetry', 'Integer').Value.ts32 := 4;
+ cl.AddConstantN('mrIgnore', 'Integer').Value.ts32 := 5;
+ cl.AddConstantN('mrYes', 'Integer').Value.ts32 := 6;
+ cl.AddConstantN('mrNo', 'Integer').Value.ts32 := 7;
+ cl.AddConstantN('mrAll', 'Integer').Value.ts32 := 8;
+ cl.AddConstantN('mrNoToAll', 'Integer').Value.ts32 := 9;
+ cl.AddConstantN('mrYesToAll', 'Integer').Value.ts32 := 10;
+ cl.AddConstantN('crDefault', 'Integer').Value.ts32 := 0;
+ cl.AddConstantN('crNone', 'Integer').Value.ts32 := -1;
+ cl.AddConstantN('crArrow', 'Integer').Value.ts32 := -2;
+ cl.AddConstantN('crCross', 'Integer').Value.ts32 := -3;
+ cl.AddConstantN('crIBeam', 'Integer').Value.ts32 := -4;
+ cl.AddConstantN('crSizeNESW', 'Integer').Value.ts32 := -6;
+ cl.AddConstantN('crSizeNS', 'Integer').Value.ts32 := -7;
+ cl.AddConstantN('crSizeNWSE', 'Integer').Value.ts32 := -8;
+ cl.AddConstantN('crSizeWE', 'Integer').Value.ts32 := -9;
+ cl.AddConstantN('crUpArrow', 'Integer').Value.ts32 := -10;
+ cl.AddConstantN('crHourGlass', 'Integer').Value.ts32 := -11;
+ cl.AddConstantN('crDrag', 'Integer').Value.ts32 := -12;
+ cl.AddConstantN('crNoDrop', 'Integer').Value.ts32 := -13;
+ cl.AddConstantN('crHSplit', 'Integer').Value.ts32 := -14;
+ cl.AddConstantN('crVSplit', 'Integer').Value.ts32 := -15;
+ cl.AddConstantN('crMultiDrag', 'Integer').Value.ts32 := -16;
+ cl.AddConstantN('crSQLWait', 'Integer').Value.ts32 := -17;
+ cl.AddConstantN('crNo', 'Integer').Value.ts32 := -18;
+ cl.AddConstantN('crAppStart', 'Integer').Value.ts32 := -19;
+ cl.AddConstantN('crHelp', 'Integer').Value.ts32 := -20;
+{$IFDEF DELPHI3UP}
+ cl.AddConstantN('crHandPoint', 'Integer').Value.ts32 := -21;
+{$ENDIF}
+{$IFDEF DELPHI4UP}
+ cl.AddConstantN('crSizeAll', 'Integer').Value.ts32 := -22;
+{$ENDIF}
+end;
+
+procedure SIRegisterTDragObject(cl: TPSPascalCompiler);
+begin
+ with CL.AddClassN(CL.FindClass('TObject'),'TDragObject') do
+ begin
+{$IFNDEF PS_MINIVCL}
+{$IFDEF DELPHI4UP}
+ RegisterMethod('Procedure Assign( Source : TDragObject)');
+{$ENDIF}
+{$IFNDEF FPC}
+ RegisterMethod('Function GetName : string');
+ RegisterMethod('Function Instance : Longint');
+{$ENDIF}
+ RegisterMethod('Procedure HideDragImage');
+ RegisterMethod('Procedure ShowDragImage');
+{$IFDEF DELPHI4UP}
+ RegisterProperty('Cancelling', 'Boolean', iptrw);
+ RegisterProperty('DragHandle', 'Longint', iptrw);
+ RegisterProperty('DragPos', 'TPoint', iptrw);
+ RegisterProperty('DragTargetPos', 'TPoint', iptrw);
+ RegisterProperty('MouseDeltaX', 'Double', iptr);
+ RegisterProperty('MouseDeltaY', 'Double', iptr);
+{$ENDIF}
+{$ENDIF}
+ end;
+ Cl.AddTypeS('TStartDragEvent', 'procedure (Sender: TObject; var DragObject: TDragObject)');
+end;
+
+procedure SIRegister_Controls(Cl: TPSPascalCompiler);
+begin
+ SIRegister_Controls_TypesAndConsts(cl);
+ SIRegisterTDragObject(cl);
+ SIRegisterTControl(Cl);
+ SIRegisterTWinControl(Cl);
+ SIRegisterTGraphicControl(cl);
+ SIRegisterTCustomControl(cl);
+end;
+
+// PS_MINIVCL changes by Martijn Laan (mlaan at wintax _dot_ nl)
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/uPSC_dateutils.pas b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSC_dateutils.pas
new file mode 100644
index 0000000..4dd2709
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSC_dateutils.pas
@@ -0,0 +1,34 @@
+{ Compile time Date Time library }
+unit uPSC_dateutils;
+
+interface
+uses
+ SysUtils, uPSCompiler, uPSUtils;
+
+
+procedure RegisterDateTimeLibrary_C(S: TPSPascalCompiler);
+
+implementation
+
+procedure RegisterDatetimeLibrary_C(S: TPSPascalCompiler);
+begin
+ s.AddType('TDateTime', btDouble).ExportName := True;
+ s.AddDelphiFunction('function EncodeDate(Year, Month, Day: Word): TDateTime;');
+ s.AddDelphiFunction('function EncodeTime(Hour, Min, Sec, MSec: Word): TDateTime;');
+ s.AddDelphiFunction('function TryEncodeDate(Year, Month, Day: Word; var Date: TDateTime): Boolean;');
+ s.AddDelphiFunction('function TryEncodeTime(Hour, Min, Sec, MSec: Word; var Time: TDateTime): Boolean;');
+ s.AddDelphiFunction('procedure DecodeDate(const DateTime: TDateTime; var Year, Month, Day: Word);');
+ s.AddDelphiFunction('procedure DecodeTime(const DateTime: TDateTime; var Hour, Min, Sec, MSec: Word);');
+ s.AddDelphiFunction('function DayOfWeek(const DateTime: TDateTime): Word;');
+ s.AddDelphiFunction('function Date: TDateTime;');
+ s.AddDelphiFunction('function Time: TDateTime;');
+ s.AddDelphiFunction('function Now: TDateTime;');
+ s.AddDelphiFunction('function DateTimeToUnix(D: TDateTime): Int64;');
+ s.AddDelphiFunction('function UnixToDateTime(U: Int64): TDateTime;');
+
+ s.AddDelphiFunction('function DateToStr(D: TDateTime): string;');
+ s.AddDelphiFunction('function StrToDate(const s: string): TDateTime;');
+ s.AddDelphiFunction('function FormatDateTime(const fmt: string; D: TDateTime): string;');
+end;
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/uPSC_dll.pas b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSC_dll.pas
new file mode 100644
index 0000000..1554f98
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSC_dll.pas
@@ -0,0 +1,142 @@
+{ Compiletime DLL importing support }
+unit uPSC_dll;
+
+{$I PascalScript.inc}
+interface
+{
+
+ Function FindWindow(c1, c2: PChar): Cardinal; external 'FindWindow@user32.dll stdcall';
+
+}
+uses
+ uPSCompiler, uPSUtils;
+
+
+{$IFDEF DELPHI3UP }
+resourceString
+{$ELSE }
+const
+{$ENDIF }
+
+ RPS_Invalid_External = 'Invalid External';
+ RPS_InvalidCallingConvention = 'Invalid Calling Convention';
+
+
+
+function DllExternalProc(Sender: TPSPascalCompiler; Decl: TPSParametersDecl; const OriginalName, FExternal: string): TPSRegProc;
+type
+
+ TDllCallingConvention = (clRegister
+ , clPascal
+ , ClCdecl
+ , ClStdCall
+ );
+
+var
+ DefaultCC: TDllCallingConvention;
+
+procedure RegisterDll_Compiletime(cs: TPSPascalCompiler);
+
+implementation
+
+function rpos(ch: char; const s: string): Longint;
+var
+ i: Longint;
+begin
+ for i := length(s) downto 1 do
+ if s[i] = ch then begin Result := i; exit; end;
+ result := 0;
+end;
+
+function RemoveQuotes(s: string): string;
+begin
+ result := s;
+ if result = '' then exit;
+ if Result[1] = '"' then delete(result ,1,1);
+ if (Result <> '') and (Result[Length(result)] = '"') then delete(result, length(result), 1);
+end;
+
+function DllExternalProc(Sender: TPSPascalCompiler; Decl: TPSParametersDecl; const OriginalName, FExternal: string): TPSRegProc;
+var
+ FuncName,
+ Name,
+ FuncCC, s: string;
+ CC: TDllCallingConvention;
+ DelayLoad: Boolean;
+
+begin
+ Name := FastUpperCase(OriginalName);
+ DelayLoad := False;
+ FuncCC := FExternal;
+
+ if (pos('@', FuncCC) = 0) then
+ begin
+ Sender.MakeError('', ecCustomError, RPS_Invalid_External);
+ Result := nil;
+ exit;
+ end;
+ FuncName := copy(FuncCC, 1, rpos('@', FuncCC)-1)+#0;
+ delete(FuncCc, 1, length(FuncName));
+ if pos(' ', Funccc) <> 0 then
+ begin
+ if FuncCC[1] = '"' then
+ begin
+ Delete(FuncCC, 1, 1);
+ FuncName := RemoveQuotes(copy(FuncCC, 1, pos('"', FuncCC)-1))+#0+FuncName;
+ Delete(FuncCC,1, pos('"', FuncCC));
+ if (FuncCC <> '') and( FuncCC[1] = ' ') then delete(FuncCC,1,1);
+ end else
+ begin
+ FuncName := copy(FuncCc, 1, pos(' ',FuncCC)-1)+#0+FuncName;
+ Delete(FuncCC, 1, pos(' ', FuncCC));
+ end;
+ if pos(' ', FuncCC) > 0 then
+ begin
+ s := Copy(FuncCC, pos(' ', Funccc)+1, MaxInt);
+ FuncCC := FastUpperCase(Copy(FuncCC, 1, pos(' ', FuncCC)-1));
+ Delete(FuncCC, pos(' ', Funccc), MaxInt);
+ if FastUppercase(s) = 'DELAYLOAD' then
+ DelayLoad := True
+ else
+ begin
+ Sender.MakeError('', ecCustomError, RPS_Invalid_External);
+ Result := nil;
+ exit;
+ end;
+ end else
+ FuncCC := FastUpperCase(FuncCC);
+ if FuncCC = 'STDCALL' then cc := ClStdCall else
+ if FuncCC = 'CDECL' then cc := ClCdecl else
+ if FuncCC = 'REGISTER' then cc := clRegister else
+ if FuncCC = 'PASCAL' then cc := clPascal else
+ begin
+ Sender.MakeError('', ecCustomError, RPS_InvalidCallingConvention);
+ Result := nil;
+ exit;
+ end;
+ end else
+ begin
+ FuncName := RemoveQuotes(FuncCC)+#0+FuncName;
+ FuncCC := '';
+ cc := DefaultCC;
+ end;
+ FuncName := 'dll:'+FuncName+char(cc)+char(bytebool(DelayLoad)) + declToBits(Decl);
+ Result := TPSRegProc.Create;
+ Result.ImportDecl := FuncName;
+ Result.Decl.Assign(Decl);
+ Result.Name := Name;
+ Result.OrgName := OriginalName;
+ Result.ExportName := False;
+end;
+
+procedure RegisterDll_Compiletime(cs: TPSPascalCompiler);
+begin
+ cs.OnExternalProc := DllExternalProc;
+ cs.AddFunction('procedure UnloadDll(s: string)');
+ cs.AddFunction('function DLLGetLastError: Longint');
+end;
+
+begin
+ DefaultCc := clRegister;
+end.
+
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/uPSC_extctrls.pas b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSC_extctrls.pas
new file mode 100644
index 0000000..9a4dfb2
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSC_extctrls.pas
@@ -0,0 +1,327 @@
+{ Compiletime Extctrls support }
+unit uPSC_extctrls;
+
+{$I PascalScript.inc}
+interface
+uses
+ uPSCompiler, uPSUtils;
+
+(*
+ Will register files from:
+ ExtCtrls
+
+Requires:
+ STD, classes, controls, graphics {$IFNDEF PS_MINIVCL}, stdctrls {$ENDIF}
+*)
+
+procedure SIRegister_ExtCtrls_TypesAndConsts(cl: TPSPascalCompiler);
+
+procedure SIRegisterTSHAPE(Cl: TPSPascalCompiler);
+procedure SIRegisterTIMAGE(Cl: TPSPascalCompiler);
+procedure SIRegisterTPAINTBOX(Cl: TPSPascalCompiler);
+procedure SIRegisterTBEVEL(Cl: TPSPascalCompiler);
+procedure SIRegisterTTIMER(Cl: TPSPascalCompiler);
+procedure SIRegisterTCUSTOMPANEL(Cl: TPSPascalCompiler);
+procedure SIRegisterTPANEL(Cl: TPSPascalCompiler);
+{$IFNDEF CLX}
+procedure SIRegisterTPAGE(Cl: TPSPascalCompiler);
+procedure SIRegisterTNOTEBOOK(Cl: TPSPascalCompiler);
+procedure SIRegisterTHEADER(Cl: TPSPascalCompiler);
+{$ENDIF}
+procedure SIRegisterTCUSTOMRADIOGROUP(Cl: TPSPascalCompiler);
+procedure SIRegisterTRADIOGROUP(Cl: TPSPascalCompiler);
+
+procedure SIRegister_ExtCtrls(cl: TPSPascalCompiler);
+
+implementation
+procedure SIRegisterTSHAPE(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TGRAPHICCONTROL'), 'TSHAPE') do
+ begin
+ RegisterProperty('BRUSH', 'TBRUSH', iptrw);
+ RegisterProperty('PEN', 'TPEN', iptrw);
+ RegisterProperty('SHAPE', 'TSHAPETYPE', iptrw);
+
+ {$IFNDEF PS_MINIVCL}
+ RegisterMethod('procedure STYLECHANGED(SENDER:TOBJECT)');
+ RegisterProperty('DRAGCURSOR', 'Longint', iptrw);
+ RegisterProperty('DRAGMODE', 'TDragMode', iptrw);
+ RegisterProperty('PARENTSHOWHINT', 'Boolean', iptrw);
+ RegisterProperty('ONDRAGDROP', 'TDragDropEvent', iptrw);
+ RegisterProperty('ONDRAGOVER', 'TDragOverEvent', iptrw);
+ RegisterProperty('ONENDDRAG', 'TEndDragEvent', iptrw);
+ RegisterProperty('ONMOUSEDOWN', 'TMouseEvent', iptrw);
+ RegisterProperty('ONMOUSEMOVE', 'TMouseMoveEvent', iptrw);
+ RegisterProperty('ONMOUSEUP', 'TMouseEvent', iptrw);
+ RegisterProperty('ONSTARTDRAG', 'TStartDragEvent', iptrw);
+ {$ENDIF}
+ end;
+end;
+
+procedure SIRegisterTIMAGE(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TGRAPHICCONTROL'), 'TIMAGE') do
+ begin
+ RegisterProperty('CANVAS', 'TCANVAS', iptr);
+ RegisterProperty('AUTOSIZE', 'BOOLEAN', iptrw);
+ RegisterProperty('CENTER', 'BOOLEAN', iptrw);
+ RegisterProperty('PICTURE', 'TPICTURE', iptrw);
+ RegisterProperty('STRETCH', 'BOOLEAN', iptrw);
+ RegisterProperty('ONCLICK', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONDBLCLICK', 'TNotifyEvent', iptrw);
+
+ {$IFNDEF PS_MINIVCL}
+ RegisterProperty('DRAGCURSOR', 'Longint', iptrw);
+ RegisterProperty('DRAGMODE', 'TDragMode', iptrw);
+ RegisterProperty('PARENTSHOWHINT', 'Boolean', iptrw);
+ RegisterProperty('POPUPMENU', 'TPopupMenu', iptrw);
+ RegisterProperty('ONDRAGDROP', 'TDragDropEvent', iptrw);
+ RegisterProperty('ONDRAGOVER', 'TDragOverEvent', iptrw);
+ RegisterProperty('ONENDDRAG', 'TEndDragEvent', iptrw);
+ RegisterProperty('ONMOUSEDOWN', 'TMouseEvent', iptrw);
+ RegisterProperty('ONMOUSEMOVE', 'TMouseMoveEvent', iptrw);
+ RegisterProperty('ONMOUSEUP', 'TMouseEvent', iptrw);
+ RegisterProperty('ONSTARTDRAG', 'TStartDragEvent', iptrw);
+ {$ENDIF}
+ end;
+end;
+
+procedure SIRegisterTPAINTBOX(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TGRAPHICCONTROL'), 'TPAINTBOX') do
+ begin
+ RegisterProperty('CANVAS', 'TCanvas', iptr);
+ RegisterProperty('COLOR', 'TColor', iptrw);
+ RegisterProperty('FONT', 'TFont', iptrw);
+ RegisterProperty('PARENTCOLOR', 'Boolean', iptrw);
+ RegisterProperty('PARENTFONT', 'Boolean', iptrw);
+ RegisterProperty('ONCLICK', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONDBLCLICK', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONPAINT', 'TNOTIFYEVENT', iptrw);
+
+ {$IFNDEF PS_MINIVCL}
+ RegisterProperty('DRAGCURSOR', 'Longint', iptrw);
+ RegisterProperty('DRAGMODE', 'TDragMode', iptrw);
+ RegisterProperty('PARENTSHOWHINT', 'Boolean', iptrw);
+ RegisterProperty('POPUPMENU', 'TPopupMenu', iptrw);
+ RegisterProperty('ONDRAGDROP', 'TDragDropEvent', iptrw);
+ RegisterProperty('ONDRAGOVER', 'TDragOverEvent', iptrw);
+ RegisterProperty('ONENDDRAG', 'TEndDragEvent', iptrw);
+ RegisterProperty('ONMOUSEDOWN', 'TMouseEvent', iptrw);
+ RegisterProperty('ONMOUSEMOVE', 'TMouseMoveEvent', iptrw);
+ RegisterProperty('ONMOUSEUP', 'TMouseEvent', iptrw);
+ RegisterProperty('ONSTARTDRAG', 'TStartDragEvent', iptrw);
+ {$ENDIF}
+ end;
+end;
+
+procedure SIRegisterTBEVEL(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TGRAPHICCONTROL'), 'TBEVEL') do
+ begin
+ RegisterProperty('SHAPE', 'TBEVELSHAPE', iptrw);
+ RegisterProperty('STYLE', 'TBEVELSTYLE', iptrw);
+
+ {$IFNDEF PS_MINIVCL}
+ RegisterProperty('PARENTSHOWHINT', 'Boolean', iptrw);
+ {$ENDIF}
+ end;
+end;
+
+procedure SIRegisterTTIMER(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TCOMPONENT'), 'TTIMER') do
+ begin
+ RegisterProperty('ENABLED', 'BOOLEAN', iptrw);
+ RegisterProperty('INTERVAL', 'CARDINAL', iptrw);
+ RegisterProperty('ONTIMER', 'TNOTIFYEVENT', iptrw);
+ end;
+end;
+
+procedure SIRegisterTCUSTOMPANEL(Cl: TPSPascalCompiler);
+begin
+ Cl.AddClassN(cl.FindClass('TCUSTOMCONTROL'), 'TCUSTOMPANEL');
+end;
+
+procedure SIRegisterTPANEL(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TCUSTOMPANEL'), 'TPANEL') do
+ begin
+ RegisterProperty('ALIGNMENT', 'TAlignment', iptrw);
+ RegisterProperty('BEVELINNER', 'TPanelBevel', iptrw);
+ RegisterProperty('BEVELOUTER', 'TPanelBevel', iptrw);
+ RegisterProperty('BEVELWIDTH', 'TBevelWidth', iptrw);
+ RegisterProperty('BORDERWIDTH', 'TBorderWidth', iptrw);
+ RegisterProperty('BORDERSTYLE', 'TBorderStyle', iptrw);
+ RegisterProperty('CAPTION', 'String', iptrw);
+ RegisterProperty('COLOR', 'TColor', iptrw);
+ RegisterProperty('FONT', 'TFont', iptrw);
+ RegisterProperty('PARENTCOLOR', 'Boolean', iptrw);
+ RegisterProperty('PARENTFONT', 'Boolean', iptrw);
+ RegisterProperty('ONCLICK', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONDBLCLICK', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONENTER', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONEXIT', 'TNotifyEvent', iptrw);
+
+ {$IFNDEF PS_MINIVCL}
+ RegisterProperty('DRAGCURSOR', 'Longint', iptrw);
+ RegisterProperty('DRAGMODE', 'TDragMode', iptrw);
+ RegisterProperty('CTL3D', 'Boolean', iptrw);
+ RegisterProperty('LOCKED', 'Boolean', iptrw);
+ RegisterProperty('PARENTCTL3D', 'Boolean', iptrw);
+ RegisterProperty('PARENTSHOWHINT', 'Boolean', iptrw);
+ RegisterProperty('POPUPMENU', 'TPopupMenu', iptrw);
+ RegisterProperty('ONDRAGDROP', 'TDragDropEvent', iptrw);
+ RegisterProperty('ONDRAGOVER', 'TDragOverEvent', iptrw);
+ RegisterProperty('ONENDDRAG', 'TEndDragEvent', iptrw);
+ RegisterProperty('ONMOUSEDOWN', 'TMouseEvent', iptrw);
+ RegisterProperty('ONMOUSEMOVE', 'TMouseMoveEvent', iptrw);
+ RegisterProperty('ONMOUSEUP', 'TMouseEvent', iptrw);
+ RegisterProperty('ONRESIZE', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONSTARTDRAG', 'TStartDragEvent', iptrw);
+ {$ENDIF}
+ end;
+end;
+{$IFNDEF CLX}
+procedure SIRegisterTPAGE(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TCUSTOMCONTROL'), 'TPAGE') do
+ begin
+ RegisterProperty('CAPTION', 'String', iptrw);
+ end;
+end;
+procedure SIRegisterTNOTEBOOK(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TCUSTOMCONTROL'), 'TNOTEBOOK') do
+ begin
+ RegisterProperty('ACTIVEPAGE', 'STRING', iptrw);
+ RegisterProperty('COLOR', 'TColor', iptrw);
+ RegisterProperty('FONT', 'TFont', iptrw);
+ RegisterProperty('PAGEINDEX', 'INTEGER', iptrw);
+ RegisterProperty('PAGES', 'TSTRINGS', iptrw);
+ RegisterProperty('PARENTCOLOR', 'Boolean', iptrw);
+ RegisterProperty('PARENTFONT', 'Boolean', iptrw);
+ RegisterProperty('ONCLICK', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONDBLCLICK', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONENTER', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONEXIT', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONPAGECHANGED', 'TNOTIFYEVENT', iptrw);
+
+ {$IFNDEF PS_MINIVCL}
+ RegisterProperty('CTL3D', 'Boolean', iptrw);
+ RegisterProperty('DRAGCURSOR', 'Longint', iptrw);
+ RegisterProperty('DRAGMODE', 'TDragMode', iptrw);
+ RegisterProperty('PARENTCTL3D', 'Boolean', iptrw);
+ RegisterProperty('PARENTSHOWHINT', 'Boolean', iptrw);
+ RegisterProperty('POPUPMENU', 'TPopupMenu', iptrw);
+ RegisterProperty('ONDRAGDROP', 'TDragDropEvent', iptrw);
+ RegisterProperty('ONDRAGOVER', 'TDragOverEvent', iptrw);
+ RegisterProperty('ONENDDRAG', 'TEndDragEvent', iptrw);
+ RegisterProperty('ONMOUSEDOWN', 'TMouseEvent', iptrw);
+ RegisterProperty('ONMOUSEMOVE', 'TMouseMoveEvent', iptrw);
+ RegisterProperty('ONMOUSEUP', 'TMouseEvent', iptrw);
+ RegisterProperty('ONSTARTDRAG', 'TStartDragEvent', iptrw);
+ {$ENDIF}
+ end;
+end;
+
+procedure SIRegisterTHEADER(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TCUSTOMCONTROL'), 'THEADER') do
+ begin
+ RegisterProperty('SECTIONWIDTH', 'INTEGER INTEGER', iptrw);
+ RegisterProperty('ALLOWRESIZE', 'BOOLEAN', iptrw);
+ RegisterProperty('BORDERSTYLE', 'TBORDERSTYLE', iptrw);
+ RegisterProperty('FONT', 'TFont', iptrw);
+ RegisterProperty('PARENTFONT', 'Boolean', iptrw);
+ RegisterProperty('SECTIONS', 'TSTRINGS', iptrw);
+ RegisterProperty('ONSIZING', 'TSECTIONEVENT', iptrw);
+ RegisterProperty('ONSIZED', 'TSECTIONEVENT', iptrw);
+
+ {$IFNDEF PS_MINIVCL}
+ RegisterProperty('PARENTSHOWHINT', 'Boolean', iptrw);
+ RegisterProperty('POPUPMENU', 'TPopupMenu', iptrw);
+ {$ENDIF}
+ end;
+end;
+{$ENDIF}
+
+procedure SIRegisterTCUSTOMRADIOGROUP(Cl: TPSPascalCompiler);
+begin
+ Cl.AddClassN(cl.FindClass('TCUSTOMGROUPBOX'), 'TCUSTOMRADIOGROUP');
+end;
+
+procedure SIRegisterTRADIOGROUP(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TCUSTOMRADIOGROUP'), 'TRADIOGROUP') do
+ begin
+ RegisterProperty('CAPTION', 'String', iptrw);
+ RegisterProperty('COLOR', 'TColor', iptrw);
+ RegisterProperty('COLUMNS', 'Integer', iptrw);
+ RegisterProperty('FONT', 'TFont', iptrw);
+ RegisterProperty('ITEMINDEX', 'Integer', iptrw);
+ RegisterProperty('ITEMS', 'TStrings', iptrw);
+ RegisterProperty('PARENTCOLOR', 'Boolean', iptrw);
+ RegisterProperty('PARENTFONT', 'Boolean', iptrw);
+ RegisterProperty('ONCLICK', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONENTER', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONEXIT', 'TNotifyEvent', iptrw);
+
+ {$IFNDEF PS_MINIVCL}
+ RegisterProperty('CTL3D', 'Boolean', iptrw);
+ RegisterProperty('DRAGCURSOR', 'Longint', iptrw);
+ RegisterProperty('DRAGMODE', 'TDragMode', iptrw);
+ RegisterProperty('PARENTCTL3D', 'Boolean', iptrw);
+ RegisterProperty('PARENTSHOWHINT', 'Boolean', iptrw);
+ RegisterProperty('POPUPMENU', 'TPopupMenu', iptrw);
+ RegisterProperty('ONDRAGDROP', 'TDragDropEvent', iptrw);
+ RegisterProperty('ONDRAGOVER', 'TDragOverEvent', iptrw);
+ RegisterProperty('ONENDDRAG', 'TEndDragEvent', iptrw);
+ RegisterProperty('ONSTARTDRAG', 'TStartDragEvent', iptrw);
+ {$ENDIF}
+ end;
+end;
+
+procedure SIRegister_ExtCtrls_TypesAndConsts(cl: TPSPascalCompiler);
+begin
+ cl.AddTypeS('TShapeType', '(stRectangle, stSquare, stRoundRect, stRoundSquare, stEllipse, stCircle)');
+ cl.AddTypeS('TBevelStyle', '(bsLowered, bsRaised)');
+ cl.AddTypeS('TBevelShape', '(bsBox, bsFrame, bsTopLine, bsBottomLine, bsLeftLine, bsRightLine,bsSpacer)');
+ cl.AddTypeS('TPanelBevel', '(bvNone, bvLowered, bvRaised,bvSpace)');
+ cl.AddTypeS('TBevelWidth', 'Longint');
+ cl.AddTypeS('TBorderWidth', 'Longint');
+ cl.AddTypeS('TSectionEvent', 'procedure(Sender: TObject; ASection, AWidth: Integer)');
+end;
+
+procedure SIRegister_ExtCtrls(cl: TPSPascalCompiler);
+begin
+ SIRegister_ExtCtrls_TypesAndConsts(cl);
+
+ {$IFNDEF PS_MINIVCL}
+ SIRegisterTSHAPE(Cl);
+ SIRegisterTIMAGE(Cl);
+ SIRegisterTPAINTBOX(Cl);
+ {$ENDIF}
+ SIRegisterTBEVEL(Cl);
+ {$IFNDEF PS_MINIVCL}
+ SIRegisterTTIMER(Cl);
+ {$ENDIF}
+ SIRegisterTCUSTOMPANEL(Cl);
+ SIRegisterTPANEL(Cl);
+ {$IFNDEF PS_MINIVCL}
+ {$IFNDEF CLX}
+ SIRegisterTPAGE(Cl);
+ SIRegisterTNOTEBOOK(Cl);
+ SIRegisterTHEADER(Cl);
+ {$ENDIF}
+ SIRegisterTCUSTOMRADIOGROUP(Cl);
+ SIRegisterTRADIOGROUP(Cl);
+ {$ENDIF}
+end;
+
+end.
+
+
+
+
+
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/uPSC_forms.pas b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSC_forms.pas
new file mode 100644
index 0000000..4a02b5d
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSC_forms.pas
@@ -0,0 +1,267 @@
+{ Compiletime Forms support }
+unit uPSC_forms;
+{$I PascalScript.inc}
+
+interface
+uses
+ uPSCompiler, uPSUtils;
+
+procedure SIRegister_Forms_TypesAndConsts(Cl: TPSPascalCompiler);
+
+
+procedure SIRegisterTCONTROLSCROLLBAR(Cl: TPSPascalCompiler);
+procedure SIRegisterTSCROLLINGWINCONTROL(Cl: TPSPascalCompiler);
+procedure SIRegisterTSCROLLBOX(Cl: TPSPascalCompiler);
+procedure SIRegisterTFORM(Cl: TPSPascalCompiler);
+procedure SIRegisterTAPPLICATION(Cl: TPSPascalCompiler);
+
+procedure SIRegister_Forms(Cl: TPSPascalCompiler);
+
+implementation
+
+procedure SIRegisterTCONTROLSCROLLBAR(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TPERSISTENT'), 'TCONTROLSCROLLBAR') do
+ begin
+ RegisterProperty('KIND', 'TSCROLLBARKIND', iptr);
+ RegisterProperty('SCROLLPOS', 'INTEGER', iptr);
+ RegisterProperty('MARGIN', 'WORD', iptrw);
+ RegisterProperty('INCREMENT', 'TSCROLLBARINC', iptrw);
+ RegisterProperty('RANGE', 'INTEGER', iptrw);
+ RegisterProperty('POSITION', 'INTEGER', iptrw);
+ RegisterProperty('TRACKING', 'BOOLEAN', iptrw);
+ RegisterProperty('VISIBLE', 'BOOLEAN', iptrw);
+ end;
+end;
+
+procedure SIRegisterTSCROLLINGWINCONTROL(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TWINCONTROL'), 'TSCROLLINGWINCONTROL') do
+ begin
+ RegisterMethod('procedure SCROLLINVIEW(ACONTROL:TCONTROL)');
+ RegisterProperty('HORZSCROLLBAR', 'TCONTROLSCROLLBAR', iptrw);
+ RegisterProperty('VERTSCROLLBAR', 'TCONTROLSCROLLBAR', iptrw);
+ end;
+end;
+
+procedure SIRegisterTSCROLLBOX(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TSCROLLINGWINCONTROL'), 'TSCROLLBOX') do
+ begin
+ RegisterProperty('BORDERSTYLE', 'TBORDERSTYLE', iptrw);
+ RegisterProperty('COLOR', 'TCOLOR', iptrw);
+ RegisterProperty('FONT', 'TFONT', iptrw);
+ RegisterProperty('AUTOSCROLL', 'BOOLEAN', iptrw);
+ RegisterProperty('PARENTCOLOR', 'BOOLEAN', iptrw);
+ RegisterProperty('PARENTFONT', 'BOOLEAN', iptrw);
+ RegisterProperty('ONCLICK', 'TNOTIFYEVENT', iptrw);
+ RegisterProperty('ONDBLCLICK', 'TNOTIFYEVENT', iptrw);
+ RegisterProperty('ONENTER', 'TNOTIFYEVENT', iptrw);
+ RegisterProperty('ONEXIT', 'TNOTIFYEVENT', iptrw);
+
+ {$IFNDEF PS_MINIVCL}
+ RegisterProperty('ONRESIZE', 'TNOTIFYEVENT', iptrw);
+ RegisterProperty('DRAGCURSOR', 'TCURSOR', iptrw);
+ RegisterProperty('DRAGMODE', 'TDRAGMODE', iptrw);
+ RegisterProperty('PARENTSHOWHINT', 'BOOLEAN', iptrw);
+ RegisterProperty('POPUPMENU', 'TPOPUPMENU', iptrw);
+ RegisterProperty('CTL3D', 'BOOLEAN', iptrw);
+ RegisterProperty('PARENTCTL3D', 'BOOLEAN', iptrw);
+ RegisterProperty('ONDRAGDROP', 'TDRAGDROPEVENT', iptrw);
+ RegisterProperty('ONDRAGOVER', 'TDRAGOVEREVENT', iptrw);
+ RegisterProperty('ONENDDRAG', 'TENDDRAGEVENT', iptrw);
+ RegisterProperty('ONMOUSEDOWN', 'TMOUSEEVENT', iptrw);
+ RegisterProperty('ONMOUSEMOVE', 'TMOUSEMOVEEVENT', iptrw);
+ RegisterProperty('ONMOUSEUP', 'TMOUSEEVENT', iptrw);
+ {$ENDIF}
+ end;
+end;
+
+procedure SIRegisterTFORM(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TSCROLLINGWINCONTROL'), 'TFORM') do
+ begin
+ {$IFDEF DELPHI4UP}
+ RegisterMethod('constructor CREATENEW(AOWNER:TCOMPONENT; Dummy: Integer)');
+ {$ELSE}
+ RegisterMethod('constructor CREATENEW(AOWNER:TCOMPONENT)');
+ {$ENDIF}
+ RegisterMethod('procedure CLOSE');
+ RegisterMethod('procedure HIDE');
+ RegisterMethod('procedure SHOW');
+ RegisterMethod('function SHOWMODAL:INTEGER');
+ RegisterMethod('procedure RELEASE');
+ RegisterProperty('ACTIVE', 'BOOLEAN', iptr);
+ RegisterProperty('ACTIVECONTROL', 'TWINCONTROL', iptrw);
+ RegisterProperty('BORDERICONS', 'TBorderIcons', iptrw);
+ RegisterProperty('BORDERSTYLE', 'TFORMBORDERSTYLE', iptrw);
+ RegisterProperty('CAPTION', 'STRING', iptrw);
+ RegisterProperty('AUTOSCROLL', 'BOOLEAN', iptrw);
+ RegisterProperty('COLOR', 'TCOLOR', iptrw);
+ RegisterProperty('FONT', 'TFONT', iptrw);
+ RegisterProperty('FORMSTYLE', 'TFORMSTYLE', iptrw);
+ RegisterProperty('KEYPREVIEW', 'BOOLEAN', iptrw);
+ RegisterProperty('POSITION', 'TPOSITION', iptrw);
+ RegisterProperty('ONACTIVATE', 'TNOTIFYEVENT', iptrw);
+ RegisterProperty('ONCLICK', 'TNOTIFYEVENT', iptrw);
+ RegisterProperty('ONDBLCLICK', 'TNOTIFYEVENT', iptrw);
+ RegisterProperty('ONCLOSE', 'TCLOSEEVENT', iptrw);
+ RegisterProperty('ONCLOSEQUERY', 'TCLOSEQUERYEVENT', iptrw);
+ RegisterProperty('ONCREATE', 'TNOTIFYEVENT', iptrw);
+ RegisterProperty('ONDESTROY', 'TNOTIFYEVENT', iptrw);
+ RegisterProperty('ONDEACTIVATE', 'TNOTIFYEVENT', iptrw);
+ RegisterProperty('ONHIDE', 'TNOTIFYEVENT', iptrw);
+ RegisterProperty('ONKEYDOWN', 'TKEYEVENT', iptrw);
+ RegisterProperty('ONKEYPRESS', 'TKEYPRESSEVENT', iptrw);
+ RegisterProperty('ONKEYUP', 'TKEYEVENT', iptrw);
+ RegisterProperty('ONRESIZE', 'TNOTIFYEVENT', iptrw);
+ RegisterProperty('ONSHOW', 'TNOTIFYEVENT', iptrw);
+
+
+ {$IFNDEF PS_MINIVCL}
+ {$IFNDEF CLX}
+ RegisterMethod('procedure ARRANGEICONS');
+// RegisterMethod('function GETFORMIMAGE:TBITMAP');
+ RegisterMethod('procedure PRINT');
+ RegisterMethod('procedure SENDCANCELMODE(SENDER:TCONTROL)');
+ RegisterProperty('ACTIVEOLECONTROL', 'TWINCONTROL', iptrw);
+ RegisterProperty('OLEFORMOBJECT', 'TOLEFORMOBJECT', iptrw);
+ RegisterProperty('CLIENTHANDLE', 'LONGINT', iptr);
+ RegisterProperty('TILEMODE', 'TTILEMODE', iptrw);
+ {$ENDIF}
+ RegisterMethod('procedure CASCADE');
+ RegisterMethod('function CLOSEQUERY:BOOLEAN');
+ RegisterMethod('procedure DEFOCUSCONTROL(CONTROL:TWINCONTROL;REMOVING:BOOLEAN)');
+ RegisterMethod('procedure FOCUSCONTROL(CONTROL:TWINCONTROL)');
+ RegisterMethod('procedure NEXT');
+ RegisterMethod('procedure PREVIOUS');
+ RegisterMethod('function SETFOCUSEDCONTROL(CONTROL:TWINCONTROL):BOOLEAN');
+ RegisterMethod('procedure TILE');
+ RegisterProperty('ACTIVEMDICHILD', 'TFORM', iptr);
+ RegisterProperty('CANVAS', 'TCANVAS', iptr);
+ RegisterProperty('DROPTARGET', 'BOOLEAN', iptrw);
+ RegisterProperty('MODALRESULT', 'Longint', iptrw);
+ RegisterProperty('MDICHILDCOUNT', 'INTEGER', iptr);
+ RegisterProperty('MDICHILDREN', 'TFORM INTEGER', iptr);
+ RegisterProperty('ICON', 'TICON', iptrw);
+ RegisterProperty('MENU', 'TMAINMENU', iptrw);
+ RegisterProperty('OBJECTMENUITEM', 'TMENUITEM', iptrw);
+ RegisterProperty('PIXELSPERINCH', 'INTEGER', iptrw);
+ RegisterProperty('PRINTSCALE', 'TPRINTSCALE', iptrw);
+ RegisterProperty('SCALED', 'BOOLEAN', iptrw);
+ RegisterProperty('WINDOWSTATE', 'TWINDOWSTATE', iptrw);
+ RegisterProperty('WINDOWMENU', 'TMENUITEM', iptrw);
+ RegisterProperty('CTL3D', 'BOOLEAN', iptrw);
+ RegisterProperty('POPUPMENU', 'TPOPUPMENU', iptrw);
+ RegisterProperty('ONDRAGDROP', 'TDRAGDROPEVENT', iptrw);
+ RegisterProperty('ONDRAGOVER', 'TDRAGOVEREVENT', iptrw);
+ RegisterProperty('ONMOUSEDOWN', 'TMOUSEEVENT', iptrw);
+ RegisterProperty('ONMOUSEMOVE', 'TMOUSEMOVEEVENT', iptrw);
+ RegisterProperty('ONMOUSEUP', 'TMOUSEEVENT', iptrw);
+ RegisterProperty('ONPAINT', 'TNOTIFYEVENT', iptrw);
+ {$ENDIF}
+ end;
+end;
+
+procedure SIRegisterTAPPLICATION(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TCOMPONENT'), 'TAPPLICATION') do
+ begin
+ RegisterMethod('procedure BRINGTOFRONT');
+ RegisterMethod('function MESSAGEBOX(TEXT,CAPTION:PCHAR;FLAGS:WORD):INTEGER');
+ RegisterMethod('procedure MINIMIZE');
+ RegisterMethod('procedure PROCESSMESSAGES');
+ RegisterMethod('procedure RESTORE');
+ RegisterMethod('procedure TERMINATE');
+ RegisterProperty('ACTIVE', 'BOOLEAN', iptr);
+ RegisterProperty('EXENAME', 'STRING', iptr);
+ {$IFNDEF CLX}
+ RegisterProperty('HANDLE', 'LONGINT', iptrw);
+ RegisterProperty('UPDATEFORMATSETTINGS', 'BOOLEAN', iptrw);
+ {$ENDIF}
+ RegisterProperty('HINT', 'STRING', iptrw);
+ RegisterProperty('MAINFORM', 'TFORM', iptr);
+ RegisterProperty('SHOWHINT', 'BOOLEAN', iptrw);
+ RegisterProperty('SHOWMAINFORM', 'BOOLEAN', iptrw);
+ RegisterProperty('TERMINATED', 'BOOLEAN', iptr);
+ RegisterProperty('TITLE', 'STRING', iptrw);
+ RegisterProperty('ONACTIVATE', 'TNOTIFYEVENT', iptrw);
+ RegisterProperty('ONDEACTIVATE', 'TNOTIFYEVENT', iptrw);
+ RegisterProperty('ONIDLE', 'TIDLEEVENT', iptrw);
+ RegisterProperty('ONHINT', 'TNOTIFYEVENT', iptrw);
+ RegisterProperty('ONMINIMIZE', 'TNOTIFYEVENT', iptrw);
+ RegisterProperty('ONRESTORE', 'TNOTIFYEVENT', iptrw);
+
+ {$IFNDEF PS_MINIVCL}
+ RegisterMethod('procedure CONTROLDESTROYED(CONTROL:TCONTROL)');
+ RegisterMethod('procedure CANCELHINT');
+ RegisterMethod('procedure HANDLEEXCEPTION(SENDER:TOBJECT)');
+ RegisterMethod('procedure HANDLEMESSAGE');
+ RegisterMethod('procedure HIDEHINT');
+// RegisterMethod('procedure HINTMOUSEMESSAGE(CONTROL:TCONTROL;var MESSAGE:TMESSAGE)');
+ RegisterMethod('procedure INITIALIZE');
+ RegisterMethod('procedure NORMALIZETOPMOSTS');
+ RegisterMethod('procedure RESTORETOPMOSTS');
+ RegisterMethod('procedure RUN');
+// RegisterMethod('procedure SHOWEXCEPTION(E:EXCEPTION)');
+ {$IFNDEF CLX}
+ RegisterMethod('function HELPCOMMAND(COMMAND:INTEGER;DATA:LONGINT):BOOLEAN');
+ RegisterMethod('function HELPCONTEXT(CONTEXT:THELPCONTEXT):BOOLEAN');
+ RegisterMethod('function HELPJUMP(JUMPID:STRING):BOOLEAN');
+ RegisterProperty('DIALOGHANDLE', 'LONGINT', iptrw);
+ RegisterMethod('procedure CREATEHANDLE');
+// RegisterMethod('procedure HOOKMAINWINDOW(HOOK:TWINDOWHOOK)');
+// RegisterMethod('procedure UNHOOKMAINWINDOW(HOOK:TWINDOWHOOK)');
+ {$ENDIF}
+ RegisterProperty('HELPFILE', 'STRING', iptrw);
+ RegisterProperty('HINTCOLOR', 'TCOLOR', iptrw);
+ RegisterProperty('HINTPAUSE', 'INTEGER', iptrw);
+ RegisterProperty('HINTSHORTPAUSE', 'INTEGER', iptrw);
+ RegisterProperty('HINTHIDEPAUSE', 'INTEGER', iptrw);
+ RegisterProperty('ICON', 'TICON', iptrw);
+ RegisterProperty('ONHELP', 'THELPEVENT', iptrw);
+ {$ENDIF}
+ end;
+end;
+
+procedure SIRegister_Forms_TypesAndConsts(Cl: TPSPascalCompiler);
+begin
+ Cl.AddTypeS('TIdleEvent', 'procedure (Sender: TObject; var Done: Boolean)');
+ cl.AddTypeS('TScrollBarKind', '(sbHorizontal, sbVertical)');
+ cl.AddTypeS('TScrollBarInc', 'SmallInt');
+ cl.AddTypeS('TFormBorderStyle', '(bsNone, bsSingle, bsSizeable, bsDialog, bsToolWindow, bsSizeToolWin)');
+ cl.AddTypeS('TBorderStyle', 'TFormBorderStyle');
+ cl.AddTypeS('TWindowState', '(wsNormal, wsMinimized, wsMaximized)');
+ cl.AddTypeS('TFormStyle', '(fsNormal, fsMDIChild, fsMDIForm, fsStayOnTop)');
+ cl.AddTypeS('TPosition', '(poDesigned, poDefault, poDefaultPosOnly, poDefaultSizeOnly, poScreenCenter, poDesktopCenter, poMainFormCenter, poOwnerFormCenter)');
+ cl.AddTypeS('TPrintScale', '(poNone, poProportional, poPrintToFit)');
+ cl.AddTypeS('TCloseAction', '(caNone, caHide, caFree, caMinimize)');
+ cl.AddTypeS('TCloseEvent' ,'procedure(Sender: TObject; var Action: TCloseAction)');
+ cl.AddTypeS('TCloseQueryEvent' ,'procedure(Sender: TObject; var CanClose: Boolean)');
+ cl.AddTypeS('TBorderIcon' ,'(biSystemMenu, biMinimize, biMaximize, biHelp)');
+ cl.AddTypeS('TBorderIcons', 'set of TBorderIcon');
+ cl.AddTypeS('THELPCONTEXT', 'Longint');
+end;
+
+procedure SIRegister_Forms(Cl: TPSPascalCompiler);
+begin
+ SIRegister_Forms_TypesAndConsts(cl);
+
+ {$IFNDEF PS_MINIVCL}
+ SIRegisterTCONTROLSCROLLBAR(cl);
+ {$ENDIF}
+ SIRegisterTScrollingWinControl(cl);
+ {$IFNDEF PS_MINIVCL}
+ SIRegisterTSCROLLBOX(cl);
+ {$ENDIF}
+ SIRegisterTForm(Cl);
+ {$IFNDEF PS_MINIVCL}
+ SIRegisterTApplication(Cl);
+ {$ENDIF}
+end;
+
+// PS_MINIVCL changes by Martijn Laan (mlaan at wintax _dot_ nl)
+
+
+end.
+
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/uPSC_graphics.pas b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSC_graphics.pas
new file mode 100644
index 0000000..37279d3
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSC_graphics.pas
@@ -0,0 +1,275 @@
+{ Compiletime Graphics support }
+unit uPSC_graphics;
+
+{$I PascalScript.inc}
+interface
+uses
+ uPSCompiler, uPSUtils;
+
+
+
+procedure SIRegister_Graphics_TypesAndConsts(Cl: TPSPascalCompiler);
+procedure SIRegisterTGRAPHICSOBJECT(Cl: TPSPascalCompiler);
+procedure SIRegisterTFont(Cl: TPSPascalCompiler);
+procedure SIRegisterTPEN(Cl: TPSPascalCompiler);
+procedure SIRegisterTBRUSH(Cl: TPSPascalCompiler);
+procedure SIRegisterTCanvas(cl: TPSPascalCompiler);
+procedure SIRegisterTGraphic(CL: TPSPascalCompiler);
+procedure SIRegisterTBitmap(CL: TPSPascalCompiler; Streams: Boolean);
+
+procedure SIRegister_Graphics(Cl: TPSPascalCompiler; Streams: Boolean);
+
+implementation
+{$IFNDEF PS_NOGRAPHCONST}
+uses
+ {$IFDEF CLX}QGraphics{$ELSE}Graphics{$ENDIF};
+{$ELSE}
+{$IFNDEF CLX}
+{$IFNDEF FPC}
+uses
+ Windows;
+{$ENDIF}
+{$ENDIF}
+{$ENDIF}
+
+procedure SIRegisterTGRAPHICSOBJECT(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TPERSISTENT'), 'TGRAPHICSOBJECT') do
+ begin
+ RegisterProperty('ONCHANGE', 'TNOTIFYEVENT', iptrw);
+ end;
+end;
+
+procedure SIRegisterTFont(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TGraphicsObject'), 'TFONT') do
+ begin
+ RegisterMethod('constructor Create;');
+{$IFNDEF CLX}
+ RegisterProperty('Handle', 'Integer', iptRW);
+{$ENDIF}
+ RegisterProperty('Color', 'TColor', iptRW);
+ RegisterProperty('Height', 'Integer', iptRW);
+ RegisterProperty('Name', 'string', iptRW);
+ RegisterProperty('Pitch', 'Byte', iptRW);
+ RegisterProperty('Size', 'Integer', iptRW);
+ RegisterProperty('PixelsPerInch', 'Integer', iptRW);
+ RegisterProperty('Style', 'TFontStyles', iptrw);
+ end;
+end;
+
+procedure SIRegisterTCanvas(cl: TPSPascalCompiler); // requires TPersistent
+begin
+ with Cl.AddClassN(cl.FindClass('TPersistent'), 'TCANVAS') do
+ begin
+ RegisterMethod('procedure Arc(X1, Y1, X2, Y2, X3, Y3, X4, Y4: Integer);');
+ RegisterMethod('procedure Chord(X1, Y1, X2, Y2, X3, Y3, X4, Y4: Integer);');
+// RegisterMethod('procedure Draw(X, Y: Integer; Graphic: TGraphic);');
+ RegisterMethod('procedure Ellipse(X1, Y1, X2, Y2: Integer);');
+ RegisterMethod('procedure FillRect(const Rect: TRect);');
+{$IFNDEF CLX}
+ RegisterMethod('procedure FloodFill(X, Y: Integer; Color: TColor; FillStyle: Byte);');
+{$ENDIF}
+ RegisterMethod('procedure LineTo(X, Y: Integer);');
+ RegisterMethod('procedure MoveTo(X, Y: Integer);');
+ RegisterMethod('procedure Pie(X1, Y1, X2, Y2, X3, Y3, X4, Y4: Integer);');
+ RegisterMethod('procedure Rectangle(X1, Y1, X2, Y2: Integer);');
+ RegisterMethod('procedure Refresh;');
+ RegisterMethod('procedure RoundRect(X1, Y1, X2, Y2, X3, Y3: Integer);');
+ RegisterMethod('function TextHeight(Text: string): Integer;');
+ RegisterMethod('procedure TextOut(X, Y: Integer; Text: string);');
+ RegisterMethod('function TextWidth(Text: string): Integer;');
+{$IFNDEF CLX}
+ RegisterProperty('Handle', 'Integer', iptRw);
+{$ENDIF}
+ RegisterProperty('Pixels', 'Integer Integer Integer', iptRW);
+ RegisterProperty('Brush', 'TBrush', iptR);
+ RegisterProperty('CopyMode', 'Byte', iptRw);
+ RegisterProperty('Font', 'TFont', iptR);
+ RegisterProperty('Pen', 'TPen', iptR);
+ end;
+end;
+
+procedure SIRegisterTPEN(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TGRAPHICSOBJECT'), 'TPEN') do
+ begin
+ RegisterMethod('constructor CREATE');
+ RegisterProperty('COLOR', 'TCOLOR', iptrw);
+ RegisterProperty('MODE', 'TPENMODE', iptrw);
+ RegisterProperty('STYLE', 'TPENSTYLE', iptrw);
+ RegisterProperty('WIDTH', 'INTEGER', iptrw);
+ end;
+end;
+
+procedure SIRegisterTBRUSH(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TGRAPHICSOBJECT'), 'TBRUSH') do
+ begin
+ RegisterMethod('constructor CREATE');
+ RegisterProperty('COLOR', 'TCOLOR', iptrw);
+ RegisterProperty('STYLE', 'TBRUSHSTYLE', iptrw);
+ end;
+end;
+
+procedure SIRegister_Graphics_TypesAndConsts(Cl: TPSPascalCompiler);
+{$IFDEF PS_NOGRAPHCONST}
+const
+ clSystemColor = {$IFDEF DELPHI7UP} $FF000000 {$ELSE} $80000000 {$ENDIF};
+{$ENDIF}
+begin
+{$IFNDEF PS_NOGRAPHCONST}
+ cl.AddConstantN('clScrollBar', 'Integer').Value.ts32 := clScrollBar;
+ cl.AddConstantN('clBackground', 'Integer').Value.ts32 := clBackground;
+ cl.AddConstantN('clActiveCaption', 'Integer').Value.ts32 := clActiveCaption;
+ cl.AddConstantN('clInactiveCaption', 'Integer').Value.ts32 := clInactiveCaption;
+ cl.AddConstantN('clMenu', 'Integer').Value.ts32 := clMenu;
+ cl.AddConstantN('clWindow', 'Integer').Value.ts32 := clWindow;
+ cl.AddConstantN('clWindowFrame', 'Integer').Value.ts32 := clWindowFrame;
+ cl.AddConstantN('clMenuText', 'Integer').Value.ts32 := clMenuText;
+ cl.AddConstantN('clWindowText', 'Integer').Value.ts32 := clWindowText;
+ cl.AddConstantN('clCaptionText', 'Integer').Value.ts32 := clCaptionText;
+ cl.AddConstantN('clActiveBorder', 'Integer').Value.ts32 := clActiveBorder;
+ cl.AddConstantN('clInactiveBorder', 'Integer').Value.ts32 := clInactiveCaption;
+ cl.AddConstantN('clAppWorkSpace', 'Integer').Value.ts32 := clAppWorkSpace;
+ cl.AddConstantN('clHighlight', 'Integer').Value.ts32 := clHighlight;
+ cl.AddConstantN('clHighlightText', 'Integer').Value.ts32 := clHighlightText;
+ cl.AddConstantN('clBtnFace', 'Integer').Value.ts32 := clBtnFace;
+ cl.AddConstantN('clBtnShadow', 'Integer').Value.ts32 := clBtnShadow;
+ cl.AddConstantN('clGrayText', 'Integer').Value.ts32 := clGrayText;
+ cl.AddConstantN('clBtnText', 'Integer').Value.ts32 := clBtnText;
+ cl.AddConstantN('clInactiveCaptionText', 'Integer').Value.ts32 := clInactiveCaptionText;
+ cl.AddConstantN('clBtnHighlight', 'Integer').Value.ts32 := clBtnHighlight;
+ cl.AddConstantN('cl3DDkShadow', 'Integer').Value.ts32 := cl3DDkShadow;
+ cl.AddConstantN('cl3DLight', 'Integer').Value.ts32 := cl3DLight;
+ cl.AddConstantN('clInfoText', 'Integer').Value.ts32 := clInfoText;
+ cl.AddConstantN('clInfoBk', 'Integer').Value.ts32 := clInfoBk;
+{$ELSE}
+{$IFNDEF CLX} // These are VCL-only; CLX uses different constant values
+ cl.AddConstantN('clScrollBar', 'Integer').Value.ts32 := Integer(clSystemColor or COLOR_SCROLLBAR);
+ cl.AddConstantN('clBackground', 'Integer').Value.ts32 := Integer(clSystemColor or COLOR_BACKGROUND);
+ cl.AddConstantN('clActiveCaption', 'Integer').Value.ts32 := Integer(clSystemColor or COLOR_ACTIVECAPTION);
+ cl.AddConstantN('clInactiveCaption', 'Integer').Value.ts32 := Integer(clSystemColor or COLOR_INACTIVECAPTION);
+ cl.AddConstantN('clMenu', 'Integer').Value.ts32 := Integer(clSystemColor or COLOR_MENU);
+ cl.AddConstantN('clWindow', 'Integer').Value.ts32 := Integer(clSystemColor or COLOR_WINDOW);
+ cl.AddConstantN('clWindowFrame', 'Integer').Value.ts32 := Integer(clSystemColor or COLOR_WINDOWFRAME);
+ cl.AddConstantN('clMenuText', 'Integer').Value.ts32 := Integer(clSystemColor or COLOR_MENUTEXT);
+ cl.AddConstantN('clWindowText', 'Integer').Value.ts32 := Integer(clSystemColor or COLOR_WINDOWTEXT);
+ cl.AddConstantN('clCaptionText', 'Integer').Value.ts32 := Integer(clSystemColor or COLOR_CAPTIONTEXT);
+ cl.AddConstantN('clActiveBorder', 'Integer').Value.ts32 := Integer(clSystemColor or COLOR_ACTIVEBORDER);
+ cl.AddConstantN('clInactiveBorder', 'Integer').Value.ts32 := Integer(clSystemColor or COLOR_INACTIVEBORDER);
+ cl.AddConstantN('clAppWorkSpace', 'Integer').Value.ts32 := Integer(clSystemColor or COLOR_APPWORKSPACE);
+ cl.AddConstantN('clHighlight', 'Integer').Value.ts32 := Integer(clSystemColor or COLOR_HIGHLIGHT);
+ cl.AddConstantN('clHighlightText', 'Integer').Value.ts32 := Integer(clSystemColor or COLOR_HIGHLIGHTTEXT);
+ cl.AddConstantN('clBtnFace', 'Integer').Value.ts32 := Integer(clSystemColor or COLOR_BTNFACE);
+ cl.AddConstantN('clBtnShadow', 'Integer').Value.ts32 := Integer(clSystemColor or COLOR_BTNSHADOW);
+ cl.AddConstantN('clGrayText', 'Integer').Value.ts32 := Integer(clSystemColor or COLOR_GRAYTEXT);
+ cl.AddConstantN('clBtnText', 'Integer').Value.ts32 := Integer(clSystemColor or COLOR_BTNTEXT);
+ cl.AddConstantN('clInactiveCaptionText', 'Integer').Value.ts32 := Integer(clSystemColor or COLOR_INACTIVECAPTIONTEXT);
+ cl.AddConstantN('clBtnHighlight', 'Integer').Value.ts32 := Integer(clSystemColor or COLOR_BTNHIGHLIGHT);
+ cl.AddConstantN('cl3DDkShadow', 'Integer').Value.ts32 := Integer(clSystemColor or COLOR_3DDKSHADOW);
+ cl.AddConstantN('cl3DLight', 'Integer').Value.ts32 := Integer(clSystemColor or COLOR_3DLIGHT);
+ cl.AddConstantN('clInfoText', 'Integer').Value.ts32 := Integer(clSystemColor or COLOR_INFOTEXT);
+ cl.AddConstantN('clInfoBk', 'Integer').Value.ts32 := Integer(clSystemColor or COLOR_INFOBK);
+{$ENDIF}
+{$ENDIF}
+ cl.AddConstantN('clBlack', 'Integer').Value.ts32 := $000000;
+ cl.AddConstantN('clMaroon', 'Integer').Value.ts32 := $000080;
+ cl.AddConstantN('clGreen', 'Integer').Value.ts32 := $008000;
+ cl.AddConstantN('clOlive', 'Integer').Value.ts32 := $008080;
+ cl.AddConstantN('clNavy', 'Integer').Value.ts32 := $800000;
+ cl.AddConstantN('clPurple', 'Integer').Value.ts32 := $800080;
+ cl.AddConstantN('clTeal', 'Integer').Value.ts32 := $808000;
+ cl.AddConstantN('clGray', 'Integer').Value.ts32 := $808080;
+ cl.AddConstantN('clSilver', 'Integer').Value.ts32 := $C0C0C0;
+ cl.AddConstantN('clRed', 'Integer').Value.ts32 := $0000FF;
+ cl.AddConstantN('clLime', 'Integer').Value.ts32 := $00FF00;
+ cl.AddConstantN('clYellow', 'Integer').Value.ts32 := $00FFFF;
+ cl.AddConstantN('clBlue', 'Integer').Value.ts32 := $FF0000;
+ cl.AddConstantN('clFuchsia', 'Integer').Value.ts32 := $FF00FF;
+ cl.AddConstantN('clAqua', 'Integer').Value.ts32 := $FFFF00;
+ cl.AddConstantN('clLtGray', 'Integer').Value.ts32 := $C0C0C0;
+ cl.AddConstantN('clDkGray', 'Integer').Value.ts32 := $808080;
+ cl.AddConstantN('clWhite', 'Integer').Value.ts32 := $FFFFFF;
+ cl.AddConstantN('clNone', 'Integer').Value.ts32 := $1FFFFFFF;
+ cl.AddConstantN('clDefault', 'Integer').Value.ts32 := $20000000;
+
+ Cl.addTypeS('TFONTSTYLE', '(FSBOLD, FSITALIC, FSUNDERLINE, FSSTRIKEOUT)');
+ Cl.addTypeS('TFONTSTYLES', 'set of TFONTSTYLE');
+
+ cl.AddTypeS('TFontPitch', '(fpDefault, fpVariable, fpFixed)');
+ cl.AddTypeS('TPenStyle', '(psSolid, psDash, psDot, psDashDot, psDashDotDot, psClear, psInsideFrame)');
+ cl.AddTypeS('TPenMode', '(pmBlack, pmWhite, pmNop, pmNot, pmCopy, pmNotCopy, pmMergePenNot, pmMaskPenNot, pmMergeNotPen, pmMaskNotPen, pmMerge, pmNotMerge, pmMask, pmNotMask, pmXor, pmNotXor)');
+ cl.AddTypeS('TBrushStyle', '(bsSolid, bsClear, bsHorizontal, bsVertical, bsFDiagonal, bsBDiagonal, bsCross, bsDiagCross)');
+ cl.addTypeS('TColor', 'integer');
+
+{$IFNDEF CLX}
+ cl.addTypeS('HBITMAP', 'Integer');
+ cl.addTypeS('HPALETTE', 'Integer');
+{$ENDIF}
+end;
+
+procedure SIRegisterTGraphic(CL: TPSPascalCompiler);
+begin
+ with CL.AddClassN(CL.FindClass('TPersistent'),'TGraphic') do
+ begin
+ RegisterMethod('constructor Create');
+ RegisterMethod('Procedure LoadFromFile( const Filename : string)');
+ RegisterMethod('Procedure SaveToFile( const Filename : string)');
+ RegisterProperty('Empty', 'Boolean', iptr);
+ RegisterProperty('Height', 'Integer', iptrw);
+ RegisterProperty('Modified', 'Boolean', iptrw);
+ RegisterProperty('Width', 'Integer', iptrw);
+ RegisterProperty('OnChange', 'TNotifyEvent', iptrw);
+ end;
+end;
+
+procedure SIRegisterTBitmap(CL: TPSPascalCompiler; Streams: Boolean);
+begin
+ with CL.AddClassN(CL.FindClass('TGraphic'),'TBitmap') do
+ begin
+ if Streams then begin
+ RegisterMethod('Procedure LoadFromStream( Stream : TStream)');
+ RegisterMethod('Procedure SaveToStream( Stream : TStream)');
+ end;
+ RegisterProperty('Canvas', 'TCanvas', iptr);
+{$IFNDEF CLX}
+ RegisterProperty('Handle', 'HBITMAP', iptrw);
+{$ENDIF}
+
+ {$IFNDEF IFPS_MINIVCL}
+ RegisterMethod('Procedure Dormant');
+ RegisterMethod('Procedure FreeImage');
+{$IFNDEF CLX}
+ RegisterMethod('Procedure LoadFromClipboardFormat( AFormat : Word; AData : THandle; APalette : HPALETTE)');
+{$ENDIF}
+ RegisterMethod('Procedure LoadFromResourceName( Instance : THandle; const ResName : String)');
+ RegisterMethod('Procedure LoadFromResourceID( Instance : THandle; ResID : Integer)');
+{$IFNDEF CLX}
+ RegisterMethod('Function ReleaseHandle : HBITMAP');
+ RegisterMethod('Function ReleasePalette : HPALETTE');
+ RegisterMethod('Procedure SaveToClipboardFormat( var Format : Word; var Data : THandle; var APalette : HPALETTE)');
+ RegisterProperty('Monochrome', 'Boolean', iptrw);
+ RegisterProperty('Palette', 'HPALETTE', iptrw);
+ RegisterProperty('IgnorePalette', 'Boolean', iptrw);
+{$ENDIF}
+ RegisterProperty('TransparentColor', 'TColor', iptr);
+ {$ENDIF}
+ end;
+end;
+
+procedure SIRegister_Graphics(Cl: TPSPascalCompiler; Streams: Boolean);
+begin
+ SIRegister_Graphics_TypesAndConsts(Cl);
+ SIRegisterTGRAPHICSOBJECT(Cl);
+ SIRegisterTFont(Cl);
+ SIRegisterTPEN(cl);
+ SIRegisterTBRUSH(cl);
+ SIRegisterTCanvas(cl);
+ SIRegisterTGraphic(Cl);
+ SIRegisterTBitmap(Cl, Streams);
+end;
+
+// PS_MINIVCL changes by Martijn Laan (mlaan at wintax _dot_ nl)
+
+End.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/uPSC_menus.pas b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSC_menus.pas
new file mode 100644
index 0000000..a544578
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSC_menus.pas
@@ -0,0 +1,214 @@
+{ Menus Import Unit }
+Unit uPSC_menus;
+{$I PascalScript.inc}
+Interface
+Uses uPSCompiler;
+
+procedure SIRegisterTMENUITEMSTACK(CL: TPSPascalCompiler);
+procedure SIRegisterTPOPUPLIST(CL: TPSPascalCompiler);
+procedure SIRegisterTPOPUPMENU(CL: TPSPascalCompiler);
+procedure SIRegisterTMAINMENU(CL: TPSPascalCompiler);
+procedure SIRegisterTMENU(CL: TPSPascalCompiler);
+procedure SIRegisterTMENUITEM(CL: TPSPascalCompiler);
+procedure SIRegister_Menus(Cl: TPSPascalCompiler);
+
+implementation
+
+procedure SIRegisterTMENUITEMSTACK(CL: TPSPascalCompiler);
+begin
+ With cl.AddClassN(Cl.FindClass('TSTACK'),'TMENUITEMSTACK') do
+ begin
+ RegisterMethod('Procedure CLEARITEM( AITEM : TMENUITEM)');
+ end;
+end;
+
+procedure SIRegisterTPOPUPLIST(CL: TPSPascalCompiler);
+begin
+ With cl.AddClassN(Cl.FindClass('TLIST'),'TPOPUPLIST') do
+ begin
+ RegisterProperty('WINDOW', 'HWND', iptr);
+ RegisterMethod('Procedure ADD( POPUP : TPOPUPMENU)');
+ RegisterMethod('Procedure REMOVE( POPUP : TPOPUPMENU)');
+ end;
+end;
+
+procedure SIRegisterTPOPUPMENU(CL: TPSPascalCompiler);
+var
+ cc: TPSCompileTimeClass;
+begin
+ With cl.AddClassN(Cl.FindClass('TMENU'),'TPOPUPMENU') do
+ begin
+ cc := Cl.FindClass('TLabel');
+ if cc <> nil then
+ RegisterProperty('POPUPMENU', 'TPOPUPMENU', iptRW);
+ with Cl.FindClass('TForm') do
+ begin
+ RegisterProperty('POPUPMENU', 'TPOPUPMENU', iptRW);
+ end;
+ RegisterMethod('Constructor CREATE( AOWNER : TCOMPONENT)');
+ RegisterMethod('Procedure POPUP( X, Y : INTEGER)');
+ RegisterProperty('POPUPCOMPONENT', 'TCOMPONENT', iptrw);
+ RegisterProperty('ALIGNMENT', 'TPOPUPALIGNMENT', iptrw);
+ RegisterProperty('AUTOPOPUP', 'BOOLEAN', iptrw);
+ RegisterProperty('HELPCONTEXT', 'THELPCONTEXT', iptrw);
+ RegisterProperty('MENUANIMATION', 'TMENUANIMATION', iptrw);
+ RegisterProperty('TRACKBUTTON', 'TTRACKBUTTON', iptrw);
+ RegisterProperty('ONPOPUP', 'TNOTIFYEVENT', iptrw);
+ end;
+end;
+
+procedure SIRegisterTMAINMENU(CL: TPSPascalCompiler);
+begin
+ With cl.AddClassN(Cl.FindClass('TMENU'),'TMAINMENU') do
+ begin
+ RegisterMethod('Procedure MERGE( MENU : TMAINMENU)');
+ RegisterMethod('Procedure UNMERGE( MENU : TMAINMENU)');
+ RegisterMethod('Procedure POPULATEOLE2MENU( SHAREDMENU : HMENU; GROUPS : array of INTEGER; var WIDTHS : array of LONGINT)');
+ RegisterMethod('Procedure GETOLE2ACCELERATORTABLE( var ACCELTABLE : HACCEL; var ACCELCOUNT : INTEGER; GROUPS : array of INTEGER)');
+ RegisterMethod('Procedure SETOLE2MENUHANDLE( HANDLE : HMENU)');
+ RegisterProperty('AUTOMERGE', 'BOOLEAN', iptrw);
+ end;
+end;
+
+procedure SIRegisterTMENU(CL: TPSPascalCompiler);
+begin
+ With cl.AddClassN(Cl.FindClass('TCOMPONENT'),'TMENU') do
+ begin
+ RegisterMethod('Constructor CREATE( AOWNER : TCOMPONENT)');
+ RegisterMethod('Function DISPATCHCOMMAND( ACOMMAND : WORD) : BOOLEAN');
+ RegisterMethod('Function DISPATCHPOPUP( AHANDLE : HMENU) : BOOLEAN');
+ RegisterMethod('Function FINDITEM( VALUE : INTEGER; KIND : TFINDITEMKIND) : TMENUITEM');
+ RegisterMethod('Function GETHELPCONTEXT( VALUE : INTEGER; BYCOMMAND : BOOLEAN) : THELPCONTEXT');
+ RegisterProperty('IMAGES', 'TCUSTOMIMAGELIST', iptrw);
+ RegisterMethod('Function ISRIGHTTOLEFT : BOOLEAN');
+ RegisterMethod('Procedure PARENTBIDIMODECHANGED( ACONTROL : TOBJECT)');
+ RegisterMethod('Procedure PROCESSMENUCHAR( var MESSAGE : TWMMENUCHAR)');
+ RegisterProperty('AUTOHOTKEYS', 'TMENUAUTOFLAG', iptrw);
+ RegisterProperty('AUTOLINEREDUCTION', 'TMENUAUTOFLAG', iptrw);
+ RegisterProperty('BIDIMODE', 'TBIDIMODE', iptrw);
+ RegisterProperty('HANDLE', 'HMENU', iptr);
+ RegisterProperty('OWNERDRAW', 'BOOLEAN', iptrw);
+ RegisterProperty('PARENTBIDIMODE', 'BOOLEAN', iptrw);
+ RegisterProperty('WINDOWHANDLE', 'HWND', iptrw);
+ RegisterProperty('ITEMS', 'TMENUITEM', iptr);
+ end;
+end;
+
+procedure SIRegisterTMENUITEM(CL: TPSPascalCompiler);
+begin
+ With cl.AddClassN(Cl.FindClass('TCOMPONENT'),'TMENUITEM') do
+ begin
+ RegisterMethod('Constructor CREATE( AOWNER : TCOMPONENT)');
+ RegisterMethod('Procedure INITIATEACTION');
+ RegisterMethod('Procedure INSERT( INDEX : INTEGER; ITEM : TMENUITEM)');
+ RegisterMethod('Procedure DELETE( INDEX : INTEGER)');
+ RegisterMethod('Procedure CLEAR');
+ RegisterMethod('Procedure CLICK');
+ RegisterMethod('Function FIND( ACAPTION : STRING) : TMENUITEM');
+ RegisterMethod('Function INDEXOF( ITEM : TMENUITEM) : INTEGER');
+ RegisterMethod('Function ISLINE : BOOLEAN');
+ RegisterMethod('Function GETIMAGELIST : TCUSTOMIMAGELIST');
+ RegisterMethod('Function GETPARENTCOMPONENT : TCOMPONENT');
+ RegisterMethod('Function GETPARENTMENU : TMENU');
+ RegisterMethod('Function HASPARENT : BOOLEAN');
+ RegisterMethod('Function NEWTOPLINE : INTEGER');
+ RegisterMethod('Function NEWBOTTOMLINE : INTEGER');
+ RegisterMethod('Function INSERTNEWLINEBEFORE( AITEM : TMENUITEM) : INTEGER');
+ RegisterMethod('Function INSERTNEWLINEAFTER( AITEM : TMENUITEM) : INTEGER');
+ RegisterMethod('Procedure ADD( ITEM : TMENUITEM)');
+ RegisterMethod('Procedure REMOVE( ITEM : TMENUITEM)');
+ RegisterMethod('Function RETHINKHOTKEYS : BOOLEAN');
+ RegisterMethod('Function RETHINKLINES : BOOLEAN');
+ RegisterProperty('COMMAND', 'WORD', iptr);
+ RegisterProperty('HANDLE', 'HMENU', iptr);
+ RegisterProperty('COUNT', 'INTEGER', iptr);
+ RegisterProperty('ITEMS', 'TMENUITEM INTEGER', iptr);
+ RegisterProperty('MENUINDEX', 'INTEGER', iptrw);
+ RegisterProperty('PARENT', 'TMENUITEM', iptr);
+ {$IFDEF DELPHI5UP}
+ RegisterProperty('ACTION', 'TBASICACTION', iptrw);
+ {$ENDIF}
+ RegisterProperty('AUTOHOTKEYS', 'TMENUITEMAUTOFLAG', iptrw);
+ RegisterProperty('AUTOLINEREDUCTION', 'TMENUITEMAUTOFLAG', iptrw);
+ RegisterProperty('BITMAP', 'TBITMAP', iptrw);
+ RegisterProperty('CAPTION', 'STRING', iptrw);
+ RegisterProperty('CHECKED', 'BOOLEAN', iptrw);
+ RegisterProperty('SUBMENUIMAGES', 'TCUSTOMIMAGELIST', iptrw);
+ RegisterProperty('DEFAULT', 'BOOLEAN', iptrw);
+ RegisterProperty('ENABLED', 'BOOLEAN', iptrw);
+ RegisterProperty('GROUPINDEX', 'BYTE', iptrw);
+ RegisterProperty('HELPCONTEXT', 'THELPCONTEXT', iptrw);
+ RegisterProperty('HINT', 'STRING', iptrw);
+ RegisterProperty('IMAGEINDEX', 'TIMAGEINDEX', iptrw);
+ RegisterProperty('RADIOITEM', 'BOOLEAN', iptrw);
+ RegisterProperty('SHORTCUT', 'TSHORTCUT', iptrw);
+ RegisterProperty('VISIBLE', 'BOOLEAN', iptrw);
+ RegisterProperty('ONCLICK', 'TNOTIFYEVENT', iptrw);
+ {$IFNDEF FPC} RegisterProperty('ONDRAWITEM', 'TMENUDRAWITEMEVENT', iptrw);
+ RegisterProperty('ONADVANCEDDRAWITEM', 'TADVANCEDMENUDRAWITEMEVENT', iptrw);
+ RegisterProperty('ONMEASUREITEM', 'TMENUMEASUREITEMEVENT', iptrw);{$ENDIF}
+ end;
+end;
+
+procedure SIRegister_Menus(Cl: TPSPascalCompiler);
+begin
+ Cl.AddTypeS('HMenu', 'Cardinal');
+ Cl.AddTypeS('HACCEL', 'Cardinal');
+
+ cl.addClassN(cl.FindClass('EXCEPTION'),'EMENUERROR');
+ Cl.addTypeS('TMENUBREAK', '( MBNONE, MBBREAK, MBBARBREAK )');
+{$IFNDEF FPC}
+ Cl.addTypeS('TMENUDRAWITEMEVENT', 'Procedure ( SENDER : TOBJECT; ACANVAS : TC'
+ +'ANVAS; ARECT : TRECT; SELECTED : BOOLEAN)');
+ Cl.addTypeS('TADVANCEDMENUDRAWITEMEVENT', 'Procedure ( SENDER : TOBJECT; ACAN'
+ +'VAS : TCANVAS; ARECT : TRECT; STATE : TOWNERDRAWSTATE)');
+ Cl.addTypeS('TMENUMEASUREITEMEVENT', 'Procedure ( SENDER : TOBJECT; ACANVAS :'
+ +' TCANVAS; var WIDTH, HEIGHT : INTEGER)');
+{$ENDIF}
+ Cl.addTypeS('TMENUITEMAUTOFLAG', '( MAAUTOMATIC, MAMANUAL, MAPARENT )');
+ Cl.AddTypeS('TMenuAutoFlag', 'TMENUITEMAUTOFLAG');
+ Cl.addTypeS('TSHORTCUT', 'WORD');
+ cl.addClassN(cl.FindClass('TACTIONLINK'),'TMENUACTIONLINK');
+ SIRegisterTMENUITEM(Cl);
+ Cl.addTypeS('TMENUCHANGEEVENT', 'Procedure ( SENDER : TOBJECT; SOURCE : TMENU'
+ +'ITEM; REBUILD : BOOLEAN)');
+ Cl.addTypeS('TFINDITEMKIND', '( FKCOMMAND, FKHANDLE, FKSHORTCUT )');
+ SIRegisterTMENU(Cl);
+ SIRegisterTMAINMENU(Cl);
+ Cl.addTypeS('TPOPUPALIGNMENT', '( PALEFT, PARIGHT, PACENTER )');
+ Cl.addTypeS('TTRACKBUTTON', '( TBRIGHTBUTTON, TBLEFTBUTTON )');
+ Cl.addTypeS('TMENUANIMATIONS', '( MALEFTTORIGHT, MARIGHTTOLEFT, MATOPTOBOTTOM'
+ +', MABOTTOMTOTOP, MANONE )');
+ Cl.addTypeS('TMENUANIMATION', 'set of TMENUANIMATIONS');
+ SIRegisterTPOPUPMENU(Cl);
+ SIRegisterTPOPUPLIST(Cl);
+ SIRegisterTMENUITEMSTACK(Cl);
+ Cl.addTypeS('TCMENUITEM', 'TMENUITEM');
+{$IFNDEF FPC}
+//TODO: it should work,but somehow TShiftState is not defined
+ Cl.AddDelphiFunction('Function SHORTCUT( KEY : WORD; SHIFT : TSHIFTSTATE) : T'
+ +'SHORTCUT');
+ Cl.AddDelphiFunction('Procedure SHORTCUTTOKEY( SHORTCUT : TSHORTCUT; var KEY '
+ +': WORD; var SHIFT : TSHIFTSTATE)');
+{$ENDIF}
+ Cl.AddDelphiFunction('Function SHORTCUTTOTEXT( SHORTCUT : TSHORTCUT) : STRING'
+ +'');
+ Cl.AddDelphiFunction('Function TEXTTOSHORTCUT( TEXT : STRING) : TSHORTCUT');
+ Cl.AddDelphiFunction('Function NEWMENU( OWNER : TCOMPONENT; const ANAME : STR'
+ +'ING; ITEMS : array of TMenuItem) : TMAINMENU');
+ Cl.AddDelphiFunction('Function NEWPOPUPMENU( OWNER : TCOMPONENT; const ANAME '
+ +': STRING; ALIGNMENT : TPOPUPALIGNMENT; AUTOPOPUP : BOOLEAN; const ITEMS : array of '
+ +'TCMENUITEM) : TPOPUPMENU');
+ Cl.AddDelphiFunction('Function NEWSUBMENU( const ACAPTION : STRING; HCTX : WO'
+ +'RD; const ANAME : STRING; ITEMS : array of TMenuItem; AENABLED : BOOLEAN) : TMENUITEM');
+ Cl.AddDelphiFunction('Function NEWITEM( const ACAPTION : STRING; ASHORTCUT : '
+ +'TSHORTCUT; ACHECKED, AENABLED : BOOLEAN; AONCLICK : TNOTIFYEVENT; HCTX : W'
+ +'ORD; const ANAME : STRING) : TMENUITEM');
+ Cl.AddDelphiFunction('Function NEWLINE : TMENUITEM');
+{$IFNDEF FPC}
+ Cl.AddDelphiFunction('Procedure DRAWMENUITEM( MENUITEM : TMENUITEM; ACANVAS :'
+ +' TCANVAS; ARECT : TRECT; STATE : TOWNERDRAWSTATE)');
+{$ENDIF}
+end;
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/uPSC_std.pas b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSC_std.pas
new file mode 100644
index 0000000..d9b85bb
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSC_std.pas
@@ -0,0 +1,86 @@
+{ Compiletime TObject, TPersistent and TComponent definitions }
+unit uPSC_std;
+{$I PascalScript.inc}
+interface
+uses
+ uPSCompiler, uPSUtils;
+
+{
+ Will register files from:
+ System
+ Classes (Only TComponent and TPersistent)
+
+}
+
+procedure SIRegister_Std_TypesAndConsts(Cl: TPSPascalCompiler);
+procedure SIRegisterTObject(CL: TPSPascalCompiler);
+procedure SIRegisterTPersistent(Cl: TPSPascalCompiler);
+procedure SIRegisterTComponent(Cl: TPSPascalCompiler);
+
+procedure SIRegister_Std(Cl: TPSPascalCompiler);
+
+implementation
+
+procedure SIRegisterTObject(CL: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(nil, 'TOBJECT') do
+ begin
+ RegisterMethod('constructor Create');
+ RegisterMethod('procedure Free');
+ end;
+end;
+
+procedure SIRegisterTPersistent(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TObject'), 'TPERSISTENT') do
+ begin
+ RegisterMethod('procedure Assign(Source: TPersistent)');
+ end;
+end;
+
+procedure SIRegisterTComponent(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TPersistent'), 'TCOMPONENT') do
+ begin
+ RegisterMethod('function FindComponent(AName: string): TComponent;');
+ RegisterMethod('constructor Create(AOwner: TComponent); virtual;');
+
+ RegisterProperty('Owner', 'TComponent', iptRW);
+ RegisterMethod('procedure DESTROYCOMPONENTS');
+ RegisterMethod('procedure DESTROYING');
+ RegisterMethod('procedure FREENOTIFICATION(ACOMPONENT:TCOMPONENT)');
+ RegisterMethod('procedure INSERTCOMPONENT(ACOMPONENT:TCOMPONENT)');
+ RegisterMethod('procedure REMOVECOMPONENT(ACOMPONENT:TCOMPONENT)');
+ RegisterProperty('COMPONENTS', 'TCOMPONENT INTEGER', iptr);
+ RegisterProperty('COMPONENTCOUNT', 'INTEGER', iptr);
+ RegisterProperty('COMPONENTINDEX', 'INTEGER', iptrw);
+ RegisterProperty('COMPONENTSTATE', 'Byte', iptr);
+ RegisterProperty('DESIGNINFO', 'LONGINT', iptrw);
+ RegisterProperty('NAME', 'STRING', iptrw);
+ RegisterProperty('TAG', 'LONGINT', iptrw);
+ end;
+end;
+
+
+
+
+procedure SIRegister_Std_TypesAndConsts(Cl: TPSPascalCompiler);
+begin
+ Cl.AddTypeS('TComponentStateE', '(csLoading, csReading, csWriting, csDestroying, csDesigning, csAncestor, csUpdating, csFixups, csFreeNotification, csInline, csDesignInstance)');
+ cl.AddTypeS('TComponentState', 'set of TComponentStateE');
+ Cl.AddTypeS('TRect', 'record Left, Top, Right, Bottom: Integer; end;');
+end;
+
+procedure SIRegister_Std(Cl: TPSPascalCompiler);
+begin
+ SIRegister_Std_TypesAndConsts(Cl);
+ SIRegisterTObject(CL);
+ SIRegisterTPersistent(Cl);
+ SIRegisterTComponent(Cl);
+end;
+
+// PS_MINIVCL changes by Martijn Laan (mlaan at wintax _dot_ nl)
+
+
+End.
+
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/uPSC_stdctrls.pas b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSC_stdctrls.pas
new file mode 100644
index 0000000..e131529
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSC_stdctrls.pas
@@ -0,0 +1,633 @@
+{ Compiletime STDCtrls support }
+unit uPSC_stdctrls;
+
+{$I PascalScript.inc}
+interface
+uses
+ uPSCompiler, uPSUtils;
+
+{
+ Will register files from:
+ stdctrls
+
+Requires:
+ STD, classes, controls and graphics
+}
+
+procedure SIRegister_StdCtrls_TypesAndConsts(cl: TPSPascalCompiler);
+
+
+
+procedure SIRegisterTCUSTOMGROUPBOX(Cl: TPSPascalCompiler);
+procedure SIRegisterTGROUPBOX(Cl: TPSPascalCompiler);
+procedure SIRegisterTCUSTOMLABEL(Cl: TPSPascalCompiler);
+procedure SIRegisterTLABEL(Cl: TPSPascalCompiler);
+procedure SIRegisterTCUSTOMEDIT(Cl: TPSPascalCompiler);
+procedure SIRegisterTEDIT(Cl: TPSPascalCompiler);
+procedure SIRegisterTCUSTOMMEMO(Cl: TPSPascalCompiler);
+procedure SIRegisterTMEMO(Cl: TPSPascalCompiler);
+procedure SIRegisterTCUSTOMCOMBOBOX(Cl: TPSPascalCompiler);
+procedure SIRegisterTCOMBOBOX(Cl: TPSPascalCompiler);
+procedure SIRegisterTBUTTONCONTROL(Cl: TPSPascalCompiler);
+procedure SIRegisterTBUTTON(Cl: TPSPascalCompiler);
+procedure SIRegisterTCUSTOMCHECKBOX(Cl: TPSPascalCompiler);
+procedure SIRegisterTCHECKBOX(Cl: TPSPascalCompiler);
+procedure SIRegisterTRADIOBUTTON(Cl: TPSPascalCompiler);
+procedure SIRegisterTCUSTOMLISTBOX(Cl: TPSPascalCompiler);
+procedure SIRegisterTLISTBOX(Cl: TPSPascalCompiler);
+procedure SIRegisterTSCROLLBAR(Cl: TPSPascalCompiler);
+
+procedure SIRegister_StdCtrls(cl: TPSPascalCompiler);
+
+
+implementation
+
+procedure SIRegisterTCUSTOMGROUPBOX(Cl: TPSPascalCompiler);
+begin
+ Cl.AddClassN(cl.FindClass('TCUSTOMCONTROL'), 'TCUSTOMGROUPBOX');
+end;
+
+
+procedure SIRegisterTGROUPBOX(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TCUSTOMGROUPBOX'), 'TGROUPBOX') do
+ begin
+ RegisterProperty('CAPTION', 'String', iptrw);
+ RegisterProperty('COLOR', 'TColor', iptrw);
+ RegisterProperty('FONT', 'TFont', iptrw);
+ RegisterProperty('PARENTCOLOR', 'Boolean', iptrw);
+ RegisterProperty('PARENTFONT', 'Boolean', iptrw);
+ RegisterProperty('ONCLICK', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONDBLCLICK', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONENTER', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONEXIT', 'TNotifyEvent', iptrw);
+
+ {$IFNDEF PS_MINIVCL}
+ RegisterProperty('CTL3D', 'Boolean', iptrw);
+ RegisterProperty('DRAGCURSOR', 'Longint', iptrw);
+ RegisterProperty('DRAGMODE', 'TDragMode', iptrw);
+ RegisterProperty('PARENTCTL3D', 'Boolean', iptrw);
+ RegisterProperty('PARENTSHOWHINT', 'Boolean', iptrw);
+ RegisterProperty('POPUPMENU', 'TPopupMenu', iptrw);
+ RegisterProperty('ONDRAGDROP', 'TDragDropEvent', iptrw);
+ RegisterProperty('ONDRAGOVER', 'TDragOverEvent', iptrw);
+ RegisterProperty('ONENDDRAG', 'TEndDragEvent', iptrw);
+ RegisterProperty('ONMOUSEDOWN', 'TMouseEvent', iptrw);
+ RegisterProperty('ONMOUSEMOVE', 'TMouseMoveEvent', iptrw);
+ RegisterProperty('ONMOUSEUP', 'TMouseEvent', iptrw);
+ RegisterProperty('ONSTARTDRAG', 'TStartDragEvent', iptrw);
+ {$ENDIF}
+ end;
+end;
+
+
+
+
+
+procedure SIRegisterTCUSTOMLABEL(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TGRAPHICCONTROL'), 'TCUSTOMLABEL') do
+ begin
+ {$IFNDEF PS_MINIVCL}
+{$IFNDEF CLX}
+ RegisterProperty('CANVAS', 'TCANVAS', iptr);
+{$ENDIF}
+ {$ENDIF}
+ end;
+end;
+
+
+procedure SIRegisterTLABEL(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TCUSTOMLABEL'), 'TLABEL') do
+ begin
+ RegisterProperty('ALIGNMENT', 'TAlignment', iptrw);
+ RegisterProperty('AUTOSIZE', 'Boolean', iptrw);
+ RegisterProperty('CAPTION', 'String', iptrw);
+ RegisterProperty('COLOR', 'TColor', iptrw);
+ RegisterProperty('DRAGCURSOR', 'Longint', iptrw);
+ RegisterProperty('DRAGMODE', 'TDragMode', iptrw);
+ RegisterProperty('FOCUSCONTROL', 'TWinControl', iptrw);
+ RegisterProperty('FONT', 'TFont', iptrw);
+ RegisterProperty('LAYOUT', 'TTextLayout', iptrw);
+ RegisterProperty('PARENTCOLOR', 'Boolean', iptrw);
+ RegisterProperty('PARENTFONT', 'Boolean', iptrw);
+ RegisterProperty('PARENTSHOWHINT', 'Boolean', iptrw);
+ RegisterProperty('SHOWACCELCHAR', 'Boolean', iptrw);
+ RegisterProperty('TRANSPARENT', 'Boolean', iptrw);
+ RegisterProperty('WORDWRAP', 'Boolean', iptrw);
+ RegisterProperty('ONCLICK', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONDBLCLICK', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONDRAGDROP', 'TDragDropEvent', iptrw);
+ RegisterProperty('ONDRAGOVER', 'TDragOverEvent', iptrw);
+ RegisterProperty('ONENDDRAG', 'TEndDragEvent', iptrw);
+ RegisterProperty('ONMOUSEDOWN', 'TMouseEvent', iptrw);
+ RegisterProperty('ONMOUSEMOVE', 'TMouseMoveEvent', iptrw);
+ RegisterProperty('ONMOUSEUP', 'TMouseEvent', iptrw);
+ RegisterProperty('ONSTARTDRAG', 'TStartDragEvent', iptrw);
+ end;
+end;
+
+
+
+
+
+
+
+procedure SIRegisterTCUSTOMEDIT(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TWINCONTROL'), 'TCUSTOMEDIT') do
+ begin
+ RegisterMethod('procedure CLEAR');
+ RegisterMethod('procedure CLEARSELECTION');
+ RegisterMethod('procedure SELECTALL');
+ RegisterProperty('MODIFIED', 'BOOLEAN', iptrw);
+ RegisterProperty('SELLENGTH', 'INTEGER', iptrw);
+ RegisterProperty('SELSTART', 'INTEGER', iptrw);
+ RegisterProperty('SELTEXT', 'STRING', iptrw);
+ RegisterProperty('TEXT', 'string', iptrw);
+
+ {$IFNDEF PS_MINIVCL}
+ RegisterMethod('procedure COPYTOCLIPBOARD');
+ RegisterMethod('procedure CUTTOCLIPBOARD');
+ RegisterMethod('procedure PASTEFROMCLIPBOARD');
+ RegisterMethod('function GETSELTEXTBUF(BUFFER:PCHAR;BUFSIZE:INTEGER):INTEGER');
+ RegisterMethod('procedure SETSELTEXTBUF(BUFFER:PCHAR)');
+ {$ENDIF}
+ end;
+end;
+
+
+
+
+procedure SIRegisterTEDIT(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TCUSTOMEDIT'), 'TEDIT') do
+ begin
+ RegisterProperty('AUTOSELECT', 'Boolean', iptrw);
+ RegisterProperty('AUTOSIZE', 'Boolean', iptrw);
+ RegisterProperty('BORDERSTYLE', 'TBorderStyle', iptrw);
+ RegisterProperty('CHARCASE', 'TEditCharCase', iptrw);
+ RegisterProperty('COLOR', 'TColor', iptrw);
+ RegisterProperty('FONT', 'TFont', iptrw);
+ RegisterProperty('HIDESELECTION', 'Boolean', iptrw);
+ RegisterProperty('MAXLENGTH', 'Integer', iptrw);
+ RegisterProperty('PARENTCOLOR', 'Boolean', iptrw);
+ RegisterProperty('PARENTFONT', 'Boolean', iptrw);
+ RegisterProperty('PASSWORDCHAR', 'Char', iptrw);
+ RegisterProperty('READONLY', 'Boolean', iptrw);
+ RegisterProperty('TEXT', 'string', iptrw);
+ RegisterProperty('ONCHANGE', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONCLICK', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONDBLCLICK', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONENTER', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONEXIT', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONKEYDOWN', 'TKeyEvent', iptrw);
+ RegisterProperty('ONKEYPRESS', 'TKeyPressEvent', iptrw);
+ RegisterProperty('ONKEYUP', 'TKeyEvent', iptrw);
+
+ {$IFNDEF PS_MINIVCL}
+ RegisterProperty('CTL3D', 'Boolean', iptrw);
+ RegisterProperty('DRAGCURSOR', 'Longint', iptrw);
+ RegisterProperty('DRAGMODE', 'TDragMode', iptrw);
+ RegisterProperty('OEMCONVERT', 'Boolean', iptrw);
+ RegisterProperty('PARENTCTL3D', 'Boolean', iptrw);
+ RegisterProperty('PARENTSHOWHINT', 'Boolean', iptrw);
+ RegisterProperty('POPUPMENU', 'TPopupMenu', iptrw);
+ RegisterProperty('ONDRAGDROP', 'TDragDropEvent', iptrw);
+ RegisterProperty('ONDRAGOVER', 'TDragOverEvent', iptrw);
+ RegisterProperty('ONENDDRAG', 'TEndDragEvent', iptrw);
+ RegisterProperty('ONMOUSEDOWN', 'TMouseEvent', iptrw);
+ RegisterProperty('ONMOUSEMOVE', 'TMouseMoveEvent', iptrw);
+ RegisterProperty('ONMOUSEUP', 'TMouseEvent', iptrw);
+ RegisterProperty('ONSTARTDRAG', 'TStartDragEvent', iptrw);
+ {$ENDIF}
+ end;
+end;
+
+
+
+
+procedure SIRegisterTCUSTOMMEMO(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TCUSTOMEDIT'), 'TCUSTOMMEMO') do
+ begin
+ {$IFNDEF CLX}
+ RegisterProperty('LINES', 'TSTRINGS', iptrw);
+ {$ENDIF}
+ end;
+end;
+
+
+procedure SIRegisterTMEMO(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TCUSTOMMEMO'), 'TMEMO') do
+ begin
+ {$IFDEF CLX}
+ RegisterProperty('LINES', 'TSTRINGS', iptrw);
+ {$ENDIF}
+ RegisterProperty('ALIGNMENT', 'TAlignment', iptrw);
+ RegisterProperty('BORDERSTYLE', 'TBorderStyle', iptrw);
+ RegisterProperty('COLOR', 'TColor', iptrw);
+ RegisterProperty('FONT', 'TFont', iptrw);
+ RegisterProperty('HIDESELECTION', 'Boolean', iptrw);
+ RegisterProperty('MAXLENGTH', 'Integer', iptrw);
+ RegisterProperty('PARENTCOLOR', 'Boolean', iptrw);
+ RegisterProperty('PARENTFONT', 'Boolean', iptrw);
+ RegisterProperty('READONLY', 'Boolean', iptrw);
+ RegisterProperty('SCROLLBARS', 'TScrollStyle', iptrw);
+ RegisterProperty('WANTRETURNS', 'Boolean', iptrw);
+ RegisterProperty('WANTTABS', 'Boolean', iptrw);
+ RegisterProperty('WORDWRAP', 'Boolean', iptrw);
+ RegisterProperty('ONCHANGE', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONCLICK', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONDBLCLICK', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONENTER', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONEXIT', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONKEYDOWN', 'TKeyEvent', iptrw);
+ RegisterProperty('ONKEYPRESS', 'TKeyPressEvent', iptrw);
+ RegisterProperty('ONKEYUP', 'TKeyEvent', iptrw);
+
+ {$IFNDEF PS_MINIVCL}
+ RegisterProperty('CTL3D', 'Boolean', iptrw);
+ RegisterProperty('DRAGCURSOR', 'Longint', iptrw);
+ RegisterProperty('DRAGMODE', 'TDragMode', iptrw);
+ RegisterProperty('OEMCONVERT', 'Boolean', iptrw);
+ RegisterProperty('PARENTCTL3D', 'Boolean', iptrw);
+ RegisterProperty('PARENTSHOWHINT', 'Boolean', iptrw);
+ RegisterProperty('POPUPMENU', 'TPopupMenu', iptrw);
+ RegisterProperty('ONDRAGDROP', 'TDragDropEvent', iptrw);
+ RegisterProperty('ONDRAGOVER', 'TDragOverEvent', iptrw);
+ RegisterProperty('ONENDDRAG', 'TEndDragEvent', iptrw);
+ RegisterProperty('ONMOUSEDOWN', 'TMouseEvent', iptrw);
+ RegisterProperty('ONMOUSEMOVE', 'TMouseMoveEvent', iptrw);
+ RegisterProperty('ONMOUSEUP', 'TMouseEvent', iptrw);
+ RegisterProperty('ONSTARTDRAG', 'TStartDragEvent', iptrw);
+ {$ENDIF}
+ end;
+end;
+
+
+
+
+
+procedure SIRegisterTCUSTOMCOMBOBOX(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TWINCONTROL'), 'TCUSTOMCOMBOBOX') do
+ begin
+ RegisterProperty('DROPPEDDOWN', 'BOOLEAN', iptrw);
+ RegisterProperty('ITEMS', 'TSTRINGS', iptrw);
+ RegisterProperty('ITEMINDEX', 'INTEGER', iptrw);
+
+ {$IFNDEF PS_MINIVCL}
+ RegisterMethod('procedure CLEAR');
+ RegisterMethod('procedure SELECTALL');
+ RegisterProperty('CANVAS', 'TCANVAS', iptr);
+ RegisterProperty('SELLENGTH', 'INTEGER', iptrw);
+ RegisterProperty('SELSTART', 'INTEGER', iptrw);
+ RegisterProperty('SELTEXT', 'STRING', iptrw);
+ {$ENDIF}
+ end;
+end;
+
+
+procedure SIRegisterTCOMBOBOX(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TCUSTOMCOMBOBOX'), 'TCOMBOBOX') do
+ begin
+ RegisterProperty('STYLE', 'TComboBoxStyle', iptrw);
+ RegisterProperty('COLOR', 'TColor', iptrw);
+ RegisterProperty('DROPDOWNCOUNT', 'Integer', iptrw);
+ RegisterProperty('FONT', 'TFont', iptrw);
+ RegisterProperty('MAXLENGTH', 'Integer', iptrw);
+ RegisterProperty('PARENTCOLOR', 'Boolean', iptrw);
+ RegisterProperty('PARENTFONT', 'Boolean', iptrw);
+ RegisterProperty('SORTED', 'Boolean', iptrw);
+ RegisterProperty('TEXT', 'string', iptrw);
+ RegisterProperty('ONCHANGE', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONCLICK', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONDBLCLICK', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONDROPDOWN', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONENTER', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONEXIT', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONKEYDOWN', 'TKeyEvent', iptrw);
+ RegisterProperty('ONKEYPRESS', 'TKeyPressEvent', iptrw);
+ RegisterProperty('ONKEYUP', 'TKeyEvent', iptrw);
+
+ {$IFNDEF PS_MINIVCL}
+ RegisterProperty('CTL3D', 'Boolean', iptrw);
+ RegisterProperty('DRAGMODE', 'TDragMode', iptrw);
+ RegisterProperty('DRAGCURSOR', 'Longint', iptrw);
+ RegisterProperty('ITEMHEIGHT', 'Integer', iptrw);
+ RegisterProperty('PARENTCTL3D', 'Boolean', iptrw);
+ RegisterProperty('PARENTSHOWHINT', 'Boolean', iptrw);
+ RegisterProperty('POPUPMENU', 'TPopupMenu', iptrw);
+ RegisterProperty('ONDRAGDROP', 'TDragDropEvent', iptrw);
+ RegisterProperty('ONDRAGOVER', 'TDragOverEvent', iptrw);
+ RegisterProperty('ONDRAWITEM', 'TDrawItemEvent', iptrw);
+ RegisterProperty('ONENDDRAG', 'TEndDragEvent', iptrw);
+ RegisterProperty('ONMEASUREITEM', 'TMeasureItemEvent', iptrw);
+ RegisterProperty('ONSTARTDRAG', 'TStartDragEvent', iptrw);
+ {$ENDIF}
+ end;
+end;
+
+
+
+procedure SIRegisterTBUTTONCONTROL(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TWINCONTROL'), 'TBUTTONCONTROL') do
+ begin
+ end;
+end;
+
+
+
+procedure SIRegisterTBUTTON(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TBUTTONCONTROL'), 'TBUTTON') do
+ begin
+ RegisterProperty('CANCEL', 'BOOLEAN', iptrw);
+ RegisterProperty('CAPTION', 'String', iptrw);
+ RegisterProperty('DEFAULT', 'BOOLEAN', iptrw);
+ RegisterProperty('FONT', 'TFont', iptrw);
+ RegisterProperty('MODALRESULT', 'LONGINT', iptrw);
+ RegisterProperty('PARENTFONT', 'Boolean', iptrw);
+ RegisterProperty('ONCLICK', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONENTER', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONEXIT', 'TNotifyEvent', iptrw);
+
+ {$IFNDEF PS_MINIVCL}
+ RegisterProperty('DRAGCURSOR', 'Longint', iptrw);
+ RegisterProperty('DRAGMODE', 'TDragMode', iptrw);
+ RegisterProperty('PARENTSHOWHINT', 'Boolean', iptrw);
+ RegisterProperty('POPUPMENU', 'TPopupMenu', iptrw);
+ RegisterProperty('ONDRAGDROP', 'TDragDropEvent', iptrw);
+ RegisterProperty('ONDRAGOVER', 'TDragOverEvent', iptrw);
+ RegisterProperty('ONENDDRAG', 'TEndDragEvent', iptrw);
+ RegisterProperty('ONKEYDOWN', 'TKeyEvent', iptrw);
+ RegisterProperty('ONKEYPRESS', 'TKeyPressEvent', iptrw);
+ RegisterProperty('ONKEYUP', 'TKeyEvent', iptrw);
+ RegisterProperty('ONMOUSEDOWN', 'TMouseEvent', iptrw);
+ RegisterProperty('ONMOUSEMOVE', 'TMouseMoveEvent', iptrw);
+ RegisterProperty('ONMOUSEUP', 'TMouseEvent', iptrw);
+ RegisterProperty('ONSTARTDRAG', 'TStartDragEvent', iptrw);
+ {$ENDIF}
+ end;
+end;
+
+
+
+procedure SIRegisterTCUSTOMCHECKBOX(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TBUTTONCONTROL'), 'TCUSTOMCHECKBOX') do
+ begin
+ end;
+end;
+
+
+
+procedure SIRegisterTCHECKBOX(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TCUSTOMCHECKBOX'), 'TCHECKBOX') do
+ begin
+ RegisterProperty('ALIGNMENT', 'TAlignment', iptrw);
+ RegisterProperty('ALLOWGRAYED', 'Boolean', iptrw);
+ RegisterProperty('CAPTION', 'String', iptrw);
+ RegisterProperty('CHECKED', 'Boolean', iptrw);
+ RegisterProperty('COLOR', 'TColor', iptrw);
+ RegisterProperty('FONT', 'TFont', iptrw);
+ RegisterProperty('PARENTCOLOR', 'Boolean', iptrw);
+ RegisterProperty('PARENTFONT', 'Boolean', iptrw);
+ RegisterProperty('STATE', 'TCheckBoxState', iptrw);
+ RegisterProperty('ONCLICK', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONENTER', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONEXIT', 'TNotifyEvent', iptrw);
+
+ {$IFNDEF PS_MINIVCL}
+ RegisterProperty('CTL3D', 'Boolean', iptrw);
+ RegisterProperty('DRAGCURSOR', 'Longint', iptrw);
+ RegisterProperty('DRAGMODE', 'TDragMode', iptrw);
+ RegisterProperty('PARENTCTL3D', 'Boolean', iptrw);
+ RegisterProperty('PARENTSHOWHINT', 'Boolean', iptrw);
+ RegisterProperty('POPUPMENU', 'TPopupMenu', iptrw);
+ RegisterProperty('ONDRAGDROP', 'TDragDropEvent', iptrw);
+ RegisterProperty('ONDRAGOVER', 'TDragOverEvent', iptrw);
+ RegisterProperty('ONENDDRAG', 'TEndDragEvent', iptrw);
+ RegisterProperty('ONKEYDOWN', 'TKeyEvent', iptrw);
+ RegisterProperty('ONKEYPRESS', 'TKeyPressEvent', iptrw);
+ RegisterProperty('ONKEYUP', 'TKeyEvent', iptrw);
+ RegisterProperty('ONMOUSEDOWN', 'TMouseEvent', iptrw);
+ RegisterProperty('ONMOUSEMOVE', 'TMouseMoveEvent', iptrw);
+ RegisterProperty('ONMOUSEUP', 'TMouseEvent', iptrw);
+ RegisterProperty('ONSTARTDRAG', 'TStartDragEvent', iptrw);
+ {$ENDIF}
+ end;
+end;
+
+
+
+
+
+procedure SIRegisterTRADIOBUTTON(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TBUTTONCONTROL'), 'TRADIOBUTTON') do
+ begin
+ RegisterProperty('ALIGNMENT', 'TALIGNMENT', iptrw);
+ RegisterProperty('CAPTION', 'String', iptrw);
+ RegisterProperty('CHECKED', 'BOOLEAN', iptrw);
+ RegisterProperty('COLOR', 'TColor', iptrw);
+ RegisterProperty('FONT', 'TFont', iptrw);
+ RegisterProperty('PARENTCOLOR', 'Boolean', iptrw);
+ RegisterProperty('PARENTFONT', 'Boolean', iptrw);
+ RegisterProperty('ONCLICK', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONDBLCLICK', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONENTER', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONEXIT', 'TNotifyEvent', iptrw);
+
+ {$IFNDEF PS_MINIVCL}
+ RegisterProperty('CTL3D', 'Boolean', iptrw);
+ RegisterProperty('DRAGCURSOR', 'Longint', iptrw);
+ RegisterProperty('DRAGMODE', 'TDragMode', iptrw);
+ RegisterProperty('PARENTCTL3D', 'Boolean', iptrw);
+ RegisterProperty('PARENTSHOWHINT', 'Boolean', iptrw);
+ RegisterProperty('POPUPMENU', 'TPopupMenu', iptrw);
+ RegisterProperty('ONDRAGDROP', 'TDragDropEvent', iptrw);
+ RegisterProperty('ONDRAGOVER', 'TDragOverEvent', iptrw);
+ RegisterProperty('ONENDDRAG', 'TEndDragEvent', iptrw);
+ RegisterProperty('ONKEYDOWN', 'TKeyEvent', iptrw);
+ RegisterProperty('ONKEYPRESS', 'TKeyPressEvent', iptrw);
+ RegisterProperty('ONKEYUP', 'TKeyEvent', iptrw);
+ RegisterProperty('ONMOUSEDOWN', 'TMouseEvent', iptrw);
+ RegisterProperty('ONMOUSEMOVE', 'TMouseMoveEvent', iptrw);
+ RegisterProperty('ONMOUSEUP', 'TMouseEvent', iptrw);
+ RegisterProperty('ONSTARTDRAG', 'TStartDragEvent', iptrw);
+ {$ENDIF}
+ end;
+end;
+
+
+
+procedure SIRegisterTCUSTOMLISTBOX(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TWINCONTROL'), 'TCUSTOMLISTBOX') do
+ begin
+ RegisterProperty('ITEMS', 'TSTRINGS', iptrw);
+ RegisterProperty('ITEMINDEX', 'INTEGER', iptrw);
+ RegisterProperty('SELCOUNT', 'INTEGER', iptr);
+ RegisterProperty('SELECTED', 'BOOLEAN INTEGER', iptrw);
+
+ {$IFNDEF PS_MINIVCL}
+ RegisterMethod('procedure CLEAR');
+ RegisterMethod('function ITEMATPOS(POS:TPOINT;EXISTING:BOOLEAN):INTEGER');
+ RegisterMethod('function ITEMRECT(INDEX:INTEGER):TRECT');
+ RegisterProperty('CANVAS', 'TCANVAS', iptr);
+ RegisterProperty('TOPINDEX', 'INTEGER', iptrw);
+ {$ENDIF}
+ end;
+end;
+
+
+
+procedure SIRegisterTLISTBOX(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TCUSTOMLISTBOX'), 'TLISTBOX') do
+ begin
+ RegisterProperty('BORDERSTYLE', 'TBorderStyle', iptrw);
+ RegisterProperty('COLOR', 'TColor', iptrw);
+ RegisterProperty('FONT', 'TFont', iptrw);
+ RegisterProperty('MULTISELECT', 'Boolean', iptrw);
+ RegisterProperty('PARENTCOLOR', 'Boolean', iptrw);
+ RegisterProperty('PARENTFONT', 'Boolean', iptrw);
+ RegisterProperty('SORTED', 'Boolean', iptrw);
+ RegisterProperty('STYLE', 'TListBoxStyle', iptrw);
+ RegisterProperty('ONCLICK', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONDBLCLICK', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONENTER', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONEXIT', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONKEYDOWN', 'TKeyEvent', iptrw);
+ RegisterProperty('ONKEYPRESS', 'TKeyPressEvent', iptrw);
+ RegisterProperty('ONKEYUP', 'TKeyEvent', iptrw);
+
+ {$IFNDEF PS_MINIVCL}
+ RegisterProperty('COLUMNS', 'Integer', iptrw);
+ RegisterProperty('CTL3D', 'Boolean', iptrw);
+ RegisterProperty('DRAGCURSOR', 'Longint', iptrw);
+ RegisterProperty('DRAGMODE', 'TDragMode', iptrw);
+ RegisterProperty('EXTENDEDSELECT', 'Boolean', iptrw);
+ RegisterProperty('INTEGRALHEIGHT', 'Boolean', iptrw);
+ RegisterProperty('ITEMHEIGHT', 'Integer', iptrw);
+ RegisterProperty('PARENTCTL3D', 'Boolean', iptrw);
+ RegisterProperty('PARENTSHOWHINT', 'Boolean', iptrw);
+ RegisterProperty('POPUPMENU', 'TPopupMenu', iptrw);
+ RegisterProperty('TABWIDTH', 'Integer', iptrw);
+ RegisterProperty('ONDRAGDROP', 'TDragDropEvent', iptrw);
+ RegisterProperty('ONDRAGOVER', 'TDragOverEvent', iptrw);
+ RegisterProperty('ONDRAWITEM', 'TDrawItemEvent', iptrw);
+ RegisterProperty('ONENDDRAG', 'TEndDragEvent', iptrw);
+ RegisterProperty('ONMEASUREITEM', 'TMeasureItemEvent', iptrw);
+ RegisterProperty('ONMOUSEDOWN', 'TMouseEvent', iptrw);
+ RegisterProperty('ONMOUSEMOVE', 'TMouseMoveEvent', iptrw);
+ RegisterProperty('ONMOUSEUP', 'TMouseEvent', iptrw);
+ RegisterProperty('ONSTARTDRAG', 'TStartDragEvent', iptrw);
+ {$ENDIF}
+ end;
+end;
+
+
+
+
+
+
+procedure SIRegisterTSCROLLBAR(Cl: TPSPascalCompiler);
+begin
+ with Cl.AddClassN(cl.FindClass('TWINCONTROL'), 'TSCROLLBAR') do
+ begin
+ RegisterProperty('KIND', 'TSCROLLBARKIND', iptrw);
+ RegisterProperty('MAX', 'INTEGER', iptrw);
+ RegisterProperty('MIN', 'INTEGER', iptrw);
+ RegisterProperty('POSITION', 'INTEGER', iptrw);
+ RegisterProperty('ONCHANGE', 'TNOTIFYEVENT', iptrw);
+ RegisterProperty('ONENTER', 'TNotifyEvent', iptrw);
+ RegisterProperty('ONEXIT', 'TNotifyEvent', iptrw);
+
+ {$IFNDEF PS_MINIVCL}
+ RegisterMethod('procedure SETPARAMS(APOSITION,AMIN,AMAX:INTEGER)');
+ RegisterProperty('CTL3D', 'Boolean', iptrw);
+ RegisterProperty('DRAGCURSOR', 'Longint', iptrw);
+ RegisterProperty('DRAGMODE', 'TDragMode', iptrw);
+ RegisterProperty('LARGECHANGE', 'TSCROLLBARINC', iptrw);
+ RegisterProperty('PARENTCTL3D', 'Boolean', iptrw);
+ RegisterProperty('PARENTSHOWHINT', 'Boolean', iptrw);
+ RegisterProperty('POPUPMENU', 'TPopupMenu', iptrw);
+ RegisterProperty('SMALLCHANGE', 'TSCROLLBARINC', iptrw);
+ RegisterProperty('ONDRAGDROP', 'TDragDropEvent', iptrw);
+ RegisterProperty('ONDRAGOVER', 'TDragOverEvent', iptrw);
+ RegisterProperty('ONENDDRAG', 'TEndDragEvent', iptrw);
+ RegisterProperty('ONKEYDOWN', 'TKeyEvent', iptrw);
+ RegisterProperty('ONKEYPRESS', 'TKeyPressEvent', iptrw);
+ RegisterProperty('ONKEYUP', 'TKeyEvent', iptrw);
+ RegisterProperty('ONSCROLL', 'TSCROLLEVENT', iptrw);
+ RegisterProperty('ONSTARTDRAG', 'TStartDragEvent', iptrw);
+ {$ENDIF}
+ end;
+end;
+
+
+
+procedure SIRegister_StdCtrls_TypesAndConsts(cl: TPSPascalCompiler);
+begin
+ cl.AddTypeS('TEditCharCase', '(ecNormal, ecUpperCase, ecLowerCase)');
+ cl.AddTypeS('TScrollStyle', '(ssNone, ssHorizontal, ssVertical, ssBoth)');
+ cl.AddTypeS('TComboBoxStyle', '(csDropDown, csSimple, csDropDownList, csOwnerDrawFixed, csOwnerDrawVariable)');
+ cl.AddTypeS('TDrawItemEvent', 'procedure(Control: TWinControl; Index: Integer; Rect: TRect; State: Byte)');
+ cl.AddTypeS('TMeasureItemEvent', 'procedure(Control: TWinControl; Index: Integer; var Height: Integer)');
+ cl.AddTypeS('TCheckBoxState', '(cbUnchecked, cbChecked, cbGrayed)');
+ cl.AddTypeS('TListBoxStyle', '(lbStandard, lbOwnerDrawFixed, lbOwnerDrawVariable)');
+ cl.AddTypeS('TScrollCode', '(scLineUp, scLineDown, scPageUp, scPageDown, scPosition, scTrack, scTop, scBottom, scEndScroll)');
+ cl.AddTypeS('TScrollEvent', 'procedure(Sender: TObject; ScrollCode: TScrollCode;var ScrollPos: Integer)');
+
+ Cl.addTypeS('TEOwnerDrawState', '(odSelected, odGrayed, odDisabled, odChecked,'
+ +' odFocused, odDefault, odHotLight, odInactive, odNoAccel, odNoFocusRect,'
+ +' odReserved1, odReserved2, odComboBoxEdit)');
+ cl.AddTypeS('TTextLayout', '( tlTop, tlCenter, tlBottom )');
+ cl.AddTypeS('TOwnerDrawState', 'set of TEOwnerDrawState');
+end;
+
+
+procedure SIRegister_stdctrls(cl: TPSPascalCompiler);
+begin
+ SIRegister_StdCtrls_TypesAndConsts(cl);
+ {$IFNDEF PS_MINIVCL}
+ SIRegisterTCUSTOMGROUPBOX(Cl);
+ SIRegisterTGROUPBOX(Cl);
+ {$ENDIF}
+ SIRegisterTCUSTOMLABEL(Cl);
+ SIRegisterTLABEL(Cl);
+ SIRegisterTCUSTOMEDIT(Cl);
+ SIRegisterTEDIT(Cl);
+ SIRegisterTCUSTOMMEMO(Cl);
+ SIRegisterTMEMO(Cl);
+ SIRegisterTCUSTOMCOMBOBOX(Cl);
+ SIRegisterTCOMBOBOX(Cl);
+ SIRegisterTBUTTONCONTROL(Cl);
+ SIRegisterTBUTTON(Cl);
+ SIRegisterTCUSTOMCHECKBOX(Cl);
+ SIRegisterTCHECKBOX(Cl);
+ SIRegisterTRADIOBUTTON(Cl);
+ SIRegisterTCUSTOMLISTBOX(Cl);
+ SIRegisterTLISTBOX(Cl);
+ {$IFNDEF PS_MINIVCL}
+ SIRegisterTSCROLLBAR(Cl);
+ {$ENDIF}
+end;
+
+// PS_MINIVCL changes by Martijn Laan (mlaan at wintax _dot_ nl)
+
+
+end.
+
+
+
+
+
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/uPSCompiler.pas b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSCompiler.pas
new file mode 100644
index 0000000..5c87388
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSCompiler.pas
@@ -0,0 +1,15121 @@
+unit uPSCompiler;
+{$I PascalScript.inc}
+interface
+uses
+ {$IFNDEF DELPHI3UP}{$IFNDEF PS_NOINTERFACES}{$IFNDEF LINUX}Windows, Ole2,{$ENDIF}
+ {$ENDIF}{$ENDIF}SysUtils, uPSUtils;
+
+
+type
+{$IFNDEF PS_NOINTERFACES}
+ TPSInterface = class;
+{$ENDIF}
+
+ TPSParameterMode = (pmIn, pmOut, pmInOut);
+ TPSPascalCompiler = class;
+ TPSType = class;
+ TPSValue = class;
+ TPSParameters = class;
+
+ TPSSubOptType = (tMainBegin, tProcBegin, tSubBegin, tOneLiner, tifOneliner, tRepeat, tTry, tTryEnd
+ {$IFDEF PS_USESSUPPORT},tUnitInit, tUnitFinish {$ENDIF}); //nvds
+
+
+ {TPSExternalClass is used when external classes need to be called}
+ TPSCompileTimeClass = class;
+ TPSAttributes = class;
+ TPSAttribute = class;
+
+ EPSCompilerException = class(Exception) end;
+
+ TPSParameterDecl = class(TObject)
+ private
+ FName: string;
+ FOrgName: string;
+ FMode: TPSParameterMode;
+ FType: TPSType;
+ {$IFDEF PS_USESSUPPORT}
+ FDeclareUnit: String;
+ {$ENDIF}
+ FDeclarePos: Cardinal;
+ FDeclareRow: Cardinal;
+ FDeclareCol: Cardinal;
+ procedure SetName(const s: string);
+ public
+
+ property Name: string read FName;
+
+ property OrgName: string read FOrgName write SetName;
+
+ property aType: TPSType read FType write FType;
+
+ property Mode: TPSParameterMode read FMode write FMode;
+
+ {$IFDEF PS_USESSUPPORT}
+ property DeclareUnit: String read FDeclareUnit write FDeclareUnit;
+ {$ENDIF}
+
+ property DeclarePos: Cardinal read FDeclarePos write FDeclarePos;
+
+ property DeclareRow: Cardinal read FDeclareRow write FDeclareRow;
+
+ property DeclareCol: Cardinal read FDeclareCol write FDeclareCol;
+
+ end;
+
+
+ TPSParametersDecl = class(TObject)
+ private
+ FParams: TPSList;
+ FResult: TPSType;
+ function GetParam(I: Longint): TPSParameterDecl;
+ function GetParamCount: Longint;
+ public
+
+ property Params[I: Longint]: TPSParameterDecl read GetParam;
+
+ property ParamCount: Longint read GetParamCount;
+
+
+ function AddParam: TPSParameterDecl;
+
+ procedure DeleteParam(I: Longint);
+
+
+ property Result : TPSType read FResult write FResult;
+
+
+ procedure Assign(Params: TPSParametersDecl);
+
+
+ function Same(d: TPSParametersDecl): boolean;
+
+
+ constructor Create;
+
+ destructor Destroy; override;
+ end;
+
+
+ TPSRegProc = class(TObject)
+ private
+ FNameHash: Longint;
+ FName: string;
+ FDecl: TPSParametersDecl;
+ FExportName: Boolean;
+ FImportDecl: string;
+ FOrgName: string;
+ procedure SetName(const Value: string);
+ public
+
+ property OrgName: string read FOrgName write FOrgName;
+
+ property Name: string read FName write SetName;
+
+ property NameHash: Longint read FNameHash;
+
+ property Decl: TPSParametersDecl read FDecl;
+
+ property ExportName: Boolean read FExportName write FExportName;
+
+ property ImportDecl: string read FImportDecl write FImportDecl;
+
+
+ constructor Create;
+
+ destructor Destroy; override;
+ end;
+
+ PIFPSRegProc = TPSRegProc;
+
+ PIfRVariant = ^TIfRVariant;
+
+ TIfRVariant = record
+
+ FType: TPSType;
+ case Byte of
+ 1: (tu8: TbtU8);
+ 2: (tS8: TbtS8);
+ 3: (tu16: TbtU16);
+ 4: (ts16: TbtS16);
+ 5: (tu32: TbtU32);
+ 6: (ts32: TbtS32);
+ 7: (tsingle: TbtSingle);
+ 8: (tdouble: TbtDouble);
+ 9: (textended: TbtExtended);
+ 11: (tcurrency: tbtCurrency);
+ 10: (tstring: Pointer);
+ {$IFNDEF PS_NOINT64}
+ 17: (ts64: Tbts64);
+ {$ENDIF}
+ 19: (tchar: tbtChar);
+ {$IFNDEF PS_NOWIDESTRING}
+ 18: (twidestring: Pointer);
+ 20: (twidechar: tbtwidechar);
+ {$ENDIF}
+ 21: (ttype: TPSType);
+ end;
+
+ TPSRecordFieldTypeDef = class(TObject)
+ private
+ FFieldOrgName: string;
+ FFieldName: string;
+ FFieldNameHash: Longint;
+ FType: TPSType;
+ procedure SetFieldOrgName(const Value: string);
+ public
+
+ property FieldOrgName: string read FFieldOrgName write SetFieldOrgName;
+
+ property FieldName: string read FFieldName;
+
+ property FieldNameHash: Longint read FFieldNameHash;
+
+ property aType: TPSType read FType write FType;
+ end;
+
+ PIFPSRecordFieldTypeDef = TPSRecordFieldTypeDef;
+
+ TPSType = class(TObject)
+ private
+ FNameHash: Longint;
+ FName: string;
+ FBaseType: TPSBaseType;
+ {$IFDEF PS_USESSUPPORT}
+ FDeclareUnit: String;
+ {$ENDIF}
+ FDeclarePos: Cardinal;
+ FDeclareRow: Cardinal;
+ FDeclareCol: Cardinal;
+ FUsed: Boolean;
+ FExportName: Boolean;
+ FOriginalName: string;
+ FAttributes: TPSAttributes;
+ FFinalTypeNo: cardinal;
+ procedure SetName(const Value: string);
+ public
+
+ constructor Create;
+
+ destructor Destroy; override;
+
+ property Attributes: TPSAttributes read FAttributes;
+
+
+ property FinalTypeNo: cardinal read FFinalTypeNo;
+
+
+ property OriginalName: string read FOriginalName write FOriginalName;
+
+ property Name: string read FName write SetName;
+
+ property NameHash: Longint read FNameHash;
+
+ property BaseType: TPSBaseType read FBaseType write FBaseType;
+
+ {$IFDEF PS_USESSUPPORT}
+ property DeclareUnit: String read FDeclareUnit write FDeclareUnit;
+ {$ENDIF}
+
+ property DeclarePos: Cardinal read FDeclarePos write FDeclarePos;
+
+ property DeclareRow: Cardinal read FDeclareRow write FDeclareRow;
+
+ property DeclareCol: Cardinal read FDeclareCol write FDeclareCol;
+
+ property Used: Boolean read FUsed;
+
+ property ExportName: Boolean read FExportName write FExportName;
+
+ procedure Use;
+ end;
+
+
+ PIFPSType = TPSType;
+
+ TPSVariantType = class(TPSType)
+ private
+ public
+ function GetDynInvokeProcNo(Owner: TPSPascalCompiler; const Name: string; Params: TPSParameters): Cardinal; virtual;
+ function GetDynIvokeSelfType(Owner: TPSPascalCompiler): TPSType; virtual;
+ function GetDynInvokeParamType(Owner: TPSPascalCompiler): TPSType; virtual;
+ function GetDynIvokeResulType(Owner: TPSPascalCompiler): TPSType; virtual;
+ end;
+
+
+ TPSRecordType = class(TPSType)
+ private
+ FRecordSubVals: TPSList;
+ public
+
+ constructor Create;
+
+ destructor Destroy; override;
+
+ function RecValCount: Longint;
+
+ function RecVal(I: Longint): PIFPSRecordFieldTypeDef;
+
+ function AddRecVal: PIFPSRecordFieldTypeDef;
+ end;
+
+ TPSClassType = class(TPSType)
+ private
+ FCL: TPSCompiletimeClass;
+ public
+
+ property Cl: TPSCompileTimeClass read FCL write FCL;
+ end;
+ TPSExternalClass = class;
+ TPSUndefinedClassType = class(TPSType)
+ private
+ FExtClass: TPSExternalClass;
+ public
+ property ExtClass: TPSExternalClass read FExtClass write FExtClass;
+ end;
+{$IFNDEF PS_NOINTERFACES}
+
+ TPSInterfaceType = class(TPSType)
+ private
+ FIntf: TPSInterface;
+ public
+
+ property Intf: TPSInterface read FIntf write FIntf;
+ end;
+{$ENDIF}
+
+
+ TPSProceduralType = class(TPSType)
+ private
+ FProcDef: TPSParametersDecl;
+ public
+
+ property ProcDef: TPSParametersDecl read FProcDef;
+
+ constructor Create;
+
+ destructor Destroy; override;
+ end;
+
+ TPSArrayType = class(TPSType)
+ private
+ FArrayTypeNo: TPSType;
+ public
+
+ property ArrayTypeNo: TPSType read FArrayTypeNo write FArrayTypeNo;
+ end;
+
+ TPSStaticArrayType = class(TPSArrayType)
+ private
+ FStartOffset: Longint;
+ FLength: Cardinal;
+ public
+
+ property StartOffset: Longint read FStartOffset write FStartOffset;
+
+ property Length: Cardinal read FLength write FLength;
+ end;
+
+ TPSSetType = class(TPSType)
+ private
+ FSetType: TPSType;
+ function GetByteSize: Longint;
+ function GetBitSize: Longint;
+ public
+
+ property SetType: TPSType read FSetType write FSetType;
+
+ property ByteSize: Longint read GetByteSize;
+
+ property BitSize: Longint read GetBitSize;
+ end;
+
+ TPSTypeLink = class(TPSType)
+ private
+ FLinkTypeNo: TPSType;
+ public
+
+ property LinkTypeNo: TPSType read FLinkTypeNo write FLinkTypeNo;
+ end;
+
+ TPSEnumType = class(TPSType)
+ private
+ FHighValue: Cardinal;
+ public
+
+ property HighValue: Cardinal read FHighValue write FHighValue;
+ end;
+
+
+ TPSProcedure = class(TObject)
+ private
+ FAttributes: TPSAttributes;
+ public
+
+ property Attributes: TPSAttributes read FAttributes;
+
+
+ constructor Create;
+
+ destructor Destroy; override;
+ end;
+
+ TPSAttributeType = class;
+
+ TPSAttributeTypeField = class(TObject)
+ private
+ FOwner: TPSAttributeType;
+ FFieldOrgName: string;
+ FFieldName: string;
+ FFieldNameHash: Longint;
+ FFieldType: TPSType;
+ FHidden: Boolean;
+ procedure SetFieldOrgName(const Value: string);
+ public
+
+ constructor Create(AOwner: TPSAttributeType);
+
+ property Owner: TPSAttributeType read FOwner;
+
+ property FieldOrgName: string read FFieldOrgName write SetFieldOrgName;
+
+ property FieldName: string read FFieldName;
+
+ property FieldNameHash: Longint read FFieldNameHash;
+
+ property FieldType: TPSType read FFieldType write FFieldType;
+
+ property Hidden: Boolean read FHidden write FHidden;
+ end;
+
+ TPSApplyAttributeToType = function (Sender: TPSPascalCompiler; aType: TPSType; Attr: TPSAttribute): Boolean;
+
+ TPSApplyAttributeToProc = function (Sender: TPSPascalCompiler; aProc: TPSProcedure; Attr: TPSAttribute): Boolean;
+ { An attribute type }
+ TPSAttributeType = class(TPSType)
+ private
+ FFields: TPSList;
+ FName: string;
+ FOrgname: string;
+ FNameHash: Longint;
+ FAAProc: TPSApplyAttributeToProc;
+ FAAType: TPSApplyAttributeToType;
+ function GetField(I: Longint): TPSAttributeTypeField;
+ function GetFieldCount: Longint;
+ procedure SetName(const s: string);
+ public
+
+ property OnApplyAttributeToType: TPSApplyAttributeToType read FAAType write FAAType;
+
+ property OnApplyAttributeToProc: TPSApplyAttributeToProc read FAAProc write FAAProc;
+
+ property Fields[i: Longint]: TPSAttributeTypeField read GetField;
+
+ property FieldCount: Longint read GetFieldCount;
+
+ procedure DeleteField(I: Longint);
+
+ function AddField: TPSAttributeTypeField;
+
+ property Name: string read FName;
+
+ property OrgName: string read FOrgName write SetName;
+
+ property NameHash: Longint read FNameHash;
+
+ constructor Create;
+
+ destructor Destroy; override;
+ end;
+
+ TPSAttribute = class(TObject)
+ private
+ FAttribType: TPSAttributeType;
+ FValues: TPSList;
+ function GetValueCount: Longint;
+ function GetValue(I: Longint): PIfRVariant;
+ public
+
+ constructor Create(AttribType: TPSAttributeType);
+
+ procedure Assign(Item: TPSAttribute);
+
+ property AType: TPSAttributeType read FAttribType;
+
+ property Count: Longint read GetValueCount;
+
+ property Values[i: Longint]: PIfRVariant read GetValue; default;
+
+ procedure DeleteValue(i: Longint);
+
+ function AddValue(v: PIFRVariant): Longint;
+
+ destructor Destroy; override;
+ end;
+
+
+ TPSAttributes = class(TObject)
+ private
+ FItems: TPSList;
+ function GetCount: Longint;
+ function GetItem(I: Longint): TPSAttribute;
+ public
+
+ procedure Assign(attr: TPSAttributes; Move: Boolean);
+
+ property Count: Longint read GetCount;
+
+ property Items[i: Longint]: TPSAttribute read GetItem; default;
+
+ procedure Delete(i: Longint);
+
+ function Add(AttribType: TPSAttributeType): TPSAttribute;
+
+ function FindAttribute(const Name: string): TPSAttribute;
+
+ constructor Create;
+
+ destructor Destroy; override;
+ end;
+
+
+ TPSProcVar = class(TObject)
+ private
+ FNameHash: Longint;
+ FName: string;
+ FOrgName: string;
+ FType: TPSType;
+ FUsed: Boolean;
+ {$IFDEF PS_USESSUPPORT}
+ FDeclareUnit: String;
+ {$ENDIF}
+ FDeclarePos, FDeclareRow, FDeclareCol: Cardinal;
+ procedure SetName(const Value: string);
+ public
+
+ property OrgName: string read FOrgName write FOrgname;
+
+ property NameHash: Longint read FNameHash;
+
+ property Name: string read FName write SetName;
+
+ property AType: TPSType read FType write FType;
+
+ property Used: Boolean read FUsed;
+
+ {$IFDEF PS_USESSUPPORT}
+ property DeclareUnit: String read FDeclareUnit write FDeclareUnit;
+ {$ENDIF}
+
+ property DeclarePos: Cardinal read FDeclarePos write FDeclarePos;
+
+ property DeclareRow: Cardinal read FDeclareRow write FDeclareRow;
+
+ property DeclareCol: Cardinal read FDeclareCol write FDeclareCol;
+
+ procedure Use;
+ end;
+
+ PIFPSProcVar = TPSProcVar;
+
+ TPSExternalProcedure = class(TPSProcedure)
+ private
+ FRegProc: TPSRegProc;
+ public
+
+ property RegProc: TPSRegProc read FRegProc write FRegProc;
+ end;
+
+
+ TPSInternalProcedure = class(TPSProcedure)
+ private
+ FForwarded: Boolean;
+ FData: string;
+ FNameHash: Longint;
+ FName: string;
+ FDecl: TPSParametersDecl;
+ FProcVars: TPSList;
+ FUsed: Boolean;
+ FOutputDeclPosition: Cardinal;
+ FResultUsed: Boolean;
+ FLabels: TIfStringList;
+ FGotos: TIfStringList;
+ FDeclareRow: Cardinal;
+ {$IFDEF PS_USESSUPPORT}
+ FDeclareUnit: String;
+ {$ENDIF}
+ FDeclarePos: Cardinal;
+ FDeclareCol: Cardinal;
+ FOriginalName: string;
+ procedure SetName(const Value: string);
+ public
+
+ constructor Create;
+
+ destructor Destroy; override;
+ {Attributes}
+
+
+ property Forwarded: Boolean read FForwarded write FForwarded;
+
+ property Data: string read FData write FData;
+
+ property Decl: TPSParametersDecl read FDecl;
+
+ property OriginalName: string read FOriginalName write FOriginalName;
+
+ property Name: string read FName write SetName;
+
+ property NameHash: Longint read FNameHash;
+
+ property ProcVars: TPSList read FProcVars;
+
+ property Used: Boolean read FUsed;
+
+ {$IFDEF PS_USESSUPPORT}
+ property DeclareUnit: String read FDeclareUnit write FDeclareUnit;
+ {$ENDIF}
+
+ property DeclarePos: Cardinal read FDeclarePos write FDeclarePos;
+
+ property DeclareRow: Cardinal read FDeclareRow write FDeclareRow;
+
+ property DeclareCol: Cardinal read FDeclareCol write FDeclareCol;
+
+ property OutputDeclPosition: Cardinal read FOutputDeclPosition write FOutputDeclPosition;
+
+ property ResultUsed: Boolean read FResultUsed;
+
+
+ property Labels: TIfStringList read FLabels;
+
+ property Gotos: TIfStringList read FGotos;
+
+ procedure Use;
+
+ procedure ResultUse;
+ end;
+
+ TPSVar = class(TObject)
+ private
+ FNameHash: Longint;
+ FOrgName: string;
+ FName: string;
+ FType: TPSType;
+ FUsed: Boolean;
+ FExportName: string;
+ FDeclareRow: Cardinal;
+ {$IFDEF PS_USESSUPPORT}
+ FDeclareUnit: String;
+ {$ENDIF}
+ FDeclarePos: Cardinal;
+ FDeclareCol: Cardinal;
+ FSaveAsPointer: Boolean;
+ procedure SetName(const Value: string);
+ public
+
+ property SaveAsPointer: Boolean read FSaveAsPointer write FSaveAsPointer;
+
+ property ExportName: string read FExportName write FExportName;
+
+ property Used: Boolean read FUsed;
+
+ property aType: TPSType read FType write FType;
+
+ property OrgName: string read FOrgName write FOrgName;
+
+ property Name: string read FName write SetName;
+
+ property NameHash: Longint read FNameHash;
+
+ {$IFDEF PS_USESSUPPORT}
+ property DeclareUnit: String read FDeclareUnit write FDeclareUnit;
+ {$ENDIF}
+
+ property DeclarePos: Cardinal read FDeclarePos write FDeclarePos;
+
+ property DeclareRow: Cardinal read FDeclareRow write FDeclareRow;
+
+ property DeclareCol: Cardinal read FDeclareCol write FDeclareCol;
+
+ procedure Use;
+ end;
+
+ PIFPSVar = TPSVar;
+
+ TPSConstant = class(TObject)
+
+ FOrgName: string;
+
+ FNameHash: Longint;
+
+ FName: string;
+
+ FDeclareRow: Cardinal;
+ {$IFDEF PS_USESSUPPORT}
+ FDeclareUnit: String;
+ {$ENDIF}
+ FDeclarePos: Cardinal;
+ FDeclareCol: Cardinal;
+
+ FValue: PIfRVariant;
+ private
+ procedure SetName(const Value: string);
+ public
+
+ property OrgName: string read FOrgName write FOrgName;
+
+ property Name: string read FName write SetName;
+
+ property NameHash: Longint read FNameHash;
+
+ property Value: PIfRVariant read FValue write FValue;
+
+ {$IFDEF PS_USESSUPPORT}
+ property DeclareUnit: String read FDeclareUnit write FDeclareUnit;
+ {$ENDIF}
+
+ property DeclarePos: Cardinal read FDeclarePos write FDeclarePos;
+
+ property DeclareRow: Cardinal read FDeclareRow write FDeclareRow;
+
+ property DeclareCol: Cardinal read FDeclareCol write FDeclareCol;
+
+
+ procedure SetSet(const val);
+
+
+ procedure SetInt(const Val: Longint);
+
+ procedure SetUInt(const Val: Cardinal);
+ {$IFNDEF PS_NOINT64}
+
+ procedure SetInt64(const Val: Int64);
+ {$ENDIF}
+
+ procedure SetString(const Val: string);
+
+ procedure SetChar(c: Char);
+ {$IFNDEF PS_NOWIDESTRING}
+
+ procedure SetWideChar(const val: WideChar);
+
+ procedure SetWideString(const val: WideString);
+ {$ENDIF}
+
+ procedure SetExtended(const Val: Extended);
+
+
+ destructor Destroy; override;
+ end;
+
+ PIFPSConstant = TPSConstant;
+
+ TPSPascalCompilerErrorType = (
+ ecUnknownIdentifier,
+ ecIdentifierExpected,
+ ecCommentError,
+ ecStringError,
+ ecCharError,
+ ecSyntaxError,
+ ecUnexpectedEndOfFile,
+ ecSemicolonExpected,
+ ecBeginExpected,
+ ecPeriodExpected,
+ ecDuplicateIdentifier,
+ ecColonExpected,
+ ecUnknownType,
+ ecCloseRoundExpected,
+ ecTypeMismatch,
+ ecInternalError,
+ ecAssignmentExpected,
+ ecThenExpected,
+ ecDoExpected,
+ ecNoResult,
+ ecOpenRoundExpected,
+ ecCommaExpected,
+ ecToExpected,
+ ecIsExpected,
+ ecOfExpected,
+ ecCloseBlockExpected,
+ ecVariableExpected,
+ ecStringExpected,
+ ecEndExpected,
+ ecUnSetLabel,
+ ecNotInLoop,
+ ecInvalidJump,
+ ecOpenBlockExpected,
+ ecWriteOnlyProperty,
+ ecReadOnlyProperty,
+ ecClassTypeExpected,
+ ecCustomError,
+ ecDivideByZero,
+ ecMathError,
+ ecUnsatisfiedForward,
+ ecForwardParameterMismatch,
+ ecInvalidnumberOfParameters
+ {$IFDEF PS_USESSUPPORT}
+ , ecNotAllowed,
+ ecUnitNotFoundOrContainsErrors
+ {$ENDIF}
+ );
+
+ TPSPascalCompilerHintType = (
+ ehVariableNotUsed,
+ ehFunctionNotUsed,
+ ehCustomHint
+ );
+
+ TPSPascalCompilerWarningType = (
+ ewCalculationAlwaysEvaluatesTo,
+ ewIsNotNeeded,
+ ewAbstractClass,
+ ewCustomWarning
+ );
+
+ TPSPascalCompilerMessage = class(TObject)
+ protected
+
+ FRow: Cardinal;
+
+ FCol: Cardinal;
+
+ FModuleName: string;
+
+ FParam: string;
+
+ FPosition: Cardinal;
+
+ procedure SetParserPos(Parser: TPSPascalParser);
+ public
+
+ property ModuleName: string read FModuleName write FModuleName;
+
+ property Param: string read FParam write FParam;
+
+ property Pos: Cardinal read FPosition write FPosition;
+
+ property Row: Cardinal read FRow write FRow;
+
+ property Col: Cardinal read FCol write FCol;
+
+ function ErrorType: string; virtual; abstract;
+
+ procedure SetCustomPos(Pos, Row, Col: Cardinal);
+
+ function MessageToString: string; virtual;
+
+ function ShortMessageToString: string; virtual; abstract;
+ end;
+
+ TPSPascalCompilerError = class(TPSPascalCompilerMessage)
+ protected
+
+ FError: TPSPascalCompilerErrorType;
+ public
+
+ property Error: TPSPascalCompilerErrorType read FError;
+
+ function ErrorType: string; override;
+ function ShortMessageToString: string; override;
+ end;
+
+ TPSPascalCompilerHint = class(TPSPascalCompilerMessage)
+ protected
+
+ FHint: TPSPascalCompilerHintType;
+ public
+
+ property Hint: TPSPascalCompilerHintType read FHint;
+
+ function ErrorType: string; override;
+ function ShortMessageToString: string; override;
+ end;
+
+ TPSPascalCompilerWarning = class(TPSPascalCompilerMessage)
+ protected
+
+ FWarning: TPSPascalCompilerWarningType;
+ public
+
+ property Warning: TPSPascalCompilerWarningType read FWarning;
+
+ function ErrorType: string; override;
+ function ShortMessageToString: string; override;
+ end;
+ TPSDuplicCheck = set of (dcTypes, dcProcs, dcVars, dcConsts);
+
+ TPSBlockInfo = class(TObject)
+ private
+ FOwner: TPSBlockInfo;
+ FWithList: TPSList;
+ FProcNo: Cardinal;
+ FProc: TPSInternalProcedure;
+ FSubType: TPSSubOptType;
+ public
+
+ property WithList: TPSList read FWithList;
+
+ property ProcNo: Cardinal read FProcNo write FProcNo;
+
+ property Proc: TPSInternalProcedure read FProc write FProc;
+
+ property SubType: TPSSubOptType read FSubType write FSubType;
+
+ procedure Clear;
+
+ constructor Create(Owner: TPSBlockInfo);
+
+ destructor Destroy; override;
+ end;
+
+
+
+ TPSBinOperatorType = (otAdd, otSub, otMul, otDiv, otMod, otShl, otShr, otAnd, otOr, otXor, otAs,
+ otGreaterEqual, otLessEqual, otGreater, otLess, otEqual,
+ otNotEqual, otIs, otIn);
+
+ TPSUnOperatorType = (otNot, otMinus, otCast);
+
+ TPSOnUseVariable = procedure (Sender: TPSPascalCompiler; VarType: TPSVariableType; VarNo: Longint; ProcNo, Position: Cardinal; const PropData: string);
+
+ TPSOnUses = function(Sender: TPSPascalCompiler; const Name: string): Boolean;
+
+ TPSOnExportCheck = function(Sender: TPSPascalCompiler; Proc: TPSInternalProcedure; const ProcDecl: string): Boolean;
+
+ {$IFNDEF PS_USESSUPPORT}
+ TPSOnWriteLineEvent = function (Sender: TPSPascalCompiler; Position: Cardinal): Boolean;
+ {$ELSE}
+ TPSOnWriteLineEvent = function (Sender: TPSPascalCompiler; FileName: String; Position: Cardinal): Boolean;
+ {$ENDIF}
+
+ TPSOnExternalProc = function (Sender: TPSPascalCompiler; Decl: TPSParametersDecl; const Name, FExternal: string): TPSRegProc;
+
+ TPSOnTranslateLineInfoProc = procedure (Sender: TPSPascalCompiler; var Pos, Row, Col: Cardinal; var Name: string);
+ TPSOnNotify = function (Sender: TPSPascalCompiler): Boolean;
+
+
+ TPSPascalCompiler = class
+ protected
+ FUnitName: String;
+ FID: Pointer;
+ FOnExportCheck: TPSOnExportCheck;
+ FDefaultBoolType: TPSType;
+ FRegProcs: TPSList;
+ FConstants: TPSList;
+ FProcs: TPSList;
+ FTypes: TPSList;
+ FAttributeTypes: TPSList;
+ FVars: TPSList;
+ FOutput: string;
+ FParser: TPSPascalParser;
+ FParserHadError: Boolean;
+ FMessages: TPSList;
+ FOnUses: TPSOnUses;
+ FUtf8Decode: Boolean;
+ FIsUnit: Boolean;
+ FAllowNoBegin: Boolean;
+ FAllowNoEnd: Boolean;
+ FAllowUnit: Boolean;
+ FBooleanShortCircuit: Boolean;
+ FDebugOutput: string;
+ FOnExternalProc: TPSOnExternalProc;
+ FOnUseVariable: TPSOnUseVariable;
+ FOnBeforeOutput: TPSOnNotify;
+ FOnBeforeCleanup: TPSOnNotify;
+ FOnWriteLine: TPSOnWriteLineEvent;
+ FContinueOffsets, FBreakOffsets: TPSList;
+ FOnTranslateLineInfo: TPSOnTranslateLineInfoProc;
+ FAutoFreeList: TPSList;
+ FClasses: TPSList;
+
+
+ FWithCount: Integer;
+ FTryCount: Integer;
+ FExceptFinallyCount: Integer;
+
+
+ {$IFDEF PS_USESSUPPORT}
+ FUnitInits : TPSList; //nvds
+ FUnitFinits: TPSList; //nvds
+ FUses : TIFStringList;
+ fModule : String;
+ {$ENDIF}
+ fInCompile : Integer;
+{$IFNDEF PS_NOINTERFACES}
+ FInterfaces: TPSList;
+{$ENDIF}
+
+ FCurrUsedTypeNo: Cardinal;
+ FGlobalBlock: TPSBlockInfo;
+
+ function IsBoolean(aType: TPSType): Boolean;
+ {$IFNDEF PS_NOWIDESTRING}
+
+ function GetWideString(Src: PIfRVariant; var s: Boolean): WideString;
+ {$ENDIF}
+ function PreCalc(FUseUsedTypes: Boolean; Var1Mod: Byte; var1: PIFRVariant; Var2Mod: Byte;
+ Var2: PIfRVariant; Cmd: TPSBinOperatorType; Pos, Row, Col: Cardinal): Boolean;
+
+ function FindBaseType(BaseType: TPSBaseType): TPSType;
+
+ function IsIntBoolType(aType: TPSType): Boolean;
+ function GetTypeCopyLink(p: TPSType): TPSType;
+
+ function at2ut(p: TPSType): TPSType;
+ procedure UseProc(procdecl: TPSParametersDecl);
+
+
+ function GetMsgCount: Longint;
+
+ function GetMsg(l: Longint): TPSPascalCompilerMessage;
+
+
+ function MakeExportDecl(decl: TPSParametersDecl): string;
+
+
+ procedure DefineStandardTypes;
+
+ procedure DefineStandardProcedures;
+
+ function ReadReal(const s: string): PIfRVariant;
+ function ReadString: PIfRVariant;
+ function ReadInteger(const s: string): PIfRVariant;
+ function ReadAttributes(Dest: TPSAttributes): Boolean;
+ function ReadConstant(FParser: TPSPascalParser; StopOn: TPSPasToken): PIfRVariant;
+
+ function ApplyAttribsToFunction(func: TPSProcedure): boolean;
+ function ProcessFunction(AlwaysForward: Boolean; Att: TPSAttributes): Boolean;
+ function ValidateParameters(BlockInfo: TPSBlockInfo; Params: TPSParameters; ParamTypes: TPSParametersDecl): boolean;
+
+ function IsVarInCompatible(ft1, ft2: TPSType): Boolean;
+ function GetTypeNo(BlockInfo: TPSBlockInfo; p: TPSValue): TPSType;
+ function DoVarBlock(proc: TPSInternalProcedure): Boolean;
+ function DoTypeBlock(FParser: TPSPascalParser): Boolean;
+ function ReadType(const Name: string; FParser: TPSPascalParser): TPSType;
+ function ProcessLabel(Proc: TPSInternalProcedure): Boolean;
+ function ProcessSub(BlockInfo: TPSBlockInfo): Boolean;
+ function ProcessLabelForwards(Proc: TPSInternalProcedure): Boolean;
+
+ procedure WriteDebugData(const s: string);
+
+ procedure Debug_SavePosition(ProcNo: Cardinal; Proc: TPSInternalProcedure);
+
+ procedure Debug_WriteParams(ProcNo: Cardinal; Proc: TPSInternalProcedure);
+
+ procedure Debug_WriteLine(BlockInfo: TPSBlockInfo);
+
+
+ function IsCompatibleType(p1, p2: TPSType; Cast: Boolean): Boolean;
+
+ function IsDuplicate(const s: string; const check: TPSDuplicCheck): Boolean;
+
+ function NewProc(const OriginalName, Name: string): TPSInternalProcedure;
+
+ function AddUsedFunction(var Proc: TPSInternalProcedure): Cardinal;
+
+ function AddUsedFunction2(var Proc: TPSExternalProcedure): Cardinal;
+
+
+ function CheckCompatProc(P: TPSType; ProcNo: Cardinal): Boolean;
+
+
+ procedure ParserError(Parser: TObject; Kind: TPSParserErrorKind);
+
+ function ReadTypeAddProcedure(const Name: string; FParser: TPSPascalParser): TPSType;
+
+ function VarIsDuplicate(Proc: TPSInternalProcedure; const VarNames, s: string): Boolean;
+
+ function IsProcDuplicLabel(Proc: TPSInternalProcedure; const s: string): Boolean;
+
+ procedure CheckForUnusedVars(Func: TPSInternalProcedure);
+ function ProcIsDuplic(Decl: TPSParametersDecl; const FunctionName, FunctionParamNames: string; const s: string; Func: TPSInternalProcedure): Boolean;
+ public
+ function GetConstant(const Name: string): TPSConstant;
+
+ function UseExternalProc(const Name: string): TPSParametersDecl;
+
+ function FindProc(const Name: string): Cardinal;
+
+ function GetTypeCount: Longint;
+
+ function GetType(I: Longint): TPSType;
+
+ function GetVarCount: Longint;
+
+ function GetVar(I: Longint): TPSVar;
+
+ function GetProcCount: Longint;
+
+ function GetProc(I: Longint): TPSProcedure;
+
+ function GetConstCount: Longint;
+
+ function GetConst(I: Longint): TPSConstant;
+
+ function GetRegProcCount: Longint;
+
+ function GetRegProc(I: Longint): TPSRegProc;
+
+ function AddAttributeType: TPSAttributeType;
+ function FindAttributeType(const Name: string): TPSAttributeType;
+
+ procedure AddToFreeList(Obj: TObject);
+
+ property ID: Pointer read FID write FID;
+
+ function MakeError(const Module: string; E: TPSPascalCompilerErrorType; const
+ Param: string): TPSPascalCompilerMessage;
+
+ function MakeWarning(const Module: string; E: TPSPascalCompilerWarningType;
+ const Param: string): TPSPascalCompilerMessage;
+
+ function MakeHint(const Module: string; E: TPSPascalCompilerHintType;
+ const Param: string): TPSPascalCompilerMessage;
+
+{$IFNDEF PS_NOINTERFACES}
+
+ function AddInterface(InheritedFrom: TPSInterface; Guid: TGuid; const Name: string): TPSInterface;
+
+ function FindInterface(const Name: string): TPSInterface;
+
+{$ENDIF}
+ function AddClass(InheritsFrom: TPSCompileTimeClass; aClass: TClass): TPSCompileTimeClass;
+
+ function AddClassN(InheritsFrom: TPSCompileTimeClass; const aClass: string): TPSCompileTimeClass;
+
+
+ function FindClass(const aClass: string): TPSCompileTimeClass;
+
+ function AddFunction(const Header: string): TPSRegProc;
+
+ function AddDelphiFunction(const Decl: string): TPSRegProc;
+
+ function AddType(const Name: string; const BaseType: TPSBaseType): TPSType;
+
+ function AddTypeS(const Name, Decl: string): TPSType;
+
+ function AddTypeCopy(const Name: string; TypeNo: TPSType): TPSType;
+
+ function AddTypeCopyN(const Name, FType: string): TPSType;
+
+ function AddConstant(const Name: string; FType: TPSType): TPSConstant;
+
+ function AddConstantN(const Name, FType: string): TPSConstant;
+
+ function AddVariable(const Name: string; FType: TPSType): TPSVar;
+
+ function AddVariableN(const Name, FType: string): TPSVar;
+
+ function AddUsedVariable(const Name: string; FType: TPSType): TPSVar;
+
+ function AddUsedVariableN(const Name, FType: string): TPSVar;
+
+ function AddUsedPtrVariable(const Name: string; FType: TPSType): TPSVar;
+
+ function AddUsedPtrVariableN(const Name, FType: string): TPSVar;
+
+ function FindType(const Name: string): TPSType;
+
+ function MakeDecl(decl: TPSParametersDecl): string;
+
+ function Compile(const s: string): Boolean;
+
+ function GetOutput(var s: string): Boolean;
+
+ function GetDebugOutput(var s: string): Boolean;
+
+ procedure Clear;
+
+ constructor Create;
+
+ destructor Destroy; override;
+
+ property MsgCount: Longint read GetMsgCount;
+
+ property Msg[l: Longint]: TPSPascalCompilerMessage read GetMsg;
+
+ property OnTranslateLineInfo: TPSOnTranslateLineInfoProc read FOnTranslateLineInfo write FOnTranslateLineInfo;
+
+ property OnUses: TPSOnUses read FOnUses write FOnUses;
+
+ property OnExportCheck: TPSOnExportCheck read FOnExportCheck write FOnExportCheck;
+
+ property OnWriteLine: TPSOnWriteLineEvent read FOnWriteLine write FOnWriteLine;
+
+ property OnExternalProc: TPSOnExternalProc read FOnExternalProc write FOnExternalProc;
+
+ property OnUseVariable: TPSOnUseVariable read FOnUseVariable write FOnUseVariable;
+
+ property OnBeforeOutput: TPSOnNotify read FOnBeforeOutput write FOnBeforeOutput;
+
+ property OnBeforeCleanup: TPSOnNotify read FOnBeforeCleanup write FOnBeforeCleanup;
+
+ property IsUnit: Boolean read FIsUnit;
+
+ property AllowNoBegin: Boolean read FAllowNoBegin write FAllowNoBegin;
+
+ property AllowUnit: Boolean read FAllowUnit write FAllowUnit;
+
+ property AllowNoEnd: Boolean read FAllowNoEnd write FAllowNoEnd;
+
+
+ property BooleanShortCircuit: Boolean read FBooleanShortCircuit write FBooleanShortCircuit;
+
+ property UTF8Decode: Boolean read FUtf8Decode write FUtf8Decode;
+
+ property UnitName: String read FUnitName;
+ end;
+ TIFPSPascalCompiler = TPSPascalCompiler;
+
+ TPSValue = class(TObject)
+ private
+ FPos, FRow, FCol: Cardinal;
+ public
+
+ property Pos: Cardinal read FPos write FPos;
+
+ property Row: Cardinal read FRow write FRow;
+
+ property Col: Cardinal read FCol write FCol;
+
+ procedure SetParserPos(P: TPSPascalParser);
+
+ end;
+
+ TPSParameter = class(TObject)
+ private
+ FValue: TPSValue;
+ FTempVar: TPSValue;
+ FParamMode: TPSParameterMode;
+ FExpectedType: TPSType;
+ public
+
+ property Val: TPSValue read FValue write FValue;
+
+ property ExpectedType: TPSType read FExpectedType write FExpectedType;
+
+ property TempVar: TPSValue read FTempVar write FTempVar;
+
+ property ParamMode: TPSParameterMode read FParamMode write FParamMode;
+
+ destructor Destroy; override;
+ end;
+
+ TPSParameters = class(TObject)
+ private
+ FItems: TPSList;
+ function GetCount: Cardinal;
+ function GetItem(I: Longint): TPSParameter;
+ public
+
+ constructor Create;
+
+ destructor Destroy; override;
+
+ property Count: Cardinal read GetCount;
+
+ property Item[I: Longint]: TPSParameter read GetItem; default;
+
+ procedure Delete(I: Cardinal);
+
+ function Add: TPSParameter;
+ end;
+
+ TPSSubItem = class(TObject)
+ private
+ FType: TPSType;
+ public
+
+ property aType: TPSType read FType write FType;
+ end;
+
+ TPSSubNumber = class(TPSSubItem)
+ private
+ FSubNo: Cardinal;
+ public
+
+ property SubNo: Cardinal read FSubNo write FSubNo;
+ end;
+
+ TPSSubValue = class(TPSSubItem)
+ private
+ FSubNo: TPSValue;
+ public
+
+ property SubNo: TPSValue read FSubNo write FSubNo;
+
+ destructor Destroy; override;
+ end;
+
+ TPSValueVar = class(TPSValue)
+ private
+ FRecItems: TPSList;
+ function GetRecCount: Cardinal;
+ function GetRecItem(I: Cardinal): TPSSubItem;
+ public
+ constructor Create;
+ destructor Destroy; override;
+
+ function RecAdd(Val: TPSSubItem): Cardinal;
+
+ procedure RecDelete(I: Cardinal);
+
+ property RecItem[I: Cardinal]: TPSSubItem read GetRecItem;
+
+ property RecCount: Cardinal read GetRecCount;
+ end;
+
+ TPSValueGlobalVar = class(TPSValueVar)
+ private
+ FAddress: Cardinal;
+ public
+
+ property GlobalVarNo: Cardinal read FAddress write FAddress;
+ end;
+
+
+ TPSValueLocalVar = class(TPSValueVar)
+ private
+ FLocalVarNo: Longint;
+ public
+
+ property LocalVarNo: Longint read FLocalVarNo write FLocalVarNo;
+ end;
+
+ TPSValueParamVar = class(TPSValueVar)
+ private
+ FParamNo: Longint;
+ public
+
+ property ParamNo: Longint read FParamNo write FParamNo;
+ end;
+
+ TPSValueAllocatedStackVar = class(TPSValueLocalVar)
+ private
+ FProc: TPSInternalProcedure;
+ public
+
+ property Proc: TPSInternalProcedure read FProc write FProc;
+ destructor Destroy; override;
+ end;
+
+ TPSValueData = class(TPSValue)
+ private
+ FData: PIfRVariant;
+ public
+
+ property Data: PIfRVariant read FData write FData;
+ destructor Destroy; override;
+ end;
+
+ TPSValueReplace = class(TPSValue)
+ private
+ FPreWriteAllocated: Boolean;
+ FFreeOldValue: Boolean;
+ FFreeNewValue: Boolean;
+ FOldValue: TPSValue;
+ FNewValue: TPSValue;
+ FReplaceTimes: Longint;
+ public
+
+ property OldValue: TPSValue read FOldValue write FOldValue;
+
+ property NewValue: TPSValue read FNewValue write FNewValue;
+ {Should it free the old value when destroyed?}
+ property FreeOldValue: Boolean read FFreeOldValue write FFreeOldValue;
+ property FreeNewValue: Boolean read FFreeNewValue write FFreeNewValue;
+ property PreWriteAllocated: Boolean read FPreWriteAllocated write FPreWriteAllocated;
+
+ property ReplaceTimes: Longint read FReplaceTimes write FReplaceTimes;
+
+ constructor Create;
+ destructor Destroy; override;
+ end;
+
+
+ TPSUnValueOp = class(TPSValue)
+ private
+ FVal1: TPSValue;
+ FOperator: TPSUnOperatorType;
+ FType: TPSType;
+ public
+
+ property Val1: TPSValue read FVal1 write FVal1;
+ {The operator}
+ property Operator: TPSUnOperatorType read FOperator write FOperator;
+
+ property aType: TPSType read FType write FType;
+ destructor Destroy; override;
+ end;
+
+ TPSBinValueOp = class(TPSValue)
+ private
+ FVal1,
+ FVal2: TPSValue;
+ FOperator: TPSBinOperatorType;
+ FType: TPSType;
+ public
+
+ property Val1: TPSValue read FVal1 write FVal1;
+
+ property Val2: TPSValue read FVal2 write FVal2;
+ {The operator for this value}
+ property Operator: TPSBinOperatorType read FOperator write FOperator;
+
+ property aType: TPSType read FType write FType;
+
+ destructor Destroy; override;
+ end;
+
+ TPSValueNil = class(TPSValue)
+ end;
+
+ TPSValueProcPtr = class(TPSValue)
+ private
+ FProcNo: Cardinal;
+ public
+
+ property ProcPtr: Cardinal read FProcNo write FProcNo;
+ end;
+
+ TPSValueProc = class(TPSValue)
+ private
+ FSelfPtr: TPSValue;
+ FParameters: TPSParameters;
+ FResultType: TPSType;
+ public
+ property ResultType: TPSType read FResultType write FResultType;
+
+ property SelfPtr: TPSValue read FSelfPtr write FSelfPtr;
+
+ property Parameters: TPSParameters read FParameters write FParameters;
+ destructor Destroy; override;
+ end;
+
+ TPSValueProcNo = class(TPSValueProc)
+ private
+ FProcNo: Cardinal;
+ public
+
+ property ProcNo: Cardinal read FProcNo write FProcNo;
+ end;
+
+ TPSValueProcVal = class(TPSValueProc)
+ private
+ FProcNo: TPSValue;
+ public
+
+ property ProcNo: TPSValue read FProcNo write FProcNo;
+
+ destructor Destroy; override;
+ end;
+
+ TPSValueArray = class(TPSValue)
+ private
+ FItems: TPSList;
+ function GetCount: Cardinal;
+ function GetItem(I: Cardinal): TPSValue;
+ public
+ function Add(Item: TPSValue): Cardinal;
+ procedure Delete(I: Cardinal);
+ property Item[I: Cardinal]: TPSValue read GetItem;
+ property Count: Cardinal read GetCount;
+
+ constructor Create;
+ destructor Destroy; override;
+ end;
+
+ TPSDelphiClassItem = class;
+
+ TPSPropType = (iptRW, iptR, iptW);
+
+ TPSCompileTimeClass = class
+ private
+ FInheritsFrom: TPSCompileTimeClass;
+ FClass: TClass;
+ FClassName: string;
+ FClassNameHash: Longint;
+ FClassItems: TPSList;
+ FDefaultProperty: Cardinal;
+ FIsAbstract: Boolean;
+ FCastProc,
+ FNilProc: Cardinal;
+ FType: TPSType;
+
+ FOwner: TPSPascalCompiler;
+ function GetCount: Longint;
+ function GetItem(i: Longint): TPSDelphiClassItem;
+ public
+
+ property aType: TPSType read FType;
+
+ property Items[i: Longint]: TPSDelphiClassItem read GetItem;
+
+ property Count: Longint read GetCount;
+
+ property IsAbstract: Boolean read FIsAbstract write FIsAbstract;
+
+
+ property ClassInheritsFrom: TPSCompileTimeClass read FInheritsFrom write FInheritsFrom;
+
+ function RegisterMethod(const Decl: string): Boolean;
+
+ procedure RegisterProperty(const PropertyName, PropertyType: string; PropAC: TPSPropType);
+
+ procedure RegisterPublishedProperties;
+
+ function RegisterPublishedProperty(const Name: string): Boolean;
+
+ procedure SetDefaultPropery(const Name: string);
+
+ constructor Create(ClassName: string; aOwner: TPSPascalCompiler; aType: TPSType);
+
+ class function CreateC(FClass: TClass; aOwner: TPSPascalCompiler; aType: TPSType): TPSCompileTimeClass;
+
+
+ destructor Destroy; override;
+
+
+ function IsCompatibleWith(aType: TPSType): Boolean;
+
+ function SetNil(var ProcNo: Cardinal): Boolean;
+
+ function CastToType(IntoType: TPSType; var ProcNo: Cardinal): Boolean;
+
+
+ function Property_Find(const Name: string; var Index: Cardinal): Boolean;
+
+ function Property_Get(Index: Cardinal; var ProcNo: Cardinal): Boolean;
+
+ function Property_Set(Index: Cardinal; var ProcNo: Cardinal): Boolean;
+
+ function Property_GetHeader(Index: Cardinal; Dest: TPSParametersDecl): Boolean;
+
+
+ function Func_Find(const Name: string; var Index: Cardinal): Boolean;
+
+ function Func_Call(Index: Cardinal; var ProcNo: Cardinal): Boolean;
+
+
+ function ClassFunc_Find(const Name: string; var Index: Cardinal): Boolean;
+
+ function ClassFunc_Call(Index: Cardinal; var ProcNo: Cardinal): Boolean;
+ end;
+
+ TPSDelphiClassItem = class(TObject)
+ private
+ FOwner: TPSCompileTimeClass;
+ FOrgName: string;
+ FName: string;
+ FNameHash: Longint;
+ FDecl: TPSParametersDecl;
+ procedure SetName(const s: string);
+ public
+
+ constructor Create(Owner: TPSCompileTimeClass);
+
+ destructor Destroy; override;
+
+ property Decl: TPSParametersDecl read FDecl;
+
+ property Name: string read FName;
+
+ property OrgName: string read FOrgName write SetName;
+
+ property NameHash: Longint read FNameHash;
+
+ property Owner: TPSCompileTimeClass read FOwner;
+ end;
+
+ TPSDelphiClassItemMethod = class(TPSDelphiClassItem)
+ private
+ FMethodNo: Cardinal;
+ public
+
+ property MethodNo: Cardinal read FMethodNo write FMethodNo;
+ end;
+
+ TPSDelphiClassItemProperty = class(TPSDelphiClassItem)
+ private
+ FReadProcNo: Cardinal;
+ FWriteProcNo: Cardinal;
+ FAccessType: TPSPropType;
+ public
+
+ property AccessType: TPSPropType read FAccessType write FAccessType;
+
+ property ReadProcNo: Cardinal read FReadProcNo write FReadProcNo;
+
+ property WriteProcNo: Cardinal read FWriteProcNo write FWriteProcNo;
+ end;
+
+
+ TPSDelphiClassItemConstructor = class(TPSDelphiClassItemMethod)
+ end;
+
+{$IFNDEF PS_NOINTERFACES}
+
+ TPSInterface = class(TObject)
+ private
+ FOwner: TPSPascalCompiler;
+ FType: TPSType;
+ FInheritedFrom: TPSInterface;
+ FGuid: TGuid;
+ FCastProc,
+ FNilProc: Cardinal;
+ FItems: TPSList;
+ FName: string;
+ FNameHash: Longint;
+ procedure SetInheritedFrom(p: TPSInterface);
+ public
+
+ constructor Create(Owner: TPSPascalCompiler; InheritedFrom: TPSInterface; Guid: TGuid; const Name: string; aType: TPSType);
+
+ destructor Destroy; override;
+
+ property aType: TPSType read FType;
+
+ property InheritedFrom: TPSInterface read FInheritedFrom write SetInheritedFrom;
+
+ property Guid: TGuid read FGuid write FGuid;
+
+ property Name: string read FName write FName;
+
+ property NameHash: Longint read FNameHash;
+
+
+ function RegisterMethod(const Declaration: string; const cc: TPSCallingConvention): Boolean;
+
+ procedure RegisterDummyMethod;
+
+ function IsCompatibleWith(aType: TPSType): Boolean;
+
+ function SetNil(var ProcNo: Cardinal): Boolean;
+
+ function CastToType(IntoType: TPSType; var ProcNo: Cardinal): Boolean;
+
+ function Func_Find(const Name: string; var Index: Cardinal): Boolean;
+
+ function Func_Call(Index: Cardinal; var ProcNo: Cardinal): Boolean;
+ end;
+
+
+ TPSInterfaceMethod = class(TObject)
+ private
+ FName: string;
+ FDecl: TPSParametersDecl;
+ FNameHash: Longint;
+ FCC: TPSCallingConvention;
+ FScriptProcNo: Cardinal;
+ FOrgName: string;
+ FOwner: TPSInterface;
+ FOffsetCache: Cardinal;
+ function GetAbsoluteProcOffset: Cardinal;
+ public
+
+ property AbsoluteProcOffset: Cardinal read GetAbsoluteProcOffset;
+
+ property ScriptProcNo: Cardinal read FScriptProcNo;
+
+ property OrgName: string read FOrgName;
+
+ property Name: string read FName;
+
+ property NameHash: Longint read FNameHash;
+
+ property Decl: TPSParametersDecl read FDecl;
+
+ property CC: TPSCallingConvention read FCC;
+
+
+ constructor Create(Owner: TPSInterface);
+
+ destructor Destroy; override;
+ end;
+{$ENDIF}
+
+
+ TPSExternalClass = class(TObject)
+ protected
+
+ SE: TPSPascalCompiler;
+
+ FTypeNo: TPSType;
+ public
+
+ function SelfType: TPSType; virtual;
+
+ constructor Create(Se: TPSPascalCompiler; TypeNo: TPSType);
+
+ function ClassFunc_Find(const Name: string; var Index: Cardinal): Boolean; virtual;
+
+ function ClassFunc_Call(Index: Cardinal; var ProcNo: Cardinal): Boolean; virtual;
+
+ function Func_Find(const Name: string; var Index: Cardinal): Boolean; virtual;
+
+ function Func_Call(Index: Cardinal; var ProcNo: Cardinal): Boolean; virtual;
+
+ function IsCompatibleWith(Cl: TPSExternalClass): Boolean; virtual;
+
+ function SetNil(var ProcNo: Cardinal): Boolean; virtual;
+
+ function CastToType(IntoType: TPSType; var ProcNo: Cardinal): Boolean; virtual;
+
+ function CompareClass(OtherTypeNo: TPSType; var ProcNo: Cardinal): Boolean; virtual;
+ end;
+
+
+function ExportCheck(Sender: TPSPascalCompiler; Proc: TPSInternalProcedure;
+ Types: array of TPSBaseType; Modes: array of TPSParameterMode): Boolean;
+
+
+procedure SetVarExportName(P: TPSVar; const ExpName: string);
+
+function AddImportedClassVariable(Sender: TPSPascalCompiler; const VarName, VarType: string): Boolean;
+
+const
+ {Invalid value, this is returned by most functions of pascal script that return a cardinal, when they fail}
+ InvalidVal = Cardinal(-1);
+
+type
+ TIFPSCompileTimeClass = TPSCompileTimeClass;
+ TIFPSInternalProcedure = TPSInternalProcedure;
+ TIFPSPascalCompilerError = TPSPascalCompilerError;
+
+ TPMFuncType = (mftProc
+ , mftConstructor
+ );
+
+
+function PS_mi2s(i: Cardinal): string;
+
+function ParseMethod(Owner: TPSPascalCompiler; const FClassName: string; Decl: string; var OrgName: string; DestDecl: TPSParametersDecl; var Func: TPMFuncType): Boolean;
+
+function DeclToBits(const Decl: TPSParametersDecl): string;
+
+function NewVariant(FType: TPSType): PIfRVariant;
+procedure DisposeVariant(p: PIfRVariant);
+
+implementation
+
+uses Classes, typInfo;
+
+{$IFDEF DELPHI3UP}
+resourceString
+{$ELSE}
+const
+{$ENDIF}
+
+ RPS_OnUseEventOnly = 'This function can only be called from within the OnUses event';
+ RPS_UnableToRegisterFunction = 'Unable to register function %s';
+ RPS_UnableToRegisterConst = 'Unable to register constant %s';
+ RPS_InvalidTypeForVar = 'Invalid type for variable %s';
+ RPS_InvalidType = 'Invalid Type';
+ RPS_UnableToRegisterType = 'Unable to register type %s';
+ RPS_UnknownInterface = 'Unknown interface: %s';
+ RPS_ConstantValueMismatch = 'Constant Value Type Mismatch';
+ RPS_ConstantValueNotAssigned = 'Constant Value is not assigned';
+
+ RPS_Error = 'Error';
+ RPS_UnknownIdentifier = 'Unknown identifier ''%s''';
+ RPS_IdentifierExpected = 'Identifier expected';
+ RPS_CommentError = 'Comment error';
+ RPS_StringError = 'String error';
+ RPS_CharError = 'Char error';
+ RPS_SyntaxError = 'Syntax error';
+ RPS_EOF = 'Unexpected end of file';
+ RPS_SemiColonExpected = 'Semicolon ('';'') expected';
+ RPS_BeginExpected = '''BEGIN'' expected';
+ RPS_PeriodExpected = 'period (''.'') expected';
+ RPS_DuplicateIdent = 'Duplicate identifier ''%s''';
+ RPS_ColonExpected = 'colon ('':'') expected';
+ RPS_UnknownType = 'Unknown type ''%s''';
+ RPS_CloseRoundExpected = 'Close round expected';
+ RPS_TypeMismatch = 'Type mismatch';
+ RPS_InternalError = 'Internal error (%s)';
+ RPS_AssignmentExpected = 'Assignment expected';
+ RPS_ThenExpected = '''THEN'' expected';
+ RPS_DoExpected = '''DO'' expected';
+ RPS_NoResult = 'No result';
+ RPS_OpenRoundExpected = 'open round (''('')expected';
+ RPS_CommaExpected = 'comma ('','') expected';
+ RPS_ToExpected = '''TO'' expected';
+ RPS_IsExpected = 'is (''='') expected';
+ RPS_OfExpected = '''OF'' expected';
+ RPS_CloseBlockExpected = 'Close block('']'') expected';
+ RPS_VariableExpected = 'Variable Expected';
+ RPS_StringExpected = 'String Expected';
+ RPS_EndExpected = '''END'' expected';
+ RPS_UnSetLabel = 'Label ''%s'' not set';
+ RPS_NotInLoop = 'Not in a loop';
+ RPS_InvalidJump = 'Invalid jump';
+ RPS_OpenBlockExpected = 'Open Block (''['') expected';
+ RPS_WriteOnlyProperty = 'Write-only property';
+ RPS_ReadOnlyProperty = 'Read-only property';
+ RPS_ClassTypeExpected = 'Class type expected';
+ RPS_DivideByZero = 'Divide by Zero';
+ RPS_MathError = 'Math Error';
+ RPS_UnsatisfiedForward = 'Unsatisfied Forward %s';
+ RPS_ForwardParameterMismatch = 'Forward Parameter Mismatch';
+ RPS_InvalidNumberOfParameter = 'Invalid number of parameters';
+ RPS_UnknownError = 'Unknown error';
+ {$IFDEF PS_USESSUPPORT}
+ RPS_NotAllowed = '%s is not allowed at this position';
+ RPS_UnitNotFound = 'Unit ''%s'' not found or contains errors';
+ {$ENDIF}
+
+
+ RPS_Hint = 'Hint';
+ RPS_VariableNotUsed = 'Variable ''%s'' never used';
+ RPS_FunctionNotUsed = 'Function ''%s'' never used';
+ RPS_UnknownHint = 'Unknown hint';
+
+
+ RPS_Warning = 'Warning';
+ RPS_CalculationAlwaysEvaluatesTo = 'Calculation always evaluates to %s';
+ RPS_IsNotNeeded = '%s is not needed';
+ RPS_AbstractClass = 'Abstract Class Construction';
+ RPS_UnknownWarning = 'Unknown warning';
+
+
+ {$IFDEF DEBUG }
+ RPS_UnableToRegister = 'Unable to register %s';
+ {$ENDIF}
+
+ RPS_NotArrayProperty = 'Not an array property';
+ RPS_NotProperty = 'Not a property';
+ RPS_UnknownProperty = 'Unknown Property';
+
+function DeclToBits(const Decl: TPSParametersDecl): string;
+var
+ i: longint;
+begin
+ Result := '';
+ if Decl.Result = nil then
+ begin
+ Result := Result + #0;
+ end else
+ Result := Result + #1;
+ for i := 0 to Decl.ParamCount -1 do
+ begin
+ if Decl.Params[i].Mode <> pmIn then
+ Result := Result + #1
+ else
+ Result := Result + #0;
+ end;
+end;
+
+
+procedure BlockWriteByte(BlockInfo: TPSBlockInfo; b: Byte);
+begin
+ BlockInfo.Proc.Data := BlockInfo.Proc.Data + Char(b);
+end;
+
+procedure BlockWriteData(BlockInfo: TPSBlockInfo; const Data; Len: Longint);
+begin
+ SetLength(BlockInfo.Proc.FData, Length(BlockInfo.Proc.FData) + Len);
+ Move(Data, BlockInfo.Proc.FData[Length(BlockInfo.Proc.FData) - Len + 1], Len);
+end;
+
+procedure BlockWriteLong(BlockInfo: TPSBlockInfo; l: Cardinal);
+begin
+ BlockWriteData(BlockInfo, l, 4);
+end;
+
+procedure BlockWriteVariant(BlockInfo: TPSBlockInfo; p: PIfRVariant);
+var
+ du8: tbtu8;
+ du16: tbtu16;
+begin
+ BlockWriteLong(BlockInfo, p^.FType.FinalTypeNo);
+ case p.FType.BaseType of
+ btType: BlockWriteData(BlockInfo, p^.ttype.FinalTypeno, 4);
+ {$IFNDEF PS_NOWIDESTRING}
+ btWideString:
+ begin
+ BlockWriteLong(BlockInfo, Length(tbtWideString(p^.twidestring)));
+ BlockWriteData(BlockInfo, tbtwidestring(p^.twidestring)[1], 2*Length(tbtWideString(p^.twidestring)));
+ end;
+ btWideChar: BlockWriteData(BlockInfo, p^.twidechar, 2);
+ {$ENDIF}
+ btSingle: BlockWriteData(BlockInfo, p^.tsingle, sizeof(tbtSingle));
+ btDouble: BlockWriteData(BlockInfo, p^.tdouble, sizeof(tbtDouble));
+ btExtended: BlockWriteData(BlockInfo, p^.textended, sizeof(tbtExtended));
+ btCurrency: BlockWriteData(BlockInfo, p^.tcurrency, sizeof(tbtCurrency));
+ btChar: BlockWriteData(BlockInfo, p^.tchar, 1);
+ btSet:
+ begin
+ BlockWriteData(BlockInfo, tbtString(p^.tstring)[1], Length(tbtString(p^.tstring)));
+ end;
+ btString:
+ begin
+ BlockWriteLong(BlockInfo, Length(tbtString(p^.tstring)));
+ BlockWriteData(BlockInfo, tbtString(p^.tstring)[1], Length(tbtString(p^.tstring)));
+ end;
+ btenum:
+ begin
+ if TPSEnumType(p^.FType).HighValue <=256 then
+ begin
+ du8 := tbtu8(p^.tu32);
+ BlockWriteData(BlockInfo, du8, 1)
+ end
+ else if TPSEnumType(p^.FType).HighValue <=65536 then
+ begin
+ du16 := tbtu16(p^.tu32);
+ BlockWriteData(BlockInfo, du16, 2)
+ end;
+ end;
+
+ bts8,btu8: BlockWriteData(BlockInfo, p^.tu8, 1);
+ bts16,btu16: BlockWriteData(BlockInfo, p^.tu16, 2);
+ bts32,btu32: BlockWriteData(BlockInfo, p^.tu32, 4);
+ {$IFNDEF PS_NOINT64}
+ bts64: BlockWriteData(BlockInfo, p^.ts64, 8);
+ {$ENDIF}
+ btProcPtr: BlockWriteData(BlockInfo, p^.tu32, 4);
+ {$IFDEF DEBUG}
+ {$IFNDEF FPC}
+ else
+ asm int 3; end;
+ {$ENDIF}
+ {$ENDIF}
+ end;
+end;
+
+
+
+function ExportCheck(Sender: TPSPascalCompiler; Proc: TPSInternalProcedure; Types: array of TPSBaseType; Modes: array of TPSParameterMode): Boolean;
+var
+ i: Longint;
+ ttype: TPSType;
+begin
+ if High(Types) <> High(Modes)+1 then
+ begin
+ Result := False;
+ exit;
+ end;
+ if High(Types) <> Proc.Decl.ParamCount then
+ begin
+ Result := False;
+ exit;
+ end;
+ TType := Proc.Decl.Result;
+ if TType = nil then
+ begin
+ if Types[0] <> btReturnAddress then
+ begin
+ Result := False;
+ exit;
+ end;
+ end else
+ begin
+ if TType.BaseType <> Types[0] then
+ begin
+ Result := False;
+ exit;
+ end;
+ end;
+ for i := 0 to High(Modes) do
+ begin
+ TType := Proc.Decl.Params[i].aType;
+ if Modes[i] <> Proc.Decl.Params[i].Mode then
+ begin
+ Result := False;
+ exit;
+ end;
+ if TType.BaseType <> Types[i+1] then
+ begin
+ Result := False;
+ exit;
+ end;
+ end;
+ Result := True;
+end;
+
+procedure SetVarExportName(P: TPSVar; const ExpName: string);
+begin
+ if p <> nil then
+ p.exportname := ExpName;
+end;
+
+function FindAndAddType(Owner: TPSPascalCompiler; const Name, Decl: string): TPSType;
+var
+ tt: TPSType;
+begin
+ Result := Owner.FindType(Name);
+ if Result = nil then
+ begin
+ tt := Owner.AddTypeS(Name, Decl);
+ tt.ExportName := True;
+ Result := tt;
+ end;
+end;
+
+
+function ParseMethod(Owner: TPSPascalCompiler; const FClassName: string; Decl: string; var OrgName: string; DestDecl: TPSParametersDecl; var Func: TPMFuncType): Boolean;
+var
+ Parser: TPSPascalParser;
+ FuncType: Byte;
+ VNames: string;
+ modifier: TPSParameterMode;
+ VCType: TPSType;
+ ERow, EPos, ECol: Integer;
+
+begin
+ Parser := TPSPascalParser.Create;
+ Parser.SetText(Decl);
+ if Parser.CurrTokenId = CSTII_Function then
+ FuncType:= 0
+ else if Parser.CurrTokenId = CSTII_Procedure then
+ FuncType := 1
+ else if (Parser.CurrTokenId = CSTII_Constructor) and (FClassName <> '') then
+ FuncType := 2
+ else
+ begin
+ Parser.Free;
+ Result := False;
+ exit;
+ end;
+ Parser.Next;
+ if Parser.CurrTokenId <> CSTI_Identifier then
+ begin
+ Parser.Free;
+ Result := False;
+ exit;
+ end; {if}
+ OrgName := Parser.OriginalToken;
+ Parser.Next;
+ if Parser.CurrTokenId = CSTI_OpenRound then
+ begin
+ Parser.Next;
+ if Parser.CurrTokenId <> CSTI_CloseRound then
+ begin
+ while True do
+ begin
+ if Parser.CurrTokenId = CSTII_Const then
+ begin
+ modifier := pmIn;
+ Parser.Next;
+ end
+ else
+ if Parser.CurrTokenId = CSTII_Var then
+ begin
+ modifier := pmInOut;
+ Parser.Next;
+ end
+ else
+ if Parser.CurrTokenId = CSTII_Out then
+ begin
+ modifier := pmOut;
+ Parser.Next;
+ end
+ else
+ modifier := pmIn;
+ if Parser.CurrTokenId <> CSTI_Identifier then
+ begin
+ Parser.Free;
+ Result := False;
+ exit;
+ end;
+ EPos:=Parser.CurrTokenPos;
+ ERow:=Parser.Row;
+ ECol:=Parser.Col;
+
+ VNames := Parser.OriginalToken + '|';
+ Parser.Next;
+ while Parser.CurrTokenId = CSTI_Comma do
+ begin
+ Parser.Next;
+ if Parser.CurrTokenId <> CSTI_Identifier then
+ begin
+ Parser.Free;
+ Result := False;
+ exit;
+ end;
+ VNames := VNames + Parser.OriginalToken + '|';
+ Parser.Next;
+ end;
+ if Parser.CurrTokenId <> CSTI_Colon then
+ begin
+ Parser.Free;
+ Result := False;
+ exit;
+ end;
+ Parser.Next;
+ if Parser.CurrTokenID = CSTII_Array then
+ begin
+ Parser.nExt;
+ if Parser.CurrTokenId <> CSTII_Of then
+ begin
+ Parser.Free;
+ Result := False;
+ exit;
+ end;
+ Parser.Next;
+ if Parser.CurrTokenId = CSTII_Const then
+ begin
+ VCType := FindAndAddType(Owner, '!OPENARRAYOFCONST', 'array of ___Pointer')
+ end
+ else begin
+ VCType := Owner.GetTypeCopyLink(Owner.FindType(Parser.GetToken));
+ if VCType = nil then
+ begin
+ Parser.Free;
+ Result := False;
+ exit;
+ end;
+ case VCType.BaseType of
+ btU8: VCType := FindAndAddType(Owner, '!OPENARRAYOFU8', 'array of byte');
+ btS8: VCType := FindAndAddType(Owner, '!OPENARRAYOFS8', 'array of ShortInt');
+ btU16: VCType := FindAndAddType(Owner, '!OPENARRAYOFU16', 'array of SmallInt');
+ btS16: VCType := FindAndAddType(Owner, '!OPENARRAYOFS16', 'array of Word');
+ btU32: VCType := FindAndAddType(Owner, '!OPENARRAYOFU32', 'array of Cardinal');
+ btS32: VCType := FindAndAddType(Owner, '!OPENARRAYOFS32', 'array of Longint');
+ btSingle: VCType := FindAndAddType(Owner, '!OPENARRAYOFSINGLE', 'array of Single');
+ btDouble: VCType := FindAndAddType(Owner, '!OPENARRAYOFDOUBLE', 'array of Double');
+ btExtended: VCType := FindAndAddType(Owner, '!OPENARRAYOFEXTENDED', 'array of Extended');
+ btString: VCType := FindAndAddType(Owner, '!OPENARRAYOFSTRING', 'array of String');
+ btPChar: VCType := FindAndAddType(Owner, '!OPENARRAYOFPCHAR', 'array of PChar');
+ btNotificationVariant, btVariant: VCType := FindAndAddType(Owner, '!OPENARRAYOFVARIANT', 'array of variant');
+ {$IFNDEF PS_NOINT64}btS64: VCType := FindAndAddType(Owner, '!OPENARRAYOFS64', 'array of Int64');{$ENDIF}
+ btChar: VCType := FindAndAddType(Owner, '!OPENARRAYOFCHAR', 'array of Char');
+ {$IFNDEF PS_NOWIDESTRING}
+ btWideString: VCType := FindAndAddType(Owner, '!OPENARRAYOFWIDESTRING', 'array of WideString');
+ btWideChar: VCType := FindAndAddType(Owner, '!OPENARRAYOFWIDECHAR', 'array of WideChar');
+ {$ENDIF}
+ btClass: VCType := FindAndAddType(Owner, '!OPENARRAYOFTOBJECT', 'array of TObject');
+ btRecord: VCType := FindAndAddType(Owner, '!OPENARRAYOFRECORD_'+UpperCase(Parser.OriginalToken), 'array of ' +UpperCase(Parser.OriginalToken));
+ else
+ begin
+ Parser.Free;
+ Result := False;
+ exit;
+ end;
+ end;
+ end;
+ end else if Parser.CurrTokenID = CSTII_Const then
+ VCType := nil // any type
+ else begin
+ VCType := Owner.FindType(Parser.GetToken);
+ if VCType = nil then
+ begin
+ Parser.Free;
+ Result := False;
+ exit;
+ end;
+ end;
+ while Pos('|', VNames) > 0 do
+ begin
+ with DestDecl.AddParam do
+ begin
+ {$IFDEF PS_USESSUPPORT}
+ DeclareUnit:=Owner.fModule;
+ {$ENDIF}
+ DeclarePos := EPos;
+ DeclareRow := ERow;
+ DeclareCol := ECol;
+ Mode := modifier;
+ OrgName := copy(VNames, 1, Pos('|', VNames) - 1);
+ aType := VCType;
+ end;
+ Delete(VNames, 1, Pos('|', VNames));
+ end;
+ Parser.Next;
+ if Parser.CurrTokenId = CSTI_CloseRound then
+ break;
+ if Parser.CurrTokenId <> CSTI_Semicolon then
+ begin
+ Parser.Free;
+ Result := False;
+ exit;
+ end;
+ Parser.Next;
+ end; {while}
+ end; {if}
+ Parser.Next;
+ end; {if}
+ if FuncType = 0 then
+ begin
+ if Parser.CurrTokenId <> CSTI_Colon then
+ begin
+ Parser.Free;
+ Result := False;
+ exit;
+ end;
+
+ Parser.Next;
+ VCType := Owner.FindType(Parser.GetToken);
+ if VCType = nil then
+ begin
+ Parser.Free;
+ Result := False;
+ exit;
+ end;
+ end
+ else if FuncType = 2 then {constructor}
+ begin
+ VCType := Owner.FindType(FClassName)
+ end else
+ VCType := nil;
+ DestDecl.Result := VCType;
+ Parser.Free;
+ if FuncType = 2 then
+ Func := mftConstructor
+ else
+ Func := mftProc;
+ Result := True;
+end;
+
+
+
+function TPSPascalCompiler.FindProc(const Name: string): Cardinal;
+var
+ l, h: Longint;
+ x: TPSProcedure;
+ xr: TPSRegProc;
+
+begin
+ h := MakeHash(Name);
+ for l := FProcs.Count - 1 downto 0 do
+ begin
+ x := FProcs.Data^[l];
+ if x.ClassType = TPSInternalProcedure then
+ begin
+ if (TPSInternalProcedure(x).NameHash = h) and
+ (TPSInternalProcedure(x).Name = Name) then
+ begin
+ Result := l;
+ exit;
+ end;
+ end
+ else
+ begin
+ if (TPSExternalProcedure(x).RegProc.NameHash = h) and
+ (TPSExternalProcedure(x).RegProc.Name = Name) then
+ begin
+ Result := l;
+ exit;
+ end;
+ end;
+ end;
+ for l := FRegProcs.Count - 1 downto 0 do
+ begin
+ xr := FRegProcs[l];
+ if (xr.NameHash = h) and (xr.Name = Name) then
+ begin
+ x := TPSExternalProcedure.Create;
+ TPSExternalProcedure(x).RegProc := xr;
+ FProcs.Add(x);
+ Result := FProcs.Count - 1;
+ exit;
+ end;
+ end;
+ Result := InvalidVal;
+end; {findfunc}
+
+function TPSPascalCompiler.UseExternalProc(const Name: string): TPSParametersDecl;
+var
+ ProcNo: cardinal;
+ proc: TPSProcedure;
+begin
+ ProcNo := FindProc(FastUppercase(Name));
+ if ProcNo = InvalidVal then Result := nil
+ else
+ begin
+ proc := TPSProcedure(FProcs[ProcNo]);
+ if Proc is TPSExternalProcedure then
+ begin
+ Result := TPSExternalProcedure(Proc).RegProc.Decl;
+ end else result := nil;
+ end;
+end;
+
+
+
+function TPSPascalCompiler.FindBaseType(BaseType: TPSBaseType): TPSType;
+var
+ l: Longint;
+ x: TPSType;
+begin
+ for l := 0 to FTypes.Count -1 do
+ begin
+ X := FTypes[l];
+ if (x.BaseType = BaseType) and (x.ClassType = TPSType) then
+ begin
+ Result := at2ut(x);
+ exit;
+ end;
+ end;
+ X := TPSType.Create;
+ x.Name := '';
+ x.BaseType := BaseType;
+ {$IFDEF PS_USESSUPPORT}
+ x.DeclareUnit:=fModule;
+ {$ENDIF}
+ x.DeclarePos := InvalidVal;
+ x.DeclareCol := 0;
+ x.DeclareRow := 0;
+ FTypes.Add(x);
+ Result := at2ut(x);
+end;
+
+function TPSPascalCompiler.MakeDecl(decl: TPSParametersDecl): string;
+var
+ i: Longint;
+begin
+ if Decl.Result = nil then result := '0' else
+ result := Decl.Result.Name;
+
+ for i := 0 to decl.ParamCount -1 do
+ begin
+ if decl.GetParam(i).Mode = pmIn then
+ Result := Result + ' @'
+ else
+ Result := Result + ' !';
+ Result := Result + decl.GetParam(i).aType.Name;
+ end;
+end;
+
+
+{ TPSPascalCompiler }
+
+const
+ BtTypeCopy = 255;
+
+
+type
+ TFuncType = (ftProc, ftFunc);
+
+function PS_mi2s(i: Cardinal): string;
+begin
+ SetLength(Result, 4);
+ Cardinal((@Result[1])^) := i;
+end;
+
+
+
+
+function TPSPascalCompiler.AddType(const Name: string; const BaseType: TPSBaseType): TPSType;
+begin
+ if FProcs = nil then
+ begin
+ raise EPSCompilerException.Create(RPS_OnUseEventOnly);
+ end;
+
+ case BaseType of
+ btProcPtr: Result := TPSProceduralType.Create;
+ BtTypeCopy: Result := TPSTypeLink.Create;
+ btRecord: Result := TPSRecordType.Create;
+ btArray: Result := TPSArrayType.Create;
+ btStaticArray: Result := TPSStaticArrayType.Create;
+ btEnum: Result := TPSEnumType.Create;
+ btClass: Result := TPSClassType.Create;
+ btExtClass: REsult := TPSUndefinedClassType.Create;
+ btNotificationVariant, btVariant: Result := TPSVariantType.Create;
+{$IFNDEF PS_NOINTERFACES}
+ btInterface: Result := TPSInterfaceType.Create;
+{$ENDIF}
+ else
+ Result := TPSType.Create;
+ end;
+ Result.Name := FastUppercase(Name);
+ Result.OriginalName := Name;
+ Result.BaseType := BaseType;
+ {$IFDEF PS_USESSUPPORT}
+ Result.DeclareUnit:=fModule;
+ {$ENDIF}
+ Result.DeclarePos := InvalidVal;
+ Result.DeclareCol := 0;
+ Result.DeclareRow := 0;
+ FTypes.Add(Result);
+end;
+
+
+function TPSPascalCompiler.AddFunction(const Header: string): TPSRegProc;
+var
+ Parser: TPSPascalParser;
+ i: Integer;
+ IsFunction: Boolean;
+ VNames, Name: string;
+ Decl: TPSParametersDecl;
+ modifier: TPSParameterMode;
+ VCType: TPSType;
+ x: TPSRegProc;
+begin
+ if FProcs = nil then
+ raise EPSCompilerException.Create(RPS_OnUseEventOnly);
+
+ Parser := TPSPascalParser.Create;
+ Parser.SetText(Header);
+ Decl := TPSParametersDecl.Create;
+ x := nil;
+ try
+ if Parser.CurrTokenId = CSTII_Function then
+ IsFunction := True
+ else if Parser.CurrTokenId = CSTII_Procedure then
+ IsFunction := False
+ else
+ Raise EPSCompilerException.CreateFmt(RPS_UnableToRegisterFunction, ['']);
+ Parser.Next;
+ if Parser.CurrTokenId <> CSTI_Identifier then
+ Raise EPSCompilerException.CreateFmt(RPS_UnableToRegisterFunction, ['']);
+ Name := Parser.OriginalToken;
+ Parser.Next;
+ if Parser.CurrTokenId = CSTI_OpenRound then
+ begin
+ Parser.Next;
+ if Parser.CurrTokenId <> CSTI_CloseRound then
+ begin
+ while True do
+ begin
+ if Parser.CurrTokenId = CSTII_Out then
+ begin
+ Modifier := pmOut;
+ Parser.Next;
+ end else
+ if Parser.CurrTokenId = CSTII_Const then
+ begin
+ Modifier := pmIn;
+ Parser.Next;
+ end else
+ if Parser.CurrTokenId = CSTII_Var then
+ begin
+ modifier := pmInOut;
+ Parser.Next;
+ end
+ else
+ modifier := pmIn;
+ if Parser.CurrTokenId <> CSTI_Identifier then
+ raise EPSCompilerException.CreateFmt(RPS_UnableToRegisterFunction, [Name]);
+ VNames := Parser.OriginalToken + '|';
+ Parser.Next;
+ while Parser.CurrTokenId = CSTI_Comma do
+ begin
+ Parser.Next;
+ if Parser.CurrTokenId <> CSTI_Identifier then
+ Raise EPSCompilerException.CreateFmt(RPS_UnableToRegisterFunction, [Name]);
+ VNames := VNames + Parser.OriginalToken + '|';
+ Parser.Next;
+ end;
+ if Parser.CurrTokenId <> CSTI_Colon then
+ begin
+ Parser.Free;
+ Raise EPSCompilerException.CreateFmt(RPS_UnableToRegisterFunction, [Name]);
+ end;
+ Parser.Next;
+ VCType := FindType(Parser.GetToken);
+ if VCType = nil then
+ Raise EPSCompilerException.CreateFmt(RPS_UnableToRegisterFunction, [Name]);
+ while Pos('|', VNames) > 0 do
+ begin
+ with Decl.AddParam do
+ begin
+ Mode := modifier;
+ OrgName := copy(VNames, 1, Pos('|', VNames) - 1);
+ aType := VCType;
+ end;
+ Delete(VNames, 1, Pos('|', VNames));
+ end;
+ Parser.Next;
+ if Parser.CurrTokenId = CSTI_CloseRound then
+ break;
+ if Parser.CurrTokenId <> CSTI_Semicolon then
+ Raise EPSCompilerException.CreateFmt(RPS_UnableToRegisterFunction, [Name]);
+ Parser.Next;
+ end; {while}
+ end; {if}
+ Parser.Next;
+ end; {if}
+ if IsFunction then
+ begin
+ if Parser.CurrTokenId <> CSTI_Colon then
+ Raise EPSCompilerException.CreateFmt(RPS_UnableToRegisterFunction, [Name]);
+
+ Parser.Next;
+ VCType := FindType(Parser.GetToken);
+ if VCType = nil then
+ Raise EPSCompilerException.CreateFmt(RPS_UnableToRegisterFunction, [Name]);
+ end
+ else
+ VCType := nil;
+ Decl.Result := VCType;
+ X := TPSRegProc.Create;
+ x.OrgName := Name;
+ x.Name := FastUpperCase(Name);
+ x.ExportName := True;
+ x.Decl.Assign(decl);
+ if Decl.Result = nil then
+ begin
+ x.ImportDecl := x.ImportDecl + #0;
+ end else
+ x.ImportDecl := x.ImportDecl + #1;
+ for i := 0 to Decl.ParamCount -1 do
+ begin
+ if Decl.Params[i].Mode <> pmIn then
+ x.ImportDecl := x.ImportDecl + #1
+ else
+ x.ImportDecl := x.ImportDecl + #0;
+ end;
+
+ FRegProcs.Add(x);
+ finally
+ Decl.Free;
+ Parser.Free;
+ end;
+ Result := x;
+end;
+
+function TPSPascalCompiler.MakeHint(const Module: string; E: TPSPascalCompilerHintType; const Param: string): TPSPascalCompilerMessage;
+var
+ n: TPSPascalCompilerHint;
+begin
+ N := TPSPascalCompilerHint.Create;
+ n.FHint := e;
+ n.SetParserPos(FParser);
+ n.FModuleName := Module;
+ n.FParam := Param;
+ FMessages.Add(n);
+ Result := n;
+end;
+
+function TPSPascalCompiler.MakeError(const Module: string; E:
+ TPSPascalCompilerErrorType; const Param: string): TPSPascalCompilerMessage;
+var
+ n: TPSPascalCompilerError;
+begin
+ N := TPSPascalCompilerError.Create;
+ n.FError := e;
+ n.SetParserPos(FParser);
+ {$IFNDEF PS_USESSUPPORT}
+ n.FModuleName := Module;
+ {$ELSE}
+ if Module <> '' then
+ n.FModuleName := Module
+ else
+ n.FModuleName := fModule;
+ {$ENDIF}
+ n.FParam := Param;
+ FMessages.Add(n);
+ Result := n;
+end;
+
+function TPSPascalCompiler.MakeWarning(const Module: string; E:
+ TPSPascalCompilerWarningType; const Param: string): TPSPascalCompilerMessage;
+var
+ n: TPSPascalCompilerWarning;
+begin
+ N := TPSPascalCompilerWarning.Create;
+ n.FWarning := e;
+ n.SetParserPos(FParser);
+ n.FModuleName := Module;
+ n.FParam := Param;
+ FMessages.Add(n);
+ Result := n;
+end;
+
+procedure TPSPascalCompiler.Clear;
+var
+ l: Longint;
+begin
+ FDebugOutput := '';
+ FOutput := '';
+ for l := 0 to FMessages.Count - 1 do
+ TPSPascalCompilerMessage(FMessages[l]).Free;
+ FMessages.Clear;
+ for L := FAutoFreeList.Count -1 downto 0 do
+ begin
+ TObject(FAutoFreeList[l]).Free;
+ end;
+ FAutoFreeList.Clear;
+end;
+
+procedure CopyVariantContents(Src, Dest: PIfRVariant);
+begin
+ case src.FType.BaseType of
+ btu8, bts8: dest^.tu8 := src^.tu8;
+ btu16, bts16: dest^.tu16 := src^.tu16;
+ btenum, btu32, bts32: dest^.tu32 := src^.tu32;
+ btsingle: Dest^.tsingle := src^.tsingle;
+ btdouble: Dest^.tdouble := src^.tdouble;
+ btextended: Dest^.textended := src^.textended;
+ btCurrency: Dest^.tcurrency := Src^.tcurrency;
+ btchar: Dest^.tchar := src^.tchar;
+ {$IFNDEF PS_NOINT64}bts64: dest^.ts64 := src^.ts64;{$ENDIF}
+ btset, btstring: tbtstring(dest^.tstring) := tbtstring(src^.tstring);
+ {$IFNDEF PS_NOWIDESTRING}
+ btwidestring: tbtwidestring(dest^.twidestring) := tbtwidestring(src^.twidestring);
+ btwidechar: Dest^.tchar := src^.tchar;
+ {$ENDIF}
+ end;
+end;
+
+function DuplicateVariant(Src: PIfRVariant): PIfRVariant;
+begin
+ New(Result);
+ FillChar(Result^, SizeOf(TIfRVariant), 0);
+ CopyVariantContents(Src, Result);
+end;
+
+
+procedure InitializeVariant(Vari: PIfRVariant; FType: TPSType);
+begin
+ FillChar(vari^, SizeOf(TIfRVariant), 0);
+ if FType.BaseType = btSet then
+ begin
+ SetLength(tbtstring(vari^.tstring), TPSSetType(FType).ByteSize);
+ fillchar(tbtstring(vari^.tstring)[1], length(tbtstring(vari^.tstring)), 0);
+ end;
+ vari^.FType := FType;
+end;
+
+function NewVariant(FType: TPSType): PIfRVariant;
+begin
+ New(Result);
+ InitializeVariant(Result, FType);
+end;
+{$IFDEF FPC}
+procedure Finalize(var s: string); overload; begin s := ''; end;
+procedure Finalize(var s: widestring); overload; begin s := ''; end;
+{$ENDIF}
+
+procedure FinalizeVariant(var p: TIfRVariant);
+begin
+ if (p.FType.BaseType = btString) or (p.FType.basetype = btSet) then
+ finalize(tbtstring(p.tstring))
+ {$IFNDEF PS_NOWIDESTRING}
+ else if p.FType.BaseType = btWideString then
+ finalize(tbtWideString(p.twidestring)); // widestring
+ {$ENDIF}
+end;
+
+procedure DisposeVariant(p: PIfRVariant);
+begin
+ if p <> nil then
+ begin
+ FinalizeVariant(p^);
+ Dispose(p);
+ end;
+end;
+
+
+
+function TPSPascalCompiler.GetTypeCopyLink(p: TPSType): TPSType;
+begin
+ if p = nil then
+ Result := nil
+ else
+ if p.BaseType = BtTypeCopy then
+ begin
+ Result := TPSTypeLink(p).LinkTypeNo;
+ end else Result := p;
+end;
+
+function IsIntType(b: TPSBaseType): Boolean;
+begin
+ case b of
+ btU8, btS8, btU16, btS16, btU32, btS32{$IFNDEF PS_NOINT64}, btS64{$ENDIF}: Result := True;
+ else
+ Result := False;
+ end;
+end;
+
+function IsRealType(b: TPSBaseType): Boolean;
+begin
+ case b of
+ btSingle, btDouble, btCurrency, btExtended: Result := True;
+ else
+ Result := False;
+ end;
+end;
+
+function IsIntRealType(b: TPSBaseType): Boolean;
+begin
+ case b of
+ btSingle, btDouble, btCurrency, btExtended, btU8, btS8, btU16, btS16, btU32, btS32{$IFNDEF PS_NOINT64}, btS64{$ENDIF}:
+ Result := True;
+ else
+ Result := False;
+ end;
+
+end;
+
+function DiffRec(p1, p2: TPSSubItem): Boolean;
+begin
+ if p1.ClassType = p2.ClassType then
+ begin
+ if P1.ClassType = TPSSubNumber then
+ Result := TPSSubNumber(p1).SubNo <> TPSSubNumber(p2).SubNo
+ else if P1.ClassType = TPSSubValue then
+ Result := TPSSubValue(p1).SubNo <> TPSSubValue(p2).SubNo
+ else
+ Result := False;
+ end else Result := True;
+end;
+
+function SameReg(x1, x2: TPSValue): Boolean;
+var
+ I: Longint;
+begin
+ if (x1.ClassType = x2.ClassType) and (X1 is TPSValueVar) then
+ begin
+ if
+ ((x1.ClassType = TPSValueGlobalVar) and (TPSValueGlobalVar(x1).GlobalVarNo = TPSValueGlobalVar(x2).GlobalVarNo)) or
+ ((x1.ClassType = TPSValueLocalVar) and (TPSValueLocalVar(x1).LocalVarNo = TPSValueLocalVar(x2).LocalVarNo)) or
+ ((x1.ClassType = TPSValueParamVar) and (TPSValueParamVar(x1).ParamNo = TPSValueParamVar(x2).ParamNo)) or
+ ((x1.ClassType = TPSValueAllocatedStackVar) and (TPSValueAllocatedStackVar(x1).LocalVarNo = TPSValueAllocatedStackVar(x2).LocalVarNo)) then
+ begin
+ if TPSValueVar(x1).GetRecCount <> TPSValueVar(x2).GetRecCount then
+ begin
+ Result := False;
+ exit;
+ end;
+ for i := 0 to TPSValueVar(x1).GetRecCount -1 do
+ begin
+ if DiffRec(TPSValueVar(x1).RecItem[i], TPSValueVar(x2).RecItem[i]) then
+ begin
+ Result := False;
+ exit;
+ end;
+ end;
+ Result := True;
+ end else Result := False;
+ end
+ else
+ Result := False;
+end;
+
+function GetUInt(Src: PIfRVariant; var s: Boolean): Cardinal;
+begin
+ case Src.FType.BaseType of
+ btU8: Result := Src^.tu8;
+ btS8: Result := Src^.ts8;
+ btU16: Result := Src^.tu16;
+ btS16: Result := Src^.ts16;
+ btU32: Result := Src^.tu32;
+ btS32: Result := Src^.ts32;
+ {$IFNDEF PS_NOINT64}
+ bts64: Result := src^.ts64;
+ {$ENDIF}
+ btChar: Result := ord(Src^.tchar);
+ {$IFNDEF PS_NOWIDESTRING}
+ btWideChar: Result := ord(tbtwidechar(src^.twidechar));
+ {$ENDIF}
+ btEnum: Result := src^.tu32;
+ else
+ begin
+ s := False;
+ Result := 0;
+ end;
+ end;
+end;
+
+function GetInt(Src: PIfRVariant; var s: Boolean): Longint;
+begin
+ case Src.FType.BaseType of
+ btU8: Result := Src^.tu8;
+ btS8: Result := Src^.ts8;
+ btU16: Result := Src^.tu16;
+ btS16: Result := Src^.ts16;
+ btU32: Result := Src^.tu32;
+ btS32: Result := Src^.ts32;
+ {$IFNDEF PS_NOINT64}
+ bts64: Result := src^.ts64;
+ {$ENDIF}
+ btChar: Result := ord(Src^.tchar);
+ {$IFNDEF PS_NOWIDESTRING}
+ btWideChar: Result := ord(tbtwidechar(src^.twidechar));
+ {$ENDIF}
+ btEnum: Result := src^.tu32;
+ else
+ begin
+ s := False;
+ Result := 0;
+ end;
+ end;
+end;
+{$IFNDEF PS_NOINT64}
+function GetInt64(Src: PIfRVariant; var s: Boolean): Int64;
+begin
+ case Src.FType.BaseType of
+ btU8: Result := Src^.tu8;
+ btS8: Result := Src^.ts8;
+ btU16: Result := Src^.tu16;
+ btS16: Result := Src^.ts16;
+ btU32: Result := Src^.tu32;
+ btS32: Result := Src^.ts32;
+ bts64: Result := src^.ts64;
+ btChar: Result := ord(Src^.tchar);
+ {$IFNDEF PS_NOWIDESTRING}
+ btWideChar: Result := ord(tbtwidechar(src^.twidechar));
+ {$ENDIF}
+ btEnum: Result := src^.tu32;
+ else
+ begin
+ s := False;
+ Result := 0;
+ end;
+ end;
+end;
+{$ENDIF}
+
+function GetReal(Src: PIfRVariant; var s: Boolean): Extended;
+begin
+ case Src.FType.BaseType of
+ btU8: Result := Src^.tu8;
+ btS8: Result := Src^.ts8;
+ btU16: Result := Src^.tu16;
+ btS16: Result := Src^.ts16;
+ btU32: Result := Src^.tu32;
+ btS32: Result := Src^.ts32;
+ {$IFNDEF PS_NOINT64}
+ bts64: Result := src^.ts64;
+ {$ENDIF}
+ btChar: Result := ord(Src^.tchar);
+ {$IFNDEF PS_NOWIDESTRING}
+ btWideChar: Result := ord(tbtwidechar(src^.twidechar));
+ {$ENDIF}
+ btSingle: Result := Src^.tsingle;
+ btDouble: Result := Src^.tdouble;
+ btCurrency: Result := SRc^.tcurrency;
+ btExtended: Result := Src^.textended;
+ else
+ begin
+ s := False;
+ Result := 0;
+ end;
+ end;
+end;
+
+function GetString(Src: PIfRVariant; var s: Boolean): string;
+begin
+ case Src.FType.BaseType of
+ btChar: Result := Src^.tchar;
+ btString: Result := tbtstring(src^.tstring);
+ {$IFNDEF PS_NOWIDESTRING}
+ btWideChar: Result := src^.twidechar;
+ btWideString: Result := tbtWideString(src^.twidestring);
+ {$ENDIF}
+ else
+ begin
+ s := False;
+ Result := '';
+ end;
+ end;
+end;
+
+{$IFNDEF PS_NOWIDESTRING}
+function TPSPascalCompiler.GetWideString(Src: PIfRVariant; var s: Boolean): WideString;
+begin
+ case Src.FType.BaseType of
+ btChar: Result := Src^.tchar;
+ btString: Result := tbtstring(src^.tstring);
+ btWideChar: Result := src^.twidechar;
+ btWideString: Result := tbtWideString(src^.twidestring);
+ else
+ begin
+ s := False;
+ Result := '';
+ end;
+ end;
+end;
+{$ENDIF}
+
+function ab(b: Longint): Longint;
+begin
+ ab := Longint(b = 0);
+end;
+
+procedure Set_Union(Dest, Src: PByteArray; ByteSize: Integer);
+var
+ i: Longint;
+begin
+ for i := ByteSize -1 downto 0 do
+ Dest^[i] := Dest^[i] or Src^[i];
+end;
+
+procedure Set_Diff(Dest, Src: PByteArray; ByteSize: Integer);
+var
+ i: Longint;
+begin
+ for i := ByteSize -1 downto 0 do
+ Dest^[i] := Dest^[i] and not Src^[i];
+end;
+
+procedure Set_Intersect(Dest, Src: PByteArray; ByteSize: Integer);
+var
+ i: Longint;
+begin
+ for i := ByteSize -1 downto 0 do
+ Dest^[i] := Dest^[i] and Src^[i];
+end;
+
+procedure Set_Subset(Dest, Src: PByteArray; ByteSize: Integer; var Val: Boolean);
+var
+ i: Integer;
+begin
+ for i := ByteSize -1 downto 0 do
+ begin
+ if not (Src^[i] and Dest^[i] = Dest^[i]) then
+ begin
+ Val := False;
+ exit;
+ end;
+ end;
+ Val := True;
+end;
+
+procedure Set_Equal(Dest, Src: PByteArray; ByteSize: Integer; var Val: Boolean);
+var
+ i: Longint;
+begin
+ for i := ByteSize -1 downto 0 do
+ begin
+ if Dest^[i] <> Src^[i] then
+ begin
+ Val := False;
+ exit;
+ end;
+ end;
+ val := True;
+end;
+
+procedure Set_membership(Item: Longint; Src: PByteArray; var Val: Boolean);
+begin
+ Val := (Src^[Item shr 3] and (1 shl (Item and 7))) <> 0;
+end;
+
+procedure Set_MakeMember(Item: Longint; Src: PByteArray);
+begin
+ Src^[Item shr 3] := Src^[Item shr 3] or (1 shl (Item and 7));
+end;
+
+procedure ConvertToBoolean(SE: TPSPascalCompiler; FUseUsedTypes: Boolean; var1: PIFRVariant; b: Boolean);
+begin
+ FinalizeVariant(var1^);
+ if FUseUsedTypes then
+ Var1^.FType := se.at2ut(se.FDefaultBoolType)
+ else
+ Var1^.FType := Se.FDefaultBoolType;
+ var1^.tu32 := Ord(b);
+end;
+
+procedure ConvertToString(SE: TPSPascalCompiler; FUseUsedTypes: Boolean; var1: PIFRVariant; const s: string);
+var
+ atype: TPSType;
+begin
+ FinalizeVariant(var1^);
+ atype := se.FindBaseType(btString);
+ if FUseUsedTypes then
+ InitializeVariant(var1, se.at2ut(atype))
+ else
+ InitializeVariant(var1, atype);
+ tbtstring(var1^.tstring) := s;
+end;
+{$IFNDEF PS_NOWIDESTRING}
+procedure ConvertToWideString(SE: TPSPascalCompiler; FUseUsedTypes: Boolean; var1: PIFRVariant; const s: WideString);
+var
+ atype: TPSType;
+begin
+ FinalizeVariant(var1^);
+ atype := se.FindBaseType(btWideString);
+ if FUseUsedTypes then
+ InitializeVariant(var1, se.at2ut(atype))
+ else
+ InitializeVariant(var1, atype);
+ tbtwidestring(var1^.twidestring) := s;
+end;
+{$ENDIF}
+procedure ConvertToFloat(SE: TPSPascalCompiler; FUseUsedTypes: Boolean; var1: PIfRVariant; NewType: TPSType);
+var
+ vartemp: PIfRVariant;
+ b: Boolean;
+begin
+ New(vartemp);
+ if FUseUsedTypes then
+ NewType := se.at2ut(NewType);
+ InitializeVariant(vartemp, var1.FType);
+ CopyVariantContents(var1, vartemp);
+ FinalizeVariant(var1^);
+ InitializeVariant(var1, newtype);
+ case var1.ftype.basetype of
+ btSingle:
+ begin
+ if (vartemp.ftype.BaseType = btu8) or (vartemp.ftype.BaseType = btu16) or (vartemp.ftype.BaseType = btu32) then
+ var1^.tsingle := GetUInt(vartemp, b)
+ else
+ var1^.tsingle := GetInt(vartemp, b)
+ end;
+ btDouble:
+ begin
+ if (vartemp.ftype.BaseType = btu8) or (vartemp.ftype.BaseType = btu16) or (vartemp.ftype.BaseType = btu32) then
+ var1^.tdouble := GetUInt(vartemp, b)
+ else
+ var1^.tdouble := GetInt(vartemp, b)
+ end;
+ btExtended:
+ begin
+ if (vartemp.ftype.BaseType = btu8) or (vartemp.ftype.BaseType = btu16) or (vartemp.ftype.BaseType = btu32) then
+ var1^.textended:= GetUInt(vartemp, b)
+ else
+ var1^.textended:= GetInt(vartemp, b)
+ end;
+ btCurrency:
+ begin
+ if (vartemp.ftype.BaseType = btu8) or (vartemp.ftype.BaseType = btu16) or (vartemp.ftype.BaseType = btu32) then
+ var1^.tcurrency:= GetUInt(vartemp, b)
+ else
+ var1^.tcurrency:= GetInt(vartemp, b)
+ end;
+ end;
+ DisposeVariant(vartemp);
+end;
+
+
+function TPSPascalCompiler.IsCompatibleType(p1, p2: TPSType; Cast: Boolean): Boolean;
+begin
+ if
+ ((p1.BaseType = btProcPtr) and (p2 = p1)) or
+ (p1.BaseType = btPointer) or
+ (p2.BaseType = btPointer) or
+ ((p1.BaseType = btNotificationVariant) or (p1.BaseType = btVariant)) or
+ ((p2.BaseType = btNotificationVariant) or (p2.BaseType = btVariant)) or
+ (IsIntType(p1.BaseType) and IsIntType(p2.BaseType)) or
+ (IsRealType(p1.BaseType) and IsIntRealType(p2.BaseType)) or
+ (((p1.basetype = btPchar) or (p1.BaseType = btString)) and ((p2.BaseType = btString) or (p2.BaseType = btPchar))) or
+ (((p1.basetype = btPchar) or (p1.BaseType = btString)) and (p2.BaseType = btChar)) or
+ (((p1.BaseType = btArray) or (p1.BaseType = btStaticArray)) and (
+ (p2.BaseType = btArray) or (p2.BaseType = btStaticArray)) and IsCompatibleType(TPSArrayType(p1).ArrayTypeNo, TPSArrayType(p2).ArrayTypeNo, False)) or
+ ((p1.BaseType = btChar) and (p2.BaseType = btChar)) or
+ ((p1.BaseType = btSet) and (p2.BaseType = btSet)) or
+ {$IFNDEF PS_NOWIDESTRING}
+ ((p1.BaseType = btWideChar) and (p2.BaseType = btChar)) or
+ ((p1.BaseType = btWideChar) and (p2.BaseType = btWideChar)) or
+ ((p1.BaseType = btWidestring) and (p2.BaseType = btChar)) or
+ ((p1.BaseType = btWidestring) and (p2.BaseType = btWideChar)) or
+ ((p1.BaseType = btWidestring) and ((p2.BaseType = btString) or (p2.BaseType = btPchar))) or
+ ((p1.BaseType = btWidestring) and (p2.BaseType = btWidestring)) or
+ (((p1.basetype = btPchar) or (p1.BaseType = btString)) and (p2.BaseType = btWideString)) or
+ (((p1.basetype = btPchar) or (p1.BaseType = btString)) and (p2.BaseType = btWidechar)) or
+ (((p1.basetype = btPchar) or (p1.BaseType = btString)) and (p2.BaseType = btchar)) or
+ {$ENDIF}
+ ((p1.BaseType = btRecord) and (p2.BaseType = btrecord)) or
+ ((p1.BaseType = btEnum) and (p2.BaseType = btEnum)) or
+ (Cast and IsIntType(P1.BaseType) and (p2.baseType = btEnum)) or
+ (Cast and (p1.baseType = btEnum) and IsIntType(P2.BaseType))
+ then
+ Result := True
+ else if p1.BaseType = btclass then
+ Result := TPSClassType(p1).cl.IsCompatibleWith(p2)
+{$IFNDEF PS_NOINTERFACES}
+ else if p1.BaseType = btInterface then
+ Result := TPSInterfaceType(p1).Intf.IsCompatibleWith(p2)
+{$ENDIF}
+ else if ((p1.BaseType = btExtClass) and (p2.BaseType = btExtClass)) then
+ begin
+ Result := TPSUndefinedClassType(p1).ExtClass.IsCompatibleWith(TPSUndefinedClassType(p2).ExtClass);
+ end
+ else
+ Result := False;
+end;
+
+
+function TPSPascalCompiler.PreCalc(FUseUsedTypes: Boolean; Var1Mod: Byte; var1: PIFRVariant; Var2Mod: Byte; Var2: PIfRVariant; Cmd: TPSBinOperatorType; Pos, Row, Col: Cardinal): Boolean;
+ { var1=dest, var2=src }
+var
+ b: Boolean;
+
+begin
+ Result := True;
+ try
+ if (IsRealType(var2.FType.BaseType) and IsIntType(var1.FType.BaseType)) then
+ ConvertToFloat(Self, FUseUsedTypes, var1, var2^.FType);
+ case Cmd of
+ otAdd:
+ begin { + }
+ case var1.FType.BaseType of
+ btU8: var1^.tu8 := var1^.tu8 + GetUint(Var2, Result);
+ btS8: var1^.ts8 := var1^.ts8 + GetInt(Var2, Result);
+ btU16: var1^.tu16 := var1^.tu16 + GetUint(Var2, Result);
+ btS16: var1^.ts16 := var1^.ts16 + Getint(Var2, Result);
+ btEnum, btU32: var1^.tu32 := var1^.tu32 + GetUint(Var2, Result);
+ btS32: var1^.ts32 := var1^.ts32 + Getint(Var2, Result);
+ {$IFNDEF PS_NOINT64}btS64: var1^.ts64 := var1^.ts64 + GetInt64(Var2, Result); {$ENDIF}
+ btSingle: var1^.tsingle := var1^.tsingle + GetReal( Var2, Result);
+ btDouble: var1^.tdouble := var1^.tdouble + GetReal( Var2, Result);
+ btExtended: var1^.textended := var1^.textended + GetReal( Var2, Result);
+ btCurrency: var1^.tcurrency := var1^.tcurrency + GetReal( Var2, Result);
+ btSet:
+ begin
+ if (var1.FType = var2.FType) then
+ begin
+ Set_Union(var1.tstring, var2.tstring, TPSSetType(var1.FType).ByteSize);
+ end else Result := False;
+ end;
+ btChar:
+ begin
+ ConvertToString(Self, FUseUsedTypes, var1, getstring(Var1, b)+getstring(Var2, b));
+ end;
+ btString: tbtstring(var1^.tstring) := tbtstring(var1^.tstring) + GetString(Var2, Result);
+ {$IFNDEF PS_NOWIDESTRING}
+ btwideString: tbtwidestring(var1^.twidestring) := tbtwidestring(var1^.twidestring) + GetWideString(Var2, Result);
+ btWidechar:
+ begin
+ ConvertToWideString(Self, FUseUsedTypes, var1, GetWideString(Var1, b)+GetWideString(Var2, b));
+ end;
+ {$ENDIF}
+ else Result := False;
+ end;
+ end;
+ otSub:
+ begin { - }
+ case Var1.FType.BaseType of
+ btU8: var1^.tu8 := var1^.tu8 - GetUint(Var2, Result);
+ btS8: var1^.ts8 := var1^.ts8 - Getint(Var2, Result);
+ btU16: var1^.tu16 := var1^.tu16 - GetUint(Var2, Result);
+ btS16: var1^.ts16 := var1^.ts16 - Getint(Var2, Result);
+ btEnum, btU32: var1^.tu32 := var1^.tu32 - GetUint(Var2, Result);
+ btS32: var1^.ts32 := var1^.ts32 - Getint(Var2, Result);
+ {$IFNDEF PS_NOINT64}btS64: var1^.ts64 := var1^.ts64 - GetInt64(Var2, Result); {$ENDIF}
+ btSingle: var1^.tsingle := var1^.tsingle - GetReal( Var2, Result);
+ btDouble: var1^.tdouble := var1^.tdouble - GetReal(Var2, Result);
+ btExtended: var1^.textended := var1^.textended - GetReal(Var2, Result);
+ btCurrency: var1^.tcurrency := var1^.tcurrency - GetReal( Var2, Result);
+ btSet:
+ begin
+ if (var1.FType = var2.FType) then
+ begin
+ Set_Diff(var1.tstring, var2.tstring, TPSSetType(var1.FType).ByteSize);
+ end else Result := False;
+ end;
+ else Result := False;
+ end;
+ end;
+ otMul:
+ begin { * }
+ case Var1.FType.BaseType of
+ btU8: var1^.tu8 := var1^.tu8 * GetUint(Var2, Result);
+ btS8: var1^.ts8 := var1^.ts8 * Getint(Var2, Result);
+ btU16: var1^.tu16 := var1^.tu16 * GetUint(Var2, Result);
+ btS16: var1^.ts16 := var1^.ts16 * Getint(Var2, Result);
+ btU32: var1^.tu32 := var1^.tu32 * GetUint(Var2, Result);
+ btS32: var1^.ts32 := var1^.ts32 * Getint(Var2, Result);
+ {$IFNDEF PS_NOINT64}btS64: var1^.ts64 := var1^.ts64 * GetInt64(Var2, Result); {$ENDIF}
+ btSingle: var1^.tsingle := var1^.tsingle * GetReal(Var2, Result);
+ btDouble: var1^.tdouble := var1^.tdouble * GetReal(Var2, Result);
+ btExtended: var1^.textended := var1^.textended * GetReal( Var2, Result);
+ btCurrency: var1^.tcurrency := var1^.tcurrency * GetReal( Var2, Result);
+ btSet:
+ begin
+ if (var1.FType = var2.FType) then
+ begin
+ Set_Intersect(var1.tstring, var2.tstring, TPSSetType(var1.FType).ByteSize);
+ end else Result := False;
+ end;
+ else Result := False;
+ end;
+ end;
+ otDiv:
+ begin { / }
+ case Var1.FType.BaseType of
+ btU8: var1^.tu8 := var1^.tu8 div GetUint(Var2, Result);
+ btS8: var1^.ts8 := var1^.ts8 div Getint(Var2, Result);
+ btU16: var1^.tu16 := var1^.tu16 div GetUint(Var2, Result);
+ btS16: var1^.ts16 := var1^.ts16 div Getint(Var2, Result);
+ btU32: var1^.tu32 := var1^.tu32 div GetUint(Var2, Result);
+ btS32: var1^.ts32 := var1^.ts32 div Getint(Var2, Result);
+ {$IFNDEF PS_NOINT64}btS64: var1^.ts64 := var1^.ts64 div GetInt64(Var2, Result); {$ENDIF}
+ btSingle: var1^.tsingle := var1^.tsingle / GetReal( Var2, Result);
+ btDouble: var1^.tdouble := var1^.tdouble / GetReal( Var2, Result);
+ btExtended: var1^.textended := var1^.textended / GetReal( Var2, Result);
+ btCurrency: var1^.tcurrency := var1^.tcurrency / GetReal( Var2, Result);
+ else Result := False;
+ end;
+ end;
+ otMod:
+ begin { MOD }
+ case Var1.FType.BaseType of
+ btU8: var1^.tu8 := var1^.tu8 mod GetUint(Var2, Result);
+ btS8: var1^.ts8 := var1^.ts8 mod Getint(Var2, Result);
+ btU16: var1^.tu16 := var1^.tu16 mod GetUint(Var2, Result);
+ btS16: var1^.ts16 := var1^.ts16 mod Getint(Var2, Result);
+ btU32: var1^.tu32 := var1^.tu32 mod GetUint(Var2, Result);
+ btS32: var1^.ts32 := var1^.ts32 mod Getint(Var2, Result);
+ {$IFNDEF PS_NOINT64}btS64: var1^.ts64 := var1^.ts64 mod GetInt64(Var2, Result); {$ENDIF}
+ else Result := False;
+ end;
+ end;
+ otshl:
+ begin { SHL }
+ case Var1.FType.BaseType of
+ btU8: var1^.tu8 := var1^.tu8 shl GetUint(Var2, Result);
+ btS8: var1^.ts8 := var1^.ts8 shl Getint(Var2, Result);
+ btU16: var1^.tu16 := var1^.tu16 shl GetUint(Var2, Result);
+ btS16: var1^.ts16 := var1^.ts16 shl Getint(Var2, Result);
+ btU32: var1^.tu32 := var1^.tu32 shl GetUint(Var2, Result);
+ btS32: var1^.ts32 := var1^.ts32 shl Getint(Var2, Result);
+ {$IFNDEF PS_NOINT64}btS64: var1^.ts64 := var1^.ts64 shl GetInt64(Var2, Result); {$ENDIF}
+ else Result := False;
+ end;
+ end;
+ otshr:
+ begin { SHR }
+ case Var1.FType.BaseType of
+ btU8: var1^.tu8 := var1^.tu8 shr GetUint(Var2, Result);
+ btS8: var1^.ts8 := var1^.ts8 shr Getint(Var2, Result);
+ btU16: var1^.tu16 := var1^.tu16 shr GetUint(Var2, Result);
+ btS16: var1^.ts16 := var1^.ts16 shr Getint(Var2, Result);
+ btU32: var1^.tu32 := var1^.tu32 shr GetUint(Var2, Result);
+ btS32: var1^.ts32 := var1^.ts32 shr Getint(Var2, Result);
+ {$IFNDEF PS_NOINT64}btS64: var1^.ts64 := var1^.ts64 shr GetInt64( Var2, Result); {$ENDIF}
+ else Result := False;
+ end;
+ end;
+ otAnd:
+ begin { AND }
+ case Var1.FType.BaseType of
+ btU8: var1^.tu8 := var1^.tu8 and GetUint(Var2, Result);
+ btS8: var1^.ts8 := var1^.ts8 and Getint(Var2, Result);
+ btU16: var1^.tu16 := var1^.tu16 and GetUint(Var2, Result);
+ btS16: var1^.ts16 := var1^.ts16 and Getint(Var2, Result);
+ btU32: var1^.tu32 := var1^.tu32 and GetUint(Var2, Result);
+ btS32: var1^.ts32 := var1^.ts32 and Getint(Var2, Result);
+ btEnum: var1^.ts32 := var1^.ts32 and Getint(Var2, Result);
+ {$IFNDEF PS_NOINT64}btS64: var1^.ts64 := var1^.ts64 and GetInt64(Var2, Result); {$ENDIF}
+ else Result := False;
+ end;
+ end;
+ otor:
+ begin { OR }
+ case Var1.FType.BaseType of
+ btU8: var1^.tu8 := var1^.tu8 or GetUint(Var2, Result);
+ btS8: var1^.ts8 := var1^.ts8 or Getint(Var2, Result);
+ btU16: var1^.tu16 := var1^.tu16 or GetUint(Var2, Result);
+ btS16: var1^.ts16 := var1^.ts16 or Getint(Var2, Result);
+ btU32: var1^.tu32 := var1^.tu32 or GetUint(Var2, Result);
+ btS32: var1^.ts32 := var1^.ts32 or Getint(Var2, Result);
+ {$IFNDEF PS_NOINT64}btS64: var1^.ts64 := var1^.ts64 or GetInt64(Var2, Result); {$ENDIF}
+ btEnum: var1^.ts32 := var1^.ts32 or Getint(Var2, Result);
+ else Result := False;
+ end;
+ end;
+ otxor:
+ begin { XOR }
+ case Var1.FType.BaseType of
+ btU8: var1^.tu8 := var1^.tu8 xor GetUint(Var2, Result);
+ btS8: var1^.ts8 := var1^.ts8 xor Getint(Var2, Result);
+ btU16: var1^.tu16 := var1^.tu16 xor GetUint(Var2, Result);
+ btS16: var1^.ts16 := var1^.ts16 xor Getint(Var2, Result);
+ btU32: var1^.tu32 := var1^.tu32 xor GetUint(Var2, Result);
+ btS32: var1^.ts32 := var1^.ts32 xor Getint(Var2, Result);
+ {$IFNDEF PS_NOINT64}btS64: var1^.ts64 := var1^.ts64 xor GetInt64(Var2, Result); {$ENDIF}
+ btEnum: var1^.ts32 := var1^.ts32 xor Getint(Var2, Result);
+ else Result := False;
+ end;
+ end;
+ otGreaterEqual:
+ begin { >= }
+ case Var1.FType.BaseType of
+ btU8: b := var1^.tu8 >= GetUint(Var2, Result);
+ btS8: b := var1^.ts8 >= Getint(Var2, Result);
+ btU16: b := var1^.tu16 >= GetUint(Var2, Result);
+ btS16: b := var1^.ts16 >= Getint(Var2, Result);
+ btU32: b := var1^.tu32 >= GetUint(Var2, Result);
+ btS32: b := var1^.ts32 >= Getint(Var2, Result);
+ {$IFNDEF PS_NOINT64}btS64: b := var1^.ts64 >= GetInt64(Var2, Result); {$ENDIF}
+ btSingle: b := var1^.tsingle >= GetReal( Var2, Result);
+ btDouble: b := var1^.tdouble >= GetReal( Var2, Result);
+ btExtended: b := var1^.textended >= GetReal( Var2, Result);
+ btCurrency: b := var1^.tcurrency >= GetReal( Var2, Result);
+ btSet:
+ begin
+ if (var1.FType = var2.FType) then
+ begin
+ Set_Subset(var2.tstring, var1.tstring, TPSSetType(var1.FType).ByteSize, b);
+ end else Result := False;
+ end;
+ else
+ Result := False;
+ end;
+ ConvertToBoolean(Self, FUseUsedTypes, Var1, b);
+ end;
+ otLessEqual:
+ begin { <= }
+ case Var1.FType.BaseType of
+ btU8: b := var1^.tu8 <= GetUint(Var2, Result);
+ btS8: b := var1^.ts8 <= Getint(Var2, Result);
+ btU16: b := var1^.tu16 <= GetUint(Var2, Result);
+ btS16: b := var1^.ts16 <= Getint(Var2, Result);
+ btU32: b := var1^.tu32 <= GetUint(Var2, Result);
+ btS32: b := var1^.ts32 <= Getint(Var2, Result);
+ {$IFNDEF PS_NOINT64}btS64: b := var1^.ts64 <= GetInt64(Var2, Result); {$ENDIF}
+ btSingle: b := var1^.tsingle <= GetReal( Var2, Result);
+ btDouble: b := var1^.tdouble <= GetReal( Var2, Result);
+ btExtended: b := var1^.textended <= GetReal( Var2, Result);
+ btCurrency: b := var1^.tcurrency <= GetReal( Var2, Result);
+ btSet:
+ begin
+ if (var1.FType = var2.FType) then
+ begin
+ Set_Subset(var1.tstring, var2.tstring, TPSSetType(var1.FType).ByteSize, b);
+ end else Result := False;
+ end;
+ else
+ Result := False;
+ end;
+ ConvertToBoolean(Self, FUseUsedTypes, Var1, b);
+ end;
+ otGreater:
+ begin { > }
+ case Var1.FType.BaseType of
+ btU8: b := var1^.tu8 > GetUint(Var2, Result);
+ btS8: b := var1^.ts8 > Getint(Var2, Result);
+ btU16: b := var1^.tu16 > GetUint(Var2, Result);
+ btS16: b := var1^.ts16 > Getint(Var2, Result);
+ btU32: b := var1^.tu32 > GetUint(Var2, Result);
+ btS32: b := var1^.ts32 > Getint(Var2, Result);
+ {$IFNDEF PS_NOINT64}btS64: b := var1^.ts64 > GetInt64(Var2, Result); {$ENDIF}
+ btSingle: b := var1^.tsingle > GetReal( Var2, Result);
+ btDouble: b := var1^.tdouble > GetReal( Var2, Result);
+ btExtended: b := var1^.textended > GetReal( Var2, Result);
+ btCurrency: b := var1^.tcurrency > GetReal( Var2, Result);
+ else
+ Result := False;
+ end;
+ ConvertToBoolean(Self, FUseUsedTypes, Var1, b);
+ end;
+ otLess:
+ begin { < }
+ case Var1.FType.BaseType of
+ btU8: b := var1^.tu8 < GetUint(Var2, Result);
+ btS8: b := var1^.ts8 < Getint(Var2, Result);
+ btU16: b := var1^.tu16 < GetUint(Var2, Result);
+ btS16: b := var1^.ts16 < Getint(Var2, Result);
+ btU32: b := var1^.tu32 < GetUint(Var2, Result);
+ btS32: b := var1^.ts32 < Getint(Var2, Result);
+ {$IFNDEF PS_NOINT64}btS64: b := var1^.ts64 < GetInt64(Var2, Result); {$ENDIF}
+ btSingle: b := var1^.tsingle < GetReal( Var2, Result);
+ btDouble: b := var1^.tdouble < GetReal( Var2, Result);
+ btExtended: b := var1^.textended < GetReal( Var2, Result);
+ btCurrency: b := var1^.tcurrency < GetReal( Var2, Result);
+ else
+ Result := False;
+ end;
+ ConvertToBoolean(Self, FUseUsedTypes, Var1, b);
+ end;
+ otNotEqual:
+ begin { <> }
+ case Var1.FType.BaseType of
+ btU8: b := var1^.tu8 <> GetUint(Var2, Result);
+ btS8: b := var1^.ts8 <> Getint(Var2, Result);
+ btU16: b := var1^.tu16 <> GetUint(Var2, Result);
+ btS16: b := var1^.ts16 <> Getint(Var2, Result);
+ btU32: b := var1^.tu32 <> GetUint(Var2, Result);
+ {$IFNDEF PS_NOINT64}btS64: b := var1^.ts64 <> GetInt64(Var2, Result); {$ENDIF}
+ btS32: b := var1^.ts32 <> Getint(Var2, Result);
+ btSingle: b := var1^.tsingle <> GetReal( Var2, Result);
+ btDouble: b := var1^.tdouble <> GetReal( Var2, Result);
+ btExtended: b := var1^.textended <> GetReal( Var2, Result);
+ btCurrency: b := var1^.tcurrency <> GetReal( Var2, Result);
+ btEnum: b := var1^.ts32 <> Getint(Var2, Result);
+ btString: b := tbtstring(var1^.tstring) <> GetString(var2, Result);
+ btChar: b := var1^.tchar <> GetString(var2, Result);
+ {$IFNDEF PS_NOWIDESTRING}
+ btWideString: b := tbtWideString(var1^.twidestring) <> GetWideString(var2, Result);
+ btWideChar: b := var1^.twidechar <> GetWideString(var2, Result);
+ {$ENDIF}
+ btSet:
+ begin
+ if (var1.FType = var2.FType) then
+ begin
+ Set_Equal(var1.tstring, var2.tstring, TPSSetType(var1.FType).GetByteSize, b);
+ b := not b;
+ end else Result := False;
+ end;
+ else
+ Result := False;
+ end;
+ ConvertToBoolean(Self, FUseUsedTypes, Var1, b);
+ end;
+ otEqual:
+ begin { = }
+ case Var1.FType.BaseType of
+ btU8: b := var1^.tu8 = GetUint(Var2, Result);
+ btS8: b := var1^.ts8 = Getint(Var2, Result);
+ btU16: b := var1^.tu16 = GetUint(Var2, Result);
+ btS16: b := var1^.ts16 = Getint(Var2, Result);
+ btU32: b := var1^.tu32 = GetUint(Var2, Result);
+ btS32: b := var1^.ts32 = Getint(Var2, Result);
+ {$IFNDEF PS_NOINT64}btS64: b := var1^.ts64 = GetInt64(Var2, Result); {$ENDIF}
+ btSingle: b := var1^.tsingle = GetReal( Var2, Result);
+ btDouble: b := var1^.tdouble = GetReal( Var2, Result);
+ btExtended: b := var1^.textended = GetReal( Var2, Result);
+ btCurrency: b := var1^.tcurrency = GetReal( Var2, Result);
+ btEnum: b := var1^.ts32 = Getint(Var2, Result);
+ btString: b := tbtstring(var1^.tstring) = GetString(var2, Result);
+ btChar: b := var1^.tchar = GetString(var2, Result);
+ {$IFNDEF PS_NOWIDESTRING}
+ btWideString: b := tbtWideString(var1^.twidestring) = GetWideString(var2, Result);
+ btWideChar: b := var1^.twidechar = GetWideString(var2, Result);
+ {$ENDIF}
+ btSet:
+ begin
+ if (var1.FType = var2.FType) then
+ begin
+ Set_Equal(var1.tstring, var2.tstring, TPSSetType(var1.FType).ByteSize, b);
+ end else Result := False;
+ end;
+ else
+ Result := False;
+ end;
+ ConvertToBoolean(Self, FUseUsedTypes, Var1, b);
+ end;
+ otIn:
+ begin
+ if (var2.Ftype.BaseType = btset) and (TPSSetType(var2).SetType = Var1.FType) then
+ begin
+ Set_membership(GetUint(var1, result), var2.tstring, b);
+ end else Result := False;
+ end;
+ else
+ Result := False;
+ end;
+ except
+ on E: EDivByZero do
+ begin
+ Result := False;
+ MakeError('', ecDivideByZero, '');
+ Exit;
+ end;
+ on E: EZeroDivide do
+ begin
+ Result := False;
+ MakeError('', ecDivideByZero, '');
+ Exit;
+ end;
+ on E: EMathError do
+ begin
+ Result := False;
+ MakeError('', ecMathError, e.Message);
+ Exit;
+ end;
+ on E: Exception do
+ begin
+ Result := False;
+ MakeError('', ecInternalError, E.Message);
+ Exit;
+ end;
+ end;
+ if not Result then
+ begin
+ with MakeError('', ecTypeMismatch, '') do
+ begin
+ FPosition := Pos;
+ FRow := Row;
+ FCol := Col;
+ end;
+ end;
+end;
+
+function TPSPascalCompiler.IsDuplicate(const s: string; const check: TPSDuplicCheck): Boolean;
+var
+ h, l: Longint;
+ x: TPSProcedure;
+begin
+ h := MakeHash(s);
+ if (s = 'RESULT') then
+ begin
+ Result := True;
+ exit;
+ end;
+ if dcTypes in Check then
+ for l := FTypes.Count - 1 downto 0 do
+ begin
+ if (TPSType(FTypes.Data[l]).NameHash = h) and
+ (TPSType(FTypes.Data[l]).Name = s) then
+ begin
+ Result := True;
+ exit;
+ end;
+ end;
+
+ if dcProcs in Check then
+ for l := FProcs.Count - 1 downto 0 do
+ begin
+ x := FProcs.Data[l];
+ if x.ClassType = TPSInternalProcedure then
+ begin
+ if (h = TPSInternalProcedure(x).NameHash) and (s = TPSInternalProcedure(x).Name) then
+ begin
+ Result := True;
+ exit;
+ end;
+ end
+ else
+ begin
+ if (TPSExternalProcedure(x).RegProc.NameHash = h) and
+ (TPSExternalProcedure(x).RegProc.Name = s) then
+ begin
+ Result := True;
+ exit;
+ end;
+ end;
+ end;
+ if dcVars in Check then
+ for l := FVars.Count - 1 downto 0 do
+ begin
+ if (TPSVar(FVars.Data[l]).NameHash = h) and
+ (TPSVar(FVars.Data[l]).Name = s) then
+ begin
+ Result := True;
+ exit;
+ end;
+ end;
+ if dcConsts in Check then
+ for l := FConstants.Count -1 downto 0 do
+ begin
+ if (TPSConstant(FConstants.Data[l]).NameHash = h) and
+ (TPSConstant(FConstants.Data[l]).Name = s) then
+ begin
+ Result := TRue;
+ exit;
+ end;
+ end;
+ Result := False;
+end;
+
+procedure ClearRecSubVals(RecSubVals: TPSList);
+var
+ I: Longint;
+begin
+ for I := 0 to RecSubVals.Count - 1 do
+ TPSRecordFieldTypeDef(RecSubVals[I]).Free;
+ RecSubVals.Free;
+end;
+
+function TPSPascalCompiler.ReadTypeAddProcedure(const Name: string; FParser: TPSPascalParser): TPSType;
+var
+ IsFunction: Boolean;
+ VNames: string;
+ modifier: TPSParameterMode;
+ Decl: TPSParametersDecl;
+ VCType: TPSType;
+begin
+ if FParser.CurrTokenId = CSTII_Function then
+ IsFunction := True
+ else
+ IsFunction := False;
+ Decl := TPSParametersDecl.Create;
+ try
+ FParser.Next;
+ if FParser.CurrTokenId = CSTI_OpenRound then
+ begin
+ FParser.Next;
+ if FParser.CurrTokenId <> CSTI_CloseRound then
+ begin
+ while True do
+ begin
+ if FParser.CurrTokenId = CSTII_Const then
+ begin
+ Modifier := pmIn;
+ FParser.Next;
+ end else
+ if FParser.CurrTokenId = CSTII_Out then
+ begin
+ Modifier := pmOut;
+ FParser.Next;
+ end else
+ if FParser.CurrTokenId = CSTII_Var then
+ begin
+ modifier := pmInOut;
+ FParser.Next;
+ end
+ else
+ modifier := pmIn;
+ if FParser.CurrTokenId <> CSTI_Identifier then
+ begin
+ Result := nil;
+ if FParser = Self.FParser then
+ MakeError('', ecIdentifierExpected, '');
+ exit;
+ end;
+ VNames := FParser.OriginalToken + '|';
+ FParser.Next;
+ while FParser.CurrTokenId = CSTI_Comma do
+ begin
+ FParser.Next;
+ if FParser.CurrTokenId <> CSTI_Identifier then
+ begin
+ Result := nil;
+ if FParser = Self.FParser then
+ MakeError('', ecIdentifierExpected, '');
+ exit;
+ end;
+ VNames := VNames + FParser.GetToken + '|';
+ FParser.Next;
+ end;
+ if FParser.CurrTokenId <> CSTI_Colon then
+ begin
+ Result := nil;
+ if FParser = Self.FParser then
+ MakeError('', ecColonExpected, '');
+ exit;
+ end;
+ FParser.Next;
+ if FParser.CurrTokenId <> CSTI_Identifier then
+ begin
+ Result := nil;
+ if FParser = self.FParser then
+ MakeError('', ecIdentifierExpected, '');
+ exit;
+ end;
+ VCType := FindType(FParser.GetToken);
+ if VCType = nil then
+ begin
+ if FParser = self.FParser then
+ MakeError('', ecUnknownIdentifier, FParser.OriginalToken);
+ Result := nil;
+ exit;
+ end;
+ while Pos('|', VNames) > 0 do
+ begin
+ with Decl.AddParam do
+ begin
+ Mode := modifier;
+ OrgName := copy(VNames, 1, Pos('|', VNames) - 1);
+ FType := VCType;
+ end;
+ Delete(VNames, 1, Pos('|', VNames));
+ end;
+ FParser.Next;
+ if FParser.CurrTokenId = CSTI_CloseRound then
+ break;
+ if FParser.CurrTokenId <> CSTI_Semicolon then
+ begin
+ if FParser = Self.FParser then
+ MakeError('', ecSemicolonExpected, '');
+ Result := nil;
+ exit;
+ end;
+ FParser.Next;
+ end; {while}
+ end; {if}
+ FParser.Next;
+ end; {if}
+ if IsFunction then
+ begin
+ if FParser.CurrTokenId <> CSTI_Colon then
+ begin
+ if FParser = Self.FParser then
+ MakeError('', ecColonExpected, '');
+ Result := nil;
+ exit;
+ end;
+ FParser.Next;
+ if FParser.CurrTokenId <> CSTI_Identifier then
+ begin
+ Result := nil;
+ if FParser = Self.FParser then
+ MakeError('', ecIdentifierExpected, '');
+ exit;
+ end;
+ VCType := self.FindType(FParser.GetToken);
+ if VCType = nil then
+ begin
+ if FParser = self.FParser then
+ MakeError('', ecUnknownIdentifier, FParser.OriginalToken);
+ Result := nil;
+ exit;
+ end;
+ FParser.Next;
+ end
+ else
+ VCType := nil;
+ Decl.Result := VcType;
+ VCType := TPSProceduralType.Create;
+ VCType.Name := FastUppercase(Name);
+ VCType.OriginalName := Name;
+ VCType.BaseType := btProcPtr;
+ {$IFDEF PS_USESSUPPORT}
+ VCType.DeclareUnit:=fModule;
+ {$ENDIF}
+ VCType.DeclarePos := FParser.CurrTokenPos;
+ VCType.DeclareRow := FParser.Row;
+ VCType.DeclareCol := FParser.Col;
+ TPSProceduralType(VCType).ProcDef.Assign(Decl);
+ FTypes.Add(VCType);
+ Result := VCType;
+ finally
+ Decl.Free;
+ end;
+end; {ReadTypeAddProcedure}
+
+
+function TPSPascalCompiler.ReadType(const Name: string; FParser: TPSPascalParser): TPSType; // InvalidVal = Invalid
+var
+ TypeNo: TPSType;
+ h, l: Longint;
+ FieldName,fieldorgname,s: string;
+ RecSubVals: TPSList;
+ FArrayStart, FArrayLength: Longint;
+ rvv: PIFPSRecordFieldTypeDef;
+ p, p2: TPSType;
+ tempf: PIfRVariant;
+
+begin
+ if (FParser.CurrTokenID = CSTII_Function) or (FParser.CurrTokenID = CSTII_Procedure) then
+ begin
+ Result := ReadTypeAddProcedure(Name, FParser);
+ Exit;
+ end else if FParser.CurrTokenId = CSTII_Set then
+ begin
+ FParser.Next;
+ if FParser.CurrTokenId <> CSTII_Of then
+ begin
+ MakeError('', ecOfExpected, '');
+ Result := nil;
+ Exit;
+ end;
+ FParser.Next;
+ if FParser.CurrTokenID <> CSTI_Identifier then
+ begin
+ MakeError('', ecIdentifierExpected, '');
+ Result := nil;
+ exit;
+ end;
+ TypeNo := FindType(FParser.GetToken);
+ if TypeNo = nil then
+ begin
+ MakeError('', ecUnknownIdentifier, '');
+ Result := nil;
+ exit;
+ end;
+ if (TypeNo.BaseType = btEnum) or (TypeNo.BaseType = btChar) or (TypeNo.BaseType = btU8) then
+ begin
+ FParser.Next;
+ p2 := TPSSetType.Create;
+ p2.Name := FastUppercase(Name);
+ p2.OriginalName := Name;
+ p2.BaseType := btSet;
+ {$IFDEF PS_USESSUPPORT}
+ p2.DeclareUnit:=fModule;
+ {$ENDIF}
+ p2.DeclarePos := FParser.CurrTokenPos;
+ p2.DeclareRow := FParser.Row;
+ p2.DeclareCol := FParser.Col;
+ TPSSetType(p2).SetType := TypeNo;
+ FTypes.Add(p2);
+ Result := p2;
+ end else
+ begin
+ MakeError('', ecTypeMismatch, '');
+ Result := nil;
+ end;
+ exit;
+ end else if FParser.CurrTokenId = CSTI_OpenRound then
+ begin
+ FParser.Next;
+ L := 0;
+ P2 := TPSEnumType.Create;
+ P2.Name := FastUppercase(Name);
+ p2.OriginalName := Name;
+ p2.BaseType := btEnum;
+ {$IFDEF PS_USESSUPPORT}
+ p2.DeclareUnit:=fModule;
+ {$ENDIF}
+ p2.DeclarePos := FParser.CurrTokenPos;
+ p2.DeclareRow := FParser.Row;
+ p2.DeclareCol := FParser.Col;
+ FTypes.Add(p2);
+
+ repeat
+ if FParser.CurrTokenId <> CSTI_Identifier then
+ begin
+ if FParser = Self.FParser then
+ MakeError('', ecIdentifierExpected, '');
+ Result := nil;
+ exit;
+ end;
+ s := FParser.OriginalToken;
+ if IsDuplicate(FastUppercase(s), [dcTypes]) then
+ begin
+ if FParser = Self.FParser then
+ MakeError('', ecDuplicateIdentifier, s);
+ Result := nil;
+ Exit;
+ end;
+ with AddConstant(s, p2) do
+ begin
+ FValue.tu32 := L;
+ {$IFDEF PS_USESSUPPORT}
+ DeclareUnit:=fModule;
+ {$ENDIF}
+ DeclarePos:=FParser.CurrTokenPos;
+ DeclareRow:=FParser.Row;
+ DeclareCol:=FParser.Col;
+ end;
+ Inc(L);
+ FParser.Next;
+ if FParser.CurrTokenId = CSTI_CloseRound then
+ Break
+ else if FParser.CurrTokenId <> CSTI_Comma then
+ begin
+ if FParser = Self.FParser then
+ MakeError('', ecCloseRoundExpected, '');
+ Result := nil;
+ Exit;
+ end;
+ FParser.Next;
+ until False;
+ FParser.Next;
+ TPSEnumType(p2).HighValue := L-1;
+ Result := p2;
+ exit;
+ end else
+ if FParser.CurrTokenId = CSTII_Array then
+ begin
+ FParser.Next;
+ if FParser.CurrTokenID = CSTI_OpenBlock then
+ begin
+ FParser.Next;
+ tempf := ReadConstant(FParser, CSTI_TwoDots);
+ if tempf = nil then
+ begin
+ Result := nil;
+ exit;
+ end;
+ case tempf.FType.BaseType of
+ btU8: FArrayStart := tempf.tu8;
+ btS8: FArrayStart := tempf.ts8;
+ btU16: FArrayStart := tempf.tu16;
+ btS16: FArrayStart := tempf.ts16;
+ btU32: FArrayStart := tempf.tu32;
+ btS32: FArrayStart := tempf.ts32;
+ {$IFNDEF PS_NOINT64}
+ bts64: FArrayStart := tempf.ts64;
+ {$ENDIF}
+ else
+ begin
+ DisposeVariant(tempf);
+ MakeError('', ecTypeMismatch, '');
+ Result := nil;
+ exit;
+ end;
+ end;
+ DisposeVariant(tempf);
+ if FParser.CurrTokenID <> CSTI_TwoDots then
+ begin
+ MakeError('', ecPeriodExpected, '');
+ Result := nil;
+ exit;
+ end;
+ FParser.Next;
+ tempf := ReadConstant(FParser, CSTI_CloseBlock);
+ if tempf = nil then
+ begin
+ Result := nil;
+ exit;
+ end;
+ case tempf.FType.BaseType of
+ btU8: FArrayLength := tempf.tu8;
+ btS8: FArrayLength := tempf.ts8;
+ btU16: FArrayLength := tempf.tu16;
+ btS16: FArrayLength := tempf.ts16;
+ btU32: FArrayLength := tempf.tu32;
+ btS32: FArrayLength := tempf.ts32;
+ {$IFNDEF PS_NOINT64}
+ bts64: FArrayLength := tempf.ts64;
+ {$ENDIF}
+ else
+ DisposeVariant(tempf);
+ MakeError('', ecTypeMismatch, '');
+ Result := nil;
+ exit;
+ end;
+ DisposeVariant(tempf);
+ FArrayLength := FArrayLength - FArrayStart + 1;
+ if (FArrayLength < 0) or (FArrayLength > MaxInt div 4) then
+ begin
+ MakeError('', ecTypeMismatch, '');
+ Result := nil;
+ exit;
+ end;
+ if FParser.CurrTokenID <> CSTI_CloseBlock then
+ begin
+ MakeError('', ecCloseBlockExpected, '');
+ Result := nil;
+ exit;
+ end;
+ FParser.Next;
+ end else
+ begin
+ FArrayStart := 0;
+ FArrayLength := -1;
+ end;
+ if FParser.CurrTokenId <> CSTII_Of then
+ begin
+ if FParser = Self.FParser then
+ MakeError('', ecOfExpected, '');
+ Result := nil;
+ exit;
+ end;
+ FParser.Next;
+ TypeNo := ReadType('', FParser);
+ if TypeNo = nil then
+ begin
+ if FParser = Self.FParser then
+ MakeError('', ecUnknownIdentifier, '');
+ Result := nil;
+ exit;
+ end;
+ if (Name = '') and (FArrayLength = -1) then
+ begin
+ if TypeNo.Used then
+ begin
+ for h := 0 to FTypes.Count -1 do
+ begin
+ p := FTypes[H];
+ if (p.BaseType = btArray) and (TPSArrayType(p).ArrayTypeNo = TypeNo) and (Copy(p.Name, 1, 1) <> '!') then
+ begin
+ Result := p;
+ exit;
+ end;
+ end;
+ end;
+ end;
+ if FArrayLength <> -1 then
+ begin
+ p := TPSStaticArrayType.Create;
+ TPSStaticArrayType(p).StartOffset := FArrayStart;
+ TPSStaticArrayType(p).Length := FArrayLength;
+ p.BaseType := btStaticArray;
+ end else
+ begin
+ p := TPSArrayType.Create;
+ p.BaseType := btArray;
+ end;
+ p.Name := FastUppercase(Name);
+ p.OriginalName := Name;
+ {$IFDEF PS_USESSUPPORT}
+ p.DeclareUnit:=fModule;
+ {$ENDIF}
+ p.DeclarePos := FParser.CurrTokenPos;
+ p.DeclareRow := FParser.Row;
+ p.DeclareCol := FParser.Col;
+ TPSArrayType(p).ArrayTypeNo := TypeNo;
+ FTypes.Add(p);
+ Result := p;
+ Exit;
+ end
+ else if FParser.CurrTokenId = CSTII_Record then
+ begin
+ FParser.Next;
+ RecSubVals := TPSList.Create;
+ repeat
+ repeat
+ if FParser.CurrTokenId <> CSTI_Identifier then
+ begin
+ ClearRecSubVals(RecSubVals);
+ if FParser = Self.FParser then
+ MakeError('', ecIdentifierExpected, '');
+ Result := nil;
+ exit;
+ end;
+ FieldName := FParser.GetToken;
+ s := S+FParser.OriginalToken+'|';
+ FParser.Next;
+ h := MakeHash(FieldName);
+ for l := 0 to RecSubVals.Count - 1 do
+ begin
+ if (PIFPSRecordFieldTypeDef(RecSubVals[l]).FieldNameHash = h) and
+ (PIFPSRecordFieldTypeDef(RecSubVals[l]).FieldName = FieldName) then
+ begin
+ if FParser = Self.FParser then
+ MakeError('', ecDuplicateIdentifier, FParser.OriginalToken);
+ ClearRecSubVals(RecSubVals);
+ Result := nil;
+ exit;
+ end;
+ end;
+ if FParser.CurrTokenID = CSTI_Colon then Break else
+ if FParser.CurrTokenID <> CSTI_Comma then
+ begin
+ if FParser = Self.FParser then
+ MakeError('', ecColonExpected, '');
+ ClearRecSubVals(RecSubVals);
+ Result := nil;
+ exit;
+ end;
+ FParser.Next;
+ until False;
+ FParser.Next;
+ p := ReadType('', FParser);
+ if p = nil then
+ begin
+ ClearRecSubVals(RecSubVals);
+ Result := nil;
+ exit;
+ end;
+ p := GetTypeCopyLink(p);
+ if FParser.CurrTokenId <> CSTI_Semicolon then
+ begin
+ ClearRecSubVals(RecSubVals);
+ if FParser = Self.FParser then
+ MakeError('', ecSemicolonExpected, '');
+ Result := nil;
+ exit;
+ end; {if}
+ FParser.Next;
+ while Pos('|', s) > 0 do
+ begin
+ fieldorgname := copy(s, 1, pos('|', s)-1);
+ Delete(s, 1, length(FieldOrgName)+1);
+ rvv := TPSRecordFieldTypeDef.Create;
+ rvv.FieldOrgName := fieldorgname;
+ rvv.FType := p;
+ RecSubVals.Add(rvv);
+ end;
+ until FParser.CurrTokenId = CSTII_End;
+ FParser.Next; // skip CSTII_End
+ P := TPSRecordType.Create;
+ p.Name := FastUppercase(Name);
+ p.OriginalName := Name;
+ p.BaseType := btRecord;
+ {$IFDEF PS_USESSUPPORT}
+ p.DeclareUnit:=fModule;
+ {$ENDIF}
+ p.DeclarePos := FParser.CurrTokenPos;
+ p.DeclareRow := FParser.Row;
+ p.DeclareCol := FParser.Col;
+ for l := 0 to RecSubVals.Count -1 do
+ begin
+ rvv := RecSubVals[l];
+ with TPSRecordType(p).AddRecVal do
+ begin
+ FieldOrgName := rvv.FieldOrgName;
+ FType := rvv.FType;
+ end;
+ rvv.Free;
+ end;
+ RecSubVals.Free;
+ FTypes.Add(p);
+ Result := p;
+ Exit;
+ end else if FParser.CurrTokenId = CSTI_Identifier then
+ begin
+ s := FParser.GetToken;
+ h := MakeHash(s);
+ Typeno := nil;
+ for l := 0 to FTypes.Count - 1 do
+ begin
+ p2 := FTypes[l];
+ if (p2.NameHash = h) and (p2.Name = s) then
+ begin
+ FParser.Next;
+ Typeno := GetTypeCopyLink(p2);
+ Break;
+ end;
+ end;
+ if Typeno = nil then
+ begin
+ Result := nil;
+ if FParser = Self.FParser then
+ MakeError('', ecUnknownType, FParser.OriginalToken);
+ exit;
+ end;
+ if Name <> '' then
+ begin
+ p := TPSTypeLink.Create;
+ p.Name := FastUppercase(Name);
+ p.OriginalName := Name;
+ p.BaseType := BtTypeCopy;
+ {$IFDEF PS_USESSUPPORT}
+ p.DeclareUnit:=fModule;
+ {$ENDIF}
+ p.DeclarePos := FParser.CurrTokenPos;
+ p.DeclareRow := FParser.Row;
+ p.DeclareCol := FParser.Col;
+ TPSTypeLink(p).LinkTypeNo := TypeNo;
+ FTypes.Add(p);
+ Result := p;
+ Exit;
+ end else
+ begin
+ Result := TypeNo;
+ exit;
+ end;
+ end;
+ Result := nil;
+ if FParser = Self.FParser then
+ MakeError('', ecIdentifierExpected, '');
+ Exit;
+end;
+
+function TPSPascalCompiler.VarIsDuplicate(Proc: TPSInternalProcedure; const Varnames, s: string): Boolean;
+var
+ h, l: Longint;
+ x: TPSProcedure;
+ v: string;
+begin
+ h := MakeHash(s);
+ if (s = 'RESULT') then
+ begin
+ Result := True;
+ exit;
+ end;
+
+ for l := FProcs.Count - 1 downto 0 do
+ begin
+ x := FProcs.Data[l];
+ if x.ClassType = TPSInternalProcedure then
+ begin
+ if (h = TPSInternalProcedure(x).NameHash) and (s = TPSInternalProcedure(x).Name) then
+ begin
+ Result := True;
+ exit;
+ end;
+ end
+ else
+ begin
+ if (TPSExternalProcedure(x).RegProc.NameHash = h) and (TPSExternalProcedure(x).RegProc.Name = s) then
+ begin
+ Result := True;
+ exit;
+ end;
+ end;
+ end;
+ if proc <> nil then
+ begin
+ for l := proc.ProcVars.Count - 1 downto 0 do
+ begin
+ if (PIFPSProcVar(proc.ProcVars.Data[l]).NameHash = h) and
+ (PIFPSProcVar(proc.ProcVars.Data[l]).Name = s) then
+ begin
+ Result := True;
+ exit;
+ end;
+ end;
+ for l := Proc.FDecl.ParamCount -1 downto 0 do
+ begin
+ if (Proc.FDecl.Params[l].Name = s) then
+ begin
+ Result := True;
+ exit;
+ end;
+ end;
+ end
+ else
+ begin
+ for l := FVars.Count - 1 downto 0 do
+ begin
+ if (TPSVar(FVars.Data[l]).NameHash = h) and
+ (TPSVar(FVars.Data[l]).Name = s) then
+ begin
+ Result := True;
+ exit;
+ end;
+ end;
+ end;
+ v := VarNames;
+ while Pos('|', v) > 0 do
+ begin
+ if copy(v, 1, Pos('|', v) - 1) = s then
+ begin
+ Result := True;
+ exit;
+ end;
+ Delete(v, 1, Pos('|', v));
+ end;
+ for l := FConstants.Count -1 downto 0 do
+ begin
+ if (TPSConstant(FConstants.Data[l]).NameHash = h) and
+ (TPSConstant(FConstants.Data[l]).Name = s) then
+ begin
+ Result := True;
+ exit;
+ end;
+ end;
+ Result := False;
+end;
+
+
+function TPSPascalCompiler.DoVarBlock(proc: TPSInternalProcedure): Boolean;
+var
+ VarName, s: string;
+ VarType: TPSType;
+ VarNo: Cardinal;
+ v: TPSVar;
+ vp: PIFPSProcVar;
+ EPos, ERow, ECol: Integer;
+begin
+ Result := False;
+ FParser.Next; // skip CSTII_Var
+ if FParser.CurrTokenId <> CSTI_Identifier then
+ begin
+ MakeError('', ecIdentifierExpected, '');
+ exit;
+ end;
+ repeat
+ if VarIsDuplicate(proc, VarName, FParser.GetToken) then
+ begin
+ MakeError('', ecDuplicateIdentifier, FParser.OriginalToken);
+ exit;
+ end;
+ VarName := FParser.OriginalToken + '|';
+ Varno := 0;
+ if @FOnUseVariable <> nil then
+ begin
+ if Proc <> nil then
+ FOnUseVariable(Self, ivtVariable, Proc.ProcVars.Count + VarNo, FProcs.Count -1, FParser.CurrTokenPos, '')
+ else
+ FOnUseVariable(Self, ivtGlobal, FVars.Count + VarNo, InvalidVal, FParser.CurrTokenPos, '')
+ end;
+ EPos:=FParser.CurrTokenPos;
+ ERow:=FParser.Row;
+ ECol:=FParser.Col;
+ FParser.Next;
+ while FParser.CurrTokenId = CSTI_Comma do
+ begin
+ FParser.Next;
+ if FParser.CurrTokenId <> CSTI_Identifier then
+ begin
+ MakeError('', ecIdentifierExpected, '');
+ end;
+ if VarIsDuplicate(proc, VarName, FParser.GetToken) then
+ begin
+ MakeError('', ecDuplicateIdentifier, FParser.OriginalToken);
+ exit;
+ end;
+ VarName := VarName + FParser.OriginalToken + '|';
+ Inc(varno);
+ if @FOnUseVariable <> nil then
+ begin
+ if Proc <> nil then
+ FOnUseVariable(Self, ivtVariable, Proc.ProcVars.Count + VarNo, FProcs.Count -1, FParser.CurrTokenPos, '')
+ else
+ FOnUseVariable(Self, ivtGlobal, FVars.Count + VarNo, InvalidVal, FParser.CurrTokenPos, '')
+ end;
+ FParser.Next;
+ end;
+ if FParser.CurrTokenId <> CSTI_Colon then
+ begin
+ MakeError('', ecColonExpected, '');
+ exit;
+ end;
+ FParser.Next;
+ VarType := at2ut(ReadType('', FParser));
+ if VarType = nil then
+ begin
+ exit;
+ end;
+ while Pos('|', VarName) > 0 do
+ begin
+ s := copy(VarName, 1, Pos('|', VarName) - 1);
+ Delete(VarName, 1, Pos('|', VarName));
+ if proc = nil then
+ begin
+ v := TPSVar.Create;
+ v.OrgName := s;
+ v.Name := FastUppercase(s);
+ {$IFDEF PS_USESSUPPORT}
+ v.DeclareUnit:=fModule;
+ {$ENDIF}
+ v.DeclarePos := EPos;
+ v.DeclareRow := ERow;
+ v.DeclareCol := ECol;
+ v.FType := VarType;
+ FVars.Add(v);
+ end
+ else
+ begin
+ vp := TPSProcVar.Create;
+ vp.OrgName := s;
+ vp.Name := FastUppercase(s);
+ vp.aType := VarType;
+ {$IFDEF PS_USESSUPPORT}
+ vp.DeclareUnit:=fModule;
+ {$ENDIF}
+ vp.DeclarePos := EPos;
+ vp.DeclareRow := ERow;
+ vp.DeclareCol := ECol;
+ proc.ProcVars.Add(vp);
+ end;
+ end;
+ if FParser.CurrTokenId <> CSTI_Semicolon then
+ begin
+ MakeError('', ecSemicolonExpected, '');
+ exit;
+ end;
+ FParser.Next;
+ until FParser.CurrTokenId <> CSTI_Identifier;
+ Result := True;
+end;
+
+function TPSPascalCompiler.NewProc(const OriginalName, Name: string): TPSInternalProcedure;
+begin
+ Result := TPSInternalProcedure.Create;
+ Result.OriginalName := OriginalName;
+ Result.Name := Name;
+ {$IFDEF PS_USESSUPPORT}
+ Result.DeclareUnit:=fModule;
+ {$ENDIF}
+ Result.DeclarePos := FParser.CurrTokenPos;
+ Result.DeclareRow := FParser.Row;
+ Result.DeclareCol := FParser.Col;
+ FProcs.Add(Result);
+end;
+
+function TPSPascalCompiler.IsProcDuplicLabel(Proc: TPSInternalProcedure; const s: string): Boolean;
+var
+ i: Longint;
+ h: Longint;
+ u: string;
+begin
+ h := MakeHash(s);
+ if s = 'RESULT' then
+ Result := True
+ else if Proc.Name = s then
+ Result := True
+ else if IsDuplicate(s, [dcVars, dcConsts, dcProcs]) then
+ Result := True
+ else
+ begin
+ for i := 0 to Proc.Decl.ParamCount -1 do
+ begin
+ if Proc.Decl.Params[i].Name = s then
+ begin
+ Result := True;
+ exit;
+ end;
+ end;
+ for i := 0 to Proc.ProcVars.Count -1 do
+ begin
+ if (PIFPSProcVar(Proc.ProcVars[I]).NameHash = h) and (PIFPSProcVar(Proc.ProcVars[I]).Name = s) then
+ begin
+ Result := True;
+ exit;
+ end;
+ end;
+ for i := 0 to Proc.FLabels.Count -1 do
+ begin
+ u := Proc.FLabels[I];
+ delete(u, 1, 4);
+ if Longint((@u[1])^) = h then
+ begin
+ delete(u, 1, 4);
+ if u = s then
+ begin
+ Result := True;
+ exit;
+ end;
+ end;
+ end;
+ Result := False;
+ end;
+end;
+
+
+function TPSPascalCompiler.ProcessLabel(Proc: TPSInternalProcedure): Boolean;
+var
+ CurrLabel: string;
+begin
+ FParser.Next;
+ while true do
+ begin
+ if FParser.CurrTokenId <> CSTI_Identifier then
+ begin
+ MakeError('', ecIdentifierExpected, '');
+ Result := False;
+ exit;
+ end;
+ CurrLabel := FParser.GetToken;
+ if IsProcDuplicLabel(Proc, CurrLabel) then
+ begin
+ MakeError('', ecDuplicateIdentifier, CurrLabel);
+ Result := False;
+ exit;
+ end;
+ FParser.Next;
+ Proc.FLabels.Add(#$FF#$FF#$FF#$FF+PS_mi2s(MakeHash(CurrLabel))+CurrLabel);
+ if FParser.CurrTokenId = CSTI_Semicolon then
+ begin
+ FParser.Next;
+ Break;
+ end;
+ if FParser.CurrTokenId <> CSTI_Comma then
+ begin
+ MakeError('', ecCommaExpected, '');
+ Result := False;
+ exit;
+ end;
+ FParser.Next;
+ end;
+ Result := True;
+end;
+
+procedure TPSPascalCompiler.Debug_SavePosition(ProcNo: Cardinal; Proc: TPSInternalProcedure);
+var
+ Row,
+ Col,
+ Pos: Cardinal;
+ s: string;
+begin
+ Row := FParser.Row;
+ Col := FParser.Col;
+ Pos := FParser.CurrTokenPos;
+ {$IFNDEF PS_USESSUPPORT}
+ s := '';
+ {$ELSE}
+ s := fModule;
+ {$ENDIF}
+ if @FOnTranslateLineInfo <> nil then
+ FOnTranslateLineInfo(Self, Pos, Row, Col, S);
+ {$IFDEF FPC}
+ WriteDebugData(#4 + s + #1);
+ WriteDebugData(Ps_mi2s(ProcNo));
+ WriteDebugData(Ps_mi2s(Length(Proc.Data)));
+ WriteDebugData(Ps_mi2s(Pos));
+ WriteDebugData(Ps_mi2s(Row));
+ WriteDebugData(Ps_mi2s(Col));
+ {$ELSE}
+ WriteDebugData(#4 + s + #1 + PS_mi2s(ProcNo) + PS_mi2s(Length(Proc.Data)) + PS_mi2s(Pos) + PS_mi2s(Row)+ PS_mi2s(Col));
+ {$ENDIF}
+end;
+
+procedure TPSPascalCompiler.Debug_WriteParams(ProcNo: Cardinal; Proc: TPSInternalProcedure);
+var
+ I: Longint;
+ s: string;
+begin
+ s := #2 + PS_mi2s(ProcNo);
+ if Proc.Decl.Result <> nil then
+ begin
+ s := s + 'Result' + #1;
+ end;
+ for i := 0 to Proc.Decl.ParamCount -1 do
+ s := s + Proc.Decl.Params[i].OrgName + #1;
+ s := s + #0#3 + PS_mi2s(ProcNo);
+ for I := 0 to Proc.ProcVars.Count - 1 do
+ begin
+ s := s + PIFPSProcVar(Proc.ProcVars[I]).OrgName + #1;
+ end;
+ s := s + #0;
+ WriteDebugData(s);
+end;
+
+procedure TPSPascalCompiler.CheckForUnusedVars(Func: TPSInternalProcedure);
+var
+ i: Integer;
+ p: PIFPSProcVar;
+begin
+ for i := 0 to Func.ProcVars.Count -1 do
+ begin
+ p := Func.ProcVars[I];
+ if not p.Used then
+ begin
+ with MakeHint({$IFDEF PS_USESSUPPORT}p.DeclareUnit{$ELSE}''{$ENDIF}, ehVariableNotUsed, p.Name) do
+ begin
+ FRow := p.DeclareRow;
+ FCol := p.DeclareCol;
+ FPosition := p.DeclarePos;
+ end;
+ end;
+ end;
+ if (not Func.ResultUsed) and (Func.Decl.Result <> nil) then
+ begin
+ with MakeHint({$IFDEF PS_USESSUPPORT}Func.DeclareUnit{$ELSE}''{$ENDIF}, ehVariableNotUsed, 'Result') do
+ begin
+ FRow := Func.DeclareRow;
+ FCol := Func.DeclareCol;
+ FPosition := Func.DeclarePos;
+ end;
+ end;
+end;
+
+function TPSPascalCompiler.ProcIsDuplic(Decl: TPSParametersDecl; const FunctionName, FunctionParamNames: string; const s: string; Func: TPSInternalProcedure): Boolean;
+var
+ i: Longint;
+ u: string;
+begin
+ if s = 'RESULT' then
+ Result := True
+ else if FunctionName = s then
+ Result := True
+ else
+ begin
+ for i := 0 to Decl.ParamCount -1 do
+ begin
+ if Decl.Params[i].Name = s then
+ begin
+ Result := True;
+ exit;
+ end;
+ GRFW(u);
+ end;
+ u := FunctionParamNames;
+ while Pos('|', u) > 0 do
+ begin
+ if copy(u, 1, Pos('|', u) - 1) = s then
+ begin
+ Result := True;
+ exit;
+ end;
+ Delete(u, 1, Pos('|', u));
+ end;
+ if Func = nil then
+ begin
+ result := False;
+ exit;
+ end;
+ for i := 0 to Func.ProcVars.Count -1 do
+ begin
+ if s = PIFPSProcVar(Func.ProcVars[I]).Name then
+ begin
+ Result := True;
+ exit;
+ end;
+ end;
+ for i := 0 to Func.FLabels.Count -1 do
+ begin
+ u := Func.FLabels[I];
+ delete(u, 1, 4);
+ if u = s then
+ begin
+ Result := True;
+ exit;
+ end;
+ end;
+ Result := False;
+ end;
+end;
+procedure WriteProcVars(Func:TPSInternalProcedure; t: TPSList);
+var
+ l: Longint;
+ v: PIFPSProcVar;
+begin
+ for l := 0 to t.Count - 1 do
+ begin
+ v := t[l];
+ Func.Data := Func.Data + chr(cm_pt)+ PS_mi2s(v.AType.FinalTypeNo);
+ end;
+end;
+
+
+function TPSPascalCompiler.ApplyAttribsToFunction(func: TPSProcedure): boolean;
+var
+ i: Longint;
+begin
+ for i := 0 to Func.Attributes.Count -1 do
+ begin
+ if @Func.Attributes.Items[i].AType.OnApplyAttributeToProc <> nil then
+ begin
+ if not Func.Attributes.Items[i].AType.OnApplyAttributeToProc(Self, Func, Func.Attributes.Items[i]) then
+ begin
+ Result := false;
+ exit;
+ end;
+ end;
+ end;
+ result := true;
+end;
+
+
+function TPSPascalCompiler.ProcessFunction(AlwaysForward: Boolean; Att: TPSAttributes): Boolean;
+var
+ FunctionType: TFuncType;
+ OriginalName, FunctionName: string;
+ FunctionParamNames: string;
+ FunctionTempType: TPSType;
+ ParamNo: Cardinal;
+ FunctionDecl: TPSParametersDecl;
+ modifier: TPSParameterMode;
+ Func: TPSInternalProcedure;
+ F2: TPSProcedure;
+ EPos, ECol, ERow: Cardinal;
+ E2Pos, E2Col, E2Row: Cardinal;
+ pp: TPSRegProc;
+ pp2: TPSExternalProcedure;
+ FuncNo, I: Longint;
+ Block: TPSBlockInfo;
+begin
+ if att = nil then
+ begin
+ Att := TPSAttributes.Create;
+ if not ReadAttributes(Att) then
+ begin
+ att.free;
+ Result := false;
+ exit;
+ end;
+ end;
+
+ if FParser.CurrTokenId = CSTII_Procedure then
+ FunctionType := ftProc
+ else
+ FunctionType := ftFunc;
+ Func := nil;
+ FParser.Next;
+ Result := False;
+ if FParser.CurrTokenId <> CSTI_Identifier then
+ begin
+ MakeError('', ecIdentifierExpected, '');
+ att.free;
+ exit;
+ end;
+ EPos := FParser.CurrTokenPos;
+ ERow := FParser.Row;
+ ECol := FParser.Col;
+ OriginalName := FParser.OriginalToken;
+ FunctionName := FParser.GetToken;
+ FuncNo := -1;
+ for i := 0 to FProcs.Count -1 do
+ begin
+ f2 := FProcs[I];
+ if (f2.ClassType = TPSInternalProcedure) and (TPSInternalProcedure(f2).Name = FunctionName) and (TPSInternalProcedure(f2).Forwarded) then
+ begin
+ Func := FProcs[I];
+ FuncNo := i;
+ Break;
+ end;
+ end;
+ if (Func = nil) and IsDuplicate(FunctionName, [dcTypes, dcProcs, dcVars, dcConsts]) then
+ begin
+ att.free;
+ MakeError('', ecDuplicateIdentifier, FunctionName);
+ exit;
+ end;
+ FParser.Next;
+ FunctionDecl := TPSParametersDecl.Create;
+ try
+ if FParser.CurrTokenId = CSTI_OpenRound then
+ begin
+ FParser.Next;
+ if FParser.CurrTokenId = CSTI_CloseRound then
+ begin
+ FParser.Next;
+ end
+ else
+ begin
+ if FunctionType = ftFunc then
+ ParamNo := 1
+ else
+ ParamNo := 0;
+ while True do
+ begin
+ if FParser.CurrTokenId = CSTII_Const then
+ begin
+ modifier := pmIn;
+ FParser.Next;
+ end
+ else
+ if FParser.CurrTokenId = CSTII_Out then
+ begin
+ modifier := pmOut;
+ FParser.Next;
+ end
+ else
+ if FParser.CurrTokenId = CSTII_Var then
+ begin
+ modifier := pmInOut;
+ FParser.Next;
+ end
+ else
+ modifier := pmIn;
+ if FParser.CurrTokenId <> CSTI_Identifier then
+ begin
+ MakeError('', ecIdentifierExpected, '');
+ exit;
+ end;
+ E2Pos := FParser.CurrTokenPos;
+ E2Row := FParser.Row;
+ E2Col := FParser.Col;
+ if ProcIsDuplic(FunctionDecl, FunctionName, FunctionParamNames, FParser.GetToken, Func) then
+ begin
+ MakeError('', ecDuplicateIdentifier, FParser.OriginalToken);
+ exit;
+ end;
+ FunctionParamNames := FParser.OriginalToken + '|';
+ if @FOnUseVariable <> nil then
+ begin
+ FOnUseVariable(Self, ivtParam, ParamNo, FProcs.Count, FParser.CurrTokenPos, '');
+ end;
+ inc(ParamNo);
+ FParser.Next;
+ while FParser.CurrTokenId = CSTI_Comma do
+ begin
+ FParser.Next;
+ if FParser.CurrTokenId <> CSTI_Identifier then
+ begin
+ MakeError('', ecIdentifierExpected, '');
+ exit;
+ end;
+ if ProcIsDuplic(FunctionDecl, FunctionName, FunctionParamNames, FParser.GetToken, Func) then
+ begin
+ MakeError('', ecDuplicateIdentifier, '');
+ exit;
+ end;
+ if @FOnUseVariable <> nil then
+ begin
+ FOnUseVariable(Self, ivtParam, ParamNo, FProcs.Count, FParser.CurrTokenPos, '');
+ end;
+ inc(ParamNo);
+ FunctionParamNames := FunctionParamNames + FParser.OriginalToken +
+ '|';
+ FParser.Next;
+ end;
+ if FParser.CurrTokenId <> CSTI_Colon then
+ begin
+ MakeError('', ecColonExpected, '');
+ exit;
+ end;
+ FParser.Next;
+ FunctionTempType := at2ut(ReadType('', FParser));
+ if FunctionTempType = nil then
+ begin
+ exit;
+ end;
+ while Pos('|', FunctionParamNames) > 0 do
+ begin
+ with FunctionDecl.AddParam do
+ begin
+ OrgName := copy(FunctionParamNames, 1, Pos('|', FunctionParamNames) - 1);
+ Mode := modifier;
+ aType := FunctionTempType;
+ {$IFDEF PS_USESSUPPORT}
+ DeclareUnit:=fModule;
+ {$ENDIF}
+ DeclarePos:=E2Pos;
+ DeclareRow:=E2Row;
+ DeclareCol:=E2Col;
+ end;
+ Delete(FunctionParamNames, 1, Pos('|', FunctionParamNames));
+ end;
+ if FParser.CurrTokenId = CSTI_CloseRound then
+ break;
+ if FParser.CurrTokenId <> CSTI_Semicolon then
+ begin
+ MakeError('', ecSemicolonExpected, '');
+ exit;
+ end;
+ FParser.Next;
+ end;
+ FParser.Next;
+ end;
+ end;
+ if FunctionType = ftFunc then
+ begin
+ if FParser.CurrTokenId <> CSTI_Colon then
+ begin
+ MakeError('', ecColonExpected, '');
+ exit;
+ end;
+ FParser.Next;
+ FunctionTempType := at2ut(ReadType('', FParser));
+ if FunctionTempType = nil then
+ exit;
+ FunctionDecl.Result := FunctionTempType;
+ end;
+ if FParser.CurrTokenId <> CSTI_Semicolon then
+ begin
+ MakeError('', ecSemicolonExpected, '');
+ exit;
+ end;
+ FParser.Next;
+ if (Func = nil) and (FParser.CurrTokenID = CSTII_External) then
+ begin
+ FParser.Next;
+ if FParser.CurrTokenID <> CSTI_String then
+ begin
+ MakeError('', ecStringExpected, '');
+ exit;
+ end;
+ FunctionParamNames := FParser.GetToken;
+ FunctionParamNames := copy(FunctionParamNames, 2, length(FunctionParamNames) - 2);
+ FParser.Next;
+ if FParser.CurrTokenID <> CSTI_Semicolon then
+ begin
+ MakeError('', ecSemicolonExpected, '');
+ exit;
+ end;
+ FParser.Next;
+ if @FOnExternalProc = nil then
+ begin
+ MakeError('', ecSemicolonExpected, '');
+ exit;
+ end;
+ pp := FOnExternalProc(Self, FunctionDecl, OriginalName, FunctionParamNames);
+ if pp = nil then
+ begin
+ MakeError('', ecCustomError, '');
+ exit;
+ end;
+ pp2 := TPSExternalProcedure.Create;
+ pp2.Attributes.Assign(att, true);
+ pp2.RegProc := pp;
+ FProcs.Add(pp2);
+ FRegProcs.Add(pp);
+ Result := ApplyAttribsToFunction(pp2);
+ Exit;
+ end else if (FParser.CurrTokenID = CSTII_Forward) or AlwaysForward then
+ begin
+ if Func <> nil then
+ begin
+ MakeError('', ecBeginExpected, '');
+ exit;
+ end;
+ if not AlwaysForward then
+ begin
+ FParser.Next;
+ if FParser.CurrTokenID <> CSTI_Semicolon then
+ begin
+ MakeError('', ecSemicolonExpected, '');
+ Exit;
+ end;
+ FParser.Next;
+ end;
+ Func := NewProc(OriginalName, FunctionName);
+ Func.Attributes.Assign(Att, True);
+ Func.Forwarded := True;
+ {$IFDEF PS_USESSUPPORT}
+ Func.FDeclareUnit := fModule;
+ {$ENDIF}
+ Func.FDeclarePos := EPos;
+ Func.FDeclareRow := ERow;
+ Func.FDeclarePos := ECol;
+ Func.Decl.Assign(FunctionDecl);
+ Result := ApplyAttribsToFunction(Func);
+ exit;
+ end;
+ if (Func = nil) then
+ begin
+ Func := NewProc(OriginalName, FunctionName);
+ Func.Attributes.Assign(att, True);
+ Func.Decl.Assign(FunctionDecl);
+ {$IFDEF PS_USESSUPPORT}
+ Func.FDeclareUnit := fModule;
+ {$ENDIF}
+ Func.FDeclarePos := EPos;
+ Func.FDeclareRow := ERow;
+ Func.FDeclareCol := ECol;
+ FuncNo := FProcs.Count -1;
+ if not ApplyAttribsToFunction(Func) then
+ begin
+ result := false;
+ exit;
+ end;
+ end else begin
+ if not FunctionDecl.Same(Func.Decl) then
+ begin
+ MakeError('', ecForwardParameterMismatch, '');
+ Result := false;
+ exit;
+ end;
+ Func.Forwarded := False;
+ end;
+ if FParser.CurrTokenID = CSTII_Export then
+ begin
+ FParser.Next;
+ if FParser.CurrTokenID <> CSTI_Semicolon then
+ begin
+ MakeError('', ecSemicolonExpected, '');
+ exit;
+ end;
+ FParser.Next;
+ end;
+ while FParser.CurrTokenId <> CSTII_Begin do
+ begin
+ if FParser.CurrTokenId = CSTII_Var then
+ begin
+ if not DoVarBlock(Func) then
+ exit;
+ end else if FParser.CurrTokenId = CSTII_Label then
+ begin
+ if not ProcessLabel(Func) then
+ Exit;
+ end else
+ begin
+ MakeError('', ecBeginExpected, '');
+ exit;
+ end;
+ end;
+ Debug_WriteParams(FuncNo, Func);
+ WriteProcVars(Func, Func.ProcVars);
+ Block := TPSBlockInfo.Create(FGlobalBlock);
+ Block.SubType := tProcBegin;
+ Block.ProcNo := FuncNo;
+ Block.Proc := Func;
+ if not ProcessSub(Block) then
+ begin
+ Block.Free;
+ exit;
+ end;
+ Block.Free;
+ CheckForUnusedVars(Func);
+ Result := ProcessLabelForwards(Func);
+ finally
+ FunctionDecl.Free;
+ att.Free;
+ end;
+end;
+
+function GetParamType(BlockInfo: TPSBlockInfo; I: Longint): TPSType;
+begin
+ if BlockInfo.Proc.Decl.Result <> nil then dec(i);
+ if i = -1 then
+ Result := BlockInfo.Proc.Decl.Result
+ else
+ begin
+ Result := BlockInfo.Proc.Decl.Params[i].aType;
+ end;
+end;
+
+function TPSPascalCompiler.GetTypeNo(BlockInfo: TPSBlockInfo; p: TPSValue): TPSType;
+begin
+ if p.ClassType = TPSUnValueOp then
+ Result := TPSUnValueOp(p).aType
+ else if p.ClassType = TPSBinValueOp then
+ Result := TPSBinValueOp(p).aType
+ else if p.ClassType = TPSValueArray then
+ Result := at2ut(FindType('TVariantArray'))
+ else if p.ClassType = TPSValueData then
+ Result := TPSValueData(p).Data.FType
+ else if p is TPSValueProc then
+ Result := TPSValueProc(p).ResultType
+ else if (p is TPSValueVar) and (TPSValueVar(p).RecCount > 0) then
+ Result := TPSValueVar(p).RecItem[TPSValueVar(p).RecCount - 1].aType
+ else if p.ClassType = TPSValueGlobalVar then
+ Result := TPSVar(FVars[TPSValueGlobalVar(p).GlobalVarNo]).FType
+ else if p.ClassType = TPSValueParamVar then
+ Result := GetParamType(BlockInfo, TPSValueParamVar(p).ParamNo)
+ else if p is TPSValueLocalVar then
+ Result := TPSProcVar(BlockInfo.Proc.ProcVars[TPSValueLocalVar(p).LocalVarNo]).AType
+ else if p.classtype = TPSValueReplace then
+ Result := GetTypeNo(BlockInfo, TPSValueReplace(p).NewValue)
+ else
+ Result := nil;
+end;
+
+function TPSPascalCompiler.IsVarInCompatible(ft1, ft2: TPSType): Boolean;
+begin
+ ft1 := GetTypeCopyLink(ft1);
+ ft2 := GetTypeCopyLink(ft2);
+ Result := (ft1 <> ft2) and (ft2 <> nil);
+end;
+
+function TPSPascalCompiler.ValidateParameters(BlockInfo: TPSBlockInfo; Params: TPSParameters; ParamTypes: TPSParametersDecl): boolean;
+var
+ i, c: Longint;
+ pType: TPSType;
+
+begin
+ UseProc(ParamTypes);
+ c := 0;
+ for i := 0 to ParamTypes.ParamCount -1 do
+ begin
+ while (c < Longint(Params.Count)) and (Params[c].Val = nil) do
+ Inc(c);
+ if c >= Longint(Params.Count) then
+ begin
+ MakeError('', ecInvalidnumberOfParameters, '');
+ Result := False;
+ exit;
+ end;
+ Params[c].ExpectedType := ParamTypes.Params[i].aType;
+ Params[c].ParamMode := ParamTypes.Params[i].Mode;
+ if ParamTypes.Params[i].Mode <> pmIn then
+ begin
+ if not (Params[c].Val is TPSValueVar) then
+ begin
+ with MakeError('', ecVariableExpected, '') do
+ begin
+ Row := Params[c].Val.Row;
+ Col := Params[c].Val.Col;
+ Pos := Params[c].Val.Pos;
+ end;
+ result := false;
+ exit;
+ end;
+ PType := Params[c].ExpectedType;
+ if (PType = nil) or ((PType.BaseType = btArray) and (TPSArrayType(PType).ArrayTypeNo = nil) and (GetTypeNo(BlockInfo, Params[c].Val).BaseType = btArray)) then
+ begin
+ Params[c].ExpectedType := GetTypeNo(BlockInfo, Params[c].Val);
+ end else if (PType.BaseType = btArray) and (GetTypeNo(BlockInfo, Params[c].Val).BaseType = btArray) then
+ begin
+ if TPSArrayType(GetTypeNo(BlockInfo, Params[c].Val)).ArrayTypeNo <> TPSArrayType(PType).ArrayTypeNo then
+ begin
+ MakeError('', ecTypeMismatch, '');
+ Result := False;
+ exit;
+ end;
+ end else if IsVarInCompatible(PType, GetTypeNo(BlockInfo, Params[c].Val)) then
+ begin
+ MakeError('', ecTypeMismatch, '');
+ Result := False;
+ exit;
+ end;
+ end;
+ Inc(c);
+ end;
+ for i := c to Params.Count -1 do
+ begin
+ if Params[i].Val <> nil then
+ begin
+ MakeError('', ecInvalidnumberOfParameters, '');
+ Result := False;
+ exit;
+ end;
+ end;
+ Result := true;
+end;
+
+function TPSPascalCompiler.DoTypeBlock(FParser: TPSPascalParser): Boolean;
+var
+ VOrg,VName: string;
+ Attr: TPSAttributes;
+ FType: TPSType;
+ i: Longint;
+begin
+ Result := False;
+ FParser.Next;
+ repeat
+ Attr := TPSAttributes.Create;
+ if not ReadAttributes(Attr) then
+ begin
+ Attr.Free;
+ exit;
+ end;
+ if (FParser.CurrTokenID = CSTII_Procedure) or (FParser.CurrTokenID = CSTII_Function) then
+ begin
+ Result := ProcessFunction(false, Attr);
+ exit;
+ end;
+ if FParser.CurrTokenId <> CSTI_Identifier then
+ begin
+ MakeError('', ecIdentifierExpected, '');
+ Attr.Free;
+ exit;
+ end;
+
+ VName := FParser.GetToken;
+ VOrg := FParser.OriginalToken;
+ if IsDuplicate(VName, [dcTypes, dcProcs, dcVars]) then
+ begin
+ MakeError('', ecDuplicateIdentifier, FParser.OriginalToken);
+ Attr.Free;
+ exit;
+ end;
+
+ FParser.Next;
+ if FParser.CurrTokenId <> CSTI_Equal then
+ begin
+ MakeError('', ecIsExpected, '');
+ Attr.Free;
+ exit;
+ end;
+ FParser.Next;
+ FType := ReadType(VOrg, FParser);
+ if Ftype = nil then
+ begin
+ Attr.Free;
+ Exit;
+ end;
+ FType.Attributes.Assign(Attr, True);
+ for i := 0 to FType.Attributes.Count -1 do
+ begin
+ if @FType.Attributes[i].FAttribType.FAAType <> nil then
+ FType.Attributes[i].FAttribType.FAAType(Self, FType, Attr[i]);
+ end;
+ Attr.Free;
+ if FParser.CurrTokenID <> CSTI_Semicolon then
+ begin
+ MakeError('', ecSemicolonExpected, '');
+ Exit;
+ end;
+ FParser.Next;
+ until (FParser.CurrTokenId <> CSTI_Identifier) and (FParser.CurrTokenID <> CSTI_OpenBlock);
+ Result := True;
+end;
+
+procedure TPSPascalCompiler.Debug_WriteLine(BlockInfo: TPSBlockInfo);
+var
+ b: Boolean;
+begin
+ if @FOnWriteLine <> nil then begin
+ {$IFNDEF PS_USESSUPPORT}
+ b := FOnWriteLine(Self, FParser.CurrTokenPos);
+ {$ELSE}
+ b := FOnWriteLine(Self, FModule, FParser.CurrTokenPos);
+ {$ENDIF}
+ end else
+ b := true;
+ if b then Debug_SavePosition(BlockInfo.ProcNo, BlockInfo.Proc);
+end;
+
+
+function TPSPascalCompiler.ReadReal(const s: string): PIfRVariant;
+var
+ C: Integer;
+begin
+ New(Result);
+ InitializeVariant(Result, FindBaseType(btExtended));
+ Val(s, Result^.textended, C);
+end;
+
+function TPSPascalCompiler.ReadString: PIfRVariant;
+{$IFNDEF PS_NOWIDESTRING}var wchar: Boolean;{$ENDIF}
+
+ function ParseString({$IFNDEF PS_NOWIDESTRING}var res: widestring{$ELSE}var res: string{$ENDIF}): Boolean;
+ var
+ temp3: {$IFNDEF PS_NOWIDESTRING}widestring{$ELSE}string{$ENDIF};
+
+ function ChrToStr(s: string): {$IFNDEF PS_NOWIDESTRING}widechar{$ELSE}char{$ENDIF};
+ var
+ w: Longint;
+ begin
+ Delete(s, 1, 1); {First char : #}
+ w := StrToInt(s);
+ Result := {$IFNDEF PS_NOWIDESTRING}widechar{$ELSE}char{$ENDIF}(w);
+ {$IFNDEF PS_NOWIDESTRING}if w > $FF then wchar := true;{$ENDIF}
+ end;
+
+ function PString(s: string): string;
+ var
+ i: Longint;
+ begin
+ s := copy(s, 2, Length(s) - 2);
+ i := length(s);
+ while i > 0 do
+ begin
+ if (i < length(s)) and (s[i] = #39) and (s[i + 1] = #39) then
+ begin
+ Delete(s, i, 1);
+ dec(i);
+ end;
+ dec(i);
+ end;
+ PString := s;
+ end;
+ var
+ lastwasstring: Boolean;
+ begin
+ temp3 := '';
+ while (FParser.CurrTokenId = CSTI_String) or (FParser.CurrTokenId = CSTI_Char) do
+ begin
+ lastwasstring := FParser.CurrTokenId = CSTI_String;
+ if FParser.CurrTokenId = CSTI_String then
+ begin
+ if UTF8Decode then
+ begin
+ temp3 := temp3 + {$IFNDEF PS_NOWIDESTRING}{$IFDEF DELPHI6UP}System.UTF8Decode{$ENDIF}{$ENDIF}(PString(FParser.GetToken));
+ {$IFNDEF PS_NOWIDESTRING}wchar:=true;{$ENDIF}
+ end else
+ temp3 := temp3 + PString(FParser.GetToken);
+
+ FParser.Next;
+ if FParser.CurrTokenId = CSTI_String then
+ temp3 := temp3 + #39;
+ end {if}
+ else
+ begin
+ temp3 := temp3 + ChrToStr(FParser.GetToken);
+ FParser.Next;
+ end; {else if}
+ if lastwasstring and (FParser.CurrTokenId = CSTI_String) then
+ begin
+ MakeError('', ecSyntaxError, '');
+ result := false;
+ exit;
+ end;
+ end; {while}
+ res := temp3;
+ result := true;
+ end;
+var
+{$IFNDEF PS_NOWIDESTRING}
+ w: widestring;
+{$ENDIF}
+ s: string;
+begin
+ {$IFNDEF PS_NOWIDESTRING}wchar:=false;{$ENDIF}
+ if not ParseString({$IFDEF PS_NOWIDESTRING} s {$ELSE} w {$ENDIF}) then
+ begin
+ result := nil;
+ exit;
+ end;
+{$IFNDEF PS_NOWIDESTRING}
+ if wchar then
+ begin
+ New(Result);
+ if Length(w) = 1 then
+ begin
+ InitializeVariant(Result, at2ut(FindBaseType(btwidechar)));
+ Result^.twidechar := w[1];
+ end else begin
+ InitializeVariant(Result, at2ut(FindBaseType(btwidestring)));
+ tbtwidestring(Result^.twidestring) := w;
+ end;
+ end else begin
+ s := w;
+{$ENDIF}
+ New(Result);
+ if Length(s) = 1 then
+ begin
+ InitializeVariant(Result, at2ut(FindBaseType(btchar)));
+ Result^.tchar := s[1];
+ end else begin
+ InitializeVariant(Result, at2ut(FindBaseType(btstring)));
+ tbtstring(Result^.tstring) := s;
+ end;
+{$IFNDEF PS_NOWIDESTRING}
+ end;
+{$ENDIF}
+end;
+
+
+function TPSPascalCompiler.ReadInteger(const s: string): PIfRVariant;
+var
+ R: {$IFNDEF PS_NOINT64}Int64;{$ELSE}Longint;{$ENDIF}
+begin
+ New(Result);
+{$IFNDEF PS_NOINT64}
+ r := StrToInt64Def(s, 0);
+ if (r >= Low(Integer)) and (r <= High(Integer)) then
+ begin
+ InitializeVariant(Result, at2ut(FindBaseType(bts32)));
+ Result^.ts32 := r;
+ end else if (r <= $FFFFFFFF) then
+ begin
+ InitializeVariant(Result, at2ut(FindBaseType(btu32)));
+ Result^.tu32 := r;
+ end else
+ begin
+ InitializeVariant(Result, at2ut(FindBaseType(bts64)));
+ Result^.ts64 := r;
+ end;
+{$ELSE}
+ r := StrToIntDef(s, 0);
+ InitializeVariant(Result, at2ut(FindBaseType(bts32)));
+ Result^.ts32 := r;
+{$ENDIF}
+end;
+
+function TPSPascalCompiler.ProcessSub(BlockInfo: TPSBlockInfo): Boolean;
+
+ function AllocStackReg2(MType: TPSType): TPSValue;
+ var
+ x: TPSProcVar;
+ begin
+{$IFDEF DEBUG}
+ if (mtype = nil) or (not mtype.Used) then asm int 3; end;
+{$ENDIF}
+ x := TPSProcVar.Create;
+ {$IFDEF PS_USESSUPPORT}
+ x.DeclareUnit:=fModule;
+ {$ENDIF}
+ x.DeclarePos := FParser.CurrTokenPos;
+ x.DeclareRow := FParser.Row;
+ x.DeclareCol := FParser.Col;
+ x.Name := '';
+ x.AType := MType;
+ BlockInfo.Proc.ProcVars.Add(x);
+ Result := TPSValueAllocatedStackVar.Create;
+ Result.SetParserPos(FParser);
+ TPSValueAllocatedStackVar(Result).Proc := BlockInfo.Proc;
+ with TPSValueAllocatedStackVar(Result) do
+ begin
+ LocalVarNo := proc.ProcVars.Count -1;
+ end;
+ end;
+
+ function AllocStackReg(MType: TPSType): TPSValue;
+ begin
+ Result := AllocStackReg2(MType);
+ BlockWriteByte(BlockInfo, Cm_Pt);
+ BlockWriteLong(BlockInfo, MType.FinalTypeNo);
+ end;
+
+ function AllocPointer(MDestType: TPSType): TPSValue;
+ begin
+ Result := AllocStackReg(at2ut(FindBaseType(btPointer)));
+ TPSProcVar(BlockInfo.Proc.ProcVars[TPSValueAllocatedStackVar(Result).LocalVarNo]).AType := MDestType;
+ end;
+
+ function WriteCalculation(InData, OutReg: TPSValue): Boolean; forward;
+ function PreWriteOutRec(var X: TPSValue; FArrType: TPSType): Boolean; forward;
+ function WriteOutRec(x: TPSValue; AllowData: Boolean): Boolean; forward;
+ procedure AfterWriteOutRec(var x: TPSValue); forward;
+
+ function CheckCompatType(V1, v2: TPSValue): Boolean;
+ var
+ p1, P2: TPSType;
+ begin
+ p1 := GetTypeNo(BlockInfo, V1);
+ P2 := GetTypeNo(BlockInfo, v2);
+ if (p1 = nil) or (p2 = nil) then
+ begin
+ if ((p1 <> nil) and ({$IFNDEF PS_NOINTERFACES}(p1.ClassType = TPSInterfaceType) or {$ENDIF}(p1.BaseType = btProcPtr)) and (v2.ClassType = TPSValueNil)) or
+ ((p2 <> nil) and ({$IFNDEF PS_NOINTERFACES}(p2.ClassType = TPSInterfaceType) or {$ENDIF}(p2.BaseType = btProcPtr)) and (v1.ClassType = TPSValueNil)) then
+ begin
+ Result := True;
+ exit;
+ end else
+ if ((p1 <> nil) and ({$IFNDEF PS_NOINTERFACES}(p1.ClassType = TPSInterfaceType) or {$ENDIF}(p1.ClassType = TPSClassType)) and (v2.ClassType = TPSValueNil)) or
+ ((p2 <> nil) and ({$IFNDEF PS_NOINTERFACES}(p2.ClassType = TPSInterfaceType) or {$ENDIF}(p2.ClassType = TPSClassType)) and (v1.ClassType = TPSValueNil)) then
+ begin
+ Result := True;
+ exit;
+ end else
+ if ((p1 <> nil) and ({$IFNDEF PS_NOINTERFACES}(p1.ClassType = TPSInterfaceType) or {$ENDIF}(p1.ClassType = TPSUndefinedClassType)) and (v2.ClassType = TPSValueNil)) or
+ ((p2 <> nil) and ({$IFNDEF PS_NOINTERFACES}(p2.ClassType = TPSInterfaceType) or {$ENDIF}(p2.ClassType = TPSUndefinedClassType)) and (v1.ClassType = TPSValueNil)) then
+ begin
+ Result := True;
+ exit;
+ end else
+ if (v1.ClassType = TPSValueProcPtr) and (p2 <> nil) and (p2.BaseType = btProcPtr) then
+ begin
+ Result := CheckCompatProc(p2, TPSValueProcPtr(v1).ProcPtr);
+ exit;
+ end else if (v2.ClassType = TPSValueProcPtr) and (p1 <> nil) and (p1.BaseType = btProcPtr) then
+ begin
+ Result := CheckCompatProc(p1, TPSValueProcPtr(v2).ProcPtr);
+ exit;
+ end;
+ Result := False;
+ end else
+ if (p1 <> nil) and (p1.BaseType = btSet) and (v2 is TPSValueArray) then
+ begin
+ Result := True;
+ end else
+ Result := IsCompatibleType(p1, p2, False);
+ end;
+
+ function _ProcessFunction(ProcCall: TPSValueProc; ResultRegister: TPSValue): Boolean; forward;
+ function ProcessFunction2(ProcNo: Cardinal; Par: TPSParameters; ResultReg: TPSValue): Boolean;
+ var
+ Temp: TPSValueProcNo;
+ begin
+ Temp := TPSValueProcNo.Create;
+ Temp.Parameters := Par;
+ Temp.ProcNo := ProcNo;
+ if TObject(FProcs[ProcNo]).ClassType = TPSInternalProcedure then
+ Temp.ResultType := TPSInternalProcedure(FProcs[ProcNo]).Decl.Result
+ else
+ Temp.ResultType := TPSExternalProcedure(FProcs[ProcNo]).RegProc.Decl.Result;
+ Result := _ProcessFunction(Temp, ResultReg);
+ Temp.Parameters := nil;
+ Temp.Free;
+ end;
+
+ function MakeNil(NilPos, NilRow, nilCol: Cardinal;ivar: TPSValue): Boolean;
+ var
+ Procno: Cardinal;
+ PF: TPSType;
+ Par: TPSParameters;
+ begin
+ Pf := GetTypeNo(BlockInfo, IVar);
+ if not (Ivar is TPSValueVar) then
+ begin
+ with MakeError('', ecTypeMismatch, '') do
+ begin
+ FPosition := nilPos;
+ FRow := NilRow;
+ FCol := nilCol;
+ end;
+ Result := False;
+ exit;
+ end;
+ if (pf.BaseType = btProcPtr) then
+ begin
+ Result := True;
+ end else
+ if (pf.BaseType = btString) or (pf.BaseType = btPChar) then
+ begin
+ if not PreWriteOutRec(iVar, nil) then
+ begin
+ Result := false;
+ exit;
+ end;
+ BlockWriteByte(BlockInfo, CM_A);
+ WriteOutRec(ivar, False);
+ BlockWriteByte(BlockInfo, 1);
+ BlockWriteLong(BlockInfo, GetTypeNo(BlockInfo, IVar).FinalTypeNo);
+ BlockWriteLong(BlockInfo, 0); //empty string
+ AfterWriteOutRec(ivar);
+ Result := True;
+ end else if (pf.BaseType = btClass) {$IFNDEF PS_NOINTERFACES}or (pf.BaseType = btInterface){$ENDIF} then
+ begin
+{$IFNDEF PS_NOINTERFACES}
+ if (pf.BaseType = btClass) then
+ begin
+{$ENDIF}
+ if not TPSClassType(pf).Cl.SetNil(ProcNo) then
+ begin
+ with MakeError('', ecTypeMismatch, '') do
+ begin
+ FPosition := nilPos;
+ FRow := NilRow;
+ FCol := nilCol;
+ end;
+ Result := False;
+ exit;
+ end;
+{$IFNDEF PS_NOINTERFACES}
+ end else
+ begin
+ if not TPSInterfaceType(pf).Intf.SetNil(ProcNo) then
+ begin
+ with MakeError('', ecTypeMismatch, '') do
+ begin
+ FPosition := nilPos;
+ FRow := NilRow;
+ FCol := nilCol;
+ end;
+ Result := False;
+ exit;
+ end;
+ end;
+{$ENDIF}
+ Par := TPSParameters.Create;
+ with par.Add do
+ begin
+ Val := IVar;
+ ExpectedType := GetTypeNo(BlockInfo, ivar);
+{$IFDEF DEBUG}
+ if not ExpectedType.Used then asm int 3; end;
+{$ENDIF}
+ ParamMode := pmInOut;
+ end;
+ Result := ProcessFunction2(ProcNo, Par, nil);
+
+ Par[0].Val := nil; // don't free IVAR
+
+ Par.Free;
+ end else if pf.BaseType = btExtClass then
+ begin
+ if not TPSUndefinedClassType(pf).ExtClass.SetNil(ProcNo) then
+ begin
+ with MakeError('', ecTypeMismatch, '') do
+ begin
+ FPosition := nilPos;
+ FRow := NilRow;
+ FCol := nilCol;
+ end;
+ Result := False;
+ exit;
+ end;
+ Par := TPSParameters.Create;
+ with par.Add do
+ begin
+ Val := IVar;
+ ExpectedType := GetTypeNo(BlockInfo, ivar);
+ ParamMode := pmInOut;
+ end;
+ Result := ProcessFunction2(ProcNo, Par, nil);
+
+ Par[0].Val := nil; // don't free IVAR
+
+ Par.Free;
+ end else begin
+ with MakeError('', ecTypeMismatch, '') do
+ begin
+ FPosition := nilPos;
+ FRow := NilRow;
+ FCol := nilCol;
+ end;
+ Result := False;
+ end;
+ end;
+ function DoBinCalc(BVal: TPSBinValueOp; Output: TPSValue): Boolean;
+ var
+ tmpp, tmpc: TPSValue;
+ jend, jover: Cardinal;
+ procno: Cardinal;
+
+ begin
+ if BVal.Operator >= otGreaterEqual then
+ begin
+ if BVal.FVal1.ClassType = TPSValueNil then
+ begin
+ tmpp := AllocStackReg(GetTypeNo(BlockInfo, BVal.FVal2));
+ if not MakeNil(BVal.FVal1.Pos, BVal.FVal1.Row, BVal.FVal1.Col, tmpp) then
+ begin
+ tmpp.Free;
+ Result := False;
+ exit;
+ end;
+ tmpc := TPSValueReplace.Create;
+ with TPSValueReplace(tmpc) do
+ begin
+ OldValue := BVal.FVal1;
+ NewValue := tmpp;
+ end;
+ BVal.FVal1 := tmpc;
+ end;
+ if BVal.FVal2.ClassType = TPSValueNil then
+ begin
+ tmpp := AllocStackReg(GetTypeNo(BlockInfo, BVal.FVal1));
+ if not MakeNil(BVal.FVal2.Pos, BVal.FVal2.Row, BVal.FVal2.Col, tmpp) then
+ begin
+ tmpp.Free;;
+ Result := False;
+ exit;
+ end;
+ tmpc := TPSValueReplace.Create;
+ with TPSValueReplace(tmpc) do
+ begin
+ OldValue := BVal.FVal2;
+ NewValue := tmpp;
+ end;
+ BVal.FVal2 := tmpc;
+ end;
+ if GetTypeNo(BlockInfo, BVal.FVal1).BaseType = btExtClass then
+ begin
+ if not TPSUndefinedClassType(GetTypeNo(BlockInfo, BVal.FVal1)).ExtClass.CompareClass(GetTypeNo(BlockInfo, Bval.FVal2), ProcNo) then
+ begin
+ Result := False;
+ exit;
+ end;
+ tmpp := TPSValueProcNo.Create;
+ with TPSValueProcNo(tmpp) do
+ begin
+ ResultType := at2ut(FDefaultBoolType);
+ Parameters := TPSParameters.Create;
+ ProcNo := procno;
+ Pos := BVal.Pos;
+ Col := BVal.Col;
+ Row := BVal.Row;
+ with parameters.Add do
+ begin
+ Val := BVal.FVal1;
+ ExpectedType := GetTypeNo(BlockInfo, Val);
+ end;
+ with parameters.Add do
+ begin
+ Val := BVal.FVal2;
+ ExpectedType := GetTypeNo(BlockInfo, Val);
+ end;
+ end;
+ if Bval.Operator = otNotEqual then
+ begin
+ tmpc := TPSUnValueOp.Create;
+ TPSUnValueOp(tmpc).Operator := otNot;
+ TPSUnValueOp(tmpc).Val1 := tmpp;
+ TPSUnValueOp(tmpc).aType := GetTypeNo(BlockInfo, tmpp);
+ end else tmpc := tmpp;
+ Result := WriteCalculation(tmpc, Output);
+ with TPSValueProcNo(tmpp) do
+ begin
+ Parameters[0].Val := nil;
+ Parameters[1].Val := nil;
+ end;
+ tmpc.Free;
+ if BVal.Val1.ClassType = TPSValueReplace then
+ begin
+ tmpp := TPSValueReplace(BVal.Val1).OldValue;
+ BVal.Val1.Free;
+ BVal.Val1 := tmpp;
+ end;
+ if BVal.Val2.ClassType = TPSValueReplace then
+ begin
+ tmpp := TPSValueReplace(BVal.Val2).OldValue;
+ BVal.Val2.Free;
+ BVal.Val2 := tmpp;
+ end;
+ exit;
+ end;
+ if not (PreWriteOutRec(Output, nil) and PreWriteOutRec(BVal.FVal1, GetTypeNo(BlockInfo, BVal.FVal2)) and PreWriteOutRec(BVal.FVal2, GetTypeNo(BlockInfo, BVal.FVal1))) then
+ begin
+ Result := False;
+ exit;
+ end;
+ BlockWriteByte(BlockInfo, CM_CO);
+ case BVal.Operator of
+ otGreaterEqual: BlockWriteByte(BlockInfo, 0);
+ otLessEqual: BlockWriteByte(BlockInfo, 1);
+ otGreater: BlockWriteByte(BlockInfo, 2);
+ otLess: BlockWriteByte(BlockInfo, 3);
+ otEqual: BlockWriteByte(BlockInfo, 5);
+ otNotEqual: BlockWriteByte(BlockInfo, 4);
+ otIn: BlockWriteByte(BlockInfo, 6);
+ otIs: BlockWriteByte(BlockInfo, 7);
+ end;
+
+ if not (WriteOutRec(Output, False) and writeOutRec(BVal.FVal1, True) and writeOutRec(BVal.FVal2, True)) then
+ begin
+ Result := False;
+ exit;
+ end;
+ AfterWriteOutrec(BVal.FVal1);
+ AfterWriteOutrec(BVal.FVal2);
+ AfterWriteOutrec(Output);
+ if BVal.Val1.ClassType = TPSValueReplace then
+ begin
+ tmpp := TPSValueReplace(BVal.Val1).OldValue;
+ BVal.Val1.Free;
+ BVal.Val1 := tmpp;
+ end;
+ if BVal.Val2.ClassType = TPSValueReplace then
+ begin
+ tmpp := TPSValueReplace(BVal.Val2).OldValue;
+ BVal.Val2.Free;
+ BVal.Val2 := tmpp;
+ end;
+ end else begin
+ if not PreWriteOutRec(Output, nil) then
+ begin
+ Result := False;
+ exit;
+ end;
+ if not SameReg(Output, BVal.Val1) then
+ begin
+ if not WriteCalculation(BVal.FVal1, Output) then
+ begin
+ Result := False;
+ exit;
+ end;
+ end;
+ if (FBooleanShortCircuit) and (IsBoolean(BVal.aType)) then
+ begin
+ if BVal.Operator = otAnd then
+ begin
+ BlockWriteByte(BlockInfo, Cm_CNG);
+ jover := Length(BlockInfo.Proc.FData);
+ BlockWriteLong(BlockInfo, 0);
+ WriteOutRec(Output, True);
+ jend := Length(BlockInfo.Proc.FData);
+ end else if BVal.Operator = otOr then
+ begin
+ BlockWriteByte(BlockInfo, Cm_CG);
+ jover := Length(BlockInfo.Proc.FData);
+ BlockWriteLong(BlockInfo, 0);
+ WriteOutRec(Output, True);
+ jend := Length(BlockInfo.Proc.FData);
+ end else
+ begin
+ jover := 0;
+ jend := 0;
+ end;
+ end else
+ begin
+ jover := 0;
+ jend := 0;
+ end;
+ if not PreWriteOutrec(BVal.FVal2, GetTypeNo(BlockInfo, Output)) then
+ begin
+ Result := False;
+ exit;
+ end;
+ BlockWriteByte(BlockInfo, Cm_CA);
+ BlockWriteByte(BlockInfo, Ord(BVal.Operator));
+ if not (WriteOutRec(Output, False) and WriteOutRec(BVal.FVal2, True)) then
+ begin
+ Result := False;
+ exit;
+ end;
+ AfterWriteOutRec(BVal.FVal2);
+ if FBooleanShortCircuit and (IsBoolean(BVal.aType)) and (JOver <> JEnd) then
+ begin
+ Cardinal((@BlockInfo.Proc.FData[jover+1])^) := Cardinal(Length(BlockInfo.Proc.FData)) - jend;
+ end;
+ AfterWriteOutRec(Output);
+ end;
+ Result := True;
+ end;
+
+ function DoUnCalc(Val: TPSUnValueOp; Output: TPSValue): Boolean;
+ var
+ Tmp: TPSValue;
+ begin
+ if not PreWriteOutRec(Output, nil) then
+ begin
+ Result := False;
+ exit;
+ end;
+ case Val.Operator of
+ otNot:
+ begin
+ if not SameReg(Val.FVal1, Output) then
+ begin
+ if not WriteCalculation(Val.FVal1, Output) then
+ begin
+ Result := False;
+ exit;
+ end;
+ end;
+ if IsBoolean(GetTypeNo(BlockInfo, Val)) then
+ BlockWriteByte(BlockInfo, cm_bn)
+ else
+ BlockWriteByte(BlockInfo, cm_in);
+ if not WriteOutRec(Output, True) then
+ begin
+ Result := False;
+ exit;
+ end;
+ end;
+ otMinus:
+ begin
+ if not SameReg(Val.FVal1, Output) then
+ begin
+ if not WriteCalculation(Val.FVal1, Output) then
+ begin
+ Result := False;
+ exit;
+ end;
+ end;
+ BlockWriteByte(BlockInfo, cm_vm);
+ if not WriteOutRec(Output, True) then
+ begin
+ Result := False;
+ exit;
+ end;
+ end;
+ otCast:
+ begin
+ if ((Val.aType.BaseType = btChar) and (Val.aType.BaseType <> btU8)) {$IFNDEF PS_NOWIDESTRING}or
+ ((Val.aType.BaseType = btWideChar) and (Val.aType.BaseType <> btU16)){$ENDIF} then
+ begin
+ Tmp := AllocStackReg(Val.aType);
+ end else
+ Tmp := Output;
+ if not (PreWriteOutRec(Val.FVal1, GetTypeNo(BlockInfo, Tmp)) and PreWriteOutRec(Tmp, GetTypeNo(BlockInfo, Tmp))) then
+ begin
+ Result := False;
+ if tmp <> Output then Tmp.Free;
+ exit;
+ end;
+ BlockWriteByte(BlockInfo, CM_A);
+ if not (WriteOutRec(Tmp, False) and WriteOutRec(Val.FVal1, True)) then
+ begin
+ Result := false;
+ if tmp <> Output then Tmp.Free;
+ exit;
+ end;
+ AfterWriteOutRec(val.Fval1);
+ if Tmp <> Output then
+ begin
+ if not WriteCalculation(Tmp, Output) then
+ begin
+ Result := false;
+ Tmp.Free;
+ exit;
+ end;
+ end;
+ AfterWriteOutRec(Tmp);
+ if Tmp <> Output then
+ Tmp.Free;
+ end;
+ {else donothing}
+ end;
+ AfterWriteOutRec(Output);
+ Result := True;
+ end;
+
+
+ function GetAddress(Val: TPSValue): Cardinal;
+ begin
+ if Val.ClassType = TPSValueGlobalVar then
+ Result := TPSValueGlobalVar(val).GlobalVarNo
+ else if Val.ClassType = TPSValueLocalVar then
+ Result := PSAddrStackStart + TPSValueLocalVar(val).LocalVarNo + 1
+ else if Val.ClassType = TPSValueParamVar then
+ Result := PSAddrStackStart - TPSValueParamVar(val).ParamNo -1
+ else if Val.ClassType = TPSValueAllocatedStackVar then
+ Result := PSAddrStackStart + TPSValueAllocatedStackVar(val).LocalVarNo + 1
+ else
+ Result := InvalidVal;
+ end;
+
+
+ function PreWriteOutRec(var X: TPSValue; FArrType: TPSType): Boolean;
+ var
+ rr: TPSSubItem;
+ tmpp,
+ tmpc: TPSValue;
+ i: Longint;
+ function MakeSet(SetType: TPSSetType; arr: TPSValueArray): Boolean;
+ var
+ c, i: Longint;
+ dataval: TPSValueData;
+ mType: TPSType;
+ begin
+ Result := True;
+ dataval := TPSValueData.Create;
+ dataval.Data := NewVariant(FarrType);
+ for i := 0 to arr.count -1 do
+ begin
+ mType := GetTypeNo(BlockInfo, arr.Item[i]);
+ if mType <> SetType.SetType then
+ begin
+ with MakeError('', ecTypeMismatch, '') do
+ begin
+ FCol := arr.item[i].Col;
+ FRow := arr.item[i].Row;
+ FPosition := arr.item[i].Pos;
+ end;
+ DataVal.Free;
+ Result := False;
+ exit;
+ end;
+ if arr.Item[i] is TPSValueData then
+ begin
+ c := GetInt(TPSValueData(arr.Item[i]).Data, Result);
+ if not Result then
+ begin
+ dataval.Free;
+ exit;
+ end;
+ Set_MakeMember(c, dataval.Data.tstring);
+ end else
+ begin
+ DataVal.Free;
+ MakeError('', ecTypeMismatch, '');
+ Result := False;
+ exit;
+ end;
+ end;
+ tmpc := TPSValueReplace.Create;
+ with TPSValueReplace(tmpc) do
+ begin
+ OldValue := x;
+ NewValue := dataval;
+ PreWriteAllocated := True;
+ end;
+ x := tmpc;
+ end;
+ begin
+ Result := True;
+ if x.ClassType = TPSValueReplace then
+ begin
+ if TPSValueReplace(x).PreWriteAllocated then
+ begin
+ inc(TPSValueReplace(x).FReplaceTimes);
+ end;
+ end else
+ if x.ClassType = TPSValueProcPtr then
+ begin
+ if FArrType = nil then
+ begin
+ MakeError('', ecTypeMismatch, '');
+ Result := False;
+ Exit;
+ end;
+ tmpp := TPSValueData.Create;
+ TPSValueData(tmpp).Data := NewVariant(FArrType);
+ TPSValueData(tmpp).Data.tu32 := TPSValueProcPtr(x).ProcPtr;
+ tmpc := TPSValueReplace.Create;
+ with TPSValueReplace(tmpc) do
+ begin
+ PreWriteAllocated := True;
+ OldValue := x;
+ NewValue := tmpp;
+ end;
+ x := tmpc;
+ end else
+ if x.ClassType = TPSValueNil then
+ begin
+ if FArrType = nil then
+ begin
+ MakeError('', ecTypeMismatch, '');
+ Result := False;
+ Exit;
+ end;
+ tmpp := AllocStackReg(FArrType);
+ if not MakeNil(x.Pos, x.Row, x.Col, tmpp) then
+ begin
+ tmpp.Free;
+ Result := False;
+ exit;
+ end;
+ tmpc := TPSValueReplace.Create;
+ with TPSValueReplace(tmpc) do
+ begin
+ PreWriteAllocated := True;
+ OldValue := x;
+ NewValue := tmpp;
+ end;
+ x := tmpc;
+ end else
+ if x.ClassType = TPSValueArray then
+ begin
+ if FArrType = nil then
+ begin
+ MakeError('', ecTypeMismatch, '');
+ Result := False;
+ Exit;
+ end;
+ if TPSType(FArrType).BaseType = btSet then
+ begin
+ Result := MakeSet(TPSSetType(FArrType), TPSValueArray(x));
+ exit;
+ end;
+ if TPSType(FarrType).BaseType = btVariant then
+ FArrType := FindAndAddType(self, '', 'array of variant');
+
+ tmpp := AllocStackReg(FArrType);
+ tmpc := AllocStackReg(FindBaseType(bts32));
+ BlockWriteByte(BlockInfo, CM_A);
+ WriteOutrec(tmpc, False);
+ BlockWriteByte(BlockInfo, 1);
+ BlockWriteLong(BlockInfo, FindBaseType(bts32).FinalTypeNo);
+ BlockWriteLong(BlockInfo, TPSValueArray(x).Count);
+ BlockWriteByte(BlockInfo, CM_PV);
+ WriteOutrec(tmpp, False);
+ BlockWriteByte(BlockInfo, CM_C);
+ BlockWriteLong(BlockInfo, FindProc('SETARRAYLENGTH'));
+ BlockWriteByte(BlockInfo, CM_PO);
+ tmpc.Free;
+ rr := TPSSubNumber.Create;
+ rr.aType := TPSArrayType(FArrType).ArrayTypeNo;
+ TPSValueVar(tmpp).RecAdd(rr);
+ for i := 0 to TPSValueArray(x).Count -1 do
+ begin
+ TPSSubNumber(rr).SubNo := i;
+ tmpc := TPSValueArray(x).Item[i];
+ if not PreWriteOutRec(tmpc, GetTypeNo(BlockInfo, tmpc)) then
+ begin
+ tmpp.Free;
+ Result := false;
+ exit;
+ end;
+ if TPSArrayType(FArrType).ArrayTypeNo.BaseType = btPointer then
+ BlockWriteByte(BlockInfo, cm_spc)
+ else
+ BlockWriteByte(BlockInfo, cm_a);
+ if not (WriteOutrec(tmpp, False) and WriteOutRec(tmpc, True)) then
+ begin
+ Tmpp.Free;
+ Result := false;
+ exit;
+ end;
+ AfterWriteOutRec(tmpc);
+ end;
+ TPSValueVar(tmpp).RecDelete(0);
+ tmpc := TPSValueReplace.Create;
+ with TPSValueReplace(tmpc) do
+ begin
+ PreWriteAllocated := True;
+ OldValue := x;
+ NewValue := tmpp;
+ end;
+ x := tmpc;
+ end else if (x.ClassType = TPSUnValueOp) then
+ begin
+ tmpp := AllocStackReg(GetTypeNo(BlockInfo, x));
+ if not DoUnCalc(TPSUnValueOp(x), tmpp) then
+ begin
+ Result := False;
+ exit;
+ end;
+ tmpc := TPSValueReplace.Create;
+ with TPSValueReplace(tmpc) do
+ begin
+ PreWriteAllocated := True;
+ OldValue := x;
+ NewValue := tmpp;
+ end;
+ x := tmpc;
+ end else if (x.ClassType = TPSBinValueOp) then
+ begin
+ tmpp := AllocStackReg(GetTypeNo(BlockInfo, x));
+ if not DoBinCalc(TPSBinValueOp(x), tmpp) then
+ begin
+ tmpp.Free;
+ Result := False;
+ exit;
+ end;
+ tmpc := TPSValueReplace.Create;
+ with TPSValueReplace(tmpc) do
+ begin
+ PreWriteAllocated := True;
+ OldValue := x;
+ NewValue := tmpp;
+ end;
+ x := tmpc;
+ end else if x is TPSValueProc then
+ begin
+ tmpp := AllocStackReg(TPSValueProc(x).ResultType);
+ if not WriteCalculation(x, tmpp) then
+ begin
+ tmpp.Free;
+ Result := False;
+ exit;
+ end;
+ tmpc := TPSValueReplace.Create;
+ with TPSValueReplace(tmpc) do
+ begin
+ PreWriteAllocated := True;
+ OldValue := x;
+ NewValue := tmpp;
+ end;
+ x := tmpc;
+ end else if (x is TPSValueVar) and (TPSValueVar(x).RecCount <> 0) then
+ begin
+ if TPSValueVar(x).RecCount = 1 then
+ begin
+ rr := TPSValueVar(x).RecItem[0];
+ if rr.ClassType <> TPSSubValue then
+ exit; // there is no need pre-calculate anything
+ if (TPSSubValue(rr).SubNo is TPSValueVar) and (TPSValueVar(TPSSubValue(rr).SubNo).RecCount = 0) then
+ exit;
+ end; //if
+ tmpp := AllocPointer(GetTypeNo(BlockInfo, x));
+ BlockWriteByte(BlockInfo, cm_sp);
+ WriteOutRec(tmpp, True);
+ BlockWriteByte(BlockInfo, 0);
+ BlockWriteLong(BlockInfo, GetAddress(x));
+ for i := 0 to TPSValueVar(x).RecCount - 1 do
+ begin
+ rr := TPSValueVar(x).RecItem[I];
+ if rr.ClassType = TPSSubNumber then
+ begin
+ BlockWriteByte(BlockInfo, cm_sp);
+ WriteOutRec(tmpp, false);
+ BlockWriteByte(BlockInfo, 2);
+ BlockWriteLong(BlockInfo, GetAddress(tmpp));
+ BlockWriteLong(BlockInfo, TPSSubNumber(rr).SubNo);
+ end else begin // if rr.classtype = TPSSubValue then begin
+ tmpc := AllocStackReg(FindBaseType(btU32));
+ if not WriteCalculation(TPSSubValue(rr).SubNo, tmpc) then
+ begin
+ tmpc.Free;
+ tmpp.Free;
+ Result := False;
+ exit;
+ end; //if
+ BlockWriteByte(BlockInfo, cm_sp);
+ WriteOutRec(tmpp, false);
+ BlockWriteByte(BlockInfo, 3);
+ BlockWriteLong(BlockInfo, GetAddress(tmpp));
+ BlockWriteLong(BlockInfo, GetAddress(tmpc));
+ tmpc.Free;
+ end;
+ end; // for
+ tmpc := TPSValueReplace.Create;
+ with TPSValueReplace(tmpc) do
+ begin
+ OldValue := x;
+ NewValue := tmpp;
+ PreWriteAllocated := True;
+ end;
+ x := tmpc;
+ end;
+
+ end;
+
+ procedure AfterWriteOutRec(var x: TPSValue);
+ var
+ tmp: TPSValue;
+ begin
+ if (x.ClassType = TPSValueReplace) and (TPSValueReplace(x).PreWriteAllocated) then
+ begin
+ Dec(TPSValueReplace(x).FReplaceTimes);
+ if TPSValueReplace(x).ReplaceTimes = 0 then
+ begin
+ tmp := TPSValueReplace(x).OldValue;
+ x.Free;
+ x := tmp;
+ end;
+ end;
+ end; //afterwriteoutrec
+
+ function WriteOutRec(x: TPSValue; AllowData: Boolean): Boolean;
+ var
+ rr: TPSSubItem;
+ begin
+ Result := True;
+ if x.ClassType = TPSValueReplace then
+ Result := WriteOutRec(TPSValueReplace(x).NewValue, AllowData)
+ else if x is TPSValueVar then
+ begin
+ if TPSValueVar(x).RecCount = 0 then
+ begin
+ BlockWriteByte(BlockInfo, 0);
+ BlockWriteLong(BlockInfo, GetAddress(x));
+ end
+ else
+ begin
+ rr := TPSValueVar(x).RecItem[0];
+ if rr.ClassType = TPSSubNumber then
+ begin
+ BlockWriteByte(BlockInfo, 2);
+ BlockWriteLong(BlockInfo, GetAddress(x));
+ BlockWriteLong(BlockInfo, TPSSubNumber(rr).SubNo);
+ end
+ else
+ begin
+ BlockWriteByte(BlockInfo, 3);
+ BlockWriteLong(BlockInfo, GetAddress(x));
+ BlockWriteLong(BlockInfo, GetAddress(TPSSubValue(rr).SubNo));
+ end;
+ end;
+ end else if x.ClassType = TPSValueData then
+ begin
+ if AllowData then
+ begin
+ BlockWriteByte(BlockInfo, 1);
+ BlockWriteVariant(BlockInfo, TPSValueData(x).Data)
+ end
+ else
+ begin
+ Result := False;
+ exit;
+ end;
+ end else
+ Result := False;
+ end;
+
+ function ReadParameters(IsProperty: Boolean; Dest: TPSParameters): Boolean; forward;
+{$IFNDEF PS_NOIDISPATCH}
+ function ReadIDispatchParameters(const ProcName: string; aVariantType: TPSVariantType; FSelf: TPSValue): TPSValue; forward;
+{$ENDIF}
+ function ReadProcParameters(ProcNo: Cardinal; FSelf: TPSValue): TPSValue; forward;
+ function ReadVarParameters(ProcNoVar: TPSValue): TPSValue; forward;
+
+ function calc(endOn: TPSPasToken): TPSValue; forward;
+ procedure CheckNotificationVariant(var Val: TPSValue);
+ var
+ aType: TPSType;
+ Call: TPSValueProcNo;
+ tmp: TPSValue;
+ begin
+ if not (Val is TPSValueGlobalVar) then exit;
+ aType := GetTypeNo(BlockInfo, Val);
+ if (AType = nil) or (AType.BaseType <> btNotificationVariant) then exit;
+ if FParser.CurrTokenId = CSTI_Assignment then
+ begin
+ Call := TPSValueProcNo.Create;
+ Call.ResultType := nil;
+ Call.SetParserPos(FParser);
+ Call.ProcNo := FindProc('!NOTIFICATIONVARIANTSET');;
+ Call.SetParserPos(FParser);
+ Call.Parameters := TPSParameters.Create;
+ Tmp := TPSValueData.Create;
+ TPSVAlueData(tmp).Data := NewVariant(at2ut(FindBaseType(btString)));
+ string(TPSValueData(tmp).Data.tstring) := TPSVar(FVars[TPSValueGlobalVar(Val).GlobalVarNo]).OrgName;
+ with call.Parameters.Add do
+ begin
+ Val := tmp;
+ ExpectedType := TPSValueData(tmp).Data.FType;
+ end;
+ FParser.Next;
+ tmp := Calc(CSTI_SemiColon);
+ if tmp = nil then
+ begin
+ Val.Free;
+ Val := nil;
+ exit;
+ end;
+ with Call.Parameters.Add do
+ begin
+ Val := tmp;
+ ExpectedType := at2ut(FindBaseType(btVariant));
+ end;
+ Val.Free;
+ Val := Call;
+ end else begin
+ Call := TPSValueProcNo.Create;
+ Call.ResultType := AT2UT(FindBaseType(btVariant));
+ Call.SetParserPos(FParser);
+ Call.ProcNo := FindProc('!NOTIFICATIONVARIANTGET');
+ Call.SetParserPos(FParser);
+ Call.Parameters := TPSParameters.Create;
+ Tmp := TPSValueData.Create;
+ TPSVAlueData(tmp).Data := NewVariant(at2ut(FindBaseType(btString)));
+ string(TPSValueData(tmp).Data.tstring) := TPSVar(FVars[TPSValueGlobalVar(Val).GlobalVarNo]).OrgName;
+ with call.Parameters.Add do
+ begin
+ Val := tmp;
+ ExpectedType := TPSValueData(tmp).Data.FType;
+ end;
+ Val.Free;
+ Val := Call;
+ end;
+ end;
+
+
+ function GetIdentifier(const FType: Byte): TPSValue;
+ {
+ FType:
+ 0 = Anything
+ 1 = Only variables
+ 2 = Not constants
+ }
+
+ procedure CheckProcCall(var x: TPSValue);
+ var
+ aType: TPSType;
+ begin
+ if FParser.CurrTokenId in [CSTI_Dereference, CSTI_OpenRound] then
+ begin
+ aType := GetTypeNo(BlockInfo, x);
+ if (aType = nil) or (aType.BaseType <> btProcPtr) then
+ begin
+ MakeError('', ecTypeMismatch, '');
+ x.Free;
+ x := nil;
+ Exit;
+ end;
+ if FParser.CurrTokenId = CSTI_Dereference then
+ FParser.Next;
+ x := ReadVarParameters(x);
+ end;
+ end;
+
+ procedure CheckFurther(var x: TPSValue; ImplicitPeriod: Boolean);
+ var
+ t: Cardinal;
+ rr: TPSSubItem;
+ L: Longint;
+ u: TPSType;
+ Param: TPSParameter;
+ tmp, tmpn: TPSValue;
+ tmp3: TPSValueProcNo;
+ tmp2: Boolean;
+
+ function FindSubR(const n: string; FType: TPSType): Cardinal;
+ var
+ h, I: Longint;
+ rvv: PIFPSRecordFieldTypeDef;
+ begin
+ h := MakeHash(n);
+ for I := 0 to TPSRecordType(FType).RecValCount - 1 do
+ begin
+ rvv := TPSRecordType(FType).RecVal(I);
+ if (rvv.FieldNameHash = h) and (rvv.FieldName = n) then
+ begin
+ Result := I;
+ exit;
+ end;
+ end;
+ Result := InvalidVal;
+ end;
+
+ begin
+(* if not (x is TPSValueVar) then
+ Exit;*)
+ u := GetTypeNo(BlockInfo, x);
+ if u = nil then exit;
+ while True do
+ begin
+ if (u.BaseType = btClass) {$IFNDEF PS_NOINTERFACES}or (u.BaseType = btInterface){$ENDIF}
+ {$IFNDEF PS_NOIDISPATCH}or ((u.BaseType = btVariant) or (u.BaseType = btNotificationVariant)){$ENDIF} or (u.BaseType = btExtClass) then exit;
+ if FParser.CurrTokenId = CSTI_OpenBlock then
+ begin
+ if (u.BaseType = btString) {$IFNDEF PS_NOWIDESTRING} or (u.BaseType = btWideString) {$ENDIF} then
+ begin
+ FParser.Next;
+ tmp := Calc(CSTI_CloseBlock);
+ if tmp = nil then
+ begin
+ x.Free;
+ x := nil;
+ exit;
+ end;
+ if not IsIntType(GetTypeNo(BlockInfo, tmp).BaseType) then
+ begin
+ MakeError('', ecTypeMismatch, '');
+ tmp.Free;
+ x.Free;
+ x := nil;
+ exit;
+ end;
+ FParser.Next;
+ if FParser.CurrTokenId = CSTI_Assignment then
+ begin
+ {$IFNDEF PS_NOWIDESTRING}
+ if u.BaseType = btWideString then
+ l := FindProc('WSTRSET')
+ else
+ {$ENDIF}
+ l := FindProc('STRSET');
+ if l = -1 then
+ begin
+ MakeError('', ecUnknownIdentifier, 'StrSet');
+ tmp.Free;
+ x.Free;
+ x := nil;
+ exit;
+ end;
+ tmp3 := TPSValueProcNo.Create;
+ tmp3.ResultType := nil;
+ tmp3.SetParserPos(FParser);
+ tmp3.ProcNo := L;
+ tmp3.SetParserPos(FParser);
+ tmp3.Parameters := TPSParameters.Create;
+ param := tmp3.Parameters.Add;
+ with tmp3.Parameters.Add do
+ begin
+ Val := tmp;
+ ExpectedType := GetTypeNo(BlockInfo, tmp);
+{$IFDEF DEBUG}
+ if not ExpectedType.Used then asm int 3; end;
+{$ENDIF}
+ end;
+ with tmp3.Parameters.Add do
+ begin
+ Val := x;
+ ExpectedType := GetTypeNo(BlockInfo, x);
+{$IFDEF DEBUG}
+ if not ExpectedType.Used then asm int 3; end;
+{$ENDIF}
+ ParamMode := pmInOut;
+ end;
+ x := tmp3;
+ FParser.Next;
+ tmp := Calc(CSTI_SemiColon);
+ if tmp = nil then
+ begin
+ x.Free;
+ x := nil;
+ exit;
+ end;
+ if (GetTypeNo(BlockInfo, Tmp).BaseType <> btChar)
+ {$IFNDEF PS_NOWIDESTRING} and (GetTypeno(BlockInfo, Tmp).BaseType <> btWideChar) {$ENDIF} then
+ begin
+ x.Free;
+ x := nil;
+ Tmp.Free;
+ MakeError('', ecTypeMismatch, '');
+ exit;
+
+ end;
+ param.Val := tmp;
+ Param.ExpectedType := GetTypeNo(BlockInfo, tmp);
+{$IFDEF DEBUG}
+ if not Param.ExpectedType.Used then asm int 3; end;
+{$ENDIF}
+ end else begin
+ {$IFNDEF PS_NOWIDESTRING}
+ if u.BaseType = btWideString then
+ l := FindProc('WSTRGET')
+ else
+ {$ENDIF}
+ l := FindProc('STRGET');
+ if l = -1 then
+ begin
+ MakeError('', ecUnknownIdentifier, 'StrGet');
+ tmp.Free;
+ x.Free;
+ x := nil;
+ exit;
+ end;
+ tmp3 := TPSValueProcNo.Create;
+ {$IFNDEF PS_NOWIDESTRING}
+ if u.BaseType = btWideString then
+ tmp3.ResultType := FindBaseType(btWideChar)
+ else
+ {$ENDIF}
+ tmp3.ResultType := FindBaseType(btChar);
+ tmp3.ProcNo := L;
+ tmp3.SetParserPos(FParser);
+ tmp3.Parameters := TPSParameters.Create;
+ with tmp3.Parameters.Add do
+ begin
+ Val := x;
+ ExpectedType := GetTypeNo(BlockInfo, x);
+{$IFDEF DEBUG}
+ if not ExpectedType.Used then asm int 3; end;
+{$ENDIF}
+
+ if x is TPSValueVar then
+ ParamMode := pmInOut
+ else
+ parammode := pmIn;
+ end;
+ with tmp3.Parameters.Add do
+ begin
+ Val := tmp;
+ ExpectedType := GetTypeNo(BlockInfo, tmp);
+{$IFDEF DEBUG}
+ if not ExpectedType.Used then asm int 3; end;
+{$ENDIF}
+ end;
+ x := tmp3;
+ end;
+ Break;
+ end else if ((u.BaseType = btArray) or (u.BaseType = btStaticArray)) and (x is TPSValueVar) then
+ begin
+ FParser.Next;
+ tmp := calc(CSTI_CloseBlock);
+ if tmp = nil then
+ begin
+ x.Free;
+ x := nil;
+ exit;
+ end;
+ if not IsIntType(GetTypeNo(BlockInfo, tmp).BaseType) then
+ begin
+ MakeError('', ecTypeMismatch, '');
+ tmp.Free;
+ x.Free;
+ x := nil;
+ exit;
+ end;
+ if (tmp.ClassType = TPSValueData) then
+ begin
+ rr := TPSSubNumber.Create;
+ TPSValueVar(x).RecAdd(rr);
+ if (u.BaseType = btStaticArray) then
+ TPSSubNumber(rr).SubNo := Cardinal(GetInt(TPSValueData(tmp).Data, tmp2) - TPSStaticArrayType(u).StartOffset)
+ else
+ TPSSubNumber(rr).SubNo := GetUInt(TPSValueData(tmp).Data, tmp2);
+ tmp.Free;
+ rr.aType := TPSArrayType(u).ArrayTypeNo;
+ u := rr.aType;
+ end
+ else
+ begin
+ if (u.BaseType = btStaticArray) then
+ begin
+ tmpn := TPSBinValueOp.Create;
+ TPSBinValueOp(tmpn).Operator := otSub;
+ TPSBinValueOp(tmpn).Val1 := tmp;
+ tmp := TPSValueData.Create;
+ TPSValueData(tmp).Data := NewVariant(FindBaseType(btS32));
+ TPSValueData(tmp).Data.ts32 := TPSStaticArrayType(u).StartOffset;
+ TPSBinValueOp(tmpn).Val2 := tmp;
+ TPSBinValueOp(tmpn).aType := FindBaseType(btS32);
+ tmp := tmpn;
+ end;
+ rr := TPSSubValue.Create;
+ TPSValueVar(x).recAdd(rr);
+ TPSSubValue(rr).SubNo := tmp;
+ rr.aType := TPSArrayType(u).ArrayTypeNo;
+ u := rr.aType;
+ end;
+ if FParser.CurrTokenId <> CSTI_CloseBlock then
+ begin
+ MakeError('', ecCloseBlockExpected, '');
+ x.Free;
+ x := nil;
+ exit;
+ end;
+ Fparser.Next;
+ end else begin
+ MakeError('', ecSemicolonExpected, '');
+ x.Free;
+ x := nil;
+ exit;
+ end;
+ end
+ else if (FParser.CurrTokenId = CSTI_Period) or (ImplicitPeriod) then
+ begin
+ if not ImplicitPeriod then
+ FParser.Next;
+ if u.BaseType = btRecord then
+ begin
+ t := FindSubR(FParser.GetToken, u);
+ if t = InvalidVal then
+ begin
+ if ImplicitPeriod then exit;
+ MakeError('', ecUnknownIdentifier, FParser.GetToken);
+ x.Free;
+ x := nil;
+ exit;
+ end;
+ if (x is TPSValueProcNo) then
+ begin
+ ImplicitPeriod := False;
+ FParser.Next;
+
+ tmp := AllocStackReg(u);
+ WriteCalculation(x,tmp);
+ TPSVar(BlockInfo.Proc.FProcVars[TPSValueAllocatedStackVar(tmp).LocalVarNo]).Use;
+
+ rr := TPSSubNumber.Create;
+ TPSValueVar(tmp).RecAdd(rr);
+ TPSSubNumber(rr).SubNo := t;
+ rr.aType := TPSRecordType(u).RecVal(t).FType;
+ u := rr.aType;
+
+ tmpn := AllocStackReg(u);
+ WriteCalculation(tmp,tmpn);
+ TPSVar(BlockInfo.Proc.FProcVars[TPSValueAllocatedStackVar(tmpn).LocalVarNo]).Use;
+
+ x := tmpn;
+ end else
+ begin
+ if not (x is TPSValueVar) then begin
+ MakeError('', ecVariableExpected, FParser.GetToken);
+ x.Free;
+ x := nil;
+ exit;
+ end;
+ ImplicitPeriod := False;
+ FParser.Next;
+ rr := TPSSubNumber.Create;
+ TPSValueVar(x).RecAdd(rr);
+ TPSSubNumber(rr).SubNo := t;
+ rr.aType := TPSRecordType(u).RecVal(t).FType;
+ u := rr.aType;
+ end;
+ end
+ else
+ begin
+ x.Free;
+ MakeError('', ecSemicolonExpected, '');
+ x := nil;
+ exit;
+ end;
+ end
+ else
+ break;
+ end;
+ end;
+
+
+
+ procedure CheckClassArrayProperty(var P: TPSValue; const VarType: TPSVariableType; VarNo: Cardinal);
+ var
+ Tempp: TPSValue;
+ aType: TPSClassType;
+ procno, Idx: Cardinal;
+ Decl: TPSParametersDecl;
+ begin
+ if p = nil then exit;
+ if (GetTypeNo(BlockInfo, p) = nil) or (GetTypeNo(BlockInfo, p).BaseType <> btClass) then exit;
+ aType := TPSClassType(GetTypeNo(BlockInfo, p));
+ if FParser.CurrTokenID = CSTI_OpenBlock then
+ begin
+ if not TPSClassType(aType).Cl.Property_Find('', Idx) then
+ begin
+ MakeError('', ecPeriodExpected, '');
+ p.Free;
+ p := nil;
+ exit;
+ end;
+ if VarNo <> InvalidVal then
+ begin
+ if @FOnUseVariable <> nil then
+ FOnUseVariable(Self, VarType, VarNo, BlockInfo.ProcNo, FParser.CurrTokenPos, '[Default]');
+ end;
+ Decl := TPSParametersDecl.Create;
+ TPSClassType(aType).Cl.Property_GetHeader(Idx, Decl);
+ tempp := p;
+ P := TPSValueProcNo.Create;
+ with TPSValueProcNo(P) do
+ begin
+ Parameters := TPSParameters.Create;
+ Parameters.Add;
+ end;
+ if not (ReadParameters(True, TPSValueProc(P).Parameters) and
+ ValidateParameters(BlockInfo, TPSValueProc(P).Parameters, Decl)) then
+ begin
+ tempp.Free;
+ Decl.Free;
+ p.Free;
+ p := nil;
+ exit;
+ end;
+ with TPSValueProcNo(p).Parameters[0] do
+ begin
+ Val := tempp;
+ ExpectedType := GetTypeNo(BlockInfo, tempp);
+ end;
+ if FParser.CurrTokenId = CSTI_Assignment then
+ begin
+ FParser.Next;
+ TempP := Calc(CSTI_SemiColon);
+ if TempP = nil then
+ begin
+ Decl.Free;
+ P.Free;
+ p := nil;
+ exit;
+ end;
+ with TPSValueProc(p).Parameters.Add do
+ begin
+ Val := Tempp;
+ ExpectedType := at2ut(Decl.Result);
+ end;
+ if not TPSClassType(aType).Cl.Property_Set(Idx, procno) then
+ begin
+ Decl.Free;
+ MakeError('', ecReadOnlyProperty, '');
+ p.Free;
+ p := nil;
+ exit;
+ end;
+ TPSValueProcNo(p).ProcNo := procno;
+ TPSValueProcNo(p).ResultType := nil;
+ end
+ else
+ begin
+ if not TPSClassType(aType).Cl.Property_Get(Idx, procno) then
+ begin
+ Decl.Free;
+ MakeError('', ecWriteOnlyProperty, '');
+ p.Free;
+ p := nil;
+ exit;
+ end;
+ TPSValueProcNo(p).ProcNo := procno;
+ TPSValueProcNo(p).ResultType := TPSExternalProcedure(FProcs[procno]).RegProc.Decl.Result;
+ end; // if FParser.CurrTokenId = CSTI_Assign
+ Decl.Free;
+ end;
+ end;
+
+ procedure CheckExtClass(var P: TPSValue; const VarType: TPSVariableType; VarNo: Cardinal; ImplicitPeriod: Boolean);
+ var
+ Temp, Idx: Cardinal;
+ FType: TPSType;
+ s: string;
+
+ begin
+ FType := GetTypeNo(BlockInfo, p);
+ if FType = nil then Exit;
+ if FType.BaseType <> btExtClass then Exit;
+ while (FParser.CurrTokenID = CSTI_Period) or (ImplicitPeriod) do
+ begin
+ if not ImplicitPeriod then
+ FParser.Next;
+ if FParser.CurrTokenID <> CSTI_Identifier then
+ begin
+ if ImplicitPeriod then exit;
+ MakeError('', ecIdentifierExpected, '');
+ p.Free;
+ P := nil;
+ Exit;
+ end;
+ s := FParser.GetToken;
+ if TPSUndefinedClassType(FType).ExtClass.Func_Find(s, Idx) then
+ begin
+ FParser.Next;
+ TPSUndefinedClassType(FType).ExtClass.Func_Call(Idx, Temp);
+ P := ReadProcParameters(Temp, P);
+ if p = nil then
+ begin
+ Exit;
+ end;
+ end else
+ begin
+ if ImplicitPeriod then exit;
+ MakeError('', ecUnknownIdentifier, s);
+ p.Free;
+ P := nil;
+ Exit;
+ end;
+ ImplicitPeriod := False;
+ FType := GetTypeNo(BlockInfo, p);
+ if (FType = nil) or (FType.BaseType <> btExtClass) then Exit;
+ end; {while}
+ end;
+
+ procedure CheckClass(var P: TPSValue; const VarType: TPSVariableType; VarNo: Cardinal; ImplicitPeriod: Boolean);
+ var
+ Procno, Idx: Cardinal;
+ FType: TPSType;
+ TempP: TPSValue;
+ Decl: TPSParametersDecl;
+ s: string;
+
+ pinfo, pinfonew: string;
+ ppos: Cardinal;
+
+ begin
+ FType := GetTypeNo(BlockInfo, p);
+ if FType = nil then exit;
+ if (FType.BaseType <> btClass) then Exit;
+ while (FParser.CurrTokenID = CSTI_Period) or (ImplicitPeriod) do
+ begin
+ if not ImplicitPeriod then
+ FParser.Next;
+ if FParser.CurrTokenID <> CSTI_Identifier then
+ begin
+ if ImplicitPeriod then exit;
+ MakeError('', ecIdentifierExpected, '');
+ p.Free;
+ P := nil;
+ Exit;
+ end;
+ s := FParser.GetToken;
+ if TPSClassType(FType).Cl.Func_Find(s, Idx) then
+ begin
+ FParser.Next;
+ VarNo := InvalidVal;
+ TPSClassType(FType).cl.Func_Call(Idx, Procno);
+ P := ReadProcParameters(Procno, P);
+ if p = nil then
+ begin
+ Exit;
+ end;
+ end else if TPSClassType(FType).cl.Property_Find(s, Idx) then
+ begin
+ ppos := FParser.CurrTokenPos;
+ pinfonew := FParser.OriginalToken;
+ FParser.Next;
+ if VarNo <> InvalidVal then
+ begin
+ if pinfo = '' then
+ pinfo := pinfonew
+ else
+ pinfo := pinfo + '.' + pinfonew;
+ if @FOnUseVariable <> nil then
+ FOnUseVariable(Self, VarType, VarNo, BlockInfo.ProcNo, ppos, pinfo);
+ end;
+ Decl := TPSParametersDecl.Create;
+ TPSClassType(FType).cl.Property_GetHeader(Idx, Decl);
+ TempP := P;
+ p := TPSValueProcNo.Create;
+ with TPSValueProcNo(p) do
+ begin
+ Parameters := TPSParameters.Create;
+ Parameters.Add;
+ Pos := FParser.CurrTokenPos;
+ row := FParser.Row;
+ Col := FParser.Col;
+ end;
+ if Decl.ParamCount <> 0 then
+ begin
+ if not (ReadParameters(True, TPSValueProc(P).Parameters) and
+ ValidateParameters(BlockInfo, TPSValueProc(P).Parameters, Decl)) then
+ begin
+ Tempp.Free;
+ Decl.Free;
+ p.Free;
+ P := nil;
+ exit;
+ end;
+ end; // if
+ with TPSValueProcNo(p).Parameters[0] do
+ begin
+ Val := TempP;
+ ExpectedType := at2ut(GetTypeNo(BlockInfo, TempP));
+ end;
+ if FParser.CurrTokenId = CSTI_Assignment then
+ begin
+ FParser.Next;
+ TempP := Calc(CSTI_SemiColon);
+ if TempP = nil then
+ begin
+ Decl.Free;
+ P.Free;
+ p := nil;
+ exit;
+ end;
+ with TPSValueProc(p).Parameters.Add do
+ begin
+ Val := Tempp;
+ ExpectedType := at2ut(Decl.Result);
+{$IFDEF DEBUG}
+ if not ExpectedType.Used then asm int 3; end;
+{$ENDIF}
+ end;
+
+ if not TPSClassType(FType).cl.Property_Set(Idx, Procno) then
+ begin
+ MakeError('', ecReadOnlyProperty, '');
+ Decl.Free;
+ p.Free;
+ p := nil;
+ exit;
+ end;
+ TPSValueProcNo(p).ProcNo := Procno;
+ TPSValueProcNo(p).ResultType := nil;
+ Decl.Free;
+ Exit;
+ end else begin
+ if not TPSClassType(FType).cl.Property_Get(Idx, Procno) then
+ begin
+ MakeError('', ecWriteOnlyProperty, '');
+ Decl.Free;
+ p.Free;
+ p := nil;
+ exit;
+ end;
+ TPSValueProcNo(p).ProcNo := ProcNo;
+ TPSValueProcNo(p).ResultType := TPSExternalProcedure(FProcs[ProcNo]).RegProc.Decl.Result;
+ end; // if FParser.CurrTokenId = CSTI_Assign
+ Decl.Free;
+ end else
+ begin
+ if ImplicitPeriod then exit;
+ MakeError('', ecUnknownIdentifier, s);
+ p.Free;
+ P := nil;
+ Exit;
+ end;
+ ImplicitPeriod := False;
+ FType := GetTypeNo(BlockInfo, p);
+ if (FType = nil) or (FType.BaseType <> btClass) then Exit;
+ end; {while}
+ end;
+{$IFNDEF PS_NOIDISPATCH}
+ procedure CheckIntf(var P: TPSValue; const VarType: TPSVariableType; VarNo: Cardinal; ImplicitPeriod: Boolean);
+ var
+ Procno, Idx: Cardinal;
+ FType: TPSType;
+ s: string;
+
+ CheckArrayProperty,HasArrayProperty:boolean;
+ begin
+ FType := GetTypeNo(BlockInfo, p);
+ if FType = nil then exit;
+ if (FType.BaseType <> btInterface) and (Ftype.BaseType <> BtVariant) and (FType.BaseType = btNotificationVariant) then Exit;
+
+ CheckArrayProperty:=(FParser.CurrTokenID=CSTI_OpenBlock)and
+ (Ftype.BaseType = BtVariant);
+ while (FParser.CurrTokenID = CSTI_Period)
+ or (ImplicitPeriod)or (CheckArrayProperty) do begin
+
+ HasArrayProperty:=CheckArrayProperty;
+ if CheckArrayProperty then begin
+ CheckArrayProperty:=false;
+ end else begin
+ if not ImplicitPeriod then
+ FParser.Next;
+ end;
+ if FParser.CurrTokenID <> CSTI_Identifier then
+ begin
+ if ImplicitPeriod then exit;
+ if not HasArrayProperty then begin
+ MakeError('', ecIdentifierExpected, '');
+ p.Free;
+ P := nil;
+ Exit;
+ end;
+ end;
+ if (FType.BaseType = btVariant) or (FType.BaseType = btNotificationVariant) then
+ begin
+ if HasArrayProperty then begin
+ s:='';
+ end else begin
+ s := FParser.OriginalToken;
+ FParser.Next;
+ end;
+ ImplicitPeriod := False;
+ FType := GetTypeNo(BlockInfo, p);
+ p := ReadIDispatchParameters(s, TPSVariantType(FType), p);
+ if (FType = nil) or (FType.BaseType <> btInterface) then Exit;
+ end else
+ begin
+ s := FParser.GetToken;
+ if (FType is TPSInterfaceType) and (TPSInterfaceType(FType).Intf.Func_Find(s, Idx)) then
+ begin
+ FParser.Next;
+ TPSInterfaceType(FType).Intf.Func_Call(Idx, Procno);
+ P := ReadProcParameters(Procno, P);
+ if p = nil then
+ begin
+ Exit;
+ end;
+ end else
+ begin
+ if ImplicitPeriod then exit;
+ MakeError('', ecUnknownIdentifier, s);
+ p.Free;
+ P := nil;
+ Exit;
+ end;
+ ImplicitPeriod := False;
+ FType := GetTypeNo(BlockInfo, p);
+ if (FType = nil) or ((FType.BaseType <> btInterface) and (Ftype.BaseType <> btVariant) and (Ftype.BaseType <> btNotificationVariant)) then Exit;
+ end;
+ end; {while}
+ end;
+ {$ENDIF}
+ function ExtCheckClassType(FType: TPSType; const ParserPos: Cardinal): TPSValue;
+ var
+ FType2: TPSType;
+ ProcNo, Idx: Cardinal;
+ Temp, ResV: TPSValue;
+ begin
+ if FParser.CurrTokenID = CSTI_OpenRound then
+ begin
+ FParser.Next;
+ Temp := Calc(CSTI_CloseRound);
+ if Temp = nil then
+ begin
+ Result := nil;
+ exit;
+ end;
+ if FParser.CurrTokenID <> CSTI_CloseRound then
+ begin
+ temp.Free;
+ MakeError('', ecCloseRoundExpected, '');
+ Result := nil;
+ exit;
+ end;
+ FType2 := GetTypeNo(BlockInfo, Temp);
+ if (FType.basetype = BtClass) and (ftype2.BaseType = btClass) and (ftype <> ftype2) then
+ begin
+ if not TPSUndefinedClassType(FType2).ExtClass.CastToType(AT2UT(FType), ProcNo) then
+ begin
+ temp.Free;
+ MakeError('', ecTypeMismatch, '');
+ Result := nil;
+ exit;
+ end;
+ Result := TPSValueProcNo.Create;
+ TPSValueProcNo(Result).Parameters := TPSParameters.Create;
+ TPSValueProcNo(Result).ResultType := at2ut(FType);
+ TPSValueProcNo(Result).ProcNo := ProcNo;
+ with TPSValueProcNo(Result).Parameters.Add do
+ begin
+ Val := Temp;
+ ExpectedType := GetTypeNo(BlockInfo, temp);
+ end;
+ with TPSValueProcNo(Result).Parameters.Add do
+ begin
+ ExpectedType := at2ut(FindBaseType(btu32));
+ Val := TPSValueData.Create;
+ with TPSValueData(val) do
+ begin
+ SetParserPos(FParser);
+ Data := NewVariant(ExpectedType);
+ Data.tu32 := at2ut(FType).FinalTypeNo;
+ end;
+ end;
+ FParser.Next;
+ Exit;
+ end;
+ if not IsCompatibleType(FType, FType2, True) then
+ begin
+ temp.Free;
+ MakeError('', ecTypeMismatch, '');
+ Result := nil;
+ exit;
+ end;
+ FParser.Next;
+ Result := TPSUnValueOp.Create;
+ with TPSUnValueOp(Result) do
+ begin
+ Operator := otCast;
+ Val1 := Temp;
+ SetParserPos(FParser);
+ aType := AT2UT(FType);
+ end;
+ exit;
+ end;
+ if FParser.CurrTokenId <> CSTI_Period then
+ begin
+ Result := nil;
+ MakeError('', ecPeriodExpected, '');
+ Exit;
+ end;
+ if FType.BaseType <> btExtClass then
+ begin
+ Result := nil;
+ MakeError('', ecClassTypeExpected, '');
+ Exit;
+ end;
+ FParser.Next;
+ if not TPSUndefinedClassType(FType).ExtClass.ClassFunc_Find(FParser.GetToken, Idx) then
+ begin
+ Result := nil;
+ MakeError('', ecUnknownIdentifier, FParser.OriginalToken);
+ Exit;
+ end;
+ FParser.Next;
+ TPSUndefinedClassType(FType).ExtClass.ClassFunc_Call(Idx, ProcNo);
+ Temp := TPSValueData.Create;
+ with TPSValueData(Temp) do
+ begin
+ Data := NewVariant(at2ut(FindBaseType(btu32)));
+ Data.tu32 := at2ut(FType).FinalTypeNo;
+ end;
+ ResV := ReadProcParameters(ProcNo, Temp);
+ if ResV <> nil then
+ begin
+ TPSValueProc(Resv).ResultType := at2ut(FType);
+ Result := Resv;
+ end else begin
+ Result := nil;
+ end;
+ end;
+
+ function CheckClassType(TypeNo: TPSType; const ParserPos: Cardinal): TPSValue;
+ var
+ FType2: TPSType;
+ ProcNo, Idx: Cardinal;
+ Temp, ResV: TPSValue;
+ dta: PIfRVariant;
+ begin
+ if typeno.BaseType = btExtClass then
+ begin
+ Result := ExtCheckClassType(TypeNo, PArserPos);
+ exit;
+ end;
+ if FParser.CurrTokenID = CSTI_OpenRound then
+ begin
+ FParser.Next;
+ Temp := Calc(CSTI_CloseRound);
+ if Temp = nil then
+ begin
+ Result := nil;
+ exit;
+ end;
+ if FParser.CurrTokenID <> CSTI_CloseRound then
+ begin
+ temp.Free;
+ MakeError('', ecCloseRoundExpected, '');
+ Result := nil;
+ exit;
+ end;
+ FType2 := GetTypeNo(BlockInfo, Temp);
+ if ((typeno.BaseType = btClass){$IFNDEF PS_NOINTERFACES} or (TypeNo.basetype = btInterface){$ENDIF}) and
+ ((ftype2.BaseType = btClass){$IFNDEF PS_NOINTERFACES} or (ftype2.BaseType = btInterface){$ENDIF}) and (TypeNo <> ftype2) then
+ begin
+{$IFNDEF PS_NOINTERFACES}
+ if FType2.basetype = btClass then
+ begin
+{$ENDIF}
+ if not TPSClassType(FType2).Cl.CastToType(AT2UT(TypeNo), ProcNo) then
+ begin
+ temp.Free;
+ MakeError('', ecTypeMismatch, '');
+ Result := nil;
+ exit;
+ end;
+{$IFNDEF PS_NOINTERFACES}
+ end else begin
+ if not TPSInterfaceType(FType2).Intf.CastToType(AT2UT(TypeNo), ProcNo) then
+ begin
+ temp.Free;
+ MakeError('', ecTypeMismatch, '');
+ Result := nil;
+ exit;
+ end;
+ end;
+{$ENDIF}
+ Result := TPSValueProcNo.Create;
+ TPSValueProcNo(Result).Parameters := TPSParameters.Create;
+ TPSValueProcNo(Result).ResultType := at2ut(TypeNo);
+ TPSValueProcNo(Result).ProcNo := ProcNo;
+ with TPSValueProcNo(Result).Parameters.Add do
+ begin
+ Val := Temp;
+ ExpectedType := GetTypeNo(BlockInfo, temp);
+{$IFDEF DEBUG}
+ if not ExpectedType.Used then asm int 3; end;
+{$ENDIF}
+ end;
+ with TPSValueProcNo(Result).Parameters.Add do
+ begin
+ ExpectedType := at2ut(FindBaseType(btu32));
+{$IFDEF DEBUG}
+ if not ExpectedType.Used then asm int 3; end;
+{$ENDIF}
+ Val := TPSValueData.Create;
+ with TPSValueData(val) do
+ begin
+ SetParserPos(FParser);
+ Data := NewVariant(ExpectedType);
+ Data.tu32 := at2ut(TypeNo).FinalTypeNo;
+ end;
+ end;
+ FParser.Next;
+ Exit;
+ end;
+ if not IsCompatibleType(TypeNo, FType2, True) then
+ begin
+ temp.Free;
+ MakeError('', ecTypeMismatch, '');
+ Result := nil;
+ exit;
+ end;
+ FParser.Next;
+ Result := TPSUnValueOp.Create;
+ with TPSUnValueOp(Result) do
+ begin
+ Operator := otCast;
+ Val1 := Temp;
+ SetParserPos(FParser);
+ aType := AT2UT(TypeNo);
+ end;
+
+ exit;
+ end else
+ if FParser.CurrTokenId <> CSTI_Period then
+ begin
+ Result := TPSValueData.Create;
+ Result.SetParserPos(FParser);
+ New(dta);
+ TPSValueData(Result).Data := dta;
+ InitializeVariant(dta, at2ut(FindBaseType(btType)));
+ dta.ttype := at2ut(TypeNo);
+ Exit;
+ end;
+ if TypeNo.BaseType <> btClass then
+ begin
+ Result := nil;
+ MakeError('', ecClassTypeExpected, '');
+ Exit;
+ end;
+ FParser.Next;
+ if not TPSClassType(TypeNo).Cl.ClassFunc_Find(FParser.GetToken, Idx) then
+ begin
+ Result := nil;
+ MakeError('', ecUnknownIdentifier, FParser.OriginalToken);
+ Exit;
+ end;
+ FParser.Next;
+ TPSClassType(TypeNo).Cl.ClassFunc_Call(Idx, ProcNo);
+ Temp := TPSValueData.Create;
+ with TPSValueData(Temp) do
+ begin
+ Data := NewVariant(at2ut(FindBaseType(btu32)));
+ Data.tu32 := at2ut(TypeNo).FinalTypeNo;
+ end;
+ ResV := ReadProcParameters(ProcNo, Temp);
+ if ResV <> nil then
+ begin
+ TPSValueProc(Resv).ResultType := at2ut(TypeNo);
+ Result := Resv;
+ end else begin
+ Result := nil;
+ end;
+ end;
+
+ var
+ vt: TPSVariableType;
+ vno: Cardinal;
+ TWith, Temp: TPSValue;
+ l, h: Longint;
+ s, u: string;
+ t: TPSConstant;
+ Temp1: TPSType;
+ temp2: CArdinal;
+ bi: TPSBlockInfo;
+ lOldRecCount: Integer;
+
+ begin
+ s := FParser.GetToken;
+
+ if FType <> 1 then
+ begin
+ bi := BlockInfo;
+ while bi <> nil do
+ begin
+ for l := bi.WithList.Count -1 downto 0 do
+ begin
+ TWith := TPSValueAllocatedStackVar.Create;
+ TPSValueAllocatedStackVar(TWith).LocalVarNo := TPSValueAllocatedStackVar(TPSValueReplace(bi.WithList[l]).NewValue).LocalVarNo;
+ Temp := TWith;
+ VNo := TPSValueAllocatedStackVar(Temp).LocalVarNo;
+ lOldRecCount := TPSValueVar(TWith).GetRecCount;
+ vt := ivtVariable;
+ if Temp = TWith then CheckFurther(TWith, True);
+ if Temp = TWith then CheckClass(TWith, vt, vno, True);
+ if Temp = TWith then CheckExtClass(TWith, vt, vno, True);
+ if (Temp <> TWith) or (Cardinal(lOldRecCount) <> TPSValueVar(TWith).GetRecCount) then
+ begin
+ repeat
+ Temp := TWith;
+ if TWith <> nil then CheckFurther(TWith, False);
+ if TWith <> nil then CheckClass(TWith, vt, vno, False);
+ if TWith <> nil then CheckExtClass(TWith, vt, vno, False);
+{$IFNDEF PS_NOIDISPATCH}if TWith <> nil then CheckIntf(TWith, vt, vno, False);{$ENDIF}
+ if TWith <> nil then CheckProcCall(TWith);
+ if TWith <> nil then CheckClassArrayProperty(TWith, vt, vno);
+ vno := InvalidVal;
+ until (TWith = nil) or (Temp = TWith);
+ Result := TWith;
+ Exit;
+ end;
+ TWith.Free;
+ end;
+ bi := bi.FOwner;
+ end;
+ end;
+
+ if s = 'RESULT' then
+ begin
+ if BlockInfo.proc.Decl.Result = nil then
+ begin
+ Result := nil;
+ MakeError('', ecUnknownIdentifier, FParser.OriginalToken);
+ end
+ else
+ begin
+ BlockInfo.Proc.ResultUse;
+ Result := TPSValueParamVar.Create;
+ with TPSValueParamVar(Result) do
+ begin
+ SetParserPos(FParser);
+ ParamNo := 0;
+ end;
+ vno := 0;
+ vt := ivtParam;
+ if @FOnUseVariable <> nil then
+ FOnUseVariable(Self, vt, vno, BlockInfo.ProcNo, FParser.CurrTokenPos, '');
+ FParser.Next;
+ repeat
+ Temp := Result;
+ if Result <> nil then CheckFurther(Result, False);
+ if Result <> nil then CheckClass(Result, vt, vno, False);
+ if Result <> nil then CheckExtClass(Result, vt, vno, False);
+{$IFNDEF PS_NOIDISPATCH}if Result <> nil then CheckIntf(Result, vt, vno, False);{$ENDIF}
+ if Result <> nil then CheckProcCall(Result);
+ if Result <> nil then CheckClassArrayProperty(Result, vt, vno);
+ vno := InvalidVal;
+ until (Result = nil) or (Temp = Result);
+ end;
+ exit;
+ end;
+ if BlockInfo.Proc.Decl.Result = nil then
+ l := 0
+ else
+ l := 1;
+ for h := 0 to BlockInfo.proc.Decl.ParamCount -1 do
+ begin
+ if BlockInfo.proc.Decl.Params[h].Name = s then
+ begin
+ Result := TPSValueParamVar.Create;
+ with TPSValueParamVar(Result) do
+ begin
+ SetParserPos(FParser);
+ ParamNo := l;
+ end;
+ vt := ivtParam;
+ vno := L;
+ if @FOnUseVariable <> nil then
+ FOnUseVariable(Self, vt, vno, BlockInfo.ProcNo, FParser.CurrTokenPos, '');
+ FParser.Next;
+ repeat
+ Temp := Result;
+ if Result <> nil then CheckFurther(Result, False);
+ if Result <> nil then CheckClass(Result, vt, vno, False);
+ if Result <> nil then CheckExtClass(Result, vt, vno, False);
+{$IFNDEF PS_NOIDISPATCH}if Result <> nil then CheckIntf(Result, vt, vno, False);{$ENDIF}
+ if Result <> nil then CheckProcCall(Result);
+ if Result <> nil then CheckClassArrayProperty(Result, vt, vno);
+ vno := InvalidVal;
+ until (Result = nil) or (Temp = Result);
+ exit;
+ end;
+ Inc(l);
+ GRFW(u);
+ end;
+
+ h := MakeHash(s);
+
+ for l := 0 to BlockInfo.Proc.ProcVars.Count - 1 do
+ begin
+ if (PIFPSProcVar(BlockInfo.Proc.ProcVars[l]).NameHash = h) and
+ (PIFPSProcVar(BlockInfo.Proc.ProcVars[l]).Name = s) then
+ begin
+ PIFPSProcVar(BlockInfo.Proc.ProcVars[l]).Use;
+ vno := l;
+ vt := ivtVariable;
+ if @FOnUseVariable <> nil then
+ FOnUseVariable(Self, vt, vno, BlockInfo.ProcNo, FParser.CurrTokenPos, '');
+ Result := TPSValueLocalVar.Create;
+ with TPSValueLocalVar(Result) do
+ begin
+ LocalVarNo := l;
+ SetParserPos(FParser);
+ end;
+ FParser.Next;
+ repeat
+ Temp := Result;
+ if Result <> nil then CheckFurther(Result, False);
+ if Result <> nil then CheckClass(Result, vt, vno, False);
+ if Result <> nil then CheckExtClass(Result, vt, vno, False);
+{$IFNDEF PS_NOIDISPATCH}if Result <> nil then CheckIntf(Result, vt, vno, False);{$ENDIF}
+ if Result <> nil then CheckProcCall(Result);
+ if Result <> nil then CheckClassArrayProperty(Result, vt, vno);
+ vno := InvalidVal;
+ until (Result = nil) or (Temp = Result);
+
+ exit;
+ end;
+ end;
+
+ for l := 0 to FVars.Count - 1 do
+ begin
+ if (TPSVar(FVars[l]).NameHash = h) and
+ (TPSVar(FVars[l]).Name = s) then
+ begin
+ TPSVar(FVars[l]).Use;
+ Result := TPSValueGlobalVar.Create;
+ with TPSValueGlobalVar(Result) do
+ begin
+ SetParserPos(FParser);
+ GlobalVarNo := l;
+
+ end;
+ vt := ivtGlobal;
+ vno := l;
+ if @FOnUseVariable <> nil then
+ FOnUseVariable(Self, vt, vno, BlockInfo.ProcNo, FParser.CurrTokenPos, '');
+ FParser.Next;
+ repeat
+ Temp := Result;
+ if Result <> nil then CheckNotificationVariant(Result);
+ if Result <> nil then CheckFurther(Result, False);
+ if Result <> nil then CheckClass(Result, vt, vno, False);
+ if Result <> nil then CheckExtClass(Result, vt, vno, False);
+{$IFNDEF PS_NOIDISPATCH}if Result <> nil then CheckIntf(Result, vt, vno, False);{$ENDIF}
+ if Result <> nil then CheckProcCall(Result);
+ if Result <> nil then CheckClassArrayProperty(Result, vt, vno);
+ vno := InvalidVal;
+ until (Result = nil) or (Temp = Result);
+ exit;
+ end;
+ end;
+ Temp1 := FindType(FParser.GetToken);
+ if Temp1 <> nil then
+ begin
+ l := FParser.CurrTokenPos;
+ if FType = 1 then
+ begin
+ Result := nil;
+ MakeError('', ecVariableExpected, FParser.OriginalToken);
+ exit;
+ end;
+ vt := ivtGlobal;
+ vno := InvalidVal;
+ FParser.Next;
+ Result := CheckClassType(Temp1, l);
+ repeat
+ Temp := Result;
+ if Result <> nil then CheckFurther(Result, False);
+ if Result <> nil then CheckClass(Result, vt, vno, False);
+ if Result <> nil then CheckExtClass(Result, vt, vno, False);
+{$IFNDEF PS_NOIDISPATCH}if Result <> nil then CheckIntf(Result, vt, vno, False);{$ENDIF}
+ if Result <> nil then CheckProcCall(Result);
+ if Result <> nil then CheckClassArrayProperty(Result, vt, vno);
+ vno := InvalidVal;
+ until (Result = nil) or (Temp = Result);
+
+ exit;
+ end;
+ Temp2 := FindProc(FParser.GetToken);
+ if Temp2 <> InvalidVal then
+ begin
+ if FType = 1 then
+ begin
+ Result := nil;
+ MakeError('', ecVariableExpected, FParser.OriginalToken);
+ exit;
+ end;
+ FParser.Next;
+ Result := ReadProcParameters(Temp2, nil);
+ if Result = nil then
+ exit;
+ Result.SetParserPos(FParser);
+ vt := ivtGlobal;
+ vno := InvalidVal;
+ repeat
+ Temp := Result;
+ if Result <> nil then CheckFurther(Result, False);
+ if Result <> nil then CheckClass(Result, vt, vno, False);
+ if Result <> nil then CheckExtClass(Result, vt, vno, False);
+{$IFNDEF PS_NOIDISPATCH}if Result <> nil then CheckIntf(Result, vt, vno, False);{$ENDIF}
+ if Result <> nil then CheckProcCall(Result);
+ if Result <> nil then CheckClassArrayProperty(Result, vt, vno);
+ vno := InvalidVal;
+ until (Result = nil) or (Temp = Result);
+ exit;
+ end;
+ for l := 0 to FConstants.Count -1 do
+ begin
+ t := TPSConstant(FConstants[l]);
+ if (t.NameHash = h) and (t.Name = s) then
+ begin
+ if FType <> 0 then
+ begin
+ Result := nil;
+ MakeError('', ecVariableExpected, FParser.OriginalToken);
+ exit;
+ end;
+ fparser.next;
+ Result := TPSValueData.Create;
+ with TPSValueData(Result) do
+ begin
+ SetParserPos(FParser);
+ Data := NewVariant(at2ut(t.Value.FType));
+ CopyVariantContents(t.Value, Data);
+ end;
+ vt := ivtGlobal;
+ vno := InvalidVal;
+ repeat
+ Temp := Result;
+ if Result <> nil then CheckFurther(Result, False);
+ if Result <> nil then CheckClass(Result, vt, vno, False);
+ if Result <> nil then CheckExtClass(Result, vt, vno, False);
+{$IFNDEF PS_NOIDISPATCH}if Result <> nil then CheckIntf(Result, vt, vno, False);{$ENDIF}
+ if Result <> nil then CheckProcCall(Result);
+ if Result <> nil then CheckClassArrayProperty(Result, vt, vno);
+ vno := InvalidVal;
+ until (Result = nil) or (Temp = Result);
+ exit;
+ end;
+ end;
+ Result := nil;
+ MakeError('', ecUnknownIdentifier, FParser.OriginalToken);
+ end;
+
+ function calc(endOn: TPSPasToken): TPSValue;
+ function TryEvalConst(var P: TPSValue): Boolean; forward;
+
+
+ function ReadExpression: TPSValue; forward;
+ function ReadTerm: TPSValue; forward;
+ function ReadFactor: TPSValue;
+ var
+ NewVar: TPSValue;
+ NewVarU: TPSUnValueOp;
+ Proc: TPSProcedure;
+ function ReadArray: Boolean;
+ var
+ tmp: TPSValue;
+ begin
+ FParser.Next;
+ NewVar := TPSValueArray.Create;
+ NewVar.SetParserPos(FParser);
+ if FParser.CurrTokenID <> CSTI_CloseBlock then
+ begin
+ while True do
+ begin
+ tmp := nil;
+ Tmp := ReadExpression();
+ if Tmp = nil then
+ begin
+ Result := False;
+ NewVar.Free;
+ exit;
+ end;
+ if not TryEvalConst(tmp) then
+ begin
+ tmp.Free;
+ NewVar.Free;
+ Result := False;
+ exit;
+ end;
+ TPSValueArray(NewVar).Add(tmp);
+ if FParser.CurrTokenID = CSTI_CloseBlock then Break;
+ if FParser.CurrTokenID <> CSTI_Comma then
+ begin
+ MakeError('', ecCloseBlockExpected, '');
+ NewVar.Free;
+ Result := False;
+ exit;
+ end;
+ FParser.Next;
+ end;
+ end;
+ FParser.Next;
+ Result := True;
+ end;
+
+ function CallAssigned(P: TPSValue): TPSValue;
+ var
+ temp: TPSValueProcNo;
+ begin
+ temp := TPSValueProcNo.Create;
+ temp.ProcNo := FindProc('!ASSIGNED');
+ temp.ResultType := at2ut(FDefaultBoolType);
+ temp.Parameters := TPSParameters.Create;
+ with Temp.Parameters.Add do
+ begin
+ Val := p;
+ ExpectedType := GetTypeNo(BlockInfo, p);
+{$IFDEF DEBUG}
+ if not ExpectedType.Used then asm int 3; end;
+{$ENDIF}
+ FParamMode := pmIn;
+ end;
+ Result := Temp;
+ end;
+
+ function CallSucc(P: TPSValue): TPSValue;
+ var
+ temp: TPSBinValueOp;
+ begin
+ temp := TPSBinValueOp.Create;
+ temp.SetParserPos(FParser);
+ temp.FOperator := otAdd;
+ temp.FVal2 := TPSValueData.Create;
+ TPSValueData(Temp.FVal2).Data := NewVariant(FindBaseType(bts32));
+ TPSValueData(Temp.FVal2).Data.ts32 := 1;
+ temp.FVal1 := p;
+ Temp.FType := GetTypeNo(BlockInfo, P);
+ result := temp;
+ end;
+
+ function CallPred(P: TPSValue): TPSValue;
+ var
+ temp: TPSBinValueOp;
+ begin
+ temp := TPSBinValueOp.Create;
+ temp.SetParserPos(FParser);
+ temp.FOperator := otSub;
+ temp.FVal2 := TPSValueData.Create;
+ TPSValueData(Temp.FVal2).Data := NewVariant(FindBaseType(bts32));
+ TPSValueData(Temp.FVal2).Data.ts32 := 1;
+ temp.FVal1 := p;
+ Temp.FType := GetTypeNo(BlockInfo, P);
+ result := temp;
+ end;
+
+ begin
+ case fParser.CurrTokenID of
+ CSTI_OpenBlock:
+ begin
+ if not ReadArray then
+ begin
+ Result := nil;
+ exit;
+ end;
+ end;
+ CSTII_Not:
+ begin
+ FParser.Next;
+ NewVar := ReadFactor;
+ if NewVar = nil then
+ begin
+ Result := nil;
+ exit;
+ end;
+ NewVarU := TPSUnValueOp.Create;
+ NewVarU.SetParserPos(FParser);
+ NewVarU.aType := GetTypeNo(BlockInfo, NewVar);
+ NewVarU.Operator := otNot;
+ NewVarU.Val1 := NewVar;
+ NewVar := NewVarU;
+ end;
+ CSTI_Plus:
+ begin
+ FParser.Next;
+ NewVar := ReadTerm;
+ if NewVar = nil then
+ begin
+ Result := nil;
+ exit;
+ end;
+ end;
+ CSTI_Minus:
+ begin
+ FParser.Next;
+ NewVar := ReadTerm;
+ if NewVar = nil then
+ begin
+ Result := nil;
+ exit;
+ end;
+ NewVarU := TPSUnValueOp.Create;
+ NewVarU.SetParserPos(FParser);
+ NewVarU.aType := GetTypeNo(BlockInfo, NewVar);
+ NewVarU.Operator := otMinus;
+ NewVarU.Val1 := NewVar;
+ NewVar := NewVarU;
+ end;
+ CSTII_Nil:
+ begin
+ FParser.Next;
+ NewVar := TPSValueNil.Create;
+ NewVar.SetParserPos(FParser);
+ end;
+ CSTI_AddressOf:
+ begin
+ FParser.Next;
+ if FParser.CurrTokenID <> CSTI_Identifier then
+ begin
+ MakeError('', ecIdentifierExpected, '');
+ Result := nil;
+ exit;
+ end;
+ NewVar := TPSValueProcPtr.Create;
+ NewVar.SetParserPos(FParser);
+ TPSValueProcPtr(NewVar).ProcPtr := FindProc(FParser.GetToken);
+ if TPSValueProcPtr(NewVar).ProcPtr = InvalidVal then
+ begin
+ MakeError('', ecUnknownIdentifier, FParser.OriginalToken);
+ NewVar.Free;
+ Result := nil;
+ exit;
+ end;
+ Proc := FProcs[TPSValueProcPtr(NewVar).ProcPtr];
+ if Proc.ClassType <> TPSInternalProcedure then
+ begin
+ MakeError('', ecUnknownIdentifier, FParser.OriginalToken);
+ NewVar.Free;
+ Result := nil;
+ exit;
+ end;
+ FParser.Next;
+ end;
+ CSTI_OpenRound:
+ begin
+ FParser.Next;
+ NewVar := ReadExpression();
+ if NewVar = nil then
+ begin
+ Result := nil;
+ exit;
+ end;
+ if FParser.CurrTokenId <> CSTI_CloseRound then
+ begin
+ NewVar.Free;
+ Result := nil;
+ MakeError('', ecCloseRoundExpected, '');
+ exit;
+ end;
+ FParser.Next;
+ end;
+ CSTI_Char, CSTI_String:
+ begin
+ NewVar := TPSValueData.Create;
+ NewVar.SetParserPos(FParser);
+ TPSValueData(NewVar).Data := ReadString;
+ if TPSValueData(NewVar).Data = nil then
+ begin
+ NewVar.Free;
+ Result := nil;
+ exit;
+ end;
+ end;
+ CSTI_HexInt, CSTI_Integer:
+ begin
+ NewVar := TPSValueData.Create;
+ NewVar.SetParserPos(FParser);
+ TPSValueData(NewVar).Data := ReadInteger(FParser.GetToken);
+ FParser.Next;
+ end;
+ CSTI_Real:
+ begin
+ NewVar := TPSValueData.Create;
+ NewVar.SetParserPos(FParser);
+ TPSValueData(NewVar).Data := ReadReal(FParser.GetToken);
+ FParser.Next;
+ end;
+ CSTII_Ord:
+ begin
+ FParser.Next;
+ if fParser.Currtokenid <> CSTI_OpenRound then
+ begin
+ Result := nil;
+ MakeError('', ecOpenRoundExpected, '');
+ exit;
+ end;
+ FParser.Next;
+ NewVar := ReadExpression();
+ if NewVar = nil then
+ begin
+ Result := nil;
+ exit;
+ end;
+ if FParser.CurrTokenId <> CSTI_CloseRound then
+ begin
+ NewVar.Free;
+ Result := nil;
+ MakeError('', ecCloseRoundExpected, '');
+ exit;
+ end;
+ if not ((GetTypeNo(BlockInfo, NewVar).BaseType = btChar) or
+ {$IFNDEF PS_NOWIDESTRING} (GetTypeNo(BlockInfo, NewVar).BaseType = btWideChar) or{$ENDIF}
+ (GetTypeNo(BlockInfo, NewVar).BaseType = btEnum) or (IsIntType(GetTypeNo(BlockInfo, NewVar).BaseType))) then
+ begin
+ NewVar.Free;
+ Result := nil;
+ MakeError('', ecTypeMismatch, '');
+ exit;
+ end;
+ NewVarU := TPSUnValueOp.Create;
+ NewVarU.SetParserPos(FParser);
+ NewVarU.Operator := otCast;
+ NewVarU.FType := at2ut(FindBaseType(btu32));
+ NewVarU.Val1 := NewVar;
+ NewVar := NewVarU;
+ FParser.Next;
+ end;
+ CSTII_Chr:
+ begin
+ FParser.Next;
+ if fParser.Currtokenid <> CSTI_OpenRound then
+ begin
+ Result := nil;
+ MakeError('', ecOpenRoundExpected, '');
+ exit;
+ end;
+ FParser.Next;
+ NewVar := ReadExpression();
+ if NewVar = nil then
+ begin
+ Result := nil;
+ exit;
+ end;
+ if FParser.CurrTokenId <> CSTI_CloseRound then
+ begin
+ NewVar.Free;
+ Result := nil;
+ MakeError('', ecCloseRoundExpected, '');
+ exit;
+ end;
+ if not (IsIntType(GetTypeNo(BlockInfo, NewVar).BaseType)) then
+ begin
+ NewVar.Free;
+ Result := nil;
+ MakeError('', ecTypeMismatch, '');
+ exit;
+ end;
+ NewVarU := TPSUnValueOp.Create;
+ NewVarU.SetParserPos(FParser);
+ NewVarU.Operator := otCast;
+ NewVarU.FType := at2ut(FindBaseType(btChar));
+ NewVarU.Val1 := NewVar;
+ NewVar := NewVarU;
+ FParser.Next;
+ end;
+ CSTI_Identifier:
+ begin
+ if FParser.GetToken = 'SUCC' then
+ begin
+ FParser.Next;
+ if FParser.CurrTokenID <> CSTI_OpenRound then
+ begin
+ Result := nil;
+ MakeError('', ecOpenRoundExpected, '');
+ exit;
+ end;
+ FParser.Next;
+ NewVar := ReadExpression;
+ if NewVar = nil then
+ begin
+ result := nil;
+ exit;
+ end;
+ if (GetTypeNo(BlockInfo, NewVar) = nil) or (not IsIntType(GetTypeNo(BlockInfo, NewVar).BaseType) and
+ (GetTypeNo(BlockInfo, NewVar).BaseType <> btEnum)) then
+ begin
+ NewVar.Free;
+ Result := nil;
+ MakeError('', ecTypeMismatch, '');
+ exit;
+ end;
+ if FParser.CurrTokenID <> CSTI_CloseRound then
+ begin
+ NewVar.Free;
+ Result := nil;
+ MakeError('', eccloseRoundExpected, '');
+ exit;
+ end;
+ NewVar := CallSucc(NewVar);
+ FParser.Next;
+ end else
+ if FParser.GetToken = 'PRED' then
+ begin
+ FParser.Next;
+ if FParser.CurrTokenID <> CSTI_OpenRound then
+ begin
+ Result := nil;
+ MakeError('', ecOpenRoundExpected, '');
+ exit;
+ end;
+ FParser.Next;
+ NewVar := ReadExpression;
+ if NewVar = nil then
+ begin
+ result := nil;
+ exit;
+ end;
+ if (GetTypeNo(BlockInfo, NewVar) = nil) or (not IsIntType(GetTypeNo(BlockInfo, NewVar).BaseType) and
+ (GetTypeNo(BlockInfo, NewVar).BaseType <> btEnum)) then
+ begin
+ NewVar.Free;
+ Result := nil;
+ MakeError('', ecTypeMismatch, '');
+ exit;
+ end;
+ if FParser.CurrTokenID <> CSTI_CloseRound then
+ begin
+ NewVar.Free;
+ Result := nil;
+ MakeError('', eccloseRoundExpected, '');
+ exit;
+ end;
+ NewVar := CallPred(NewVar);
+ FParser.Next;
+ end else
+ if FParser.GetToken = 'ASSIGNED' then
+ begin
+ FParser.Next;
+ if FParser.CurrTokenID <> CSTI_OpenRound then
+ begin
+ Result := nil;
+ MakeError('', ecOpenRoundExpected, '');
+ exit;
+ end;
+ FParser.Next;
+ NewVar := GetIdentifier(0);
+ if NewVar = nil then
+ begin
+ result := nil;
+ exit;
+ end;
+ if (GetTypeNo(BlockInfo, NewVar) = nil) or ((GetTypeNo(BlockInfo, NewVar).BaseType <> btClass) and
+ (GetTypeNo(BlockInfo, NewVar).BaseType <> btPChar) and
+ (GetTypeNo(BlockInfo, NewVar).BaseType <> btString)) then
+ begin
+ NewVar.Free;
+ Result := nil;
+ MakeError('', ecTypeMismatch, '');
+ exit;
+ end;
+ if FParser.CurrTokenID <> CSTI_CloseRound then
+ begin
+ NewVar.Free;
+ Result := nil;
+ MakeError('', eccloseRoundExpected, '');
+ exit;
+ end;
+ NewVar := CallAssigned(NewVar);
+ FParser.Next;
+ end else
+ begin
+ NewVar := GetIdentifier(0);
+ if NewVar = nil then
+ begin
+ Result := nil;
+ exit;
+ end;
+ end;
+ end;
+ else
+ begin
+ MakeError('', ecSyntaxError, '');
+ Result := nil;
+ exit;
+ end;
+ end; {case}
+ Result := NewVar;
+ end; // ReadFactor
+
+ function GetResultType(p1, P2: TPSValue; Cmd: TPSBinOperatorType): TPSType;
+ var
+ pp, t1, t2: PIFPSType;
+ begin
+ t1 := GetTypeNo(BlockInfo, p1);
+ t2 := GetTypeNo(BlockInfo, P2);
+ if (t1 = nil) or (t2 = nil) then
+ begin
+ if ((p1.ClassType = TPSValueNil) or (p2.ClassType = TPSValueNil)) and ((t1 <> nil) or (t2 <> nil)) then
+ begin
+ if p1.ClassType = TPSValueNil then
+ pp := t2
+ else
+ pp := t1;
+ if (pp.BaseType = btPchar) or (pp.BaseType = btString) or (pp.BaseType = btClass) {$IFNDEF PS_NOINTERFACES}or (pp.BaseType =btInterface){$ENDIF} or (pp.BaseType = btProcPtr) then
+ Result := AT2UT(FDefaultBoolType)
+ else
+ Result := nil;
+ exit;
+ end;
+ Result := nil;
+ exit;
+ end;
+ case Cmd of
+ otAdd: {plus}
+ begin
+ if ((t1.BaseType = btVariant) or (t1.BaseType = btNotificationVariant)) and (
+ ((t2.BaseType = btVariant) or (t2.BaseType = btNotificationVariant)) or
+ (t2.BaseType = btString) or
+ {$IFNDEF PS_NOWIDESTRING}
+ (t2.BaseType = btwideString) or
+ (t2.BaseType = btwidechar) or
+ {$ENDIF}
+ (t2.BaseType = btPchar) or
+ (t2.BaseType = btChar) or
+ (isIntRealType(t2.BaseType))) then
+ Result := t1
+ else
+ if ((t2.BaseType = btVariant) or (t2.BaseType = btNotificationVariant)) and (
+ ((t1.BaseType = btVariant) or (t1.BaseType = btNotificationVariant)) or
+ (t1.BaseType = btString) or
+ {$IFNDEF PS_NOWIDESTRING}
+ (t1.BaseType = btwideString) or
+ (t1.BaseType = btwidechar) or
+ {$ENDIF}
+ (t1.BaseType = btPchar) or
+ (t1.BaseType = btChar) or
+ (isIntRealType(t1.BaseType))) then
+ Result := t2
+ else if ((t1.BaseType = btSet) and (t2.BaseType = btSet)) and (t1 = t2) then
+ Result := t1
+ else if IsIntType(t1.BaseType) and IsIntType(t2.BaseType) then
+ Result := t1
+ else if IsIntRealType(t1.BaseType) and
+ IsIntRealType(t2.BaseType) then
+ begin
+ if IsRealType(t1.BaseType) then
+ Result := t1
+ else
+ Result := t2;
+ end
+ else if (t1.basetype = btSet) and (t2.Name = 'TVARIANTARRAY') then
+ Result := t1
+ else if (t2.basetype = btSet) and (t1.Name = 'TVARIANTARRAY') then
+ Result := t2
+ else if ((t1.BaseType = btPchar) or(t1.BaseType = btString) or (t1.BaseType = btChar)) and ((t2.BaseType = btPchar) or(t2.BaseType = btString) or (t2.BaseType = btChar)) then
+ Result := at2ut(FindBaseType(btString))
+ {$IFNDEF PS_NOWIDESTRING}
+ else if ((t1.BaseType = btString) or (t1.BaseType = btChar) or (t1.BaseType = btPchar)or (t1.BaseType = btWideString) or (t1.BaseType = btWideChar)) and
+ ((t2.BaseType = btString) or (t2.BaseType = btChar) or (t2.BaseType = btPchar) or (t2.BaseType = btWideString) or (t2.BaseType = btWideChar)) then
+ Result := at2ut(FindBaseType(btWideString))
+ {$ENDIF}
+ else
+ Result := nil;
+ end;
+ otSub, otMul, otDiv: { - * / }
+ begin
+ if ((t1.BaseType = btVariant) or (t1.BaseType = btNotificationVariant)) and (
+ ((t2.BaseType = btVariant) or (t2.BaseType = btNotificationVariant)) or
+ (isIntRealType(t2.BaseType))) then
+ Result := t1
+ else if ((t1.BaseType = btSet) and (t2.BaseType = btSet)) and (t1 = t2) and ((cmd = otSub) or (cmd = otMul)) then
+ Result := t1
+ else if (t1.basetype = btSet) and (t2.Name = 'TVARIANTARRAY') and ((cmd = otSub) or (cmd = otMul)) then
+ Result := t1
+ else if (t2.basetype = btSet) and (t1.Name = 'TVARIANTARRAY') and ((cmd = otSub) or (cmd = otMul)) then
+ Result := t2
+ else
+ if ((t2.BaseType = btVariant) or (t2.BaseType = btNotificationVariant)) and (
+ ((t1.BaseType = btVariant) or (t1.BaseType = btNotificationVariant)) or
+ (isIntRealType(t1.BaseType))) then
+ Result := t2
+ else if IsIntType(t1.BaseType) and IsIntType(t2.BaseType) then
+ Result := t1
+ else if IsIntRealType(t1.BaseType) and
+ IsIntRealType(t2.BaseType) then
+ begin
+ if IsRealType(t1.BaseType) then
+ Result := t1
+ else
+ Result := t2;
+ end
+ else
+ Result := nil;
+ end;
+ otAnd, otOr, otXor: {and,or,xor}
+ begin
+ if ((t1.BaseType = btVariant) or (t1.BaseType = btNotificationVariant)) and (
+ ((t2.BaseType = btVariant) or (t2.BaseType = btNotificationVariant)) or
+ (isIntType(t2.BaseType))) then
+ Result := t1
+ else
+ if ((t2.BaseType = btVariant) or (t2.BaseType = btNotificationVariant)) and (
+ ((t1.BaseType = btVariant) or (t1.BaseType = btNotificationVariant)) or
+ (isIntType(t1.BaseType))) then
+ Result := t2
+ else if IsIntType(t1.BaseType) and IsIntType(t2.BaseType) then
+ Result := t1
+ else if (IsBoolean(t1)) and ((t2 = t1) or ((t2.BaseType = btVariant)
+ or (t2.BaseType = btNotificationVariant))) then
+ begin
+ Result := t1;
+ if ((p1.ClassType = TPSValueData) or (p2.ClassType = TPSValueData)) then
+ begin
+ if cmd = otAnd then {and}
+ begin
+ if p1.ClassType = TPSValueData then
+ begin
+ if (TPSValueData(p1).FData^.tu8 <> 0) then
+ begin
+ with MakeWarning('', ewIsNotNeeded, '"True and"') do
+ begin
+ FRow := p1.Row;
+ FCol := p1.Col;
+ FPosition := p1.Pos;
+ end;
+ end else
+ begin
+ with MakeWarning('', ewCalculationAlwaysEvaluatesTo, 'False') do
+ begin
+ FRow := p1.Row;
+ FCol := p1.Col;
+ FPosition := p1.Pos;
+ end;
+ end;
+ end else begin
+ if (TPSValueData(p2).Data.tu8 <> 0) then
+ begin
+ with MakeWarning('', ewIsNotNeeded, '"and True"') do
+ begin
+ FRow := p1.Row;
+ FCol := p1.Col;
+ FPosition := p1.Pos;
+ end;
+ end
+ else
+ begin
+ with MakeWarning('', ewCalculationAlwaysEvaluatesTo, 'False') do
+ begin
+ FRow := p1.Row;
+ FCol := p1.Col;
+ FPosition := p1.Pos;
+ end;
+ end;
+ end;
+ end else if cmd = otOr then {or}
+ begin
+ if p1.ClassType = TPSValueData then
+ begin
+ if (TPSValueData(p1).Data.tu8 <> 0) then
+ begin
+ with MakeWarning('', ewCalculationAlwaysEvaluatesTo, 'True') do
+ begin
+ FRow := p1.Row;
+ FCol := p1.Col;
+ FPosition := p1.Pos;
+ end;
+ end
+ else
+ begin
+ with MakeWarning('', ewIsNotNeeded, '"False or"') do
+ begin
+ FRow := p1.Row;
+ FCol := p1.Col;
+ FPosition := p1.Pos;
+ end;
+ end
+ end else begin
+ if (TPSValueData(p2).Data.tu8 <> 0) then
+ begin
+ with MakeWarning('', ewCalculationAlwaysEvaluatesTo, 'True') do
+ begin
+ FRow := p1.Row;
+ FCol := p1.Col;
+ FPosition := p1.Pos;
+ end;
+ end
+ else
+ begin
+ with MakeWarning('', ewIsNotNeeded, '"or False"') do
+ begin
+ FRow := p1.Row;
+ FCol := p1.Col;
+ FPosition := p1.Pos;
+ end;
+ end
+ end;
+ end;
+ end;
+ end else
+ Result := nil;
+ end;
+ otMod, otShl, otShr: {mod,shl,shr}
+ begin
+ if ((t1.BaseType = btVariant) or (t1.BaseType = btNotificationVariant)) and (
+ ((t2.BaseType = btVariant) or (t2.BaseType = btNotificationVariant)) or
+ (isIntType(t2.BaseType))) then
+ Result := t1
+ else
+ if ((t2.BaseType = btVariant) or (t2.BaseType = btNotificationVariant)) and (
+ ((t1.BaseType = btVariant) or (t1.BaseType = btNotificationVariant)) or
+ (isIntType(t1.BaseType))) then
+ Result := t2
+ else if IsIntType(t1.BaseType) and IsIntType(t2.BaseType) then
+ Result := t1
+ else
+ Result := nil;
+ end;
+ otGreater, otLess, otGreaterEqual, otLessEqual: { >=, <=, >, <}
+ begin
+ if ((t1.BaseType = btVariant) or (t1.BaseType = btNotificationVariant)) and (
+ ((t2.BaseType = btVariant) or (t2.BaseType = btNotificationVariant)) or
+ (t2.BaseType = btString) or
+ (t2.BaseType = btPchar) or
+ (t2.BaseType = btChar) or
+ (isIntRealType(t2.BaseType))) then
+ Result := FDefaultBoolType
+ else if ((t1.BaseType = btSet) and (t2.BaseType = btSet)) and (t1 = t2) and ((cmd = otGreaterEqual) or (cmd = otLessEqual)) then
+ Result := FDefaultBoolType
+ else
+ if ((t2.BaseType = btVariant) or (t2.BaseType = btNotificationVariant)) and (
+ ((t1.BaseType = btVariant) or (t1.BaseType = btNotificationVariant)) or
+ (t1.BaseType = btString) or
+ (t1.BaseType = btPchar) or
+ (t1.BaseType = btChar) or
+ (isIntRealType(t1.BaseType))) then
+ Result := FDefaultBoolType
+ else if IsIntType(t1.BaseType) and IsIntType(t2.BaseType) then
+ Result := FDefaultBoolType
+ else if IsIntRealType(t1.BaseType) and
+ IsIntRealType(t2.BaseType) then
+ Result := FDefaultBoolType
+ else if
+ ((t1.BaseType = btString) or (t1.BaseType = btChar) {$IFNDEF PS_NOWIDESTRING} or (t1.BaseType = btWideString) or (t1.BaseType = btWideChar){$ENDIF}) and
+ ((t2.BaseType = btString) or (t2.BaseType = btChar) {$IFNDEF PS_NOWIDESTRING} or (t2.BaseType = btWideString) or (t2.BaseType = btWideChar){$ENDIF}) then
+ Result := FDefaultBoolType
+ else if ((t1.BaseType = btVariant) or (t1.BaseType = btNotificationVariant)) or ((t2.BaseType = btVariant) or (t2.BaseType = btNotificationVariant)) then
+ Result := FDefaultBoolType
+ else
+ Result := nil;
+ end;
+ otEqual, otNotEqual: {=, <>}
+ begin
+ if ((t1.BaseType = btVariant) or (t1.BaseType = btNotificationVariant)) and (
+ ((t2.BaseType = btVariant) or (t2.BaseType = btNotificationVariant)) or
+ (t2.BaseType = btString) or
+ (t2.BaseType = btPchar) or
+ (t2.BaseType = btChar) or
+ (isIntRealType(t2.BaseType))) then
+ Result := FDefaultBoolType
+ else if ((t1.BaseType = btSet) and (t2.BaseType = btSet)) and (t1 = t2) then
+ Result := FDefaultBoolType
+ else
+ if ((t2.BaseType = btVariant) or (t2.BaseType = btNotificationVariant)) and (
+ ((t1.BaseType = btVariant) or (t1.BaseType = btNotificationVariant)) or
+ (t1.BaseType = btString) or
+ (t1.BaseType = btPchar) or
+ (t1.BaseType = btChar) or
+ (isIntRealType(t1.BaseType))) then
+ Result := FDefaultBoolType
+ else if IsIntType(t1.BaseType) and IsIntType(t2.BaseType) then
+ Result := FDefaultBoolType
+ else if IsIntRealType(t1.BaseType) and
+ IsIntRealType(t2.BaseType) then
+ Result := FDefaultBoolType
+ else if
+ ((t1.BaseType = btString) or (t1.BaseType = btChar) {$IFNDEF PS_NOWIDESTRING} or (t1.BaseType = btWideString) or (t1.BaseType = btWideChar){$ENDIF}) and
+ ((t2.BaseType = btString) or (t2.BaseType = btChar) {$IFNDEF PS_NOWIDESTRING} or (t2.BaseType = btWideString) or (t2.BaseType = btWideChar){$ENDIF}) then
+ Result := FDefaultBoolType
+ else if (t1.basetype = btSet) and (t2.Name = 'TVARIANTARRAY') then
+ Result := FDefaultBoolType
+ else if (t2.basetype = btSet) and (t1.Name = 'TVARIANTARRAY') then
+ Result := FDefaultBoolType
+ else if (t1.BaseType = btEnum) and (t1 = t2) then
+ Result := FDefaultBoolType
+ else if (t1.BaseType = btClass) and (t2.BaseType = btClass) then
+ Result := FDefaultBoolType
+ else if ((t1.BaseType = btVariant) or (t1.BaseType = btNotificationVariant)) or ((t2.BaseType = btVariant) or (t2.BaseType = btNotificationVariant)) then
+ Result := FDefaultBoolType
+ else Result := nil;
+ end;
+ otIn:
+ begin
+ if (t2.BaseType = btSet) and (TPSSetType(t2).SetType = t1) then
+ Result := FDefaultBoolType
+ else
+ Result := nil;
+ end;
+ otIs:
+ begin
+ if t2.BaseType = btType then
+ begin
+ Result := FDefaultBoolType
+ end else
+ Result := nil;
+ end;
+ otAs:
+ begin
+ if t2.BaseType = btType then
+ begin
+ Result := at2ut(TPSValueData(p2).Data.ttype);
+ end else
+ Result := nil;
+ end;
+ else
+ Result := nil;
+ end;
+ end;
+
+
+ function ReadTerm: TPSValue;
+ var
+ F1, F2: TPSValue;
+ F: TPSBinValueOp;
+ Token: TPSPasToken;
+ Op: TPSBinOperatorType;
+ begin
+ F1 := ReadFactor;
+ if F1 = nil then
+ begin
+ Result := nil;
+ exit;
+ end;
+ while FParser.CurrTokenID in [CSTI_Multiply, CSTI_Divide, CSTII_Div, CSTII_Mod, CSTII_And, CSTII_Shl, CSTII_Shr, CSTII_As] do
+ begin
+ Token := FParser.CurrTokenID;
+ FParser.Next;
+ F2 := ReadFactor;
+ if f2 = nil then
+ begin
+ f1.Free;
+ Result := nil;
+ exit;
+ end;
+ case Token of
+ CSTI_Multiply: Op := otMul;
+ CSTII_div, CSTI_Divide: Op := otDiv;
+ CSTII_mod: Op := otMod;
+ CSTII_and: Op := otAnd;
+ CSTII_shl: Op := otShl;
+ CSTII_shr: Op := otShr;
+ CSTII_As: Op := otAs;
+ else
+ Op := otAdd;
+ end;
+ F := TPSBinValueOp.Create;
+ f.Val1 := F1;
+ f.Val2 := F2;
+ f.Operator := Op;
+ f.aType := GetResultType(F1, F2, Op);
+ if f.aType = nil then
+ begin
+ MakeError('', ecTypeMismatch, '');
+ f.Free;
+ Result := nil;
+ exit;
+ end;
+ f1 := f;
+ end;
+ Result := F1;
+ end; // ReadTerm
+
+ function ReadSimpleExpression: TPSValue;
+ var
+ F1, F2: TPSValue;
+ F: TPSBinValueOp;
+ Token: TPSPasToken;
+ Op: TPSBinOperatorType;
+ begin
+ F1 := ReadTerm;
+ if F1 = nil then
+ begin
+ Result := nil;
+ exit;
+ end;
+ while FParser.CurrTokenID in [CSTI_Plus, CSTI_Minus, CSTII_Or, CSTII_Xor] do
+ begin
+ Token := FParser.CurrTokenID;
+ FParser.Next;
+ F2 := ReadTerm;
+ if f2 = nil then
+ begin
+ f1.Free;
+ Result := nil;
+ exit;
+ end;
+ case Token of
+ CSTI_Plus: Op := otAdd;
+ CSTI_Minus: Op := otSub;
+ CSTII_or: Op := otOr;
+ CSTII_xor: Op := otXor;
+ else
+ Op := otAdd;
+ end;
+ F := TPSBinValueOp.Create;
+ f.Val1 := F1;
+ f.Val2 := F2;
+ f.Operator := Op;
+ f.aType := GetResultType(F1, F2, Op);
+ if f.aType = nil then
+ begin
+ MakeError('', ecTypeMismatch, '');
+ f.Free;
+ Result := nil;
+ exit;
+ end;
+ f1 := f;
+ end;
+ Result := F1;
+ end; // ReadSimpleExpression
+
+
+ function ReadExpression: TPSValue;
+ var
+ F1, F2: TPSValue;
+ F: TPSBinValueOp;
+ Token: TPSPasToken;
+ Op: TPSBinOperatorType;
+ begin
+ F1 := ReadSimpleExpression;
+ if F1 = nil then
+ begin
+ Result := nil;
+ exit;
+ end;
+ while FParser.CurrTokenID in [ CSTI_GreaterEqual, CSTI_LessEqual, CSTI_Greater, CSTI_Less, CSTI_Equal, CSTI_NotEqual, CSTII_in, CSTII_is] do
+ begin
+ Token := FParser.CurrTokenID;
+ FParser.Next;
+ F2 := ReadSimpleExpression;
+ if f2 = nil then
+ begin
+ f1.Free;
+ Result := nil;
+ exit;
+ end;
+ case Token of
+ CSTI_GreaterEqual: Op := otGreaterEqual;
+ CSTI_LessEqual: Op := otLessEqual;
+ CSTI_Greater: Op := otGreater;
+ CSTI_Less: Op := otLess;
+ CSTI_Equal: Op := otEqual;
+ CSTI_NotEqual: Op := otNotEqual;
+ CSTII_in: Op := otIn;
+ CSTII_is: Op := otIs;
+ else
+ Op := otAdd;
+ end;
+ F := TPSBinValueOp.Create;
+ f.Val1 := F1;
+ f.Val2 := F2;
+ f.Operator := Op;
+ f.aType := GetResultType(F1, F2, Op);
+ if f.aType = nil then
+ begin
+ MakeError('', ecTypeMismatch, '');
+ f.Free;
+ Result := nil;
+ exit;
+ end;
+ f1 := f;
+ end;
+ Result := F1;
+ end; // ReadExpression
+
+ function TryEvalConst(var P: TPSValue): Boolean;
+ var
+ preplace: TPSValue;
+ begin
+ if p is TPSBinValueOp then
+ begin
+ if not (TryEvalConst(TPSBinValueOp(p).FVal1) and TryEvalConst(TPSBinValueOp(p).FVal2)) then
+ begin
+ Result := False;
+ exit;
+ end;
+ if (TPSBinValueOp(p).FVal1.ClassType = TPSValueData) and (TPSBinValueOp(p).FVal2.ClassType = TPSValueData) then
+ begin
+ if not PreCalc(True, 0, TPSValueData(TPSBinValueOp(p).Val1).Data, 0, TPSValueData(TPSBinValueOp(p).Val2).Data, TPSBinValueOp(p).Operator, p.Pos, p.Row, p.Col) then
+ begin
+ Result := False;
+ exit;
+ end;
+ preplace := TPSValueData.Create;
+ preplace.Pos := p.Pos;
+ preplace.Row := p.Row;
+ preplace.Col := p.Col;
+ TPSValueData(preplace).Data := TPSValueData(TPSBinValueOp(p).Val1).Data;
+ TPSValueData(TPSBinValueOp(p).Val1).Data := nil;
+ p.Free;
+ p := preplace;
+ end;
+ end else if p is TPSUnValueOp then
+ begin
+ if not TryEvalConst(TPSUnValueOp(p).FVal1) then
+ begin
+ Result := False;
+ exit;
+ end;
+ if TPSUnValueOp(p).FVal1.ClassType = TPSValueData then
+ begin
+//
+ case TPSUnValueOp(p).Operator of
+ otNot:
+ begin
+ case TPSValueData(TPSUnValueOp(p).FVal1).Data^.FType.BaseType of
+ btEnum:
+ begin
+ if IsBoolean(TPSValueData(TPSUnValueOp(p).FVal1).Data^.FType) then
+ begin
+ TPSValueData(TPSUnValueOp(p).FVal1).Data^.tu8 := (not TPSValueData(TPSUnValueOp(p).FVal1).Data^.tu8) and 1;
+ end else
+ begin
+ MakeError('', ecTypeMismatch, '');
+ Result := False;
+ exit;
+ end;
+ end;
+ btU8: TPSValueData(TPSUnValueOp(p).FVal1).Data^.tu8 := not TPSValueData(TPSUnValueOp(p).FVal1).Data^.tu8;
+ btU16: TPSValueData(TPSUnValueOp(p).FVal1).Data^.tu16 := not TPSValueData(TPSUnValueOp(p).FVal1).Data^.tu16;
+ btU32: TPSValueData(TPSUnValueOp(p).FVal1).Data^.tu32 := not TPSValueData(TPSUnValueOp(p).FVal1).Data^.tu32;
+ bts8: TPSValueData(TPSUnValueOp(p).FVal1).Data^.ts8 := not TPSValueData(TPSUnValueOp(p).FVal1).Data^.ts8;
+ bts16: TPSValueData(TPSUnValueOp(p).FVal1).Data^.ts16 := not TPSValueData(TPSUnValueOp(p).FVal1).Data^.ts16;
+ bts32: TPSValueData(TPSUnValueOp(p).FVal1).Data^.ts32 := not TPSValueData(TPSUnValueOp(p).FVal1).Data^.ts32;
+ {$IFNDEF PS_NOINT64}
+ bts64: TPSValueData(TPSUnValueOp(p).FVal1).Data^.ts64 := not TPSValueData(TPSUnValueOp(p).FVal1).Data^.ts64;
+ {$ENDIF}
+ else
+ begin
+ MakeError('', ecTypeMismatch, '');
+ Result := False;
+ exit;
+ end;
+ end;
+ preplace := TPSUnValueOp(p).Val1;
+ TPSUnValueOp(p).Val1 := nil;
+ p.Free;
+ p := preplace;
+ end;
+ otMinus:
+ begin
+ case TPSValueData(TPSUnValueOp(p).FVal1).Data^.FType.BaseType of
+ btU8: TPSValueData(TPSUnValueOp(p).FVal1).Data^.tu8 := -TPSValueData(TPSUnValueOp(p).FVal1).Data^.tu8;
+ btU16: TPSValueData(TPSUnValueOp(p).FVal1).Data^.tu16 := -TPSValueData(TPSUnValueOp(p).FVal1).Data^.tu16;
+ btU32: TPSValueData(TPSUnValueOp(p).FVal1).Data^.tu32 := -TPSValueData(TPSUnValueOp(p).FVal1).Data^.tu32;
+ bts8: TPSValueData(TPSUnValueOp(p).FVal1).Data^.ts8 := -TPSValueData(TPSUnValueOp(p).FVal1).Data^.ts8;
+ bts16: TPSValueData(TPSUnValueOp(p).FVal1).Data^.ts16 := -TPSValueData(TPSUnValueOp(p).FVal1).Data^.ts16;
+ bts32: TPSValueData(TPSUnValueOp(p).FVal1).Data^.ts32 := -TPSValueData(TPSUnValueOp(p).FVal1).Data^.ts32;
+ {$IFNDEF PS_NOINT64}
+ bts64: TPSValueData(TPSUnValueOp(p).FVal1).Data^.ts64 := -TPSValueData(TPSUnValueOp(p).FVal1).Data^.ts64;
+ {$ENDIF}
+ btSingle: TPSValueData(TPSUnValueOp(p).FVal1).Data^.tsingle := -TPSValueData(TPSUnValueOp(p).FVal1).Data^.tsingle;
+ btDouble: TPSValueData(TPSUnValueOp(p).FVal1).Data^.tdouble := -TPSValueData(TPSUnValueOp(p).FVal1).Data^.tdouble;
+ btExtended: TPSValueData(TPSUnValueOp(p).FVal1).Data^.textended := -TPSValueData(TPSUnValueOp(p).FVal1).Data^.textended;
+ btCurrency: TPSValueData(TPSUnValueOp(p).FVal1).Data^.tcurrency := -TPSValueData(TPSUnValueOp(p).FVal1).Data^.tcurrency;
+ else
+ begin
+ MakeError('', ecTypeMismatch, '');
+ Result := False;
+ exit;
+ end;
+ end;
+ preplace := TPSUnValueOp(p).Val1;
+ TPSUnValueOp(p).Val1 := nil;
+ p.Free;
+ p := preplace;
+ end;
+ otCast:
+ begin
+ preplace := TPSValueData.Create;
+ TPSValueData(preplace).Data := NewVariant(TPSUnValueOp(p).FType);
+ case TPSUnValueOp(p).FType.BaseType of
+ btU8:
+ begin
+ case TPSValueData(TPSUnValueOp(p).FVal1).Data.Ftype.basetype of
+ btchar: TPSValueData(preplace).Data.tu8 := ord(TPSValueData(TPSUnValueOp(p).FVal1).Data^.tchar);
+ {$IFNDEF PS_NOWIDESTRING}
+ btwidechar: TPSValueData(preplace).Data.tu8 := ord(TPSValueData(TPSUnValueOp(p).FVal1).Data^.twidechar);
+ {$ENDIF}
+ btU8: TPSValueData(preplace).Data.tu8 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.tu8;
+ btS8: TPSValueData(preplace).Data.tu8 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.tS8;
+ btU16: TPSValueData(preplace).Data.tu8 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.tu16;
+ btS16: TPSValueData(preplace).Data.tu8 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.tS16;
+ btU32: TPSValueData(preplace).Data.tu8 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.tU32;
+ btS32: TPSValueData(preplace).Data.tu8 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.tS32;
+ {$IFNDEF PS_NOINT64}
+ btS64: TPSValueData(preplace).Data.tu8 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.ts64;
+ {$ENDIF}
+ else
+ begin
+ MakeError('', ecTypeMismatch, '');
+ preplace.Free;
+ Result := False;
+ exit;
+ end;
+ end;
+ end;
+ btS8:
+ begin
+ case TPSValueData(TPSUnValueOp(p).FVal1).Data.Ftype.basetype of
+ btchar: TPSValueData(preplace).Data.ts8 := ord(TPSValueData(TPSUnValueOp(p).FVal1).Data^.tchar);
+ {$IFNDEF PS_NOWIDESTRING}
+ btwidechar: TPSValueData(preplace).Data.ts8 := ord(TPSValueData(TPSUnValueOp(p).FVal1).Data^.twidechar);
+ {$ENDIF}
+ btU8: TPSValueData(preplace).Data.ts8 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.tu8;
+ btS8: TPSValueData(preplace).Data.ts8 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.tS8;
+ btU16: TPSValueData(preplace).Data.ts8 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.tu16;
+ btS16: TPSValueData(preplace).Data.ts8 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.tS16;
+ btU32: TPSValueData(preplace).Data.ts8 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.tU32;
+ btS32: TPSValueData(preplace).Data.ts8 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.tS32;
+ {$IFNDEF PS_NOINT64}
+ btS64: TPSValueData(preplace).Data.ts8 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.ts64;
+ {$ENDIF}
+ else
+ begin
+ MakeError('', ecTypeMismatch, '');
+ preplace.Free;
+ Result := False;
+ exit;
+ end;
+ end;
+ end;
+ btU16:
+ begin
+ case TPSValueData(TPSUnValueOp(p).FVal1).Data.Ftype.basetype of
+ btchar: TPSValueData(preplace).Data.tu16 := ord(TPSValueData(TPSUnValueOp(p).FVal1).Data^.tchar);
+ {$IFNDEF PS_NOWIDESTRING}
+ btwidechar: TPSValueData(preplace).Data.tu16 := ord(TPSValueData(TPSUnValueOp(p).FVal1).Data^.twidechar);
+ {$ENDIF}
+ btU8: TPSValueData(preplace).Data.tu16 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.tu8;
+ btS8: TPSValueData(preplace).Data.tu16 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.tS8;
+ btU16: TPSValueData(preplace).Data.ts16 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.tu16;
+ btS16: TPSValueData(preplace).Data.tu16 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.tS16;
+ btU32: TPSValueData(preplace).Data.tu16 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.tU32;
+ btS32: TPSValueData(preplace).Data.tu16 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.tS32;
+ {$IFNDEF PS_NOINT64}
+ btS64: TPSValueData(preplace).Data.tu16 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.ts64;
+ {$ENDIF}
+ else
+ begin
+ MakeError('', ecTypeMismatch, '');
+ preplace.Free;
+ Result := False;
+ exit;
+ end;
+ end;
+ end;
+ bts16:
+ begin
+ case TPSValueData(TPSUnValueOp(p).FVal1).Data.Ftype.basetype of
+ btchar: TPSValueData(preplace).Data.ts16 := ord(TPSValueData(TPSUnValueOp(p).FVal1).Data^.tchar);
+ {$IFNDEF PS_NOWIDESTRING}
+ btwidechar: TPSValueData(preplace).Data.ts16 := ord(TPSValueData(TPSUnValueOp(p).FVal1).Data^.twidechar);
+ {$ENDIF}
+ btU8: TPSValueData(preplace).Data.ts16 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.tu8;
+ btS8: TPSValueData(preplace).Data.ts16 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.tS8;
+ btU16: TPSValueData(preplace).Data.ts16 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.tu16;
+ btS16: TPSValueData(preplace).Data.ts16 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.tS16;
+ btU32: TPSValueData(preplace).Data.ts16 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.tU32;
+ btS32: TPSValueData(preplace).Data.ts16 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.tS32;
+ {$IFNDEF PS_NOINT64}
+ btS64: TPSValueData(preplace).Data.ts16 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.ts64;
+ {$ENDIF}
+ else
+ begin
+ MakeError('', ecTypeMismatch, '');
+ preplace.Free;
+ Result := False;
+ exit;
+ end;
+ end;
+ end;
+ btU32:
+ begin
+ case TPSValueData(TPSUnValueOp(p).FVal1).Data.Ftype.basetype of
+ btchar: TPSValueData(preplace).Data.tu32 := ord(TPSValueData(TPSUnValueOp(p).FVal1).Data^.tchar);
+ {$IFNDEF PS_NOWIDESTRING}
+ btwidechar: TPSValueData(preplace).Data.tu32 := ord(TPSValueData(TPSUnValueOp(p).FVal1).Data^.twidechar);
+ {$ENDIF}
+ btU8: TPSValueData(preplace).Data.tu32 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.tu8;
+ btS8: TPSValueData(preplace).Data.tu32 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.tS8;
+ btU16: TPSValueData(preplace).Data.tu32 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.tu16;
+ btS16: TPSValueData(preplace).Data.tu32 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.tS16;
+ btU32: TPSValueData(preplace).Data.tu32 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.tU32;
+ btS32: TPSValueData(preplace).Data.tu32 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.tS32;
+ {$IFNDEF PS_NOINT64}
+ btS64: TPSValueData(preplace).Data.tu32 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.ts64;
+ {$ENDIF}
+ else
+ begin
+ MakeError('', ecTypeMismatch, '');
+ preplace.Free;
+ Result := False;
+ exit;
+ end;
+ end;
+ end;
+ btS32:
+ begin
+ case TPSValueData(TPSUnValueOp(p).FVal1).Data.Ftype.basetype of
+ btchar: TPSValueData(preplace).Data.ts32 := ord(TPSValueData(TPSUnValueOp(p).FVal1).Data^.tchar);
+ {$IFNDEF PS_NOWIDESTRING}
+ btwidechar: TPSValueData(preplace).Data.ts32 := ord(TPSValueData(TPSUnValueOp(p).FVal1).Data^.twidechar);
+ {$ENDIF}
+ btU8: TPSValueData(preplace).Data.ts32 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.tu8;
+ btS8: TPSValueData(preplace).Data.ts32 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.tS8;
+ btU16: TPSValueData(preplace).Data.ts32 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.tu16;
+ btS16: TPSValueData(preplace).Data.ts32 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.tS16;
+ btU32: TPSValueData(preplace).Data.ts32 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.tU32;
+ btS32: TPSValueData(preplace).Data.ts32 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.tS32;
+ {$IFNDEF PS_NOINT64}
+ btS64: TPSValueData(preplace).Data.tu32 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.ts64;
+ {$ENDIF}
+ else
+ begin
+ MakeError('', ecTypeMismatch, '');
+ preplace.Free;
+ Result := False;
+ exit;
+ end;
+ end;
+ end;
+ {$IFNDEF PS_NOINT64}
+ btS64:
+ begin
+ case TPSValueData(TPSUnValueOp(p).FVal1).Data.Ftype.basetype of
+ btchar: TPSValueData(preplace).Data.ts64 := ord(TPSValueData(TPSUnValueOp(p).FVal1).Data^.tchar);
+ {$IFNDEF PS_NOWIDESTRING}
+ btwidechar: TPSValueData(preplace).Data.ts64 := ord(TPSValueData(TPSUnValueOp(p).FVal1).Data^.twidechar);
+ {$ENDIF}
+ btU8: TPSValueData(preplace).Data.ts64 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.tu8;
+ btS8: TPSValueData(preplace).Data.ts64 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.tS8;
+ btU16: TPSValueData(preplace).Data.ts64 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.tu16;
+ btS16: TPSValueData(preplace).Data.ts64 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.tS16;
+ btU32: TPSValueData(preplace).Data.ts64 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.tU32;
+ btS32: TPSValueData(preplace).Data.ts64 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.tS32;
+ btS64: TPSValueData(preplace).Data.ts64 := TPSValueData(TPSUnValueOp(p).FVal1).Data^.ts64;
+ else
+ begin
+ MakeError('', ecTypeMismatch, '');
+ preplace.Free;
+ Result := False;
+ exit;
+ end;
+ end;
+ end;
+ {$ENDIF}
+ btChar:
+ begin
+ case TPSValueData(TPSUnValueOp(p).FVal1).Data.Ftype.basetype of
+ btchar: TPSValueData(preplace).Data.tchar := TPSValueData(TPSUnValueOp(p).FVal1).Data^.tchar;
+ btU8: TPSValueData(preplace).Data.tchar := chr(TPSValueData(TPSUnValueOp(p).FVal1).Data^.tu8);
+ btS8: TPSValueData(preplace).Data.tchar := chr(TPSValueData(TPSUnValueOp(p).FVal1).Data^.tS8);
+ btU16: TPSValueData(preplace).Data.tchar := chr(TPSValueData(TPSUnValueOp(p).FVal1).Data^.tu16);
+ btS16: TPSValueData(preplace).Data.tchar := chr(TPSValueData(TPSUnValueOp(p).FVal1).Data^.tS16);
+ btU32: TPSValueData(preplace).Data.tchar := chr(TPSValueData(TPSUnValueOp(p).FVal1).Data^.tU32);
+ btS32: TPSValueData(preplace).Data.tchar := chr(TPSValueData(TPSUnValueOp(p).FVal1).Data^.tS32);
+ {$IFNDEF PS_NOINT64}
+ btS64: TPSValueData(preplace).Data.tchar := chr(TPSValueData(TPSUnValueOp(p).FVal1).Data^.ts64);
+ {$ENDIF}
+ else
+ begin
+ MakeError('', ecTypeMismatch, '');
+ Result := False;
+ preplace.Free;
+ exit;
+ end;
+ end;
+ end;
+ else
+ begin
+ MakeError('', ecTypeMismatch, '');
+ Result := False;
+ preplace.Free;
+ exit;
+ end;
+ end;
+ p.Free;
+ p := preplace;
+ end;
+ else
+ begin
+ MakeError('', ecTypeMismatch, '');
+ Result := False;
+ exit;
+ end;
+ end; // case
+ end; // if
+ end;
+ Result := True;
+ end;
+
+ var
+ Val: TPSValue;
+
+begin
+ Val := ReadExpression;
+ if Val = nil then
+ begin
+ Result := nil;
+ exit;
+ end;
+ if not TryEvalConst(Val) then
+ begin
+ Val.Free;
+ Result := nil;
+ exit;
+ end;
+ Result := Val;
+ end;
+
+ function ReadParameters(IsProperty: Boolean; Dest: TPSParameters): Boolean;
+ var
+ sr,cr: TPSPasToken;
+ begin
+ if IsProperty then
+ begin
+ sr := CSTI_OpenBlock;
+ cr := CSTI_CloseBlock;
+ end else begin
+ sr := CSTI_OpenRound;
+ cr := CSTI_CloseRound;
+ end;
+ if FParser.CurrTokenId = sr then
+ begin
+ FParser.Next;
+ if FParser.CurrTokenId = cr then
+ begin
+ FParser.Next;
+ Result := True;
+ exit;
+ end;
+ end else
+ begin
+ result := True;
+ exit;
+ end;
+ repeat
+ with Dest.Add do
+ begin
+ Val := calc(CSTI_CloseRound);
+ if Val = nil then
+ begin
+ result := false;
+ exit;
+ end;
+ end;
+ if FParser.CurrTokenId = cr then
+ begin
+ FParser.Next;
+ Break;
+ end;
+ if FParser.CurrTokenId <> CSTI_Comma then
+ begin
+ MakeError('', ecCommaExpected, '');
+ Result := false;
+ exit;
+ end; {if}
+ FParser.Next;
+ until False;
+ Result := true;
+ end;
+
+ function ReadProcParameters(ProcNo: Cardinal; FSelf: TPSValue): TPSValue;
+ var
+ Decl: TPSParametersDecl;
+ begin
+ if TPSProcedure(FProcs[ProcNo]).ClassType = TPSInternalProcedure then
+ Decl := TPSInternalProcedure(FProcs[ProcNo]).Decl
+ else
+ Decl := TPSExternalProcedure(FProcs[ProcNo]).RegProc.Decl;
+ UseProc(Decl);
+ Result := TPSValueProcNo.Create;
+ TPSValueProcNo(Result).ProcNo := ProcNo;
+ TPSValueProcNo(Result).ResultType := Decl.Result;
+ with TPSValueProcNo(Result) do
+ begin
+ SetParserPos(FParser);
+ Parameters := TPSParameters.Create;
+ if FSelf <> nil then
+ begin
+ Parameters.Add;
+ end;
+ end;
+
+ if not ReadParameters(False, TPSValueProc(Result).Parameters) then
+ begin
+ FSelf.Free;
+ Result.Free;
+ Result := nil;
+ exit;
+ end;
+
+ if not ValidateParameters(BlockInfo, TPSValueProc(Result).Parameters, Decl) then
+ begin
+ FSelf.Free;
+ Result.Free;
+ Result := nil;
+ exit;
+ end;
+ if FSelf <> nil then
+ begin
+ with TPSValueProcNo(Result).Parameters[0] do
+ begin
+ Val := FSelf;
+ ExpectedType := GetTypeNo(BlockInfo, FSelf);
+ end;
+ end;
+ end;
+ {$IFNDEF PS_NOIDISPATCH}
+
+ function ReadIDispatchParameters(const ProcName: string; aVariantType: TPSVariantType; FSelf: TPSValue): TPSValue;
+ var
+ Par: TPSParameters;
+ PropSet: Boolean;
+ i: Longint;
+ Temp: TPSValue;
+ begin
+ Par := TPSParameters.Create;
+ try
+ if not ReadParameters(FParser.CurrTokenID = CSTI_OpenBlock, Par) then
+ begin
+ FSelf.Free;
+ Result := nil;
+ exit;
+ end;
+
+ if FParser.CurrTokenID = CSTI_Assignment then
+ begin
+ FParser.Next;
+ PropSet := True;
+ Temp := calc(CSTI_SemiColon);
+ if temp = nil then
+ begin
+ FSelf.Free;
+ Result := nil;
+ exit;
+ end;
+ with par.Add do
+ begin
+ FValue := Temp;
+ end;
+ end else
+ begin
+ PropSet := False;
+ end;
+
+ Result := TPSValueProcNo.Create;
+ TPSValueProcNo(Result).ResultType := aVariantType;
+ with TPSValueProcNo(Result) do
+ begin
+ SetParserPos(FParser);
+ Parameters := TPSParameters.Create;
+ if FSelf <> nil then
+ begin
+ with Parameters.Add do
+ begin
+ Val := FSelf;
+ ExpectedType := aVariantType.GetDynIvokeSelfType(Self);
+ end;
+ with Parameters.Add do
+ begin
+ Val := TPSValueData.Create;
+ TPSValueData(Val).Data := NewVariant(FDefaultBoolType);
+ TPSValueData(Val).Data.tu8 := Ord(PropSet);
+ ExpectedType := FDefaultBoolType;
+ end;
+
+ with Parameters.Add do
+ begin
+ Val := TPSValueData.Create;
+ TPSValueData(Val).Data := NewVariant(FindBaseType(btString));
+ string(TPSValueData(Val).data.tString) := Procname;
+ ExpectedType := FindBaseType(btString);
+ end;
+
+ with Parameters.Add do
+ begin
+ val := TPSValueArray.Create;
+ ExpectedType := aVariantType.GetDynInvokeParamType(Self);
+ temp := Val;
+ end;
+ for i := 0 to Par.Count -1 do
+ begin
+ TPSValueArray(Temp).Add(par.Item[i].Val);
+ par.Item[i].val := nil;
+ end;
+ end;
+ end;
+ TPSValueProcNo(Result).ProcNo := aVariantType.GetDynInvokeProcNo(Self, ProcName, TPSValueProcNo(Result).Parameters);
+ finally
+ Par.Free;
+ end;
+
+ end;
+
+ {$ENDIF}
+
+ function ReadVarParameters(ProcNoVar: TPSValue): TPSValue;
+ var
+ Decl: TPSParametersDecl;
+ begin
+ Decl := TPSProceduralType(GetTypeNo(BlockInfo, ProcnoVar)).ProcDef;
+ UseProc(Decl);
+
+ Result := TPSValueProcVal.Create;
+
+ with TPSValueProcVal(Result) do
+ begin
+ ResultType := Decl.Result;
+ ProcNo := ProcNoVar;
+ Parameters := TPSParameters.Create;
+ end;
+
+ if not ReadParameters(False, TPSValueProc(Result).Parameters) then
+ begin
+ Result.Free;
+ Result := nil;
+ exit;
+ end;
+
+ if not ValidateParameters(BlockInfo, TPSValueProc(Result).Parameters, Decl) then
+ begin
+ Result.Free;
+ Result := nil;
+ exit;
+ end;
+ end;
+
+
+ function WriteCalculation(InData, OutReg: TPSValue): Boolean;
+
+ function CheckOutreg(Where, Outreg: TPSValue): Boolean;
+ var
+ i: Longint;
+ begin
+ Result := False;
+ if Outreg is TPSValueReplace
+ then Outreg:=TPSValueReplace(Outreg).OldValue;
+ if Where.ClassType = TPSUnValueOp then
+ begin
+ if CheckOutReg(TPSUnValueOp(Where).Val1, OutReg) then
+ Result := True;
+ end else if Where.ClassType = TPSBinValueOp then
+ begin
+ if CheckOutreg(TPSBinValueOp(Where).Val1, OutReg) or CheckOutreg(TPSBinValueOp(Where).Val2, OutReg) then
+ Result := True;
+ end else if Where is TPSValueVar then
+ begin
+ if SameReg(Where, OutReg) then
+ Result := True;
+ end else if Where is TPSValueProc then
+ begin
+ for i := 0 to TPSValueProc(Where).Parameters.Count -1 do
+ begin
+ if Checkoutreg(TPSValueProc(Where).Parameters[i].Val, Outreg) then
+ begin
+ Result := True;
+ break;
+ end;
+ end;
+ end;
+ end;
+ begin
+ if not CheckCompatType(Outreg, InData) then
+ begin
+ MakeError('', ecTypeMismatch, '');
+ Result := False;
+ exit;
+ end;
+ if SameReg(OutReg, InData) then
+ begin
+ Result := True;
+ exit;
+ end;
+ if InData is TPSValueProc then
+ begin
+ Result := _ProcessFunction(TPSValueProc(indata), OutReg)
+ end else begin
+ if not PreWriteOutRec(OutReg, nil) then
+ begin
+ Result := False;
+ exit;
+ end;
+ if (not CheckOutReg(InData, OutReg)) and (InData is TPSBinValueOp) or (InData is TPSUnValueOp) then
+ begin
+ if InData is TPSBinValueOp then
+ begin
+ if not DoBinCalc(TPSBinValueOp(InData), OutReg) then
+ begin
+ AfterWriteOutRec(OutReg);
+ Result := False;
+ exit;
+ end;
+ end else
+ begin
+ if not DoUnCalc(TPSUnValueOp(InData), OutReg) then
+ begin
+ AfterWriteOutRec(OutReg);
+ Result := False;
+ exit;
+ end;
+ end;
+ end else if (InData is TPSBinValueOp) and (not CheckOutReg(TPSBinValueOp(InData).Val2, OutReg)) then
+ begin
+ if not DoBinCalc(TPSBinValueOp(InData), OutReg) then
+ begin
+ AfterWriteOutRec(OutReg);
+ Result := False;
+ exit;
+ end;
+ end else begin
+ if not PreWriteOutRec(InData, GetTypeNo(BlockInfo, OutReg)) then
+ begin
+ Result := False;
+ exit;
+ end;
+ BlockWriteByte(BlockInfo, CM_A);
+ if not (WriteOutRec(OutReg, False) and WriteOutRec(InData, True)) then
+ begin
+ Result := False;
+ exit;
+ end;
+ AfterWriteOutRec(InData);
+ end;
+ AfterWriteOutRec(OutReg);
+ Result := True;
+ end;
+ end; {WriteCalculation}
+
+
+ function _ProcessFunction(ProcCall: TPSValueProc; ResultRegister: TPSValue): Boolean;
+ var
+ res: TPSType;
+ tmp: TPSParameter;
+ lTv: TPSValue;
+ resreg: TPSValue;
+ l: Longint;
+
+ function Cleanup: Boolean;
+ var
+ i: Longint;
+ begin
+ for i := 0 to ProcCall.Parameters.Count -1 do
+ begin
+ if ProcCall.Parameters[i].TempVar <> nil then
+ ProcCall.Parameters[i].TempVar.Free;
+ ProcCall.Parameters[i].TempVar := nil;
+ end;
+ if ProcCall is TPSValueProcVal then
+ AfterWriteOutRec(TPSValueProcVal(ProcCall).fProcNo);
+ if ResReg <> nil then
+ AfterWriteOutRec(resreg);
+ if ResReg <> nil then
+ begin
+ if ResReg <> ResultRegister then
+ begin
+ if ResultRegister <> nil then
+ begin
+ if not WriteCalculation(ResReg, ResultRegister) then
+ begin
+ Result := False;
+ resreg.Free;
+ exit;
+ end;
+ end;
+ resreg.Free;
+ end;
+ end;
+ Result := True;
+ end;
+
+ begin
+ Res := ProcCall.ResultType;
+ Result := False;
+ if (res = nil) and (ResultRegister <> nil) then
+ begin
+ MakeError('', ecNoResult, '');
+ exit;
+ end
+ else if (res <> nil) then
+ begin
+ if (ResultRegister = nil) or (Res <> GetTypeNo(BlockInfo, ResultRegister)) then
+ begin
+ resreg := AllocStackReg(res);
+ end else resreg := ResultRegister;
+ end
+ else
+ resreg := nil;
+ if ResReg <> nil then
+ begin
+ if not PreWriteOutRec(resreg, nil) then
+ begin
+ Cleanup;
+ exit;
+ end;
+ end;
+ if Proccall is TPSValueProcVal then
+ begin
+ if not PreWriteOutRec(TPSValueProcVal(ProcCall).fProcNo, nil) then
+ begin
+ Cleanup;
+ exit;
+ end;
+ end;
+ for l := ProcCall.Parameters.Count - 1 downto 0 do
+ begin
+ Tmp := ProcCall.Parameters[l];
+ if (Tmp.ParamMode <> pmIn) then
+ begin
+ if IsVarInCompatible(GetTypeNo(BlockInfo, tmp.Val), tmp.ExpectedType) then
+ begin
+ with MakeError('', ecTypeMismatch, '') do
+ begin
+ pos := tmp.Val.Pos;
+ row := tmp.Val.row;
+ col := tmp.Val.col;
+ end;
+ Cleanup;
+ exit;
+ end;
+ if Copy(tmp.ExpectedType.Name, 1, 10) = '!OPENARRAY' then begin
+ tmp.TempVar := AllocPointer(tmp.ExpectedType);
+ lTv := AllocStackReg(tmp.ExpectedType);
+ if not PreWriteOutRec(Tmp.FValue, nil) then
+ begin
+ cleanup;
+ exit;
+ end;
+ BlockWriteByte(BlockInfo, CM_A);
+ WriteOutRec(lTv, False);
+ WriteOutRec(Tmp.FValue, False);
+ AfterWriteOutRec(Tmp.FValue);
+
+ BlockWriteByte(BlockInfo, cm_sp);
+ WriteOutRec(tmp.TempVar, False);
+ WriteOutRec(lTv, False);
+
+ lTv.Free;
+// BlockWriteByte(BlockInfo, CM_PO); // pop the temp var
+
+ end else begin
+ tmp.TempVar := AllocPointer(GetTypeNo(BlockInfo, Tmp.FValue));
+ if not PreWriteOutRec(Tmp.FValue, nil) then
+ begin
+ cleanup;
+ exit;
+ end;
+ BlockWriteByte(BlockInfo, cm_sp);
+ WriteOutRec(tmp.TempVar, False);
+ WriteOutRec(Tmp.FValue, False);
+ AfterWriteOutRec(Tmp.FValue);
+ end;
+ end
+ else
+ begin
+ if Tmp.ExpectedType = nil then
+ Tmp.ExpectedType := GetTypeNo(BlockInfo, tmp.Val);
+ if Tmp.ExpectedType.BaseType = btPChar then
+ begin
+ Tmp.TempVar := AllocStackReg(at2ut(FindBaseType(btstring)))
+ end else
+ begin
+ Tmp.TempVar := AllocStackReg(Tmp.ExpectedType);
+ end;
+ if not WriteCalculation(Tmp.Val, Tmp.TempVar) then
+ begin
+ Cleanup;
+ exit;
+ end;
+ end;
+ end; {for}
+ if res <> nil then
+ begin
+ BlockWriteByte(BlockInfo, CM_PV);
+
+ if not WriteOutRec(resreg, False) then
+ begin
+ Cleanup;
+ MakeError('', ecInternalError, '00015');
+ exit;
+ end;
+ end;
+ if ProcCall is TPSValueProcVal then
+ begin
+ BlockWriteByte(BlockInfo, Cm_cv);
+ WriteOutRec(TPSValueProcVal(ProcCall).ProcNo, True);
+ end else begin
+ BlockWriteByte(BlockInfo, CM_C);
+ BlockWriteLong(BlockInfo, TPSValueProcNo(ProcCall).ProcNo);
+ end;
+ if res <> nil then
+ BlockWriteByte(BlockInfo, CM_PO);
+ if not Cleanup then
+ begin
+ Result := False;
+ exit;
+ end;
+ Result := True;
+ end; {ProcessVarFunction}
+
+ function HasInvalidJumps(StartPos, EndPos: Cardinal): Boolean;
+ var
+ I, J: Longint;
+ Ok: LongBool;
+ FLabelsInBlock: TIfStringList;
+ s: string;
+ begin
+ FLabelsInBlock := TIfStringList.Create;
+ for i := 0 to BlockInfo.Proc.FLabels.Count -1 do
+ begin
+ s := BlockInfo.Proc.FLabels[I];
+ if (Cardinal((@s[1])^) >= StartPos) and (Cardinal((@s[1])^) <= EndPos) then
+ begin
+ Delete(s, 1, 8);
+ FLabelsInBlock.Add(s);
+ end;
+ end;
+ for i := 0 to BlockInfo.Proc.FGotos.Count -1 do
+ begin
+ s := BlockInfo.Proc.FGotos[I];
+ if (Cardinal((@s[1])^) >= StartPos) and (Cardinal((@s[1])^) <= EndPos) then
+ begin
+ Delete(s, 1, 4);
+ s := BlockInfo.Proc.FLabels[Cardinal((@s[1])^)];
+ Delete(s,1,8);
+ OK := False;
+ for J := 0 to FLabelsInBlock.Count -1 do
+ begin
+ if FLabelsInBlock[J] = s then
+ begin
+ Ok := True;
+ Break;
+ end;
+ end;
+ if not Ok then
+ begin
+ MakeError('', ecInvalidJump, '');
+ Result := True;
+ FLabelsInBlock.Free;
+ exit;
+ end;
+ end else begin
+ Delete(s, 1, 4);
+ s := BlockInfo.Proc.FLabels[Cardinal((@s[1])^)];
+ Delete(s,1,8);
+ OK := True;
+ for J := 0 to FLabelsInBlock.Count -1 do
+ begin
+ if FLabelsInBlock[J] = s then
+ begin
+ Ok := False;
+ Break;
+ end;
+ end;
+ if not Ok then
+ begin
+ MakeError('', ecInvalidJump, '');
+ Result := True;
+ FLabelsInBlock.Free;
+ exit;
+ end;
+ end;
+ end;
+ FLabelsInBlock.Free;
+ Result := False;
+ end;
+
+ function ProcessFor: Boolean;
+ { Process a for x := y to z do }
+ var
+ VariableVar: TPSValue;
+ TempBool,
+ InitVal,
+ finVal: TPSValue;
+ Block: TPSBlockInfo;
+ Backwards: Boolean;
+ FPos, NPos, EPos, RPos: Longint;
+ OldCO, OldBO: TPSList;
+ I: Longint;
+ iOldWithCount: Integer;
+ iOldTryCount: Integer;
+ iOldExFnlCount: Integer;
+ begin
+ Debug_WriteLine(BlockInfo);
+ Result := False;
+ FParser.Next;
+ if FParser.CurrTokenId <> CSTI_Identifier then
+ begin
+ MakeError('', ecIdentifierExpected, '');
+ exit;
+ end;
+ VariableVar := GetIdentifier(1);
+ if VariableVar = nil then
+ exit;
+ case GetTypeNo(BlockInfo, VariableVar).BaseType of
+ btU8, btS8, btU16, btS16, btU32, btS32: ;
+ else
+ begin
+ MakeError('', ecTypeMismatch, '');
+ VariableVar.Free;
+ exit;
+ end;
+ end;
+ if FParser.CurrTokenId <> CSTI_Assignment then
+ begin
+ MakeError('', ecAssignmentExpected, '');
+ VariableVar.Free;
+ exit;
+ end;
+ FParser.Next;
+ InitVal := calc(CSTII_DownTo);
+ if InitVal = nil then
+ begin
+ VariableVar.Free;
+ exit;
+ end;
+ if FParser.CurrTokenId = CSTII_To then
+ Backwards := False
+ else if FParser.CurrTokenId = CSTII_DownTo then
+ Backwards := True
+ else
+ begin
+ MakeError('', ecToExpected, '');
+ VariableVar.Free;
+ InitVal.Free;
+ exit;
+ end;
+ FParser.Next;
+ finVal := calc(CSTII_do);
+ if finVal = nil then
+ begin
+ VariableVar.Free;
+ InitVal.Free;
+ exit;
+ end;
+ if FParser.CurrTokenId <> CSTII_do then
+ begin
+ MakeError('', ecDoExpected, '');
+ finVal.Free;
+ InitVal.Free;
+ VariableVar.Free;
+ exit;
+ end;
+ FParser.Next;
+ if not WriteCalculation(InitVal, VariableVar) then
+ begin
+ VariableVar.Free;
+ InitVal.Free;
+ finVal.Free;
+ exit;
+ end;
+ InitVal.Free;
+ TempBool := AllocStackReg(at2ut(FDefaultBoolType));
+ NPos := Length(BlockInfo.Proc.Data);
+ if not (PreWriteOutRec(VariableVar, nil) and PreWriteOutRec(finVal, nil)) then
+ begin
+ TempBool.Free;
+ VariableVar.Free;
+ finVal.Free;
+ exit;
+ end;
+ BlockWriteByte(BlockInfo, CM_CO);
+ if Backwards then
+ begin
+ BlockWriteByte(BlockInfo, 0); { >= }
+ end
+ else
+ begin
+ BlockWriteByte(BlockInfo, 1); { <= }
+ end;
+ if not (WriteOutRec(TempBool, False) and WriteOutRec(VariableVar, True) and WriteOutRec(finVal, True)) then
+ begin
+ TempBool.Free;
+ VariableVar.Free;
+ finVal.Free;
+ exit;
+ end;
+ AfterWriteOutRec(finVal);
+ AfterWriteOutRec(VariableVar);
+ finVal.Free;
+ BlockWriteByte(BlockInfo, Cm_CNG);
+ EPos := Length(BlockInfo.Proc.Data);
+ BlockWriteLong(BlockInfo, $12345678);
+ WriteOutRec(TempBool, False);
+ RPos := Length(BlockInfo.Proc.Data);
+ OldCO := FContinueOffsets;
+ FContinueOffsets := TPSList.Create;
+ OldBO := FBreakOffsets;
+ FBreakOffsets := TPSList.Create;
+ Block := TPSBlockInfo.Create(BlockInfo);
+ Block.SubType := tOneLiner;
+
+ iOldWithCount := FWithCount;
+ FWithCount := 0;
+ iOldTryCount := FTryCount;
+ FTryCount := 0;
+ iOldExFnlCount := FExceptFinallyCount;
+ FExceptFinallyCount := 0;
+
+ if not ProcessSub(Block) then
+ begin
+ Block.Free;
+ TempBool.Free;
+ VariableVar.Free;
+ FBreakOffsets.Free;
+ FContinueOffsets.Free;
+ FContinueOffsets := OldCO;
+ FBreakOffsets := OldBo;
+
+ FWithCount := iOldWithCount;
+ FTryCount := iOldTryCount;
+ FExceptFinallyCount := iOldExFnlCount;
+
+ exit;
+ end;
+ Block.Free;
+ FPos := Length(BlockInfo.Proc.Data);
+ if not PreWriteOutRec(VariableVar, nil) then
+ begin
+ TempBool.Free;
+ VariableVar.Free;
+ FBreakOffsets.Free;
+ FContinueOffsets.Free;
+ FContinueOffsets := OldCO;
+ FBreakOffsets := OldBo;
+
+ FWithCount := iOldWithCount;
+ FTryCount := iOldTryCount;
+ FExceptFinallyCount := iOldExFnlCount;
+
+ exit;
+ end;
+ if Backwards then
+ BlockWriteByte(BlockInfo, cm_dec)
+ else
+ BlockWriteByte(BlockInfo, cm_inc);
+ if not WriteOutRec(VariableVar, False) then
+ begin
+ TempBool.Free;
+ VariableVar.Free;
+ FBreakOffsets.Free;
+ FContinueOffsets.Free;
+ FContinueOffsets := OldCO;
+ FBreakOffsets := OldBo;
+
+ FWithCount := iOldWithCount;
+ FTryCount := iOldTryCount;
+ FExceptFinallyCount := iOldExFnlCount;
+
+ exit;
+ end;
+ AfterWriteOutRec(VariableVar);
+ BlockWriteByte(BlockInfo, Cm_G);
+ BlockWriteLong(BlockInfo, Longint(NPos - Length(BlockInfo.Proc.Data) - 4));
+ Longint((@BlockInfo.Proc.Data[EPos + 1])^) := Length(BlockInfo.Proc.Data) - RPos;
+ for i := 0 to FBreakOffsets.Count -1 do
+ begin
+ EPos := Cardinal(FBreakOffsets[I]);
+ Longint((@BlockInfo.Proc.Data[EPos - 3])^) := Length(BlockInfo.Proc.Data) - Longint(EPos);
+ end;
+ for i := 0 to FContinueOffsets.Count -1 do
+ begin
+ EPos := Cardinal(FContinueOffsets[I]);
+ Longint((@BlockInfo.Proc.Data[EPos - 3])^) := Longint(FPos) - Longint(EPos);
+ end;
+ FBreakOffsets.Free;
+ FContinueOffsets.Free;
+ FContinueOffsets := OldCO;
+ FBreakOffsets := OldBo;
+
+ FWithCount := iOldWithCount;
+ FTryCount := iOldTryCount;
+ FExceptFinallyCount := iOldExFnlCount;
+
+ TempBool.Free;
+ VariableVar.Free;
+ if HasInvalidJumps(RPos, Length(BlockInfo.Proc.Data)) then
+ begin
+ Result := False;
+ exit;
+ end;
+ Result := True;
+ end; {ProcessFor}
+
+ function ProcessWhile: Boolean;
+ var
+ vin, vout: TPSValue;
+ SPos, EPos: Cardinal;
+ OldCo, OldBO: TPSList;
+ I: Longint;
+ Block: TPSBlockInfo;
+
+ iOldWithCount: Integer;
+ iOldTryCount: Integer;
+ iOldExFnlCount: Integer;
+
+ begin
+ Result := False;
+ Debug_WriteLine(BlockInfo);
+ FParser.Next;
+ vout := calc(CSTII_do);
+ if vout = nil then
+ exit;
+ if FParser.CurrTokenId <> CSTII_do then
+ begin
+ vout.Free;
+ MakeError('', ecDoExpected, '');
+ exit;
+ end;
+ vin := AllocStackReg(at2ut(FDefaultBoolType));
+ SPos := Length(BlockInfo.Proc.Data); // start position
+ OldCo := FContinueOffsets;
+ FContinueOffsets := TPSList.Create;
+ OldBO := FBreakOffsets;
+ FBreakOffsets := TPSList.Create;
+ if not WriteCalculation(vout, vin) then
+ begin
+ vout.Free;
+ vin.Free;
+ FBreakOffsets.Free;
+ FContinueOffsets.Free;
+ FContinueOffsets := OldCO;
+ FBreakOffsets := OldBo;
+ exit;
+ end;
+ vout.Free;
+ FParser.Next; // skip DO
+ BlockWriteByte(BlockInfo, Cm_CNG); // only goto if expression is false
+ BlockWriteLong(BlockInfo, $12345678);
+ EPos := Length(BlockInfo.Proc.Data);
+ if not WriteOutRec(vin, False) then
+ begin
+ MakeError('', ecInternalError, '00017');
+ vin.Free;
+ FBreakOffsets.Free;
+ FContinueOffsets.Free;
+ FContinueOffsets := OldCO;
+ FBreakOffsets := OldBo;
+ exit;
+ end;
+ Block := TPSBlockInfo.Create(BlockInfo);
+ Block.SubType := tOneLiner;
+
+ iOldWithCount := FWithCount;
+ FWithCount := 0;
+ iOldTryCount := FTryCount;
+ FTryCount := 0;
+ iOldExFnlCount := FExceptFinallyCount;
+ FExceptFinallyCount := 0;
+
+ if not ProcessSub(Block) then
+ begin
+ Block.Free;
+ vin.Free;
+ FBreakOffsets.Free;
+ FContinueOffsets.Free;
+ FContinueOffsets := OldCO;
+ FBreakOffsets := OldBo;
+
+ FWithCount := iOldWithCount;
+ FTryCount := iOldTryCount;
+ FExceptFinallyCount := iOldExFnlCount;
+
+ exit;
+ end;
+ Block.Free;
+ Debug_WriteLine(BlockInfo);
+ BlockWriteByte(BlockInfo, Cm_G);
+ BlockWriteLong(BlockInfo, Longint(SPos) - Length(BlockInfo.Proc.Data) - 4);
+ Longint((@BlockInfo.Proc.Data[EPos - 3])^) := Length(BlockInfo.Proc.Data) - Longint(EPos) - 5;
+ for i := 0 to FBreakOffsets.Count -1 do
+ begin
+ EPos := Cardinal(FBreakOffsets[I]);
+ Longint((@BlockInfo.Proc.Data[EPos - 3])^) := Length(BlockInfo.Proc.Data) - Longint(EPos);
+ end;
+ for i := 0 to FContinueOffsets.Count -1 do
+ begin
+ EPos := Cardinal(FContinueOffsets[I]);
+ Longint((@BlockInfo.Proc.Data[EPos - 3])^) := Longint(SPos) - Longint(EPos);
+ end;
+ FBreakOffsets.Free;
+ FContinueOffsets.Free;
+ FContinueOffsets := OldCO;
+ FBreakOffsets := OldBo;
+
+ FWithCount := iOldWithCount;
+ FTryCount := iOldTryCount;
+ FExceptFinallyCount := iOldExFnlCount;
+
+ vin.Free;
+ if HasInvalidJumps(EPos, Length(BlockInfo.Proc.Data)) then
+ begin
+ Result := False;
+ exit;
+ end;
+ Result := True;
+ end;
+
+ function ProcessRepeat: Boolean;
+ var
+ vin, vout: TPSValue;
+ CPos, SPos, EPos: Cardinal;
+ I: Longint;
+ OldCo, OldBO: TPSList;
+ Block: TPSBlockInfo;
+
+ iOldWithCount: Integer;
+ iOldTryCount: Integer;
+ iOldExFnlCount: Integer;
+
+ begin
+ Result := False;
+ Debug_WriteLine(BlockInfo);
+ FParser.Next;
+ OldCo := FContinueOffsets;
+ FContinueOffsets := TPSList.Create;
+ OldBO := FBreakOffsets;
+ FBreakOffsets := TPSList.Create;
+ vin := AllocStackReg(at2ut(FDefaultBoolType));
+ SPos := Length(BlockInfo.Proc.Data);
+ Block := TPSBlockInfo.Create(BlockInfo);
+ Block.SubType := tRepeat;
+
+ iOldWithCount := FWithCount;
+ FWithCount := 0;
+ iOldTryCount := FTryCount;
+ FTryCount := 0;
+ iOldExFnlCount := FExceptFinallyCount;
+ FExceptFinallyCount := 0;
+
+ if not ProcessSub(Block) then
+ begin
+ Block.Free;
+ FBreakOffsets.Free;
+ FContinueOffsets.Free;
+ FContinueOffsets := OldCO;
+ FBreakOffsets := OldBo;
+
+ FWithCount := iOldWithCount;
+ FTryCount := iOldTryCount;
+ FExceptFinallyCount := iOldExFnlCount;
+
+ vin.Free;
+ exit;
+ end;
+ Block.Free;
+ FParser.Next; //cstii_until
+ vout := calc(CSTI_Semicolon);
+ if vout = nil then
+ begin
+ FBreakOffsets.Free;
+ FContinueOffsets.Free;
+ FContinueOffsets := OldCO;
+ FBreakOffsets := OldBo;
+
+ FWithCount := iOldWithCount;
+ FTryCount := iOldTryCount;
+ FExceptFinallyCount := iOldExFnlCount;
+
+ vin.Free;
+ exit;
+ end;
+ CPos := Length(BlockInfo.Proc.Data);
+ if not WriteCalculation(vout, vin) then
+ begin
+ vout.Free;
+ vin.Free;
+ FBreakOffsets.Free;
+ FContinueOffsets.Free;
+ FContinueOffsets := OldCO;
+ FBreakOffsets := OldBo;
+
+ FWithCount := iOldWithCount;
+ FTryCount := iOldTryCount;
+ FExceptFinallyCount := iOldExFnlCount;
+
+ exit;
+ end;
+ vout.Free;
+ BlockWriteByte(BlockInfo, Cm_CNG);
+ BlockWriteLong(BlockInfo, $12345678);
+ EPos := Length(BlockInfo. Proc.Data);
+ if not WriteOutRec(vin, False) then
+ begin
+ MakeError('', ecInternalError, '00016');
+ vin.Free;
+ FBreakOffsets.Free;
+ FContinueOffsets.Free;
+ FContinueOffsets := OldCO;
+ FBreakOffsets := OldBo;
+
+ FWithCount := iOldWithCount;
+ FTryCount := iOldTryCount;
+ FExceptFinallyCount := iOldExFnlCount;
+
+ exit;
+ end;
+ Longint((@BlockInfo.Proc.Data[EPos - 3])^) := Longint(SPos) -
+ Length(BlockInfo.Proc.Data);
+ for i := 0 to FBreakOffsets.Count -1 do
+ begin
+ EPos := Cardinal(FBreakOffsets[I]);
+ Longint((@BlockInfo.Proc.Data[EPos - 3])^) := Length(BlockInfo. Proc.Data) - Longint(EPos);
+ end;
+ for i := 0 to FContinueOffsets.Count -1 do
+ begin
+ EPos := Cardinal(FContinueOffsets[I]);
+ Longint((@BlockInfo.Proc.Data[EPos - 3])^) := Longint(CPos) - Longint(EPos);
+ end;
+ FBreakOffsets.Free;
+ FContinueOffsets.Free;
+ FContinueOffsets := OldCO;
+ FBreakOffsets := OldBo;
+
+ FWithCount := iOldWithCount;
+ FTryCount := iOldTryCount;
+ FExceptFinallyCount := iOldExFnlCount;
+
+ vin.Free;
+ if HasInvalidJumps(SPos, Length(BlockInfo. Proc.Data)) then
+ begin
+ Result := False;
+ exit;
+ end;
+ Result := True;
+ end; {ProcessRepeat}
+
+ function ProcessIf: Boolean;
+ var
+ vout, vin: TPSValue;
+ SPos, EPos: Cardinal;
+ Block: TPSBlockInfo;
+ begin
+ Result := False;
+ Debug_WriteLine(BlockInfo);
+ FParser.Next;
+ vout := calc(CSTII_Then);
+ if vout = nil then
+ exit;
+ if FParser.CurrTokenId <> CSTII_Then then
+ begin
+ vout.Free;
+ MakeError('', ecThenExpected, '');
+ exit;
+ end;
+ vin := AllocStackReg(at2ut(FDefaultBoolType));
+ if not WriteCalculation(vout, vin) then
+ begin
+ vout.Free;
+ vin.Free;
+ exit;
+ end;
+ vout.Free;
+ BlockWriteByte(BlockInfo, cm_sf);
+ if not WriteOutRec(vin, False) then
+ begin
+ MakeError('', ecInternalError, '00018');
+ vin.Free;
+ exit;
+ end;
+ BlockWriteByte(BlockInfo, 1);
+ vin.Free;
+ BlockWriteByte(BlockInfo, cm_fg);
+ BlockWriteLong(BlockInfo, $12345678);
+ SPos := Length(BlockInfo.Proc.Data);
+ FParser.Next; // skip then
+ Block := TPSBlockInfo.Create(BlockInfo);
+ Block.SubType := tifOneliner;
+ if not ProcessSub(Block) then
+ begin
+ Block.Free;
+ exit;
+ end;
+ Block.Free;
+ if FParser.CurrTokenId = CSTII_Else then
+ begin
+ BlockWriteByte(BlockInfo, Cm_G);
+ BlockWriteLong(BlockInfo, $12345678);
+ EPos := Length(BlockInfo.Proc.Data);
+ Longint((@BlockInfo.Proc.Data[SPos - 3])^) := Length(BlockInfo.Proc.Data) - Longint(SPos);
+ FParser.Next;
+ Block := TPSBlockInfo.Create(BlockInfo);
+ Block.SubType := tOneLiner;
+ if not ProcessSub(Block) then
+ begin
+ Block.Free;
+ exit;
+ end;
+ Block.Free;
+ Longint((@BlockInfo.Proc.Data[EPos - 3])^) := Length(BlockInfo.Proc.Data) - Longint(EPos);
+ end
+ else
+ begin
+ Longint((@BlockInfo.Proc.Data[SPos - 3])^) := Length(BlockInfo.Proc.Data) - Longint(SPos) + 5 - 5;
+ end;
+ Result := True;
+ end; {ProcessIf}
+
+ function _ProcessLabel: Longint; {0 = failed; 1 = successful; 2 = no label}
+ var
+ I, H: Longint;
+ s: string;
+ begin
+ h := MakeHash(FParser.GetToken);
+ for i := 0 to BlockInfo.Proc.FLabels.Count -1 do
+ begin
+ s := BlockInfo.Proc.FLabels[I];
+ delete(s, 1, 4);
+ if Longint((@s[1])^) = h then
+ begin
+ delete(s, 1, 4);
+ if s = FParser.GetToken then
+ begin
+ s := BlockInfo.Proc.FLabels[I];
+ Cardinal((@s[1])^) := Length(BlockInfo.Proc.Data);
+ BlockInfo.Proc.FLabels[i] := s;
+ FParser.Next;
+ if fParser.CurrTokenId = CSTI_Colon then
+ begin
+ Result := 1;
+ FParser.Next;
+ exit;
+ end else begin
+ MakeError('', ecColonExpected, '');
+ Result := 0;
+ Exit;
+ end;
+ end;
+ end;
+ end;
+ result := 2;
+ end;
+
+ function ProcessIdentifier: Boolean;
+ var
+ vin, vout: TPSValue;
+ begin
+ Result := False;
+ Debug_WriteLine(BlockInfo);
+ vin := GetIdentifier(2);
+ if vin <> nil then
+ begin
+ if vin is TPSValueVar then
+ begin // assignment needed
+ if FParser.CurrTokenId <> CSTI_Assignment then
+ begin
+ MakeError('', ecAssignmentExpected, '');
+ vin.Free;
+ exit;
+ end;
+ FParser.Next;
+ vout := calc(CSTI_Semicolon);
+ if vout = nil then
+ begin
+ vin.Free;
+ exit;
+ end;
+ if not WriteCalculation(vout, vin) then
+ begin
+ vin.Free;
+ vout.Free;
+ exit;
+ end;
+ vin.Free;
+ vout.Free;
+ end else if vin is TPSValueProc then
+ begin
+ Result := _ProcessFunction(TPSValueProc(vin), nil);
+ vin.Free;
+ Exit;
+ end else
+ begin
+ MakeError('', ecInternalError, '20');
+ vin.Free;
+ REsult := False;
+ exit;
+ end;
+ end
+ else
+ begin
+ Result := False;
+ exit;
+ end;
+ Result := True;
+ end; {ProcessIdentifier}
+
+ function ProcessCase: Boolean;
+ var
+ V1, V2, TempRec, Val, CalcItem: TPSValue;
+ p: TPSBinValueOp;
+ SPos, CurrP: Cardinal;
+ I: Longint;
+ EndReloc: TPSList;
+ Block: TPSBlockInfo;
+
+ function NewRec(val: TPSValue): TPSValueReplace;
+ begin
+ Result := TPSValueReplace.Create;
+ Result.SetParserPos(FParser);
+ Result.FNewValue := Val;
+ Result.FreeNewValue := False;
+ end;
+
+ function Combine(v1, v2: TPSValue; Op: TPSBinOperatorType): TPSValue;
+ begin
+ if V1 = nil then
+ begin
+ Result := v2;
+ end else if v2 = nil then
+ begin
+ Result := V1;
+ end else
+ begin
+ Result := TPSBinValueOp.Create;
+ TPSBinValueOp(Result).FType := FDefaultBoolType;
+ TPSBinValueOp(Result).Operator := Op;
+ Result.SetParserPos(FParser);
+ TPSBinValueOp(Result).FVal1 := V1;
+ TPSBinValueOp(Result).FVal2 := V2;
+ end;
+ end;
+
+
+ begin
+ Debug_WriteLine(BlockInfo);
+ FParser.Next;
+ Val := calc(CSTII_of);
+ if Val = nil then
+ begin
+ ProcessCase := False;
+ exit;
+ end; {if}
+ if FParser.CurrTokenId <> CSTII_Of then
+ begin
+ MakeError('', ecOfExpected, '');
+ val.Free;
+ ProcessCase := False;
+ exit;
+ end; {if}
+ FParser.Next;
+ TempRec := AllocStackReg(GetTypeNo(BlockInfo, Val));
+ if not WriteCalculation(Val, TempRec) then
+ begin
+ TempRec.Free;
+ val.Free;
+ ProcessCase := False;
+ exit;
+ end; {if}
+ val.Free;
+ EndReloc := TPSList.Create;
+ CalcItem := AllocStackReg(at2ut(FDefaultBoolType));
+ SPos := Length(BlockInfo.Proc.Data);
+ repeat
+ V1 := nil;
+ while true do
+ begin
+ Val := calc(CSTI_Colon);
+ if (Val = nil) then
+ begin
+ V1.Free;
+ CalcItem.Free;
+ TempRec.Free;
+ EndReloc.Free;
+ ProcessCase := False;
+ exit;
+ end; {if}
+ if fParser.CurrTokenID = CSTI_TwoDots then begin
+ FParser.Next;
+ V2 := Calc(CSTI_colon);
+ if V2 = nil then begin
+ V1.Free;
+ CalcItem.Free;
+ TempRec.Free;
+ EndReloc.Free;
+ ProcessCase := False;
+ Val.Free;
+ exit;
+ end;
+ p := TPSBinValueOp.Create;
+ p.SetParserPos(FParser);
+ p.Operator := otGreaterEqual;
+ p.aType := at2ut(FDefaultBoolType);
+ p.Val2 := Val;
+ p.Val1 := NewRec(TempRec);
+ Val := p;
+ p := TPSBinValueOp.Create;
+ p.SetParserPos(FParser);
+ p.Operator := otLessEqual;
+ p.aType := at2ut(FDefaultBoolType);
+ p.Val2 := V2;
+ p.Val1 := NewRec(TempRec);
+ P := TPSBinValueOp(Combine(Val,P, otAnd));
+ end else begin
+ p := TPSBinValueOp.Create;
+ p.SetParserPos(FParser);
+ p.Operator := otEqual;
+ p.aType := at2ut(FDefaultBoolType);
+ p.Val1 := Val;
+ p.Val2 := NewRec(TempRec);
+ end;
+ V1 := Combine(V1, P, otOr);
+ if FParser.CurrTokenId = CSTI_Colon then Break;
+ if FParser.CurrTokenID <> CSTI_Comma then
+ begin
+ MakeError('', ecColonExpected, '');
+ V1.Free;
+ CalcItem.Free;
+ TempRec.Free;
+ EndReloc.Free;
+ ProcessCase := False;
+ exit;
+ end;
+ FParser.Next;
+ end;
+ FParser.Next;
+ if not WriteCalculation(V1, CalcItem) then
+ begin
+ CalcItem.Free;
+ v1.Free;
+ EndReloc.Free;
+ ProcessCase := False;
+ exit;
+ end;
+ v1.Free;
+ BlockWriteByte(BlockInfo, Cm_CNG);
+ BlockWriteLong(BlockInfo, $12345678);
+ CurrP := Length(BlockInfo.Proc.Data);
+ WriteOutRec(CalcItem, False);
+ Block := TPSBlockInfo.Create(BlockInfo);
+ Block.SubType := tifOneliner;
+ if not ProcessSub(Block) then
+ begin
+ Block.Free;
+ CalcItem.Free;
+ TempRec.Free;
+ EndReloc.Free;
+ ProcessCase := False;
+ exit;
+ end;
+ Block.Free;
+ BlockWriteByte(BlockInfo, Cm_G);
+ BlockWriteLong(BlockInfo, $12345678);
+ EndReloc.Add(Pointer(Length(BlockInfo.Proc.Data)));
+ Cardinal((@BlockInfo.Proc.Data[CurrP - 3])^) := Cardinal(Length(BlockInfo.Proc.Data)) - CurrP - 5;
+ if FParser.CurrTokenID = CSTI_Semicolon then FParser.Next;
+ if FParser.CurrTokenID = CSTII_Else then
+ begin
+ FParser.Next;
+ Block := TPSBlockInfo.Create(BlockInfo);
+ Block.SubType := tOneliner;
+ if not ProcessSub(Block) then
+ begin
+ Block.Free;
+ CalcItem.Free;
+ TempRec.Free;
+ EndReloc.Free;
+ ProcessCase := False;
+ exit;
+ end;
+ Block.Free;
+ if FParser.CurrTokenID = CSTI_Semicolon then FParser.Next;
+ if FParser.CurrtokenId <> CSTII_End then
+ begin
+ MakeError('', ecEndExpected, '');
+ CalcItem.Free;
+ TempRec.Free;
+ EndReloc.Free;
+ ProcessCase := False;
+ exit;
+ end;
+ end;
+ until FParser.CurrTokenID = CSTII_End;
+ FParser.Next;
+ for i := 0 to EndReloc.Count -1 do
+ begin
+ Cardinal((@BlockInfo.Proc.Data[Cardinal(EndReloc[I])- 3])^) := Cardinal(Length(BlockInfo.Proc.Data)) - Cardinal(EndReloc[I]);
+ end;
+ CalcItem.Free;
+ TempRec.Free;
+ EndReloc.Free;
+ if FContinueOffsets <> nil then
+ begin
+ for i := 0 to FContinueOffsets.Count -1 do
+ begin
+ if Cardinal(FContinueOffsets[i]) >= SPos then
+ begin
+ Byte((@BlockInfo.Proc.Data[Longint(FContinueOffsets[i]) - 4])^) := Cm_P2G;
+ end;
+ end;
+ end;
+ if FBreakOffsets <> nil then
+ begin
+ for i := 0 to FBreakOffsets.Count -1 do
+ begin
+ if Cardinal(FBreakOffsets[i]) >= SPos then
+ begin
+ Byte((@BlockInfo.Proc.Data[Longint(FBreakOffsets[i]) - 4])^) := Cm_P2G;
+ end;
+ end;
+ end;
+ if HasInvalidJumps(SPos, Length(BlockInfo.Proc.Data)) then
+ begin
+ Result := False;
+ exit;
+ end;
+ Result := True;
+ end; {ProcessCase}
+ function ProcessGoto: Boolean;
+ var
+ I, H: Longint;
+ s: string;
+ begin
+ Debug_WriteLine(BlockInfo);
+ FParser.Next;
+ h := MakeHash(FParser.GetToken);
+ for i := 0 to BlockInfo.Proc.FLabels.Count -1 do
+ begin
+ s := BlockInfo.Proc.FLabels[I];
+ delete(s, 1, 4);
+ if Longint((@s[1])^) = h then
+ begin
+ delete(s, 1, 4);
+ if s = FParser.GetToken then
+ begin
+ FParser.Next;
+ BlockWriteByte(BlockInfo, Cm_G);
+ BlockWriteLong(BlockInfo, $12345678);
+ BlockInfo.Proc.FGotos.Add(PS_mi2s(length(BlockInfo.Proc.Data))+PS_mi2s(i));
+ Result := True;
+ exit;
+ end;
+ end;
+ end;
+ MakeError('', ecUnknownIdentifier, FParser.OriginalToken);
+ Result := False;
+ end; {ProcessGoto}
+
+ function ProcessWith: Boolean;
+ var
+ Block: TPSBlockInfo;
+ aVar, aReplace: TPSValue;
+ aType: TPSType;
+
+ iStartOffset: Integer;
+
+ tmp: TPSValue;
+ begin
+ Debug_WriteLine(BlockInfo);
+ Block := TPSBlockInfo.Create(BlockInfo);
+ Block.SubType := tOneLiner;
+
+ FParser.Next;
+ repeat
+ aVar := GetIdentifier(0);
+ if aVar = nil then
+ begin
+ block.Free;
+ Result := False;
+ exit;
+ end;
+ AType := GetTypeNo(BlockInfo, aVar);
+ if (AType = nil) or ((aType.BaseType <> btRecord) and (aType.BaseType <> btClass)) then
+ begin
+ MakeError('', ecClassTypeExpected, '');
+ Block.Free;
+ Result := False;
+ exit;
+ end;
+
+ aReplace := TPSValueReplace.Create;
+ aReplace.SetParserPos(FParser);
+ TPSValueReplace(aReplace).FreeOldValue := True;
+ TPSValueReplace(aReplace).FreeNewValue := True;
+ TPSValueReplace(aReplace).OldValue := aVar;
+
+ if aVar.InheritsFrom(TPSVar) then TPSVar(aVar).Use;
+ tmp := AllocPointer(GetTypeNo(BlockInfo, aVar));
+ TPSProcVar(BlockInfo.Proc.ProcVars[TPSValueAllocatedStackVar(tmp).LocalVarNo]).Use;
+ PreWriteOutRec(tmp,GetTypeNo(BlockInfo, tmp));
+ PreWriteOutRec(aVar,GetTypeNo(BlockInfo, aVar));
+ BlockWriteByte(BlockInfo, cm_sp);
+ WriteOutRec(tmp, false);
+ WriteOutRec(aVar, false);
+ TPSValueReplace(aReplace).NewValue := tmp;
+
+
+
+ Block.WithList.Add(aReplace);
+
+ if FParser.CurrTokenID = CSTII_do then
+ begin
+ FParser.Next;
+ Break;
+ end else
+ if FParser.CurrTokenId <> CSTI_Comma then
+ begin
+ MakeError('', ecDoExpected, '');
+ Block.Free;
+ Result := False;
+ exit;
+ end;
+ FParser.Next;
+ until False;
+
+
+ inc(FWithCount);
+
+ iStartOffset := Length(Block.Proc.Data);
+
+ if not (ProcessSub(Block) and (not HasInvalidJumps(iStartOffset,Length(BlockInfo.Proc.Data) + 1)) ) then
+ begin
+ dec(FWithCount);
+ Block.Free;
+ Result := False;
+ exit;
+ end;
+ dec(FWithCount);
+
+ AfterWriteOutRec(aVar);
+ AfterWriteOutRec(tmp);
+ Block.Free;
+ Result := True;
+ end;
+
+ function ProcessTry: Boolean;
+ var
+ FStartOffset: Cardinal;
+ iBlockStartOffset: Integer;
+ Block: TPSBlockInfo;
+ begin
+ FParser.Next;
+ BlockWriteByte(BlockInfo, cm_puexh);
+ FStartOffset := Length(BlockInfo.Proc.Data) + 1;
+ BlockWriteLong(BlockInfo, InvalidVal);
+ BlockWriteLong(BlockInfo, InvalidVal);
+ BlockWriteLong(BlockInfo, InvalidVal);
+ BlockWriteLong(BlockInfo, InvalidVal);
+ Block := TPSBlockInfo.Create(BlockInfo);
+ Block.SubType := tTry;
+ inc(FTryCount);
+ if ProcessSub(Block) and (not HasInvalidJumps(FStartOffset,Length(BlockInfo.Proc.Data) + 1)) then
+ begin
+ dec(FTryCount);
+ Block.Free;
+ BlockWriteByte(BlockInfo, cm_poexh);
+ BlockWriteByte(BlockInfo, 0);
+ if FParser.CurrTokenID = CSTII_Except then
+ begin
+ FParser.Next;
+ Cardinal((@BlockInfo.Proc.Data[FStartOffset + 4])^) := Cardinal(Length(BlockInfo.Proc.Data)) - FStartOffset - 15;
+ iBlockStartOffset := Length(BlockInfo.Proc.Data) ;
+ Block := TPSBlockInfo.Create(BlockInfo);
+ Block.SubType := tTryEnd;
+ inc(FExceptFinallyCount);
+ if ProcessSub(Block) and (not HasInvalidJumps(iBlockStartOffset,Length(BlockInfo.Proc.Data) + 1)) then
+ begin
+ dec(FExceptFinallyCount);
+ Block.Free;
+ BlockWriteByte(BlockInfo, cm_poexh);
+ BlockWriteByte(BlockInfo, 2);
+ if FParser.CurrTokenId = CSTII_Finally then
+ begin
+ Cardinal((@BlockInfo.Proc.Data[FStartOffset + 8])^) := Cardinal(Length(BlockInfo.Proc.Data)) - FStartOffset - 15;
+ iBlockStartOffset := Length(BlockInfo.Proc.Data) ;
+ Block := TPSBlockInfo.Create(BlockInfo);
+ Block.SubType := tTryEnd;
+ FParser.Next;
+ inc(FExceptFinallyCount);
+ if ProcessSub(Block) and (not HasInvalidJumps(iBlockStartOffset,Length(BlockInfo.Proc.Data) + 1)) then
+ begin
+ dec(FExceptFinallyCount);
+ Block.Free;
+ if FParser.CurrTokenId = CSTII_End then
+ begin
+ BlockWriteByte(BlockInfo, cm_poexh);
+ BlockWriteByte(BlockInfo, 3);
+ end else begin
+ MakeError('', ecEndExpected, '');
+ Result := False;
+ exit;
+ end;
+ end else
+ begin
+ Block.Free;
+ Result := False;
+ dec(FExceptFinallyCount);
+ exit;
+ end;
+ end else if FParser.CurrTokenID <> CSTII_End then
+ begin
+ MakeError('', ecEndExpected, '');
+ Result := False;
+ exit;
+ end;
+ FParser.Next;
+ end else
+ begin
+ Block.Free;
+ Result := False;
+ dec(FExceptFinallyCount);
+ exit;
+ end;
+ end else if FParser.CurrTokenId = CSTII_Finally then
+ begin
+ FParser.Next;
+ Cardinal((@BlockInfo.Proc.Data[FStartOffset])^) := Cardinal(Length(BlockInfo.Proc.Data)) - FStartOffset - 15;
+ iBlockStartOffset := Length(BlockInfo.Proc.Data) ;
+ Block := TPSBlockInfo.Create(BlockInfo);
+ Block.SubType := tTryEnd;
+ inc(FExceptFinallyCount);
+ if ProcessSub(Block) and (not HasInvalidJumps(iBlockStartOffset,Length(BlockInfo.Proc.Data) + 1)) then
+ begin
+ dec(FExceptFinallyCount);
+ Block.Free;
+ BlockWriteByte(BlockInfo, cm_poexh);
+ BlockWriteByte(BlockInfo, 1);
+ if FParser.CurrTokenId = CSTII_Except then
+ begin
+ Cardinal((@BlockInfo.Proc.Data[FStartOffset + 4])^) := Cardinal(Length(BlockInfo.Proc.Data)) - FStartOffset - 15;
+ iBlockStartOffset := Length(BlockInfo.Proc.Data) ;
+ FParser.Next;
+ Block := TPSBlockInfo.Create(BlockInfo);
+ Block.SubType := tTryEnd;
+ inc(FExceptFinallyCount);
+ if ProcessSub(Block) and (not HasInvalidJumps(iBlockStartOffset,Length(BlockInfo.Proc.Data) + 1)) then
+ begin
+ dec(FExceptFinallyCount);
+ Block.Free;
+ if FParser.CurrTokenId = CSTII_End then
+ begin
+ BlockWriteByte(BlockInfo, cm_poexh);
+ BlockWriteByte(BlockInfo, 2);
+ end else begin
+ MakeError('', ecEndExpected, '');
+ Result := False;
+ exit;
+ end;
+ end else
+ begin
+ Block.Free;
+ Result := False;
+ dec(FExceptFinallyCount);
+ exit;
+ end;
+ end else if FParser.CurrTokenID <> CSTII_End then
+ begin
+ MakeError('', ecEndExpected, '');
+ Result := False;
+ exit;
+ end;
+ FParser.Next;
+ end else
+ begin
+ Block.Free;
+ Result := False;
+ dec(FExceptFinallyCount);
+ exit;
+ end;
+ end;
+ end else
+ begin
+ Block.Free;
+ Result := False;
+ dec(FTryCount);
+ exit;
+ end;
+ Cardinal((@BlockInfo.Proc.Data[FStartOffset + 12])^) := Cardinal(Length(BlockInfo.Proc.Data)) - FStartOffset - 15;
+ Result := True;
+ end; {ProcessTry}
+
+var
+ i: Integer;
+ Block: TPSBlockInfo;
+
+begin
+ ProcessSub := False;
+ if (BlockInfo.SubType = tProcBegin) or (BlockInfo.SubType= tMainBegin) or
+{$IFDEF PS_USESSUPPORT}
+ (BlockInfo.SubType = tUnitInit) or (BlockInfo.SubType= tUnitFinish) or // NvdS
+{$endif}
+ (BlockInfo.SubType= tSubBegin) then
+ begin
+ FParser.Next; // skip CSTII_Begin
+ end;
+ while True do
+ begin
+ case FParser.CurrTokenId of
+ CSTII_Goto:
+ begin
+ if not ProcessGoto then
+ Exit;
+ if (BlockInfo.SubType = tifOneliner) or (BlockInfo.SubType = TOneLiner) then
+ break;
+ end;
+ CSTII_With:
+ begin
+ if not ProcessWith then
+ Exit;
+ if (BlockInfo.SubType = tifOneliner) or (BlockInfo.SubType = TOneLiner) then
+ break;
+ end;
+ CSTII_Try:
+ begin
+ if not ProcessTry then
+ Exit;
+ if (BlockInfo.SubType = tifOneliner) or (BlockInfo.SubType = TOneLiner) then
+ break;
+ end;
+ CSTII_Finally, CSTII_Except:
+ begin
+ if (BlockInfo.SubType = tTry) or (BlockInfo.SubType = tTryEnd) then
+ Break
+ else
+ begin
+ MakeError('', ecEndExpected, '');
+ Exit;
+ end;
+ end;
+ CSTII_Begin:
+ begin
+ Block := TPSBlockInfo.Create(BlockInfo);
+ Block.SubType := tSubBegin;
+ if not ProcessSub(Block) then
+ begin
+ Block.Free;
+ Exit;
+ end;
+ Block.Free;
+
+ FParser.Next; // skip END
+ if (BlockInfo.SubType = tifOneliner) or (BlockInfo.SubType = TOneLiner) then
+ break;
+ end;
+ CSTI_Semicolon:
+ begin
+ FParser.Next;
+ if (BlockInfo.SubType = tifOneliner) or (BlockInfo.SubType = TOneLiner) then
+ break;
+ end;
+ CSTII_until:
+ begin
+ Debug_WriteLine(BlockInfo);
+ if BlockInfo.SubType = tRepeat then
+ begin
+ break;
+ end
+ else
+ begin
+ MakeError('', ecIdentifierExpected, '');
+ exit;
+ end;
+ if (BlockInfo.SubType = tifOneliner) or (BlockInfo.SubType = TOneLiner) then
+ break;
+ end;
+ CSTII_Else:
+ begin
+ if BlockInfo.SubType = tifOneliner then
+ break
+ else
+ begin
+ MakeError('', ecIdentifierExpected, '');
+ exit;
+ end;
+ end;
+ CSTII_repeat:
+ begin
+ if not ProcessRepeat then
+ exit;
+ if (BlockInfo.SubType = tifOneliner) or (BlockInfo.SubType = TOneLiner) then
+ break;
+ end;
+ CSTII_For:
+ begin
+ if not ProcessFor then
+ exit;
+ if (BlockInfo.SubType = tifOneliner) or (BlockInfo.SubType = TOneLiner) then
+ break;
+ end;
+ CSTII_While:
+ begin
+ if not ProcessWhile then
+ exit;
+ if (BlockInfo.SubType = tifOneliner) or (BlockInfo.SubType = TOneLiner) then
+ break;
+ end;
+ CSTII_Exit:
+ begin
+ Debug_WriteLine(BlockInfo);
+ BlockWriteByte(BlockInfo, Cm_R);
+ FParser.Next;
+ if (BlockInfo.SubType = tifOneliner) or (BlockInfo.SubType = TOneLiner) then
+ break;
+ end;
+ CSTII_Case:
+ begin
+ if not ProcessCase then
+ exit;
+ if (BlockInfo.SubType = tifOneliner) or (BlockInfo.SubType = TOneLiner) then
+ break;
+ end;
+ CSTII_If:
+ begin
+ if not ProcessIf then
+ exit;
+ if (BlockInfo.SubType = tifOneliner) or (BlockInfo.SubType = TOneLiner) then
+ break;
+ end;
+ CSTI_Identifier:
+ begin
+ case _ProcessLabel of
+ 0: Exit;
+ 1: ;
+ else
+ begin
+ if FParser.GetToken = 'BREAK' then
+ begin
+ if FBreakOffsets = nil then
+ begin
+ MakeError('', ecNotInLoop, '');
+ exit;
+ end;
+ for i := 0 to FExceptFinallyCount - 1 do
+ begin
+ BlockWriteByte(BlockInfo, cm_poexh);
+ BlockWriteByte(BlockInfo, 1);
+ end;
+
+ for i := 0 to FTryCount - 1 do
+ begin
+ BlockWriteByte(BlockInfo, cm_poexh);
+ BlockWriteByte(BlockInfo, 0);
+ BlockWriteByte(BlockInfo, cm_poexh);
+ BlockWriteByte(BlockInfo, 1);
+ end;
+
+ for i := 0 to FWithCount - 1 do
+ BlockWriteByte(BlockInfo,cm_po);
+ BlockWriteByte(BlockInfo, Cm_G);
+ BlockWriteLong(BlockInfo, $12345678);
+ FBreakOffsets.Add(Pointer(Length(BlockInfo.Proc.Data)));
+ FParser.Next;
+ if (BlockInfo.SubType= tifOneliner) or (BlockInfo.SubType = TOneLiner) then
+ break;
+ end else if FParser.GetToken = 'CONTINUE' then
+ begin
+ if FBreakOffsets = nil then
+ begin
+ MakeError('', ecNotInLoop, '');
+ exit;
+ end;
+ for i := 0 to FExceptFinallyCount - 1 do
+ begin
+ BlockWriteByte(BlockInfo, cm_poexh);
+ BlockWriteByte(BlockInfo, 1);
+ end;
+
+ for i := 0 to FTryCount - 1 do
+ begin
+ BlockWriteByte(BlockInfo, cm_poexh);
+ BlockWriteByte(BlockInfo, 0);
+ BlockWriteByte(BlockInfo, cm_poexh);
+ BlockWriteByte(BlockInfo, 1);
+ end;
+
+ for i := 0 to FWithCount - 1 do
+ BlockWriteByte(BlockInfo,cm_po);
+ BlockWriteByte(BlockInfo, Cm_G);
+ BlockWriteLong(BlockInfo, $12345678);
+ FContinueOffsets.Add(Pointer(Length(BlockInfo.Proc.Data)));
+ FParser.Next;
+ if (BlockInfo.SubType = tifOneliner) or (BlockInfo.SubType = TOneLiner) then
+ break;
+ end else
+ if not ProcessIdentifier then
+ exit;
+ if (BlockInfo.SubType = tifOneliner) or (BlockInfo.SubType = TOneLiner) then
+ break;
+ end;
+ end; {case}
+
+ if (BlockInfo.SubType = tifOneliner) or (BlockInfo.SubType = TOneLiner) then
+ break;
+
+ end;
+ {$IFDEF PS_USESSUPPORT}
+ CSTII_Finalization: //NvdS
+ begin //
+ if (BlockInfo.SubType = tUnitInit) then //
+ begin //
+ break; //
+ end //
+ else //
+ begin //
+ MakeError('', ecIdentifierExpected, ''); //
+ exit; //
+ end; //
+ end; //nvds
+ {$endif}
+ CSTII_End:
+ begin
+ if (BlockInfo.SubType = tTryEnd) or (BlockInfo.SubType = tMainBegin) or
+ (BlockInfo.SubType = tSubBegin) or (BlockInfo.SubType = tifOneliner) or
+ (BlockInfo.SubType = tProcBegin) or (BlockInfo.SubType = TOneLiner)
+ {$IFDEF PS_USESSUPPORT} or (BlockInfo.SubType = tUnitInit) or (BlockInfo.SubType = tUnitFinish) {$endif} then //nvds
+ begin
+ break;
+ end
+ else
+ begin
+ MakeError('', ecIdentifierExpected, '');
+ exit;
+ end;
+ end;
+ CSTI_EOF:
+ begin
+ MakeError('', ecUnexpectedEndOfFile, '');
+ exit;
+ end;
+ else
+ begin
+ MakeError('', ecIdentifierExpected, '');
+ exit;
+ end;
+ end;
+ end;
+ if (BlockInfo.SubType = tMainBegin) or (BlockInfo.SubType = tProcBegin)
+ {$IFDEF PS_USESSUPPORT} or (BlockInfo.SubType = tUnitInit) or (BlockInfo.SubType = tUnitFinish) {$endif} then //nvds
+ begin
+ Debug_WriteLine(BlockInfo);
+ BlockWriteByte(BlockInfo, Cm_R);
+ {$IFDEF PS_USESSUPPORT}
+ if FParser.CurrTokenId = CSTII_End then //nvds
+ begin
+ {$endif}
+ FParser.Next; // skip end
+ if ((BlockInfo.SubType = tMainBegin)
+ {$IFDEF PS_USESSUPPORT} or (BlockInfo.SubType = tUnitInit) or (BlockInfo.SubType = tUnitFinish){$endif}) //nvds
+ and (FParser.CurrTokenId <> CSTI_Period) then
+ begin
+ MakeError('', ecPeriodExpected, '');
+ exit;
+ end;
+ if (BlockInfo.SubType = tProcBegin) and (FParser.CurrTokenId <> CSTI_Semicolon) then
+ begin
+ MakeError('', ecSemicolonExpected, '');
+ exit;
+ end;
+ FParser.Next;
+ {$IFDEF PS_USESSUPPORT}
+ end; //nvds
+ {$endif}
+ end
+ else if (BlockInfo.SubType = tifOneliner) or (BlockInfo.SubType = TOneLiner) then
+ begin
+ if (FParser.CurrTokenID <> CSTII_Else) and (FParser.CurrTokenID <> CSTII_End) then
+ if FParser.CurrTokenID <> CSTI_Semicolon then
+ begin
+ MakeError('', ecSemicolonExpected, '');
+ exit;
+ end;
+ end;
+
+ ProcessSub := True;
+end;
+procedure TPSPascalCompiler.UseProc(procdecl: TPSParametersDecl);
+var
+ i: Longint;
+begin
+ if procdecl.Result <> nil then
+ procdecl.Result := at2ut(procdecl.Result);
+ for i := 0 to procdecl.ParamCount -1 do
+ begin
+ procdecl.Params[i].aType := at2ut(procdecl.Params[i].aType);
+ end;
+end;
+
+function TPSPascalCompiler.at2ut(p: TPSType): TPSType;
+var
+ i: Longint;
+begin
+ p := GetTypeCopyLink(p);
+ if p = nil then
+ begin
+ Result := nil;
+ exit;
+ end;
+ if not p.Used then
+ begin
+ case p.BaseType of
+ btStaticArray, btArray: TPSArrayType(p).ArrayTypeNo := at2ut(TPSArrayType(p).ArrayTypeNo);
+ btRecord:
+ begin
+ for i := 0 to TPSRecordType(p).RecValCount -1 do
+ begin
+ TPSRecordType(p).RecVal(i).aType := at2ut(TPSRecordType(p).RecVal(i).aType);
+ end;
+ end;
+ btSet: TPSSetType(p).SetType := at2ut(TPSSetType(p).SetType);
+ btProcPtr:
+ begin
+ UseProc(TPSProceduralType(p).ProcDef);
+ end;
+ end;
+ p.Use;
+ p.FFinalTypeNo := FCurrUsedTypeNo;
+ inc(FCurrUsedTypeNo);
+ end;
+ Result := p;
+end;
+
+function TPSPascalCompiler.ProcessLabelForwards(Proc: TPSInternalProcedure): Boolean;
+var
+ i: Longint;
+ s, s2: string;
+begin
+ for i := 0 to Proc.FLabels.Count -1 do
+ begin
+ s := Proc.FLabels[I];
+ if Longint((@s[1])^) = -1 then
+ begin
+ delete(s, 1, 8);
+ MakeError('', ecUnSetLabel, s);
+ Result := False;
+ exit;
+ end;
+ end;
+ for i := Proc.FGotos.Count -1 downto 0 do
+ begin
+ s := Proc.FGotos[I];
+ s2 := Proc.FLabels[Cardinal((@s[5])^)];
+ Cardinal((@Proc.Data[Cardinal((@s[1])^)-3])^) := Cardinal((@s2[1])^) - Cardinal((@s[1])^) ;
+ end;
+ Result := True;
+end;
+
+
+type
+ TCompilerState = (csStart, csProgram, csUnit, csUses, csInterface, csInterfaceUses, csImplementation);
+
+function TPSPascalCompiler.Compile(const s: string): Boolean;
+var
+ Position: TCompilerState;
+ i: Longint;
+ {$IFDEF PS_USESSUPPORT}
+ OldFileName: String;
+ OldParser : TPSPascalParser;
+ OldIsUnit : Boolean;
+ {$ENDIF}
+
+ procedure Cleanup;
+ var
+ I: Longint;
+ PT: TPSType;
+ begin
+ {$IFDEF PS_USESSUPPORT}
+ if fInCompile>1 then
+ begin
+ dec(fInCompile);
+ exit;
+ end;
+ {$ENDIF}
+
+ if @FOnBeforeCleanup <> nil then
+ FOnBeforeCleanup(Self); // no reason it actually read the result of this call
+ FGlobalBlock.Free;
+
+ for I := 0 to FRegProcs.Count - 1 do
+ TObject(FRegProcs[I]).Free;
+ FRegProcs.Free;
+ for i := 0 to FConstants.Count -1 do
+ begin
+ TPSConstant(FConstants[I]).Free;
+ end;
+ Fconstants.Free;
+ for I := 0 to FVars.Count - 1 do
+ begin
+ TPSVar(FVars[I]).Free;
+ end;
+ FVars.Free;
+ FVars := nil;
+ for I := 0 to FProcs.Count - 1 do
+ TPSProcedure(FProcs[I]).Free;
+ FProcs.Free;
+ FProcs := nil;
+ for I := 0 to FTypes.Count - 1 do
+ begin
+ PT := FTypes[I];
+ pt.Free;
+ end;
+ FTypes.Free;
+
+{$IFNDEF PS_NOINTERFACES}
+ for i := FInterfaces.Count -1 downto 0 do
+ TPSInterface(FInterfaces[i]).Free;
+ FInterfaces.Free;
+{$ENDIF}
+
+ for i := FClasses.Count -1 downto 0 do
+ begin
+ TPSCompileTimeClass(FClasses[I]).Free;
+ end;
+ FClasses.Free;
+ for i := FAttributeTypes.Count -1 downto 0 do
+ begin
+ TPSAttributeType(FAttributeTypes[i]).Free;
+ end;
+ FAttributeTypes.Free;
+ FAttributeTypes := nil;
+
+ {$IFDEF PS_USESSUPPORT}
+ for I := 0 to FUnitInits.Count - 1 do //nvds
+ begin //nvds
+ TPSBlockInfo(FUnitInits[I]).free; //nvds
+ end; //nvds
+ FUnitInits.Free; //nvds
+ FUnitInits := nil; //
+ for I := 0 to FUnitFinits.Count - 1 do //nvds
+ begin //nvds
+ TPSBlockInfo(FUnitFinits[I]).free; //nvds
+ end; //nvds
+ FUnitFinits.Free; //
+ FUnitFinits := nil; //
+
+ FUses.Free;
+ FUses:=nil;
+ fInCompile:=0;
+ {$ENDIF}
+ end;
+
+ function MakeOutput: Boolean;
+
+ procedure WriteByte(b: Byte);
+ begin
+ FOutput := FOutput + Char(b);
+ end;
+
+ procedure WriteData(const Data; Len: Longint);
+ var
+ l: Longint;
+ begin
+ if Len < 0 then Len := 0;
+ l := Length(FOutput);
+ SetLength(FOutput, l + Len);
+ Move(Data, FOutput[l + 1], Len);
+ end;
+
+ procedure WriteLong(l: Cardinal);
+ begin
+ WriteData(l, 4);
+ end;
+
+ procedure WriteVariant(p: PIfRVariant);
+ begin
+ WriteLong(p^.FType.FinalTypeNo);
+ case p.FType.BaseType of
+ btType: WriteLong(p^.ttype.FinalTypeNo);
+ {$IFNDEF PS_NOWIDESTRING}
+ btWideString:
+ begin
+ WriteLong(Length(tbtWideString(p^.twidestring)));
+ WriteData(tbtwidestring(p^.twidestring)[1], 2*Length(tbtWideString(p^.twidestring)));
+ end;
+ btWideChar: WriteData(p^.twidechar, 2);
+ {$ENDIF}
+ btSingle: WriteData(p^.tsingle, sizeof(tbtSingle));
+ btDouble: WriteData(p^.tsingle, sizeof(tbtDouble));
+ btExtended: WriteData(p^.tsingle, sizeof(tbtExtended));
+ btCurrency: WriteData(p^.tsingle, sizeof(tbtCurrency));
+ btChar: WriteData(p^.tchar, 1);
+ btSet:
+ begin
+ WriteData(tbtString(p^.tstring)[1], Length(tbtString(p^.tstring)));
+ end;
+ btString:
+ begin
+ WriteLong(Length(tbtString(p^.tstring)));
+ WriteData(tbtString(p^.tstring)[1], Length(tbtString(p^.tstring)));
+ end;
+ btenum:
+ begin
+ if TPSEnumType(p^.FType).HighValue <=256 then
+ WriteData( p^.tu32, 1)
+ else if TPSEnumType(p^.FType).HighValue <=65536 then
+ WriteData(p^.tu32, 2)
+ else
+ WriteData(p^.tu32, 4);
+ end;
+ bts8,btu8: WriteData(p^.tu8, 1);
+ bts16,btu16: WriteData(p^.tu16, 2);
+ bts32,btu32: WriteData(p^.tu32, 4);
+ {$IFNDEF PS_NOINT64}
+ bts64: WriteData(p^.ts64, 8);
+ {$ENDIF}
+ btProcPtr: WriteData(p^.tu32, 4);
+ {$IFDEF DEBUG}
+ else
+ asm int 3; end;
+ {$ENDIF}
+ end;
+ end;
+
+ procedure WriteAttributes(attr: TPSAttributes);
+ var
+ i, j: Longint;
+ begin
+ WriteLong(attr.Count);
+ for i := 0 to Attr.Count -1 do
+ begin
+ j := Length(attr[i].FAttribType.Name);
+ WriteLong(j);
+ WriteData(Attr[i].FAttribType.Name[1], j);
+ WriteLong(Attr[i].Count);
+ for j := 0 to Attr[i].Count -1 do
+ begin
+ WriteVariant(Attr[i][j]);
+ end;
+ end;
+ end;
+
+ procedure WriteTypes;
+ var
+ l, n: Longint;
+ bt: TPSBaseType;
+ x: TPSType;
+ s: string;
+ FExportName: string;
+ Items: TPSList;
+ procedure WriteTypeNo(TypeNo: Cardinal);
+ begin
+ WriteData(TypeNo, 4);
+ end;
+ begin
+ Items := TPSList.Create;
+ try
+ for l := 0 to FCurrUsedTypeNo -1 do
+ Items.Add(nil);
+ for l := 0 to FTypes.Count -1 do
+ begin
+ x := FTypes[l];
+ if x.Used then
+ Items[x.FinalTypeNo] := x;
+ end;
+ for l := 0 to Items.Count - 1 do
+ begin
+ x := Items[l];
+ if x.FExportName then
+ FExportName := x.Name
+ else
+ FExportName := '';
+ if (x.BaseType = btExtClass) and (x is TPSUndefinedClassType) then
+ begin
+ x := GetTypeCopyLink(TPSUndefinedClassType(x).ExtClass.SelfType);
+ end;
+ bt := x.BaseType;
+ if (x.BaseType = btType) or (x.BaseType = btNotificationVariant) then
+ begin
+ bt := btU32;
+ end else
+ if (x.BaseType = btEnum) then begin
+ if TPSEnumType(x).HighValue <= 256 then
+ bt := btU8
+ else if TPSEnumType(x).HighValue <= 65536 then
+ bt := btU16
+ else
+ bt := btU32;
+ end;
+ if FExportName <> '' then
+ begin
+ WriteByte(bt + 128);
+ end
+ else
+ WriteByte(bt);
+{$IFNDEF PS_NOINTERFACES} if x.BaseType = btInterface then
+ begin
+ WriteData(TPSInterfaceType(x).Intf.Guid, Sizeof(TGuid));
+ end else {$ENDIF} if x.BaseType = btClass then
+ begin
+ WriteLong(Length(TPSClassType(X).Cl.FClassName));
+ WriteData(TPSClassType(X).Cl.FClassName[1], Length(TPSClassType(X).Cl.FClassName));
+ end else
+ if (x.BaseType = btProcPtr) then
+ begin
+ s := DeclToBits(TPSProceduralType(x).ProcDef);
+ WriteLong(Length(s));
+ WriteData(s[1], Length(s));
+ end else
+ if (x.BaseType = btSet) then
+ begin
+ WriteLong(TPSSetType(x).BitSize);
+ end else
+ if (x.BaseType = btArray) or (x.basetype = btStaticArray) then
+ begin
+ WriteLong(TPSArrayType(x).ArrayTypeNo.FinalTypeNo);
+ if (x.baseType = btstaticarray) then begin
+ WriteLong(TPSStaticArrayType(x).Length);
+ WriteLong(TPSStaticArrayType(x).StartOffset); //<-additional StartOffset
+ end;
+ end else if x.BaseType = btRecord then
+ begin
+ n := TPSRecordType(x).RecValCount;
+ WriteData( n, 4);
+ for n := 0 to TPSRecordType(x).RecValCount - 1 do
+ WriteTypeNo(TPSRecordType(x).RecVal(n).FType.FinalTypeNo);
+ end;
+ if FExportName <> '' then
+ begin
+ WriteLong(Length(FExportName));
+ WriteData(FExportName[1], length(FExportName));
+ end;
+ WriteAttributes(x.Attributes);
+ end;
+ finally
+ Items.Free;
+ end;
+ end;
+
+ procedure WriteVars;
+ var
+ l,j : Longint;
+ x: TPSVar;
+ begin
+ for l := 0 to FVars.Count - 1 do
+ begin
+ x := FVars[l];
+ if x.SaveAsPointer then
+ begin
+ for j := FTypes.count -1 downto 0 do
+ begin
+ if TPSType(FTypes[j]).BaseType = btPointer then
+ begin
+ WriteLong(TPSType(FTypes[j]).FinalTypeNo);
+ break;
+ end;
+ end;
+ end else
+ WriteLong(x.FType.FinalTypeNo);
+ if x.exportname <> '' then
+ begin
+ WriteByte( 1);
+ WriteLong(Length(X.ExportName));
+ WriteData( X.ExportName[1], length(X.ExportName));
+ end else
+ WriteByte( 0);
+ end;
+ end;
+
+ procedure WriteProcs;
+ var
+ l: Longint;
+ xp: TPSProcedure;
+ xo: TPSInternalProcedure;
+ xe: TPSExternalProcedure;
+ s: string;
+ att: Byte;
+ begin
+ for l := 0 to FProcs.Count - 1 do
+ begin
+ xp := FProcs[l];
+ if xp.Attributes.Count <> 0 then att := 4 else att := 0;
+ if xp.ClassType = TPSInternalProcedure then
+ begin
+ xo := TPSInternalProcedure(xp);
+ xo.OutputDeclPosition := Length(FOutput);
+ WriteByte(att or 2); // exported
+ WriteLong(0); // offset is unknown at this time
+ WriteLong(0); // length is also unknown at this time
+ WriteLong(Length(xo.Name));
+ WriteData( xo.Name[1], length(xo.Name));
+ s := MakeExportDecl(xo.Decl);
+ WriteLong(Length(s));
+ WriteData( s[1], length(S));
+ end
+ else
+ begin
+ xe := TPSExternalProcedure(xp);
+ if xe.RegProc.ImportDecl <> '' then
+ begin
+ WriteByte( att or 3); // imported
+ if xe.RegProc.FExportName then
+ begin
+ WriteByte(Length(xe.RegProc.Name));
+ WriteData(xe.RegProc.Name[1], Length(xe.RegProc.Name) and $FF);
+ end else begin
+ WriteByte(0);
+ end;
+ WriteLong(Length(xe.RegProc.ImportDecl));
+ WriteData(xe.RegProc.ImportDecl[1], Length(xe.RegProc.ImportDecl));
+ end else begin
+ WriteByte(att or 1); // imported
+ WriteByte(Length(xe.RegProc.Name));
+ WriteData(xe.RegProc.Name[1], Length(xe.RegProc.Name) and $FF);
+ end;
+ end;
+ if xp.Attributes.Count <> 0 then
+ WriteAttributes(xp.Attributes);
+ end;
+ end;
+
+ procedure WriteProcs2;
+ var
+ l: Longint;
+ L2: Cardinal;
+ x: TPSProcedure;
+ begin
+ for l := 0 to FProcs.Count - 1 do
+ begin
+ x := FProcs[l];
+ if x.ClassType = TPSInternalProcedure then
+ begin
+ if TPSInternalProcedure(x).Data = '' then
+ TPSInternalProcedure(x).Data := Chr(Cm_R);
+ L2 := Length(FOutput);
+ Move(L2, FOutput[TPSInternalProcedure(x).OutputDeclPosition + 2], 4);
+ // write position
+ WriteData(TPSInternalProcedure(x).Data[1], Length(TPSInternalProcedure(x).Data));
+ L2 := Cardinal(Length(FOutput)) - L2;
+ Move(L2, FOutput[TPSInternalProcedure(x).OutputDeclPosition + 6], 4); // write length
+ end;
+ end;
+ end;
+
+
+
+ {$IFDEF PS_USESSUPPORT}
+ function FindMainProc: Cardinal;
+ var
+ l: Longint;
+ Proc : TPSInternalProcedure;
+ ProcData : String;
+ Calls : Integer;
+
+ procedure WriteProc(const aData: Longint);
+ var
+ l: Longint;
+ begin
+ ProcData := ProcData + Chr(cm_c);
+ l := Length(ProcData);
+ SetLength(ProcData, l + 4);
+ Move(aData, ProcData[l + 1], 4);
+ inc(Calls);
+ end;
+ begin
+ ProcData := ''; Calls := 1;
+ for l := 0 to FUnitInits.Count-1 do
+ if (FUnitInits[l] <> nil) and
+ (TPSBlockInfo(FUnitInits[l]).Proc.Data<>'') then
+ WriteProc(TPSBlockInfo(FUnitInits[l]).FProcNo);
+
+ WriteProc(FGlobalBlock.FProcNo);
+
+ for l := FUnitFinits.Count-1 downto 0 do
+ if (FUnitFinits[l] <> nil) and
+ (TPSBlockInfo(FUnitFinits[l]).Proc.Data<>'') then
+ WriteProc(TPSBlockInfo(FUnitFinits[l]).FProcNo);
+
+ if Calls = 1 then begin
+ Result := FGlobalBlock.FProcNo;
+ end else
+ begin
+ Proc := NewProc('Master proc', '!MASTERPROC');
+ Result := FindProc('!MASTERPROC');
+ Proc.data := Procdata + Chr(cm_R);
+ end;
+ end;
+ {$ELSE}
+ function FindMainProc: Cardinal;
+ var
+ l: Longint;
+ begin
+ for l := 0 to FProcs.Count - 1 do
+ begin
+ if (TPSProcedure(FProcs[l]).ClassType = TPSInternalProcedure) and
+ (TPSInternalProcedure(FProcs[l]).Name = PSMainProcName) then
+ begin
+ Result := l;
+ exit;
+ end;
+ end;
+ Result := InvalidVal;
+ end;
+ {$ENDIF}
+
+ procedure CreateDebugData;
+ var
+ I: Longint;
+ p: TPSProcedure;
+ pv: TPSVar;
+ s: string;
+ begin
+ s := #0;
+ for I := 0 to FProcs.Count - 1 do
+ begin
+ p := FProcs[I];
+ if p.ClassType = TPSInternalProcedure then
+ begin
+ if TPSInternalProcedure(p).Name = PSMainProcName then
+ s := s + #1
+ else
+ s := s + TPSInternalProcedure(p).OriginalName + #1;
+ end
+ else
+ begin
+ s := s+ TPSExternalProcedure(p).RegProc.OrgName + #1;
+ end;
+ end;
+ s := s + #0#1;
+ for I := 0 to FVars.Count - 1 do
+ begin
+ pv := FVars[I];
+ s := s + pv.OrgName + #1;
+ end;
+ s := s + #0;
+ WriteDebugData(s);
+ end;
+
+ var //nvds
+ MainProc : Cardinal; //nvds
+
+ begin
+ if @FOnBeforeOutput <> nil then
+ begin
+ if not FOnBeforeOutput(Self) then
+ begin
+ Result := false;
+ exit;
+ end;
+ end;
+ MainProc := FindMainProc; //NvdS (need it here becose FindMainProc can create a New proc.
+ CreateDebugData;
+ WriteLong(PSValidHeader);
+ WriteLong(PSCurrentBuildNo);
+ WriteLong(FCurrUsedTypeNo);
+ WriteLong(FProcs.Count);
+ WriteLong(FVars.Count);
+ WriteLong(MainProc); //nvds
+ WriteLong(0);
+ WriteTypes;
+ WriteProcs;
+ WriteVars;
+ WriteProcs2;
+
+ Result := true;
+ end;
+
+ function CheckExports: Boolean;
+ var
+ i: Longint;
+ p: TPSProcedure;
+ begin
+ if @FOnExportCheck = nil then
+ begin
+ result := true;
+ exit;
+ end;
+ for i := 0 to FProcs.Count -1 do
+ begin
+ p := FProcs[I];
+ if p.ClassType = TPSInternalProcedure then
+ begin
+ if not FOnExportCheck(Self, TPSInternalProcedure(p), MakeDecl(TPSInternalProcedure(p).Decl)) then
+ begin
+ Result := false;
+ exit;
+ end;
+ end;
+ end;
+ Result := True;
+ end;
+ function DoConstBlock: Boolean;
+ var
+ COrgName: string;
+ CTemp, CValue: PIFRVariant;
+ Cp: TPSConstant;
+ TokenPos, TokenRow, TokenCol: Integer;
+ begin
+ FParser.Next;
+ repeat
+ if FParser.CurrTokenID <> CSTI_Identifier then
+ begin
+ MakeError('', ecIdentifierExpected, '');
+ Result := False;
+ Exit;
+ end;
+ TokenPos := FParser.CurrTokenPos;
+ TokenRow := FParser.Row;
+ TokenCol := FParser.Col;
+ COrgName := FParser.OriginalToken;
+ if IsDuplicate(FastUpperCase(COrgName), [dcVars, dcProcs, dcConsts]) then
+ begin
+ MakeError('', ecDuplicateIdentifier, COrgName);
+ Result := False;
+ exit;
+ end;
+ FParser.Next;
+ if FParser.CurrTokenID <> CSTI_Equal then
+ begin
+ MakeError('', ecIsExpected, '');
+ Result := False;
+ Exit;
+ end;
+ FParser.Next;
+ CValue := ReadConstant(FParser, CSTI_SemiColon);
+ if CValue = nil then
+ begin
+ Result := False;
+ Exit;
+ end;
+ if FParser.CurrTokenID <> CSTI_Semicolon then
+ begin
+ MakeError('', ecSemicolonExpected, '');
+ Result := False;
+ exit;
+ end;
+ cp := TPSConstant.Create;
+ cp.Orgname := COrgName;
+ cp.Name := FastUpperCase(COrgName);
+ {$IFDEF PS_USESSUPPORT}
+ cp.DeclareUnit:=fModule;
+ {$ENDIF}
+ cp.DeclarePos := TokenPos;
+ cp.DeclareRow := TokenRow;
+ cp.DeclareCol := TokenCol;
+ New(CTemp);
+ InitializeVariant(CTemp, CValue.FType);
+ CopyVariantContents(cvalue, CTemp);
+ cp.Value := CTemp;
+ FConstants.Add(cp);
+ DisposeVariant(CValue);
+ FParser.Next;
+ until FParser.CurrTokenId <> CSTI_Identifier;
+ Result := True;
+ end;
+
+ function ProcessUses: Boolean;
+ var
+ {$IFNDEF PS_USESSUPPORT}
+ FUses: TIfStringList;
+ {$ENDIF}
+ I: Longint;
+ s: string;
+ {$IFDEF PS_USESSUPPORT}
+ Parse: Boolean;
+ ParseUnit: String;
+ ParserPos: TPSPascalParser;
+ {$ENDIF}
+ begin
+ FParser.Next;
+ {$IFNDEF PS_USESSUPPORT}
+ FUses := TIfStringList.Create;
+ FUses.Add('SYSTEM');
+ {$ENDIF}
+ repeat
+ if FParser.CurrTokenID <> CSTI_Identifier then
+ begin
+ MakeError('', ecIdentifierExpected, '');
+ {$IFNDEF PS_USESSUPPORT}
+ FUses.Free;
+ {$ENDIF}
+ Result := False;
+ exit;
+ end;
+ s := FParser.GetToken;
+ {$IFDEF PS_USESSUPPORT}
+ Parse:=true;
+ {$ENDIF}
+ for i := 0 to FUses.Count -1 do
+ begin
+ if FUses[I] = s then
+ begin
+ {$IFNDEF PS_USESSUPPORT}
+ MakeError('', ecDuplicateIdentifier, s);
+ FUses.Free;
+ Result := False;
+ exit;
+ {$ELSE}
+ Parse:=false;
+ {$ENDIF}
+ end;
+ end;
+ {$IFDEF PS_USESSUPPORT}
+ if Parse then
+ begin
+ {$ENDIF}
+ FUses.Add(s);
+ if @FOnUses <> nil then
+ begin
+ try
+ {$IFDEF PS_USESSUPPORT}
+ OldFileName:=fModule;
+ fModule:=FParser.OriginalToken;
+ ParseUnit:=FParser.OriginalToken;
+ ParserPos:=FParser;
+ {$ENDIF}
+ if not OnUses(Self, FParser.GetToken) then
+ begin
+ {$IFNDEF PS_USESSUPPORT}
+ FUses.Free;
+ {$ELSE}
+ FParser:=ParserPos;
+ fModule:=OldFileName;
+ MakeError(OldFileName, ecUnitNotFoundOrContainsErrors, ParseUnit);
+ {$ENDIF}
+ Result := False;
+ exit;
+ end;
+ {$IFDEF PS_USESSUPPORT}
+ fModule:=OldFileName;
+ {$ENDIF}
+ except
+ on e: Exception do
+ begin
+ MakeError('', ecCustomError, e.Message);
+ {$IFNDEF PS_USESSUPPORT}
+ FUses.Free;
+ {$ENDIF}
+ Result := False;
+ exit;
+ end;
+ end;
+ end;
+ {$IFDEF PS_USESSUPPORT}
+ end;
+ {$ENDIF}
+ FParser.Next;
+ if FParser.CurrTokenID = CSTI_Semicolon then break
+ else if FParser.CurrTokenId <> CSTI_Comma then
+ begin
+ MakeError('', ecSemicolonExpected, '');
+ Result := False;
+ {$IFNDEF PS_USESSUPPORT}
+ FUses.Free;
+ {$ENDIF}
+ exit;
+ end;
+ FParser.Next;
+ until False;
+ {$IFNDEF PS_USESSUPPORT}
+ FUses.Free;
+ {$ENDIF}
+ FParser.next;
+ Result := True;
+ end;
+
+var
+ Proc: TPSProcedure;
+ {$IFDEF PS_USESSUPPORT}
+ Block : TPSBlockInfo; //nvds
+ {$ENDIF}
+begin
+ Result := False;
+ FWithCount := -1;
+
+ {$IFDEF PS_USESSUPPORT}
+ if fInCompile=0 then
+ begin
+ {$ENDIF}
+ FUnitName := '';
+ FCurrUsedTypeNo := 0;
+ FIsUnit := False;
+ Clear;
+ FParserHadError := False;
+ FParser.SetText(s);
+ FAttributeTypes := TPSList.Create;
+ FProcs := TPSList.Create;
+ FConstants := TPSList.Create;
+ FVars := TPSList.Create;
+ FTypes := TPSList.Create;
+ FRegProcs := TPSList.Create;
+ FClasses := TPSList.Create;
+
+ {$IFDEF PS_USESSUPPORT}
+ FUnitInits := TPSList.Create; //nvds
+ FUnitFinits:= TPSList.Create; //nvds
+
+ FUses:=TIFStringList.Create;
+ {$ENDIF}
+ {$IFNDEF PS_NOINTERFACES} FInterfaces := TPSList.Create;{$ENDIF}
+
+ FGlobalBlock := TPSBlockInfo.Create(nil);
+ FGlobalBlock.SubType := tMainBegin;
+
+ FGlobalBlock.Proc := NewProc(PSMainProcNameOrg, PSMainProcName);
+ FGlobalBlock.ProcNo := FindProc(PSMainProcName);
+
+ {$IFDEF PS_USESSUPPORT}
+ OldFileName:=fModule;
+ fModule:='System';
+ FUses.Add('SYSTEM');
+ {$ENDIF}
+ {$IFNDEF PS_NOSTANDARDTYPES}
+ DefineStandardTypes;
+ DefineStandardProcedures;
+ {$ENDIF}
+ if @FOnUses <> nil then
+ begin
+ try
+ if not OnUses(Self, 'SYSTEM') then
+ begin
+ Cleanup;
+ exit;
+ end;
+ except
+ on e: Exception do
+ begin
+ MakeError('', ecCustomError, e.Message);
+ Cleanup;
+ exit;
+ end;
+ end;
+ end;
+ {$IFDEF PS_USESSUPPORT}
+ fModule:=OldFileName;
+ OldParser:=nil;
+ OldIsUnit:=false; // defaults
+ end
+ else
+ begin
+ OldParser:=FParser;
+ OldIsUnit:=FIsUnit;
+ FParser:=TPSPascalParser.Create;
+ FParser.SetText(s);
+ end;
+
+ inc(fInCompile);
+ {$ENDIF}
+
+ Position := csStart;
+ repeat
+ if FParser.CurrTokenId = CSTI_EOF then
+ begin
+ if FParserHadError then
+ begin
+ Cleanup;
+ exit;
+ end;
+ if FAllowNoEnd then
+ Break
+ else
+ begin
+ MakeError('', ecUnexpectedEndOfFile, '');
+ Cleanup;
+ exit;
+ end;
+ end;
+ if (FParser.CurrTokenId = CSTII_Program) and (Position = csStart) then
+ begin
+ {$IFDEF PS_USESSUPPORT}
+ if fInCompile>1 then
+ begin
+ MakeError('', ecNotAllowed, 'program');
+ Cleanup;
+ exit;
+ end;
+ {$ENDIF}
+ Position := csProgram;
+ FParser.Next;
+ if FParser.CurrTokenId <> CSTI_Identifier then
+ begin
+ MakeError('', ecIdentifierExpected, '');
+ Cleanup;
+ exit;
+ end;
+ FParser.Next;
+ if FParser.CurrTokenId <> CSTI_Semicolon then
+ begin
+ MakeError('', ecSemicolonExpected, '');
+ Cleanup;
+ exit;
+ end;
+ FParser.Next;
+ end else
+ if (Fparser.CurrTokenID = CSTII_Implementation) and ((Position = csinterface) or (position = csInterfaceUses)) then
+ begin
+ Position := csImplementation;
+ FParser.Next;
+ end else
+ if (Fparser.CurrTokenID = CSTII_Interface) and (Position = csUnit) then
+ begin
+ Position := csInterface;
+ FParser.Next;
+ end else
+ if (FParser.CurrTokenId = CSTII_Unit) and (Position = csStart) and (FAllowUnit) then
+ begin
+ Position := csUnit;
+ FIsUnit := True;
+ FParser.Next;
+ if FParser.CurrTokenId <> CSTI_Identifier then
+ begin
+ MakeError('', ecIdentifierExpected, '');
+ Cleanup;
+ exit;
+ end;
+ if fInCompile = 1 then
+ FUnitName := FParser.OriginalToken;
+ FParser.Next;
+ if FParser.CurrTokenId <> CSTI_Semicolon then
+ begin
+ MakeError('', ecSemicolonExpected, '');
+ Cleanup;
+ exit;
+ end;
+ FParser.Next;
+ end
+ else if (FParser.CurrTokenID = CSTII_Uses) and ((Position < csuses) or (Position = csInterface)) then
+ begin
+ if (Position = csInterface) or (Position =csInterfaceUses)
+ then Position := csInterfaceUses
+ else Position := csUses;
+ if not ProcessUses then
+ begin
+ Cleanup;
+ exit;
+ end;
+ end else if (FParser.CurrTokenId = CSTII_Procedure) or
+ (FParser.CurrTokenId = CSTII_Function) or (FParser.CurrTokenID = CSTI_OpenBlock) then
+ begin
+ if (Position = csInterface) or (position = csInterfaceUses) then
+ begin
+ if not ProcessFunction(True, nil) then
+ begin
+ Cleanup;
+ exit;
+ end;
+ end else begin
+ Position := csUses;
+ if not ProcessFunction(False, nil) then
+ begin
+ Cleanup;
+ exit;
+ end;
+ end;
+ end
+ else if (FParser.CurrTokenId = CSTII_Label) then
+ begin
+ if (Position = csInterface) or (Position =csInterfaceUses)
+ then Position := csInterfaceUses
+ else Position := csUses;
+ if not ProcessLabel(FGlobalBlock.Proc) then
+ begin
+ Cleanup;
+ exit;
+ end;
+ end
+ else if (FParser.CurrTokenId = CSTII_Var) then
+ begin
+ if (Position = csInterface) or (Position =csInterfaceUses)
+ then Position := csInterfaceUses
+ else Position := csUses;
+ if not DoVarBlock(nil) then
+ begin
+ Cleanup;
+ exit;
+ end;
+ end
+ else if (FParser.CurrTokenId = CSTII_Const) then
+ begin
+ if (Position = csInterface) or (Position =csInterfaceUses)
+ then Position := csInterfaceUses
+ else Position := csUses;
+ if not DoConstBlock then
+ begin
+ Cleanup;
+ exit;
+ end;
+ end
+ else if (FParser.CurrTokenId = CSTII_Type) then
+ begin
+ if (Position = csInterface) or (Position =csInterfaceUses)
+ then Position := csInterfaceUses
+ else Position := csUses;
+ if not DoTypeBlock(FParser) then
+ begin
+ Cleanup;
+ exit;
+ end;
+ end
+ else if (FParser.CurrTokenId = CSTII_Begin)
+ {$IFDEF PS_USESSUPPORT}
+ or ((FParser.CurrTokenID = CSTII_initialization) and FIsUnit) {$ENDIF} then //nvds
+ begin
+ {$IFDEF PS_USESSUPPORT}
+ if FIsUnit then
+ begin
+ Block := TPSBlockInfo.Create(nil); //nvds
+ Block.SubType := tUnitInit; //nvds
+ Block.Proc := NewProc(PSMainProcNameOrg+'_'+fModule, PSMainProcName+'_'+fModule); //nvds
+ Block.ProcNo := FindProc(PSMainProcName+'_'+fModule); //nvds
+ Block.Proc.DeclareUnit:= fModule;
+ Block.Proc.DeclarePos := FParser.CurrTokenPos;
+ Block.Proc.DeclareRow := FParser.Row;
+ Block.Proc.DeclareCol := FParser.Col;
+ Block.Proc.Use;
+ FUnitInits.Add(Block);
+ if ProcessSub(Block) then
+ begin
+ if (Fparser.CurrTokenId = CSTI_EOF) THEN break;
+ end
+ else
+ begin
+ Cleanup;
+ exit;
+ end;
+ end
+ else
+ begin
+ FGlobalBlock.Proc.DeclareUnit:= fModule;
+ {$ENDIF}
+ FGlobalBlock.Proc.DeclarePos := FParser.CurrTokenPos;
+ FGlobalBlock.Proc.DeclareRow := FParser.Row;
+ FGlobalBlock.Proc.DeclareCol := FParser.Col;
+ if ProcessSub(FGlobalBlock) then
+ begin
+ break;
+ end
+ else
+ begin
+ Cleanup;
+ exit;
+ end;
+ {$IFDEF PS_USESSUPPORT}
+ end;
+ {$ENDIF}
+ end
+ {$IFDEF PS_USESSUPPORT}
+ else if ((FParser.CurrTokenID = CSTII_finalization) and FIsUnit) then //NvdS
+ begin
+ Block := TPSBlockInfo.Create(nil);
+ Block.SubType := tUnitFinish;
+
+ Block.Proc := NewProc('Finish proc_'+fModule, '!FINISH_'+fModule);
+ Block.ProcNo := FindProc('!FINISH_'+fModule);
+ Block.Proc.DeclareUnit:= fModule;
+
+ Block.Proc.DeclarePos := FParser.CurrTokenPos;
+ Block.Proc.DeclareRow := FParser.Row;
+ Block.Proc.DeclareCol := FParser.Col;
+ Block.Proc.use;
+ FUnitFinits.Add(Block);
+ if ProcessSub(Block) then
+ begin
+ break;
+ end else begin
+ Cleanup;
+ Result := False; //Cleanup;
+ exit;
+ end;
+ end
+ {$endif}
+ else if (Fparser.CurrTokenId = CSTII_End) and (FAllowNoBegin or FIsUnit) then
+ begin
+ FParser.Next;
+ if FParser.CurrTokenID <> CSTI_Period then
+ begin
+ MakeError('', ecPeriodExpected, '');
+ Cleanup;
+ exit;
+ end;
+ break;
+ end else
+ begin
+ MakeError('', ecBeginExpected, '');
+ Cleanup;
+ exit;
+ end;
+ until False;
+
+ {$IFDEF PS_USESSUPPORT}
+ dec(fInCompile);
+ if fInCompile=0 then
+ begin
+ {$ENDIF}
+ if not ProcessLabelForwards(FGlobalBlock.Proc) then
+ begin
+ Cleanup;
+ exit;
+ end;
+ // NVDS: Do we need to check here also do a ProcessLabelForwards() for each Initialisation/finalization block?
+
+ for i := 0 to FProcs.Count -1 do
+ begin
+ Proc := FProcs[I];
+ if (Proc.ClassType = TPSInternalProcedure) and (TPSInternalProcedure(Proc).Forwarded) then
+ begin
+ with MakeError('', ecUnsatisfiedForward, TPSInternalProcedure(Proc).Name) do
+ begin
+ FPosition := TPSInternalProcedure(Proc).DeclarePos;
+ FRow := TPSInternalProcedure(Proc).DeclareRow;
+ FCol := TPSInternalProcedure(Proc).DeclareCol;
+ end;
+ Cleanup;
+ Exit;
+ end;
+ end;
+ if not CheckExports then
+ begin
+ Cleanup;
+ exit;
+ end;
+ for i := 0 to FVars.Count -1 do
+ begin
+ if not TPSVar(FVars[I]).Used then
+ begin
+ with MakeHint({$IFDEF PS_USESSUPPORT}TPSVar(FVars[I]).DeclareUnit{$ELSE}''{$ENDIF}, ehVariableNotUsed, TPSVar(FVars[I]).Name) do
+ begin
+ FPosition := TPSVar(FVars[I]).DeclarePos;
+ FRow := TPSVar(FVars[I]).DeclareRow;
+ FCol := TPSVar(FVars[I]).DeclareCol;
+ end;
+ end;
+ end;
+
+ Result := MakeOutput;
+ Cleanup;
+ {$IFDEF PS_USESSUPPORT}
+ end
+ else
+ begin
+ fParser.Free;
+ fParser:=OldParser;
+ fIsUnit:=OldIsUnit;
+ result:=true;
+ end;
+ {$ENDIF}
+end;
+
+constructor TPSPascalCompiler.Create;
+begin
+ inherited Create;
+ FParser := TPSPascalParser.Create;
+ FParser.OnParserError := ParserError;
+ FAutoFreeList := TPSList.Create;
+ FOutput := '';
+ {$IFDEF PS_USESSUPPORT}
+ FAllowUnit := true;
+ {$ENDIF}
+ FMessages := TPSList.Create;
+end;
+
+destructor TPSPascalCompiler.Destroy;
+begin
+ Clear;
+ FAutoFreeList.Free;
+
+ FMessages.Free;
+ FParser.Free;
+ inherited Destroy;
+end;
+
+function TPSPascalCompiler.GetOutput(var s: string): Boolean;
+begin
+ if Length(FOutput) <> 0 then
+ begin
+ s := FOutput;
+ Result := True;
+ end
+ else
+ Result := False;
+end;
+
+function TPSPascalCompiler.GetMsg(l: Longint): TPSPascalCompilerMessage;
+begin
+ Result := FMessages[l];
+end;
+
+function TPSPascalCompiler.GetMsgCount: Longint;
+begin
+ Result := FMessages.Count;
+end;
+
+procedure TPSPascalCompiler.DefineStandardTypes;
+var
+ i: Longint;
+begin
+ AddType('Byte', btU8);
+ FDefaultBoolType := AddTypeS('Boolean', '(False, True)');
+ FDefaultBoolType.ExportName := True;
+ with TPSEnumType(AddType('LongBool', btEnum)) do
+ begin
+ HighValue := 2147483647; // make sure it's gonna be a 4 byte var
+ end;
+ AddType('Char', btChar);
+ {$IFNDEF PS_NOWIDESTRING}
+ AddType('WideChar', btWideChar);
+ AddType('WideString', btWideString);
+ {$ENDIF}
+ AddType('ShortInt', btS8);
+ AddType('Word', btU16);
+ AddType('SmallInt', btS16);
+ AddType('LongInt', btS32);
+ at2ut(AddType('___Pointer', btPointer));
+ AddType('LongWord', btU32);
+ AddTypeCopyN('Integer', 'LONGINT');
+ AddTypeCopyN('Cardinal', 'LONGWORD');
+ AddType('string', btString);
+ {$IFNDEF PS_NOINT64}
+ AddType('Int64', btS64);
+ {$ENDIF}
+ AddType('Single', btSingle);
+ AddType('Double', btDouble);
+ AddType('Extended', btExtended);
+ AddType('Currency', btCurrency);
+ AddType('PChar', btPChar);
+ AddType('Variant', btVariant);
+ AddType('!NotificationVariant', btNotificationVariant);
+ for i := FTypes.Count -1 downto 0 do AT2UT(FTypes[i]);
+ TPSArrayType(AddType('TVariantArray', btArray)).ArrayTypeNo := FindType('VARIANT');
+
+ with AddFunction('function Assigned(I: Longint): Boolean;') do
+ begin
+ Name := '!ASSIGNED';
+ end;
+
+ with AddFunction('procedure _T(Name: string; v: Variant);') do
+ begin
+ Name := '!NOTIFICATIONVARIANTSET';
+ end;
+ with AddFunction('function _T(Name: string): Variant;') do
+ begin
+ Name := '!NOTIFICATIONVARIANTGET';
+ end;
+end;
+
+
+function TPSPascalCompiler.FindType(const Name: string): TPSType;
+var
+ i, n: Longint;
+ RName: string;
+begin
+ if FProcs = nil then begin Result := nil; exit;end;
+ RName := Fastuppercase(Name);
+ n := makehash(rname);
+ for i := FTypes.Count - 1 downto 0 do
+ begin
+ Result := FTypes.Data[I];
+ if (Result.NameHash = n) and (Result.name = rname) then
+ begin
+ Result := GetTypeCopyLink(Result);
+ exit;
+ end;
+ end;
+ result := nil;
+end;
+
+function TPSPascalCompiler.AddConstant(const Name: string; FType: TPSType): TPSConstant;
+var
+ pc: TPSConstant;
+ val: PIfRVariant;
+begin
+ if FProcs = nil then raise EPSCompilerException.Create(RPS_OnUseEventOnly);
+
+ FType := GetTypeCopyLink(FType);
+ if FType = nil then
+ Raise EPSCompilerException.CreateFmt(RPS_UnableToRegisterConst, [name]);
+ pc := TPSConstant.Create;
+ pc.OrgName := name;
+ pc.Name := FastUppercase(name);
+ pc.DeclarePos:=InvalidVal;
+ {$IFDEF PS_USESSUPPORT}
+ pc.DeclareUnit:=fModule;
+ {$ENDIF}
+ New(Val);
+ InitializeVariant(Val, FType);
+ pc.Value := Val;
+ FConstants.Add(pc);
+ result := pc;
+end;
+
+function TPSPascalCompiler.ReadAttributes(Dest: TPSAttributes): Boolean;
+var
+ Att: TPSAttributeType;
+ at: TPSAttribute;
+ varp: PIfRVariant;
+ h, i: Longint;
+ s: string;
+begin
+ if FParser.CurrTokenID <> CSTI_OpenBlock then begin Result := true; exit; end;
+ FParser.Next;
+ if FParser.CurrTokenID <> CSTI_Identifier then
+ begin
+ MakeError('', ecIdentifierExpected, '');
+ Result := False;
+ exit;
+ end;
+ s := FParser.GetToken;
+ h := MakeHash(s);
+ att := nil;
+ for i := FAttributeTypes.count -1 downto 0 do
+ begin
+ att := FAttributeTypes[i];
+ if (att.FNameHash = h) and (att.FName = s) then
+ Break;
+ att := nil;
+ end;
+ if att = nil then
+ begin
+ MakeError('', ecUnknownIdentifier, '');
+ Result := False;
+ exit;
+ end;
+ FParser.Next;
+ i := 0;
+ at := Dest.Add(att);
+ while att.Fields[i].Hidden do
+ begin
+ at.AddValue(NewVariant(at2ut(att.Fields[i].FieldType)));
+ inc(i);
+ end;
+ if FParser.CurrTokenId <> CSTI_OpenRound then
+ begin
+ MakeError('', ecOpenRoundExpected, '');
+ Result := False;
+ exit;
+ end;
+ FParser.Next;
+ if i < Att.FieldCount then
+ begin
+ while i < att.FieldCount do
+ begin
+ varp := ReadConstant(FParser, CSTI_CloseRound);
+ if varp = nil then
+ begin
+ Result := False;
+ exit;
+ end;
+ at.AddValue(varp);
+ if not IsCompatibleType(varp.FType, Att.Fields[i].FieldType, False) then
+ begin
+ MakeError('', ecTypeMismatch, '');
+ Result := False;
+ exit;
+ end;
+ Inc(i);
+ while (i < Att.FieldCount) and (att.Fields[i].Hidden) do
+ begin
+ at.AddValue(NewVariant(at2ut(att.Fields[i].FieldType)));
+ inc(i);
+ end;
+ if i >= Att.FieldCount then
+ begin
+ break;
+ end else
+ begin
+ if FParser.CurrTokenID <> CSTI_Comma then
+ begin
+ MakeError('', ecCommaExpected, '');
+ Result := False;
+ exit;
+ end;
+ end;
+ FParser.Next;
+ end;
+ end;
+ if FParser.CurrTokenID <> CSTI_CloseRound then
+ begin
+ MakeError('', ecCloseRoundExpected, '');
+ Result := False;
+ exit;
+ end;
+ FParser.Next;
+ if FParser.CurrTokenID <> CSTI_CloseBlock then
+ begin
+ MakeError('', ecCloseBlockExpected, '');
+ Result := False;
+ exit;
+ end;
+ FParser.Next;
+ Result := True;
+end;
+
+type
+ TConstOperation = class(TObject)
+ private
+ FDeclPosition, FDeclRow, FDeclCol: Cardinal;
+ public
+ property DeclPosition: Cardinal read FDeclPosition write FDeclPosition;
+ property DeclRow: Cardinal read FDeclRow write FDeclRow;
+ property DeclCol: Cardinal read FDeclCol write FDeclCol;
+ procedure SetPos(Parser: TPSPascalParser);
+ end;
+
+ TUnConstOperation = class(TConstOperation)
+ private
+ FOpType: TPSUnOperatorType;
+ FVal1: TConstOperation;
+ public
+ property OpType: TPSUnOperatorType read FOpType write FOpType;
+ property Val1: TConstOperation read FVal1 write FVal1;
+
+ destructor Destroy; override;
+ end;
+
+ TBinConstOperation = class(TConstOperation)
+ private
+ FOpType: TPSBinOperatorType;
+ FVal2: TConstOperation;
+ FVal1: TConstOperation;
+ public
+ property OpType: TPSBinOperatorType read FOpType write FOpType;
+ property Val1: TConstOperation read FVal1 write FVal1;
+ property Val2: TConstOperation read FVal2 write FVal2;
+
+ destructor Destroy; override;
+ end;
+
+ TConstData = class(TConstOperation)
+ private
+ FData: PIfRVariant;
+ public
+ property Data: PIfRVariant read FData write FData;
+ destructor Destroy; override;
+ end;
+
+
+function TPSPascalCompiler.IsBoolean(aType: TPSType): Boolean;
+begin
+ Result := (AType = FDefaultBoolType)
+ or (AType.Name = 'LONGBOOL');
+end;
+
+
+function TPSPascalCompiler.ReadConstant(FParser: TPSPascalParser; StopOn: TPSPasToken): PIfRVariant;
+
+ function ReadExpression: TConstOperation; forward;
+ function ReadTerm: TConstOperation; forward;
+ function ReadFactor: TConstOperation;
+ var
+ NewVar: TConstOperation;
+ NewVarU: TUnConstOperation;
+ function GetConstantIdentifier: PIfRVariant;
+ var
+ s: string;
+ sh: Longint;
+ i: Longint;
+ p: TPSConstant;
+ begin
+ s := FParser.GetToken;
+ sh := MakeHash(s);
+ for i := FConstants.Count -1 downto 0 do
+ begin
+ p := FConstants[I];
+ if (p.NameHash = sh) and (p.Name = s) then
+ begin
+ New(Result);
+ InitializeVariant(Result, p.Value.FType);
+ CopyVariantContents(P.Value, Result);
+ FParser.Next;
+ exit;
+ end;
+ end;
+ MakeError('', ecUnknownIdentifier, '');
+ Result := nil;
+ end;
+ begin
+ case fParser.CurrTokenID of
+ CSTII_Not:
+ begin
+ FParser.Next;
+ NewVar := ReadFactor;
+ if NewVar = nil then
+ begin
+ Result := nil;
+ exit;
+ end;
+ NewVarU := TUnConstOperation.Create;
+ NewVarU.OpType := otNot;
+ NewVarU.Val1 := NewVar;
+ NewVar := NewVarU;
+ end;
+ CSTI_Minus:
+ begin
+ FParser.Next;
+ NewVar := ReadTerm;
+ if NewVar = nil then
+ begin
+ Result := nil;
+ exit;
+ end;
+ NewVarU := TUnConstOperation.Create;
+ NewVarU.OpType := otMinus;
+ NewVarU.Val1 := NewVar;
+ NewVar := NewVarU;
+ end;
+ CSTI_OpenRound:
+ begin
+ FParser.Next;
+ NewVar := ReadExpression;
+ if NewVar = nil then
+ begin
+ Result := nil;
+ exit;
+ end;
+ if FParser.CurrTokenId <> CSTI_CloseRound then
+ begin
+ NewVar.Free;
+ Result := nil;
+ MakeError('', ecCloseRoundExpected, '');
+ exit;
+ end;
+ FParser.Next;
+ end;
+ CSTI_Char, CSTI_String:
+ begin
+ NewVar := TConstData.Create;
+ NewVar.SetPos(FParser);
+ TConstData(NewVar).Data := ReadString;
+ end;
+ CSTI_HexInt, CSTI_Integer:
+ begin
+ NewVar := TConstData.Create;
+ NewVar.SetPos(FParser);
+ TConstData(NewVar).Data := ReadInteger(FParser.GetToken);
+ FParser.Next;
+ end;
+ CSTI_Real:
+ begin
+ NewVar := TConstData.Create;
+ NewVar.SetPos(FParser);
+ TConstData(NewVar).Data := ReadReal(FParser.GetToken);
+ FParser.Next;
+ end;
+ CSTI_Identifier:
+ begin
+ NewVar := TConstData.Create;
+ NewVar.SetPos(FParser);
+ TConstData(NewVar).Data := GetConstantIdentifier;
+ if TConstData(NewVar).Data = nil then
+ begin
+ NewVar.Free;
+ Result := nil;
+ exit;
+ end
+ end;
+ else
+ begin
+ MakeError('', ecSyntaxError, '');
+ Result := nil;
+ exit;
+ end;
+ end; {case}
+ Result := NewVar;
+ end; // ReadFactor
+
+ function ReadTerm: TConstOperation;
+ var
+ F1, F2: TConstOperation;
+ F: TBinConstOperation;
+ Token: TPSPasToken;
+ Op: TPSBinOperatorType;
+ begin
+ F1 := ReadFactor;
+ if F1 = nil then
+ begin
+ Result := nil;
+ exit;
+ end;
+ while FParser.CurrTokenID in [CSTI_Multiply, CSTI_Divide, CSTII_Div, CSTII_Mod, CSTII_And, CSTII_Shl, CSTII_Shr] do
+ begin
+ Token := FParser.CurrTokenID;
+ FParser.Next;
+ F2 := ReadFactor;
+ if f2 = nil then
+ begin
+ f1.Free;
+ Result := nil;
+ exit;
+ end;
+ case Token of
+ CSTI_Multiply: Op := otMul;
+ CSTII_div, CSTI_Divide: Op := otDiv;
+ CSTII_mod: Op := otMod;
+ CSTII_and: Op := otAnd;
+ CSTII_shl: Op := otShl;
+ CSTII_shr: Op := otShr;
+ else
+ Op := otAdd;
+ end;
+ F := TBinConstOperation.Create;
+ f.Val1 := F1;
+ f.Val2 := F2;
+ f.OpType := Op;
+ f1 := f;
+ end;
+ Result := F1;
+ end; // ReadTerm
+
+ function ReadSimpleExpression: TConstOperation;
+ var
+ F1, F2: TConstOperation;
+ F: TBinConstOperation;
+ Token: TPSPasToken;
+ Op: TPSBinOperatorType;
+ begin
+ F1 := ReadTerm;
+ if F1 = nil then
+ begin
+ Result := nil;
+ exit;
+ end;
+ while FParser.CurrTokenID in [CSTI_Plus, CSTI_Minus, CSTII_Or, CSTII_Xor] do
+ begin
+ Token := FParser.CurrTokenID;
+ FParser.Next;
+ F2 := ReadTerm;
+ if f2 = nil then
+ begin
+ f1.Free;
+ Result := nil;
+ exit;
+ end;
+ case Token of
+ CSTI_Plus: Op := otAdd;
+ CSTI_Minus: Op := otSub;
+ CSTII_or: Op := otOr;
+ CSTII_xor: Op := otXor;
+ else
+ Op := otAdd;
+ end;
+ F := TBinConstOperation.Create;
+ f.Val1 := F1;
+ f.Val2 := F2;
+ f.OpType := Op;
+ f1 := f;
+ end;
+ Result := F1;
+ end; // ReadSimpleExpression
+
+
+ function ReadExpression: TConstOperation;
+ var
+ F1, F2: TConstOperation;
+ F: TBinConstOperation;
+ Token: TPSPasToken;
+ Op: TPSBinOperatorType;
+ begin
+ F1 := ReadSimpleExpression;
+ if F1 = nil then
+ begin
+ Result := nil;
+ exit;
+ end;
+ while FParser.CurrTokenID in [ CSTI_GreaterEqual, CSTI_LessEqual, CSTI_Greater, CSTI_Less, CSTI_Equal, CSTI_NotEqual] do
+ begin
+ Token := FParser.CurrTokenID;
+ FParser.Next;
+ F2 := ReadSimpleExpression;
+ if f2 = nil then
+ begin
+ f1.Free;
+ Result := nil;
+ exit;
+ end;
+ case Token of
+ CSTI_GreaterEqual: Op := otGreaterEqual;
+ CSTI_LessEqual: Op := otLessEqual;
+ CSTI_Greater: Op := otGreater;
+ CSTI_Less: Op := otLess;
+ CSTI_Equal: Op := otEqual;
+ CSTI_NotEqual: Op := otNotEqual;
+ else
+ Op := otAdd;
+ end;
+ F := TBinConstOperation.Create;
+ f.Val1 := F1;
+ f.Val2 := F2;
+ f.OpType := Op;
+ f1 := f;
+ end;
+ Result := F1;
+ end; // ReadExpression
+
+
+ function EvalConst(P: TConstOperation): PIfRVariant;
+ var
+ p1, p2: PIfRVariant;
+ begin
+ if p is TBinConstOperation then
+ begin
+ p1 := EvalConst(TBinConstOperation(p).Val1);
+ if p1 = nil then begin Result := nil; exit; end;
+ p2 := EvalConst(TBinConstOperation(p).Val2);
+ if p2 = nil then begin DisposeVariant(p1); Result := nil; exit; end;
+ if not PreCalc(False, 0, p1, 0, p2, TBinConstOperation(p).OpType, p.DeclPosition, p.DeclRow, p.DeclCol) then
+ begin
+ DisposeVariant(p1);
+ DisposeVariant(p2);
+// MakeError('', ecTypeMismatch, '');
+ result := nil;
+ exit;
+ end;
+ DisposeVariant(p2);
+ Result := p1;
+ end else if p is TUnConstOperation then
+ begin
+ with TUnConstOperation(P) do
+ begin
+ p1 := EvalConst(Val1);
+ case OpType of
+ otNot:
+ case p1.FType.BaseType of
+ btU8: p1.tu8 := not p1.tu8;
+ btU16: p1.tu16 := not p1.tu16;
+ btU32: p1.tu32 := not p1.tu32;
+ bts8: p1.ts8 := not p1.ts8;
+ bts16: p1.ts16 := not p1.ts16;
+ bts32: p1.ts32 := not p1.ts32;
+ {$IFNDEF PS_NOINT64}
+ bts64: p1.ts64 := not p1.ts64;
+ {$ENDIF}
+ else
+ begin
+ MakeError('', ecTypeMismatch, '');
+ DisposeVariant(p1);
+ Result := nil;
+ exit;
+ end;
+ end;
+ otMinus:
+ case p1.FType.BaseType of
+ btU8: p1.tu8 := -p1.tu8;
+ btU16: p1.tu16 := -p1.tu16;
+ btU32: p1.tu32 := -p1.tu32;
+ bts8: p1.ts8 := -p1.ts8;
+ bts16: p1.ts16 := -p1.ts16;
+ bts32: p1.ts32 := -p1.ts32;
+ {$IFNDEF PS_NOINT64}
+ bts64: p1.ts64 := -p1.ts64;
+ {$ENDIF}
+ btDouble: p1.tdouble := - p1.tDouble;
+ btSingle: p1.tsingle := - p1.tsingle;
+ btCurrency: p1.tcurrency := - p1.tcurrency;
+ btExtended: p1.textended := - p1.textended;
+ else
+ begin
+ MakeError('', ecTypeMismatch, '');
+ DisposeVariant(p1);
+ Result := nil;
+ exit;
+ end;
+ end;
+ else
+ begin
+ DisposeVariant(p1);
+ Result := nil;
+ exit;
+ end;
+ end;
+ end;
+ Result := p1;
+ end else
+ begin
+ if ((p as TConstData).Data.FType.BaseType = btString)
+ and (length(tbtstring((p as TConstData).Data.tstring)) =1) then
+ begin
+ New(p1);
+ InitializeVariant(p1, FindBaseType(btChar));
+ p1.tchar := tbtstring((p as TConstData).Data.tstring)[1];
+ Result := p1;
+ end else begin
+ New(p1);
+ InitializeVariant(p1, (p as TConstData).Data.FType);
+ CopyVariantContents((p as TConstData).Data, p1);
+ Result := p1;
+ end;
+ end;
+ end;
+
+var
+ Val: TConstOperation;
+begin
+ Val := ReadExpression;
+ if val = nil then
+ begin
+ Result := nil;
+ exit;
+ end;
+ Result := EvalConst(Val);
+ Val.Free;
+end;
+
+procedure TPSPascalCompiler.WriteDebugData(const s: string);
+begin
+ FDebugOutput := FDebugOutput + s;
+end;
+
+function TPSPascalCompiler.GetDebugOutput(var s: string): Boolean;
+begin
+ if Length(FDebugOutput) <> 0 then
+ begin
+ s := FDebugOutput;
+ Result := True;
+ end
+ else
+ Result := False;
+end;
+
+function TPSPascalCompiler.AddUsedFunction(var Proc: TPSInternalProcedure): Cardinal;
+begin
+ if FProcs = nil then raise EPSCompilerException.Create(RPS_OnUseEventOnly);
+ Proc := TPSInternalProcedure.Create;
+ FProcs.Add(Proc);
+ Result := FProcs.Count - 1;
+end;
+
+{$IFNDEF PS_NOINTERFACES}
+const
+ IUnknown_Guid: TGuid = (D1: 0; d2: 0; d3: 0; d4: ($c0,00,00,00,00,00,00,$46));
+ IDispatch_Guid: Tguid = (D1: $20400; D2: $0; D3: $0; D4:($C0, $0, $0, $0, $0, $0, $0, $46));
+{$ENDIF}
+
+procedure TPSPascalCompiler.DefineStandardProcedures;
+var
+ p: TPSRegProc;
+begin
+ {$IFNDEF PS_NOINT64}
+ AddFunction('function IntToStr(i: Int64): String;');
+ {$ELSE}
+ AddFunction('function IntTostr(i: Integer): String;');
+ {$ENDIF}
+ AddFunction('function StrToInt(s: string): Longint;');
+ AddFunction('function StrToIntDef(s: String; def: Longint): Longint;');
+ AddFunction('function Copy(s: string; iFrom, iCount: Longint): string;');
+ AddFunction('function Pos(SubStr, S: String): Longint;');
+ AddFunction('procedure Delete(var s: string; ifrom, icount: Longint);');
+ AddFunction('procedure Insert(s: string; var s2: string; iPos: Longint);');
+ p := AddFunction('function GetArrayLength: integer;');
+ with P.Decl.AddParam do
+ begin
+ OrgName := 'arr';
+ Mode := pmInOut;
+ end;
+ p := AddFunction('procedure SetArrayLength;');
+ with P.Decl.AddParam do
+ begin
+ OrgName := 'arr';
+ Mode := pmInOut;
+ end;
+ with P.Decl.AddParam do
+ begin
+ OrgName := 'count';
+ aType := FindBaseType(btS32);
+ end;
+ AddFunction('Function StrGet(var S : String; I : Integer) : Char;');
+ AddFunction('procedure StrSet(c : Char; I : Integer; var s : String);');
+ {$IFNDEF PS_NOWIDESTRING}
+ AddFunction('Function WStrGet(var S : WideString; I : Integer) : WideChar;');
+ AddFunction('procedure WStrSet(c : WideChar; I : Integer; var s : WideString);');
+ {$ENDIF}
+ AddFunction('Function StrGet2(S : String; I : Integer) : Char;');
+ AddFunction('Function AnsiUppercase(s : string) : string;');
+ AddFunction('Function AnsiLowercase(s : string) : string;');
+ AddFunction('Function Uppercase(s : string) : string;');
+ AddFunction('Function Lowercase(s : string) : string;');
+ AddFunction('Function Trim(s : string) : string;');
+ AddFunction('function Length: Integer;').Decl.AddParam.OrgName:='s';
+ with AddFunction('procedure SetLength;').Decl do
+ begin
+ with AddParam do
+ begin
+ OrgName:='s';
+ Mode:=pmInOut;
+ end;
+ with AddParam do
+ begin
+ OrgName:='NewLength';
+ aType:=FindBaseType(btS32); //Integer
+ end;
+ end;
+ {$IFNDEF PS_NOINT64}
+ AddFunction('function Low: Int64;').Decl.AddParam.OrgName:='x';
+ AddFunction('function High: Int64;').Decl.AddParam.OrgName:='x';
+ {$ELSE}
+ AddFunction('function Low: Integer;').Decl.AddParam.OrgName:='x';
+ AddFunction('function High: Integer;').Decl.AddParam.OrgName:='x';
+ {$ENDIF}
+ with AddFunction('procedure Dec;').Decl do begin
+ with AddParam do
+ begin
+ OrgName:='x';
+ Mode:=pmInOut;
+ end;
+ end;
+ with AddFunction('procedure Inc;').Decl do begin
+ with AddParam do
+ begin
+ OrgName:='x';
+ Mode:=pmInOut;
+ end;
+ end;
+ AddFunction('Function Sin(e : Extended) : Extended;');
+ AddFunction('Function Cos(e : Extended) : Extended;');
+ AddFunction('Function Sqrt(e : Extended) : Extended;');
+ AddFunction('Function Round(e : Extended) : Longint;');
+ AddFunction('Function Trunc(e : Extended) : Longint;');
+ AddFunction('Function Int(e : Extended) : Extended;');
+ AddFunction('Function Pi : Extended;');
+ AddFunction('Function Abs(e : Extended) : Extended;');
+ AddFunction('function StrToFloat(s: string): Extended;');
+ AddFunction('Function FloatToStr(e : Extended) : String;');
+ AddFunction('Function Padl(s : string;I : longInt) : string;');
+ AddFunction('Function Padr(s : string;I : longInt) : string;');
+ AddFunction('Function Padz(s : string;I : longInt) : string;');
+ AddFunction('Function Replicate(c : char;I : longInt) : string;');
+ AddFunction('Function StringOfChar(c : char;I : longInt) : string;');
+ AddTypeS('TVarType', 'Word');
+ AddConstantN('varEmpty', 'Word').Value.tu16 := varempty;
+ AddConstantN('varNull', 'Word').Value.tu16 := varnull;
+ AddConstantN('varSmallInt', 'Word').Value.tu16 := varsmallint;
+ AddConstantN('varInteger', 'Word').Value.tu16 := varinteger;
+ AddConstantN('varSingle', 'Word').Value.tu16 := varsingle;
+ AddConstantN('varDouble', 'Word').Value.tu16 := vardouble;
+ AddConstantN('varCurrency', 'Word').Value.tu16 := varcurrency;
+ AddConstantN('varDate', 'Word').Value.tu16 := vardate;
+ AddConstantN('varOleStr', 'Word').Value.tu16 := varolestr;
+ AddConstantN('varDispatch', 'Word').Value.tu16 := vardispatch;
+ AddConstantN('varError', 'Word').Value.tu16 := varerror;
+ AddConstantN('varBoolean', 'Word').Value.tu16 := varboolean;
+ AddConstantN('varVariant', 'Word').Value.tu16 := varvariant;
+ AddConstantN('varUnknown', 'Word').Value.tu16 := varunknown;
+{$IFDEF DELPHI6UP}
+ AddConstantN('varShortInt', 'Word').Value.tu16 := varshortint;
+ AddConstantN('varByte', 'Word').Value.tu16 := varbyte;
+ AddConstantN('varWord', 'Word').Value.tu16 := varword;
+ AddConstantN('varLongWord', 'Word').Value.tu16 := varlongword;
+ AddConstantN('varInt64', 'Word').Value.tu16 := varint64;
+{$ENDIF}
+{$IFDEF DELPHI5UP}
+ AddConstantN('varStrArg', 'Word').Value.tu16 := varstrarg;
+ AddConstantN('varAny', 'Word').Value.tu16 := varany;
+{$ENDIF}
+ AddConstantN('varString', 'Word').Value.tu16 := varstring;
+ AddConstantN('varTypeMask', 'Word').Value.tu16 := vartypemask;
+ AddConstantN('varArray', 'Word').Value.tu16 := vararray;
+ AddConstantN('varByRef', 'Word').Value.tu16 := varByRef;
+ AddDelphiFunction('function Unassigned: Variant;');
+ AddDelphiFunction('function VarIsEmpty(const V: Variant): Boolean;');
+ AddDelphiFunction('function Null: Variant;');
+ AddDelphiFunction('function VarIsNull(const V: Variant): Boolean;');
+ AddDelphiFunction('function VarType(const V: Variant): TVarType;');
+ addTypeS('TIFException', '(ErNoError, erCannotImport, erInvalidType, ErInternalError, '+
+ 'erInvalidHeader, erInvalidOpcode, erInvalidOpcodeParameter, erNoMainProc, erOutOfGlobalVarsRange, '+
+ 'erOutOfProcRange, ErOutOfRange, erOutOfStackRange, ErTypeMismatch, erUnexpectedEof, '+
+ 'erVersionError, ErDivideByZero, ErMathError,erCouldNotCallProc, erOutofRecordRange, '+
+ 'erOutOfMemory, erException, erNullPointerException, erNullVariantError, erInterfaceNotSupported, erCustomError)');
+ AddFunction('procedure RaiseLastException;');
+ AddFunction('procedure RaiseException(Ex: TIFException; Param: string);');
+ AddFunction('function ExceptionType: TIFException;');
+ AddFunction('function ExceptionParam: string;');
+ AddFunction('function ExceptionProc: Cardinal;');
+ AddFunction('function ExceptionPos: Cardinal;');
+ AddFunction('function ExceptionToString(er: TIFException; Param: string): string;');
+ {$IFNDEF PS_NOINT64}
+ AddFunction('function StrToInt64(s: string): int64;');
+ AddFunction('function Int64ToStr(i: Int64): string;');
+ {$ENDIF}
+
+ with AddFunction('function SizeOf: Longint;').Decl.AddParam do
+ begin
+ OrgName := 'Data';
+ end;
+{$IFNDEF PS_NOINTERFACES}
+ with AddInterface(nil, IUnknown_Guid, 'IUnknown') do
+ begin
+ RegisterDummyMethod; // Query Interface
+ RegisterDummyMethod; // _AddRef
+ RegisterDummyMethod; // _Release
+ end;
+ with AddInterface(nil, IUnknown_Guid, 'IInterface') do
+ begin
+ RegisterDummyMethod; // Query Interface
+ RegisterDummyMethod; // _AddRef
+ RegisterDummyMethod; // _Release
+ end;
+
+ {$IFNDEF PS_NOIDISPATCH}
+ with AddInterface(FindInterface('IUnknown'), IDispatch_Guid, 'IDispatch') do
+ begin
+ RegisterDummyMethod; // GetTypeCount
+ RegisterDummyMethod; // GetTypeInfo
+ RegisterDummyMethod; // GetIdsOfName
+ RegisterDummyMethod; // Invoke
+ end;
+ with TPSInterfaceType(FindType('IDispatch')) do
+ begin
+ ExportName := True;
+ end;
+ AddDelphiFunction('function IDispatchInvoke(Self: IDispatch; PropertySet: Boolean; const Name: String; Par: array of variant): variant;');
+ {$ENDIF}
+{$ENDIF}
+end;
+
+function TPSPascalCompiler.GetTypeCount: Longint;
+begin
+ if FProcs = nil then raise EPSCompilerException.Create(RPS_OnUseEventOnly);
+ Result := FTypes.Count;
+end;
+
+function TPSPascalCompiler.GetType(I: Longint): TPSType;
+begin
+ if FProcs = nil then raise EPSCompilerException.Create(RPS_OnUseEventOnly);
+ Result := FTypes[I];
+end;
+
+function TPSPascalCompiler.GetVarCount: Longint;
+begin
+ if FProcs = nil then raise EPSCompilerException.Create(RPS_OnUseEventOnly);
+ Result := FVars.Count;
+end;
+
+function TPSPascalCompiler.GetVar(I: Longint): TPSVar;
+begin
+ if FProcs = nil then raise EPSCompilerException.Create(RPS_OnUseEventOnly);
+ Result := FVars[i];
+end;
+
+function TPSPascalCompiler.GetProcCount: Longint;
+begin
+ if FProcs = nil then raise EPSCompilerException.Create(RPS_OnUseEventOnly);
+ Result := FProcs.Count;
+end;
+
+function TPSPascalCompiler.GetProc(I: Longint): TPSProcedure;
+begin
+ if FProcs = nil then raise EPSCompilerException.Create(RPS_OnUseEventOnly);
+ Result := FProcs[i];
+end;
+
+
+
+
+function TPSPascalCompiler.AddUsedFunction2(var Proc: TPSExternalProcedure): Cardinal;
+begin
+ if FProcs = nil then raise EPSCompilerException.Create(RPS_OnUseEventOnly);
+ Proc := TPSExternalProcedure.Create;
+ FProcs.Add(Proc);
+ Result := FProcs.Count -1;
+end;
+
+function TPSPascalCompiler.AddVariable(const Name: string; FType: TPSType): TPSVar;
+var
+ P: TPSVar;
+begin
+ if FProcs = nil then raise EPSCompilerException.Create(RPS_OnUseEventOnly);
+ if FType = nil then raise EPSCompilerException.CreateFmt(RPS_InvalidTypeForVar, [Name]);
+ p := TPSVar.Create;
+ p.OrgName := Name;
+ p.Name := Fastuppercase(Name);
+ p.FType := AT2UT(FType);
+ p.exportname := p.Name;
+ FVars.Add(p);
+ Result := P;
+end;
+
+function TPSPascalCompiler.AddAttributeType: TPSAttributeType;
+begin
+ if FAttributeTypes = nil then Raise Exception.Create(RPS_OnUseEventOnly);
+ Result := TPSAttributeType.Create;
+ FAttributeTypes.Add(Result);
+end;
+
+function TPSPascalCompiler.FindAttributeType(const Name: string): TPSAttributeType;
+var
+ h, i: Integer;
+ n: string;
+begin
+ if FAttributeTypes = nil then Raise Exception.Create(RPS_OnUseEventOnly);
+ n := FastUpperCase(Name);
+ h := MakeHash(n);
+ for i := FAttributeTypes.Count -1 downto 0 do
+ begin
+ result := TPSAttributeType(FAttributeTypes[i]);
+ if (Result.NameHash = h) and (Result.Name = n) then
+ exit;
+ end;
+ result := nil;
+end;
+function TPSPascalCompiler.GetConstCount: Longint;
+begin
+ if FProcs = nil then raise EPSCompilerException.Create(RPS_OnUseEventOnly);
+ result := FConstants.Count;
+end;
+
+function TPSPascalCompiler.GetConst(I: Longint): TPSConstant;
+begin
+ if FProcs = nil then raise EPSCompilerException.Create(RPS_OnUseEventOnly);
+ Result := TPSConstant(FConstants[i]);
+end;
+
+function TPSPascalCompiler.GetRegProcCount: Longint;
+begin
+ if FProcs = nil then raise EPSCompilerException.Create(RPS_OnUseEventOnly);
+ Result := FRegProcs.Count;
+end;
+
+function TPSPascalCompiler.GetRegProc(I: Longint): TPSRegProc;
+begin
+ if FProcs = nil then raise EPSCompilerException.Create(RPS_OnUseEventOnly);
+ Result := TPSRegProc(FRegProcs[i]);
+end;
+
+
+procedure TPSPascalCompiler.AddToFreeList(Obj: TObject);
+begin
+ FAutoFreeList.Add(Obj);
+end;
+
+function TPSPascalCompiler.AddConstantN(const Name,
+ FType: string): TPSConstant;
+begin
+ Result := AddConstant(Name, FindType(FType));
+end;
+
+function TPSPascalCompiler.AddTypeCopy(const Name: string;
+ TypeNo: TPSType): TPSType;
+begin
+ if FProcs = nil then raise EPSCompilerException.Create(RPS_OnUseEventOnly);
+ TypeNo := GetTypeCopyLink(TypeNo);
+ if Typeno = nil then raise EPSCompilerException.Create(RPS_InvalidType);
+ Result := AddType(Name, BtTypeCopy);
+ TPSTypeLink(Result).LinkTypeNo := TypeNo;
+end;
+
+function TPSPascalCompiler.AddTypeCopyN(const Name,
+ FType: string): TPSType;
+begin
+ Result := AddTypeCopy(Name, FindType(FType));
+end;
+
+
+function TPSPascalCompiler.AddUsedVariable(const Name: string;
+ FType: TPSType): TPSVar;
+begin
+ Result := AddVariable(Name, FType);
+ if Result <> nil then
+ Result.Use;
+end;
+
+function TPSPascalCompiler.AddUsedVariableN(const Name,
+ FType: string): TPSVar;
+begin
+ Result := AddVariable(Name, FindType(FType));
+ if Result <> nil then
+ Result.Use;
+end;
+
+function TPSPascalCompiler.AddVariableN(const Name,
+ FType: string): TPSVar;
+begin
+ Result := AddVariable(Name, FindType(FType));
+end;
+
+function TPSPascalCompiler.AddUsedPtrVariable(const Name: string; FType: TPSType): TPSVar;
+begin
+ Result := AddVariable(Name, FType);
+ if Result <> nil then
+ begin
+ result.SaveAsPointer := True;
+ Result.Use;
+ end;
+end;
+
+function TPSPascalCompiler.AddUsedPtrVariableN(const Name, FType: string): TPSVar;
+begin
+ Result := AddVariable(Name, FindType(FType));
+ if Result <> nil then
+ begin
+ result.SaveAsPointer := True;
+ Result.Use;
+ end;
+end;
+
+function TPSPascalCompiler.AddTypeS(const Name, Decl: string): TPSType;
+var
+ Parser: TPSPascalParser;
+begin
+ if FProcs = nil then raise EPSCompilerException.Create(RPS_OnUseEventOnly);
+ Parser := TPSPascalParser.Create;
+ Parser.SetText(Decl);
+ Result := ReadType(Name, Parser);
+ if Result<>nil then
+ begin
+ Result.DeclarePos:=InvalidVal;
+ {$IFDEF PS_USESSUPPORT}
+ Result.DeclareUnit:=fModule;
+ {$ENDIF}
+ Result.DeclareRow:=0;
+ Result.DeclareCol:=0;
+ end;
+ Parser.Free;
+ if result = nil then Raise EPSCompilerException.CreateFmt(RPS_UnableToRegisterType, [name]);
+end;
+
+
+function TPSPascalCompiler.CheckCompatProc(P: TPSType; ProcNo: Cardinal): Boolean;
+var
+ i: Longint;
+ s1, s2: TPSParametersDecl;
+begin
+ if p.BaseType <> btProcPtr then begin
+ Result := False;
+ Exit;
+ end;
+
+ S1 := TPSProceduralType(p).ProcDef;
+
+ if TPSProcedure(FProcs[ProcNo]).ClassType = TPSInternalProcedure then
+ s2 := TPSInternalProcedure(FProcs[ProcNo]).Decl
+ else
+ s2 := TPSExternalProcedure(FProcs[ProcNo]).RegProc.Decl;
+ if (s1.Result <> s2.Result) or (s1.ParamCount <> s2.ParamCount) then
+ begin
+ Result := False;
+ Exit;
+ end;
+ for i := 0 to s1.ParamCount -1 do
+ begin
+ if (s1.Params[i].Mode <> s2.Params[i].Mode) or (s1.Params[i].aType <> s2.Params[i].aType) then
+ begin
+ Result := False;
+ Exit;
+ end;
+ end;
+ Result := True;
+end;
+
+function TPSPascalCompiler.MakeExportDecl(decl: TPSParametersDecl): string;
+var
+ i: Longint;
+begin
+ if Decl.Result = nil then result := '-1' else
+ result := IntToStr(Decl.Result.FinalTypeNo);
+
+ for i := 0 to decl.ParamCount -1 do
+ begin
+ if decl.GetParam(i).Mode = pmIn then
+ Result := Result + ' @'
+ else
+ Result := Result + ' !';
+ Result := Result + inttostr(decl.GetParam(i).aType.FinalTypeNo);
+ end;
+end;
+
+
+function TPSPascalCompiler.IsIntBoolType(aType: TPSType): Boolean;
+begin
+ if Isboolean(aType) then begin Result := True; exit;end;
+
+ case aType.BaseType of
+ btU8, btS8, btU16, btS16, btU32, btS32{$IFNDEF PS_NOINT64}, btS64{$ENDIF}: Result := True;
+ else
+ Result := False;
+ end;
+end;
+
+
+procedure TPSPascalCompiler.ParserError(Parser: TObject;
+ Kind: TPSParserErrorKind);
+begin
+ FParserHadError := True;
+ case Kind of
+ ICOMMENTERROR: MakeError('', ecCommentError, '');
+ ISTRINGERROR: MakeError('', ecStringError, '');
+ ICHARERROR: MakeError('', ecCharError, '');
+ else
+ MakeError('', ecSyntaxError, '');
+ end;
+end;
+
+
+function TPSPascalCompiler.AddDelphiFunction(const Decl: string): TPSRegProc;
+var
+ p: TPSRegProc;
+ pDecl: TPSParametersDecl;
+ DOrgName: string;
+ FT: TPMFuncType;
+ i: Longint;
+
+begin
+ pDecl := TPSParametersDecl.Create;
+ p := nil;
+ try
+ if not ParseMethod(Self, '', Decl, DOrgName, pDecl, FT) then
+ Raise EPSCompilerException.CreateFmt(RPS_UnableToRegisterFunction, [Decl]);
+
+ p := TPSRegProc.Create;
+ P.Name := FastUppercase(DOrgName);
+ p.OrgName := DOrgName;
+ p.ExportName := True;
+ p.Decl.Assign(pDecl);
+
+ FRegProcs.Add(p);
+
+ if pDecl.Result = nil then
+ begin
+ p.ImportDecl := p.ImportDecl + #0;
+ end else
+ p.ImportDecl := p.ImportDecl + #1;
+ for i := 0 to pDecl.ParamCount -1 do
+ begin
+ if pDecl.Params[i].Mode <> pmIn then
+ p.ImportDecl := p.ImportDecl + #1
+ else
+ p.ImportDecl := p.ImportDecl + #0;
+ end;
+ finally
+ pDecl.Free;
+ end;
+ Result := p;
+end;
+
+{$IFNDEF PS_NOINTERFACES}
+function TPSPascalCompiler.AddInterface(InheritedFrom: TPSInterface; Guid: TGuid; const Name: string): TPSInterface;
+var
+ f: TPSType;
+begin
+ if FProcs = nil then raise EPSCompilerException.Create(RPS_OnUseEventOnly);
+ f := FindType(Name);
+ if (f <> nil) and (f is TPSInterfaceType) then
+ begin
+ result := TPSInterfaceType(f).Intf;
+ Result.Guid := Guid;
+ Result.InheritedFrom := InheritedFrom;
+ exit;
+ end;
+ f := AddType(Name, btInterface);
+ Result := TPSInterface.Create(Self, InheritedFrom, GUID, FastUppercase(Name), f);
+ FInterfaces.Add(Result);
+ TPSInterfaceType(f).Intf := Result;
+end;
+
+function TPSPascalCompiler.FindInterface(const Name: string): TPSInterface;
+var
+ n: string;
+ i, nh: Longint;
+begin
+ if FProcs = nil then raise EPSCompilerException.Create(RPS_OnUseEventOnly);
+ n := FastUpperCase(Name);
+ nh := MakeHash(n);
+ for i := FInterfaces.Count -1 downto 0 do
+ begin
+ Result := FInterfaces[i];
+ if (Result.NameHash = nh) and (Result.Name = N) then
+ exit;
+ end;
+ raise EPSCompilerException.CreateFmt(RPS_UnknownInterface, [Name]);
+end;
+{$ENDIF}
+function TPSPascalCompiler.AddClass(InheritsFrom: TPSCompileTimeClass; aClass: TClass): TPSCompileTimeClass;
+var
+ f: TPSType;
+begin
+ if FProcs = nil then raise EPSCompilerException.Create(RPS_OnUseEventOnly);
+ Result := FindClass(aClass.ClassName);
+ if Result <> nil then exit;
+ f := AddType(aClass.ClassName, btClass);
+ Result := TPSCompileTimeClass.CreateC(aClass, Self, f);
+ Result.FInheritsFrom := InheritsFrom;
+ FClasses.Add(Result);
+ TPSClassType(f).Cl := Result;
+ f.ExportName := True;
+end;
+
+function TPSPascalCompiler.AddClassN(InheritsFrom: TPSCompileTimeClass; const aClass: string): TPSCompileTimeClass;
+var
+ f: TPSType;
+begin
+ if FProcs = nil then raise EPSCompilerException.Create(RPS_OnUseEventOnly);
+ Result := FindClass(aClass);
+ if Result <> nil then
+ begin
+ if InheritsFrom <> nil then
+ Result.FInheritsFrom := InheritsFrom;
+ exit;
+ end;
+ f := AddType(aClass, btClass);
+ Result := TPSCompileTimeClass.Create(FastUppercase(aClass), Self, f);
+ TPSClassType(f).Cl := Result;
+ Result.FInheritsFrom := InheritsFrom;
+ FClasses.Add(Result);
+ TPSClassType(f).Cl := Result;
+ f.ExportName := True;
+end;
+
+function TPSPascalCompiler.FindClass(const aClass: string): TPSCompileTimeClass;
+var
+ i: Longint;
+ Cl: string;
+ H: Longint;
+ x: TPSCompileTimeClass;
+begin
+ cl := FastUpperCase(aClass);
+ H := MakeHash(Cl);
+ for i :=0 to FClasses.Count -1 do
+ begin
+ x := FClasses[I];
+ if (X.FClassNameHash = H) and (X.FClassName = Cl) then
+ begin
+ Result := X;
+ Exit;
+ end;
+ end;
+ Result := nil;
+end;
+
+
+
+{ }
+
+function TransDoubleToStr(D: Double): string;
+begin
+ SetLength(Result, SizeOf(Double));
+ Double((@Result[1])^) := D;
+end;
+
+function TransSingleToStr(D: Single): string;
+begin
+ SetLength(Result, SizeOf(Single));
+ Single((@Result[1])^) := D;
+end;
+
+function TransExtendedToStr(D: Extended): string;
+begin
+ SetLength(Result, SizeOf(Extended));
+ Extended((@Result[1])^) := D;
+end;
+
+function TransLongintToStr(D: Longint): string;
+begin
+ SetLength(Result, SizeOf(Longint));
+ Longint((@Result[1])^) := D;
+end;
+
+function TransCardinalToStr(D: Cardinal): string;
+begin
+ SetLength(Result, SizeOf(Cardinal));
+ Cardinal((@Result[1])^) := D;
+end;
+
+function TransWordToStr(D: Word): string;
+begin
+ SetLength(Result, SizeOf(Word));
+ Word((@Result[1])^) := D;
+end;
+
+function TransSmallIntToStr(D: SmallInt): string;
+begin
+ SetLength(Result, SizeOf(SmallInt));
+ SmallInt((@Result[1])^) := D;
+end;
+
+function TransByteToStr(D: Byte): string;
+begin
+ SetLength(Result, SizeOf(Byte));
+ Byte((@Result[1])^) := D;
+end;
+
+function TransShortIntToStr(D: ShortInt): string;
+begin
+ SetLength(Result, SizeOf(ShortInt));
+ ShortInt((@Result[1])^) := D;
+end;
+
+function TPSPascalCompiler.GetConstant(const Name: string): TPSConstant;
+var
+ h, i: Longint;
+ n: string;
+
+begin
+ n := FastUppercase(name);
+ h := MakeHash(n);
+ for i := 0 to FConstants.Count -1 do
+ begin
+ result := TPSConstant(FConstants[i]);
+ if (Result.NameHash = h) and (Result.Name = n) then exit;
+ end;
+ result := nil;
+end;
+
+{ TPSType }
+
+constructor TPSType.Create;
+begin
+ inherited Create;
+ FAttributes := TPSAttributes.Create;
+ FFinalTypeNo := InvalidVal;
+end;
+
+destructor TPSType.Destroy;
+begin
+ FAttributes.Free;
+ inherited Destroy;
+end;
+
+procedure TPSType.SetName(const Value: string);
+begin
+ FName := Value;
+ FNameHash := MakeHash(Value);
+end;
+
+procedure TPSType.Use;
+begin
+ FUsed := True;
+end;
+
+{ TPSRecordType }
+
+function TPSRecordType.AddRecVal: PIFPSRecordFieldTypeDef;
+begin
+ Result := TPSRecordFieldTypeDef.Create;
+ FRecordSubVals.Add(Result);
+end;
+
+constructor TPSRecordType.Create;
+begin
+ inherited Create;
+ FRecordSubVals := TPSList.Create;
+end;
+
+destructor TPSRecordType.Destroy;
+var
+ i: Longint;
+begin
+ for i := FRecordSubVals.Count -1 downto 0 do
+ TPSRecordFieldTypeDef(FRecordSubVals[I]).Free;
+ FRecordSubVals.Free;
+ inherited Destroy;
+end;
+
+function TPSRecordType.RecVal(I: Longint): PIFPSRecordFieldTypeDef;
+begin
+ Result := FRecordSubVals[I]
+end;
+
+function TPSRecordType.RecValCount: Longint;
+begin
+ Result := FRecordSubVals.Count;
+end;
+
+
+{ TPSRegProc }
+
+constructor TPSRegProc.Create;
+begin
+ inherited Create;
+ FDecl := TPSParametersDecl.Create;
+end;
+
+destructor TPSRegProc.Destroy;
+begin
+ FDecl.Free;
+ inherited Destroy;
+end;
+
+procedure TPSRegProc.SetName(const Value: string);
+begin
+ FName := Value;
+ FNameHash := MakeHash(FName);
+end;
+
+{ TPSRecordFieldTypeDef }
+
+procedure TPSRecordFieldTypeDef.SetFieldOrgName(const Value: string);
+begin
+ FFieldOrgName := Value;
+ FFieldName := FastUppercase(Value);
+ FFieldNameHash := MakeHash(FFieldName);
+end;
+
+{ TPSProcVar }
+
+procedure TPSProcVar.SetName(const Value: string);
+begin
+ FName := Value;
+ FNameHash := MakeHash(FName);
+end;
+
+procedure TPSProcVar.Use;
+begin
+ FUsed := True;
+end;
+
+
+
+{ TPSInternalProcedure }
+
+constructor TPSInternalProcedure.Create;
+begin
+ inherited Create;
+ FProcVars := TPSList.Create;
+ FLabels := TIfStringList.Create;
+ FGotos := TIfStringList.Create;
+ FDecl := TPSParametersDecl.Create;
+end;
+
+destructor TPSInternalProcedure.Destroy;
+var
+ i: Longint;
+begin
+ FDecl.Free;
+ for i := FProcVars.Count -1 downto 0 do
+ TPSProcVar(FProcVars[I]).Free;
+ FProcVars.Free;
+ FGotos.Free;
+ FLabels.Free;
+ inherited Destroy;
+end;
+
+procedure TPSInternalProcedure.ResultUse;
+begin
+ FResultUsed := True;
+end;
+
+procedure TPSInternalProcedure.SetName(const Value: string);
+begin
+ FName := Value;
+ FNameHash := MakeHash(FName);
+end;
+
+procedure TPSInternalProcedure.Use;
+begin
+ FUsed := True;
+end;
+
+{ TPSProcedure }
+constructor TPSProcedure.Create;
+begin
+ inherited Create;
+ FAttributes := TPSAttributes.Create;
+end;
+
+destructor TPSProcedure.Destroy;
+begin
+ FAttributes.Free;
+ inherited Destroy;
+end;
+
+{ TPSVar }
+
+procedure TPSVar.SetName(const Value: string);
+begin
+ FName := Value;
+ FNameHash := MakeHash(Value);
+end;
+
+procedure TPSVar.Use;
+begin
+ FUsed := True;
+end;
+
+{ TPSConstant }
+
+destructor TPSConstant.Destroy;
+begin
+ DisposeVariant(Value);
+ inherited Destroy;
+end;
+
+procedure TPSConstant.SetChar(c: Char);
+begin
+ if (FValue <> nil) then
+ begin
+ case FValue.FType.BaseType of
+ btChar: FValue.tchar := c;
+ btString: string(FValue.tstring) := c;
+ {$IFNDEF PS_NOWIDESTRING}
+ btWideString: widestring(FValue.twidestring) := c;
+ {$ENDIF}
+ else
+ raise EPSCompilerException.Create(RPS_ConstantValueMismatch);
+ end;
+ end else
+ raise EPSCompilerException.Create(RPS_ConstantValueNotAssigned)
+end;
+
+procedure TPSConstant.SetExtended(const Val: Extended);
+begin
+ if (FValue <> nil) then
+ begin
+ case FValue.FType.BaseType of
+ btSingle: FValue.tsingle := Val;
+ btDouble: FValue.tdouble := Val;
+ btExtended: FValue.textended := Val;
+ btCurrency: FValue.tcurrency := Val;
+ else
+ raise EPSCompilerException.Create(RPS_ConstantValueMismatch);
+ end;
+ end else
+ raise EPSCompilerException.Create(RPS_ConstantValueNotAssigned)
+end;
+
+procedure TPSConstant.SetInt(const Val: Longint);
+begin
+ if (FValue <> nil) then
+ begin
+ case FValue.FType.BaseType of
+ btEnum: FValue.tu32 := Val;
+ btU32, btS32: FValue.ts32 := Val;
+ btU16, btS16: FValue.ts16 := Val;
+ btU8, btS8: FValue.ts8 := Val;
+ btSingle: FValue.tsingle := Val;
+ btDouble: FValue.tdouble := Val;
+ btExtended: FValue.textended := Val;
+ btCurrency: FValue.tcurrency := Val;
+ {$IFNDEF PS_NOINT64}
+ bts64: FValue.ts64 := Val;
+ {$ENDIF}
+ else
+ raise EPSCompilerException.Create(RPS_ConstantValueMismatch);
+ end;
+ end else
+ raise EPSCompilerException.Create(RPS_ConstantValueNotAssigned)
+end;
+{$IFNDEF PS_NOINT64}
+procedure TPSConstant.SetInt64(const Val: Int64);
+begin
+ if (FValue <> nil) then
+ begin
+ case FValue.FType.BaseType of
+ btEnum: FValue.tu32 := Val;
+ btU32, btS32: FValue.ts32 := Val;
+ btU16, btS16: FValue.ts16 := Val;
+ btU8, btS8: FValue.ts8 := Val;
+ btSingle: FValue.tsingle := Val;
+ btDouble: FValue.tdouble := Val;
+ btExtended: FValue.textended := Val;
+ btCurrency: FValue.tcurrency := Val;
+ bts64: FValue.ts64 := Val;
+ else
+ raise EPSCompilerException.Create(RPS_ConstantValueMismatch);
+ end;
+ end else
+ raise EPSCompilerException.Create(RPS_ConstantValueNotAssigned)
+end;
+{$ENDIF}
+procedure TPSConstant.SetName(const Value: string);
+begin
+ FName := Value;
+ FNameHash := MakeHash(Value);
+end;
+
+
+procedure TPSConstant.SetSet(const val);
+begin
+ if (FValue <> nil) then
+ begin
+ case FValue.FType.BaseType of
+ btSet:
+ begin
+ if length(tbtstring(FValue.tstring)) <> TPSSetType(FValue.FType).ByteSize then
+ SetLength(tbtstring(FValue.tstring), TPSSetType(FValue.FType).ByteSize);
+ Move(Val, FValue.tstring^, TPSSetType(FValue.FType).ByteSize);
+ end;
+ else
+ raise EPSCompilerException.Create(RPS_ConstantValueMismatch);
+ end;
+ end else
+ raise EPSCompilerException.Create(RPS_ConstantValueNotAssigned)
+end;
+
+procedure TPSConstant.SetString(const Val: string);
+begin
+ if (FValue <> nil) then
+ begin
+ case FValue.FType.BaseType of
+ btChar: FValue.tchar := (Val+#0)[1];
+ btString: string(FValue.tstring) := val;
+ {$IFNDEF PS_NOWIDESTRING}
+ btWideString: widestring(FValue.twidestring) := val;
+ {$ENDIF}
+ else
+ raise EPSCompilerException.Create(RPS_ConstantValueMismatch);
+ end;
+ end else
+ raise EPSCompilerException.Create(RPS_ConstantValueNotAssigned)
+end;
+
+procedure TPSConstant.SetUInt(const Val: Cardinal);
+begin
+ if (FValue <> nil) then
+ begin
+ case FValue.FType.BaseType of
+ btEnum: FValue.tu32 := Val;
+ btU32, btS32: FValue.tu32 := Val;
+ btU16, btS16: FValue.tu16 := Val;
+ btU8, btS8: FValue.tu8 := Val;
+ btSingle: FValue.tsingle := Val;
+ btDouble: FValue.tdouble := Val;
+ btExtended: FValue.textended := Val;
+ btCurrency: FValue.tcurrency := Val;
+ {$IFNDEF PS_NOINT64}
+ bts64: FValue.ts64 := Val;
+ {$ENDIF}
+ else
+ raise EPSCompilerException.Create(RPS_ConstantValueMismatch);
+ end;
+ end else
+ raise EPSCompilerException.Create(RPS_ConstantValueNotAssigned)
+end;
+
+{$IFNDEF PS_NOWIDESTRING}
+procedure TPSConstant.SetWideChar(const val: WideChar);
+begin
+ if (FValue <> nil) then
+ begin
+ case FValue.FType.BaseType of
+ btString: string(FValue.tstring) := val;
+ btWideChar: FValue.twidechar := val;
+ btWideString: widestring(FValue.twidestring) := val;
+ else
+ raise EPSCompilerException.Create(RPS_ConstantValueMismatch);
+ end;
+ end else
+ raise EPSCompilerException.Create(RPS_ConstantValueNotAssigned)
+end;
+
+procedure TPSConstant.SetWideString(const val: WideString);
+begin
+ if (FValue <> nil) then
+ begin
+ case FValue.FType.BaseType of
+ btString: string(FValue.tstring) := val;
+ btWideString: widestring(FValue.twidestring) := val;
+ else
+ raise EPSCompilerException.Create(RPS_ConstantValueMismatch);
+ end;
+ end else
+ raise EPSCompilerException.Create(RPS_ConstantValueNotAssigned)
+end;
+{$ENDIF}
+{ TPSPascalCompilerError }
+
+function TPSPascalCompilerError.ErrorType: string;
+begin
+ Result := RPS_Error;
+end;
+
+function TPSPascalCompilerError.ShortMessageToString: string;
+begin
+ case Error of
+ ecUnknownIdentifier: Result := Format (RPS_UnknownIdentifier, [Param]);
+ ecIdentifierExpected: Result := RPS_IdentifierExpected;
+ ecCommentError: Result := RPS_CommentError;
+ ecStringError: Result := RPS_StringError;
+ ecCharError: Result := RPS_CharError;
+ ecSyntaxError: Result := RPS_SyntaxError;
+ ecUnexpectedEndOfFile: Result := RPS_EOF;
+ ecSemicolonExpected: Result := RPS_SemiColonExpected;
+ ecBeginExpected: Result := RPS_BeginExpected;
+ ecPeriodExpected: Result := RPS_PeriodExpected;
+ ecDuplicateIdentifier: Result := Format (RPS_DuplicateIdent, [Param]);
+ ecColonExpected: Result := RPS_ColonExpected;
+ ecUnknownType: Result := Format (RPS_UnknownType, [Param]);
+ ecCloseRoundExpected: Result := RPS_CloseRoundExpected;
+ ecTypeMismatch: Result := RPS_TypeMismatch;
+ ecInternalError: Result := Format (RPS_InternalError, [Param]);
+ ecAssignmentExpected: Result := RPS_AssignmentExpected;
+ ecThenExpected: Result := RPS_ThenExpected;
+ ecDoExpected: Result := RPS_DoExpected;
+ ecNoResult: Result := RPS_NoResult;
+ ecOpenRoundExpected: Result := RPS_OpenRoundExpected;
+ ecCommaExpected: Result := RPS_CommaExpected;
+ ecToExpected: Result := RPS_ToExpected;
+ ecIsExpected: Result := RPS_IsExpected;
+ ecOfExpected: Result := RPS_OfExpected;
+ ecCloseBlockExpected: Result := RPS_CloseBlockExpected;
+ ecVariableExpected: Result := RPS_VariableExpected;
+ ecStringExpected: result := RPS_StringExpected;
+ ecEndExpected: Result := RPS_EndExpected;
+ ecUnSetLabel: Result := Format (RPS_UnSetLabel, [Param]);
+ ecNotInLoop: Result := RPS_NotInLoop;
+ ecInvalidJump: Result := RPS_InvalidJump;
+ ecOpenBlockExpected: Result := RPS_OpenBlockExpected;
+ ecWriteOnlyProperty: Result := RPS_WriteOnlyProperty;
+ ecReadOnlyProperty: Result := RPS_ReadOnlyProperty;
+ ecClassTypeExpected: Result := RPS_ClassTypeExpected;
+ ecCustomError: Result := Param;
+ ecDivideByZero: Result := RPS_DivideByZero;
+ ecMathError: Result := RPS_MathError;
+ ecUnsatisfiedForward: Result := Format (RPS_UnsatisfiedForward, [Param]);
+ ecForwardParameterMismatch: Result := RPS_ForwardParameterMismatch;
+ ecInvalidnumberOfParameters: Result := RPS_InvalidNumberOfParameter;
+ {$IFDEF PS_USESSUPPORT}
+ ecNotAllowed : Result:=Format(RPS_NotAllowed,[Param]);
+ ecUnitNotFoundOrContainsErrors: Result:=Format(RPS_UnitNotFound,[Param]);
+ {$ENDIF}
+ else
+ Result := RPS_UnknownError;
+ end;
+ Result := Result;
+end;
+
+
+{ TPSPascalCompilerHint }
+
+function TPSPascalCompilerHint.ErrorType: string;
+begin
+ Result := RPS_Hint;
+end;
+
+function TPSPascalCompilerHint.ShortMessageToString: string;
+begin
+ case Hint of
+ ehVariableNotUsed: Result := Format (RPS_VariableNotUsed, [Param]);
+ ehFunctionNotUsed: Result := Format (RPS_FunctionNotUsed, [Param]);
+ ehCustomHint: Result := Param;
+ else
+ Result := RPS_UnknownHint;
+ end;
+end;
+
+{ TPSPascalCompilerWarning }
+
+function TPSPascalCompilerWarning.ErrorType: string;
+begin
+ Result := RPS_Warning;
+end;
+
+function TPSPascalCompilerWarning.ShortMessageToString: string;
+begin
+ case Warning of
+ ewCustomWarning: Result := Param;
+ ewCalculationAlwaysEvaluatesTo: Result := Format (RPS_CalculationAlwaysEvaluatesTo, [Param]);
+ ewIsNotNeeded: Result := Format (RPS_IsNotNeeded, [Param]);
+ ewAbstractClass: Result := RPS_AbstractClass;
+ else
+ Result := RPS_UnknownWarning;
+ end;
+end;
+
+{ TPSPascalCompilerMessage }
+
+function TPSPascalCompilerMessage.MessageToString: string;
+begin
+ Result := '['+ErrorType+'] '+FModuleName+'('+IntToStr(FRow)+':'+IntToStr(FCol)+'): '+ShortMessageToString;
+end;
+
+procedure TPSPascalCompilerMessage.SetParserPos(Parser: TPSPascalParser);
+begin
+ FPosition := Parser.CurrTokenPos;
+ FRow := Parser.Row;
+ FCol := Parser.Col;
+end;
+
+procedure TPSPascalCompilerMessage.SetCustomPos(Pos, Row, Col: Cardinal);
+begin
+ FPosition := Pos;
+ FRow := Row;
+ FCol := Col;
+end;
+
+{ TUnConstOperation }
+
+destructor TUnConstOperation.Destroy;
+begin
+ FVal1.Free;
+ inherited Destroy;
+end;
+
+
+{ TBinConstOperation }
+
+destructor TBinConstOperation.Destroy;
+begin
+ FVal1.Free;
+ FVal2.Free;
+ inherited Destroy;
+end;
+
+{ TConstData }
+
+destructor TConstData.Destroy;
+begin
+ DisposeVariant(FData);
+ inherited Destroy;
+end;
+
+
+{ TConstOperation }
+
+procedure TConstOperation.SetPos(Parser: TPSPascalParser);
+begin
+ FDeclPosition := Parser.CurrTokenPos;
+ FDeclRow := Parser.Row;
+ FDeclCol := Parser.Col;
+end;
+
+{ TPSValue }
+
+procedure TPSValue.SetParserPos(P: TPSPascalParser);
+begin
+ FPos := P.CurrTokenPos;
+ FRow := P.Row;
+ FCol := P.Col;
+end;
+
+{ TPSValueData }
+
+destructor TPSValueData.Destroy;
+begin
+ DisposeVariant(FData);
+ inherited Destroy;
+end;
+
+
+{ TPSValueReplace }
+
+constructor TPSValueReplace.Create;
+begin
+ FFreeNewValue := True;
+ FReplaceTimes := 1;
+end;
+
+destructor TPSValueReplace.Destroy;
+begin
+ if FFreeOldValue then
+ FOldValue.Free;
+ if FFreeNewValue then
+ FNewValue.Free;
+ inherited Destroy;
+end;
+
+
+
+{ TPSUnValueOp }
+
+destructor TPSUnValueOp.Destroy;
+begin
+ FVal1.Free;
+ inherited Destroy;
+end;
+
+{ TPSBinValueOp }
+
+destructor TPSBinValueOp.Destroy;
+begin
+ FVal1.Free;
+ FVal2.Free;
+ inherited Destroy;
+end;
+
+
+
+
+{ TPSSubValue }
+
+destructor TPSSubValue.Destroy;
+begin
+ FSubNo.Free;
+ inherited Destroy;
+end;
+
+{ TPSValueVar }
+
+constructor TPSValueVar.Create;
+begin
+ inherited Create;
+ FRecItems := TPSList.Create;
+end;
+
+destructor TPSValueVar.Destroy;
+var
+ i: Longint;
+begin
+ for i := 0 to FRecItems.Count -1 do
+ begin
+ TPSSubItem(FRecItems[I]).Free;
+ end;
+ FRecItems.Free;
+ inherited Destroy;
+end;
+
+function TPSValueVar.GetRecCount: Cardinal;
+begin
+ Result := FRecItems.Count;
+end;
+
+function TPSValueVar.GetRecItem(I: Cardinal): TPSSubItem;
+begin
+ Result := FRecItems[I];
+end;
+
+function TPSValueVar.RecAdd(Val: TPSSubItem): Cardinal;
+begin
+ Result := FRecItems.Add(Val);
+end;
+
+procedure TPSValueVar.RecDelete(I: Cardinal);
+var
+ rr :TPSSubItem;
+begin
+ rr := FRecItems[i];
+ FRecItems.Delete(I);
+ rr.Free;
+end;
+
+{ TPSValueProc }
+
+destructor TPSValueProc.Destroy;
+begin
+ FSelfPtr.Free;
+ FParameters.Free;
+end;
+{ TPSParameter }
+
+destructor TPSParameter.Destroy;
+begin
+ FTempVar.Free;
+ FValue.Free;
+ inherited Destroy;
+end;
+
+
+ { TPSParameters }
+
+function TPSParameters.Add: TPSParameter;
+begin
+ Result := TPSParameter.Create;
+ FItems.Add(Result);
+end;
+
+constructor TPSParameters.Create;
+begin
+ inherited Create;
+ FItems := TPSList.Create;
+end;
+
+procedure TPSParameters.Delete(I: Cardinal);
+var
+ p: TPSParameter;
+begin
+ p := FItems[I];
+ FItems.Delete(i);
+ p.Free;
+end;
+
+destructor TPSParameters.Destroy;
+var
+ i: Longint;
+begin
+ for i := FItems.Count -1 downto 0 do
+ begin
+ TPSParameter(FItems[I]).Free;
+ end;
+ FItems.Free;
+ inherited Destroy;
+end;
+
+function TPSParameters.GetCount: Cardinal;
+begin
+ Result := FItems.Count;
+end;
+
+function TPSParameters.GetItem(I: Longint): TPSParameter;
+begin
+ Result := FItems[I];
+end;
+
+
+{ TPSValueArray }
+
+function TPSValueArray.Add(Item: TPSValue): Cardinal;
+begin
+ Result := FItems.Add(Item);
+end;
+
+constructor TPSValueArray.Create;
+begin
+ inherited Create;
+ FItems := TPSList.Create;
+end;
+
+procedure TPSValueArray.Delete(I: Cardinal);
+begin
+ FItems.Delete(i);
+end;
+
+destructor TPSValueArray.Destroy;
+var
+ i: Longint;
+begin
+ for i := FItems.Count -1 downto 0 do
+ TPSValue(FItems[I]).Free;
+ FItems.Free;
+
+ inherited Destroy;
+end;
+
+function TPSValueArray.GetCount: Cardinal;
+begin
+ Result := FItems.Count;
+end;
+
+function TPSValueArray.GetItem(I: Cardinal): TPSValue;
+begin
+ Result := FItems[I];
+end;
+
+
+{ TPSValueAllocatedStackVar }
+
+destructor TPSValueAllocatedStackVar.Destroy;
+var
+ pv: TPSProcVar;
+begin
+ {$IFDEF DEBUG}
+ if Cardinal(LocalVarNo +1) <> proc.ProcVars.Count then
+ begin
+ Abort;
+ exit;
+ end;
+ {$ENDIF}
+ if Proc <> nil then
+ begin
+ pv := Proc.ProcVars[Proc.ProcVars.Count -1];
+ Proc.ProcVars.Delete(Proc.ProcVars.Count -1);
+ pv.Free;
+ Proc.Data := Proc.Data + Char(CM_PO);
+ end;
+ inherited Destroy;
+end;
+
+
+
+
+function AddImportedClassVariable(Sender: TPSPascalCompiler; const VarName, VarType: string): Boolean;
+var
+ P: TPSVar;
+begin
+ P := Sender.AddVariableN(VarName, VarType);
+ if p = nil then
+ begin
+ Result := False;
+ Exit;
+ end;
+ SetVarExportName(P, FastUppercase(VarName));
+ p.Use;
+ Result := True;
+end;
+
+
+{'class:'+CLASSNAME+'|'+FUNCNAME+'|'+chr(CallingConv)+chr(hasresult)+params
+
+For property write functions there is an '@' after the funcname.
+}
+
+const
+ ProcHDR = 'procedure a;';
+
+
+
+{ TPSCompileTimeClass }
+
+function TPSCompileTimeClass.CastToType(IntoType: TPSType;
+ var ProcNo: Cardinal): Boolean;
+var
+ P: TPSExternalProcedure;
+begin
+ if (IntoType <> nil) and (IntoType.BaseType <> btClass) and (IntoType.BaseType <> btInterface) then
+ begin
+ Result := False;
+ exit;
+ end;
+ if FCastProc <> InvalidVal then
+ begin
+ Procno := FCastProc;
+ Result := True;
+ exit;
+ end;
+ ProcNo := FOwner. AddUsedFunction2(P);
+ P.RegProc := FOwner.AddFunction(ProcHDR);
+ P.RegProc.Name := '';
+
+ with P.RegProc.Decl.AddParam do
+ begin
+ OrgName := 'Org';
+ aType := Self.FType;
+ end;
+ with P.RegProc.Decl.AddParam do
+ begin
+ OrgName := 'TypeNo';
+ aType := FOwner.at2ut(FOwner.FindBaseType(btU32));
+ end;
+ P.RegProc.Decl.Result := IntoType;
+ P.RegProc.ImportDecl := 'class:+';
+ FCastProc := ProcNo;
+ Result := True;
+end;
+
+
+function TPSCompileTimeClass.ClassFunc_Call(Index: Cardinal;
+ var ProcNo: Cardinal): Boolean;
+var
+ C: TPSDelphiClassItemConstructor;
+ P: TPSExternalProcedure;
+ s: string;
+ i: Longint;
+
+begin
+ if FIsAbstract then
+ FOwner.MakeWarning('', ewAbstractClass, '');
+ C := Pointer(Index);
+ if c.MethodNo = InvalidVal then
+ begin
+ ProcNo := FOwner.AddUsedFunction2(P);
+ P.RegProc := FOwner.AddFunction(ProcHDR);
+ P.RegProc.Name := '';
+ P.RegProc.Decl.Assign(c.Decl);
+ s := 'class:' + C.Owner.FClassName + '|' + C.Name + '|'+ chr(0);
+ if c.Decl.Result = nil then
+ s := s + #0
+ else
+ s := s + #1;
+ for i := 0 to C.Decl.ParamCount -1 do
+ begin
+ if c.Decl.Params[i].Mode <> pmIn then
+ s := s + #1
+ else
+ s := s + #0;
+ end;
+ P.RegProc.ImportDecl := s;
+ C.MethodNo := ProcNo;
+ end else begin
+ ProcNo := c.MethodNo;
+ end;
+ Result := True;
+end;
+
+function TPSCompileTimeClass.ClassFunc_Find(const Name: string;
+ var Index: Cardinal): Boolean;
+var
+ H: Longint;
+ I: Longint;
+ CurrClass: TPSCompileTimeClass;
+ C: TPSDelphiClassItem;
+begin
+ H := MakeHash(Name);
+ CurrClass := Self;
+ while CurrClass <> nil do
+ begin
+ for i := CurrClass.FClassItems.Count -1 downto 0 do
+ begin
+ C := CurrClass.FClassItems[I];
+ if (c is TPSDelphiClassItemConstructor) and (C.NameHash = H) and (C.Name = Name) then
+ begin
+ Index := Cardinal(C);
+ Result := True;
+ exit;
+ end;
+ end;
+ CurrClass := CurrClass.FInheritsFrom;
+ end;
+ Result := False;
+end;
+
+
+class function TPSCompileTimeClass.CreateC(FClass: TClass; aOwner: TPSPascalCompiler; aType: TPSType): TPSCompileTimeClass;
+begin
+ Result := TPSCompileTimeClass.Create(FastUpperCase(FClass.ClassName), aOwner, aType);
+ Result.FClass := FClass;
+end;
+
+constructor TPSCompileTimeClass.Create(ClassName: string; aOwner: TPSPascalCompiler; aType: TPSType);
+begin
+ inherited Create;
+ FType := aType;
+ FCastProc := InvalidVal;
+ FNilProc := InvalidVal;
+
+ FDefaultProperty := InvalidVal;
+ FClassName := Classname;
+ FClassNameHash := MakeHash(FClassName);
+ FClassItems := TPSList.Create;
+ FOwner := aOwner;
+end;
+
+destructor TPSCompileTimeClass.Destroy;
+var
+ I: Longint;
+begin
+ for i := FClassItems.Count -1 downto 0 do
+ TPSDelphiClassItem(FClassItems[I]).Free;
+ FClassItems.Free;
+ inherited Destroy;
+end;
+
+
+function TPSCompileTimeClass.Func_Call(Index: Cardinal;
+ var ProcNo: Cardinal): Boolean;
+var
+ C: TPSDelphiClassItemMethod;
+ P: TPSExternalProcedure;
+ i: Longint;
+ s: string;
+
+begin
+ C := Pointer(Index);
+ if c.MethodNo = InvalidVal then
+ begin
+ ProcNo := FOwner.AddUsedFunction2(P);
+ P.RegProc := FOwner.AddFunction(ProcHDR);
+ P.RegProc.Name := '';
+ p.RegProc.Decl.Assign(c.Decl);
+ s := 'class:' + C.Owner.FClassName + '|' + C.Name + '|'+ chr(0);
+ if c.Decl.Result = nil then
+ s := s + #0
+ else
+ s := s + #1;
+ for i := 0 to c.Decl.ParamCount -1 do
+ begin
+ if c.Decl.Params[i].Mode <> pmIn then
+ s := s + #1
+ else
+ s := s + #0;
+ end;
+ P.RegProc.ImportDecl := s;
+ C.MethodNo := ProcNo;
+ end else begin
+ ProcNo := c.MethodNo;
+ end;
+ Result := True;
+end;
+
+function TPSCompileTimeClass.Func_Find(const Name: string;
+ var Index: Cardinal): Boolean;
+var
+ H: Longint;
+ I: Longint;
+ CurrClass: TPSCompileTimeClass;
+ C: TPSDelphiClassItem;
+begin
+ H := MakeHash(Name);
+ CurrClass := Self;
+ while CurrClass <> nil do
+ begin
+ for i := CurrClass.FClassItems.Count -1 downto 0 do
+ begin
+ C := CurrClass.FClassItems[I];
+ if (c is TPSDelphiClassItemMethod) and (C.NameHash = H) and (C.Name = Name) then
+ begin
+ Index := Cardinal(C);
+ Result := True;
+ exit;
+ end;
+ end;
+ CurrClass := CurrClass.FInheritsFrom;
+ end;
+ Result := False;
+end;
+
+function TPSCompileTimeClass.GetCount: Longint;
+begin
+ Result := FClassItems.Count;
+end;
+
+function TPSCompileTimeClass.GetItem(i: Longint): TPSDelphiClassItem;
+begin
+ Result := FClassItems[i];
+end;
+
+function TPSCompileTimeClass.IsCompatibleWith(aType: TPSType): Boolean;
+var
+ Temp: TPSCompileTimeClass;
+begin
+ if (atype.BaseType <> btClass) then
+ begin
+ Result := False;
+ exit;
+ end;
+ temp := TPSClassType(aType).Cl;
+ while Temp <> nil do
+ begin
+ if Temp = Self then
+ begin
+ Result := True;
+ exit;
+ end;
+ Temp := Temp.FInheritsFrom;
+ end;
+ Result := False;
+end;
+
+function TPSCompileTimeClass.Property_Find(const Name: string;
+ var Index: Cardinal): Boolean;
+var
+ H: Longint;
+ I: Longint;
+ CurrClass: TPSCompileTimeClass;
+ C: TPSDelphiClassItem;
+begin
+ if Name = '' then
+ begin
+ CurrClass := Self;
+ while CurrClass <> nil do
+ begin
+ if CurrClass.FDefaultProperty <> InvalidVal then
+ begin
+ Index := Cardinal(CurrClass.FClassItems[Currclass.FDefaultProperty]);
+ result := True;
+ exit;
+ end;
+ CurrClass := CurrClass.FInheritsFrom;
+ end;
+ Result := False;
+ exit;
+ end;
+ H := MakeHash(Name);
+ CurrClass := Self;
+ while CurrClass <> nil do
+ begin
+ for i := CurrClass.FClassItems.Count -1 downto 0 do
+ begin
+ C := CurrClass.FClassItems[I];
+ if (c is TPSDelphiClassItemProperty) and (C.NameHash = H) and (C.Name = Name) then
+ begin
+ Index := Cardinal(C);
+ Result := True;
+ exit;
+ end;
+ end;
+ CurrClass := CurrClass.FInheritsFrom;
+ end;
+ Result := False;
+end;
+
+function TPSCompileTimeClass.Property_Get(Index: Cardinal;
+ var ProcNo: Cardinal): Boolean;
+var
+ C: TPSDelphiClassItemProperty;
+ P: TPSExternalProcedure;
+ s: string;
+
+begin
+ C := Pointer(Index);
+ if c.AccessType = iptW then
+ begin
+ Result := False;
+ exit;
+ end;
+ if c.ReadProcNo = InvalidVal then
+ begin
+ ProcNo := FOwner.AddUsedFunction2(P);
+ P.RegProc := FOwner.AddFunction(ProcHDR);
+ P.RegProc.Name := '';
+ P.RegProc.Decl.Result := C.Decl.Result;
+ s := 'class:' + C.Owner.FClassName + '|' + C.Name + '|'+#0#0#0#0;
+ Longint((@(s[length(s)-3]))^) := c.Decl.ParamCount +1;
+ P.RegProc.ImportDecl := s;
+ C.ReadProcNo := ProcNo;
+ end else begin
+ ProcNo := c.ReadProcNo;
+ end;
+ Result := True;
+end;
+
+function TPSCompileTimeClass.Property_GetHeader(Index: Cardinal;
+ Dest: TPSParametersDecl): Boolean;
+var
+ c: TPSDelphiClassItemProperty;
+begin
+ C := Pointer(Index);
+ FOwner.UseProc(c.Decl);
+ Dest.Assign(c.Decl);
+ Result := True;
+end;
+
+function TPSCompileTimeClass.Property_Set(Index: Cardinal;
+ var ProcNo: Cardinal): Boolean;
+var
+ C: TPSDelphiClassItemProperty;
+ P: TPSExternalProcedure;
+ s: string;
+
+begin
+ C := Pointer(Index);
+ if c.AccessType = iptR then
+ begin
+ Result := False;
+ exit;
+ end;
+ if c.WriteProcNo = InvalidVal then
+ begin
+ ProcNo := FOwner.AddUsedFunction2(P);
+ P.RegProc := FOwner.AddFunction(ProcHDR);
+ P.RegProc.Name := '';
+ s := 'class:' + C.Owner.FClassName + '|' + C.Name + '@|'#0#0#0#0;
+ Longint((@(s[length(s)-3]))^) := C.Decl.ParamCount+1;
+ P.RegProc.ImportDecl := s;
+ C.WriteProcNo := ProcNo;
+ end else begin
+ ProcNo := c.WriteProcNo;
+ end;
+ Result := True;
+end;
+
+function TPSCompileTimeClass.RegisterMethod(const Decl: string): Boolean;
+var
+ DOrgName: string;
+ DDecl: TPSParametersDecl;
+ FT: TPMFuncType;
+ p: TPSDelphiClassItemMethod;
+begin
+ DDecl := TPSParametersDecl.Create;
+ try
+ if not ParseMethod(FOwner, FClassName, Decl, DOrgName, DDecl, FT) then
+ begin
+ Result := False;
+ {$IFDEF DEBUG} raise EPSCompilerException.CreateFmt(RPS_UnableToRegister, [Decl]); {$ENDIF}
+ exit;
+ end;
+ if ft = mftConstructor then
+ p := TPSDelphiClassItemConstructor.Create(Self)
+ else
+ p := TPSDelphiClassItemMethod.Create(self);
+ p.OrgName := DOrgName;
+ p.Decl.Assign(DDecl);
+ p.MethodNo := InvalidVal;
+ FClassItems.Add(p);
+ Result := True;
+ finally
+ DDecl.Free;
+ end;
+end;
+
+procedure TPSCompileTimeClass.RegisterProperty(const PropertyName,
+ PropertyType: string; PropAC: TPSPropType);
+var
+ FType: TPSType;
+ Param: TPSParameterDecl;
+ p: TPSDelphiClassItemProperty;
+ PT: string;
+begin
+ pt := PropertyType;
+ p := TPSDelphiClassItemProperty.Create(Self);
+ p.AccessType := PropAC;
+ p.ReadProcNo := InvalidVal;
+ p.WriteProcNo := InvalidVal;
+ p.OrgName := PropertyName;
+ repeat
+ FType := FOwner.FindType(FastUpperCase(grfw(pt)));
+ if FType = nil then
+ begin
+ p.Free;
+ Exit;
+ end;
+ if p.Decl.Result = nil then p.Decl.Result := FType else
+ begin
+ param := p.Decl.AddParam;
+ Param.OrgName := 'param'+IntToStr(p.Decl.ParamCount);
+ Param.aType := FType;
+ end;
+ until pt = '';
+ FClassItems.Add(p);
+end;
+
+
+procedure TPSCompileTimeClass.RegisterPublishedProperties;
+var
+ p: PPropList;
+ i, Count: Longint;
+ a: TPSPropType;
+begin
+ if (Fclass = nil) or (Fclass.ClassInfo = nil) then exit;
+ Count := GetTypeData(fclass.ClassInfo)^.PropCount;
+ GetMem(p, Count * SizeOf(Pointer));
+ GetPropInfos(fclass.ClassInfo, p);
+ for i := Count -1 downto 0 do
+ begin
+ if p^[i]^.PropType^.Kind in [tkLString, tkInteger, tkChar, tkEnumeration, tkFloat, tkString, tkSet, tkClass, tkMethod{$IFNDEF PS_NOWIDESTRING}, tkWString{$ENDIF}] then
+ begin
+ if (p^[i]^.GetProc <> nil) then
+ begin
+ if p^[i]^.SetProc = nil then
+ a := iptr
+ else
+ a := iptrw;
+ end else
+ begin
+ a := iptW;
+ if p^[i]^.SetProc = nil then continue;
+ end;
+ RegisterProperty(p^[i]^.Name, p^[i]^.PropType^.Name, a);
+ end;
+ end;
+ FreeMem(p);
+end;
+
+function TPSCompileTimeClass.RegisterPublishedProperty(const Name: string): Boolean;
+var
+ p: PPropInfo;
+ a: TPSPropType;
+begin
+ if (Fclass = nil) or (Fclass.ClassInfo = nil) then begin Result := False; exit; end;
+ p := GetPropInfo(fclass.ClassInfo, Name);
+ if p = nil then begin Result := False; exit; end;
+ if (p^.GetProc <> nil) then
+ begin
+ if p^.SetProc = nil then
+ a := iptr
+ else
+ a := iptrw;
+ end else
+ begin
+ a := iptW;
+ if p^.SetProc = nil then begin result := False; exit; end;
+ end;
+ RegisterProperty(p^.Name, p^.PropType^.Name, a);
+ Result := True;
+end;
+
+
+procedure TPSCompileTimeClass.SetDefaultPropery(const Name: string);
+var
+ i,h: Longint;
+ p: TPSDelphiClassItem;
+ s: string;
+
+begin
+ s := FastUppercase(name);
+ h := MakeHash(s);
+ for i := FClassItems.Count -1 downto 0 do
+ begin
+ p := FClassItems[i];
+ if (p.NameHash = h) and (p.Name = s) then
+ begin
+ if p is TPSDelphiClassItemProperty then
+ begin
+ if p.Decl.ParamCount = 0 then
+ Raise EPSCompilerException.Create(RPS_NotArrayProperty);
+ FDefaultProperty := I;
+ exit;
+ end else Raise EPSCompilerException.Create(RPS_NotProperty);
+ end;
+ end;
+ raise EPSCompilerException.Create(RPS_UnknownProperty);
+end;
+
+function TPSCompileTimeClass.SetNil(var ProcNo: Cardinal): Boolean;
+var
+ P: TPSExternalProcedure;
+
+begin
+ if FNilProc <> InvalidVal then
+ begin
+ Procno := FNilProc;
+ Result := True;
+ exit;
+ end;
+ ProcNo := FOwner.AddUsedFunction2(P);
+ P.RegProc := FOwner.AddFunction(ProcHDR);
+ P.RegProc.Name := '';
+ with P.RegProc.Decl.AddParam do
+ begin
+ OrgName := 'VarNo';
+ aType := FOwner.at2ut(FType);
+ end;
+ P.RegProc.ImportDecl := 'class:-';
+ FNilProc := Procno;
+ Result := True;
+end;
+
+{ TPSSetType }
+
+function TPSSetType.GetBitSize: Longint;
+begin
+ case SetType.BaseType of
+ btEnum: begin Result := TPSEnumType(setType).HighValue+1; end;
+ btChar, btU8: Result := 256;
+ else
+ Result := 0;
+ end;
+end;
+
+function TPSSetType.GetByteSize: Longint;
+var
+ r: Longint;
+begin
+ r := BitSize;
+ if r mod 8 <> 0 then inc(r, 7);
+ Result := r div 8;
+end;
+
+
+{ TPSBlockInfo }
+
+procedure TPSBlockInfo.Clear;
+var
+ i: Longint;
+begin
+ for i := WithList.Count -1 downto 0 do
+ begin
+ TPSValue(WithList[i]).Free;
+ WithList.Delete(i);
+ end;
+end;
+
+constructor TPSBlockInfo.Create(Owner: TPSBlockInfo);
+begin
+ inherited Create;
+ FOwner := Owner;
+ FWithList := TPSList.Create;
+ if FOwner <> nil then
+ begin
+ FProcNo := FOwner.ProcNo;
+ FProc := FOwner.Proc;
+ end;
+end;
+
+destructor TPSBlockInfo.Destroy;
+begin
+ Clear;
+ FWithList.Free;
+ inherited Destroy;
+end;
+
+{ TPSAttributeTypeField }
+procedure TPSAttributeTypeField.SetFieldOrgName(const Value: string);
+begin
+ FFieldOrgName := Value;
+ FFieldName := FastUpperCase(Value);
+ FFieldNameHash := MakeHash(FFieldName);
+end;
+
+constructor TPSAttributeTypeField.Create(AOwner: TPSAttributeType);
+begin
+ inherited Create;
+ FOwner := AOwner;
+end;
+
+{ TPSAttributeType }
+
+function TPSAttributeType.GetField(I: Longint): TPSAttributeTypeField;
+begin
+ Result := TPSAttributeTypeField(FFields[i]);
+end;
+
+function TPSAttributeType.GetFieldCount: Longint;
+begin
+ Result := FFields.Count;
+end;
+
+procedure TPSAttributeType.SetName(const s: string);
+begin
+ FOrgname := s;
+ FName := Uppercase(s);
+ FNameHash := MakeHash(FName);
+end;
+
+constructor TPSAttributeType.Create;
+begin
+ inherited Create;
+ FFields := TPSList.Create;
+end;
+
+destructor TPSAttributeType.Destroy;
+var
+ i: Longint;
+begin
+ for i := FFields.Count -1 downto 0 do
+ begin
+ TPSAttributeTypeField(FFields[i]).Free;
+ end;
+ FFields.Free;
+ inherited Destroy;
+end;
+
+function TPSAttributeType.AddField: TPSAttributeTypeField;
+begin
+ Result := TPSAttributeTypeField.Create(self);
+ FFields.Add(Result);
+end;
+
+procedure TPSAttributeType.DeleteField(I: Longint);
+var
+ Fld: TPSAttributeTypeField;
+begin
+ Fld := FFields[i];
+ FFields.Delete(i);
+ Fld.Free;
+end;
+
+{ TPSAttribute }
+function TPSAttribute.GetValueCount: Longint;
+begin
+ Result := FValues.Count;
+end;
+
+function TPSAttribute.GetValue(I: Longint): PIfRVariant;
+begin
+ Result := FValues[i];
+end;
+
+constructor TPSAttribute.Create(AttribType: TPSAttributeType);
+begin
+ inherited Create;
+ FValues := TPSList.Create;
+ FAttribType := AttribType;
+end;
+
+procedure TPSAttribute.DeleteValue(i: Longint);
+var
+ Val: PIfRVariant;
+begin
+ Val := FValues[i];
+ FValues.Delete(i);
+ DisposeVariant(Val);
+end;
+
+function TPSAttribute.AddValue(v: PIFRVariant): Longint;
+begin
+ Result := FValues.Add(v);
+end;
+
+
+destructor TPSAttribute.Destroy;
+var
+ i: Longint;
+begin
+ for i := FValues.Count -1 downto 0 do
+ begin
+ DisposeVariant(FValues[i]);
+ end;
+ FValues.Free;
+ inherited Destroy;
+end;
+
+
+procedure TPSAttribute.Assign(Item: TPSAttribute);
+var
+ i: Longint;
+ p: PIfRVariant;
+begin
+ for i := FValues.Count -1 downto 0 do
+ begin
+ DisposeVariant(FValues[i]);
+ end;
+ FValues.Clear;
+ FAttribType := Item.FAttribType;
+ for i := 0 to Item.FValues.Count -1 do
+ begin
+ p := DuplicateVariant(Item.FValues[i]);
+ FValues.Add(p);
+ end;
+end;
+
+{ TPSAttributes }
+
+function TPSAttributes.GetCount: Longint;
+begin
+ Result := FItems.Count;
+end;
+
+function TPSAttributes.GetItem(I: Longint): TPSAttribute;
+begin
+ Result := TPSAttribute(FItems[i]);
+end;
+
+procedure TPSAttributes.Delete(i: Longint);
+var
+ item: TPSAttribute;
+begin
+ item := TPSAttribute(FItems[i]);
+ FItems.Delete(i);
+ Item.Free;
+end;
+
+function TPSAttributes.Add(AttribType: TPSAttributeType): TPSAttribute;
+begin
+ Result := TPSAttribute.Create(AttribType);
+ FItems.Add(Result);
+end;
+
+constructor TPSAttributes.Create;
+begin
+ inherited Create;
+ FItems := TPSList.Create;
+end;
+
+destructor TPSAttributes.Destroy;
+var
+ i: Longint;
+begin
+ for i := FItems.Count -1 downto 0 do
+ begin
+ TPSAttribute(FItems[i]).Free;
+ end;
+ FItems.Free;
+ inherited Destroy;
+end;
+
+procedure TPSAttributes.Assign(attr: TPSAttributes; Move: Boolean);
+var
+ newitem, item: TPSAttribute;
+ i: Longint;
+begin
+ for i := ATtr.FItems.Count -1 downto 0 do
+ begin
+ Item := Attr.Fitems[i];
+ if Move then
+ begin
+ FItems.Add(Item);
+ Attr.FItems.Delete(i);
+ end else
+ begin
+ newitem := TPSAttribute.Create(Item.FAttribType );
+ newitem.Assign(item);
+ FItems.Add(NewItem);
+ end;
+ end;
+
+end;
+
+
+function TPSAttributes.FindAttribute(
+ const Name: string): TPSAttribute;
+var
+ h, i: Longint;
+
+begin
+ h := MakeHash(name);
+ for i := FItems.Count -1 downto 0 do
+ begin
+ Result := FItems[i];
+ if (Result.FAttribType.NameHash = h) and (Result.FAttribType.Name = Name) then
+ exit;
+ end;
+ result := nil;
+end;
+
+{ TPSParameterDecl }
+procedure TPSParameterDecl.SetName(const s: string);
+begin
+ FOrgName := s;
+ FName := FastUppercase(s);
+end;
+
+
+{ TPSParametersDecl }
+
+procedure TPSParametersDecl.Assign(Params: TPSParametersDecl);
+var
+ i: Longint;
+ np, orgp: TPSParameterDecl;
+begin
+ for i := FParams.Count -1 downto 0 do
+ begin
+ TPSParameterDecl(Fparams[i]).Free;
+ end;
+ FParams.Clear;
+ FResult := Params.Result;
+
+ for i := 0 to Params.FParams.count -1 do
+ begin
+ orgp := Params.FParams[i];
+ np := AddParam;
+ np.OrgName := orgp.OrgName;
+ np.Mode := orgp.Mode;
+ np.aType := orgp.aType;
+ np.DeclarePos:=orgp.DeclarePos;
+ np.DeclareRow:=orgp.DeclareRow;
+ np.DeclareCol:=orgp.DeclareCol;
+ end;
+end;
+
+
+function TPSParametersDecl.GetParam(I: Longint): TPSParameterDecl;
+begin
+ Result := FParams[i];
+end;
+
+function TPSParametersDecl.GetParamCount: Longint;
+begin
+ Result := FParams.Count;
+end;
+
+function TPSParametersDecl.AddParam: TPSParameterDecl;
+begin
+ Result := TPSParameterDecl.Create;
+ FParams.Add(Result);
+end;
+
+procedure TPSParametersDecl.DeleteParam(I: Longint);
+var
+ param: TPSParameterDecl;
+begin
+ param := FParams[i];
+ FParams.Delete(i);
+ Param.Free;
+end;
+
+constructor TPSParametersDecl.Create;
+begin
+ inherited Create;
+ FParams := TPSList.Create;
+end;
+
+destructor TPSParametersDecl.Destroy;
+var
+ i: Longint;
+begin
+ for i := FParams.Count -1 downto 0 do
+ begin
+ TPSParameterDecl(Fparams[i]).Free;
+ end;
+ FParams.Free;
+ inherited Destroy;
+end;
+
+function TPSParametersDecl.Same(d: TPSParametersDecl): boolean;
+var
+ i: Longint;
+begin
+ if (d = nil) or (d.ParamCount <> ParamCount) or (d.Result <> Self.Result) then
+ Result := False
+ else begin
+ for i := 0 to d.ParamCount -1 do
+ begin
+ if (d.Params[i].Mode <> Params[i].Mode) or (d.Params[i].aType <> Params[i].aType) then
+ begin
+ Result := False;
+ exit;
+ end;
+ end;
+ Result := True;
+ end;
+end;
+
+{ TPSProceduralType }
+
+constructor TPSProceduralType.Create;
+begin
+ inherited Create;
+ FProcDef := TPSParametersDecl.Create;
+
+end;
+
+destructor TPSProceduralType.Destroy;
+begin
+ FProcDef.Free;
+ inherited Destroy;
+end;
+
+{ TPSDelphiClassItem }
+
+procedure TPSDelphiClassItem.SetName(const s: string);
+begin
+ FOrgName := s;
+ FName := FastUpperCase(s);
+ FNameHash := MakeHash(FName);
+end;
+
+constructor TPSDelphiClassItem.Create(Owner: TPSCompileTimeClass);
+begin
+ inherited Create;
+ FOwner := Owner;
+ FDecl := TPSParametersDecl.Create;
+end;
+
+destructor TPSDelphiClassItem.Destroy;
+begin
+ FDecl.Free;
+ inherited Destroy;
+end;
+
+{$IFNDEF PS_NOINTERFACES}
+{ TPSInterface }
+
+function TPSInterface.CastToType(IntoType: TPSType;
+ var ProcNo: Cardinal): Boolean;
+var
+ P: TPSExternalProcedure;
+begin
+ if (IntoType <> nil) and (IntoType.BaseType <> btInterface) then
+ begin
+ Result := False;
+ exit;
+ end;
+ if FCastProc <> InvalidVal then
+ begin
+ ProcNo := FCastProc;
+ Result := True;
+ exit;
+ end;
+ ProcNo := FOwner.AddUsedFunction2(P);
+ P.RegProc := FOwner.AddFunction(ProcHDR);
+ P.RegProc.Name := '';
+ with P.RegProc.Decl.AddParam do
+ begin
+ OrgName := 'Org';
+ aType := Self.FType;
+ end;
+ with P.RegProc.Decl.AddParam do
+ begin
+ OrgName := 'TypeNo';
+ aType := FOwner.at2ut(FOwner.FindBaseType(btU32));
+ end;
+ P.RegProc.Decl.Result := FOwner.at2ut(IntoType);
+
+ P.RegProc.ImportDecl := 'class:+';
+ FCastProc := ProcNo;
+ Result := True;
+end;
+
+constructor TPSInterface.Create(Owner: TPSPascalCompiler; InheritedFrom: TPSInterface; Guid: TGuid; const Name: string; aType: TPSType);
+begin
+ inherited Create;
+ FCastProc := InvalidVal;
+ FNilProc := InvalidVal;
+
+ FType := aType;
+ FOWner := Owner;
+ FGuid := GUID;
+ Self.InheritedFrom := InheritedFrom;
+
+ FItems := TPSList.Create;
+ FName := Name;
+ FNameHash := MakeHash(Name);
+end;
+
+procedure TPSInterface.SetInheritedFrom(p: TPSInterface);
+begin
+ FInheritedFrom := p;
+end;
+
+destructor TPSInterface.Destroy;
+var
+ i: Longint;
+begin
+ for i := FItems.Count -1 downto 0 do
+ begin
+ TPSInterfaceMethod(FItems[i]).Free;
+ end;
+ FItems.Free;
+ inherited Destroy;
+end;
+
+function TPSInterface.Func_Call(Index: Cardinal;
+ var ProcNo: Cardinal): Boolean;
+var
+ c: TPSInterfaceMethod;
+ P: TPSExternalProcedure;
+ s: string;
+ i: Longint;
+begin
+ c := TPSInterfaceMethod(Index);
+ if c.FScriptProcNo <> InvalidVal then
+ begin
+ Procno := c.FScriptProcNo;
+ Result := True;
+ exit;
+ end;
+ ProcNo := FOwner.AddUsedFunction2(P);
+ P.RegProc := FOwner.AddFunction(ProcHDR);
+ P.RegProc.Name := '';
+ FOwner.UseProc(C.Decl);
+ P.RegProc.Decl.Assign(c.Decl);
+ s := 'intf:.' + PS_mi2s(c.AbsoluteProcOffset) + chr(ord(c.CC));
+ if c.Decl.Result = nil then
+ s := s + #0
+ else
+ s := s + #1;
+ for i := 0 to C.Decl.ParamCount -1 do
+ begin
+ if c.Decl.Params[i].Mode <> pmIn then
+ s := s + #1
+ else
+ s := s + #0;
+ end;
+ P.RegProc.ImportDecl := s;
+ C.FScriptProcNo := ProcNo;
+ Result := True;
+end;
+
+function TPSInterface.Func_Find(const Name: string;
+ var Index: Cardinal): Boolean;
+var
+ H: Longint;
+ I: Longint;
+ CurrClass: TPSInterface;
+ C: TPSInterfaceMethod;
+begin
+ H := MakeHash(Name);
+ CurrClass := Self;
+ while CurrClass <> nil do
+ begin
+ for i := CurrClass.FItems.Count -1 downto 0 do
+ begin
+ C := CurrClass.FItems[I];
+ if (C.NameHash = H) and (C.Name = Name) then
+ begin
+ Index := Cardinal(c);
+ Result := True;
+ exit;
+ end;
+ end;
+ CurrClass := CurrClass.FInheritedFrom;
+ end;
+ Result := False;
+end;
+
+function TPSInterface.IsCompatibleWith(aType: TPSType): Boolean;
+var
+ Temp: TPSInterface;
+begin
+ if (atype.BaseType = btClass) then // just support it, we'll see what happens
+ begin
+ Result := true;
+ exit;
+ end;
+ if atype.BaseType <> btInterface then
+ begin
+ Result := False;
+ exit;
+ end;
+ temp := TPSInterfaceType(atype).FIntf;
+ while Temp <> nil do
+ begin
+ if Temp = Self then
+ begin
+ Result := True;
+ exit;
+ end;
+ Temp := Temp.FInheritedFrom;
+ end;
+ Result := False;
+end;
+
+procedure TPSInterface.RegisterDummyMethod;
+begin
+ FItems.Add(TPSInterfaceMethod.Create(self));
+end;
+
+function TPSInterface.RegisterMethod(const Declaration: string;
+ const cc: TPSCallingConvention): Boolean;
+var
+ M: TPSInterfaceMethod;
+ DOrgName: string;
+ Func: TPMFuncType;
+begin
+ M := TPSInterfaceMethod.Create(Self);
+ if not ParseMethod(FOwner, '', Declaration, DOrgname, m.Decl, Func) then
+ begin
+ FItems.Add(m); // in any case, add a dummy item
+ Result := False;
+ exit;
+ end;
+ m.FName := FastUppercase(DOrgName);
+ m.FOrgName := DOrgName;
+ m.FNameHash := MakeHash(m.FName);
+ m.FCC := CC;
+ m.FScriptProcNo := InvalidVal;
+ FItems.Add(M);
+ Result := True;
+end;
+
+
+function TPSInterface.SetNil(var ProcNo: Cardinal): Boolean;
+var
+ P: TPSExternalProcedure;
+
+begin
+ if FNilProc <> InvalidVal then
+ begin
+ Procno := FNilProc;
+ Result := True;
+ exit;
+ end;
+ ProcNo := FOwner.AddUsedFunction2(P);
+ P.RegProc := FOwner.AddFunction(ProcHDR);
+ P.RegProc.Name := '';
+ with p.RegProc.Decl.AddParam do
+ begin
+ Mode := pmInOut;
+ OrgName := 'VarNo';
+ aType := FOwner.at2ut(Self.FType);
+ end;
+ P.RegProc.ImportDecl := 'class:-';
+ FNilProc := Procno;
+ Result := True;
+end;
+
+{ TPSInterfaceMethod }
+
+constructor TPSInterfaceMethod.Create(Owner: TPSInterface);
+begin
+ inherited Create;
+ FDecl := TPSParametersDecl.Create;
+ FOwner := Owner;
+ FOffsetCache := InvalidVal;
+end;
+
+function TPSInterfaceMethod.GetAbsoluteProcOffset: Cardinal;
+var
+ ps: TPSInterface;
+begin
+ if FOffsetCache = InvalidVal then
+ begin
+ FOffsetCache := FOwner.FItems.IndexOf(Self);
+ ps := FOwner.FInheritedFrom;
+ while ps <> nil do
+ begin
+ FOffsetCache := FOffsetCache + ps.FItems.Count;
+ ps := ps.FInheritedFrom;
+ end;
+ end;
+ result := FOffsetCache;
+end;
+
+
+destructor TPSInterfaceMethod.Destroy;
+begin
+ FDecl.Free;
+ inherited Destroy;
+end;
+{$ENDIF}
+
+{ TPSVariantType }
+
+function TPSVariantType.GetDynInvokeParamType(Owner: TPSPascalCompiler) : TPSType;
+begin
+ Result := Owner.at2ut(FindAndAddType(owner, '!OPENARRAYOFVARIANT', 'array of variant'));
+end;
+
+function TPSVariantType.GetDynInvokeProcNo(Owner: TPSPascalCompiler; const Name: string;
+ Params: TPSParameters): Cardinal;
+begin
+ Result := Owner.FindProc('IDISPATCHINVOKE');
+end;
+
+function TPSVariantType.GetDynIvokeResulType(
+ Owner: TPSPascalCompiler): TPSType;
+begin
+ Result := Owner.FindType('VARIANT');
+end;
+
+function TPSVariantType.GetDynIvokeSelfType(Owner: TPSPascalCompiler): TPSType;
+begin
+ Result := Owner.at2ut(Owner.FindType('IDISPATCH'));
+end;
+
+
+{ TPSExternalClass }
+function TPSExternalClass.SetNil(var ProcNo: Cardinal): Boolean;
+begin
+ Result := False;
+end;
+
+constructor TPSExternalClass.Create(Se: TIFPSPascalCompiler; TypeNo: TPSType);
+begin
+ inherited Create;
+ Self.SE := se;
+ Self.FTypeNo := TypeNo;
+end;
+
+function TPSExternalClass.Func_Call(Index: Cardinal;
+ var ProcNo: Cardinal): Boolean;
+begin
+ Result := False;
+end;
+
+function TPSExternalClass.Func_Find(const Name: string;
+ var Index: Cardinal): Boolean;
+begin
+ Result := False;
+end;
+
+function TPSExternalClass.IsCompatibleWith(
+ Cl: TPSExternalClass): Boolean;
+begin
+ Result := False;
+end;
+
+function TPSExternalClass.SelfType: TPSType;
+begin
+ Result := nil;
+end;
+
+function TPSExternalClass.CastToType(IntoType: TPSType;
+ var ProcNo: Cardinal): Boolean;
+begin
+ Result := False;
+end;
+
+function TPSExternalClass.CompareClass(OtherTypeNo: TPSType;
+ var ProcNo: Cardinal): Boolean;
+begin
+ Result := false;
+end;
+
+function TPSExternalClass.ClassFunc_Find(const Name: string; var Index: Cardinal): Boolean;
+begin
+ result := false;
+end;
+
+function TPSExternalClass.ClassFunc_Call(Index: Cardinal; var ProcNo: Cardinal): Boolean;
+begin
+ result := false;
+end;
+
+
+{ TPSValueProcVal }
+
+destructor TPSValueProcVal.Destroy;
+begin
+ FProcNo.Free;
+ inherited;
+end;
+
+
+{
+
+Internal error counter: 00020 (increase and then use)
+
+}
+end.
+
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/uPSComponent.pas b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSComponent.pas
new file mode 100644
index 0000000..e85532f
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSComponent.pas
@@ -0,0 +1,1503 @@
+unit uPSComponent;
+{$I PascalScript.inc}
+interface
+
+uses
+ SysUtils, Classes, uPSRuntime, uPSDebugger, uPSUtils,
+ uPSCompiler, uPSC_dll, uPSR_dll, uPSPreProcessor;
+
+const
+ {alias to @link(ifps3.cdRegister)}
+ cdRegister = uPSRuntime.cdRegister;
+ {alias to @link(ifps3.cdPascal)}
+ cdPascal = uPSRuntime.cdPascal;
+
+ CdCdecl = uPSRuntime.CdCdecl;
+
+ CdStdCall = uPSRuntime.CdStdCall;
+
+type
+ TPSScript = class;
+
+ TDelphiCallingConvention = uPSRuntime.TPSCallingConvention;
+ {Alias to @link(ifps3.TPSRuntimeClassImporter)}
+ TPSRuntimeClassImporter = uPSRuntime.TPSRuntimeClassImporter;
+
+ TPSPlugin = class(TComponent)
+ protected
+
+ procedure CompOnUses(CompExec: TPSScript); virtual;
+
+ procedure ExecOnUses(CompExec: TPSScript); virtual;
+
+ procedure CompileImport1(CompExec: TPSScript); virtual;
+
+ procedure CompileImport2(CompExec: TPSScript); virtual;
+
+ procedure ExecImport1(CompExec: TPSScript; const ri: TPSRuntimeClassImporter); virtual;
+
+ procedure ExecImport2(CompExec: TPSScript; const ri: TPSRuntimeClassImporter); virtual;
+ public
+ end;
+
+ TIFPS3Plugin = class(TPSPlugin);
+
+ TPSDllPlugin = class(TPSPlugin)
+ protected
+ procedure CompOnUses(CompExec: TPSScript); override;
+ procedure ExecOnUses(CompExec: TPSScript); override;
+ end;
+
+ TIFPS3DllPlugin = class(TPSDllPlugin);
+
+
+ TPSPluginItem = class(TCollectionItem)
+ private
+ FPlugin: TPSPlugin;
+ procedure SetPlugin(const Value: TPSPlugin);
+ protected
+ function GetDisplayName: string; override;
+ public
+ procedure Assign(Source: TPersistent); override; //Birb
+ published
+ property Plugin: TPSPlugin read FPlugin write SetPlugin;
+ end;
+
+
+ TIFPS3CEPluginItem = class(TPSPluginItem);
+
+
+ TPSPlugins = class(TCollection)
+ private
+ FCompExec: TPSScript;
+ protected
+
+ function GetOwner: TPersistent; override;
+ public
+
+ constructor Create(CE: TPSScript);
+ end;
+
+ TIFPS3CEPlugins = class(TPSPlugins);
+
+
+ TPSOnGetNotVariant = function (Sender: TPSScript; const Name: string): Variant of object;
+ TPSOnSetNotVariant = procedure (Sender: TPSScript; const Name: string; V: Variant) of object;
+ TPSCompOptions = set of (icAllowNoBegin, icAllowUnit, icAllowNoEnd, icBooleanShortCircuit);
+
+ TPSVerifyProc = procedure (Sender: TPSScript; Proc: TPSInternalProcedure; const Decl: string; var Error: Boolean) of object;
+
+ TPSEvent = procedure (Sender: TPSScript) of object;
+
+ TPSOnCompImport = procedure (Sender: TObject; x: TPSPascalCompiler) of object;
+
+ TPSOnExecImport = procedure (Sender: TObject; se: TPSExec; x: TPSRuntimeClassImporter) of object;
+ {Script engine event function}
+ TPSOnNeedFile = function (Sender: TObject; const OrginFileName: string; var FileName, Output: string): Boolean of object;
+
+ TPSOnProcessDirective = procedure (
+ Sender: TPSPreProcessor;
+ Parser: TPSPascalPreProcessorParser;
+ const Active: Boolean;
+ const DirectiveName, DirectiveParam: String;
+ Var Continue: Boolean) of Object; // jgv
+
+ TPSScript = class(TComponent)
+ private
+ FOnGetNotificationVariant: TPSOnGetNotVariant;
+ FOnSetNotificationVariant: TPSOnSetNotVariant;
+ FCanAdd: Boolean;
+ FComp: TPSPascalCompiler;
+ FCompOptions: TPSCompOptions;
+ FExec: TPSDebugExec;
+ FSuppressLoadData: Boolean;
+ FScript: TStrings;
+ FOnLine: TNotifyEvent;
+ FUseDebugInfo: Boolean;
+ FOnAfterExecute, FOnCompile, FOnExecute: TPSEvent;
+ FOnCompImport: TPSOnCompImport;
+ FOnExecImport: TPSOnExecImport;
+ RI: TPSRuntimeClassImporter;
+ FPlugins: TPSPlugins;
+ FPP: TPSPreProcessor;
+ FMainFileName: string;
+ FOnNeedFile: TPSOnNeedFile;
+ FUsePreProcessor: Boolean;
+ FDefines: TStrings;
+ FOnVerifyProc: TPSVerifyProc;
+ FOnProcessDirective: TPSOnProcessDirective;
+ FOnProcessUnknowDirective: TPSOnProcessDirective;
+ FOnFindUnknownFile: TPSOnNeedFile;
+ function GetRunning: Boolean;
+ procedure SetScript(const Value: TStrings);
+ function GetCompMsg(i: Integer): TPSPascalCompilerMessage;
+ function GetCompMsgCount: Longint;
+ function GetAbout: string;
+ function ScriptUses(Sender: TPSPascalCompiler; const Name: string): Boolean;
+ function GetExecErrorByteCodePosition: Cardinal;
+ function GetExecErrorCode: TIFError;
+ function GetExecErrorParam: string;
+ function GetExecErrorProcNo: Cardinal;
+ function GetExecErrorString: string;
+ function GetExecErrorPosition: Cardinal;
+ function GetExecErrorCol: Cardinal;
+ function GetExecErrorRow: Cardinal;
+ function GetExecErrorFileName: string;
+ procedure SetDefines(const Value: TStrings);
+ protected
+ procedure Notification(AComponent: TComponent; Operation: TOperation); override;
+
+ protected
+ //jgv move where private before - not very usefull
+ procedure OnLineEvent; virtual;
+ procedure SetMainFileName(const Value: string); virtual;
+
+ //--jgv new
+ function DoOnNeedFile (Sender: TObject; const OrginFileName: string; var FileName, Output: string): Boolean; virtual;
+ function DoOnUnknowUses (Sender: TPSPascalCompiler; const Name: string): Boolean; virtual; // return true if processed
+ procedure DoOnCompImport; virtual;
+ procedure DoOnCompile; virtual;
+ function DoVerifyProc (Sender: TPSScript; Proc: TPSInternalProcedure; const Decl: string): Boolean; virtual;
+
+ procedure DoOnExecImport (RunTimeImporter: TPSRuntimeClassImporter); virtual;
+ procedure DoOnExecute (RunTimeImporter: TPSRuntimeClassImporter); virtual;
+ procedure DoAfterExecute; virtual;
+ function DoOnGetNotificationVariant (const Name: string): Variant; virtual;
+ procedure DoOnSetNotificationVariant (const Name: string; V: Variant); virtual;
+
+ procedure DoOnProcessDirective (Sender: TPSPreProcessor;
+ Parser: TPSPascalPreProcessorParser;
+ const Active: Boolean;
+ const DirectiveName, DirectiveParam: String;
+ Var Continue: Boolean); virtual;
+ procedure DoOnProcessUnknowDirective (Sender: TPSPreProcessor;
+ Parser: TPSPascalPreProcessorParser;
+ const Active: Boolean;
+ const DirectiveName, DirectiveParam: String;
+ Var Continue: Boolean); virtual;
+ public
+
+ function FindNamedType(const Name: string): TPSTypeRec;
+
+ function FindBaseType(Bt: TPSBaseType): TPSTypeRec;
+
+ property SuppressLoadData: Boolean read FSuppressLoadData write FSuppressLoadData;
+
+ function LoadExec: Boolean;
+
+ procedure Stop; virtual;
+
+ constructor Create(AOwner: TComponent); override;
+
+ destructor Destroy; override;
+
+ function Compile: Boolean; virtual;
+
+ function Execute: Boolean; virtual;
+
+ property Running: Boolean read GetRunning;
+
+ procedure GetCompiled(var data: string);
+
+ procedure SetCompiled(const Data: string);
+
+ property Comp: TPSPascalCompiler read FComp;
+
+ property Exec: TPSDebugExec read FExec;
+
+ property CompilerMessageCount: Longint read GetCompMsgCount;
+
+ property CompilerMessages[i: Longint]: TPSPascalCompilerMessage read GetCompMsg;
+
+ function CompilerErrorToStr(I: Longint): string;
+
+ property ExecErrorCode: TIFError read GetExecErrorCode;
+
+ property ExecErrorParam: string read GetExecErrorParam;
+
+ property ExecErrorToString: string read GetExecErrorString;
+
+ property ExecErrorProcNo: Cardinal read GetExecErrorProcNo;
+
+ property ExecErrorByteCodePosition: Cardinal read GetExecErrorByteCodePosition;
+
+ property ExecErrorPosition: Cardinal read GetExecErrorPosition;
+
+ property ExecErrorRow: Cardinal read GetExecErrorRow;
+
+ property ExecErrorCol: Cardinal read GetExecErrorCol;
+
+ property ExecErrorFileName: string read GetExecErrorFileName;
+
+ function AddFunctionEx(Ptr: Pointer; const Decl: string; CallingConv: TDelphiCallingConvention): Boolean;
+
+ function AddFunction(Ptr: Pointer; const Decl: string): Boolean;
+
+
+ function AddMethodEx(Slf, Ptr: Pointer; const Decl: string; CallingConv: TDelphiCallingConvention): Boolean;
+
+ function AddMethod(Slf, Ptr: Pointer; const Decl: string): Boolean;
+
+ function AddRegisteredVariable(const VarName, VarType: string): Boolean;
+ function AddNotificationVariant(const VarName: string): Boolean;
+
+ function AddRegisteredPTRVariable(const VarName, VarType: string): Boolean;
+
+ function GetVariable(const Name: string): PIFVariant;
+
+ function SetVarToInstance(const VarName: string; cl: TObject): Boolean;
+
+ procedure SetPointerToData(const VarName: string; Data: Pointer; aType: TIFTypeRec);
+
+ function TranslatePositionPos(Proc, Position: Cardinal; var Pos: Cardinal; var fn: string): Boolean;
+
+ function TranslatePositionRC(Proc, Position: Cardinal; var Row, Col: Cardinal; var fn: string): Boolean;
+
+ function GetProcMethod(const ProcName: string): TMethod;
+
+ function ExecuteFunction(const Params: array of Variant; const ProcName: string): Variant;
+ published
+
+ property About: string read GetAbout stored false;
+
+ property Script: TStrings read FScript write SetScript;
+
+ property CompilerOptions: TPSCompOptions read FCompOptions write FCompOptions;
+
+ property OnLine: TNotifyEvent read FOnLine write FOnLine;
+
+ property OnCompile: TPSEvent read FOnCompile write FOnCompile;
+
+ property OnExecute: TPSEvent read FOnExecute write FOnExecute;
+
+ property OnAfterExecute: TPSEvent read FOnAfterExecute write FOnAfterExecute;
+
+ property OnCompImport: TPSOnCompImport read FOnCompImport write FOnCompImport;
+
+ property OnExecImport: TPSOnExecImport read FOnExecImport write FOnExecImport;
+
+ property UseDebugInfo: Boolean read FUseDebugInfo write FUseDebugInfo default True;
+
+ property Plugins: TPSPlugins read FPlugins write FPlugins;
+
+ property MainFileName: string read FMainFileName write SetMainFileName;
+
+ property UsePreProcessor: Boolean read FUsePreProcessor write FUsePreProcessor;
+
+ property OnNeedFile: TPSOnNeedFile read FOnNeedFile write FOnNeedFile;
+
+ property Defines: TStrings read FDefines write SetDefines;
+
+ property OnVerifyProc: TPSVerifyProc read FOnVerifyProc write FOnVerifyProc;
+ property OnGetNotificationVariant: TPSOnGetNotVariant read FOnGetNotificationVariant write FOnGetNotificationVariant;
+ property OnSetNotificationVariant: TPSOnSetNotVariant read FOnSetNotificationVariant write FOnSetNotificationVariant;
+ property OnFindUnknownFile: TPSOnNeedFile read FOnFindUnknownFile write FOnFindUnknownFile;
+
+ published
+ //-- jgv
+ property OnProcessDirective: TPSOnProcessDirective read FOnProcessDirective write FOnProcessDirective;
+ property OnProcessUnknowDirective: TPSOnProcessDirective read FOnProcessUnknowDirective write FOnProcessUnknowDirective;
+ end;
+
+ TIFPS3CompExec = class(TPSScript);
+
+
+ TPSBreakPointInfo = class
+ private
+ FLine: Longint;
+ FFileNameHash: Longint;
+ FFileName: string;
+ procedure SetFileName(const Value: string);
+ public
+
+ property FileName: string read FFileName write SetFileName;
+
+ property FileNameHash: Longint read FFileNameHash;
+
+ property Line: Longint read FLine write FLine;
+ end;
+
+ TPSOnLineInfo = procedure (Sender: TObject; const FileName: string; Position, Row, Col: Cardinal) of object;
+
+ TPSScriptDebugger = class(TPSScript)
+ private
+ FOnIdle: TNotifyEvent;
+ FBreakPoints: TIFList;
+ FOnLineInfo: TPSOnLineInfo;
+ FLastRow: Cardinal;
+ FOnBreakpoint: TPSOnLineInfo;
+ function GetBreakPoint(I: Integer): TPSBreakPointInfo;
+ function GetBreakPointCount: Longint;
+ protected
+ procedure SetMainFileName(const Value: string); override;
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+
+
+ procedure Pause; virtual;
+
+ procedure Resume; virtual;
+
+
+ procedure StepInto; virtual;
+
+ procedure StepOver; virtual;
+
+ procedure SetBreakPoint(const Fn: string; Line: Longint);
+
+ procedure ClearBreakPoint(const Fn: string; Line: Longint);
+
+ property BreakPointCount: Longint read GetBreakPointCount;
+
+ property BreakPoint[I: Longint]: TPSBreakPointInfo read GetBreakPoint;
+
+ function HasBreakPoint(const Fn: string; Line: Longint): Boolean;
+
+ procedure ClearBreakPoints;
+
+ function GetVarContents(const Name: string): string;
+ published
+
+ property OnIdle: TNotifyEvent read FOnIdle write FOnIdle;
+
+ property OnLineInfo: TPSOnLineInfo read FOnLineInfo write FOnLineInfo;
+
+ property OnBreakpoint: TPSOnLineInfo read FOnBreakpoint write FOnBreakpoint;
+ end;
+
+ TIFPS3DebugCompExec = class(TPSScriptDebugger);
+
+ TPSCustumPlugin = class(TPSPlugin)
+ private
+ FOnCompileImport2: TPSEvent;
+ FOnExecOnUses: TPSEvent;
+ FOnCompOnUses: TPSEvent;
+ FOnCompileImport1: TPSEvent;
+ FOnExecImport1: TPSOnExecImport;
+ FOnExecImport2: TPSOnExecImport;
+ protected
+ procedure CompOnUses(CompExec: TPSScript); override;
+ procedure ExecOnUses(CompExec: TPSScript); override;
+ procedure CompileImport1(CompExec: TPSScript); override;
+ procedure CompileImport2(CompExec: TPSScript); override;
+ procedure ExecImport1(CompExec: TPSScript; const ri: TPSRuntimeClassImporter); override;
+
+ procedure ExecImport2(CompExec: TPSScript; const ri: TPSRuntimeClassImporter); override;
+ public
+ published
+ property OnCompOnUses : TPSEvent read FOnCompOnUses write FOnCompOnUses;
+ property OnExecOnUses: TPSEvent read FOnExecOnUses write FOnExecOnUses;
+ property OnCompileImport1: TPSEvent read FOnCompileImport1 write FOnCompileImport1;
+ property OnCompileImport2: TPSEvent read FOnCompileImport2 write FOnCompileImport2;
+ property OnExecImport1: TPSOnExecImport read FOnExecImport1 write FOnExecImport1;
+ property OnExecImport2: TPSOnExecImport read FOnExecImport2 write FOnExecImport2;
+ end;
+
+implementation
+
+
+{$IFDEF DELPHI3UP }
+resourceString
+{$ELSE }
+const
+{$ENDIF }
+
+ RPS_UnableToReadVariant = 'Unable to read variant';
+ RPS_UnableToWriteVariant = 'Unable to write variant';
+ RPS_ScripEngineAlreadyRunning = 'Script engine already running';
+ RPS_ScriptNotCompiled = 'Script is not compiled';
+ RPS_NotRunning = 'Not running';
+ RPS_UnableToFindVariable = 'Unable to find variable';
+ RPS_UnknownIdentifier = 'Unknown Identifier';
+ RPS_NoScript = 'No script';
+
+function MyGetVariant(Sender: TPSExec; const Name: string): Variant;
+begin
+ Result := TPSScript (Sender.Id).DoOnGetNotificationVariant(Name);
+end;
+
+procedure MySetVariant(Sender: TPSExec; const Name: string; V: Variant);
+begin
+ TPSScript (Sender.Id).DoOnSetNotificationVariant(Name, V);
+end;
+
+function CompScriptUses(Sender: TPSPascalCompiler; const Name: string): Boolean;
+begin
+ Result := TPSScript(Sender.ID).ScriptUses(Sender, Name);
+end;
+
+procedure ExecOnLine(Sender: TPSExec);
+begin
+ if assigned(TPSScript(Sender.ID).FOnLine) then
+ begin
+ TPSScript(Sender.ID).OnLineEvent;
+ end;
+end;
+
+function CompExportCheck(Sender: TPSPascalCompiler; Proc: TPSInternalProcedure; const ProcDecl: string): Boolean;
+begin
+ Result := TPSScript(Sender.ID).DoVerifyProc (Sender.ID, Proc, ProcDecl);
+end;
+
+
+procedure callObjectOnProcessDirective (
+ Sender: TPSPreProcessor;
+ Parser: TPSPascalPreProcessorParser;
+ const Active: Boolean;
+ const DirectiveName, DirectiveParam: String;
+ Var Continue: Boolean);
+begin
+ TPSScript (Sender.ID).DoOnProcessUnknowDirective(Sender, Parser, Active, DirectiveName, DirectiveParam, Continue);
+end;
+
+procedure callObjectOnProcessUnknowDirective (
+ Sender: TPSPreProcessor;
+ Parser: TPSPascalPreProcessorParser;
+ const Active: Boolean;
+ const DirectiveName, DirectiveParam: String;
+ Var Continue: Boolean);
+begin
+ TPSScript (Sender.ID).DoOnProcessDirective(Sender, Parser, Active, DirectiveName, DirectiveParam, Continue);
+end;
+
+
+{ TPSPlugin }
+procedure TPSPlugin.CompileImport1(CompExec: TPSScript);
+begin
+ // do nothing
+end;
+
+procedure TPSPlugin.CompileImport2(CompExec: TPSScript);
+begin
+ // do nothing
+end;
+
+procedure TPSPlugin.CompOnUses(CompExec: TPSScript);
+begin
+ // do nothing
+end;
+
+procedure TPSPlugin.ExecImport1(CompExec: TPSScript; const ri: TPSRuntimeClassImporter);
+begin
+ // do nothing
+end;
+
+procedure TPSPlugin.ExecImport2(CompExec: TPSScript; const ri: TPSRuntimeClassImporter);
+begin
+ // do nothing
+end;
+
+procedure TPSPlugin.ExecOnUses(CompExec: TPSScript);
+begin
+ // do nothing
+end;
+
+
+{ TPSScript }
+
+function TPSScript.AddFunction(Ptr: Pointer;
+ const Decl: string): Boolean;
+begin
+ Result := AddFunctionEx(Ptr, Decl, cdRegister);
+end;
+
+function TPSScript.AddFunctionEx(Ptr: Pointer; const Decl: string;
+ CallingConv: TDelphiCallingConvention): Boolean;
+var
+ P: TPSRegProc;
+begin
+ if not FCanAdd then begin Result := False; exit; end;
+ p := Comp.AddDelphiFunction(Decl);
+ if p <> nil then
+ begin
+ Exec.RegisterDelphiFunction(Ptr, p.Name, CallingConv);
+ Result := True;
+ end else Result := False;
+end;
+
+function TPSScript.AddRegisteredVariable(const VarName,
+ VarType: string): Boolean;
+var
+ FVar: TPSVar;
+begin
+ if not FCanAdd then begin Result := False; exit; end;
+ FVar := FComp.AddUsedVariableN(varname, vartype);
+ if fvar = nil then
+ result := False
+ else begin
+ fvar.exportname := fvar.Name;
+ Result := True;
+ end;
+end;
+
+function CENeedFile(Sender: TPSPreProcessor; const callingfilename: string; var FileName, Output: string): Boolean;
+begin
+ Result := TPSScript (Sender.ID).DoOnNeedFile(Sender.ID, CallingFileName, FileName, Output);
+end;
+
+procedure CompTranslateLineInfo(Sender: TPSPascalCompiler; var Pos, Row, Col: Cardinal; var Name: string);
+var
+ res: TPSLineInfoResults;
+begin
+ if TPSScript(Sender.ID).FPP.CurrentLineInfo.GetLineInfo(Pos, Res) then
+ begin
+ Pos := Res.Pos;
+ Row := Res.Row;
+ Col := Res.Col;
+ Name := Res.Name;
+ end;
+end;
+
+function TPSScript.Compile: Boolean;
+var
+ i: Longint;
+ dta: string;
+begin
+ FExec.Clear;
+ FExec.CMD_Err(erNoError);
+ FExec.ClearspecialProcImports;
+ FExec.ClearFunctionList;
+ if ri <> nil then
+ begin
+ RI.Free;
+ RI := nil;
+ end;
+ RI := TPSRuntimeClassImporter.Create;
+ for i := 0 to FPlugins.Count -1 do
+ begin
+ if (TPSPluginItem(FPlugins.Items[i]) <> nil) and (TPSPluginItem(FPlugins.Items[i]).Plugin <> nil) then
+ TPSPluginItem(FPlugins.Items[i]).Plugin.ExecImport1(Self, ri);
+ end;
+
+ DoOnExecImport (RI);
+
+ for i := 0 to FPlugins.Count -1 do
+ begin
+ if (TPSPluginItem(FPlugins.Items[i]) <> nil)and (TPSPluginItem(FPlugins.Items[i]).Plugin <> nil) then
+ TPSPluginItem(FPlugins.Items[i]).Plugin.ExecImport2(Self, ri);
+ end;
+ RegisterClassLibraryRuntime(Exec, RI);
+ for i := 0 to FPlugins.Count -1 do
+ begin
+ if (TPSPluginItem(FPlugins.Items[i]) <> nil)and (TPSPluginItem(FPlugins.Items[i]).Plugin <> nil) then
+ TPSPluginItem(FPlugins.Items[i]).Plugin.ExecOnUses(Self);
+ end;
+ FCanAdd := True;
+ FComp.BooleanShortCircuit := icBooleanShortCircuit in FCompOptions;
+ FComp.AllowNoBegin := icAllowNoBegin in FCompOptions;
+ FComp.AllowUnit := icAllowUnit in FCompOptions;
+ FComp.AllowNoEnd := icAllowNoEnd in FCompOptions;
+ if FUsePreProcessor then
+ begin
+ FPP.Clear;
+ FPP.Defines.Assign(FDefines);
+ FComp.OnTranslateLineInfo := CompTranslateLineInfo;
+ Fpp.OnProcessDirective := callObjectOnProcessDirective;
+ Fpp.OnProcessUnknowDirective := callObjectOnProcessUnknowDirective;
+ Fpp.MainFile := FScript.Text;
+ Fpp.MainFileName := FMainFileName;
+ Fpp.PreProcess(FMainFileName, dta);
+ if FComp.Compile(dta) then
+ begin
+ FCanAdd := False;
+ if (not SuppressLoadData) and (not LoadExec) then
+ begin
+ Result := False;
+ end else
+ Result := True;
+ end else Result := False;
+ Fpp.AdjustMessages(Comp);
+ end else
+ begin
+ FComp.OnTranslateLineInfo := nil;
+ if FComp.Compile(FScript.Text) then
+ begin
+ FCanAdd := False;
+ if not LoadExec then
+ begin
+ Result := False;
+ end else
+ Result := True;
+ end else Result := False;
+ end;
+end;
+
+function TPSScript.CompilerErrorToStr(I: Integer): string;
+begin
+ Result := CompilerMessages[i].MessageToString;
+end;
+
+constructor TPSScript.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+ FComp := TPSPascalCompiler.Create;
+ FExec := TPSDebugExec.Create;
+ FScript := TStringList.Create;
+ FPlugins := TPSPlugins.Create(self);
+
+ FComp.ID := Self;
+ FComp.OnUses := CompScriptUses;
+ FComp.OnExportCheck := CompExportCheck;
+ FExec.Id := Self;
+ FExec.OnRunLine:= ExecOnLine;
+ FExec.OnGetNVariant := MyGetVariant;
+ FExec.OnSetNVariant := MySetVariant;
+
+ FUseDebugInfo := True;
+
+ FPP := TPSPreProcessor.Create;
+ FPP.Id := Self;
+ FPP.OnNeedFile := CENeedFile;
+
+ FDefines := TStringList.Create;
+end;
+
+destructor TPSScript.Destroy;
+begin
+ FDefines.Free;
+
+ FPP.Free;
+ RI.Free;
+ FPlugins.Free;
+ FPlugins := nil;
+ FScript.Free;
+ FExec.Free;
+ FComp.Free;
+ inherited Destroy;
+end;
+
+function TPSScript.Execute: Boolean;
+begin
+ if Running then raise Exception.Create(RPS_ScripEngineAlreadyRunning);
+ if SuppressLoadData then
+ LoadExec;
+
+ DoOnExecute (RI);
+
+ FExec.DebugEnabled := FUseDebugInfo;
+ Result := FExec.RunScript and (FExec.ExceptionCode = erNoError) ;
+
+ DoAfterExecute;
+end;
+
+function TPSScript.GetAbout: string;
+begin
+ Result := TPSExec.About;
+end;
+
+procedure TPSScript.GetCompiled(var data: string);
+begin
+ if not FComp.GetOutput(Data) then
+ raise Exception.Create(RPS_ScriptNotCompiled);
+end;
+
+function TPSScript.GetCompMsg(i: Integer): TPSPascalCompilerMessage;
+begin
+ Result := FComp.Msg[i];
+end;
+
+function TPSScript.GetCompMsgCount: Longint;
+begin
+ Result := FComp.MsgCount;
+end;
+
+function TPSScript.GetExecErrorByteCodePosition: Cardinal;
+begin
+ Result := Exec.ExceptionPos;
+end;
+
+function TPSScript.GetExecErrorCode: TIFError;
+begin
+ Result := Exec.ExceptionCode;
+end;
+
+function TPSScript.GetExecErrorParam: string;
+begin
+ Result := Exec.ExceptionString;
+end;
+
+function TPSScript.GetExecErrorPosition: Cardinal;
+begin
+ Result := FExec.TranslatePosition(Exec.ExceptionProcNo, Exec.ExceptionPos);
+end;
+
+function TPSScript.GetExecErrorProcNo: Cardinal;
+begin
+ Result := Exec.ExceptionProcNo;
+end;
+
+function TPSScript.GetExecErrorString: string;
+begin
+ Result := TIFErrorToString(Exec.ExceptionCode, Exec.ExceptionString);
+end;
+
+function TPSScript.GetVariable(const Name: string): PIFVariant;
+begin
+ Result := FExec.GetVar2(name);
+end;
+
+function TPSScript.LoadExec: Boolean;
+var
+ s: string;
+begin
+ if (not FComp.GetOutput(s)) or (not FExec.LoadData(s)) then
+ begin
+ Result := False;
+ exit;
+ end;
+ if FUseDebugInfo then
+ begin
+ FComp.GetDebugOutput(s);
+ FExec.LoadDebugData(s);
+ end;
+ Result := True;
+end;
+
+function TPSScript.ScriptUses(Sender: TPSPascalCompiler;
+ const Name: string): Boolean;
+var
+ i: Longint;
+begin
+ if Name = 'SYSTEM' then
+ begin
+ for i := 0 to FPlugins.Count -1 do
+ begin
+ if (TPSPluginItem(FPlugins.Items[i]) <> nil)and (TPSPluginItem(FPlugins.Items[i]).Plugin <> nil) then
+ TPSPluginItem(FPlugins.Items[i]).Plugin.CompOnUses(Self);
+ end;
+ for i := 0 to FPlugins.Count -1 do
+ begin
+ if (TPSPluginItem(FPlugins.Items[i]) <> nil)and (TPSPluginItem(FPlugins.Items[i]).Plugin <> nil) then
+ TPSPluginItem(FPlugins.Items[i]).Plugin.CompileImport1(self);
+ end;
+
+ DoOnCompImport;
+
+ for i := 0 to FPlugins.Count -1 do
+ begin
+ if (TPSPluginItem(FPlugins.Items[i]) <> nil)and (TPSPluginItem(FPlugins.Items[i]).Plugin <> nil) then
+ TPSPluginItem(FPlugins.Items[i]).Plugin.CompileImport2(Self);
+ end;
+
+ DoOnCompile;
+
+ Result := True;
+ end
+ else begin
+ Result := DoOnUnknowUses (Sender, Name);
+{ If Not Result then
+ Sender.MakeError('', ecUnknownIdentifier, Name);}
+ end;
+end;
+
+procedure TPSScript.SetCompiled(const Data: string);
+var
+ i: Integer;
+begin
+ FExec.Clear;
+ FExec.ClearspecialProcImports;
+ FExec.ClearFunctionList;
+ if ri <> nil then
+ begin
+ RI.Free;
+ RI := nil;
+ end;
+ RI := TPSRuntimeClassImporter.Create;
+ for i := 0 to FPlugins.Count -1 do
+ begin
+ if (TPSPluginItem(FPlugins.Items[i]) <> nil)and (TPSPluginItem(FPlugins.Items[i]).Plugin <> nil) then
+ TPSPluginItem(FPlugins.Items[i]).Plugin.ExecImport1(Self, ri);
+ end;
+
+ DoOnExecImport(RI);
+
+ for i := 0 to FPlugins.Count -1 do
+ begin
+ if (TPSPluginItem(FPlugins.Items[i]) <> nil)and (TPSPluginItem(FPlugins.Items[i]).Plugin <> nil) then
+ TPSPluginItem(FPlugins.Items[i]).Plugin.ExecImport2(Self, ri);
+ end;
+ RegisterClassLibraryRuntime(Exec, RI);
+ for i := 0 to FPlugins.Count -1 do
+ begin
+ if (TPSPluginItem(FPlugins.Items[i]) <> nil)and (TPSPluginItem(FPlugins.Items[i]).Plugin <> nil) then
+ TPSPluginItem(FPlugins.Items[i]).Plugin.ExecOnUses(Self);
+ end;
+ if not FExec.LoadData(Data) then
+ raise Exception.Create(GetExecErrorString);
+end;
+
+function TPSScript.SetVarToInstance(const VarName: string; cl: TObject): Boolean;
+var
+ p: PIFVariant;
+begin
+ p := GetVariable(VarName);
+ if p <> nil then
+ begin
+ SetVariantToClass(p, cl);
+ result := true;
+ end else result := false;
+end;
+
+procedure TPSScript.SetScript(const Value: TStrings);
+begin
+ FScript.Assign(Value);
+end;
+
+
+function TPSScript.AddMethod(Slf, Ptr: Pointer;
+ const Decl: string): Boolean;
+begin
+ Result := AddMethodEx(Slf, Ptr, Decl, cdRegister);
+end;
+
+function TPSScript.AddMethodEx(Slf, Ptr: Pointer; const Decl: string;
+ CallingConv: TDelphiCallingConvention): Boolean;
+var
+ P: TPSRegProc;
+begin
+ if not FCanAdd then begin Result := False; exit; end;
+ p := Comp.AddDelphiFunction(Decl);
+ if p <> nil then
+ begin
+ Exec.RegisterDelphiMethod(Slf, Ptr, p.Name, CallingConv);
+ Result := True;
+ end else Result := False;
+end;
+
+procedure TPSScript.OnLineEvent;
+begin
+ if @FOnLine <> nil then FOnLine(Self);
+end;
+
+function TPSScript.GetRunning: Boolean;
+begin
+ Result := FExec.Status = isRunning;
+end;
+
+function TPSScript.GetExecErrorCol: Cardinal;
+var
+ s: string;
+ D1: Cardinal;
+begin
+ if not TranslatePositionRC(Exec.ExceptionProcNo, Exec.ExceptionPos, D1, Result, s) then
+ Result := 0;
+end;
+
+function TPSScript.TranslatePositionPos(Proc, Position: Cardinal;
+ var Pos: Cardinal; var fn: string): Boolean;
+var
+ D1, D2: Cardinal;
+begin
+ Result := Exec.TranslatePositionEx(Exec.ExceptionProcNo, Exec.ExceptionPos, Pos, D1, D2, fn);
+end;
+
+function TPSScript.TranslatePositionRC(Proc, Position: Cardinal;
+ var Row, Col: Cardinal; var fn: string): Boolean;
+var
+ d1: Cardinal;
+begin
+ Result := Exec.TranslatePositionEx(Proc, Position, d1, Row, Col, fn);
+end;
+
+
+function TPSScript.GetExecErrorRow: Cardinal;
+var
+ D1: Cardinal;
+ s: string;
+begin
+ if not TranslatePositionRC(Exec.ExceptionProcNo, Exec.ExceptionPos, Result, D1, s) then
+ Result := 0;
+end;
+
+procedure TPSScript.Stop;
+begin
+ if (FExec.Status = isRunning) or (Fexec.Status = isPaused) then
+ FExec.Stop
+ else
+ raise Exception.Create(RPS_NotRunning);
+end;
+
+function TPSScript.GetProcMethod(const ProcName: string): TMethod;
+begin
+ Result := FExec.GetProcAsMethodN(ProcName)
+end;
+
+procedure TPSScript.SetMainFileName(const Value: string);
+begin
+ FMainFileName := Value;
+end;
+
+function TPSScript.GetExecErrorFileName: string;
+var
+ D1, D2: Cardinal;
+begin
+ if not TranslatePositionRC(Exec.ExceptionProcNo, Exec.ExceptionPos, D1, D2, Result) then
+ Result := '';
+end;
+
+procedure TPSScript.SetPointerToData(const VarName: string;
+ Data: Pointer; aType: TIFTypeRec);
+var
+ v: PIFVariant;
+ t: TPSVariantIFC;
+begin
+ v := GetVariable(VarName);
+ if (Atype = nil) or (v = nil) then raise Exception.Create(RPS_UnableToFindVariable);
+ t.Dta := @PPSVariantData(v).Data;
+ t.aType := v.FType;
+ t.VarParam := false;
+ VNSetPointerTo(t, Data, aType);
+end;
+
+function TPSScript.AddRegisteredPTRVariable(const VarName,
+ VarType: string): Boolean;
+var
+ FVar: TPSVar;
+begin
+ if not FCanAdd then begin Result := False; exit; end;
+ FVar := FComp.AddUsedVariableN(varname, vartype);
+ if fvar = nil then
+ result := False
+ else begin
+ fvar.exportname := fvar.Name;
+ fvar.SaveAsPointer := true;
+ Result := True;
+ end;
+end;
+
+procedure TPSScript.SetDefines(const Value: TStrings);
+begin
+ FDefines.Assign(Value);
+end;
+
+function TPSScript.ExecuteFunction(const Params: array of Variant;
+ const ProcName: string): Variant;
+begin
+ if SuppressLoadData then
+ LoadExec;
+
+ DoOnExecute (RI);
+
+ FExec.DebugEnabled := FUseDebugInfo;
+
+ Result := Exec.RunProcPN(Params, ProcName);
+end;
+
+function TPSScript.FindBaseType(Bt: TPSBaseType): TPSTypeRec;
+begin
+ Result := Exec.FindType2(Bt);
+end;
+
+function TPSScript.FindNamedType(const Name: string): TPSTypeRec;
+begin
+ Result := Exec.GetTypeNo(Exec.GetType(Name));
+end;
+
+procedure TPSScript.Notification(AComponent: TComponent;
+ Operation: TOperation);
+var
+ i: Longint;
+begin
+ inherited Notification(AComponent, Operation);
+ if (Operation = opRemove) and (aComponent is TPSPlugin) then
+ begin
+ for i := Plugins.Count -1 downto 0 do
+ begin
+ if (Plugins.Items[i] as TPSPluginItem).Plugin = aComponent then
+ {$IFDEF FPC_COL_NODELETE}
+ TCollectionItem(Plugins.Items[i]).Free;
+ {$ELSE}
+ Plugins.Delete(i);
+ {$ENDIF}
+ end;
+ end;
+end;
+
+function TPSScript.AddNotificationVariant(const VarName: string): Boolean;
+begin
+ Result := AddRegisteredVariable(VarName, '!NOTIFICATIONVARIANT');
+end;
+
+procedure TPSScript.DoOnProcessDirective(Sender: TPSPreProcessor;
+ Parser: TPSPascalPreProcessorParser; const Active: Boolean;
+ const DirectiveName, DirectiveParam: String; var Continue: Boolean);
+begin
+ If Assigned (OnProcessDirective) then
+ OnProcessDirective (Sender, Parser, Active, DirectiveName, DirectiveParam, Continue);
+end;
+
+procedure TPSScript.DoOnProcessUnknowDirective(Sender: TPSPreProcessor;
+ Parser: TPSPascalPreProcessorParser; const Active: Boolean;
+ const DirectiveName, DirectiveParam: String; var Continue: Boolean);
+begin
+ If Assigned (OnProcessUnknowDirective) then
+ OnProcessUnknowDirective (Sender, Parser, Active, DirectiveName, DirectiveParam, Continue);
+end;
+
+function TPSScript.DoOnNeedFile(Sender: TObject;
+ const OrginFileName: string; var FileName, Output: string): Boolean;
+begin
+ If Assigned (OnNeedFile) then
+ Result := OnNeedFile(Sender, OrginFileName, FileName, Output)
+ else
+ Result := False;
+end;
+
+function TPSScript.DoOnUnknowUses(Sender: TPSPascalCompiler;
+ const Name: string): Boolean;
+var
+ lPrevAllowUnit: Boolean;
+ lData, lName: string;
+begin
+ if assigned(FOnFindUnknownFile) then begin
+ lName := Name;
+ if FOnFindUnknownFile(self, '', lName, lData) then begin
+ lPrevAllowUnit := FComp.AllowUnit;
+ FComp.AllowUnit := true;
+ if FUsePreProcessor then
+ begin
+ FPP.Defines.Assign(FDefines);
+ Fpp.MainFile := lData;
+ Fpp.MainFileName := lName;
+ Fpp.PreProcess(lName, lData);
+ Result := FComp.Compile(lData);
+ Fpp.AdjustMessages(FComp);
+ end else
+ begin
+ FComp.OnTranslateLineInfo := nil;
+ Result := FComp.Compile(lData);
+ end;
+ FComp.AllowUnit := lPrevAllowUnit;
+ end else
+ Result := false;
+ end else
+ result := false;
+end;
+
+procedure TPSScript.DoOnCompImport;
+begin
+ if assigned(OnCompImport) then
+ OnCompImport(Self, Comp);
+end;
+
+procedure TPSScript.DoOnCompile;
+begin
+ if assigned(OnCompile) then
+ OnCompile(Self);
+end;
+
+procedure TPSScript.DoOnExecute;
+begin
+ If Assigned (OnExecute) then
+ OnExecute (Self);
+end;
+
+procedure TPSScript.DoAfterExecute;
+begin
+ if Assigned (OnAfterExecute) then
+ OnAfterExecute(Self);
+end;
+
+function TPSScript.DoVerifyProc(Sender: TPSScript;
+ Proc: TPSInternalProcedure; const Decl: string): Boolean;
+begin
+ if Assigned(OnVerifyProc) then begin
+ Result := false;
+ OnVerifyProc(Sender, Proc, Decl, Result);
+ Result := not Result;
+ end
+ else
+ Result := True;
+end;
+
+procedure TPSScript.DoOnExecImport(
+ RunTimeImporter: TPSRuntimeClassImporter);
+begin
+ if assigned(OnExecImport) then
+ OnExecImport(Self, FExec, RunTimeImporter);
+end;
+
+function TPSScript.DoOnGetNotificationVariant(const Name: string): Variant;
+begin
+ if Not Assigned (OnGetNotificationVariant) then
+ raise Exception.Create(RPS_UnableToReadVariant);
+ Result := OnGetNotificationVariant(Self, Name);
+end;
+
+procedure TPSScript.DoOnSetNotificationVariant(const Name: string;
+ V: Variant);
+begin
+ if Not Assigned (OnSetNotificationVariant) then
+ raise Exception.Create(RPS_UnableToWriteVariant);
+ OnSetNotificationVariant(Self, Name, v);
+end;
+
+{ TPSDllPlugin }
+
+procedure TPSDllPlugin.CompOnUses;
+begin
+ CompExec.Comp.OnExternalProc := DllExternalProc;
+end;
+
+procedure TPSDllPlugin.ExecOnUses;
+begin
+ RegisterDLLRuntime(CompExec.Exec);
+end;
+
+
+
+{ TPS3DebugCompExec }
+
+procedure LineInfo(Sender: TPSDebugExec; const FileName: string; Position, Row, Col: Cardinal);
+var
+ Dc: TPSScriptDebugger;
+ h, i: Longint;
+ bi: TPSBreakPointInfo;
+ lFileName: string;
+begin
+ Dc := Sender.Id;
+ if FileName = '' then
+ lFileName := dc.MainFileName
+ else
+ lFileName := FileName;
+
+ if @dc.FOnLineInfo <> nil then dc.FOnLineInfo(dc, lFileName, Position, Row, Col);
+ if row = dc.FLastRow then exit;
+ dc.FLastRow := row;
+ h := MakeHash(lFileName);
+ bi := nil;
+ for i := DC.FBreakPoints.Count -1 downto 0 do
+ begin
+ bi := Dc.FBreakpoints[i];
+ if (h = bi.FileNameHash) and (lFileName = bi.FileName) and (Cardinal(bi.Line) = Row) then
+ begin
+ Break;
+ end;
+ Bi := nil;
+ end;
+ if bi <> nil then
+ begin
+ if @dc.FOnBreakpoint <> nil then dc.FOnBreakpoint(dc, lFileName, Position, Row, Col);
+ dc.Pause;
+ end;
+end;
+
+procedure IdleCall(Sender: TPSDebugExec);
+var
+ Dc: TPSScriptDebugger;
+begin
+ Dc := Sender.Id;
+ if @dc.FOnIdle <> nil then
+ dc.FOnIdle(DC)
+ else
+ dc.Exec.Run;
+end;
+
+procedure TPSScriptDebugger.ClearBreakPoint(const Fn: string; Line: Integer);
+var
+ h, i: Longint;
+ bi: TPSBreakPointInfo;
+begin
+ h := MakeHash(Fn);
+ for i := FBreakPoints.Count -1 downto 0 do
+ begin
+ bi := FBreakpoints[i];
+ if (h = bi.FileNameHash) and (Fn = bi.FileName) and (bi.Line = Line) then
+ begin
+ FBreakPoints.Delete(i);
+ bi.Free;
+ Break;
+ end;
+ end;
+end;
+
+procedure TPSScriptDebugger.ClearBreakPoints;
+var
+ i: Longint;
+begin
+ for i := FBreakPoints.Count -1 downto 0 do
+ TPSBreakPointInfo(FBreakPoints[i]).Free;
+ FBreakPoints.Clear;;
+end;
+
+constructor TPSScriptDebugger.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+ FBreakPoints := TIFList.Create;
+ FExec.OnSourceLine := LineInfo;
+ FExec.OnIdleCall := IdleCall;
+end;
+
+destructor TPSScriptDebugger.Destroy;
+var
+ i: Longint;
+begin
+ for i := FBreakPoints.Count -1 downto 0 do
+ begin
+ TPSBreakPointInfo(FBreakPoints[i]).Free;
+ end;
+ FBreakPoints.Free;
+ inherited Destroy;
+end;
+
+function TPSScriptDebugger.GetBreakPoint(I: Integer): TPSBreakPointInfo;
+begin
+ Result := FBreakPoints[i];
+end;
+
+function TPSScriptDebugger.GetBreakPointCount: Longint;
+begin
+ Result := FBreakPoints.Count;
+end;
+
+function TPSScriptDebugger.GetVarContents(const Name: string): string;
+var
+ i: Longint;
+ pv: PIFVariant;
+ s1, s: string;
+begin
+ s := Uppercase(Name);
+ if pos('.', s) > 0 then
+ begin
+ s1 := copy(s,1,pos('.', s) -1);
+ delete(s,1,pos('.', Name));
+ end else begin
+ s1 := s;
+ s := '';
+ end;
+ pv := nil;
+ for i := 0 to Exec.CurrentProcVars.Count -1 do
+ begin
+ if Uppercase(Exec.CurrentProcVars[i]) = s1 then
+ begin
+ pv := Exec.GetProcVar(i);
+ break;
+ end;
+ end;
+ if pv = nil then
+ begin
+ for i := 0 to Exec.CurrentProcParams.Count -1 do
+ begin
+ if Uppercase(Exec.CurrentProcParams[i]) = s1 then
+ begin
+ pv := Exec.GetProcParam(i);
+ break;
+ end;
+ end;
+ end;
+ if pv = nil then
+ begin
+ for i := 0 to Exec.GlobalVarNames.Count -1 do
+ begin
+ if Uppercase(Exec.GlobalVarNames[i]) = s1 then
+ begin
+ pv := Exec.GetGlobalVar(i);
+ break;
+ end;
+ end;
+ end;
+ if pv = nil then
+ Result := RPS_UnknownIdentifier
+ else
+ Result := PSVariantToString(NewTPSVariantIFC(pv, False), s);
+end;
+
+function TPSScriptDebugger.HasBreakPoint(const Fn: string; Line: Integer): Boolean;
+var
+ h, i: Longint;
+ bi: TPSBreakPointInfo;
+begin
+ h := MakeHash(Fn);
+ for i := FBreakPoints.Count -1 downto 0 do
+ begin
+ bi := FBreakpoints[i];
+ if (h = bi.FileNameHash) and (Fn = bi.FileName) and (bi.Line = Line) then
+ begin
+ Result := true;
+ exit;
+ end;
+ end;
+ Result := False;
+end;
+
+procedure TPSScriptDebugger.Pause;
+begin
+ if FExec.Status = isRunning then
+ FExec.Pause
+ else
+ raise Exception.Create(RPS_NotRunning);
+end;
+
+procedure TPSScriptDebugger.Resume;
+begin
+ if FExec.Status = isRunning then
+ FExec.Run
+ else
+ raise Exception.Create(RPS_NotRunning);
+end;
+
+procedure TPSScriptDebugger.SetBreakPoint(const fn: string; Line: Integer);
+var
+ i, h: Longint;
+ BI: TPSBreakPointInfo;
+begin
+ h := MakeHash(fn);
+ for i := FBreakPoints.Count -1 downto 0 do
+ begin
+ bi := FBreakpoints[i];
+ if (h = bi.FileNameHash) and (fn = bi.FileName) and (bi.Line = Line) then
+ exit;
+ end;
+ bi := TPSBreakPointInfo.Create;
+ FBreakPoints.Add(bi);
+ bi.FileName := fn;
+ bi.Line := Line;
+end;
+
+procedure TPSScriptDebugger.SetMainFileName(const Value: string);
+var
+ OldFn: string;
+ h1, h2,i: Longint;
+ bi: TPSBreakPointInfo;
+begin
+ OldFn := FMainFileName;
+ inherited SetMainFileName(Value);
+ h1 := MakeHash(OldFn);
+ h2 := MakeHash(Value);
+ if OldFn <> Value then
+ begin
+ for i := FBreakPoints.Count -1 downto 0 do
+ begin
+ bi := FBreakPoints[i];
+ if (bi.FileNameHash = h1) and (bi.FileName = OldFn) then
+ begin
+ bi.FFileNameHash := h2;
+ bi.FFileName := Value;
+ end else if (bi.FileNameHash = h2) and (bi.FileName = Value) then
+ begin
+ // It's already the new filename, that can't be right, so remove all the breakpoints there
+ FBreakPoints.Delete(i);
+ bi.Free;
+ end;
+ end;
+ end;
+end;
+
+procedure TPSScriptDebugger.StepInto;
+begin
+ if (FExec.Status = isRunning) or (FExec.Status = isLoaded) then
+ FExec.StepInto
+ else
+ raise Exception.Create(RPS_NoScript);
+end;
+
+procedure TPSScriptDebugger.StepOver;
+begin
+ if (FExec.Status = isRunning) or (FExec.Status = isLoaded) then
+ FExec.StepOver
+ else
+ raise Exception.Create(RPS_NoScript);
+end;
+
+
+
+{ TPSPluginItem }
+
+procedure TPSPluginItem.Assign(Source: TPersistent); //Birb
+begin
+ if Source is TPSPluginItem then
+ plugin:=((source as TPSPluginItem).plugin)
+ else
+ inherited;
+end;
+
+function TPSPluginItem.GetDisplayName: string;
+begin
+ if FPlugin <> nil then
+ Result := FPlugin.Name
+ else
+ Result := '';
+end;
+
+procedure TPSPluginItem.SetPlugin(const Value: TPSPlugin);
+begin
+ FPlugin := Value;
+ If Value <> nil then
+ Value.FreeNotification(TPSPlugins(Collection).FCompExec);
+ Changed(False);
+end;
+
+{ TPSPlugins }
+
+constructor TPSPlugins.Create(CE: TPSScript);
+begin
+ inherited Create(TPSPluginItem);
+ FCompExec := CE;
+end;
+
+function TPSPlugins.GetOwner: TPersistent;
+begin
+ Result := FCompExec;
+end;
+
+{ TPSBreakPointInfo }
+
+procedure TPSBreakPointInfo.SetFileName(const Value: string);
+begin
+ FFileName := Value;
+ FFileNameHash := MakeHash(Value);
+end;
+
+{ TPSCustomPlugin }
+procedure TPSCustumPlugin.CompileImport1(CompExec: TPSScript);
+begin
+ IF @FOnCompileImport1 <> nil then
+ FOnCompileImport1(CompExec)
+ else
+ inherited;
+end;
+
+procedure TPSCustumPlugin.CompileImport2(CompExec: TPSScript);
+begin
+ IF @FOnCompileImport2 <> nil then
+ FOnCompileImport2(CompExec)
+ else
+ inherited;
+end;
+
+procedure TPSCustumPlugin.CompOnUses(CompExec: TPSScript);
+begin
+ IF @FOnCompOnUses <> nil then
+ FOnCompOnUses(CompExec)
+ else
+ inherited;
+end;
+
+procedure TPSCustumPlugin.ExecImport1(CompExec: TPSScript;
+ const ri: TPSRuntimeClassImporter);
+begin
+ IF @FOnExecImport1 <> nil then
+ FOnExecImport1(CompExec, compExec.Exec, ri)
+ else
+ inherited;
+end;
+
+procedure TPSCustumPlugin.ExecImport2(CompExec: TPSScript;
+ const ri: TPSRuntimeClassImporter);
+begin
+ IF @FOnExecImport2 <> nil then
+ FOnExecImport1(CompExec, compExec.Exec, ri)
+ else
+ inherited;
+end;
+
+procedure TPSCustumPlugin.ExecOnUses(CompExec: TPSScript);
+begin
+ IF @FOnExecOnUses <> nil then
+ FOnExecOnUses(CompExec)
+ else
+ inherited;
+end;
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/uPSComponent_COM.pas b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSComponent_COM.pas
new file mode 100644
index 0000000..31c1dad
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSComponent_COM.pas
@@ -0,0 +1,38 @@
+
+unit uPSComponent_COM;
+
+interface
+uses
+ SysUtils, Classes, uPSComponent, uPSCompiler, uPSRuntime;
+type
+
+ TPSImport_ComObj = class(TPSPlugin)
+ private
+ protected
+ procedure CompileImport1(CompExec: TPSScript); override;
+ procedure ExecImport1(CompExec: TPSScript; const ri: TPSRuntimeClassImporter); override;
+ end;
+
+ TIFPS3CE_ComObj = class(TPSImport_ComObj);
+
+implementation
+uses
+ uPSC_comobj,
+ uPSR_comobj;
+
+
+{ TPSImport_ComObj }
+
+procedure TPSImport_ComObj.CompileImport1(CompExec: TPSScript);
+begin
+ SIRegister_ComObj(CompExec.Comp);
+end;
+
+
+procedure TPSImport_ComObj.ExecImport1(CompExec: TPSScript;
+ const ri: TPSRuntimeClassImporter);
+begin
+ RIRegister_ComObj(CompExec.Exec);
+end;
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/uPSComponent_Controls.pas b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSComponent_Controls.pas
new file mode 100644
index 0000000..37543f2
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSComponent_Controls.pas
@@ -0,0 +1,65 @@
+ unit uPSComponent_Controls;
+
+interface
+uses
+ SysUtils, Classes, uPSComponent, uPSCompiler, uPSRuntime;
+type
+
+ TPSImport_Controls = class(TPSPlugin)
+ private
+ FEnableStreams: Boolean;
+ FEnableGraphics: Boolean;
+ FEnableControls: Boolean;
+ protected
+ procedure CompileImport1(CompExec: TPSScript); override;
+ procedure ExecImport1(CompExec: TPSScript; const ri: TPSRuntimeClassImporter); override;
+ public
+ constructor Create(AOwner: TComponent); override;
+ published
+
+ property EnableStreams: Boolean read FEnableStreams write FEnableStreams;
+
+ property EnableGraphics: Boolean read FEnableGraphics write FEnableGraphics;
+
+ property EnableControls: Boolean read FEnableControls write FEnableControls;
+ end;
+
+ TIFPS3CE_Controls = class(TPSImport_Controls);
+
+implementation
+uses
+ uPSC_graphics,
+ uPSC_controls,
+ uPSR_graphics,
+ uPSR_controls;
+
+
+{ TPSImport_Controls }
+
+procedure TPSImport_Controls.CompileImport1(CompExec: TPSScript);
+begin
+ if FEnableGraphics then
+ SIRegister_Graphics(CompExec.Comp, FEnableStreams);
+ if FEnableControls then
+ SIRegister_Controls(CompExec.Comp);
+end;
+
+constructor TPSImport_Controls.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+ FEnableStreams := True;
+ FEnableGraphics := True;
+ FEnableControls := True;
+end;
+
+procedure TPSImport_Controls.ExecImport1(CompExec: TPSScript;
+ const ri: TPSRuntimeClassImporter);
+begin
+ if FEnableGraphics then
+ RIRegister_Graphics(ri, FEnableStreams);
+ if FEnableControls then
+ RIRegister_Controls(ri);
+end;
+
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/uPSComponent_DB.pas b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSComponent_DB.pas
new file mode 100644
index 0000000..a8557e6
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSComponent_DB.pas
@@ -0,0 +1,36 @@
+ unit uPSComponent_DB;
+
+interface
+{$I PascalScript.inc}
+uses
+ SysUtils, Classes, uPSComponent, uPSRuntime, uPSCompiler;
+type
+
+ TPSImport_DB = class(TPSPlugin)
+ protected
+ procedure CompileImport1(CompExec: TPSScript); override;
+ procedure ExecImport1(CompExec: TPSScript; const ri: TPSRuntimeClassImporter); override;
+ public
+ end;
+
+ TIFPS3CE_DB = class(TPSImport_DB);
+
+implementation
+uses
+ uPSC_DB,
+ uPSR_DB;
+
+{ TPSImport_DB }
+
+procedure TPSImport_DB.CompileImport1(CompExec: TPSScript);
+begin
+ SIRegister_DB(CompExec.Comp);
+end;
+
+procedure TPSImport_DB.ExecImport1(CompExec: TPSScript;
+ const ri: TPSRuntimeClassImporter);
+begin
+ RIRegister_DB(RI);
+end;
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/uPSComponent_Default.pas b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSComponent_Default.pas
new file mode 100644
index 0000000..09adc05
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSComponent_Default.pas
@@ -0,0 +1,81 @@
+ unit uPSComponent_Default;
+{$I PascalScript.inc}
+interface
+uses
+ SysUtils, Classes, uPSComponent, uPSCompiler, uPSRuntime;
+
+type
+
+ TPSImport_DateUtils = class(TPSPlugin)
+ protected
+ procedure CompOnUses(CompExec: TPSScript); override;
+ procedure ExecOnUses(CompExec: TPSScript); override;
+ end;
+
+ TPSImport_Classes = class(TPSPlugin)
+ private
+ FEnableStreams: Boolean;
+ FEnableClasses: Boolean;
+ protected
+ procedure CompileImport1(CompExec: TPSScript); override;
+ procedure ExecImport1(CompExec: TPSScript; const ri: TPSRuntimeClassImporter); override;
+ public
+
+ constructor Create(AOwner: TComponent); override;
+ published
+
+ property EnableStreams: Boolean read FEnableStreams write FEnableStreams;
+
+ property EnableClasses: Boolean read FEnableClasses write FEnableClasses;
+ end;
+
+ TIFPS3CE_Std = class(TPSImport_Classes);
+
+ TIFPS3CE_DateUtils = class(TPSImport_DateUtils);
+
+implementation
+uses
+ uPSC_std,
+ uPSR_std,
+ uPSC_classes,
+ uPSR_classes,
+ uPSC_dateutils,
+ uPSR_dateutils;
+
+{ TPSImport_Classes }
+
+procedure TPSImport_Classes.CompileImport1(CompExec: TPSScript);
+begin
+ SIRegister_Std(CompExec.Comp);
+ if FEnableClasses then
+ SIRegister_Classes(CompExec.Comp, FEnableStreams);
+end;
+
+procedure TPSImport_Classes.ExecImport1(CompExec: TPSScript;
+ const ri: TPSRuntimeClassImporter);
+begin
+ RIRegister_Std(Ri);
+ if FEnableClasses then
+ RIRegister_Classes(ri, FEnableStreams);
+end;
+
+constructor TPSImport_Classes.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+ FEnableStreams := True;
+ FEnableClasses := True;
+end;
+
+{ TPSImport_DateUtils }
+
+procedure TPSImport_DateUtils.CompOnUses(CompExec: TPSScript);
+begin
+ RegisterDateTimeLibrary_C(CompExec.Comp);
+end;
+
+procedure TPSImport_DateUtils.ExecOnUses(CompExec: TPSScript);
+begin
+ RegisterDateTimeLibrary_R(CompExec.Exec);
+end;
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/uPSComponent_Forms.pas b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSComponent_Forms.pas
new file mode 100644
index 0000000..8d60d5e
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSComponent_Forms.pas
@@ -0,0 +1,65 @@
+
+unit uPSComponent_Forms;
+
+interface
+uses
+ SysUtils, Classes, uPSRuntime, uPSCompiler, uPSComponent;
+type
+
+ TPSImport_Forms = class(TPSPlugin)
+ private
+ FEnableForms: Boolean;
+ FEnableMenus: Boolean;
+ protected
+ procedure CompileImport1(CompExec: TPSScript); override;
+ procedure ExecImport1(CompExec: TPSScript; const ri: TPSRuntimeClassImporter); override;
+ public
+ constructor Create(AOwner: TComponent); override;
+ published
+
+ property EnableForms: Boolean read FEnableForms write FEnableForms;
+
+ property EnableMenus: Boolean read FEnableMenus write FEnableMenus;
+ end;
+
+ TIFPS3CE_Forms = class(TPSImport_Forms);
+
+implementation
+uses
+ uPSC_forms,
+ uPSC_menus,
+ uPSR_forms,
+ uPSR_menus;
+
+{ TPSImport_Forms }
+
+procedure TPSImport_Forms.CompileImport1(CompExec: TPSScript);
+begin
+ if FEnableForms then
+ SIRegister_Forms(CompExec.comp);
+ if FEnableMenus then
+ SIRegister_Menus(CompExec.comp);
+end;
+
+constructor TPSImport_Forms.Create(AOwner: TComponent);
+begin
+ inherited Create(Aowner);
+ FEnableForms := True;
+ FEnableMenus := True;
+end;
+
+procedure TPSImport_Forms.ExecImport1(CompExec: TPSScript;
+ const ri: TPSRuntimeClassImporter);
+begin
+ if FEnableForms then
+ RIRegister_Forms(ri);
+
+ if FEnableMenus then
+ begin
+ RIRegister_Menus(ri);
+ RIRegister_Menus_Routines(compexec.Exec);
+ end;
+
+end;
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/uPSComponent_StdCtrls.pas b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSComponent_StdCtrls.pas
new file mode 100644
index 0000000..66ce95c
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSComponent_StdCtrls.pas
@@ -0,0 +1,65 @@
+
+unit uPSComponent_StdCtrls;
+
+interface
+uses
+ SysUtils, Classes, uPSComponent, uPSCompiler, uPSRuntime;
+type
+
+ TPSImport_StdCtrls = class(TPSPlugin)
+ private
+ FEnableButtons: Boolean;
+ FEnableExtCtrls: Boolean;
+ protected
+ procedure CompileImport1(CompExec: TPSScript); override;
+ procedure ExecImport1(CompExec: TPSScript; const ri: TPSRuntimeClassImporter); override;
+ public
+ constructor Create(AOwner: TComponent); override;
+ published
+
+ property EnableExtCtrls: Boolean read FEnableExtCtrls write FEnableExtCtrls;
+
+ property EnableButtons: Boolean read FEnableButtons write FEnableButtons;
+ end;
+
+ TIFPS3CE_StdCtrls = class(TPSImport_StdCtrls);
+
+
+implementation
+uses
+ uPSC_buttons,
+ uPSC_stdctrls,
+ uPSC_extctrls,
+ uPSR_buttons,
+ uPSR_stdctrls,
+ uPSR_extctrls;
+
+{ TPSImport_StdCtrls }
+
+procedure TPSImport_StdCtrls.CompileImport1(CompExec: TPSScript);
+begin
+ SIRegister_stdctrls(CompExec.Comp);
+ if FEnableExtCtrls then
+ SIRegister_ExtCtrls(CompExec.Comp);
+ if FEnableButtons then
+ SIRegister_Buttons(CompExec.Comp);
+end;
+
+constructor TPSImport_StdCtrls.Create(AOwner: TComponent);
+begin
+ inherited Create(Aowner);
+ FEnableButtons := True;
+ FEnableExtCtrls := True;
+end;
+
+procedure TPSImport_StdCtrls.ExecImport1(CompExec: TPSScript;
+ const ri: TPSRuntimeClassImporter);
+begin
+ RIRegister_stdctrls(RI);
+ if FEnableExtCtrls then
+ RIRegister_ExtCtrls(RI);
+ if FEnableButtons then
+ RIRegister_Buttons(RI);
+end;
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/uPSDebugger.pas b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSDebugger.pas
new file mode 100644
index 0000000..b9bac09
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSDebugger.pas
@@ -0,0 +1,654 @@
+
+unit uPSDebugger;
+{$I PascalScript.inc}
+interface
+uses
+ SysUtils, uPSRuntime, uPSUtils;
+
+type
+
+ TDebugMode = (dmRun
+ , dmStepOver
+ , dmStepInto
+ , dmPaused
+ );
+
+ TPSCustomDebugExec = class(TPSExec)
+ protected
+ FDebugDataForProcs: TIfList;
+ FLastProc: TPSProcRec;
+ FCurrentDebugProc: Pointer;
+ FProcNames: TIFStringList;
+ FGlobalVarNames: TIfStringList;
+ FCurrentSourcePos, FCurrentRow, FCurrentCol: Cardinal;
+ FCurrentFile: string;
+
+ function GetCurrentProcParams: TIfStringList;
+
+ function GetCurrentProcVars: TIfStringList;
+ protected
+
+ procedure ClearDebug; virtual;
+ public
+
+ function GetCurrentProcNo: Cardinal;
+
+ function GetCurrentPosition: Cardinal;
+
+ function TranslatePosition(Proc, Position: Cardinal): Cardinal;
+
+ function TranslatePositionEx(Proc, Position: Cardinal; var Pos, Row, Col: Cardinal; var Fn: string): Boolean;
+
+ procedure LoadDebugData(const Data: string);
+
+ procedure Clear; override;
+
+ property GlobalVarNames: TIfStringList read FGlobalVarNames;
+
+ property ProcNames: TIfStringList read FProcNames;
+
+ property CurrentProcVars: TIfStringList read GetCurrentProcVars;
+
+ property CurrentProcParams: TIfStringList read GetCurrentProcParams;
+
+ function GetGlobalVar(I: Cardinal): PIfVariant;
+
+ function GetProcVar(I: Cardinal): PIfVariant;
+
+ function GetProcParam(I: Cardinal): PIfVariant;
+
+ constructor Create;
+
+ destructor Destroy; override;
+ end;
+ TPSDebugExec = class;
+
+ TOnSourceLine = procedure (Sender: TPSDebugExec; const Name: string; Position, Row, Col: Cardinal);
+
+ TOnIdleCall = procedure (Sender: TPSDebugExec);
+
+ TPSDebugExec = class(TPSCustomDebugExec)
+ private
+ FDebugMode: TDebugMode;
+ FStepOverProc: TPSInternalProcRec;
+ FStepOverStackBase: Cardinal;
+ FOnIdleCall: TOnIdleCall;
+ FOnSourceLine: TOnSourceLine;
+ FDebugEnabled: Boolean;
+ protected
+
+ procedure SourceChanged;
+ procedure ClearDebug; override;
+ procedure RunLine; override;
+ public
+ constructor Create;
+
+ function LoadData(const s: string): Boolean; override;
+
+ procedure Pause; override;
+
+ procedure Run;
+
+ procedure StepInto;
+
+ procedure StepOver;
+
+ procedure Stop; override;
+
+ property DebugMode: TDebugMode read FDebugMode;
+
+ property OnSourceLine: TOnSourceLine read FOnSourceLine write FOnSourceLine;
+
+ property OnIdleCall: TOnIdleCall read FOnIdleCall write FOnIdleCall;
+
+ property DebugEnabled: Boolean read FDebugEnabled write FDebugEnabled;
+ end;
+ TIFPSDebugExec = TPSDebugExec;
+
+implementation
+
+{$IFDEF DELPHI3UP }
+resourceString
+{$ELSE }
+const
+{$ENDIF }
+
+ RPS_ExpectedReturnAddressStackBase = 'Expected return address at stack base';
+
+type
+ PPositionData = ^TPositionData;
+ TPositionData = packed record
+ FileName: string;
+ Position,
+ Row,
+ Col,
+ SourcePosition: Cardinal;
+ end;
+ PFunctionInfo = ^TFunctionInfo;
+ TFunctionInfo = packed record
+ Func: TPSProcRec;
+ FParamNames: TIfStringList;
+ FVariableNames: TIfStringList;
+ FPositionTable: TIfList;
+ end;
+
+{ TPSCustomDebugExec }
+
+procedure TPSCustomDebugExec.Clear;
+begin
+ inherited Clear;
+ if FGlobalVarNames <> nil then ClearDebug;
+end;
+
+procedure TPSCustomDebugExec.ClearDebug;
+var
+ i, j: Longint;
+ p: PFunctionInfo;
+begin
+ FCurrentDebugProc := nil;
+ FLastProc := nil;
+ FProcNames.Clear;
+ FGlobalVarNames.Clear;
+ FCurrentSourcePos := 0;
+ FCurrentRow := 0;
+ FCurrentCol := 0;
+ FCurrentFile := '';
+ for i := 0 to FDebugDataForProcs.Count -1 do
+ begin
+ p := FDebugDataForProcs[I];
+ for j := 0 to p^.FPositionTable.Count -1 do
+ begin
+ Dispose(PPositionData(P^.FPositionTable[J]));
+ end;
+ p^.FPositionTable.Free;
+ p^.FParamNames.Free;
+ p^.FVariableNames.Free;
+ Dispose(p);
+ end;
+ FDebugDataForProcs.Clear;
+end;
+
+constructor TPSCustomDebugExec.Create;
+begin
+ inherited Create;
+ FCurrentSourcePos := 0;
+ FCurrentRow := 0;
+ FCurrentCol := 0;
+ FCurrentFile := '';
+ FDebugDataForProcs := TIfList.Create;
+ FLastProc := nil;
+ FCurrentDebugProc := nil;
+ FProcNames := TIFStringList.Create;
+ FGlobalVarNames := TIfStringList.Create;
+end;
+
+destructor TPSCustomDebugExec.Destroy;
+begin
+ Clear;
+ FDebugDataForProcs.Free;
+ FProcNames.Free;
+ FGlobalVarNames.Free;
+ FGlobalVarNames := nil;
+ inherited Destroy;
+end;
+
+function TPSCustomDebugExec.GetCurrentPosition: Cardinal;
+begin
+ Result := TranslatePosition(GetCurrentProcNo, 0);
+end;
+
+function TPSCustomDebugExec.GetCurrentProcNo: Cardinal;
+var
+ i: Longint;
+begin
+ for i := 0 to FProcs.Count -1 do
+ begin
+ if FProcs[i]= FCurrProc then
+ begin
+ Result := I;
+ Exit;
+ end;
+ end;
+ Result := Cardinal(-1);
+end;
+
+function TPSCustomDebugExec.GetCurrentProcParams: TIfStringList;
+begin
+ if FCurrentDebugProc <> nil then
+ begin
+ Result := PFunctionInfo(FCurrentDebugProc)^.FParamNames;
+ end else Result := nil;
+end;
+
+function TPSCustomDebugExec.GetCurrentProcVars: TIfStringList;
+begin
+ if FCurrentDebugProc <> nil then
+ begin
+ Result := PFunctionInfo(FCurrentDebugProc)^.FVariableNames;
+ end else Result := nil;
+end;
+
+function TPSCustomDebugExec.GetGlobalVar(I: Cardinal): PIfVariant;
+begin
+ Result := FGlobalVars[I];
+end;
+
+function TPSCustomDebugExec.GetProcParam(I: Cardinal): PIfVariant;
+begin
+ Result := FStack[Cardinal(Longint(FCurrStackBase) - Longint(I) - 1)];
+end;
+
+function TPSCustomDebugExec.GetProcVar(I: Cardinal): PIfVariant;
+begin
+ Result := FStack[Cardinal(Longint(FCurrStackBase) + Longint(I) + 1)];
+end;
+
+function GetProcDebugInfo(FProcs: TIFList; Proc: TPSProcRec): PFunctionInfo;
+var
+ i: Longint;
+ c: PFunctionInfo;
+begin
+ if Proc = nil then
+ begin
+ Result := nil;
+ exit;
+ end;
+ for i := FProcs.Count -1 downto 0 do
+ begin
+ c := FProcs.Data^[I];
+ if c^.Func = Proc then
+ begin
+ Result := c;
+ exit;
+ end;
+ end;
+ new(c);
+ c^.Func := Proc;
+ c^.FPositionTable := TIfList.Create;
+ c^.FVariableNames := TIfStringList.Create;
+ c^.FParamNames := TIfStringList.Create;
+ FProcs.Add(c);
+ REsult := c;
+end;
+
+procedure TPSCustomDebugExec.LoadDebugData(const Data: string);
+var
+ CP, I: Longint;
+ c: char;
+ CurrProcNo, LastProcNo: Cardinal;
+ LastProc: PFunctionInfo;
+ NewLoc: PPositionData;
+ s: string;
+begin
+ ClearDebug;
+ if FStatus = isNotLoaded then exit;
+ CP := 1;
+ LastProcNo := Cardinal(-1);
+ LastProc := nil;
+ while CP <= length(Data) do
+ begin
+ c := Data[CP];
+ inc(cp);
+ case c of
+ #0:
+ begin
+ i := cp;
+ if i > length(data) then exit;
+ while Data[i] <> #0 do
+ begin
+ if Data[i] = #1 then
+ begin
+ FProcNames.Add(Copy(Data, cp, i-cp));
+ cp := I + 1;
+ end;
+ inc(I);
+ if I > length(data) then exit;
+ end;
+ cp := i + 1;
+ end;
+ #1:
+ begin
+ i := cp;
+ if i > length(data) then exit;
+ while Data[i] <> #0 do
+ begin
+ if Data[i] = #1 then
+ begin
+ FGlobalVarNames.Add(Copy(Data, cp, i-cp));
+ cp := I + 1;
+ end;
+ inc(I);
+ if I > length(data) then exit;
+ end;
+ cp := i + 1;
+ end;
+ #2:
+ begin
+ if cp + 4 > Length(data) then exit;
+ CurrProcNo := Cardinal((@Data[cp])^);
+ if CurrProcNo = Cardinal(-1) then Exit;
+ if CurrProcNo <> LastProcNo then
+ begin
+ LastProcNo := CurrProcNo;
+ LastProc := GetProcDebugInfo(FDebugDataForProcs, FProcs[CurrProcNo]);
+ if LastProc = nil then exit;
+ end;
+ inc(cp, 4);
+
+ i := cp;
+ if i > length(data) then exit;
+ while Data[i] <> #0 do
+ begin
+ if Data[i] = #1 then
+ begin
+ LastProc^.FParamNames.Add(Copy(Data, cp, i-cp));
+ cp := I + 1;
+ end;
+ inc(I);
+ if I > length(data) then exit;
+ end;
+ cp := i + 1;
+ end;
+ #3:
+ begin
+ if cp + 4 > Length(data) then exit;
+ CurrProcNo := Cardinal((@Data[cp])^);
+ if CurrProcNo = Cardinal(-1) then Exit;
+ if CurrProcNo <> LastProcNo then
+ begin
+ LastProcNo := CurrProcNo;
+ LastProc := GetProcDebugInfo(FDebugDataForProcs, FProcs[CurrProcNo]);
+ if LastProc = nil then exit;
+ end;
+ inc(cp, 4);
+
+ i := cp;
+ if i > length(data) then exit;
+ while Data[i] <> #0 do
+ begin
+ if Data[i] = #1 then
+ begin
+ LastProc^.FVariableNames.Add(Copy(Data, cp, i-cp));
+ cp := I + 1;
+ end;
+ inc(I);
+ if I > length(data) then exit;
+ end;
+ cp := i + 1;
+ end;
+ #4:
+ begin
+ i := cp;
+ if i > length(data) then exit;
+ while Data[i] <> #0 do
+ begin
+ if Data[i] = #1 then
+ begin
+ s := Copy(Data, cp, i-cp);
+ cp := I + 1;
+ Break;
+ end;
+ inc(I);
+ if I > length(data) then exit;
+ end;
+ if cp + 4 > Length(data) then exit;
+ CurrProcNo := Cardinal((@Data[cp])^);
+ if CurrProcNo = Cardinal(-1) then Exit;
+ if CurrProcNo <> LastProcNo then
+ begin
+ LastProcNo := CurrProcNo;
+ LastProc := GetProcDebugInfo(FDebugDataForProcs, FProcs[CurrProcNo]);
+ if LastProc = nil then exit;
+ end;
+ inc(cp, 4);
+ if cp + 16 > Length(data) then exit;
+ new(NewLoc);
+ NewLoc^.Position := Cardinal((@Data[Cp])^);
+ NewLoc^.FileName := s;
+ NewLoc^.SourcePosition := Cardinal((@Data[Cp+4])^);
+ NewLoc^.Row := Cardinal((@Data[Cp+8])^);
+ NewLoc^.Col := Cardinal((@Data[Cp+12])^);
+ inc(cp, 16);
+ LastProc^.FPositionTable.Add(NewLoc);
+ end;
+ else
+ begin
+ ClearDebug;
+ Exit;
+ end;
+ end;
+
+ end;
+end;
+
+
+
+
+
+
+function TPSCustomDebugExec.TranslatePosition(Proc, Position: Cardinal): Cardinal;
+var
+ D1, D2: Cardinal;
+ s: string;
+begin
+ if not TranslatePositionEx(Proc, Position, Result, D1, D2, s) then
+ Result := 0;
+end;
+
+function TPSCustomDebugExec.TranslatePositionEx(Proc, Position: Cardinal;
+ var Pos, Row, Col: Cardinal; var Fn: string): Boolean;
+// Made by Martijn Laan (mlaan@wintax.nl)
+var
+ i: LongInt;
+ fi: PFunctionInfo;
+ pt: TIfList;
+ r: PPositionData;
+ lastfn: string;
+ LastPos, LastRow, LastCol: Cardinal;
+ pp: TPSProcRec;
+begin
+ fi := nil;
+ pp := FProcs[Proc];
+ for i := 0 to FDebugDataForProcs.Count -1 do
+ begin
+ fi := FDebugDataForProcs[i];
+ if fi^.Func = pp then
+ Break;
+ fi := nil;
+ end;
+ LastPos := 0;
+ LastRow := 0;
+ LastCol := 0;
+ if fi <> nil then begin
+ pt := fi^.FPositionTable;
+ for i := 0 to pt.Count -1 do
+ begin
+ r := pt[I];
+ if r^.Position >= Position then
+ begin
+ if r^.Position = Position then
+ begin
+ Pos := r^.SourcePosition;
+ Row := r^.Row;
+ Col := r^.Col;
+ Fn := r^.Filename;
+ end
+ else
+ begin
+ Pos := LastPos;
+ Row := LastRow;
+ Col := LastCol;
+ Fn := LastFn;
+ end;
+ Result := True;
+ exit;
+ end else
+ begin
+ LastPos := r^.SourcePosition;
+ LastRow := r^.Row;
+ LastCol := r^.Col;
+ LastFn := r^.FileName;
+ end;
+ end;
+ Pos := LastPos;
+ Row := LastRow;
+ Col := LastCol;
+ Result := True;
+ end else
+ begin
+ Result := False;
+ end;
+end;
+
+{ TPSDebugExec }
+procedure TPSDebugExec.ClearDebug;
+begin
+ inherited;
+ FDebugMode := dmRun;
+end;
+
+function TPSDebugExec.LoadData(const s: string): Boolean;
+begin
+ Result := inherited LoadData(s);
+ FDebugMode := dmRun;
+end;
+
+procedure TPSDebugExec.RunLine;
+var
+ i: Longint;
+ pt: TIfList;
+ r: PPositionData;
+begin
+ inherited RunLine;
+ if not DebugEnabled then exit;
+ if FCurrProc <> FLastProc then
+ begin
+ FLastProc := FCurrProc;
+ FCurrentDebugProc := nil;
+ for i := 0 to FDebugDataForProcs.Count -1 do
+ begin
+ if PFunctionInfo(FDebugDataForProcs[I])^.Func = FLastProc then
+ begin
+ FCurrentDebugProc := FDebugDataForProcs[I];
+ break;
+ end;
+ end;
+ end;
+ if FCurrentDebugProc <> nil then
+ begin
+ pt := PFunctionInfo(FCurrentDebugProc)^.FPositionTable;
+ for i := 0 to pt.Count -1 do
+ begin
+ r := pt[I];
+ if r^.Position = FCurrentPosition then
+ begin
+ FCurrentSourcePos := r^.SourcePosition;
+ FCurrentRow := r^.Row;
+ FCurrentCol := r^.Col;
+ FCurrentFile := r^.FileName;
+ SourceChanged;
+ break;
+ end;
+ end;
+ end else
+ begin
+ FCurrentSourcePos := 0;
+ FCurrentRow := 0;
+ FCurrentCol := 0;
+ FCurrentFile := '';
+ end;
+ while FDebugMode = dmPaused do
+ begin
+ if @FOnIdleCall <> nil then
+ begin
+ FOnIdleCall(Self);
+ end else break; // endless loop
+ end;
+end;
+
+
+procedure TPSDebugExec.SourceChanged;
+
+ function StepOverShouldPause: Boolean;
+ var
+ I: Cardinal;
+ V: PPSVariant;
+ begin
+ if (FCurrProc <> FStepOverProc) or (FCurrStackBase <> FStepOverStackBase) then
+ begin
+ { We're not inside the function being stepped, so scan the call stack to
+ see if we're inside a function called by the function being stepped }
+ I := FCurrStackBase;
+ while Longint(I) > Longint(FStepOverStackBase) do
+ begin
+ V := FStack.Items[I];
+ if (V = nil) or (V.FType <> FReturnAddressType) then
+ raise Exception.Create(RPS_ExpectedReturnAddressStackBase);
+ if (PPSVariantReturnAddress(V).Addr.ProcNo = FStepOverProc) and
+ (PPSVariantReturnAddress(V).Addr.StackBase = FStepOverStackBase) then
+ begin
+ { We are, so don't pause }
+ Result := False;
+ Exit;
+ end;
+ I := PPSVariantReturnAddress(V).Addr.StackBase;
+ end;
+ end;
+ Result := True;
+ end;
+
+begin
+ case FDebugMode of
+ dmStepInto:
+ begin
+ FDebugMode := dmPaused;
+ end;
+ dmStepOver:
+ begin
+ if StepOverShouldPause then
+ begin
+ FDebugMode := dmPaused;
+ end;
+ end;
+ end;
+ if @FOnSourceLine <> nil then
+ FOnSourceLine(Self, FCurrentFile, FCurrentSourcePos, FCurrentRow, FCurrentCol);
+end;
+
+
+procedure TPSDebugExec.Pause;
+begin
+ FDebugMode := dmPaused;
+end;
+
+procedure TPSDebugExec.Stop;
+begin
+ FDebugMode := dmRun;
+ inherited Stop;
+end;
+
+procedure TPSDebugExec.Run;
+begin
+ FDebugMode := dmRun;
+end;
+
+procedure TPSDebugExec.StepInto;
+begin
+ FDebugMode := dmStepInto;
+end;
+
+procedure TPSDebugExec.StepOver;
+begin
+ FStepOverProc := FCurrProc;
+ FStepOverStackBase := FCurrStackBase;
+ FDebugMode := dmStepOver;
+end;
+
+
+constructor TPSDebugExec.Create;
+begin
+ inherited Create;
+ FDebugEnabled := True;
+end;
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/uPSDisassembly.pas b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSDisassembly.pas
new file mode 100644
index 0000000..8be685c
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSDisassembly.pas
@@ -0,0 +1,499 @@
+
+
+unit uPSDisassembly;
+{$I PascalScript.inc}
+
+interface
+uses
+ uPSRuntime, uPSUtils, sysutils;
+
+function IFPS3DataToText(const Input: string; var Output: string): Boolean;
+implementation
+
+type
+ TMyPSExec = class(TPSExec)
+ function ImportProc(const Name: ShortString; proc: TIFExternalProcRec): Boolean; override;
+ end;
+
+function Debug2Str(const s: string): string;
+var
+ i: Integer;
+begin
+ result := '';
+ for i := 1 to length(s) do
+ begin
+ if (s[i] < #32) or (s[i] > #128) then
+ result := result + '\'+inttohex(ord(s[i]), 2)
+ else if s[i] = '\' then
+ result := result + '\\'
+ else
+ result := result + s[i];
+ end;
+
+end;
+
+function SpecImportProc(Sender: TObject; p: TIFExternalProcRec): Boolean; forward;
+
+function FloatToStr(Value: Extended): string;
+begin
+ try
+ Result := SysUtils.FloatToStr(Value);
+ except
+ Result := 'NaNa';
+ end;
+end;
+
+
+function IFPS3DataToText(const Input: string; var Output: string): Boolean;
+var
+ I: TMyPSExec;
+
+ procedure Writeln(const s: string);
+ begin
+ Output := Output + s + #13#10;
+ end;
+ function BT2S(P: PIFTypeRec): string;
+ var
+ i: Longint;
+ begin
+ case p.BaseType of
+ btU8: Result := 'U8';
+ btS8: Result := 'S8';
+ btU16: Result := 'U16';
+ btS16: Result := 'S16';
+ btU32: Result := 'U32';
+ btS32: Result := 'S32';
+ {$IFNDEF PS_NOINT64}bts64: Result := 'S64'; {$ENDIF}
+ btChar: Result := 'Char';
+ {$IFNDEF PS_NOWIDESTRING}
+ btWideChar: Result := 'WideChar';
+ btWideString: Result := 'WideString';
+ {$ENDIF}
+ btSet: Result := 'Set';
+ btSingle: Result := 'Single';
+ btDouble: Result := 'Double';
+ btExtended: Result := 'Extended';
+ btString: Result := 'String';
+ btRecord:
+ begin
+ Result := 'Record(';
+ for i := 0 to TPSTypeRec_Record(p).FieldTypes.Count-1 do
+ begin
+ if i <> 0 then Result := Result+',';
+ Result := Result + BT2S(PIFTypeRec(TPSTypeRec_Record(p).FieldTypes[i]));
+ end;
+ Result := Result + ')';
+ end;
+ btArray: Result := 'Array of '+BT2S(TPSTypeRec_Array(p).ArrayType);
+ btResourcePointer: Result := 'ResourcePointer';
+ btPointer: Result := 'Pointer';
+ btVariant: Result := 'Variant';
+ btClass: Result := 'Class';
+ btProcPtr: Result := 'ProcPtr';
+ btStaticArray: Result := 'StaticArray['+inttostR(TPSTypeRec_StaticArray(p).Size)+'] of '+BT2S(TPSTypeRec_Array(p).ArrayType);
+ else
+ Result := 'Unknown '+inttostr(p.BaseType);
+ end;
+ end;
+ procedure WriteTypes;
+ var
+ T: Longint;
+ begin
+ Writeln('[TYPES]');
+ for T := 0 to i.FTypes.Count -1 do
+ begin
+ if PIFTypeRec(i.FTypes[t]).ExportName <> '' then
+ Writeln('Type ['+inttostr(t)+']: '+bt2s(PIFTypeRec(i.FTypes[t]))+' Export: '+PIFTypeRec(i.FTypes[t]).ExportName)
+ else
+ Writeln('Type ['+inttostr(t)+']: '+bt2s(PIFTypeRec(i.FTypes[t])));
+ end;
+ end;
+ procedure WriteVars;
+ var
+ T: Longint;
+ function FindType(p: Pointer): Cardinal;
+ var
+ T: Longint;
+ begin
+ Result := Cardinal(-1);
+ for T := 0 to i.FTypes.Count -1 do
+ begin
+ if p = i.FTypes[t] then begin
+ result := t;
+ exit;
+ end;
+ end;
+ end;
+ begin
+ Writeln('[VARS]');
+ for t := 0 to i.FGlobalVars.count -1 do
+ begin
+ Writeln('Var ['+inttostr(t)+']: '+ IntToStr(FindType(PIFVariant(i.FGlobalVars[t])^.FType)) + ' '+ bt2s(PIFVariant(i.FGlobalVars[t])^.Ftype) + ' '+ PIFVariant(i.FGlobalVars[t])^.Ftype.ExportName);
+ end;
+ end;
+
+ procedure WriteProcs;
+ var
+ t: Longint;
+ procedure WriteProc(proc: TPSProcRec);
+ var
+ sc, CP: Cardinal;
+ function ReadData(var Data; Len: Cardinal): Boolean;
+ begin
+ if CP + Len <= TPSInternalProcRec(PROC).Length then begin
+ Move(TPSInternalProcRec(Proc).Data[CP], Data, Len);
+ CP := CP + Len;
+ Result := True;
+ end else Result := False;
+ end;
+ function ReadByte(var B: Byte): Boolean;
+ begin
+ if CP < TPSInternalProcRec(Proc).Length then begin
+ b := TPSInternalProcRec(Proc).Data^[cp];
+ Inc(CP);
+ Result := True;
+ end else Result := False;
+ end;
+
+ function ReadLong(var B: Cardinal): Boolean;
+ begin
+ if CP + 3 < TPSInternalProcRec(Proc).Length then begin
+ b := Cardinal((@TPSInternalProcRec(Proc).Data[CP])^);
+ Inc(CP, 4);
+ Result := True;
+ end else Result := False;
+ end;
+ function ReadWriteVariable: string;
+ var
+ VarType: byte;
+ L1, L2: Cardinal;
+ function ReadVar(FType: Cardinal): string;
+ var
+ F: PIFTypeRec;
+ b: byte;
+ w: word;
+ l: Cardinal;
+ {$IFNDEF PS_NOINT64}ff: Int64;{$ENDIF}
+ e: extended;
+ ss: single;
+ d: double;
+ s: string;
+ c: char;
+ {$IFNDEF PS_NOWIDESTRING}
+ wc: WideChar;
+ ws: WideString;
+ {$ENDIF}
+
+ begin
+ result := '';
+ F:= i.FTypes[Ftype];
+ if f = nil then exit;
+ case f.BaseType of
+ btProcPtr: begin if not ReadData(l, 4) then exit; Result := 'PROC: '+inttostr(l); end;
+ btU8: begin if not ReadData(b, 1) then exit; Result := IntToStr(tbtu8(B)); end;
+ btS8: begin if not ReadData(b, 1) then exit; Result := IntToStr(tbts8(B)); end;
+ btU16: begin if not ReadData(w, 2) then exit; Result := IntToStr(tbtu16(w)); end;
+ btS16: begin if not ReadData(w, 2) then exit; Result := IntToStr(tbts16(w)); end;
+ btU32: begin if not ReadData(l, 4) then exit; Result := IntToStr(tbtu32(l)); end;
+ btS32: begin if not ReadData(l, 4) then exit; Result := IntToStr(tbts32(l)); end;
+ {$IFNDEF PS_NOINT64}bts64: begin if not ReadData(ff, 8) then exit; Result := IntToStr(ff); end;{$ENDIF}
+ btSingle: begin if not ReadData(ss, Sizeof(tbtsingle)) then exit; Result := FloatToStr(ss); end;
+ btDouble: begin if not ReadData(d, Sizeof(tbtdouble)) then exit; Result := FloatToStr(d); end;
+ btExtended: begin if not ReadData(e, Sizeof(tbtextended)) then exit; Result := FloatToStr(e); end;
+ btPChar, btString: begin if not ReadData(l, 4) then exit; SetLength(s, l); if not readData(s[1], l) then exit; Result := MakeString(s); end;
+ btSet:
+ begin
+ SetLength(s, TPSTypeRec_Set(f).aByteSize);
+ if not ReadData(s[1], length(s)) then exit;
+ result := MakeString(s);
+
+ end;
+ btChar: begin if not ReadData(c, 1) then exit; Result := '#'+IntToStr(ord(c)); end;
+ {$IFNDEF PS_NOWIDESTRING}
+ btWideChar: begin if not ReadData(wc, 2) then exit; Result := '#'+IntToStr(ord(wc)); end;
+ btWideString: begin if not ReadData(l, 4) then exit; SetLength(ws, l); if not readData(ws[1], l*2) then exit; Result := MakeWString(ws); end;
+ {$ENDIF}
+ end;
+ end;
+ function AddressToStr(a: Cardinal): string;
+ begin
+ if a < PSAddrNegativeStackStart then
+ Result := 'GlobalVar['+inttostr(a)+']'
+ else
+ Result := 'Base['+inttostr(Longint(A-PSAddrStackStart))+']';
+ end;
+
+ begin
+ Result := '';
+ if not ReadByte(VarType) then Exit;
+ case VarType of
+ 0:
+ begin
+
+ if not ReadLong(L1) then Exit;
+ Result := AddressToStr(L1);
+ end;
+ 1:
+ begin
+ if not ReadLong(L1) then Exit;
+ Result := '['+ReadVar(l1)+']';
+ end;
+ 2:
+ begin
+ if not ReadLong(L1) then Exit;
+ if not ReadLong(L2) then Exit;
+ Result := AddressToStr(L1)+'.['+inttostr(l2)+']';
+ end;
+ 3:
+ begin
+ if not ReadLong(l1) then Exit;
+ if not ReadLong(l2) then Exit;
+ Result := AddressToStr(L1)+'.'+AddressToStr(l2);
+ end;
+ end;
+ end;
+
+ var
+ b: Byte;
+ s: string;
+ DP, D1, D2, d3, d4: Cardinal;
+
+ begin
+ CP := 0;
+ sc := 0;
+ while true do
+ begin
+ DP := cp;
+ if not ReadByte(b) then Exit;
+ case b of
+ CM_A:
+ begin
+ {$IFDEF FPC}
+ Output := Output + ' ['+inttostr(dp)+'] ASSIGN '+ ReadWriteVariable;
+ Output := Output + ', ' + ReadWriteVariable + #13#10;
+ {$ELSE}
+ Writeln(' ['+inttostr(dp)+'] ASSIGN '+ReadWriteVariable+ ', ' + ReadWriteVariable);
+ {$ENDIF}
+ end;
+ CM_CA:
+ begin
+ if not ReadByte(b) then exit;
+ case b of
+ 0: s:= '+';
+ 1: s := '-';
+ 2: s := '*';
+ 3: s:= '/';
+ 4: s:= 'MOD';
+ 5: s:= 'SHL';
+ 6: s:= 'SHR';
+ 7: s:= 'AND';
+ 8: s:= 'OR';
+ 9: s:= 'XOR';
+ else
+ exit;
+ end;
+ Writeln(' ['+inttostr(dp)+'] CALC '+ReadWriteVariable+ ' '+s+' ' + ReadWriteVariable);
+ end;
+ CM_P:
+ begin
+ Inc(sc);
+ Writeln(' ['+inttostr(dp)+'] PUSH '+ReadWriteVariable + ' // '+inttostr(sc));
+ end;
+ CM_PV:
+ begin
+ Inc(sc);
+ Writeln(' ['+inttostr(dp)+'] PUSHVAR '+ReadWriteVariable + ' // '+inttostr(sc));
+ end;
+ CM_PO:
+ begin
+ Dec(Sc);
+ Writeln(' ['+inttostr(dp)+'] POP // '+inttostr(sc));
+ end;
+ Cm_C:
+ begin
+ if not ReadLong(D1) then exit;
+ Writeln(' ['+inttostr(dp)+'] CALL '+inttostr(d1));
+ end;
+ Cm_PG:
+ begin
+ if not ReadLong(D1) then exit;
+ Writeln(' ['+inttostr(dp)+'] POP/GOTO currpos + '+IntToStr(d1)+' ['+IntToStr(CP+d1)+']');
+ end;
+ Cm_P2G:
+ begin
+ if not ReadLong(D1) then exit;
+ Writeln(' ['+inttostr(dp)+'] POP2/GOTO currpos + '+IntToStr(d1)+' ['+IntToStr(CP+d1)+']');
+ end;
+ Cm_G:
+ begin
+ if not ReadLong(D1) then exit;
+ Writeln(' ['+inttostr(dp)+'] GOTO currpos + '+IntToStr(d1)+' ['+IntToStr(CP+d1)+']');
+ end;
+ Cm_CG:
+ begin
+ if not ReadLong(D1) then exit;
+ Writeln(' ['+inttostr(dp)+'] COND_GOTO currpos + '+IntToStr(d1)+' '+ReadWriteVariable+' ['+IntToStr(CP+d1)+']');
+ end;
+ Cm_CNG:
+ begin
+ if not ReadLong(D1) then exit;
+ Writeln(' ['+inttostr(dp)+'] COND_NOT_GOTO currpos + '+IntToStr(d1)+' '+ReadWriteVariable+' ['+IntToStr(CP+d1)+']');
+ end;
+ Cm_R: Writeln(' ['+inttostr(dp)+'] RET');
+ Cm_ST:
+ begin
+ if not ReadLong(d1) or not readLong(d2) then exit;
+ Writeln(' ['+inttostr(dp)+'] SETSTACKTYPE Base['+inttostr(d1)+'] '+inttostr(d2));
+ end;
+ Cm_Pt:
+ begin
+ Inc(sc);
+ if not ReadLong(D1) then exit;
+ Writeln(' ['+inttostr(dp)+'] PUSHTYPE '+inttostr(d1) + '('+BT2S(TPSTypeRec(I.FTypes[d1]))+') // '+inttostr(sc));
+ end;
+ CM_CO:
+ begin
+ if not readByte(b) then exit;
+ case b of
+ 0: s := '>=';
+ 1: s := '<=';
+ 2: s := '>';
+ 3: s := '<';
+ 4: s := '<>';
+ 5: s := '=';
+ else exit;
+ end;
+ Writeln(' ['+inttostr(dp)+'] COMPARE into '+ReadWriteVariable+': '+ReadWriteVariable+' '+s+' '+ReadWriteVariable);
+ end;
+ Cm_cv:
+ begin
+ Writeln(' ['+inttostr(dp)+'] CALLVAR '+ReadWriteVariable);
+ end;
+ Cm_inc:
+ begin
+ Writeln(' ['+inttostr(dp)+'] INC '+ReadWriteVariable);
+ end;
+ Cm_dec:
+ begin
+ Writeln(' ['+inttostr(dp)+'] DEC '+ReadWriteVariable);
+ end;
+ cm_sp:
+ begin
+ Writeln(' ['+inttostr(dp)+'] SETPOINTER '+ReadWriteVariable+': '+ReadWriteVariable);
+ end;
+ cm_spc:
+ begin
+ Writeln(' ['+inttostr(dp)+'] SETCOPYPOINTER '+ReadWriteVariable+': '+ReadWriteVariable);
+ end;
+ cm_in:
+ begin
+ Writeln(' ['+inttostr(dp)+'] INOT '+ReadWriteVariable);
+ end;
+ cm_bn:
+ begin
+ Writeln(' ['+inttostr(dp)+'] BNOT '+ReadWriteVariable);
+ end;
+ cm_vm:
+ begin
+ Writeln(' ['+inttostr(dp)+'] MINUS '+ReadWriteVariable);
+ end;
+ cm_sf:
+ begin
+ s := ReadWriteVariable;
+ if not ReadByte(b) then exit;
+ if b = 0 then
+ Writeln(' ['+inttostr(dp)+'] SETFLAG '+s)
+ else
+ Writeln(' ['+inttostr(dp)+'] SETFLAG NOT '+s);
+ end;
+ cm_fg:
+ begin
+ if not ReadLong(D1) then exit;
+ Writeln(' ['+inttostr(dp)+'] FLAGGOTO currpos + '+IntToStr(d1)+' ['+IntToStr(CP+d1)+']');
+ end;
+ cm_puexh:
+ begin
+ if not ReadLong(D1) then exit;
+ if not ReadLong(D2) then exit;
+ if not ReadLong(D3) then exit;
+ if not ReadLong(D4) then exit;
+ Writeln(' ['+inttostr(dp)+'] PUSHEXCEPTION '+inttostr(d1)+' '+inttostr(d2)+' '+inttostr(d3)+' '+inttostr(d4));
+ end;
+ cm_poexh:
+ begin
+ if not ReadByte(b) then exit;
+ Writeln(' ['+inttostr(dp)+'] POPEXCEPTION '+inttostr(b));
+ end;
+ else
+ begin
+ Writeln(' Disasm Error');
+ Break;
+ end;
+ end;
+ end;
+ end;
+
+ begin
+ Writeln('[PROCS]');
+ for t := 0 to i.FProcs.Count -1 do
+ begin
+ if TPSProcRec(i.FProcs[t]).ClassType = TIFExternalProcRec then
+ begin
+ if TPSExternalProcRec(i.FProcs[t]). Decl = '' then
+ Writeln('Proc ['+inttostr(t)+']: External: '+TPSExternalProcRec(i.FProcs[t]).Name)
+ else
+ Writeln('Proc ['+inttostr(t)+']: External Decl: '+Debug2Str(TIFExternalProcRec(i.FProcs[t]).Decl) + ' ' + TIFExternalProcRec(i.FProcs[t]).Name);
+ end else begin
+ if TPSInternalProcRec(i.FProcs[t]).ExportName <> '' then
+ begin
+ Writeln('Proc ['+inttostr(t)+'] Export: '+TPSInternalProcRec(i.FProcs[t]).ExportName+' '+TPSInternalProcRec(i.FProcs[t]).ExportDecl);
+ end else
+ Writeln('Proc ['+inttostr(t)+']');
+ Writeproc(i.FProcs[t]);
+ end;
+ end;
+ end;
+
+begin
+ Result := False;
+ try
+ I := TMyPSExec.Create;
+ I.AddSpecialProcImport('', @SpecImportProc, nil);
+
+ if not I.LoadData(Input) then begin
+ I.Free;
+ Exit;
+ end;
+ Output := '';
+ WriteTypes;
+ WriteVars;
+ WriteProcs;
+ I.Free;
+ except
+ exit;
+ end;
+ result := true;
+end;
+
+{ TMyIFPSExec }
+
+function MyDummyProc(Caller: TPSExec; p: TIFExternalProcRec; Global, Stack: TPSStack): Boolean;
+begin
+ Result := False;
+end;
+
+
+function TMyPSExec.ImportProc(const Name: ShortString;
+ proc: TIFExternalProcRec): Boolean;
+begin
+ Proc.ProcPtr := MyDummyProc;
+ result := true;
+end;
+
+function SpecImportProc(Sender: TObject; p: TIFExternalProcRec): Boolean;
+begin
+ p.ProcPtr := MyDummyProc;
+ Result := True;
+end;
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/uPSPreProcessor.pas b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSPreProcessor.pas
new file mode 100644
index 0000000..b886648
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSPreProcessor.pas
@@ -0,0 +1,776 @@
+
+unit uPSPreProcessor;
+{$I PascalScript.inc}
+
+interface
+uses
+ Classes, SysUtils, uPSCompiler, uPSUtils;
+
+
+
+type
+ EPSPreProcessor = class(Exception); //- jgv
+ TPSPreProcessor = class;
+ TPSPascalPreProcessorParser = class;
+
+ TPSOnNeedFile = function (Sender: TPSPreProcessor; const callingfilename: string; var FileName, Output: string): Boolean;
+ TPSOnProcessDirective = procedure (
+ Sender: TPSPreProcessor;
+ Parser: TPSPascalPreProcessorParser;
+ const Active: Boolean;
+ const DirectiveName, DirectiveParam: String;
+ Var Continue: Boolean); //- jgv - application set continue to false to stop the normal directive processing
+
+ TPSLineInfo = class(TObject)
+ private
+ function GetLineOffset(I: Integer): Cardinal;
+ function GetLineOffsetCount: Longint;
+ protected
+ FEndPos: Cardinal;
+ FStartPos: Cardinal;
+ FFileName: string;
+ FLineOffsets: TIfList;
+ public
+
+ property FileName: string read FFileName;
+
+ property StartPos: Cardinal read FStartPos;
+
+ property EndPos: Cardinal read FEndPos;
+
+ property LineOffsetCount: Longint read GetLineOffsetCount;
+
+ property LineOffset[I: Longint]: Cardinal read GetLineOffset;
+
+
+ constructor Create;
+
+ destructor Destroy; override;
+ end;
+
+ TPSLineInfoResults = record
+
+ Row,
+ Col,
+ Pos: Cardinal;
+
+ Name: string;
+ end;
+
+ TPSLineInfoList = class(TObject)
+ private
+ FItems: TIfList;
+ FCurrent: Longint;
+ function GetCount: Longint;
+ function GetItem(I: Integer): TPSLineInfo;
+ protected
+
+ function Add: TPSLineInfo;
+ public
+
+ property Count: Longint read GetCount;
+
+ property Items[I: Longint]: TPSLineInfo read GetItem; default;
+
+ procedure Clear;
+
+ function GetLineInfo(Pos: Cardinal; var Res: TPSLineInfoResults): Boolean;
+
+ property Current: Longint read FCurrent write FCurrent;
+
+
+ constructor Create;
+
+ destructor Destroy; override;
+ end;
+ TPSDefineStates = class;
+
+ TPSPreProcessor = class(TObject)
+ private
+ FID: Pointer;
+ FCurrentDefines, FDefines: TStringList;
+ FCurrentLineInfo: TPSLineInfoList;
+ FOnNeedFile: TPSOnNeedFile;
+ FAddedPosition: Cardinal;
+ FDefineState: TPSDefineStates;
+ FMaxLevel: Longint;
+ FMainFileName: string;
+ FMainFile: string;
+ FOnProcessDirective: TPSOnProcessDirective;
+ FOnProcessUnknowDirective: TPSOnProcessDirective;
+ procedure ParserNewLine(Sender: TPSPascalPreProcessorParser; Row, Col, Pos: Cardinal);
+ procedure IntPreProcess(Level: Integer; const OrgFileName: string; FileName: string; Dest: TStream);
+ protected
+ procedure doAddStdPredefines; virtual; // jgv
+ public
+ {The maximum number of levels deep the parser will go, defaults to 20}
+ property MaxLevel: Longint read FMaxLevel write FMaxLevel;
+ property CurrentLineInfo: TPSLineInfoList read FCurrentLineInfo;
+
+ property OnNeedFile: TPSOnNeedFile read FOnNeedFile write FOnNeedFile;
+
+ property Defines: TStringList read FDefines write FDefines;
+
+ property MainFile: string read FMainFile write FMainFile;
+
+ property MainFileName: string read FMainFileName write FMainFileName;
+
+ property ID: Pointer read FID write FID;
+
+ procedure AdjustMessages(Comp: TPSPascalCompiler);
+ procedure AdjustMessage(Msg: TPSPascalCompilerMessage); //-jgv
+
+ procedure PreProcess(const Filename: string; var Output: string);
+
+ procedure Clear;
+
+
+ constructor Create;
+
+ destructor Destroy; override;
+
+ property OnProcessDirective: TPSOnProcessDirective read fOnProcessDirective write fOnProcessDirective;
+ property OnProcessUnknowDirective: TPSOnProcessDirective read fOnProcessUnknowDirective write fOnProcessUnknowDirective;
+ end;
+
+ TPSPascalPreProcessorType = (ptEOF, ptOther, ptDefine);
+
+ TPSOnNewLine = procedure (Sender: TPSPascalPreProcessorParser; Row, Col, Pos: Cardinal) of object;
+
+ TPSPascalPreProcessorParser = class(TObject)
+ private
+ FData: string;
+ FText: Pchar;
+ FToken: string;
+ FTokenId: TPSPascalPreProcessorType;
+ FLastEnterPos, FLen, FRow, FCol, FPos: Cardinal;
+ FOnNewLine: TPSOnNewLine;
+ public
+
+ procedure SetText(const dta: string);
+
+ procedure Next;
+
+ property Token: string read FToken;
+
+ property TokenId: TPSPascalPreProcessorType read FTokenId;
+
+ property Row: Cardinal read FRow;
+
+ property Col: Cardinal read FCol;
+
+ property Pos: Cardinal read FPos;
+
+ property OnNewLine: TPSOnNewLine read FOnNewLine write FOnNewLine;
+ end;
+
+ TPSDefineState = class(TObject)
+ private
+ FInElse: Boolean;
+ FDoWrite: Boolean;
+ public
+
+ property InElse: Boolean read FInElse write FInElse;
+
+ property DoWrite: Boolean read FDoWrite write FDoWrite;
+ end;
+
+ TPSDefineStates = class(TObject)
+ private
+ FItems: TIfList;
+ function GetCount: Longint;
+ function GetItem(I: Integer): TPSDefineState;
+ function GetWrite: Boolean;
+ public
+
+ property Count: Longint read GetCount;
+
+ property Item[I: Longint]: TPSDefineState read GetItem; default;
+
+ function Add: TPSDefineState;
+
+ procedure Delete(I: Longint);
+
+
+ constructor Create;
+
+ destructor Destroy; override;
+
+ procedure Clear;
+
+ property DoWrite: Boolean read GetWrite;
+ end;
+
+implementation
+
+{$IFDEF DELPHI3UP }
+resourceString
+{$ELSE }
+const
+{$ENDIF }
+
+ RPS_TooManyNestedInclude = 'Too many nested include files while processing ''%s'' from ''%s''';
+ RPS_IncludeNotFound = 'Unable to find file ''%s'' used from ''%s''';
+ RPS_DefineTooManyParameters = 'Too many parameters at %d:%d';
+ RPS_NoIfdefForEndif = 'No IFDEF for ENDIF at %d:%d';
+ RPS_NoIfdefForElse = 'No IFDEF for ELSE at %d:%d';
+ RPS_ElseTwice = 'Can''t use ELSE twice at %d:%d';
+ RPS_UnknownCompilerDirective = 'Unknown compiler directives at %d:%d';
+ RPs_DefineNotClosed = 'Define not closed';
+
+{ TPSLineInfoList }
+
+function TPSLineInfoList.Add: TPSLineInfo;
+begin
+ Result := TPSLineInfo.Create;
+ FItems.Add(Result);
+end;
+
+procedure TPSLineInfoList.Clear;
+var
+ i: Longint;
+begin
+ for i := FItems.count -1 downto 0 do
+ TPSLineInfo(FItems[i]).Free;
+ FItems.Clear;
+end;
+
+constructor TPSLineInfoList.Create;
+begin
+ inherited Create;
+ FItems := TIfList.Create;
+end;
+
+destructor TPSLineInfoList.Destroy;
+begin
+ Clear;
+ FItems.Free;
+ inherited Destroy;
+end;
+
+function TPSLineInfoList.GetCount: Longint;
+begin
+ Result := FItems.Count;
+end;
+
+function TPSLineInfoList.GetItem(I: Integer): TPSLineInfo;
+begin
+ Result := TPSLineInfo(FItems[i]);
+end;
+
+function TPSLineInfoList.GetLineInfo(Pos: Cardinal; var Res: TPSLineInfoResults): Boolean;
+var
+ i,j: Longint;
+ linepos: Cardinal;
+ Item: TPSLineInfo;
+begin
+ for i := FItems.Count -1 downto 0 do
+ begin
+ Item := FItems[i];
+ if (Pos >= Item.StartPos) and (Pos < Item.EndPos) then
+ begin
+ Res.Name := Item.FileName;
+ Pos := Pos - Item.StartPos;
+ Res.Pos := Pos;
+ Res.Col := 1;
+ Res.Row := 1;
+ LinePos := 0;
+ for j := 0 to Item.LineOffsetCount -1 do
+ begin
+ if Pos >= Item.LineOffset[j] then
+ begin
+ linepos := Item.LineOffset[j];
+ end else
+ begin
+ Res.Row := j; // j -1, but line counting starts at 1
+ Res.Col := pos - linepos + 1;
+ Break;
+ end;
+ end;
+ Result := True;
+ exit;
+ end;
+ end;
+ Result := False;
+end;
+
+{ TPSLineInfo }
+
+constructor TPSLineInfo.Create;
+begin
+ inherited Create;
+ FLineOffsets := TIfList.Create;
+end;
+
+destructor TPSLineInfo.Destroy;
+begin
+ FLineOffsets.Free;
+ inherited Destroy;
+end;
+
+
+function TPSLineInfo.GetLineOffset(I: Integer): Cardinal;
+begin
+ Result := Longint(FLineOffsets[I]);
+end;
+
+function TPSLineInfo.GetLineOffsetCount: Longint;
+begin
+ result := FLineOffsets.Count;
+end;
+
+{ TPSPascalPreProcessorParser }
+
+procedure TPSPascalPreProcessorParser.Next;
+var
+ ci: Cardinal;
+
+begin
+ FPos := FPos + FLen;
+ case FText[FPos] of
+ #0:
+ begin
+ FLen := 0;
+ FTokenId := ptEof;
+ end;
+ '''':
+ begin
+ ci := FPos;
+ while (FText[ci] <> #0) do
+ begin
+ Inc(ci);
+ while FText[ci] = '''' do
+ begin
+ if FText[ci+1] <> '''' then Break;
+ inc(ci);
+ inc(ci);
+ end;
+ if FText[ci] = '''' then Break;
+ if FText[ci] = #13 then
+ begin
+ inc(FRow);
+ if FText[ci] = #10 then
+ inc(ci);
+ FLastEnterPos := ci -1;
+ if @FOnNewLine <> nil then FOnNewLine(Self, FRow, FPos - FLastEnterPos + 1, ci+1);
+ end else if FText[ci] = #10 then
+ begin
+ inc(FRow);
+ FLastEnterPos := ci -1;
+ if @FOnNewLine <> nil then FOnNewLine(Self, FRow, FPos - FLastEnterPos + 1, ci+1);
+ end;
+ end;
+ FLen := ci - FPos + 1;
+ FTokenId := ptOther;
+ end;
+ '(':
+ begin
+ if FText[FPos + 1] = '*' then
+ begin
+ ci := FPos + 1;
+ while (FText[ci] <> #0) do begin
+ if (FText[ci] = '*') and (FText[ci + 1] = ')') then
+ Break;
+ if FText[ci] = #13 then
+ begin
+ inc(FRow);
+ if FText[ci+1] = #10 then
+ inc(ci);
+ FLastEnterPos := ci -1;
+ if @FOnNewLine <> nil then FOnNewLine(Self, FRow, FPos - FLastEnterPos + 1, ci+1);
+ end else if FText[ci] = #10 then
+ begin
+ inc(FRow);
+ FLastEnterPos := ci -1;
+ if @FOnNewLine <> nil then FOnNewLine(Self, FRow, FPos - FLastEnterPos + 1, ci+1);
+ end;
+ Inc(ci);
+ end;
+ FTokenId := ptOther;
+ if (FText[ci] <> #0) then
+ Inc(ci, 2);
+ FLen := ci - FPos;
+ end
+ else
+ begin
+ FTokenId := ptOther;
+ FLen := 1;
+ end;
+ end;
+ '/':
+ begin
+ if FText[FPos + 1] = '/' then
+ begin
+ ci := FPos + 1;
+ while (FText[ci] <> #0) and (FText[ci] <> #13) and
+ (FText[ci] <> #10) do begin
+ Inc(ci);
+ end;
+ FTokenId := ptOther;
+ FLen := ci - FPos;
+ end else
+ begin
+ FTokenId := ptOther;
+ FLen := 1;
+ end;
+ end;
+ '{':
+ begin
+ ci := FPos + 1;
+ while (FText[ci] <> #0) and (FText[ci] <> '}') do begin
+ if FText[ci] = #13 then
+ begin
+ inc(FRow);
+ if FText[ci+1] = #10 then
+ inc(ci);
+ FLastEnterPos := ci - 1;
+ if @FOnNewLine <> nil then FOnNewLine(Self, FRow, FPos - FLastEnterPos + 1, ci+1);
+ end else if FText[ci] = #10 then
+ begin
+ inc(FRow);
+ FLastEnterPos := ci - 1;
+ if @FOnNewLine <> nil then FOnNewLine(Self, FRow, FPos - FLastEnterPos + 1, ci+1);
+ end;
+ Inc(ci);
+ end;
+ if FText[FPos + 1] = '$' then
+ FTokenId := ptDefine
+ else
+ FTokenId := ptOther;
+
+ FLen := ci - FPos + 1;
+ end;
+ else
+ begin
+ ci := FPos + 1;
+ while not (FText[ci] in [#0,'{', '(', '''', '/']) do
+ begin
+ if FText[ci] = #13 then
+ begin
+ inc(FRow);
+ if FText[ci+1] = #10 then
+ inc(ci);
+ FLastEnterPos := ci - 1;
+ if @FOnNewLine <> nil then FOnNewLine(Self, FRow, FPos - FLastEnterPos + 1, ci+1);
+ end else if FText[ci] = #10 then
+ begin
+ inc(FRow);
+ FLastEnterPos := ci -1 ;
+ if @FOnNewLine <> nil then FOnNewLine(Self, FRow, FPos - FLastEnterPos + 1, ci+1);
+ end;
+ Inc(Ci);
+ end;
+ FTokenId := ptOther;
+ FLen := ci - FPos;
+ end;
+ end;
+ FCol := FPos - FLastEnterPos + 1;
+ FToken := Copy(FData, FPos +1, FLen);
+end;
+
+procedure TPSPascalPreProcessorParser.SetText(const dta: string);
+begin
+ FData := dta;
+ FText := pchar(FData);
+ FLen := 0;
+ FPos := 0;
+ FCol := 1;
+ FLastEnterPos := 0;
+ FRow := 1;
+ if @FOnNewLine <> nil then FOnNewLine(Self, 1, 1, 0);
+ Next;
+end;
+
+{ TPSPreProcessor }
+
+procedure TPSPreProcessor.AdjustMessage(Msg: TPSPascalCompilerMessage);
+var
+ Res: TPSLineInfoResults;
+begin
+ if CurrentLineInfo.GetLineInfo(Msg.Pos, Res) then
+ begin
+ Msg.SetCustomPos(res.Pos, Res.Row, Res.Col);
+ Msg.ModuleName := Res.Name;
+ end;
+end;
+
+procedure TPSPreProcessor.AdjustMessages(Comp: TPSPascalCompiler);
+var
+ i: Longint;
+begin
+ for i := 0 to Comp.MsgCount -1 do
+ AdjustMessage (Comp.Msg[i]);
+end;
+
+procedure TPSPreProcessor.Clear;
+begin
+ FDefineState.Clear;
+ FDefines.Clear;
+ FCurrentDefines.Clear;
+ FCurrentLineInfo.Clear;
+ FMainFile := '';
+end;
+
+constructor TPSPreProcessor.Create;
+begin
+ inherited Create;
+ FDefines := TStringList.Create;
+ FCurrentLineInfo := TPSLineInfoList.Create;
+ FCurrentDefines := TStringList.Create;
+ FDefines.Duplicates := dupIgnore;
+ FCurrentDefines.Duplicates := dupIgnore;
+ FDefineState := TPSDefineStates.Create;
+ FMaxLevel := 20;
+
+ doAddStdPredefines;
+end;
+
+destructor TPSPreProcessor.Destroy;
+begin
+ FDefineState.Free;
+ FCurrentDefines.Free;
+ FDefines.Free;
+ FCurrentLineInfo.Free;
+ inherited Destroy;
+end;
+
+procedure TPSPreProcessor.doAddStdPredefines;
+begin
+ //--- 20050708_jgv
+ FCurrentDefines.Add (Format ('VER%d', [PSCurrentBuildNo]));
+ {$IFDEF CPU386 }
+ FCurrentDefines.Add ('CPU386');
+ {$ENDIF }
+ {$IFDEF MSWINDOWS }
+ FCurrentDefines.Add ('MSWINDOWS');
+ FCurrentDefines.Add ('WIN32');
+ {$ENDIF }
+ {$IFDEF LINUX }
+ FCurrentDefines.Add ('LINUX');
+ {$ENDIF }
+end;
+
+procedure TPSPreProcessor.IntPreProcess(Level: Integer; const OrgFileName: string; FileName: string; Dest: TStream);
+var
+ Parser: TPSPascalPreProcessorParser;
+ dta: string;
+ item: TPSLineInfo;
+ s, name: string;
+ current, i: Longint;
+ ds: TPSDefineState;
+ AppContinue: Boolean;
+begin
+ if Level > MaxLevel then raise EPSPreProcessor.CreateFmt(RPS_TooManyNestedInclude, [FileName, OrgFileName]);
+ Parser := TPSPascalPreProcessorParser.Create;
+ try
+ Parser.OnNewLine := ParserNewLine;
+ if FileName = MainFileName then
+ begin
+ dta := MainFile;
+ end else
+ if (@OnNeedFile = nil) or (not OnNeedFile(Self, OrgFileName, FileName, dta)) then
+ raise EPSPreProcessor.CreateFmt(RPS_IncludeNotFound, [FileName, OrgFileName]);
+ Item := FCurrentLineInfo.Add;
+ current := FCurrentLineInfo.Count -1;
+ FCurrentLineInfo.Current := current;
+ Item.FStartPos := Dest.Position;
+ Item.FFileName := FileName;
+ Parser.SetText(dta);
+ while Parser.TokenId <> ptEOF do
+ begin
+ s := Parser.Token;
+ if Parser.TokenId = ptDefine then
+ begin
+ Delete(s,1,2); // delete the {$
+ Delete(s,length(s), 1); // delete the }
+
+ //-- 20050707_jgv trim right
+ i := length (s);
+ while (i > 0) and (s[i] = ' ') do begin
+ Delete (s, i, 1);
+ Dec (i);
+ end;
+ //-- end_jgv
+
+ if pos(' ', s) = 0 then
+ begin
+ name := uppercase(s);
+ s := '';
+ end else
+ begin
+ Name := uppercase(copy(s,1,pos(' ', s)-1));
+ Delete(s, 1, pos(' ', s));
+ end;
+
+ //-- 20050707_jgv - ask the application
+ AppContinue := True;
+ If @OnProcessDirective <> Nil then OnProcessDirective (Self, Parser, FDefineState.DoWrite, name, s, AppContinue);
+
+ If AppContinue then
+ //-- end jgv
+
+ if (Name = 'I') or (Name = 'INCLUDE') then
+ begin
+ if FDefineState.DoWrite then
+ begin
+ FAddedPosition := 0;
+ IntPreProcess(Level +1, FileName, s, Dest);
+ FCurrentLineInfo.Current := current;
+ FAddedPosition := Cardinal(Dest.Position) - Item.StartPos - Parser.Pos;
+ end;
+ end else if (Name = 'DEFINE') then
+ begin
+ if FDefineState.DoWrite then
+ begin
+ if pos(' ', s) <> 0 then raise EPSPreProcessor.CreateFmt(RPS_DefineTooManyParameters, [Parser.Row, Parser.Col]);
+ FCurrentDefines.Add(Uppercase(S));
+ end;
+ end else if (Name = 'UNDEF') then
+ begin
+ if FDefineState.DoWrite then
+ begin
+ if pos(' ', s) <> 0 then raise EPSPreProcessor.CreateFmt(RPS_DefineTooManyParameters, [Parser.Row, Parser.Col]);
+ i := FCurrentDefines.IndexOf(Uppercase(s));
+ if i <> -1 then
+ FCurrentDefines.Delete(i);
+ end;
+ end else if (Name = 'IFDEF') then
+ begin
+ if pos(' ', s) <> 0 then raise EPSPreProcessor.CreateFmt(RPS_DefineTooManyParameters, [Parser.Row, Parser.Col]);
+ FDefineState.Add.DoWrite := FCurrentDefines.IndexOf(Uppercase(s)) <> -1;
+ end else if (Name = 'IFNDEF') then
+ begin
+ if pos(' ', s) <> 0 then raise EPSPreProcessor.CreateFmt(RPS_DefineTooManyParameters, [Parser.Row, Parser.Col]);
+ FDefineState.Add.DoWrite := FCurrentDefines.IndexOf(Uppercase(s)) = -1;
+ end else if (Name = 'ENDIF') then
+ begin
+ //- jgv remove - borland use it (sysutils.pas)
+ //- if s <> '' then raise EPSPreProcessor.CreateFmt(RPS_DefineTooManyParameters, [Parser.Row, Parser.Col]);
+ if FDefineState.Count = 0 then
+ raise EPSPreProcessor.CreateFmt(RPS_NoIfdefForEndif, [Parser.Row, Parser.Col]);
+ FDefineState.Delete(FDefineState.Count -1); // remove define from list
+ end else if (Name = 'ELSE') then
+ begin
+ if s<> '' then raise EPSPreProcessor.CreateFmt(RPS_DefineTooManyParameters, [Parser.Row, Parser.Col]);
+ if FDefineState.Count = 0 then
+ raise EPSPreProcessor.CreateFmt(RPS_NoIfdefForElse, [Parser.Row, Parser.Col]);
+ ds := FDefineState[FDefineState.Count -1];
+ if ds.InElse then
+ raise EPSPreProcessor.CreateFmt(RPS_ElseTwice, [Parser.Row, Parser.Col]);
+ ds.FInElse := True;
+ ds.DoWrite := not ds.DoWrite;
+ end
+
+ //-- 20050710_jgv custom application error process
+ else begin
+ If @OnProcessUnknowDirective <> Nil then begin
+ OnProcessUnknowDirective (Self, Parser, FDefineState.DoWrite, name, s, AppContinue);
+ end;
+ If AppContinue then
+ //-- end jgv
+
+ raise EPSPreProcessor.CreateFmt(RPS_UnknownCompilerDirective, [Parser.Row, Parser.Col]);
+ end;
+ end;
+
+ if (not FDefineState.DoWrite) or (Parser.TokenId = ptDefine) then
+ begin
+ SetLength(s, Length(Parser.Token));
+ for i := length(s) downto 1 do
+ s[i] := #32; // space
+ end;
+ Dest.Write(s[1], length(s));
+ Parser.Next;
+ end;
+ Item.FEndPos := Dest.Position;
+ finally
+ Parser.Free;
+ end;
+end;
+
+procedure TPSPreProcessor.ParserNewLine(Sender: TPSPascalPreProcessorParser; Row, Col, Pos: Cardinal);
+begin
+ if FCurrentLineInfo.Current >= FCurrentLineInfo.Count then exit; //errr ???
+ with FCurrentLineInfo.Items[FCurrentLineInfo.Current] do
+ begin
+ Pos := Pos + FAddedPosition;
+ FLineOffsets.Add(Pointer(Pos));
+ end;
+end;
+
+procedure TPSPreProcessor.PreProcess(const Filename: string; var Output: string);
+var
+ Stream: TMemoryStream;
+begin
+ FAddedPosition := 0;
+ FCurrentDefines.Assign(FDefines);
+ Stream := TMemoryStream.Create;
+ try
+ IntPreProcess(0, '', FileName, Stream);
+ Stream.Position := 0;
+ SetLength(Output, Stream.Size);
+ Stream.Read(Output[1], Length(Output));
+ finally
+ Stream.Free;
+ end;
+ if FDefineState.Count <> 0 then
+ raise EPSPreProcessor.Create(RPs_DefineNotClosed);
+end;
+
+{ TPSDefineStates }
+
+function TPSDefineStates.Add: TPSDefineState;
+begin
+ Result := TPSDefineState.Create;
+ FItems.Add(Result);
+end;
+
+procedure TPSDefineStates.Clear;
+var
+ i: Longint;
+begin
+ for i := Longint(FItems.Count) -1 downto 0 do
+ TPSDefineState(FItems[i]).Free;
+ FItems.Clear;
+end;
+
+constructor TPSDefineStates.Create;
+begin
+ inherited Create;
+ FItems := TIfList.Create;
+end;
+
+procedure TPSDefineStates.Delete(I: Integer);
+begin
+ TPSDefineState(FItems[i]).Free;
+ FItems.Delete(i);
+end;
+
+destructor TPSDefineStates.Destroy;
+var
+ i: Longint;
+begin
+ for i := Longint(FItems.Count) -1 downto 0 do
+ TPSDefineState(FItems[i]).Free;
+ FItems.Free;
+ inherited Destroy;
+end;
+
+function TPSDefineStates.GetCount: Longint;
+begin
+ Result := FItems.Count;
+end;
+
+function TPSDefineStates.GetItem(I: Integer): TPSDefineState;
+begin
+ Result := FItems[i];
+end;
+
+function TPSDefineStates.GetWrite: Boolean;
+begin
+ if FItems.Count = 0 then
+ result := true
+ else Result := TPSDefineState(FItems[FItems.Count -1]).DoWrite;
+end;
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/uPSR_DB.pas b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSR_DB.pas
new file mode 100644
index 0000000..187f45e
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSR_DB.pas
@@ -0,0 +1,2070 @@
+{runtime DB support}
+Unit uPSR_DB;
+{$I PascalScript.inc}
+Interface
+Uses uPSRuntime;
+
+procedure RIRegisterTDATASET(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTPARAMS(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTPARAM(Cl: TPSRuntimeClassImporter);
+
+{$IFNDEF FPC}
+procedure RIRegisterTGUIDFIELD(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTVARIANTFIELD(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTREFERENCEFIELD(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTDATASETFIELD(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTARRAYFIELD(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTADTFIELD(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTOBJECTFIELD(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTWIDESTRINGFIELD(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTFIELDLIST(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTFIELDDEFLIST(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTFLATLIST(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTDEFCOLLECTION(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTNAMEDITEM(Cl: TPSRuntimeClassImporter);
+
+{$IFDEF DELPHI6UP}
+procedure RIRegisterTFMTBCDFIELD(Cl: TPSRuntimeClassImporter);
+{$ENDIF}
+procedure RIRegisterTBCDFIELD(Cl: TPSRuntimeClassImporter);
+
+{$ENDIF}
+
+procedure RIRegisterTGRAPHICFIELD(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTMEMOFIELD(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTBLOBFIELD(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTVARBYTESFIELD(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTBYTESFIELD(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTBINARYFIELD(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTTIMEFIELD(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTDATEFIELD(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTDATETIMEFIELD(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTBOOLEANFIELD(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTCURRENCYFIELD(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTFLOATFIELD(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTAUTOINCFIELD(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTWORDFIELD(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTLARGEINTFIELD(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTSMALLINTFIELD(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTINTEGERFIELD(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTNUMERICFIELD(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTSTRINGFIELD(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTFIELD(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTLOOKUPLIST(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTFIELDS(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTINDEXDEFS(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTINDEXDEF(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTFIELDDEFS(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTFIELDDEF(Cl: TPSRuntimeClassImporter);
+procedure RIRegister_DB(CL: TPSRuntimeClassImporter);
+
+implementation
+Uses DB, {$IFDEF DELPHI6UP}{$IFNDEF FPC}FMTBcd, MaskUtils,{$ENDIF}{$ENDIF}Classes;
+
+procedure TDATASETONPOSTERROR_W(Self: TDATASET; const T: TDATASETERROREVENT);
+begin Self.ONPOSTERROR := T; end;
+
+procedure TDATASETONPOSTERROR_R(Self: TDATASET; var T: TDATASETERROREVENT);
+begin T := Self.ONPOSTERROR; end;
+
+procedure TDATASETONNEWRECORD_W(Self: TDATASET; const T: TDATASETNOTIFYEVENT);
+begin Self.ONNEWRECORD := T; end;
+
+procedure TDATASETONNEWRECORD_R(Self: TDATASET; var T: TDATASETNOTIFYEVENT);
+begin T := Self.ONNEWRECORD; end;
+
+procedure TDATASETONFILTERRECORD_W(Self: TDATASET; const T: TFILTERRECORDEVENT);
+begin Self.ONFILTERRECORD := T; end;
+
+procedure TDATASETONFILTERRECORD_R(Self: TDATASET; var T: TFILTERRECORDEVENT);
+begin T := Self.ONFILTERRECORD; end;
+
+procedure TDATASETONEDITERROR_W(Self: TDATASET; const T: TDATASETERROREVENT);
+begin Self.ONEDITERROR := T; end;
+
+procedure TDATASETONEDITERROR_R(Self: TDATASET; var T: TDATASETERROREVENT);
+begin T := Self.ONEDITERROR; end;
+
+procedure TDATASETONDELETEERROR_W(Self: TDATASET; const T: TDATASETERROREVENT);
+begin Self.ONDELETEERROR := T; end;
+
+procedure TDATASETONDELETEERROR_R(Self: TDATASET; var T: TDATASETERROREVENT);
+begin T := Self.ONDELETEERROR; end;
+
+procedure TDATASETONCALCFIELDS_W(Self: TDATASET; const T: TDATASETNOTIFYEVENT);
+begin Self.ONCALCFIELDS := T; end;
+
+procedure TDATASETONCALCFIELDS_R(Self: TDATASET; var T: TDATASETNOTIFYEVENT);
+begin T := Self.ONCALCFIELDS; end;
+
+{$IFNDEF FPC}
+procedure TDATASETAFTERREFRESH_W(Self: TDATASET; const T: TDATASETNOTIFYEVENT);
+begin Self.AFTERREFRESH := T; end;
+
+procedure TDATASETAFTERREFRESH_R(Self: TDATASET; var T: TDATASETNOTIFYEVENT);
+begin T := Self.AFTERREFRESH; end;
+
+procedure TDATASETBEFOREREFRESH_W(Self: TDATASET; const T: TDATASETNOTIFYEVENT);
+begin Self.BEFOREREFRESH := T; end;
+
+procedure TDATASETBEFOREREFRESH_R(Self: TDATASET; var T: TDATASETNOTIFYEVENT);
+begin T := Self.BEFOREREFRESH; end;
+
+{$ENDIF}
+
+procedure TDATASETAFTERSCROLL_W(Self: TDATASET; const T: TDATASETNOTIFYEVENT);
+begin Self.AFTERSCROLL := T; end;
+
+procedure TDATASETAFTERSCROLL_R(Self: TDATASET; var T: TDATASETNOTIFYEVENT);
+begin T := Self.AFTERSCROLL; end;
+
+procedure TDATASETBEFORESCROLL_W(Self: TDATASET; const T: TDATASETNOTIFYEVENT);
+begin Self.BEFORESCROLL := T; end;
+
+procedure TDATASETBEFORESCROLL_R(Self: TDATASET; var T: TDATASETNOTIFYEVENT);
+begin T := Self.BEFORESCROLL; end;
+
+procedure TDATASETAFTERDELETE_W(Self: TDATASET; const T: TDATASETNOTIFYEVENT);
+begin Self.AFTERDELETE := T; end;
+
+procedure TDATASETAFTERDELETE_R(Self: TDATASET; var T: TDATASETNOTIFYEVENT);
+begin T := Self.AFTERDELETE; end;
+
+procedure TDATASETBEFOREDELETE_W(Self: TDATASET; const T: TDATASETNOTIFYEVENT);
+begin Self.BEFOREDELETE := T; end;
+
+procedure TDATASETBEFOREDELETE_R(Self: TDATASET; var T: TDATASETNOTIFYEVENT);
+begin T := Self.BEFOREDELETE; end;
+
+procedure TDATASETAFTERCANCEL_W(Self: TDATASET; const T: TDATASETNOTIFYEVENT);
+begin Self.AFTERCANCEL := T; end;
+
+procedure TDATASETAFTERCANCEL_R(Self: TDATASET; var T: TDATASETNOTIFYEVENT);
+begin T := Self.AFTERCANCEL; end;
+
+procedure TDATASETBEFORECANCEL_W(Self: TDATASET; const T: TDATASETNOTIFYEVENT);
+begin Self.BEFORECANCEL := T; end;
+
+procedure TDATASETBEFORECANCEL_R(Self: TDATASET; var T: TDATASETNOTIFYEVENT);
+begin T := Self.BEFORECANCEL; end;
+
+procedure TDATASETAFTERPOST_W(Self: TDATASET; const T: TDATASETNOTIFYEVENT);
+begin Self.AFTERPOST := T; end;
+
+procedure TDATASETAFTERPOST_R(Self: TDATASET; var T: TDATASETNOTIFYEVENT);
+begin T := Self.AFTERPOST; end;
+
+procedure TDATASETBEFOREPOST_W(Self: TDATASET; const T: TDATASETNOTIFYEVENT);
+begin Self.BEFOREPOST := T; end;
+
+procedure TDATASETBEFOREPOST_R(Self: TDATASET; var T: TDATASETNOTIFYEVENT);
+begin T := Self.BEFOREPOST; end;
+
+procedure TDATASETAFTEREDIT_W(Self: TDATASET; const T: TDATASETNOTIFYEVENT);
+begin Self.AFTEREDIT := T; end;
+
+procedure TDATASETAFTEREDIT_R(Self: TDATASET; var T: TDATASETNOTIFYEVENT);
+begin T := Self.AFTEREDIT; end;
+
+procedure TDATASETBEFOREEDIT_W(Self: TDATASET; const T: TDATASETNOTIFYEVENT);
+begin Self.BEFOREEDIT := T; end;
+
+procedure TDATASETBEFOREEDIT_R(Self: TDATASET; var T: TDATASETNOTIFYEVENT);
+begin T := Self.BEFOREEDIT; end;
+
+procedure TDATASETAFTERINSERT_W(Self: TDATASET; const T: TDATASETNOTIFYEVENT);
+begin Self.AFTERINSERT := T; end;
+
+procedure TDATASETAFTERINSERT_R(Self: TDATASET; var T: TDATASETNOTIFYEVENT);
+begin T := Self.AFTERINSERT; end;
+
+procedure TDATASETBEFOREINSERT_W(Self: TDATASET; const T: TDATASETNOTIFYEVENT);
+begin Self.BEFOREINSERT := T; end;
+
+procedure TDATASETBEFOREINSERT_R(Self: TDATASET; var T: TDATASETNOTIFYEVENT);
+begin T := Self.BEFOREINSERT; end;
+
+procedure TDATASETAFTERCLOSE_W(Self: TDATASET; const T: TDATASETNOTIFYEVENT);
+begin Self.AFTERCLOSE := T; end;
+
+procedure TDATASETAFTERCLOSE_R(Self: TDATASET; var T: TDATASETNOTIFYEVENT);
+begin T := Self.AFTERCLOSE; end;
+
+procedure TDATASETBEFORECLOSE_W(Self: TDATASET; const T: TDATASETNOTIFYEVENT);
+begin Self.BEFORECLOSE := T; end;
+
+procedure TDATASETBEFORECLOSE_R(Self: TDATASET; var T: TDATASETNOTIFYEVENT);
+begin T := Self.BEFORECLOSE; end;
+
+procedure TDATASETAFTEROPEN_W(Self: TDATASET; const T: TDATASETNOTIFYEVENT);
+begin Self.AFTEROPEN := T; end;
+
+procedure TDATASETAFTEROPEN_R(Self: TDATASET; var T: TDATASETNOTIFYEVENT);
+begin T := Self.AFTEROPEN; end;
+
+procedure TDATASETBEFOREOPEN_W(Self: TDATASET; const T: TDATASETNOTIFYEVENT);
+begin Self.BEFOREOPEN := T; end;
+
+procedure TDATASETBEFOREOPEN_R(Self: TDATASET; var T: TDATASETNOTIFYEVENT);
+begin T := Self.BEFOREOPEN; end;
+
+procedure TDATASETAUTOCALCFIELDS_W(Self: TDATASET; const T: BOOLEAN);
+begin Self.AUTOCALCFIELDS := T; end;
+
+procedure TDATASETAUTOCALCFIELDS_R(Self: TDATASET; var T: BOOLEAN);
+begin T := Self.AUTOCALCFIELDS; end;
+
+procedure TDATASETACTIVE_W(Self: TDATASET; const T: BOOLEAN);
+begin Self.ACTIVE := T; end;
+
+procedure TDATASETACTIVE_R(Self: TDATASET; var T: BOOLEAN);
+begin T := Self.ACTIVE; end;
+
+procedure TDATASETFILTEROPTIONS_W(Self: TDATASET; const T: TFILTEROPTIONS);
+begin Self.FILTEROPTIONS := T; end;
+
+procedure TDATASETFILTEROPTIONS_R(Self: TDATASET; var T: TFILTEROPTIONS);
+begin T := Self.FILTEROPTIONS; end;
+
+procedure TDATASETFILTERED_W(Self: TDATASET; const T: BOOLEAN);
+begin Self.FILTERED := T; end;
+
+procedure TDATASETFILTERED_R(Self: TDATASET; var T: BOOLEAN);
+begin T := Self.FILTERED; end;
+
+procedure TDATASETFILTER_W(Self: TDATASET; const T: STRING);
+begin Self.FILTER := T; end;
+
+procedure TDATASETFILTER_R(Self: TDATASET; var T: STRING);
+begin T := Self.FILTER; end;
+
+procedure TDATASETSTATE_R(Self: TDATASET; var T: TDATASETSTATE);
+begin T := Self.STATE; end;
+
+{$IFNDEF FPC}
+procedure TDATASETSPARSEARRAYS_W(Self: TDATASET; const T: BOOLEAN);
+begin Self.SPARSEARRAYS := T; end;
+
+procedure TDATASETSPARSEARRAYS_R(Self: TDATASET; var T: BOOLEAN);
+begin T := Self.SPARSEARRAYS; end;
+{$ENDIF}
+
+procedure TDATASETRECORDSIZE_R(Self: TDATASET; var T: WORD);
+begin T := Self.RECORDSIZE; end;
+
+procedure TDATASETRECNO_W(Self: TDATASET; const T: INTEGER);
+begin Self.RECNO := T; end;
+
+procedure TDATASETRECNO_R(Self: TDATASET; var T: INTEGER);
+begin T := Self.RECNO; end;
+
+procedure TDATASETRECORDCOUNT_R(Self: TDATASET; var T: INTEGER);
+begin T := Self.RECORDCOUNT; end;
+
+{$IFNDEF FPC}
+procedure TDATASETOBJECTVIEW_W(Self: TDATASET; const T: BOOLEAN);
+begin Self.OBJECTVIEW := T; end;
+
+procedure TDATASETOBJECTVIEW_R(Self: TDATASET; var T: BOOLEAN);
+begin T := Self.OBJECTVIEW; end;
+{$ENDIF}
+
+procedure TDATASETMODIFIED_R(Self: TDATASET; var T: BOOLEAN);
+begin T := Self.MODIFIED; end;
+
+{$IFDEF DELPHI6UP}
+procedure TDATASETISUNIDIRECTIONAL_R(Self: TDATASET; var T: BOOLEAN);
+begin T := Self.ISUNIDIRECTIONAL; end;
+{$ENDIF}
+
+procedure TDATASETFOUND_R(Self: TDATASET; var T: BOOLEAN);
+begin T := Self.FOUND; end;
+
+procedure TDATASETFIELDVALUES_W(Self: TDATASET; const T: VARIANT; const t1: STRING);
+begin Self.FIELDVALUES[t1] := T; end;
+
+procedure TDATASETFIELDVALUES_R(Self: TDATASET; var T: VARIANT; const t1: STRING);
+begin T := Self.FIELDVALUES[t1]; end;
+
+procedure TDATASETFIELDS_R(Self: TDATASET; var T: TFIELDS);
+begin T := Self.FIELDS; end;
+
+{$IFNDEF FPC}
+
+procedure TDATASETFIELDLIST_R(Self: TDATASET; var T: TFIELDLIST);
+begin T := Self.FIELDLIST; end;
+
+
+procedure TDATASETFIELDDEFLIST_R(Self: TDATASET; var T: TFIELDDEFLIST);
+begin T := Self.FIELDDEFLIST; end;
+
+procedure TDATASETFIELDDEFS_W(Self: TDATASET; const T: TFIELDDEFS);
+begin Self.FIELDDEFS := T; end;
+
+procedure TDATASETFIELDDEFS_R(Self: TDATASET; var T: TFIELDDEFS);
+begin T := Self.FIELDDEFS; end;
+
+procedure TDATASETBLOCKREADSIZE_W(Self: TDATASET; const T: INTEGER);
+begin Self.BLOCKREADSIZE := T; end;
+
+procedure TDATASETBLOCKREADSIZE_R(Self: TDATASET; var T: INTEGER);
+begin T := Self.BLOCKREADSIZE; end;
+
+procedure TDATASETDESIGNER_R(Self: TDATASET; var T: TDATASETDESIGNER);
+begin T := Self.DESIGNER; end;
+
+
+procedure TDATASETDATASETFIELD_W(Self: TDATASET; const T: TDATASETFIELD);
+begin Self.DATASETFIELD := T; end;
+
+
+
+procedure TDATASETDATASETFIELD_R(Self: TDATASET; var T: TDATASETFIELD);
+begin T := Self.DATASETFIELD; end;
+
+
+procedure TDATASETAGGFIELDS_R(Self: TDATASET; var T: TFIELDS);
+begin T := Self.AGGFIELDS; end;
+
+
+
+{$ENDIF}
+
+procedure TDATASETFIELDCOUNT_R(Self: TDATASET; var T: INTEGER);
+begin T := Self.FIELDCOUNT; end;
+
+
+procedure TDATASETEOF_R(Self: TDATASET; var T: BOOLEAN);
+begin T := Self.EOF; end;
+
+procedure TDATASETDEFAULTFIELDS_R(Self: TDATASET; var T: BOOLEAN);
+begin T := Self.DEFAULTFIELDS; end;
+
+procedure TDATASETDATASOURCE_R(Self: TDATASET; var T: TDATASOURCE);
+begin T := Self.DATASOURCE; end;
+
+
+
+procedure TDATASETCANMODIFY_R(Self: TDATASET; var T: BOOLEAN);
+begin T := Self.CANMODIFY; end;
+
+//procedure TDATASETBOOKMARK_W(Self: TDATASET; const T: TBOOKMARKSTR);
+//begin Self.BOOKMARK := T; end;
+
+//procedure TDATASETBOOKMARK_R(Self: TDATASET; var T: TBOOKMARKSTR);
+//begin T := Self.BOOKMARK; end;
+
+procedure TDATASETBOF_R(Self: TDATASET; var T: BOOLEAN);
+begin T := Self.BOF; end;
+
+procedure TPARAMSPARAMVALUES_W(Self: TPARAMS; const T: VARIANT; const t1: STRING);
+begin Self.PARAMVALUES[t1] := T; end;
+
+procedure TPARAMSPARAMVALUES_R(Self: TPARAMS; var T: VARIANT; const t1: STRING);
+begin T := Self.PARAMVALUES[t1]; end;
+
+procedure TPARAMSITEMS_W(Self: TPARAMS; const T: TPARAM; const t1: INTEGER);
+begin Self.ITEMS[t1] := T; end;
+
+procedure TPARAMSITEMS_R(Self: TPARAMS; var T: TPARAM; const t1: INTEGER);
+begin T := Self.ITEMS[t1]; end;
+
+procedure TPARAMVALUE_W(Self: TPARAM; const T: VARIANT);
+begin Self.VALUE := T; end;
+
+procedure TPARAMVALUE_R(Self: TPARAM; var T: VARIANT);
+begin T := Self.VALUE; end;
+
+
+{$IFDEF DELPHI6UP}
+procedure TPARAMSIZE_W(Self: TPARAM; const T: INTEGER);
+begin Self.SIZE := T; end;
+
+procedure TPARAMSIZE_R(Self: TPARAM; var T: INTEGER);
+begin T := Self.SIZE; end;
+{$ENDIF}
+
+procedure TPARAMPARAMTYPE_W(Self: TPARAM; const T: TPARAMTYPE);
+begin Self.PARAMTYPE := T; end;
+
+procedure TPARAMPARAMTYPE_R(Self: TPARAM; var T: TPARAMTYPE);
+begin T := Self.PARAMTYPE; end;
+
+procedure TPARAMNAME_W(Self: TPARAM; const T: STRING);
+begin Self.NAME := T; end;
+
+procedure TPARAMNAME_R(Self: TPARAM; var T: STRING);
+begin T := Self.NAME; end;
+
+{$IFDEF DELPHI6UP}
+procedure TPARAMNUMERICSCALE_W(Self: TPARAM; const T: INTEGER);
+begin Self.NUMERICSCALE := T; end;
+
+procedure TPARAMNUMERICSCALE_R(Self: TPARAM; var T: INTEGER);
+begin T := Self.NUMERICSCALE; end;
+{$ENDIF}
+{$IFDEF DELPHI6UP}
+
+procedure TPARAMPRECISION_W(Self: TPARAM; const T: INTEGER);
+begin Self.PRECISION := T; end;
+
+procedure TPARAMPRECISION_R(Self: TPARAM; var T: INTEGER);
+begin T := Self.PRECISION; end;
+{$ENDIF}
+procedure TPARAMDATATYPE_W(Self: TPARAM; const T: TFIELDTYPE);
+begin Self.DATATYPE := T; end;
+
+procedure TPARAMDATATYPE_R(Self: TPARAM; var T: TFIELDTYPE);
+begin T := Self.DATATYPE; end;
+
+procedure TPARAMTEXT_W(Self: TPARAM; const T: STRING);
+begin Self.TEXT := T; end;
+
+procedure TPARAMTEXT_R(Self: TPARAM; var T: STRING);
+begin T := Self.TEXT; end;
+
+procedure TPARAMNATIVESTR_W(Self: TPARAM; const T: STRING);
+begin Self.NATIVESTR := T; end;
+
+procedure TPARAMNATIVESTR_R(Self: TPARAM; var T: STRING);
+begin T := Self.NATIVESTR; end;
+
+procedure TPARAMISNULL_R(Self: TPARAM; var T: BOOLEAN);
+begin T := Self.ISNULL; end;
+
+procedure TPARAMBOUND_W(Self: TPARAM; const T: BOOLEAN);
+begin Self.BOUND := T; end;
+
+procedure TPARAMBOUND_R(Self: TPARAM; var T: BOOLEAN);
+begin T := Self.BOUND; end;
+
+procedure TPARAMASWORD_W(Self: TPARAM; const T: LONGINT);
+begin Self.ASWORD := T; end;
+
+procedure TPARAMASWORD_R(Self: TPARAM; var T: LONGINT);
+begin T := Self.ASWORD; end;
+
+procedure TPARAMASTIME_W(Self: TPARAM; const T: TDATETIME);
+begin Self.ASTIME := T; end;
+
+procedure TPARAMASTIME_R(Self: TPARAM; var T: TDATETIME);
+begin T := Self.ASTIME; end;
+
+procedure TPARAMASSTRING_W(Self: TPARAM; const T: STRING);
+begin Self.ASSTRING := T; end;
+
+procedure TPARAMASSTRING_R(Self: TPARAM; var T: STRING);
+begin T := Self.ASSTRING; end;
+
+procedure TPARAMASMEMO_W(Self: TPARAM; const T: STRING);
+begin Self.ASMEMO := T; end;
+
+procedure TPARAMASMEMO_R(Self: TPARAM; var T: STRING);
+begin T := Self.ASMEMO; end;
+
+procedure TPARAMASSMALLINT_W(Self: TPARAM; const T: LONGINT);
+begin Self.ASSMALLINT := T; end;
+
+procedure TPARAMASSMALLINT_R(Self: TPARAM; var T: LONGINT);
+begin T := Self.ASSMALLINT; end;
+
+procedure TPARAMASINTEGER_W(Self: TPARAM; const T: LONGINT);
+begin Self.ASINTEGER := T; end;
+
+procedure TPARAMASINTEGER_R(Self: TPARAM; var T: LONGINT);
+begin T := Self.ASINTEGER; end;
+
+procedure TPARAMASFLOAT_W(Self: TPARAM; const T: DOUBLE);
+begin Self.ASFLOAT := T; end;
+
+procedure TPARAMASFLOAT_R(Self: TPARAM; var T: DOUBLE);
+begin T := Self.ASFLOAT; end;
+
+procedure TPARAMASDATETIME_W(Self: TPARAM; const T: TDATETIME);
+begin Self.ASDATETIME := T; end;
+
+procedure TPARAMASDATETIME_R(Self: TPARAM; var T: TDATETIME);
+begin T := Self.ASDATETIME; end;
+
+procedure TPARAMASDATE_W(Self: TPARAM; const T: TDATETIME);
+begin Self.ASDATE := T; end;
+
+procedure TPARAMASDATE_R(Self: TPARAM; var T: TDATETIME);
+begin T := Self.ASDATE; end;
+
+procedure TPARAMASCURRENCY_W(Self: TPARAM; const T: CURRENCY);
+begin Self.ASCURRENCY := T; end;
+
+procedure TPARAMASCURRENCY_R(Self: TPARAM; var T: CURRENCY);
+begin T := Self.ASCURRENCY; end;
+
+procedure TPARAMASBOOLEAN_W(Self: TPARAM; const T: BOOLEAN);
+begin Self.ASBOOLEAN := T; end;
+
+procedure TPARAMASBOOLEAN_R(Self: TPARAM; var T: BOOLEAN);
+begin T := Self.ASBOOLEAN; end;
+
+procedure TPARAMASBLOB_W(Self: TPARAM; const T: TBLOBDATA);
+begin Self.ASBLOB := T; end;
+
+procedure TPARAMASBLOB_R(Self: TPARAM; var T: TBLOBDATA);
+begin T := Self.ASBLOB; end;
+
+{$IFNDEF FPC}
+
+{$IFDEF DELPHI6UP}
+procedure TPARAMASFMTBCD_W(Self: TPARAM; const T: TBCD);
+begin Self.ASFMTBCD := T; end;
+
+procedure TPARAMASFMTBCD_R(Self: TPARAM; var T: TBCD);
+begin T := Self.ASFMTBCD; end;
+{$ENDIF}
+procedure TPARAMASBCD_W(Self: TPARAM; const T: CURRENCY);
+begin Self.ASBCD := T; end;
+
+procedure TPARAMASBCD_R(Self: TPARAM; var T: CURRENCY);
+begin T := Self.ASBCD; end;
+
+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 TDATASETFIELDINCLUDEOBJECTFIELD_W(Self: TDATASETFIELD; const T: BOOLEAN);
+begin Self.INCLUDEOBJECTFIELD := T; end;
+
+procedure TDATASETFIELDINCLUDEOBJECTFIELD_R(Self: TDATASETFIELD; var T: BOOLEAN);
+begin T := Self.INCLUDEOBJECTFIELD; end;
+
+procedure TDATASETFIELDNESTEDDATASET_R(Self: TDATASETFIELD; var T: TDATASET);
+begin T := Self.NESTEDDATASET; end;
+
+procedure TOBJECTFIELDOBJECTTYPE_W(Self: TOBJECTFIELD; const T: STRING);
+begin Self.OBJECTTYPE := T; end;
+
+procedure TOBJECTFIELDOBJECTTYPE_R(Self: TOBJECTFIELD; var T: STRING);
+begin T := Self.OBJECTTYPE; end;
+
+procedure TOBJECTFIELDUNNAMED_R(Self: TOBJECTFIELD; var T: BOOLEAN);
+begin T := Self.UNNAMED; end;
+
+procedure TOBJECTFIELDFIELDVALUES_W(Self: TOBJECTFIELD; const T: VARIANT; const t1: INTEGER);
+begin Self.FIELDVALUES[t1] := T; end;
+
+procedure TOBJECTFIELDFIELDVALUES_R(Self: TOBJECTFIELD; var T: VARIANT; const t1: INTEGER);
+begin T := Self.FIELDVALUES[t1]; end;
+
+procedure TOBJECTFIELDFIELDS_R(Self: TOBJECTFIELD; var T: TFIELDS);
+begin T := Self.FIELDS; end;
+
+procedure TOBJECTFIELDFIELDCOUNT_R(Self: TOBJECTFIELD; var T: INTEGER);
+begin T := Self.FIELDCOUNT; end;
+{$ENDIF}
+
+
+{$IFNDEF FPC}
+{$IFDEF DELPHI6UP}
+procedure TBLOBFIELDGRAPHICHEADER_W(Self: TBLOBFIELD; const T: BOOLEAN);
+begin Self.GRAPHICHEADER := T; end;
+
+procedure TBLOBFIELDGRAPHICHEADER_R(Self: TBLOBFIELD; var T: BOOLEAN);
+begin T := Self.GRAPHICHEADER; end;
+{$ENDIF}
+{$ENDIF}
+
+procedure TBLOBFIELDBLOBTYPE_W(Self: TBLOBFIELD; const T: TBLOBTYPE);
+begin Self.BLOBTYPE := T; end;
+
+procedure TBLOBFIELDBLOBTYPE_R(Self: TBLOBFIELD; var T: TBLOBTYPE);
+begin T := Self.BLOBTYPE; end;
+
+procedure TBLOBFIELDTRANSLITERATE_W(Self: TBLOBFIELD; const T: BOOLEAN);
+begin Self.TRANSLITERATE := T; end;
+
+procedure TBLOBFIELDTRANSLITERATE_R(Self: TBLOBFIELD; var T: BOOLEAN);
+begin T := Self.TRANSLITERATE; end;
+
+procedure TBLOBFIELDVALUE_W(Self: TBLOBFIELD; const T: STRING);
+begin Self.VALUE := T; end;
+
+procedure TBLOBFIELDVALUE_R(Self: TBLOBFIELD; var T: STRING);
+begin T := Self.VALUE; end;
+
+procedure TBLOBFIELDMODIFIED_W(Self: TBLOBFIELD; const T: BOOLEAN);
+begin Self.MODIFIED := T; end;
+
+procedure TBLOBFIELDMODIFIED_R(Self: TBLOBFIELD; var T: BOOLEAN);
+begin T := Self.MODIFIED; end;
+
+procedure TBLOBFIELDBLOBSIZE_R(Self: TBLOBFIELD; var T: INTEGER);
+begin T := Self.BLOBSIZE; end;
+
+{$IFNDEF FPC}
+{$IFDEF DELPHI6UP}
+procedure TFMTBCDFIELDPRECISION_W(Self: TFMTBCDFIELD; const T: INTEGER);
+begin Self.PRECISION := T; end;
+
+procedure TFMTBCDFIELDPRECISION_R(Self: TFMTBCDFIELD; var T: INTEGER);
+begin T := Self.PRECISION; end;
+
+procedure TFMTBCDFIELDMINVALUE_W(Self: TFMTBCDFIELD; const T: STRING);
+begin Self.MINVALUE := T; end;
+
+procedure TFMTBCDFIELDMINVALUE_R(Self: TFMTBCDFIELD; var T: STRING);
+begin T := Self.MINVALUE; end;
+
+procedure TFMTBCDFIELDMAXVALUE_W(Self: TFMTBCDFIELD; const T: STRING);
+begin Self.MAXVALUE := T; end;
+
+procedure TFMTBCDFIELDMAXVALUE_R(Self: TFMTBCDFIELD; var T: STRING);
+begin T := Self.MAXVALUE; end;
+
+procedure TFMTBCDFIELDCURRENCY_W(Self: TFMTBCDFIELD; const T: BOOLEAN);
+begin Self.CURRENCY := T; end;
+
+procedure TFMTBCDFIELDCURRENCY_R(Self: TFMTBCDFIELD; var T: BOOLEAN);
+begin T := Self.CURRENCY; end;
+
+procedure TFMTBCDFIELDVALUE_W(Self: TFMTBCDFIELD; const T: TBCD);
+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);
+begin Self.PRECISION := T; end;
+
+procedure TBCDFIELDPRECISION_R(Self: TBCDFIELD; var T: INTEGER);
+begin T := Self.PRECISION; end;
+
+procedure TBCDFIELDMINVALUE_W(Self: TBCDFIELD; const T: CURRENCY);
+begin Self.MINVALUE := T; end;
+
+procedure TBCDFIELDMINVALUE_R(Self: TBCDFIELD; var T: CURRENCY);
+begin T := Self.MINVALUE; end;
+
+procedure TBCDFIELDMAXVALUE_W(Self: TBCDFIELD; const T: CURRENCY);
+begin Self.MAXVALUE := T; end;
+
+procedure TBCDFIELDMAXVALUE_R(Self: TBCDFIELD; var T: CURRENCY);
+begin T := Self.MAXVALUE; end;
+
+procedure TBCDFIELDCURRENCY_W(Self: TBCDFIELD; const T: BOOLEAN);
+begin Self.CURRENCY := T; end;
+
+procedure TBCDFIELDCURRENCY_R(Self: TBCDFIELD; var T: BOOLEAN);
+begin T := Self.CURRENCY; end;
+
+procedure TBCDFIELDVALUE_W(Self: TBCDFIELD; const T: CURRENCY);
+begin Self.VALUE := T; end;
+
+procedure TBCDFIELDVALUE_R(Self: TBCDFIELD; var T: CURRENCY);
+begin T := Self.VALUE; end;
+{$ENDIF}
+
+
+procedure TDATETIMEFIELDDISPLAYFORMAT_W(Self: TDATETIMEFIELD; const T: STRING);
+begin Self.DISPLAYFORMAT := T; end;
+
+procedure TDATETIMEFIELDDISPLAYFORMAT_R(Self: TDATETIMEFIELD; var T: STRING);
+begin T := Self.DISPLAYFORMAT; end;
+
+procedure TDATETIMEFIELDVALUE_W(Self: TDATETIMEFIELD; const T: TDATETIME);
+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);
+begin Self.DISPLAYVALUES := T; end;
+
+procedure TBOOLEANFIELDDISPLAYVALUES_R(Self: TBOOLEANFIELD; var T: STRING);
+begin T := Self.DISPLAYVALUES; end;
+
+procedure TBOOLEANFIELDVALUE_W(Self: TBOOLEANFIELD; const T: BOOLEAN);
+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);
+begin Self.PRECISION := T; end;
+
+procedure TFLOATFIELDPRECISION_R(Self: TFLOATFIELD; var T: INTEGER);
+begin T := Self.PRECISION; end;
+
+procedure TFLOATFIELDMINVALUE_W(Self: TFLOATFIELD; const T: DOUBLE);
+begin Self.MINVALUE := T; end;
+
+procedure TFLOATFIELDMINVALUE_R(Self: TFLOATFIELD; var T: DOUBLE);
+begin T := Self.MINVALUE; end;
+
+procedure TFLOATFIELDMAXVALUE_W(Self: TFLOATFIELD; const T: DOUBLE);
+begin Self.MAXVALUE := T; end;
+
+procedure TFLOATFIELDMAXVALUE_R(Self: TFLOATFIELD; var T: DOUBLE);
+begin T := Self.MAXVALUE; end;
+
+{$IFNDEF FPC}
+procedure TFLOATFIELDCURRENCY_W(Self: TFLOATFIELD; const T: BOOLEAN);
+begin Self.CURRENCY := T; end;
+
+procedure TFLOATFIELDCURRENCY_R(Self: TFLOATFIELD; var T: BOOLEAN);
+begin T := Self.CURRENCY; end;
+{$ENDIF}
+
+procedure TFLOATFIELDVALUE_W(Self: TFLOATFIELD; const T: DOUBLE);
+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);
+begin Self.MINVALUE := T; end;
+
+procedure TLARGEINTFIELDMINVALUE_R(Self: TLARGEINTFIELD; var T: LARGEINT);
+begin T := Self.MINVALUE; end;
+
+procedure TLARGEINTFIELDMAXVALUE_W(Self: TLARGEINTFIELD; const T: LARGEINT);
+begin Self.MAXVALUE := T; end;
+
+procedure TLARGEINTFIELDMAXVALUE_R(Self: TLARGEINTFIELD; var T: LARGEINT);
+begin T := Self.MAXVALUE; end;
+
+procedure TLARGEINTFIELDVALUE_W(Self: TLARGEINTFIELD; const T: LARGEINT);
+begin Self.VALUE := T; end;
+
+procedure TLARGEINTFIELDVALUE_R(Self: TLARGEINTFIELD; var T: LARGEINT);
+begin T := Self.VALUE; end;
+
+procedure TLARGEINTFIELDASLARGEINT_W(Self: TLARGEINTFIELD; const T: LARGEINT);
+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);
+begin Self.MINVALUE := T; end;
+
+procedure TINTEGERFIELDMINVALUE_R(Self: TINTEGERFIELD; var T: LONGINT);
+begin T := Self.MINVALUE; end;
+
+procedure TINTEGERFIELDMAXVALUE_W(Self: TINTEGERFIELD; const T: LONGINT);
+begin Self.MAXVALUE := T; end;
+
+procedure TINTEGERFIELDMAXVALUE_R(Self: TINTEGERFIELD; var T: LONGINT);
+begin T := Self.MAXVALUE; end;
+
+procedure TINTEGERFIELDVALUE_W(Self: TINTEGERFIELD; const T: LONGINT);
+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);
+begin Self.EDITFORMAT := T; end;
+
+procedure TNUMERICFIELDEDITFORMAT_R(Self: TNUMERICFIELD; var T: STRING);
+begin T := Self.EDITFORMAT; end;
+
+procedure TNUMERICFIELDDISPLAYFORMAT_W(Self: TNUMERICFIELD; const T: STRING);
+begin Self.DISPLAYFORMAT := T; end;
+
+procedure TNUMERICFIELDDISPLAYFORMAT_R(Self: TNUMERICFIELD; var T: STRING);
+begin T := Self.DISPLAYFORMAT; end;
+
+{$IFNDEF FPC}
+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);
+begin Self.TRANSLITERATE := T; end;
+
+procedure TSTRINGFIELDTRANSLITERATE_R(Self: TSTRINGFIELD; var T: BOOLEAN);
+begin T := Self.TRANSLITERATE; end;
+
+procedure TSTRINGFIELDFIXEDCHAR_W(Self: TSTRINGFIELD; const T: BOOLEAN);
+begin Self.FIXEDCHAR := T; end;
+
+procedure TSTRINGFIELDFIXEDCHAR_R(Self: TSTRINGFIELD; var T: BOOLEAN);
+begin T := Self.FIXEDCHAR; end;
+{$ENDIF}
+
+
+procedure TSTRINGFIELDVALUE_W(Self: TSTRINGFIELD; const T: STRING);
+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);
+begin Self.ONVALIDATE := T; end;
+
+procedure TFIELDONVALIDATE_R(Self: TFIELD; var T: TFIELDNOTIFYEVENT);
+begin T := Self.ONVALIDATE; end;
+
+procedure TFIELDONSETTEXT_W(Self: TFIELD; const T: TFIELDSETTEXTEVENT);
+begin Self.ONSETTEXT := T; end;
+
+procedure TFIELDONSETTEXT_R(Self: TFIELD; var T: TFIELDSETTEXTEVENT);
+begin T := Self.ONSETTEXT; end;
+
+procedure TFIELDONGETTEXT_W(Self: TFIELD; const T: TFIELDGETTEXTEVENT);
+begin Self.ONGETTEXT := T; end;
+
+procedure TFIELDONGETTEXT_R(Self: TFIELD; var T: TFIELDGETTEXTEVENT);
+begin T := Self.ONGETTEXT; end;
+
+procedure TFIELDONCHANGE_W(Self: TFIELD; const T: TFIELDNOTIFYEVENT);
+begin Self.ONCHANGE := T; end;
+
+procedure TFIELDONCHANGE_R(Self: TFIELD; var T: TFIELDNOTIFYEVENT);
+begin T := Self.ONCHANGE; end;
+
+procedure TFIELDVISIBLE_W(Self: TFIELD; const T: BOOLEAN);
+begin Self.VISIBLE := T; end;
+
+procedure TFIELDVISIBLE_R(Self: TFIELD; var T: BOOLEAN);
+begin T := Self.VISIBLE; end;
+
+procedure TFIELDREQUIRED_W(Self: TFIELD; const T: BOOLEAN);
+begin Self.REQUIRED := T; end;
+
+procedure TFIELDREQUIRED_R(Self: TFIELD; var T: BOOLEAN);
+begin T := Self.REQUIRED; end;
+
+procedure TFIELDREADONLY_W(Self: TFIELD; const T: BOOLEAN);
+begin Self.READONLY := T; end;
+
+procedure TFIELDREADONLY_R(Self: TFIELD; var T: BOOLEAN);
+begin T := Self.READONLY; end;
+
+procedure TFIELDPROVIDERFLAGS_W(Self: TFIELD; const T: TPROVIDERFLAGS);
+begin Self.PROVIDERFLAGS := T; end;
+
+procedure TFIELDPROVIDERFLAGS_R(Self: TFIELD; var T: TPROVIDERFLAGS);
+begin T := Self.PROVIDERFLAGS; end;
+
+procedure TFIELDORIGIN_W(Self: TFIELD; const T: STRING);
+begin Self.ORIGIN := T; end;
+
+procedure TFIELDORIGIN_R(Self: TFIELD; var T: STRING);
+begin T := Self.ORIGIN; end;
+
+procedure TFIELDLOOKUPCACHE_W(Self: TFIELD; const T: BOOLEAN);
+begin Self.LOOKUPCACHE := T; end;
+
+procedure TFIELDLOOKUPCACHE_R(Self: TFIELD; var T: BOOLEAN);
+begin T := Self.LOOKUPCACHE; end;
+
+procedure TFIELDKEYFIELDS_W(Self: TFIELD; const T: STRING);
+begin Self.KEYFIELDS := T; end;
+
+procedure TFIELDKEYFIELDS_R(Self: TFIELD; var T: STRING);
+begin T := Self.KEYFIELDS; end;
+
+procedure TFIELDLOOKUPRESULTFIELD_W(Self: TFIELD; const T: STRING);
+begin Self.LOOKUPRESULTFIELD := T; end;
+
+procedure TFIELDLOOKUPRESULTFIELD_R(Self: TFIELD; var T: STRING);
+begin T := Self.LOOKUPRESULTFIELD; end;
+
+procedure TFIELDLOOKUPKEYFIELDS_W(Self: TFIELD; const T: STRING);
+begin Self.LOOKUPKEYFIELDS := T; end;
+
+procedure TFIELDLOOKUPKEYFIELDS_R(Self: TFIELD; var T: STRING);
+begin T := Self.LOOKUPKEYFIELDS; end;
+
+procedure TFIELDLOOKUPDATASET_W(Self: TFIELD; const T: TDATASET);
+begin Self.LOOKUPDATASET := T; end;
+
+procedure TFIELDLOOKUPDATASET_R(Self: TFIELD; var T: TDATASET);
+begin T := Self.LOOKUPDATASET; end;
+
+procedure TFIELDIMPORTEDCONSTRAINT_W(Self: TFIELD; const T: STRING);
+begin Self.IMPORTEDCONSTRAINT := T; end;
+
+procedure TFIELDIMPORTEDCONSTRAINT_R(Self: TFIELD; var T: STRING);
+begin T := Self.IMPORTEDCONSTRAINT; end;
+
+procedure TFIELDINDEX_W(Self: TFIELD; const T: INTEGER);
+begin Self.INDEX := T; end;
+
+procedure TFIELDINDEX_R(Self: TFIELD; var T: INTEGER);
+begin T := Self.INDEX; end;
+
+procedure TFIELDHASCONSTRAINTS_R(Self: TFIELD; var T: BOOLEAN);
+begin T := Self.HASCONSTRAINTS; end;
+
+procedure TFIELDFIELDNAME_W(Self: TFIELD; const T: STRING);
+begin Self.FIELDNAME := T; end;
+
+procedure TFIELDFIELDNAME_R(Self: TFIELD; var T: STRING);
+begin T := Self.FIELDNAME; end;
+
+procedure TFIELDFIELDKIND_W(Self: TFIELD; const T: TFIELDKIND);
+begin Self.FIELDKIND := T; end;
+
+procedure TFIELDFIELDKIND_R(Self: TFIELD; var T: TFIELDKIND);
+begin T := Self.FIELDKIND; end;
+
+procedure TFIELDDISPLAYWIDTH_W(Self: TFIELD; const T: INTEGER);
+begin Self.DISPLAYWIDTH := T; end;
+
+procedure TFIELDDISPLAYWIDTH_R(Self: TFIELD; var T: INTEGER);
+begin T := Self.DISPLAYWIDTH; end;
+
+procedure TFIELDDISPLAYLABEL_W(Self: TFIELD; const T: STRING);
+begin Self.DISPLAYLABEL := T; end;
+
+procedure TFIELDDISPLAYLABEL_R(Self: TFIELD; var T: STRING);
+begin T := Self.DISPLAYLABEL; end;
+
+procedure TFIELDDEFAULTEXPRESSION_W(Self: TFIELD; const T: STRING);
+begin Self.DEFAULTEXPRESSION := T; end;
+
+procedure TFIELDDEFAULTEXPRESSION_R(Self: TFIELD; var T: STRING);
+begin T := Self.DEFAULTEXPRESSION; end;
+
+procedure TFIELDCONSTRAINTERRORMESSAGE_W(Self: TFIELD; const T: STRING);
+begin Self.CONSTRAINTERRORMESSAGE := T; end;
+
+procedure TFIELDCONSTRAINTERRORMESSAGE_R(Self: TFIELD; var T: STRING);
+begin T := Self.CONSTRAINTERRORMESSAGE; end;
+
+procedure TFIELDCUSTOMCONSTRAINT_W(Self: TFIELD; const T: STRING);
+begin Self.CUSTOMCONSTRAINT := T; end;
+
+procedure TFIELDCUSTOMCONSTRAINT_R(Self: TFIELD; var T: STRING);
+begin T := Self.CUSTOMCONSTRAINT; end;
+
+{$IFNDEF FPC}
+procedure TFIELDAUTOGENERATEVALUE_W(Self: TFIELD; const T: TAUTOREFRESHFLAG);
+begin Self.AUTOGENERATEVALUE := T; end;
+
+procedure TFIELDAUTOGENERATEVALUE_R(Self: TFIELD; var T: TAUTOREFRESHFLAG);
+begin T := Self.AUTOGENERATEVALUE; end;
+
+procedure TFIELDVALIDCHARS_W(Self: TFIELD; const T: TFIELDCHARS);
+begin Self.VALIDCHARS := T; end;
+
+procedure TFIELDVALIDCHARS_R(Self: TFIELD; var T: TFIELDCHARS);
+begin T := Self.VALIDCHARS; end;
+
+
+procedure TFIELDPARENTFIELD_W(Self: TFIELD; const T: TOBJECTFIELD);
+begin Self.PARENTFIELD := T; end;
+
+procedure TFIELDPARENTFIELD_R(Self: TFIELD; var T: TOBJECTFIELD);
+begin T := Self.PARENTFIELD; end;
+
+
+
+{$ENDIF}
+
+procedure TFIELDALIGNMENT_W(Self: TFIELD; const T: TALIGNMENT);
+begin Self.ALIGNMENT := T; end;
+
+procedure TFIELDALIGNMENT_R(Self: TFIELD; var T: TALIGNMENT);
+begin T := Self.ALIGNMENT; end;
+
+procedure TFIELDVALUE_W(Self: TFIELD; const T: VARIANT);
+begin Self.VALUE := T; end;
+
+procedure TFIELDVALUE_R(Self: TFIELD; var T: VARIANT);
+begin T := Self.VALUE; end;
+
+procedure TFIELDTEXT_W(Self: TFIELD; const T: STRING);
+begin Self.TEXT := T; end;
+
+procedure TFIELDTEXT_R(Self: TFIELD; var T: STRING);
+begin T := Self.TEXT; end;
+
+procedure TFIELDSIZE_W(Self: TFIELD; const T: INTEGER);
+begin Self.SIZE := T; end;
+
+procedure TFIELDSIZE_R(Self: TFIELD; var T: INTEGER);
+begin T := Self.SIZE; end;
+
+procedure TFIELDOLDVALUE_R(Self: TFIELD; var T: VARIANT);
+begin T := Self.OLDVALUE; end;
+
+procedure TFIELDOFFSET_R(Self: TFIELD; var T: INTEGER);
+begin T := Self.OFFSET; end;
+
+procedure TFIELDNEWVALUE_W(Self: TFIELD; const T: VARIANT);
+begin Self.NEWVALUE := T; end;
+
+procedure TFIELDNEWVALUE_R(Self: TFIELD; var T: VARIANT);
+begin T := Self.NEWVALUE; end;
+
+procedure TFIELDLOOKUPLIST_R(Self: TFIELD; var T: TLOOKUPLIST);
+begin T := Self.LOOKUPLIST; end;
+
+{$IFNDEF FPC}
+procedure TFIELDLOOKUP_W(Self: TFIELD; const T: BOOLEAN);
+begin Self.LOOKUP := T; end;
+
+procedure TFIELDLOOKUP_R(Self: TFIELD; var T: BOOLEAN);
+begin T := Self.LOOKUP; end;
+
+procedure TFIELDFULLNAME_R(Self: TFIELD; var T: STRING);
+begin T := Self.FULLNAME; end;
+
+
+procedure TFIELDEDITMASKPTR_R(Self: TFIELD; var T: STRING);
+begin T := Self.EDITMASKPTR; end;
+
+procedure TFIELDEDITMASK_W(Self: TFIELD; const T: STRING);
+begin Self.EDITMASK := T; end;
+
+procedure TFIELDEDITMASK_R(Self: TFIELD; var T: STRING);
+begin T := Self.EDITMASK; end;
+
+{$ENDIF}
+
+procedure TFIELDISNULL_R(Self: TFIELD; var T: BOOLEAN);
+begin T := Self.ISNULL; end;
+
+procedure TFIELDISINDEXFIELD_R(Self: TFIELD; var T: BOOLEAN);
+begin T := Self.ISINDEXFIELD; end;
+
+procedure TFIELDFIELDNO_R(Self: TFIELD; var T: INTEGER);
+begin T := Self.FIELDNO; end;
+
+
+
+procedure TFIELDDISPLAYTEXT_R(Self: TFIELD; var T: STRING);
+begin T := Self.DISPLAYTEXT; end;
+
+procedure TFIELDDISPLAYNAME_R(Self: TFIELD; var T: STRING);
+begin T := Self.DISPLAYNAME; end;
+
+procedure TFIELDDATATYPE_R(Self: TFIELD; var T: TFIELDTYPE);
+begin T := Self.DATATYPE; end;
+
+procedure TFIELDDATASIZE_R(Self: TFIELD; var T: INTEGER);
+begin T := Self.DATASIZE; end;
+
+procedure TFIELDDATASET_W(Self: TFIELD; const T: TDATASET);
+begin Self.DATASET := T; end;
+
+procedure TFIELDDATASET_R(Self: TFIELD; var T: TDATASET);
+begin T := Self.DATASET; end;
+
+procedure TFIELDCURVALUE_R(Self: TFIELD; var T: VARIANT);
+begin T := Self.CURVALUE; end;
+
+procedure TFIELDCANMODIFY_R(Self: TFIELD; var T: BOOLEAN);
+begin T := Self.CANMODIFY; end;
+
+procedure TFIELDCALCULATED_W(Self: TFIELD; const T: BOOLEAN);
+begin Self.CALCULATED := T; end;
+
+procedure TFIELDCALCULATED_R(Self: TFIELD; var T: BOOLEAN);
+begin T := Self.CALCULATED; end;
+
+procedure TFIELDATTRIBUTESET_W(Self: TFIELD; const T: STRING);
+begin Self.ATTRIBUTESET := T; end;
+
+procedure TFIELDATTRIBUTESET_R(Self: TFIELD; var T: STRING);
+begin T := Self.ATTRIBUTESET; end;
+
+procedure TFIELDASVARIANT_W(Self: TFIELD; const T: VARIANT);
+begin Self.ASVARIANT := T; end;
+
+procedure TFIELDASVARIANT_R(Self: TFIELD; var T: VARIANT);
+begin T := Self.ASVARIANT; end;
+
+procedure TFIELDASSTRING_W(Self: TFIELD; const T: STRING);
+begin Self.ASSTRING := T; end;
+
+procedure TFIELDASSTRING_R(Self: TFIELD; var T: STRING);
+begin T := Self.ASSTRING; end;
+
+procedure TFIELDASINTEGER_W(Self: TFIELD; const T: LONGINT);
+begin Self.ASINTEGER := T; end;
+
+procedure TFIELDASINTEGER_R(Self: TFIELD; var T: LONGINT);
+begin T := Self.ASINTEGER; end;
+
+procedure TFIELDASFLOAT_W(Self: TFIELD; const T: DOUBLE);
+begin Self.ASFLOAT := T; end;
+
+procedure TFIELDASFLOAT_R(Self: TFIELD; var T: DOUBLE);
+begin T := Self.ASFLOAT; end;
+
+procedure TFIELDASDATETIME_W(Self: TFIELD; const T: TDATETIME);
+begin Self.ASDATETIME := T; end;
+
+procedure TFIELDASDATETIME_R(Self: TFIELD; var T: TDATETIME);
+begin T := Self.ASDATETIME; end;
+
+procedure TFIELDASCURRENCY_W(Self: TFIELD; const T: CURRENCY);
+begin Self.ASCURRENCY := T; end;
+
+procedure TFIELDASCURRENCY_R(Self: TFIELD; var T: CURRENCY);
+begin T := Self.ASCURRENCY; end;
+
+procedure TFIELDASBOOLEAN_W(Self: TFIELD; const T: BOOLEAN);
+begin Self.ASBOOLEAN := T; end;
+
+procedure TFIELDASBOOLEAN_R(Self: TFIELD; var T: BOOLEAN);
+begin T := Self.ASBOOLEAN; end;
+
+{$IFNDEF FPC}
+{$IFDEF DELPHI6UP}
+procedure TFIELDASBCD_W(Self: TFIELD; const T: TBCD);
+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
+ 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(@TFIELDEDITMASK_R,@TFIELDEDITMASK_W,'EDITMASK');
+ RegisterPropertyHelper(@TFIELDEDITMASKPTR_R,nil,'EDITMASKPTR');
+ RegisterPropertyHelper(@TFIELDEDITMASK_R,@TFIELDEDITMASK_W,'EDITMASK');
+ RegisterPropertyHelper(@TFIELDEDITMASKPTR_R,nil,'EDITMASKPTR');
+ RegisterPropertyHelper(@TFIELDFULLNAME_R,nil,'FULLNAME');
+ RegisterPropertyHelper(@TFIELDLOOKUP_R,@TFIELDLOOKUP_W,'LOOKUP');
+ RegisterPropertyHelper(@TFIELDPARENTFIELD_R,@TFIELDPARENTFIELD_W,'PARENTFIELD');
+ RegisterPropertyHelper(@TFIELDVALIDCHARS_R,@TFIELDVALIDCHARS_W,'VALIDCHARS');
+ RegisterPropertyHelper(@TFIELDAUTOGENERATEVALUE_R,@TFIELDAUTOGENERATEVALUE_W,'AUTOGENERATEVALUE');
+
+{$IFDEF DELPHI6UP}
+ RegisterPropertyHelper(@TFIELDASBCD_R,@TFIELDASBCD_W,'ASBCD');
+{$ENDIF}
+{$ENDIF}
+ RegisterPropertyHelper(@TFIELDASBOOLEAN_R,@TFIELDASBOOLEAN_W,'ASBOOLEAN');
+ RegisterPropertyHelper(@TFIELDASCURRENCY_R,@TFIELDASCURRENCY_W,'ASCURRENCY');
+ RegisterPropertyHelper(@TFIELDASDATETIME_R,@TFIELDASDATETIME_W,'ASDATETIME');
+ RegisterPropertyHelper(@TFIELDASFLOAT_R,@TFIELDASFLOAT_W,'ASFLOAT');
+ RegisterPropertyHelper(@TFIELDASINTEGER_R,@TFIELDASINTEGER_W,'ASINTEGER');
+ RegisterPropertyHelper(@TFIELDASSTRING_R,@TFIELDASSTRING_W,'ASSTRING');
+ RegisterPropertyHelper(@TFIELDASVARIANT_R,@TFIELDASVARIANT_W,'ASVARIANT');
+ RegisterPropertyHelper(@TFIELDATTRIBUTESET_R,@TFIELDATTRIBUTESET_W,'ATTRIBUTESET');
+ RegisterPropertyHelper(@TFIELDCALCULATED_R,@TFIELDCALCULATED_W,'CALCULATED');
+ RegisterPropertyHelper(@TFIELDCANMODIFY_R,nil,'CANMODIFY');
+ RegisterPropertyHelper(@TFIELDCURVALUE_R,nil,'CURVALUE');
+ RegisterPropertyHelper(@TFIELDDATASET_R,@TFIELDDATASET_W,'DATASET');
+ RegisterPropertyHelper(@TFIELDDATASIZE_R,nil,'DATASIZE');
+ RegisterPropertyHelper(@TFIELDDATATYPE_R,nil,'DATATYPE');
+ RegisterPropertyHelper(@TFIELDDISPLAYNAME_R,nil,'DISPLAYNAME');
+ RegisterPropertyHelper(@TFIELDDISPLAYTEXT_R,nil,'DISPLAYTEXT');
+ RegisterPropertyHelper(@TFIELDFIELDNO_R,nil,'FIELDNO');
+ RegisterPropertyHelper(@TFIELDISINDEXFIELD_R,nil,'ISINDEXFIELD');
+ RegisterPropertyHelper(@TFIELDISNULL_R,nil,'ISNULL');
+ RegisterPropertyHelper(@TFIELDLOOKUPLIST_R,nil,'LOOKUPLIST');
+ RegisterPropertyHelper(@TFIELDNEWVALUE_R,@TFIELDNEWVALUE_W,'NEWVALUE');
+ RegisterPropertyHelper(@TFIELDOFFSET_R,nil,'OFFSET');
+ RegisterPropertyHelper(@TFIELDOLDVALUE_R,nil,'OLDVALUE');
+ RegisterPropertyHelper(@TFIELDSIZE_R,@TFIELDSIZE_W,'SIZE');
+ RegisterPropertyHelper(@TFIELDTEXT_R,@TFIELDTEXT_W,'TEXT');
+ RegisterPropertyHelper(@TFIELDVALUE_R,@TFIELDVALUE_W,'VALUE');
+ RegisterPropertyHelper(@TFIELDALIGNMENT_R,@TFIELDALIGNMENT_W,'ALIGNMENT');
+ RegisterPropertyHelper(@TFIELDCUSTOMCONSTRAINT_R,@TFIELDCUSTOMCONSTRAINT_W,'CUSTOMCONSTRAINT');
+ RegisterPropertyHelper(@TFIELDCONSTRAINTERRORMESSAGE_R,@TFIELDCONSTRAINTERRORMESSAGE_W,'CONSTRAINTERRORMESSAGE');
+ RegisterPropertyHelper(@TFIELDDEFAULTEXPRESSION_R,@TFIELDDEFAULTEXPRESSION_W,'DEFAULTEXPRESSION');
+ RegisterPropertyHelper(@TFIELDDISPLAYLABEL_R,@TFIELDDISPLAYLABEL_W,'DISPLAYLABEL');
+ RegisterPropertyHelper(@TFIELDDISPLAYWIDTH_R,@TFIELDDISPLAYWIDTH_W,'DISPLAYWIDTH');
+ RegisterPropertyHelper(@TFIELDFIELDKIND_R,@TFIELDFIELDKIND_W,'FIELDKIND');
+ RegisterPropertyHelper(@TFIELDFIELDNAME_R,@TFIELDFIELDNAME_W,'FIELDNAME');
+ RegisterPropertyHelper(@TFIELDHASCONSTRAINTS_R,nil,'HASCONSTRAINTS');
+ RegisterPropertyHelper(@TFIELDINDEX_R,@TFIELDINDEX_W,'INDEX');
+ RegisterPropertyHelper(@TFIELDIMPORTEDCONSTRAINT_R,@TFIELDIMPORTEDCONSTRAINT_W,'IMPORTEDCONSTRAINT');
+ RegisterPropertyHelper(@TFIELDLOOKUPDATASET_R,@TFIELDLOOKUPDATASET_W,'LOOKUPDATASET');
+ RegisterPropertyHelper(@TFIELDLOOKUPKEYFIELDS_R,@TFIELDLOOKUPKEYFIELDS_W,'LOOKUPKEYFIELDS');
+ RegisterPropertyHelper(@TFIELDLOOKUPRESULTFIELD_R,@TFIELDLOOKUPRESULTFIELD_W,'LOOKUPRESULTFIELD');
+ RegisterPropertyHelper(@TFIELDKEYFIELDS_R,@TFIELDKEYFIELDS_W,'KEYFIELDS');
+ RegisterPropertyHelper(@TFIELDLOOKUPCACHE_R,@TFIELDLOOKUPCACHE_W,'LOOKUPCACHE');
+ RegisterPropertyHelper(@TFIELDORIGIN_R,@TFIELDORIGIN_W,'ORIGIN');
+ RegisterPropertyHelper(@TFIELDPROVIDERFLAGS_R,@TFIELDPROVIDERFLAGS_W,'PROVIDERFLAGS');
+ RegisterPropertyHelper(@TFIELDREADONLY_R,@TFIELDREADONLY_W,'READONLY');
+ RegisterPropertyHelper(@TFIELDREQUIRED_R,@TFIELDREQUIRED_W,'REQUIRED');
+ RegisterPropertyHelper(@TFIELDVISIBLE_R,@TFIELDVISIBLE_W,'VISIBLE');
+ RegisterEventPropertyHelper(@TFIELDONCHANGE_R,@TFIELDONCHANGE_W,'ONCHANGE');
+ RegisterEventPropertyHelper(@TFIELDONGETTEXT_R,@TFIELDONGETTEXT_W,'ONGETTEXT');
+ RegisterEventPropertyHelper(@TFIELDONSETTEXT_R,@TFIELDONSETTEXT_W,'ONSETTEXT');
+ RegisterEventPropertyHelper(@TFIELDONVALIDATE_R,@TFIELDONVALIDATE_W,'ONVALIDATE');
+ end;
+end;
+
+procedure RIRegisterTLOOKUPLIST(Cl: TPSRuntimeClassImporter);
+Begin
+with Cl.Add(TLOOKUPLIST) do
+ begin
+ RegisterConstructor(@TLOOKUPLIST.CREATE, 'CREATE');
+ RegisterMethod(@TLOOKUPLIST.ADD, 'ADD');
+ RegisterMethod(@TLOOKUPLIST.CLEAR, 'CLEAR');
+ RegisterMethod(@TLOOKUPLIST.VALUEOFKEY, 'VALUEOFKEY');
+ end;
+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(@TFIELDSCOUNT_R,nil,'COUNT');
+ RegisterPropertyHelper(@TFIELDSDATASET_R,nil,'DATASET');
+ RegisterPropertyHelper(@TFIELDSFIELDS_R,@TFIELDSFIELDS_W,'FIELDS');
+ end;
+end;
+
+{$IFNDEF FPC}
+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;
+
+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 RIRegisterTINDEXDEFS(Cl: TPSRuntimeClassImporter);
+Begin
+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(@TINDEXDEFSITEMS_R,@TINDEXDEFSITEMS_W,'ITEMS');
+ end;
+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');
+
+{$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;
+
+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(@TFIELDDEFSPARENTDEF_R,nil,'PARENTDEF');
+
+{$ENDIF}
+ RegisterPropertyHelper(@TFIELDDEFSHIDDENFIELDS_R,@TFIELDDEFSHIDDENFIELDS_W,'HIDDENFIELDS');
+ RegisterPropertyHelper(@TFIELDDEFSITEMS_R,@TFIELDDEFSITEMS_W,'ITEMS');
+ end;
+end;
+
+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(@TFIELDDEFFIELDNO_R,@TFIELDDEFFIELDNO_W,'FIELDNO');
+ RegisterPropertyHelper(@TFIELDDEFPARENTDEF_R,nil,'PARENTDEF');
+ RegisterPropertyHelper(@TFIELDDEFCHILDDEFS_R,@TFIELDDEFCHILDDEFS_W,'CHILDDEFS');
+ RegisterPropertyHelper(@TFIELDDEFREQUIRED_R,@TFIELDDEFREQUIRED_W,'REQUIRED');
+
+{$ENDIF}
+ RegisterPropertyHelper(@TFIELDDEFFIELDCLASS_R,nil,'FIELDCLASS');
+ RegisterPropertyHelper(@TFIELDDEFINTERNALCALCFIELD_R,@TFIELDDEFINTERNALCALCFIELD_W,'INTERNALCALCFIELD');
+ RegisterPropertyHelper(@TFIELDDEFATTRIBUTES_R,@TFIELDDEFATTRIBUTES_W,'ATTRIBUTES');
+ RegisterPropertyHelper(@TFIELDDEFDATATYPE_R,@TFIELDDEFDATATYPE_W,'DATATYPE');
+ RegisterPropertyHelper(@TFIELDDEFPRECISION_R,@TFIELDDEFPRECISION_W,'PRECISION');
+ RegisterPropertyHelper(@TFIELDDEFSIZE_R,@TFIELDDEFSIZE_W,'SIZE');
+ end;
+end;
+
+{$IFNDEF FPC}
+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(@TDEFCOLLECTIONDATASET_R,nil,'DATASET');
+ RegisterPropertyHelper(@TDEFCOLLECTIONUPDATED_R,@TDEFCOLLECTIONUPDATED_W,'UPDATED');
+ end;
+end;
+
+procedure RIRegisterTNAMEDITEM(Cl: TPSRuntimeClassImporter);
+Begin
+with Cl.Add(TNAMEDITEM) do
+ begin
+ RegisterPropertyHelper(@TNAMEDITEMNAME_R,@TNAMEDITEMNAME_W,'NAME');
+ end;
+end;
+{$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}
+
+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);
+{$ENDIF}
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/uPSR_buttons.pas b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSR_buttons.pas
new file mode 100644
index 0000000..8117e4e
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSR_buttons.pas
@@ -0,0 +1,38 @@
+
+unit uPSR_buttons;
+{$I PascalScript.inc}
+interface
+uses
+ uPSRuntime, uPSUtils;
+
+
+procedure RIRegisterTSPEEDBUTTON(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTBITBTN(Cl: TPSRuntimeClassImporter);
+
+procedure RIRegister_Buttons(Cl: TPSRuntimeClassImporter);
+
+implementation
+uses
+ Classes{$IFDEF CLX}, QControls, QButtons{$ELSE}, Controls, Buttons{$ENDIF};
+
+procedure RIRegisterTSPEEDBUTTON(Cl: TPSRuntimeClassImporter);
+begin
+ Cl.Add(TSPEEDBUTTON);
+end;
+
+
+procedure RIRegisterTBITBTN(Cl: TPSRuntimeClassImporter);
+begin
+ Cl.Add(TBITBTN);
+end;
+
+procedure RIRegister_Buttons(Cl: TPSRuntimeClassImporter);
+begin
+ RIRegisterTSPEEDBUTTON(cl);
+ RIRegisterTBITBTN(cl);
+end;
+
+// PS_MINIVCL changes by Martijn Laan (mlaan at wintax _dot_ nl)
+
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/uPSR_classes.pas b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSR_classes.pas
new file mode 100644
index 0000000..b29abc8
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSR_classes.pas
@@ -0,0 +1,383 @@
+
+unit uPSR_classes;
+
+{$I PascalScript.inc}
+interface
+uses
+ uPSRuntime, uPSUtils;
+
+
+procedure RIRegisterTStrings(cl: TPSRuntimeClassImporter; Streams: Boolean);
+procedure RIRegisterTStringList(cl: TPSRuntimeClassImporter);
+{$IFNDEF PS_MINIVCL}
+procedure RIRegisterTBITS(Cl: TPSRuntimeClassImporter);
+{$ENDIF}
+procedure RIRegisterTSTREAM(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTHANDLESTREAM(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTFILESTREAM(Cl: TPSRuntimeClassImporter);
+{$IFNDEF PS_MINIVCL}
+procedure RIRegisterTCUSTOMMEMORYSTREAM(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTMEMORYSTREAM(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTRESOURCESTREAM(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTPARSER(Cl: TPSRuntimeClassImporter);
+{$IFDEF DELPHI3UP}
+procedure RIRegisterTOWNEDCOLLECTION(Cl: TPSRuntimeClassImporter);
+{$ENDIF}
+procedure RIRegisterTCOLLECTION(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTCOLLECTIONITEM(Cl: TPSRuntimeClassImporter);
+{$ENDIF}
+
+procedure RIRegister_Classes(Cl: TPSRuntimeClassImporter; Streams: Boolean{$IFDEF D4PLUS}=True{$ENDIF});
+
+implementation
+uses
+ Classes;
+
+procedure TStringsCountR(Self: TStrings; var T: Longint); begin T := Self.Count; end;
+
+procedure TStringsTextR(Self: TStrings; var T: string); begin T := Self.Text; end;
+procedure TStringsTextW(Self: TStrings; T: string); begin Self.Text:= T; end;
+
+procedure TStringsCommaTextR(Self: TStrings; var T: string); begin T := Self.CommaText; end;
+procedure TStringsCommaTextW(Self: TStrings; T: string); begin Self.CommaText:= T; end;
+
+procedure TStringsObjectsR(Self: TStrings; var T: TObject; I: Longint);
+begin
+T := Self.Objects[I];
+end;
+procedure TStringsObjectsW(Self: TStrings; const T: TObject; I: Longint);
+begin
+ Self.Objects[I]:= T;
+end;
+
+procedure TStringsStringsR(Self: TStrings; var T: string; I: Longint);
+begin
+T := Self.Strings[I];
+end;
+procedure TStringsStringsW(Self: TStrings; const T: string; I: Longint);
+begin
+ Self.Strings[I]:= T;
+end;
+
+procedure TStringsNamesR(Self: TStrings; var T: string; I: Longint);
+begin
+T := Self.Names[I];
+end;
+procedure TStringsValuesR(Self: TStrings; var T: string; const I: string);
+begin
+T := Self.Values[I];
+end;
+procedure TStringsValuesW(Self: TStrings; Const T, I: String);
+begin
+ Self.Values[I]:= T;
+end;
+
+procedure RIRegisterTStrings(cl: TPSRuntimeClassImporter; Streams: Boolean); // requires TPersistent
+begin
+ with Cl.Add(TStrings) do
+ begin
+ 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(@TStringsCountR, nil, 'COUNT');
+ RegisterPropertyHelper(@TStringsTextR, @TStringsTextW, 'TEXT');
+ RegisterPropertyHelper(@TStringsCommaTextR, @TStringsCommatextW, 'COMMATEXT');
+ if Streams then
+ begin
+ RegisterVirtualMethod(@TStrings.LoadFromFile, 'LOADFROMFILE');
+ RegisterVirtualMethod(@TStrings.SaveToFile, 'SAVETOFILE');
+ end;
+ RegisterPropertyHelper(@TStringsStringsR, @TStringsStringsW, 'STRINGS');
+ RegisterPropertyHelper(@TStringsObjectsR, @TStringsObjectsW, '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(@TStringsNamesR, nil, 'NAMES');
+ RegisterPropertyHelper(@TStringsValuesR, @TStringsValuesW, 'VALUES');
+ RegisterVirtualMethod(@TSTRINGS.ADDOBJECT, 'ADDOBJECT');
+ RegisterVirtualMethod(@TSTRINGS.GETTEXT, 'GETTEXT');
+ RegisterMethod(@TSTRINGS.INDEXOFOBJECT, 'INDEXOFOBJECT');
+ RegisterMethod(@TSTRINGS.INSERTOBJECT, 'INSERTOBJECT');
+ {$ENDIF}
+ end;
+end;
+
+procedure TSTRINGLISTDUPLICATES_R(Self: TSTRINGLIST; var T: TDUPLICATES); begin T := Self.DUPLICATES; end;
+procedure TSTRINGLISTDUPLICATES_W(Self: TSTRINGLIST; const T: TDUPLICATES); begin Self.DUPLICATES := T; end;
+procedure TSTRINGLISTSORTED_R(Self: TSTRINGLIST; var T: BOOLEAN); begin T := Self.SORTED; end;
+procedure TSTRINGLISTSORTED_W(Self: TSTRINGLIST; const T: BOOLEAN); begin Self.SORTED := T; end;
+procedure TSTRINGLISTONCHANGE_R(Self: TSTRINGLIST; var T: TNOTIFYEVENT);
+begin
+T := Self.ONCHANGE; end;
+procedure TSTRINGLISTONCHANGE_W(Self: TSTRINGLIST; const T: TNOTIFYEVENT);
+begin
+Self.ONCHANGE := T; end;
+procedure TSTRINGLISTONCHANGING_R(Self: TSTRINGLIST; var T: TNOTIFYEVENT); begin T := Self.ONCHANGING; end;
+procedure TSTRINGLISTONCHANGING_W(Self: TSTRINGLIST; const T: TNOTIFYEVENT); begin Self.ONCHANGING := T; end;
+procedure RIRegisterTSTRINGLIST(Cl: TPSRuntimeClassImporter);
+begin
+ with Cl.Add(TSTRINGLIST) do
+ begin
+ RegisterVirtualMethod(@TSTRINGLIST.FIND, 'FIND');
+ RegisterVirtualMethod(@TSTRINGLIST.SORT, 'SORT');
+ RegisterPropertyHelper(@TSTRINGLISTDUPLICATES_R, @TSTRINGLISTDUPLICATES_W, 'DUPLICATES');
+ RegisterPropertyHelper(@TSTRINGLISTSORTED_R, @TSTRINGLISTSORTED_W, 'SORTED');
+ RegisterEventPropertyHelper(@TSTRINGLISTONCHANGE_R, @TSTRINGLISTONCHANGE_W, 'ONCHANGE');
+ RegisterEventPropertyHelper(@TSTRINGLISTONCHANGING_R, @TSTRINGLISTONCHANGING_W, 'ONCHANGING');
+ end;
+end;
+
+{$IFNDEF PS_MINIVCL}
+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;
+procedure TBITSSIZE_W(Self: TBITS; var T: INTEGER); begin T := Self.SIZE; end;
+
+procedure RIRegisterTBITS(Cl: TPSRuntimeClassImporter);
+begin
+ with Cl.Add(TBITS) do
+ begin
+ RegisterMethod(@TBITS.OPENBIT, 'OPENBIT');
+ RegisterPropertyHelper(@TBITSBITS_R, @TBITSBITS_W, 'BITS');
+ RegisterPropertyHelper(@TBITSSIZE_R, @TBITSSIZE_W, 'SIZE');
+ end;
+end;
+{$ENDIF}
+
+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;
+{$IFDEF DELPHI3UP}
+procedure TSTREAMSIZE_W(Self: TSTREAM; 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(@TSTREAMPOSITION_R, @TSTREAMPOSITION_W, 'POSITION');
+ RegisterPropertyHelper(@TSTREAMSIZE_R, {$IFDEF DELPHI3UP}@TSTREAMSIZE_W, {$ELSE}nil, {$ENDIF}'SIZE');
+ end;
+end;
+
+procedure THANDLESTREAMHANDLE_R(Self: THANDLESTREAM; var T: INTEGER); begin T := Self.HANDLE; end;
+
+procedure RIRegisterTHANDLESTREAM(Cl: TPSRuntimeClassImporter);
+begin
+ with Cl.Add(THANDLESTREAM) do
+ begin
+ RegisterConstructor(@THANDLESTREAM.CREATE, 'CREATE');
+ RegisterPropertyHelper(@THANDLESTREAMHANDLE_R, nil, 'HANDLE');
+ end;
+end;
+
+{$IFDEF FPC}
+// mh: because FPC doesn't handle pointers to overloaded functions
+function TFileStreamCreate(filename: string; mode: word): TFileStream;
+begin
+ result := TFilestream.Create(filename, mode);
+end;
+{$ENDIF}
+
+procedure RIRegisterTFILESTREAM(Cl: TPSRuntimeClassImporter);
+begin
+ with Cl.Add(TFILESTREAM) do
+ begin
+ {$IFDEF FPC}
+ RegisterConstructor(@TFileStreamCreate, 'CREATE');
+ {$ELSE}
+ RegisterConstructor(@TFILESTREAM.CREATE, 'CREATE');
+ {$ENDIF}
+ end;
+end;
+
+{$IFNDEF PS_MINIVCL}
+procedure RIRegisterTCUSTOMMEMORYSTREAM(Cl: TPSRuntimeClassImporter);
+begin
+ with Cl.Add(TCUSTOMMEMORYSTREAM) do
+ begin
+ RegisterMethod(@TCUSTOMMEMORYSTREAM.SAVETOSTREAM, 'SAVETOSTREAM');
+ RegisterMethod(@TCUSTOMMEMORYSTREAM.SAVETOFILE, 'SAVETOFILE');
+ end;
+end;
+
+procedure RIRegisterTMEMORYSTREAM(Cl: TPSRuntimeClassImporter);
+begin
+ with Cl.Add(TMEMORYSTREAM) do
+ begin
+ RegisterMethod(@TMEMORYSTREAM.CLEAR, 'CLEAR');
+ RegisterMethod(@TMEMORYSTREAM.LOADFROMSTREAM, 'LOADFROMSTREAM');
+ RegisterMethod(@TMEMORYSTREAM.LOADFROMFILE, 'LOADFROMFILE');
+ RegisterMethod(@TMEMORYSTREAM.SETSIZE, 'SETSIZE');
+ end;
+end;
+
+procedure RIRegisterTRESOURCESTREAM(Cl: TPSRuntimeClassImporter);
+begin
+ with Cl.Add(TRESOURCESTREAM) do
+ begin
+ RegisterConstructor(@TRESOURCESTREAM.CREATE, 'CREATE');
+ RegisterConstructor(@TRESOURCESTREAM.CREATEFROMID, 'CREATEFROMID');
+ end;
+end;
+
+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;
+
+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(@TPARSERSOURCELINE_R, nil, 'SOURCELINE');
+ RegisterPropertyHelper(@TPARSERTOKEN_R, nil, 'TOKEN');
+ end;
+end;
+
+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);
+begin T := Self.ITEMS[t1]; end;
+
+{$IFDEF DELPHI3UP}
+procedure TCOLLECTIONITEMCLASS_R(Self: TCOLLECTION; var T: TCOLLECTIONITEMCLASS);
+begin T := Self.ITEMCLASS; end;
+{$ENDIF}
+
+procedure TCOLLECTIONCOUNT_R(Self: TCOLLECTION; var T: INTEGER);
+begin T := Self.COUNT; end;
+
+{$IFDEF DELPHI3UP}
+procedure TCOLLECTIONITEMDISPLAYNAME_W(Self: TCOLLECTIONITEM; const T: STRING);
+begin Self.DISPLAYNAME := T; end;
+{$ENDIF}
+
+{$IFDEF DELPHI3UP}
+procedure TCOLLECTIONITEMDISPLAYNAME_R(Self: TCOLLECTIONITEM; var T: STRING);
+begin T := Self.DISPLAYNAME; end;
+{$ENDIF}
+
+procedure TCOLLECTIONITEMINDEX_W(Self: TCOLLECTIONITEM; const T: INTEGER);
+begin Self.INDEX := T; end;
+
+procedure TCOLLECTIONITEMINDEX_R(Self: TCOLLECTIONITEM; var T: INTEGER);
+begin T := Self.INDEX; end;
+
+{$IFDEF DELPHI3UP}
+procedure TCOLLECTIONITEMID_R(Self: TCOLLECTIONITEM; var T: INTEGER);
+begin T := Self.ID; end;
+{$ENDIF}
+
+procedure TCOLLECTIONITEMCOLLECTION_W(Self: TCOLLECTIONITEM; const T: TCOLLECTION);
+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
+ begin
+ RegisterVirtualConstructor(@TCOLLECTIONITEM.CREATE, 'CREATE');
+ RegisterPropertyHelper(@TCOLLECTIONITEMCOLLECTION_R,@TCOLLECTIONITEMCOLLECTION_W,'COLLECTION');
+{$IFDEF DELPHI3UP} RegisterPropertyHelper(@TCOLLECTIONITEMID_R,nil,'ID'); {$ENDIF}
+ RegisterPropertyHelper(@TCOLLECTIONITEMINDEX_R,@TCOLLECTIONITEMINDEX_W,'INDEX');
+{$IFDEF DELPHI3UP} RegisterPropertyHelper(@TCOLLECTIONITEMDISPLAYNAME_R,@TCOLLECTIONITEMDISPLAYNAME_W,'DISPLAYNAME'); {$ENDIF}
+ end;
+end;
+{$ENDIF}
+
+procedure RIRegister_Classes(Cl: TPSRuntimeClassImporter; Streams: Boolean);
+begin
+ if Streams then
+ RIRegisterTSTREAM(Cl);
+ RIRegisterTStrings(cl, Streams);
+ RIRegisterTStringList(cl);
+ {$IFNDEF PS_MINIVCL}
+ RIRegisterTBITS(cl);
+ {$ENDIF}
+ if Streams then
+ begin
+ RIRegisterTHANDLESTREAM(Cl);
+ RIRegisterTFILESTREAM(Cl);
+ {$IFNDEF PS_MINIVCL}
+ RIRegisterTCUSTOMMEMORYSTREAM(Cl);
+ RIRegisterTMEMORYSTREAM(Cl);
+ RIRegisterTRESOURCESTREAM(Cl);
+ {$ENDIF}
+ end;
+ {$IFNDEF PS_MINIVCL}
+ RIRegisterTPARSER(Cl);
+ RIRegisterTCOLLECTIONITEM(Cl);
+ RIRegisterTCOLLECTION(Cl);
+ {$IFDEF DELPHI3UP}
+ RIRegisterTOWNEDCOLLECTION(Cl);
+ {$ENDIF}
+ {$ENDIF}
+end;
+
+// PS_MINIVCL changes by Martijn Laan (mlaan at wintax _dot_ nl)
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/uPSR_comobj.pas b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSR_comobj.pas
new file mode 100644
index 0000000..67ec7df
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSR_comobj.pas
@@ -0,0 +1,96 @@
+
+
+unit uPSR_comobj;
+
+{$I PascalScript.inc}
+interface
+uses
+ uPSRuntime, uPSUtils;
+
+
+procedure RIRegister_ComObj(cl: TPSExec);
+
+implementation
+uses
+{$IFDEF DELPHI3UP}
+ ComObj;
+{$ELSE}
+ SysUtils, Ole2;
+{$ENDIF}
+{$IFNDEF DELPHI3UP}
+
+{$IFDEF DELPHI3UP }
+resourceString
+{$ELSE }
+const
+{$ENDIF }
+
+ RPS_OLEError = 'OLE error %.8x';
+function OleErrorMessage(ErrorCode: HResult): String;
+begin
+ Result := SysErrorMessage(ErrorCode);
+ if Result = '' then
+ Result := Format(RPS_OLEError, [ErrorCode]);
+end;
+
+procedure OleError(ErrorCode: HResult);
+begin
+ raise Exception.Create(OleErrorMessage(ErrorCode));
+end;
+
+procedure OleCheck(Result: HResult);
+begin
+ if Result < 0 then OleError(Result);
+end;
+
+procedure CreateOleObject(const ClassName: string; var Disp: IDispatch);
+var
+ OldDisp: IDispatch;
+ ClassID: TCLSID;
+ WideCharBuf: array[0..127] of WideChar;
+begin
+ StringToWideChar(ClassName, WideCharBuf, SizeOf(WideCharBuf) div SizeOf(WideCharBuf[0]));
+ OleCheck(CLSIDFromProgID(WideCharBuf, ClassID));
+ if Disp <> nil then
+ begin
+ OldDisp := Disp;
+ Disp := nil;
+ OldDisp.Release;
+ end;
+ OleCheck(CoCreateInstance(ClassID, nil, CLSCTX_INPROC_SERVER or
+ CLSCTX_LOCAL_SERVER, IID_IDispatch, Disp));
+end;
+
+procedure GetActiveOleObject(const ClassName: string; var Disp: IDispatch);
+var
+ Unknown: IUnknown;
+ OldDisp: IDispatch;
+ ClassID: TCLSID;
+ WideCharBuf: array[0..127] of WideChar;
+begin
+ StringToWideChar(ClassName, WideCharBuf, SizeOf(WideCharBuf) div SizeOf(WideCharBuf[0]));
+ OleCheck(CLSIDFromProgID(WideCharBuf, ClassID));
+ OleCheck(GetActiveObject(ClassID, nil, Unknown));
+ try
+ if Disp <> nil then
+ begin
+ OldDisp := Disp;
+ Disp := nil;
+ OldDisp.Release;
+ end;
+ OleCheck(Unknown.QueryInterface(IID_IDispatch, Disp));
+ finally
+ Unknown.Release;
+ end;
+end;
+
+{$ENDIF}
+
+
+procedure RIRegister_ComObj(cl: TPSExec);
+begin
+ cl.RegisterDelphiFunction(@CreateOleObject, 'CREATEOLEOBJECT', cdRegister);
+ cl.RegisterDelphiFunction(@GetActiveOleObject, 'GETACTIVEOLEOBJECT', cdRegister);
+end;
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/uPSR_controls.pas b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSR_controls.pas
new file mode 100644
index 0000000..4bac801
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSR_controls.pas
@@ -0,0 +1,249 @@
+
+unit uPSR_controls;
+
+{$I PascalScript.inc}
+interface
+uses
+ uPSRuntime, uPSUtils;
+
+
+
+
+procedure RIRegisterTControl(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTWinControl(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTGraphicControl(cl: TPSRuntimeClassImporter);
+procedure RIRegisterTCustomControl(cl: TPSRuntimeClassImporter);
+procedure RIRegister_TDragObject(CL: TPSRuntimeClassImporter);
+
+procedure RIRegister_Controls(Cl: TPSRuntimeClassImporter);
+
+implementation
+{$IFNDEF FPC}
+uses
+ Classes{$IFDEF CLX}, QControls, QGraphics{$ELSE}, Controls, Graphics, Windows{$ENDIF};
+{$ELSE}
+uses
+ Classes, Controls, Graphics;
+{$ENDIF}
+
+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;
+
+procedure TControlClientHeightR(Self: TControl; var T: Longint); begin T := Self.ClientHeight; end;
+procedure TControlClientHeightW(Self: TControl; T: Longint); begin Self.ClientHeight := T; end;
+
+procedure TControlClientWidthR(Self: TControl; var T: Longint); begin T := Self.ClientWidth; end;
+procedure TControlClientWidthW(Self: TControl; T: Longint); begin Self.ClientWidth:= T; end;
+
+procedure TControlShowHintR(Self: TControl; var T: Boolean); begin T := Self.ShowHint; end;
+procedure TControlShowHintW(Self: TControl; T: Boolean); begin Self.ShowHint:= T; end;
+
+procedure TControlVisibleR(Self: TControl; var T: Boolean); begin T := Self.Visible; end;
+procedure TControlVisibleW(Self: TControl; T: Boolean); begin Self.Visible:= T; end;
+
+procedure TControlParentR(Self: TControl; var T: TWinControl); begin T := Self.Parent; end;
+procedure TControlParentW(Self: TControl; T: TWinControl); begin Self.Parent:= T; end;
+
+
+procedure TCONTROLSHOWHINT_W(Self: TCONTROL; T: BOOLEAN); begin Self.SHOWHINT := T; end;
+procedure TCONTROLSHOWHINT_R(Self: TCONTROL; var T: BOOLEAN); begin T := Self.SHOWHINT; end;
+procedure TCONTROLENABLED_W(Self: TCONTROL; T: BOOLEAN); begin Self.ENABLED := T; end;
+procedure TCONTROLENABLED_R(Self: TCONTROL; 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(@TControlShowHintR, @TControlShowHintW, 'SHOWHINT');
+ RegisterPropertyHelper(@TControlAlignR, @TControlAlignW, 'ALIGN');
+ RegisterPropertyHelper(@TControlClientHeightR, @TControlClientHeightW, 'CLIENTHEIGHT');
+ RegisterPropertyHelper(@TControlClientWidthR, @TControlClientWidthW, 'CLIENTWIDTH');
+ RegisterPropertyHelper(@TControlVisibleR, @TControlVisibleW, 'VISIBLE');
+ RegisterPropertyHelper(@TCONTROLENABLED_R, @TCONTROLENABLED_W, 'ENABLED');
+
+ RegisterPropertyHelper(@TControlParentR, @TControlParentW, '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;
+{$IFNDEF CLX}
+procedure TWinControlHandleR(Self: TWinControl; var T: Longint); begin T := Self.Handle; end;
+{$ENDIF}
+procedure TWinControlShowingR(Self: TWinControl; var T: Boolean); begin T := Self.Showing; end;
+
+
+procedure TWinControlTabOrderR(Self: TWinControl; var T: Longint); begin T := Self.TabOrder; end;
+procedure TWinControlTabOrderW(Self: TWinControl; T: Longint); begin Self.TabOrder:= T; end;
+
+procedure TWinControlTabStopR(Self: TWinControl; var T: Boolean); begin T := Self.TabStop; end;
+procedure TWinControlTabStopW(Self: TWinControl; T: Boolean); begin Self.TabStop:= T; end;
+procedure TWINCONTROLBRUSH_R(Self: TWINCONTROL; var T: TBRUSH); begin T := Self.BRUSH; end;
+procedure TWINCONTROLCONTROLS_R(Self: TWINCONTROL; var T: TCONTROL; t1: INTEGER); begin t := Self.CONTROLS[t1]; end;
+procedure TWINCONTROLCONTROLCOUNT_R(Self: TWINCONTROL; var T: INTEGER); begin t := Self.CONTROLCOUNT; end;
+
+procedure RIRegisterTWinControl(Cl: TPSRuntimeClassImporter); // requires TControl
+begin
+ with Cl.Add(TWinControl) do
+ begin
+ {$IFNDEF CLX}
+ RegisterPropertyHelper(@TWinControlHandleR, nil, 'HANDLE');
+ {$ENDIF}
+ RegisterPropertyHelper(@TWinControlShowingR, nil, 'SHOWING');
+ RegisterPropertyHelper(@TWinControlTabOrderR, @TWinControlTabOrderW, 'TABORDER');
+ RegisterPropertyHelper(@TWinControlTabStopR, @TWinControlTabStopW, 'TABSTOP');
+ RegisterMethod(@TWINCONTROL.CANFOCUS, 'CANFOCUS');
+ RegisterMethod(@TWINCONTROL.FOCUSED, 'FOCUSED');
+ RegisterPropertyHelper(@TWINCONTROLCONTROLS_R, nil, 'CONTROLS');
+ RegisterPropertyHelper(@TWINCONTROLCONTROLCOUNT_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(@TWINCONTROLBRUSH_R, nil, 'BRUSH');
+ {$ENDIF}
+ end;
+end;
+
+procedure RIRegisterTGraphicControl(cl: TPSRuntimeClassImporter); // requires TControl
+begin
+ Cl.Add(TGraphicControl);
+end;
+procedure RIRegisterTCustomControl(cl: TPSRuntimeClassImporter); // requires TControl
+begin
+ Cl.Add(TCustomControl);
+end;
+
+{$IFDEF DELPHI4UP}
+(* === run-time registration functions === *)
+(*----------------------------------------------------------------------------*)
+procedure TDragObjectMouseDeltaY_R(Self: TDragObject; var T: Double);
+begin T := Self.MouseDeltaY; end;
+
+(*----------------------------------------------------------------------------*)
+procedure TDragObjectMouseDeltaX_R(Self: TDragObject; var T: Double);
+begin T := Self.MouseDeltaX; end;
+
+(*----------------------------------------------------------------------------*)
+procedure TDragObjectDragTarget_W(Self: TDragObject; const T: Pointer);
+begin Self.DragTarget := T; end;
+
+(*----------------------------------------------------------------------------*)
+procedure TDragObjectDragTarget_R(Self: TDragObject; var T: Pointer);
+begin T := Self.DragTarget; end;
+
+(*----------------------------------------------------------------------------*)
+procedure TDragObjectDragTargetPos_W(Self: TDragObject; const T: TPoint);
+begin Self.DragTargetPos := T; end;
+
+(*----------------------------------------------------------------------------*)
+procedure TDragObjectDragTargetPos_R(Self: TDragObject; var T: TPoint);
+begin T := Self.DragTargetPos; end;
+
+(*----------------------------------------------------------------------------*)
+procedure TDragObjectDragPos_W(Self: TDragObject; const T: TPoint);
+begin Self.DragPos := T; end;
+
+(*----------------------------------------------------------------------------*)
+procedure TDragObjectDragPos_R(Self: TDragObject; var T: TPoint);
+begin T := Self.DragPos; end;
+
+(*----------------------------------------------------------------------------*)
+procedure TDragObjectDragHandle_W(Self: TDragObject; const T: HWND);
+begin Self.DragHandle := T; end;
+
+(*----------------------------------------------------------------------------*)
+procedure TDragObjectDragHandle_R(Self: TDragObject; var T: HWND);
+begin T := Self.DragHandle; end;
+
+(*----------------------------------------------------------------------------*)
+procedure TDragObjectCancelling_W(Self: TDragObject; const T: Boolean);
+begin Self.Cancelling := T; end;
+
+(*----------------------------------------------------------------------------*)
+procedure TDragObjectCancelling_R(Self: TDragObject; 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(@TDragObjectCancelling_R,@TDragObjectCancelling_W,'Cancelling');
+ RegisterPropertyHelper(@TDragObjectDragHandle_R,@TDragObjectDragHandle_W,'DragHandle');
+ RegisterPropertyHelper(@TDragObjectDragPos_R,@TDragObjectDragPos_W,'DragPos');
+ RegisterPropertyHelper(@TDragObjectDragTargetPos_R,@TDragObjectDragTargetPos_W,'DragTargetPos');
+ RegisterPropertyHelper(@TDragObjectDragTarget_R,@TDragObjectDragTarget_W,'DragTarget');
+ RegisterPropertyHelper(@TDragObjectMouseDeltaX_R,nil,'MouseDeltaX');
+ RegisterPropertyHelper(@TDragObjectMouseDeltaY_R,nil,'MouseDeltaY');
+{$ENDIF}
+{$ENDIF}
+ end;
+end;
+
+
+procedure RIRegister_Controls(Cl: TPSRuntimeClassImporter);
+begin
+ RIRegisterTControl(Cl);
+ RIRegisterTWinControl(Cl);
+ RIRegisterTGraphicControl(cl);
+ RIRegisterTCustomControl(cl);
+ RIRegister_TDragObject(cl);
+
+end;
+
+// PS_MINIVCL changes by Martijn Laan (mlaan at wintax _dot_ nl)
+
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/uPSR_dateutils.pas b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSR_dateutils.pas
new file mode 100644
index 0000000..9c0fd5b
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSR_dateutils.pas
@@ -0,0 +1,63 @@
+
+unit uPSR_dateutils;
+{$I PascalScript.inc}
+interface
+uses
+ SysUtils, uPSRuntime;
+
+
+
+procedure RegisterDateTimeLibrary_R(S: TPSExec);
+
+implementation
+
+function TryEncodeDate(Year, Month, Day: Word; var Date: TDateTime): Boolean;
+begin
+ try
+ Date := EncodeDate(Year, Month, Day);
+ Result := true;
+ except
+ Result := false;
+ end;
+end;
+
+function TryEncodeTime(Hour, Min, Sec, MSec: Word; var Time: TDateTime): Boolean;
+begin
+ try
+ Time := EncodeTime(hour, Min, Sec, MSec);
+ Result := true;
+ except
+ Result := false;
+ end;
+end;
+
+function DateTimeToUnix(D: TDateTime): Int64;
+begin
+ Result := Round((D - 25569) * 86400);
+end;
+
+function UnixToDateTime(U: Int64): TDateTime;
+begin
+ Result := U / 86400 + 25569;
+end;
+
+procedure RegisterDateTimeLibrary_R(S: TPSExec);
+begin
+ S.RegisterDelphiFunction(@EncodeDate, 'ENCODEDATE', cdRegister);
+ S.RegisterDelphiFunction(@EncodeTime, 'ENCODETIME', cdRegister);
+ S.RegisterDelphiFunction(@TryEncodeDate, 'TRYENCODEDATE', cdRegister);
+ S.RegisterDelphiFunction(@TryEncodeTime, 'TRYENCODETIME', cdRegister);
+ S.RegisterDelphiFunction(@DecodeDate, 'DECODEDATE', cdRegister);
+ S.RegisterDelphiFunction(@DecodeTime, 'DECODETIME', cdRegister);
+ S.RegisterDelphiFunction(@DayOfWeek, 'DAYOFWEEK', cdRegister);
+ S.RegisterDelphiFunction(@Date, 'DATE', cdRegister);
+ S.RegisterDelphiFunction(@Time, 'TIME', cdRegister);
+ S.RegisterDelphiFunction(@Now, 'NOW', cdRegister);
+ S.RegisterDelphiFunction(@DateTimeToUnix, 'DATETIMETOUNIX', cdRegister);
+ S.RegisterDelphiFunction(@UnixToDateTime, 'UNIXTODATETIME', cdRegister);
+ S.RegisterDelphiFunction(@DateToStr, 'DATETOSTR', cdRegister);
+ S.RegisterDelphiFunction(@FormatDateTime, 'FORMATDATETIME', cdRegister);
+ S.RegisterDelphiFunction(@StrToDate, 'STRTODATE', cdRegister);
+end;
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/uPSR_dll.pas b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSR_dll.pas
new file mode 100644
index 0000000..190170c
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSR_dll.pas
@@ -0,0 +1,297 @@
+
+unit uPSR_dll;
+
+{$I PascalScript.inc}
+interface
+uses
+ uPSRuntime, uPSUtils;
+
+procedure RegisterDLLRuntime(Caller: TPSExec);
+procedure RegisterDLLRuntimeEx(Caller: TPSExec; AddDllProcImport: Boolean);
+
+function ProcessDllImport(Caller: TPSExec; P: TPSExternalProcRec): Boolean;
+function ProcessDllImportEx(Caller: TPSExec; P: TPSExternalProcRec; ForceDelayLoad: Boolean): Boolean;
+function UnloadProc(Caller: TPSExec; p: TPSExternalProcRec; Global, Stack: TPSStack): Boolean;
+
+implementation
+uses
+ {$IFDEF LINUX}
+ LibC{$IFNDEF FPC}, Windows{$ENDIF};
+ {$ELSE}
+ Windows;
+ {$ENDIF}
+
+{
+p^.Ext1 contains the pointer to the Proc function
+p^.ExportDecl:
+ 'dll:'+DllName+#0+FunctionName+#0+chr(Cc)+Chr(DelayLoad)+VarParams
+}
+
+type
+ PLoadedDll = ^TLoadedDll;
+ TLoadedDll = record
+ dllnamehash: Longint;
+ dllname: string;
+ {$IFDEF LINUX}
+ dllhandle: Pointer;
+ {$ELSE}
+ dllhandle: THandle;
+ {$ENDIF}
+ end;
+ TMyExec = class(TPSExec);
+ PInteger = ^Integer;
+
+procedure LAstErrorFree(Sender: TPSExec; P: PInteger);
+begin
+ dispose(p);
+end;
+
+procedure DLLSetLastError(Sender: TPSExec; P: Integer);
+var
+ pz: PInteger;
+begin
+ pz := Sender.FindProcResource(@LastErrorFree);
+ if pz = nil then
+ begin
+ new(pz);
+ Sender.AddResource(@LastErrorFree, PZ);
+ end;
+ pz^ := p;
+end;
+
+function DLLGetLastError(Sender: TPSExec): Integer;
+var
+ pz: PInteger;
+begin
+ pz := Sender.FindProcResource(@LastErrorFree);
+ if pz = nil then
+ result := 0
+ else
+ result := pz^;
+end;
+
+
+procedure DllFree(Sender: TPSExec; P: PLoadedDll);
+begin
+ {$IFDEF LINUX}
+ dlclose(p^.dllhandle);
+ {$ELSE}
+ FreeLibrary(p^.dllhandle);
+ {$ENDIF}
+ Dispose(p);
+end;
+
+function LoadDll(Caller: TPSExec; P: TPSExternalProcRec): Boolean;
+var
+ s, s2: string;
+ h, i: Longint;
+ ph: PLoadedDll;
+ {$IFDEF LINUX}
+ dllhandle: Pointer;
+ {$ELSE}
+ dllhandle: THandle;
+ {$ENDIF}
+begin
+ s := p.Decl;
+ Delete(s, 1, 4);
+ s2 := copy(s, 1, pos(#0, s)-1);
+ delete(s, 1, length(s2)+1);
+ h := makehash(s2);
+ i := 2147483647; // maxint
+ dllhandle := 0;
+ repeat
+ ph := Caller.FindProcResource2(@dllFree, i);
+ if (ph = nil) then
+ begin
+ if s2 = '' then
+ begin
+ // don't pass an empty filename to LoadLibrary, just treat it as uncallable
+ p.Ext2 := Pointer(1);
+ Result := False;
+ exit;
+ end;
+ {$IFDEF LINUX}
+ dllhandle := dlopen(PChar(s2), RTLD_LAZY);
+ {$ELSE}
+ dllhandle := LoadLibrary(Pchar(s2));
+ {$ENDIF}
+ if dllhandle = {$IFDEF LINUX}nil{$ELSE}0{$ENDIF}then
+ begin
+ p.Ext2 := Pointer(1);
+ Result := False;
+ exit;
+ end;
+ new(ph);
+ ph^.dllnamehash := h;
+ ph^.dllname := s2;
+ ph^.dllhandle := dllhandle;
+ Caller.AddResource(@DllFree, ph);
+ end;
+ if (ph^.dllnamehash = h) and (ph^.dllname = s2) then
+ begin
+ dllhandle := ph^.dllhandle;
+ end;
+ until dllhandle <> {$IFDEF LINUX}nil{$ELSE}0{$ENDIF};
+ {$IFDEF LINUX}
+ p.Ext1 := dlsym(dllhandle, pchar(copy(s, 1, pos(#0, s)-1)));
+ {$ELSE}
+ p.Ext1 := GetProcAddress(dllhandle, pchar(copy(s, 1, pos(#0, s)-1)));
+ {$ENDIF}
+ if p.Ext1 = nil then
+ begin
+ p.Ext2 := Pointer(1);
+ Result := false;
+ exit;
+ end;
+ Result := True;
+end;
+
+
+function DllProc(Caller: TPSExec; p: TPSExternalProcRec; Global, Stack: TPSStack): Boolean;
+
+var
+ i: Longint;
+ MyList: TIfList;
+ n: PPSVariantIFC;
+ CurrStack: Cardinal;
+ cc: TPSCallingConvention;
+ s: string;
+begin
+ if p.Ext2 <> nil then // error
+ begin
+ Result := false;
+ exit;
+ end;
+ if p.Ext1 = nil then
+ begin
+ if not LoadDll(Caller, P) then
+ begin
+ Result := false;
+ exit;
+ end;
+ end;
+ s := p.Decl;
+ delete(S, 1, pos(#0, s));
+ delete(S, 1, pos(#0, s));
+ if length(S) < 2 then
+ begin
+ Result := False;
+ exit;
+ end;
+ cc := TPSCallingConvention(s[1]);
+ delete(s, 1, 2); // cc + delayload (delayload might also be forced!)
+ CurrStack := Cardinal(Stack.Count) - Cardinal(length(s));
+ if s[1] = #0 then inc(CurrStack);
+ MyList := tIfList.Create;
+ for i := 2 to length(s) do
+ begin
+ MyList.Add(nil);
+ end;
+ for i := length(s) downto 2 do
+ begin
+ MyList[i - 2] := NewPPSVariantIFC(Stack[CurrStack], s[i] <> #0);
+ inc(CurrStack);
+ end;
+ if s[1] <> #0 then
+ begin
+ n := NewPPSVariantIFC(Stack[CurrStack], true);
+ end else n := nil;
+ try
+ TMYExec(Caller).InnerfuseCall(nil, p.Ext1, cc, MyList, n);
+ {$IFNDEF LINUX}
+ DLLSetLastError(Caller, GetLastError);
+ {$ENDIF}
+ finally
+ DisposePPSvariantIFC(n);
+ DisposePPSVariantIFCList(MyList);
+ end;
+ result := true;
+end;
+
+function ProcessDllImport(Caller: TPSExec; P: TPSExternalProcRec): Boolean;
+begin
+ Result := ProcessDllImportEx(Caller, P, False);
+end;
+
+function ProcessDllImportEx(Caller: TPSExec; P: TPSExternalProcRec; ForceDelayLoad: Boolean): Boolean;
+var
+ DelayLoad: Boolean;
+ s: string;
+begin
+ if not ForceDelayLoad then begin
+ s := p.Decl;
+ Delete(s,1,pos(#0, s));
+ Delete(s,1,pos(#0, s));
+ DelayLoad := bytebool(s[2]);
+ end else
+ DelayLoad := True;
+
+ if DelayLoad then begin
+ p.ProcPtr := DllProc;
+ Result := True;
+ end else begin
+ p.ProcPtr := DllProc;
+ Result := LoadDll(Caller, p);
+ end;
+end;
+
+
+function GetLastErrorProc(Caller: TPSExec; p: TPSExternalProcRec; Global, Stack: TPSStack): Boolean;
+begin
+ Stack.SetInt(-1, DLLGetLastError(Caller));
+ Result := true;
+end;
+
+function UnloadProc(Caller: TPSExec; p: TPSExternalProcRec; Global, Stack: TPSStack): Boolean;
+var
+ h, i: Longint;
+ pv: TPSProcRec;
+ ph: PLoadedDll;
+ sname, s: string;
+begin
+ sname := Stack.GetString(-1);
+ for i := Caller.GetProcCount -1 downto 0 do
+ begin
+ pv := Caller.GetProcNo(i);
+ if not (pv is TPSExternalProcRec) then continue;
+ if @TPSExternalProcRec(pv).ProcPtr <> @DllProc then continue;
+ s := (TPSExternalProcRec(pv).Decl);
+ delete(s,1,4);
+ if copy(s,1,pos(#0,s)-1) = sname then
+ begin
+ TPSExternalProcRec(pv).Ext1 := nil;
+ end;
+ end;
+ h := MakeHash(sname);
+ i := 2147483647; // maxint
+ repeat
+ ph := Caller.FindProcResource2(@dllFree, i);
+ if (ph = nil) then break;
+ if (ph.dllnamehash = h) and (ph.dllname = sname) then
+ begin
+ {$IFDEF LINUX}
+ dlclose(ph^.dllhandle);
+ {$ELSE}
+ FreeLibrary(ph^.dllhandle);
+ {$ENDIF}
+ Caller.DeleteResource(ph);
+ dispose(ph);
+ end;
+ until false;
+ result := true;
+end;
+
+procedure RegisterDLLRuntime(Caller: TPSExec);
+begin
+ RegisterDLLRuntimeEx(Caller, True);
+end;
+
+procedure RegisterDLLRuntimeEx(Caller: TPSExec; AddDllProcImport: Boolean);
+begin
+ if AddDllProcImport then
+ Caller.AddSpecialProcImport('dll', @ProcessDllImport, nil);
+ Caller.RegisterFunctionName('UNLOADDLL', UnloadProc, nil, nil);
+ Caller.RegisterFunctionName('DLLGETLASTERROR', GetLastErrorProc, nil, nil);
+end;
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/uPSR_extctrls.pas b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSR_extctrls.pas
new file mode 100644
index 0000000..0f4a129
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSR_extctrls.pas
@@ -0,0 +1,150 @@
+
+unit uPSR_extctrls;
+
+{$I PascalScript.inc}
+interface
+uses
+ uPSRuntime, uPSUtils;
+
+
+procedure RIRegister_ExtCtrls(cl: TPSRuntimeClassImporter);
+
+procedure RIRegisterTSHAPE(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTIMAGE(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTPAINTBOX(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTBEVEL(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTTIMER(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTCUSTOMPANEL(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTPANEL(Cl: TPSRuntimeClassImporter);
+{$IFNDEF CLX}
+procedure RIRegisterTPAGE(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTNOTEBOOK(Cl: TPSRuntimeClassImporter);
+{$IFNDEF FPC}procedure RIRegisterTHEADER(Cl: TPSRuntimeClassImporter);{$ENDIF}
+{$ENDIF}
+procedure RIRegisterTCUSTOMRADIOGROUP(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTRADIOGROUP(Cl: TPSRuntimeClassImporter);
+
+implementation
+
+uses
+ {$IFDEF CLX}
+ QExtCtrls, QGraphics;
+ {$ELSE}
+ ExtCtrls, Graphics;
+ {$ENDIF}
+
+procedure RIRegisterTSHAPE(Cl: TPSRuntimeClassImporter);
+begin
+ with Cl.Add(TSHAPE) do
+ begin
+ {$IFNDEF PS_MINIVCL}
+ RegisterMethod(@TSHAPE.STYLECHANGED, 'STYLECHANGED');
+ {$ENDIF}
+ end;
+end;
+
+procedure TIMAGECANVAS_R(Self: TIMAGE; var T: TCANVAS); begin T := Self.CANVAS; end;
+
+procedure RIRegisterTIMAGE(Cl: TPSRuntimeClassImporter);
+begin
+ with Cl.Add(TIMAGE) do
+ begin
+ RegisterPropertyHelper(@TIMAGECANVAS_R, nil, 'CANVAS');
+ end;
+end;
+
+procedure TPAINTBOXCANVAS_R(Self: TPAINTBOX; var T: TCanvas); begin T := Self.CANVAS; end;
+
+procedure RIRegisterTPAINTBOX(Cl: TPSRuntimeClassImporter);
+begin
+ with Cl.Add(TPAINTBOX) do
+ begin
+ RegisterPropertyHelper(@TPAINTBOXCANVAS_R, nil, 'CANVAS');
+ end;
+end;
+
+procedure RIRegisterTBEVEL(Cl: TPSRuntimeClassImporter);
+begin
+ Cl.Add(TBEVEL);
+end;
+
+procedure RIRegisterTTIMER(Cl: TPSRuntimeClassImporter);
+begin
+ Cl.Add(TTIMER);
+end;
+
+procedure RIRegisterTCUSTOMPANEL(Cl: TPSRuntimeClassImporter);
+begin
+ Cl.Add(TCUSTOMPANEL);
+end;
+
+procedure RIRegisterTPANEL(Cl: TPSRuntimeClassImporter);
+begin
+ Cl.Add(TPANEL);
+end;
+{$IFNDEF CLX}
+procedure RIRegisterTPAGE(Cl: TPSRuntimeClassImporter);
+begin
+ Cl.Add(TPAGE);
+end;
+
+procedure RIRegisterTNOTEBOOK(Cl: TPSRuntimeClassImporter);
+begin
+ Cl.Add(TNOTEBOOK);
+end;
+
+{$IFNDEF FPC}
+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
+ begin
+ RegisterPropertyHelper(@THEADERSECTIONWIDTH_R, @THEADERSECTIONWIDTH_W, 'SECTIONWIDTH');
+ end;
+end;
+{$ENDIF}
+{$ENDIF}
+
+procedure RIRegisterTCUSTOMRADIOGROUP(Cl: TPSRuntimeClassImporter);
+begin
+ Cl.Add(TCUSTOMRADIOGROUP);
+end;
+
+procedure RIRegisterTRADIOGROUP(Cl: TPSRuntimeClassImporter);
+begin
+ Cl.Add(TRADIOGROUP);
+end;
+
+procedure RIRegister_ExtCtrls(cl: TPSRuntimeClassImporter);
+begin
+ {$IFNDEF PS_MINIVCL}
+ RIRegisterTSHAPE(Cl);
+ RIRegisterTIMAGE(Cl);
+ RIRegisterTPAINTBOX(Cl);
+ {$ENDIF}
+ RIRegisterTBEVEL(Cl);
+ {$IFNDEF PS_MINIVCL}
+ RIRegisterTTIMER(Cl);
+ {$ENDIF}
+ RIRegisterTCUSTOMPANEL(Cl);
+{$IFNDEF CLX}
+ RIRegisterTPANEL(Cl);
+{$ENDIF}
+ {$IFNDEF PS_MINIVCL}
+{$IFNDEF CLX}
+ RIRegisterTPAGE(Cl);
+ RIRegisterTNOTEBOOK(Cl);
+ {$IFNDEF FPC}
+ RIRegisterTHEADER(Cl);
+ {$ENDIF}{FPC}
+{$ENDIF}
+ RIRegisterTCUSTOMRADIOGROUP(Cl);
+ RIRegisterTRADIOGROUP(Cl);
+ {$ENDIF}
+end;
+
+end.
+
+
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/uPSR_forms.pas b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSR_forms.pas
new file mode 100644
index 0000000..4a0f8f7
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSR_forms.pas
@@ -0,0 +1,264 @@
+
+unit uPSR_forms;
+
+{$I PascalScript.inc}
+interface
+uses
+ uPSRuntime, uPSUtils;
+
+procedure RIRegisterTCONTROLSCROLLBAR(Cl: TPSRuntimeClassImporter);
+{$IFNDEF FPC} procedure RIRegisterTSCROLLINGWINCONTROL(Cl: TPSRuntimeClassImporter);{$ENDIF}
+procedure RIRegisterTSCROLLBOX(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTFORM(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTAPPLICATION(Cl: TPSRuntimeClassImporter);
+
+procedure RIRegister_Forms(Cl: TPSRuntimeClassImporter);
+
+implementation
+uses
+ sysutils, classes, {$IFDEF CLX}QControls, QForms, QGraphics{$ELSE}Controls, Forms, Graphics{$ENDIF};
+
+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
+ begin
+ RegisterPropertyHelper(@TCONTROLSCROLLBARKIND_R, nil, 'KIND');
+ RegisterPropertyHelper(@TCONTROLSCROLLBARSCROLLPOS_R, nil, 'SCROLLPOS');
+ end;
+end;
+
+{$IFNDEF FPC}
+procedure RIRegisterTSCROLLINGWINCONTROL(Cl: TPSRuntimeClassImporter);
+begin
+ with Cl.Add(TSCROLLINGWINCONTROL) do
+ begin
+ RegisterMethod(@TSCROLLINGWINCONTROL.SCROLLINVIEW, 'SCROLLINVIEW');
+ end;
+end;
+{$ENDIF}
+
+procedure RIRegisterTSCROLLBOX(Cl: TPSRuntimeClassImporter);
+begin
+ Cl.Add(TSCROLLBOX);
+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;
+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;
+{$ENDIF}{CLX}
+procedure TFORMACTIVEMDICHILD_R(Self: TFORM; var T: TFORM); begin T := Self.ACTIVEMDICHILD; end;
+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];
+end;
+{$ENDIF}{FPC}
+
+procedure TFORMMODALRESULT_W(Self: TFORM; T: TMODALRESULT); begin Self.MODALRESULT := T; end;
+procedure TFORMMODALRESULT_R(Self: TFORM; var T: TMODALRESULT); begin T := Self.MODALRESULT; end;
+procedure TFORMACTIVE_R(Self: TFORM; var T: BOOLEAN); begin T := Self.ACTIVE; end;
+procedure TFORMCANVAS_R(Self: TFORM; var T: TCANVAS); begin T := Self.CANVAS; end;
+{$IFNDEF CLX}
+procedure TFORMCLIENTHANDLE_R(Self: TFORM; 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(@TFORMACTIVE_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(@TFORMACTIVEOLECONTROL_R, @TFORMACTIVEOLECONTROL_W, 'ACTIVEOLECONTROL');
+ RegisterPropertyHelper(@TFORMCLIENTHANDLE_R, nil, 'CLIENTHANDLE');
+ RegisterPropertyHelper(@TFORMTILEMODE_R, @TFORMTILEMODE_W, 'TILEMODE');
+{$ENDIF}{CLX}
+ RegisterMethod(@TFORM.CASCADE, 'CASCADE');
+ RegisterMethod(@TFORM.NEXT, 'NEXT');
+ RegisterMethod(@TFORM.PREVIOUS, 'PREVIOUS');
+ RegisterMethod(@TFORM.TILE, 'TILE');
+ RegisterPropertyHelper(@TFORMACTIVEMDICHILD_R, nil, 'ACTIVEMDICHILD');
+ RegisterPropertyHelper(@TFORMDROPTARGET_R, @TFORMDROPTARGET_W, 'DROPTARGET');
+ RegisterPropertyHelper(@TFORMMDICHILDCOUNT_R, nil, 'MDICHILDCOUNT');
+ RegisterPropertyHelper(@TFORMMDICHILDREN_R, nil, 'MDICHILDREN');
+ {$ENDIF}{FPC}
+ RegisterMethod(@TFORM.CLOSEQUERY, 'CLOSEQUERY');
+ RegisterMethod(@TFORM.DEFOCUSCONTROL, 'DEFOCUSCONTROL');
+ RegisterMethod(@TFORM.FOCUSCONTROL, 'FOCUSCONTROL');
+ RegisterMethod(@TFORM.SETFOCUSEDCONTROL, 'SETFOCUSEDCONTROL');
+ RegisterPropertyHelper(@TFORMCANVAS_R, nil, 'CANVAS');
+ RegisterPropertyHelper(@TFORMMODALRESULT_R, @TFORMMODALRESULT_W, 'MODALRESULT');
+ {$ENDIF}{PS_MINIVCL}
+ end;
+end;
+
+ {$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;
+procedure TAPPLICATIONHANDLE_R(Self: TAPPLICATION; var T: Longint); begin T := Self.HANDLE; end;
+procedure TAPPLICATIONHANDLE_W(Self: TAPPLICATION; T: Longint); begin Self.HANDLE := T; end;
+procedure TAPPLICATIONUPDATEFORMATSETTINGS_R(Self: TAPPLICATION; var T: BOOLEAN); begin T := Self.UPDATEFORMATSETTINGS; end;
+procedure TAPPLICATIONUPDATEFORMATSETTINGS_W(Self: TAPPLICATION; T: BOOLEAN); begin Self.UPDATEFORMATSETTINGS := T; end;
+{$ENDIF}
+{$ENDIF}{FPC}
+
+
+procedure TAPPLICATIONEXENAME_R(Self: TAPPLICATION; var T: STRING); begin T := Self.EXENAME; end;
+procedure TAPPLICATIONHELPFILE_R(Self: TAPPLICATION; var T: STRING); begin T := Self.HELPFILE; end;
+procedure TAPPLICATIONHELPFILE_W(Self: TAPPLICATION; T: STRING); begin Self.HELPFILE := T; end;
+procedure TAPPLICATIONHINT_R(Self: TAPPLICATION; var T: STRING); begin T := Self.HINT; end;
+procedure TAPPLICATIONHINT_W(Self: TAPPLICATION; T: STRING); begin Self.HINT := T; end;
+procedure TAPPLICATIONHINTCOLOR_R(Self: TAPPLICATION; var T: TCOLOR); begin T := Self.HINTCOLOR; end;
+procedure TAPPLICATIONHINTCOLOR_W(Self: TAPPLICATION; T: TCOLOR); begin Self.HINTCOLOR := T; end;
+procedure TAPPLICATIONHINTPAUSE_R(Self: TAPPLICATION; var T: INTEGER); begin T := Self.HINTPAUSE; end;
+procedure TAPPLICATIONHINTPAUSE_W(Self: TAPPLICATION; T: INTEGER); begin Self.HINTPAUSE := T; end;
+procedure TAPPLICATIONHINTSHORTPAUSE_R(Self: TAPPLICATION; var T: INTEGER); begin T := Self.HINTSHORTPAUSE; end;
+procedure TAPPLICATIONHINTSHORTPAUSE_W(Self: TAPPLICATION; T: INTEGER); begin Self.HINTSHORTPAUSE := T; end;
+procedure TAPPLICATIONHINTHIDEPAUSE_R(Self: TAPPLICATION; var T: INTEGER); begin T := Self.HINTHIDEPAUSE; end;
+procedure TAPPLICATIONHINTHIDEPAUSE_W(Self: TAPPLICATION; T: INTEGER); begin Self.HINTHIDEPAUSE := T; end;
+procedure TAPPLICATIONMAINFORM_R(Self: TAPPLICATION; var T: {$IFDEF DELPHI3UP}TCustomForm{$ELSE}TFORM{$ENDIF}); begin T := Self.MAINFORM; end;
+procedure TAPPLICATIONSHOWHINT_R(Self: TAPPLICATION; var T: BOOLEAN); begin T := Self.SHOWHINT; end;
+procedure TAPPLICATIONSHOWHINT_W(Self: TAPPLICATION; T: BOOLEAN); begin Self.SHOWHINT := T; end;
+procedure TAPPLICATIONSHOWMAINFORM_R(Self: TAPPLICATION; var T: BOOLEAN); begin T := Self.SHOWMAINFORM; end;
+procedure TAPPLICATIONSHOWMAINFORM_W(Self: TAPPLICATION; T: BOOLEAN); begin Self.SHOWMAINFORM := T; end;
+procedure TAPPLICATIONTERMINATED_R(Self: TAPPLICATION; var T: BOOLEAN); begin T := Self.TERMINATED; end;
+procedure TAPPLICATIONTITLE_R(Self: TAPPLICATION; var T: STRING); begin T := Self.TITLE; end;
+procedure TAPPLICATIONTITLE_W(Self: TAPPLICATION; T: STRING); begin Self.TITLE := T; end;
+
+{$IFNDEF FPC}
+procedure TAPPLICATIONONACTIVATE_R(Self: TAPPLICATION; var T: TNOTIFYEVENT); begin T := Self.ONACTIVATE; end;
+procedure TAPPLICATIONONACTIVATE_W(Self: TAPPLICATION; T: TNOTIFYEVENT); begin Self.ONACTIVATE := T; end;
+procedure TAPPLICATIONONDEACTIVATE_R(Self: TAPPLICATION; var T: TNOTIFYEVENT); begin T := Self.ONDEACTIVATE; end;
+procedure TAPPLICATIONONDEACTIVATE_W(Self: TAPPLICATION; T: TNOTIFYEVENT); begin Self.ONDEACTIVATE := T; end;
+{$ENDIF}
+
+procedure TAPPLICATIONONIDLE_R(Self: TAPPLICATION; var T: TIDLEEVENT); begin T := Self.ONIDLE; end;
+procedure TAPPLICATIONONIDLE_W(Self: TAPPLICATION; T: TIDLEEVENT); begin Self.ONIDLE := T; end;
+procedure TAPPLICATIONONHELP_R(Self: TAPPLICATION; var T: THELPEVENT); begin T := Self.ONHELP; end;
+procedure TAPPLICATIONONHELP_W(Self: TAPPLICATION; T: THELPEVENT); begin Self.ONHELP := T; end;
+procedure TAPPLICATIONONHINT_R(Self: TAPPLICATION; var T: TNOTIFYEVENT); begin T := Self.ONHINT; end;
+procedure TAPPLICATIONONHINT_W(Self: TAPPLICATION; T: TNOTIFYEVENT); begin Self.ONHINT := T; end;
+
+{$IFNDEF FPC}
+procedure TAPPLICATIONONMINIMIZE_R(Self: TAPPLICATION; var T: TNOTIFYEVENT); begin T := Self.ONMINIMIZE; end;
+procedure TAPPLICATIONONMINIMIZE_W(Self: TAPPLICATION; T: TNOTIFYEVENT); begin Self.ONMINIMIZE := T; end;
+
+procedure TAPPLICATIONONRESTORE_R(Self: TAPPLICATION; var T: TNOTIFYEVENT); begin T := Self.ONRESTORE; end;
+procedure TAPPLICATIONONRESTORE_W(Self: TAPPLICATION; T: TNOTIFYEVENT); begin Self.ONRESTORE := T; end;
+{$ENDIF}
+
+procedure RIRegisterTAPPLICATION(Cl: TPSRuntimeClassImporter);
+begin
+ with Cl.Add(TAPPLICATION) do
+ begin
+ {$IFNDEF FPC}
+ RegisterMethod(@TAPPLICATION.MINIMIZE, 'MINIMIZE');
+ RegisterMethod(@TAPPLICATION.RESTORE, 'RESTORE');
+ RegisterPropertyHelper(@TAPPLICATIONACTIVE_R, nil, 'ACTIVE');
+ RegisterPropertyHelper(@TAPPLICATIONONACTIVATE_R, @TAPPLICATIONONACTIVATE_W, 'ONACTIVATE');
+ RegisterPropertyHelper(@TAPPLICATIONONDEACTIVATE_R, @TAPPLICATIONONDEACTIVATE_W, 'ONDEACTIVATE');
+ RegisterPropertyHelper(@TAPPLICATIONONMINIMIZE_R, @TAPPLICATIONONMINIMIZE_W, 'ONMINIMIZE');
+ RegisterPropertyHelper(@TAPPLICATIONONRESTORE_R, @TAPPLICATIONONRESTORE_W, 'ONRESTORE');
+ RegisterPropertyHelper(@TAPPLICATIONDIALOGHANDLE_R, @TAPPLICATIONDIALOGHANDLE_W, 'DIALOGHANDLE');
+ RegisterMethod(@TAPPLICATION.CREATEHANDLE, 'CREATEHANDLE');
+ RegisterMethod(@TAPPLICATION.NORMALIZETOPMOSTS, 'NORMALIZETOPMOSTS');
+ RegisterMethod(@TAPPLICATION.RESTORETOPMOSTS, 'RESTORETOPMOSTS');
+ {$IFNDEF CLX}
+ RegisterPropertyHelper(@TAPPLICATIONHANDLE_R, @TAPPLICATIONHANDLE_W, 'HANDLE');
+ RegisterPropertyHelper(@TAPPLICATIONUPDATEFORMATSETTINGS_R, @TAPPLICATIONUPDATEFORMATSETTINGS_W, 'UPDATEFORMATSETTINGS');
+ {$ENDIF}
+ {$ENDIF}
+ RegisterMethod(@TAPPLICATION.BRINGTOFRONT, 'BRINGTOFRONT');
+ RegisterMethod(@TAPPLICATION.MESSAGEBOX, 'MESSAGEBOX');
+ RegisterMethod(@TAPPLICATION.PROCESSMESSAGES, 'PROCESSMESSAGES');
+ RegisterMethod(@TAPPLICATION.TERMINATE, 'TERMINATE');
+ RegisterPropertyHelper(@TAPPLICATIONEXENAME_R, nil, 'EXENAME');
+ RegisterPropertyHelper(@TAPPLICATIONHINT_R, @TAPPLICATIONHINT_W, 'HINT');
+ RegisterPropertyHelper(@TAPPLICATIONMAINFORM_R, nil, 'MAINFORM');
+ RegisterPropertyHelper(@TAPPLICATIONSHOWHINT_R, @TAPPLICATIONSHOWHINT_W, 'SHOWHINT');
+ RegisterPropertyHelper(@TAPPLICATIONSHOWMAINFORM_R, @TAPPLICATIONSHOWMAINFORM_W, 'SHOWMAINFORM');
+ RegisterPropertyHelper(@TAPPLICATIONTERMINATED_R, nil, 'TERMINATED');
+ RegisterPropertyHelper(@TAPPLICATIONTITLE_R, @TAPPLICATIONTITLE_W, 'TITLE');
+ RegisterPropertyHelper(@TAPPLICATIONONIDLE_R, @TAPPLICATIONONIDLE_W, 'ONIDLE');
+ RegisterPropertyHelper(@TAPPLICATIONONHINT_R, @TAPPLICATIONONHINT_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(@TAPPLICATIONHELPFILE_R, @TAPPLICATIONHELPFILE_W, 'HELPFILE');
+ RegisterPropertyHelper(@TAPPLICATIONHINTCOLOR_R, @TAPPLICATIONHINTCOLOR_W, 'HINTCOLOR');
+ RegisterPropertyHelper(@TAPPLICATIONHINTPAUSE_R, @TAPPLICATIONHINTPAUSE_W, 'HINTPAUSE');
+ RegisterPropertyHelper(@TAPPLICATIONHINTSHORTPAUSE_R, @TAPPLICATIONHINTSHORTPAUSE_W, 'HINTSHORTPAUSE');
+ RegisterPropertyHelper(@TAPPLICATIONHINTHIDEPAUSE_R, @TAPPLICATIONHINTHIDEPAUSE_W, 'HINTHIDEPAUSE');
+ RegisterPropertyHelper(@TAPPLICATIONONHELP_R, @TAPPLICATIONONHELP_W, 'ONHELP');
+ {$ENDIF}
+ end;
+end;
+
+procedure RIRegister_Forms(Cl: TPSRuntimeClassImporter);
+begin
+ {$IFNDEF PS_MINIVCL}
+ RIRegisterTCONTROLSCROLLBAR(cl);
+ RIRegisterTSCROLLBOX(cl);
+ {$ENDIF}
+{$IFNDEF FPC} RIRegisterTScrollingWinControl(cl);{$ENDIF}
+ RIRegisterTForm(Cl);
+ {$IFNDEF PS_MINIVCL}
+ RIRegisterTApplication(Cl);
+ {$ENDIF}
+end;
+
+
+// PS_MINIVCL changes by Martijn Laan (mlaan at wintax _dot_ nl)
+// FPC changes by Boguslaw brandys (brandys at o2 _dot_ pl)
+
+end.
+
+
+
+
+
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/uPSR_graphics.pas b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSR_graphics.pas
new file mode 100644
index 0000000..7a7643a
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSR_graphics.pas
@@ -0,0 +1,218 @@
+
+unit uPSR_graphics;
+{$I PascalScript.inc}
+interface
+uses
+ uPSRuntime, uPSUtils;
+
+
+
+procedure RIRegisterTGRAPHICSOBJECT(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTFont(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTPEN(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTBRUSH(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTCanvas(cl: TPSRuntimeClassImporter);
+procedure RIRegisterTGraphic(CL: TPSRuntimeClassImporter);
+procedure RIRegisterTBitmap(CL: TPSRuntimeClassImporter; Streams: Boolean);
+
+procedure RIRegister_Graphics(Cl: TPSRuntimeClassImporter; Streams: Boolean);
+
+implementation
+{$IFNDEF FPC}
+uses
+ Classes{$IFDEF CLX}, QGraphics{$ELSE}, Windows, Graphics{$ENDIF};
+{$ELSE}
+uses
+ Classes, Graphics,LCLType;
+{$ENDIF}
+
+{$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;
+{$ENDIF}
+procedure TFontPixelsPerInchR(Self: TFont; var T: Longint); begin T := Self.PixelsPerInch; end;
+procedure TFontPixelsPerInchW(Self: TFont; T: Longint); begin {$IFNDEF FPC} Self.PixelsPerInch := T;{$ENDIF} end;
+procedure TFontStyleR(Self: TFont; var T: TFontStyles); begin T := Self.Style; end;
+procedure TFontStyleW(Self: TFont; 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(@TFontHandleR, @TFontHandleW, 'HANDLE');
+{$ENDIF}
+ RegisterPropertyHelper(@TFontPixelsPerInchR, @TFontPixelsPerInchW, 'PIXELSPERINCH');
+ RegisterPropertyHelper(@TFontStyleR, @TFontStyleW, 'STYLE');
+ end;
+end;
+{$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;
+{$ENDIF}
+
+procedure TCanvasPixelsR(Self: TCanvas; var T: Longint; X,Y: Longint); begin T := Self.Pixels[X,Y]; end;
+procedure TCanvasPixelsW(Self: TCanvas; T, X, Y: Longint); begin Self.Pixels[X,Y]:= T; end;
+
+procedure RIRegisterTCanvas(cl: TPSRuntimeClassImporter); // requires TPersistent
+begin
+ with Cl.Add(TCanvas) do
+ begin
+{$IFNDEF FPC}
+ RegisterMethod(@TCanvas.Arc, 'ARC');
+ RegisterMethod(@TCanvas.Chord, 'CHORD');
+ RegisterMethod(@TCanvas.Rectangle, 'RECTANGLE');
+ RegisterMethod(@TCanvas.RoundRect, 'ROUNDRECT');
+ RegisterMethod(@TCanvas.Ellipse, 'ELLIPSE');
+ RegisterMethod(@TCanvas.FillRect, 'FILLRECT');
+{$ENDIF}
+ RegisterMethod(@TCanvas.Draw, 'DRAW');
+{$IFNDEF CLX}
+ RegisterMethod(@TCanvas.FloodFill, 'FLOODFILL');
+{$ENDIF}
+ 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(@TCanvasHandleR, @TCanvasHandleW, 'HANDLE');
+{$ENDIF}
+ RegisterPropertyHelper(@TCanvasPixelsR, @TCanvasPixelsW, 'PIXELS');
+ end;
+end;
+
+
+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
+ begin
+ RegisterPropertyHelper(@TGRAPHICSOBJECTONCHANGE_R, @TGRAPHICSOBJECTONCHANGE_W, 'ONCHANGE');
+ end;
+end;
+
+procedure RIRegisterTPEN(Cl: TPSRuntimeClassImporter);
+begin
+ with Cl.Add(TPEN) do
+ begin
+ RegisterConstructor(@TPEN.CREATE, 'CREATE');
+ end;
+end;
+
+procedure RIRegisterTBRUSH(Cl: TPSRuntimeClassImporter);
+begin
+ with Cl.Add(TBRUSH) do
+ begin
+ RegisterConstructor(@TBRUSH.CREATE, 'CREATE');
+ end;
+end;
+
+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;
+procedure TGraphicWidth_R(Self: TGraphic; var T: Integer); begin T := Self.Width; end;
+procedure TGraphicModified_W(Self: TGraphic; const T: Boolean); begin Self.Modified := T; end;
+procedure TGraphicModified_R(Self: TGraphic; var T: Boolean); begin T := Self.Modified; end;
+procedure TGraphicHeight_W(Self: TGraphic; const T: Integer); begin Self.Height := T; end;
+procedure TGraphicHeight_R(Self: TGraphic; var T: Integer); begin T := Self.Height; end;
+procedure TGraphicEmpty_R(Self: TGraphic; 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(@TGraphicEmpty_R,nil,'Empty');
+ RegisterPropertyHelper(@TGraphicHeight_R,@TGraphicHeight_W,'Height');
+ RegisterPropertyHelper(@TGraphicWidth_R,@TGraphicWidth_W,'Width');
+ RegisterPropertyHelper(@TGraphicOnChange_R,@TGraphicOnChange_W,'OnChange');
+
+ {$IFNDEF PS_MINIVCL}
+ RegisterPropertyHelper(@TGraphicModified_R,@TGraphicModified_W,'Modified');
+ {$ENDIF}
+ end;
+end;
+
+procedure TBitmapTransparentColor_R(Self: TBitmap; var T: TColor); begin T := Self.TransparentColor; end;
+{$IFNDEF CLX}
+{$IFNDEF FPC}
+procedure TBitmapIgnorePalette_W(Self: TBitmap; const T: Boolean); begin Self.IgnorePalette := T; end;
+procedure TBitmapIgnorePalette_R(Self: TBitmap; var T: Boolean); begin T := Self.IgnorePalette; end;
+{$ENDIF}
+procedure TBitmapPalette_W(Self: TBitmap; const T: HPALETTE); begin Self.Palette := T; end;
+procedure TBitmapPalette_R(Self: TBitmap; var T: HPALETTE); begin T := Self.Palette; end;
+{$ENDIF}
+procedure TBitmapMonochrome_W(Self: TBitmap; const T: Boolean); begin Self.Monochrome := T; end;
+procedure TBitmapMonochrome_R(Self: TBitmap; var T: Boolean); begin T := Self.Monochrome; end;
+{$IFNDEF CLX}
+procedure TBitmapHandle_W(Self: TBitmap; const T: HBITMAP); begin Self.Handle := T; end;
+procedure TBitmapHandle_R(Self: TBitmap; var T: HBITMAP); begin T := Self.Handle; end;
+{$ENDIF}
+procedure TBitmapCanvas_R(Self: TBitmap; 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(@TBitmapCanvas_R,nil,'Canvas');
+{$IFNDEF CLX}
+ RegisterPropertyHelper(@TBitmapHandle_R,@TBitmapHandle_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(@TBitmapMonochrome_R,@TBitmapMonochrome_W,'Monochrome');
+ RegisterPropertyHelper(@TBitmapPalette_R,@TBitmapPalette_W,'Palette');
+{$IFNDEF FPC}
+ RegisterPropertyHelper(@TBitmapIgnorePalette_R,@TBitmapIgnorePalette_W,'IgnorePalette');
+{$ENDIF}
+{$ENDIF}
+ RegisterPropertyHelper(@TBitmapTransparentColor_R,nil,'TransparentColor');
+ {$ENDIF}
+ end;
+end;
+
+procedure RIRegister_Graphics(Cl: TPSRuntimeClassImporter; Streams: Boolean);
+begin
+ RIRegisterTGRAPHICSOBJECT(cl);
+ RIRegisterTFont(Cl);
+ RIRegisterTCanvas(cl);
+ RIRegisterTPEN(cl);
+ RIRegisterTBRUSH(cl);
+ RIRegisterTGraphic(CL);
+ RIRegisterTBitmap(CL, Streams);
+end;
+
+// PS_MINIVCL changes by Martijn Laan (mlaan at wintax _dot_ nl)
+
+end.
+
+
+
+
+
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/uPSR_menus.pas b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSR_menus.pas
new file mode 100644
index 0000000..a4b4206
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSR_menus.pas
@@ -0,0 +1,460 @@
+
+Unit uPSR_menus;
+{$I PascalScript.inc}
+Interface
+Uses uPSRuntime;
+
+procedure RIRegister_Menus_Routines(S: TPSExec);
+{$IFNDEF FPC}
+procedure RIRegisterTMENUITEMSTACK(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTPOPUPLIST(Cl: TPSRuntimeClassImporter);
+{$ENDIF}
+procedure RIRegisterTPOPUPMENU(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTMAINMENU(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTMENU(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTMENUITEM(Cl: TPSRuntimeClassImporter);
+procedure RIRegister_Menus(CL: TPSRuntimeClassImporter);
+
+implementation
+{$IFDEF LINUX}
+{$IFNDEF FPC}
+Uses
+ Libc, SysUtils, Classes, QControls, QMenus, QGraphics;
+{$ELSE}
+Uses
+ Libc, SysUtils, Classes, Controls, Menus, Graphics, LCLType, ImgList;
+{$ENDIF}
+{$ELSE}
+Uses {$IFNDEF FPC}WINDOWS,{$ELSE} LCLType,{$ENDIF} SYSUTILS, CLASSES, CONTNRS, MESSAGES, GRAPHICS, IMGLIST, ACTNLIST, Menus;
+{$ENDIF}
+
+
+{$IFNDEF FPC}
+procedure TPOPUPLISTWINDOW_R(Self: TPOPUPLIST; var T: HWND);
+begin T := Self.WINDOW; end;
+{$ENDIF}
+
+procedure TPOPUPMENUONPOPUP_W(Self: TPOPUPMENU; const T: TNOTIFYEVENT);
+begin Self.ONPOPUP := T; end;
+
+procedure TPOPUPMENUONPOPUP_R(Self: TPOPUPMENU; var T: TNOTIFYEVENT);
+begin T := Self.ONPOPUP; end;
+
+{$IFNDEF FPC}
+procedure TPOPUPMENUTRACKBUTTON_W(Self: TPOPUPMENU; const T: TTRACKBUTTON);
+begin Self.TRACKBUTTON := T; end;
+
+procedure TPOPUPMENUTRACKBUTTON_R(Self: TPOPUPMENU; var T: TTRACKBUTTON);
+begin T := Self.TRACKBUTTON; end;
+
+
+procedure TPOPUPMENUMENUANIMATION_W(Self: TPOPUPMENU; const T: TMENUANIMATION);
+begin Self.MENUANIMATION := T; end;
+
+procedure TPOPUPMENUMENUANIMATION_R(Self: TPOPUPMENU; var T: TMENUANIMATION);
+begin T := Self.MENUANIMATION; end;
+
+procedure TPOPUPMENUHELPCONTEXT_W(Self: TPOPUPMENU; const T: THELPCONTEXT);
+begin Self.HELPCONTEXT := T; end;
+
+procedure TPOPUPMENUHELPCONTEXT_R(Self: TPOPUPMENU; var T: THELPCONTEXT);
+begin T := Self.HELPCONTEXT; end;
+{$ENDIF}
+
+procedure TPOPUPMENUAUTOPOPUP_W(Self: TPOPUPMENU; const T: BOOLEAN);
+begin Self.AUTOPOPUP := T; end;
+
+procedure TPOPUPMENUAUTOPOPUP_R(Self: TPOPUPMENU; var T: BOOLEAN);
+begin T := Self.AUTOPOPUP; end;
+
+{$IFNDEF FPC}
+procedure TPOPUPMENUALIGNMENT_W(Self: TPOPUPMENU; const T: TPOPUPALIGNMENT);
+begin Self.ALIGNMENT := T; end;
+
+procedure TPOPUPMENUALIGNMENT_R(Self: TPOPUPMENU; var T: TPOPUPALIGNMENT);
+begin T := Self.ALIGNMENT; end;
+{$ENDIF}
+
+procedure TPOPUPMENUPOPUPCOMPONENT_W(Self: TPOPUPMENU; const T: TCOMPONENT);
+begin Self.POPUPCOMPONENT := T; end;
+
+procedure TPOPUPMENUPOPUPCOMPONENT_R(Self: TPOPUPMENU; var T: TCOMPONENT);
+begin T := Self.POPUPCOMPONENT; end;
+
+{$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 TMENUITEMS_R(Self: TMENU; var T: TMENUITEM);
+begin T := Self.ITEMS; end;
+
+
+{$IFNDEF FPC}
+procedure TMENUWINDOWHANDLE_W(Self: TMENU; const T: HWND);
+begin Self.WINDOWHANDLE := T; end;
+
+procedure TMENUWINDOWHANDLE_R(Self: TMENU; var T: HWND);
+begin T := Self.WINDOWHANDLE; end;
+
+procedure TMENUPARENTBIDIMODE_W(Self: TMENU; const T: BOOLEAN);
+begin Self.PARENTBIDIMODE := T; end;
+
+procedure TMENUPARENTBIDIMODE_R(Self: TMENU; var T: BOOLEAN);
+begin T := Self.PARENTBIDIMODE; end;
+
+procedure TMENUOWNERDRAW_W(Self: TMENU; const T: BOOLEAN);
+begin Self.OWNERDRAW := T; end;
+
+procedure TMENUOWNERDRAW_R(Self: TMENU; var T: BOOLEAN);
+begin T := Self.OWNERDRAW; end;
+
+procedure TMENUBIDIMODE_W(Self: TMENU; const T: TBIDIMODE);
+begin Self.BIDIMODE := T; end;
+
+procedure TMENUBIDIMODE_R(Self: TMENU; var T: TBIDIMODE);
+begin T := Self.BIDIMODE; end;
+
+procedure TMENUAUTOLINEREDUCTION_W(Self: TMENU; const T: TMENUAUTOFLAG);
+begin Self.AUTOLINEREDUCTION := T; end;
+
+procedure TMENUAUTOLINEREDUCTION_R(Self: TMENU; var T: TMENUAUTOFLAG);
+begin T := Self.AUTOLINEREDUCTION; end;
+
+procedure TMENUAUTOHOTKEYS_W(Self: TMENU; const T: TMENUAUTOFLAG);
+begin Self.AUTOHOTKEYS := T; end;
+
+procedure TMENUAUTOHOTKEYS_R(Self: TMENU; var T: TMENUAUTOFLAG);
+begin T := Self.AUTOHOTKEYS; end;
+
+{$ENDIF}
+
+
+procedure TMENUHANDLE_R(Self: TMENU; var T: HMENU);
+begin T := Self.HANDLE; end;
+
+
+
+
+procedure TMENUIMAGES_W(Self: TMENU; const T: TCUSTOMIMAGELIST);
+begin Self.IMAGES := T; end;
+
+procedure TMENUIMAGES_R(Self: TMENU; var T: TCUSTOMIMAGELIST);
+begin T := Self.IMAGES; end;
+
+{$IFNDEF FPC}
+procedure TMENUITEMONMEASUREITEM_W(Self: TMENUITEM; const T: TMENUMEASUREITEMEVENT);
+begin Self.ONMEASUREITEM := T; end;
+
+procedure TMENUITEMONMEASUREITEM_R(Self: TMENUITEM; var T: TMENUMEASUREITEMEVENT);
+begin T := Self.ONMEASUREITEM; end;
+
+procedure TMENUITEMONADVANCEDDRAWITEM_W(Self: TMENUITEM; const T: TADVANCEDMENUDRAWITEMEVENT);
+begin Self.ONADVANCEDDRAWITEM := T; end;
+
+procedure TMENUITEMONADVANCEDDRAWITEM_R(Self: TMENUITEM; var T: TADVANCEDMENUDRAWITEMEVENT);
+begin T := Self.ONADVANCEDDRAWITEM; end;
+
+procedure TMENUITEMONDRAWITEM_W(Self: TMENUITEM; const T: TMENUDRAWITEMEVENT);
+begin Self.ONDRAWITEM := T; end;
+
+procedure TMENUITEMONDRAWITEM_R(Self: TMENUITEM; var T: TMENUDRAWITEMEVENT);
+begin T := Self.ONDRAWITEM; end;
+{$ENDIF}
+
+procedure TMENUITEMONCLICK_W(Self: TMENUITEM; const T: TNOTIFYEVENT);
+begin Self.ONCLICK := T; end;
+
+procedure TMENUITEMONCLICK_R(Self: TMENUITEM; var T: TNOTIFYEVENT);
+begin T := Self.ONCLICK; end;
+
+procedure TMENUITEMVISIBLE_W(Self: TMENUITEM; const T: BOOLEAN);
+begin Self.VISIBLE := T; end;
+
+procedure TMENUITEMVISIBLE_R(Self: TMENUITEM; var T: BOOLEAN);
+begin T := Self.VISIBLE; end;
+
+procedure TMENUITEMSHORTCUT_W(Self: TMENUITEM; const T: TSHORTCUT);
+begin Self.SHORTCUT := T; end;
+
+procedure TMENUITEMSHORTCUT_R(Self: TMENUITEM; var T: TSHORTCUT);
+begin T := Self.SHORTCUT; end;
+
+procedure TMENUITEMRADIOITEM_W(Self: TMENUITEM; const T: BOOLEAN);
+begin Self.RADIOITEM := T; end;
+
+procedure TMENUITEMRADIOITEM_R(Self: TMENUITEM; var T: BOOLEAN);
+begin T := Self.RADIOITEM; end;
+
+procedure TMENUITEMIMAGEINDEX_W(Self: TMENUITEM; const T: TIMAGEINDEX);
+begin Self.IMAGEINDEX := T; end;
+
+procedure TMENUITEMIMAGEINDEX_R(Self: TMENUITEM; var T: TIMAGEINDEX);
+begin T := Self.IMAGEINDEX; end;
+
+procedure TMENUITEMHINT_W(Self: TMENUITEM; const T: STRING);
+begin Self.HINT := T; end;
+
+procedure TMENUITEMHINT_R(Self: TMENUITEM; var T: STRING);
+begin T := Self.HINT; end;
+
+procedure TMENUITEMHELPCONTEXT_W(Self: TMENUITEM; const T: THELPCONTEXT);
+begin Self.HELPCONTEXT := T; end;
+
+procedure TMENUITEMHELPCONTEXT_R(Self: TMENUITEM; var T: THELPCONTEXT);
+begin T := Self.HELPCONTEXT; end;
+
+procedure TMENUITEMGROUPINDEX_W(Self: TMENUITEM; const T: BYTE);
+begin Self.GROUPINDEX := T; end;
+
+procedure TMENUITEMGROUPINDEX_R(Self: TMENUITEM; var T: BYTE);
+begin T := Self.GROUPINDEX; end;
+
+procedure TMENUITEMENABLED_W(Self: TMENUITEM; const T: BOOLEAN);
+begin Self.ENABLED := T; end;
+
+procedure TMENUITEMENABLED_R(Self: TMENUITEM; var T: BOOLEAN);
+begin T := Self.ENABLED; end;
+
+procedure TMENUITEMDEFAULT_W(Self: TMENUITEM; const T: BOOLEAN);
+begin Self.DEFAULT := T; end;
+
+procedure TMENUITEMDEFAULT_R(Self: TMENUITEM; var T: BOOLEAN);
+begin T := Self.DEFAULT; end;
+
+procedure TMENUITEMSUBMENUIMAGES_W(Self: TMENUITEM; const T: TCUSTOMIMAGELIST);
+begin Self.SUBMENUIMAGES := T; end;
+
+procedure TMENUITEMSUBMENUIMAGES_R(Self: TMENUITEM; var T: TCUSTOMIMAGELIST);
+begin T := Self.SUBMENUIMAGES; end;
+
+procedure TMENUITEMCHECKED_W(Self: TMENUITEM; const T: BOOLEAN);
+begin Self.CHECKED := T; end;
+
+procedure TMENUITEMCHECKED_R(Self: TMENUITEM; var T: BOOLEAN);
+begin T := Self.CHECKED; end;
+
+procedure TMENUITEMCAPTION_W(Self: TMENUITEM; const T: STRING);
+begin Self.CAPTION := T; end;
+
+procedure TMENUITEMCAPTION_R(Self: TMENUITEM; var T: STRING);
+begin T := Self.CAPTION; end;
+
+procedure TMENUITEMBITMAP_W(Self: TMENUITEM; const T: TBITMAP);
+begin Self.BITMAP := T; end;
+
+procedure TMENUITEMBITMAP_R(Self: TMENUITEM; var T: TBITMAP);
+begin T := Self.BITMAP; end;
+
+{$IFNDEF FPC}
+procedure TMENUITEMAUTOLINEREDUCTION_W(Self: TMENUITEM; const T: TMENUITEMAUTOFLAG);
+begin Self.AUTOLINEREDUCTION := T; end;
+
+procedure TMENUITEMAUTOLINEREDUCTION_R(Self: TMENUITEM; var T: TMENUITEMAUTOFLAG);
+begin T := Self.AUTOLINEREDUCTION; end;
+
+procedure TMENUITEMAUTOHOTKEYS_W(Self: TMENUITEM; const T: TMENUITEMAUTOFLAG);
+begin Self.AUTOHOTKEYS := T; end;
+
+procedure TMENUITEMAUTOHOTKEYS_R(Self: TMENUITEM; var T: TMENUITEMAUTOFLAG);
+begin T := Self.AUTOHOTKEYS; end;
+{$ENDIF}
+
+procedure TMENUITEMACTION_W(Self: TMENUITEM; const T: TBASICACTION);
+begin Self.ACTION := T; end;
+
+procedure TMENUITEMACTION_R(Self: TMENUITEM; var T: TBASICACTION);
+begin T := Self.ACTION; end;
+
+procedure TMENUITEMPARENT_R(Self: TMENUITEM; var T: TMENUITEM);
+begin T := Self.PARENT; end;
+
+procedure TMENUITEMMENUINDEX_W(Self: TMENUITEM; const T: INTEGER);
+begin Self.MENUINDEX := T; end;
+
+procedure TMENUITEMMENUINDEX_R(Self: TMENUITEM; var T: INTEGER);
+begin T := Self.MENUINDEX; end;
+
+procedure TMENUITEMITEMS_R(Self: TMENUITEM; var T: TMENUITEM; const t1: INTEGER);
+begin T := Self.ITEMS[t1]; end;
+
+procedure TMENUITEMCOUNT_R(Self: TMENUITEM; var T: INTEGER);
+begin T := Self.COUNT; end;
+
+procedure TMENUITEMHANDLE_R(Self: TMENUITEM; var T: HMENU);
+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
+ 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(@TMENUITEMAUTOHOTKEYS_R,@TMENUITEMAUTOHOTKEYS_W,'AUTOHOTKEYS');
+ RegisterPropertyHelper(@TMENUITEMAUTOLINEREDUCTION_R,@TMENUITEMAUTOLINEREDUCTION_W,'AUTOLINEREDUCTION');
+ RegisterEventPropertyHelper(@TMENUITEMONDRAWITEM_R,@TMENUITEMONDRAWITEM_W,'ONDRAWITEM');
+ RegisterEventPropertyHelper(@TMENUITEMONADVANCEDDRAWITEM_R,@TMENUITEMONADVANCEDDRAWITEM_W,'ONADVANCEDDRAWITEM');
+ RegisterEventPropertyHelper(@TMENUITEMONMEASUREITEM_R,@TMENUITEMONMEASUREITEM_W,'ONMEASUREITEM');
+{$ENDIF}
+ RegisterPropertyHelper(@TMENUITEMCOMMAND_R,nil,'COMMAND');
+ RegisterPropertyHelper(@TMENUITEMHANDLE_R,nil,'HANDLE');
+ RegisterPropertyHelper(@TMENUITEMCOUNT_R,nil,'COUNT');
+ RegisterPropertyHelper(@TMENUITEMITEMS_R,nil,'ITEMS');
+ RegisterPropertyHelper(@TMENUITEMMENUINDEX_R,@TMENUITEMMENUINDEX_W,'MENUINDEX');
+ RegisterPropertyHelper(@TMENUITEMPARENT_R,nil,'PARENT');
+ RegisterPropertyHelper(@TMENUITEMACTION_R,@TMENUITEMACTION_W,'ACTION');
+ RegisterPropertyHelper(@TMENUITEMBITMAP_R,@TMENUITEMBITMAP_W,'BITMAP');
+ RegisterPropertyHelper(@TMENUITEMCAPTION_R,@TMENUITEMCAPTION_W,'CAPTION');
+ RegisterPropertyHelper(@TMENUITEMCHECKED_R,@TMENUITEMCHECKED_W,'CHECKED');
+ RegisterPropertyHelper(@TMENUITEMSUBMENUIMAGES_R,@TMENUITEMSUBMENUIMAGES_W,'SUBMENUIMAGES');
+ RegisterPropertyHelper(@TMENUITEMDEFAULT_R,@TMENUITEMDEFAULT_W,'DEFAULT');
+ RegisterPropertyHelper(@TMENUITEMENABLED_R,@TMENUITEMENABLED_W,'ENABLED');
+ RegisterPropertyHelper(@TMENUITEMGROUPINDEX_R,@TMENUITEMGROUPINDEX_W,'GROUPINDEX');
+ RegisterPropertyHelper(@TMENUITEMHELPCONTEXT_R,@TMENUITEMHELPCONTEXT_W,'HELPCONTEXT');
+ RegisterPropertyHelper(@TMENUITEMHINT_R,@TMENUITEMHINT_W,'HINT');
+ RegisterPropertyHelper(@TMENUITEMIMAGEINDEX_R,@TMENUITEMIMAGEINDEX_W,'IMAGEINDEX');
+ RegisterPropertyHelper(@TMENUITEMRADIOITEM_R,@TMENUITEMRADIOITEM_W,'RADIOITEM');
+ RegisterPropertyHelper(@TMENUITEMSHORTCUT_R,@TMENUITEMSHORTCUT_W,'SHORTCUT');
+ RegisterPropertyHelper(@TMENUITEMVISIBLE_R,@TMENUITEMVISIBLE_W,'VISIBLE');
+ RegisterEventPropertyHelper(@TMENUITEMONCLICK_R,@TMENUITEMONCLICK_W,'ONCLICK');
+ end;
+end;
+
+procedure RIRegister_Menus(CL: TPSRuntimeClassImporter);
+begin
+ RIRegisterTMENUITEM(Cl);
+ RIRegisterTMENU(Cl);
+ RIRegisterTPOPUPMENU(Cl);
+ RIRegisterTMAINMENU(Cl);
+ {$IFNDEF FPC}
+ RIRegisterTPOPUPLIST(Cl);
+ RIRegisterTMENUITEMSTACK(Cl);
+ {$ENDIF}
+end;
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/uPSR_std.pas b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSR_std.pas
new file mode 100644
index 0000000..a67946e
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSR_std.pas
@@ -0,0 +1,85 @@
+
+unit uPSR_std;
+{$I PascalScript.inc}
+interface
+uses
+ uPSRuntime, uPSUtils;
+
+
+procedure RIRegisterTObject(CL: TPSRuntimeClassImporter);
+procedure RIRegisterTPersistent(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTComponent(Cl: TPSRuntimeClassImporter);
+procedure RIRegister_Std(Cl: TPSRuntimeClassImporter);
+
+implementation
+uses
+ Classes;
+
+
+
+procedure RIRegisterTObject(CL: TPSRuntimeClassImporter);
+begin
+ with cl.Add(TObject) do
+ begin
+ RegisterConstructor(@TObject.Create, 'CREATE');
+ RegisterMethod(@TObject.Free, 'FREE');
+ end;
+end;
+
+procedure RIRegisterTPersistent(Cl: TPSRuntimeClassImporter);
+begin
+ with Cl.Add(TPersistent) do
+ begin
+ RegisterVirtualMethod(@TPersistent.Assign, 'ASSIGN');
+ end;
+end;
+
+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;
+procedure TCOMPONENTCOMPONENTINDEX_W(Self: TCOMPONENT; T: INTEGER); begin Self.COMPONENTINDEX := t; end;
+procedure TCOMPONENTCOMPONENTSTATE_R(Self: TCOMPONENT; var T: TCOMPONENTSTATE); begin t := Self.COMPONENTSTATE; end;
+procedure TCOMPONENTDESIGNINFO_R(Self: TCOMPONENT; var T: LONGINT); begin t := Self.DESIGNINFO; end;
+procedure TCOMPONENTDESIGNINFO_W(Self: TCOMPONENT; 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(@TComponentOwnerR, nil, 'OWNER');
+
+ RegisterMethod(@TCOMPONENT.DESTROYCOMPONENTS, 'DESTROYCOMPONENTS');
+ RegisterPropertyHelper(@TCOMPONENTCOMPONENTS_R, nil, 'COMPONENTS');
+ RegisterPropertyHelper(@TCOMPONENTCOMPONENTCOUNT_R, nil, 'COMPONENTCOUNT');
+ RegisterPropertyHelper(@TCOMPONENTCOMPONENTINDEX_R, @TCOMPONENTCOMPONENTINDEX_W, 'COMPONENTINDEX');
+ RegisterPropertyHelper(@TCOMPONENTCOMPONENTSTATE_R, nil, 'COMPONENTSTATE');
+ RegisterPropertyHelper(@TCOMPONENTDESIGNINFO_R, @TCOMPONENTDESIGNINFO_W, 'DESIGNINFO');
+ end;
+end;
+
+
+
+
+
+
+
+procedure RIRegister_Std(Cl: TPSRuntimeClassImporter);
+begin
+ RIRegisterTObject(CL);
+ RIRegisterTPersistent(Cl);
+ RIRegisterTComponent(Cl);
+end;
+// PS_MINIVCL changes by Martijn Laan (mlaan at wintax _dot_ nl)
+
+end.
+
+
+
+
+
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/uPSR_stdctrls.pas b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSR_stdctrls.pas
new file mode 100644
index 0000000..87eeab9
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSR_stdctrls.pas
@@ -0,0 +1,287 @@
+{ STDCtrls import unit }
+unit uPSR_stdctrls;
+
+{$I PascalScript.inc}
+interface
+uses
+ uPSRuntime, uPSUtils;
+
+
+procedure RIRegisterTCUSTOMGROUPBOX(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTGROUPBOX(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTCUSTOMLABEL(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTLABEL(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTCUSTOMEDIT(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTEDIT(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTCUSTOMMEMO(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTMEMO(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTCUSTOMCOMBOBOX(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTCOMBOBOX(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTBUTTONCONTROL(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTBUTTON(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTCUSTOMCHECKBOX(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTCHECKBOX(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTRADIOBUTTON(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTCUSTOMLISTBOX(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTLISTBOX(Cl: TPSRuntimeClassImporter);
+procedure RIRegisterTSCROLLBAR(Cl: TPSRuntimeClassImporter);
+
+procedure RIRegister_stdctrls(cl: TPSRuntimeClassImporter);
+
+implementation
+uses
+ sysutils, classes{$IFDEF CLX}, QControls, QStdCtrls, QGraphics{$ELSE}, controls, stdctrls, Graphics{$ENDIF}{$IFDEF FPC},buttons{$ENDIF};
+
+procedure RIRegisterTCUSTOMGROUPBOX(Cl: TPSRuntimeClassImporter);
+begin
+ Cl.Add(TCUSTOMGROUPBOX);
+end;
+
+
+procedure RIRegisterTGROUPBOX(Cl: TPSRuntimeClassImporter);
+begin
+ Cl.Add(TGROUPBOX);
+end;
+{$IFNDEF CLX}
+procedure TCUSTOMLABELCANVAS_R(Self: TCUSTOMLABEL; var T: TCanvas); begin T := Self.CANVAS; end;
+{$ENDIF}
+
+procedure RIRegisterTCUSTOMLABEL(Cl: TPSRuntimeClassImporter);
+begin
+ with Cl.Add(TCUSTOMLABEL) do
+ begin
+ {$IFNDEF PS_MINIVCL}
+{$IFNDEF CLX}
+ RegisterPropertyHelper(@TCUSTOMLABELCANVAS_R, nil, 'CANVAS');
+{$ENDIF}
+ {$ENDIF}
+ end;
+end;
+
+procedure RIRegisterTLABEL(Cl: TPSRuntimeClassImporter);
+begin
+ Cl.Add(TLABEL);
+end;
+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;
+procedure TCUSTOMEDITSELSTART_R(Self: TCUSTOMEDIT; var T: INTEGER); begin T := Self.SELSTART; end;
+procedure TCUSTOMEDITSELSTART_W(Self: TCUSTOMEDIT; T: INTEGER); begin Self.SELSTART := T; end;
+procedure TCUSTOMEDITSELTEXT_R(Self: TCUSTOMEDIT; var T: STRING); begin T := Self.SELTEXT; end;
+procedure TCUSTOMEDITSELTEXT_W(Self: TCUSTOMEDIT; T: STRING); begin Self.SELTEXT := T; end;
+procedure TCUSTOMEDITTEXT_R(Self: TCUSTOMEDIT; var T: string); begin T := Self.TEXT; end;
+procedure TCUSTOMEDITTEXT_W(Self: TCUSTOMEDIT; 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(@TCUSTOMEDITMODIFIED_R, @TCUSTOMEDITMODIFIED_W, 'MODIFIED');
+ RegisterPropertyHelper(@TCUSTOMEDITSELLENGTH_R, @TCUSTOMEDITSELLENGTH_W, 'SELLENGTH');
+ RegisterPropertyHelper(@TCUSTOMEDITSELSTART_R, @TCUSTOMEDITSELSTART_W, 'SELSTART');
+ RegisterPropertyHelper(@TCUSTOMEDITSELTEXT_R, @TCUSTOMEDITSELTEXT_W, 'SELTEXT');
+ RegisterPropertyHelper(@TCUSTOMEDITTEXT_R, @TCUSTOMEDITTEXT_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;
+
+procedure RIRegisterTEDIT(Cl: TPSRuntimeClassImporter);
+begin
+ Cl.Add(TEDIT);
+end;
+
+
+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
+ begin
+ {$IFNDEF CLX}
+ RegisterPropertyHelper(@TCUSTOMMEMOLINES_R, @TCUSTOMMEMOLINES_W, 'LINES');
+ {$ENDIF}
+ end;
+end;
+
+
+procedure RIRegisterTMEMO(Cl: TPSRuntimeClassImporter);
+begin
+ with Cl.Add(TMEMO) do
+ begin
+ {$IFDEF CLX}
+ RegisterPropertyHelper(@TCUSTOMMEMOLINES_R, @TCUSTOMMEMOLINES_W, 'LINES');
+ {$ENDIF}
+ end;
+end;
+
+
+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;
+procedure TCUSTOMCOMBOBOXITEMS_W(Self: TCUSTOMCOMBOBOX; T: TSTRINGS); begin Self.ITEMS := T; end;
+procedure TCUSTOMCOMBOBOXITEMINDEX_R(Self: TCUSTOMCOMBOBOX; var T: INTEGER); begin T := Self.ITEMINDEX; end;
+procedure TCUSTOMCOMBOBOXITEMINDEX_W(Self: TCUSTOMCOMBOBOX; T: INTEGER); begin Self.ITEMINDEX := T; end;
+procedure TCUSTOMCOMBOBOXSELLENGTH_R(Self: TCUSTOMCOMBOBOX; var T: INTEGER); begin T := Self.SELLENGTH; end;
+procedure TCUSTOMCOMBOBOXSELLENGTH_W(Self: TCUSTOMCOMBOBOX; T: INTEGER); begin Self.SELLENGTH := T; end;
+procedure TCUSTOMCOMBOBOXSELSTART_R(Self: TCUSTOMCOMBOBOX; var T: INTEGER); begin T := Self.SELSTART; end;
+procedure TCUSTOMCOMBOBOXSELSTART_W(Self: TCUSTOMCOMBOBOX; T: INTEGER); begin Self.SELSTART := T; end;
+procedure TCUSTOMCOMBOBOXSELTEXT_R(Self: TCUSTOMCOMBOBOX; var T: STRING); begin T := Self.SELTEXT; end;
+procedure TCUSTOMCOMBOBOXSELTEXT_W(Self: TCUSTOMCOMBOBOX; T: STRING); begin Self.SELTEXT := T; end;
+
+
+procedure RIRegisterTCUSTOMCOMBOBOX(Cl: TPSRuntimeClassImporter);
+begin
+ with Cl.Add(TCUSTOMCOMBOBOX) do
+ begin
+ RegisterPropertyHelper(@TCUSTOMCOMBOBOXDROPPEDDOWN_R, @TCUSTOMCOMBOBOXDROPPEDDOWN_W, 'DROPPEDDOWN');
+ RegisterPropertyHelper(@TCUSTOMCOMBOBOXITEMS_R, @TCUSTOMCOMBOBOXITEMS_W, 'ITEMS');
+ RegisterPropertyHelper(@TCUSTOMCOMBOBOXITEMINDEX_R, @TCUSTOMCOMBOBOXITEMINDEX_W, 'ITEMINDEX');
+
+ {$IFNDEF PS_MINIVCL}
+ RegisterMethod(@TCUSTOMCOMBOBOX.CLEAR, 'CLEAR');
+ RegisterMethod(@TCUSTOMCOMBOBOX.SELECTALL, 'SELECTALL');
+ RegisterPropertyHelper(@TCUSTOMCOMBOBOXCANVAS_R, nil, 'CANVAS');
+ RegisterPropertyHelper(@TCUSTOMCOMBOBOXSELLENGTH_R, @TCUSTOMCOMBOBOXSELLENGTH_W, 'SELLENGTH');
+ RegisterPropertyHelper(@TCUSTOMCOMBOBOXSELSTART_R, @TCUSTOMCOMBOBOXSELSTART_W, 'SELSTART');
+ RegisterPropertyHelper(@TCUSTOMCOMBOBOXSELTEXT_R, @TCUSTOMCOMBOBOXSELTEXT_W, 'SELTEXT');
+ {$ENDIF}
+ end;
+end;
+
+
+
+
+procedure RIRegisterTCOMBOBOX(Cl: TPSRuntimeClassImporter);
+begin
+ Cl.Add(TCOMBOBOX);
+end;
+
+
+
+procedure RIRegisterTBUTTONCONTROL(Cl: TPSRuntimeClassImporter);
+begin
+ Cl.Add(TBUTTONCONTROL);
+end;
+
+
+
+procedure RIRegisterTBUTTON(Cl: TPSRuntimeClassImporter);
+begin
+ Cl.Add(TBUTTON);
+end;
+
+
+
+
+procedure RIRegisterTCUSTOMCHECKBOX(Cl: TPSRuntimeClassImporter);
+begin
+ Cl.Add(TCUSTOMCHECKBOX);
+end;
+
+
+procedure RIRegisterTCHECKBOX(Cl: TPSRuntimeClassImporter);
+begin
+ Cl.Add(TCHECKBOX);
+end;
+
+
+procedure RIRegisterTRADIOBUTTON(Cl: TPSRuntimeClassImporter);
+begin
+ Cl.Add(TRADIOBUTTON);
+end;
+
+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;
+procedure TCUSTOMLISTBOXITEMINDEX_W(Self: TCUSTOMLISTBOX; T: INTEGER); begin Self.ITEMINDEX := T; end;
+procedure TCUSTOMLISTBOXSELCOUNT_R(Self: TCUSTOMLISTBOX; var T: INTEGER); begin T := Self.SELCOUNT; end;
+procedure TCUSTOMLISTBOXSELECTED_R(Self: TCUSTOMLISTBOX; var T: BOOLEAN; t1: INTEGER); begin T := Self.SELECTED[t1]; end;
+procedure TCUSTOMLISTBOXSELECTED_W(Self: TCUSTOMLISTBOX; T: BOOLEAN; t1: INTEGER); begin Self.SELECTED[t1] := T; end;
+procedure TCUSTOMLISTBOXTOPINDEX_R(Self: TCUSTOMLISTBOX; var T: INTEGER); begin T := Self.TOPINDEX; end;
+procedure TCUSTOMLISTBOXTOPINDEX_W(Self: TCUSTOMLISTBOX; T: INTEGER); begin Self.TOPINDEX := T; end;
+
+
+procedure RIRegisterTCUSTOMLISTBOX(Cl: TPSRuntimeClassImporter);
+begin
+ with Cl.Add(TCUSTOMLISTBOX) do
+ begin
+ RegisterPropertyHelper(@TCUSTOMLISTBOXITEMS_R, @TCUSTOMLISTBOXITEMS_W, 'ITEMS');
+ RegisterPropertyHelper(@TCUSTOMLISTBOXITEMINDEX_R, @TCUSTOMLISTBOXITEMINDEX_W, 'ITEMINDEX');
+ RegisterPropertyHelper(@TCUSTOMLISTBOXSELCOUNT_R, nil, 'SELCOUNT');
+ RegisterPropertyHelper(@TCUSTOMLISTBOXSELECTED_R, @TCUSTOMLISTBOXSELECTED_W, 'SELECTED');
+
+ {$IFNDEF PS_MINIVCL}
+ RegisterMethod(@TCUSTOMLISTBOX.CLEAR, 'CLEAR');
+ RegisterMethod(@TCUSTOMLISTBOX.ITEMATPOS, 'ITEMATPOS');
+ RegisterMethod(@TCUSTOMLISTBOX.ITEMRECT, 'ITEMRECT');
+ RegisterPropertyHelper(@TCUSTOMLISTBOXCANVAS_R, nil, 'CANVAS');
+ RegisterPropertyHelper(@TCUSTOMLISTBOXTOPINDEX_R, @TCUSTOMLISTBOXTOPINDEX_W, 'TOPINDEX');
+ {$ENDIF}
+ end;
+end;
+
+
+procedure RIRegisterTLISTBOX(Cl: TPSRuntimeClassImporter);
+begin
+ Cl.Add(TLISTBOX);
+end;
+
+
+procedure RIRegisterTSCROLLBAR(Cl: TPSRuntimeClassImporter);
+begin
+ with Cl.Add(TSCROLLBAR) do
+ begin
+ RegisterMethod(@TSCROLLBAR.SETPARAMS, 'SETPARAMS');
+ end;
+end;
+
+
+procedure RIRegister_stdctrls(cl: TPSRuntimeClassImporter);
+begin
+ {$IFNDEF PS_MINIVCL}
+ RIRegisterTCUSTOMGROUPBOX(Cl);
+ RIRegisterTGROUPBOX(Cl);
+ {$ENDIF}
+ RIRegisterTCUSTOMLABEL(Cl);
+ RIRegisterTLABEL(Cl);
+ RIRegisterTCUSTOMEDIT(Cl);
+ RIRegisterTEDIT(Cl);
+ RIRegisterTCUSTOMMEMO(Cl);
+ RIRegisterTMEMO(Cl);
+ RIRegisterTCUSTOMCOMBOBOX(Cl);
+ RIRegisterTCOMBOBOX(Cl);
+ RIRegisterTBUTTONCONTROL(Cl);
+ RIRegisterTBUTTON(Cl);
+ RIRegisterTCUSTOMCHECKBOX(Cl);
+ RIRegisterTCHECKBOX(Cl);
+ RIRegisterTRADIOBUTTON(Cl);
+ RIRegisterTCUSTOMLISTBOX(Cl);
+ RIRegisterTLISTBOX(Cl);
+ {$IFNDEF PS_MINIVCL}
+ RIRegisterTSCROLLBAR(Cl);
+ {$ENDIF}
+end;
+
+// PS_MINIVCL changes by Martijn Laan (mlaan at wintax _dot_ nl)
+
+end.
+
+
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/uPSRuntime.pas b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSRuntime.pas
new file mode 100644
index 0000000..80585f6
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSRuntime.pas
@@ -0,0 +1,11748 @@
+unit uPSRuntime;
+{$I PascalScript.inc}
+{
+
+Innerfuse Pascal Script III
+Copyright (C) 2000-2004 by Carlo Kok (ck@carlo-kok.com)
+
+}
+interface
+uses
+ SysUtils, uPSUtils{$IFDEF DELPHI6UP}, variants{$ENDIF}{$IFNDEF PS_NOIDISPATCH}{$IFDEF DELPHI3UP}, ActiveX, Windows{$ELSE}, Ole2{$ENDIF}{$ENDIF};
+
+
+type
+ TPSExec = class;
+ TPSStack = class;
+ TPSRuntimeAttributes = class;
+ TPSRuntimeAttribute = class;
+
+ TPSError = (ErNoError, erCannotImport, erInvalidType, ErInternalError,
+ erInvalidHeader, erInvalidOpcode, erInvalidOpcodeParameter, erNoMainProc,
+ erOutOfGlobalVarsRange, erOutOfProcRange, ErOutOfRange, erOutOfStackRange,
+ ErTypeMismatch, erUnexpectedEof, erVersionError, ErDivideByZero, ErMathError,
+ erCouldNotCallProc, erOutofRecordRange, erOutOfMemory, erException,
+ erNullPointerException, erNullVariantError, eInterfaceNotSupported, erCustomError);
+
+ TPSStatus = (isNotLoaded, isLoaded, isRunning, isPaused);
+
+ PByteArray = ^TByteArray;
+
+ TByteArray = array[0..1023] of Byte;
+
+ PDWordArray = ^TDWordArray;
+
+ TDWordArray = array[0..1023] of Cardinal;
+{@link(TPSProcRec)
+ PIFProcRec is a pointer to a TIProcRec record}
+ TPSProcRec = class;
+ TIFProcRec = TPSProcRec;
+ TPSExternalProcRec = class;
+ TIFPSExternalProcRec = TPSExternalProcRec;
+ TIFExternalProcRec = TPSExternalProcRec;
+ PIFProcRec = TPSProcRec;
+ PProcRec = ^TProcRec;
+
+ TPSProcPtr = function(Caller: TPSExec; p: TPSExternalProcRec; Global, Stack: TPSStack): Boolean;
+
+ TPSFreeProc = procedure (Caller: TPSExec; p: PProcRec);
+
+ TPSProcRec = class
+ private
+ FAttributes: TPSRuntimeAttributes;
+ public
+
+ constructor Create(Owner: TPSExec);
+
+ destructor Destroy; override;
+
+
+ property Attributes: TPSRuntimeAttributes read FAttributes;
+ end;
+
+ TPSExternalProcRec = class(TPSProcRec)
+ private
+ FExt1: Pointer;
+ FExt2: Pointer;
+ FName: string;
+ FProcPtr: TPSProcPtr;
+ FDecl: string;
+ public
+
+ property Name: string read FName write FName;
+
+ property Decl: string read FDecl write FDecl;
+
+ property Ext1: Pointer read FExt1 write FExt1;
+
+ property Ext2: Pointer read FExt2 write FExt2;
+
+ property ProcPtr: TPSProcPtr read FProcPtr write FProcPtr;
+ end;
+
+ TPSInternalProcRec = class(TPSProcRec)
+ private
+ FData: PByteArray;
+ FLength: Cardinal;
+ FExportNameHash: Longint;
+ FExportDecl: string;
+ FExportName: string;
+ public
+
+ property Data: PByteArray read FData;
+
+ property Length: Cardinal read FLength;
+
+ property ExportNameHash: Longint read FExportNameHash;
+
+ property ExportName: string read FExportName write FExportName;
+
+ property ExportDecl: string read FExportDecl write FExportDecl;
+
+
+ destructor Destroy; override;
+ end;
+
+ TProcRec = record
+
+ Name: ShortString;
+
+ Hash: Longint;
+
+ ProcPtr: TPSProcPtr;
+
+ FreeProc: TPSFreeProc;
+
+ Ext1, Ext2: Pointer;
+ end;
+
+ PBTReturnAddress = ^TBTReturnAddress;
+
+ TBTReturnAddress = packed record
+
+ ProcNo: TPSInternalProcRec;
+
+ Position, StackBase: Cardinal;
+ end;
+
+ TPSTypeRec = class
+ private
+ FExportNameHash: Longint;
+ FExportName: string;
+ FBaseType: TPSBaseType;
+ FAttributes: TPSRuntimeAttributes;
+ protected
+ FRealSize: Cardinal;
+ public
+
+ property RealSize: Cardinal read FRealSize;
+
+ property BaseType: TPSBaseType read FBaseType write FBaseType;
+
+ property ExportName: string read FExportName write FExportName;
+
+ property ExportNameHash: Longint read FExportNameHash write FExportNameHash;
+
+ property Attributes: TPSRuntimeAttributes read FAttributes write FAttributes;
+
+ procedure CalcSize; virtual;
+
+ constructor Create(Owner: TPSExec);
+ destructor Destroy; override;
+ end;
+
+ TPSTypeRec_ProcPtr = class(TPSTypeRec)
+ private
+ FParamInfo: string;
+ public
+
+ property ParamInfo: string read FParamInfo write FParamInfo;
+ procedure CalcSize; override;
+ end;
+ PIFTypeRec = TPSTypeRec;
+
+ TPSTypeRec_Class = class(TPSTypeRec)
+ private
+ FCN: string;
+ public
+
+ property CN: string read FCN write FCN;
+ end;
+{$IFNDEF PS_NOINTERFACES}
+
+ TPSTypeRec_Interface = class(TPSTypeRec)
+ private
+ FGuid: TGUID;
+ public
+
+ property Guid: TGUID read FGuid write FGuid;
+ end;
+{$ENDIF}
+
+ TPSTypeRec_Array = class(TPSTypeRec)
+ private
+ FArrayType: TPSTypeRec;
+ public
+
+ property ArrayType: TPSTypeRec read FArrayType write FArrayType;
+ procedure CalcSize; override;
+ end;
+
+ TPSTypeRec_StaticArray = class(TPSTypeRec_Array)
+ private
+ FSize: Longint;
+ FStartOffset: LongInt;
+ public
+
+ property Size: Longint read FSize write FSize;
+ property StartOffset: LongInt read FStartOffset write FStartOffset;
+
+ procedure CalcSize; override;
+ end;
+
+ TPSTypeRec_Set = class(TPSTypeRec)
+ private
+ FBitSize: Longint;
+ FByteSize: Longint;
+ public
+ {The number of bytes this would require (same as realsize)}
+ property aByteSize: Longint read FByteSize write FByteSize;
+ property aBitSize: Longint read FBitSize write FBitSize;
+ procedure CalcSize; override;
+ end;
+
+ TPSTypeRec_Record = class(TPSTypeRec)
+ private
+ FFieldTypes: TPSList;
+ FRealFieldOffsets: TPSList;
+ public
+
+ property FieldTypes: TPSList read FFieldTypes;
+
+ property RealFieldOffsets: TPSList read FRealFieldOffsets;
+
+ procedure CalcSize; override;
+
+ constructor Create(Owner: TPSExec);
+ destructor Destroy; override;
+ end;
+
+ PPSVariant = ^TPSVariant;
+
+ PIFVariant = PPSVariant;
+
+ TPSVariant = packed record
+ FType: TPSTypeRec;
+ end;
+
+ PPSVariantData = ^TPSVariantData;
+
+ TPSVariantData = packed record
+ VI: TPSVariant;
+ Data: array[0..0] of Byte;
+ end;
+
+ PPSVariantU8 = ^TPSVariantU8;
+
+ TPSVariantU8 = packed record
+ VI: TPSVariant;
+ Data: tbtU8;
+ end;
+
+
+ PPSVariantS8 = ^TPSVariantS8;
+
+ TPSVariantS8 = packed record
+ VI: TPSVariant;
+ Data: tbts8;
+ end;
+
+
+ PPSVariantU16 = ^TPSVariantU16;
+
+ TPSVariantU16 = packed record
+ VI: TPSVariant;
+ Data: tbtU16;
+ end;
+
+
+ PPSVariantS16 = ^TPSVariantS16;
+
+ TPSVariantS16 = packed record
+ VI: TPSVariant;
+ Data: tbts16;
+ end;
+
+
+ PPSVariantU32 = ^TPSVariantU32;
+
+ TPSVariantU32 = packed record
+ VI: TPSVariant;
+ Data: tbtU32;
+ end;
+
+
+ PPSVariantS32 = ^TPSVariantS32;
+
+ TPSVariantS32 = packed record
+ VI: TPSVariant;
+ Data: tbts32;
+ end;
+{$IFNDEF PS_NOINT64}
+
+ PPSVariantS64 = ^TPSVariantS64;
+
+ TPSVariantS64 = packed record
+ VI: TPSVariant;
+ Data: tbts64;
+ end;
+{$ENDIF}
+
+ PPSVariantAChar = ^TPSVariantAChar;
+
+ TPSVariantAChar = packed record
+ VI: TPSVariant;
+ Data: tbtChar;
+ end;
+
+{$IFNDEF PS_NOWIDESTRING}
+
+ PPSVariantWChar = ^TPSVariantWChar;
+
+ TPSVariantWChar = packed record
+ VI: TPSVariant;
+ Data: tbtWideChar;
+ end;
+{$ENDIF}
+
+ PPSVariantAString = ^TPSVariantAString;
+
+ TPSVariantAString = packed record
+ VI: TPSVariant;
+ Data: tbtString;
+ end;
+
+{$IFNDEF PS_NOWIDESTRING}
+
+ PPSVariantWString = ^TPSVariantWString;
+
+ TPSVariantWString = packed record
+ VI: TPSVariant;
+ Data: WideString;
+ end;
+{$ENDIF}
+
+
+ PPSVariantSingle = ^TPSVariantSingle;
+
+ TPSVariantSingle = packed record
+ VI: TPSVariant;
+ Data: tbtsingle;
+ end;
+
+
+ PPSVariantDouble = ^TPSVariantDouble;
+
+ TPSVariantDouble = packed record
+ VI: TPSVariant;
+ Data: tbtDouble;
+ end;
+
+
+ PPSVariantExtended = ^TPSVariantExtended;
+
+ TPSVariantExtended = packed record
+ VI: TPSVariant;
+ Data: tbtExtended;
+ end;
+
+
+ PPSVariantCurrency = ^TPSVariantCurrency;
+
+ TPSVariantCurrency = packed record
+ VI: TPSVariant;
+ Data: tbtCurrency;
+ end;
+
+ PPSVariantSet = ^TPSVariantSet;
+
+ TPSVariantSet = packed record
+ VI: TPSVariant;
+ Data: array[0..0] of Byte;
+ end;
+
+{$IFNDEF PS_NOINTERFACES}
+
+ PPSVariantInterface = ^TPSVariantInterface;
+
+ TPSVariantInterface = packed record
+ VI: TPSVariant;
+ Data: IUnknown;
+ end;
+{$ENDIF}
+
+ PPSVariantClass = ^TPSVariantClass;
+
+ TPSVariantClass = packed record
+ VI: TPSVariant;
+ Data: TObject;
+ end;
+
+
+ PPSVariantRecord = ^TPSVariantRecord;
+
+ TPSVariantRecord = packed record
+ VI: TPSVariant;
+ data: array[0..0] of byte;
+ end;
+
+
+ PPSVariantDynamicArray = ^TPSVariantDynamicArray;
+
+ TPSVariantDynamicArray = packed record
+ VI: TPSVariant;
+ Data: Pointer;
+ end;
+
+
+ PPSVariantStaticArray = ^TPSVariantStaticArray;
+
+ TPSVariantStaticArray = packed record
+ VI: TPSVariant;
+ data: array[0..0] of byte;
+ end;
+
+
+ PPSVariantPointer = ^TPSVariantPointer;
+
+ TPSVariantPointer = packed record
+ VI: TPSVariant;
+ DataDest: Pointer;
+ DestType: TPSTypeRec;
+ FreeIt: LongBool;
+ end;
+
+
+ PPSVariantReturnAddress = ^TPSVariantReturnAddress;
+
+ TPSVariantReturnAddress = packed record
+ VI: TPSVariant;
+ Addr: TBTReturnAddress;
+ end;
+
+
+ PPSVariantVariant = ^TPSVariantVariant;
+
+ TPSVariantVariant = packed record
+ VI: TPSVariant;
+ Data: Variant;
+ end;
+
+ PPSVariantProcPtr = ^TPSVariantProcPtr;
+ TPSVariantProcPtr = packed record
+ VI: TPSVariant;
+ ProcNo: Cardinal;
+ Self: Pointer;
+ Ptr: Pointer;
+ {
+ ProcNo = 0 means Self/Ptr become active (Ptr = nil means it's nil)
+ }
+ end;
+
+
+ TPSVarFreeType = (
+ vtNone,
+ vtTempVar
+ );
+
+ TPSResultData = packed record
+ P: Pointer;
+ aType: TPSTypeRec;
+ FreeType: TPSVarFreeType;
+ end;
+
+
+ PPSResource = ^TPSResource;
+
+ TPSResource = record
+ Proc: Pointer;
+ P: Pointer;
+ end;
+
+ TPSAttributeUseProc = function (Sender: TPSExec; const AttribType: string; Attr: TPSRuntimeAttribute): Boolean;
+
+ TPSAttributeType = class
+ private
+ FTypeName: string;
+ FUseProc: TPSAttributeUseProc;
+ FTypeNameHash: Longint;
+ public
+
+ property UseProc: TPSAttributeUseProc read FUseProc write FUseProc;
+
+ property TypeName: string read FTypeName write FTypeName;
+
+ property TypeNameHash: Longint read FTypeNameHash write FTypeNameHash;
+ end;
+
+ PClassItem = ^TClassItem;
+
+ TClassItem = record
+
+ FName: string;
+
+ FNameHash: Longint;
+
+ b: byte;
+ case byte of
+ 0: (Ptr: Pointer);
+ 1: (PointerInList: Pointer);
+ 3: (FReadFunc, FWriteFunc: Pointer); {Property Helper}
+ 4: (Ptr2: Pointer);
+ 5: (PointerInList2: Pointer);
+ 6: (); {Property helper, like 3}
+ 7: (); {Property helper that will pass it's name}
+ end;
+
+
+ PPSVariantIFC = ^TPSVariantIFC;
+ {Temporary variant into record}
+ TPSVariantIFC = packed record
+ Dta: Pointer;
+ aType: TPSTypeRec;
+ VarParam: Boolean;
+ end;
+ PIFPSVariantIFC = PPSVariantIFC;
+ TIFPSVariantIFC = TPSVariantIFC;
+
+ TPSRuntimeAttribute = class(TObject)
+ private
+ FValues: TPSStack;
+ FAttribType: string;
+ FOwner: TPSRuntimeAttributes;
+ FAttribTypeHash: Longint;
+ function GetValue(I: Longint): PIFVariant;
+ function GetValueCount: Longint;
+ public
+
+ property Owner: TPSRuntimeAttributes read FOwner;
+
+ property AttribType: string read FAttribType write FAttribType;
+
+ property AttribTypeHash: Longint read FAttribTypeHash write FAttribTypeHash;
+
+ property ValueCount: Longint read GetValueCount;
+
+ property Value[I: Longint]: PIFVariant read GetValue;
+
+ function AddValue(aType: TPSTypeRec): PPSVariant;
+
+ procedure DeleteValue(i: Longint);
+
+ procedure AdjustSize;
+
+
+ constructor Create(Owner: TPSRuntimeAttributes);
+
+ destructor Destroy; override;
+ end;
+
+ TPSRuntimeAttributes = class(TObject)
+ private
+ FAttributes: TPSList;
+ FOwner: TPSExec;
+ function GetCount: Longint;
+ function GetItem(I: Longint): TPSRuntimeAttribute;
+ public
+
+ property Owner: TPSExec read FOwner;
+
+ property Count: Longint read GetCount;
+
+ property Items[I: Longint]: TPSRuntimeAttribute read GetItem; default;
+
+ procedure Delete(I: Longint);
+
+ function Add: TPSRuntimeAttribute;
+
+ function FindAttribute(const Name: string): TPSRuntimeAttribute;
+
+
+ constructor Create(AOwner: TPSExec);
+
+ destructor Destroy; override;
+ end;
+ TPSOnGetNVariant = function (Sender: TPSExec; const Name: string): Variant;
+ TPSOnSetNVariant = procedure (Sender: TPSExec; const Name: string; V: Variant);
+
+ TPSOnLineEvent = procedure(Sender: TPSExec);
+
+ TPSOnSpecialProcImport = function (Sender: TPSExec; p: TPSExternalProcRec; Tag: Pointer): Boolean;
+
+ TPSOnException = procedure (Sender: TPSExec; ExError: TPSError; const ExParam: string; ExObject: TObject; ProcNo, Position: Cardinal);
+
+ TPSExec = class(TObject)
+ Private
+ FOnGetNVariant: TPSOnGetNVariant;
+ FOnSetNVariant: TPSOnSetNVariant;
+ FId: Pointer;
+ FJumpFlag: Boolean;
+ FCallCleanup: Boolean;
+ FOnException: TPSOnException;
+ function ReadData(var Data; Len: Cardinal): Boolean;
+ function ReadLong(var b: Cardinal): Boolean;
+ function DoCalc(var1, Var2: Pointer; var1Type, var2type: TPSTypeRec; CalcType: Cardinal): Boolean;
+ function DoBooleanCalc(var1, Var2, into: Pointer; var1Type, var2type, intotype: TPSTypeRec; Cmd: Cardinal): Boolean;
+ function SetVariantValue(dest, Src: Pointer; desttype, srctype: TPSTypeRec): Boolean;
+ function ReadVariable(var Dest: TPSResultData; UsePointer: Boolean): Boolean;
+ function DoBooleanNot(Dta: Pointer; aType: TPSTypeRec): Boolean;
+ function DoMinus(Dta: Pointer; aType: TPSTypeRec): Boolean;
+ function DoIntegerNot(Dta: Pointer; aType: TPSTypeRec): Boolean;
+ procedure RegisterStandardProcs;
+ Protected
+
+ FReturnAddressType: TPSTypeRec;
+
+ FVariantType: TPSTypeRec;
+
+ FVariantArrayType: TPSTypeRec;
+
+ FAttributeTypes: TPSList;
+
+ FExceptionStack: TPSList;
+
+ FResources: TPSList;
+
+ FExportedVars: TPSList;
+
+ FTypes: TPSList;
+
+ FProcs: TPSList;
+
+ FGlobalVars: TPSStack;
+
+ FTempVars: TPSStack;
+
+ FStack: TPSStack;
+
+ FMainProc: Cardinal;
+
+ FStatus: TPSStatus;
+
+ FCurrProc: TPSInternalProcRec;
+
+ FData: PByteArray;
+
+ FDataLength: Cardinal;
+
+ FCurrentPosition: Cardinal;
+
+ FCurrStackBase: Cardinal;
+
+ FOnRunLine: TPSOnLineEvent;
+
+ FSpecialProcList: TPSList;
+
+ FRegProcs: TPSList;
+
+ ExObject: TObject;
+
+ ExProc: Cardinal;
+
+ ExPos: Cardinal;
+
+ ExEx: TPSError;
+
+ ExParam: string;
+
+ function InvokeExternalMethod(At: TPSTypeRec_ProcPtr; Slf, Ptr: Pointer): Boolean;
+
+ function InnerfuseCall(_Self, Address: Pointer; CallingConv: TPSCallingConvention; Params: TPSList; res: PPSVariantIFC): Boolean;
+
+ procedure RunLine; virtual;
+
+ function ImportProc(const Name: ShortString; proc: TPSExternalProcRec): Boolean; Virtual;
+
+ procedure ExceptionProc(proc, Position: Cardinal; Ex: TPSError; const s: string; NewObject: TObject); Virtual;
+
+ function FindSpecialProcImport(P: TPSOnSpecialProcImport): pointer;
+ Public
+ function LastEx: TPSError;
+ function LastExParam: string;
+ function LastExProc: Integer;
+ function LastExPos: Integer;
+ procedure CMD_Err(EC: TPSError);
+
+ procedure CMD_Err2(EC: TPSError; const Param: string);
+
+ procedure CMD_Err3(EC: TPSError; const Param: string; ExObject: TObject);
+
+ property Id: Pointer read FID write FID;
+
+ class function About: string;
+
+ function RunProc(Params: TPSList; ProcNo: Cardinal): Boolean;
+
+ function RunProcP(const Params: array of Variant; const Procno: Cardinal): Variant;
+
+ function RunProcPN(const Params: array of Variant; const ProcName: string): Variant;
+
+ function FindType(StartAt: Cardinal; BaseType: TPSBaseType; var l: Cardinal): PIFTypeRec;
+
+ function FindType2(BaseType: TPSBaseType): PIFTypeRec;
+
+ function GetTypeNo(l: Cardinal): PIFTypeRec;
+
+ function GetType(const Name: string): Cardinal;
+
+ function GetProc(const Name: string): Cardinal;
+
+ function GetVar(const Name: string): Cardinal;
+
+ function GetVar2(const Name: string): PIFVariant;
+
+ function GetVarNo(C: Cardinal): PIFVariant;
+
+ function GetProcNo(C: Cardinal): PIFProcRec;
+
+ function GetProcCount: Cardinal;
+
+ function GetVarCount: Longint;
+
+ function GetTypeCount: Longint;
+
+
+ constructor Create;
+
+ destructor Destroy; Override;
+
+
+ function RunScript: Boolean;
+
+
+ function LoadData(const s: string): Boolean; virtual;
+
+ procedure Clear; Virtual;
+
+ procedure Cleanup; Virtual;
+
+ procedure Stop; Virtual;
+
+ procedure Pause; Virtual;
+
+ property CallCleanup: Boolean read FCallCleanup write FCallCleanup;
+
+ property Status: TPSStatus Read FStatus;
+
+ property OnRunLine: TPSOnLineEvent Read FOnRunLine Write FOnRunLine;
+
+ procedure ClearspecialProcImports;
+
+ procedure AddSpecialProcImport(const FName: string; P: TPSOnSpecialProcImport; Tag: Pointer);
+
+ function RegisterFunctionName(const Name: string; ProcPtr: TPSProcPtr;
+ Ext1, Ext2: Pointer): PProcRec;
+
+ procedure RegisterDelphiFunction(ProcPtr: Pointer; const Name: string; CC: TPSCallingConvention);
+
+ procedure RegisterDelphiMethod(Slf, ProcPtr: Pointer; const Name: string; CC: TPSCallingConvention);
+
+ function GetProcAsMethod(const ProcNo: Cardinal): TMethod;
+
+ function GetProcAsMethodN(const ProcName: string): TMethod;
+
+ procedure RegisterAttributeType(useproc: TPSAttributeUseProc; const TypeName: string);
+
+ procedure ClearFunctionList;
+
+ property ExceptionProcNo: Cardinal Read ExProc;
+
+ property ExceptionPos: Cardinal Read ExPos;
+
+ property ExceptionCode: TPSError Read ExEx;
+
+ property ExceptionString: string read ExParam;
+
+ property ExceptionObject: TObject read ExObject write ExObject;
+
+ procedure AddResource(Proc, P: Pointer);
+
+ function IsValidResource(Proc, P: Pointer): Boolean;
+
+ procedure DeleteResource(P: Pointer);
+
+ function FindProcResource(Proc: Pointer): Pointer;
+
+ function FindProcResource2(Proc: Pointer; var StartAt: Longint): Pointer;
+
+ procedure RaiseCurrentException;
+
+ property OnException: TPSOnException read FOnException write FOnException;
+ property OnGetNVariant: TPSOnGetNVariant read FOnGetNVariant write FOnGetNVariant;
+ property OnSetNVariant: TPSOnSetNVariant read FOnSetNVariant write FOnSetNVariant;
+ end;
+
+ TPSStack = class(TPSList)
+ private
+ FDataPtr: Pointer;
+ FCapacity,
+ FLength: Longint;
+ function GetItem(I: Longint): PPSVariant;
+ procedure SetCapacity(const Value: Longint);
+ procedure AdjustLength;
+ public
+
+ property DataPtr: Pointer read FDataPtr;
+
+ property Capacity: Longint read FCapacity write SetCapacity;
+
+ property Length: Longint read FLength;
+
+
+ constructor Create;
+
+ destructor Destroy; override;
+
+ procedure Clear; {$IFDEF DELPHI5UP} reintroduce;{$ELSE} override; {$ENDIF}
+
+ function Push(TotalSize: Longint): PPSVariant;
+
+ function PushType(aType: TPSTypeRec): PPSVariant;
+
+ procedure Pop;
+ function GetInt(ItemNo: Longint): Longint;
+ function GetUInt(ItemNo: Longint): Cardinal;
+{$IFNDEF PS_NOINT64}
+ function GetInt64(ItemNo: Longint): Int64;
+{$ENDIF}
+ function GetString(ItemNo: Longint): string;
+{$IFNDEF PS_NOWIDESTRING}
+ function GetWideString(ItemNo: Longint): WideString;
+{$ENDIF}
+ function GetReal(ItemNo: Longint): Extended;
+ function GetCurrency(ItemNo: Longint): Currency;
+ function GetBool(ItemNo: Longint): Boolean;
+ function GetClass(ItemNo: Longint): TObject;
+
+ procedure SetInt(ItemNo: Longint; const Data: Longint);
+ procedure SetUInt(ItemNo: Longint; const Data: Cardinal);
+{$IFNDEF PS_NOINT64}
+ procedure SetInt64(ItemNo: Longint; const Data: Int64);
+{$ENDIF}
+ procedure SetString(ItemNo: Longint; const Data: string);
+{$IFNDEF PS_NOWIDESTRING}
+ procedure SetWideString(ItemNo: Longint; const Data: WideString);
+{$ENDIF}
+ procedure SetReal(ItemNo: Longint; const Data: Extended);
+ procedure SetCurrency(ItemNo: Longint; const Data: Currency);
+ procedure SetBool(ItemNo: Longint; const Data: Boolean);
+ procedure SetClass(ItemNo: Longint; const Data: TObject);
+
+ property Items[I: Longint]: PPSVariant read GetItem; default;
+ end;
+
+
+function PSErrorToString(x: TPSError; const Param: string): string;
+function TIFErrorToString(x: TPSError; const Param: string): string;
+function CreateHeapVariant(aType: TPSTypeRec): PPSVariant;
+procedure DestroyHeapVariant(v: PPSVariant);
+
+procedure FreePIFVariantList(l: TPSList);
+procedure FreePSVariantList(l: TPSList);
+
+const
+ ENoError = ERNoError;
+
+
+function PIFVariantToVariant(Src: PIFVariant; var Dest: Variant): Boolean;
+function VariantToPIFVariant(Exec: TPSExec; const Src: Variant; Dest: PIFVariant): Boolean;
+
+function PSGetRecField(const avar: TPSVariantIFC; Fieldno: Longint): TPSVariantIFC;
+function PSGetArrayField(const avar: TPSVariantIFC; Fieldno: Longint): TPSVariantIFC;
+function NewTPSVariantRecordIFC(avar: PPSVariant; Fieldno: Longint): TPSVariantIFC;
+
+function NewTPSVariantIFC(avar: PPSVariant; varparam: boolean): TPSVariantIFC;
+
+function NewPPSVariantIFC(avar: PPSVariant; varparam: boolean): PPSVariantIFC;
+
+procedure DisposePPSVariantIFC(aVar: PPSVariantIFC);
+
+procedure DisposePPSVariantIFCList(list: TPSList);
+
+
+function PSGetObject(Src: Pointer; aType: TPSTypeRec): TObject;
+function PSGetUInt(Src: Pointer; aType: TPSTypeRec): Cardinal;
+{$IFNDEF PS_NOINT64}
+function PSGetInt64(Src: Pointer; aType: TPSTypeRec): Int64;
+{$ENDIF}
+function PSGetReal(Src: Pointer; aType: TPSTypeRec): Extended;
+function PSGetCurrency(Src: Pointer; aType: TPSTypeRec): Currency;
+function PSGetInt(Src: Pointer; aType: TPSTypeRec): Longint;
+function PSGetString(Src: Pointer; aType: TPSTypeRec): String;
+{$IFNDEF PS_NOWIDESTRING}
+function PSGetWideString(Src: Pointer; aType: TPSTypeRec): WideString;
+{$ENDIF}
+
+procedure PSSetObject(Src: Pointer; aType: TPSTypeRec; var Ok: Boolean; Const val: TObject);
+procedure PSSetUInt(Src: Pointer; aType: TPSTypeRec; var Ok: Boolean; const Val: Cardinal);
+{$IFNDEF PS_NOINT64}
+procedure PSSetInt64(Src: Pointer; aType: TPSTypeRec; var Ok: Boolean; const Val: Int64);
+{$ENDIF}
+procedure PSSetReal(Src: Pointer; aType: TPSTypeRec; var Ok: Boolean; const Val: Extended);
+procedure PSSetCurrency(Src: Pointer; aType: TPSTypeRec; var Ok: Boolean; const Val: Currency);
+procedure PSSetInt(Src: Pointer; aType: TPSTypeRec; var Ok: Boolean; const Val: Longint);
+procedure PSSetString(Src: Pointer; aType: TPSTypeRec; var Ok: Boolean; const Val: String);
+{$IFNDEF PS_NOWIDESTRING}
+procedure PSSetWideString(Src: Pointer; aType: TPSTypeRec; var Ok: Boolean; const Val: WideString);
+{$ENDIF}
+
+procedure VNSetPointerTo(const Src: TPSVariantIFC; Data: Pointer; aType: TPSTypeRec);
+
+function VNGetUInt(const Src: TPSVariantIFC): Cardinal;
+{$IFNDEF PS_NOINT64}
+function VNGetInt64(const Src: TPSVariantIFC): Int64;
+{$ENDIF}
+function VNGetReal(const Src: TPSVariantIFC): Extended;
+function VNGetCurrency(const Src: TPSVariantIFC): Currency;
+function VNGetInt(const Src: TPSVariantIFC): Longint;
+function VNGetString(const Src: TPSVariantIFC): String;
+{$IFNDEF PS_NOWIDESTRING}
+function VNGetWideString(const Src: TPSVariantIFC): WideString;
+{$ENDIF}
+
+procedure VNSetUInt(const Src: TPSVariantIFC; const Val: Cardinal);
+{$IFNDEF PS_NOINT64}
+procedure VNSetInt64(const Src: TPSVariantIFC; const Val: Int64);
+{$ENDIF}
+procedure VNSetReal(const Src: TPSVariantIFC; const Val: Extended);
+procedure VNSetCurrency(const Src: TPSVariantIFC; const Val: Currency);
+procedure VNSetInt(const Src: TPSVariantIFC; const Val: Longint);
+procedure VNSetString(const Src: TPSVariantIFC; const Val: String);
+{$IFNDEF PS_NOWIDESTRING}
+procedure VNSetWideString(const Src: TPSVariantIFC; const Val: WideString);
+{$ENDIF}
+
+function VGetUInt(const Src: PIFVariant): Cardinal;
+{$IFNDEF PS_NOINT64}
+function VGetInt64(const Src: PIFVariant): Int64;
+{$ENDIF}
+function VGetReal(const Src: PIFVariant): Extended;
+function VGetCurrency(const Src: PIFVariant): Currency;
+function VGetInt(const Src: PIFVariant): Longint;
+function VGetString(const Src: PIFVariant): String;
+{$IFNDEF PS_NOWIDESTRING}
+function VGetWideString(const Src: PIFVariant): WideString;
+{$ENDIF}
+
+procedure VSetPointerTo(const Src: PIFVariant; Data: Pointer; aType: TPSTypeRec);
+procedure VSetUInt(const Src: PIFVariant; const Val: Cardinal);
+{$IFNDEF PS_NOINT64}
+procedure VSetInt64(const Src: PIFVariant; const Val: Int64);
+{$ENDIF}
+procedure VSetReal(const Src: PIFVariant; const Val: Extended);
+procedure VSetCurrency(const Src: PIFVariant; const Val: Currency);
+procedure VSetInt(const Src: PIFVariant; const Val: Longint);
+procedure VSetString(const Src: PIFVariant; const Val: String);
+{$IFNDEF PS_NOWIDESTRING}
+procedure VSetWideString(const Src: PIFVariant; const Val: WideString);
+{$ENDIF}
+
+type
+
+ EPSException = class(Exception)
+ private
+ FProcPos: Cardinal;
+ FProcNo: Cardinal;
+ FExec: TPSExec;
+ public
+
+ constructor Create(const Error: string; Exec: TPSExec; Procno, ProcPos: Cardinal);
+
+ property ProcNo: Cardinal read FProcNo;
+
+ property ProcPos: Cardinal read FProcPos;
+
+ property Exec: TPSExec read FExec;
+ end;
+
+ TPSRuntimeClass = class
+ protected
+ FClassName: string;
+ FClassNameHash: Longint;
+
+ FClassItems: TPSList;
+ FClass: TClass;
+
+ FEndOfVmt: Longint;
+ public
+
+ procedure RegisterConstructor(ProcPtr: Pointer; const Name: string);
+
+ procedure RegisterVirtualConstructor(ProcPtr: Pointer; const Name: string);
+
+ procedure RegisterMethod(ProcPtr: Pointer; const Name: string);
+
+ procedure RegisterVirtualMethod(ProcPtr: Pointer; const Name: string);
+
+ procedure RegisterVirtualAbstractMethod(ClassDef: TClass; ProcPtr: Pointer; const Name: string);
+
+ procedure RegisterPropertyHelper(ReadFunc, WriteFunc: Pointer; const Name: string);
+
+ procedure RegisterPropertyHelperName(ReadFunc, WriteFunc: Pointer; const Name: string);
+
+ procedure RegisterEventPropertyHelper(ReadFunc, WriteFunc: Pointer; const Name: string);
+
+ constructor Create(aClass: TClass; const AName: string);
+
+ destructor Destroy; override;
+ end;
+
+ TPSRuntimeClassImporter = class
+ private
+ FClasses: TPSList;
+ public
+
+ constructor Create;
+
+ constructor CreateAndRegister(Exec: TPSexec; AutoFree: Boolean);
+
+ destructor Destroy; override;
+
+ function Add(aClass: TClass): TPSRuntimeClass;
+
+ function Add2(aClass: TClass; const Name: string): TPSRuntimeClass;
+
+ procedure Clear;
+
+ function FindClass(const Name: string): TPSRuntimeClass;
+ end;
+ TIFPSRuntimeClassImporter = TPSRuntimeClassImporter;
+ TPSResourceFreeProc = procedure (Sender: TPSExec; P: TPSRuntimeClassImporter);
+
+
+procedure RegisterClassLibraryRuntime(SE: TPSExec; Importer: TPSRuntimeClassImporter);
+
+procedure SetVariantToClass(V: PIFVariant; Cl: TObject);
+{$IFNDEF PS_NOINTERFACES}
+procedure SetVariantToInterface(V: PIFVariant; Cl: IUnknown);
+{$ENDIF}
+
+procedure MyAllMethodsHandler;
+
+function GetMethodInfoRec(SE: TPSExec; ProcNo: Cardinal): Pointer;
+
+function MkMethod(FSE: TPSExec; No: Cardinal): TMethod;
+
+type
+ TIFInternalProcRec = TPSInternalProcRec;
+ TIFError = TPSError;
+ TIFStatus = TPSStatus;
+ TIFPSExec = TPSExec;
+ TIFPSStack = TPSStack;
+ TIFTypeRec = TPSTypeRec;
+
+
+ TPSCallingConvention = uPSUtils.TPSCallingConvention;
+const
+
+ cdRegister = uPSUtils.cdRegister;
+
+ cdPascal = uPSUtils.cdPascal;
+
+ cdCdecl = uPSUtils.cdCdecl;
+
+ cdStdCall = uPSUtils.cdStdCall;
+
+ InvalidVal = Cardinal(-1);
+
+function PSDynArrayGetLength(arr: Pointer; aType: TPSTypeRec): Longint;
+procedure PSDynArraySetLength(var arr: Pointer; aType: TPSTypeRec; NewLength: Longint);
+
+function GetPSArrayLength(Arr: PIFVariant): Longint;
+procedure SetPSArrayLength(Arr: PIFVariant; NewLength: Longint);
+
+function PSVariantToString(const p: TPSVariantIFC; const ClassProperties: string): string;
+function MakeString(const s: string): string;
+{$IFNDEF PS_NOWIDESTRING}
+function MakeWString(const s: widestring): string;
+{$ENDIF}
+
+{$IFNDEF PS_NOIDISPATCH}
+function IDispatchInvoke(Self: IDispatch; PropertySet: Boolean; const Name: String; const Par: array of Variant): Variant;
+{$ENDIF}
+
+
+implementation
+uses
+ TypInfo {$IFDEF DELPHI3UP}{$IFNDEF FPC} , ComObj {$ENDIF}{$ENDIF};
+
+{$IFDEF DELPHI3UP }
+resourceString
+{$ELSE }
+const
+{$ENDIF }
+
+ RPS_UnknownIdentifier = 'Unknown Identifier';
+ RPS_Exception = 'Exception: %s';
+ RPS_Invalid = '[Invalid]';
+
+ //- PSErrorToString
+ RPS_NoError = 'No Error';
+ RPS_CannotImport = 'Cannot Import %s';
+ RPS_InvalidType = 'Invalid Type';
+ RPS_InternalError = 'Internal error';
+ RPS_InvalidHeader = 'Invalid Header';
+ RPS_InvalidOpcode = 'Invalid Opcode';
+ RPS_InvalidOpcodeParameter = 'Invalid Opcode Parameter';
+ RPS_NoMainProc = 'no Main Proc';
+ RPS_OutOfGlobalVarsRange = 'Out of Global Vars range';
+ RPS_OutOfProcRange = 'Out of Proc Range';
+ RPS_OutOfRange = 'Out Of Range';
+ RPS_OutOfStackRange = 'Out Of Stack Range';
+ RPS_TypeMismatch = 'Type Mismatch';
+ RPS_UnexpectedEof = 'Unexpected End Of File';
+ RPS_VersionError = 'Version error';
+ RPS_DivideByZero = 'divide by Zero';
+ RPS_MathError = 'Math error';
+ RPS_CouldNotCallProc = 'Could not call proc';
+ RPS_OutofRecordRange = 'Out of Record Fields Range';
+ RPS_NullPointerException = 'Null Pointer Exception';
+ RPS_NullVariantError = 'Null variant error';
+ RPS_OutOfMemory = 'Out Of Memory';
+ RPS_InterfaceNotSupported = 'Interface not supported';
+ RPS_UnknownError = 'Unknown error';
+
+
+ RPS_InvalidVariable = 'Invalid variable';
+ RPS_InvalidArray = 'Invalid array';
+ RPS_OLEError = 'OLE error %.8x';
+ RPS_UnknownProcedure = 'Unknown procedure';
+ RPS_NotEnoughParameters = 'Not enough parameters';
+ RPS_InvalidParameter = 'Invalid parameter';
+ RPS_TooManyParameters = 'Too many parameters';
+ RPS_OutOfStringRange = 'Out of string range';
+ RPS_CannotCastInterface = 'Cannot cast an interface';
+ RPS_CannotCastObject = 'Cannot cast an object';
+ RPS_CapacityLength = 'Capacity < Length';
+ RPS_CanOnlySendLastItem = 'Can only remove last item from stack';
+ RPS_NILInterfaceException = 'Nil interface';
+ RPS_UnknownMethod = 'Unknown method';
+
+
+
+type
+ PPSExportedVar = ^TPSExportedVar;
+ TPSExportedVar = record
+ FName: string;
+ FNameHash: Longint;
+ FVarNo: Cardinal;
+ end;
+ PRaiseFrame = ^TRaiseFrame;
+ TRaiseFrame = record
+ NextRaise: PRaiseFrame;
+ ExceptAddr: Pointer;
+ ExceptObject: TObject;
+ ExceptionRecord: Pointer;
+ end;
+ TPSExceptionHandler = class
+ CurrProc: TPSInternalProcRec;
+ BasePtr, StackSize: Cardinal;
+ FinallyOffset, ExceptOffset, Finally2Offset, EndOfBlock: Cardinal;
+ ExceptionData: TPSError;
+ ExceptionObject: TObject;
+ ExceptionParam: String;
+ destructor Destroy; override;
+ end;
+ TPSHeader = packed record
+ HDR: Cardinal;
+ PSBuildNo: Cardinal;
+ TypeCount: Cardinal;
+ ProcCount: Cardinal;
+ VarCount: Cardinal;
+ MainProcNo: Cardinal;
+ ImportTableSize: Cardinal;
+ end;
+
+ TPSExportItem = packed record
+ ProcNo: Cardinal;
+ NameLength: Cardinal;
+ DeclLength: Cardinal;
+ end;
+
+ TPSType = packed record
+ BaseType: TPSBaseType;
+ end;
+ TPSProc = packed record
+ Flags: Byte;
+ end;
+
+ TPSVar = packed record
+ TypeNo: Cardinal;
+ Flags: Byte;
+ end;
+ PSpecialProc = ^TSpecialProc;
+ TSpecialProc = record
+ P: TPSOnSpecialProcImport;
+ namehash: Longint;
+ Name: string;
+ tag: pointer;
+ end;
+
+destructor TPSExceptionHandler.Destroy;
+begin
+ ExceptionObject.Free;
+ inherited;
+end;
+
+procedure P_CM_A; begin end;
+procedure P_CM_CA; begin end;
+procedure P_CM_P; begin end;
+procedure P_CM_PV; begin end;
+procedure P_CM_PO; begin end;
+procedure P_CM_C; begin end;
+procedure P_CM_G; begin end;
+procedure P_CM_CG; begin end;
+procedure P_CM_CNG; begin end;
+procedure P_CM_R; begin end;
+procedure P_CM_ST; begin end;
+procedure P_CM_PT; begin end;
+procedure P_CM_CO; begin end;
+procedure P_CM_CV; begin end;
+procedure P_CM_SP; begin end;
+procedure P_CM_BN; begin end;
+procedure P_CM_VM; begin end;
+procedure P_CM_SF; begin end;
+procedure P_CM_FG; begin end;
+procedure P_CM_PUEXH; begin end;
+procedure P_CM_POEXH; begin end;
+procedure P_CM_IN; begin end;
+procedure P_CM_SPB; begin end;
+procedure P_CM_INC; begin end;
+procedure P_CM_DEC; begin end;
+
+function IntPIFVariantToVariant(Src: pointer; aType: TPSTypeRec; var Dest: Variant): Boolean; forward;
+
+
+procedure Set_Union(Dest, Src: PByteArray; ByteSize: Integer);
+var
+ i: Longint;
+begin
+ for i := ByteSize -1 downto 0 do
+ Dest^[i] := Dest^[i] or Src^[i];
+end;
+
+procedure Set_Diff(Dest, Src: PByteArray; ByteSize: Integer);
+var
+ i: Longint;
+begin
+ for i := ByteSize -1 downto 0 do
+ Dest^[i] := Dest^[i] and not Src^[i];
+end;
+
+procedure Set_Intersect(Dest, Src: PByteArray; ByteSize: Integer);
+var
+ i: Longint;
+begin
+ for i := ByteSize -1 downto 0 do
+ Dest^[i] := Dest^[i] and Src^[i];
+end;
+
+procedure Set_Subset(Dest, Src: PByteArray; ByteSize: Integer; var Val: Boolean);
+var
+ i: Integer;
+begin
+ for i := ByteSize -1 downto 0 do
+ begin
+ if not (Src^[i] and Dest^[i] = Dest^[i]) then
+ begin
+ Val := False;
+ exit;
+ end;
+ end;
+ Val := True;
+end;
+
+procedure Set_Equal(Dest, Src: PByteArray; ByteSize: Integer; var Val: Boolean);
+var
+ i: Longint;
+begin
+ for i := ByteSize -1 downto 0 do
+ begin
+ if Dest^[i] <> Src^[i] then
+ begin
+ Val := False;
+ exit;
+ end;
+ end;
+ val := True;
+end;
+
+procedure Set_membership(Item: Longint; Src: PByteArray; var Val: Boolean);
+begin
+ Val := (Src^[Item shr 3] and (1 shl (Item and 7))) <> 0;
+end;
+
+
+procedure RCIFreeProc(Sender: TPSExec; P: TPSRuntimeClassImporter);
+begin
+ p.Free;
+end;
+
+function Trim(const s: string): string;
+begin
+ Result := s;
+ while (Length(result) > 0) and (Result[1] = #32) do Delete(Result, 1, 1);
+ while (Length(result) > 0) and (Result[Length(Result)] = #32) do Delete(Result, Length(Result), 1);
+end;
+function FloatToStr(E: Extended): string;
+begin
+ Result := Sysutils.FloatToStr(e);
+end;
+
+//-------------------------------------------------------------------
+
+function Padl(s: string; i: longInt): string;
+begin
+ result := StringOfChar(' ', i - length(s)) + s;
+end;
+//-------------------------------------------------------------------
+
+function Padz(s: string; i: longInt): string;
+begin
+ result := StringOfChar('0', i - length(s)) + s;
+end;
+//-------------------------------------------------------------------
+
+function Padr(s: string; i: longInt): string;
+begin
+ result := s + StringOfChar(' ', i - Length(s));
+end;
+//-------------------------------------------------------------------
+
+{$IFNDEF PS_NOWIDESTRING}
+function MakeWString(const s: widestring): string;
+var
+ i: Longint;
+ e: string;
+ b: boolean;
+begin
+ Result := s;
+ i := 1;
+ b := false;
+ while i <= length(result) do
+ begin
+ if Result[i] = '''' then
+ begin
+ if not b then
+ begin
+ b := true;
+ Insert('''', Result, i);
+ inc(i);
+ end;
+ Insert('''', Result, i);
+ inc(i, 2);
+ end else if (Result[i] < #32) or (Result[i] > #255) then
+ begin
+ e := '#'+inttostr(ord(Result[i]));
+ Delete(Result, i, 1);
+ if b then
+ begin
+ b := false;
+ Insert('''', Result, i);
+ inc(i);
+ end;
+ Insert(e, Result, i);
+ inc(i, length(e));
+ end else begin
+ if not b then
+ begin
+ b := true;
+ Insert('''', Result, i);
+ inc(i, 2);
+ end else
+ inc(i);
+ end;
+ end;
+ if b then
+ begin
+ Result := Result + '''';
+ end;
+ if Result = '' then
+ Result := '''''';
+end;
+{$ENDIF}
+function MakeString(const s: string): string;
+var
+ i: Longint;
+ e: string;
+ b: boolean;
+begin
+ Result := s;
+ i := 1;
+ b := false;
+ while i <= length(result) do
+ begin
+ if Result[i] = '''' then
+ begin
+ if not b then
+ begin
+ b := true;
+ Insert('''', Result, i);
+ inc(i);
+ end;
+ Insert('''', Result, i);
+ inc(i, 2);
+ end else if (Result[i] < #32) then
+ begin
+ e := '#'+inttostr(ord(Result[i]));
+ Delete(Result, i, 1);
+ if b then
+ begin
+ b := false;
+ Insert('''', Result, i);
+ inc(i);
+ end;
+ Insert(e, Result, i);
+ inc(i, length(e));
+ end else begin
+ if not b then
+ begin
+ b := true;
+ Insert('''', Result, i);
+ inc(i, 2);
+ end else
+ inc(i);
+ end;
+ end;
+ if b then
+ begin
+ Result := Result + '''';
+ end;
+ if Result = '' then
+ Result := '''''';
+end;
+
+function SafeStr(const s: string): string;
+var
+ i : Longint;
+begin
+ Result := s;
+ for i := 1 to length(s) do
+ begin
+ if s[i] in [#0..#31] then
+ begin
+ Result := Copy(s, 1, i-1);
+ exit;
+ end;
+ end;
+
+end;
+
+function PropertyToString(Instance: TObject; PName: string): string;
+var
+ s: string;
+ i: Longint;
+ PP: PPropInfo;
+begin
+ if PName = '' then
+ begin
+ Result := Instance.ClassName;
+ exit;
+ end;
+ while Length(PName) > 0 do
+ begin
+ i := pos('.', pname);
+ if i = 0 then
+ begin
+ s := Trim(PNAme);
+ pname := '';
+ end else begin
+ s := trim(Copy(PName, 1, i-1));
+ Delete(PName, 1, i);
+ end;
+ pp := GetPropInfo(PTypeInfo(Instance.ClassInfo), s);
+ if pp = nil then begin Result := RPS_UnknownIdentifier; exit; end;
+
+
+ case pp^.PropType^.Kind of
+ tkInteger: begin Result := IntToStr(GetOrdProp(Instance, pp)); exit; end;
+ tkChar: begin Result := '#'+IntToStr(GetOrdProp(Instance, pp)); exit; end;
+ tkEnumeration: begin Result := GetEnumName(pp^.PropType{$IFNDEF FPC}{$IFDEF DELPHI3UP}^{$ENDIF}{$ENDIF}, GetOrdProp(Instance, pp)); exit; end;
+ tkFloat: begin Result := FloatToStr(GetFloatProp(Instance, PP)); exit; end;
+ tkString, tkLString: begin Result := ''''+GetStrProp(Instance, PP)+''''; exit; end;
+ tkSet: begin Result := '[Set]'; exit; end;
+ tkClass: begin Instance := TObject(GetOrdProp(Instance, pp)); end;
+ tkMethod: begin Result := '[Method]'; exit; end;
+ tkVariant: begin Result := '[Variant]'; exit; end;
+ {$IFDEF DELPHI6UP}
+ {$IFNDEF PS_NOWIDESTRING}tkWString: begin Result := ''''+GetWideStrProp(Instance, pp)+''; end; {$ENDIF}
+ {$ENDIF}
+ else begin Result := '[Unknown]'; exit; end;
+ end;
+ if Instance = nil then begin result := 'nil'; exit; end;
+ end;
+ Result := Instance.ClassName;
+end;
+
+function ClassVariantInfo(const pvar: TPSVariantIFC; const PropertyName: string): string;
+begin
+ if pvar.aType.BaseType = btClass then
+ begin
+ if TObject(pvar.Dta^) = nil then
+ Result := 'nil'
+ else
+ Result := PropertyToString(TObject(pvar.Dta^), PropertyName);
+ end else if pvar.atype.basetype = btInterface then
+ Result := 'Interface'
+ else Result := RPS_InvalidType;
+end;
+
+function PSVariantToString(const p: TPSVariantIFC; const ClassProperties: string): string;
+var
+ i, n: Longint;
+begin
+ if p.Dta = nil then
+ begin
+ Result := 'nil';
+ exit;
+ end;
+ if (p.aType.BaseType = btVariant) then
+ begin
+ try
+ if TVarData(p.Dta^).VType = varDispatch then
+ Result := 'Variant(IDispatch)'
+ else if TVarData(p.Dta^).VType = varNull then
+ REsult := 'Null'
+ else if (TVarData(p.Dta^).VType = varOleStr) then
+ {$IFDEF PS_NOWIDESTRING}
+ Result := MakeString(Variant(p.Dta^))
+ {$ELSE}
+ Result := MakeWString(variant(p.dta^))
+ {$ENDIF}
+ else if TVarData(p.Dta^).VType = varString then
+ Result := MakeString(variant(p.Dta^))
+ else
+ Result := Variant(p.Dta^);
+ except
+ on e: Exception do
+ Result := Format (RPS_Exception, [e.Message]);
+ end;
+ exit;
+ end;
+ case p.aType.BaseType of
+ btProcptr: begin Result := 'Proc: '+inttostr(tbtu32(p.Dta^)); end;
+ btU8: str(tbtu8(p.dta^), Result);
+ btS8: str(tbts8(p.dta^), Result);
+ btU16: str(tbtu16(p.dta^), Result);
+ btS16: str(tbts16(p.dta^), Result);
+ btU32: str(tbtu32(p.dta^), Result);
+ btS32: str(tbts32(p.dta^), Result);
+ btSingle: str(tbtsingle(p.dta^), Result);
+ btDouble: str(tbtdouble(p.dta^), Result);
+ btExtended: str(tbtextended(p.dta^), Result);
+ btString: Result := makestring(string(p.dta^));
+ btPChar:
+ begin
+ if PChar(p.dta^) = nil then
+ Result := 'nil'
+ else
+ Result := MakeString(PChar(p.dta^));
+ end;
+ btchar: Result := MakeString(tbtchar(p.dta^));
+ {$IFNDEF PS_NOWIDESTRING}
+ btwidechar: Result := MakeWString(tbtwidechar(p.dta^));
+ btWideString: Result := MakeWString(tbtwidestring(p.dta^));
+ {$ENDIF}
+ {$IFNDEF PS_NOINT64}btS64: str(tbts64(p.dta^), Result);{$ENDIF}
+ btStaticArray, btArray:
+ begin
+ Result := '';
+ if p.aType.BaseType = btStaticArray then
+ n := TPSTypeRec_StaticArray(p.aType).Size
+ else
+ n := PSDynArrayGetLength(Pointer(p.dta^), p.aType);
+ for i := 0 to n-1 do begin
+ if Result <> '' then
+ Result := Result + ', ';
+ Result := Result + PSVariantToString(PSGetArrayField(p, i), '');
+ end;
+ Result := '[' + Result + ']';
+ end;
+ btRecord:
+ begin
+ Result := '';
+ n := TPSTypeRec_Record(p.aType).FFieldTypes.Count;
+ for i := 0 to n-1 do begin
+ if Result <> '' then
+ Result := Result + ', ';
+ Result := Result + PSVariantToString(PSGetRecField(p, i), '');
+ end;
+ Result := '(' + Result + ')';
+ end;
+ btPointer: Result := 'Nil';
+ btClass, btInterface:
+ begin
+ Result := ClassVariantInfo(p, ClassProperties)
+ end;
+ else
+ Result := RPS_Invalid;
+ end;
+end;
+
+
+
+function TIFErrorToString(x: TPSError; const Param: string): string;
+begin
+ Result := PSErrorToString(x,param);
+end;
+
+function PSErrorToString(x: TPSError; const Param: string): string;
+begin
+ case x of
+ ErNoError: Result := RPS_NoError;
+ erCannotImport: Result := Format (RPS_CannotImport, [Safestr(Param)]);
+ erInvalidType: Result := RPS_InvalidType;
+ ErInternalError: Result := RPS_InternalError;
+ erInvalidHeader: Result := RPS_InvalidHeader;
+ erInvalidOpcode: Result := RPS_InvalidOpcode;
+ erInvalidOpcodeParameter: Result := RPS_InvalidOpcodeParameter;
+ erNoMainProc: Result := RPS_NoMainProc;
+ erOutOfGlobalVarsRange: Result := RPS_OutOfGlobalVarsRange;
+ erOutOfProcRange: Result := RPS_OutOfProcRange;
+ ErOutOfRange: Result := RPS_OutOfRange;
+ erOutOfStackRange: Result := RPS_OutOfStackRange;
+ ErTypeMismatch: Result := RPS_TypeMismatch;
+ erUnexpectedEof: Result := RPS_UnexpectedEof;
+ erVersionError: Result := RPS_VersionError;
+ ErDivideByZero: Result := RPS_DivideByZero;
+ erMathError: Result := RPS_MathError;
+ erCouldNotCallProc: begin Result := RPS_CouldNotCallProc; if (Param <> '') then Result := result +' ('+Param+')'; end;
+ erOutofRecordRange: Result := RPS_OutofRecordRange;
+ erNullPointerException: Result := RPS_NullPointerException;
+ erNullVariantError: Result := RPS_NullVariantError;
+ erOutOfMemory: Result := RPS_OutOfMemory;
+ erException: Result := Format (RPS_Exception, [Param]);
+ eInterfaceNotSupported: Result := RPS_InterfaceNotSupported;
+ erCustomError: Result := Param;
+ else
+ Result := RPS_UnknownError;
+ end;
+ //
+end;
+
+
+procedure TPSTypeRec.CalcSize;
+begin
+ case BaseType of
+ btVariant: FRealSize := sizeof(Variant);
+ btChar, bts8, btU8: FrealSize := 1 ;
+ {$IFNDEF PS_NOWIDESTRING}btWideChar, {$ENDIF}bts16, btU16: FrealSize := 2;
+ {$IFNDEF PS_NOWIDESTRING}btWideString, {$ENDIF}{$IFNDEF PS_NOINTERFACES}btInterface, {$ENDIF}btSingle, bts32, btU32,
+ btclass, btPChar, btString: FrealSize := 4;
+ btProcPtr: FRealSize := 2 * sizeof(Pointer) + sizeof(Cardinal);
+ btCurrency: FrealSize := Sizeof(Currency);
+ btPointer: FRealSize := 12; // ptr, type, freewhendone
+ btDouble{$IFNDEF PS_NOINT64}, bts64{$ENDIF}: FrealSize := 8;
+ btExtended: FrealSize := SizeOf(Extended);
+ btReturnAddress: FrealSize := Sizeof(TBTReturnAddress);
+ else
+ FrealSize := 0;
+ end;
+end;
+
+constructor TPSTypeRec.Create(Owner: TPSExec);
+begin
+ inherited Create;
+ FAttributes := TPSRuntimeAttributes.Create(Owner);
+end;
+
+destructor TPSTypeRec.Destroy;
+begin
+ FAttributes.Free;
+ inherited destroy;
+end;
+
+{ TPSTypeRec_Record }
+
+procedure TPSTypeRec_Record.CalcSize;
+begin
+ inherited;
+ FrealSize := TPSTypeRec(FFieldTypes[FFieldTypes.Count-1]).RealSize +
+ Cardinal(RealFieldOffsets[RealFieldOffsets.Count -1]);
+end;
+
+constructor TPSTypeRec_Record.Create(Owner: TPSExec);
+begin
+ inherited Create(Owner);
+ FRealFieldOffsets := TPSList.Create;
+ FFieldTypes := TPSList.Create;
+end;
+
+destructor TPSTypeRec_Record.Destroy;
+begin
+ FFieldTypes.Free;
+ FRealFieldOffsets.Free;
+ inherited Destroy;
+end;
+
+
+const
+ RTTISize = sizeof(TPSVariant);
+
+procedure InitializeVariant(p: Pointer; aType: TPSTypeRec);
+var
+ t: TPSTypeRec;
+ i: Longint;
+begin
+ case aType.BaseType of
+ btChar, bts8, btU8: tbtu8(p^) := 0;
+ {$IFNDEF PS_NOWIDESTRING}btWideChar, {$ENDIF}bts16, btU16: tbtu16(p^) := 0;
+ btSingle, bts32, btU32,
+ btPChar, btString, {$IFNDEF PS_NOWIDESTRING}btWideString, {$ENDIF}btClass,
+ btInterface, btArray: tbtu32(P^) := 0;
+ btPointer:
+ begin
+ Pointer(p^) := nil;
+ Pointer(Pointer(IPointer(p)+4)^) := nil;
+ Pointer(Pointer(IPointer(p)+8)^) := nil;
+ end;
+ btProcPtr:
+ begin
+ Longint(p^) := 0;
+ Pointer(Pointer(IPointer(p)+4)^) := nil;
+ Pointer(Pointer(IPointer(p)+8)^) := nil;
+ end;
+ btCurrency: tbtCurrency(P^) := 0;
+ btDouble{$IFNDEF PS_NOINT64}, bts64{$ENDIF}: {$IFNDEF PS_NOINT64}tbtS64(P^) := 0{$ELSE}tbtdouble(p^) := 0 {$ENDIF};
+ btExtended: tbtExtended(p^) := 0;
+ btVariant: Initialize(Variant(p^));
+ btReturnAddress:; // there is no point in initializing a return address
+ btRecord:
+ begin
+ for i := 0 to TPSTypeRec_Record(aType).FFieldTypes.Count -1 do
+ begin
+ t := TPSTypeRec_Record(aType).FieldTypes[i];
+ InitializeVariant(P, t);
+ p := Pointer(IPointer(p) + t.FrealSize);
+ end;
+ end;
+ btStaticArray:
+ begin
+ t := TPSTypeRec_Array(aType).ArrayType;
+ for i := 0 to TPSTypeRec_StaticArray(aType).Size -1 do
+ begin
+ InitializeVariant(p, t);
+ p := Pointer(IPointer(p) + t.RealSize);
+ end;
+ end;
+ btSet:
+ begin
+ FillChar(p^, TPSTypeRec_Set(aType).RealSize, 0);
+ end;
+ end;
+end;
+
+procedure DestroyHeapVariant2(v: Pointer; aType: TPSTypeRec); forward;
+
+const
+ NeedFinalization = [btStaticArray, btRecord, btArray, btPointer, btVariant {$IFNDEF PS_NOINTERFACES}, btInterface{$ENDIF}, btString {$IFNDEF PS_NOWIDESTRING},btWideString{$ENDIF}];
+
+procedure FinalizeVariant(p: Pointer; aType: TPSTypeRec);
+var
+ t: TPSTypeRec;
+ elsize: Cardinal;
+ i, l: Longint;
+ darr: Pointer;
+begin
+ case aType.BaseType of
+ btString: string(p^) := '';
+ {$IFNDEF PS_NOWIDESTRING}btWideString: widestring(p^) := '';{$ENDIF}
+ {$IFNDEF PS_NOINTERFACES}btInterface:
+ begin
+ {$IFNDEF DELPHI3UP}
+ if IUnknown(p^) <> nil then
+ IUnknown(p^).Release;
+ {$ENDIF}
+ IUnknown(p^) := nil;
+ end; {$ENDIF}
+ btVariant:
+ begin
+ try
+ Finalize(Variant(p^));
+ except
+ end;
+ end;
+ btPointer:
+ if Pointer(Pointer(IPointer(p)+8)^) <> nil then
+ begin
+ DestroyHeapVariant2(Pointer(p^), Pointer(Pointer(IPointer(p)+4)^));
+ Pointer(p^) := nil;
+ end;
+ btArray:
+ begin
+ if IPointer(P^) = 0 then exit;
+ darr := Pointer(IPointer(p^) - 8);
+ if Longint(darr^) < 0 then exit;// refcount < 0 means don't free
+ Dec(Longint(darr^));
+ if Longint(darr^) <> 0 then exit;
+ t := TPSTypeRec_Array(aType).ArrayType;
+ elsize := t.RealSize;
+ darr := Pointer(IPointer(darr) + 4);
+ l := Longint(darr^);
+ darr := Pointer(IPointer(darr) + 4);
+ case t.BaseType of
+ btString, {$IFNDEF PS_NOWIDESTRING}btWideString, {$ENDIF}{$IFNDEF PS_NOINTERFACES}btInterface, {$ENDIF}btArray, btStaticArray,
+ btRecord, btPointer:
+ begin
+ for i := 0 to l -1 do
+ begin
+ FinalizeVariant(darr, t);
+ darr := Pointer(IPointer(darr) + elsize);
+ end;
+ end;
+ end;
+ FreeMem(Pointer(IPointer(p^) - 8), Cardinal(l) * elsize + 8);
+ Pointer(P^) := nil;
+ end;
+ btRecord:
+ begin
+ for i := 0 to TPSTypeRec_Record(aType).FFieldTypes.Count -1 do
+ begin
+ t := TPSTypeRec_Record(aType).FieldTypes[i];
+ case t.BaseType of
+ btString, {$IFNDEF PS_NOWIDESTRING}btWideString, {$ENDIF}{$IFNDEF PS_NOINTERFACES}btInterface, {$ENDIF}btArray, btStaticArray,
+ btRecord: FinalizeVariant(p, t);
+ end;
+ p := Pointer(IPointer(p) + t.FrealSize);
+ end;
+ end;
+ btStaticArray:
+ begin
+ t := TPSTypeRec_Array(aType).ArrayType;
+ case t.BaseType of
+ btString, {$IFNDEF PS_NOWIDESTRING}btWideString, {$ENDIF}{$IFNDEF PS_NOINTERFACES}btInterface, {$ENDIF}btArray, btStaticArray,
+ btRecord: ;
+ else Exit;
+ end;
+ for i := 0 to TPSTypeRec_StaticArray(aType).Size -1 do
+ begin
+ FinalizeVariant(p, t);
+ p := Pointer(IPointer(p) + t.RealSize);
+ end;
+ end;
+ end;
+end;
+
+function CreateHeapVariant2(aType: TPSTypeRec): Pointer;
+begin
+ GetMem(Result, aType.RealSize);
+ InitializeVariant(Result, aType);
+end;
+
+procedure DestroyHeapVariant2(v: Pointer; aType: TPSTypeRec);
+begin
+ if v = nil then exit;
+ if atype.BaseType in NeedFinalization then
+ FinalizeVariant(v, aType);
+ FreeMem(v, aType.RealSize);
+end;
+
+
+function CreateHeapVariant(aType: TPSTypeRec): PPSVariant;
+var
+ aSize: Longint;
+begin
+ aSize := aType.RealSize + RTTISize;
+ GetMem(Result, aSize);
+ Result.FType := aType;
+ InitializeVariant(Pointer(IPointer(Result)+4), aType);
+end;
+
+procedure DestroyHeapVariant(v: PPSVariant);
+begin
+ if v = nil then exit;
+ if v.FType.BaseType in NeedFinalization then
+ FinalizeVariant(Pointer(IPointer(v)+4), v.FType);
+ FreeMem(v, v.FType.RealSize + RTTISize);
+end;
+
+procedure FreePSVariantList(l: TPSList);
+var
+ i: Longint;
+begin
+ for i:= l.count -1 downto 0 do
+ DestroyHeapVariant(l[i]);
+ l.free;
+end;
+
+procedure FreePIFVariantList(l: TPSList);
+begin
+ FreePsVariantList(l);
+end;
+
+{ TPSExec }
+
+procedure TPSExec.ClearFunctionList;
+var
+ x: PProcRec;
+ l: Longint;
+begin
+ for l := FAttributeTypes.Count -1 downto 0 do
+ begin
+ TPSAttributeType(FAttributeTypes.Data^[l]).Free;
+ end;
+ FAttributeTypes.Clear;
+
+ for l := 0 to FRegProcs.Count - 1 do
+ begin
+ x := FRegProcs.Data^[l];
+ if @x^.FreeProc <> nil then x^.FreeProc(Self, x);
+ Dispose(x);
+ end;
+ FRegProcs.Clear;
+ RegisterStandardProcs;
+end;
+
+class function TPSExec.About: string;
+begin
+ Result := 'RemObjects Pascal Script. Copyright (c) 2004 by RemObjects Software';
+end;
+
+procedure TPSExec.Cleanup;
+var
+ I: Longint;
+ p: Pointer;
+begin
+ if FStatus <> isLoaded then
+ exit;
+ FStack.Clear;
+ FTempVars.Clear;
+ for I := Longint(FGlobalVars.Count) - 1 downto 0 do
+ begin
+ p := FGlobalVars.Items[i];
+ if PIFTypeRec(P^).BaseType in NeedFinalization then
+ FinalizeVariant(Pointer(IPointer(p)+4), Pointer(P^));
+ InitializeVariant(Pointer(IPointer(p)+4), Pointer(P^));
+ end;
+end;
+
+procedure TPSExec.Clear;
+var
+ I: Longint;
+ temp: PPSResource;
+ Proc: TPSResourceFreeProc;
+ pp: TPSExceptionHandler;
+begin
+ for i := Longint(FExceptionStack.Count) -1 downto 0 do
+ begin
+ pp := FExceptionStack.Data^[i];
+ pp.Free;
+ end;
+ for i := Longint(FResources.Count) -1 downto 0 do
+ begin
+ Temp := FResources.Data^[i];
+ Proc := Temp^.Proc;
+ Proc(Self, Temp^.P);
+ Dispose(Temp);
+ end;
+ for i := Longint(FExportedVars.Count) -1 downto 0 do
+ Dispose(PPSExportedVar(FExportedVars.Data^[I]));
+ for I := Longint(FProcs.Count) - 1downto 0 do
+ TPSProcRec(FProcs.Data^[i]).Destroy;
+ FProcs.Clear;
+ FGlobalVars.Clear;
+ FStack.Clear;
+ for I := Longint(FTypes.Count) - 1downto 0 do
+ TPSTypeRec(FTypes.Data^[i]).Free;
+ FTypes.Clear;
+ FStatus := isNotLoaded;
+ FResources.Clear;
+ FExportedVars.Clear;
+ FExceptionStack.Clear;
+ FCurrStackBase := InvalidVal;
+end;
+
+constructor TPSExec.Create;
+begin
+ inherited Create;
+ FAttributeTypes := TPSList.Create;
+ FExceptionStack := TPSList.Create;
+ FCallCleanup := False;
+ FResources := TPSList.Create;
+ FTypes := TPSList.Create;
+ FProcs := TPSList.Create;
+ FGlobalVars := TPSStack.Create;
+ FTempVars := TPSStack.Create;
+ FMainProc := 0;
+ FStatus := isNotLoaded;
+ FRegProcs := TPSList.Create;
+ FExportedVars := TPSList.create;
+ FSpecialProcList := TPSList.Create;
+ RegisterStandardProcs;
+ FReturnAddressType := TPSTypeRec.Create(self);
+ FReturnAddressType.BaseType := btReturnAddress;
+ FReturnAddressType.CalcSize;
+ FVariantType := TPSTypeRec.Create(self);
+ FVariantType.BaseType := btVariant;
+ FVariantType.CalcSize;
+ FVariantArrayType := TPSTypeRec_Array.Create(self);
+ FVariantArrayType.BaseType := btArray;
+ FVariantArrayType.CalcSize;
+ TPSTypeRec_Array(FVariantArrayType).ArrayType := FVariantType;
+ FStack := TPSStack.Create;
+end;
+
+destructor TPSExec.Destroy;
+var
+ I: Longint;
+ x: PProcRec;
+ P: PSpecialProc;
+begin
+ Clear;
+ FReturnAddressType.Free;
+ FVariantType.Free;
+ FVariantArrayType.Free;
+
+ if ExObject <> nil then ExObject.Free;
+ for I := FSpecialProcList.Count -1 downto 0 do
+ begin
+ P := FSpecialProcList.Data^[I];
+ Dispose(p);
+ end;
+ FResources.Free;
+ FExportedVars.Free;
+ FTempVars.Free;
+ FStack.Free;
+ FGlobalVars.Free;
+ FProcs.Free;
+ FTypes.Free;
+ FSpecialProcList.Free;
+ for i := FRegProcs.Count - 1 downto 0 do
+ begin
+ x := FRegProcs.Data^[i];
+ if @x^.FreeProc <> nil then x^.FreeProc(Self, x);
+ Dispose(x);
+ end;
+ FRegProcs.Free;
+ FExceptionStack.Free;
+ for i := FAttributeTypes.Count -1 downto 0 do
+ begin
+ TPSAttributeType(FAttributeTypes[i]).Free;
+ end;
+ FAttributeTypes.Free;
+ inherited Destroy;
+end;
+
+procedure TPSExec.ExceptionProc(proc, Position: Cardinal; Ex: TPSError; const s: string; NewObject: TObject);
+var
+ d, l: Longint;
+ pp: TPSExceptionHandler;
+begin
+ ExProc := proc;
+ ExPos := Position;
+ ExEx := Ex;
+ ExParam := s;
+ if ExObject <> nil then
+ ExObject.Free;
+ ExObject := NewObject;
+ if Ex = eNoError then Exit;
+ for d := FExceptionStack.Count -1 downto 0 do
+ begin
+ pp := FExceptionStack[d];
+ if Cardinal(FStack.Count) > pp.StackSize then
+ begin
+ for l := Longint(FStack.count) -1 downto Longint(pp.StackSize) do
+ FStack.Pop;
+ end;
+ if pp.CurrProc = nil then // no point in continuing
+ begin
+ pp.Free;
+ FExceptionStack.DeleteLast;
+
+ FCurrStackBase := InvalidVal;
+ FStatus := isPaused;
+ exit;
+ end;
+ FCurrProc := pp.CurrProc;
+ FData := FCurrProc.Data;
+ FDataLength := FCurrProc.Length;
+
+ FCurrStackBase := pp.BasePtr;
+ if pp.FinallyOffset <> InvalidVal then
+ begin
+ FCurrentPosition := pp.FinallyOffset;
+ pp.FinallyOffset := InvalidVal;
+ Exit;
+ end else if (pp.ExceptOffset <> InvalidVal) and (pp.ExceptOffset <> Cardinal(InvalidVal -1)) then
+ begin
+ FCurrentPosition := pp.ExceptOffset;
+ pp.ExceptOffset := Cardinal(InvalidVal -1);
+ pp.ExceptionObject := ExObject;
+ pp.ExceptionData := ExEx;
+ pp.ExceptionParam := ExParam;
+ ExObject := nil;
+ ExEx := ENoError;
+ Exit;
+ end else if pp.Finally2Offset <> InvalidVal then
+ begin
+ FCurrentPosition := pp.Finally2Offset;
+ pp.Finally2Offset := InvalidVal;
+ Exit;
+ end;
+ pp.Free;
+ FExceptionStack.DeleteLast;
+ end;
+ if FStatus <> isNotLoaded then
+ FStatus := isPaused;
+end;
+
+function LookupProc(List: TPSList; const Name: ShortString): PProcRec;
+var
+ h, l: Longint;
+ p: PProcRec;
+begin
+ h := MakeHash(Name);
+ for l := List.Count - 1 downto 0 do
+ begin
+ p := List.Data^[l];
+ if (p^.Hash = h) and (p^.Name = Name) then
+ begin
+ Result := List[l];
+ exit;
+ end;
+ end;
+ Result := nil;
+end;
+
+function TPSExec.ImportProc(const Name: ShortString; proc: TPSExternalProcRec): Boolean;
+var
+ u: PProcRec;
+ fname: string;
+ I, fnh: Longint;
+ P: PSpecialProc;
+
+begin
+ if name = '' then
+ begin
+ fname := proc.Decl;
+ fname := copy(fname, 1, pos(':', fname)-1);
+ fnh := MakeHash(fname);
+ for I := FSpecialProcList.Count -1 downto 0 do
+ begin
+ p := FSpecialProcList[I];
+ IF (p^.name = '') or ((p^.namehash = fnh) and (p^.name = fname)) then
+ begin
+ if p^.P(Self, Proc, p^.tag) then
+ begin
+ Result := True;
+ exit;
+ end;
+ end;
+ end;
+ Result := FAlse;
+ exit;
+ end;
+ u := LookupProc(FRegProcs, Name);
+ if u = nil then begin
+ Result := False;
+ exit;
+ end;
+ proc.ProcPtr := u^.ProcPtr;
+ proc.Ext1 := u^.Ext1;
+ proc.Ext2 := u^.Ext2;
+ Result := True;
+end;
+
+function TPSExec.RegisterFunctionName(const Name: string; ProcPtr: TPSProcPtr; Ext1, Ext2: Pointer): PProcRec;
+var
+ p: PProcRec;
+ s: string;
+begin
+ s := FastUppercase(Name);
+ New(p);
+ p^.Name := s;
+ p^.Hash := MakeHash(s);
+ p^.ProcPtr := ProcPtr;
+ p^.FreeProc := nil;
+ p.Ext1 := Ext1;
+ p^.Ext2 := Ext2;
+ FRegProcs.Add(p);
+ Result := P;
+end;
+
+function TPSExec.LoadData(const s: string): Boolean;
+var
+ HDR: TPSHeader;
+ Pos: Cardinal;
+
+ function read(var Data; Len: Cardinal): Boolean;
+ begin
+ if Longint(Pos + Len) <= Length(s) then begin
+ Move(s[Pos + 1], Data, Len);
+ Pos := Pos + Len;
+ read := True;
+ end
+ else
+ read := False;
+ end;
+ function ReadAttributes(Dest: TPSRuntimeAttributes): Boolean;
+ var
+ Count: Cardinal;
+ i: Integer;
+
+ function ReadAttrib: Boolean;
+ var
+ NameLen: Longint;
+ Name: string;
+ TypeNo: Cardinal;
+ i, h, FieldCount: Longint;
+ att: TPSRuntimeAttribute;
+ varp: PIFVariant;
+
+ begin
+ if (not Read(NameLen, 4)) or (NameLen > Length(s) - Longint(Pos)) then
+ begin
+ CMD_Err(ErOutOfRange);
+ Result := false;
+ exit;
+ end;
+ SetLength(Name, NameLen);
+ if not Read(Name[1], NameLen) then
+ begin
+ CMD_Err(ErOutOfRange);
+ Result := false;
+ exit;
+ end;
+ if not Read(FieldCount, 4) then
+ begin
+ CMD_Err(ErOutOfRange);
+ Result := false;
+ exit;
+ end;
+ att := Dest.Add;
+ att.AttribType := Name;
+ att.AttribTypeHash := MakeHash(att.AttribType);
+ for i := 0 to FieldCount -1 do
+ begin
+ if (not Read(TypeNo, 4)) or (TypeNo >= Cardinal(FTypes.Count)) then
+ begin
+ CMD_Err(ErOutOfRange);
+ Result := false;
+ exit;
+ end;
+
+ varp := att.AddValue(FTypes[TypeNo]);
+ case VarP^.FType.BaseType of
+ btSet:
+ begin
+ if not read(PPSVariantSet(varp).Data, TPSTypeRec_Set(varp.FType).aByteSize) then
+ begin
+ CMD_Err(erOutOfRange);
+
+ DestroyHeapVariant(VarP);
+ Result := False;
+ exit;
+ end;
+ end;
+ bts8, btchar, btU8: if not read(PPSVariantU8(VarP)^.data, 1) then
+ begin
+ CMD_Err(erOutOfRange);
+ DestroyHeapVariant(VarP);
+ Result := False;
+ exit;
+ end;
+ bts16, {$IFNDEF PS_NOWIDESTRING}btwidechar,{$ENDIF} btU16: if not read(PPSVariantU16(Varp)^.Data, SizeOf(TbtU16)) then begin
+ CMD_Err(ErOutOfRange);
+ DestroyHeapVariant(VarP);
+ Result := False;
+ exit;
+ end;
+ bts32, btU32:
+ begin
+ if FCurrentPosition + 3 >= FDataLength then
+ begin
+ Cmd_Err(erOutOfRange);
+ DestroyHeapVariant(VarP);
+ Result := False;
+ exit;;
+ end;
+ PPSVariantU32(varp)^.Data := Cardinal((@FData^[FCurrentPosition])^);
+ Inc(FCurrentPosition, 4);
+ end;
+ btProcPtr:
+ begin
+ if FCurrentPosition + 3 >= FDataLength then
+ begin
+ Cmd_Err(erOutOfRange);
+ DestroyHeapVariant(VarP);
+ Result := False;
+ exit;;
+ end;
+ PPSVariantU32(varp)^.Data := Cardinal((@FData^[FCurrentPosition])^);
+ if PPSVariantU32(varp)^.Data = 0 then
+ begin
+ PPSVariantProcPtr(varp)^.Ptr := nil;
+ PPSVariantProcPtr(varp)^.Self := nil;
+ end;
+ Inc(FCurrentPosition, 4);
+ end;
+ {$IFNDEF PS_NOINT64}
+ bts64: if not read(PPSVariantS64(VarP)^.Data, sizeof(tbts64)) then
+ begin
+ CMD_Err(erOutOfRange);
+ DestroyHeapVariant(VarP);
+ Result := False;
+ exit;
+ end;
+ {$ENDIF}
+ btSingle: if not read(PPSVariantSingle(VarP)^.Data, SizeOf(TbtSingle))
+ then begin
+ CMD_Err(erOutOfRange);
+ DestroyHeapVariant(VarP);
+ Result := False;
+ exit;
+ end;
+ btDouble: if not read(PPSVariantDouble(varp)^.Data, SizeOf(TbtDouble))
+ then begin
+ CMD_Err(erOutOfRange);
+ DestroyHeapVariant(VarP);
+ Result := False;
+ exit;
+ end;
+ btExtended: if not read(PPSVariantExtended(varp)^.Data, SizeOf(TbtExtended))
+ then begin
+ CMD_Err(erOutOfRange);
+ DestroyHeapVariant(VarP);
+ Result := False;
+ exit;
+ end;
+ btCurrency: if not read(PPSVariantExtended(varp)^.Data, SizeOf(tbtCurrency))
+ then begin
+ CMD_Err(erOutOfRange);
+ DestroyHeapVariant(VarP);
+ Result := False;
+ exit;
+ end;
+ btPchar, btString:
+ begin
+ if not read(NameLen, 4) then
+ begin
+ Cmd_Err(erOutOfRange);
+ DestroyHeapVariant(VarP);
+ Result := False;
+ exit;
+ end;
+ Inc(FCurrentPosition, 4);
+ SetLength(PPSVariantAString(varp)^.Data, NameLen);
+ if not read(PPSVariantAString(varp)^.Data[1], NameLen) then begin
+ CMD_Err(erOutOfRange);
+ DestroyHeapVariant(VarP);
+ Result := False;
+ exit;
+ end;
+ end;
+ {$IFNDEF PS_NOWIDESTRING}
+ btWidestring:
+ begin
+ if not read(NameLen, 4) then
+ begin
+ Cmd_Err(erOutOfRange);
+ DestroyHeapVariant(VarP);
+ Result := False;
+ exit;
+ end;
+ Inc(FCurrentPosition, 4);
+ SetLength(PPSVariantWString(varp).Data, NameLen);
+ if not read(PPSVariantWString(varp).Data[1], NameLen*2) then begin
+ CMD_Err(erOutOfRange);
+ DestroyHeapVariant(VarP);
+ Result := False;
+ exit;
+ end;
+ end;
+ {$ENDIF}
+ else begin
+ CMD_Err(erInvalidType);
+ DestroyHeapVariant(VarP);
+ Result := False;
+ exit;
+ end;
+ end;
+ end;
+ h := MakeHash(att.AttribType);
+ for i := FAttributeTypes.Count -1 downto 0 do
+ begin
+ if (TPSAttributeType(FAttributeTypes.Data^[i]).TypeNameHash = h) and
+ (TPSAttributeType(FAttributeTypes.Data^[i]).TypeName = att.AttribType) then
+ begin
+ if not TPSAttributeType(FAttributeTypes.Data^[i]).UseProc(Self, att.AttribType, Att) then
+ begin
+ Result := False;
+ exit;
+ end;
+ end;
+ end;
+ Result := True;
+ end;
+
+
+ begin
+ if not Read(Count, 4) then
+ begin
+ CMD_Err(erOutofRange);
+ Result := false;
+ exit;
+ end;
+ for i := 0 to Count -1 do
+ begin
+ if not ReadAttrib then
+ begin
+ Result := false;
+ exit;
+ end;
+ end;
+ Result := True;
+ end;
+
+{$WARNINGS OFF}
+
+ function LoadTypes: Boolean;
+ var
+ currf: TPSType;
+ Curr: PIFTypeRec;
+ fe: Boolean;
+ l2, l: Longint;
+ d: Cardinal;
+
+ function resolve(Dta: TPSTypeRec_Record): Boolean;
+ var
+ offs, l: Longint;
+ begin
+ offs := 0;
+ for l := 0 to Dta.FieldTypes.Count -1 do
+ begin
+ Dta.RealFieldOffsets.Add(Pointer(offs));
+ offs := offs + TPSTypeRec(Dta.FieldTypes[l]).RealSize;
+ end;
+ Result := True;
+ end;
+ begin
+ LoadTypes := True;
+ for l := 0 to HDR.TypeCount - 1 do begin
+ if not read(currf, SizeOf(currf)) then begin
+ cmd_err(erUnexpectedEof);
+ LoadTypes := False;
+ exit;
+ end;
+ if (currf.BaseType and 128) <> 0 then begin
+ fe := True;
+ currf.BaseType := currf.BaseType - 128;
+ end else
+ fe := False;
+ case currf.BaseType of
+ {$IFNDEF PS_NOINT64}bts64, {$ENDIF}
+ btU8, btS8, btU16, btS16, btU32, btS32, btSingle, btDouble, btCurrency,
+ btExtended, btString, btPointer, btPChar,
+ btVariant, btChar{$IFNDEF PS_NOWIDESTRING}, btWideString, btWideChar{$ENDIF}: begin
+ curr := TPSTypeRec.Create(self);
+ Curr.BaseType := currf.BaseType;
+ FTypes.Add(Curr);
+ end;
+ btClass:
+ begin
+ Curr := TPSTypeRec_Class.Create(self);
+ if (not Read(d, 4)) or (d > 255) then
+ begin
+ curr.Free;
+ cmd_err(erUnexpectedEof);
+ LoadTypes := False;
+ exit;
+ end;
+ setlength(TPSTypeRec_Class(Curr).FCN, d);
+ if not Read(TPSTypeRec_Class(Curr).FCN[1], d) then
+ begin
+ curr.Free;
+ cmd_err(erUnexpectedEof);
+ LoadTypes := False;
+ exit;
+ end;
+ Curr.BaseType := currf.BaseType;
+ FTypes.Add(Curr);
+ end;
+ btProcPtr:
+ begin
+ Curr := TPSTypeRec_ProcPtr.Create(self);
+ if (not Read(d, 4)) or (d > 255) then
+ begin
+ curr.Free;
+ cmd_err(erUnexpectedEof);
+ LoadTypes := False;
+ exit;
+ end;
+ setlength(TPSTypeRec_ProcPtr(Curr).FParamInfo, d);
+ if not Read(TPSTypeRec_ProcPtr(Curr).FParamInfo[1], d) then
+ begin
+ curr.Free;
+ cmd_err(erUnexpectedEof);
+ LoadTypes := False;
+ exit;
+ end;
+ Curr.BaseType := currf.BaseType;
+ FTypes.Add(Curr);
+ end;
+{$IFNDEF PS_NOINTERFACES}
+ btInterface:
+ begin
+ Curr := TPSTypeRec_Interface.Create(self);
+ if not Read(TPSTypeRec_Interface(Curr).FGUID, Sizeof(TGuid)) then
+ begin
+ curr.Free;
+ cmd_err(erUnexpectedEof);
+ LoadTypes := False;
+ exit;
+ end;
+ Curr.BaseType := currf.BaseType;
+ FTypes.Add(Curr);
+ end;
+{$ENDIF}
+ btSet:
+ begin
+ Curr := TPSTypeRec_Set.Create(self);
+ if not Read(d, 4) then
+ begin
+ curr.Free;
+ cmd_err(erUnexpectedEof);
+ LoadTypes := False;
+ exit;
+ end;
+ if (d > 256) then
+ begin
+ curr.Free;
+ cmd_err(erTypeMismatch);
+ LoadTypes := False;
+ exit;
+ end;
+
+ TPSTypeRec_Set(curr).aBitSize := d;
+ TPSTypeRec_Set(curr).aByteSize := TPSTypeRec_Set(curr).aBitSize shr 3;
+ if (TPSTypeRec_Set(curr).aBitSize and 7) <> 0 then inc(TPSTypeRec_Set(curr).fbytesize);
+ Curr.BaseType := currf.BaseType;
+ FTypes.Add(Curr);
+ end;
+ btStaticArray:
+ begin
+ curr := TPSTypeRec_StaticArray.Create(self);
+ if not Read(d, 4) then
+ begin
+ curr.Free;
+ cmd_err(erUnexpectedEof);
+ LoadTypes := False;
+ exit;
+ end;
+ if (d >= FTypes.Count) then
+ begin
+ curr.Free;
+ cmd_err(erTypeMismatch);
+ LoadTypes := False;
+ exit;
+ end;
+ TPSTypeRec_StaticArray(curr).ArrayType := FTypes[d];
+ if not Read(d, 4) then
+ begin
+ curr.Free;
+ cmd_err(erUnexpectedEof);
+ LoadTypes := False;
+ exit;
+ end;
+ if d > (MaxInt div 4) then
+ begin
+ curr.Free;
+ cmd_err(erUnexpectedEof);
+ LoadTypes := False;
+ exit;
+ end;
+ TPSTypeRec_StaticArray(curr).Size := d;
+ if not Read(d,4) then //<-additional StartOffset
+ begin
+ curr.Free;
+ cmd_err(erUnexpectedEof);
+ LoadTypes:=false;
+ Exit;
+ end;
+ TPSTypeRec_StaticArray(curr).StartOffset:=d;
+
+ Curr.BaseType := currf.BaseType;
+ FTypes.Add(Curr);
+ end;
+ btArray: begin
+ Curr := TPSTypeRec_Array.Create(self);
+ if not read(d, 4) then
+ begin // Read type
+ curr.Free;
+ cmd_err(erUnexpectedEof);
+ LoadTypes := False;
+ exit;
+ end;
+ if (d >= FTypes.Count) then
+ begin
+ curr.Free;
+ cmd_err(erTypeMismatch);
+ LoadTypes := False;
+ exit;
+ end;
+ Curr.BaseType := currf.BaseType;
+ TPSTypeRec_Array(curr).ArrayType := FTypes[d];
+ FTypes.Add(Curr);
+ end;
+ btRecord:
+ begin
+ curr := TPSTypeRec_Record.Create(self);
+ if not read(d, 4) or (d = 0) then
+ begin
+ curr.Free;
+ cmd_err(erUnexpectedEof);
+ LoadTypes := false;
+ exit;
+ end;
+ while d > 0 do
+ begin
+ if not Read(l2, 4) then
+ begin
+ curr.Free;
+ cmd_err(erUnexpectedEof);
+ LoadTypes := false;
+ exit;
+ end;
+ if Cardinal(l2) >= FTypes.Count then
+ begin
+ curr.Free;
+ cmd_err(ErOutOfRange);
+ LoadTypes := false;
+ exit;
+ end;
+ TPSTypeRec_Record(curR).FFieldTypes.Add(FTypes[l2]);
+ Dec(D);
+ end;
+ if not resolve(TPSTypeRec_Record(curr)) then
+ begin
+ curr.Free;
+ cmd_err(erInvalidType);
+ LoadTypes := False;
+ exit;
+ end;
+ Curr.BaseType := currf.BaseType;
+ FTypes.Add(Curr);
+ end;
+ else begin
+ LoadTypes := False;
+ CMD_Err(erInvalidType);
+ exit;
+ end;
+ end;
+ if fe then begin
+ if not read(d, 4) then begin
+ cmd_err(erUnexpectedEof);
+ LoadTypes := False;
+ exit;
+ end;
+ if d > PSAddrNegativeStackStart then
+ begin
+ cmd_err(erInvalidType);
+ LoadTypes := False;
+ exit;
+ end;
+ SetLength(Curr.FExportName, d);
+ if not read(Curr.fExportName[1], d) then
+ begin
+ cmd_err(erUnexpectedEof);
+ LoadTypes := False;
+ exit;
+ end;
+ Curr.ExportNameHash := MakeHash(Curr.ExportName);
+ end;
+ curr.CalcSize;
+ if HDR.PSBuildNo >= 21 then // since build 21 we support attributes
+ begin
+ if not ReadAttributes(Curr.Attributes) then
+ begin
+ LoadTypes := False;
+ exit;
+ end;
+ end;
+ end;
+ end;
+
+ function LoadProcs: Boolean;
+ var
+ Rec: TPSProc;
+ n: string;
+ b: Byte;
+ l, L2, L3: Longint;
+ Curr: TPSProcRec;
+ begin
+ LoadProcs := True;
+ for l := 0 to HDR.ProcCount - 1 do begin
+ if not read(Rec, SizeOf(Rec)) then begin
+ cmd_err(erUnexpectedEof);
+ LoadProcs := False;
+ exit;
+ end;
+ if (Rec.Flags and 1) <> 0 then
+ begin
+ Curr := TPSExternalProcRec.Create(Self);
+ if not read(b, 1) then begin
+ Curr.Free;
+ cmd_err(erUnexpectedEof);
+ LoadProcs := False;
+ exit;
+ end;
+ SetLength(n, b);
+ if not read(n[1], b) then begin
+ Curr.Free;
+ cmd_err(erUnexpectedEof);
+ LoadProcs := False;
+ exit;
+ end;
+ TPSExternalProcRec(Curr).Name := n;
+ if (Rec.Flags and 3 = 3) then
+ begin
+ if (not Read(L2, 4)) or (L2 > Length(s) - Pos) then
+ begin
+ Curr.Free;
+ cmd_err(erUnexpectedEof);
+ LoadProcs := False;
+ exit;
+ end;
+ SetLength(n, L2);
+ Read(n[1], L2); // no check is needed
+ TPSExternalProcRec(Curr).FDecl := n;
+ end;
+ if not ImportProc(TPSExternalProcRec(Curr).Name, TPSExternalProcRec(Curr)) then begin
+ if TPSExternalProcRec(Curr).Name <> '' then
+ CMD_Err2(erCannotImport, TPSExternalProcRec(Curr).Name)
+ else
+ CMD_Err2(erCannotImport, TPSExternalProcRec(curr).Decl);
+ Curr.Free;
+ LoadProcs := False;
+ exit;
+ end;
+ end else begin
+ Curr := TPSInternalProcRec.Create(Self);
+ if not read(L2, 4) then begin
+ Curr.Free;
+ cmd_err(erUnexpectedEof);
+ LoadProcs := False;
+ exit;
+ end;
+ if not read(L3, 4) then begin
+ Curr.Free;
+ cmd_err(erUnexpectedEof);
+ LoadProcs := False;
+ exit;
+ end;
+ if (L2 < 0) or (L2 >= Length(s)) or (L2 + L3 > Length(s)) or (L3 = 0) then begin
+ Curr.Free;
+ cmd_err(erUnexpectedEof);
+ LoadProcs := False;
+ exit;
+ end;
+
+ GetMem(TPSInternalProcRec(Curr).FData, L3);
+ Move(s[L2 + 1], TPSInternalProcRec(Curr).FData^, L3);
+ TPSInternalProcRec(Curr).FLength := L3;
+ if (Rec.Flags and 2) <> 0 then begin // exported
+ if not read(L3, 4) then begin
+ Curr.Free;
+ cmd_err(erUnexpectedEof);
+ LoadProcs := False;
+ exit;
+ end;
+ if L3 > PSAddrNegativeStackStart then begin
+ Curr.Free;
+ cmd_err(erUnexpectedEof);
+ LoadProcs := False;
+ exit;
+ end;
+ SetLength(TPSInternalProcRec(Curr).FExportName, L3);
+ if not read(TPSInternalProcRec(Curr).FExportName[1], L3) then begin
+ Curr.Free;
+ cmd_err(erUnexpectedEof);
+ LoadProcs := False;
+ exit;
+ end;
+ if not read(L3, 4) then begin
+ Curr.Free;
+ cmd_err(erUnexpectedEof);
+ LoadProcs := False;
+ exit;
+ end;
+ if L3 > PSAddrNegativeStackStart then begin
+ Curr.Free;
+ cmd_err(erUnexpectedEof);
+ LoadProcs := False;
+ exit;
+ end;
+ SetLength(TPSInternalProcRec(Curr).FExportDecl, L3);
+ if not read(TPSInternalProcRec(Curr).FExportDecl[1], L3) then begin
+ Curr.Free;
+ cmd_err(erUnexpectedEof);
+ LoadProcs := False;
+ exit;
+ end;
+ TPSInternalProcRec(Curr).FExportNameHash := MakeHash(TPSInternalProcRec(Curr).ExportName);
+ end;
+ end;
+ if (Rec.Flags and 4) <> 0 then
+ begin
+ if not ReadAttributes(Curr.Attributes) then
+ begin
+ Curr.Free;
+ LoadProcs := False;
+ exit;
+ end;
+ end;
+ FProcs.Add(Curr);
+ end;
+ end;
+{$WARNINGS ON}
+
+ function LoadVars: Boolean;
+ var
+ l, n: Longint;
+ e: PPSExportedVar;
+ Rec: TPSVar;
+ Curr: PIfVariant;
+ begin
+ LoadVars := True;
+ for l := 0 to HDR.VarCount - 1 do begin
+ if not read(Rec, SizeOf(Rec)) then begin
+ cmd_err(erUnexpectedEof);
+ LoadVars := False;
+ exit;
+ end;
+ if Rec.TypeNo >= HDR.TypeCount then begin
+ cmd_err(erInvalidType);
+ LoadVars := False;
+ exit;
+ end;
+ Curr := FGlobalVars.PushType(FTypes.Data^[Rec.TypeNo]);
+ if Curr = nil then begin
+ cmd_err(erInvalidType);
+ LoadVars := False;
+ exit;
+ end;
+ if (Rec.Flags and 1) <> 0 then
+ begin
+ if not read(n, 4) then begin
+ cmd_err(erUnexpectedEof);
+ LoadVars := False;
+ exit;
+ end;
+ new(e);
+ try
+ SetLength(e^.FName, n);
+ if not Read(e^.FName[1], n) then
+ begin
+ dispose(e);
+ cmd_err(erUnexpectedEof);
+ LoadVars := False;
+ exit;
+ end;
+ e^.FNameHash := MakeHash(e^.FName);
+ e^.FVarNo := FGlobalVars.Count;
+ FExportedVars.Add(E);
+ except
+ dispose(e);
+ cmd_err(erInvalidType);
+ LoadVars := False;
+ exit;
+ end;
+ end;
+ end;
+ end;
+
+begin
+ Clear;
+ Pos := 0;
+ LoadData := False;
+ if not read(HDR, SizeOf(HDR)) then
+ begin
+ CMD_Err(erInvalidHeader);
+ exit;
+ end;
+ if HDR.HDR <> PSValidHeader then
+ begin
+ CMD_Err(erInvalidHeader);
+ exit;
+ end;
+ if (HDR.PSBuildNo > PSCurrentBuildNo) or (HDR.PSBuildNo < PSLowBuildSupport) then begin
+ CMD_Err(erInvalidHeader);
+ exit;
+ end;
+ if not LoadTypes then
+ begin
+ Clear;
+ exit;
+ end;
+ if not LoadProcs then
+ begin
+ Clear;
+ exit;
+ end;
+ if not LoadVars then
+ begin
+ Clear;
+ exit;
+ end;
+ if (HDR.MainProcNo >= FProcs.Count) and (HDR.MainProcNo <> InvalidVal)then begin
+ CMD_Err(erNoMainProc);
+ Clear;
+ exit;
+ end;
+ // Load Import Table
+ FMainProc := HDR.MainProcNo;
+ FStatus := isLoaded;
+ Result := True;
+end;
+
+
+procedure TPSExec.Pause;
+begin
+ if FStatus = isRunning then
+ FStatus := isPaused;
+end;
+
+function TPSExec.ReadData(var Data; Len: Cardinal): Boolean;
+begin
+ if FCurrentPosition + Len <= FDataLength then begin
+ Move(FData^[FCurrentPosition], Data, Len);
+ FCurrentPosition := FCurrentPosition + Len;
+ Result := True;
+ end
+ else
+ Result := False;
+end;
+
+procedure TPSExec.CMD_Err(EC: TPSError); // Error
+begin
+ CMD_Err3(ec, '', nil);
+end;
+
+procedure VNSetPointerTo(const Src: TPSVariantIFC; Data: Pointer; aType: TPSTypeRec);
+begin
+ if Src.aType.BaseType = btPointer then
+ begin
+ if atype.BaseType in NeedFinalization then
+ FinalizeVariant(src.Dta, Src.aType);
+ Pointer(Src.Dta^) := Data;
+ Pointer(Pointer(IPointer(Src.Dta)+4)^) := aType;
+ Pointer(Pointer(IPointer(Src.Dta)+8)^) := nil;
+ end;
+end;
+
+function VNGetUInt(const Src: TPSVariantIFC): Cardinal;
+begin
+ Result := PSGetUInt(Src.Dta, Src.aType);
+end;
+
+{$IFNDEF PS_NOINT64}
+function VNGetInt64(const Src: TPSVariantIFC): Int64;
+begin
+ Result := PSGetInt64(Src.Dta, Src.aType);
+end;
+{$ENDIF}
+
+function VNGetReal(const Src: TPSVariantIFC): Extended;
+begin
+ Result := PSGetReal(Src.Dta, Src.aType);
+end;
+
+function VNGetCurrency(const Src: TPSVariantIFC): Currency;
+begin
+ Result := PSGetCurrency(Src.Dta, Src.aType);
+end;
+
+function VNGetInt(const Src: TPSVariantIFC): Longint;
+begin
+ Result := PSGetInt(Src.Dta, Src.aType);
+end;
+
+function VNGetString(const Src: TPSVariantIFC): String;
+begin
+ Result := PSGetString(Src.Dta, Src.aType);
+end;
+
+{$IFNDEF PS_NOWIDESTRING}
+function VNGetWideString(const Src: TPSVariantIFC): WideString;
+begin
+ Result := PSGetWideString(Src.Dta, Src.aType);
+end;
+{$ENDIF}
+
+procedure VNSetUInt(const Src: TPSVariantIFC; const Val: Cardinal);
+var
+ Dummy: Boolean;
+begin
+ PSSetUInt(Src.Dta, Src.aType, Dummy, Val);
+end;
+
+{$IFNDEF PS_NOINT64}
+procedure VNSetInt64(const Src: TPSVariantIFC; const Val: Int64);
+var
+ Dummy: Boolean;
+begin
+ PSSetInt64(Src.Dta, Src.aType, Dummy, Val);
+end;
+{$ENDIF}
+
+procedure VNSetReal(const Src: TPSVariantIFC; const Val: Extended);
+var
+ Dummy: Boolean;
+begin
+ PSSetReal(Src.Dta, Src.aType, Dummy, Val);
+end;
+
+procedure VNSetCurrency(const Src: TPSVariantIFC; const Val: Currency);
+var
+ Dummy: Boolean;
+begin
+ PSSetCurrency(Src.Dta, Src.aType, Dummy, Val);
+end;
+
+procedure VNSetInt(const Src: TPSVariantIFC; const Val: Longint);
+var
+ Dummy: Boolean;
+begin
+ PSSetInt(Src.Dta, Src.aType, Dummy, Val);
+end;
+
+procedure VNSetString(const Src: TPSVariantIFC; const Val: String);
+var
+ Dummy: Boolean;
+begin
+ PSSetString(Src.Dta, Src.aType, Dummy, Val);
+end;
+
+{$IFNDEF PS_NOWIDESTRING}
+procedure VNSetWideString(const Src: TPSVariantIFC; const Val: WideString);
+var
+ Dummy: Boolean;
+begin
+ PSSetWideString(Src.Dta, Src.aType, Dummy, Val);
+end;
+{$ENDIF}
+
+function VGetUInt(const Src: PIFVariant): Cardinal;
+begin
+ Result := PSGetUInt(@PPSVariantData(src).Data, src.FType);
+end;
+
+{$IFNDEF PS_NOINT64}
+function VGetInt64(const Src: PIFVariant): Int64;
+begin
+ Result := PSGetInt64(@PPSVariantData(src).Data, src.FType);
+end;
+{$ENDIF}
+
+function VGetReal(const Src: PIFVariant): Extended;
+begin
+ Result := PSGetReal(@PPSVariantData(src).Data, src.FType);
+end;
+
+function VGetCurrency(const Src: PIFVariant): Currency;
+begin
+ Result := PSGetCurrency(@PPSVariantData(src).Data, src.FType);
+end;
+
+function VGetInt(const Src: PIFVariant): Longint;
+begin
+ Result := PSGetInt(@PPSVariantData(src).Data, src.FType);
+end;
+
+function VGetString(const Src: PIFVariant): String;
+begin
+ Result := PSGetString(@PPSVariantData(src).Data, src.FType);
+end;
+
+{$IFNDEF PS_NOWIDESTRING}
+function VGetWideString(const Src: PIFVariant): WideString;
+begin
+ Result := PSGetWideString(@PPSVariantData(src).Data, src.FType);
+end;
+{$ENDIF}
+
+
+procedure VSetPointerTo(const Src: PIFVariant; Data: Pointer; aType: TPSTypeRec);
+var
+ temp: TPSVariantIFC;
+begin
+ if (Atype = nil) or (Data = nil) or (Src = nil) then raise Exception.Create(RPS_InvalidVariable);
+ temp.Dta := @PPSVariantData(Src).Data;
+ temp.aType := Src.FType;
+ temp.VarParam := false;
+ VNSetPointerTo(temp, Data, AType);
+end;
+
+procedure VSetUInt(const Src: PIFVariant; const Val: Cardinal);
+var
+ Dummy: Boolean;
+begin
+ PSSetUInt(@PPSVariantData(src).Data, src.FType, Dummy, Val);
+end;
+
+{$IFNDEF PS_NOINT64}
+procedure VSetInt64(const Src: PIFVariant; const Val: Int64);
+var
+ Dummy: Boolean;
+begin
+ PSSetInt64(@PPSVariantData(src).Data, src.FType, Dummy, Val);
+end;
+{$ENDIF}
+
+procedure VSetReal(const Src: PIFVariant; const Val: Extended);
+var
+ Dummy: Boolean;
+begin
+ PSSetReal(@PPSVariantData(src).Data, src.FType, Dummy, Val);
+end;
+
+procedure VSetCurrency(const Src: PIFVariant; const Val: Currency);
+var
+ Dummy: Boolean;
+begin
+ PSSetCurrency(@PPSVariantData(src).Data, src.FType, Dummy, Val);
+end;
+
+procedure VSetInt(const Src: PIFVariant; const Val: Longint);
+var
+ Dummy: Boolean;
+begin
+ PSSetInt(@PPSVariantData(src).Data, src.FType, Dummy, Val);
+end;
+
+procedure VSetString(const Src: PIFVariant; const Val: String);
+var
+ Dummy: Boolean;
+begin
+ PSSetString(@PPSVariantData(src).Data, src.FType, Dummy, Val);
+end;
+
+{$IFNDEF PS_NOWIDESTRING}
+procedure VSetWideString(const Src: PIFVariant; const Val: WideString);
+var
+ Dummy: Boolean;
+begin
+ PSSetWideString(@PPSVariantData(src).Data, src.FType, Dummy, Val);
+end;
+{$ENDIF}
+
+{$IFNDEF PS_NOWIDESTRING}
+function VarToWideStr(const Data: Variant): WideString;
+begin
+ if not VarIsNull(Data) then
+ Result := Data
+ else
+ Result := '';
+end;
+{$ENDIF}
+
+function PSGetUInt(Src: Pointer; aType: TPSTypeRec): Cardinal;
+begin
+ if aType.BaseType = btPointer then
+ begin
+ atype := PIFTypeRec(Pointer(IPointer(Src)+4)^);
+ Src := Pointer(Src^);
+ if (src = nil) or (aType = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case aType.BaseType of
+ btU8: Result := tbtu8(src^);
+ btS8: Result := tbts8(src^);
+ btU16: Result := tbtu16(src^);
+ btS16: Result := tbts16(src^);
+ btU32: Result := tbtu32(src^);
+ btS32: Result := tbts32(src^);
+{$IFNDEF PS_NOINT64} btS64: Result := tbts64(src^);
+{$ENDIF}
+ btChar: Result := Ord(tbtchar(Src^));
+{$IFNDEF PS_NOWIDESTRING} btWideChar: Result := Ord(tbtwidechar(Src^));{$ENDIF}
+ btVariant:
+ case VarType(Variant(Src^)) of
+ varString:
+ if Length(VarToStr(Variant(Src^))) = 1 then
+ Result := Ord(VarToStr(Variant(Src^))[1])
+ else
+ raise Exception.Create(RPS_TypeMismatch);
+{$IFNDEF PS_NOWIDESTRING}
+ varOleStr:
+ if Length(VarToWideStr(Variant(Src^))) = 1 then
+ Result := Ord(VarToWideStr(Variant(Src^))[1])
+ else
+ raise Exception.Create(RPS_TypeMismatch);
+{$ENDIF}
+ else
+ Result := Variant(src^);
+ end;
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+end;
+
+function PSGetObject(Src: Pointer; aType: TPSTypeRec): TObject;
+begin
+ if aType.BaseType = btPointer then
+ begin
+ atype := PIFTypeRec(Pointer(IPointer(Src)+4)^);
+ Src := Pointer(Src^);
+ if (src = nil) or (aType = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case aType.BaseType of
+ btClass: Result := TObject(Src^);
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+end;
+
+procedure PSSetObject(Src: Pointer; aType: TPSTypeRec; var Ok: Boolean; Const val: TObject);
+begin
+ if aType.BaseType = btPointer then
+ begin
+ atype := PIFTypeRec(Pointer(IPointer(Src)+4)^);
+ Src := Pointer(Src^);
+ if (src = nil) or (aType = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case aType.BaseType of
+ btClass: TObject(Src^) := Val;
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+end;
+
+
+{$IFNDEF PS_NOINT64}
+function PSGetInt64(Src: Pointer; aType: TPSTypeRec): Int64;
+begin
+ if aType.BaseType = btPointer then
+ begin
+ atype := PIFTypeRec(Pointer(IPointer(Src)+4)^);
+ Src := Pointer(Src^);
+ if (src = nil) or (aType = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case aType.BaseType of
+ btU8: Result := tbtu8(src^);
+ btS8: Result := tbts8(src^);
+ btU16: Result := tbtu16(src^);
+ btS16: Result := tbts16(src^);
+ btU32: Result := tbtu32(src^);
+ btS32: Result := tbts32(src^);
+ btS64: Result := tbts64(src^);
+ btChar: Result := Ord(tbtchar(Src^));
+{$IFNDEF PS_NOWIDESTRING}
+ btWideChar: Result := Ord(tbtwidechar(Src^));
+{$ENDIF}
+{$IFDEF DELPHI6UP}
+ btVariant: Result := Variant(src^);
+{$ENDIF}
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+end;
+{$ENDIF}
+
+function PSGetReal(Src: Pointer; aType: TPSTypeRec): Extended;
+begin
+ if aType.BaseType = btPointer then
+ begin
+ atype := PIFTypeRec(Pointer(IPointer(Src)+4)^);
+ Src := Pointer(Src^);
+ if (src = nil) or (aType = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case aType.BaseType of
+ btU8: Result := tbtu8(src^);
+ btS8: Result := tbts8(src^);
+ btU16: Result := tbtu16(src^);
+ btS16: Result := tbts16(src^);
+ btU32: Result := tbtu32(src^);
+ btS32: Result := tbts32(src^);
+{$IFNDEF PS_NOINT64} btS64: Result := tbts64(src^);{$ENDIF}
+ btSingle: Result := tbtsingle(Src^);
+ btDouble: Result := tbtdouble(Src^);
+ btExtended: Result := tbtextended(Src^);
+ btCurrency: Result := tbtcurrency(Src^);
+ btVariant: Result := Variant(src^);
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+end;
+
+function PSGetCurrency(Src: Pointer; aType: TPSTypeRec): Currency;
+begin
+ if aType.BaseType = btPointer then
+ begin
+ atype := PIFTypeRec(Pointer(IPointer(Src)+4)^);
+ Src := Pointer(Src^);
+ if (src = nil) or (aType = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case aType.BaseType of
+ btU8: Result := tbtu8(src^);
+ btS8: Result := tbts8(src^);
+ btU16: Result := tbtu16(src^);
+ btS16: Result := tbts16(src^);
+ btU32: Result := tbtu32(src^);
+ btS32: Result := tbts32(src^);
+{$IFNDEF PS_NOINT64} btS64: Result := tbts64(src^);{$ENDIF}
+ btSingle: Result := tbtsingle(Src^);
+ btDouble: Result := tbtdouble(Src^);
+ btExtended: Result := tbtextended(Src^);
+ btCurrency: Result := tbtcurrency(Src^);
+ btVariant: Result := Variant(src^);
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+end;
+
+
+function PSGetInt(Src: Pointer; aType: TPSTypeRec): Longint;
+begin
+ if aType.BaseType = btPointer then
+ begin
+ atype := PIFTypeRec(Pointer(IPointer(Src)+4)^);
+ Src := Pointer(Src^);
+ if (src = nil) or (aType = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case aType.BaseType of
+ btU8: Result := tbtu8(src^);
+ btS8: Result := tbts8(src^);
+ btU16: Result := tbtu16(src^);
+ btS16: Result := tbts16(src^);
+ btU32: Result := tbtu32(src^);
+ btS32: Result := tbts32(src^);
+{$IFNDEF PS_NOINT64} btS64: Result := tbts64(src^);{$ENDIF}
+ btChar: Result := Ord(tbtchar(Src^));
+{$IFNDEF PS_NOWIDESTRING} btWideChar: Result := Ord(tbtwidechar(Src^));{$ENDIF}
+ btVariant: Result := Variant(src^);
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+end;
+
+
+function PSGetString(Src: Pointer; aType: TPSTypeRec): String;
+begin
+ if aType.BaseType = btPointer then
+ begin
+ atype := PIFTypeRec(Pointer(IPointer(Src)+4)^);
+ Src := Pointer(Src^);
+ if (src = nil) or (aType = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case aType.BaseType of
+ btU8: Result := chr(tbtu8(src^));
+ btChar: Result := tbtchar(Src^);
+ btPchar: Result := pchar(src^);
+{$IFNDEF PS_NOWIDESTRING} btWideChar: Result := tbtwidechar(Src^);{$ENDIF}
+ btString: Result := tbtstring(src^);
+{$IFNDEF PS_NOWIDESTRING} btWideString: Result := tbtwidestring(src^);{$ENDIF}
+ btVariant: Result := Variant(src^);
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+end;
+{$IFNDEF PS_NOWIDESTRING}
+function PSGetWideString(Src: Pointer; aType: TPSTypeRec): WideString;
+begin
+ if aType.BaseType = btPointer then
+ begin
+ atype := PIFTypeRec(Pointer(IPointer(Src)+4)^);
+ Src := Pointer(Src^);
+ if (src = nil) or (aType = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case aType.BaseType of
+ btU8: Result := chr(tbtu8(src^));
+ btU16: Result := widechar(src^);
+ btChar: Result := tbtchar(Src^);
+ btPchar: Result := pchar(src^);
+ btWideChar: Result := tbtwidechar(Src^);
+ btString: Result := tbtstring(src^);
+ btWideString: Result := tbtwidestring(src^);
+ btVariant: Result := Variant(src^);
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+end;
+{$ENDIF}
+
+procedure PSSetUInt(Src: Pointer; aType: TPSTypeRec; var Ok: Boolean; const Val: Cardinal);
+begin
+ if (Src = nil) or (aType = nil) then begin Ok := false; exit; end;
+ if aType.BaseType = btPointer then
+ begin
+ atype := PIFTypeRec(Pointer(IPointer(Src)+4)^);
+ Src := Pointer(Src^);
+ if (src = nil) or (aType = nil) then begin Ok := false; exit; end;
+ end;
+ case aType.BaseType of
+ btU8: tbtu8(src^) := Val;
+ btS8: tbts8(src^) := Val;
+ btU16: tbtu16(src^) := Val;
+ btS16: tbts16(src^) := Val;
+ btProcPtr:
+ begin
+ tbtu32(src^) := Val;
+ Pointer(Pointer(IPointer(Src)+4)^) := nil;
+ Pointer(Pointer(IPointer(Src)+8)^) := nil;
+ end;
+ btU32: tbtu32(src^) := Val;
+ btS32: tbts32(src^) := Val;
+{$IFNDEF PS_NOINT64} btS64: tbts64(src^) := Val;{$ENDIF}
+ btChar: tbtchar(Src^) := Chr(Val);
+{$IFNDEF PS_NOWIDESTRING} btWideChar: tbtwidechar(Src^) := tbtwidechar(Val);{$ENDIF}
+ btSingle: tbtSingle(src^) := Val;
+ btDouble: tbtDouble(src^) := Val;
+ btCurrency: tbtCurrency(src^) := Val;
+ btExtended: tbtExtended(src^) := Val;
+ btVariant:
+ begin
+ try
+ Variant(src^) := {$IFDEF DELPHI6UP}val{$ELSE}tbts32(val){$ENDIF};
+ except
+ Ok := false;
+ end;
+ end;
+ else ok := false;
+ end;
+end;
+
+{$IFNDEF PS_NOINT64}
+procedure PSSetInt64(Src: Pointer; aType: TPSTypeRec; var Ok: Boolean; const Val: Int64);
+begin
+ if (Src = nil) or (aType = nil) then begin Ok := false; exit; end;
+ if aType.BaseType = btPointer then
+ begin
+ atype := PIFTypeRec(Pointer(IPointer(Src)+4)^);
+ Src := Pointer(Src^);
+ if (src = nil) or (aType = nil) then begin Ok := false; exit; end;
+ end;
+ case aType.BaseType of
+ btU8: tbtu8(src^) := Val;
+ btS8: tbts8(src^) := Val;
+ btU16: tbtu16(src^) := Val;
+ btS16: tbts16(src^) := Val;
+ btU32: tbtu32(src^) := Val;
+ btS32: tbts32(src^) := Val;
+ btS64: tbts64(src^) := Val;
+ btChar: tbtchar(Src^) := Chr(Val);
+{$IFNDEF PS_NOWIDESTRING}
+ btWideChar: tbtwidechar(Src^) := tbtwidechar(Val);
+{$ENDIF}
+ btSingle: tbtSingle(src^) := Val;
+ btDouble: tbtDouble(src^) := Val;
+ btCurrency: tbtCurrency(src^) := Val;
+ btExtended: tbtExtended(src^) := Val;
+{$IFDEF DELPHI6UP}
+ btVariant:
+ begin
+ try
+ Variant(src^) := Val;
+ except
+ Ok := false;
+ end;
+ end;
+{$ENDIF}
+ else ok := false;
+ end;
+end;
+{$ENDIF}
+
+procedure PSSetReal(Src: Pointer; aType: TPSTypeRec; var Ok: Boolean; const Val: Extended);
+begin
+ if (Src = nil) or (aType = nil) then begin Ok := false; exit; end;
+ if aType.BaseType = btPointer then
+ begin
+ atype := PIFTypeRec(Pointer(IPointer(Src)+4)^);
+ Src := Pointer(Src^);
+ if (src = nil) or (aType = nil) then begin Ok := false; exit; end;
+ end;
+ case aType.BaseType of
+ btSingle: tbtSingle(src^) := Val;
+ btDouble: tbtDouble(src^) := Val;
+ btCurrency: tbtCurrency(src^) := Val;
+ btExtended: tbtExtended(src^) := Val;
+ btVariant:
+ begin
+ try
+ Variant(src^) := Val;
+ except
+ Ok := false;
+ end;
+ end;
+ else ok := false;
+ end;
+end;
+
+procedure PSSetCurrency(Src: Pointer; aType: TPSTypeRec; var Ok: Boolean; const Val: Currency);
+begin
+ if (Src = nil) or (aType = nil) then begin Ok := false; exit; end;
+ if aType.BaseType = btPointer then
+ begin
+ atype := PIFTypeRec(Pointer(IPointer(Src)+4)^);
+ Src := Pointer(Src^);
+ if (src = nil) or (aType = nil) then begin Ok := false; exit; end;
+ end;
+ case aType.BaseType of
+ btSingle: tbtSingle(src^) := Val;
+ btDouble: tbtDouble(src^) := Val;
+ btCurrency: tbtCurrency(src^) := Val;
+ btExtended: tbtExtended(src^) := Val;
+ btVariant:
+ begin
+ try
+ Variant(src^) := Val;
+ except
+ Ok := false;
+ end;
+ end;
+ else ok := false;
+ end;
+end;
+
+procedure PSSetInt(Src: Pointer; aType: TPSTypeRec; var Ok: Boolean; const Val: Longint);
+begin
+ if (Src = nil) or (aType = nil) then begin Ok := false; exit; end;
+ if aType.BaseType = btPointer then
+ begin
+ atype := PIFTypeRec(Pointer(IPointer(Src)+4)^);
+ Src := Pointer(Src^);
+ if (src = nil) or (aType = nil) then begin Ok := false; exit; end;
+ end;
+ case aType.BaseType of
+ btU8: tbtu8(src^) := Val;
+ btS8: tbts8(src^) := Val;
+ btU16: tbtu16(src^) := Val;
+ btS16: tbts16(src^) := Val;
+ btProcPtr:
+ begin
+ tbtu32(src^) := Val;
+ Pointer(Pointer(IPointer(Src)+4)^) := nil;
+ Pointer(Pointer(IPointer(Src)+8)^) := nil;
+ end;
+ btU32: tbtu32(src^) := Val;
+ btS32: tbts32(src^) := Val;
+{$IFNDEF PS_NOINT64} btS64: tbts64(src^) := Val;{$ENDIF}
+ btChar: tbtchar(Src^) := Chr(Val);
+{$IFNDEF PS_NOWIDESTRING} btWideChar: tbtwidechar(Src^) := tbtwidechar(Val);{$ENDIF}
+ btSingle: tbtSingle(src^) := Val;
+ btDouble: tbtDouble(src^) := Val;
+ btCurrency: tbtCurrency(src^) := Val;
+ btExtended: tbtExtended(src^) := Val;
+ btVariant:
+ begin
+ try
+ Variant(src^) := Val;
+ except
+ Ok := false;
+ end;
+ end;
+ else ok := false;
+ end;
+end;
+
+procedure PSSetString(Src: Pointer; aType: TPSTypeRec; var Ok: Boolean; const Val: String);
+begin
+ if (Src = nil) or (aType = nil) then begin Ok := false; exit; end;
+ if aType.BaseType = btPointer then
+ begin
+ atype := PIFTypeRec(Pointer(IPointer(Src)+4)^);
+ Src := Pointer(Src^);
+ if (src = nil) or (aType = nil) then begin Ok := false; exit; end;
+ end;
+ case aType.BaseType of
+ btString: tbtstring(src^) := val;
+{$IFNDEF PS_NOWIDESTRING} btWideString: tbtwidestring(src^) := val;{$ENDIF}
+ btVariant:
+ begin
+ try
+ Variant(src^) := Val;
+ except
+ Ok := false;
+ end;
+ end;
+ else ok := false;
+ end;
+end;
+{$IFNDEF PS_NOWIDESTRING}
+procedure PSSetWideString(Src: Pointer; aType: TPSTypeRec; var Ok: Boolean; const Val: WideString);
+begin
+ if (Src = nil) or (aType = nil) then begin Ok := false; exit; end;
+ if aType.BaseType = btPointer then
+ begin
+ atype := PIFTypeRec(Pointer(IPointer(Src)+4)^);
+ Src := Pointer(Src^);
+ if (src = nil) or (aType = nil) then begin Ok := false; exit; end;
+ end;
+ case aType.BaseType of
+ btString: tbtstring(src^) := val;
+ btWideString: tbtwidestring(src^) := val;
+ btVariant:
+ begin
+ try
+ Variant(src^) := Val;
+ except
+ Ok := false;
+ end;
+ end;
+ else ok := false;
+ end;
+end;
+{$ENDIF}
+
+function CopyArrayContents(dest, src: Pointer; Len: Longint; aType: TPSTypeRec): Boolean; forward;
+
+function CopyRecordContents(dest, src: Pointer; aType: TPSTypeRec_Record): Boolean;
+var
+ o, i: Longint;
+begin
+ for i := 0 to aType.FieldTypes.Count -1 do
+ begin
+ o := Longint(atype.RealFieldOffsets[i]);
+ CopyArrayContents(Pointer(IPointer(Dest)+Cardinal(o)), Pointer(IPointer(Src)+Cardinal(o)), 1, aType.FieldTypes[i]);
+ end;
+ Result := true;
+end;
+
+function CreateArrayFromVariant(Exec: TPSExec; dest: Pointer; src: Variant; DestType: TPSTypeRec): Boolean;
+var
+ i: Integer;
+ r: Pointer;
+ lVarType: TPSTypeRec;
+ v: variant;
+begin
+ lVarType := Exec.FindType2(btVariant);
+ if lVarType = nil then begin result := false; exit; end;
+ PSDynArraySetLength(Pointer(dest^), desttype, VarArrayHighBound(src, 1) - VarArrayLowBound(src, 1) + 1);
+ r := Pointer(Dest^);
+ DestType := TPSTypeRec_Array(DestType).ArrayType;
+ for i := 0 to VarArrayHighBound(src, 1) - VarArrayLowBound(src, 1) do begin
+ v := src[i + VarArrayLowBound(src, 1)];
+ if not Exec.SetVariantValue(r, @v, desttype, lVarType) then begin result := false; exit; end;
+ r := Pointer(Longint(r) + Longint(DestType.RealSize));
+ end;
+ Result := true;
+end;
+
+function CopyArrayContents(dest, src: Pointer; Len: Longint; aType: TPSTypeRec): Boolean;
+var
+ elsize: Cardinal;
+ i: Longint;
+begin
+ try
+ case aType.BaseType of
+ btU8, btS8, btChar:
+ for i := 0 to Len -1 do
+ begin
+ tbtU8(Dest^) := tbtU8(Src^);
+ Dest := Pointer(IPointer(Dest) + 1);
+ Src := Pointer(IPointer(Src) + 1);
+ end;
+ btU16, btS16{$IFNDEF PS_NOWIDESTRING}, btWideChar{$ENDIF}:
+ for i := 0 to Len -1 do
+ begin
+ tbtU16(Dest^) := tbtU16(Src^);
+ Dest := Pointer(IPointer(Dest) + 2);
+ Src := Pointer(IPointer(Src) + 2);
+ end;
+ btProcPtr:
+ for i := 0 to Len -1 do
+ begin
+ tbtU32(Dest^) := tbtU32(Src^);
+ Dest := Pointer(IPointer(Dest) + 4);
+ Src := Pointer(IPointer(Src) + 4);
+ tbtU32(Dest^) := tbtU32(Src^);
+ Dest := Pointer(IPointer(Dest) + 4);
+ Src := Pointer(IPointer(Src) + 4);
+ tbtU32(Dest^) := tbtU32(Src^);
+ Dest := Pointer(IPointer(Dest) + 4);
+ Src := Pointer(IPointer(Src) + 4);
+ end;
+ btU32, btS32, btClass, btSingle, btpchar:
+ for i := 0 to Len -1 do
+ begin
+ tbtU32(Dest^) := tbtU32(Src^);
+ Dest := Pointer(IPointer(Dest) + 4);
+ Src := Pointer(IPointer(Src) + 4);
+ end;
+ btDouble:
+ for i := 0 to Len -1 do
+ begin
+ tbtDouble(Dest^) := tbtDouble(Src^);
+ Dest := Pointer(IPointer(Dest) + 8);
+ Src := Pointer(IPointer(Src) + 8);
+ end;
+ {$IFNDEF PS_NOINT64}bts64:
+ for i := 0 to Len -1 do
+ begin
+ tbts64(Dest^) := tbts64(Src^);
+ Dest := Pointer(IPointer(Dest) + 8);
+ Src := Pointer(IPointer(Src) + 8);
+ end;{$ENDIF}
+ btExtended:
+ for i := 0 to Len -1 do
+ begin
+ tbtExtended(Dest^) := tbtExtended(Src^);
+ Dest := Pointer(IPointer(Dest) + SizeOf(Extended));
+ Src := Pointer(IPointer(Src) + SizeOf(Extended));
+ end;
+ btCurrency:
+ for i := 0 to Len -1 do
+ begin
+ tbtCurrency(Dest^) := tbtCurrency(Src^);
+ Dest := Pointer(IPointer(Dest) + SizeOf(Currency));
+ Src := Pointer(IPointer(Src) + SizeOf(Currency));
+ end;
+ btVariant:
+ for i := 0 to Len -1 do
+ begin
+ variant(Dest^) := variant(Src^);
+ Dest := Pointer(IPointer(Dest) + Sizeof(Variant));
+ Src := Pointer(IPointer(Src) + Sizeof(Variant));
+ end;
+ btString:
+ for i := 0 to Len -1 do
+ begin
+ tbtString(Dest^) := tbtString(Src^);
+ Dest := Pointer(IPointer(Dest) + 4);
+ Src := Pointer(IPointer(Src) + 4);
+ end;
+ {$IFNDEF PS_NOWIDESTRING}btWideString:
+ for i := 0 to Len -1 do
+ begin
+ tbtWideString(Dest^) := tbtWideString(Src^);
+ Dest := Pointer(IPointer(Dest) + 4);
+ Src := Pointer(IPointer(Src) + 4);
+ end; {$ENDIF}
+ btStaticArray:
+ begin
+ elSize := aType.RealSize;
+ for i := 0 to Len -1 do
+ begin
+ if not CopyArrayContents(Dest, Src, TPSTypeRec_StaticArray(aType).Size, TPSTypeRec_StaticArray(aType).ArrayType) then
+ begin
+ result := false;
+ exit;
+ end;
+ Dest := Pointer(IPointer(Dest) + elsize);
+ Src := Pointer(IPointer(Src) + elsize);
+ end;
+ end;
+ btArray:
+ begin
+ for i := 0 to Len -1 do
+ begin
+ Pointer(Dest^) := Pointer(Src^);
+ if Pointer(Dest^) <> nil then
+ begin
+ Inc(Longint(Pointer(IPointer(Dest^)-8)^)); // RefCount
+ end;
+ Dest := Pointer(IPointer(Dest) + 4);
+ Src := Pointer(IPointer(Src) + 4);
+ end;
+ end;
+ btRecord:
+ begin
+ elSize := aType.RealSize;
+ for i := 0 to Len -1 do
+ begin
+ if not CopyRecordContents(Dest, Src, TPSTypeRec_Record(aType)) then
+ begin
+ result := false;
+ exit;
+ end;
+ Dest := Pointer(IPointer(Dest) + elsize);
+ Src := Pointer(IPointer(Src) + elsize);
+ end;
+ end;
+ btSet:
+ begin
+ elSize := aType.RealSize;
+ for i := 0 to Len -1 do
+ begin
+ Move(Src^, Dest^, elSize);
+ Dest := Pointer(IPointer(Dest) + elsize);
+ Src := Pointer(IPointer(Src) + elsize);
+ end;
+ end;
+{$IFNDEF PS_NOINTERFACES}
+ btInterface:
+ begin
+ for i := 0 to Len -1 do
+ begin
+ {$IFNDEF DELPHI3UP}
+ if IUnknown(Dest^) <> nil then
+ begin
+ IUnknown(Dest^).Release;
+ IUnknown(Dest^) := nil;
+ end;
+ {$ENDIF}
+ IUnknown(Dest^) := IUnknown(Src^);
+ {$IFNDEF DELPHI3UP}
+ if IUnknown(Dest^) <> nil then
+ IUnknown(Dest^).AddRef;
+ {$ENDIF}
+ Dest := Pointer(IPointer(Dest) + 4);
+ Src := Pointer(IPointer(Src) + 4);
+ end;
+ end;
+{$ENDIF}
+ btPointer:
+ begin
+ if (Pointer(Pointer(IPointer(Dest)+8)^) = nil) and (Pointer(Pointer(IPointer(Src)+8)^) = nil) then
+ begin
+ for i := 0 to Len -1 do
+ begin
+ Pointer(Dest^) := Pointer(Src^);
+ Dest := Pointer(IPointer(Dest) + 4);
+ Src := Pointer(IPointer(Src) + 4);
+ Pointer(Dest^) := Pointer(Src^);
+ Dest := Pointer(IPointer(Dest) + 4);
+ Src := Pointer(IPointer(Src) + 4);
+ Pointer(Dest^) := nil;
+ Dest := Pointer(IPointer(Dest) + 4);
+ Src := Pointer(IPointer(Src) + 4);
+ end;
+ end else begin
+ for i := 0 to Len -1 do
+ begin
+ if Pointer(Pointer(IPointer(Dest)+8)^) <> nil then
+ DestroyHeapVariant2(Pointer(Dest^), Pointer(Pointer(IPointer(Dest)+4)^));
+ if Pointer(Src^) <> nil then
+ begin
+ if Pointer(Pointer(IPointer(Src) + 8)^) = nil then
+ begin
+ Pointer(Dest^) := Pointer(Src^);
+ Pointer(Pointer(IPointer(Dest) + 4)^) := Pointer(Pointer(IPointer(Src) + 4)^);
+ Pointer(Pointer(IPointer(Dest) + 8)^) := Pointer(Pointer(IPointer(Src) + 8)^);
+ end else
+ begin
+ Pointer(Dest^) := CreateHeapVariant2(Pointer(Pointer(IPointer(Src) + 4)^));
+ Pointer(Pointer(IPointer(Dest) + 4)^) := Pointer(Pointer(IPointer(Src) + 4)^);
+ Pointer(Pointer(IPointer(Dest) + 8)^) := Pointer(1);
+ if not CopyArrayContents(Pointer(Dest^), Pointer(Src^), 1, Pointer(Pointer(IPointer(Dest) + 4)^)) then
+ begin
+ Result := false;
+ exit;
+ end;
+ end;
+ end else
+ begin
+ Pointer(Dest^) := nil;
+ Pointer(Pointer(IPointer(Dest) + 4)^) := nil;
+ Pointer(Pointer(IPointer(Dest) + 8)^) := nil;
+ end;
+ Dest := Pointer(IPointer(Dest) + 12);
+ Src := Pointer(IPointer(Src) + 12);
+ end;
+ end;
+ end;
+// btResourcePointer = 15;
+// btVariant = 16;
+ else
+ Result := False;
+ exit;
+ end;
+ except
+ Result := False;
+ exit;
+ end;
+ Result := true;
+end;
+
+function GetPSArrayLength(Arr: PIFVariant): Longint;
+begin
+ result := PSDynArrayGetLength(PPSVariantDynamicArray(arr).Data, arr.FType);
+end;
+
+procedure SetPSArrayLength(Arr: PIFVariant; NewLength: Longint);
+begin
+ PSDynArraySetLength(PPSVariantDynamicArray(arr).Data, arr.FType, NewLength);
+end;
+
+
+function PSDynArrayGetLength(arr: Pointer; aType: TPSTypeRec): Longint;
+begin
+ if aType.BaseType <> btArray then raise Exception.Create(RPS_InvalidArray);
+ if arr = nil then Result := 0 else Result := Longint(Pointer(IPointer(arr)-4)^);
+end;
+
+procedure PSDynArraySetLength(var arr: Pointer; aType: TPSTypeRec; NewLength: Longint);
+var
+ elSize, i, OldLen: Longint;
+ p: Pointer;
+begin
+ if aType.BaseType <> btArray then raise Exception.Create(RPS_InvalidArray);
+ OldLen := PSDynArrayGetLength(arr, aType);
+ elSize := TPSTypeRec_Array(aType).ArrayType.RealSize;
+ if (OldLen = 0) and (NewLength = 0) then exit; // already are both 0
+ if (OldLen <> 0) and (Longint(Pointer(IPointer(Arr)-8)^) = 1) then // unique copy of this dynamic array
+ begin
+ for i := NewLength to OldLen -1 do
+ begin
+ if TPSTypeRec_Array(aType).ArrayType.BaseType in NeedFinalization then
+ FinalizeVariant(Pointer(IPointer(arr) + Cardinal(elsize * i)), TPSTypeRec_Array(aType).ArrayType);
+ end;
+ arr := Pointer(IPointer(Arr)-8);
+ if NewLength <= 0 then
+ begin
+ FreeMem(arr, NewLength * elsize + 8);
+ arr := nil;
+ exit;
+ end;
+ ReallocMem(arr, NewLength * elSize + 8);
+ arr := Pointer(IPointer(Arr)+4);
+ Longint(Arr^) := NewLength;
+ arr := Pointer(IPointer(Arr)+4);
+ for i := OldLen to NewLength -1 do
+ begin
+ InitializeVariant(Pointer(IPointer(arr) + Cardinal(elsize * i)), TPSTypeRec_Array(aType).ArrayType);
+ end;
+ end else
+ begin
+ if NewLength = 0 then
+ begin
+ if Longint(Pointer(IPointer(Arr)-8)^) = 1 then
+ FreeMem(Pointer(IPointer(Arr)-8), OldLen * elSize + 8)
+ else if Longint(Pointer(IPointer(Arr)-8)^) > 0 then
+ Dec(Longint(Pointer(IPointer(Arr)-8)^));
+ arr := nil;
+ exit;
+ end;
+ GetMem(p, NewLength * elSize + 8);
+ Longint(p^) := 1;
+ p:= Pointer(IPointer(p)+4);
+ Longint(p^) := NewLength;
+ p := Pointer(IPointer(p)+4);
+ if OldLen <> 0 then
+ begin
+ if OldLen > NewLength then
+ CopyArrayContents(p, arr, NewLength, TPSTypeRec_Array(aType).ArrayType)
+ else
+ CopyArrayContents(p, arr, OldLen, TPSTypeRec_Array(aType).ArrayType);
+ FinalizeVariant(@arr, aType);
+ end;
+ arr := p;
+ for i := OldLen to NewLength -1 do
+ begin
+ InitializeVariant(Pointer(IPointer(arr) + Cardinal(elsize * i)), TPSTypeRec_Array(aType).ArrayType);
+ end;
+ end;
+end;
+
+
+
+{$IFDEF FPC}
+function OleErrorMessage(ErrorCode: HResult): String;
+begin
+ Result := SysErrorMessage(ErrorCode);
+ if Result = '' then
+ Result := Format(RPS_OLEError, [ErrorCode]);
+end;
+
+procedure OleError(ErrorCode: HResult);
+begin
+ raise Exception.Create(OleErrorMessage(ErrorCode));
+end;
+
+procedure OleCheck(Result: HResult);
+begin
+ if Result < 0 then OleError(Result);
+end;
+{$ENDIF}
+
+
+{$IFNDEF DELPHI3UP}
+function OleErrorMessage(ErrorCode: HResult): String;
+begin
+ Result := SysErrorMessage(ErrorCode);
+ if Result = '' then
+ Result := Format(RPS_OLEError, [ErrorCode]);
+end;
+
+procedure OleError(ErrorCode: HResult);
+begin
+ raise Exception.Create(OleErrorMessage(ErrorCode));
+end;
+
+procedure OleCheck(Result: HResult);
+begin
+ if Result < 0 then OleError(Result);
+end;
+
+procedure AssignInterface(var Dest: IUnknown; const Src: IUnknown);
+var
+ OldDest: IUnknown;
+begin
+ { Like Delphi 3+'s _IntfCopy, reference source before releasing old dest.
+ so that self assignment (I := I) works right }
+ OldDest := Dest;
+ Dest := Src;
+ if Src <> nil then
+ Src.AddRef;
+ if OldDest <> nil then
+ OldDest.Release;
+end;
+
+procedure AssignVariantFromIDispatch(var Dest: Variant; const Src: IDispatch);
+begin
+ VarClear(Dest);
+ TVarData(Dest).VDispatch := Src;
+ TVarData(Dest).VType := varDispatch;
+ if Src <> nil then
+ Src.AddRef;
+end;
+
+procedure AssignIDispatchFromVariant(var Dest: IDispatch; const Src: Variant);
+const
+ RPS_InvalidVariantRef = 'Invalid variant ref';
+var
+ NewDest: IDispatch;
+begin
+ case TVarData(Src).VType of
+ varEmpty: NewDest := nil;
+ varDispatch: NewDest := TVarData(Src).VDispatch;
+ varDispatch or varByRef: NewDest := Pointer(TVarData(Src).VPointer^);
+ else
+ raise Exception.Create(RPS_InvalidVariantRef);
+ end;
+ AssignInterface(IUnknown(Dest), NewDest);
+end;
+{$ENDIF}
+
+function TPSExec.SetVariantValue(dest, Src: Pointer; desttype, srctype: TPSTypeRec): Boolean;
+var
+ Tmp: TObject;
+ tt: TPSVariantPointer;
+begin
+ Result := True;
+ try
+ case desttype.BaseType of
+ btSet:
+ begin
+ if desttype = srctype then
+ Move(Src^, Dest^, TPSTypeRec_Set(desttype).aByteSize)
+ else
+ Result := False;
+ end;
+ btU8: tbtu8(Dest^) := PSGetUInt(Src, srctype);
+ btS8: tbts8(Dest^) := PSGetInt(Src, srctype);
+ btU16: tbtu16(Dest^) := PSGetUInt(Src, srctype);
+ btS16: tbts16(Dest^) := PSGetInt(Src, srctype);
+ btProcPtr:
+ begin
+ if srctype.BaseType = btPointer then
+ begin
+ srctype := PIFTypeRec(Pointer(IPointer(Src)+4)^);
+ Src := Pointer(Src^);
+ if (src = nil) or (srctype = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case srctype.BaseType of
+ btu32:
+ begin
+ Pointer(Dest^) := Pointer(Src^);
+ end;
+ btProcPtr:
+ begin
+ Pointer(Dest^) := Pointer(Src^);
+ Pointer(Pointer(IPointer(Dest)+4)^) := Pointer(Pointer(IPointer(Src)+4)^);
+ Pointer(Pointer(IPointer(Dest)+8)^) := Pointer(Pointer(IPointer(Src)+8)^);
+ end;
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+ end;
+ btU32:
+ begin
+ if srctype.BaseType = btPointer then
+ begin
+ srctype := PIFTypeRec(Pointer(IPointer(Src)+4)^);
+ Src := Pointer(Src^);
+ if (src = nil) or (srctype = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case srctype.BaseType of
+ btU8: tbtu32(Dest^) := tbtu8(src^);
+ btS8: tbtu32(Dest^) := tbts8(src^);
+ btU16: tbtu32(Dest^) := tbtu16(src^);
+ btS16: tbtu32(Dest^) := tbts16(src^);
+ btU32: tbtu32(Dest^) := tbtu32(src^);
+ btS32: tbtu32(Dest^) := tbts32(src^);
+ {$IFNDEF PS_NOINT64} btS64: tbtu32(Dest^) := tbts64(src^);{$ENDIF}
+ btChar: tbtu32(Dest^) := Ord(tbtchar(Src^));
+ {$IFNDEF PS_NOWIDESTRING} btWideChar: tbtu32(Dest^) := Ord(tbtwidechar(Src^));{$ENDIF}
+ btVariant: tbtu32(Dest^) := Variant(src^);
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+ end;
+ btS32:
+ begin
+ if srctype.BaseType = btPointer then
+ begin
+ srctype := PIFTypeRec(Pointer(IPointer(Src)+4)^);
+ Src := Pointer(Src^);
+ if (src = nil) or (srctype = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case srctype.BaseType of
+ btU8: tbts32(Dest^) := tbtu8(src^);
+ btS8: tbts32(Dest^) := tbts8(src^);
+ btU16: tbts32(Dest^) := tbtu16(src^);
+ btS16: tbts32(Dest^) := tbts16(src^);
+ btU32: tbts32(Dest^) := tbtu32(src^);
+ btS32: tbts32(Dest^) := tbts32(src^);
+ {$IFNDEF PS_NOINT64} btS64: tbts32(Dest^) := tbts64(src^);{$ENDIF}
+ btChar: tbts32(Dest^) := Ord(tbtchar(Src^));
+ {$IFNDEF PS_NOWIDESTRING} btWideChar: tbts32(Dest^) := Ord(tbtwidechar(Src^));{$ENDIF}
+ btVariant: tbts32(Dest^) := Variant(src^);
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+ end;
+ {$IFNDEF PS_NOINT64}
+ btS64: tbts64(Dest^) := PSGetInt64(Src, srctype);
+ {$ENDIF}
+ btSingle:
+ begin
+ if srctype.BaseType = btPointer then
+ begin
+ srctype := PIFTypeRec(Pointer(IPointer(Src)+4)^);
+ Src := Pointer(Src^);
+ if (src = nil) or (srctype = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case srctype.BaseType of
+ btU8: tbtsingle(Dest^) := tbtu8(src^);
+ btS8: tbtsingle(Dest^) := tbts8(src^);
+ btU16: tbtsingle(Dest^) := tbtu16(src^);
+ btS16: tbtsingle(Dest^) := tbts16(src^);
+ btU32: tbtsingle(Dest^) := tbtu32(src^);
+ btS32: tbtsingle(Dest^) := tbts32(src^);
+ {$IFNDEF PS_NOINT64} btS64: tbtsingle(Dest^) := tbts64(src^);{$ENDIF}
+ btSingle: tbtsingle(Dest^) := tbtsingle(Src^);
+ btDouble: tbtsingle(Dest^) := tbtdouble(Src^);
+ btExtended: tbtsingle(Dest^) := tbtextended(Src^);
+ btCurrency: tbtsingle(Dest^) := tbtcurrency(Src^);
+ btVariant: tbtsingle(Dest^) := Variant(src^);
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+ end;
+ btDouble:
+ begin
+ if srctype.BaseType = btPointer then
+ begin
+ srctype := PIFTypeRec(Pointer(IPointer(Src)+4)^);
+ Src := Pointer(Src^);
+ if (src = nil) or (srctype = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case srctype.BaseType of
+ btU8: tbtdouble(Dest^) := tbtu8(src^);
+ btS8: tbtdouble(Dest^) := tbts8(src^);
+ btU16: tbtdouble(Dest^) := tbtu16(src^);
+ btS16: tbtdouble(Dest^) := tbts16(src^);
+ btU32: tbtdouble(Dest^) := tbtu32(src^);
+ btS32: tbtdouble(Dest^) := tbts32(src^);
+ {$IFNDEF PS_NOINT64} btS64: tbtdouble(Dest^) := tbts64(src^);{$ENDIF}
+ btSingle: tbtdouble(Dest^) := tbtsingle(Src^);
+ btDouble: tbtdouble(Dest^) := tbtdouble(Src^);
+ btExtended: tbtdouble(Dest^) := tbtextended(Src^);
+ btCurrency: tbtdouble(Dest^) := tbtcurrency(Src^);
+ btVariant: tbtdouble(Dest^) := Variant(src^);
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+
+ end;
+ btExtended:
+ begin
+ if srctype.BaseType = btPointer then
+ begin
+ srctype := PIFTypeRec(Pointer(IPointer(Src)+4)^);
+ Src := Pointer(Src^);
+ if (src = nil) or (srctype = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case srctype.BaseType of
+ btU8: tbtextended(Dest^) := tbtu8(src^);
+ btS8: tbtextended(Dest^) := tbts8(src^);
+ btU16: tbtextended(Dest^) := tbtu16(src^);
+ btS16: tbtextended(Dest^) := tbts16(src^);
+ btU32: tbtextended(Dest^) := tbtu32(src^);
+ btS32: tbtextended(Dest^) := tbts32(src^);
+ {$IFNDEF PS_NOINT64} btS64: tbtextended(Dest^) := tbts64(src^);{$ENDIF}
+ btSingle: tbtextended(Dest^) := tbtsingle(Src^);
+ btDouble: tbtextended(Dest^) := tbtdouble(Src^);
+ btExtended: tbtextended(Dest^) := tbtextended(Src^);
+ btCurrency: tbtextended(Dest^) := tbtcurrency(Src^);
+ btVariant: tbtextended(Dest^) := Variant(src^);
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+ end;
+ btCurrency: tbtcurrency(Dest^) := PSGetCurrency(Src, srctype);
+ btPChar: pchar(dest^) := pchar(PSGetString(Src, srctype));
+ btString:
+ tbtstring(dest^) := PSGetString(Src, srctype);
+ btChar: tbtchar(dest^) := chr(PSGetUInt(Src, srctype));
+ {$IFNDEF PS_NOWIDESTRING}
+ btWideString: tbtwidestring(dest^) := PSGetWideString(Src, srctype);
+ btWideChar: tbtwidechar(dest^) := widechar(PSGetUInt(Src, srctype));
+ {$ENDIF}
+ btStaticArray:
+ begin
+ if desttype <> srctype then
+ Result := False
+ else
+ CopyArrayContents(dest, Src, TPSTypeRec_StaticArray(desttype).Size, TPSTypeRec_StaticArray(desttype).ArrayType);
+ end;
+ btArray:
+ begin
+ if (srctype.BaseType = btStaticArray) and (TPSTypeRec_Array(desttype).ArrayType = TPSTypeRec_Array(srctype).ArrayType) then
+ begin
+ PSDynArraySetLength(Pointer(Dest^), desttype, TPSTypeRec_StaticArray(srctype).Size);
+ CopyArrayContents(Pointer(dest^), Src, TPSTypeRec_StaticArray(srctype).Size, TPSTypeRec_StaticArray(srctype).ArrayType);
+ end else if (srctype.BaseType = btvariant) and VarIsArray(Variant(src^)) then
+ Result := CreateArrayFromVariant(Self, dest, Variant(src^), desttype)
+ else if (desttype <> srctype) and not ((desttype.BaseType = btarray) and (srctype.BaseType = btArray)
+ and (TPSTypeRec_Array(desttype).ArrayType = TPSTypeRec_Array(srctype).ArrayType)) then
+ Result := False
+ else
+ CopyArrayContents(dest, src, 1, desttype);
+ end;
+ btRecord:
+ begin
+ if desttype <> srctype then
+ Result := False
+ else
+ CopyArrayContents(dest, Src, 1, desttype);
+ end;
+ btVariant:
+ begin
+{$IFNDEF PS_NOINTERFACES}
+ if srctype.ExportName = 'IDISPATCH' then
+ begin
+ {$IFDEF DELPHI3UP}
+ Variant(Dest^) := IDispatch(Src^);
+ {$ELSE}
+ AssignVariantFromIDispatch(Variant(Dest^), IDispatch(Src^));
+ {$ENDIF}
+ end else
+{$ENDIF}
+ if srctype.BaseType = btVariant then
+ variant(Dest^) := variant(src^)
+ else
+ begin
+ tt.VI.FType := FindType2(btPointer);
+ tt.DestType := srctype;
+ tt.DataDest := src;
+ tt.FreeIt := False;
+ Result := PIFVariantToVariant(@tt, variant(dest^));
+ end;
+ end;
+ btClass:
+ begin
+ if srctype.BaseType = btClass then
+ TObject(Dest^) := TObject(Src^)
+ else
+ Result := False;
+ end;
+{$IFNDEF PS_NOINTERFACES}
+ btInterface:
+ begin
+ if Srctype.BaseType = btVariant then
+ begin
+ if desttype.ExportName = 'IDISPATCH' then
+ begin
+ {$IFDEF Delphi3UP}
+ IDispatch(Dest^) := IDispatch(Variant(Src^));
+ {$ELSE}
+ AssignIDispatchFromVariant(IDispatch(Dest^), Variant(Src^));
+ {$ENDIF}
+ end else
+ Result := False;
+{$IFDEF Delphi3UP}
+ end else
+ if srctype.BaseType = btClass then
+ begin
+ if (TObject(Src^) = nil) or not TObject(Src^).GetInterface(TPSTypeRec_Interface(desttype).Guid, IUnknown(Dest^)) then
+ begin
+ Result := false;
+ Cmd_Err(eInterfaceNotSupported);
+ exit;
+ end;
+{$ENDIF}
+ end else if srctype.BaseType = btInterface then
+ begin
+ {$IFNDEF Delphi3UP}
+ if IUnknown(Dest^) <> nil then
+ begin
+ IUnknown(Dest^).Release;
+ IUnknown(Dest^) := nil;
+ end;
+ {$ENDIF}
+ IUnknown(Dest^) := IUnknown(Src^);
+ {$IFNDEF Delphi3UP}
+ if IUnknown(Dest^) <> nil then
+ IUnknown(Dest^).AddRef;
+ {$ENDIF}
+ end else
+ Result := False;
+ end;
+{$ENDIF}
+ else begin
+ Result := False;
+ end;
+ end;
+ if Result = False then
+ CMD_Err(ErTypeMismatch);
+ except
+ {$IFDEF DELPHI6UP}
+ Tmp := AcquireExceptionObject;
+ {$ELSE}
+ if RaiseList <> nil then
+ begin
+ Tmp := Exception(PRaiseFrame(RaiseList)^.ExceptObject);
+ PRaiseFrame(RaiseList)^.ExceptObject := nil;
+ end else
+ Tmp := nil;
+ {$ENDIF}
+ if Tmp <> nil then
+ begin
+ if Tmp is EPSException then
+ begin
+ Result := False;
+ ExceptionProc(EPSException(tmp).ProcNo, EPSException(tmp).ProcPos, erCustomError, EPSException(tmp).Message, nil);
+ exit;
+ end else
+ if Tmp is EDivByZero then
+ begin
+ Result := False;
+ CMD_Err3(erDivideByZero, '', Tmp);
+ Exit;
+ end;
+ if Tmp is EZeroDivide then
+ begin
+ Result := False;
+ CMD_Err3(erDivideByZero, '', Tmp);
+ Exit;
+ end;
+ if Tmp is EMathError then
+ begin
+ Result := False;
+ CMD_Err3(erMathError, '', Tmp);
+ Exit;
+ end;
+ end;
+ if (tmp <> nil) and (Tmp is Exception) then
+ CMD_Err3(erException, Exception(Tmp).Message, Tmp)
+ else
+ CMD_Err3(erException, '', Tmp);
+ Result := False;
+ end;
+end;
+
+function SpecImport(Sender: TPSExec; p: TPSExternalProcRec; Tag: Pointer): Boolean; forward;
+
+
+function Class_IS(Self: TPSExec; Obj: TObject; var2type: TPSTypeRec): Boolean;
+var
+ R: TPSRuntimeClassImporter;
+ cc: TPSRuntimeClass;
+begin
+ if Obj = nil then
+ begin
+ Result := false;
+ exit;
+ end;
+ r := Self.FindSpecialProcImport(SpecImport);
+ if R = nil then
+ begin
+ Result := false;
+ exit;
+ end;
+ cc := r.FindClass(var2type.ExportName);
+ if cc = nil then
+ begin
+ result := false;
+ exit;
+ end;
+ try
+ Result := Obj is cc.FClass;
+ except
+ Result := false;
+ end;
+end;
+
+function TPSExec.DoBooleanCalc(var1, Var2, into: Pointer; var1Type, var2type, intotype: TPSTypeRec; Cmd: Cardinal): Boolean;
+var
+ b: Boolean;
+ Tmp: TObject;
+ tvar: Variant;
+
+
+ procedure SetBoolean(b: Boolean; var Ok: Boolean);
+ begin
+ Ok := True;
+ case IntoType.BaseType of
+ btU8: tbtu8(Into^):= Cardinal(b);
+ btS8: tbts8(Into^) := Longint(b);
+ btU16: tbtu16(Into^) := Cardinal(b);
+ btS16: tbts16(Into^) := Longint(b);
+ btU32: tbtu32(Into^) := Cardinal(b);
+ btS32: tbts32(Into^) := Longint(b);
+ btVariant: Variant(Into^) := b;
+ else begin
+ CMD_Err(ErTypeMismatch);
+ Ok := False;
+ end;
+ end;
+ end;
+begin
+ Result := true;
+ try
+ case Cmd of
+ 0: begin { >= }
+ case var1Type.BaseType of
+ btU8:
+ if (var2Type.BaseType = btString) or (Var2Type.BaseType = btPChar) then
+ b := char(tbtu8(var1^)) >= PSGetString(Var2, var2type)
+ else
+ b := tbtu8(var1^) >= PSGetUInt(Var2, var2type);
+ btS8: b := tbts8(var1^) >= PSGetInt(Var2, var2type);
+ btU16: b := tbtu16(var1^) >= PSGetUInt(Var2, var2type);
+ btS16: b := tbts16(var1^) >= PSGetInt(Var2, var2type);
+ btU32: b := tbtu32(var1^) >= PSGetUInt(Var2, var2type);
+ btS32:
+ begin
+ if var2type.BaseType = btPointer then
+ begin
+ var2type := PIFTypeRec(Pointer(IPointer(var2)+4)^);
+ var2 := Pointer(var2^);
+ if (var2 = nil) or (var2type = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case var2type.BaseType of
+ btU8: b := tbts32(var1^) >= tbtu8(Var2^);
+ btS8: b := tbts32(var1^) >= tbts8(Var2^);
+ btU16: b := tbts32(var1^) >= tbtu16(Var2^);
+ btS16: b := tbts32(var1^) >= tbts16(Var2^);
+ btU32: b := tbts32(var1^) >= Longint(tbtu32(Var2^));
+ btS32: b := tbts32(var1^) >= tbts32(Var2^);
+ btDouble: b := PSGetReal(Var1, var1type) >= tbtdouble(var2^);
+ btSingle: B := psGetReal(Var1, var1Type) >= tbtsingle(var2^);
+ {$IFNDEF PS_NOINT64} btS64: b := tbts32(var1^) >= tbts64(Var2^);{$ENDIF}
+ btChar: b := tbts32(var1^) >= Ord(tbtchar(Var2^));
+ {$IFNDEF PS_NOWIDESTRING} btWideChar: b := tbts32(var1^) >= Ord(tbtwidechar(Var2^));{$ENDIF}
+ btVariant: b := tbts32(var1^) >= Variant(Var2^);
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+ end;
+ btSingle: b := tbtsingle(var1^) >= PSGetReal(Var2, var2type);
+ btDouble: b := tbtdouble(var1^) >= PSGetReal(Var2, var2type);
+ btCurrency: b := tbtcurrency(var1^) >= PSGetCurrency(Var2, var2type);
+ btExtended: b := tbtextended(var1^) >= PSGetReal(Var2, var2type);
+ {$IFNDEF PS_NOINT64}
+ btS64: b := tbts64(var1^) >= PSGetInt64(Var2, var2type);
+ {$ENDIF}
+ btPChar,btString: b := tbtstring(var1^) >= PSGetString(Var2, var2type);
+ btChar: b := tbtchar(var1^) >= PSGetString(Var2, var2type);
+ {$IFNDEF PS_NOWIDESTRING}
+ btWideChar: b := tbtwidechar(var1^) >= PSGetWideString(Var2, var2type);
+ btWideString: b := tbtwidestring(var1^) >= PSGetWideString(Var2, var2type);
+ {$ENDIF}
+ btVariant:
+ begin
+ if not IntPIFVariantToVariant(var2, var2type, tvar) then
+ begin
+ Result := false;
+ end else
+ b := Variant(var1^) >= tvar;
+ end;
+ btSet:
+ begin
+ if var1Type = var2Type then
+ begin
+ Set_Subset(var2, var1, TPSTypeRec_Set(var1Type).aByteSize, b);
+ end else result := False;
+ end;
+ else begin
+ CMD_Err(ErTypeMismatch);
+ exit;
+ end;
+ end;
+ if not Result then begin
+ CMD_Err(ErTypeMismatch);
+ exit;
+ end;
+ SetBoolean(b, Result);
+ end;
+ 1: begin { <= }
+ case var1Type.BaseType of
+ btU8:
+ if (var2Type.BaseType = btString) or (Var2Type.BaseType = btPChar) then
+ b := char(tbtu8(var1^)) <= PSGetString(Var2, var2type)
+ else
+ b := tbtu8(var1^) <= PSGetUInt(Var2, var2type);
+ btS8: b := tbts8(var1^) <= PSGetInt(Var2, var2type);
+ btU16: b := tbtu16(var1^) <= PSGetUInt(Var2, var2type);
+ btS16: b := tbts16(var1^) <= PSGetInt(Var2, var2type);
+ btU32: b := tbtu32(var1^) <= PSGetUInt(Var2, var2type);
+ btS32:
+ begin
+ if var2type.BaseType = btPointer then
+ begin
+ var2type := PIFTypeRec(Pointer(IPointer(var2)+4)^);
+ var2 := Pointer(var2^);
+ if (var2 = nil) or (var2type = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case var2type.BaseType of
+ btU8: b := tbts32(var1^) <= tbtu8(Var2^);
+ btS8: b := tbts32(var1^) <= tbts8(Var2^);
+ btU16: b := tbts32(var1^) <= tbtu16(Var2^);
+ btS16: b := tbts32(var1^) <= tbts16(Var2^);
+ btU32: b := tbts32(var1^) <= Longint(tbtu32(Var2^));
+ btS32: b := tbts32(var1^) <= tbts32(Var2^);
+ btDouble: b := PSGetReal(Var1, var1type) <= tbtdouble(var2^);
+ btSingle: B := psGetReal(Var1, var1Type) <= tbtsingle(var2^);
+ {$IFNDEF PS_NOINT64} btS64: b := tbts32(var1^) <= tbts64(Var2^);{$ENDIF}
+ btChar: b := tbts32(var1^) <= Ord(tbtchar(Var2^));
+ {$IFNDEF PS_NOWIDESTRING} btWideChar: b := tbts32(var1^) <= Ord(tbtwidechar(Var2^));{$ENDIF}
+ btVariant: b := tbts32(var1^) <= Variant(Var2^);
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+ end; btSingle: b := tbtsingle(var1^) <= PSGetReal(Var2, var2type);
+ btCurrency: b := tbtcurrency(var1^) <= PSGetCurrency(Var2, var2type);
+ btDouble: b := tbtdouble(var1^) <= PSGetReal(Var2, var2type);
+ btExtended: b := tbtextended(var1^) <= PSGetReal(Var2, var2type);
+ {$IFNDEF PS_NOINT64}
+ btS64: b := tbts64(var1^) <= PSGetInt64(Var2, var2type);
+ {$ENDIF}
+ btPChar,btString: b := tbtstring(var1^) <= PSGetString(Var2, var2type);
+ btChar: b := tbtchar(var1^) <= PSGetString(Var2, var2type);
+ {$IFNDEF PS_NOWIDESTRING}
+ btWideChar: b := tbtwidechar(var1^) <= PSGetWideString(Var2, var2type);
+ btWideString: b := tbtwidestring(var1^) <= PSGetWideString(Var2, var2type);
+ {$ENDIF}
+ btVariant:
+ begin
+ if not IntPIFVariantToVariant(var2, var2type, tvar) then
+ begin
+ Result := false;
+ end else
+ b := Variant(var1^) <= tvar;
+ end;
+ btSet:
+ begin
+ if var1Type = var2Type then
+ begin
+ Set_Subset(var1, var2, TPSTypeRec_Set(var1Type).aByteSize, b);
+ end else result := False;
+ end;
+ else begin
+ CMD_Err(ErTypeMismatch);
+ exit;
+ end;
+ end;
+ if not Result then begin
+ CMD_Err(erTypeMismatch);
+ exit;
+ end;
+ SetBoolean(b, Result);
+ end;
+ 2: begin { > }
+ case var1Type.BaseType of
+ btU8:
+ if (var2Type.BaseType = btString) or (Var2Type.BaseType = btPChar) then
+ b := char(tbtu8(var1^)) > PSGetString(Var2, var2type)
+ else
+ b := tbtu8(var1^) > PSGetUInt(Var2, var2type);
+ btS8: b := tbts8(var1^) > PSGetInt(Var2, var2type);
+ btU16: b := tbtu16(var1^) > PSGetUInt(Var2, var2type);
+ btS16: b := tbts16(var1^) > PSGetInt(Var2, var2type);
+ btU32: b := tbtu32(var1^) > PSGetUInt(Var2, var2type);
+ btS32:
+ begin
+ if var2type.BaseType = btPointer then
+ begin
+ var2type := PIFTypeRec(Pointer(IPointer(var2)+4)^);
+ var2 := Pointer(var2^);
+ if (var2 = nil) or (var2type = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case var2type.BaseType of
+ btU8: b := tbts32(var1^) > tbtu8(Var2^);
+ btS8: b := tbts32(var1^) > tbts8(Var2^);
+ btU16: b := tbts32(var1^) > tbtu16(Var2^);
+ btS16: b := tbts32(var1^) > tbts16(Var2^);
+ btU32: b := tbts32(var1^) > Longint(tbtu32(Var2^));
+ btS32: b := tbts32(var1^) > tbts32(Var2^);
+ btDouble: b := PSGetReal(Var1, var1type) > tbtdouble(var2^);
+ btSingle: B := psGetReal(Var1, var1Type) > tbtsingle(var2^);
+ {$IFNDEF PS_NOINT64} btS64: b := tbts32(var1^) > tbts64(Var2^);{$ENDIF}
+ btChar: b := tbts32(var1^) > Ord(tbtchar(Var2^));
+ {$IFNDEF PS_NOWIDESTRING} btWideChar: b := tbts32(var1^) = Ord(tbtwidechar(Var2^));{$ENDIF}
+ btVariant: b := tbts32(var1^) > Variant(Var2^);
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+ end; btSingle: b := tbtsingle(var1^) > PSGetReal(Var2, var2type);
+ btDouble: b := tbtdouble(var1^) > PSGetReal(Var2, var2type);
+ btExtended: b := tbtextended(var1^) > PSGetReal(Var2, var2type);
+ btCurrency: b := tbtcurrency(var1^) > PSGetCurrency(Var2, var2type);
+ {$IFNDEF PS_NOINT64}
+ btS64: b := tbts64(var1^) > PSGetInt64(Var2, var2type);
+ {$ENDIF}
+ btPChar,btString: b := tbtstring(var1^) > PSGetString(Var2, var2type);
+ btChar: b := tbtchar(var1^) > PSGetString(Var2, var2type);
+ {$IFNDEF PS_NOWIDESTRING}
+ btWideChar: b := tbtwidechar(var1^) > PSGetWideString(Var2, var2type);
+ btWideString: b := tbtwidestring(var1^) > PSGetWideString(Var2, var2type);
+ {$ENDIF}
+ btVariant:
+ begin
+ if not IntPIFVariantToVariant(var2, var2type, tvar) then
+ begin
+ Result := false;
+ end else
+ b := Variant(var1^) > tvar;
+ end;
+ else begin
+ CMD_Err(erTypeMismatch);
+ exit;
+ end;
+ end;
+ if not Result then begin
+ CMD_Err(erTypeMismatch);
+ exit;
+ end;
+ SetBoolean(b, Result);
+ end;
+ 3: begin { < }
+ case var1Type.BaseType of
+ btU8:
+ if (var2Type.BaseType = btString) or (Var2Type.BaseType = btPChar) then
+ b := char(tbtu8(var1^)) < PSGetString(Var2, var2type)
+ else
+ b := tbtu8(var1^) < PSGetUInt(Var2, var2type);
+ btS8: b := tbts8(var1^) < PSGetInt(Var2, var2type);
+ btU16: b := tbtu16(var1^) < PSGetUInt(Var2, var2type);
+ btS16: b := tbts16(var1^) < PSGetInt(Var2, var2type);
+ btU32: b := tbtu32(var1^) < PSGetUInt(Var2, var2type);
+ btS32:
+ begin
+ if var2type.BaseType = btPointer then
+ begin
+ var2type := PIFTypeRec(Pointer(IPointer(var2)+4)^);
+ var2 := Pointer(var2^);
+ if (var2 = nil) or (var2type = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case var2type.BaseType of
+ btU8: b := tbts32(var1^) < tbtu8(Var2^);
+ btS8: b := tbts32(var1^) < tbts8(Var2^);
+ btU16: b := tbts32(var1^) < tbtu16(Var2^);
+ btS16: b := tbts32(var1^) < tbts16(Var2^);
+ btU32: b := tbts32(var1^) < Longint(tbtu32(Var2^));
+ btS32: b := tbts32(var1^) < tbts32(Var2^);
+ btDouble: b := PSGetReal(Var1, var1type) < tbtdouble(var2^);
+ btSingle: B := psGetReal(Var1, var1Type) < tbtsingle(var2^);
+ {$IFNDEF PS_NOINT64} btS64: b := tbts32(var1^) < tbts64(Var2^);{$ENDIF}
+ btChar: b := tbts32(var1^) < Ord(tbtchar(Var2^));
+ {$IFNDEF PS_NOWIDESTRING} btWideChar: b := tbts32(var1^) < Ord(tbtwidechar(Var2^));{$ENDIF}
+ btVariant: b := tbts32(var1^) < Variant(Var2^);
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+ end; btSingle: b := tbtsingle(var1^) < PSGetReal(Var2, var2type);
+ btDouble: b := tbtdouble(var1^) < PSGetReal(Var2, var2type);
+ btCurrency: b := tbtcurrency(var1^) < PSGetCurrency(Var2, var2type);
+ btExtended: b := tbtextended(var1^) < PSGetReal(Var2, var2type);
+ {$IFNDEF PS_NOINT64}
+ btS64: b := tbts64(var1^) < PSGetInt64(Var2, var2type);
+ {$ENDIF}
+ btPChar,btString: b := tbtstring(var1^) < PSGetString(Var2, var2type);
+ btChar: b := tbtchar(var1^) < PSGetString(Var2, var2type);
+ {$IFNDEF PS_NOWIDESTRING}
+ btWideChar: b := tbtwidechar(var1^) < PSGetWideString(Var2, var2type);
+ btWideString: b := tbtwidestring(var1^) < PSGetWideString(Var2, var2type);
+ {$ENDIF}
+ btVariant:
+ begin
+ if not IntPIFVariantToVariant(var2, var2type, tvar) then
+ begin
+ Result := false;
+ end else
+ b := Variant(var1^) < tvar;
+ end;
+ else begin
+ CMD_Err(erTypeMismatch);
+ exit;
+ end;
+ end;
+ if not Result then begin
+ CMD_Err(erTypeMismatch);
+ exit;
+ end;
+ SetBoolean(b, Result);
+ end;
+ 4: begin { <> }
+ case var1Type.BaseType of
+ btInterface:
+ begin
+ if var2Type.BaseType = btInterface then
+ b := Pointer(var1^) <> Pointer(var2^) // no need to cast it to IUnknown
+ else
+ Result := false;
+ end;
+ btClass:
+ begin
+ if var2Type.BaseType = btclass then
+ b := TObject(var1^) <> TObject(var2^)
+ else
+ Result := false;
+ end;
+ btU8:
+ if (var2Type.BaseType = btString) or (Var2Type.BaseType = btPChar) then
+ b := char(tbtu8(var1^)) <> PSGetString(Var2, var2type)
+ else
+ b := tbtu8(var1^) <> PSGetUInt(Var2, var2type);
+ btS8: b := tbts8(var1^) <> PSGetInt(Var2, var2type);
+ btU16: b := tbtu16(var1^) <> PSGetUInt(Var2, var2type);
+ btS16: b := tbts16(var1^) <> PSGetInt(Var2, var2type);
+ btProcPtr:
+ begin
+ if Pointer(Var1^) = Pointer(Var2^) then
+ begin
+ if Longint(Var1^) = 0 then
+ b := ((Pointer(Pointer(IPointer(Var1)+8)^) <> Pointer(Pointer(IPointer(Var2)+8)^)) or
+ (Pointer(Pointer(IPointer(Var1)+8)^) <> Pointer(Pointer(IPointer(Var2)+8)^)))
+ else
+ b := False;
+ end else b := True;
+ end;
+ btU32: b := tbtu32(var1^) <> PSGetUInt(Var2, var2type);
+ btS32:
+ begin
+ if var2type.BaseType = btPointer then
+ begin
+ var2type := PIFTypeRec(Pointer(IPointer(var2)+4)^);
+ var2 := Pointer(var2^);
+ if (var2 = nil) or (var2type = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case var2type.BaseType of
+ btU8: b := tbts32(var1^) <> tbtu8(Var2^);
+ btS8: b := tbts32(var1^) <> tbts8(Var2^);
+ btU16: b := tbts32(var1^) <> tbtu16(Var2^);
+ btS16: b := tbts32(var1^) <> tbts16(Var2^);
+ btProcPtr, btU32: b := tbts32(var1^)<> Longint(tbtu32(Var2^));
+ btS32: b := tbts32(var1^) <> tbts32(Var2^);
+ btDouble: b := PSGetReal(Var1, var1type) <> tbtdouble(var2^);
+ btSingle: B := psGetReal(Var1, var1Type) <> tbtsingle(var2^);
+ {$IFNDEF PS_NOINT64} btS64: b := tbts32(var1^) <> tbts64(Var2^);{$ENDIF}
+ btChar: b := tbts32(var1^) <> Ord(tbtchar(Var2^));
+ {$IFNDEF PS_NOWIDESTRING} btWideChar: b := tbts32(var1^) <> Ord(tbtwidechar(Var2^));{$ENDIF}
+ btVariant: b := tbts32(var1^) <> Variant(Var2^);
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+ end; btSingle: b := tbtsingle(var1^) <> PSGetReal(Var2, var2type);
+ btDouble: b := tbtdouble(var1^) <> PSGetReal(Var2, var2type);
+ btExtended: b := tbtextended(var1^) <> PSGetReal(Var2, var2type);
+ btCurrency: b := tbtcurrency(var1^) <> PSGetCurrency(Var2, var2type);
+ btPChar,btString: b := tbtstring(var1^) <> PSGetString(Var2, var2type);
+ {$IFNDEF PS_NOINT64}
+ btS64: b := tbts64(var1^) <> PSGetInt64(Var2, var2type);
+ {$ENDIF}
+ btChar: b := tbtchar(var1^) <> PSGetString(Var2, var2type);
+ {$IFNDEF PS_NOWIDESTRING}
+ btWideChar: b := tbtwidechar(var1^) <> PSGetWideString(Var2, var2type);
+ btWideString: b := tbtwidestring(var1^) <> PSGetWideString(Var2, var2type);
+ {$ENDIF}
+ btVariant:
+ begin
+ if not IntPIFVariantToVariant(var2, var2type, tvar) then
+ begin
+ Result := false;
+ end else
+ b := Variant(var1^) <> tvar;
+ end;
+ btSet:
+ begin
+ if var1Type = var2Type then
+ begin
+ Set_Equal(var1, var2, TPSTypeRec_Set(var1Type).aByteSize, b);
+ b := not b;
+ end else result := False;
+ end;
+ else begin
+ CMD_Err(erTypeMismatch);
+ exit;
+ end;
+ end;
+ if not Result then begin
+ CMD_Err(erTypeMismatch);
+ exit;
+ end;
+ SetBoolean(b, Result);
+ end;
+ 5: begin { = }
+ case var1Type.BaseType of
+ btInterface:
+ begin
+ if var2Type.BaseType = btInterface then
+ b := Pointer(var1^) = Pointer(var2^) // no need to cast it to IUnknown
+ else
+ Result := false;
+ end;
+ btClass:
+ begin
+ if var2Type.BaseType = btclass then
+ b := TObject(var1^) = TObject(var2^)
+ else
+ Result := false;
+ end;
+ btU8:
+ if (var2Type.BaseType = btString) or (Var2Type.BaseType = btPChar) then
+ b := char(tbtu8(var1^)) = PSGetString(Var2, var2type)
+ else
+ b := tbtu8(var1^) = PSGetUInt(Var2, var2type);
+ btS8: b := tbts8(var1^) = PSGetInt(Var2, var2type);
+ btU16: b := tbtu16(var1^) = PSGetUInt(Var2, var2type);
+ btS16: b := tbts16(var1^) = PSGetInt(Var2, var2type);
+ btU32: b := tbtu32(var1^) = PSGetUInt(Var2, var2type);
+ btProcPtr:
+ begin
+ if Pointer(Var1^) = Pointer(Var2^) then
+ begin
+ if Longint(Var1^) = 0 then
+ b := ((Pointer(Pointer(IPointer(Var1)+8)^) = Pointer(Pointer(IPointer(Var2)+8)^)) and
+ (Pointer(Pointer(IPointer(Var1)+8)^) = Pointer(Pointer(IPointer(Var2)+8)^)))
+ else
+ b := True;
+ end else b := False;
+ end;
+ btS32:
+ begin
+ if var2type.BaseType = btPointer then
+ begin
+ var2type := PIFTypeRec(Pointer(IPointer(var2)+4)^);
+ var2 := Pointer(var2^);
+ if (var2 = nil) or (var2type = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case var2type.BaseType of
+ btU8: b := tbts32(var1^) = tbtu8(Var2^);
+ btS8: b := tbts32(var1^) = tbts8(Var2^);
+ btU16: b := tbts32(var1^) = tbtu16(Var2^);
+ btS16: b := tbts32(var1^) = tbts16(Var2^);
+ btProcPtr, btU32: b := tbts32(var1^) = Longint(tbtu32(Var2^));
+ btS32: b := tbts32(var1^) = tbts32(Var2^);
+ btDouble: b := PSGetReal(Var1, var1type) = tbtdouble(var2^);
+ btSingle: B := psGetReal(Var1, var1Type) = tbtsingle(var2^);
+ {$IFNDEF PS_NOINT64} btS64: b := tbts32(var1^) = tbts64(Var2^);{$ENDIF}
+ btChar: b := tbts32(var1^) = Ord(tbtchar(Var2^));
+ {$IFNDEF PS_NOWIDESTRING} btWideChar: b := tbts32(var1^) = Ord(tbtwidechar(Var2^));{$ENDIF}
+ btVariant: b := tbts32(var1^) = Variant(Var2^);
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+ end; btSingle: b := tbtsingle(var1^) = PSGetReal(Var2, var2type);
+ btDouble: b := tbtdouble(var1^) = PSGetReal(Var2, var2type);
+ btExtended: b := tbtextended(var1^) = PSGetReal(Var2, var2type);
+ btCurrency: b := tbtcurrency(var1^) = PSGetCurrency(Var2, var2type);
+ btPchar, btString: b := tbtstring(var1^) = PSGetString(Var2, var2type);
+ {$IFNDEF PS_NOINT64}
+ btS64: b := tbts64(var1^) = PSGetInt64(Var2, var2type);
+ {$ENDIF}
+ btChar: b := tbtchar(var1^) = PSGetString(Var2, var2type);
+ {$IFNDEF PS_NOWIDESTRING}
+ btWideChar: b := tbtwidechar(var1^) = PSGetWideString(Var2, var2type);
+ btWideString: b := tbtwidestring(var1^) = PSGetWideString(Var2, var2type);
+ {$ENDIF}
+ btVariant:
+ begin
+ if not IntPIFVariantToVariant(var2, var2type, tvar) then
+ begin
+ Result := false;
+ end else
+ b := Variant(var1^) = tvar;
+ end;
+ btSet:
+ begin
+ if var1Type = var2Type then
+ begin
+ Set_Equal(var1, var2, TPSTypeRec_Set(var1Type).aByteSize, b);
+ end else result := False;
+ end;
+ else begin
+ CMD_Err(erTypeMismatch);
+ exit;
+ end;
+ end;
+ if not Result then begin
+ CMD_Err(erTypeMismatch);
+ exit;
+ end;
+ SetBoolean(b, Result);
+ end;
+ 6: begin { in }
+ if var2Type.BaseType = btSet then
+ begin
+ Cmd := PSGetUInt(var1, var1type);
+ if not Result then
+ begin
+ CMD_Err(erTypeMismatch);
+ exit;
+ end;
+ if Cmd >= Cardinal(TPSTypeRec_Set(var2Type).aBitSize) then
+ begin
+ cmd_Err(erOutofRecordRange);
+ Result := False;
+ Exit;
+ end;
+ Set_membership(Cmd, var2, b);
+ SetBoolean(b, Result);
+ end else
+ begin
+ CMD_Err(erTypeMismatch);
+ exit;
+ end;
+ end;
+ 7:
+ begin // is
+ case var1Type.BaseType of
+ btClass:
+ begin
+ if var2type.BaseType <> btU32 then
+ Result := False
+ else
+ begin
+ var2type := FTypes[tbtu32(var2^)];
+ if (var2type = nil) or (var2type.BaseType <> btClass) then
+ Result := false
+ else
+ begin
+ Setboolean(Class_IS(Self, TObject(var1^), var2type), Result);
+ end;
+ end;
+ end;
+ else begin
+ CMD_Err(erTypeMismatch);
+ exit;
+ end;
+ end;
+ if not Result then begin
+ CMD_Err(erTypeMismatch);
+ exit;
+ end;
+ end;
+ else begin
+ Result := False;
+ CMD_Err(erInvalidOpcodeParameter);
+ exit;
+ end;
+ end;
+ except
+ {$IFDEF DELPHI6UP}
+ Tmp := AcquireExceptionObject;
+ {$ELSE}
+ if RaiseList <> nil then
+ begin
+ Tmp := Exception(PRaiseFrame(RaiseList)^.ExceptObject);
+ PRaiseFrame(RaiseList)^.ExceptObject := nil;
+ end else
+ Tmp := nil;
+ {$ENDIF}
+ if Tmp <> nil then
+ begin
+ if Tmp is EPSException then
+ begin
+ Result := False;
+ ExceptionProc(EPSException(tmp).ProcNo, EPSException(tmp).ProcPos, erCustomError, EPSException(tmp).Message, nil);
+ exit;
+ end else
+ if Tmp is EDivByZero then
+ begin
+ Result := False;
+ CMD_Err3(erDivideByZero, '', Tmp);
+ Exit;
+ end;
+ if Tmp is EZeroDivide then
+ begin
+ Result := False;
+ CMD_Err3(erDivideByZero, '', Tmp);
+ Exit;
+ end;
+ if Tmp is EMathError then
+ begin
+ Result := False;
+ CMD_Err3(erMathError, '', Tmp);
+ Exit;
+ end;
+ end;
+ if (tmp <> nil) and (Tmp is Exception) then
+ CMD_Err3(erException, Exception(Tmp).Message, Tmp)
+ else
+ CMD_Err3(erException, '', Tmp);
+ Result := False;
+ end;
+end;
+
+function VarIsFloat(const V: Variant): Boolean;
+begin
+ Result := VarType(V) in [varSingle, varDouble, varCurrency];
+end;
+
+function TPSExec.DoCalc(var1, Var2: Pointer; var1Type, var2type: TPSTypeRec; CalcType: Cardinal): Boolean;
+ { var1=dest, var2=src }
+var
+ Tmp: TObject;
+ tvar: Variant;
+begin
+ try
+ Result := True;
+ case CalcType of
+ 0: begin { + }
+ case var1Type.BaseType of
+ btU8: tbtU8(var1^) := tbtU8(var1^) + PSGetUInt(Var2, var2type);
+ btS8: tbts8(var1^) := tbts8(var1^) + PSGetInt(Var2, var2type);
+ btU16: tbtU16(var1^) := tbtU16(var1^) + PSGetUInt(Var2, var2type);
+ btS16: tbts16(var1^) := tbts16(var1^) + PSGetInt(Var2, var2type);
+ btU32:
+ begin
+ if var2type.BaseType = btPointer then
+ begin
+ var2type := PIFTypeRec(Pointer(IPointer(var2)+4)^);
+ var2 := Pointer(var2^);
+ if (var2 = nil) or (var2type = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case var2type.BaseType of
+ btU8: tbtU32(var1^) := tbtU32(var1^) + tbtu8(var2^);
+ btS8: tbtU32(var1^) := tbtU32(var1^) + cardinal(longint(tbts8(var2^)));
+ btU16: tbtU32(var1^) := tbtU32(var1^) + tbtu16(var2^);
+ btS16: tbtU32(var1^) := tbtU32(var1^) + cardinal(longint(tbts16(var2^)));
+ btU32: tbtU32(var1^) := tbtU32(var1^) + tbtu32(var2^);
+ btS32: tbtU32(var1^) := tbtU32(var1^) + cardinal(tbts32(var2^));
+ {$IFNDEF PS_NOINT64} btS64: tbtU32(var1^) := tbtU32(var1^) + tbts64(var2^);{$ENDIF}
+ btChar: tbtU32(var1^) := tbtU32(var1^) + Ord(tbtchar(var2^));
+ {$IFNDEF PS_NOWIDESTRING} btWideChar: tbtU32(var1^) := tbtU32(var1^) + Ord(tbtwidechar(var2^));{$ENDIF}
+ btVariant: tbtU32(var1^) := tbtU32(var1^) + Variant(var2^);
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+ end;
+ btS32:
+ begin
+ if var2type.BaseType = btPointer then
+ begin
+ var2type := PIFTypeRec(Pointer(IPointer(var2)+4)^);
+ var2 := Pointer(var2^);
+ if (var2 = nil) or (var2type = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case var2type.BaseType of
+ btU8: tbts32(var1^) := tbts32(var1^) + tbtu8(var2^);
+ btS8: tbts32(var1^) := tbts32(var1^) + tbts8(var2^);
+ btU16: tbts32(var1^) := tbts32(var1^) + tbtu16(var2^);
+ btS16: tbts32(var1^) := tbts32(var1^) + tbts16(var2^);
+ btU32: tbts32(var1^) := tbts32(var1^) + Longint(tbtu32(var2^));
+ btS32: tbts32(var1^) := tbts32(var1^) + tbts32(var2^);
+ {$IFNDEF PS_NOINT64} btS64: tbts32(var1^) := tbts32(var1^) + tbts64(var2^);{$ENDIF}
+ btChar: tbts32(var1^) := tbts32(var1^) + Ord(tbtchar(var2^));
+ {$IFNDEF PS_NOWIDESTRING} btWideChar: tbts32(var1^) := tbts32(var1^) + Ord(tbtwidechar(var2^));{$ENDIF}
+ btVariant: tbts32(var1^) := tbts32(var1^) + Variant(var2^);
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+ end;
+ {$IFNDEF PS_NOINT64}
+ btS64: tbts64(var1^) := tbts64(var1^) + PSGetInt64(var2, var2type);
+ {$ENDIF}
+ btSingle:
+ begin
+ if var2type.BaseType = btPointer then
+ begin
+ var2type := PIFTypeRec(Pointer(IPointer(var2)+4)^);
+ var2 := Pointer(var2^);
+ if (var2 = nil) or (var2type = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case var2type.BaseType of
+ btU8: tbtsingle(var1^) := tbtsingle(var1^) + tbtu8(var2^);
+ btS8: tbtsingle(var1^) := tbtsingle(var1^) + tbts8(var2^);
+ btU16: tbtsingle(var1^) := tbtsingle(var1^) + tbtu16(var2^);
+ btS16: tbtsingle(var1^) := tbtsingle(var1^) + tbts16(var2^);
+ btU32: tbtsingle(var1^) := tbtsingle(var1^) + tbtu32(var2^);
+ btS32: tbtsingle(var1^) := tbtsingle(var1^) + tbts32(var2^);
+ {$IFNDEF PS_NOINT64} btS64: tbtsingle(var1^) := tbtsingle(var1^) + tbts64(var2^);{$ENDIF}
+ btSingle: tbtsingle(var1^) := tbtsingle(var1^) + tbtsingle(var2^);
+ btDouble: tbtsingle(var1^) := tbtsingle(var1^) + tbtdouble(var2^);
+ btExtended: tbtsingle(var1^) := tbtsingle(var1^) + tbtextended(var2^);
+ btCurrency: tbtsingle(var1^) := tbtsingle(var1^) + tbtcurrency(var2^);
+ btVariant: tbtsingle(var1^) := tbtsingle(var1^) + Variant(var2^);
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+ end;
+ btDouble:
+ begin
+ if var2type.BaseType = btPointer then
+ begin
+ var2type := PIFTypeRec(Pointer(IPointer(var2)+4)^);
+ var2 := Pointer(var2^);
+ if (var2 = nil) or (var2type = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case var2type.BaseType of
+ btU8: tbtdouble(var1^) := tbtdouble(var1^) + tbtu8(var2^);
+ btS8: tbtdouble(var1^) := tbtdouble(var1^) + tbts8(var2^);
+ btU16: tbtdouble(var1^) := tbtdouble(var1^) + tbtu16(var2^);
+ btS16: tbtdouble(var1^) := tbtdouble(var1^) + tbts16(var2^);
+ btU32: tbtdouble(var1^) := tbtdouble(var1^) + tbtu32(var2^);
+ btS32: tbtdouble(var1^) := tbtdouble(var1^) + tbts32(var2^);
+ {$IFNDEF PS_NOINT64} btS64: tbtdouble(var1^) := tbtdouble(var1^) + tbts64(var2^);{$ENDIF}
+ btSingle: tbtdouble(var1^) := tbtdouble(var1^) + tbtsingle(var2^);
+ btDouble: tbtdouble(var1^) := tbtdouble(var1^) + tbtdouble(var2^);
+ btExtended: tbtdouble(var1^) := tbtdouble(var1^) + tbtextended(var2^);
+ btCurrency: tbtdouble(var1^) := tbtdouble(var1^) + tbtcurrency(var2^);
+ btVariant: tbtdouble(var1^) := tbtdouble(var1^) + Variant(var2^);
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+ end;
+ btCurrency:
+ begin
+ if var2type.BaseType = btPointer then
+ begin
+ var2type := PIFTypeRec(Pointer(IPointer(var2)+4)^);
+ var2 := Pointer(var2^);
+ if (var2 = nil) or (var2type = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case var2type.BaseType of
+ btU8: tbtcurrency(var1^) := tbtcurrency(var1^) + tbtu8(var2^);
+ btS8: tbtcurrency(var1^) := tbtcurrency(var1^) + tbts8(var2^);
+ btU16: tbtcurrency(var1^) := tbtcurrency(var1^) + tbtu16(var2^);
+ btS16: tbtcurrency(var1^) := tbtcurrency(var1^) + tbts16(var2^);
+ btU32: tbtcurrency(var1^) := tbtdouble(var1^) + tbtu32(var2^);
+ btS32: tbtcurrency(var1^) := tbtcurrency(var1^) + tbts32(var2^);
+ {$IFNDEF PS_NOINT64} btS64: tbtcurrency(var1^) := tbtdouble(var1^) + tbts64(var2^);{$ENDIF}
+ btSingle: tbtcurrency(var1^) := tbtcurrency(var1^) + tbtsingle(var2^);
+ btDouble: tbtcurrency(var1^) := tbtcurrency(var1^) + tbtdouble(var2^);
+ btExtended: tbtcurrency(var1^) := tbtcurrency(var1^) + tbtextended(var2^);
+ btCurrency: tbtcurrency(var1^) := tbtcurrency(var1^) + tbtcurrency(var2^);
+ btVariant: tbtcurrency(var1^) := tbtcurrency(var1^) + Variant(var2^);
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+ end;
+ btExtended:
+ begin
+ if var2type.BaseType = btPointer then
+ begin
+ var2type := PIFTypeRec(Pointer(IPointer(var2)+4)^);
+ var2 := Pointer(var2^);
+ if (var2 = nil) or (var2type = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case var2type.BaseType of
+ btU8: tbtextended(var1^) := tbtextended(var1^) + tbtu8(var2^);
+ btS8: tbtextended(var1^) := tbtextended(var1^) + tbts8(var2^);
+ btU16: tbtextended(var1^) := tbtextended(var1^) + tbtu16(var2^);
+ btS16: tbtextended(var1^) := tbtextended(var1^) + tbts16(var2^);
+ btU32: tbtextended(var1^) := tbtextended(var1^) + tbtu32(var2^);
+ btS32: tbtextended(var1^) := tbtextended(var1^) + tbts32(var2^);
+ {$IFNDEF PS_NOINT64} btS64: tbtextended(var1^) := tbtextended(var1^) + tbts64(var2^);{$ENDIF}
+ btSingle: tbtextended(var1^) := tbtextended(var1^) + tbtsingle(var2^);
+ btDouble: tbtextended(var1^) := tbtextended(var1^) + tbtdouble(var2^);
+ btExtended: tbtextended(var1^) := tbtextended(var1^) + tbtextended(var2^);
+ btCurrency: tbtextended(var1^) := tbtextended(var1^) + tbtcurrency(var2^);
+ btVariant: tbtextended(var1^) := tbtextended(var1^) + Variant(var2^);
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+ end;
+ btPchar, btString: tbtstring(var1^) := tbtstring(var1^) + PSGetString(Var2, var2type);
+ btChar: tbtchar(var1^) := char(ord(tbtchar(var1^)) + PSGetUInt(Var2, var2type));
+ {$IFNDEF PS_NOWIDESTRING}
+ btWideChar: tbtwidechar(var1^) := widechar(ord(tbtwidechar(var1^)) + PSGetUInt(Var2, var2type));
+ btWideString: tbtwidestring(var1^) := tbtwidestring(var1^) + PSGetWideString(Var2, var2type);
+ {$ENDIF}
+ btVariant:
+ begin
+ if not IntPIFVariantToVariant(var2, var2type, tvar) then
+ begin
+ Result := false;
+ end else
+ Variant(var1^) := Variant(var1^) + tvar;
+ end;
+ btSet:
+ begin
+ if var1Type = var2Type then
+ begin
+ Set_Union(var1, var2, TPSTypeRec_Set(var1Type).aByteSize);
+ end else result := False;
+ end;
+
+ else begin
+ CMD_Err(erTypeMismatch);
+ exit;
+ end;
+ end;
+ if not Result then begin
+ CMD_Err(erTypeMismatch);
+ exit;
+ end;
+ end;
+ 1: begin { - }
+ case var1Type.BaseType of
+ btU8: tbtU8(var1^) := tbtU8(var1^) - PSGetUInt(Var2, var2type);
+ btS8: tbts8(var1^) := tbts8(var1^) - PSGetInt(Var2, var2type);
+ btU16: tbtU16(var1^) := tbtU16(var1^) - PSGetUInt(Var2, var2type);
+ btS16: tbts16(var1^) := tbts16(var1^) - PSGetInt(Var2, var2type);
+ btU32:
+ begin
+ if var2type.BaseType = btPointer then
+ begin
+ var2type := PIFTypeRec(Pointer(IPointer(var2)+4)^);
+ var2 := Pointer(var2^);
+ if (var2 = nil) or (var2type = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case var2type.BaseType of
+ btU8: tbtU32(var1^) := tbtU32(var1^) - tbtu8(var2^);
+ btS8: tbtU32(var1^) := tbtU32(var1^) - cardinal(longint(tbts8(var2^)));
+ btU16: tbtU32(var1^) := tbtU32(var1^) - tbtu16(var2^);
+ btS16: tbtU32(var1^) := tbtU32(var1^) - cardinal(longint(tbts16(var2^)));
+ btU32: tbtU32(var1^) := tbtU32(var1^) - tbtu32(var2^);
+ btS32: tbtU32(var1^) := tbtU32(var1^) - cardinal(tbts32(var2^));
+ {$IFNDEF PS_NOINT64} btS64: tbtU32(var1^) := tbtU32(var1^) - tbts64(var2^);{$ENDIF}
+ btChar: tbtU32(var1^) := tbtU32(var1^) - Ord(tbtchar(var2^));
+ {$IFNDEF PS_NOWIDESTRING} btWideChar: tbtU32(var1^) := tbtU32(var1^) - Ord(tbtwidechar(var2^));{$ENDIF}
+ btVariant: tbtU32(var1^) := tbtU32(var1^) - Variant(var2^);
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+ end;
+ btS32:
+ begin
+ if var2type.BaseType = btPointer then
+ begin
+ var2type := PIFTypeRec(Pointer(IPointer(var2)+4)^);
+ var2 := Pointer(var2^);
+ if (var2 = nil) or (var2type = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case var2type.BaseType of
+ btU8: tbts32(var1^) := tbts32(var1^) - tbtu8(var2^);
+ btS8: tbts32(var1^) := tbts32(var1^) - tbts8(var2^);
+ btU16: tbts32(var1^) := tbts32(var1^) - tbtu16(var2^);
+ btS16: tbts32(var1^) := tbts32(var1^) - tbts16(var2^);
+ btU32: tbts32(var1^) := tbts32(var1^) - Longint(tbtu32(var2^));
+ btS32: tbts32(var1^) := tbts32(var1^) - tbts32(var2^);
+ {$IFNDEF PS_NOINT64} btS64: tbts32(var1^) := tbts32(var1^) - tbts64(var2^);{$ENDIF}
+ btChar: tbts32(var1^) := tbts32(var1^) - Ord(tbtchar(var2^));
+ {$IFNDEF PS_NOWIDESTRING} btWideChar: tbts32(var1^) := tbts32(var1^) - Ord(tbtwidechar(var2^));{$ENDIF}
+ btVariant: tbts32(var1^) := tbts32(var1^) - Variant(var2^);
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+ end;
+ {$IFNDEF PS_NOINT64}
+ btS64: tbts64(var1^) := tbts64(var1^) - PSGetInt64(var2, var2type);
+ {$ENDIF}
+ btSingle:
+ begin
+ if var2type.BaseType = btPointer then
+ begin
+ var2type := PIFTypeRec(Pointer(IPointer(var2)+4)^);
+ var2 := Pointer(var2^);
+ if (var2 = nil) or (var2type = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case var2type.BaseType of
+ btU8: tbtsingle(var1^) := tbtsingle(var1^) - tbtu8(var2^);
+ btS8: tbtsingle(var1^) := tbtsingle(var1^) - tbts8(var2^);
+ btU16: tbtsingle(var1^) := tbtsingle(var1^) - tbtu16(var2^);
+ btS16: tbtsingle(var1^) := tbtsingle(var1^) - tbts16(var2^);
+ btU32: tbtsingle(var1^) := tbtsingle(var1^) - tbtu32(var2^);
+ btS32: tbtsingle(var1^) := tbtsingle(var1^) - tbts32(var2^);
+ {$IFNDEF PS_NOINT64} btS64: tbtsingle(var1^) := tbtsingle(var1^) - tbts64(var2^);{$ENDIF}
+ btSingle: tbtsingle(var1^) := tbtsingle(var1^) - tbtsingle(var2^);
+ btDouble: tbtsingle(var1^) := tbtsingle(var1^) - tbtdouble(var2^);
+ btExtended: tbtsingle(var1^) := tbtsingle(var1^) - tbtextended(var2^);
+ btCurrency: tbtsingle(var1^) := tbtsingle(var1^) - tbtcurrency(var2^);
+ btVariant: tbtsingle(var1^) := tbtsingle(var1^) - Variant(var2^);
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+ end;
+ btCurrency:
+ begin
+ if var2type.BaseType = btPointer then
+ begin
+ var2type := PIFTypeRec(Pointer(IPointer(var2)+4)^);
+ var2 := Pointer(var2^);
+ if (var2 = nil) or (var2type = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case var2type.BaseType of
+ btU8: tbtcurrency(var1^) := tbtcurrency(var1^) - tbtu8(var2^);
+ btS8: tbtcurrency(var1^) := tbtcurrency(var1^) - tbts8(var2^);
+ btU16: tbtcurrency(var1^) := tbtcurrency(var1^) - tbtu16(var2^);
+ btS16: tbtcurrency(var1^) := tbtcurrency(var1^) - tbts16(var2^);
+ btU32: tbtcurrency(var1^) := tbtdouble(var1^) - tbtu32(var2^);
+ btS32: tbtcurrency(var1^) := tbtcurrency(var1^) - tbts32(var2^);
+ {$IFNDEF PS_NOINT64} btS64: tbtcurrency(var1^) := tbtdouble(var1^) - tbts64(var2^);{$ENDIF}
+ btSingle: tbtcurrency(var1^) := tbtcurrency(var1^) - tbtsingle(var2^);
+ btDouble: tbtcurrency(var1^) := tbtcurrency(var1^) - tbtdouble(var2^);
+ btExtended: tbtcurrency(var1^) := tbtcurrency(var1^) - tbtextended(var2^);
+ btCurrency: tbtcurrency(var1^) := tbtcurrency(var1^) - tbtcurrency(var2^);
+ btVariant: tbtcurrency(var1^) := tbtcurrency(var1^) - Variant(var2^);
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+ end;
+ btDouble:
+ begin
+ if var2type.BaseType = btPointer then
+ begin
+ var2type := PIFTypeRec(Pointer(IPointer(var2)+4)^);
+ var2 := Pointer(var2^);
+ if (var2 = nil) or (var2type = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case var2type.BaseType of
+ btU8: tbtdouble(var1^) := tbtdouble(var1^) - tbtu8(var2^);
+ btS8: tbtdouble(var1^) := tbtdouble(var1^) - tbts8(var2^);
+ btU16: tbtdouble(var1^) := tbtdouble(var1^) - tbtu16(var2^);
+ btS16: tbtdouble(var1^) := tbtdouble(var1^) - tbts16(var2^);
+ btU32: tbtdouble(var1^) := tbtdouble(var1^) - tbtu32(var2^);
+ btS32: tbtdouble(var1^) := tbtdouble(var1^) - tbts32(var2^);
+ {$IFNDEF PS_NOINT64} btS64: tbtdouble(var1^) := tbtdouble(var1^) - tbts64(var2^);{$ENDIF}
+ btSingle: tbtdouble(var1^) := tbtdouble(var1^) - tbtsingle(var2^);
+ btDouble: tbtdouble(var1^) := tbtdouble(var1^) - tbtdouble(var2^);
+ btExtended: tbtdouble(var1^) := tbtdouble(var1^) - tbtextended(var2^);
+ btCurrency: tbtdouble(var1^) := tbtdouble(var1^) - tbtcurrency(var2^);
+ btVariant: tbtdouble(var1^) := tbtdouble(var1^) - Variant(var2^);
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+ end;
+ btExtended:
+ begin
+ if var2type.BaseType = btPointer then
+ begin
+ var2type := PIFTypeRec(Pointer(IPointer(var2)+4)^);
+ var2 := Pointer(var2^);
+ if (var2 = nil) or (var2type = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case var2type.BaseType of
+ btU8: tbtextended(var1^) := tbtextended(var1^) - tbtu8(var2^);
+ btS8: tbtextended(var1^) := tbtextended(var1^) - tbts8(var2^);
+ btU16: tbtextended(var1^) := tbtextended(var1^) - tbtu16(var2^);
+ btS16: tbtextended(var1^) := tbtextended(var1^) - tbts16(var2^);
+ btU32: tbtextended(var1^) := tbtextended(var1^) - tbtu32(var2^);
+ btS32: tbtextended(var1^) := tbtextended(var1^) - tbts32(var2^);
+ {$IFNDEF PS_NOINT64} btS64: tbtextended(var1^) := tbtextended(var1^) -+tbts64(var2^);{$ENDIF}
+ btSingle: tbtextended(var1^) := tbtextended(var1^) - tbtsingle(var2^);
+ btDouble: tbtextended(var1^) := tbtextended(var1^) - tbtdouble(var2^);
+ btExtended: tbtextended(var1^) := tbtextended(var1^) - tbtextended(var2^);
+ btCurrency: tbtextended(var1^) := tbtextended(var1^) - tbtcurrency(var2^);
+ btVariant: tbtextended(var1^) := tbtextended(var1^) - Variant(var2^);
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+ end;
+ btChar: tbtchar(var1^):= char(ord(tbtchar(var1^)) - PSGetUInt(Var2, var2type));
+ {$IFNDEF PS_NOWIDESTRING}
+ btWideChar: tbtwidechar(var1^) := widechar(ord(tbtwidechar(var1^)) - PSGetUInt(Var2, var2type));
+ {$ENDIF}
+ btVariant:
+ begin
+ if not IntPIFVariantToVariant(var2, var2type, tvar) then
+ begin
+ Result := false;
+ end else
+ Variant(var1^) := Variant(var1^) - tvar;
+ end;
+ btSet:
+ begin
+ if var1Type = var2Type then
+ begin
+ Set_Diff(var1, var2, TPSTypeRec_Set(var1Type).aByteSize);
+ end else result := False;
+ end;
+ else begin
+ CMD_Err(erTypeMismatch);
+ exit;
+ end;
+ end;
+ if not Result then begin
+ CMD_Err(erTypeMismatch);
+ exit;
+ end;
+ end;
+ 2: begin { * }
+ case var1Type.BaseType of
+ btU8: tbtU8(var1^) := tbtU8(var1^) * PSGetUInt(Var2, var2type);
+ btS8: tbts8(var1^) := tbts8(var1^) * PSGetInt(Var2, var2type);
+ btU16: tbtU16(var1^) := tbtU16(var1^) * PSGetUInt(Var2, var2type);
+ btS16: tbts16(var1^) := tbts16(var1^) * PSGetInt(Var2, var2type);
+ btU32:
+ begin
+ if var2type.BaseType = btPointer then
+ begin
+ var2type := PIFTypeRec(Pointer(IPointer(var2)+4)^);
+ var2 := Pointer(var2^);
+ if (var2 = nil) or (var2type = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case var2type.BaseType of
+ btU8: tbtU32(var1^) := tbtU32(var1^) * tbtu8(var2^);
+ btS8: tbtU32(var1^) := tbtU32(var1^) * cardinal(longint(tbts8(var2^)));
+ btU16: tbtU32(var1^) := tbtU32(var1^) * tbtu16(var2^);
+ btS16: tbtU32(var1^) := tbtU32(var1^) * cardinal(longint(tbts16(var2^)));
+ btU32: tbtU32(var1^) := tbtU32(var1^) * tbtu32(var2^);
+ btS32: tbtU32(var1^) := tbtU32(var1^) * cardinal(tbts32(var2^));
+ {$IFNDEF PS_NOINT64} btS64: tbtU32(var1^) := tbtU32(var1^) * tbts64(var2^);{$ENDIF}
+ btChar: tbtU32(var1^) := tbtU32(var1^) * Ord(tbtchar(var2^));
+ {$IFNDEF PS_NOWIDESTRING} btWideChar: tbtU32(var1^) := tbtU32(var1^) * Ord(tbtwidechar(var2^));{$ENDIF}
+ btVariant: tbtU32(var1^) := tbtU32(var1^) * Variant(var2^);
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+ end;
+ btS32:
+ begin
+ if var2type.BaseType = btPointer then
+ begin
+ var2type := PIFTypeRec(Pointer(IPointer(var2)+4)^);
+ var2 := Pointer(var2^);
+ if (var2 = nil) or (var2type = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case var2type.BaseType of
+ btU8: tbts32(var1^) := tbts32(var1^) * tbtu8(var2^);
+ btS8: tbts32(var1^) := tbts32(var1^) * tbts8(var2^);
+ btU16: tbts32(var1^) := tbts32(var1^) * tbtu16(var2^);
+ btS16: tbts32(var1^) := tbts32(var1^) * tbts16(var2^);
+ btU32: tbts32(var1^) := tbts32(var1^) * Longint(tbtu32(var2^));
+ btS32: tbts32(var1^) := tbts32(var1^) * tbts32(var2^);
+ {$IFNDEF PS_NOINT64} btS64: tbts32(var1^) := tbts32(var1^) * tbts64(var2^);{$ENDIF}
+ btChar: tbts32(var1^) := tbts32(var1^) * Ord(tbtchar(var2^));
+ {$IFNDEF PS_NOWIDESTRING} btWideChar: tbts32(var1^) := tbts32(var1^) * Ord(tbtwidechar(var2^));{$ENDIF}
+ btVariant: tbts32(var1^) := tbts32(var1^) * Variant(var2^);
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+ end;
+ {$IFNDEF PS_NOINT64}
+ btS64: tbts64(var1^) := tbts64(var1^) * PSGetInt64(var2, var2type);
+ {$ENDIF}
+ btCurrency:
+ begin
+ if var2type.BaseType = btPointer then
+ begin
+ var2type := PIFTypeRec(Pointer(IPointer(var2)+4)^);
+ var2 := Pointer(var2^);
+ if (var2 = nil) or (var2type = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case var2type.BaseType of
+ btU8: tbtcurrency(var1^) := tbtcurrency(var1^) * tbtu8(var2^);
+ btS8: tbtcurrency(var1^) := tbtcurrency(var1^) * tbts8(var2^);
+ btU16: tbtcurrency(var1^) := tbtcurrency(var1^) * tbtu16(var2^);
+ btS16: tbtcurrency(var1^) := tbtcurrency(var1^) * tbts16(var2^);
+ btU32: tbtcurrency(var1^) := tbtdouble(var1^) * tbtu32(var2^);
+ btS32: tbtcurrency(var1^) := tbtcurrency(var1^) * tbts32(var2^);
+ {$IFNDEF PS_NOINT64} btS64: tbtcurrency(var1^) := tbtdouble(var1^) * tbts64(var2^);{$ENDIF}
+ btSingle: tbtcurrency(var1^) := tbtcurrency(var1^) * tbtsingle(var2^);
+ btDouble: tbtcurrency(var1^) := tbtcurrency(var1^) * tbtdouble(var2^);
+ btExtended: tbtcurrency(var1^) := tbtcurrency(var1^) * tbtextended(var2^);
+ btCurrency: tbtcurrency(var1^) := tbtcurrency(var1^) * tbtcurrency(var2^);
+ btVariant: tbtcurrency(var1^) := tbtcurrency(var1^) * Variant(var2^);
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+ end;
+ btSingle:
+ begin
+ if var2type.BaseType = btPointer then
+ begin
+ var2type := PIFTypeRec(Pointer(IPointer(var2)+4)^);
+ var2 := Pointer(var2^);
+ if (var2 = nil) or (var2type = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case var2type.BaseType of
+ btU8: tbtsingle(var1^) := tbtsingle(var1^) *tbtu8(var2^);
+ btS8: tbtsingle(var1^) := tbtsingle(var1^) *tbts8(var2^);
+ btU16: tbtsingle(var1^) := tbtsingle(var1^) *tbtu16(var2^);
+ btS16: tbtsingle(var1^) := tbtsingle(var1^) *tbts16(var2^);
+ btU32: tbtsingle(var1^) := tbtsingle(var1^) *tbtu32(var2^);
+ btS32: tbtsingle(var1^) := tbtsingle(var1^) *tbts32(var2^);
+ {$IFNDEF PS_NOINT64} btS64: tbtsingle(var1^) := tbtsingle(var1^) *tbts64(var2^);{$ENDIF}
+ btSingle: tbtsingle(var1^) := tbtsingle(var1^) *tbtsingle(var2^);
+ btDouble: tbtsingle(var1^) := tbtsingle(var1^) *tbtdouble(var2^);
+ btExtended: tbtsingle(var1^) := tbtsingle(var1^) *tbtextended(var2^);
+ btCurrency: tbtsingle(var1^) := tbtsingle(var1^) *tbtcurrency(var2^);
+ btVariant: tbtsingle(var1^) := tbtsingle(var1^) * Variant(var2^);
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+ end;
+ btDouble:
+ begin
+ if var2type.BaseType = btPointer then
+ begin
+ var2type := PIFTypeRec(Pointer(IPointer(var2)+4)^);
+ var2 := Pointer(var2^);
+ if (var2 = nil) or (var2type = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case var2type.BaseType of
+ btU8: tbtdouble(var1^) := tbtdouble(var1^) *tbtu8(var2^);
+ btS8: tbtdouble(var1^) := tbtdouble(var1^) *tbts8(var2^);
+ btU16: tbtdouble(var1^) := tbtdouble(var1^) *tbtu16(var2^);
+ btS16: tbtdouble(var1^) := tbtdouble(var1^) *tbts16(var2^);
+ btU32: tbtdouble(var1^) := tbtdouble(var1^) *tbtu32(var2^);
+ btS32: tbtdouble(var1^) := tbtdouble(var1^) *tbts32(var2^);
+ {$IFNDEF PS_NOINT64} btS64: tbtdouble(var1^) := tbtdouble(var1^) *tbts64(var2^);{$ENDIF}
+ btSingle: tbtdouble(var1^) := tbtdouble(var1^) *tbtsingle(var2^);
+ btDouble: tbtdouble(var1^) := tbtdouble(var1^) *tbtdouble(var2^);
+ btExtended: tbtdouble(var1^) := tbtdouble(var1^) *tbtextended(var2^);
+ btCurrency: tbtdouble(var1^) := tbtdouble(var1^) *tbtcurrency(var2^);
+ btVariant: tbtdouble(var1^) := tbtdouble(var1^) * Variant(var2^);
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+ end;
+ btExtended:
+ begin
+ if var2type.BaseType = btPointer then
+ begin
+ var2type := PIFTypeRec(Pointer(IPointer(var2)+4)^);
+ var2 := Pointer(var2^);
+ if (var2 = nil) or (var2type = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case var2type.BaseType of
+ btU8: tbtextended(var1^) := tbtextended(var1^) *tbtu8(var2^);
+ btS8: tbtextended(var1^) := tbtextended(var1^) *tbts8(var2^);
+ btU16: tbtextended(var1^) := tbtextended(var1^) *tbtu16(var2^);
+ btS16: tbtextended(var1^) := tbtextended(var1^) *tbts16(var2^);
+ btU32: tbtextended(var1^) := tbtextended(var1^) *tbtu32(var2^);
+ btS32: tbtextended(var1^) := tbtextended(var1^) *tbts32(var2^);
+ {$IFNDEF PS_NOINT64} btS64: tbtextended(var1^) := tbtextended(var1^) *tbts64(var2^);{$ENDIF}
+ btSingle: tbtextended(var1^) := tbtextended(var1^) *tbtsingle(var2^);
+ btDouble: tbtextended(var1^) := tbtextended(var1^) *tbtdouble(var2^);
+ btExtended: tbtextended(var1^) := tbtextended(var1^) *tbtextended(var2^);
+ btCurrency: tbtextended(var1^) := tbtextended(var1^) *tbtcurrency(var2^);
+ btVariant: tbtextended(var1^) := tbtextended(var1^) * Variant(var2^);
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+ end;
+ btVariant:
+ begin
+ if not IntPIFVariantToVariant(var2, var2type, tvar) then
+ begin
+ Result := false;
+ end else
+ Variant(var1^) := Variant(var1^) * tvar;
+ end;
+ btSet:
+ begin
+ if var1Type = var2Type then
+ begin
+ Set_Intersect(var1, var2, TPSTypeRec_Set(var1Type).aByteSize);
+ end else result := False;
+ end;
+ else begin
+ CMD_Err(erTypeMismatch);
+ exit;
+ end;
+ end;
+ if not Result then begin
+ CMD_Err(erTypeMismatch);
+ exit;
+ end;
+ end;
+ 3: begin { / }
+ case var1Type.BaseType of
+ btU8: tbtU8(var1^) := tbtU8(var1^) div PSGetUInt(Var2, var2type);
+ btS8: tbts8(var1^) := tbts8(var1^) div PSGetInt(Var2, var2type);
+ btU16: tbtU16(var1^) := tbtU16(var1^) div PSGetUInt(Var2, var2type);
+ btS16: tbts16(var1^) := tbts16(var1^) div PSGetInt(Var2, var2type);
+ btU32:
+ begin
+ if var2type.BaseType = btPointer then
+ begin
+ var2type := PIFTypeRec(Pointer(IPointer(var2)+4)^);
+ var2 := Pointer(var2^);
+ if (var2 = nil) or (var2type = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case var2type.BaseType of
+ btU8: tbtU32(var1^) := tbtU32(var1^) div tbtu8(var2^);
+ btS8: tbtU32(var1^) := tbtU32(var1^) div cardinal(longint(tbts8(var2^)));
+ btU16: tbtU32(var1^) := tbtU32(var1^) div tbtu16(var2^);
+ btS16: tbtU32(var1^) := tbtU32(var1^) div cardinal(longint(tbts16(var2^)));
+ btU32: tbtU32(var1^) := tbtU32(var1^) div tbtu32(var2^);
+ btS32: tbtU32(var1^) := tbtU32(var1^) div cardinal(tbts32(var2^));
+ {$IFNDEF PS_NOINT64} btS64: tbtU32(var1^) := tbtU32(var1^) div tbts64(var2^);{$ENDIF}
+ btChar: tbtU32(var1^) := tbtU32(var1^) div Ord(tbtchar(var2^));
+ {$IFNDEF PS_NOWIDESTRING} btWideChar: tbtU32(var1^) := tbtU32(var1^) div Ord(tbtwidechar(var2^));{$ENDIF}
+ btVariant: tbtU32(var1^) := tbtU32(var1^) div Variant(var2^);
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+ end;
+ btS32:
+ begin
+ if var2type.BaseType = btPointer then
+ begin
+ var2type := PIFTypeRec(Pointer(IPointer(var2)+4)^);
+ var2 := Pointer(var2^);
+ if (var2 = nil) or (var2type = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case var2type.BaseType of
+ btU8: tbts32(var1^) := tbts32(var1^) div tbtu8(var2^);
+ btS8: tbts32(var1^) := tbts32(var1^) div tbts8(var2^);
+ btU16: tbts32(var1^) := tbts32(var1^) div tbtu16(var2^);
+ btS16: tbts32(var1^) := tbts32(var1^) div tbts16(var2^);
+ btU32: tbts32(var1^) := tbts32(var1^) div Longint(tbtu32(var2^));
+ btS32: tbts32(var1^) := tbts32(var1^) div tbts32(var2^);
+ {$IFNDEF PS_NOINT64} btS64: tbts32(var1^) := tbts32(var1^) div tbts64(var2^);{$ENDIF}
+ btChar: tbts32(var1^) := tbts32(var1^) div Ord(tbtchar(var2^));
+ {$IFNDEF PS_NOWIDESTRING} btWideChar: tbts32(var1^) := tbts32(var1^) div Ord(tbtwidechar(var2^));{$ENDIF}
+ btVariant: tbts32(var1^) := tbts32(var1^) div Variant(var2^);
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+ end;
+ {$IFNDEF PS_NOINT64}
+ btS64: tbts64(var1^) := tbts64(var1^) div PSGetInt64(var2, var2type);
+ {$ENDIF}
+ btSingle:
+ begin
+ if var2type.BaseType = btPointer then
+ begin
+ var2type := PIFTypeRec(Pointer(IPointer(var2)+4)^);
+ var2 := Pointer(var2^);
+ if (var2 = nil) or (var2type = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case var2type.BaseType of
+ btU8: tbtsingle(var1^) := tbtsingle(var1^) / tbtu8(var2^);
+ btS8: tbtsingle(var1^) := tbtsingle(var1^) / tbts8(var2^);
+ btU16: tbtsingle(var1^) := tbtsingle(var1^) / tbtu16(var2^);
+ btS16: tbtsingle(var1^) := tbtsingle(var1^) / tbts16(var2^);
+ btU32: tbtsingle(var1^) := tbtsingle(var1^) / tbtu32(var2^);
+ btS32: tbtsingle(var1^) := tbtsingle(var1^) / tbts32(var2^);
+ {$IFNDEF PS_NOINT64} btS64: tbtsingle(var1^) := tbtsingle(var1^) / tbts64(var2^);{$ENDIF}
+ btSingle: tbtsingle(var1^) := tbtsingle(var1^) / tbtsingle(var2^);
+ btDouble: tbtsingle(var1^) := tbtsingle(var1^) / tbtdouble(var2^);
+ btExtended: tbtsingle(var1^) := tbtsingle(var1^) / tbtextended(var2^);
+ btCurrency: tbtsingle(var1^) := tbtsingle(var1^) / tbtcurrency(var2^);
+ btVariant: tbtsingle(var1^) := tbtsingle(var1^) / Variant(var2^);
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+ end;
+ btCurrency:
+ begin
+ if var2type.BaseType = btPointer then
+ begin
+ var2type := PIFTypeRec(Pointer(IPointer(var2)+4)^);
+ var2 := Pointer(var2^);
+ if (var2 = nil) or (var2type = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case var2type.BaseType of
+ btU8: tbtcurrency(var1^) := tbtcurrency(var1^) / tbtu8(var2^);
+ btS8: tbtcurrency(var1^) := tbtcurrency(var1^) / tbts8(var2^);
+ btU16: tbtcurrency(var1^) := tbtcurrency(var1^) / tbtu16(var2^);
+ btS16: tbtcurrency(var1^) := tbtcurrency(var1^) / tbts16(var2^);
+ btU32: tbtcurrency(var1^) := tbtdouble(var1^) / tbtu32(var2^);
+ btS32: tbtcurrency(var1^) := tbtcurrency(var1^) / tbts32(var2^);
+ {$IFNDEF PS_NOINT64} btS64: tbtcurrency(var1^) := tbtdouble(var1^) / tbts64(var2^);{$ENDIF}
+ btSingle: tbtcurrency(var1^) := tbtcurrency(var1^) / tbtsingle(var2^);
+ btDouble: tbtcurrency(var1^) := tbtcurrency(var1^) / tbtdouble(var2^);
+ btExtended: tbtcurrency(var1^) := tbtcurrency(var1^) / tbtextended(var2^);
+ btCurrency: tbtcurrency(var1^) := tbtcurrency(var1^) / tbtcurrency(var2^);
+ btVariant: tbtcurrency(var1^) := tbtcurrency(var1^) / Variant(var2^);
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+ end;
+ btDouble:
+ begin
+ if var2type.BaseType = btPointer then
+ begin
+ var2type := PIFTypeRec(Pointer(IPointer(var2)+4)^);
+ var2 := Pointer(var2^);
+ if (var2 = nil) or (var2type = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case var2type.BaseType of
+ btU8: tbtdouble(var1^) := tbtdouble(var1^) / tbtu8(var2^);
+ btS8: tbtdouble(var1^) := tbtdouble(var1^) / tbts8(var2^);
+ btU16: tbtdouble(var1^) := tbtdouble(var1^) / tbtu16(var2^);
+ btS16: tbtdouble(var1^) := tbtdouble(var1^) / tbts16(var2^);
+ btU32: tbtdouble(var1^) := tbtdouble(var1^) / tbtu32(var2^);
+ btS32: tbtdouble(var1^) := tbtdouble(var1^) / tbts32(var2^);
+ {$IFNDEF PS_NOINT64} btS64: tbtdouble(var1^) := tbtdouble(var1^) / tbts64(var2^);{$ENDIF}
+ btSingle: tbtdouble(var1^) := tbtdouble(var1^) / tbtsingle(var2^);
+ btDouble: tbtdouble(var1^) := tbtdouble(var1^) / tbtdouble(var2^);
+ btExtended: tbtdouble(var1^) := tbtdouble(var1^) / tbtextended(var2^);
+ btCurrency: tbtdouble(var1^) := tbtdouble(var1^) / tbtcurrency(var2^);
+ btVariant: tbtdouble(var1^) := tbtdouble(var1^) / Variant(var2^);
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+ end;
+ btExtended:
+ begin
+ if var2type.BaseType = btPointer then
+ begin
+ var2type := PIFTypeRec(Pointer(IPointer(var2)+4)^);
+ var2 := Pointer(var2^);
+ if (var2 = nil) or (var2type = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case var2type.BaseType of
+ btU8: tbtextended(var1^) := tbtextended(var1^) / tbtu8(var2^);
+ btS8: tbtextended(var1^) := tbtextended(var1^) / tbts8(var2^);
+ btU16: tbtextended(var1^) := tbtextended(var1^) / tbtu16(var2^);
+ btS16: tbtextended(var1^) := tbtextended(var1^) / tbts16(var2^);
+ btU32: tbtextended(var1^) := tbtextended(var1^) / tbtu32(var2^);
+ btS32: tbtextended(var1^) := tbtextended(var1^) / tbts32(var2^);
+ {$IFNDEF PS_NOINT64} btS64: tbtextended(var1^) := tbtextended(var1^) / tbts64(var2^);{$ENDIF}
+ btSingle: tbtextended(var1^) := tbtextended(var1^) / tbtsingle(var2^);
+ btDouble: tbtextended(var1^) := tbtextended(var1^) / tbtdouble(var2^);
+ btExtended: tbtextended(var1^) := tbtextended(var1^) / tbtextended(var2^);
+ btCurrency: tbtextended(var1^) := tbtextended(var1^) / tbtcurrency(var2^);
+ btVariant: tbtextended(var1^) := tbtextended(var1^) / Variant(var2^);
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+ end;
+ btVariant:
+ begin
+ if not IntPIFVariantToVariant(var2, var2type, tvar) then
+ begin
+ Result := false;
+ end else
+ begin
+ if VarIsFloat(variant(var1^)) then
+ Variant(var1^) := Variant(var1^) / tvar
+ else
+ Variant(var1^) := Variant(var1^) div tvar;
+ end;
+ end;
+ else begin
+ CMD_Err(erTypeMismatch);
+ exit;
+ end;
+ end;
+ if not Result then begin
+ CMD_Err(erTypeMismatch);
+ exit;
+ end;
+ end;
+ 4: begin { MOD }
+ case var1Type.BaseType of
+ btU8: tbtU8(var1^) := tbtU8(var1^) mod PSGetUInt(Var2, var2type);
+ btS8: tbts8(var1^) := tbts8(var1^) mod PSGetInt(Var2, var2type);
+ btU16: tbtU16(var1^) := tbtU16(var1^) mod PSGetUInt(Var2, var2type);
+ btS16: tbts16(var1^) := tbts16(var1^) mod PSGetInt(Var2, var2type);
+ btU32:
+ begin
+ if var2type.BaseType = btPointer then
+ begin
+ var2type := PIFTypeRec(Pointer(IPointer(var2)+4)^);
+ var2 := Pointer(var2^);
+ if (var2 = nil) or (var2type = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case var2type.BaseType of
+ btU8: tbtU32(var1^) := tbtU32(var1^) mod tbtu8(var2^);
+ btS8: tbtU32(var1^) := tbtU32(var1^) mod cardinal(longint(tbts8(var2^)));
+ btU16: tbtU32(var1^) := tbtU32(var1^) mod tbtu16(var2^);
+ btS16: tbtU32(var1^) := tbtU32(var1^) mod cardinal(longint(tbts16(var2^)));
+ btU32: tbtU32(var1^) := tbtU32(var1^) mod tbtu32(var2^);
+ btS32: tbtU32(var1^) := tbtU32(var1^) mod cardinal(tbts32(var2^));
+ {$IFNDEF PS_NOINT64} btS64: tbtU32(var1^) := tbtU32(var1^) mod tbts64(var2^);{$ENDIF}
+ btChar: tbtU32(var1^) := tbtU32(var1^) mod Ord(tbtchar(var2^));
+ {$IFNDEF PS_NOWIDESTRING} btWideChar: tbtU32(var1^) := tbtU32(var1^) mod Ord(tbtwidechar(var2^));{$ENDIF}
+ btVariant: tbtU32(var1^) := tbtU32(var1^) mod Variant(var2^);
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+ end;
+ btS32:
+ begin
+ if var2type.BaseType = btPointer then
+ begin
+ var2type := PIFTypeRec(Pointer(IPointer(var2)+4)^);
+ var2 := Pointer(var2^);
+ if (var2 = nil) or (var2type = nil) then raise Exception.Create(RPS_TypeMismatch);
+ end;
+ case var2type.BaseType of
+ btU8: tbts32(var1^) := tbts32(var1^) mod tbtu8(var2^);
+ btS8: tbts32(var1^) := tbts32(var1^) mod tbts8(var2^);
+ btU16: tbts32(var1^) := tbts32(var1^) mod tbtu16(var2^);
+ btS16: tbts32(var1^) := tbts32(var1^) mod tbts16(var2^);
+ btU32: tbts32(var1^) := tbts32(var1^) mod Longint(tbtu32(var2^));
+ btS32: tbts32(var1^) := tbts32(var1^) mod tbts32(var2^);
+ {$IFNDEF PS_NOINT64} btS64: tbts32(var1^) := tbts32(var1^) mod tbts64(var2^);{$ENDIF}
+ btChar: tbts32(var1^) := tbts32(var1^) mod Ord(tbtchar(var2^));
+ {$IFNDEF PS_NOWIDESTRING} btWideChar: tbts32(var1^) := tbts32(var1^) mod Ord(tbtwidechar(var2^));{$ENDIF}
+ btVariant: tbts32(var1^) := tbts32(var1^) mod Variant(var2^);
+ else raise Exception.Create(RPS_TypeMismatch);
+ end;
+ end;
+ {$IFNDEF PS_NOINT64}
+ btS64: tbts64(var1^) := tbts64(var1^) mod PSGetInt64(var2, var2type);
+ {$ENDIF}
+ btVariant:
+ begin
+ if not IntPIFVariantToVariant(var2, var2type, tvar) then
+ begin
+ Result := false;
+ end else
+ Variant(var1^) := Variant(var1^) mod tvar;
+ end;
+ else begin
+ CMD_Err(erTypeMismatch);
+ exit;
+ end;
+ end;
+ if not Result then begin
+ CMD_Err(erTypeMismatch);
+ exit;
+ end;
+ end;
+ 5: begin { SHL }
+ case var1Type.BaseType of
+ btU8: tbtU8(var1^) := tbtU8(var1^) shl PSGetUInt(Var2, var2type);
+ btS8: tbts8(var1^) := tbts8(var1^) shl PSGetInt(Var2, var2type);
+ btU16: tbtU16(var1^) := tbtU16(var1^) shl PSGetUInt(Var2, var2type);
+ btS16: tbts16(var1^) := tbts16(var1^) shl PSGetInt(Var2, var2type);
+ btU32: tbtU32(var1^) := tbtU32(var1^) shl PSGetUInt(Var2, var2type);
+ btS32: tbts32(var1^) := tbts32(var1^) shl PSGetInt(Var2, var2type);
+ {$IFNDEF PS_NOINT64}
+ btS64: tbts64(var1^) := tbts64(var1^) shl PSGetInt64(var2, var2type);
+ {$ENDIF}
+ btVariant:
+ begin
+ if not IntPIFVariantToVariant(var2, var2type, tvar) then
+ begin
+ Result := false;
+ end else
+ Variant(var1^) := Variant(var1^) shl tvar;
+ end;
+ else begin
+ CMD_Err(erTypeMismatch);
+ exit;
+ end;
+ end;
+ if not Result then begin
+ CMD_Err(erTypeMismatch);
+ exit;
+ end;
+ end;
+ 6: begin { SHR }
+ case var1Type.BaseType of
+ btU8: tbtU8(var1^) := tbtU8(var1^) shr PSGetUInt(Var2, var2type);
+ btS8: tbts8(var1^) := tbts8(var1^) shr PSGetInt(Var2, var2type);
+ btU16: tbtU16(var1^) := tbtU16(var1^) shr PSGetUInt(Var2, var2type);
+ btS16: tbts16(var1^) := tbts16(var1^) shr PSGetInt(Var2, var2type);
+ btU32: tbtU32(var1^) := tbtU32(var1^) shr PSGetUInt(Var2, var2type);
+ btS32: tbts32(var1^) := tbts32(var1^) shr PSGetInt(Var2, var2type);
+ {$IFNDEF PS_NOINT64}
+ btS64: tbts64(var1^) := tbts64(var1^) shr PSGetInt64(var2, var2type);
+ {$ENDIF}
+ btVariant:
+ begin
+ if not IntPIFVariantToVariant(var2, var2type, tvar) then
+ begin
+ Result := false;
+ end else
+ Variant(var1^) := Variant(var1^) shr tvar;
+ end;
+ else begin
+ CMD_Err(erTypeMismatch);
+ exit;
+ end;
+ end;
+ if not Result then begin
+ CMD_Err(erTypeMismatch);
+ exit;
+ end;
+ end;
+ 7: begin { AND }
+ case var1Type.BaseType of
+ btU8: tbtU8(var1^) := tbtU8(var1^) and PSGetUInt(Var2, var2type);
+ btS8: tbts8(var1^) := tbts8(var1^) and PSGetInt(Var2, var2type);
+ btU16: tbtU16(var1^) := tbtU16(var1^) and PSGetUInt(Var2, var2type);
+ btS16: tbts16(var1^) := tbts16(var1^) and PSGetInt(Var2, var2type);
+ btU32: tbtU32(var1^) := tbtU32(var1^) and PSGetUInt(Var2, var2type);
+ btS32: tbts32(var1^) := tbts32(var1^) and PSGetInt(Var2, var2type);
+ {$IFNDEF PS_NOINT64}
+ btS64: tbts64(var1^) := tbts64(var1^) and PSGetInt64(var2, var2type);
+ {$ENDIF}
+ btVariant:
+ begin
+ if not IntPIFVariantToVariant(var2, var2type, tvar) then
+ begin
+ Result := false;
+ end else
+ Variant(var1^) := Variant(var1^) and tvar;
+ end;
+ else begin
+ CMD_Err(erTypeMismatch);
+ exit;
+ end;
+ end;
+ if not Result then begin
+ CMD_Err(erTypeMismatch);
+ exit;
+ end;
+ end;
+ 8: begin { OR }
+ case var1Type.BaseType of
+ btU8: tbtU8(var1^) := tbtU8(var1^) or PSGetUInt(Var2, var2type);
+ btS8: tbts8(var1^) := tbts8(var1^) or PSGetInt(Var2, var2type);
+ btU16: tbtU16(var1^) := tbtU16(var1^) or PSGetUInt(Var2, var2type);
+ btS16: tbts16(var1^) := tbts16(var1^) or PSGetInt(Var2, var2type);
+ btU32: tbtU32(var1^) := tbtU32(var1^) or PSGetUInt(Var2, var2type);
+ btS32: tbts32(var1^) := tbts32(var1^) or PSGetInt(Var2, var2type);
+ {$IFNDEF PS_NOINT64}
+ btS64: tbts64(var1^) := tbts64(var1^) or PSGetInt64(var2, var2type);
+ {$ENDIF}
+ btVariant:
+ begin
+ if not IntPIFVariantToVariant(var2, var2type, tvar) then
+ begin
+ Result := false;
+ end else
+ Variant(var1^) := Variant(var1^) or tvar;
+ end;
+ else begin
+ CMD_Err(erTypeMismatch);
+ exit;
+ end;
+ end;
+ if not Result then begin
+ CMD_Err(erTypeMismatch);
+ exit;
+ end;
+ end;
+ 9: begin { XOR }
+ case var1Type.BaseType of
+ btU8: tbtU8(var1^) := tbtU8(var1^) xor PSGetUInt(Var2, var2type);
+ btS8: tbts8(var1^) := tbts8(var1^) xor PSGetInt(Var2, var2type);
+ btU16: tbtU16(var1^) := tbtU16(var1^) xor PSGetUInt(Var2, var2type);
+ btS16: tbts16(var1^) := tbts16(var1^) xor PSGetInt(Var2, var2type);
+ btU32: tbtU32(var1^) := tbtU32(var1^) xor PSGetUInt(Var2, var2type);
+ btS32: tbts32(var1^) := tbts32(var1^) xor PSGetInt(Var2, var2type);
+ {$IFNDEF PS_NOINT64}
+ btS64: tbts64(var1^) := tbts64(var1^) xor PSGetInt64(var2, var2type);
+ {$ENDIF}
+ btVariant:
+ begin
+ if not IntPIFVariantToVariant(var2, var2type, tvar) then
+ begin
+ Result := false;
+ end else
+ Variant(var1^) := Variant(var1^) xor tvar;
+ end;
+ else begin
+ CMD_Err(erTypeMismatch);
+ exit;
+ end;
+ end;
+ if not Result then begin
+ CMD_Err(erTypeMismatch);
+ exit;
+ end;
+ end;
+ 10:
+ begin // as
+ case var1Type.BaseType of
+ btClass:
+ begin
+ if var2type.BaseType <> btU32 then
+ Result := False
+ else
+ begin
+ var2type := FTypes[tbtu32(var2^)];
+ if (var2type = nil) or (var2type.BaseType <> btClass) then
+ Result := false
+ else
+ begin
+ if not Class_IS(Self, TObject(var1^), var2type) then
+ Result := false
+ end;
+ end;
+ end;
+ else begin
+ CMD_Err(erTypeMismatch);
+ exit;
+ end;
+ end;
+ if not Result then begin
+ CMD_Err(erTypeMismatch);
+ exit;
+ end;
+ end;
+ else begin
+ Result := False;
+ CMD_Err(erInvalidOpcodeParameter);
+ exit;
+ end;
+ end;
+ except
+ {$IFDEF DELPHI6UP}
+ Tmp := AcquireExceptionObject;
+ {$ELSE}
+ if RaiseList <> nil then
+ begin
+ Tmp := Exception(PRaiseFrame(RaiseList)^.ExceptObject);
+ PRaiseFrame(RaiseList)^.ExceptObject := nil;
+ end else
+ Tmp := nil;
+ {$ENDIF}
+ if Tmp <> nil then
+ begin
+ if Tmp is EPSException then
+ begin
+ Result := False;
+ ExceptionProc(EPSException(tmp).ProcNo, EPSException(tmp).ProcPos, erCustomError, EPSException(tmp).Message, nil);
+ exit;
+ end else
+ if Tmp is EDivByZero then
+ begin
+ Result := False;
+ CMD_Err3(erDivideByZero, '', Tmp);
+ Exit;
+ end;
+ if Tmp is EZeroDivide then
+ begin
+ Result := False;
+ CMD_Err3(erDivideByZero, '', Tmp);
+ Exit;
+ end;
+ if Tmp is EMathError then
+ begin
+ Result := False;
+ CMD_Err3(erMathError, '', Tmp);
+ Exit;
+ end;
+ end;
+ if (tmp <> nil) and (Tmp is Exception) then
+ CMD_Err3(erException, Exception(Tmp).Message, Tmp)
+ else
+ CMD_Err3(erException, '', Tmp);
+ Result := False;
+ end;
+end;
+
+function TPSExec.ReadVariable(var Dest: TPSResultData; UsePointer: Boolean): Boolean;
+var
+ VarType: Cardinal;
+ Param: Cardinal;
+ Tmp: PIfVariant;
+ at: TPSTypeRec;
+
+begin
+ if FCurrentPosition + 4 >= FDataLength then
+ begin
+ CMD_Err(erOutOfRange); // Error
+ Result := False;
+ exit;
+ end;
+ VarType := FData^[FCurrentPosition];
+ Inc(FCurrentPosition);
+ Param := Cardinal((@FData^[FCurrentPosition])^);
+ Inc(FCurrentPosition, 4);
+ case VarType of
+ 0:
+ begin
+ Dest.FreeType := vtNone;
+ if Param < PSAddrNegativeStackStart then
+ begin
+ if Param >= Cardinal(FGlobalVars.Count) then
+ begin
+ CMD_Err(erOutOfGlobalVarsRange);
+ Result := False;
+ exit;
+ end;
+ Tmp := FGlobalVars.Data[param];
+ end else
+ begin
+ Param := Cardinal(Longint(-PSAddrStackStart) +
+ Longint(FCurrStackBase) + Longint(Param));
+ if Param >= Cardinal(FStack.Count) then
+ begin
+ CMD_Err(erOutOfGlobalVarsRange);
+ Result := False;
+ exit;
+ end;
+ Tmp := FStack.Data[param];
+ end;
+ if (UsePointer) and (Tmp.FType.BaseType = btPointer) then
+ begin
+ Dest.aType := PPSVariantPointer(Tmp).DestType;
+ Dest.P := PPSVariantPointer(Tmp).DataDest;
+ if Dest.P = nil then
+ begin
+ Cmd_Err(erNullPointerException);
+ Result := False;
+ exit;
+ end;
+ end else
+ begin
+ Dest.aType := PPSVariantData(Tmp).vi.FType;
+ Dest.P := @PPSVariantData(Tmp).Data;
+ end;
+ end;
+ 1: begin
+ if Param >= FTypes.Count then
+ begin
+ CMD_Err(erInvalidType);
+ Result := False;
+ exit;
+ end;
+ at := FTypes.Data^[Param];
+ Param := FTempVars.FLength;
+ FTempVars.FLength := Cardinal(Longint(Param) + Longint(at.RealSize) + Longint(RTTISize + 3)) and not 3;
+ if FTempVars.FLength > FTempVars.FCapacity then FtempVars.AdjustLength;
+ Tmp := Pointer(IPointer(FtempVars.FDataPtr) + IPointer(Param));
+
+ if Cardinal(FTempVars.FCount) >= Cardinal(FTempVars.FCapacity) then
+ begin
+ Inc(FTempVars.FCapacity, FCapacityInc);// := FCount + 1;
+ ReAllocMem(FTempVars.FData, FTempVars.FCapacity shl 2);
+ end;
+ FTempVars.FData[FTempVars.FCount] := Tmp; // Instead of SetItem
+ Inc(FTempVars.FCount);
+ {$IFNDEF PS_NOSMARTLIST}
+ Inc(FTempVars.FCheckCount);
+ if FTempVars.FCheckCount > FMaxCheckCount then FTempVars.Recreate;
+ {$ENDIF}
+
+
+ Tmp.FType := at;
+ Dest.P := @PPSVariantData(Tmp).Data;
+ Dest.aType := tmp.FType;
+ dest.FreeType := vtTempVar;
+ case Dest.aType.BaseType of
+ btSet:
+ begin
+ if not ReadData(Dest.P^, TPSTypeRec_Set(Dest.aType).aByteSize) then
+ begin
+ CMD_Err(erOutOfRange);
+ FTempVars.Pop;
+ Result := False;
+ exit;
+ end;
+ end;
+ bts8, btchar, btU8:
+ begin
+ if FCurrentPosition >= FDataLength then
+ begin
+ CMD_Err(erOutOfRange);
+ FTempVars.Pop;
+ Result := False;
+ exit;
+ end;
+ tbtu8(dest.p^) := FData^[FCurrentPosition];
+ Inc(FCurrentPosition);
+ end;
+ bts16, {$IFNDEF PS_NOWIDESTRING}btwidechar,{$ENDIF} btU16:
+ begin
+ if FCurrentPosition + 1>= FDataLength then
+ begin
+ CMD_Err(erOutOfRange);
+ FTempVars.Pop;
+ Result := False;
+ exit;
+ end;
+ tbtu16(dest.p^) := tbtu16((@FData^[FCurrentPosition])^);
+ Inc(FCurrentPosition, 2);
+ end;
+ bts32, btU32:
+ begin
+ if FCurrentPosition + 3>= FDataLength then
+ begin
+ CMD_Err(erOutOfRange);
+ FTempVars.Pop;
+ Result := False;
+ exit;
+ end;
+ tbtu32(dest.p^) := tbtu32((@FData^[FCurrentPosition])^);
+ Inc(FCurrentPosition, 4);
+ end;
+ btProcPtr:
+ begin
+ if FCurrentPosition + 3>= FDataLength then
+ begin
+ CMD_Err(erOutOfRange);
+ FTempVars.Pop;
+ Result := False;
+ exit;
+ end;
+ tbtu32(dest.p^) := tbtu32((@FData^[FCurrentPosition])^);
+ tbtu32(Pointer(IPointer(dest.p)+4)^) := 0;
+ tbtu32(Pointer(IPointer(dest.p)+8)^) := 0;
+ Inc(FCurrentPosition, 4);
+ end;
+ {$IFNDEF PS_NOINT64}
+ bts64:
+ begin
+ if FCurrentPosition + 7>= FDataLength then
+ begin
+ CMD_Err(erOutOfRange);
+ FTempVars.Pop;
+ Result := False;
+ exit;
+ end;
+ tbts64(dest.p^) := tbts64((@FData^[FCurrentPosition])^);
+ Inc(FCurrentPosition, 8);
+ end;
+ {$ENDIF}
+ btSingle:
+ begin
+ if FCurrentPosition + (Sizeof(Single)-1)>= FDataLength then
+ begin
+ CMD_Err(erOutOfRange);
+ FTempVars.Pop;
+ Result := False;
+ exit;
+ end;
+ tbtsingle(dest.p^) := tbtsingle((@FData^[FCurrentPosition])^);
+ Inc(FCurrentPosition, Sizeof(Single));
+ end;
+ btDouble:
+ begin
+ if FCurrentPosition + (Sizeof(Double)-1)>= FDataLength then
+ begin
+ CMD_Err(erOutOfRange);
+ FTempVars.Pop;
+ Result := False;
+ exit;
+ end;
+ tbtdouble(dest.p^) := tbtdouble((@FData^[FCurrentPosition])^);
+ Inc(FCurrentPosition, Sizeof(double));
+ end;
+
+ btExtended:
+ begin
+ if FCurrentPosition + (sizeof(Extended)-1)>= FDataLength then
+ begin
+ CMD_Err(erOutOfRange);
+ FTempVars.Pop;
+ Result := False;
+ exit;
+ end;
+ tbtextended(dest.p^) := tbtextended((@FData^[FCurrentPosition])^);
+ Inc(FCurrentPosition, sizeof(Extended));
+ end;
+ btPchar, btString:
+ begin
+ if FCurrentPosition + 3 >= FDataLength then
+ begin
+ Cmd_Err(erOutOfRange);
+ FTempVars.Pop;
+ Result := False;
+ exit;
+ end;
+ Param := Cardinal((@FData^[FCurrentPosition])^);
+ Inc(FCurrentPosition, 4);
+ Pointer(Dest.P^) := nil;
+ SetLength(tbtstring(Dest.P^), Param);
+ if not ReadData(tbtstring(Dest.P^)[1], Param) then
+ begin
+ CMD_Err(erOutOfRange);
+ FTempVars.Pop;
+ Result := False;
+ exit;
+ end;
+ end;
+ {$IFNDEF PS_NOWIDESTRING}
+ btWidestring:
+ begin
+ if FCurrentPosition + 3 >= FDataLength then
+ begin
+ Cmd_Err(erOutOfRange);
+ FTempVars.Pop;
+ Result := False;
+ exit;
+ end;
+ Param := Cardinal((@FData^[FCurrentPosition])^);
+ Inc(FCurrentPosition, 4);
+ Pointer(Dest.P^) := nil;
+ SetLength(tbtwidestring(Dest.P^), Param);
+ if not ReadData(tbtwidestring(Dest.P^)[1], Param*2) then
+ begin
+ CMD_Err(erOutOfRange);
+ FTempVars.Pop;
+ Result := False;
+ exit;
+ end;
+ end;
+ {$ENDIF}
+ else begin
+ CMD_Err(erInvalidType);
+ FTempVars.Pop;
+ Result := False;
+ exit;
+ end;
+ end;
+ end;
+ 2:
+ begin
+ Dest.FreeType := vtNone;
+ if Param < PSAddrNegativeStackStart then begin
+ if Param >= Cardinal(FGlobalVars.Count) then
+ begin
+ CMD_Err(erOutOfGlobalVarsRange);
+ Result := False;
+ exit;
+ end;
+ Tmp := FGlobalVars.Data[param];
+ end
+ else begin
+ Param := Cardinal(Longint(-PSAddrStackStart) + Longint(FCurrStackBase) + Longint(Param));
+ if Param >= Cardinal(FStack.Count) then
+ begin
+ CMD_Err(erOutOfStackRange);
+ Result := False;
+ exit;
+ end;
+ Tmp := FStack.Data[param];
+ end;
+ if Tmp.FType.BaseType = btPointer then
+ begin
+ Dest.aType := PPSVariantPointer(Tmp).DestType;
+ Dest.P := PPSVariantPointer(Tmp).DataDest;
+ if Dest.P = nil then
+ begin
+ Cmd_Err(erNullPointerException);
+ Result := False;
+ exit;
+ end;
+ end else
+ begin
+ Dest.aType := PPSVariantData(Tmp).vi.FType;
+ Dest.P := @PPSVariantData(Tmp).Data;
+ end;
+ if FCurrentPosition + 3 >= FDataLength then
+ begin
+ CMD_Err(erOutOfRange);
+ Result := False;
+ exit;
+ end;
+ Param := Cardinal((@FData^[FCurrentPosition])^);
+ Inc(FCurrentPosition, 4);
+ case Dest.aType.BaseType of
+ btRecord:
+ begin
+ if Param > Cardinal(TPSTypeRec_Record(Dest.aType).FFieldTypes.Count) then
+ begin
+ CMD_Err(erOutOfRange);
+ Result := False;
+ exit;
+ end;
+ Dest.P := Pointer(IPointer(Dest.P) + IPointer(TPSTypeRec_Record(Dest.aType).RealFieldOffsets[Param]));
+ Dest.aType := TPSTypeRec_Record(Dest.aType).FieldTypes[Param];
+ end;
+ btArray:
+ begin
+ if Param >= Cardinal(PSDynArrayGetLength(Pointer(Dest.P^), dest.aType)) then
+ begin
+ CMD_Err(erOutOfRange);
+ Result := False;
+ exit;
+ end;
+ Dest.P := Pointer(IPointer(Dest.P^) + (Param * TPSTypeRec_Array(Dest.aType).FArrayType.RealSize));
+ Dest.aType := TPSTypeRec_Array(dest.aType).ArrayType;
+ end;
+ btStaticArray:
+ begin
+ if Param >= Cardinal(TPSTypeRec_StaticArray(Dest.aType).Size) then
+ begin
+ CMD_Err(erOutOfRange);
+ Result := False;
+ exit;
+ end;
+ Dest.P := Pointer(IPointer(Dest.P) + (Param * TPSTypeRec_Array(Dest.aType).FArrayType.RealSize));
+ Dest.aType := TPSTypeRec_Array(dest.aType).ArrayType;
+ end;
+ else
+ CMD_Err(erInvalidType);
+ Result := False;
+ exit;
+ end;
+
+ if UsePointer and (Dest.aType.BaseType = btPointer) then
+ begin
+ Dest.aType := TPSTypeRec(Pointer(IPointer(Dest.p)+4)^);
+ Dest.P := Pointer(Dest.p^);
+ if Dest.P = nil then
+ begin
+ Cmd_Err(erNullPointerException);
+ Result := False;
+ exit;
+ end;
+ end;
+ end;
+ 3:
+ begin
+ Dest.FreeType := vtNone;
+ if Param < PSAddrNegativeStackStart then begin
+ if Param >= Cardinal(FGlobalVars.Count) then
+ begin
+ CMD_Err(erOutOfGlobalVarsRange);
+ Result := False;
+ exit;
+ end;
+ Tmp := FGlobalVars.Data[param];
+ end
+ else begin
+ Param := Cardinal(Longint(-PSAddrStackStart) + Longint(FCurrStackBase) + Longint(Param));
+ if Param >= Cardinal(FStack.Count) then
+ begin
+ CMD_Err(erOutOfStackRange);
+ Result := False;
+ exit;
+ end;
+ Tmp := FStack.Data[param];
+ end;
+ if (Tmp.FType.BaseType = btPointer) then
+ begin
+ Dest.aType := PPSVariantPointer(Tmp).DestType;
+ Dest.P := PPSVariantPointer(Tmp).DataDest;
+ if Dest.P = nil then
+ begin
+ Cmd_Err(erNullPointerException);
+ Result := False;
+ exit;
+ end;
+ end else
+ begin
+ Dest.aType := PPSVariantData(Tmp).vi.FType;
+ Dest.P := @PPSVariantData(Tmp).Data;
+ end;
+ Param := Cardinal((@FData^[FCurrentPosition])^);
+ Inc(FCurrentPosition, 4);
+ if Param < PSAddrNegativeStackStart then
+ begin
+ if Param >= Cardinal(FGlobalVars.Count) then
+ begin
+ CMD_Err(erOutOfGlobalVarsRange);
+ Result := false;
+ exit;
+ end;
+ Tmp := FGlobalVars[Param];
+ end
+ else begin
+ Param := Cardinal(Longint(-PSAddrStackStart) + Longint(FCurrStackBase) + Longint(Param));
+ if Cardinal(Param) >= Cardinal(FStack.Count) then
+ begin
+ CMD_Err(erOutOfStackRange);
+ Result := false;
+ exit;
+ end;
+ Tmp := FStack[Param];
+ end;
+ case Tmp.FType.BaseType of
+ btu8: Param := PPSVariantU8(Tmp).Data;
+ bts8: Param := PPSVariants8(Tmp).Data;
+ btu16: Param := PPSVariantU16(Tmp).Data;
+ bts16: Param := PPSVariants16(Tmp).Data;
+ btu32: Param := PPSVariantU32(Tmp).Data;
+ bts32: Param := PPSVariants32(Tmp).Data;
+ btPointer:
+ begin
+ if PPSVariantPointer(tmp).DestType <> nil then
+ begin
+ case PPSVariantPointer(tmp).DestType.BaseType of
+ btu8: Param := tbtu8(PPSVariantPointer(tmp).DataDest^);
+ bts8: Param := tbts8(PPSVariantPointer(tmp).DataDest^);
+ btu16: Param := tbtu16(PPSVariantPointer(tmp).DataDest^);
+ bts16: Param := tbts16(PPSVariantPointer(tmp).DataDest^);
+ btu32, btProcPtr: Param := tbtu32(PPSVariantPointer(tmp).DataDest^);
+ bts32: Param := tbts32(PPSVariantPointer(tmp).DataDest^);
+ else
+ begin
+ CMD_Err(ErTypeMismatch);
+ Result := false;
+ exit;
+ end;
+ end;
+ end else
+ begin
+ CMD_Err(ErTypeMismatch);
+ Result := false;
+ exit;
+ end;
+ end;
+ else
+ CMD_Err(ErTypeMismatch);
+ Result := false;
+ exit;
+ end;
+ case Dest.aType.BaseType of
+ btRecord:
+ begin
+ if Param > Cardinal(TPSTypeRec_Record(Dest.aType).FFieldTypes.Count) then
+ begin
+ CMD_Err(erOutOfRange);
+ Result := False;
+ exit;
+ end;
+ Dest.P := Pointer(IPointer(Dest.P) + IPointer(TPSTypeRec_Record(Dest.aType).RealFieldOffsets[Param]));
+ Dest.aType := TPSTypeRec_Record(Dest.aType).FieldTypes[Param];
+ end;
+ btArray:
+ begin
+ if Cardinal(Param) >= Cardinal(PSDynArrayGetLength(Pointer(Dest.P^), dest.aType)) then
+ begin
+ CMD_Err(erOutOfRange);
+ Result := False;
+ exit;
+ end;
+ Dest.P := Pointer(IPointer(Dest.P^) + (Param * TPSTypeRec_Array(Dest.aType).FArrayType.RealSize));
+ Dest.aType := TPSTypeRec_Array(dest.aType).ArrayType;
+ end;
+ btStaticArray:
+ begin
+ if Param >= Cardinal(TPSTypeRec_StaticArray(Dest.aType).Size) then
+ begin
+ CMD_Err(erOutOfRange);
+ Result := False;
+ exit;
+ end;
+ Dest.P := Pointer(IPointer(Dest.P) + (Param * TPSTypeRec_Array(Dest.aType).FArrayType.RealSize));
+ Dest.aType := TPSTypeRec_Array(dest.aType).ArrayType;
+ end;
+ else
+ CMD_Err(erInvalidType);
+ Result := False;
+ exit;
+ end;
+ if UsePointer and (Dest.aType.BaseType = btPointer) then
+ begin
+ Dest.aType := TPSTypeRec(Pointer(IPointer(Dest.p)+4)^);
+ Dest.P := Pointer(Dest.p^);
+ if Dest.P = nil then
+ begin
+ Cmd_Err(erNullPointerException);
+ Result := False;
+ exit;
+ end;
+ end;
+ end;
+ else
+ begin
+ Result := False;
+ exit;
+ end;
+ end;
+ Result := true;
+end;
+
+function TPSExec.DoMinus(Dta: Pointer; aType: TPSTypeRec): Boolean;
+begin
+ case atype.BaseType of
+ btU8: tbtu8(dta^) := -tbtu8(dta^);
+ btU16: tbtu16(dta^) := -tbtu16(dta^);
+ btU32: tbtu32(dta^) := -tbtu32(dta^);
+ btS8: tbts8(dta^) := -tbts8(dta^);
+ btS16: tbts16(dta^) := -tbts16(dta^);
+ btS32: tbts32(dta^) := -tbts32(dta^);
+ {$IFNDEF PS_NOINT64}
+ bts64: tbts64(dta^) := -tbts64(dta^);
+ {$ENDIF}
+ btSingle: tbtsingle(dta^) := -tbtsingle(dta^);
+ btDouble: tbtdouble(dta^) := -tbtdouble(dta^);
+ btExtended: tbtextended(dta^) := -tbtextended(dta^);
+ btCurrency: tbtcurrency(dta^) := -tbtcurrency(dta^);
+ btVariant:
+ begin
+ try
+ Variant(dta^) := - Variant(dta^);
+ except
+ CMD_Err(erTypeMismatch);
+ Result := False;
+ exit;
+ end;
+ end;
+ else
+ begin
+ CMD_Err(erTypeMismatch);
+ Result := False;
+ exit;
+ end;
+ end;
+ Result := True;
+end;
+
+function TPSExec.DoBooleanNot(Dta: Pointer; aType: TPSTypeRec): Boolean;
+begin
+ case aType.BaseType of
+ btU8: tbtu8(dta^) := tbtu8(tbtu8(dta^) = 0);
+ btU16: tbtu16(dta^) := tbtu16(tbtu16(dta^) = 0);
+ btU32: tbtu32(dta^) := tbtu32(tbtu32(dta^) = 0);
+ btS8: tbts8(dta^) := tbts8(tbts8(dta^) = 0);
+ btS16: tbts16(dta^) := tbts16(tbts16(dta^) = 0);
+ btS32: tbts32(dta^) := tbts32(tbts32(dta^) = 0);
+ {$IFNDEF PS_NOINT64}
+ bts64: tbts64(dta^) := tbts64(tbts64(dta^) = 0);
+ {$ENDIF}
+ btVariant:
+ begin
+ try
+ Variant(dta^) := Variant(dta^) = 0;
+ except
+ CMD_Err(erTypeMismatch);
+ Result := False;
+ exit;
+ end;
+ end;
+ else
+ begin
+ CMD_Err(erTypeMismatch);
+ Result := False;
+ exit;
+ end;
+ end;
+ Result := True;
+end;
+
+
+procedure TPSExec.Stop;
+begin
+ if FStatus = isRunning then
+ FStatus := isLoaded
+ else if FStatus = isPaused then begin
+ FStatus := isLoaded;
+ FStack.Clear;
+ FTempVars.Clear;
+ end;
+end;
+
+
+function TPSExec.ReadLong(var b: Cardinal): Boolean;
+begin
+ if FCurrentPosition + 3 < FDataLength then begin
+ b := Cardinal((@FData^[FCurrentPosition])^);
+ Inc(FCurrentPosition, 4);
+ Result := True;
+ end
+ else
+ Result := False;
+end;
+
+function TPSExec.RunProcP(const Params: array of Variant; const Procno: Cardinal): Variant;
+var
+ ParamList: TPSList;
+ ct: PIFTypeRec;
+ pvar: PPSVariant;
+ res, s: string;
+ Proc: TPSInternalProcRec;
+ i: Longint;
+begin
+ if ProcNo >= FProcs.Count then raise Exception.Create(RPS_UnknownProcedure);
+ Proc := GetProcNo(ProcNo) as TPSInternalProcRec;
+ ParamList := TPSList.Create;
+ try
+ s := Proc.ExportDecl;
+ res := grfw(s);
+ i := High(Params);
+ while s <> '' do
+ begin
+ if i < 0 then raise Exception.Create(RPS_NotEnoughParameters);
+ ct := FTypes[StrToInt(copy(GRLW(s), 2, MaxInt))];
+ if ct = nil then raise Exception.Create(RPS_InvalidParameter);
+ pvar := CreateHeapVariant(ct);
+ ParamList.Add(pvar);
+
+ if not VariantToPIFVariant(Self, Params[i], pvar) then raise Exception.Create(RPS_InvalidParameter);
+
+ Dec(i);
+ end;
+ if I > -1 then raise Exception.Create(RPS_TooManyParameters);
+ if res <> '-1' then
+ begin
+ pvar := CreateHeapVariant(FTypes[StrToInt(res)]);
+ ParamList.Add(pvar);
+ end else
+ pvar := nil;
+
+ RunProc(ParamList, ProcNo);
+
+ RaiseCurrentException;
+
+ if pvar <> nil then
+ begin
+ PIFVariantToVariant(PVar, Result);
+ end else
+ Result := Null;
+ finally
+ FreePIFVariantList(ParamList);
+ end;
+end;
+
+function TPSExec.RunProcPN(const Params: array of Variant; const ProcName: string): Variant;
+var
+ ProcNo: Cardinal;
+begin
+ ProcNo := GetProc(ProcName);
+ if ProcNo = InvalidVal then
+ raise Exception.Create(RPS_UnknownProcedure);
+ Result := RunProcP(Params, ProcNo);
+end;
+
+
+function TPSExec.RunProc(Params: TPSList; ProcNo: Cardinal): Boolean;
+var
+ I, I2: Integer;
+ vnew, Vd: PIfVariant;
+ Cp: TPSInternalProcRec;
+ oldStatus: TPSStatus;
+ tmp: TObject;
+begin
+ if FStatus <> isNotLoaded then begin
+ if ProcNo >= FProcs.Count then begin
+ CMD_Err(erOutOfProcRange);
+ Result := False;
+ exit;
+ end;
+ if Params <> nil then
+ begin
+ for I := 0 to Params.Count - 1 do
+ begin
+ vd := Params[I];
+ if vd = nil then
+ begin
+ Result := False;
+ exit;
+ end;
+ vnew := FStack.PushType(FindType2(btPointer));
+ if vd.FType.BaseType = btPointer then
+ begin
+ PPSVariantPointer(vnew).DestType := PPSVariantPointer(vd).DestType;
+ PPSVariantPointer(vnew).DataDest := PPSVariantPointer(vd).DataDest;
+ end else begin
+ PPSVariantPointer(vnew).DestType := vd.FType;
+ PPSVariantPointer(vnew).DataDest := @PPSVariantData(vd).Data;
+ end;
+ end;
+ end;
+ I := FStack.Count;
+ Cp := FCurrProc;
+ oldStatus := FStatus;
+ if TPSProcRec(FProcs.Data^[ProcNo]).ClassType <> TPSExternalProcRec then
+ begin
+ vd := FStack.PushType(FReturnAddressType);
+ PPSVariantReturnAddress(vd).Addr.ProcNo := nil;
+ PPSVariantReturnAddress(vd).Addr.Position := FCurrentPosition;
+ PPSVariantReturnAddress(vd).Addr.StackBase := FCurrStackBase;
+ FCurrStackBase := FStack.Count - 1;
+ FCurrProc := FProcs.Data^[ProcNo];
+ FData := FCurrProc.Data;
+ FDataLength := FCurrProc.Length;
+ FCurrentPosition := 0;
+ FStatus := isPaused;
+ Result := RunScript;
+ end else
+ begin
+ try
+ Result := TPSExternalProcRec(FProcs.Data^[ProcNo]).ProcPtr(Self, TPSExternalProcRec(FProcs.Data^[ProcNo]), FGlobalVars, FStack);
+ if not Result then
+ begin
+ if ExEx = erNoError then
+ CMD_Err(erCouldNotCallProc);
+ end;
+ except
+ {$IFDEF DELPHI6UP}
+ Tmp := AcquireExceptionObject;
+ {$ELSE}
+ if RaiseList <> nil then
+ begin
+ Tmp := Exception(PRaiseFrame(RaiseList)^.ExceptObject);
+ PRaiseFrame(RaiseList)^.ExceptObject := nil;
+ end else
+ Tmp := nil;
+ {$ENDIF}
+ if Tmp <> nil then
+ begin
+ if Tmp is EPSException then
+ begin
+ Result := False;
+ ExceptionProc(EPSException(tmp).ProcNo, EPSException(tmp).ProcPos, erCustomError, EPSException(tmp).Message, nil);
+ exit;
+ end else
+ if Tmp is EDivByZero then
+ begin
+ Result := False;
+ CMD_Err3(erDivideByZero, '', Tmp);
+ Exit;
+ end;
+ if Tmp is EZeroDivide then
+ begin
+ Result := False;
+ CMD_Err3(erDivideByZero, '', Tmp);
+ Exit;
+ end;
+ if Tmp is EMathError then
+ begin
+ Result := False;
+ CMD_Err3(erMathError, '', Tmp);
+ Exit;
+ end;
+ end;
+ if (Tmp <> nil) and (Tmp is Exception) then
+ CMD_Err3(erException, Exception(Tmp).Message, Tmp) else
+ CMD_Err3(erException, '', Tmp);
+ Result := false;
+ exit;
+ end;
+ end;
+ if Cardinal(FStack.Count) > Cardinal(I) then
+ begin
+ vd := FStack[I];
+ if (vd <> nil) and (vd.FType = FReturnAddressType) then
+ begin
+ for i2 := FStack.Count - 1 downto I + 1 do
+ FStack.Pop;
+ FCurrentPosition := PPSVariantReturnAddress(vd).Addr.Position;
+ FCurrStackBase := PPSVariantReturnAddress(vd).Addr.StackBase;
+ FStack.Pop;
+ end;
+ end;
+ if Params <> nil then
+ begin
+ for I := Params.Count - 1 downto 0 do
+ begin
+ if FStack.Count = 0 then
+ Break
+ else
+ FStack.Pop;
+ end;
+ end;
+ FStatus := oldStatus;
+ FCurrProc := Cp;
+ if FCurrProc <> nil then
+ begin
+ FData := FCurrProc.Data;
+ FDataLength := FCurrProc.Length;
+ end;
+ end else begin
+ Result := False;
+ end;
+end;
+
+
+function TPSExec.FindType2(BaseType: TPSBaseType): PIFTypeRec;
+var
+ l: Cardinal;
+begin
+ FindType2 := FindType(0, BaseType, l);
+
+end;
+
+function TPSExec.FindType(StartAt: Cardinal; BaseType: TPSBaseType; var l: Cardinal): PIFTypeRec;
+var
+ I: Integer;
+ n: PIFTypeRec;
+begin
+ for I := StartAt to FTypes.Count - 1 do begin
+ n := FTypes[I];
+ if n.BaseType = BaseType then begin
+ l := I;
+ Result := n;
+ exit;
+ end;
+ end;
+ Result := nil;
+end;
+
+function TPSExec.GetTypeNo(l: Cardinal): PIFTypeRec;
+begin
+ Result := FTypes[l];
+end;
+
+function TPSExec.GetProc(const Name: string): Cardinal;
+var
+ MM,
+ I: Longint;
+ n: PIFProcRec;
+ s: string;
+begin
+ s := FastUpperCase(name);
+ MM := MakeHash(s);
+ for I := FProcs.Count - 1 downto 0 do begin
+ n := FProcs.Data^[I];
+ if (n.ClassType = TPSInternalProcRec) and (TPSInternalProcRec(n).ExportNameHash = MM) and (TPSInternalProcRec(n).ExportName = s) then begin
+ Result := I;
+ exit;
+ end else if (n.ClassType = TPSExternalProcRec) and (TPSExternalProcRec(n).Name = s) then
+ begin
+ Result := I;
+ exit;
+ end;
+ end;
+ Result := InvalidVal;
+end;
+
+function TPSExec.GetType(const Name: string): Cardinal;
+var
+ MM,
+ I: Longint;
+ n: PIFTypeRec;
+ s: string;
+begin
+ s := FastUpperCase(name);
+ MM := MakeHash(s);
+ for I := 0 to FTypes.Count - 1 do begin
+ n := FTypes.Data^[I];
+ if (Length(n.ExportName) <> 0) and (n.ExportNameHash = MM) and (n.ExportName = s) then begin
+ Result := I;
+ exit;
+ end;
+ end;
+ Result := InvalidVal;
+end;
+
+
+procedure TPSExec.AddResource(Proc, P: Pointer);
+var
+ Temp: PPSResource;
+begin
+ New(Temp);
+ Temp^.Proc := Proc;
+ Temp^.P := p;
+ FResources.Add(temp);
+end;
+
+procedure TPSExec.DeleteResource(P: Pointer);
+var
+ i: Longint;
+begin
+ for i := Longint(FResources.Count) -1 downto 0 do
+ begin
+ if PPSResource(FResources[I])^.P = P then
+ begin
+ FResources.Delete(I);
+ exit;
+ end;
+ end;
+end;
+
+function TPSExec.FindProcResource(Proc: Pointer): Pointer;
+var
+ I: Longint;
+ temp: PPSResource;
+begin
+ for i := Longint(FResources.Count) -1 downto 0 do
+ begin
+ temp := FResources[I];
+ if temp^.Proc = proc then
+ begin
+ Result := Temp^.P;
+ exit;
+ end;
+ end;
+ Result := nil;
+end;
+
+function TPSExec.IsValidResource(Proc, P: Pointer): Boolean;
+var
+ i: Longint;
+ temp: PPSResource;
+begin
+ for i := 0 to Longint(FResources.Count) -1 do
+ begin
+ temp := FResources[i];
+ if temp^.p = p then begin
+ result := temp^.Proc = Proc;
+ exit;
+ end;
+ end;
+ result := false;
+end;
+
+function TPSExec.FindProcResource2(Proc: Pointer;
+ var StartAt: Longint): Pointer;
+var
+ I: Longint;
+ temp: PPSResource;
+begin
+ if StartAt > longint(FResources.Count) -1 then
+ StartAt := longint(FResources.Count) -1;
+ for i := StartAt downto 0 do
+ begin
+ temp := FResources[I];
+ if temp^.Proc = proc then
+ begin
+ Result := Temp^.P;
+ StartAt := i -1;
+ exit;
+ end;
+ end;
+ StartAt := -1;
+ Result := nil;
+end;
+
+procedure TPSExec.RunLine;
+begin
+ if @FOnRunLine <> nil then
+ FOnRunLine(Self);
+end;
+
+procedure TPSExec.CMD_Err3(EC: TPSError; const Param: string; ExObject: TObject);
+var
+ l: Longint;
+ C: Cardinal;
+begin
+ C := InvalidVal;
+ for l := FProcs.Count - 1 downto 0 do begin
+ if FProcs.Data^[l] = FCurrProc then begin
+ C := l;
+ break;
+ end;
+ end;
+ if @FOnException <> nil then
+ FOnException(Self, Ec, Param, ExObject, C, FCurrentPosition);
+ ExceptionProc(C, FCurrentPosition, EC, Param, ExObject);
+end;
+
+procedure TPSExec.AddSpecialProcImport(const FName: string;
+ P: TPSOnSpecialProcImport; Tag: Pointer);
+var
+ N: PSpecialProc;
+begin
+ New(n);
+ n^.P := P;
+ N^.Name := FName;
+ n^.namehash := MakeHash(N^.Name);
+ n^.Tag := Tag;
+ FSpecialProcList.Add(n);
+end;
+
+function TPSExec.GetVar(const Name: string): Cardinal;
+var
+ l: Longint;
+ h: longint;
+ s: string;
+ p: PPSExportedVar;
+begin
+ s := FastUpperCase(name);
+ h := MakeHash(s);
+ for l := FExportedVars.Count - 1 downto 0 do
+ begin
+ p := FexportedVars.Data^[L];
+ if (p^.FNameHash = h) and(p^.FName=s) then
+ begin
+ Result := L;
+ exit;
+ end;
+ end;
+ Result := InvalidVal;
+end;
+
+function TPSExec.GetVarNo(C: Cardinal): PIFVariant;
+begin
+ Result := FGlobalVars[c];
+end;
+
+function TPSExec.GetVar2(const Name: string): PIFVariant;
+begin
+ Result := GetVarNo(GetVar(Name));
+end;
+
+function TPSExec.GetProcNo(C: Cardinal): PIFProcRec;
+begin
+ Result := FProcs[c];
+end;
+
+function TPSExec.DoIntegerNot(Dta: Pointer; aType: TPSTypeRec): Boolean;
+begin
+ case aType.BaseType of
+ btU8: tbtu8(dta^) := not tbtu8(dta^);
+ btU16: tbtu16(dta^) := not tbtu16(dta^);
+ btU32: tbtu32(dta^) := not tbtu32(dta^);
+ btS8: tbts8(dta^) := not tbts8(dta^);
+ btS16: tbts16(dta^) := not tbts16(dta^);
+ btS32: tbts32(dta^) := not tbts32(dta^);
+ {$IFNDEF PS_NOINT64}
+ bts64: tbts64(dta^) := not tbts64(dta^);
+ {$ENDIF}
+ btVariant:
+ begin
+ try
+ Variant(dta^) := not Variant(dta^);
+ except
+ CMD_Err(erTypeMismatch);
+ Result := False;
+ exit;
+ end;
+ end;
+ else
+ begin
+ CMD_Err(erTypeMismatch);
+ Result := False;
+ exit;
+ end;
+ end;
+ Result := True;
+end;
+
+type
+ TMyRunLine = procedure(Self: TPSExec);
+ TPSRunLine = procedure of object;
+
+function GetRunLine(FOnRunLine: TPSOnLineEvent; meth: TPSRunLine): TMyRunLine;
+begin
+ if (TMethod(Meth).Code = @TPSExec.RunLine) and (@FOnRunLine = nil) then
+ Result := nil
+ else
+ Result := TMethod(Meth).Code;
+end;
+
+function TPSExec.RunScript: Boolean;
+var
+ CalcType: Cardinal;
+ vd, vs, v3: TPSResultData;
+ vtemp: PIFVariant;
+ p: Cardinal;
+ P2: Longint;
+ u: PIFProcRec;
+ Cmd: Cardinal;
+ I: Longint;
+ pp: TPSExceptionHandler;
+ FExitPoint: Cardinal;
+ FOldStatus: TPSStatus;
+ Tmp: TObject;
+ btemp: Boolean;
+ CallRunline: TMyRunLine;
+begin
+ FExitPoint := InvalidVal;
+ if FStatus = isLoaded then
+ begin
+ for i := FExceptionStack.Count -1 downto 0 do
+ begin
+ pp := FExceptionStack.Data[i];
+ pp.Free;
+ end;
+ FExceptionStack.Clear;
+ end;
+ ExceptionProc(InvalidVal, InvalidVal, erNoError, '', nil);
+ RunScript := True;
+ FOldStatus := FStatus;
+ case FStatus of
+ isLoaded: begin
+ if FMainProc = InvalidVal then
+ begin
+ RunScript := False;
+ exit;
+ end;
+ FStatus := isRunning;
+ FCurrProc := FProcs.Data^[FMainProc];
+ if FCurrProc.ClassType = TPSExternalProcRec then begin
+ CMD_Err(erNoMainProc);
+ FStatus := isLoaded;
+ exit;
+ end;
+ FData := FCurrProc.Data;
+ FDataLength := FCurrProc.Length;
+ FCurrStackBase := InvalidVal;
+ FCurrentPosition := 0;
+ end;
+ isPaused: begin
+ FStatus := isRunning;
+ end;
+ else begin
+ RunScript := False;
+ exit;
+ end;
+ end;
+ CallRunLine := GetRunLine(FOnRunLine, Self.RunLine);
+ repeat
+ FStatus := isRunning;
+// Cmd := InvalidVal;
+ while FStatus = isRunning do
+ begin
+ if @CallRunLine <> nil then CallRunLine(Self);
+ if FCurrentPosition >= FDataLength then
+ begin
+ CMD_Err(erOutOfRange); // Error
+ break;
+ end;
+// if cmd <> invalidval then ProfilerExitProc(Cmd+1);
+ cmd := FData^[FCurrentPosition];
+// ProfilerEnterProc(Cmd+1);
+ Inc(FCurrentPosition);
+ case Cmd of
+ CM_A:
+ begin
+ if not ReadVariable(vd, True) then
+ break;
+ if vd.FreeType <> vtNone then
+ begin
+ if vd.aType.BaseType in NeedFinalization then
+ FinalizeVariant(vd.P, vd.aType);
+ p := IPointer(FTempVars.Data^[FtempVars.Count-1]) - IPointer(FtempVars.DataPtr);
+ Dec(FTempVars.FCount);
+ {$IFNDEF PS_NOSMARTLIST}
+ Inc(FTempVars.FCheckCount);
+ if FTempVars.FCheckCount > FMaxCheckCount then FTempVars.Recreate;
+ {$ENDIF}
+ FTempVars.FLength := P;
+ if ((FTempVars.FCapacity - FTempVars.FLength) shr 12) > 2 then FTempVars.AdjustLength;
+
+ CMD_Err(erInvalidOpcodeParameter);
+ break;
+ end;
+ if not ReadVariable(vs, True) then
+ Break;
+ if not SetVariantValue(vd.P, vs.P, vd.aType, vs.aType) then
+ begin
+ if vs.FreeType <> vtNone then
+ begin
+ if vs.aType.BaseType in NeedFinalization then
+ FinalizeVariant(vs.P, vs.aType);
+ p := IPointer(FTempVars.Data^[FtempVars.Count-1]) - IPointer(FtempVars.DataPtr);
+ Dec(FTempVars.FCount);
+ {$IFNDEF PS_NOSMARTLIST}
+ Inc(FTempVars.FCheckCount);
+ if FTempVars.FCheckCount > FMaxCheckCount then FTempVars.Recreate;
+ {$ENDIF}
+ FTempVars.FLength := P;
+ if ((FTempVars.FCapacity - FTempVars.FLength) shr 12) > 2 then FTempVars.AdjustLength;
+ end;
+ Break;
+ end;
+ if vs.FreeType <> vtNone then
+ begin
+ if vs.aType.BaseType in NeedFinalization then
+ FinalizeVariant(vs.P, vs.aType);
+ p := IPointer(FTempVars.Data^[FtempVars.Count-1]) - IPointer(FtempVars.DataPtr);
+ Dec(FTempVars.FCount);
+ {$IFNDEF PS_NOSMARTLIST}
+ Inc(FTempVars.FCheckCount);
+ if FTempVars.FCheckCount > FMaxCheckCount then FTempVars.Recreate;
+ {$ENDIF}
+ FTempVars.FLength := P;
+ if ((FTempVars.FCapacity - FTempVars.FLength) shr 12) > 2 then FTempVars.AdjustLength;
+ end;
+ end;
+ CM_CA:
+ begin
+ if FCurrentPosition >= FDataLength then
+ begin
+ CMD_Err(erOutOfRange); // Error
+ break;
+ end;
+ calctype := FData^[FCurrentPosition];
+ Inc(FCurrentPosition);
+ if not ReadVariable(vd, True) then
+ break;
+ if vd.FreeType <> vtNone then
+ begin
+ if vd.aType.BaseType in NeedFinalization then
+ FinalizeVariant(vd.P, vd.aType);
+ p := IPointer(FTempVars.Data^[FtempVars.Count-1]) - IPointer(FtempVars.DataPtr);
+ Dec(FTempVars.FCount);
+ {$IFNDEF PS_NOSMARTLIST}
+ Inc(FTempVars.FCheckCount);
+ if FTempVars.FCheckCount > FMaxCheckCount then FTempVars.Recreate;
+ {$ENDIF}
+ FTempVars.FLength := P;
+ if ((FTempVars.FCapacity - FTempVars.FLength) shr 12) > 2 then FTempVars.AdjustLength;
+ CMD_Err(erInvalidOpcodeParameter);
+ break;
+ end;
+ if not ReadVariable(vs, True) then
+ Break;
+ if not DoCalc(vd.P, vs.p, vd.aType, vs.aType, CalcType) then
+ begin
+ if vs.FreeType <> vtNone then
+ begin
+ if vs.aType.BaseType in NeedFinalization then
+ FinalizeVariant(vs.P, vs.aType);
+ p := IPointer(FTempVars.Data^[FtempVars.Count-1]) - IPointer(FtempVars.DataPtr);
+ Dec(FTempVars.FCount);
+ {$IFNDEF PS_NOSMARTLIST}
+ Inc(FTempVars.FCheckCount);
+ if FTempVars.FCheckCount > FMaxCheckCount then FTempVars.Recreate;
+ {$ENDIF}
+ FTempVars.FLength := P;
+ if ((FTempVars.FCapacity - FTempVars.FLength) shr 12) > 2 then FTempVars.AdjustLength;
+ end;
+ Break;
+ end;
+ if vs.FreeType <> vtNone then
+ begin
+ if vs.aType.BaseType in NeedFinalization then
+ FinalizeVariant(vs.P, vs.aType);
+ p := IPointer(FTempVars.Data^[FtempVars.Count-1]) - IPointer(FtempVars.DataPtr);
+ Dec(FTempVars.FCount);
+ {$IFNDEF PS_NOSMARTLIST}
+ Inc(FTempVars.FCheckCount);
+ if FTempVars.FCheckCount > FMaxCheckCount then FTempVars.Recreate;
+ {$ENDIF}
+ FTempVars.FLength := P;
+ if ((FTempVars.FCapacity - FTempVars.FLength) shr 12) > 2 then FTempVars.AdjustLength;
+ end;
+ end;
+ CM_P:
+ begin
+ if not ReadVariable(vs, True) then
+ Break;
+ vtemp := FStack.PushType(vs.aType);
+ vd.P := Pointer(IPointer(vtemp)+4);
+ vd.aType := Pointer(vtemp^);
+ vd.FreeType := vtNone;
+ if not SetVariantValue(Vd.P, vs.P, vd.aType, vs.aType) then
+ begin
+ if vs.FreeType <> vtnone then
+ begin
+ if vs.aType.BaseType in NeedFinalization then
+ FinalizeVariant(vs.P, vs.aType);
+ p := IPointer(FTempVars.Data^[FtempVars.Count-1]) - IPointer(FtempVars.DataPtr);
+ Dec(FTempVars.FCount);
+ {$IFNDEF PS_NOSMARTLIST}
+ Inc(FTempVars.FCheckCount);
+ if FTempVars.FCheckCount > FMaxCheckCount then FTempVars.Recreate;
+ {$ENDIF}
+ FTempVars.FLength := P;
+ if ((FTempVars.FCapacity - FTempVars.FLength) shr 12) > 2 then FTempVars.AdjustLength;
+ end;
+ break;
+ end;
+ if vs.FreeType <> vtnone then
+ begin
+ if vs.aType.BaseType in NeedFinalization then
+ FinalizeVariant(vs.P, vs.aType);
+ p := IPointer(FTempVars.Data^[FtempVars.Count-1]) - IPointer(FtempVars.DataPtr);
+ Dec(FTempVars.FCount);
+ {$IFNDEF PS_NOSMARTLIST}
+ Inc(FTempVars.FCheckCount);
+ if FTempVars.FCheckCount > FMaxCheckCount then FTempVars.Recreate;
+ {$ENDIF}
+ FTempVars.FLength := P;
+ if ((FTempVars.FCapacity - FTempVars.FLength) shr 12) > 2 then FTempVars.AdjustLength;
+ end;
+ end;
+ CM_PV:
+ begin
+ if not ReadVariable(vs, True) then
+ Break;
+ if vs.FreeType <> vtnone then
+ begin
+ FTempVars.Pop;
+ CMD_Err(erInvalidOpcodeParameter);
+ break;
+ end;
+ vtemp := FStack.PushType(FindType2(btPointer));
+ if vs.aType.BaseType = btPointer then
+ begin
+ PPSVariantPointer(vtemp).DataDest := Pointer(vs.p^);
+ PPSVariantPointer(vtemp).DestType := Pointer(Pointer(IPointer(vs.P)+4)^);
+ PPSVariantPointer(vtemp).FreeIt := False;
+ end
+ else
+ begin
+ PPSVariantPointer(vtemp).DataDest := vs.p;
+ PPSVariantPointer(vtemp).DestType := vs.aType;
+ PPSVariantPointer(vtemp).FreeIt := False;
+ end;
+ end;
+ CM_PO: begin
+ if FStack.Count = 0 then
+ begin
+ CMD_Err(erOutOfStackRange);
+ break;
+ end;
+ vtemp := FStack.Data^[FStack.Count -1];
+ if (vtemp = nil) or (vtemp.FType.BaseType = btReturnAddress) then
+ begin
+ CMD_Err(erOutOfStackRange);
+ break;
+ end;
+ Dec(FStack.FCount);
+ {$IFNDEF PS_NOSMARTLIST}
+ Inc(FStack.FCheckCount);
+ if FStack.FCheckCount > FMaxCheckCount then FStack.Recreate;
+ {$ENDIF}
+ FStack.FLength := Longint(IPointer(vtemp) - IPointer(FStack.DataPtr));
+ if TPSTypeRec(vtemp^).BaseType in NeedFinalization then
+ FinalizeVariant(Pointer(IPointer(vtemp)+4), Pointer(vtemp^));
+ if ((FStack.FCapacity - FStack.FLength) shr 12) > 2 then FStack.AdjustLength;
+ end;
+ Cm_C: begin
+ if FCurrentPosition + 3 >= FDataLength then
+ begin
+ Cmd_Err(erOutOfRange);
+ Break;
+ end;
+ p := Cardinal((@FData^[FCurrentPosition])^);
+ Inc(FCurrentPosition, 4);
+ if p >= FProcs.Count then begin
+ CMD_Err(erOutOfProcRange);
+ break;
+ end;
+ u := FProcs.Data^[p];
+ if u.ClassType = TPSExternalProcRec then begin
+ try
+ if not TPSExternalProcRec(u).ProcPtr(Self, TPSExternalProcRec(u), FGlobalVars, FStack) then
+ Break;
+ except
+ {$IFDEF DELPHI6UP}
+ Tmp := AcquireExceptionObject;
+ {$ELSE}
+ if RaiseList <> nil then
+ begin
+ Tmp := Exception(PRaiseFrame(RaiseList)^.ExceptObject);
+ PRaiseFrame(RaiseList)^.ExceptObject := nil;
+ end else
+ Tmp := nil;
+ {$ENDIF}
+ if Tmp <> nil then
+ begin
+ if Tmp is EPSException then
+ begin
+ ExceptionProc(EPSException(tmp).ProcNo, EPSException(tmp).ProcPos, erCustomError, EPSException(tmp).Message, nil);
+ Break;
+ end else
+ if Tmp is EDivByZero then
+ begin
+ CMD_Err3(erDivideByZero, '', Tmp);
+ Break;
+ end;
+ if Tmp is EZeroDivide then
+ begin
+ CMD_Err3(erDivideByZero, '', Tmp);
+ Break;
+ end;
+ if Tmp is EMathError then
+ begin
+ CMD_Err3(erMathError, '', Tmp);
+ Break;
+ end;
+ end;
+ if (Tmp <> nil) and (Tmp is Exception) then
+ CMD_Err3(erException, Exception(Tmp).Message, Tmp) else
+ CMD_Err3(erException, '', Tmp);
+ Break;
+ end;
+ end
+ else begin
+ Vtemp := Fstack.PushType(FReturnAddressType);
+ vd.P := Pointer(IPointer(VTemp)+4);
+ vd.aType := pointer(vtemp^);
+ vd.FreeType := vtNone;
+ PPSVariantReturnAddress(vtemp).Addr.ProcNo := FCurrProc;
+ PPSVariantReturnAddress(vtemp).Addr.Position := FCurrentPosition;
+ PPSVariantReturnAddress(vtemp).Addr.StackBase := FCurrStackBase;
+
+ FCurrStackBase := FStack.Count - 1;
+ FCurrProc := TPSInternalProcRec(u);
+ FData := FCurrProc.Data;
+ FDataLength := FCurrProc.Length;
+ FCurrentPosition := 0;
+ end;
+ end;
+ CM_PG:
+ begin
+ FStack.Pop;
+ if FCurrentPosition + 3 >= FDataLength then
+ begin
+ Cmd_Err(erOutOfRange);
+ Break;
+ end;
+ p := Cardinal((@FData^[FCurrentPosition])^);
+ Inc(FCurrentPosition, 4);
+ FCurrentPosition := FCurrentPosition + p;
+ end;
+ CM_P2G:
+ begin
+ FStack.Pop;
+ FStack.Pop;
+ if FCurrentPosition + 3 >= FDataLength then
+ begin
+ Cmd_Err(erOutOfRange);
+ Break;
+ end;
+ p := Cardinal((@FData^[FCurrentPosition])^);
+ Inc(FCurrentPosition, 4);
+ FCurrentPosition := FCurrentPosition + p;
+ end;
+ Cm_G:
+ begin
+ if FCurrentPosition + 3 >= FDataLength then
+ begin
+ Cmd_Err(erOutOfRange);
+ Break;
+ end;
+ p := Cardinal((@FData^[FCurrentPosition])^);
+ Inc(FCurrentPosition, 4);
+ FCurrentPosition := FCurrentPosition + p;
+ end;
+ Cm_CG:
+ begin
+ if FCurrentPosition + 3 >= FDataLength then
+ begin
+ Cmd_Err(erOutOfRange);
+ Break;
+ end;
+ p := Cardinal((@FData^[FCurrentPosition])^);
+ Inc(FCurrentPosition, 4);
+ btemp := true;
+ if not ReadVariable(vs, btemp) then
+ Break;
+ case Vs.aType.BaseType of
+ btU8: btemp := tbtu8(vs.p^) <> 0;
+ btS8: btemp := tbts8(vs.p^) <> 0;
+ btU16: btemp := tbtu16(vs.p^) <> 0;
+ btS16: btemp := tbts16(vs.p^) <> 0;
+ btU32: btemp := tbtu32(vs.p^) <> 0;
+ btS32: btemp := tbts32(vs.p^) <> 0;
+ else begin
+ CMD_Err(erInvalidType);
+ if vs.FreeType <> vtNone then
+ FTempVars.Pop;
+ break;
+ end;
+ end;
+ if vs.FreeType <> vtNone then
+ FTempVars.Pop;
+ if btemp then
+ FCurrentPosition := FCurrentPosition + p;
+ end;
+ Cm_CNG:
+ begin
+ if FCurrentPosition + 3 >= FDataLength then
+ begin
+ Cmd_Err(erOutOfRange);
+ Break;
+ end;
+ p := Cardinal((@FData^[FCurrentPosition])^);
+ Inc(FCurrentPosition, 4);
+ btemp := true;
+ if not ReadVariable(vs, BTemp) then
+ Break;
+ case Vs.aType.BaseType of
+ btU8: btemp := tbtu8(vs.p^) = 0;
+ btS8: btemp := tbts8(vs.p^) = 0;
+ btU16: btemp := tbtu16(vs.p^) = 0;
+ btS16: btemp := tbts16(vs.p^) = 0;
+ btU32: btemp := tbtu32(vs.p^) = 0;
+ btS32: btemp := tbts32(vs.p^) = 0;
+ else begin
+ CMD_Err(erInvalidType);
+ if vs.FreeType <> vtNone then
+ FTempVars.Pop;
+ break;
+ end;
+ end;
+ if vs.FreeType <> vtNone then
+ FTempVars.Pop;
+ if btemp then
+ FCurrentPosition := FCurrentPosition + p;
+ end;
+ Cm_R: begin
+ FExitPoint := FCurrentPosition -1;
+ P2 := 0;
+ if FExceptionStack.Count > 0 then
+ begin
+ pp := FExceptionStack.Data[FExceptionStack.Count -1];
+ while (pp.BasePtr = FCurrStackBase) or ((pp.BasePtr > FCurrStackBase) and (pp.BasePtr <> InvalidVal)) do
+ begin
+ if pp.StackSize < Cardinal(FStack.Count) then
+ begin
+ for p := Longint(FStack.count) -1 downto Longint(pp.StackSize) do
+ FStack.Pop
+ end;
+ FCurrStackBase := pp.BasePtr;
+ if pp.FinallyOffset <> InvalidVal then
+ begin
+ FCurrentPosition := pp.FinallyOffset;
+ pp.FinallyOffset := InvalidVal;
+ p2 := 1;
+ break;
+ end else if pp.Finally2Offset <> InvalidVal then
+ begin
+ FCurrentPosition := pp.Finally2Offset;
+ pp.Finally2Offset := InvalidVal;
+ p2 := 1;
+ break;
+ end else
+ begin
+ pp.Free;
+ FExceptionStack.DeleteLast;
+ if FExceptionStack.Count = 0 then break;
+ pp := FExceptionStack.Data[FExceptionStack.Count -1];
+ end;
+ end;
+ end;
+ if p2 = 0 then
+ begin
+ FExitPoint := InvalidVal;
+ if FCurrStackBase = InvalidVal then
+ begin
+ FStatus := FOldStatus;
+ break;
+ end;
+ for P2 := FStack.Count - 1 downto FCurrStackBase + 1 do
+ FStack.Pop;
+ if FCurrStackBase >= FStack.Count then
+ begin
+ FStatus := FOldStatus;
+ break;
+ end;
+ vtemp := FStack.Data[FCurrStackBase];
+ FCurrProc := PPSVariantReturnAddress(vtemp).Addr.ProcNo;
+ FCurrentPosition := PPSVariantReturnAddress(vtemp).Addr.Position;
+ FCurrStackBase := PPSVariantReturnAddress(vtemp).Addr.StackBase;
+ FStack.Pop;
+ if FCurrProc = nil then begin
+ FStatus := FOldStatus;
+ break;
+ end;
+ FData := FCurrProc.Data;
+ FDataLength := FCurrProc.Length;
+ end;
+ end;
+ Cm_Pt: begin
+ if FCurrentPosition + 3 >= FDataLength then
+ begin
+ Cmd_Err(erOutOfRange);
+ Break;
+ end;
+ p := Cardinal((@FData^[FCurrentPosition])^);
+ Inc(FCurrentPosition, 4);
+ if p > FTypes.Count then
+ begin
+ CMD_Err(erInvalidType);
+ break;
+ end;
+ FStack.PushType(FTypes.Data^[p]);
+ end;
+ cm_bn:
+ begin
+ if not ReadVariable(vd, True) then
+ Break;
+ if vd.FreeType <> vtNone then
+ FTempVars.Pop;
+ if not DoBooleanNot(Vd.P, vd.aType) then
+ break;
+ end;
+ cm_in:
+ begin
+ if not ReadVariable(vd, True) then
+ Break;
+ if vd.FreeType <> vtNone then
+ FTempVars.Pop;
+ if not DoIntegerNot(Vd.P, vd.aType) then
+ break;
+ end;
+ cm_vm:
+ begin
+ if not ReadVariable(vd, True) then
+ Break;
+ if vd.FreeType <> vtNone then
+ FTempVars.Pop;
+ if not DoMinus(Vd.P, vd.aType) then
+ break;
+ end;
+ cm_sf:
+ begin
+ if not ReadVariable(vd, True) then
+ Break;
+ if FCurrentPosition >= FDataLength then
+ begin
+ CMD_Err(erOutOfRange); // Error
+ if vd.FreeType <> vtNone then
+ FTempVars.Pop;
+ break;
+ end;
+ p := FData^[FCurrentPosition];
+ Inc(FCurrentPosition);
+ case Vd.aType.BaseType of
+ btU8: FJumpFlag := tbtu8(Vd.p^) <> 0;
+ btS8: FJumpFlag := tbts8(Vd.p^) <> 0;
+ btU16: FJumpFlag := tbtu16(Vd.p^) <> 0;
+ btS16: FJumpFlag := tbts16(Vd.p^) <> 0;
+ btU32: FJumpFlag := tbtu32(Vd.p^) <> 0;
+ btS32: FJumpFlag := tbts32(Vd.p^) <> 0;
+ else begin
+ CMD_Err(erInvalidType);
+ if vd.FreeType <> vtNone then
+ FTempVars.Pop;
+ break;
+ end;
+ end;
+ if p <> 0 then
+ FJumpFlag := not FJumpFlag;
+ if vd.FreeType <> vtNone then
+ FTempVars.Pop;
+ end;
+ cm_fg:
+ begin
+ if FCurrentPosition + 3 >= FDataLength then
+ begin
+ Cmd_Err(erOutOfRange);
+ Break;
+ end;
+ p := Cardinal((@FData^[FCurrentPosition])^);
+ Inc(FCurrentPosition, 4);
+ if FJumpFlag then
+ FCurrentPosition := FCurrentPosition + p;
+ end;
+ cm_puexh:
+ begin
+ pp := TPSExceptionHandler.Create;
+ pp.CurrProc := FCurrProc;
+ pp.BasePtr :=FCurrStackBase;
+ pp.StackSize := FStack.Count;
+ if not ReadLong(pp.FinallyOffset) then begin
+ CMD_Err(erOutOfRange);
+ pp.Free;
+ Break;
+ end;
+ if not ReadLong(pp.ExceptOffset) then begin
+ CMD_Err(erOutOfRange);
+ pp.Free;
+ Break;
+ end;
+ if not ReadLong(pp.Finally2Offset) then begin
+ CMD_Err(erOutOfRange);
+ pp.Free;
+ Break;
+ end;
+ if not ReadLong(pp.EndOfBlock) then begin
+ CMD_Err(erOutOfRange);
+ pp.Free;
+ Break;
+ end;
+ if pp.FinallyOffset <> InvalidVal then
+ pp.FinallyOffset := pp.FinallyOffset + FCurrentPosition;
+ if pp.ExceptOffset <> InvalidVal then
+ pp.ExceptOffset := pp.ExceptOffset + FCurrentPosition;
+ if pp.Finally2Offset <> InvalidVal then
+ pp.Finally2Offset := pp.Finally2Offset + FCurrentPosition;
+ if pp.EndOfBlock <> InvalidVal then
+ pp.EndOfBlock := pp.EndOfBlock + FCurrentPosition;
+ if ((pp.FinallyOffset <> InvalidVal) and (pp.FinallyOffset >= FDataLength)) or
+ ((pp.ExceptOffset <> InvalidVal) and (pp.ExceptOffset >= FDataLength)) or
+ ((pp.Finally2Offset <> InvalidVal) and (pp.Finally2Offset >= FDataLength)) or
+ ((pp.EndOfBlock <> InvalidVal) and (pp.EndOfBlock >= FDataLength)) then
+ begin
+ CMD_Err(ErOutOfRange);
+ pp.Free;
+ Break;
+ end;
+ FExceptionStack.Add(pp);
+ end;
+ cm_poexh:
+ begin
+ if FCurrentPosition >= FDataLength then
+ begin
+ CMD_Err(erOutOfRange); // Error
+ break;
+ end;
+ p := FData^[FCurrentPosition];
+ Inc(FCurrentPosition);
+ case p of
+ 2:
+ begin
+ if (FExceptionStack.Count = 0) then
+ begin
+ cmd_err(ErOutOfRange);
+ Break;
+ end;
+ pp := FExceptionStack.Data^[FExceptionStack.Count -1];
+ if pp = nil then begin
+ cmd_err(ErOutOfRange);
+ Break;
+ end;
+ pp.ExceptOffset := InvalidVal;
+ if pp.Finally2Offset <> InvalidVal then
+ begin
+ FCurrentPosition := pp.Finally2Offset;
+ pp.Finally2Offset := InvalidVal;
+ end else begin
+ p := pp.EndOfBlock;
+ pp.Free;
+ FExceptionStack.DeleteLast;
+ if FExitPoint <> InvalidVal then
+ begin
+ FCurrentPosition := FExitPoint;
+ end else begin
+ FCurrentPosition := p;
+ end;
+ end;
+ end;
+ 0:
+ begin
+ pp := FExceptionStack.Data^[FExceptionStack.Count -1];
+ if pp = nil then begin
+ cmd_err(ErOutOfRange);
+ Break;
+ end;
+ if pp.FinallyOffset <> InvalidVal then
+ begin
+ FCurrentPosition := pp.FinallyOffset;
+ pp.FinallyOffset := InvalidVal;
+ end else if pp.Finally2Offset <> InvalidVal then
+ begin
+ FCurrentPosition := pp.Finally2Offset;
+ pp.ExceptOffset := InvalidVal;
+ end else begin
+ p := pp.EndOfBlock;
+ pp.Free;
+ FExceptionStack.DeleteLast;
+ if ExEx <> eNoError then
+ begin
+ Tmp := ExObject;
+ ExObject := nil;
+ ExceptionProc(ExProc, ExPos, ExEx, ExParam, Tmp);
+ end else
+ if FExitPoint <> InvalidVal then
+ begin
+ FCurrentPosition := FExitPoint;
+ end else begin
+ FCurrentPosition := p;
+ end;
+ end;
+ end;
+ 1:
+ begin
+ pp := FExceptionStack.Data^[FExceptionStack.Count -1];
+ if pp = nil then begin
+ cmd_err(ErOutOfRange);
+ Break;
+ end;
+ if (ExEx <> ENoError) and (pp.ExceptOffset <> InvalidVal) and (pp.ExceptOffset <> InvalidVal -1) then
+ begin
+ FCurrentPosition := pp.ExceptOffset;
+ pp.ExceptOffset := Cardinal(InvalidVal -1);
+ pp.ExceptionData := ExEx;
+ pp.ExceptionObject := ExObject;
+ pp.ExceptionParam := ExParam;
+ ExEx := ErNoError;
+ ExObject := nil;
+ end else if (pp.Finally2Offset <> InvalidVal) then
+ begin
+ FCurrentPosition := pp.Finally2Offset;
+ pp.Finally2Offset := InvalidVal;
+ end else begin
+ p := pp.EndOfBlock;
+ pp.Free;
+ FExceptionStack.DeleteLast;
+ if (ExEx <> eNoError) and (p <> InvalidVal) then
+ begin
+ Tmp := ExObject;
+ ExObject := nil;
+ ExceptionProc(ExProc, ExPos, ExEx, ExParam, Tmp);
+ end else
+ if FExitPoint <> InvalidVal then
+ begin
+ FCurrentPosition := FExitPoint;
+ end else begin
+ FCurrentPosition := p;
+ end;
+ end;
+ end;
+ 3:
+ begin
+ pp := FExceptionStack.Data^[FExceptionStack.Count -1];
+ if pp = nil then begin
+ cmd_err(ErOutOfRange);
+ Break;
+ end;
+ p := pp.EndOfBlock;
+ pp.Free;
+ FExceptionStack.DeleteLast;
+ if ExEx <> eNoError then
+ begin
+ Tmp := ExObject;
+ ExObject := nil;
+ ExceptionProc(ExProc, ExPos, ExEx, ExParam, Tmp);
+ end else
+ if FExitPoint <> InvalidVal then
+ begin
+ FCurrentPosition := FExitPoint;
+ end else begin
+ FCurrentPosition := p;
+ end;
+ end;
+ end;
+ end;
+ cm_spc:
+ begin
+ if not ReadVariable(vd, False) then
+ Break;
+ if vd.FreeType <> vtNone then
+ begin
+ FTempVars.Pop;
+ CMD_Err(erInvalidOpcodeParameter);
+ break;
+ end;
+ if (Vd.aType.BaseType <> btPointer) then
+ begin
+ CMD_Err(erInvalidOpcodeParameter);
+ break;
+ end;
+ if not ReadVariable(vs, False) then
+ Break;
+ if Pointer(Pointer(IPointer(vD.P)+8)^) <> nil then
+ DestroyHeapVariant2(Pointer(vD.P^), Pointer(Pointer(IPointer(vd.P)+4)^));
+ if vs.aType.BaseType = btPointer then
+ begin
+ if Pointer(vs.P^) <> nil then
+ begin
+ Pointer(vd.P^) := CreateHeapVariant2(Pointer(Pointer(IPointer(vs.P) + 4)^));
+ Pointer(Pointer(IPointer(vd.P) + 4)^) := Pointer(Pointer(IPointer(vs.P) + 4)^);
+ Pointer(Pointer(IPointer(vd.P) + 8)^) := Pointer(1);
+ if not CopyArrayContents(Pointer(vd.P^), Pointer(vs.P^), 1, Pointer(Pointer(IPointer(vd.P) + 4)^)) then
+ begin
+ if vs.FreeType <> vtNone then
+ FTempVars.Pop;
+ CMD_Err(ErTypeMismatch);
+ break;
+ end;
+ end else
+ begin
+ Pointer(vd.P^) := nil;
+ Pointer(Pointer(IPointer(vd.P) + 4)^) := nil;
+ Pointer(Pointer(IPointer(vd.P) + 8)^) := nil;
+ end;
+ end else begin
+ Pointer(vd.P^) := CreateHeapVariant2(vs.aType);
+ Pointer(Pointer(IPointer(vd.P) + 4)^) := vs.aType;
+ Pointer(Pointer(IPointer(vd.P) + 8)^) := Pointer(1);
+ if not CopyArrayContents(Pointer(vd.P^), vs.P, 1, vs.aType) then
+ begin
+ if vs.FreeType <> vtNone then
+ FTempVars.Pop;
+ CMD_Err(ErTypeMismatch);
+ break;
+ end;
+ end;
+ if vs.FreeType <> vtNone then
+ FTempVars.Pop;
+
+ end;
+ cm_nop:;
+ cm_dec:
+ begin
+ if not ReadVariable(vd, True) then
+ Break;
+ if vd.FreeType <> vtNone then
+ begin
+ FTempVars.Pop;
+ CMD_Err(erInvalidOpcodeParameter);
+ break;
+ end;
+ case vd.aType.BaseType of
+ btu8: dec(tbtu8(vd.P^));
+ bts8: dec(tbts8(vd.P^));
+ btu16: dec(tbtu16(vd.P^));
+ bts16: dec(tbts16(vd.P^));
+ btu32: dec(tbtu32(vd.P^));
+ bts32: dec(tbts32(vd.P^));
+{$IFNDEF PS_NOINT64}
+ bts64: dec(tbts64(vd.P^));
+{$ENDIF}
+ else
+ begin
+ CMD_Err(ErTypeMismatch);
+ Break;
+ end;
+ end;
+ end;
+ cm_inc:
+ begin
+ if not ReadVariable(vd, True) then
+ Break;
+ if vd.FreeType <> vtNone then
+ begin
+ FTempVars.Pop;
+ CMD_Err(erInvalidOpcodeParameter);
+ break;
+ end;
+ case vd.aType.BaseType of
+ btu8: Inc(tbtu8(vd.P^));
+ bts8: Inc(tbts8(vd.P^));
+ btu16: Inc(tbtu16(vd.P^));
+ bts16: Inc(tbts16(vd.P^));
+ btu32: Inc(tbtu32(vd.P^));
+ bts32: Inc(tbts32(vd.P^));
+{$IFNDEF PS_NOINT64}
+ bts64: Inc(tbts64(vd.P^));
+{$ENDIF}
+ else
+ begin
+ CMD_Err(ErTypeMismatch);
+ Break;
+ end;
+ end;
+ end;
+ cm_sp:
+ begin
+ if not ReadVariable(vd, False) then
+ Break;
+ if vd.FreeType <> vtNone then
+ begin
+ FTempVars.Pop;
+ CMD_Err(erInvalidOpcodeParameter);
+ break;
+ end;
+ if (Vd.aType.BaseType <> btPointer) then
+ begin
+ CMD_Err(erInvalidOpcodeParameter);
+ break;
+ end;
+ if not ReadVariable(vs, False) then
+ Break;
+ if vs.FreeType <> vtNone then
+ begin
+ FTempVars.Pop;
+ CMD_Err(erInvalidOpcodeParameter);
+ break;
+ end;
+ if vs.aType.BaseType = btPointer then
+ begin
+ Pointer(vd.P^) := Pointer(vs.p^);
+ Pointer(Pointer(IPointer(vd.P)+4)^) := Pointer(Pointer(IPointer(vs.P)+4)^);
+ end
+ else
+ begin
+ Pointer(vd.P^) := vs.P;
+ Pointer(Pointer(IPointer(vd.P)+4)^) := vs.aType;
+ end;
+ end;
+ Cm_cv:
+ begin
+ if not ReadVariable(vd, True) then
+ Break;
+ if vd.aType.BaseType <> btProcPtr then
+ begin
+ if vd.FreeType <> vtNone then
+ FTempVars.Pop;
+ CMD_Err(ErTypeMismatch);
+ break;
+ end;
+ p := tbtu32(vd.P^);
+ if vd.FreeType <> vtNone then
+ FTempVars.Pop;
+ if (p = 0) and (Pointer(Pointer(IPointer(vd.p)+8)^) <> nil) then
+ begin
+ if not InvokeExternalMethod(TPSTypeRec_ProcPtr(vd.aType), Pointer(Pointer(IPointer(vd.p)+4)^), Pointer(Pointer(IPointer(vd.p)+8)^)) then
+ Break;
+ end else begin
+ if (p >= FProcs.Count) or (p = FMainProc) then begin
+ CMD_Err(erOutOfProcRange);
+ break;
+ end;
+ u := FProcs.Data^[p];
+ if u.ClassType = TPSExternalProcRec then begin
+ try
+ if not TPSExternalProcRec(u).ProcPtr(Self, TPSExternalProcRec(u), FGlobalVars, FStack) then
+ Break;
+ except
+ {$IFDEF DELPHI6UP}
+ Tmp := AcquireExceptionObject;
+ {$ELSE}
+ if RaiseList <> nil then
+ begin
+ Tmp := Exception(PRaiseFrame(RaiseList)^.ExceptObject);
+ PRaiseFrame(RaiseList)^.ExceptObject := nil;
+ end else
+ Tmp := nil;
+ {$ENDIF}
+ if Tmp <> nil then
+ begin
+ if Tmp is EPSException then
+ begin
+ ExceptionProc(EPSException(tmp).ProcNo, EPSException(tmp).ProcPos, erCustomError, EPSException(tmp).Message, nil);
+ break;
+ end else
+ if Tmp is EDivByZero then
+ begin
+ CMD_Err3(erDivideByZero, '', Tmp);
+ break;
+ end;
+ if Tmp is EZeroDivide then
+ begin
+ CMD_Err3(erDivideByZero, '', Tmp);
+ break;
+ end;
+ if Tmp is EMathError then
+ begin
+ CMD_Err3(erMathError, '', Tmp);
+ break;
+ end;
+ end;
+ if (Tmp <> nil) and (Tmp is Exception) then
+ CMD_Err3(erException, Exception(Tmp).Message, Tmp) else
+ CMD_Err3(erException, '', Tmp);
+ Break;
+ end;
+ end
+ else begin
+ vtemp := FStack.PushType(FReturnAddressType);
+ PPSVariantReturnAddress(vtemp).Addr.ProcNo := FCurrProc;
+ PPSVariantReturnAddress(vtemp).Addr.Position := FCurrentPosition;
+ PPSVariantReturnAddress(vtemp).Addr.StackBase := FCurrStackBase;
+ FCurrStackBase := FStack.Count - 1;
+ FCurrProc := TPSInternalProcRec(u);
+ FData := FCurrProc.Data;
+ FDataLength := FCurrProc.Length;
+ FCurrentPosition := 0;
+ end;
+ end;
+ end;
+ CM_CO:
+ begin
+ if FCurrentPosition >= FDataLength then
+ begin
+ CMD_Err(erOutOfRange); // Error
+ break;
+ end;
+ calctype := FData^[FCurrentPosition];
+ Inc(FCurrentPosition);
+ if not ReadVariable(v3, True) then
+ Break;
+ if v3.FreeType <> vtNone then
+ begin
+ if v3.aType.BaseType in NeedFinalization then
+ FinalizeVariant(v3.P, v3.aType);
+ p := IPointer(FTempVars.Data^[FtempVars.Count-1]) - IPointer(FtempVars.DataPtr);
+ Dec(FTempVars.FCount);
+ {$IFNDEF PS_NOSMARTLIST}
+ Inc(FTempVars.FCheckCount);
+ if FTempVars.FCheckCount > FMaxCheckCount then FTempVars.Recreate;
+ {$ENDIF}
+ FTempVars.FLength := P;
+ if ((FTempVars.FCapacity - FTempVars.FLength) shr 12) > 2 then FTempVars.AdjustLength;
+ CMD_Err(erInvalidOpcodeParameter);
+ break;
+ end;
+ if not ReadVariable(vs, True) then
+ Break;
+ if not ReadVariable(vd, True) then
+ begin
+ if vs.FreeType <> vtNone then
+ begin
+ if vs.aType.BaseType in NeedFinalization then
+ FinalizeVariant(vs.P, vs.aType);
+ p := IPointer(FTempVars.Data^[FtempVars.Count-1]) - IPointer(FtempVars.DataPtr);
+ Dec(FTempVars.FCount);
+ {$IFNDEF PS_NOSMARTLIST}
+ Inc(FTempVars.FCheckCount);
+ if FTempVars.FCheckCount > FMaxCheckCount then FTempVars.Recreate;
+ {$ENDIF}
+ FTempVars.FLength := P;
+ if ((FTempVars.FCapacity - FTempVars.FLength) shr 12) > 2 then FTempVars.AdjustLength;
+ end;
+ Break;
+ end;
+ DoBooleanCalc(Vs.P, Vd.P, v3.P, vs.aType, vd.aType, v3.aType, CalcType);
+ if vd.FreeType <> vtNone then
+ begin
+ if vd.aType.BaseType in NeedFinalization then
+ FinalizeVariant(vd.P, vd.aType);
+ p := IPointer(FTempVars.Data^[FtempVars.Count-1]) - IPointer(FtempVars.DataPtr);
+ Dec(FTempVars.FCount);
+ {$IFNDEF PS_NOSMARTLIST}
+ Inc(FTempVars.FCheckCount);
+ if FTempVars.FCheckCount > FMaxCheckCount then FTempVars.Recreate;
+ {$ENDIF}
+ FTempVars.FLength := P;
+ if ((FTempVars.FCapacity - FTempVars.FLength) shr 12) > 2 then FTempVars.AdjustLength;
+ end;
+ if vs.FreeType <> vtNone then
+ begin
+ if vs.aType.BaseType in NeedFinalization then
+ FinalizeVariant(vs.P, vs.aType);
+ p := IPointer(FTempVars.Data^[FtempVars.Count-1]) - IPointer(FtempVars.DataPtr);
+ Dec(FTempVars.FCount);
+ {$IFNDEF PS_NOSMARTLIST}
+ Inc(FTempVars.FCheckCount);
+ if FTempVars.FCheckCount > FMaxCheckCount then FTempVars.Recreate;
+ {$ENDIF}
+ FTempVars.FLength := P;
+ if ((FTempVars.FCapacity - FTempVars.FLength) shr 12) > 2 then FTempVars.AdjustLength;
+ end;
+ end;
+
+ else
+ CMD_Err(erInvalidOpcode); // Error
+ end;
+ end;
+// if cmd <> invalidval then ProfilerExitProc(Cmd+1);
+// if ExEx <> erNoError then FStatus := FOldStatus;
+ until (FExceptionStack.Count = 0) or (Fstatus <> IsRunning);
+ if FStatus = isLoaded then begin
+ for I := Longint(FStack.Count) - 1 downto 0 do
+ FStack.Pop;
+ FStack.Clear;
+ if FCallCleanup then Cleanup;
+ end;
+ Result := ExEx = erNoError;
+end;
+
+function NVarProc(Caller: TPSExec; p: TPSExternalProcRec; Global, Stack: TPSStack): Boolean;
+var
+ tmp: TPSVariantIFC;
+begin
+ case Longint(p.Ext1) of
+ 0:
+ begin
+ if @Caller.FOnSetNVariant = nil then begin Result := False; exit; end;
+ tmp := NewTPSVariantIFC(Stack.Items[Stack.Count - 2], True);
+ if (Tmp.Dta = nil) or (tmp.aType.BaseType <> btVariant) then begin Result := False; exit; end;
+ Caller.FOnSetNVariant(Caller, Stack.GetString(-1), Variant(tmp.Dta^));
+ Result := true;
+ end;
+ 1:
+ begin
+ if @Caller.FOnGetNVariant = nil then begin Result := False; exit; end;
+ tmp := NewTPSVariantIFC(Stack.Items[Stack.Count - 1], False);
+ if (Tmp.Dta = nil) or (tmp.aType.BaseType <> btVariant) then begin Result := False; exit; end;
+ Variant(tmp.Dta^) := Caller.FOnGetNVariant(Caller, Stack.GetString(-2));
+ Result := true;
+ end;
+ else
+ Result := False;
+ end;
+end;
+
+function DefProc(Caller: TPSExec; p: TPSExternalProcRec; Global, Stack: TPSStack): Boolean;
+var
+ temp: TPSVariantIFC;
+ I: Longint;
+ b: Boolean;
+ pex: TPSExceptionHandler;
+ Tmp: TObject;
+begin
+ case Longint(p.Ext1) of
+ 0: Stack.SetString(-1, IntToStr(Stack.{$IFNDEF PS_NOINT64}GetInt64{$ELSE}GetInt{$ENDIF}(-2))); // inttostr
+ 1: Stack.SetInt(-1, SysUtils.StrToInt(Stack.GetString(-2))); // strtoint
+ 2: Stack.SetInt(-1, StrToIntDef(Stack.GetString(-2), Stack.GetInt(-3))); // strtointdef
+ 3: Stack.SetInt(-1, Pos(Stack.GetString(-2), Stack.GetString(-3)));// pos
+ 4: Stack.SetString(-1, Copy(Stack.GetString(-2), Stack.GetInt(-3), Stack.GetInt(-4))); // copy
+ 5: //delete
+ begin
+ temp := NewTPSVariantIFC(Stack[Stack.Count -1], True);
+ if (temp.Dta = nil) or (temp.aType.BaseType <> btString) then
+ begin
+ Result := False;
+ exit;
+ end;
+ Delete(tbtstring(temp.Dta^), Stack.GetInt(-2), Stack.GetInt(-3));
+ end;
+ 6: // insert
+ begin
+ temp := NewTPSVariantIFC(Stack[Stack.Count -2], True);
+ if (temp.Dta = nil) or (temp.aType.BaseType <> btString) then
+ begin
+ Result := False;
+ exit;
+ end;
+ Insert(Stack.GetString(-1), tbtstring(temp.Dta^), Stack.GetInt(-3));
+ end;
+ 7: // StrGet
+ begin
+ temp := NewTPSVariantIFC(Stack[Stack.Count -2], True);
+ if (temp.Dta = nil) or (temp.aType.BaseType <> btString) then
+ begin
+ Result := False;
+ exit;
+ end;
+ I := Stack.GetInt(-3);
+ if (i<1) or (i>length(tbtstring(temp.Dta^))) then
+ begin
+ Caller.CMD_Err2(erCustomError, RPS_OutOfStringRange);
+ Result := False;
+ exit;
+ end;
+ Stack.SetInt(-1,Ord(tbtstring(temp.Dta^)[i]));
+ end;
+ 8: // StrSet
+ begin
+ temp := NewTPSVariantIFC(Stack[Stack.Count -3], True);
+ if (temp.Dta = nil) or (temp.aType.BaseType <> btString) then
+ begin
+ Result := False;
+ exit;
+ end;
+ I := Stack.GetInt(-2);
+ if (i<1) or (i>length(tbtstring(temp.Dta^))) then
+ begin
+ Caller.CMD_Err2(erCustomError, RPS_OutOfStringRange);
+ Result := True;
+ exit;
+ end;
+ tbtstring(temp.Dta^)[i] := chr(Stack.GetInt(-1));
+ end;
+ 10: Stack.SetString(-1, FastUppercase(Stack.GetString(-2))); // Uppercase
+ 11: Stack.SetString(-1, FastLowercase(Stack.GetString(-2)));// LowerCase
+ 12: Stack.SetString(-1, Trim(Stack.GetString(-2)));// Trim
+ 13: Stack.SetInt(-1, Length(Stack.GetString(-2))); // Length
+ 14: // SetLength
+ begin
+ temp := NewTPSVariantIFC(Stack[Stack.Count -1], True);
+ if (temp.Dta = nil) or (temp.aType.BaseType <> btString) then
+ begin
+ Result := False;
+ exit;
+ end;
+ SetLength(tbtstring(temp.Dta^), STack.GetInt(-2));
+ end;
+ 15: Stack.SetReal(-1, Sin(Stack.GetReal(-2))); // Sin
+ 16: Stack.SetReal(-1, Cos(Stack.GetReal(-2))); // Cos
+ 17: Stack.SetReal(-1, SQRT(Stack.GetReal(-2))); // Sqrt
+ 18: Stack.SetInt(-1, Round(Stack.GetReal(-2))); // Round
+ 19: Stack.SetInt(-1, Trunc(Stack.GetReal(-2))); // Trunc
+ 20: Stack.SetReal(-1, Int(Stack.GetReal(-2))); // Int
+ 21: Stack.SetReal(-1, Pi); // Pi
+ 22: Stack.SetReal(-1, Abs(Stack.GetReal(-2))); // Abs
+ 23: Stack.SetReal(-1, StrToFloat(Stack.GetString(-2))); // StrToFloat
+ 24: Stack.SetString(-1, FloatToStr(Stack.GetReal(-2)));// FloatToStr
+ 25: Stack.SetString(-1, PadL(Stack.GetString(-2), Stack.GetInt(-3))); // PadL
+ 26: Stack.SetString(-1, PadR(Stack.GetString(-2), Stack.GetInt(-3))); // PadR
+ 27: Stack.SetString(-1, PadZ(Stack.GetString(-2), Stack.GetInt(-3)));// PadZ
+ 28: Stack.SetString(-1, StringOfChar(Char(Stack.GetInt(-2)), Stack.GetInt(-3))); // Replicate/StrOfChar
+ 29: // Assigned
+ begin
+ temp := NewTPSVariantIFC(Stack[Stack.Count -2], True);
+ if Temp.dta = nil then
+ begin
+ Result := False;
+ exit;
+ end;
+ case temp.aType.BaseType of
+ btU8, btS8: b := tbtu8(temp.dta^) <> 0;
+ btU16, btS16: b := tbtu16(temp.dta^) <> 0;
+ btU32, btS32: b := tbtu32(temp.dta^) <> 0;
+ btString, btPChar: b := tbtstring(temp.dta^) <> '';
+{$IFNDEF PS_NOWIDESTRING}
+ btWideString: b := tbtwidestring(temp.dta^)<> '';
+{$ENDIF}
+ btArray, btClass{$IFNDEF PS_NOINTERFACES}, btInterface{$ENDIF}: b := Pointer(temp.dta^) <> nil;
+ else
+ Result := False;
+ Exit;
+ end;
+ if b then
+ Stack.SetInt(-1, 1)
+ else
+ Stack.SetInt(-1, 0);
+ end;
+ 30:
+ begin {RaiseLastException}
+ if (Caller.FExceptionStack.Count > 0) then begin
+ pex := Caller.FExceptionStack.Data[Caller.fExceptionStack.Count -1];
+ if pex.ExceptOffset = Cardinal(InvalidVal -1) then begin
+ Tmp := pex.ExceptionObject;
+ pex.ExceptionObject := nil;
+ Caller.ExceptionProc(Caller.ExProc, pex.ExceptOffset, pex.ExceptionData, pex.ExceptionParam, tmp);
+ end;
+ end;
+ end;
+ 31: Caller.CMD_Err2(TPSError(Stack.GetInt(-1)), Stack.GetString(-2)); {RaiseExeption}
+ 32: Stack.SetInt(-1, Ord(Caller.LastEx)); {ExceptionType}
+ 33: Stack.SetString(-1, Caller.LastExParam); {ExceptionParam}
+ 34: Stack.SetInt(-1, Caller.LastExProc); {ExceptionProc}
+ 35: Stack.SetInt(-1, Caller.LastExPos); {ExceptionPos}
+ 36: Stack.SetString(-1, PSErrorToString(TPSError(Stack.GetInt(-2)), Stack.GetString(-3))); {ExceptionToString}
+ 37: Stack.SetString(-1, AnsiUpperCase(Stack.GetString(-2))); // AnsiUppercase
+ 38: Stack.SetString(-1, AnsiLowercase(Stack.GetString(-2)));// AnsiLowerCase
+{$IFNDEF PS_NOINT64}
+ 39: Stack.SetInt64(-1, StrToInt64(Stack.GetString(-2))); // StrToInt64
+ 40: Stack.SetString(-1, SysUtils.IntToStr(Stack.GetInt64(-2)));// Int64ToStr
+{$ENDIF}
+ 41: // sizeof
+ begin
+ temp := NewTPSVariantIFC(Stack[Stack.Count -2], False);
+ if Temp.aType = nil then
+ Stack.SetInt(-1, 0)
+ else
+ Stack.SetInt(-1, Temp.aType.RealSize)
+ end;
+{$IFNDEF PS_NOWIDESTRING}
+ 42: // WStrGet
+ begin
+ temp := NewTPSVariantIFC(Stack[Stack.Count -2], True);
+ if (temp.Dta = nil) or (temp.aType.BaseType <> btWideString) then
+ begin
+ Result := False;
+ exit;
+ end;
+ I := Stack.GetInt(-3);
+ if (i<1) or (i>length(tbtwidestring(temp.Dta^))) then
+ begin
+ Caller.CMD_Err2(erCustomError, RPS_OutOfStringRange);
+ Result := False;
+ exit;
+ end;
+ Stack.SetInt(-1,Ord(tbtwidestring(temp.Dta^)[i]));
+ end;
+ 43: // WStrSet
+ begin
+ temp := NewTPSVariantIFC(Stack[Stack.Count -3], True);
+ if (temp.Dta = nil) or (temp.aType.BaseType <> btWideString) then
+ begin
+ Result := False;
+ exit;
+ end;
+ I := Stack.GetInt(-2);
+ if (i<1) or (i>length(tbtWidestring(temp.Dta^))) then
+ begin
+ Caller.CMD_Err2(erCustomError, RPS_OutOfStringRange);
+ Result := True;
+ exit;
+ end;
+ tbtWidestring(temp.Dta^)[i] := WideChar(Stack.GetInt(-1));
+ end;
+{$ENDIF}
+ else
+ begin
+ Result := False;
+ exit;
+ end;
+ end;
+ Result := True;
+end;
+function GetArrayLength(Caller: TPSExec; p: TPSExternalProcRec; Global, Stack: TPSStack): Boolean;
+var
+ arr: TPSVariantIFC;
+begin
+ Arr := NewTPSVariantIFC(Stack[Stack.Count-2], True);
+ if (arr.Dta = nil) or (arr.aType.BaseType <> btArray) then
+ begin
+ Result := false;
+ exit;
+ end;
+ Stack.SetInt(-1, PSDynArrayGetLength(Pointer(arr.Dta^), arr.aType));
+ Result := True;
+end;
+
+function SetArrayLength(Caller: TPSExec; p: TPSExternalProcRec; Global, Stack: TPSStack): Boolean;
+var
+ arr: TPSVariantIFC;
+begin
+ Arr := NewTPSVariantIFC(Stack[Stack.Count-1], True);
+ if (arr.Dta = nil) or (arr.aType.BaseType <> btArray) then
+ begin
+ Result := false;
+ exit;
+ end;
+ PSDynArraySetLength(Pointer(arr.Dta^), arr.aType, Stack.GetInt(-2));
+ Result := True;
+end;
+
+
+function InterfaceProc(Sender: TPSExec; p: TPSExternalProcRec; Tag: Pointer): Boolean; forward;
+
+procedure RegisterInterfaceLibraryRuntime(Se: TPSExec);
+begin
+ SE.AddSpecialProcImport('intf', InterfaceProc, nil);
+end;
+
+{$IFNDEF DELPHI6UP}
+function Null: Variant;
+begin
+ Result := System.Null;
+end;
+
+function Unassigned: Variant;
+begin
+ Result := System.Unassigned;
+end;
+{$ENDIF}
+function Length_(Caller: TPSExec; p: TPSExternalProcRec; Global, Stack: TPSStack): Boolean;
+var
+ arr: TPSVariantIFC;
+begin
+ arr:=NewTPSVariantIFC(Stack[Stack.Count-2],false);
+ case arr.aType.BaseType of
+ btArray:
+ begin
+ Stack.SetInt(-1,PSDynArrayGetLength(Pointer(arr.Dta^),arr.aType));
+ Result:=true;
+ end;
+ btStaticArray:
+ begin
+ Stack.SetInt(-1,TPSTypeRec_StaticArray(arr.aType).Size);
+ Result:=true;
+ end;
+ btString:
+ begin
+ Stack.SetInt(-1,length(tbtstring(arr.Dta^)));
+ Result:=true;
+ end;
+ {$IFNDEF PS_NOWIDESTRING}
+ btWideString:
+ begin
+ Stack.SetInt(-1,length(tbtWidestring(arr.Dta^)));
+ Result:=true;
+ end;
+ {$ENDIF}
+ btvariant:
+ begin
+ Stack.SetInt(-1,length(Variant(arr.Dta^)));
+ Result:=true;
+ end;
+ else
+ begin
+ Caller.CMD_Err(ErTypeMismatch);
+ result := true;
+ end;
+ end;
+end;
+
+
+function SetLength_(Caller: TPSExec; p: TPSExternalProcRec; Global, Stack: TPSStack): Boolean;
+var
+ arr: TPSVariantIFC;
+begin
+ Result:=false;
+ arr:=NewTPSVariantIFC(Stack[Stack.Count-1],true);
+ if arr.aType.BaseType=btArray then
+ begin
+ PSDynArraySetLength(Pointer(arr.Dta^),arr.aType,Stack.GetInt(-2));
+ Result:=true;
+ end else
+ if arr.aType.BaseType=btString then
+ begin
+ SetLength(tbtstring(arr.Dta^),STack.GetInt(-2));
+ Result:=true;
+{$IFNDEF PS_NOWIDESTRING}
+ end else
+ if arr.aType.BaseType=btWideString then
+ begin
+ SetLength(tbtwidestring(arr.Dta^),STack.GetInt(-2));
+ Result:=true;
+{$ENDIF}
+ end;
+end;
+
+function Low_(Caller: TPSExec; p: TPSExternalProcRec; Global, Stack: TPSStack): Boolean;
+var
+ arr: TPSVariantIFC;
+begin
+ Result:=true;
+ arr:=NewTPSVariantIFC(Stack[Stack.Count-2],false);
+ case arr.aType.BaseType of
+ btArray : Stack.SetInt(-1,0);
+ btStaticArray: Stack.SetInt(-1,TPSTypeRec_StaticArray(arr.aType).StartOffset);
+ btString : Stack.SetInt(-1,1);
+ btU8 : Stack.SetInt(-1,Low(Byte)); //Byte: 0
+ btS8 : Stack.SetInt(-1,Low(ShortInt)); //ShortInt: -128
+ btU16 : Stack.SetInt(-1,Low(Word)); //Word: 0
+ btS16 : Stack.SetInt(-1,Low(SmallInt)); //SmallInt: -32768
+ btU32 : Stack.SetInt(-1,Low(Cardinal)); //Cardinal/LongWord: 0
+ btS32 : Stack.SetInt(-1,Low(Integer)); //Integer/LongInt: -2147483648
+ else Result:=false;
+ end;
+end;
+
+function High_(Caller: TPSExec; p: TPSExternalProcRec; Global, Stack: TPSStack): Boolean;
+var
+ arr: TPSVariantIFC;
+begin
+ Result:=true;
+ arr:=NewTPSVariantIFC(Stack[Stack.Count-2],false);
+ case arr.aType.BaseType of
+ btArray : Stack.SetInt(-1,PSDynArrayGetLength(Pointer(arr.Dta^),arr.aType)-1);
+ btStaticArray: Stack.SetInt(-1,TPSTypeRec_StaticArray(arr.aType).StartOffset+TPSTypeRec_StaticArray(arr.aType).Size-1);
+ btString : Stack.SetInt(-1,Length(tbtstring(arr.Dta^)));
+ btU8 : Stack.SetInt(-1,High(Byte)); //Byte: 255
+ btS8 : Stack.SetInt(-1,High(ShortInt)); //ShortInt: 127
+ btU16 : Stack.SetInt(-1,High(Word)); //Word: 65535
+ btS16 : Stack.SetInt(-1,High(SmallInt)); //SmallInt: 32767
+ btU32 : Stack.SetUInt(-1,High(Cardinal)); //Cardinal/LongWord: 4294967295
+ btS32 : Stack.SetInt(-1,High(Integer)); //Integer/LongInt: 2147483647
+ else Result:=false;
+ end;
+end;
+
+function Dec_(Caller: TPSExec; p: TPSExternalProcRec; Global, Stack: TPSStack): Boolean;
+var
+ arr: TPSVariantIFC;
+begin
+ Result:=true;
+ arr:=NewTPSVariantIFC(Stack[Stack.Count-1],true);
+ case arr.aType.BaseType of
+ btU8 : Stack.SetInt(-1,Tbtu8(arr.dta^)-1); //Byte
+ btS8 : Stack.SetInt(-1,Tbts8(arr.dta^)-1); //ShortInt
+ btU16 : Stack.SetInt(-1,Tbtu16(arr.dta^)-1); //Word
+ btS16 : Stack.SetInt(-1,Tbts16(arr.dta^)-1); //SmallInt
+ btU32 : Stack.SetInt(-1,Tbtu32(arr.dta^)-1); //Cardinal/LongWord
+ btS32 : Stack.SetInt(-1,Tbts32(arr.dta^)-1); //Integer/LongInt
+ else Result:=false;
+ end;
+end;
+
+function Inc_(Caller: TPSExec; p: TPSExternalProcRec; Global, Stack: TPSStack): Boolean;
+var
+ arr: TPSVariantIFC;
+begin
+ Result:=true;
+ arr:=NewTPSVariantIFC(Stack[Stack.Count-1],true);
+ case arr.aType.BaseType of
+ btU8 : Stack.SetInt(-1,Tbtu8(arr.dta^)+1); //Byte
+ btS8 : Stack.SetInt(-1,Tbts8(arr.dta^)+1); //ShortInt
+ btU16 : Stack.SetInt(-1,Tbtu16(arr.dta^)+1); //Word
+ btS16 : Stack.SetInt(-1,Tbts16(arr.dta^)+1); //SmallInt
+ btU32 : Stack.SetInt(-1,Tbtu32(arr.dta^)+1); //Cardinal/LongWord
+ btS32 : Stack.SetInt(-1,Tbts32(arr.dta^)+1); //Integer/LongInt
+ else Result:=false;
+ end;
+end;
+
+
+procedure TPSExec.RegisterStandardProcs;
+begin
+ RegisterFunctionName('!NOTIFICATIONVARIANTSET', NVarProc, Pointer(0), nil);
+ RegisterFunctionName('!NOTIFICATIONVARIANTGET', NVarProc, Pointer(1), nil);
+
+ RegisterFunctionName('INTTOSTR', DefProc, Pointer(0), nil);
+ RegisterFunctionName('STRTOINT', DefProc, Pointer(1), nil);
+ RegisterFunctionName('STRTOINTDEF', DefProc, Pointer(2), nil);
+ RegisterFunctionName('POS', DefProc, Pointer(3), nil);
+ RegisterFunctionName('COPY', DefProc, Pointer(4), nil);
+ RegisterFunctionName('DELETE', DefProc, Pointer(5), nil);
+ RegisterFunctionName('INSERT', DefProc, Pointer(6), nil);
+
+ RegisterFunctionName('STRGET', DefProc, Pointer(7), nil);
+ RegisterFunctionName('STRSET', DefProc, Pointer(8), nil);
+ RegisterFunctionName('UPPERCASE', DefProc, Pointer(10), nil);
+ RegisterFunctionName('LOWERCASE', DefProc, Pointer(11), nil);
+ RegisterFunctionName('TRIM', DefProc, Pointer(12), nil);
+
+ RegisterFunctionName('LENGTH',Length_,nil,nil);
+ RegisterFunctionName('SETLENGTH',SetLength_,nil,nil);
+ RegisterFunctionName('LOW',Low_,nil,nil);
+ RegisterFunctionName('HIGH',High_,nil,nil);
+ RegisterFunctionName('DEC',Dec_,nil,nil);
+ RegisterFunctionName('INC',Inc_,nil,nil);
+
+ RegisterFunctionName('SIN', DefProc, Pointer(15), nil);
+ RegisterFunctionName('COS', DefProc, Pointer(16), nil);
+ RegisterFunctionName('SQRT', DefProc, Pointer(17), nil);
+ RegisterFunctionName('ROUND', DefProc, Pointer(18), nil);
+ RegisterFunctionName('TRUNC', DefProc, Pointer(19), nil);
+ RegisterFunctionName('INT', DefProc, Pointer(20), nil);
+ RegisterFunctionName('PI', DefProc, Pointer(21), nil);
+ RegisterFunctionName('ABS', DefProc, Pointer(22), nil);
+ RegisterFunctionName('STRTOFLOAT', DefProc, Pointer(23), nil);
+ RegisterFunctionName('FLOATTOSTR', DefProc, Pointer(24), nil);
+ RegisterFunctionName('PADL', DefProc, Pointer(25), nil);
+ RegisterFunctionName('PADR', DefProc, Pointer(26), nil);
+ RegisterFunctionName('PADZ', DefProc, Pointer(27), nil);
+ RegisterFunctionName('REPLICATE', DefProc, Pointer(28), nil);
+ RegisterFunctionName('STRINGOFCHAR', DefProc, Pointer(28), nil);
+ RegisterFunctionName('!ASSIGNED', DefProc, Pointer(29), nil);
+
+ RegisterDelphiFunction(@Unassigned, 'UNASSIGNED', cdRegister);
+ RegisterDelphiFunction(@VarIsEmpty, 'VARISEMPTY', cdRegister);
+ RegisterDelphiFunction(@Null, 'NULL', cdRegister);
+ RegisterDelphiFunction(@VarIsNull, 'VARISNULL', cdRegister);
+ RegisterDelphiFunction(@VarType, 'VARTYPE', cdRegister);
+ {$IFNDEF PS_NOIDISPATCH}
+ RegisterDelphiFunction(@IDispatchInvoke, 'IDISPATCHINVOKE', cdregister);
+ {$ENDIF}
+
+
+ RegisterFunctionName('GETARRAYLENGTH', GetArrayLength, nil, nil);
+ RegisterFunctionName('SETARRAYLENGTH', SetArrayLength, nil, nil);
+
+ RegisterFunctionName('RAISELASTEXCEPTION', DefPRoc, Pointer(30), nil);
+ RegisterFunctionName('RAISEEXCEPTION', DefPRoc, Pointer(31), nil);
+ RegisterFunctionName('EXCEPTIONTYPE', DefPRoc, Pointer(32), nil);
+ RegisterFunctionName('EXCEPTIONPARAM', DefPRoc, Pointer(33), nil);
+ RegisterFunctionName('EXCEPTIONPROC', DefPRoc, Pointer(34), nil);
+ RegisterFunctionName('EXCEPTIONPOS', DefPRoc, Pointer(35), nil);
+ RegisterFunctionName('EXCEPTIONTOSTRING', DefProc, Pointer(36), nil);
+ RegisterFunctionName('ANSIUPPERCASE', DefProc, Pointer(37), nil);
+ RegisterFunctionName('ANSILOWERCASE', DefProc, Pointer(38), nil);
+
+ {$IFNDEF PS_NOINT64}
+ RegisterFunctionName('STRTOINT64', DefProc, Pointer(39), nil);
+ RegisterFunctionName('INT64TOSTR', DefProc, Pointer(40), nil);
+ {$ENDIF}
+ RegisterFunctionName('SIZEOF', DefProc, Pointer(41), nil);
+
+ {$IFNDEF PS_NOWIDESTRING}
+ RegisterFunctionName('WSTRGET', DefProc, Pointer(42), nil);
+ RegisterFunctionName('WSTRSET', DefProc, Pointer(43), nil);
+ {$ENDIF}
+
+ RegisterInterfaceLibraryRuntime(Self);
+end;
+
+
+function ToString(p: PChar): string;
+begin
+ SetString(Result, p, StrLen(p));
+end;
+
+function IntPIFVariantToVariant(Src: pointer; aType: TPSTypeRec; var Dest: Variant): Boolean;
+ function BuildArray(P: Pointer; aType: TPSTypeRec; Len: Longint): Boolean;
+ var
+ i, elsize: Longint;
+ v: variant;
+ begin
+ elsize := aType.RealSize;
+ Dest := VarArrayCreate([0, Len-1], varVariant);
+ for i := 0 to Len -1 do
+ begin
+ if not IntPIFVariantToVariant(p, aType, v) then
+ begin
+ result := false;
+ exit;
+ end;
+ Dest[i] := v;
+ p := Pointer(IPointer(p) + Cardinal(elSize));
+ end;
+ result := true;
+ end;
+begin
+ if aType = nil then
+ begin
+ Dest := null;
+ Result := True;
+ exit;
+ end;
+ if aType.BaseType = btPointer then
+ begin
+ aType := TPSTypeRec(Pointer(IPointer(src)+4)^);
+ Src := Pointer(Pointer(Src)^);
+ end;
+
+ case aType.BaseType of
+ btVariant: Dest := variant(src^);
+ btArray: if not BuildArray(Pointer(Src^), TPSTypeRec_Array(aType).ArrayType, PSDynArrayGetLength(Pointer(src^), aType)) then begin result := false; exit; end;
+ btStaticArray: if not BuildArray(Pointer(Src), TPSTypeRec_StaticArray(aType).ArrayType, PSDynArrayGetLength(Pointer(src^), aType)) then begin result := false; exit; end;
+ btU8:
+ if aType.ExportName = 'BOOLEAN' then
+ Dest := boolean(tbtu8(Src^) <> 0)
+ else
+ Dest := tbtu8(Src^);
+ btS8: Dest := tbts8(Src^);
+ btU16: Dest := tbtu16(Src^);
+ btS16: Dest := tbts16(Src^);
+ btU32: Dest := {$IFDEF DELPHI6UP}tbtu32{$ELSE}tbts32{$ENDIF}(Src^);
+ btS32: Dest := tbts32(Src^);
+ btSingle: Dest := tbtsingle(Src^);
+ btCurrency: Dest:=tbtCurrency(Src^);
+ btDouble:
+ begin
+ if aType.ExportName = 'TDATETIME' then
+ Dest := TDateTime(tbtDouble(Src^))
+ else
+ Dest := tbtDouble(Src^);
+ end;
+ btExtended: Dest := tbtExtended(Src^);
+ btString: Dest := tbtString(Src^);
+ btPChar: Dest := ToString(PChar(Src^));
+ {$IFNDEF PS_NOINT64}
+ {$IFDEF DELPHI6UP} btS64: Dest := tbts64(Src^); {$ELSE} bts64: begin Result := False; exit; end; {$ENDIF}
+ {$ENDIF}
+ btChar: Dest := string(tbtchar(src^));
+ {$IFNDEF PS_NOWIDESTRING}
+ btWideString: Dest := tbtWideString(src^);
+ btWideChar: Dest := widestring(tbtwidechar(src^));
+ {$ENDIF}
+ else
+ begin
+ Result := False;
+ exit;
+ end;
+ end;
+ Result := True;
+end;
+
+function PIFVariantToVariant(Src: PIFVariant; var Dest: Variant): Boolean;
+begin
+ Result := IntPIFVariantToVariant(@PPSVariantData(src).Data, Src.FType, Dest);
+end;
+
+function VariantToPIFVariant(Exec: TPSExec; const Src: Variant; Dest: PIFVariant): Boolean;
+var
+ TT: PIFTypeRec;
+begin
+ if Dest = nil then begin Result := false; exit; end;
+ tt := Exec.FindType2(btVariant);
+ if tt = nil then begin Result := false; exit; end;
+ if Dest.FType.BaseType = btPointer then
+ Result := Exec.SetVariantValue(PPSVariantPointer(Dest).DataDest, @Src, PPSVariantPointer(Dest).DestType, tt)
+ else
+ Result := Exec.SetVariantValue(@PPSVariantData(Dest).Data, @Src, Dest.FType, tt);
+end;
+
+type
+ POpenArray = ^TOpenArray;
+ TOpenArray = record
+ AType: Byte; {0}
+ OrgVar: PPSVariantIFC;
+ FreeIt: Boolean;
+ ElementSize,
+ ItemCount: Longint;
+ Data: Pointer;
+ VarParam: Boolean;
+ end;
+function CreateOpenArray(VarParam: Boolean; Sender: TPSExec; val: PPSVariantIFC): POpenArray;
+var
+ datap, p: Pointer;
+ ctype: TPSTypeRec;
+ cp: Pointer;
+ i: Longint;
+begin
+ if (Val.aType.BaseType <> btArray) and (val.aType.BaseType <> btStaticArray) then
+ begin
+ Result := nil;
+ exit;
+ end;
+ New(Result);
+ Result.AType := 0;
+ Result.OrgVar := Val;
+ Result.VarParam := VarParam;
+
+ if val.aType.BaseType = btStaticArray then
+ begin
+ Result^.ItemCount := TPSTypeRec_StaticArray(val.aType).Size;
+ datap := Val.Dta;
+ end else
+ begin
+ Result^.ItemCount := PSDynArrayGetLength(Pointer(Val.Dta^), val.aType);
+ datap := Pointer(Val.Dta^);
+ end;
+ if TPSTypeRec_Array(Val.aType).ArrayType.BaseType <> btPointer then
+ begin
+ Result.FreeIt := False;
+ result.ElementSize := 0;
+ Result.Data := datap;
+ exit;
+ end;
+ Result.FreeIt := True;
+ Result.ElementSize := sizeof(TVarRec);
+ GetMem(Result.Data, Result.ItemCount * Result.ElementSize);
+ P := Result.Data;
+ FillChar(p^, Result^.ItemCount * Result^.ElementSize, 0);
+ for i := 0 to Result^.ItemCount -1 do
+ begin
+ ctype := Pointer(Pointer(IPointer(datap)+4)^);
+ cp := Pointer(Datap^);
+ if cp = nil then
+ begin
+ tvarrec(p^).VType := vtPointer;
+ tvarrec(p^).VPointer := nil;
+ end else begin
+ case ctype.BaseType of
+ btVariant: begin
+ tvarrec(p^).VType := vtVariant;
+ tvarrec(p^).VVariant := cp;
+ end;
+ btchar: begin
+ tvarrec(p^).VType := vtChar;
+ tvarrec(p^).VChar := tbtchar(cp^);
+ end;
+ btSingle:
+ begin
+ tvarrec(p^).VType := vtExtended;
+ New(tvarrec(p^).VExtended);
+ tvarrec(p^).VExtended^ := tbtsingle(cp^);
+ end;
+ btExtended:
+ begin
+ tvarrec(p^).VType := vtExtended;
+ New(tvarrec(p^).VExtended);
+ tvarrec(p^).VExtended^ := tbtextended(cp^);;
+ end;
+ btDouble:
+ begin
+ tvarrec(p^).VType := vtExtended;
+ New(tvarrec(p^).VExtended);
+ tvarrec(p^).VExtended^ := tbtdouble(cp^);
+ end;
+ {$IFNDEF PS_NOWIDESTRING}
+ btwidechar: begin
+ tvarrec(p^).VType := vtWideChar;
+ tvarrec(p^).VWideChar := tbtwidechar(cp^);
+ end;
+ btwideString: begin
+ tvarrec(p^).VType := vtWideString;
+ widestring(TVarRec(p^).VWideString) := tbtwidestring(cp^);
+ end;
+ {$ENDIF}
+ btU8: begin
+ tvarrec(p^).VType := vtInteger;
+ tvarrec(p^).VInteger := tbtu8(cp^);
+ end;
+ btS8: begin
+ tvarrec(p^).VType := vtInteger;
+ tvarrec(p^).VInteger := tbts8(cp^);
+ end;
+ btU16: begin
+ tvarrec(p^).VType := vtInteger;
+ tvarrec(p^).VInteger := tbtu16(cp^);
+ end;
+ btS16: begin
+ tvarrec(p^).VType := vtInteger;
+ tvarrec(p^).VInteger := tbts16(cp^);
+ end;
+ btU32: begin
+ tvarrec(p^).VType := vtInteger;
+ tvarrec(p^).VInteger := tbtu32(cp^);
+ end;
+ btS32: begin
+ tvarrec(p^).VType := vtInteger;
+ tvarrec(p^).VInteger := tbts32(cp^);
+ end;
+ {$IFNDEF PS_NOINT64}
+ btS64: begin
+ tvarrec(p^).VType := vtInt64;
+ New(tvarrec(p^).VInt64);
+ tvarrec(p^).VInt64^ := tbts64(cp^);
+ end;
+ {$ENDIF}
+ btString: begin
+ tvarrec(p^).VType := vtAnsiString;
+ string(TVarRec(p^).VAnsiString) := tbtstring(cp^);
+ end;
+ btPChar:
+ begin
+ tvarrec(p^).VType := vtPchar;
+ TVarRec(p^).VPChar := pointer(cp^);
+ end;
+ btClass:
+ begin
+ tvarrec(p^).VType := vtObject;
+ tvarrec(p^).VObject := Pointer(cp^);
+ end;
+{$IFNDEF PS_NOINTERFACES}
+{$IFDEF Delphi3UP}
+ btInterface:
+ begin
+ tvarrec(p^).VType := vtInterface;
+ IUnknown(tvarrec(p^).VInterface) := IUnknown(cp^);
+ end;
+
+{$ENDIF}
+{$ENDIF}
+ end;
+ end;
+ datap := Pointer(IPointer(datap)+12);
+ p := PChar(p) + Result^.ElementSize;
+ end;
+end;
+
+procedure DestroyOpenArray(Sender: TPSExec; V: POpenArray);
+var
+ cp, datap: pointer;
+ ctype: TPSTypeRec;
+ p: PVarRec;
+ i: Longint;
+begin
+ if v.FreeIt then // basetype = btPointer
+ begin
+ p := v^.Data;
+ if v.OrgVar.aType.BaseType = btStaticArray then
+ datap := v.OrgVar.Dta
+ else
+ datap := Pointer(v.OrgVar.Dta^);
+ for i := 0 to v^.ItemCount -1 do
+ begin
+ ctype := Pointer(Pointer(IPointer(datap)+4)^);
+ cp := Pointer(Datap^);
+ case ctype.BaseType of
+ btU8:
+ begin
+ if v^.varParam then
+ tbtu8(cp^) := tvarrec(p^).VInteger
+ end;
+ btS8: begin
+ if v^.varParam then
+ tbts8(cp^) := tvarrec(p^).VInteger
+ end;
+ btU16: begin
+ if v^.varParam then
+ tbtu16(cp^) := tvarrec(p^).VInteger
+ end;
+ btS16: begin
+ if v^.varParam then
+ tbts16(cp^) := tvarrec(p^).VInteger
+ end;
+ btU32: begin
+ if v^.varParam then
+ tbtu32(cp^) := tvarrec(p^).VInteger
+ end;
+ btS32: begin
+ if v^.varParam then
+ tbts32(cp^) := tvarrec(p^).VInteger
+ end;
+ btChar: begin
+ if v^.VarParam then
+ tbtchar(cp^) := tvarrec(p^).VChar
+ end;
+ btSingle: begin
+ if v^.VarParam then
+ tbtsingle(cp^) := tvarrec(p^).vextended^;
+ dispose(tvarrec(p^).vextended);
+ end;
+ btDouble: begin
+ if v^.VarParam then
+ tbtdouble(cp^) := tvarrec(p^).vextended^;
+ dispose(tvarrec(p^).vextended);
+ end;
+ btExtended: begin
+ if v^.VarParam then
+ tbtextended(cp^) := tvarrec(p^).vextended^;
+ dispose(tvarrec(p^).vextended);
+ end;
+ {$IFNDEF PS_NOINT64}
+ btS64: begin
+ if v^.VarParam then
+ tbts64(cp^) := tvarrec(p^).vInt64^;
+ dispose(tvarrec(p^).VInt64);
+ end;
+ {$ENDIF}
+ {$IFNDEF PS_NOWIDESTRING}
+ btWideChar: begin
+ if v^.varParam then
+ tbtwidechar(cp^) := tvarrec(p^).VWideChar;
+ end;
+ btWideString:
+ begin
+ if v^.VarParam then
+ tbtwidestring(cp^) := widestring(TVarRec(p^).VWideString);
+ finalize(widestring(TVarRec(p^).VWideString));
+ end;
+ {$ENDIF}
+ btString: begin
+ if v^.VarParam then
+ tbtstring(cp^) := tbtstring(TVarRec(p^).VString);
+ finalize(string(TVarRec(p^).VAnsiString));
+ end;
+ btClass: begin
+ if v^.VarParam then
+ Pointer(cp^) := TVarRec(p^).VObject;
+ end;
+{$IFNDEF PS_NOINTERFACES}
+{$IFDEF Delphi3UP}
+ btInterface: begin
+ if v^.VarParam then
+ IUnknown(cp^) := IUnknown(TVarRec(p^).VInterface);
+ finalize(string(TVarRec(p^).VAnsiString));
+ end;
+{$ENDIF}
+{$ENDIF}
+ end;
+ datap := Pointer(IPointer(datap)+12);
+ p := Pointer(IPointer(p) + Cardinal(v^.ElementSize));
+ end;
+ FreeMem(v.Data, v.ElementSize * v.ItemCount);
+ end;
+ Dispose(V);
+end;
+
+
+{$ifndef FPC}
+ {$include x86.inc}
+{$else}
+ {$if defined(cpu86)}
+ {$include x86.inc}
+ {$elseif defined(cpupowerpc)}
+ {$include powerpc.inc}
+ {$else}
+ {$fatal Pascal Script is not supported for your architecture at the moment!}
+ {$ifend}
+{$endif}
+
+type
+ PScriptMethodInfo = ^TScriptMethodInfo;
+ TScriptMethodInfo = record
+ Se: TPSExec;
+ ProcNo: Cardinal;
+ end;
+
+
+function MkMethod(FSE: TPSExec; No: Cardinal): TMethod;
+begin
+ if (no = 0) or (no = InvalidVal) then
+ begin
+ Result.Code := nil;
+ Result.Data := nil;
+ end else begin
+ Result.Code := @MyAllMethodsHandler;
+ Result.Data := GetMethodInfoRec(FSE, No);
+ end;
+end;
+
+
+procedure PFree(Sender: TPSExec; P: PScriptMethodInfo);
+begin
+ Dispose(p);
+end;
+
+function GetMethodInfoRec(SE: TPSExec; ProcNo: Cardinal): Pointer;
+var
+ I: Longint;
+ pp: PScriptMethodInfo;
+begin
+ if (ProcNo = 0) or (ProcNo = InvalidVal) then
+ begin
+ Result := nil;
+ exit;
+ end;
+ I := 2147483647;
+ repeat
+ pp := Se.FindProcResource2(@PFree, I);
+ if (i <> -1) and (pp^.ProcNo = ProcNo) then
+ begin
+ Result := Pp;
+ exit;
+ end;
+ until i = -1;
+ New(pp);
+ pp^.Se := TPSExec(Se);
+ pp^.ProcNo := Procno;
+ Se.AddResource(@PFree, pp);
+ Result := pp;
+end;
+
+
+
+
+
+type
+ TPtrArr = array[0..1000] of Pointer;
+ PPtrArr = ^TPtrArr;
+ TByteArr = array[0..1000] of byte;
+ PByteArr = ^TByteArr;
+ PPointer = ^Pointer;
+
+
+function VirtualMethodPtrToPtr(Ptr, FSelf: Pointer): Pointer;
+{$IFDEF FPC}
+var
+ x : PPtrArr;
+{$ENDIF}
+begin
+ {$IFDEF FPC}
+ x := Pointer(TObject(FSelf).ClassType) + vmtMethodStart;
+ Result := x^[Longint(Ptr)];
+ {$ELSE}
+ Result := PPtrArr(PPointer(FSelf)^)^[Longint(Ptr)];
+ {$ENDIF}
+end;
+
+function VirtualClassMethodPtrToPtr(Ptr, FSelf: Pointer): Pointer;
+{$IFDEF FPC}
+var
+ x : PPtrArr;
+{$ENDIF}
+begin
+ {$IFDEF FPC}
+ x := Pointer(FSelf) + vmtMethodStart;
+ Result := x^[Longint(Ptr)];
+ {$ELSE}
+ Result := PPtrArr(FSelf)^[Longint(Ptr)];
+ {$ENDIF}
+end;
+
+
+procedure CheckPackagePtr(var P: PByteArr);
+begin
+ if (word((@p[0])^) = $25FF) and (word((@p[6])^)=$C08B)then
+ begin
+ p := PPointer((@p[2])^)^;
+ end;
+end;
+
+{$IFDEF VER90}{$DEFINE NO_vmtSelfPtr}{$ENDIF}
+{$IFDEF FPC}{$DEFINE NO_vmtSelfPtr}{$ENDIF}
+
+{$IFNDEF FPC}
+
+function FindVirtualMethodPtr(Ret: TPSRuntimeClass; FClass: TClass; Ptr: Pointer): Pointer;
+// Idea of getting the number of VMT items from GExperts
+var
+ p: PPtrArr;
+ I: Longint;
+begin
+ p := Pointer(FClass);
+ CheckPackagePtr(PByteArr(Ptr));
+ if Ret.FEndOfVMT = MaxInt then
+ begin
+ I := {$IFDEF NO_vmtSelfPtr}-48{$ELSE}vmtSelfPtr{$ENDIF} div SizeOf(Pointer) + 1;
+ while I < 0 do
+ begin
+ if I < 0 then
+ begin
+ if I <> ({$IFDEF VER90}-44{$ELSE}vmtTypeInfo{$ENDIF} div SizeOf(Pointer)) then
+ begin // from GExperts code
+ if (Longint(p^[I]) > Longint(p)) and ((Longint(p^[I]) - Longint(p))
+ div
+ 4 < Ret.FEndOfVMT) then
+ begin
+ Ret.FEndOfVMT := (Longint(p^[I]) - Longint(p)) div SizeOf(Pointer);
+ end;
+ end;
+ end;
+ Inc(I);
+ end;
+ if Ret.FEndOfVMT = MaxInt then
+ begin
+ Ret.FEndOfVMT := 0; // cound not find EndOfVMT
+ Result := nil;
+ exit;
+ end;
+ end;
+ I := 0;
+ while I < Ret.FEndOfVMT do
+ begin
+ if p^[I] = Ptr then
+ begin
+ Result := Pointer(I);
+ exit;
+ end;
+ I := I + 1;
+ end;
+ Result := nil;
+end;
+
+{$ELSE}
+
+function FindVirtualMethodPtr(Ret: TPSRuntimeClass; FClass: TClass; Ptr: Pointer): Pointer;
+var
+ x,p: PPtrArr;
+ I: Longint;
+ t : Pointer;
+begin
+ p := Pointer(FClass) + vmtMethodStart;
+ I := 0;
+ while (p^[I]<>nil) and (I < 10000) do
+ begin
+ if p^[I] = Ptr then
+ begin
+ Result := Pointer(I);
+ x := Pointer(FClass) + vmtMethodStart;
+ t := x^[I];
+ Assert(t=Ptr,'Computation of virtual method pointer fail : t<>Ptr');
+ exit;
+ end;
+ I := I + 1;
+ end;
+ Result := nil;
+end;
+
+{$ENDIF}
+
+
+function NewTPSVariantIFC(avar: PPSVariant; varparam: boolean): TPSVariantIFC;
+begin
+ Result.VarParam := varparam;
+ if avar = nil then
+ begin
+ Result.aType := nil;
+ result.Dta := nil;
+ end else
+ begin
+ Result.aType := avar.FType;
+ result.Dta := @PPSVariantData(avar).Data;
+ if Result.aType.BaseType = btPointer then
+ begin
+ Result.aType := Pointer(Pointer(IPointer(result.dta)+4)^);
+ Result.Dta := Pointer(Result.dta^);
+ end;
+ end;
+end;
+
+function NewTPSVariantRecordIFC(avar: PPSVariant; Fieldno: Longint): TPSVariantIFC;
+var
+ offs: Cardinal;
+begin
+ Result := NewTPSVariantIFC(avar, false);
+ if Result.aType.BaseType = btRecord then
+ begin
+ Offs := Cardinal(TPSTypeRec_Record(Result.aType).RealFieldOffsets[FieldNo]);
+ Result.Dta := Pointer(IPointer(Result.dta) + Offs);
+ Result.aType := TPSTypeRec_Record(Result.aType).FieldTypes[FieldNo];
+ end else
+ begin
+ Result.Dta := nil;
+ Result.aType := nil;
+ end;
+end;
+
+function PSGetArrayField(const avar: TPSVariantIFC; Fieldno: Longint): TPSVariantIFC;
+var
+ offs: Cardinal;
+ n: Longint;
+begin
+ Result := aVar;
+ case Result.aType.BaseType of
+ btStaticArray, btArray:
+ begin
+ if Result.aType.BaseType = btStaticArray then
+ n := TPSTypeRec_StaticArray(Result.aType).Size
+ else
+ n := PSDynArrayGetLength(Pointer(Result.Dta^), Result.aType);
+ if (FieldNo <0) or (FieldNo >= n) then
+ begin
+ Result.Dta := nil;
+ Result.aType := nil;
+ exit;
+ end;
+ Offs := TPSTypeRec_Array(Result.aType).ArrayType.RealSize * Cardinal(FieldNo);
+ if Result.aType.BaseType = btStaticArray then
+ Result.Dta := Pointer(IPointer(Result.dta) + Offs)
+ else
+ Result.Dta := Pointer(IPointer(Result.dta^) + Offs);
+ Result.aType := TPSTypeRec_Array(Result.aType).ArrayType;
+ end
+ else
+ Result.Dta := nil;
+ Result.aType := nil;
+ end;
+end;
+
+function PSGetRecField(const avar: TPSVariantIFC; Fieldno: Longint): TPSVariantIFC;
+var
+ offs: Cardinal;
+begin
+ Result := aVar;
+ if Result.aType.BaseType = btRecord then
+ begin
+ Offs := Cardinal(TPSTypeRec_Record(Result.aType).RealFieldOffsets[FieldNo]);
+ Result.aType := TPSTypeRec_Record(Result.aType).FieldTypes[FieldNo];
+ Result.Dta := Pointer(IPointer(Result.dta) + Offs);
+ end else
+ begin
+ Result.Dta := nil;
+ Result.aType := nil;
+ end;
+end;
+
+function NewPPSVariantIFC(avar: PPSVariant; varparam: boolean): PPSVariantIFC;
+begin
+ New(Result);
+ Result^ := NewTPSVariantIFC(avar, varparam);
+end;
+
+
+procedure DisposePPSVariantIFC(aVar: PPSVariantIFC);
+begin
+ if avar <> nil then
+ Dispose(avar);
+end;
+
+procedure DisposePPSVariantIFCList(list: TPSList);
+var
+ i: Longint;
+begin
+ for i := list.Count -1 downto 0 do
+ DisposePPSVariantIFC(list[i]);
+ list.free;
+end;
+
+function ClassCallProcMethod(Caller: TPSExec; p: TPSExternalProcRec; Global, Stack: TPSStack): Boolean;
+var
+ i: Integer;
+ MyList: TPSList;
+ n: PIFVariant;
+ v: PPSVariantIFC;
+ FSelf: Pointer;
+ CurrStack: Cardinal;
+ cc: TPSCallingConvention;
+ s: string;
+begin
+ s := p.Decl;
+ if length(S) < 2 then
+ begin
+ Result := False;
+ exit;
+ end;
+ cc := TPSCallingConvention(s[1]);
+ Delete(s, 1, 1);
+ if s[1] = #0 then
+ n := Stack[Stack.Count -1]
+ else
+ n := Stack[Stack.Count -2];
+ if (n = nil) or (n^.FType.BaseType <> btClass)or (PPSVariantClass(n).Data = nil) then
+ begin
+ Caller.CMD_Err(erNullPointerException);
+ result := false;
+ exit;
+ end;
+ FSelf := PPSVariantClass(n).Data;
+ CurrStack := Cardinal(Stack.Count) - Cardinal(length(s)) -1;
+ if s[1] = #0 then inc(CurrStack);
+ MyList := TPSList.Create;
+ for i := 2 to length(s) do
+ begin
+ MyList.Add(nil);
+ end;
+ for i := length(s) downto 2 do
+ begin
+ n := Stack[CurrStack];
+ MyList[i - 2] := NewPPSVariantIFC(n, s[i] <> #0);
+ inc(CurrStack);
+ end;
+ if s[1] <> #0 then
+ begin
+ v := NewPPSVariantIFC(Stack[CurrStack + 1], True);
+ end else v := nil;
+ try
+ if p.Ext2 = nil then
+ Result := Caller.InnerfuseCall(FSelf, p.Ext1, cc, MyList, v)
+ else
+ Result := Caller.InnerfuseCall(FSelf, VirtualMethodPtrToPtr(p.Ext1, FSelf), cc, MyList, v);
+ finally
+ DisposePPSVariantIFC(v);
+ DisposePPSVariantIFCList(mylist);
+ end;
+end;
+
+function ClassCallProcConstructor(Caller: TPSExec; p: TPSExternalProcRec; Global, Stack: TPSStack): Boolean;
+var
+ i, h: Longint;
+ v: PPSVariantIFC;
+ MyList: TPSList;
+ n: PIFVariant;
+ FSelf: Pointer;
+ CurrStack: Cardinal;
+ cc: TPSCallingConvention;
+ s: string;
+ FType: PIFTypeRec;
+ x: TPSRuntimeClass;
+ IntVal: PIFVariant;
+begin
+ n := Stack[Stack.Count -2];
+ if (n = nil) or (n^.FType.BaseType <> btU32) then
+ begin
+ result := false;
+ exit;
+ end;
+ FType := Caller.GetTypeNo(PPSVariantU32(N).Data);
+ if (FType = nil) then
+ begin
+ Result := False;
+ exit;
+ end;
+ h := MakeHash(FType.ExportName);
+ FSelf := nil;
+ for i := 0 to TPSRuntimeClassImporter(p.Ext2).FClasses.Count -1 do
+ begin
+ x:= TPSRuntimeClassImporter(p.Ext2).FClasses[i];
+ if (x.FClassNameHash = h) and (x.FClassName = FType.ExportName) then
+ begin
+ FSelf := x.FClass;
+ end;
+ end;
+ if FSelf = nil then begin
+ Result := False;
+ exit;
+ end;
+ s := p.Decl;
+ if length(S) < 2 then
+ begin
+ Result := False;
+ exit;
+ end;
+ cc := TPSCallingConvention(s[1]);
+ Delete(s, 1, 1);
+ CurrStack := Cardinal(Stack.Count) - Cardinal(length(s)) -1;
+ if s[1] = #0 then inc(CurrStack);
+ IntVal := CreateHeapVariant(Caller.FindType2(btU32));
+ if IntVal = nil then
+ begin
+ Result := False;
+ exit;
+ end;
+ {$IFDEF FPC}
+ // under FPC a constructor it's called with self=0 (EAX) and
+ // the VMT class pointer in EDX so they are effectively swaped
+ // using register calling convention
+ PPSVariantU32(IntVal).Data := Cardinal(FSelf);
+ FSelf := pointer(1);
+ {$ELSE}
+ PPSVariantU32(IntVal).Data := 1;
+ {$ENDIF}
+ MyList := TPSList.Create;
+ MyList.Add(NewPPSVariantIFC(intval, false));
+ for i := 2 to length(s) do
+ begin
+ MyList.Add(nil);
+ end;
+ for i := length(s) downto 2 do
+ begin
+ n :=Stack[CurrStack];
+// if s[i] <> #0 then
+// begin
+// MyList[i - 2] := NewPPSVariantIFC(n, s[i] <> #0);
+// end;
+ MyList[i - 1] := NewPPSVariantIFC(n, s[i] <> #0);
+ inc(CurrStack);
+ end;
+ if s[1] <> #0 then
+ begin
+ v := NewPPSVariantIFC(Stack[CurrStack + 1], True);
+ end else v := nil;
+ try
+ Result := Caller.InnerfuseCall(FSelf, p.Ext1, cc, MyList, v);
+ finally
+ DisposePPSVariantIFC(v);
+ DisposePPSVariantIFCList(mylist);
+ DestroyHeapVariant(intval);
+ end;
+end;
+
+
+function ClassCallProcVirtualConstructor(Caller: TPSExec; p: TPSExternalProcRec; Global, Stack: TPSStack): Boolean;
+var
+ i, h: Longint;
+ v: PPSVariantIFC;
+ MyList: TPSList;
+ n: PIFVariant;
+ FSelf: Pointer;
+ CurrStack: Cardinal;
+ cc: TPSCallingConvention;
+ s: string;
+ FType: PIFTypeRec;
+ x: TPSRuntimeClass;
+ IntVal: PIFVariant;
+begin
+ n := Stack[Stack.Count -2];
+ if (n = nil) or (n^.FType.BaseType <> btU32) then
+ begin
+ Caller.CMD_Err(erNullPointerException);
+ result := false;
+ exit;
+ end;
+ FType := Caller.GetTypeNo(PPSVariantU32(N).Data);
+ if (FType = nil) then
+ begin
+ Caller.CMD_Err(erNullPointerException);
+ Result := False;
+ exit;
+ end;
+ h := MakeHash(FType.ExportName);
+ FSelf := nil;
+ for i := 0 to TPSRuntimeClassImporter(p.Ext2).FClasses.Count -1 do
+ begin
+ x:= TPSRuntimeClassImporter(p.Ext2).FClasses[i];
+ if (x.FClassNameHash = h) and (x.FClassName = FType.ExportName) then
+ begin
+ FSelf := x.FClass;
+ end;
+ end;
+ if FSelf = nil then begin
+ Result := False;
+ exit;
+ end;
+ s := p.Decl;
+ if length(S) < 2 then
+ begin
+ Result := False;
+ exit;
+ end;
+ cc := TPSCallingConvention(s[1]);
+ delete(s, 1, 1);
+ CurrStack := Cardinal(Stack.Count) - Cardinal(length(s)) -1;
+ if s[1] = #0 then inc(CurrStack);
+ IntVal := CreateHeapVariant(Caller.FindType2(btU32));
+ if IntVal = nil then
+ begin
+ Result := False;
+ exit;
+ end;
+ PPSVariantU32(IntVal).Data := 1;
+ MyList := TPSList.Create;
+ MyList.Add(NewPPSVariantIFC(intval, false));
+ for i := 2 to length(s) do
+ begin
+ MyList.Add(nil);
+ end;
+ for i := length(s) downto 2 do
+ begin
+ n :=Stack[CurrStack];
+ MyList[i - 1] := NewPPSVariantIFC(n, s[i] <> #0);
+ inc(CurrStack);
+ end;
+ if s[1] <> #0 then
+ begin
+ v := NewPPSVariantIFC(Stack[CurrStack + 1], True);
+ end else v := nil;
+ try
+ Result := Caller.InnerfuseCall(FSelf, VirtualClassMethodPtrToPtr(p.Ext1, FSelf), cc, MyList, v);
+ finally
+ DisposePPSVariantIFC(v);
+ DisposePPSVariantIFCList(mylist);
+ DestroyHeapVariant(intval);
+ end;
+end;
+
+function CastProc(Caller: TPSExec; p: TPSExternalProcRec; Global, Stack: TPSStack): Boolean;
+var
+ TypeNo, InVar, ResVar: TPSVariantIFC;
+ FSelf: TClass;
+ FType: PIFTypeRec;
+ H, I: Longint;
+ x: TPSRuntimeClass;
+begin
+ TypeNo := NewTPSVariantIFC(Stack[Stack.Count-3], false);
+ InVar := NewTPSVariantIFC(Stack[Stack.Count-2], false);
+ ResVar := NewTPSVariantIFC(Stack[Stack.Count-1], true);
+ if (TypeNo.Dta = nil) or (InVar.Dta = nil) or (ResVar.Dta = nil) or
+ (TypeNo.aType.BaseType <> btu32) or (resvar.aType <> Caller.FTypes[tbtu32(Typeno.dta^)])
+ then
+ begin
+ Result := False;
+ Exit;
+ end;
+{$IFNDEF PS_NOINTERFACES}
+ if (invar.atype.BaseType = btInterface) and (resvar.aType.BaseType = btInterface) then
+ begin
+{$IFNDEF Delphi3UP}
+ if IUnknown(resvar.Dta^) <> nil then
+ IUnknown(resvar.Dta^).Release;
+{$ENDIF}
+ IUnknown(resvar.Dta^) := nil;
+ if (IUnknown(invar.Dta^) = nil) or (IUnknown(invar.Dta^).QueryInterface(TPSTypeRec_Interface(ResVar.aType).Guid, IUnknown(resvar.Dta^)) <> 0) then
+ begin
+ Caller.CMD_Err2(erCustomError, RPS_CannotCastInterface);
+ Result := False;
+ exit;
+ end;
+{$IFDEF Delphi3UP}
+ end else if (Invar.aType.BaseType = btclass) and (resvar.aType.BaseType = btInterface) then
+ begin
+{$IFNDEF Delphi3UP}
+ if IUnknown(resvar.Dta^) <> nil then
+ IUnknown(resvar.Dta^).Release;
+{$ENDIF}
+ IUnknown(resvar.Dta^) := nil;
+ if (TObject(invar.Dta^)= nil) or (not TObject(invar.dta^).GetInterface(TPSTypeRec_Interface(ResVar.aType).Guid, IUnknown(resvar.Dta^))) then
+ begin
+ Caller.CMD_Err2(erCustomError, RPS_CannotCastInterface);
+ Result := False;
+ exit;
+ end;
+{$ENDIF}
+ end else {$ENDIF}if (invar.aType.BaseType = btclass) and (resvar.aType.BaseType = btclass ) then
+ begin
+ FType := Caller.GetTypeNo(tbtu32(TypeNo.Dta^));
+ if (FType = nil) then
+ begin
+ Result := False;
+ exit;
+ end;
+ h := MakeHash(FType.ExportName);
+ FSelf := nil;
+ for i := 0 to TPSRuntimeClassImporter(p.Ext2).FClasses.Count -1 do
+ begin
+ x:= TPSRuntimeClassImporter(p.Ext2).FClasses[i];
+ if (x.FClassNameHash = h) and (x.FClassName = FType.ExportName) then
+ begin
+ FSelf := x.FClass;
+ end;
+ end;
+ if FSelf = nil then begin
+ Result := False;
+ exit;
+ end;
+
+ try
+ TObject(ResVar.Dta^) := TObject(InVar.Dta^) as FSelf;
+ except
+ Result := False;
+ Caller.CMD_Err2(erCustomError, RPS_CannotCastObject);
+ exit;
+ end;
+ end else
+ begin
+ Result := False;
+ exit;
+ end;
+ result := True;
+end;
+
+
+function NilProc(Caller: TPSExec; p: TPSExternalProcRec; Global, Stack: TPSStack): Boolean;
+var
+ n: TPSVariantIFC;
+begin
+ n := NewTPSVariantIFC(Stack[Stack.Count-1], True);
+ if (n.Dta = nil) or ((n.aType.BaseType <> btClass) and (n.aType.BaseType <> btInterface)) then
+ begin
+ Result := False;
+ Caller.CMD_Err(erNullPointerException);
+ Exit;
+ end;
+{$IFNDEF PS_NOINTERFACES}
+ if n.aType.BaseType = btInterface then
+ begin
+ {$IFNDEF Delphi3UP}
+ if IUnknown(n.Dta^) <> nil then
+ IUnknown(n.Dta^).Release;
+ {$ENDIF}
+ IUnknown(n.Dta^) := nil;
+ end else
+ {$ENDIF}
+ Pointer(n.Dta^) := nil;
+ result := True;
+end;
+function IntfCallProc(Caller: TPSExec; p: TPSExternalProcRec; Global, Stack: TPSStack): Boolean;
+var
+ i: Integer;
+ MyList: TPSList;
+ n: TPSVariantIFC;
+ n2: PPSVariantIFC;
+ FSelf: Pointer;
+ CurrStack: Cardinal;
+ cc: TPSCallingConvention;
+ s: string;
+begin
+ s := p.Decl;
+ if length(S) < 2 then
+ begin
+ Result := False;
+ exit;
+ end;
+ cc := TPSCallingConvention(s[1]);
+ Delete(s, 1, 1);
+ if s[1] = #0 then
+ n := NewTPSVariantIFC(Stack[Stack.Count -1], false)
+ else
+ n := NewTPSVariantIFC(Stack[Stack.Count -2], false);
+ if (n.dta = nil) or (n.atype.BaseType <> btInterface) or (Pointer(n.Dta^) = nil) then
+ begin
+ Caller.CMD_Err(erNullPointerException);
+ result := false;
+ exit;
+ end;
+ FSelf := Pointer(n.dta^);
+ CurrStack := Cardinal(Stack.Count) - Cardinal(length(s)) -1;
+ if s[1] = #0 then inc(CurrStack);
+ MyList := TPSList.Create;
+ for i := 2 to length(s) do
+ begin
+ MyList.Add(nil);
+ end;
+ for i := length(s) downto 2 do
+ begin
+ MyList[i - 2] := NewPPSVariantIFC(Stack[CurrStack], s[i] <> #0);
+ inc(CurrStack);
+ end;
+ if s[1] <> #0 then
+ begin
+ n2 := NewPPSVariantIFC(Stack[CurrStack + 1], True);
+ end else n2 := nil;
+ try
+ Caller.InnerfuseCall(FSelf, Pointer(Pointer(Cardinal(FSelf^) + (Cardinal(p.Ext1) * Sizeof(Pointer)))^), cc, MyList, n2);
+ result := true;
+ finally
+ DisposePPSVariantIFC(n2);
+ DisposePPSVariantIFCList(MyList);
+ end;
+end;
+
+
+function InterfaceProc(Sender: TPSExec; p: TPSExternalProcRec; Tag: Pointer): Boolean;
+var
+ s: string;
+begin
+ s := p.Decl;
+ delete(s,1,5); // delete 'intf:'
+ if s = '' then
+ begin
+ Result := False;
+ exit;
+ end;
+ if s[1] = '.'then
+ begin
+ Delete(s,1,1);
+ if length(S) < 6 then
+ begin
+ Result := False;
+ exit;
+ end;
+ p.ProcPtr := IntfCallProc;
+ p.Ext1 := Pointer((@s[1])^); // Proc Offset
+ Delete(s,1,4);
+ P.Decl := s;
+ Result := True;
+ end else Result := False;
+end;
+
+
+function getMethodNo(P: TMethod): Cardinal;
+begin
+ if (p.Code <> @MyAllMethodsHandler) or (p.Data = nil) then
+ Result := 0
+ else
+ begin
+ Result := PScriptMethodInfo(p.Data)^.ProcNo;
+ end;
+end;
+
+function ClassCallProcProperty(Caller: TPSExec; p: TPSExternalProcRec; Global, Stack: TPSStack): Boolean;
+var
+ n: TPSVariantIFC;
+ ltemp: Longint;
+ FSelf: Pointer;
+ m: TMethod;
+begin
+ try
+ if p.Ext2 = Pointer(0) then
+ begin
+ n := NewTPSVariantIFC(Stack[Stack.Count -1], False);
+ if (n.Dta = nil) or (n.aType.BaseType <> btclass) then
+ begin
+ result := false;
+ Caller.CMD_Err(erNullPointerException);
+ exit;
+ end;
+ FSelf := Pointer(n.dta^);
+ if FSelf = nil then
+ begin
+ Caller.CMD_Err(erCouldNotCallProc);
+ Result := False;
+ exit;
+ end;
+ n := NewTPSVariantIFC(Stack[Stack.Count -2], false);
+ if (PPropInfo(p.Ext1)^.PropType^.Kind = tkMethod) and ((n.aType.BaseType = btu32) or (n.aType.BaseType = btProcPtr))then
+ begin
+ SetMethodProp(TObject(FSelf), PPropInfo(p.Ext1), MkMethod(Caller, tbtu32(n.dta^)));
+ end else
+ case n.aType.BaseType of
+ btSet:
+ begin
+ ltemp := 0;
+ move(Byte(n.Dta^), ltemp, TPSTypeRec_Set(n.aType).aByteSize);
+ SetOrdProp(TObject(FSelf), PPropInfo(p.Ext1), ltemp);
+ end;
+ btChar, btU8: SetOrdProp(TObject(FSelf), PPropInfo(p.Ext1), tbtu8(n.Dta^));
+ btS8: SetOrdProp(TObject(FSelf), PPropInfo(p.Ext1), tbts8(n.Dta^));
+ {$IFNDEF PS_NOWIDESTRING}btwidechar, {$ENDIF}btU16: SetOrdProp(TObject(FSelf), PPropInfo(p.Ext1), tbtu16(n.Dta^));
+ btS16: SetOrdProp(TObject(FSelf), PPropInfo(p.Ext1), tbts16(n.Dta^));
+ btU32: SetOrdProp(TObject(FSelf), PPropInfo(p.Ext1), tbtu32(n.Dta^));
+ btS32: SetOrdProp(TObject(FSelf), PPropInfo(p.Ext1), tbts32(n.Dta^));
+ btSingle: SetFloatProp(TObject(FSelf), p.Ext1, tbtsingle(n.Dta^));
+ btDouble: SetFloatProp(TObject(FSelf), p.Ext1, tbtdouble(n.Dta^));
+ btExtended: SetFloatProp(TObject(FSelf), p.Ext1, tbtextended(n.Dta^));
+ btString: SetStrProp(TObject(FSelf), p.Ext1, string(n.Dta^));
+ btPChar: SetStrProp(TObject(FSelf), p.Ext1, pchar(n.Dta^));
+ btClass: SetOrdProp(TObject(FSelf), P.Ext1, Longint(n.Dta^));
+ {$IFDEF DELPHI6UP}
+{$IFNDEF PS_NOWIDESTRING}btWideString: SetWideStrProp(TObject(FSelf), P.Ext1, Widestring(n.dta^)); {$ENDIF}
+{$ENDIF}
+ else
+ begin
+ Result := False;
+ exit;
+ end;
+ end;
+ Result := true;
+ end else begin
+ n := NewTPSVariantIFC(Stack[Stack.Count -2], False);
+ if (n.dta = nil) or (n.aType.BaseType <> btClass)then
+ begin
+ result := false;
+ Caller.CMD_Err(erNullPointerException);
+ exit;
+ end;
+ FSelf := Pointer(n.dta^);
+ if FSelf = nil then
+ begin
+ Caller.CMD_Err(erCouldNotCallProc);
+ Result := False;
+ exit;
+ end;
+ n := NewTPSVariantIFC(Stack[Stack.Count -1], false);
+ if (PPropInfo(p.Ext1)^.PropType^.Kind = tkMethod) and ((n.aType.BaseType = btu32) or (n.aType.BaseType = btprocptr)) then
+ begin
+ m := GetMethodProp(TObject(FSelf), PPropInfo(p.Ext1));
+ Cardinal(n.Dta^) := GetMethodNo(m);
+ if Cardinal(n.dta^) = 0 then
+ begin
+ Pointer(Pointer((IPointer(n.dta)+4))^) := m.Data;
+ Pointer(Pointer((IPointer(n.dta)+8))^) := m.Code;
+ end;
+ end else
+ case n.aType.BaseType of
+ btSet:
+ begin
+ ltemp := GetOrdProp(TObject(FSelf), PPropInfo(p.Ext1));
+ move(ltemp, Byte(n.Dta^), TPSTypeRec_Set(n.aType).aByteSize);
+ end;
+ btU8: tbtu8(n.Dta^) := GetOrdProp(TObject(FSelf), p.Ext1);
+ btS8: tbts8(n.Dta^) := GetOrdProp(TObject(FSelf), p.Ext1);
+ btU16: tbtu16(n.Dta^) := GetOrdProp(TObject(FSelf), p.Ext1);
+ btS16: tbts16(n.Dta^) := GetOrdProp(TObject(FSelf), p.Ext1);
+ btU32: tbtu32(n.Dta^) := GetOrdProp(TObject(FSelf), p.Ext1);
+ btS32: tbts32(n.Dta^) := GetOrdProp(TObject(FSelf), p.Ext1);
+ btSingle: tbtsingle(n.Dta^) := GetFloatProp(TObject(FSelf), p.Ext1);
+ btDouble: tbtdouble(n.Dta^) := GetFloatProp(TObject(FSelf), p.Ext1);
+ btExtended: tbtextended(n.Dta^) := GetFloatProp(TObject(FSelf), p.Ext1);
+ btString: string(n.Dta^) := GetStrProp(TObject(FSelf), p.Ext1);
+ btClass: Longint(n.dta^) := GetOrdProp(TObject(FSelf), p.Ext1);
+ {$IFDEF DELPHI6UP}
+{$IFNDEF PS_NOWIDESTRING}btWideString: Widestring(n.dta^) := GetWideStrProp(TObject(FSelf), P.Ext1); {$ENDIF}
+{$ENDIF}
+ else
+ begin
+ Result := False;
+ exit;
+ end;
+ end;
+ Result := True;
+ end;
+ finally
+ end;
+end;
+
+function ClassCallProcPropertyHelper(Caller: TPSExec; p: TPSExternalProcRec; Global, Stack: TPSStack): Boolean;
+var
+ I, ParamCount: Longint;
+ Params: TPSList;
+ n: TPSVariantIFC;
+ FSelf: Pointer;
+begin
+ if Length(P.Decl) < 4 then begin
+ Result := False;
+ exit;
+ end;
+ ParamCount := Longint((@P.Decl[1])^);
+ if Longint(Stack.Count) < ParamCount +1 then begin
+ Result := False;
+ exit;
+ end;
+ Dec(ParamCount);
+ if p.Ext1 <> nil then // read
+ begin
+ n := NewTPSVariantIFC(Stack[Longint(Stack.Count) - 2], False);
+ if (n.Dta = nil) or (n.aType.BaseType <> btClass) then
+ begin
+ result := false;
+ Caller.CMD_Err(erNullPointerException);
+ exit;
+ end;
+ FSelf := pointer(n.Dta^);
+ if FSelf = nil then
+ begin
+ Caller.CMD_Err(erCouldNotCallProc);
+ Result := False;
+ exit;
+ end;
+ Params := TPSList.Create;
+ Params.Add(NewPPSVariantIFC(Stack[Longint(Stack.Count) - 1], True));
+ for i := Stack.Count -3 downto Longint(Stack.Count) - ParamCount -2 do
+ begin
+ Params.Add(NewPPSVariantIFC(Stack[I], False));
+ end;
+ try
+ Result := Caller.InnerfuseCall(FSelf, p.Ext1, cdRegister, Params, nil);
+ finally
+ DisposePPSVariantIFCList(Params);
+ end;
+ end else begin
+ n := NewTPSVariantIFC(Stack[Longint(Stack.Count) - 1], False);
+ if (n.Dta = nil) or (n.aType.BaseType <> btClass) then
+ begin
+ result := false;
+ Caller.CMD_Err(erNullPointerException);
+ exit;
+ end;
+ FSelf := pointer(n.Dta^);
+ if FSelf = nil then
+ begin
+ Caller.CMD_Err(erCouldNotCallProc);
+ Result := False;
+ exit;
+ end;
+ Params := TPSList.Create;
+ Params.Add(NewPPSVariantIFC(Stack[Longint(Stack.Count) - ParamCount - 2], False));
+
+ for i := Stack.Count -2 downto Longint(Stack.Count) - ParamCount -1 do
+ begin
+ Params.Add(NewPPSVariantIFC(Stack[I], False));
+ end;
+ try
+ Result := Caller.InnerfuseCall(FSelf, p.Ext2, cdregister, Params, nil);
+ finally
+ DisposePPSVariantIFCList(Params);
+ end;
+ end;
+end;
+
+function ClassCallProcPropertyHelperName(Caller: TPSExec; p: TPSExternalProcRec; Global, Stack: TPSStack): Boolean;
+var
+ I, ParamCount: Longint;
+ Params: TPSList;
+ tt: PIFVariant;
+ n: TPSVariantIFC;
+ FSelf: Pointer;
+begin
+ if Length(P.Decl) < 4 then begin
+ Result := False;
+ exit;
+ end;
+ ParamCount := Longint((@P.Decl[1])^);
+ if Longint(Stack.Count) < ParamCount +1 then begin
+ Result := False;
+ exit;
+ end;
+ Dec(ParamCount);
+ if p.Ext1 <> nil then // read
+ begin
+ n := NewTPSVariantIFC(Stack[Longint(Stack.Count) - 2], false);
+ if (n.Dta = nil) or (n.aType.BaseType <> btClass) then
+ begin
+ result := false;
+ Caller.CMD_Err(erNullPointerException);
+ exit;
+ end;
+ FSelf := Tobject(n.dta^);
+ Params := TPSList.Create;
+ Params.Add(NewPPSVariantIFC(Stack[Longint(Stack.Count) - 1], True));
+ for i := Stack.Count -3 downto Longint(Stack.Count) - ParamCount -2 do
+ Params.Add(NewPPSVariantIFC(Stack[I], False));
+ tt := CreateHeapVariant(Caller.FindType2(btString));
+ if tt <> nil then
+ begin
+ PPSVariantAString(tt).Data := p.Name;
+ Params.Add(NewPPSVariantIFC(tt, false));
+ end;
+ try
+ Result := Caller.InnerfuseCall(FSelf, p.Ext1, cdRegister, Params, nil);
+ finally
+ DestroyHeapVariant(tt);
+ DisposePPSVariantIFCList(Params);
+ end;
+ end else begin
+ n := NewTPSVariantIFC(Stack[Longint(Stack.Count) - 1], false);
+ if (n.Dta = nil) or (n.aType.BaseType <> btClass) then
+ begin
+ result := false;
+ Caller.CMD_Err(erNullPointerException);
+ exit;
+ end;
+ FSelf := Tobject(n.dta^);
+ Params := TPSList.Create;
+ Params.Add(NewPPSVariantIFC(Stack[Longint(Stack.Count) - 2], True));
+
+ for i := Stack.Count -2 downto Longint(Stack.Count) - ParamCount -1 do
+ begin
+ Params.Add(NewPPSVariantIFC(Stack[I], false));
+ end;
+ tt := CreateHeapVariant(Caller.FindType2(btString));
+ if tt <> nil then
+ begin
+ PPSVariantAString(tt).Data := p.Name;
+ Params.Add(NewPPSVariantIFC(tt, false));
+ end;
+ try
+ Result := Caller.InnerfuseCall(FSelf, p.Ext2, cdregister, Params, nil);
+ finally
+ DestroyHeapVariant(tt);
+ DisposePPSVariantIFCList(Params);
+ end;
+ end;
+end;
+
+
+
+function ClassCallProcEventPropertyHelper(Caller: TPSExec; p: TPSExternalProcRec; Global, Stack: TPSStack): Boolean;
+{Event property helper}
+var
+ I, ParamCount: Longint;
+ Params: TPSList;
+ n: TPSVariantIFC;
+ n2: PIFVariant;
+ FSelf: Pointer;
+begin
+ if Length(P.Decl) < 4 then begin
+ Result := False;
+ exit;
+ end;
+ ParamCount := Longint((@P.Decl[1])^);
+ if Longint(Stack.Count) < ParamCount +1 then begin
+ Result := False;
+ exit;
+ end;
+ Dec(ParamCount);
+ if p.Ext1 <> nil then // read
+ begin
+ n := NewTPSVariantIFC(Stack[Longint(Stack.Count) - 2], false);
+ if (n.Dta = nil) or (n.aType.BaseType <> btClass) then
+ begin
+ result := false;
+ Caller.CMD_Err(erNullPointerException);
+ exit;
+ end;
+ FSelf := Tobject(n.dta^);
+ n := NewTPSVariantIFC(Stack[Longint(Stack.Count) - 1], True); // Result
+ if (n.aType.BaseType <> btU32) and (n.aType.BaseType <> btProcPtr) then
+ begin
+ Result := False;
+ Caller.CMD_Err(erNullPointerException);
+ exit;
+ end;
+ n2 := CreateHeapVariant(Caller.FindType2(btDouble));
+ if n2 = nil then
+ begin
+ Result := False;
+ exit;
+ end;
+ TMethod(PPSVariantDouble(n2).Data).Code := nil;
+ TMethod(PPSVariantDouble(n2).Data).Data := nil;
+ Params := TPSList.Create;
+ Params.Add(NewPPSVariantIFC(n2, True));
+ for i := Stack.Count -3 downto Longint(Stack.Count) - ParamCount -2 do
+ Params.Add(NewPPSVariantIFC(Stack[i], False));
+ try
+ Result := Caller.InnerfuseCall(FSelf, p.Ext1, cdRegister, Params, nil);
+ finally
+ Cardinal(n.Dta^) := getMethodNo(TMethod(PPSVariantDouble(n2).Data));
+ if Cardinal(n.Dta^) = 0 then
+ begin
+ Pointer(Pointer((IPointer(n.dta)+4))^) := TMethod(PPSVariantDouble(n2).Data).Data;
+ Pointer(Pointer((IPointer(n.dta)+8))^) := TMethod(PPSVariantDouble(n2).Data).Code;
+ end;
+ DestroyHeapVariant(n2);
+ DisposePPSVariantIFCList(Params);
+ end;
+ end else begin
+ n := NewTPSVariantIFC(Stack[Longint(Stack.Count) - 1], false);
+ if (n.Dta = nil) or (n.aType.BaseType <> btClass) then
+ begin
+ result := false;
+ Caller.CMD_Err(erNullPointerException);
+ exit;
+ end;
+ FSelf := Tobject(n.dta^);
+ n := NewTPSVariantIFC(Stack[Longint(Stack.Count) - 2], false);
+ if (n.Dta = nil) or ((n.aType.BaseType <> btu32) and (n.aType.BaseType <> btProcPtr)) then
+ begin
+ result := false;
+ Caller.CMD_Err(erNullPointerException);
+ exit;
+ end;
+ n2 := CreateHeapVariant(Caller.FindType2(btDouble));
+ if n2 = nil then
+ begin
+ Result := False;
+ exit;
+ end;
+ TMethod(PPSVariantDouble(n2).Data) := MkMethod(Caller, cardinal(n.dta^));
+ Params := TPSList.Create;
+ Params.Add(NewPPSVariantIFC(n2, False));
+
+ for i := Stack.Count -2 downto Longint(Stack.Count) - ParamCount -1 do
+ begin
+ Params.Add(NewPPSVariantIFC(Stack[I], False));
+ end;
+ try
+ Result := Caller.InnerfuseCall(FSelf, p.Ext2, cdregister, Params, nil);
+ finally
+ DestroyHeapVariant(n2);
+ DisposePPSVariantIFCList(Params);
+ end;
+ end;
+end;
+
+
+{'class:'+CLASSNAME+'|'+FUNCNAME+'|'+chr(CallingConv)+chr(hasresult)+params
+
+For property write functions there is an '@' after the funcname.
+}
+function SpecImport(Sender: TPSExec; p: TPSExternalProcRec; Tag: Pointer): Boolean;
+var
+ H, I: Longint;
+ S, s2: string;
+ CL: TPSRuntimeClass;
+ Px: PClassItem;
+ pp: PPropInfo;
+ IsRead: Boolean;
+begin
+ s := p.Decl;
+ delete(s, 1, 6);
+ if s = '-' then {nil function}
+ begin
+ p.ProcPtr := NilProc;
+ Result := True;
+ exit;
+ end;
+ if s = '+' then {cast function}
+ begin
+ p.ProcPtr := CastProc;
+ p.Ext2 := Tag;
+ Result := True;
+ exit;
+ end;
+ s2 := copy(S, 1, pos('|', s)-1);
+ delete(s, 1, length(s2) + 1);
+ H := MakeHash(s2);
+ ISRead := False;
+ cl := nil;
+ for I := TPSRuntimeClassImporter(Tag).FClasses.Count -1 downto 0 do
+ begin
+ Cl := TPSRuntimeClassImporter(Tag).FClasses[I];
+ if (Cl.FClassNameHash = h) and (cl.FClassName = s2) then
+ begin
+ IsRead := True;
+ break;
+ end;
+ end;
+ if not isRead then begin
+ Result := False;
+ exit;
+ end;
+ s2 := copy(S, 1, pos('|', s)-1);
+ delete(s, 1, length(s2) + 1);
+ if (s2 <> '') and (s2[length(s2)] = '@') then
+ begin
+ IsRead := False;
+ Delete(S2, length(s2), 1);
+ end else
+ isRead := True;
+ p.Name := s2;
+ H := MakeHash(s2);
+ for i := cl.FClassItems.Count -1 downto 0 do
+ begin
+ px := cl.FClassItems[I];
+ if (px^.FNameHash = h) and (px^.FName = s2) then
+ begin
+ p.Decl := s;
+ case px^.b of
+ {0: ext1=ptr}
+ {1: ext1=pointerinlist}
+ {2: ext1=propertyinfo}
+ {3: ext1=readfunc; ext2=writefunc}
+ 4:
+ begin
+ p.ProcPtr := ClassCallProcConstructor;
+ p.Ext1 := px^.Ptr;
+ if p.Ext1 = nil then begin result := false; exit; end;
+ p.Ext2 := Tag;
+ end;
+ 5:
+ begin
+ p.ProcPtr := ClassCallProcVirtualConstructor;
+ p.Ext1 := px^.Ptr;
+ if p.Ext1 = nil then begin result := false; exit; end;
+ p.Ext2 := Tag;
+ end;
+ 6:
+ begin
+ p.ProcPtr := ClassCallProcEventPropertyHelper;
+ if IsRead then
+ begin
+ p.Ext1 := px^.FReadFunc;
+ if p.Ext1 = nil then begin result := false; exit; end;
+ p.Ext2 := nil;
+ end else
+ begin
+ p.Ext1 := nil;
+ p.Ext2 := px^.FWriteFunc;
+ if p.Ext2 = nil then begin result := false; exit; end;
+ end;
+ end;
+ 0:
+ begin
+ p.ProcPtr := ClassCallProcMethod;
+ p.Ext1 := px^.Ptr;
+ if p.Ext1 = nil then begin result := false; exit; end;
+ p.Ext2 := nil;
+ end;
+ 1:
+ begin
+ p.ProcPtr := ClassCallProcMethod;
+ p.Ext1 := px^.PointerInList;
+ //if p.Ext1 = nil then begin result := false; exit; end;
+ p.ext2 := pointer(1);
+ end;
+ 3:
+ begin
+ p.ProcPtr := ClassCallProcPropertyHelper;
+ if IsRead then
+ begin
+ p.Ext1 := px^.FReadFunc;
+ if p.Ext1 = nil then begin result := false; exit; end;
+ p.Ext2 := nil;
+ end else
+ begin
+ p.Ext1 := nil;
+ p.Ext2 := px^.FWriteFunc;
+ if p.Ext2 = nil then begin result := false; exit; end;
+ end;
+ end;
+ 7:
+ begin
+ p.ProcPtr := ClassCallProcPropertyHelperName;
+ if IsRead then
+ begin
+ p.Ext1 := px^.FReadFunc;
+ if p.Ext1 = nil then begin result := false; exit; end;
+ p.Ext2 := nil;
+ end else
+ begin
+ p.Ext1 := nil;
+ p.Ext2 := px^.FWriteFunc;
+ if p.Ext2 = nil then begin result := false; exit; end;
+ end;
+ end;
+ else
+ begin
+ result := false;
+ exit;
+ end;
+ end;
+ Result := true;
+ exit;
+ end;
+ end;
+ if cl.FClass.ClassInfo <> nil then
+ begin
+ pp := GetPropInfo(cl.FClass.ClassInfo, s2);
+ if pp <> nil then
+ begin
+ p.ProcPtr := ClassCallProcProperty;
+ p.Ext1 := pp;
+ if IsRead then
+ p.Ext2 := Pointer(1)
+ else
+ p.Ext2 := Pointer(0);
+ Result := True;
+ end else
+ result := false;
+ end else
+ Result := False;
+end;
+
+procedure RegisterClassLibraryRuntime(SE: TPSExec; Importer: TPSRuntimeClassImporter);
+begin
+ SE.AddSpecialProcImport('class', SpecImport, Importer);
+end;
+
+
+procedure TPSExec.ClearspecialProcImports;
+var
+ I: Longint;
+ P: PSpecialProc;
+begin
+ for I := FSpecialProcList.Count -1 downto 0 do
+ begin
+ P := FSpecialProcList[I];
+ Dispose(p);
+ end;
+ FSpecialProcList.Clear;
+end;
+
+procedure TPSExec.RaiseCurrentException;
+var
+ ExObj: TObject;
+begin
+ if ExEx = erNoError then exit; // do nothing
+ ExObj := Self.ExObject;
+ if ExObj <> nil then
+ begin
+ Self.ExObject := nil;
+ raise ExObj;
+ end;
+ raise EPSException.Create(PSErrorToString(ExceptionCode, ExceptionString), Self, ExProc, ExPos);
+end;
+
+procedure TPSExec.CMD_Err2(EC: TPSError; const Param: string);
+begin
+ CMD_Err3(EC, Param, Nil);
+end;
+
+function TPSExec.GetProcAsMethod(const ProcNo: Cardinal): TMethod;
+begin
+ Result := MkMethod(Self, ProcNo);
+end;
+
+function TPSExec.GetProcAsMethodN(const ProcName: string): TMethod;
+var
+ procno: Cardinal;
+begin
+ Procno := GetProc(ProcName);
+ if Procno = InvalidVal then
+ begin
+ Result.Code := nil;
+ Result.Data := nil;
+ end
+ else
+ Result := MkMethod(Self, procno)
+end;
+
+
+procedure TPSExec.RegisterAttributeType(useproc: TPSAttributeUseProc;
+ const TypeName: string);
+var
+ att: TPSAttributeType;
+begin
+ att := TPSAttributeType.Create;
+ att.TypeName := TypeName;
+ att.TypeNameHash := MakeHash(TypeName);
+ att.UseProc := UseProc;
+ FAttributeTypes.Add(att);
+end;
+
+function TPSExec.GetProcCount: Cardinal;
+begin
+ Result := FProcs.Count;
+end;
+
+function TPSExec.GetTypeCount: Longint;
+begin
+ Result := FTypes.Count;
+end;
+
+function TPSExec.GetVarCount: Longint;
+begin
+ Result := FGlobalVars.Count;
+end;
+
+function TPSExec.FindSpecialProcImport(
+ P: TPSOnSpecialProcImport): pointer;
+var
+ i: Longint;
+ pr: PSpecialProc;
+begin
+ for i := FSpecialProcList.Count -1 downto 0 do
+ begin
+ pr := FSpecialProcList[i];
+ if @pr.P = @p then
+ begin
+ Result := pr.tag;
+ exit;
+ end;
+ end;
+ result := nil;
+end;
+
+function TPSExec.InvokeExternalMethod(At: TPSTypeRec_ProcPtr; Slf,
+ Ptr: Pointer): Boolean;
+var
+ res: PPSVariantIFC;
+ s: string;
+ CurrStack, i: Longint;
+ n: PPSVariant;
+ MyList: TPSList;
+begin
+ s := TPSTypeRec_ProcPtr(at).ParamInfo;
+// Delete(s, 1, 1);
+ CurrStack := Cardinal(FStack.Count) - Cardinal(length(s)) -1;
+ if s[1] = #0 then inc(CurrStack);
+ MyList := TPSList.Create;
+ for i := 2 to length(s) do
+ begin
+ MyList.Add(nil);
+ end;
+ for i := length(s) downto 2 do
+ begin
+ n := FStack[CurrStack];
+ MyList[i - 2] := NewPPSVariantIFC(n, s[i] <> #0);
+ inc(CurrStack);
+ end;
+ if s[1] <> #0 then
+ begin
+ res := NewPPSVariantIFC(FStack[CurrStack + 1], True);
+ end else res := nil;
+ Result := InnerfuseCall(Slf, Ptr, cdRegister, MyList, Res);
+
+ DisposePPSVariantIFC(res);
+ DisposePPSVariantIFCList(mylist);
+end;
+
+function TPSExec.LastEx: TPSError;
+var
+ pp: TPSExceptionHandler;
+begin
+ if FExceptionStack.Count = 0 then begin
+ result := ExEx;
+ exit;
+ end;
+ pp := fExceptionStack[fExceptionStack.Count-1];
+ result := pp.ExceptionData;
+end;
+
+function TPSExec.LastExParam: string;
+begin
+ result := ExParam;
+end;
+
+function TPSExec.LastExPos: Integer;
+begin
+ result := ExPos;
+end;
+
+function TPSExec.LastExProc: Integer;
+begin
+ result := exProc;
+end;
+
+{ TPSRuntimeClass }
+
+constructor TPSRuntimeClass.Create(aClass: TClass; const AName: string);
+begin
+ inherited Create;
+ FClass := AClass;
+ if AName = '' then
+ begin
+ FClassName := FastUpperCase(aClass.ClassName);
+ FClassNameHash := MakeHash(FClassName);
+ end else begin
+ FClassName := FastUppercase(AName);
+ FClassNameHash := MakeHash(FClassName);
+ end;
+ FClassItems:= TPSList.Create;
+ FEndOfVmt := MaxInt;
+end;
+
+destructor TPSRuntimeClass.Destroy;
+var
+ I: Longint;
+ P: PClassItem;
+begin
+ for i:= FClassItems.Count -1 downto 0 do
+ begin
+ P := FClassItems[I];
+ Dispose(p);
+ end;
+ FClassItems.Free;
+ inherited Destroy;
+end;
+
+procedure TPSRuntimeClass.RegisterVirtualAbstractMethod(ClassDef: TClass;
+ ProcPtr: Pointer; const Name: string);
+var
+ P: PClassItem;
+begin
+ New(P);
+ p^.FName := FastUppercase(Name);
+ p^.FNameHash := MakeHash(p^.FName);
+ p^.b := 1;
+ p^.PointerInList := FindVirtualMethodPtr(Self, ClassDef, ProcPtr);
+ FClassItems.Add(p);
+end;
+
+procedure TPSRuntimeClass.RegisterConstructor(ProcPtr: Pointer;
+ const Name: string);
+var
+ P: PClassItem;
+begin
+ New(P);
+ p^.FName := FastUppercase(Name);
+ p^.FNameHash := MakeHash(p^.FName);
+ p^.b := 4;
+ p^.Ptr := ProcPtr;
+ FClassItems.Add(p);
+end;
+
+procedure TPSRuntimeClass.RegisterMethod(ProcPtr: Pointer; const Name: string);
+var
+ P: PClassItem;
+begin
+ New(P);
+ p^.FName := FastUppercase(Name);
+ p^.FNameHash := MakeHash(p^.FName);
+ p^.b := 0;
+ p^.Ptr := ProcPtr;
+ FClassItems.Add(p);
+end;
+
+
+procedure TPSRuntimeClass.RegisterPropertyHelper(ReadFunc,
+ WriteFunc: Pointer; const Name: string);
+var
+ P: PClassItem;
+begin
+ New(P);
+ p^.FName := FastUppercase(Name);
+ p^.FNameHash := MakeHash(p^.FName);
+ p^.b := 3;
+ p^.FReadFunc := ReadFunc;
+ p^.FWriteFunc := WriteFunc;
+ FClassItems.Add(p);
+end;
+
+procedure TPSRuntimeClass.RegisterVirtualConstructor(ProcPtr: Pointer;
+ const Name: string);
+var
+ P: PClassItem;
+begin
+ New(P);
+ p^.FName := FastUppercase(Name);
+ p^.FNameHash := MakeHash(p^.FName);
+ p^.b := 5;
+ p^.PointerInList := FindVirtualMethodPtr(Self, FClass, ProcPtr);
+ FClassItems.Add(p);
+end;
+
+procedure TPSRuntimeClass.RegisterVirtualMethod(ProcPtr: Pointer; const Name: string);
+var
+ P: PClassItem;
+begin
+ New(P);
+ p^.FName := FastUppercase(Name);
+ p^.FNameHash := MakeHash(p^.FName);
+ p^.b := 1;
+ p^.PointerInList := FindVirtualMethodPtr(Self, FClass, ProcPtr);
+ FClassItems.Add(p);
+end;
+
+procedure TPSRuntimeClass.RegisterEventPropertyHelper(ReadFunc,
+ WriteFunc: Pointer; const Name: string);
+var
+ P: PClassItem;
+begin
+ New(P);
+ p^.FName := FastUppercase(Name);
+ p^.FNameHash := MakeHash(p^.FName);
+ p^.b := 6;
+ p^.FReadFunc := ReadFunc;
+ p^.FWriteFunc := WriteFunc;
+ FClassItems.Add(p);
+end;
+
+
+procedure TPSRuntimeClass.RegisterPropertyHelperName(ReadFunc,
+ WriteFunc: Pointer; const Name: string);
+var
+ P: PClassItem;
+begin
+ New(P);
+ p^.FName := FastUppercase(Name);
+ p^.FNameHash := MakeHash(p^.FName);
+ p^.b := 7;
+ p^.FReadFunc := ReadFunc;
+ p^.FWriteFunc := WriteFunc;
+ FClassItems.Add(p);
+end;
+
+{ TPSRuntimeClassImporter }
+
+function TPSRuntimeClassImporter.Add(aClass: TClass): TPSRuntimeClass;
+begin
+ Result := FindClass(FastUppercase(aClass.ClassName));
+ if Result <> nil then exit;
+ Result := TPSRuntimeClass.Create(aClass, '');
+ FClasses.Add(Result);
+end;
+
+function TPSRuntimeClassImporter.Add2(aClass: TClass;
+ const Name: string): TPSRuntimeClass;
+begin
+ Result := FindClass(Name);
+ if Result <> nil then exit;
+ Result := TPSRuntimeClass.Create(aClass, Name);
+ FClasses.Add(Result);
+end;
+
+procedure TPSRuntimeClassImporter.Clear;
+var
+ I: Longint;
+begin
+ for i := 0 to FClasses.Count -1 do
+ begin
+ TPSRuntimeClass(FClasses[I]).Free;
+ end;
+ FClasses.Clear;
+end;
+
+constructor TPSRuntimeClassImporter.Create;
+begin
+ inherited Create;
+ FClasses := TPSList.Create;
+
+end;
+
+constructor TPSRuntimeClassImporter.CreateAndRegister(Exec: TPSexec;
+ AutoFree: Boolean);
+begin
+ inherited Create;
+ FClasses := TPSList.Create;
+ RegisterClassLibraryRuntime(Exec, Self);
+ if AutoFree then
+ Exec.AddResource(@RCIFreeProc, Self);
+end;
+
+destructor TPSRuntimeClassImporter.Destroy;
+begin
+ Clear;
+ FClasses.Free;
+ inherited Destroy;
+end;
+
+{$IFNDEF PS_NOINTERFACES}
+procedure SetVariantToInterface(V: PIFVariant; Cl: IUnknown);
+begin
+ if (v <> nil) and (v.FType.BaseType = btInterface) then
+ begin
+ PPSVariantinterface(v).Data := cl;
+ {$IFNDEF Delphi3UP}
+ if PPSVariantinterface(v).Data <> nil then
+ PPSVariantinterface(v).Data.AddRef;
+ {$ENDIF}
+ end;
+end;
+{$ENDIF}
+
+procedure SetVariantToClass(V: PIFVariant; Cl: TObject);
+begin
+ if (v <> nil) and (v.FType.BaseType = btClass) then
+ begin
+ PPSVariantclass(v).Data := cl;
+ end;
+end;
+
+function BGRFW(var s: string): string;
+var
+ l: Longint;
+begin
+ l := Length(s);
+ while l >0 do
+ begin
+ if s[l] = ' ' then
+ begin
+ Result := copy(s, l + 1, Length(s) - l);
+ Delete(s, l, Length(s) - l + 1);
+ exit;
+ end;
+ Dec(l);
+ end;
+ Result := s;
+ s := '';
+end;
+
+{$ifdef fpc}
+ {$if defined(cpupowerpc)}
+ {$define ppc}
+ {$ifend}
+{$endif}
+{$ifdef ppc}
+procedure MyAllMethodsHandler;
+begin
+end;
+{$else}
+
+
+function MyAllMethodsHandler2(Self: PScriptMethodInfo; const Stack: PPointer; _EDX, _ECX: Pointer): Integer; forward;
+
+procedure MyAllMethodsHandler;
+// On entry:
+// EAX = Self pointer
+// EDX, ECX = param1 and param2
+// STACK = param3... paramcount
+asm
+ push 0
+ push ecx
+ push edx
+ mov edx, esp
+ add edx, 16 // was 12
+ pop ecx
+ call MyAllMethodsHandler2
+ pop ecx
+ mov edx, [esp]
+ add esp, eax
+ mov [esp], edx
+ mov eax, ecx
+end;
+
+function ResultAsRegister(b: TPSTypeRec): Boolean;
+begin
+ case b.BaseType of
+ btSingle,
+ btDouble,
+ btExtended,
+ btU8,
+ bts8,
+ bts16,
+ btu16,
+ bts32,
+ btu32,
+{$IFDEF PS_FPCSTRINGWORKAROUND}
+ btString,
+{$ENDIF}
+{$IFNDEF PS_NOINT64}
+ bts64,
+{$ENDIF}
+ btPChar,
+{$IFNDEF PS_NOWIDESTRING}
+ btWideChar,
+{$ENDIF}
+ btChar,
+ btclass,
+ btEnum: Result := true;
+ btSet: Result := b.RealSize <= 4;
+ btStaticArray: Result := b.RealSize <= 4;
+ else
+ Result := false;
+ end;
+end;
+
+function SupportsRegister(b: TPSTypeRec): Boolean;
+begin
+ case b.BaseType of
+ btU8,
+ bts8,
+ bts16,
+ btu16,
+ bts32,
+ btu32,
+{$IFNDEF PS_NOINT64}
+ bts64,
+{$ENDIF}
+ btstring,
+ btclass,
+{$IFNDEF PS_NOINTERFACES}
+ btinterface,
+{$ENDIF}
+ btPChar,
+{$IFNDEF PS_NOWIDESTRING}
+ btwidestring,
+ btWideChar,
+{$ENDIF}
+ btChar,
+ btArray,
+ btEnum: Result := true;
+ btSet: Result := b.RealSize <= 4;
+ btStaticArray: Result := b.RealSize <= 4;
+ else
+ Result := false;
+ end;
+end;
+
+function AlwaysAsVariable(aType: TPSTypeRec): Boolean;
+begin
+ case atype.BaseType of
+ btVariant: Result := true;
+ btSet: Result := atype.RealSize > 4;
+ btRecord: Result := atype.RealSize > 4;
+ btStaticArray: Result := atype.RealSize > 4;
+ else
+ Result := false;
+ end;
+end;
+
+
+procedure PutOnFPUStackExtended(ft: extended);
+asm
+// fstp tbyte ptr [ft]
+ fld tbyte ptr [ft]
+
+end;
+
+
+function MyAllMethodsHandler2(Self: PScriptMethodInfo; const Stack: PPointer; _EDX, _ECX: Pointer): Integer;
+var
+ Decl: string;
+ I, C, regno: Integer;
+ Params: TPSList;
+ Res, Tmp: PIFVariant;
+ cpt: PIFTypeRec;
+ fmod: char;
+ s,e: string;
+ FStack: pointer;
+ ex: TPSExceptionHandler;
+
+
+begin
+ Decl := TPSInternalProcRec(Self^.Se.FProcs[Self^.ProcNo]).ExportDecl;
+
+ FStack := Stack;
+ Params := TPSList.Create;
+ s := decl;
+ grfw(s);
+ while s <> '' do
+ begin
+ Params.Add(nil);
+ grfw(s);
+ end;
+ c := Params.Count;
+ regno := 0;
+ Result := 0;
+ s := decl;
+ grfw(s);
+ for i := c-1 downto 0 do
+ begin
+ e := grfw(s);
+ fmod := e[1];
+ delete(e, 1, 1);
+ cpt := Self.Se.GetTypeNo(StrToInt(e));
+ if ((fmod = '%') or (fmod = '!') or (AlwaysAsVariable(cpt))) and (RegNo < 2) then
+ begin
+ tmp := CreateHeapVariant(self.Se.FindType2(btPointer));
+ PPSVariantPointer(tmp).DestType := cpt;
+ Params[i] := tmp;
+ case regno of
+ 0: begin
+ PPSVariantPointer(tmp).DataDest := Pointer(_EDX);
+ inc(regno);
+ end;
+ 1: begin
+ PPSVariantPointer(tmp).DataDest := Pointer(_ECX);
+ inc(regno);
+ end;
+(* else begin
+ PPSVariantPointer(tmp).DataDest := Pointer(FStack^);
+ FStack := Pointer(IPointer(FStack) + 4);
+ end;*)
+ end;
+ end
+ else if SupportsRegister(cpt) and (RegNo < 2) then
+ begin
+ tmp := CreateHeapVariant(cpt);
+ Params[i] := tmp;
+ case regno of
+ 0: begin
+ CopyArrayContents(@PPSVariantData(tmp)^.Data, @_EDX, 1, cpt);
+ inc(regno);
+ end;
+ 1: begin
+ CopyArrayContents(@PPSVariantData(tmp)^.Data, @_ECX, 1, cpt);
+ inc(regno);
+ end;
+(* else begin
+ CopyArrayContents(@PPSVariantData(tmp)^.Data, Pointer(FStack), 1, cpt);
+ FStack := Pointer(IPointer(FStack) + 4);
+ end;*)
+ end;
+(* end else
+ begin
+ tmp := CreateHeapVariant(cpt);
+ Params[i] := tmp;
+ CopyArrayContents(@PPSVariantData(tmp)^.Data, Pointer(FStack), 1, cpt);
+ FStack := Pointer(IPointer(FStack) + cpt.RealSize + 3 and not 3);*)
+ end;
+ end;
+ s := decl;
+ grfw(s);
+ for i := 0 to c -1 do
+ begin
+ e := grlw(s);
+ fmod := e[1];
+ delete(e, 1, 1);
+ if Params[i] <> nil then Continue;
+ cpt := Self.Se.GetTypeNo(StrToInt(e));
+ if (fmod = '%') or (fmod = '!') or (AlwaysAsVariable(cpt)) then
+ begin
+ tmp := CreateHeapVariant(self.Se.FindType2(btPointer));
+ PPSVariantPointer(tmp).DestType := cpt;
+ Params[i] := tmp;
+ PPSVariantPointer(tmp).DataDest := Pointer(FStack^);
+ FStack := Pointer(IPointer(FStack) + 4);
+ Inc(Result, 4);
+ end
+(* else if SupportsRegister(cpt) then
+ begin
+ tmp := CreateHeapVariant(cpt);
+ Params[i] := tmp;
+ CopyArrayContents(@PPSVariantData(tmp)^.Data, Pointer(FStack), 1, cpt);
+ FStack := Pointer(IPointer(FStack) + 4);
+ end;
+ end *)else
+ begin
+ tmp := CreateHeapVariant(cpt);
+ Params[i] := tmp;
+ CopyArrayContents(@PPSVariantData(tmp)^.Data, Pointer(FStack), 1, cpt);
+ FStack := Pointer((IPointer(FStack) + cpt.RealSize + 3) and not 3);
+ Inc(Result, (cpt.RealSize + 3) and not 3);
+ end;
+ end;
+ s := decl;
+ e := grfw(s);
+
+ if e <> '-1' then
+ begin
+ cpt := Self.Se.GetTypeNo(StrToInt(e));
+ if not ResultAsRegister(cpt) then
+ begin
+ Res := CreateHeapVariant(Self.Se.FindType2(btPointer));
+ PPSVariantPointer(Res).DestType := cpt;
+ Params.Add(Res);
+ case regno of
+ 0: begin
+ PPSVariantPointer(Res).DataDest := Pointer(_EDX);
+ end;
+ 1: begin
+ PPSVariantPointer(Res).DataDest := Pointer(_ECX);
+ end;
+ else begin
+ PPSVariantPointer(Res).DataDest := Pointer(FStack^);
+(*{$IFNDEF PS_NOINT64}
+ FStack := Pointer(IPointer(FStack) + 4);
+{$ENDIF}*)
+ Inc(Result, 4);
+ end;
+ end;
+ end else
+ begin
+ Res := CreateHeapVariant(cpt);
+ Params.Add(Res);
+ end;
+ end else Res := nil;
+ ex := TPSExceptionHandler.Create;
+ ex.FinallyOffset := InvalidVal;
+ ex.ExceptOffset := InvalidVal;
+ ex.Finally2Offset := InvalidVal;
+ ex.EndOfBlock := InvalidVal;
+ ex.CurrProc := nil;
+ ex.BasePtr := Self.Se.FCurrStackBase;
+ Ex.StackSize := Self.Se.FStack.Count;
+ i := Self.Se.FExceptionStack.Add(ex);
+ Self.Se.RunProc(Params, Self.ProcNo);
+ if Self.Se.FExceptionStack[i] = ex then
+ begin
+ Self.Se.FExceptionStack.Remove(ex);
+ ex.Free;
+ end;
+
+ if (Res <> nil) then
+ begin
+ Params.DeleteLast;
+ if (ResultAsRegister(Res.FType)) then
+ begin
+ if (res^.FType.BaseType = btSingle) or (res^.FType.BaseType = btDouble) or
+ (res^.FType.BaseType = btCurrency) or (res^.Ftype.BaseType = btExtended) then
+ begin
+ case Res^.FType.BaseType of
+ btSingle: PutOnFPUStackExtended(PPSVariantSingle(res).Data);
+ btDouble: PutOnFPUStackExtended(PPSVariantDouble(res).Data);
+ btExtended: PutOnFPUStackExtended(PPSVariantExtended(res).Data);
+ btCurrency: PutOnFPUStackExtended(PPSVariantCurrency(res).Data);
+ end;
+ DestroyHeapVariant(Res);
+ Res := nil;
+ end else
+ begin
+{$IFNDEF PS_NOINT64}
+ if res^.FType.BaseType <> btS64 then
+{$ENDIF}
+ CopyArrayContents(Pointer(Longint(Stack)-8), @PPSVariantData(res)^.Data, 1, Res^.FType);
+ end;
+ end;
+ DestroyHeapVariant(res);
+ end;
+ for i := 0 to Params.Count -1 do
+ DestroyHeapVariant(Params[i]);
+ Params.Free;
+ if Self.Se.ExEx <> erNoError then
+ begin
+ if Self.Se.ExObject <> nil then
+ begin
+ FStack := Self.Se.ExObject;
+ Self.Se.ExObject := nil;
+ raise TObject(FStack);
+ end else
+ raise EPSException.Create(PSErrorToString(Self.SE.ExceptionCode, Self.Se.ExceptionString), Self.Se, Self.Se.ExProc, Self.Se.ExPos);
+ end;
+end;
+{$endif}
+function TPSRuntimeClassImporter.FindClass(const Name: string): TPSRuntimeClass;
+var
+ h, i: Longint;
+ p: TPSRuntimeClass;
+begin
+ h := MakeHash(Name);
+ for i := FClasses.Count -1 downto 0 do
+ begin
+ p := FClasses[i];
+ if (p.FClassNameHash = h) and (p.FClassName = Name) then
+ begin
+ Result := P;
+ exit;
+ end;
+ end;
+ Result := nil;
+end;
+
+function DelphiFunctionProc(Caller: TPSExec; p: TPSExternalProcRec; Global, Stack: TPSStack; CC: TPSCallingConvention): Boolean;
+var
+ i: Integer;
+ MyList: TPSList;
+ n: PPSVariantIFC;
+ CurrStack: Cardinal;
+ s: string;
+begin
+ s := P.Decl;
+ if length(s) = 0 then begin Result := False; exit; end;
+ CurrStack := Cardinal(Stack.Count) - Cardinal(length(s));
+ if s[1] = #0 then inc(CurrStack);
+ MyList := TPSList.Create;
+
+ for i := 2 to length(s) do
+ begin
+ MyList.Add(nil);
+ end;
+ for i := length(s) downto 2 do
+ begin
+ MyList[i - 2] := NewPPSVariantIFC(Stack[CurrStack], s[i] <> #0);
+ inc(CurrStack);
+ end;
+ if s[1] <> #0 then
+ begin
+ n := NewPPSVariantIFC(Stack[CurrStack], True);
+ end else n := nil;
+ try
+ result := Caller.InnerfuseCall(p.Ext2, p.Ext1, cc, MyList, n);
+ finally
+ DisposePPSVariantIFC(n);
+ DisposePPSVariantIFCList(mylist);
+ end;
+end;
+
+function DelphiFunctionProc_CDECL(Caller: TPSExec; p: TPSExternalProcRec; Global, Stack: TPSStack): Boolean;
+begin
+ Result := DelphiFunctionProc(Caller, p, Global, Stack, cdCdecl);
+end;
+function DelphiFunctionProc_Register(Caller: TPSExec; p: TPSExternalProcRec; Global, Stack: TPSStack): Boolean;
+begin
+ Result := DelphiFunctionProc(Caller, p, Global, Stack, cdRegister);
+end;
+function DelphiFunctionProc_Pascal(Caller: TPSExec; p: TPSExternalProcRec; Global, Stack: TPSStack): Boolean;
+begin
+ Result := DelphiFunctionProc(Caller, p, Global, Stack, cdPascal);
+end;
+function DelphiFunctionProc_Stdcall(Caller: TPSExec; p: TPSExternalProcRec; Global, Stack: TPSStack): Boolean;
+begin
+ Result := DelphiFunctionProc(Caller, p, Global, Stack, cdStdCall);
+end;
+
+procedure TPSExec.RegisterDelphiFunction(ProcPtr: Pointer;
+ const Name: string; CC: TPSCallingConvention);
+begin
+ RegisterDelphiMethod(nil, ProcPtr, FastUppercase(Name), CC);
+end;
+
+procedure TPSExec.RegisterDelphiMethod(Slf, ProcPtr: Pointer;
+ const Name: string; CC: TPSCallingConvention);
+begin
+ case cc of
+ cdRegister: RegisterFunctionName(FastUppercase(Name), DelphiFunctionProc_Register, ProcPtr, Slf);
+ cdPascal: RegisterFunctionName(FastUppercase(Name), DelphiFunctionProc_Pascal, ProcPtr, Slf);
+ cdStdCall: RegisterFunctionName(FastUppercase(Name), DelphiFunctionProc_Stdcall, ProcPtr, Slf);
+ cdCdecl: RegisterFunctionName(FastUppercase(Name), DelphiFunctionProc_CDECL, ProcPtr, Slf);
+ end;
+end;
+
+{ EPSException }
+
+constructor EPSException.Create(const Error: string; Exec: TPSExec;
+ Procno, ProcPos: Cardinal);
+begin
+ inherited Create(Error);
+ FExec := Exec;
+ FProcNo := Procno;
+ FProcPos := ProcPos;
+end;
+
+{ TPSRuntimeAttribute }
+
+function TPSRuntimeAttribute.AddValue(aType: TPSTypeRec): PPSVariant;
+begin
+ Result := FValues.PushType(aType);
+end;
+
+procedure TPSRuntimeAttribute.AdjustSize;
+begin
+ FValues.Capacity := FValues.Length;
+end;
+
+constructor TPSRuntimeAttribute.Create(Owner: TPSRuntimeAttributes);
+begin
+ inherited Create;
+ FOwner := Owner;
+ FValues := TPSStack.Create;
+end;
+
+procedure TPSRuntimeAttribute.DeleteValue(i: Longint);
+begin
+ if Cardinal(i) <> Cardinal(FValues.Count -1) then
+ raise Exception.Create(RPS_CanOnlySendLastItem);
+ FValues.Pop;
+end;
+
+destructor TPSRuntimeAttribute.Destroy;
+begin
+ FValues.Free;
+ inherited Destroy;
+end;
+
+function TPSRuntimeAttribute.GetValue(I: Longint): PIFVariant;
+begin
+ Result := FValues[i];
+end;
+
+function TPSRuntimeAttribute.GetValueCount: Longint;
+begin
+ Result := FValues.Count;
+end;
+
+{ TPSRuntimeAttributes }
+
+function TPSRuntimeAttributes.Add: TPSRuntimeAttribute;
+begin
+ Result := TPSRuntimeAttribute.Create(Self);
+ FAttributes.Add(Result);
+end;
+
+constructor TPSRuntimeAttributes.Create(AOwner: TPSExec);
+begin
+ inherited Create;
+ FAttributes := TPSList.Create;
+ FOwner := AOwner;
+end;
+
+procedure TPSRuntimeAttributes.Delete(I: Longint);
+begin
+ TPSRuntimeAttribute(FAttributes[i]).Free;
+ FAttributes.Delete(i);
+end;
+
+destructor TPSRuntimeAttributes.Destroy;
+var
+ i: Longint;
+begin
+ for i := FAttributes.Count -1 downto 0 do
+ TPSRuntimeAttribute(FAttributes[i]).Free;
+ FAttributes.Free;
+ inherited Destroy;
+end;
+
+function TPSRuntimeAttributes.FindAttribute(
+ const Name: string): TPSRuntimeAttribute;
+var
+ n: string;
+ i, h: Longint;
+begin
+ n := FastUpperCase(Name);
+ h := MakeHash(n);
+ for i := 0 to FAttributes.Count -1 do
+ begin
+ Result := FAttributes[i];
+ if (Result.AttribTypeHash = h) and (Result.AttribType = n) then
+ exit;
+ end;
+ Result := nil;
+end;
+
+function TPSRuntimeAttributes.GetCount: Longint;
+begin
+ Result := FAttributes.Count;
+end;
+
+function TPSRuntimeAttributes.GetItem(I: Longint): TPSRuntimeAttribute;
+begin
+ Result := FAttributes[i];
+end;
+
+{ TPSInternalProcRec }
+
+destructor TPSInternalProcRec.Destroy;
+begin
+ if FData <> nil then
+ Freemem(Fdata, FLength);
+ inherited Destroy;
+end;
+
+{ TPsProcRec }
+
+constructor TPSProcRec.Create(Owner: TPSExec);
+begin
+ inherited Create;
+ FAttributes := TPSRuntimeAttributes.Create(Owner);
+end;
+
+destructor TPSProcRec.Destroy;
+begin
+ FAttributes.Free;
+ inherited Destroy;
+end;
+
+{ TPSTypeRec_Array }
+
+procedure TPSTypeRec_Array.CalcSize;
+begin
+ FrealSize := 4;
+end;
+
+{ TPSTypeRec_StaticArray }
+
+procedure TPSTypeRec_StaticArray.CalcSize;
+begin
+ FrealSize := Cardinal(FArrayType.RealSize) * Cardinal(Size);
+end;
+
+{ TPSTypeRec_Set }
+
+procedure TPSTypeRec_Set.CalcSize;
+begin
+ FrealSize := FByteSize;
+end;
+
+const
+ MemDelta = 4096;
+
+{ TPSStack }
+
+procedure TPSStack.AdjustLength;
+var
+ MyLen: Longint;
+begin
+ MyLen := ((FLength shr 12) + 1) shl 12;
+
+ SetCapacity(MyLen);
+end;
+
+procedure TPSStack.Clear;
+var
+ v: Pointer;
+ i: Longint;
+begin
+ for i := Count -1 downto 0 do
+ begin
+ v := Data[i];
+ if TPSTypeRec(v^).BaseType in NeedFinalization then
+ FinalizeVariant(Pointer(IPointer(v)+4), TPSTypeRec(v^));
+ end;
+ inherited Clear;
+ FLength := 0;
+ SetCapacity(0);
+end;
+
+constructor TPSStack.Create;
+begin
+ inherited Create;
+ GetMem(FDataPtr, MemDelta);
+ FCapacity := MemDelta;
+ FLength := 0;
+end;
+
+destructor TPSStack.Destroy;
+var
+ v: Pointer;
+ i: Longint;
+begin
+ for i := Count -1 downto 0 do
+ begin
+ v := Data[i];
+ if TPSTypeRec(v^).BaseType in NeedFinalization then
+ FinalizeVariant(Pointer(IPointer(v)+4), Pointer(v^));
+ end;
+ FreeMem(FDataPtr, FCapacity);
+ inherited Destroy;
+end;
+
+function TPSStack.GetBool(ItemNo: Longint): Boolean;
+var
+ val: PPSVariant;
+begin
+ if ItemNo < 0 then
+ val := Items[Longint(ItemNo) + Longint(Count)]
+ else
+ val := Items[ItemNo];
+ Result := PSGetUInt(@PPSVariantData(val).Data, val.FType) <> 0;
+end;
+
+function TPSStack.GetClass(ItemNo: Longint): TObject;
+var
+ val: PPSVariant;
+begin
+ if ItemNo < 0 then
+ val := Items[Longint(ItemNo) + Longint(Count)]
+ else
+ val := Items[ItemNo];
+ Result := PSGetObject(@PPSVariantData(val).Data, val.FType);
+end;
+
+function TPSStack.GetCurrency(ItemNo: Longint): Currency;
+var
+ val: PPSVariant;
+begin
+ if ItemNo < 0 then
+ val := Items[Longint(ItemNo) + Longint(Count)]
+ else
+ val := Items[ItemNo];
+ Result := PSGetCurrency(@PPSVariantData(val).Data, val.FType);
+end;
+
+function TPSStack.GetInt(ItemNo: Longint): Longint;
+var
+ val: PPSVariant;
+begin
+ if ItemNo < 0 then
+ val := items[Longint(ItemNo) + Longint(Count)]
+ else
+ val := items[ItemNo];
+ Result := PSGetInt(@PPSVariantData(val).Data, val.FType);
+end;
+
+{$IFNDEF PS_NOINT64}
+function TPSStack.GetInt64(ItemNo: Longint): Int64;
+var
+ val: PPSVariant;
+begin
+ if ItemNo < 0 then
+ val := items[Longint(ItemNo) + Longint(Count)]
+ else
+ val := items[ItemNo];
+ Result := PSGetInt64(@PPSVariantData(val).Data, val.FType);
+end;
+{$ENDIF}
+
+function TPSStack.GetItem(I: Longint): PPSVariant;
+begin
+ if Cardinal(I) >= Cardinal(Count) then
+ Result := nil
+ else
+ Result := Data[i];
+end;
+
+function TPSStack.GetReal(ItemNo: Longint): Extended;
+var
+ val: PPSVariant;
+begin
+ if ItemNo < 0 then
+ val := items[Longint(ItemNo) + Longint(Count)]
+ else
+ val := items[ItemNo];
+ Result := PSGetreal(@PPSVariantData(val).Data, val.FType);
+end;
+
+function TPSStack.GetString(ItemNo: Longint): string;
+var
+ val: PPSVariant;
+begin
+ if ItemNo < 0 then
+ val := items[Longint(ItemNo) + Longint(Count)]
+ else
+ val := items[ItemNo];
+ Result := PSGetString(@PPSVariantData(val).Data, val.FType);
+end;
+
+function TPSStack.GetUInt(ItemNo: Longint): Cardinal;
+var
+ val: PPSVariant;
+begin
+ if ItemNo < 0 then
+ val := items[Longint(ItemNo) + Longint(Count)]
+ else
+ val := items[ItemNo];
+ Result := PSGetUInt(@PPSVariantData(val).Data, val.FType);
+end;
+
+{$IFNDEF PS_NOWIDESTRING}
+function TPSStack.GetWideString(ItemNo: Longint): WideString;
+var
+ val: PPSVariant;
+begin
+ if ItemNo < 0 then
+ val := items[Longint(ItemNo) + Longint(Count)]
+ else
+ val := items[ItemNo];
+ Result := PSGetWideString(@PPSVariantData(val).Data, val.FType);
+end;
+{$ENDIF}
+
+procedure TPSStack.Pop;
+var
+ p1: Pointer;
+ c: Longint;
+begin
+ c := count -1;
+ p1 := Data[c];
+ DeleteLast;
+ FLength := IPointer(p1) - IPointer(FDataPtr);
+ if TPSTypeRec(p1^).BaseType in NeedFinalization then
+ FinalizeVariant(Pointer(IPointer(p1)+4), Pointer(p1^));
+ if ((FCapacity - FLength) shr 12) > 2 then AdjustLength;
+end;
+
+function TPSStack.Push(TotalSize: Longint): PPSVariant;
+var
+ o: Cardinal;
+ p: Pointer;
+begin
+ o := FLength;
+ FLength := (FLength + TotalSize) and not 3;
+ if FLength > FCapacity then AdjustLength;
+ p := Pointer(IPointer(FDataPtr) + IPointer(o));
+ Add(p);
+ Result := P;
+end;
+
+function TPSStack.PushType(aType: TPSTypeRec): PPSVariant;
+var
+ o: Cardinal;
+ p: Pointer;
+begin
+ o := FLength;
+ FLength := (FLength + Longint(aType.RealSize) + Longint(RTTISize + 3)) and not 3;
+ if FLength > FCapacity then AdjustLength;
+ p := Pointer(IPointer(FDataPtr) + IPointer(o));
+ Add(p);
+ Result := P;
+ Result.FType := aType;
+ InitializeVariant(Pointer(IPointer(Result)+4), aType);
+end;
+
+procedure TPSStack.SetBool(ItemNo: Longint; const Data: Boolean);
+var
+ val: PPSVariant;
+ ok: Boolean;
+begin
+ if ItemNo < 0 then
+ val := items[Longint(ItemNo) + Longint(Count)]
+ else
+ val := items[ItemNo];
+ ok := true;
+ if Data then
+ PSSetUInt(@PPSVariantData(val).Data, val.FType, ok, 1)
+ else
+ PSSetUInt(@PPSVariantData(val).Data, val.FType, ok, 0);
+ if not ok then raise Exception.Create(RPS_TypeMismatch);
+end;
+
+procedure TPSStack.SetCapacity(const Value: Longint);
+var
+ p: Pointer;
+ OOFS: IPointer;
+ I: Longint;
+begin
+ if Value < FLength then raise Exception.Create(RPS_CapacityLength);
+ if Value = 0 then
+ begin
+ if FDataPtr <> nil then
+ begin
+ FreeMem(FDataPtr, FCapacity);
+ FDataPtr := nil;
+ end;
+ FCapacity := 0;
+ end;
+ GetMem(p, Value);
+ if FDataPtr <> nil then
+ begin
+ if FLength > FCapacity then
+ OOFS := FCapacity
+ else
+ OOFS := FLength;
+ Move(FDataPtr^, p^, OOFS);
+ OOFS := IPointer(P) - IPointer(FDataPtr);
+ for i := Count -1 downto 0 do
+ Data[i] := Pointer(IPointer(Data[i]) + OOFS);
+
+ FreeMem(FDataPtr, FCapacity);
+ end;
+ FDataPtr := p;
+ FCapacity := Value;
+end;
+
+procedure TPSStack.SetClass(ItemNo: Longint; const Data: TObject);
+var
+ val: PPSVariant;
+ ok: Boolean;
+begin
+ if ItemNo < 0 then
+ val := items[Longint(ItemNo) + Longint(Count)]
+ else
+ val := items[ItemNo];
+ ok := true;
+ PSSetObject(@PPSVariantData(val).Data, val.FType, ok, Data);
+ if not ok then raise Exception.Create(RPS_TypeMismatch);
+end;
+
+procedure TPSStack.SetCurrency(ItemNo: Longint; const Data: Currency);
+var
+ val: PPSVariant;
+ ok: Boolean;
+begin
+ if ItemNo < 0 then
+ val := items[Longint(ItemNo) + Longint(Count)]
+ else
+ val := items[ItemNo];
+ ok := true;
+ PSSetCurrency(@PPSVariantData(val).Data, val.FType, ok, Data);
+ if not ok then raise Exception.Create(RPS_TypeMismatch);
+end;
+
+procedure TPSStack.SetInt(ItemNo: Longint; const Data: Longint);
+var
+ val: PPSVariant;
+ ok: Boolean;
+begin
+ if ItemNo < 0 then
+ val := items[Longint(ItemNo) + Longint(Count)]
+ else
+ val := items[ItemNo];
+ ok := true;
+ PSSetInt(@PPSVariantData(val).Data, val.FType, ok, Data);
+ if not ok then raise Exception.Create(RPS_TypeMismatch);
+end;
+
+{$IFNDEF PS_NOINT64}
+procedure TPSStack.SetInt64(ItemNo: Longint; const Data: Int64);
+var
+ val: PPSVariant;
+ ok: Boolean;
+begin
+ if ItemNo < 0 then
+ val := items[Longint(ItemNo) + Longint(Count)]
+ else
+ val := items[ItemNo];
+ ok := true;
+ PSSetInt64(@PPSVariantData(val).Data, val.FType, ok, Data);
+ if not ok then raise Exception.Create(RPS_TypeMismatch);
+end;
+{$ENDIF}
+
+procedure TPSStack.SetReal(ItemNo: Longint; const Data: Extended);
+var
+ val: PPSVariant;
+ ok: Boolean;
+begin
+ if ItemNo < 0 then
+ val := items[Longint(ItemNo) + Longint(Count)]
+ else
+ val := items[ItemNo];
+ ok := true;
+ PSSetReal(@PPSVariantData(val).Data, val.FType, ok, Data);
+ if not ok then raise Exception.Create(RPS_TypeMismatch);
+end;
+
+procedure TPSStack.SetString(ItemNo: Longint; const Data: string);
+var
+ val: PPSVariant;
+ ok: Boolean;
+begin
+ if ItemNo < 0 then
+ val := items[Longint(ItemNo) + Longint(Count)]
+ else
+ val := items[ItemNo];
+ ok := true;
+ PSSetString(@PPSVariantData(val).Data, val.FType, ok, Data);
+ if not ok then raise Exception.Create(RPS_TypeMismatch);
+end;
+
+procedure TPSStack.SetUInt(ItemNo: Longint; const Data: Cardinal);
+var
+ val: PPSVariant;
+ ok: Boolean;
+begin
+ if ItemNo < 0 then
+ val := items[Longint(ItemNo) + Longint(Count)]
+ else
+ val := items[ItemNo];
+ ok := true;
+ PSSetUInt(@PPSVariantData(val).Data, val.FType, ok, Data);
+ if not ok then raise Exception.Create(RPS_TypeMismatch);
+end;
+
+
+{$IFNDEF PS_NOWIDESTRING}
+procedure TPSStack.SetWideString(ItemNo: Longint;
+ const Data: WideString);
+var
+ val: PPSVariant;
+ ok: Boolean;
+begin
+ if ItemNo < 0 then
+ val := items[Longint(ItemNo) + Longint(Count)]
+ else
+ val := items[ItemNo];
+ ok := true;
+ PSSetWideString(@PPSVariantData(val).Data, val.FType, ok, Data);
+ if not ok then raise Exception.Create(RPS_TypeMismatch);
+end;
+{$ENDIF}
+
+
+{$IFNDEF PS_NOIDISPATCH}
+var
+ DispPropertyPut: Integer = DISPID_PROPERTYPUT;
+const
+ LOCALE_SYSTEM_DEFAULT = 2 shl 10; // Delphi 2 doesn't define this
+
+function IDispatchInvoke(Self: IDispatch; PropertySet: Boolean; const Name: String; const Par: array of Variant): Variant;
+var
+ Param: Word;
+ i, ArgErr: Longint;
+ DispatchId: Longint;
+ DispParam: TDispParams;
+ ExceptInfo: TExcepInfo;
+ aName: PWideChar;
+ WSFreeList: TPSList;
+begin
+ FillChar(ExceptInfo, SizeOf(ExceptInfo), 0);
+ if Name='' then begin
+ DispatchId:=0;
+ end else begin
+ aName := StringToOleStr(Name);
+ try
+ if Self = nil then
+ raise Exception.Create(RPS_NILInterfaceException);
+ if Self.GetIDsOfNames(GUID_NULL, @aName, 1, LOCALE_SYSTEM_DEFAULT, @DispatchId) <> S_OK then
+ raise Exception.Create(RPS_UnknownMethod);
+ finally
+ SysFreeString(aName);
+ end;
+ end;
+ DispParam.cNamedArgs := 0;
+ DispParam.rgdispidNamedArgs := nil;
+ DispParam.cArgs := (High(Par) + 1);
+
+ if PropertySet then
+ begin
+ Param := DISPATCH_PROPERTYPUT;
+ DispParam.cNamedArgs := 1;
+ DispParam.rgdispidNamedArgs := @DispPropertyPut;
+ end else
+ Param := DISPATCH_METHOD or DISPATCH_PROPERTYGET;
+
+ WSFreeList := TPSList.Create;
+ try
+ GetMem(DispParam.rgvarg, sizeof(TVariantArg) * (High(Par) + 1));
+ FillCHar(DispParam.rgvarg^, sizeof(TVariantArg) * (High(Par) + 1), 0);
+ try
+ for i := 0 to High(Par) do
+ begin
+ if PVarData(@Par[High(Par)-i]).VType = varString then
+ begin
+ DispParam.rgvarg[i].vt := VT_BSTR;
+ DispParam.rgvarg[i].bstrVal := StringToOleStr(Par[High(Par)-i]);
+ WSFreeList.Add(DispParam.rgvarg[i].bstrVal);
+ end else
+ begin
+ DispParam.rgvarg[i].vt := VT_VARIANT or VT_BYREF;
+ New(
+ {$IFDEF DELPHI4UP}
+ POleVariant
+ {$ELSE}
+ PVariant{$ENDIF}
+ (DispParam.rgvarg[i].pvarVal));
+
+ (*
+ {$IFDEF DELPHI4UP}
+ POleVariant
+ {$ELSE}
+ PVariant
+ {$ENDIF}
+ (DispParam.rgvarg[i].pvarVal)^ := Par[High(Par)-i];
+ *)
+ Move(Par[High(Par)-i],Pointer(DispParam.rgvarg[i].pvarVal)^,
+ Sizeof({$IFDEF DELPHI4UP}OleVariant{$ELSE}Variant{$ENDIF}));
+
+ end;
+ end;
+ i :=Self.Invoke(DispatchId, GUID_NULL, LOCALE_SYSTEM_DEFAULT, Param, DispParam, @Result, @ExceptInfo, @ArgErr);
+ {$IFNDEF Delphi3UP}
+ try
+ if not Succeeded(i) then
+ begin
+ if i = DISP_E_EXCEPTION then
+ raise Exception.Create(OleStrToString(ExceptInfo.bstrSource)+': '+OleStrToString(ExceptInfo.bstrDescription))
+ else
+ raise Exception.Create(SysErrorMessage(i));
+ end;
+ finally
+ SysFreeString(ExceptInfo.bstrSource);
+ SysFreeString(ExceptInfo.bstrDescription);
+ SysFreeString(ExceptInfo.bstrHelpFile);
+ end;
+ {$ELSE}
+ if not Succeeded(i) then
+ begin
+ if i = DISP_E_EXCEPTION then
+ raise Exception.Create(ExceptInfo.bstrSource+': '+ExceptInfo.bstrDescription)
+ else
+ raise Exception.Create(SysErrorMessage(i));
+ end;
+ {$ENDIF}
+ finally
+ for i := 0 to High(Par) do
+ begin
+ if DispParam.rgvarg[i].vt = (VT_VARIANT or VT_BYREF) then
+ begin
+ if{$IFDEF DELPHI4UP}POleVariant{$ELSE}PVariant{$ENDIF}
+ (DispParam.rgvarg[i].pvarVal) <> nil then
+ Dispose(
+ {$IFDEF DELPHI4UP}
+ POleVariant
+ {$ELSE}
+ PVariant
+ {$ENDIF}
+ (DispParam.rgvarg[i].pvarVal));
+ end;
+ end;
+ FreeMem(DispParam.rgvarg, sizeof(TVariantArg) * (High(Par) + 1));
+ end;
+ finally
+ for i := WSFreeList.Count -1 downto 0 do
+ SysFreeString(WSFreeList[i]);
+ WSFreeList.Free;
+ end;
+end;
+{$ENDIF}
+
+{ TPSTypeRec_ProcPtr }
+
+procedure TPSTypeRec_ProcPtr.CalcSize;
+begin
+ FRealSize := 12;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/uPSUtils.pas b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSUtils.pas
new file mode 100644
index 0000000..ac46c2f
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/uPSUtils.pas
@@ -0,0 +1,1543 @@
+unit uPSUtils;
+{$I PascalScript.inc}
+
+interface
+uses
+ Classes, SysUtils;
+const
+
+ PSMainProcName = '!MAIN';
+
+ PSMainProcNameOrg = 'Main Proc';
+
+ PSLowBuildSupport = 12;
+
+ PSCurrentBuildNo = 23;
+
+ PSCurrentversion = '1.31';
+
+ PSValidHeader = 1397769801;
+
+ PSAddrStackStart = 1610612736;
+
+ PSAddrNegativeStackStart = 1073741824;
+type
+
+ TPSBaseType = Byte;
+
+ TPSVariableType = (ivtGlobal, ivtParam, ivtVariable);
+
+const
+
+ btReturnAddress = 0;
+
+ btU8 = 1;
+
+ btS8 = 2;
+
+ btU16 = 3;
+
+ btS16 = 4;
+
+ btU32 = 5;
+
+ btS32 = 6;
+
+ btSingle = 7;
+
+ btDouble = 8;
+
+ btExtended = 9;
+
+ btString = 10;
+
+ btRecord = 11;
+
+ btArray = 12;
+
+ btPointer = 13;
+
+ btPChar = 14;
+
+ btResourcePointer = 15;
+
+ btVariant = 16;
+
+{$IFNDEF PS_NOINT64}
+ btS64 = 17;
+{$ENDIF}
+
+ btChar = 18;
+
+{$IFNDEF PS_NOWIDESTRING}
+ btWideString = 19;
+
+ btWideChar = 20;
+{$ENDIF}
+
+ btProcPtr = 21;
+
+ btStaticArray = 22;
+
+ btSet = 23;
+
+ btCurrency = 24;
+
+ btClass = 25;
+
+ btInterface = 26;
+
+ btNotificationVariant = 27;
+
+ btType = 130;
+
+ btEnum = 129;
+
+ btExtClass = 131;
+
+function MakeHash(const s: string): Longint;
+
+const
+{ Script internal command: Assign command
+ Command: TPSCommand;
+ VarDest, // no data
+ VarSrc: TPSVariable;
+}
+ CM_A = 0;
+{ Script internal command: Calculate Command
+ Command: TPSCommand;
+ CalcType: Byte;
+
+ 0 = +
+ 1 = -
+ 2 = *
+ 3 = /
+ 4 = MOD
+ 5 = SHL
+ 6 = SHR
+ 7 = AND
+ 8 = OR
+ 9 = XOR
+
+ VarDest, // no data
+ VarSrc: TPSVariable;
+
+}
+ CM_CA = 1;
+{ Script internal command: Push
+ Command: TPSCommand;
+ Var: TPSVariable;
+}
+ CM_P = 2;
+{ Script internal command: Push Var
+ Command: TPSCommand;
+ Var: TPSVariable;
+}
+ CM_PV = 3;
+{ Script internal command: Pop
+ Command: TPSCommand;
+}
+ CM_PO = 4;
+{ Script internal command: Call
+ Command: TPSCommand;
+ ProcNo: Longword;
+}
+ Cm_C = 5;
+{ Script internal command: Goto
+ Command: TPSCommand;
+ NewPosition: Longint; //relative to end of this instruction
+}
+ Cm_G = 6;
+{ Script internal command: Conditional Goto
+ Command: TPSCommand;
+ NewPosition: LongWord; //relative to end of this instruction
+ Var: TPSVariable; // no data
+}
+ Cm_CG = 7;
+{ Script internal command: Conditional NOT Goto
+ Command: TPSCommand;
+ NewPosition: LongWord; // relative to end of this instruction
+ Var: TPSVariable; // no data
+}
+ Cm_CNG = 8;
+{ Script internal command: Ret
+ Command: TPSCommand;
+}
+ Cm_R = 9;
+{ Script internal command: Set Stack Type
+ Command: TPSCommand;
+ NewType: LongWord;
+ OffsetFromBase: LongWord;
+}
+ Cm_ST = 10;
+{ Script internal command: Push Type
+ Command: TPSCommand;
+ FType: LongWord;
+}
+ Cm_Pt = 11;
+{ Script internal command: Compare
+ Command: TPSCommand;
+ CompareType: Byte;
+
+ 0 = >=
+ 1 = <=
+ 2 = >
+ 3 = <
+ 4 = <>
+ 5 = =
+
+ IntoVar: TPSAssignment;
+ Compare1, Compare2: TPSAssigment;
+}
+ CM_CO = 12;
+{ Script internal command: Call Var
+ Command: TPSCommand;
+ Var: TPSVariable;
+}
+ Cm_cv = 13;
+{ Script internal command: Set Pointer
+ Command: TPSCommand;
+ VarDest: TPSVariable;
+ VarSrc: TPSVariable;
+}
+ cm_sp = 14;
+{ Script internal command: Boolean NOT
+ Command: TPSCommand;
+ Var: TPSVariable;
+}
+ cm_bn = 15;
+{ Script internal command: Var Minus
+ Command: TPSCommand;
+ Var: TPSVariable;
+}
+ cm_vm = 16;
+{ Script internal command: Set Flag
+ Command: TPSCommand;
+ Var: TPSVariable;
+ DoNot: Boolean;
+}
+ cm_sf = 17;
+{ Script internal command: Flag Goto
+ Command: TPSCommand;
+ Where: Cardinal;
+}
+ cm_fg = 18;
+{ Script internal command: Push Exception Handler
+ Command: TPSCommand;
+ FinallyOffset,
+ ExceptionOffset, // FinallyOffset or ExceptionOffset need to be set.
+ Finally2Offset,
+ EndOfBlock: Cardinal;
+}
+ cm_puexh = 19;
+{ Script internal command: Pop Exception Handler
+ Command:TPSCommand;
+ Position: Byte;
+ 0 = end of try/finally/exception block;
+ 1 = end of first finally
+ 2 = end of except
+ 3 = end of second finally
+
+}
+ cm_poexh = 20;
+{ Script internal command: Integer NOT
+ Command: TPSCommand;
+ Where: Cardinal;
+}
+ cm_in = 21;
+ {Script internal command: Set Stack Pointer To Copy
+ Command: TPSCommand;
+ Where: Cardinal;
+}
+ cm_spc = 22;
+ {Script internal command: Inc
+ Command: TPSCommand;
+ Var: TPSVariable;
+ }
+ cm_inc = 23;
+ {Script internal command: Dec
+ Command: TPSCommand;
+ Var: TPSVariable;
+ }
+ cm_dec = 24;
+ {Script internal command: nop
+ Command: TPSCommand; }
+ cm_nop = 255;
+{ Script internal command: Pop and Goto
+ Command: TPSCommand;
+ NewPosition: Longint; //relative to end of this instruction
+}
+ Cm_PG = 25;
+{ Script internal command: Pop*2 and Goto
+ Command: TPSCommand;
+ NewPosition: Longint; //relative to end of this instruction
+}
+ Cm_P2G = 26;
+
+
+type
+
+ TbtU8 = Byte;
+
+ TbtS8 = ShortInt;
+
+ TbtU16 = Word;
+
+ TbtS16 = SmallInt;
+
+ TbtU32 = Cardinal;
+
+ TbtS32 = Longint;
+
+ TbtSingle = Single;
+
+ TbtDouble = double;
+
+ TbtExtended = Extended;
+
+ tbtCurrency = Currency;
+
+ TbtString = string;
+{$IFNDEF PS_NOINT64}
+
+ tbts64 = int64;
+{$ENDIF}
+
+ tbtchar = char;
+{$IFNDEF PS_NOWIDESTRING}
+
+ tbtwidestring = widestring;
+
+ tbtwidechar = widechar;
+{$ENDIF}
+ IPointer = Cardinal;
+ TPSCallingConvention = (cdRegister, cdPascal, cdCdecl, cdStdCall, cdSafeCall);
+
+
+const
+
+ MaxListSize = Maxint div 16;
+
+type
+
+ PPointerList = ^TPointerList;
+
+ TPointerList = array[0..MaxListSize - 1] of Pointer;
+
+
+ TPSList = class(TObject)
+ protected
+
+ FData: PPointerList;
+
+ FCapacity: Cardinal;
+
+ FCount: Cardinal;
+
+ FCheckCount: Cardinal;
+ private
+ function GetItem(Nr: Cardinal): Pointer;
+ procedure SetItem(Nr: Cardinal; P: Pointer);
+ public
+ {$IFNDEF PS_NOSMARTLIST}
+
+ procedure Recreate;
+ {$ENDIF}
+
+ property Data: PPointerList read FData;
+
+ constructor Create;
+
+ function IndexOf(P: Pointer): Longint;
+
+ destructor Destroy; override;
+
+ property Count: Cardinal read FCount;
+
+ property Items[nr: Cardinal]: Pointer read GetItem write SetItem; default;
+
+ function Add(P: Pointer): Longint;
+
+ procedure AddBlock(List: PPointerList; Count: Longint);
+
+ procedure Remove(P: Pointer);
+
+ procedure Delete(Nr: Cardinal);
+
+ procedure DeleteLast;
+
+ procedure Clear; virtual;
+ end;
+ TIFList = TPSList;
+
+ TPSStringList = class(TObject)
+ private
+ List: TPSList;
+ function GetItem(Nr: LongInt): string;
+ procedure SetItem(Nr: LongInt; const s: string);
+ public
+
+ function Count: LongInt;
+
+ property Items[Nr: Longint]: string read GetItem write SetItem; default;
+
+
+ procedure Add(const P: string);
+
+ procedure Delete(NR: LongInt);
+
+ procedure Clear;
+
+ constructor Create;
+
+ destructor Destroy; override;
+ end;
+ TIFStringList = TPsStringList;
+
+
+type
+
+ TPSPasToken = (
+ CSTI_EOF,
+
+ CSTIINT_Comment,
+ CSTIINT_WhiteSpace,
+
+ CSTI_Identifier,
+ CSTI_SemiColon,
+ CSTI_Comma,
+ CSTI_Period,
+ CSTI_Colon,
+ CSTI_OpenRound,
+ CSTI_CloseRound,
+ CSTI_OpenBlock,
+ CSTI_CloseBlock,
+ CSTI_Assignment,
+ CSTI_Equal,
+ CSTI_NotEqual,
+ CSTI_Greater,
+ CSTI_GreaterEqual,
+ CSTI_Less,
+ CSTI_LessEqual,
+ CSTI_Plus,
+ CSTI_Minus,
+ CSTI_Divide,
+ CSTI_Multiply,
+ CSTI_Integer,
+ CSTI_Real,
+ CSTI_String,
+ CSTI_Char,
+ CSTI_HexInt,
+ CSTI_AddressOf,
+ CSTI_Dereference,
+ CSTI_TwoDots,
+
+ CSTII_and,
+ CSTII_array,
+ CSTII_begin,
+ CSTII_case,
+ CSTII_const,
+ CSTII_div,
+ CSTII_do,
+ CSTII_downto,
+ CSTII_else,
+ CSTII_end,
+ CSTII_for,
+ CSTII_function,
+ CSTII_if,
+ CSTII_in,
+ CSTII_mod,
+ CSTII_not,
+ CSTII_of,
+ CSTII_or,
+ CSTII_procedure,
+ CSTII_program,
+ CSTII_repeat,
+ CSTII_record,
+ CSTII_set,
+ CSTII_shl,
+ CSTII_shr,
+ CSTII_then,
+ CSTII_to,
+ CSTII_type,
+ CSTII_until,
+ CSTII_uses,
+ CSTII_var,
+ CSTII_while,
+ CSTII_with,
+ CSTII_xor,
+ CSTII_exit,
+ CSTII_class,
+ CSTII_constructor,
+ CSTII_destructor,
+ CSTII_inherited,
+ CSTII_private,
+ CSTII_public,
+ CSTII_published,
+ CSTII_protected,
+ CSTII_property,
+ CSTII_virtual,
+ CSTII_override,
+ //CSTII_default, //Birb
+ CSTII_As,
+ CSTII_Is,
+ CSTII_Unit,
+ CSTII_Try,
+ CSTII_Except,
+ CSTII_Finally,
+ CSTII_External,
+ CSTII_Forward,
+ CSTII_Export,
+ CSTII_Label,
+ CSTII_Goto,
+ CSTII_Chr,
+ CSTII_Ord,
+ CSTII_Interface,
+ CSTII_Implementation,
+ CSTII_initialization, //* Nvds
+ CSTII_finalization, //* Nvds
+ CSTII_out,
+ CSTII_nil
+ );
+
+ TPSParserErrorKind = (iNoError
+ , iCommentError
+ , iStringError
+ , iCharError
+ , iSyntaxError
+ );
+ TPSParserErrorEvent = procedure (Parser: TObject; Kind: TPSParserErrorKind) of object;
+
+
+ TPSPascalParser = class(TObject)
+ protected
+ FData: string;
+ FText: PChar;
+ FLastEnterPos, FRow, FRealPosition, FTokenLength: Cardinal;
+ FTokenId: TPSPasToken;
+ FToken: string;
+ FOriginalToken: string;
+ FParserError: TPSParserErrorEvent;
+ FEnableComments: Boolean;
+ FEnableWhitespaces: Boolean;
+ function GetCol: Cardinal;
+ // only applicable when Token in [CSTI_Identifier, CSTI_Integer, CSTI_Real, CSTI_String, CSTI_Char, CSTI_HexInt]
+ public
+
+ property EnableComments: Boolean read FEnableComments write FEnableComments;
+
+ property EnableWhitespaces: Boolean read FEnableWhitespaces write FEnableWhitespaces;
+
+ procedure Next; virtual;
+
+ property GetToken: string read FToken;
+
+ property OriginalToken: string read FOriginalToken;
+
+ property CurrTokenPos: Cardinal read FRealPosition;
+
+ property CurrTokenID: TPSPasToken read FTokenId;
+
+ property Row: Cardinal read FRow;
+
+ property Col: Cardinal read GetCol;
+
+ procedure SetText(const Data: string); virtual;
+
+ property OnParserError: TPSParserErrorEvent read FParserError write FParserError;
+ end;
+
+function FloatToStr(E: Extended): string;
+
+function FastLowerCase(const s: String): string;
+
+function Fw(const S: string): string;
+
+function IntToStr(I: LongInt): string;
+
+function StrToIntDef(const S: string; Def: LongInt): LongInt;
+
+function StrToInt(const S: string): LongInt;
+function StrToFloat(const s: string): Extended;
+
+function FastUpperCase(const s: String): string;
+
+function GRFW(var s: string): string;
+function GRLW(var s: string): string;
+
+const
+
+ FCapacityInc = 32;
+{$IFNDEF PS_NOSMARTLIST}
+
+ FMaxCheckCount = (FCapacityInc div 4) * 64;
+{$ENDIF}
+
+
+implementation
+
+{$IFDEF DELPHI3UP }
+resourceString
+{$ELSE }
+const
+{$ENDIF }
+ RPS_InvalidFloat = 'Invalid float';
+
+function MakeHash(const s: string): Longint;
+{small hash maker}
+var
+ I: Integer;
+begin
+ Result := 0;
+ for I := 1 to Length(s) do
+ Result := ((Result shl 7) or (Result shr 25)) + Ord(s[I]);
+end;
+
+function GRFW(var s: string): string;
+var
+ l: Longint;
+begin
+ l := 1;
+ while l <= Length(s) do
+ begin
+ if s[l] = ' ' then
+ begin
+ Result := copy(s, 1, l - 1);
+ Delete(s, 1, l);
+ exit;
+ end;
+ l := l + 1;
+ end;
+ Result := s;
+ s := '';
+end;
+
+function GRLW(var s: string): string;
+var
+ l: Longint;
+begin
+ l := Length(s);
+ while l >= 1 do
+ begin
+ if s[l] = ' ' then
+ begin
+ Result := copy(s, l+1, MaxInt);
+ Delete(s, l, MaxInt);
+ exit;
+ end;
+ Dec(l);
+ end;
+ Result := s;
+ s := '';
+end;
+
+function StrToFloat(const s: string): Extended;
+var
+ i: longint;
+begin
+ Val(s, Result, i);
+ if i <> 0 then raise Exception.Create(RPS_InvalidFloat);
+end;
+//-------------------------------------------------------------------
+
+function IntToStr(I: LongInt): string;
+var
+ s: string;
+begin
+ Str(i, s);
+ IntToStr := s;
+end;
+//-------------------------------------------------------------------
+
+function FloatToStr(E: Extended): string;
+var
+ s: string;
+begin
+ Str(e:0:12, s);
+ result := s;
+end;
+
+function StrToInt(const S: string): LongInt;
+var
+ e: Integer;
+ Res: LongInt;
+begin
+ Val(S, Res, e);
+ if e <> 0 then
+ StrToInt := -1
+ else
+ StrToInt := Res;
+end;
+//-------------------------------------------------------------------
+
+function StrToIntDef(const S: string; Def: LongInt): LongInt;
+var
+ e: Integer;
+ Res: LongInt;
+begin
+ Val(S, Res, e);
+ if e <> 0 then
+ StrToIntDef := Def
+ else
+ StrToIntDef := Res;
+end;
+//-------------------------------------------------------------------
+
+constructor TPSList.Create;
+begin
+ inherited Create;
+ FCount := 0;
+ FCapacity := 16;
+ {$IFNDEF PS_NOSMARTLIST}
+ FCheckCount := 0;
+ {$ENDIF}
+ GetMem(FData, 64);
+end;
+
+
+function MM(i1,i2: Integer): Integer;
+begin
+ if ((i1 div i2) * i2) < i1 then
+ mm := (i1 div i2 + 1) * i2
+ else
+ mm := (i1 div i2) * i2;
+end;
+
+{$IFNDEF PS_NOSMARTLIST}
+procedure TPSList.Recreate;
+var
+ NewData: PPointerList;
+ NewCapacity: Cardinal;
+ I: Longint;
+
+begin
+
+ FCheckCount := 0;
+ NewCapacity := mm(FCount, FCapacityInc);
+ if NewCapacity < 64 then NewCapacity := 64;
+ GetMem(NewData, NewCapacity * 4);
+ for I := 0 to Longint(FCount) -1 do
+ begin
+ NewData^[i] := FData^[I];
+ end;
+ FreeMem(FData, FCapacity * 4);
+ FData := NewData;
+ FCapacity := NewCapacity;
+end;
+{$ENDIF}
+
+//-------------------------------------------------------------------
+
+function TPSList.Add(P: Pointer): Longint;
+begin
+ if FCount >= FCapacity then
+ begin
+ Inc(FCapacity, FCapacityInc);// := FCount + 1;
+ ReAllocMem(FData, FCapacity shl 2);
+ end;
+ FData[FCount] := P; // Instead of SetItem
+ Result := FCount;
+ Inc(FCount);
+{$IFNDEF PS_NOSMARTLIST}
+ Inc(FCheckCount);
+ if FCheckCount > FMaxCheckCount then Recreate;
+{$ENDIF}
+end;
+
+procedure TPSList.AddBlock(List: PPointerList; Count: Longint);
+var
+ L: Longint;
+
+begin
+ if Longint(FCount) + Count > Longint(FCapacity) then
+ begin
+ Inc(FCapacity, mm(Count, FCapacityInc));
+ ReAllocMem(FData, FCapacity shl 2);
+ end;
+ for L := 0 to Count -1 do
+ begin
+ FData^[FCount] := List^[L];
+ Inc(FCount);
+ end;
+{$IFNDEF PS_NOSMARTLIST}
+ Inc(FCheckCount);
+ if FCheckCount > FMaxCheckCount then Recreate;
+{$ENDIF}
+end;
+
+
+//-------------------------------------------------------------------
+
+procedure TPSList.DeleteLast;
+begin
+ if FCount = 0 then Exit;
+ Dec(FCount);
+{$IFNDEF PS_NOSMARTLIST}
+ Inc(FCheckCount);
+ if FCheckCount > FMaxCheckCount then Recreate;
+{$ENDIF}
+end;
+
+
+
+procedure TPSList.Delete(Nr: Cardinal);
+begin
+ if FCount = 0 then Exit;
+ if Nr < FCount then
+ begin
+ Move(FData[Nr + 1], FData[Nr], (FCount - Nr) * 4);
+ Dec(FCount);
+{$IFNDEF PS_NOSMARTLIST}
+ Inc(FCheckCount);
+ if FCheckCount > FMaxCheckCount then Recreate;
+{$ENDIF}
+ end;
+end;
+//-------------------------------------------------------------------
+
+procedure TPSList.Remove(P: Pointer);
+var
+ I: Cardinal;
+begin
+ if FCount = 0 then Exit;
+ I := 0;
+ while I < FCount do
+ begin
+ if FData[I] = P then
+ begin
+ Delete(I);
+ Exit;
+ end;
+ Inc(I);
+ end;
+end;
+//-------------------------------------------------------------------
+
+procedure TPSList.Clear;
+begin
+ FCount := 0;
+{$IFNDEF PS_NOSMARTLIST}
+ Recreate;
+{$ENDIF}
+end;
+//-------------------------------------------------------------------
+
+destructor TPSList.Destroy;
+begin
+ FreeMem(FData, FCapacity * 4);
+ inherited Destroy;
+end;
+//-------------------------------------------------------------------
+
+procedure TPSList.SetItem(Nr: Cardinal; P: Pointer);
+begin
+ if (FCount = 0) or (Nr >= FCount) then
+ Exit;
+ FData[Nr] := P;
+end;
+//-------------------------------------------------------------------
+
+function TPSList.GetItem(Nr: Cardinal): Pointer; {12}
+begin
+ if Nr < FCount then
+ GetItem := FData[Nr]
+ else
+ GetItem := nil;
+end;
+
+
+
+//-------------------------------------------------------------------
+
+function TPSStringList.Count: LongInt;
+begin
+ count := List.count;
+end;
+type pStr = ^string;
+
+//-------------------------------------------------------------------
+
+function TPSStringList.GetItem(Nr: LongInt): string;
+var
+ S: PStr;
+begin
+ s := List.GetItem(Nr);
+ if s = nil then
+ Result := ''
+ else
+
+ Result := s^;
+end;
+//-------------------------------------------------------------------
+
+
+procedure TPSStringList.SetItem(Nr: LongInt; const s: string);
+var
+ p: PStr;
+begin
+ p := List.GetItem(Nr);
+ if p = nil
+ then
+ Exit;
+ p^ := s;
+end;
+//-------------------------------------------------------------------
+
+procedure TPSStringList.Add(const P: string);
+var
+ w: PStr;
+begin
+ new(w);
+ w^ := p;
+ List.Add(w);
+end;
+//-------------------------------------------------------------------
+
+procedure TPSStringList.Delete(NR: LongInt);
+var
+ W: PStr;
+begin
+ W := list.getitem(nr);
+ if w<>nil then
+ begin
+ dispose(w);
+ end;
+ list.Delete(Nr);
+end;
+
+procedure TPSStringList.Clear;
+begin
+ while List.Count > 0 do Delete(0);
+end;
+
+constructor TPSStringList.Create;
+begin
+ inherited Create;
+ List := TPSList.Create;
+end;
+
+destructor TPSStringList.Destroy;
+begin
+ while List.Count > 0 do
+ Delete(0);
+ List.Destroy;
+ inherited Destroy;
+end;
+
+//-------------------------------------------------------------------
+
+
+function Fw(const S: string): string; // First word
+var
+ x: integer;
+begin
+ x := pos(' ', s);
+ if x > 0
+ then Fw := Copy(S, 1, x - 1)
+ else Fw := S;
+end;
+//-------------------------------------------------------------------
+function FastUpperCase(const s: String): string;
+{Fast uppercase}
+var
+ I: Integer;
+ C: Char;
+begin
+ Result := S;
+ I := Length(Result);
+ while I > 0 do
+ begin
+ C := Result[I];
+ if c in [#97..#122] then
+ Dec(Byte(Result[I]), 32);
+ Dec(I);
+ end;
+end;
+function FastLowerCase(const s: String): string;
+{Fast lowercase}
+var
+ I: Integer;
+ C: Char;
+begin
+ Result := S;
+ I := Length(Result);
+ while I > 0 do
+ begin
+ C := Result[I];
+ if C in [#65..#90] then
+ Inc(Byte(Result[I]), 32);
+ Dec(I);
+ end;
+end;
+//-------------------------------------------------------------------
+
+type
+ TRTab = record
+ name: string;
+ c: TPSPasToken;
+ end;
+
+
+const
+ KEYWORD_COUNT = 65; //*NVDS
+ LookupTable: array[0..KEYWORD_COUNT - 1] of TRTab = (
+ (name: 'AND'; c: CSTII_and),
+ (name: 'ARRAY'; c: CSTII_array),
+ (name: 'AS'; c: CSTII_as),
+ (name: 'BEGIN'; c: CSTII_begin),
+ (name: 'CASE'; c: CSTII_case),
+ (name: 'CHR'; c: CSTII_chr),
+ (name: 'CLASS'; c: CSTII_class),
+ (name: 'CONST'; c: CSTII_const),
+ (name: 'CONSTRUCTOR'; c: CSTII_constructor),
+ (name: 'DESTRUCTOR'; c: CSTII_destructor),
+ (name: 'DIV'; c: CSTII_div),
+ (name: 'DO'; c: CSTII_do),
+ (name: 'DOWNTO'; c: CSTII_downto),
+ (name: 'ELSE'; c: CSTII_else),
+ (name: 'END'; c: CSTII_end),
+ (name: 'EXCEPT'; c: CSTII_except),
+ (name: 'EXIT'; c: CSTII_exit),
+ (name: 'EXPORT'; c: CSTII_Export),
+ (name: 'EXTERNAL'; c: CSTII_External),
+ (Name: 'FINALIZATION'; c : CSTII_finalization),//* Nvds
+ (name: 'FINALLY'; c: CSTII_finally),
+ (name: 'FOR'; c: CSTII_for),
+ (name: 'FORWARD'; c: CSTII_Forward),
+ (name: 'FUNCTION'; c: CSTII_function),
+ (name: 'GOTO'; c: CSTII_Goto),
+ (name: 'IF'; c: CSTII_if),
+ (name: 'IMPLEMENTATION'; c: CSTII_Implementation),
+ (name: 'IN'; c: CSTII_in),
+ (name: 'INHERITED'; c: CSTII_inherited),
+ (Name: 'INITIALIZATION'; c: CSTII_initialization), //* Nvds
+ (name: 'INTERFACE'; c: CSTII_Interface),
+ (name: 'IS'; c: CSTII_is),
+ (name: 'LABEL'; c: CSTII_Label),
+ (name: 'MOD'; c: CSTII_mod),
+ (name: 'NIL'; c: CSTII_nil),
+ (name: 'NOT'; c: CSTII_not),
+ (name: 'OF'; c: CSTII_of),
+ (name: 'OR'; c: CSTII_or),
+ (name: 'ORD'; c: CSTII_ord),
+ (name: 'OUT'; c: CSTII_Out),
+ (name: 'OVERRIDE'; c: CSTII_override),
+ //(name: 'DEFAULT'; c: CSTII_default), //Birb (if added, don't forget to increase KEYWORD_COUNT)
+ (name: 'PRIVATE'; c: CSTII_private),
+ (name: 'PROCEDURE'; c: CSTII_procedure),
+ (name: 'PROGRAM'; c: CSTII_program),
+ (name: 'PROPERTY'; c: CSTII_property),
+ (name: 'PROTECTED'; c: CSTII_protected),
+ (name: 'PUBLIC'; c: CSTII_public),
+ (name: 'PUBLISHED'; c: CSTII_published),
+ (name: 'RECORD'; c: CSTII_record),
+ (name: 'REPEAT'; c: CSTII_repeat),
+ (name: 'SET'; c: CSTII_set),
+ (name: 'SHL'; c: CSTII_shl),
+ (name: 'SHR'; c: CSTII_shr),
+ (name: 'THEN'; c: CSTII_then),
+ (name: 'TO'; c: CSTII_to),
+ (name: 'TRY'; c: CSTII_try),
+ (name: 'TYPE'; c: CSTII_type),
+ (name: 'UNIT'; c: CSTII_Unit),
+ (name: 'UNTIL'; c: CSTII_until),
+ (name: 'USES'; c: CSTII_uses),
+ (name: 'VAR'; c: CSTII_var),
+ (name: 'VIRTUAL'; c: CSTII_virtual),
+ (name: 'WHILE'; c: CSTII_while),
+ (name: 'WITH'; c: CSTII_with),
+ (name: 'XOR'; c: CSTII_xor));
+
+function TPSPascalParser.GetCol: Cardinal;
+begin
+ Result := FRealPosition - FLastEnterPos + 1;
+end;
+
+procedure TPSPascalParser.Next;
+var
+ Err: TPSParserErrorKind;
+ FLastUpToken: string;
+ function CheckReserved(Const S: ShortString; var CurrTokenId: TPSPasToken): Boolean;
+ var
+ L, H, I: LongInt;
+ J: Char;
+ SName: ShortString;
+ begin
+ L := 0;
+ J := S[0];
+ H := KEYWORD_COUNT-1;
+ while L <= H do
+ begin
+ I := (L + H) shr 1;
+ SName := LookupTable[i].Name;
+ if J = SName[0] then
+ begin
+ if S = SName then
+ begin
+ CheckReserved := True;
+ CurrTokenId := LookupTable[I].c;
+ Exit;
+ end;
+ if S > SName then
+ L := I + 1
+ else
+ H := I - 1;
+ end else
+ if S > SName then
+ L := I + 1
+ else
+ H := I - 1;
+ end;
+ CheckReserved := False;
+ end;
+ //-------------------------------------------------------------------
+
+ function _GetToken(CurrTokenPos, CurrTokenLen: Cardinal): string;
+ var
+ s: string;
+ begin
+ SetLength(s, CurrTokenLen);
+ Move(FText[CurrTokenPos], S[1], CurrtokenLen);
+ Result := s;
+ end;
+
+ function ParseToken(var CurrTokenPos, CurrTokenLen: Cardinal; var CurrTokenId: TPSPasToken): TPSParserErrorKind;
+ {Parse the token}
+ var
+ ct, ci: Cardinal;
+ hs: Boolean;
+ p: PChar;
+ begin
+ ParseToken := iNoError;
+ ct := CurrTokenPos;
+ case FText[ct] of
+ #0:
+ begin
+ CurrTokenId := CSTI_EOF;
+ CurrTokenLen := 0;
+ end;
+ 'A'..'Z', 'a'..'z', '_':
+ begin
+ ci := ct + 1;
+ while (FText[ci] in ['_', '0'..'9', 'a'..'z', 'A'..'Z']) do begin
+ Inc(ci);
+ end;
+ CurrTokenLen := ci - ct;
+
+ FLastUpToken := _GetToken(CurrTokenPos, CurrtokenLen);
+ p := pchar(FLastUpToken);
+ while p^<>#0 do
+ begin
+ if p^ in [#97..#122] then
+ Dec(Byte(p^), 32);
+ inc(p);
+ end;
+ if not CheckReserved(FLastUpToken, CurrTokenId) then
+ begin
+ CurrTokenId := CSTI_Identifier;
+ end;
+ end;
+ '$':
+ begin
+ ci := ct + 1;
+
+ while (FText[ci] in ['0'..'9', 'a'..'f', 'A'..'F'])
+ do Inc(ci);
+
+ CurrTokenId := CSTI_HexInt;
+ CurrTokenLen := ci - ct;
+ end;
+
+ '0'..'9':
+ begin
+ hs := False;
+ ci := ct;
+ while (FText[ci] in ['0'..'9']) do
+ begin
+ Inc(ci);
+ if (FText[ci] = '.') and (not hs) then
+ begin
+ if FText[ci+1] = '.' then break;
+ hs := True;
+ Inc(ci);
+ end;
+ end;
+ if (FText[ci] in ['E','e']) and ((FText[ci+1] in ['0'..'9'])
+ or ((FText[ci+1] in ['+','-']) and (FText[ci+2] in ['0'..'9']))) then
+ begin
+ hs := True;
+ Inc(ci);
+ if FText[ci] in ['+','-'] then
+ Inc(ci);
+ repeat
+ Inc(ci);
+ until not (FText[ci] in ['0'..'9']);
+ end;
+
+ if hs
+ then CurrTokenId := CSTI_Real
+ else CurrTokenId := CSTI_Integer;
+
+ CurrTokenLen := ci - ct;
+ end;
+
+
+ #39:
+ begin
+ ci := ct + 1;
+ while true do
+ begin
+ if (FText[ci] = #0) or (FText[ci] = #13) or (FText[ci] = #10) then Break;
+ if (FText[ci] = #39) then
+ begin
+ if FText[ci+1] = #39 then
+ Inc(ci)
+ else
+ Break;
+ end;
+ Inc(ci);
+ end;
+ if FText[ci] = #39 then
+ CurrTokenId := CSTI_String
+ else
+ begin
+ CurrTokenId := CSTI_String;
+ ParseToken := iStringError;
+ end;
+ CurrTokenLen := ci - ct + 1;
+ end;
+ '#':
+ begin
+ ci := ct + 1;
+ if FText[ci] = '$' then
+ begin
+ inc(ci);
+ while (FText[ci] in ['A'..'F', 'a'..'f', '0'..'9']) do begin
+ Inc(ci);
+ end;
+ CurrTokenId := CSTI_Char;
+ CurrTokenLen := ci - ct;
+ end else
+ begin
+ while (FText[ci] in ['0'..'9']) do begin
+ Inc(ci);
+ end;
+ if FText[ci] in ['A'..'Z', 'a'..'z', '_'] then
+ begin
+ ParseToken := iCharError;
+ CurrTokenId := CSTI_Char;
+ end else
+ CurrTokenId := CSTI_Char;
+ CurrTokenLen := ci - ct;
+ end;
+ end;
+ '=':
+ begin
+ CurrTokenId := CSTI_Equal;
+ CurrTokenLen := 1;
+ end;
+ '>':
+ begin
+ if FText[ct + 1] = '=' then
+ begin
+ CurrTokenid := CSTI_GreaterEqual;
+ CurrTokenLen := 2;
+ end else
+ begin
+ CurrTokenid := CSTI_Greater;
+ CurrTokenLen := 1;
+ end;
+ end;
+ '<':
+ begin
+ if FText[ct + 1] = '=' then
+ begin
+ CurrTokenId := CSTI_LessEqual;
+ CurrTokenLen := 2;
+ end else
+ if FText[ct + 1] = '>' then
+ begin
+ CurrTokenId := CSTI_NotEqual;
+ CurrTokenLen := 2;
+ end else
+ begin
+ CurrTokenId := CSTI_Less;
+ CurrTokenLen := 1;
+ end;
+ end;
+ ')':
+ begin
+ CurrTokenId := CSTI_CloseRound;
+ CurrTokenLen := 1;
+ end;
+ '(':
+ begin
+ if FText[ct + 1] = '*' then
+ begin
+ ci := ct + 1;
+ while (FText[ci] <> #0) do begin
+ if (FText[ci] = '*') and (FText[ci + 1] = ')') then
+ Break;
+ if FText[ci] = #13 then
+ begin
+ inc(FRow);
+ if FText[ci+1] = #10 then
+ inc(ci);
+ FLastEnterPos := ci +1;
+ end else if FText[ci] = #10 then
+ begin
+ inc(FRow);
+ FLastEnterPos := ci +1;
+ end;
+ Inc(ci);
+ end;
+ if (FText[ci] = #0) then
+ begin
+ CurrTokenId := CSTIINT_Comment;
+ ParseToken := iCommentError;
+ end else
+ begin
+ CurrTokenId := CSTIINT_Comment;
+ Inc(ci, 2);
+ end;
+ CurrTokenLen := ci - ct;
+ end
+ else
+ begin
+ CurrTokenId := CSTI_OpenRound;
+ CurrTokenLen := 1;
+ end;
+ end;
+ '[':
+ begin
+ CurrTokenId := CSTI_OpenBlock;
+ CurrTokenLen := 1;
+ end;
+ ']':
+ begin
+ CurrTokenId := CSTI_CloseBlock;
+ CurrTokenLen := 1;
+ end;
+ ',':
+ begin
+ CurrTokenId := CSTI_Comma;
+ CurrTokenLen := 1;
+ end;
+ '.':
+ begin
+ if FText[ct + 1] = '.' then
+ begin
+ CurrTokenLen := 2;
+ CurrTokenId := CSTI_TwoDots;
+ end else
+ begin
+ CurrTokenId := CSTI_Period;
+ CurrTokenLen := 1;
+ end;
+ end;
+ '@':
+ begin
+ CurrTokenId := CSTI_AddressOf;
+ CurrTokenLen := 1;
+ end;
+ '^':
+ begin
+ CurrTokenId := CSTI_Dereference;
+ CurrTokenLen := 1;
+ end;
+ ';':
+ begin
+ CurrTokenId := CSTI_Semicolon;
+ CurrTokenLen := 1;
+ end;
+ ':':
+ begin
+ if FText[ct + 1] = '=' then
+ begin
+ CurrTokenId := CSTI_Assignment;
+ CurrTokenLen := 2;
+ end else
+ begin
+ CurrTokenId := CSTI_Colon;
+ CurrTokenLen := 1;
+ end;
+ end;
+ '+':
+ begin
+ CurrTokenId := CSTI_Plus;
+ CurrTokenLen := 1;
+ end;
+ '-':
+ begin
+ CurrTokenId := CSTI_Minus;
+ CurrTokenLen := 1;
+ end;
+ '*':
+ begin
+ CurrTokenId := CSTI_Multiply;
+ CurrTokenLen := 1;
+ end;
+ '/':
+ begin
+ if FText[ct + 1] = '/' then
+ begin
+ ci := ct + 1;
+ while (FText[ci] <> #0) and (FText[ci] <> #13) and
+ (FText[ci] <> #10) do begin
+ Inc(ci);
+ end;
+ if (FText[ci] = #0) then
+ begin
+ CurrTokenId := CSTIINT_Comment;
+ end else
+ begin
+ CurrTokenId := CSTIINT_Comment;
+ end;
+ CurrTokenLen := ci - ct;
+ end else
+ begin
+ CurrTokenId := CSTI_Divide;
+ CurrTokenLen := 1;
+ end;
+ end;
+ #32, #9, #13, #10:
+ begin
+ ci := ct;
+ while (FText[ci] in [#32, #9, #13, #10]) do
+ begin
+ if FText[ci] = #13 then
+ begin
+ inc(FRow);
+ if FText[ci+1] = #10 then
+ inc(ci);
+ FLastEnterPos := ci +1;
+ end else if FText[ci] = #10 then
+ begin
+ inc(FRow);
+ FLastEnterPos := ci +1;
+ end;
+ Inc(ci);
+ end;
+ CurrTokenId := CSTIINT_WhiteSpace;
+ CurrTokenLen := ci - ct;
+ end;
+ '{':
+ begin
+ ci := ct + 1;
+ while (FText[ci] <> #0) and (FText[ci] <> '}') do begin
+ if FText[ci] = #13 then
+ begin
+ inc(FRow);
+ if FText[ci+1] = #10 then
+ inc(ci);
+ FLastEnterPos := ci + 1;
+ end else if FText[ci] = #10 then
+ begin
+ inc(FRow);
+ FLastEnterPos := ci + 1;
+ end;
+ Inc(ci);
+ end;
+ if (FText[ci] = #0) then
+ begin
+ CurrTokenId := CSTIINT_Comment;
+ ParseToken := iCommentError;
+ end else
+ CurrTokenId := CSTIINT_Comment;
+ CurrTokenLen := ci - ct + 1;
+ end;
+ else
+ begin
+ ParseToken := iSyntaxError;
+ CurrTokenId := CSTIINT_Comment;
+ CurrTokenLen := 1;
+ end;
+ end;
+ end;
+ //-------------------------------------------------------------------
+begin
+ if FText = nil then
+ begin
+ FTokenLength := 0;
+ FRealPosition := 0;
+ FTokenId := CSTI_EOF;
+ Exit;
+ end;
+ repeat
+ FRealPosition := FRealPosition + FTokenLength;
+ Err := ParseToken(FRealPosition, FTokenLength, FTokenID);
+ if Err <> iNoError then
+ begin
+ FTokenLength := 0;
+ FTokenId := CSTI_EOF;
+ FToken := '';
+ FOriginalToken := '';
+ if @FParserError <> nil then FParserError(Self, Err);
+ exit;
+ end;
+
+ case FTokenID of
+ CSTIINT_Comment: if not FEnableComments then Continue else
+ begin
+ SetLength(FOriginalToken, FTokenLength);
+ Move(FText[CurrTokenPos], FOriginalToken[1], FTokenLength);
+ FToken := FOriginalToken;
+ end;
+ CSTIINT_WhiteSpace: if not FEnableWhitespaces then Continue else
+ begin
+ SetLength(FOriginalToken, FTokenLength);
+ Move(FText[CurrTokenPos], FOriginalToken[1], FTokenLength);
+ FToken := FOriginalToken;
+ end;
+ CSTI_Integer, CSTI_Real, CSTI_String, CSTI_Char, CSTI_HexInt:
+ begin
+ SetLength(FOriginalToken, FTokenLength);
+ Move(FText[CurrTokenPos], FOriginalToken[1], FTokenLength);
+ FToken := FOriginalToken;
+ end;
+ CSTI_Identifier:
+ begin
+ SetLength(FOriginalToken, FTokenLength);
+ Move(FText[CurrTokenPos], FOriginalToken[1], FTokenLength);
+ FToken := FLastUpToken;
+ end;
+ else
+ begin
+ FOriginalToken := '';
+ FToken := '';
+ end;
+ end;
+ Break;
+ until False;
+end;
+
+procedure TPSPascalParser.SetText(const Data: string);
+begin
+ FData := Data;
+ FText := Pointer(FData);
+ FTokenLength := 0;
+ FRealPosition := 0;
+ FTokenId := CSTI_EOF;
+ FLastEnterPos := 0;
+ FRow := 1;
+ Next;
+end;
+
+function TPSList.IndexOf(P: Pointer): Longint;
+var
+ i: Integer;
+begin
+ for i := FCount -1 downto 0 do
+ begin
+ if FData[i] = p then
+ begin
+ result := i;
+ exit;
+ end;
+ end;
+ result := -1;
+end;
+
+end.
+
+
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/uROPSImports.pas b/official/5.0.30.691/Pascal Script for Delphi/Source/uROPSImports.pas
new file mode 100644
index 0000000..da70685
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/uROPSImports.pas
@@ -0,0 +1,366 @@
+unit uROPSImports;
+
+interface
+
+uses
+ uPSCompiler, uPSRuntime, uROBINMessage, uROIndyHTTPChannel,
+ uROXMLSerializer, uROIndyTCPChannel, idTcpClient,
+ uROPSServerLink, uROWinInetHttpChannel;
+
+
+procedure SIRegisterTROBINMESSAGE(CL: TIFPSPascalCompiler);
+procedure SIRegisterTROINDYHTTPCHANNEL(CL: TIFPSPascalCompiler);
+procedure SIRegisterTROINDYTCPCHANNEL(CL: TIFPSPascalCompiler);
+procedure SIRegisterTIDTCPCLIENT(CL: TIFPSPascalCompiler);
+procedure SIRegisterRODLImports(Cl: TIFPSPascalCompiler);
+
+
+
+procedure RIRegisterTROBINMESSAGE(Cl: TIFPSRuntimeClassImporter);
+procedure RIRegisterTROINDYHTTPCHANNEL(Cl: TIFPSRuntimeClassImporter);
+procedure RIRegisterTROINDYTCPCHANNEL(Cl: TIFPSRuntimeClassImporter);
+procedure RIRegisterTIDTCPCLIENT(Cl: TIFPSRuntimeClassImporter);
+procedure RIRegisterRODLImports(CL: TIFPSRuntimeClassImporter);
+(*
+Todo:
+ TROWinInetHTTPChannel = class(TROTransportChannel, IROTransport, IROTCPTransport, IROHTTPTransport)
+ published
+ property UserAgent:string read GetUserAgent write SetUserAgent;
+ property TargetURL : string read fTargetURL write SetTargetURL;
+ property StoreConnected:boolean read fStoreConnected write fStoreConnected default false;
+ property KeepConnection:boolean read fKeepConnection write fKeepConnection default false;
+ end;
+*)
+type
+
+ TPSROIndyTCPModule = class(TPSROModule)
+ protected
+ class procedure ExecImp(exec: TIFPSExec; ri: TIFPSRuntimeClassImporter); override;
+ class procedure CompImp(comp: TIFPSPascalCompiler); override;
+ end;
+
+ TPSROIndyHTTPModule = class(TPSROModule)
+ protected
+ class procedure ExecImp(exec: TIFPSExec; ri: TIFPSRuntimeClassImporter); override;
+ class procedure CompImp(comp: TIFPSPascalCompiler); override;
+ end;
+
+ TPSROBinModule = class(TPSROModule)
+ protected
+ class procedure ExecImp(exec: TIFPSExec; ri: TIFPSRuntimeClassImporter); override;
+ class procedure CompImp(comp: TIFPSPascalCompiler); override;
+ end;
+
+
+implementation
+
+{procedure TROSOAPMESSAGESERIALIZATIONOPTIONS_W(Self: TROSOAPMESSAGE;
+ const T: TXMLSERIALIZATIONOPTIONS);
+begin
+ Self.SERIALIZATIONOPTIONS := T;
+end;
+
+procedure TROSOAPMESSAGESERIALIZATIONOPTIONS_R(Self: TROSOAPMESSAGE;
+ var T: TXMLSERIALIZATIONOPTIONS);
+begin
+ T := Self.SERIALIZATIONOPTIONS;
+end;
+
+procedure TROSOAPMESSAGECUSTOMLOCATION_W(Self: TROSOAPMESSAGE; const T: string);
+begin
+ Self.CUSTOMLOCATION := T;
+end;
+
+procedure TROSOAPMESSAGECUSTOMLOCATION_R(Self: TROSOAPMESSAGE; var T: string);
+begin
+ T := Self.CUSTOMLOCATION;
+end;
+
+procedure TROSOAPMESSAGELIBRARYNAME_W(Self: TROSOAPMESSAGE; const T: string);
+begin
+ Self.LIBRARYNAME := T;
+end;
+
+procedure TROSOAPMESSAGELIBRARYNAME_R(Self: TROSOAPMESSAGE; var T: string);
+begin
+ T := Self.LIBRARYNAME;
+end; }
+
+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; }
+
+procedure RIRegisterTROBINMESSAGE(Cl: TIFPSRuntimeClassImporter);
+begin
+ with Cl.Add(TROBINMESSAGE) do
+ begin
+ RegisterPropertyHelper(@TROBINMESSAGEUSECOMPRESSION_R,
+ @TROBINMESSAGEUSECOMPRESSION_W, 'USECOMPRESSION');
+ end;
+end;
+
+procedure RIRegisterTROINDYHTTPCHANNEL(Cl: TIFPSRuntimeClassImporter);
+begin
+ with Cl.Add(TROINDYHTTPCHANNEL) do
+ begin
+ RegisterPropertyHelper(@TROINDYHTTPCHANNELTARGETURL_R,
+ @TROINDYHTTPCHANNELTARGETURL_W, 'TARGETURL');
+ end;
+end;
+
+procedure RIRegisterTROINDYTCPCHANNEL(Cl: TIFPSRuntimeClassImporter);
+begin
+ with Cl.Add(TROINDYTCPCHANNEL) do
+ begin
+ RegisterPropertyHelper(@TROINDYTCPCHANNELINDYCLIENT_R, nil, 'INDYCLIENT');
+ end;
+end;
+
+procedure RIRegisterTIDTCPCLIENT(Cl: TIFPSRuntimeClassImporter);
+begin
+ with Cl.Add(TIdTCPClientBaseClass) do
+ begin
+ {RegisterPropertyHelper(@TIDTCPCLIENTBOUNDPORTMAX_R, @TIDTCPCLIENTBOUNDPORTMAX_W,
+ 'BOUNDPORTMAX');
+ RegisterPropertyHelper(@TIDTCPCLIENTBOUNDPORTMIN_R, @TIDTCPCLIENTBOUNDPORTMIN_W,
+ 'BOUNDPORTMIN');
+ RegisterPropertyHelper(@TIDTCPCLIENTBOUNDIP_R, @TIDTCPCLIENTBOUNDIP_W, 'BOUNDIP');
+ RegisterPropertyHelper(@TIDTCPCLIENTBOUNDPORT_R, @TIDTCPCLIENTBOUNDPORT_W,
+ 'BOUNDPORT');}
+ RegisterPropertyHelper(@TIDTCPCLIENTHOST_R, @TIDTCPCLIENTHOST_W, 'HOST');
+ RegisterPropertyHelper(@TIDTCPCLIENTPORT_R, @TIDTCPCLIENTPORT_W, 'PORT');
+ end;
+end;
+
+procedure RIRegisterRODLImports(CL: TIFPSRuntimeClassImporter);
+begin
+ RIRegisterTIDTCPCLIENT(Cl);
+ RIRegisterTROINDYTCPCHANNEL(Cl);
+ RIRegisterTROINDYHTTPCHANNEL(Cl);
+ RIRegisterTROBINMESSAGE(Cl);
+ //RIRegisterTROSOAPMESSAGE(Cl);
+end;
+
+function RegClassS(cl: TIFPSPascalCompiler; const InheritsFrom,
+ ClassName: string): TPSCompileTimeClass;
+begin
+ Result := cl.FindClass(ClassName);
+ if Result = nil then
+ Result := cl.AddClassN(cl.FindClass(InheritsFrom), ClassName)
+ else
+ Result.ClassInheritsFrom := cl.FindClass(InheritsFrom);
+end;
+
+{procedure SIRegisterTROSOAPMESSAGE(CL: TIFPSPascalCompiler);
+begin
+ Cl.addTypeS('TXMLSERIALIZATIONOPTIONS', 'BYTE');
+ Cl.AddConstantN('XSOWRITEMULTIREFARRAY', 'BYTE').SetInt(1);
+ Cl.AddConstantN('XSOWRITEMULTIREFOBJECT', 'BYTE').SetInt(2);
+ Cl.AddConstantN('XSOSENDUNTYPED', 'BYTE').SetInt(4);
+ with RegClassS(cl, 'TROMESSAGE', 'TROSOAPMESSAGE') do
+ begin
+ RegisterProperty('LIBRARYNAME', 'STRING', iptrw);
+ RegisterProperty('CUSTOMLOCATION', 'STRING', iptrw);
+ RegisterProperty('SERIALIZATIONOPTIONS', 'TXMLSERIALIZATIONOPTIONS', iptrw);
+ end;
+end;}
+
+procedure SIRegisterTROBINMESSAGE(CL: TIFPSPascalCompiler);
+begin
+ with RegClassS(cl, 'TROMESSAGE', 'TROBINMESSAGE') do
+ begin
+ RegisterProperty('USECOMPRESSION', 'BOOLEAN', iptrw);
+ end;
+end;
+
+procedure SIRegisterTROINDYHTTPCHANNEL(CL: TIFPSPascalCompiler);
+begin
+ with RegClassS(cl, 'TROINDYTCPCHANNEL', 'TROINDYHTTPCHANNEL') do
+ begin
+ RegisterProperty('TARGETURL', 'STRING', iptrw);
+ end;
+end;
+
+procedure SIRegisterTROINDYTCPCHANNEL(CL: TIFPSPascalCompiler);
+begin
+ with RegClassS(cl, 'TROTRANSPORTCHANNEL', 'TROINDYTCPCHANNEL') do
+ begin
+ RegisterProperty('INDYCLIENT', 'TIdTCPClientBaseClass', iptr);
+ end;
+end;
+
+procedure SIRegisterTIDTCPCLIENT(CL: TIFPSPascalCompiler);
+begin
+ with RegClassS(cl, 'TCOMPONENT', 'TIdTCPClientBaseClass') do
+ begin
+ RegisterProperty('BOUNDPORTMAX', 'INTEGER', iptrw);
+ RegisterProperty('BOUNDPORTMIN', 'INTEGER', iptrw);
+ RegisterProperty('BOUNDIP', 'STRING', iptrw);
+ RegisterProperty('BOUNDPORT', 'INTEGER', iptrw);
+ RegisterProperty('HOST', 'STRING', iptrw);
+ RegisterProperty('PORT', 'INTEGER', iptrw);
+ end;
+end;
+
+procedure SIRegisterRODLImports(Cl: TIFPSPascalCompiler);
+begin
+ SIRegisterTIDTCPCLIENT(Cl);
+ SIRegisterTROINDYTCPCHANNEL(Cl);
+ SIRegisterTROINDYHTTPCHANNEL(Cl);
+ SIRegisterTROBINMESSAGE(Cl);
+ //SIRegisterTROSOAPMESSAGE(Cl);
+end;
+
+{ TPSROIndyTCPModule }
+
+class procedure TPSROIndyTCPModule.CompImp(comp: TIFPSPascalCompiler);
+begin
+ SIRegisterTIDTCPCLIENT(Comp);
+ SIRegisterTROINDYTCPCHANNEL(Comp);
+end;
+
+class procedure TPSROIndyTCPModule.ExecImp(exec: TIFPSExec;
+ ri: TIFPSRuntimeClassImporter);
+begin
+ RIRegisterTIDTCPCLIENT(ri);
+ RIRegisterTROINDYTCPCHANNEL(ri);
+end;
+
+{ TPSROIndyHTTPModule }
+
+class procedure TPSROIndyHTTPModule.CompImp(comp: TIFPSPascalCompiler);
+begin
+ if Comp.FindClass('TROINDYTCPCHANNEL') = nil then
+ TPSROIndyTCPModule.CompImp(Comp);
+ SIRegisterTROINDYHTTPCHANNEL(Comp);
+end;
+
+class procedure TPSROIndyHTTPModule.ExecImp(exec: TIFPSExec;
+ ri: TIFPSRuntimeClassImporter);
+begin
+ if ri.FindClass('TROINDYTCPCHANNEL') = nil then
+ TPSROIndyTCPModule.ExecImp(exec, ri);
+ RIRegisterTROINDYHTTPCHANNEL(ri);
+end;
+
+{ TPSROSoapModule }
+
+{class procedure TPSROSoapModule.CompImp(comp: TIFPSPascalCompiler);
+begin
+ SIRegisterTROSOAPMESSAGE(comp);
+end;
+
+class procedure TPSROSoapModule.ExecImp(exec: TIFPSExec;
+ ri: TIFPSRuntimeClassImporter);
+begin
+ RIRegisterTROSOAPMESSAGE(ri);
+end;}
+
+{ TPSROBinModule }
+
+class procedure TPSROBinModule.CompImp(comp: TIFPSPascalCompiler);
+begin
+ SIRegisterTROBINMESSAGE(Comp);
+end;
+
+class procedure TPSROBinModule.ExecImp(exec: TIFPSExec;
+ ri: TIFPSRuntimeClassImporter);
+begin
+ RIRegisterTROBINMESSAGE(ri);
+end;
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/uROPSServerLink.pas b/official/5.0.30.691/Pascal Script for Delphi/Source/uROPSServerLink.pas
new file mode 100644
index 0000000..a246a6f
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/uROPSServerLink.pas
@@ -0,0 +1,1139 @@
+unit uROPSServerLink;
+
+interface
+uses
+ SysUtils, Classes, uPSCompiler, uPSUtils, uPSRuntime,
+ uROServer, uROClient, uRODL{$IFDEF WIN32},
+ Windows{$ELSE}, Types{$ENDIF}, uROTypes, uROClientIntf,
+ uROSerializer, uPSComponent;
+
+type
+
+ TPSROModule = class
+ protected
+ class procedure ExecImp(exec: TPSExec; ri: TPSRuntimeClassImporter); virtual;
+ class procedure CompImp(comp: TPSPascalCompiler); virtual;
+ end;
+ TPSROModuleClass = class of TPSROModule;
+ TPSRemObjectsSdkPlugin = class;
+ TPSROModuleLoadEvent = procedure (Sender: TPSRemObjectsSdkPlugin) of object;
+
+ TPSRemObjectsSdkPlugin = class(TPSPlugin)
+ private
+ FRodl: TRODLLibrary;
+ FModules: TList;
+ FOnLoadModule: TPSROModuleLoadEvent;
+
+ FEnableIndyTCP: Boolean;
+ FEnableIndyHTTP: Boolean;
+ FEnableBinary: Boolean;
+ function GetHaveRodl: Boolean;
+ function MkStructName(Struct: TRODLStruct): string;
+ protected
+ procedure CompileImport1(CompExec: TPSScript); override;
+ procedure ExecImport1(CompExec: TPSScript; const ri: TPSRuntimeClassImporter); override;
+ procedure Loaded; override;
+ public
+
+ procedure RODLLoadFromFile(const FileName: string);
+
+ procedure RODLLoadFromResource;
+
+ procedure RODLLoadFromStream(S: TStream);
+
+ procedure ClearRodl;
+
+ property HaveRodl: Boolean read GetHaveRodl;
+
+ constructor Create(AOwner: TComponent); override;
+
+ destructor Destroy; override;
+
+
+ procedure ReloadModules;
+
+ procedure RegisterModule(Module: TPSROModuleClass);
+ published
+ property OnLoadModule: TPSROModuleLoadEvent read FOnLoadModule write FOnLoadModule;
+
+ property EnableIndyTCP: Boolean read FEnableIndyTCP write FEnableIndyTCP default true;
+
+ property EnableIndyHTTP: Boolean read FEnableIndyHTTP write FEnableIndyHTTP default true;
+
+ property EnableBinary: Boolean read FEnableBinary write FEnableBinary default true;
+ end;
+
+implementation
+uses
+ uRODLToXML, uROPSImports;
+
+procedure SIRegisterTROTRANSPORTCHANNEL(CL: TPSPascalCompiler);
+Begin
+With cl.AddClassN(cl.FindClass('TComponent'), 'TROTRANSPORTCHANNEL') do
+ begin
+ end;
+end;
+
+procedure SIRegisterTROMESSAGE(CL: TPSPascalCompiler);
+Begin
+With cl.AddClassN(cl.FindClass('TComponent'),'TROMESSAGE') do
+ begin
+ RegisterProperty('MESSAGENAME', 'STRING', iptrw);
+ RegisterProperty('INTERFACENAME', 'STRING', iptrw);
+ end;
+end;
+
+procedure TROMESSAGEINTERFACENAME_W(Self: TROMESSAGE; const T: STRING);
+begin Self.INTERFACENAME := T; end;
+
+procedure TROMESSAGEINTERFACENAME_R(Self: TROMESSAGE; var T: STRING);
+begin T := Self.INTERFACENAME; end;
+
+procedure TROMESSAGEMESSAGENAME_W(Self: TROMESSAGE; const T: STRING);
+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
+ begin
+ RegisterVirtualConstructor(@TROMESSAGE.CREATE, 'CREATE');
+ RegisterPropertyHelper(@TROMESSAGEMESSAGENAME_R,@TROMESSAGEMESSAGENAME_W,'MESSAGENAME');
+ RegisterPropertyHelper(@TROMESSAGEINTERFACENAME_R,@TROMESSAGEINTERFACENAME_W,'INTERFACENAME');
+ end;
+end;
+
+
+type
+ TRoObjectInstance = class;
+ { }
+ IROClass = interface
+ ['{246B5804-461F-48EC-B2CA-FBB7B69B0D64}']
+ function SLF: TRoObjectInstance;
+ end;
+ TRoObjectInstance = class(TInterfacedObject, IROClass)
+ private
+ FMessage: IROMessage;
+ FChannel: IROTransportChannel;
+ public
+ constructor Create;
+ function SLF: TRoObjectInstance;
+ property Message: IROMessage read FMessage write FMessage;
+ property Channel: IROTransportChannel read FChannel write FChannel;
+ end;
+
+
+
+function CreateProc(Caller: TPSExec; p: PIFProcRec; Global, Stack: TPSStack): Boolean;
+var
+ temp, res: TPSVariantIFC;
+ Chan: TROTransportChannel;
+ Msg: TROMessage;
+ NewRes: TRoObjectInstance;
+begin
+ res := NewTPSVariantIFC(Stack[Stack.count -1], True);
+ if (Res.Dta = nil) or (res.aType.BaseType <> btInterface) then
+ begin
+ Caller.CMD_Err2(erCustomError, 'RO Invoker: Invalid Parameters');
+ Result := False;
+ exit;
+ end;
+ IUnknown(Res.Dta^) := nil;
+
+ NewRes := TRoObjectInstance.Create;
+
+ temp := NewTPSVariantIFC(Stack[Stack.Count -4], True);
+
+ if (temp.aType <> nil) and (temp.Dta <> nil) and (Temp.aType.BaseType = btClass) and (TObject(Temp.Dta^) is TROTransportChannel) then
+ Chan := TROTransportChannel(temp.dta^)
+ else
+ Chan := nil;
+ temp := NewTPSVariantIFC(Stack[Stack.Count -3], True);
+ if (temp.aType <> nil) and (temp.Dta <> nil) and (Temp.aType.BaseType = btClass) and (TObject(Temp.Dta^) is TROMessage) then
+ Msg := TROMessage(temp.dta^)
+ else
+ Msg := nil;
+ if (msg = nil) or (chan = nil) then
+ begin
+ Chan.free;
+ msg.Free;
+
+ NewRes.Free;
+ Result := false;
+ Caller.CMD_Err2(erCustomError, 'Could not create message');
+ exit;
+ end;
+
+ IRoClass(Res.Dta^) := NewRes;
+
+ NewRes.Message := Msg;
+ NewRes.Channel := Chan;
+ Result := True;
+end;
+
+function NilProc(Caller: TPSExec; p: PIFProcRec; Global, Stack: TPSStack): Boolean;
+var
+ n: TPSVariantIFC;
+begin
+ n := NewTPSVariantIFC(Stack[Stack.count -1], True);
+ if (n.Dta = nil) or (n.aType = nil) or (n.aType.BaseType <> btInterface) then
+ begin
+ Caller.CMD_Err2(erCustomError, 'RO Invoker: Cannot free');
+ Result := False;
+ exit;
+ end;
+ IUnknown(n.Dta^) := nil;
+ Result := True;
+end;
+
+type
+ TROStructure = class(TPersistent, IROCustomStreamableType, IROCustomStreamableStruct)
+ private
+ FVar: TPSVariantIFC;
+ FExec: TPSExec;
+ protected
+ function GetTypeName: string;
+ procedure SetTypeName(const s: string);
+ procedure Write(Serializer: TROSerializer; const Name: string);
+ procedure Read(Serializer: TROSerializer; const Name: string);
+ function _AddRef: Integer; stdcall;
+ function _Release: Integer; stdcall;
+ function QueryInterface(const IID: TGUID; out Obj): HResult; stdcall;
+ function CanImplementType(const aName: string):boolean;
+ procedure SetNull(b: Boolean);
+ function IsNull: Boolean;
+ public
+ constructor Create(aVar: TPSVariantIfc; Exec: TPSExec);
+ end;
+ TROArray = class(TROStructure, IROCustomStreamableType, IROCustomStreamableStruct, IROCustomStreamableArray)
+ protected
+ function GetCount: Longint;
+ procedure SetCount(l: Longint);
+ end;
+
+procedure WriteUserDefined(Exec: TPSExec; const Msg: IROMessage; const Name: string; const n: TPSVariantIfc);
+var
+ obj: TROStructure;
+begin
+ if n.aType.BaseType = btArray then
+ obj := TROArray.Create(n, exec)
+ else if n.aType.BaseType = btRecord then
+ obj := TROStructure.Create(n, exec)
+ else
+ raise Exception.Create('Unknown custom type');
+ try
+ Msg.Write(Name, obj.ClassInfo, obj, []);
+ finally
+ obj.Free;
+ end;
+end;
+
+procedure ReadUserDefined(Exec: TPSExec; const Msg: IROMessage; const Name: string; const n: TPSVariantIfc);
+var
+ obj: TROStructure;
+begin
+ if n.aType.BaseType = btArray then
+ obj := TROArray.Create(n, exec)
+ else if n.aType.BaseType = btRecord then
+ obj := TROStructure.Create(n, exec)
+ else
+ raise Exception.Create('Unknown custom type');
+ try
+ Msg.Read(Name, obj.ClassInfo, obj, []);
+ finally
+ obj.Free;
+ end;
+end;
+
+function RoProc(Caller: TPSExec; p: TIFExternalProcRec; Global, Stack: TIfList): Boolean;
+var
+ s, s2: string;
+ res, n: TPSVariantIFC;
+ aType: TRODataType;
+ aMode: TRODLParamFlag;
+ StartOffset, I: Longint;
+ __request, __response : TMemoryStream;
+ Inst: TRoObjectInstance;
+
+begin
+ s := p.Decl;
+
+ if s[1] = #255 then
+ begin
+ n := NewTPSVariantIFC(Stack[Stack.Count -1], True);
+ res.Dta := nil;
+ res.aType := nil;
+ StartOffset := Stack.Count -2;
+ end
+ else
+ begin
+ n := NewTPSVariantIFC(Stack[Stack.Count -2], True);
+ res := NewTPSVariantIFC(Stack[Stack.Count -1], True);
+ StartOffset := Stack.Count -3;
+ end;
+
+ if (n.Dta = nil) or (N.aType = nil) or (n.aType.BaseType <> btInterface) or (Longint(n.Dta^) = 0) then
+ begin
+ Caller.CMD_Err2(erCustomError, 'RO Invoker: Invalid Parameters');
+ Result := False;
+ exit;
+ end;
+
+ Inst := IROClass(n.dta^).Slf;
+ Delete(s, 1, 1);
+ i := StartOffset;
+ try
+ Inst.SLF.Message.InitializeRequestMessage(Inst.Channel, '', Copy(p.Name,1,pos('.', p.Name) -1), Copy(p.Name, pos('.', p.Name)+1, MaxInt));
+ while Length(s) > 0 do
+ begin
+ s2 := copy(s, 2, ord(s[1]));
+ Char(aMode) := s[length(s2)+2];
+ Char(aType) := s[length(s2)+3];
+ Delete(s, 1, length(s2)+3);
+ n := NewTPSVariantIFC(Stack[i], True);
+ Dec(I);
+ if ((aMode = fIn) or (aMode = fInOut)) and (n.Dta <> nil) then
+ begin
+ case aType of
+ rtInteger: Inst.Message.Write(s2, TypeInfo(Integer), Integer(n.Dta^), []);
+ rtDateTime: Inst.Message.Write(s2, TypeInfo(DateTime), Double(n.Dta^), []);
+ rtDouble: Inst.Message.Write(s2, TypeInfo(Double), Double(n.Dta^), []);
+ rtCurrency: Inst.Message.Write(s2, TypeInfo(Double), Double(n.Dta^), []);
+ rtWideString: Inst.Message.Write(s2, TypeInfo(WideString), WideString(n.Dta^), []);
+ rtString: Inst.Message.Write(s2, TypeInfo(String), String(n.Dta^), []);
+ rtInt64: Inst.Message.Write(s2, TypeInfo(Int64), Int64(n.Dta^), []);
+ rtBoolean: Inst.Message.Write(s2, TypeInfo(Boolean), Byte(n.Dta^), []);
+ rtUserDefined: WriteUserDefined(Caller, Inst.Message, s2, n);
+ end;
+ end;
+ end;
+ __request := TMemoryStream.Create;
+ __response := TMemoryStream.Create;
+ try
+ Inst.Message.WriteToStream(__request);
+ Inst.Channel.Dispatch(__request, __response);
+ Inst.Message.ReadFromStream(__response);
+ finally
+ __request.Free;
+ __response.Free;
+ end;
+ s := p.Decl;
+ Delete(s, 1, 1);
+ i := StartOffset;
+ while Length(s) > 0 do
+ begin
+ s2 := copy(s, 2, ord(s[1]));
+ Char(aMode) := s[length(s2)+2];
+ Char(aType) := s[length(s2)+3];
+ Delete(s, 1, length(s2)+3);
+ n := NewTPSVariantIFC(Stack[i], True);
+ Dec(I);
+ if ((aMode = fOut) or (aMode = fInOut)) and (n.Dta <> nil) then
+ begin
+ case aType of
+ rtInteger: Inst.Message.Read(s2, TypeInfo(Integer), Longint(n.Dta^), []);
+ rtDateTime: Inst.Message.Read(s2, TypeInfo(DateTime), double(n.dta^), []);
+ rtDouble: Inst.Message.Read(s2, TypeInfo(Double), double(n.dta^), []);
+ rtCurrency: Inst.Message.Read(s2, TypeInfo(Double), double(n.dta^), []);
+ rtWideString: Inst.Message.Read(s2, TypeInfo(WideString), widestring(n.Dta^), []);
+ rtString: Inst.Message.Read(s2, TypeInfo(String), string(n.dta^), []);
+ rtInt64: Inst.Message.Read(s2, TypeInfo(Int64), Int64(n.Dta^), []);
+ rtBoolean: Inst.Message.Read(s2, TypeInfo(Boolean), Boolean(n.Dta^), []);
+ rtUserDefined: ReadUserDefined(Caller, Inst.Message, s2, n);
+ end;
+ end;
+ end;
+ aType := TRODataType(p.Decl[1]);
+ case aType of
+ rtInteger: Inst.Message.Read('Result', TypeInfo(Integer), Longint(res.Dta^), []);
+ rtDateTime: Inst.Message.Read('Result', TypeInfo(DateTime), Double(res.dta^), []);
+ rtDouble: Inst.Message.Read('Result', TypeInfo(Double), Double(res.Dta^), []);
+ rtCurrency: Inst.Message.Read('Result', TypeInfo(Double), double(res.Dta^), []);
+ rtWideString: Inst.Message.Read('Result', TypeInfo(WideString), WideString(res.Dta^), []);
+ rtString: Inst.Message.Read('Result', TypeInfo(String), String(res.Dta^), []);
+ rtInt64: Inst.Message.Read('Result', TypeInfo(Int64), Int64(res.dta^), []);
+ rtBoolean: Inst.Message.Read('Result', TypeInfo(Boolean), Boolean(res.dta^), []);
+ rtUserDefined: ReadUserDefined(Caller, Inst.Message, 'Result', res);
+ end;
+ except
+ on e: Exception do
+ begin
+ Caller.CMD_Err2(erCustomError, e.Message);
+ Result := False;
+ exit;
+ end;
+ end;
+ Result := True;
+end;
+
+function SProcImport(Sender: TPSExec; p: TIFExternalProcRec; Tag: Pointer): Boolean;
+var
+ s: string;
+begin
+ s := p.Decl;
+ Delete(s, 1, pos(':', s));
+ if s[1] = '-' then
+ p.ProcPtr := @NilProc
+ else if s[1] = '!' then
+ begin
+ P.ProcPtr := @CreateProc;
+ p.Decl := Copy(s, 2, MaxInt);
+ end else
+ begin
+ Delete(s, 1, 1);
+ p.Name := Copy(S,1,pos('!', s)-1);
+ Delete(s, 1, pos('!', s));
+ p.Decl := s;
+ p.ProcPtr := @RoProc;
+ end;
+ Result := True;
+end;
+
+
+type
+ TMYComp = class(TPSPascalCompiler);
+ TRoClass = class(TPSExternalClass)
+ private
+ FService: TRODLService;
+ FNilProcNo: Cardinal;
+ FCompProcno: Cardinal;
+ function CreateParameterString(l: TRODLOperation): string;
+ function GetDT(DataType: string): TRODataType;
+ procedure MakeDeclFor(Dest: TPSParametersDecl; l: TRODLOperation);
+ public
+ constructor Create(Se: TPSPascalCompiler; Service: TRODLService; Const Typeno: TPSType);
+
+ function SelfType: TPSType; override;
+ function Func_Find(const Name: string; var Index: Cardinal): Boolean; override;
+ function Func_Call(Index: Cardinal; var ProcNo: Cardinal): Boolean; override;
+ function SetNil(var ProcNo: Cardinal): Boolean; override;
+
+ function ClassFunc_Find(const Name: string; var Index: Cardinal): Boolean; override;
+ function ClassFunc_Call(Index: Cardinal; var ProcNo: Cardinal): Boolean; override;
+ function IsCompatibleWith(Cl: TPSExternalClass): Boolean; override;
+ end;
+
+{ TROPSLink }
+procedure TPSRemObjectsSdkPlugin.RODLLoadFromFile(const FileName: string);
+var
+ f: TFileStream;
+begin
+ f := TFileStream.Create(FileName, fmOpenRead or fmShareDenyNone);
+ try
+ RODLLoadFromStream(f);
+ finally
+ f.Free;
+ end;
+end;
+
+procedure TPSRemObjectsSdkPlugin.RODLLoadFromResource;
+var
+ rs: TResourceStream;
+begin
+ rs := TResourceStream.Create(HInstance, 'RODLFILE', RT_RCDATA);
+ try
+ RODLLoadFromStream(rs);
+ finally
+ rs.Free;
+ end;
+end;
+
+procedure TPSRemObjectsSdkPlugin.RODLLoadFromStream(S: TStream);
+begin
+ FreeAndNil(FRodl);
+ with TXMLToRODL.Create do
+ begin
+ try
+ FRodl := Read(S);
+ finally
+ Free;
+ end;
+ end;
+end;
+
+
+destructor TPSRemObjectsSdkPlugin.Destroy;
+begin
+ FreeAndNil(FRodl);
+ FModules.Free;
+ inherited Destroy;
+end;
+
+{ TRoClass }
+
+constructor TRoClass.Create(Se: TPSPascalCompiler; Service: TRODLService; Const Typeno: TPSType);
+begin
+ inherited Create(SE, TypeNo);
+ FService := Service;
+ FNilProcNo := Cardinal(-1);
+ FCompProcNo := Cardinal(-1);
+end;
+
+function TRoClass.GetDT(DataType: string): TRODataType;
+begin
+ DataType := LowerCase(DataType);
+ if DataType = 'integer' then
+ Result := rtInteger
+ else if DataType = 'datetime' then
+ Result := rtDateTime
+ else if DataType = 'double' then
+ Result := rtDouble
+ else if DataType = 'currency' then
+ Result := rtCurrency
+ else if DataType = 'widestring' then
+ Result := rtWidestring
+ else if DataType = 'string' then
+ Result := rtString
+ else if DataType = 'int64' then
+ Result := rtInt64
+ else if DataType = 'boolean' then
+ Result := rtBoolean
+ else if DataType = 'variant' then
+ Result := rtVariant
+ else if DataType = 'binary' then
+ Result := rtBinary
+ else
+ Result := rtUserDefined;
+end;
+
+function TRoClass.CreateParameterString(l: TRODLOperation): string;
+var
+ i: Longint;
+begin
+ if L.Result = nil then
+ begin
+ Result := #$FF;
+ end else
+ begin
+ Result := Chr(Ord(GetDT(l.Result.DataType)));
+ end;
+ for i := 0 to l.Count -1 do
+ begin
+ if l.Items[i].Flag = fResult then Continue;
+ Result := Result + Chr(Length(l.Items[i].Info.Name))+ l.Items[i].Info.Name + Chr(Ord(l.Items[i].Flag)) + Chr(Ord(GetDT(l.Items[i].DataType)));
+ end;
+end;
+
+procedure TRoClass.MakeDeclFor(Dest: TPSParametersDecl; l: TRODLOperation);
+var
+ i: Longint;
+ dd: TPSParameterDecl;
+begin
+ if l.Result <> nil then
+ begin
+ Dest.Result := TMyComp(SE).at2ut(SE.FindType(l.Result.DataType));
+ end;
+ for i := 0 to l.Count -1 do
+ begin
+ if l.Items[i].Flag = fResult then Continue;
+ dd := Dest.AddParam;
+ if l.Items[i].Flag = fIn then
+ dd.mode := pmIn
+ else
+ dd.Mode := pmInOut;
+ dd.OrgName := l.Items[i].Info.Name;
+ dd.aType := TMyComp(SE).at2ut(SE.FindType(l.Items[i].DataType));
+ end;
+end;
+
+function TRoClass.Func_Call(Index: Cardinal; var ProcNo: Cardinal): Boolean;
+var
+ h, i: Longint;
+ s, e: string;
+ P: TPSProcedure;
+ p2: TPSExternalProcedure;
+begin
+ s := 'roclass:_'+FService.Info.Name + '.' + FService.Default.Items[Index].Info.Name;
+ h := MakeHash(s);
+ for i := 0 to TMyComp(SE).FProcs.Count -1 do
+ begin
+ P := TMyComp(SE).FProcs[i];
+ if (p is TPSExternalProcedure) then
+ begin
+ p2 := TPSExternalProcedure(p);
+ if (p2.RegProc.NameHash = h) and (Copy(p2.RegProc.ImportDecl, 1, pos('!', p2.RegProc.ImportDecl)) = s) then
+ begin
+ Procno := I;
+ Result := True;
+ Exit;
+ end;
+ end;
+ end;
+ e := CreateParameterString(FService.Default.Items[Index]);
+ s := s + '!' + e;
+ ProcNo := TMyComp(SE).AddUsedFunction2(P2);
+ p2.RegProc := TPSRegProc.Create;
+ TMYComp(SE).FRegProcs.Add(p2.RegProc);
+ p2.RegProc.Name := '';
+ p2.RegProc.ExportName := True;
+ MakeDeclFor(p2.RegProc.Decl, FService.Default.Items[Index]);
+ p2.RegProc.ImportDecl := s;
+ Result := True;
+end;
+
+function TRoClass.Func_Find(const Name: string; var Index: Cardinal): Boolean;
+var
+ i: Longint;
+begin
+ for i := 0 to FService.Default.Count -1 do
+ begin
+ if CompareText(FService.Default.Items[i].Info.Name, Name) = 0 then
+ begin
+ Index := i;
+ Result := True;
+ Exit;
+ end;
+ end;
+ Result := False;
+end;
+
+const
+ PSClassType = '!ROClass';
+ MyGuid: TGuid = '{CADCCF37-7FA0-452E-971D-65DA691F7648}';
+
+function TRoClass.SelfType: TPSType;
+begin
+ Result := SE.FindType(PSClassType);
+ if Result = nil then
+ begin
+ Result := se.AddInterface(se.FindInterface('IUnknown'), MyGuid, PSClassType).aType;
+ end;
+end;
+
+function TRoClass.SetNil(var ProcNo: Cardinal): Boolean;
+var
+ P: TPSExternalProcedure;
+begin
+ if FNilProcNo <> Cardinal(-1) then
+ ProcNo:= FNilProcNo
+ else
+ begin
+ ProcNo := TMyComp(SE).AddUsedFunction2(P);
+ p.RegProc := TPSRegProc.Create;
+ TMyComp(SE).FRegProcs.Add(p.RegProc);
+ p.RegProc.Name := '';
+ p.RegProc.ExportName := True;
+ with p.RegProc.Decl.AddParam do
+ begin
+ OrgName := 'VarNo';
+ aType := TMYComp(Se).at2ut(SelfType);
+ end;
+ p.RegProc.ImportDecl := 'roclass:-';
+ FNilProcNo := Procno;
+ end;
+ Result := True;
+end;
+
+function TRoClass.ClassFunc_Call(Index: Cardinal;
+ var ProcNo: Cardinal): Boolean;
+var
+ P: TPSExternalProcedure;
+begin
+ if FCompProcNo <> Cardinal(-1) then
+ begin
+ Procno := FCompProcNo;
+ Result := True;
+ Exit;
+ end;
+ ProcNo := TMyComp(SE).AddUsedFunction2(P);
+ p.RegProc := TPSRegProc.Create;
+ TMyComp(SE).FRegProcs.Add(p.RegProc);
+ p.RegProc.ExportName := True;
+ p.RegProc.Decl.Result := TMyComp(SE).at2ut(SelfType);
+ with p.RegProc.Decl.AddParam do
+ begin
+ Orgname := 'Message';
+ aType :=TMyComp(SE).at2ut(SE.FindType('TROMESSAGE'));
+ end;
+ with p.RegProc.Decl.AddParam do
+ begin
+ Orgname := 'Channel';
+ aType :=TMyComp(SE).at2ut(SE.FindType('TROTRANSPORTCHANNEL'));
+ end;
+ p.RegProc.ImportDecl := 'roclass:!';
+ FCompProcNo := Procno;
+ Result := True;
+end;
+
+function TRoClass.ClassFunc_Find(const Name: string;
+ var Index: Cardinal): Boolean;
+begin
+ if Name = 'CREATE' then
+ begin
+ Result := True;
+ Index := 0;
+ end else
+ result := False;
+end;
+
+function TRoClass.IsCompatibleWith(Cl: TPSExternalClass): Boolean;
+begin
+ Result := Cl is TRoClass;
+end;
+
+{ TRoObjectInstance }
+
+function TRoObjectInstance.SLF: TRoObjectInstance;
+begin
+ Result := Self;
+end;
+
+constructor TRoObjectInstance.Create;
+begin
+ FRefCount := 1;
+end;
+
+
+function TPSRemObjectsSdkPlugin.MkStructName(Struct: TRODLStruct): string;
+var
+ i: Longint;
+begin
+ Result := '!ROStruct!'+Struct.Info.Name+ ',';
+ for i := 0 to Struct.Count -1 do
+ begin
+ Result := Result + Struct.Items[i].Info.Name+ ',';
+ end;
+end;
+
+function CompareStructItem(const S1, S2: TRODLTypedEntity): Integer;
+begin
+ Result := CompareText(S1.Info.Name, S2.Info.Name);
+end;
+
+procedure SortStruct(struct: TRODLStruct; First, Last: Longint);
+var
+ l, r, Pivot: Integer;
+begin
+ while First < Last do
+ begin
+ Pivot := (First + Last) div 2;
+ l := First - 1;
+ r := Last + 1;
+ repeat
+ repeat inc(l); until CompareStructItem(Struct.Items[l], Struct.Items[Pivot]) >= 0;
+ repeat dec(r); until CompareStructItem(Struct.Items[r], Struct.Items[Pivot]) <= 0;
+ if l >= r then break;
+ Struct.Exchange(l, r);
+ until false;
+ if First < r then SortStruct(Struct, First, r);
+ First := r+1;
+ end;
+end;
+
+procedure TPSRemObjectsSdkPlugin.CompileImport1(CompExec: TPSScript);
+var
+ i, i1: Longint;
+ Enum: TRODLEnum;
+ TempType: TPSType;
+ Struct: TRODLStruct;
+ Arr: TRODLArray;
+ RecType: TPSRecordFieldTypeDef;
+ Service: TRODLService;
+begin
+ if FRODL = nil then exit;
+ if CompExec.Comp.FindType('TDateTime') = nil then
+ raise Exception.Create('Please register the DateUtils library first');
+ SIRegisterTROTRANSPORTCHANNEL(CompExec.Comp);
+ SIRegisterTROMESSAGE(CompExec.Comp);
+ if CompExec.Comp.FindType('DateTime') = nil then
+ CompExec.Comp.AddTypeCopyN('DateTime', 'TDateTime');
+ if CompExec.Comp.FindType('Currency') = nil then
+ CompExec.Comp.AddTypeCopyN('Currency', 'Double'); // for now
+ for i := 0 to FRodl.EnumCount -1 do
+ begin
+ Enum := FRodl.Enums[i];
+ TempType := CompExec.Comp.AddType(Enum.Info.Name, btEnum);
+ for i1 := 0 to Enum.Count -1 do
+ begin
+ CompExec.Comp.AddConstant(Enum.Items[i1].Info.Name, TempType).SetUInt(i1);
+ end;
+ end;
+ for i := 0 to FRodl.StructCount -1 do
+ begin
+ Struct := FRodl.Structs[i];
+ SortStruct(Struct, 0, Struct.Count-1);
+ TempType := CompExec.Comp.AddType('', btRecord);
+ TempType.ExportName := True;
+ TempType.Name := MkStructName(Struct);
+ for i1 := 0 to Struct.Count -1 do
+ begin
+ RecType := TPSRecordType(TempType).AddRecVal;
+ RecType.FieldOrgName := Struct.Items[i1].Info.Name;
+ RecType.aType := CompExec.Comp.FindType(Struct.Items[i1].DataType);
+ end;
+ CompExec.Comp.AddTypeCopy(Struct.Info.Name, TempType);
+ end;
+ for i := 0 to FRodl.ArrayCount -1 do
+ begin
+ Arr := FRodl.Arrays[i];
+ TempType := CompExec.Comp.AddType(Arr.Info.Name, btArray);
+ TPSArrayType(TempType).ArrayTypeNo := CompExec.Comp.FindType(Arr.ElementType);
+ end;
+ for i := 0 to FRodl.ServiceCount -1 do
+ begin
+ Service := FRodl.Services[i];
+ TempType := CompExec.Comp.AddType(Service.Info.Name, btExtClass);
+ TPSUndefinedClassType(TempType).ExtClass := TRoClass.Create(CompExec.Comp, Service, TempType);
+ end;
+ for i := 0 to FModules.Count -1 do
+ TPSROModuleClass(FModules[i]).CompImp(CompExec.Comp);
+end;
+
+function TPSRemObjectsSdkPlugin.GetHaveRodl: Boolean;
+begin
+ Result := FRodl <> nil;
+end;
+
+procedure TPSRemObjectsSdkPlugin.ClearRodl;
+begin
+ FRodl.Free;
+ FRodl := nil;
+end;
+
+procedure TPSRemObjectsSdkPlugin.ExecImport1(CompExec: TPSScript;
+ const ri: TPSRuntimeClassImporter);
+var
+ i: Longint;
+begin
+ if FRODL = nil then exit;
+ CompExec.Exec.AddSpecialProcImport('roclass', SProcImport, nil);
+ RIRegisterTROTRANSPORTCHANNEL(ri);
+ RIRegisterTROMESSAGE(ri);
+ for i := 0 to FModules.Count -1 do
+ TPSROModuleClass(FModules[i]).ExecImp(CompExec.Exec, ri);
+end;
+
+constructor TPSRemObjectsSdkPlugin.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+ FModules := TList.Create;
+ //FEnableSOAP := True;
+ FEnableBinary := True;
+ FEnableIndyTCP := True;
+ FEnableIndyHTTP := True;
+end;
+
+procedure TPSRemObjectsSdkPlugin.Loaded;
+begin
+ inherited Loaded;
+ ReloadModules;
+end;
+
+procedure TPSRemObjectsSdkPlugin.RegisterModule(
+ Module: TPSROModuleClass);
+begin
+ FModules.Add(Module);
+end;
+
+procedure TPSRemObjectsSdkPlugin.ReloadModules;
+begin
+ FModules.Clear;
+ if FEnableIndyTCP then RegisterModule(TPSROIndyTCPModule);
+ if FEnableIndyHTTP then RegisterModule(TPSROIndyHTTPModule);
+ //if FEnableSOAP then RegisterModule(TPSROSoapModule);
+ if FEnableBinary then RegisterModule(TPSROBinModule);
+ if assigned(FOnLoadModule) then
+ FOnLoadModule(Self);
+end;
+
+{ TPSROModule }
+
+class procedure TPSROModule.CompImp(comp: TPSPascalCompiler);
+begin
+ // do nothing
+end;
+
+class procedure TPSROModule.ExecImp(exec: TPSExec;
+ ri: TPSRuntimeClassImporter);
+begin
+ // do nothing
+end;
+
+procedure IntRead(Exec: TPSExec; Serializer: TROSerializer;
+ const Name: string; aVar: TPSVariantIFC; arridx: Longint);
+var
+ i: Longint;
+ s, s2: string;
+ r: TROStructure;
+begin
+ case aVar.aType.BaseType of
+ btS64: Serializer.Read(Name, TypeInfo(int64), Int64(avar.Dta^), arridx);
+ btu32: Serializer.Read(Name, TypeInfo(cardinal), Cardinal(avar.Dta^), arridx);
+ bts32: Serializer.Read(Name, TypeInfo(longint), Longint(avar.Dta^), arridx);
+ btu16: Serializer.Read(Name, TypeInfo(word), Word(aVar.Dta^), arridx);
+ btS16: Serializer.Read(Name, TypeInfo(smallint), Smallint(aVar.Dta^), arridx);
+ btu8: Serializer.Read(Name, TypeInfo(byte), Byte(aVar.Dta^), arridx);
+ btS8: Serializer.Read(Name, TypeInfo(shortint), Shortint(aVar.Dta^), arridx);
+ btDouble:
+ begin
+ if aVar.aType.ExportName = 'TDATETIME' then
+ Serializer.Read(Name, TypeInfo(datetime), Double(avar.Dta^), arridx)
+ else
+ Serializer.Read(Name, TypeInfo(double), Double(aVar.Dta^), arridx);
+ end;
+ btSingle: Serializer.Read(Name, TypeInfo(single), Single(avar.Dta^), arridx);
+ btExtended: Serializer.Read(Name, TypeInfo(extended), Extended(avar.dta^), arridx);
+ btWideString: Serializer.Read(Name, TypeInfo(widestring), widestring(avar.dta^), arridx);
+ btString: Serializer.Read(Name, TypeInfo(string), string(avar.dta^), arridx);
+ btArray:
+ begin
+ if (TPSTypeRec_Array(avar.aType).ArrayType.BaseType = btRecord) then
+ begin
+ for i := 0 to PSDynArrayGetLength(Pointer(aVar.Dta^), aVar.aType) -1 do
+ begin
+ r := TROStructure.Create(PSGetArrayField(avar, i), Exec);
+ try
+ Serializer.Read(Name, typeinfo(TROArray), r, i);
+ finally
+ r.Free;
+ end;
+ end;
+ end else if (TPSTypeRec_Array(avar.aType).ArrayType.BaseType = btArray) then
+ begin
+ for i := 0 to PSDynArrayGetLength(Pointer(aVar.Dta^), aVar.aType) -1 do
+ begin
+ r := TROArray.Create(PSGetArrayField(avar, i), Exec);
+ try
+ Serializer.Read(Name, typeinfo(TROArray), r, i);
+ finally
+ r.Free;
+ end;
+ end;
+ end else begin
+ for i := 0 to PSDynArrayGetLength(Pointer(aVar.Dta^), aVar.aType) -1 do
+ begin
+ IntRead(Exec, Serializer, Name, PSGetArrayField(avar, i), i);
+ end;
+ end;
+ end;
+ btRecord:
+ begin
+ s := avar.aType.ExportName;
+ if copy(s,1, 10) <> '!ROStruct!' then
+ raise Exception.Create('Invalid structure: '+s);
+ Delete(s,1,pos(',',s));
+ for i := 0 to TPSTypeRec_Record(aVar.aType).FieldTypes.Count -1 do
+ begin
+ s2 := copy(s,1,pos(',',s)-1);
+ delete(s,1,pos(',',s));
+ if (TPSTypeRec(TPSTypeRec_Record(aVar.aType).FieldTypes[i]).BaseType = btRecord) then
+ begin
+
+ r := TROStructure.Create(PSGetRecField(aVar, i), Exec);
+ try
+ Serializer.Read(s2, typeinfo(TROStructure), r, -1);
+ finally
+ r.Free;
+ end;
+ end else if (TPSTypeRec(TPSTypeRec_Record(aVar.aType).FieldTypes[i]).BaseType = btArray) then
+ begin
+ r := TROArray.Create(PSGetRecField(aVar, i), Exec);
+ try
+ Serializer.Read(s2, typeinfo(TROArray), r, -1);
+ finally
+ r.Free;
+ end;
+ end else
+ IntRead(Exec, Serializer, s2, PSGetRecField(aVar, i), -1);
+ end;
+ end;
+ else
+ raise Exception.Create('Unable to read type');
+
+ end;
+end;
+
+procedure IntWrite(Exec: TPSExec; Serializer: TROSerializer;
+ const Name: string; aVar: TPSVariantIFC; arridx: Longint);
+var
+ i: Longint;
+ s, s2: string;
+ r: TROStructure;
+begin
+ case aVar.aType.BaseType of
+ btS64: Serializer.Write(Name, TypeInfo(int64), Int64(avar.Dta^), arridx);
+ btu32: Serializer.Write(Name, TypeInfo(cardinal), Cardinal(avar.Dta^), arridx);
+ bts32: Serializer.Write(Name, TypeInfo(longint), Longint(avar.Dta^), arridx);
+ btu16: Serializer.Write(Name, TypeInfo(word), Word(avar.Dta^), arridx);
+ btS16: Serializer.Write(Name, TypeInfo(smallint), Smallint(aVar.Dta^), arridx);
+ btu8: Serializer.Write(Name, TypeInfo(byte), Byte(aVar.Dta^), arridx);
+ btS8: Serializer.Write(Name, TypeInfo(shortint), ShortInt(aVar.Dta^), arridx);
+ btDouble:
+ begin
+ if aVar.aType.ExportName = 'TDATETIME' then
+ Serializer.Write(Name, TypeInfo(datetime), Double(aVar.Dta^), arridx)
+ else
+ Serializer.Write(Name, TypeInfo(double), Double(aVar.Dta^), arridx);
+ end;
+ btSingle: Serializer.Write(Name, TypeInfo(single), Single(aVar.Dta^), arridx);
+ btExtended: Serializer.Write(Name, TypeInfo(extended), Extended(aVar.Dta^), arridx);
+ btWideString: Serializer.Write(Name, TypeInfo(widestring), WideString(aVar.Dta^), arridx);
+ btString: Serializer.Write(Name, TypeInfo(string), String(aVar.Dta^), arridx);
+ btArray:
+ begin
+ if (TPSTypeRec_Array(avar.aType).ArrayType.BaseType = btRecord) then
+ begin
+ for i := 0 to PSDynArrayGetLength(Pointer(aVar.Dta^), aVar.aType) -1 do
+ begin
+ r := TROStructure.Create(PSGetArrayField(aVar, i), Exec);
+ try
+ Serializer.Write(Name, typeinfo(TROArray), r, i);
+ finally
+ r.Free;
+ end;
+ end;
+ end else if (TPSTypeRec_Array(avar.aType).ArrayType.BaseType = btArray) then
+ begin
+ for i := 0 to PSDynArrayGetLength(Pointer(aVar.Dta^), aVar.aType) -1 do
+ begin
+ r := TROArray.Create(PSGetArrayField(aVar, i), Exec);
+ try
+ Serializer.Write(Name, typeinfo(TROArray), r, i);
+ finally
+ r.Free;
+ end;
+ end;
+ end else begin
+ for i := 0 to PSDynArrayGetLength(Pointer(aVar.Dta^), aVar.aType) -1 do
+ begin
+ IntWrite(Exec, Serializer, Name, PSGetArrayField(aVar, i), i);
+ end;
+ end;
+ end;
+ btRecord:
+ begin
+ s := avar.aType.ExportName;
+ if copy(s,1, 10) <> '!ROStruct!' then
+ raise Exception.Create('Invalid structure: '+s);
+ Delete(s,1,pos(',',s));
+ for i := 0 to TPSTypeRec_Record(aVar.aType).FieldTypes.Count -1 do
+ begin
+ s2 := copy(s,1,pos(',',s)-1);
+ delete(s,1,pos(',',s));
+ if (TPSTypeRec(TPSTypeRec_Record(aVar.aType).FieldTypes[i]).BaseType = btRecord) then
+ begin
+ r := TROStructure.Create(PSGetRecField(aVar, i), Exec);
+ try
+ Serializer.Write(s2, typeinfo(TROStructure), r, -1);
+ finally
+ r.Free;
+ end;
+ end else if (TPSTypeRec(TPSTypeRec_Record(aVar.aType).FieldTypes[i]).BaseType = btArray) then
+ begin
+ r := TROArray.Create(PSGetRecField(aVar, i), Exec);
+ try
+ Serializer.Write(s2, typeinfo(TROArray), r, -1);
+ finally
+ r.Free;
+ end;
+ end else
+ IntWrite(Exec, Serializer, s2, PSGetRecField(aVar, i), -1);
+ end;
+ end;
+ else
+ raise Exception.Create('Unable to read type');
+
+ end;
+end;
+
+{ TROStructure }
+
+constructor TROStructure.Create(aVar: TPSVariantIfc; Exec: TPSExec);
+begin
+ inherited Create;
+ FVar := aVar;
+ FExec := Exec;
+end;
+
+function TROStructure.IsNull: Boolean;
+begin
+ Result := False;
+end;
+
+function TROStructure.QueryInterface(const IID: TGUID;
+ out Obj): HResult;
+begin
+ if GetInterface(IID, Obj) then
+ Result := 0
+ else
+ Result := E_NOINTERFACE;
+end;
+
+procedure TROStructure.Read(Serializer: TROSerializer;
+ const Name: string);
+begin
+ IntRead(FExec, Serializer, Name, FVar, -1);
+end;
+
+procedure TROStructure.SetNull(b: Boolean);
+begin
+ // null not supported
+end;
+
+function TROStructure.GetTypeName: string;
+var
+ s: string;
+begin
+ s := fvar.atype.ExportName;
+ delete(s,1,1);
+ delete(s,1,pos('!', s));
+ result := copy(s,1,pos(',',s)-1);
+end;
+
+procedure TROStructure.Write(Serializer: TROSerializer;
+ const Name: string);
+begin
+ IntWrite(FExec, Serializer, Name, FVar, -1);
+end;
+
+
+function TROStructure._AddRef: Integer;
+begin
+ // do nothing
+ Result := 1;
+end;
+
+function TROStructure._Release: Integer;
+begin
+ // do nothing
+ Result := 1;
+end;
+
+function TROStructure.CanImplementType(const aName: string): boolean;
+begin
+ if SameText(aName, Self.GetTypeName) then
+ Result := True
+ else
+ Result := False;
+end;
+
+procedure TROStructure.SetTypeName(const s: string);
+begin
+ // Do nothing
+end;
+
+{ TROArray }
+
+function TROArray.GetCount: Longint;
+begin
+
+ // we should have an array in pVar now so assume that's true
+ Result := PSDynArrayGetLength(Pointer(fVar.Dta^), fvar.aType);
+end;
+
+procedure TROArray.SetCount(l: Integer);
+begin
+ PSDynArraySetLength(Pointer(fVAr.Dta^), fVar.aType, l);
+end;
+
+end.
diff --git a/official/5.0.30.691/Pascal Script for Delphi/Source/x86.inc b/official/5.0.30.691/Pascal Script for Delphi/Source/x86.inc
new file mode 100644
index 0000000..f71e797
--- /dev/null
+++ b/official/5.0.30.691/Pascal Script for Delphi/Source/x86.inc
@@ -0,0 +1,706 @@
+{ implementation of x86 abi }
+
+function RealFloatCall_Register(p: Pointer;
+ _EAX, _EDX, _ECX: Cardinal;
+ StackData: Pointer;
+ StackDataLen: Longint // stack length are in 4 bytes. (so 1 = 4 bytes)
+ ): Extended; Stdcall; // make sure all things are on stack
+var
+ E: Extended;
+begin
+ asm
+ mov ecx, stackdatalen
+ jecxz @@2
+ mov eax, stackdata
+ @@1:
+ mov edx, [eax]
+ push edx
+ sub eax, 4
+ dec ecx
+ or ecx, ecx
+ jnz @@1
+ @@2:
+ mov eax,_EAX
+ mov edx,_EDX
+ mov ecx,_ECX
+ call p
+ fstp tbyte ptr [e]
+ end;
+ Result := E;
+end;
+
+function RealFloatCall_Other(p: Pointer;
+ StackData: Pointer;
+ StackDataLen: Longint // stack length are in 4 bytes. (so 1 = 4 bytes)
+ ): Extended; Stdcall; // make sure all things are on stack
+var
+ E: Extended;
+begin
+ asm
+ mov ecx, stackdatalen
+ jecxz @@2
+ mov eax, stackdata
+ @@1:
+ mov edx, [eax]
+ push edx
+ sub eax, 4
+ dec ecx
+ or ecx, ecx
+ jnz @@1
+ @@2:
+ call p
+ fstp tbyte ptr [e]
+ end;
+ Result := E;
+end;
+
+function RealFloatCall_CDecl(p: Pointer;
+ StackData: Pointer;
+ StackDataLen: Longint // stack length are in 4 bytes. (so 1 = 4 bytes)
+ ): Extended; Stdcall; // make sure all things are on stack
+var
+ E: Extended;
+begin
+ asm
+ mov ecx, stackdatalen
+ jecxz @@2
+ mov eax, stackdata
+ @@1:
+ mov edx, [eax]
+ push edx
+ sub eax, 4
+ dec ecx
+ or ecx, ecx
+ jnz @@1
+ @@2:
+ call p
+ fstp tbyte ptr [e]
+ @@5:
+ mov ecx, stackdatalen
+ jecxz @@2
+ @@6:
+ pop edx
+ dec ecx
+ or ecx, ecx
+ jnz @@6
+ end;
+ Result := E;
+end;
+
+function RealCall_Register(p: Pointer;
+ _EAX, _EDX, _ECX: Cardinal;
+ StackData: Pointer;
+ StackDataLen: Longint; // stack length are in 4 bytes. (so 1 = 4 bytes)
+ ResultLength: Longint; ResEDX: Pointer): Longint; Stdcall; // make sure all things are on stack
+var
+ r: Longint;
+begin
+ asm
+ mov ecx, stackdatalen
+ jecxz @@2
+ mov eax, stackdata
+ @@1:
+ mov edx, [eax]
+ push edx
+ sub eax, 4
+ dec ecx
+ or ecx, ecx
+ jnz @@1
+ @@2:
+ mov eax,_EAX
+ mov edx,_EDX
+ mov ecx,_ECX
+ call p
+ mov ecx, resultlength
+ cmp ecx, 0
+ je @@5
+ cmp ecx, 1
+ je @@3
+ cmp ecx, 2
+ je @@4
+ mov r, eax
+ jmp @@5
+ @@3:
+ xor ecx, ecx
+ mov cl, al
+ mov r, ecx
+ jmp @@5
+ @@4:
+ xor ecx, ecx
+ mov cx, ax
+ mov r, ecx
+ @@5:
+ mov ecx, resedx
+ jecxz @@6
+ mov [ecx], edx
+ @@6:
+ end;
+ Result := r;
+end;
+
+function RealCall_Other(p: Pointer;
+ StackData: Pointer;
+ StackDataLen: Longint; // stack length are in 4 bytes. (so 1 = 4 bytes)
+ ResultLength: Longint; ResEDX: Pointer): Longint; Stdcall; // make sure all things are on stack
+var
+ r: Longint;
+begin
+ asm
+ mov ecx, stackdatalen
+ jecxz @@2
+ mov eax, stackdata
+ @@1:
+ mov edx, [eax]
+ push edx
+ sub eax, 4
+ dec ecx
+ or ecx, ecx
+ jnz @@1
+ @@2:
+ call p
+ mov ecx, resultlength
+ cmp ecx, 0
+ je @@5
+ cmp ecx, 1
+ je @@3
+ cmp ecx, 2
+ je @@4
+ mov r, eax
+ jmp @@5
+ @@3:
+ xor ecx, ecx
+ mov cl, al
+ mov r, ecx
+ jmp @@5
+ @@4:
+ xor ecx, ecx
+ mov cx, ax
+ mov r, ecx
+ @@5:
+ mov ecx, resedx
+ jecxz @@6
+ mov [ecx], edx
+ @@6:
+ end;
+ Result := r;
+end;
+
+function RealCall_CDecl(p: Pointer;
+ StackData: Pointer;
+ StackDataLen: Longint; // stack length are in 4 bytes. (so 1 = 4 bytes)
+ ResultLength: Longint; ResEDX: Pointer): Longint; Stdcall; // make sure all things are on stack
+var
+ r: Longint;
+begin
+ asm
+ mov ecx, stackdatalen
+ jecxz @@2
+ mov eax, stackdata
+ @@1:
+ mov edx, [eax]
+ push edx
+ sub eax, 4
+ dec ecx
+ or ecx, ecx
+ jnz @@1
+ @@2:
+ call p
+ mov ecx, resultlength
+ cmp ecx, 0
+ je @@5
+ cmp ecx, 1
+ je @@3
+ cmp ecx, 2
+ je @@4
+ mov r, eax
+ jmp @@5
+ @@3:
+ xor ecx, ecx
+ mov cl, al
+ mov r, ecx
+ jmp @@5
+ @@4:
+ xor ecx, ecx
+ mov cx, ax
+ mov r, ecx
+ @@5:
+ mov ecx, stackdatalen
+ jecxz @@7
+ @@6:
+ pop eax
+ dec ecx
+ or ecx, ecx
+ jnz @@6
+ mov ecx, resedx
+ jecxz @@7
+ mov [ecx], edx
+ @@7:
+ end;
+ Result := r;
+end;
+
+const
+ EmptyPchar: array[0..0] of char = #0;
+
+function TPSExec.InnerfuseCall(_Self, Address: Pointer; CallingConv: TPSCallingConvention; Params: TPSList; res: PPSVariantIFC): Boolean;
+var
+ Stack: ansistring;
+ I: Longint;
+ RegUsage: Byte;
+ CallData: TPSList;
+ pp: ^Byte;
+
+ EAX, EDX, ECX: Longint;
+
+ function rp(p: PPSVariantIFC): PPSVariantIFC;
+ begin
+ if p = nil then
+ begin
+ result := nil;
+ exit;
+ end;
+ if p.aType.BaseType = btPointer then
+ begin
+ p^.aType := Pointer(Pointer(IPointer(p^.dta) + 4)^);
+ p^.Dta := Pointer(p^.dta^);
+ end;
+ Result := p;
+ end;
+
+ function GetPtr(fVar: PPSVariantIFC): Boolean;
+ var
+ varPtr: Pointer;
+ UseReg: Boolean;
+ tempstr: string;
+ p: Pointer;
+ begin
+ Result := False;
+ if FVar = nil then exit;
+ if fVar.VarParam then
+ begin
+ case fvar.aType.BaseType of
+ btArray:
+ begin
+ if Copy(fvar.aType.ExportName, 1, 10) = '!OPENARRAY' then
+ begin
+ p := CreateOpenArray(True, Self, FVar);
+ if p = nil then exit;
+ CallData.Add(p);
+ case RegUsage of
+ 0: begin EAX := Longint(POpenArray(p)^.Data); Inc(RegUsage); end;
+ 1: begin EDX := Longint(POpenArray(p)^.Data); Inc(RegUsage); end;
+ 2: begin ECX := Longint(POpenArray(p)^.Data); Inc(RegUsage); end;
+ else begin
+ Stack := #0#0#0#0 + Stack;
+ Pointer((@Stack[1])^) := POpenArray(p)^.Data;
+ end;
+ end;
+ case RegUsage of
+ 0: begin EAX := Longint(POpenArray(p)^.ItemCount - 1); Inc(RegUsage); end;
+ 1: begin EDX := Longint(POpenArray(p)^.ItemCount -1); Inc(RegUsage); end;
+ 2: begin ECX := Longint(POpenArray(p)^.ItemCount -1); Inc(RegUsage); end;
+ else begin
+ Stack := #0#0#0#0 + Stack;
+ Longint((@Stack[1])^) := POpenArray(p)^.ItemCount -1;
+ end;
+ end;
+ Result := True;
+ Exit;
+ end else begin
+ {$IFDEF PS_DYNARRAY}
+ varptr := fvar.Dta;
+ {$ELSE}
+ Exit;
+ {$ENDIF}
+ end;
+ end;
+ btVariant,
+ btSet,
+ btStaticArray,
+ btRecord,
+ btInterface,
+ btClass,
+ {$IFNDEF PS_NOWIDESTRING} btWideString, btWideChar, {$ENDIF} btU8, btS8, btU16,
+ btS16, btU32, btS32, btSingle, btDouble, btExtended, btString, btPChar, btChar, btCurrency
+ {$IFNDEF PS_NOINT64}, bts64{$ENDIF}:
+ begin
+ Varptr := fvar.Dta;
+ end;
+ else begin
+ exit; //invalid type
+ end;
+ end; {case}
+ case RegUsage of
+ 0: begin EAX := Longint(VarPtr); Inc(RegUsage); end;
+ 1: begin EDX := Longint(VarPtr); Inc(RegUsage); end;
+ 2: begin ECX := Longint(VarPtr); Inc(RegUsage); end;
+ else begin
+ Stack := #0#0#0#0 + Stack;
+ Pointer((@Stack[1])^) := VarPtr;
+ end;
+ end;
+ end else begin
+ UseReg := True;
+ case fVar^.aType.BaseType of
+ btSet:
+ begin
+ tempstr := #0#0#0#0;
+ case TPSTypeRec_Set(fvar.aType).aByteSize of
+ 1: Byte((@tempstr[1])^) := byte(fvar.dta^);
+ 2: word((@tempstr[1])^) := word(fvar.dta^);
+ 3, 4: cardinal((@tempstr[1])^) := cardinal(fvar.dta^);
+ else
+ pointer((@tempstr[1])^) := fvar.dta;
+ end;
+ end;
+ btArray:
+ begin
+ if Copy(fvar^.aType.ExportName, 1, 10) = '!OPENARRAY' then
+ begin
+ p := CreateOpenArray(False, SElf, FVar);
+ if p =nil then exit;
+ CallData.Add(p);
+ case RegUsage of
+ 0: begin EAX := Longint(POpenArray(p)^.Data); Inc(RegUsage); end;
+ 1: begin EDX := Longint(POpenArray(p)^.Data); Inc(RegUsage); end;
+ 2: begin ECX := Longint(POpenArray(p)^.Data); Inc(RegUsage); end;
+ else begin
+ Stack := #0#0#0#0 + Stack;
+ Pointer((@Stack[1])^) := POpenArray(p)^.Data;
+ end;
+ end;
+ case RegUsage of
+ 0: begin EAX := Longint(POpenArray(p)^.ItemCount -1); Inc(RegUsage); end;
+ 1: begin EDX := Longint(POpenArray(p)^.ItemCount -1); Inc(RegUsage); end;
+ 2: begin ECX := Longint(POpenArray(p)^.ItemCount -1); Inc(RegUsage); end;
+ else begin
+ Stack := #0#0#0#0 + Stack;
+ Longint((@Stack[1])^) := POpenArray(p)^.ItemCount -1;
+ end;
+ end;
+ Result := True;
+ exit;
+ end else begin
+ {$IFDEF PS_DYNARRAY}
+ TempStr := #0#0#0#0;
+ Pointer((@TempStr[1])^) := Pointer(fvar.Dta^);
+ {$ELSE}
+ Exit;
+ {$ENDIF}
+ end;
+ end;
+ btVariant
+ , btStaticArray, btRecord:
+ begin
+ TempStr := #0#0#0#0;
+ Pointer((@TempStr[1])^) := Pointer(fvar.Dta);
+ end;
+ btDouble: {8 bytes} begin
+ TempStr := #0#0#0#0#0#0#0#0;
+ UseReg := False;
+ double((@TempStr[1])^) := double(fvar.dta^);
+ end;
+ btCurrency: {8 bytes} begin
+ TempStr := #0#0#0#0#0#0#0#0;
+ UseReg := False;
+ currency((@TempStr[1])^) := currency(fvar.dta^);
+ end;
+ btSingle: {4 bytes} begin
+ TempStr := #0#0#0#0;
+ UseReg := False;
+ Single((@TempStr[1])^) := single(fvar.dta^);
+ end;
+
+ btExtended: {10 bytes} begin
+ UseReg := False;
+ TempStr:= #0#0#0#0#0#0#0#0#0#0#0#0;
+ Extended((@TempStr[1])^) := extended(fvar.dta^);
+ end;
+ btChar,
+ btU8,
+ btS8: begin
+ TempStr := char(fVar^.dta^) + #0#0#0;
+ end;
+ {$IFNDEF PS_NOWIDESTRING}btWideChar, {$ENDIF}
+ btu16, btS16: begin
+ TempStr := #0#0#0#0;
+ Word((@TempStr[1])^) := word(fVar^.dta^);
+ end;
+ btu32, bts32: begin
+ TempStr := #0#0#0#0;
+ Longint((@TempStr[1])^) := Longint(fVar^.dta^);
+ end;
+ btPchar:
+ begin
+ TempStr := #0#0#0#0;
+ if pointer(fvar^.dta^) = nil then
+ Pointer((@TempStr[1])^) := @EmptyPchar
+ else
+ Pointer((@TempStr[1])^) := pointer(fvar^.dta^);
+ end;
+ btclass, btinterface, btString:
+ begin
+ TempStr := #0#0#0#0;
+ Pointer((@TempStr[1])^) := pointer(fvar^.dta^);
+ end;
+ {$IFNDEF PS_NOWIDESTRING}
+ btWideString: begin
+ TempStr := #0#0#0#0;
+ Pointer((@TempStr[1])^) := pointer(fvar^.dta^);
+ end;
+ {$ENDIF}
+
+ btProcPtr:
+ begin
+ tempstr := #0#0#0#0#0#0#0#0;
+ TMethod((@TempStr[1])^) := MKMethod(Self, Longint(FVar.Dta^));
+ UseReg := false;
+ end;
+
+ {$IFNDEF PS_NOINT64}bts64:
+ begin
+ TempStr:= #0#0#0#0#0#0#0#0;
+ Int64((@TempStr[1])^) := int64(fvar^.dta^);
+ UseReg := False;
+ end;{$ENDIF}
+ end; {case}
+ if UseReg then
+ begin
+ case RegUsage of
+ 0: begin EAX := Longint((@Tempstr[1])^); Inc(RegUsage); end;
+ 1: begin EDX := Longint((@Tempstr[1])^); Inc(RegUsage); end;
+ 2: begin ECX := Longint((@Tempstr[1])^); Inc(RegUsage); end;
+ else begin
+ {$IFDEF FPC}
+ if CallingConv = cdRegister then
+ Stack := Stack + TempStr
+ else
+ {$ENDIF}
+ Stack := TempStr + Stack;
+ end;
+ end;
+ end else begin
+ {$IFDEF FPC}
+ if CallingConv = cdRegister then
+ Stack := Stack + TempStr
+ else
+ {$ENDIF}
+ Stack := TempStr + Stack;
+ end;
+ end;
+ Result := True;
+ end;
+begin
+ InnerfuseCall := False;
+ if Address = nil then
+ exit; // need address
+ Stack := '';
+ CallData := TPSList.Create;
+ res := rp(res);
+ if res <> nil then
+ res.VarParam := true;
+ try
+ case CallingConv of
+ cdRegister: begin
+ EAX := 0;
+ EDX := 0;
+ ECX := 0;
+ RegUsage := 0;
+ if assigned(_Self) then begin
+ RegUsage := 1;
+ EAX := Longint(_Self);
+ end;
+ for I := 0 to Params.Count - 1 do
+ begin
+ if not GetPtr(rp(Params[I])) then Exit;
+ end;
+ if assigned(res) then begin
+ case res^.aType.BaseType of
+ {$IFNDEF PS_NOWIDESTRING}btWideString, {$ENDIF}
+ btInterface, btArray, btrecord, {$IFNDEF PS_FPCSTRINGWORKAROUND}btstring, {$ENDIF}btVariant, btStaticArray: GetPtr(res);
+ btSet:
+ begin
+ if TPSTypeRec_Set(res.aType).aByteSize >4 then GetPtr(res);
+ end;
+ end;
+ case res^.aType.BaseType of
+ btSet:
+ begin
+ case TPSTypeRec_Set(res.aType).aByteSize of
+ 1: byte(res.Dta^) := RealCall_Register(Address, EAX, EDX, ECX, @Stack[Length(Stack)-3], Length(Stack) div 4, 1, nil);
+ 2: word(res.Dta^) := RealCall_Register(Address, EAX, EDX, ECX, @Stack[Length(Stack)-3], Length(Stack) div 4, 2, nil);
+ 3,
+ 4: Longint(res.Dta^) := RealCall_Register(Address, EAX, EDX, ECX, @Stack[Length(Stack)-3], Length(Stack) div 4, 4, nil);
+ else RealCall_Register(Address, EAX, EDX, ECX, @Stack[Length(Stack)-3], Length(Stack) div 4, 0, nil)
+ end;
+ end;
+ btSingle: tbtsingle(res.Dta^) := RealFloatCall_Register(Address, EAX, EDX, ECX, @Stack[Length(Stack)-3], Length(Stack) div 4);
+ btDouble: tbtdouble(res.Dta^) := RealFloatCall_Register(Address, EAX, EDX, ECX, @Stack[Length(Stack)-3], Length(Stack) div 4);
+ btExtended: tbtextended(res.Dta^) := RealFloatCall_Register(Address, EAX, EDX, ECX, @Stack[Length(Stack)-3], Length(Stack) div 4);
+ btchar,btU8, btS8: tbtu8(res.dta^) := RealCall_Register(Address, EAX, EDX, ECX, @Stack[Length(Stack)-3], Length(Stack) div 4, 1, nil);
+ {$IFNDEF PS_NOWIDESTRING}btWideChar, {$ENDIF}btu16, bts16: tbtu16(res.dta^) := RealCall_Register(Address, EAX, EDX, ECX, @Stack[Length(Stack)-3], Length(Stack) div 4, 2, nil);
+ btClass :
+ tbtu32(res.dta^) := RealCall_Register(Address, EAX, EDX, ECX, @Stack[Length(Stack)-3], Length(Stack) div 4, 4, nil);
+ btu32,bts32: tbtu32(res.dta^) := RealCall_Register(Address, EAX, EDX, ECX, @Stack[Length(Stack)-3], Length(Stack) div 4, 4, nil);
+ btPChar: pchar(res.dta^) := Pchar(RealCall_Register(Address, EAX, EDX, ECX, @Stack[Length(Stack)-3], Length(Stack) div 4, 4, nil));
+ {$IFNDEF PS_NOINT64}bts64:
+ begin
+ EAX := RealCall_Register(Address, EAX, EDX, ECX, @Stack[Length(Stack)-3], Length(Stack) div 4, 4, @EDX);
+ tbts64(res.dta^) := Int64(Cardinal(EDX)) shl 32 or Cardinal(EAX);
+ end;
+ {$ENDIF}
+ btCurrency: tbtCurrency(res.Dta^) := RealFloatCall_Register(Address, EAX, EDX, ECX, @Stack[Length(Stack)-3], Length(Stack) div 4) / 10000;
+ btInterface,
+ btVariant,
+ {$IFNDEF PS_NOWIDESTRING}btWidestring, {$ENDIF}
+ btStaticArray, btArray, btrecord{$IFNDEF PS_FPCSTRINGWORKAROUND}, btstring {$ENDIF}: RealCall_Register(Address, EAX, EDX, ECX, @Stack[Length(Stack)-3], Length(Stack) div 4, 0, nil);
+ {$IFDEF PS_FPCSTRINGWORKAROUND}
+ btstring: begin
+ eax := RealCall_Register(Address, EAX, EDX, ECX, @Stack[Length(Stack)-3], Length(Stack) div 4, 4, nil);
+ Longint(res.dta^) := eax;
+ end;
+ {$ENDIF}
+ else
+ exit;
+ end;
+ end else
+ RealCall_Register(Address, EAX, EDX, ECX, @Stack[Length(Stack)-3], Length(Stack) div 4, 0, nil);
+ Result := True;
+ end;
+ cdPascal: begin
+ RegUsage := 3;
+ for I := 0 to Params.Count - 1 do begin
+ if not GetPtr(Params[i]) then Exit;
+ end;
+ if assigned(res) then begin
+ case res^.aType.BaseType of
+ {$IFNDEF PS_NOWIDESTRING}btWideString, {$ENDIF}btInterface, btArray, btrecord, btstring, btVariant: GetPtr(res);
+ end;
+ end;
+ if assigned(_Self) then begin
+ Stack := #0#0#0#0 +Stack;
+ Pointer((@Stack[1])^) := _Self;
+ end;
+ if assigned(res) then begin
+ case res^.aType.BaseType of
+ btSingle: tbtsingle(res^.Dta^) := RealFloatCall_Other(Address, @Stack[Length(Stack)-3], Length(Stack) div 4);
+ btDouble: tbtdouble(res^.Dta^) := RealFloatCall_Other(Address, @Stack[Length(Stack)-3], Length(Stack) div 4);
+ btExtended: tbtextended(res^.Dta^) := RealFloatCall_Other(Address, @Stack[Length(Stack)-3], Length(Stack) div 4);
+ btChar, btU8, btS8: tbtu8(res^.Dta^) := RealCall_Other(Address, @Stack[Length(Stack)-3], Length(Stack) div 4, 1, nil);
+ {$IFNDEF PS_NOWIDESTRING}btWideChar, {$ENDIF}btu16, bts16: tbtu16(res^.Dta^) := RealCall_Other(Address, @Stack[Length(Stack)-3], Length(Stack) div 4, 2, nil);
+ btClass, btu32, bts32: tbtu32(res^.Dta^):= RealCall_Other(Address, @Stack[Length(Stack)-3], Length(Stack) div 4, 4, nil);
+ btPChar: TBTSTRING(res^.dta^) := Pchar(RealCall_Other(Address, @Stack[Length(Stack)-3], Length(Stack) div 4, 4, nil));
+ {$IFNDEF PS_NOINT64}bts64:
+ begin
+ EAX := RealCall_Other(Address, @Stack[Length(Stack)-3], Length(Stack) div 4, 4, @EDX);
+ tbts64(res^.dta^) := Int64(EAX) shl 32 or EDX;
+ end;
+ {$ENDIF}
+ btVariant,
+ btInterface, btrecord, btstring: RealCall_Other(Address, @Stack[Length(Stack)-3], Length(Stack) div 4, 0, nil);
+ else
+ exit;
+ end;
+ end else
+ RealCall_Other(Address, @Stack[Length(Stack)-3], Length(Stack) div 4, 0, nil);
+ Result := True;
+ end;
+ cdSafeCall: begin
+ RegUsage := 3;
+ if assigned(res) then begin
+ GetPtr(res);
+ end;
+ for I := Params.Count - 1 downto 0 do begin
+ if not GetPtr(Params[i]) then Exit;
+ end;
+ if assigned(_Self) then begin
+ Stack := #0#0#0#0 +Stack;
+ Pointer((@Stack[1])^) := _Self;
+ end;
+ OleCheck(RealCall_Other(Address, @Stack[Length(Stack)-3], Length(Stack) div 4, 4, nil));
+ Result := True;
+ end;
+
+ CdCdecl: begin
+ RegUsage := 3;
+ if assigned(_Self) then begin
+ Stack := #0#0#0#0;
+ Pointer((@Stack[1])^) := _Self;
+ end;
+ for I := Params.Count - 1 downto 0 do begin
+ if not GetPtr(Params[I]) then Exit;
+ end;
+ if assigned(res) then begin
+ case res^.aType.BaseType of
+ btSingle: tbtsingle(res^.dta^) := RealFloatCall_Cdecl(Address, @Stack[Length(Stack)-3], Length(Stack) div 4);
+ btDouble: tbtdouble(res^.dta^) := RealFloatCall_Cdecl(Address, @Stack[Length(Stack)-3], Length(Stack) div 4);
+ btExtended: tbtextended(res^.dta^) := RealFloatCall_Cdecl(Address, @Stack[Length(Stack)-3], Length(Stack) div 4);
+ btCHar, btU8, btS8: tbtu8(res^.dta^) := RealCall_Cdecl(Address, @Stack[Length(Stack)-3], Length(Stack) div 4, 1, nil);
+ {$IFNDEF PS_NOWIDESTRING}btWideChar, {$ENDIF}btu16, bts16: tbtu16(res^.dta^) := RealCall_Cdecl(Address, @Stack[Length(Stack)-3], Length(Stack) div 4, 2, nil);
+ btClass, btu32, bts32: tbtu32(res^.dta^) := RealCall_Cdecl(Address, @Stack[Length(Stack)-3], Length(Stack) div 4, 4, nil);
+ btPChar: TBTSTRING(res^.dta^) := Pchar(RealCall_Cdecl(Address, @Stack[Length(Stack)-3], Length(Stack) div 4, 4, nil));
+ {$IFNDEF PS_NOINT64}bts64:
+ begin
+ EAX := RealCall_CDecl(Address, @Stack[Length(Stack)-3], Length(Stack) div 4, 4, @EDX);
+ tbts64(res^.Dta^) := Int64(EAX) shl 32 or EDX;
+ end;
+ {$ENDIF}
+ btVariant, {$IFNDEF PS_NOWIDESTRING}btWideString, {$ENDIF}
+ btInterface,
+ btArray, btrecord, btstring: begin GetPtr(res); RealCall_Cdecl(Address, @Stack[Length(Stack)-3], Length(Stack) div 4, 0, nil); end;
+ else
+ exit;
+ end;
+ end else begin
+ RealCall_CDecl(Address, @Stack[Length(Stack)-3], Length(Stack) div 4, 0, nil);
+ end;
+ Result := True;
+ end;
+ CdStdCall: begin
+ RegUsage := 3;
+ for I := Params.Count - 1 downto 0 do begin
+ if not GetPtr(Params[I]) then exit;
+ end;
+ if assigned(_Self) then begin
+ Stack := #0#0#0#0 + Stack;
+ Pointer((@Stack[1])^) := _Self;
+ end;
+ if assigned(res) then begin
+ case res^.aType.BaseType of
+ btSingle: tbtsingle(res^.dta^) := RealFloatCall_Other(Address, @Stack[Length(Stack)-3], Length(Stack) div 4);
+ btDouble: tbtdouble(res^.dta^) := RealFloatCall_Other(Address, @Stack[Length(Stack)-3], Length(Stack) div 4);
+ btExtended: tbtextended(res^.dta^):= RealFloatCall_Other(Address, @Stack[Length(Stack)-3], Length(Stack) div 4);
+ btChar, btU8, btS8: tbtu8(res^.dta^) := RealCall_Other(Address, @Stack[Length(Stack)-3], Length(Stack) div 4, 1, nil);
+ {$IFNDEF PS_NOWIDESTRING}btWideChar, {$ENDIF}btu16, bts16: tbtu16(res^.dta^) := RealCall_Other(Address, @Stack[Length(Stack)-3], Length(Stack) div 4, 2, nil);
+ btclass, btu32, bts32: tbtu32(res^.dta^) := RealCall_Other(Address, @Stack[Length(Stack)-3], Length(Stack) div 4, 4, nil);
+ btPChar: TBTSTRING(res^.dta^) := Pchar(RealCall_Other(Address, @Stack[Length(Stack)-3], Length(Stack) div 4, 4, nil));
+ {$IFNDEF PS_NOINT64}bts64:
+ begin
+ EAX := RealCall_Other(Address, @Stack[Length(Stack)-3], Length(Stack) div 4, 4, @EDX);
+ tbts64(res^.dta^) := Int64(EAX) shl 32 or EDX;
+ end;
+ {$ENDIF}
+ btVariant, {$IFNDEF PS_NOWIDESTRING}btWideString, {$ENDIF}
+ btInterface, btArray, btrecord, btstring: begin GetPtr(res); RealCall_Other(Address, @Stack[Length(Stack)-3], Length(Stack) div 4, 0, nil); end;
+ else
+ exit;
+ end;
+ end else begin
+ RealCall_Other(Address, @Stack[Length(Stack)-3], Length(Stack) div 4, 0, nil);
+ end;
+ Result := True;
+ end;
+ end;
+ finally
+ for i := CallData.Count -1 downto 0 do
+ begin
+ pp := CallData[i];
+ case pp^ of
+ 0: DestroyOpenArray(Self, Pointer(pp));
+ end;
+ end;
+ CallData.Free;
+ end;
+end;
+
+
diff --git a/official/5.0.30.691/Pascal Script for Delphi/ps.png b/official/5.0.30.691/Pascal Script for Delphi/ps.png
new file mode 100644
index 0000000..d9e364b
Binary files /dev/null and b/official/5.0.30.691/Pascal Script for Delphi/ps.png differ
diff --git a/official/5.0.30.691/RemObjects SDK (Common)/Bin/MasterServer_Data/Messages.nx1 b/official/5.0.30.691/RemObjects SDK (Common)/Bin/MasterServer_Data/Messages.nx1
new file mode 100644
index 0000000..1bbc406
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK (Common)/Bin/MasterServer_Data/Messages.nx1 differ
diff --git a/official/5.0.30.691/RemObjects SDK (Common)/Bin/MasterServer_Data/MessagesPerSession.nx1 b/official/5.0.30.691/RemObjects SDK (Common)/Bin/MasterServer_Data/MessagesPerSession.nx1
new file mode 100644
index 0000000..9a402e3
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK (Common)/Bin/MasterServer_Data/MessagesPerSession.nx1 differ
diff --git a/official/5.0.30.691/RemObjects SDK (Common)/Bin/MasterServer_Data/Sessions.nx1 b/official/5.0.30.691/RemObjects SDK (Common)/Bin/MasterServer_Data/Sessions.nx1
new file mode 100644
index 0000000..39b94a6
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK (Common)/Bin/MasterServer_Data/Sessions.nx1 differ
diff --git a/official/5.0.30.691/RemObjects SDK (Common)/Bin/MasterServer_Data/nxTrans.cfg b/official/5.0.30.691/RemObjects SDK (Common)/Bin/MasterServer_Data/nxTrans.cfg
new file mode 100644
index 0000000..003aee3
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK (Common)/Bin/MasterServer_Data/nxTrans.cfg differ
diff --git a/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROCOM.dll b/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROCOM.dll
new file mode 100644
index 0000000..6a0d022
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROCOM.dll differ
diff --git a/official/5.0.30.691/RemObjects SDK (Common)/Bin/RODL.exe b/official/5.0.30.691/RemObjects SDK (Common)/Bin/RODL.exe
new file mode 100644
index 0000000..d4a8a54
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK (Common)/Bin/RODL.exe differ
diff --git a/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROMasterServer.exe b/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROMasterServer.exe
new file mode 100644
index 0000000..c4ef2a7
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROMasterServer.exe differ
diff --git a/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROSBBCB.dll b/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROSBBCB.dll
new file mode 100644
index 0000000..d9abc1a
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROSBBCB.dll differ
diff --git a/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROSBDataAbstract.codetemplates.cfg b/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROSBDataAbstract.codetemplates.cfg
new file mode 100644
index 0000000..7d493c2
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROSBDataAbstract.codetemplates.cfg
@@ -0,0 +1,88 @@
+[OneSchemaMethod-Delphi]
+var
+ lDataSet:IDADataSet;
+begin
+ { This method body was auto-generated to retrieve the schema of your datasets.
+ You can now modify it to suite your needs. }
+
+ { ToDO: Rename the Schema reference below to match the name of your Schema component }
+
+ result := Binary.Create();
+ lDataSet := %SCHEMA%.NewDataset(Connection, aDataSet);
+ BinAdapter.WriteDataset(result, lDataSet, [woSchema], 0);
+end;
+
+
+[OneGetMethod-Delphi]
+var
+ lDataSet:IDADataSet;
+begin
+ { This method body was auto-generated to retrieve the rows of your datasets.
+ You can now modify it to suite your needs. }
+
+ { ToDO: Rename the Schema reference below to match the name of your Schema component }
+
+ result := Binary.Create();
+ lDataSet := %SCHEMA%.NewDataset(Connection, aDataSet);
+ BinAdapter.WriteDataset(result, lDataSet, [woRows], -1);
+end;
+
+
+[OneUpdateMethod-Delphi]
+begin
+ { Implement yourself ;-}
+ result := nil;
+end;
+
+
+[SchemaMethodPerDataSet-Delphi]
+var
+ lDataSet:IDADataSet;
+begin
+ { This method body was auto-generated to retrieve the schema of your %DATASET% dataset.
+ You can now modify it to suite your needs. }
+
+ { ToDO: Rename the Schema reference below to match the name of your Schema component }
+
+ result := Binary.Create();
+ lDataSet := %SCHEMA%.NewDataset(Connection, %DATASET%);
+ BinAdapter.WriteDataset(result, lDataSet, [woSchema], 0);
+end;
+
+
+[GetMethodPerDataSet-Delphi]
+var
+ lDataSet:IDADataSet;
+begin
+ { This method body was auto-generated to retrieve the rows of your %DATASET% dataset.
+ You can now modify it to suite your needs. }
+
+ { ToDO: Rename the Schema reference below to match the name of your Schema component }
+
+ result := Binary.Create();
+ lDataSet := %SCHEMA%.NewDataset(Connection, %DATASET%);
+ BinAdapter.WriteDataset(result, lDataSet, [woRows], -1);
+end;
+
+
+[UpdateMethodPerDataSet-Delphi]
+begin
+ { Implement yourself ;-}
+ result := nil;
+end;
+
+[GetSchemaXmlMethod-Delphi]
+begin
+ { This method body was auto-generated to allow access to your XML schema.
+ You might want to disable this functionality in release builds for security
+ reasons by putting in the FDEFs below. }
+
+ { ToDo: Rename the Schema reference below to match the name of your Schema component }
+
+ {.$IFDEF RELEASE_BUILD}
+ result := Binary.Create();
+ %SCHEMA%.SaveToStream(result);
+ {.$ELSE}
+ { result := nil; }
+ {.$ENDIF RELEASE_BUILD}
+end;
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROSBDataAbstract.dll b/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROSBDataAbstract.dll
new file mode 100644
index 0000000..1fbd7f2
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROSBDataAbstract.dll differ
diff --git a/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROSBDefaultEditor.dll b/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROSBDefaultEditor.dll
new file mode 100644
index 0000000..b48bc8c
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROSBDefaultEditor.dll differ
diff --git a/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROSBDefaultValidator.dll b/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROSBDefaultValidator.dll
new file mode 100644
index 0000000..6a0387b
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROSBDefaultValidator.dll differ
diff --git a/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROSBDelphi.dll b/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROSBDelphi.dll
new file mode 100644
index 0000000..370a2e2
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROSBDelphi.dll differ
diff --git a/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROSBJSONRPC.dll b/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROSBJSONRPC.dll
new file mode 100644
index 0000000..1f8fd44
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROSBJSONRPC.dll differ
diff --git a/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROSBPHP.dll b/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROSBPHP.dll
new file mode 100644
index 0000000..a8f2dff
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROSBPHP.dll differ
diff --git a/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROSBPasImporter.dll b/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROSBPasImporter.dll
new file mode 100644
index 0000000..a9cfd31
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROSBPasImporter.dll differ
diff --git a/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROSBSOAP.dll b/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROSBSOAP.dll
new file mode 100644
index 0000000..5135236
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROSBSOAP.dll differ
diff --git a/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROSBStandardImporters.dll b/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROSBStandardImporters.dll
new file mode 100644
index 0000000..c4397b0
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROSBStandardImporters.dll differ
diff --git a/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROSBStandardViews.dll b/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROSBStandardViews.dll
new file mode 100644
index 0000000..56ac7b2
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROSBStandardViews.dll differ
diff --git a/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROSBTLBImporter.dll b/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROSBTLBImporter.dll
new file mode 100644
index 0000000..71ad745
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROSBTLBImporter.dll differ
diff --git a/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROServiceBuilder.exe b/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROServiceBuilder.exe
new file mode 100644
index 0000000..fa74c40
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROServiceBuilder.exe differ
diff --git a/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROServiceBuilder3.chm b/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROServiceBuilder3.chm
new file mode 100644
index 0000000..e11e79d
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROServiceBuilder3.chm differ
diff --git a/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROServiceBuilder70.bpl b/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROServiceBuilder70.bpl
new file mode 100644
index 0000000..3b80daf
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROServiceBuilder70.bpl differ
diff --git a/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROServiceTester.exe b/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROServiceTester.exe
new file mode 100644
index 0000000..4a6cf31
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK (Common)/Bin/ROServiceTester.exe differ
diff --git a/official/5.0.30.691/RemObjects SDK (Common)/Bin/RemObjects SDK.lic b/official/5.0.30.691/RemObjects SDK (Common)/Bin/RemObjects SDK.lic
new file mode 100644
index 0000000..c0b4aab
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK (Common)/Bin/RemObjects SDK.lic
@@ -0,0 +1,18 @@
+474fe5ccf051061c9ebc2441b07189a3cb8806b18af7108d8ab2f0dcfa1465a22b935eb78c21c97f6f4cd5cc9b74cf4ab1f043cb7929e3b8622c5a1f5df92d650957c365f83d633b185af1e09f2cd709e640e53a16e136d53eeae15f72f8eb91eb5b807ae9b69b705209bdc2d479caf6ca41314c4c7314c778144c9c937075590a84335fef3fe0947d49806b0f3bffc8e97b6e812587847feaad59a4eabbcfce341f4d7996d9091316d918bc8bbaed17be32641accb104cca64f1103d62a64332908318c263e7673b2c6fb18602ad14d018f1909a96bad609ed708ac85b5b5aeebcc98af9943b2e4570cc84dbc08d4268c352300450f9d576a6966300f280884
+5823e53d38e42e9f2b4f85f3f05bf7cc26892f6bad38d711430d2d9874a69a2288718a97db57b2877b208a3414d35727a42fc104e2d8dde1f4de2300f91966de
+Name=Trial
+Email=Trial
+UserId=Trial
+Company=Trial
+LicenseType=Default
+ProductName=RemObjects SDK
+Version=5
+AllowBeta=0
+Trial=1
+SubscriptionEndDate=2008-05-25
+LicenseFileEndDate=2008-5-24
+StartDate=2008-5-21
+EndDate=2009-2-21
+P1=12874610417274632801
+P2=3651238382776065902
+P3=685899427
diff --git a/official/5.0.30.691/RemObjects SDK (Common)/Bin/rtl70.bpl b/official/5.0.30.691/RemObjects SDK (Common)/Bin/rtl70.bpl
new file mode 100644
index 0000000..ea28d0b
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK (Common)/Bin/rtl70.bpl differ
diff --git a/official/5.0.30.691/RemObjects SDK (Common)/Bin/vcl70.bpl b/official/5.0.30.691/RemObjects SDK (Common)/Bin/vcl70.bpl
new file mode 100644
index 0000000..572cb25
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK (Common)/Bin/vcl70.bpl differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_BPDX_D10.bpl b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_BPDX_D10.bpl
new file mode 100644
index 0000000..3607c81
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_BPDX_D10.bpl differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_BPDX_D10.dcp b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_BPDX_D10.dcp
new file mode 100644
index 0000000..9c8b8d2
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_BPDX_D10.dcp differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_Core_D10.bpl b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_Core_D10.bpl
new file mode 100644
index 0000000..b86b780
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_Core_D10.bpl differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_Core_D10.dcp b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_Core_D10.dcp
new file mode 100644
index 0000000..fa43a5f
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_Core_D10.dcp differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_DataSnap_D10.bpl b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_DataSnap_D10.bpl
new file mode 100644
index 0000000..0764251
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_DataSnap_D10.bpl differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_DataSnap_D10.dcp b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_DataSnap_D10.dcp
new file mode 100644
index 0000000..c48c7ce
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_DataSnap_D10.dcp differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_IDE_D10.bpl b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_IDE_D10.bpl
new file mode 100644
index 0000000..643eac8
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_IDE_D10.bpl differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_IDE_D10.dcp b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_IDE_D10.dcp
new file mode 100644
index 0000000..2d77375
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_IDE_D10.dcp differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_Indy_D10.bpl b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_Indy_D10.bpl
new file mode 100644
index 0000000..5b2b2c7
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_Indy_D10.bpl differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_Indy_D10.dcp b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_Indy_D10.dcp
new file mode 100644
index 0000000..8b1f060
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_Indy_D10.dcp differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_RODX_D10.bpl b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_RODX_D10.bpl
new file mode 100644
index 0000000..86150e7
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_RODX_D10.bpl differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_RODX_D10.dcp b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_RODX_D10.dcp
new file mode 100644
index 0000000..9b97986
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_RODX_D10.dcp differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_Synapse_D10.bpl b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_Synapse_D10.bpl
new file mode 100644
index 0000000..f8ad654
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_Synapse_D10.bpl differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_Synapse_D10.dcp b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_Synapse_D10.dcp
new file mode 100644
index 0000000..3938a81
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_Synapse_D10.dcp differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_WebBroker_D10.bpl b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_WebBroker_D10.bpl
new file mode 100644
index 0000000..050aa19
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_WebBroker_D10.bpl differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_WebBroker_D10.dcp b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_WebBroker_D10.dcp
new file mode 100644
index 0000000..a64fae6
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D10/RemObjects_WebBroker_D10.dcp differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_BPDX_D11.bpl b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_BPDX_D11.bpl
new file mode 100644
index 0000000..5c6503f
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_BPDX_D11.bpl differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_BPDX_D11.dcp b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_BPDX_D11.dcp
new file mode 100644
index 0000000..8b91b66
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_BPDX_D11.dcp differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_Core_D11.bpl b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_Core_D11.bpl
new file mode 100644
index 0000000..b2fa0a9
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_Core_D11.bpl differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_Core_D11.dcp b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_Core_D11.dcp
new file mode 100644
index 0000000..1a54f36
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_Core_D11.dcp differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_DataSnap_D11.bpl b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_DataSnap_D11.bpl
new file mode 100644
index 0000000..4d32ab6
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_DataSnap_D11.bpl differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_DataSnap_D11.dcp b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_DataSnap_D11.dcp
new file mode 100644
index 0000000..e775068
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_DataSnap_D11.dcp differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_IDE_D11.bpl b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_IDE_D11.bpl
new file mode 100644
index 0000000..b7f148b
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_IDE_D11.bpl differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_IDE_D11.dcp b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_IDE_D11.dcp
new file mode 100644
index 0000000..d71bcf8
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_IDE_D11.dcp differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_Indy_D11.bpl b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_Indy_D11.bpl
new file mode 100644
index 0000000..c27e5a2
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_Indy_D11.bpl differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_Indy_D11.dcp b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_Indy_D11.dcp
new file mode 100644
index 0000000..b8abbc7
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_Indy_D11.dcp differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_RODX_D11.bpl b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_RODX_D11.bpl
new file mode 100644
index 0000000..04f7788
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_RODX_D11.bpl differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_RODX_D11.dcp b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_RODX_D11.dcp
new file mode 100644
index 0000000..c6d19d8
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_RODX_D11.dcp differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_Synapse_D11.bpl b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_Synapse_D11.bpl
new file mode 100644
index 0000000..e44cdbb
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_Synapse_D11.bpl differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_Synapse_D11.dcp b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_Synapse_D11.dcp
new file mode 100644
index 0000000..a042de7
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_Synapse_D11.dcp differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_WebBroker_D11.bpl b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_WebBroker_D11.bpl
new file mode 100644
index 0000000..200b678
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_WebBroker_D11.bpl differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_WebBroker_D11.dcp b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_WebBroker_D11.dcp
new file mode 100644
index 0000000..d4b9f19
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D11/RemObjects_WebBroker_D11.dcp differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_BPDX_D6.bpl b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_BPDX_D6.bpl
new file mode 100644
index 0000000..743d153
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_BPDX_D6.bpl differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_BPDX_D6.dcp b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_BPDX_D6.dcp
new file mode 100644
index 0000000..9a0542c
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_BPDX_D6.dcp differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_Core_D6.bpl b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_Core_D6.bpl
new file mode 100644
index 0000000..5e5fe4f
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_Core_D6.bpl differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_Core_D6.dcp b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_Core_D6.dcp
new file mode 100644
index 0000000..d4877e6
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_Core_D6.dcp differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_DataSnap_D6.bpl b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_DataSnap_D6.bpl
new file mode 100644
index 0000000..5893981
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_DataSnap_D6.bpl differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_DataSnap_D6.dcp b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_DataSnap_D6.dcp
new file mode 100644
index 0000000..be41cb0
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_DataSnap_D6.dcp differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_IDE_D6.bpl b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_IDE_D6.bpl
new file mode 100644
index 0000000..acc0881
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_IDE_D6.bpl differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_IDE_D6.dcp b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_IDE_D6.dcp
new file mode 100644
index 0000000..d2a142c
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_IDE_D6.dcp differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_Indy_D6.bpl b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_Indy_D6.bpl
new file mode 100644
index 0000000..508ed46
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_Indy_D6.bpl differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_Indy_D6.dcp b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_Indy_D6.dcp
new file mode 100644
index 0000000..640706c
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_Indy_D6.dcp differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_RODX_D6.bpl b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_RODX_D6.bpl
new file mode 100644
index 0000000..a639f1c
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_RODX_D6.bpl differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_RODX_D6.dcp b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_RODX_D6.dcp
new file mode 100644
index 0000000..0637dde
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_RODX_D6.dcp differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_Synapse_D6.bpl b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_Synapse_D6.bpl
new file mode 100644
index 0000000..78702eb
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_Synapse_D6.bpl differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_Synapse_D6.dcp b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_Synapse_D6.dcp
new file mode 100644
index 0000000..ed04f60
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_Synapse_D6.dcp differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_WebBroker_D6.bpl b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_WebBroker_D6.bpl
new file mode 100644
index 0000000..04a1cbb
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_WebBroker_D6.bpl differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_WebBroker_D6.dcp b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_WebBroker_D6.dcp
new file mode 100644
index 0000000..6796b4b
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D6/RemObjects_WebBroker_D6.dcp differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_BPDX_D7.bpl b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_BPDX_D7.bpl
new file mode 100644
index 0000000..61370b2
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_BPDX_D7.bpl differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_BPDX_D7.dcp b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_BPDX_D7.dcp
new file mode 100644
index 0000000..e510be2
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_BPDX_D7.dcp differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_Core_D7.bpl b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_Core_D7.bpl
new file mode 100644
index 0000000..467b4c0
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_Core_D7.bpl differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_Core_D7.dcp b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_Core_D7.dcp
new file mode 100644
index 0000000..2453df6
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_Core_D7.dcp differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_DataSnap_D7.bpl b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_DataSnap_D7.bpl
new file mode 100644
index 0000000..8bc1648
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_DataSnap_D7.bpl differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_DataSnap_D7.dcp b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_DataSnap_D7.dcp
new file mode 100644
index 0000000..a9dfd07
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_DataSnap_D7.dcp differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_IDE_D7.bpl b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_IDE_D7.bpl
new file mode 100644
index 0000000..5f1e31e
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_IDE_D7.bpl differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_IDE_D7.dcp b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_IDE_D7.dcp
new file mode 100644
index 0000000..e9f1ce9
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_IDE_D7.dcp differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_Indy_D7.bpl b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_Indy_D7.bpl
new file mode 100644
index 0000000..5b9d58d
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_Indy_D7.bpl differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_Indy_D7.dcp b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_Indy_D7.dcp
new file mode 100644
index 0000000..b9b6053
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_Indy_D7.dcp differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_RODX_D7.bpl b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_RODX_D7.bpl
new file mode 100644
index 0000000..7a95595
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_RODX_D7.bpl differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_RODX_D7.dcp b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_RODX_D7.dcp
new file mode 100644
index 0000000..7cb5a54
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_RODX_D7.dcp differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_Synapse_D7.bpl b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_Synapse_D7.bpl
new file mode 100644
index 0000000..91b4564
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_Synapse_D7.bpl differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_Synapse_D7.dcp b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_Synapse_D7.dcp
new file mode 100644
index 0000000..e06f3e4
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_Synapse_D7.dcp differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_WebBroker_D7.bpl b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_WebBroker_D7.bpl
new file mode 100644
index 0000000..2d147b5
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_WebBroker_D7.bpl differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_WebBroker_D7.dcp b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_WebBroker_D7.dcp
new file mode 100644
index 0000000..21ed3b5
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Dcu/D7/RemObjects_WebBroker_D7.dcp differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Help/RemObjects SDK for Delphi.als b/official/5.0.30.691/RemObjects SDK for Delphi/Help/RemObjects SDK for Delphi.als
new file mode 100644
index 0000000..54db7bb
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Help/RemObjects SDK for Delphi.als
@@ -0,0 +1,670 @@
+eroasyncexception
+eroasyncexception_object
+eroasyncnoansweryet
+eroasyncnoansweryet_object
+erochannelbusy
+erochannelbusy_object
+eroexception
+eroexception_object
+eropoolnofreeobjects
+eropoolnofreeobjects_object
+erosendnoresponse
+erosendnoresponse_object
+eroserverexception
+eroserverexception_object
+erosessionexpired
+erosessionexpired_object
+erosessionnotfound
+erosessionnotfound_object
+erounknowntype
+erounknowntype_object
+erounregisteredserverexception
+erounregisteredserverexception_object
+iroasyncinterface
+iroasyncinterface_answerreceived
+iroasyncinterface_answerreceivedevent
+iroasyncinterface_busy
+iroasyncinterface_messageid
+iroasyncinterface_object
+iroeventwriter
+iroeventwriter_excludesender
+iroeventwriter_excludesessionlist
+iroeventwriter_object
+iroeventwriter_sessionlist
+irostream
+irostream_object
+irostream_stream
+irostrings
+irostrings_object
+irostrings_strings
+irotcptransport
+irotcptransport_clientaddress
+irotcptransport_object
+sessionnotfoundexception
+sessionnotfoundexception_object
+troarray
+troarray_clear
+troarray_clone
+troarray_count
+troarray_object
+troarray_resize
+troasyncproxy
+troasyncproxy___interfacename
+troasyncproxy___message
+troasyncproxy___transportchannel
+troasyncproxy_object
+trobaseconnection
+trobaseconnection_encryption
+trobaseconnection_object
+trobinarymemorystream
+trobinarymemorystream_clone
+trobinarymemorystream_loadfromhexstring
+trobinarymemorystream_loadfromstring
+trobinarymemorystream_object
+trobinarymemorystream_tohexstring
+trobinarymemorystream_toreadablestring
+trobinarymemorystream_tostring
+trobinmessage
+trobinmessage_compressionbuffersize
+trobinmessage_minsizeforcompression
+trobinmessage_object
+trobinmessage_oncompress
+trobinmessage_ondecompress
+trobinmessage_usecompression
+trobpdxhttpserver
+trobpdxhttpserver_bpdxserver
+trobpdxhttpserver_object
+trobpdxhttpserver_sendexceptionsas500
+trobpdxhttpserver_serveinfopage
+trobpdxhttpserver_serverodl
+trobpdxhttpserver_supportkeepalive
+trobpdxtcpserver
+trobpdxtcpserver_bpdxserver
+trobpdxtcpserver_object
+trobpdxtcpserver_port
+trobroadcastchannel
+trobroadcastchannel_object
+trobroadcastchannel_onbroadcastresponsereceived
+trobroadcastserver
+trobroadcastserver_object
+trobroadcastserver_onrorequest
+troclassfactory
+troclassfactory_create
+troclassfactory_createinstance
+troclassfactory_object
+troclassfactory_releaseinstance
+trocomplextype
+trocomplextype_clone
+trocomplextype_object
+troconstantmemorystream
+troconstantmemorystream_object
+trocustomdiscoveryclient
+trocustomdiscoveryclient_channel
+trocustomdiscoveryclient_message
+trocustomdiscoveryclient_object
+trocustomdiscoveryclient_ondiscoveryexception
+trocustomdiscoveryclient_onnewserversfound
+trocustomdiscoveryclient_onnewservicefound
+trocustomdiscoveryclient_refreshserverlist
+trocustomdiscoveryclient_serverlist
+trocustomdiscoveryclient_servicename
+trocustomdiscoveryserver
+trocustomdiscoveryserver_object
+trocustomdiscoveryserver_onservicefound
+trocustomdiscoveryserver_serveraddress
+trocustomdiscoveryserver_servicelist
+trocustomdiscoveryserver_supportregisteredserverclasses
+trocustomemailchannel
+trocustomemailchannel_clientemail
+trocustomemailchannel_deleteoldresponses
+trocustomemailchannel_object
+trocustomemailchannel_pop3client
+trocustomemailchannel_pop3password
+trocustomemailchannel_pop3serveraddress
+trocustomemailchannel_pop3username
+trocustomemailchannel_serveremail
+trocustomemailchannel_smtpclient
+trocustomemailchannel_smtpserveraddress
+trocustomemailserver
+trocustomemailserver_object
+trocustomemailserver_onexception
+trocustomemailserver_pop3checkinterval
+trocustomemailserver_pop3client
+trocustomemailserver_pop3password
+trocustomemailserver_pop3serveraddress
+trocustomemailserver_pop3username
+trocustomemailserver_serveremail
+trocustomemailserver_smtpclient
+trocustomemailserver_smtpserveraddress
+trocustomindytcpchannel
+trocustomindytcpchannel_dispatchoptions
+trocustomindytcpchannel_host
+trocustomindytcpchannel_indyclient
+trocustomindytcpchannel_keepalive
+trocustomindytcpchannel_object
+trocustomindytcpchannel_onafterprobingserver
+trocustomindytcpchannel_onafterprobingservers
+trocustomindytcpchannel_onbeforeprobingserver
+trocustomindytcpchannel_onbeforeprobingservers
+trocustomindytcpchannel_onloginneeded
+trocustomindytcpchannel_onreceivestream
+trocustomindytcpchannel_onsendstream
+trocustomindytcpchannel_port
+trocustomindytcpchannel_probefrequency
+trocustomindytcpchannel_probeservers
+trocustomindytcpchannel_serverlocators
+trocustomindytcpchannel_synchronizedprobing
+trocustomindytcpserver
+trocustomindytcpserver_indyserver
+trocustomindytcpserver_keepalive
+trocustomindytcpserver_object
+trocustomindytcpserver_port
+trocustomsessionmanager
+trocustomsessionmanager_checksessionisexpired
+trocustomsessionmanager_clearing
+trocustomsessionmanager_clearsessions
+trocustomsessionmanager_createsession
+trocustomsessionmanager_critical
+trocustomsessionmanager_deletesession
+trocustomsessionmanager_getallsessions
+trocustomsessionmanager_getsessioncount
+trocustomsessionmanager_maxsessions
+trocustomsessionmanager_object
+trocustomsessionmanager_releasesession
+trocustomsessionmanager_sessionduration
+trocustomsupertcpchannel
+trocustomsupertcpchannel_ackwaittimeout
+trocustomsupertcpchannel_active
+trocustomsupertcpchannel_autoreconnect
+trocustomsupertcpchannel_client
+trocustomsupertcpchannel_clientid
+trocustomsupertcpchannel_connected
+trocustomsupertcpchannel_host
+trocustomsupertcpchannel_maxpackagesize
+trocustomsupertcpchannel_object
+trocustomsupertcpchannel_onconnected
+trocustomsupertcpchannel_ondisconnected
+trocustomsupertcpchannel_port
+trocustomsupertcpchannel_reconnectdelay
+trocustomsupertcpchannel_requesttimeout
+trocustomsupertcpchannel_storeactive
+trocustomsupertcpserver
+trocustomsupertcpserver_ackwaittimeout
+trocustomsupertcpserver_maxpackagesize
+trocustomsupertcpserver_object
+trocustomsupertcpserver_port
+trocustomsupertcpserver_server
+trodbsessionmanager
+trodbsessionmanager_clearsessionsdataset
+trodbsessionmanager_clearsessionsoncreate
+trodbsessionmanager_clearsessionsondestroy
+trodbsessionmanager_deletedataset
+trodbsessionmanager_fieldnamecreated
+trodbsessionmanager_fieldnamedata
+trodbsessionmanager_fieldnamelastaccessed
+trodbsessionmanager_fieldnamesessionid
+trodbsessionmanager_getcountdataset
+trodbsessionmanager_insertdataset
+trodbsessionmanager_object
+trodbsessionmanager_onconvertguid
+trodbsessionmanager_selectalldataset
+trodbsessionmanager_selectdataset
+trodbsessionmanager_sessionduration
+trodbsessionmanager_updatedataset
+trodiscoveryclient
+trodiscoveryclient_channel
+trodiscoveryclient_message
+trodiscoveryclient_object
+trodiscoveryclient_ondiscoveryexception
+trodiscoveryclient_onnewserversfound
+trodiscoveryclient_onnewservicefound
+trodiscoveryclient_serverlist
+trodiscoveryclient_servicename
+trodiscoveryoptions
+trodiscoveryoptions_object
+trodiscoveryserver
+trodiscoveryserver_object
+trodiscoveryserver_onservicefound
+trodiscoveryserver_servicelist
+trodiscoveryserver_supportregisteredserverclasses
+trodllchannel
+trodllchannel_dispatchoptions
+trodllchannel_dllhandle
+trodllchannel_dllloaded
+trodllchannel_dllname
+trodllchannel_keepdllloaded
+trodllchannel_object
+trodllchannel_ondllloaded
+trodllchannel_ondllunloaded
+trodllchannel_serverlocators
+trodllchannel_unloaddll
+trodllibrary
+trodllibrary_object
+trodynamicrequest
+trodynamicrequest_execute
+trodynamicrequest_findparam
+trodynamicrequest_isfunction
+trodynamicrequest_methodname
+trodynamicrequest_object
+trodynamicrequest_onafterexecute
+trodynamicrequest_onbeforeexecute
+trodynamicrequest_onchangeservicename
+trodynamicrequest_onexecuteerror
+trodynamicrequest_onfindcustomtypeimplementation
+trodynamicrequest_parambyname
+trodynamicrequest_params
+trodynamicrequest_refreshparams
+trodynamicrequest_remoteservice
+troemailchannel
+troemailchannel_clientemail
+troemailchannel_deleteoldresponses
+troemailchannel_dispatchoptions
+troemailchannel_object
+troemailchannel_onafterprobingserver
+troemailchannel_onafterprobingservers
+troemailchannel_onbeforeprobingserver
+troemailchannel_onbeforeprobingservers
+troemailchannel_onloginneeded
+troemailchannel_onreceivestream
+troemailchannel_onsendstream
+troemailchannel_pop3client
+troemailchannel_pop3password
+troemailchannel_pop3serveraddress
+troemailchannel_pop3username
+troemailchannel_probefrequency
+troemailchannel_probeservers
+troemailchannel_serveremail
+troemailchannel_serverlocators
+troemailchannel_smtpclient
+troemailchannel_smtpserveraddress
+troemailchannel_synchronizedprobing
+troemailserver
+troemailserver_object
+troemailserver_onexception
+troemailserver_pop3checkinterval
+troemailserver_pop3client
+troemailserver_pop3password
+troemailserver_pop3serveraddress
+troemailserver_pop3username
+troemailserver_serveremail
+troemailserver_smtpclient
+troemailserver_smtpserveraddress
+troencryption
+troencryption_object
+troencryption_onafterdecryption
+troencryption_onbeforeencryption
+troeventreceiver
+troeventreceiver_activate
+troeventreceiver_active
+troeventreceiver_areeventhandlersregistered
+troeventreceiver_channel
+troeventreceiver_deactivate
+troeventreceiver_interval
+troeventreceiver_iseventhandlerregistered
+troeventreceiver_message
+troeventreceiver_object
+troeventreceiver_onactivate
+troeventreceiver_ondeactivate
+troeventreceiver_onpollexception
+troeventreceiver_registereventhandlers
+troeventreceiver_releaseobject
+troeventreceiver_retainobject
+troeventreceiver_servicename
+troeventreceiver_synchronizeinvoke
+troeventreceiver_unregistereventhandlers
+troeventrepository
+troeventrepository_message
+troeventrepository_object
+troeventrepository_sessionmanager
+troeventsessionmanager
+troeventsessionmanager_object
+troeventsessionmanager_onclearsessions
+troeventsessionmanager_ondeletesession
+troeventsessionmanager_onfindsession
+troeventsessionmanager_ongetallsessions
+troeventsessionmanager_ongetsessioncount
+troeventsessionmanager_onreleasesession
+troeventsessionmanager_sessionduration
+troindyhttpchannel
+troindyhttpchannel_indyclient
+troindyhttpchannel_keepalive
+troindyhttpchannel_object
+troindyhttpchannel_targeturl
+troindyhttpserver
+troindyhttpserver_indyserver
+troindyhttpserver_keepalive
+troindyhttpserver_object
+troindyhttpserver_port
+troindyhttpserver_sendexceptionsas500
+troindyhttpserver_serveinfopage
+troindyhttpserver_serverodl
+troindytcpchannel
+troindytcpchannel_disablenagle
+troindytcpchannel_host
+troindytcpchannel_indyclient
+troindytcpchannel_keepalive
+troindytcpchannel_object
+troindytcpchannel_port
+troindytcpserver
+troindytcpserver_disablenagle
+troindytcpserver_indyserver
+troindytcpserver_keepalive
+troindytcpserver_object
+troindytcpserver_port
+troindyudpchannel
+troindyudpchannel_asynctimeout
+troindyudpchannel_dispatchoptions
+troindyudpchannel_getresponsebyuid
+troindyudpchannel_host
+troindyudpchannel_indyclient
+troindyudpchannel_object
+troindyudpchannel_onafterprobingserver
+troindyudpchannel_onafterprobingservers
+troindyudpchannel_onasyncresponsetimeout
+troindyudpchannel_onbeforeprobingserver
+troindyudpchannel_onbeforeprobingservers
+troindyudpchannel_onloginneeded
+troindyudpchannel_onreceivestream
+troindyudpchannel_onsendstream
+troindyudpchannel_port
+troindyudpchannel_probefrequency
+troindyudpchannel_probeservers
+troindyudpchannel_serverlocators
+troindyudpchannel_synchronizedprobing
+troindyudpserver
+troindyudpserver_indyudpserver
+troindyudpserver_object
+troindyudpserver_port
+troinmemoryeventrepository
+troinmemoryeventrepository_object
+troinmemorysessionmanager
+troinmemorysessionmanager_object
+troinmemorysessionmanager_sessionduration
+trolocalchannel
+trolocalchannel_dispatchoptions
+trolocalchannel_object
+trolocalchannel_onloginneeded
+trolocalchannel_onreceivestream
+trolocalchannel_onsendstream
+trolocalchannel_serverchannel
+trolocalchannel_serverlocators
+trolocalserver
+trolocalserver_active
+trolocalserver_object
+tromasterservereventrepository
+tromasterservereventrepository_channel
+tromasterservereventrepository_object
+tromasterservereventrepository_sessionmanager
+tromasterserversessionmanager
+tromasterserversessionmanager_channel
+tromasterserversessionmanager_object
+tromessage
+tromessage_clientid
+tromessage_interfacename
+tromessage_messagename
+tromessage_object
+tromessage_onfinalizemessage
+tromessage_oninitializemessage
+tromessage_onreadfromstream
+tromessage_onreadmessageparameter
+tromessage_onserverexception
+tromessage_onwriteexception
+tromessage_onwritemessageparameter
+tromessage_onwritetostream
+tromessagedispatcher
+tromessagedispatcher_enabled
+tromessagedispatcher_message
+tromessagedispatcher_name
+tromessagedispatcher_object
+tronamedpipechannel
+tronamedpipechannel_activateondemand
+tronamedpipechannel_active
+tronamedpipechannel_dispatchoptions
+tronamedpipechannel_object
+tronamedpipechannel_onafterprobingserver
+tronamedpipechannel_onafterprobingservers
+tronamedpipechannel_onbeforeprobingserver
+tronamedpipechannel_onbeforeprobingservers
+tronamedpipechannel_onloginneeded
+tronamedpipechannel_onreceivestream
+tronamedpipechannel_onsendstream
+tronamedpipechannel_probefrequency
+tronamedpipechannel_probeservers
+tronamedpipechannel_serverid
+tronamedpipechannel_serverlocators
+tronamedpipechannel_servername
+tronamedpipechannel_synchronizedprobing
+tronamedpipeserver
+tronamedpipeserver_alloweveryone
+tronamedpipeserver_object
+tronamedpipeserver_serverid
+troperclientclassfactory
+troperclientclassfactory_object
+troperclientclassfactory_timeoutsessions
+tropooledclassfactory
+tropooledclassfactory_clearpool
+tropooledclassfactory_create
+tropooledclassfactory_object
+tropostmessage
+tropostmessage_binarytype
+tropostmessage_object
+tropoweredbyremobjectsbutton
+tropoweredbyremobjectsbutton_applicationtype
+tropoweredbyremobjectsbutton_object
+troproxy
+troproxy___interfacename
+troproxy___message
+troproxy___transportchannel
+troproxy_object
+troremotedatamodule
+troremotedatamodule_clientid
+troremotedatamodule_eventrepository
+troremotedatamodule_newsession
+troremotedatamodule_object
+troremotedatamodule_onactivate
+troremotedatamodule_ondeactivate
+troremotedatamodule_requiressession
+troremotedatamodule_session
+troremotedatamodule_sessionmanager
+troremotedatamodule_synchronize
+troremotedatamodule_transport
+troremoteservice
+troremoteservice_cacherodl
+troremoteservice_channel
+troremoteservice_getrodllibrary
+troremoteservice_getservicemethods
+troremoteservice_getservicenames
+troremoteservice_message
+troremoteservice_object
+troremoteservice_servicename
+trorequestparam
+trorequestparam_asbinary
+trorequestparam_asboolean
+trorequestparam_ascomplextype
+trorequestparam_ascurrency
+trorequestparam_asdatetime
+trorequestparam_asfloat
+trorequestparam_asint64
+trorequestparam_asinteger
+trorequestparam_asstring
+trorequestparam_asvariant
+trorequestparam_aswidestring
+trorequestparam_clearvalue
+trorequestparam_datatype
+trorequestparam_flag
+trorequestparam_isnull
+trorequestparam_name
+trorequestparam_object
+trorequestparam_ownsbinary
+trorequestparam_ownscomplextype
+trorequestparam_typename
+trorequestparam_value
+trorequestparamcollection
+trorequestparamcollection_add
+trorequestparamcollection_clearinputvalues
+trorequestparamcollection_clearoutputvalues
+trorequestparamcollection_clearvalues
+trorequestparamcollection_findparam
+trorequestparamcollection_hasresultparam
+trorequestparamcollection_items
+trorequestparamcollection_object
+trorequestparamcollection_parambyname
+trorequestparamcollection_resultparam
+troserver
+troserver_active
+troserver_dispatchers
+troserver_object
+troserver_onafterserveractivate
+troserver_onafterserverdeactivate
+troserver_onbeforeserveractivate
+troserver_onbeforeserverdeactivate
+troserver_onreadfromstream
+troserver_onwritetostream
+troserverlocator
+troserverlocator_disableonfailure
+troserverlocator_enabled
+troserverlocator_host
+troserverlocator_loadbalancingserver
+troserverlocator_name
+troserverlocator_object
+troserverlocator_onenabledchanged
+troserverlocator_port
+troserverlocator_probingoptions
+troservice
+troservice_object
+trosession
+trosession_count
+trosession_created
+trosession_lastaccessed
+trosession_names
+trosession_object
+trosession_sessionid
+trosession_values
+trosingletonclassfactory
+trosingletonclassfactory_object
+trosoapmessage
+trosoapmessage_bodynode
+trosoapmessage_customlocation
+trosoapmessage_envelopenode
+trosoapmessage_faultnode
+trosoapmessage_headernode
+trosoapmessage_messagenode
+trosoapmessage_object
+trosoapmessage_onenvelopecomplete
+trosoapmessage_onsoapfault
+trosoapmessage_onwriteenvelopeattribute
+trosoapmessage_serializationoptions
+trosupertcpchannel
+trosupertcpchannel_ackwaittimeout
+trosupertcpchannel_active
+trosupertcpchannel_autoreconnect
+trosupertcpchannel_dispatchoptions
+trosupertcpchannel_host
+trosupertcpchannel_maxpackagesize
+trosupertcpchannel_object
+trosupertcpchannel_onafterprobingserver
+trosupertcpchannel_onafterprobingservers
+trosupertcpchannel_onbeforeprobingserver
+trosupertcpchannel_onbeforeprobingservers
+trosupertcpchannel_onconnected
+trosupertcpchannel_ondisconnected
+trosupertcpchannel_onloginneeded
+trosupertcpchannel_onreceivestream
+trosupertcpchannel_onsendstream
+trosupertcpchannel_port
+trosupertcpchannel_probefrequency
+trosupertcpchannel_probeservers
+trosupertcpchannel_reconnectdelay
+trosupertcpchannel_requesttimeout
+trosupertcpchannel_serverlocators
+trosupertcpchannel_storeactive
+trosupertcpchannel_synchronizedprobing
+trosupertcpserver
+trosupertcpserver_ackwaittimeout
+trosupertcpserver_maxpackagesize
+trosupertcpserver_object
+trosupertcpserver_port
+trosynapsehttpchannel
+trosynapsehttpchannel_dispatchoptions
+trosynapsehttpchannel_http
+trosynapsehttpchannel_keepalive
+trosynapsehttpchannel_object
+trosynapsehttpchannel_onafterprobingserver
+trosynapsehttpchannel_onafterprobingservers
+trosynapsehttpchannel_onbeforeprobingserver
+trosynapsehttpchannel_onbeforeprobingservers
+trosynapsehttpchannel_onloginneeded
+trosynapsehttpchannel_onreceivestream
+trosynapsehttpchannel_onsendstream
+trosynapsehttpchannel_probefrequency
+trosynapsehttpchannel_probeservers
+trosynapsehttpchannel_serverlocators
+trosynapsehttpchannel_synchronizedprobing
+trosynapsehttpchannel_targeturl
+trosynchronizedsingletonclassfactory
+trosynchronizedsingletonclassfactory_object
+trotransportchannel
+trotransportchannel_busy
+trotransportchannel_currentlocator
+trotransportchannel_dispatchoptions
+trotransportchannel_object
+trotransportchannel_onafterprobingserver
+trotransportchannel_onafterprobingservers
+trotransportchannel_onbeforeprobingserver
+trotransportchannel_onbeforeprobingservers
+trotransportchannel_onexception
+trotransportchannel_onloginneeded
+trotransportchannel_onprogress
+trotransportchannel_onreceivestream
+trotransportchannel_onsendstream
+trotransportchannel_probefrequency
+trotransportchannel_probeservers
+trotransportchannel_serverlocators
+trotransportchannel_synchronizedprobing
+trowebbrokerserver
+trowebbrokerserver_object
+trowebbrokerserver_sendexceptionsas500
+trowininethttpchannel
+trowininethttpchannel_dispatchoptions
+trowininethttpchannel_login
+trowininethttpchannel_object
+trowininethttpchannel_onafterprobingserver
+trowininethttpchannel_onafterprobingservers
+trowininethttpchannel_onbeforeprobingserver
+trowininethttpchannel_onbeforeprobingservers
+trowininethttpchannel_onloginneeded
+trowininethttpchannel_onprogress
+trowininethttpchannel_onreceivestream
+trowininethttpchannel_onsendstream
+trowininethttpchannel_probefrequency
+trowininethttpchannel_probeservers
+trowininethttpchannel_serverlocators
+trowininethttpchannel_synchronizedprobing
+trowininethttpchannel_targeturl
+trowininethttpchannel_timeout
+trowininethttpchannel_useragent
+trowinmessagechannel
+trowinmessagechannel_defaultdirectory
+trowinmessagechannel_delay
+trowinmessagechannel_dispatchoptions
+trowinmessagechannel_filename
+trowinmessagechannel_object
+trowinmessagechannel_onafterprobingserver
+trowinmessagechannel_onafterprobingservers
+trowinmessagechannel_onbeforeprobingserver
+trowinmessagechannel_onbeforeprobingservers
+trowinmessagechannel_onloginneeded
+trowinmessagechannel_onreceivestream
+trowinmessagechannel_onsendstream
+trowinmessagechannel_parameters
+trowinmessagechannel_probefrequency
+trowinmessagechannel_probeservers
+trowinmessagechannel_serverid
+trowinmessagechannel_serverlocators
+trowinmessagechannel_startserver
+trowinmessagechannel_synchronizedprobing
+trowinmessageserver
+trowinmessageserver_object
+trowinmessageserver_serverid
+troxmlrpcmessage
+troxmlrpcmessage_object
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Help/RemObjects SDK for Delphi.cnt b/official/5.0.30.691/RemObjects SDK for Delphi/Help/RemObjects SDK for Delphi.cnt
new file mode 100644
index 0000000..cf91427
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Help/RemObjects SDK for Delphi.cnt
@@ -0,0 +1,830 @@
+:Base RemObjects SDK for Delphi.hlp>MAIN
+:Title RemObjects SDK for Delphi
+1 Welcome to RemObjects SDK
+2 Welcome to RemObjects SDK=id_1
+2 What's New in RemObjects SDK
+3 What's New in RemObjects SDK=id_7
+3 Breaking Changes=id_9
+2 Overview of RO Components
+3 Overview of RO Components=id_2
+1 TROEncryption.UseCompression
+2 TROEncryption.UseCompression=id_20
+1 TROEncryption.EncryptionMethod
+2 TROEncryption.EncryptionMethod=id_21
+1 TROEncryption.EncryptionRecvKey
+2 TROEncryption.EncryptionRecvKey=id_25
+1 TROEncryption.EncryptionSendKey
+2 TROEncryption.EncryptionSendKey=id_24
+1 Programming with RemObjects SDK
+2 Programming with RemObjects SDK=id_3
+2 Concepts
+3 Concepts=id_29
+3 Channels
+4 Channels=id_16
+4 Compatible Channels=id_56
+4 HTTP Channels=id_47
+4 Super TCP Channel=id_48
+4 Legacy TCP Channels=id_49
+4 Email Channels=id_50
+4 Local Channels=id_51
+4 UDP and Broadcast Channels=id_52
+4 Named Pipe Channel=id_53
+4 WinMessage Channel=id_54
+3 Messages
+4 Messages=id_17
+4 BinMessage=id_22
+4 SOAP Message=id_86
+4 XML-RPC Message=id_87
+4 PostMessage=id_88
+3 Class Factories
+4 Class Factories=id_40
+4 Standard Class Factory=id_96
+4 Singleton Class Factory=id_97
+4 Pooled Class Factory=id_98
+4 Per-Client Class Factory=id_99
+3 Statelessness
+4 Statelessness=id_41
+3 Session Management
+4 Session Management=id_18
+4 In-Memory Session Manager=id_108
+4 Database Session Manager=id_109
+4 Master Server Session Manager=id_110
+4 Event-Driven Session Manager=id_111
+4 Session Management in TRORemoteDataModule=id_114
+3 Login and Authentication
+4 Login and Authentication=id_42
+3 RODL Files
+4 RODL Files=id_36
+4 Files Generated from RODL=id_37
+3 Data Types
+4 Data Types=id_43
+3 Smart Services
+4 Smart Services=id_44
+3 Asynchronous Calls
+4 Asynchronous Calls=id_45
+3 Event Sinks and Server Callbacks
+4 Event Sinks and Server Callbacks=id_19
+3 Service Discovery
+4 Service Discovery=id_46
+2 IDE Integration
+3 The RemObjects Menu=id_33
+3 New Project Templates
+4 New Project Templates=id_34
+4 The New RemObjects SDK Server Dialog=id_156
+3 Importing Services
+4 Importing Services=id_35
+1 Tools
+2 Service Builder
+3 Service Builder=id_4
+3 Welcome to Service Builder=id_164
+3 Getting Started with Service Builder=id_165
+3 Service Builder Plugins=id_171
+3 Service Builder Toolbar Commands=id_173
+3 Building a Library
+4 Building a Library=id_161
+4 Reusing Existing Libraries
+5 Reusing Existing Libraries=id_175
+5 Using Existing Libraries=id_170
+5 Importing Libraries
+6 Importing Libraries=id_174
+6 Import SOAP Web Service (WSDL)=id_186
+6 Import RemObjects SDK Service (RODL)=id_187
+4 Structs
+5 Structs=id_127
+4 Enums
+5 Enums=id_167
+4 Arrays
+5 Arrays=id_126
+4 Services
+5 Services=id_166
+4 Event Sinks
+5 Event Sinks=id_169
+4 Exceptions
+5 Exceptions=id_168
+4 Documentation Editor
+5 Documentation Editor=id_183
+3 Generating Access to your Library
+4 Generating Access to your Library=id_162
+4 Validating the Library=id_179
+4 RODL=id_176
+4 WSDL=id_177
+4 Source Code=id_178
+4 Docs=id_181
+3 Command Line Switches
+4 Command Line Switches=id_180
+3 Writing Plugins
+4 Writing Plugins=id_172
+1 RemObjects SDK Reference
+2 RemObjects SDK Reference=id_5
+2 Classes
+3 EROAsyncException Class=id_190
+3 EROAsyncNoAnswerYet Class=id_133
+3 EROChannelBusy Class=id_191
+3 EROException Class=id_192
+3 EROPoolNoFreeObjects Class=id_193
+3 EROUnregisteredServerException Class=id_195
+3 EROSendNoResponse Class=id_197
+3 EROServerException Class=id_198
+3 EROSessionExpired Class=id_199
+3 EROSessionNotFound Class=id_119
+3 EROUnknownType Class=id_201
+3 SessionNotFoundException Class=id_202
+3 TROArray Class
+4 TROArray Class=id_203
+4 TROArray.Count Property=id_294
+4 TROArray.Clear Method=id_289
+4 TROArray.Clone Method=id_290
+4 TROArray.Resize Method=id_291
+3 TROAsyncProxy Class
+4 TROAsyncProxy Class=id_135
+4 TROAsyncProxy.__InterfaceName Property=id_304
+4 TROAsyncProxy.__Message Property=id_305
+4 TROAsyncProxy.__TransportChannel Property=id_306
+3 TROBaseConnection Class
+4 TROBaseConnection Class=id_204
+4 TROBaseConnection.Encryption Property=id_219
+3 TRODiscoveryOptions Class
+4 TRODiscoveryOptions Class=id_153
+3 TROBinaryMemoryStream Class
+4 TROBinaryMemoryStream Class=id_125
+4 TROBinaryMemoryStream.Clone Method=id_326
+4 TROBinaryMemoryStream.LoadFromHexString Method=id_327
+4 TROBinaryMemoryStream.LoadFromString Method=id_328
+4 TROBinaryMemoryStream.ToHexString Method=id_329
+4 TROBinaryMemoryStream.ToReadableString Method=id_330
+4 TROBinaryMemoryStream.ToString Method=id_331
+3 TROBinMessage Class
+4 TROBinMessage Class=id_85
+4 TROBinMessage.CompressionBufferSize Property=id_346
+4 TROBinMessage.MinSizeForCompression Property=id_342
+4 TROBinMessage.OnCompress Event=id_358
+4 TROBinMessage.OnDecompress Event=id_359
+4 TROBinMessage.UseCompression Property=id_347
+3 TROBPDXHTTPServer Class
+4 TROBPDXHTTPServer Class=id_61
+4 TROBPDXHTTPServer.BPDXServer Property=id_380
+4 TROBPDXHTTPServer.SendExceptionsAs500 Property=id_381
+4 TROBPDXHTTPServer.ServeInfoPage Property=id_382
+4 TROBPDXHTTPServer.ServeRodl Property=id_383
+4 TROBPDXHTTPServer.SupportKeepAlive Property=id_384
+3 TROBPDXTCPServer Class
+4 TROBPDXTCPServer Class=id_68
+4 TROBPDXTCPServer.BPDXServer Property=id_379
+4 TROBPDXTCPServer.Port Property=id_370
+3 TROBroadcastChannel Class
+4 TROBroadcastChannel Class=id_77
+4 TROBroadcastChannel.OnBroadcastResponseReceived Event=id_207
+3 TROBroadcastServer Class
+4 TROBroadcastServer Class=id_79
+4 TROBroadcastServer.OnRORequest Property=id_456
+3 TROClassFactory Class
+4 TROClassFactory Class=id_101
+4 TROClassFactory.Create Constructor=id_465
+4 TROClassFactory.CreateInstance Method=id_466
+4 TROClassFactory.ReleaseInstance Method=id_467
+3 TROComplexType Class
+4 TROComplexType Class=id_208
+4 TROComplexType.Clone Method=id_288
+3 TROConstantMemoryStream Class
+4 TROConstantMemoryStream Class=id_209
+3 TROCustomDiscoveryClient Class
+4 TROCustomDiscoveryClient Class=id_210
+4 TROCustomDiscoveryClient.Channel Property=id_145
+4 TROCustomDiscoveryClient.Message Property=id_146
+4 TROCustomDiscoveryClient.OnDiscoveryException Event=id_493
+4 TROCustomDiscoveryClient.OnNewServersFound Property=id_490
+4 TROCustomDiscoveryClient.OnNewServiceFound Event=id_494
+4 TROCustomDiscoveryClient.ServerList Property=id_152
+4 TROCustomDiscoveryClient.ServiceName Property=id_150
+4 TROCustomDiscoveryClient.RefreshServerList Method=id_151
+3 TROCustomDiscoveryServer Class
+4 TROCustomDiscoveryServer Class=id_211
+4 TROCustomDiscoveryServer.OnServiceFound Event=id_149
+4 TROCustomDiscoveryServer.ServerAddress Property=id_508
+4 TROCustomDiscoveryServer.ServiceList Property=id_148
+4 TROCustomDiscoveryServer.SupportRegisteredServerClasses Property=id_147
+3 TROCustomEmailChannel Class
+4 TROCustomEmailChannel Class=id_212
+4 TROCustomEmailChannel.ClientEmail Property=id_525
+4 TROCustomEmailChannel.DeleteOldResponses Property=id_528
+4 TROCustomEmailChannel.Pop3Client Property=id_529
+4 TROCustomEmailChannel.Pop3Password Property=id_523
+4 TROCustomEmailChannel.Pop3ServerAddress Property=id_521
+4 TROCustomEmailChannel.Pop3Username Property=id_522
+4 TROCustomEmailChannel.ServerEmail Property=id_526
+4 TROCustomEmailChannel.SmtpClient Property=id_530
+4 TROCustomEmailChannel.SmtpServerAddress Property=id_524
+3 TROCustomEmailServer Class
+4 TROCustomEmailServer Class=id_213
+4 TROCustomEmailServer.OnException Event=id_557
+4 TROCustomEmailServer.Pop3CheckInterval Property=id_552
+4 TROCustomEmailServer.Pop3Client Property=id_553
+4 TROCustomEmailServer.Pop3Password Property=id_548
+4 TROCustomEmailServer.Pop3ServerAddress Property=id_543
+4 TROCustomEmailServer.Pop3Username Property=id_547
+4 TROCustomEmailServer.ServerEmail Property=id_550
+4 TROCustomEmailServer.SmtpClient Property=id_554
+4 TROCustomEmailServer.SmtpServerAddress Property=id_549
+3 TROCustomIndyTCPChannel Class
+4 TROCustomIndyTCPChannel Class=id_214
+4 TROCustomIndyTCPChannel.DispatchOptions Property=id_574
+4 TROCustomIndyTCPChannel.Host Property=id_572
+4 TROCustomIndyTCPChannel.IndyClient Property=id_575
+4 TROCustomIndyTCPChannel.KeepAlive Property=id_576
+4 TROCustomIndyTCPChannel.OnAfterProbingServer Event=id_583
+4 TROCustomIndyTCPChannel.OnAfterProbingServers Event=id_584
+4 TROCustomIndyTCPChannel.OnBeforeProbingServer Event=id_585
+4 TROCustomIndyTCPChannel.OnBeforeProbingServers Event=id_586
+4 TROCustomIndyTCPChannel.OnLoginNeeded Event=id_587
+4 TROCustomIndyTCPChannel.OnReceiveStream Event=id_588
+4 TROCustomIndyTCPChannel.OnSendStream Event=id_589
+4 TROCustomIndyTCPChannel.Port Property=id_407
+4 TROCustomIndyTCPChannel.ProbeFrequency Property=id_577
+4 TROCustomIndyTCPChannel.ProbeServers Property=id_578
+4 TROCustomIndyTCPChannel.ServerLocators Property=id_579
+4 TROCustomIndyTCPChannel.SynchronizedProbing Property=id_580
+3 TROCustomIndyTCPServer Class
+4 TROCustomIndyTCPServer Class=id_215
+4 TROCustomIndyTCPServer.IndyServer Property=id_611
+4 TROCustomIndyTCPServer.KeepAlive Property=id_396
+4 TROCustomIndyTCPServer.Port Property=id_452
+3 TROCustomSessionManager Class
+4 TROCustomSessionManager Class=id_112
+4 TROCustomSessionManager.Clearing Property=id_624
+4 TROCustomSessionManager.Critical Property=id_625
+4 TROCustomSessionManager.MaxSessions Property=id_622
+4 TROCustomSessionManager.SessionDuration Property=id_621
+4 TROCustomSessionManager.CheckSessionIsExpired Method=id_628
+4 TROCustomSessionManager.ClearSessions Method=id_629
+4 TROCustomSessionManager.CreateSession Method=id_630
+4 TROCustomSessionManager.DeleteSession Method=id_631
+4 TROCustomSessionManager.GetAllSessions Method=id_632
+4 TROCustomSessionManager.GetSessionCount Method=id_633
+4 TROCustomSessionManager.ReleaseSession Method=id_634
+3 TROCustomSuperTcpChannel Class
+4 TROCustomSuperTcpChannel Class=id_216
+4 TROCustomSuperTcpChannel.AckWaitTimeout Property=id_645
+4 TROCustomSuperTcpChannel.Active Property=id_646
+4 TROCustomSuperTcpChannel.AutoReconnect Property=id_647
+4 TROCustomSuperTcpChannel.Client Property=id_648
+4 TROCustomSuperTcpChannel.ClientID Property=id_649
+4 TROCustomSuperTcpChannel.Connected Property=id_650
+4 TROCustomSuperTcpChannel.Host Property=id_642
+4 TROCustomSuperTcpChannel.MaxPackageSize Property=id_651
+4 TROCustomSuperTcpChannel.OnConnected Property=id_652
+4 TROCustomSuperTcpChannel.OnDisconnected Property=id_653
+4 TROCustomSuperTcpChannel.Port Property=id_643
+4 TROCustomSuperTcpChannel.ReconnectDelay Property=id_654
+4 TROCustomSuperTcpChannel.RequestTimeout Property=id_655
+4 TROCustomSuperTcpChannel.StoreActive Property=id_656
+3 TROCustomSuperTcpServer Class
+4 TROCustomSuperTcpServer Class=id_217
+4 TROCustomSuperTcpServer.AckWaitTimeout Property=id_678
+4 TROCustomSuperTcpServer.MaxPackageSize Property=id_679
+4 TROCustomSuperTcpServer.Port Property=id_676
+4 TROCustomSuperTcpServer.Server Property=id_680
+3 TRODBSessionManager Class
+4 TRODBSessionManager Class=id_10
+4 TRODBSessionManager.ClearSessionsDataset Property=id_11
+4 TRODBSessionManager.ClearSessionsOnCreate Property=id_700
+4 TRODBSessionManager.ClearSessionsOnDestroy Property=id_701
+4 TRODBSessionManager.DeleteDataset Property=id_694
+4 TRODBSessionManager.FieldNameCreated Property=id_697
+4 TRODBSessionManager.FieldNameData Property=id_696
+4 TRODBSessionManager.FieldNameLastAccessed Property=id_698
+4 TRODBSessionManager.FieldNameSessionID Property=id_695
+4 TRODBSessionManager.GetCountDataset Property=id_702
+4 TRODBSessionManager.InsertDataset Property=id_692
+4 TRODBSessionManager.OnConvertGUID Event=id_709
+4 TRODBSessionManager.SelectAllDataset Property=id_703
+4 TRODBSessionManager.SelectDataset Property=id_691
+4 TRODBSessionManager.SessionDuration Property=id_704
+4 TRODBSessionManager.UpdateDataset Property=id_693
+3 TRODiscoveryClient Class
+4 TRODiscoveryClient Class=id_143
+4 TRODiscoveryClient.Channel Property=id_730
+4 TRODiscoveryClient.Message Property=id_731
+4 TRODiscoveryClient.OnDiscoveryException Event=id_737
+4 TRODiscoveryClient.OnNewServersFound Property=id_732
+4 TRODiscoveryClient.OnNewServiceFound Event=id_738
+4 TRODiscoveryClient.ServerList Property=id_733
+4 TRODiscoveryClient.ServiceName Property=id_734
+3 TRODiscoveryServer Class
+4 TRODiscoveryServer Class=id_144
+4 TRODiscoveryServer.OnServiceFound Event=id_751
+4 TRODiscoveryServer.ServiceList Property=id_754
+4 TRODiscoveryServer.SupportRegisteredServerClasses Property=id_755
+3 TRODLLChannel Class
+4 TRODLLChannel Class=id_73
+4 TRODLLChannel.DispatchOptions Property=id_766
+4 TRODLLChannel.DLLHandle Property=id_767
+4 TRODLLChannel.DLLLoaded Property=id_768
+4 TRODLLChannel.DLLName Property=id_764
+4 TRODLLChannel.KeepDLLLoaded Property=id_769
+4 TRODLLChannel.OnDLLLoaded Event=id_774
+4 TRODLLChannel.OnDLLUnloaded Property=id_770
+4 TRODLLChannel.ServerLocators Property=id_771
+4 TRODLLChannel.UnloadDLL Method=id_777
+3 TRODLLibrary Class
+4 TRODLLibrary Class=id_121
+3 TRODynamicRequest Class
+4 TRODynamicRequest Class=id_14
+4 TRODynamicRequest.IsFunction Property=id_798
+4 TRODynamicRequest.MethodName Property=id_794
+4 TRODynamicRequest.OnAfterExecute Event=id_801
+4 TRODynamicRequest.OnBeforeExecute Event=id_802
+4 TRODynamicRequest.OnChangeServiceName Event=id_803
+4 TRODynamicRequest.OnExecuteError Event=id_804
+4 TRODynamicRequest.OnFindCustomTypeImplementation Event=id_805
+4 TRODynamicRequest.Params Property=id_795
+4 TRODynamicRequest.RemoteService Property=id_793
+4 TRODynamicRequest.Execute Method=id_796
+4 TRODynamicRequest.FindParam Method=id_808
+4 TRODynamicRequest.ParamByName Method=id_810
+4 RefreshParams Method
+5 RefreshParams Method=id_811
+5 TRODynamicRequest.RefreshParams Method (TRODLOperation, boolean)=id_825
+5 TRODynamicRequest.RefreshParams Method (boolean)=id_826
+3 TROEmailChannel Class
+4 TROEmailChannel Class=id_70
+4 TROEmailChannel.ClientEmail Property=id_831
+4 TROEmailChannel.DeleteOldResponses Property=id_832
+4 TROEmailChannel.DispatchOptions Property=id_833
+4 TROEmailChannel.OnAfterProbingServer Event=id_847
+4 TROEmailChannel.OnAfterProbingServers Event=id_848
+4 TROEmailChannel.OnBeforeProbingServer Event=id_849
+4 TROEmailChannel.OnBeforeProbingServers Event=id_850
+4 TROEmailChannel.OnLoginNeeded Event=id_851
+4 TROEmailChannel.OnReceiveStream Event=id_852
+4 TROEmailChannel.OnSendStream Event=id_853
+4 TROEmailChannel.Pop3Client Property=id_834
+4 TROEmailChannel.Pop3Password Property=id_835
+4 TROEmailChannel.Pop3ServerAddress Property=id_836
+4 TROEmailChannel.Pop3Username Property=id_837
+4 TROEmailChannel.ProbeFrequency Property=id_838
+4 TROEmailChannel.ProbeServers Property=id_839
+4 TROEmailChannel.ServerEmail Property=id_840
+4 TROEmailChannel.ServerLocators Property=id_841
+4 TROEmailChannel.SmtpClient Property=id_842
+4 TROEmailChannel.SmtpServerAddress Property=id_843
+4 TROEmailChannel.SynchronizedProbing Property=id_844
+3 TROEmailServer Class
+4 TROEmailServer Class=id_71
+4 TROEmailServer.OnException Event=id_890
+4 TROEmailServer.Pop3CheckInterval Property=id_880
+4 TROEmailServer.Pop3Client Property=id_881
+4 TROEmailServer.Pop3Password Property=id_882
+4 TROEmailServer.Pop3ServerAddress Property=id_883
+4 TROEmailServer.Pop3Username Property=id_884
+4 TROEmailServer.ServerEmail Property=id_885
+4 TROEmailServer.SmtpClient Property=id_886
+4 TROEmailServer.SmtpServerAddress Property=id_887
+3 TROEncryption Class
+4 TROEncryption Class=id_218
+4 TROEncryption.OnAfterDecryption Event=id_906
+4 TROEncryption.OnBeforeEncryption Event=id_907
+3 TROEventReceiver Class
+4 TROEventReceiver Class=id_137
+4 TROEventReceiver.Active Property=id_918
+4 TROEventReceiver.Channel Property=id_915
+4 TROEventReceiver.Interval Property=id_919
+4 TROEventReceiver.Message Property=id_916
+4 TROEventReceiver.OnActivate Property=id_923
+4 TROEventReceiver.OnDeactivate Property=id_924
+4 TROEventReceiver.OnPollException Event=id_921
+4 TROEventReceiver.ServiceName Property=id_917
+4 TROEventReceiver.SynchronizeInvoke Property=id_920
+4 TROEventReceiver.Activate Method=id_929
+4 TROEventReceiver.AreEventHandlersRegistered Method=id_930
+4 TROEventReceiver.Deactivate Method=id_931
+4 TROEventReceiver.IsEventHandlerRegistered Method=id_932
+4 TROEventReceiver.RegisterEventHandlers Method=id_138
+4 TROEventReceiver.ReleaseObject Method=id_933
+4 TROEventReceiver.RetainObject Method=id_934
+4 TROEventReceiver.UnregisterEventHandlers Method=id_935
+3 TROEventRepository Class
+4 TROEventRepository Class=id_139
+4 TROEventRepository.Message Property=id_951
+4 TROEventRepository.SessionManager Property=id_952
+3 TROEventSessionManager Class
+4 TROEventSessionManager Class=id_12
+4 TROEventSessionManager.OnClearSessions Event=id_969
+4 TROEventSessionManager.OnDeleteSession Event=id_962
+4 TROEventSessionManager.OnFindSession Event=id_13
+4 TROEventSessionManager.OnGetAllSessions Event=id_970
+4 TROEventSessionManager.OnGetSessionCount Event=id_971
+4 TROEventSessionManager.OnReleaseSession Event=id_961
+4 TROEventSessionManager.SessionDuration Property=id_964
+3 TROIndyHTTPChannel Class
+4 TROIndyHTTPChannel Class=id_58
+4 TROIndyHTTPChannel.IndyClient Property=id_985
+4 TROIndyHTTPChannel.KeepAlive Property=id_986
+4 TROIndyHTTPChannel.TargetURL Property=id_987
+3 TROIndyHTTPServer Class
+4 TROIndyHTTPServer Class=id_60
+4 TROIndyHTTPServer.IndyServer Property=id_998
+4 TROIndyHTTPServer.KeepAlive Property=id_999
+4 TROIndyHTTPServer.Port Property=id_609
+4 TROIndyHTTPServer.SendExceptionsAs500 Property=id_1000
+4 TROIndyHTTPServer.ServeInfoPage Property=id_1001
+4 TROIndyHTTPServer.ServeRodl Property=id_1002
+3 TROIndyTCPChannel Class
+4 TROIndyTCPChannel Class=id_66
+4 TROIndyTCPChannel.DisableNagle Property=id_1014
+4 TROIndyTCPChannel.Host Property=id_1015
+4 TROIndyTCPChannel.IndyClient Property=id_1016
+4 TROIndyTCPChannel.KeepAlive Property=id_1017
+4 TROIndyTCPChannel.Port Property=id_1018
+3 TROIndyTCPServer Class
+4 TROIndyTCPServer Class=id_67
+4 TROIndyTCPServer.DisableNagle Property=id_1029
+4 TROIndyTCPServer.IndyServer Property=id_1030
+4 TROIndyTCPServer.KeepAlive Property=id_1031
+4 TROIndyTCPServer.Port Property=id_1032
+3 TROIndyUDPChannel Class
+4 TROIndyUDPChannel Class=id_76
+4 TROIndyUDPChannel.AsyncTimeOut Property=id_415
+4 TROIndyUDPChannel.DispatchOptions Property=id_417
+4 TROIndyUDPChannel.Host Property=id_418
+4 TROIndyUDPChannel.IndyClient Property=id_419
+4 TROIndyUDPChannel.OnAfterProbingServer Event=id_436
+4 TROIndyUDPChannel.OnAfterProbingServers Event=id_437
+4 TROIndyUDPChannel.OnAsyncResponseTimeOut Event=id_416
+4 TROIndyUDPChannel.OnBeforeProbingServer Event=id_438
+4 TROIndyUDPChannel.OnBeforeProbingServers Event=id_439
+4 TROIndyUDPChannel.OnLoginNeeded Event=id_440
+4 TROIndyUDPChannel.OnReceiveStream Event=id_441
+4 TROIndyUDPChannel.OnSendStream Event=id_442
+4 TROIndyUDPChannel.Port Property=id_420
+4 TROIndyUDPChannel.ProbeFrequency Property=id_421
+4 TROIndyUDPChannel.ProbeServers Property=id_422
+4 TROIndyUDPChannel.ServerLocators Property=id_423
+4 TROIndyUDPChannel.SynchronizedProbing Property=id_424
+4 TROIndyUDPChannel.GetResponseByUID Method=id_443
+3 TROIndyUDPServer Class
+4 TROIndyUDPServer Class=id_78
+4 TROIndyUDPServer.IndyUDPServer Property=id_454
+4 TROIndyUDPServer.Port Property=id_455
+3 TROInMemoryEventRepository Class
+4 TROInMemoryEventRepository Class=id_220
+3 TROInMemorySessionManager Class
+4 TROInMemorySessionManager Class=id_116
+4 TROInMemorySessionManager.SessionDuration Property=id_1084
+3 TROLocalChannel Class
+4 TROLocalChannel Class=id_72
+4 TROLocalChannel.DispatchOptions Property=id_1095
+4 TROLocalChannel.OnLoginNeeded Event=id_1099
+4 TROLocalChannel.OnReceiveStream Event=id_1100
+4 TROLocalChannel.OnSendStream Event=id_1101
+4 TROLocalChannel.ServerChannel Property=id_1093
+4 TROLocalChannel.ServerLocators Property=id_1096
+3 TROLocalServer Class
+4 TROLocalServer Class=id_74
+4 TROLocalServer.Active Property=id_1114
+3 TROMasterServerEventRepository Class
+4 TROMasterServerEventRepository Class=id_221
+4 TROMasterServerEventRepository.Channel Property=id_1124
+4 TROMasterServerEventRepository.SessionManager Property=id_1125
+3 TROMasterServerSessionManager Class
+4 TROMasterServerSessionManager Class=id_117
+4 TROMasterServerSessionManager.Channel Property=id_1122
+3 TROMessage Class
+4 TROMessage Class=id_222
+4 TROMessage.ClientID Property=id_107
+4 TROMessage.InterfaceName Property=id_344
+4 TROMessage.MessageName Property=id_345
+4 TROMessage.OnFinalizeMessage Event=id_350
+4 TROMessage.OnInitializeMessage Event=id_351
+4 TROMessage.OnReadFromStream Event=id_352
+4 TROMessage.OnReadMessageParameter Event=id_353
+4 TROMessage.OnServerException Event=id_354
+4 TROMessage.OnWriteException Event=id_355
+4 TROMessage.OnWriteMessageParameter Event=id_357
+4 TROMessage.OnWriteToStream Event=id_356
+3 TROMessageDispatcher Class
+4 TROMessageDispatcher Class=id_223
+4 TROMessageDispatcher.Enabled Property=id_374
+4 TROMessageDispatcher.Message Property=id_372
+4 TROMessageDispatcher.Name Property=id_373
+3 TRONamedPipeChannel Class
+4 TRONamedPipeChannel Class=id_81
+4 TRONamedPipeChannel.ActivateOnDemand Property=id_1173
+4 TRONamedPipeChannel.Active Property=id_1174
+4 TRONamedPipeChannel.DispatchOptions Property=id_1175
+4 TRONamedPipeChannel.OnAfterProbingServer Event=id_1182
+4 TRONamedPipeChannel.OnAfterProbingServers Event=id_1183
+4 TRONamedPipeChannel.OnBeforeProbingServer Event=id_1184
+4 TRONamedPipeChannel.OnBeforeProbingServers Event=id_1185
+4 TRONamedPipeChannel.OnLoginNeeded Event=id_1186
+4 TRONamedPipeChannel.OnReceiveStream Event=id_1187
+4 TRONamedPipeChannel.OnSendStream Event=id_1188
+4 TRONamedPipeChannel.ProbeFrequency Property=id_1176
+4 TRONamedPipeChannel.ProbeServers Property=id_1177
+4 TRONamedPipeChannel.ServerID Property=id_1170
+4 TRONamedPipeChannel.ServerLocators Property=id_1178
+4 TRONamedPipeChannel.ServerName Property=id_1171
+4 TRONamedPipeChannel.SynchronizedProbing Property=id_1179
+3 TRONamedPipeServer Class
+4 TRONamedPipeServer Class=id_82
+4 TRONamedPipeServer.AllowEveryone Property=id_1212
+4 TRONamedPipeServer.ServerID Property=id_1206
+3 TROPerClientClassFactory Class
+4 TROPerClientClassFactory Class=id_105
+4 TROPerClientClassFactory.TimeoutSessions Method=id_1222
+3 TROPooledClassFactory Class
+4 TROPooledClassFactory Class=id_104
+4 TROPooledClassFactory.ClearPool Method=id_1229
+4 TROPooledClassFactory.Create Constructor=id_224
+3 TROPostMessage Class
+4 TROPostMessage Class=id_95
+4 TROPostMessage.BinaryType Property=id_1237
+3 TROPoweredByRemObjectsButton Class
+4 TROPoweredByRemObjectsButton Class=id_225
+4 TROPoweredByRemObjectsButton.ApplicationType Property=id_1247
+3 TROProxy Class
+4 TROProxy Class=id_226
+4 TROProxy.__InterfaceName Property=id_1254
+4 TROProxy.__Message Property=id_1255
+4 TROProxy.__TransportChannel Property=id_1256
+3 TRORemoteDataModule Class
+4 TRORemoteDataModule Class=id_118
+4 TRORemoteDataModule.ClientID Property=id_1150
+4 TRORemoteDataModule.EventRepository Property=id_140
+4 TRORemoteDataModule.NewSession Property=id_1264
+4 TRORemoteDataModule.OnActivate Event=id_1269
+4 TRORemoteDataModule.OnDeactivate Event=id_1270
+4 TRORemoteDataModule.RequiresSession Property=id_200
+4 TRORemoteDataModule.Session Property=id_1265
+4 TRORemoteDataModule.SessionManager Property=id_1262
+4 TRORemoteDataModule.Transport Property=id_1266
+4 TRORemoteDataModule.Synchronize Method=id_1273
+3 TRORemoteService Class
+4 TRORemoteService Class=id_15
+4 TRORemoteService.CacheRODL Property=id_1293
+4 TRORemoteService.Channel Property=id_1289
+4 TRORemoteService.Message Property=id_1290
+4 TRORemoteService.ServiceName Property=id_1291
+4 TRORemoteService.GetRODLLibrary Method=id_1294
+4 TRORemoteService.GetServiceMethods Method=id_1297
+4 TRORemoteService.GetServiceNames Method=id_1298
+3 TRORequestParam Class
+4 TRORequestParam Class=id_227
+4 TRORequestParam.AsBinary Property=id_1317
+4 TRORequestParam.AsBoolean Property=id_1318
+4 TRORequestParam.AsComplexType Property=id_1319
+4 TRORequestParam.AsCurrency Property=id_1320
+4 TRORequestParam.AsDateTime Property=id_1321
+4 TRORequestParam.AsFloat Property=id_1322
+4 TRORequestParam.AsInt64 Property=id_1323
+4 TRORequestParam.AsInteger Property=id_1324
+4 TRORequestParam.AsString Property=id_1325
+4 TRORequestParam.AsVariant Property=id_1326
+4 TRORequestParam.AsWideString Property=id_1327
+4 TRORequestParam.DataType Property=id_1312
+4 TRORequestParam.Flag Property=id_1314
+4 TRORequestParam.IsNull Property=id_1328
+4 TRORequestParam.Name Property=id_1311
+4 TRORequestParam.OwnsBinary Property=id_1329
+4 TRORequestParam.OwnsComplexType Property=id_1330
+4 TRORequestParam.TypeName Property=id_1313
+4 TRORequestParam.Value Property=id_1315
+4 TRORequestParam.ClearValue Method=id_1333
+3 TRORequestParamCollection Class
+4 TRORequestParamCollection Class=id_228
+4 TRORequestParamCollection.HasResultParam Property=id_1361
+4 TRORequestParamCollection.Items Property=id_1362
+4 TRORequestParamCollection.ResultParam Property=id_1363
+4 Add Method
+5 Add Method=id_1366
+5 TRORequestParamCollection.Add Method ()=id_1379
+5 TRORequestParamCollection.Add Method (string, TRODataType, TRODLParamFlag, string)=id_1380
+4 TRORequestParamCollection.ClearInputValues Method
+5 TRORequestParamCollection.ClearInputValues Method=id_1367
+4 TRORequestParamCollection.ClearOutputValues Method
+5 TRORequestParamCollection.ClearOutputValues Method=id_1368
+4 TRORequestParamCollection.ClearValues Method
+5 TRORequestParamCollection.ClearValues Method=id_1358
+4 TRORequestParamCollection.FindParam Method
+5 TRORequestParamCollection.FindParam Method=id_809
+4 TRORequestParamCollection.ParamByName Method
+5 TRORequestParamCollection.ParamByName Method=id_1369
+3 TROServer Class
+4 TROServer Class=id_128
+4 TROServer.Active Property=id_206
+4 TROServer.Dispatchers Property=id_129
+4 TROServer.OnAfterServerActivate Property=id_375
+4 TROServer.OnAfterServerDeactivate Property=id_376
+4 TROServer.OnBeforeServerActivate Property=id_377
+4 TROServer.OnBeforeServerDeactivate Property=id_378
+4 TROServer.OnReadFromStream Event=id_387
+4 TROServer.OnWriteToStream Event=id_388
+3 TROServerLocator Class
+4 TROServerLocator Class=id_229
+4 TROServerLocator.DisableOnFailure Property=id_1408
+4 TROServerLocator.Enabled Property=id_431
+4 TROServerLocator.Host Property=id_1404
+4 TROServerLocator.LoadBalancingServer Property=id_1409
+4 TROServerLocator.Name Property=id_1410
+4 TROServerLocator.OnEnabledChanged Event=id_1413
+4 TROServerLocator.Port Property=id_1405
+4 TROServerLocator.ProbingOptions Property=id_1406
+3 TROService Class
+4 TROService Class=id_232
+3 TROSession Class
+4 TROSession Class=id_233
+4 TROSession.Count Property=id_1428
+4 TROSession.Created Property=id_1429
+4 TROSession.LastAccessed Property=id_1430
+4 TROSession.Names Property=id_1431
+4 TROSession.SessionID Property=id_1425
+4 TROSession.Values Property=id_1426
+3 TROSingletonClassFactory Class
+4 TROSingletonClassFactory Class=id_102
+3 TROSOAPMessage Class
+4 TROSOAPMessage Class=id_91
+4 TROSOAPMessage.BodyNode Property=id_1451
+4 TROSOAPMessage.CustomLocation Property=id_1456
+4 TROSOAPMessage.EnvelopeNode Property=id_1452
+4 TROSOAPMessage.FaultNode Property=id_1453
+4 TROSOAPMessage.HeaderNode Property=id_1454
+4 TROSOAPMessage.MessageNode Property=id_1455
+4 TROSOAPMessage.OnEnvelopeComplete Event=id_1459
+4 TROSOAPMessage.OnSOAPFault Event=id_1460
+4 TROSOAPMessage.OnWriteEnvelopeAttribute Event=id_1461
+4 TROSOAPMessage.SerializationOptions Property=id_1449
+3 TROSuperTcpChannel Class
+4 TROSuperTcpChannel Class=id_64
+4 TROSuperTcpChannel.AckWaitTimeout Property=id_1476
+4 TROSuperTcpChannel.Active Property=id_1477
+4 TROSuperTcpChannel.AutoReconnect Property=id_1478
+4 TROSuperTcpChannel.DispatchOptions Property=id_1479
+4 TROSuperTcpChannel.Host Property=id_1480
+4 TROSuperTcpChannel.MaxPackageSize Property=id_1481
+4 TROSuperTcpChannel.OnAfterProbingServer Event=id_1494
+4 TROSuperTcpChannel.OnAfterProbingServers Event=id_1495
+4 TROSuperTcpChannel.OnBeforeProbingServer Event=id_1496
+4 TROSuperTcpChannel.OnBeforeProbingServers Event=id_1497
+4 TROSuperTcpChannel.OnConnected Property=id_1482
+4 TROSuperTcpChannel.OnDisconnected Property=id_1483
+4 TROSuperTcpChannel.OnLoginNeeded Event=id_1498
+4 TROSuperTcpChannel.OnReceiveStream Event=id_1499
+4 TROSuperTcpChannel.OnSendStream Event=id_1500
+4 TROSuperTcpChannel.Port Property=id_1484
+4 TROSuperTcpChannel.ProbeFrequency Property=id_1485
+4 TROSuperTcpChannel.ProbeServers Property=id_1486
+4 TROSuperTcpChannel.ReconnectDelay Property=id_1487
+4 TROSuperTcpChannel.RequestTimeout Property=id_1488
+4 TROSuperTcpChannel.ServerLocators Property=id_1489
+4 TROSuperTcpChannel.StoreActive Property=id_1490
+4 TROSuperTcpChannel.SynchronizedProbing Property=id_1491
+3 TROSuperTcpServer Class
+4 TROSuperTcpServer Class=id_65
+4 TROSuperTcpServer.AckWaitTimeout Property=id_1528
+4 TROSuperTcpServer.MaxPackageSize Property=id_1529
+4 TROSuperTcpServer.Port Property=id_1530
+3 TROSynapseHTTPChannel Class
+4 TROSynapseHTTPChannel Class=id_234
+4 TROSynapseHTTPChannel.DispatchOptions Property=id_1541
+4 TROSynapseHTTPChannel.http Property=id_1542
+4 TROSynapseHTTPChannel.KeepAlive Property=id_1543
+4 TROSynapseHTTPChannel.OnAfterProbingServer Event=id_1551
+4 TROSynapseHTTPChannel.OnAfterProbingServers Event=id_1552
+4 TROSynapseHTTPChannel.OnBeforeProbingServer Event=id_1553
+4 TROSynapseHTTPChannel.OnBeforeProbingServers Event=id_1554
+4 TROSynapseHTTPChannel.OnLoginNeeded Event=id_1555
+4 TROSynapseHTTPChannel.OnReceiveStream Event=id_1556
+4 TROSynapseHTTPChannel.OnSendStream Event=id_1557
+4 TROSynapseHTTPChannel.ProbeFrequency Property=id_1544
+4 TROSynapseHTTPChannel.ProbeServers Property=id_1545
+4 TROSynapseHTTPChannel.ServerLocators Property=id_1546
+4 TROSynapseHTTPChannel.SynchronizedProbing Property=id_1547
+4 TROSynapseHTTPChannel.TargetURL Property=id_1548
+3 TROSynchronizedSingletonClassFactory Class
+4 TROSynchronizedSingletonClassFactory Class=id_103
+3 TROTransportChannel Class
+4 TROTransportChannel Class=id_230
+4 TROTransportChannel.Busy Property=id_275
+4 TROTransportChannel.CurrentLocator Property=id_410
+4 TROTransportChannel.DispatchOptions Property=id_411
+4 TROTransportChannel.OnAfterProbingServer Event=id_427
+4 TROTransportChannel.OnAfterProbingServers Event=id_428
+4 TROTransportChannel.OnBeforeProbingServer Event=id_429
+4 TROTransportChannel.OnBeforeProbingServers Event=id_430
+4 TROTransportChannel.OnException Event=id_432
+4 TROTransportChannel.OnLoginNeeded Event=id_283
+4 TROTransportChannel.OnProgress Event=id_433
+4 TROTransportChannel.OnReceiveStream Event=id_434
+4 TROTransportChannel.OnSendStream Event=id_435
+4 TROTransportChannel.ProbeFrequency Property=id_412
+4 TROTransportChannel.ProbeServers Property=id_413
+4 TROTransportChannel.ServerLocators Property=id_231
+4 TROTransportChannel.SynchronizedProbing Property=id_414
+3 TROWebBrokerServer Class
+4 TROWebBrokerServer Class=id_62
+4 TROWebBrokerServer.SendExceptionsAs500 Property=id_1607
+3 TROWinInetHTTPChannel Class
+4 TROWinInetHTTPChannel Class=id_59
+4 TROWinInetHTTPChannel.DispatchOptions Property=id_1616
+4 TROWinInetHTTPChannel.Login Property=id_1617
+4 TROWinInetHTTPChannel.OnAfterProbingServer Event=id_1626
+4 TROWinInetHTTPChannel.OnAfterProbingServers Event=id_1627
+4 TROWinInetHTTPChannel.OnBeforeProbingServer Event=id_1628
+4 TROWinInetHTTPChannel.OnBeforeProbingServers Event=id_1629
+4 TROWinInetHTTPChannel.OnLoginNeeded Event=id_1630
+4 TROWinInetHTTPChannel.OnProgress Event=id_1631
+4 TROWinInetHTTPChannel.OnReceiveStream Event=id_1632
+4 TROWinInetHTTPChannel.OnSendStream Event=id_1633
+4 TROWinInetHTTPChannel.ProbeFrequency Property=id_1618
+4 TROWinInetHTTPChannel.ProbeServers Property=id_1619
+4 TROWinInetHTTPChannel.ServerLocators Property=id_1620
+4 TROWinInetHTTPChannel.SynchronizedProbing Property=id_1621
+4 TROWinInetHTTPChannel.TargetURL Property=id_983
+4 TROWinInetHTTPChannel.Timeout Property=id_1622
+4 TROWinInetHTTPChannel.UserAgent Property=id_1623
+3 TROWinMessageChannel Class
+4 TROWinMessageChannel Class=id_83
+4 TROWinMessageChannel.DefaultDirectory Property=id_1655
+4 TROWinMessageChannel.Delay Property=id_1656
+4 TROWinMessageChannel.DispatchOptions Property=id_1657
+4 TROWinMessageChannel.FileName Property=id_1658
+4 TROWinMessageChannel.OnAfterProbingServer Event=id_1666
+4 TROWinMessageChannel.OnAfterProbingServers Event=id_1667
+4 TROWinMessageChannel.OnBeforeProbingServer Event=id_1668
+4 TROWinMessageChannel.OnBeforeProbingServers Event=id_1669
+4 TROWinMessageChannel.OnLoginNeeded Event=id_1670
+4 TROWinMessageChannel.OnReceiveStream Event=id_1671
+4 TROWinMessageChannel.OnSendStream Event=id_1672
+4 TROWinMessageChannel.Parameters Property=id_1659
+4 TROWinMessageChannel.ProbeFrequency Property=id_1660
+4 TROWinMessageChannel.ProbeServers Property=id_1661
+4 TROWinMessageChannel.ServerID Property=id_1652
+4 TROWinMessageChannel.ServerLocators Property=id_1662
+4 TROWinMessageChannel.StartServer Property=id_1653
+4 TROWinMessageChannel.SynchronizedProbing Property=id_1663
+3 TROWinMessageServer Class
+4 TROWinMessageServer Class=id_84
+4 TROWinMessageServer.ServerID Property=id_1692
+3 TROXmlRpcMessage Class
+4 TROXmlRpcMessage Class=id_93
+2 Interfaces
+3 IROAsyncInterface Interface
+4 IROAsyncInterface Interface=id_131
+4 IROAsyncInterface.AnswerReceived Property=id_132
+4 IROAsyncInterface.AnswerReceivedEvent Property=id_134
+4 IROAsyncInterface.Busy Property=id_302
+4 IROAsyncInterface.MessageID Property=id_303
+3 IROEventWriter Interface
+4 IROEventWriter Interface=id_236
+4 IROEventWriter.ExcludeSender Property=id_1725
+4 IROEventWriter.ExcludeSessionList Property=id_1726
+4 IROEventWriter.SessionList Property=id_1727
+3 IROStream Interface
+4 IROStream Interface=id_237
+4 IROStream.Stream Property=id_238
+3 IROStrings Interface
+4 IROStrings Interface=id_240
+4 IROStrings.Strings Property=id_241
+3 IROTCPTransport Interface
+4 IROTCPTransport Interface=id_243
+4 IROTCPTransport.ClientAddress Property=id_409
+2 Structs, Records, Enums
+3 TRODataType Enumeration=id_246
+3 TRODispatchOption Enumeration=id_247
+3 TRODLParamFlag Enumeration=id_248
+3 TROPoolBehavior Enumeration=id_194
+3 TROPostMessageBinaryType Enumeration=id_249
+3 TROProbingOption Enumeration=id_250
+3 TROXMLSerializationOption Enumeration=id_251
+2 Functions
+3 Functions=id_266
+3 NewROStream Function=id_239
+3 NewROStrings Function=id_242
+3 NewROXmlDocument Function=id_254
+3 RegisterExceptionClass Function=id_196
+3 RegisterMessageClass Function=id_255
+3 RegisterROClass Function=id_256
+3 RegisterServerClass Function=id_257
+3 RegisterTransportChannelClass Function=id_258
+3 ROSendNoResponse Function=id_75
+3 UnregisterExceptionClass Function=id_259
+3 UnregisterMessageClass Function=id_260
+3 UnregisterROClass Function=id_261
+3 UnregisterServerClass Function=id_262
+3 UnregisterTransportChannelClass Function=id_263
+2 Types
+3 Binary Type=id_205
+3 DateTime Type=id_268
+3 IROEventsWriter Type=id_141
+3 TRODispatchOptions Type=id_269
+3 TROProbingOptions Type=id_270
+3 TROXMLSerializationOptions Type=id_271
+1 Samples
+2 Samples=id_1780
+1 Additional Information
+2 Additional Information=id_30
+2 FAQs=id_1783
+2 Online Articles=id_1784
+2 Getting Technical Support=id_1785
+2 Newsgroups=id_1786
+1 Copyright Notice
+2 Copyright Notice=id_1791
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Help/RemObjects SDK for Delphi.hlp b/official/5.0.30.691/RemObjects SDK for Delphi/Help/RemObjects SDK for Delphi.hlp
new file mode 100644
index 0000000..a1d861d
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Help/RemObjects SDK for Delphi.hlp differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Launch.exe b/official/5.0.30.691/RemObjects SDK for Delphi/Launch.exe
new file mode 100644
index 0000000..4b346d2
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Launch.exe differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/License.txt b/official/5.0.30.691/RemObjects SDK for Delphi/License.txt
new file mode 100644
index 0000000..0c68c76
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/License.txt
@@ -0,0 +1,86 @@
+*** REMOBJECTS SOFTWARE END USER LICENSE AGREEMENT ***
+
+Updated May 1, 2008
+
+IMPORTANT: PLEASE READ THIS DOCUMENT CAREFULLY AND IN ITS ENTIRETY BEFORE USING ANY SOFTWARE PRODUCT ACQUIRED FROM REMOBJECTS SOFTWARE.
+
+This document constitutes a LEGAL AGREEMENT between you, the End User (either an individual or an entity), and RemObjects Software, LLC.
+
+
+1. SCOPE
+
+This End User License Agreement ("EULA") covers all SOFTWARE PRODUCTS produced and sold by RemObjects Software, LLC. The sections of this EULA that contain information that pertain specifically to a certain product are properly marked as such.
+
+SOFTWARE PRODUCTS covered this EULA:
+
+* RemObjects AnyDAC
+* RemObjects Oxygene
+* RemObjects Data Abstract
+* RemObjects DebugServer
+* RemObjects Developer Studio
+* RemObjects Everwood
+* RemObjects Floss
+* RemObjects Internet Pack
+* RemObjects Hydra
+* RemObjects Pascal Script
+* RemObjects SDK
+
+
+2. DEFINITIONS
+
+SOFTWARE PRODUCTS: refers to one or more product as made available as a unified installation package.
+
+(LIBRARY) SOURCE CODE: refers to the source code shipped with any of the SOFTWARE PRODUCTS licensed to you, the End User, in the “Source” folder of the product installation.
+
+TOOLS: refers to ANY of the applications deployed with the SOFTWARE PRODUCTS in executable form, whether as auxiliary helper programs of a Library product or as main product. This includes but is not limited to any .EXE files and IDE integration.
+
+SAMPLE CODE: sample code is provided to you as part of the SOFTWARE PRODUCT license inside the “Samples” folder
+
+EXECUTABLE FORMAT refers to executable files such as .EXE and .DLL files build from your own source code, linking in code provided as part of the LIBRARY SOURCE CODE. It does not encompass Delphi .DCU or .BPL/.DCP files or any other format that would allow a third party to the provided file as a replacement for the LIBRARY SOURCE CODE
+
+
+3. COPYRIGHT
+
+This SOFTWARE PRODUCT is owned by RemObjects Software, LLC and is protected by copyright laws and international copyright treaties.
+
+All copyrights of this SOFTWARE PRODUCT, including but not limited to any source code, tools, documentation, images, text, and samples incorporated into the SOFTWARE PRODUCT, as well as those provided via Support Services or any of the RemObjects websites, are proprietary products of RemObjects Software, LLC and are protected by copyright law. You acquire only the right to use the SOFTWARE PRODUCT and do not acquire any rights of ownership. You acknowledge that the SOFTWARE PRODUCT and its source code remains a confidential trade secret of RemObjects Software, LLC. RemObjects Software, LLC may have trademarks, copyrights, patents or other intellectual property rights covering the SOFTWARE PRODUCT. You are not granted any license to these patents, trademarks, copyrights, or other intellectual property rights except as expressly provided herein. RemObjects Software, LLC reserves all rights not expressly granted.
+
+All names and logos of the SOFTWARE PRODUCTS defined in the SCOPE section of this EULA are trademarks or registered trademarks of RemObjects Software, LLC. These names and logos may only be used by the End User when referring to RemObjects Software, LLC or any of its products. These names and logos may not be used by the End User for branding or marketing purposes, without written consent from RemObjects Software, LLC.
+
+
+2. GRANT OF LICENSE
+
+BY INSTALLING, COPYING, OR OTHERWISE USING THE SOFTWARE PRODUCT, YOU AGREE TO BE BOUND BY ALL OF THE TERMS AND CONDITIONS OF THIS END USER LICENSE AGREEMENT. IF YOU DO NOT AGREE TO THE TERMS OF THIS AGREEMENT, YOU ARE NOT PERMITTED TO INSTALL, COPY, OR USE THE SOFTWARE PRODUCT. IF YOU REJECT THE TERMS OF THIS AGREEMENT WITHIN THIRTY (30) DAYS AFTER PURCHASING THE SOFTWARE PRODUCT, YOU MAY SEND AN EMAIL TO sales@remobjects.com AND REQUEST A FULL REFUND OF THE PURCHASE PRICE. IN ORDER TO RECEIVE THE REFUND, YOU MUST IRREVOCABLY UNINSTALL AND/OR DELETE ANY AND ALL COPIES OF THE SOFTWARE PRODUCT(S) YOU HAVE PURCHASED, AND PROVIDE CERTIFICATION OF SUCH TO REMOBJECTS.
+You may make one copy of the SOFTWARE PRODUCT solely for backup or archival purposes or transfer the SOFTWARE PRODUCT to a single hard disk provided you keep the original solely for backup or archival purposes.
+
+You may install the software on up to five computers, providing you are the only person using the software on these computers.
+
+You may not alter any of the programs or accompanying files without written permission from RemObjects Software, LLC. Any resale or commercial distribution of the SOFTWARE PRODUCT is strictly prohibited, unless RemObjects Software, LLC has given explicit written permission.
+
+You are not obtaining title to the SOFTWARE PRODUCT or any copyrights. You may not sublicense, rent, lease, convey, modify, translate, convert to another programming language, decompile, or disassemble the SOFTWARE PRODUCT for any purpose. RemObjects Software, LLC grants you as an individual, a personal, non exclusive license to install and use the SOFTWARE PRODUCT for the sole purpose of developing systems that are not in competition with the SOFTWARE PRODUCT, or any other products developed and sold by RemObjects Software, LLC.
+
+If you are an entity, RemObjects Software, LLC grants you the right to designate one individual within your organization to have the right to use the SOFTWARE PRODUCT in the manner described above.
+The named License you acquired is not transferrable to another individual or entity, unless you are given written permission by RemObjects Software, LLC.
+
+You may link against the LIBRARY SOURCE CODE and deploy it in EXECUTABLE FORMAT as part of your application; you may make changes to the LIBRARY SOURCE CODE and write extensions for your own use, and link against and deploy your changes in EXECUTABLE FORMAT. You may NOT deploy RemObjects Software’s source code to anyone.
+SAMPLE CODE for provided for your convenience and you may use it at your discretion. You may create your own products starting from the samples provided and consider this derived work as your own. You may also deploy such derived work in any way you see fit, including in source code form.
+
+Unless specifically stated on a per-tool basis, you may not deploy the TOOLS included with the SOFTWARE PRODUCT to anyone, neither standalone or as part of your own application; the tools are intended solely for use by yourself.
+In general, you may not distribute any part of the installed product, nor any license codes, license files or your website login to third parties.
+
+
+3. SUPPORT SERVICES
+
+RemObjects Software, LLC may provide the End User with Support Services related to the SOFTWARE PRODUCT. Support Services include free downloading of upgrades as covered by the original purchase, as well as technical support offered via NNTP-based newsgroups, e-mail or telephone. Use of Support Services is governed by RemObjects Software policies and programs described on the RemObjects website (www.remobjects.com/support) and may be subject to additional support charges depending on the type and level of support provided. Any supplemental software code provided to you as part of the Support Services shall be considered part of the SOFTWARE PRODUCT and is subject to the terms and conditions of this EULA.
+
+
+4. TERMINATION
+
+This License shall remain in effect only for so long as you are in compliance with the terms and conditions of this EULA. This License will terminate if you fail to comply with any of its terms or conditions. You may terminate it at any time by destroying your copies of the SOFTWARE PRODUCT. You agree, upon termination, to destroy all copies of the Product. Without prejudice to any other rights, RemObjects Software, LLC may terminate this EULA if you fail to comply with the terms. The provisions of this EULA that protect the proprietary rights of RemObjects Software, LLC and the LIMITATIONS OF WARRANTIES will continue to be in force even after any termination. Upon termination, RemObjects Software, LLC may also enforce any rights provided by law.
+
+
+5. LIMITATIONS OF WARRANTIES AND LIABILITY
+
+THIS SOFTWARE PRODUCT IS PROVIDED TO YOU "AS IS" WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE APPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. YOU ASSUME THE ENTIRE RISK AS TO THE ACCURACY AND THE USE OF THE SOFTWARE PRODUCT AND ALL OTHER RISK ARISING FROMTHE USE OR PERFORMANCE OF THIS SOFTWARE PRODUCT AND DOCUMENTATION.
+
+RemObjects Software, LLC SHALL NOT BE LIABLE FOR ANY DAMAGES WHATSOEVER ARISING FROM USE OF OR INABILITY TO USE THIS SOFTWARE PRODUCT, EVEN IF RemObjects Software, LLC HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL RemObjects Software, LLC BE LIABLE FOR ANY CONSEQUENTIAL, INCIDENTAL, DIRECT, INDIRECT, SPECIAL, PUNITIVE, OR OTHER DAMAGES WHATSOEVER, INCLUDING BUT NOT LIMITED TO DAMAGES OR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY LOSS, EVEN IF RemObjects Software, LLC HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. BECAUSE SOME STATES/JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, THE ABOVE LIMITATION MAY NOT APPLY.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/README.html b/official/5.0.30.691/RemObjects SDK for Delphi/README.html
new file mode 100644
index 0000000..585682a
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/README.html
@@ -0,0 +1,270 @@
+
+
+
+Welcome to RemObjects SDK™ 'Vinci' for Delphi (5.0.29).
+
+
+ Thank you for your interest in our products and for choosing the RemObjects SDK for Delphi.
+
+
+ Our goal with the RemObjects SDK (RO for short) is to provide you with the best, easiest and most
+ flexible cross platform remoting framework available today.
+
+
+
+ We will continue to improve the RemObjects SDK over time and these improvements will be available to you as part of your subscription. Please make sure that your
+ subscription stays active to ensure continued access to the latest release to be
+ sure you have the most recent fixes and new features.
+
+
+
+
+ Please check
+ our website
+ regularly to keep your product up to date with the latest additions. In particular,
+ see the change log for details of recent changes to the product.
+
+
+ The following README contains a few guidelines that you should follow in order to install and get started with the RemObjects SDK.
+
+
+
+
TRIAL Version & Indy
+
+The trial version currently supports Delphi 6, 7, 2006 and 2007 for Win32 only. Also, the trial DCUs are compiled for the standard versions of
+Indy that come with Delphi 6 (Indy 8), Delphi 7 (Indy 9), Delphi 2006 (Indy 10) or Delphi 2007 (Indy 10). If you are using a non-standard version of Indy, you will need to
+revert to the one provided with Delphi to use the trial.
+
+
+
TRIAL Version Requirements
+
+ The following requirements must be met for the trial version:
+
+
+ Delphi 2007 for Win32
+
+
Delphi 2006
+
+ Update Pack 2 required. Delphi 7
+
+ No updates required.
+
+
Delphi 6
+
+ Update Pack 2
+ RTL Update Pack 2
+ RTL Update Pack 3
+
+
+
+ Please note that these requirements are for the TRIAL version only. Since the retail version comes with full source code,
+ you can easily rebuild it to match the version of Delphi that you are using. Simply open the
+ BuildPackages_Dx.bpg project group and do a 'Build All Projects'.
+
+
+Package Installation
+
+The RemObjects SDK comes as several individual packages, provided
+in versions for Delphi 6, 7, 2006 and 2007 for Win32.
+
+These packages are:
+
+ RemObjects_Core_Dx.bpl
+ RemObjects_IDE_Dx.bpl
+ RemObjects_Indy_Dx.bpl
+ RemObjects_RODX_Dx.bpl
+ RemObjects_BODX_Dx.bpl
+ RemObjects_DataSnap_Dx.bpl
+ RemObjects_WebBroker_Dx.bpl
+ RemObjects_Synapse_Dx.bpl
+
+
+Installation in Delphi 6, Delphi 7, Delphi 2006 and Delphi 2007 for Win32
+
+ The RO setup will install prebuilt versions of all the packages in the Delphi 6, 7, 2006 or 2007 IDEs, with the
+ exception of the Synapse package.
+
+ The Indy package is built to work with the default versions of Indy that come with Delphi 6 (Indy 8) or
+ Delphi 7 (Indy 9) or 2006 (Indy 10) or 2007 (Indy 10). If you have a custom version, it will probably fail to load when you launch Delphi for the first time
+ after installing RO.
+
+
+ If this is the case you will need to adjust the RemObjects.inc file as described below, and then rebuild the RemObjects_Indy
+ package manually to match your specific version. You can accomplish this by opening the RemObjects_Indy_D6.dpk (or RemObjects_Indy_D7.dpk or RemObjects_Indy_D9.pdsproj or RemObjects_Indy_D10.pdsproj) in
+ the IDE and then building and installing it.
+
+
+ Make sure that you have an up-to-date version if Indy installed.
+ Modify the RemObjects.inc file to match the Indy version (8, 9 or 10) that you are using.
+ Load the RemObjects_Indy_D6.dpk, RemObjects_Indy_D7.dpk, RemObjects_Indy_D9.bdsproj or RemObjects_Indy_D10.bdsproj file into the IDE.
+ Remove "indy" from the list of required packages.
+ Build and install it.
+
+
+Free Pascal (FPC)
+
+ The current release of RemObjects SDK 'Vinci' for Delphi provides library support for Free Pascal 2.1.4 and above, allowing you to rebuild your
+ projects for the Win32 (x86), Win64 (x64), Linux (x86 and x64) platforms. Compilation against other platforms provided by FPC might be possible,
+ but is not currently supported; however, we are interested in your feedback if you do try to build against other platforms.
+
+
+ Official support for other platforms, as well as support for the Lazarus IDE, is under review for future releases.
+
+
+ The minimum version of FPC required is Free Pascal 2.1.4 or newer (which can be downloaded here ). Please note that we explicitly do not support the 2.0.x release, as it is missing crucial functionality.
+
+
+ More information about Free Pascal can be found on the FPC homepage at http://www.freepascal.org ;
+ please also read http://www.remobjects.com?fpc for more details.
+
+Limitations of Free Pascal Support
+
+ Not all client and server channels provided with RemObjects SDK 'Vinci' are supported for Free Pascal or for all four platforms available through
+ Free Pascal.
+
+
+
+ For obvious reasons, the WinINet HTTP Channel is not supported for Linux but will function under the Win32 and Win64 targets); the same
+ holds true for the Named Pipe client and server channels.
+
+
+ Indy support for FPC is experimental, and as such the Indy based channels are only experimentally supported for FPC.
+
+
+
+
+
License File
+
+ To avoid piracy and abuse, the RemObjects SDK Install contains a time-limited license for Service Builder, which will
+ expire after 30 days of use.
+
+
+ You will be prompted to download your personal license file when you start Service Builder for the first time; you can choose to either download your own license file right away,
+ or keep working with the trial license until such a time when the download is more convenient for you.
+ Alternatively, it's possible to download it directly from
+ http://www.remobjects.com/myro .
+
+
+
+Sample Projects
+
+ A number of sample projects are included in the \Samples folder of your RemObjects SDK install. These sample projects
+ will show you how to get started and how to use the various functions of the RemObjects SDK.
+
+ A detailed overview of the available samples can be found in the Samples.html file provided.
+
+
+ For BDS2006 and later, after the first start of the Visual Studio IDE, the Welcome
+ Page for the RemObjects SDK will be presented, giving you the option to directly
+ open any of the samples provided.
+
+
+DXSOCK
+
+ A copy of the relevant units required for using the BPDX communication components are included with the RemObjects SDK, in the Source\RODX
+ folder. No separate license of DXSock is required.
+ If you prefer to build your application to use the original DXSock units, and you have a valid license of DXSock
+ installed on your system, simply uncomment the appropriate conditional define in the RemObjects.inc.
+
+
+ DXSock is a high-performance TCP library available from Brain Patchworks DX. For more information on
+ DXSock, please visit http://www.bpdx.com .
+
+
+Synapse
+
+ RemObjects SDK contains an Http Channel implementation based on the Synapse IP library for Delphi. To install this Channel, please
+ download the latest version of Synapse from http://www.ararat.cz/synapse , place it on
+ your search path, and then build the RemObjects_Synapse_Dx.dpk package file.
+
+
+
+
+ The Synapse channel is not supported in the Trial version of the RemObjects SDK 4.0.
+
+
+Support
+
+ Support for the RemObjects SDK is available via our newsgroups at
+ remobjects.public.sdk.delphi .
+
+
+ You can use these newsgroups to report any problems or suggestions you might have in regards to RemObjects SDK, you can communicate with fellow RemObjects users and exchange ideas and solutions.
+
+
+ Please also make sure to check out our extensive Online Help to get started with the RemObjects SDK; the online help is available integrated into the Delphi Help and also as a standalone .HLP help file.
+
+ More information about our support offerings, including the Premium Support subscription,
+ can be found at http://www.remobjects.com/support .
+
+
+
+
Known Issues in this Release
+
While we try our best to get all known issues fixed and addressed for each build,
+ sometimes less important issues need to be deferred for later releases in favor
+ for getting a version released. Please check our list of known issues for
+ any known problems with the current release
+
+
+Where to go from here
+
+ To get started using the RemObjects SDK, please visit our Developer Center available
+ at
+ http://www.remobjects.com/devcenter/ro .
+
+
+ DevCenter provides hands-on developer resources such as articles (see article roadmap:
+ RO00 ),
+ videos and FAQs
+ about all our products, including the RemObjects SDK, and is the central
+ hub for all developer-oriented information about our products.
+
+Thank You
+
+ Let us thank you again for choosing the RemObjects SDK. We are confident that you
+ will find it to be a worthwhile addition to your development toolset.
+
+
+ Should you, at any time, encounter a problem or need assistance using the RemObjects SDK, please feel free to ask on the newsgroups
+ or contact us directly via email at support@remobjects.com .
+
+
+
+
+Best Regards,
+
+The RemObjects Team
+
+http://www.remobjects.com
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/Arrays.Sample.html b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/Arrays.Sample.html
new file mode 100644
index 0000000..bcb1c5a
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/Arrays.Sample.html
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+ Arrays Sample
+
+
+
+Purpose
+This sample shows how to use TROArray for presentating DB tables in a master/detail relationship.
+
+Examine the Code
+
+ The GetTables method returns a struct containing two arrays. These arrays contain
+ data from the Customers and Orders tables and consist of structs matching the table
+ structures.
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/Arrays.bdsgroup b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/Arrays.bdsgroup
new file mode 100644
index 0000000..f072d08
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/Arrays.bdsgroup
@@ -0,0 +1,20 @@
+
+
+
+
+ Default.Personality
+
+ 1.0
+ {1EF84150-B400-4A97-B901-00409AE0515D}
+
+
+
+
+
+ ArraysServer.bdsproj
+ ArraysClient.bdsproj
+ ArraysServer.exe ArraysClient.exe
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/Arrays.bpg b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/Arrays.bpg
new file mode 100644
index 0000000..d433fde
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/Arrays.bpg
@@ -0,0 +1,23 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = ArraysServer.exe ArraysClient.exe
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+ArraysServer.exe: ArraysServer.dpr
+ $(DCC)
+
+ArraysClient.exe: ArraysClient.dpr
+ $(DCC)
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/Arrays.groupproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/Arrays.groupproj
new file mode 100644
index 0000000..bbd9594
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/Arrays.groupproj
@@ -0,0 +1,40 @@
+
+
+ {e1bdacf8-8968-4f38-ad8d-e3172cdffd20}
+
+
+
+
+ Default.Personality
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysClient.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysClient.bdsproj
new file mode 100644
index 0000000..d0de43f
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysClient.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {69DD1C31-1798-4775-BF6B-F7D230DD15B0}
+
+
+
+
+ ArraysClient.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysClient.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysClient.dpr
new file mode 100644
index 0000000..b9661a6
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysClient.dpr
@@ -0,0 +1,15 @@
+program ArraysClient;
+
+uses
+ uROComInit,
+ Forms,
+ ArraysClientMain in 'ArraysClientMain.pas' {ArraysClientMainForm};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'Arrays Client';
+ Application.CreateForm(TArraysClientMainForm, ArraysClientMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysClient.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysClient.dproj
new file mode 100644
index 0000000..e2ff6a5
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysClient.dproj
@@ -0,0 +1,72 @@
+
+
+ {1dfeec6a-3b4d-45fa-bc7e-294021928831}
+ ArraysClient.dpr
+ Debug
+ AnyCPU
+ DCC32
+ ArraysClient.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ ArraysClient.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysClient.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysClient.res
new file mode 100644
index 0000000..90e4219
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysClient.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysClientMain.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysClientMain.dfm
new file mode 100644
index 0000000..7dc3460
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysClientMain.dfm
@@ -0,0 +1,95 @@
+object ArraysClientMainForm: TArraysClientMainForm
+ Left = 284
+ Top = 179
+ AutoScroll = False
+ Caption = 'RemObjects Client'
+ ClientHeight = 326
+ ClientWidth = 524
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Splitter1: TSplitter
+ Left = 0
+ Top = 126
+ Width = 524
+ Height = 8
+ Cursor = crVSplit
+ Align = alBottom
+ Beveled = True
+ end
+ object CustomersGrid: TStringGrid
+ Left = 0
+ Top = 34
+ Width = 524
+ Height = 92
+ Align = alClient
+ ColCount = 1
+ DefaultRowHeight = 16
+ FixedCols = 0
+ RowCount = 1
+ FixedRows = 0
+ Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goDrawFocusSelected, goColSizing]
+ TabOrder = 0
+ OnSelectCell = CustomersGridSelectCell
+ end
+ object OrdersGrid: TStringGrid
+ Left = 0
+ Top = 134
+ Width = 524
+ Height = 192
+ Align = alBottom
+ ColCount = 1
+ DefaultRowHeight = 16
+ FixedCols = 0
+ RowCount = 1
+ FixedRows = 0
+ Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goDrawFocusSelected, goColSizing]
+ TabOrder = 1
+ end
+ object Panel1: TPanel
+ Left = 0
+ Top = 0
+ Width = 524
+ Height = 34
+ Align = alTop
+ BevelOuter = bvNone
+ TabOrder = 2
+ object OpenButton: TButton
+ Left = 7
+ Top = 5
+ Width = 75
+ Height = 25
+ Caption = 'Open'
+ TabOrder = 0
+ OnClick = OpenButtonClick
+ end
+ end
+ object ROMessage: TROBinMessage
+ Left = 41
+ Top = 79
+ end
+ object ROChannel: TROWinInetHTTPChannel
+ UserAgent = 'RemObjects SDK'
+ TargetURL = 'http://localhost:8099/BIN'
+ ServerLocators = <>
+ DispatchOptions = []
+ Left = 13
+ Top = 79
+ end
+ object RORemoteService: TRORemoteService
+ Message = ROMessage
+ Channel = ROChannel
+ ServiceName = 'ArraysService'
+ Left = 69
+ Top = 79
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysClientMain.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysClientMain.pas
new file mode 100644
index 0000000..214f731
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysClientMain.pas
@@ -0,0 +1,188 @@
+unit ArraysClientMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
+ uROClient, uROClientIntf, uRORemoteService, uROWinInetHttpChannel,
+ uROBinMessage, Grids, DBGrids, ComCtrls, ArraysLibrary_Intf, ExtCtrls;
+
+type
+ TArraysClientMainForm = class(TForm)
+ ROMessage: TROBinMessage;
+ ROChannel: TROWinInetHTTPChannel;
+ RORemoteService: TRORemoteService;
+ CustomersGrid: TStringGrid;
+ OrdersGrid: TStringGrid;
+ Splitter1: TSplitter;
+ OpenButton: TButton;
+ Panel1: TPanel;
+ procedure OpenButtonClick(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ procedure FormDestroy(Sender: TObject);
+ procedure CustomersGridSelectCell(Sender: TObject; ACol, ARow: Integer;
+ var CanSelect: Boolean);
+ private
+ { Private declarations }
+ CustCol: CustomersCollection;
+ OrdCol: OrdersCollection;
+ FCustID: string;
+ procedure SetupGrid;
+ procedure SetupCustomers;
+ procedure SetupOrders(CustID: string);
+ procedure ClearGrid(Grid: TStringGrid);
+ public
+ { Public declarations }
+ end;
+
+var
+ ArraysClientMainForm: TArraysClientMainForm;
+
+implementation
+
+{$R *.dfm}
+
+procedure TArraysClientMainForm.OpenButtonClick(Sender: TObject);
+var
+ tbl: Tables;
+begin
+ tbl := (RORemoteService as IArraysService).GetTables;
+ try
+ CustCol.LoadFromArray(tbl.aCustomers);
+ OrdCol.LoadFromArray(tbl.aOrders);
+ finally
+ tbl.Free;
+ end;
+ SetupCustomers;
+ SetupOrders(CustomersGrid.Cells[0, 1]);
+end;
+
+procedure TArraysClientMainForm.FormCreate(Sender: TObject);
+begin
+ CustCol := CustomersCollection.Create;
+ OrdCol := OrdersCollection.Create;
+ SetupGrid;
+end;
+
+procedure TArraysClientMainForm.FormDestroy(Sender: TObject);
+begin
+ CustCol.Free;
+ OrdCol.Free;
+end;
+
+procedure TArraysClientMainForm.SetupGrid;
+begin
+ with CustomersGrid do begin
+ if RowCount < 2 then RowCount := 2;
+ ColCount:=11;
+ FixedRows := 1;
+ Cells[0, 0] := 'CustomerID';
+ Cells[1, 0] := 'CompanyName';
+ Cells[2, 0] := 'ContactName';
+ Cells[3, 0] := 'ContactTitle';
+ Cells[4, 0] := 'Address';
+ Cells[5, 0] := 'City';
+ Cells[6, 0] := 'Region';
+ Cells[7, 0] := 'Postalcode';
+ Cells[8, 0] := 'Country';
+ Cells[9, 0] := 'Phone';
+ Cells[10, 0] := 'Fax';
+ end;
+ with OrdersGrid do begin
+ if RowCount < 2 then RowCount := 2;
+ ColCount:= 14;
+ FixedRows := 1;
+ Cells[0, 0] := 'OrderID';
+ Cells[1, 0] := 'CustomerID';
+ Cells[2, 0] := 'EmployeeID';
+ Cells[3, 0] := 'OrderDate';
+ Cells[4, 0] := 'RequiredDate';
+ Cells[5, 0] := 'ShippedDate';
+ Cells[6, 0] := 'ShipVia';
+ Cells[7, 0] := 'Freight';
+ Cells[8, 0] := 'ShipName';
+ Cells[9, 0] := 'ShipAddress';
+ Cells[10, 0] := 'ShipCity';
+ Cells[11, 0] := 'ShipRegion';
+ Cells[12, 0] := 'ShipPostalCode';
+ Cells[13, 0] := 'ShipCountry';
+ end;
+end;
+
+procedure TArraysClientMainForm.SetupCustomers;
+var
+ i: integer;
+ CustItem: Customers;
+begin
+ ClearGrid(CustomersGrid);
+ with CustomersGrid do begin
+ RowCount := 1 + CustCol.Count;
+ for i := 0 to CustCol.Count - 1 do begin
+ CustItem := CustCol[i];
+ Cells[0, i + 1] := CustItem.CustomerID;
+ Cells[1, i + 1] := CustItem.CompanyName;
+ Cells[2, i + 1] := CustItem.ContactName;
+ Cells[3, i + 1] := CustItem.ContactTitle;
+ Cells[4, i + 1] := CustItem.Address;
+ Cells[5, i + 1] := CustItem.City;
+ Cells[6, i + 1] := CustItem.Region;
+ Cells[7, i + 1] := CustItem.Postalcode;
+ Cells[8, i + 1] := CustItem.Country;
+ Cells[9, i + 1] := CustItem.Phone;
+ Cells[10, i + 1] := CustItem.Fax;
+ end;
+ end;
+end;
+
+procedure TArraysClientMainForm.SetupOrders(CustID: string);
+var
+ i: integer;
+ k: integer;
+ OrdersItem: Orders;
+begin
+ if FCustID = CustID then Exit;
+ ClearGrid(OrdersGrid);
+ with OrdersGrid do begin
+ FCustID := CustID;
+ RowCount := 1 + OrdCol.Count;
+ k := 0;
+ for i := 0 to OrdCol.Count - 1 do begin
+ OrdersItem := OrdCol[i];
+ if OrdersItem.CustomerID = CustID then begin
+ inc(k);
+ Cells[0, k] := IntToStr(OrdersItem.OrderID);
+ Cells[1, k] := OrdersItem.CustomerID;
+ Cells[2, k] := IntToStr(OrdersItem.EmployeeID);
+ Cells[3, k] := DateTimeToStr(OrdersItem.OrderDate);
+ Cells[4, k] := DateTimeToStr(OrdersItem.RequiredDate);
+ Cells[5, k] := DateTimeToStr(OrdersItem.ShippedDate);
+ Cells[6, k] := IntToStr(OrdersItem.ShipVia);
+ Cells[7, k] := CurrToStr(OrdersItem.Freight);
+ Cells[8, k] := OrdersItem.ShipName;
+ Cells[9, k] := OrdersItem.ShipAddress;
+ Cells[10, k] := OrdersItem.ShipCity;
+ Cells[11, k] := OrdersItem.ShipRegion;
+ Cells[12, k] := OrdersItem.ShipPostalCode;
+ Cells[13, k] := OrdersItem.ShipCountry;
+ end;
+ end;
+ if k > 0 then RowCount := k + 1 else ClearGrid(OrdersGrid);
+ end;
+end;
+
+procedure TArraysClientMainForm.ClearGrid(Grid: TStringGrid);
+begin
+ Grid.RowCount := 1;
+ Grid.RowCount := 2;
+ Grid.Rows[1].Clear;
+ Grid.FixedRows := 1;
+end;
+
+procedure TArraysClientMainForm.CustomersGridSelectCell(Sender: TObject; ACol,
+ ARow: Integer; var CanSelect: Boolean);
+begin
+ if ARow > 0 then SetupOrders(CustomersGrid.Cells[0, aRow]);
+end;
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysLibrary.rodl b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysLibrary.rodl
new file mode 100644
index 0000000..27e6162
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysLibrary.rodl
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysLibrary_Intf.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysLibrary_Intf.pas
new file mode 100644
index 0000000..2327de6
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysLibrary_Intf.pas
@@ -0,0 +1,741 @@
+unit ArraysLibrary_Intf;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROClasses, uROClient, uROTypes, uROClientIntf;
+
+const
+ { Library ID }
+ LibraryUID = '{7BFDF035-4BE8-4255-9337-E112A2F30DA0}';
+ TargetNamespace = '';
+
+ { Service Interface ID's }
+ IArraysService_IID : TGUID = '{426D1A36-4EBF-4241-8E63-A26D303AA90E}';
+
+ { Event ID's }
+
+type
+ { Forward declarations }
+ IArraysService = interface;
+
+ CustomersArray = class;
+ OrdersArray = class;
+
+ Customers = class;
+ Orders = class;
+ Tables = class;
+
+
+ { Customers }
+ Customers = class(TROComplexType)
+ private
+ fCustomerID: String;
+ fCompanyName: String;
+ fContactName: String;
+ fContactTitle: String;
+ fAddress: String;
+ fCity: String;
+ fRegion: String;
+ fPostalcode: String;
+ fCountry: String;
+ fPhone: String;
+ fFax: String;
+ public
+ procedure Assign(iSource: TPersistent); override;
+ published
+ property CustomerID:String read fCustomerID write fCustomerID;
+ property CompanyName:String read fCompanyName write fCompanyName;
+ property ContactName:String read fContactName write fContactName;
+ property ContactTitle:String read fContactTitle write fContactTitle;
+ property Address:String read fAddress write fAddress;
+ property City:String read fCity write fCity;
+ property Region:String read fRegion write fRegion;
+ property Postalcode:String read fPostalcode write fPostalcode;
+ property Country:String read fCountry write fCountry;
+ property Phone:String read fPhone write fPhone;
+ property Fax:String read fFax write fFax;
+ end;
+
+ { CustomersCollection }
+ CustomersCollection = class(TROCollection)
+ protected
+ constructor Create(aItemClass: TCollectionItemClass); overload;
+ function GetItems(Index: integer): Customers;
+ procedure SetItems(Index: integer; const Value: Customers);
+ public
+ constructor Create; overload;
+ function Add: Customers; reintroduce;
+ procedure SaveToArray(anArray: CustomersArray);
+ procedure LoadFromArray(anArray: CustomersArray);
+ property Items[Index: integer]:Customers read GetItems write SetItems; default;
+ end;
+
+ { Orders }
+ Orders = class(TROComplexType)
+ private
+ fOrderID: Integer;
+ fCustomerID: String;
+ fEmployeeID: Integer;
+ fOrderDate: DateTime;
+ fRequiredDate: DateTime;
+ fShippedDate: DateTime;
+ fShipVia: Integer;
+ fFreight: Currency;
+ fShipName: String;
+ fShipAddress: String;
+ fShipCity: String;
+ fShipRegion: String;
+ fShipPostalCode: String;
+ fShipCountry: String;
+ public
+ procedure Assign(iSource: TPersistent); override;
+ published
+ property OrderID:Integer read fOrderID write fOrderID;
+ property CustomerID:String read fCustomerID write fCustomerID;
+ property EmployeeID:Integer read fEmployeeID write fEmployeeID;
+ property OrderDate:DateTime read fOrderDate write fOrderDate;
+ property RequiredDate:DateTime read fRequiredDate write fRequiredDate;
+ property ShippedDate:DateTime read fShippedDate write fShippedDate;
+ property ShipVia:Integer read fShipVia write fShipVia;
+ property Freight:Currency read fFreight write fFreight;
+ property ShipName:String read fShipName write fShipName;
+ property ShipAddress:String read fShipAddress write fShipAddress;
+ property ShipCity:String read fShipCity write fShipCity;
+ property ShipRegion:String read fShipRegion write fShipRegion;
+ property ShipPostalCode:String read fShipPostalCode write fShipPostalCode;
+ property ShipCountry:String read fShipCountry write fShipCountry;
+ end;
+
+ { OrdersCollection }
+ OrdersCollection = class(TROCollection)
+ protected
+ constructor Create(aItemClass: TCollectionItemClass); overload;
+ function GetItems(Index: integer): Orders;
+ procedure SetItems(Index: integer; const Value: Orders);
+ public
+ constructor Create; overload;
+ function Add: Orders; reintroduce;
+ procedure SaveToArray(anArray: OrdersArray);
+ procedure LoadFromArray(anArray: OrdersArray);
+ property Items[Index: integer]:Orders read GetItems write SetItems; default;
+ end;
+
+ { Tables }
+ Tables = class(TROComplexType)
+ private
+ faCustomers: CustomersArray;
+ faOrders: OrdersArray;
+ function GetaCustomers: CustomersArray;
+ function GetaOrders: OrdersArray;
+ public
+ procedure Assign(iSource: TPersistent); override;
+ published
+ property aCustomers:CustomersArray read GetaCustomers write faCustomers;
+ property aOrders:OrdersArray read GetaOrders write faOrders;
+ end;
+
+ { TablesCollection }
+ TablesCollection = class(TROCollection)
+ protected
+ constructor Create(aItemClass: TCollectionItemClass); overload;
+ function GetItems(Index: integer): Tables;
+ procedure SetItems(Index: integer; const Value: Tables);
+ public
+ constructor Create; overload;
+ function Add: Tables; reintroduce;
+ property Items[Index: integer]:Tables read GetItems write SetItems; default;
+ end;
+
+ { CustomersArray }
+ CustomersArray = class(TROArray)
+ private
+ fCount: Integer;
+ fItems : array of Customers;
+ protected
+ procedure Grow; virtual;
+ function GetItems(Index: integer): Customers;
+ procedure SetItems(Index: integer; const Value: Customers);
+ function GetCount: integer; override;
+ public
+ class function GetItemType: PTypeInfo; override;
+ class function GetItemClass: TClass; override;
+ class function GetItemSize: integer; override;
+ function GetItemRef(Index: integer): pointer; override;
+ procedure SetItemRef(Index: integer; Ref: pointer); override;
+ procedure Clear; override;
+ procedure Delete(Index: integer); override;
+ procedure Resize(ElementCount: integer); override;
+
+ procedure Assign(iSource:TPersistent); override;
+ function Add: Customers; overload;
+ function Add(const Value: Customers):integer; overload;
+
+ property Count : integer read GetCount;
+ property Items[Index: integer]:Customers read GetItems write SetItems; default;
+ end;
+
+ { OrdersArray }
+ OrdersArray = class(TROArray)
+ private
+ fCount: Integer;
+ fItems : array of Orders;
+ protected
+ procedure Grow; virtual;
+ function GetItems(Index: integer): Orders;
+ procedure SetItems(Index: integer; const Value: Orders);
+ function GetCount: integer; override;
+ public
+ class function GetItemType: PTypeInfo; override;
+ class function GetItemClass: TClass; override;
+ class function GetItemSize: integer; override;
+ function GetItemRef(Index: integer): pointer; override;
+ procedure SetItemRef(Index: integer; Ref: pointer); override;
+ procedure Clear; override;
+ procedure Delete(Index: integer); override;
+ procedure Resize(ElementCount: integer); override;
+
+ procedure Assign(iSource:TPersistent); override;
+ function Add: Orders; overload;
+ function Add(const Value: Orders):integer; overload;
+
+ property Count : integer read GetCount;
+ property Items[Index: integer]:Orders read GetItems write SetItems; default;
+ end;
+
+ { IArraysService }
+ IArraysService = interface
+ ['{426D1A36-4EBF-4241-8E63-A26D303AA90E}']
+ function GetTables: Tables;
+ end;
+
+ { CoArraysService }
+ CoArraysService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IArraysService;
+ end;
+
+ { TArraysService_Proxy }
+ TArraysService_Proxy = class(TROProxy, IArraysService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ function GetTables: Tables;
+ end;
+
+implementation
+
+uses
+ {vcl:} SysUtils,
+ {RemObjects:} uROEventRepository, uRORes;
+
+{ CustomersArray }
+
+procedure CustomersArray.Assign(iSource: TPersistent);
+var lSource:CustomersArray;
+ i:integer;
+begin
+ if (iSource is CustomersArray) then begin
+ lSource := CustomersArray(iSource);
+ Clear();
+ Resize(lSource.Count);
+
+ for i := 0 to Count-1 do begin
+ if Assigned(lSource.Items[i]) then begin
+ Items[i].Assign(lSource.Items[i]);
+ end;
+ end;
+ end
+ else begin
+ inherited Assign(iSource);
+ end;
+end;
+
+class function CustomersArray.GetItemType: PTypeInfo;
+begin
+ result := TypeInfo(Customers);
+end;
+
+class function CustomersArray.GetItemClass: TClass;
+begin
+ result := Customers;
+end;
+
+class function CustomersArray.GetItemSize: integer;
+begin
+ result := SizeOf(Customers);
+end;
+
+function CustomersArray.GetItems(Index: integer): Customers;
+begin
+ if (Index < 0) or (Index >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[Index]);
+ result := fItems[Index];
+end;
+
+function CustomersArray.GetItemRef(Index: integer): pointer;
+begin
+ if (Index < 0) or (Index >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[Index]);
+ result := fItems[Index];
+end;
+
+procedure CustomersArray.SetItemRef(Index: integer; Ref: pointer);
+begin
+ if (Index < 0) or (Index >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[Index]);
+ if Ref <> fItems[Index] then begin
+ fItems[Index].Free;
+ fItems[Index] := Ref;
+ end;
+end;
+
+procedure CustomersArray.Clear;
+var i: integer;
+begin
+ for i := 0 to (Count-1) do fItems[i].Free();
+ SetLength(fItems, 0);
+ FCount := 0;
+end;
+
+procedure CustomersArray.Delete(Index: integer);
+var i: integer;
+begin
+ if (Index>=Count) then RaiseError(err_InvalidIndex, [Index]);
+
+ fItems[Index].Free();
+
+ if (Index= Count) then RaiseError(err_ArrayIndexOutOfBounds,[Index]);
+ fItems[Index].Free;
+ fItems[Index] := Value;
+end;
+
+procedure CustomersArray.Resize(ElementCount: integer);
+var i: Integer;
+begin
+ for i := FCount -1 downto ElementCount do
+ FItems[i].Free;
+ SetLength(fItems, ElementCount);
+ for i := FCount to ElementCount -1 do
+ FItems[i] := Customers.Create;
+ FCount := ElementCount;
+end;
+
+function CustomersArray.GetCount: integer;
+begin
+ result := FCount;
+end;
+
+procedure CustomersArray.Grow;
+var
+ Delta, Capacity: Integer;
+begin
+ Capacity := Length(fItems);
+ if Capacity > 64 then
+ Delta := Capacity div 4
+ else
+ if Capacity > 8 then
+ Delta := 16
+ else
+ Delta := 4;
+ SetLength(fItems, Capacity + Delta);
+end;
+
+function CustomersArray.Add: Customers;
+begin
+ result := Customers.Create;
+ Add(Result);
+end;
+
+function CustomersArray.Add(const Value:Customers): integer;
+begin
+ Result := Count;
+ if Length(fItems) = Result then
+ Grow;
+ fItems[result] := Value;
+ Inc(fCount);
+end;
+
+{ OrdersArray }
+
+procedure OrdersArray.Assign(iSource: TPersistent);
+var lSource:OrdersArray;
+ i:integer;
+begin
+ if (iSource is OrdersArray) then begin
+ lSource := OrdersArray(iSource);
+ Clear();
+ Resize(lSource.Count);
+
+ for i := 0 to Count-1 do begin
+ if Assigned(lSource.Items[i]) then begin
+ Items[i].Assign(lSource.Items[i]);
+ end;
+ end;
+ end
+ else begin
+ inherited Assign(iSource);
+ end;
+end;
+
+class function OrdersArray.GetItemType: PTypeInfo;
+begin
+ result := TypeInfo(Orders);
+end;
+
+class function OrdersArray.GetItemClass: TClass;
+begin
+ result := Orders;
+end;
+
+class function OrdersArray.GetItemSize: integer;
+begin
+ result := SizeOf(Orders);
+end;
+
+function OrdersArray.GetItems(Index: integer): Orders;
+begin
+ if (Index < 0) or (Index >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[Index]);
+ result := fItems[Index];
+end;
+
+function OrdersArray.GetItemRef(Index: integer): pointer;
+begin
+ if (Index < 0) or (Index >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[Index]);
+ result := fItems[Index];
+end;
+
+procedure OrdersArray.SetItemRef(Index: integer; Ref: pointer);
+begin
+ if (Index < 0) or (Index >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[Index]);
+ if Ref <> fItems[Index] then begin
+ fItems[Index].Free;
+ fItems[Index] := Ref;
+ end;
+end;
+
+procedure OrdersArray.Clear;
+var i: integer;
+begin
+ for i := 0 to (Count-1) do fItems[i].Free();
+ SetLength(fItems, 0);
+ FCount := 0;
+end;
+
+procedure OrdersArray.Delete(Index: integer);
+var i: integer;
+begin
+ if (Index>=Count) then RaiseError(err_InvalidIndex, [Index]);
+
+ fItems[Index].Free();
+
+ if (Index= Count) then RaiseError(err_ArrayIndexOutOfBounds,[Index]);
+ fItems[Index].Free;
+ fItems[Index] := Value;
+end;
+
+procedure OrdersArray.Resize(ElementCount: integer);
+var i: Integer;
+begin
+ for i := FCount -1 downto ElementCount do
+ FItems[i].Free;
+ SetLength(fItems, ElementCount);
+ for i := FCount to ElementCount -1 do
+ FItems[i] := Orders.Create;
+ FCount := ElementCount;
+end;
+
+function OrdersArray.GetCount: integer;
+begin
+ result := FCount;
+end;
+
+procedure OrdersArray.Grow;
+var
+ Delta, Capacity: Integer;
+begin
+ Capacity := Length(fItems);
+ if Capacity > 64 then
+ Delta := Capacity div 4
+ else
+ if Capacity > 8 then
+ Delta := 16
+ else
+ Delta := 4;
+ SetLength(fItems, Capacity + Delta);
+end;
+
+function OrdersArray.Add: Orders;
+begin
+ result := Orders.Create;
+ Add(Result);
+end;
+
+function OrdersArray.Add(const Value:Orders): integer;
+begin
+ Result := Count;
+ if Length(fItems) = Result then
+ Grow;
+ fItems[result] := Value;
+ Inc(fCount);
+end;
+
+{ Customers }
+
+procedure Customers.Assign(iSource: TPersistent);
+var lSource: ArraysLibrary_Intf.Customers;
+begin
+ inherited Assign(iSource);
+ if (iSource is ArraysLibrary_Intf.Customers) then begin
+ lSource := ArraysLibrary_Intf.Customers(iSource);
+ CustomerID := lSource.CustomerID;
+ CompanyName := lSource.CompanyName;
+ ContactName := lSource.ContactName;
+ ContactTitle := lSource.ContactTitle;
+ Address := lSource.Address;
+ City := lSource.City;
+ Region := lSource.Region;
+ Postalcode := lSource.Postalcode;
+ Country := lSource.Country;
+ Phone := lSource.Phone;
+ Fax := lSource.Fax;
+ end;
+end;
+
+{ CustomersCollection }
+constructor CustomersCollection.Create;
+begin
+ inherited Create(Customers);
+end;
+
+constructor CustomersCollection.Create(aItemClass: TCollectionItemClass);
+begin
+ inherited Create(aItemClass);
+end;
+
+function CustomersCollection.Add: Customers;
+begin
+ result := Customers(inherited Add);
+end;
+
+function CustomersCollection.GetItems(Index: integer): Customers;
+begin
+ result := Customers(inherited Items[Index]);
+end;
+
+procedure CustomersCollection.LoadFromArray(anArray: CustomersArray);
+var i : integer;
+begin
+ Clear;
+ for i := 0 to (anArray.Count-1) do
+ Add.Assign(anArray[i]);
+end;
+
+procedure CustomersCollection.SaveToArray(anArray: CustomersArray);
+var i : integer;
+begin
+ anArray.Clear;
+ anArray.Resize(Count);
+ for i := 0 to (Count-1) do begin
+ anArray[i] := Customers.Create;
+ anArray[i].Assign(Items[i]);
+ end;
+end;
+
+procedure CustomersCollection.SetItems(Index: integer; const Value: Customers);
+begin
+ Customers(inherited Items[Index]).Assign(Value);
+end;
+
+{ Orders }
+
+procedure Orders.Assign(iSource: TPersistent);
+var lSource: ArraysLibrary_Intf.Orders;
+begin
+ inherited Assign(iSource);
+ if (iSource is ArraysLibrary_Intf.Orders) then begin
+ lSource := ArraysLibrary_Intf.Orders(iSource);
+ OrderID := lSource.OrderID;
+ CustomerID := lSource.CustomerID;
+ EmployeeID := lSource.EmployeeID;
+ OrderDate := lSource.OrderDate;
+ RequiredDate := lSource.RequiredDate;
+ ShippedDate := lSource.ShippedDate;
+ ShipVia := lSource.ShipVia;
+ Freight := lSource.Freight;
+ ShipName := lSource.ShipName;
+ ShipAddress := lSource.ShipAddress;
+ ShipCity := lSource.ShipCity;
+ ShipRegion := lSource.ShipRegion;
+ ShipPostalCode := lSource.ShipPostalCode;
+ ShipCountry := lSource.ShipCountry;
+ end;
+end;
+
+{ OrdersCollection }
+constructor OrdersCollection.Create;
+begin
+ inherited Create(Orders);
+end;
+
+constructor OrdersCollection.Create(aItemClass: TCollectionItemClass);
+begin
+ inherited Create(aItemClass);
+end;
+
+function OrdersCollection.Add: Orders;
+begin
+ result := Orders(inherited Add);
+end;
+
+function OrdersCollection.GetItems(Index: integer): Orders;
+begin
+ result := Orders(inherited Items[Index]);
+end;
+
+procedure OrdersCollection.LoadFromArray(anArray: OrdersArray);
+var i : integer;
+begin
+ Clear;
+ for i := 0 to (anArray.Count-1) do
+ Add.Assign(anArray[i]);
+end;
+
+procedure OrdersCollection.SaveToArray(anArray: OrdersArray);
+var i : integer;
+begin
+ anArray.Clear;
+ anArray.Resize(Count);
+ for i := 0 to (Count-1) do begin
+ anArray[i] := Orders.Create;
+ anArray[i].Assign(Items[i]);
+ end;
+end;
+
+procedure OrdersCollection.SetItems(Index: integer; const Value: Orders);
+begin
+ Orders(inherited Items[Index]).Assign(Value);
+end;
+
+{ Tables }
+
+procedure Tables.Assign(iSource: TPersistent);
+var lSource: ArraysLibrary_Intf.Tables;
+begin
+ inherited Assign(iSource);
+ if (iSource is ArraysLibrary_Intf.Tables) then begin
+ lSource := ArraysLibrary_Intf.Tables(iSource);
+ aCustomers.Assign(lSource.aCustomers);
+ aOrders.Assign(lSource.aOrders);
+ end;
+end;
+
+function Tables.GetaCustomers: CustomersArray;
+begin
+ if (faCustomers = nil) then faCustomers := CustomersArray.Create();
+ result := faCustomers;
+end;
+
+function Tables.GetaOrders: OrdersArray;
+begin
+ if (faOrders = nil) then faOrders := OrdersArray.Create();
+ result := faOrders;
+end;
+
+{ TablesCollection }
+constructor TablesCollection.Create;
+begin
+ inherited Create(Tables);
+end;
+
+constructor TablesCollection.Create(aItemClass: TCollectionItemClass);
+begin
+ inherited Create(aItemClass);
+end;
+
+function TablesCollection.Add: Tables;
+begin
+ result := Tables(inherited Add);
+end;
+
+function TablesCollection.GetItems(Index: integer): Tables;
+begin
+ result := Tables(inherited Items[Index]);
+end;
+
+procedure TablesCollection.SetItems(Index: integer; const Value: Tables);
+begin
+ Tables(inherited Items[Index]).Assign(Value);
+end;
+
+{ CoArraysService }
+
+class function CoArraysService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IArraysService;
+begin
+ result := TArraysService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TArraysService_Proxy }
+
+function TArraysService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'ArraysService';
+end;
+
+function TArraysService_Proxy.GetTables: Tables;
+begin
+ try
+ result := nil;
+ __Message.InitializeRequestMessage(__TransportChannel, 'ArraysLibrary', __InterfaceName, 'GetTables');
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(ArraysLibrary_Intf.Tables), result, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+initialization
+ RegisterROClass(Customers);
+ RegisterROClass(Orders);
+ RegisterROClass(Tables);
+ RegisterROClass(CustomersArray);
+ RegisterROClass(OrdersArray);
+ RegisterProxyClass(IArraysService_IID, TArraysService_Proxy);
+
+
+finalization
+ UnregisterROClass(Customers);
+ UnregisterROClass(Orders);
+ UnregisterROClass(Tables);
+ UnregisterROClass(CustomersArray);
+ UnregisterROClass(OrdersArray);
+ UnregisterProxyClass(IArraysService_IID);
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysLibrary_Invk.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysLibrary_Invk.pas
new file mode 100644
index 0000000..a713260
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysLibrary_Invk.pas
@@ -0,0 +1,58 @@
+unit ArraysLibrary_Invk;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes,
+ {RemObjects:} uROXMLIntf, uROServer, uROServerIntf, uROTypes, uROClientIntf,
+ {Generated:} ArraysLibrary_Intf;
+
+type
+ TArraysService_Invoker = class(TROInvoker)
+ private
+ protected
+ published
+ procedure Invoke_GetTables(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ end;
+
+implementation
+
+uses
+ {RemObjects:} uRORes, uROClient;
+
+{ TArraysService_Invoker }
+
+procedure TArraysService_Invoker.Invoke_GetTables(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function GetTables: Tables; }
+var
+ lResult: ArraysLibrary_Intf.Tables;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ lResult := nil;
+ try
+ lResult := (__Instance as IArraysService).GetTables;
+
+ __Message.InitializeResponseMessage(__Transport, 'ArraysLibrary', 'ArraysService', 'GetTablesResponse');
+ __Message.Write('Result', TypeInfo(ArraysLibrary_Intf.Tables), lResult, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(lResult);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysServer.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysServer.bdsproj
new file mode 100644
index 0000000..67735c1
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysServer.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {CBD76A62-9296-40BC-AE62-7E00830DD5AB}
+
+
+
+
+ ArraysServer.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysServer.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysServer.dpr
new file mode 100644
index 0000000..4e84729
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysServer.dpr
@@ -0,0 +1,21 @@
+program ArraysServer;
+
+{#ROGEN:ArraysLibrary.rodl} // RemObjects: Careful, do not remove!
+
+uses
+ uROComInit,
+ Forms,
+ ArraysServerMain in 'ArraysServerMain.pas' {ArraysServerMainForm},
+ ArraysLibrary_Intf in 'ArraysLibrary_Intf.pas',
+ ArraysLibrary_Invk in 'ArraysLibrary_Invk.pas',
+ ArraysService_Impl in 'ArraysService_Impl.pas';
+
+{$R *.res}
+{$R RODLFile.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'Arrays Server';
+ Application.CreateForm(TArraysServerMainForm, ArraysServerMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysServer.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysServer.dproj
new file mode 100644
index 0000000..dafc6c0
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysServer.dproj
@@ -0,0 +1,75 @@
+
+
+ {e808bbe4-3e46-43ec-9be9-ccc484c00237}
+ ArraysServer.dpr
+ Debug
+ AnyCPU
+ DCC32
+ ArraysServer.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ ArraysServer.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysServer.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysServer.res
new file mode 100644
index 0000000..95e15d9
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysServer.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysServerMain.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysServerMain.dfm
new file mode 100644
index 0000000..fa97a7e
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysServerMain.dfm
@@ -0,0 +1,63 @@
+object ArraysServerMainForm: TArraysServerMainForm
+ Left = 69
+ Top = 35
+ AutoScroll = False
+ Caption = 'Arrays Server'
+ ClientHeight = 64
+ ClientWidth = 228
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ PixelsPerInch = 96
+ TextHeight = 13
+ object RoPoweredByRemObjectsButton1: TROPoweredByRemObjectsButton
+ Left = 8
+ Top = 8
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ end
+ object ROMessage: TROBinMessage
+ Left = 36
+ Top = 8
+ end
+ object ROServer: TROIndyHTTPServer
+ Dispatchers = <
+ item
+ Name = 'ROMessage'
+ Message = ROMessage
+ Enabled = True
+ PathInfo = 'Bin'
+ end>
+ Port = 8099
+ Left = 8
+ Top = 8
+ end
+ object ADOConnection1: TADOConnection
+ ConnectionString =
+ 'Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security In' +
+ 'fo=False;Initial Catalog=Northwind;Data Source=localhost'
+ LoginPrompt = False
+ Provider = 'SQLOLEDB.1'
+ Left = 64
+ Top = 8
+ end
+ object tblCustomers: TADOTable
+ Connection = ADOConnection1
+ TableName = 'Customers'
+ Left = 92
+ Top = 8
+ end
+ object tblOrders: TADOTable
+ Connection = ADOConnection1
+ TableName = 'Orders'
+ Left = 120
+ Top = 8
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysServerMain.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysServerMain.pas
new file mode 100644
index 0000000..7ae6a01
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysServerMain.pas
@@ -0,0 +1,38 @@
+unit ArraysServerMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
+ uROClient, uROPoweredByRemObjectsButton, uROClientIntf, uROServer,
+ uROIndyTCPServer, uROIndyHTTPServer, uROBinMessage, DB, ADODB;
+
+type
+ TArraysServerMainForm = class(TForm)
+ RoPoweredByRemObjectsButton1: TRoPoweredByRemObjectsButton;
+ ROMessage: TROBinMessage;
+ ROServer: TROIndyHTTPServer;
+ ADOConnection1: TADOConnection;
+ tblCustomers: TADOTable;
+ tblOrders: TADOTable;
+ procedure FormCreate(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ ArraysServerMainForm: TArraysServerMainForm;
+
+implementation
+
+
+{$R *.dfm}
+
+procedure TArraysServerMainForm.FormCreate(Sender: TObject);
+begin
+ ROServer.Active := true;
+end;
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysService_Impl.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysService_Impl.pas
new file mode 100644
index 0000000..050f5df
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/ArraysService_Impl.pas
@@ -0,0 +1,94 @@
+unit ArraysService_Impl;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ This is where you are supposed to code the implementation of your objects. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils,
+ {RemObjects:} uROXMLIntf, uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
+ {Generated:} ArraysLibrary_Intf;
+
+type
+ { TArraysService }
+ TArraysService = class(TRORemotable, IArraysService)
+ private
+ protected
+ { IArraysService methods }
+ function GetTables: Tables;
+ end;
+
+implementation
+
+uses
+ {Generated:} ArraysLibrary_Invk, ArraysServerMain;
+
+procedure Create_ArraysService(out anInstance: IUnknown);
+begin
+ anInstance := TArraysService.Create;
+end;
+
+{ ArraysService }
+
+function TArraysService.GetTables: Tables;
+begin
+ Result := Tables.Create;
+ // Customers
+ ArraysServerMainForm.tblCustomers.Close;
+ ArraysServerMainForm.tblCustomers.Open;
+ ArraysServerMainForm.tblCustomers.First;
+ while not ArraysServerMainForm.tblCustomers.Eof do begin
+ with Result.aCustomers.Add do begin
+ CustomerID := ArraysServerMainForm.tblCustomers.FieldByName('CustomerID').AsString;
+ CompanyName := ArraysServerMainForm.tblCustomers.FieldByName('CompanyName').AsString;
+ ContactName := ArraysServerMainForm.tblCustomers.FieldByName('ContactName').AsString;
+ ContactTitle := ArraysServerMainForm.tblCustomers.FieldByName('ContactTitle').AsString;
+ Address := ArraysServerMainForm.tblCustomers.FieldByName('Address').AsString;
+ City := ArraysServerMainForm.tblCustomers.FieldByName('City').AsString;
+ Region := ArraysServerMainForm.tblCustomers.FieldByName('Region').AsString;
+ Postalcode := ArraysServerMainForm.tblCustomers.FieldByName('Postalcode').AsString;
+ Country := ArraysServerMainForm.tblCustomers.FieldByName('Country').AsString;
+ Phone := ArraysServerMainForm.tblCustomers.FieldByName('Phone').AsString;
+ Fax := ArraysServerMainForm.tblCustomers.FieldByName('Fax').AsString;
+ end;
+ ArraysServerMainForm.tblCustomers.Next;
+ end;
+ ArraysServerMainForm.tblCustomers.Close;
+ // orders
+ ArraysServerMainForm.tblOrders.Close;
+ ArraysServerMainForm.tblOrders.Open;
+ ArraysServerMainForm.tblOrders.First;
+ while not ArraysServerMainForm.tblOrders.Eof do begin
+ with Result.aOrders.Add do begin
+ OrderID := ArraysServerMainForm.tblOrders.FieldByName('OrderID').AsInteger;
+ CustomerID := ArraysServerMainForm.tblOrders.FieldByName('CustomerID').AsString;
+ EmployeeID := ArraysServerMainForm.tblOrders.FieldByName('EmployeeID').AsInteger;
+ OrderDate := ArraysServerMainForm.tblOrders.FieldByName('OrderDate').AsDateTime;
+ RequiredDate := ArraysServerMainForm.tblOrders.FieldByName('RequiredDate').AsDateTime;
+ ShippedDate := ArraysServerMainForm.tblOrders.FieldByName('ShippedDate').AsDateTime;
+ ShipVia := ArraysServerMainForm.tblOrders.FieldByName('ShipVia').AsInteger;
+ Freight := ArraysServerMainForm.tblOrders.FieldByName('Freight').AsCurrency;
+ ShipName := ArraysServerMainForm.tblOrders.FieldByName('ShipName').AsString;
+ ShipAddress := ArraysServerMainForm.tblOrders.FieldByName('ShipAddress').AsString;
+ ShipCity := ArraysServerMainForm.tblOrders.FieldByName('ShipCity').AsString;
+ ShipRegion := ArraysServerMainForm.tblOrders.FieldByName('ShipRegion').AsString;
+ ShipPostalCode := ArraysServerMainForm.tblOrders.FieldByName('ShipPostalCode').AsString;
+ ShipCountry := ArraysServerMainForm.tblOrders.FieldByName('ShipCountry').AsString;
+ end;
+ ArraysServerMainForm.tblOrders.Next;
+ end;
+ ArraysServerMainForm.tblOrders.Close;
+end;
+
+initialization
+ TROClassFactory.Create('ArraysService', Create_ArraysService, TArraysService_Invoker);
+
+finalization
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/RODLFILE.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/RODLFILE.res
new file mode 100644
index 0000000..693f431
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Arrays/RODLFILE.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncClient.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncClient.bdsproj
new file mode 100644
index 0000000..69a9d3f
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncClient.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {1A78F07E-70B5-4A8C-8993-555593A8695E}
+
+
+
+
+ AsyncClient.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncClient.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncClient.dpr
new file mode 100644
index 0000000..1bd218c
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncClient.dpr
@@ -0,0 +1,15 @@
+program AsyncClient;
+
+uses
+ Forms,
+ AsyncClientMain in 'AsyncClientMain.pas' {AsyncClientMainForm},
+ async_EmailSettings in 'async_EmailSettings.pas' {async_EmailSettingsForm};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'Async Client';
+ Application.CreateForm(TAsyncClientMainForm, AsyncClientMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncClient.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncClient.dproj
new file mode 100644
index 0000000..7c21b47
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncClient.dproj
@@ -0,0 +1,72 @@
+
+
+ {8d3e5e25-35fa-4504-9b6f-2d5ac5d5b9f0}
+ AsyncClient.dpr
+ Debug
+ AnyCPU
+ DCC32
+ AsyncClient.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ AsyncClient.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncClient.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncClient.res
new file mode 100644
index 0000000..0f940ed
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncClient.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncClientMain.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncClientMain.dfm
new file mode 100644
index 0000000..1dfd41d
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncClientMain.dfm
@@ -0,0 +1,182 @@
+object AsyncClientMainForm: TAsyncClientMainForm
+ Left = 518
+ Top = 137
+ BorderStyle = bsDialog
+ Caption = 'Async Client'
+ ClientHeight = 326
+ ClientWidth = 241
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Label1: TLabel
+ Left = 32
+ Top = 11
+ Width = 35
+ Height = 13
+ Caption = 'Value 1'
+ end
+ object Label2: TLabel
+ Left = 32
+ Top = 35
+ Width = 35
+ Height = 13
+ Caption = 'Value 2'
+ end
+ object Label3: TLabel
+ Left = 32
+ Top = 59
+ Width = 20
+ Height = 13
+ Caption = 'Sum'
+ end
+ object Label4: TLabel
+ Left = 32
+ Top = 308
+ Width = 35
+ Height = 13
+ Caption = 'Status:'
+ end
+ object lbl_Status: TLabel
+ Left = 72
+ Top = 308
+ Width = 3
+ Height = 13
+ end
+ object ed_Value1: TEdit
+ Left = 80
+ Top = 8
+ Width = 121
+ Height = 21
+ TabOrder = 0
+ Text = '5'
+ end
+ object ed_Value2: TEdit
+ Left = 80
+ Top = 32
+ Width = 121
+ Height = 21
+ TabOrder = 1
+ Text = '8'
+ end
+ object CalcLiveButton: TButton
+ Left = 32
+ Top = 88
+ Width = 169
+ Height = 22
+ Caption = 'Calc Live (This will take 10 secs!)'
+ TabOrder = 2
+ OnClick = CalcLiveButtonClick
+ end
+ object CalcAsyncHttpButton: TButton
+ Left = 32
+ Top = 128
+ Width = 169
+ Height = 22
+ Caption = 'Calc Async (Http)'
+ TabOrder = 3
+ OnClick = CalcAsyncHttpButtonClick
+ end
+ object GetResultButton: TButton
+ Left = 32
+ Top = 271
+ Width = 169
+ Height = 22
+ Caption = 'Retrieve Result'
+ Enabled = False
+ TabOrder = 4
+ OnClick = GetResultButtonClick
+ end
+ object ed_Result: TEdit
+ Left = 80
+ Top = 56
+ Width = 121
+ Height = 21
+ ParentColor = True
+ ReadOnly = True
+ TabOrder = 5
+ end
+ object CheckForAnswerBytton: TButton
+ Left = 32
+ Top = 248
+ Width = 169
+ Height = 22
+ Caption = 'Check if Answer is Available'
+ Enabled = False
+ TabOrder = 6
+ OnClick = CheckForAnswerByttonClick
+ end
+ object CalcAsyncUdpButton: TButton
+ Left = 32
+ Top = 150
+ Width = 169
+ Height = 22
+ Caption = 'Calc Async (UDP)'
+ TabOrder = 7
+ OnClick = CalcAsyncUdpButtonClick
+ end
+ object btn_CalcAsyncEmail: TButton
+ Left = 32
+ Top = 172
+ Width = 169
+ Height = 22
+ Caption = 'Calc Async (Email)'
+ TabOrder = 8
+ OnClick = btn_CalcAsyncEmailClick
+ end
+ object bSetupEmailSettings: TButton
+ Left = 32
+ Top = 197
+ Width = 169
+ Height = 22
+ Caption = 'Setup of email settings...'
+ TabOrder = 9
+ OnClick = bSetupEmailSettingsClick
+ end
+ object ROBINMessage1: TROBinMessage
+ Top = 296
+ end
+ object ROWinInetHTTPChannel1: TROWinInetHTTPChannel
+ UserAgent = 'RemObjects SDK'
+ TargetURL = 'http://localhost:8099/bin'
+ ServerLocators = <>
+ DispatchOptions = []
+ Left = 32
+ Top = 296
+ end
+ object ROIndyUDPChannel1: TROIndyUDPChannel
+ AsyncTimeOut = 50000
+ Retrys = 5
+ IndyClient.Port = 8098
+ Port = 8098
+ ServerLocators = <>
+ DispatchOptions = []
+ Left = 64
+ Top = 296
+ end
+ object ROEmailChannel: TROEmailChannel
+ Pop3ServerAddress = 'mail.elitedev.com'
+ SmtpServerAddress = 'mail.elitedev.com'
+ ServerEmail = 'testserver@remobjects.com'
+ ClientEmail = 'testclient@remobjects.com'
+ SmtpClient.Host = 'mail.elitedev.com'
+ Pop3Client.Host = 'mail.elitedev.com'
+ Pop3Client.Password = 'testclient'
+ Pop3Password = 'testclient'
+ ServerLocators = <>
+ DispatchOptions = []
+ Left = 93
+ Top = 295
+ end
+ object ROPostMessage: TROPostMessage
+ Left = 122
+ Top = 297
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncClientMain.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncClientMain.pas
new file mode 100644
index 0000000..fbf1a17
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncClientMain.pas
@@ -0,0 +1,239 @@
+unit AsyncClientMain;
+
+interface
+{$I RemObjects.inc}
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, StdCtrls, uROWinInetHttpChannel,
+ uROClient, uROBINMessage,
+ AsyncLibrary_Async, ExtCtrls, uROIndyUDPChannel, uROPostMessage,
+ uROIndyEmailChannel;
+
+type
+ TAsyncClientMainForm = class(TForm)
+ Label1: TLabel;
+ Label2: TLabel;
+ Label3: TLabel;
+ Label4: TLabel;
+ lbl_Status: TLabel;
+ ed_Value1: TEdit;
+ ed_Value2: TEdit;
+ CalcLiveButton: TButton;
+ CalcAsyncHttpButton: TButton;
+ GetResultButton: TButton;
+ ed_Result: TEdit;
+ CheckForAnswerBytton: TButton;
+ CalcAsyncUdpButton: TButton;
+ ROBINMessage1: TROBinMessage;
+ ROWinInetHTTPChannel1: TROWinInetHTTPChannel;
+ ROIndyUDPChannel1: TROIndyUDPChannel;
+ btn_CalcAsyncEmail: TButton;
+ bSetupEmailSettings: TButton;
+ ROEmailChannel: TROEmailChannel;
+ ROPostMessage: TROPostMessage;
+ procedure CalcLiveButtonClick(Sender: TObject);
+ procedure CalcAsyncHttpButtonClick(Sender: TObject);
+ procedure GetResultButtonClick(Sender: TObject);
+ procedure CheckForAnswerByttonClick(Sender: TObject);
+ procedure CalcAsyncUdpButtonClick(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ procedure btn_CalcAsyncEmailClick(Sender: TObject);
+ procedure bSetupEmailSettingsClick(Sender: TObject);
+ protected
+ fAsyncService: IAsyncService_Async;
+ procedure AdjustButtons;
+ procedure SetupEmailClient;
+ public
+ { Public declarations }
+ end;
+
+var
+ AsyncClientMainForm: TAsyncClientMainForm;
+
+implementation
+uses
+ AsyncLibrary_Intf, IdStack, async_Emailsettings, IdSMTP;
+
+
+{$R *.dfm}
+
+procedure TAsyncClientMainForm.CalcLiveButtonClick(Sender: TObject);
+begin
+ Screen.Cursor := crHourGlass;
+ try
+ with CoAsyncService.Create(ROBINMessage1, ROWinInetHTTPChannel1) do begin
+ ed_Result.Text := '';
+ ed_Result.Repaint();
+ ed_Result.Text := IntToStr(Sum(StrToInt(ed_Value1.Text), StrToInt(ed_Value2.Text)));
+ end; { with }
+ finally
+ Screen.Cursor := crDefault;
+ end; { try/finally }
+end;
+
+procedure TAsyncClientMainForm.CalcAsyncHttpButtonClick(Sender: TObject);
+begin
+ Screen.Cursor := crHourGlass;
+ try
+
+ if not Assigned(fAsyncService) then
+ fAsyncService := CoAsyncService_Async.Create(ROBINMessage1, ROWinInetHTTPChannel1);
+
+ ed_Result.Text := '';
+ ed_Result.Repaint();
+
+ fAsyncService.Invoke_Sum(StrToInt(ed_Value1.Text), StrToInt(ed_Value2.Text));
+ AdjustButtons();
+
+ finally
+ Screen.Cursor := crDefault;
+ end;
+
+ ShowMessage('The request has been sent to the Server.'#13'Click "Retrieve Result" to check if an answer has been received yet.');
+end;
+
+procedure TAsyncClientMainForm.CalcAsyncUdpButtonClick(Sender: TObject);
+begin
+ Screen.Cursor := crHourGlass;
+ try
+
+ if not Assigned(fAsyncService) then
+ fAsyncService := CoAsyncService_Async.Create(ROBINMessage1, ROIndyUDPChannel1);
+
+ ed_Result.Text := '';
+ ed_Result.Repaint();
+
+ fAsyncService.Invoke_Sum(StrToInt(ed_Value1.Text), StrToInt(ed_Value2.Text));
+ AdjustButtons();
+
+ finally
+ Screen.Cursor := crDefault;
+ end;
+
+ ShowMessage('The request has been sent to the Server.'#13'Click "Retrieve Result" to check if an answer has been received yet.');
+end;
+
+procedure TAsyncClientMainForm.GetResultButtonClick(Sender: TObject);
+begin
+ if not Assigned(fAsyncService) then exit;
+
+ Screen.Cursor := crHourGlass;
+ try
+
+ if fAsyncService.AnswerReceived then begin
+ ed_Result.Text := IntToStr(fAsyncService.Retrieve_Sum());
+ fAsyncService := nil;
+ lbl_Status.Caption := 'Idle';
+ end
+ else begin
+ ShowMessage('Sorry, no answer yet.');
+ end;
+ AdjustButtons();
+
+ finally
+ Screen.Cursor := crDefault;
+ end;
+end;
+
+procedure TAsyncClientMainForm.CheckForAnswerByttonClick(Sender: TObject);
+begin
+ Screen.Cursor := crHourGlass;
+ try
+
+ if Assigned(fAsyncService) then begin
+ if fAsyncService.AnswerReceived then begin
+ lbl_Status.Caption := 'Answer Received';
+ ShowMessage('Answer received!');
+ end
+ else if fAsyncService.Busy then begin
+ lbl_Status.Caption := 'Busy';
+ ShowMessage('Sorry, no answer yet.');
+ end
+ else begin
+ lbl_Status.Caption := 'Idle';
+ ShowMessage('Sorry, no answer yet.');
+ end;
+ end;
+
+ finally
+ Screen.Cursor := crDefault;
+ end;
+end;
+
+procedure TAsyncClientMainForm.AdjustButtons;
+begin
+ CalcAsyncHttpButton.Enabled := not Assigned(fAsyncService);
+ CalcAsyncUdpButton.Enabled := not Assigned(fAsyncService);
+ GetResultButton.Enabled := Assigned(fAsyncService);
+ CheckForAnswerBytton.Enabled := Assigned(fAsyncService);
+ btn_CalcAsyncEmail.Enabled := not Assigned(fAsyncService);
+end;
+
+procedure TAsyncClientMainForm.SetupEmailClient;
+begin
+ ROEmailChannel.ServerEmail := ServerEmail;
+ ROEmailChannel.ClientEmail := ClientEmail;
+ {$IFDEF RemObjects_INDY8}
+ ROEmailChannel.Pop3Client.UserId := POP3UserName;
+ ROEmailChannel.SmtpClient.UserId := SMTPUserName;
+ {$ELSE}
+ ROEmailChannel.Pop3Client.Username := POP3UserName;
+ ROEmailChannel.SmtpClient.Username := SMTPUserName;
+ {$ENDIF}
+ {$IFDEF RemObjects_INDY10}
+ if SMTPUserName <> '' then
+ ROEmailChannel.SmtpClient.AuthType := atSASL
+ else
+ ROEmailChannel.SmtpClient.AuthType := atNone;
+ {$ELSE}
+ if SMTPUserName <> '' then
+ ROEmailChannel.SmtpClient.AuthenticationType := atLogin
+ else
+ ROEmailChannel.SmtpClient.AuthenticationType := atNone;
+ {$ENDIF}
+ ROEmailChannel.Pop3Client.Password := Pop3Password;
+ ROEmailChannel.Pop3Client.Host := POP3host;
+ ROEmailChannel.Pop3Client.Port := POP3Port;
+ ROEmailChannel.SmtpClient.Password := SMTPPassword;
+ ROEmailChannel.SmtpClient.Host := SMTPhost;
+ ROEmailChannel.SmtpClient.Port := SMTPPort;
+end;
+
+procedure TAsyncClientMainForm.FormCreate(Sender: TObject);
+begin
+ async_Emailsettings.LoadEmailSettings;
+end;
+
+procedure TAsyncClientMainForm.bSetupEmailSettingsClick(Sender: TObject);
+begin
+ async_Emailsettings.SetupEmailSettings(True);
+ SetupEmailClient;
+end;
+
+procedure TAsyncClientMainForm.btn_CalcAsyncEmailClick(Sender: TObject);
+begin
+ if SMTPhost = 'smtphost' then async_Emailsettings.SetupEmailSettings(True);
+ SetupEmailClient;
+
+ Screen.Cursor := crHourGlass;
+ try
+
+ if not Assigned(fAsyncService) then
+ fAsyncService := CoAsyncService_Async.Create(ROPostMessage, ROEmailChannel);
+
+ ed_Result.Text := '';
+ ed_Result.Repaint();
+
+ fAsyncService.Invoke_Sum(StrToInt(ed_Value1.Text), StrToInt(ed_Value2.Text));
+ lbl_Status.Caption := 'Busy';
+ AdjustButtons();
+
+ finally
+ Screen.Cursor := crDefault;
+ end;
+
+ ShowMessage('The request has been sent to the Server.'#13'Click "Retrieve Result" to check if an answer has been received yet.');
+end;
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncGroup.Sample.html b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncGroup.Sample.html
new file mode 100644
index 0000000..70d7b54
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncGroup.Sample.html
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+ Async Sample
+
+
+
+Purpose
+This sample shows how to call methods on a RemObjects SDK server asynchronously. There may be times where you want to submit a request for information and defer receiving the result until a bit later.
+
+
+ A very simple calculation (Sum) is performed, but this has a built in ten second delay so that it is possible to query the server before the calculation is completed.
+
+
+Getting Started
+
+Compile and launch the server.
+Compile and run the client.
+Click on the Calc Live button to verify that the connection works.
+Try one or both of the Calc Async buttons and then try checking and/or receiving the result before and after ten seconds have passed.
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncGroup.bdsgroup b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncGroup.bdsgroup
new file mode 100644
index 0000000..f6ce983
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncGroup.bdsgroup
@@ -0,0 +1,20 @@
+
+
+
+
+ Default.Personality
+
+ 1.0
+ {E0A50BA1-0636-4593-90FE-0C133A79288D}
+
+
+
+
+
+ AsyncServer.bdsproj
+ AsyncClient.bdsproj
+ AsyncServer.exe AsyncClient.exe
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncGroup.bpg b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncGroup.bpg
new file mode 100644
index 0000000..0dabf49
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncGroup.bpg
@@ -0,0 +1,23 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = AsyncServer.exe AsyncClient.exe
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+AsyncServer.exe: AsyncServer.dpr
+ $(DCC)
+
+AsyncClient.exe: AsyncClient.dpr
+ $(DCC)
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncGroup.groupproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncGroup.groupproj
new file mode 100644
index 0000000..38cad47
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncGroup.groupproj
@@ -0,0 +1,40 @@
+
+
+ {cdfc88bc-0e18-4996-9f16-38b101e7bef5}
+
+
+
+
+ Default.Personality
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncLibrary.rodl b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncLibrary.rodl
new file mode 100644
index 0000000..de2a7b6
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncLibrary.rodl
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncLibrary_Async.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncLibrary_Async.pas
new file mode 100644
index 0000000..6b03b78
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncLibrary_Async.pas
@@ -0,0 +1,91 @@
+unit AsyncLibrary_Async;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROClasses, uROTypes, uROClientIntf, uROAsync,
+ {Project:} AsyncLibrary_Intf;
+
+type
+ IAsyncService_Async = interface;
+ CoAsyncService_Async = class;
+ TAsyncService_AsyncProxy = class;
+ { IAsyncService_Async }
+ IAsyncService_Async = interface(IROAsyncInterface)
+ ['{C9A9233F-C987-4EA6-A9AC-21B98FC33212}']
+ procedure Invoke_Sum(const A: Integer; const B: Integer);
+ function Retrieve_Sum: Integer;
+ end;
+
+ { CoAsyncService_Async }
+ CoAsyncService_Async = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IAsyncService_Async;
+ end;
+
+ { TAsyncService_AsyncProxy }
+ TAsyncService_AsyncProxy = class(TROAsyncProxy, IAsyncService_Async)
+ private
+ protected
+ function __GetInterfaceName:string; override;
+
+ procedure Invoke_Sum(const A: Integer; const B: Integer);
+ function Retrieve_Sum: Integer;
+ end;
+
+implementation
+
+uses
+ {vcl:} SysUtils;
+
+{ CoAsyncService }
+
+class function CoAsyncService_Async.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IAsyncService_Async;
+begin
+ result := TAsyncService_AsyncProxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TAsyncService_AsyncProxy }
+
+function TAsyncService_AsyncProxy.__GetInterfaceName:string;
+begin
+ result := 'AsyncService';
+end;
+
+procedure TAsyncService_AsyncProxy.Invoke_Sum(const A: Integer; const B: Integer);
+var __request:TStream;
+begin
+ __AssertProxyNotBusy('Sum');
+ __request := TMemoryStream.Create;
+
+ __Message.InitializeRequestMessage(__TransportChannel, 'AsyncLibrary', __InterfaceName, 'Sum');
+ __Message.Write('A', TypeInfo(Integer), A, []);
+ __Message.Write('B', TypeInfo(Integer), B, []);
+ __Message.Finalize;
+
+ __Message.WriteToStream(__request);
+ __DispatchAsyncRequest('Sum',__request);
+end;
+
+function TAsyncService_AsyncProxy.Retrieve_Sum: Integer;
+var __response:TStream;
+begin
+ __response := __RetrieveAsyncResponse('Sum');
+ __Message.ReadFromStream(__response);
+
+ __Message.Read('Result', TypeInfo(Integer), Result, []);
+
+ __response.Free();
+end;
+
+
+initialization
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncLibrary_Intf.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncLibrary_Intf.pas
new file mode 100644
index 0000000..4b451b1
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncLibrary_Intf.pas
@@ -0,0 +1,97 @@
+unit AsyncLibrary_Intf;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+{$I Remobjects.inc}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROXMLIntf, uROClasses, uROClient, uROTypes, uROClientIntf;
+
+const
+ { Library ID }
+ LibraryUID = '{D34B1991-1F3D-47A0-9984-50FE83013C35}';
+ TargetNamespace = '';
+
+ { Service Interface ID's }
+ IAsyncService_IID : TGUID = '{D34B1991-1F3D-47A0-9984-50FE83013C35}';
+
+ { Event ID's }
+
+type
+ { Forward declarations }
+ IAsyncService = interface;
+
+
+ { IAsyncService }
+ IAsyncService = interface
+ ['{D34B1991-1F3D-47A0-9984-50FE83013C35}']
+ function Sum(const A: Integer; const B: Integer): Integer;
+ end;
+
+ { CoAsyncService }
+ CoAsyncService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IAsyncService;
+ end;
+
+ { TAsyncService_Proxy }
+ TAsyncService_Proxy = class(TROProxy, IAsyncService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ function Sum(const A: Integer; const B: Integer): Integer;
+ end;
+
+implementation
+
+uses
+ {vcl:} SysUtils,
+ {RemObjects:} uROEventRepository, uROSerializer, uRORes;
+
+{ CoAsyncService }
+
+class function CoAsyncService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IAsyncService;
+begin
+ result := TAsyncService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TAsyncService_Proxy }
+
+function TAsyncService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'AsyncService';
+end;
+
+function TAsyncService_Proxy.Sum(const A: Integer; const B: Integer): Integer;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'AsyncLibrary', __InterfaceName, 'Sum');
+ __Message.Write('A', TypeInfo(Integer), A, []);
+ __Message.Write('B', TypeInfo(Integer), B, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Integer), result, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+initialization
+ RegisterProxyClass(IAsyncService_IID, TAsyncService_Proxy);
+
+
+finalization
+ UnregisterProxyClass(IAsyncService_IID);
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncLibrary_Invk.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncLibrary_Invk.pas
new file mode 100644
index 0000000..2704307
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncLibrary_Invk.pas
@@ -0,0 +1,58 @@
+unit AsyncLibrary_Invk;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+{$I Remobjects.inc}
+
+interface
+
+uses
+ {vcl:} Classes,
+ {RemObjects:} uROXMLIntf, uROServer, uROServerIntf, uROTypes, uROClientIntf,
+ {Generated:} AsyncLibrary_Intf;
+
+type
+ TAsyncService_Invoker = class(TROInvoker)
+ private
+ protected
+ published
+ procedure Invoke_Sum(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ end;
+
+implementation
+
+uses
+ {RemObjects:} uRORes, uROClient;
+
+{ TAsyncService_Invoker }
+
+procedure TAsyncService_Invoker.Invoke_Sum(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function Sum(const A: Integer; const B: Integer): Integer; }
+var
+ A: Integer;
+ B: Integer;
+ lResult: Integer;
+begin
+ try
+ __Message.Read('A', TypeInfo(Integer), A, []);
+ __Message.Read('B', TypeInfo(Integer), B, []);
+
+ lResult := (__Instance as IAsyncService).Sum(A, B);
+
+ __Message.InitializeResponseMessage(__Transport, 'AsyncLibrary', 'AsyncService', 'SumResponse');
+ __Message.Write('Result', TypeInfo(Integer), lResult, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ end;
+end;
+
+initialization
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncServer.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncServer.bdsproj
new file mode 100644
index 0000000..8dd85e0
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncServer.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {4461387A-7C30-4DB4-836E-3A0C1C86E8DA}
+
+
+
+
+ AsyncServer.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncServer.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncServer.dpr
new file mode 100644
index 0000000..28fd934
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncServer.dpr
@@ -0,0 +1,21 @@
+program AsyncServer;
+
+{#ROGEN:AsyncLibrary.rodl} // RemObjects: Careful, do not remove!
+
+uses
+ Forms,
+ AsyncServerMain in 'AsyncServerMain.pas' {AsyncServerMainForm},
+ AsyncLibrary_Intf in 'AsyncLibrary_Intf.pas',
+ AsyncLibrary_Invk in 'AsyncLibrary_Invk.pas',
+ AsyncService_Impl in 'AsyncService_Impl.pas',
+ async_EmailSettings in 'async_EmailSettings.pas' {async_EmailSettingsForm};
+
+{$R *.RES}
+{$R RODLFile.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'Async Server';
+ Application.CreateForm(TAsyncServerMainForm, AsyncServerMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncServer.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncServer.dproj
new file mode 100644
index 0000000..e9f8250
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncServer.dproj
@@ -0,0 +1,75 @@
+
+
+ {e99efd90-17b4-4f10-86db-c8fd2896599d}
+ AsyncServer.dpr
+ Debug
+ AnyCPU
+ DCC32
+ AsyncServer.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ AsyncServer.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncServer.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncServer.res
new file mode 100644
index 0000000..53aa370
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncServer.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncServerMain.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncServerMain.dfm
new file mode 100644
index 0000000..0defb3c
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncServerMain.dfm
@@ -0,0 +1,102 @@
+object AsyncServerMainForm: TAsyncServerMainForm
+ Left = 644
+ Top = 151
+ BorderStyle = bsDialog
+ Caption = 'Async Server'
+ ClientHeight = 98
+ ClientWidth = 227
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnClose = FormClose
+ OnCreate = FormCreate
+ PixelsPerInch = 96
+ TextHeight = 13
+ object RoPoweredByRemObjectsButton1: TROPoweredByRemObjectsButton
+ Left = 8
+ Top = 8
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ end
+ object bSetupEmailSettings: TButton
+ Left = 13
+ Top = 69
+ Width = 206
+ Height = 25
+ Caption = 'Setup of email settings...'
+ TabOrder = 0
+ OnClick = bSetupEmailSettingsClick
+ end
+ object ROMessage: TROBinMessage
+ Left = 40
+ Top = 8
+ end
+ object ROBPDXHTTPServer1: TROBPDXHTTPServer
+ Dispatchers = <
+ item
+ Name = 'ROMessage'
+ Message = ROMessage
+ Enabled = True
+ PathInfo = 'BIN'
+ end>
+ BPDXServer.ReleaseDate = '2002-09-01'
+ BPDXServer.ListenerThreadPriority = tpIdle
+ BPDXServer.SpawnedThreadPriority = tpIdle
+ BPDXServer.Suspend = False
+ BPDXServer.UseSSL = False
+ BPDXServer.UseThreadPool = True
+ BPDXServer.ServerPort = 8099
+ BPDXServer.ProtocolToBind = wpTCPOnly
+ BPDXServer.SocketOutputBufferSize = bsfNormal
+ BPDXServer.ServerType = stThreadBlocking
+ BPDXServer.ThreadCacheSize = 1000
+ BPDXServer.Timeout = 50000
+ BPDXServer.SupportKeepAlive = True
+ Port = 8099
+ SupportKeepAlive = True
+ Left = 8
+ Top = 8
+ end
+ object ROIndyUDPServer1: TROIndyUDPServer
+ Dispatchers = <
+ item
+ Name = 'ROMessage'
+ Message = ROMessage
+ Enabled = True
+ end>
+ IndyUDPServer.Bindings = <>
+ IndyUDPServer.DefaultPort = 8098
+ Port = 8098
+ Left = 72
+ Top = 8
+ end
+ object ROEmailServer: TROEmailServer
+ Dispatchers = <
+ item
+ Name = 'PostMessage'
+ Message = PostMessage
+ Enabled = True
+ end>
+ Pop3ServerAddress = 'mail.remobjects.com'
+ SmtpServerAddress = 'mail.remobjects.com'
+ ServerEmail = 'testserver@remobjects.com'
+ SmtpClient.Host = 'mail.remobjects.com'
+ SmtpClient.Password = 'testserver'
+ Pop3Client.Host = 'mail.remobjects.com'
+ Pop3Client.Password = 'testserver'
+ Pop3Password = 'testserver'
+ OnException = ROEmailServerException
+ Left = 104
+ Top = 8
+ end
+ object PostMessage: TROPostMessage
+ Left = 135
+ Top = 8
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncServerMain.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncServerMain.pas
new file mode 100644
index 0000000..003055d
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncServerMain.pas
@@ -0,0 +1,100 @@
+unit AsyncServerMain;
+
+interface
+{$I RemObjects.inc}
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ StdCtrls, uROClient, uROBINMessage, uROClientIntf, uROServer, uROBPDXTCPServer,
+ uROBPDXHTTPServer, uROPoweredByRemObjectsButton,
+ uROIndyUDPServer, uROPostMessage, uROIndyEmailServer;
+
+type
+ TAsyncServerMainForm = class(TForm)
+ ROMessage: TROBINMessage;
+ ROBPDXHTTPServer1: TROBPDXHTTPServer;
+ RoPoweredByRemObjectsButton1: TRoPoweredByRemObjectsButton;
+ ROIndyUDPServer1: TROIndyUDPServer;
+ bSetupEmailSettings: TButton;
+ ROEmailServer: TROEmailServer;
+ PostMessage: TROPostMessage;
+ procedure FormCreate(Sender: TObject);
+ procedure bSetupEmailSettingsClick(Sender: TObject);
+ procedure ROEmailServerException(aSender: TObject;
+ aExceptionClass: TClass; const aExceptionMessage: String);
+ procedure FormClose(Sender: TObject; var Action: TCloseAction);
+ private
+ procedure SetupEmailServer;
+ end;
+
+var
+ AsyncServerMainForm: TAsyncServerMainForm;
+
+implementation
+
+uses
+ async_EmailSettings, IdSMTP,
+ IdStack;
+
+{$R *.DFM}
+
+procedure TAsyncServerMainForm.FormCreate(Sender: TObject);
+begin
+ async_EmailSettings.LoadEmailSettings;
+ if POP3host = 'pop3host' then async_EmailSettings.SetupEmailSettings(False);
+ SetupEmailServer;
+ ROBPDXHTTPServer1.Active := True;
+ ROIndyUDPServer1.Active := True;
+ ROEmailServer.Active:=True;
+end;
+
+procedure TAsyncServerMainForm.bSetupEmailSettingsClick(Sender: TObject);
+begin
+ async_EmailSettings.SetupEmailSettings(False);
+ SetupEmailServer;
+end;
+
+procedure TAsyncServerMainForm.ROEmailServerException(aSender: TObject;
+ aExceptionClass: TClass; const aExceptionMessage: String);
+begin
+ ShowMessage('There was a problem in the Email Server Thread:'#13#13 + aExceptionClass.ClassName + ': ' + aExceptionMessage);
+end;
+
+procedure TAsyncServerMainForm.SetupEmailServer;
+begin
+ ROEmailServer.Active := False;
+ ROEmailServer.ServerEmail := ServerEmail;
+ {$IFDEF RemObjects_INDY8}
+ ROEmailServer.Pop3Client.UserId := POP3UserName;
+ ROEmailServer.SmtpClient.UserId := SMTPUserName;
+ {$ELSE}
+ ROEmailServer.Pop3Client.Username := POP3UserName;
+ ROEmailServer.SmtpClient.Username := SMTPUserName;
+ {$ENDIF}
+ ROEmailServer.Pop3Client.Password := Pop3Password;
+ ROEmailServer.Pop3Client.Host := POP3host;
+ ROEmailServer.Pop3Client.Port := POP3Port;
+ ROEmailServer.SmtpClient.Password := SMTPPassword;
+ ROEmailServer.SmtpClient.Host := SMTPhost;
+ ROEmailServer.SmtpClient.Port := SMTPPort;
+ {$IFDEF RemObjects_INDY10}
+ if SMTPUserName <> '' then
+ ROEmailServer.SmtpClient.AuthType := atSASL
+ else
+ ROEmailServer.SmtpClient.AuthType := atNone;
+ {$ELSE}
+ if SMTPUserName <> '' then
+ ROEmailServer.SmtpClient.AuthenticationType := atLogin
+ else
+ ROEmailServer.SmtpClient.AuthenticationType := atNone;
+ {$ENDIF}
+ ROEmailServer.Active := True;
+end;
+
+procedure TAsyncServerMainForm.FormClose(Sender: TObject;
+ var Action: TCloseAction);
+begin
+ ROEmailServer.Active := False;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncService_Impl.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncService_Impl.pas
new file mode 100644
index 0000000..64cc650
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/AsyncService_Impl.pas
@@ -0,0 +1,50 @@
+unit AsyncService_Impl;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ This is where you are supposed to code the implementation of your objects. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils,
+ {RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
+ {Generated:} AsyncLibrary_Intf;
+
+type
+ { TAsyncService }
+ TAsyncService = class(TRORemotable, IAsyncService)
+ private
+ protected
+ { IAsyncService methods }
+ function Sum(const A: Integer; const B: Integer): Integer;
+ end;
+
+implementation
+
+uses
+ {Generated:} AsyncLibrary_Invk;
+
+procedure Create_AsyncService(out anInstance: IUnknown);
+begin
+ anInstance := TAsyncService.Create;
+end;
+
+{ AsyncService }
+
+function TAsyncService.Sum(const A: Integer; const B: Integer): Integer;
+begin
+ Result := A + B;
+ Sleep(10000); { Simulate that calculations actually took 10 seconds. }
+end;
+
+initialization
+ TROClassFactory.Create('AsyncService', Create_AsyncService, TAsyncService_Invoker);
+
+finalization
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/RODLFILE.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/RODLFILE.res
new file mode 100644
index 0000000..4521a5d
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/RODLFILE.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/async_EmailSettings.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/async_EmailSettings.dfm
new file mode 100644
index 0000000..fd04f05
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/async_EmailSettings.dfm
@@ -0,0 +1,229 @@
+object async_EmailSettingsForm: Tasync_EmailSettingsForm
+ Left = 388
+ Top = 181
+ BorderIcons = [biSystemMenu]
+ BorderStyle = bsDialog
+ Caption = 'Email Settings'
+ ClientHeight = 173
+ ClientWidth = 492
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ OnShow = FormShow
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Label9: TLabel
+ Left = 12
+ Top = 124
+ Width = 61
+ Height = 13
+ Caption = 'Server email:'
+ end
+ object lClientEmail: TLabel
+ Left = 256
+ Top = 124
+ Width = 56
+ Height = 13
+ Caption = 'Client email:'
+ end
+ object GroupBox1: TGroupBox
+ Left = 3
+ Top = 2
+ Width = 240
+ Height = 114
+ Caption = 'POP3'
+ TabOrder = 0
+ DesignSize = (
+ 240
+ 114)
+ object Label1: TLabel
+ Left = 9
+ Top = 17
+ Width = 25
+ Height = 13
+ Caption = 'Host:'
+ end
+ object Label2: TLabel
+ Left = 9
+ Top = 41
+ Width = 22
+ Height = 13
+ Caption = 'Port:'
+ end
+ object Label3: TLabel
+ Left = 9
+ Top = 65
+ Width = 51
+ Height = 13
+ Caption = 'Username:'
+ end
+ object Label4: TLabel
+ Left = 9
+ Top = 89
+ Width = 49
+ Height = 13
+ Caption = 'Password:'
+ end
+ object ePOP3Host: TEdit
+ Left = 85
+ Top = 13
+ Width = 150
+ Height = 21
+ Anchors = [akLeft, akTop, akRight]
+ TabOrder = 0
+ end
+ object ePOP3Port: TMaskEdit
+ Left = 85
+ Top = 37
+ Width = 49
+ Height = 21
+ Anchors = [akLeft, akTop, akRight]
+ EditMask = '99990;1; '
+ MaxLength = 5
+ TabOrder = 1
+ Text = ' '
+ end
+ object ePOP3Usename: TEdit
+ Left = 85
+ Top = 61
+ Width = 150
+ Height = 21
+ Anchors = [akLeft, akTop, akRight]
+ TabOrder = 2
+ end
+ object ePOP3Password: TEdit
+ Left = 85
+ Top = 85
+ Width = 150
+ Height = 21
+ Anchors = [akLeft, akTop, akRight]
+ TabOrder = 3
+ end
+ end
+ object GroupBox2: TGroupBox
+ Left = 247
+ Top = 2
+ Width = 240
+ Height = 114
+ Caption = 'SMTP'
+ TabOrder = 1
+ DesignSize = (
+ 240
+ 114)
+ object Label5: TLabel
+ Left = 9
+ Top = 17
+ Width = 25
+ Height = 13
+ Caption = 'Host:'
+ end
+ object Label6: TLabel
+ Left = 9
+ Top = 41
+ Width = 22
+ Height = 13
+ Caption = 'Port:'
+ end
+ object lSMTPUserName: TLabel
+ Left = 9
+ Top = 65
+ Width = 51
+ Height = 13
+ Anchors = [akLeft, akBottom]
+ Caption = 'Username:'
+ end
+ object lSMTPPassword: TLabel
+ Left = 9
+ Top = 89
+ Width = 49
+ Height = 13
+ Anchors = [akLeft, akBottom]
+ Caption = 'Password:'
+ end
+ object eSMTPHost: TEdit
+ Left = 85
+ Top = 13
+ Width = 150
+ Height = 21
+ Anchors = [akLeft, akTop, akRight]
+ TabOrder = 0
+ end
+ object eSMTPPort: TMaskEdit
+ Left = 85
+ Top = 37
+ Width = 49
+ Height = 21
+ Anchors = [akLeft, akTop, akRight]
+ EditMask = '99990;1; '
+ MaxLength = 5
+ TabOrder = 1
+ Text = ' '
+ end
+ object eSMTPUserName: TEdit
+ Left = 85
+ Top = 61
+ Width = 150
+ Height = 21
+ Anchors = [akLeft, akRight, akBottom]
+ TabOrder = 2
+ end
+ object eSMTPPassword: TEdit
+ Left = 85
+ Top = 85
+ Width = 150
+ Height = 21
+ Anchors = [akLeft, akRight, akBottom]
+ TabOrder = 3
+ end
+ end
+ object eServerEmail: TEdit
+ Left = 88
+ Top = 120
+ Width = 150
+ Height = 21
+ TabOrder = 2
+ end
+ object eClientEmail: TEdit
+ Left = 332
+ Top = 120
+ Width = 150
+ Height = 21
+ TabOrder = 3
+ end
+ object OKButton: TButton
+ Left = 331
+ Top = 146
+ Width = 75
+ Height = 22
+ Anchors = [akRight, akBottom]
+ Caption = 'OK'
+ ModalResult = 1
+ TabOrder = 4
+ OnClick = OKButtonClick
+ end
+ object CancelButton: TButton
+ Left = 410
+ Top = 146
+ Width = 75
+ Height = 22
+ Anchors = [akRight, akBottom]
+ Cancel = True
+ Caption = 'Cancel'
+ ModalResult = 2
+ TabOrder = 5
+ end
+ object cbSMTPAuthentication: TCheckBox
+ Left = 11
+ Top = 149
+ Width = 249
+ Height = 17
+ Anchors = [akLeft, akBottom]
+ Caption = 'My SMTP server requires authentication'
+ TabOrder = 6
+ OnClick = cbSMTPAuthenticationClick
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/async_EmailSettings.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/async_EmailSettings.pas
new file mode 100644
index 0000000..238c2f4
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Async/async_EmailSettings.pas
@@ -0,0 +1,173 @@
+unit async_EmailSettings;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, StdCtrls, Mask;
+
+type
+ Tasync_EmailSettingsForm = class(TForm)
+ GroupBox1: TGroupBox;
+ ePOP3Host: TEdit;
+ Label1: TLabel;
+ ePOP3Port: TMaskEdit;
+ Label2: TLabel;
+ Label3: TLabel;
+ ePOP3Usename: TEdit;
+ Label4: TLabel;
+ ePOP3Password: TEdit;
+ GroupBox2: TGroupBox;
+ Label5: TLabel;
+ Label6: TLabel;
+ lSMTPUserName: TLabel;
+ lSMTPPassword: TLabel;
+ eSMTPHost: TEdit;
+ eSMTPPort: TMaskEdit;
+ eSMTPUserName: TEdit;
+ eSMTPPassword: TEdit;
+ Label9: TLabel;
+ eServerEmail: TEdit;
+ lClientEmail: TLabel;
+ eClientEmail: TEdit;
+ OKButton: TButton;
+ CancelButton: TButton;
+ cbSMTPAuthentication: TCheckBox;
+ procedure FormShow(Sender: TObject);
+ procedure OKButtonClick(Sender: TObject);
+ procedure cbSMTPAuthenticationClick(Sender: TObject);
+ private
+ { Private declarations }
+ FClientSettings: Boolean;
+ public
+ { Public declarations }
+ end;
+
+var
+ ServerEmail: string;
+ ClientEmail: string;
+ // pop3
+ POP3UserName: string;
+ Pop3Password: string;
+ POP3host: string;
+ POP3Port: integer;
+ // smtp
+ SMTPUserName: string;
+ SMTPPassword: string;
+ SMTPhost: string;
+ SMTPPort: integer;
+ SMTPAuthentication: boolean;
+
+procedure SetupEmailSettings(AClientSettings: Boolean);
+procedure LoadEmailSettings;
+procedure SaveEmailSettings;
+implementation
+uses
+ IniFiles;
+{$R *.dfm}
+
+const
+ ini_Section = 'Global';
+
+procedure SetupEmailSettings(AClientSettings: Boolean);
+begin
+ with Tasync_EmailSettingsForm.Create(Application) do try
+ FClientSettings := AClientSettings;
+ ShowModal;
+ finally
+ Release;
+ end;
+end;
+
+procedure LoadEmailSettings;
+begin
+ with TIniFile.Create(ChangeFileExt(Application.ExeName, '.INI')) do begin
+ ServerEmail := ReadString(ini_Section, 'ServerEmail', 'server@email.com');
+ ClientEmail := ReadString(ini_Section, 'ClientEmail', 'client@email.com');
+ POP3UserName := ReadString(ini_Section, 'POP3UserName', 'username');
+ Pop3Password := ReadString(ini_Section, 'Pop3Password', 'password');
+ POP3host := ReadString(ini_Section, 'POP3host', 'pop3host');
+ POP3Port := ReadInteger(ini_Section, 'POP3Port', 110);
+ SMTPAuthentication := ReadInteger(ini_Section, 'SMTPAuthentication', 0) <> 0;
+ if SMTPAuthentication then begin
+ SMTPUserName := ReadString(ini_Section, 'SMTPUserName', 'username');
+ SMTPPassword := ReadString(ini_Section, 'SMTPPassword', 'password');
+ end;
+ SMTPhost := ReadString(ini_Section, 'SMTPhost', 'smtphost');
+ SMTPPort := ReadInteger(ini_Section, 'SMTPPort', 25);
+ end;
+end;
+
+procedure SaveEmailSettings;
+begin
+ with TIniFile.Create(ChangeFileExt(Application.ExeName, '.INI')) do begin
+ WriteString(ini_Section, 'ServerEmail', ServerEmail);
+ WriteString(ini_Section, 'ClientEmail', ClientEmail);
+ WriteString(ini_Section, 'POP3UserName', POP3UserName);
+ WriteString(ini_Section, 'Pop3Password', Pop3Password);
+ WriteString(ini_Section, 'POP3host', POP3host);
+ WriteInteger(ini_Section, 'POP3Port', POP3Port);
+ WriteInteger(ini_Section, 'SMTPAuthentication', ord(SMTPAuthentication));
+ if SMTPAuthentication then begin
+ WriteString(ini_Section, 'SMTPUserName', SMTPUserName);
+ WriteString(ini_Section, 'SMTPPassword', SMTPPassword);
+ end;
+ WriteString(ini_Section, 'SMTPhost', SMTPhost);
+ WriteInteger(ini_Section, 'SMTPPort', SMTPPort);
+ end;
+end;
+
+procedure Tasync_EmailSettingsForm.FormShow(Sender: TObject);
+begin
+ eClientEmail.Visible := FClientSettings;
+ lClientEmail.Visible := FClientSettings;
+ eServerEmail.Text := ServerEmail;
+ eClientEmail.Text := ClientEmail;
+ ePOP3Host.Text := POP3host;
+ ePOP3Port.Text := IntToStr(POP3Port);
+ ePOP3Usename.Text := POP3UserName;
+ ePOP3Password.Text := Pop3Password;
+ eSMTPHost.Text := SMTPhost;
+ eSMTPPort.Text := IntToStr(SMTPPort);
+ cbSMTPAuthentication.Checked := SMTPAuthentication;
+ cbSMTPAuthenticationClick(cbSMTPAuthentication);
+ if cbSMTPAuthentication.Checked then begin
+ eSMTPUsername.Text := SMTPUserName;
+ eSMTPPassword.Text := SMTPPassword;
+ end
+ else begin
+ eSMTPUsername.Text := '';
+ eSMTPPassword.Text := '';
+ end;
+end;
+
+procedure Tasync_EmailSettingsForm.OKButtonClick(Sender: TObject);
+begin
+ ServerEmail := eServerEmail.Text;
+ ClientEmail := eClientEmail.Text;
+ POP3host := ePOP3Host.Text;
+ POP3Port := StrToInt(Trim(ePOP3Port.Text));
+ POP3UserName := ePOP3Usename.Text;
+ Pop3Password := ePOP3Password.Text;
+ SMTPhost := eSMTPHost.Text;
+ SMTPPort := StrToInt(Trim(eSMTPPort.Text));
+ SMTPAuthentication := cbSMTPAuthentication.Checked;
+ if SMTPAuthentication then begin
+ SMTPUserName := eSMTPUsername.Text;
+ SMTPPassword := eSMTPPassword.Text;
+ end;
+ SaveEmailSettings;
+end;
+
+procedure Tasync_EmailSettingsForm.cbSMTPAuthenticationClick(Sender: TObject);
+begin
+ with cbSMTPAuthentication do begin
+ eSMTPUserName.Enabled := Checked;
+ eSMTPPassword.Enabled := Checked;
+ lSMTPUserName.Enabled := Checked;
+ lSMTPPassword.Enabled := Checked;
+ end;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServer.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServer.bdsproj
new file mode 100644
index 0000000..444ca0e
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServer.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {724E1348-EDEF-4C3A-A7E1-F8D53B3785AA}
+
+
+
+
+ AutoServer.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServer.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServer.dpr
new file mode 100644
index 0000000..cdfeb34
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServer.dpr
@@ -0,0 +1,21 @@
+program AutoServer;
+
+{#ROGEN:AutoServer.rodl} // RemObjects: Careful, do not remove!
+
+uses
+ uROComInit,
+ Forms,
+ AutoServer_ServerMain in 'AutoServer_ServerMain.pas' {AutoServer_ServerMainForm},
+ AutoServerLibrary_Intf in 'AutoServerLibrary_Intf.pas',
+ AutoServerLibrary_Invk in 'AutoServerLibrary_Invk.pas',
+ AutoServerService_Impl in 'AutoServerService_Impl.pas';
+
+{$R *.res}
+{$R RODLFile.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'AutoServer - Server';
+ Application.CreateForm(TAutoServer_ServerMainForm, AutoServer_ServerMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServer.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServer.dproj
new file mode 100644
index 0000000..0d177d8
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServer.dproj
@@ -0,0 +1,75 @@
+
+
+ {6794d47d-6c7b-4270-b1b7-31860654e4e9}
+ AutoServer.dpr
+ Debug
+ AnyCPU
+ DCC32
+ AutoServer.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ AutoServer.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServer.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServer.res
new file mode 100644
index 0000000..3eab0f7
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServer.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServer.rodl b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServer.rodl
new file mode 100644
index 0000000..d9db033
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServer.rodl
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServerGroup.Sample.html b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServerGroup.Sample.html
new file mode 100644
index 0000000..bdb2db6
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServerGroup.Sample.html
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+AutoServer example
+
+Purpose This sample shows how a client can control its server when they are both running locally. This is useful if you want to provide a simple standard alone solution which is easily upgraded to multi-tier (or you might want to provide both options).
To try this sample, compile or build both projects and then run the client. On start up, the client will look for an existing server window and start the server if necessary.
The server supplies a GetEnvironment method which returns the value of an environment variable.
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServerGroup.bdsgroup b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServerGroup.bdsgroup
new file mode 100644
index 0000000..e0d455c
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServerGroup.bdsgroup
@@ -0,0 +1,20 @@
+
+
+
+
+ Default.Personality
+
+ 1.0
+ {0C1A0C0A-4CEF-4478-9F01-8E1BE15CF416}
+
+
+
+
+
+ AutoServer.bdsproj
+ AutoServer_Client.bdsproj
+ AutoServer.exe AutoServer_Client.exe
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServerGroup.bpg b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServerGroup.bpg
new file mode 100644
index 0000000..e8874db
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServerGroup.bpg
@@ -0,0 +1,23 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = AutoServer.exe AutoServer_Client.exe
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+AutoServer_Client.exe: AutoServer_Client.dpr
+ $(DCC)
+
+AutoServer.exe: AutoServer.dpr
+ $(DCC)
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServerGroup.groupproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServerGroup.groupproj
new file mode 100644
index 0000000..03d7b15
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServerGroup.groupproj
@@ -0,0 +1,40 @@
+
+
+ {0a3399f8-920b-4d34-a340-d1364c5a4d1f}
+
+
+
+
+ Default.Personality
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServerLibrary_Intf.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServerLibrary_Intf.pas
new file mode 100644
index 0000000..0e71579
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServerLibrary_Intf.pas
@@ -0,0 +1,108 @@
+unit AutoServerLibrary_Intf;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROClasses, uROClient, uROTypes, uROClientIntf;
+
+const
+ { Library ID }
+ LibraryUID = '{E9FFBC72-4E93-4399-9AEE-E12D20E5CF13}';
+
+ { Service Interface ID's }
+ IAutoServerService_IID : TGUID = '{03EF69F8-5396-4CD6-BD4E-FC172489F603}';
+
+ { Event ID's }
+
+type
+ { Forward declarations }
+ IAutoServerService = interface;
+
+
+ { IAutoServerService }
+ IAutoServerService = interface
+ ['{03EF69F8-5396-4CD6-BD4E-FC172489F603}']
+ function GetServerTime: DateTime;
+ function GetEnvironment(const Environment: String): String;
+ end;
+
+ { CoAutoServerService }
+ CoAutoServerService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IAutoServerService;
+ end;
+
+ { TAutoServerService_Proxy }
+ TAutoServerService_Proxy = class(TROProxy, IAutoServerService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ function GetServerTime: DateTime;
+ function GetEnvironment(const Environment: String): String;
+ end;
+
+implementation
+
+uses
+ {vcl:} SysUtils,
+ {RemObjects:} uROEventRepository, uRORes;
+
+{ CoAutoServerService }
+
+class function CoAutoServerService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IAutoServerService;
+begin
+ result := TAutoServerService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TAutoServerService_Proxy }
+
+function TAutoServerService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'AutoServerService';
+end;
+
+function TAutoServerService_Proxy.GetServerTime: DateTime;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'AutoServerLibrary', __InterfaceName, 'GetServerTime');
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(DateTime), result, [paIsDateTime]);
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+function TAutoServerService_Proxy.GetEnvironment(const Environment: String): String;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'AutoServerLibrary', __InterfaceName, 'GetEnvironment');
+ __Message.Write('Environment', TypeInfo(String), Environment, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(String), result, []);
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+initialization
+ RegisterProxyClass(IAutoServerService_IID, TAutoServerService_Proxy);
+
+
+finalization
+ UnregisterProxyClass(IAutoServerService_IID);
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServerLibrary_Invk.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServerLibrary_Invk.pas
new file mode 100644
index 0000000..11bf0fc
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServerLibrary_Invk.pas
@@ -0,0 +1,69 @@
+unit AutoServerLibrary_Invk;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes,
+ {RemObjects:} uROServer, uROServerIntf, uROTypes, uROClientIntf,
+ {Generated:} AutoServerLibrary_Intf;
+
+type
+ TAutoServerService_Invoker = class(TROInvoker)
+ private
+ protected
+ published
+ procedure Invoke_GetServerTime(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_GetEnvironment(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ end;
+
+implementation
+
+uses
+ {RemObjects:} uRORes, uROClient;
+
+{ TAutoServerService_Invoker }
+
+procedure TAutoServerService_Invoker.Invoke_GetServerTime(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function GetServerTime: DateTime; }
+var
+ lResult: DateTime;
+begin
+ try
+ lResult := (__Instance as IAutoServerService).GetServerTime;
+
+ __Message.InitializeResponseMessage(__Transport, 'AutoServerLibrary', 'AutoServerService', 'GetServerTimeResponse');
+ __Message.Write('Result', TypeInfo(DateTime), lResult, [paIsDateTime]);
+ __Message.Finalize;
+
+ finally
+ end;
+end;
+
+procedure TAutoServerService_Invoker.Invoke_GetEnvironment(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function GetEnvironment(const Environment: String): String; }
+var
+ Environment: String;
+ lResult: String;
+begin
+ try
+ __Message.Read('Environment', TypeInfo(String), Environment, []);
+
+ lResult := (__Instance as IAutoServerService).GetEnvironment(Environment);
+
+ __Message.InitializeResponseMessage(__Transport, 'AutoServerLibrary', 'AutoServerService', 'GetEnvironmentResponse');
+ __Message.Write('Result', TypeInfo(String), lResult, []);
+ __Message.Finalize;
+
+ finally
+ end;
+end;
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServerService_Impl.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServerService_Impl.pas
new file mode 100644
index 0000000..132b4bd
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServerService_Impl.pas
@@ -0,0 +1,55 @@
+unit AutoServerService_Impl;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ This is where you are supposed to code the implementation of your objects. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils,
+ {RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
+ {Generated:} AutoServerLibrary_Intf;
+
+type
+ { TAutoServerService }
+ TAutoServerService = class(TRORemotable, IAutoServerService)
+ private
+ protected
+ { IAutoServerService methods }
+ function GetServerTime: DateTime;
+ function GetEnvironment(const Environment: string): string;
+ end;
+
+implementation
+
+uses
+ {Generated:} AutoServerLibrary_Invk;
+
+procedure Create_AutoServerService(out anInstance: IUnknown);
+begin
+ anInstance := TAutoServerService.Create;
+end;
+
+{ AutoServerService }
+
+function TAutoServerService.GetServerTime: DateTime;
+begin
+ Result := Now;
+end;
+
+function TAutoServerService.GetEnvironment(const Environment: string): string;
+begin
+ Result := GetEnvironmentVariable(Environment);
+end;
+
+initialization
+ TROClassFactory.Create('AutoServerService', Create_AutoServerService, TAutoServerService_Invoker);
+
+finalization
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServer_Client.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServer_Client.bdsproj
new file mode 100644
index 0000000..093bda9
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServer_Client.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {087C06A8-08C5-40E0-80DD-CEBFEF978D07}
+
+
+
+
+ AutoServer_Client.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServer_Client.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServer_Client.dpr
new file mode 100644
index 0000000..20d539a
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServer_Client.dpr
@@ -0,0 +1,15 @@
+program AutoServer_Client;
+
+uses
+ uROComInit,
+ Forms,
+ AutoServer_ClientMain in 'AutoServer_ClientMain.pas' {AutoServer_ClientMainForm};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'AutoServer Client';
+ Application.CreateForm(TAutoServer_ClientMainForm, AutoServer_ClientMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServer_Client.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServer_Client.dproj
new file mode 100644
index 0000000..a38f210
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServer_Client.dproj
@@ -0,0 +1,72 @@
+
+
+ {9502af4b-ac11-42b4-a13f-8b7529127667}
+ AutoServer_Client.dpr
+ Debug
+ AnyCPU
+ DCC32
+ AutoServer_Client.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ AutoServer_Client.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServer_Client.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServer_Client.res
new file mode 100644
index 0000000..ac22e55
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServer_Client.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServer_ClientMain.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServer_ClientMain.dfm
new file mode 100644
index 0000000..c0f790f
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServer_ClientMain.dfm
@@ -0,0 +1,85 @@
+object AutoServer_ClientMainForm: TAutoServer_ClientMainForm
+ Left = 62
+ Top = 102
+ AutoScroll = False
+ Caption = 'AutoServer - Client'
+ ClientHeight = 278
+ ClientWidth = 448
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ OnShow = FormShow
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Label1: TLabel
+ Left = 7
+ Top = 7
+ Width = 64
+ Height = 13
+ Caption = 'Environment:'
+ end
+ object cbShutdown: TCheckBox
+ Left = 7
+ Top = 49
+ Width = 145
+ Height = 17
+ Caption = 'Shutdown server on close'
+ TabOrder = 0
+ end
+ object Memo: TMemo
+ Left = 0
+ Top = 70
+ Width = 448
+ Height = 208
+ Align = alCustom
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ ScrollBars = ssVertical
+ TabOrder = 1
+ end
+ object cbEnvironment: TComboBox
+ Left = 7
+ Top = 23
+ Width = 334
+ Height = 21
+ Style = csDropDownList
+ Anchors = [akLeft, akTop, akRight]
+ ItemHeight = 13
+ TabOrder = 2
+ end
+ object GetEnvironmentButton: TButton
+ Left = 347
+ Top = 21
+ Width = 94
+ Height = 25
+ Anchors = [akTop, akRight]
+ Caption = 'Get environment'
+ TabOrder = 3
+ OnClick = GetEnvironmentButtonClick
+ end
+ object ROMessage: TROBinMessage
+ Left = 36
+ Top = 88
+ end
+ object ROChannel: TROWinInetHTTPChannel
+ ServerLocators = <>
+ DispatchOptions = []
+ UserAgent = 'RemObjects SDK'
+ TargetURL = 'http://localhost:8099/BIN'
+ Left = 8
+ Top = 88
+ end
+ object RORemoteService: TRORemoteService
+ ServiceName = 'AutoServerService'
+ Message = ROMessage
+ Channel = ROChannel
+ Left = 64
+ Top = 88
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServer_ClientMain.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServer_ClientMain.pas
new file mode 100644
index 0000000..56b9cd6
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServer_ClientMain.pas
@@ -0,0 +1,152 @@
+unit AutoServer_ClientMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
+ uROClient, uROClientIntf, uRORemoteService, uROBinMessage, uROWinInetHTTPChannel,
+ ComCtrls, uROPoweredByRemObjectsButton, AutoServerLibrary_Intf;
+
+type
+ TAutoServer_ClientMainForm = class(TForm)
+ ROMessage: TROBinMessage;
+ ROChannel: TROWinInetHTTPChannel;
+ RORemoteService: TRORemoteService;
+ cbShutdown: TCheckBox;
+ Memo: TMemo;
+ cbEnvironment: TComboBox;
+ GetEnvironmentButton: TButton;
+ Label1: TLabel;
+ procedure FormCreate(Sender: TObject);
+ procedure FormDestroy(Sender: TObject);
+ procedure FormShow(Sender: TObject);
+ procedure GetEnvironmentButtonClick(Sender: TObject);
+ private
+ fServerHandle: cardinal;
+ FAutoServerService: IAutoServerService;
+ function GetAutoShutDownServer: boolean;
+ procedure SetAutoShutDownServer(const Value: boolean);
+ procedure FillEnvironment;
+ procedure Log(AStr: string);
+ public
+ property AutoShutDownServer: boolean read GetAutoShutDownServer write SetAutoShutDownServer;
+ end;
+
+var
+ AutoServer_ClientMainForm: TAutoServer_ClientMainForm;
+
+implementation
+
+uses ShellAPI;
+
+{$R *.dfm}
+
+procedure TAutoServer_ClientMainForm.FillEnvironment;
+var
+ p, buf: Pchar;
+ List: TStringList;
+ i: integer;
+begin
+ cbEnvironment.Clear;
+ List := TStringList.Create;
+ try
+ buf := GetEnvironmentStrings;
+ try
+ p := buf;
+ while p^ <> #0 do begin
+ List.Add(p);
+ inc(p, StrLen(p) + 1);
+ end;
+ finally
+ FreeEnvironmentStrings(buf);
+ end;
+ for i := 0 to List.Count - 1 do
+ if List.Names[i] <> '' then
+ cbEnvironment.Items.Add(List.Names[i]);
+ if cbEnvironment.Items.Count <> 0 then
+ cbEnvironment.ItemIndex := 0;
+ finally
+ List.Free;
+ end;
+end;
+
+procedure TAutoServer_ClientMainForm.FormCreate(Sender: TObject);
+var
+ serverfilename: string;
+ res: integer;
+begin
+ fAutoServerService := (RORemoteService as IAutoServerService);
+ // Locates the server window
+ Log('Searching for server process ...');
+ fServerHandle := FindWindow(nil, 'AutoServer - Server');
+
+ if (fServerHandle = 0) then begin
+ Log('No server found.');
+ AutoShutDownServer := TRUE;
+
+ // Starts it
+ serverfilename := ExtractFilePath(Application.ExeName) + 'AutoServer.exe';
+ Log('Attempting to start a server ''' + serverfilename + '''');
+ Res := ShellExecute(0, 'open', PChar(serverfilename), nil, nil, SW_NORMAL);
+ if res < 33 then begin
+ Log(SysErrorMessage(Res));
+ exit;
+ end
+ else
+ Log('Waiting for the server to start ...');
+ // Waits half a second. Not the best implementation but it's just to give an idea
+ Sleep(500);
+
+ Log('Searching for a server ...');
+ fServerHandle := FindWindow(nil, 'AutoServer - Server');
+ if (fServerHandle = 0) then
+ Log('The server could not be started!')
+ else
+ Log('The server has been started successfully');
+ end
+ else begin
+ Log('The server is up and running already');
+ AutoShutDownServer := FALSE;
+ end;
+end;
+
+procedure TAutoServer_ClientMainForm.FormDestroy(Sender: TObject);
+begin
+ if AutoShutDownServer then PostMessage(fServerHandle, WM_CLOSE, 0, 0);
+end;
+
+function TAutoServer_ClientMainForm.GetAutoShutDownServer: boolean;
+begin
+ result := cbShutdown.Checked;
+end;
+
+procedure TAutoServer_ClientMainForm.SetAutoShutDownServer(const Value: boolean);
+begin
+ cbShutdown.Checked := Value;
+end;
+
+procedure TAutoServer_ClientMainForm.FormShow(Sender: TObject);
+begin
+ FillEnvironment;
+end;
+
+procedure TAutoServer_ClientMainForm.Log(AStr: string);
+begin
+ Memo.Lines.Add(AStr);
+end;
+
+procedure TAutoServer_ClientMainForm.GetEnvironmentButtonClick(
+ Sender: TObject);
+var
+ res: string;
+begin
+ Log('');
+ Log('GetEnvironment');
+ Log('--------------');
+ Log('Sending:'#9#9 + cbEnvironment.Text);
+ Res := FAutoServerService.GetEnvironment(cbEnvironment.Text);
+ Log('Receiving:'#9 + Res);
+end;
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServer_ServerMain.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServer_ServerMain.dfm
new file mode 100644
index 0000000..653ace1
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServer_ServerMain.dfm
@@ -0,0 +1,40 @@
+object AutoServer_ServerMainForm: TAutoServer_ServerMainForm
+ Left = 13
+ Top = 4
+ BorderStyle = bsDialog
+ ClientHeight = 64
+ ClientWidth = 228
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ OnCreate = FormCreate
+ PixelsPerInch = 96
+ TextHeight = 13
+ object RoPoweredByRemObjectsButton1: TROPoweredByRemObjectsButton
+ Left = 8
+ Top = 8
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ end
+ object ROMessage: TROBinMessage
+ Left = 36
+ Top = 8
+ end
+ object ROServer: TROIndyHTTPServer
+ Dispatchers = <
+ item
+ Name = 'ROMessage'
+ Message = ROMessage
+ Enabled = True
+ PathInfo = 'Bin'
+ end>
+ Port = 8099
+ Left = 8
+ Top = 8
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServer_ServerMain.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServer_ServerMain.pas
new file mode 100644
index 0000000..3195ae8
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/AutoServer_ServerMain.pas
@@ -0,0 +1,36 @@
+unit AutoServer_ServerMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
+ uROClient, uROPoweredByRemObjectsButton, uROClientIntf, uROServer,
+ uROBinMessage, uROIndyHTTPServer, uROIndyTCPServer;
+
+type
+ TAutoServer_ServerMainForm = class(TForm)
+ RoPoweredByRemObjectsButton1: TRoPoweredByRemObjectsButton;
+ ROMessage: TROBinMessage;
+ ROServer: TROIndyHTTPServer;
+ procedure FormCreate(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ AutoServer_ServerMainForm: TAutoServer_ServerMainForm;
+
+implementation
+
+{$R *.dfm}
+
+procedure TAutoServer_ServerMainForm.FormCreate(Sender: TObject);
+begin
+ caption := 'AutoServer - Server';
+ ROServer.Active := true;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/RODLFILE.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/RODLFILE.res
new file mode 100644
index 0000000..da8dc6c
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Auto Server/RODLFILE.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Broadcast Chat/BroadcastChat.Sample.html b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Broadcast Chat/BroadcastChat.Sample.html
new file mode 100644
index 0000000..cb9bfd5
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Broadcast Chat/BroadcastChat.Sample.html
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+ Broadcast Chat Sample
+
+
+
+Purpose
+
+This example shows how to use the TROBroadcastServer and TROBroadcastChannel channels to write an UDP broadcasting chat program.
+
+
+ In order to test this sample, you will need to make the compiled exe available on two or more computers. Note : if you are running a trial version of the RemObjects SDK, each machine
+ used will need to be running the Delphi IDE. Registered users can create on one computer and just copy the exe to other(s).
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Broadcast Chat/BroadcastChat.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Broadcast Chat/BroadcastChat.bdsproj
new file mode 100644
index 0000000..486a30e
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Broadcast Chat/BroadcastChat.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {2819970C-B837-43BE-AF3D-CEACF907E452}
+
+
+
+
+ BroadcastChat.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Broadcast Chat/BroadcastChat.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Broadcast Chat/BroadcastChat.dpr
new file mode 100644
index 0000000..fad0006
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Broadcast Chat/BroadcastChat.dpr
@@ -0,0 +1,20 @@
+program BroadcastChat;
+
+uses
+ Forms,
+ BroadcastChatMain in 'BroadcastChatMain.pas' {BroadcastChatMainForm},
+ BroadcastChatLibrary_Intf in 'BroadcastChatLibrary_Intf.pas',
+ BroadcastChatLibrary_Invk in 'BroadcastChatLibrary_Invk.pas',
+ BroadcastChatService_Impl in 'BroadcastChatService_Impl.pas';
+
+{#ROGEN:BroadcastChatLibrary.rodl} // RemObjects: Careful, do not remove!
+{$R RODLFile.res}
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'Broadcast Chat';
+ Application.CreateForm(TBroadcastChatMainForm, BroadcastChatMainForm);
+ Application.Run;
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Broadcast Chat/BroadcastChat.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Broadcast Chat/BroadcastChat.dproj
new file mode 100644
index 0000000..7af0116
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Broadcast Chat/BroadcastChat.dproj
@@ -0,0 +1,75 @@
+
+
+ {f49233b6-a9eb-4b51-a683-21534d447151}
+ BroadcastChat.dpr
+ Debug
+ AnyCPU
+ DCC32
+ BroadcastChat.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ BroadcastChat.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Broadcast Chat/BroadcastChat.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Broadcast Chat/BroadcastChat.res
new file mode 100644
index 0000000..9092728
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Broadcast Chat/BroadcastChat.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Broadcast Chat/BroadcastChatLibrary.rodl b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Broadcast Chat/BroadcastChatLibrary.rodl
new file mode 100644
index 0000000..327566f
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Broadcast Chat/BroadcastChatLibrary.rodl
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Broadcast Chat/BroadcastChatLibrary_Async.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Broadcast Chat/BroadcastChatLibrary_Async.pas
new file mode 100644
index 0000000..33d847b
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Broadcast Chat/BroadcastChatLibrary_Async.pas
@@ -0,0 +1,107 @@
+unit BroadcastChatLibrary_Async;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROClasses, uROTypes, uROClientIntf, uROAsync,
+ {Project:} BroadcastChatLibrary_Intf;
+
+type
+ IBroadcastChatService_Async = interface;
+ CoBroadcastChatService_Async = class;
+ TBroadcastChatService_AsyncProxy = class;
+ { IBroadcastChatService_Async }
+ IBroadcastChatService_Async = interface(IROAsyncInterface)
+ ['{4C7BA0F9-BF59-454B-ACAF-E5C3CEB5A309}']
+ procedure Invoke_SendMessage(const iDate: DateTime; const iFrom: String; const iMessage: String);
+ procedure Invoke_GetInfo;
+ function Retrieve_GetInfo: string;
+ end;
+
+ { CoBroadcastChatService_Async }
+ CoBroadcastChatService_Async = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IBroadcastChatService_Async;
+ end;
+
+ { TBroadcastChatService_AsyncProxy }
+ TBroadcastChatService_AsyncProxy = class(TROAsyncProxy, IBroadcastChatService_Async)
+ private
+ protected
+ function __GetInterfaceName:string; override;
+
+ procedure Invoke_SendMessage(const iDate: DateTime; const iFrom: String; const iMessage: String);
+ procedure Invoke_GetInfo;
+ function Retrieve_GetInfo: string;
+ end;
+
+implementation
+
+uses
+ {vcl:} SysUtils;
+
+{ CoBroadcastChatService }
+
+class function CoBroadcastChatService_Async.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IBroadcastChatService_Async;
+begin
+ result := TBroadcastChatService_AsyncProxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TBroadcastChatService_AsyncProxy }
+
+function TBroadcastChatService_AsyncProxy.__GetInterfaceName:string;
+begin
+ result := 'BroadcastChatService';
+end;
+
+procedure TBroadcastChatService_AsyncProxy.Invoke_SendMessage(const iDate: DateTime; const iFrom: String; const iMessage: String);
+var __request:TStream;
+begin
+ __AssertProxyNotBusy('SendMessage');
+ __request := TMemoryStream.Create;
+
+ __Message.InitializeRequestMessage(__TransportChannel, 'BroadcastChatLibrary', __InterfaceName, 'SendMessage');
+ __Message.Write('iDate', TypeInfo(DateTime), iDate, [paIsDateTime]);
+ __Message.Write('iFrom', TypeInfo(String), iFrom, []);
+ __Message.Write('iMessage', TypeInfo(String), iMessage, []);
+ __Message.Finalize;
+
+ __Message.WriteToStream(__request);
+ __DispatchAsyncRequest('SendMessage',__request, false);
+end;
+
+procedure TBroadcastChatService_AsyncProxy.Invoke_GetInfo;
+var __request:TStream;
+begin
+ __AssertProxyNotBusy('GetInfo');
+ __request := TMemoryStream.Create;
+
+ __Message.InitializeRequestMessage(__TransportChannel, 'BroadcastChatLibrary', __InterfaceName, 'GetInfo');
+ __Message.Finalize;
+
+ __Message.WriteToStream(__request);
+ __DispatchAsyncRequest('GetInfo',__request);
+end;
+
+function TBroadcastChatService_AsyncProxy.Retrieve_GetInfo: string;
+var __response:TStream;
+begin
+ __response := __RetrieveAsyncResponse('GetInfo');
+ __Message.ReadFromStream(__response);
+
+ __Message.Read('Result', TypeInfo(string), Result, []);
+
+ __response.Free();
+end;
+
+
+initialization
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Broadcast Chat/BroadcastChatLibrary_Intf.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Broadcast Chat/BroadcastChatLibrary_Intf.pas
new file mode 100644
index 0000000..6f2d31b
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Broadcast Chat/BroadcastChatLibrary_Intf.pas
@@ -0,0 +1,109 @@
+unit BroadcastChatLibrary_Intf;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROClasses, uROClient, uROTypes, uROClientIntf;
+
+const
+ { Library ID }
+ LibraryUID = '{046A7B5C-4E0B-43A9-8EF9-401F5705E52B}';
+
+ { Service Interface ID's }
+ IBroadcastChatService_IID : TGUID = '{0BD653EA-D4B0-46BE-9856-2FD482115A77}';
+
+ { Event ID's }
+
+type
+ { Forward declarations }
+ IBroadcastChatService = interface;
+
+
+ { IBroadcastChatService }
+ IBroadcastChatService = interface
+ ['{0BD653EA-D4B0-46BE-9856-2FD482115A77}']
+ procedure SendMessage(const iDate: DateTime; const iFrom: String; const iMessage: String);
+ function GetInfo: string;
+ end;
+
+ { CoBroadcastChatService }
+ CoBroadcastChatService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IBroadcastChatService;
+ end;
+
+ { TBroadcastChatService_Proxy }
+ TBroadcastChatService_Proxy = class(TROProxy, IBroadcastChatService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ procedure SendMessage(const iDate: DateTime; const iFrom: String; const iMessage: String);
+ function GetInfo: string;
+ end;
+
+implementation
+
+uses
+ {vcl:} SysUtils,
+ {RemObjects:} uROEventRepository, uRORes;
+
+{ CoBroadcastChatService }
+
+class function CoBroadcastChatService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IBroadcastChatService;
+begin
+ result := TBroadcastChatService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TBroadcastChatService_Proxy }
+
+function TBroadcastChatService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'BroadcastChatService';
+end;
+
+procedure TBroadcastChatService_Proxy.SendMessage(const iDate: DateTime; const iFrom: String; const iMessage: String);
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'BroadcastChatLibrary', __InterfaceName, 'SendMessage');
+ __Message.Write('iDate', TypeInfo(DateTime), iDate, [paIsDateTime]);
+ __Message.Write('iFrom', TypeInfo(String), iFrom, []);
+ __Message.Write('iMessage', TypeInfo(String), iMessage, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+function TBroadcastChatService_Proxy.GetInfo: string;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'BroadcastChatLibrary', __InterfaceName, 'GetInfo');
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(string), result, []);
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+initialization
+ RegisterProxyClass(IBroadcastChatService_IID, TBroadcastChatService_Proxy);
+
+
+finalization
+ UnregisterProxyClass(IBroadcastChatService_IID);
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Broadcast Chat/BroadcastChatLibrary_Invk.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Broadcast Chat/BroadcastChatLibrary_Invk.pas
new file mode 100644
index 0000000..df0e7cd
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Broadcast Chat/BroadcastChatLibrary_Invk.pas
@@ -0,0 +1,73 @@
+unit BroadcastChatLibrary_Invk;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes,
+ {RemObjects:} uROServer, uROServerIntf, uROTypes, uROClientIntf,
+ {Generated:} BroadcastChatLibrary_Intf;
+
+type
+ TBroadcastChatService_Invoker = class(TROInvoker)
+ private
+ protected
+ published
+ procedure Invoke_SendMessage(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_GetInfo(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ end;
+
+implementation
+
+uses
+ {RemObjects:} uRORes, uROClient;
+
+{ TBroadcastChatService_Invoker }
+
+procedure TBroadcastChatService_Invoker.Invoke_SendMessage(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ procedure SendMessage(const iDate: DateTime; const iFrom: String; const iMessage: String); }
+var
+ iDate: DateTime;
+ iFrom: String;
+ iMessage: String;
+begin
+ try
+ __Message.Read('iDate', TypeInfo(DateTime), iDate, [paIsDateTime]);
+ __Message.Read('iFrom', TypeInfo(String), iFrom, []);
+ __Message.Read('iMessage', TypeInfo(String), iMessage, []);
+
+ (__Instance as IBroadcastChatService).SendMessage(iDate, iFrom, iMessage);
+
+ __Message.InitializeResponseMessage(__Transport, 'BroadcastChatLibrary', 'BroadcastChatService', 'SendMessageResponse');
+ __Message.Finalize;
+
+ __oResponseOptions := [roNoResponse];
+
+ finally
+ end;
+end;
+
+procedure TBroadcastChatService_Invoker.Invoke_GetInfo(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function GetInfo: string; }
+var
+ lResult: string;
+begin
+ try
+ lResult := (__Instance as IBroadcastChatService).GetInfo;
+
+ __Message.InitializeResponseMessage(__Transport, 'BroadcastChatLibrary', 'BroadcastChatService', 'GetInfoResponse');
+ __Message.Write('Result', TypeInfo(string), lResult, []);
+ __Message.Finalize;
+
+ finally
+ end;
+end;
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Broadcast Chat/BroadcastChatMain.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Broadcast Chat/BroadcastChatMain.dfm
new file mode 100644
index 0000000..0c8a59a
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Broadcast Chat/BroadcastChatMain.dfm
@@ -0,0 +1,323 @@
+object BroadcastChatMainForm: TBroadcastChatMainForm
+ Left = 52
+ Top = 80
+ ActiveControl = ed_Message
+ AutoScroll = False
+ BorderWidth = 5
+ Caption = 'RemObjects SDK Broadcast Channel LAN Chat Client'
+ ClientHeight = 239
+ ClientWidth = 449
+ Color = clBtnFace
+ Constraints.MinHeight = 250
+ Constraints.MinWidth = 416
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ OldCreateOrder = False
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Panel1: TPanel
+ Left = 0
+ Top = 0
+ Width = 449
+ Height = 26
+ Align = alTop
+ BevelOuter = bvNone
+ TabOrder = 0
+ DesignSize = (
+ 449
+ 26)
+ object Label1: TLabel
+ Left = 0
+ Top = 2
+ Width = 53
+ Height = 13
+ Caption = 'Nick Name:'
+ end
+ object Panel8: TPanel
+ Left = 60
+ Top = 0
+ Width = 389
+ Height = 21
+ Anchors = [akLeft, akTop, akRight]
+ BevelInner = bvLowered
+ BevelOuter = bvNone
+ TabOrder = 0
+ object Panel9: TPanel
+ Left = 1
+ Top = 1
+ Width = 387
+ Height = 19
+ Align = alClient
+ BevelOuter = bvNone
+ BorderWidth = 1
+ TabOrder = 0
+ DesignSize = (
+ 387
+ 19)
+ object ed_NickName: TEdit
+ Left = 1
+ Top = 1
+ Width = 386
+ Height = 17
+ Anchors = [akLeft, akTop, akRight]
+ BorderStyle = bsNone
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -13
+ Font.Name = 'Courier New'
+ Font.Style = []
+ ParentFont = False
+ TabOrder = 0
+ end
+ end
+ end
+ end
+ object Panel2: TPanel
+ Left = 0
+ Top = 26
+ Width = 449
+ Height = 133
+ Align = alClient
+ BevelInner = bvLowered
+ BevelOuter = bvNone
+ TabOrder = 1
+ object Panel4: TPanel
+ Left = 1
+ Top = 1
+ Width = 447
+ Height = 131
+ Align = alClient
+ BevelOuter = bvNone
+ BorderWidth = 1
+ TabOrder = 0
+ object ed_Chat: TMemo
+ Left = 1
+ Top = 1
+ Width = 445
+ Height = 129
+ Align = alClient
+ BorderStyle = bsNone
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -13
+ Font.Name = 'Courier New'
+ Font.Style = []
+ ParentFont = False
+ ReadOnly = True
+ ScrollBars = ssVertical
+ TabOrder = 0
+ end
+ end
+ end
+ object Panel3: TPanel
+ Left = 0
+ Top = 159
+ Width = 449
+ Height = 80
+ Align = alBottom
+ BevelOuter = bvNone
+ TabOrder = 2
+ DesignSize = (
+ 449
+ 80)
+ object RoPoweredByRemObjectsButton1: TROPoweredByRemObjectsButton
+ Left = 0
+ Top = 32
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ ApplicationType = atClient
+ end
+ object Panel5: TPanel
+ Left = 0
+ Top = 5
+ Width = 449
+ Height = 21
+ Align = alTop
+ BevelInner = bvLowered
+ BevelOuter = bvNone
+ TabOrder = 0
+ object Panel6: TPanel
+ Left = 1
+ Top = 1
+ Width = 447
+ Height = 19
+ Align = alClient
+ BevelOuter = bvNone
+ BorderWidth = 1
+ TabOrder = 0
+ DesignSize = (
+ 447
+ 19)
+ object ed_Message: TEdit
+ Left = 1
+ Top = 1
+ Width = 445
+ Height = 17
+ Anchors = [akLeft, akTop, akRight]
+ BorderStyle = bsNone
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -13
+ Font.Name = 'Courier New'
+ Font.Style = []
+ ParentFont = False
+ TabOrder = 0
+ end
+ end
+ end
+ object Panel7: TPanel
+ Left = 0
+ Top = 0
+ Width = 449
+ Height = 5
+ Align = alTop
+ BevelOuter = bvNone
+ TabOrder = 1
+ end
+ object btn_Send: TBitBtn
+ Left = 335
+ Top = 32
+ Width = 114
+ Height = 25
+ Action = ac_SendMessage
+ Anchors = [akTop, akRight]
+ Caption = '&Send Message'
+ TabOrder = 2
+ Glyph.Data = {
+ 36060000424D3606000000000000360000002800000020000000100000000100
+ 18000000000000060000220B0000220B00000000000000000000FF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FF0170ACFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF9B9B9BFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FF0275B00E88C00275B0096EA10174AFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF9D9D9DAAAAAA9D
+ 9D9D9E9E9E9C9C9CFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FF0275B0279FDA1379B05FE3FF70EFFC5DD4E50C699A0275B00275
+ B0FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF9D9D9DBDBDBDA8A8A8DC
+ DCDCE0E0E0D4D4D49E9E9E9D9D9D9D9D9DFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FF0275B03FC7FF147FBA1682BB52D7FF6CEBFE7FFEFF86FFFF8AFFFF5FD7
+ E60275B00275B00473ADFF00FFFF00FFFF00FF9D9D9DD0D0D0ABABABACACACD7
+ D7D7E0E0E0E6E6E6E8E8E8EAEAEAD5D5D59D9D9D9D9D9D9E9E9EFF00FFFF00FF
+ 0275B03EC4FC3BC2FF117DB63FC4F847CCFB63E3FC7BF8FF7FFBFF80FEFF7EFB
+ FC1D84AF2DA5D90679B4FF00FFFF00FF9D9D9DCFCFCFCFCFCFA9A9A9CECECED2
+ D2D2DCDCDCE5E5E5E6E6E6E6E6E6E5E5E5ACACACBFBFBFA1A1A1FF00FF0275B0
+ 56D9FF48CCFB42C5F8128BC53FC4F83FC4F85ADCFB77F4FF82FFFF73EDF31D84
+ AF32B1ED0174AFFF00FFFF00FF9D9D9DD9D9D9D2D2D2D0D0D0ADADADCECECECE
+ CECED9D9D9E3E3E3E7E7E7DFDFDFACACACC6C6C69C9C9CFF00FF0275B076F4FF
+ 64E5FE5DDEFB5FD7E60377B13BC1FE3ABFFA51D4FB72F2FF64DCEA1D84AF35B7
+ F338BDFB0174AFFF00FF9D9D9DE3E3E3DDDDDDDADADAD5D5D59E9E9ECECECECD
+ CDCDD6D6D6E2E2E2D7D7D7ACACACC9C9C9CDCDCD9C9C9CFF00FF0275B08BFFFF
+ 77F3FE5FD7E60375B01C8EC7C738382EACE648C9F448BFDE2B9AC751D4FA4FD3
+ FE0174AFFF00FFFF00FF9D9D9DEAEAEAE3E3E3D5D5D59E9E9EB3B3B3818181C3
+ C3C3D1D1D1CBCBCBB9B9B9D5D5D5D6D6D69C9C9CFF00FFFF00FF0275B08EFFFF
+ 5FD7E60070AD0172AC006BA4C738380183BD0C8CC25AD5E775F6FFC73838C738
+ 380D87BCFF00FFFF00FF9D9D9DEAEAEAD5D5D59B9B9B9C9C9C989898818181A1
+ A1A1A9A9A9D4D4D4E3E3E3818181818181A8A8A8FF00FFFF00FF0275B05FD7E6
+ 006FAC0377B10378B2006CA7C73838CC474707A7E06DEBF484FFFFC73838CF4F
+ 4FC73838FF00FFFF00FF9D9D9DD5D5D59A9A9A9E9E9E9F9F9F9999998181818E
+ 8E8EAFAFAFDEDEDEE7E7E7818181959595818181FF00FFFF00FF0376B00275B0
+ 0377B10378B20472AA03669EC73838CE4B4BC73838C73838C73838C73838E290
+ 90D35C5CC73838FF00FF9E9E9E9D9D9D9E9E9E9E9E9E9E9E9E99999981818190
+ 9090818181818181818181818181C4C4C49E9E9E818181FF00FFFF00FFFF00FF
+ FF00FFFF00FF0378B20379B40279B4C73838D15656D05454D46262D96F6FDE83
+ 83E39797D76A6AC73838FF00FFFF00FFFF00FFFF00FF9F9F9F9F9F9F9E9E9E81
+ 81819A9A9A999999A3A3A3ADADADBBBBBBC9C9C9A9A9A9818181FF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFC73838CC4747D05353D56464DA75
+ 75E18A8AD96F6FC73838FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FF8181818E8E8E979797A4A4A4B1B1B1C0C0C0ACACAC818181FF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFC73838C73838C73838D769
+ 69D15656C73838FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FF818181818181818181A8A8A89A9A9A818181FF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFC73838CA3F
+ 3FC73838FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FF818181878787818181FF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFC73838C738
+ 38FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FF818181818181FF00FFFF00FFFF00FF}
+ NumGlyphs = 2
+ end
+ object BitBtn1: TBitBtn
+ Left = 215
+ Top = 32
+ Width = 114
+ Height = 25
+ Anchors = [akTop, akRight]
+ Caption = 'List Users'
+ TabOrder = 3
+ OnClick = BitBtn1Click
+ Glyph.Data = {
+ 36030000424D3603000000000000360000002800000010000000100000000100
+ 18000000000000030000220B0000220B00000000000000000000FF00FF314B62
+ AC7D7EFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FF5084B20F6FE1325F8CB87E7AFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF32A0FE37A1FF
+ 106FE2325F8BB67D79FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FF37A4FE379FFF0E6DDE355F89BB7F79FF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ 37A4FE359EFF0F6FDE35608BA67B7FFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF38A5FE329DFF156DCE444F5BFF
+ 00FF925D5AB48C80C9A391C28F88FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FF3BABFFA1CAE78C7775A38372EBE0B8FEFCCFFEFCCEFCFBCCE3CF
+ B1C0998CFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFBDA4A4CEA58FFF
+ EDB2FFFCCAFFFFCFFFFFCFFFFFD5FFFFEAF3EBE5A0746FFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFB67F76F4D9A1F6D095FCF4C2FFFFCFFFFFD8FFFFEEFFFF
+ FAFFFFFFD5C2ACFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFD0A792FBDC9AEE
+ B87FFBF0BDFFFFD0FFFFDCFFFFF7FFFFFAFFFFE6EEEAC2B7847EFF00FFFF00FF
+ FF00FFFF00FFFF00FFDCB79AFAD796EAA76CF7DAA3FFFFCEFFFFD4FFFFE1FFFF
+ E3FFFFD7F8F6CBB69782FF00FFFF00FFFF00FFFF00FFFF00FFD5AF96FEE2A1EA
+ A96AEFBD80FAE9B4FFFFD0FFFFD3FFFFD1FFFFD1F3EEC5B88B80FF00FFFF00FF
+ FF00FFFF00FFFF00FFBB8980FCEBB1F8E2B5F0C690F0C286F7DCA5FEF3C1FEF8
+ C6FFFFCFDDCEA9FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFD3B499FF
+ FFFFFFF4E2EFBD80EBAB6FF0C086FBDEA3FCF3B8AC8676FF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFC6ADA7F3EBD1FFEEAFFCDE9DFEE2A1F0D4
+ A4C29886FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFBB987EC19983D3AD93D1A592FF00FFFF00FFFF00FFFF00FF}
+ end
+ end
+ object ROBINMessage: TROBinMessage
+ Left = 49
+ Top = 43
+ end
+ object ROBroadcastServer: TROBroadcastServer
+ Active = True
+ Dispatchers = <
+ item
+ Name = 'ROBINMessage'
+ Message = ROBINMessage
+ Enabled = True
+ end>
+ IndyUDPServer.BroadcastEnabled = True
+ IndyUDPServer.Bindings = <>
+ IndyUDPServer.DefaultPort = 8090
+ Left = 49
+ Top = 139
+ end
+ object ROBroadcastChannel: TROBroadcastChannel
+ ServerLocators = <>
+ DispatchOptions = []
+ AsyncTimeOut = 100
+ Retrys = 5
+ IndyClient.BroadcastEnabled = True
+ IndyClient.Port = 8090
+ Port = 8090
+ OnBroadCastResponseReceived = ROBroadcastChannelBroadCastResponseReceived
+ Left = 49
+ Top = 91
+ end
+ object ActionList1: TActionList
+ OnUpdate = ActionList1Update
+ Left = 137
+ Top = 43
+ object ac_SendMessage: TAction
+ Caption = '&Send Message'
+ ShortCut = 13
+ OnExecute = ac_SendMessageExecute
+ end
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Broadcast Chat/BroadcastChatMain.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Broadcast Chat/BroadcastChatMain.pas
new file mode 100644
index 0000000..40be880
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Broadcast Chat/BroadcastChatMain.pas
@@ -0,0 +1,132 @@
+unit BroadcastChatMain;
+
+{$I RemObjects.inc}
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, StdCtrls, ExtCtrls, Buttons, uROPoweredByRemObjectsButton,
+ uROServer, uROIndyUDPServer, uROBroadcastServer,
+ uROIndyUDPChannel, uROBroadcastChannel, uROClient,
+ uROBINMessage, BroadcastChatLibrary_Async, ActnList;
+
+type
+ TBroadcastChatMainForm = class(TForm)
+ Panel1: TPanel;
+ Panel2: TPanel;
+ Panel3: TPanel;
+ Panel4: TPanel;
+ ed_Chat: TMemo;
+ Panel5: TPanel;
+ Panel6: TPanel;
+ Panel7: TPanel;
+ ed_Message: TEdit;
+ Panel8: TPanel;
+ Panel9: TPanel;
+ ed_NickName: TEdit;
+ Label1: TLabel;
+ RoPoweredByRemObjectsButton1: TRoPoweredByRemObjectsButton;
+ btn_Send: TBitBtn;
+ ROBINMessage: TROBINMessage;
+ ROBroadcastServer: TROBroadcastServer;
+ ROBroadcastChannel: TROBroadcastChannel;
+ ActionList1: TActionList;
+ ac_SendMessage: TAction;
+ BitBtn1: TBitBtn;
+ procedure FormCreate(Sender: TObject);
+ procedure ac_SendMessageExecute(Sender: TObject);
+ procedure ActionList1Update(Action: TBasicAction;
+ var Handled: Boolean);
+ procedure BitBtn1Click(Sender: TObject);
+ // procedure tim_CheckInfoTimer(Sender: TObject);
+ procedure ROBroadcastChannelBroadCastResponseReceived(aServerIP, aResponseUID: string);
+ procedure FormDestroy(Sender: TObject);
+ private
+ fChatProxy: IBroadcastChatService_Async;
+ public
+{$IFDEF VER140}
+ procedure WMUser(var Msg: TMessage); message WM_USER;
+{$ENDIF}
+ procedure MessageReceived(iDate: TDateTime; const iFrom, iMessage: string);
+ end;
+
+var
+ BroadcastChatMainForm: TBroadcastChatMainForm;
+
+implementation
+
+uses
+ IdStack, IdGlobal, BroadcastChatService_Impl;
+
+{$R *.dfm}
+
+{$IFDEF RemObjects_INDY8}
+
+function IndyGetHostName: string;
+var
+ i: LongWord;
+begin
+ SetLength(Result, MAX_COMPUTERNAME_LENGTH + 1);
+ i := Length(Result);
+ if GetComputerName(@Result[1], i) then begin
+ SetLength(Result, i);
+ end;
+end;
+{$ENDIF}
+
+procedure TBroadcastChatMainForm.FormCreate(Sender: TObject);
+begin
+ fChatProxy := CoBroadcastChatService_Async.Create(ROBINMessage, ROBroadcastChannel);
+{$IFDEF RemObjects_INDY10}
+ ed_NickName.Text := GStack.HostName;
+{$ELSE}
+ ed_NickName.Text := IndyGetHostName;
+{$ENDIF}
+end;
+
+procedure TBroadcastChatMainForm.MessageReceived(iDate: TDateTime; const iFrom, iMessage: string);
+begin
+ ed_Chat.Lines.Add(Format('[%s] <%s> %s', [TimeToStr(iDate), iFrom, iMessage]));
+end;
+
+procedure TBroadcastChatMainForm.ac_SendMessageExecute(Sender: TObject);
+begin
+ if ed_Message.Text <> '' then begin
+ fChatProxy.Invoke_SendMessage(Now, ed_NickName.Text, ed_Message.Text);
+ ed_Message.Text := '';
+ ActiveControl := ed_Message;
+ end;
+end;
+
+procedure TBroadcastChatMainForm.ActionList1Update(Action: TBasicAction; var Handled: Boolean);
+begin
+ ac_SendMessage.Enabled := ed_Message.Text <> '';
+end;
+
+procedure TBroadcastChatMainForm.BitBtn1Click(Sender: TObject);
+begin
+ fChatProxy.Invoke_GetInfo();
+end;
+
+procedure TBroadcastChatMainForm.ROBroadcastChannelBroadCastResponseReceived(aServerIP, aResponseUID: string);
+var
+ lName: string;
+begin
+ lName := fChatProxy.Retrieve_GetInfo();
+ ed_Chat.Lines.Add(Format('[%s] chat user: %s (at %s)', [TimeToStr(Now), lName, aServerIP]));
+end;
+
+procedure TBroadcastChatMainForm.FormDestroy(Sender: TObject);
+begin
+ fChatProxy := nil;
+end;
+
+{$IFDEF VER140}
+procedure TBroadcastChatMainForm.WMUser(var Msg: TMessage);
+begin
+ TBroadcastChatService(Msg.WParam).MessageReceived;
+end;
+{$ENDIF}
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Broadcast Chat/BroadcastChatService_Impl.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Broadcast Chat/BroadcastChatService_Impl.pas
new file mode 100644
index 0000000..2ee90da
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Broadcast Chat/BroadcastChatService_Impl.pas
@@ -0,0 +1,72 @@
+unit BroadcastChatService_Impl;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ This is where you are supposed to code the implementation of your objects. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils,
+ {RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
+ {Generated:} BroadcastChatLibrary_Intf;
+
+type
+ { TBroadcastChatService }
+ TBroadcastChatService = class(TRORemotable, IBroadcastChatService)
+ private
+ fSync_Date: TDateTime;
+ fSync_From, fSync_Message: string;
+ protected
+ { IBroadcastChatService methods }
+ procedure SendMessage(const iDate: DateTime; const iFrom: string; const iMessage: string);
+ function GetInfo: string;
+ public
+ procedure MessageReceived;
+ end;
+
+implementation
+
+uses
+ {Generated:} BroadcastChatLibrary_Invk, BroadcastChatMain{$IFDEF VER140}, Windows, Messages{$ENDIF};
+
+procedure Create_BroadcastChatService(out anInstance: IUnknown);
+begin
+ anInstance := TBroadcastChatService.Create;
+end;
+
+{ BroadcastChatService }
+
+procedure TBroadcastChatService.SendMessage(const iDate: DateTime; const iFrom: string; const iMessage: string);
+begin
+ fSync_Date := iDate;
+ fSync_From := iFrom;
+ fSync_Message := iMessage;
+{$IFDEF VER140}
+ Windows.SendMessage(BroadcastChatMainForm.Handle, WM_USER, Longint(Self), 0); // workaround for d6
+{$ELSE}
+ Synchronize(MessageReceived);
+{$ENDIF}
+end;
+
+function TBroadcastChatService.GetInfo: string;
+begin
+ { we'll just assume that this operation is trivial enough to be threadsafe ;-}
+ result := BroadcastChatMainForm.ed_NickName.Text;
+end;
+
+procedure TBroadcastChatService.MessageReceived;
+begin
+ BroadcastChatMainForm.MessageReceived(fSync_Date, fSync_From, fSync_Message);
+end;
+
+initialization
+ TROClassFactory.Create('BroadcastChatService', Create_BroadcastChatService, TBroadcastChatService_Invoker);
+
+finalization
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Broadcast Chat/RODLFILE.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Broadcast Chat/RODLFILE.res
new file mode 100644
index 0000000..32bcb90
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Broadcast Chat/RODLFILE.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/COM.Sample.html b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/COM.Sample.html
new file mode 100644
index 0000000..8a3cb15
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/COM.Sample.html
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+ COM Sample
+
+
+
+Purpose
+
+This sample shows how to call an existing RO server using COM.
+
+Getting Started
+
+ Build or compile both projects.
+ Launch the MegaDemoServer.exe (via the menu option: RemObjects |
+ Launch Server Executable ) and activate the HTTP server .
+ Ensure that COMClient is the selected project and run it.
+ Check that the client buttons work as expected.
+
+Examine the Code
+
+
+ See the simple code needed to invoke the methods in COM_Main.pas .
+
+
+
+Note
+
+ The sample also shows how to call server methods from *.asp, *.vbs, *.xls.
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/COM.bdsgroup b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/COM.bdsgroup
new file mode 100644
index 0000000..0384124
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/COM.bdsgroup
@@ -0,0 +1,20 @@
+
+
+
+
+ Default.Personality
+
+ 1.0
+ {CBF5C10B-75EE-42AE-A72B-382BF722D4B6}
+
+
+
+
+
+ COMClient.bdsproj
+ ..\MegaDemo\MegaDemoServer.bdsproj
+ COMClient.exe MegaDemoServer.exe
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/COM.bpg b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/COM.bpg
new file mode 100644
index 0000000..3ec5cee
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/COM.bpg
@@ -0,0 +1,23 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = COMClient.exe MegaDemoServer.exe
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+COMClient.exe: COMClient.dpr
+ $(DCC)
+
+MegaDemoServer.exe: ..\MegaDemo\MegaDemoServer.dpr
+ $(DCC)
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/COM.groupproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/COM.groupproj
new file mode 100644
index 0000000..0a2dc42
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/COM.groupproj
@@ -0,0 +1,40 @@
+
+
+ {b969aecf-2818-493a-a1fe-bf1d8ea44a88}
+
+
+
+
+ Default.Personality
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/COMClient.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/COMClient.bdsproj
new file mode 100644
index 0000000..04f4f0c
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/COMClient.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {DCBE9437-7172-4115-AFDB-7FFD1627AC04}
+
+
+
+
+ COMClient.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/COMClient.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/COMClient.dpr
new file mode 100644
index 0000000..fbc0e5a
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/COMClient.dpr
@@ -0,0 +1,15 @@
+program COMClient;
+
+uses
+ Forms,
+ COM_Main in 'COM_Main.pas' {COM_MainForm},
+ ROCOM_TLB in 'ROCOM_TLB.pas';
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'COM Test Client';
+ Application.CreateForm(TCOM_MainForm, COM_MainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/COMClient.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/COMClient.dproj
new file mode 100644
index 0000000..39271f5
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/COMClient.dproj
@@ -0,0 +1,73 @@
+
+
+ {9c951f2c-b529-4e19-b099-06fda13e4bd6}
+ COMClient.dpr
+ Debug
+ AnyCPU
+ DCC32
+ COMClient.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ COMClient.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/COMClient.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/COMClient.res
new file mode 100644
index 0000000..90e4219
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/COMClient.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/COM_Main.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/COM_Main.dfm
new file mode 100644
index 0000000..c182b38
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/COM_Main.dfm
@@ -0,0 +1,52 @@
+object COM_MainForm: TCOM_MainForm
+ Left = 494
+ Top = 271
+ Width = 248
+ Height = 191
+ Caption = 'COM Test'
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ OldCreateOrder = False
+ PixelsPerInch = 96
+ TextHeight = 13
+ object ROPoweredByRemObjectsButton1: TROPoweredByRemObjectsButton
+ Left = 11
+ Top = 104
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ ApplicationType = atClient
+ end
+ object SumButton: TButton
+ Left = 80
+ Top = 8
+ Width = 75
+ Height = 25
+ Caption = 'Sum'
+ TabOrder = 0
+ OnClick = SumButtonClick
+ end
+ object TPersonButton: TButton
+ Left = 80
+ Top = 40
+ Width = 75
+ Height = 25
+ Caption = 'TPerson'
+ TabOrder = 1
+ OnClick = TPersonButtonClick
+ end
+ object MultipleCallButton: TButton
+ Left = 80
+ Top = 72
+ Width = 75
+ Height = 25
+ Caption = 'Multiple calls'
+ Default = True
+ TabOrder = 2
+ OnClick = MultipleCallButtonClick
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/COM_Main.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/COM_Main.pas
new file mode 100644
index 0000000..bd0292e
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/COM_Main.pas
@@ -0,0 +1,93 @@
+unit COM_Main;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, StdCtrls, uROPoweredByRemObjectsButton;
+
+type
+ TCOM_MainForm = class(TForm)
+ SumButton: TButton;
+ TPersonButton: TButton;
+ MultipleCallButton: TButton;
+ ROPoweredByRemObjectsButton1: TROPoweredByRemObjectsButton;
+ procedure SumButtonClick(Sender: TObject);
+ procedure TPersonButtonClick(Sender: TObject);
+ procedure MultipleCallButtonClick(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ COM_MainForm: TCOM_MainForm;
+
+implementation
+
+uses ComObj, ROCOM_TLB;
+
+{$R *.dfm}
+
+procedure TCOM_MainForm.SumButtonClick(Sender: TObject);
+var
+ roserver,
+ megademoservice: OleVariant;
+begin
+ roserver := CreateOleObject('RemObjects.SDK.COMServer');
+
+ roserver.MessageType := 'BinMessage';
+ roserver.ChannelType := 'HTTP';
+ roserver.SetChannelProperty('TargetURL', 'http://localhost:8099/bin');
+
+ megademoservice := roserver.CreateService('MegaDemoService');
+
+ ShowMessage('The result is ' + VarToStr(megademoservice.Sum(1, 2)));
+end;
+
+procedure TCOM_MainForm.TPersonButtonClick(Sender: TObject);
+var
+ roserver,
+ megademoservice: OleVariant;
+ person: OleVariant;
+begin
+ roserver := CreateOleObject('RemObjects.SDK.COMServer');
+
+ roserver.MessageType := 'BinMessage';
+ roserver.ChannelType := 'HTTP';
+ roserver.SetChannelProperty('TargetURL', 'http://localhost:8099/bin');
+
+ person := roserver.CreateComplexType('TPerson');
+ person.FirstName := 'Peter';
+ person.LastName := 'Miller';
+ person.Age := 28;
+
+ ShowMessage(person.FirstName + ' ' + person.LastName + ' ' + VarToStr(person.Age));
+end;
+
+procedure TCOM_MainForm.MultipleCallButtonClick(Sender: TObject);
+var
+ roserver: IROCOMServer;
+ newservice: OleVariant;
+ person: OleVariant;
+begin
+ roserver := CoROCOMServer.Create;
+
+ roserver.MessageType := 'BinMessage';
+ roserver.ChannelType := 'HTTP';
+ roserver.SetChannelProperty('TargetURL', 'http://localhost:8099/bin');
+
+ person := roserver.CreateComplexType('TPerson');
+ person.FirstName := 'Peter';
+ person.LastName := 'Baker';
+ ShowMessage(person.FirstName + ' ' + person.LastName);
+
+ newservice := roserver.CreateService('MegaDemoService');
+
+ ShowMessage('The result is ' + IntToStr(newservice.Sum(101, 202)));
+ ShowMessage('The time on the server is ' + DateTimeToStr(newservice.GetServerTime));
+end;
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/ExcelDemo.xls b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/ExcelDemo.xls
new file mode 100644
index 0000000..9488cf5
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/ExcelDemo.xls differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/ROASPDemo.asp b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/ROASPDemo.asp
new file mode 100644
index 0000000..56b9880
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/ROASPDemo.asp
@@ -0,0 +1,27 @@
+
+<%
+Dim result
+
+Set ROServer = Server.CreateObject("RemObjects.SDK.COMServer")
+ROServer.MessageType = "TROBINMessage"
+ROServer.ChannelType = "TROWinInetHTTPChannel"
+ROServer.SetChannelProperty "TargetURL", "http://localhost:8099/BIN"
+
+Set MegaDemoService = ROServer.CreateService("MegaDemoService")
+
+Response.Write "This is an ASP page that invokes methods of the RemObjects MegaDemo "
+
+result = MegaDemoService.Sum(100, 200)
+Response.Write "The result of 100+200 is " & result & " "
+
+result = MegaDemoService.GetServerTime
+Response.Write "The time on the server is " & result
+
+Set MegaDemoService = nothing
+Set ROServer = nothing
+
+%>
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/ROCOM_TLB.dcr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/ROCOM_TLB.dcr
new file mode 100644
index 0000000..36f26e2
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/ROCOM_TLB.dcr differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/ROCOM_TLB.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/ROCOM_TLB.pas
new file mode 100644
index 0000000..aaba674
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/ROCOM_TLB.pas
@@ -0,0 +1,238 @@
+unit ROCOM_TLB;
+
+// ************************************************************************ //
+// WARNING
+// -------
+// The types declared in this file were generated from data read from a
+// Type Library. If this type library is explicitly or indirectly (via
+// another type library referring to this type library) re-imported, or the
+// 'Refresh' command of the Type Library Editor activated while editing the
+// Type Library, the contents of this file will be regenerated and all
+// manual modifications will be lost.
+// ************************************************************************ //
+
+// PASTLWTR : $Revision:1.0$
+// File generated on 3/4/2004 1:47:40 AM from Type Library described below.
+
+// ************************************************************************ //
+// Type Lib: C:\Dev\ROSDK3\Bin\ROCOM.dll (1)
+// LIBID: {FC2EC537-E5F2-4C65-82EA-AF94C4AA742B}
+// LCID: 0
+// Helpfile:
+// DepndLst:
+// (1) v2.0 stdole, (C:\WINDOWS\system32\stdole2.tlb)
+// (2) v4.0 StdVCL, (C:\WINDOWS\system32\stdvcl40.dll)
+// ************************************************************************ //
+{$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers.
+{$WARN SYMBOL_PLATFORM OFF}
+{$WRITEABLECONST ON}
+{$VARPROPSETTER ON}
+interface
+
+uses Windows, ActiveX, Classes, Graphics, OleServer, StdVCL, Variants;
+
+
+// *********************************************************************//
+// GUIDS declared in the TypeLibrary. Following prefixes are used:
+// Type Libraries : LIBID_xxxx
+// CoClasses : CLASS_xxxx
+// DISPInterfaces : DIID_xxxx
+// Non-DISP interfaces: IID_xxxx
+// *********************************************************************//
+const
+ // TypeLibrary Major and minor versions
+ ROCOMMajorVersion = 1;
+ ROCOMMinorVersion = 0;
+
+ LIBID_ROCOM: TGUID = '{FC2EC537-E5F2-4C65-82EA-AF94C4AA742B}';
+
+ IID_IROCOMServer: TGUID = '{B59C6504-BAEC-41D3-8740-B8EF6BC8630F}';
+ CLASS_ROCOMServer: TGUID = '{886FF65A-00E0-4D12-8FB3-0129F03842C0}';
+ IID_IROCOMArray: TGUID = '{52F2EA1A-ABDB-4124-9BDE-6B49105A92E9}';
+ IID_IROCOMBinary: TGUID = '{C2B18A45-04B9-45D8-A84F-DACD2FBABAF8}';
+ CLASS_ROCOMBinaryTypeWrapper: TGUID = '{3B24E151-81FC-4EA6-BD91-C602499963F7}';
+ CLASS_ROCOMArrayTypeWrapper: TGUID = '{CFF986AA-6C4A-417F-B688-84CCF32FE0F0}';
+type
+
+// *********************************************************************//
+// Forward declaration of types defined in TypeLibrary
+// *********************************************************************//
+ IROCOMServer = interface;
+ IROCOMServerDisp = dispinterface;
+ IROCOMArray = interface;
+ IROCOMArrayDisp = dispinterface;
+ IROCOMBinary = interface;
+ IROCOMBinaryDisp = dispinterface;
+
+// *********************************************************************//
+// Declaration of CoClasses defined in Type Library
+// (NOTE: Here we map each CoClass to its Default Interface)
+// *********************************************************************//
+ ROCOMServer = IROCOMServer;
+ ROCOMBinaryTypeWrapper = IROCOMBinary;
+ ROCOMArrayTypeWrapper = IROCOMArray;
+
+
+// *********************************************************************//
+// Interface: IROCOMServer
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {B59C6504-BAEC-41D3-8740-B8EF6BC8630F}
+// *********************************************************************//
+ IROCOMServer = interface(IDispatch)
+ ['{B59C6504-BAEC-41D3-8740-B8EF6BC8630F}']
+ function CreateService(const ServiceName: WideString): OleVariant; safecall;
+ function CreateComplexType(const ComplexTypeName: WideString): OleVariant; safecall;
+ function CreateArrayType(const aArrayTypeName: WideString): OleVariant; safecall;
+ function CreateBinaryType: OleVariant; safecall;
+ function Get_ChannelType: WideString; safecall;
+ procedure Set_ChannelType(const Value: WideString); safecall;
+ function Get_MessageType: WideString; safecall;
+ procedure Set_MessageType(const Value: WideString); safecall;
+ procedure SetChannelProperty(const Name: WideString; Value: OleVariant); safecall;
+ procedure SetMessageProperty(const Name: WideString; Value: OleVariant); safecall;
+ function GetChannelProperty(const Name: WideString): OleVariant; safecall;
+ function GetMessageProperty(const Name: WideString): OleVariant; safecall;
+ property ChannelType: WideString read Get_ChannelType write Set_ChannelType;
+ property MessageType: WideString read Get_MessageType write Set_MessageType;
+ end;
+
+// *********************************************************************//
+// DispIntf: IROCOMServerDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {B59C6504-BAEC-41D3-8740-B8EF6BC8630F}
+// *********************************************************************//
+ IROCOMServerDisp = dispinterface
+ ['{B59C6504-BAEC-41D3-8740-B8EF6BC8630F}']
+ function CreateService(const ServiceName: WideString): OleVariant; dispid 1;
+ function CreateComplexType(const ComplexTypeName: WideString): OleVariant; dispid 2;
+ function CreateArrayType(const aArrayTypeName: WideString): OleVariant; dispid 147;
+ function CreateBinaryType: OleVariant; dispid 4;
+ property ChannelType: WideString dispid 8;
+ property MessageType: WideString dispid 9;
+ procedure SetChannelProperty(const Name: WideString; Value: OleVariant); dispid 10;
+ procedure SetMessageProperty(const Name: WideString; Value: OleVariant); dispid 11;
+ function GetChannelProperty(const Name: WideString): OleVariant; dispid 12;
+ function GetMessageProperty(const Name: WideString): OleVariant; dispid 13;
+ end;
+
+// *********************************************************************//
+// Interface: IROCOMArray
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {52F2EA1A-ABDB-4124-9BDE-6B49105A92E9}
+// *********************************************************************//
+ IROCOMArray = interface(IDispatch)
+ ['{52F2EA1A-ABDB-4124-9BDE-6B49105A92E9}']
+ function Get_Count: Integer; safecall;
+ procedure Set_Count(Value: Integer); safecall;
+ procedure SetValue(aIndex: Integer; aValue: OleVariant); safecall;
+ function GetValue(aIndex: Integer): OleVariant; safecall;
+ property Count: Integer read Get_Count write Set_Count;
+ end;
+
+// *********************************************************************//
+// DispIntf: IROCOMArrayDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {52F2EA1A-ABDB-4124-9BDE-6B49105A92E9}
+// *********************************************************************//
+ IROCOMArrayDisp = dispinterface
+ ['{52F2EA1A-ABDB-4124-9BDE-6B49105A92E9}']
+ property Count: Integer dispid 1;
+ procedure SetValue(aIndex: Integer; aValue: OleVariant); dispid 2;
+ function GetValue(aIndex: Integer): OleVariant; dispid 3;
+ end;
+
+// *********************************************************************//
+// Interface: IROCOMBinary
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {C2B18A45-04B9-45D8-A84F-DACD2FBABAF8}
+// *********************************************************************//
+ IROCOMBinary = interface(IDispatch)
+ ['{C2B18A45-04B9-45D8-A84F-DACD2FBABAF8}']
+ procedure LoadFromFile(const aFilename: WideString); safecall;
+ procedure SaveToFile(const aFilename: WideString); safecall;
+ function ToString: WideString; safecall;
+ end;
+
+// *********************************************************************//
+// DispIntf: IROCOMBinaryDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {C2B18A45-04B9-45D8-A84F-DACD2FBABAF8}
+// *********************************************************************//
+ IROCOMBinaryDisp = dispinterface
+ ['{C2B18A45-04B9-45D8-A84F-DACD2FBABAF8}']
+ procedure LoadFromFile(const aFilename: WideString); dispid 1;
+ procedure SaveToFile(const aFilename: WideString); dispid 2;
+ function ToString: WideString; dispid 201;
+ end;
+
+// *********************************************************************//
+// The Class CoROCOMServer provides a Create and CreateRemote method to
+// create instances of the default interface IROCOMServer exposed by
+// the CoClass ROCOMServer. The functions are intended to be used by
+// clients wishing to automate the CoClass objects exposed by the
+// server of this typelibrary.
+// *********************************************************************//
+ CoROCOMServer = class
+ class function Create: IROCOMServer;
+ class function CreateRemote(const MachineName: string): IROCOMServer;
+ end;
+
+// *********************************************************************//
+// The Class CoROCOMBinaryTypeWrapper provides a Create and CreateRemote method to
+// create instances of the default interface IROCOMBinary exposed by
+// the CoClass ROCOMBinaryTypeWrapper. The functions are intended to be used by
+// clients wishing to automate the CoClass objects exposed by the
+// server of this typelibrary.
+// *********************************************************************//
+ CoROCOMBinaryTypeWrapper = class
+ class function Create: IROCOMBinary;
+ class function CreateRemote(const MachineName: string): IROCOMBinary;
+ end;
+
+// *********************************************************************//
+// The Class CoROCOMArrayTypeWrapper provides a Create and CreateRemote method to
+// create instances of the default interface IROCOMArray exposed by
+// the CoClass ROCOMArrayTypeWrapper. The functions are intended to be used by
+// clients wishing to automate the CoClass objects exposed by the
+// server of this typelibrary.
+// *********************************************************************//
+ CoROCOMArrayTypeWrapper = class
+ class function Create: IROCOMArray;
+ class function CreateRemote(const MachineName: string): IROCOMArray;
+ end;
+
+implementation
+
+uses ComObj;
+
+class function CoROCOMServer.Create: IROCOMServer;
+begin
+ Result := CreateComObject(CLASS_ROCOMServer) as IROCOMServer;
+end;
+
+class function CoROCOMServer.CreateRemote(const MachineName: string): IROCOMServer;
+begin
+ Result := CreateRemoteComObject(MachineName, CLASS_ROCOMServer) as IROCOMServer;
+end;
+
+class function CoROCOMBinaryTypeWrapper.Create: IROCOMBinary;
+begin
+ Result := CreateComObject(CLASS_ROCOMBinaryTypeWrapper) as IROCOMBinary;
+end;
+
+class function CoROCOMBinaryTypeWrapper.CreateRemote(const MachineName: string): IROCOMBinary;
+begin
+ Result := CreateRemoteComObject(MachineName, CLASS_ROCOMBinaryTypeWrapper) as IROCOMBinary;
+end;
+
+class function CoROCOMArrayTypeWrapper.Create: IROCOMArray;
+begin
+ Result := CreateComObject(CLASS_ROCOMArrayTypeWrapper) as IROCOMArray;
+end;
+
+class function CoROCOMArrayTypeWrapper.CreateRemote(const MachineName: string): IROCOMArray;
+begin
+ Result := CreateRemoteComObject(MachineName, CLASS_ROCOMArrayTypeWrapper) as IROCOMArray;
+end;
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/Test.vbs b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/Test.vbs
new file mode 100644
index 0000000..e624596
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/COM/Test.vbs
@@ -0,0 +1,19 @@
+Dim result
+
+MsgBox "Please run \Samples\MegaDemo\MegaDemoServer.exe and activate HTTP server"
+
+Set ROServer = CreateObject("RemObjects.SDK.COMServer")
+ROServer.MessageType = "TROBINMessage"
+ROServer.ChannelType = "TROWinInetHTTPChannel"
+ROServer.SetChannelProperty "TargetURL", "http://localhost:8099/BIN"
+
+Set MegaDemoService = ROServer.CreateService("MegaDemoService")
+
+result = MegaDemoService.Sum(100, 200)
+MsgBox "The result was [" & result & "]"
+
+result = MegaDemoService.GetServerTime
+MsgBox "The result was [" & result & "]"
+
+Set MegaDemoService = nothing
+Set ROServer = nothing
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactories.Sample.html b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactories.Sample.html
new file mode 100644
index 0000000..48ee2ce
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactories.Sample.html
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+ Class Factories
+
+
+Purpose This example shows how to use a Class Factory to generate three types of
+server:
+
+Singleton : all clients access a single server object.
+Single Call : server instances are created on demand and destroyed after processing the method call.
+Pooled : multiple server instances are accessible by clients. This
+ factory works exactly the same as Singleton, unless the first server instance is
+ busy.
+
+ Note : to test this sample properly, you need to run at least two clients.
+
+
+
+
+ Examine the Code
+
+See how the three services were defined by editing the service library. Do this by making the server
+the selected project and by using the menu option: RemObjects | Edit Service Library .
+
+ Note : if you don't see this menu option but see 'Service Builder' instead,
+you still have the client set as the current project.
+The implementation of the three server types is held in three Impl.pas files: SingletonService_Impl ,
+SingleCallService_Impl and PooledService_Impl .
+Examine the simple code needed to invoke the methods in ClassFactoryClientMain.pas .
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactories.bdsgroup b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactories.bdsgroup
new file mode 100644
index 0000000..e719d18
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactories.bdsgroup
@@ -0,0 +1,20 @@
+
+
+
+
+ Default.Personality
+
+ 1.0
+ {A63822DE-BB05-4997-82F0-A0365363EDAC}
+
+
+
+
+
+ ClassFactoryServer.bdsproj
+ ClassFactoryClient.bdsproj
+ ClassFactoryServer.exe ClassFactoryClient.exe
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactories.bpg b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactories.bpg
new file mode 100644
index 0000000..fb0e659
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactories.bpg
@@ -0,0 +1,23 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = ClassFactoryServer.exe ClassFactoryClient.exe
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+ClassFactoryClient.exe: ClassFactoryClient.dpr
+ $(DCC)
+
+ClassFactoryServer.exe: ClassFactoryServer.dpr
+ $(DCC)
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactories.groupproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactories.groupproj
new file mode 100644
index 0000000..e7a1a2a
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactories.groupproj
@@ -0,0 +1,40 @@
+
+
+ {0fdd2da8-7771-46ec-80ff-8029ed719481}
+
+
+
+
+ Default.Personality
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryClient.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryClient.bdsproj
new file mode 100644
index 0000000..115a19e
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryClient.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {3F221C60-195B-45A6-8EE5-8A4DB5BAE95E}
+
+
+
+
+ ClassFactoryClient.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryClient.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryClient.dpr
new file mode 100644
index 0000000..e737c09
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryClient.dpr
@@ -0,0 +1,14 @@
+program ClassFactoryClient;
+
+uses
+ Forms,
+ ClassFactoryClientMain in 'ClassFactoryClientMain.pas' {ClassFactoryClientMainForm},
+ ClassFactoryLibrary_Intf in 'ClassFactoryLibrary_Intf.pas';
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TClassFactoryClientMainForm, ClassFactoryClientMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryClient.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryClient.dproj
new file mode 100644
index 0000000..f66fcd7
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryClient.dproj
@@ -0,0 +1,73 @@
+
+
+ {88e5029b-cc75-4d02-aca4-f516bd0f5012}
+ ClassFactoryClient.dpr
+ Debug
+ AnyCPU
+ DCC32
+ ClassFactoryClient.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ ClassFactoryClient.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryClient.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryClient.res
new file mode 100644
index 0000000..90e4219
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryClient.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryClientMain.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryClientMain.dfm
new file mode 100644
index 0000000..e26eed8
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryClientMain.dfm
@@ -0,0 +1,163 @@
+object ClassFactoryClientMainForm: TClassFactoryClientMainForm
+ Left = 89
+ Top = 114
+ AutoScroll = False
+ Caption = 'Class Factory Client'
+ ClientHeight = 338
+ ClientWidth = 445
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ PixelsPerInch = 96
+ TextHeight = 13
+ object GroupBox1: TGroupBox
+ Left = 8
+ Top = 8
+ Width = 433
+ Height = 105
+ Caption = 'Singleton Class Factory'
+ TabOrder = 0
+ object Label1: TLabel
+ Left = 187
+ Top = 33
+ Width = 233
+ Height = 39
+ Caption =
+ 'Singleton: this server side object is created only once. If you ' +
+ 'Set a value all clients connected will Get the same.'
+ WordWrap = True
+ end
+ object seSingleton: TSpinEdit
+ Left = 27
+ Top = 32
+ Width = 121
+ Height = 22
+ MaxValue = 0
+ MinValue = 0
+ TabOrder = 0
+ Value = 0
+ end
+ object SingletonGetButton: TButton
+ Left = 11
+ Top = 64
+ Width = 75
+ Height = 25
+ Caption = 'Get'
+ TabOrder = 1
+ OnClick = SingletonGetButtonClick
+ end
+ object SingletonSetButton: TButton
+ Left = 91
+ Top = 64
+ Width = 75
+ Height = 25
+ Caption = 'Set'
+ TabOrder = 2
+ OnClick = SingletonSetButtonClick
+ end
+ end
+ object GroupBox2: TGroupBox
+ Left = 8
+ Top = 120
+ Width = 433
+ Height = 105
+ Caption = 'Single-Call Class Factory'
+ TabOrder = 1
+ object Label2: TLabel
+ Left = 188
+ Top = 27
+ Width = 233
+ Height = 52
+ Caption =
+ 'Single-Call (base class factory): all instances are created on d' +
+ 'emand and destroyed at the end of the method call. This is the p' +
+ 'referred class factory if you need high scalability and fail-ove' +
+ 'r.'
+ WordWrap = True
+ end
+ object seSingleCall: TSpinEdit
+ Left = 27
+ Top = 32
+ Width = 121
+ Height = 22
+ MaxValue = 0
+ MinValue = 0
+ TabOrder = 0
+ Value = 0
+ end
+ object SingleCallSetButton: TButton
+ Left = 50
+ Top = 61
+ Width = 75
+ Height = 25
+ Caption = 'Set'
+ TabOrder = 1
+ OnClick = SingleCallSetButtonClick
+ end
+ end
+ object GroupBox3: TGroupBox
+ Left = 8
+ Top = 232
+ Width = 433
+ Height = 105
+ Caption = 'Pooled Class Factory'
+ TabOrder = 2
+ object Label3: TLabel
+ Left = 188
+ Top = 20
+ Width = 233
+ Height = 65
+ Caption =
+ 'Pooled Class Factory: two instances of the server side object ar' +
+ 'e being pooled. See how you access a different object by setting' +
+ ' two different values (i.e. 1 and 2 ) and then clicking on the G' +
+ 'et button multiple times from different clients.'
+ WordWrap = True
+ end
+ object spPooled: TSpinEdit
+ Left = 27
+ Top = 32
+ Width = 121
+ Height = 22
+ MaxValue = 0
+ MinValue = 0
+ TabOrder = 0
+ Value = 0
+ end
+ object PooledGetButton: TButton
+ Left = 11
+ Top = 64
+ Width = 75
+ Height = 25
+ Caption = 'Get'
+ TabOrder = 1
+ OnClick = PooledGetButtonClick
+ end
+ object PooledSetButton: TButton
+ Left = 91
+ Top = 64
+ Width = 75
+ Height = 25
+ Caption = 'Set'
+ TabOrder = 2
+ OnClick = PooledSetButtonClick
+ end
+ end
+ object ROBINMessage: TROBinMessage
+ Left = 64
+ Top = 16
+ end
+ object ROIndyTCPChannel: TROIndyTCPChannel
+ ServerLocators = <>
+ DispatchOptions = []
+ Port = 8090
+ Host = '127.0.0.1'
+ Left = 104
+ Top = 16
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryClientMain.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryClientMain.pas
new file mode 100644
index 0000000..40fdfaf
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryClientMain.pas
@@ -0,0 +1,85 @@
+unit ClassFactoryClientMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ uROWinMessageChannel, StdCtrls, Spin,
+ uROClient, uROBINMessage, uROIndyTCPChannel;
+
+type
+ TClassFactoryClientMainForm = class(TForm)
+ GroupBox1: TGroupBox;
+ seSingleton: TSpinEdit;
+ SingletonGetButton: TButton;
+ SingletonSetButton: TButton;
+ ROBINMessage: TROBINMessage;
+ GroupBox2: TGroupBox;
+ seSingleCall: TSpinEdit;
+ SingleCallSetButton: TButton;
+ GroupBox3: TGroupBox;
+ spPooled: TSpinEdit;
+ PooledGetButton: TButton;
+ PooledSetButton: TButton;
+ Label1: TLabel;
+ Label2: TLabel;
+ Label3: TLabel;
+ ROIndyTCPChannel: TROIndyTCPChannel;
+ procedure SingletonGetButtonClick(Sender: TObject);
+ procedure SingleCallGetButtonClick(Sender: TObject);
+ procedure SingletonSetButtonClick(Sender: TObject);
+ procedure SingleCallSetButtonClick(Sender: TObject);
+ procedure PooledGetButtonClick(Sender: TObject);
+ procedure PooledSetButtonClick(Sender: TObject);
+ private
+
+ public
+
+ end;
+
+var
+ ClassFactoryClientMainForm: TClassFactoryClientMainForm;
+
+implementation
+
+uses ClassFactoryLibrary_Intf;
+
+{$R *.DFM}
+
+procedure TClassFactoryClientMainForm.SingletonGetButtonClick(Sender: TObject);
+begin
+ with CoSingletonService.Create(ROBINMessage, ROIndyTCPChannel) do
+ ShowMessage(IntToStr(GetValue));
+end;
+
+procedure TClassFactoryClientMainForm.SingletonSetButtonClick(Sender: TObject);
+begin
+ with CoSingletonService.Create(ROBINMessage, ROIndyTCPChannel) do
+ SetValue(seSingleton.Value);
+end;
+
+procedure TClassFactoryClientMainForm.SingleCallGetButtonClick(Sender: TObject);
+begin
+ with CoSingleCallService.Create(ROBINMessage, ROIndyTCPChannel) do
+ ShowMessage(IntToStr(GetValue));
+end;
+
+procedure TClassFactoryClientMainForm.SingleCallSetButtonClick(Sender: TObject);
+begin
+ with CoSingleCallService.Create(ROBINMessage, ROIndyTCPChannel) do
+ SetValue(seSingleton.Value);
+end;
+
+procedure TClassFactoryClientMainForm.PooledGetButtonClick(Sender: TObject);
+begin
+ with CoPooledService.Create(ROBINMessage, ROIndyTCPChannel) do
+ ShowMessage(IntToStr(GetValue));
+end;
+
+procedure TClassFactoryClientMainForm.PooledSetButtonClick(Sender: TObject);
+begin
+ with CoPooledService.Create(ROBINMessage, ROIndyTCPChannel) do
+ SetValue(spPooled.Value);
+end;
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryLibrary.RODL b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryLibrary.RODL
new file mode 100644
index 0000000..54e4037
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryLibrary.RODL
@@ -0,0 +1,72 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryLibrary_Intf.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryLibrary_Intf.pas
new file mode 100644
index 0000000..5d5dd80
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryLibrary_Intf.pas
@@ -0,0 +1,241 @@
+unit ClassFactoryLibrary_Intf;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROClasses, uROClient, uROTypes, uROClientIntf;
+
+const
+ { Library ID }
+ LibraryUID = '{52396EB8-14AA-4307-84B1-3608886221E7}';
+
+ { Service Interface ID's }
+ ISingletonService_IID : TGUID = '{52396EB8-14AA-4307-84B1-3608886221E7}';
+ ISingleCallService_IID : TGUID = '{00000000-0000-0000-0000-000000000000}';
+ IPooledService_IID : TGUID = '{D0A3AE95-EDE8-4B0B-B832-11894E941F8E}';
+
+ { Event ID's }
+
+type
+ { Forward declarations }
+ ISingletonService = interface;
+ ISingleCallService = interface;
+ IPooledService = interface;
+
+
+ { ISingletonService }
+ ISingletonService = interface
+ ['{52396EB8-14AA-4307-84B1-3608886221E7}']
+ function GetValue: Integer;
+ procedure SetValue(const aValue: Integer);
+ end;
+
+ { CoSingletonService }
+ CoSingletonService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): ISingletonService;
+ end;
+
+ { TSingletonService_Proxy }
+ TSingletonService_Proxy = class(TROProxy, ISingletonService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ function GetValue: Integer;
+ procedure SetValue(const aValue: Integer);
+ end;
+
+ { ISingleCallService }
+ ISingleCallService = interface
+ ['{00000000-0000-0000-0000-000000000000}']
+ function GetValue: Integer;
+ procedure SetValue(const aValue: Integer);
+ end;
+
+ { CoSingleCallService }
+ CoSingleCallService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): ISingleCallService;
+ end;
+
+ { TSingleCallService_Proxy }
+ TSingleCallService_Proxy = class(TROProxy, ISingleCallService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ function GetValue: Integer;
+ procedure SetValue(const aValue: Integer);
+ end;
+
+ { IPooledService }
+ IPooledService = interface
+ ['{D0A3AE95-EDE8-4B0B-B832-11894E941F8E}']
+ function GetValue: Integer;
+ procedure SetValue(const aValue: Integer);
+ end;
+
+ { CoPooledService }
+ CoPooledService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IPooledService;
+ end;
+
+ { TPooledService_Proxy }
+ TPooledService_Proxy = class(TROProxy, IPooledService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ function GetValue: Integer;
+ procedure SetValue(const aValue: Integer);
+ end;
+
+implementation
+
+uses
+ {vcl:} SysUtils,
+ {RemObjects:} uROEventRepository, uRORes;
+
+{ CoSingletonService }
+
+class function CoSingletonService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): ISingletonService;
+begin
+ result := TSingletonService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TSingletonService_Proxy }
+
+function TSingletonService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'SingletonService';
+end;
+
+function TSingletonService_Proxy.GetValue: Integer;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'ClassFactoryLibrary', __InterfaceName, 'GetValue');
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Integer), result, []);
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+procedure TSingletonService_Proxy.SetValue(const aValue: Integer);
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'ClassFactoryLibrary', __InterfaceName, 'SetValue');
+ __Message.Write('aValue', TypeInfo(Integer), aValue, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+{ CoSingleCallService }
+
+class function CoSingleCallService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): ISingleCallService;
+begin
+ result := TSingleCallService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TSingleCallService_Proxy }
+
+function TSingleCallService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'SingleCallService';
+end;
+
+function TSingleCallService_Proxy.GetValue: Integer;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'ClassFactoryLibrary', __InterfaceName, 'GetValue');
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Integer), result, []);
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+procedure TSingleCallService_Proxy.SetValue(const aValue: Integer);
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'ClassFactoryLibrary', __InterfaceName, 'SetValue');
+ __Message.Write('aValue', TypeInfo(Integer), aValue, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+{ CoPooledService }
+
+class function CoPooledService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IPooledService;
+begin
+ result := TPooledService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TPooledService_Proxy }
+
+function TPooledService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'PooledService';
+end;
+
+function TPooledService_Proxy.GetValue: Integer;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'ClassFactoryLibrary', __InterfaceName, 'GetValue');
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Integer), result, []);
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+procedure TPooledService_Proxy.SetValue(const aValue: Integer);
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'ClassFactoryLibrary', __InterfaceName, 'SetValue');
+ __Message.Write('aValue', TypeInfo(Integer), aValue, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+initialization
+ RegisterProxyClass(ISingletonService_IID, TSingletonService_Proxy);
+ RegisterProxyClass(ISingleCallService_IID, TSingleCallService_Proxy);
+ RegisterProxyClass(IPooledService_IID, TPooledService_Proxy);
+
+
+finalization
+ UnregisterProxyClass(ISingletonService_IID);
+ UnregisterProxyClass(ISingleCallService_IID);
+ UnregisterProxyClass(IPooledService_IID);
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryLibrary_Invk.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryLibrary_Invk.pas
new file mode 100644
index 0000000..60fa260
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryLibrary_Invk.pas
@@ -0,0 +1,159 @@
+unit ClassFactoryLibrary_Invk;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes,
+ {RemObjects:} uROServer, uROServerIntf, uROTypes, uROClientIntf,
+ {Generated:} ClassFactoryLibrary_Intf;
+
+type
+ TSingletonService_Invoker = class(TROInvoker)
+ private
+ protected
+ published
+ procedure Invoke_GetValue(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_SetValue(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ end;
+
+ TSingleCallService_Invoker = class(TROInvoker)
+ private
+ protected
+ published
+ procedure Invoke_GetValue(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_SetValue(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ end;
+
+ TPooledService_Invoker = class(TROInvoker)
+ private
+ protected
+ published
+ procedure Invoke_GetValue(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_SetValue(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ end;
+
+implementation
+
+uses
+ {RemObjects:} uRORes, uROClient;
+
+{ TSingletonService_Invoker }
+
+procedure TSingletonService_Invoker.Invoke_GetValue(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function GetValue: Integer; }
+var
+ lResult: Integer;
+begin
+ try
+ lResult := (__Instance as ISingletonService).GetValue;
+
+ __Message.InitializeResponseMessage(__Transport, 'ClassFactoryLibrary', 'SingletonService', 'GetValueResponse');
+ __Message.Write('Result', TypeInfo(Integer), lResult, []);
+ __Message.Finalize;
+
+ finally
+ end;
+end;
+
+procedure TSingletonService_Invoker.Invoke_SetValue(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ procedure SetValue(const aValue: Integer); }
+var
+ aValue: Integer;
+begin
+ try
+ __Message.Read('aValue', TypeInfo(Integer), aValue, []);
+
+ (__Instance as ISingletonService).SetValue(aValue);
+
+ __Message.InitializeResponseMessage(__Transport, 'ClassFactoryLibrary', 'SingletonService', 'SetValueResponse');
+ __Message.Finalize;
+
+ __oResponseOptions := [roNoResponse];
+
+ finally
+ end;
+end;
+
+{ TSingleCallService_Invoker }
+
+procedure TSingleCallService_Invoker.Invoke_GetValue(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function GetValue: Integer; }
+var
+ lResult: Integer;
+begin
+ try
+ lResult := (__Instance as ISingleCallService).GetValue;
+
+ __Message.InitializeResponseMessage(__Transport, 'ClassFactoryLibrary', 'SingleCallService', 'GetValueResponse');
+ __Message.Write('Result', TypeInfo(Integer), lResult, []);
+ __Message.Finalize;
+
+ finally
+ end;
+end;
+
+procedure TSingleCallService_Invoker.Invoke_SetValue(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ procedure SetValue(const aValue: Integer); }
+var
+ aValue: Integer;
+begin
+ try
+ __Message.Read('aValue', TypeInfo(Integer), aValue, []);
+
+ (__Instance as ISingleCallService).SetValue(aValue);
+
+ __Message.InitializeResponseMessage(__Transport, 'ClassFactoryLibrary', 'SingleCallService', 'SetValueResponse');
+ __Message.Finalize;
+
+ __oResponseOptions := [roNoResponse];
+
+ finally
+ end;
+end;
+
+{ TPooledService_Invoker }
+
+procedure TPooledService_Invoker.Invoke_GetValue(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function GetValue: Integer; }
+var
+ lResult: Integer;
+begin
+ try
+ lResult := (__Instance as IPooledService).GetValue;
+
+ __Message.InitializeResponseMessage(__Transport, 'ClassFactoryLibrary', 'PooledService', 'GetValueResponse');
+ __Message.Write('Result', TypeInfo(Integer), lResult, []);
+ __Message.Finalize;
+
+ finally
+ end;
+end;
+
+procedure TPooledService_Invoker.Invoke_SetValue(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ procedure SetValue(const aValue: Integer); }
+var
+ aValue: Integer;
+begin
+ try
+ __Message.Read('aValue', TypeInfo(Integer), aValue, []);
+
+ (__Instance as IPooledService).SetValue(aValue);
+
+ __Message.InitializeResponseMessage(__Transport, 'ClassFactoryLibrary', 'PooledService', 'SetValueResponse');
+ __Message.Finalize;
+
+ __oResponseOptions := [roNoResponse];
+
+ finally
+ end;
+end;
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryServer.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryServer.bdsproj
new file mode 100644
index 0000000..347e889
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryServer.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {73C513C2-3C66-4CA8-8F74-2820E1E4689F}
+
+
+
+
+ ClassFactoryServer.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryServer.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryServer.dpr
new file mode 100644
index 0000000..7d920c1
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryServer.dpr
@@ -0,0 +1,22 @@
+program ClassFactoryServer;
+
+{#ROGEN:ClassFactoryLibrary.rodl} // RemObjects: Careful, do not remove!
+
+uses
+ Forms,
+ ClassFactoryServerMain in 'ClassFactoryServerMain.pas' {ClassFactoryServerMainForm},
+ ClassFactoryLibrary_Intf in 'ClassFactoryLibrary_Intf.pas',
+ ClassFactoryLibrary_Invk in 'ClassFactoryLibrary_Invk.pas',
+ SingletonService_Impl in 'SingletonService_Impl.pas',
+ SingleCallService_Impl in 'SingleCallService_Impl.pas',
+ PooledService_Impl in 'PooledService_Impl.pas';
+
+{$R *.RES}
+{$R RODLFile.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'Class Factories Server';
+ Application.CreateForm(TClassFactoryServerMainForm, ClassFactoryServerMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryServer.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryServer.dproj
new file mode 100644
index 0000000..5eeddf2
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryServer.dproj
@@ -0,0 +1,77 @@
+
+
+ {f93039eb-3d72-4834-a1b2-ff8e267d9a0c}
+ ClassFactoryServer.dpr
+ Debug
+ AnyCPU
+ DCC32
+ ClassFactoryServer.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ ClassFactoryServer.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryServer.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryServer.res
new file mode 100644
index 0000000..1cabf6e
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryServer.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryServerMain.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryServerMain.dfm
new file mode 100644
index 0000000..5022157
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryServerMain.dfm
@@ -0,0 +1,48 @@
+object ClassFactoryServerMainForm: TClassFactoryServerMainForm
+ Left = 382
+ Top = 238
+ AutoScroll = False
+ Caption = 'Class Factory Server'
+ ClientHeight = 101
+ ClientWidth = 254
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Form1'
+ Font.Style = []
+ OldCreateOrder = False
+ PixelsPerInch = 96
+ TextHeight = 14
+ object ROPoweredByRemObjectsButton1: TROPoweredByRemObjectsButton
+ Left = 21
+ Top = 10
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ end
+ object Button1: TButton
+ Left = 85
+ Top = 66
+ Width = 75
+ Height = 25
+ Caption = 'Activate'
+ TabOrder = 0
+ OnClick = Button1Click
+ end
+ object ROMessage: TROBinMessage
+ Left = 104
+ Top = 16
+ end
+ object ROServer: TROIndyTCPServer
+ Dispatchers = <
+ item
+ Name = 'ROMessage'
+ Message = ROMessage
+ Enabled = True
+ end>
+ Port = 8090
+ Left = 136
+ Top = 16
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryServerMain.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryServerMain.pas
new file mode 100644
index 0000000..15cc8a5
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/ClassFactoryServerMain.pas
@@ -0,0 +1,41 @@
+unit ClassFactoryServerMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StrUtils,
+ StdCtrls, uROClient, uROBINMessage, uROClientIntf, uROServer, uROWinMessageServer,
+ uROIndyTCPServer, uROPoweredByRemObjectsButton;
+
+type
+ TClassFactoryServerMainForm = class(TForm)
+ ROMessage: TROBINMessage;
+ Button1: TButton;
+ ROServer: TROIndyTCPServer;
+ ROPoweredByRemObjectsButton1: TROPoweredByRemObjectsButton;
+ procedure Button1Click(Sender: TObject);
+ private
+
+ protected
+
+ public
+
+ end;
+
+var
+ ClassFactoryServerMainForm: TClassFactoryServerMainForm;
+
+implementation
+
+
+{$R *.DFM}
+
+procedure TClassFactoryServerMainForm.Button1Click(Sender: TObject);
+begin
+ ROServer.Active := ROServer.Active XOR TRUE;
+
+ Button1.Caption := IfThen(ROServer.Active,'Deactivate','Activate');
+end;
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/PooledService_Impl.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/PooledService_Impl.pas
new file mode 100644
index 0000000..f49872d
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/PooledService_Impl.pas
@@ -0,0 +1,52 @@
+unit PooledService_Impl;
+
+interface
+
+uses Classes, uROClientIntf, uROServer, uROServerIntf, ClassFactoryLibrary_Intf;
+
+type
+ TPooledService = class(TRORemotable, IPooledService)
+ private
+ fValue: integer;
+
+ protected
+ function GetValue: Integer;
+ procedure SetValue(const aValue: Integer);
+ public
+ constructor Create; override;
+ end;
+
+implementation
+
+uses uROClassFactories, ClassFactoryLibrary_Invk, Dialogs;
+
+procedure Create_PooledService(out anInstance: IUnknown);
+begin
+ anInstance := TPooledService.Create;
+end;
+
+constructor TPooledService.Create;
+begin
+ inherited;
+ FValue := 0;
+end;
+
+function TPooledService.GetValue: Integer;
+begin
+ MessageDlg('GetValue executing...', mtWarning, [mbOK], 0);
+ result := fValue;
+end;
+
+procedure TPooledService.SetValue(const aValue: Integer);
+begin
+ MessageDlg('SetValue executing...', mtWarning, [mbOK], 0);
+ fValue := aValue;
+end;
+
+initialization
+ TROPooledClassFactory.Create('PooledService', Create_PooledService, TPooledService_Invoker, 2);
+
+finalization
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/RODLFile.RES b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/RODLFile.RES
new file mode 100644
index 0000000..a73bc69
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/RODLFile.RES differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/SingleCallService_Impl.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/SingleCallService_Impl.pas
new file mode 100644
index 0000000..476dc5e
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/SingleCallService_Impl.pas
@@ -0,0 +1,51 @@
+unit SingleCallService_Impl;
+
+interface
+
+uses Classes, uROClientIntf, uROServer, uROServerIntf, ClassFactoryLibrary_Intf;
+
+type
+ TSingleCallService = class(TRORemotable, ISingleCallService)
+ private
+ fValue : integer;
+
+ protected
+ function GetValue: Integer;
+ procedure SetValue(const aValue: Integer);
+
+ public
+ constructor Create; override;
+
+ end;
+
+implementation
+
+uses ClassFactoryLibrary_Invk;
+
+procedure Create_SingleCallService(out anInstance : IUnknown);
+begin
+ anInstance := TSingleCallService.Create;
+end;
+
+constructor TSingleCallService.Create;
+begin
+ inherited;
+ fValue := 0;
+end;
+
+function TSingleCallService.GetValue: Integer;
+begin
+ result := fValue;
+end;
+
+procedure TSingleCallService.SetValue(const aValue: Integer);
+begin
+ fValue := aValue;
+end;
+
+initialization
+ TROClassFactory.Create('SingleCallService', Create_SingleCallService, TSingleCallService_Invoker);
+
+finalization
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/SingletonService_Impl.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/SingletonService_Impl.pas
new file mode 100644
index 0000000..816c004
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Class Factories/SingletonService_Impl.pas
@@ -0,0 +1,54 @@
+unit SingletonService_Impl;
+
+interface
+
+uses Classes, uROClientIntf, uROServer, uROServerIntf, ClassFactoryLibrary_Intf;
+
+type
+ TSingletonService = class(TRORemotable, ISingletonService)
+ private
+ fValue : integer;
+
+ protected
+ procedure SetValue(const aValue: Integer);
+ function GetValue: Integer;
+
+ public
+ constructor Create; override;
+
+ end;
+
+implementation
+
+uses uROClassFactories, ClassFactoryLibrary_Invk;
+
+procedure Create_SingletonService(out anInstance : IUnknown);
+begin
+ anInstance := TSingletonService.Create;
+end;
+
+{ TSingletonService }
+
+constructor TSingletonService.Create;
+begin
+ inherited;
+
+ fValue := 0;
+end;
+
+function TSingletonService.GetValue: Integer;
+begin
+ result := fValue
+end;
+
+procedure TSingletonService.SetValue(const aValue: Integer);
+begin
+ fValue := aValue
+end;
+
+initialization
+ TROSingletonClassFactory.Create('SingletonService', Create_SingletonService, TSingletonService_Invoker);
+
+finalization
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnap.Sample.html b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnap.Sample.html
new file mode 100644
index 0000000..48634de
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnap.Sample.html
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+ DataSnap Sample
+
+
+
+Purpose
+
+This example illustrates the use of the TRODataSnapModule and TRODataSnapConnection
+ components.
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnap.bdsgroup b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnap.bdsgroup
new file mode 100644
index 0000000..42f0844
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnap.bdsgroup
@@ -0,0 +1,21 @@
+
+
+
+
+ Default.Personality
+
+ 1.0
+ {0BFC19ED-65B3-4CF2-9403-63A53F4ADF29}
+
+
+
+
+
+ DataSnapServer.bdsproj
+ DataSnapClient.bdsproj
+ DataSnapIsapiServer.bdsproj
+ DataSnapServer.exe DataSnapClient.exe DataSnapIsapiServer.dll
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnap.bpg b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnap.bpg
new file mode 100644
index 0000000..cc8f7c1
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnap.bpg
@@ -0,0 +1,26 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = DataSnapServer.exe DataSnapClient.exe DataSnapIsapiServer.dll
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+DataSnapServer.exe: DataSnapServer.dpr
+ $(DCC)
+
+DataSnapClient.exe: DataSnapClient.dpr
+ $(DCC)
+
+DataSnapIsapiServer.dll: DataSnapIsapiServer.dpr
+ $(DCC)
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnap.groupproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnap.groupproj
new file mode 100644
index 0000000..6d7a092
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnap.groupproj
@@ -0,0 +1,49 @@
+
+
+ {9e762aad-5388-4744-8d43-255109c69ecb}
+
+
+
+
+ Default.Personality
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapClient.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapClient.bdsproj
new file mode 100644
index 0000000..9c6dce3
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapClient.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {77AB9609-09A3-4000-814F-DE3417778405}
+
+
+
+
+ DataSnapClient.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapClient.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapClient.dpr
new file mode 100644
index 0000000..55f8e67
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapClient.dpr
@@ -0,0 +1,14 @@
+program DataSnapClient;
+
+uses
+ Forms,
+ DataSnapClientMain in 'DataSnapClientMain.pas' {DataSnapClientMainForm};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'DataSnap Client';
+ Application.CreateForm(TDataSnapClientMainForm, DataSnapClientMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapClient.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapClient.dproj
new file mode 100644
index 0000000..bf3e708
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapClient.dproj
@@ -0,0 +1,72 @@
+
+
+ {2a59077b-565f-4079-9526-6a78fa7543c5}
+ DataSnapClient.dpr
+ Debug
+ AnyCPU
+ DCC32
+ DataSnapClient.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ DataSnapClient.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapClient.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapClient.res
new file mode 100644
index 0000000..90e4219
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapClient.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapClientMain.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapClientMain.dfm
new file mode 100644
index 0000000..ef6ddd0
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapClientMain.dfm
@@ -0,0 +1,266 @@
+object DataSnapClientMainForm: TDataSnapClientMainForm
+ Left = 320
+ Top = 215
+ Caption = 'RemObjects DataSnap Client'
+ ClientHeight = 325
+ ClientWidth = 502
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ PixelsPerInch = 96
+ TextHeight = 13
+ object ConnectButton: TBitBtn
+ Left = 8
+ Top = 8
+ Width = 113
+ Height = 25
+ Caption = 'Connect'
+ TabOrder = 0
+ OnClick = ConnectButtonClick
+ Glyph.Data = {
+ 36030000424D3603000000000000360000002800000010000000100000000100
+ 18000000000000030000120B0000120B00000000000000000000FF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FF811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF811E00
+ 811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FF811E00811E00811E00FF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FF811E0095440F811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF811E00A7632F811E0081
+ 1E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FF811E00BF8B62CCA17E811E00811E00FF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF811E00D8
+ B69CE6D1BFE7D3C4811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FF811E00F0E2D9FCF7F2FAF0E6811E00811E
+ 00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF81
+ 1E00D8AF96F4E2CFF0D7BDD8A784811E00811E00FF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FF811E00F3DECAEFD4B8EBC9A7DAA67D811E00FF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF81
+ 1E00E7BB92E3B081E0A672D5925A811E00FF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF811E00DA995ED78F50D38441CF7B
+ 35811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FF811E00811E00811E00811E00811E00811E00FF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
+ end
+ object DisconnectButton: TBitBtn
+ Left = 8
+ Top = 8
+ Width = 113
+ Height = 25
+ Caption = 'Disconnect'
+ TabOrder = 1
+ Visible = False
+ OnClick = DisconnectButtonClick
+ Glyph.Data = {
+ 36030000424D3603000000000000360000002800000010000000100000000100
+ 18000000000000030000120B0000120B00000000000000000000FF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FF00006E00006EFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF00006E0000
+ 6EFF00FFFF00FFFF00FFFF00FFFF00FF00006E001DE80010DC00006EFF00FFFF
+ 00FFFF00FFFF00FF00006E0004E20008E700006EFF00FFFF00FFFF00FFFF00FF
+ 00006E001AE2001FEB0010D900006EFF00FFFF00FF00006E0005DF0009EB0003
+ DB00006EFF00FFFF00FFFF00FFFF00FFFF00FF00006E001ADF0020EB0013DC00
+ 006E00006E0005E2000BEB0004DA00006EFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FF00006E001BDF0022EB0012E60008EA0009EB0004DF00006EFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF00006E001BE300
+ 16EB0011EB000ADF00006EFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FF00006E0021E7001EEB001AEB0017DF00006EFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF00006E062DE30430EB00
+ 20E2001EE20027EB0019DF00006EFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FF00006E0C35E40E3CEB052BDC00006E00006E001FDC002AEB001CDF0000
+ 6EFF00FFFF00FFFF00FFFF00FFFF00FF00006E1442E41645EB092ED900006EFF
+ 00FFFF00FF00006E0020D9012CEB001FE200006EFF00FFFF00FFFF00FFFF00FF
+ 00006E1C4BE71037DB00006EFF00FFFF00FFFF00FFFF00FF00006E0022DC0027
+ E400006EFF00FFFF00FFFF00FFFF00FFFF00FF00006E00006EFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FF00006E00006EFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
+ end
+ object ApplyUpdatesButton: TBitBtn
+ Left = 8
+ Top = 40
+ Width = 113
+ Height = 25
+ Caption = 'Apply Updates'
+ Enabled = False
+ TabOrder = 2
+ OnClick = ApplyUpdatesButtonClick
+ Glyph.Data = {
+ 36060000424D3606000000000000360400002800000020000000100000000100
+ 08000000000000020000130B0000130B0000000100000000000000000000FFFF
+ FF00F4F3F700E3E2E50095939600A09EA100B8B2BA00908B9100B5ADB600B4AD
+ B500FF00FF00726C7200D3CBD300D3CCD300BDB7BD00B5AFB500D9D3D900CFC9
+ CF0088848800CBC6CB00D8D3D800C1BDC1008482840082808200DCDADC007675
+ 76008F8E8F00C5BDC400E1DAE000F4EFF300807777007A7979008E5D59008050
+ 4B0095645B00A0675B009362530091756C00D1926D00C7916F00D1987000C699
+ 7700DCA37600E2873100E6974300FFE7CC00FFD9AC00FFDEB700FFE2C000FFE5
+ C500FFEAD100FFEBD400FFF4E700FFD99E00FFDDA600FFDEA900FFE5B600FFE7
+ BA00FFEAC200FFDE9900FFF2D000FBFAF700FFFCEE00FFFEE700FFFFE000DDE0
+ D900416560004C4F4F00575959009FA1A1008E9090007E808000FCFEFE00C5C7
+ C700787979006D6E6E00393B3C00484A4B0047494A004E5051005C5E5F005456
+ 57006A6C6D0063656600606263002187E300248BEA00A9B7C4001676D9001770
+ CA001F8AF300134E87003477BC00393A3B001581F6001684FC001166C4001260
+ B600165FB0001C4B80002F6BAC005481B200566A7F004F5A6600C4D4E6000A6E
+ EA000B5EC4000A52A9001069CF00165EB6002B5E9A0021456E002A4A6F003050
+ 7500D9E3EF000A6EEB0009428C000C4186000E4B99000C4184000F4488000F43
+ 87001D4A83001D4373000555C5000548A60041567600494A4C004D4E5000F3F4
+ F600797A7D0082838600939396007070720068686A009F9FA0008B8B8B008484
+ 8400787878006A6A6A00B8020000000000000000000000000000107212008C72
+ 1200240000008333F4002192E400B8020000347212003C721200080000000E00
+ 0000A4741200000000000001000008000000FC71120000010000248512008333
+ F4002192E400B80200008333F4002192E400B802000078721200807212000800
+ 00000E000000A474120000FFFF0001000000B802000000010000000000000000
+ 000000000000000100000000000000000000000000000000000000010000B7C8
+ 0300B802000000FFFF000000000001000000653B0100B802000000FFFF000100
+ 0000FFE1FF00A474120000FFFF000100000064CA1200988D290030851200F048
+ BD00010000003B00000000000000424D68000000000000006600000028000000
+ 100000001000000001000800000000000000000012000000120000008C000000
+ 8C00000000000000FF00FF00F400F700E300E50095009600A000A100B8000400
+ 00009100B500B600B40000000000FF0072007200D300B838FA00D300BD002000
+ 0000B50000000000C700547112008800CB0024851200345AF4007095F800FFFF
+ FF00F373F40026BBBB000000C700000000001400000064CA1200140000002FCA
+ 030058991600A0C701005899160064CA1200988D2900C86DD1000A0A0A0A0A0A
+ 0A0A20202020202020200A0A0A0A0A0A0A0A88888888888888880A0A0A7F8043
+ 0A0A20403A3837353B210A0A0A4686860A0A88180D11491515470A0A4D51860B
+ 4E5D223E32312F2E36210A0A1A0416128A864603140D114949470A4D166F7E42
+ 5B60586C64492D3039210A1A06881917191A0446040D1D0D11474D071B757D6B
+ 5A56625C6D7657333C211A0E18888A4745451287881F491414474D0C0F78695E
+ 5563254872656E343F211A030D8804454553040314091A1C1C474D110979735F
+ 597027010101683D41211A1C0D8804450453091D1D1D130311474D0D08777C6A
+ 61741E010101012323241A030D8816121250041D1D1D1D0404884D10067B7A71
+ 66672901010101232C2B1A0314881F4789190F1D1D1D1D0445044D1C0E51834B
+ 898B2A2626262623280A1A031404871287890E0F0F0F0F040F0A4D1D13518285
+ 881F8A4C0A0A0A0A0A0A1A811C0409090E0F151A0A0A0A0A0A0A4D1804514544
+ 50191A4E0A0A0A0A0A0A1A03150449878709151A0A0A0A0A0A0A4D8718844A47
+ 4653544D0A0A0A0A0A0A1A490315090F1545871A0A0A0A0A0A0A4D0181031505
+ 1217174F0A0A0A0A0A0A1A48021D1849060F0F040A0A0A0A0A0A524D01010214
+ 054D4D0A0A0A0A0A0A0A451A48480203491A1A0A0A0A0A0A0A0A0A0A4D4D4D4D
+ 4D0A0A0A0A0A0A0A0A0A0A0A1A1A1A1A1A0A0A0A0A0A0A0A0A0A}
+ NumGlyphs = 2
+ end
+ object Panel1: TPanel
+ Left = 127
+ Top = 0
+ Width = 375
+ Height = 325
+ Align = alRight
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ BevelOuter = bvNone
+ TabOrder = 3
+ object Splitter1: TSplitter
+ Left = 0
+ Top = 140
+ Width = 375
+ Height = 8
+ Cursor = crVSplit
+ Align = alTop
+ Beveled = True
+ end
+ object gProducts: TDBGrid
+ Left = 0
+ Top = 148
+ Width = 375
+ Height = 177
+ Align = alClient
+ DataSource = dsProducts
+ TabOrder = 0
+ TitleFont.Charset = DEFAULT_CHARSET
+ TitleFont.Color = clWindowText
+ TitleFont.Height = -11
+ TitleFont.Name = 'Tahoma'
+ TitleFont.Style = []
+ end
+ object gCustomers: TDBGrid
+ Left = 0
+ Top = 0
+ Width = 375
+ Height = 140
+ Align = alTop
+ DataSource = dsCustomers
+ TabOrder = 1
+ TitleFont.Charset = DEFAULT_CHARSET
+ TitleFont.Color = clWindowText
+ TitleFont.Height = -11
+ TitleFont.Name = 'Tahoma'
+ TitleFont.Style = []
+ end
+ end
+ object RODataSnapConnection: TRODataSnapConnection
+ Message = ROBinMessage
+ Channel = HTTPChannel
+ ServerName = 'IAppServer'
+ Left = 8
+ Top = 128
+ end
+ object HTTPChannel: TROWinInetHTTPChannel
+ UserAgent = 'RemObjects SDK'
+ TargetURL = 'http://localhost:81/bin'
+ ServerLocators = <>
+ DispatchOptions = []
+ Left = 8
+ Top = 160
+ end
+ object ROBinMessage: TROBinMessage
+ UseCompression = False
+ Left = 8
+ Top = 224
+ end
+ object cdsCustomers: TClientDataSet
+ Aggregates = <>
+ Params = <>
+ ProviderName = 'Customers'
+ RemoteServer = RODataSnapConnection
+ AfterEdit = OnEnableApplyUpdates
+ AfterPost = OnEnableApplyUpdates
+ AfterCancel = OnEnableApplyUpdates
+ AfterDelete = OnEnableApplyUpdates
+ BeforeApplyUpdates = cdsCustomersBeforeApplyUpdates
+ BeforeGetRecords = cdsCustomersBeforeGetRecords
+ BeforeRowRequest = cdsCustomersBeforeRowRequest
+ BeforeGetParams = cdsCustomersBeforeGetParams
+ Left = 48
+ Top = 128
+ end
+ object dsCustomers: TDataSource
+ DataSet = cdsCustomers
+ Left = 48
+ Top = 160
+ end
+ object cdsProducts: TClientDataSet
+ Aggregates = <>
+ Params = <>
+ ProviderName = 'Products'
+ RemoteServer = RODataSnapConnection
+ AfterEdit = OnEnableApplyUpdates
+ AfterPost = OnEnableApplyUpdates
+ AfterCancel = OnEnableApplyUpdates
+ AfterDelete = OnEnableApplyUpdates
+ BeforeApplyUpdates = cdsCustomersBeforeApplyUpdates
+ BeforeGetRecords = cdsCustomersBeforeGetRecords
+ BeforeRowRequest = cdsCustomersBeforeRowRequest
+ BeforeGetParams = cdsCustomersBeforeGetParams
+ Left = 88
+ Top = 129
+ end
+ object dsProducts: TDataSource
+ DataSet = cdsProducts
+ Left = 88
+ Top = 160
+ end
+ object ROSOAPMessage: TROSOAPMessage
+ SerializationOptions = [xsoWriteMultiRefArray, xsoWriteMultiRefObject]
+ Left = 40
+ Top = 224
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapClientMain.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapClientMain.pas
new file mode 100644
index 0000000..0f648f7
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapClientMain.pas
@@ -0,0 +1,112 @@
+unit DataSnapClientMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, uROClient, uROBINMessage, uROSOAPMessage, DB,
+ DBClient, uROWinInetHttpChannel,
+ uRODataSnapConnection, StdCtrls, Buttons, Grids, DBGrids, ExtCtrls;
+
+type
+ TDataSnapClientMainForm = class(TForm)
+ RODataSnapConnection: TRODataSnapConnection;
+ HTTPChannel: TROWinInetHTTPChannel;
+ ROBinMessage: TROBinMessage;
+ cdsCustomers: TClientDataSet;
+ dsCustomers: TDataSource;
+ cdsProducts: TClientDataSet;
+ dsProducts: TDataSource;
+ ConnectButton: TBitBtn;
+ DisconnectButton: TBitBtn;
+ ROSOAPMessage: TROSOAPMessage;
+ ApplyUpdatesButton: TBitBtn;
+ Panel1: TPanel;
+ gProducts: TDBGrid;
+ gCustomers: TDBGrid;
+ Splitter1: TSplitter;
+ procedure ConnectButtonClick(Sender: TObject);
+ procedure DisconnectButtonClick(Sender: TObject);
+ procedure cdsCustomersBeforeApplyUpdates(Sender: TObject;
+ var OwnerData: OleVariant);
+ procedure ApplyUpdatesButtonClick(Sender: TObject);
+ procedure cdsCustomersBeforeGetParams(Sender: TObject;
+ var OwnerData: OleVariant);
+ procedure cdsCustomersBeforeGetRecords(Sender: TObject;
+ var OwnerData: OleVariant);
+ procedure cdsCustomersBeforeRowRequest(Sender: TObject;
+ var OwnerData: OleVariant);
+ procedure OnEnableApplyUpdates(DataSet: TDataSet);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ DataSnapClientMainForm: TDataSnapClientMainForm;
+
+implementation
+
+{$R *.dfm}
+
+procedure TDataSnapClientMainForm.ConnectButtonClick(Sender: TObject);
+begin
+ HTTPChannel.TargetURL := 'http://localhost:81/bin';
+ //HTTPChannel.TargetURL := 'http://localhost/isapi/DataSNapIsapiServer.dll/bin';
+
+ cdsCustomers.Active := true;
+ cdsProducts.Active := true;
+
+ DisconnectButton.Visible := true;
+ ConnectButton.Visible := false;
+end;
+
+procedure TDataSnapClientMainForm.DisconnectButtonClick(Sender: TObject);
+begin
+ cdsCustomers.Active := false;
+ cdsProducts.Active := false;
+
+ DisconnectButton.Visible := false;
+ ConnectButton.Visible := true;
+ ApplyUpdatesButton.Enabled := false;
+end;
+
+procedure TDataSnapClientMainForm.ApplyUpdatesButtonClick(Sender: TObject);
+begin
+ cdsProducts.ApplyUpdates(-1);
+ cdsCustomers.ApplyUpdates(-1);
+ ApplyUpdatesButton.Enabled := false;
+end;
+
+procedure TDataSnapClientMainForm.cdsCustomersBeforeApplyUpdates(Sender: TObject;
+ var OwnerData: OleVariant);
+begin
+ OwnerData := 'BeforeApplyUpdates';
+end;
+
+procedure TDataSnapClientMainForm.cdsCustomersBeforeGetParams(Sender: TObject;
+ var OwnerData: OleVariant);
+begin
+ OwnerData := 'BeforeGetParams';
+end;
+
+procedure TDataSnapClientMainForm.cdsCustomersBeforeGetRecords(Sender: TObject;
+ var OwnerData: OleVariant);
+begin
+ OwnerData := 'BeforeGetRecords';
+end;
+
+procedure TDataSnapClientMainForm.cdsCustomersBeforeRowRequest(Sender: TObject;
+ var OwnerData: OleVariant);
+begin
+ OwnerData := 'BeforeRowRequest';
+end;
+
+procedure TDataSnapClientMainForm.OnEnableApplyUpdates(DataSet: TDataSet);
+begin
+ ApplyUpdatesButton.Enabled := (cdsCustomers.ChangeCount > 0) or (cdsProducts.ChangeCount > 0);
+end;
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapISAPIServerMain.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapISAPIServerMain.dfm
new file mode 100644
index 0000000..462461a
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapISAPIServerMain.dfm
@@ -0,0 +1,35 @@
+object DataSnapISAPIServerMainForm: TDataSnapISAPIServerMainForm
+ OldCreateOrder = False
+ Actions = <>
+ Left = 78
+ Top = 52
+ Height = 127
+ Width = 301
+ object msg_BIN: TROBinMessage
+ Left = 108
+ Top = 16
+ end
+ object mgs_SOAP: TROSOAPMessage
+ SerializationOptions = [xsoWriteMultiRefArray, xsoWriteMultiRefObject]
+ Left = 146
+ Top = 18
+ end
+ object ROWebBrokerServer: TROWebBrokerServer
+ Active = True
+ Dispatchers = <
+ item
+ Name = 'msg_BIN'
+ Message = msg_BIN
+ Enabled = True
+ PathInfo = 'BIN'
+ end
+ item
+ Name = 'mgs_SOAP'
+ Message = mgs_SOAP
+ Enabled = True
+ PathInfo = 'SOAP'
+ end>
+ Left = 64
+ Top = 16
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapISAPIServerMain.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapISAPIServerMain.pas
new file mode 100644
index 0000000..8f8f9d1
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapISAPIServerMain.pas
@@ -0,0 +1,27 @@
+unit DataSnapISAPIServerMain;
+
+interface
+
+uses
+ SysUtils, Classes, HTTPApp, uROServer,
+ uROWebBrokerServer, uROSOAPMessage, uROClient, uROBINMessage;
+
+type
+ TDataSnapISAPIServerMainForm = class(TWebModule)
+ msg_BIN: TROBINMessage;
+ mgs_SOAP: TROSOAPMessage;
+ ROWebBrokerServer: TROWebBrokerServer;
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ DataSnapISAPIServerMainForm: TDataSnapISAPIServerMainForm;
+
+implementation
+
+{$R *.dfm}
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapIsapiServer.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapIsapiServer.bdsproj
new file mode 100644
index 0000000..4c1df4a
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapIsapiServer.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {07A17005-E71D-433F-9263-A878C6333602}
+
+
+
+
+ DataSnapIsapiServer.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapIsapiServer.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapIsapiServer.dpr
new file mode 100644
index 0000000..fefeae4
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapIsapiServer.dpr
@@ -0,0 +1,24 @@
+library DataSnapIsapiServer;
+
+uses
+ ActiveX,
+ ComObj,
+ WebBroker,
+ ISAPIThreadPool,
+ ISAPIApp,
+ DataSnapISAPIServerMain in 'DataSnapISAPIServerMain.pas' {DataSnapISAPIServerMainForm: TWebModule},
+ DataSnapServerData in 'DataSnapServerData.pas' {DataSnapServerDataForm: TRODataSnapModule};
+
+{$R *.res}
+
+exports
+ GetExtensionVersion,
+ HttpExtensionProc,
+ TerminateExtension;
+
+begin
+ CoInitFlags := COINIT_MULTITHREADED;
+ Application.Initialize;
+ Application.CreateForm(TDataSnapISAPIServerMainForm, DataSnapISAPIServerMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapIsapiServer.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapIsapiServer.dproj
new file mode 100644
index 0000000..087a530
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapIsapiServer.dproj
@@ -0,0 +1,75 @@
+
+
+ {9e41110c-2697-4451-b2a0-5aa579edf466}
+ DataSnapIsapiServer.dpr
+ Debug
+ AnyCPU
+ DCC32
+ DataSnapIsapiServer.dll
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ DataSnapIsapiServer.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapIsapiServer.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapIsapiServer.res
new file mode 100644
index 0000000..3adc036
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapIsapiServer.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapServer.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapServer.bdsproj
new file mode 100644
index 0000000..ad14240
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapServer.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {91C3749F-F2C6-4D21-B2AA-576FEE02D3ED}
+
+
+
+
+ DataSnapServer.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapServer.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapServer.dpr
new file mode 100644
index 0000000..e6c1d07
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapServer.dpr
@@ -0,0 +1,17 @@
+program DataSnapServer;
+
+uses
+ uROComInit,
+ MidasLib,
+ Forms,
+ DataSnapServerMain in 'DataSnapServerMain.pas' {DataSnapServerMainForm},
+ DataSnapServerData in 'DataSnapServerData.pas' {DataSnapServerDataForm: TRODataSnapModule};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'DataSnap Server';
+ Application.CreateForm(TDataSnapServerMainForm, DataSnapServerMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapServer.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapServer.dproj
new file mode 100644
index 0000000..2236cf3
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapServer.dproj
@@ -0,0 +1,75 @@
+
+
+ {d001ebc3-1f7d-4e8f-8d6a-6791d661a387}
+ DataSnapServer.dpr
+ Debug
+ AnyCPU
+ DCC32
+ DataSnapServer.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ DataSnapServer.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapServer.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapServer.res
new file mode 100644
index 0000000..aa9db5a
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapServer.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapServerData.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapServerData.dfm
new file mode 100644
index 0000000..92de9fc
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapServerData.dfm
@@ -0,0 +1,98 @@
+object DataSnapServerDataForm: TDataSnapServerDataForm
+ OldCreateOrder = True
+ Providers = <
+ item
+ Provider = prv_products
+ Name = 'Products'
+ end
+ item
+ Provider = prv_customers
+ Name = 'Customers'
+ end>
+ UseProviders = True
+ Height = 99
+ Width = 214
+ object con_SqlServer: TADOConnection
+ Connected = True
+ ConnectionString =
+ 'Provider=SQLOLEDB.1;Password="";Persist Security Info=True;User ' +
+ 'ID=sa;Initial Catalog=Northwind;Data Source=localhost'
+ LoginPrompt = False
+ Provider = 'SQLOLEDB.1'
+ Left = 24
+ Top = 8
+ end
+ object qry_customers: TADOQuery
+ Connection = con_SqlServer
+ CursorType = ctStatic
+ Parameters = <>
+ SQL.Strings = (
+ 'SELECT * FROM CUSTOMERS')
+ Left = 57
+ Top = 8
+ object qry_customersCustomerID: TWideStringField
+ FieldName = 'CustomerID'
+ FixedChar = True
+ Size = 5
+ end
+ object qry_customersCompanyName: TWideStringField
+ FieldName = 'CompanyName'
+ Size = 40
+ end
+ object qry_customersContactName: TWideStringField
+ FieldName = 'ContactName'
+ Size = 30
+ end
+ object qry_customersContactTitle: TWideStringField
+ FieldName = 'ContactTitle'
+ Size = 30
+ end
+ object qry_customersAddress: TWideStringField
+ FieldName = 'Address'
+ Size = 60
+ end
+ object qry_customersCity: TWideStringField
+ FieldName = 'City'
+ Size = 15
+ end
+ object qry_customersRegion: TWideStringField
+ FieldName = 'Region'
+ Size = 15
+ end
+ object qry_customersPostalCode: TWideStringField
+ FieldName = 'PostalCode'
+ Size = 10
+ end
+ object qry_customersCountry: TWideStringField
+ FieldName = 'Country'
+ Size = 15
+ end
+ object qry_customersPhone: TWideStringField
+ FieldName = 'Phone'
+ Size = 24
+ end
+ object qry_customersFax: TWideStringField
+ FieldName = 'Fax'
+ Size = 24
+ end
+ end
+ object prv_customers: TDataSetProvider
+ DataSet = qry_customers
+ Left = 57
+ Top = 38
+ end
+ object qry_Products: TADOQuery
+ Connection = con_SqlServer
+ CursorType = ctStatic
+ Parameters = <>
+ SQL.Strings = (
+ 'SELECT * FROM PRODUCTS')
+ Left = 88
+ Top = 8
+ end
+ object prv_products: TDataSetProvider
+ DataSet = qry_Products
+ Left = 88
+ Top = 38
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapServerData.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapServerData.pas
new file mode 100644
index 0000000..729c6aa
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapServerData.pas
@@ -0,0 +1,50 @@
+unit DataSnapServerData;
+
+interface
+
+uses {vcl:} SysUtils, Classes, DB, DBClient,
+ {RemObjects:} uRODataSnapModule, Provider, ADODB;
+
+type
+ TDataSnapServerDataForm = class(TRODataSnapModule)
+ con_SqlServer: TADOConnection;
+ qry_customers: TADOQuery;
+ prv_customers: TDataSetProvider;
+ qry_Products: TADOQuery;
+ prv_products: TDataSetProvider;
+ qry_customersCustomerID: TWideStringField;
+ qry_customersCompanyName: TWideStringField;
+ qry_customersContactName: TWideStringField;
+ qry_customersContactTitle: TWideStringField;
+ qry_customersAddress: TWideStringField;
+ qry_customersCity: TWideStringField;
+ qry_customersRegion: TWideStringField;
+ qry_customersPostalCode: TWideStringField;
+ qry_customersCountry: TWideStringField;
+ qry_customersPhone: TWideStringField;
+ qry_customersFax: TWideStringField;
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ DataSnapServerDataForm: TDataSnapServerDataForm;
+
+implementation
+
+uses {RemObjects:} uROServer, uRODataSnap_Invk, uROClassFactories;
+
+{$R *.DFM}
+
+procedure Create_DataSnapModule(out oInstance:IUnknown);
+begin
+ oInstance := TDataSnapServerDataForm.Create(nil);
+end;
+
+initialization
+ TROClassFactory.Create('IAppServer', Create_DataSnapModule, TAppServer_Invoker);
+ //TROPooledClassFactory.Create('IAppServer', Create_DataSnapModule, TIAppServer_Invoker, 10, pbCreateAdditional);
+ //TROPerClientClassFactory.Create('IAppServer', Create_DataSnapModule, TIAppServer_Invoker, 10, pbCreateAdditional);
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapServerMain.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapServerMain.dfm
new file mode 100644
index 0000000..b885727
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapServerMain.dfm
@@ -0,0 +1,756 @@
+object DataSnapServerMainForm: TDataSnapServerMainForm
+ Left = 160
+ Top = 125
+ Caption = 'DataSnap Server'
+ ClientHeight = 72
+ ClientWidth = 230
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ Icon.Data = {
+ 0000010006003030000001000800A80E0000660000002020000001000800A808
+ 00000E0F0000101000000100080068050000B61700003030000001002000A825
+ 00001E1D00002020000001002000A8100000C642000010100000010020006804
+ 00006E5300002800000030000000600000000100080000000000000900000000
+ 00000000000000010000000100000000000006060600090909000D0D0D001111
+ 11001515150010101900191919001E1E1E001B1C26000C0C310013163F001D21
+ 3F00232323002B2B2B0025273200282A360021243A002F313D00333333003939
+ 39003D3D3D003A403A003475340009094C00161A4300090956000A0C5B000D11
+ 5800181E5400151B5B001F234C0022224400282847002D2C4B00393C49002B2C
+ 520034375100353B54000E1466001016630010196F0019246F001A2673001927
+ 79001B2B7E0023306D002C386A00323C610022337E00333F7000364064003841
+ 65003C4568003A467400414141004545450040434E00494949004D4D4D00474A
+ 56004D4A520041475E004C4E58005353530051535E005B5B5B0066595E004F68
+ 4F005C655C00454B610040496B005B5C640052586B0045517B00525A7B005E61
+ 6A005D62740057607B005D657F006161610066616600656565006A6365006365
+ 6C00696969006C6B6B0069686C006D6A6D006D6D6D0072676D00736B6E00796B
+ 6F00607960006F6D70006E6E7800706F7700737273007A76770074747A007F77
+ 7A0076787E007C7B7C00817C7D00318331005E8B5E005AA55B000C0C83000709
+ 8C0009128500111F80000304930000029D000E1C9000172886001A308900172C
+ 920020348C002C3F8800213B9D000004A300020AA5000007A9000009AD000412
+ A600000BB2000519B300081DB1000011BB00061EB8001431AD001A37A9001737
+ B5001132BD00223EAB002E4189002D4395002E4AAF00354EA5003E56A8002645
+ B9003251BC004D59800047568800535F84005E6781005D688A00747580007778
+ 8100797A8000445CAA00405DBF004860AC00566AA7004E68B900536DBA00031B
+ C100021DC800001ED7000926C1000B31C5000E33CB00183BC200173DCF000021
+ DD00062CD800032BE200022EEC00103DE700002DF400002FF8000231F5000B3A
+ F3000234FD000739FF000B3DFF00103FF3001740DB002042C400284AC600254A
+ D100254DDD003054D3001642E7001645F3001344FF001A4BFF001F50FF002E58
+ E9002354FF002C5CFF003D69F4003362FF003867FF003C6BFF004260C0004D6D
+ CD00446AE0004C72E1004B73EB00436FF5004974F5004271FF00837E80008180
+ 810087838400858585008A8386008D8488008B8A8B00918C8F00938F9100988C
+ 9100939292009B959600969598009B9598009C9A9B00A19B9D00A59FA100A3A2
+ A200AAA3A600AFA6AA00ABAAAA00B0ABAC00A4A6B900B6ADB100B8AFB200B5B2
+ B300BBB5B700BCB6B900BCB8B900C0B7BB00C0BBBD00B4B6C700C5BFC100C3C1
+ C200CAC4C600CBC5C900CCC9CA00D1CCCF00D2CED000D6D4D400D8D4D500DAD6
+ D800DDDADC00E0DDDD00E3E2E200E9E6E600EAE7E900EDEAEC00F2EFF000F4F3
+ F300F8F6F700F8F7F800FDFCFC00000000000000000000000000000000000000
+ 00593B0404040404003B50000000000000000000000000000000000000000000
+ 00000000000000000000000000CC1407070407040404040400040004000D5900
+ D1D10000000000000000000000000000000000000000000000000059070D0707
+ 0707070404040404040004000404041414143B5061CCD9000000000000000000
+ 000000000000000000CC0E0D0D0D0D0D0707070707040404040404040407405A
+ 5D6A171437143B5061CC0000000000000000000000000000140E0D0E0D0D0D07
+ 0D090B1C1B1B1B1A180A03040953645B4569684459595014143740D100000000
+ 000000000000000E0E0E0E0D0E0D0D0D0709277B7B7878706F6F6B20615B6461
+ 4350515050505059595014660000000000000000006613130E130E0E0D0D0D0D
+ 0D0D197D7B7B78706F6B21D2E3DACD6150525159505950505059146200000000
+ 00000000CC131313130E0E0E0E0E0D0D0D0D1E7D7D7B7A786C22DBE8E3DDCD64
+ 505055505550595059503761000000000000000014141313130E130E0E0E0E0E
+ 0D0D29807D7D7B7924D9EDE6E6E0D2CC43525055505052505050376100000000
+ 000000141414141313130E130E0E0E0D0D0D1D80807D7D7948DBEDEBEBE3D3CD
+ 5050555059505950595037610000000000003B14141414141313130E130E0E0E
+ 0E0D0D1E807C6D2852F4EEEEEEE6D6D050505250555050555050376100000000
+ 00D1373737141414141313130E130E0E0E0E0D0E0D0D090859F5F1F1F1E9D9D1
+ 50505550555550555055146100000000003737373714141414141313130E130E
+ 0E0E0E0D0D0D080D59F7F3F3F3EDDAD350505055505550555055375900000000
+ 613A3737373737141414141313130E130E0E0E0D0E0D0D0D59FAF5F5F5EFDCD3
+ 505055505550555055501437000000003B373B3737373714141414141313130E
+ 130E0E0E0D0D0D0C60FBF7F7F7F1DFD350505550555055505550370D000000D9
+ 3B3A373A373737373384A185311313130E130E0E0E0E117E63FDFAF8F8F1DFD9
+ 50505055505550555055140D500000503B3B3B373B373787AEADADADAA821313
+ 130E130E0E0E0F9C63FFFAFAFAF5E0D950505550555055505550370D0E00003B
+ 3B3B3B3A373A39B0AFAFADADADAA311313130E130E0E0E7E63FFFCFCFBF5E4D9
+ 45595052505550555050370D040000403B3B3B3B3B3736B9AFAFAEADADAD8514
+ 1313130E130E0E2A95FFFDFCFCF7E4DC5050615E555555505550140E0400D140
+ 403B3B3B3B3B36B9B9AFAFAEADADA114141313130E130E0E66FFFFFFFDF7E4DC
+ 424850505550595E5555370D0450614040403B3B3B3A47B9B9B9AFAFAEAD8314
+ 14141313130E130E66FFFFFFFEF7E7DC50595950505050505050370E07375040
+ 4040403B3B3B3BB4B9B9B9AFAFAC26141414141313130E1366FFFFFFFFF7E4E0
+ 5050505E5E5255525550370E04044050404040403B3B3B3CB4B9B9B9AC323714
+ 141414141313131366FFFFFFFFF7E7DF42505050525250596145370E07045040
+ 40504040403B3B3B3B473636373737373714141414132E7495FFFFFFFCF7DF65
+ CE524550455050505052370E040450504040404040403B3B3B3B373B37373737
+ 371414141414A5A694FFFCFCFCFA5561F7F6ECD9CC5950505050370E07045040
+ 504050404040403B3B3B3B3B3A3A3737373737141475A9A665FFFCFCF7CCCCE9
+ DCD9E6EFF2F7ECDCCE5537080704505050504050404040403B3B3B3A3A3A3A37
+ 37373714142FADA663FFFAD3CCF4F5F1F1E9DDD8CD64D9E9F2EC0E0704046650
+ 5040504040504040403B3B3B3A3A3A373A373737141485AB63FED1CCFAFAF8F5
+ F1ECE3DED8D05C43140D0907073BD345505040504040404040403B3B3B3A3B3A
+ 37373737373726AB93E1D9FEFFFCFAF7F3EEE9DEDAD4530E0D07080707500050
+ 50505050504050404040403B3B3B3A3A3A473937371433AD4BEAFCFFFFFFFDF8
+ F4EFE9E2DA3D1F0D0D0D0707070000505050505040504050404040403B3B3B46
+ B3B9B8883734ACADA0733950CCE9F1F7F6F3EDD62571710D0D070D0707000066
+ 505050505050404B968E423F403B3B8ABBBBB9B9B7B0AFAF7723141413131313
+ 3F60422B819C6E0D0D0D0808140000DF5950505050504BBFC1C0974040403B8D
+ BBBBBBB9B9B9AFA31415141414141313139FA4A49E9D0F0E0D0D0D08CC000000
+ 595059505048C8C2C2C0C049404040B6BBBBBBB9B9B9B9B93715371414141313
+ 13122D722C100E0E0D0D0D0D00000000D15950505099CACAC2C2C2C340418FBC
+ BBBBBBBBBBB9B9B9B1837726141414141313130E0E0E0E0E0E0D0D5500000000
+ 005959595057C6CACAC2C2C2C0C0BEBEBEBBBBBBBBB9B9B9B9B9B9A237141414
+ 14131313130E0E0E0E0E0D000000000000DC5059555091C9CACAC2C2C2C0C0C0
+ BEBEBDBBBBBBBBB9B9B9AEA8371414141414131313130E0E0E0E610000000000
+ 0000615955555091C9CACAC2C2C2C0C0BEBEBEBDBBBBBBB9B9B9B98737373714
+ 1414141313130E0E0E14000000000000000000595555595292C9CACAC2C2C0C0
+ C0C0BEBEBDBBBBBBBBB9B03737372326141414141313140E1300000000000000
+ 00000000595552555291C7CACAC2C2C2C0C0BEBEBEBDBBBBBBBBB98C3987ACAF
+ 7714141414131313000000000000000000000000DC5959525550559BCACAC2C2
+ C2C0C0C0BEBEBDBBBBBBB9BBB0B9B9AE77371414141413CC0000000000000000
+ 0000000000DC59595255525091C4CAC2C2C0C0C0BEBEBEBDBBBBBBB9BBB9B234
+ 373714141414CC00000000000000000000000000000000595952555250504D9A
+ C5C2C2C0C0C0BEBEBBBBBBB589263B3737373737140000000000000000000000
+ 00000000000000006159525552505050504890989696968B964A3F3B3B3B3A37
+ 3737373B000000000000000000000000000000000000000000DC595259505050
+ 505050504050404040403B3B3B3A3A3B373AD100000000000000000000000000
+ 0000000000000000000000D15955505050455040504040424040403B3B3B3A3A
+ 6100000000000000000000000000000000000000000000000000000000DF6155
+ 5050505050504050404040403B50D90000000000000000000000000000000000
+ 0000000000000000000000000000000000D39543425040405061D10000000000
+ 0000000000000000000000000000FFFFE007FFFF0000FFFE00004FFF0000FFF8
+ 0000007F0000FFE00000000F0000FFC0000000030000FF80000000030000FE00
+ 000000030000FC00000000030000FC00000000030000F800000000030000F000
+ 000000030000E000000000030000E000000000030000C000000000030000C000
+ 0000000300008000000000010000800000000001000080000000000100008000
+ 0000000100000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000080000000000100008000
+ 00000001000080000000000100008000000000010000C000000000030000C000
+ 000000030000E000000000070000E000000000070000F0000000000F0000F800
+ 0000001F0000FC000000003F0000FC000000003F0000FE000000007F0000FF80
+ 000001FF0000FFC0000003FF0000FFE0000007FF0000FFF800001FFF0000FFFE
+ 00007FFF0000FFFFE007FFFF0000280000002000000040000000010008000000
+ 00000004000000000000000000000001000000010000000000000A0A0A000D0D
+ 0D001111110014131400161616001A1919001E1E1E0021212100252525002A2A
+ 2A002D2D2D003131310035353500393939003D3D3D003F453F00171B45001015
+ 5D00151B5C001A195F001D21410031374F00393C48003C3F4B002B3359003339
+ 52001C1D6B0029356800323B6100343E6300283776003E445B003A4675003D49
+ 7700414141004545450048494A004A4C4D004E4E4E00424551004D4F5000484B
+ 57004E5051005151520055555600595959005B5C5D005D5D5D00434C6D005B5E
+ 67004C4C7E00606060006364640066666600696969006B6B6C006D6D6D006F6E
+ 72006167780063637D0070707000757575007A7375007B7B7B007E7E7E000A9C
+ 12003B8B410000009A0000029F000005A5000308A4000009AB00000CB100000F
+ B8000213B4001131BB00374A8D002A4094002D439500344A99002D46A3003C42
+ A6003851A7003C54A8002443B8002F4DBC00485A950055669C0060688200566A
+ A7001538C200183BC300062FDE00123EE7000332F0000A3AF2000E3DF2000032
+ FC000336FE00073AFF000C3EFF00224ADD00385FDF003C62DF001442F3001847
+ F3001042FE001547FF001A4BFF001E4FFF00204AE8002853E9003559E3002354
+ FF002758FF002C5CFF003A63EA003E67EA003C68F4003161FF003565FF003A69
+ FF003F6EFF004A67C200496EE1004C72E1004570F5004974F5004372FF007F80
+ 8100868686008A8A8A008C8C8C00929292009395960099919700979598009C9A
+ 9C009E9D9E00A0989E00A39AA100A6A6A600AAA3A900ADA7AD00A9AAAA00B0AA
+ B000B0B0B200B8B2BA00BDB7BD00BFBBBF00BDBDBF00C0BAC000C2BCC200C4BD
+ C200C4BCC400C6C0C600CAC5CA00CBC7CC00CECACE00CFCFCF00CECDD000D1CD
+ D100D0D1D100D3D3D400D4D0D400D8D5D900DDD9DD00DDDCE000E3E0E200E2E1
+ E500E5E3E700E7E6E700E7E6EA00E9E7EA00E9E9EA00EAEAED00EDEBED00EDED
+ EE00EEEDF000F0F0F200F2F2F400F6F5F600F8F8FA00FBFBFC00FEFEFE000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00002C0903030202092C0000251025250000000000000000000000000000002E
+ 0707070303030302020203258D25404025252500000000000000000000380909
+ 0907070707030303020625368F2540404040402525250000000000000F0A0A09
+ 0907071246464644142595259225404040404040862500000000000D0A0D0A0A
+ 090909114948461B2595952595254042423333408625000000000F0D0D0A0A0A
+ 0A09091349495225959595259625404043403C408625000000240F0D0D0D0D0A
+ 0A0A09154B4A2595959595259C25404040404040862500003D0F0F0F0D0D0D0D
+ 0A0A0A0915132595959595259F254040404040408625000024240F0F0F0D0D0D
+ 0D0A0A0A0909259895959525A5254040404040408625003D2524240F0F0F0D0D
+ 0D0D0A0A0A09259898959525A625404040404040862500252524240F1D5B5F4C
+ 190D0A0D0A0A259C98989625A825404040404040862500272525242861646363
+ 5D0D0D0A0D0A259F9C989825AB254040404040408625402C272525216B656463
+ 631C0D0D0A0D259F9D9C9825AD254040404040408625362C2C2725226B6B6564
+ 63160E0D0D0A25A59F9D9D25B02583838386404086252C2E2C2C2725666D6B65
+ 5B0F0F0D0D0D25A6A59F9D25B0254040403883838E252E2E2E2C2C272A50514F
+ 240F0F0F0D0D25A7A6AE9F25B42585858640404085252E2E2E2E2C2C27252524
+ 24230F0F0F1625ABB08AA525B0252D36388585858E25362E2E2E2E2C2C272525
+ 2424230F0F1F25AB868AA625A3A383362B2A2E38862538362E2E2E2E2C2C2725
+ 252424240F0F25B086ABB9932C2C4091A597832E2525853634342E2E2E2C2C27
+ 27252820240F25B4B0B9B0ABA797893A2E2B3787A5250036362E342E2E2E2C2C
+ 27316F6B554F25B4B9B3B4B0ABA69F959088883F2500003636362E327779572C
+ 2C536E6D6B6B25B9B0B9B9B4B0A8A197928C2525080000853636367D7B7A762D
+ 2D536E6E6D6C712525ADB9B4B3A8A598252509092E0000003836367E817B7A68
+ 6874746E6E6D6C6B61252525252525250A0A0A09000000008538363C80817A7A
+ 797974746E6E6D6C6B5E230F0F0D0D0D0D0A0A3400000000003D383759808181
+ 7A797974746E6E6D6C4F2417170F0D0D0D0D0F000000000000003836363B7E81
+ 7A7A797974746E6E6D6A4F61611D0F0D0D0C000000000000000000383836365A
+ 7F7B7A797974746E6E6D6C694E0F0F0F0D00000000000000000000003D383636
+ 36587C767979747470564D2424240F2400000000000000000000000000863836
+ 3634342E2E2E2C2C2C2725252424380000000000000000000000000000000085
+ 363636342E2E2E2E2C2C27253F00000000000000000000000000000000000000
+ 00008538362E2E2E3640000000000000000000000000FFF00C3FFF800007FE00
+ 0000FC000000F8000000F0000000E0000000C0000000C0000000800000008000
+ 0000800000000000000000000000000000000000000000000000000000000000
+ 000000000000800000018000000180000001C0000003C0000003E0000007F000
+ 000FF800001FFC00003FFE00007FFF8001FFFFF00FFF28000000100000002000
+ 0000010008000000000000010000000000000000000000010000000100000000
+ 00000D0D0D001212120018181800191A2A000F0F34001D1F3400212121002626
+ 260024252B002A2A2A002A2A2C0030303000343434003939390039393D003E3E
+ 3E00080955000A0E5D00282E4A003E3E4000353948003B3E4A0028325F00363D
+ 5A000E187B0016206B002B2E6900343C76004343430043434400424348004445
+ 4E00484848004D4D4D004548560044485B005252520054505100575757005053
+ 5F005A535B00585858005C5C5C004E614E00474E66005C5D60005F636E006262
+ 62006565650066676A00696869006D6C6D006573640071717100757575007978
+ 78007C7C7C00060B97002B3C8200273C9000000BB1001935A5003E4F8B002E48
+ A9003047A4003A47A4003E56A9003D57B200495D9F005161950057689C007173
+ 87007F7A9100455DAB00536BB400183BC100133AD1000732E1000739FE001E42
+ C9001B42D5001A42D9002945C4001742E5001B4AF7001041FF00194AFF002253
+ FF002B5BFF003564FF003F6CF9003E6DFF004260C1004E6FD000858585008E8E
+ 8E009191910095949500A49D9F00AFA7AA00ACA9AA00B5B0B200B6B4B500BBB8
+ B900C4C1C300C4C4C800CBC6C800D2CFD000D7D3D400DAD9DA00E2DFE000ECEA
+ EB00F3F1F100FBFAFB00FDFCFC00000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000340D0201083460000000000000003708080412110526352C272E000000
+ 27080808063D3A49633430302E0000390F0F0D080B191B6B663430332700001D
+ 0F0F0D0D08080F6F693730302A005F211D4C4E170D081C716C37303327343025
+ 23564F3E0D0D20726E3834302E0D2E26214050180F0D24726E38303027032E27
+ 2721211D0F155370676865623702372A2A272121200F416A716D6429080D6130
+ 2E45282D55504D162E48421A07340030475C5D445857543C0F0D130808000062
+ 345E5C5A595857520F0F0D0D3700000039324B5C5A595855513B0F2700000000
+ 00623032464A433F231D39000000000000000060372E27305F0000000000F80F
+ 0000E0010000C001000080010000800100000000000000000000000000000000
+ 000000000000000000008001000080010000C0030000E0070000F81F00002800
+ 0000300000006000000001002000000000008025000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000001919192F1717176F1616169F141414BF121212FF1010
+ 10FF0F0F0FFF0D0D0DFF0B0B0BFF0A0A0AFF080808BF0707079F0505056F0505
+ 0530343434053434340F343434203434342E343434353434342C3434341F3434
+ 34143434340D3434340834343405343434023434340100000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000002020
+ 201F1E1E1E8F1C1C1CDF1A1A1AFF191919FF171717FF151515FF141414FF1212
+ 12FF101010FF0F0F0FFF0D0D0DFF0B0B0BFF0A0A0AFF080808FF060606FF0606
+ 06FF070707E1101010A22B2B2B6F34343491343434923434347F343434643434
+ 344A3434343A3434342D34343420343434143434340C34343408343434043434
+ 3402000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000002424242F232323AF2121
+ 21FF1F1F1FFF1E1E1EFF1C1C1CFF1A1A1AFF191919FF171717FF151515FF1414
+ 14FF121212FF101010FF0F0F0FFF0D0D0DFF0B0B0BFF0A0A0AFF090909FF0909
+ 09FF0E0E0EFF1A1A1AFF363335FF353635FA303030EE2F2E2FDC303030C43434
+ 34AE3434349734343480343434643434344B3434343A34343428343434183434
+ 340B343434030000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000002A2A2A0F2828288F262626FF242424FF2323
+ 23FF212121FF1F1F1FFF1E1E1EFF1C1C1CFF1A1A1AFF191919FF171717FF1515
+ 15FF141414FF121212FF101010FF0F0F0FFF0D0D0DFF0C0C0CFF0D0D0DFF1111
+ 11FF1D1D1DFF555052FF72676DFF607960FF5AA55BFF347534FF393F39FD3938
+ 39F8313131EF2F2F2FDD303030C42F2F2FAE3434349734343477343434473434
+ 341E343434060000000000000000000000000000000000000000000000000000
+ 000000000000000000002D2D2D3F2B2B2BEF292929FF282828FF262626FF2424
+ 24FF232323FF212121FF1F1F1FFF1E1E1EFF1A1B25FF13163FFF0D1158FF0B0E
+ 5EFF0A0C5BFF090A58FF090956FF09094CFF0C0C31FF101019FF141414FF2121
+ 21FF686264FF81797BFF746B6FFF5C655CFF5E8B5EFF318331FF4F684FFF6D6A
+ 6DFF666666FF5B5B5BFE3F3F3FFD383838F8313131EE2E2E2ED03434348D3434
+ 34313434340A0000000000000000000000000000000000000000000000000000
+ 0000000000003030306F2E2E2EFF2D2D2DFF2B2B2BFF292929FF282828FF2626
+ 26FF242424FF232323FF212121FF1F1F1FFF1C1D27FF0E1466FF0009ADFF0007
+ A9FF0005A5FF0003A1FF00019BFF010197FF050590FF0C0C83FF222244FF7770
+ 74FF726B6DFF837D80FF777073FF5D5C5DFF676067FF666266FF646564FF6565
+ 65FF666666FF666666FF696969FF6A6A6AFF646464FF3A3A3AFC343434A93434
+ 34413434340D0000000000000000000000000000000000000000000000000000
+ 00003333339F323232FF303030FF2E2E2EFF2D2D2DFF2B2B2BFF292929FF2828
+ 28FF262626FF242424FF232323FF212121FF1F1F1FFF161A43FF000BB1FF0009
+ ADFF0007A9FF0005A5FF01049FFF050693FF0C0C83FF282847FF928B8FFFB8AF
+ B2FFA0999CFF847F81FF7A7677FF5D5D5DFF656565FF666566FF666566FF6565
+ 65FF656565FF656565FF656565FF666666FF646464FF3E3E3EFD343434AE3434
+ 34463434340F0000000000000000000000000000000000000000000000003737
+ 379F353535FF333333FF323232FF303030FF2E2E2EFF2D2D2DFF2B2B2BFF2929
+ 29FF282828FF262626FF242424FF232323FF212121FF141959FF000DB5FF000B
+ B1FF0009ADFF0007A9FF0206A1FF07098CFF2D2C4BFFA69FA3FFC0B7BBFFB7B0
+ B2FFAAA3A6FF8A8487FF7F7A7DFF5D5D5DFF656565FF656565FF656565FF6565
+ 65FF656565FF656565FF656565FF656565FF646464FF3D3D3DFD343434AE3434
+ 34463434340F00000000000000000000000000000000000000003A3A3A6F3838
+ 38FF373737FF353535FF333333FF323232FF303030FF2E2E2EFF2D2D2DFF2B2B
+ 2BFF292929FF282828FF262626FF242424FF232323FF10196FFF0010B9FF000D
+ B5FF000BB1FF0009ADFF0209A4FF2B2C52FF9F999CFFC9C2C5FFBDB6BAFFBDB7
+ BAFFB1AAACFF8F8A8BFF837F81FF5D5D5DFF656565FF656565FF656565FF6565
+ 65FF656565FF656565FF656565FF656565FF646464FF3D3D3DFD343434AE3434
+ 34463434340F000000000000000000000000000000003D3D3D3F3B3B3BFF3A3A
+ 3AFF383838FF373737FF353535FF333333FF323232FF303030FF2E2E2EFF2D2D
+ 2DFF2B2B2BFF292929FF282828FF262626FF242424FF181E54FF0012BEFF0010
+ B9FF000DB5FF000BB1FF030BA6FF5C5A62FFA5A0A1FFCBC4C6FFC5BFC1FFC5BF
+ C1FFB6B0B2FF938F91FF878384FF5C5D5DFF656565FF656565FF656565FF6565
+ 65FF656565FF656565FF656565FF656565FF646464FF3D3D3DFD343434AE3434
+ 34463434340F0000000000000000000000004141410F3F3F3FEF3D3D3DFF3B3B
+ 3BFF3A3A3AFF383838FF373737FF353535FF333333FF323232FF303030FF2E2E
+ 2EFF2D2D2DFF2B2B2BFF292929FF282828FF262626FF242424FF161D5EFF0012
+ BEFF0412A6FF091285FF101663FF66656CFFD9D4D5FFCBC5C9FFCBC5C9FFCBC5
+ C9FFBCB6B8FF989596FF8B8789FF5C5C5CFF656565FF656565FF656565FF6565
+ 65FF656565FF656565FF656565FF656565FF646464FF3D3D3DFD343434AE3434
+ 34463434340F0000000000000000000000004242429F404040FF3F3F3FFF3D3D
+ 3DFF3B3B3BFF3A3A3AFF383838FF373737FF353535FF333333FF323232FF3030
+ 30FF2E2E2EFF2D2D2DFF2B2B2BFF292929FF282828FF262626FF242424FF2323
+ 23FF212121FF1F1F1FFF1F1F1FFF69686CFFE0DCDDFFD1CECFFFD1CCCFFFD1CC
+ CFFFC2BDBFFF9D999AFF8F8B8EFF5C5C5CFF656565FF656565FF656565FF6565
+ 65FF656565FF656565FF656565FF656565FF646464FF3D3D3DFE343434AE3434
+ 34463434340F00000000000000004545452F444444FF424242FF404040FF3F3F
+ 3FFF3D3D3DFF3B3B3BFF3A3A3AFF383838FF373737FF353535FF333333FF3232
+ 32FF303030FF2E2E2EFF2D2D2DFF2B2B2BFF292929FF282828FF262626FF2424
+ 24FF232323FF212121FF202020FF6C6B6BFFE6E1E3FFD8D4D5FFD8D4D5FFD8D4
+ D5FFC7C4C5FFA19E9FFF939091FF5C5C5CFF656565FF656565FF656565FF6565
+ 65FF656565FF656565FF656565FF656565FF646464FF3D3D3DFF313131B83434
+ 34463434340F0000000000000000474747BF454545FF444444FF424242FF4040
+ 40FF3F3F3FFF3D3D3DFF3B3B3BFF3A3A3AFF383838FF373737FF353535FF3333
+ 33FF323232FF303030FF2E2E2EFF2D2D2DFF2B2B2BFF292929FF282828FF2626
+ 26FF242424FF232323FF222222FF6F6D70FFEDE9EBFFDEDADDFFDEDADCFFDEDA
+ DCFFCCCACAFFA5A1A3FF969393FF5C5C5CFF656565FF656565FF656565FF6565
+ 65FF656565FF656565FF656565FF656565FF646464FF3D3D3DFF282828E13434
+ 34463434340F000000004A4A4A1F494949FF474747FF454545FF444444FF4242
+ 42FF404040FF3F3F3FFF3D3D3DFF3B3B3BFF3A3A3AFF383838FF373737FF3535
+ 35FF333333FF323232FF303030FF2E2E2EFF2D2D2DFF2B2B2BFF292929FF2828
+ 28FF262626FF242424FF1D213FFF706F77FFF3F0F0FFE5E1E2FFE3E1E2FFE3E1
+ E2FFD1CFD0FFA9A6A7FF999798FF5C5C5CFF656565FF656565FF656565FF6565
+ 65FF656565FF656565FF656565FF656565FF646464FF3D3D3DFF242424FF2828
+ 285C3434340F000000004C4C4C8F4A4A4AFF494949FF474747FF454545FF4444
+ 44FF424242FF404040FF3F3F3FFF323C61FF1737B5FF0E33CBFF1132BCFF2233
+ 7EFF353535FF333333FF323232FF303030FF2E2E2EFF2D2D2DFF2B2B2BFF2929
+ 29FF282828FF21243AFF0519B3FF72727AFFFAF6F7FFEAE7E9FFE9E7E7FFE9E6
+ E7FFD7D4D4FFACAAAAFF9C999AFF5C5C5CFF656565FF656565FF656565FF6565
+ 65FF656565FF656565FF656565FF656565FF646464FF3D3D3DFF242424FF1616
+ 16AE3434340F000000004E4E4EDF4C4C4CFF4A4A4AFF494949FF474747FF4545
+ 45FF444444FF424242FF2C3F88FF0739FFFF0436FFFF0134FEFF0031FCFF002F
+ F8FF1431ADFF353535FF333333FF323232FF303030FF2E2E2EFF2D2D2DFF2B2B
+ 2BFF292929FF252732FF031AC1FF74747BFFFFFCFEFFEFEDEEFFEEEBEDFFEEEB
+ EDFFDAD8D9FFB0ADADFF9E9D9DFF5C5C5CFF656565FF656565FF656565FF6565
+ 65FF656565FF656565FF656565FF656565FF646464FF3D3D3DFF252525FF1212
+ 12E83434340F5151512F4F4F4FFF4E4E4EFF4C4C4CFF4A4A4AFF494949FF4747
+ 47FF454545FF40444FFF103FF3FF0A3CFFFF0739FFFF0436FFFF0134FEFF0031
+ FCFF002FF8FF22337EFF353535FF333333FF323232FF303030FF2E2E2EFF2D2D
+ 2DFF2B2B2BFF292929FF081DB1FF76777EFFFFFFFFFFF3F2F2FFF2F0F0FFF2EF
+ F0FFDDDCDDFFB2B0B1FFA09E9FFF5E5E5EFF6A6A6AFF646464FF646464FF6565
+ 65FF656565FF656565FF656565FF656565FF646464FF3D3D3DFF252525FF1212
+ 12FF1010103B5252526F515151FF4F4F4FFF4E4E4EFF4C4C4CFF4A4A4AFF4949
+ 49FF474747FF394574FF1042FFFF0D3FFFFF0A3CFFFF0739FFFF0436FFFF0134
+ FEFF0031FCFF1132BCFF373737FF353535FF333333FF323232FF303030FF2E2E
+ 2EFF2D2D2DFF2B2B2BFF19246FFF77787FFFFFFFFFFFF7F6F7FFF6F4F6FFF4F4
+ F4FFE1E0E1FFB5B2B4FFA3A1A1FF5D5D5DFF646464FF707070FF6F6F6FFF6666
+ 66FF6A6A6AFF656565FF646464FF666666FF636363FF3D3D3DFF262626FF1313
+ 13FF0B0B0B77545454AF535353FF515151FF4F4F4FFF4E4E4EFF4C4C4CFF4A4A
+ 4AFF494949FF3B4775FF1345FFFF1042FFFF0D3FFFFF0A3CFFFF0739FFFF0436
+ FFFF0134FEFF0E33CBFF383838FF373737FF353535FF333333FF323232FF3030
+ 30FF2E2E2EFF2D2D2DFF2C2C2CFF7A7A7AFFFFFFFFFFFBFAFBFFF8F8F8FFF8F7
+ F8FFE3E2E2FFB6B4B5FFA4A1A3FF595959FF606060FF636363FF636363FF6767
+ 67FF626262FF6D6D6DFF6E6E6EFF666666FF686868FF3D3D3DFF272727FF1414
+ 14FF0B0B0BA5565656CF545454FF535353FF515151FF4F4F4FFF4E4E4EFF4C4C
+ 4CFF4A4A4AFF40496BFF1647FFFF1345FFFF1042FFFF0D3FFFFF0A3CFFFF0739
+ FFFF0436FFFF1A37A9FF3A3A3AFF383838FF373737FF353535FF333333FF3232
+ 32FF303030FF2E2E2EFF2D2D2DFF7C7C7CFFFFFFFFFFFEFEFEFFFBFBFBFFFAFA
+ FAFFE5E5E5FFB7B5B5FFA6A5A5FF646464FF676767FF6A6A6AFF656565FF6363
+ 63FF5F5F5FFF606060FF626262FF666666FF636363FF414141FF272727FF1616
+ 16FF0B0B0BC3585858FF565656FF545454FF535353FF515151FF4F4F4FFF4E4E
+ 4EFF4C4C4CFF4A4A4AFF254AD1FF1647FFFF1345FFFF1042FFFF0D3FFFFF0A3C
+ FFFF0A39F3FF363C55FF3B3B3BFF3A3A3AFF383838FF373737FF353535FF3333
+ 33FF323232FF303030FF2E2E2EFF7C7C7CFFFFFFFFFFFEFEFEFFFCFBFBFFFBFA
+ FAFFE6E5E5FFB6B5B5FFADABACFF5E5E5EFF666666FF636363FF6E6E6EFF7070
+ 70FF666666FF6A6A6AFF666666FF646464FF5A5A5AFF434343FF282828FF1616
+ 16FF0C0C0CFF595959FF585858FF565656FF545454FF535353FF515151FF4F4F
+ 4FFF4E4E4EFF4C4C4CFF474A56FF254AD1FF1647FFFF1345FFFF1042FFFF103F
+ F3FF333F70FF3F3F3FFF3D3D3DFF3B3B3BFF3A3A3AFF383838FF373737FF3535
+ 35FF333333FF323232FF303030FF7C7C7CFFFFFFFFFFFEFCFEFFFBFBFBFFFAFA
+ FAFFE3E3E3FFB6B5B5FFACABACFF585858FF636363FF5F5F5FFF636363FF6262
+ 62FF666666FF606060FF6C6C6CFF757575FF606060FF434343FF282828FF1818
+ 18FF0D0D0DFF5B5B5BFF595959FF585858FF565656FF545454FF535353FF5151
+ 51FF4F4F4FFF4E4E4EFF4C4C4CFF4A4A4AFF40496BFF3B4775FF394574FF4444
+ 44FF424242FF404040FF3F3F3FFF3D3D3DFF3B3B3BFF3A3A3AFF383838FF3737
+ 37FF353535FF23306DFF172C92FF797A80FFFFFFFFFFFBFAFBFFFAF8F8FFF8F7
+ F7FFE5E3E5FFA9A9A9FF7C7B7BFF888888FF656565FF5C5C5CFF5B5B5BFF6262
+ 62FF636363FF5F5F5FFF626262FF636363FF666666FF444444FF282828FF1919
+ 19FF0F0F0FFF5D5D5DFF5B5B5BFF595959FF585858FF565656FF545454FF5353
+ 53FF515151FF4F4F4FFF4E4E4EFF4C4C4CFF4A4A4AFF494949FF474747FF4545
+ 45FF444444FF424242FF404040FF3F3F3FFF3D3D3DFF3B3B3BFF3A3A3AFF3838
+ 38FF373737FF062CD8FF032AE0FF777881FFFFFFFFFFF7F6F7FFF6F4F4FFF3F2
+ F3FFECE9EBFF6A6969FF717070FFE2E2E2FFDEDEDEFFC1C1C1FF9E9E9EFF8484
+ 84FF6B6B6BFF5E5E5EFF5B5B5BFF626262FF5A5A5AFF434343FF272727FF1818
+ 18FF101010FF5E5E5EFF5D5D5DFF5B5B5BFF595959FF585858FF565656FF5454
+ 54FF535353FF515151FF4F4F4FFF4E4E4EFF4C4C4CFF4A4A4AFF494949FF4747
+ 47FF454545FF444444FF424242FF404040FF3F3F3FFF3D3D3DFF3B3B3BFF3A3A
+ 3AFF20348CFF002DF4FF032CE4FF76787DFFFFFFFFFFF3F2F2FFF2F0F0FFE4E3
+ E3FF817F7FFF818080FFC0BBBDFFA49FA0FF9D999CFFBCB8BAFFCAC9CAFFD5D5
+ D5FFE0E1E0FFC2C2C2FFA3A4A3FF898989FF6B6B6BFF444444FF212121FF1717
+ 17FF111111FF606060FF5E5E5EFF5D5D5DFF5B5B5BFF595959FF585858FF5656
+ 56FF545454FF535353FF515151FF4F4F4FFF4E4E4EFF4C4C4CFF4A4A4AFF4949
+ 49FF474747FF454545FF444444FF424242FF404040FF3F3F3FFF3D3D3DFF3B3B
+ 3BFF2C386AFF002FF8FF032DE9FF757578FFFEFCFEFFEEEBEDFF908E8FFF8381
+ 82FFD9D6D8FFDEDADCFFD7D3D4FFCFC9CBFFC2BBBDFFAAA1A5FF9D9597FF8B82
+ 86FF7F777AFFA09D9EFFC0BCBDFFD8D5D7FFC1C1C1FF2B2B2BFF1A1A1AFF1616
+ 16FF131313FF626262CF606060FF5E5E5EFF5D5D5DFF5B5B5BFF595959FF5858
+ 58FF565656FF545454FF535353FF515151FF4F4F4FFF4E4E4EFF4C4C4CFF4A4A
+ 4AFF494949FF474747FF454545FF444444FF424242FF404040FF3F3F3FFF3D3D
+ 3DFF3B3B3BFF1234BFFF022FEFFF74747BFFF7F6F6FF8F8E8EFF858484FFE9E8
+ E8FFEEEBEDFFE9E6E6FFDEDCDCFFD3CED0FFC7C1C4FFBBB5B7FFABA4A6FF9E93
+ 98FF8F8288FF796B6FFF66595EFF3B3839FF232323FF1D1D1DFF191919FF1616
+ 16FF141414BF636363AF626262FF606060FF5E5E5EFF5D5D5DFF5B5B5BFF5959
+ 59FF585858FF565656FF545454FF535353FF515151FF4F4F4FFF4E4E4EFF4C4C
+ 4CFF4A4A4AFF494949FF474747FF454545FF444444FF424242FF404040FF3F3F
+ 3FFF3D3D3DFF343A54FF0231F5FF747580FFA4A6B9FF969598FFF7F7F7FFFAFA
+ FAFFF6F4F4FFEEEDEDFFE5E2E2FFD9D4D7FFCBC6C7FFBFB8BAFFAFA6AAFFA198
+ 9CFF988C91FF6D6467FF2C2B2CFF212121FF1F1F1FFF1B1B1BFF191919FF1717
+ 17FF161616AF6565656F636363FF626262FF606060FF5E5E5EFF5D5D5DFF5B5B
+ 5BFF595959FF585858FF565656FF545454FF535353FF515151FF4F4F4FFF4E4E
+ 4EFF4C4C4CFF4A4A4AFF494949FF474747FF3C4568FF41444FFF424242FF4040
+ 40FF3F3F3FFF323C61FF0234F9FF51587EFFB4B6C7FFF8F7F7FFFFFFFFFFFFFF
+ FFFFFFFFFFFFF6F4F6FFEAE6E7FFDCD7D8FFCCC7C9FFC0B8BCFFB6ADB1FFA69C
+ 9FFF4D4A52FF1F234CFF242424FF212121FF1F1F1FFF1C1C1CFF1A1A1AFF1919
+ 19FF1717176F6666662F656565FF636363FF626262FF606060FF5E5E5EFF5D5D
+ 5DFF5B5B5BFF595959FF585858FF565656FF545454FF535353FF515151FF4F4F
+ 4FFF4E4E4EFF4C4C4CFF454B61FF284AC6FF1647FFFF1645F3FF2D4395FF4242
+ 42FF364064FF0A39F3FF0536FDFF0B31C5FF1A3089FF40434EFF5F5F5FFF8484
+ 84FFB9B9B9FFD5D4D5FFE1DDDEFFE1DEDEFFD9D4D7FFCBC4C6FF9C9597FF3437
+ 51FF0E1D90FF0E1C90FF242424FF212121FF1F1F1FFF1E1E1EFF1C1C1CFF1A1A
+ 1AFF1919192F00000000676767DF656565FF636363FF626262FF606060FF5E5E
+ 5EFF5D5D5DFF5B5B5BFF535C78FF465EABFF4D5980FF52555FFF535353FF5151
+ 51FF4F4F4FFF4E4E4EFF354EA5FF1C4DFFFF194AFFFF1647FFFF1345FFFF1642
+ E7FF103FF3FF0A3CFFFF0739FFFF203A9DFF383B48FF3A3A3AFF373737FF3535
+ 35FF313131FF2E2E2EFF363636FF4D4E58FF6E6E78FF51505EFF1A2673FF061E
+ B8FF041CC2FF111F80FF242424FF232323FF212121FF1F1F1FFF1E1E1EFF1C1C
+ 1CDF00000000000000006868688F676767FF656565FF636363FF626262FF6060
+ 60FF5E5E5EFF57607BFF3D69F4FF3867FFFF3564FFFF405DBFFF545454FF5353
+ 53FF515151FF4F4F4FFF3251BCFF1F50FFFF1C4DFFFF194AFFFF1647FFFF1345
+ FFFF1042FFFF0D3FFFFF173DCFFF3F3F3FFF3D3D3DFF3B3B3BFF3A3A3AFF3838
+ 38FF373737FF353535FF333333FF323232FF0926C1FF0022DFFF0020DBFF001E
+ D7FF021DC8FF252732FF262626FF242424FF232323FF212121FF1F1F1FFF1E1E
+ 1E8F00000000000000006969691F686868FF676767FF656565FF636363FF6262
+ 62FF5E616AFF436FF5FF3E6DFFFF3B6AFFFF3867FFFF3564FFFF52586BFF5454
+ 54FF535353FF515151FF3054D3FF2253FFFF1F50FFFF1C4DFFFF194AFFFF1647
+ FFFF1345FFFF1042FFFF0D3FFFFF404040FF3F3F3FFF3D3D3DFF3B3B3BFF3A3A
+ 3AFF383838FF373737FF353535FF333333FF2F313DFF1B2B7EFF172886FF1927
+ 79FF282A36FF292929FF282828FF262626FF242424FF232323FF212121FF2020
+ 201F0000000000000000000000006A6A6ABF686868FF676767FF656565FF6363
+ 63FF566AA7FF4473FFFF4170FFFF3E6DFFFF3B6AFFFF3867FFFF4260C0FF5656
+ 56FF52555FFF475688FF2E58E9FF2556FFFF2253FFFF1F50FFFF1C4DFFFF194A
+ FFFF1647FFFF1345FFFF1042FFFF1740DBFF223EABFF233C9EFF363C55FF3B3B
+ 3BFF3A3A3AFF383838FF373737FF353535FF333333FF323232FF303030FF2E2E
+ 2EFF2D2D2DFF2B2B2BFF292929FF282828FF262626FF242424FF232323AF0000
+ 00000000000000000000000000006B6B6B3F6A6A6AFF686868FF676767FF6565
+ 65FF62656DFF4C72E1FF4473FFFF4170FFFF3E6DFFFF3B6AFFFF3867FFFF3564
+ FFFF3261FFFF2F5FFFFF2C5CFFFF2959FFFF2556FFFF2253FFFF1F50FFFF1C4D
+ FFFF194AFFFF1647FFFF1345FFFF1042FFFF0D3FFFFF0A3CFFFF183BC2FF3D3D
+ 3DFF3B3B3BFF3A3A3AFF383838FF373737FF353535FF333333FF323232FF3030
+ 30FF2E2E2EFF2D2D2DFF2B2B2BFF292929FF282828FF262626FF2424242F0000
+ 0000000000000000000000000000000000006B6B6B9F6A6A6AFF686868FF6767
+ 67FF656565FF5E6781FF4974F5FF4473FFFF4170FFFF3E6DFFFF3B6AFFFF3867
+ FFFF3564FFFF3261FFFF2F5FFFFF2C5CFFFF2959FFFF2556FFFF2253FFFF1F50
+ FFFF1C4DFFFF194AFFFF1647FFFF1345FFFF1042FFFF0D3FFFFF103DE7FF3F3F
+ 3FFF3D3D3DFF3B3B3BFF3A3A3AFF383838FF373737FF353535FF333333FF3232
+ 32FF303030FF2E2E2EFF2D2D2DFF2B2B2BFF292929FF2828289F000000000000
+ 0000000000000000000000000000000000006B6B6B0F6B6B6BEF6A6A6AFF6868
+ 68FF676767FF656565FF5E6781FF4776FFFF4473FFFF4170FFFF3E6DFFFF3B6A
+ FFFF3867FFFF3564FFFF3261FFFF2F5FFFFF2C5CFFFF2959FFFF2556FFFF2253
+ FFFF1F50FFFF1C4DFFFF194AFFFF1647FFFF1345FFFF1042FFFF2E4189FF4040
+ 40FF3F3F3FFF3D3D3DFF3B3B3BFF3A3A3AFF383838FF373737FF353535FF3333
+ 33FF323232FF303030FF2E2E2EFF2D2D2DFF2B2B2BEF2A2A2A0F000000000000
+ 000000000000000000000000000000000000000000006B6B6B3F6B6B6BFF6A6A
+ 6AFF686868FF676767FF656565FF5D688AFF4974F5FF4473FFFF4170FFFF3E6D
+ FFFF3B6AFFFF3867FFFF3564FFFF3261FFFF2F5FFFFF2C5CFFFF2959FFFF2556
+ FFFF2253FFFF1F50FFFF1C4DFFFF194AFFFF1647FFFF1645F3FF444444FF4242
+ 42FF404040FF3B3E4BFF363C55FF3B3B3BFF3A3A3AFF383838FF373737FF3535
+ 35FF333333FF323232FF303030FF2E2E2EFF2D2D2D3F00000000000000000000
+ 00000000000000000000000000000000000000000000000000006B6B6B7F6B6B
+ 6BFF6A6A6AFF686868FF676767FF656565FF5E6781FF4B73EBFF4473FFFF4170
+ FFFF3E6DFFFF3B6AFFFF3867FFFF3564FFFF3261FFFF2F5FFFFF2C5CFFFF2959
+ FFFF2556FFFF2253FFFF1F50FFFF1C4DFFFF194AFFFF1647FFFF2645B9FF4144
+ 4FFF2E4189FF0D3CF3FF0739FFFF213A9DFF3B3B3BFF3A3A3AFF383838FF3737
+ 37FF353535FF333333FF323232FF3030306F0000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000006B6B
+ 6B9F6B6B6BFF6A6A6AFF686868FF676767FF656565FF62656DFF536DBAFF4473
+ FFFF4170FFFF3E6DFFFF3B6AFFFF3867FFFF3564FFFF3261FFFF2F5FFFFF2C5C
+ FFFF2959FFFF2556FFFF2253FFFF1F50FFFF1C4DFFFF194AFFFF1647FFFF1645
+ F3FF1042FFFF0D3FFFFF0A3CFFFF233C9FFF3D3D3DFF3B3B3BFF3A3A3AFF3838
+ 38FF373737FF353535FF3333339F000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00006B6B6B9F6B6B6BFF6A6A6AFF686868FF676767FF656565FF636363FF5D65
+ 7FFF4D6DCDFF4170FFFF3E6DFFFF3B6AFFFF3867FFFF3564FFFF3261FFFF2F5F
+ FFFF2C5CFFFF2959FFFF2556FFFF2253FFFF1F50FFFF1C4DFFFF194AFFFF1647
+ FFFF1345FFFF2042C4FF384165FF404040FF3F3F3FFF3D3D3DFF3B3B3BFF3A3A
+ 3AFF383838FF3737379F00000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000006B6B6B7F6B6B6BFF6A6A6AFF686868FF676767FF656565FF6363
+ 63FF626262FF5D6274FF4E68B9FF446AE0FF3B6AFFFF3867FFFF3564FFFF3261
+ FFFF2F5FFFFF2C5CFFFF2959FFFF2556FFFF2253FFFF1F50FFFF254DDDFF2E4A
+ AFFF41475EFF454545FF444444FF424242FF404040FF3F3F3FFF3D3D3DFF3B3B
+ 3BFF3A3A3A6F0000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000006B6B6B4F6B6B6BEF6A6A6AFF686868FF676767FF6565
+ 65FF636363FF626262FF606060FF5E5E5EFF5B5E67FF535F84FF4860ACFF465E
+ ABFF445CABFF4159AAFF3F57A9FF3D55A8FF45517BFF4B4E59FF4C4C4CFF4A4A
+ 4AFF494949FF474747FF454545FF444444FF424242FF404040FF3F3F3FEF3D3D
+ 3D3F000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000006B6B6B0F6B6B6B9F6A6A6AFF686868FF6767
+ 67FF656565FF636363FF626262FF606060FF5E5E5EFF5D5D5DFF5B5B5BFF5959
+ 59FF585858FF565656FF545454FF535353FF515151FF4F4F4FFF4E4E4EFF4C4C
+ 4CFF4A4A4AFF494949FF474747FF454545FF444444FF4242429F4141410F0000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000006B6B6B3F6A6A6ABF6868
+ 68FF676767FF656565FF636363FF626262FF606060FF5E5E5EFF5D5D5DFF5B5B
+ 5BFF595959FF585858FF565656FF545454FF535353FF515151FF4F4F4FFF4E4E
+ 4EFF4C4C4CFF4A4A4AFF494949FF474747BF4545453F00000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000006969
+ 691F6868688F676767EF656565FF636363FF626262FF606060FF5E5E5EFF5D5D
+ 5DFF5B5B5BFF595959FF585858FF565656FF545454FF535353FF515151FF4F4F
+ 4FFF4E4E4EDF4C4C4C8F4A4A4A1F000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000006666662F6565657F636363AF626262CF606060FF5E5E
+ 5EFF5D5D5DFF5B5B5BFF595959FF585858FF565656CF545454AF5252527F5151
+ 512F000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000FFFF8000000F0000FFFC000000010000FFF0000000000000FFC0
+ 000000000000FF80000000000000FF00000000000000FE00000000000000FC00
+ 000000000000F800000000000000F000000000000000E000000000000000E000
+ 000000000000C000000000000000C00000000000000080000000000000008000
+ 0000000000008000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000008000
+ 00000001000080000000000100008000000000010000C000000000030000C000
+ 000000030000E000000000070000E000000000070000F0000000000F0000F800
+ 0000001F0000FC000000003F0000FE000000007F0000FF00000000FF0000FF80
+ 000001FF0000FFC0000003FF0000FFF000000FFF0000FFFC00003FFF0000FFFF
+ 8001FFFF00002800000020000000400000000100200000000000801000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000001C1C1C1F1A1A1A6F1717
+ 17BF151515EF121212FF101010FF0D0D0DFF0B0B0BFF080808DF060606AF0404
+ 046F21202171484A4BFF3F453FFF484A4BFF484A4BFF1D1D1D11000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000002424243F212121BF1F1F1FFF1C1C1CFF1A1A
+ 1AFF171717FF151515FF121212FF101010FF0D0D0DFF0B0B0BFF080808FF1413
+ 14FF484A4BFFA39AA1FF484A4BFF7B7B7BFF7B7B7BFF484A4BFF484A4BFF484A
+ 4BFF222222341E1E1E0D8E8E8E01000000000000000000000000000000000000
+ 0000000000002B2B2B0F292929AF262626FF242424FF212121FF1F1F1FFF1C1C
+ 1CFF1A1A1AFF171717FF151515FF121212FF101010FF0D0D0DFF1A1919FF484A
+ 4BFF676467FFAAA3A9FF484A4BFF7B7B7BFF7B7B7BFF7B7B7BFF7B7B7BFF7B7B
+ 7BFF484A4BFF484A4BFF484A4BFF000000000000000000000000000000000000
+ 00003030303F2E2E2EEF2B2B2BFF292929FF262626FF242424FF212121FF1F1F
+ 1FFF10155DFF0009ABFF0005A5FF00029FFF00009AFF1A195FFF484A4BFFBDB7
+ BDFF484A4BFFB1ABB1FF484A4BFF7B7B7BFF7B7B7BFF7B7B7BFF7B7B7BFF7B7B
+ 7BFF7B7B7BFF939393FF494949FF000000000000000000000000000000003535
+ 355F333333FF303030FF2E2E2EFF2B2B2BFF292929FF262626FF242424FF2121
+ 21FF171B45FF000CB1FF0009ABFF0308A4FF1C1D6BFF484A4BFFBDB7BDFFBDB7
+ BDFF484A4BFFB8B2BAFF484A4BFF7B7B7BFF0A9C12FF0A9C12FF4C4C7EFF4C4C
+ 7EFF7B7B7BFF939393FF494949FF0000000000000000000000003A3A3A3F3838
+ 38FF353535FF333333FF303030FF2E2E2EFF2B2B2BFF292929FF262626FF2424
+ 24FF151B5CFF000FB8FF000CB1FF3C42A6FF484A4BFFBDB7BDFFBDB7BDFFBDB7
+ BDFF484A4BFFC0BBC0FF484A4BFF7B7B7BFF7B7B7BFF3B8B41FF7B7B7BFF6363
+ 7DFF7B7B7BFF939393FF494949FF00000000000000003F3F3F1F3C3C3CEF3A3A
+ 3AFF383838FF353535FF333333FF303030FF2E2E2EFF2B2B2BFF292929FF2626
+ 26FF1D2141FF0213B4FF000FB8FF484A4BFFBDB7BDFFBDB7BDFFBDB7BDFFBDB7
+ BDFF484A4BFFC6C2C7FF484A4BFF7B7B7BFF7B7B7BFF7B7B7BFF7B7B7BFF7B7B
+ 7BFF7B7B7BFF939393FF494949FF0000000000000000414141BF3F3F3FFF3C3C
+ 3CFF3A3A3AFF383838FF353535FF333333FF303030FF2E2E2EFF2B2B2BFF2929
+ 29FF262626FF1D2141FF151B5CFF484A4BFFBDB7BDFFBDB7BDFFBDB7BDFFBDB7
+ BDFF484A4BFFCECACEFF484A4BFF7B7B7BFF7B7B7BFF7B7B7BFF7B7B7BFF7B7B
+ 7BFF7B7B7BFF939393FF494949FF000000004646463F444444FF414141FF3F3F
+ 3FFF3C3C3CFF3A3A3AFF383838FF353535FF333333FF303030FF2E2E2EFF2B2B
+ 2BFF292929FF262626FF242424FF484A4BFFC0BAC0FFBDB7BDFFBDB7BDFFBDB7
+ BDFF484A4BFFD4D0D4FF484A4BFF7B7B7BFF7B7B7BFF7B7B7BFF7B7B7BFF7B7B
+ 7BFF7B7B7BFF939393FF494949FF00000000494949BF464646FF444444FF4141
+ 41FF3F3F3FFF3C3C3CFF3A3A3AFF383838FF353535FF333333FF303030FF2E2E
+ 2EFF2B2B2BFF292929FF262626FF484A4BFFC4BDC2FFC0BAC0FFBDB7BDFFBDB7
+ BDFF484A4BFFD9D7DAFF484A4BFF7B7B7BFF7B7B7BFF7B7B7BFF7B7B7BFF7B7B
+ 7BFF7B7B7BFF939393FF494949FF4E4E4E1F4B4B4BFF494949FF464646FF4444
+ 44FF414141FF343E63FF1538C2FF0332F0FF1131BBFF2B3359FF333333FF3030
+ 30FF2E2E2EFF2B2B2BFF292929FF484A4BFFC6C1C6FFC2BDC2FFC0BAC0FFBDB7
+ BDFF484A4BFFDEDDE1FF484A4BFF7B7B7BFF7B7B7BFF7B7B7BFF7B7B7BFF7B7B
+ 7BFF7B7B7BFF939393FF484A4BFF5050506F4E4E4EFF4B4B4BFF494949FF4646
+ 46FF414450FF0F3EF3FF073AFFFF0336FEFF0032FCFF062FDEFF353535FF3333
+ 33FF303030FF2E2E2EFF2B2B2BFF484A4BFFCBC5CBFFC6C0C6FFC2BCC2FFC0BA
+ C0FF484A4BFFE3E2E6FF484A4BFF7B7B7BFF7B7B7BFF7B7B7BFF7B7B7BFF7B7B
+ 7BFF7B7B7BFF939393FF484A4BFF535353BF515151FF4E4E4EFF4B4B4BFF4949
+ 49FF3A4675FF1042FFFF0C3EFFFF073AFFFF0336FEFF0032FCFF293568FF3535
+ 35FF333333FF303030FF2E2E2EFF484A4BFFCECACEFFCAC5CAFFC6C1C6FFC4BC
+ C4FF484A4BFFE7E6EAFF484A4BFF7B7B7BFF7B7B7BFF7B7B7BFF7B7B7BFF7B7B
+ 7BFF7B7B7BFF939393FF484A4BFF565656EF535353FF515151FF4E4E4EFF4B4B
+ 4BFF3D4977FF1547FFFF1042FFFF0C3EFFFF073AFFFF0336FEFF333952FF3838
+ 38FF353535FF333333FF303030FF484A4BFFD4D0D4FFCFCACFFFCBC5CAFFC6C0
+ C6FF484A4BFFEBEAEDFF484A4BFF868686FF868686FF868686FF929292FF7B7B
+ 7BFF7B7B7BFF939393FF484A4BFF585858FF565656FF535353FF515151FF4E4E
+ 4EFF4B4B4BFF224ADDFF1547FFFF1042FFFF0C3EFFFF183BC3FF3C3C3CFF3A3A
+ 3AFF383838FF353535FF333333FF484A4BFFD9D5D8FFD4D0D4FFCFCACFFFCBC5
+ CAFF484A4BFFEDEDEFFF484A4BFF7B7B7BFF7B7B7BFF7B7B7BFF6F6F6FFF8686
+ 86FF868686FFA7A7A7FF484A4BFF5B5B5BFF585858FF565656FF535353FF5151
+ 51FF4E4E4EFF484B57FF344A99FF2D46A3FF2D4396FF414141FF3F3F3FFF3C3C
+ 3CFF3A3A3AFF383838FF353535FF484A4BFFDEDADDFFD9D5D9FFE9E7EAFFCFCA
+ CFFF484A4BFFEEEDF0FF484A4BFF8C8C8CFF8C8C8CFF929292FF7B7B7BFF7B7B
+ 7BFF7B7B7BFF8F8F8FFF484A4BFF5D5D5DFF5B5B5BFF585858FF565656FF5353
+ 53FF515151FF4E4E4EFF4B4B4BFF494949FF464646FF444444FF414141FF3F3F
+ 3FFF3C3C3CFF3A3A3AFF31374FFF484A4BFFE3E0E3FFEEEDEEFF9C9A9CFFD3CF
+ D3FF484A4BFFEDEDEFFF484A4BFF545657FF636464FF6E6E6EFF8C8C8CFF8C8C
+ 8CFF8C8C8CFFA6A6A6FF484A4BFF606060FF5D5D5DFF5B5B5BFF585858FF5656
+ 56FF535353FF515151FF4E4E4EFF4B4B4BFF494949FF464646FF444444FF4141
+ 41FF3F3F3FFF3C3C3CFF283776FF484A4BFFE7E6E7FF909092FF9E9D9EFFD8D4
+ D8FF484A4BFFCECFD0FFCFCFCFFF868787FF636565FF4E5051FF4D4F50FF5C5D
+ 5DFF6B6B6CFF929292FF484A4BFF626262EF606060FF5D5D5DFF5B5B5BFF5858
+ 58FF565656FF535353FF515151FF4E4E4EFF4B4B4BFF494949FF464646FF4444
+ 44FF414141FF3F3F3FFF3C3C3CFF484A4BFFEDEBEDFF929293FFE3E0E2FFFFFF
+ FFFFB0B0B2FF515253FF555657FF757677FFA9AAAAFFD3D3D4FFBDBDBFFF7F80
+ 81FF5B5C5DFF4A4C4DFF484A4BFF646464BF626262FF606060FF5D5D5DFF5B5B
+ 5BFF585858FF565656FF535353FF515151FF4E4E4EFF4B4B4BFF494949FF4346
+ 52FF3E445BFF414141FF3F3F3FFF484A4BFFF0F0F2FFEDEBEDFFFFFFFFFFE9E9
+ EBFFE2E1E5FFDCD9DDFFBFBBBFFF979598FF6F6E72FF58595AFF4E5051FF6869
+ 6AFF939596FFD0D1D1FF484A4BFF6666666F656565FF626262FF606060FF5D5D
+ 5DFF5B5B5BFF585858FF565656FF535353FF515151FF4E4E4EFF434C6DFF204A
+ E8FF1547FFFF2443B8FF2A4094FF484A4BFFF6F6F6FFFFFFFFFFEEEEF0FFF2F2
+ F4FFEEEDEFFFE5E3E7FFD9D7DAFFCBC7CCFFBDB7BDFFADA7ADFF999197FF9991
+ 97FF7A7375FF484A4BFF1A1A1A6F6868681F676767FF656565FF626262FF6060
+ 60FF5B5E67FF3C68F4FF3565FFFF485A95FF535353FF515151FF3851A7FF1E4F
+ FFFF1A4BFFFF1547FFFF1042FFFF484A4BFFFFFFFFFFEDEDEFFFF8F8FAFFFBFB
+ FCFFF6F4F7FFEAEAEDFFDDDCE0FFCFCCD0FFC0BBC1FFB0AAB0FFA0989EFF484A
+ 4BFF484A4BFF1F1F1FFF1C1C1C1F00000000696969BF676767FF656565FF6262
+ 62FF496EE1FF3F6EFFFF3A69FFFF3A63EAFF565656FF535353FF3C54A8FF2354
+ FFFF1E4FFFFF1A4BFFFF1547FFFF3559E3FF484A4BFF484A4BFFE9E9EAFFFCFC
+ FCFFF6F6F7FFEBEAEEFFDEDCE0FFD0CCD0FFC1BBC1FF484A4BFF484A4BFF2626
+ 26FF242424FF212121BF00000000000000006B6B6B3F696969FF676767FF6565
+ 65FF4C72E1FF4372FFFF3F6EFFFF3A69FFFF3C62DFFF385FDFFF2C5CFFFF2758
+ FFFF2354FFFF1E4FFFFF1A4BFFFF1547FFFF1042FEFF0D3CF0FF484A4BFF484A
+ 4BFF484A4BFF484A4BFF484A4BFF484A4BFF484A4BFF2C2C2CFF2B2B2BFF2929
+ 29FF262626FF2424243F0000000000000000000000006B6B6BBF696969FF6767
+ 67FF616778FF4974F5FF4372FFFF3F6EFFFF3A69FFFF3565FFFF3161FFFF2C5C
+ FFFF2758FFFF2354FFFF1E4FFFFF1A4BFFFF1547FFFF1042FFFF123EE7FF3F3F
+ 3FFF3C3C3CFF3A3A3AFF383838FF353535FF333333FF303030FF2E2E2EFF2B2B
+ 2BFF292929BF000000000000000000000000000000006B6B6B1F6B6B6BEF6969
+ 69FF676767FF606882FF4974F5FF4372FFFF3F6EFFFF3A69FFFF3565FFFF3161
+ FFFF2C5CFFFF2758FFFF2354FFFF1E4FFFFF1A4BFFFF1547FFFF2E4395FF4141
+ 41FF3C3F4BFF393C48FF3A3A3AFF383838FF353535FF333333FF303030FF2E2E
+ 2EEF2B2B2B1F00000000000000000000000000000000000000006B6B6B3F6B6B
+ 6BFF696969FF676767FF616778FF4C72E1FF4372FFFF3F6EFFFF3A69FFFF3565
+ FFFF3161FFFF2C5CFFFF2758FFFF2354FFFF1E4FFFFF1A4BFFFF1847F3FF2E43
+ 95FF0F3EF3FF0A3AF2FF323B61FF3A3A3AFF383838FF353535FF333333FF3030
+ 303F000000000000000000000000000000000000000000000000000000006B6B
+ 6B5F6B6B6BFF696969FF676767FF656565FF566AA7FF4570F5FF3F6EFFFF3A69
+ FFFF3565FFFF3161FFFF2C5CFFFF2758FFFF2354FFFF1E4FFFFF1A4BFFFF1547
+ FFFF1442F3FF2A4094FF3F3F3FFF3C3C3CFF3A3A3AFF383838FF3535355F0000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00006B6B6B3F6B6B6BEF696969FF676767FF656565FF626262FF55669CFF4A67
+ C2FF3E67EAFF3565FFFF3161FFFF2C5CFFFF2758FFFF2853E9FF2F4DBCFF374A
+ 8DFF464646FF444444FF414141FF3F3F3FFF3C3C3CEF3A3A3A3F000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000006B6B6B1F6B6B6BBF696969FF676767FF656565FF626262FF6060
+ 60FF5D5D5DFF5B5B5BFF585858FF565656FF535353FF515151FF4E4E4EFF4B4B
+ 4BFF494949FF464646FF444444FF414141BF3F3F3F1F00000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000006B6B6B3F696969BF676767FF656565FF6262
+ 62FF606060FF5D5D5DFF5B5B5BFF585858FF565656FF535353FF515151FF4E4E
+ 4EFF4B4B4BFF494949BF4646463F000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000006868681F6666666F6464
+ 64BF626262EF606060FF5D5D5DFF5B5B5BFF585858FF565656EF535353BF5050
+ 506F4E4E4E1F0000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000FFC0001FFF000000FC000000F8000000F000
+ 0000E0000000C0000000C0000000800000008000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000008000000180000001C0000003C0000003E0000007F000000FF800
+ 001FFC00003FFF0000FFFFC003FF280000001000000020000000010020000000
+ 0000400400000000000000000000000000000000000000000000000000000000
+ 0000000000000F0F0F381616169F171717DD121212FF0D0D0DFF080808DD1414
+ 14A33232328D3332336D3434343C2E2E2E181C1C1C0400000000000000000505
+ 050C262626A4262626FF212121FF191A2AFF0A0E5DFF080955FF0F0F34FF5450
+ 51FF657364FF4E614EFE4E4E4EF23E3E3ED33434343D000000000606060C2F2F
+ 2FCD303030FF2B2B2BFF262626FF1D1F34FF000BB1FF060B97FF7F7A91FFA49D
+ 9FFF6A696AFF656565FF656565FF575757FE3434345600000000373737A63939
+ 39FF353535FF303030FF2B2B2BFF24252BFF0E187BFF2B2E69FFCBC6C8FFB5B0
+ B2FF6E6D6EFF656565FF656565FF575757FE343434561F1F1F3A434343FF3E3E
+ 3EFF393939FF353535FF303030FF2B2B2BFF262626FF3A3A3FFFE2DFE0FFC4C1
+ C3FF727171FF656565FF656565FF575757FF2F2F2F683C3C3C9F484848FF4343
+ 44FF183BC1FF0732E1FF28325FFF303030FF2B2B2BFF343C76FFF3F1F1FFD2CF
+ D0FF757575FF646464FF656565FF575757FF202020A8525252E04D4D4DFF4548
+ 56FF1041FFFF0739FEFF1935A5FF353535FF303030FF44454EFFFBFAFBFFDAD9
+ DAFF777676FF676767FF656565FF585858FF171717DF575757FF525252FF4D4D
+ 4DFF2E48A9FF1E42CAFF363D5AFF393939FF353535FF44485BFFFDFCFCFFDAD9
+ DAFF797878FF636363FF646464FF595959FF191919FF5C5C5CFF575757FF5252
+ 52FF4D4D4DFF484848FF434343FF3E3E3EFF353948FF2945C4FFECEAEBFFB6B4
+ B5FFBBB8B9FFACA9AAFF969495FF717071FF181818FF616161E05C5C5CFF5757
+ 57FF525252FF4D4D4DFF484848FF424348FF3E3E3EFF3047A4FFC4C4C8FFF3F2
+ F2FFD7D3D4FFAFA7AAFF5A535BFF222121FF171717DF4F4F4F9F616161FF5C5D
+ 60FF495D9FFF50535FFF474E66FF1B4AF7FF1F42C9FF133AD1FF3B3E4AFF5D5D
+ 5DFF717387FF3A47A4FF16206BFF212121FF1616169F2E2E2E3C666666FF5768
+ 9CFF3E6DFFFF4260C1FF3D57B2FF2253FFFF194AFFFF1742E5FF273C90FF3939
+ 39FF343436FF282E4AFF2A2A2CFF262626FF0F0F0F38000000005E5E5EA66667
+ 6AFF4E6FD0FF3E6DFFFF3564FFFF2B5BFFFF2253FFFF194AFFFF1A42D9FF3E3E
+ 40FF39393CFF353535FF303030FF262626A600000000000000000B0B0B0E5E5E
+ 5ECD66676AFF536BB4FF3F6CF9FF3564FFFF2B5BFFFF2253FFFF1B4AF7FF1B42
+ D5FF2B3C82FF393939FF2F2F2FCD0505050C0000000000000000000000000B0B
+ 0B0E5E5E5EA8666666FF5F636EFF516195FF455DABFF3E56A9FF3E4F8BFF4548
+ 56FF434343FF373737A60606060C000000000000000000000000000000000000
+ 0000000000002E2E2E3C4F4F4FA1616161E25C5C5CFF575757FF525252E23C3C
+ 3C9F1F1F1F3C00000000000000000000000000000000F0000000C00000008000
+ 0000800000000000000000000000000000000000000000000000000000000000
+ 0000000000008001000080010000C0030000F00F0000}
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ PixelsPerInch = 96
+ TextHeight = 13
+ object btn_RemObjects: TROPoweredByRemObjectsButton
+ Left = 9
+ Top = 8
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ end
+ object HTTPServer: TROIndyHTTPServer
+ Dispatchers = <
+ item
+ Name = 'mgs_SOAP'
+ Message = mgs_SOAP
+ Enabled = True
+ PathInfo = '/SOAP'
+ end
+ item
+ Name = 'msg_BIN'
+ Message = msg_BIN
+ Enabled = True
+ PathInfo = '/BIN'
+ end>
+ Port = 81
+ Left = 7
+ Top = 27
+ end
+ object msg_BIN: TROBinMessage
+ Left = 39
+ Top = 27
+ end
+ object mgs_SOAP: TROSOAPMessage
+ SerializationOptions = [xsoWriteMultiRefArray, xsoWriteMultiRefObject]
+ Left = 71
+ Top = 27
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapServerMain.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapServerMain.pas
new file mode 100644
index 0000000..61b9198
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/DataSnap/DataSnapServerMain.pas
@@ -0,0 +1,35 @@
+unit DataSnapServerMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, uROPoweredByRemObjectsButton, uROSOAPMessage, uROClient,
+ uROBinMessage, uROServer, uROIndyTCPServer, uROIndyHTTPServer;
+
+type
+ TDataSnapServerMainForm = class(TForm)
+ HTTPServer: TROIndyHTTPServer;
+ msg_BIN: TROBINMessage;
+ mgs_SOAP: TROSOAPMessage;
+ btn_RemObjects: TRoPoweredByRemObjectsButton;
+ procedure FormCreate(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ DataSnapServerMainForm: TDataSnapServerMainForm;
+
+implementation
+
+{$R *.dfm}
+
+procedure TDataSnapServerMainForm.FormCreate(Sender: TObject);
+begin
+ HTTPServer.Active := true;
+end;
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifier.Sample.html b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifier.Sample.html
new file mode 100644
index 0000000..5b0c280
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifier.Sample.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
+
+ Dispatch notifier
+
+
+Purpose
+This example shows how to customize the invocation.
+
+
+ IRODispatchNotifier is a special interface that TROInvoker classes recognize.
+ If your server side object implements it, the IRODispatchNotifier.GetDispatchInfo method
+ will be called before the target method is invoked.
+
+
+See TROInvoker.CustomHandleMessage in uROServer.pas.
+
+The TMyInvoker class shows how to enhance the interception mechanism by providing support
+for a custom interface called ITestInterface .
+
+Notice how the TROClassFactory.Create has been changed to use TMyInvoker .
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifier.bdsgroup b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifier.bdsgroup
new file mode 100644
index 0000000..ee1dd5c
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifier.bdsgroup
@@ -0,0 +1,20 @@
+
+
+
+
+ Default.Personality
+
+ 1.0
+ {3CB424EF-B184-4F6C-B022-2FE158625483}
+
+
+
+
+
+ DispatchNotifierClient.bdsproj
+ DispatchNotifierServer.bdsproj
+ DispatchNotifierClient.exe DispatchNotifierServer.exe
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifier.bpg b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifier.bpg
new file mode 100644
index 0000000..ad3af78
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifier.bpg
@@ -0,0 +1,23 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = DispatchNotifierClient.exe DispatchNotifierServer.exe
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+DispatchNotifierClient.exe: DispatchNotifierClient.dpr
+ $(DCC)
+
+DispatchNotifierServer.exe: DispatchNotifierServer.dpr
+ $(DCC)
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifier.groupproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifier.groupproj
new file mode 100644
index 0000000..3332c08
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifier.groupproj
@@ -0,0 +1,40 @@
+
+
+ {4a1795b5-591a-42aa-b5ea-2b501669c026}
+
+
+
+
+ Default.Personality
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierClient.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierClient.bdsproj
new file mode 100644
index 0000000..a9c9a49
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierClient.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {2E8CE9B2-046B-4683-A423-7A5822C37A27}
+
+
+
+
+ DispatchNotifierClient.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierClient.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierClient.dpr
new file mode 100644
index 0000000..1a4aa62
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierClient.dpr
@@ -0,0 +1,13 @@
+program DispatchNotifierClient;
+
+uses
+ Forms,
+ DispatchNotifierClientMain in 'DispatchNotifierClientMain.pas' {DispatchNotifierClientMainForm};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TDispatchNotifierClientMainForm, DispatchNotifierClientMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierClient.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierClient.dproj
new file mode 100644
index 0000000..ae68453
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierClient.dproj
@@ -0,0 +1,72 @@
+
+
+ {af143428-fbfc-499b-a031-5813f2fa859b}
+ DispatchNotifierClient.dpr
+ Debug
+ AnyCPU
+ DCC32
+ DispatchNotifierClient.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ DispatchNotifierClient.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierClient.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierClient.res
new file mode 100644
index 0000000..852a6c3
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierClient.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierClientMain.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierClientMain.dfm
new file mode 100644
index 0000000..d9201ab
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierClientMain.dfm
@@ -0,0 +1,82 @@
+object DispatchNotifierClientMainForm: TDispatchNotifierClientMainForm
+ Left = 10
+ Top = 8
+ AutoScroll = False
+ Caption = 'Dispatch Notifier Client'
+ ClientHeight = 151
+ ClientWidth = 344
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Label1: TLabel
+ Left = 8
+ Top = 64
+ Width = 46
+ Height = 13
+ Caption = 'Message:'
+ end
+ object ROPoweredByRemObjectsButton1: TROPoweredByRemObjectsButton
+ Left = 59
+ Top = 96
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ ApplicationType = atClient
+ end
+ object eSimpleMessage: TEdit
+ Left = 64
+ Top = 60
+ Width = 193
+ Height = 25
+ TabOrder = 1
+ Text = 'A simple text message...'
+ end
+ object SendButton: TButton
+ Left = 264
+ Top = 58
+ Width = 75
+ Height = 25
+ Caption = 'Send'
+ TabOrder = 2
+ OnClick = SendButtonClick
+ end
+ object rgChannel: TRadioGroup
+ Left = 104
+ Top = 8
+ Width = 137
+ Height = 41
+ Caption = 'Channel'
+ Columns = 2
+ ItemIndex = 0
+ Items.Strings = (
+ 'TCP'
+ 'HTTP')
+ TabOrder = 0
+ end
+ object IndyTCPChannel: TROIndyTCPChannel
+ ServerLocators = <>
+ DispatchOptions = []
+ Port = 8099
+ Host = '127.0.0.1'
+ Left = 24
+ Top = 16
+ end
+ object BINMessage: TROBinMessage
+ Left = 72
+ Top = 88
+ end
+ object IndyHTTPChannel: TROIndyHTTPChannel
+ ServerLocators = <>
+ DispatchOptions = []
+ TargetURL = 'http://localhost:8090/BIN'
+ Left = 24
+ Top = 88
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierClientMain.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierClientMain.pas
new file mode 100644
index 0000000..68d320e
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierClientMain.pas
@@ -0,0 +1,50 @@
+unit DispatchNotifierClientMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ StdCtrls, uROClient, uROBINMessage, uROIndyTCPChannel,
+ ExtCtrls, uROIndyHTTPChannel,
+ uROPoweredByRemObjectsButton;
+
+type
+ TDispatchNotifierClientMainForm = class(TForm)
+ Label1: TLabel;
+ eSimpleMessage: TEdit;
+ SendButton: TButton;
+ IndyTCPChannel: TROIndyTCPChannel;
+ BINMessage: TROBINMessage;
+ IndyHTTPChannel: TROIndyHTTPChannel;
+ rgChannel: TRadioGroup;
+ ROPoweredByRemObjectsButton1: TROPoweredByRemObjectsButton;
+ procedure SendButtonClick(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ DispatchNotifierClientMainForm : TDispatchNotifierClientMainForm;
+
+implementation
+
+uses DispatchNotifierLibrary_Intf, uROClientIntf;
+
+{$R *.DFM}
+
+procedure TDispatchNotifierClientMainForm.SendButtonClick(Sender: TObject);
+var
+ channel : TROTransportChannel;
+begin
+ if (rgChannel.ItemIndex = 0) then
+ channel := IndyTCPChannel
+ else
+ channel := IndyHTTPChannel;
+
+ CoDispatchNotifierService.Create(BINMessage, channel).SendMessage(eSimpleMessage.Text);
+end;
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierLibrary.rodl b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierLibrary.rodl
new file mode 100644
index 0000000..45196a3
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierLibrary.rodl
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierLibrary_Intf.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierLibrary_Intf.pas
new file mode 100644
index 0000000..9240acf
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierLibrary_Intf.pas
@@ -0,0 +1,91 @@
+unit DispatchNotifierLibrary_Intf;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROClasses, uROClient, uROTypes, uROClientIntf;
+
+const
+ { Library ID }
+ LibraryUID = '{6DA40FCA-5FC2-40CF-8FC6-7601B1CBFDDC}';
+
+ { Service Interface ID's }
+ IDispatchNotifierService_IID : TGUID = '{6DA40FCA-5FC2-40CF-8FC6-7601B1CBFDDC}';
+
+ { Event ID's }
+
+type
+ { Forward declarations }
+ IDispatchNotifierService = interface;
+
+
+ { IDispatchNotifierService }
+ IDispatchNotifierService = interface
+ ['{6DA40FCA-5FC2-40CF-8FC6-7601B1CBFDDC}']
+ procedure SendMessage(const aMessage: String);
+ end;
+
+ { CoDispatchNotifierService }
+ CoDispatchNotifierService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IDispatchNotifierService;
+ end;
+
+ { TDispatchNotifierService_Proxy }
+ TDispatchNotifierService_Proxy = class(TROProxy, IDispatchNotifierService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ procedure SendMessage(const aMessage: String);
+ end;
+
+implementation
+
+uses
+ {vcl:} SysUtils,
+ {RemObjects:} uROEventRepository, uRORes;
+
+{ CoDispatchNotifierService }
+
+class function CoDispatchNotifierService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IDispatchNotifierService;
+begin
+ result := TDispatchNotifierService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TDispatchNotifierService_Proxy }
+
+function TDispatchNotifierService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'DispatchNotifierService';
+end;
+
+procedure TDispatchNotifierService_Proxy.SendMessage(const aMessage: String);
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'DispatchNotifierLibrary', __InterfaceName, 'SendMessage');
+ __Message.Write('aMessage', TypeInfo(String), aMessage, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+initialization
+ RegisterProxyClass(IDispatchNotifierService_IID, TDispatchNotifierService_Proxy);
+
+
+finalization
+ UnregisterProxyClass(IDispatchNotifierService_IID);
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierLibrary_Invk.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierLibrary_Invk.pas
new file mode 100644
index 0000000..f46646b
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierLibrary_Invk.pas
@@ -0,0 +1,52 @@
+unit DispatchNotifierLibrary_Invk;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes,
+ {RemObjects:} uROServer, uROServerIntf, uROTypes, uROClientIntf,
+ {Generated:} DispatchNotifierLibrary_Intf;
+
+type
+ TDispatchNotifierService_Invoker = class(TROInvoker)
+ private
+ protected
+ published
+ procedure Invoke_SendMessage(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ end;
+
+implementation
+
+uses
+ {RemObjects:} uRORes, uROClient;
+
+{ TDispatchNotifierService_Invoker }
+
+procedure TDispatchNotifierService_Invoker.Invoke_SendMessage(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ procedure SendMessage(const aMessage: String); }
+var
+ aMessage: String;
+begin
+ try
+ __Message.Read('aMessage', TypeInfo(String), aMessage, []);
+
+ (__Instance as IDispatchNotifierService).SendMessage(aMessage);
+
+ __Message.InitializeResponseMessage(__Transport, 'DispatchNotifierLibrary', 'DispatchNotifierService', 'SendMessageResponse');
+ __Message.Finalize;
+
+ __oResponseOptions := [roNoResponse];
+
+ finally
+ end;
+end;
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierServer.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierServer.bdsproj
new file mode 100644
index 0000000..8fa0de6
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierServer.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {1339195C-0153-40FF-8B26-DD3C5897F27F}
+
+
+
+
+ DispatchNotifierServer.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierServer.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierServer.dpr
new file mode 100644
index 0000000..156fe35
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierServer.dpr
@@ -0,0 +1,19 @@
+program DispatchNotifierServer;
+
+{#ROGEN:DispatchNotifierLibrary.rodl} // RemObjects: Careful, do not remove!
+
+uses
+ Forms,
+ DispatchNotifierServerMain in 'DispatchNotifierServerMain.pas' {DispatchNotifierServerMainForm},
+ DispatchNotifierLibrary_Intf in 'DispatchNotifierLibrary_Intf.pas',
+ DispatchNotifierLibrary_Invk in 'DispatchNotifierLibrary_Invk.pas',
+ DispatchNotifierService_Impl in 'DispatchNotifierService_Impl.pas';
+
+{$R *.RES}
+{$R RODLFile.res}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TDispatchNotifierServerMainForm, DispatchNotifierServerMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierServer.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierServer.dproj
new file mode 100644
index 0000000..bcf9c37
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierServer.dproj
@@ -0,0 +1,75 @@
+
+
+ {5a41f262-8005-4c7d-bafd-92414f12f09e}
+ DispatchNotifierServer.dpr
+ Debug
+ AnyCPU
+ DCC32
+ DispatchNotifierServer.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ DispatchNotifierServer.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierServer.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierServer.res
new file mode 100644
index 0000000..b72ce48
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierServer.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierServerMain.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierServerMain.dfm
new file mode 100644
index 0000000..1df94ed
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierServerMain.dfm
@@ -0,0 +1,64 @@
+object DispatchNotifierServerMainForm: TDispatchNotifierServerMainForm
+ Left = 28
+ Top = 84
+ AutoScroll = False
+ Caption = 'Dispatch Notifier Server'
+ ClientHeight = 298
+ ClientWidth = 474
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ OldCreateOrder = False
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ PixelsPerInch = 96
+ TextHeight = 13
+ object ROPoweredByRemObjectsButton1: TROPoweredByRemObjectsButton
+ Left = 135
+ Top = 5
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ end
+ object Memo: TMemo
+ Left = 8
+ Top = 58
+ Width = 458
+ Height = 233
+ ReadOnly = True
+ ScrollBars = ssBoth
+ TabOrder = 0
+ end
+ object ROMessage: TROBinMessage
+ Left = 128
+ Top = 72
+ end
+ object ROIndyTCPServer: TROIndyTCPServer
+ Active = True
+ Dispatchers = <
+ item
+ Name = 'ROMessage'
+ Message = ROMessage
+ Enabled = True
+ end>
+ Port = 8099
+ Left = 192
+ Top = 72
+ end
+ object ROIndyHTTPServer: TROIndyHTTPServer
+ Active = True
+ Dispatchers = <
+ item
+ Name = 'ROMessage'
+ Message = ROMessage
+ Enabled = True
+ PathInfo = '/BIN'
+ end>
+ Port = 8090
+ Left = 160
+ Top = 72
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierServerMain.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierServerMain.pas
new file mode 100644
index 0000000..c055488
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierServerMain.pas
@@ -0,0 +1,53 @@
+unit DispatchNotifierServerMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ StdCtrls, uROClient, uROBINMessage, uROClientIntf, uROServer, uROIndyHTTPServer,
+ uROIndyTCPServer, SyncObjs, uROPoweredByRemObjectsButton;
+
+type
+ TDispatchNotifierServerMainForm = class(TForm)
+ ROMessage: TROBINMessage;
+ ROIndyTCPServer: TROIndyTCPServer;
+ Memo: TMemo;
+ ROIndyHTTPServer: TROIndyHTTPServer;
+ ROPoweredByRemObjectsButton1: TROPoweredByRemObjectsButton;
+ procedure FormCreate(Sender: TObject);
+ procedure FormDestroy(Sender: TObject);
+ private
+ CriticalSection: tCriticalSection;
+ public
+ procedure Log(const someText: string);
+ end;
+
+var
+ DispatchNotifierServerMainForm: TDispatchNotifierServerMainForm;
+
+implementation
+
+{$R *.DFM}
+
+procedure TDispatchNotifierServerMainForm.Log(const someText: string);
+begin
+ CriticalSection.Enter;
+ try
+ Memo.Lines.Add(someText);
+ finally
+ CriticalSection.Leave;
+ end;
+end;
+
+procedure TDispatchNotifierServerMainForm.FormCreate(Sender: TObject);
+begin
+ CriticalSection := TCriticalSection.Create;
+end;
+
+procedure TDispatchNotifierServerMainForm.FormDestroy(Sender: TObject);
+begin
+ CriticalSection.Free;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierService_Impl.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierService_Impl.pas
new file mode 100644
index 0000000..5a058f0
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/DispatchNotifierService_Impl.pas
@@ -0,0 +1,154 @@
+unit DispatchNotifierService_Impl;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ This is where you are supposed to code the implementation of your objects. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils,
+ {RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
+ {Generated:} DispatchNotifierLibrary_Intf;
+
+{
+ This example shows how to customize message dispatching.
+ IRODispatchNotifier is a special interface that TROInvoker classes know and look for.
+ If your server side object implements it, the IRODispatchNotifier.GetDispatchInfo
+ method will be called before the target method is invoked.
+
+ See TROInvoker.CustomHandleMessage in uROServer.pas
+
+ The TMyInvoker class shows how to enhance the interception mechanism by providing
+ support to a custom interface called ITestInterface.
+
+ Note how TROClassFactory.Create has been changed to use TMyInvoker.
+}
+
+type
+ { ITestInvokeInterface }
+ ITestInvokeInterface = interface
+ ['{CE51FFEF-D552-4712-B86D-166CEC29B737}']
+ procedure DoThis;
+ procedure DoThat;
+ end;
+
+ { TDispatchNotifierService }
+ TDispatchNotifierService = class(TRORemotable, IDispatchNotifierService, IRODispatchNotifier, ITestInvokeInterface)
+ private
+ protected
+ { IRODispatchNotifier }
+ procedure GetDispatchInfo(const aTransport: IROTransport; const aMessage: IROMessage);
+
+ { ITestInvokeInterface }
+ procedure DoThis;
+ procedure DoThat;
+
+ { IDispatchNotifierService methods }
+ procedure SendMessage(const aMessage: string);
+ end;
+
+implementation
+uses
+ {Generated:} DispatchNotifierLibrary_Invk, DispatchNotifierServerMain;
+
+procedure Create_DispatchNotifierService(out anInstance: IUnknown);
+begin
+ anInstance := TDispatchNotifierService.Create;
+end;
+
+type
+ TMyInvoker = class(TDispatchNotifierService_Invoker)
+ protected
+ procedure BeforeInvoke(aMethodPtr: TMessageInvokeMethod;
+ const anInstance: IInterface;
+ const aFactory: IROClassFactory;
+ const aMessage: IROMessage;
+ const aTransport: IROTransport); override;
+
+ procedure AfterInvoke(aMethodPtr: TMessageInvokeMethod;
+ const anInstance: IInterface;
+ const aFactory: IROClassFactory;
+ const aMessage: IROMessage;
+ const aTransport: IROTransport;
+ anException: Exception); override;
+ end;
+
+ { TMyInvoker }
+
+procedure TMyInvoker.AfterInvoke(aMethodPtr: TMessageInvokeMethod;
+ const anInstance: IInterface; const aFactory: IROClassFactory;
+ const aMessage: IROMessage; const aTransport: IROTransport;
+ anException: Exception);
+var
+ itestintf: ITestInvokeInterface;
+begin
+ inherited;
+
+ if Supports(anInstance, ITestInvokeInterface, itestintf) then itestintf.DoThis;
+end;
+
+procedure TMyInvoker.BeforeInvoke(aMethodPtr: TMessageInvokeMethod;
+ const anInstance: IInterface; const aFactory: IROClassFactory;
+ const aMessage: IROMessage; const aTransport: IROTransport);
+var
+ itestintf: ITestInvokeInterface;
+begin
+ inherited;
+
+ if Supports(anInstance, ITestInvokeInterface, itestintf) then itestintf.DoThat;
+end;
+
+{ DispatchNotifierService }
+
+procedure TDispatchNotifierService.DoThat;
+begin
+ DispatchNotifierServerMainForm.Log('Do that...');
+end;
+
+procedure TDispatchNotifierService.DoThis;
+begin
+ DispatchNotifierServerMainForm.Log('Do this...');
+end;
+
+procedure TDispatchNotifierService.GetDispatchInfo(
+ const aTransport: IROTransport; const aMessage: IROMessage);
+var
+ tcpinfo: IROTCPTransport;
+ textmessage: string;
+ streamaccess: IROStreamAccess;
+begin
+ if Supports(aTransport, IROTCPtransport, tcpinfo) then DispatchNotifierServerMainForm.Log('Client ' + tcpinfo.GetClientAddress + ' connected!');
+
+ with aTransport do
+ DispatchNotifierServerMainForm.Log('Got a reference to a ' + GetTransportObject.ClassName);
+
+ with aMessage do begin
+ DispatchNotifierServerMainForm.Log('About to invoke ' + InterfaceName + '.' + MessageName);
+
+ if (MessageName = 'SendMessage') then begin
+ aMessage.Read('aMessage', TypeInfo(string), textmessage, []);
+ DispatchNotifierServerMainForm.Log('The text message was "' + textmessage + '"');
+
+ { New RemObjects 4.0: now you can reset the position of the message stream }
+ if Supports(aMessage, IROStreamAccess, streamaccess) then streamaccess.Stream.Position := 0;
+ end;
+ end;
+
+ DispatchNotifierServerMainForm.Log('');
+end;
+
+procedure TDispatchNotifierService.SendMessage(const aMessage: string);
+begin
+ DispatchNotifierServerMainForm.Log('Received message "' + aMessage + '"');
+end;
+
+initialization
+ TROClassFactory.Create('DispatchNotifierService', Create_DispatchNotifierService, TMyInvoker);
+finalization
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/RODLFile.RES b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/RODLFile.RES
new file mode 100644
index 0000000..85d9e4e
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dispatch Notifier/RODLFile.RES differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequest.Sample.html b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequest.Sample.html
new file mode 100644
index 0000000..f7f7bdb
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequest.Sample.html
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+Dynamic Request Sample
+
+Purpose
+This example shows how to use the TRODynamicRequest component to execute server methods.
+
+Examine the Code
+
+ See how the three methods were defined by editing the service library.
+ Do this by making the server the selected project
+ and by using the menu option: RemObjects | Edit Service Library .
+ Note: if you don't see this menu option but see 'Service Builder' instead,
+ you still have the client set as the current project.
+ Examine the methods added to DynamicRequestService .
+ Check how the server methods were implemented in DynamicRequestService_Impl.pas .
+ See the simple code needed to invoke the methods in DynamicRequestClientMain.pas .
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequest.bdsgroup b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequest.bdsgroup
new file mode 100644
index 0000000..86bcc2d
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequest.bdsgroup
@@ -0,0 +1,20 @@
+
+
+
+
+ Default.Personality
+
+ 1.0
+ {EE1378C0-27D8-4649-AA55-9F6763115D4C}
+
+
+
+
+
+ DynamicRequestClient.bdsproj
+ DynamicRequestServer.bdsproj
+ DynamicRequestClient.exe DynamicRequestServer.exe
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequest.bpg b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequest.bpg
new file mode 100644
index 0000000..6bb4490
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequest.bpg
@@ -0,0 +1,23 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = DynamicRequestClient.exe DynamicRequestServer.exe
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+DynamicRequestClient.exe: DynamicRequestClient.dpr
+ $(DCC)
+
+DynamicRequestServer.exe: DynamicRequestServer.dpr
+ $(DCC)
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequest.groupproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequest.groupproj
new file mode 100644
index 0000000..a73080f
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequest.groupproj
@@ -0,0 +1,40 @@
+
+
+ {c6294125-5ef4-4e86-a9e4-372c2755e652}
+
+
+
+
+ Default.Personality
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestClient.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestClient.bdsproj
new file mode 100644
index 0000000..a9cb02c
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestClient.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {7EF79E4A-A53D-4EDD-B8FC-318D702FA71F}
+
+
+
+
+ DynamicRequestClient.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestClient.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestClient.dpr
new file mode 100644
index 0000000..5bad030
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestClient.dpr
@@ -0,0 +1,14 @@
+program DynamicRequestClient;
+
+uses
+ Forms,
+ DynamicRequestClientMain in 'DynamicRequestClientMain.pas' {DynamicRequestClientMainForm};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'Dynamic Request Client';
+ Application.CreateForm(TDynamicRequestClientMainForm, DynamicRequestClientMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestClient.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestClient.dproj
new file mode 100644
index 0000000..d3328f3
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestClient.dproj
@@ -0,0 +1,72 @@
+
+
+ {4be59863-64da-4c35-b5a2-7d126f6ad7d1}
+ DynamicRequestClient.dpr
+ Debug
+ AnyCPU
+ DCC32
+ DynamicRequestClient.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ DynamicRequestClient.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestClient.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestClient.res
new file mode 100644
index 0000000..90e4219
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestClient.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestClientMain.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestClientMain.dfm
new file mode 100644
index 0000000..ec75620
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestClientMain.dfm
@@ -0,0 +1,128 @@
+object DynamicRequestClientMainForm: TDynamicRequestClientMainForm
+ Left = 311
+ Top = 174
+ AutoScroll = False
+ Caption = 'Dynamic Request Client'
+ ClientHeight = 344
+ ClientWidth = 335
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ PixelsPerInch = 96
+ TextHeight = 13
+ object ROPoweredByRemObjectsButton1: TROPoweredByRemObjectsButton
+ Left = 50
+ Top = 279
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ Anchors = [akLeft, akBottom]
+ ApplicationType = atClient
+ end
+ object bSum: TButton
+ Left = 8
+ Top = 5
+ Width = 75
+ Height = 25
+ Caption = 'Sum'
+ TabOrder = 0
+ OnClick = bSumClick
+ end
+ object bGetServerTime: TButton
+ Left = 96
+ Top = 5
+ Width = 105
+ Height = 25
+ Caption = 'GetServerTime'
+ TabOrder = 1
+ OnClick = bGetServerTimeClick
+ end
+ object bEchoPerson: TButton
+ Left = 208
+ Top = 5
+ Width = 121
+ Height = 25
+ Caption = 'EchoPerson'
+ TabOrder = 2
+ OnClick = bEchoPersonClick
+ end
+ object Memo: TMemo
+ Left = 8
+ Top = 39
+ Width = 321
+ Height = 229
+ ScrollBars = ssVertical
+ TabOrder = 3
+ end
+ object DynamicRequestSum: TRODynamicRequest
+ RemoteService = RemoteService
+ MethodName = 'Sum'
+ Params = <
+ item
+ Name = 'A'
+ DataType = rtInteger
+ Flag = fIn
+ end
+ item
+ Name = 'B'
+ DataType = rtInteger
+ Flag = fIn
+ end
+ item
+ Name = 'Result'
+ DataType = rtInteger
+ Flag = fResult
+ end>
+ Left = 49
+ Top = 3
+ end
+ object EmptyDynamicRequest: TRODynamicRequest
+ RemoteService = RemoteService
+ MethodName = 'GetServerTime'
+ Params = <>
+ Left = 168
+ Top = 3
+ end
+ object DynamicRequestEchoPerson: TRODynamicRequest
+ RemoteService = RemoteService
+ MethodName = 'EchoPerson'
+ Params = <
+ item
+ Name = 'aPerson'
+ DataType = rtUserDefined
+ Flag = fIn
+ TypeName = 'TPerson'
+ end
+ item
+ Name = 'anotherPerson'
+ DataType = rtUserDefined
+ Flag = fOut
+ TypeName = 'TPerson'
+ end>
+ Left = 290
+ Top = 3
+ end
+ object ROWinInetHTTPChannel1: TROWinInetHTTPChannel
+ ServerLocators = <>
+ DispatchOptions = []
+ UserAgent = 'RemObjects SDK'
+ TargetURL = 'http://localhost:8099/BIN'
+ Left = 252
+ Top = 129
+ end
+ object ROBinMessage1: TROBinMessage
+ Left = 220
+ Top = 129
+ end
+ object RemoteService: TRORemoteService
+ Message = ROBinMessage1
+ Channel = ROWinInetHTTPChannel1
+ ServiceName = 'DynamicRequestService'
+ Left = 284
+ Top = 129
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestClientMain.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestClientMain.pas
new file mode 100644
index 0000000..09b2cf0
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestClientMain.pas
@@ -0,0 +1,107 @@
+unit DynamicRequestClientMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, uRODynamicRequest,
+ uROWinInetHttpChannel, uROClient, uROBINMessage, StdCtrls,
+ uROPoweredByRemObjectsButton, uRORemoteService;
+
+type
+ TDynamicRequestClientMainForm = class(TForm)
+ DynamicRequestSum: TRODynamicRequest;
+ bSum: TButton;
+ bGetServerTime: TButton;
+ EmptyDynamicRequest: TRODynamicRequest;
+ bEchoPerson: TButton;
+ DynamicRequestEchoPerson: TRODynamicRequest;
+ ROWinInetHTTPChannel1: TROWinInetHTTPChannel;
+ ROBinMessage1: TROBinMessage;
+ ROPoweredByRemObjectsButton1: TROPoweredByRemObjectsButton;
+ RemoteService: TRORemoteService;
+ Memo: TMemo;
+ procedure bSumClick(Sender: TObject);
+ procedure bGetServerTimeClick(Sender: TObject);
+ procedure bEchoPersonClick(Sender: TObject);
+ private
+ { Private declarations }
+ procedure Log(str: string);
+ public
+ { Public declarations }
+ end;
+
+var
+ DynamicRequestClientMainForm: TDynamicRequestClientMainForm;
+
+implementation
+
+uses DynamicRequestLibrary_Intf;
+
+{$R *.dfm}
+
+procedure TDynamicRequestClientMainForm.bSumClick(Sender: TObject);
+begin
+ with DynamicRequestSum do begin
+ ParamByName('A').AsInteger := 1;
+ ParamByName('B').AsInteger := 2;
+ Log('Sum');
+ Log('--------');
+ Log('sending:' + #9 + ParamByName('A').AsString + ' ' + ParamByName('B').AsString);
+ Execute;
+ Log('received:' + #9 + ParamByName('result').AsString);
+ Log('');
+ end;
+end;
+
+procedure TDynamicRequestClientMainForm.bGetServerTimeClick(Sender: TObject);
+begin
+ with EmptyDynamicRequest do begin
+ MethodName := 'GetServerTime';
+ Params.Refresh;
+
+ Execute;
+ Log('GetServerTime');
+ Log('------------------------');
+ Log('received:' + #9 + ParamByName('result').AsString);
+ Log('');
+ end;
+end;
+
+procedure TDynamicRequestClientMainForm.bEchoPersonClick(Sender: TObject);
+var
+ aperson, anotherperson: TPerson;
+begin
+ aperson := TPerson.Create;
+ with DynamicRequestEchoPerson do try
+ aperson.FirstName := 'John';
+ aperson.LastName := 'Smith';
+
+ Log('EchoPerson');
+ Log('-------------------');
+
+ with aperson do
+ Log('sending:' + #9 + Firstname + ' ' + LastName);
+
+ ParamByName('aPerson').AsComplexType := aperson;
+ Execute;
+ anotherperson := ParamByName('anotherPerson').AsComplexType as TPerson;
+ if Assigned(anotherperson) then try
+ Log('received:' + #9 + anotherperson.Firstname + ' ' + anotherperson.LastName);
+ finally
+ FreeAndNIL(anotherperson);
+ end;
+ ParamByName('anotherPerson').AsComplexType := nil;
+ Log('');
+ finally
+ FreeAndNIL(aperson);
+ end;
+end;
+
+procedure TDynamicRequestClientMainForm.Log(str: string);
+begin
+ Memo.Lines.Add(str);
+end;
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestLibrary.rodl b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestLibrary.rodl
new file mode 100644
index 0000000..a4294c8
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestLibrary.rodl
@@ -0,0 +1,69 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestLibrary_Intf.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestLibrary_Intf.pas
new file mode 100644
index 0000000..d28dc35
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestLibrary_Intf.pas
@@ -0,0 +1,203 @@
+unit DynamicRequestLibrary_Intf;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROClasses, uROClient, uROTypes, uROClientIntf;
+
+const
+ { Library ID }
+ LibraryUID = '{D9821C1A-A084-4120-93F3-BCE6CF2AE0F4}';
+
+ { Service Interface ID's }
+ IDynamicRequestService_IID : TGUID = '{D9821C1A-A084-4120-93F3-BCE6CF2AE0F4}';
+
+ { Event ID's }
+
+type
+ { Forward declarations }
+ IDynamicRequestService = interface;
+
+ TPerson = class;
+
+
+ { Enumerateds }
+ TSex = (sxMale,sxFemale);
+
+ { TPerson }
+ TPerson = class(TROComplexType)
+ private
+ fFirstName: String;
+ fLastName: String;
+ fAge: Integer;
+ fSex: TSex;
+ public
+ procedure Assign(iSource: TPersistent); override;
+ published
+ property FirstName:String read fFirstName write fFirstName;
+ property LastName:String read fLastName write fLastName;
+ property Age:Integer read fAge write fAge;
+ property Sex:TSex read fSex write fSex;
+ end;
+
+ { TPersonCollection }
+ TPersonCollection = class(TROCollection)
+ protected
+ constructor Create(aItemClass: TCollectionItemClass); overload;
+ function GetItems(Index: integer): TPerson;
+ procedure SetItems(Index: integer; const Value: TPerson);
+ public
+ constructor Create; overload;
+ function Add: TPerson; reintroduce;
+ property Items[Index: integer]:TPerson read GetItems write SetItems; default;
+ end;
+
+ { IDynamicRequestService }
+ IDynamicRequestService = interface
+ ['{D9821C1A-A084-4120-93F3-BCE6CF2AE0F4}']
+ function Sum(const A: Integer; const B: Integer): Integer;
+ function GetServerTime: DateTime;
+ procedure EchoPerson(const aPerson: TPerson; out anotherPerson: TPerson);
+ end;
+
+ { CoDynamicRequestService }
+ CoDynamicRequestService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IDynamicRequestService;
+ end;
+
+ { TDynamicRequestService_Proxy }
+ TDynamicRequestService_Proxy = class(TROProxy, IDynamicRequestService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ function Sum(const A: Integer; const B: Integer): Integer;
+ function GetServerTime: DateTime;
+ procedure EchoPerson(const aPerson: TPerson; out anotherPerson: TPerson);
+ end;
+
+implementation
+
+uses
+ {vcl:} SysUtils,
+ {RemObjects:} uROEventRepository, uRORes;
+
+{ TPerson }
+
+procedure TPerson.Assign(iSource: TPersistent);
+var lSource:TPerson;
+begin
+ inherited Assign(iSource);
+ if (iSource is TPerson) then begin
+ lSource := TPerson(iSource);
+ FirstName := lSource.FirstName;
+ LastName := lSource.LastName;
+ Age := lSource.Age;
+ Sex := lSource.Sex;
+ end;
+end;
+
+{ TPersonCollection }
+constructor TPersonCollection.Create;
+begin
+ inherited Create(TPerson);
+end;
+
+constructor TPersonCollection.Create(aItemClass: TCollectionItemClass);
+begin
+ inherited Create(aItemClass);
+end;
+
+function TPersonCollection.Add: TPerson;
+begin
+ result := TPerson(inherited Add);
+end;
+
+function TPersonCollection.GetItems(Index: integer): TPerson;
+begin
+ result := TPerson(inherited Items[Index]);
+end;
+
+procedure TPersonCollection.SetItems(Index: integer; const Value: TPerson);
+begin
+ TPerson(inherited Items[Index]).Assign(Value);
+end;
+
+{ CoDynamicRequestService }
+
+class function CoDynamicRequestService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IDynamicRequestService;
+begin
+ result := TDynamicRequestService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TDynamicRequestService_Proxy }
+
+function TDynamicRequestService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'DynamicRequestService';
+end;
+
+function TDynamicRequestService_Proxy.Sum(const A: Integer; const B: Integer): Integer;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'DynamicRequestLibrary', __InterfaceName, 'Sum');
+ __Message.Write('A', TypeInfo(Integer), A, []);
+ __Message.Write('B', TypeInfo(Integer), B, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Integer), result, []);
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+function TDynamicRequestService_Proxy.GetServerTime: DateTime;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'DynamicRequestLibrary', __InterfaceName, 'GetServerTime');
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(DateTime), result, [paIsDateTime]);
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+procedure TDynamicRequestService_Proxy.EchoPerson(const aPerson: TPerson; out anotherPerson: TPerson);
+begin
+ try
+ anotherPerson := nil;
+ __Message.InitializeRequestMessage(__TransportChannel, 'DynamicRequestLibrary', __InterfaceName, 'EchoPerson');
+ __Message.Write('aPerson', TypeInfo(DynamicRequestLibrary_Intf.TPerson), aPerson, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('anotherPerson', TypeInfo(DynamicRequestLibrary_Intf.TPerson), anotherPerson, []);
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+initialization
+ RegisterROClass(TPerson);
+ RegisterProxyClass(IDynamicRequestService_IID, TDynamicRequestService_Proxy);
+
+
+finalization
+ UnregisterROClass(TPerson);
+ UnregisterProxyClass(IDynamicRequestService_IID);
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestLibrary_Invk.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestLibrary_Invk.pas
new file mode 100644
index 0000000..57a60be
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestLibrary_Invk.pas
@@ -0,0 +1,101 @@
+unit DynamicRequestLibrary_Invk;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes,
+ {RemObjects:} uROServer, uROServerIntf, uROTypes, uROClientIntf,
+ {Generated:} DynamicRequestLibrary_Intf;
+
+type
+ TDynamicRequestService_Invoker = class(TROInvoker)
+ private
+ protected
+ published
+ procedure Invoke_Sum(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_GetServerTime(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_EchoPerson(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ end;
+
+implementation
+
+uses
+ {RemObjects:} uRORes, uROClient;
+
+{ TDynamicRequestService_Invoker }
+
+procedure TDynamicRequestService_Invoker.Invoke_Sum(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function Sum(const A: Integer; const B: Integer): Integer; }
+var
+ A: Integer;
+ B: Integer;
+ lResult: Integer;
+begin
+ try
+ __Message.Read('A', TypeInfo(Integer), A, []);
+ __Message.Read('B', TypeInfo(Integer), B, []);
+
+ lResult := (__Instance as IDynamicRequestService).Sum(A, B);
+
+ __Message.InitializeResponseMessage(__Transport, 'DynamicRequestLibrary', 'DynamicRequestService', 'SumResponse');
+ __Message.Write('Result', TypeInfo(Integer), lResult, []);
+ __Message.Finalize;
+
+ finally
+ end;
+end;
+
+procedure TDynamicRequestService_Invoker.Invoke_GetServerTime(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function GetServerTime: DateTime; }
+var
+ lResult: DateTime;
+begin
+ try
+ lResult := (__Instance as IDynamicRequestService).GetServerTime;
+
+ __Message.InitializeResponseMessage(__Transport, 'DynamicRequestLibrary', 'DynamicRequestService', 'GetServerTimeResponse');
+ __Message.Write('Result', TypeInfo(DateTime), lResult, [paIsDateTime]);
+ __Message.Finalize;
+
+ finally
+ end;
+end;
+
+procedure TDynamicRequestService_Invoker.Invoke_EchoPerson(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ procedure EchoPerson(const aPerson: TPerson; out anotherPerson: TPerson); }
+var
+ aPerson: DynamicRequestLibrary_Intf.TPerson;
+ anotherPerson: DynamicRequestLibrary_Intf.TPerson;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ aPerson := nil;
+ anotherPerson := nil;
+ try
+ __Message.Read('aPerson', TypeInfo(DynamicRequestLibrary_Intf.TPerson), aPerson, []);
+
+ (__Instance as IDynamicRequestService).EchoPerson(aPerson, anotherPerson);
+
+ __Message.InitializeResponseMessage(__Transport, 'DynamicRequestLibrary', 'DynamicRequestService', 'EchoPersonResponse');
+ __Message.Write('anotherPerson', TypeInfo(DynamicRequestLibrary_Intf.TPerson), anotherPerson, []);
+ __Message.Finalize;
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(aPerson);
+ __lObjectDisposer.Add(anotherPerson);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestServer.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestServer.bdsproj
new file mode 100644
index 0000000..84ae1ea
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestServer.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {9A6F66A5-FAAF-4371-BF9F-51D5EAAB7441}
+
+
+
+
+ DynamicRequestServer.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestServer.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestServer.dpr
new file mode 100644
index 0000000..9fda2fa
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestServer.dpr
@@ -0,0 +1,20 @@
+program DynamicRequestServer;
+
+{#ROGEN:DynamicRequestLibrary.rodl} // RemObjects: Careful, do not remove!
+
+uses
+ Forms,
+ DynamicRequestServerMain in 'DynamicRequestServerMain.pas' {DynamicRequestServerMainForm},
+ DynamicRequestLibrary_Intf in 'DynamicRequestLibrary_Intf.pas',
+ DynamicRequestLibrary_Invk in 'DynamicRequestLibrary_Invk.pas',
+ DynamicRequestService_Impl in 'DynamicRequestService_Impl.pas';
+
+{$R *.RES}
+{$R RODLFile.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'Dynamic Request Server';
+ Application.CreateForm(TDynamicRequestServerMainForm, DynamicRequestServerMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestServer.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestServer.dproj
new file mode 100644
index 0000000..3105dc6
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestServer.dproj
@@ -0,0 +1,75 @@
+
+
+ {d016a1fd-5969-4cfb-8c2e-5286b5514461}
+ DynamicRequestServer.dpr
+ Debug
+ AnyCPU
+ DCC32
+ DynamicRequestServer.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ DynamicRequestServer.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestServer.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestServer.res
new file mode 100644
index 0000000..aa9db5a
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestServer.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestServerMain.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestServerMain.dfm
new file mode 100644
index 0000000..e9cdb25
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestServerMain.dfm
@@ -0,0 +1,40 @@
+object DynamicRequestServerMainForm: TDynamicRequestServerMainForm
+ Left = 65
+ Top = 31
+ BorderStyle = bsDialog
+ Caption = 'Dynamic Request Server'
+ ClientHeight = 61
+ ClientWidth = 228
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ PixelsPerInch = 96
+ TextHeight = 13
+ object RoPoweredByRemObjectsButton1: TROPoweredByRemObjectsButton
+ Left = 9
+ Top = 4
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ end
+ object BINMessage: TROBinMessage
+ Left = 40
+ end
+ object IndyHttpServer: TROIndyHTTPServer
+ Dispatchers = <
+ item
+ Name = 'BINMessage'
+ Message = BINMessage
+ Enabled = True
+ PathInfo = '/BIN'
+ end>
+ Port = 8099
+ Left = 80
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestServerMain.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestServerMain.pas
new file mode 100644
index 0000000..82460e0
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestServerMain.pas
@@ -0,0 +1,36 @@
+unit DynamicRequestServerMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Forms, Graphics, uROClient, uROServer,
+ uROIndyTCPServer, uROIndyHTTPServer, uROBinMessage, Controls,
+ uROPoweredByRemObjectsButton;
+
+type
+ TDynamicRequestServerMainForm = class(TForm)
+ BINMessage: TROBINMessage;
+ IndyHttpServer: TROIndyHTTPServer;
+ RoPoweredByRemObjectsButton1: TRoPoweredByRemObjectsButton;
+ procedure FormCreate(Sender: TObject);
+ private
+ protected
+ public
+ end;
+
+var
+ DynamicRequestServerMainForm : TDynamicRequestServerMainForm;
+
+implementation
+
+uses DynamicRequestLibrary_Intf;
+
+{$R *.DFM}
+
+procedure TDynamicRequestServerMainForm.FormCreate(Sender: TObject);
+begin
+ IndyHttpServer.Active := True;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestService_Impl.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestService_Impl.pas
new file mode 100644
index 0000000..b149578
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/DynamicRequestService_Impl.pas
@@ -0,0 +1,66 @@
+unit DynamicRequestService_Impl;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ This is where you are supposed to code the implementation of your objects. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils,
+ {RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
+ {Generated:} DynamicRequestLibrary_Intf;
+
+type
+ { TDynamicRequestService }
+ TDynamicRequestService = class(TRORemotable, IDynamicRequestService)
+ private
+ protected
+ { IDynamicRequestService methods }
+ function Sum(const A: Integer; const B: Integer): Integer;
+ function GetServerTime: DateTime;
+ procedure EchoPerson(const aPerson: TPerson; out anotherPerson: TPerson);
+ end;
+
+implementation
+
+uses
+ {Generated:} DynamicRequestLibrary_Invk;
+
+procedure Create_DynamicRequestService(out anInstance: IUnknown);
+begin
+ anInstance := TDynamicRequestService.Create;
+end;
+
+{ DynamicRequestService }
+
+function TDynamicRequestService.Sum(const A: Integer; const B: Integer): Integer;
+begin
+ result := A + B;
+end;
+
+function TDynamicRequestService.GetServerTime: DateTime;
+begin
+ result := Now;
+end;
+
+procedure TDynamicRequestService.EchoPerson(const aPerson: TPerson; out anotherPerson: TPerson);
+begin
+ anotherPerson := TPerson.Create;
+
+ anotherPerson.FirstName := aPerson.FirstName;
+ anotherPerson.LastName := aPerson.LastName;
+ anotherPerson.Age := aPerson.Age;
+ anotherPerson.Sex := aPerson.Sex;
+end;
+
+initialization
+ TROClassFactory.Create('DynamicRequestService', Create_DynamicRequestService, TDynamicRequestService_Invoker);
+
+finalization
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/RODLFile.RES b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/RODLFile.RES
new file mode 100644
index 0000000..2a83e13
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Dynamic Request/RODLFile.RES differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/DownloadFiles/create.dir b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/DownloadFiles/create.dir
new file mode 100644
index 0000000..e69de29
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransfer.Sample.html b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransfer.Sample.html
new file mode 100644
index 0000000..14ed3a2
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransfer.Sample.html
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+ Extended File Transfer
+
+
+
+Purpose
+
+This example shows how to transfer files to and from a RemObjects SDK Server in chunks and how to monitor new files via server events.
+
+
+ Running the Sample
+
+ Build or Compile both projects.
+ Launch the server (note that you can modify the upload folder if you wish).
+ Open at least two clients.
+
+
+ To see exactly what is happening, it is best to change the Download folders so that
+ each client has its own.
+
+ When a file (or files) are uploaded via one client, they are then downloaded to
+ the other clients.
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransfer.bdsgroup b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransfer.bdsgroup
new file mode 100644
index 0000000..d517af0
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransfer.bdsgroup
@@ -0,0 +1,20 @@
+
+
+
+
+ Default.Personality
+
+ 1.0
+ {499105E9-0D39-4858-BC08-E0413F1F3B9A}
+
+
+
+
+
+ ExtendedFileTransferServer.bdsproj
+ ExtendedFileTransferClient.bdsproj
+ ExtendedFileTransferServer.exe ExtendedFileTransferClient.exe
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransfer.bpg b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransfer.bpg
new file mode 100644
index 0000000..31aeef2
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransfer.bpg
@@ -0,0 +1,23 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = ExtendedFileTransferServer.exe ExtendedFileTransferClient.exe
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+ExtendedFileTransferServer.exe: ExtendedFileTransferServer.dpr
+ $(DCC)
+
+ExtendedFileTransferClient.exe: ExtendedFileTransferClient.dpr
+ $(DCC)
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransfer.groupproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransfer.groupproj
new file mode 100644
index 0000000..c588feb
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransfer.groupproj
@@ -0,0 +1,40 @@
+
+
+ {93abbe12-86eb-458d-b59c-b049b9510415}
+
+
+
+
+ Default.Personality
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferClient.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferClient.bdsproj
new file mode 100644
index 0000000..01fbbff
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferClient.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {32D5DBFD-A696-4B32-995D-36F3A9CEDD6F}
+
+
+
+
+ ExtendedFileTransferClient.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferClient.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferClient.dpr
new file mode 100644
index 0000000..c3814fd
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferClient.dpr
@@ -0,0 +1,17 @@
+program ExtendedFileTransferClient;
+
+uses
+ uROComInit,
+ Forms,
+ ExtendedFileTransferClientMain in 'ExtendedFileTransferClientMain.pas' {ExtendedFileTransferClientMainForm},
+ ExtendedFileTransferClientUploadThread in 'ExtendedFileTransferClientUploadThread.pas',
+ ExtendedFileTransferClientDownloadThread in 'ExtendedFileTransferClientDownloadThread.pas';
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'Extended File Transfer Client';
+ Application.CreateForm(TExtendedFileTransferClientMainForm, ExtendedFileTransferClientMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferClient.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferClient.dproj
new file mode 100644
index 0000000..26ef57a
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferClient.dproj
@@ -0,0 +1,74 @@
+
+
+ {9c87266b-b313-4bbb-b6cf-6e7371bfc3cc}
+ ExtendedFileTransferClient.dpr
+ Debug
+ AnyCPU
+ DCC32
+ ExtendedFileTransferClient.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ ExtendedFileTransferClient.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferClient.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferClient.res
new file mode 100644
index 0000000..90e4219
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferClient.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferClientDownloadThread.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferClientDownloadThread.pas
new file mode 100644
index 0000000..c8c8e79
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferClientDownloadThread.pas
@@ -0,0 +1,199 @@
+unit ExtendedFileTransferClientDownloadThread;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls,
+ uROClient, uROClientIntf, uRORemoteService, uROBinMessage,
+ uROIndyTCPChannel, uROIndyHTTPChannel,
+ ExtendedFileTransferLibrary_Intf, uROTypes;
+
+type
+
+ { TROThread }
+ TDownloadThread = class(TThread)
+ private
+ fROMessage: TROBinMessage;
+ fROChannel: TROIndyHTTPChannel;
+ fRORemoteService: TRORemoteService;
+ fOnAbort: TNotifyEvent;
+ fOnFinished: TNotifyEvent;
+ fOnProgress: TNotifyEvent;
+ fOnStartDownload: TNotifyEvent;
+ fOnError: TNotifyEvent;
+ fDownloadOK: Boolean;
+ fCurrentBytePos: Int64;
+ fTimeStarted: TDateTime;
+ fDownloadDir: string;
+ fFileService: IExtendedFileTransferService;
+ fErrortext: string;
+ fFileName: string;
+ fFileSize: Int64;
+ fInfoStr: string;
+ fMaxConnectionErrors, fChannelErrorscount: Integer;
+
+ procedure RunDownload;
+ procedure ROIndyChannelFailure(Sender: TROTransportChannel;
+ anException: Exception; var Retry: Boolean);
+ procedure Run;
+
+ protected
+ public
+ property DownloadOK: Boolean read fDownloadOK;
+ property FileName: string read fFileName;
+ property FileSize: Int64 read fFileSize;
+ property InfoStr: string read fInfoStr;
+ property ErrorText: string read fErrortext;
+ property CurrentBytePos: Int64 read fCurrentBytePos;
+ property TimeStarted: TDateTime read fTimeStarted;
+ constructor Create(aDownloadDir, aFilename: string; aFileSize: Int64;
+ aOnStartDownload, aOnProgress, aOnFinished, aOnAbort, aOnError:
+ TNotifyEvent);
+ destructor Destroy; override;
+
+ procedure Execute; override;
+ end;
+
+implementation
+uses ExtendedFileTransferClientMain;
+
+{ TROThread }
+
+constructor TDownloadThread.Create(aDownloadDir, aFilename: string; aFileSize:
+ Int64; aOnStartDownload, aOnProgress, aOnFinished, aOnAbort, aOnError:
+ TNotifyEvent);
+begin
+ inherited Create(TRUE);
+ fDownloadDir := aDownloadDir;
+ fFilename := aFilename;
+ fFileSize := aFileSize;
+ fmaxconnectionerrors := 5; //try 5 times on channel-error
+
+ fROMessage := TROBinMessage.Create(nil);
+
+ fROChannel := TROIndyHTTPChannel.Create(nil);
+ fROChannel.OnFailure := ROIndyChannelFailure;
+ fROChannel.TargetURL := ExtendedFileTransferClientMainForm.ROChannel.TargetURL;
+ fRORemoteService := TRORemoteService.Create(nil);
+
+ fRORemoteService.Channel := fROChannel;
+ fRORemoteService.Message := fROMessage;
+ fRORemoteService.ServiceName := 'ExtendedFileTransferService';
+ fFileService := fRORemoteService as IExtendedFileTransferService;
+
+ if assigned(aOnAbort) then fOnAbort := aOnAbort;
+ if assigned(aOnFinished) then fOnFinished := aOnFinished;
+ if assigned(aOnProgress) then fOnProgress := aOnProgress;
+ if assigned(aOnStartDownload) then fOnStartDownload := aOnStartDownload;
+ if assigned(aOnError) then fOnError := aOnError;
+ FreeOnTerminate:=True;
+ Resume;
+end;
+
+destructor TDownloadThread.Destroy;
+begin
+ fFileService := nil;
+ FreeAndNil(fROMessage);
+ FreeAndNil(fROChannel);
+ FreeAndNil(fRORemoteService);
+ inherited;
+end;
+
+procedure TDownloadThread.Execute;
+begin
+ Run;
+end;
+
+procedure TDownloadThread.Run;
+begin
+ try
+ RunDownload;
+ finally
+ if assigned(fOnFinished) then fOnFinished(Self);
+ end;
+end;
+
+procedure TDownloadThread.RunDownload;
+var
+ NewFile: TMemoryStream;
+ Chunk: Binary;
+ Sequence: Integer;
+begin
+ fDownloadOK := false;
+ Chunk := nil;
+ try
+ if Terminated then begin
+ if assigned(fOnAbort) then fOnAbort(Self);
+ exit;
+ end;
+
+ NewFile := TMemoryStream.Create;
+ try
+ fCurrentBytePos := 0;
+ Sequence := 1;
+ fTimeStarted := Now;
+
+ fFileService.downloadsequence(fFilename, Sequence, chunk, fFileSize);
+
+ fInfoStr := DateTimetoStr(fTimeStarted) + ' ' +
+ ExtractFileName(fFilename) + ' ' +
+ FloatToStrF(fFilesize / 1024, fffixed, 15, 1) + ' KB';
+
+ if assigned(fOnStartDownload) then
+ fOnStartDownload(Self);
+ while (chunk <> nil) and (Chunk.Size > 0) do begin
+ if Terminated then begin
+ FreeAndNil(Chunk);
+ if assigned(fOnAbort) then fOnAbort(Self);
+ exit;
+ end;
+
+ NewFile.Seek(0, soFromEnd);
+ NewFile.CopyFrom(Chunk, Chunk.Size);
+ Inc(fCurrentBytePos, Chunk.Size);
+
+ FreeAndNil(Chunk);
+
+ if assigned(fOnProgress) then
+ fOnProgress(Self);
+ Inc(Sequence);
+ fFileService.downloadsequence(fFilename, Sequence, chunk, fFileSize);
+ end;
+
+ fDownloadOK := (NewFile.Size = 0) or (fFileSize = CurrentBytePos);
+
+ if fDownloadOK then begin
+ NewFile.SaveToFile(IncludeTrailingPathDelimiter(fDownloadDir) + fFilename);
+ fDownloadOK := Fileexists(IncludeTrailingPathDelimiter(fDownloadDir) + fFilename);
+ end;
+
+ finally
+ FreeAndNil(Chunk);
+ NewFile.Free;
+ end;
+
+ except
+ on e: Exception do begin
+ fErrorText := e.Message;
+ fDownloadOK := false;
+ if assigned(fOnError) then fOnError(Self);
+ end;
+ end;
+end;
+
+procedure TDownloadThread.ROIndyChannelFailure(Sender: TROTransportChannel;
+ anException: Exception; var Retry: Boolean);
+begin
+ if fChannelErrorscount > fMaxConnectionerrors then begin
+ fErrorText := anException.Message;
+ Self.terminate;
+ end
+ else begin
+ inc(fChannelErrorscount);
+ sleep(1000);
+ Retry := true;
+ end;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferClientMain.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferClientMain.dfm
new file mode 100644
index 0000000..3623bc3
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferClientMain.dfm
@@ -0,0 +1,95 @@
+object ExtendedFileTransferClientMainForm: TExtendedFileTransferClientMainForm
+ Left = 451
+ Top = 393
+ ActiveControl = UploadButton
+ AutoScroll = False
+ Caption = 'Extended File Transfer Client'
+ ClientHeight = 369
+ ClientWidth = 615
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Label4: TLabel
+ Left = 7
+ Top = 9
+ Width = 80
+ Height = 13
+ Caption = 'Download folder:'
+ end
+ object UploadButton: TButton
+ Left = 222
+ Top = 343
+ Width = 171
+ Height = 22
+ Anchors = [akLeft, akBottom]
+ Caption = 'Upload to other client(s)'
+ TabOrder = 3
+ OnClick = UploadButtonClick
+ end
+ object eFolder: TEdit
+ Left = 91
+ Top = 5
+ Width = 486
+ Height = 21
+ Anchors = [akLeft, akTop, akRight]
+ Color = clBtnFace
+ ReadOnly = True
+ TabOrder = 0
+ end
+ object bSelectFolder: TButton
+ Left = 583
+ Top = 4
+ Width = 22
+ Height = 22
+ Anchors = [akTop, akRight]
+ Caption = '...'
+ TabOrder = 1
+ OnClick = bSelectFolderClick
+ end
+ object Memo: TMemo
+ Left = 0
+ Top = 29
+ Width = 615
+ Height = 310
+ Align = alCustom
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ ScrollBars = ssBoth
+ TabOrder = 2
+ end
+ object ROMessage: TROBinMessage
+ Left = 95
+ Top = 120
+ end
+ object ROChannel: TROWinInetHTTPChannel
+ ServerLocators = <>
+ DispatchOptions = []
+ UserAgent = 'RemObjects SDK'
+ TargetURL = 'http://localhost:8099/BIN'
+ Left = 67
+ Top = 120
+ end
+ object RORemoteService: TRORemoteService
+ Message = ROMessage
+ Channel = ROChannel
+ ServiceName = 'ExtendedFileTransferService'
+ Left = 123
+ Top = 120
+ end
+ object EventReceiver: TROEventReceiver
+ Interval = 1200
+ Message = ROMessage
+ Channel = ROChannel
+ ServiceName = 'ExtendedFileTransferService'
+ Left = 152
+ Top = 121
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferClientMain.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferClientMain.pas
new file mode 100644
index 0000000..718d7ec
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferClientMain.pas
@@ -0,0 +1,239 @@
+{ Extented FileTransfer-Example by Joe Blocher (www.myticket.at)
+ based on
+ Remobjects: Filetransfer-Example, Threads-Example
+ Eric Hill (TeamRO): Block-Transfer
+
+ * Simultanous uploading files using threads (Multiselect in OpenDialog)
+ * All other clients will start download automatically
+}
+
+unit ExtendedFileTransferClientMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
+ uROClient, uROClientIntf, uRORemoteService, uROBinMessage, uROWinInetHTTPChannel,
+ Buttons, SyncObjs, ExtendedFileTransferLibrary_Intf,
+ uROEventRepository;
+
+type
+ TExtendedFileTransferClientMainForm = class(TForm, IFileEvents)
+ ROMessage: TROBinMessage;
+ ROChannel: TROWinInetHTTPChannel;
+ RORemoteService: TRORemoteService;
+ UploadButton: TButton;
+ EventReceiver: TROEventReceiver;
+ Label4: TLabel;
+ eFolder: TEdit;
+ bSelectFolder: TButton;
+ Memo: TMemo;
+ procedure FormCreate(Sender: TObject);
+ procedure FormDestroy(Sender: TObject);
+ procedure UploadButtonClick(Sender: TObject);
+ procedure bSelectFolderClick(Sender: TObject);
+ private
+ { Private declarations }
+ fCritical: TCriticalSection;
+ fFileService: IExtendedFileTransferService;
+ procedure Log(Mes: string);
+ procedure OnDownloadAborted(Sender: TObject);
+ procedure OnDownloadError(Sender: TObject);
+ procedure OnDownloadFinished(Sender: TObject);
+ procedure OnDownloadProgress(Sender: TObject);
+ procedure OnDownloadStarted(Sender: TObject);
+ procedure OnUploadAborted(Sender: TObject);
+ procedure OnUploadError(Sender: TObject);
+ procedure OnUploadFinished(Sender: TObject);
+ procedure OnUploadProgress(Sender: TObject);
+ procedure OnUploadStarted(Sender: TObject);
+ {IFileEvents}
+ procedure OnNewFileAvailable(const filename: string; const filesize: Int64);
+ public
+ { Public declarations }
+ end;
+
+var
+ ExtendedFileTransferClientMainForm: TExtendedFileTransferClientMainForm;
+
+implementation
+uses
+ FileCtrl,
+ ExtendedFileTransferClientUploadThread,
+ ExtendedFileTransferClientDownloadThread;
+
+{$R *.dfm}
+
+procedure TExtendedFileTransferClientMainForm.FormCreate(Sender: TObject);
+begin
+ fCritical := TCriticalSection.create;
+ eFolder.Text := ExtractFilePath(Paramstr(0)) + 'DownloadFiles\';
+ ForceDirectories(eFolder.Text);
+ fFileService := RORemoteService as IExtendedFileTransferService;
+ EventReceiver.RegisterEventHandlers([EID_FileEvents], [Self]);
+ EventReceiver.Active := True;
+end;
+
+procedure TExtendedFileTransferClientMainForm.FormDestroy(Sender: TObject);
+begin
+ try
+ EventReceiver.Active := False;
+ EventReceiver.UnregisterEventHandlers([EID_FileEvents]);
+ finally
+ fFileService := nil;
+ fCritical.Free;
+ end;
+end;
+
+procedure TExtendedFileTransferClientMainForm.OnDownloadAborted(Sender: TObject);
+begin
+ fCritical.Enter;
+ with Sender as TDownloadThread do try
+ // Do something
+ finally
+ fCritical.Leave;
+ end;
+end;
+
+procedure TExtendedFileTransferClientMainForm.OnDownloadError(Sender: TObject);
+
+begin
+ fCritical.Enter;
+ with Sender as TDownloadThread do try
+ Log('Download ' + Filename + ': ' + Errortext);
+ finally
+ fCritical.Leave;
+ end;
+end;
+
+procedure TExtendedFileTransferClientMainForm.OnDownloadStarted(Sender: TObject);
+begin
+ fCritical.Enter;
+ with Sender as TDownloadThread do try
+ Log(InfoStr + ': Download started');
+ //Do something other: create new Progressbar (Max = FileSize .... )
+ finally
+ fCritical.Leave;
+ end;
+end;
+
+procedure TExtendedFileTransferClientMainForm.OnDownloadProgress(Sender: TObject);
+begin
+ fCritical.Enter;
+ try
+ //Update Progressbar .... Use CurrentBytePos
+ finally
+ fCritical.Leave;
+ end;
+end;
+
+procedure TExtendedFileTransferClientMainForm.OnDownloadFinished(Sender: TObject);
+begin
+ fCritical.Enter;
+ with Sender as TDownloadThread do try
+ if DownloadOK then begin
+ Log(InfoStr + ': Download finished');
+ end;
+ finally
+ fCritical.Leave;
+ end;
+end;
+
+procedure TExtendedFileTransferClientMainForm.OnUploadAborted(Sender: TObject);
+begin
+ fCritical.Enter;
+ with Sender as TUploadThread do try
+ // Do something -> Add Serviceoperation: Delete File ....
+ finally
+ fCritical.Leave;
+ end;
+end;
+
+procedure TExtendedFileTransferClientMainForm.OnUploadError(Sender: TObject);
+
+begin
+ fCritical.Enter;
+ with Sender as TUploadThread do try
+ Log('Upload ' + Filename + ': ' + Errortext);
+ finally
+ fCritical.Leave;
+ end;
+end;
+
+procedure TExtendedFileTransferClientMainForm.OnUploadStarted(Sender: TObject);
+begin
+ fCritical.Enter;
+ with Sender as TUploadThread do try
+ Log(InfoStr + ': Upload started');
+ //Do something other: create Progressbar (Max = FileSize .... )
+ finally
+ fCritical.Leave;
+ end;
+end;
+
+procedure TExtendedFileTransferClientMainForm.OnUploadProgress(Sender: TObject);
+begin
+ fCritical.Enter;
+ try
+ //Update Progressbar .... Use CurrentBytePos
+ finally
+ fCritical.Leave;
+ end;
+end;
+
+procedure TExtendedFileTransferClientMainForm.OnUploadFinished(Sender: TObject);
+begin
+ fCritical.Enter;
+ with Sender as TUploadThread do try
+ if UploadOK then begin
+ Log(InfoStr + ': Upload finished');
+ fFileService.uploadfinished(Filename, FileSize);
+ end;
+ finally
+ fCritical.Leave;
+ end;
+end;
+
+procedure TExtendedFileTransferClientMainForm.UploadButtonClick(Sender: TObject);
+var
+ i: Integer;
+begin
+ with TOpendialog.Create(nil) do try
+ InitialDir := 'c:\';
+ Filename := '*.*';
+ Filter := 'All Files (*.*)|*.*';
+ Filterindex := 1;
+ options := options + [ofAllowMultiSelect];
+ if Execute then
+ for i := 0 to Files.count - 1 do
+ TUploadThread.Create(Files[i], OnUploadStarted, OnUploadProgress, OnUploadFinished, OnUploadAborted, OnUploadError);
+ finally
+ free;
+ end;
+end;
+
+procedure TExtendedFileTransferClientMainForm.OnNewFileAvailable(const filename: string; const filesize:
+ Int64);
+begin
+ TDownloadThread.Create(eFolder.Text, filename, filesize,
+ OnDownloadStarted, OnDownloadProgress, OnDownloadFinished,
+ OnDownloadAborted, OnDownloadError);
+end;
+
+procedure TExtendedFileTransferClientMainForm.bSelectFolderClick(
+ Sender: TObject);
+var
+ ffolder: string;
+begin
+ ffolder := eFolder.Text;
+ SelectDirectory(ffolder, [sdAllowCreate, sdPerformCreate, sdPrompt], 0);
+ eFolder.Text := IncludeTrailingPathDelimiter(ffolder);
+end;
+
+procedure TExtendedFileTransferClientMainForm.Log(Mes: string);
+begin
+ Memo.Lines.Add(Mes);
+end;
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferClientUploadThread.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferClientUploadThread.pas
new file mode 100644
index 0000000..297f6db
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferClientUploadThread.pas
@@ -0,0 +1,215 @@
+unit ExtendedFileTransferClientUploadThread;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls,
+ uROClient, uROClientIntf, uRORemoteService, uROBinMessage,
+ uROIndyTCPChannel, uROIndyHTTPChannel,
+ ExtendedFileTransferLibrary_Intf, uROTypes;
+
+type
+
+ { TROThread }
+ TUploadThread = class(TThread)
+ private
+ fROMessage: TROBinMessage;
+ fROChannel: TROIndyHTTPChannel;
+ fRORemoteService: TRORemoteService;
+ fOnAbort: TNotifyEvent;
+ fOnFinished: TNotifyEvent;
+ fOnProgress: TNotifyEvent;
+ fOnStartUpload: TNotifyEvent;
+ fOnError: TNotifyEvent;
+ fFileName: string;
+ fUploadOK: Boolean;
+ fFileSize: Int64;
+ fCurrentBytePos: Int64;
+ fTimeStarted: TDateTime;
+ fFileService: IExtendedFileTransferService;
+ fErrorText: string;
+ fInfoStr: string;
+ fMaxConnectionErrors, fChannelErrorscount: Integer;
+ procedure Runupload;
+ function GetUploadChunk(FileMemStream: TMemoryStream; aSize: Int64;
+ const Sequence: Integer): Binary;
+ procedure ROIndyChannelFailure(Sender: TROTransportChannel;
+ anException: Exception; var Retry: Boolean);
+ procedure Run;
+
+ protected
+ public
+ property UploadOK: Boolean read fUploadOK;
+ property FileSize: Int64 read fFileSize;
+ property CurrentBytePos: Int64 read fCurrentBytePos;
+ property TimeStarted: TDateTime read fTimeStarted;
+ property ErrorText: string read fErrortext;
+ property Filename: string read fFilename;
+ property InfoStr: string read fInfoStr;
+ constructor Create(aFileName: string; aOnStartUpload, aOnProgress,
+ aOnFinished, aOnAbort, aOnError: TNotifyEvent);
+ destructor Destroy; override;
+
+ procedure Execute; override;
+ end;
+
+implementation
+uses ExtendedFileTransferClientMain;
+
+{ TROThread }
+
+constructor TUploadThread.Create(aFileName: string; aOnStartUpload, aOnProgress,
+ aOnFinished, aOnAbort, aOnError: TNotifyEvent);
+begin
+ inherited Create(TRUE);
+ fFilename := aFilename;
+ fmaxconnectionerrors := 5; //try 5 times on channel-error
+
+ fROMessage := TROBinMessage.Create(nil);
+ fROChannel := TROIndyHTTPChannel.Create(nil);
+ fROChannel.OnFailure := ROIndyChannelFailure;
+ fROChannel.TargetURL :=ExtendedFileTransferClientMainForm.ROChannel.TargetURL;
+
+ fRORemoteService := TRORemoteService.Create(nil);
+ fRORemoteService.Channel := fROChannel;
+ fRORemoteService.Message := fROMessage;
+ fRORemoteService.ServiceName := 'ExtendedFileTransferService';
+ fFileService := fRORemoteService as IExtendedFileTransferService;
+
+ if assigned(aOnAbort) then fOnAbort := aOnAbort;
+ if assigned(aOnFinished) then fOnFinished := aOnFinished;
+ if assigned(aOnProgress) then fOnProgress := aOnProgress;
+ if assigned(aOnStartUpload) then fOnStartUpload := aOnStartUpload;
+ if assigned(aOnError) then fOnError := aOnError;
+ FreeOnTerminate:=True;
+ Resume;
+end;
+
+destructor TUploadThread.Destroy;
+begin
+ fFileService := nil;
+ FreeAndNil(fROMessage);
+ FreeAndNil(fROChannel);
+ FreeAndNil(fRORemoteService);
+ inherited;
+end;
+
+procedure TUploadThread.Run;
+begin
+ try
+ RunUpload;
+ finally
+ if assigned(fOnFinished) then fOnFinished(Self);
+ end;
+end;
+
+procedure TUploadThread.Execute;
+begin
+ Run;
+end;
+
+function TUploadThread.GetUploadChunk(FileMemStream: TMemoryStream; aSize:
+ Int64; const Sequence: Integer): Binary;
+const
+ Block: Integer = 65536;
+var
+ Position: Int64;
+begin
+ Result := Binary.Create;
+ Position := Block * (Sequence - 1);
+ if Position <= aSize then begin
+ FileMemStream.Position := Position;
+ if Position + Block > aSize then
+ Result.CopyFrom(FileMemStream, aSize - Position)
+ else
+ Result.CopyFrom(FileMemStream, Block);
+ end;
+end;
+
+procedure TUploadThread.Runupload;
+var
+ FileMemStream: TMemoryStream;
+ Chunk: Binary;
+ Sequence: Int64;
+ isfirst: Boolean;
+begin
+ fErrorText := '';
+ fUploadOK := false;
+ fChannelErrorscount := 0;
+ fCurrentBytePos := 0;
+ Sequence := 1;
+ fTimeStarted := Now;
+ FileMemStream := nil;
+ isfirst := true;
+ try
+
+ if FileExists(fFilename) then try
+ FileMemStream := TMemoryStream.Create;
+
+ FileMemStream.LoadFromFile(fFileName);
+ fFileName := ExtractFileName(fFileName);
+
+ fFileSize := FileMemStream.Size;
+
+ fInfoStr := DateTimetoStr(fTimeStarted) + ' ' +
+ fFileName + ' ' +
+ FloatToStrF(Filesize / 1024, fffixed, 15, 1) + ' KB';
+
+ if assigned(fOnStartUpload) then fOnStartUpload(Self);
+ Chunk := GetUploadChunk(FileMemStream, fFileSize, Sequence);
+ Inc(fCurrentBytePos, Chunk.Size);
+ Inc(Sequence);
+ try
+ fFileService.uploadChunk(isfirst, fFileName, Chunk);
+ FreeAndNil(Chunk);
+ isfirst := false;
+ Chunk := GetUploadChunk(FileMemStream, fFileSize, Sequence);
+ while Chunk.Size > 0 do begin
+
+ if Terminated then begin
+ if assigned(fOnAbort) then fOnAbort(Self);
+ exit;
+ end;
+
+ fFileService.uploadChunk(isfirst, fFileName, Chunk);
+
+ Inc(fCurrentBytePos, Chunk.Size);
+ FreeAndNil(Chunk);
+
+ Inc(Sequence);
+ if assigned(fOnProgress) then fOnProgress(Self);
+ Chunk := GetUploadChunk(FileMemStream, fFileSize, Sequence);
+ end;
+
+ fUploadOK := (FileSize = 0) or (FileSize = CurrentBytePos);
+ finally
+ FreeAndNil(Chunk);
+ end;
+ finally
+ FileMemStream.Free;
+ end;
+
+ except
+ on e: Exception do begin
+ fErrorText := e.Message;
+ if assigned(fOnError) then fOnError(Self);
+ end;
+ end;
+end;
+
+procedure TUploadThread.ROIndyChannelFailure(Sender: TROTransportChannel;
+ anException: Exception; var Retry: Boolean);
+begin
+ if fChannelErrorscount > fMaxConnectionerrors then begin
+ fErrorText := anException.Message;
+ Self.terminate;
+ end
+ else begin
+ inc(fChannelErrorscount);
+ sleep(1000);
+ Retry := true;
+ end;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferLibrary.rodl b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferLibrary.rodl
new file mode 100644
index 0000000..2b48f4b
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferLibrary.rodl
@@ -0,0 +1,67 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferLibrary_Intf.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferLibrary_Intf.pas
new file mode 100644
index 0000000..bb76c66
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferLibrary_Intf.pas
@@ -0,0 +1,203 @@
+unit ExtendedFileTransferLibrary_Intf;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROClasses, uROClient, uROTypes, uROClientIntf;
+
+const
+ { Library ID }
+ LibraryUID = '{915A4222-6FA3-43A2-AE8B-C517E0F844BB}';
+
+ { Service Interface ID's }
+ IExtendedFileTransferService_IID : TGUID = '{2A7AFE06-0600-46ED-9B7A-C694A1191311}';
+
+ { Event ID's }
+ EID_FileEvents = 'FileEvents';
+
+type
+ { Forward declarations }
+ IExtendedFileTransferService = interface;
+
+ IFileEvents = interface;
+
+
+ { IExtendedFileTransferService }
+ IExtendedFileTransferService = interface
+ ['{2A7AFE06-0600-46ED-9B7A-C694A1191311}']
+ procedure downloadsequence(const filename: String; const sequence: Integer; out filedata: Binary; out filesize: Int64);
+ procedure uploadchunk(const isfirst: Boolean; const filename: String; const filedata: Binary);
+ procedure uploadfinished(const filename: String; const filesize: Int64);
+ end;
+
+ { CoExtendedFileTransferService }
+ CoExtendedFileTransferService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IExtendedFileTransferService;
+ end;
+
+ { TExtendedFileTransferService_Proxy }
+ TExtendedFileTransferService_Proxy = class(TROProxy, IExtendedFileTransferService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ procedure downloadsequence(const filename: String; const sequence: Integer; out filedata: Binary; out filesize: Int64);
+ procedure uploadchunk(const isfirst: Boolean; const filename: String; const filedata: Binary);
+ procedure uploadfinished(const filename: String; const filesize: Int64);
+ end;
+
+ { IFileEvents }
+ IFileEvents = interface
+ ['{E03490F1-99B5-4310-B3E8-F4C96BEAD1A5}']
+ procedure OnNewFileAvailable(const filename: String; const filesize: Int64);
+ end;
+
+ { IFileEvents_Writer }
+ IFileEvents_Writer = interface(IROEventWriter)
+ ['{E03490F1-99B5-4310-B3E8-F4C96BEAD1A5}']
+ procedure OnNewFileAvailable(const __Sender : TGUID; const filename: String; const filesize: Int64);
+ end;
+
+implementation
+
+uses
+ {vcl:} SysUtils,
+ {RemObjects:} uROEventRepository, uRORes;
+
+{ CoExtendedFileTransferService }
+
+class function CoExtendedFileTransferService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IExtendedFileTransferService;
+begin
+ result := TExtendedFileTransferService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TExtendedFileTransferService_Proxy }
+
+function TExtendedFileTransferService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'ExtendedFileTransferService';
+end;
+
+procedure TExtendedFileTransferService_Proxy.downloadsequence(const filename: String; const sequence: Integer; out filedata: Binary; out filesize: Int64);
+begin
+ try
+ filedata := nil;
+ __Message.InitializeRequestMessage(__TransportChannel, 'ExtendedFileTransferLibrary', __InterfaceName, 'downloadsequence');
+ __Message.Write('filename', TypeInfo(String), filename, []);
+ __Message.Write('sequence', TypeInfo(Integer), sequence, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('filedata', TypeInfo(Binary), filedata, []);
+ __Message.Read('filesize', TypeInfo(Int64), filesize, []);
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+procedure TExtendedFileTransferService_Proxy.uploadchunk(const isfirst: Boolean; const filename: String; const filedata: Binary);
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'ExtendedFileTransferLibrary', __InterfaceName, 'uploadchunk');
+ __Message.Write('isfirst', TypeInfo(Boolean), isfirst, []);
+ __Message.Write('filename', TypeInfo(String), filename, []);
+ __Message.Write('filedata', TypeInfo(Binary), filedata, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+procedure TExtendedFileTransferService_Proxy.uploadfinished(const filename: String; const filesize: Int64);
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'ExtendedFileTransferLibrary', __InterfaceName, 'uploadfinished');
+ __Message.Write('filename', TypeInfo(String), filename, []);
+ __Message.Write('filesize', TypeInfo(Int64), filesize, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+type
+ { TFileEvents_Writer }
+ TFileEvents_Writer = class(TROEventWriter, IFileEvents_Writer)
+ protected
+ procedure OnNewFileAvailable(const __Sender : TGUID; const filename: String; const filesize: Int64);
+ end;
+
+procedure TFileEvents_Writer.OnNewFileAvailable(const __Sender : TGUID; const filename: String; const filesize: Int64);
+var __eventdata : Binary;
+begin
+ __eventdata := Binary.Create;
+ try
+ __Message.InitializeEventMessage(NIL, 'ExtendedFileTransferLibrary', EID_FileEvents, 'OnNewFileAvailable');
+ __Message.Write('filename', TypeInfo(String), filename, []);
+ __Message.Write('filesize', TypeInfo(Int64), filesize, []);
+ __Message.Finalize;
+
+ __Message.WriteToStream(__eventdata);
+
+ Repository.StoreEventData(__Sender, __eventdata, ExcludeSender, ExcludeSessionList, SessionList.CommaText);
+ except
+ __eventdata.Free;
+ end;
+end;
+
+type
+ { TFileEvents_Invoker }
+ TFileEvents_Invoker = class(TROEventInvoker)
+ published
+ procedure Invoke_OnNewFileAvailable(__EventReceiver : TROEventReceiver; const __Message : IROMessage; const __Target : IUnknown);
+ end;
+
+procedure TFileEvents_Invoker.Invoke_OnNewFileAvailable(__EventReceiver : TROEventReceiver; const __Message : IROMessage; const __Target : IUnknown);
+var
+__lObjectDisposer: TROObjectDisposer;
+ filename: String;
+ filesize: Int64;
+begin
+
+ try
+ __Message.Read('filename', TypeInfo(String), filename, []);
+ __Message.Read('filesize', TypeInfo(Int64), filesize, []);
+
+ (__Target as IFileEvents).OnNewFileAvailable(filename, filesize);
+
+ finally
+ __lObjectDisposer:= TROObjectDisposer.Create(__EventReceiver);
+ try
+ finally
+ __lObjectDisposer.Free();
+ end
+ end
+end;
+
+initialization
+ RegisterProxyClass(IExtendedFileTransferService_IID, TExtendedFileTransferService_Proxy);
+
+ RegisterEventWriterClass(IFileEvents_Writer, TFileEvents_Writer);
+ RegisterEventInvokerClass(EID_FileEvents, TFileEvents_Invoker);
+
+finalization
+ UnregisterProxyClass(IExtendedFileTransferService_IID);
+
+ UnregisterEventWriterClass(IFileEvents_Writer);
+ UnregisterEventInvokerClass(EID_FileEvents);
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferLibrary_Invk.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferLibrary_Invk.pas
new file mode 100644
index 0000000..c035063
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferLibrary_Invk.pas
@@ -0,0 +1,118 @@
+unit ExtendedFileTransferLibrary_Invk;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes,
+ {RemObjects:} uROServer, uROServerIntf, uROTypes, uROClientIntf,
+ {Generated:} ExtendedFileTransferLibrary_Intf;
+
+type
+ TExtendedFileTransferService_Invoker = class(TROInvoker)
+ private
+ protected
+ published
+ procedure Invoke_downloadsequence(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_uploadchunk(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_uploadfinished(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ end;
+
+implementation
+
+uses
+ {RemObjects:} uRORes, uROClient;
+
+{ TExtendedFileTransferService_Invoker }
+
+procedure TExtendedFileTransferService_Invoker.Invoke_downloadsequence(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ procedure downloadsequence(const filename: String; const sequence: Integer; out filedata: Binary; out filesize: Int64); }
+var
+ filename: String;
+ sequence: Integer;
+ filedata: Binary;
+ filesize: Int64;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ filedata := nil;
+ try
+ __Message.Read('filename', TypeInfo(String), filename, []);
+ __Message.Read('sequence', TypeInfo(Integer), sequence, []);
+
+ (__Instance as IExtendedFileTransferService).downloadsequence(filename, sequence, filedata, filesize);
+
+ __Message.InitializeResponseMessage(__Transport, 'ExtendedFileTransferLibrary', 'ExtendedFileTransferService', 'downloadsequenceResponse');
+ __Message.Write('filedata', TypeInfo(Binary), filedata, []);
+ __Message.Write('filesize', TypeInfo(Int64), filesize, []);
+ __Message.Finalize;
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(filedata);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
+procedure TExtendedFileTransferService_Invoker.Invoke_uploadchunk(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ procedure uploadchunk(const isfirst: Boolean; const filename: String; const filedata: Binary); }
+var
+ isfirst: Boolean;
+ filename: String;
+ filedata: Binary;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ filedata := nil;
+ try
+ __Message.Read('isfirst', TypeInfo(Boolean), isfirst, []);
+ __Message.Read('filename', TypeInfo(String), filename, []);
+ __Message.Read('filedata', TypeInfo(Binary), filedata, []);
+
+ (__Instance as IExtendedFileTransferService).uploadchunk(isfirst, filename, filedata);
+
+ __Message.InitializeResponseMessage(__Transport, 'ExtendedFileTransferLibrary', 'ExtendedFileTransferService', 'uploadchunkResponse');
+ __Message.Finalize;
+
+ __oResponseOptions := [roNoResponse];
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(filedata);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
+procedure TExtendedFileTransferService_Invoker.Invoke_uploadfinished(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ procedure uploadfinished(const filename: String; const filesize: Int64); }
+var
+ filename: String;
+ filesize: Int64;
+begin
+ try
+ __Message.Read('filename', TypeInfo(String), filename, []);
+ __Message.Read('filesize', TypeInfo(Int64), filesize, []);
+
+ (__Instance as IExtendedFileTransferService).uploadfinished(filename, filesize);
+
+ __Message.InitializeResponseMessage(__Transport, 'ExtendedFileTransferLibrary', 'ExtendedFileTransferService', 'uploadfinishedResponse');
+ __Message.Finalize;
+
+ __oResponseOptions := [roNoResponse];
+
+ finally
+ end;
+end;
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferServer.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferServer.bdsproj
new file mode 100644
index 0000000..111d4dc
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferServer.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {1F34CE93-B647-4DB3-AEDD-D5E7F3585737}
+
+
+
+
+ ExtendedFileTransferServer.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferServer.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferServer.dpr
new file mode 100644
index 0000000..99d529b
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferServer.dpr
@@ -0,0 +1,30 @@
+program ExtendedFileTransferServer;
+
+{#ROGEN:ExtendedFileTransferLibrary.rodl} // RemObjects: Careful, do not remove!
+
+uses
+ uROComInit,
+ uROComboService,
+ Forms,
+ ExtendedFileTransferServerData in 'ExtendedFileTransferServerData.pas' {ExtendedFileTransferServerDataForm: TDataModule},
+ ExtendedFileTransferServerMain in 'ExtendedFileTransferServerMain.pas' {ExtendedFileTransferServerMainForm},
+ ExtendedFileTransferLibrary_Intf in 'ExtendedFileTransferLibrary_Intf.pas',
+ ExtendedFileTransferLibrary_Invk in 'ExtendedFileTransferLibrary_Invk.pas',
+ ExtendedFileTransferService_Impl in 'ExtendedFileTransferService_Impl.pas' {ExtendedFileTransferService: TRORemoteDataModule};
+
+{$R *.res}
+{$R RODLFile.res}
+
+begin
+ if ROStartService('FileTransferEx', 'FileTransferEx') then begin
+ ROService.CreateForm(TExtendedFileTransferServerDataForm, ExtendedFileTransferServerDataForm);
+ ROService.Run;
+ Exit;
+ end;
+
+ Application.Initialize;
+ Application.Title := 'Extended File Transfer Server';
+ Application.CreateForm(TExtendedFileTransferServerDataForm, ExtendedFileTransferServerDataForm);
+ Application.CreateForm(TExtendedFileTransferServerMainForm, ExtendedFileTransferServerMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferServer.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferServer.dproj
new file mode 100644
index 0000000..55479c0
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferServer.dproj
@@ -0,0 +1,80 @@
+
+
+ {91fd316e-e998-4bae-842e-a815181a9ef0}
+ ExtendedFileTransferServer.dpr
+ Debug
+ AnyCPU
+ DCC32
+ ExtendedFileTransferServer.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ ExtendedFileTransferServer.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferServer.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferServer.res
new file mode 100644
index 0000000..95e15d9
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferServer.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferServerData.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferServerData.dfm
new file mode 100644
index 0000000..4054d3b
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferServerData.dfm
@@ -0,0 +1,35 @@
+object ExtendedFileTransferServerDataForm: TExtendedFileTransferServerDataForm
+ OldCreateOrder = False
+ OnCreate = DataModuleCreate
+ Left = 276
+ Top = 104
+ Height = 192
+ Width = 242
+ object ROMessage: TROBinMessage
+ Left = 42
+ Top = 24
+ end
+ object ROServer: TROIndyHTTPServer
+ Dispatchers = <
+ item
+ Name = 'ROMessage'
+ Message = ROMessage
+ Enabled = True
+ PathInfo = 'Bin'
+ end>
+ Port = 8099
+ Left = 90
+ Top = 10
+ end
+ object ROInMemoryEventRepository: TROInMemoryEventRepository
+ Message = ROMessage
+ SessionManager = ROInMemorySessionManager
+ Left = 41
+ Top = 105
+ end
+ object ROInMemorySessionManager: TROInMemorySessionManager
+ SessionDuration = 1
+ Left = 40
+ Top = 62
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferServerData.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferServerData.pas
new file mode 100644
index 0000000..f9c0c08
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferServerData.pas
@@ -0,0 +1,37 @@
+unit ExtendedFileTransferServerData;
+
+interface
+
+uses
+ SysUtils, Classes, uROClient, uROServer, uROIndyTCPServer,
+ uROPoweredByRemObjectsButton, uROClientIntf, uROClasses,
+ uROBinMessage, uROIndyHTTPServer, uROSessions, uROEventRepository;
+
+type
+ TExtendedFileTransferServerDataForm = class(TDataModule)
+ ROMessage: TROBinMessage;
+ ROServer: TROIndyHTTPServer;
+ ROInMemoryEventRepository: TROInMemoryEventRepository;
+ ROInMemorySessionManager: TROInMemorySessionManager;
+ procedure DataModuleCreate(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ ExtendedFileTransferServerDataForm: TExtendedFileTransferServerDataForm;
+ uploadFolder: string;
+
+implementation
+
+{$R *.dfm}
+
+procedure TExtendedFileTransferServerDataForm.DataModuleCreate(Sender: TObject);
+begin
+ ROServer.Active := TRUE;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferServerMain.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferServerMain.dfm
new file mode 100644
index 0000000..14c4f41
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferServerMain.dfm
@@ -0,0 +1,69 @@
+object ExtendedFileTransferServerMainForm: TExtendedFileTransferServerMainForm
+ Left = 373
+ Top = 250
+ ActiveControl = bSelectFolder
+ BorderStyle = bsDialog
+ Caption = 'Extended File Transfer Server'
+ ClientHeight = 176
+ ClientWidth = 435
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ PixelsPerInch = 96
+ TextHeight = 13
+ object RoPoweredByRemObjectsButton1: TROPoweredByRemObjectsButton
+ Left = 111
+ Top = 8
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ end
+ object Label1: TLabel
+ Left = 8
+ Top = 58
+ Width = 66
+ Height = 13
+ Caption = 'Upload folder:'
+ end
+ object eFolder: TEdit
+ Left = 8
+ Top = 72
+ Width = 389
+ Height = 21
+ Anchors = [akLeft, akTop, akRight]
+ Color = clBtnFace
+ ReadOnly = True
+ TabOrder = 0
+ end
+ object bSelectFolder: TButton
+ Left = 405
+ Top = 71
+ Width = 22
+ Height = 22
+ Anchors = [akTop, akRight]
+ Caption = '...'
+ TabOrder = 1
+ OnClick = bSelectFolderClick
+ end
+ object Memo1: TMemo
+ Left = 8
+ Top = 104
+ Width = 393
+ Height = 57
+ BorderStyle = bsNone
+ Color = cl3DLight
+ Lines.Strings = (
+ 'When a client uploads a file:'
+ '1) it is transferred to the Upload folder specified above'
+
+ '2) it is then downloaded into the Download folder of other clien' +
+ 'ts')
+ TabOrder = 2
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferServerMain.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferServerMain.pas
new file mode 100644
index 0000000..cfcb7f8
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferServerMain.pas
@@ -0,0 +1,50 @@
+unit ExtendedFileTransferServerMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
+ uROClient, uROPoweredByRemObjectsButton, uROClientIntf, uROServer, uROClasses;
+
+type
+ TExtendedFileTransferServerMainForm = class(TForm)
+ RoPoweredByRemObjectsButton1: TRoPoweredByRemObjectsButton;
+ Label1: TLabel;
+ eFolder: TEdit;
+ bSelectFolder: TButton;
+ Memo1: TMemo;
+ procedure bSelectFolderClick(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ ExtendedFileTransferServerMainForm: TExtendedFileTransferServerMainForm;
+
+implementation
+uses
+ FileCtrl,
+ ExtendedFileTransferServerData;
+{$R *.dfm}
+
+procedure TExtendedFileTransferServerMainForm.bSelectFolderClick(
+ Sender: TObject);
+begin
+ SelectDirectory(ExtendedFileTransferServerData.uploadFolder, [sdAllowCreate, sdPerformCreate, sdPrompt], 0);
+ ExtendedFileTransferServerData.uploadFolder := IncludeTrailingPathDelimiter(ExtendedFileTransferServerData.uploadFolder);
+ eFolder.Text := ExtendedFileTransferServerData.uploadFolder;
+ ForceDirectories(eFolder.Text);
+end;
+
+procedure TExtendedFileTransferServerMainForm.FormCreate(Sender: TObject);
+begin
+ eFolder.Text := ExtractFilePath(ParamStr(0)) + 'ServerFiles\';
+ ForceDirectories(eFolder.Text);
+ ExtendedFileTransferServerData.uploadFolder := eFolder.Text;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferService_Impl.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferService_Impl.dfm
new file mode 100644
index 0000000..f272f5a
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferService_Impl.dfm
@@ -0,0 +1,9 @@
+object ExtendedFileTransferService: TExtendedFileTransferService
+ OldCreateOrder = True
+ SessionManager = ExtendedFileTransferServerDataForm.ROInMemorySessionManager
+ EventRepository = ExtendedFileTransferServerDataForm.ROInMemoryEventRepository
+ Left = 200
+ Top = 200
+ Height = 139
+ Width = 218
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferService_Impl.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferService_Impl.pas
new file mode 100644
index 0000000..7d2590e
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ExtendedFileTransferService_Impl.pas
@@ -0,0 +1,104 @@
+unit ExtendedFileTransferService_Impl;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ This is where you are supposed to code the implementation of your objects. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils,
+ {RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions, uRORemoteDataModule,
+ {Generated:} ExtendedFileTransferLibrary_Intf,
+ ExtendedFileTransferServerData;
+
+type
+ { TExtendedFileTransferService }
+ TExtendedFileTransferService = class(TRORemoteDataModule, IExtendedFileTransferService)
+ private
+ function getFileDirectory: string;
+ protected
+ { IExtendedFileTransferService methods }
+ procedure downloadsequence(const filename: string; const sequence: Integer; out filedata: Binary; out filesize: Int64);
+ procedure uploadchunk(const isfirst: Boolean; const filename: string; const filedata: Binary);
+ procedure uploadfinished(const filename: string; const filesize: Int64);
+ end;
+
+implementation
+{$R *.dfm}
+uses
+ {Generated:} ExtendedFileTransferLibrary_Invk;
+
+procedure Create_ExtendedFileTransferService(out anInstance: IUnknown);
+begin
+ anInstance := TExtendedFileTransferService.Create(nil);
+end;
+
+{ ExtendedFileTransferService }
+
+procedure TExtendedFileTransferService.downloadsequence(const filename: string; const sequence: Integer; out filedata: Binary; out filesize: Int64);
+const
+ Block: Integer = 65536;
+var
+ Position: Int64;
+ MemStream: TFileStream;
+ localfilename: string;
+begin
+ fileData := Binary.Create;
+ localfilename := getFileDirectory + filename;
+ if not FileExists(localfilename) then exit;
+ MemStream := TFileStream.Create(localfilename, fmopenRead);
+ try
+ FileSize := MemStream.Size;
+ Position := Block * (Sequence - 1);
+ if Position <= FileSize then begin
+ MemStream.Position := Position;
+ if Position + Block > FileSize then
+ fileData.CopyFrom(MemStream, FileSize - Position)
+ else
+ fileData.CopyFrom(MemStream, Block);
+ end;
+ finally
+ MemStream.Free;
+ end;
+end;
+
+function TExtendedFileTransferService.getFileDirectory: string;
+begin
+ result := ExtendedFileTransferServerData.uploadFolder;
+end;
+
+procedure TExtendedFileTransferService.uploadchunk(const isfirst: Boolean; const filename: string; const filedata: Binary);
+var
+ NewFile: TFileStream;
+ localfilename: string;
+begin
+ localfilename := getFileDirectory + filename;
+ if isfirst and Fileexists(localfilename) then DeleteFile(localfilename);
+ if FileExists(localfilename) then
+ NewFile := TFileStream.Create(localfilename, fmOpenReadWrite)
+ else
+ NewFile := TFileStream.Create(localfilename, fmCreate);
+ try
+ NewFile.Seek(0, soFromEnd);
+ filedata.SaveToStream(NewFile);
+ finally
+ NewFile.Free;
+ end;
+end;
+
+procedure TExtendedFileTransferService.uploadfinished(const filename: string; const filesize: Int64);
+begin
+ (EventRepository as IFileEvents_Writer).OnNewFileAvailable(Session.SessionID, filename, filesize);
+end;
+
+initialization
+ TROClassFactory.Create('ExtendedFileTransferService', Create_ExtendedFileTransferService, TExtendedFileTransferService_Invoker);
+
+finalization
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/RODLFILE.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/RODLFILE.res
new file mode 100644
index 0000000..f89f53c
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/RODLFILE.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ServerFiles/create.dir b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Extended File Transfer/ServerFiles/create.dir
new file mode 100644
index 0000000..e69de29
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/FPC Server/NewLibrary.RODL b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/FPC Server/NewLibrary.RODL
new file mode 100644
index 0000000..b45047c
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/FPC Server/NewLibrary.RODL
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/FPC Server/NewLibrary_Async.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/FPC Server/NewLibrary_Async.pas
new file mode 100644
index 0000000..758071c
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/FPC Server/NewLibrary_Async.pas
@@ -0,0 +1,108 @@
+unit NewLibrary_Async;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+{$I Remobjects.inc}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROXMLIntf, uROClasses, uROTypes, uROClientIntf, uROAsync,
+ {Project:} NewLibrary_Intf;
+
+type
+ { INewService_Async }
+ INewService_Async = interface(IROAsyncInterface)
+ ['{5814142C-9CC8-49F2-B1E3-6E1925846287}']
+ procedure Invoke_Sum(const A: Integer; const B: Integer);
+ procedure Invoke_GetServerTime;
+ function Retrieve_Sum: Integer;
+ function Retrieve_GetServerTime: DateTime;
+ end;
+
+ { CoNewService_Async }
+ CoNewService_Async = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): INewService_Async;
+ end;
+
+ { TNewService_AsyncProxy }
+ TNewService_AsyncProxy = class(TROAsyncProxy, INewService_Async)
+ private
+ protected
+ function __GetInterfaceName:string; override;
+
+ procedure Invoke_Sum(const A: Integer; const B: Integer);
+ procedure Invoke_GetServerTime;
+ function Retrieve_Sum: Integer;
+ function Retrieve_GetServerTime: DateTime;
+ end;
+
+implementation
+
+uses
+ {vcl:} SysUtils;
+
+{ CoNewService }
+
+class function CoNewService_Async.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): INewService_Async;
+begin
+ result := TNewService_AsyncProxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TNewService_AsyncProxy }
+
+function TNewService_AsyncProxy.__GetInterfaceName:string;
+begin
+ result := 'NewService';
+end;
+
+procedure TNewService_AsyncProxy.Invoke_Sum(const A: Integer; const B: Integer);
+begin
+ __AssertProxyNotBusy('Sum');
+
+ __Message.InitializeRequestMessage(__TransportChannel, 'NewLibrary', __InterfaceName, 'Sum');
+ __Message.Write('A', TypeInfo(Integer), A, []);
+ __Message.Write('B', TypeInfo(Integer), B, []);
+ __DispatchAsyncRequest('Sum',__Message);
+end;
+
+function TNewService_AsyncProxy.Retrieve_Sum: Integer;
+var __response:TStream;
+begin
+ __response := __RetrieveAsyncResponse('Sum');
+ __Message.ReadFromStream(__response);
+
+ __Message.Read('Result', TypeInfo(Integer), Result, []);
+
+ __response.Free();
+end;
+
+procedure TNewService_AsyncProxy.Invoke_GetServerTime;
+begin
+ __AssertProxyNotBusy('GetServerTime');
+
+ __Message.InitializeRequestMessage(__TransportChannel, 'NewLibrary', __InterfaceName, 'GetServerTime');
+ __DispatchAsyncRequest('GetServerTime',__Message);
+end;
+
+function TNewService_AsyncProxy.Retrieve_GetServerTime: DateTime;
+var __response:TStream;
+begin
+ __response := __RetrieveAsyncResponse('GetServerTime');
+ __Message.ReadFromStream(__response);
+
+ __Message.Read('Result', TypeInfo(DateTime), Result, [paIsDateTime]);
+
+ __response.Free();
+end;
+
+
+initialization
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/FPC Server/NewLibrary_Intf.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/FPC Server/NewLibrary_Intf.pas
new file mode 100644
index 0000000..027c90f
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/FPC Server/NewLibrary_Intf.pas
@@ -0,0 +1,114 @@
+unit NewLibrary_Intf;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+{$I Remobjects.inc}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROXMLIntf, uROClasses, uROClient, uROTypes, uROClientIntf;
+
+const
+ { Library ID }
+ LibraryUID = '{0A070BB5-D201-420F-B01B-1BF69215F773}';
+ TargetNamespace = '';
+
+ { Service Interface ID's }
+ INewService_IID : TGUID = '{CCD13A49-5449-4AF7-960F-BB150D4D84A4}';
+
+ { Event ID's }
+
+type
+ { Forward declarations }
+ INewService = interface;
+
+
+ { INewService }
+ INewService = interface
+ ['{CCD13A49-5449-4AF7-960F-BB150D4D84A4}']
+ function Sum(const A: Integer; const B: Integer): Integer;
+ function GetServerTime: DateTime;
+ end;
+
+ { CoNewService }
+ CoNewService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): INewService;
+ end;
+
+ { TNewService_Proxy }
+ TNewService_Proxy = class(TROProxy, INewService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ function Sum(const A: Integer; const B: Integer): Integer;
+ function GetServerTime: DateTime;
+ end;
+
+implementation
+
+uses
+ {vcl:} SysUtils,
+ {RemObjects:} uROEventRepository, uROSerializer, uRORes;
+
+{ CoNewService }
+
+class function CoNewService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): INewService;
+begin
+ result := TNewService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TNewService_Proxy }
+
+function TNewService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'NewService';
+end;
+
+function TNewService_Proxy.Sum(const A: Integer; const B: Integer): Integer;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'NewLibrary', __InterfaceName, 'Sum');
+ __Message.Write('A', TypeInfo(Integer), A, []);
+ __Message.Write('B', TypeInfo(Integer), B, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Integer), result, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+function TNewService_Proxy.GetServerTime: DateTime;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'NewLibrary', __InterfaceName, 'GetServerTime');
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(DateTime), result, [paIsDateTime]);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+initialization
+ RegisterProxyClass(INewService_IID, TNewService_Proxy);
+
+
+finalization
+ UnregisterProxyClass(INewService_IID);
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/FPC Server/NewLibrary_Invk.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/FPC Server/NewLibrary_Invk.pas
new file mode 100644
index 0000000..b478ba5
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/FPC Server/NewLibrary_Invk.pas
@@ -0,0 +1,77 @@
+unit NewLibrary_Invk;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+{$I Remobjects.inc}
+
+interface
+
+uses
+ {vcl:} Classes,
+ {RemObjects:} uROXMLIntf, uROServer, uROServerIntf, uROTypes, uROClientIntf,
+ {Generated:} NewLibrary_Intf;
+
+type
+ {$M+}
+ TNewService_Invoker = class(TROInvoker)
+ private
+ protected
+ published
+ procedure Invoke_Sum(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_GetServerTime(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ end;
+ {$M-}
+
+implementation
+
+uses
+ {RemObjects:} uRORes, uROClient;
+
+{ TNewService_Invoker }
+
+procedure TNewService_Invoker.Invoke_Sum(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function Sum(const A: Integer; const B: Integer): Integer; }
+var
+ A: Integer;
+ B: Integer;
+ lResult: Integer;
+begin
+ try
+ __Message.Read('A', TypeInfo(Integer), A, []);
+ __Message.Read('B', TypeInfo(Integer), B, []);
+
+ lResult := (__Instance as INewService).Sum(A, B);
+
+ __Message.InitializeResponseMessage(__Transport, 'NewLibrary', 'NewService', 'SumResponse');
+ __Message.Write('Result', TypeInfo(Integer), lResult, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ end;
+end;
+
+procedure TNewService_Invoker.Invoke_GetServerTime(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function GetServerTime: DateTime; }
+var
+ lResult: DateTime;
+begin
+ try
+ lResult := (__Instance as INewService).GetServerTime;
+
+ __Message.InitializeResponseMessage(__Transport, 'NewLibrary', 'NewService', 'GetServerTimeResponse');
+ __Message.Write('Result', TypeInfo(DateTime), lResult, [paIsDateTime]);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ end;
+end;
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/FPC Server/NewService_Impl.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/FPC Server/NewService_Impl.pas
new file mode 100644
index 0000000..d50316d
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/FPC Server/NewService_Impl.pas
@@ -0,0 +1,55 @@
+unit NewService_Impl;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ This is where you are supposed to code the implementation of your objects. }
+{----------------------------------------------------------------------------}
+
+{$I Remobjects.inc}
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils,
+ {RemObjects:} uROXMLIntf, uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
+ {Generated:} NewLibrary_Intf;
+
+type
+ { TNewService }
+ TNewService = class(TRORemotable, INewService)
+ private
+ protected
+ { INewService methods }
+ function Sum(const A: Integer; const B: Integer): Integer;
+ function GetServerTime: DateTime;
+ end;
+
+implementation
+
+uses
+ {Generated:} NewLibrary_Invk;
+
+procedure Create_NewService(out anInstance : IUnknown);
+begin
+ anInstance := TNewService.Create;
+end;
+
+{ NewService }
+function TNewService.Sum(const A: Integer; const B: Integer): Integer;
+begin
+ Result := a + b;
+end;
+
+function TNewService.GetServerTime: DateTime;
+begin
+ result := Now;
+end;
+
+initialization
+ TROClassFactory.Create('NewService', Create_NewService, TNewService_Invoker);
+
+finalization
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/FPC Server/RODLFILE.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/FPC Server/RODLFILE.res
new file mode 100644
index 0000000..81273dd
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/FPC Server/RODLFILE.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/FPC Server/SimpleClient.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/FPC Server/SimpleClient.pas
new file mode 100644
index 0000000..f11b0c5
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/FPC Server/SimpleClient.pas
@@ -0,0 +1,40 @@
+program SimpleClient;
+{$IFDEF FPC}{$MODE DELPHI}{$ENDIF}
+uses
+ SysUtils,
+ Classes,
+ uROComInit,
+ uROBinMessage,
+ uROIndyHttpChannel,
+ NewLibrary_Intf;
+
+var
+ lService: INewService;
+ lMessage: TROBinMessage;
+ lChannel: TROIndyHTTPChannel;
+ a,b: Integer;
+begin
+ try
+ lMessage := TROBinMessage.Create(TComponent(nil));
+ lChannel := TROIndyHTTPChannel.Create(nil);
+ lChannel.Targeturl := 'http://localhost:8099/bin';
+ try
+ lService := CoNewService.Create(lMessage, lChannel);
+ Writeln('Calling Sum(a,b), please enter the first number:');
+ Readln(a);
+ Writeln('Please enter the second number:');
+ Readln(b);
+ Writeln('Trying to call Sum(a, b)');
+ Writeln('Result: ', lService.Sum(a, b));
+ Writeln('Trying to call GetServerTime');
+ Writeln('Result: ', DateTimeToStr(lService.GetServerTime));
+ ReadLn;
+ finally
+ lChannel.Free;
+ lMessage.Free;
+ end;
+ except
+ on e: Exception do
+ Writeln('Error trying to access the server: '+e.Message);
+ end;
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/FPC Server/SimpleServer.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/FPC Server/SimpleServer.pas
new file mode 100644
index 0000000..0af8246
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/FPC Server/SimpleServer.pas
@@ -0,0 +1,35 @@
+program SimpleServer;
+{$IFDEF FPC}{$MODE DELPHI}{$ENDIF}
+{$APPTYPE CONSOLE}
+{#ROGEN:NewLibrary.rodl} // RemObjects: Careful, do not remove!
+
+uses
+ uROComInit,
+ uROServer,
+ uROBinMessage,
+ uROIndyHTTPServer,
+ Classes,
+ NewLibrary_Intf in 'NewLibrary_Intf.pas',
+ NewLibrary_Invk in 'NewLibrary_Invk.pas',
+ NewService_Impl in 'NewService_Impl.pas';
+
+{$R *.res}
+{$R RODLFile.res}
+
+var
+ ROMessage: TROBinMessage;
+ ROServer: TROIndyHTTPServer;
+begin
+ Writeln('RemObjects SDK for Delphi - Command Line Server');
+ ROMessage := TROBinMessage.Create(TComponent(nil));
+ ROServer := TROIndyHTTPServer.Create(nil);
+ TROMessageDispatcher(ROServer.Dispatchers.Add).Message := ROMessage;
+ try
+ ROServer.Active := true;
+ WriteLn('Server is active, press Enter to stop.');
+ Readln;
+ finally
+ ROServer.Free;
+ ROMessage.Free;
+ end;
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/FPC Server/SimpleServer.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/FPC Server/SimpleServer.res
new file mode 100644
index 0000000..78dee1f
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/FPC Server/SimpleServer.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSample.Sample.html b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSample.Sample.html
new file mode 100644
index 0000000..3bddd34
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSample.Sample.html
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
+
+
+
+ FirstSample
+
+
+
+Purpose
+
+This sample provides an introduction to using the Delphi edition of the RemObjects SDK product. The example shows how to define/implement methods on the server and how to access them from the client. The data consists of name information and four simple methods are provided by the service: Nicknames, VerifyName, CheckName and FullNames.
+
+Getting Started
+
+ Build or compile both projects.
+ Launch the server (via the menu option: RemObjects | Launch Server Executable ).
+ Ensure that FirstSampleClient is the selected project and run it.
+ Check that the client buttons work as expected.
+ Modify the server names list and retry client actions.
+
+Examine the Code
+
+
+ See how the four methods were defined by editing the service library.
+ Do this by making the server the selected project and
+ by using the menu option: RemObjects | Edit Service Library .
+ Note: if you don't see this menu option but see 'Service Builder' instead,
+ you still have the client set as the current project.
+ Examine the methods added to FirstSampleService .
+
+
+ Check how the server methods were implemented in
+ FirstSampleService_Impl.pas .
+
+
+ Examine the simple code needed to invoke the methods in
+ FirstSampleClientMain.pas .
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSample.bdsgroup b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSample.bdsgroup
new file mode 100644
index 0000000..ca7b4af
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSample.bdsgroup
@@ -0,0 +1,20 @@
+
+
+
+
+ Default.Personality
+
+ 1.0
+ {A880C22B-8A55-4C36-8203-19D6C08B6590}
+
+
+
+
+
+ FirstSampleServer.bdsproj
+ FirstSampleClient.bdsproj
+ FirstSampleServer.exe FirstSampleClient.exe
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSample.bpg b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSample.bpg
new file mode 100644
index 0000000..1de9e53
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSample.bpg
@@ -0,0 +1,23 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = FirstSampleServer.exe FirstSampleClient.exe
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+FirstSampleServer.exe: FirstSampleServer.dpr
+ $(DCC)
+
+FirstSampleClient.exe: FirstSampleClient.dpr
+ $(DCC)
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSample.groupproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSample.groupproj
new file mode 100644
index 0000000..c7cf1ad
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSample.groupproj
@@ -0,0 +1,40 @@
+
+
+ {2eda1776-3224-4223-aefc-d172f74514f9}
+
+
+
+
+ Default.Personality
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSample.rodl b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSample.rodl
new file mode 100644
index 0000000..74b297b
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSample.rodl
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSampleClient.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSampleClient.bdsproj
new file mode 100644
index 0000000..52080c7
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSampleClient.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {38102D3E-B3C1-4AFC-AB90-7EF88110530E}
+
+
+
+
+ FirstSampleClient.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSampleClient.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSampleClient.dpr
new file mode 100644
index 0000000..a0470c2
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSampleClient.dpr
@@ -0,0 +1,14 @@
+program FirstSampleClient;
+
+uses
+ Forms,
+ FirstSample_Intf in 'FirstSample_Intf.pas',
+ FirstSampleClientMain in 'FirstSampleClientMain.pas' {FirstSampleClientMainForm};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TFirstSampleClientMainForm, FirstSampleClientMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSampleClient.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSampleClient.dproj
new file mode 100644
index 0000000..4554f7a
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSampleClient.dproj
@@ -0,0 +1,73 @@
+
+
+ {e57c53cf-fbec-4c7d-9e68-1fabdf6c87ab}
+ FirstSampleClient.dpr
+ Debug
+ AnyCPU
+ DCC32
+ FirstSampleClient.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ FirstSampleClient.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSampleClient.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSampleClient.res
new file mode 100644
index 0000000..6560ede
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSampleClient.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSampleClientMain.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSampleClientMain.dfm
new file mode 100644
index 0000000..ffdd700
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSampleClientMain.dfm
@@ -0,0 +1,142 @@
+object FirstSampleClientMainForm: TFirstSampleClientMainForm
+ Left = 226
+ Top = 109
+ BorderIcons = [biSystemMenu]
+ BorderStyle = bsSingle
+ Caption = 'FirstSample Client'
+ ClientHeight = 517
+ ClientWidth = 318
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -14
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ PixelsPerInch = 120
+ TextHeight = 16
+ object GroupBox1: TGroupBox
+ Left = 11
+ Top = 10
+ Width = 297
+ Height = 277
+ Caption = 'Get Nickname(s) by Full Name'
+ TabOrder = 0
+ object eFullname: TEdit
+ Left = 10
+ Top = 26
+ Width = 160
+ Height = 21
+ TabOrder = 0
+ Text = 'Carla Simon'
+ end
+ object NamesBox: TListBox
+ Left = 10
+ Top = 59
+ Width = 160
+ Height = 201
+ ItemHeight = 16
+ TabOrder = 1
+ end
+ object GetButton: TButton
+ Left = 177
+ Top = 23
+ Width = 96
+ Height = 31
+ Caption = 'Get'
+ TabOrder = 2
+ OnClick = GetButtonClick
+ end
+ end
+ object GroupBox2: TGroupBox
+ Left = 11
+ Top = 295
+ Width = 297
+ Height = 62
+ Caption = 'Check if Nickname exists'
+ TabOrder = 1
+ object eNickname: TEdit
+ Left = 10
+ Top = 25
+ Width = 160
+ Height = 21
+ TabOrder = 0
+ Text = 'Maria'
+ end
+ object CheckButton: TButton
+ Left = 183
+ Top = 20
+ Width = 93
+ Height = 30
+ Caption = 'Check'
+ TabOrder = 1
+ OnClick = CheckButtonClick
+ end
+ end
+ object GroupBox3: TGroupBox
+ Left = 11
+ Top = 364
+ Width = 297
+ Height = 139
+ Caption = 'Check that nickname and Full Name match'
+ TabOrder = 2
+ object Label1: TLabel
+ Left = 10
+ Top = 71
+ Width = 64
+ Height = 16
+ Caption = 'Full Name:'
+ end
+ object Label3: TLabel
+ Left = 10
+ Top = 20
+ Width = 64
+ Height = 16
+ Caption = 'Nickname:'
+ end
+ object eFullname2: TEdit
+ Left = 10
+ Top = 95
+ Width = 160
+ Height = 21
+ TabOrder = 1
+ Text = 'Maria Anders'
+ end
+ object eNickname2: TEdit
+ Left = 10
+ Top = 41
+ Width = 160
+ Height = 21
+ TabOrder = 0
+ Text = 'Maria'
+ end
+ object VerifyButton: TButton
+ Left = 187
+ Top = 58
+ Width = 92
+ Height = 31
+ Caption = 'Verify'
+ TabOrder = 2
+ OnClick = VerifyButtonClick
+ end
+ end
+ object ROBinMessage: TROBinMessage
+ Left = 184
+ Top = 64
+ end
+ object ROWinInetHTTPChannel: TROWinInetHTTPChannel
+ ServerLocators = <>
+ DispatchOptions = []
+ UserAgent = 'RemObjects SDK'
+ TargetURL = 'http://localhost:8099/BIN'
+ Left = 184
+ Top = 96
+ end
+ object RORemoteService: TRORemoteService
+ ServiceName = 'FirstSampleService'
+ Message = ROBinMessage
+ Channel = ROWinInetHTTPChannel
+ Left = 184
+ Top = 128
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSampleClientMain.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSampleClientMain.pas
new file mode 100644
index 0000000..39ea125
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSampleClientMain.pas
@@ -0,0 +1,77 @@
+unit FirstSampleClientMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, uRORemoteService, uROClient,
+ uROWinInetHttpChannel, uROBinMessage, StdCtrls, FirstSample_Intf;
+
+type
+ TFirstSampleClientMainForm = class(TForm)
+ ROBinMessage: TROBinMessage;
+ ROWinInetHTTPChannel: TROWinInetHTTPChannel;
+ RORemoteService: TRORemoteService;
+ eNickname: TEdit;
+ CheckButton: TButton;
+ GroupBox1: TGroupBox;
+ eFullname: TEdit;
+ eFullname2: TEdit;
+ eNickname2: TEdit;
+ NamesBox: TListBox;
+ GetButton: TButton;
+ GroupBox2: TGroupBox;
+ GroupBox3: TGroupBox;
+ Label1: TLabel;
+ Label3: TLabel;
+ VerifyButton: TButton;
+ procedure GetButtonClick(Sender: TObject);
+ procedure CheckButtonClick(Sender: TObject);
+ procedure VerifyButtonClick(Sender: TObject);
+ private
+ fFirstService: IFirstSampleService;
+ public
+ constructor Create(aOwner: TComponent); override;
+ end;
+
+var
+ FirstSampleClientMainForm: TFirstSampleClientMainForm;
+
+implementation
+
+uses Math, StrUtils;
+
+{$R *.dfm}
+
+constructor TFirstSampleClientMainForm.Create(aOwner: TComponent);
+begin
+ inherited;
+
+ fFirstService := (RORemoteService as IFirstSampleService);
+end;
+
+procedure TFirstSampleClientMainForm.GetButtonClick(Sender: TObject);
+begin
+ NamesBox.Items.CommaText := fFirstService.Nicknames(eFullname.Text);
+end;
+
+procedure TFirstSampleClientMainForm.CheckButtonClick(Sender: TObject);
+var
+ isFound: Boolean;
+ fullname: string;
+begin
+ isFound := fFirstService.CheckName(eNickname.Text);
+ fullname := IfThen(isFound,''''+fFirstService.FullNames(eNickname.Text)+'''','not found!');
+ ShowMessage(Format('''%s'' is %s',[eNickname.Text,fullname]));
+end;
+
+procedure TFirstSampleClientMainForm.VerifyButtonClick(Sender: TObject);
+var
+ isFound: Boolean;
+begin
+ isFound := fFirstService.VerifyName(eNickname2.Text, eFullname2.Text);
+ ShowMessage(IfThen(isFound, 'Verified!', 'Not verified!'));
+end;
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSampleServer.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSampleServer.bdsproj
new file mode 100644
index 0000000..f89940a
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSampleServer.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {19815A38-EA75-4CF1-99FC-6B703EEF63CE}
+
+
+
+
+ FirstSampleServer.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSampleServer.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSampleServer.dpr
new file mode 100644
index 0000000..7bbdf4e
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSampleServer.dpr
@@ -0,0 +1,19 @@
+program FirstSampleServer;
+
+{#ROGEN:FirstSample.rodl} // RemObjects: Careful, do not remove!
+
+uses
+ Forms,
+ FirstSample_Intf in 'FirstSample_Intf.pas',
+ FirstSample_Invk in 'FirstSample_Invk.pas',
+ FirstSampleService_Impl in 'FirstSampleService_Impl.pas' {FirstSampleService: TRORemoteDataModule},
+ FirstSampleServerMain in 'FirstSampleServerMain.pas' {FirstSampleServerMainForm};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TFirstSampleService, FirstSampleService);
+ Application.CreateForm(TFirstSampleServerMainForm, FirstSampleServerMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSampleServer.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSampleServer.dproj
new file mode 100644
index 0000000..432d218
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSampleServer.dproj
@@ -0,0 +1,77 @@
+
+
+ {9c04a9b4-5f94-42d6-94f6-41c3c6de8226}
+ FirstSampleServer.dpr
+ Debug
+ AnyCPU
+ DCC32
+ FirstSampleServer.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ FirstSampleServer.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSampleServer.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSampleServer.res
new file mode 100644
index 0000000..6560ede
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSampleServer.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSampleServerMain.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSampleServerMain.dfm
new file mode 100644
index 0000000..6c9b648
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSampleServerMain.dfm
@@ -0,0 +1,117 @@
+object FirstSampleServerMainForm: TFirstSampleServerMainForm
+ Left = 290
+ Top = 103
+ AutoScroll = False
+ BorderIcons = [biSystemMenu]
+ Caption = 'FirstSample Server'
+ ClientHeight = 470
+ ClientWidth = 245
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ PixelsPerInch = 96
+ TextHeight = 13
+ object ROPoweredByRemObjectsButton: TROPoweredByRemObjectsButton
+ Left = 16
+ Top = 0
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ end
+ object ValueListEditor: TValueListEditor
+ Left = 0
+ Top = 47
+ Width = 241
+ Height = 316
+ Align = alCustom
+ DisplayOptions = [doColumnTitles, doAutoColResize]
+ KeyOptions = [keyEdit, keyAdd, keyDelete, keyUnique]
+ Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goDrawFocusSelected, goColSizing, goEditing, goAlwaysShowEditor, goThumbTracking]
+ Strings.Strings = (
+ 'Fred=Fred Smith'
+ 'Tom=Tom Jones'
+ 'Carla=Carla Simon'
+ 'singer=Carla Simon'
+ 'Maria=Maria Anders'
+ 'Antonio=Antonio Moreno'
+ 'Hanna=Hanna Moos'
+ 'Victoria=Victoria Ashworth'
+ 'Yang=Yang Wang'
+ 'Pedro=Pedro Afonso'
+ 'Sven=Sven Ottlieb'
+ 'TJ=Tom Jones'
+ 'cs=Carla Simon')
+ TabOrder = 0
+ TitleCaptions.Strings = (
+ 'Nickname'
+ 'Full Name')
+ OnStringsChange = ValueListEditorStringsChange
+ OnValidate = ValueListEditorValidate
+ ColWidths = (
+ 145
+ 146)
+ end
+ object Memo1: TMemo
+ Left = 0
+ Top = 395
+ Width = 245
+ Height = 75
+ Align = alBottom
+ Font.Charset = ANSI_CHARSET
+ Font.Color = clNavy
+ Font.Height = -15
+ Font.Name = 'Arial'
+ Font.Style = [fsItalic]
+ Lines.Strings = (
+ 'Note: for the sake of simplicity, any '
+ 'changes made to the list above are '
+ 'not saved but, of course, adding '
+ 'persistence is very easy.')
+ ParentColor = True
+ ParentFont = False
+ ReadOnly = True
+ TabOrder = 1
+ end
+ object AddButton: TButton
+ Left = 32
+ Top = 369
+ Width = 75
+ Height = 22
+ Anchors = [akLeft, akBottom]
+ Caption = 'Add'
+ TabOrder = 2
+ OnClick = AddButtonClick
+ end
+ object DeleteButton: TButton
+ Left = 128
+ Top = 369
+ Width = 75
+ Height = 22
+ Anchors = [akLeft, akBottom]
+ Caption = 'Delete'
+ TabOrder = 3
+ OnClick = DeleteButtonClick
+ end
+ object ROServer: TROIndyHTTPServer
+ Active = True
+ Dispatchers = <
+ item
+ Name = 'BinMessage'
+ Message = BinMessage
+ Enabled = True
+ PathInfo = '/BIN'
+ end>
+ Port = 8099
+ Top = 304
+ end
+ object BinMessage: TROBinMessage
+ Left = 40
+ Top = 304
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSampleServerMain.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSampleServerMain.pas
new file mode 100644
index 0000000..7b7c0a4
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSampleServerMain.pas
@@ -0,0 +1,120 @@
+unit FirstSampleServerMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, uROPoweredByRemObjectsButton,
+ Grids, ValEdit, uROClient, uROBinMessage, uROServer, uROIndyTCPServer,
+ uROIndyHTTPServer, StdCtrls;
+
+type
+ TFirstSampleServerMainForm = class(TForm)
+ ValueListEditor: TValueListEditor;
+ ROServer: TROIndyHTTPServer;
+ BinMessage: TROBinMessage;
+ Memo1: TMemo;
+ AddButton: TButton;
+ DeleteButton: TButton;
+ ROPoweredByRemObjectsButton: TROPoweredByRemObjectsButton;
+ procedure FormCreate(Sender: TObject);
+ procedure DeleteButtonClick(Sender: TObject);
+ procedure AddButtonClick(Sender: TObject);
+ procedure ValueListEditorValidate(Sender: TObject; ACol, ARow: Integer;
+ const KeyName, KeyValue: string);
+ procedure FormDestroy(Sender: TObject);
+ procedure ValueListEditorStringsChange(Sender: TObject);
+ private
+ StrList: TStringList;
+ { Private declarations }
+ public
+ { Public declarations }
+ MultiReadSingleWriter: TMultiReadExclusiveWriteSynchronizer;
+
+ end;
+
+var
+ FirstSampleServerMainForm: TFirstSampleServerMainForm;
+
+implementation
+
+{$R *.dfm}
+
+procedure TFirstSampleServerMainForm.FormCreate(Sender: TObject);
+begin
+ ROServer.Active := true;
+ StrList := TStringList.Create;
+ StrList.Assign(ValueListEditor.Strings);
+ MultiReadSingleWriter := TMultiReadExclusiveWriteSynchronizer.Create;
+end;
+
+procedure TFirstSampleServerMainForm.DeleteButtonClick(Sender: TObject);
+var
+ fRect: TGridRect;
+begin
+ ValueListEditor.RestoreCurrentRow;
+ fRect := ValueListEditor.Selection;
+ if ValueListEditor.Keys[fRect.Top] = '' then Exit;
+ ValueListEditor.DeleteRow(Frect.Top);
+ ActiveControl := ValueListEditor;
+end;
+
+procedure TFirstSampleServerMainForm.AddButtonClick(Sender: TObject);
+var
+ i: integer;
+ fRect: TGridRect;
+begin
+ ActiveControl := ValueListEditor;
+ i := ValueListEditor.InsertRow('', '', True);
+ fRect.Left := 0;
+ fRect.Top := i;
+ fRect.Right := 0;
+ fRect.Bottom := i;
+ ValueListEditor.Selection := fRect;
+ ValueListEditor.EditorMode := True;
+end;
+
+procedure TFirstSampleServerMainForm.ValueListEditorValidate(Sender: TObject; ACol,
+ ARow: Integer; const KeyName, KeyValue: string);
+var
+ s: string;
+begin
+ while ValueListEditor.Cells[0, ARow] = '' do
+ if InputQuery('Enter nickname', 'Enter nickname for ''' + ValueListEditor.Cells[1, ARow] + ''':', s) then begin
+ ValueListEditor.Cells[0, ARow] := s;
+ end
+ else begin
+ ValueListEditor.RestoreCurrentRow;
+ ValueListEditor.DeleteRow(ARow);
+ Exit;
+ end;
+ while ValueListEditor.Cells[1, ARow] = '' do
+ if InputQuery('Enter Full Name', 'Enter Full Name for ''' + ValueListEditor.Cells[0, ARow] + ''':', s) then begin
+ ValueListEditor.Cells[1, ARow] := s;
+ end
+ else begin
+ ValueListEditor.RestoreCurrentRow;
+ ValueListEditor.DeleteRow(ARow);
+ Exit;
+ end;
+end;
+
+procedure TFirstSampleServerMainForm.FormDestroy(Sender: TObject);
+begin
+ StrList.Free;
+ MultiReadSingleWriter.Free;
+end;
+
+procedure TFirstSampleServerMainForm.ValueListEditorStringsChange(
+ Sender: TObject);
+begin
+ MultiReadSingleWriter.BeginWrite;
+ try
+ StrList.Assign(ValueListEditor.Strings);
+ finally
+ MultiReadSingleWriter.EndWrite;
+ end;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSampleService_Impl.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSampleService_Impl.dfm
new file mode 100644
index 0000000..1d89770
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSampleService_Impl.dfm
@@ -0,0 +1,7 @@
+object FirstSampleService: TFirstSampleService
+ OldCreateOrder = True
+ Left = 396
+ Top = 219
+ Height = 157
+ Width = 244
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSampleService_Impl.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSampleService_Impl.pas
new file mode 100644
index 0000000..116d3d3
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSampleService_Impl.pas
@@ -0,0 +1,111 @@
+unit FirstSampleService_Impl;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ This is where you are supposed to code the implementation of your objects. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils,
+ {RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
+ {Required:} uRORemoteDataModule,
+ {Generated:} FirstSample_Intf;
+
+type
+ { TFirstSampleService }
+ TFirstSampleService = class(TRORemoteDataModule, IFirstSampleService)
+ private
+ protected
+ { IFirstSampleService methods }
+ function Nicknames(const FullName: string): string;
+ function VerifyName(const NickName: string; const FullName: string): Boolean;
+ function CheckName(const NickName: string): Boolean;
+ function FullNames(const Nickname: string): string;
+ end;
+
+var
+ FirstSampleService: TFirstSampleService;
+
+implementation
+
+{$R *.dfm}
+uses
+ {Generated:} FirstSample_Invk, FirstSampleServerMain;
+
+procedure Create_FirstSampleService(out anInstance: IUnknown);
+begin
+ anInstance := TFirstSampleService.Create(nil);
+end;
+
+{ FirstSampleService }
+
+function TFirstSampleService.Nicknames(const FullName: string): string;
+var
+ i: integer;
+begin
+ Result := '';
+ with FirstSampleServerMainForm do begin
+ MultiReadSingleWriter.BeginRead;
+ try
+ with ValueListEditor.Strings do
+ for i := 0 to Count - 1 do
+ if (Fullname = '') or (CompareText(Values[Names[i]], FullName) = 0) then
+ Result := Result + ',' + Names[i];
+ finally
+ MultiReadSingleWriter.EndRead;
+ end;
+ end;
+ if Result <> '' then Delete(Result, 1, 1);
+end;
+
+function TFirstSampleService.VerifyName(const NickName: string; const FullName: string): Boolean;
+begin
+ with FirstSampleServerMainForm do begin
+ MultiReadSingleWriter.BeginRead;
+ try
+ with ValueListEditor.Strings do
+ Result := (IndexOfName(NickName) <> -1) and (CompareText(Values[NickName], FullName) = 0);
+ finally
+ MultiReadSingleWriter.EndRead;
+ end;
+ end;
+end;
+
+function TFirstSampleService.CheckName(const NickName: string): Boolean;
+begin
+ with FirstSampleServerMainForm do begin
+ MultiReadSingleWriter.BeginRead;
+ try
+ Result := ValueListEditor.Strings.IndexOfName(NickName) <> -1;
+ finally
+ MultiReadSingleWriter.EndRead;
+ end;
+ end;
+end;
+
+function TFirstSampleService.FullNames(const Nickname: string): string;
+begin
+ Result := '';
+ with FirstSampleServerMainForm do begin
+ MultiReadSingleWriter.BeginRead;
+ try
+ with ValueListEditor.Strings do
+ if IndexOfName(NickName) <> -1 then
+ Result := Values[NickName];
+ finally
+ MultiReadSingleWriter.EndRead;
+ end;
+ end;
+end;
+
+initialization
+ TROClassFactory.Create('FirstSampleService', Create_FirstSampleService, TFirstSampleService_Invoker);
+
+finalization
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSample_Intf.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSample_Intf.pas
new file mode 100644
index 0000000..0aba33e
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSample_Intf.pas
@@ -0,0 +1,144 @@
+unit FirstSample_Intf;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROClasses, uROClient, uROTypes, uROClientIntf;
+
+const
+ { Library ID }
+ LibraryUID = '{37D864AA-068E-457B-81C3-828305C09F88}';
+
+ { Service Interface ID's }
+ IFirstSampleService_IID : TGUID = '{BC25168D-B5BF-47F3-AE9D-0E457528F16E}';
+
+ { Event ID's }
+
+type
+ { Forward declarations }
+ IFirstSampleService = interface;
+
+
+ { IFirstSampleService }
+ IFirstSampleService = interface
+ ['{BC25168D-B5BF-47F3-AE9D-0E457528F16E}']
+ function Nicknames(const FullName: String): String;
+ function FullNames(const Nickname: String): String;
+ function VerifyName(const NickName: String; const FullName: String): Boolean;
+ function CheckName(const NickName: String): Boolean;
+ end;
+
+ { CoFirstSampleService }
+ CoFirstSampleService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IFirstSampleService;
+ end;
+
+ { TFirstSampleService_Proxy }
+ TFirstSampleService_Proxy = class(TROProxy, IFirstSampleService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ function Nicknames(const FullName: String): String;
+ function FullNames(const Nickname: String): String;
+ function VerifyName(const NickName: String; const FullName: String): Boolean;
+ function CheckName(const NickName: String): Boolean;
+ end;
+
+implementation
+
+uses
+ {vcl:} SysUtils,
+ {RemObjects:} uROEventRepository, uRORes;
+
+{ CoFirstSampleService }
+
+class function CoFirstSampleService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IFirstSampleService;
+begin
+ result := TFirstSampleService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TFirstSampleService_Proxy }
+
+function TFirstSampleService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'FirstSampleService';
+end;
+
+function TFirstSampleService_Proxy.Nicknames(const FullName: String): String;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'FirstSample', __InterfaceName, 'Nicknames');
+ __Message.Write('FullName', TypeInfo(String), FullName, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(String), result, []);
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+function TFirstSampleService_Proxy.FullNames(const Nickname: String): String;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'FirstSample', __InterfaceName, 'FullNames');
+ __Message.Write('Nickname', TypeInfo(String), Nickname, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(String), result, []);
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+function TFirstSampleService_Proxy.VerifyName(const NickName: String; const FullName: String): Boolean;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'FirstSample', __InterfaceName, 'VerifyName');
+ __Message.Write('NickName', TypeInfo(String), NickName, []);
+ __Message.Write('FullName', TypeInfo(String), FullName, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Boolean), result, []);
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+function TFirstSampleService_Proxy.CheckName(const NickName: String): Boolean;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'FirstSample', __InterfaceName, 'CheckName');
+ __Message.Write('NickName', TypeInfo(String), NickName, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Boolean), result, []);
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+initialization
+ RegisterProxyClass(IFirstSampleService_IID, TFirstSampleService_Proxy);
+
+
+finalization
+ UnregisterProxyClass(IFirstSampleService_IID);
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSample_Invk.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSample_Invk.pas
new file mode 100644
index 0000000..4f33275
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/FirstSample_Invk.pas
@@ -0,0 +1,114 @@
+unit FirstSample_Invk;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes,
+ {RemObjects:} uROServer, uROServerIntf, uROTypes, uROClientIntf,
+ {Generated:} FirstSample_Intf;
+
+type
+ TFirstSampleService_Invoker = class(TROInvoker)
+ private
+ protected
+ published
+ procedure Invoke_Nicknames(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_FullNames(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_VerifyName(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_CheckName(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ end;
+
+implementation
+
+uses
+ {RemObjects:} uRORes, uROClient;
+
+{ TFirstSampleService_Invoker }
+
+procedure TFirstSampleService_Invoker.Invoke_Nicknames(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function Nicknames(const FullName: String): String; }
+var
+ FullName: String;
+ lResult: String;
+begin
+ try
+ __Message.Read('FullName', TypeInfo(String), FullName, []);
+
+ lResult := (__Instance as IFirstSampleService).Nicknames(FullName);
+
+ __Message.InitializeResponseMessage(__Transport, 'FirstSample', 'FirstSampleService', 'NicknamesResponse');
+ __Message.Write('Result', TypeInfo(String), lResult, []);
+ __Message.Finalize;
+
+ finally
+ end;
+end;
+
+procedure TFirstSampleService_Invoker.Invoke_FullNames(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function FullNames(const Nickname: String): String; }
+var
+ Nickname: String;
+ lResult: String;
+begin
+ try
+ __Message.Read('Nickname', TypeInfo(String), Nickname, []);
+
+ lResult := (__Instance as IFirstSampleService).FullNames(Nickname);
+
+ __Message.InitializeResponseMessage(__Transport, 'FirstSample', 'FirstSampleService', 'FullNamesResponse');
+ __Message.Write('Result', TypeInfo(String), lResult, []);
+ __Message.Finalize;
+
+ finally
+ end;
+end;
+
+procedure TFirstSampleService_Invoker.Invoke_VerifyName(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function VerifyName(const NickName: String; const FullName: String): Boolean; }
+var
+ NickName: String;
+ FullName: String;
+ lResult: Boolean;
+begin
+ try
+ __Message.Read('NickName', TypeInfo(String), NickName, []);
+ __Message.Read('FullName', TypeInfo(String), FullName, []);
+
+ lResult := (__Instance as IFirstSampleService).VerifyName(NickName, FullName);
+
+ __Message.InitializeResponseMessage(__Transport, 'FirstSample', 'FirstSampleService', 'VerifyNameResponse');
+ __Message.Write('Result', TypeInfo(Boolean), lResult, []);
+ __Message.Finalize;
+
+ finally
+ end;
+end;
+
+procedure TFirstSampleService_Invoker.Invoke_CheckName(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function CheckName(const NickName: String): Boolean; }
+var
+ NickName: String;
+ lResult: Boolean;
+begin
+ try
+ __Message.Read('NickName', TypeInfo(String), NickName, []);
+
+ lResult := (__Instance as IFirstSampleService).CheckName(NickName);
+
+ __Message.InitializeResponseMessage(__Transport, 'FirstSample', 'FirstSampleService', 'CheckNameResponse');
+ __Message.Write('Result', TypeInfo(Boolean), lResult, []);
+ __Message.Finalize;
+
+ finally
+ end;
+end;
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/RODLFILE.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/RODLFILE.res
new file mode 100644
index 0000000..913b99b
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/First Sample/RODLFILE.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChat.Sample.html b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChat.Sample.html
new file mode 100644
index 0000000..1dadccb
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChat.Sample.html
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+ HTTP Chat Sample
+
+
+
+Purpose
+
+The Http Chat sample shows how to use polled events to create an HTTP based chat program.
+
+The clients poll every few seconds for new messages and the server distributes the messages to the appropriate client(s).
+
+
+ Testing
+
+ To test this sample properly, you need to run at least three clients:
+
+ send a message to all clients
+ send a message to selected clients
+ close a client via the server
+ logout a user and see the effect on the server and other clients
+ issue shutdown warning from server
+ deactivate server and try to send messages
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChat.bdsgroup b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChat.bdsgroup
new file mode 100644
index 0000000..a37961f
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChat.bdsgroup
@@ -0,0 +1,20 @@
+
+
+
+
+ Default.Personality
+
+ 1.0
+ {9C1F1DD0-84D6-4117-A9E1-09E22E4D2771}
+
+
+
+
+
+ HTTPChatServer.bdsproj
+ HTTPChatClient.bdsproj
+ HTTPChatServer.exe HTTPChatClient.exe
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChat.bpg b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChat.bpg
new file mode 100644
index 0000000..26dd181
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChat.bpg
@@ -0,0 +1,23 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = HTTPChatServer.exe HTTPChatClient.exe
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+HTTPChatClient.exe: HTTPChatClient.dpr
+ $(DCC)
+
+HTTPChatServer.exe: HTTPChatServer.dpr
+ $(DCC)
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChat.groupproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChat.groupproj
new file mode 100644
index 0000000..b2f65b5
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChat.groupproj
@@ -0,0 +1,40 @@
+
+
+ {c97fac85-2668-4287-ac6c-28cc66870612}
+
+
+
+
+ Default.Personality
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatClient.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatClient.bdsproj
new file mode 100644
index 0000000..7d580ba
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatClient.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {B063550E-483E-4E76-8D2A-B878065306BA}
+
+
+
+
+ HTTPChatClient.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatClient.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatClient.dpr
new file mode 100644
index 0000000..140a50e
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatClient.dpr
@@ -0,0 +1,15 @@
+program HTTPChatClient;
+
+uses
+ uROComInit,
+ Forms,
+ HTTPChatClientMain in 'HTTPChatClientMain.pas' {HTTPChatClientMainForm};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'HTTP Chat Client';
+ Application.CreateForm(THTTPChatClientMainForm, HTTPChatClientMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatClient.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatClient.dproj
new file mode 100644
index 0000000..22e493f
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatClient.dproj
@@ -0,0 +1,72 @@
+
+
+ {a02fd936-8bc1-497d-b99c-4c2c791df598}
+ HTTPChatClient.dpr
+ Debug
+ AnyCPU
+ DCC32
+ HTTPChatClient.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ HTTPChatClient.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatClient.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatClient.res
new file mode 100644
index 0000000..90e4219
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatClient.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatClientMain.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatClientMain.dfm
new file mode 100644
index 0000000..312fa7b
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatClientMain.dfm
@@ -0,0 +1,191 @@
+object HTTPChatClientMainForm: THTTPChatClientMainForm
+ Left = 398
+ Top = 191
+ BorderStyle = bsDialog
+ Caption = 'HTTP Chat Client'
+ ClientHeight = 449
+ ClientWidth = 368
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnClose = FormClose
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Label1: TLabel
+ Left = 3
+ Top = 33
+ Width = 40
+ Height = 13
+ Caption = 'User ID:'
+ end
+ object Label2: TLabel
+ Left = 3
+ Top = 8
+ Width = 36
+ Height = 13
+ Caption = 'Server:'
+ end
+ object ROPoweredByRemObjectsButton1: TROPoweredByRemObjectsButton
+ Left = 78
+ Top = 378
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ Anchors = [akLeft, akBottom]
+ ApplicationType = atClient
+ end
+ object Label3: TLabel
+ Left = 3
+ Top = 56
+ Width = 79
+ Height = 13
+ Caption = 'Message History'
+ end
+ object Label4: TLabel
+ Left = 216
+ Top = 56
+ Width = 69
+ Height = 13
+ Caption = 'Logged Users:'
+ end
+ object Memo: TMemo
+ Left = 3
+ Top = 72
+ Width = 207
+ Height = 258
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ TabOrder = 5
+ end
+ object eUserID: TEdit
+ Left = 45
+ Top = 29
+ Width = 180
+ Height = 21
+ Anchors = [akLeft, akTop, akRight]
+ TabOrder = 1
+ Text = 'JOHN'
+ end
+ object LoginButton: TBitBtn
+ Left = 229
+ Top = 27
+ Width = 67
+ Height = 25
+ Anchors = [akTop, akRight]
+ Caption = '&Login'
+ Default = True
+ TabOrder = 2
+ OnClick = LoginButtonClick
+ end
+ object LogoutButton: TBitBtn
+ Left = 299
+ Top = 27
+ Width = 67
+ Height = 25
+ Anchors = [akTop, akRight]
+ Caption = 'Log&out'
+ TabOrder = 3
+ OnClick = LogoutButtonClick
+ end
+ object eMessage: TEdit
+ Left = 3
+ Top = 335
+ Width = 298
+ Height = 21
+ Anchors = [akLeft, akRight, akBottom]
+ TabOrder = 7
+ OnChange = eMessageChange
+ end
+ object SendButton: TBitBtn
+ Left = 305
+ Top = 333
+ Width = 61
+ Height = 25
+ Anchors = [akRight, akBottom]
+ Caption = '&Send'
+ Default = True
+ TabOrder = 8
+ OnClick = SendButtonClick
+ end
+ object cbServer: TComboBox
+ Left = 45
+ Top = 4
+ Width = 322
+ Height = 21
+ Anchors = [akLeft, akTop, akRight]
+ ItemHeight = 13
+ ItemIndex = 0
+ TabOrder = 0
+ Text = 'http://localhost:8099/BIN'
+ Items.Strings = (
+ 'http://localhost:8099/BIN'
+ 'http://localhost:8101/BIN')
+ end
+ object lvLoggedUsers: TListView
+ Left = 216
+ Top = 72
+ Width = 148
+ Height = 258
+ Anchors = [akTop, akRight, akBottom]
+ Checkboxes = True
+ Columns = <>
+ TabOrder = 6
+ ViewStyle = vsList
+ end
+ object cbPrivateMessage: TCheckBox
+ Left = 3
+ Top = 359
+ Width = 158
+ Height = 17
+ Caption = 'Send Only to Selected Users'
+ TabOrder = 9
+ end
+ object StatusBar: TStatusBar
+ Left = 0
+ Top = 430
+ Width = 368
+ Height = 19
+ Panels = <>
+ SimplePanel = True
+ end
+ object RefreshButton: TButton
+ Left = 299
+ Top = 55
+ Width = 67
+ Height = 16
+ Caption = 'Refresh'
+ TabOrder = 4
+ OnClick = RefreshButtonClick
+ end
+ object ROMessage: TROBinMessage
+ Left = 127
+ Top = 147
+ end
+ object ROChannel: TROWinInetHTTPChannel
+ ServerLocators = <>
+ DispatchOptions = []
+ UserAgent = 'RemObjects SDK'
+ TargetURL = 'http://localhost:8099/BIN'
+ Left = 99
+ Top = 147
+ end
+ object svcChatService: TRORemoteService
+ Message = ROMessage
+ Channel = ROChannel
+ ServiceName = 'HTTPChatService'
+ Left = 155
+ Top = 147
+ end
+ object EventReceiver: TROEventReceiver
+ Interval = 1000
+ Message = ROMessage
+ Channel = ROChannel
+ ServiceName = 'HTTPChatService'
+ Left = 74
+ Top = 147
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatClientMain.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatClientMain.pas
new file mode 100644
index 0000000..dd76cd3
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatClientMain.pas
@@ -0,0 +1,293 @@
+unit HTTPChatClientMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
+ uROClientIntf, uRORemoteService, uROBinMessage, uROWinInetHTTPChannel,
+ Buttons, HTTPChatLibrary_Intf,
+ uRODynamicRequest, uROEventRepository,
+ uROPoweredByRemObjectsButton, uROClient, ComCtrls;
+
+type
+ TMessageType = (mtMessage, mtSystem);
+
+type
+ THTTPChatClientMainForm = class(TForm, IHTTPChatEvents, IHTTPChatServerEvents)
+ ROMessage: TROBinMessage;
+ ROChannel: TROWinInetHTTPChannel;
+ svcChatService: TRORemoteService;
+ Memo: TMemo;
+ Label1: TLabel;
+ eUserID: TEdit;
+ LoginButton: TBitBtn;
+ LogoutButton: TBitBtn;
+ eMessage: TEdit;
+ SendButton: TBitBtn;
+ EventReceiver: TROEventReceiver;
+ Label2: TLabel;
+ cbServer: TComboBox;
+ ROPoweredByRemObjectsButton1: TROPoweredByRemObjectsButton;
+ lvLoggedUsers: TListView;
+ Label3: TLabel;
+ Label4: TLabel;
+ cbPrivateMessage: TCheckBox;
+ StatusBar: TStatusBar;
+ RefreshButton: TButton;
+ procedure LoginButtonClick(Sender: TObject);
+ procedure LogoutButtonClick(Sender: TObject);
+ procedure SendButtonClick(Sender: TObject);
+ procedure eMessageChange(Sender: TObject);
+ procedure FormClose(Sender: TObject; var Action: TCloseAction);
+ procedure RefreshButtonClick(Sender: TObject);
+ private
+ fChatService: IHTTPChatService;
+ fLoggedIn: boolean;
+ fUsers: TUserInfoArray;
+
+ function GetUserID: string;
+ procedure ToggleControls;
+
+ procedure WriteMessage(aMessageType: TMessageType; const aSender, aMessage: string; IsPrivate: boolean = FALSE);
+
+ { IChatEvents }
+ procedure OnLogin(const aUserInfo: TUserInfo);
+ procedure OnLogout(const aUserID: string);
+ procedure OnSendMessage(const aSenderUserID: string; const aMessage: string; const aIsPrivateMessage: Boolean);
+
+ { IChatServerEvents }
+ procedure OnSystemShutdown(const aShutdownDelay: Integer; const aReason: string);
+ procedure OnMandatoryClose(const aClientID: string; const aReason: string);
+ procedure RefreshLoggedUserList;
+
+ public
+ constructor Create(aOwner: TComponent); override;
+ destructor Destroy; override;
+
+ property LoggedIn: boolean read fLoggedIn;
+ property UserID: string read GetUserID;
+
+ end;
+
+var
+ HTTPChatClientMainForm: THTTPChatClientMainForm;
+
+implementation
+
+uses StdConvs;
+
+{$R *.dfm}
+
+constructor THTTPChatClientMainForm.Create(aOwner: TComponent);
+begin
+ inherited;
+
+ fChatService := (svcChatService as IHTTPChatService);
+
+ eUserID.Text := eUserID.Text + FormatDateTime('HHMMSS', Now);
+ ToggleControls;
+end;
+
+destructor THTTPChatClientMainForm.Destroy;
+begin
+ FreeAndNIL(fUsers);
+
+ inherited;
+end;
+
+function THTTPChatClientMainForm.GetUserID: string;
+begin
+ result := Trim(eUserID.Text);
+end;
+
+procedure THTTPChatClientMainForm.ToggleControls;
+begin
+ eUserID.Enabled := not LoggedIn;
+ LoginButton.Enabled := not LoggedIn;
+ LogoutButton.Enabled := LoggedIn;
+ Memo.Enabled := LoggedIn;
+ SendButton.Enabled := LoggedIn;
+end;
+
+procedure THTTPChatClientMainForm.SendButtonClick(Sender: TObject);
+var
+ destination: string;
+ i: integer;
+ userinfo: TUserInfo;
+begin
+ { If this is a private message, then builds the list of receivers }
+ destination := '';
+ if cbPrivateMessage.Checked then begin
+ for i := 0 to (lvLoggedUsers.Items.Count - 1) do begin
+ if lvLoggedUsers.Items[i].Checked then begin
+ userinfo := lvLoggedUsers.Items[i].Data;
+ destination := destination + userinfo.SessionID + ',';
+ end;
+ end;
+
+ if (destination = '') then begin
+ Beep;
+ MessageDlg('Select one or more recipients for your private message first', mtError, [mbOK], 0);
+ Exit;
+ end;
+ end;
+
+ { Sends the message }
+ fChatService.SendMessage(eMessage.Text, Copy(destination, 1, Length(destination) - 1));
+ eMessage.Text := '';
+ eMessage.SetFocus;
+end;
+
+procedure THTTPChatClientMainForm.WriteMessage(aMessageType: TMessageType;
+ const aSender, aMessage: string;
+ IsPrivate: boolean = FALSE);
+var
+ line: string;
+begin
+ case aMessageType of
+ mtSystem: line := 'SYS>' + aMessage;
+ mtMessage: line := aSender + '>' + aMessage;
+ end;
+
+ if IsPrivate then line := '[PRIVATE] ' + line;
+ Memo.Lines.Add(line);
+end;
+
+procedure THTTPChatClientMainForm.LoginButtonClick(Sender: TObject);
+begin
+ try
+ ROChannel.TargetURL := cbServer.Text;
+
+ { Calls the remote login method }
+ ROMessage.ClientID := StringToGUID(fChatService.Login(UserID));
+ StatusBar.SimpleText := GUIDToString(ROMessage.ClientID);
+
+ fUsers := fChatService.GetLoggedUsers;
+ RefreshLoggedUserList;
+
+ { Register the event handlers }
+ EventReceiver.RegisterEventHandlers([EID_HTTPChatEvents, EID_HTTPChatServerEvents], [Self, Self]);
+
+ { Starts polling }
+ EventReceiver.Active := TRUE;
+
+ fLoggedIn := TRUE;
+ finally
+ ToggleControls;
+ end;
+end;
+
+procedure THTTPChatClientMainForm.LogoutButtonClick(Sender: TObject);
+begin
+ try
+ EventReceiver.Active := FALSE; // Stops polling for messages
+ EventReceiver.UnregisterEventHandlers([EID_HTTPChatEvents, EID_HTTPChatServerEvents]); // Unregisters the event handlers
+
+ fChatService.Logout;
+
+ FreeAndNIL(fUsers);
+
+ fLoggedIn := FALSE;
+ finally
+ RefreshLoggedUserList;
+ ToggleControls;
+ end;
+end;
+
+procedure THTTPChatClientMainForm.RefreshLoggedUserList;
+var
+ i: integer;
+begin
+ lvLoggedUsers.Items.BeginUpdate;
+ lvLoggedUsers.Items.Clear;
+ try
+ if (fUsers = nil) then Exit; // After Logout
+
+ for i := 0 to (fUsers.Count - 1) do begin
+ if fUsers[i].UserID = UserID then Continue; // Skips itself
+
+ with lvLoggedUsers.Items.Add do begin
+ Caption := fUsers[i].UserID;
+ Data := fUsers[i];
+ end;
+ end;
+ finally
+ lvLoggedUsers.Items.EndUpdate;
+ end;
+end;
+
+// ChatEvents implementation
+
+procedure THTTPChatClientMainForm.OnLogin(const aUserInfo: TUserInfo);
+begin
+ WriteMessage(mtSystem, '', 'User ' + aUserInfo.UserID + ' just logged in');
+
+ fUsers.Add(aUserInfo);
+ EventReceiver.RetainObject(aUserInfo);
+
+ RefreshLoggedUserList;
+end;
+
+procedure THTTPChatClientMainForm.OnLogout(const aUserID: string);
+var
+ idx: integer;
+begin
+ WriteMessage(mtSystem, '', 'User ' + aUserID + ' logged out');
+
+ idx := fUsers.GetIndex('UserID', aUserID);
+ if (idx >= 0) then begin
+ fUsers.Delete(idx);
+ RefreshLoggedUserList;
+ end;
+end;
+
+procedure THTTPChatClientMainForm.OnSendMessage(const aSenderUserID: string; const aMessage: string; const aIsPrivateMessage: Boolean);
+begin
+ WriteMessage(mtMessage, aSenderUserID, aMessage, aIsPrivateMessage);
+end;
+
+procedure THTTPChatClientMainForm.eMessageChange(Sender: TObject);
+begin
+ SendButton.Enabled := (eMessage.Text <> '') and LoggedIn
+end;
+
+procedure THTTPChatClientMainForm.FormClose(Sender: TObject; var Action: TCloseAction);
+begin
+ try
+ if LogoutButton.Enabled then
+ LogoutButton.Click;
+ except
+ end;
+end;
+
+procedure THTTPChatClientMainForm.OnMandatoryClose(const aClientID: string; const aReason: string);
+var
+ thisclientid: string;
+begin
+ thisclientid := GUIDToString(EventReceiver.ClientID);
+ if (aClientID = thisclientid) then begin
+
+ LogoutButton.Click;
+
+ Beep;
+ MessageDlg('You''ve been disconnected from the server.'#13'Reason: ' + aReason, mtWarning, [mbOK], 0);
+
+ Close;
+ end;
+end;
+
+procedure THTTPChatClientMainForm.OnSystemShutdown(const aShutdownDelay: Integer;
+ const aReason: string);
+begin
+ Beep;
+ MessageDlg(Format('The server will be shut down in %d minutes.'#13'Reason: %s', [aShutdownDelay, aReason]), mtWarning, [mbOK], 0);
+end;
+
+procedure THTTPChatClientMainForm.RefreshButtonClick(Sender: TObject);
+begin
+ fUsers:= fChatService.GetLoggedUsers;
+ RefreshLoggedUserList;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatLibrary.rodl b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatLibrary.rodl
new file mode 100644
index 0000000..75bbfb7
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatLibrary.rodl
@@ -0,0 +1,115 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatLibrary_Intf.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatLibrary_Intf.pas
new file mode 100644
index 0000000..3ed593a
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatLibrary_Intf.pas
@@ -0,0 +1,661 @@
+unit HTTPChatLibrary_Intf;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROClasses, uROClient, uROTypes, uROClientIntf;
+
+const
+ { Library ID }
+ LibraryUID = '{FAC89BC0-FECD-410B-8A96-D03A60C8301B}';
+
+ { Service Interface ID's }
+ IHTTPChatService_IID : TGUID = '{6893042C-3354-4AE6-B5FA-E7A637475C30}';
+
+ { Event ID's }
+ EID_HTTPChatEvents = 'HTTPChatEvents';
+ EID_HTTPChatServerEvents = 'HTTPChatServerEvents';
+
+type
+ { Forward declarations }
+ IHTTPChatService = interface;
+
+ TUserInfoArray = class;
+
+ TUserInfo = class;
+
+ IHTTPChatEvents = interface;
+ IHTTPChatServerEvents = interface;
+
+
+ { TUserInfo }
+ TUserInfo = class(TROComplexType)
+ private
+ fUserID: String;
+ fSessionID: String;
+ public
+ procedure Assign(iSource: TPersistent); override;
+ published
+ property UserID:String read fUserID write fUserID;
+ property SessionID:String read fSessionID write fSessionID;
+ end;
+
+ { TUserInfoCollection }
+ TUserInfoCollection = class(TROCollection)
+ protected
+ constructor Create(aItemClass: TCollectionItemClass); overload;
+ function GetItems(Index: integer): TUserInfo;
+ procedure SetItems(Index: integer; const Value: TUserInfo);
+ public
+ constructor Create; overload;
+ function Add: TUserInfo; reintroduce;
+ procedure SaveToArray(anArray: TUserInfoArray);
+ procedure LoadFromArray(anArray: TUserInfoArray);
+ property Items[Index: integer]:TUserInfo read GetItems write SetItems; default;
+ end;
+
+ { TUserInfoArray }
+ TUserInfoArray = class(TROArray)
+ private
+ fCount: Integer;
+ fItems : array of TUserInfo;
+ protected
+ procedure Grow; virtual;
+ function GetItems(Index: integer): TUserInfo;
+ procedure SetItems(Index: integer; const Value: TUserInfo);
+ function GetCount: integer; override;
+ public
+ class function GetItemType: PTypeInfo; override;
+ class function GetItemClass: TClass; override;
+ class function GetItemSize: integer; override;
+ function GetItemRef(Index: integer): pointer; override;
+ procedure SetItemRef(Index: integer; Ref: pointer); override;
+ procedure Clear; override;
+ procedure Delete(Index: integer); override;
+ procedure Resize(ElementCount: integer); override;
+
+ procedure Assign(iSource:TPersistent); override;
+ function Add: TUserInfo; overload;
+ function Add(const Value: TUserInfo):integer; overload;
+
+ property Count : integer read GetCount;
+ property Items[Index: integer]:TUserInfo read GetItems write SetItems; default;
+ end;
+
+ { IHTTPChatService }
+ IHTTPChatService = interface
+ ['{6893042C-3354-4AE6-B5FA-E7A637475C30}']
+ function Login(const aUserID: String): String;
+ procedure Logout;
+ procedure SendMessage(const aMessageText: String; const aDestination: String);
+ function GetLoggedUsers: TUserInfoArray;
+ end;
+
+ { CoHTTPChatService }
+ CoHTTPChatService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IHTTPChatService;
+ end;
+
+ { THTTPChatService_Proxy }
+ THTTPChatService_Proxy = class(TROProxy, IHTTPChatService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ function Login(const aUserID: String): String;
+ procedure Logout;
+ procedure SendMessage(const aMessageText: String; const aDestination: String);
+ function GetLoggedUsers: TUserInfoArray;
+ end;
+
+ { IHTTPChatEvents }
+ IHTTPChatEvents = interface
+ ['{75F9A466-518A-4B09-9DC4-9272B1EEFD95}']
+ procedure OnLogin(const aUserInfo: TUserInfo);
+ procedure OnLogout(const aUserID: String);
+ procedure OnSendMessage(const aSenderUserID: String; const aMessage: String; const aIsPrivateMessage: Boolean);
+ end;
+
+ { IHTTPChatEvents_Writer }
+ IHTTPChatEvents_Writer = interface(IROEventsWriter)
+ ['{75F9A466-518A-4B09-9DC4-9272B1EEFD95}']
+ procedure OnLogin(const __Sender : TGUID; const aUserInfo: TUserInfo);
+ procedure OnLogout(const __Sender : TGUID; const aUserID: String);
+ procedure OnSendMessage(const __Sender : TGUID; const aSenderUserID: String; const aMessage: String; const aIsPrivateMessage: Boolean);
+ end;
+
+ { IHTTPChatServerEvents }
+ IHTTPChatServerEvents = interface
+ ['{E80B0A2E-96ED-4F38-A6AC-E4E0B59F27F3}']
+ procedure OnSystemShutdown(const aShutdownDelay: Integer; const aReason: String);
+ procedure OnMandatoryClose(const aClientID: String; const aReason: String);
+ end;
+
+ { IHTTPChatServerEvents_Writer }
+ IHTTPChatServerEvents_Writer = interface(IROEventsWriter)
+ ['{E80B0A2E-96ED-4F38-A6AC-E4E0B59F27F3}']
+ procedure OnSystemShutdown(const __Sender : TGUID; const aShutdownDelay: Integer; const aReason: String);
+ procedure OnMandatoryClose(const __Sender : TGUID; const aClientID: String; const aReason: String);
+ end;
+
+implementation
+
+uses
+ {vcl:} SysUtils,
+ {RemObjects:} uROEventRepository, uRORes;
+
+{ TUserInfoArray }
+
+procedure TUserInfoArray.Assign(iSource: TPersistent);
+var lSource:TUserInfoArray;
+ i:integer;
+begin
+ if (iSource is TUserInfoArray) then begin
+ lSource := TUserInfoArray(iSource);
+ Clear();
+ Resize(lSource.Count);
+ for i := 0 to Count-1 do begin
+ if Assigned(lSource.Items[i]) then begin
+ Items[i] := lSource.Items[i].Clone() as TUserInfo;
+ end;
+ end;
+ end
+ else begin
+ inherited Assign(iSource);
+ end;
+end;
+
+class function TUserInfoArray.GetItemType: PTypeInfo;
+begin
+ result := TypeInfo(TUserInfo);
+end;
+
+class function TUserInfoArray.GetItemClass: TClass;
+begin
+ result := TUserInfo;
+end;
+
+class function TUserInfoArray.GetItemSize: integer;
+begin
+ result := SizeOf(TUserInfo);
+end;
+
+function TUserInfoArray.GetItems(Index: integer): TUserInfo;
+begin
+ if (Index < 0) or (Index >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[Index]);
+ result := fItems[Index];
+end;
+
+function TUserInfoArray.GetItemRef(Index: integer): pointer;
+begin
+ if (Index < 0) or (Index >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[Index]);
+ result := fItems[Index];
+end;
+
+procedure TUserInfoArray.SetItemRef(Index: integer; Ref: pointer);
+begin
+ if (Index < 0) or (Index >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[Index]);
+ if Ref <> fItems[Index] then
+ fItems[Index] := Ref;
+end;
+
+procedure TUserInfoArray.Clear;
+var i: integer;
+begin
+ for i := 0 to (Count-1) do fItems[i].Free();
+ SetLength(fItems, 0);
+ FCount := 0;
+end;
+
+procedure TUserInfoArray.Delete(Index: integer);
+var i: integer;
+begin
+ if (Index>=Count) then RaiseError(err_InvalidIndex, [Index]);
+
+ fItems[Index].Free();
+
+ if (Index= Count) then RaiseError(err_ArrayIndexOutOfBounds,[Index]);
+ fItems[Index] := Value;
+end;
+
+procedure TUserInfoArray.Resize(ElementCount: integer);
+begin
+ SetLength(fItems, ElementCount);
+ FCount := ElementCount;
+end;
+
+function TUserInfoArray.GetCount: integer;
+begin
+ result := FCount;
+end;
+
+procedure TUserInfoArray.Grow;
+var
+ Delta, Capacity: Integer;
+begin
+ Capacity := Length(fItems);
+ if Capacity > 64 then
+ Delta := Capacity div 4
+ else
+ if Capacity > 8 then
+ Delta := 16
+ else
+ Delta := 4;
+ SetLength(fItems, Capacity + Delta);
+end;
+
+function TUserInfoArray.Add: TUserInfo;
+begin
+ result := TUserInfo.Create;
+ Add(Result);
+end;
+
+function TUserInfoArray.Add(const Value:TUserInfo): integer;
+begin
+ Result := Count;
+ if Length(fItems) = Result then
+ Grow;
+ fItems[result] := Value;
+ Inc(fCount);
+end;
+
+{ TUserInfo }
+
+procedure TUserInfo.Assign(iSource: TPersistent);
+var lSource:TUserInfo;
+begin
+ inherited Assign(iSource);
+ if (iSource is TUserInfo) then begin
+ lSource := TUserInfo(iSource);
+ UserID := lSource.UserID;
+ SessionID := lSource.SessionID;
+ end;
+end;
+
+{ TUserInfoCollection }
+constructor TUserInfoCollection.Create;
+begin
+ inherited Create(TUserInfo);
+end;
+
+constructor TUserInfoCollection.Create(aItemClass: TCollectionItemClass);
+begin
+ inherited Create(aItemClass);
+end;
+
+function TUserInfoCollection.Add: TUserInfo;
+begin
+ result := TUserInfo(inherited Add);
+end;
+
+function TUserInfoCollection.GetItems(Index: integer): TUserInfo;
+begin
+ result := TUserInfo(inherited Items[Index]);
+end;
+
+procedure TUserInfoCollection.LoadFromArray(anArray: TUserInfoArray);
+var i : integer;
+begin
+ Clear;
+ for i := 0 to (anArray.Count-1) do
+ Add.Assign(anArray[i]);
+end;
+
+procedure TUserInfoCollection.SaveToArray(anArray: TUserInfoArray);
+var i : integer;
+begin
+ anArray.Clear;
+ anArray.Resize(Count);
+ for i := 0 to (Count-1) do begin
+ anArray[i] := TUserInfo.Create;
+ anArray[i].Assign(Items[i]);
+ end;
+end;
+
+procedure TUserInfoCollection.SetItems(Index: integer; const Value: TUserInfo);
+begin
+ TUserInfo(inherited Items[Index]).Assign(Value);
+end;
+
+{ CoHTTPChatService }
+
+class function CoHTTPChatService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IHTTPChatService;
+begin
+ result := THTTPChatService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+{ THTTPChatService_Proxy }
+
+function THTTPChatService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'HTTPChatService';
+end;
+
+function THTTPChatService_Proxy.Login(const aUserID: String): String;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'HTTPChatLibrary', __InterfaceName, 'Login');
+ __Message.Write('aUserID', TypeInfo(String), aUserID, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(String), result, []);
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+procedure THTTPChatService_Proxy.Logout;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'HTTPChatLibrary', __InterfaceName, 'Logout');
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+procedure THTTPChatService_Proxy.SendMessage(const aMessageText: String; const aDestination: String);
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'HTTPChatLibrary', __InterfaceName, 'SendMessage');
+ __Message.Write('aMessageText', TypeInfo(String), aMessageText, []);
+ __Message.Write('aDestination', TypeInfo(String), aDestination, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+function THTTPChatService_Proxy.GetLoggedUsers: TUserInfoArray;
+begin
+ try
+ result := nil;
+ __Message.InitializeRequestMessage(__TransportChannel, 'HTTPChatLibrary', __InterfaceName, 'GetLoggedUsers');
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(HTTPChatLibrary_Intf.TUserInfoArray), result, []);
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+type
+ { THTTPChatEvents_Writer }
+ THTTPChatEvents_Writer = class(TROEventWriter, IHTTPChatEvents_Writer)
+ protected
+ procedure OnLogin(const __Sender : TGUID; const aUserInfo: TUserInfo);
+ procedure OnLogout(const __Sender : TGUID; const aUserID: String);
+ procedure OnSendMessage(const __Sender : TGUID; const aSenderUserID: String; const aMessage: String; const aIsPrivateMessage: Boolean);
+ end;
+
+procedure THTTPChatEvents_Writer.OnLogin(const __Sender : TGUID; const aUserInfo: TUserInfo);
+var __eventdata : Binary;
+begin
+ __eventdata := Binary.Create;
+ try
+ __Message.InitializeEventMessage(NIL, 'HTTPChatLibrary', EID_HTTPChatEvents, 'OnLogin');
+ __Message.Write('aUserInfo', TypeInfo(TUserInfo), aUserInfo, []);
+ __Message.Finalize;
+
+ __Message.WriteToStream(__eventdata);
+
+ Repository.StoreEventData(__Sender, __eventdata, ExcludeSender, ExcludeSessionList, SessionList.CommaText);
+ except
+ __eventdata.Free;
+ end;
+end;
+
+procedure THTTPChatEvents_Writer.OnLogout(const __Sender : TGUID; const aUserID: String);
+var __eventdata : Binary;
+begin
+ __eventdata := Binary.Create;
+ try
+ __Message.InitializeEventMessage(NIL, 'HTTPChatLibrary', EID_HTTPChatEvents, 'OnLogout');
+ __Message.Write('aUserID', TypeInfo(String), aUserID, []);
+ __Message.Finalize;
+
+ __Message.WriteToStream(__eventdata);
+
+ Repository.StoreEventData(__Sender, __eventdata, ExcludeSender, ExcludeSessionList, SessionList.CommaText);
+ except
+ __eventdata.Free;
+ end;
+end;
+
+procedure THTTPChatEvents_Writer.OnSendMessage(const __Sender : TGUID; const aSenderUserID: String; const aMessage: String; const aIsPrivateMessage: Boolean);
+var __eventdata : Binary;
+begin
+ __eventdata := Binary.Create;
+ try
+ __Message.InitializeEventMessage(NIL, 'HTTPChatLibrary', EID_HTTPChatEvents, 'OnSendMessage');
+ __Message.Write('aSenderUserID', TypeInfo(String), aSenderUserID, []);
+ __Message.Write('aMessage', TypeInfo(String), aMessage, []);
+ __Message.Write('aIsPrivateMessage', TypeInfo(Boolean), aIsPrivateMessage, []);
+ __Message.Finalize;
+
+ __Message.WriteToStream(__eventdata);
+
+ Repository.StoreEventData(__Sender, __eventdata, ExcludeSender, ExcludeSessionList, SessionList.CommaText);
+ except
+ __eventdata.Free;
+ end;
+end;
+
+type
+ { THTTPChatEvents_Invoker }
+ THTTPChatEvents_Invoker = class(TROEventInvoker)
+ published
+ procedure Invoke_OnLogin(__EventReceiver : TROEventReceiver; const __Message : IROMessage; const __Target : IUnknown);
+ procedure Invoke_OnLogout(__EventReceiver : TROEventReceiver; const __Message : IROMessage; const __Target : IUnknown);
+ procedure Invoke_OnSendMessage(__EventReceiver : TROEventReceiver; const __Message : IROMessage; const __Target : IUnknown);
+ end;
+
+procedure THTTPChatEvents_Invoker.Invoke_OnLogin(__EventReceiver : TROEventReceiver; const __Message : IROMessage; const __Target : IUnknown);
+var
+__lObjectDisposer: TROObjectDisposer;
+ aUserInfo: TUserInfo;
+begin
+ aUserInfo := NIL;
+
+ try
+ __Message.Read('aUserInfo', TypeInfo(TUserInfo), aUserInfo, []);
+
+ (__Target as IHTTPChatEvents).OnLogin(aUserInfo);
+
+ finally
+ __lObjectDisposer:= TROObjectDisposer.Create(__EventReceiver);
+ try
+ __lObjectDisposer.Add(aUserInfo);
+ finally
+ __lObjectDisposer.Free();
+ end
+ end
+end;
+
+procedure THTTPChatEvents_Invoker.Invoke_OnLogout(__EventReceiver : TROEventReceiver; const __Message : IROMessage; const __Target : IUnknown);
+var
+__lObjectDisposer: TROObjectDisposer;
+ aUserID: String;
+begin
+
+ try
+ __Message.Read('aUserID', TypeInfo(String), aUserID, []);
+
+ (__Target as IHTTPChatEvents).OnLogout(aUserID);
+
+ finally
+ __lObjectDisposer:= TROObjectDisposer.Create(__EventReceiver);
+ try
+ finally
+ __lObjectDisposer.Free();
+ end
+ end
+end;
+
+procedure THTTPChatEvents_Invoker.Invoke_OnSendMessage(__EventReceiver : TROEventReceiver; const __Message : IROMessage; const __Target : IUnknown);
+var
+__lObjectDisposer: TROObjectDisposer;
+ aSenderUserID: String;
+ aMessage: String;
+ aIsPrivateMessage: Boolean;
+begin
+
+ try
+ __Message.Read('aSenderUserID', TypeInfo(String), aSenderUserID, []);
+ __Message.Read('aMessage', TypeInfo(String), aMessage, []);
+ __Message.Read('aIsPrivateMessage', TypeInfo(Boolean), aIsPrivateMessage, []);
+
+ (__Target as IHTTPChatEvents).OnSendMessage(aSenderUserID, aMessage, aIsPrivateMessage);
+
+ finally
+ __lObjectDisposer:= TROObjectDisposer.Create(__EventReceiver);
+ try
+ finally
+ __lObjectDisposer.Free();
+ end
+ end
+end;
+
+type
+ { THTTPChatServerEvents_Writer }
+ THTTPChatServerEvents_Writer = class(TROEventWriter, IHTTPChatServerEvents_Writer)
+ protected
+ procedure OnSystemShutdown(const __Sender : TGUID; const aShutdownDelay: Integer; const aReason: String);
+ procedure OnMandatoryClose(const __Sender : TGUID; const aClientID: String; const aReason: String);
+ end;
+
+procedure THTTPChatServerEvents_Writer.OnSystemShutdown(const __Sender : TGUID; const aShutdownDelay: Integer; const aReason: String);
+var __eventdata : Binary;
+begin
+ __eventdata := Binary.Create;
+ try
+ __Message.InitializeEventMessage(NIL, 'HTTPChatLibrary', EID_HTTPChatServerEvents, 'OnSystemShutdown');
+ __Message.Write('aShutdownDelay', TypeInfo(Integer), aShutdownDelay, []);
+ __Message.Write('aReason', TypeInfo(String), aReason, []);
+ __Message.Finalize;
+
+ __Message.WriteToStream(__eventdata);
+
+ Repository.StoreEventData(__Sender, __eventdata, ExcludeSender, ExcludeSessionList, SessionList.CommaText);
+ except
+ __eventdata.Free;
+ end;
+end;
+
+procedure THTTPChatServerEvents_Writer.OnMandatoryClose(const __Sender : TGUID; const aClientID: String; const aReason: String);
+var __eventdata : Binary;
+begin
+ __eventdata := Binary.Create;
+ try
+ __Message.InitializeEventMessage(NIL, 'HTTPChatLibrary', EID_HTTPChatServerEvents, 'OnMandatoryClose');
+ __Message.Write('aClientID', TypeInfo(String), aClientID, []);
+ __Message.Write('aReason', TypeInfo(String), aReason, []);
+ __Message.Finalize;
+
+ __Message.WriteToStream(__eventdata);
+
+ Repository.StoreEventData(__Sender, __eventdata, ExcludeSender, ExcludeSessionList, SessionList.CommaText);
+ except
+ __eventdata.Free;
+ end;
+end;
+
+type
+ { THTTPChatServerEvents_Invoker }
+ THTTPChatServerEvents_Invoker = class(TROEventInvoker)
+ published
+ procedure Invoke_OnSystemShutdown(__EventReceiver : TROEventReceiver; const __Message : IROMessage; const __Target : IUnknown);
+ procedure Invoke_OnMandatoryClose(__EventReceiver : TROEventReceiver; const __Message : IROMessage; const __Target : IUnknown);
+ end;
+
+procedure THTTPChatServerEvents_Invoker.Invoke_OnSystemShutdown(__EventReceiver : TROEventReceiver; const __Message : IROMessage; const __Target : IUnknown);
+var
+__lObjectDisposer: TROObjectDisposer;
+ aShutdownDelay: Integer;
+ aReason: String;
+begin
+
+ try
+ __Message.Read('aShutdownDelay', TypeInfo(Integer), aShutdownDelay, []);
+ __Message.Read('aReason', TypeInfo(String), aReason, []);
+
+ (__Target as IHTTPChatServerEvents).OnSystemShutdown(aShutdownDelay, aReason);
+
+ finally
+ __lObjectDisposer:= TROObjectDisposer.Create(__EventReceiver);
+ try
+ finally
+ __lObjectDisposer.Free();
+ end
+ end
+end;
+
+procedure THTTPChatServerEvents_Invoker.Invoke_OnMandatoryClose(__EventReceiver : TROEventReceiver; const __Message : IROMessage; const __Target : IUnknown);
+var
+__lObjectDisposer: TROObjectDisposer;
+ aClientID: String;
+ aReason: String;
+begin
+
+ try
+ __Message.Read('aClientID', TypeInfo(String), aClientID, []);
+ __Message.Read('aReason', TypeInfo(String), aReason, []);
+
+ (__Target as IHTTPChatServerEvents).OnMandatoryClose(aClientID, aReason);
+
+ finally
+ __lObjectDisposer:= TROObjectDisposer.Create(__EventReceiver);
+ try
+ finally
+ __lObjectDisposer.Free();
+ end
+ end
+end;
+
+initialization
+ RegisterROClass(TUserInfo);
+ RegisterROClass(TUserInfoArray);
+ RegisterProxyClass(IHTTPChatService_IID, THTTPChatService_Proxy);
+
+ RegisterEventWriterClass(IHTTPChatEvents_Writer, THTTPChatEvents_Writer);
+ RegisterEventInvokerClass(EID_HTTPChatEvents, THTTPChatEvents_Invoker);
+ RegisterEventWriterClass(IHTTPChatServerEvents_Writer, THTTPChatServerEvents_Writer);
+ RegisterEventInvokerClass(EID_HTTPChatServerEvents, THTTPChatServerEvents_Invoker);
+
+finalization
+ UnregisterROClass(TUserInfo);
+ UnregisterROClass(TUserInfoArray);
+ UnregisterProxyClass(IHTTPChatService_IID);
+
+ UnregisterEventWriterClass(IHTTPChatEvents_Writer);
+ UnregisterEventInvokerClass(EID_HTTPChatEvents);
+ UnregisterEventWriterClass(IHTTPChatServerEvents_Writer);
+ UnregisterEventInvokerClass(EID_HTTPChatServerEvents);
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatLibrary_Invk.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatLibrary_Invk.pas
new file mode 100644
index 0000000..f9dc88c
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatLibrary_Invk.pas
@@ -0,0 +1,111 @@
+unit HTTPChatLibrary_Invk;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes,
+ {RemObjects:} uROServer, uROServerIntf, uROTypes, uROClientIntf,
+ {Generated:} HTTPChatLibrary_Intf;
+
+type
+ THTTPChatService_Invoker = class(TROInvoker)
+ private
+ protected
+ published
+ procedure Invoke_Login(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_Logout(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_SendMessage(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_GetLoggedUsers(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ end;
+
+implementation
+
+uses
+ {RemObjects:} uRORes, uROClient;
+
+{ THTTPChatService_Invoker }
+
+procedure THTTPChatService_Invoker.Invoke_Login(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function Login(const aUserID: String): String; }
+var
+ aUserID: String;
+ lResult: String;
+begin
+ try
+ __Message.Read('aUserID', TypeInfo(String), aUserID, []);
+
+ lResult := (__Instance as IHTTPChatService).Login(aUserID);
+
+ __Message.InitializeResponseMessage(__Transport, 'HTTPChatLibrary', 'HTTPChatService', 'LoginResponse');
+ __Message.Write('Result', TypeInfo(String), lResult, []);
+ __Message.Finalize;
+
+ finally
+ end;
+end;
+
+procedure THTTPChatService_Invoker.Invoke_Logout(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ procedure Logout; }
+begin
+ try
+ (__Instance as IHTTPChatService).Logout;
+
+ __Message.InitializeResponseMessage(__Transport, 'HTTPChatLibrary', 'HTTPChatService', 'LogoutResponse');
+ __Message.Finalize;
+
+ finally
+ end;
+end;
+
+procedure THTTPChatService_Invoker.Invoke_SendMessage(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ procedure SendMessage(const aMessageText: String; const aDestination: String); }
+var
+ aMessageText: String;
+ aDestination: String;
+begin
+ try
+ __Message.Read('aMessageText', TypeInfo(String), aMessageText, []);
+ __Message.Read('aDestination', TypeInfo(String), aDestination, []);
+
+ (__Instance as IHTTPChatService).SendMessage(aMessageText, aDestination);
+
+ __Message.InitializeResponseMessage(__Transport, 'HTTPChatLibrary', 'HTTPChatService', 'SendMessageResponse');
+ __Message.Finalize;
+
+ finally
+ end;
+end;
+
+procedure THTTPChatService_Invoker.Invoke_GetLoggedUsers(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function GetLoggedUsers: TUserInfoArray; }
+var
+ lResult: HTTPChatLibrary_Intf.TUserInfoArray;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ lResult := nil;
+ try
+ lResult := (__Instance as IHTTPChatService).GetLoggedUsers;
+
+ __Message.InitializeResponseMessage(__Transport, 'HTTPChatLibrary', 'HTTPChatService', 'GetLoggedUsersResponse');
+ __Message.Write('Result', TypeInfo(HTTPChatLibrary_Intf.TUserInfoArray), lResult, []);
+ __Message.Finalize;
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(lResult);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatServer.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatServer.bdsproj
new file mode 100644
index 0000000..ca5815e
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatServer.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {AC378402-2D10-4383-8B70-5BD438F6DA7A}
+
+
+
+
+ HTTPChatServer.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatServer.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatServer.dpr
new file mode 100644
index 0000000..ccb0548
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatServer.dpr
@@ -0,0 +1,21 @@
+program HTTPChatServer;
+
+{#ROGEN:HTTPChatLibrary.rodl} // RemObjects: Careful, do not remove!
+
+uses
+ uROComInit,
+ Forms,
+ HTTPChatServerMain in 'HTTPChatServerMain.pas' {HTTPChatServerMainForm},
+ HTTPChatLibrary_Intf in 'HTTPChatLibrary_Intf.pas',
+ HTTPChatLibrary_Invk in 'HTTPChatLibrary_Invk.pas',
+ HTTPChatService_Impl in 'HTTPChatService_Impl.pas' {HTTPChatService: TDARemoteService};
+
+{$R *.res}
+{$R RODLFile.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'HTTP Chat Server';
+ Application.CreateForm(THTTPChatServerMainForm, HTTPChatServerMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatServer.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatServer.dproj
new file mode 100644
index 0000000..ba239d0
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatServer.dproj
@@ -0,0 +1,77 @@
+
+
+ {582fb95d-63e7-4f83-948c-cf190b1c9a77}
+ HTTPChatServer.dpr
+ Debug
+ AnyCPU
+ DCC32
+ HTTPChatServer.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ HTTPChatServer.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatServer.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatServer.res
new file mode 100644
index 0000000..3eab0f7
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatServer.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatServerMain.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatServerMain.dfm
new file mode 100644
index 0000000..0cc6621
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatServerMain.dfm
@@ -0,0 +1,155 @@
+object HTTPChatServerMainForm: THTTPChatServerMainForm
+ Left = 294
+ Top = 19
+ BorderIcons = [biSystemMenu]
+ BorderStyle = bsSingle
+ Caption = 'HTTP Chat Server'
+ ClientHeight = 371
+ ClientWidth = 425
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ PixelsPerInch = 96
+ TextHeight = 13
+ object RoPoweredByRemObjectsButton1: TROPoweredByRemObjectsButton
+ Left = 8
+ Top = 8
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ end
+ object Label1: TLabel
+ Left = 8
+ Top = 68
+ Width = 87
+ Height = 13
+ Caption = 'Event Repository:'
+ end
+ object Label2: TLabel
+ Left = 8
+ Top = 96
+ Width = 80
+ Height = 13
+ Caption = 'Known Sessions:'
+ end
+ object Label3: TLabel
+ Left = 240
+ Top = 8
+ Width = 70
+ Height = 13
+ Caption = 'Listen on Port:'
+ end
+ object lbSessions: TListBox
+ Left = 8
+ Top = 112
+ Width = 409
+ Height = 225
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ ItemHeight = 13
+ TabOrder = 3
+ end
+ object bbCloseClient: TBitBtn
+ Left = 25
+ Top = 343
+ Width = 169
+ Height = 25
+ Anchors = [akLeft, akBottom]
+ Caption = 'Close Client'
+ Enabled = False
+ TabOrder = 4
+ OnClick = bbCloseClientClick
+ end
+ object bbWarnShutdown: TBitBtn
+ Left = 230
+ Top = 343
+ Width = 169
+ Height = 25
+ Anchors = [akLeft, akBottom]
+ Caption = 'Warn 5 Minutes Shutdown'
+ Enabled = False
+ TabOrder = 5
+ OnClick = bbWarnShutdownClick
+ end
+ object cbRepositoryType: TComboBox
+ Left = 97
+ Top = 64
+ Width = 320
+ Height = 21
+ Style = csDropDownList
+ ItemHeight = 13
+ TabOrder = 2
+ end
+ object ActivateButton: TBitBtn
+ Left = 240
+ Top = 31
+ Width = 161
+ Height = 25
+ Caption = 'Activate/Deactivate Server'
+ TabOrder = 1
+ OnClick = ActivateButtonClick
+ end
+ object sePort: TSpinEdit
+ Left = 312
+ Top = 3
+ Width = 91
+ Height = 22
+ MaxValue = 0
+ MinValue = 0
+ TabOrder = 0
+ Value = 0
+ end
+ object BINMessage: TROBinMessage
+ UseCompression = False
+ Left = 84
+ Top = 248
+ end
+ object ROServer: TROIndyHTTPServer
+ Dispatchers = <
+ item
+ Name = 'BINMessage'
+ Message = BINMessage
+ Enabled = True
+ PathInfo = 'Bin'
+ end>
+ Port = 8099
+ Left = 56
+ Top = 248
+ end
+ object InMemorySessionManager: TROInMemorySessionManager
+ SessionDuration = 1
+ OnSessionDeleted = InMemorySessionManagerSessionDeleted
+ Left = 152
+ Top = 296
+ end
+ object ROIndyTCPChannel1: TROIndyTCPChannel
+ ServerLocators = <>
+ DispatchOptions = []
+ Port = 8090
+ Host = '127.0.0.1'
+ Left = 232
+ Top = 256
+ end
+ object InMemoryEventRepository: TROInMemoryEventRepository
+ Message = BINMessage
+ SessionManager = InMemorySessionManager
+ OnAfterAddSession = InMemoryEventRepositoryAfterAddSession
+ OnAfterRemoveSession = InMemoryEventRepositoryAfterRemoveSession
+ Left = 192
+ Top = 296
+ end
+ object MasterServerEventRepository: TROMasterServerEventRepository
+ Message = BINMessage
+ SessionManager = InMemorySessionManager
+ OnAfterAddSession = InMemoryEventRepositoryAfterAddSession
+ OnAfterRemoveSession = InMemoryEventRepositoryAfterRemoveSession
+ Channel = ROIndyTCPChannel1
+ Left = 192
+ Top = 256
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatServerMain.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatServerMain.pas
new file mode 100644
index 0000000..d36820e
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatServerMain.pas
@@ -0,0 +1,143 @@
+unit HTTPChatServerMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
+ uROClient, uROPoweredByRemObjectsButton, uROClientIntf, uROServer,
+ uROIndyHTTPServer, uROIndyTCPServer, HTTPChatLibrary_Intf,
+ uROSessions, uROEventRepository,
+ uROBinMessage, uROSOAPMessage, Buttons, uROIndyTCPChannel,
+ uROMasterServerEventRepository, Spin;
+
+type
+ THTTPChatServerMainForm = class(TForm)
+ RoPoweredByRemObjectsButton1: TRoPoweredByRemObjectsButton;
+ BINMessage: TROBinMessage;
+ ROServer: TROIndyHTTPServer;
+ InMemorySessionManager: TROInMemorySessionManager;
+ lbSessions: TListBox;
+ bbCloseClient: TBitBtn;
+ bbWarnShutdown: TBitBtn;
+ ROIndyTCPChannel1: TROIndyTCPChannel;
+ cbRepositoryType: TComboBox;
+ Label1: TLabel;
+ InMemoryEventRepository: TROInMemoryEventRepository;
+ Label2: TLabel;
+ ActivateButton: TBitBtn;
+ MasterServerEventRepository: TROMasterServerEventRepository;
+ Label3: TLabel;
+ sePort: TSpinEdit;
+ procedure FormCreate(Sender: TObject);
+ procedure bbWarnShutdownClick(Sender: TObject);
+ procedure bbCloseClientClick(Sender: TObject);
+ procedure ActivateButtonClick(Sender: TObject);
+ procedure InMemoryEventRepositoryAfterAddSession(
+ Sender: TROEventRepository; const SessionID: TGUID);
+ procedure InMemoryEventRepositoryAfterRemoveSession(
+ Sender: TROEventRepository; const SessionID: TGUID);
+ procedure InMemorySessionManagerSessionDeleted(const aSessionID: TGUID;
+ IsExpired: Boolean);
+ private
+ function GetEventRepository: TROEventRepository;
+ protected
+
+ public
+ property EventRepository : TROEventRepository read GetEventRepository;
+ end;
+
+var
+ HTTPChatServerMainForm: THTTPChatServerMainForm;
+
+implementation
+
+uses uROClasses, uROAsync, Variants;
+
+{$R *.dfm}
+
+procedure THTTPChatServerMainForm.FormCreate(Sender: TObject);
+var i : integer;
+begin
+ sePort.Value := ROServer.Port;
+
+ for i := 0 to (ComponentCount-1) do
+ if (Components[i] is TROEventRepository) then
+ cbRepositoryType.Items.AddObject(Components[i].Name, Components[i]);
+
+ cbRepositoryType.ItemIndex := 0;
+end;
+
+procedure THTTPChatServerMainForm.bbWarnShutdownClick(Sender: TObject);
+var reason : string;
+begin
+ reason := 'The system administrator will reboot the server in 5 minutes.'#13#13+
+ 'Please close your applications and save your work.';
+
+ if InputQuery('Shutdown Reason', 'Reason', reason)
+ then (EventRepository as IHTTPChatServerEvents_Writer).OnSystemShutdown(EmptyGUID, 5, reason);
+end;
+
+procedure THTTPChatServerMainForm.bbCloseClientClick(Sender: TObject);
+var reason : string;
+ clientid : TGUID;
+begin
+ if lbSessions.ItemIndex<0 then begin
+ Beep;
+ MessageDlg('Select a session first', mtError, [mbOK], 0);
+ Exit;
+ end;
+
+ clientid := StringToGUID(lbSessions.Items[lbSessions.ItemIndex]);
+
+ reason := 'You''ve been terminated. Good bye!';
+ if InputQuery('Close Reason', 'Reason', reason)
+ then (EventRepository as IHTTPChatServerEvents_Writer).OnMandatoryClose(EmptyGUID, GUIDToString(clientid), reason);
+end;
+
+function THTTPChatServerMainForm.GetEventRepository: TROEventRepository;
+begin
+ result := TROEventRepository(cbRepositoryType.Items.Objects[cbRepositoryType.ItemIndex]);
+end;
+
+procedure THTTPChatServerMainForm.ActivateButtonClick(Sender: TObject);
+begin
+ if not ROServer.Active then begin
+ ROServer.Port := sePort.Value;
+ end;
+
+ ROServer.Active := ROServer.Active XOR TRUE;
+
+ cbRepositoryType.Enabled := not ROServer.Active;
+ bbCloseClient.Enabled := ROServer.Active;
+ bbWarnShutdown.Enabled := ROServer.Active;
+end;
+
+procedure THTTPChatServerMainForm.InMemoryEventRepositoryAfterAddSession(
+ Sender: TROEventRepository; const SessionID: TGUID);
+begin
+ lbSessions.Items.Add(GUIDToString(SessionID));
+end;
+
+procedure THTTPChatServerMainForm.InMemoryEventRepositoryAfterRemoveSession(
+ Sender: TROEventRepository; const SessionID: TGUID);
+var idx : integer;
+begin
+ if (csDestroying in ComponentState) then Exit;
+
+ idx := lbSessions.Items.IndexOf(GUIDToString(SessionID));
+ if (idx>=0)
+ then lbSessions.Items.Delete(idx);
+end;
+
+procedure THTTPChatServerMainForm.InMemorySessionManagerSessionDeleted(
+ const aSessionID: TGUID; IsExpired: Boolean);
+var idx : integer;
+begin
+ if (csDestroying in ComponentState) then Exit;
+
+ idx := lbSessions.Items.IndexOf(GUIDToString(aSessionID));
+ if (idx>=0)
+ then lbSessions.Items.Delete(idx);
+end;
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatService_Impl.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatService_Impl.dfm
new file mode 100644
index 0000000..10de306
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatService_Impl.dfm
@@ -0,0 +1,10 @@
+object HTTPChatService: THTTPChatService
+ OldCreateOrder = True
+ SessionManager = HTTPChatServerMainForm.InMemorySessionManager
+ EventRepository = HTTPChatServerMainForm.InMemoryEventRepository
+ OnActivate = RORemoteDataModuleActivate
+ Left = 200
+ Top = 200
+ Height = 300
+ Width = 300
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatService_Impl.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatService_Impl.pas
new file mode 100644
index 0000000..fa37fdb
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/HTTP Chat/HTTPChatService_Impl.pas
@@ -0,0 +1,158 @@
+unit HTTPChatService_Impl;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ This is where you are supposed to code the implementation of your objects. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils,
+ {RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
+ {Required:} uRORemoteDataModule, SyncObjs,
+ {Generated:} HTTPChatLibrary_Intf;
+
+type
+ { THTTPChatService }
+ THTTPChatService = class(TRORemoteDataModule, IHTTPChatService)
+ procedure RORemoteDataModuleActivate(const aClientID: TGUID;
+ aSession: TROSession; const aMessage: IROMessage);
+ private
+ protected
+ { IHTTPChatService methods }
+ function Login(const aUserID: string): string;
+ procedure Logout;
+ procedure SendMessage(const aMessageText: string; const aDestination: string);
+ function GetLoggedUsers: TUserInfoArray;
+ public
+ end;
+
+var
+ fCs: TCriticalSection;
+ fUsers: TUserInfoArray;
+
+implementation
+
+{$R *.dfm}
+uses
+ {Generated:} HTTPChatLibrary_Invk, HTTPChatServerMain, Variants;
+
+procedure Create_HTTPChatService(out anInstance: IUnknown);
+begin
+ anInstance := THTTPChatService.Create(nil);
+end;
+
+{ HTTPChatService }
+
+function THTTPChatService.Login(const aUserID: string): string;
+var
+ newuser: TUserInfo;
+ ev: IHTTPChatEvents_Writer;
+begin
+ fcs.Enter;
+ try
+ { Checks if the user is already logged in }
+ if (fUsers.Search('UserID', aUserID) <> nil) then raise Exception.CreateFmt('User %s is already logged in', [aUserID]);
+
+ { Adds the user to the internal list of logged users }
+ newuser := fUsers.Add;
+ newuser.UserID := aUserID;
+ newuser.SessionID := GUIDToString(Session.SessionID);
+
+ { Stores the UserID of the user in the session.
+ This will be used in the OnLogout and OnSendMessage methods }
+ Session.Values['UserID'] := aUserID;
+ result := newuser.SessionID;
+
+ ev := (EventRepository as IHTTPChatEvents_Writer);
+ ev.ExcludeSender := false; // make sure to send it back to sender too
+
+ { Generates the OnLogin event }
+ ev.OnLogin(Session.SessionID, newuser);
+ finally
+ fcs.Release;
+ end;
+end;
+
+procedure THTTPChatService.Logout;
+var
+ userid: string;
+ useridx: integer;
+ ev: IHTTPChatEvents_Writer;
+begin
+ { Finds the user in the fUser array and removes it }
+ userid := VarToStr(Session.Values['UserID']);
+ fcs.Enter;
+ try
+ useridx := fUsers.GetIndex('UserID', UserID);
+
+ if (useridx >= 0) then fUsers.Delete(useridx);
+
+ { Eliminates this user's session }
+ DestroySession;
+
+ ev := (EventRepository as IHTTPChatEvents_Writer);
+
+ { Generates the OnLogout event }
+ ev.OnLogout(Session.SessionID, UserID);
+ finally
+ fcs.Release;
+ end;
+end;
+
+procedure THTTPChatService.SendMessage(const aMessageText: string; const aDestination: string);
+var
+ thisuserid: string;
+ chateventswriter: IHTTPChatEvents_Writer;
+begin
+ { Extracts the name of the current user by reading the session information }
+ thisuserid := VarToStr(Session.Values['UserID']);
+
+ { Filters the receivers of this event if necessary }
+ chateventswriter := (EventRepository as IHTTPChatEvents_Writer);
+ if (aDestination <> '') then begin
+ chateventswriter.SessionList.CommaText := aDestination;
+
+ { Only broadcasts to the session listed in SessionList }
+ chateventswriter.ExcludeSessionList := FALSE;
+ end;
+ chateventswriter.ExcludeSender := false;
+
+ { Generates the OnSendMessage event }
+ chateventswriter.OnSendMessage(Session.SessionID, thisuserid, aMessageText, aDestination <> '');
+end;
+
+function THTTPChatService.GetLoggedUsers: TUserInfoArray;
+begin
+ result := TUserInfoArray.Create;
+ fcs.Enter;
+ try
+ result.Assign(fUsers);
+ finally
+ fcs.Release;
+ end;
+end;
+
+procedure THTTPChatService.RORemoteDataModuleActivate(
+ const aClientID: TGUID; aSession: TROSession;
+ const aMessage: IROMessage);
+begin
+ { We manually assign this because the user might decide to change it at runtime,
+ by using the combo box on the main form }
+
+ EventRepository := HTTPChatServerMainForm.EventRepository;
+end;
+
+initialization
+ fCs := TCriticalSection.Create;
+ fUsers := TUserInfoArray.Create;
+ TROClassFactory.Create('HTTPChatService', Create_HTTPChatService, THTTPChatService_Invoker);
+
+finalization
+ FreeAndNil(fUsers);
+ fCs.Free;
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemo.Sample.html b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemo.Sample.html
new file mode 100644
index 0000000..5dd02c7
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemo.Sample.html
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+
+
+
+
+ MegaDemo Sample
+
+
+Purpose
+
+This comprehensive example illustrates many of the features of theRemObjects SDK by providing benchmark facilities for the various protocols and channels supported.
+
+The following are included:
+
+message types
+
+ TROBINMessage
+ TROSOAPMessage
+ TROPostMessage
+ TROServerMultiMessage
+
+transport channels
+
+ TROWinMessageChannel
+ TROWinInetHTTPChannel
+ TROIndyHTTPChannel
+ TROIndyTCPChannel
+
+message encrypting and compression
+
+
+The tests you can perform are very comprehensive. In particular, try the Stress Test which runs all the tests once or many times.
+
.
+
+You can also specify how much information is displayed about the test results by using Write Test Info ,Verbose and Enable Log .
+
+
Examine the Code
+
+ See how the Twelve methods were defined by editing the service library.
+ Do this by making the server the selected project and
+ by using the menu option: RemObjects | Edit Service Library .
+ Note: if you don't see this menu option but see 'Service Builder' instead,
+ you still have the client set as the current project.
+ Examine the methods added to MegaDemoService .
+
+ Check how the server methods were implemented in
+ MegaDemoService_Impl.pas .
+
+
+ Examine the simple code needed to invoke the methods in
+ MegaDemoClientMain.pas .
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemo.bdsgroup b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemo.bdsgroup
new file mode 100644
index 0000000..6721b5e
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemo.bdsgroup
@@ -0,0 +1,21 @@
+
+
+
+
+ Default.Personality
+
+ 1.0
+ {0C1E5AA3-4B44-4993-A379-E37C50797DB3}
+
+
+
+
+
+ MegaDemoServer.bdsproj
+ MegaDemoClient.bdsproj
+ MegaDemoISAPI.bdsproj
+ MegaDemoServer.exe MegaDemoClient.exe MegaDemoISAPI.dll
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemo.bpg b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemo.bpg
new file mode 100644
index 0000000..d41db19
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemo.bpg
@@ -0,0 +1,26 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = MegaDemoServer.exe MegaDemoClient.exe MegaDemoISAPI.dll
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+MegaDemoServer.exe: MegaDemoServer.dpr
+ $(DCC)
+
+MegaDemoClient.exe: MegaDemoClient.dpr
+ $(DCC)
+
+MegaDemoISAPI.dll: MegaDemoISAPI.dpr
+ $(DCC)
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemo.groupproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemo.groupproj
new file mode 100644
index 0000000..95c606a
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemo.groupproj
@@ -0,0 +1,49 @@
+
+
+ {ef074fbb-1501-498f-9a4b-0f5d4c51bf53}
+
+
+
+
+ Default.Personality
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoClient.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoClient.bdsproj
new file mode 100644
index 0000000..fd3dcfd
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoClient.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {B9480CB3-873E-4DFC-9ECD-2AC75F27FF19}
+
+
+
+
+ MegaDemoClient.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoClient.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoClient.dpr
new file mode 100644
index 0000000..ce9b228
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoClient.dpr
@@ -0,0 +1,15 @@
+program MegaDemoClient;
+
+uses
+ Forms,
+ MegaDemoClientMain in 'MegaDemoClientMain.pas' {MegaDemoClientMainForm},
+ MegaDemoCustomClass in 'MegaDemoCustomClass.pas';
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.Title := 'RemObjects MegaDemo Client';
+ Application.CreateForm(TMegaDemoClientMainForm, MegaDemoClientMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoClient.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoClient.dproj
new file mode 100644
index 0000000..7311de1
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoClient.dproj
@@ -0,0 +1,73 @@
+
+
+ {3492e535-a0ea-4598-93c9-cec490cccd99}
+ MegaDemoClient.dpr
+ Debug
+ AnyCPU
+ DCC32
+ MegaDemoClient.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ MegaDemoClient.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoClient.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoClient.res
new file mode 100644
index 0000000..90e4219
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoClient.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoClientMain.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoClientMain.dfm
new file mode 100644
index 0000000..ce8e784
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoClientMain.dfm
@@ -0,0 +1,1046 @@
+object MegaDemoClientMainForm: TMegaDemoClientMainForm
+ Left = 423
+ Top = 255
+ Width = 700
+ Height = 470
+ Caption = 'RemObjects SDK 4.0 for Delphi - Mega Demo Client'
+ Color = clBtnFace
+ Constraints.MinHeight = 444
+ Constraints.MinWidth = 675
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ ShowHint = True
+ OnCloseQuery = FormCloseQuery
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ OnShow = FormShow
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Panel3: TPanel
+ Left = 0
+ Top = 0
+ Width = 684
+ Height = 434
+ Align = alClient
+ BevelOuter = bvNone
+ BorderWidth = 5
+ TabOrder = 0
+ object Panel4: TPanel
+ Left = 5
+ Top = 154
+ Width = 674
+ Height = 140
+ Align = alTop
+ BevelOuter = bvNone
+ TabOrder = 1
+ object Label15: TLabel
+ Left = 617
+ Top = 61
+ Width = 25
+ Height = 13
+ Caption = 'times'
+ end
+ object Label14: TLabel
+ Left = 619
+ Top = 85
+ Width = 37
+ Height = 13
+ Caption = 'threads'
+ end
+ object clbTests: TCheckListBox
+ Left = 0
+ Top = 0
+ Width = 112
+ Height = 108
+ Hint = 'Select test'
+ OnClickCheck = clbTestsClickCheck
+ Align = alLeft
+ ItemHeight = 13
+ Items.Strings = (
+ 'Stress Test'
+ 'Sum'
+ 'EchoPerson'
+ 'TestArrays'
+ 'EchoBinary'
+ 'GetServerTime'
+ 'CustomClass'
+ 'RaiseError')
+ TabOrder = 0
+ OnClick = clbTestsClick
+ end
+ object Panel5: TPanel
+ Left = 0
+ Top = 108
+ Width = 674
+ Height = 32
+ Align = alBottom
+ BevelOuter = bvNone
+ TabOrder = 5
+ object cbEnableLog: TCheckBox
+ Left = 183
+ Top = 8
+ Width = 82
+ Height = 17
+ Hint = 'Allows to show the report on performance of tests'
+ Caption = 'Enable Log'
+ TabOrder = 2
+ end
+ object cbVerbose: TCheckBox
+ Left = 111
+ Top = 8
+ Width = 66
+ Height = 17
+ Hint =
+ 'Allows to show progress of transfer / reception of data for BIN ' +
+ 'Message'
+ Caption = 'Verbose'
+ TabOrder = 1
+ end
+ object cbWriteTestInfo: TCheckBox
+ Left = 7
+ Top = 8
+ Width = 97
+ Height = 17
+ Hint = 'Shows the information on the test '
+ Caption = 'Write Test Info'
+ TabOrder = 0
+ end
+ end
+ object RunTestOnceButton: TButton
+ Left = 572
+ Top = 1
+ Width = 100
+ Height = 25
+ Caption = 'Run Test Once'
+ TabOrder = 1
+ OnClick = RunTestOnceButtonClick
+ end
+ object RunTestButton: TButton
+ Left = 572
+ Top = 28
+ Width = 100
+ Height = 25
+ Caption = 'Run Multiple Tests'
+ TabOrder = 2
+ OnClick = RunTestButtonClick
+ end
+ object seRepetitions: TSpinEdit
+ Left = 575
+ Top = 56
+ Width = 40
+ Height = 22
+ Hint = 'Set times for Stress test and multiple tests'
+ MaxValue = 0
+ MinValue = 0
+ TabOrder = 3
+ Value = 10
+ end
+ object seThreads: TSpinEdit
+ Left = 575
+ Top = 80
+ Width = 40
+ Height = 22
+ Hint = 'Set threads for Stress test and multiple tests'
+ MaxValue = 0
+ MinValue = 0
+ TabOrder = 4
+ Value = 5
+ end
+ object pPage: TPanel
+ Left = 112
+ Top = 1
+ Width = 456
+ Height = 108
+ Align = alCustom
+ Anchors = [akLeft, akTop, akBottom]
+ BevelOuter = bvNone
+ TabOrder = 6
+ object pagecontrol2: TPageControl
+ Left = 0
+ Top = 0
+ Width = 456
+ Height = 108
+ ActivePage = tsStress
+ Align = alClient
+ TabOrder = 0
+ object tsStress: TTabSheet
+ Caption = 'Stress'
+ object pStress: TPanel
+ Left = 0
+ Top = 0
+ Width = 448
+ Height = 80
+ Align = alClient
+ BevelOuter = bvNone
+ TabOrder = 0
+ DesignSize = (
+ 448
+ 80)
+ object Label17: TLabel
+ Left = 7
+ Top = 0
+ Width = 434
+ Height = 79
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ AutoSize = False
+ Caption =
+ 'This test allows you to run one or more of the individual tests,' +
+ ' depending on which are checked.'#13#10#13#10'IMPORTANT: before running an' +
+ 'y test, you must activate the server'#39's transport that matches th' +
+ 'e channel selected on this client (default is HTTP Channel).'
+ WordWrap = True
+ end
+ end
+ end
+ object tsSum: TTabSheet
+ Caption = 'Sum'
+ ImageIndex = 1
+ object pSum: TPanel
+ Left = 0
+ Top = 0
+ Width = 448
+ Height = 80
+ Align = alClient
+ BevelOuter = bvNone
+ TabOrder = 0
+ object Label18: TLabel
+ Left = 7
+ Top = 60
+ Width = 435
+ Height = 19
+ Align = alCustom
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ AutoSize = False
+ Caption = 'This method fulfils the sum of argument A and argument B'
+ WordWrap = True
+ end
+ object Label16: TLabel
+ Left = 7
+ Top = 28
+ Width = 60
+ Height = 13
+ Caption = 'Argument B:'
+ end
+ object Label11: TLabel
+ Left = 7
+ Top = 5
+ Width = 61
+ Height = 13
+ Caption = 'Argument A:'
+ end
+ object seB: TSpinEdit
+ Left = 75
+ Top = 23
+ Width = 81
+ Height = 22
+ Hint = 'Set argument B for Sum test'
+ MaxValue = 0
+ MinValue = 0
+ TabOrder = 1
+ Value = 2
+ end
+ object seA: TSpinEdit
+ Left = 75
+ Top = 0
+ Width = 81
+ Height = 22
+ Hint = 'Set argument A for Sum test'
+ MaxValue = 0
+ MinValue = 0
+ TabOrder = 0
+ Value = 1
+ end
+ end
+ end
+ object tsEchoPerson: TTabSheet
+ Caption = 'EchoPerson'
+ ImageIndex = 2
+ object pEchoPerson: TPanel
+ Left = 0
+ Top = 0
+ Width = 448
+ Height = 80
+ Align = alClient
+ BevelOuter = bvNone
+ TabOrder = 0
+ object Label19: TLabel
+ Left = 7
+ Top = 60
+ Width = 433
+ Height = 19
+ Align = alCustom
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ AutoSize = False
+ Caption =
+ 'This method created object TPerson and send it to server and r' +
+ 'eturns a copy of this object from a server'
+ WordWrap = True
+ end
+ object Label2: TLabel
+ Left = 7
+ Top = 4
+ Width = 55
+ Height = 13
+ Caption = 'First Name:'
+ end
+ object Label3: TLabel
+ Left = 215
+ Top = 5
+ Width = 54
+ Height = 13
+ Caption = 'Last Name:'
+ end
+ object Label4: TLabel
+ Left = 38
+ Top = 27
+ Width = 23
+ Height = 13
+ Caption = 'Age:'
+ end
+ object Label5: TLabel
+ Left = 120
+ Top = 27
+ Width = 22
+ Height = 13
+ Caption = 'Sex:'
+ end
+ object eLastName: TEdit
+ Left = 284
+ Top = 1
+ Width = 124
+ Height = 21
+ Hint = 'Set Last Name for EchoPerson test'
+ TabOrder = 1
+ Text = 'Smith'
+ end
+ object cbSex: TComboBox
+ Left = 143
+ Top = 23
+ Width = 109
+ Height = 21
+ Hint = 'Set Sex for EchoPerson test'
+ Style = csDropDownList
+ ItemHeight = 13
+ TabOrder = 3
+ end
+ object eFirstName: TEdit
+ Left = 75
+ Top = 0
+ Width = 124
+ Height = 21
+ Hint = 'Set First Name for EchoPerson test'
+ TabOrder = 0
+ Text = 'John'
+ end
+ object seAge: TSpinEdit
+ Left = 75
+ Top = 22
+ Width = 42
+ Height = 22
+ Hint = 'Set Age for EchoPerson test'
+ MaxValue = 0
+ MinValue = 0
+ TabOrder = 2
+ Value = 33
+ end
+ end
+ end
+ object tsTestArrays: TTabSheet
+ Caption = 'TestArrays'
+ ImageIndex = 4
+ object pTestArrays: TPanel
+ Left = 0
+ Top = 0
+ Width = 448
+ Height = 80
+ Align = alClient
+ BevelOuter = bvNone
+ TabOrder = 0
+ object Label6: TLabel
+ Left = 7
+ Top = 5
+ Width = 33
+ Height = 13
+ Caption = 'Count:'
+ end
+ object Label20: TLabel
+ Left = 7
+ Top = 60
+ Width = 437
+ Height = 19
+ Align = alCustom
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ AutoSize = False
+ Caption =
+ 'This method sends the array on a server and returns a copy of th' +
+ 'is array from a server'
+ WordWrap = True
+ end
+ object rbInteger: TRadioButton
+ Left = 7
+ Top = 22
+ Width = 85
+ Height = 17
+ Hint = 'Use integer array for TestArrays test'
+ Caption = 'Integer array'
+ Checked = True
+ TabOrder = 1
+ TabStop = True
+ end
+ object seArrayCount: TSpinEdit
+ Left = 75
+ Top = 0
+ Width = 81
+ Height = 22
+ Hint = 'Set array size for TestArrays test'
+ MaxValue = 0
+ MinValue = 0
+ TabOrder = 0
+ Value = 10
+ end
+ object rbTPerson: TRadioButton
+ Left = 175
+ Top = 22
+ Width = 89
+ Height = 17
+ Hint = 'Use TPerson array for TestArrays test'
+ Caption = 'TPerson array'
+ TabOrder = 3
+ end
+ object rbString: TRadioButton
+ Left = 91
+ Top = 22
+ Width = 77
+ Height = 17
+ Hint = 'Use string array for TestArrays test'
+ Caption = 'String array'
+ TabOrder = 2
+ end
+ end
+ end
+ object tsEchoBinary: TTabSheet
+ Caption = 'EchoBinary'
+ ImageIndex = 5
+ object pEchoBinary: TPanel
+ Left = 0
+ Top = 0
+ Width = 448
+ Height = 80
+ Align = alClient
+ BevelOuter = bvNone
+ TabOrder = 0
+ object Label7: TLabel
+ Left = 7
+ Top = 5
+ Width = 23
+ Height = 13
+ Caption = 'Size:'
+ end
+ object Label21: TLabel
+ Left = 7
+ Top = 60
+ Width = 438
+ Height = 17
+ Align = alCustom
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ AutoSize = False
+ Caption =
+ 'This method creates the buffer with the set size and dispatches ' +
+ 'it on a server. The server returns a copy of this buffer'
+ WordWrap = True
+ end
+ object seBinSize: TSpinEdit
+ Left = 75
+ Top = 0
+ Width = 49
+ Height = 22
+ Hint = 'Set buffer size for EchoBinary test'
+ MaxValue = 0
+ MinValue = 0
+ TabOrder = 0
+ Value = 5000
+ end
+ end
+ end
+ object tsGetServerTime: TTabSheet
+ Caption = 'GetServerTime'
+ ImageIndex = 6
+ object pGetServerTime: TPanel
+ Left = 0
+ Top = 0
+ Width = 448
+ Height = 80
+ Align = alClient
+ BevelOuter = bvNone
+ TabOrder = 0
+ object Label22: TLabel
+ Left = 7
+ Top = 0
+ Width = 437
+ Height = 75
+ Align = alCustom
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ AutoSize = False
+ Caption = 'This method returns current time of a server'
+ WordWrap = True
+ end
+ end
+ end
+ object tsCustomClass: TTabSheet
+ Caption = 'CustomClass'
+ ImageIndex = 7
+ object pCustomClass: TPanel
+ Left = 0
+ Top = 0
+ Width = 448
+ Height = 80
+ Align = alClient
+ BevelOuter = bvNone
+ TabOrder = 0
+ object Label23: TLabel
+ Left = 7
+ Top = 60
+ Width = 437
+ Height = 17
+ Align = alCustom
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ AutoSize = False
+ Caption = 'This method returns from a server the object as XML or a stream'
+ WordWrap = True
+ end
+ object rbStream: TRadioButton
+ Left = 7
+ Top = 0
+ Width = 63
+ Height = 17
+ Hint = 'To receive TCustomClass as TStreamtomClass'
+ Caption = 'Stream'
+ Checked = True
+ TabOrder = 0
+ TabStop = True
+ end
+ object rbXML: TRadioButton
+ Left = 7
+ Top = 17
+ Width = 63
+ Height = 17
+ Hint = 'To receive TCustomClass as XML string'
+ Caption = 'XML'
+ TabOrder = 1
+ end
+ end
+ end
+ object tsRaiseError: TTabSheet
+ Caption = 'RaiseError'
+ ImageIndex = 3
+ object pRaiseError: TPanel
+ Left = 0
+ Top = 0
+ Width = 448
+ Height = 80
+ Align = alClient
+ BevelOuter = bvNone
+ TabOrder = 0
+ object Label24: TLabel
+ Left = 7
+ Top = 60
+ Width = 440
+ Height = 52
+ Align = alCustom
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ AutoSize = False
+ Caption =
+ 'If you run this test within the IDE, you will want to disable br' +
+ 'eak on exceptions. '#13#10#13#10'This test is not suitable for the Stress ' +
+ 'Test.'
+ WordWrap = True
+ end
+ object cbCustomException: TCheckBox
+ Left = 7
+ Top = 0
+ Width = 59
+ Height = 17
+ Hint = 'Set custom error for RaiseError test'
+ Caption = 'Custom'
+ Checked = True
+ State = cbChecked
+ TabOrder = 0
+ end
+ end
+ end
+ end
+ end
+ end
+ object Panel1: TPanel
+ Left = 5
+ Top = 5
+ Width = 674
+ Height = 149
+ Align = alTop
+ BevelOuter = bvNone
+ TabOrder = 0
+ object RoPoweredByRemObjectsButton1: TROPoweredByRemObjectsButton
+ Left = 8
+ Top = 4
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ ApplicationType = atClient
+ end
+ object GroupBox5: TGroupBox
+ Left = 6
+ Top = 55
+ Width = 214
+ Height = 91
+ Caption = ' Message Type '
+ TabOrder = 0
+ object rbBinary: TRadioButton
+ Left = 8
+ Top = 16
+ Width = 41
+ Height = 17
+ Hint = 'Use TROBINMessage'
+ Caption = 'Bin'
+ Checked = True
+ TabOrder = 0
+ TabStop = True
+ OnClick = rbBinaryClick
+ end
+ object rbSOAP: TRadioButton
+ Left = 50
+ Top = 16
+ Width = 49
+ Height = 17
+ Hint = 'Use TROSOAPMessage'
+ Caption = 'SOAP'
+ TabOrder = 1
+ OnClick = rbSOAPClick
+ end
+ object cbUseCompression: TCheckBox
+ Left = 8
+ Top = 36
+ Width = 106
+ Height = 17
+ Hint = 'Allows to use a compression at data transmission'
+ Caption = 'Use &Compression'
+ Checked = True
+ State = cbChecked
+ TabOrder = 4
+ end
+ object rbPost: TRadioButton
+ Left = 103
+ Top = 16
+ Width = 49
+ Height = 17
+ Hint = 'Use TROPOSTMessage'
+ Caption = 'Post'
+ TabOrder = 2
+ OnClick = rbPostClick
+ end
+ object cbEncrypt: TCheckBox
+ Left = 9
+ Top = 53
+ Width = 137
+ Height = 17
+ Hint = 'Allows to cipher data by transfer'
+ Caption = 'Encrypt Communication'
+ TabOrder = 5
+ OnClick = cbEncryptClick
+ end
+ object rbXmlRpc: TRadioButton
+ Left = 149
+ Top = 16
+ Width = 61
+ Height = 17
+ Caption = 'XmlRpc'
+ TabOrder = 3
+ OnClick = rbXmlRpcClick
+ end
+ object cbAutoDetect: TCheckBox
+ Left = 9
+ Top = 70
+ Width = 198
+ Height = 17
+ Caption = 'Autodetect messagetype (on server)'
+ TabOrder = 6
+ OnClick = cbAutoDetectClick
+ end
+ end
+ object pgChannels: TPageControl
+ Left = 224
+ Top = 1
+ Width = 448
+ Height = 145
+ ActivePage = tsHttp
+ MultiLine = True
+ RaggedRight = True
+ Style = tsFlatButtons
+ TabOrder = 1
+ OnChange = pgChannelsChange
+ object tsHttp: TTabSheet
+ Caption = 'HTTP'
+ ImageIndex = 1
+ object Label1: TLabel
+ Left = 7
+ Top = 11
+ Width = 23
+ Height = 13
+ Caption = 'URL:'
+ end
+ object cbHTTPURL: TComboBox
+ Left = 65
+ Top = 7
+ Width = 250
+ Height = 21
+ Hint = 'Set url for http channel'
+ ItemHeight = 13
+ TabOrder = 0
+ Text = 'http://127.0.0.1:8099/bin'
+ OnChange = cbHTTPURLChange
+ Items.Strings = (
+ 'http://localhost:8099/soap'
+ 'http://localhost:8099/bin'
+ 'http://localhost/MegaRO/soap'
+ 'http://localhost/MegaRO/bin')
+ end
+ object rbIndyHttp: TRadioButton
+ Left = 7
+ Top = 47
+ Width = 80
+ Height = 17
+ Hint = 'Usage TROIndyHttpChannel'
+ Caption = 'Indy'
+ TabOrder = 2
+ OnClick = rbIndyHttpClick
+ end
+ object rbWinInetHttp: TRadioButton
+ Left = 7
+ Top = 31
+ Width = 80
+ Height = 17
+ Hint = 'Usage TROWininetHttpChannel'
+ Caption = 'WinInet'
+ Checked = True
+ TabOrder = 1
+ TabStop = True
+ OnClick = rbIndyHttpClick
+ end
+ object rbSynapseHttp: TRadioButton
+ Left = 7
+ Top = 63
+ Width = 80
+ Height = 17
+ Hint = 'Usage TROSynapseHTTPChannel'
+ Caption = 'Synapse'
+ TabOrder = 3
+ OnClick = rbIndyHttpClick
+ end
+ object cbKeepConnection: TCheckBox
+ Left = 7
+ Top = 80
+ Width = 79
+ Height = 15
+ Hint = 'Enables Keep Connection'
+ Caption = 'Keep-Alive'
+ Checked = True
+ State = cbChecked
+ TabOrder = 4
+ end
+ end
+ object tsTCP: TTabSheet
+ Caption = 'TCP'
+ ImageIndex = 2
+ object Label9: TLabel
+ Left = 7
+ Top = 11
+ Width = 43
+ Height = 13
+ Caption = 'Address:'
+ end
+ object Label10: TLabel
+ Left = 195
+ Top = 9
+ Width = 24
+ Height = 13
+ Caption = 'Port:'
+ end
+ object cbTCPIP: TComboBox
+ Left = 65
+ Top = 7
+ Width = 120
+ Height = 21
+ Hint = 'Set IP for tcp channel'
+ ItemHeight = 13
+ TabOrder = 0
+ Text = '127.0.0.1'
+ end
+ object cbTCPPort: TComboBox
+ Left = 245
+ Top = 5
+ Width = 60
+ Height = 21
+ Hint = 'Set port for tcp channel'
+ ItemHeight = 13
+ TabOrder = 1
+ Text = '8090'
+ end
+ object RbIndyTcp: TRadioButton
+ Left = 7
+ Top = 31
+ Width = 88
+ Height = 17
+ Hint = 'Usage TROIndyTcpChannel'
+ Caption = 'Indy'
+ Checked = True
+ TabOrder = 2
+ TabStop = True
+ end
+ object cbDisableNagle: TCheckBox
+ Left = 7
+ Top = 80
+ Width = 162
+ Height = 17
+ Hint = 'Disable Nagle'
+ Caption = 'Disable &Nagle'
+ TabOrder = 3
+ OnClick = cbDisableNagleClick
+ end
+ end
+ object tsSuperHTTP: TTabSheet
+ Caption = 'SuperHTTP'
+ ImageIndex = 4
+ object Label25: TLabel
+ Left = 7
+ Top = 11
+ Width = 23
+ Height = 13
+ Caption = 'URL:'
+ end
+ object cbSuperHTTPURL: TComboBox
+ Left = 65
+ Top = 7
+ Width = 250
+ Height = 21
+ Hint = 'Set url for super http channel'
+ ItemHeight = 13
+ TabOrder = 0
+ Text = 'http://127.0.0.1:8099/bin'
+ OnChange = cbSuperHTTPURLChange
+ Items.Strings = (
+ 'http://localhost:8099/soap'
+ 'http://localhost:8099/bin'
+ 'http://localhost/MegaRO/soap'
+ 'http://localhost/MegaRO/bin')
+ end
+ object rbIndySuperHttp: TRadioButton
+ Left = 7
+ Top = 31
+ Width = 80
+ Height = 17
+ Hint = 'Usage TROIndySuperHttpChannel'
+ Caption = 'Indy'
+ Checked = True
+ TabOrder = 1
+ TabStop = True
+ end
+ object rbSynapseSuperHttp: TRadioButton
+ Left = 7
+ Top = 47
+ Width = 80
+ Height = 17
+ Hint = 'Usage TROSynapseSuperHttpChannel'
+ Caption = 'Synapse'
+ TabOrder = 2
+ end
+ end
+ object tsSuperTCP: TTabSheet
+ Caption = 'SuperTCP'
+ ImageIndex = 3
+ object Label12: TLabel
+ Left = 7
+ Top = 11
+ Width = 43
+ Height = 13
+ Caption = 'Address:'
+ end
+ object Label13: TLabel
+ Left = 195
+ Top = 11
+ Width = 24
+ Height = 13
+ Caption = 'Port:'
+ end
+ object cbSuperTCPPort: TComboBox
+ Left = 245
+ Top = 7
+ Width = 60
+ Height = 21
+ Hint = 'Set port for super tcp channel'
+ ItemHeight = 13
+ TabOrder = 0
+ Text = '8090'
+ end
+ object cbSuperTCPIP: TComboBox
+ Left = 65
+ Top = 7
+ Width = 120
+ Height = 21
+ Hint = 'Set IP for super tcp channel'
+ ItemHeight = 13
+ TabOrder = 1
+ Text = '127.0.0.1'
+ end
+ object rbIndySuperTCP: TRadioButton
+ Left = 7
+ Top = 31
+ Width = 80
+ Height = 17
+ Hint = 'Usage TROSuperTcpChannel'
+ Caption = 'Indy'
+ Checked = True
+ TabOrder = 2
+ TabStop = True
+ end
+ object rbSynapseSuperTCP: TRadioButton
+ Left = 7
+ Top = 47
+ Width = 80
+ Height = 17
+ Hint = 'Usage TROSynapseSuperTcpChannel'
+ Caption = 'Synapse'
+ TabOrder = 3
+ end
+ end
+ object tsWindowsMessage: TTabSheet
+ Caption = 'Windows Message'
+ ImageIndex = 5
+ object Label8: TLabel
+ Left = 7
+ Top = 11
+ Width = 50
+ Height = 13
+ Caption = 'Server ID:'
+ end
+ object eServerID: TEdit
+ Left = 65
+ Top = 7
+ Width = 240
+ Height = 21
+ Hint = 'Set Server ID'
+ TabOrder = 0
+ Text = '{E46A5995-2260-44EA-AC60-121ADB4CC2D0}'
+ end
+ end
+ end
+ end
+ object PageControl1: TPageControl
+ Left = 5
+ Top = 294
+ Width = 674
+ Height = 135
+ ActivePage = tsLog
+ Align = alClient
+ TabOrder = 2
+ object tsLog: TTabSheet
+ Caption = 'Log'
+ ImageIndex = 1
+ object Memo: TMemo
+ Left = 0
+ Top = 0
+ Width = 666
+ Height = 107
+ Align = alClient
+ Font.Charset = ANSI_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Courier New'
+ Font.Style = []
+ ParentFont = False
+ ScrollBars = ssVertical
+ TabOrder = 0
+ end
+ end
+ object tsSoap: TTabSheet
+ Caption = 'Output'
+ object Splitter1: TSplitter
+ Left = 337
+ Top = 0
+ Height = 107
+ end
+ object Memo1: TMemo
+ Left = 0
+ Top = 0
+ Width = 337
+ Height = 107
+ Align = alLeft
+ ScrollBars = ssVertical
+ TabOrder = 0
+ end
+ object Memo2: TMemo
+ Left = 340
+ Top = 0
+ Width = 326
+ Height = 107
+ Align = alClient
+ ScrollBars = ssVertical
+ TabOrder = 1
+ end
+ end
+ end
+ end
+ object BINMessage: TROBinMessage
+ OnInitializeMessage = BINMessageInitializeMessage
+ OnFinalizeMessage = BINMessageFinalizeMessage
+ OnWriteMessageParameter = BINMessageWriteMessageParameter
+ OnReadMessageParameter = BINMessageReadMessageParameter
+ UseCompression = False
+ Left = 14
+ Top = 5
+ end
+ object SOAPMessage: TROSOAPMessage
+ OnWriteToStream = SOAPMessageWriteToStream
+ OnReadFromStream = SOAPMessageReadFromStream
+ ServerTargetNamespace = 'http://tempuri.org/'
+ SerializationOptions = [xsoWriteMultiRefArray, xsoWriteMultiRefObject]
+ OnEnvelopeComplete = SOAPMessageEnvelopeComplete
+ Left = 42
+ Top = 5
+ end
+ object WinMessageChannel: TROWinMessageChannel
+ Encryption.EncryptionSendKey = 'CDB4E624C47EF40C26DCE65F70E6F3ABC03B6AD4FC0B064985F180A46895F064'
+ Encryption.EncryptionRecvKey = 'CDB4E624C47EF40C26DCE65F70E6F3ABC03B6AD4FC0B064985F180A46895F064'
+ Delay = 150
+ ServerLocators = <>
+ DispatchOptions = []
+ Left = 449
+ Top = 344
+ end
+ object WininetHttpChannel: TROWinInetHTTPChannel
+ Encryption.EncryptionSendKey = 'CDB4E624C47EF40C26DCE65F70E6F3ABC03B6AD4FC0B064985F180A46895F064'
+ Encryption.EncryptionRecvKey = 'CDB4E624C47EF40C26DCE65F70E6F3ABC03B6AD4FC0B064985F180A46895F064'
+ UserAgent = 'RemObjects SDK'
+ KeepConnection = True
+ ServerLocators = <>
+ DispatchOptions = []
+ Left = 380
+ Top = 344
+ end
+ object RemoteService: TRORemoteService
+ ServiceName = 'NewService'
+ Left = 609
+ Top = 339
+ end
+ object PostMessage: TROPostMessage
+ Left = 70
+ Top = 6
+ end
+ object XmlRpcMessage: TROXmlRpcMessage
+ Left = 98
+ Top = 6
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoClientMain.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoClientMain.pas
new file mode 100644
index 0000000..4944472
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoClientMain.pas
@@ -0,0 +1,1754 @@
+unit MegaDemoClientMain;
+
+{ Activate this define if you are using the demo without having Indy installed.
+
+ Simply click "Ignore" when opening the form to have the Indy components
+ remove, set the define and rebuild the demo. }
+
+{.$DEFINE NO_INDY}
+{.$DEFINE NO_SYNAPSE}
+{$I RemObjects.inc}
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ StdCtrls, Spin, ExtCtrls, ComCtrls, SyncObjs, uROClientIntf, TypInfo,
+
+{$IFNDEF NO_INDY}
+ uROIndyTCPChannel, uROIndyHTTPChannel, uROSuperTCPChannel,uROIndySuperHttpChannel,
+{$ENDIF NO_INDY}
+{$IFNDEF NO_SYNAPSE}
+ uROSynapseHttpChannel,uROSynapseSuperTCPChannel, uROSynapseSuperHttpChannel,
+{$ENDIF}
+ uROClient, uROBINMessage, uROWinMessageChannel, uROSOAPMessage,
+ uROWinInetHttpChannel, uROXMLIntf, MegaDemoLibrary_Intf, uROTypes,
+ uRORemoteService, uROPoweredByRemObjectsButton, uROXmlRpcMessage,
+ ImgList, Buttons, uRODynamicRequest, uROPostMessage, CheckLst;
+
+const
+ msgWarningPorts =
+ 'Issuing many requests in a short period of time can cause the client PC to run out of ip-port combinations.' + sLineBreak +
+ 'Once an ip-port combination has been used, it takes some time (1 to 4 min on Windows) before that combination can be re-used' + sLineBreak + '' + sLineBreak +
+ 'Run netstat from command prompt to see how many connections are in TIME_WAIT state.' + sLineBreak + '' + sLineBreak +
+ 'If you have long loops (i.e 50 cycles or 5 threads running 10) allow your PC to restore some ports by not' + sLineBreak +
+ 'doing anything for a minute or so once the test has completed.' + sLineBreak + '' + sLineBreak +
+ 'Do you want to continue?';
+
+type
+ TArrayType = (atInteger, atString, atTPerson);
+
+ TStressMethod = function(aService: IMegaDemoService): integer of object;
+
+ TMegaDemoClientMainForm = class(TForm)
+ BINMessage: TROBINMessage;
+ SOAPMessage: TROSOAPMessage;
+ WinMessageChannel: TROWinMessageChannel;
+ PageControl1: TPageControl;
+ tsSoap: TTabSheet;
+ tsLog: TTabSheet;
+ Memo: TMemo;
+ Memo1: TMemo;
+ Memo2: TMemo;
+ Splitter1: TSplitter;
+ WininetHttpChannel: TROWinInetHTTPChannel;
+ RemoteService: TRORemoteService;
+ Panel3: TPanel;
+ PostMessage: TROPostMessage;
+ Panel4: TPanel;
+ clbTests: TCheckListBox;
+ pagecontrol2: TPageControl;
+ tsStress: TTabSheet;
+ tsSum: TTabSheet;
+ tsEchoPerson: TTabSheet;
+ tsRaiseError: TTabSheet;
+ seA: TSpinEdit;
+ seB: TSpinEdit;
+ Label4: TLabel;
+ seAge: TSpinEdit;
+ cbSex: TComboBox;
+ eLastName: TEdit;
+ eFirstName: TEdit;
+ Label3: TLabel;
+ Label2: TLabel;
+ cbCustomException: TCheckBox;
+ Label5: TLabel;
+ tsTestArrays: TTabSheet;
+ tsEchoBinary: TTabSheet;
+ tsGetServerTime: TTabSheet;
+ tsCustomClass: TTabSheet;
+ Label6: TLabel;
+ seArrayCount: TSpinEdit;
+ rbInteger: TRadioButton;
+ rbString: TRadioButton;
+ rbTPerson: TRadioButton;
+ seBinSize: TSpinEdit;
+ Label7: TLabel;
+ rbStream: TRadioButton;
+ rbXML: TRadioButton;
+ Panel5: TPanel;
+ Panel1: TPanel;
+ GroupBox5: TGroupBox;
+ rbBinary: TRadioButton;
+ rbSOAP: TRadioButton;
+ cbUseCompression: TCheckBox;
+ rbPost: TRadioButton;
+ cbEncrypt: TCheckBox;
+ RoPoweredByRemObjectsButton1: TROPoweredByRemObjectsButton;
+ cbEnableLog: TCheckBox;
+ cbVerbose: TCheckBox;
+ cbWriteTestInfo: TCheckBox;
+ Label11: TLabel;
+ Label16: TLabel;
+ Label17: TLabel;
+ Label18: TLabel;
+ Label19: TLabel;
+ Label20: TLabel;
+ Label21: TLabel;
+ Label22: TLabel;
+ Label23: TLabel;
+ Label24: TLabel;
+ RunTestOnceButton: TButton;
+ RunTestButton: TButton;
+ seRepetitions: TSpinEdit;
+ Label15: TLabel;
+ seThreads: TSpinEdit;
+ Label14: TLabel;
+ pStress: TPanel;
+ pSum: TPanel;
+ pTestArrays: TPanel;
+ pEchoBinary: TPanel;
+ pGetServerTime: TPanel;
+ pCustomClass: TPanel;
+ pRaiseError: TPanel;
+ pPage: TPanel;
+ pEchoPerson: TPanel;
+ rbXmlRpc: TRadioButton;
+ XmlRpcMessage: TROXmlRpcMessage;
+ cbAutoDetect: TCheckBox;
+ pgChannels: TPageControl;
+ tsWindowsMessage: TTabSheet;
+ tsHttp: TTabSheet;
+ tsTCP: TTabSheet;
+ tsSuperTCP: TTabSheet;
+ tsSuperHTTP: TTabSheet;
+ Label8: TLabel;
+ eServerID: TEdit;
+ Label1: TLabel;
+ cbHTTPURL: TComboBox;
+ cbTCPIP: TComboBox;
+ Label9: TLabel;
+ Label10: TLabel;
+ cbTCPPort: TComboBox;
+ rbIndyHttp: TRadioButton;
+ rbWinInetHttp: TRadioButton;
+ rbSynapseHttp: TRadioButton;
+ cbKeepConnection: TCheckBox;
+ RbIndyTcp: TRadioButton;
+ cbDisableNagle: TCheckBox;
+ Label12: TLabel;
+ Label13: TLabel;
+ cbSuperTCPPort: TComboBox;
+ cbSuperTCPIP: TComboBox;
+ Label25: TLabel;
+ cbSuperHTTPURL: TComboBox;
+ rbIndySuperTCP: TRadioButton;
+ rbSynapseSuperTCP: TRadioButton;
+ rbIndySuperHttp: TRadioButton;
+ rbSynapseSuperHttp: TRadioButton;
+ procedure FormCreate(Sender: TObject);
+ procedure FormDestroy(Sender: TObject);
+ procedure bTestEchoBinaryClick(Sender: TObject);
+ procedure Image1Click(Sender: TObject);
+ procedure cbEncryptClick(Sender: TObject);
+ procedure rbBinaryClick(Sender: TObject);
+ procedure rbSOAPClick(Sender: TObject);
+ procedure cbDisableNagleClick(Sender: TObject);
+ procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
+ procedure bbStressCustomClassClick(Sender: TObject);
+ procedure rbPostClick(Sender: TObject);
+ procedure cbHTTPURLChange(Sender: TObject);
+ procedure SOAPMessageWriteToStream(aStream: TStream);
+ procedure SOAPMessageEnvelopeComplete(Sender: TROSOAPMessage);
+ procedure SOAPMessageReadFromStream(aStream: TStream);
+ procedure BINMessageFinalizeMessage(Sender: TROMessage);
+ procedure BINMessageReadMessageParameter(Sender: TROMessage;
+ const aName: string; aTypeInfo: PTypeInfo; const DataRef: Pointer;
+ Attributes: TParamAttributes);
+ procedure BINMessageWriteMessageParameter(Sender: TROMessage;
+ const aName: string; aTypeInfo: PTypeInfo; const DataRef: Pointer;
+ Attributes: TParamAttributes);
+ procedure BINMessageInitializeMessage(Sender: TROMessage;
+ const aTransport: IROTransport; const anInterfaceName,
+ aMessageName: string);
+ procedure clbTestsClick(Sender: TObject);
+ procedure RunTestOnceButtonClick(Sender: TObject);
+ procedure RunTestButtonClick(Sender: TObject);
+ procedure FormShow(Sender: TObject);
+ procedure clbTestsClickCheck(Sender: TObject);
+ procedure rbIndyHttpClick(Sender: TObject);
+ procedure rbXmlRpcClick(Sender: TObject);
+ procedure cbAutoDetectClick(Sender: TObject);
+ procedure cbSuperHTTPURLChange(Sender: TObject);
+ procedure pgChannelsChange(Sender: TObject);
+ private
+ {$IFNDEF NO_INDY}
+ ROIndyHTTPChannel : TROIndyHTTPChannel;
+ ROIndyTCPChannel : TROIndyTCPChannel;
+ ROIndySuperHttpChannel : TROIndySuperHttpChannel;
+ ROIndySuperTCPChannel : TROSuperTcpChannel;
+ {$ENDIF}
+ {$IFNDEF NO_SYNAPSE}
+ ROSynapseHttpchannel: TROSynapseHTTPChannel;
+ ROSynapseSuperHttpChannel : TROSynapseSuperHttpChannel;
+ ROSynapseSuperTCPChannel : TROSynapseSuperTcpChannel;
+ {$ENDIF}
+ fCritical: TCriticalSection;
+ fThreads: TList;
+ fTerminateTest: boolean;
+ fMessage: TROMessage;
+ fChannel: TROTransportChannel;
+ fMegaTestStart: cardinal;
+ fLogEnabledStatus: boolean;
+
+ function CreateService: IMegaDemoService;
+ procedure ChangeUrl(iTo: string);
+ procedure Log(const aMessage: string; Force: boolean = FALSE);
+
+ procedure NotifyThreadTermination(aThread: TThread);
+ function GetMegaTestRunning: boolean;
+
+ // Methods to invoke the remote service. These are also used by the stress threads later.
+ // They return the time it took to execute
+ function InvokeCustomClass(const aService: IMegaDemoService; UseBinaryStream: boolean): integer;
+ {} function InvokeEchoBinary(const aService: IMegaDemoService; aSize: integer): integer;
+ {} function InvokeEchoPerson(const aService: IMegaDemoService; const aFirstName, aLastName: string; anAge: integer; aSex: TSex): integer;
+ {} function InvokeRaiseError(const aService: IMegaDemoService): integer;
+ {} function InvokeSum(const aService: IMegaDemoService; A, B: integer): integer;
+ {} function InvokeTestArray(const aService: IMegaDemoService; anArrayType: TArrayType; aCount: integer): integer;
+ {} function InvokeGetServerTime(const aService: IMegaDemoService): integer;
+
+ // Logs
+ procedure WriteSequentialStressEnd(TotalTime, Errors: integer);
+
+ procedure WriteSequentialStressStart(TestName: string; const ExtraInfo: string = '');
+
+ procedure WriteTestInfo(ARunOnce: Boolean);
+ function GetRequestsPerSecond(TotalTimeMS: integer): double;
+ procedure Check_ListBoxClick(isAllDemo: Boolean);
+
+ procedure Stress(AMethod: TStressMethod);
+ function RunSum(aService: IMegaDemoService): integer;
+ function RunEchoPerson(aService: IMegaDemoService): integer;
+ function RunRaiseError(aService: IMegaDemoService): integer;
+ function RunTestArrays(aService: IMegaDemoService): integer;
+ function int_RunTestArrays(aService: IMegaDemoService; anArrayType: TArrayType): integer;
+ function RunEchoBinary(aService: IMegaDemoService): integer;
+ function RunServerTime(aService: IMegaDemoService): integer;
+ function RunCustomClass(aService: IMegaDemoService): integer;
+
+ procedure RunAllDemo;
+ procedure StopAllDemo;
+
+ procedure LoadFromIni;
+ procedure SaveToIni;
+
+ public
+ constructor Create(aOwner: TComponent); override;
+ destructor Destroy; override;
+
+ property UserChannel: TROTransportChannel read fChannel;
+ property UserMessage: TROMessage read fMessage;
+ property MegaTestRunning: boolean read GetMegaTestRunning;
+ end;
+
+var
+ MegaDemoClientMainForm: TMegaDemoClientMainForm;
+
+implementation
+
+uses INIFiles, MegaDemoCustomClass, uROXMLSerializer, uROStreamSerializer,
+ ShellAPI, uROEncryption, ActiveX;
+
+{$R *.DFM}
+
+type
+ { TStressThread }
+ TStressThread = class(TThread)
+ private
+ fMessage: TROMessage;
+ fChannel: TROTransportChannel;
+ fErrors,
+ fSumTime,
+ fEchoPersonTime,
+ fRaiseErrorTime,
+ fArrayTime,
+ fEchoBinaryTime,
+ fGetServerTimeTime,
+ fCustomClassTime,
+ fTotalTime: integer;
+ Fidx: integer;
+ procedure BeforeDestroyThread;
+ procedure Run;
+ public
+
+ constructor Create;
+ destructor Destroy; override;
+
+ procedure Execute; override;
+
+ property Errors: integer read fErrors;
+ property EchoPersonTime: integer read fEchoPersonTime;
+ property RaiseErrorTime: integer read fRaiseErrorTime;
+ property ArrayTime: integer read fArrayTime;
+ property EchoBinaryTime: integer read fEchoBinaryTime;
+ property GetServerTimeTime: integer read fGetServerTimeTime;
+ property CustomClassTime: integer read fCustomClassTime;
+ property TotalTime: integer read fTotalTime;
+ property idx: integer read Fidx write Fidx;
+ end;
+
+procedure TMegaDemoClientMainForm.FormCreate(Sender: TObject);
+var
+ sx: TSex;
+begin
+ Caption := Application.Title;
+
+{$IFDEF NO_INDY}
+ rbIndyHttp.Enabled := false;
+ rbIndyTcp.Enabled := false;
+ rbIndySuperTCP.Enabled := false;
+ rbIndySuperHttp.Enabled := false;
+{$ELSE}
+ ROIndyHTTPChannel := TROIndyHTTPChannel.Create(Self);
+ ROIndyHTTPChannel.Encryption.Assign(WininetHttpChannel.Encryption);
+
+ ROIndyTCPChannel := TROIndyTCPChannel.Create(Self);
+ ROIndyTCPChannel.Encryption.Assign(WininetHttpChannel.Encryption);
+
+ ROIndySuperHttpChannel:= TROIndySuperHttpChannel.Create(Self);
+ ROIndySuperHttpChannel.Encryption.Assign(WininetHttpChannel.Encryption);
+
+ ROIndySuperTCPChannel := TROSuperTcpChannel.Create(Self);
+ ROIndySuperTCPChannel.Encryption.Assign(WininetHttpChannel.Encryption);
+{$ENDIF NO_INDY}
+
+{$IFDEF NO_SYNAPSE}
+ rbSynapseHttp.Enabled := false;
+ rbSynapseSuperTCP.Enabled := false;
+ rbSynapseSuperHttp.Enabled := false;
+{$ELSE}
+ ROSynapseHttpchannel := TROSynapseHTTPChannel.Create(self);
+ ROSynapseHttpchannel.Encryption.Assign(WininetHttpChannel.Encryption);
+
+ ROSynapseSuperHttpChannel := TROSynapseSuperHttpChannel.Create(self);
+ ROSynapseSuperHttpChannel.Encryption.Assign(WininetHttpChannel.Encryption);
+
+ ROSynapseSuperTCPChannel := TROSynapseSuperTcpChannel.Create(self);
+ ROSynapseSuperTCPChannel.Encryption.Assign(WininetHttpChannel.Encryption);
+{$ENDIF}
+ LoadFromIni;
+
+ for sx := Low(TSex) to High(TSex) do
+ cbSex.Items.Add(GetEnumName(TypeInfo(TSex), Ord(sx)));
+ cbSex.ItemIndex := 0;
+end;
+
+procedure TMegaDemoClientMainForm.FormDestroy(Sender: TObject);
+begin
+ SaveToIni;
+end;
+
+function TMegaDemoClientMainForm.CreateService: IMegaDemoService;
+begin
+ // Adds the entry if new
+ with cbTCPIP do
+ if (Items.IndexOf(Text) < 0) and (Text <> '') then
+ Items.Add(Text);
+
+ with cbHTTPURL do
+ if (Items.IndexOf(Text) < 0) and (Text <> '') then
+ Items.Add(Text);
+
+ with cbTCPPort do
+ if (Items.IndexOf(Text) < 0) and (Text <> '') then
+ Items.Add(Text);
+
+ with cbSuperHTTPURL do
+ if (Items.IndexOf(Text) < 0) and (Text <> '') then
+ Items.Add(Text);
+
+ with cbSuperTCPIP do
+ if (Items.IndexOf(Text) < 0) and (Text <> '') then
+ Items.Add(Text);
+
+ with cbSuperTCPPort do
+ if (Items.IndexOf(Text) < 0) and (Text <> '') then
+ Items.Add(Text);
+
+
+ { Set up BIN message }
+ BINMessage.UseCompression := cbUseCompression.Checked;
+
+ { Set up Http Channels }
+{$IFNDEF NO_INDY}
+ ROIndyHTTPChannel.TargetURL := cbHTTPURL.Text;
+ ROIndyHTTPChannel.KeepAlive := cbKeepConnection.Checked;
+ ROIndySuperHttpChannel.TargetURL := cbSuperHTTPURL.Text;
+
+ ROIndyTCPChannel.Host := cbTCPIP.Text;
+ ROIndyTCPChannel.Port := StrToInt(cbTCPPort.Text);
+
+ ROIndySuperTCPChannel.Port:= StrToInt(cbSuperTCPPort.Text);
+ ROIndySuperTCPChannel.Host:= cbSuperTCPIP.Text;
+{$ENDIF NO_INDY}
+
+{$IFNDEF NO_SYNAPSE}
+ ROSynapseHttpchannel.TargetURL := cbHTTPURL.Text;
+ ROSynapseHttpchannel.KeepAlive := cbKeepConnection.Checked;
+
+ ROSynapseSuperHttpChannel.TargetURL := cbSuperHTTPURL.Text;
+ ROSynapseSuperTCPChannel.Port:= StrToInt(cbSuperTCPPort.Text);
+ ROSynapseSuperTCPChannel.Host:= cbSuperTCPIP.Text;
+{$ENDIF NO_SYNAPSE}
+
+ WininetHttpChannel.TargetURL := cbHTTPURL.Text;
+ WininetHttpChannel.KeepConnection := cbKeepConnection.Checked;
+
+ { Set up WM Channel }
+ WinMessageChannel.ServerID := LibraryUID;
+
+ { Select message class based on radio button selection }
+ if rbBinary.Checked then
+ fMessage := BINMessage
+ else if rbPost.Checked then
+ fMessage := PostMessage
+ else if rbXMLRpc.Checked then
+ fMessage := XmlRpcMessage
+ else
+ fMessage := SOAPMessage;
+ fChannel := nil;
+ if pgChannels.ActivePage = tsHttp then begin
+ {$IFNDEF NO_INDY}
+ if rbIndyHttp.Checked then
+ fChannel := ROIndyHttpChannel
+ else
+ {$ENDIF NO_INDY}
+ {$IFNDEF NO_SYNAPSE}
+ if rbSynapseHttp.Checked then
+ fChannel := ROSynapseHttpchannel
+ else
+ {$ENDIF NO_INDY}
+ fChannel := WininetHttpChannel;
+ end
+ else if pgChannels.ActivePage = tsTCP then begin
+ {$IFNDEF NO_INDY}
+ fChannel := ROIndyTCPChannel;
+ {$ENDIF NO_INDY}
+ end
+ else if pgChannels.ActivePage = tsSuperHTTP then begin
+ {$IFDEF NO_SYNAPSE}
+ rbIndySuperHttp.Checked:= True;
+ {$ENDIF}
+ {$IFNDEF NO_INDY}
+ if rbIndySuperHttp.Checked then fChannel := ROIndySuperHttpChannel ;
+ {$ELSE}
+ rbSynapseSuperHttp.Checked := True;
+ {$ENDIF NO_INDY}
+ {$IFNDEF NO_SYNAPSE}
+ if rbSynapseSuperHttp.Checked then fChannel := ROSynapseSuperHttpChannel
+ {$ENDIF NO_INDY}
+ end
+ else if pgChannels.ActivePage = tsSuperTCP then begin
+ {$IFDEF NO_SYNAPSE}
+ rbIndySuperTcp.Checked:= True;
+ {$ENDIF}
+ {$IFNDEF NO_INDY}
+ if rbIndySuperTCP.Checked then fChannel := ROIndySuperTCPChannel;
+ {$ELSE}
+ rbSynapseSuperTCP.Checked := True;
+ {$ENDIF NO_INDY}
+ {$IFNDEF NO_SYNAPSE}
+ if rbSynapseSuperTCP.Checked then fChannel := ROSynapseSuperTCPChannel;
+ {$ENDIF NO_INDY}
+ end
+ else if pgChannels.ActivePage = tsWindowsMessage then begin
+ fChannel := WinMessageChannel;
+ end;
+
+ // Sets up the main components
+ RemoteService.Channel := fChannel;
+ RemoteService.Message := fMessage;
+
+ result := RemoteService as IMegaDemoService;
+end;
+
+function TMegaDemoClientMainForm.InvokeSum(const aService: IMegaDemoService; A, B: integer):
+ integer;
+var
+ res: integer;
+ start: cardinal;
+begin
+ start := GetTickCount;
+ res := aService.Sum(seA.Value, seB.Value);
+ result := GetTickCount - start;
+ Log('Sum');
+ Log('---');
+ Log(Format('outgoing:'#9'A=%d B=%d', [seA.Value, seB.Value]));
+ Log(Format('incoming:'#9'Result=%d', [res]));
+ Log('');
+end;
+
+function TMegaDemoClientMainForm.InvokeEchoPerson(const aService: IMegaDemoService;
+ const aFirstName, aLastName: string; anAge: integer; aSex: TSex): integer;
+var
+ outgoing, incoming: TPerson;
+ start: cardinal;
+begin
+ outgoing := TPerson.Create;
+ outgoing.FirstName := eFirstName.Text;
+ outgoing.LastName := eLastName.Text;
+ outgoing.Age := seAge.Value;
+ outgoing.Sex := TSex(cbSex.ItemIndex);
+
+ try
+ start := GetTickCount;
+ aService.EchoPerson(outgoing, incoming);
+ result := GetTickCount - start;
+
+ Log('EchoPerson');
+ Log('----------');
+ with outgoing do
+ Log(Format('%s:'#9'%s, %s, %s, %s', ['outgoing', FirstName, LastName, IntToStr(Age), GetEnumName(TypeInfo(TSex), Ord(Sex))]));
+ with incoming do
+ Log(Format('%s:'#9'%s, %s, %s, %s', ['incoming', FirstName, LastName, IntToStr(Age), GetEnumName(TypeInfo(TSex), Ord(Sex))]));
+
+ Log('');
+
+ finally
+ incoming.Free;
+ outgoing.Free;
+ end;
+end;
+
+function TMegaDemoClientMainForm.InvokeRaiseError(const aService: IMegaDemoService): integer;
+var
+ start: cardinal;
+begin
+ Result := 0;
+ start := GetTickCount;
+ Log('RaiseError');
+ Log('----------');
+ try
+ try
+ if not cbCustomException.Checked then
+ aService.RaiseError()
+ else
+ aService.RaiseTestException;
+ finally
+ result := GetTickCount - start;
+ end;
+ except
+ on E: ETestException do
+ if rbXmlRpc.Checked then
+ Log(Format(
+ 'ETestException' + sLineBreak +
+ 'Message:'#9'%s',
+ [E.Message]), true)
+ else
+ Log(Format(
+ 'ETestException' + sLineBreak +
+ 'Message:'#9'%s' + sLineBreak +
+ 'ErrorCode:'#9'%d' + sLineBreak +
+ 'AdditionalInfo:'#9'%s',
+ [E.Message, E.ErrorCode, E.AdditionalInfo]), true);
+ on E: Exception do
+ Log(
+ 'Generic exception:'#9 + E.ClassName + sLineBreak +
+ 'Message:'#9#9 + E.Message, true);
+ end;
+ Log('');
+end;
+
+function TMegaDemoClientMainForm.InvokeTestArray(const aService: IMegaDemoService;
+ anArrayType: TArrayType; aCount: integer): integer;
+var
+ i: integer;
+ iarr, iarr2: TIntegerArray;
+ sarr, sarr2: TStringArray;
+ parr, parr2: TPersonArray;
+ s, s1: string;
+ err: boolean;
+ start: cardinal;
+begin
+ Result := 0;
+ s := '';
+ err := FALSE;
+
+ iarr := nil;
+ iarr2 := nil;
+ sarr := nil;
+ sarr2 := nil;
+ parr := nil;
+ parr2 := nil;
+
+ try
+ case anArrayType of
+ atInteger: try
+ s1 := rbInteger.Caption;
+ Randomize;
+ iarr := TIntegerArray.Create;
+ iarr.Resize(seArrayCount.Value);
+ for i := 0 to (seArrayCount.Value - 1) do
+ iarr[i] := Random(100);
+
+ start := GetTickCount;
+ iarr2 := aService.TestIntegerArray(iarr);
+ result := GetTickCount - start;
+
+ for i := 0 to (seArrayCount.Value - 1) do begin
+ s := s + Format('%d:'#9'%d - %d', [i, iarr[i], iarr2[i]]) + sLineBreak;
+ if (iarr2[i] <> iarr[i]) then begin
+ err := TRUE;
+ Exit;
+ end;
+ end;
+ finally
+ iarr.Free;
+ iarr2.Free;
+ end;
+
+ atString: try
+ s1 := rbString.Caption;
+ Randomize;
+ sarr := TStringArray.Create;
+ sarr.Resize(seArrayCount.Value);
+
+ for i := 0 to (seArrayCount.Value - 1) do begin
+ sarr[i] := 'Value is ' + IntToStr(Random(1000) + 1000);
+ end;
+
+ start := GetTickCount;
+ sarr2 := aService.TestStringArray(sarr);
+ result := GetTickCount - start;
+
+ for i := 0 to (seArrayCount.Value - 1) do begin
+ s := s + Format('%d:'#9'"%s" - "%s"', [i, sarr[i], sarr2[i]]) + sLineBreak;
+ if (sarr2[i] <> sarr[i]) then begin
+ err := TRUE;
+ Exit;
+ end;
+ end;
+ finally
+ sarr.Free;
+ sarr2.Free;
+ end;
+
+ atTPerson: try
+ s1 := rbTPerson.Caption;
+ parr := TPersonArray.Create;
+ parr.Resize(seArrayCount.Value);
+
+ for i := 0 to (seArrayCount.Value - 1) do begin
+ parr[i] := TPerson.Create;
+ with parr[i] do begin
+ FirstName := eFirstName.Text;
+ LastName := eLastName.Text;
+ Age := seAge.Value;
+ Sex := TSex(cbSex.ItemIndex);
+ end;
+ end;
+
+ start := GetTickCount;
+ parr2 := aService.TestPersonArray(parr);
+ result := GetTickCount - start;
+
+ for i := 0 to (seArrayCount.Value - 1) do begin
+ s := s + Format('%d:'#9'%s %s %d %d - %s %s %d %d', [
+ i,
+ parr[i].FirstName, parr[i].LastName, parr[i].Age,
+ Ord(parr[i].Sex),
+ parr2[i].FirstName, parr2[i].LastName, parr2[i].Age,
+ Ord(parr2[i].Sex)]) + sLineBreak;
+
+ if (parr2[i].FirstName <> parr[i].FirstName) or
+ (parr2[i].LastName <> parr[i].LastName) or
+ (parr2[i].Age <> parr[i].Age) or
+ (parr2[i].Sex <> parr[i].Sex) then begin
+ err := TRUE;
+ Exit;
+ end;
+ end;
+ finally
+ parr.Free;
+ parr2.Free;
+ end;
+ end;
+ finally
+ if err then
+ s := 'Arrays are DIFFERENT!' + sLineBreak + s
+ else
+ s := sLineBreak + 'Arrays equal!' + sLineBreak + s;
+ Log('TestArray');
+ Log('---------');
+ Log('Mode:'#9 + s1);
+ Log(s);
+ end;
+end;
+
+function TMegaDemoClientMainForm.InvokeEchoBinary(const aService: IMegaDemoService; aSize:
+ integer): integer;
+var
+ binin, binout: Binary;
+ i: integer;
+ b: byte;
+ start: cardinal;
+begin
+ Randomize;
+ binin := Binary.Create;
+ binout := nil;
+
+ try
+ binin.SetSize(seBinSize.Value);
+ binin.Position := 0;
+ for i := 1 to seBinSize.Value do begin
+ b := Random($FF);
+ binin.Write(b, SizeOf(b));
+ end;
+
+ binin.Position := 0;
+
+ start := GetTickCount;
+ aService.EchoBinary(binin, binout);
+ result := GetTickCount - start;
+
+ Log('EchoBinary');
+ Log('-------------');
+
+ Log('outgoing:'#9 + IntToStr(binin.Size) + ' bytes');
+ Log('incoming:'#9 + IntToStr(binout.Size) + ' bytes');
+
+ if (binin.Size = binout.Size) then begin
+ if CompareMem(binin.Memory, binout.Memory, binout.Size) then
+ Log('Data is equivalent!')
+ else
+ Log('Data is different!');
+ end
+ else begin
+ Log('Different size!');
+ end;
+ Log('');
+ finally
+ binin.Free;
+ binout.Free;
+ end;
+end;
+
+function TMegaDemoClientMainForm.InvokeCustomClass(const aService: IMegaDemoService;
+ UseBinaryStream: boolean): integer;
+var
+ cls: TCustomClass;
+ stream: Binary;
+ xml: string;
+ start: cardinal;
+begin
+ stream := nil;
+ cls := nil;
+ try
+ if not UseBinaryStream then begin
+ start := GetTickCount;
+ xml := aService.CustomObjectAsString;
+ result := GetTickCount - start;
+ cls := XMLToObject(xml) as TCustomClass;
+ end
+ else begin
+ start := GetTickCount;
+ stream := aService.CustomObjectAsStream;
+ result := GetTickCount - start;
+ cls := StreamToObject(stream) as TCustomClass;
+ end;
+ Log('CustomClass');
+ Log('-----------');
+ Log('incoming:');
+ // incoming data
+ with cls do begin
+ Log('Random integer:'#9#9 + intToStr(RandomInt));
+ Log('Random double:'#9#9 + FloatToStr(RandomDouble));
+ Log('Random string:'#9#9 + RandomStr);
+ Log('Random widestring:'#9 + RandomWideStr);
+ end;
+ finally
+ stream.Free;
+ cls.Free;
+ end;
+end;
+
+function TMegaDemoClientMainForm.InvokeGetServerTime(const aService: IMegaDemoService): integer;
+var
+ start: cardinal;
+ restime: TDateTime;
+begin
+ start := GetTickCount;
+ restime := aService.GetServerTime;
+ result := GetTickCount - start;
+ Log('GetServerTime');
+ Log('------------------');
+ Log('incoming:'#9 + DateTimeToStr(restime));
+ Log('');
+end;
+
+procedure TMegaDemoClientMainForm.bTestEchoBinaryClick(Sender: TObject);
+begin
+ InvokeEchoBinary(CreateService, seBinSize.Value);
+end;
+
+procedure TMegaDemoClientMainForm.Image1Click(Sender: TObject);
+begin
+ ShellExecute(Handle, 'open', 'http://www.remobjects.com', nil, nil, SW_SHOWNORMAL);
+end;
+
+procedure TMegaDemoClientMainForm.cbEncryptClick(Sender: TObject);
+var
+ lEncryption: TROEncryptionMethod;
+begin
+ if cbEncrypt.Checked then
+ lEncryption := tetDES
+ else
+ lEncryption := tetNone;
+
+ WininetHttpChannel.Encryption.EncryptionMethod := lEncryption;
+
+{$IFNDEF NO_INDY}
+ ROIndyHttpChannel.Encryption.Assign(WininetHttpChannel.Encryption);
+ ROIndyTcpChannel.Encryption.Assign(WininetHttpChannel.Encryption);
+ ROIndySuperHttpChannel.Encryption.Assign(WininetHttpChannel.Encryption);
+ ROIndySuperTCPChannel.Encryption.Assign(WininetHttpChannel.Encryption);
+
+{$ENDIF NO_INDY}
+{$IFNDEF NO_SYNAPSE}
+ ROSynapseHttpchannel.Encryption.Assign(WininetHttpChannel.Encryption);
+ ROSynapseSuperHttpChannel.Encryption.Assign(WininetHttpChannel.Encryption);
+ ROSynapseSuperTCPChannel.Encryption.Assign(WininetHttpChannel.Encryption);
+
+{$ENDIF}
+
+ WinMessageChannel.Encryption.EncryptionMethod := lEncryption;
+end;
+
+procedure TMegaDemoClientMainForm.ChangeUrl(iTo: string);
+begin
+ { lame, but works }
+ if cbAutoDetect.Checked then iTo:='';
+ cbHTTPURL.Text := StringReplace(cbHTTPURL.Text, '/bin', '/' + iTo, [rfReplaceAll, rfIgnoreCase]);
+ cbHTTPURL.Text := StringReplace(cbHTTPURL.Text, '/soap', '/' + iTo, [rfReplaceAll, rfIgnoreCase]);
+ cbHTTPURL.Text := StringReplace(cbHTTPURL.Text, '/post', '/' + iTo, [rfReplaceAll, rfIgnoreCase]);
+ cbHTTPURL.Text := StringReplace(cbHTTPURL.Text, '/xmlrpc', '/' + iTo, [rfReplaceAll, rfIgnoreCase]);
+
+ if not cbAutoDetect.Checked and (Pos(iTo, cbHTTPURL.Text) = 0) then
+ cbHTTPURL.Text:=cbHTTPURL.Text+iTo;
+
+ cbSuperHTTPUrl.Text := StringReplace(cbSuperHTTPUrl.Text, '/bin', '/' + iTo, [rfReplaceAll, rfIgnoreCase]);
+ cbSuperHTTPUrl.Text := StringReplace(cbSuperHTTPUrl.Text, '/soap', '/' + iTo, [rfReplaceAll, rfIgnoreCase]);
+ cbSuperHTTPUrl.Text := StringReplace(cbSuperHTTPUrl.Text, '/post', '/' + iTo, [rfReplaceAll, rfIgnoreCase]);
+ cbSuperHTTPUrl.Text := StringReplace(cbSuperHTTPUrl.Text, '/xmlrpc', '/' + iTo, [rfReplaceAll, rfIgnoreCase]);
+
+ if not cbAutoDetect.Checked and (Pos(iTo, cbSuperHTTPUrl.Text) = 0) then
+ cbSuperHTTPUrl.Text:=cbSuperHTTPUrl.Text+iTo;
+
+
+ cbUseCompression.Enabled := rbBinary.Checked;
+ cbVerbose.Enabled := rbBinary.Checked;
+
+ tsSoap.TabVisible := rbSOAP.Checked;
+ if not tsSoap.TabVisible then tsLog.PageControl.ActivePage := tsLog;
+end;
+
+procedure TMegaDemoClientMainForm.rbBinaryClick(Sender: TObject);
+begin
+ ChangeUrl('bin');
+end;
+
+procedure TMegaDemoClientMainForm.rbSOAPClick(Sender: TObject);
+begin
+ ChangeUrl('soap');
+end;
+
+procedure TMegaDemoClientMainForm.rbPostClick(Sender: TObject);
+begin
+ ChangeUrl('post');
+end;
+
+procedure TMegaDemoClientMainForm.cbDisableNagleClick(Sender: TObject);
+begin
+{$IFNDEF NO_INDY}
+ ROIndyTCPChannel.DisableNagle := cbDisableNagle.Checked;
+{$ENDIF}
+end;
+
+function TMegaDemoClientMainForm.GetRequestsPerSecond(TotalTimeMS: integer): double;
+begin
+ if TotalTimeMS > 0 then
+ result := (seRepetitions.Value) / (TotalTimeMS / 1000)
+ else
+ result := seRepetitions.Value;
+end;
+
+procedure TMegaDemoClientMainForm.NotifyThreadTermination(aThread: TThread);
+var
+ totaltimemega, idx: integer;
+ overallrsec: double;
+begin
+ fCritical.Enter;
+ try
+ idx := TStressThread(aThread).idx;
+
+ Log(Format('Thread %d has terminated. %dms. %f Req/Sec. %d Errors', [idx, TStressThread(aThread).TotalTime, GetRequestsPerSecond(TStressThread(aThread).TotalTime), TStressThread(aThread).Errors]), TRUE);
+
+ fThreads.Remove(aThread);
+
+ if fThreads.Count = 0 then begin
+ Screen.Cursor := crDefault;
+
+ totaltimemega := GetTickCount - fMegaTestStart;
+ overallrsec := (seThreads.Value * seRepetitions.Value) / (totaltimemega / 1000);
+
+ Log(Format('The test was completed in %dms. %f Total req/second', [totaltimemega, overallrsec]), TRUE);
+ Caption := Application.Title;
+ end
+ else begin
+ Caption := Application.Title + Format(' (%d threads running)', [fThreads.Count]);
+ end;
+
+ Application.ProcessMessages;
+ finally
+ fCritical.Leave;
+ end;
+end;
+
+constructor TMegaDemoClientMainForm.Create(aOwner: TComponent);
+begin
+ inherited;
+ fCritical := TCriticalSection.Create;
+ fThreads := TList.Create;
+end;
+
+destructor TMegaDemoClientMainForm.Destroy;
+begin
+ fCritical.Free;
+ fThreads.Free;
+ inherited;
+end;
+
+procedure TMegaDemoClientMainForm.FormCloseQuery(Sender: TObject;
+ var CanClose: Boolean);
+begin
+ CanClose := not MegaTestRunning;
+
+ if not CanClose then begin
+ if (MessageDlg('Do you want to stop the mega test?', mtWarning, [mbYes, mbNo], 0) = mrYes) then
+ StopAllDemo
+ else
+ Exit;
+
+ while MegaTestRunning do
+ Application.ProcessMessages;
+
+ CanClose := TRUE;
+ end;
+end;
+
+function TMegaDemoClientMainForm.GetMegaTestRunning: boolean;
+begin
+ result := fThreads.Count > 0
+end;
+
+procedure TMegaDemoClientMainForm.WriteTestInfo(ARunOnce: Boolean);
+begin
+ if not cbWriteTestInfo.Checked then Exit;
+
+ Log('', TRUE);
+ Log('------------------ Test Parameters ------------------', TRUE);
+ Log('Channel:'#9 + UserChannel.ClassName, True);
+ if pgChannels.ActivePage = tsHttp then begin
+ Log('URL:'#9#9 + cbHTTPURL.Text, True);
+ Log('KeepConnection:'#9 + BoolToStr(cbKeepConnection.Checked, TRUE), True);
+ end
+ else if pgChannels.ActivePage = tsSuperHTTP then begin
+ Log('URL:'#9#9 + cbSuperHTTPURL.Text, True);
+ end
+ else if pgChannels.ActivePage = tsTCP then begin
+ Log('IP, port:'#9 + cbTCPIP.Text + ':' + cbTCPPort.Text, True);
+ LOG('DisableNagle:'#9 + BoolToStr(cbDisableNagle.Checked, TRUE), True);
+ end
+ else if pgChannels.ActivePage = tsSuperTCP then begin
+ Log('IP, port:'#9 + cbSuperTCPIP.Text + ':' + cbSuperTCPPort.Text, True);
+ end
+ else if pgChannels.ActivePage = tsWindowsMessage then begin
+ Log('Server ID:'#9 + eServerID.Text, True);
+ end;
+
+ Log('Message:'#9 + UserMessage.ClassName, True);
+ Log('Encrypt:'#9 + BoolToStr(cbEncrypt.Checked, TRUE), True);
+ if rbBinary.Checked then begin
+ Log('Compression:'#9 + BoolToStr(cbUseCompression.Checked, TRUE), True);
+ end;
+ if not ARunOnce then begin
+ Log(Format('Threads:'#9'%d', [seThreads.Value]), TRUE);
+ Log(Format('Repetitions:'#9'%d', [seRepetitions.Value]), TRUE);
+ Log(format('Total Requests:'#9'%d', [seThreads.Value * seRepetitions.Value]), TRUE);
+ end;
+ Log('-----------------------------------------------------', TRUE);
+ Log('', TRUE);
+end;
+
+procedure TMegaDemoClientMainForm.WriteSequentialStressStart(TestName: string; const ExtraInfo: string);
+begin
+ WriteTestInfo(False);
+ Log(Format('Starting %s test. %d repetitions %s', [testname, seRepetitions.Value, ExtraInfo]), TRUE);
+ fLogEnabledStatus := cbEnableLog.Checked;
+ cbEnableLog.Checked := FALSE;
+end;
+
+procedure TMegaDemoClientMainForm.WriteSequentialStressEnd(TotalTime, Errors: integer);
+var
+ reqsecond: double;
+begin
+ reqsecond := GetRequestsPerSecond(TotalTime);
+ Log(Format('Test complete. %dms. %f Req/Second. %d Errors', [TotalTime, reqsecond, Errors]), TRUE);
+ cbEnableLog.Checked := fLogEnabledStatus;
+end;
+
+procedure TMegaDemoClientMainForm.bbStressCustomClassClick(Sender: TObject);
+begin
+
+end;
+
+{ TStressThread }
+
+procedure TStressThread.BeforeDestroyThread;
+begin
+ MegaDemoClientMainForm.NotifyThreadTermination(Self);
+end;
+
+constructor TStressThread.Create;
+begin
+ inherited Create(TRUE);
+ FreeOnTerminate := TRUE;
+end;
+
+destructor TStressThread.Destroy;
+begin
+// Synchronize(BeforeDestroyThread);
+ inherited;
+end;
+
+procedure TStressThread.Execute;
+begin
+ Synchronize(Run);
+end;
+
+procedure TStressThread.Run;
+var
+ svc: IMegaDemoService;
+ maxcount: integer;
+ i: integer;
+begin
+
+ // Makes internal copies of the channel and the message
+ fMessage := CloneObject(MegaDemoClientMainForm.UserMessage) as TROMessage;
+ fChannel := CloneObject(MegaDemoClientMainForm.UserChannel) as TROTransportChannel;
+ try
+ svc := CoMegaDemoService.Create(fMessage, fChannel);
+ maxcount := MegaDemoClientMainForm.seRepetitions.Value - 1;
+ fTotalTime := 0;
+
+ with MegaDemoClientMainForm do try
+ if clbTests.Checked[1] then begin
+ for i := 0 to (maxcount - 1) do try
+ Inc(fSumTime, RunSum(svc));
+ except
+ Inc(fErrors);
+ end;
+ if Terminated then Exit;
+ end;
+
+ if clbTests.Checked[2] then begin
+ for i := 0 to (maxcount - 1) do try
+ Inc(fEchoPersonTime, RunEchoPerson(svc));
+ except
+ Inc(fErrors);
+ end;
+
+ if Terminated then Exit;
+ end;
+
+ if clbTests.Checked[3] then begin
+ for i := 0 to (maxcount - 1) do try
+ Inc(fArrayTime, int_RunTestArrays(svc, atInteger))
+ except
+ Inc(fErrors);
+ end;
+ if Terminated then Exit;
+
+ for i := 0 to (maxcount - 1) do try
+ Inc(fArrayTime, int_RunTestArrays(svc, atString))
+ except
+ Inc(fErrors);
+ end;
+ if Terminated then
+ Exit;
+
+ for i := 0 to (maxcount - 1) do try
+ Inc(fArrayTime, int_RunTestArrays(svc, atTPerson))
+ except
+ Inc(fErrors);
+ end;
+ if Terminated then Exit;
+ end;
+
+ if clbTests.Checked[4] then begin
+ for i := 0 to (maxcount - 1) do try
+ Inc(fEchoBinaryTime, RunEchoBinary(svc));
+ except
+ Inc(fErrors);
+ end;
+ if Terminated then Exit;
+ end;
+
+ if clbTests.Checked[5] then begin
+ for i := 0 to (maxcount - 1) do try
+ Inc(fGetServerTimeTime, RunServerTime(svc));
+ except
+ Inc(fErrors);
+ end;
+ if Terminated then Exit;
+ end;
+
+ if clbTests.Checked[6] then begin
+ for i := 0 to (maxcount - 1) do try
+ Inc(fCustomClassTime, RunCustomClass(svc));
+ except
+ Inc(fErrors);
+ end;
+
+ if Terminated then Exit;
+ end;
+ {
+ if clbTests.Checked[7] then begin
+ for i := 0 to (maxcount - 1) do try
+ Inc(fRaiseErrorTime, RunRaiseError(svc));
+ except
+ //Inc(fErrors);
+ end;
+ if Terminated then Exit;
+ end;
+ }
+
+ finally
+ fTotalTime := fSumTime +
+ fEchoPersonTime +
+ fArrayTime +
+ fEchoBinaryTime +
+ fGetServerTimeTime +
+ fCustomClassTime
+ // + fRaiseErrorTime +
+ ;
+ Terminate;
+ end;
+ finally
+ fChannel.Free;
+ fMessage.Free;
+ BeforeDestroyThread;
+
+ end;
+end;
+
+procedure TMegaDemoClientMainForm.cbHTTPURLChange(Sender: TObject);
+var
+ s: string;
+begin
+ s:= cbHTTPURL.Text;
+ if Pos('/bin', s) > 0 then
+ rbBinary.Checked := true
+ else if Pos('/soap', s) > 0 then
+ rbSoap.Checked := true
+ else if Pos('/post', s) > 0 then
+ rbPost.Checked := true
+ else if Pos('/xmlrpc', s) > 0 then
+ rbXmlRpc.Checked := true;
+ cbUseCompression.Enabled := rbBinary.Checked;
+end;
+
+procedure TMegaDemoClientMainForm.SOAPMessageWriteToStream(aStream: TStream);
+begin
+ // memo1.Lines.LoadFromStream(aStream);
+end;
+
+procedure TMegaDemoClientMainForm.SOAPMessageEnvelopeComplete(Sender: TROSOAPMessage);
+begin
+ sender.HeaderNode.Add('Test').Value := '1234';
+ if cbEnableLog.Checked then
+ memo1.Lines.Text := Sender.EnvelopeNode.XML;
+end;
+
+procedure TMegaDemoClientMainForm.SOAPMessageReadFromStream(aStream: TStream);
+begin
+ if cbEnableLog.Checked then Memo2.Lines.LoadFromStream(aStream);
+end;
+
+procedure TMegaDemoClientMainForm.BINMessageFinalizeMessage(Sender: TROMessage);
+begin
+ if cbVerbose.Checked then Log(Sender.Name + ' is finalized');
+end;
+
+procedure TMegaDemoClientMainForm.BINMessageReadMessageParameter(Sender: TROMessage;
+ const aName: string; aTypeInfo: PTypeInfo; const DataRef: Pointer;
+ Attributes: TParamAttributes);
+begin
+ if cbVerbose.Checked then begin
+ Log(Sender.Name + ' is reading ' + aName);
+ Log('');
+ end;
+end;
+
+procedure TMegaDemoClientMainForm.BINMessageWriteMessageParameter(Sender: TROMessage;
+ const aName: string; aTypeInfo: PTypeInfo; const DataRef: Pointer;
+ Attributes: TParamAttributes);
+begin
+ if cbVerbose.Checked then Log(Sender.Name + ' is writing ' + aName);
+end;
+
+procedure TMegaDemoClientMainForm.BINMessageInitializeMessage(Sender: TROMessage;
+ const aTransport: IROTransport; const anInterfaceName,
+ aMessageName: string);
+begin
+ if cbVerbose.Checked then Log(Sender.Name + ' is initialized');
+end;
+
+function TMegaDemoClientMainForm.RunSum(aService: IMegaDemoService): integer;
+begin
+ Result := InvokeSum(aService, seA.Value, seB.Value);
+end;
+
+function TMegaDemoClientMainForm.RunEchoPerson(aService: IMegaDemoService): integer;
+begin
+ Result := InvokeEchoPerson(
+ aService,
+ eFirstName.Text,
+ eLastName.Text,
+ seAge.Value,
+ TSex(cbSex.ItemIndex));
+end;
+
+function TMegaDemoClientMainForm.RunRaiseError(aService: IMegaDemoService): integer;
+begin
+ Result := InvokeRaiseError(aService);
+end;
+
+procedure TMegaDemoClientMainForm.Stress(AMethod: TStressMethod);
+var
+ tot, errors, i: integer;
+ svc: IMegaDemoService;
+begin
+ tot := 0;
+ errors := 0;
+ svc := CreateService;
+ WriteSequentialStressStart(clbTests.Items[clbTests.ItemIndex]);
+ for i := 1 to (seRepetitions.Value) do try
+ Inc(tot, AMethod(svc));
+ if (i mod 10 = 0) then Application.ProcessMessages;
+ if fTerminateTest then Break;
+ except
+ Inc(errors);
+ end;
+ WriteSequentialStressEnd(tot, errors);
+end;
+
+function TMegaDemoClientMainForm.RunTestArrays(aService: IMegaDemoService): integer;
+begin
+ Result := 0;
+ if rbInteger.Checked then
+ Result := int_RunTestArrays(aService, atInteger)
+ else if rbString.Checked then
+ Result := int_RunTestArrays(aService, atString)
+ else if rbTPerson.Checked then
+ Result := int_RunTestArrays(aService, atTPerson);
+end;
+
+function TMegaDemoClientMainForm.RunEchoBinary(aService: IMegaDemoService): integer;
+begin
+ Result := InvokeEchoBinary(aService, seBinSize.Value);
+end;
+
+function TMegaDemoClientMainForm.RunServerTime(aService: IMegaDemoService): integer;
+begin
+ Result := InvokeGetServerTime(aService);
+end;
+
+function TMegaDemoClientMainForm.RunCustomClass(aService: IMegaDemoService): integer;
+begin
+ Result := InvokeCustomClass(aService, rbStream.Checked);
+end;
+
+procedure TMegaDemoClientMainForm.clbTestsClick(Sender: TObject);
+
+ procedure HidePanels;
+ begin
+ pStress.Visible := False;
+ pSum.Visible := False;
+ pEchoPerson.Visible := False;
+ pTestArrays.Visible := False;
+ pEchoBinary.Visible := False;
+ pGetServerTime.Visible := False;
+ pCustomClass.Visible := False;
+ pRaiseError.Visible := False;
+ end;
+
+var
+ t_panel: TPanel;
+begin
+ HidePanels;
+ case clbTests.ItemIndex of
+ 1: t_panel := pSum;
+ 2: t_panel := pEchoPerson;
+ 3: t_panel := pTestArrays;
+ 4: t_panel := pEchoBinary;
+ 5: t_panel := pGetServerTime;
+ 6: t_panel := pCustomClass;
+ 7: t_panel := pRaiseError;
+ else
+ t_panel := pStress;
+ end;
+ t_panel.Parent := pPage;
+ t_panel.Visible := True;
+
+ if clbTests.ItemIndex = 0 then begin
+ RunTestOnceButton.Caption := 'Run Stress Test';
+ RunTestButton.Caption := 'Stop Stress Test';
+ RunTestOnceButton.Hint := 'Run Stress Test';
+ RunTestButton.Hint := 'Stop Stress Test';
+ end
+ else begin
+ RunTestOnceButton.Caption := 'Run Test once';
+ RunTestButton.Caption := 'Run Test';
+ RunTestOnceButton.Hint := 'Starts the chosen test once';
+ RunTestButton.Hint := 'Starts the chosen test some times';
+ end;
+end;
+
+procedure TMegaDemoClientMainForm.RunTestOnceButtonClick(Sender: TObject);
+var
+ serv: IMegaDemoService;
+ s: string;
+begin
+ s := '';
+ if clbTests.ItemIndex > 0 then begin
+ clbTests.Checked[clbTests.ItemIndex] := True;
+ serv := CreateService;
+ WriteTestInfo(True);
+ Screen.Cursor := crHourGlass;
+ end;
+ try
+ try
+ case clbTests.ItemIndex of
+ 0: RunAllDemo;
+ 1: begin
+ RunSum(serv);
+ s := 'Sum';
+ end;
+ 2: begin
+ RunEchoPerson(serv);
+ s := 'EchoPerson';
+ end;
+ 3: begin
+ RunTestArrays(serv);
+ s := 'TestArrays';
+ end;
+ 4: begin
+ RunEchoBinary(serv);
+ s := 'EchoBinary';
+ end;
+ 5: begin
+ RunServerTime(serv);
+ s := 'ServerTime';
+ end;
+ 6: begin
+ RunCustomClass(serv);
+ s := 'CustomClass';
+ end;
+ 7: begin
+ RunRaiseError(serv);
+ S := 'RaiseError';
+ end;
+ end;
+ finally
+ {$IFNDEF NO_INDY}
+ if fChannel = ROIndySuperHttpChannel then ROIndySuperHttpChannel.Active:=False;
+ if fChannel = ROIndySuperTCPChannel then ROIndySuperTCPChannel.Active:=False;
+ {$ENDIF}
+ {$IFNDEF NO_SYNAPSE}
+ if fChannel = ROSynapseSuperHttpChannel then ROSynapseSuperHttpChannel.Active:=False;
+ if fChannel = ROSynapseSuperTCPChannel then ROSynapseSuperTCPChannel.Active:=False;
+ {$ENDIF}
+ end;
+ finally
+ if clbTests.ItemIndex > 0 then Screen.Cursor := crDefault;
+ end;
+ if (s <> '') and not cbEnableLog.Checked then Log(s + ':'#9'Done', True);
+end;
+
+procedure TMegaDemoClientMainForm.RunAllDemo;
+var
+ i: integer;
+ trd: TStressThread;
+begin
+ Beep;
+ if (
+ (seRepetitions.Value > 10) and
+ (MessageDlg(msgWarningPorts, mtWarning, [mbOK, mbCancel], 0) <> mrOK)
+ ) then
+ Exit;
+
+ Screen.Cursor := crHourGlass;
+ cbEnableLog.Checked := FALSE;
+ fTerminateTest := FALSE;
+ MegaDemoClientMainForm.CreateService;
+ // Makes sure UserChannel and UserMessage are set. The threads will reference them in their constructor
+ WriteTestInfo(False);
+ try
+ Log(Format('Sum test:'#9#9 + '%s', [BoolToStr(clbTests.Checked[1], TRUE)]), TRUE);
+ Log(Format('EchoPerson test:'#9 + '%s', [BoolToStr(clbTests.Checked[2], TRUE)]), TRUE);
+ // Log('RaiseError test:'#9+'%s', [BoolToStr(clbTests.Checked[3], TRUE)], -1, TRUE);
+ Log(Format('Array test:'#9#9 + '%s (%d items)', [BoolToStr(clbTests.Checked[4], TRUE), seArrayCount.Value]), TRUE);
+ Log(Format('EchoBinary test:'#9 + '%s (%d bytes)', [BoolToStr(clbTests.Checked[5], TRUE), seBinSize.Value]), TRUE);
+ Log(Format('GetServerTime test:'#9 + '%s', [BoolToStr(clbTests.Checked[6], TRUE)]), TRUE);
+ Log(Format('CustomClass test:'#9 + '%s (Use XML=%s)', [BoolToStr(clbTests.Checked[7], TRUE), BoolToStr(rbXML.Checked, TRUE)]), TRUE);
+
+ Log('', TRUE);
+ Log('Starting mega test');
+ Log('', TRUE);
+
+ for i := 1 to seThreads.Value do begin
+ trd := TStressThread.Create;
+ trd.idx := fThreads.Add(trd);
+ end;
+
+ Caption := Application.Title + Format(' (%d threads running)', [fThreads.Count]);
+
+ fMegaTestStart := GetTickCount;
+ for i := 0 to seThreads.Value - 1 do
+ TStressThread(fThreads[i]).Resume;
+
+ finally
+ // Screen.Cursor := crDefault;
+ end;
+end;
+
+procedure TMegaDemoClientMainForm.StopAllDemo;
+var
+ i: integer;
+begin
+ fCritical.Enter;
+ try
+ for i := 0 to (fThreads.Count - 1) do
+ TThread(fThreads[i]).Terminate;
+ finally
+ fCritical.Leave;
+ end;
+end;
+
+procedure TMegaDemoClientMainForm.RunTestButtonClick(Sender: TObject);
+begin
+ Screen.Cursor := crHourGlass;
+ try
+ if clbTests.ItemIndex > 0 then
+ clbTests.Checked[clbTests.ItemIndex] := True;
+ case clbTests.ItemIndex of
+ 0: StopAllDemo;
+ 1: Stress(RunSum);
+ 2: Stress(RunEchoPerson);
+ 3: Stress(RunTestArrays);
+ 4: Stress(RunEchoBinary);
+ 5: Stress(RunServerTime);
+ 6: Stress(RunCustomClass);
+ 7: Stress(RunRaiseError);
+ end;
+ finally
+ Screen.Cursor := crDefault;
+ end;
+end;
+
+procedure TMegaDemoClientMainForm.FormShow(Sender: TObject);
+begin
+ pagecontrol2.Visible := False;
+ clbTests.ItemIndex := 1;
+ clbTests.OnClick(clbTests);
+ cbHTTPURLChange(cbHTTPURL);
+end;
+
+procedure TMegaDemoClientMainForm.clbTestsClickCheck(Sender: TObject);
+begin
+ Check_ListBoxClick(clbTests.ItemIndex = 0);
+end;
+
+procedure TMegaDemoClientMainForm.Check_ListBoxClick(isAllDemo: Boolean);
+
+ procedure SetMode(AMode: Boolean);
+ var
+ i: integer;
+ begin
+ for i := 1 to clbTests.Items.Count - 2 do
+ clbTests.Checked[i] := AMode;
+ end;
+
+var
+ i: integer;
+ iChecked, iUnChecked: byte;
+begin
+ if not isAllDemo then begin
+ iChecked := 0;
+ iUnChecked := 0;
+ for i := 1 to clbTests.Items.Count - 2 do begin
+ if clbTests.Checked[i] then
+ inc(iChecked)
+ else
+ inc(iUnChecked);
+ end;
+ if iChecked = 0 then
+ clbTests.State[0] := cbUnchecked
+ else if iUnChecked = 0 then
+ clbTests.State[0] := cbChecked
+ else
+ clbTests.State[0] := cbGrayed;
+ end
+ else begin
+ case clbTests.State[0] of
+ cbUnchecked: SetMode(False);
+ cbChecked: SetMode(True);
+ end;
+ end;
+end;
+
+function TMegaDemoClientMainForm.int_RunTestArrays(aService: IMegaDemoService;
+ anArrayType: TArrayType): integer;
+begin
+ Result := InvokeTestArray(aService, anArrayType, seArrayCount.Value);
+end;
+
+procedure TMegaDemoClientMainForm.Log(const aMessage: string;
+ Force: boolean);
+begin
+ if cbEnableLog.Checked or Force then Memo.Lines.Add(AMessage);
+end;
+
+procedure TMegaDemoClientMainForm.LoadFromIni;
+var
+ i: integer;
+begin
+ with TINIFile.Create(ChangeFileExt(Application.EXEName, '.ini')) do try
+
+ with cbTCPIP do begin
+ ReadSectionValues('IPs', Items);
+ for i := 0 to (Items.Count - 1) do
+ Items[i] := Items.Values[Items.Names[i]];
+ end;
+
+ with cbHTTPURL do begin
+ ReadSectionValues('HTTP Urls', Items);
+ for i := 0 to (Items.Count - 1) do
+ Items[i] := Items.Values[Items.Names[i]];
+ end;
+
+ with cbTCPPort do begin
+ ReadSectionValues('Ports', Items);
+ for i := 0 to (Items.Count - 1) do
+ Items[i] := Items.Values[Items.Names[i]];
+ end;
+
+ with cbSuperTCPIP do begin
+ ReadSectionValues('Super IPs', Items);
+ for i := 0 to (Items.Count - 1) do
+ Items[i] := Items.Values[Items.Names[i]];
+ end;
+
+ with cbSuperHTTPURL do begin
+ ReadSectionValues('Super HTTP Urls', Items);
+ for i := 0 to (Items.Count - 1) do
+ Items[i] := Items.Values[Items.Names[i]];
+ end;
+
+ with cbSuperTCPPort do begin
+ ReadSectionValues('Super Ports', Items);
+ for i := 0 to (Items.Count - 1) do
+ Items[i] := Items.Values[Items.Names[i]];
+ end;
+
+
+ cbHTTPURL.Text := ReadString('Misc', 'HTTP URL', 'http://localhost:8099/bin');
+ cbHTTPURLChange(nil);
+
+ cbSuperHTTPURL.Text := ReadString('Misc', 'Super HTTP URL', 'http://localhost:8098/bin');
+ cbSuperHTTPURLChange(nil);
+
+ eServerID.Text := ReadString('Misc', 'Server ID', '{E46A5995-2260-44EA-AC60-121ADB4CC2D0}');
+
+ cbTCPIP.Text := ReadString('Misc', 'TCP Address', '127.0.0.1');
+ cbTCPPort.Text := ReadString('Misc', 'TCP Port', '8090');
+
+ cbSuperTCPIP.Text := ReadString('Misc', 'Super TCP Address', '127.0.0.1');
+ cbSuperTCPPort.Text := ReadString('Misc', 'Super TCP Port', '8095');
+
+ rbWinInetHttp.Checked := ReadBool('Misc', 'WinINet HTTP', TRUE);
+ rbIndyHttp.Checked := ReadBool('Misc', 'Indy HTTP', FALSE);
+ rbSynapseHttp.Checked := ReadBool('Misc', 'Synapse HTTP', False);
+
+ rbIndySuperTCP.Checked := ReadBool('Misc', 'IndySuperTCP', TRUE);
+ rbSynapseSuperTCP.Checked := ReadBool('Misc', 'SynapseSuperTCP', TRUE);
+
+ rbIndySuperHTTP.Checked := ReadBool('Misc', 'IndySuperHTTP', TRUE);
+ rbSynapseSuperHTTP.Checked := ReadBool('Misc', 'SynapseSuperHTTP', TRUE);
+
+ cbKeepConnection.Checked := ReadBool('Misc', 'Keep Connection', FALSE);
+ cbDisableNagle.Checked := ReadBool('Misc', 'Disable Nagle', FALSE);
+ cbEncrypt.Checked := ReadBool('Misc', 'Encryption Communication', FALSE);
+ cbEncryptClick(cbEncrypt);
+ seThreads.Value := ReadInteger('Misc', 'Threads', 5);
+ seRepetitions.Value := ReadInteger('Misc', 'Repetitions', 10);
+
+ cbWriteTestInfo.Checked := ReadBool('Misc', 'Write Test Info', True);
+ rbXML.Checked := ReadBool('Misc', 'CustomClass as XML', FALSE);
+ rbStream.Checked := not rbXML.Checked;
+ cbEnableLog.Checked := ReadBool('Misc', 'Enable Log', TRUE);
+ cbVerbose.Checked := ReadBool('Misc', 'Verbose', True);
+ clbTests.Checked[1] := ReadBool('Misc', 'Test Sum', TRUE);
+ clbTests.Checked[2] := ReadBool('Misc', 'Test EchoPerson', TRUE);
+ clbTests.Checked[3] := ReadBool('Misc', 'Test TestArrays', TRUE);
+ clbTests.Checked[4] := ReadBool('Misc', 'Test EchoBinary', TRUE);
+ clbTests.Checked[5] := ReadBool('Misc', 'Test GetServerTime', TRUE);
+ clbTests.Checked[6] := ReadBool('Misc', 'Test CustomClass', TRUE);
+ clbTests.Checked[7] := ReadBool('Misc', 'Test RaiseError', TRUE);
+ Check_ListBoxClick(False);
+ finally
+ Free;
+ end;
+end;
+
+procedure TMegaDemoClientMainForm.SaveToIni;
+var
+ i: integer;
+begin
+ with TINIFile.Create(ChangeFileExt(Application.EXEName, '.ini')) do try
+
+ with cbTCPIP do begin
+ for i := 0 to (Items.Count - 1) do
+ WriteString('IPs', IntToStr(i), Items[i]);
+ end;
+
+ with cbHTTPURL do
+ for i := 0 to (Items.Count - 1) do
+ WriteString('HTTP Urls', IntToStr(i), Items[i]);
+
+ with cbTCPPort do
+ for i := 0 to (Items.Count - 1) do
+ WriteString('Ports', IntToStr(i), Items[i]);
+
+ with cbSuperTCPIP do begin
+ for i := 0 to (Items.Count - 1) do
+ WriteString('Super IPs', IntToStr(i), Items[i]);
+ end;
+
+ with cbSuperHTTPURL do
+ for i := 0 to (Items.Count - 1) do
+ WriteString('Super HTTP Urls', IntToStr(i), Items[i]);
+
+ with cbSuperTCPPort do
+ for i := 0 to (Items.Count - 1) do
+ WriteString('Super Ports', IntToStr(i), Items[i]);
+
+ WriteString('Misc', 'HTTP URL', cbHTTPURL.Text);
+ WriteString('Misc', 'Super HTTP URL', cbSuperHTTPURL.Text);
+ WriteString('Misc', 'Server ID', eServerID.Text);
+ WriteString('Misc', 'TCP Address', cbTCPIP.Text);
+ WriteString('Misc', 'TCP Port', cbTCPPort.Text);
+ WriteString('Misc', 'Super TCP Address', cbSuperTCPIP.Text);
+ WriteString('Misc', 'Super TCP Port', cbSuperTCPPort.Text);
+
+ WriteBool('Misc', 'Indy HTTP', rbIndyHttp.Checked);
+ WriteBool('Misc', 'WinINet HTTP', rbWinInetHttp.Checked);
+ WriteBool('Misc', 'Synapse HTTP', rbSynapseHttp.Checked);
+
+ WriteBool('Misc', 'IndySuperTCP', rbIndySuperTCP.Checked);
+ WriteBool('Misc', 'SynapseSuperTCP', rbSynapseSuperTCP.Checked);
+
+ WriteBool('Misc', 'IndySuperHTTP', rbIndySuperHttp.Checked);
+ WriteBool('Misc', 'SynapseSuperHTTP', rbSynapseSuperHttp.Checked);
+
+
+ WriteBool('Misc', 'Keep Connection', cbKeepConnection.Checked);
+ WriteBool('Misc', 'Disable Nagle', cbDisableNagle.Checked);
+ WriteBool('Misc', 'Encryption Communication', cbEncrypt.Checked);
+ WriteInteger('Misc', 'Threads', seThreads.Value);
+ WriteInteger('Misc', 'Repetitions', seRepetitions.Value);
+
+ WriteBool('Misc', 'Write Test Info', cbWriteTestInfo.Checked);
+ WriteBool('Misc', 'CustomClass as XML', rbXML.Checked);
+ WriteBool('Misc', 'Enable Log', cbEnableLog.Checked);
+ WriteBool('Misc', 'Verbose', cbVerbose.Checked);
+ WriteBool('Misc', 'Test Sum', clbTests.Checked[1]);
+ WriteBool('Misc', 'Test EchoPerson', clbTests.Checked[2]);
+ WriteBool('Misc', 'Test TestArrays', clbTests.Checked[3]);
+ WriteBool('Misc', 'Test EchoBinary', clbTests.Checked[4]);
+ WriteBool('Misc', 'Test GetServerTime', clbTests.Checked[5]);
+ WriteBool('Misc', 'Test CustomClass', clbTests.Checked[6]);
+ WriteBool('Misc', 'Test RaiseError', clbTests.Checked[7]);
+ finally
+ Free;
+ end;
+end;
+
+procedure TMegaDemoClientMainForm.rbIndyHttpClick(Sender: TObject);
+begin
+ cbKeepConnection.Enabled := rbWinInetHttp.Checked;
+ cbKeepConnection.Checked := rbWinInetHttp.Checked;
+end;
+
+procedure TMegaDemoClientMainForm.rbXmlRpcClick(Sender: TObject);
+begin
+ ChangeUrl('xmlrpc');
+end;
+
+procedure TMegaDemoClientMainForm.cbAutoDetectClick(Sender: TObject);
+begin
+ if rbBinary.Checked then rbBinaryClick(rbBinary)
+ else if rbPost.Checked then rbPostClick(rbPost)
+ else if rbXMLRpc.Checked then rbXmlRpcClick(rbXMLRpc)
+ else rbSOAPClick(rbSOAP);
+end;
+
+procedure TMegaDemoClientMainForm.cbSuperHTTPURLChange(Sender: TObject);
+var
+ s: string;
+begin
+ s:= cbSuperHTTPURL.Text;
+ if Pos('/bin', s) > 0 then
+ rbBinary.Checked := true
+ else if Pos('/soap', s) > 0 then
+ rbSoap.Checked := true
+ else if Pos('/post', s) > 0 then
+ rbPost.Checked := true
+ else if Pos('/xmlrpc', s) > 0 then
+ rbXmlRpc.Checked := true;
+ cbUseCompression.Enabled := rbBinary.Checked;
+end;
+
+procedure TMegaDemoClientMainForm.pgChannelsChange(Sender: TObject);
+begin
+ cbAutoDetect.Enabled := (pgChannels.ActivePage = tsHttp) or (pgChannels.ActivePage = tsSuperHTTP);
+end;
+
+initialization
+ CoInitializeEx(nil, COINIT_MULTITHREADED);
+finalization
+ CoUninitialize;
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoCustomClass.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoCustomClass.pas
new file mode 100644
index 0000000..9f5c01e
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoCustomClass.pas
@@ -0,0 +1,60 @@
+unit MegaDemoCustomClass;
+
+interface
+
+uses uROTypes;
+
+type
+ TCustomClass = class(TROComplexType)
+ private
+ FRandomInt: integer;
+ fRandomDouble: double;
+ FRandomStr: string;
+ FRandomWideStr: widestring;
+ public
+ procedure ReadComplex(ASerializer: TObject); override;
+ procedure WriteComplex(ASerializer: TObject); override;
+ published
+ property RandomInt: integer read FRandomInt write FRandomInt;
+ property RandomDouble: double read FRandomDouble write FRandomDouble;
+ property RandomStr: string read FRandomStr write FRandomStr;
+ property RandomWideStr: Widestring read FRandomWideStr write FRandomWideStr;
+ end;
+
+function NewCustomClass: TCustomClass;
+
+implementation
+uses SysUtils, uROSerializer, typInfo;
+
+function NewCustomClass: TCustomClass;
+begin
+ result := TCustomClass.Create;
+ Result.RandomInt := Random(1000);
+ Result.RandomDouble := Random * 1000;
+ Result.RandomStr := IntToStr(Random(1000)) + '(string)';
+ Result.RandomWideStr := IntToStr(Random(1000)) + '(widestring)';
+end;
+
+{ TCustomClass }
+
+procedure TCustomClass.ReadComplex(ASerializer: TObject);
+begin
+ TROSerializer(ASerializer).ReadInteger('RandomInt',otULong,FRandomInt);
+ TROSerializer(ASerializer).ReadDouble('RandomDouble',ftDouble,FRandomDouble);
+ TROSerializer(ASerializer).ReadUTF8String('RandomStr',FRandomStr);
+ TROSerializer(ASerializer).ReadWideString('RandomWideStr',FRandomWideStr);
+end;
+
+procedure TCustomClass.WriteComplex(ASerializer: TObject);
+begin
+ TROSerializer(ASerializer).WriteInteger('RandomInt',otULong,FRandomInt);
+ TROSerializer(ASerializer).WriteDouble('RandomDouble',ftDouble,FRandomDouble);
+ TROSerializer(ASerializer).WriteUTF8String('RandomStr',FRandomStr);
+ TROSerializer(ASerializer).WriteWideString('RandomWideStr',FRandomWideStr);
+end;
+
+initialization
+ RegisterROClass(TCustomClass);
+ Randomize;
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoISAPI.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoISAPI.bdsproj
new file mode 100644
index 0000000..2b99f74
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoISAPI.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {2AD18F9D-F12C-4A26-9EB2-30A3C22BC6DA}
+
+
+
+
+ MegaDemoISAPI.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoISAPI.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoISAPI.dpr
new file mode 100644
index 0000000..9bad5d7
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoISAPI.dpr
@@ -0,0 +1,32 @@
+library MegaDemoISAPI;
+
+{#ROGEN:MegaDemoLibrary.rodl} // RemObjects: Careful, do not remove!
+
+uses
+ ActiveX,
+ ComObj,
+ WebBroker,
+ ISAPIApp,
+ MegaDemoISAPIMain in 'MegaDemoISAPIMain.pas' {MegaDemoISAPIMainForm: TROWebModule},
+ MegaDemoLibrary_Intf in 'MegaDemoLibrary_Intf.pas',
+ MegaDemoLibrary_Invk in 'MegaDemoLibrary_Invk.pas',
+ MegaDemoService_Impl in 'MegaDemoService_Impl.pas' {MegaService: TDARemoteService};
+
+{$R *.RES}
+{$R RODLFile.RES} // RemObjects: Careful, do not remove!
+
+{
+ Important note: if you have Delphi 6 you should add the unit ISAPIThreadPool to the above list
+}
+
+exports
+ GetExtensionVersion,
+ HttpExtensionProc,
+ TerminateExtension;
+
+begin
+ CoInitFlags := COINIT_MULTITHREADED;
+ Application.Initialize;
+ Application.CreateForm(TMegaDemoISAPIMainForm, MegaDemoISAPIMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoISAPI.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoISAPI.dproj
new file mode 100644
index 0000000..b9ac7aa
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoISAPI.dproj
@@ -0,0 +1,77 @@
+
+
+ {b81cfbe2-60d0-4759-8f98-a2be7944b6f0}
+ MegaDemoISAPI.dpr
+ Debug
+ AnyCPU
+ DCC32
+ MegaDemoISAPI.dll
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ MegaDemoISAPI.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoISAPI.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoISAPI.res
new file mode 100644
index 0000000..55f8742
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoISAPI.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoISAPIMain.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoISAPIMain.dfm
new file mode 100644
index 0000000..607749f
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoISAPIMain.dfm
@@ -0,0 +1,45 @@
+object MegaDemoISAPIMainForm: TMegaDemoISAPIMainForm
+ OldCreateOrder = False
+ Actions = <>
+ Left = 38
+ Top = 65533
+ Height = 305
+ Width = 462
+ object BINMessage: TROBinMessage
+ Left = 112
+ Top = 64
+ end
+ object SOAPMessage: TROSOAPMessage
+ SerializationOptions = [xsoWriteMultiRefArray, xsoWriteMultiRefObject]
+ Left = 192
+ Top = 64
+ end
+ object WebBrokerServer: TROWebBrokerServer
+ Active = True
+ Dispatchers = <
+ item
+ Name = 'SOAPMessage'
+ Message = SOAPMessage
+ Enabled = True
+ PathInfo = '/SOAP'
+ end
+ item
+ Name = 'BINMessage'
+ Message = BINMessage
+ Enabled = True
+ PathInfo = '/BIN'
+ end
+ item
+ Name = 'PostMessage'
+ Message = PostMessage
+ Enabled = True
+ PathInfo = '/POST'
+ end>
+ Left = 48
+ Top = 8
+ end
+ object PostMessage: TROPostMessage
+ Left = 280
+ Top = 64
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoISAPIMain.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoISAPIMain.pas
new file mode 100644
index 0000000..83e0b5c
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoISAPIMain.pas
@@ -0,0 +1,28 @@
+unit MegaDemoISAPIMain;
+
+interface
+
+uses
+ SysUtils, Classes, HTTPApp, uROClient, uROClientIntf, uROBINMessage,
+ uROSOAPMessage, uROServer, uROWebBrokerServer, uROPostMessage;
+
+type
+ TMegaDemoISAPIMainForm = class(TWebModule)
+ BINMessage: TROBINMessage;
+ SOAPMessage: TROSOAPMessage;
+ WebBrokerServer: TROWebBrokerServer;
+ PostMessage: TROPostMessage;
+ private
+
+ public
+
+ end;
+
+var
+ MegaDemoISAPIMainForm: TMegaDemoISAPIMainForm;
+
+implementation
+
+{$R *.DFM}
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoLibrary.rodl b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoLibrary.rodl
new file mode 100644
index 0000000..4aec2e9
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoLibrary.rodl
@@ -0,0 +1,154 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoLibrary_Intf.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoLibrary_Intf.pas
new file mode 100644
index 0000000..e93a575
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoLibrary_Intf.pas
@@ -0,0 +1,1093 @@
+unit MegaDemoLibrary_Intf;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+{$I Remobjects.inc}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROXMLIntf, uROClasses, uROClient, uROTypes, uROClientIntf;
+
+const
+ { Library ID }
+ LibraryUID = '{D9821C1A-A084-4120-93F3-BCE6CF2AE0F4}';
+ TargetNamespace = '';
+
+ { Service Interface ID's }
+ IMegaDemoService_IID : TGUID = '{D9821C1A-A084-4120-93F3-BCE6CF2AE0F4}';
+
+ { Event ID's }
+
+type
+ { Forward declarations }
+ IMegaDemoService = interface;
+
+ TPersonArray = class;
+ TIntegerArray = class;
+ TStringArray = class;
+
+ TPerson = class;
+
+ ETestException = class;
+
+
+ { Enumerateds }
+ TSex = (TSex_sxMale,TSex_sxFemale);
+
+ { TPerson }
+ TPerson = class(TROComplexType)
+ private
+ fFirstName: AnsiString;
+ fLastName: AnsiString;
+ fAge: Integer;
+ fSex: TSex;
+ public
+ procedure Assign(iSource: TPersistent); override;
+ procedure ReadComplex(ASerializer: TObject); override;
+ procedure WriteComplex(ASerializer: TObject); override;
+ published
+ property FirstName:AnsiString read fFirstName write fFirstName;
+ property LastName:AnsiString read fLastName write fLastName;
+ property Age:Integer read fAge write fAge;
+ property Sex:TSex read fSex write fSex;
+ end;
+
+ { TPersonCollection }
+ TPersonCollection = class(TROCollection)
+ protected
+ constructor Create(aItemClass: TCollectionItemClass); overload;
+ function GetItems(aIndex: integer): TPerson;
+ procedure SetItems(aIndex: integer; const Value: TPerson);
+ public
+ constructor Create; overload;
+ function Add: TPerson; reintroduce;
+ procedure SaveToArray(anArray: TPersonArray);
+ procedure LoadFromArray(anArray: TPersonArray);
+ property Items[Index: integer]:TPerson read GetItems write SetItems; default;
+ end;
+
+ { TPersonArray }
+ TPersonArray_TPerson = array of TPerson;
+ TPersonArray = class(TROArray)
+ private
+ fCount: Integer;
+ fItems : TPersonArray_TPerson;
+ protected
+ procedure Grow; virtual;
+ function GetItems(aIndex: integer): TPerson;
+ procedure SetItems(aIndex: integer; const Value: TPerson);
+ function GetCount: integer; override;
+ public
+ class function GetItemType: PTypeInfo; override;
+ class function GetItemClass: TClass; override;
+ class function GetItemSize: integer; override;
+
+ function GetItemRef(aIndex: integer): pointer; override;
+ procedure SetItemRef(aIndex: integer; Ref: pointer); override;
+ procedure Clear; override;
+ procedure Delete(aIndex: integer); override;
+ procedure Resize(ElementCount: integer); override;
+
+ procedure Assign(iSource:TPersistent); override;
+ procedure ReadComplex(ASerializer: TObject); override;
+ procedure WriteComplex(ASerializer: TObject); override;
+ function Add: TPerson; overload;
+ function Add(const Value: TPerson):integer; overload;
+
+ property Count : integer read GetCount;
+ property Items[Index: integer]:TPerson read GetItems write SetItems; default;
+ property InnerArray: TPersonArray_TPerson read fItems;
+ end;
+
+ { TIntegerArray }
+ TIntegerArray_Integer = array of Integer;
+ TIntegerArray = class(TROArray)
+ private
+ fCount: Integer;
+ fItems : TIntegerArray_Integer;
+ protected
+ procedure Grow; virtual;
+ function GetItems(aIndex: integer): Integer;
+ procedure SetItems(aIndex: integer; const Value: Integer);
+ function GetCount: integer; override;
+ public
+ class function GetItemType: PTypeInfo; override;
+ class function GetItemSize: integer; override;
+
+ function GetItemRef(aIndex: integer): pointer; override;
+ procedure Clear; override;
+ procedure Delete(aIndex: integer); override;
+ procedure Resize(ElementCount: integer); override;
+
+ procedure Assign(iSource:TPersistent); override;
+ procedure ReadComplex(ASerializer: TObject); override;
+ procedure WriteComplex(ASerializer: TObject); override;
+ function Add(const Value:Integer): integer;
+ function GetIndex(const aPropertyName : string;
+ const aPropertyValue : Variant;
+ StartFrom : integer = 0;
+ Options : TROSearchOptions = [soIgnoreCase]) : integer; override;
+
+ property Count : integer read GetCount;
+ property Items[Index: integer]:Integer read GetItems write SetItems; default;
+ property InnerArray: TIntegerArray_Integer read fItems;
+ end;
+
+ { TStringArray }
+ TStringArray_AnsiString = array of AnsiString;
+ TStringArray = class(TROArray)
+ private
+ fCount: Integer;
+ fItems : TStringArray_AnsiString;
+ protected
+ procedure Grow; virtual;
+ function GetItems(aIndex: integer): AnsiString;
+ procedure SetItems(aIndex: integer; const Value: AnsiString);
+ function GetCount: integer; override;
+ public
+ class function GetItemType: PTypeInfo; override;
+ class function GetItemSize: integer; override;
+
+ function GetItemRef(aIndex: integer): pointer; override;
+ procedure Clear; override;
+ procedure Delete(aIndex: integer); override;
+ procedure Resize(ElementCount: integer); override;
+
+ procedure Assign(iSource:TPersistent); override;
+ procedure ReadComplex(ASerializer: TObject); override;
+ procedure WriteComplex(ASerializer: TObject); override;
+ function Add(const Value:AnsiString): integer;
+ function GetIndex(const aPropertyName : string;
+ const aPropertyValue : Variant;
+ StartFrom : integer = 0;
+ Options : TROSearchOptions = [soIgnoreCase]) : integer; override;
+
+ property Count : integer read GetCount;
+ property Items[Index: integer]:AnsiString read GetItems write SetItems; default;
+ property InnerArray: TStringArray_AnsiString read fItems;
+ end;
+
+ { Exceptions }
+ ETestException = class(EROException)
+ private
+ fErrorCode: Integer;
+ fAdditionalInfo: AnsiString;
+ public
+ constructor Create(anExceptionMessage : string; aErrorCode: Integer; aAdditionalInfo: AnsiString);
+ procedure ReadException(ASerializer: TObject); override;
+ procedure WriteException(ASerializer: TObject); override;
+ published
+ property ErrorCode: Integer read fErrorCode write fErrorCode;
+ property AdditionalInfo: AnsiString read fAdditionalInfo write fAdditionalInfo;
+ end;
+
+
+ { IMegaDemoService }
+ IMegaDemoService = interface
+ ['{D9821C1A-A084-4120-93F3-BCE6CF2AE0F4}']
+ function Sum(const A: Integer; const B: Integer): Integer;
+ function GetServerTime: DateTime;
+ procedure EchoPerson(const aPerson: TPerson; out anotherPerson: TPerson);
+ function TestIntegerArray(const anArray: TIntegerArray): TIntegerArray;
+ function TestStringArray(const anArray: TStringArray): TStringArray;
+ function TestPersonArray(const anArray: TPersonArray): TPersonArray;
+ procedure EchoBinary(const BinIN: binary; out BinOUT: Binary);
+ procedure SomeTypes(var aString: String; var aWidestring: Widestring; var anInteger: Integer; var aCurrency: Currency; var aDatetime: DateTime);
+ function CustomObjectAsString: String;
+ function CustomObjectAsStream: Binary;
+ procedure RaiseError;
+ procedure RaiseTestException;
+ end;
+
+ { CoMegaDemoService }
+ CoMegaDemoService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IMegaDemoService;
+ end;
+
+ { TMegaDemoService_Proxy }
+ TMegaDemoService_Proxy = class(TROProxy, IMegaDemoService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ function Sum(const A: Integer; const B: Integer): Integer;
+ function GetServerTime: DateTime;
+ procedure EchoPerson(const aPerson: TPerson; out anotherPerson: TPerson);
+ function TestIntegerArray(const anArray: TIntegerArray): TIntegerArray;
+ function TestStringArray(const anArray: TStringArray): TStringArray;
+ function TestPersonArray(const anArray: TPersonArray): TPersonArray;
+ procedure EchoBinary(const BinIN: binary; out BinOUT: Binary);
+ procedure SomeTypes(var aString: String; var aWidestring: Widestring; var anInteger: Integer; var aCurrency: Currency; var aDatetime: DateTime);
+ function CustomObjectAsString: String;
+ function CustomObjectAsStream: Binary;
+ procedure RaiseError;
+ procedure RaiseTestException;
+ end;
+
+implementation
+
+uses
+ {vcl:} SysUtils,
+ {RemObjects:} uROEventRepository, uROSerializer, uRORes;
+
+{ ETestException }
+
+constructor ETestException.Create(anExceptionMessage : string; aErrorCode: Integer;
+ aAdditionalInfo: AnsiString);
+begin
+ inherited Create(anExceptionMessage);
+
+ fErrorCode := aErrorCode;
+ fAdditionalInfo := aAdditionalInfo;
+end;
+
+procedure ETestException.ReadException(ASerializer: TObject);
+var
+ l_AdditionalInfo: AnsiString;
+ l_ErrorCode: Integer;
+begin
+ if TROSerializer(ASerializer).RecordStrictOrder then begin
+ l_ErrorCode := ErrorCode;
+ TROSerializer(ASerializer).ReadInteger('ErrorCode', otSLong, l_ErrorCode);
+ ErrorCode := l_ErrorCode;
+ l_AdditionalInfo := AdditionalInfo;
+ TROSerializer(ASerializer).ReadUTF8String('AdditionalInfo', l_AdditionalInfo);
+ AdditionalInfo := l_AdditionalInfo;
+ end
+ else begin
+ l_AdditionalInfo := AdditionalInfo;
+ TROSerializer(ASerializer).ReadUTF8String('AdditionalInfo', l_AdditionalInfo);
+ AdditionalInfo := l_AdditionalInfo;
+ l_ErrorCode := ErrorCode;
+ TROSerializer(ASerializer).ReadInteger('ErrorCode', otSLong, l_ErrorCode);
+ ErrorCode := l_ErrorCode;
+ end;
+end;
+
+procedure ETestException.WriteException(ASerializer: TObject);
+var
+ l_AdditionalInfo: AnsiString;
+ l_ErrorCode: Integer;
+begin
+ if TROSerializer(ASerializer).RecordStrictOrder then begin
+ TROSerializer(ASerializer).ChangeClass(ETestException);
+ l_ErrorCode := ErrorCode;
+ TROSerializer(ASerializer).WriteInteger('ErrorCode', otSLong, l_ErrorCode);
+ l_AdditionalInfo := AdditionalInfo;
+ TROSerializer(ASerializer).WriteUTF8String('AdditionalInfo', l_AdditionalInfo);
+ end
+ else begin
+ l_AdditionalInfo := AdditionalInfo;
+ TROSerializer(ASerializer).WriteUTF8String('AdditionalInfo', l_AdditionalInfo);
+ l_ErrorCode := ErrorCode;
+ TROSerializer(ASerializer).WriteInteger('ErrorCode', otSLong, l_ErrorCode);
+ end;
+end;
+
+{ TPersonArray }
+
+procedure TPersonArray.Assign(iSource: TPersistent);
+var lSource:TPersonArray;
+ i:integer;
+begin
+ if (iSource is TPersonArray) then begin
+ lSource := TPersonArray(iSource);
+ Clear();
+ Resize(lSource.Count);
+
+ for i := 0 to Count-1 do begin
+ if Assigned(lSource.Items[i]) then begin
+ Items[i].Assign(lSource.Items[i]);
+ end;
+ end;
+ end
+ else begin
+ inherited Assign(iSource);
+ end;
+end;
+
+class function TPersonArray.GetItemType: PTypeInfo;
+begin
+ result := TypeInfo(TPerson);
+end;
+
+class function TPersonArray.GetItemClass: TClass;
+begin
+ result := TPerson;
+end;
+
+class function TPersonArray.GetItemSize: integer;
+begin
+ result := SizeOf(TPerson);
+end;
+
+function TPersonArray.GetItems(aIndex: integer): TPerson;
+begin
+ if (aIndex < 0) or (aIndex >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);
+ result := fItems[aIndex];
+end;
+
+function TPersonArray.GetItemRef(aIndex: integer): pointer;
+begin
+ if (aIndex < 0) or (aIndex >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);
+ result := fItems[aIndex];
+end;
+
+procedure TPersonArray.SetItemRef(aIndex: integer; Ref: pointer);
+begin
+ if (aIndex < 0) or (aIndex >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);
+ if Ref <> fItems[aIndex] then begin
+ if fItems[aIndex] <> nil then fItems[aIndex].Free;
+ fItems[aIndex] := Ref;
+ end;
+end;
+
+procedure TPersonArray.Clear;
+var i: integer;
+begin
+ for i := 0 to (Count-1) do fItems[i].Free();
+ SetLength(fItems, 0);
+ FCount := 0;
+end;
+
+procedure TPersonArray.Delete(aIndex: integer);
+var i: integer;
+begin
+ if (aIndex>=Count) then RaiseError(err_InvalidIndex, [aIndex]);
+
+ fItems[aIndex].Free();
+
+ if (aIndex= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);
+ if fItems[aIndex] <> Value then begin
+ fItems[aIndex].Free;
+ fItems[aIndex] := Value;
+ end;
+end;
+
+procedure TPersonArray.Resize(ElementCount: integer);
+var i: Integer;
+begin
+ if fCount = ElementCount then Exit;
+ for i := FCount -1 downto ElementCount do
+ FItems[i].Free;
+ SetLength(fItems, ElementCount);
+ for i := FCount to ElementCount -1 do
+ FItems[i] := TPerson.Create;
+ FCount := ElementCount;
+end;
+
+function TPersonArray.GetCount: integer;
+begin
+ result := FCount;
+end;
+
+procedure TPersonArray.Grow;
+var
+ Delta, Capacity: Integer;
+begin
+ Capacity := Length(fItems);
+ if Capacity > 64 then
+ Delta := Capacity div 4
+ else
+ if Capacity > 8 then
+ Delta := 16
+ else
+ Delta := 4;
+ SetLength(fItems, Capacity + Delta);
+end;
+
+function TPersonArray.Add: TPerson;
+begin
+ result := TPerson.Create;
+ Add(Result);
+end;
+
+function TPersonArray.Add(const Value:TPerson): integer;
+begin
+ Result := Count;
+ if Length(fItems) = Result then
+ Grow;
+ fItems[result] := Value;
+ Inc(fCount);
+end;
+
+procedure TPersonArray.ReadComplex(ASerializer: TObject);
+var
+ lval: TPerson;
+ i: integer;
+begin
+ for i := 0 to Count-1 do begin
+ with TROSerializer(ASerializer) do
+ ReadStruct(GetArrayElementName(GetItemType, GetItemRef(i)), TPerson, lval, i);
+ Items[i] := lval;
+ end;
+end;
+
+procedure TPersonArray.WriteComplex(ASerializer: TObject);
+var
+ i: integer;
+begin
+ for i := 0 to Count-1 do
+ with TROSerializer(ASerializer) do
+ WriteStruct(GetArrayElementName(GetItemType, GetItemRef(i)), fItems[i], TPerson, i);
+end;
+
+{ TIntegerArray }
+
+procedure TIntegerArray.Assign(iSource: TPersistent);
+var lSource:TIntegerArray;
+ i:integer;
+begin
+ if (iSource is TIntegerArray) then begin
+ lSource := TIntegerArray(iSource);
+ Clear();
+ Resize(lSource.Count);
+
+ for i := 0 to Count-1 do begin
+ Items[i] := lSource.Items[i];
+ end;
+ end
+ else begin
+ inherited Assign(iSource);
+ end;
+end;
+
+class function TIntegerArray.GetItemType: PTypeInfo;
+begin
+ result := TypeInfo(Integer);
+end;
+
+class function TIntegerArray.GetItemSize: integer;
+begin
+ result := SizeOf(Integer);
+end;
+
+function TIntegerArray.GetItems(aIndex: integer): Integer;
+begin
+ if (aIndex < 0) or (aIndex >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);
+ result := fItems[aIndex];
+end;
+
+function TIntegerArray.GetItemRef(aIndex: integer): pointer;
+begin
+ if (aIndex < 0) or (aIndex >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);
+ result := @fItems[aIndex];
+end;
+
+procedure TIntegerArray.Clear;
+begin
+ SetLength(fItems, 0);
+ FCount := 0;
+end;
+
+procedure TIntegerArray.Delete(aIndex: integer);
+var i: integer;
+begin
+ if (aIndex>=Count) then RaiseError(err_InvalidIndex, [aIndex]);
+
+ if (aIndex= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);
+ fItems[aIndex] := Value;
+end;
+
+procedure TIntegerArray.Resize(ElementCount: integer);
+begin
+ if fCount = ElementCount then Exit;
+ SetLength(fItems, ElementCount);
+ FCount := ElementCount;
+end;
+
+function TIntegerArray.GetCount: integer;
+begin
+ result := FCount;
+end;
+
+procedure TIntegerArray.Grow;
+var
+ Delta, Capacity: Integer;
+begin
+ Capacity := Length(fItems);
+ if Capacity > 64 then
+ Delta := Capacity div 4
+ else
+ if Capacity > 8 then
+ Delta := 16
+ else
+ Delta := 4;
+ SetLength(fItems, Capacity + Delta);
+end;
+
+function TIntegerArray.Add(const Value: Integer): integer;
+begin
+ Result := Count;
+ if Length(fItems) = Result then
+ Grow;
+ fItems[result] := Value;
+ Inc(fCount);
+end;
+
+function TIntegerArray.GetIndex(const aPropertyName: string;
+ const aPropertyValue: Variant; StartFrom: integer;
+ Options: TROSearchOptions): integer;
+begin
+ result := -1;
+end;
+
+procedure TIntegerArray.ReadComplex(ASerializer: TObject);
+var
+ lval: Integer;
+ i: integer;
+begin
+ for i := 0 to Count-1 do begin
+ with TROSerializer(ASerializer) do
+ ReadInteger(GetArrayElementName(GetItemType, GetItemRef(i)), otSLong, lval, i);
+ Items[i] := lval;
+ end;
+end;
+
+procedure TIntegerArray.WriteComplex(ASerializer: TObject);
+var
+ i: integer;
+begin
+ for i := 0 to Count-1 do
+ with TROSerializer(ASerializer) do
+ WriteInteger(GetArrayElementName(GetItemType, GetItemRef(i)), otSLong, fItems[i], i);
+end;
+
+{ TStringArray }
+
+procedure TStringArray.Assign(iSource: TPersistent);
+var lSource:TStringArray;
+ i:integer;
+begin
+ if (iSource is TStringArray) then begin
+ lSource := TStringArray(iSource);
+ Clear();
+ Resize(lSource.Count);
+
+ for i := 0 to Count-1 do begin
+ Items[i] := lSource.Items[i];
+ end;
+ end
+ else begin
+ inherited Assign(iSource);
+ end;
+end;
+
+class function TStringArray.GetItemType: PTypeInfo;
+begin
+ result := TypeInfo(AnsiString);
+end;
+
+class function TStringArray.GetItemSize: integer;
+begin
+ result := SizeOf(AnsiString);
+end;
+
+function TStringArray.GetItems(aIndex: integer): AnsiString;
+begin
+ if (aIndex < 0) or (aIndex >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);
+ result := fItems[aIndex];
+end;
+
+function TStringArray.GetItemRef(aIndex: integer): pointer;
+begin
+ if (aIndex < 0) or (aIndex >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);
+ result := @fItems[aIndex];
+end;
+
+procedure TStringArray.Clear;
+begin
+ SetLength(fItems, 0);
+ FCount := 0;
+end;
+
+procedure TStringArray.Delete(aIndex: integer);
+var i: integer;
+begin
+ if (aIndex>=Count) then RaiseError(err_InvalidIndex, [aIndex]);
+
+ if (aIndex= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);
+ fItems[aIndex] := Value;
+end;
+
+procedure TStringArray.Resize(ElementCount: integer);
+begin
+ if fCount = ElementCount then Exit;
+ SetLength(fItems, ElementCount);
+ FCount := ElementCount;
+end;
+
+function TStringArray.GetCount: integer;
+begin
+ result := FCount;
+end;
+
+procedure TStringArray.Grow;
+var
+ Delta, Capacity: Integer;
+begin
+ Capacity := Length(fItems);
+ if Capacity > 64 then
+ Delta := Capacity div 4
+ else
+ if Capacity > 8 then
+ Delta := 16
+ else
+ Delta := 4;
+ SetLength(fItems, Capacity + Delta);
+end;
+
+function TStringArray.Add(const Value: AnsiString): integer;
+begin
+ Result := Count;
+ if Length(fItems) = Result then
+ Grow;
+ fItems[result] := Value;
+ Inc(fCount);
+end;
+
+function TStringArray.GetIndex(const aPropertyName: string;
+ const aPropertyValue: Variant; StartFrom: integer;
+ Options: TROSearchOptions): integer;
+begin
+ result := -1;
+end;
+
+procedure TStringArray.ReadComplex(ASerializer: TObject);
+var
+ lval: AnsiString;
+ i: integer;
+begin
+ for i := 0 to Count-1 do begin
+ with TROSerializer(ASerializer) do
+ ReadUTF8String(GetArrayElementName(GetItemType, GetItemRef(i)), lval, i);
+ Items[i] := lval;
+ end;
+end;
+
+procedure TStringArray.WriteComplex(ASerializer: TObject);
+var
+ i: integer;
+begin
+ for i := 0 to Count-1 do
+ with TROSerializer(ASerializer) do
+ WriteUTF8String(GetArrayElementName(GetItemType, GetItemRef(i)), fItems[i], i);
+end;
+
+{ TPerson }
+
+procedure TPerson.Assign(iSource: TPersistent);
+var lSource: MegaDemoLibrary_Intf.TPerson;
+begin
+ inherited Assign(iSource);
+ if (iSource is MegaDemoLibrary_Intf.TPerson) then begin
+ lSource := MegaDemoLibrary_Intf.TPerson(iSource);
+ FirstName := lSource.FirstName;
+ LastName := lSource.LastName;
+ Age := lSource.Age;
+ Sex := lSource.Sex;
+ end;
+end;
+
+procedure TPerson.ReadComplex(ASerializer: TObject);
+var
+ l_Age: Integer;
+ l_FirstName: AnsiString;
+ l_LastName: AnsiString;
+ l_Sex: TSex;
+begin
+ if TROSerializer(ASerializer).RecordStrictOrder then begin
+ l_FirstName := FirstName;
+ TROSerializer(ASerializer).ReadUTF8String('FirstName', l_FirstName);
+ FirstName := l_FirstName;
+ l_LastName := LastName;
+ TROSerializer(ASerializer).ReadUTF8String('LastName', l_LastName);
+ LastName := l_LastName;
+ l_Age := Age;
+ TROSerializer(ASerializer).ReadInteger('Age', otSLong, l_Age);
+ Age := l_Age;
+ l_Sex := Sex;
+ TROSerializer(ASerializer).ReadEnumerated('Sex',TypeInfo(TSex), l_Sex);
+ Sex := l_Sex;
+ end
+ else begin
+ l_Age := Age;
+ TROSerializer(ASerializer).ReadInteger('Age', otSLong, l_Age);
+ Age := l_Age;
+ l_FirstName := FirstName;
+ TROSerializer(ASerializer).ReadUTF8String('FirstName', l_FirstName);
+ FirstName := l_FirstName;
+ l_LastName := LastName;
+ TROSerializer(ASerializer).ReadUTF8String('LastName', l_LastName);
+ LastName := l_LastName;
+ l_Sex := Sex;
+ TROSerializer(ASerializer).ReadEnumerated('Sex',TypeInfo(TSex), l_Sex);
+ Sex := l_Sex;
+ end;
+end;
+
+procedure TPerson.WriteComplex(ASerializer: TObject);
+var
+ l_Age: Integer;
+ l_FirstName: AnsiString;
+ l_LastName: AnsiString;
+ l_Sex: TSex;
+begin
+ if TROSerializer(ASerializer).RecordStrictOrder then begin
+ TROSerializer(ASerializer).ChangeClass(TPerson);
+ l_FirstName := FirstName;
+ TROSerializer(ASerializer).WriteUTF8String('FirstName', l_FirstName);
+ l_LastName := LastName;
+ TROSerializer(ASerializer).WriteUTF8String('LastName', l_LastName);
+ l_Age := Age;
+ TROSerializer(ASerializer).WriteInteger('Age', otSLong, l_Age);
+ l_Sex := Sex;
+ TROSerializer(ASerializer).WriteEnumerated('Sex',TypeInfo(TSex), l_Sex);
+ end
+ else begin
+ l_Age := Age;
+ TROSerializer(ASerializer).WriteInteger('Age', otSLong, l_Age);
+ l_FirstName := FirstName;
+ TROSerializer(ASerializer).WriteUTF8String('FirstName', l_FirstName);
+ l_LastName := LastName;
+ TROSerializer(ASerializer).WriteUTF8String('LastName', l_LastName);
+ l_Sex := Sex;
+ TROSerializer(ASerializer).WriteEnumerated('Sex',TypeInfo(TSex), l_Sex);
+ end;
+end;
+
+{ TPersonCollection }
+constructor TPersonCollection.Create;
+begin
+ inherited Create(TPerson);
+end;
+
+constructor TPersonCollection.Create(aItemClass: TCollectionItemClass);
+begin
+ inherited Create(aItemClass);
+end;
+
+function TPersonCollection.Add: TPerson;
+begin
+ result := TPerson(inherited Add);
+end;
+
+function TPersonCollection.GetItems(aIndex: integer): TPerson;
+begin
+ result := TPerson(inherited Items[aIndex]);
+end;
+
+procedure TPersonCollection.LoadFromArray(anArray: TPersonArray);
+var i : integer;
+begin
+ Clear;
+ for i := 0 to (anArray.Count-1) do
+ Add.Assign(anArray[i]);
+end;
+
+procedure TPersonCollection.SaveToArray(anArray: TPersonArray);
+var i : integer;
+begin
+ anArray.Clear;
+ anArray.Resize(Count);
+ for i := 0 to (Count-1) do begin
+ anArray[i] := TPerson.Create;
+ anArray[i].Assign(Items[i]);
+ end;
+end;
+
+procedure TPersonCollection.SetItems(aIndex: integer; const Value: TPerson);
+begin
+ TPerson(inherited Items[aIndex]).Assign(Value);
+end;
+
+{ CoMegaDemoService }
+
+class function CoMegaDemoService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IMegaDemoService;
+begin
+ result := TMegaDemoService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TMegaDemoService_Proxy }
+
+function TMegaDemoService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'MegaDemoService';
+end;
+
+function TMegaDemoService_Proxy.Sum(const A: Integer; const B: Integer): Integer;
+begin
+ __Message.SetAttributes(__TransportChannel, ['EA_Model'],
+ ['C:\Dev\ROSDK3\Tests\MegaDemo\NewLibrary.eap']);
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'MegaDemoLibrary', __InterfaceName, 'Sum');
+ __Message.Write('A', TypeInfo(Integer), A, []);
+ __Message.Write('B', TypeInfo(Integer), B, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Integer), result, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+function TMegaDemoService_Proxy.GetServerTime: DateTime;
+begin
+ __Message.SetAttributes(__TransportChannel, ['EA_Model'],
+ ['C:\Dev\ROSDK3\Tests\MegaDemo\NewLibrary.eap']);
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'MegaDemoLibrary', __InterfaceName, 'GetServerTime');
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(DateTime), result, [paIsDateTime]);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+procedure TMegaDemoService_Proxy.EchoPerson(const aPerson: TPerson; out anotherPerson: TPerson);
+begin
+ __Message.SetAttributes(__TransportChannel, ['EA_Model'],
+ ['C:\Dev\ROSDK3\Tests\MegaDemo\NewLibrary.eap']);
+ try
+ anotherPerson := nil;
+ __Message.InitializeRequestMessage(__TransportChannel, 'MegaDemoLibrary', __InterfaceName, 'EchoPerson');
+ __Message.Write('aPerson', TypeInfo(MegaDemoLibrary_Intf.TPerson), aPerson, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('anotherPerson', TypeInfo(MegaDemoLibrary_Intf.TPerson), anotherPerson, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+function TMegaDemoService_Proxy.TestIntegerArray(const anArray: TIntegerArray): TIntegerArray;
+begin
+ __Message.SetAttributes(__TransportChannel, ['EA_Model'],
+ ['C:\Dev\ROSDK3\Tests\MegaDemo\NewLibrary.eap']);
+ try
+ result := nil;
+ __Message.InitializeRequestMessage(__TransportChannel, 'MegaDemoLibrary', __InterfaceName, 'TestIntegerArray');
+ __Message.Write('anArray', TypeInfo(MegaDemoLibrary_Intf.TIntegerArray), anArray, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(MegaDemoLibrary_Intf.TIntegerArray), result, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+function TMegaDemoService_Proxy.TestStringArray(const anArray: TStringArray): TStringArray;
+begin
+ __Message.SetAttributes(__TransportChannel, ['EA_Model'],
+ ['C:\Dev\ROSDK3\Tests\MegaDemo\NewLibrary.eap']);
+ try
+ result := nil;
+ __Message.InitializeRequestMessage(__TransportChannel, 'MegaDemoLibrary', __InterfaceName, 'TestStringArray');
+ __Message.Write('anArray', TypeInfo(MegaDemoLibrary_Intf.TStringArray), anArray, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(MegaDemoLibrary_Intf.TStringArray), result, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+function TMegaDemoService_Proxy.TestPersonArray(const anArray: TPersonArray): TPersonArray;
+begin
+ __Message.SetAttributes(__TransportChannel, ['EA_Model'],
+ ['C:\Dev\ROSDK3\Tests\MegaDemo\NewLibrary.eap']);
+ try
+ result := nil;
+ __Message.InitializeRequestMessage(__TransportChannel, 'MegaDemoLibrary', __InterfaceName, 'TestPersonArray');
+ __Message.Write('anArray', TypeInfo(MegaDemoLibrary_Intf.TPersonArray), anArray, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(MegaDemoLibrary_Intf.TPersonArray), result, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+procedure TMegaDemoService_Proxy.EchoBinary(const BinIN: binary; out BinOUT: Binary);
+begin
+ __Message.SetAttributes(__TransportChannel, ['EA_Model'],
+ ['C:\Dev\ROSDK3\Tests\MegaDemo\NewLibrary.eap']);
+ try
+ BinOUT := nil;
+ __Message.InitializeRequestMessage(__TransportChannel, 'MegaDemoLibrary', __InterfaceName, 'EchoBinary');
+ __Message.Write('BinIN', TypeInfo(binary), BinIN, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('BinOUT', TypeInfo(Binary), BinOUT, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+procedure TMegaDemoService_Proxy.SomeTypes(var aString: String; var aWidestring: Widestring; var anInteger: Integer; var aCurrency: Currency; var aDatetime: DateTime);
+begin
+ __Message.SetAttributes(__TransportChannel, ['EA_Model'],
+ ['C:\Dev\ROSDK3\Tests\MegaDemo\NewLibrary.eap']);
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'MegaDemoLibrary', __InterfaceName, 'SomeTypes');
+ __Message.Write('aString', TypeInfo(String), aString, []);
+ __Message.Write('aWidestring', TypeInfo(Widestring), aWidestring, []);
+ __Message.Write('anInteger', TypeInfo(Integer), anInteger, []);
+ __Message.Write('aCurrency', TypeInfo(Currency), aCurrency, []);
+ __Message.Write('aDatetime', TypeInfo(DateTime), aDatetime, [paIsDateTime]);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('aString', TypeInfo(String), aString, []);
+ __Message.Read('aWidestring', TypeInfo(Widestring), aWidestring, []);
+ __Message.Read('anInteger', TypeInfo(Integer), anInteger, []);
+ __Message.Read('aCurrency', TypeInfo(Currency), aCurrency, []);
+ __Message.Read('aDatetime', TypeInfo(DateTime), aDatetime, [paIsDateTime]);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+function TMegaDemoService_Proxy.CustomObjectAsString: String;
+begin
+ __Message.SetAttributes(__TransportChannel, ['EA_Model'],
+ ['C:\Dev\ROSDK3\Tests\MegaDemo\NewLibrary.eap']);
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'MegaDemoLibrary', __InterfaceName, 'CustomObjectAsString');
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(String), result, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+function TMegaDemoService_Proxy.CustomObjectAsStream: Binary;
+begin
+ __Message.SetAttributes(__TransportChannel, ['EA_Model'],
+ ['C:\Dev\ROSDK3\Tests\MegaDemo\NewLibrary.eap']);
+ try
+ result := nil;
+ __Message.InitializeRequestMessage(__TransportChannel, 'MegaDemoLibrary', __InterfaceName, 'CustomObjectAsStream');
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Binary), result, []);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+procedure TMegaDemoService_Proxy.RaiseError;
+begin
+ __Message.SetAttributes(__TransportChannel, ['EA_Model'],
+ ['C:\Dev\ROSDK3\Tests\MegaDemo\NewLibrary.eap']);
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'MegaDemoLibrary', __InterfaceName, 'RaiseError');
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+procedure TMegaDemoService_Proxy.RaiseTestException;
+begin
+ __Message.SetAttributes(__TransportChannel, ['EA_Model'],
+ ['C:\Dev\ROSDK3\Tests\MegaDemo\NewLibrary.eap']);
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'MegaDemoLibrary', __InterfaceName, 'RaiseTestException');
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+initialization
+ RegisterROClass(TPerson);
+ RegisterROClass(TPersonArray);
+ RegisterROClass(TIntegerArray);
+ RegisterROClass(TStringArray);
+ RegisterExceptionClass(ETestException);
+ RegisterProxyClass(IMegaDemoService_IID, TMegaDemoService_Proxy);
+
+
+finalization
+ UnregisterROClass(TPerson);
+ UnregisterROClass(TPersonArray);
+ UnregisterROClass(TIntegerArray);
+ UnregisterROClass(TStringArray);
+ UnregisterExceptionClass(ETestException);
+ UnregisterProxyClass(IMegaDemoService_IID);
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoLibrary_Invk.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoLibrary_Invk.pas
new file mode 100644
index 0000000..46cb478
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoLibrary_Invk.pas
@@ -0,0 +1,364 @@
+unit MegaDemoLibrary_Invk;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+{$I Remobjects.inc}
+
+interface
+
+uses
+ {vcl:} Classes,
+ {RemObjects:} uROXMLIntf, uROServer, uROServerIntf, uROTypes, uROClientIntf,
+ {Generated:} MegaDemoLibrary_Intf;
+
+type
+ TMegaDemoService_Invoker = class(TROInvoker)
+ private
+ protected
+ published
+ procedure Invoke_Sum(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_GetServerTime(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_EchoPerson(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_TestIntegerArray(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_TestStringArray(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_TestPersonArray(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_EchoBinary(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_SomeTypes(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_CustomObjectAsString(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_CustomObjectAsStream(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_RaiseError(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_RaiseTestException(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ end;
+
+implementation
+
+uses
+ {RemObjects:} uRORes, uROClient;
+
+{ TMegaDemoService_Invoker }
+
+procedure TMegaDemoService_Invoker.Invoke_Sum(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function Sum(const A: Integer; const B: Integer): Integer; }
+var
+ A: Integer;
+ B: Integer;
+ lResult: Integer;
+begin
+ __Message.SetAttributes(__Transport, ['EA_Model'],
+ ['C:\Dev\ROSDK3\Tests\MegaDemo\NewLibrary.eap']);
+ try
+ __Message.Read('A', TypeInfo(Integer), A, []);
+ __Message.Read('B', TypeInfo(Integer), B, []);
+
+ lResult := (__Instance as IMegaDemoService).Sum(A, B);
+
+ __Message.InitializeResponseMessage(__Transport, 'MegaDemoLibrary', 'MegaDemoService', 'SumResponse');
+ __Message.Write('Result', TypeInfo(Integer), lResult, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ end;
+end;
+
+procedure TMegaDemoService_Invoker.Invoke_GetServerTime(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function GetServerTime: DateTime; }
+var
+ lResult: DateTime;
+begin
+ __Message.SetAttributes(__Transport, ['EA_Model'],
+ ['C:\Dev\ROSDK3\Tests\MegaDemo\NewLibrary.eap']);
+ try
+ lResult := (__Instance as IMegaDemoService).GetServerTime;
+
+ __Message.InitializeResponseMessage(__Transport, 'MegaDemoLibrary', 'MegaDemoService', 'GetServerTimeResponse');
+ __Message.Write('Result', TypeInfo(DateTime), lResult, [paIsDateTime]);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ end;
+end;
+
+procedure TMegaDemoService_Invoker.Invoke_EchoPerson(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ procedure EchoPerson(const aPerson: TPerson; out anotherPerson: TPerson); }
+var
+ aPerson: MegaDemoLibrary_Intf.TPerson;
+ anotherPerson: MegaDemoLibrary_Intf.TPerson;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ __Message.SetAttributes(__Transport, ['EA_Model'],
+ ['C:\Dev\ROSDK3\Tests\MegaDemo\NewLibrary.eap']);
+ aPerson := nil;
+ anotherPerson := nil;
+ try
+ __Message.Read('aPerson', TypeInfo(MegaDemoLibrary_Intf.TPerson), aPerson, []);
+
+ (__Instance as IMegaDemoService).EchoPerson(aPerson, anotherPerson);
+
+ __Message.InitializeResponseMessage(__Transport, 'MegaDemoLibrary', 'MegaDemoService', 'EchoPersonResponse');
+ __Message.Write('anotherPerson', TypeInfo(MegaDemoLibrary_Intf.TPerson), anotherPerson, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(aPerson);
+ __lObjectDisposer.Add(anotherPerson);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
+procedure TMegaDemoService_Invoker.Invoke_TestIntegerArray(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function TestIntegerArray(const anArray: TIntegerArray): TIntegerArray; }
+var
+ anArray: MegaDemoLibrary_Intf.TIntegerArray;
+ lResult: MegaDemoLibrary_Intf.TIntegerArray;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ __Message.SetAttributes(__Transport, ['EA_Model'],
+ ['C:\Dev\ROSDK3\Tests\MegaDemo\NewLibrary.eap']);
+ anArray := nil;
+ lResult := nil;
+ try
+ __Message.Read('anArray', TypeInfo(MegaDemoLibrary_Intf.TIntegerArray), anArray, []);
+
+ lResult := (__Instance as IMegaDemoService).TestIntegerArray(anArray);
+
+ __Message.InitializeResponseMessage(__Transport, 'MegaDemoLibrary', 'MegaDemoService', 'TestIntegerArrayResponse');
+ __Message.Write('Result', TypeInfo(MegaDemoLibrary_Intf.TIntegerArray), lResult, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(anArray);
+ __lObjectDisposer.Add(lResult);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
+procedure TMegaDemoService_Invoker.Invoke_TestStringArray(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function TestStringArray(const anArray: TStringArray): TStringArray; }
+var
+ anArray: MegaDemoLibrary_Intf.TStringArray;
+ lResult: MegaDemoLibrary_Intf.TStringArray;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ __Message.SetAttributes(__Transport, ['EA_Model'],
+ ['C:\Dev\ROSDK3\Tests\MegaDemo\NewLibrary.eap']);
+ anArray := nil;
+ lResult := nil;
+ try
+ __Message.Read('anArray', TypeInfo(MegaDemoLibrary_Intf.TStringArray), anArray, []);
+
+ lResult := (__Instance as IMegaDemoService).TestStringArray(anArray);
+
+ __Message.InitializeResponseMessage(__Transport, 'MegaDemoLibrary', 'MegaDemoService', 'TestStringArrayResponse');
+ __Message.Write('Result', TypeInfo(MegaDemoLibrary_Intf.TStringArray), lResult, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(anArray);
+ __lObjectDisposer.Add(lResult);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
+procedure TMegaDemoService_Invoker.Invoke_TestPersonArray(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function TestPersonArray(const anArray: TPersonArray): TPersonArray; }
+var
+ anArray: MegaDemoLibrary_Intf.TPersonArray;
+ lResult: MegaDemoLibrary_Intf.TPersonArray;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ __Message.SetAttributes(__Transport, ['EA_Model'],
+ ['C:\Dev\ROSDK3\Tests\MegaDemo\NewLibrary.eap']);
+ anArray := nil;
+ lResult := nil;
+ try
+ __Message.Read('anArray', TypeInfo(MegaDemoLibrary_Intf.TPersonArray), anArray, []);
+
+ lResult := (__Instance as IMegaDemoService).TestPersonArray(anArray);
+
+ __Message.InitializeResponseMessage(__Transport, 'MegaDemoLibrary', 'MegaDemoService', 'TestPersonArrayResponse');
+ __Message.Write('Result', TypeInfo(MegaDemoLibrary_Intf.TPersonArray), lResult, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(anArray);
+ __lObjectDisposer.Add(lResult);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
+procedure TMegaDemoService_Invoker.Invoke_EchoBinary(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ procedure EchoBinary(const BinIN: binary; out BinOUT: Binary); }
+var
+ BinIN: binary;
+ BinOUT: Binary;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ __Message.SetAttributes(__Transport, ['EA_Model'],
+ ['C:\Dev\ROSDK3\Tests\MegaDemo\NewLibrary.eap']);
+ BinIN := nil;
+ BinOUT := nil;
+ try
+ __Message.Read('BinIN', TypeInfo(binary), BinIN, []);
+
+ (__Instance as IMegaDemoService).EchoBinary(BinIN, BinOUT);
+
+ __Message.InitializeResponseMessage(__Transport, 'MegaDemoLibrary', 'MegaDemoService', 'EchoBinaryResponse');
+ __Message.Write('BinOUT', TypeInfo(Binary), BinOUT, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(BinIN);
+ __lObjectDisposer.Add(BinOUT);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
+procedure TMegaDemoService_Invoker.Invoke_SomeTypes(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ procedure SomeTypes(var aString: String; var aWidestring: Widestring; var anInteger: Integer; var aCurrency: Currency; var aDatetime: DateTime); }
+var
+ aString: String;
+ aWidestring: Widestring;
+ anInteger: Integer;
+ aCurrency: Currency;
+ aDatetime: DateTime;
+begin
+ __Message.SetAttributes(__Transport, ['EA_Model'],
+ ['C:\Dev\ROSDK3\Tests\MegaDemo\NewLibrary.eap']);
+ try
+ __Message.Read('aString', TypeInfo(String), aString, []);
+ __Message.Read('aWidestring', TypeInfo(Widestring), aWidestring, []);
+ __Message.Read('anInteger', TypeInfo(Integer), anInteger, []);
+ __Message.Read('aCurrency', TypeInfo(Currency), aCurrency, []);
+ __Message.Read('aDatetime', TypeInfo(DateTime), aDatetime, [paIsDateTime]);
+
+ (__Instance as IMegaDemoService).SomeTypes(aString, aWidestring, anInteger, aCurrency, aDatetime);
+
+ __Message.InitializeResponseMessage(__Transport, 'MegaDemoLibrary', 'MegaDemoService', 'SomeTypesResponse');
+ __Message.Write('aString', TypeInfo(String), aString, []);
+ __Message.Write('aWidestring', TypeInfo(Widestring), aWidestring, []);
+ __Message.Write('anInteger', TypeInfo(Integer), anInteger, []);
+ __Message.Write('aCurrency', TypeInfo(Currency), aCurrency, []);
+ __Message.Write('aDatetime', TypeInfo(DateTime), aDatetime, [paIsDateTime]);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ end;
+end;
+
+procedure TMegaDemoService_Invoker.Invoke_CustomObjectAsString(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function CustomObjectAsString: String; }
+var
+ lResult: String;
+begin
+ __Message.SetAttributes(__Transport, ['EA_Model'],
+ ['C:\Dev\ROSDK3\Tests\MegaDemo\NewLibrary.eap']);
+ try
+ lResult := (__Instance as IMegaDemoService).CustomObjectAsString;
+
+ __Message.InitializeResponseMessage(__Transport, 'MegaDemoLibrary', 'MegaDemoService', 'CustomObjectAsStringResponse');
+ __Message.Write('Result', TypeInfo(String), lResult, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ end;
+end;
+
+procedure TMegaDemoService_Invoker.Invoke_CustomObjectAsStream(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function CustomObjectAsStream: Binary; }
+var
+ lResult: Binary;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ __Message.SetAttributes(__Transport, ['EA_Model'],
+ ['C:\Dev\ROSDK3\Tests\MegaDemo\NewLibrary.eap']);
+ lResult := nil;
+ try
+ lResult := (__Instance as IMegaDemoService).CustomObjectAsStream;
+
+ __Message.InitializeResponseMessage(__Transport, 'MegaDemoLibrary', 'MegaDemoService', 'CustomObjectAsStreamResponse');
+ __Message.Write('Result', TypeInfo(Binary), lResult, []);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(lResult);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
+procedure TMegaDemoService_Invoker.Invoke_RaiseError(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ procedure RaiseError; }
+begin
+ __Message.SetAttributes(__Transport, ['EA_Model'],
+ ['C:\Dev\ROSDK3\Tests\MegaDemo\NewLibrary.eap']);
+ try
+ (__Instance as IMegaDemoService).RaiseError;
+
+ __Message.InitializeResponseMessage(__Transport, 'MegaDemoLibrary', 'MegaDemoService', 'RaiseErrorResponse');
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ __oResponseOptions := [roNoResponse];
+
+ finally
+ end;
+end;
+
+procedure TMegaDemoService_Invoker.Invoke_RaiseTestException(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ procedure RaiseTestException; }
+begin
+ __Message.SetAttributes(__Transport, ['EA_Model'],
+ ['C:\Dev\ROSDK3\Tests\MegaDemo\NewLibrary.eap']);
+ try
+ (__Instance as IMegaDemoService).RaiseTestException;
+
+ __Message.InitializeResponseMessage(__Transport, 'MegaDemoLibrary', 'MegaDemoService', 'RaiseTestExceptionResponse');
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ end;
+end;
+
+initialization
+ RegisterServiceAttribute('','EA_Model','C:\Dev\ROSDK3\Tests\MegaDemo\NewLibrary.eap');
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoServer.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoServer.bdsproj
new file mode 100644
index 0000000..d1cbdcd
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoServer.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {0C4C725A-7179-410C-9484-1F6B71FE3A78}
+
+
+
+
+ MegaDemoServer.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoServer.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoServer.dpr
new file mode 100644
index 0000000..a21a487
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoServer.dpr
@@ -0,0 +1,21 @@
+program MegaDemoServer;
+
+{#ROGEN:MegaDemoLibrary.rodl} // RemObjects: Careful, do not remove!
+
+uses
+ Forms,
+ MegaDemoServerMain in 'MegaDemoServerMain.pas' {MegaDemoServerMainForm},
+ MegaDemoCustomClass in 'MegaDemoCustomClass.pas',
+ MegaDemoLibrary_Intf in 'MegaDemoLibrary_Intf.pas',
+ MegaDemoLibrary_Invk in 'MegaDemoLibrary_Invk.pas',
+ MegaDemoService_Impl in 'MegaDemoService_Impl.pas' {MegaService: TDARemoteService};
+
+{$R *.RES}
+{$R RODLFile.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'RemObjects MegaDemo Server';
+ Application.CreateForm(TMegaDemoServerMainForm, MegaDemoServerMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoServer.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoServer.dproj
new file mode 100644
index 0000000..6fd7820
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoServer.dproj
@@ -0,0 +1,42 @@
+
+
+ {f8cc3de2-12be-48eb-b46d-815b9569e1af}
+ MegaDemoServer.dpr
+ Debug
+ AnyCPU
+ DCC32
+ MegaDemoServer.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+False True False True False 1 0 0 0 False False False False False 1058 1251 1.0.0.0 1.0.0.0 MegaDemoServer.dpr
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoServer.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoServer.res
new file mode 100644
index 0000000..b0dd731
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoServer.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoServerMain.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoServerMain.dfm
new file mode 100644
index 0000000..b3d775a
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoServerMain.dfm
@@ -0,0 +1,1060 @@
+object MegaDemoServerMainForm: TMegaDemoServerMainForm
+ Left = 542
+ Top = 230
+ BorderStyle = bsDialog
+ Caption = 'RemObjects SDK - Mega Demo Server'
+ ClientHeight = 450
+ ClientWidth = 744
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ PixelsPerInch = 96
+ TextHeight = 13
+ object RoPoweredByRemObjectsButton1: TROPoweredByRemObjectsButton
+ Left = 496
+ Top = 397
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ end
+ object Memo: TMemo
+ Left = 460
+ Top = 12
+ Width = 279
+ Height = 380
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ ScrollBars = ssVertical
+ TabOrder = 6
+ end
+ object cbUseCompression: TCheckBox
+ Left = 10
+ Top = 427
+ Width = 155
+ Height = 17
+ Caption = '&Compress Binary messages'
+ Checked = True
+ State = cbChecked
+ TabOrder = 3
+ OnClick = cbUseCompressionClick
+ end
+ object gbHTTP: TGroupBox
+ Left = 7
+ Top = 7
+ Width = 450
+ Height = 90
+ Caption = ' HTTP Server '
+ TabOrder = 0
+ object Label1: TLabel
+ Left = 8
+ Top = 24
+ Width = 24
+ Height = 13
+ Caption = '&Port:'
+ FocusControl = seHTTPPort
+ end
+ object Label5: TLabel
+ Left = 8
+ Top = 68
+ Width = 397
+ Height = 13
+ Caption =
+ 'Message: The HTTP Server can support multiple message formats at' +
+ ' the same time'
+ end
+ object Label13: TLabel
+ Left = 99
+ Top = 24
+ Width = 62
+ Height = 13
+ Alignment = taRightJustify
+ AutoSize = False
+ Caption = 'Component:'
+ end
+ object seHTTPPort: TSpinEdit
+ Left = 36
+ Top = 21
+ Width = 53
+ Height = 22
+ MaxValue = 0
+ MinValue = 0
+ TabOrder = 0
+ Value = 8099
+ end
+ object bActivateHTTP: TBitBtn
+ Left = 357
+ Top = 14
+ Width = 83
+ Height = 25
+ Caption = '&Activate'
+ TabOrder = 3
+ OnClick = bActivateHTTPClick
+ Glyph.Data = {
+ 36030000424D3603000000000000360000002800000010000000100000000100
+ 18000000000000030000120B0000120B00000000000000000000FF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FF811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF811E00
+ 811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FF811E00811E00811E00FF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FF811E0095440F811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF811E00A7632F811E0081
+ 1E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FF811E00BF8B62CCA17E811E00811E00FF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF811E00D8
+ B69CE6D1BFE7D3C4811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FF811E00F0E2D9FCF7F2FAF0E6811E00811E
+ 00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF81
+ 1E00D8AF96F4E2CFF0D7BDD8A784811E00811E00FF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FF811E00F3DECAEFD4B8EBC9A7DAA67D811E00FF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF81
+ 1E00E7BB92E3B081E0A672D5925A811E00FF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF811E00DA995ED78F50D38441CF7B
+ 35811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FF811E00811E00811E00811E00811E00811E00FF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
+ end
+ object bDeactivateHTTP: TBitBtn
+ Left = 357
+ Top = 14
+ Width = 83
+ Height = 25
+ Caption = 'Deactivate'
+ TabOrder = 4
+ Visible = False
+ OnClick = bDeactivateHTTPClick
+ Glyph.Data = {
+ 36060000424D3606000000000000360000002800000020000000100000000100
+ 18000000000000060000C40E0000C40E00000000000000000000FF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FF00009A00009AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF00009A0000
+ 9AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6B6B6B6BFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FF6B6B6B6B6B6BFF00FFFF00FFFF00FFFF00FFFF00FF
+ 00009A174AFD103BF400009AFF00FFFF00FFFF00FFFF00FF00009A002CF80030
+ FC00009AFF00FFFF00FFFF00FFFF00FF6B6B6BA8A8A8A0A0A06B6B6BFF00FFFF
+ 00FFFF00FFFF00FF6B6B6B9A9A9A9C9C9C6B6B6BFF00FFFF00FFFF00FFFF00FF
+ 00009A1A47F81A4CFF123BF100009AFF00FFFF00FF00009A012DF60132FF002A
+ F300009AFF00FFFF00FFFF00FFFF00FF6B6B6BA7A7A7AAAAAA9F9F9F6B6B6BFF
+ 00FFFF00FF6B6B6B9999999E9E9E9797976B6B6BFF00FFFF00FFFF00FFFF00FF
+ FF00FF00009A1C47F61B4DFF143EF400009A00009A002DF80134FF032BF20000
+ 9AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BA7A7A7ABABABA2A2A26B
+ 6B6B6B6B6B9A9A9A9E9E9E9898986B6B6BFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FF00009A1D48F61D50FF103DFB0431FE0132FF002CF600009AFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BA7A7A7ACACACA3
+ A3A39F9F9F9E9E9E9999996B6B6BFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FF00009A1A48F91342FF0C3CFF0733F600009AFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BA7A7A7A7
+ A7A7A3A3A39C9C9C6B6B6BFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FF00009A214EFC1D4BFF1847FF1743F600009AFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BACACACAC
+ ACACA9A9A9A4A4A46B6B6BFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FF00009A2E5BF92C5FFF224DF8204BF82355FF1B46F600009AFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BB1B1B1B3B3B3AB
+ ABABAAAAAAAFAFAFA6A6A66B6B6BFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FF00009A3664FA386BFF2D59F400009A00009A224CF42558FF1D49F60000
+ 9AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BB6B6B6B9B9B9AEAEAE6B
+ 6B6B6B6B6BA9A9A9B0B0B0A7A7A76B6B6BFF00FFFF00FFFF00FFFF00FFFF00FF
+ 00009A4071FA4274FF325DF100009AFF00FFFF00FF00009A224DF1275AFF204C
+ F800009AFF00FFFF00FFFF00FFFF00FF6B6B6BBBBBBBBEBEBEAFAFAF6B6B6BFF
+ 00FFFF00FF6B6B6BA7A7A7B1B1B1AAAAAA6B6B6BFF00FFFF00FFFF00FFFF00FF
+ 00009A497AFC3B66F300009AFF00FFFF00FFFF00FFFF00FF00009A2550F42655
+ FA00009AFF00FFFF00FFFF00FFFF00FF6B6B6BC0C0C0B5B5B56B6B6BFF00FFFF
+ 00FFFF00FFFF00FF6B6B6BAAAAAAAEAEAE6B6B6BFF00FFFF00FFFF00FFFF00FF
+ FF00FF00009A00009AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF00009A0000
+ 9AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6B6B6B6BFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FF6B6B6B6B6B6BFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
+ NumGlyphs = 2
+ end
+ object Panel2: TPanel
+ Left = 168
+ Top = 23
+ Width = 129
+ Height = 17
+ BevelOuter = bvNone
+ TabOrder = 1
+ object rbBpdxHttp: TRadioButton
+ Left = 0
+ Top = 0
+ Width = 65
+ Height = 17
+ Caption = 'DXSock'
+ TabOrder = 0
+ end
+ object RbIndyHttp: TRadioButton
+ Left = 68
+ Top = 0
+ Width = 41
+ Height = 17
+ Caption = 'Indy'
+ Checked = True
+ TabOrder = 1
+ TabStop = True
+ end
+ end
+ object cb_SupportKeepAlive: TCheckBox
+ Left = 104
+ Top = 41
+ Width = 169
+ Height = 17
+ Caption = 'Support HTTP 1.1 KeepAlive'
+ Checked = True
+ State = cbChecked
+ TabOrder = 2
+ OnClick = cb_SupportKeepAliveClick
+ end
+ end
+ object gbTCP: TGroupBox
+ Left = 7
+ Top = 175
+ Width = 450
+ Height = 80
+ Caption = ' TCP Server '
+ TabOrder = 1
+ object Label3: TLabel
+ Left = 8
+ Top = 24
+ Width = 24
+ Height = 13
+ Caption = '&Port:'
+ FocusControl = seHTTPPort
+ end
+ object Label6: TLabel
+ Left = 8
+ Top = 52
+ Width = 46
+ Height = 13
+ Caption = 'Message:'
+ end
+ object Label8: TLabel
+ Left = 99
+ Top = 24
+ Width = 62
+ Height = 13
+ Alignment = taRightJustify
+ AutoSize = False
+ Caption = 'Component:'
+ end
+ object seTCPPort: TSpinEdit
+ Left = 36
+ Top = 22
+ Width = 53
+ Height = 22
+ MaxValue = 0
+ MinValue = 0
+ TabOrder = 0
+ Value = 8090
+ end
+ object bActivateTCP: TBitBtn
+ Left = 357
+ Top = 14
+ Width = 83
+ Height = 25
+ Caption = '&Activate'
+ TabOrder = 4
+ OnClick = bActivateTCPClick
+ Glyph.Data = {
+ 36030000424D3603000000000000360000002800000010000000100000000100
+ 18000000000000030000120B0000120B00000000000000000000FF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FF811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF811E00
+ 811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FF811E00811E00811E00FF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FF811E0095440F811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF811E00A7632F811E0081
+ 1E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FF811E00BF8B62CCA17E811E00811E00FF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF811E00D8
+ B69CE6D1BFE7D3C4811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FF811E00F0E2D9FCF7F2FAF0E6811E00811E
+ 00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF81
+ 1E00D8AF96F4E2CFF0D7BDD8A784811E00811E00FF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FF811E00F3DECAEFD4B8EBC9A7DAA67D811E00FF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF81
+ 1E00E7BB92E3B081E0A672D5925A811E00FF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF811E00DA995ED78F50D38441CF7B
+ 35811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FF811E00811E00811E00811E00811E00811E00FF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
+ end
+ object cbTCPMsg: TComboBox
+ Left = 62
+ Top = 49
+ Width = 145
+ Height = 21
+ Style = csDropDownList
+ ItemHeight = 13
+ TabOrder = 2
+ OnChange = cbTCPMsgChange
+ end
+ object bDeactivateTCP: TBitBtn
+ Left = 357
+ Top = 14
+ Width = 83
+ Height = 25
+ Caption = 'Deactivate'
+ TabOrder = 5
+ Visible = False
+ OnClick = bDeactivateTCPClick
+ Glyph.Data = {
+ 36060000424D3606000000000000360000002800000020000000100000000100
+ 18000000000000060000C40E0000C40E00000000000000000000FF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FF00009A00009AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF00009A0000
+ 9AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6B6B6B6BFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FF6B6B6B6B6B6BFF00FFFF00FFFF00FFFF00FFFF00FF
+ 00009A174AFD103BF400009AFF00FFFF00FFFF00FFFF00FF00009A002CF80030
+ FC00009AFF00FFFF00FFFF00FFFF00FF6B6B6BA8A8A8A0A0A06B6B6BFF00FFFF
+ 00FFFF00FFFF00FF6B6B6B9A9A9A9C9C9C6B6B6BFF00FFFF00FFFF00FFFF00FF
+ 00009A1A47F81A4CFF123BF100009AFF00FFFF00FF00009A012DF60132FF002A
+ F300009AFF00FFFF00FFFF00FFFF00FF6B6B6BA7A7A7AAAAAA9F9F9F6B6B6BFF
+ 00FFFF00FF6B6B6B9999999E9E9E9797976B6B6BFF00FFFF00FFFF00FFFF00FF
+ FF00FF00009A1C47F61B4DFF143EF400009A00009A002DF80134FF032BF20000
+ 9AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BA7A7A7ABABABA2A2A26B
+ 6B6B6B6B6B9A9A9A9E9E9E9898986B6B6BFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FF00009A1D48F61D50FF103DFB0431FE0132FF002CF600009AFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BA7A7A7ACACACA3
+ A3A39F9F9F9E9E9E9999996B6B6BFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FF00009A1A48F91342FF0C3CFF0733F600009AFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BA7A7A7A7
+ A7A7A3A3A39C9C9C6B6B6BFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FF00009A214EFC1D4BFF1847FF1743F600009AFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BACACACAC
+ ACACA9A9A9A4A4A46B6B6BFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FF00009A2E5BF92C5FFF224DF8204BF82355FF1B46F600009AFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BB1B1B1B3B3B3AB
+ ABABAAAAAAAFAFAFA6A6A66B6B6BFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FF00009A3664FA386BFF2D59F400009A00009A224CF42558FF1D49F60000
+ 9AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BB6B6B6B9B9B9AEAEAE6B
+ 6B6B6B6B6BA9A9A9B0B0B0A7A7A76B6B6BFF00FFFF00FFFF00FFFF00FFFF00FF
+ 00009A4071FA4274FF325DF100009AFF00FFFF00FF00009A224DF1275AFF204C
+ F800009AFF00FFFF00FFFF00FFFF00FF6B6B6BBBBBBBBEBEBEAFAFAF6B6B6BFF
+ 00FFFF00FF6B6B6BA7A7A7B1B1B1AAAAAA6B6B6BFF00FFFF00FFFF00FFFF00FF
+ 00009A497AFC3B66F300009AFF00FFFF00FFFF00FFFF00FF00009A2550F42655
+ FA00009AFF00FFFF00FFFF00FFFF00FF6B6B6BC0C0C0B5B5B56B6B6BFF00FFFF
+ 00FFFF00FFFF00FF6B6B6BAAAAAAAEAEAE6B6B6BFF00FFFF00FFFF00FFFF00FF
+ FF00FF00009A00009AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF00009A0000
+ 9AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6B6B6B6BFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FF6B6B6B6B6B6BFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
+ NumGlyphs = 2
+ end
+ object Panel1: TPanel
+ Left = 168
+ Top = 23
+ Width = 129
+ Height = 17
+ BevelOuter = bvNone
+ TabOrder = 1
+ object rbBpdxTcp: TRadioButton
+ Left = 0
+ Top = 0
+ Width = 65
+ Height = 17
+ Caption = 'DXSock'
+ TabOrder = 0
+ end
+ object RbIndyTcp: TRadioButton
+ Left = 68
+ Top = 0
+ Width = 41
+ Height = 17
+ Caption = 'Indy'
+ Checked = True
+ TabOrder = 1
+ TabStop = True
+ end
+ end
+ object cbDisableNagle: TCheckBox
+ Left = 240
+ Top = 51
+ Width = 161
+ Height = 17
+ Caption = 'Disable &Nagle for Indy Server'
+ TabOrder = 3
+ OnClick = cbDisableNagleClick
+ end
+ end
+ object gbWinMsg: TGroupBox
+ Left = 7
+ Top = 343
+ Width = 450
+ Height = 81
+ Caption = ' WinMessage Server '
+ TabOrder = 2
+ object Label4: TLabel
+ Left = 10
+ Top = 24
+ Width = 50
+ Height = 13
+ Caption = 'Server ID:'
+ end
+ object Label7: TLabel
+ Left = 10
+ Top = 52
+ Width = 46
+ Height = 13
+ Caption = 'Message:'
+ end
+ object eServerID: TEdit
+ Left = 64
+ Top = 21
+ Width = 281
+ Height = 21
+ TabOrder = 0
+ Text = 'eServerID'
+ end
+ object bActivateWinMsg: TBitBtn
+ Left = 357
+ Top = 14
+ Width = 83
+ Height = 25
+ Caption = '&Activate'
+ TabOrder = 2
+ OnClick = bActivateWinMsgClick
+ Glyph.Data = {
+ 36030000424D3603000000000000360000002800000010000000100000000100
+ 18000000000000030000120B0000120B00000000000000000000FF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FF811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF811E00
+ 811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FF811E00811E00811E00FF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FF811E0095440F811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF811E00A7632F811E0081
+ 1E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FF811E00BF8B62CCA17E811E00811E00FF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF811E00D8
+ B69CE6D1BFE7D3C4811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FF811E00F0E2D9FCF7F2FAF0E6811E00811E
+ 00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF81
+ 1E00D8AF96F4E2CFF0D7BDD8A784811E00811E00FF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FF811E00F3DECAEFD4B8EBC9A7DAA67D811E00FF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF81
+ 1E00E7BB92E3B081E0A672D5925A811E00FF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF811E00DA995ED78F50D38441CF7B
+ 35811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FF811E00811E00811E00811E00811E00811E00FF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
+ end
+ object cbWinMsgMsg: TComboBox
+ Left = 64
+ Top = 49
+ Width = 145
+ Height = 21
+ Style = csDropDownList
+ ItemHeight = 13
+ TabOrder = 1
+ OnChange = cbWinMsgMsgChange
+ end
+ object bDeactivateWinMsg: TBitBtn
+ Left = 357
+ Top = 14
+ Width = 83
+ Height = 25
+ Caption = 'Deactivate'
+ TabOrder = 3
+ Visible = False
+ OnClick = bDeactivateWinMsgClick
+ Glyph.Data = {
+ 36060000424D3606000000000000360000002800000020000000100000000100
+ 18000000000000060000C40E0000C40E00000000000000000000FF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FF00009A00009AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF00009A0000
+ 9AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6B6B6B6BFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FF6B6B6B6B6B6BFF00FFFF00FFFF00FFFF00FFFF00FF
+ 00009A174AFD103BF400009AFF00FFFF00FFFF00FFFF00FF00009A002CF80030
+ FC00009AFF00FFFF00FFFF00FFFF00FF6B6B6BA8A8A8A0A0A06B6B6BFF00FFFF
+ 00FFFF00FFFF00FF6B6B6B9A9A9A9C9C9C6B6B6BFF00FFFF00FFFF00FFFF00FF
+ 00009A1A47F81A4CFF123BF100009AFF00FFFF00FF00009A012DF60132FF002A
+ F300009AFF00FFFF00FFFF00FFFF00FF6B6B6BA7A7A7AAAAAA9F9F9F6B6B6BFF
+ 00FFFF00FF6B6B6B9999999E9E9E9797976B6B6BFF00FFFF00FFFF00FFFF00FF
+ FF00FF00009A1C47F61B4DFF143EF400009A00009A002DF80134FF032BF20000
+ 9AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BA7A7A7ABABABA2A2A26B
+ 6B6B6B6B6B9A9A9A9E9E9E9898986B6B6BFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FF00009A1D48F61D50FF103DFB0431FE0132FF002CF600009AFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BA7A7A7ACACACA3
+ A3A39F9F9F9E9E9E9999996B6B6BFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FF00009A1A48F91342FF0C3CFF0733F600009AFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BA7A7A7A7
+ A7A7A3A3A39C9C9C6B6B6BFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FF00009A214EFC1D4BFF1847FF1743F600009AFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BACACACAC
+ ACACA9A9A9A4A4A46B6B6BFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FF00009A2E5BF92C5FFF224DF8204BF82355FF1B46F600009AFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BB1B1B1B3B3B3AB
+ ABABAAAAAAAFAFAFA6A6A66B6B6BFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FF00009A3664FA386BFF2D59F400009A00009A224CF42558FF1D49F60000
+ 9AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BB6B6B6B9B9B9AEAEAE6B
+ 6B6B6B6B6BA9A9A9B0B0B0A7A7A76B6B6BFF00FFFF00FFFF00FFFF00FFFF00FF
+ 00009A4071FA4274FF325DF100009AFF00FFFF00FF00009A224DF1275AFF204C
+ F800009AFF00FFFF00FFFF00FFFF00FF6B6B6BBBBBBBBEBEBEAFAFAF6B6B6BFF
+ 00FFFF00FF6B6B6BA7A7A7B1B1B1AAAAAA6B6B6BFF00FFFF00FFFF00FFFF00FF
+ 00009A497AFC3B66F300009AFF00FFFF00FFFF00FFFF00FF00009A2550F42655
+ FA00009AFF00FFFF00FFFF00FFFF00FF6B6B6BC0C0C0B5B5B56B6B6BFF00FFFF
+ 00FFFF00FFFF00FF6B6B6BAAAAAAAEAEAE6B6B6BFF00FFFF00FFFF00FFFF00FF
+ FF00FF00009A00009AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF00009A0000
+ 9AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6B6B6B6BFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FF6B6B6B6B6B6BFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
+ NumGlyphs = 2
+ end
+ end
+ object cb_Encrypt: TCheckBox
+ Left = 176
+ Top = 427
+ Width = 129
+ Height = 17
+ Caption = 'Encrypt communication'
+ TabOrder = 4
+ OnClick = cb_EncryptClick
+ end
+ object cbVerbose: TCheckBox
+ Left = 320
+ Top = 427
+ Width = 97
+ Height = 17
+ Caption = 'Verbose'
+ Checked = True
+ State = cbChecked
+ TabOrder = 5
+ end
+ object ErrorMemo: TMemo
+ Left = 460
+ Top = 12
+ Width = 279
+ Height = 380
+ Alignment = taCenter
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -25
+ Font.Name = 'Tahoma'
+ Font.Style = [fsBold]
+ Lines.Strings = (
+ ''
+ ''
+ ''
+ ''
+ ''
+ 'Please activate at '
+ 'least one server!')
+ ParentFont = False
+ TabOrder = 7
+ end
+ object gbSuperHTTP: TGroupBox
+ Left = 7
+ Top = 101
+ Width = 450
+ Height = 70
+ Caption = ' Super HTTP Server '
+ TabOrder = 8
+ object Label2: TLabel
+ Left = 8
+ Top = 24
+ Width = 24
+ Height = 13
+ Caption = '&Port:'
+ FocusControl = seSuperHTTPPort
+ end
+ object Label9: TLabel
+ Left = 8
+ Top = 47
+ Width = 428
+ Height = 13
+ Caption =
+ 'Message: The Super HTTP Server can support multiple message form' +
+ 'ats at the same time'
+ end
+ object Label10: TLabel
+ Left = 99
+ Top = 24
+ Width = 62
+ Height = 13
+ Alignment = taRightJustify
+ AutoSize = False
+ Caption = 'Component:'
+ end
+ object seSuperHTTPPort: TSpinEdit
+ Left = 36
+ Top = 21
+ Width = 53
+ Height = 22
+ MaxValue = 0
+ MinValue = 0
+ TabOrder = 0
+ Value = 8098
+ end
+ object bActivateSuperHTTP: TBitBtn
+ Left = 357
+ Top = 14
+ Width = 83
+ Height = 25
+ Caption = '&Activate'
+ TabOrder = 2
+ OnClick = bActivateSuperHTTPClick
+ Glyph.Data = {
+ 36030000424D3603000000000000360000002800000010000000100000000100
+ 18000000000000030000120B0000120B00000000000000000000FF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FF811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF811E00
+ 811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FF811E00811E00811E00FF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FF811E0095440F811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF811E00A7632F811E0081
+ 1E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FF811E00BF8B62CCA17E811E00811E00FF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF811E00D8
+ B69CE6D1BFE7D3C4811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FF811E00F0E2D9FCF7F2FAF0E6811E00811E
+ 00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF81
+ 1E00D8AF96F4E2CFF0D7BDD8A784811E00811E00FF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FF811E00F3DECAEFD4B8EBC9A7DAA67D811E00FF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF81
+ 1E00E7BB92E3B081E0A672D5925A811E00FF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF811E00DA995ED78F50D38441CF7B
+ 35811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FF811E00811E00811E00811E00811E00811E00FF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
+ end
+ object bDeactivateSuperHTTP: TBitBtn
+ Left = 357
+ Top = 14
+ Width = 83
+ Height = 25
+ Caption = 'Deactivate'
+ TabOrder = 3
+ Visible = False
+ OnClick = bDeactivateSuperHTTPClick
+ Glyph.Data = {
+ 36060000424D3606000000000000360000002800000020000000100000000100
+ 18000000000000060000C40E0000C40E00000000000000000000FF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FF00009A00009AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF00009A0000
+ 9AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6B6B6B6BFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FF6B6B6B6B6B6BFF00FFFF00FFFF00FFFF00FFFF00FF
+ 00009A174AFD103BF400009AFF00FFFF00FFFF00FFFF00FF00009A002CF80030
+ FC00009AFF00FFFF00FFFF00FFFF00FF6B6B6BA8A8A8A0A0A06B6B6BFF00FFFF
+ 00FFFF00FFFF00FF6B6B6B9A9A9A9C9C9C6B6B6BFF00FFFF00FFFF00FFFF00FF
+ 00009A1A47F81A4CFF123BF100009AFF00FFFF00FF00009A012DF60132FF002A
+ F300009AFF00FFFF00FFFF00FFFF00FF6B6B6BA7A7A7AAAAAA9F9F9F6B6B6BFF
+ 00FFFF00FF6B6B6B9999999E9E9E9797976B6B6BFF00FFFF00FFFF00FFFF00FF
+ FF00FF00009A1C47F61B4DFF143EF400009A00009A002DF80134FF032BF20000
+ 9AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BA7A7A7ABABABA2A2A26B
+ 6B6B6B6B6B9A9A9A9E9E9E9898986B6B6BFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FF00009A1D48F61D50FF103DFB0431FE0132FF002CF600009AFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BA7A7A7ACACACA3
+ A3A39F9F9F9E9E9E9999996B6B6BFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FF00009A1A48F91342FF0C3CFF0733F600009AFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BA7A7A7A7
+ A7A7A3A3A39C9C9C6B6B6BFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FF00009A214EFC1D4BFF1847FF1743F600009AFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BACACACAC
+ ACACA9A9A9A4A4A46B6B6BFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FF00009A2E5BF92C5FFF224DF8204BF82355FF1B46F600009AFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BB1B1B1B3B3B3AB
+ ABABAAAAAAAFAFAFA6A6A66B6B6BFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FF00009A3664FA386BFF2D59F400009A00009A224CF42558FF1D49F60000
+ 9AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BB6B6B6B9B9B9AEAEAE6B
+ 6B6B6B6B6BA9A9A9B0B0B0A7A7A76B6B6BFF00FFFF00FFFF00FFFF00FFFF00FF
+ 00009A4071FA4274FF325DF100009AFF00FFFF00FF00009A224DF1275AFF204C
+ F800009AFF00FFFF00FFFF00FFFF00FF6B6B6BBBBBBBBEBEBEAFAFAF6B6B6BFF
+ 00FFFF00FF6B6B6BA7A7A7B1B1B1AAAAAA6B6B6BFF00FFFF00FFFF00FFFF00FF
+ 00009A497AFC3B66F300009AFF00FFFF00FFFF00FFFF00FF00009A2550F42655
+ FA00009AFF00FFFF00FFFF00FFFF00FF6B6B6BC0C0C0B5B5B56B6B6BFF00FFFF
+ 00FFFF00FFFF00FF6B6B6BAAAAAAAEAEAE6B6B6BFF00FFFF00FFFF00FFFF00FF
+ FF00FF00009A00009AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF00009A0000
+ 9AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6B6B6B6BFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FF6B6B6B6B6B6BFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
+ NumGlyphs = 2
+ end
+ object Panel3: TPanel
+ Left = 168
+ Top = 23
+ Width = 129
+ Height = 17
+ BevelOuter = bvNone
+ TabOrder = 1
+ object rbSynapseSuperHttp: TRadioButton
+ Left = 0
+ Top = 0
+ Width = 65
+ Height = 17
+ Caption = 'Synapse'
+ Checked = True
+ TabOrder = 0
+ TabStop = True
+ end
+ end
+ end
+ object gbSuperTcp: TGroupBox
+ Left = 7
+ Top = 259
+ Width = 450
+ Height = 80
+ Caption = ' Super TCP Server '
+ TabOrder = 9
+ object Label11: TLabel
+ Left = 8
+ Top = 24
+ Width = 24
+ Height = 13
+ Caption = '&Port:'
+ FocusControl = seSuperHTTPPort
+ end
+ object Label12: TLabel
+ Left = 8
+ Top = 52
+ Width = 46
+ Height = 13
+ Caption = 'Message:'
+ end
+ object Label14: TLabel
+ Left = 99
+ Top = 24
+ Width = 62
+ Height = 13
+ Alignment = taRightJustify
+ AutoSize = False
+ Caption = 'Component:'
+ end
+ object seSuperTCPPort: TSpinEdit
+ Left = 36
+ Top = 22
+ Width = 53
+ Height = 22
+ MaxValue = 0
+ MinValue = 0
+ TabOrder = 0
+ Value = 8095
+ end
+ object bActivateSuperTcp: TBitBtn
+ Left = 357
+ Top = 14
+ Width = 83
+ Height = 25
+ Caption = '&Activate'
+ TabOrder = 3
+ OnClick = bActivateSuperTCPClick
+ Glyph.Data = {
+ 36030000424D3603000000000000360000002800000010000000100000000100
+ 18000000000000030000120B0000120B00000000000000000000FF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FF811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF811E00
+ 811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FF811E00811E00811E00FF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FF811E0095440F811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF811E00A7632F811E0081
+ 1E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FF811E00BF8B62CCA17E811E00811E00FF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF811E00D8
+ B69CE6D1BFE7D3C4811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FF811E00F0E2D9FCF7F2FAF0E6811E00811E
+ 00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF81
+ 1E00D8AF96F4E2CFF0D7BDD8A784811E00811E00FF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FF811E00F3DECAEFD4B8EBC9A7DAA67D811E00FF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF81
+ 1E00E7BB92E3B081E0A672D5925A811E00FF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF811E00DA995ED78F50D38441CF7B
+ 35811E00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FF811E00811E00811E00811E00811E00811E00FF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
+ end
+ object cbSuperTCPMsg: TComboBox
+ Left = 62
+ Top = 49
+ Width = 145
+ Height = 21
+ Style = csDropDownList
+ ItemHeight = 13
+ TabOrder = 2
+ OnChange = cbSuperTCPMsgChange
+ end
+ object bDeactivateSuperTCP: TBitBtn
+ Left = 357
+ Top = 14
+ Width = 83
+ Height = 25
+ Caption = 'Deactivate'
+ TabOrder = 4
+ Visible = False
+ OnClick = bDeactivateSuperTCPClick
+ Glyph.Data = {
+ 36060000424D3606000000000000360000002800000020000000100000000100
+ 18000000000000060000C40E0000C40E00000000000000000000FF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FF00009A00009AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF00009A0000
+ 9AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6B6B6B6BFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FF6B6B6B6B6B6BFF00FFFF00FFFF00FFFF00FFFF00FF
+ 00009A174AFD103BF400009AFF00FFFF00FFFF00FFFF00FF00009A002CF80030
+ FC00009AFF00FFFF00FFFF00FFFF00FF6B6B6BA8A8A8A0A0A06B6B6BFF00FFFF
+ 00FFFF00FFFF00FF6B6B6B9A9A9A9C9C9C6B6B6BFF00FFFF00FFFF00FFFF00FF
+ 00009A1A47F81A4CFF123BF100009AFF00FFFF00FF00009A012DF60132FF002A
+ F300009AFF00FFFF00FFFF00FFFF00FF6B6B6BA7A7A7AAAAAA9F9F9F6B6B6BFF
+ 00FFFF00FF6B6B6B9999999E9E9E9797976B6B6BFF00FFFF00FFFF00FFFF00FF
+ FF00FF00009A1C47F61B4DFF143EF400009A00009A002DF80134FF032BF20000
+ 9AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BA7A7A7ABABABA2A2A26B
+ 6B6B6B6B6B9A9A9A9E9E9E9898986B6B6BFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FF00009A1D48F61D50FF103DFB0431FE0132FF002CF600009AFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BA7A7A7ACACACA3
+ A3A39F9F9F9E9E9E9999996B6B6BFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FF00009A1A48F91342FF0C3CFF0733F600009AFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BA7A7A7A7
+ A7A7A3A3A39C9C9C6B6B6BFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FF00009A214EFC1D4BFF1847FF1743F600009AFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BACACACAC
+ ACACA9A9A9A4A4A46B6B6BFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FF00009A2E5BF92C5FFF224DF8204BF82355FF1B46F600009AFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BB1B1B1B3B3B3AB
+ ABABAAAAAAAFAFAFA6A6A66B6B6BFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FF00009A3664FA386BFF2D59F400009A00009A224CF42558FF1D49F60000
+ 9AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6BB6B6B6B9B9B9AEAEAE6B
+ 6B6B6B6B6BA9A9A9B0B0B0A7A7A76B6B6BFF00FFFF00FFFF00FFFF00FFFF00FF
+ 00009A4071FA4274FF325DF100009AFF00FFFF00FF00009A224DF1275AFF204C
+ F800009AFF00FFFF00FFFF00FFFF00FF6B6B6BBBBBBBBEBEBEAFAFAF6B6B6BFF
+ 00FFFF00FF6B6B6BA7A7A7B1B1B1AAAAAA6B6B6BFF00FFFF00FFFF00FFFF00FF
+ 00009A497AFC3B66F300009AFF00FFFF00FFFF00FFFF00FF00009A2550F42655
+ FA00009AFF00FFFF00FFFF00FFFF00FF6B6B6BC0C0C0B5B5B56B6B6BFF00FFFF
+ 00FFFF00FFFF00FF6B6B6BAAAAAAAEAEAE6B6B6BFF00FFFF00FFFF00FFFF00FF
+ FF00FF00009A00009AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF00009A0000
+ 9AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6B6B6B6B6B6BFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FF6B6B6B6B6B6BFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
+ FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
+ FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
+ 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
+ NumGlyphs = 2
+ end
+ object Panel4: TPanel
+ Left = 168
+ Top = 23
+ Width = 129
+ Height = 17
+ BevelOuter = bvNone
+ TabOrder = 1
+ object rbSynapseSuperTcp: TRadioButton
+ Left = 0
+ Top = 0
+ Width = 65
+ Height = 17
+ Caption = 'Synapse'
+ TabOrder = 0
+ end
+ object rbIndySuperTCP: TRadioButton
+ Left = 68
+ Top = 0
+ Width = 41
+ Height = 17
+ Caption = 'Indy'
+ Checked = True
+ TabOrder = 1
+ TabStop = True
+ end
+ end
+ end
+ object ROBINMessage: TROBinMessage
+ OnInitializeMessage = MessageInitializeMessage
+ Left = 563
+ Top = 25
+ end
+ object WinMessageServer: TROWinMessageServer
+ Encryption.EncryptionSendKey = 'CDB4E624C47EF40C26DCE65F70E6F3ABC03B6AD4FC0B064985F180A46895F064'
+ Encryption.EncryptionRecvKey = 'CDB4E624C47EF40C26DCE65F70E6F3ABC03B6AD4FC0B064985F180A46895F064'
+ Dispatchers = <
+ item
+ Name = 'ROBINMessage'
+ Message = ROBINMessage
+ Enabled = True
+ end>
+ OnAfterServerActivate = WinMessageServerAfterServerActivate
+ OnAfterServerDeactivate = WinMessageServerAfterServerDeactivate
+ ServerID = '{E46A5995-2260-44EA-AC60-121ADB4CC2D0}'
+ Left = 608
+ Top = 352
+ end
+ object ROSOAPMessage: TROSOAPMessage
+ OnInitializeMessage = MessageInitializeMessage
+ SerializationOptions = [xsoWriteMultiRefArray, xsoWriteMultiRefObject]
+ Left = 592
+ Top = 25
+ end
+ object BpdxTcpServer: TROBPDXTCPServer
+ Encryption.EncryptionSendKey = 'CDB4E624C47EF40C26DCE65F70E6F3ABC03B6AD4FC0B064985F180A46895F064'
+ Encryption.EncryptionRecvKey = 'CDB4E624C47EF40C26DCE65F70E6F3ABC03B6AD4FC0B064985F180A46895F064'
+ Dispatchers = <
+ item
+ Name = 'ROBINMessage'
+ Message = ROBINMessage
+ Enabled = True
+ end>
+ OnAfterServerActivate = TcpServerAfterServerActivate
+ OnAfterServerDeactivate = TcpServerAfterServerDeactivate
+ BPDXServer.ReleaseDate = '2002-09-01'
+ BPDXServer.ListenerThreadPriority = tpIdle
+ BPDXServer.SpawnedThreadPriority = tpIdle
+ BPDXServer.Suspend = False
+ BPDXServer.UseSSL = False
+ BPDXServer.UseThreadPool = True
+ BPDXServer.ServerPort = 8090
+ BPDXServer.ProtocolToBind = wpTCPOnly
+ BPDXServer.SocketOutputBufferSize = bsfNormal
+ BPDXServer.ServerType = stThreadBlocking
+ BPDXServer.ThreadCacheSize = 1000
+ Port = 8090
+ Left = 576
+ Top = 352
+ end
+ object BpdxHttpServer: TROBPDXHTTPServer
+ Encryption.EncryptionSendKey = 'CDB4E624C47EF40C26DCE65F70E6F3ABC03B6AD4FC0B064985F180A46895F064'
+ Encryption.EncryptionRecvKey = 'CDB4E624C47EF40C26DCE65F70E6F3ABC03B6AD4FC0B064985F180A46895F064'
+ Dispatchers = <
+ item
+ Name = 'ROBINMessage'
+ Message = ROBINMessage
+ Enabled = True
+ PathInfo = '/BIN'
+ end
+ item
+ Name = 'ROSOAPMessage'
+ Message = ROSOAPMessage
+ Enabled = True
+ PathInfo = '/SOAP'
+ end
+ item
+ Name = 'ROPostMessage'
+ Message = ROPostMessage
+ Enabled = True
+ PathInfo = '/POST'
+ end
+ item
+ Name = 'ROXmlRpcMessage'
+ Message = ROXmlRpcMessage
+ Enabled = True
+ PathInfo = '/XMLRPC'
+ end
+ item
+ Name = 'ROServerMultiMessage'
+ Message = ROServerMultiMessage
+ Enabled = True
+ PathInfo = '/'
+ end>
+ OnAfterServerActivate = HttpServerAfterServerActivate
+ OnAfterServerDeactivate = HttpServerAfterServerDeactivate
+ BPDXServer.ReleaseDate = '2002-09-01'
+ BPDXServer.ListenerThreadPriority = tpIdle
+ BPDXServer.SpawnedThreadPriority = tpIdle
+ BPDXServer.Suspend = False
+ BPDXServer.UseSSL = False
+ BPDXServer.UseThreadPool = True
+ BPDXServer.ServerPort = 8099
+ BPDXServer.ProtocolToBind = wpTCPOnly
+ BPDXServer.SocketOutputBufferSize = bsfNormal
+ BPDXServer.ServerType = stThreadBlocking
+ BPDXServer.ThreadCacheSize = 1000
+ BPDXServer.Timeout = 50000
+ BPDXServer.SupportKeepAlive = True
+ Port = 8099
+ SupportKeepAlive = True
+ Left = 544
+ Top = 352
+ end
+ object ROPostMessage: TROPostMessage
+ OnInitializeMessage = MessageInitializeMessage
+ Left = 535
+ Top = 25
+ end
+ object ROServerMultiMessage: TROServerMultiMessage
+ OnInitializeMessage = MessageInitializeMessage
+ SupportedMessages = <
+ item
+ Message = ROBINMessage
+ end
+ item
+ Message = ROSOAPMessage
+ end
+ item
+ Message = ROPostMessage
+ end
+ item
+ Message = ROXmlRpcMessage
+ end>
+ Left = 507
+ Top = 25
+ end
+ object ROXmlRpcMessage: TROXmlRpcMessage
+ OnInitializeMessage = MessageInitializeMessage
+ Left = 621
+ Top = 25
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoServerMain.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoServerMain.pas
new file mode 100644
index 0000000..67300a8
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoServerMain.pas
@@ -0,0 +1,649 @@
+unit MegaDemoServerMain;
+
+{ Activate this define if you are using the demo without having Indy installed. }
+{.$DEFINE NO_INDY}
+
+{ Activate this define if you are using the demo without having Synapse installed. }
+{.$DEFINE NO_Synapse}
+{$INCLUDE RemObjects.inc}
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ StdCtrls, Spin, Buttons, ExtCtrls, SyncObjs,
+
+{$IFNDEF NO_INDY}
+ IdBaseComponent, IdComponent,
+ IdTCPServer, IdHTTPServer, uROIndyTCPServer, uROIndyHTTPServer, uROSuperTCPServer,
+ {$IFDEF RemObjects_INDY10}IdContext,{$ENDIF}
+
+{$ENDIF NO_INDY}
+{$IFNDEF NO_Synapse}
+ uROIpSuperHttpServer,uROSynapseSuperTCPServer,
+{$ENDIF}
+ uROClient, uROBINMessage, uROClientIntf, uROServer,
+ uROBPDXHTTPServer, uROBPDXTCPServer, uROPoweredByRemObjectsButton,
+ uROSOAPMessage, uROWinMessageServer, uROEncryption,
+ uROPostMessage, uROServerMultiMessage, uROXmlRpcMessage;
+
+const
+ WM_LOG_MESSAGE = WM_APP + 1;
+
+type
+ TMegaDemoServerMainForm = class(TForm)
+ ROBINMessage: TROBinMessage;
+ Memo: TMemo;
+ cbUseCompression: TCheckBox;
+ WinMessageServer: TROWinMessageServer;
+ ROSOAPMessage: TROSOAPMessage;
+ gbHTTP: TGroupBox;
+ gbTCP: TGroupBox;
+ gbWinMsg: TGroupBox;
+ Label1: TLabel;
+ seHTTPPort: TSpinEdit;
+ seTCPPort: TSpinEdit;
+ Label4: TLabel;
+ eServerID: TEdit;
+ bActivateHTTP: TBitBtn;
+ bActivateTCP: TBitBtn;
+ bActivateWinMsg: TBitBtn;
+ cbWinMsgMsg: TComboBox;
+ Label3: TLabel;
+ Label6: TLabel;
+ cbTCPMsg: TComboBox;
+ Label7: TLabel;
+ BpdxTcpServer: TROBPDXTCPServer;
+ BpdxHttpServer: TROBPDXHTTPServer;
+ RoPoweredByRemObjectsButton1: TRoPoweredByRemObjectsButton;
+ Label5: TLabel;
+ bDeactivateWinMsg: TBitBtn;
+ bDeactivateTCP: TBitBtn;
+ bDeactivateHTTP: TBitBtn;
+ Label13: TLabel;
+ Panel2: TPanel;
+ rbBpdxHttp: TRadioButton;
+ RbIndyHttp: TRadioButton;
+ Panel1: TPanel;
+ rbBpdxTcp: TRadioButton;
+ RbIndyTcp: TRadioButton;
+ Label8: TLabel;
+ cb_Encrypt: TCheckBox;
+ cb_SupportKeepAlive: TCheckBox;
+ cbDisableNagle: TCheckBox;
+ cbVerbose: TCheckBox;
+ ROPostMessage: TROPostMessage;
+ ErrorMemo: TMemo;
+ ROServerMultiMessage: TROServerMultiMessage;
+ ROXmlRpcMessage: TROXmlRpcMessage;
+ gbSuperHTTP: TGroupBox;
+ Label2: TLabel;
+ Label9: TLabel;
+ Label10: TLabel;
+ seSuperHTTPPort: TSpinEdit;
+ bActivateSuperHTTP: TBitBtn;
+ bDeactivateSuperHTTP: TBitBtn;
+ Panel3: TPanel;
+ rbSynapseSuperHttp: TRadioButton;
+ gbSuperTcp: TGroupBox;
+ Label11: TLabel;
+ Label12: TLabel;
+ Label14: TLabel;
+ seSuperTCPPort: TSpinEdit;
+ bActivateSuperTcp: TBitBtn;
+ cbSuperTCPMsg: TComboBox;
+ bDeactivateSuperTCP: TBitBtn;
+ Panel4: TPanel;
+ rbSynapseSuperTcp: TRadioButton;
+ rbIndySuperTCP: TRadioButton;
+ procedure FormCreate(Sender: TObject);
+ procedure HttpServerAfterServerActivate(Sender: TObject);
+ procedure HttpServerAfterServerDeactivate(Sender: TObject);
+ procedure cbUseCompressionClick(Sender: TObject);
+ procedure bActivateHTTPClick(Sender: TObject);
+ procedure bActivateTCPClick(Sender: TObject);
+ procedure bActivateWinMsgClick(Sender: TObject);
+ procedure cbTCPMsgChange(Sender: TObject);
+ procedure cbWinMsgMsgChange(Sender: TObject);
+ procedure bDeactivateHTTPClick(Sender: TObject);
+ procedure bDeactivateTCPClick(Sender: TObject);
+ procedure bDeactivateWinMsgClick(Sender: TObject);
+ procedure TcpServerAfterServerActivate(Sender: TObject);
+ procedure TcpServerAfterServerDeactivate(Sender: TObject);
+ procedure WinMessageServerAfterServerDeactivate(Sender: TObject);
+ procedure WinMessageServerAfterServerActivate(Sender: TObject);
+ procedure cb_EncryptClick(Sender: TObject);
+ procedure cb_SupportKeepAliveClick(Sender: TObject);
+ procedure cbDisableNagleClick(Sender: TObject);
+ procedure MessageInitializeMessage(Sender: TROMessage;
+ const aTransport: IROTransport; const anInterfaceName,
+ aMessageName: String);
+ procedure cbSuperTCPMsgChange(Sender: TObject);
+ procedure bDeactivateSuperTCPClick(Sender: TObject);
+ procedure bActivateSuperTCPClick(Sender: TObject);
+ procedure SuperTcpServerAfterServerActivate(Sender: TObject);
+ procedure SuperTcpServerAfterServerDeactivate(Sender: TObject);
+ procedure SuperHttpServerAfterServerActivate(Sender: TObject);
+ procedure SuperHttpServerAfterServerDeactivate(Sender: TObject);
+ procedure bActivateSuperHTTPClick(Sender: TObject);
+ procedure bDeactivateSuperHTTPClick(Sender: TObject);
+ private
+ {$IFNDEF NO_INDY}
+ ROIndyHTTPServer : TROIndyHTTPServer;
+ ROIndyTCPServer : TROIndyTCPServer;
+ ROIndySuperTCPServer: TROSuperTcpServer;
+ {$ENDIF NO_INDY}
+ {$IFNDEF NO_Synapse}
+ ROSynapseSuperHTTPServer : TROIpSuperHttpServer;
+ ROSynapseSuperTCPServer : TROSynapseSuperTcpServer;
+ {$ENDIF NO_Synapse}
+
+ fCritical: TCriticalSection;
+
+ procedure ActivateGroupBox(iGroupBox: TGroupBox; iActivate: boolean);
+ procedure CheckStatus;
+ protected
+ procedure WMLog(var Message: TMessage); message WM_LOG_MESSAGE;
+
+ public
+ constructor Create(aOwner: TComponent); override;
+ destructor Destroy; override;
+
+ procedure Log(const someText: string);
+
+ end;
+
+var
+ MegaDemoServerMainForm: TMegaDemoServerMainForm;
+
+implementation
+
+uses MegaDemoLibrary_Intf;
+
+{$R *.DFM}
+
+procedure TMegaDemoServerMainForm.FormCreate(Sender: TObject);
+begin
+{$IFDEF NO_INDY}
+ rbIndyHttp.Enabled := false;
+ rbIndyTcp.Enabled := false;
+ rbIndySuperTCP.Enabled := false;
+ rbBpdxTcp.Enabled:=True;
+ rbBpdxHttp.Enabled:=True;
+{$ELSE}
+ ROIndyHTTPServer := TROIndyHTTPServer.Create(Self);
+ ROIndyHTTPServer.Dispatchers.Assign(BpdxHttpServer.Dispatchers);
+ ROIndyHTTPServer.OnAfterServerActivate := HttpServerAfterServerActivate;
+ ROIndyHTTPServer.OnAfterServerDeactivate := HttpServerAfterServerDeactivate;
+
+ ROIndyTCPServer := TROIndyTCPServer.Create(Self);
+ ROIndyTCPServer.Dispatchers.Assign(BpdxTcpServer.Dispatchers);
+ ROIndyTCPServer.OnAfterServerActivate := TcpServerAfterServerActivate;
+ ROIndyTCPServer.OnAfterServerDeactivate := TcpServerAfterServerDeactivate;
+
+ ROIndySuperTCPServer:= TROSuperTcpServer.Create(Self);
+ ROIndySuperTCPServer.Dispatchers.Assign(BpdxTcpServer.Dispatchers);
+ ROIndySuperTCPServer.OnAfterServerActivate := SuperTcpServerAfterServerActivate;
+ ROIndySuperTCPServer.OnAfterServerDeactivate := SuperTcpServerAfterServerDeactivate;
+{$ENDIF NO_INDY}
+
+{$IFDEF NO_Synapse}
+ rbSynapseSuperHttp.Enabled:=False;
+ rbSynapseSuperTcp.Enabled:=False;
+{$ELSE}
+ ROSynapseSuperHTTPServer := TROIpSuperHttpServer.Create(Self);
+ ROSynapseSuperHTTPServer.Dispatchers.Assign(BpdxHttpServer.Dispatchers);
+ ROSynapseSuperHTTPServer.OnAfterServerActivate := SuperHttpServerAfterServerActivate;
+ ROSynapseSuperHTTPServer.OnAfterServerDeactivate := SuperHttpServerAfterServerDeactivate;
+
+ ROSynapseSuperTCPServer := TROSynapseSuperTcpServer.Create(Self);
+ ROSynapseSuperTCPServer.Dispatchers.Assign(BpdxTcpServer.Dispatchers);
+ ROSynapseSuperTCPServer.OnAfterServerActivate := SuperTcpServerAfterServerActivate;
+ ROSynapseSuperTCPServer.OnAfterServerDeactivate := SuperTcpServerAfterServerDeactivate;
+{$ENDIF NO_Synapse}
+ cb_SupportKeepAliveClick(Sender);
+
+ // Misc
+ WinMessageServer.ServerID := LibraryUID;
+
+ eServerID.Text := WinMessageServer.ServerID;
+
+ cbTCPMsg.Items.Clear;
+ cbTCPMsg.Items.AddObject('Auto', ROServerMultiMessage);
+ cbTCPMsg.Items.AddObject('Bin', ROBINMessage);
+ cbTCPMsg.Items.AddObject('Soap', ROSOAPMessage);
+ cbTCPMsg.Items.AddObject('Post', ROPOSTMessage);
+ cbTCPMsg.Items.AddObject('XmlRpc', ROXmlRpcMessage);
+ cbTCPMsg.ItemIndex := 0;
+ cbTCPMsgChange(cbTCPMsg);
+
+ cbSuperTcpMsg.Items.AddStrings(cbTCPMsg.Items);
+ cbSuperTcpMsg.ItemIndex := 0;
+ cbSuperTCPMsgChange(cbSuperTcpMsg);
+
+
+ cbWinMsgMsg.Items.AddStrings(cbTCPMsg.Items);
+ cbWinMsgMsg.ItemIndex := 0;
+ cbWinMsgMsgChange(cbWinMsgMsg);
+
+ cbUseCompressionClick(cbUseCompression);
+ cb_EncryptClick(cb_Encrypt);
+
+ if (ParamCount > 0) and SameText(ParamStr(1), '/activate') then begin
+ Application.ProcessMessages();
+ bActivateHTTP.Click;
+ bActivateTcP.Click;
+ bActivateWinMsg.Click;
+ end;
+ CheckStatus;
+end;
+
+procedure TMegaDemoServerMainForm.Log(const someText: string);
+var
+ p: pChar;
+begin
+ if Application.Terminated then Exit;
+
+ if not cbVerbose.Checked then Exit;
+
+ GetMem(p, Length(someText) + 1);
+ Move(someText[1], p^, Length(someText) + 1);
+ PostMessage(Handle, WM_LOG_MESSAGE, 0, integer(p));
+
+ { Access to the VCL may only happen from within the main thread. To allow
+ Log to be called from within the Service implementattion, we must ensure
+ it's threadsafe.
+
+ So instread of just addint the log message to the Memo, we'l send a
+ PostMessage to the window, which wil then later be handled within the
+ main thread.
+
+ As a side benefit, the secution of the Log doe snot need to wait for this
+ logging to happen (as usage of, for example, Synchronize would require),
+ which will in turn make the server more respinsible for a simultaneous
+ calls. }
+end;
+
+procedure TMegaDemoServerMainForm.WMLog(var Message: TMessage);
+var
+ p: pChar;
+begin
+ try
+ p := pChar(Message.LParam);
+ Memo.Lines.Add(p);
+ Freemem(p);
+ except
+ on E: Exception do
+ Memo.Lines.Add(E.Classname + ': ' + E.Message);
+ end;
+end;
+
+procedure TMegaDemoServerMainForm.ActivateGroupBox(iGroupBox: TGroupBox; iActivate: boolean);
+var
+ i, j: integer;
+ lPanel: TPanel;
+begin
+ if iGroupBox <> nil then
+ for i := 0 to (iGroupBox.ControlCount - 1) do begin
+ if not (iGroupBox.Controls[i] is TBitBtn) and
+ not (iGroupBox.Controls[i] is TComboBox) and
+ not ((iGroupBox.Controls[i] is TLabel) and (TLabel(iGroupBox.Controls[i]).Caption = 'Message:')) then iGroupBox.Controls[i].Enabled := iActivate;
+ if (iGroupBox.Controls[i] is TPanel) then begin
+ lPanel := TPanel(iGroupBox.Controls[i]);
+ for j := 0 to (lPanel.ControlCount - 1) do begin
+ lPanel.Controls[j].Enabled := iActivate;
+ end;
+ end;
+ end;
+end;
+
+procedure TMegaDemoServerMainForm.HttpServerAfterServerActivate(Sender: TObject);
+begin
+ ActivateGroupBox(gbHttp, false);
+ Log((Sender as TComponent).ClassName + ' has been activated...');
+end;
+
+procedure TMegaDemoServerMainForm.HttpServerAfterServerDeactivate(Sender: TObject);
+begin
+ ActivateGroupBox(gbHttp, true);
+ Log((Sender as TComponent).ClassName + ' has been deactivated...');
+end;
+
+procedure TMegaDemoServerMainForm.TcpServerAfterServerActivate(Sender: TObject);
+begin
+ ActivateGroupBox(gbTcp, false);
+ Log((Sender as TComponent).ClassName + ' has been activated...');
+end;
+
+procedure TMegaDemoServerMainForm.TcpServerAfterServerDeactivate(Sender: TObject);
+begin
+ ActivateGroupBox(gbTcp, true);
+ Log((Sender as TComponent).ClassName + ' has been deactivated...');
+end;
+
+procedure TMegaDemoServerMainForm.WinMessageServerAfterServerActivate(Sender: TObject);
+begin
+ ActivateGroupBox(gbWinMsg, false);
+ Log((Sender as TComponent).ClassName + ' has been activated...');
+end;
+
+procedure TMegaDemoServerMainForm.WinMessageServerAfterServerDeactivate(Sender: TObject);
+begin
+ ActivateGroupBox(gbWinMsg, true);
+ Log((Sender as TComponent).ClassName + ' has been deactivated...');
+end;
+
+procedure TMegaDemoServerMainForm.cbUseCompressionClick(Sender: TObject);
+begin
+ ROBINMessage.UseCompression := cbUseCompression.Checked;
+end;
+
+procedure TMegaDemoServerMainForm.cbTCPMsgChange(Sender: TObject);
+begin
+ with TComboBox(Sender) do begin
+{$IFNDEF NO_INDY}
+ ROIndyTCPServer.Dispatchers[0].Message := TROMessage(Items.Objects[ItemIndex]);
+{$ENDIF NO_INDY}
+ BpdxTCPServer.Dispatchers[0].Message := TROMessage(Items.Objects[ItemIndex]);
+ end;
+end;
+
+procedure TMegaDemoServerMainForm.cbWinMsgMsgChange(Sender: TObject);
+begin
+ with TComboBox(Sender) do
+ WinMessageServer.Dispatchers[0].Message :=TROMessage(Items.Objects[ItemIndex]);
+end;
+
+procedure TMegaDemoServerMainForm.bActivateTCPClick(Sender: TObject);
+begin
+{$IFDEF NO_INDY}
+ rbBpdxTcp.Checked:= True;
+{$ENDIF NO_INDY}
+ if rbBpdxTcp.Checked then begin
+ BpdxTCPServer.BpdxServer.ServerPort := seTCPPort.Value;
+ BpdxTCPServer.Active := true;
+ bDeactivateTcp.Enabled := false;
+ Log('Please note that BPDX Servers cannot be deactivated once they have been activated.' +
+ 'This is a limitation of the BPDX Library, see the Help topic for this sample for more details.');
+ end
+{$IFNDEF NO_INDY}
+ else begin
+ ROIndyTCPServer.Port := seTCPPort.Value;
+ ROIndyTCPServer.Active := true;
+ end
+{$ENDIF NO_INDY}
+;
+
+ bDeactivateTcp.Visible := true;
+ bActivateTcp.Visible := false;
+ CheckStatus;
+end;
+
+procedure TMegaDemoServerMainForm.bDeactivateTCPClick(Sender: TObject);
+begin
+ bActivateTcp.Visible := true;
+ bDeactivateTcp.Visible := false;
+
+ BpdxTCPServer.Active := false;
+{$IFNDEF NO_INDY}
+ ROIndyTCPServer.Active := false;
+{$ENDIF NO_INDY}
+ CheckStatus;
+end;
+
+procedure TMegaDemoServerMainForm.bActivateHTTPClick(Sender: TObject);
+begin
+{$IFDEF NO_INDY}
+ rbBpdxHttp.Checked:= True;
+{$ENDIF NO_INDY}
+ if rbBpdxHttp.Checked then begin
+ BpdxHTTPServer.BpdxServer.ServerPort := seHTTPPort.Value;
+ BpdxHTTPServer.Active := true;
+ bDeactivateHttp.Enabled := false;
+ Log('Please note that BPDX Servers cannot be deactivated once they have been activated.' +
+ 'This is a limitation of the BPDX Library, see the Help topic for this sample for more details.');
+ end
+{$IFNDEF NO_INDY}
+ else begin
+ ROIndyHTTPServer.Port := seHTTPPort.Value;
+ ROIndyHTTPServer.Active := true;
+ end
+{$ENDIF NO_INDY}
+ ;
+ bDeactivateHttp.Visible := true;
+ bActivateHttp.Visible := false;
+ CheckStatus;
+end;
+
+procedure TMegaDemoServerMainForm.bDeactivateHTTPClick(Sender: TObject);
+begin
+ bActivateHttp.Visible := true;
+ bDeactivateHttp.Visible := false;
+
+ BpdxHTTPServer.Active := false;
+{$IFNDEF NO_INDY}
+ ROIndyHTTPServer.Active := false;
+{$ENDIF NO_INDY}
+ CheckStatus;
+end;
+
+procedure TMegaDemoServerMainForm.bActivateWinMsgClick(Sender: TObject);
+begin
+ WinMessageServer.ServerID := eServerID.Text;
+ WinMessageServer.Active := true;
+
+ bDeactivateWinMsg.Visible := true;
+ bActivateWinMsg.Visible := false;
+ CheckStatus;
+end;
+
+procedure TMegaDemoServerMainForm.bDeactivateWinMsgClick(Sender: TObject);
+begin
+ bActivateWinMsg.Visible := true;
+ bDeactivateWinMsg.Visible := false;
+ WinMessageServer.Active := false;
+ CheckStatus;
+end;
+
+procedure TMegaDemoServerMainForm.cb_EncryptClick(Sender: TObject);
+var
+ lEncryption: TROEncryptionMethod;
+begin
+ if cb_Encrypt.Checked then
+ lEncryption := tetDES
+ else
+ lEncryption := tetNone;
+
+ BpdxHttpServer.Encryption.EncryptionMethod := lEncryption;
+ BpdxTcpServer.Encryption.Assign(BpdxHttpServer.Encryption);
+{$IFNDEF NO_INDY}
+ ROIndyHttpServer.Encryption.Assign(BpdxHttpServer.Encryption);
+ ROIndyTcpServer.Encryption.Assign(BpdxHttpServer.Encryption);
+ ROIndySuperTCPServer.Encryption.Assign(BpdxHttpServer.Encryption);
+{$ENDIF NO_INDY}
+{$IFNDEF NO_Synapse}
+ ROSynapseSuperHTTPServer.Encryption.Assign(BpdxHttpServer.Encryption);
+ ROSynapseSuperTCPServer.Encryption.Assign(BpdxHttpServer.Encryption);
+{$ENDIF}
+ WinMessageServer.Encryption.Assign(BpdxHttpServer.Encryption);
+end;
+
+procedure TMegaDemoServerMainForm.cb_SupportKeepAliveClick(Sender: TObject);
+begin
+ BpdxHttpServer.SupportKeepAlive := cb_SupportKeepAlive.Checked;
+{$IFNDEF NO_INDY}
+ ROIndyHttpServer.KeepAlive := cb_SupportKeepAlive.Checked;
+{$ENDIF NO_INDY}
+end;
+
+procedure TMegaDemoServerMainForm.cbDisableNagleClick(Sender: TObject);
+begin
+{$IFNDEF NO_INDY}
+ ROIndyTCPServer.DisableNagle := cbDisableNagle.Checked
+{$ENDIF NO_INDY}
+end;
+
+constructor TMegaDemoServerMainForm.Create(aOwner: TComponent);
+begin
+ inherited;
+ fCritical := TCriticalSection.Create;
+end;
+
+destructor TMegaDemoServerMainForm.Destroy;
+begin
+ fCritical.Free;
+ inherited;
+end;
+
+procedure TMegaDemoServerMainForm.CheckStatus;
+var
+ fStatus: Boolean;
+begin
+ FStatus :=
+{$IFNDEF NO_INDY}
+ ROIndyHTTPServer.Active or
+ ROIndyTCPServer.Active or
+ ROIndySuperTCPServer.Active or
+{$ENDIF NO_INDY}
+{$IFNDEF NO_Synapse}
+ ROSynapseSuperHTTPServer.Active or
+ ROSynapseSuperTCPServer.Active or
+{$ENDIF}
+ WinMessageServer.Active or
+ BpdxHttpServer.Active or
+ BpdxTcpServer.Active;
+ if FStatus then begin
+ ErrorMemo.Visible := False;
+ Memo.Visible := True;
+ end
+ else begin
+ ErrorMemo.Visible := True;
+ Memo.Visible := False;
+ end;
+end;
+
+procedure TMegaDemoServerMainForm.MessageInitializeMessage(
+ Sender: TROMessage; const aTransport: IROTransport;
+ const anInterfaceName, aMessageName: String);
+begin
+ Log('Request via '+Sender.ClassName);
+end;
+
+procedure TMegaDemoServerMainForm.cbSuperTCPMsgChange(Sender: TObject);
+begin
+ with TComboBox(Sender) do begin
+{$IFNDEF NO_INDY}
+ ROIndySuperTCPServer.Dispatchers[0].Message := TROMessage(Items.Objects[ItemIndex]);
+{$ENDIF NO_INDY}
+{$IFNDEF NO_Synapse}
+ ROSynapseSuperTCPServer.Dispatchers[0].Message := TROMessage(Items.Objects[ItemIndex]);
+{$ENDIF NO_Synapse}
+ end;
+end;
+
+procedure TMegaDemoServerMainForm.bDeactivateSuperTCPClick(
+ Sender: TObject);
+begin
+ bActivateSuperTcp.Visible := true;
+ bDeactivateSuperTcp.Visible := false;
+{$IFNDEF NO_INDY}
+ ROIndySuperTCPServer.Active := false;
+{$ENDIF NO_INDY}
+{$IFNDEF NO_Synapse}
+ ROSynapseSuperTCPServer.Active := false;
+{$ENDIF NO_Synapse}
+ CheckStatus;
+end;
+
+procedure TMegaDemoServerMainForm.bActivateSuperTCPClick(
+ Sender: TObject);
+var
+ fServer: TROServer;
+begin
+ fServer:=nil;
+{$IFDEF NO_Synapse}
+ rbIndySuperTCP.Checked:= True;
+{$ENDIF}
+{$IFNDEF NO_INDY}
+ if rbIndySuperTCP.Checked then begin
+ ROIndySuperTCPServer.Port := seSuperTCPPort.Value;
+ fServer := ROIndySuperTCPServer;
+ end;
+{$ELSE}
+ rbSynapseSuperTcp.Checked := True;
+{$ENDIF NO_INDY}
+
+{$IFNDEF NO_Synapse}
+ if rbSynapseSuperTcp.Checked then begin
+ ROSynapseSuperTCPServer.Port := seSuperTCPPort.Value;
+ fServer := ROSynapseSuperTCPServer;
+ end;
+{$ENDIF}
+ if Assigned(fServer) then begin
+ fServer.Active:= True;
+ bDeactivateSuperTcp.Visible := true;
+ bActivateSuperTcp.Visible := false;
+ CheckStatus;
+ end
+ else begin
+ ShowMessage('No Super TCP servers was found.'+sLineBreak+
+ 'Please use Indy or Synapse library.');
+ end;
+end;
+
+procedure TMegaDemoServerMainForm.SuperTcpServerAfterServerActivate(
+ Sender: TObject);
+begin
+ ActivateGroupBox(gbSuperTcp, false);
+ Log((Sender as TComponent).ClassName + ' has been activated...');
+end;
+
+procedure TMegaDemoServerMainForm.SuperTcpServerAfterServerDeactivate(
+ Sender: TObject);
+begin
+ ActivateGroupBox(gbSuperTcp, true);
+ Log((Sender as TComponent).ClassName + ' has been deactivated...');
+end;
+
+procedure TMegaDemoServerMainForm.SuperHttpServerAfterServerActivate(
+ Sender: TObject);
+begin
+ ActivateGroupBox(gbSuperHTTP, false);
+ Log((Sender as TComponent).ClassName + ' has been activated...');
+end;
+
+procedure TMegaDemoServerMainForm.SuperHttpServerAfterServerDeactivate(
+ Sender: TObject);
+begin
+ ActivateGroupBox(gbSuperHTTP, true);
+ Log((Sender as TComponent).ClassName + ' has been deactivated...');
+end;
+
+procedure TMegaDemoServerMainForm.bActivateSuperHTTPClick(Sender: TObject);
+begin
+{$IFNDEF NO_Synapse}
+ ROSynapseSuperHTTPServer.Port := seSuperHTTPPort.Value;
+ ROSynapseSuperHTTPServer.Active := true;
+ bDeactivateSuperHttp.Visible := true;
+ bActivateSuperHttp.Visible := false;
+ CheckStatus;
+{$ELSE}
+ ShowMessage('No Super HTTP servers was found.'+sLineBreak+
+ 'Please use Synapse library.');
+{$ENDIF}
+end;
+
+procedure TMegaDemoServerMainForm.bDeactivateSuperHTTPClick(
+ Sender: TObject);
+begin
+ bActivateSuperHttp.Visible := true;
+ bDeactivateSuperHttp.Visible := false;
+
+{$IFNDEF NO_Synapse}
+ ROSynapseSuperHTTPServer.Active := false;
+{$ENDIF}
+ CheckStatus;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoService_Impl.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoService_Impl.dfm
new file mode 100644
index 0000000..8fdbada
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoService_Impl.dfm
@@ -0,0 +1,8 @@
+object MegaDemoService: TMegaDemoService
+ OldCreateOrder = True
+ OnDeactivate = RORemoteDataModuleDeactivate
+ Left = 391
+ Top = 285
+ Height = 300
+ Width = 300
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoService_Impl.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoService_Impl.pas
new file mode 100644
index 0000000..6fd9851
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/MegaDemoService_Impl.pas
@@ -0,0 +1,175 @@
+unit MegaDemoService_Impl;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ This is where you are supposed to code the implementation of your objects. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils,
+ {RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
+ {Required:} uRORemoteDataModule,
+ {Generated:} MegaDemoLibrary_Intf;
+
+type
+ { TMegaDemoService }
+ TMegaDemoService = class(TRORemoteDataModule, IMegaDemoService)
+ procedure RORemoteDataModuleDeactivate(const aClientID: TGUID;
+ aSession: TROSession);
+ private
+ protected
+ { IMegaDemoService methods }
+ function Sum(const A: Integer; const B: Integer): Integer;
+ function GetServerTime: DateTime;
+ procedure EchoPerson(const aPerson: TPerson; out anotherPerson: TPerson);
+ function TestIntegerArray(const anArray: TIntegerArray): TIntegerArray;
+ function TestStringArray(const anArray: TStringArray): TStringArray;
+ function TestPersonArray(const anArray: TPersonArray): TPersonArray;
+ procedure EchoBinary(const BinIN: binary; out BinOUT: Binary);
+ procedure SomeTypes(var aString: string; var aWidestring: Widestring; var anInteger: Integer; var
+ aCurrency: Currency; var aDatetime: DateTime);
+ function CustomObjectAsString: string;
+ function CustomObjectAsStream: Binary;
+ procedure RaiseError;
+ procedure RaiseTestException;
+ end;
+
+implementation
+
+{$R *.dfm}
+uses
+ {Generated:} MegaDemoLibrary_Invk, MegaDemoServerMain,
+ MegaDemoCustomClass, uROXMLSerializer, uROStreamSerializer;
+
+procedure Create_MegaDemoService(out anInstance: IUnknown);
+begin
+ anInstance := TMegaDemoService.Create(nil);
+end;
+
+{ MegaService }
+
+function TMegaDemoService.Sum(const A: Integer; const B: Integer): Integer;
+begin
+ result := A + B;
+end;
+
+function TMegaDemoService.GetServerTime: DateTime;
+begin
+ result := Now;
+end;
+
+procedure TMegaDemoService.EchoPerson(const aPerson: TPerson; out anotherPerson: TPerson);
+begin
+ anotherPerson := TPerson.Create;
+
+ anotherPerson.FirstName := aPerson.FirstName;
+ anotherPerson.LastName := aPerson.LastName;
+ anotherPerson.Age := aPerson.Age;
+ anotherPerson.Sex := aPerson.Sex;
+end;
+
+function TMegaDemoService.TestIntegerArray(const anArray: TIntegerArray): TIntegerArray;
+var
+ i: integer;
+begin
+ result := TIntegerArray.Create;
+ for i := 0 to anArray.Count - 1 do
+ result.Add(anArray[i]);
+end;
+
+function TMegaDemoService.TestStringArray(const anArray: TStringArray): TStringArray;
+var
+ i: integer;
+begin
+ result := TStringArray.Create;
+ for i := 0 to anArray.Count - 1 do
+ result.Add(anArray[i]);
+end;
+
+function TMegaDemoService.TestPersonArray(const anArray: TPersonArray): TPersonArray;
+var
+ i: integer;
+begin
+ result := TPersonArray.Create;
+ for i := 0 to anArray.Count - 1 do begin
+ with result.Add do begin
+ FirstName := anArray[i].FirstName;
+ LastName := anArray[i].LastName;
+ Age := anArray[i].Age;
+ Sex := anArray[i].Sex;
+ end;
+ end;
+end;
+
+procedure TMegaDemoService.EchoBinary(const BinIN: binary; out BinOUT: Binary);
+begin
+ BinOut := Binary.Create;
+ BinOUT.CopyFrom(BinIN, BinIN.Size);
+end;
+
+procedure TMegaDemoService.SomeTypes(var aString: string; var aWidestring: Widestring; var anInteger:
+ Integer; var aCurrency: Currency; var aDatetime: DateTime);
+begin
+ aString := 'received aString: "' + aString + '"';
+ aWidestring := 'received aWideString "' + aWideString + '"';
+ anInteger := anInteger * 2;
+ aCurrency := aCurrency * 2;
+ aDatetime := Now;
+end;
+
+function TMegaDemoService.CustomObjectAsString: string;
+var
+ cls: TCustomClass;
+begin
+ result := '';
+
+ cls := NewCustomClass;
+ try
+ result := ObjectToXML(cls);
+ finally
+ cls.Free;
+ end;
+end;
+
+function TMegaDemoService.CustomObjectAsStream: Binary;
+var
+ cls: TCustomClass;
+begin
+ result := Binary.Create;
+
+ cls := NewCustomClass;
+ try
+ ObjectToStream(cls, result);
+ finally
+ cls.Free;
+ end;
+end;
+
+procedure TMegaDemoService.RaiseError;
+begin
+ // Generic and unregistered exceptions
+ raise EDivByZero.Create('A fake div by zero!');
+end;
+
+procedure TMegaDemoService.RaiseTestException;
+begin
+ raise ETestException.Create('This is the exception message', 666, 'Some extra info here');
+end;
+
+procedure TMegaDemoService.RORemoteDataModuleDeactivate(const aClientID: TGUID;
+ aSession: TROSession);
+begin
+ if Assigned(MegaDemoServerMainForm) then MegaDemoServerMainForm.Log('Complete!');
+end;
+
+initialization
+ TROClassFactory.Create('MegaDemoService', Create_MegaDemoService, TMegaDemoService_Invoker);
+
+finalization
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/RODLFile.RES b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/RODLFile.RES
new file mode 100644
index 0000000..2614f93
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/MegaDemo/RODLFile.RES differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel.Sample.html b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel.Sample.html
new file mode 100644
index 0000000..098ee9f
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel.Sample.html
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+
+
+ Multi Channel Sample
+
+
+
+Purpose
+
+
+ This example provides an introduction to using the Delphi edition of the RemObjects SDK product.
+ It shows how to use different channels to connect to the server application.
+ The following channels and servers are included:
+
+TROWinMessageChannel / TROWinMessageServer
+TRONamedPipeChannel / TRONamedPipeServer
+TROWinInetHTTPChannel / TROIndyHTTPServer
+TROIndyTCPChannel / TROIndyTCPServer
+TROSuperTcpChannel / TROSuperTcpServer
+TROIndySuperHttpChannel / TROIpSuperHttpServer
+TROIndyUDPChannel / TROIndyUDPServer
+TROIndyTCPChannel / TROBPDXTCPServer
+TROWinInetHTTPChannel / TROBPDXHTTPServer
+TROLocalChannel / TROLocalServer
+TRODLLChannel
+
+
+
+
+Getting Started
+
+ Build or compile all projects.
+ Launch the server (via the menu option: RemObjects | Launch Server Executable ).
+ Activate the server(s) you require.
+ Ensure that MultiChannel_Client is the selected project and run it.
+ Choose a server and test it.
+
+Examine the Code
+
+
+ See the code that changes the selected channel/server in MultiChannel_ClientMain.pas .
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel.bdsgroup b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel.bdsgroup
new file mode 100644
index 0000000..b13f1a1
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel.bdsgroup
@@ -0,0 +1,21 @@
+
+
+
+
+ Default.Personality
+
+ 1.0
+ {A48F6E7D-CBD9-4E71-9469-DDC7F53916A1}
+
+
+
+
+
+ MultiChannel_Server.bdsproj
+ MultiChannel_DLLServer.bdsproj
+ MultiChannel_Client.bdsproj
+ MultiChannel_Server.exe MultiChannel_DLLServer.dll MultiChannel_Client.exe
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel.bpg b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel.bpg
new file mode 100644
index 0000000..cc87d7d
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel.bpg
@@ -0,0 +1,26 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = MultiChannel_Server.exe MultiChannel_DLLServer.dll MultiChannel_Client.exe
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+MultiChannel_Server.exe: MultiChannel_Server.dpr
+ $(DCC)
+
+MultiChannel_Client.exe: MultiChannel_Client.dpr
+ $(DCC)
+
+MultiChannel_DLLServer.dll: MultiChannel_DLLServer.dpr
+ $(DCC)
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel.groupproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel.groupproj
new file mode 100644
index 0000000..d3e81da
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel.groupproj
@@ -0,0 +1,49 @@
+
+
+ {3788f490-6c3b-412b-924c-ca4e290cbf69}
+
+
+
+
+ Default.Personality
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannelLibrary.rodl b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannelLibrary.rodl
new file mode 100644
index 0000000..71b3778
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannelLibrary.rodl
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannelLibrary_Intf.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannelLibrary_Intf.pas
new file mode 100644
index 0000000..4729390
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannelLibrary_Intf.pas
@@ -0,0 +1,95 @@
+unit MultiChannelLibrary_Intf;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+{$I Remobjects.inc}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROXMLIntf, uROClasses, uROClient, uROTypes, uROClientIntf;
+
+const
+ { Library ID }
+ LibraryUID = '{60A753C4-1ED0-4385-AD64-B6B547D42BD5}';
+ TargetNamespace = '';
+
+ { Service Interface ID's }
+ IMultiChannelService_IID : TGUID = '{DCA9C2C8-5CE4-4270-829D-503B0E9547B9}';
+
+ { Event ID's }
+
+type
+ { Forward declarations }
+ IMultiChannelService = interface;
+
+
+ { IMultiChannelService }
+ IMultiChannelService = interface
+ ['{DCA9C2C8-5CE4-4270-829D-503B0E9547B9}']
+ function GetServerTime: DateTime;
+ end;
+
+ { CoMultiChannelService }
+ CoMultiChannelService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IMultiChannelService;
+ end;
+
+ { TMultiChannelService_Proxy }
+ TMultiChannelService_Proxy = class(TROProxy, IMultiChannelService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ function GetServerTime: DateTime;
+ end;
+
+implementation
+
+uses
+ {vcl:} SysUtils,
+ {RemObjects:} uROEventRepository, uROSerializer, uRORes;
+
+{ CoMultiChannelService }
+
+class function CoMultiChannelService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IMultiChannelService;
+begin
+ result := TMultiChannelService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TMultiChannelService_Proxy }
+
+function TMultiChannelService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'MultiChannelService';
+end;
+
+function TMultiChannelService_Proxy.GetServerTime: DateTime;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'MultiChannelLibrary', __InterfaceName, 'GetServerTime');
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(DateTime), result, [paIsDateTime]);
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+initialization
+ RegisterProxyClass(IMultiChannelService_IID, TMultiChannelService_Proxy);
+
+
+finalization
+ UnregisterProxyClass(IMultiChannelService_IID);
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannelLibrary_Invk.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannelLibrary_Invk.pas
new file mode 100644
index 0000000..6de2033
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannelLibrary_Invk.pas
@@ -0,0 +1,54 @@
+unit MultiChannelLibrary_Invk;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+{$I Remobjects.inc}
+
+interface
+
+uses
+ {vcl:} Classes,
+ {RemObjects:} uROXMLIntf, uROServer, uROServerIntf, uROTypes, uROClientIntf,
+ {Generated:} MultiChannelLibrary_Intf;
+
+type
+ {$M+}
+ TMultiChannelService_Invoker = class(TROInvoker)
+ private
+ protected
+ published
+ procedure Invoke_GetServerTime(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ end;
+ {$M-}
+
+implementation
+
+uses
+ {RemObjects:} uRORes, uROClient;
+
+{ TMultiChannelService_Invoker }
+
+procedure TMultiChannelService_Invoker.Invoke_GetServerTime(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function GetServerTime: DateTime; }
+var
+ lResult: DateTime;
+begin
+ try
+ lResult := (__Instance as IMultiChannelService).GetServerTime;
+
+ __Message.InitializeResponseMessage(__Transport, 'MultiChannelLibrary', 'MultiChannelService', 'GetServerTimeResponse');
+ __Message.Write('Result', TypeInfo(DateTime), lResult, [paIsDateTime]);
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ finally
+ end;
+end;
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannelService_Impl.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannelService_Impl.pas
new file mode 100644
index 0000000..ec076d7
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannelService_Impl.pas
@@ -0,0 +1,49 @@
+unit MultiChannelService_Impl;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ This is where you are supposed to code the implementation of your objects. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils,
+ {RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
+ {Generated:} MultiChannelLibrary_Intf;
+
+type
+ { TMultiChannelService }
+ TMultiChannelService = class(TRORemotable, IMultiChannelService)
+ private
+ protected
+ { IMultiChannelService methods }
+ function GetServerTime: DateTime;
+ end;
+
+implementation
+
+uses
+ {Generated:} MultiChannelLibrary_Invk;
+
+procedure Create_MultiChannelService(out anInstance: IUnknown);
+begin
+ anInstance := TMultiChannelService.Create;
+end;
+
+{ MultiChannelService }
+
+function TMultiChannelService.GetServerTime: DateTime;
+begin
+ Result := Now;
+end;
+
+initialization
+ TROClassFactory.Create('MultiChannelService', Create_MultiChannelService, TMultiChannelService_Invoker);
+
+finalization
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_Client.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_Client.bdsproj
new file mode 100644
index 0000000..e08c4b6
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_Client.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {F86C19EE-EBF0-4E00-B90B-F1F916AA67BC}
+
+
+
+
+ MultiChannel_Client.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_Client.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_Client.dpr
new file mode 100644
index 0000000..2752a1f
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_Client.dpr
@@ -0,0 +1,16 @@
+program MultiChannel_Client;
+
+uses
+ Forms,
+ MultiChannel_ClientMain in 'MultiChannel_ClientMain.pas' {MultiChannel_ClientMainForm},
+ MultiChannel_ClientData in 'MultiChannel_ClientData.pas' {MultiChannel_ClientDataMain: TDataModule};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'MultiChannel - Client';
+ Application.CreateForm(TMultiChannel_ClientDataMain, MultiChannel_ClientDataMain);
+ Application.CreateForm(TMultiChannel_ClientMainForm, MultiChannel_ClientMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_Client.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_Client.dproj
new file mode 100644
index 0000000..47168bd
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_Client.dproj
@@ -0,0 +1,75 @@
+
+
+ {c9e161f0-df30-424e-b087-976a9cda6727}
+ MultiChannel_Client.dpr
+ Debug
+ AnyCPU
+ DCC32
+ MultiChannel_Client.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ MultiChannel_Client.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_Client.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_Client.res
new file mode 100644
index 0000000..90e4219
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_Client.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_ClientData.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_ClientData.dfm
new file mode 100644
index 0000000..403b473
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_ClientData.dfm
@@ -0,0 +1,22 @@
+object MultiChannel_ClientDataMain: TMultiChannel_ClientDataMain
+ OldCreateOrder = False
+ Left = 322
+ Top = 227
+ Height = 150
+ Width = 215
+ object LocalServer: TROLocalServer
+ Dispatchers = <
+ item
+ Name = 'BinMessage'
+ Message = BinMessage
+ Enabled = True
+ end>
+ Left = 41
+ Top = 21
+ end
+ object BinMessage: TROBinMessage
+ OnInitializeMessage = BinMessageInitializeMessage
+ Left = 38
+ Top = 63
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_ClientData.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_ClientData.pas
new file mode 100644
index 0000000..ae8009a
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_ClientData.pas
@@ -0,0 +1,39 @@
+unit MultiChannel_ClientData;
+
+interface
+
+uses
+ SysUtils, Classes, uROClient, uROBinMessage, uROServer, uROLocalServer, uROClientIntf;
+
+type
+ TMultiChannel_ClientDataMain = class(TDataModule)
+ LocalServer: TROLocalServer;
+ BinMessage: TROBinMessage;
+ procedure BinMessageInitializeMessage(Sender: TROMessage;
+ const aTransport: IROTransport; const anInterfaceName,
+ aMessageName: string);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ MultiChannel_ClientDataMain: TMultiChannel_ClientDataMain;
+
+implementation
+uses MultiChannelService_Impl, MultiChannel_ClientMain;
+{$R *.dfm}
+
+procedure TMultiChannel_ClientDataMain.BinMessageInitializeMessage(
+ Sender: TROMessage; const aTransport: IROTransport;
+ const anInterfaceName, aMessageName: string);
+begin
+ MultiChannel_ClientMainForm.Log('');
+ MultiChannel_ClientMainForm.Log('SERVER: Connect via ' + Tobject(aTransport.GetTransportObject).ClassName);
+ MultiChannel_ClientMainForm.Log('SERVER: ' + anInterfaceName + ':'#9 + StringReplace(aMessageName, 'Response', '', []));
+ MultiChannel_ClientMainForm.Log('');
+end;
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_ClientMain.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_ClientMain.dfm
new file mode 100644
index 0000000..7057219
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_ClientMain.dfm
@@ -0,0 +1,171 @@
+object MultiChannel_ClientMainForm: TMultiChannel_ClientMainForm
+ Left = 301
+ Top = 153
+ AutoScroll = False
+ Caption = 'MultiChannel_ClientMainForm'
+ ClientHeight = 336
+ ClientWidth = 384
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Memo: TMemo
+ Left = 0
+ Top = 148
+ Width = 384
+ Height = 188
+ Align = alClient
+ ScrollBars = ssVertical
+ TabOrder = 0
+ end
+ object Panel1: TPanel
+ Left = 0
+ Top = 0
+ Width = 384
+ Height = 148
+ Align = alTop
+ BevelOuter = bvNone
+ TabOrder = 1
+ object GetServerTimeButton: TButton
+ Left = 7
+ Top = 116
+ Width = 104
+ Height = 25
+ Caption = 'GetServerTime'
+ TabOrder = 0
+ OnClick = GetServerTimeButtonClick
+ end
+ object rgConnect: TRadioGroup
+ Left = 6
+ Top = 5
+ Width = 375
+ Height = 105
+ Caption = 'Connect to:'
+ Columns = 3
+ ItemIndex = 0
+ Items.Strings = (
+ 'IndyHTTPServer'
+ 'BPDXHTTPServer'
+ 'SuperTcpServer'
+ 'IndyTCPServer'
+ 'BPDXTCPServer'
+ 'LocalServer'
+ 'IndyUDPServer'
+ 'NamedPipeServer'
+ 'WinMessageServer'
+ 'SuperHTTPServer'
+ 'DLLChannel')
+ TabOrder = 1
+ end
+ end
+ object RemoteService: TRORemoteService
+ Message = BinMessage
+ ServiceName = 'MultiChannelService'
+ Left = 249
+ Top = 276
+ end
+ object BinMessage: TROBinMessage
+ Left = 248
+ Top = 231
+ end
+ object WinInetHTTPChannel: TROWinInetHTTPChannel
+ UserAgent = 'RemObjects SDK'
+ ServerLocators = <>
+ DispatchOptions = []
+ Left = 30
+ Top = 164
+ end
+ object WinMessageChannel: TROWinMessageChannel
+ ServerID = '{30221B5E-6C56-4A91-A4E4-455BB3DA22B9}'
+ ServerLocators = <>
+ DispatchOptions = []
+ Left = 86
+ Top = 192
+ end
+ object NamedPipeChannel: TRONamedPipeChannel
+ ServerID = 'MultiChannel_ServerMainForm_NamedPipeServer'
+ ServerName = '.'
+ ServerLocators = <>
+ DispatchOptions = []
+ Left = 58
+ Top = 192
+ end
+ object DLLChannel: TRODLLChannel
+ DLLName = 'MultiChannel_DLLServer.dll'
+ ServerLocators = <>
+ DispatchOptions = []
+ Left = 314
+ Top = 257
+ end
+ object LocalChannel: TROLocalChannel
+ ServerLocators = <>
+ DispatchOptions = []
+ ServerChannel = MultiChannel_ClientDataMain.LocalServer
+ Left = 313
+ Top = 216
+ end
+ object IndyTCPChannel: TROIndyTCPChannel
+ ServerLocators = <>
+ DispatchOptions = []
+ Port = 8090
+ Host = '127.0.0.1'
+ Left = 58
+ Top = 164
+ end
+ object SuperTcpChannel: TROSuperTcpChannel
+ Host = 'localhost'
+ ServerLocators = <>
+ DispatchOptions = []
+ Left = 30
+ Top = 192
+ end
+ object IndyUDPChannel: TROIndyUDPChannel
+ Retrys = 5
+ IndyClient.Host = 'localhost'
+ IndyClient.Port = 8090
+ Port = 8090
+ Host = 'localhost'
+ ServerLocators = <>
+ DispatchOptions = []
+ Left = 86
+ Top = 164
+ end
+ object IndySuperHttpChannel: TROIndySuperHttpChannel
+ Active = False
+ ClientWait.MaxLineAction = maException
+ ClientWait.ReadTimeout = 0
+ ClientWait.AllowCookies = True
+ ClientWait.ProxyParams.BasicAuthentication = False
+ ClientWait.ProxyParams.ProxyPort = 0
+ ClientWait.Request.ContentLength = -1
+ ClientWait.Request.ContentRangeEnd = 0
+ ClientWait.Request.ContentRangeStart = 0
+ ClientWait.Request.ContentType = 'text/html'
+ ClientWait.Request.Accept = 'text/html, */*'
+ ClientWait.Request.BasicAuthentication = False
+ ClientWait.Request.UserAgent = 'RemObjects SDK'
+ ClientWait.HTTPOptions = [hoForceEncodeParams]
+ ClientRequest.MaxLineAction = maException
+ ClientRequest.ReadTimeout = 0
+ ClientRequest.AllowCookies = True
+ ClientRequest.ProxyParams.BasicAuthentication = False
+ ClientRequest.ProxyParams.ProxyPort = 0
+ ClientRequest.Request.ContentLength = -1
+ ClientRequest.Request.ContentRangeEnd = 0
+ ClientRequest.Request.ContentRangeStart = 0
+ ClientRequest.Request.ContentType = 'text/html'
+ ClientRequest.Request.Accept = 'text/html, */*'
+ ClientRequest.Request.BasicAuthentication = False
+ ClientRequest.Request.UserAgent = 'RemObjects SDK'
+ ClientRequest.HTTPOptions = [hoForceEncodeParams]
+ Left = 114
+ Top = 164
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_ClientMain.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_ClientMain.pas
new file mode 100644
index 0000000..3ba4eee
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_ClientMain.pas
@@ -0,0 +1,139 @@
+unit MultiChannel_ClientMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ StdCtrls, MultiChannelLibrary_Intf, MultiChannel_ClientData, SyncObjs,
+ uROIndyUDPChannel, uROSuperTCPChannel, uROIndyTCPChannel,
+ uROLocalChannel, uRODLLChannel, uRONamedPipeChannel,
+ uROWinMessageChannel, uROClient, uROWinInetHttpChannel, uROBinMessage,
+ uRORemoteService, ExtCtrls, uROBaseSuperHttpChannel,
+ uROIndySuperHttpChannel;
+
+type
+ TMultiChannel_ClientMainForm = class(TForm)
+ RemoteService: TRORemoteService;
+ BinMessage: TROBinMessage;
+ WinInetHTTPChannel: TROWinInetHTTPChannel;
+ WinMessageChannel: TROWinMessageChannel;
+ NamedPipeChannel: TRONamedPipeChannel;
+ DLLChannel: TRODLLChannel;
+ LocalChannel: TROLocalChannel;
+ IndyTCPChannel: TROIndyTCPChannel;
+ SuperTcpChannel: TROSuperTcpChannel;
+ IndyUDPChannel: TROIndyUDPChannel;
+ Memo: TMemo;
+ Panel1: TPanel;
+ GetServerTimeButton: TButton;
+ rgConnect: TRadioGroup;
+ IndySuperHttpChannel: TROIndySuperHttpChannel;
+ procedure GetServerTimeButtonClick(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ procedure FormDestroy(Sender: TObject);
+ private
+ CriticalSection: TCriticalSection;
+ function GetMultiChannelService: IMultiChannelService;
+ { Private declarations }
+ public
+ procedure Log(Astr: string);
+ { Public declarations }
+ end;
+
+var
+ MultiChannel_ClientMainForm: TMultiChannel_ClientMainForm;
+
+implementation
+
+{$R *.dfm}
+
+function TMultiChannel_ClientMainForm.GetMultiChannelService: IMultiChannelService;
+const
+ atargetUrl = 'http://localhost:%d/BIN';
+ aHost = '127.0.0.1';
+begin
+ case rgConnect.ItemIndex of
+ {IndyHTTPServer} 0: begin
+ RemoteService.Channel := WinInetHTTPChannel;
+ WinInetHTTPChannel.TargetURL := Format(atargetUrl, [8099]);
+ end;
+ {BPDXHTTPServer} 1: begin
+ RemoteService.Channel := WinInetHTTPChannel;
+ WinInetHTTPChannel.TargetURL := Format(atargetUrl, [8098]);
+ end;
+ {SuperTcpServer} 2: begin
+ RemoteService.Channel := SuperTcpChannel;
+ SuperTcpChannel.Host := aHost;
+ end;
+ {IndyTCPServer} 3: begin
+ RemoteService.Channel := IndyTCPChannel;
+ IndyTCPChannel.Host := aHost;
+ IndyTCPChannel.Port := 8090;
+ end;
+ {BPDXTCPServer} 4: begin
+ RemoteService.Channel := IndyTCPChannel;
+ IndyTCPChannel.Host := aHost;
+ IndyTCPChannel.Port := 8089;
+ end;
+ {LocalServer} 5: begin
+ RemoteService.Channel := LocalChannel;
+ end;
+ {IndyUDPServer} 6: begin
+ RemoteService.Channel := IndyUDPChannel;
+ IndyUDPChannel.Host := aHost;
+ IndyUDPChannel.Port := 8090;
+ end;
+ {NamedPipeServer} 7: begin
+ RemoteService.Channel := NamedPipeChannel;
+ end;
+ {WinMessageServer} 8: begin
+ RemoteService.Channel := WinMessageChannel;
+ end;
+ {SuperHTTPServer} 9: begin
+ RemoteService.Channel := IndySuperHttpChannel;
+ IndySuperHttpChannel.TargetURL := Format(atargetUrl, [8094]);
+ end;
+ else
+ {DLLChannel}
+ RemoteService.Channel := DLLChannel;
+ end;
+
+ RemoteService.Message := BinMessage;
+ Result := RemoteService as IMultiChannelService;
+end;
+
+procedure TMultiChannel_ClientMainForm.GetServerTimeButtonClick(
+ Sender: TObject);
+var
+ srv: IMultiChannelService;
+begin
+ srv := GetMultiChannelService;
+ Log('use ' + RemoteService.Channel.Name);
+ Log('GetServerTime');
+ Log('-------------');
+ Log('Receiving:'#9 + DateTimeToStr(srv.GetServerTime));
+ Log('');
+end;
+
+procedure TMultiChannel_ClientMainForm.Log(Astr: string);
+begin
+ CriticalSection.Enter;
+ try
+ Memo.Lines.Add(Astr);
+ finally
+ CriticalSection.Leave;
+ end;
+end;
+
+procedure TMultiChannel_ClientMainForm.FormCreate(Sender: TObject);
+begin
+ CriticalSection := TCriticalSection.Create;
+end;
+
+procedure TMultiChannel_ClientMainForm.FormDestroy(Sender: TObject);
+begin
+ CriticalSection.Free;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_DLLServer.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_DLLServer.bdsproj
new file mode 100644
index 0000000..cbeccf8
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_DLLServer.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {2DADBDE9-23D3-4ADF-A135-2D4863B03E6D}
+
+
+
+
+ MultiChannel_DLLServer.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_DLLServer.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_DLLServer.dpr
new file mode 100644
index 0000000..d6f53fc
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_DLLServer.dpr
@@ -0,0 +1,33 @@
+library MultiChannel_DLLServer;
+
+{#ROGEN:MultiChannelLibrary.rodl} // RemObjects: Careful, do not remove!
+{$R RODLFile.res}
+{$R *.res}
+
+uses
+ Windows,
+ uRODLLServer,
+ uROBinMessage,
+ MultiChannelLibrary_Intf in 'MultiChannelLibrary_Intf.pas',
+ MultiChannelLibrary_Invk in 'MultiChannelLibrary_Invk.pas',
+ MultiChannelService_Impl in 'MultiChannelService_Impl.pas';
+
+var BINMessage : TROBINMessage;
+
+procedure ROProc(Reason:integer);
+begin
+ case Reason of
+ DLL_PROCESS_ATTACH: begin
+ BINMessage := TROBINMessage.Create(NIL);
+ RegisterMessage(BINMessage);
+ end;
+ DLL_PROCESS_DETACH: begin
+ BINMessage.Free;
+ end;
+ end
+end;
+
+begin
+ DLLProc:=@ROProc;
+ ROProc(DLL_PROCESS_ATTACH)
+ end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_DLLServer.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_DLLServer.dproj
new file mode 100644
index 0000000..fcd0858
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_DLLServer.dproj
@@ -0,0 +1,72 @@
+
+
+ {adbefef6-fc25-4d38-b90a-93262644f71e}
+ MultiChannel_DLLServer.dpr
+ Debug
+ AnyCPU
+ DCC32
+ MultiChannel_DLLServer.dll
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ MultiChannel_DLLServer.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_DLLServer.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_DLLServer.res
new file mode 100644
index 0000000..08ba56e
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_DLLServer.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_Server.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_Server.bdsproj
new file mode 100644
index 0000000..d2b55cb
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_Server.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {BA98E525-3A13-445A-A955-C6C54296D4D7}
+
+
+
+
+ MultiChannel_Server.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_Server.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_Server.dpr
new file mode 100644
index 0000000..12d5046
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_Server.dpr
@@ -0,0 +1,20 @@
+program MultiChannel_Server;
+
+uses
+ Forms,
+ MultiChannel_ServerMain in 'MultiChannel_ServerMain.pas' {MultiChannel_ServerMainForm},
+ MultiChannelLibrary_Intf in 'MultiChannelLibrary_Intf.pas',
+ MultiChannelLibrary_Invk in 'MultiChannelLibrary_Invk.pas',
+ MultiChannelService_Impl in 'MultiChannelService_Impl.pas';
+
+{#ROGEN:MultiChannelLibrary.rodl} // RemObjects: Careful, do not remove!
+{$R RODLFile.res}
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'MultiChannel - Server';
+ Application.CreateForm(TMultiChannel_ServerMainForm, MultiChannel_ServerMainForm);
+ Application.Run;
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_Server.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_Server.dproj
new file mode 100644
index 0000000..78be504
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_Server.dproj
@@ -0,0 +1,75 @@
+
+
+ {afd44946-8e31-4a11-adce-eecf8dfa9da7}
+ MultiChannel_Server.dpr
+ Debug
+ AnyCPU
+ DCC32
+ MultiChannel_Server.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ MultiChannel_Server.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_Server.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_Server.res
new file mode 100644
index 0000000..b0dd731
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_Server.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_ServerMain.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_ServerMain.dfm
new file mode 100644
index 0000000..adbbbb6
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_ServerMain.dfm
@@ -0,0 +1,273 @@
+object MultiChannel_ServerMainForm: TMultiChannel_ServerMainForm
+ Left = 331
+ Top = 214
+ AutoScroll = False
+ Caption = 'MultiChannel_ServerMainForm'
+ ClientHeight = 295
+ ClientWidth = 386
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ OldCreateOrder = False
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ PixelsPerInch = 96
+ TextHeight = 13
+ object ROPoweredByRemObjectsButton1: TROPoweredByRemObjectsButton
+ Left = 96
+ Top = 3
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ end
+ object Memo: TMemo
+ Left = 0
+ Top = 128
+ Width = 386
+ Height = 166
+ Align = alCustom
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ ScrollBars = ssVertical
+ TabOrder = 9
+ end
+ object cbIndyHTTPServer: TCheckBox
+ Left = 7
+ Top = 57
+ Width = 120
+ Height = 17
+ Caption = 'IndyHTTPServer'
+ TabOrder = 0
+ OnClick = cbIndyHTTPServerClick
+ end
+ object cbBPDXHttpServer: TCheckBox
+ Left = 7
+ Top = 74
+ Width = 120
+ Height = 17
+ Caption = 'BPDXHttpServer'
+ TabOrder = 1
+ OnClick = cbBPDXHttpServerClick
+ end
+ object cbSuperTcpServer: TCheckBox
+ Left = 7
+ Top = 91
+ Width = 120
+ Height = 17
+ Caption = 'SuperTcpServer'
+ TabOrder = 2
+ OnClick = cbSuperTcpServerClick
+ end
+ object cbIndyTcpServer: TCheckBox
+ Left = 129
+ Top = 57
+ Width = 120
+ Height = 17
+ Caption = 'IndyTcpServer'
+ TabOrder = 3
+ OnClick = cbIndyTcpServerClick
+ end
+ object cbBPDXTcpServer: TCheckBox
+ Left = 129
+ Top = 74
+ Width = 120
+ Height = 17
+ Caption = 'BPDXTcpServer'
+ TabOrder = 4
+ OnClick = cbBPDXTcpServerClick
+ end
+ object cbIndyUdpServer: TCheckBox
+ Left = 129
+ Top = 91
+ Width = 120
+ Height = 17
+ Caption = 'IndyUdpServer'
+ TabOrder = 5
+ OnClick = cbIndyUdpServerClick
+ end
+ object cbNamedPipeServer: TCheckBox
+ Left = 250
+ Top = 57
+ Width = 120
+ Height = 17
+ Caption = 'NamedPipeServer'
+ TabOrder = 6
+ OnClick = cbNamedPipeServerClick
+ end
+ object cbWinMessageServer: TCheckBox
+ Left = 250
+ Top = 74
+ Width = 120
+ Height = 17
+ Caption = 'WinMessageServer'
+ TabOrder = 7
+ OnClick = cbWinMessageServerClick
+ end
+ object ErrorMemo: TMemo
+ Left = 0
+ Top = 111
+ Width = 386
+ Height = 201
+ Alignment = taCenter
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -25
+ Font.Name = 'Tahoma'
+ Font.Style = [fsBold]
+ Lines.Strings = (
+ ''
+ ''
+ 'Please activate '
+ 'at least one server!')
+ ParentFont = False
+ TabOrder = 10
+ end
+ object cbSuperHttpServer: TCheckBox
+ Left = 250
+ Top = 91
+ Width = 120
+ Height = 17
+ Caption = 'SuperHttpServer'
+ TabOrder = 8
+ OnClick = cbSuperHttpServerClick
+ end
+ object ROBinMessage: TROBinMessage
+ OnInitializeMessage = ROBinMessageInitializeMessage
+ Left = 330
+ Top = 243
+ end
+ object WinMessageServer: TROWinMessageServer
+ Dispatchers = <
+ item
+ Name = 'ROBinMessage'
+ Message = ROBinMessage
+ Enabled = True
+ end>
+ OnWriteToStream = stub
+ OnReadFromStream = stub
+ ServerID = '{30221B5E-6C56-4A91-A4E4-455BB3DA22B9}'
+ Left = 266
+ Top = 192
+ end
+ object NamedPipeServer: TRONamedPipeServer
+ Dispatchers = <
+ item
+ Name = 'ROBinMessage'
+ Message = ROBinMessage
+ Enabled = True
+ end>
+ ServerID = 'MultiChannel_ServerMainForm_NamedPipeServer'
+ Left = 265
+ Top = 148
+ end
+ object IndyHTTPServer: TROIndyHTTPServer
+ Dispatchers = <
+ item
+ Name = 'ROBinMessage'
+ Message = ROBinMessage
+ Enabled = True
+ PathInfo = 'Bin'
+ end>
+ Port = 8099
+ Left = 15
+ Top = 139
+ end
+ object IndyTCPServer: TROIndyTCPServer
+ Dispatchers = <
+ item
+ Name = 'ROBinMessage'
+ Message = ROBinMessage
+ Enabled = True
+ end>
+ Port = 8090
+ Left = 144
+ Top = 144
+ end
+ object SuperTcpServer: TROSuperTcpServer
+ Dispatchers = <
+ item
+ Name = 'ROBinMessage'
+ Message = ROBinMessage
+ Enabled = True
+ end>
+ Left = 30
+ Top = 189
+ end
+ object IndyUDPServer: TROIndyUDPServer
+ Dispatchers = <
+ item
+ Name = 'ROBinMessage'
+ Message = ROBinMessage
+ Enabled = True
+ end>
+ IndyUDPServer.Bindings = <>
+ IndyUDPServer.DefaultPort = 8090
+ Port = 8090
+ Left = 154
+ Top = 194
+ end
+ object BPDXTCPServer: TROBPDXTCPServer
+ Dispatchers = <
+ item
+ Name = 'ROBinMessage'
+ Message = ROBinMessage
+ Enabled = True
+ end>
+ BPDXServer.ReleaseDate = '2002-09-01'
+ BPDXServer.ListenerThreadPriority = tpIdle
+ BPDXServer.SpawnedThreadPriority = tpIdle
+ BPDXServer.Suspend = False
+ BPDXServer.UseSSL = False
+ BPDXServer.UseThreadPool = False
+ BPDXServer.ServerPort = 8089
+ BPDXServer.ProtocolToBind = wpTCPOnly
+ BPDXServer.SocketOutputBufferSize = bsfNormal
+ BPDXServer.ServerType = stThreadBlocking
+ BPDXServer.ThreadCacheSize = 10
+ Port = 8089
+ Left = 171
+ Top = 145
+ end
+ object BPDXHTTPServer: TROBPDXHTTPServer
+ Dispatchers = <
+ item
+ Name = 'ROBinMessage'
+ Message = ROBinMessage
+ Enabled = True
+ PathInfo = 'Bin'
+ end>
+ BPDXServer.ReleaseDate = '2002-09-01'
+ BPDXServer.ListenerThreadPriority = tpIdle
+ BPDXServer.SpawnedThreadPriority = tpIdle
+ BPDXServer.Suspend = False
+ BPDXServer.UseSSL = False
+ BPDXServer.UseThreadPool = False
+ BPDXServer.ServerPort = 8098
+ BPDXServer.ProtocolToBind = wpTCPOnly
+ BPDXServer.SocketOutputBufferSize = bsfNormal
+ BPDXServer.ServerType = stThreadBlocking
+ BPDXServer.ThreadCacheSize = 10
+ BPDXServer.Timeout = 50000
+ BPDXServer.SupportKeepAlive = False
+ Port = 8098
+ SupportKeepAlive = False
+ Left = 42
+ Top = 139
+ end
+ object SuperHttpServer: TROIpSuperHttpServer
+ Dispatchers = <
+ item
+ Name = 'ROBinMessage'
+ Message = ROBinMessage
+ Enabled = True
+ PathInfo = 'Bin'
+ end>
+ Port = 8094
+ ServerName = 'RemObjects SDK Super IpHttp Server for Delphi'
+ Left = 328
+ Top = 152
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_ServerMain.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_ServerMain.pas
new file mode 100644
index 0000000..e67d2d9
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Multi Channel/MultiChannel_ServerMain.pas
@@ -0,0 +1,194 @@
+unit MultiChannel_ServerMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ uROClientIntf, SyncObjs, uROBPDXHTTPServer, uROBPDXTCPServer,
+ uROIndyUDPServer, uROSuperTCPServer, uROIndyTCPServer, uROIndyHTTPServer,
+ uRONamedPipeServer, uROClient, uROServer, uROWinMessageServer,
+ uROBinMessage, StdCtrls, uROPoweredByRemObjectsButton,
+ uROBaseSuperHttpServer, uROIpSuperHttpServer;
+
+type
+ TMultiChannel_ServerMainForm = class(TForm)
+ ROPoweredByRemObjectsButton1: TROPoweredByRemObjectsButton;
+ ROBinMessage: TROBinMessage;
+ WinMessageServer: TROWinMessageServer;
+ NamedPipeServer: TRONamedPipeServer;
+ IndyHTTPServer: TROIndyHTTPServer;
+ IndyTCPServer: TROIndyTCPServer;
+ SuperTcpServer: TROSuperTcpServer;
+ IndyUDPServer: TROIndyUDPServer;
+ BPDXTCPServer: TROBPDXTCPServer;
+ BPDXHTTPServer: TROBPDXHTTPServer;
+ Memo: TMemo;
+ cbIndyHTTPServer: TCheckBox;
+ cbBPDXHttpServer: TCheckBox;
+ cbSuperTcpServer: TCheckBox;
+ cbIndyTcpServer: TCheckBox;
+ cbBPDXTcpServer: TCheckBox;
+ cbIndyUdpServer: TCheckBox;
+ cbNamedPipeServer: TCheckBox;
+ cbWinMessageServer: TCheckBox;
+ ErrorMemo: TMemo;
+ SuperHttpServer: TROIpSuperHttpServer;
+ cbSuperHttpServer: TCheckBox;
+ procedure ROBinMessageInitializeMessage(Sender: TROMessage;
+ const aTransport: IROTransport; const anInterfaceName,
+ aMessageName: string);
+ procedure stub(aStream: TStream);
+ procedure FormCreate(Sender: TObject);
+ procedure FormDestroy(Sender: TObject);
+ procedure cbIndyHTTPServerClick(Sender: TObject);
+ procedure cbBPDXHttpServerClick(Sender: TObject);
+ procedure cbSuperTcpServerClick(Sender: TObject);
+ procedure cbIndyTcpServerClick(Sender: TObject);
+ procedure cbBPDXTcpServerClick(Sender: TObject);
+ procedure cbLocalServerClick(Sender: TObject);
+ procedure cbIndyUdpServerClick(Sender: TObject);
+ procedure cbNamedPipeServerClick(Sender: TObject);
+ procedure cbWinMessageServerClick(Sender: TObject);
+ procedure EmailServerException(aSender: TObject;
+ aExceptionClass: TClass; const aExceptionMessage: string);
+ procedure cbSuperHttpServerClick(Sender: TObject);
+ private
+ { Private declarations }
+ CriticalSection: tCriticalSection;
+ procedure ActivateServer(Server: TROServer; Mode: Boolean);
+ public
+ procedure Log(Astr: string);
+ { Public declarations }
+ end;
+
+var
+ MultiChannel_ServerMainForm: TMultiChannel_ServerMainForm;
+
+implementation
+uses Dialogs;
+{$R *.dfm}
+
+procedure TMultiChannel_ServerMainForm.Log(Astr: string);
+begin
+ CriticalSection.Enter;
+ try
+ Memo.Lines.Add(Astr);
+ finally
+ CriticalSection.Leave;
+ end;
+end;
+
+procedure TMultiChannel_ServerMainForm.ROBinMessageInitializeMessage(
+ Sender: TROMessage; const aTransport: IROTransport;
+ const anInterfaceName, aMessageName: string);
+begin
+ Log('Connect via ' + Tobject(aTransport.GetTransportObject).ClassName);
+ Log(anInterfaceName + ':'#9 + StringReplace(aMessageName, 'Response', '', []));
+ Log('');
+end;
+
+procedure TMultiChannel_ServerMainForm.stub(aStream: TStream);
+begin
+ // stub for prevention of a error
+end;
+
+procedure TMultiChannel_ServerMainForm.FormCreate(Sender: TObject);
+begin
+ CriticalSection := TCriticalSection.Create;
+end;
+
+procedure TMultiChannel_ServerMainForm.FormDestroy(Sender: TObject);
+begin
+ CriticalSection.Free;
+end;
+
+procedure TMultiChannel_ServerMainForm.cbIndyHTTPServerClick(
+ Sender: TObject);
+begin
+ ActivateServer(IndyHTTPServer, TCheckBox(Sender).Checked);
+end;
+
+procedure TMultiChannel_ServerMainForm.cbBPDXHttpServerClick(
+ Sender: TObject);
+begin
+ ActivateServer(BPDXHttpServer, TCheckBox(Sender).Checked);
+end;
+
+procedure TMultiChannel_ServerMainForm.cbSuperTcpServerClick(
+ Sender: TObject);
+begin
+ ActivateServer(SuperTcpServer, TCheckBox(Sender).Checked);
+end;
+
+procedure TMultiChannel_ServerMainForm.cbIndyTcpServerClick(
+ Sender: TObject);
+begin
+ ActivateServer(IndyTcpServer, TCheckBox(Sender).Checked);
+end;
+
+procedure TMultiChannel_ServerMainForm.cbBPDXTcpServerClick(
+ Sender: TObject);
+begin
+ ActivateServer(BPDXTcpServer, TCheckBox(Sender).Checked);
+end;
+
+procedure TMultiChannel_ServerMainForm.cbLocalServerClick(Sender: TObject);
+begin
+ Log('This server can be tested only on client side.')
+end;
+
+procedure TMultiChannel_ServerMainForm.cbIndyUdpServerClick(
+ Sender: TObject);
+begin
+ ActivateServer(IndyUdpServer, TCheckBox(Sender).Checked);
+end;
+
+procedure TMultiChannel_ServerMainForm.cbNamedPipeServerClick(
+ Sender: TObject);
+begin
+ ActivateServer(NamedPipeServer, TCheckBox(Sender).Checked);
+end;
+
+procedure TMultiChannel_ServerMainForm.cbWinMessageServerClick(
+ Sender: TObject);
+begin
+ ActivateServer(WinMessageServer, TCheckBox(Sender).Checked);
+end;
+
+procedure TMultiChannel_ServerMainForm.ActivateServer(Server: TROServer;
+ Mode: Boolean);
+begin
+ Server.Active := Mode;
+ Memo.Visible :=
+ WinMessageServer.Active or
+ NamedPipeServer.Active or
+ IndyHTTPServer.Active or
+ IndyTCPServer.Active or
+ SuperTcpServer.Active or
+ IndyUDPServer.Active or
+ BPDXTCPServer.Active or
+ BPDXHTTPServer.Active or
+ SuperHTTPServer.Active;
+ ErrorMemo.Visible := not Memo.Visible;
+ if Server.Active then
+ Log(Server.Name + ' is activated!')
+ else
+ Log(Server.Name + ' is deactivated!');
+ Log('');
+end;
+
+procedure TMultiChannel_ServerMainForm.EmailServerException(
+ aSender: TObject; aExceptionClass: TClass;
+ const aExceptionMessage: string);
+begin
+ ShowMessage('There was a problem in the Email Server Thread:'#13#13 + aExceptionClass.ClassName + ': ' + aExceptionMessage);
+end;
+
+procedure TMultiChannel_ServerMainForm.cbSuperHttpServerClick(
+ Sender: TObject);
+begin
+ ActivateServer(SuperHttpServer, TCheckBox(Sender).Checked);
+end;
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeClient.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeClient.bdsproj
new file mode 100644
index 0000000..969da59
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeClient.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {719372BB-8DF9-4BCE-9A45-BF4A9D7C6CEE}
+
+
+
+
+ NamedPipeClient.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeClient.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeClient.dpr
new file mode 100644
index 0000000..624ee70
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeClient.dpr
@@ -0,0 +1,15 @@
+program NamedPipeClient;
+
+uses
+ uROComInit,
+ Forms,
+ NamedPipeClientMain in 'NamedPipeClientMain.pas' {NamedPipeClientMainForm};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'Named Pipes Client';
+ Application.CreateForm(TNamedPipeClientMainForm, NamedPipeClientMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeClient.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeClient.dproj
new file mode 100644
index 0000000..8533e05
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeClient.dproj
@@ -0,0 +1,72 @@
+
+
+ {74686689-c7fb-4b01-b7a9-40feaee9825d}
+ NamedPipeClient.dpr
+ Debug
+ AnyCPU
+ DCC32
+ NamedPipeClient.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ NamedPipeClient.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeClient.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeClient.res
new file mode 100644
index 0000000..90e4219
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeClient.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeClientMain.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeClientMain.dfm
new file mode 100644
index 0000000..a260b6c
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeClientMain.dfm
@@ -0,0 +1,73 @@
+object NamedPipeClientMainForm: TNamedPipeClientMainForm
+ Left = 240
+ Top = 150
+ AutoScroll = False
+ Caption = 'Named Pipes Client'
+ ClientHeight = 306
+ ClientWidth = 379
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ PixelsPerInch = 96
+ TextHeight = 13
+ object GetPathButton: TButton
+ Left = 9
+ Top = 12
+ Width = 75
+ Height = 25
+ Caption = 'Get Path'
+ TabOrder = 0
+ OnClick = GetPathButtonClick
+ end
+ object Memo: TMemo
+ Left = 7
+ Top = 52
+ Width = 365
+ Height = 245
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ TabOrder = 3
+ end
+ object UpTimeButton: TButton
+ Left = 88
+ Top = 12
+ Width = 91
+ Height = 25
+ Caption = 'Server UpTime'
+ TabOrder = 1
+ OnClick = UpTimeButtonClick
+ end
+ object GetConnectedUsersCountButton: TButton
+ Left = 182
+ Top = 12
+ Width = 148
+ Height = 25
+ Caption = 'Get Connected Users Count'
+ TabOrder = 2
+ OnClick = GetConnectedUsersCountButtonClick
+ end
+ object ROMessage: TROBinMessage
+ Left = 132
+ Top = 66
+ end
+ object ROChannel: TRONamedPipeChannel
+ ServerLocators = <>
+ DispatchOptions = []
+ ServerID = 'NamedPipeServerService_ID'
+ ServerName = '.'
+ Left = 104
+ Top = 66
+ end
+ object RONamedPipeServer: TRORemoteService
+ Message = ROMessage
+ Channel = ROChannel
+ ServiceName = 'NamedPipeService'
+ Left = 160
+ Top = 66
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeClientMain.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeClientMain.pas
new file mode 100644
index 0000000..dfd160f
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeClientMain.pas
@@ -0,0 +1,63 @@
+unit NamedPipeClientMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
+ uROClient, uROClientIntf, uRORemoteService, uROBinMessage, uRONamedPipeChannel, NamedPipeLibrary_Intf;
+type
+ TNamedPipeClientMainForm = class(TForm)
+ ROMessage: TROBinMessage;
+ ROChannel: TRONamedPipeChannel;
+ RONamedPipeServer: TRORemoteService;
+ GetPathButton: TButton;
+ Memo: TMemo;
+ UpTimeButton: TButton;
+ GetConnectedUsersCountButton: TButton;
+ procedure GetPathButtonClick(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ procedure UpTimeButtonClick(Sender: TObject);
+ procedure GetConnectedUsersCountButtonClick(Sender: TObject);
+ private
+ { Private declarations }
+ FService: INamedPipeService;
+ public
+ { Public declarations }
+ end;
+
+var
+ NamedPipeClientMainForm: TNamedPipeClientMainForm;
+
+implementation
+
+{$R *.dfm}
+
+procedure TNamedPipeClientMainForm.GetPathButtonClick(Sender: TObject);
+begin
+ Memo.Lines.text := StringReplace(FService.getPath, ';', sLineBreak, [rfReplaceAll]);
+end;
+
+procedure TNamedPipeClientMainForm.FormCreate(Sender: TObject);
+begin
+ FService := RONamedPipeServer as INamedPipeService;
+end;
+
+procedure TNamedPipeClientMainForm.UpTimeButtonClick(Sender: TObject);
+var
+ uptime: TDateTime;
+ d, h, m, s, ms: word;
+begin
+ uptime := FService.UpTime;
+ d := Trunc(UpTime);
+ DecodeTime(uptime, h, m, s, ms);
+ Memo.Lines.text := Format('Server uptime is %d day %d hour %d min %d sec', [d, h, m, s]);
+end;
+
+procedure TNamedPipeClientMainForm.GetConnectedUsersCountButtonClick(
+ Sender: TObject);
+begin
+ Memo.Lines.text := 'Connected users on server is ' + IntToStr(FService.GetConnectedUsersCount);
+end;
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeGroup.Sample.html b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeGroup.Sample.html
new file mode 100644
index 0000000..5f0e355
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeGroup.Sample.html
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+ Named Pipes Sample
+
+
+Purpose
+
+This example shows the use of a named pipe connection. It creates a named pipe server as a Windows service.
+
+Getting Started
+
+ Build or compile both projects.
+ Run the install_service.cmd file provided.
+ Run the NamedPipeClient.exe .
+
+
+Note
+To uninstall the NamedPipeServer.exe, run the uninstall_service.cmd
+ file provided.
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeGroup.bdsgroup b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeGroup.bdsgroup
new file mode 100644
index 0000000..8de25da
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeGroup.bdsgroup
@@ -0,0 +1,20 @@
+
+
+
+
+ Default.Personality
+
+ 1.0
+ {C6608595-D771-4271-B8AC-4D3056ECEDFD}
+
+
+
+
+
+ NamedPipeServer.bdsproj
+ NamedPipeClient.bdsproj
+ NamedPipeServer.exe NamedPipeClient.exe
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeGroup.bpg b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeGroup.bpg
new file mode 100644
index 0000000..070893c
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeGroup.bpg
@@ -0,0 +1,23 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = NamedPipeServer.exe NamedPipeClient.exe
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+NamedPipeServer.exe: NamedPipeServer.dpr
+ $(DCC)
+
+NamedPipeClient.exe: NamedPipeClient.dpr
+ $(DCC)
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeGroup.groupproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeGroup.groupproj
new file mode 100644
index 0000000..c750633
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeGroup.groupproj
@@ -0,0 +1,40 @@
+
+
+ {08382df8-e356-42f2-9a54-b54aca159b7f}
+
+
+
+
+ Default.Personality
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeLibrary.rodl b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeLibrary.rodl
new file mode 100644
index 0000000..c9a8964
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeLibrary.rodl
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeLibrary_Intf.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeLibrary_Intf.pas
new file mode 100644
index 0000000..734a7ad
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeLibrary_Intf.pas
@@ -0,0 +1,123 @@
+unit NamedPipeLibrary_Intf;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROClasses, uROClient, uROTypes, uROClientIntf;
+
+const
+ { Library ID }
+ LibraryUID = '{BC2D6352-25BF-4A67-A9DD-9ED1CEE3DE20}';
+
+ { Service Interface ID's }
+ INamedPipeService_IID : TGUID = '{DCD778A1-C1C3-485F-B723-D4997B7AA972}';
+
+ { Event ID's }
+
+type
+ { Forward declarations }
+ INamedPipeService = interface;
+
+
+ { INamedPipeService }
+ INamedPipeService = interface
+ ['{DCD778A1-C1C3-485F-B723-D4997B7AA972}']
+ function GetPath: String;
+ function GetConnectedUsersCount: Integer;
+ function UpTime: DateTime;
+ end;
+
+ { CoNamedPipeService }
+ CoNamedPipeService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): INamedPipeService;
+ end;
+
+ { TNamedPipeService_Proxy }
+ TNamedPipeService_Proxy = class(TROProxy, INamedPipeService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ function GetPath: String;
+ function GetConnectedUsersCount: Integer;
+ function UpTime: DateTime;
+ end;
+
+implementation
+
+uses
+ {vcl:} SysUtils,
+ {RemObjects:} uROEventRepository, uRORes;
+
+{ CoNamedPipeService }
+
+class function CoNamedPipeService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): INamedPipeService;
+begin
+ result := TNamedPipeService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TNamedPipeService_Proxy }
+
+function TNamedPipeService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'NamedPipeService';
+end;
+
+function TNamedPipeService_Proxy.GetPath: String;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'NamedPipeLibrary', __InterfaceName, 'GetPath');
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(String), result, []);
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+function TNamedPipeService_Proxy.GetConnectedUsersCount: Integer;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'NamedPipeLibrary', __InterfaceName, 'GetConnectedUsersCount');
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Integer), result, []);
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+function TNamedPipeService_Proxy.UpTime: DateTime;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'NamedPipeLibrary', __InterfaceName, 'UpTime');
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(DateTime), result, [paIsDateTime]);
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+initialization
+ RegisterProxyClass(INamedPipeService_IID, TNamedPipeService_Proxy);
+
+
+finalization
+ UnregisterProxyClass(INamedPipeService_IID);
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeLibrary_Invk.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeLibrary_Invk.pas
new file mode 100644
index 0000000..6de9350
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeLibrary_Invk.pas
@@ -0,0 +1,83 @@
+unit NamedPipeLibrary_Invk;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes,
+ {RemObjects:} uROServer, uROServerIntf, uROTypes, uROClientIntf,
+ {Generated:} NamedPipeLibrary_Intf;
+
+type
+ TNamedPipeService_Invoker = class(TROInvoker)
+ private
+ protected
+ published
+ procedure Invoke_GetPath(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_GetConnectedUsersCount(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_UpTime(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ end;
+
+implementation
+
+uses
+ {RemObjects:} uRORes, uROClient;
+
+{ TNamedPipeService_Invoker }
+
+procedure TNamedPipeService_Invoker.Invoke_GetPath(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function GetPath: String; }
+var
+ lResult: String;
+begin
+ try
+ lResult := (__Instance as INamedPipeService).GetPath;
+
+ __Message.InitializeResponseMessage(__Transport, 'NamedPipeLibrary', 'NamedPipeService', 'GetPathResponse');
+ __Message.Write('Result', TypeInfo(String), lResult, []);
+ __Message.Finalize;
+
+ finally
+ end;
+end;
+
+procedure TNamedPipeService_Invoker.Invoke_GetConnectedUsersCount(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function GetConnectedUsersCount: Integer; }
+var
+ lResult: Integer;
+begin
+ try
+ lResult := (__Instance as INamedPipeService).GetConnectedUsersCount;
+
+ __Message.InitializeResponseMessage(__Transport, 'NamedPipeLibrary', 'NamedPipeService', 'GetConnectedUsersCountResponse');
+ __Message.Write('Result', TypeInfo(Integer), lResult, []);
+ __Message.Finalize;
+
+ finally
+ end;
+end;
+
+procedure TNamedPipeService_Invoker.Invoke_UpTime(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function UpTime: DateTime; }
+var
+ lResult: DateTime;
+begin
+ try
+ lResult := (__Instance as INamedPipeService).UpTime;
+
+ __Message.InitializeResponseMessage(__Transport, 'NamedPipeLibrary', 'NamedPipeService', 'UpTimeResponse');
+ __Message.Write('Result', TypeInfo(DateTime), lResult, [paIsDateTime]);
+ __Message.Finalize;
+
+ finally
+ end;
+end;
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeServer.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeServer.bdsproj
new file mode 100644
index 0000000..ecfe67d
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeServer.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {E880430F-87BE-47DD-9F9F-0BBCC7A322F7}
+
+
+
+
+ NamedPipeServer.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeServer.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeServer.dpr
new file mode 100644
index 0000000..3a4d969
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeServer.dpr
@@ -0,0 +1,21 @@
+program NamedPipeServer;
+
+{#ROGEN:NamedPipeLibrary.rodl} // RemObjects: Careful, do not remove!
+
+uses
+ uROComInit,
+ SvcMgr,
+ NamedPipeServerMain in 'NamedPipeServerMain.pas' {NamedPipeServerService: TService},
+ NamedPipeLibrary_Intf in 'NamedPipeLibrary_Intf.pas',
+ NamedPipeLibrary_Invk in 'NamedPipeLibrary_Invk.pas',
+ NamedPipeService_Impl in 'NamedPipeService_Impl.pas';
+
+{$R *.RES}
+{$R RODLFile.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'Named Pipes Server';
+ Application.CreateForm(TNamedPipeServerService, NamedPipeServerService);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeServer.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeServer.dproj
new file mode 100644
index 0000000..d40cb68
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeServer.dproj
@@ -0,0 +1,75 @@
+
+
+ {12bb6a7e-498d-4663-8c5d-bce90c5e41a8}
+ NamedPipeServer.dpr
+ Debug
+ AnyCPU
+ DCC32
+ NamedPipeServer.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ NamedPipeServer.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeServer.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeServer.res
new file mode 100644
index 0000000..95e15d9
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeServer.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeServerMain.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeServerMain.dfm
new file mode 100644
index 0000000..4bef3b6
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeServerMain.dfm
@@ -0,0 +1,27 @@
+object NamedPipeServerService: TNamedPipeServerService
+ OldCreateOrder = False
+ DisplayName = 'NamedPipeServerService'
+ OnContinue = ServiceContinue
+ OnPause = ServicePause
+ OnStart = ServiceStart
+ OnStop = ServiceStop
+ Left = 158
+ Top = 156
+ Height = 171
+ Width = 215
+ object ROMessage: TROBinMessage
+ Left = 55
+ Top = 52
+ end
+ object ROServer: TRONamedPipeServer
+ Dispatchers = <
+ item
+ Name = 'ROMessage'
+ Message = ROMessage
+ Enabled = True
+ end>
+ ServerID = 'NamedPipeServerService_ID'
+ Left = 56
+ Top = 8
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeServerMain.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeServerMain.pas
new file mode 100644
index 0000000..c03099a
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeServerMain.pas
@@ -0,0 +1,61 @@
+unit NamedPipeServerMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, SvcMgr, Dialogs,
+ uROClient, uROClientIntf, uROServer, uROBinMessage, uRONamedPipeServer;
+
+type
+ TNamedPipeServerService = class(TService)
+ ROMessage: TROBinMessage;
+ ROServer: TRONamedPipeServer;
+ procedure ServiceStart(Sender: TService; var Started: Boolean);
+ procedure ServiceStop(Sender: TService; var Stopped: Boolean);
+ procedure ServicePause(Sender: TService; var Paused: Boolean);
+ procedure ServiceContinue(Sender: TService; var Continued: Boolean);
+ private
+ { Private declarations }
+ public
+ function GetServiceController: TServiceController; override;
+ { Public declarations }
+ end;
+
+var
+ NamedPipeServerService: TNamedPipeServerService;
+
+implementation
+
+{$R *.dfm}
+
+procedure ServiceController(CtrlCode: DWord); stdcall;
+begin
+ NamedPipeServerService.Controller(CtrlCode);
+end;
+
+function TNamedPipeServerService.GetServiceController: TServiceController;
+begin
+ Result := ServiceController;
+end;
+
+procedure TNamedPipeServerService.ServiceStart(Sender:TService; var Started:Boolean);
+begin
+ RoServer.Active := true;
+end;
+
+procedure TNamedPipeServerService.ServiceStop(Sender:TService; var Stopped:Boolean);
+begin
+ RoServer.Active := false;
+end;
+
+procedure TNamedPipeServerService.ServicePause(Sender:TService; var Paused:Boolean);
+begin
+ RoServer.Active := false;
+end;
+
+procedure TNamedPipeServerService.ServiceContinue(Sender:TService; var Continued:Boolean);
+begin
+ RoServer.Active := true;
+end;
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeService_Impl.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeService_Impl.pas
new file mode 100644
index 0000000..df3fbd5
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/NamedPipeService_Impl.pas
@@ -0,0 +1,63 @@
+unit NamedPipeService_Impl;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ This is where you are supposed to code the implementation of your objects. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils,
+ {RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
+ {Generated:} NamedPipeLibrary_Intf;
+
+type
+ { TNamedPipeService }
+ TNamedPipeService = class(TRORemotable, INamedPipeService)
+ private
+ protected
+ { INamedPipeService methods }
+ function GetPath: string;
+ function GetConnectedUsersCount: Integer;
+ function UpTime: DateTime;
+ end;
+
+implementation
+
+uses
+ {Generated:} NamedPipeLibrary_Invk,
+ Windows;
+
+procedure Create_NamedPipeService(out anInstance: IUnknown);
+begin
+ anInstance := TNamedPipeService.Create;
+end;
+
+{ NamedPipeService }
+
+function TNamedPipeService.GetConnectedUsersCount: Integer;
+begin
+ Result := Random(100);
+end;
+
+function TNamedPipeService.GetPath: string;
+begin
+ Result := GetEnvironmentVariable('Path');
+end;
+
+function TNamedPipeService.UpTime: DateTime;
+begin
+ Result := GetTickCount / MSecsPerDay;
+end;
+
+initialization
+ Randomize;
+ TROClassFactory.Create('NamedPipeService', Create_NamedPipeService, TNamedPipeService_Invoker);
+
+finalization
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/RODLFILE.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/RODLFILE.res
new file mode 100644
index 0000000..043c4ab
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/RODLFILE.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/install_service.cmd b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/install_service.cmd
new file mode 100644
index 0000000..61927ad
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/install_service.cmd
@@ -0,0 +1,2 @@
+NamedPipeServer.exe /install
+net start NamedPipeServerService
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/uninstall_service.cmd b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/uninstall_service.cmd
new file mode 100644
index 0000000..239d0a6
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Named Pipes/uninstall_service.cmd
@@ -0,0 +1,2 @@
+net stop NamedPipeServerService
+NamedPipeServer.exe /uninstall
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer.Sample.html b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer.Sample.html
new file mode 100644
index 0000000..13caf4e
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer.Sample.html
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+ Proxy Server Sample
+
+
+
+Purpose
+
+This example shows how to create a proxy server to redirect the calls to another
+ server without having to recreate the RODL file, thus allowing the use of the same types of the original server.
+This provides total control. As every call will pass from the proxy class before going to the real server, you can even stop methods from being dispatched any further.
+
+
+ProxyServer_ProxyServer_Impl was created by simply copying the original MainService_Impl.pas file, renaming the TMainService class to TProxyService followed by implementing a bypass for all the method calls. This class is basically a server which accesses a RemObjects SDK server as a client would do.
+
+Getting Started
+Launch both servers and run the client.
+The client allows you to select either server. When you execute a method using the Proxy Server, you will see both servers log the call.
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer.bdsgroup b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer.bdsgroup
new file mode 100644
index 0000000..adffb7a
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer.bdsgroup
@@ -0,0 +1,21 @@
+
+
+
+
+ Default.Personality
+
+ 1.0
+ {ED015953-5EDB-4C12-976E-0004BA278DA8}
+
+
+
+
+
+ ProxyServer_MainServer.bdsproj
+ ProxyServer_Client.bdsproj
+ ProxyServer_ProxyServer.bdsproj
+ ProxyServer_MainServer.exe ProxyServer_Client.exe ProxyServer_ProxyServer.exe
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer.bpg b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer.bpg
new file mode 100644
index 0000000..10a7447
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer.bpg
@@ -0,0 +1,26 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = ProxyServer_MainServer.exe ProxyServer_Client.exe ProxyServer_ProxyServer.exe
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+ProxyServer_MainServer.exe: ProxyServer_MainServer.dpr
+ $(DCC)
+
+ProxyServer_Client.exe: ProxyServer_Client.dpr
+ $(DCC)
+
+ProxyServer_ProxyServer.exe: ProxyServer_ProxyServer.dpr
+ $(DCC)
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer.groupproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer.groupproj
new file mode 100644
index 0000000..c758a07
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer.groupproj
@@ -0,0 +1,49 @@
+
+
+ {908dd4fb-64f2-4f8b-b627-9f3ff95b8990}
+
+
+
+
+ Default.Personality
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServerMainLibrary.rodl b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServerMainLibrary.rodl
new file mode 100644
index 0000000..f891a62
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServerMainLibrary.rodl
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServerMainLibrary_Intf.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServerMainLibrary_Intf.pas
new file mode 100644
index 0000000..9b4dcf1
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServerMainLibrary_Intf.pas
@@ -0,0 +1,194 @@
+unit ProxyServerMainLibrary_Intf;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROClasses, uROClient, uROTypes, uROClientIntf;
+
+const
+ { Library ID }
+ LibraryUID = '{00B1E82E-7479-4679-AB2F-4D18228C6F44}';
+
+ { Service Interface ID's }
+ IProxyServerMainService_IID : TGUID = '{00B1E82E-7479-4679-AB2F-4D18228C6F44}';
+
+ { Event ID's }
+
+type
+ { Forward declarations }
+ IProxyServerMainService = interface;
+
+ TestStruct = class;
+
+
+ { TestStruct }
+ TestStruct = class(TROComplexType)
+ private
+ fName: String;
+ fIntNumber: Integer;
+ public
+ procedure Assign(iSource: TPersistent); override;
+ published
+ property Name:String read fName write fName;
+ property IntNumber:Integer read fIntNumber write fIntNumber;
+ end;
+
+ { TestStructCollection }
+ TestStructCollection = class(TROCollection)
+ protected
+ constructor Create(aItemClass: TCollectionItemClass); overload;
+ function GetItems(Index: integer): TestStruct;
+ procedure SetItems(Index: integer; const Value: TestStruct);
+ public
+ constructor Create; overload;
+ function Add: TestStruct; reintroduce;
+ property Items[Index: integer]:TestStruct read GetItems write SetItems; default;
+ end;
+
+ { IProxyServerMainService }
+ IProxyServerMainService = interface
+ ['{00B1E82E-7479-4679-AB2F-4D18228C6F44}']
+ function Sum(const A: Integer; const B: Integer): Integer;
+ function GetServerTime: DateTime;
+ function EchoStruct(const aTestStruct: TestStruct): TestStruct;
+ end;
+
+ { CoProxyServerMainService }
+ CoProxyServerMainService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IProxyServerMainService;
+ end;
+
+ { TProxyServerMainService_Proxy }
+ TProxyServerMainService_Proxy = class(TROProxy, IProxyServerMainService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ function Sum(const A: Integer; const B: Integer): Integer;
+ function GetServerTime: DateTime;
+ function EchoStruct(const aTestStruct: TestStruct): TestStruct;
+ end;
+
+implementation
+
+uses
+ {vcl:} SysUtils,
+ {RemObjects:} uROEventRepository, uRORes;
+
+{ TestStruct }
+
+procedure TestStruct.Assign(iSource: TPersistent);
+var lSource:TestStruct;
+begin
+ inherited Assign(iSource);
+ if (iSource is TestStruct) then begin
+ lSource := TestStruct(iSource);
+ Name := lSource.Name;
+ IntNumber := lSource.IntNumber;
+ end;
+end;
+
+{ TestStructCollection }
+constructor TestStructCollection.Create;
+begin
+ inherited Create(TestStruct);
+end;
+
+constructor TestStructCollection.Create(aItemClass: TCollectionItemClass);
+begin
+ inherited Create(aItemClass);
+end;
+
+function TestStructCollection.Add: TestStruct;
+begin
+ result := TestStruct(inherited Add);
+end;
+
+function TestStructCollection.GetItems(Index: integer): TestStruct;
+begin
+ result := TestStruct(inherited Items[Index]);
+end;
+
+procedure TestStructCollection.SetItems(Index: integer; const Value: TestStruct);
+begin
+ TestStruct(inherited Items[Index]).Assign(Value);
+end;
+
+{ CoProxyServerMainService }
+
+class function CoProxyServerMainService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IProxyServerMainService;
+begin
+ result := TProxyServerMainService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TProxyServerMainService_Proxy }
+
+function TProxyServerMainService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'ProxyServerMainService';
+end;
+
+function TProxyServerMainService_Proxy.Sum(const A: Integer; const B: Integer): Integer;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'ProxyServerMainLibrary', __InterfaceName, 'Sum');
+ __Message.Write('A', TypeInfo(Integer), A, []);
+ __Message.Write('B', TypeInfo(Integer), B, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Integer), result, []);
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+function TProxyServerMainService_Proxy.GetServerTime: DateTime;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'ProxyServerMainLibrary', __InterfaceName, 'GetServerTime');
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(DateTime), result, [paIsDateTime]);
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+function TProxyServerMainService_Proxy.EchoStruct(const aTestStruct: TestStruct): TestStruct;
+begin
+ try
+ result := nil;
+ __Message.InitializeRequestMessage(__TransportChannel, 'ProxyServerMainLibrary', __InterfaceName, 'EchoStruct');
+ __Message.Write('aTestStruct', TypeInfo(ProxyServerMainLibrary_Intf.TestStruct), aTestStruct, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(ProxyServerMainLibrary_Intf.TestStruct), result, []);
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+initialization
+ RegisterROClass(TestStruct);
+ RegisterProxyClass(IProxyServerMainService_IID, TProxyServerMainService_Proxy);
+
+
+finalization
+ UnregisterROClass(TestStruct);
+ UnregisterProxyClass(IProxyServerMainService_IID);
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServerMainLibrary_Invk.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServerMainLibrary_Invk.pas
new file mode 100644
index 0000000..9ba0915
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServerMainLibrary_Invk.pas
@@ -0,0 +1,101 @@
+unit ProxyServerMainLibrary_Invk;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes,
+ {RemObjects:} uROServer, uROServerIntf, uROTypes, uROClientIntf,
+ {Generated:} ProxyServerMainLibrary_Intf;
+
+type
+ TProxyServerMainService_Invoker = class(TROInvoker)
+ private
+ protected
+ published
+ procedure Invoke_Sum(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_GetServerTime(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_EchoStruct(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ end;
+
+implementation
+
+uses
+ {RemObjects:} uRORes, uROClient;
+
+{ TProxyServerMainService_Invoker }
+
+procedure TProxyServerMainService_Invoker.Invoke_Sum(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function Sum(const A: Integer; const B: Integer): Integer; }
+var
+ A: Integer;
+ B: Integer;
+ lResult: Integer;
+begin
+ try
+ __Message.Read('A', TypeInfo(Integer), A, []);
+ __Message.Read('B', TypeInfo(Integer), B, []);
+
+ lResult := (__Instance as IProxyServerMainService).Sum(A, B);
+
+ __Message.InitializeResponseMessage(__Transport, 'ProxyServerMainLibrary', 'ProxyServerMainService', 'SumResponse');
+ __Message.Write('Result', TypeInfo(Integer), lResult, []);
+ __Message.Finalize;
+
+ finally
+ end;
+end;
+
+procedure TProxyServerMainService_Invoker.Invoke_GetServerTime(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function GetServerTime: DateTime; }
+var
+ lResult: DateTime;
+begin
+ try
+ lResult := (__Instance as IProxyServerMainService).GetServerTime;
+
+ __Message.InitializeResponseMessage(__Transport, 'ProxyServerMainLibrary', 'ProxyServerMainService', 'GetServerTimeResponse');
+ __Message.Write('Result', TypeInfo(DateTime), lResult, [paIsDateTime]);
+ __Message.Finalize;
+
+ finally
+ end;
+end;
+
+procedure TProxyServerMainService_Invoker.Invoke_EchoStruct(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function EchoStruct(const aTestStruct: TestStruct): TestStruct; }
+var
+ aTestStruct: ProxyServerMainLibrary_Intf.TestStruct;
+ lResult: ProxyServerMainLibrary_Intf.TestStruct;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ aTestStruct := nil;
+ lResult := nil;
+ try
+ __Message.Read('aTestStruct', TypeInfo(ProxyServerMainLibrary_Intf.TestStruct), aTestStruct, []);
+
+ lResult := (__Instance as IProxyServerMainService).EchoStruct(aTestStruct);
+
+ __Message.InitializeResponseMessage(__Transport, 'ProxyServerMainLibrary', 'ProxyServerMainService', 'EchoStructResponse');
+ __Message.Write('Result', TypeInfo(ProxyServerMainLibrary_Intf.TestStruct), lResult, []);
+ __Message.Finalize;
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(aTestStruct);
+ __lObjectDisposer.Add(lResult);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServerMainService_Impl.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServerMainService_Impl.pas
new file mode 100644
index 0000000..43bd3a8
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServerMainService_Impl.pas
@@ -0,0 +1,63 @@
+unit ProxyServerMainService_Impl;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ This is where you are supposed to code the implementation of your objects. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils,
+ {RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
+ {Generated:} ProxyServerMainLibrary_Intf;
+
+type
+ { TProxyServerMainService }
+ TProxyServerMainService = class(TRORemotable, IProxyServerMainService)
+ private
+ protected
+ { IProxyServerMainService methods }
+ function Sum(const A: Integer; const B: Integer): Integer;
+ function GetServerTime: DateTime;
+ function EchoStruct(const aTestStruct: TestStruct): TestStruct;
+ end;
+
+implementation
+
+uses
+ {Generated:} ProxyServerMainLibrary_Invk;
+
+procedure Create_ProxyServerMainService(out anInstance: IUnknown);
+begin
+ anInstance := TProxyServerMainService.Create;
+end;
+
+{ ProxyServerMainService }
+
+function TProxyServerMainService.Sum(const A: Integer; const B: Integer): Integer;
+begin
+ result := A + B;
+end;
+
+function TProxyServerMainService.GetServerTime: DateTime;
+begin
+ result := Now;
+end;
+
+function TProxyServerMainService.EchoStruct(const aTestStruct: TestStruct): TestStruct;
+begin
+ result := TestStruct.Create;
+ result.Name := aTestStruct.Name;
+ result.IntNumber := aTestStruct.IntNumber;
+end;
+
+initialization
+ TROClassFactory.Create('ProxyServerMainService', Create_ProxyServerMainService, TProxyServerMainService_Invoker);
+
+finalization
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_Client.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_Client.bdsproj
new file mode 100644
index 0000000..d54685a
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_Client.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {1CD0015C-1E90-439F-B7C9-516C471A2CC7}
+
+
+
+
+ ProxyServer_Client.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_Client.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_Client.dpr
new file mode 100644
index 0000000..82dca25
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_Client.dpr
@@ -0,0 +1,14 @@
+program ProxyServer_Client;
+
+uses
+ Forms,
+ ProxyServer_Client_Main in 'ProxyServer_Client_Main.pas' {ProxyServer_Client_MainForm};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'ProxyServer - Client';
+ Application.CreateForm(TProxyServer_Client_MainForm, ProxyServer_Client_MainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_Client.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_Client.dproj
new file mode 100644
index 0000000..005b284
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_Client.dproj
@@ -0,0 +1,72 @@
+
+
+ {40192763-adee-47c0-a56b-982934cc7c3f}
+ ProxyServer_Client.dpr
+ Debug
+ AnyCPU
+ DCC32
+ ProxyServer_Client.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ ProxyServer_Client.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_Client.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_Client.res
new file mode 100644
index 0000000..fb3116f
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_Client.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_Client_Main.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_Client_Main.dfm
new file mode 100644
index 0000000..1287937
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_Client_Main.dfm
@@ -0,0 +1,85 @@
+object ProxyServer_Client_MainForm: TProxyServer_Client_MainForm
+ Left = 127
+ Top = 126
+ Width = 209
+ Height = 188
+ Caption = 'ProxyServer - Client'
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Label1: TLabel
+ Left = 9
+ Top = 12
+ Width = 36
+ Height = 13
+ Caption = 'Server:'
+ end
+ object cbServer: TComboBox
+ Left = 49
+ Top = 8
+ Width = 145
+ Height = 21
+ Style = csDropDownList
+ ItemHeight = 13
+ ItemIndex = 0
+ TabOrder = 0
+ Text = 'Main Server'
+ Items.Strings = (
+ 'Main Server'
+ 'Proxy Server')
+ end
+ object SumButton: TButton
+ Left = 46
+ Top = 56
+ Width = 109
+ Height = 25
+ Caption = 'Sum(1,2)'
+ TabOrder = 1
+ OnClick = SumButtonClick
+ end
+ object GetServerTimeButton: TButton
+ Left = 46
+ Top = 88
+ Width = 109
+ Height = 25
+ Caption = 'GetServerTime'
+ TabOrder = 2
+ OnClick = GetServerTimeButtonClick
+ end
+ object EchoStructButton: TButton
+ Left = 46
+ Top = 120
+ Width = 109
+ Height = 25
+ Caption = 'EchoStruct'
+ TabOrder = 3
+ OnClick = EchoStructButtonClick
+ end
+ object ROBINMessage: TROBinMessage
+ Left = 8
+ Top = 40
+ end
+ object ROIndyTCPChannel: TROIndyTCPChannel
+ ServerLocators = <>
+ DispatchOptions = []
+ Port = 8090
+ Host = '127.0.0.1'
+ Left = 40
+ Top = 40
+ end
+ object ROWinMessageChannel: TROWinMessageChannel
+ ServerLocators = <>
+ DispatchOptions = []
+ ServerID = '{F5B38440-F071-45B8-AF67-1023F20C179D}'
+ Delay = 50
+ Left = 40
+ Top = 72
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_Client_Main.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_Client_Main.pas
new file mode 100644
index 0000000..fb18fd2
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_Client_Main.pas
@@ -0,0 +1,72 @@
+unit ProxyServer_Client_Main;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, StdCtrls, uROIndyTCPChannel,
+ uROClient, uROBINMessage, ProxyServerMainLibrary_Intf, uROWinMessageChannel;
+
+type
+ TProxyServer_Client_MainForm = class(TForm)
+ ROBINMessage: TROBINMessage;
+ ROIndyTCPChannel: TROIndyTCPChannel;
+ Label1: TLabel;
+ cbServer: TComboBox;
+ SumButton: TButton;
+ GetServerTimeButton: TButton;
+ EchoStructButton: TButton;
+ ROWinMessageChannel: TROWinMessageChannel;
+ procedure SumButtonClick(Sender: TObject);
+ procedure GetServerTimeButtonClick(Sender: TObject);
+ procedure EchoStructButtonClick(Sender: TObject);
+ private
+ function CreateService: IProxyServerMainService;
+ public
+
+ end;
+
+var
+ ProxyServer_Client_MainForm: TProxyServer_Client_MainForm;
+
+implementation
+
+{$R *.dfm}
+
+function TProxyServer_Client_MainForm.CreateService: IProxyServerMainService;
+begin
+ if cbServer.ItemIndex = 0 then
+ result := CoProxyServerMainService.Create(ROBINMessage, ROIndyTCPChannel) // TCP over main one
+ else
+ result := CoProxyServerMainService.Create(ROBINMessage, ROWinMessageChannel) // Windows messages to proxy
+end;
+
+procedure TProxyServer_Client_MainForm.SumButtonClick(Sender: TObject);
+begin
+ ShowMessage('Result is ' + IntToStr(CreateService.Sum(1, 2)));
+end;
+
+procedure TProxyServer_Client_MainForm.GetServerTimeButtonClick(Sender: TObject);
+begin
+ ShowMessage('Time is ' + DateTimeToStr(CreateService.GetServerTime));
+end;
+
+procedure TProxyServer_Client_MainForm.EchoStructButtonClick(Sender: TObject);
+var
+ out_struct, in_struct: TestStruct;
+begin
+ in_struct := nil;
+ out_struct := TestStruct.Create;
+ out_struct.Name := 'Dave Fuller';
+ out_struct.IntNumber := 666;
+ try
+ in_struct := CreateService.EchoStruct(out_struct);
+ ShowMessage(out_struct.Name + ', ' + IntToStr(out_struct.IntNumber));
+ finally
+ if in_struct <> nil then in_struct.Free;
+ out_struct.Free;
+ end;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_MainServer.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_MainServer.bdsproj
new file mode 100644
index 0000000..9ae271b
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_MainServer.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {8FF6FC81-0E40-46A6-B290-21531E1FF7A9}
+
+
+
+
+ ProxyServer_MainServer.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_MainServer.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_MainServer.dpr
new file mode 100644
index 0000000..e009288
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_MainServer.dpr
@@ -0,0 +1,20 @@
+program ProxyServer_MainServer;
+
+{#ROGEN:ProxyServerMainLibrary.rodl} // RemObjects: Careful, do not remove!
+
+uses
+ Forms,
+ ProxyServer_MainServer_Main in 'ProxyServer_MainServer_Main.pas' {ProxyServer_MainServer_MainForm},
+ ProxyServerMainLibrary_Intf in 'ProxyServerMainLibrary_Intf.pas',
+ ProxyServerMainLibrary_Invk in 'ProxyServerMainLibrary_Invk.pas',
+ ProxyServerMainService_Impl in 'ProxyServerMainService_Impl.pas';
+
+{$R *.RES}
+{$R RODLFile.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'ProxyServer - Main Server';
+ Application.CreateForm(TProxyServer_MainServer_MainForm, ProxyServer_MainServer_MainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_MainServer.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_MainServer.dproj
new file mode 100644
index 0000000..c362725
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_MainServer.dproj
@@ -0,0 +1,75 @@
+
+
+ {6d2f01cb-292f-4613-bb90-73f9c18e9b28}
+ ProxyServer_MainServer.dpr
+ Debug
+ AnyCPU
+ DCC32
+ ProxyServer_MainServer.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ ProxyServer_MainServer.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_MainServer.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_MainServer.res
new file mode 100644
index 0000000..53aa370
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_MainServer.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_MainServer_Main.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_MainServer_Main.dfm
new file mode 100644
index 0000000..c301336
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_MainServer_Main.dfm
@@ -0,0 +1,42 @@
+object ProxyServer_MainServer_MainForm: TProxyServer_MainServer_MainForm
+ Left = 202
+ Top = 241
+ Width = 232
+ Height = 109
+ Caption = 'ProxyServer - Main Server'
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Memo: TMemo
+ Left = 0
+ Top = 0
+ Width = 224
+ Height = 76
+ Align = alClient
+ TabOrder = 0
+ end
+ object ROMessage: TROBinMessage
+ Left = 88
+ Top = 8
+ end
+ object ROServer: TROIndyTCPServer
+ Dispatchers = <
+ item
+ Name = 'ROMessage'
+ Message = ROMessage
+ Enabled = True
+ end>
+ OnReadFromStream = ROServerReadFromStream
+ Port = 8090
+ Left = 56
+ Top = 8
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_MainServer_Main.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_MainServer_Main.pas
new file mode 100644
index 0000000..f32fb8b
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_MainServer_Main.pas
@@ -0,0 +1,42 @@
+unit ProxyServer_MainServer_Main;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ StdCtrls, uROClient, uROBINMessage, uROClientIntf, uROServer, uROIndyTCPServer;
+
+type
+ TProxyServer_MainServer_MainForm = class(TForm)
+ ROMessage: TROBINMessage;
+ ROServer: TROIndyTCPServer;
+ Memo: TMemo;
+ procedure FormCreate(Sender: TObject);
+ procedure ROServerReadFromStream(aStream: TStream);
+ private
+
+ protected
+
+ public
+
+ end;
+
+var
+ ProxyServer_MainServer_MainForm: TProxyServer_MainServer_MainForm;
+
+implementation
+
+
+{$R *.DFM}
+
+procedure TProxyServer_MainServer_MainForm.FormCreate(Sender: TObject);
+begin
+ ROServer.Active := TRUE;
+end;
+
+procedure TProxyServer_MainServer_MainForm.ROServerReadFromStream(aStream: TStream);
+begin
+ Memo.Lines.Add('Request arrived...')
+end;
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_ProxyServer.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_ProxyServer.bdsproj
new file mode 100644
index 0000000..1b26556
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_ProxyServer.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {DBBF5B8E-4929-4C65-98C6-BF7C1CE5E71D}
+
+
+
+
+ ProxyServer_ProxyServer.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_ProxyServer.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_ProxyServer.dpr
new file mode 100644
index 0000000..4e2e858
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_ProxyServer.dpr
@@ -0,0 +1,15 @@
+program ProxyServer_ProxyServer;
+
+uses
+ Forms,
+ ProxyServer_ProxyServer_Main in 'ProxyServer_ProxyServer_Main.pas' {ProxyServer_ProxyServer_MainForm},
+ ProxyServer_ProxyServer_Impl in 'ProxyServer_ProxyServer_Impl.pas';
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'ProxyServer - Proxy Server';
+ Application.CreateForm(TProxyServer_ProxyServer_MainForm, ProxyServer_ProxyServer_MainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_ProxyServer.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_ProxyServer.dproj
new file mode 100644
index 0000000..e9f7ec9
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_ProxyServer.dproj
@@ -0,0 +1,73 @@
+
+
+ {9099b695-4d6f-4abe-8cc9-ee7cb8b02ae4}
+ ProxyServer_ProxyServer.dpr
+ Debug
+ AnyCPU
+ DCC32
+ ProxyServer_ProxyServer.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ ProxyServer_ProxyServer.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_ProxyServer.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_ProxyServer.res
new file mode 100644
index 0000000..53aa370
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_ProxyServer.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_ProxyServer_Impl.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_ProxyServer_Impl.pas
new file mode 100644
index 0000000..1aa4be7
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_ProxyServer_Impl.pas
@@ -0,0 +1,110 @@
+unit ProxyServer_ProxyServer_Impl;
+
+{ This example shows how to create a proxy server to redirect the calls to another
+ server without having to recreate the RODL file, thus allowing the use of the same types
+ of the original server.
+
+ In order to create this kind of proxy server you need to:
+
+ 1) start a **blank** project (without any RODL, since we want to use that of the original server) and
+ add the server and message components that the proxy will use to listen to requests.
+ !!! See the unit fProxyServerForm.pas and the DPR of this project. There's no RODL referenced in it.
+
+ 2) Link the two components via a standard dispatcher item like you would normally do.
+
+ 3) Create a new TRORemotable unit like this exact file you are looking at
+
+ 4) Done!
+
+ This unit was created by simply copying the original MainService_Impl.pas file,
+ renaming the TMainService class to TProxyService followed by implementing a bypass for all
+ the method calls. This class is basically a server which accesses a RO server as a client would do.
+
+ There are other possible solutions to the proxy dilemma. This one though provides
+ more control over everything. Specifically, since every call will pass from the proxy class before
+ going to the real server, you can stop methods from being dispatched any further.
+
+ Enjoy!
+}
+
+interface
+
+uses
+ {vcl:} Classes,
+ {RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf,
+ {Generated:} ProxyServerMainLibrary_Intf,
+
+ uROIndyTCPChannel, uROClient, uROBINMessage;
+
+type
+ TProxyService = class(TRORemotable, IProxyServerMainService)
+ private
+ fTCPChannel: TROIndyTCPChannel;
+ fBINMessage: TROBINMessage;
+
+ function CreateService: IProxyServerMainService;
+
+ protected
+ function Sum(const A: Integer; const B: Integer): Integer;
+ function GetServerTime: DateTime;
+ function EchoStruct(const aTestStruct: TestStruct): TestStruct;
+
+ public
+ constructor Create; override;
+ destructor Destroy; override;
+
+ end;
+
+implementation
+
+uses
+ {Generated:} ProxyServerMainLibrary_Invk, SysUtils;
+
+procedure Create_ProxyService(out anInstance: IUnknown);
+begin
+ anInstance := TProxyService.Create;
+end;
+
+constructor TProxyService.Create;
+begin
+ inherited;
+
+ fTCPChannel := TROIndyTCPChannel.Create(nil);
+ fBINMessage := TROBINMessage.Create(nil);
+end;
+
+destructor TProxyService.Destroy;
+begin
+ fTCPChannel.Free;
+ fBINMessage.Free;
+
+ inherited;
+end;
+
+function TProxyService.CreateService: IProxyServerMainService;
+begin
+ result := CoProxyServerMainService.Create(fBINMessage, fTCPChannel);
+end;
+
+function TProxyService.Sum(const A: Integer; const B: Integer): Integer;
+begin
+ result := CreateService.Sum(A, B)
+end;
+
+function TProxyService.GetServerTime: DateTime;
+begin
+ result := CreateService.GetServerTime
+end;
+
+function TProxyService.EchoStruct(const aTestStruct: TestStruct): TestStruct;
+begin
+ result := CreateService.EchoStruct(aTestStruct)
+end;
+
+initialization
+ TROClassFactory.Create('ProxyServerMainService', Create_ProxyService, TProxyServerMainService_Invoker);
+
+finalization
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_ProxyServer_Main.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_ProxyServer_Main.dfm
new file mode 100644
index 0000000..1a1e81a
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_ProxyServer_Main.dfm
@@ -0,0 +1,41 @@
+object ProxyServer_ProxyServer_MainForm: TProxyServer_ProxyServer_MainForm
+ Left = 177
+ Top = 117
+ Width = 290
+ Height = 120
+ Caption = 'ProxyServer - Proxy Server'
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ OldCreateOrder = False
+ OnCreate = FormCreate
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Memo: TMemo
+ Left = 0
+ Top = 0
+ Width = 282
+ Height = 87
+ Align = alClient
+ TabOrder = 0
+ end
+ object ROWinMessageServer: TROWinMessageServer
+ Dispatchers = <
+ item
+ Name = 'ROBINMessage1'
+ Message = ROBINMessage1
+ Enabled = True
+ end>
+ OnReadFromStream = ROWinMessageServerReadFromStream
+ ServerID = '{F5B38440-F071-45B8-AF67-1023F20C179D}'
+ Left = 72
+ Top = 32
+ end
+ object ROBINMessage1: TROBinMessage
+ Left = 104
+ Top = 32
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_ProxyServer_Main.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_ProxyServer_Main.pas
new file mode 100644
index 0000000..25532ab
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/ProxyServer_ProxyServer_Main.pas
@@ -0,0 +1,40 @@
+unit ProxyServer_ProxyServer_Main;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, uROServer, uROWinMessageServer,
+ uROIndyTCPChannel, uROClient, uROBINMessage, StdCtrls;
+
+type
+ TProxyServer_ProxyServer_MainForm = class(TForm)
+ ROWinMessageServer: TROWinMessageServer;
+ ROBINMessage1: TROBINMessage;
+ Memo: TMemo;
+ procedure FormCreate(Sender: TObject);
+ procedure ROWinMessageServerReadFromStream(aStream: TStream);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ ProxyServer_ProxyServer_MainForm: TProxyServer_ProxyServer_MainForm;
+
+implementation
+
+{$R *.dfm}
+
+procedure TProxyServer_ProxyServer_MainForm.FormCreate(Sender: TObject);
+begin
+ ROWinMessageServer.Active := TRUE;
+end;
+
+procedure TProxyServer_ProxyServer_MainForm.ROWinMessageServerReadFromStream(aStream: TStream);
+begin
+ Memo.Lines.Add('Request arrived...')
+end;
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/RODLFILE.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/RODLFILE.res
new file mode 100644
index 0000000..e313b96
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Proxy Server/RODLFILE.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/RODL/RODL.Sample.html b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/RODL/RODL.Sample.html
new file mode 100644
index 0000000..faf54cb
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/RODL/RODL.Sample.html
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+RODL Sample
+
+Purpose This sample provides facilities to convert a RODL file into several other formats.
The Generate button (executed on start up) loads a test library containing a range of RODL objects. Alternatively, use the Load button to look at one of your own files.
Having loaded a file, select the conversion type (and Target Entry if generating implementaton code) followed by clicking on the Convert button.
As well as examining the code provided by this sample, you might also want to look at the conversion routines used by:
RemObjects SDK (Common)\Bin\RODL.exe RemObjects SDK (Common)\Bin\ROServiceBuilder3.exe
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/RODL/RODL.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/RODL/RODL.bdsproj
new file mode 100644
index 0000000..1e9041e
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/RODL/RODL.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {8E46070F-805D-4FF6-8CF3-89947689E930}
+
+
+
+
+ RODL.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/RODL/RODL.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/RODL/RODL.dpr
new file mode 100644
index 0000000..80df9ba
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/RODL/RODL.dpr
@@ -0,0 +1,13 @@
+program RODL;
+
+uses
+ Forms,
+ RODLMain in 'RODLMain.pas' {RODLMainForm};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TRODLMainForm, RODLMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/RODL/RODL.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/RODL/RODL.dproj
new file mode 100644
index 0000000..3c34bf8
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/RODL/RODL.dproj
@@ -0,0 +1,72 @@
+
+
+ {fe0caa48-879c-4ec6-805b-8fca878a2b6c}
+ RODL.dpr
+ Debug
+ AnyCPU
+ DCC32
+ RODL.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ RODL.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/RODL/RODL.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/RODL/RODL.res
new file mode 100644
index 0000000..3219dfb
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/RODL/RODL.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/RODL/RODLMain.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/RODL/RODLMain.dfm
new file mode 100644
index 0000000..0964c4d
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/RODL/RODLMain.dfm
@@ -0,0 +1,145 @@
+object RODLMainForm: TRODLMainForm
+ Left = 314
+ Top = 104
+ AutoScroll = False
+ Caption = 'RODL Demo'
+ ClientHeight = 232
+ ClientWidth = 628
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ OnActivate = GenerateButtonClick
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Splitter1: TSplitter
+ Left = 174
+ Top = 48
+ Width = 3
+ Height = 165
+ Cursor = crHSplit
+ end
+ object Panel1: TPanel
+ Left = 0
+ Top = 0
+ Width = 628
+ Height = 48
+ Align = alTop
+ BevelOuter = bvNone
+ TabOrder = 2
+ object lServices: TLabel
+ Left = 322
+ Top = 2
+ Width = 36
+ Height = 13
+ Caption = 'Service'
+ end
+ object Label1: TLabel
+ Left = 176
+ Top = 2
+ Width = 46
+ Height = 13
+ Caption = 'Converter'
+ end
+ object LoadButton: TButton
+ Left = 96
+ Top = 14
+ Width = 75
+ Height = 25
+ Caption = 'Load'
+ TabOrder = 0
+ OnClick = LoadButtonClick
+ end
+ object GenerateButton: TButton
+ Left = 8
+ Top = 14
+ Width = 75
+ Height = 25
+ Caption = 'Generate'
+ TabOrder = 1
+ OnClick = GenerateButtonClick
+ end
+ object cbWriters: TComboBox
+ Left = 176
+ Top = 16
+ Width = 145
+ Height = 21
+ Style = csDropDownList
+ ItemHeight = 13
+ TabOrder = 2
+ OnChange = cbWritersChange
+ end
+ object cbServices: TComboBox
+ Left = 322
+ Top = 16
+ Width = 145
+ Height = 21
+ Style = csDropDownList
+ ItemHeight = 13
+ TabOrder = 3
+ end
+ object ConvertButton: TButton
+ Left = 469
+ Top = 14
+ Width = 75
+ Height = 25
+ Caption = 'Convert'
+ TabOrder = 4
+ OnClick = ConvertButtonClick
+ end
+ object SaveButton: TButton
+ Left = 546
+ Top = 14
+ Width = 75
+ Height = 25
+ Caption = 'Save'
+ TabOrder = 5
+ OnClick = SaveButtonClick
+ end
+ end
+ object Memo: TMemo
+ Left = 177
+ Top = 48
+ Width = 451
+ Height = 165
+ Align = alClient
+ ScrollBars = ssBoth
+ TabOrder = 0
+ end
+ object StatusBar: TStatusBar
+ Left = 0
+ Top = 213
+ Width = 628
+ Height = 19
+ Panels = <>
+ SimplePanel = True
+ end
+ object TreeView: TTreeView
+ Left = 0
+ Top = 48
+ Width = 174
+ Height = 165
+ Align = alLeft
+ HideSelection = False
+ Indent = 20
+ ReadOnly = True
+ TabOrder = 3
+ end
+ object OpenDialog: TOpenDialog
+ FileName = '*.rodl'
+ Filter = 'RODL Files|*.rodl'
+ Left = 208
+ Top = 88
+ end
+ object SaveDialog: TSaveDialog
+ Filter = 'All files (*.*)|*.*'
+ Options = [ofOverwritePrompt, ofHideReadOnly, ofEnableSizing]
+ Left = 281
+ Top = 92
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/RODL/RODLMain.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/RODL/RODLMain.pas
new file mode 100644
index 0000000..9803a7c
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/RODL/RODLMain.pas
@@ -0,0 +1,364 @@
+unit RODLMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, {$IFDEF VER140}Variants, {$ENDIF}Classes, Graphics, Controls, Forms,
+ Dialogs, StdCtrls, OleCtrls, SHDocVw, ExtCtrls, uRODL, ComCtrls;
+
+type
+ TRODLMainForm = class(TForm)
+ GenerateButton: TButton;
+ LoadButton: TButton;
+ ConvertButton: TButton;
+ cbWriters: TComboBox;
+ Memo: TMemo;
+ OpenDialog: TOpenDialog;
+ Label1: TLabel;
+ StatusBar: TStatusBar;
+ cbServices: TComboBox;
+ lServices: TLabel;
+ SaveButton: TButton;
+ SaveDialog: TSaveDialog;
+ Panel1: TPanel;
+ TreeView: TTreeView;
+ Splitter1: TSplitter;
+ procedure GenerateButtonClick(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ procedure ConvertButtonClick(Sender: TObject);
+ procedure LoadButtonClick(Sender: TObject);
+ procedure cbWritersChange(Sender: TObject);
+ procedure SaveButtonClick(Sender: TObject);
+ procedure FormDestroy(Sender: TObject);
+ private
+ fLibrary: TRODLLibrary;
+ function CheckLibrary(AShowMessage: Boolean): Boolean;
+ procedure FillLibrary;
+ public
+ end;
+
+var
+ RODLMainForm: TRODLMainForm;
+
+implementation
+
+uses uRODLToXML, uRODLToPascalInvk, uRODLToPascalIntf, uRODLToPascalImpl,
+ uRODLGenTools, uRODLToWSDL, uRODLToPascalAsync, uROClasses;
+
+{$R *.dfm}
+
+const
+ Writers: array[0..5] of TRODLConverterClass =
+ (TRODLToInvk, TRODLToIntf, TRODLToImpl, TRODLToXML, TRODLToWSDL, TRODLToPascalAsync);
+
+procedure TRODLMainForm.GenerateButtonClick(Sender: TObject);
+var
+ struct: TRODLStruct;
+ stelem: TRODLTypedEntity;
+ arr: TRODLArray;
+ svc: TRODLService;
+ enum: TRODLEnum;
+ eval: TRODLEnumValue;
+ intf: TRODLServiceInterface;
+ op: TRODLOperation;
+ par: TRODLOperationParam;
+
+ // ent: TRODLEntity;
+ // emsg: string;
+begin
+ Memo.Clear;
+ if fLibrary <> nil then fLibrary.Free;
+ fLibrary := TRODLLibrary.Create;
+
+ fLibrary.Info.Name := 'TestLibrary';
+ fLibrary.Info.UID := NewGuid;
+ fLibrary.Info.Attributes.Values['Test'] := 'a library attribute';
+
+ svc := TRODLService.Create;
+ svc.Info.Name := 'Gadget';
+ svc.Default.Info.UID := NewGuid;
+ svc.Default.Info.Documentation := 'Default interface for Gadget';
+ svc.Default.Info.Attributes.Values['TestName1'] := 'TestValue1';
+ svc.Default.Info.Attributes.Values['TestName2'] := 'TestValue2';
+
+ intf := svc.Default;
+
+ op := intf.Add;
+ op.Info.Name := 'Sum';
+ op.Info.UID := NewGuid;
+ op.Info.Documentation := 'Sum message';
+ op.Info.Attributes.Values['TestAttr1'] := 'TestAttrValue2';
+ op.Info.Attributes.Values['TestAttr2'] := 'TestAttrValue2';
+
+ par := op.Add;
+ par.Name := 'A';
+ par.DataType := 'integer';
+ par.Flag := fIn;
+
+ par := op.Add;
+ par.Name := 'B';
+ par.DataType := 'integer';
+ par.Flag := fIn;
+ par.Attributes.Values['Test'] := 'a parameter attribute';
+ par.Attributes.Values['Test'] := 'a parameter attribute #2';
+
+ par := op.AddResult;
+// par.Name := 'result';
+ par.DataType := 'integer';
+// par.Flag := fResult;
+
+ op := intf.Add;
+ op.Name := 'GetServerTime';
+ op.Attributes.Values['TestAttr1'] := 'TestAttrValue2';
+ op.Attributes.Values['TestAttr2'] := 'TestAttrValue2';
+ op.UID := NewGuid;
+ op.Documentation := 'GetServerTime message';
+
+ par := op.AddResult;
+// par.Name := 'result';
+ par.DataType := 'datetime';
+// par.Flag := fResult;
+
+ fLibrary.Add(svc);
+
+ svc := TRODLService.Create;
+ svc.Name := 'Test2';
+ svc.Default.UID := NewGuid;
+ svc.Default.Documentation := 'Default interface for Test2';
+
+ intf := svc.Default;
+
+ op := intf.Add;
+ op.Name := 'GetNumber';
+ op.UID := NewGuid;
+ op.Documentation := 'GetNumber message';
+
+ par := op.AddResult;
+// par.Name := 'result';
+ par.DataType := 'integer';
+// par.Flag := fResult;
+
+ fLibrary.Add(svc);
+
+ struct := TRODLStruct.Create;
+ struct.Attributes.Values['TestAttr1'] := 'TestAttrValue2';
+ struct.Attributes.Values['TestAttr2'] := 'TestAttrValue2';
+
+ struct.Name := 'TAddress';
+ struct.UID := NewGuid;
+ struct.Documentation := 'An address';
+
+ stelem := struct.Add;
+ stelem.Name := 'Street1';
+ stelem.DataType := 'AnsiString';
+
+ stelem := struct.Add;
+ stelem.Name := 'Street2';
+ stelem.DataType := 'AnsiString';
+
+ fLibrary.Add(struct);
+
+ struct := TRODLStruct.Create;
+ struct.Name := 'TPerson';
+ struct.UID := NewGuid;
+ struct.Documentation := 'A person';
+
+ stelem := struct.Add;
+ stelem.Name := 'FullName';
+ stelem.DataType := 'AnsiString';
+
+ stelem := struct.Add;
+ stelem.Name := 'Age';
+ stelem.DataType := 'integer';
+
+ fLibrary.Add(struct);
+
+ enum := TRODLEnum.Create;
+ enum.Name := 'TColor';
+ enum.UID := NewGuid;
+ enum.Documentation := 'This is TColor';
+ enum.Attributes.Values['TestAttr1'] := 'TestAttrValue2';
+ enum.Attributes.Values['TestAttr2'] := 'TestAttrValue2';
+
+ eval := enum.Add;
+ eval.Name := 'clRed';
+
+ eval := enum.Add;
+ eval.Name := 'clBlue';
+
+ fLibrary.Add(enum);
+
+ enum := TRODLEnum.Create;
+ enum.Name := 'TSex';
+ enum.UID := NewGuid;
+ enum.Documentation := 'This is TSex';
+
+ eval := enum.Add;
+ eval.Name := 'Male';
+
+ eval := enum.Add;
+ eval.Name := 'Female';
+
+ fLibrary.Add(enum);
+
+ arr := TRODLArray.Create;
+ arr.Name := 'TIntegerArray';
+ arr.Documentation := 'Thisis an integer array';
+ arr.UID := NewGuid;
+ arr.ElementType := 'integer';
+ arr.Attributes.Values['TestAttr1'] := 'TestAttrValue2';
+ arr.Attributes.Values['TestAttr2'] := 'TestAttrValue2';
+
+ fLibrary.Add(arr);
+
+ {if not fLibrary.Validate(ent, emsg)
+ then Caption := 'Libary is NOT valid: '+ent.Name+', '+emsg
+ else Caption := 'Libary is valid'}
+ FillLibrary;
+ StatusBar.SimpleText := 'Test RODL generated.';
+end;
+
+procedure TRODLMainForm.FormCreate(Sender: TObject);
+var
+ i: integer;
+begin
+ for i := 0 to High(Writers) do
+ cbWriters.Items.Add(Writers[i].ClassName);
+ cbWriters.ItemIndex := cbWriters.Items.Count - 1;
+ cbWriters.OnChange(cbWriters);
+end;
+
+procedure TRODLMainForm.ConvertButtonClick(Sender: TObject);
+begin
+ with Writers[cbWriters.ItemIndex].Create(fLibrary, cbServices.Text) do try
+ Memo.Lines.Text := Buffer.Text
+ finally
+ Free;
+ end;
+end;
+
+procedure TRODLMainForm.LoadButtonClick(Sender: TObject);
+var
+ fs: TFileStream;
+begin
+
+ if not OpenDialog.Execute then Exit;
+
+ FreeAndNIL(fLibrary);
+ Memo.Clear;
+ FillLibrary;
+
+ fs := TFileStream.Create(OpenDialog.FileName, fmOpenRead);
+ with TXMLToRODL.Create do try
+ fLibrary := Read(fs);
+ finally
+ Free;
+ fs.Free;
+ end;
+ FillLibrary;
+ StatusBar.SimpleText := ExtractFileName(OpenDialog.FileName) + ' loaded. Please specify the convertor and click ''Convert''';
+ // ConvertButton.Click;
+end;
+
+procedure TRODLMainForm.cbWritersChange(Sender: TObject);
+var
+ i: integer;
+begin
+ cbServices.Clear;
+ if Writers[cbWriters.ItemIndex] = TRODLToImpl then begin
+ if fLibrary <> nil then
+ for i := 0 to fLibrary.ServiceCount - 1 do
+ cbServices.Items.Add(fLibrary.Services[i].Name);
+ if cbServices.Items.Count > 0 then cbServices.ItemIndex := 0;
+ end
+ else if Writers[cbWriters.ItemIndex] = TRODLToWSDL then begin
+ cbServices.Items.Add('');
+ if fLibrary <> nil then
+ for i := 0 to fLibrary.ServiceCount - 1 do
+ cbServices.Items.Add(fLibrary.Services[i].Name);
+ cbServices.ItemIndex := 0;
+ end;
+
+ lServices.Enabled := (Writers[cbWriters.ItemIndex] = TRODLToImpl) or (Writers[cbWriters.ItemIndex] = TRODLToWSDL);
+ cbServices.Enabled := lServices.Enabled;
+ if cbServices.Enabled then
+ cbServices.Color := clWindow
+ else
+ cbServices.ParentColor := True;
+end;
+
+procedure TRODLMainForm.SaveButtonClick(Sender: TObject);
+var
+ FFileName: string;
+begin
+ if not CheckLibrary(True) then Exit;
+ ConvertButton.Click;
+ fFileName := Writers[cbWriters.ItemIndex].GetTargetFileName(fLibrary, cbServices.Text);
+ if FFileName = '' then FFileName := ChangeFileExt(fLibrary.Name, '.xml');
+ SaveDialog.FileName := fFileName;
+ SaveDialog.DefaultExt := ExtractFileExt(SaveDialog.FileName);
+ if SaveDialog.Execute then Memo.Lines.SaveToFile(SaveDialog.FileName);
+end;
+
+function TRODLMainForm.CheckLibrary(AShowMessage: Boolean): Boolean;
+begin
+ Result := fLibrary <> nil;
+ if not result then ShowMessage('Please load or generate a RODL library');
+end;
+
+procedure TRODLMainForm.FillLibrary;
+var
+ FRootNode, tempNode: TTreeNode;
+ i: integer;
+begin
+ with TreeView do begin
+ Items.Clear;
+ if fLibrary = nil then Exit;
+ FRootNode := Items.AddChild(nil, fLibrary.Name);
+
+ tempNode := Items.AddChild(FRootNode, 'Structs');
+ for i := 0 to fLibrary.StructCount - 1 do
+ Items.AddChild(tempNode, fLibrary.Structs[i].Name);
+
+ tempNode := Items.AddChild(FRootNode, 'Arrays');
+ for i := 0 to fLibrary.ArrayCount - 1 do
+ Items.AddChild(tempNode, fLibrary.Arrays[i].Name);
+
+ tempNode := Items.AddChild(FRootNode, 'Enums');
+ for i := 0 to fLibrary.EnumCount - 1 do
+ Items.AddChild(tempNode, fLibrary.Enums[i].Name);
+
+ tempNode := Items.AddChild(FRootNode, 'Services');
+ for i := 0 to fLibrary.ServiceCount - 1 do begin
+ Items.AddChild(tempNode, fLibrary.Services[i].Name);
+ end;
+
+ tempNode := Items.AddChild(FRootNode, 'Exceptions');
+ for i := 0 to fLibrary.ExceptionCount - 1 do
+ Items.AddChild(tempNode, fLibrary.Exceptions[i].Name);
+
+ tempNode := Items.AddChild(FRootNode, 'Use');
+ for i := 0 to fLibrary.UseCount - 1 do
+ Items.AddChild(tempNode, fLibrary.Use[i].Name);
+
+ tempNode := Items.AddChild(FRootNode, 'Groups');
+ for i := 0 to fLibrary.GroupCount - 1 do
+ Items.AddChild(tempNode, fLibrary.Groups[i].Name);
+
+ tempNode := Items.AddChild(FRootNode, 'Event Sinks');
+ for i := 0 to fLibrary.EventSinkCount - 1 do
+ Items.AddChild(tempNode, fLibrary.EventSinks[i].Name);
+
+ FRootNode.Expand(True);
+ FRootNode.Selected := True;
+ FRootNode.MakeVisible;
+ end;
+end;
+
+procedure TRODLMainForm.FormDestroy(Sender: TObject);
+begin
+ if fLibrary <> nil then fLibrary.Free;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Samples.html b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Samples.html
new file mode 100644
index 0000000..b5ef964
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Samples.html
@@ -0,0 +1,392 @@
+
+
+
+
+
+
+
+
+
+
+ RemObjects SDK Samples for Delphi
+
+
+ Please keep the following things in mind when working with the samples:
+
+
+
+To help you find the sample you need and also to provide a suggested start order,
+the samples are listed in one or more categories followed by the actual sample descriptions
+in alphabetical order.
+ There may be samples shipped that are not listed below.
+Samples are not added to the list until they have passed our final quality inspection.
+This doesn't mean they are faulty, only that they are still pending final inspection.
+
+
+
+ Getting Started
+Most of the samples provide a project group containing server and client projects.
+The standard procedure for testing these is as follows:
+
+Build or compile both projects.
+ Ensure that the server is the current project. Note: if there is
+ only one RemObjects SDK server contained within the project group, this step is
+ not needed because the next step will still work even if the lient is the current
+ project. Launch the server (IDE menu: RemObjects | Launch Server Executable ).
+ Examine the server window. Some samples require that you activate one or more channels.
+ Make the client the current project.
+ Run the client.
+
+Having tested the sample, next examine the services provided. Do this by examining the RODL
+via the Service Builder tool provided:
+
+ Ensure that the server is the current project.
+ Open the Service Builder (IDE menu: RemObjects | Edit Service Library ).
+
+
+ Sample Categories
+
+ Some samples are shown below in more than one category.
+ The Dynamic Request , RODL and Named Pipe samples do not ship with
+ the trial version of the RemObjects SDK.
+
+
+
+Category
+Samples
+
+
+Introduction
+
+ First Sample
+Multi Channel
+ Super TCP Channel Chat
+ RODL (not shipped with the trial version)
+ Async
+ Auto Server
+ Dynamic Request (not shipped with the trial version)
+ Session Types
+
+ Time Server
+
+
+
+
+
+Channels
+
+ MegaDemo
+ Multi Channel
+ Super TCP Channel Chat
+ HTTP Chat
+ Named Pipes (not shipped with the trial version)
+
+
+
+
+
+Intermediate
+
+ Arrays
+
+ Broadcast Chat
+
+ Extended File Transfer
+ Named Pipes (not shipped with the trial version)
+ Service Discovery
+ Variants
+
+
+
+
+Architecture
+
+ Session Types
+
+ Class Factories
+
+ FPC Server
+
+ DataSnap
+
+ Dispatch Notifier
+ Auto Server
+ Multi Channel
+ Proxy Server
+
+
+
+
+Advanced
+
+ Class Factories
+ COM
+ Dispatch Notifier
+ Proxy Server
+
+
+
+
+
+
+ Sample Descriptions
+
+
+Name
+Category
+Description
+
+
+
+
+ Arrays
+
+ Intermediate
+
+ This sample shows how to use TROArray for presentating DB tables in a master/detail
+ relationship.
+
+
+Async
+Introduction
+This sample shows how to call methods on a RemObjects SDK server asynchronously.
+There may be times where you want to submit a request for information and defer receiving the result
+until a bit later. A very simple calculation (Sum) is performed,
+but this has a built in ten second delay so that it is possible to query the
+server before the calculation is completed.
+
+
+
+
+Auto Server
+Introduction Architecture
+This sample shows how a client can control its server when they are both running locally.
+This is useful if you want to provide a simple standard alone solution which is easily
+upgraded to multi-tier (or you might want to provide both options).
+
+
+
+
+
+Broadcast Chat
+Intermediate
+
+ This example shows how to use the TROBroadcastServer and TROBroadcastChannel
+ channels to write an UDP broadcasting chat program.
+
+
+
+Class Factories
+Architecture Advanced
+
+ This example shows how to use a Class Factory to generate three
+ types of server:
+ Singleton : all clients access a single server object.
+ Single Call : server instances are created on demand and destroyed
+ after processing the method call.
+ Pooled : multiple server instances are accessible by clients. This
+ works exactly the same as Singleton, unless the first server instance is busy.
+
+ Note : to test this sample properly, you need to run at least two
+ clients.
+
+
+
+
+
+COM
+Advanced
+
+ This sample shows how to call an existing RemObjects SDK server using COM.
+
+
+
+DataSnap
+Architecture
+
+ Standard example of the use of the TRODataSnapModule and TRODataSnapConnection
+ components.
+
+
+
+
+Dispatch Notifier
+Architecture Advanced
+
+ This example shows how to customize message dispatching. IRODispatchNotifier
+ is a special interface that TROInvoker classes know and look for.
+
+ If your server side object implements it, the IRODispatchNotifier.GetDispatchInfo
+ method will be called before the target method is invoked.
+
+
+
+Dynamic Request
+ (not shipped with the trial version)
+Introduction
+
+ This example shows how to use the TRODynamicRequest component to execute
+ server methods.
+
+
+
+Extended File Transfer
+Intermediate
+
+ This example shows how to transfer files to and from a RemObjects SDK Server in
+ chunks and how to monitor new files via server events. Note: needs at least two
+ clients open. File(s) uploaded from one client are downloaded to the other(s).
+
+
+
+First Sample
+Introduction
+
+This sample provides an introduction to using the Delphi edition of the RemObjects SDK product.
+The example shows how to define/implement methods on the server and how to access them from the client.
+The data consists of name information and four simple methods are provided by the
+service: Nicknames, VerifyName, CheckName and FullNames.
+
+
+
+
+
+ FPC Server
+
+ Architecture
+
+
+
+
+HTTP Chat
+Channels
+
+ This shows how to use polled events to create an HTTP based chat program.
+
+ The clients poll every few seconds for new messages and the server distributes the
+ messages to the appropriate client(s).
+
+
+
+MegaDemo
+Channels
+This comprehensive example illustrates many of the features of the RemObjects SDK by
+providing benchmark facilities for the various protocols and
+ channels supported.
+
+
+
+
+Multi Channel
+Introduction Channels Architecture
+This example provides an introduction to using the Delphi edition of the RemObjects SDK product.
+It shows how to use different channels to connect to the server application.
+
+
+
+
+Named Pipes
+
+ (not shipped with the trial version)
+Channels Intermediate
+This example shows the use of a named pipe connection.
+It creates a named pipe server as a Windows service .
+
+
+
+
+Proxy Server
+Architecture Advanced
+This example shows how to create a proxy server to redirect the calls to another
+ server without having to recreate the RODL file, thus allowing the use of the same types
+ of the original server.
+This provides total control. As every call will pass from the proxy class before going to the real server,
+you can even stop methods from being dispatched any further.
+
+
+
+
+RODL
+ (not shipped with the trial version)
+Introduction
+
+ <to follow>
+
+
+
+Service Discovery
+Intermediate
+This sample illustrates how to use the TRODiscoveryClient and
+ TRODiscoveryServer components.
+
+Each instance of the application acts both as a server and as a client.
+For the server, you can modify the list of services supported on the right-hand side, while for the client you can enter a service name and get a list of the servers available on your LAN to support it.
+
+
+
+
+Session Types
+
+Architecture Introduction
+
+ This example shows the use of sessions and illustrates several SessionManagers: TROEventSessionManager,
+
+ TROInMemorySessionManager,
+ TROMasterServerSessionManager and
+
+ TRODBSessionManager .
+
+ I mportant note : this sample needs a "Sessions" table to be created in one of your databases.
+ By default, the sample looks for the Sessions table in MSSQL's Northwind Database,
+ but you can easily change to connect to any other database.
+
+
+
+
+
+
+Super TCP Channel Chat
+Introduction Channels
+
+ This sample shows how the Super TCP Channel can be used to create
+ a chat server and clients.
+
+ Unlike the HTTP Chat sample, this sample doesn't poll the server
+ but sends events back to clients directly.
+
+
+
+
+Time Server
+Introduction
+
+ This is an extremely basic sample illustrating how to use the TROBroadcastServer
+ and TROBroadcastChannel components.
+
+
+
+Variants
+Intermediate
+
+ This example shows how the RemObjects SDK can transfer variants
+ and array of variants from the client and server using the
+ TROBinMessage and TROSOAPMessage message types.
+
+
+
+
+
+
+ Support
+
+ If you encounter any problems or have questions regarding the samples, please feel
+ free to ask on our newsgroup at
+ news://news.remobjects.com/remobjects.public.sdk.delphi .
+
+
+ Thank you very much,
+ Your RemObjects Team
+ http://www.remobjects.com
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Service Discovery/RODLFILE.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Service Discovery/RODLFILE.res
new file mode 100644
index 0000000..4b9eb58
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Service Discovery/RODLFILE.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Service Discovery/ServiceDiscovery.Sample.html b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Service Discovery/ServiceDiscovery.Sample.html
new file mode 100644
index 0000000..460f40e
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Service Discovery/ServiceDiscovery.Sample.html
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+ Service Discovery
+
+
+
+Purpose
+
+ This sample illustrates how to use the TRODiscoveryClient and TRODiscoveryServer components.
+
+
+ Each instance of the application acts both as a server and as a client.
+ For the server, you can modify the list of services supported on the right-hand side,
+ while for the client you can enter a service name and get a list of the servers available on your LAN to support it.
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Service Discovery/ServiceDiscovery.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Service Discovery/ServiceDiscovery.bdsproj
new file mode 100644
index 0000000..807740c
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Service Discovery/ServiceDiscovery.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {876EF534-859E-4EA0-ABD2-E47705E0566C}
+
+
+
+
+ ServiceDiscovery.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Service Discovery/ServiceDiscovery.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Service Discovery/ServiceDiscovery.dpr
new file mode 100644
index 0000000..1385bb3
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Service Discovery/ServiceDiscovery.dpr
@@ -0,0 +1,14 @@
+program ServiceDiscovery;
+
+uses
+ Forms,
+ ServiceDiscoveryMain in 'ServiceDiscoveryMain.pas' {ServiceDiscoveryMainForm};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'Service Discovery Sample';
+ Application.CreateForm(TServiceDiscoveryMainForm, ServiceDiscoveryMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Service Discovery/ServiceDiscovery.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Service Discovery/ServiceDiscovery.dproj
new file mode 100644
index 0000000..858c3be
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Service Discovery/ServiceDiscovery.dproj
@@ -0,0 +1,72 @@
+
+
+ {f03be2e9-512e-4df7-9a1e-ea0b0d926a40}
+ ServiceDiscovery.dpr
+ Debug
+ AnyCPU
+ DCC32
+ ServiceDiscovery.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ ServiceDiscovery.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Service Discovery/ServiceDiscovery.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Service Discovery/ServiceDiscovery.res
new file mode 100644
index 0000000..0f940ed
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Service Discovery/ServiceDiscovery.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Service Discovery/ServiceDiscoveryMain.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Service Discovery/ServiceDiscoveryMain.dfm
new file mode 100644
index 0000000..9992331
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Service Discovery/ServiceDiscoveryMain.dfm
@@ -0,0 +1,250 @@
+object ServiceDiscoveryMainForm: TServiceDiscoveryMainForm
+ Left = 275
+ Top = 222
+ BorderIcons = [biSystemMenu]
+ BorderStyle = bsSingle
+ BorderWidth = 5
+ Caption = 'RemObjects SDK Discovery Sample'
+ ClientHeight = 376
+ ClientWidth = 583
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ OldCreateOrder = False
+ OnCreate = FormCreate
+ PixelsPerInch = 96
+ TextHeight = 13
+ object RoPoweredByRemObjectsButton1: TROPoweredByRemObjectsButton
+ Left = 0
+ Top = 0
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ end
+ object GroupBox1: TGroupBox
+ Left = 0
+ Top = 52
+ Width = 289
+ Height = 270
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ Caption = ' Client '
+ TabOrder = 0
+ DesignSize = (
+ 289
+ 270)
+ object Label1: TLabel
+ Left = 11
+ Top = 16
+ Width = 80
+ Height = 13
+ Caption = 'Look for service:'
+ end
+ object Label2: TLabel
+ Left = 11
+ Top = 88
+ Width = 74
+ Height = 13
+ Caption = 'Found Servers:'
+ end
+ object ed_ServiceName: TEdit
+ Left = 8
+ Top = 29
+ Width = 273
+ Height = 21
+ Anchors = [akLeft, akTop, akRight]
+ TabOrder = 0
+ Text = 'IRODiscoveryService'
+ end
+ object btn_LookupService: TBitBtn
+ Left = 8
+ Top = 56
+ Width = 273
+ Height = 25
+ Action = ac_DiscoverServers
+ Anchors = [akLeft, akTop, akRight]
+ Caption = 'Discover Servers'
+ TabOrder = 1
+ end
+ object lb_Servers: TListBox
+ Left = 8
+ Top = 101
+ Width = 273
+ Height = 160
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ ItemHeight = 13
+ TabOrder = 2
+ end
+ end
+ object GroupBox2: TGroupBox
+ Left = 296
+ Top = 52
+ Width = 287
+ Height = 270
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ Caption = ' Server '
+ TabOrder = 1
+ DesignSize = (
+ 287
+ 270)
+ object Label3: TLabel
+ Left = 11
+ Top = 16
+ Width = 240
+ Height = 13
+ Caption = 'List of Services supported by this server instance:'
+ end
+ object ed_Services: TMemo
+ Left = 8
+ Top = 29
+ Width = 271
+ Height = 174
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ Lines.Strings = (
+ 'SomeService'
+ 'SomeOtherService')
+ TabOrder = 0
+ OnChange = btn_UpdateServiceListClick
+ end
+ object Panel1: TPanel
+ Left = 8
+ Top = 225
+ Width = 273
+ Height = 37
+ Anchors = [akLeft, akBottom]
+ BevelOuter = bvLowered
+ Color = clInfoBk
+ TabOrder = 1
+ object Label4: TLabel
+ Left = 6
+ Top = 5
+ Width = 250
+ Height = 26
+ Caption =
+ 'Enter names representing the services you want to simulate as be' +
+ 'ing supported on this server instance.'
+ WordWrap = True
+ end
+ end
+ object cb_SupportRegisteredServerClasses: TCheckBox
+ Left = 8
+ Top = 205
+ Width = 209
+ Height = 17
+ Anchors = [akLeft, akBottom]
+ Caption = 'List registered RO Servers as supported'
+ Checked = True
+ State = cbChecked
+ TabOrder = 2
+ OnClick = cb_SupportRegisteredServerClassesClick
+ end
+ end
+ object GroupBox3: TGroupBox
+ Left = 0
+ Top = 326
+ Width = 585
+ Height = 48
+ Anchors = [akLeft, akBottom]
+ Caption = ' Custom Discovery Options: Load'
+ TabOrder = 2
+ object Label5: TLabel
+ Left = 304
+ Top = 20
+ Width = 111
+ Height = 13
+ Caption = 'Simulated Server Load:'
+ end
+ object Label6: TLabel
+ Left = 8
+ Top = 20
+ Width = 148
+ Height = 13
+ Caption = 'Find a Server with Load below:'
+ end
+ object ed_ServerLoad: TEdit
+ Left = 418
+ Top = 17
+ Width = 63
+ Height = 21
+ TabOrder = 0
+ Text = '50'
+ end
+ object ed_MaxLoad: TEdit
+ Left = 160
+ Top = 17
+ Width = 63
+ Height = 21
+ TabOrder = 1
+ Text = '75'
+ end
+ object cb_ReturnInfo: TCheckBox
+ Left = 496
+ Top = 19
+ Width = 81
+ Height = 17
+ Caption = 'Return Info'
+ Checked = True
+ State = cbChecked
+ TabOrder = 2
+ end
+ end
+ object ROBroadcastServer: TROBroadcastServer
+ Active = True
+ Dispatchers = <
+ item
+ Name = 'ROBINMessage_Server'
+ Message = ROBINMessage_Server
+ Enabled = True
+ end>
+ IndyUDPServer.BroadcastEnabled = True
+ IndyUDPServer.Bindings = <>
+ IndyUDPServer.DefaultPort = 8090
+ IndyUDPServer.ThreadedEvent = True
+ Port = 8090
+ Left = 400
+ Top = 24
+ end
+ object ROBroadcastChannel: TROBroadcastChannel
+ ServerLocators = <>
+ DispatchOptions = []
+ Retrys = 5
+ IndyClient.BroadcastEnabled = True
+ IndyClient.Port = 8090
+ Port = 8090
+ Left = 215
+ Top = 25
+ end
+ object RODiscoveryClient: TRODiscoveryClient
+ Channel = ROBroadcastChannel
+ Message = ROBINMessage_Client
+ ServiceName = 'SomeService'
+ OnNewServersFound = RODiscoveryClientNewServersFound
+ OnNewServiceFound = RODiscoveryClientNewServiceFound
+ Left = 272
+ Top = 25
+ end
+ object RODiscoveryServer: TRODiscoveryServer
+ OnServiceFound = RODiscoveryServerServiceFound
+ Left = 456
+ Top = 24
+ end
+ object ROBINMessage_Server: TROBinMessage
+ Left = 428
+ Top = 24
+ end
+ object ROBINMessage_Client: TROBinMessage
+ Left = 244
+ Top = 25
+ end
+ object ActionList: TActionList
+ OnUpdate = ActionListUpdate
+ Left = 520
+ Top = 24
+ object ac_DiscoverServers: TAction
+ Caption = 'Discover Servers'
+ OnExecute = btn_LookupServiceClick
+ end
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Service Discovery/ServiceDiscoveryMain.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Service Discovery/ServiceDiscoveryMain.pas
new file mode 100644
index 0000000..7732657
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Service Discovery/ServiceDiscoveryMain.pas
@@ -0,0 +1,179 @@
+unit ServiceDiscoveryMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, uROClient, uROBINMessage, uRODiscovery,
+ uROIndyUDPChannel, uROBroadcastChannel, uROServer,
+ uROIndyUDPServer, uROBroadcastServer, StdCtrls, ExtCtrls, Buttons,
+ uROPoweredByRemObjectsButton, uRODiscovery_Intf, ActnList;
+
+type
+ TServiceDiscoveryMainForm = class(TForm)
+ ROBroadcastServer: TROBroadcastServer;
+ ROBroadcastChannel: TROBroadcastChannel;
+ RODiscoveryClient: TRODiscoveryClient;
+ RODiscoveryServer: TRODiscoveryServer;
+ GroupBox1: TGroupBox;
+ Label1: TLabel;
+ ed_ServiceName: TEdit;
+ btn_LookupService: TBitBtn;
+ lb_Servers: TListBox;
+ Label2: TLabel;
+ GroupBox2: TGroupBox;
+ Label3: TLabel;
+ ed_Services: TMemo;
+ RoPoweredByRemObjectsButton1: TRoPoweredByRemObjectsButton;
+ ROBINMessage_Server: TROBINMessage;
+ ROBINMessage_Client: TROBINMessage;
+ Panel1: TPanel;
+ Label4: TLabel;
+ cb_SupportRegisteredServerClasses: TCheckBox;
+ GroupBox3: TGroupBox;
+ ed_ServerLoad: TEdit;
+ Label5: TLabel;
+ Label6: TLabel;
+ ed_MaxLoad: TEdit;
+ ActionList: TActionList;
+ ac_DiscoverServers: TAction;
+ cb_ReturnInfo: TCheckBox;
+ procedure FormCreate(Sender: TObject);
+ procedure btn_UpdateServiceListClick(Sender: TObject);
+ procedure btn_LookupServiceClick(Sender: TObject);
+ procedure RODiscoveryClientNewServersFound(Sender: TObject);
+ procedure cb_SupportRegisteredServerClassesClick(Sender: TObject);
+ procedure ActionListUpdate(Action: TBasicAction;
+ var Handled: Boolean);
+ procedure RODiscoveryServerServiceFound(aSender: TObject;
+ aName: String; var ioDiscoveryOptions: TRODiscoveryOptions;
+ var ioHandled: Boolean);
+ procedure RODiscoveryClientNewServiceFound(aSender: TObject;
+ aName: String; aDiscoveryOptions: TRODiscoveryOptions);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+ TMyDiscoveryQueryOptions = class(TRODiscoveryOptions)
+ private
+ fMaximumLoad: integer;
+ published
+ property MaximumLoad: integer read fMaximumLoad write fMaximumLoad;
+ end;
+
+ TMyDiscoveryResultOptions = class(TRODiscoveryOptions)
+ private
+ fServerTime: TDateTime;
+ fMoreInfo: string;
+ fLoad: integer;
+ published
+ property ServerTime: TDateTime read fServerTime write fServerTime;
+ property MoreInfo: string read fMoreInfo write fMoreInfo;
+ property Load: integer read fLoad write fLoad;
+ end;
+
+var
+ ServiceDiscoveryMainForm: TServiceDiscoveryMainForm;
+
+implementation
+
+uses
+ uROTypes;
+
+{$R *.dfm}
+
+procedure TServiceDiscoveryMainForm.FormCreate(Sender: TObject);
+begin
+ ROBroadcastServer.Active := true;
+ btn_UpdateServiceListClick(self);
+end;
+
+procedure TServiceDiscoveryMainForm.btn_UpdateServiceListClick(Sender: TObject);
+begin
+ RODiscoveryServer.ServiceList.Assign(ed_Services.Lines);
+end;
+
+procedure TServiceDiscoveryMainForm.btn_LookupServiceClick(Sender: TObject);
+var
+ lOptions: TMyDiscoveryQueryOptions;
+begin
+ lb_Servers.Items.Clear();
+
+ RODiscoveryClient.ServiceName := ed_ServiceName.Text;
+
+ lOptions := TMyDiscoveryQueryOptions.Create();
+ try
+ lOptions.MaximumLoad := StrToIntDef(ed_MaxLoad.Text,100);
+ RODiscoveryClient.RefreshServerList(lOptions);
+ finally
+ lOptions.Free();
+ end;
+end;
+
+procedure TServiceDiscoveryMainForm.RODiscoveryClientNewServersFound(Sender: TObject);
+begin
+// lb_Servers.Items.Assign(RODiscoveryClient.ServerList);
+end;
+
+procedure TServiceDiscoveryMainForm.RODiscoveryClientNewServiceFound(aSender: TObject; aName: String; aDiscoveryOptions: TRODiscoveryOptions);
+var
+ lOptions: TMyDiscoveryResultOptions;
+begin
+ if Assigned(aDiscoveryOptions) and (aDiscoveryOptions is TMyDiscoveryResultOptions) then begin
+ lOptions := TMyDiscoveryResultOptions(aDiscoveryOptions);
+ lb_Servers.Items.Add(Format('%s (Load: %d; Info: %s)',[aName, lOptions.Load, lOptions.MoreInfo]));
+ end
+ else begin
+ lb_Servers.Items.Add(aName+' (no info)');
+ end;
+end;
+
+
+procedure TServiceDiscoveryMainForm.cb_SupportRegisteredServerClassesClick(Sender: TObject);
+begin
+ RODiscoveryServer.SupportRegisteredServerClasses := cb_SupportRegisteredServerClasses.Checked;
+end;
+
+procedure TServiceDiscoveryMainForm.RODiscoveryServerServiceFound(aSender: TObject;
+ aName: String; var ioDiscoveryOptions: TRODiscoveryOptions;
+ var ioHandled: Boolean);
+begin
+ if Assigned(ioDiscoveryOptions) and (ioDiscoveryOptions is TMyDiscoveryQueryOptions) then begin
+ { Check if we fullfill the load requirement. if our load is too high, abort
+ without sending a response to the client }
+ if TMyDiscoveryQueryOptions(ioDiscoveryOptions).MaximumLoad <= StrToIntDef(ed_ServerLoad.Text,100) then begin
+ ROSendNoResponse();
+ end;
+ end;
+
+ if cb_ReturnInfo.Checked then begin
+ ioDiscoveryOptions := TMyDiscoveryResultOptions.Create;
+ with TMyDiscoveryResultOptions(ioDiscoveryOptions) do begin
+ Load := StrToIntDef(ed_ServerLoad.Text,-1);
+ MoreInfo := 'Some info';
+ ServerTime := Now;
+ end; { with }
+ end
+ else begin
+ ioDiscoveryOptions := nil;
+ end;
+
+ { Don't free the original ioDiscoveryOptions (if it was assigned), the RO
+ framework take scare of that, just as it will free the one we pass back }
+end;
+
+procedure TServiceDiscoveryMainForm.ActionListUpdate(Action: TBasicAction;
+ var Handled: Boolean);
+begin
+ ac_DiscoverServers.Enabled := not ROBroadcastChannel.Busy;
+end;
+
+initialization
+ RegisterROClass(TMyDiscoveryQueryOptions);
+ RegisterROClass(TMyDiscoveryResultOptions);
+finalization
+ UnregisterROClass(TMyDiscoveryQueryOptions);
+ UnregisterROClass(TMyDiscoveryResultOptions);
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/LoginService_Impl.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/LoginService_Impl.dfm
new file mode 100644
index 0000000..41bac0b
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/LoginService_Impl.dfm
@@ -0,0 +1,7 @@
+object LoginService: TLoginService
+ OldCreateOrder = True
+ Left = 200
+ Top = 200
+ Height = 300
+ Width = 300
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/LoginService_Impl.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/LoginService_Impl.pas
new file mode 100644
index 0000000..77cd5d8
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/LoginService_Impl.pas
@@ -0,0 +1,97 @@
+unit LoginService_Impl;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ This is where you are supposed to code the implementation of your objects. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils,
+ {RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
+ {Required:} uRORemoteDataModule,
+ {Generated:} SessionTypesLibrary_Intf;
+
+type
+ TLogProcedure = procedure(AStr: string) of object;
+ { TLoginService }
+ TLoginService = class(TRORemoteDataModule, ILoginService)
+ private
+ procedure Log(Astr: string);
+ protected
+ { ILoginService methods }
+ function Login(const UserID: string; const Password: string): boolean;
+ procedure Logout(const SessionID: string);
+ public
+ constructor Create(aOwner: TComponent); override;
+ end;
+
+implementation
+
+{$R *.dfm}
+uses
+ {Generated:} SessionTypesLibrary_Invk, Variants,
+ SessionTypes_ServerMain;
+
+procedure Create_LoginService(out anInstance: IUnknown);
+begin
+ anInstance := TLoginService.Create(nil);
+end;
+
+{ LoginService }
+
+constructor TLoginService.Create(aOwner: TComponent);
+begin
+ inherited;
+ SessionManager := SessionTypes_ServerMainForm._SessionManager;
+end;
+
+procedure TLoginService.Log(Astr: string);
+begin
+ SessionTypes_ServerMainForm.Log(AStr);
+end;
+
+function TLoginService.Login(const UserID: string; const Password: string): boolean;
+begin
+ Log('User ''' + UserID + ''' is trying logon with password ''' + Password + '''');
+ if (Session.Values['Login'] <> Null) then begin
+ Log('User ''' + Session.Values['Login'] + ''' is already connected to session ' + GUIDToString(ClientID));
+ Log('Login unsuccessful');
+ Result := True;
+ Exit;
+ end;
+
+ result := (UserID <> '') and (UserID = Password); // Dummy test... You would code the one specific to your system
+ if Result then begin
+ Session.Values['Login'] := UserId;
+ Session.Values['Password'] := Password;
+ Log('Login successful');
+ end
+ else begin
+ Log('Invalid login!');
+ DestroySession; // Wrong login! The session cannot be persisted
+ end;
+ Log('');
+end;
+
+procedure TLoginService.Logout(const SessionID: string);
+var
+ aUser: string;
+begin
+ if Session.Values['Login'] <> Null then
+ aUser := Session.Values['Login']
+ else
+ aUser := '';
+ Log('User ''' + aUser + ''' has requested logout');
+ Log('');
+ DestroySession; // Removes the session from the SessionManager
+end;
+
+initialization
+ TROClassFactory.Create('LoginService', Create_LoginService, TLoginService_Invoker);
+finalization
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/RODLFILE.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/RODLFILE.res
new file mode 100644
index 0000000..a0a58c2
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/RODLFILE.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes Create Session Table.sql b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes Create Session Table.sql
new file mode 100644
index 0000000..73a7ed4
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes Create Session Table.sql
@@ -0,0 +1,15 @@
+CREATE TABLE [dbo].[Sessions] (
+ [SessionID] [char] (38) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
+ [Created] [datetime] NULL ,
+ [LastAccessed] [datetime] NULL ,
+ [Data] [IMAGE] NULL
+)
+GO
+
+ALTER TABLE [dbo].[Sessions] WITH NOCHECK ADD
+ CONSTRAINT [PK_Sessions] PRIMARY KEY CLUSTERED
+ (
+ [SessionID]
+ ) ON [PRIMARY]
+GO
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes.Sample.html b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes.Sample.html
new file mode 100644
index 0000000..9106947
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes.Sample.html
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+ Session Types
+
+
+
+Purpose
+
+ This example shows the use of sessions and illustrates:
+
+TROEventSessionManager
+TROInMemorySessionManager
+TROMasterServerSessionManager
+TRODBSessionManager
+
+
+
+Getting Started
+
+ Build or compile all projects.
+ Launch the server (via the menu option: RemObjects | Launch Server Executable ).
+ Activate the session desired.
+ Ensure that SessionTypes_Client is the selected project and run it.
+
+Examine the Code
+
+
+ Examine the simple code needed for changing the session in SessionTypes_ServerMain.pas .
+
+
+
+
+
+ Important note: this sample needs a "Sessions" table to be created in one of your databases. By default, the sample looks for the Sessions table in MSSQL's Northwind Database, but you can easily change to connect to any other database.
+
+
+ To create the Sessions table, run the .SQL script provided:
+
+
+ ..\RemObjects SDK for Delphi\Samples\Session Types\SessionTypes Create Session Table.sql
+
+
+ using the appropriate query tool provided with your database (e.g. Query Analyzer for MSSQL).
+
+
+Data Abstract Users
+This sample can easily be extended to encompass Data Abstract via the following steps:
+
+ Create TDAConnectionManager, TDADriverManager, TDAADODriver and TDASchema instances.
+ Relink.
+ In the schema, create the datasets and commands similar to qu* (TADOQuery).
+ Create a DADBSessionManager instance and assign the corresponding datasets and commands.
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes.bdsgroup b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes.bdsgroup
new file mode 100644
index 0000000..addf1d9
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes.bdsgroup
@@ -0,0 +1,20 @@
+
+
+
+
+ Default.Personality
+
+ 1.0
+ {89EA18B9-673B-4BF4-BB4A-772C7AD6D666}
+
+
+
+
+
+ SessionTypes_Server.bdsproj
+ SessionTypes_Client.bdsproj
+ SessionTypes_Server.exe SessionTypes_Client.exe
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes.bpg b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes.bpg
new file mode 100644
index 0000000..479f06e
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes.bpg
@@ -0,0 +1,23 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = SessionTypes_Server.exe SessionTypes_Client.exe
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+SessionTypes_Client.exe: SessionTypes_Client.dpr
+ $(DCC)
+
+SessionTypes_Server.exe: SessionTypes_Server.dpr
+ $(DCC)
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes.groupproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes.groupproj
new file mode 100644
index 0000000..2a72a57
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes.groupproj
@@ -0,0 +1,40 @@
+
+
+ {ee6c030a-a2a2-4e8d-8869-acf773696e8f}
+
+
+
+
+ Default.Personality
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypesLibrary.rodl b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypesLibrary.rodl
new file mode 100644
index 0000000..4450ae1
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypesLibrary.rodl
@@ -0,0 +1,74 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypesLibrary_Intf.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypesLibrary_Intf.pas
new file mode 100644
index 0000000..c7bad37
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypesLibrary_Intf.pas
@@ -0,0 +1,210 @@
+unit SessionTypesLibrary_Intf;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROClasses, uROClient, uROTypes, uROClientIntf;
+
+const
+ { Library ID }
+ LibraryUID = '{EE96A14F-A446-4194-A1FD-C4F900DFBE62}';
+
+ { Service Interface ID's }
+ ISessionTypesService_IID : TGUID = '{EE96A14F-A446-4194-A1FD-C4F900DFBE62}';
+ ILoginService_IID : TGUID = '{A8C9C8A2-3988-4E92-8846-6CDE7B35AA1E}';
+
+ { Event ID's }
+
+type
+ { Forward declarations }
+ ISessionTypesService = interface;
+ ILoginService = interface;
+
+
+ { ISessionTypesService }
+ ISessionTypesService = interface
+ ['{EE96A14F-A446-4194-A1FD-C4F900DFBE62}']
+ function GetSessionValue(const Name: String): String;
+ procedure SetSessionValue(const Name: String; const Value: String);
+ function GetSessionID: String;
+ function GetSessionManagerName: String;
+ end;
+
+ { CoSessionTypesService }
+ CoSessionTypesService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): ISessionTypesService;
+ end;
+
+ { TSessionTypesService_Proxy }
+ TSessionTypesService_Proxy = class(TROProxy, ISessionTypesService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ function GetSessionValue(const Name: String): String;
+ procedure SetSessionValue(const Name: String; const Value: String);
+ function GetSessionID: String;
+ function GetSessionManagerName: String;
+ end;
+
+ { ILoginService }
+ ILoginService = interface
+ ['{A8C9C8A2-3988-4E92-8846-6CDE7B35AA1E}']
+ function Login(const UserID: String; const Password: String): boolean;
+ procedure Logout(const SessionID: String);
+ end;
+
+ { CoLoginService }
+ CoLoginService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): ILoginService;
+ end;
+
+ { TLoginService_Proxy }
+ TLoginService_Proxy = class(TROProxy, ILoginService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ function Login(const UserID: String; const Password: String): boolean;
+ procedure Logout(const SessionID: String);
+ end;
+
+implementation
+
+uses
+ {vcl:} SysUtils,
+ {RemObjects:} uROEventRepository, uRORes;
+
+{ CoSessionTypesService }
+
+class function CoSessionTypesService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): ISessionTypesService;
+begin
+ result := TSessionTypesService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TSessionTypesService_Proxy }
+
+function TSessionTypesService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'SessionTypesService';
+end;
+
+function TSessionTypesService_Proxy.GetSessionValue(const Name: String): String;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'SessionTypesLibrary', __InterfaceName, 'GetSessionValue');
+ __Message.Write('Name', TypeInfo(String), Name, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(String), result, []);
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+procedure TSessionTypesService_Proxy.SetSessionValue(const Name: String; const Value: String);
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'SessionTypesLibrary', __InterfaceName, 'SetSessionValue');
+ __Message.Write('Name', TypeInfo(String), Name, []);
+ __Message.Write('Value', TypeInfo(String), Value, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+function TSessionTypesService_Proxy.GetSessionID: String;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'SessionTypesLibrary', __InterfaceName, 'GetSessionID');
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(String), result, []);
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+function TSessionTypesService_Proxy.GetSessionManagerName: String;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'SessionTypesLibrary', __InterfaceName, 'GetSessionManagerName');
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(String), result, []);
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+{ CoLoginService }
+
+class function CoLoginService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): ILoginService;
+begin
+ result := TLoginService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TLoginService_Proxy }
+
+function TLoginService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'LoginService';
+end;
+
+function TLoginService_Proxy.Login(const UserID: String; const Password: String): boolean;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'SessionTypesLibrary', __InterfaceName, 'Login');
+ __Message.Write('UserID', TypeInfo(String), UserID, []);
+ __Message.Write('Password', TypeInfo(String), Password, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(boolean), result, []);
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+procedure TLoginService_Proxy.Logout(const SessionID: String);
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'SessionTypesLibrary', __InterfaceName, 'Logout');
+ __Message.Write('SessionID', TypeInfo(String), SessionID, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+initialization
+ RegisterProxyClass(ISessionTypesService_IID, TSessionTypesService_Proxy);
+ RegisterProxyClass(ILoginService_IID, TLoginService_Proxy);
+
+
+finalization
+ UnregisterProxyClass(ISessionTypesService_IID);
+ UnregisterProxyClass(ILoginService_IID);
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypesLibrary_Invk.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypesLibrary_Invk.pas
new file mode 100644
index 0000000..60a83c0
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypesLibrary_Invk.pas
@@ -0,0 +1,158 @@
+unit SessionTypesLibrary_Invk;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes,
+ {RemObjects:} uROServer, uROServerIntf, uROTypes, uROClientIntf,
+ {Generated:} SessionTypesLibrary_Intf;
+
+type
+ TSessionTypesService_Invoker = class(TROInvoker)
+ private
+ protected
+ published
+ procedure Invoke_GetSessionValue(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_SetSessionValue(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_GetSessionID(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_GetSessionManagerName(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ end;
+
+ TLoginService_Invoker = class(TROInvoker)
+ private
+ protected
+ published
+ procedure Invoke_Login(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_Logout(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ end;
+
+implementation
+
+uses
+ {RemObjects:} uRORes, uROClient;
+
+{ TSessionTypesService_Invoker }
+
+procedure TSessionTypesService_Invoker.Invoke_GetSessionValue(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function GetSessionValue(const Name: String): String; }
+var
+ Name: String;
+ lResult: String;
+begin
+ try
+ __Message.Read('Name', TypeInfo(String), Name, []);
+
+ lResult := (__Instance as ISessionTypesService).GetSessionValue(Name);
+
+ __Message.InitializeResponseMessage(__Transport, 'SessionTypesLibrary', 'SessionTypesService', 'GetSessionValueResponse');
+ __Message.Write('Result', TypeInfo(String), lResult, []);
+ __Message.Finalize;
+
+ finally
+ end;
+end;
+
+procedure TSessionTypesService_Invoker.Invoke_SetSessionValue(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ procedure SetSessionValue(const Name: String; const Value: String); }
+var
+ Name: String;
+ Value: String;
+begin
+ try
+ __Message.Read('Name', TypeInfo(String), Name, []);
+ __Message.Read('Value', TypeInfo(String), Value, []);
+
+ (__Instance as ISessionTypesService).SetSessionValue(Name, Value);
+
+ __Message.InitializeResponseMessage(__Transport, 'SessionTypesLibrary', 'SessionTypesService', 'SetSessionValueResponse');
+ __Message.Finalize;
+
+ __oResponseOptions := [roNoResponse];
+
+ finally
+ end;
+end;
+
+procedure TSessionTypesService_Invoker.Invoke_GetSessionID(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function GetSessionID: String; }
+var
+ lResult: String;
+begin
+ try
+ lResult := (__Instance as ISessionTypesService).GetSessionID;
+
+ __Message.InitializeResponseMessage(__Transport, 'SessionTypesLibrary', 'SessionTypesService', 'GetSessionIDResponse');
+ __Message.Write('Result', TypeInfo(String), lResult, []);
+ __Message.Finalize;
+
+ finally
+ end;
+end;
+
+procedure TSessionTypesService_Invoker.Invoke_GetSessionManagerName(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function GetSessionManagerName: String; }
+var
+ lResult: String;
+begin
+ try
+ lResult := (__Instance as ISessionTypesService).GetSessionManagerName;
+
+ __Message.InitializeResponseMessage(__Transport, 'SessionTypesLibrary', 'SessionTypesService', 'GetSessionManagerNameResponse');
+ __Message.Write('Result', TypeInfo(String), lResult, []);
+ __Message.Finalize;
+
+ finally
+ end;
+end;
+
+{ TLoginService_Invoker }
+
+procedure TLoginService_Invoker.Invoke_Login(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function Login(const UserID: String; const Password: String): boolean; }
+var
+ UserID: String;
+ Password: String;
+ lResult: boolean;
+begin
+ try
+ __Message.Read('UserID', TypeInfo(String), UserID, []);
+ __Message.Read('Password', TypeInfo(String), Password, []);
+
+ lResult := (__Instance as ILoginService).Login(UserID, Password);
+
+ __Message.InitializeResponseMessage(__Transport, 'SessionTypesLibrary', 'LoginService', 'LoginResponse');
+ __Message.Write('Result', TypeInfo(boolean), lResult, []);
+ __Message.Finalize;
+
+ finally
+ end;
+end;
+
+procedure TLoginService_Invoker.Invoke_Logout(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ procedure Logout(const SessionID: String); }
+var
+ SessionID: String;
+begin
+ try
+ __Message.Read('SessionID', TypeInfo(String), SessionID, []);
+
+ (__Instance as ILoginService).Logout(SessionID);
+
+ __Message.InitializeResponseMessage(__Transport, 'SessionTypesLibrary', 'LoginService', 'LogoutResponse');
+ __Message.Finalize;
+
+ __oResponseOptions := [roNoResponse];
+
+ finally
+ end;
+end;
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypesService_Impl.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypesService_Impl.dfm
new file mode 100644
index 0000000..f6a2e16
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypesService_Impl.dfm
@@ -0,0 +1,7 @@
+object SessionTypesService: TSessionTypesService
+ OldCreateOrder = True
+ Left = 200
+ Top = 200
+ Height = 300
+ Width = 300
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypesService_Impl.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypesService_Impl.pas
new file mode 100644
index 0000000..cf39c62
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypesService_Impl.pas
@@ -0,0 +1,107 @@
+unit SessionTypesService_Impl;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ This is where you are supposed to code the implementation of your objects. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils,
+ {RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
+ {Required:} uRORemoteDataModule,
+ {Generated:} SessionTypesLibrary_Intf;
+
+type
+ TLogProcedure = procedure(AStr: string) of object;
+
+ { TSessionTypesService }
+
+ TSessionTypesService = class(TRORemoteDataModule, ISessionTypesService)
+ private
+ procedure Log(Astr: string);
+ protected
+ { ISessionTypesService methods }
+ function GetSessionValue(const Name: string): string;
+ procedure SetSessionValue(const Name: string; const Value: string);
+ function GetSessionID: string;
+ function GetSessionManagerName: string;
+ public
+ constructor Create(aOwner: TComponent); override;
+ end;
+
+implementation
+
+{$R *.dfm}
+uses
+ {Generated:} SessionTypesLibrary_Invk, Variants,
+ SessionTypes_ServerMain;
+
+procedure Create_SessionTypesService(out anInstance: IUnknown);
+begin
+ anInstance := TSessionTypesService.Create(nil);
+end;
+
+{ SessionTypesService }
+
+function TSessionTypesService.GetSessionValue(const Name: string): string;
+begin
+ if Session.Values['Login'] = Null then begin
+ Log('Session ' + GUIDToString(Session.SessionID) + ' was trying get value for ''' + Name + '''');
+ Log('Illegal user. Disconnect!');
+ DestroySession;
+ end
+ else begin
+ result := VarToStr(Session.Values[Name]);
+ Log(Session.Values['Login'] + ' is requested value for ''' + Name + '''. Value =''' + Result + '''');
+ end;
+end;
+
+procedure TSessionTypesService.SetSessionValue(const Name: string; const Value: string);
+begin
+ if Session.Values['Login'] = Null then begin
+ Log('Session ' + GUIDToString(Session.SessionID) + ' was trying set value ''' + Value + ''' for ''' + Name + '''');
+ Log('Illegal user. Disconnect!');
+ DestroySession;
+ end
+ else begin
+ Session.Values[Name] := Value;
+ Log(Session.Values['Login'] + ' has set value ''' + Value + ''' for ''' + Name + '''');
+ end;
+end;
+
+function TSessionTypesService.GetSessionID: string;
+begin
+ result := GUIDToString(ClientID);
+end;
+
+procedure TSessionTypesService.Log(Astr: string);
+begin
+ SessionTypes_ServerMainForm.Log(AStr);
+end;
+
+constructor TSessionTypesService.Create(aOwner: TComponent);
+begin
+ inherited;
+ SessionManager := SessionTypes_ServerMainForm._SessionManager;
+ RequiresSession:=True;
+end;
+
+function TSessionTypesService.GetSessionManagerName: string;
+begin
+ if Session.Values['Login'] <> Null then
+ Log(Session.Values['Login'] + ' is requested SessionManagerName')
+ else
+ Log('Request SessionManagerName - Illegal request!');
+ Result := SessionManager.Name;
+ if Session.Values['Login'] = Null then DestroySession;
+end;
+
+initialization
+ TROClassFactory.Create('SessionTypesService', Create_SessionTypesService, TSessionTypesService_Invoker);
+finalization
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes_Client.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes_Client.bdsproj
new file mode 100644
index 0000000..c9772f4
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes_Client.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {28029312-9427-4F18-9C83-36A73FB33B46}
+
+
+
+
+ SessionTypes_Client.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes_Client.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes_Client.dpr
new file mode 100644
index 0000000..24f2940
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes_Client.dpr
@@ -0,0 +1,16 @@
+program SessionTypes_Client;
+
+uses
+ Forms,
+ SessionTypes_ClientMain in 'SessionTypes_ClientMain.pas' {SessionTypes_ClientMainForm};
+
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'SessionTypes - Client';
+ Application.CreateForm(TSessionTypes_ClientMainForm, SessionTypes_ClientMainForm);
+ Application.Run;
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes_Client.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes_Client.dproj
new file mode 100644
index 0000000..c0ffa0f
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes_Client.dproj
@@ -0,0 +1,72 @@
+
+
+ {f1691183-136d-49e5-87e6-388fe20cc7db}
+ SessionTypes_Client.dpr
+ Debug
+ AnyCPU
+ DCC32
+ SessionTypes_Client.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ SessionTypes_Client.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes_Client.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes_Client.res
new file mode 100644
index 0000000..90e4219
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes_Client.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes_ClientMain.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes_ClientMain.dfm
new file mode 100644
index 0000000..68b6143
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes_ClientMain.dfm
@@ -0,0 +1,181 @@
+object SessionTypes_ClientMainForm: TSessionTypes_ClientMainForm
+ Left = 279
+ Top = 260
+ AutoScroll = False
+ Caption = 'SessionTypes - Client'
+ ClientHeight = 249
+ ClientWidth = 385
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ OnCreate = FormCreate
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Label3: TLabel
+ Left = 7
+ Top = 16
+ Width = 36
+ Height = 13
+ Caption = '&UserID:'
+ end
+ object Label4: TLabel
+ Left = 7
+ Top = 47
+ Width = 49
+ Height = 13
+ Caption = 'Pass&word:'
+ end
+ object Label5: TLabel
+ Left = 7
+ Top = 69
+ Width = 116
+ Height = 13
+ Caption = 'Session Manager Name:'
+ end
+ object GroupBox1: TGroupBox
+ Left = 8
+ Top = 156
+ Width = 369
+ Height = 88
+ Anchors = [akLeft, akTop, akBottom]
+ Caption = 'Session Values'
+ TabOrder = 7
+ object Label1: TLabel
+ Left = 8
+ Top = 28
+ Width = 31
+ Height = 13
+ Caption = '&Name:'
+ end
+ object Label2: TLabel
+ Left = 8
+ Top = 60
+ Width = 30
+ Height = 13
+ Caption = '&Value:'
+ end
+ object SetValueButton: TButton
+ Left = 280
+ Top = 22
+ Width = 75
+ Height = 25
+ Caption = '&Set Value'
+ TabOrder = 2
+ OnClick = SetValueButtonClick
+ end
+ object GetValueButton: TButton
+ Left = 280
+ Top = 54
+ Width = 75
+ Height = 25
+ Caption = '&Get Value'
+ TabOrder = 3
+ OnClick = GetValueButtonClick
+ end
+ object eName: TEdit
+ Left = 48
+ Top = 24
+ Width = 225
+ Height = 21
+ TabOrder = 0
+ end
+ object eValue: TEdit
+ Left = 48
+ Top = 56
+ Width = 225
+ Height = 21
+ TabOrder = 1
+ end
+ end
+ object stSessionID: TStaticText
+ Left = 32
+ Top = 120
+ Width = 314
+ Height = 17
+ AutoSize = False
+ BorderStyle = sbsSunken
+ Caption = 'stSessionID'
+ TabOrder = 6
+ end
+ object LoginButton: TButton
+ Left = 221
+ Top = 10
+ Width = 75
+ Height = 25
+ Caption = '&Login'
+ TabOrder = 2
+ OnClick = LoginButtonClick
+ end
+ object LogoutButton: TButton
+ Left = 301
+ Top = 9
+ Width = 75
+ Height = 25
+ Caption = 'Log&out'
+ TabOrder = 3
+ OnClick = LogoutButtonClick
+ end
+ object cbUserID: TComboBox
+ Left = 63
+ Top = 12
+ Width = 145
+ Height = 21
+ ItemHeight = 13
+ TabOrder = 0
+ OnChange = cbUserIDChange
+ end
+ object ePassword: TEdit
+ Left = 63
+ Top = 43
+ Width = 145
+ Height = 21
+ TabOrder = 1
+ end
+ object stSessionManagerName: TStaticText
+ Left = 32
+ Top = 85
+ Width = 314
+ Height = 17
+ AutoSize = False
+ BorderStyle = sbsSunken
+ TabOrder = 5
+ end
+ object GetSessionManagerNameButton: TButton
+ Left = 222
+ Top = 40
+ Width = 154
+ Height = 25
+ Caption = 'Get Session Manager Name'
+ TabOrder = 4
+ OnClick = GetSessionManagerNameButtonClick
+ end
+ object ROBINMessage: TROBinMessage
+ Left = 239
+ Top = 200
+ end
+ object rsSessionService: TRORemoteService
+ Message = ROBINMessage
+ Channel = SuperTcpChannel
+ ServiceName = 'SessionTypesService'
+ Left = 239
+ Top = 174
+ end
+ object rsLoginService: TRORemoteService
+ Message = ROBINMessage
+ Channel = SuperTcpChannel
+ ServiceName = 'LoginService'
+ Left = 211
+ Top = 174
+ end
+ object SuperTcpChannel: TROSuperTcpChannel
+ ServerLocators = <>
+ DispatchOptions = []
+ Host = '127.0.0.1'
+ Left = 212
+ Top = 202
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes_ClientMain.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes_ClientMain.pas
new file mode 100644
index 0000000..9efba8d
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes_ClientMain.pas
@@ -0,0 +1,105 @@
+unit SessionTypes_ClientMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, uRORemoteService, uROClient,
+ uROBinMessage, StdCtrls, uROSuperTCPChannel, SessionTypesLibrary_Intf;
+
+type
+ TSessionTypes_ClientMainForm = class(TForm)
+ Label3: TLabel;
+ Label4: TLabel;
+ GroupBox1: TGroupBox;
+ Label1: TLabel;
+ Label2: TLabel;
+ SetValueButton: TButton;
+ GetValueButton: TButton;
+ eName: TEdit;
+ eValue: TEdit;
+ stSessionID: TStaticText;
+ LoginButton: TButton;
+ LogoutButton: TButton;
+ cbUserID: TComboBox;
+ ePassword: TEdit;
+ ROBINMessage: TROBinMessage;
+ rsSessionService: TRORemoteService;
+ rsLoginService: TRORemoteService;
+ SuperTcpChannel: TROSuperTcpChannel;
+ stSessionManagerName: TStaticText;
+ Label5: TLabel;
+ GetSessionManagerNameButton: TButton;
+ procedure LoginButtonClick(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ procedure LogoutButtonClick(Sender: TObject);
+ procedure cbUserIDChange(Sender: TObject);
+ procedure GetValueButtonClick(Sender: TObject);
+ procedure SetValueButtonClick(Sender: TObject);
+ procedure GetSessionManagerNameButtonClick(Sender: TObject);
+ private
+ { Private declarations }
+ FService: ISessionTypesService;
+ FLoginService: ILoginService;
+ public
+ { Public declarations }
+ end;
+
+var
+ SessionTypes_ClientMainForm: TSessionTypes_ClientMainForm;
+
+implementation
+
+{$R *.dfm}
+
+const
+ UserNames: array[0..2] of string = ('john', 'brian', 'marta');
+
+procedure TSessionTypes_ClientMainForm.LoginButtonClick(Sender: TObject);
+begin
+ FLoginService.Login(cbUserID.Text, ePassword.Text);
+end;
+
+procedure TSessionTypes_ClientMainForm.FormCreate(Sender: TObject);
+var
+ i: integer;
+begin
+ for i := 0 to High(UserNames) do
+ cbUserID.Items.Add(UserNames[i]);
+
+ stSessionID.Caption := GUIDToString(ROBINMessage.ClientID);
+ fService := (rsSessionService as ISessionTypesService);
+ FLoginService := (rsLoginService as ILoginService);
+ SuperTcpChannel.Active := True;
+end;
+
+procedure TSessionTypes_ClientMainForm.LogoutButtonClick(Sender: TObject);
+begin
+ FLoginService.Logout(stSessionID.Caption);
+end;
+
+procedure TSessionTypes_ClientMainForm.cbUserIDChange(Sender: TObject);
+begin
+ ePassword.Text := cbUserID.Text;
+end;
+
+procedure TSessionTypes_ClientMainForm.GetValueButtonClick(
+ Sender: TObject);
+begin
+ eValue.Text := fService.GetSessionValue(eName.Text);
+end;
+
+procedure TSessionTypes_ClientMainForm.SetValueButtonClick(
+ Sender: TObject);
+begin
+ fService.SetSessionValue(eName.Text, eValue.Text);
+end;
+
+procedure TSessionTypes_ClientMainForm.GetSessionManagerNameButtonClick(
+ Sender: TObject);
+begin
+ stSessionManagerName.Caption := fService.GetSessionManagerName;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes_Server.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes_Server.bdsproj
new file mode 100644
index 0000000..2f255c1
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes_Server.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {4B4BC71D-255E-4E1F-9E70-B272EC6D8FA7}
+
+
+
+
+ SessionTypes_Server.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes_Server.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes_Server.dpr
new file mode 100644
index 0000000..aeb3a4f
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes_Server.dpr
@@ -0,0 +1,24 @@
+program SessionTypes_Server;
+
+
+{#ROGEN:SessionTypesLibrary.rodl} // RemObjects: Careful, do not remove!
+
+uses
+ uROComInit,
+ Forms,
+ SessionTypes_ServerMain in 'SessionTypes_ServerMain.pas' {SessionTypes_ServerMainForm},
+ SessionTypesLibrary_Intf in 'SessionTypesLibrary_Intf.pas',
+ SessionTypesLibrary_Invk in 'SessionTypesLibrary_Invk.pas',
+ SessionTypesService_Impl in 'SessionTypesService_Impl.pas' {SessionTypesService: TRORemoteDataModule},
+ LoginService_Impl in 'LoginService_Impl.pas' {LoginService: TRORemoteDataModule},
+ SessionTypes_Server_DBSessionManager in 'SessionTypes_Server_DBSessionManager.pas' {SessionTypes_Server_DBSessionManagerForm: TDataModule};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'SessionTypes - Server';
+ Application.CreateForm(TSessionTypes_Server_DBSessionManagerForm, SessionTypes_Server_DBSessionManagerForm);
+ Application.CreateForm(TSessionTypes_ServerMainForm, SessionTypes_ServerMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes_Server.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes_Server.dproj
new file mode 100644
index 0000000..d5bfa23
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes_Server.dproj
@@ -0,0 +1,83 @@
+
+
+ {bf2e1d05-f797-4869-96a9-62100733f9c2}
+ SessionTypes_Server.dpr
+ Debug
+ AnyCPU
+ DCC32
+ SessionTypes_Server.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ SessionTypes_Server.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes_Server.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes_Server.res
new file mode 100644
index 0000000..aa9db5a
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes_Server.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes_ServerMain.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes_ServerMain.dfm
new file mode 100644
index 0000000..c889c21
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes_ServerMain.dfm
@@ -0,0 +1,128 @@
+object SessionTypes_ServerMainForm: TSessionTypes_ServerMainForm
+ Left = 137
+ Top = 83
+ AutoScroll = False
+ Caption = 'SessionTypes - Server'
+ ClientHeight = 386
+ ClientWidth = 601
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ PixelsPerInch = 96
+ TextHeight = 13
+ object ROPoweredByRemObjectsButton1: TROPoweredByRemObjectsButton
+ Left = 194
+ Top = 3
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ end
+ object infotext: TLabel
+ Left = 179
+ Top = 60
+ Width = 417
+ Height = 84
+ Anchors = [akLeft, akTop, akRight]
+ AutoSize = False
+ Caption = 'infotext'
+ WordWrap = True
+ end
+ object Memo: TMemo
+ Left = 0
+ Top = 149
+ Width = 601
+ Height = 235
+ Align = alCustom
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ TabOrder = 0
+ end
+ object rgSessions: TRadioGroup
+ Left = 0
+ Top = 53
+ Width = 176
+ Height = 96
+ Align = alCustom
+ Caption = 'Session'
+ ItemIndex = 0
+ Items.Strings = (
+ 'InMemorySessionManager'
+ 'MasterServerSessionManager'
+ 'EventSessionManager'
+ 'RODBSessionManager')
+ TabOrder = 1
+ OnClick = rgSessionsClick
+ end
+ object ROBinMessage: TROBinMessage
+ Left = 52
+ Top = 5
+ end
+ object ROServer: TROSuperTcpServer
+ Dispatchers = <
+ item
+ Name = 'ROBinMessage'
+ Message = ROBinMessage
+ Enabled = True
+ end>
+ Left = 81
+ Top = 5
+ end
+ object EventSessionManager: TROEventSessionManager
+ OnSessionCreated = SessionManagerSessionCreated
+ OnSessionDeleted = SessionManagerSessionDeleted
+ OnDeleteSession = EventSessionManagerDeleteSession
+ OnFindSession = EventSessionManagerFindSession
+ OnReleaseSession = EventSessionManagerReleaseSession
+ OnClearSessions = EventSessionManagerClearSessions
+ OnGetSessionCount = EventSessionManagerGetSessionCount
+ Left = 75
+ Top = 209
+ end
+ object InMemorySessionManager: TROInMemorySessionManager
+ OnSessionCreated = SessionManagerSessionCreated
+ OnSessionDeleted = SessionManagerSessionDeleted
+ Left = 74
+ Top = 152
+ end
+ object MasterServerSessionManager: TROMasterServerSessionManager
+ OnSessionCreated = SessionManagerSessionCreated
+ OnSessionDeleted = SessionManagerSessionDeleted
+ OnException = MasterServerSessionManagerException
+ Channel = ROIndyTCPChannel
+ Left = 75
+ Top = 181
+ end
+ object RODBSessionManager: TRODBSessionManager
+ OnSessionCreated = SessionManagerSessionCreated
+ OnSessionDeleted = SessionManagerSessionDeleted
+ OnException = RODBSessionManagerException
+ FieldNameSessionID = 'SessionID'
+ FieldNameCreated = 'Created'
+ FieldNameLastAccessed = 'LastAccessed'
+ FieldNameData = 'Data'
+ InsertDataset = SessionTypes_Server_DBSessionManagerForm.quInsertSession
+ DeleteDataset = SessionTypes_Server_DBSessionManagerForm.quDeleteSession
+ UpdateDataset = SessionTypes_Server_DBSessionManagerForm.quUpdateSession
+ SelectDataset = SessionTypes_Server_DBSessionManagerForm.quSelectSession
+ GetCountDataset = SessionTypes_Server_DBSessionManagerForm.quGetSessionCount
+ ClearSessionsDataset = SessionTypes_Server_DBSessionManagerForm.quClearSessions
+ SelectAllDataset = SessionTypes_Server_DBSessionManagerForm.quSelectAllSessions
+ ClearSessionsOnCreate = False
+ ClearSessionsOnDestroy = False
+ Left = 75
+ Top = 256
+ end
+ object ROIndyTCPChannel: TROIndyTCPChannel
+ ServerLocators = <>
+ DispatchOptions = []
+ Port = 8090
+ Host = '127.0.0.1'
+ Left = 102
+ Top = 180
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes_ServerMain.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes_ServerMain.pas
new file mode 100644
index 0000000..2833fd6
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes_ServerMain.pas
@@ -0,0 +1,245 @@
+unit SessionTypes_ServerMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, StdCtrls, uROPoweredByRemObjectsButton, SyncObjs, ExtCtrls,
+ uROSuperTCPServer, uROClient, uROServer, uROBinMessage,
+ uROMasterServerSessionManager, uROSessions,
+ uRODBSessionManager, SessionTypes_Server_DBSessionManager,
+ uROIndyTCPChannel;
+type
+ TSessionTypes_ServerMainForm = class(TForm)
+ ROPoweredByRemObjectsButton1: TROPoweredByRemObjectsButton;
+ Memo: TMemo;
+ rgSessions: TRadioGroup;
+ ROBinMessage: TROBinMessage;
+ ROServer: TROSuperTcpServer;
+ EventSessionManager: TROEventSessionManager;
+ InMemorySessionManager: TROInMemorySessionManager;
+ MasterServerSessionManager: TROMasterServerSessionManager;
+ RODBSessionManager: TRODBSessionManager;
+ infotext: TLabel;
+ ROIndyTCPChannel: TROIndyTCPChannel;
+ procedure FormCreate(Sender: TObject);
+ procedure FormDestroy(Sender: TObject);
+ procedure SessionManagerSessionCreated(const aSession: TROSession);
+ procedure SessionManagerSessionDeleted(const aSessionID: TGUID; IsExpired: Boolean);
+ procedure EventSessionManagerReleaseSession(var aSession: TROSession; NewSession: Boolean);
+ function EventSessionManagerGetSessionCount(SessionManager: TROCustomSessionManager): Integer;
+ procedure EventSessionManagerDeleteSession(const aSessionID: TGUID; IsExpired: Boolean);
+ procedure EventSessionManagerClearSessions(SessionManager: TROCustomSessionManager; OnlyExpired: Boolean);
+ procedure rgSessionsClick(Sender: TObject);
+ procedure EventSessionManagerFindSession(const aSessionID: TGUID;
+ out aSession: TROSession);
+ procedure MasterServerSessionManagerException(aSessionID: TGUID;
+ anException: Exception; var aRetry: Boolean);
+ procedure RODBSessionManagerException(aSessionID: TGUID;
+ anException: Exception; var aRetry: Boolean);
+ private
+ CriticalSection: TCriticalSection;
+ EventSessionList: TStringList;
+ function GetSessionManager: TROCustomSessionManager;
+ public
+ { Public declarations }
+ procedure Log(Astr: string);
+ published
+ property _SessionManager: TROCustomSessionManager read GetSessionManager;
+ end;
+
+var
+ SessionTypes_ServerMainForm: TSessionTypes_ServerMainForm;
+
+implementation
+uses Inifiles;
+{$R *.dfm}
+
+{ TSessionTypes_ServerMainForm }
+
+procedure TSessionTypes_ServerMainForm.Log(Astr: string);
+begin
+ if CriticalSection = nil then exit;
+ CriticalSection.Enter;
+ try
+ if AStr = '' then
+ Memo.Lines.Add('')
+ else
+ Memo.Lines.Add(DateTimetoStr(Now) + ': ' + Astr);
+ finally
+ CriticalSection.Leave;
+ end;
+end;
+
+procedure TSessionTypes_ServerMainForm.FormCreate(Sender: TObject);
+begin
+ CriticalSection := TCriticalSection.Create;
+ ROServer.Active := True;
+ // init Event manager
+
+ EventSessionList := TStringList.Create;
+ EventSessionList.Duplicates := dupError;
+ EventSessionList.Sorted := TRUE;
+
+ rgSessionsClick(rgSessions);
+end;
+
+procedure TSessionTypes_ServerMainForm.FormDestroy(Sender: TObject);
+begin
+ // we should manually clear sessions for TROEventSessionManager
+ EventSessionManager.ClearSessions(False);
+ CriticalSection.Free;
+ CriticalSection:=nil;
+ EventSessionList.Free;
+end;
+
+function TSessionTypes_ServerMainForm.GetSessionManager: TROCustomSessionManager;
+begin
+ case rgSessions.ItemIndex of
+ 1: Result := MasterServerSessionManager;
+ 2: Result := EventSessionManager;
+ 3: Result := RODBSessionManager;
+ else
+ { 0:} Result := InMemorySessionManager;
+ end;
+end;
+
+procedure TSessionTypes_ServerMainForm.SessionManagerSessionCreated(
+ const aSession: TROSession);
+begin
+ Log(rgSessions.Items[rgSessions.ItemIndex] + ': Session ' + GUIDToString(aSession.SessionID) + ' created!');
+end;
+
+procedure TSessionTypes_ServerMainForm.SessionManagerSessionDeleted(
+ const aSessionID: TGUID; IsExpired: Boolean);
+begin
+ if (csDestroying in ComponentState) then Exit; // See destructor
+ Log(rgSessions.Items[rgSessions.ItemIndex] + ': Session ' + GUIDToString(aSessionID) + ' has been closed');
+ Log('');
+end;
+
+procedure TSessionTypes_ServerMainForm.EventSessionManagerReleaseSession(
+ var aSession: TROSession; NewSession: Boolean);
+var
+ id: string;
+begin
+ inherited;
+ if NewSession then begin
+ id := GUIDToString(aSession.SessionID);
+ EventSessionList.AddObject(id, aSession);
+ end;
+end;
+
+function TSessionTypes_ServerMainForm.EventSessionManagerGetSessionCount(
+ SessionManager: TROCustomSessionManager): Integer;
+begin
+ result := EventSessionList.Count;
+end;
+
+
+procedure TSessionTypes_ServerMainForm.EventSessionManagerDeleteSession(
+ const aSessionID: TGUID; IsExpired: Boolean);
+var
+ idx: integer;
+begin
+ idx := EventSessionList.IndexOf(GUIDToString(aSessionID));
+ if (idx >= 0) then begin
+ EventSessionList.Objects[idx].Free;
+ EventSessionList.Delete(idx);
+ end;
+end;
+
+procedure TSessionTypes_ServerMainForm.EventSessionManagerClearSessions(
+ SessionManager: TROCustomSessionManager; OnlyExpired: Boolean);
+var
+ i: integer;
+ lSessionID: TGUID;
+begin
+ if OnlyExpired then begin
+ for i := (EventSessionList.Count - 1) downto 0 do
+ if EventSessionManager.CheckSessionIsExpired(TROSession(EventSessionList.Objects[i])) then begin
+ lSessionID := TROSession(EventSessionList.Objects[i]).SessionID;
+ EventSessionManager.DeleteSession(lSessionID, TRUE);
+ end;
+ end
+ else
+ for i := (EventSessionList.Count - 1) downto 0 do begin
+ lSessionID := TROSession(EventSessionList.Objects[i]).SessionID;
+ EventSessionManager.DeleteSession(lSessionID, FALSE);
+ end;
+end;
+
+procedure TSessionTypes_ServerMainForm.rgSessionsClick(Sender: TObject);
+
+ procedure SetupDBSession;
+ begin
+ // init RODBSessionManager
+ with RODBSessionManager do
+ if InsertDataset = nil then begin
+ InsertDataset := SessionTypes_Server_DBSessionManagerForm.quInsertSession;
+ DeleteDataset := SessionTypes_Server_DBSessionManagerForm.quDeleteSession;
+ UpdateDataset := SessionTypes_Server_DBSessionManagerForm.quUpdateSession;
+ SelectDataset := SessionTypes_Server_DBSessionManagerForm.quSelectSession;
+ GetCountDataset := SessionTypes_Server_DBSessionManagerForm.quGetSessionCount;
+ ClearSessionsDataset := SessionTypes_Server_DBSessionManagerForm.quClearSessions;
+ end;
+ end;
+
+begin
+ case rgSessions.ItemIndex of
+ 1 {MasterServerSessionManager}: begin
+ infotext.Caption :=
+ 'Stores session data in a precompiled mini database server provided with' +
+ 'RemObjects SDK (the Master Server). Provides the same benefits ' +
+ 'as the database session managers, without the need to manually maintain a ' +
+ 'database or database server.' + sLineBreak +
+ 'Demands started ''...\RemObjects SDK for Delphi\Bin\ROMasterServer.exe''';
+ end;
+ 2 {EventSessionManager}:
+ infotext.Caption :=
+ 'Provides an easy way to use custom code to manually store and retrieve session data.';
+ 3 {RODBSessionManager}: begin
+ infotext.Caption :=
+ 'Stores session data in a database table accessible via ADO.NET, a Delphi TDataSet ' +
+ 'component. This allows sharing of session data between servers and keeps session ' +
+ 'information persisted across server restarts.';
+ SetupDBSession;
+ end;
+ else
+ {0}{InMemorySessionManager}
+ infotext.Caption :=
+ 'Stores session data in local memory within the application server. ' +
+ 'This provides fast access, but does not persist session ' +
+ 'information when the server is restarted. Also, common session ' +
+ 'data cannot be shared by a server farm.';
+ end;
+end;
+
+procedure TSessionTypes_ServerMainForm.EventSessionManagerFindSession(
+ const aSessionID: TGUID; out aSession: TROSession);
+var
+ idx: integer;
+begin
+ aSession := nil;
+ idx := EventSessionList.IndexOf(GUIDToString(aSessionID));
+ if (idx >= 0) then aSession := TROSession(EventSessionList.Objects[idx]);
+ if (aSession <> nil) then aSession.LastAccessed := Now;
+end;
+
+procedure TSessionTypes_ServerMainForm.MasterServerSessionManagerException(
+ aSessionID: TGUID; anException: Exception; var aRetry: Boolean);
+begin
+ aRetry:=False;
+ Raise Exception.Create('Error connecting to MasterServer. Please run the MasterServer before attempting to store session data in the MasterServerSessionManager.');
+end;
+
+procedure TSessionTypes_ServerMainForm.RODBSessionManagerException(
+ aSessionID: TGUID; anException: Exception; var aRetry: Boolean);
+begin
+ aRetry:=False;
+ Raise Exception.Create('Error connecting to MSSQL server.');
+end;
+
+end.
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes_Server_DBSessionManager.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes_Server_DBSessionManager.dfm
new file mode 100644
index 0000000..4bf72a8
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes_Server_DBSessionManager.dfm
@@ -0,0 +1,166 @@
+object SessionTypes_Server_DBSessionManagerForm: TSessionTypes_Server_DBSessionManagerForm
+ OldCreateOrder = False
+ Left = 478
+ Top = 240
+ Height = 212
+ Width = 327
+ object quClearSessions: TADOQuery
+ Connection = ADOConnection
+ Parameters = <
+ item
+ Name = 'LastAccessed'
+ DataType = ftFloat
+ Value = 37751.3380116088
+ end>
+ Prepared = True
+ SQL.Strings = (
+ 'DELETE FROM Sessions '
+ 'WHERE LastAccessed<:LastAccessed')
+ Left = 16
+ Top = 120
+ end
+ object ADOConnection: TADOConnection
+ ConnectionString =
+ 'Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initi' +
+ 'al Catalog=Northwind;Data Source=.'
+ LoginPrompt = False
+ Provider = 'SQLOLEDB.1'
+ Left = 16
+ Top = 80
+ end
+ object quInsertSession: TADOQuery
+ Connection = ADOConnection
+ Parameters = <
+ item
+ Name = 'SessionID'
+ DataType = ftString
+ NumericScale = 255
+ Precision = 255
+ Size = 38
+ Value = Null
+ end
+ item
+ Name = 'Created'
+ Attributes = [paNullable]
+ DataType = ftDateTime
+ NumericScale = 3
+ Precision = 23
+ Size = 16
+ Value = Null
+ end
+ item
+ Name = 'LastAccessed'
+ Attributes = [paNullable]
+ DataType = ftDateTime
+ NumericScale = 3
+ Precision = 23
+ Size = 16
+ Value = Null
+ end
+ item
+ Name = 'Data'
+ Attributes = [paNullable, paLong]
+ DataType = ftBlob
+ Size = -1
+ Value = Null
+ end>
+ Prepared = True
+ SQL.Strings = (
+
+ 'INSERT INTO Sessions ([SessionID], [Created], [LastAccessed], [D' +
+ 'ata])'
+ 'VALUES(:SessionID, :Created, :LastAccessed, :Data)')
+ Left = 48
+ Top = 120
+ end
+ object quDeleteSession: TADOQuery
+ Connection = ADOConnection
+ Parameters = <
+ item
+ Name = 'SessionID'
+ DataType = ftString
+ NumericScale = 255
+ Precision = 255
+ Size = 38
+ Value = Null
+ end>
+ Prepared = True
+ SQL.Strings = (
+ 'DELETE FROM Sessions'
+ 'WHERE SessionID=:SessionID')
+ Left = 80
+ Top = 120
+ end
+ object quUpdateSession: TADOQuery
+ Connection = ADOConnection
+ Parameters = <
+ item
+ Name = 'LastAccessed'
+ Attributes = [paNullable]
+ DataType = ftDateTime
+ NumericScale = 3
+ Precision = 23
+ Size = 16
+ Value = Null
+ end
+ item
+ Name = 'Data'
+ Attributes = [paNullable, paLong]
+ DataType = ftBlob
+ Size = -1
+ Value = Null
+ end
+ item
+ Name = 'SessionID'
+ DataType = ftString
+ NumericScale = 255
+ Precision = 255
+ Size = 38
+ Value = Null
+ end>
+ Prepared = True
+ SQL.Strings = (
+ 'UPDATE Sessions SET LastAccessed=:LastAccessed, Data=:Data'
+ 'WHERE SessionID=:SessionID')
+ Left = 112
+ Top = 120
+ end
+ object quSelectSession: TADOQuery
+ Connection = ADOConnection
+ CursorType = ctStatic
+ Parameters = <
+ item
+ Name = 'SessionID'
+ DataType = ftString
+ NumericScale = 255
+ Precision = 255
+ Size = 38
+ Value = Null
+ end>
+ Prepared = True
+ SQL.Strings = (
+ 'SELECT * FROM Sessions'
+ 'WHERE SessionID=:SessionID')
+ Left = 144
+ Top = 120
+ end
+ object quGetSessionCount: TADOQuery
+ Connection = ADOConnection
+ Parameters = <>
+ Prepared = True
+ SQL.Strings = (
+ 'SELECT COUNT(*) FROM Sessions')
+ Left = 176
+ Top = 120
+ end
+ object quSelectAllSessions: TADOQuery
+ Connection = ADOConnection
+ CursorType = ctStatic
+ Parameters = <>
+ Prepared = True
+ SQL.Strings = (
+ 'SELECT * FROM Sessions')
+ Left = 208
+ Top = 120
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes_Server_DBSessionManager.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes_Server_DBSessionManager.pas
new file mode 100644
index 0000000..14ee4ab
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Session Types/SessionTypes_Server_DBSessionManager.pas
@@ -0,0 +1,32 @@
+unit SessionTypes_Server_DBSessionManager;
+
+interface
+
+uses
+ SysUtils, Classes, uROClient, uROSessions, uRODBSessionManager, DB, ADODB;
+
+type
+ TSessionTypes_Server_DBSessionManagerForm = class(TDataModule)
+ quClearSessions: TADOQuery;
+ ADOConnection: TADOConnection;
+ quInsertSession: TADOQuery;
+ quDeleteSession: TADOQuery;
+ quUpdateSession: TADOQuery;
+ quSelectSession: TADOQuery;
+ quGetSessionCount: TADOQuery;
+ quSelectAllSessions: TADOQuery;
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ SessionTypes_Server_DBSessionManagerForm: TSessionTypes_Server_DBSessionManagerForm;
+
+implementation
+
+{$R *.dfm}
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Styles.css b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Styles.css
new file mode 100644
index 0000000..c8e0628
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Styles.css
@@ -0,0 +1,103 @@
+body
+{
+ background-color: #f7f7f7;
+ margin-top: 15px;
+ margin-bottom: 15px;
+ margin-left: 15px;
+ margin-right: 15px;
+ padding-top: 10px;
+ padding-bottom: 10px;
+ padding-left: 10px;
+ padding-right: 10px;
+ font-family: tahoma, verdana, sans-serif;
+ font-size: 10pt;
+ width: 700px;
+ color: #000000;
+}
+p
+{
+ padding-top: 0;
+ padding-bottom: 0;
+ padding-left: 0;
+ padding-right: 0.5em;
+}
+ul
+{
+ padding-top: 0;
+ padding-bottom: 0;
+ list-style-type: disc;
+}
+li
+{
+ padding-top: 0;
+ padding-bottom: 0;
+}
+img
+{
+ margin: 5px;
+ border-width: 0;
+}
+table
+{
+ background-color: #f7f7f7;
+ margin: 15px;
+ padding: 0px;
+ font-size: 10pt;
+}
+tr
+{
+ background-color: #f7f7f7;
+ margin: 15px;
+ padding: 0px;
+ font-size: 10pt;
+}
+td, th
+{
+ background-color: #f7f7f7;
+ margin: 0;
+ padding: 5px;
+ font-size: 10pt;
+}
+td ul
+{
+ padding-left: 2em;
+}
+
+img:left { margin-left: 0; }
+img:right { margin-right: 0; }
+p.h1
+{
+ margin-top: 1em;
+ margin-bottom: 0.5px;
+ padding-bottom:0px;
+ font-size:13pt;
+ font-weight:bold;
+}
+p.h2
+{
+ margin-top: 1em;
+ margin-bottom: 0.5px;
+ padding-bottom:0px;
+ font-size:11pt;
+ font-weight:bold;
+}
+p.h3
+{
+ margin-top: 1em;
+ margin-bottom: 0.5px;
+ padding-bottom:0px;
+ font-size:10pt;
+ font-weight:bold;
+}
+pre
+{
+ margin-top:0px;
+ margin-bottom:0px;
+ margin-left:0px;
+ margin-right:0px;
+}
+.spaced
+{
+ letter-spacing:1px;
+ color:#000060;
+}
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/ChatServerService_Impl.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/ChatServerService_Impl.dfm
new file mode 100644
index 0000000..5ceacb7
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/ChatServerService_Impl.dfm
@@ -0,0 +1,10 @@
+object ChatServerService: TChatServerService
+ OldCreateOrder = True
+ RequiresSession = True
+ SessionManager = SuperTCPChannelChat_ServerMainForm.ROSessionManager
+ EventRepository = SuperTCPChannelChat_ServerMainForm.ROEventRepository
+ Left = 200
+ Top = 200
+ Height = 300
+ Width = 300
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/ChatServerService_Impl.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/ChatServerService_Impl.pas
new file mode 100644
index 0000000..27873a2
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/ChatServerService_Impl.pas
@@ -0,0 +1,72 @@
+unit ChatServerService_Impl;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ This is where you are supposed to code the implementation of your objects. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils, Variants,
+ {RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
+ {Required:} uRORemoteDataModule,
+ {Generated:} SuperTCPChannelChatLibrary_Intf;
+
+type
+ { TChatServerService }
+ TChatServerService = class(TRORemoteDataModule, IChatServerService)
+ private
+ protected
+ { IChatServerService methods }
+ procedure TalkPrivate(const TargetNickname: String; const Message: String);
+ procedure Talk(const Message: String);
+ end;
+
+implementation
+
+{$R *.dfm}
+uses
+ {Generated:} SuperTCPChannelChatLibrary_Invk, SuperTCPChannelChat_ServerMain;
+
+procedure Create_ChatServerService(out anInstance : IUnknown);
+begin
+ anInstance := TChatServerService.Create(nil);
+end;
+
+{ ChatServerService }
+procedure TChatServerService.TalkPrivate(const TargetNickname: String; const Message: String);
+var
+ ev: IChatEvents_Writer;
+ i: Integer;
+ aDestGuid: string;
+begin
+ UserClientIDListCs.Acquire;
+ try
+ i := UserClientIDList.IndexOfName(TargetNickname);
+ if i = -1 then
+ raise Exception.Create('Invalid user: '+TargetNickname);
+ aDestGuid := UserClientIDList.Values[TargetNickname];
+ finally
+ UserClientIDListCs.Release;
+ end;
+ ev := (EventRepository as IChatEvents_Writer);
+ ev.ExcludeSender := False;
+ ev.SessionList.Add(aDestGuid);
+ ev.Message(session.SessionID, VarToStr(Session['nick']), TargetNickname, Message);
+end;
+
+procedure TChatServerService.Talk(const Message: String);
+var
+ ev: IChatEvents_Writer;
+begin
+ ev := (EventRepository as IChatEvents_Writer);
+ ev.ExcludeSender := False;
+ ev.Message(session.SessionID, VarToStr(Session['nick']), '', Message);
+end;
+
+initialization
+ TROClassFactory.Create('ChatServerService', Create_ChatServerService, TChatServerService_Invoker);
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/LoginService_Impl.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/LoginService_Impl.dfm
new file mode 100644
index 0000000..c349242
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/LoginService_Impl.dfm
@@ -0,0 +1,9 @@
+object LoginService: TLoginService
+ OldCreateOrder = True
+ SessionManager = SuperTCPChannelChat_ServerMainForm.ROSessionManager
+ EventRepository = SuperTCPChannelChat_ServerMainForm.ROEventRepository
+ Left = 582
+ Top = 194
+ Height = 304
+ Width = 300
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/LoginService_Impl.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/LoginService_Impl.pas
new file mode 100644
index 0000000..3d05b2e
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/LoginService_Impl.pas
@@ -0,0 +1,105 @@
+unit LoginService_Impl;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ This is where you are supposed to code the implementation of your objects. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils,
+ {RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
+ {Required:} uRORemoteDataModule,
+ {Generated:} SuperTCPChannelChatLibrary_Intf;
+
+type
+ { TLoginService }
+ TLoginService = class(TRORemoteDataModule, ILoginService)
+ private
+ protected
+ { ILoginService methods }
+ procedure Login(const Nickname: string);
+ procedure Logout;
+ end;
+
+implementation
+
+{$R *.dfm}
+uses
+ {Generated:} SuperTCPChannelChatLibrary_Invk, SuperTCPChannelChat_ServerMain, Variants;
+
+procedure Create_LoginService(out anInstance: IUnknown);
+begin
+ anInstance := TLoginService.Create(nil);
+end;
+
+{ LoginService }
+
+procedure TLoginService.Login(const Nickname: string);
+var
+ ev: IChatEvents_Writer;
+ i: Integer;
+ s: string;
+begin
+ UserClientIDListCs.Acquire;
+ try
+ if UserClientIDList.IndexOfName(Nickname) <> -1 then raise Exception.Create('Nickname already in use');
+ s := VarToStr(Session['nick']);
+ if s <> '' then
+ UserClientIDList.Delete(UserClientIDList.IndexOfName(s));
+
+
+ RegisterEventClient(GuidToString(self.ClientID), 'IChatEvents');
+ ev := (EventRepository as IChatEvents_Writer);
+ ev.ExcludeSender := False;
+ ev.SessionList.Add(GuidToString(Session.SessionID));
+
+ for i := 0 to UserClientIDList.Count - 1 do begin
+ ev.UserLogin(Session.SessionID, UserClientIDList.Names[i]);
+ end;
+
+ UserClientIDList.Add(Nickname + '=' + GUIDToString(Session.SessionID));
+
+ ev := (EventRepository as IChatEvents_Writer);
+ ev.ExcludeSender := False;
+ for i := 0 to UserClientIDList.Count - 1 do
+ ev.SessionList.Add(Copy(UserClientIDList[i], pos('=', UserClientIDList[i])+1, MaxInt));
+ ev.UserLogin(Session.SessionID, Nickname);
+ finally
+ UserClientIDListCs.Release;
+ end;
+ Session['nick'] := Nickname;
+end;
+
+procedure TLoginService.Logout;
+var
+ i: Integer;
+ ev: IChatEvents_Writer;
+ s: string;
+begin
+ UserClientIDListCs.Acquire;
+ s := VarToStr(Session['nick']);
+ try
+ i := UserClientIDList.IndexOfName(s);
+ if i <> -1 then
+ UserClientIDList.Delete(i);
+ finally
+ UserClientIDListCs.Release;
+ end;
+ ev := (EventRepository as IChatEvents_Writer);
+ ev.ExcludeSender := False;
+ ev.UserLogout(Session.SessionID, s);
+ UnregisterEventClient(GUIDToString(ClientID), 'IChatEvents');
+ DestroySession;
+end;
+
+initialization
+ TROClassFactory.Create('LoginService', Create_LoginService, TLoginService_Invoker);
+
+finalization
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/RODLFILE.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/RODLFILE.res
new file mode 100644
index 0000000..70a521b
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/RODLFILE.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat.Sample.html b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat.Sample.html
new file mode 100644
index 0000000..80ff876
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat.Sample.html
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+ SuperTCP Channel Chat
+
+
+
+Purpose
+
+This sample shows how the Super TCP Channel can be used to create a chat server and clients.
+
+Unlike the HTTP Chat sample, this sample doesn't poll the server
+ but sends events back to clients directly.
+
+
+ Note : to test this sample properly, you need to open at least three clients.
+
+ Each client instance will provide a default login user name,
+ but you can modify these as needed (there is no verification provided in this simple sample).
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat.bdsgroup b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat.bdsgroup
new file mode 100644
index 0000000..42cc3e6
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat.bdsgroup
@@ -0,0 +1,20 @@
+
+
+
+
+ Default.Personality
+
+ 1.0
+ {427F887E-74A0-4A15-9410-2710E1B964A6}
+
+
+
+
+
+ SuperTCPChannelChat_Server.bdsproj
+ SuperTCPChannelChat_Client.bdsproj
+ SuperTCPChannelChat_Server.exe SuperTCPChannelChat_Client.exe
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat.bpg b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat.bpg
new file mode 100644
index 0000000..ce3c2fa
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat.bpg
@@ -0,0 +1,23 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = SuperTCPChannelChat_Server.exe SuperTCPChannelChat_Client.exe
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+SuperTCPChannelChat_Server.exe: SuperTCPChannelChat_Server.dpr
+ $(DCC)
+
+SuperTCPChannelChat_Client.exe: SuperTCPChannelChat_Client.dpr
+ $(DCC)
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat.groupproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat.groupproj
new file mode 100644
index 0000000..3d46358
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat.groupproj
@@ -0,0 +1,40 @@
+
+
+ {352fd1c6-4fbe-4ec9-bc17-20a16a676c6f}
+
+
+
+
+ Default.Personality
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChatLibrary.rodl b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChatLibrary.rodl
new file mode 100644
index 0000000..bfe0855
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChatLibrary.rodl
@@ -0,0 +1,90 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChatLibrary_Intf.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChatLibrary_Intf.pas
new file mode 100644
index 0000000..3fe1510
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChatLibrary_Intf.pas
@@ -0,0 +1,375 @@
+unit SuperTCPChannelChatLibrary_Intf;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+{$I Remobjects.inc}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROXMLIntf, uROClasses, uROClient, uROTypes, uROClientIntf;
+
+const
+ { Library ID }
+ LibraryUID = '{8A53A750-1F2B-4060-AAC0-77B4FC071D2D}';
+ TargetNamespace = '';
+
+ { Service Interface ID's }
+ IChatServerService_IID : TGUID = '{6CC2111F-DDD6-4CF5-AB57-2CD98EF4FF5B}';
+ ILoginService_IID : TGUID = '{3D19AEB1-6D2F-4142-B937-B97367133A2F}';
+
+ { Event ID's }
+ EID_ChatEvents = 'ChatEvents';
+
+type
+ { Forward declarations }
+ IChatServerService = interface;
+ ILoginService = interface;
+
+ IChatEvents = interface;
+
+
+ { IChatServerService }
+ IChatServerService = interface
+ ['{6CC2111F-DDD6-4CF5-AB57-2CD98EF4FF5B}']
+ procedure TalkPrivate(const TargetNickname: String; const Message: String);
+ procedure Talk(const Message: String);
+ end;
+
+ { CoChatServerService }
+ CoChatServerService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IChatServerService;
+ end;
+
+ { TChatServerService_Proxy }
+ TChatServerService_Proxy = class(TROProxy, IChatServerService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ procedure TalkPrivate(const TargetNickname: String; const Message: String);
+ procedure Talk(const Message: String);
+ end;
+
+ { ILoginService }
+ ILoginService = interface
+ ['{3D19AEB1-6D2F-4142-B937-B97367133A2F}']
+ procedure Login(const Nickname: String);
+ procedure Logout;
+ end;
+
+ { CoLoginService }
+ CoLoginService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): ILoginService;
+ end;
+
+ { TLoginService_Proxy }
+ TLoginService_Proxy = class(TROProxy, ILoginService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ procedure Login(const Nickname: String);
+ procedure Logout;
+ end;
+
+ { IChatEvents }
+ IChatEvents = interface
+ ['{C456D3B2-E44A-4FA6-8F71-3838D7F7525B}']
+ procedure Message(const From: String; const Target: String; const Message: String);
+ procedure UserLogin(const Nickname: String);
+ procedure UserLogout(const Nickname: String);
+ procedure ShutdownServer;
+ end;
+
+ { IChatEvents_Writer }
+ IChatEvents_Writer = interface(IROEventWriter)
+ ['{C456D3B2-E44A-4FA6-8F71-3838D7F7525B}']
+ procedure Message(const __Sender : TGUID; const From: String; const Target: String; const Message: String);
+ procedure UserLogin(const __Sender : TGUID; const Nickname: String);
+ procedure UserLogout(const __Sender : TGUID; const Nickname: String);
+ procedure ShutdownServer(const __Sender : TGUID);
+ end;
+
+implementation
+
+uses
+ {vcl:} SysUtils,
+ {RemObjects:} uROEventRepository, uROSerializer, uRORes;
+
+{ CoChatServerService }
+
+class function CoChatServerService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IChatServerService;
+begin
+ result := TChatServerService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TChatServerService_Proxy }
+
+function TChatServerService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'ChatServerService';
+end;
+
+procedure TChatServerService_Proxy.TalkPrivate(const TargetNickname: String; const Message: String);
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'SuperTCPChannelChatLibrary', __InterfaceName, 'TalkPrivate');
+ __Message.Write('TargetNickname', TypeInfo(String), TargetNickname, []);
+ __Message.Write('Message', TypeInfo(String), Message, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+procedure TChatServerService_Proxy.Talk(const Message: String);
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'SuperTCPChannelChatLibrary', __InterfaceName, 'Talk');
+ __Message.Write('Message', TypeInfo(String), Message, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+{ CoLoginService }
+
+class function CoLoginService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): ILoginService;
+begin
+ result := TLoginService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TLoginService_Proxy }
+
+function TLoginService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'LoginService';
+end;
+
+procedure TLoginService_Proxy.Login(const Nickname: String);
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'SuperTCPChannelChatLibrary', __InterfaceName, 'Login');
+ __Message.Write('Nickname', TypeInfo(String), Nickname, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ finally
+ __Message.UnsetAttributes(__TransportChannel);
+ __Message.FreeStream;
+ end
+end;
+
+procedure TLoginService_Proxy.Logout;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'SuperTCPChannelChatLibrary', __InterfaceName, 'Logout');
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+type
+ { TChatEvents_Writer }
+ TChatEvents_Writer = class(TROEventWriter, IChatEvents_Writer)
+ protected
+ procedure Message(const __Sender : TGUID; const From: String; const Target: String; const Message: String);
+ procedure UserLogin(const __Sender : TGUID; const Nickname: String);
+ procedure UserLogout(const __Sender : TGUID; const Nickname: String);
+ procedure ShutdownServer(const __Sender : TGUID);
+ end;
+
+procedure TChatEvents_Writer.Message(const __Sender : TGUID; const From: String; const Target: String; const Message: String);
+var __eventdata : Binary;
+begin
+ __eventdata := Binary.Create;
+ try
+ __Message.InitializeEventMessage(NIL, 'SuperTCPChannelChatLibrary', EID_ChatEvents, 'Message');
+ __Message.Write('From', TypeInfo(String), From, []);
+ __Message.Write('Target', TypeInfo(String), Target, []);
+ __Message.Write('Message', TypeInfo(String), Message, []);
+ __Message.Finalize;
+
+ __Message.WriteToStream(__eventdata);
+
+ Repository.StoreEventData(__Sender, __eventdata, ExcludeSender, ExcludeSessionList, SessionList.CommaText);
+ finally
+ __eventdata.Free;
+ end;
+end;
+
+procedure TChatEvents_Writer.UserLogin(const __Sender : TGUID; const Nickname: String);
+var __eventdata : Binary;
+begin
+ __eventdata := Binary.Create;
+ try
+ __Message.InitializeEventMessage(NIL, 'SuperTCPChannelChatLibrary', EID_ChatEvents, 'UserLogin');
+ __Message.Write('Nickname', TypeInfo(String), Nickname, []);
+ __Message.Finalize;
+
+ __Message.WriteToStream(__eventdata);
+
+ Repository.StoreEventData(__Sender, __eventdata, ExcludeSender, ExcludeSessionList, SessionList.CommaText);
+ finally
+ __eventdata.Free;
+ end;
+end;
+
+procedure TChatEvents_Writer.UserLogout(const __Sender : TGUID; const Nickname: String);
+var __eventdata : Binary;
+begin
+ __eventdata := Binary.Create;
+ try
+ __Message.InitializeEventMessage(NIL, 'SuperTCPChannelChatLibrary', EID_ChatEvents, 'UserLogout');
+ __Message.Write('Nickname', TypeInfo(String), Nickname, []);
+ __Message.Finalize;
+
+ __Message.WriteToStream(__eventdata);
+
+ Repository.StoreEventData(__Sender, __eventdata, ExcludeSender, ExcludeSessionList, SessionList.CommaText);
+ finally
+ __eventdata.Free;
+ end;
+end;
+
+procedure TChatEvents_Writer.ShutdownServer(const __Sender : TGUID);
+var __eventdata : Binary;
+begin
+ __eventdata := Binary.Create;
+ try
+ __Message.InitializeEventMessage(NIL, 'SuperTCPChannelChatLibrary', EID_ChatEvents, 'ShutdownServer');
+ __Message.Finalize;
+
+ __Message.WriteToStream(__eventdata);
+
+ Repository.StoreEventData(__Sender, __eventdata, ExcludeSender, ExcludeSessionList, SessionList.CommaText);
+ finally
+ __eventdata.Free;
+ end;
+end;
+
+type
+ { TChatEvents_Invoker }
+ TChatEvents_Invoker = class(TROEventInvoker)
+ published
+ procedure Invoke_Message(__EventReceiver : TROEventReceiver; const __Message : IROMessage; const __Target : IUnknown);
+ procedure Invoke_UserLogin(__EventReceiver : TROEventReceiver; const __Message : IROMessage; const __Target : IUnknown);
+ procedure Invoke_UserLogout(__EventReceiver : TROEventReceiver; const __Message : IROMessage; const __Target : IUnknown);
+ procedure Invoke_ShutdownServer(__EventReceiver : TROEventReceiver; const __Message : IROMessage; const __Target : IUnknown);
+ end;
+
+procedure TChatEvents_Invoker.Invoke_Message(__EventReceiver : TROEventReceiver; const __Message : IROMessage; const __Target : IUnknown);
+var
+__lObjectDisposer: TROObjectDisposer;
+ From: String;
+ Target: String;
+ Message: String;
+begin
+
+ try
+ __Message.Read('From', TypeInfo(String), From, []);
+ __Message.Read('Target', TypeInfo(String), Target, []);
+ __Message.Read('Message', TypeInfo(String), Message, []);
+
+ (__Target as IChatEvents).Message(From, Target, Message);
+
+ finally
+ __lObjectDisposer:= TROObjectDisposer.Create(__EventReceiver);
+ try
+ finally
+ __lObjectDisposer.Free();
+ end
+ end
+end;
+
+procedure TChatEvents_Invoker.Invoke_UserLogin(__EventReceiver : TROEventReceiver; const __Message : IROMessage; const __Target : IUnknown);
+var
+__lObjectDisposer: TROObjectDisposer;
+ Nickname: String;
+begin
+
+ try
+ __Message.Read('Nickname', TypeInfo(String), Nickname, []);
+
+ (__Target as IChatEvents).UserLogin(Nickname);
+
+ finally
+ __lObjectDisposer:= TROObjectDisposer.Create(__EventReceiver);
+ try
+ finally
+ __lObjectDisposer.Free();
+ end
+ end
+end;
+
+procedure TChatEvents_Invoker.Invoke_UserLogout(__EventReceiver : TROEventReceiver; const __Message : IROMessage; const __Target : IUnknown);
+var
+__lObjectDisposer: TROObjectDisposer;
+ Nickname: String;
+begin
+
+ try
+ __Message.Read('Nickname', TypeInfo(String), Nickname, []);
+
+ (__Target as IChatEvents).UserLogout(Nickname);
+
+ finally
+ __lObjectDisposer:= TROObjectDisposer.Create(__EventReceiver);
+ try
+ finally
+ __lObjectDisposer.Free();
+ end
+ end
+end;
+
+procedure TChatEvents_Invoker.Invoke_ShutdownServer(__EventReceiver : TROEventReceiver; const __Message : IROMessage; const __Target : IUnknown);
+var
+__lObjectDisposer: TROObjectDisposer;
+begin
+ try
+
+ (__Target as IChatEvents).ShutdownServer();
+
+ finally
+ __lObjectDisposer:= TROObjectDisposer.Create(__EventReceiver);
+ try
+ finally
+ __lObjectDisposer.Free();
+ end
+ end
+end;
+
+initialization
+ RegisterProxyClass(IChatServerService_IID, TChatServerService_Proxy);
+ RegisterProxyClass(ILoginService_IID, TLoginService_Proxy);
+
+ RegisterEventWriterClass(IChatEvents_Writer, TChatEvents_Writer);
+ RegisterEventInvokerClass(EID_ChatEvents, TChatEvents_Invoker);
+
+finalization
+ UnregisterProxyClass(IChatServerService_IID);
+ UnregisterProxyClass(ILoginService_IID);
+
+ UnregisterEventWriterClass(IChatEvents_Writer);
+ UnregisterEventInvokerClass(EID_ChatEvents);
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChatLibrary_Invk.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChatLibrary_Invk.pas
new file mode 100644
index 0000000..2e65935
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChatLibrary_Invk.pas
@@ -0,0 +1,124 @@
+unit SuperTCPChannelChatLibrary_Invk;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+{$I Remobjects.inc}
+
+interface
+
+uses
+ {vcl:} Classes,
+ {RemObjects:} uROXMLIntf, uROServer, uROServerIntf, uROTypes, uROClientIntf,
+ {Generated:} SuperTCPChannelChatLibrary_Intf;
+
+type
+ TChatServerService_Invoker = class(TROInvoker)
+ private
+ protected
+ published
+ procedure Invoke_TalkPrivate(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_Talk(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ end;
+
+ TLoginService_Invoker = class(TROInvoker)
+ private
+ protected
+ published
+ procedure Invoke_Login(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_Logout(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ end;
+
+implementation
+
+uses
+ {RemObjects:} uRORes, uROClient;
+
+{ TChatServerService_Invoker }
+
+procedure TChatServerService_Invoker.Invoke_TalkPrivate(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ procedure TalkPrivate(const TargetNickname: String; const Message: String); }
+var
+ TargetNickname: String;
+ Message: String;
+begin
+ try
+ __Message.Read('TargetNickname', TypeInfo(String), TargetNickname, []);
+ __Message.Read('Message', TypeInfo(String), Message, []);
+
+ (__Instance as IChatServerService).TalkPrivate(TargetNickname, Message);
+
+ __Message.InitializeResponseMessage(__Transport, 'SuperTCPChannelChatLibrary', 'ChatServerService', 'TalkPrivateResponse');
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ __oResponseOptions := [roNoResponse];
+
+ finally
+ end;
+end;
+
+procedure TChatServerService_Invoker.Invoke_Talk(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ procedure Talk(const Message: String); }
+var
+ Message: String;
+begin
+ try
+ __Message.Read('Message', TypeInfo(String), Message, []);
+
+ (__Instance as IChatServerService).Talk(Message);
+
+ __Message.InitializeResponseMessage(__Transport, 'SuperTCPChannelChatLibrary', 'ChatServerService', 'TalkResponse');
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ __oResponseOptions := [roNoResponse];
+
+ finally
+ end;
+end;
+
+{ TLoginService_Invoker }
+
+procedure TLoginService_Invoker.Invoke_Login(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ procedure Login(const Nickname: String); }
+var
+ Nickname: String;
+begin
+ try
+ __Message.Read('Nickname', TypeInfo(String), Nickname, []);
+
+ (__Instance as ILoginService).Login(Nickname);
+
+ __Message.InitializeResponseMessage(__Transport, 'SuperTCPChannelChatLibrary', 'LoginService', 'LoginResponse');
+ __Message.Finalize;
+ __Message.UnsetAttributes(__Transport);
+
+ __oResponseOptions := [roNoResponse];
+
+ finally
+ end;
+end;
+
+procedure TLoginService_Invoker.Invoke_Logout(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ procedure Logout; }
+begin
+ try
+ (__Instance as ILoginService).Logout;
+
+ __Message.InitializeResponseMessage(__Transport, 'SuperTCPChannelChatLibrary', 'LoginService', 'LogoutResponse');
+ __Message.Finalize;
+
+ __oResponseOptions := [roNoResponse];
+
+ finally
+ end;
+end;
+
+initialization
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat_Client.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat_Client.bdsproj
new file mode 100644
index 0000000..47723f9
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat_Client.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {C2F75A49-2A4E-4933-A832-E7477BC760C2}
+
+
+
+
+ SuperTCPChannelChat_Client.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat_Client.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat_Client.dpr
new file mode 100644
index 0000000..76f79e8
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat_Client.dpr
@@ -0,0 +1,14 @@
+program SuperTCPChannelChat_Client;
+
+uses
+ uROComInit,
+ Forms,
+ SuperTCPChannelChat_ClientMain in 'SuperTCPChannelChat_ClientMain.pas' {SuperTCPChannelChat_ClientMainForm};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TSuperTCPChannelChat_ClientMainForm, SuperTCPChannelChat_ClientMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat_Client.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat_Client.dproj
new file mode 100644
index 0000000..d61eaca
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat_Client.dproj
@@ -0,0 +1,72 @@
+
+
+ {7d065047-d58a-4b2c-a706-00fb58c52394}
+ SuperTCPChannelChat_Client.dpr
+ Debug
+ AnyCPU
+ DCC32
+ SuperTCPChannelChat_Client.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ SuperTCPChannelChat_Client.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat_Client.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat_Client.res
new file mode 100644
index 0000000..0f940ed
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat_Client.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat_ClientMain.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat_ClientMain.dfm
new file mode 100644
index 0000000..d6c805e
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat_ClientMain.dfm
@@ -0,0 +1,114 @@
+object SuperTCPChannelChat_ClientMainForm: TSuperTCPChannelChat_ClientMainForm
+ Left = 92
+ Top = 108
+ AutoScroll = False
+ Caption = 'SuperTCPChannelChat - Client'
+ ClientHeight = 244
+ ClientWidth = 424
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnClose = FormClose
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ OnShow = FormShow
+ PixelsPerInch = 96
+ TextHeight = 13
+ object ROPoweredByRemObjectsButton1: TROPoweredByRemObjectsButton
+ Left = 12
+ Top = 12
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ end
+ object edOutput: TMemo
+ Left = 12
+ Top = 62
+ Width = 282
+ Height = 143
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ ReadOnly = True
+ ScrollBars = ssVertical
+ TabOrder = 0
+ end
+ object edUsers: TListBox
+ Left = 300
+ Top = 62
+ Width = 112
+ Height = 143
+ Anchors = [akTop, akRight, akBottom]
+ ItemHeight = 13
+ Items.Strings = (
+ '[All Users]')
+ TabOrder = 1
+ end
+ object edText: TEdit
+ Left = 12
+ Top = 211
+ Width = 315
+ Height = 21
+ Anchors = [akLeft, akRight, akBottom]
+ TabOrder = 2
+ end
+ object SendButton: TButton
+ Left = 333
+ Top = 209
+ Width = 79
+ Height = 22
+ Anchors = [akRight, akBottom]
+ Caption = '&Send'
+ Default = True
+ TabOrder = 3
+ OnClick = SendButtonClick
+ end
+ object LogonButton: TButton
+ Left = 336
+ Top = 5
+ Width = 75
+ Height = 22
+ Anchors = [akTop, akRight]
+ Caption = 'Log On'
+ TabOrder = 4
+ OnClick = LogonButtonClick
+ end
+ object LogoffButton: TButton
+ Left = 336
+ Top = 33
+ Width = 75
+ Height = 22
+ Anchors = [akTop, akRight]
+ Caption = 'Log Off'
+ TabOrder = 5
+ OnClick = LogoffButtonClick
+ end
+ object ROMessage: TROBinMessage
+ Left = 36
+ Top = 8
+ end
+ object ROChannel: TROSuperTcpChannel
+ ServerLocators = <>
+ DispatchOptions = []
+ Host = 'localhost'
+ Left = 8
+ Top = 8
+ end
+ object RORemoteService: TRORemoteService
+ ServiceName = 'ChatServerService'
+ Message = ROMessage
+ Channel = ROChannel
+ Left = 64
+ Top = 8
+ end
+ object ROEventReceiver: TROEventReceiver
+ Message = ROMessage
+ Channel = ROChannel
+ ServiceName = 'LoginService'
+ Left = 241
+ Top = 16
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat_ClientMain.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat_ClientMain.pas
new file mode 100644
index 0000000..f4a1620
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat_ClientMain.pas
@@ -0,0 +1,196 @@
+unit SuperTCPChannelChat_ClientMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
+ uROClient, uROClientIntf, uRORemoteService, uROBinMessage, uROSuperTcpChannel,
+ uROPoweredByRemObjectsButton, SuperTCPChannelChatLibrary_Intf,
+ uROEventRepository;
+
+type
+ TSuperTCPChannelChat_ClientMainForm = class(TForm, IChatEvents)
+ ROMessage: TROBinMessage;
+ ROChannel: TROSuperTcpChannel;
+ RORemoteService: TRORemoteService;
+ ROPoweredByRemObjectsButton1: TROPoweredByRemObjectsButton;
+ edOutput: TMemo;
+ edUsers: TListBox;
+ edText: TEdit;
+ SendButton: TButton;
+ ROEventReceiver: TROEventReceiver;
+ LogonButton: TButton;
+ LogoffButton: TButton;
+ procedure FormCreate(Sender: TObject);
+ procedure FormDestroy(Sender: TObject);
+ procedure SendButtonClick(Sender: TObject);
+ procedure LogonButtonClick(Sender: TObject);
+ procedure LogoffButtonClick(Sender: TObject);
+ procedure FormClose(Sender: TObject; var Action: TCloseAction);
+ procedure FormShow(Sender: TObject);
+ private
+ aUserName: string;
+ FConnected: Boolean;
+ lLogin: ILoginService;
+ lChat: IChatServerService;
+ { Private declarations }
+ public
+ procedure Message(const From: string; const Target: string;
+ const Message: string);
+ procedure UserLogin(const Nickname: string);
+ procedure UserLogout(const Nickname: string);
+ procedure ShutdownServer;
+
+ procedure SyncCall(var Msg: TMessage); message WM_USER;
+
+ end;
+ TSyncType = (stMessage, stUserLogin, stUserLogout);
+ TStringArray = array of string;
+
+var
+ SuperTCPChannelChat_ClientMainForm: TSuperTCPChannelChat_ClientMainForm;
+
+implementation
+
+uses DateUtils;
+
+{$R *.dfm}
+
+{ TClientForm }
+
+procedure TSuperTCPChannelChat_ClientMainForm.Message(const From, Target, Message: string);
+var
+ Data: array of string;
+begin
+ SetLength(Data, 3);
+ Data[0] := From;
+ Data[1] := Target;
+ Data[2] := Message;
+ SendMessage(Handle, WM_USER, Longint(stMessage), Longint(Data));
+end;
+
+procedure TSuperTCPChannelChat_ClientMainForm.UserLogin(const Nickname: string);
+var
+ Data: array of string;
+begin
+ SetLength(Data, 1);
+ Data[0] := Nickname;
+ SendMessage(Handle, WM_USER, Longint(stUserLogin), Longint(Data));
+end;
+
+procedure TSuperTCPChannelChat_ClientMainForm.UserLogout(const Nickname: string);
+var
+ Data: array of string;
+begin
+ SetLength(Data, 1);
+ Data[0] := Nickname;
+ SendMessage(Handle, WM_USER, Longint(stUserLogout), Longint(Data));
+end;
+
+procedure TSuperTCPChannelChat_ClientMainForm.FormCreate(Sender: TObject);
+begin
+ Fconnected := False;
+ ROChannel.Host := 'localhost';
+ lLogin := CoLoginService.Create(ROMessage, ROChannel);
+ lChat := CoChatServerService.Create(ROMessage, ROChannel);
+ ROEventReceiver.RegisterEventHandlers([EID_ChatEvents], [Self]);
+ ROEventReceiver.Activate;
+ aUserName := 'User' + IntToHex(GetTickCount and $FFFF, 4);
+end;
+
+procedure TSuperTCPChannelChat_ClientMainForm.FormDestroy(Sender: TObject);
+begin
+ ROEventReceiver.UnregisterEventHandlers([EID_ChatEvents]);
+end;
+
+procedure TSuperTCPChannelChat_ClientMainForm.SendButtonClick(Sender: TObject);
+var
+ idx: Integer;
+begin
+ idx := edUsers.ItemIndex;
+ if idx < 1 then
+ lChat.Talk(edText.Text)
+ else
+ lChat.TalkPrivate(edUsers.Items[idx], edText.Text);
+ edText.Text := '';
+ ActiveControl := edText;
+end;
+
+procedure TSuperTCPChannelChat_ClientMainForm.SyncCall(var Msg: TMessage);
+var
+ i: Integer;
+ lSyncType: TSyncType;
+ lData: TStringArray;
+begin
+ lSyncType := TSyncType(Msg.WParam);
+ lData := TStringArray(Msg.LParam);
+ case lSyncType of
+ stMessage: begin
+ if lData[1] = '' then
+ SuperTCPChannelChat_ClientMainForm.edOutput.Lines.Add(Format('<%s> %s', [lData[0], lData[2]]))
+ else
+ SuperTCPChannelChat_ClientMainForm.edOutput.Lines.Add(Format('<%s: %s> %s', [lData[0], lData[1], lData[2]]));
+ end;
+ stUserLogin:
+ SuperTCPChannelChat_ClientMainForm.edUsers.Items.Add(lData[0]);
+ stUserLogout: begin
+ i := SuperTCPChannelChat_ClientMainForm.edUsers.Items.IndexOf(lData[0]);
+ if i <> -1 then
+ SuperTCPChannelChat_ClientMainForm.EdUsers.Items.Delete(i);
+ end;
+ end;
+end;
+
+procedure TSuperTCPChannelChat_ClientMainForm.LogonButtonClick(
+ Sender: TObject);
+begin
+ if not FConnected then try
+ if InputQuery('Username', 'Please enter your &username:', aUsername) then begin
+ lLogin.Login(aUsername);
+ Fconnected := True;
+ end;
+ finally
+ SendButton.Enabled := FConnected;
+ LogonButton.Enabled := not FConnected;
+ LogoffButton.Enabled := FConnected;
+ end;
+end;
+
+procedure TSuperTCPChannelChat_ClientMainForm.LogoffButtonClick(
+ Sender: TObject);
+begin
+ try
+ if FConnected then try
+ lLogin.Logout;
+ Fconnected := False;
+ while edUsers.Count > 1 do
+ edUsers.Items.Delete(1);
+ ROChannel.Active := False;
+ finally
+ SendButton.Enabled := FConnected;
+ LogonButton.Enabled := not FConnected;
+ LogoffButton.Enabled := FConnected;
+ end;
+ except
+ end;
+end;
+
+procedure TSuperTCPChannelChat_ClientMainForm.FormClose(Sender: TObject;
+ var Action: TCloseAction);
+begin
+ LogoffButton.Click;
+end;
+
+procedure TSuperTCPChannelChat_ClientMainForm.ShutdownServer;
+begin
+ edOutput.Lines.Add('Server has been shutdown!');
+ LogoffButton.Click;
+end;
+
+procedure TSuperTCPChannelChat_ClientMainForm.FormShow(Sender: TObject);
+begin
+ LogonButton.Click;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat_Server.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat_Server.bdsproj
new file mode 100644
index 0000000..dd83339
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat_Server.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {A5103679-07AC-47FC-A449-2AD9CD7E0423}
+
+
+
+
+ SuperTCPChannelChat_Server.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat_Server.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat_Server.dpr
new file mode 100644
index 0000000..bbe05ff
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat_Server.dpr
@@ -0,0 +1,22 @@
+program SuperTCPChannelChat_Server;
+
+{#ROGEN:SuperTCPChannelChatLibrary.rodl} // RemObjects: Careful, do not remove!
+
+uses
+ uROComInit,
+ Forms,
+ SuperTCPChannelChat_ServerMain in 'SuperTCPChannelChat_ServerMain.pas' {SuperTCPChannelChat_ServerMainForm},
+ LoginService_Impl in 'LoginService_Impl.pas' {LoginService: TDARemoteService},
+ ChatServerService_Impl in 'ChatServerService_Impl.pas' {ChatServerService: TDARemoteService},
+ SuperTCPChannelChatLibrary_Intf in 'SuperTCPChannelChatLibrary_Intf.pas',
+ SuperTCPChannelChatLibrary_Invk in 'SuperTCPChannelChatLibrary_Invk.pas';
+
+{$R *.res}
+{$R RODLFile.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'SuperTCPChannelChat - Server';
+ Application.CreateForm(TSuperTCPChannelChat_ServerMainForm, SuperTCPChannelChat_ServerMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat_Server.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat_Server.dproj
new file mode 100644
index 0000000..32d8e0d
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat_Server.dproj
@@ -0,0 +1,80 @@
+
+
+ {7073a51d-5965-439b-aee5-bbb1c1109129}
+ SuperTCPChannelChat_Server.dpr
+ Debug
+ AnyCPU
+ DCC32
+ SuperTCPChannelChat_Server.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ SuperTCPChannelChat_Server.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat_Server.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat_Server.res
new file mode 100644
index 0000000..95e15d9
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat_Server.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat_ServerMain.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat_ServerMain.dfm
new file mode 100644
index 0000000..0c8158c
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat_ServerMain.dfm
@@ -0,0 +1,53 @@
+object SuperTCPChannelChat_ServerMainForm: TSuperTCPChannelChat_ServerMainForm
+ Left = 76
+ Top = 115
+ BorderStyle = bsDialog
+ Caption = 'SuperTCPChannelChat - Server'
+ ClientHeight = 64
+ ClientWidth = 228
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCloseQuery = FormCloseQuery
+ OnCreate = FormCreate
+ PixelsPerInch = 96
+ TextHeight = 13
+ object ROPoweredButton: TROPoweredByRemObjectsButton
+ Left = 8
+ Top = 8
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ end
+ object ROMessage: TROBinMessage
+ Left = 40
+ Top = 8
+ end
+ object ROServer: TROSuperTcpServer
+ Dispatchers = <
+ item
+ Name = 'ROMessage'
+ Message = ROMessage
+ Enabled = True
+ end>
+ EventRepository = ROEventRepository
+ OnClientDisconnected = ROServerClientDisconnected
+ Left = 8
+ Top = 8
+ end
+ object ROSessionManager: TROInMemorySessionManager
+ Left = 72
+ Top = 8
+ end
+ object ROEventRepository: TROInMemoryEventRepository
+ Message = ROMessage
+ SessionManager = ROSessionManager
+ Left = 104
+ Top = 8
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat_ServerMain.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat_ServerMain.pas
new file mode 100644
index 0000000..cf348d6
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Super TCP Channel Chat/SuperTCPChannelChat_ServerMain.pas
@@ -0,0 +1,85 @@
+unit SuperTCPChannelChat_ServerMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
+ uROClient, uROPoweredByRemObjectsButton, uROClientIntf, uROServer,
+ uROBinMessage, uROSuperTcpServer, uROSessions, uROEventRepository,SyncObjs;
+
+type
+ TSuperTCPChannelChat_ServerMainForm = class(TForm)
+ ROPoweredButton: TROPoweredByRemObjectsButton;
+ ROMessage: TROBinMessage;
+ ROServer: TROSuperTcpServer;
+ ROSessionManager: TROInMemorySessionManager;
+ ROEventRepository: TROInMemoryEventRepository;
+ procedure FormCreate(Sender: TObject);
+ procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
+ procedure ROServerClientDisconnected(aChannel: IROTransport;
+ const aGuid: TGUID);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ SuperTCPChannelChat_ServerMainForm: TSuperTCPChannelChat_ServerMainForm;
+
+var
+ UserClientIDList: TStringList;
+ UserClientIDListCs: TCriticalSection;
+
+implementation
+uses
+ SuperTCPChannelChatLibrary_Intf;
+{$R *.dfm}
+
+procedure TSuperTCPChannelChat_ServerMainForm.FormCreate(Sender: TObject);
+begin
+ ROServer.Active := true;
+end;
+
+procedure TSuperTCPChannelChat_ServerMainForm.FormCloseQuery(
+ Sender: TObject; var CanClose: Boolean);
+var
+ ev: IChatEvents_Writer;
+begin
+ ev := (ROEventRepository as IChatEvents_Writer);
+ ev.ShutdownServer(EmptyGUID);
+ Sleep(2000); // allow clients to gracefully logout.
+end;
+
+procedure TSuperTCPChannelChat_ServerMainForm.ROServerClientDisconnected(
+ aChannel: IROTransport; const aGuid: TGUID);
+var
+ ev: IChatEvents_Writer;
+ s: TROSession;
+ i: integer;
+begin
+ s := ROSessionManager.FindSession(aGuid,False);
+ ev := (ROEventRepository as IChatEvents_Writer);
+ ev.ExcludeSender := False;
+ if s <> nil then begin
+ UserClientIDListCs.Acquire;
+ try
+ i := UserClientIDList.IndexOfName(S['nick']);
+ if i <> -1 then UserClientIDList.Delete(i);
+ finally
+ UserClientIDListCs.Release;
+ end;
+ ev.UserLogout(aGuid, s['nick']);
+ end;
+ ROEventRepository.RemoveSession(aGuid);
+ ROSessionManager.DeleteSession(aGuid, False);
+end;
+
+initialization
+ UserClientIDList := TStringList.Create;
+ UserClientIDListCs := TCriticalSection.Create;
+finalization
+ UserClientIDListCs.Free;
+ UserClientIDList.Free;
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/RODLFILE.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/RODLFILE.res
new file mode 100644
index 0000000..469544d
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/RODLFILE.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TfrmServerSelectSrc.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TfrmServerSelectSrc.dfm
new file mode 100644
index 0000000..015fbdb
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TfrmServerSelectSrc.dfm
@@ -0,0 +1,57 @@
+object frmServerSelect: TfrmServerSelect
+ Left = 501
+ Top = 272
+ BorderStyle = bsDialog
+ Caption = 'frmServerSelect'
+ ClientHeight = 323
+ ClientWidth = 392
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ PixelsPerInch = 96
+ TextHeight = 13
+ object lbServers: TCheckListBox
+ Left = 8
+ Top = 8
+ Width = 369
+ Height = 249
+ OnClickCheck = lbServersClickCheck
+ ItemHeight = 13
+ Items.Strings = (
+ '1'
+ '2'
+ '3')
+ Sorted = True
+ TabOrder = 0
+ end
+ object pnlButtons: TPanel
+ Left = 0
+ Top = 282
+ Width = 392
+ Height = 41
+ Align = alBottom
+ TabOrder = 1
+ object btnOk: TButton
+ Left = 224
+ Top = 8
+ Width = 75
+ Height = 25
+ Caption = '&Ok'
+ ModalResult = 1
+ TabOrder = 0
+ end
+ object btCancel: TButton
+ Left = 304
+ Top = 8
+ Width = 75
+ Height = 25
+ Caption = '&Cancel'
+ ModalResult = 2
+ TabOrder = 1
+ end
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TfrmServerSelectSrc.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TfrmServerSelectSrc.pas
new file mode 100644
index 0000000..0e15669
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TfrmServerSelectSrc.pas
@@ -0,0 +1,104 @@
+unit TfrmServerSelectSrc;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, StdCtrls, ExtCtrls, CheckLst,
+ TXPBrdCastServerSrc,
+ uROServer;
+
+type
+ TfrmServerSelect = class(TForm)
+ lbServers: TCheckListBox;
+ pnlButtons: TPanel;
+ btnOk: TButton;
+ btCancel: TButton;
+ procedure lbServersClickCheck(Sender: TObject);
+ private
+ fBrdCstSvr: TXPBrdCastServer;
+ fSvrItems: TXPServerCollection;
+ protected
+ procedure RefreshServers;
+ procedure AddServer(aServer: TROServer);
+ procedure RemoveServer(aServer: TROServer);
+ public
+ constructor Create(aBrdCstServer : TXPBrdCastServer); reintroduce;
+ end;
+
+
+implementation
+
+{$R *.dfm}
+
+{ TfrmServerSelect }
+
+constructor TfrmServerSelect.Create(aBrdCstServer: TXPBrdCastServer);
+begin
+ inherited Create(nil);
+ fBrdCstSvr := aBrdCstServer;
+
+ if Assigned(fBrdCstSvr)
+ then fSvrItems := fBrdCstSvr.ExportedServers
+ else fSvrItems := nil;
+
+ RefreshServers;
+end;
+
+procedure TfrmServerSelect.RefreshServers;
+var lOwner: TComponent;
+ i,Idx: Integer;
+begin
+ lbServers.Clear;
+ if not(Assigned(fBrdCstSvr)) then
+ Exit;
+
+ lOwner := fBrdCstSvr.Owner;
+ if not(Assigned(lOwner)) then
+ Exit;
+
+ // Get all the ROServers from the owner of the TXPBrdCastServer
+ for i := 0 to lOwner.ComponentCount-1 do
+ begin
+ if lOwner.Components[i].InheritsFrom(TROServer) then
+ begin
+ if not(lOwner.Components[i].InheritsFrom(TXPBrdCastServer)) then
+ lbServers.AddItem(lOwner.Components[i].Name,lOwner.Components[i]);
+ end;
+ end;
+
+ // Set checkmark for all servers containd in ExposedServers
+ for i := 0 to fSvrItems.Count-1 do
+ begin
+ Idx := lbServers.Items.IndexOfObject(fSvrItems.Servers[i]);
+ if Idx >= 0 then
+ begin
+ lbServers.Checked[Idx] := True;
+ end;
+ end;
+
+end;
+
+procedure TfrmServerSelect.lbServersClickCheck(Sender: TObject);
+begin
+ if lbServers.Checked[lbServers.ItemIndex]
+ then AddServer(TROServer(lbServers.Items.Objects[lbServers.ItemIndex]))
+ else RemoveServer(TROServer(lbServers.Items.Objects[lbServers.ItemIndex]));
+
+end;
+
+procedure TfrmServerSelect.AddServer(aServer: TROServer);
+begin
+ if not(Assigned(aServer)) then
+ Exit;
+ fSvrItems.AddServer(aServer);
+end;
+
+procedure TfrmServerSelect.RemoveServer(aServer: TROServer);
+begin
+ if not(Assigned(aServer)) then
+ Exit;
+ fSvrItems.DeleteServer(aServer);
+end;
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer.bdsproj
new file mode 100644
index 0000000..b1bdf5d
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {81AB7958-E0B4-416B-BE58-6E3148069C61}
+
+
+
+
+ TimeServer.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer.dpr
new file mode 100644
index 0000000..a8598a2
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer.dpr
@@ -0,0 +1,20 @@
+program TimeServer;
+
+{#ROGEN:TimeServer.rodl} // RemObjects: Careful, do not remove!
+
+uses
+ Forms,
+ TimeServer_ServerMain in 'TimeServer_ServerMain.pas' {TimeServer_ServerMainForm},
+ TimeServer_Intf in 'TimeServer_Intf.pas',
+ TimeServer_Invk in 'TimeServer_Invk.pas',
+ TimeServer_Impl in 'TimeServer_Impl.pas';
+
+{$R *.RES}
+{$R RODLFile.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'Time Server';
+ Application.CreateForm(TTimeServer_ServerMainForm, TimeServer_ServerMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer.dproj
new file mode 100644
index 0000000..8c9e7bd
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer.dproj
@@ -0,0 +1,75 @@
+
+
+ {4814a248-a012-4462-8202-c9312422846a}
+ TimeServer.dpr
+ Debug
+ AnyCPU
+ DCC32
+ TimeServer.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ TimeServer.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer.res
new file mode 100644
index 0000000..b72ce48
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer.rodl b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer.rodl
new file mode 100644
index 0000000..fa39afe
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer.rodl
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServerGroup.Sample.html b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServerGroup.Sample.html
new file mode 100644
index 0000000..76b4ebe
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServerGroup.Sample.html
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+ Time Server Sample
+
+
+Purpose
+This is an extremely basic sample illustrating how to use the TROBroadcastServer and TROBroadcastChannel components.
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServerGroup.bdsgroup b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServerGroup.bdsgroup
new file mode 100644
index 0000000..045a814
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServerGroup.bdsgroup
@@ -0,0 +1,20 @@
+
+
+
+
+ Default.Personality
+
+ 1.0
+ {8E28D8CF-A0F9-4B85-A7D0-365DA091214B}
+
+
+
+
+
+ TimeServer.bdsproj
+ TimeServer_Client.bdsproj
+ TimeServer.exe TimeServer_Client.exe
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServerGroup.bpg b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServerGroup.bpg
new file mode 100644
index 0000000..b904350
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServerGroup.bpg
@@ -0,0 +1,23 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = TimeServer.exe TimeServer_Client.exe
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+TimeServer.exe: TimeServer.dpr
+ $(DCC)
+
+TimeServer_Client.exe: TimeServer_Client.dpr
+ $(DCC)
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServerGroup.groupproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServerGroup.groupproj
new file mode 100644
index 0000000..e8a4246
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServerGroup.groupproj
@@ -0,0 +1,40 @@
+
+
+ {be071276-ccf9-403b-899d-27eaddb3adba}
+
+
+
+
+ Default.Personality
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer_Client.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer_Client.bdsproj
new file mode 100644
index 0000000..0d80d9e
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer_Client.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {AFD35F3F-8CBB-4D96-A12C-844750BC00BC}
+
+
+
+
+ TimeServer_Client.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer_Client.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer_Client.dpr
new file mode 100644
index 0000000..82d8da0
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer_Client.dpr
@@ -0,0 +1,15 @@
+program TimeServer_Client;
+
+uses
+ Forms,
+ TimeServer_ClientMain in 'TimeServer_ClientMain.pas' {TimeServer_ClientMainForm},
+ TimeServer_Intf in 'TimeServer_Intf.pas';
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'Time Client';
+ Application.CreateForm(TTimeServer_ClientMainForm, TimeServer_ClientMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer_Client.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer_Client.dproj
new file mode 100644
index 0000000..efd159a
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer_Client.dproj
@@ -0,0 +1,73 @@
+
+
+ {04a61aab-fbdf-4651-bba7-a097a06d5b04}
+ TimeServer_Client.dpr
+ Debug
+ AnyCPU
+ DCC32
+ TimeServer_Client.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ TimeServer_Client.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer_Client.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer_Client.res
new file mode 100644
index 0000000..852a6c3
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer_Client.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer_ClientMain.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer_ClientMain.dfm
new file mode 100644
index 0000000..7130946
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer_ClientMain.dfm
@@ -0,0 +1,64 @@
+object TimeServer_ClientMainForm: TTimeServer_ClientMainForm
+ Left = 422
+ Top = 409
+ AutoScroll = False
+ Caption = 'TimeServer Client'
+ ClientHeight = 217
+ ClientWidth = 285
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ OldCreateOrder = False
+ OnCreate = FormCreate
+ PixelsPerInch = 96
+ TextHeight = 13
+ object ROPoweredByRemObjectsButton1: TROPoweredByRemObjectsButton
+ Left = 37
+ Top = 2
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ ApplicationType = atClient
+ end
+ object TimeButton: TButton
+ Left = 87
+ Top = 192
+ Width = 113
+ Height = 22
+ Anchors = [akLeft, akBottom]
+ Caption = 'Get Time'
+ TabOrder = 0
+ OnClick = TimeButtonClick
+ end
+ object mmRequest: TMemo
+ Left = 0
+ Top = 53
+ Width = 286
+ Height = 133
+ Align = alCustom
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ Lines.Strings = (
+ '')
+ ReadOnly = True
+ ScrollBars = ssVertical
+ TabOrder = 1
+ end
+ object BINMessage: TROBinMessage
+ Left = 152
+ Top = 16
+ end
+ object ROBroadcastChannel: TROBroadcastChannel
+ ServerLocators = <>
+ DispatchOptions = []
+ Retrys = 2
+ IndyClient.BroadcastEnabled = True
+ IndyClient.Port = 8090
+ IndyClient.ReceiveTimeout = 100
+ Port = 8090
+ Left = 56
+ Top = 16
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer_ClientMain.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer_ClientMain.pas
new file mode 100644
index 0000000..ff6ab33
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer_ClientMain.pas
@@ -0,0 +1,47 @@
+unit TimeServer_ClientMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, TimeServer_Intf,
+ StdCtrls, uROClient, uROBINMessage, uROSOAPMessage,
+ uROIndyUDPChannel, uROBroadcastChannel, uROPoweredByRemObjectsButton;
+
+type
+ TTimeServer_ClientMainForm = class(TForm)
+ TimeButton: TButton;
+ BINMessage: TROBINMessage;
+ mmRequest: TMemo;
+ ROBroadcastChannel: TROBroadcastChannel;
+ ROPoweredByRemObjectsButton1: TROPoweredByRemObjectsButton;
+ procedure FormCreate(Sender: TObject);
+ procedure TimeButtonClick(Sender: TObject);
+ private
+ FTimeServer: ITimeServer;
+ public
+ { Public declarations }
+ end;
+
+var
+ TimeServer_ClientMainForm: TTimeServer_ClientMainForm;
+
+implementation
+
+{$R *.dfm}
+
+procedure TTimeServer_ClientMainForm.FormCreate(Sender: TObject);
+begin
+ FTimeServer := CoTimeServer.Create(BINMessage,ROBroadcastChannel);
+end;
+
+procedure TTimeServer_ClientMainForm.TimeButtonClick(Sender: TObject);
+var Time: String;
+begin
+ mmRequest.Lines.Add('* Broadcasting Time request.');
+ Time := DateTimeToStr(FTimeServer.GetServerTime);
+ mmRequest.Lines.Add('Received time from a server: '+Time);
+ mmRequest.Lines.Add('');
+end;
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer_Impl.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer_Impl.pas
new file mode 100644
index 0000000..48c50bb
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer_Impl.pas
@@ -0,0 +1,52 @@
+unit TimeServer_Impl;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ This is where you are supposed to code the implementation of your objects. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils,
+ {RemObjects:} uROClientIntf, uROServer, uROServerIntf,
+ {Generated:} TimeServer_Intf;
+
+type
+ TTimeServer = class(TRORemotable, ITimeServer)
+ private
+ protected
+ function Sum(const A: Integer; const B: Integer): Integer;
+ function GetServerTime: DateTime;
+ end;
+
+implementation
+
+uses
+ {Generated:} TimeServer_Invk, TimeServer_ServerMain;
+
+procedure Create_TimeServer(out anInstance : IUnknown);
+begin
+ anInstance := TTimeServer.Create;
+end;
+
+function TTimeServer.Sum(const A: Integer; const B: Integer): Integer;
+begin
+ result := A+B;
+ TimeServer_ServerMainForm.mmRequest.Lines.Add('* Processing Sum request.');
+end;
+
+function TTimeServer.GetServerTime: DateTime;
+begin
+ result := Now;
+ TimeServer_ServerMainForm.mmRequest.Lines.Add('* Processing Time request.');
+end;
+
+initialization
+ TROClassFactory.Create('TimeServer', Create_TimeServer, TTimeServer_Invoker);
+
+finalization
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer_Intf.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer_Intf.pas
new file mode 100644
index 0000000..e3e410a
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer_Intf.pas
@@ -0,0 +1,109 @@
+unit TimeServer_Intf;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROClasses, uROClient, uROTypes, uROClientIntf;
+
+const
+ { Library ID }
+ LibraryUID = '{CD4F46E5-B0FA-4AF9-9B7E-6E01FE096885}';
+
+ { Service Interface ID's }
+ ITimeServer_IID : TGUID = '{CD4F46E5-B0FA-4AF9-9B7E-6E01FE096885}';
+
+ { Event ID's }
+
+type
+ { Forward declarations }
+ ITimeServer = interface;
+
+
+ { ITimeServer }
+ ITimeServer = interface
+ ['{CD4F46E5-B0FA-4AF9-9B7E-6E01FE096885}']
+ function Sum(const A: Integer; const B: Integer): Integer;
+ function GetServerTime: DateTime;
+ end;
+
+ { CoTimeServer }
+ CoTimeServer = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): ITimeServer;
+ end;
+
+ { TTimeServer_Proxy }
+ TTimeServer_Proxy = class(TROProxy, ITimeServer)
+ protected
+ function __GetInterfaceName:string; override;
+
+ function Sum(const A: Integer; const B: Integer): Integer;
+ function GetServerTime: DateTime;
+ end;
+
+implementation
+
+uses
+ {vcl:} SysUtils,
+ {RemObjects:} uROEventRepository, uRORes;
+
+{ CoTimeServer }
+
+class function CoTimeServer.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): ITimeServer;
+begin
+ result := TTimeServer_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TTimeServer_Proxy }
+
+function TTimeServer_Proxy.__GetInterfaceName:string;
+begin
+ result := 'TimeServer';
+end;
+
+function TTimeServer_Proxy.Sum(const A: Integer; const B: Integer): Integer;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'TimeServer', __InterfaceName, 'Sum');
+ __Message.Write('A', TypeInfo(Integer), A, []);
+ __Message.Write('B', TypeInfo(Integer), B, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(Integer), result, []);
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+function TTimeServer_Proxy.GetServerTime: DateTime;
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'TimeServer', __InterfaceName, 'GetServerTime');
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('Result', TypeInfo(DateTime), result, [paIsDateTime]);
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+initialization
+ RegisterProxyClass(ITimeServer_IID, TTimeServer_Proxy);
+
+
+finalization
+ UnregisterProxyClass(ITimeServer_IID);
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer_Invk.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer_Invk.pas
new file mode 100644
index 0000000..154162b
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer_Invk.pas
@@ -0,0 +1,71 @@
+unit TimeServer_Invk;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes,
+ {RemObjects:} uROServer, uROServerIntf, uROTypes, uROClientIntf,
+ {Generated:} TimeServer_Intf;
+
+type
+ TTimeServer_Invoker = class(TROInvoker)
+ private
+ protected
+ published
+ procedure Invoke_Sum(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_GetServerTime(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ end;
+
+implementation
+
+uses
+ {RemObjects:} uRORes, uROClient;
+
+{ TTimeServer_Invoker }
+
+procedure TTimeServer_Invoker.Invoke_Sum(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function Sum(const A: Integer; const B: Integer): Integer; }
+var
+ A: Integer;
+ B: Integer;
+ lResult: Integer;
+begin
+ try
+ __Message.Read('A', TypeInfo(Integer), A, []);
+ __Message.Read('B', TypeInfo(Integer), B, []);
+
+ lResult := (__Instance as ITimeServer).Sum(A, B);
+
+ __Message.InitializeResponseMessage(__Transport, 'TimeServer', 'TimeServer', 'SumResponse');
+ __Message.Write('Result', TypeInfo(Integer), lResult, []);
+ __Message.Finalize;
+
+ finally
+ end;
+end;
+
+procedure TTimeServer_Invoker.Invoke_GetServerTime(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ function GetServerTime: DateTime; }
+var
+ lResult: DateTime;
+begin
+ try
+ lResult := (__Instance as ITimeServer).GetServerTime;
+
+ __Message.InitializeResponseMessage(__Transport, 'TimeServer', 'TimeServer', 'GetServerTimeResponse');
+ __Message.Write('Result', TypeInfo(DateTime), lResult, [paIsDateTime]);
+ __Message.Finalize;
+
+ finally
+ end;
+end;
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer_ServerMain.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer_ServerMain.dfm
new file mode 100644
index 0000000..39935d6
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer_ServerMain.dfm
@@ -0,0 +1,57 @@
+object TimeServer_ServerMainForm: TTimeServer_ServerMainForm
+ Left = 422
+ Top = 301
+ AutoScroll = False
+ Caption = 'TimeServer'
+ ClientHeight = 217
+ ClientWidth = 285
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'Tahoma'
+ Font.Style = []
+ OldCreateOrder = False
+ OnCreate = FormCreate
+ PixelsPerInch = 96
+ TextHeight = 13
+ object ROPoweredByRemObjectsButton1: TROPoweredByRemObjectsButton
+ Left = 36
+ Top = 2
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ end
+ object mmRequest: TMemo
+ Left = 0
+ Top = 54
+ Width = 285
+ Height = 163
+ Align = alBottom
+ Anchors = [akLeft, akTop, akRight, akBottom]
+ Lines.Strings = (
+ '')
+ ReadOnly = True
+ ScrollBars = ssVertical
+ TabOrder = 0
+ end
+ object ROMessage: TROBinMessage
+ Left = 51
+ Top = 59
+ end
+ object UDPServer: TROBroadcastServer
+ Dispatchers = <
+ item
+ Name = 'ROMessage'
+ Message = ROMessage
+ Enabled = True
+ end>
+ IndyUDPServer.BroadcastEnabled = True
+ IndyUDPServer.Bindings = <>
+ IndyUDPServer.DefaultPort = 8090
+ Port = 8090
+ OnRORequest = UDPServerRORequest
+ Left = 25
+ Top = 59
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer_ServerMain.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer_ServerMain.pas
new file mode 100644
index 0000000..5fcdd63
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Time Server/TimeServer_ServerMain.pas
@@ -0,0 +1,47 @@
+unit TimeServer_ServerMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ StdCtrls, uROClient, uROBINMessage, uROClientIntf, uROServer, uROIndyTCPServer,
+ uROSOAPMessage, uROIndyUDPServer, uROBroadcastServer,
+ uROPoweredByRemObjectsButton;
+
+type
+ TTimeServer_ServerMainForm = class(TForm)
+ ROMessage: TROBINMessage;
+ UDPServer: TROBroadcastServer;
+ mmRequest: TMemo;
+ ROPoweredByRemObjectsButton1: TROPoweredByRemObjectsButton;
+ procedure FormCreate(Sender: TObject);
+ procedure UDPServerRORequest(Sender: TObject);
+ private
+
+ protected
+
+ public
+
+ end;
+
+var
+ TimeServer_ServerMainForm: TTimeServer_ServerMainForm;
+
+implementation
+
+
+{$R *.DFM}
+
+procedure TTimeServer_ServerMainForm.FormCreate(Sender: TObject);
+begin
+ UDPServer.Active := True;
+ mmRequest.Lines.Add({+UDPServer.IndyUDPServer.LocalName+}'Server is ready to receive broadcasts.');
+ mmRequest.Lines.Add('');
+end;
+
+procedure TTimeServer_ServerMainForm.UDPServerRORequest(Sender: TObject);
+begin
+ mmRequest.Lines.Add('Received a broadcast to process a RO message.');
+end;
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/RODLFILE.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/RODLFILE.res
new file mode 100644
index 0000000..ca0bbf4
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/RODLFILE.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsClient.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsClient.bdsproj
new file mode 100644
index 0000000..b0b669e
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsClient.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {2D27E2C3-04A5-4319-9A7F-E507666AD1A1}
+
+
+
+
+ VariantsClient.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsClient.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsClient.dpr
new file mode 100644
index 0000000..e115553
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsClient.dpr
@@ -0,0 +1,14 @@
+program VariantsClient;
+
+uses
+ uROComInit,
+ Forms,
+ VariantsClientMain in 'VariantsClientMain.pas' {VariantsClientMainForm};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TVariantsClientMainForm, VariantsClientMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsClient.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsClient.dproj
new file mode 100644
index 0000000..cb3eb41
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsClient.dproj
@@ -0,0 +1,72 @@
+
+
+ {3f03bbe3-e281-4026-95ec-cb282e6ffcf4}
+ VariantsClient.dpr
+ Debug
+ AnyCPU
+ DCC32
+ VariantsClient.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ VariantsClient.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsClient.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsClient.res
new file mode 100644
index 0000000..90e4219
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsClient.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsClientMain.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsClientMain.dfm
new file mode 100644
index 0000000..b0b43a8
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsClientMain.dfm
@@ -0,0 +1,70 @@
+object VariantsClientMainForm: TVariantsClientMainForm
+ Left = 102
+ Top = 118
+ AutoScroll = False
+ Caption = 'Variants Client'
+ ClientHeight = 220
+ ClientWidth = 328
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ PixelsPerInch = 96
+ TextHeight = 13
+ object TestButton: TButton
+ Left = 8
+ Top = 8
+ Width = 75
+ Height = 25
+ Caption = 'Test Variants'
+ TabOrder = 0
+ OnClick = TestButtonClick
+ end
+ object Memo: TMemo
+ Left = 0
+ Top = 81
+ Width = 328
+ Height = 139
+ Align = alBottom
+ ScrollBars = ssVertical
+ TabOrder = 1
+ end
+ object rgMessageType: TRadioGroup
+ Left = 96
+ Top = 0
+ Width = 225
+ Height = 73
+ Caption = 'Message'
+ TabOrder = 2
+ OnClick = rgMessageTypeClick
+ end
+ object BINMessage: TROBinMessage
+ Left = 204
+ Top = 96
+ end
+ object HTTPChannel: TROWinInetHTTPChannel
+ ServerLocators = <>
+ DispatchOptions = []
+ UserAgent = 'RemObjects SDK'
+ TargetURL = 'http://localhost:8099/BIN'
+ Left = 176
+ Top = 96
+ end
+ object RORemoteService: TRORemoteService
+ Message = BINMessage
+ Channel = HTTPChannel
+ ServiceName = 'NewService'
+ Left = 232
+ Top = 96
+ end
+ object SOAPMessage: TROSOAPMessage
+ SerializationOptions = [xsoWriteMultiRefArray, xsoWriteMultiRefObject]
+ Left = 144
+ Top = 96
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsClientMain.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsClientMain.pas
new file mode 100644
index 0000000..65f60be
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsClientMain.pas
@@ -0,0 +1,210 @@
+unit VariantsClientMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
+ uROClient, uROClientIntf, uRORemoteService, uROBinMessage, uROWinInetHTTPChannel,
+ ExtCtrls, uROSOAPMessage, VariantsLibrary_Intf;
+
+type
+ TVariantsClientMainForm = class(TForm)
+ BINMessage: TROBinMessage;
+ HTTPChannel: TROWinInetHTTPChannel;
+ RORemoteService: TRORemoteService;
+ TestButton: TButton;
+ Memo: TMemo;
+ SOAPMessage: TROSOAPMessage;
+ rgMessageType: TRadioGroup;
+ procedure TestButtonClick(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ procedure rgMessageTypeClick(Sender: TObject);
+ private
+ fVariantsService: IVariantsService;
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ VariantsClientMainForm: TVariantsClientMainForm;
+
+implementation
+
+uses Variants;
+
+{$R *.dfm}
+
+procedure TVariantsClientMainForm.TestButtonClick(Sender: TObject);
+
+ procedure CheckVariants(const InputVariant, OutputVariant: Variant; CheckType: boolean = TRUE);
+ var
+ v1, v2: integer;
+ begin
+ if (InputVariant <> OutputVariant) then
+ raise Exception.Create('Variants differ!');
+ { if CheckType then begin
+ v1 := VarType(InputVariant);
+ v2 := VarType(OutputVariant);
+ if v1<>v2 then
+ raise Exception.CreateFmt('Variant TYPE is different (%d, %d)!', [v1, v2]);
+ end;}
+ end;
+
+var
+ inputvar, outputvar: Variant;
+ i: integer;
+ incomplex, outcomplex: TComplexObject;
+ inarray, outarray: TVariantArray;
+begin
+
+ // Complex object
+ incomplex := TComplexObject.Create;
+ incomplex.IntegerId := 101;
+ incomplex.VariantValue := 'My Variant';
+ fVariantsService.EchoComplexObject(incomplex, outcomplex);
+ Memo.Lines.Add('Received ' + IntToStr(outcomplex.IntegerId) + ', ' + outcomplex.VariantValue);
+ incomplex.Free;
+ outcomplex.Free;
+
+ // Simple variant array
+ if not (RORemoteService.Message is TROSOAPMessage) then begin
+ inputvar := VarArrayCreate([0, 10], varVariant);
+ i := 0;
+ for i := 0 to 10 do inputvar[i] := 'SomeText';
+ fVariantsService.EchoVariant(inputvar, outputvar);
+
+ for i := 0 to VarArrayHighBound(outputvar, 1) do
+ Memo.Lines.Add('Simple variant array item #' + IntToStr(i) + '=' + VarToStr(outputvar[i]));
+ end;
+
+ // Variant array (complex type)
+ inarray := TVariantArray.Create;
+ inarray.Add('A string');
+ inarray.Add(1);
+ inarray.Add(Now);
+ inarray.Add(True);
+ fVariantsService.EchoVariantArray(inarray, outarray);
+ for i := 0 to outarray.Count - 1 do
+ Memo.Lines.Add('Variant array item #' + IntToStr(i) + '=' + VarToStr(outarray[i]));
+ inarray.Free;
+ outarray.Free;
+ Memo.Lines.Add('');
+
+ // String
+ inputvar := 'Test';
+ fVariantsService.EchoVariant(inputvar, outputvar);
+ CheckVariants(inputvar, outputvar);
+ Memo.Lines.Add('Received ' + VarToStr(outputvar));
+
+ // Shortint
+ inputvar := 12;
+ fVariantsService.EchoVariant(inputvar, outputvar);
+ CheckVariants(inputvar, outputvar);
+ Memo.Lines.Add('Received ' + VarToStr(outputvar));
+
+ // Byte
+ inputvar := 200;
+ fVariantsService.EchoVariant(inputvar, outputvar);
+ CheckVariants(inputvar, outputvar);
+ Memo.Lines.Add('Received ' + VarToStr(outputvar));
+
+ // Integer
+ inputvar := 123456;
+ fVariantsService.EchoVariant(inputvar, outputvar);
+ CheckVariants(inputvar, outputvar);
+ Memo.Lines.Add('Received ' + VarToStr(outputvar));
+
+ // Float
+ inputvar := 22.39;
+ fVariantsService.EchoVariant(inputvar, outputvar);
+ CheckVariants(inputvar, outputvar, FALSE);
+ Memo.Lines.Add('Received ' + VarToStr(outputvar));
+
+ // Float (big one)
+ inputvar := 780000.32;
+ fVariantsService.EchoVariant(inputvar, outputvar);
+ CheckVariants(inputvar, outputvar, FALSE);
+ Memo.Lines.Add('Received ' + VarToStr(outputvar));
+
+ // Shortint
+ inputvar := -12;
+ fVariantsService.EchoVariant(inputvar, outputvar);
+ CheckVariants(inputvar, outputvar);
+ Memo.Lines.Add('Received ' + VarToStr(outputvar));
+
+ // Byte
+ inputvar := -200;
+ fVariantsService.EchoVariant(inputvar, outputvar);
+ CheckVariants(inputvar, outputvar);
+ Memo.Lines.Add('Received ' + VarToStr(outputvar));
+
+ // Integer
+ inputvar := -123456;
+ fVariantsService.EchoVariant(inputvar, outputvar);
+ CheckVariants(inputvar, outputvar);
+ Memo.Lines.Add('Received ' + VarToStr(outputvar));
+
+ // Float
+ inputvar := -22.39;
+ fVariantsService.EchoVariant(inputvar, outputvar);
+ CheckVariants(inputvar, outputvar, FALSE);
+ Memo.Lines.Add('Received ' + VarToStr(outputvar));
+
+ // Float (big one)
+ inputvar := -780000.32;
+ fVariantsService.EchoVariant(inputvar, outputvar);
+ CheckVariants(inputvar, outputvar, FALSE);
+ Memo.Lines.Add('Received ' + VarToStr(outputvar));
+
+ // Datetime
+ inputvar := Now;
+ fVariantsService.EchoVariant(inputvar, outputvar);
+ // CheckVariants(inputvar, outputvar); // For some reason 2 equal datetimes seem different to Delphi (using SOAP)
+ Memo.Lines.Add('Received ' + VarToStr(outputvar));
+
+ // Boolean
+ inputvar := true;
+ fVariantsService.EchoVariant(inputvar, outputvar);
+ CheckVariants(inputvar, outputvar);
+ Memo.Lines.Add('Received ' + VarToStr(outputvar));
+
+ if (RORemoteService.Message is TROSOAPMessage) then Exit;
+
+ // Array
+ Memo.Lines.Add('');
+ inputvar := VarArrayCreate([0, 3], varVariant);
+ inputvar[0] := 1;
+ inputvar[1] := 1234.5678;
+ inputvar[2] := 'Hello world';
+ inputvar[3] := True;
+ fVariantsService.EchoVariant(inputvar, outputvar);
+
+ for i := 0 to VarArrayHighBound(outputvar, 1) do
+ Memo.Lines.Add('Array element #' + IntToStr(i) + ': ' + VarToStr(outputvar[i]));
+end;
+
+procedure TVariantsClientMainForm.FormCreate(Sender: TObject);
+var
+ i: integer;
+begin
+ for i := 0 to ComponentCount - 1 do
+ if (Components[i] is TROMessage) then begin
+ rgMessageType.Items.AddObject(TROMessage(Components[i]).Name, Components[i]);
+ end;
+
+ rgMessageType.ItemIndex := 1;
+ FVariantsService := (RORemoteService as IVariantsService);
+end;
+
+procedure TVariantsClientMainForm.rgMessageTypeClick(Sender: TObject);
+begin
+ RORemoteService.Message := TROMessage(rgMessageType.Items.Objects[rgMessageType.ItemIndex]);
+ FVariantsService := (RORemoteService as IVariantsService);
+
+ if (RORemoteService.Message is TROSOAPMessage) then HTTPChannel.TargetURL := 'http://localhost:8099/SOAP'
+ else HTTPChannel.TargetURL := 'http://localhost:8099/BIN';
+end;
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsGroup.Sample.html b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsGroup.Sample.html
new file mode 100644
index 0000000..51a7db7
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsGroup.Sample.html
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+ Variants
+
+
+Purpose
+
+This example shows how the RemObjects SDK can transfer variants and array of Variants from the client and server using the TROBinMessage and TROSOAPMessage message types.
+
+Examine the Code
+
+
+
+ See how the service is defined in the service library. Do this by making the server the selected project and by using the menu option: RemObjects | Edit Service Library. Note: if you don't see this menu option but see 'Service Builder' instead, you still have the client set as the current project.
+
+
+ Examine the simple code needed to invoke the methods in
+ VariantsClientMain.pas .
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsGroup.bdsgroup b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsGroup.bdsgroup
new file mode 100644
index 0000000..a7532eb
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsGroup.bdsgroup
@@ -0,0 +1,20 @@
+
+
+
+
+ Default.Personality
+
+ 1.0
+ {1C28AAE9-9811-49D0-8E0E-91E78573DF0F}
+
+
+
+
+
+ VariantsServer.bdsproj
+ VariantsClient.bdsproj
+ VariantsServer.exe VariantsClient.exe
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsGroup.bpg b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsGroup.bpg
new file mode 100644
index 0000000..fd2c63c
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsGroup.bpg
@@ -0,0 +1,23 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = VariantsServer.exe VariantsClient.exe
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+VariantsServer.exe: VariantsServer.dpr
+ $(DCC)
+
+VariantsClient.exe: VariantsClient.dpr
+ $(DCC)
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsGroup.groupproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsGroup.groupproj
new file mode 100644
index 0000000..2e2c50d
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsGroup.groupproj
@@ -0,0 +1,40 @@
+
+
+ {ecb75d83-34ba-4d9e-8222-3bbf34aee98f}
+
+
+
+
+ Default.Personality
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsLibrary.rodl b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsLibrary.rodl
new file mode 100644
index 0000000..3e56db3
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsLibrary.rodl
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsLibrary_Intf.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsLibrary_Intf.pas
new file mode 100644
index 0000000..3db3e92
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsLibrary_Intf.pas
@@ -0,0 +1,324 @@
+unit VariantsLibrary_Intf;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROClasses, uROClient, uROTypes, uROClientIntf;
+
+const
+ { Library ID }
+ LibraryUID = '{997272DF-9CE1-42FC-A341-669D18AE18ED}';
+
+ { Service Interface ID's }
+ IVariantsService_IID : TGUID = '{509D1C6D-51DF-4269-A160-DB5B5B671874}';
+
+ { Event ID's }
+
+type
+ { Forward declarations }
+ IVariantsService = interface;
+
+ TVariantArray = class;
+
+ TComplexObject = class;
+
+
+ { TComplexObject }
+ TComplexObject = class(TROComplexType)
+ private
+ fIntegerId: Integer;
+ fVariantValue: Variant;
+ public
+ procedure Assign(iSource: TPersistent); override;
+ published
+ property IntegerId:Integer read fIntegerId write fIntegerId;
+ property VariantValue:Variant read fVariantValue write fVariantValue;
+ end;
+
+ { TComplexObjectCollection }
+ TComplexObjectCollection = class(TROCollection)
+ protected
+ constructor Create(aItemClass: TCollectionItemClass); overload;
+ function GetItems(Index: integer): TComplexObject;
+ procedure SetItems(Index: integer; const Value: TComplexObject);
+ public
+ constructor Create; overload;
+ function Add: TComplexObject; reintroduce;
+ property Items[Index: integer]:TComplexObject read GetItems write SetItems; default;
+ end;
+
+ { TVariantArray }
+ TVariantArray = class(TROArray)
+ private
+ fCount: Integer;
+ fItems : array of Variant;
+ protected
+ procedure Grow; virtual;
+ function GetItems(Index: integer): Variant;
+ procedure SetItems(Index: integer; const Value: Variant);
+ function GetCount: integer; override;
+ public
+ class function GetItemType: PTypeInfo; override;
+ class function GetItemSize: integer; override;
+ function GetItemRef(Index: integer): pointer; override;
+ procedure Clear; override;
+ procedure Delete(Index: integer); override;
+ procedure Resize(ElementCount: integer); override;
+
+ procedure Assign(iSource:TPersistent); override;
+ function Add(const Value:Variant): integer;
+
+ property Count : integer read GetCount;
+ property Items[Index: integer]:Variant read GetItems write SetItems; default;
+ end;
+
+ { IVariantsService }
+ IVariantsService = interface
+ ['{509D1C6D-51DF-4269-A160-DB5B5B671874}']
+ procedure EchoVariant(const InputVariant: Variant; out OutputVariant: Variant);
+ procedure EchoComplexObject(const InComplexObject: TComplexObject; out OutComplexObject: TComplexObject);
+ procedure EchoVariantArray(const InArray: TVariantArray; out OutArray: TVariantArray);
+ end;
+
+ { CoVariantsService }
+ CoVariantsService = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IVariantsService;
+ end;
+
+ { TVariantsService_Proxy }
+ TVariantsService_Proxy = class(TROProxy, IVariantsService)
+ protected
+ function __GetInterfaceName:string; override;
+
+ procedure EchoVariant(const InputVariant: Variant; out OutputVariant: Variant);
+ procedure EchoComplexObject(const InComplexObject: TComplexObject; out OutComplexObject: TComplexObject);
+ procedure EchoVariantArray(const InArray: TVariantArray; out OutArray: TVariantArray);
+ end;
+
+implementation
+
+uses
+ {vcl:} SysUtils,
+ {RemObjects:} uROEventRepository, uRORes;
+
+{ TVariantArray }
+
+procedure TVariantArray.Assign(iSource: TPersistent);
+var lSource:TVariantArray;
+ i:integer;
+begin
+ if (iSource is TVariantArray) then begin
+ lSource := TVariantArray(iSource);
+ Clear();
+ Resize(lSource.Count);
+ for i := 0 to Count-1 do begin
+ Items[i] := lSource.Items[i];
+ end;
+ end
+ else begin
+ inherited Assign(iSource);
+ end;
+end;
+
+class function TVariantArray.GetItemType: PTypeInfo;
+begin
+ result := TypeInfo(Variant);
+end;
+
+class function TVariantArray.GetItemSize: integer;
+begin
+ result := SizeOf(Variant);
+end;
+
+function TVariantArray.GetItems(Index: integer): Variant;
+begin
+ if (Index < 0) or (Index >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[Index]);
+ result := fItems[Index];
+end;
+
+function TVariantArray.GetItemRef(Index: integer): pointer;
+begin
+ if (Index < 0) or (Index >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[Index]);
+ result := @fItems[Index];
+end;
+
+procedure TVariantArray.Clear;
+begin
+ SetLength(fItems, 0);
+ FCount := 0;
+end;
+
+procedure TVariantArray.Delete(Index: integer);
+var i: integer;
+begin
+ if (Index>=Count) then RaiseError(err_InvalidIndex, [Index]);
+
+ if (Index= Count) then RaiseError(err_ArrayIndexOutOfBounds,[Index]);
+ fItems[Index] := Value;
+end;
+
+procedure TVariantArray.Resize(ElementCount: integer);
+begin
+ SetLength(fItems, ElementCount);
+ FCount := ElementCount;
+end;
+
+function TVariantArray.GetCount: integer;
+begin
+ result := FCount;
+end;
+
+procedure TVariantArray.Grow;
+var
+ Delta, Capacity: Integer;
+begin
+ Capacity := Length(fItems);
+ if Capacity > 64 then
+ Delta := Capacity div 4
+ else
+ if Capacity > 8 then
+ Delta := 16
+ else
+ Delta := 4;
+ SetLength(fItems, Capacity + Delta);
+end;
+
+function TVariantArray.Add(const Value: Variant): integer;
+begin
+ Result := Count;
+ if Length(fItems) = Result then
+ Grow;
+ fItems[result] := Value;
+ Inc(fCount);
+end;
+
+{ TComplexObject }
+
+procedure TComplexObject.Assign(iSource: TPersistent);
+var lSource:TComplexObject;
+begin
+ inherited Assign(iSource);
+ if (iSource is TComplexObject) then begin
+ lSource := TComplexObject(iSource);
+ IntegerId := lSource.IntegerId;
+ VariantValue := lSource.VariantValue;
+ end;
+end;
+
+{ TComplexObjectCollection }
+constructor TComplexObjectCollection.Create;
+begin
+ inherited Create(TComplexObject);
+end;
+
+constructor TComplexObjectCollection.Create(aItemClass: TCollectionItemClass);
+begin
+ inherited Create(aItemClass);
+end;
+
+function TComplexObjectCollection.Add: TComplexObject;
+begin
+ result := TComplexObject(inherited Add);
+end;
+
+function TComplexObjectCollection.GetItems(Index: integer): TComplexObject;
+begin
+ result := TComplexObject(inherited Items[Index]);
+end;
+
+procedure TComplexObjectCollection.SetItems(Index: integer; const Value: TComplexObject);
+begin
+ TComplexObject(inherited Items[Index]).Assign(Value);
+end;
+
+{ CoVariantsService }
+
+class function CoVariantsService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IVariantsService;
+begin
+ result := TVariantsService_Proxy.Create(aMessage, aTransportChannel);
+end;
+
+{ TVariantsService_Proxy }
+
+function TVariantsService_Proxy.__GetInterfaceName:string;
+begin
+ result := 'VariantsService';
+end;
+
+procedure TVariantsService_Proxy.EchoVariant(const InputVariant: Variant; out OutputVariant: Variant);
+begin
+ try
+ __Message.InitializeRequestMessage(__TransportChannel, 'VariantsLibrary', __InterfaceName, 'EchoVariant');
+ __Message.Write('InputVariant', TypeInfo(Variant), InputVariant, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('OutputVariant', TypeInfo(Variant), OutputVariant, []);
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+procedure TVariantsService_Proxy.EchoComplexObject(const InComplexObject: TComplexObject; out OutComplexObject: TComplexObject);
+begin
+ try
+ OutComplexObject := nil;
+ __Message.InitializeRequestMessage(__TransportChannel, 'VariantsLibrary', __InterfaceName, 'EchoComplexObject');
+ __Message.Write('InComplexObject', TypeInfo(VariantsLibrary_Intf.TComplexObject), InComplexObject, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('OutComplexObject', TypeInfo(VariantsLibrary_Intf.TComplexObject), OutComplexObject, []);
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+procedure TVariantsService_Proxy.EchoVariantArray(const InArray: TVariantArray; out OutArray: TVariantArray);
+begin
+ try
+ OutArray := nil;
+ __Message.InitializeRequestMessage(__TransportChannel, 'VariantsLibrary', __InterfaceName, 'EchoVariantArray');
+ __Message.Write('InArray', TypeInfo(VariantsLibrary_Intf.TVariantArray), InArray, []);
+ __Message.Finalize;
+
+ __TransportChannel.Dispatch(__Message);
+
+ __Message.Read('OutArray', TypeInfo(VariantsLibrary_Intf.TVariantArray), OutArray, []);
+ finally
+ __Message.FreeStream;
+ end
+end;
+
+initialization
+ RegisterROClass(TComplexObject);
+ RegisterROClass(TVariantArray);
+ RegisterProxyClass(IVariantsService_IID, TVariantsService_Proxy);
+
+
+finalization
+ UnregisterROClass(TComplexObject);
+ UnregisterROClass(TVariantArray);
+ UnregisterProxyClass(IVariantsService_IID);
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsLibrary_Invk.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsLibrary_Invk.pas
new file mode 100644
index 0000000..db6740e
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsLibrary_Invk.pas
@@ -0,0 +1,112 @@
+unit VariantsLibrary_Invk;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes,
+ {RemObjects:} uROServer, uROServerIntf, uROTypes, uROClientIntf,
+ {Generated:} VariantsLibrary_Intf;
+
+type
+ TVariantsService_Invoker = class(TROInvoker)
+ private
+ protected
+ published
+ procedure Invoke_EchoVariant(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_EchoComplexObject(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ procedure Invoke_EchoVariantArray(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+ end;
+
+implementation
+
+uses
+ {RemObjects:} uRORes, uROClient;
+
+{ TVariantsService_Invoker }
+
+procedure TVariantsService_Invoker.Invoke_EchoVariant(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ procedure EchoVariant(const InputVariant: Variant; out OutputVariant: Variant); }
+var
+ InputVariant: Variant;
+ OutputVariant: Variant;
+begin
+ try
+ __Message.Read('InputVariant', TypeInfo(Variant), InputVariant, []);
+
+ (__Instance as IVariantsService).EchoVariant(InputVariant, OutputVariant);
+
+ __Message.InitializeResponseMessage(__Transport, 'VariantsLibrary', 'VariantsService', 'EchoVariantResponse');
+ __Message.Write('OutputVariant', TypeInfo(Variant), OutputVariant, []);
+ __Message.Finalize;
+
+ finally
+ end;
+end;
+
+procedure TVariantsService_Invoker.Invoke_EchoComplexObject(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ procedure EchoComplexObject(const InComplexObject: TComplexObject; out OutComplexObject: TComplexObject); }
+var
+ InComplexObject: VariantsLibrary_Intf.TComplexObject;
+ OutComplexObject: VariantsLibrary_Intf.TComplexObject;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ InComplexObject := nil;
+ OutComplexObject := nil;
+ try
+ __Message.Read('InComplexObject', TypeInfo(VariantsLibrary_Intf.TComplexObject), InComplexObject, []);
+
+ (__Instance as IVariantsService).EchoComplexObject(InComplexObject, OutComplexObject);
+
+ __Message.InitializeResponseMessage(__Transport, 'VariantsLibrary', 'VariantsService', 'EchoComplexObjectResponse');
+ __Message.Write('OutComplexObject', TypeInfo(VariantsLibrary_Intf.TComplexObject), OutComplexObject, []);
+ __Message.Finalize;
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(InComplexObject);
+ __lObjectDisposer.Add(OutComplexObject);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
+procedure TVariantsService_Invoker.Invoke_EchoVariantArray(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
+{ procedure EchoVariantArray(const InArray: TVariantArray; out OutArray: TVariantArray); }
+var
+ InArray: VariantsLibrary_Intf.TVariantArray;
+ OutArray: VariantsLibrary_Intf.TVariantArray;
+ __lObjectDisposer: TROObjectDisposer;
+begin
+ InArray := nil;
+ OutArray := nil;
+ try
+ __Message.Read('InArray', TypeInfo(VariantsLibrary_Intf.TVariantArray), InArray, []);
+
+ (__Instance as IVariantsService).EchoVariantArray(InArray, OutArray);
+
+ __Message.InitializeResponseMessage(__Transport, 'VariantsLibrary', 'VariantsService', 'EchoVariantArrayResponse');
+ __Message.Write('OutArray', TypeInfo(VariantsLibrary_Intf.TVariantArray), OutArray, []);
+ __Message.Finalize;
+
+ finally
+ __lObjectDisposer := TROObjectDisposer.Create(__Instance);
+ try
+ __lObjectDisposer.Add(InArray);
+ __lObjectDisposer.Add(OutArray);
+ finally
+ __lObjectDisposer.Free();
+ end;
+ end;
+end;
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsServer.bdsproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsServer.bdsproj
new file mode 100644
index 0000000..46a956f
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsServer.bdsproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Delphi.Personality
+ VCLApplication
+ 1.0
+ {41800CC5-0FFC-412D-BB30-3B34DC1B27B2}
+
+
+
+
+ VariantsServer.dpr
+
+
+ 7.0
+
+
+ 8
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 1
+ 1
+ 1
+ True
+ True
+ WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+
+ False
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ False
+ False
+ False
+ True
+ True
+ True
+ True
+ True
+ True
+
+
+
+ 0
+ 0
+ False
+ 1
+ False
+ False
+ False
+ 16384
+ 1048576
+ 4194304
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ True
+ False
+
+
+
+ $00000000
+
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsServer.dpr b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsServer.dpr
new file mode 100644
index 0000000..f1e3e55
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsServer.dpr
@@ -0,0 +1,20 @@
+program VariantsServer;
+
+{#ROGEN:VariantsLibrary.rodl} // RemObjects: Careful, do not remove!
+
+uses
+ uROComInit,
+ Forms,
+ VariantsServerMain in 'VariantsServerMain.pas' {VariantsServerMainForm},
+ VariantsLibrary_Intf in 'VariantsLibrary_Intf.pas',
+ VariantsLibrary_Invk in 'VariantsLibrary_Invk.pas',
+ VariantsService_Impl in 'VariantsService_Impl.pas';
+
+{$R *.res}
+{$R RODLFile.res}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TVariantsServerMainForm, VariantsServerMainForm);
+ Application.Run;
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsServer.dproj b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsServer.dproj
new file mode 100644
index 0000000..fabf576
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsServer.dproj
@@ -0,0 +1,75 @@
+
+
+ {3360785c-eedb-4055-b208-6a68c355d46d}
+ VariantsServer.dpr
+ Debug
+ AnyCPU
+ DCC32
+ VariantsServer.exe
+
+
+ 7.0
+ False
+ False
+ 0
+ RELEASE
+
+
+ 7.0
+ DEBUG
+
+
+ Delphi.Personality
+ VCLApplication
+
+
+ False
+ True
+ False
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+ VariantsServer.dpr
+
+
+
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsServer.res b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsServer.res
new file mode 100644
index 0000000..b0dd731
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsServer.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsServerMain.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsServerMain.dfm
new file mode 100644
index 0000000..42e207e
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsServerMain.dfm
@@ -0,0 +1,53 @@
+object VariantsServerMainForm: TVariantsServerMainForm
+ Left = 60
+ Top = 50
+ BorderStyle = bsDialog
+ Caption = 'Variants Server'
+ ClientHeight = 64
+ ClientWidth = 228
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ PixelsPerInch = 96
+ TextHeight = 13
+ object RoPoweredByRemObjectsButton1: TROPoweredByRemObjectsButton
+ Left = 8
+ Top = 8
+ Width = 212
+ Height = 48
+ Cursor = crHandPoint
+ end
+ object BINMessage: TROBinMessage
+ Left = 36
+ Top = 8
+ end
+ object ROServer: TROIndyHTTPServer
+ Dispatchers = <
+ item
+ Name = 'BINMessage'
+ Message = BINMessage
+ Enabled = True
+ PathInfo = 'Bin'
+ end
+ item
+ Name = 'ROSOAPMessage'
+ Message = ROSOAPMessage
+ Enabled = True
+ PathInfo = 'SOAP'
+ end>
+ Port = 8099
+ Left = 8
+ Top = 8
+ end
+ object ROSOAPMessage: TROSOAPMessage
+ SerializationOptions = [xsoWriteMultiRefArray, xsoWriteMultiRefObject]
+ Left = 64
+ Top = 8
+ end
+end
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsServerMain.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsServerMain.pas
new file mode 100644
index 0000000..2d971c4
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsServerMain.pas
@@ -0,0 +1,36 @@
+unit VariantsServerMain;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
+ uROClient, uROPoweredByRemObjectsButton, uROClientIntf, uROServer,
+ uROBinMessage, uROIndyHTTPServer, uROIndyTCPServer, uROSOAPMessage;
+
+type
+ TVariantsServerMainForm = class(TForm)
+ RoPoweredByRemObjectsButton1: TRoPoweredByRemObjectsButton;
+ BINMessage: TROBinMessage;
+ ROServer: TROIndyHTTPServer;
+ ROSOAPMessage: TROSOAPMessage;
+ procedure FormCreate(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ VariantsServerMainForm: TVariantsServerMainForm;
+
+implementation
+
+
+{$R *.dfm}
+
+procedure TVariantsServerMainForm.FormCreate(Sender: TObject);
+begin
+ ROServer.Active := true;
+end;
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsService_Impl.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsService_Impl.pas
new file mode 100644
index 0000000..01bfb3d
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Samples/Variants/VariantsService_Impl.pas
@@ -0,0 +1,61 @@
+unit VariantsService_Impl;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ This is where you are supposed to code the implementation of your objects. }
+{----------------------------------------------------------------------------}
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils,
+ {RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
+ {Generated:} VariantsLibrary_Intf;
+
+type
+ { TVariantsService }
+ TVariantsService = class(TRORemotable, IVariantsService)
+ private
+ protected
+ { IVariantsService methods }
+ procedure EchoVariant(const InputVariant: Variant; out OutputVariant: Variant);
+ procedure EchoComplexObject(const InComplexObject: TComplexObject; out OutComplexObject: TComplexObject);
+ procedure EchoVariantArray(const InArray: TVariantArray; out OutArray: TVariantArray);
+ end;
+
+implementation
+
+uses
+ {Generated:} VariantsLibrary_Invk;
+
+procedure Create_VariantsService(out anInstance: IUnknown);
+begin
+ anInstance := TVariantsService.Create;
+end;
+
+{ VariantsService }
+
+procedure TVariantsService.EchoVariant(const InputVariant: Variant; out OutputVariant: Variant);
+begin
+ OutputVariant := InputVariant;
+end;
+
+procedure TVariantsService.EchoComplexObject(const InComplexObject: TComplexObject; out OutComplexObject: TComplexObject);
+begin
+ OutComplexObject := InComplexObject;
+end;
+
+procedure TVariantsService.EchoVariantArray(const InArray: TVariantArray; out OutArray: TVariantArray);
+begin
+ OutArray := InArray;
+end;
+
+initialization
+ TROClassFactory.Create('VariantsService', Create_VariantsService, TVariantsService_Invoker);
+
+finalization
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Source/BuildPackages_D10.bdsgroup b/official/5.0.30.691/RemObjects SDK for Delphi/Source/BuildPackages_D10.bdsgroup
new file mode 100644
index 0000000..8ac831f
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Source/BuildPackages_D10.bdsgroup
@@ -0,0 +1,41 @@
+
+
+
+
+ Default.Personality
+
+ 1.0
+ {CDD70F62-05F7-4112-A8A7-9904A7180AAE}
+
+
+
+
+ RemObjects_Core_D10.bdsproj
+ IDE\RemObjects_IDE_D10.bdsproj
+ RemObjects_WebBroker_D10.bdsproj
+ RemObjects_Indy_D10.bdsproj
+ RODX\RemObjects_RODX_D10.bdsproj
+ RemObjects_BPDX_D10.bdsproj
+ DataSnap\RemObjects_DataSnap_D10.bdsproj
+ RemObjects_Synapse_D10.bdsproj
+ RemObjects_Core_D10.bpl RemObjects_IDE_D10.bpl RemObjects_WebBroker_D10.bpl RemObjects_Indy_D10.bpl RemObjects_RODX_D10.bpl RemObjects_BPDX_D10.bpl RemObjects_DataSnap_D10.bpl RemObjects_Synapse_D10.bpl
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Source/BuildPackages_D11.groupproj b/official/5.0.30.691/RemObjects SDK for Delphi/Source/BuildPackages_D11.groupproj
new file mode 100644
index 0000000..9767849
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Source/BuildPackages_D11.groupproj
@@ -0,0 +1,114 @@
+
+
+ {426d6bef-d93c-4c13-9e7c-fff76629872a}
+
+
+
+
+ RemObjects_Core_D11.dproj
+
+
+ RemObjects_Core_D11.dproj
+
+
+ RODX\RemObjects_RODX_D11.dproj
+
+
+
+ RemObjects_Core_D11.dproj
+
+
+
+ RemObjects_Core_D11.dproj
+
+
+
+
+ Default.Personality
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Source/BuildPackages_D5.bpg b/official/5.0.30.691/RemObjects SDK for Delphi/Source/BuildPackages_D5.bpg
new file mode 100644
index 0000000..6f6cd66
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Source/BuildPackages_D5.bpg
@@ -0,0 +1,41 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = RemObjects_Core_D5.bpl RemObjects_IDE_D5.bpl \
+ RemObjects_WebBroker_D5.bpl RemObjects_Indy_D5.bpl RemObjects_RODX_D5.bpl \
+ RemObjects_BPDX_D5.bpl RemObjects_Synapse_D5.bpl
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+RemObjects_Core_D5.bpl: RemObjects_Core_D5.dpk
+ $(DCC)
+
+RemObjects_IDE_D5.bpl: IDE\RemObjects_IDE_D5.dpk
+ $(DCC)
+
+RemObjects_Indy_D5.bpl: RemObjects_Indy_D5.dpk
+ $(DCC)
+
+RemObjects_BPDX_D5.bpl: RemObjects_BPDX_D5.dpk
+ $(DCC)
+
+RemObjects_RODX_D5.bpl: RODX\RemObjects_RODX_D5.dpk
+ $(DCC)
+
+RemObjects_Synapse_D7.bpl: RemObjects_Synapse_D7.dpk
+ $(DCC)
+
+RemObjects_WebBroker_D7.bpl: RemObjects_WebBroker_D7.dpk
+ $(DCC)
+
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Source/BuildPackages_D6.bpg b/official/5.0.30.691/RemObjects SDK for Delphi/Source/BuildPackages_D6.bpg
new file mode 100644
index 0000000..119cb74
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Source/BuildPackages_D6.bpg
@@ -0,0 +1,41 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = RemObjects_Core_D6.bpl RemObjects_IDE_D6.bpl \
+ RemObjects_WebBroker_D6.bpl RemObjects_Indy_D6.bpl RemObjects_RODX_D6.bpl \
+ RemObjects_BPDX_D6.bpl RemObjects_DataSnap_D6.bpl RemObjects_Synapse_D6.bpl
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+RemObjects_Core_D6.bpl: RemObjects_Core_D6.dpk
+ $(DCC)
+
+RemObjects_IDE_D6.bpl: IDE\RemObjects_IDE_D6.dpk
+ $(DCC)
+
+RemObjects_Indy_D6.bpl: RemObjects_Indy_D6.dpk
+ $(DCC)
+
+RemObjects_BPDX_D6.bpl: RemObjects_BPDX_D6.dpk
+ $(DCC)
+
+RemObjects_DataSnap_D6.bpl: DataSnap\RemObjects_DataSnap_D6.dpk
+ $(DCC)
+
+RemObjects_RODX_D6.bpl: rodx\RemObjects_RODX_D6.dpk
+ $(DCC)
+
+RemObjects_Synapse_D6.bpl: RemObjects_Synapse_D6.dpk
+ $(DCC)
+
+RemObjects_WebBroker_D6.bpl: RemObjects_WebBroker_D6.dpk
+ $(DCC)
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Source/BuildPackages_D7.bpg b/official/5.0.30.691/RemObjects SDK for Delphi/Source/BuildPackages_D7.bpg
new file mode 100644
index 0000000..b1aed3d
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Source/BuildPackages_D7.bpg
@@ -0,0 +1,43 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = RemObjects_Core_D7.bpl RemObjects_IDE_D7.bpl \
+ RemObjects_WebBroker_D7.bpl RemObjects_Indy_D7.bpl RemObjects_RODX_D7.bpl \
+ RemObjects_BPDX_D7.bpl RemObjects_DataSnap_D7.bpl RemObjects_Synapse_D7.bpl
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+RemObjects_Core_D7.bpl: RemObjects_Core_D7.dpk
+ $(DCC)
+
+RemObjects_IDE_D7.bpl: IDE\RemObjects_IDE_D7.dpk
+ $(DCC)
+
+RemObjects_Indy_D7.bpl: RemObjects_Indy_D7.dpk
+ $(DCC)
+
+RemObjects_BPDX_D7.bpl: RemObjects_BPDX_D7.dpk
+ $(DCC)
+
+RemObjects_DataSnap_D7.bpl: DataSnap\RemObjects_DataSnap_D7.dpk
+ $(DCC)
+
+RemObjects_RODX_D7.bpl: rodx\RemObjects_RODX_D7.dpk
+ $(DCC)
+
+RemObjects_Synapse_D7.bpl: RemObjects_Synapse_D7.dpk
+ $(DCC)
+
+RemObjects_WebBroker_D7.bpl: RemObjects_WebBroker_D7.dpk
+ $(DCC)
+
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen/uRODLGenTools.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen/uRODLGenTools.pas
new file mode 100644
index 0000000..0d82946
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen/uRODLGenTools.pas
@@ -0,0 +1,539 @@
+unit uRODLGenTools;
+
+{----------------------------------------------------------------------------}
+{ RemObjects SDK Library - CodeGen }
+{ }
+{ compiler: Delphi 5 and up, Kylix 2 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the RemObjects SDK }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$IFDEF LINUX}
+{$I ../RemObjects.inc}
+{$ELSE}
+{$I ..\RemObjects.inc}
+{$ENDIF LINUX}
+
+
+interface
+
+uses Classes, uRODL, uRORemoteDataModule;
+
+const IntfInvkNotice =
+ '{----------------------------------------------------------------------------}'+#13#10+
+ '{ This unit was automatically generated by the RemObjects SDK after reading }'+#13#10+
+ '{ the RODL file associated with this project . }'+#13#10+
+ '{ }'+#13#10+
+ '{ Do not modify this unit manually, or your changes will be lost when this }'+#13#10+
+ '{ unit is regenerated the next time you compile the project. }'+#13#10+
+ '{----------------------------------------------------------------------------}';
+
+ ImplNotice =
+ '{----------------------------------------------------------------------------}'+#13#10+
+ '{ This unit was automatically generated by the RemObjects SDK after reading }'+#13#10+
+ '{ the RODL file associated with this project . }'+#13#10+
+ '{ }'+#13#10+
+ '{ This is where you are supposed to code the implementation of your objects. }'+#13#10+
+ '{----------------------------------------------------------------------------}';
+
+ IntfInvkNoticeCSharp =
+ '//---------------------------------------------------------------------------'+#13+
+ '// This source file was automatically generated by the RemObjects SDK after '+#13+
+ '// reading the RODL file associated with this project. '+#13+
+ '// '+#13+
+ '// Do not modify this file manually, or your changes will be lost when this '+#13+
+ '// source file is regenerated the next time you compile the project. '+#13+
+ '//---------------------------------------------------------------------------';
+
+ ImplNoticeCSharp =
+ '//---------------------------------------------------------------------------'+#13+
+ '// This source file was automatically generated by the RemObjects SDK after '+#13+
+ '// reading the RODL file associated with this project. '+#13+
+ '// '+#13+
+ '// This is where you are supposed to code the implementation of your objects.'+#13+
+ '//---------------------------------------------------------------------------';
+
+ DelphiFlagNames : array[TRODLParamFlag] of string = (
+ 'const', 'out', 'var', 'result');
+
+ CSharpFlagNames : array[TRODLParamFlag] of string = (
+ '', 'out ', 'ref ', 'result');
+
+ DelphiAsyncInvokeFlagNames : array[TRODLParamFlag] of string = (
+ 'const', '[out]', 'const', '[result]');
+
+ DelphiAsyncRetrieveFlagNames : array[TRODLParamFlag] of string = (
+ '[const]', 'out', 'out', 'result');
+
+type
+ PRODataModuleClass = ^TRODataModuleClass;
+ TRODataModuleClass = record
+ ClassType : TRORemoteDataModuleClass;
+ Alias,
+ Description,
+ RequiredUnits : string;
+ end;
+
+// Code generation helpers
+function GetOperationDefinition(
+ const anOperation : TRODLOperation;
+ const aClassName : string = '';
+ const aSuffix : string = '';
+ AddSenderGUID : boolean = FALSE) : string;
+
+function DataTypeToCSharpType(const iType:string; iLibrary:TRODLLibrary=nil; iForNew:boolean=false):string;
+function DataTypeToDelphiDotNetType(const iType:string; iLibrary:TRODLLibrary=nil; iForNew:boolean=false):string;
+
+
+function GetOperationDefinitionCSharp(
+ const anOperation : TRODLOperation;
+ aForInterface:boolean;
+ const aSuffix : string = ''; aLibrary: TRODLLibrary= nil) : string;
+
+function GetOperationDefinitionDelphiForDotNet(const anOperation : TRODLOperation; aLibrary:TRODLLibrary; const aClassName : string = ''; const aSuffix : string = '') : string;
+
+function GetAsyncInvokeOperationDefinition(
+ const anOperation : TRODLOperation;
+ const aClassName : string = '';
+ const aSuffix : string = '') : string;
+
+function GetAsyncRetrieveOperationDefinition(
+ const anOperation : TRODLOperation;
+ const aClassName : string = '';
+ const aSuffix : string = '') : string;
+function NeedsAsyncRetrieveOperationDefinition(anOperation:TRODLOperation):boolean;
+
+function MessageWrite(const iType, iRodlType, iName, iVariable:string):string;
+function MessageRead(const iType, iRodlType, iName:string):string;
+function TypeToReadWriteFn(const iType:string):string;
+
+procedure GetTypeNames(const aLibrary : TRODLLibrary; aResult : TStrings);
+function TypeByName(const aLibrary : TRODLLibrary; const aTypeName : string) : TRODLEntity;
+
+// TRORemoteDatamodule registration
+procedure RegisterRODataModuleClass(aClass : TRORemoteDataModuleClass; const anAlias, aDescription, someRequiredUnits : string);
+function GetRODataModuleClass(Index : integer) : TRODataModuleClass;
+function GetRODataModuleClassCount : integer;
+
+implementation
+
+uses {$IFNDEF LINUX}Windows,{$ENDIF} SysUtils, uRORes, uROTypes, uRODLToPascalIntf;
+
+var _datamodules : TStringList;
+
+const
+ MAX_PARAM_LENGTH = 100;
+
+// Code generation helpers
+function GetOperationDefinition(const anOperation : TRODLOperation;
+ const aClassName : string = ''; const aSuffix : string = '';
+ AddSenderGUID : boolean = FALSE) : string;
+var x : integer;
+ lPars, lPars2, s : string;
+ lFillStr: string;
+begin
+ if not Assigned(anOperation.Result) then s := 'procedure ' else s := 'function ';
+
+ if aClassName<>''
+ then s := s+aClassName+'.'+anOperation.Name
+ else s := s+anOperation.Name;
+
+ if aSuffix<>''
+ then s := s+aSuffix;
+
+ if aClassName = '' then
+ SetLength(lFillStr,Length(s)+4+1) { Interface section }
+ else
+ SetLength(lFillStr,Length(s)+1); { Implementation section }
+ FillChar(lFillStr[1],Length(lFillStr),#32);
+
+ with anOperation do begin
+ lPars := '';
+ lPars2 := '';
+
+ if (Count>0) then begin
+ for x := 0 to (Count-1) do begin
+ with Items[x] do begin
+ if (Flag <> fResult) then begin
+ if Length(lPars2) > MAX_PARAM_LENGTH then begin
+ lPars := lPars+lPars2+#13#10+lFillStr;
+ lPars2 := '';
+ end;
+ lPars2 := lPars2+Format('%s %s: %s; ', [DelphiFlagNames[Flag], Name, GetDataType(DataType)]);
+ end;
+ end;
+ end;
+ lPars := lPars+lPars2;
+ end;
+
+ if AddSenderGUID then begin
+ lPars2 := 'const __Sender : TGUID';
+ if (lPars<>'') then lPars2 := lPars2+'; ';
+
+ lPars := lPars2+lPars;
+ end;
+
+ if (lPars<>'') then begin
+ if Count>0
+ then s := s+'('+Copy(lPars,1,Length(lPars)-2)+')'
+ else s := s+'('+Copy(lPars,1,Length(lPars))+')'
+ end;
+ end;
+
+ if Assigned(anOperation.Result) then s := s+': '+GetDataType(anOperation.Result.DataType);
+ s := s+';';
+
+ result := s;
+end;
+
+function DataTypeToCSharpType(const iType:string; iLibrary:TRODLLibrary=nil; iForNew:boolean=false):string;
+var
+ lType,lElementType:string;
+begin
+ lType := iType;
+ if CompareText(iType,'Integer') = 0 then begin
+ Result := 'Int32';
+ end
+ else if CompareText(iType,'WideString') = 0 then begin
+ Result := 'String';
+ end
+ else if CompareText(iType,'DateTime') = 0 then begin
+ Result := 'DateTime'; //make sure casing is good
+ end
+ else if CompareText(iType,'Xml') = 0 then begin
+ Result := 'XmlNode';
+ end
+ else if Assigned(iLibrary) and IsArray(lType,ilibrary,lElementType) then begin
+ if iForNew then
+ Result := DataTypeToCSharpType(lElementType,iLibrary)+'[0]'
+ else
+ Result := DataTypeToCSharpType(lElementType,iLibrary)+'[]';
+ end
+ else if Assigned(iLibrary) then begin
+ if IsUserDefinedType(lType,iLibrary) then begin
+ result := lType; // IsUserDefinedType() fixed the casing
+ end
+ else begin
+ Result := LowerCase(iType);
+ if Length(Result) > 0 then Result[1] := UpCase(Result[1]);
+ end;
+ end
+ else begin
+ Result := iType;
+ end;
+ if iForNew and (Pos('[0]',result) = 0) then result := result+'()';
+end;
+
+function DataTypeToDelphiDotNetType(const iType:string; iLibrary:TRODLLibrary=nil; iForNew:boolean=false):string;
+var
+ lType:string;
+begin
+ lType := iType;
+ if CompareText(iType, 'Xml') = 0 then
+ result := 'XmlNode'
+ else
+ if CompareText(iType,'WideString') = 0 then begin
+ Result := 'String';
+ end
+ else if Assigned(iLibrary) then begin
+ if IsUserDefinedType(lType,iLibrary) then begin
+ result := lType; // IsUserDefinedType() fixed the casing
+ end
+ else begin
+ Result := LowerCase(iType);
+ if Length(Result) > 0 then Result[1] := UpCase(Result[1]);
+ end;
+ end
+ else begin
+ Result := iType;
+ end;
+ //if iForNew and (Pos('[0]',result) = 0) then result := result+'()';
+end;
+
+function GetOperationDefinitionCSharp(const anOperation : TRODLOperation; aForInterface:Boolean; const aSuffix : string = ''; aLibrary: TRODLLibrary = nil) : string;
+var x : integer;
+ pars, s : string;
+begin
+ if not Assigned(anOperation.Result) then s := 'void ' else s := DataTypeToCSharpType(anOperation.Result.DataType,aLibrary)+' ';
+ if not aForInterface then s := 'public '+s;
+
+ {if aClassName<>''
+ then s := s+aClassName+'.'+anOperation.Name
+ else}
+ s := s+anOperation.Name;
+
+ {if aSuffix<>''
+ then s := s+aSuffix;}
+
+ with anOperation do
+ if (Count>0) then begin
+ pars := '';
+
+ for x := 0 to (Count-1) do begin
+ with Items[x] do begin
+ if (Flag<>fresult)
+ then pars :=pars+Format('%s%s %s, ', [CSharpFlagNames[Flag], DataTypeToCSharpType(DataType,aLibrary), Name]);
+ end;
+ end;
+
+ if (pars<>'') then
+ s := s+'('+Copy(pars,1,Length(pars)-2)+')'
+ else
+ s := s+'()';
+ end
+ else
+ s := s+'()';
+
+ //if Assigned(anOperation.Result) then s := s+': '+anOperation.Result.DataType;
+ //s := s+';';
+ if aForInterface then s := s+';';
+
+ result := s;
+end;
+
+function GetOperationDefinitionDelphiForDotNet(const anOperation : TRODLOperation; aLibrary:TRODLLibrary; const aClassName : string = ''; const aSuffix : string = '') : string;
+var x : integer;
+ pars, s : string;
+begin
+ if not Assigned(anOperation.Result) then s := 'procedure ' else s := 'function ';
+
+ if aClassName<>''
+ then s := s+aClassName+'.'+anOperation.Name
+ else s := s+anOperation.Name;
+
+ if aSuffix<>''
+ then s := s+aSuffix;
+
+ with anOperation do
+ if (Count>0) then begin
+ pars := '';
+
+ for x := 0 to (Count-1) do begin
+ with Items[x] do begin
+ if (Flag<>fresult)
+ then pars :=pars+Format('%s %s: %s; ', [DelphiFlagNames[Flag], Name, DataTypeToCSharpType(DataType)]);
+ end;
+ end;
+
+ if (pars<>'') then s := s+'('+Copy(pars,1,Length(pars)-2)+')';
+ end;
+
+ if Assigned(anOperation.Result) then s := s+': '+DataTypeToCSharpType(anOperation.Result.DataType);
+ s := s+';';
+
+ result := s;
+end;
+
+
+function GetAsyncInvokeOperationDefinition(
+ const anOperation : TRODLOperation;
+ const aClassName : string = '';
+ const aSuffix : string = '') : string;
+var x : integer;
+ pars, s : string;
+begin
+ s := 'procedure ';
+
+ if aClassName<>''
+ then s := s+aClassName+'.'+'Invoke_'+anOperation.Name
+ else s := s+'Invoke_'+anOperation.Name;
+
+ if aSuffix<>''
+ then s := s+aSuffix;
+
+ with anOperation do
+ if (Count>0) then begin
+ pars := '';
+
+ for x := 0 to (Count-1) do begin
+ with Items[x] do begin
+ if not (Flag in [fOut,fResult]) then
+ pars :=pars+Format('%s %s: %s; ', [DelphiAsyncInvokeFlagNames[Flag], Name, GetDataType(DataType)]);
+ end;
+ end;
+
+ if (pars<>'') then s := s+'('+Copy(pars,1,Length(pars)-2)+')';
+ end;
+
+ //if Assigned(anOperation.Result) then s := s+': '+anOperation.Result.DataType;
+ s := s+';';
+
+ result := s;
+end;
+
+function NeedsAsyncRetrieveOperationDefinition(anOperation:TRODLOperation):boolean;
+var
+ i:integer;
+begin
+ result := Assigned(anOperation.Result) or (anOperation.ForceAsyncResponse);
+ if not result then
+ for i := 0 to anOperation.Count-1 do with anOperation.Items[i] do
+ if (Flag <> fIn) then result := true;
+end;
+
+function GetAsyncRetrieveOperationDefinition(
+ const anOperation : TRODLOperation;
+ const aClassName : string = '';
+ const aSuffix : string = '') : string;
+var x : integer;
+ pars, s : string;
+begin
+ if not Assigned(anOperation.Result) then s := 'procedure ' else s := 'function ';
+
+ if aClassName<>''
+ then s := s+aClassName+'.'+'Retrieve_'+anOperation.Name
+ else s := s+'Retrieve_'+anOperation.Name;
+
+ if aSuffix<>''
+ then s := s+aSuffix;
+
+ with anOperation do
+ if (Count>0) then begin
+ pars := '';
+
+ for x := 0 to (Count-1) do begin
+ with Items[x] do begin
+ if not (Flag in [fIn,fResult]) then
+ pars :=pars+Format('%s %s: %s; ', [DelphiAsyncRetrieveFlagNames[Flag], Name, GetDataType(DataType)]);
+ end;
+ end;
+
+ if (pars<>'') then s := s+'('+Copy(pars,1,Length(pars)-2)+')';
+ end;
+
+ if Assigned(anOperation.Result) then s := s+': '+GetDataType(anOperation.Result.DataType);
+ s := s+';';
+
+ result := s;
+end;
+
+function TypeToReadWriteFn(const iType:string):string;
+begin
+ if SameText(iType,'Integer') then begin
+ result := 'Int32';
+ end
+ else if SameText(iType,'Boolean') then begin
+ result := 'Boolean';
+ end
+ else if SameText(iType,'WideString') then begin
+ result := 'WideString';
+ end
+ else if SameText(iType,'AnsiString') then begin
+ result := 'AnsiString';
+ end
+ {else if (iType = 'Binary') or (iType = 'Array') then begin
+ Result := 'ISerializable';
+ end}
+ else begin
+ Result := '';
+ end;
+end;
+
+function MessageWrite(const iType, iRodlType, iName, iVariable:string):string;
+var lWriteFn: string;
+begin
+ lWriteFn := TypeToReadWriteFn(iRodlType);
+ if lWriteFn <> '' then begin
+ Result := Format('%s("%s", %s);',
+ [lWriteFn, iName, iVariable]);
+ end
+ else begin
+ Result := Format('("%s", %s, typeof(%s));', //typeof(%s),
+ [iName, iVariable, iType]); //iType,
+ end;
+end;
+
+function MessageRead(const iType, iRodlType, iName:string):string;
+var lWriteFn: string;
+begin
+ lWriteFn := TypeToReadWriteFn(iRodlType);
+ if lWriteFn <> '' then begin
+ Result := Format('__Message.Read%s("%s");',
+ [lWriteFn, iName]);
+ end
+ else begin
+ Result := Format('(%s)__Message.Read("%s", typeof(%s));',
+ [iType, iName, iType]);
+ end;
+end;
+
+procedure GetTypeNames(const aLibrary : TRODLLibrary; aResult : TStrings);
+var i : integer;
+begin
+ with aLibrary do begin
+ for i := 0 to StructCount-1 do
+ aResult.AddObject(Structs[i].Name, pointer(Structs[i]));
+
+ for i := 0 to EnumCount-1 do
+ aResult.AddObject(Enums[i].Name, pointer(Enums[i]));
+
+ for i := 0 to ArrayCount-1 do
+ aResult.AddObject(Arrays[i].Name, pointer(Arrays[i]));
+ end;
+end;
+
+function TypeByName(const aLibrary : TRODLLibrary; const aTypeName : string) : TRODLEntity;
+var i : integer;
+begin
+ result := NIL;
+
+ with aLibrary do begin
+ for i := 0 to (Count-1) do
+ if (CompareText(Items[i].Name, aTypeName)=0) then begin
+ result := Items[i];
+ Exit;
+ end;
+ end;
+end;
+
+// TRORemoteDatamodule registration
+procedure RegisterRODataModuleClass(aClass : TRORemoteDataModuleClass; const anAlias, aDescription, someRequiredUnits : string);
+var idx : integer;
+ item : PRODataModuleClass;
+begin
+ idx := _datamodules.IndexOf(aClass.ClassName);
+ if (idx>=0) then begin
+ Dispose(PRODataModuleClass(_datamodules.Objects[idx]));
+ _datamodules.Delete(idx);
+ end;
+
+ New(item);
+ item.ClassType := aClass;
+ item.Alias := anAlias;
+ item.Description := aDescription;
+ item.RequiredUnits := someRequiredUnits;
+
+ _datamodules.AddObject(aClass.ClassName, TObject(item));
+end;
+
+function GetRODataModuleClass(Index : integer) : TRODataModuleClass;
+begin
+ result := PRODataModuleClass(_datamodules.Objects[Index])^
+end;
+
+function GetRODataModuleClassCount : integer;
+begin
+ result := _datamodules.Count
+end;
+
+procedure DisposeModuleClasses;
+var i : integer;
+begin
+ for i := 0 to (_datamodules.Count-1) do
+ Dispose(PRODataModuleClass(_datamodules.Objects[i]));
+end;
+
+initialization
+ _datamodules := TStringList.Create;
+ {_datamodules.Duplicates := dupError;}
+ _datamodules.Sorted := TRUE;
+
+finalization
+ DisposeModuleClasses();
+ FreeAndNIL(_datamodules);
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen/uRODLToPascal.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen/uRODLToPascal.pas
new file mode 100644
index 0000000..6ddeb88
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen/uRODLToPascal.pas
@@ -0,0 +1,13 @@
+unit uRODLToPascal;
+
+interface
+
+const PASCAL_INDENTATION_LEVEL_1 = 2;
+ PASCAL_INDENTATION_LEVEL_2 = 4;
+ PASCAL_INDENTATION_LEVEL_3 = 6;
+ PASCAL_INDENTATION_LEVEL_4 = 8;
+
+implementation
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen/uRODLToPascalAsync.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen/uRODLToPascalAsync.pas
new file mode 100644
index 0000000..efeb161
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen/uRODLToPascalAsync.pas
@@ -0,0 +1,370 @@
+unit uRODLToPascalAsync;
+
+{----------------------------------------------------------------------------}
+{ RemObjects SDK Library - CodeGen }
+{ }
+{ compiler: Delphi 5 and up, Kylix 2 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the RemObjects SDK }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$IFDEF LINUX}
+{$I ../RemObjects.inc}
+{$ELSE}
+{$I ..\RemObjects.inc}
+{$ENDIF LINUX}
+
+interface
+
+uses uRODL;
+
+type { TRODLToPascalAsync }
+ TRODLToPascalAsync = class(TRODLConverter)
+ private
+ procedure WriteServiceDeclarationInterface(aService: TRODLService);
+ procedure WriteServiceDeclarationProxy(aService: TRODLService);
+ procedure WriteServiceDeclarationCoClass(aService: TRODLService);
+ procedure WriteCoClass(aLibrary : TRODLLibrary; aService: TRODLService);
+
+// function IsSOAPService(aService : TRODLService) : boolean;
+ protected
+ procedure IntConvert(const aLibrary : TRODLLibrary; const aTargetEntity : string = ''); override;
+
+ public
+ class function GetTargetFileName(const aLibrary : TRODLLibrary; const aTargetEntity : string = ''): string; override;
+
+ end;
+
+implementation
+
+uses SysUtils, Classes, Dialogs, uROTypes,
+ {$IFDEF DELPHI5}
+ ComObj,
+ {$ENDIF}
+ uRODLGenTools, uRODLToPascal, uRODLToPascalIntf, uROClasses;
+
+{ TRODLToPascalAsync }
+
+procedure TRODLToPascalAsync.IntConvert(const aLibrary: TRODLLibrary; const aTargetEntity: string);
+var {x,} i : integer;
+ s : string;
+ lServices: IROStrings;
+begin
+ try
+ Write(Format('unit %s;', [ChangeFileExt(GetTargetFileName(aLibrary), '')]));
+ WriteEmptyLine;
+
+ WriteLines(IntfInvkNotice);
+ WriteEmptyLine;
+
+ write('{$I Remobjects.inc}');
+ WriteEmptyLine;
+
+ Write('interface');
+ WriteEmptyLine;
+
+ Write('uses');
+ Write('{vcl:} Classes, TypInfo,',PASCAL_INDENTATION_LEVEL_1);
+ Write('{RemObjects:} uROXMLIntf, uROClasses, uROTypes, uROClientIntf, uROAsync,',PASCAL_INDENTATION_LEVEL_1);
+
+ if aLibrary.UseCount > 0 then begin
+ s := '';
+ for i := 0 to aLibrary.UseCount-1 do begin
+ if s <> '' then s := s+', ';
+ if aLibrary.Use[i].LoadedRodlLibraryName <> '' then
+ s := s+aLibrary.Use[i].LoadedRodlLibraryName+'_Intf, '
+ +aLibrary.Use[i].LoadedRodlLibraryName+'_Async'
+ else
+ s := s+ChangeFileExt(ExtractFilename(aLibrary.Use[i].RodlFile),'')+'_Intf, '
+ +ChangeFileExt(ExtractFilename(aLibrary.Use[i].RodlFile),'')+'_Async';
+ end; { for }
+ s := s+',';
+
+ Write('{Used RODLs:} '+s,PASCAL_INDENTATION_LEVEL_1);
+ end;
+
+ Write('{Project:} '+ChangeFileExt(TRODLToIntf.GetTargetFileName(aLibrary),'')+';',PASCAL_INDENTATION_LEVEL_1);
+ lServices := aLibrary.CalcServiceOrder;
+ WriteEmptyLine;
+ if aLibrary.ServiceCount > 0 then
+ begin
+ Write('type');
+ (*
+ for i := 0 to (aLibrary.ServiceCount-1) do begin
+ if not aLibrary.Services[i].IsFromUsedRodl then
+ Write(Format('I%s_Async = interface;', [aLibrary.Services[i].Name]), PASCAL_INDENTATION_LEVEL_1);
+ end;
+
+ for i := 0 to (aLibrary.ServiceCount-1) do begin
+ if not aLibrary.Services[i].IsFromUsedRodl then
+ Write(Format('Co%s_Async = class;', [aLibrary.Services[i].Name]), PASCAL_INDENTATION_LEVEL_1);
+ end;
+
+ for i := 0 to (aLibrary.ServiceCount-1) do begin
+ if not aLibrary.Services[i].IsFromUsedRodl then
+ Write(Format('T%s_AsyncProxy = class;', [aLibrary.Services[i].Name]),PASCAL_INDENTATION_LEVEL_1);
+ end; *)
+
+ for i := 0 to lServices.Count -1 do begin
+ if not TRODLService(lServices.Objects[i]).IsFromUsedRodl then
+ WriteServiceDeclarationInterface(TRODLService(lServices.Objects[i]));
+ end;
+
+ for i := 0 to lServices.Count -1 do begin
+ if not TRODLService(lServices.Objects[i]).IsFromUsedRodl then
+ WriteServiceDeclarationCoClass(TRODLService(lServices.Objects[i]));
+ end;
+
+ for i := 0 to lServices.Count -1 do begin
+ if not TRODLService(lServices.Objects[i]).IsFromUsedRodl then
+ WriteServiceDeclarationProxy(TRODLService(lServices.Objects[i]));
+ end;
+ end;
+
+ //WriteEmptyLine;
+
+ Write('implementation');
+ WriteEmptyLine;
+
+ Write('uses');
+ Write('{vcl:} SysUtils;',PASCAL_INDENTATION_LEVEL_1);
+ WriteEmptyLine;
+
+ for i := 0 to (aLibrary.ServiceCount-1) do
+ WriteCoClass(aLibrary, aLibrary.Services[i]);
+
+ Write('initialization');
+ {for i := 0 to (aLibrary.Count-1) do
+ if (aLibrary.Items[i] is TRODLArray) or (aLibrary.Items[i] is TRODLStruct)
+ then Write(' RegisterROClass('+aLibrary.Items[i].Name+');');}
+
+ //WriteEmptyLine;
+
+ {Write('finalization');
+ for i := 0 to (aLibrary.Count-1) do
+ if (aLibrary.Items[i] is TRODLArray) or (aLibrary.Items[i] is TRODLStruct)
+ then Write(' UnRegisterClass('+aLibrary.Items[i].Name+');');
+
+ WriteEmptyLine;}
+
+ Write('end.');
+
+ finally
+ end;
+end;
+
+class function TRODLToPascalAsync.GetTargetFileName(const aLibrary: TRODLLibrary;
+ const aTargetEntity: string): string;
+begin
+ try
+ result := aLibrary.Name+'_Async.pas'
+ except
+ result := 'Unknown.pas';
+ end;
+end;
+
+const
+ InnerIndent = 4;
+
+procedure TRODLToPascalAsync.WriteCoClass(aLibrary : TRODLLibrary; aService: TRODLService);
+var i, p : integer;
+ sa : string;
+// soapsvc : boolean;
+begin
+ if not aService.IsFromUsedRodl then with aService.Default do begin
+// soapsvc := IsSOAPService(aService);
+
+ Write('{ Co'+aService.Name+' }');
+ WriteEmptyLine;
+
+ Write(Format('class function Co%s_Async.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): I%s_Async;',
+ [aService.Name, aService.Name]));
+ Write('begin');
+ Write(Format(' result := T%s_AsyncProxy.Create(aMessage, aTransportChannel);', [aService.Name]));
+ Write('end;');
+ WriteEmptyLine;
+
+ if Count > 0 then begin
+ Write(Format('{ T%s_AsyncProxy }', [aService.Name]));
+ WriteEmptyLine;
+ end;
+
+ Write(Format('function T%s_AsyncProxy.__GetInterfaceName:string;',[aService.Name]));
+ Write('begin');
+ Write(Format(' result := ''%s'';',[aService.Name]));
+ Write('end;');
+ WriteEmptyLine;
+
+ for i := 0 to (Count-1) do begin
+ Write(GetAsyncInvokeOperationDefinition(Items[i], Format('T%s_AsyncProxy', [aService.Name])));
+// Write('var __request:TStream;');
+// if soapsvc then Write('var __http : IROHTTPTransport;');
+ Write('begin');
+ Write(Format('__AssertProxyNotBusy(''%s'');',[Items[i].Name]),PASCAL_INDENTATION_LEVEL_1);
+// Write('__request := TMemoryStream.Create;',PASCAL_INDENTATION_LEVEL_1);
+ //Write('__response := TMemoryStream.Create;',PASCAL_INDENTATION_LEVEL_1);
+ WriteEmptyLine;
+ sa := GetAttributes(Items[i].Info.Attributes, aService.Info.Attributes, aLibrary.Info.Attributes, InnerIndent);
+ if sa <> '' then
+ Write('__Message.SetAttributes(__TransportChannel, '+sa+');', InnerIndent);
+
+
+ Write(Format('__Message.InitializeRequestMessage(__TransportChannel, ''%s'', __InterfaceName, ''%s'');', [aLibrary.Name, Items[i].Name]), PASCAL_INDENTATION_LEVEL_1);
+
+ with Items[i] do begin
+ for p := 0 to (Count-1) do
+ if IsInputFlag(Items[p].Flag) then begin
+ if (StrToDataType(Items[p].DataType)=rtDateTime)
+ then sa := '[paIsDateTime]'
+ else sa := '[]';
+
+ Write(Format('__Message.Write(''%s'', TypeInfo(%s), %s, %s);',
+ [Items[p].Name, GetDataType(Items[p].DataType), Items[p].Name, sa]), PASCAL_INDENTATION_LEVEL_1);
+ end;
+ end;
+// Write('__Message.Finalize;',PASCAL_INDENTATION_LEVEL_1);
+// WriteEmptyLine;
+
+// Write('__Message.WriteToStream(__request);',PASCAL_INDENTATION_LEVEL_1);
+ if NeedsAsyncRetrieveOperationDefinition(Items[i]) then begin
+ Write(Format('__DispatchAsyncRequest(''%s'',__Message);',[Items[i].Name]),PASCAL_INDENTATION_LEVEL_1);
+ end
+ else begin
+ Write(Format('__DispatchAsyncRequest(''%s'',__Message, false);',[Items[i].Name]),PASCAL_INDENTATION_LEVEL_1);
+ end;
+ if sa <> '' then
+ Write(' __Message.UnsetAttributes(__TransportChannel);');
+ Write('end;');
+ WriteEmptyLine;
+
+ if NeedsAsyncRetrieveOperationDefinition(Items[i]) then begin
+ Write(GetAsyncRetrieveOperationDefinition(Items[i], Format('T%s_AsyncProxy', [aService.Name])));
+ Write('var __response:TStream;');
+ Write('begin');
+
+ with Items[i] do begin
+ for p := 0 to (Count-1) do
+ if (Items[p].Flag in [fInOut,fOut]) and IsImplementedAsClass(Items[p].DataType, aLibrary) then
+ Write(Format('%s := nil;', [Items[p].Name]),PASCAL_INDENTATION_LEVEL_1);
+ if Assigned(Result) and IsImplementedAsClass(Result.DataType, aLibrary) then
+ Write('result := nil;', PASCAL_INDENTATION_LEVEL_1);
+ end;
+ Write(Format('__response := __RetrieveAsyncResponse(''%s'');',[Items[i].Name]),PASCAL_INDENTATION_LEVEL_1);
+ //Write('__TransportChannel.Dispatch(__request, __response);',PASCAL_INDENTATION_LEVEL_1);
+ Write('__Message.ReadFromStream(__response);',PASCAL_INDENTATION_LEVEL_1);
+ WriteEmptyLine;
+
+ //Write(Format('Message.Initialize(''I%s'', ''%s'');', [aService.Name, Items[i].Name]), PASCAL_INDENTATION_LEVEL_1);
+ with Items[i] do begin
+
+ if Assigned(Result) then begin
+ if (StrToDataType(Result.DataType)=rtDateTime) then sa := '[paIsDateTime]' else sa := '[]';
+ Write(Format('__Message.Read(''%s'', TypeInfo(%s), Result, %s);',
+ [Result.Name, GetDataType(Result.DataType), sa]),PASCAL_INDENTATION_LEVEL_1);
+ end;
+ for p := 0 to (Count-1) do
+ if IsOutputFlag(Items[p].Flag) then begin
+
+ if (StrToDataType(Items[p].DataType)=rtDateTime) then sa := '[paIsDateTime]' else sa := '[]';
+ Write(Format('__Message.Read(''%s'', TypeInfo(%s), %s, %s);',
+ [Items[p].Name, GetDataType(Items[p].DataType), Items[p].Name, sa]),PASCAL_INDENTATION_LEVEL_1);
+ end;
+ end;
+ //Write('Message.Finalize;',5);
+
+ //Write('__request.Free;',PASCAL_INDENTATION_LEVEL_1);
+ WriteEmptyLine;
+ Write('__response.Free();',PASCAL_INDENTATION_LEVEL_1);
+ Write('end;');
+ WriteEmptyLine;
+ end;
+ end;
+
+ WriteEmptyLine;
+ end;
+end;
+{
+function TRODLToPascalAsync.IsSOAPService(aService: TRODLService): boolean;
+begin
+ result := aService.Attributes.Values['Type'] = 'SOAP';
+end;
+}
+
+
+
+
+procedure TRODLToPascalAsync.WriteServiceDeclarationCoClass(
+ aService: TRODLService);
+ //lOperation:TRODLOperation;
+begin
+ if not aService.IsFromUsedRodl then with aService.Default do begin
+ Write(Format('{ Co%s_Async }', [aService.Name]), PASCAL_INDENTATION_LEVEL_1);
+ Write(Format('Co%s_Async = class', [aService.Name]), PASCAL_INDENTATION_LEVEL_1);
+ Write(Format('class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): I%s_Async;',
+ [aService.Name]), PASCAL_INDENTATION_LEVEL_2);
+ Write('end;', PASCAL_INDENTATION_LEVEL_1);
+ WriteEmptyLine;
+ end;
+end;
+
+procedure TRODLToPascalAsync.WriteServiceDeclarationInterface(
+ aService: TRODLService);
+var i:integer;
+ //lOperation:TRODLOperation;
+begin
+ if not aService.IsFromUsedRodl then with aService.Default do begin
+
+ Write(Format('{ I%s_Async }', [aService.Name]), PASCAL_INDENTATION_LEVEL_1);
+ if aService.Ancestor <> '' then begin
+ Write(Format('I%s_Async = interface(I%s_Async)', [aService.Name,aService.Ancestor]), PASCAL_INDENTATION_LEVEL_1);
+ end
+ else begin
+ Write(Format('I%s_Async = interface(IROAsyncInterface)', [aService.Name]), PASCAL_INDENTATION_LEVEL_1);
+ end;
+ Write(Format('[''%s'']', [NewGuidAsString()]), PASCAL_INDENTATION_LEVEL_2);
+
+ for i := 0 to (Count-1) do
+ Write(GetAsyncInvokeOperationDefinition(Items[i]), PASCAL_INDENTATION_LEVEL_2);
+ for i := 0 to (Count-1) do
+ if NeedsAsyncRetrieveOperationDefinition(Items[i]) then
+ Write(GetAsyncRetrieveOperationDefinition(Items[i]), PASCAL_INDENTATION_LEVEL_2);
+
+ Write('end;', PASCAL_INDENTATION_LEVEL_1);
+ WriteEmptyLine;
+ end;
+end;
+
+procedure TRODLToPascalAsync.WriteServiceDeclarationProxy(
+ aService: TRODLService);
+var i:integer;
+ //lOperation:TRODLOperation;
+begin
+ if not aService.IsFromUsedRodl then with aService.Default do begin
+ Write(Format('{ T%s_AsyncProxy }', [aService.Name]), PASCAL_INDENTATION_LEVEL_1);
+ if aService.Ancestor <> '' then begin
+ Write(Format('T%s_AsyncProxy = class(T%s_AsyncProxy, I%s_Async)', [aService.Name, aService.Ancestor, aService.Name]),PASCAL_INDENTATION_LEVEL_1);
+ end
+ else begin
+ Write(Format('T%s_AsyncProxy = class(TROAsyncProxy, I%s_Async)', [aService.Name, aService.Name]),PASCAL_INDENTATION_LEVEL_1);
+ end;
+ Write('private',PASCAL_INDENTATION_LEVEL_1);
+ Write('protected',PASCAL_INDENTATION_LEVEL_1);
+ Write(' function __GetInterfaceName:string; override;',PASCAL_INDENTATION_LEVEL_1);
+ WriteEmptyLine;
+
+ for i := 0 to (Count-1) do
+ Write(GetAsyncInvokeOperationDefinition(Items[i]), PASCAL_INDENTATION_LEVEL_2);
+ for i := 0 to (Count-1) do
+ if NeedsAsyncRetrieveOperationDefinition(Items[i]) then
+ Write(GetAsyncRetrieveOperationDefinition(Items[i]), PASCAL_INDENTATION_LEVEL_2);
+
+ Write('end;',PASCAL_INDENTATION_LEVEL_1);
+ WriteEmptyLine;
+ end;
+end;
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen/uRODLToPascalImpl.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen/uRODLToPascalImpl.pas
new file mode 100644
index 0000000..37b9c51
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen/uRODLToPascalImpl.pas
@@ -0,0 +1,349 @@
+unit uRODLToPascalImpl;
+
+{----------------------------------------------------------------------------}
+{ RemObjects SDK Library - CodeGen }
+{ }
+{ compiler: Delphi 5 and up, Kylix 2 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the RemObjects SDK }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$IFDEF LINUX}
+{$I ../RemObjects.inc}
+{$ELSE}
+{$I ..\RemObjects.inc}
+{$ENDIF LINUX}
+
+interface
+
+uses uRODL;
+
+type { TRODLToImpl }
+ TRODLToImpl = class(TRODLConverter)
+ private
+ fService : TRODLService;
+ fAncestorService:TRODLService;
+ fServerClassName: string;
+ fRequiredUnits: string;
+
+ procedure WriteServiceDeclaration(const aService: TRODLService);
+ procedure WriteOperationImplementation(const anOperation : TRODLOperation);
+ procedure SetServerClassName(const Value: string);
+ function GetWriteDataModule: boolean;
+
+ protected
+ procedure IntConvert(const aLibrary : TRODLLIbrary; const aTargetEntity : string = ''); override;
+ function ValidateTargetEntity(const aLibrary : TRODLLIbrary; const aTargetEntity : string) : boolean; override;
+
+ public
+ class function GetTargetFileName(const aLibrary : TRODLLIbrary; const aTargetEntity : string = ''): string; override;
+
+ property WriteDataModule : boolean read GetWriteDataModule;
+ procedure WriteDFM(const aLibrary: TRODLLIbrary; const aTargetEntity: string; const aFilename: string);
+
+ property ServerClassName : string read fServerClassName write SetServerClassName;
+ property RequiredUnits : string read fRequiredUnits write fRequiredUnits;
+ end;
+
+implementation
+
+uses SysUtils, Dialogs, Classes,
+ {$IFDEF HYDRA_DESIGNTIME}
+ uROIDETools, uEWOTAHelpers,
+ {$ENDIF HYDRA_DESIGNTIME}
+ uRODLGenTools, uRODLToPascalInvk, uRODLToPascal, uROServer;
+
+function IsHydraModule : boolean;
+{$IFDEF HYDRA_DESIGNTIME}
+var
+ lSource: string;
+{$ENDIF HYDRA_DESIGNTIME}
+begin
+ result := FALSE;
+ {$IFDEF HYDRA_DESIGNTIME}
+ if (CurrentProject<>NIL) then begin
+ lSource := UpperCase(ReadModuleSource(CurrentProject));
+ result := Pos('{#HYDRAMODULE}', lSource)>0;
+ end;
+ {$ENDIF HYDRA_DESIGNTIME}
+end;
+
+{ TRODLToImpl }
+procedure TRODLToImpl.WriteDFM(const aLibrary: TRODLLIbrary; const aTargetEntity: string; const aFilename: string);
+var svc : TRODLService;
+begin
+ with TStringList.Create do try
+ svc := aLibrary.ItemByName(aTargetEntity) as TRODLService;
+
+ if (Trim(svc.Ancestor)='') then Add(Format('object %s: T%s', [aTargetEntity, aTargetEntity]))
+ else Add(Format('inherited %s: T%s', [aTargetEntity, aTargetEntity]));
+ Add(' OldCreateOrder = True');
+ Add(' Left = 200');
+ Add(' Top = 200');
+ Add(' Height = 300');
+ Add(' Width = 300');
+ Add('end');
+ finally
+ SaveToFile(aFilename);
+ Free;
+ end;
+end;
+
+procedure TRODLToImpl.IntConvert(const aLibrary: TRODLLIbrary; const aTargetEntity : string = '');
+var i : integer;
+ s, s2 : string;
+ lIsHydraModule : boolean;
+begin
+ if not Assigned(fService) or not Assigned(fService.Default) then exit;
+ if ServerClassName = '' then begin
+ ServerClassName := 'TRORemoteDataModule';
+ if (copy(RequiredUnits, Length(RequiredUnits), 1) <> ',') and (RequiredUnits <> '') then
+ RequiredUnits := RequiredUnits + ',';
+ RequiredUnits := RequiredUnits + 'uRORemoteDataModule';
+ end;
+
+ Write(Format('unit %s;', [ChangeFileExt(GetTargetFileName(aLibrary, TargetEntity), '')]));
+ WriteEmptyLine;
+
+ WriteLines(ImplNotice);
+ WriteEmptyLine;
+
+ write('{$I Remobjects.inc}');
+ WriteEmptyLine;
+
+ Write('interface');
+ WriteEmptyLine;
+
+ Write('uses');
+ Write('{vcl:} Classes, SysUtils, ' ,PASCAL_INDENTATION_LEVEL_1);
+ Write('{RemObjects:} uROXMLIntf, uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,' ,PASCAL_INDENTATION_LEVEL_1);
+
+ {
+ handled via RequiredUnits
+ if WriteDataModule then begin
+ s := Copy(ServerClassName,2,MaxInt);
+ if (s<>'') // For inherited ones...
+ then Write(Format(' u%s,', [s]),PASCAL_INDENTATION_LEVEL_1);
+ end;}
+
+ if (RequiredUnits<>'') then begin
+ s := Trim(RequiredUnits);
+ if (s[Length(s)]<>',') then s := s+',';
+ Write('{Required:} '+s ,PASCAL_INDENTATION_LEVEL_1);
+ end;
+
+ {TODO: -cRO3 RequiredUnits, and UsedRODLs might overlap if (for example) using the DARemoteService
+ ancestor was chosen not in SB but from the IDE. Check these and create a unique list
+ for RO3. }
+
+ if fService.Ancestor <> '' then begin
+ fAncestorService := aLibrary.FindService(fService.Ancestor);
+ if Assigned(fAncestorService) and (fAncestorService.ImplUnit <> '') then
+ Write('{Ancestor Implementation:} '+fAncestorService.ImplUnit+',',PASCAL_INDENTATION_LEVEL_1)
+ else
+ Write('{Ancestor Implementation:} '+fService.Ancestor+'_Impl,',PASCAL_INDENTATION_LEVEL_1);
+ end;
+
+ if aLibrary.UseCount > 0 then begin
+ s := '';
+ for i := 0 to aLibrary.UseCount-1 do begin
+ if aLibrary.Use[i].LoadedRodlLibraryName <> '' then
+ s2 := aLibrary.Use[i].LoadedRodlLibraryName + '_Intf'
+ else
+ s2 := ChangeFileExt(ExtractFilename(aLibrary.Use[i].RodlFile),'')+'_Intf';
+ if Pos(s2, s) <= 0 then begin
+ if s <> '' then
+ s := s+', ';
+ s := s+s2;
+ end;
+ end; { for }
+ s := s+',';
+
+ Write('{Used RODLs:} '+s,PASCAL_INDENTATION_LEVEL_1);
+ end;
+
+ Write(Format('{Generated:} %s_Intf;', [aLibrary.Info.Name]),PASCAL_INDENTATION_LEVEL_1);
+ WriteEmptyLine;
+
+ Write('type');
+
+ WriteServiceDeclaration(fService);
+
+ {WriteEmptyLine;
+ Write(Format('// Returns an I%s instance in case you need direct access to it from inside your server application',
+ [fService.Info.Name]));
+ Write(Format('function New%s(const aClientID : TGUID; UseClassFactory : boolean = TRUE) : I%s;', [fService.Info.Name, fService.Info.Name]));}
+
+ WriteEmptyLine;
+
+ Write('implementation');
+ WriteEmptyLine;
+ if WriteDataModule
+ then Write('{$R *.dfm}');
+
+ Write('uses');
+
+ (*)if aLibrary.UseCount > 0 then begin
+ s := '';
+ for i := 0 to aLibrary.UseCount-1 do begin
+ if s <> '' then s := s+', ';
+ s := s+ChangeFileExt(ExtractFilename(aLibrary.Use[i].RodlFile),'')+'_Invk';
+ end; { for }
+ s := s+',';
+
+ Write('{Ansestor Invokers:} '+s,PASCAL_INDENTATION_LEVEL_1);
+ end; *)
+ if fService.IsFromUsedRodl then begin
+ s := ChangeFileExt(ExtractFilename(fService.LocatedInRodlUse.RodlFile),'')+'_Invk';
+ end
+ else begin
+ s := ChangeFileExt(TRODLToInvk.GetTargetFileName(aLibrary),'');
+ end;
+
+ lIsHydraModule := IsHydraModule;
+ if lIsHydraModule then begin
+ Write(Format('{Hydra:} uHYRes, uHYIntf, uHYROFactory,', [s]),PASCAL_INDENTATION_LEVEL_1);
+ end;
+
+ Write(Format('{Generated:} %s;', [s]),PASCAL_INDENTATION_LEVEL_1);
+
+ WriteEmptyLine;
+
+ Write(Format('procedure Create_%s(out anInstance : IUnknown);', [fService.Info.Name]));
+ Write('begin');
+ if WriteDataModule
+ then Write(Format(' anInstance := T%s.Create(nil);', [fService.Info.Name]))
+ else Write(Format(' anInstance := T%s.Create;', [fService.Info.Name]));
+ Write('end;');
+ WriteEmptyLine;
+
+ Write(Format('{ %s }', [fService.Info.Name]));
+{ Write(Format('function New%s(const aClientID : TGUID; UseClassFactory : boolean = TRUE) : I%s;', [fService.Info.Name, fService.Info.Name]));
+ Write('var');
+ Write(' lUnknown: IUnknown;');
+ Write(' lClassFactorty: IROClassFactory;');
+ Write('begin');
+ Write(' result := nil;');
+ Write(' if UseClassFactory then begin');
+ Write(Format(' lClassFactorty := FindClassFactory(''%s'');', [fService.Info.Name]));
+ Write(' lClassFactorty.CreateInstance(aClientID, lUnknown);');
+ Write(' end');
+ Write(Format(' else Create_%s(lUnknown);', [fService.Info.Name]));
+ WriteEmptyLine;
+ Write(Format(' result := lUnknown as I%s;', [fService.Info.Name]));
+ Write('end;');
+
+ WriteEmptyLine;}
+
+ if Assigned(fService.Default) then begin
+ for i := 0 to fService.Default.Count-1 do
+ WriteOperationImplementation(fService.Default.Items[i]);
+ end;
+
+ Write('initialization');
+ s := fService.Info.Name;
+
+ if lIsHydraModule then begin
+ Write(' THYROFactory.Create(HInstance,');
+ end;
+
+ s := Format(' TROClassFactory.Create(''%s'', Create_%s, T%s_Invoker)', [s,s,s]);
+ if lIsHydraModule then s := s+' ' else s := s+';';
+ Write(s);
+
+ if lIsHydraModule then
+ Write(' );');
+
+ WriteEmptyLine;
+
+ Write('finalization');
+ WriteEmptyLine;
+
+ Write('end.');
+ s := buffer.Text;
+end;
+
+procedure TRODLToImpl.WriteServiceDeclaration(const aService : TRODLService);
+var i : integer;
+begin
+ Write(Format('{ T%s }', [aService.Info.Name]), PASCAL_INDENTATION_LEVEL_1);
+ if aService.Ancestor <> '' then begin
+ if Assigned(fAncestorService) and (fAncestorService.ImplClass <> '') then
+ Write(Format('T%s = class(%s, I%s)', [aService.Info.Name, fAncestorService.ImplClass, aService.Info.Name]), PASCAL_INDENTATION_LEVEL_1)
+ else
+ Write(Format('T%s = class(T%s, I%s)', [aService.Info.Name, aService.Ancestor, aService.Info.Name]), PASCAL_INDENTATION_LEVEL_1);
+ end
+ else begin
+ if WriteDataModule then
+ Write(Format('T%s = class(%s, I%s)', [aService.Info.Name, ServerClassName, aService.Info.Name]), PASCAL_INDENTATION_LEVEL_1)
+ else
+ Write(Format('T%s = class(TRORemotable, I%s)', [aService.Info.Name, aService.Info.Name]), PASCAL_INDENTATION_LEVEL_1);
+ end;
+
+ Write('private',PASCAL_INDENTATION_LEVEL_1);
+ Write('protected',PASCAL_INDENTATION_LEVEL_1);
+ Write(Format('{ I%s methods }', [aService.Info.Name]), PASCAL_INDENTATION_LEVEL_2);
+ for i := 0 to (aService.Default.Count-1) do
+ Write(Format(GetOperationDefinition(aService.Default.Items[i]), []), PASCAL_INDENTATION_LEVEL_2);
+
+ Write('end;', PASCAL_INDENTATION_LEVEL_1);
+end;
+
+function TRODLToImpl.ValidateTargetEntity(
+ const aLibrary: TRODLLIbrary; const aTargetEntity: string): boolean;
+var i : integer;
+begin
+ result := FALSE;
+
+ for i := 0 to (aLibrary.ServiceCount-1) do
+ if (CompareText(aLibrary.Services[i].Info.Name, aTargetEntity)=0) then begin
+ fService := aLibrary.Services[i]; // Will be used later
+ result := TRUE;
+ Exit;
+ end;
+end;
+
+procedure TRODLToImpl.WriteOperationImplementation(const anOperation: TRODLOperation);
+var
+ i : integer;
+ lCode:TStrings;
+begin
+ Write(GetOperationDefinition(anOperation, 'T'+fService.Info.Name));
+ lCode := anOperation.CodeBodies['Delphi'];
+ if Assigned(lCode) then begin
+ WriteLines(lCode.Text);
+ end
+ else begin
+ Write('begin');
+ Write('end;');
+ end;
+
+
+ for i := 0 to (anOperation.Count-1) do begin
+ end;
+
+ WriteEmptyLine;
+end;
+
+class function TRODLToImpl.GetTargetFileName(
+ const aLibrary: TRODLLIbrary; const aTargetEntity: string): string;
+begin
+ result := aTargetEntity+'_Impl.pas';
+end;
+
+procedure TRODLToImpl.SetServerClassName(const Value: string);
+begin
+ fServerClassName := Value;
+end;
+
+function TRODLToImpl.GetWriteDataModule: boolean;
+begin
+ result := (fServerClassName <> TRORemotable.ClassName);
+end;
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen/uRODLToPascalIntf.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen/uRODLToPascalIntf.pas
new file mode 100644
index 0000000..9fb6fee
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen/uRODLToPascalIntf.pas
@@ -0,0 +1,2076 @@
+unit uRODLToPascalIntf;
+
+{----------------------------------------------------------------------------}
+{ RemObjects SDK Library - CodeGen }
+{ }
+{ compiler: Delphi 5 and up, Kylix 2 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the RemObjects SDK }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$IFDEF LINUX}
+{$I ../RemObjects.inc}
+{$ELSE}
+{$I ..\RemObjects.inc}
+{$ENDIF LINUX}
+
+interface
+
+uses Classes, uRODL;
+
+type { TRODLToIntf }
+ TRODLToIntf = class(TRODLConverter)
+ private
+ fUnitName : string;
+
+ procedure WriteTypeDeclaration(aLibrary: TRODLLibrary; aType: TRODLEntity);
+ procedure WriteServiceDeclaration(aService: TRODLService);
+ procedure WriteEventSinkDeclaration(aEventSink: TRODLEventSink);
+ procedure WriteCoClass(aLibrary : TRODLLibrary; aService: TRODLService);
+ procedure WriteServiceConsts(aService : TRODLService);
+ procedure WriteArraySerializer(aLibrary : TRODLLibrary; anArray : TRODLArray);
+ procedure WriteStructPropMethods(aLibrary : TRODLLibrary; aStruct: TRODLStruct);
+ procedure WriteAttributesMethods(anEntity: TRODLEntity);
+
+ procedure WriteDocumentation(aInfo: TRODLEntity);
+
+ function IsSOAPService(aService : TRODLService) : boolean;
+ procedure WriteEventSink(aLibrary : TRODLLibrary; aEventSink: TRODLEventSink);
+ procedure GetInheritedExceptionFields(const aLibrary: TRODLLibrary; anException: TRODLException; aList: TList);
+ function AdjustParamList(const aParamList: string; Indentation: integer): string;
+ procedure WriteOperationDocumentation(anOperation:TRODLOperation; IndentationLevel : integer);
+ protected
+ procedure IntConvert(const aLibrary : TRODLLibrary; const aTargetEntity : string = ''); override;
+
+ public
+ constructor Create(const aLibraryFile:string; iUnitName:string=''); reintroduce; overload; virtual;
+ constructor Create(const aLibrary : TRODLLibrary; iUnitName:string=''); reintroduce; overload; virtual;
+ class function GetTargetFileName(const aLibrary : TRODLLibrary; const aTargetEntity : string = ''): string; override;
+
+ end;
+
+function GetDataType(const aType: string): String;
+function GetAttributes(atOperation, atService, atLibrary: TStrings; Ident: Integer): string;
+
+implementation
+
+uses SysUtils, Dialogs, uROTypes, //Controls,
+ {$IFDEF DELPHI5}
+ ComObj,
+ {$ENDIF}
+ uRODLGenTools, uRODLToPascal, uROClasses, uROSerializer;
+
+{ TRODLToIntf }
+
+function GetDataType(const aType: string): String;
+begin
+ case StrToDataType(aType) of
+ rtXML: result := 'IXmlNode';
+ else
+ result := aType;
+ end;
+end;
+
+constructor TRODLToIntf.Create(const aLibraryFile: string; iUnitName: string);
+begin
+ fUnitName := iUnitName;
+ inherited Create(aLibraryFile);
+end;
+
+constructor TRODLToIntf.Create(const aLibrary: TRODLLibrary; iUnitName: string);
+begin
+ fUnitName := iUnitName;
+ inherited Create(aLibrary);
+end;
+
+procedure TRODLToIntf.GetInheritedExceptionFields(const aLibrary: TRODLLibrary;
+ anException: TRODLException; aList: TList);
+var ex : TRODLException;
+ i : integer;
+begin
+ aList.Clear;
+ ex := anException;
+
+ repeat
+ ex := aLibrary.FindException(ex.Ancestor);
+ if (ex=NIL) then Exit;
+
+ for i := (ex.Count-1) downto 0 do
+ aList.Insert(0, ex[i]);
+
+ until 1=2;
+end;
+
+function TRODLToIntf.AdjustParamList(const aParamList : string; Indentation : integer) : string;
+var i, k, cnt : integer;
+begin
+ result := aParamList;
+ cnt := 1;
+ i := 1;
+
+ while (i80) and ((result[i-1]=';') or (result[i-1]=',')) then begin
+ cnt := 1;
+ Insert(#13#10, result, i);
+ for k := 1 to Indentation do begin
+ Insert(#32, result, i+2);
+ end;
+ Inc(i, Indentation+2);
+ end;
+ end;
+end;
+
+procedure TRODLToIntf.IntConvert(const aLibrary: TRODLLibrary; const aTargetEntity: string);
+var l, x, i, k : integer;
+ s, s2: string;
+ fulllist: TStrings;
+ svc : TRODLService;
+ roexception : TRODLException;
+ roexceptionEntityList: IROStrings;
+ roexceptionEntity: TRODLTypedEntity;
+ inheritedfields : TList;
+ lPascalIndentationLevel: Integer;
+begin
+ inheritedfields := TList.Create;
+ try
+ if fUnitName = '' then begin
+ fUnitName := ChangeFileExt(GetTargetFileName(aLibrary), '');
+ end;
+
+ Write(Format('unit %s;', [fUnitName]));
+ WriteEmptyLine;
+
+ WriteLines(IntfInvkNotice);
+ WriteEmptyLine;
+
+ Write('{$I Remobjects.inc}');
+ WriteEmptyLine;
+
+ Write('interface');
+ WriteEmptyLine;
+
+ Write('uses');
+ Write('{vcl:} Classes, TypInfo,',PASCAL_INDENTATION_LEVEL_1);
+
+ if aLibrary.UseCount > 0 then begin
+ Write('{RemObjects:} uROXMLIntf, uROClasses, uROClient, uROTypes, uROClientIntf,',PASCAL_INDENTATION_LEVEL_1);
+
+ s := '';
+ l := 0;
+
+ fulllist := TStringList.Create;
+ try
+ for i := 0 to aLibrary.UseCount-1 do begin
+
+ if aLibrary.Use[i].LoadedRodlLibraryName <> '' then
+ s2 := aLibrary.Use[i].LoadedRodlLibraryName + '_Intf'
+ else
+ s2 := ChangeFileExt(ExtractFilename(aLibrary.Use[i].RodlFile),'')+'_Intf';
+ if fulllist.IndexOf(s2) > -1 then
+ Continue;
+
+ if s <> '' then s := s+', ';
+ Inc(l, Length(s2));
+
+ s := s+s2;
+ fulllist.Add(s2);
+
+ if (l>80) then begin
+
+ if i <> aLibrary.UseCount -1 then s := s+ ',';
+
+ Write('{Used RODLs:} '+ s,PASCAL_INDENTATION_LEVEL_1);
+ s := '';
+ l := 0;
+
+ end;
+
+ end; { for }
+ finally
+ FreeAndNil(fulllist);
+ end;
+ s := s+';';
+
+ Write('{Used RODLs:} '+
+
+ s,PASCAL_INDENTATION_LEVEL_1);
+ end
+ else begin
+ Write('{RemObjects:} uROXMLIntf, uROClasses, uROClient, uROTypes, uROClientIntf;',PASCAL_INDENTATION_LEVEL_1);
+ end;
+
+
+ WriteEmptyLine;
+
+ Write('const');
+ Write('{ Library ID }',PASCAL_INDENTATION_LEVEL_1);
+ Write(Format('LibraryUID = ''%s'';', [GUIDToString(aLibrary.Info.UID)]),PASCAL_INDENTATION_LEVEL_1);
+ if (aLibrary.Info.Attributes.Values['Wsdl']<>'')
+ then Write(Format('WSDLLocation = ''%s'';', [aLibrary.Info.Attributes.Values['Wsdl']]),PASCAL_INDENTATION_LEVEL_1);
+
+
+ Write(Format('TargetNamespace = ''%s'';', [aLibrary.Info.Attributes.Values['TargetNamespace']]),PASCAL_INDENTATION_LEVEL_1);
+
+ WriteEmptyLine;
+
+ Write('{ Service Interface ID''s }',PASCAL_INDENTATION_LEVEL_1);
+ for i := 0 to (aLibrary.Count-1) do
+ if (aLibrary.Items[i] is TRODLService) and not aLibrary.Items[i].IsFromUsedRodl then begin
+ svc := TRODLService(aLibrary.Items[i]);
+ Write('I'+aLibrary.Items[i].Info.Name+'_IID : TGUID = '''+GUIDToString(svc.Default.Info.UID)+''';' ,PASCAL_INDENTATION_LEVEL_1);
+ end;
+
+ for i := 0 to (aLibrary.ServiceCount-1) do begin
+ if not aLibrary.Services[i].IsFromUsedRodl then begin
+ WriteServiceConsts(aLibrary.Services[i]);
+ end;
+ end;
+ WriteEmptyLine();
+
+ {-------- Events ----------}
+ Write('{ Event ID''s }',PASCAL_INDENTATION_LEVEL_1);
+ for i := 0 to (aLibrary.EventSinkCount-1) do begin
+ if not aLibrary.EventSinks[i].IsFromUsedRodl then begin
+ Write(Format('EID_%s = ''%s'';', [aLibrary.EventSinks[i].Info.Name, aLibrary.EventSinks[i].Info.Name]),PASCAL_INDENTATION_LEVEL_1);
+ end;
+ end;
+ WriteEmptyLine();
+ {--------------------------}
+
+ if aLibrary.Count > 0 then Write('type');
+
+ with aLibrary do begin
+ // Forward declarations
+ Write('{ Forward declarations }',PASCAL_INDENTATION_LEVEL_1);
+ for i := 0 to (aLibrary.ServiceCount-1) do if (not aLibrary.Services[i].IsFromUsedRodl) then
+ Write(Format('I%s = interface;', [aLibrary.Services[i].Info.Name]), PASCAL_INDENTATION_LEVEL_1);
+ if aLibrary.ServiceCount>0 then WriteEmptyLine;
+
+ for i := 0 to (aLibrary.ArrayCount-1) do if (not aLibrary.Arrays[i].IsFromUsedRodl) then
+ Write(Format('%s = class;', [aLibrary.Arrays[i].Info.Name]), PASCAL_INDENTATION_LEVEL_1);
+ if aLibrary.ArrayCount>0 then WriteEmptyLine;
+
+ for i := 0 to (aLibrary.StructCount-1) do if (not aLibrary.Structs[i].IsFromUsedRodl) then
+ Write(Format('%s = class;', [aLibrary.Structs[i].Info.Name]), PASCAL_INDENTATION_LEVEL_1);
+ if aLibrary.StructCount>0 then WriteEmptyLine;
+
+ for i := 0 to (aLibrary.ExceptionCount-1) do if (not aLibrary.Exceptions[i].IsFromUsedRodl) then
+ Write(Format('%s = class;',[aLibrary.Exceptions[i].Info.Name]),PASCAL_INDENTATION_LEVEL_1);
+ if aLibrary.ExceptionCount>0 then WriteEmptyLine;
+
+ for i := 0 to (aLibrary.EventSinkCount-1) do if not aLibrary.EventSinks[i].IsFromUsedRodl then
+ Write(Format('I%s = interface;', [aLibrary.EventSinks[i].Info.Name]),PASCAL_INDENTATION_LEVEL_1);
+ if aLibrary.EventSinkCount>0 then WriteEmptyLine;
+
+ WriteEmptyLine;
+
+ if (EnumCount > 0) then begin
+ Write('{ Enumerateds }', PASCAL_INDENTATION_LEVEL_1);
+ for i := 0 to (EnumCount-1) do
+ if (not aLibrary.Enums[i].IsFromUsedRodl) then with Enums[i] do begin
+ WriteDocumentation(aLibrary.Enums[i]);
+ lPascalIndentationLevel := PASCAL_INDENTATION_LEVEL_1;
+ s := Info.Name+' = (';
+ l := Length(s);
+ for x := 0 to (Count-1) do begin
+ if PrefixEnumValues then
+ s2 := Info.Name+'_'+Items[x].Info.Name
+ else
+ s2 := Items[x].Info.Name;
+ s2 := s2 + ',';
+ Inc(l, Length(s2));
+ s := s + s2;
+ if (l>80) and (x <> Count-1) then begin
+ Write(s, lPascalIndentationLevel);
+ lPascalIndentationLevel := PASCAL_INDENTATION_LEVEL_3;
+ s := '';
+ l := 0;
+ end;
+ end;
+ System.Delete(s,Length(s),1);
+ s := s+');';
+
+ Write(s, lPascalIndentationLevel);
+ end;
+ WriteEmptyLine;
+ end;
+
+ end;
+
+ with aLibrary.CalcStructOrder() do begin
+ for i := 0 to (Count-1) do //if (not aLibrary.Services[i].IsFromUsedRodl) then
+ WriteTypeDeclaration(aLibrary, Objects[i] as TRODLStruct);
+ end;
+ //for i := 0 to (aLibrary.StructCount-1) do if (not aLibrary.Structs[i].IsFromUsedRodl) then
+ //WriteTypeDeclaration(aLibrary, aLibrary.Structs[i]);
+
+ for i := 0 to (aLibrary.ArrayCount-1) do if (not aLibrary.Arrays[i].IsFromUsedRodl) then
+ WriteTypeDeclaration(aLibrary, aLibrary.Arrays[i]);
+
+ if aLibrary.ExceptionCount > 0 then begin
+ Write('{ Exceptions }',PASCAL_INDENTATION_LEVEL_1);
+
+ with aLibrary.CalcExceptionOrder() do begin
+ for i := 0 to (Count-1) do begin
+ roexception := (Objects[i] as TRODLException);
+ GetInheritedExceptionFields(aLibrary, roexception, inheritedfields);
+
+ WriteDocumentation(roexception.Info);
+ if roexception.Ancestor <> '' then
+ Write(Format('%s = class(%s)',[roexception.Info.Name, roexception.Ancestor]),PASCAL_INDENTATION_LEVEL_1)
+ else
+ Write(Format('%s = class(EROException)',[roexception.Info.Name]),PASCAL_INDENTATION_LEVEL_1);
+
+ Write('private', PASCAL_INDENTATION_LEVEL_1);
+ for k := 0 to (roexception.Count-1) do begin
+ Write(Format('f%s: %s;', [roexception[k].Name, GetDataType(roexception[k].DataType)]), PASCAL_INDENTATION_LEVEL_2);
+ end;
+
+ Write('public', PASCAL_INDENTATION_LEVEL_1);
+
+ if roexception.Attributes.Count > 0 then begin
+ Write('class function GetAttributeCount: Integer; override;', PASCAL_INDENTATION_LEVEL_2);
+ Write('class function GetAttributeName(aIndex: Integer): string; override;', PASCAL_INDENTATION_LEVEL_2);
+ Write('class function GetAttributeValue(aIndex: Integer): string; override;', PASCAL_INDENTATION_LEVEL_2);
+ if (roexception.Count > 0) then WriteEmptyLine;
+ end;
+
+ if (roexception.Count>0) then begin
+ s := 'constructor Create(anExceptionMessage : string; ';
+ for k := 0 to (inheritedfields.Count-1) do
+ s := s+Format('a%s: %s; ', [TRODLTypedEntity(inheritedfields[k]).Name, GetDataType(TRODLTypedEntity(inheritedfields[k]).DataType)]);
+ for k := 0 to (roexception.Count-1) do
+ s := s+Format('a%s: %s; ', [roexception[k].Name, GetDataType(roexception[k].DataType)]);
+ s := Copy(s,1,Length(s)-2)+');';
+ Write(AdjustParamList(s, PASCAL_INDENTATION_LEVEL_3), PASCAL_INDENTATION_LEVEL_2);
+ roexceptionEntityList:=roexception.CalcItemsMarshalingOrder(True);
+ if (roexception.Count>0) and (roexceptionEntityList.Count > 0) then begin
+ Write(' procedure ReadException(ASerializer: TObject); override;', PASCAL_INDENTATION_LEVEL_1);
+ Write(' procedure WriteException(ASerializer: TObject); override;', PASCAL_INDENTATION_LEVEL_1);
+ end;
+ roexceptionEntityList:=nil;
+ end;
+
+ Write('published', PASCAL_INDENTATION_LEVEL_1);
+
+ for k := 0 to (roexception.Count-1) do begin
+ WriteDocumentation(roexception[k]);
+ Write(Format('property %s: %s read f%s write f%s;',
+ [roexception[k].Name, GetDataType(roexception[k].DataType),
+ roexception[k].Name, roexception[k].Name]),
+ PASCAL_INDENTATION_LEVEL_2);
+ end;
+
+ Write('end;', PASCAL_INDENTATION_LEVEL_1);
+ WriteEmptyLine;
+ end;
+ end;
+
+ {for i := 0 to (aLibrary.ExceptionCount-1) do if (not aLibrary.Exceptions[i].IsFromUsedRodl) then begin
+ WriteDocumentation(aLibrary.Exceptions[i].Info);
+ if aLibrary.Exceptions[i].Ancestor <> '' then
+ Write(Format('%s = class(%s);',[aLibrary.Exceptions[i].Info.Name, aLibrary.Exceptions[i].Ancestor]),PASCAL_INDENTATION_LEVEL_1)
+ else
+ Write(Format('%s = class(EROException);',[aLibrary.Exceptions[i].Info.Name]),PASCAL_INDENTATION_LEVEL_1);
+ end; }
+ WriteEmptyLine;
+ end;
+
+ with aLibrary.CalcServiceOrder() do begin
+ for i := 0 to (Count-1) do //if (not aLibrary.Services[i].IsFromUsedRodl) then
+ WriteServiceDeclaration(Objects[i] as TRODLService);
+ end;
+
+ {-------- Events ----------}
+ //ToDo -omh: This should use a CalcServerEventsOrder method which is currently not present in uRODL.pas
+ with aLibrary do begin
+ for i := 0 to EventSinkCount-1 do begin
+ if aLibrary.EventSinks[i].IsFromUsedRodl then Continue;
+
+ WriteEventSinkDeclaration(aLibrary.EventSinks[i]);
+ end;
+ end;
+ {--------------------------}
+
+ {for i := 0 to (aLibrary.ServiceCount-1) do if (not aLibrary.Services[i].IsFromUsedRodl) then
+ WriteServiceDeclaration(aLibrary.Services[i]);}
+
+ //WriteEmptyLine;
+
+ Write('implementation');
+ WriteEmptyLine;
+
+ Write('uses');
+ Write('{vcl:} SysUtils,',PASCAL_INDENTATION_LEVEL_1);
+ Write('{RemObjects:} uROEventRepository, uROSerializer, uRORes;',PASCAL_INDENTATION_LEVEL_1);
+
+ WriteEmptyLine;
+
+ with aLibrary.CalcExceptionOrder() do begin
+ for i := 0 to (Count-1) do begin
+ roexception := (Objects[i] as TRODLException);
+ if (roexception.Count = 0) and (roexception.Attributes.Count = 0) then
+ Continue;
+
+ Write('{ '+roexception.Name+' }');
+ WriteEmptyLine;
+
+ if roexception.Attributes.Count > 0 then
+ WriteAttributesMethods(roexception);
+
+ if (roexception.Count=0) then Continue;
+ GetInheritedExceptionFields(aLibrary, roexception, inheritedfields);
+
+ s := 'constructor '+roexception.Name+'.Create(anExceptionMessage : string; ';
+ for k := 0 to (inheritedfields.Count-1) do
+ s := s+Format('a%s: %s; ', [TRODLTypedEntity(inheritedfields[k]).Name, GetDataType(TRODLTypedEntity(inheritedfields[k]).DataType)]);
+
+ for k := 0 to (roexception.Count-1) do
+ s := s+Format('a%s: %s; ', [roexception[k].Name, GetDataType(roexception[k].DataType)]);
+ s := Copy(s,1,Length(s)-2)+');';
+ Write(AdjustParamList(s, 1));
+
+ Write('begin');
+ s := ' inherited Create(anExceptionMessage';
+ for k := 0 to (inheritedfields.Count-1) do
+ s := s+Format(', a%s', [TRODLTypedEntity(inheritedfields[k]).Name]);
+ s := s+');';
+ Write(AdjustParamList(s, 10));
+
+ WriteEmptyLine;
+
+ for k := 0 to (roexception.Count-1) do begin
+ Write(Format(' f%s := a%s;', [roexception[k].Name, roexception[k].Name]));
+ end;
+
+ Write('end;');
+
+ roexceptionEntityList:=roexception.CalcItemsMarshalingOrder(True);
+ if (roexception.Count>0) and (roexceptionEntityList.Count > 0) then begin
+ WriteEmptyLine;
+ Write('procedure '+roexception.Name+'.ReadException(ASerializer: TObject);');
+ if roexceptionEntityList.Count > 0 then Write('var');
+ For k:=0 to roexceptionEntityList.Count - 1 do
+ with TRODLTypedEntity(roexceptionEntityList.Objects[k]) do
+ Write(Format(' l_%s: %s;',[Name, GetDataType(DataType)]));
+ Write('begin');
+ Write(' if TROSerializer(ASerializer).RecordStrictOrder then begin');
+ if roexception.Count <> roexceptionEntityList.Count then
+ Write(' inherited;');
+ for k := 0 to (roexception.Count-1) do begin
+ roexceptionEntity:= roexception[k];
+ Write(Format(' l_%s := %0:s;',[roexceptionEntity.Name]));
+ case StrToDataType(roexceptionEntity.DataType) of
+ rtInteger: Write(Format(' TROSerializer(ASerializer).ReadInteger(''%s'', otSLong, l_%0:s);',[roexceptionEntity.Name]));
+ rtDateTime: Write(Format(' TROSerializer(ASerializer).ReadDateTime(''%s'', l_%0:s);',[roexceptionEntity.Name]));
+ rtDouble: Write(Format(' TROSerializer(ASerializer).ReadDouble(''%s'', ftDouble, l_%0:s);',[roexceptionEntity.Name]));
+ rtCurrency: Write(Format(' TROSerializer(ASerializer).ReadDouble(''%s'', ftCurr, l_%0:s);',[roexceptionEntity.Name]));
+ rtWidestring: Write(Format(' TROSerializer(ASerializer).ReadWideString(''%s'', l_%0:s);',[roexceptionEntity.Name]));
+ rtString: Write(Format(' TROSerializer(ASerializer).ReadUTF8String(''%s'', l_%0:s);',[roexceptionEntity.Name]));
+ rtInt64: Write(Format(' TROSerializer(ASerializer).ReadInt64(''%s'', l_%0:s);',[roexceptionEntity.Name]));
+ rtBoolean: Write(Format(' TROSerializer(ASerializer).ReadEnumerated(''%s'',TypeInfo(boolean), l_%0:s);',[roexceptionEntity.Name]));
+ rtVariant: Write(Format(' TROSerializer(ASerializer).ReadVariant(''%s'', l_%0:s);',[roexceptionEntity.Name]));
+ rtXML: Write(Format(' TROSerializer(ASerializer).ReadXML(''%s'', l_%0:s);',[roexceptionEntity.Name]));
+ rtGuid: Write(Format(' TROSerializer(ASerializer).ReadGuid(''%s'', l_%0:s);',[roexceptionEntity.Name]));
+ rtDecimal: Write(Format(' TROSerializer(ASerializer).ReadDecimal(''%s'', l_%0:s);',[roexceptionEntity.Name]));
+ rtBinary: Write(Format(' TROSerializer(ASerializer).ReadBinary(''%s'', l_%0:s);',[roexceptionEntity.Name]));
+ rtUserDefined:
+ if aLibrary.FindArray(roexceptionEntity.DataType) <> nil then
+ Write(Format(' TROSerializer(ASerializer).ReadArray(''%s'', %s, l_%0:s);',[roexceptionEntity.Name,GetDataType(roexceptionEntity.DataType)]))
+ else if aLibrary.FindEnum(roexceptionEntity.DataType) <> nil then
+ Write(Format(' TROSerializer(ASerializer).ReadEnumerated(''%s'',TypeInfo(%s), l_%0:s);',[roexceptionEntity.Name,GetDataType(roexceptionEntity.DataType)]))
+ else
+ Write(Format(' TROSerializer(ASerializer).ReadStruct(''%s'', %s, l_%0:s);',[roexceptionEntity.Name,GetDataType(roexceptionEntity.DataType)]));
+ end;
+ if (StrToDataType(roexceptionEntity.DataType) in [rtBinary, rtUserDefined]) and (aLibrary.FindEnum(roexceptionEntity.DataType) = nil) then
+ Write(Format(' if %s <> l_%0:s then %0:s.Free;',[roexceptionEntity.Name]));
+ Write(Format(' %s := l_%0:s;',[roexceptionEntity.Name]));
+ end;
+ Write(' end');
+ Write(' else begin');
+ for k := 0 to (roexceptionEntityList.Count-1) do begin
+ roexceptionEntity:= TRODLTypedEntity(roexceptionEntityList.Objects[k]);
+ Write(Format(' l_%s := %0:s;',[roexceptionEntity.Name]));
+ case StrToDataType(roexceptionEntity.DataType) of
+ rtInteger: Write(Format(' TROSerializer(ASerializer).ReadInteger(''%s'', otSLong, l_%0:s);',[roexceptionEntity.Name]));
+ rtDateTime: Write(Format(' TROSerializer(ASerializer).ReadDateTime(''%s'', l_%0:s);',[roexceptionEntity.Name]));
+ rtDouble: Write(Format(' TROSerializer(ASerializer).ReadDouble(''%s'', ftDouble, l_%0:s);',[roexceptionEntity.Name]));
+ rtCurrency: Write(Format(' TROSerializer(ASerializer).ReadDouble(''%s'', ftCurr, l_%0:s);',[roexceptionEntity.Name]));
+ rtWidestring: Write(Format(' TROSerializer(ASerializer).ReadWideString(''%s'', l_%0:s);',[roexceptionEntity.Name]));
+ rtString: Write(Format(' TROSerializer(ASerializer).ReadUTF8String(''%s'', l_%0:s);',[roexceptionEntity.Name]));
+ rtInt64: Write(Format(' TROSerializer(ASerializer).ReadInt64(''%s'', l_%0:s);',[roexceptionEntity.Name]));
+ rtBoolean: Write(Format(' TROSerializer(ASerializer).ReadEnumerated(''%s'',TypeInfo(boolean), l_%0:s);',[roexceptionEntity.Name]));
+ rtVariant: Write(Format(' TROSerializer(ASerializer).ReadVariant(''%s'', l_%0:s);',[roexceptionEntity.Name]));
+ rtXML: Write(Format(' TROSerializer(ASerializer).ReadXML(''%s'', l_%0:s);',[roexceptionEntity.Name]));
+ rtGuid: Write(Format(' TROSerializer(ASerializer).ReadGuid(''%s'', l_%0:s);',[roexceptionEntity.Name]));
+ rtDecimal: Write(Format(' TROSerializer(ASerializer).ReadDecimal(''%s'', l_%0:s);',[roexceptionEntity.Name]));
+ rtBinary: Write(Format(' TROSerializer(ASerializer).ReadBinary(''%s'', l_%0:s);',[roexceptionEntity.Name]));
+ rtUserDefined:
+ if aLibrary.FindArray(roexceptionEntity.DataType) <> nil then
+ Write(Format(' TROSerializer(ASerializer).ReadArray(''%s'', %s, l_%0:s);',[roexceptionEntity.Name,GetDataType(roexceptionEntity.DataType)]))
+ else if aLibrary.FindEnum(roexceptionEntity.DataType) <> nil then
+ Write(Format(' TROSerializer(ASerializer).ReadEnumerated(''%s'',TypeInfo(%s), l_%0:s);',[roexceptionEntity.Name,GetDataType(roexceptionEntity.DataType)]))
+ else
+ Write(Format(' TROSerializer(ASerializer).ReadStruct(''%s'', %s, l_%0:s);',[roexceptionEntity.Name,GetDataType(roexceptionEntity.DataType)]));
+ end;
+ if (StrToDataType(roexceptionEntity.DataType) in [rtBinary, rtUserDefined]) and (aLibrary.FindEnum(roexceptionEntity.DataType) = nil) then
+ Write(Format(' if %s <> l_%0:s then %0:s.Free;',[roexceptionEntity.Name]));
+ Write(Format(' %s := l_%0:s;',[roexceptionEntity.Name]));
+ end;
+ Write(' end;');
+ Write('end;');
+
+
+ WriteEmptyLine;
+ Write('procedure '+roexception.Name+'.WriteException(ASerializer: TObject);');
+ if roexceptionEntityList.Count > 0 then Write('var');
+ For k:=0 to roexceptionEntityList.Count - 1 do
+ with TRODLTypedEntity(roexceptionEntityList.Objects[k]) do
+ Write(Format(' l_%s: %s;',[Name, GetDataType(DataType)]));
+ Write('begin');
+ Write(' if TROSerializer(ASerializer).RecordStrictOrder then begin');
+ if roexception.Count <> roexceptionEntityList.Count then
+ Write('inherited;', PASCAL_INDENTATION_LEVEL_2);
+ Write(Format('TROSerializer(ASerializer).ChangeClass(%s);', [roexception.Name]), PASCAL_INDENTATION_LEVEL_2);
+ for k := 0 to (roexception.Count-1) do begin
+ roexceptionEntity:= roexception[k];
+ Write(Format(' l_%s := %0:s;',[roexceptionEntity.Name]));
+ case StrToDataType(roexceptionEntity.DataType) of
+ rtInteger: Write(Format(' TROSerializer(ASerializer).WriteInteger(''%s'', otSLong, l_%0:s);',[roexceptionEntity.Name]));
+ rtDateTime: Write(Format(' TROSerializer(ASerializer).WriteDateTime(''%s'', l_%0:s);',[roexceptionEntity.Name]));
+ rtDouble: Write(Format(' TROSerializer(ASerializer).WriteDouble(''%s'', ftDouble, l_%0:s);',[roexceptionEntity.Name]));
+ rtCurrency: Write(Format(' TROSerializer(ASerializer).WriteDouble(''%s'', ftCurr, l_%0:s);',[roexceptionEntity.Name]));
+ rtWidestring: Write(Format(' TROSerializer(ASerializer).WriteWideString(''%s'', l_%0:s);',[roexceptionEntity.Name]));
+ rtString: Write(Format(' TROSerializer(ASerializer).WriteUTF8String(''%s'', l_%0:s);',[roexceptionEntity.Name]));
+ rtInt64: Write(Format(' TROSerializer(ASerializer).WriteInt64(''%s'', l_%0:s);',[roexceptionEntity.Name]));
+ rtBoolean: Write(Format(' TROSerializer(ASerializer).WriteEnumerated(''%s'',TypeInfo(boolean), l_%0:s);',[roexceptionEntity.Name]));
+ rtVariant: Write(Format(' TROSerializer(ASerializer).WriteVariant(''%s'', l_%0:s);',[roexceptionEntity.Name]));
+ rtXML: Write(Format(' TROSerializer(ASerializer).WriteXML(''%s'', l_%0:s);',[roexceptionEntity.Name]));
+ rtGuid: Write(Format(' TROSerializer(ASerializer).WriteGuid(''%s'', l_%0:s);',[roexceptionEntity.Name]));
+ rtDecimal: Write(Format(' TROSerializer(ASerializer).WriteDecimal(''%s'', l_%0:s);',[roexceptionEntity.Name]));
+ rtBinary: Write(Format(' TROSerializer(ASerializer).WriteBinary(''%s'', l_%0:s);',[roexceptionEntity.Name]));
+ rtUserDefined:
+ if aLibrary.FindArray(roexceptionEntity.DataType) <> nil then
+ Write(Format(' TROSerializer(ASerializer).WriteArray(''%s'', l_%0:s, %s);',[roexceptionEntity.Name,GetDataType(roexceptionEntity.DataType)]))
+ else if aLibrary.FindEnum(roexceptionEntity.DataType) <> nil then
+ Write(Format(' TROSerializer(ASerializer).WriteEnumerated(''%s'',TypeInfo(%s), l_%0:s);',[roexceptionEntity.Name,roexceptionEntity.DataType]))
+ else
+ Write(Format(' TROSerializer(ASerializer).WriteStruct(''%s'', l_%0:s, %s);',[roexceptionEntity.Name,GetDataType(roexceptionEntity.DataType)]))
+ end;
+ end;
+ Write(' end');
+ Write(' else begin');
+ for k := 0 to (roexceptionEntityList.Count-1) do begin
+ roexceptionEntity:= TRODLTypedEntity(roexceptionEntityList.Objects[k]);
+ Write(Format(' l_%s := %0:s;',[roexceptionEntity.Name]));
+ case StrToDataType(roexceptionEntity.DataType) of
+ rtInteger: Write(Format(' TROSerializer(ASerializer).WriteInteger(''%s'', otSLong, l_%0:s);',[roexceptionEntity.Name]));
+ rtDateTime: Write(Format(' TROSerializer(ASerializer).WriteDateTime(''%s'', l_%0:s);',[roexceptionEntity.Name]));
+ rtDouble: Write(Format(' TROSerializer(ASerializer).WriteDouble(''%s'', ftDouble, l_%0:s);',[roexceptionEntity.Name]));
+ rtCurrency: Write(Format(' TROSerializer(ASerializer).WriteDouble(''%s'', ftCurr, l_%0:s);',[roexceptionEntity.Name]));
+ rtWidestring: Write(Format(' TROSerializer(ASerializer).WriteWideString(''%s'', l_%0:s);',[roexceptionEntity.Name]));
+ rtString: Write(Format(' TROSerializer(ASerializer).WriteUTF8String(''%s'', l_%0:s);',[roexceptionEntity.Name]));
+ rtInt64: Write(Format(' TROSerializer(ASerializer).WriteInt64(''%s'', l_%0:s);',[roexceptionEntity.Name]));
+ rtBoolean: Write(Format(' TROSerializer(ASerializer).WriteEnumerated(''%s'',TypeInfo(boolean), l_%0:s);',[roexceptionEntity.Name]));
+ rtVariant: Write(Format(' TROSerializer(ASerializer).WriteVariant(''%s'', l_%0:s);',[roexceptionEntity.Name]));
+ rtXML: Write(Format(' TROSerializer(ASerializer).WriteXML(''%s'', l_%0:s);',[roexceptionEntity.Name]));
+ rtGuid: Write(Format(' TROSerializer(ASerializer).WriteGuid(''%s'', l_%0:s);',[roexceptionEntity.Name]));
+ rtDecimal: Write(Format(' TROSerializer(ASerializer).WriteDecimal(''%s'', l_%0:s);',[roexceptionEntity.Name]));
+ rtBinary: Write(Format(' TROSerializer(ASerializer).WriteBinary(''%s'', l_%0:s);',[roexceptionEntity.Name]));
+ rtUserDefined:
+ if aLibrary.FindArray(roexceptionEntity.DataType) <> nil then
+ Write(Format(' TROSerializer(ASerializer).WriteArray(''%s'', l_%0:s,%s);',[roexceptionEntity.Name,GetDataType(roexceptionEntity.DataType)]))
+ else if aLibrary.FindEnum(roexceptionEntity.DataType) <> nil then
+ Write(Format(' TROSerializer(ASerializer).WriteEnumerated(''%s'',TypeInfo(%s), l_%0:s);',[roexceptionEntity.Name,roexceptionEntity.DataType]))
+ else
+ Write(Format(' TROSerializer(ASerializer).WriteStruct(''%s'', l_%0:s,%s);',[roexceptionEntity.Name,GetDataType(roexceptionEntity.DataType)]))
+ end;
+ end;
+ Write(' end;');
+ Write('end;');
+ end;
+ roexceptionEntityList:=nil;
+ WriteEmptyLine;
+ end;
+ end;
+
+ for i := 0 to (aLibrary.ArrayCount-1) do if (not aLibrary.Arrays[i].IsFromUsedRodl) then
+ WriteArraySerializer(aLibrary, aLibrary.Arrays[i]);
+
+ for i := 0 to (aLibrary.StructCount-1) do if (not aLibrary.Structs[i].IsFromUsedRodl) then
+ WriteStructPropMethods(aLibrary, aLibrary.Structs[i]);
+
+ for i := 0 to (aLibrary.ServiceCount-1) do if (not aLibrary.Services[i].IsFromUsedRodl) then
+ WriteCoClass(aLibrary, aLibrary.Services[i]);
+
+ for i := 0 to (aLibrary.EventSinkCount-1) do if (not aLibrary.EventSinks[i].IsFromUsedRodl) then
+ WriteEventSink(aLibrary, aLibrary.EventSinks[i]);
+
+ Write('initialization');
+ for i := 0 to (aLibrary.Count-1) do
+ if ((aLibrary.Items[i] is TRODLArray) or (aLibrary.Items[i] is TRODLStruct)) and
+ (not aLibrary.Items[i].IsFromUsedRodl) then
+ Write(' RegisterROClass('+aLibrary.Items[i].Info.Name+');');
+
+ for i := 0 to (aLibrary.ExceptionCount-1) do if (not aLibrary.Exceptions[i].IsFromUsedRodl) then begin
+ Write(Format('RegisterExceptionClass(%s);',[aLibrary.Exceptions[i].Info.Name]),PASCAL_INDENTATION_LEVEL_1);
+ end;
+
+ for i := 0 to (aLibrary.Count-1) do
+ if (aLibrary.Items[i] is TRODLService) and not aLibrary.Items[i].IsFromUsedRodl then begin
+ Write(' RegisterProxyClass(I'+aLibrary.Items[i].Info.Name+'_IID, T'+aLibrary.Items[i].Info.Name+'_Proxy);');
+ end;
+
+ WriteEmptyLine;
+ with aLibrary do
+ for i := 0 to EventSinkCount-1 do
+ if (not EventSinks[i].IsFromUsedRodl) then begin
+ Write(Format(' RegisterEventWriterClass(I%s_Writer, T%s_Writer);', [EventSinks[i].Info.Name, EventSinks[i].Info.Name]));
+ Write(Format(' RegisterEventInvokerClass(EID_%s, T%s_Invoker);', [EventSinks[i].Info.Name, EventSinks[i].Info.Name]));
+ end;
+
+ Write('');
+ Write('finalization');
+ for i := 0 to (aLibrary.Count-1) do
+ if ((aLibrary.Items[i] is TRODLArray) or (aLibrary.Items[i] is TRODLStruct)) and
+ (not aLibrary.Items[i].IsFromUsedRodl) then
+ Write(' UnregisterROClass('+aLibrary.Items[i].Info.Name+');');
+
+ for i := 0 to (aLibrary.ExceptionCount-1) do if (not aLibrary.Exceptions[i].IsFromUsedRodl) then begin
+ Write(Format('UnregisterExceptionClass(%s);',[aLibrary.Exceptions[i].Info.Name]),PASCAL_INDENTATION_LEVEL_1);
+ end;
+
+ for i := 0 to (aLibrary.Count-1) do
+ if (aLibrary.Items[i] is TRODLService) and not aLibrary.Items[i].IsFromUsedRodl then begin
+ Write(' UnregisterProxyClass(I'+aLibrary.Items[i].Info.Name+'_IID);');
+ end;
+
+ WriteEmptyLine;
+ with aLibrary do
+ for i := 0 to EventSinkCount-1 do
+ if (not EventSinks[i].IsFromUsedRodl) then begin
+ Write(Format(' UnregisterEventWriterClass(I%s_Writer);', [EventSinks[i].Info.Name]));
+ Write(Format(' UnregisterEventInvokerClass(EID_%s);', [EventSinks[i].Info.Name]));
+ end;
+
+ //WriteEmptyLine;
+
+ {Write('finalization');
+ for i := 0 to (aLibrary.Count-1) do
+ if (aLibrary.Items[i] is TRODLArray) or (aLibrary.Items[i] is TRODLStruct)
+ then Write(' UnRegisterClass('+aLibrary.Items[i].Info.Name+');');
+
+ WriteEmptyLine;}
+
+ Write('end.');
+
+ finally
+ inheritedfields.Free;
+ end;
+end;
+
+procedure TRODLToIntf.WriteServiceConsts(aService : TRODLService);
+begin
+ with aService.Info do
+ // Writes additional SOAP information
+ if IsSOAPService(aService) then begin
+ Write(Format(' %s_EndPointURI = ''%s'';', [Name, Attributes.Values['Location']]));
+
+ end;
+end;
+
+procedure TRODLToIntf.WriteDocumentation(aInfo:TRODLEntity);
+var lDocumentation:string;
+begin
+ if aInfo.Documentation <> '' then begin
+ lDocumentation := aInfo.Documentation;
+ if Length(lDocumentation) < 1000 then
+ ReplaceChar(lDocumentation,['}','{', #13, #10],' ')
+ else begin
+ ReplaceChar(lDocumentation,['}','{'],' ');
+ lDocumentation:=StringReplace(lDocumentation,#10, #10' ',[rfReplaceAll]);
+ end;
+
+ WriteEmptyLine;
+ Write('{ Description:',PASCAL_INDENTATION_LEVEL_1);
+ Write(' '+lDocumentation+' }',PASCAL_INDENTATION_LEVEL_1);
+ end;
+end;
+
+procedure TRODLToIntf.WriteOperationDocumentation(anOperation:TRODLOperation; IndentationLevel : integer);
+var lDocumentation:string;
+ i : integer;
+begin
+ if anOperation.Documentation <> '' then begin
+ lDocumentation := anOperation.Documentation;
+ if Length(lDocumentation) < 1000 then
+ ReplaceChar(lDocumentation,['}','{', #13, #10],' ')
+ else begin
+ ReplaceChar(lDocumentation,['}','{'],' ');
+ lDocumentation:=StringReplace(lDocumentation,#10, #10' ',[rfReplaceAll]);
+ end;
+
+ WriteEmptyLine;
+ Write('{ Description:',IndentationLevel);
+ Write(' '+lDocumentation,IndentationLevel);
+ if (anOperation.Result<>NIL) then begin
+ Write('');
+ Write(' Return Type: '+GetDataType(anOperation.Result.DataType),IndentationLevel);
+ end;
+ Write(' Params',IndentationLevel);
+ for i := 0 to (anOperation.Count-1) do begin
+ Write(' '+IntToStr(i+1)+') '+anOperation[i].Name+' ('+GetDataType(anOperation[i].DataType)+') : '+anOperation[i].Documentation,IndentationLevel);
+ end;
+
+ Write('}',IndentationLevel);
+ end;
+end;
+
+procedure TRODLToIntf.WriteServiceDeclaration(aService : TRODLService);
+var i : integer;
+begin
+ if not aService.IsFromUsedRodl then with aService.Default do begin
+ Write(Format('{ I%s }', [aService.Info.Name]), PASCAL_INDENTATION_LEVEL_1);
+
+ WriteDocumentation(aService);
+
+ if aService.Ancestor <> '' then begin
+ Write(Format('I%s = interface(I%s)', [aService.Info.Name,aService.Ancestor]), PASCAL_INDENTATION_LEVEL_1);
+ end
+ else begin
+ Write(Format('I%s = interface', [aService.Info.Name]), PASCAL_INDENTATION_LEVEL_1);
+ end;
+ Write(Format('[''%s'']', [GUIDToString(Info.UID)]), PASCAL_INDENTATION_LEVEL_2);
+
+ for i := 0 to (Count-1) do begin
+ WriteOperationDocumentation(Items[i], PASCAL_INDENTATION_LEVEL_2);
+ Write(GetOperationDefinition(Items[i]), PASCAL_INDENTATION_LEVEL_2);
+ end;
+
+ Write('end;', PASCAL_INDENTATION_LEVEL_1);
+ WriteEmptyLine;
+
+ Write(Format('{ Co%s }', [aService.Info.Name]), PASCAL_INDENTATION_LEVEL_1);
+ Write(Format('Co%s = class', [aService.Info.Name]), PASCAL_INDENTATION_LEVEL_1);
+ Write(Format('class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): I%s;',
+ [aService.Info.Name]), PASCAL_INDENTATION_LEVEL_2);
+ Write('end;', PASCAL_INDENTATION_LEVEL_1);
+ WriteEmptyLine;
+
+ Write(Format('{ T%s_Proxy }', [aService.Info.Name]), PASCAL_INDENTATION_LEVEL_1);
+ if aService.Ancestor <> '' then begin
+ Write(Format('T%s_Proxy = class(T%s_Proxy, I%s)', [aService.Info.Name, aService.Ancestor, aService.Info.Name]),PASCAL_INDENTATION_LEVEL_1);
+ end
+ else begin
+ Write(Format('T%s_Proxy = class(TROProxy, I%s)', [aService.Info.Name, aService.Info.Name]),PASCAL_INDENTATION_LEVEL_1);
+ end;
+ //Write('private',PASCAL_INDENTATION_LEVEL_1);
+ Write('protected',PASCAL_INDENTATION_LEVEL_1);
+ //Write(' // Internal',PASCAL_INDENTATION_LEVEL_1);
+ Write(' function __GetInterfaceName:string; override;',PASCAL_INDENTATION_LEVEL_1);
+ WriteEmptyLine;
+ //Write(Format(' // %s', [aService.Info.Name]),PASCAL_INDENTATION_LEVEL_1);
+
+ for i := 0 to (Count-1) do
+ Write(GetOperationDefinition(Items[i]), PASCAL_INDENTATION_LEVEL_2);
+ Write('end;',PASCAL_INDENTATION_LEVEL_1);
+ WriteEmptyLine;
+
+ end;
+end;
+
+procedure TRODLToIntf.WriteEventSinkDeclaration(aEventSink : TRODLEventSink);
+var i : integer;
+begin
+ if not aEventSink.IsFromUsedRodl then with aEventSink.Default do begin
+ { Client events }
+ Write(Format('{ I%s }', [aEventSink.Info.Name]), PASCAL_INDENTATION_LEVEL_1);
+ WriteDocumentation(aEventSink);
+ if aEventSink.Ancestor <> '' then begin
+ Write(Format('I%s = interface(I%s)', [aEventSink.Info.Name,aEventSink.Ancestor]), PASCAL_INDENTATION_LEVEL_1);
+ end
+ else begin
+ Write(Format('I%s = interface', [aEventSink.Info.Name]), PASCAL_INDENTATION_LEVEL_1);
+ end;
+ Write(Format('[''%s'']', [GUIDToString(Info.UID)]), PASCAL_INDENTATION_LEVEL_2);
+
+ for i := 0 to (Count-1) do begin
+ WriteOperationDocumentation(Items[i], PASCAL_INDENTATION_LEVEL_2);
+ Write(GetOperationDefinition(Items[i]), PASCAL_INDENTATION_LEVEL_2);
+ end;
+
+ Write('end;', PASCAL_INDENTATION_LEVEL_1);
+ WriteEmptyLine;
+
+ { Events writer }
+ Write(Format('{ I%s_Writer }', [aEventSink.Info.Name]), PASCAL_INDENTATION_LEVEL_1);
+ WriteDocumentation(aEventSink);
+ if aEventSink.Ancestor <> '' then begin
+ Write(Format('I%s_Writer = interface(I%s_Writer)', [aEventSink.Info.Name,aEventSink.Ancestor]), PASCAL_INDENTATION_LEVEL_1);
+ end
+ else begin
+ Write(Format('I%s_Writer = interface(IROEventWriter)', [aEventSink.Info.Name]), PASCAL_INDENTATION_LEVEL_1);
+ end;
+ Write(Format('[''%s'']', [GUIDToString(Info.UID){GUIDToString(NewUID)}]), PASCAL_INDENTATION_LEVEL_2);
+
+ for i := 0 to (Count-1) do begin
+ Write(GetOperationDefinition(Items[i], '', '', TRUE), PASCAL_INDENTATION_LEVEL_2);
+ end;
+
+ Write('end;', PASCAL_INDENTATION_LEVEL_1);
+ WriteEmptyLine;
+ end;
+end;
+
+procedure TRODLToIntf.WriteEventSink(aLibrary : TRODLLibrary; aEventSink : TRODLEventSink);
+var i, x : integer;
+ parline, typname : string;
+ par : TRODLOperationParam;
+begin
+ if not aEventSink.IsFromUsedRodl then with aEventSink.Default do begin
+ { -------------------------- EVENT WRITER -------------------------- }
+ Write('type');
+
+ { Event writer class }
+ Write(Format('{ T%s_Writer }', [aEventSink.Info.Name]), PASCAL_INDENTATION_LEVEL_1);
+ if aEventSink.Ancestor <> '' then begin
+ Write(Format('T%s_Writer = class(T%s_Writer, I%s_Writer)', [aEventSink.Info.Name, aEventSink.Ancestor, aEventSink.Info.Name]),PASCAL_INDENTATION_LEVEL_1);
+ end
+ else begin
+ Write(Format('T%s_Writer = class(TROEventWriter, I%s_Writer)', [aEventSink.Info.Name, aEventSink.Info.Name]),PASCAL_INDENTATION_LEVEL_1);
+ end;
+ //Write('private',PASCAL_INDENTATION_LEVEL_1);
+ Write('protected',PASCAL_INDENTATION_LEVEL_1);
+ //Write(' // Internal',PASCAL_INDENTATION_LEVEL_1);
+ //Write(Format(' // %s', [aEventSink.Info.Name]),PASCAL_INDENTATION_LEVEL_1);
+
+ for i := 0 to (Count-1) do
+ Write(GetOperationDefinition(Items[i], '', '', TRUE), PASCAL_INDENTATION_LEVEL_2);
+ Write('end;',PASCAL_INDENTATION_LEVEL_1);
+ WriteEmptyLine;
+
+ { Actual methods }
+ for i := 0 to (Count-1) do begin
+ Write(GetOperationDefinition(Items[i], 'T'+aEventSink.Info.Name+'_Writer', '', TRUE));
+ Write('var __eventdata : Binary;');
+
+ Write('begin');
+ Write(' __eventdata := Binary.Create;');
+ Write(' try');
+ Write(Format(' __Message.InitializeEventMessage(NIL, ''%s'', EID_%s, ''%s'');', [aLibrary.Name, aEventSink.Info.Name, Items[i].Info.Name]));
+
+ { Write parameters }
+ for x := 0 to (Items[i].Count-1) do begin
+ par := Items[i].Items[x];
+ typname := GetDataType(par.DataType);
+
+{ if IsUserDefinedType(typname,aLibrary) then begin
+ typname := GetFullyQualifiedTypeName(typname,aLibrary,fIntfUnitName);
+ end;}
+ Write(Format(' __Message.Write(''%s'', TypeInfo(%s), %s, []);', [par.Name, typname, par.Name]));
+ end;
+
+ Write(' __Message.Finalize;');
+ WriteEmptyLine;
+ Write(' __Message.WriteToStream(__eventdata);');
+ WriteEmptyLine;
+ Write(' Repository.StoreEventData(__Sender, __eventdata, ExcludeSender, ExcludeSessionList, SessionList.CommaText);');
+ Write(' finally');
+ Write(' __eventdata.Free;');
+ Write(' end;');
+ Write('end;');
+ WriteEmptyLine;
+ end;
+
+ { -------------------------- INVOKER -------------------------- }
+ Write('type');
+
+ { Event invoker class }
+ Write(Format('{ T%s_Invoker }', [aEventSink.Info.Name]), PASCAL_INDENTATION_LEVEL_1);
+ if aEventSink.Ancestor <> '' then begin
+ Write(Format('T%s_Invoker = class(T%s_Writer, I%s)', [aEventSink.Info.Name, aEventSink.Ancestor, aEventSink.Info.Name]),PASCAL_INDENTATION_LEVEL_1);
+ end
+ else begin
+ Write(Format('T%s_Invoker = class(TROEventInvoker)', [aEventSink.Info.Name]),PASCAL_INDENTATION_LEVEL_1);
+ end;
+ Write('published',PASCAL_INDENTATION_LEVEL_1);
+
+ for i := 0 to (Count-1) do
+ Write('procedure Invoke_'+Items[i].Info.Name+'(__EventReceiver : TROEventReceiver; const __Message : IROMessage; const __Target : IUnknown);', PASCAL_INDENTATION_LEVEL_2);
+
+
+ Write('end;',PASCAL_INDENTATION_LEVEL_1);
+ WriteEmptyLine;
+
+ { Actual methods }
+
+ for i := 0 to (Count-1) do begin
+ Write(Format('procedure T%s_Invoker.Invoke_%s(__EventReceiver : TROEventReceiver; const __Message : IROMessage; const __Target : IUnknown);',
+ [aEventSink.Info.Name, Items[i].Info.Name]));
+ //Write(GetOperationDefinition(Items[i], 'T'+aEventSink.Info.Name+'_Invoker', '', FALSE));
+
+ { Write local variables }
+ Write('var');
+ Write('__lObjectDisposer: TROObjectDisposer;');
+ if (Items[i].Count>0) then begin
+ for x := 0 to (Items[i].Count-1) do begin
+ par := Items[i].Items[x];
+ typname := GetDataType(par.DataType);
+
+ { if IsUserDefinedType(typname,aLibrary) then begin
+ typname := GetFullyQualifiedTypeName(typname,aLibrary,fIntfUnitName);
+ end;}
+ Write(Format(' %s: %s;', [par.Name, typname]));
+ end;
+ end;
+
+ Write('begin');
+
+ for x := 0 to Items[i].Count-1 do begin
+ par := Items[i].Items[x];
+ typname := GetDataType(par.DataType);
+
+ if not IsSimpleType(typname, aLibrary)
+ then Write(Format(' %s := NIL;', [par.Name]));
+ end;
+ if Items[i].Count>0 then WriteEmptyLine;
+
+ Write('try', PASCAL_INDENTATION_LEVEL_1);
+ parline := '';
+ { Readers local variables values }
+ if (Items[i].Count>0) then begin
+ for x := 0 to (Items[i].Count-1) do begin
+ par := Items[i].Items[x];
+ parline := parline+par.Name+', ';
+
+ typname := GetDataType(par.DataType);
+
+ { if IsUserDefinedType(typname,aLibrary) then begin
+ typname := GetFullyQualifiedTypeName(typname,aLibrary,fIntfUnitName);
+ end;}
+
+ Write(Format('__Message.Read(''%s'', TypeInfo(%s), %s, []);', [par.Name, typname, par.Name]), PASCAL_INDENTATION_LEVEL_2);
+ end;
+ end;
+
+ WriteEmptyLine;
+ parline := Copy(parline, 1, Length(parline)-2);
+ Write(Format('(__Target as I%s).%s(%s);',
+ [aEventSink.Info.Name, Items[i].Info.Name, parline]), PASCAL_INDENTATION_LEVEL_2);
+ WriteEmptyLine;
+
+ Write('finally', PASCAL_INDENTATION_LEVEL_1);
+ Write('__lObjectDisposer:= TROObjectDisposer.Create(__EventReceiver);', PASCAL_INDENTATION_LEVEL_2);
+ Write('try', PASCAL_INDENTATION_LEVEL_2);
+ for x := 0 to Items[i].Count-1 do begin
+ par := Items[i].Items[x];
+ typname := GetDataType(par.DataType);
+
+ if not IsSimpleType(typname, aLibrary)
+ then Write('__lObjectDisposer.Add('+par.Name+');', PASCAL_INDENTATION_LEVEL_3);
+ end;
+ Write('finally', PASCAL_INDENTATION_LEVEL_2);
+ Write('__lObjectDisposer.Free();', PASCAL_INDENTATION_LEVEL_3);
+ Write('end', PASCAL_INDENTATION_LEVEL_2);
+ Write('end', PASCAL_INDENTATION_LEVEL_1);
+
+ Write('end;');
+ WriteEmptyLine;
+ end;
+ end;
+end;
+
+class function TRODLToIntf.GetTargetFileName(const aLibrary: TRODLLibrary;
+ const aTargetEntity: string): string;
+begin
+ try
+ result := aLibrary.Info.Name+'_Intf.pas'
+ except
+ result := 'Unknown.pas';
+ end;
+end;
+
+const
+ InnerIndent = 4;
+
+procedure TRODLToIntf.WriteCoClass(aLibrary: TRODLLibrary; aService: TRODLService);
+var i, p : integer;
+ sa : string;
+// soapsvc : boolean;
+ typname : string;
+// urn : string;
+begin
+ with aService.Default do begin
+// soapsvc := IsSOAPService(aService);
+
+ Write('{ Co'+aService.Info.Name+' }');
+ WriteEmptyLine;
+
+ Write(Format('class function Co%s.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): I%s;',
+ [aService.Info.Name, aService.Info.Name]));
+ Write('begin');
+ Write(Format(' result := T%s_Proxy.Create(aMessage, aTransportChannel);', [aService.Info.Name]));
+ Write('end;');
+ WriteEmptyLine;
+
+ if Count > 0 then begin
+ Write(Format('{ T%s_Proxy }', [aService.Info.Name]));
+ WriteEmptyLine;
+ end;
+
+ Write(Format('function T%s_Proxy.__GetInterfaceName:string;',[aService.Info.Name]));
+ Write('begin');
+ Write(Format(' result := ''%s'';',[aService.Info.Name]));
+ Write('end;');
+ WriteEmptyLine;
+
+ for i := 0 to (Count-1) do begin
+ Write(GetOperationDefinition(Items[i], Format('T%s_Proxy', [aService.Info.Name])));
+// Write('var');
+// Write(' __request, __response : TMemoryStream;');
+ //if soapsvc then write('var');
+ //if soapsvc then Write(' __http : IROHTTPTransport;');
+ //if soapsvc then Write(' __TargetUrlWasSet : boolean;');
+ Write('begin');
+ //if soapsvc then Write('__TargetUrlWasSet := false;',PASCAL_INDENTATION_LEVEL_1);
+
+ sa := GetAttributes(Items[i].Info.Attributes, aService.Info.Attributes, aLibrary.Info.Attributes, InnerIndent);
+ if sa <> '' then
+ Write('__Message.SetAttributes(__TransportChannel, '+sa+');', InnerIndent);
+ write('try', PASCAL_INDENTATION_LEVEL_1);
+
+ with Items[i] do begin
+ for p := 0 to (Count-1) do
+ if (Items[p].Flag = fOut) and IsImplementedAsClass(Items[p].DataType, aLibrary) then
+ Write(Format('%s := nil;', [Items[p].Name]),PASCAL_INDENTATION_LEVEL_2);
+ if Assigned(Result) and IsImplementedAsClass(Result.DataType, aLibrary) then
+ Write('result := nil;', PASCAL_INDENTATION_LEVEL_2);
+ end;
+
+// Write('__request := TMemoryStream.Create;',PASCAL_INDENTATION_LEVEL_1);
+// Write('__response := TMemoryStream.Create;',PASCAL_INDENTATION_LEVEL_1);
+// WriteEmptyLine;
+// Write('try',PASCAL_INDENTATION_LEVEL_1);
+
+(* if soapsvc then begin
+ urn := Items[i].Info.Attributes.Values['Action'];
+ if (urn='') then urn := Items[0].Info.Attributes.Values['InputNamespace']; // Apache ones...
+
+ if Items[i].Info.Attributes.Values['InputMessageName'] <> '' then
+ Write(Format('__Message.InitializeRequestMessage(__TransportChannel, ''%s'', TargetNamespace, ''%s'');', [aLibrary.Info.Name, Items[i].Info.Attributes.Values['InputMessageName']]),InnerIndent)
+ else
+ Write(Format('__Message.InitializeRequestMessage(__TransportChannel, ''%s'', TargetNamespace, ''%s'');', [aLibrary.Info.Name, Items[i].Info.Name]),InnerIndent);
+
+ WriteEmptyLine;
+ Write('if Supports(__TransportChannel, IROHTTPTransport, __http) then begin',InnerIndent);
+ Write(Format(' __http.Headers[''SOAPAction''] := ''"%s"'';', [Items[i].Info.Attributes.Values['Action']]),InnerIndent);
+ Write(' __TargetUrlWasSet := (__http.TargetURL='''');',InnerIndent);
+ Write(Format(' if __TargetUrlWasSet then __http.TargetURL := %s_EndPointURI;', [aService.Info.Name]),InnerIndent);
+ Write('end;',InnerIndent);
+ WriteEmptyLine;
+ end
+ else begin
+ //Write(Format('__Message.Initialize(__TransportChannel, ''%s'', ''%s'', ''%s'');', [aLibrary.Info.Name, aService.Info.Name, Items[i].Info.Name]),InnerIndent);
+ if Items[i].Info.Attributes.Values['InputMessageName'] <> '' then
+ Write(Format('__Message.InitializeRequestMessage(__TransportChannel, ''%s'', __InterfaceName, ''%s'');', [aLibrary.Info.Name, Items[i].Info.Attributes.Values['InputMessageName']]),InnerIndent)
+ else*)
+ Write(Format('__Message.InitializeRequestMessage(__TransportChannel, ''%s'', __InterfaceName, ''%s'');', [aLibrary.Info.Name, Items[i].Info.Name]),InnerIndent);
+(* end;*)
+
+ with Items[i] do begin
+ for p := 0 to (Count-1) do
+ if IsInputFlag(Items[p].Flag) then begin
+ if (StrToDataType(Items[p].DataType)=rtDateTime)
+ then sa := '[paIsDateTime]'
+ else sa := '[]';
+
+
+ typname := GetDataType(Items[p].DataType);
+ if IsUserDefinedType(typname,aLibrary) then begin
+ typname := GetFullyQualifiedTypeName(typname,aLibrary,fUnitName);
+ end;
+
+ Write(Format('__Message.Write(''%s'', TypeInfo(%s), %s, %s);',
+ [Items[p].Name, typname, Items[p].Name, sa]),InnerIndent);
+ end;
+ end;
+ Write('__Message.Finalize;',InnerIndent);
+ WriteEmptyLine;
+
+// Write('__Message.WriteToStream(__request);',InnerIndent);
+// Write('__TransportChannel.Dispatch(__request, __response);',InnerIndent);
+// Write('__Message.ReadFromStream(__response);',InnerIndent);
+ Write('__TransportChannel.Dispatch(__Message);',InnerIndent);
+ WriteEmptyLine;
+
+ //Write(Format('Message.Initialize(''I%s'', ''%s'');', [aService.Name, Items[i].Name]),InnerIndent);
+ with Items[i] do begin
+
+ if Assigned(Result) then begin
+ if (StrToDataType(Result.DataType)=rtDateTime)
+ then sa := '[paIsDateTime]'
+ else sa := '[]';
+
+ typname := GetDataType(Result.DataType);
+ if IsUserDefinedType(typname,aLibrary) then begin
+ typname := GetFullyQualifiedTypeName(typname,aLibrary,fUnitName);
+ end;
+
+ Write(Format('__Message.Read(''%s'', TypeInfo(%s), result, %s);',
+ [Result.Name, typname, sa]),InnerIndent);
+ end;
+
+ for p := 0 to (Count-1) do
+ if IsOutputFlag(Items[p].Flag) then begin
+
+ if (StrToDataType(Items[p].DataType)=rtDateTime)
+ then sa := '[paIsDateTime]'
+ else sa := '[]';
+
+ typname := GetDataType(Items[p].DataType);
+ if IsUserDefinedType(typname,aLibrary) then begin
+ typname := GetFullyQualifiedTypeName(typname,aLibrary,fUnitName);
+ end;
+
+ Write(Format('__Message.Read(''%s'', TypeInfo(%s), %s, %s);',
+ [Items[p].Name, typname, Items[p].Name, sa]),InnerIndent);
+ end;
+ end;
+ //Write('Message.Finalize;',InnerIndent);
+
+ Write(' finally');
+(* if soapsvc then begin
+ Write(' if Supports(__TransportChannel, IROHTTPTransport, __http) then begin',InnerIndent);
+ Write(' if __TargetUrlWasSet then __http.TargetURL := '''';',InnerIndent);
+ Write(' end;',InnerIndent);
+ WriteEmptyLine;
+ end;*)
+ if sa <> '' then
+ Write(' __Message.UnsetAttributes(__TransportChannel);');
+ Write(' __Message.FreeStream;');
+// Write(' __response.Free;');
+ Write(' end');
+ Write('end;');
+ WriteEmptyLine;
+ end;
+
+ end;
+end;
+
+function TRODLToIntf.IsSOAPService(aService: TRODLService): boolean;
+begin
+ result := aService.Attributes.Values['Type'] = 'SOAP';
+end;
+
+procedure TRODLToIntf.WriteTypeDeclaration(aLibrary: TRODLLibrary; aType: TRODLEntity);
+var
+ i : integer;
+ AList: TList;
+ s: string;
+ lNeedInitSimpleTypeWithDefaultValues: boolean;
+begin
+ Write(Format('{ %s }', [aType.Name]), PASCAL_INDENTATION_LEVEL_1);
+ // Structs
+ if (aType is TRODLStruct) then with TRODLStruct(aType) do begin
+
+ WriteDocumentation(aType);
+ if Ancestor <> '' then begin
+ Write(Format('%s = class(%s)', [Name,Ancestor]),PASCAL_INDENTATION_LEVEL_1);
+ end
+ else begin
+ Write(Format('%s = class(TROComplexType)', [Name]),PASCAL_INDENTATION_LEVEL_1);
+ end;
+ if Count > 0 then begin
+
+ Write('private',PASCAL_INDENTATION_LEVEL_1);
+ for i := 0 to (Count-1) do begin
+ Write(Format('f%s: %s;', [Items[i].Name, GetDataType(Items[i].DataType)]), PASCAL_INDENTATION_LEVEL_2);
+ end;
+ //WriteEmptyLine;
+ lNeedInitSimpleTypeWithDefaultValues := False;
+ for i := 0 to (Count-1) do begin
+ //if IsStruct(Items[i].DataType, aLibrary) or IsArray(Items[i].DataType, aLibrary) then begin
+ if IsImplementedAsClass(Items[i].DataType, aLibrary) then begin
+ //Write(Format('procedure Set%s(Value : %s);', [Items[i].Name, Items[i].DataType]), PASCAL_INDENTATION_LEVEL_2);
+ Write(Format('function Get%s: %s;', [Items[i].Name, GetDataType(Items[i].DataType)]), PASCAL_INDENTATION_LEVEL_2);
+ end
+ else begin
+ lNeedInitSimpleTypeWithDefaultValues := lNeedInitSimpleTypeWithDefaultValues or (Items[i].Attributes.IndexOfName('Default') <> -1);
+ end;
+ end;
+
+ Write('public',PASCAL_INDENTATION_LEVEL_1);
+ if lNeedInitSimpleTypeWithDefaultValues then begin
+ Write('constructor Create(aCollection : TCollection); override;', PASCAL_INDENTATION_LEVEL_2);
+ end;
+ if aType.Attributes.Count > 0 then begin
+ Write('class function GetAttributeCount: Integer; override;', PASCAL_INDENTATION_LEVEL_2);
+ Write('class function GetAttributeName(aIndex: Integer): string; override;', PASCAL_INDENTATION_LEVEL_2);
+ Write('class function GetAttributeValue(aIndex: Integer): string; override;', PASCAL_INDENTATION_LEVEL_2);
+ WriteEmptyLine;
+ end;
+ {Write(' constructor Create; override;',PASCAL_INDENTATION_LEVEL_1);
+ Write(' destructor Destroy; override;',PASCAL_INDENTATION_LEVEL_1);}
+ Write('procedure Assign(iSource: TPersistent); override;',PASCAL_INDENTATION_LEVEL_2);
+ if (CalcItemsMarshalingOrder(True).Count>0) and (Count > 0) then begin
+ Write('procedure ReadComplex(ASerializer: TObject); override;',PASCAL_INDENTATION_LEVEL_2);
+ Write('procedure WriteComplex(ASerializer: TObject); override;',PASCAL_INDENTATION_LEVEL_2);
+ end;
+ //WriteEmptyLine;
+ Write('published',PASCAL_INDENTATION_LEVEL_1);
+ for i := 0 to (Count-1) do begin
+ //if IsStruct(Items[i].DataType, aLibrary) or IsArray(Items[i].DataType, aLibrary)
+ WriteDocumentation(Items[i]);
+ if IsImplementedAsClass(Items[i].DataType, aLibrary) then begin
+ Write(Format('property %s:%s read Get%s write f%s;',
+ [Items[i].Name, GetDataType(Items[i].DataType), Items[i].Name, Items[i].Name]), PASCAL_INDENTATION_LEVEL_2)
+ end
+ else begin
+ Write(Format('property %s:%s read f%s write f%s;',
+ [Items[i].Name, GetDataType(Items[i].DataType), Items[i].Name, Items[i].Name]), PASCAL_INDENTATION_LEVEL_2);
+ end;
+ end;
+ //WriteEmptyLine;
+ end;
+ Write('end;', PASCAL_INDENTATION_LEVEL_1);
+ WriteEmptyLine;
+
+ // Adds also a collection. This is handy when dealing with VCL wrappers
+ Write(Format('{ %sCollection }', [aType.Name]), PASCAL_INDENTATION_LEVEL_1);
+ if Ancestor <> '' then begin
+ Write(Format('%sCollection = class(%sCollection)', [Name,Ancestor]),PASCAL_INDENTATION_LEVEL_1);
+ end
+ else begin
+ Write(Format('%sCollection = class(TROCollection)', [Name]),PASCAL_INDENTATION_LEVEL_1);
+ end;
+
+ Write('protected', PASCAL_INDENTATION_LEVEL_1);
+ Write('constructor Create(aItemClass: TCollectionItemClass); overload;', PASCAL_INDENTATION_LEVEL_2);
+ Write(Format('function GetItems(aIndex: integer): %s;', [Name]), PASCAL_INDENTATION_LEVEL_2);
+ Write(Format('procedure SetItems(aIndex: integer; const Value: %s);', [Name]), PASCAL_INDENTATION_LEVEL_2);
+ Write('public', PASCAL_INDENTATION_LEVEL_1);
+ Write('constructor Create; overload;', PASCAL_INDENTATION_LEVEL_2);
+
+ Write(Format('function Add: %s; reintroduce;', [Name]), PASCAL_INDENTATION_LEVEL_2);
+
+ aList := TList.Create;
+ try
+ aLibrary.GetArraysByElement(Name,aList);
+ if aList.Count > 1 then s:= ' overload;' else s:='';
+ for i:=0 to aList.Count-1 do begin
+ Write(Format('procedure SaveToArray(anArray: %s);'+s, [TRODLArray(aList[i]).Name]), PASCAL_INDENTATION_LEVEL_2);
+ Write(Format('procedure LoadFromArray(anArray: %s);'+s, [TRODLArray(aList[i]).Name]), PASCAL_INDENTATION_LEVEL_2);
+ end;
+ finally
+ aList.Free;
+ end;
+
+ Write(Format('property Items[Index: integer]:%s read GetItems write SetItems; default;', [Name]), PASCAL_INDENTATION_LEVEL_2);
+ Write('end;', PASCAL_INDENTATION_LEVEL_1);
+ WriteEmptyLine;
+ end
+
+ // Arrays
+ else if (aType is TRODLArray) then with TRODLArray(aType) do begin
+ WriteDocumentation(aType);
+ Write(Format('%s_%s = array of %s;', [Name, GetDataType(ElementType),GetDataType(ElementType)]), PASCAL_INDENTATION_LEVEL_1);
+ Write(Format('%s = class(TROArray)', [Name]),PASCAL_INDENTATION_LEVEL_1);
+ Write('private',PASCAL_INDENTATION_LEVEL_1);
+
+ Write(' fCount: Integer;', PASCAL_INDENTATION_LEVEL_1);
+
+ Write(Format(' fItems : %s_%s;', [Name, GetDataType(ElementType)]), PASCAL_INDENTATION_LEVEL_1);
+ Write('protected',PASCAL_INDENTATION_LEVEL_1);
+
+ Write('procedure Grow; virtual;',PASCAL_INDENTATION_LEVEL_2);
+
+ Write(Format('function GetItems(aIndex: integer): %s;', [GetDataType(ElementType)]),PASCAL_INDENTATION_LEVEL_2);
+ Write(Format('procedure SetItems(aIndex: integer; const Value: %s);', [GetDataType(ElementType)]),PASCAL_INDENTATION_LEVEL_2);
+ Write('function GetCount: integer; override;',PASCAL_INDENTATION_LEVEL_2);
+ Write('public',PASCAL_INDENTATION_LEVEL_1);
+ if aType.Attributes.Count > 0 then begin
+ Write('class function GetAttributeCount: Integer; override;', PASCAL_INDENTATION_LEVEL_2);
+ Write('class function GetAttributeName(aIndex: Integer): string; override;', PASCAL_INDENTATION_LEVEL_2);
+ Write('class function GetAttributeValue(aIndex: Integer): string; override;', PASCAL_INDENTATION_LEVEL_2);
+ end;
+ Write('class function GetItemType: PTypeInfo; override;',PASCAL_INDENTATION_LEVEL_2);
+ if IsImplementedAsClass(GetDataType(ElementType), aLibrary) then begin
+ Write('class function GetItemClass: TClass; override;',PASCAL_INDENTATION_LEVEL_2);
+ end;
+ Write('class function GetItemSize: integer; override;',PASCAL_INDENTATION_LEVEL_2);
+ WriteEmptyLine;
+ Write(' function GetItemRef(aIndex: integer): pointer; override;',PASCAL_INDENTATION_LEVEL_1);
+ if not IsSimpleType(GetDataType(ElementType),aLibrary) then begin
+ Write(' procedure SetItemRef(aIndex: integer; Ref: pointer); override;',PASCAL_INDENTATION_LEVEL_1);
+ end;
+ Write(' procedure Clear; override;',PASCAL_INDENTATION_LEVEL_1);
+ Write(' procedure Delete(aIndex: integer); override;',PASCAL_INDENTATION_LEVEL_1);
+
+ Write(' procedure Resize(ElementCount: integer); override;',PASCAL_INDENTATION_LEVEL_1);
+
+ WriteEmptyLine;
+
+ Write('procedure Assign(iSource:TPersistent); override;',PASCAL_INDENTATION_LEVEL_2);
+ Write('procedure ReadComplex(ASerializer: TObject); override;',PASCAL_INDENTATION_LEVEL_2);
+ Write('procedure WriteComplex(ASerializer: TObject); override;',PASCAL_INDENTATION_LEVEL_2);
+
+ if IsSimpleType(GetDataType(ElementType), aLibrary) then begin
+ Write(Format(' function Add(const Value:%s): integer;', [GetDataType(ElementType)]), PASCAL_INDENTATION_LEVEL_1);
+ Write('function GetIndex(const aPropertyName : string;',PASCAL_INDENTATION_LEVEL_2);
+ Write(' const aPropertyValue : Variant;',PASCAL_INDENTATION_LEVEL_2);
+ Write(' StartFrom : integer = 0;',PASCAL_INDENTATION_LEVEL_2);
+ Write(' Options : TROSearchOptions = [soIgnoreCase]) : integer; override;',PASCAL_INDENTATION_LEVEL_2);
+ end
+ else begin
+ Write(Format(' function Add: %s; overload;', [GetDataType(ElementType)]), PASCAL_INDENTATION_LEVEL_1);
+ Write(Format(' function Add(const Value: %s):integer; overload;', [GetDataType(ElementType)]), PASCAL_INDENTATION_LEVEL_1);
+ end;
+
+ WriteEmptyLine;
+ Write(' property Count : integer read GetCount;',PASCAL_INDENTATION_LEVEL_1);
+ Write(Format(' property Items[Index: integer]:%s read GetItems write SetItems; default;', [GetDataType(ElementType)]), PASCAL_INDENTATION_LEVEL_1);
+ Write(Format(' property InnerArray: %s_%s read fItems;', [Name, GetDataType(ElementType)]), PASCAL_INDENTATION_LEVEL_1);
+ //WriteEmptyLine;
+ Write('end;',PASCAL_INDENTATION_LEVEL_1);
+ WriteEmptyLine;
+ end;
+end;
+
+
+procedure TRODLToIntf.WriteArraySerializer(aLibrary : TRODLLibrary; anArray : TRODLArray);
+begin
+ with anArray do begin
+ Write('{ '+Name+' }');
+ WriteEmptyLine;
+
+ if anArray.Attributes.Count > 0 then
+ WriteAttributesMethods(anArray);
+
+ Write(Format('procedure %s.Assign(iSource: TPersistent);',[Name]));
+ Write(Format('var lSource:%s;',[Name]));
+ Write(Format(' i:integer;',[Name]));
+ Write('begin');
+ Write(Format(' if (iSource is %s) then begin',[Name]));
+ Write(Format(' lSource := %s(iSource);',[Name]));
+ Write(' Clear();');
+ Write(' Resize(lSource.Count);');
+ WriteEmptyLine;
+ Write(' for i := 0 to Count-1 do begin');
+
+ {if (ElementType = 'Binary') then begin
+ Write(' if Assigned(lSource.Items[i]) then begin');
+ Write(' Items[i] := Binary.Create();');
+ Write(' Items[i].Clear();');
+ Write(' Items[i].CopyFrom(lSource.Items[i],0);');
+ Write(' end;');
+ end
+ else} if IsImplementedAsClass(GetDataType(ElementType), aLibrary) then begin
+ Write(' if Assigned(lSource.Items[i]) then begin');
+ Write(' Items[i].Assign(lSource.Items[i]);');
+ Write(' end;');
+ end
+ else begin
+ Write(' Items[i] := lSource.Items[i];');
+ end;
+
+ Write(' end;');
+ Write(' end');
+ Write(' else begin');
+ Write(' inherited Assign(iSource);');
+ Write(' end;');
+ Write('end;');
+ WriteEmptyLine;
+
+ // GetItemType
+ Write(Format('class function %s.GetItemType: PTypeInfo;', [Name]));
+ Write('begin');
+ Write(Format(' result := TypeInfo(%s);', [GetDataType(ElementType)]));
+ Write('end;');
+ WriteEmptyLine;
+
+ // GetItemClass
+ if IsImplementedAsClass(GetDataType(ElementType), aLibrary) then begin
+ Write(Format('class function %s.GetItemClass: TClass;', [Name]));
+ Write( 'begin');
+ Write(Format(' result := %s;', [GetDataType(ElementType)]));
+ Write( 'end;');
+ WriteEmptyLine;
+ end;
+
+ // GetItemSize
+ Write(Format('class function %s.GetItemSize: integer;', [Name]));
+ Write('begin');
+ Write(Format(' result := SizeOf(%s);', [GetDataType(ElementType)]));
+ Write('end;');
+ WriteEmptyLine;
+
+ // GetItems
+ Write(Format('function %s.GetItems(aIndex: integer): %s;', [Name, GetDataType(ElementType)]));
+ Write('begin');
+ Write(' if (aIndex < 0) or (aIndex >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);');
+ Write(' result := fItems[aIndex];');
+ Write('end;');
+ WriteEmptyLine;
+
+ // GetItemRef
+ Write(Format('function %s.GetItemRef(aIndex: integer): pointer;', [Name]));
+ Write('begin');
+ Write(' if (aIndex < 0) or (aIndex >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);');
+ if IsSimpleType(GetDataType(ElementType), aLibrary)
+ then Write(' result := @fItems[aIndex];')
+ else Write(' result := fItems[aIndex];');
+ Write('end;');
+ WriteEmptyLine;
+
+ // SetItemRef
+ if not IsSimpleType(GetDataType(ElementType), aLibrary) then begin
+ Write(Format('procedure %s.SetItemRef(aIndex: integer; Ref: pointer);', [Name]));
+ Write('begin');
+ Write(' if (aIndex < 0) or (aIndex >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);');
+ Write(' if Ref <> fItems[aIndex] then begin');
+ write(' if fItems[aIndex] <> nil then fItems[aIndex].Free;');
+ Write(' fItems[aIndex] := Ref;');
+ write(' end;');
+ Write('end;');
+ WriteEmptyLine;
+ end;
+
+ // Clear
+ Write(Format('procedure %s.Clear;', [Name]));
+ if not IsSimpleType(GetDataType(ElementType), aLibrary) then Write('var i: integer;');
+ Write('begin');
+ if not IsSimpleType(GetDataType(ElementType), aLibrary) then Write(' for i := 0 to (Count-1) do fItems[i].Free();');
+ Write(' SetLength(fItems, 0);');
+
+ Write(' FCount := 0;');
+
+ Write('end;');
+ WriteEmptyLine;
+
+ // Delete
+ Write(Format('procedure %s.Delete(aIndex: integer);', [Name]));
+ //if not IsSimpleType(ElementType) then Write(' for i := 0 to (Count-1) do fItems[i].Free;');
+ Write('var i: integer;');
+ Write('begin');
+ Write(' if (aIndex>=Count) then RaiseError(err_InvalidIndex, [aIndex]);');
+ WriteEmptyLine;
+ if not IsSimpleType(GetDataType(ElementType), aLibrary) then begin
+ Write(' fItems[aIndex].Free();');
+ WriteEmptyLine;
+ end;
+ //ToDo: thic can probably be optimized???
+ Write(' if (aIndex= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);');
+ if not IsSimpleType(GetDataType(ElementType), aLibrary) then begin
+ Write(' if fItems[aIndex] <> Value then begin');
+ Write(' fItems[aIndex].Free;');
+ Write(' fItems[aIndex] := Value;');
+ Write(' end;');
+ end
+ else begin
+ Write(' fItems[aIndex] := Value;');
+ end;
+ Write('end;');
+ WriteEmptyLine;
+
+ // Resize
+ Write(Format('procedure %s.Resize(ElementCount: integer);', [Name]));
+ if not IsSimpleType(GetDataType(ElementType), aLibrary) then begin
+ Write('var i: Integer;');
+ end;
+ Write('begin');
+ Write(' if fCount = ElementCount then Exit;');
+ if not IsSimpleType(GetDataType(ElementType), aLibrary) then begin
+ write(' for i := FCount -1 downto ElementCount do');
+ Write(' FItems[i].Free;');
+ end;
+ Write(' SetLength(fItems, ElementCount);');
+ if not IsSimpleType(GetDataType(ElementType), aLibrary) then begin
+ Write(' for i := FCount to ElementCount -1 do');
+ write(Format(' FItems[i] := %s.Create;', [GetDataType(ElementType)]));
+ end;
+ Write(' FCount := ElementCount;');
+ Write('end;');
+ WriteEmptyLine;
+
+ // GetCount
+ Write(Format('function %s.GetCount: integer;', [Name]));
+ Write('begin');
+
+ //Write(' result := Length(fItems);');
+ Write(' result := FCount;');
+
+ Write('end;');
+ WriteEmptyLine;
+
+ // Grow
+ Write(Format('procedure %s.Grow;', [Name]));
+ Write('var');
+ Write(' Delta, Capacity: Integer;');
+ Write('begin');
+ Write(' Capacity := Length(fItems);');
+ Write(' if Capacity > 64 then');
+ Write(' Delta := Capacity div 4');
+ Write(' else');
+ Write(' if Capacity > 8 then');
+ Write(' Delta := 16');
+ Write(' else');
+ Write(' Delta := 4;');
+ Write(' SetLength(fItems, Capacity + Delta);');
+ Write('end;');
+ WriteEmptyLine;
+
+ // Add
+ if IsSimpleType(GetDataType(ElementType), aLibrary) then begin
+ Write(Format('function %s.Add(const Value: %s): integer;', [Name, GetDataType(ElementType)]));
+ Write('begin');
+
+ //Write(' SetLength(fItems, Length(fItems)+1);');
+ //Write(' result := Length(fItems)-1;');
+ //Write(' fItems[result] := Value;');
+ Write(' Result := Count;');
+ Write(' if Length(fItems) = Result then');
+ Write(' Grow;');
+ Write(' fItems[result] := Value;');
+ Write(' Inc(fCount);');
+
+ Write('end;');
+ WriteEmptyLine;
+
+ Write(Format('function %s.GetIndex(const aPropertyName: string;', [Name]));
+ Write(' const aPropertyValue: Variant; StartFrom: integer;');
+ Write(' Options: TROSearchOptions): integer;');
+ Write('begin');
+ Write(' result := -1;');
+ Write('end;');
+ WriteEmptyLine;
+ end
+ else begin
+ Write(Format('function %s.Add: %s;', [Name, GetDataType(ElementType)]));
+ Write('begin');
+ Write(Format(' result := %s.Create;', [GetDataType(ElementType)]));
+
+ //Write(' SetLength(fItems, Length(fItems)+1);');
+ //Write(' fItems[Length(fItems)-1] := result;');
+ Write(' Add(Result);');
+
+ Write('end;');
+ WriteEmptyLine;
+ Write(Format('function %s.Add(const Value:%s): integer;', [Name, GetDataType(ElementType)]));
+ Write('begin');
+
+ //Write(' SetLength(fItems, Length(fItems)+1);');
+ //Write(' result := Length(fItems)-1;');
+ //Write(' fItems[result] := Value;');
+ Write(' Result := Count;');
+ Write(' if Length(fItems) = Result then');
+ Write(' Grow;');
+ Write(' fItems[result] := Value;');
+ Write(' Inc(fCount);');
+
+ Write('end;');
+ WriteEmptyLine;
+ end;
+
+ Write(Format('procedure %s.ReadComplex(ASerializer: TObject);', [Name]));
+ Write('var');
+ Write(' lval: '+GetDataType(ElementType)+';');
+ Write(' i: integer;');
+// Write(' itemref : pointer;');
+ Write('begin');
+ Write(' for i := 0 to Count-1 do begin');
+// write(' if (GetItemClass<>NIL) then itemref := NIL else itemref := GetItemRef(i);');
+ Write(' with TROSerializer(ASerializer) do');
+ case StrToDataType(ElementType) of
+ rtInteger: Write(' ReadInteger(GetArrayElementName(GetItemType, GetItemRef(i)), otSLong, lval, i);');
+ rtDateTime: Write(' ReadDateTime(GetArrayElementName(GetItemType, GetItemRef(i)), lval, i);');
+ rtDouble: Write(' ReadDouble(GetArrayElementName(GetItemType, GetItemRef(i)), ftDouble, lval, i);');
+ rtCurrency: Write(' ReadDouble(GetArrayElementName(GetItemType, GetItemRef(i)), ftCurr, lval, i);');
+ rtWidestring: Write(' ReadWideString(GetArrayElementName(GetItemType, GetItemRef(i)), lval, i);');
+ rtString: Write(' ReadUTF8String(GetArrayElementName(GetItemType, GetItemRef(i)), lval, i);');
+ rtInt64: Write(' ReadInt64(GetArrayElementName(GetItemType, GetItemRef(i)), lval, i);');
+ rtBoolean: Write(' ReadEnumerated(GetArrayElementName(GetItemType, GetItemRef(i)),TypeInfo(boolean), lval, i);');
+ rtVariant: Write(' ReadVariant(GetArrayElementName(GetItemType, GetItemRef(i)), lval, i);');
+ rtXML: Write(' ReadXML(GetArrayElementName(GetItemType, GetItemRef(i)), lval, i);');
+ rtGuid: Write(' ReadGuid(GetArrayElementName(GetItemType, GetItemRef(i)), lval, i);');
+ rtDecimal: Write(' ReadDecimal(GetArrayElementName(GetItemType, GetItemRef(i)), lval, i);');
+ rtBinary: Write(' ReadBinary(GetArrayElementName(GetItemType, GetItemRef(i)), lval, i);');
+ rtUserDefined:
+ if aLibrary.FindArray(GetDataType(ElementType)) <> nil then
+ Write(Format(' ReadArray(GetArrayElementName(GetItemType, GetItemRef(i)), %s, lval, i);',[GetDataType(ElementType)]))
+ else if aLibrary.FindEnum(GetDataType(ElementType)) <> nil then
+ Write(Format(' ReadEnumerated(GetArrayElementName(GetItemType, GetItemRef(i)),TypeInfo(%s), lval, i);',[GetDataType(ElementType)]))
+ else
+ Write(Format(' ReadStruct(GetArrayElementName(GetItemType, GetItemRef(i)), %s, lval, i);',[GetDataType(ElementType)]));
+ end;
+ Write(' Items[i] := lval;');
+ Write(' end;');
+ Write('end;');
+ WriteEmptyLine;
+
+ Write(Format('procedure %s.WriteComplex(ASerializer: TObject);', [Name]));
+ Write('var');
+ Write(' i: integer;');
+ Write('begin');
+ Write(' for i := 0 to Count-1 do');
+ Write(' with TROSerializer(ASerializer) do');
+ case StrToDataType(ElementType) of
+ rtInteger: Write(' WriteInteger(GetArrayElementName(GetItemType, GetItemRef(i)), otSLong, fItems[i], i);');
+ rtDateTime: Write(' WriteDateTime(GetArrayElementName(GetItemType, GetItemRef(i)), fItems[i], i);');
+ rtDouble: Write(' WriteDouble(GetArrayElementName(GetItemType, GetItemRef(i)), ftDouble, fItems[i], i);');
+ rtCurrency: Write(' WriteDouble(GetArrayElementName(GetItemType, GetItemRef(i)), ftCurr, fItems[i], i);');
+ rtWidestring: Write(' WriteWideString(GetArrayElementName(GetItemType, GetItemRef(i)), fItems[i], i);');
+ rtString: Write(' WriteUTF8String(GetArrayElementName(GetItemType, GetItemRef(i)), fItems[i], i);');
+ rtInt64: Write(' WriteInt64(GetArrayElementName(GetItemType, GetItemRef(i)), fItems[i], i);');
+ rtBoolean: Write(' WriteEnumerated(GetArrayElementName(GetItemType, GetItemRef(i)),TypeInfo(boolean), fItems[i], i);');
+ rtVariant: Write(' WriteVariant(GetArrayElementName(GetItemType, GetItemRef(i)), fItems[i], i);');
+ rtXML: Write(' WriteXML(GetArrayElementName(GetItemType, GetItemRef(i)), fItems[i], i);');
+ rtGuid: Write(' WriteGuid(GetArrayElementName(GetItemType, GetItemRef(i)), fItems[i], i);');
+ rtDecimal: Write(' WriteDecimal(GetArrayElementName(GetItemType, GetItemRef(i)), fItems[i], i);');
+ rtBinary: Write(' WriteBinary(GetArrayElementName(GetItemType, GetItemRef(i)), fItems[i], i);');
+ rtUserDefined:
+ if aLibrary.FindArray(GetDataType(ElementType)) <> nil then
+ Write(' WriteArray(GetArrayElementName(GetItemType, GetItemRef(i)), fItems[i], '+GetDataType(ElementType)+', i);')
+ else if aLibrary.FindEnum(GetDataType(ElementType)) <> nil then
+ Write(Format(' WriteEnumerated(GetArrayElementName(GetItemType, GetItemRef(i)),TypeInfo(%s), fItems[i], i);',[GetDataType(ElementType)]))
+ else
+ Write(' WriteStruct(GetArrayElementName(GetItemType, GetItemRef(i)), fItems[i], '+GetDataType(ElementType)+', i);');
+ end;
+ Write('end;');
+ WriteEmptyLine;
+ end;
+end;
+
+procedure TRODLToIntf.WriteStructPropMethods(aLibrary : TRODLLibrary; aStruct: TRODLStruct);
+var i : integer;
+ //lWroteComment: boolean;
+ aList: TList;
+ structEntityList: IROStrings;
+ structEntity: TRODLTypedEntity;
+ lNeedInitSimpleTypeWithDefaultValues: Boolean;
+ lDefaultValue: string;
+begin
+ with aStruct do begin
+{ Write(Format('constructor %s.Create;', [Name]));
+ Write('begin');
+ Write(' inherited;');
+ for i := 0 to (Count-1) do with Items[i] do begin
+ if not (IsStruct(DataType, aLibrary) or IsArray(DataType, aLibrary)) then Continue;
+ Write(Format(' fDestroy_%s := FALSE;', [Name]));
+ end;
+ Write('end;');
+ WriteEmptyLine;
+
+ Write(Format('destructor %s.Destroy;', [Name]));
+ Write('begin');
+ for i := 0 to (Count-1) do with Items[i] do begin
+ if not (IsStruct(DataType, aLibrary) or IsArray(DataType, aLibrary)) then Continue;
+ Write(Format(' if fDestroy_%s then FreeAndNIL(f%s);', [Name, Name]));
+ end;
+ Write(' inherited;');
+ Write('end;');
+ WriteEmptyLine;}
+
+ //lWroteComment := true;
+ //lWroteComment := false;
+
+ if Count > 0 then begin
+ Write('{ '+Name+' }');
+ WriteEmptyLine;
+
+ if aStruct.Attributes.Count > 0 then
+ WriteAttributesMethods(aStruct);
+
+ Write(Format('procedure %s.Assign(iSource: TPersistent); ',[aStruct.Name]));
+ Write(Format('var lSource: %s.%s;',[fUnitName, aStruct.Name]));
+ Write('begin');
+ Write(' inherited Assign(iSource);');
+ Write(Format(' if (iSource is %s.%s) then begin',[fUnitName, aStruct.Name]));
+ Write(Format(' lSource := %s.%s(iSource);',[fUnitName, aStruct.Name]));
+ lNeedInitSimpleTypeWithDefaultValues := False;
+ for i := 0 to (Count-1) do begin
+ if IsImplementedAsClass(Items[i].DataType, aLibrary) then begin
+ if not AutoCreateParams then
+ Write(Format(' if Assigned(%s) then'#13#10, [Items[i].Name]));
+ Write(Format(' %s.Assign(lSource.%s);',[Items[i].Name,Items[i].Name]));
+ end
+ else begin
+ lNeedInitSimpleTypeWithDefaultValues := lNeedInitSimpleTypeWithDefaultValues or (Items[i].Attributes.IndexOfName('Default') <> -1);
+ Write(Format(' %s := lSource.%s;',[Items[i].Name,Items[i].Name]));
+ end;
+ end;
+ Write(' end;');
+ Write('end;');
+ WriteEmptyLine;
+
+ if lNeedInitSimpleTypeWithDefaultValues then begin
+ Write(Format('constructor %s.Create(aCollection : TCollection);',[aStruct.Name]));
+ Write('begin');
+ Write(' inherited Create(aCollection);');
+ For i := 0 to (Count-1) do begin
+ if (not IsImplementedAsClass(Items[i].DataType, aLibrary)) and (Items[i].Attributes.IndexOfName('Default')<>-1) then begin
+ lDefaultValue := '';
+ case StrToDataType(Items[i].DataType) of
+ rtInteger,
+ rtInt64,
+ rtDouble,
+ rtBoolean,
+ rtCurrency: lDefaultValue := Items[i].Attributes.Values['Default'];
+ rtWidestring,
+ rtGuid,
+ rtVariant,
+ rtString: lDefaultValue := ''''+Items[i].Attributes.Values['Default']+'''';
+ rtDateTime: lDefaultValue := 'StrToDateTimeDef('''+Items[i].Attributes.Values['Default']+''',0)';
+ rtDecimal: lDefaultValue := Items[i].Attributes.Values['Default'];
+ //
+ rtBinary : ;
+ rtXML: ;
+ rtUserDefined: ;
+ end;
+ if lDefaultValue <> '' then Write(Format(' f%s := %s;',[Items[i].Name, lDefaultValue]));
+ end;
+ end;
+ Write('end;');
+ WriteEmptyLine;
+ end;
+ end;
+
+
+ for i := 0 to (Count-1) do with Items[i] do begin
+ if IsImplementedAsClass(DataType, aLibrary) then begin
+ //if not (IsStruct(DataType, aLibrary) or IsArray(DataType, aLibrary)) then Continue;
+
+ {Write(Format('procedure %s.Set%s(Value : %s);', [aStruct.Name, Name, DataType]));
+ Write('begin');
+ Write(Format(' if (f%s<>NIL) and (fDestroy_%s) then FreeAndNIL(f%s);', [Name, Name, Name]));
+ Write(Format(' f%s := Value;', [Name]));
+ Write(Format(' fDestroy_%s := FALSE;', [Name]));
+ Write('end;');
+ WriteEmptyLine;}
+
+ Write(Format('function %s.Get%s: %s;', [aStruct.Name, Name, GetDataType(DataType)]));
+ Write('begin');
+ if AutoCreateParams then
+ Write(Format(' if (f%s = nil) then f%s := %s.Create();', [Name, Name, GetDataType(DataType)]));
+ Write(Format(' result := f%s;', [Name]));
+ Write('end;');
+ WriteEmptyLine;
+ end;
+ end;
+
+ structEntityList:=CalcItemsMarshalingOrder(True);
+ if (structEntityList.Count>0) and (Count > 0) then begin
+ Write(Format('procedure %s.ReadComplex(ASerializer: TObject);', [Name]));
+ if structEntityList.Count > 0 then Write('var');
+ For i:=0 to structEntityList.Count - 1 do
+ with TRODLTypedEntity(structEntityList.Objects[i]) do
+ Write(Format(' l_%s: %s;',[Name, GetDataType(DataType)]));
+ Write('begin');
+ Write(' if TROSerializer(ASerializer).RecordStrictOrder then begin');
+ if Count <> structEntityList.Count then
+ Write(' inherited;');
+ For i:=0 to Count-1 do begin
+ structEntity:=Items[i];
+ Write(Format(' l_%s := %0:s;',[structEntity.Name]));
+ case StrToDataType(structEntity.DataType) of
+ rtInteger: Write(Format(' TROSerializer(ASerializer).ReadInteger(''%s'', otSLong, l_%0:s);',[structEntity.Name]));
+ rtDateTime: Write(Format(' TROSerializer(ASerializer).ReadDateTime(''%s'', l_%0:s);',[structEntity.Name]));
+ rtDouble: Write(Format(' TROSerializer(ASerializer).ReadDouble(''%s'', ftDouble, l_%0:s);',[structEntity.Name]));
+ rtCurrency: Write(Format(' TROSerializer(ASerializer).ReadDouble(''%s'', ftCurr, l_%0:s);',[structEntity.Name]));
+ rtWidestring: Write(Format(' TROSerializer(ASerializer).ReadWideString(''%s'', l_%0:s);',[structEntity.Name]));
+ rtString: Write(Format(' TROSerializer(ASerializer).ReadUTF8String(''%s'', l_%0:s);',[structEntity.Name]));
+ rtInt64: Write(Format(' TROSerializer(ASerializer).ReadInt64(''%s'', l_%0:s);',[structEntity.Name]));
+ rtBoolean: Write(Format(' TROSerializer(ASerializer).ReadEnumerated(''%s'',TypeInfo(boolean), l_%0:s);',[structEntity.Name]));
+ rtVariant: Write(Format(' TROSerializer(ASerializer).ReadVariant(''%s'', l_%0:s);',[structEntity.Name]));
+ rtXML: Write(Format(' TROSerializer(ASerializer).ReadXML(''%s'', l_%0:s);',[structEntity.Name]));
+ rtGuid: Write(Format(' TROSerializer(ASerializer).ReadGuid(''%s'', l_%0:s);',[structEntity.Name]));
+ rtDecimal: Write(Format(' TROSerializer(ASerializer).ReadDecimal(''%s'', l_%0:s);',[structEntity.Name]));
+ rtBinary: Write(Format(' TROSerializer(ASerializer).ReadBinary(''%s'', l_%0:s);',[structEntity.Name]));
+ rtUserDefined:
+ if aLibrary.FindArray(structEntity.DataType) <> nil then
+ Write(Format(' TROSerializer(ASerializer).ReadArray(''%s'', %s, l_%0:s);',[structEntity.Name,GetDataType(structEntity.DataType)]))
+ else if aLibrary.FindEnum(structEntity.DataType) <> nil then
+ Write(Format(' TROSerializer(ASerializer).ReadEnumerated(''%s'',TypeInfo(%s), l_%0:s);',[structEntity.Name,GetDataType(structEntity.DataType)]))
+ else
+ Write(Format(' TROSerializer(ASerializer).ReadStruct(''%s'', %s, l_%0:s);',[structEntity.Name,GetDataType(structEntity.DataType)]));
+ end;
+ if (StrToDataType(structEntity.DataType) in [rtBinary, rtUserDefined]) and (aLibrary.FindEnum(structEntity.DataType) = nil) then
+ Write(Format(' if %s <> l_%0:s then %0:s.Free;',[structEntity.Name]));
+ Write(Format(' %s := l_%0:s;',[structEntity.Name]));
+ end;
+ Write(' end');
+ Write(' else begin');
+ For i:=0 to structEntityList.Count-1 do begin
+ structEntity:=TRODLTypedEntity(structEntityList.Objects[i]);
+ Write(Format(' l_%s := %0:s;',[structEntity.Name]));
+ case StrToDataType(structEntity.DataType) of
+ rtInteger: Write(Format(' TROSerializer(ASerializer).ReadInteger(''%s'', otSLong, l_%0:s);',[structEntity.Name]));
+ rtDateTime: Write(Format(' TROSerializer(ASerializer).ReadDateTime(''%s'', l_%0:s);',[structEntity.Name]));
+ rtDouble: Write(Format(' TROSerializer(ASerializer).ReadDouble(''%s'', ftDouble, l_%0:s);',[structEntity.Name]));
+ rtCurrency: Write(Format(' TROSerializer(ASerializer).ReadDouble(''%s'', ftCurr, l_%0:s);',[structEntity.Name]));
+ rtWidestring: Write(Format(' TROSerializer(ASerializer).ReadWideString(''%s'', l_%0:s);',[structEntity.Name]));
+ rtString: Write(Format(' TROSerializer(ASerializer).ReadUTF8String(''%s'', l_%0:s);',[structEntity.Name]));
+ rtInt64: Write(Format(' TROSerializer(ASerializer).ReadInt64(''%s'', l_%0:s);',[structEntity.Name]));
+ rtBoolean: Write(Format(' TROSerializer(ASerializer).ReadEnumerated(''%s'',TypeInfo(boolean), l_%0:s);',[structEntity.Name]));
+ rtVariant: Write(Format(' TROSerializer(ASerializer).ReadVariant(''%s'', l_%0:s);',[structEntity.Name]));
+ rtXML: Write(Format(' TROSerializer(ASerializer).ReadXML(''%s'', l_%0:s);',[structEntity.Name]));
+ rtGuid: Write(Format(' TROSerializer(ASerializer).ReadGuid(''%s'', l_%0:s);',[structEntity.Name]));
+ rtDecimal: Write(Format(' TROSerializer(ASerializer).ReadDecimal(''%s'', l_%0:s);',[structEntity.Name]));
+ rtBinary: Write(Format(' TROSerializer(ASerializer).ReadBinary(''%s'', l_%0:s);',[structEntity.Name]));
+ rtUserDefined:
+ if aLibrary.FindArray(structEntity.DataType) <> nil then
+ Write(Format(' TROSerializer(ASerializer).ReadArray(''%s'', %s, l_%0:s);',[structEntity.Name,GetDataType(structEntity.DataType)]))
+ else if aLibrary.FindEnum(structEntity.DataType) <> nil then
+ Write(Format(' TROSerializer(ASerializer).ReadEnumerated(''%s'',TypeInfo(%s), l_%0:s);',[structEntity.Name,GetDataType(structEntity.DataType)]))
+ else
+ Write(Format(' TROSerializer(ASerializer).ReadStruct(''%s'', %s, l_%0:s);',[structEntity.Name,GetDataType(structEntity.DataType)]));
+ end;
+ if (StrToDataType(structEntity.DataType) in [rtBinary, rtUserDefined]) and (aLibrary.FindEnum(structEntity.DataType) = nil) then
+ Write(Format(' if %s <> l_%0:s then %0:s.Free;',[structEntity.Name]));
+ Write(Format(' %s := l_%0:s;',[structEntity.Name]));
+ end;
+ Write(' end;');
+ Write('end;');
+ WriteEmptyLine;
+
+ Write(Format('procedure %s.WriteComplex(ASerializer: TObject);', [Name]));
+ if structEntityList.Count > 0 then Write('var');
+ For i:=0 to structEntityList.Count - 1 do
+ with TRODLTypedEntity(structEntityList.Objects[i]) do
+ Write(Format(' l_%s: %s;',[Name, GetDataType(DataType)]));
+ Write('begin');
+ Write(' if TROSerializer(ASerializer).RecordStrictOrder then begin');
+ if Count <> structEntityList.Count then
+ Write('inherited;', PASCAL_INDENTATION_LEVEL_2);
+ Write(Format('TROSerializer(ASerializer).ChangeClass(%s);', [Name]), PASCAL_INDENTATION_LEVEL_2);
+ for i := 0 to Count-1 do begin
+ structEntity:=Items[i];
+ Write(Format(' l_%s := %0:s;',[structEntity.Name]));
+ case StrToDataType(structEntity.DataType) of
+ rtInteger: Write(Format(' TROSerializer(ASerializer).WriteInteger(''%s'', otSLong, l_%0:s);',[structEntity.Name]));
+ rtDateTime: Write(Format(' TROSerializer(ASerializer).WriteDateTime(''%s'', l_%0:s);',[structEntity.Name]));
+ rtDouble: Write(Format(' TROSerializer(ASerializer).WriteDouble(''%s'', ftDouble, l_%0:s);',[structEntity.Name]));
+ rtCurrency: Write(Format(' TROSerializer(ASerializer).WriteDouble(''%s'', ftCurr, l_%0:s);',[structEntity.Name]));
+ rtWidestring: Write(Format(' TROSerializer(ASerializer).WriteWideString(''%s'', l_%0:s);',[structEntity.Name]));
+ rtString: Write(Format(' TROSerializer(ASerializer).WriteUTF8String(''%s'', l_%0:s);',[structEntity.Name]));
+ rtInt64: Write(Format(' TROSerializer(ASerializer).WriteInt64(''%s'', l_%0:s);',[structEntity.Name]));
+ rtBoolean: Write(Format(' TROSerializer(ASerializer).WriteEnumerated(''%s'',TypeInfo(boolean), l_%0:s);',[structEntity.Name]));
+ rtVariant: Write(Format(' TROSerializer(ASerializer).WriteVariant(''%s'', l_%0:s);',[structEntity.Name]));
+ rtXML: Write(Format(' TROSerializer(ASerializer).WriteXML(''%s'', l_%0:s);',[structEntity.Name]));
+ rtGuid: Write(Format(' TROSerializer(ASerializer).WriteGuid(''%s'', l_%0:s);',[structEntity.Name]));
+ rtDecimal: Write(Format(' TROSerializer(ASerializer).WriteDecimal(''%s'', l_%0:s);',[structEntity.Name]));
+ rtBinary: Write(Format(' TROSerializer(ASerializer).WriteBinary(''%s'', l_%0:s);',[structEntity.Name]));
+
+ rtUserDefined:
+ if aLibrary.FindArray(structEntity.DataType) <> nil then
+ Write(Format(' TROSerializer(ASerializer).WriteArray(''%s'', l_%0:s, %s);',[structEntity.Name,GetDataType(structEntity.DataType)]))
+ else if aLibrary.FindEnum(structEntity.DataType) <> nil then
+ Write(Format(' TROSerializer(ASerializer).WriteEnumerated(''%s'',TypeInfo(%s), l_%0:s);',[structEntity.Name,structEntity.DataType]))
+ else
+ Write(Format(' TROSerializer(ASerializer).WriteStruct(''%s'', l_%0:s, %s);',[structEntity.Name,GetDataType(structEntity.DataType)]))
+ end;
+ end;
+ Write(' end');
+ Write(' else begin');
+ For i:=0 to structEntityList.Count-1 do begin
+ structEntity:=TRODLTypedEntity(structEntityList.Objects[i]);
+ Write(Format(' l_%s := %0:s;',[structEntity.Name]));
+ case StrToDataType(structEntity.DataType) of
+ rtInteger: Write(Format(' TROSerializer(ASerializer).WriteInteger(''%s'', otSLong, l_%0:s);',[structEntity.Name]));
+ rtDateTime: Write(Format(' TROSerializer(ASerializer).WriteDateTime(''%s'', l_%0:s);',[structEntity.Name]));
+ rtDouble: Write(Format(' TROSerializer(ASerializer).WriteDouble(''%s'', ftDouble, l_%0:s);',[structEntity.Name]));
+ rtCurrency: Write(Format(' TROSerializer(ASerializer).WriteDouble(''%s'', ftCurr, l_%0:s);',[structEntity.Name]));
+ rtWidestring: Write(Format(' TROSerializer(ASerializer).WriteWideString(''%s'', l_%0:s);',[structEntity.Name]));
+ rtString: Write(Format(' TROSerializer(ASerializer).WriteUTF8String(''%s'', l_%0:s);',[structEntity.Name]));
+ rtInt64: Write(Format(' TROSerializer(ASerializer).WriteInt64(''%s'', l_%0:s);',[structEntity.Name]));
+ rtBoolean: Write(Format(' TROSerializer(ASerializer).WriteEnumerated(''%s'',TypeInfo(boolean), l_%0:s);',[structEntity.Name]));
+ rtVariant: Write(Format(' TROSerializer(ASerializer).WriteVariant(''%s'', l_%0:s);',[structEntity.Name]));
+ rtXML: Write(Format(' TROSerializer(ASerializer).WriteXML(''%s'', l_%0:s);',[structEntity.Name]));
+ rtGuid: Write(Format(' TROSerializer(ASerializer).WriteGuid(''%s'', l_%0:s);',[structEntity.Name]));
+ rtDecimal: Write(Format(' TROSerializer(ASerializer).WriteDecimal(''%s'', l_%0:s);',[structEntity.Name]));
+ rtBinary: Write(Format(' TROSerializer(ASerializer).WriteBinary(''%s'', l_%0:s);',[structEntity.Name]));
+
+ rtUserDefined:
+ if aLibrary.FindArray(structEntity.DataType) <> nil then
+ Write(Format(' TROSerializer(ASerializer).WriteArray(''%s'', l_%0:s, %s);',[structEntity.Name,GetDataType(structEntity.DataType)]))
+ else if aLibrary.FindEnum(structEntity.DataType) <> nil then
+ Write(Format(' TROSerializer(ASerializer).WriteEnumerated(''%s'',TypeInfo(%s), l_%0:s);',[structEntity.Name,structEntity.DataType]))
+ else
+ Write(Format(' TROSerializer(ASerializer).WriteStruct(''%s'', l_%0:s, %s);',[structEntity.Name,GetDataType(structEntity.DataType)]))
+ end;
+ end;
+ Write(' end;');
+ Write('end;');
+ WriteEmptyLine;
+ end;
+ structEntityList:=nil;
+
+ // Writes the collection methods
+ Write('{ '+Name+'Collection }');
+ Write(Format('constructor %sCollection.Create;', [aStruct.Name]));
+ Write('begin');
+ Write(Format(' inherited Create(%s);', [aStruct.Name]));
+ Write('end;');
+ WriteEmptyLine;
+
+ Write(Format('constructor %sCollection.Create(aItemClass: TCollectionItemClass);', [aStruct.Name]));
+ Write('begin');
+ Write(Format(' inherited Create(aItemClass);', [aStruct.Name]));
+ Write('end;');
+
+ WriteEmptyLine;
+ Write(Format('function %sCollection.Add: %s;', [aStruct.Name, aStruct.Name]));
+ Write('begin');
+ Write(Format(' result := %s(inherited Add);', [aStruct.Name]));
+ Write('end;');
+ WriteEmptyLine;
+ Write(Format('function %sCollection.GetItems(aIndex: integer): %s;', [aStruct.Name, aStruct.Name]));
+ Write('begin');
+ Write(Format(' result := %s(inherited Items[aIndex]);', [aStruct.Name]));
+ Write('end;');
+ WriteEmptyLine;
+
+ aList := TList.Create;
+ try
+ aLibrary.GetArraysByElement(Name,aList);
+ for i := 0 to aList.Count-1 do begin
+ Write(Format('procedure %sCollection.LoadFromArray(anArray: %s);', [aStruct.Name, TRODLArray(aList[i]).Name]));
+ Write('var i : integer;');
+ Write('begin');
+ Write(' Clear;');
+ Write(' for i := 0 to (anArray.Count-1) do');
+ Write(' Add.Assign(anArray[i]);');
+ Write('end;');
+ WriteEmptyLine;
+ Write(Format('procedure %sCollection.SaveToArray(anArray: %s);', [aStruct.Name, TRODLArray(aList[i]).Name]));
+ Write('var i : integer;');
+ Write('begin');
+ Write(' anArray.Clear;');
+ Write(' anArray.Resize(Count);');
+ Write(' for i := 0 to (Count-1) do begin');
+ Write(Format(' anArray[i] := %s.Create;', [aStruct.Name]));
+ Write(' anArray[i].Assign(Items[i]);');
+ Write(' end;');
+ Write('end;');
+ WriteEmptyLine;
+ end;
+ finally
+ aList.Free;
+ end;
+
+ Write(Format('procedure %sCollection.SetItems(aIndex: integer; const Value: %s);', [aStruct.Name, aStruct.Name]));
+ Write('begin');
+ Write(Format(' %s(inherited Items[aIndex]).Assign(Value);', [aStruct.Name, aStruct.Name]));
+ Write('end;');
+ WriteEmptyLine;
+ end;
+end;
+
+
+function GetAttributes(atOperation, atService, atLibrary: TStrings; Ident: Integer): string;
+var
+ sl: TStringList;
+ s: string;
+ i, n: Integer;
+begin
+ sl := TStringList.Create;
+ try
+ sl.AddStrings(atOperation);
+ sl.AddStrings(atService);
+ sl.AddStrings(atLibrary);
+ sl.Sort;
+ for i := sl.Count -1 downto 1 do begin
+ if sl[i] = sl[i-1] then sl.Delete(I); // remove dupes
+ end;
+ if sl.Count = 0 then begin result := ''; exit; end;
+ s := '';
+ for i := 0 to sl.Count -1 do begin
+ if sl[i] = '' then continue;
+ if i mod 8 = 7 then begin
+ s := s + #13#10;
+ setLength(s, Length(s) + Ident + 2);
+ for n := Length(s) - Ident -1 to Length(s) do
+ s[n] := ' ';
+ end;
+ if i <> 0 then s := s + ', ';
+ s := s + #39 + sl.Names[i] + #39;
+ end;
+ Result :='['+s+'], '#13#10;
+ setLength(Result, Length(Result) + Ident + 2);
+ for n := Length(Result) - Ident -1 to Length(Result) do
+ Result[n] := ' ';
+
+ s := '';
+ for i := 0 to sl.Count -1 do begin
+ if sl[i] = '' then continue;
+ if i mod 8 = 7 then begin
+ s := s + #13#10;
+ setLength(s, Length(s) + Ident + 2);
+ for n := Length(s) - Ident -1 to Length(s) do
+ s[n] := ' ';
+ end;
+ if i <> 0 then s := s + ', ';
+ s := s + #39 + StringReplace(sl.Values[sl.Names[i]], #39, #39#39, [rfReplaceAll]) + #39;
+ end;
+ Result := Result + '['+s+']';
+ finally
+ sl.Free;
+ end;
+end;
+
+procedure TRODLToIntf.WriteAttributesMethods(anEntity: TRODLEntity);
+var
+ i: Integer;
+begin
+ with anEntity do begin
+ Write(Format('class function %s.GetAttributeCount: Integer;',[Name]));
+ Write('begin');
+ Write(Format('result := %d;', [Attributes.Count]), PASCAL_INDENTATION_LEVEL_1);
+ Write('end;');
+ WriteEmptyLine;
+
+ Write(Format('class function %s.GetAttributeName(aIndex: Integer): string;',[Name]));
+ Write('begin');
+ if Attributes.Count > 0 then begin
+ Write('case aIndex of', PASCAL_INDENTATION_LEVEL_1);
+ for i := 0 to Attributes.Count - 1 do
+ Write(Format('%d: result := %s;', [i, QuotedStr(Attributes.Names[i])]), PASCAL_INDENTATION_LEVEL_2);
+ Write('end;', PASCAL_INDENTATION_LEVEL_1);
+ end;
+ Write('end;');
+ WriteEmptyLine;
+
+ Write(Format('class function %s.GetAttributeValue(aIndex: Integer): string;',[Name]));
+ Write('begin');
+ if Attributes.Count > 0 then begin
+ Write('case aIndex of', PASCAL_INDENTATION_LEVEL_1);
+ for i := 0 to Attributes.Count - 1 do
+ Write(Format('%d: result := %s;', [i, QuotedStr(Attributes.Values[Attributes.Names[i]])]), PASCAL_INDENTATION_LEVEL_2);
+ Write('end;', PASCAL_INDENTATION_LEVEL_1);
+ end;
+ Write('end;');
+ WriteEmptyLine;
+ end;
+end;
+
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen/uRODLToPascalInvk.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen/uRODLToPascalInvk.pas
new file mode 100644
index 0000000..696582d
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen/uRODLToPascalInvk.pas
@@ -0,0 +1,434 @@
+unit uRODLToPascalInvk;
+
+{----------------------------------------------------------------------------}
+{ RemObjects SDK Library - CodeGen }
+{ }
+{ compiler: Delphi 5 and up, Kylix 2 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the RemObjects SDK }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$IFDEF LINUX}
+{$I ../RemObjects.inc}
+{$ELSE}
+{$I ..\RemObjects.inc}
+{$ENDIF LINUX}
+
+interface
+
+uses uRODL;
+
+type { TRODLToInvk }
+ TRODLToInvk = class(TRODLConverter)
+ private
+ fIntfUnitName : string;
+
+ procedure WriteInvokerDeclaration(const aService: TRODLService; aLibrary : TRODLLibrary);
+ procedure WriteOperationImplementation(const aService : TRODLService;
+ const anOperation : TRODLOperation;
+ aLibrary : TRODLLibrary);
+
+ protected
+ procedure IntConvert(const aLibrary : TRODLLibrary; const aTargetEntity : string = ''); override;
+
+ public
+ class function GetTargetFileName(const aLibrary : TRODLLibrary; const aTargetEntity : string = ''): string; override;
+
+ end;
+
+
+implementation
+
+uses SysUtils, uRODLGenTools, uROTypes, uRODLToPascalImpl, uRODLToPascalIntf, Dialogs, uRODLToPascal;
+
+{ TRODLToInvk }
+
+procedure TRODLToInvk.IntConvert(const aLibrary: TRODLLIbrary; const aTargetEntity : string = '');
+var i, k : integer;
+ s,t,actualname : string;
+begin
+ fIntfUnitName := ChangeFileExt(TRODLToIntf.GetTargetFileName(aLibrary), '');
+
+ Write(Format('unit %s;', [ChangeFileExt(GetTargetFileName(aLibrary), '')]));
+ WriteEmptyLine;
+
+ WriteLines(IntfInvkNotice);
+ WriteEmptyLine;
+
+ Write('{$I Remobjects.inc}');
+ WriteEmptyLine;
+
+ Write('interface');
+ WriteEmptyLine;
+
+ Write('uses');
+ Write('{vcl:} Classes,' ,PASCAL_INDENTATION_LEVEL_1);
+ Write('{RemObjects:} uROXMLIntf, uROServer, uROServerIntf, uROTypes, uROClientIntf,' ,PASCAL_INDENTATION_LEVEL_1);
+
+ if aLibrary.UseCount > 0 then begin
+
+ s := '';
+ t := '';
+ for i := 0 to aLibrary.UseCount-1 do begin
+
+ if aLibrary.Use[i].LoadedRodlLibraryName <> '' then
+ actualname := aLibrary.Use[i].LoadedRodlLibraryName
+ else
+ actualname := ChangeFileExt(ExtractFilename(aLibrary.Use[i].RodlFile),'');
+
+ if (Pos(actualname+'_Intf', s)<=0) then begin
+ if s <> '' then s := s+', ';
+ s := s+actualname+'_Intf';
+ end;
+
+ if (Pos(actualname+'_Invk', t)<=0) then begin
+ if t <> '' then t := t+', ';
+ t := t+actualname+'_Invk';
+ end;
+ end; { for }
+
+ if (s<>'') then begin
+ s := s+',';
+ Write('{Used RODL Intf''s:} '+s,PASCAL_INDENTATION_LEVEL_1);
+ end;
+
+ if (t<>'') then begin
+ t := t+',';
+ Write('{Used RODL Invk''s:} '+t,PASCAL_INDENTATION_LEVEL_1);
+ end;
+ end;
+
+ Write(Format('{Generated:} %s_Intf;', [aLibrary.Info.Name]),PASCAL_INDENTATION_LEVEL_1);
+ WriteEmptyLine;
+
+ if aLibrary.ServiceCount > 0 then Write('type');
+
+ with aLibrary.CalcServiceOrder() do begin
+ for i := 0 to (Count-1) do //if (not aLibrary.Services[i].IsFromUsedRodl) then
+ WriteInvokerDeclaration(Objects[i] as TRODLService, aLibrary);
+ end;
+
+ {for i := 0 to (aLibrary.ServiceCount-1) do if (not aLibrary.Services[i].IsFromUsedRodl) then
+ WriteInvokerDeclaration(aLibrary.Services[i], aLibrary); }
+
+ Write('implementation');
+ WriteEmptyLine;
+
+ //s := '';
+ {for i := 0 to (aLibrary.ServiceCount-1) do begin
+ //s := s+ChangeFileExt(TRODLToImpl.GetTargetFileName(aLibrary, aLibrary.Services[i].Info.Name),'');
+ s := s+aLibrary.Services[i].Info.Name+'_Impl';
+ if (i'')
+ then Write(Format('{RemObjects:} uRORes, %s;', [s]),PASCAL_INDENTATION_LEVEL_1)
+ else *)Write(Format('{RemObjects:} uRORes, uROClient;', []),PASCAL_INDENTATION_LEVEL_1);
+ WriteEmptyLine;
+
+ for i := 0 to (aLibrary.ServiceCount-1) do if (not aLibrary.Services[i].IsFromUsedRodl) then begin
+ //WriteInvokerHandleMessage(aLibrary.Services[i]);
+
+ if not Assigned(aLibrary.Services[i].Default) then Continue;
+
+ Write('{ T'+aLibrary.Services[i].Info.Name+'_Invoker }');
+ WriteEmptyLine;
+
+ Write('constructor T' + aLibrary.Services[i].Info.Name + '_Invoker.Create;');
+ Write('begin');
+ Write(' inherited Create;');
+ Write(' FAbstract := ' + BoolToStr(aLibrary.Services[i].Abstract,True)+';');
+ Write('end;');
+ WriteEmptyLine;
+
+ for k := 0 to (aLibrary.Services[i].Default.Count-1) do
+ WriteOperationImplementation(aLibrary.Services[i], aLibrary.Services[i].Default.Items[k], aLibrary);
+ end;
+
+ for i := 0 to (aLibrary.ServiceCount-1) do ;
+
+ Write('initialization');
+ with aLibrary.Attributes do
+ for i := 0 to Count-1 do
+ Write(Format(' RegisterServiceAttribute(''%s'',''%s'',''%s'');',['',Names[i],Values[Names[i]]]));
+ For k:=0 to aLibrary.ServiceCount -1 do
+ with aLibrary.Services[k], Attributes do
+ for i := 0 to Count-1 do
+ Write(Format(' RegisterServiceAttribute(''%s'',''%s'',''%s'');',[Name, Names[i],Values[Names[i]]]));
+ Write('end.');
+end;
+
+procedure TRODLToInvk.WriteInvokerDeclaration(const aService : TRODLService; aLibrary : TRODLLibrary);
+var i : integer;
+begin
+ if aService.Ancestor <> '' then begin
+ Write(Format('T%s_Invoker = class(T%s_Invoker)', [aService.Info.Name,aService.Ancestor]), PASCAL_INDENTATION_LEVEL_1);
+ end
+ else begin
+ Write(Format('T%s_Invoker = class(TROInvoker)', [aService.Info.Name]), PASCAL_INDENTATION_LEVEL_1);
+ end;
+ Write('private', PASCAL_INDENTATION_LEVEL_1);
+ Write('protected', PASCAL_INDENTATION_LEVEL_1);
+ Write('public', PASCAL_INDENTATION_LEVEL_1);
+ Write(' constructor Create; override;', PASCAL_INDENTATION_LEVEL_1);
+ Write('published', PASCAL_INDENTATION_LEVEL_1);
+
+ for i := 0 to (aService.Default.Count-1) do begin
+ Write(Format('procedure Invoke_%s(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);', [aService.Default.Items[i].Info.Name]), PASCAL_INDENTATION_LEVEL_2);
+ end;
+
+ Write('end;', PASCAL_INDENTATION_LEVEL_1);
+ WriteEmptyLine();
+end;
+
+procedure TRODLToInvk.WriteOperationImplementation(
+ const aService : TRODLService;
+ const anOperation: TRODLOperation; aLibrary : TRODLLibrary);
+ const resultname = 'return';
+var i : integer;
+ lHasObjectDisposer: Boolean;
+ pars, s, sa : string;
+ typname : string;
+begin
+ Write(Format('procedure T%s_Invoker.Invoke_%s(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);',
+ [aService.Info.Name, anOperation.Info.Name]));
+
+ Write(Format('{ %s }', [GetOperationDefinition(anOperation)]));
+
+ with anOperation do begin
+
+ { Determine if we need an ObjectDisposer }
+ lHasObjectDisposer := False;
+ for i := 0 to (Count-1) do with Items[i] do begin
+ if IsImplementedAsClass(DataType, aLibrary) then begin
+ lHasObjectDisposer := true;
+ break;
+ end;
+ end;
+ if Assigned(Result) and IsImplementedAsClass(Result.DataType, aLibrary) then
+ lHasObjectDisposer := true;
+
+ //ShowMessage('1');
+
+ { Write local variables }
+ if (Count>0) or Assigned(Result) or lHasObjectDisposer then Write('var');
+ for i := 0 to (Count-1) do begin
+
+ typname := GetDataType(Items[i].DataType);
+ if IsUserDefinedType(typname,aLibrary) then begin
+ typname := GetFullyQualifiedTypeName(typname,aLibrary,fIntfUnitName);
+ end;
+
+ Write(Format('%s: %s;', [Items[i].Name, typname]),PASCAL_INDENTATION_LEVEL_1);
+ if (Items[i].Flag = fInOut) and IsImplementedAsClass(Items[i].DataType, aLibrary) then
+ Write(Format('__in_%s: %s;', [Items[i].Name, typname]),PASCAL_INDENTATION_LEVEL_1);
+ end;
+
+ //ShowMessage('2');
+
+ if Assigned(Result) then begin
+ typname := GetDataType(Result.DataType);
+ if IsUserDefinedType(typname,aLibrary) then begin
+ typname := GetFullyQualifiedTypeName(typname,aLibrary,fIntfUnitName);
+ end;
+ Write(Format('lResult: %s;', [ typname]),PASCAL_INDENTATION_LEVEL_1);
+ end;
+
+
+ if lHasObjectDisposer then
+ Write('__lObjectDisposer: TROObjectDisposer;',PASCAL_INDENTATION_LEVEL_1);
+
+{ if Assigned(Result)
+ then Write(' %s: %s;', [resultname, Result.DataType]);}
+
+ //ShowMessage('3');
+
+ Write('begin');
+ sa := GetAttributes(anOperation.Info.Attributes, aService.Info.Attributes, aLibrary.Info.Attributes, 4);
+ if sa <> '' then
+ Write(' __Message.SetAttributes(__Transport, '+sa +');');
+
+ if (Count>0) then begin
+ for i := 0 to (Count-1) do begin
+ with Items[i] do begin
+ if IsImplementedAsClass(DataType, aLibrary) then begin
+ Write(Format('%s := nil;', [Items[i].Name]),PASCAL_INDENTATION_LEVEL_1);
+ if (Flag = fInOut) then
+ Write(Format('__in_%s := nil;', [Items[i].Name]),PASCAL_INDENTATION_LEVEL_1);
+ end;
+ end;
+ end;
+ end;
+ if Assigned(Result) then
+ if IsImplementedAsClass(Result.DataType, aLibrary) then
+ Write('lResult := nil;',PASCAL_INDENTATION_LEVEL_1);
+
+ Write(' try');
+
+ //ShowMessage('4');
+
+ for i := 0 to (Count-1) do
+ if IsInputFlag(Items[i].Flag) then begin
+
+ if (StrToDataType(Items[i].DataType)=rtDateTime)
+ then sa := '[paIsDateTime]'
+ else sa := '[]';
+
+ typname := GetDataType(Items[i].DataType);
+ if IsUserDefinedType(typname,aLibrary) then begin
+ typname := GetFullyQualifiedTypeName(typname,aLibrary,fIntfUnitName);
+ end;
+
+ Write(Format('__Message.Read(''%s'', TypeInfo(%s), %s, %s);',[Items[i].Name, typname, Items[i].Name, sa]),PASCAL_INDENTATION_LEVEL_2);
+ if (Items[i].Flag = fInOut) and IsImplementedAsClass(Items[i].DataType, aLibrary) then begin
+ Write(Format('__in_%s := %s;',[Items[i].Name, Items[i].Name]),PASCAL_INDENTATION_LEVEL_2)
+ end;
+ end;
+
+ if (Count>0) then WriteEmptyLine;
+ s := ' ';
+ if Assigned(Result) then s := s+'lResult := ';
+ s := s+Format('(__Instance as I%s).%s', [aService.Name, anOperation.Name]);
+
+ //ShowMessage('5');
+
+ if (Count>0) then begin
+ pars := '';
+ for i := 0 to (Count-1) do begin
+ if (Items[i].Flag=fResult) then Continue;
+ pars := pars+Items[i].Name+', ';
+ end;
+
+ if pars<>'' then s := s+'('+Copy(pars, 1, Length(pars)-2)+')';
+ end;
+
+ s := s+';';
+ Write(s);
+
+ WriteEmptyLine;
+(* if anOperation.Info.Attributes.Values['OutputMessageName'] <> '' then
+ Write(Format(' __Message.InitializeResponseMessage(__Transport, ''%s'', ''%s'', ''%s'');',[aLibrary.Name, aService.Name, anOperation.Info.Attributes.Values['OutputMessageName']]))
+ else *)
+
+ Write(Format(' __Message.InitializeResponseMessage(__Transport, ''%s'', ''%s'', ''%sResponse'');',[aLibrary.Name, aService.Name, Name]));
+
+
+ //ShowMessage('6');
+
+ if Assigned(Result) then begin
+ if (StrToDataType(Result.DataType)=rtDateTime) then
+ sa := '[paIsDateTime]'
+ else
+ sa := '[]';
+
+ typname := GetDataType(Result.DataType);
+ if IsUserDefinedType(typname,aLibrary) then begin
+ typname := GetFullyQualifiedTypeName(typname,aLibrary,fIntfUnitName);
+ end;
+
+ Write(Format(' __Message.Write(''%s'', TypeInfo(%s), lResult, %s);',
+ [Result.Name, typname, sa]));
+ end;
+
+ //ShowMessage('7');
+
+ for i := 0 to (Count-1) do
+ if IsOutputFlag(Items[i].Flag) then begin
+
+ if (StrToDataType(Items[i].DataType)=rtDateTime)
+ then sa := '[paIsDateTime]'
+ else sa := '[]';
+
+ typname := GetDataType(Items[i].DataType);
+ if IsUserDefinedType(typname,aLibrary) then begin
+ typname := GetFullyQualifiedTypeName(typname,aLibrary,fIntfUnitName);
+ end;
+
+ Write(Format(' __Message.Write(''%s'', TypeInfo(%s), %s, %s);',
+ [Items[i].Name, typname, Items[i].Name, sa]));
+ end;
+
+ {if Assigned(Result) then begin
+ Write(Format(' __Message.Write(''%s'', TypeInfo(%s), @%s);', [resultname, Result.DataType, resultname]))
+ end;}
+ Write(' __Message.Finalize;');
+ if sa <> '' then
+ Write(' __Message.UnsetAttributes(__Transport);');
+ WriteEmptyLine;
+
+ if not NeedsAsyncRetrieveOperationDefinition(anOperation) then begin
+ Write(' __oResponseOptions := [roNoResponse];');
+ WriteEmptyLine;
+ end;
+
+ Write(' finally');
+
+ //ShowMessage('8');
+
+ if lHasObjectDisposer then begin
+ Write(' __lObjectDisposer := TROObjectDisposer.Create(__Instance);');
+ Write(' try');
+
+ for i := 0 to (Count-1) do with Items[i] do begin
+ if IsImplementedAsClass(DataType, aLibrary) then begin
+ if Items[i].Flag = fInOut then begin
+ Write(Format(' __lObjectDisposer.Add(__in_%s);', [Items[i].Name]));
+ end;
+ Write(Format(' __lObjectDisposer.Add(%s);', [Items[i].Name]));
+ end;
+ end;
+ if Assigned(Result) then begin
+ if IsImplementedAsClass(Result.DataType, aLibrary) then begin
+ Write(' __lObjectDisposer.Add(lResult);');
+ end;
+ end;
+
+ Write(' finally');
+ Write(' __lObjectDisposer.Free();');
+ Write(' end;');
+ end;
+ Write(' end;');
+ Write('end;');
+
+
+ { ToDo: passing an incomig reference to an out param will blow, as both will
+ be freed (so the same object si freed twice. we need to add better
+ logic to catch this:
+
+ currently
+
+ finally
+ if (Param1 <> Result) then Param1.Free;
+ Result.Free;
+ end;
+
+ better:
+
+ finally
+ if (Param1 <> Result) then Param1.Free;
+ Result.Free;
+ end;
+ }
+
+ {finally
+ if (Param1 <> Result) then Param1.Free;
+ Result.Free;
+ end;}
+
+
+
+ end;
+ WriteEmptyLine;
+end;
+
+class function TRODLToInvk.GetTargetFileName(const aLibrary: TRODLLIbrary; const aTargetEntity: string): string;
+begin
+ result := aLibrary.Name+'_Invk.pas';
+end;
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen/uRODLToWSDL.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen/uRODLToWSDL.pas
new file mode 100644
index 0000000..9fe1ae0
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen/uRODLToWSDL.pas
@@ -0,0 +1,1042 @@
+unit uRODLToWSDL;
+
+{----------------------------------------------------------------------------}
+{ RemObjects SDK Library - CodeGen }
+{ }
+{ compiler: Delphi 5 and up, Kylix 2 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the RemObjects SDK }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$IFDEF LINUX}
+{$I ../RemObjects.inc}
+{$ELSE}
+{$I ..\RemObjects.inc}
+{$ENDIF LINUX}
+
+interface
+
+uses
+ Classes, uRODL, uROTypes, uROXMLSerializer;
+
+const
+
+ SOAPDataTypes : array[TRODataType] of string = (
+ 'int',
+ 'dateTime',
+ 'double',
+ 'double',
+ 'string',
+ 'string',
+ 'long',
+ 'boolean',
+ 'anyType',
+ dts_base64Binary,
+ 'any',
+ 'string',
+ 'decimal',
+ '???');
+
+
+type
+ { TRODLToWSDL }
+ TRODLToWSDL = class(TRODLConverter)
+ private
+ fLocation: string;
+ fShowClientId: Boolean;
+ fUseLiteral: Boolean;
+ fUseDocument: Boolean;
+ fTargetEntity, fTargetNamespace: string;
+ fExternalTypesAsReferences: Boolean;
+ fHasXsdData: Boolean;
+ fExternalRefs, // namespace
+ fExternalUrls: TStrings; // uri
+ fXsdTns,
+ fTargetXSD: string;
+ procedure SetLocation(const Value: string);
+ function GetPrefix(const aType, aNs: string): String;
+
+ procedure WriteEnum(anEnum : TRODLEnum);
+ procedure WriteStruct(const aLibrary: TRODLLibrary; aStruct : TRODLStruct);
+ procedure WriteArray(anArray : TRODLArray);
+ procedure WriteExceptionElement(anException : TRODLException);
+
+ procedure WriteMessages(aLibrary: TRODLLibrary; aService : TRODLService);
+ procedure WriteExceptionMessage(anException: TRODLException);
+ procedure WriteLiteralParameters(aLibrary: TRODLLibrary; aService : TRODLService);
+ procedure WriteBindings(aLibrary: TRODLLibrary; aService : TRODLService);
+ procedure WritePorts(aLibrary: TRODLLibrary; aService : TRODLService);
+ procedure WriteExceptionParts(aMeth: TRODLOperation);
+ procedure WriteService(aLibrary: TRODLLibrary; aService : TRODLService);
+ function GetAnchestor(aLibrary: TRODLLibrary;
+ aService: TRODLService): TRODLService;
+ procedure WriteAnnotation(aDocString: string; aIndentation: Integer = 0; aNs:
+ string = 'xs:');
+ procedure WriteDocumentation(aDocString: string; aIndentation: Integer = 0;
+ aNs: string = 'xs:');
+ function ExtSOAPDataType(aLibrary: TRODLLibrary; const aDataTypeName : string) : string;
+ procedure ResolveExternalReferences(aLibrary: TRODLLibrary);
+ function ReplaceSpecialChars(aText: String): String;
+ protected
+ procedure IntConvert(const aLibrary : TRODLLibrary; const aTargetEntity : string = ''); override;
+ procedure AddExternal(aNode: TRODLEntity); overload;
+ procedure AddExternal(const aNs,aUrl: string); overload;
+
+ public
+ constructor Create(const aLibraryFile: string; const aTargetEntity: string = ''); overload; override;
+ constructor Create(const aLibrary: TRODLLibrary; const aTargetEntity: string = ''); overload; override;
+ destructor Destroy; override;
+ property TargetXsd: string read fTargetXSD write fTargetXSD;
+ property Location : string read fLocation write SetLocation;
+ property TargetNamespace: string read fTargetNamespace write fTargetNamespace;
+ property ShowClientId : Boolean read fShowClientId write fShowClientId;
+ property UseLiteral : Boolean read fUseLiteral write fUseLiteral;
+ property UseDocument : Boolean read fUseDocument write fUseDocument;
+ property ExternalTypesAsReferences : Boolean read fExternalTypesAsReferences write fExternalTypesAsReferences;
+ end;
+
+function SOAPDataType(const aDataTypeName : string; IncludeNamespace : boolean = TRUE) : string;
+
+implementation
+
+uses SysUtils;
+
+function SOAPDataType(const aDataTypeName : string; IncludeNamespace : boolean = TRUE) : string;
+var dt : TRODataType;
+begin
+ dt := StrToDataType(aDataTypeName);
+ if (dt=rtUserDefined)
+ then result := aDataTypeName
+ else result := SOAPDataTypes[dt];
+
+ if IncludeNamespace then begin
+ if (dt=rtUserDefined) then result := 'tns:'+result
+ else result := ns_Standard+':'+result;
+ end;
+end;
+
+{ TRODLToWSDL }
+
+const
+ definitions_ns : array[0..5] of string = ('xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" ',
+ 'xmlns:xs="http://www.w3.org/2001/XMLSchema" ',
+ 'name="%s" ',
+ 'xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" ',
+ 'xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" ',
+ 'xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"');
+
+procedure TRODLToWSDL.IntConvert(const aLibrary: TRODLLibrary; const aTargetEntity: string);
+var
+ s, i: integer;
+ lService: TRODLService;
+begin
+ if pos(':', fTargetNamespace) = 0 then fTargetNamespace := 'urn:'+fTargetNamespace;
+ fTargetEntity := aTargetEntity;
+ with aLibrary do begin
+ if (aTargetEntity<>'') then begin
+ lService := aLibrary.FindService(aTargetEntity);
+ if (lService <> nil) then
+ if lService.isPrivate then Exit;
+ end else
+ lService := NIL;
+ fExternalRefs.Clear;
+ fXsdTns := '';
+ if fExternalTypesAsReferences then begin
+ ResolveExternalReferences(aLibrary);
+ end;
+ if fXsdTns = '' then
+ fXsdTns := fTargetNamespace;
+
+
+
+ Write('');
+ if fTargetXSD <> '' then begin
+ if not fHasXsdData then raise Exception.Create('No xsd by that name');
+ Write(' fXsdTns then
+ write('xmlns:ns'+IntToStr(i)+'="'+fExternalRefs[i]+'" ', 3);
+ end;
+ Write('>');
+
+
+ end else begin
+ Write('');
+ WriteAnnotation(aLibrary.Documentation); {Giovanni}
+
+
+ // Write types
+
+ Write('', 3);
+ Write(Format('', [fTargetNamespace]), 6);
+ end;
+
+ for i := 0 to fExternalRefs.Count -1 do begin
+ if ((fTargetXSD ='') and (fExternalRefs[i] = fTargetNamespace)) or
+ ((fTargetXSD <> '') and (fExternalRefs[i] = fXsdTns)) then
+ Write(Format(' ',[flocation, fExternalUrls[i]] ), 3)
+ else
+ Write(Format(' ',[fExternalRefs[i], fLocation, fExternalUrls[i]] ), 3);
+ end;
+
+ for i := 0 to (EnumCount-1) do WriteEnum(Enums[i]);
+ for i := 0 to (StructCount-1) do WriteStruct(aLibrary, Structs[i]);
+ for i := 0 to (ArrayCount-1) do WriteArray(Arrays[i]);
+ for i := 0 to (ExceptionCount-1) do WriteExceptionElement(Exceptions[i]);
+ if fUseLiteral and fUseDocument then begin
+ if (aTargetEntity<>'') then WriteLiteralParameters(aLibrary, lService)
+ else for s := 0 to (ServiceCount-1) do begin
+ lService := Services[s];
+ WriteLiteralParameters(aLibrary, lService);
+ end;
+ if fShowClientId then begin
+ Write('', 3);
+ Write('', 6);
+ Write('', 9);
+ Write(' ', 6);
+ Write(' ', 9);
+ Write(' ', 6);
+ Write(' ', 3);
+ end;
+ end;
+ Write(' ', 6);
+ if fTargetXSD = '' then begin
+ Write(' ', 3);
+
+ // Writes messages
+ if (aTargetEntity<>'') then WriteMessages(aLibrary, lService)
+ else for s := 0 to (ServiceCount-1) do begin
+ lService := Services[s];
+ WriteMessages(aLibrary, lService);
+ end;
+ for s := 0 to aLibrary.ExceptionCount -1 do begin
+ WriteExceptionMessage(aLibrary.Exceptions[s]);
+ end;
+ if fShowClientId and fUseLiteral and fUseDocument then begin
+ Write('', 3);
+ Write(' ', 3);
+ Write(' ', 3);
+ end;
+
+ // Writes port and operations
+ if (aTargetEntity<>'') then WritePorts(aLibrary, lService)
+ else for s := 0 to (ServiceCount-1) do begin
+ lService := Services[s];
+ WritePorts(aLibrary, lService);
+ end;
+
+ // Write bindings
+ if (aTargetEntity<>'') then WriteBindings(aLibrary, lService)
+ else for s := 0 to (ServiceCount-1) do begin
+ lService := Services[s];
+ WriteBindings(aLibrary, lService);
+ end;
+
+ // Writes services
+ if (aTargetEntity<>'') then WriteService(aLibrary, lService)
+ else for s := 0 to (ServiceCount-1) do begin
+ lService := Services[s];
+ WriteService(aLibrary, lService);
+ end;
+
+ Write(' ');
+ end;
+ end;
+end;
+
+procedure TRODLToWSDL.SetLocation(const Value: string);
+begin
+ fLocation := Value;
+end;
+
+procedure TRODLToWSDL.WriteArray(anArray: TRODLArray);
+var
+ lMin,
+ lMax: Integer;
+begin
+ if fExternalTypesAsReferences and (anArray.Attributes.Values['ImportedFromUrl'] <> fTargetXSD) then exit;
+ Write(Format('', [anArray.Name]), 9);
+ WriteAnnotation(anArray.Documentation, 9);
+
+ if fUseDocument then begin
+ Write('', 12);
+
+ lMax := StrToIntDef(anArray.Attributes.Values['MaxOccurs'], -1);
+ lMin := StrToIntDef(anArray.Attributes.Values['MinOccurs'], 0);
+
+ if lMax = -1 then begin
+ Write(Format(' ', [Unprefix(SOAPDataType(anArray.ElementType, false)),
+ lMin,
+ ExtSOAPDataType(anArray.OwnerLibrary, anArray.ElementType)]), 15);
+ end else begin
+ Write(Format(' ', [Unprefix(SOAPDataType(anArray.ElementType, false)),
+ lMin,
+ lMax,
+ ExtSOAPDataType(anArray.OwnerLibrary, anArray.ElementType)]), 15);
+ end;
+ Write(' ', 12);
+ end else begin
+ Write('', 12);
+ Write('', 15);
+ Write(' ', 18);
+ Write(Format(' ',
+ [Unprefix(ExtSOAPDataType(anArray.OwnerLibrary, anArray.ElementType))]), 18);
+ Write(' ', 15);
+
+ Write(' ', 12);
+
+ end;
+ Write(' ', 9);
+end;
+
+procedure TRODLToWSDL.WriteEnum(anEnum: TRODLEnum);
+var i : integer;
+begin
+ if fExternalTypesAsReferences and (anEnum.Attributes.Values['ImportedFromUrl'] <> fTargetXSD) then exit;
+ Write(Format('', [anEnum.Name]), 9);
+ WriteAnnotation(anEnum.Documentation, 12); {Giovanni}
+ Write('', 12);
+ for i := 0 to anEnum.Count-1 do
+ begin
+ //WriteDocumentation(anEnum.Items[i].Documentation, 12); {Giovanni}
+ Write(Format(' ', [Unprefix(anEnum.Items[i].Name)]), 15);
+ end;
+ Write(' ', 12);
+ Write(' ', 9);
+end;
+
+function TRODLToWSDL.GetAnchestor(aLibrary: TRODLLibrary; aService: TRODLService): TRODLService;
+begin
+ result := NIL;
+ if (aService.Ancestor<>'') and not aService.isPrivate
+ then result := aLibrary.FindService(aService.Ancestor)
+end;
+
+procedure TRODLToWSDL.WriteMessages(aLibrary: TRODLLibrary; aService: TRODLService);
+var o, p : integer;
+ dups : TStringList;
+ lRet: TRODLStruct;
+ lType, s, svcname, mtdname : string;
+ op : TRODLOperation;
+begin
+ // Writes all the methods of this service and its anchestors.
+ // If more than one service descend from the same base one, the WSDL has to be generated
+ // using a format like this: http://localhost:8099/SOAP?Service=ServiceOne
+
+ svcname := aService.Name;
+ dups := TStringList.Create;
+ dups.Duplicates := dupIgnore;
+ dups.Sorted := TRUE;
+ try
+ while Assigned(aService) and not aService.isPrivate do begin
+
+ with aService.Default do begin
+ for o := 0 to (Count-1) do begin
+ op := Items[o];
+
+ // If a method with this name is present, it skips it
+ mtdname := UpperCase(op.Name);
+ if (dups.IndexOf(mtdname)>=0) then Continue else dups.Add(mtdname);
+
+ if fUseLiteral and fUseDocument then begin
+ Write(Format('', [Unprefix(svcname), Unprefix(op.Name)]), 3);
+ s := op.Attributes.Values['SOAPInputNameOverride'];
+ if s = '' then s := Format('%s___%s', [svcname, op.Name]);
+ Write(Format(' ', [s]), 6);
+ Write(' ', 3);
+ Write(Format('', [Unprefix(svcname), Unprefix(op.Name)]), 3);
+ s := op.Attributes.Values['SOAPOutputNameOverride'];
+ if s = '' then s := Format('%s___%sResponse', [svcname, op.Name]);
+ Write(Format(' ', [s]), 6);
+ Write(' ', 3);
+ end
+ else begin
+ // Continues
+ with Items[o] do begin
+ // Request
+ Write(Format('', [Unprefix(svcname), Unprefix(op.Name)]), 3);
+ for p := 0 to (Count-1) do
+ if IsInputFlag(Items[p].Flag) then begin
+ lType := Items[p].DataType;
+ lRet := aLibrary.FindStruct(lType);
+ if (lRet <> nil) and (lRet.Count = 1) and (lRet.Attributes.Values['Anonymous'] = '1') then
+ lType := lRet.Items[0].DataType;
+
+ Write(Format(' ', [Unprefix(Items[p].Name), ExtSOAPDataType(aLibrary, lType)]), 6);
+ end;
+ Write(' ', 3);
+
+ // Response
+ Write(Format('', [Unprefix(svcname), Unprefix(op.Name)]), 3);
+
+ if Assigned(aService.Default.Items[o].Result) then begin
+ lType := op.Result.DataType;
+ lRet := aLibrary.FindStruct(lType);
+ if (lRet <> nil) and (lRet.Count = 1) and (lRet.Attributes.Values['Anonymous'] = '1') then
+ lType := lRet.Items[0].DataType;
+ Write(Format(' ', [Unprefix(op.Result.Name), ExtSOAPDataType(aLibrary, lType)]), 6);
+ end;
+ //Write(Format(' ', [SOAPDataType(aService.Default.Items[o].Result.DataType)]), 6);
+
+ for p := 0 to (Count-1) do begin
+ if Items[p].Flag in [fOut, fInOut] then begin
+ lType := Items[p].DataType;
+ lRet := aLibrary.FindStruct(lType);
+ if (lRet <> nil) and (lRet.Count = 1) and (lRet.Attributes.Values['Anonymous'] = '1') then
+ lType := lRet.Items[0].DataType;
+
+ Write(Format(' ', [Unprefix(Items[p].Name), ExtSOAPDataType(aLibrary, lType)]), 6);
+ end;
+ end;
+ Write(' ', 3);
+ end;
+ end;
+ end;
+ end;
+ aService := GetAnchestor(aLibrary, aService);
+ end;
+ finally
+ dups.Free;
+ end;
+end;
+
+procedure TRODLToWSDL.WritePorts(aLibrary: TRODLLibrary; aService: TRODLService);
+var o : integer;
+svcname: string;
+begin
+ // Writes a port for each method of this service and its anchestors.
+ // Refer to the comment in TRODLToWSDL.WriteMessages
+ if aService.isPrivate then Exit;
+ svcname := aService.Name;
+ Write(Format('', [Unprefix(svcname)]), 3);
+ WriteDocumentation(aService.Documentation, 6, 'wsdl:');
+ while Assigned(aService) and not aService.isPrivate do begin
+
+ for o := 0 to (aService.Default.Count-1) do begin
+ with aService.Default.Items[o] do begin
+ Write(Format('', [Unprefix(Name)]), 6);
+ WriteDocumentation(Documentation, 6, 'wsdl:'); {Giovanni}
+ Write(Format(' ', [Unprefix(svcname), Unprefix(Name)]), 9);
+ Write(Format(' ', [Unprefix(svcname), Unprefix(Name)]), 9);
+ WriteExceptionParts(aService.Default.Items[o]);
+ Write(Format(' ', [Name]), 6)
+ end;
+ end;
+
+ aService := GetAnchestor(aLibrary, aService);
+ end;
+ Write(' ', 3);
+end;
+
+procedure TRODLToWSDL.WriteBindings(aLibrary: TRODLLibrary; aService: TRODLService);
+var o : integer;
+ lAct, svcname : string;
+begin
+ // Write all the bindings for this service and its anchestors using the method names.
+ // It's important to notice that we NEVER use the anchestor name when composing the SOAPAction, but
+ // always use the final service name
+ if aService.isPrivate then Exit;
+ svcname := aService.Name;
+
+ Write(Format('', [Unprefix(svcname), Unprefix(svcname)]), 3);
+ WriteAnnotation(aService.Documentation, 6); {Giovanni}
+ if fUseDocument then
+ Write(' ', 6)
+ else
+ Write(' ', 6);
+
+ while Assigned(aService) and not aService.isPrivate do begin
+
+ for o := 0 to (aService.Default.Count-1) do begin
+ with aService.Default.Items[o] do begin
+ lAct := Attributes.Values['Action'];
+ Write(Format('', [Unprefix(Name)]), 9);
+ if lAct <> '' then begin
+ if pos(':', lAct) = 0 then lAct := 'urn:'+lAct;
+ if fUseDocument then
+ Write(Format(' ', [lAct]),12)
+ else
+ Write(Format(' ', [lAct]),12);
+ end else begin
+ if fUseDocument then
+ Write(Format(' ', [aLibrary.Name, Unprefix(svcname), Unprefix(Name)]),12)
+ else
+ Write(Format(' ', [aLibrary.Name, Unprefix(svcname), Unprefix(Name)]),12);
+ end;
+ if fUseLiteral then begin
+ Write('', 12);
+ Write(' ', 15);
+ if fShowClientId and fUseDocument then
+ write(' ', 15);
+ Write(' ', 12);
+
+ Write('', 12);
+ Write(' ', 15);
+ if fShowClientId and fUseDocument then
+ write(' ', 15);
+ Write(' ', 12);
+ end
+ else begin
+ Write('', 12);
+ Write(Format(' ',
+ [Unprefix(aLibrary.Name), Unprefix(svcname)]), 15);
+ Write(' ', 12);
+
+ Write('', 12);
+ Write(Format(' ',
+ [Unprefix(aLibrary.Name), Unprefix(svcname)]), 15);
+ Write(' ', 12);
+ end;
+
+ Write(' ', 9);
+ end;
+ end;
+
+ aService := GetAnchestor(aLibrary, aService);
+ end;
+
+ Write(' ', 3);
+end;
+
+
+procedure TRODLToWSDL.WriteAnnotation(aDocString: string; aIndentation: Integer
+ = 0; aNs: string = 'xs:');
+begin
+ if Trim(aDocString) = '' then exit;
+ Write(Format('<%sannotation>',[aNs]), aIndentation);
+ WriteDocumentation(aDocString,aIndentation+3, aNs);
+ Write(Format('%sannotation>',[aNs]), aIndentation);
+end;
+
+
+procedure TRODLToWSDL.WriteDocumentation(aDocString: string; aIndentation:
+ Integer = 0; aNs: string = 'xs:');
+var lDocString: String;
+begin
+ lDocString := ReplaceSpecialChars(aDocString);
+ if Trim(aDocString) = '' then exit;
+ Write(Format('<%sdocumentation>',[aNs]), aIndentation);
+ Write(Format('%s', [lDocString]),aIndentation);
+ Write(Format('%sdocumentation>',[aNs]), aIndentation);
+end;
+
+procedure TRODLToWSDL.WriteService(aLibrary: TRODLLibrary; aService: TRODLService);
+begin
+ // We only write the service itself, ignoring the anchestors
+ if aService.isPrivate then Exit;
+ Write(Format('', [Unprefix(aService.Name)]), 3);
+ WriteAnnotation(aService.Default.Documentation, 6);
+
+ while Assigned(aService) and not aService.isPrivate do begin
+ Write(Format('',
+ [Unprefix(aService.Name), Unprefix(aService.Name)]), 6);
+ Write(Format(' ', [fLocation+'?service='+StringReplace(aService.Name,' ', '+', [rfReplaceAll])]), 9);
+ Write(' ', 6);
+
+ aService := NIL;//GetAnchestor(aLibrary, aService);
+ end;
+
+ Write(' ',3);
+end;
+
+procedure TRODLToWSDL.WriteStruct(const aLibrary: TRODLLibrary; aStruct: TRODLStruct);
+var
+ i : integer;
+ lLax: Boolean;
+ lRet: TRODLStruct;
+begin
+ if fExternalTypesAsReferences and (aStruct.Attributes.Values['ImportedFromUrl'] <> fTargetXSD) then exit;
+ if aStruct.Attributes.Values['Anonymous'] = '1' then exit;
+ Write(Format('', [Unprefix(aStruct.Name)]), 9);
+ WriteAnnotation(aStruct.Documentation, 9); {Giovanni}
+ if fUseDocument then begin
+ if aStruct.Ancestor <> '' then begin
+ write(Format('', [ExtSOAPDataType(aLibrary, aStruct.Ancestor)]), 9);
+ end;
+ end;
+ Write('', 12);
+ lLax := aStruct.Attributes.Values['lax'] = '1';
+ while Assigned(aStruct) do begin
+ for i := 0 to aStruct.Count-1 do
+ with aStruct.Items[i] do begin
+ lRet := aLibrary.FindStruct(DataType);
+ if (lRet <> nil) and (lRet.Count = 1) and (lRet.Attributes.Values['Anonymous'] = '1') then begin
+ if lRet.Attributes.Values['Nillable'] = '1' then
+ Write(Format('', [Unprefix(Name), ExtSOAPDataType(aLibrary, lRet.Items[0].DataType)]), 15)
+ else
+ Write(Format('', [Unprefix(Name), ExtSOAPDataType(aLibrary, lRet.Items[0].DataType)]), 15);
+ end else begin
+ Write(Format('', [Unprefix(Name), ExtSOAPDataType(aLibrary, DataType)]), 15);
+ end;
+ WriteAnnotation(Documentation, 15); {Giovanni}
+ Write(' ',15);
+ end;
+
+ if fUseDocument then break;
+ if aStruct.Ancestor <> '' then begin
+ aStruct := aLibrary.FindStruct(aStruct.Ancestor)
+ end
+ else begin
+ aStruct := nil;
+ end;
+ end;
+ if lLax then
+ Write(' ', 15);
+ Write(' ', 12);
+ if fUseDocument then begin
+ if aStruct.Ancestor <> '' then
+ write(' ', 9);
+ end;
+
+ Write(' ', 9);
+end;
+
+procedure TRODLToWSDL.WriteLiteralParameters(aLibrary: TRODLLibrary;
+ aService: TRODLService);
+var o, p, i : integer;
+ dups : TStringList;
+ s, svcname, mtdname : string;
+ op : TRODLOperation;
+ lRet: TRODLStruct;
+begin
+ // Writes all the methods of this service and its anchestors.
+ // If more than one service descend from the same base one, the WSDL has to be generated
+ // using a format like this: http://localhost:8099/SOAP?Service=ServiceOne
+
+ svcname := aService.Name;
+ dups := TStringList.Create;
+ dups.Duplicates := dupIgnore;
+ dups.Sorted := TRUE;
+ try
+ while Assigned(aService) and not aService.isPrivate do begin
+
+ for o := 0 to (aService.Default.Count-1) do begin
+ op := aService.Default.Items[o];
+
+ // If a method with this name is present, it skips it
+ mtdname := UpperCase(op.Name);
+ if (dups.IndexOf(mtdname)>=0) then Continue else dups.Add(mtdname);
+
+ s := op.Attributes.Values['SOAPInputNameOverride'];
+ if s = '' then s := Format('%s___%s', [Unprefix(svcname), Unprefix(op.Name)]);
+
+ if not ((fExternalTypesAsReferences) and (op.Attributes.Values['InputImportedFromUrl'] <> fTargetXSD)) then begin
+ p := 0;
+ for i := 0 to op.Count -1 do begin
+ if op[i].Flag in [fIn, fInOut] then
+ inc(p);
+ end;
+ write(Format('', [Unprefix(s)]), 3);
+ if p = 0 then begin
+ write(' ', 6);
+ end
+ else begin
+ write('', 6);
+ write('', 9);
+ for i := 0 to op.Count -1 do begin
+ if op[i].Flag in [fIn, fInOut] then begin
+ lRet := aLibrary.FindStruct(op[i].DataType);
+ if (lRet <> nil) and (lRet.Count = 1) and (lRet.Attributes.Values['Anonymous'] = '1') then begin
+ if lRet.Attributes.Values['Nillable'] = '1' then
+ write(Format(' ', [Unprefix(op[i].Name), ExtSOAPDataType(aLibrary, lRet[0].DataType)]), 12)
+ else
+ write(Format(' ', [Unprefix(op[i].Name), ExtSOAPDataType(aLibrary, lRet[0].DataType)]), 12);
+ end else
+
+ write(Format(' ', [Unprefix(op[i].Name), ExtSOAPDataType(aLibrary, op[i].DataType)]), 12);
+ end;
+ end;
+ if op.Attributes.VAlues['InputLax'] = '1' then
+ Write(' ', 12);
+ write(' ', 9);
+ write(' ', 6);
+ end;
+
+ write(' ', 3);
+ end;
+
+ s := op.Attributes.Values['SOAPOutputNameOverride'];
+ if s = '' then s := Format('%s___%sResponse', [Unprefix(svcname), Unprefix(op.Name)]);
+ if not ((fExternalTypesAsReferences) and (op.Attributes.Values['OutputImportedFromUrl'] <> fTargetXSD)) then begin
+ p := 0;
+ for i := 0 to op.Count -1 do begin
+ if op[i].Flag in [fOut, fInOut, fResult] then
+ inc(p);
+ end;
+ if op.Result <> nil then begin
+ inc(p);
+ end;
+ write(Format('', [Unprefix(s)]), 3);
+ if p = 0 then begin
+ write(' ', 6);
+ end
+ else begin
+ write('', 6);
+ write('', 9);
+ if op.Result <> nil then begin
+ lRet := aLibrary.FindStruct(op.Result.DataType);
+ if (lRet <> nil) and (lRet.Count = 1) and (lRet.Attributes.Values['Anonymous'] = '1') then begin
+ if lRet.Attributes.Values['Nillable'] = '1' then
+ write(Format(' ', [Unprefix(op.Result.Name), ExtSOAPDataType(aLibrary, lRet[0].DataType)]), 12)
+ else
+ write(Format(' ', [Unprefix(op.Result.Name), ExtSOAPDataType(aLibrary, lRet[0].DataType)]), 12);
+ end else
+ write(Format(' ', [Unprefix(op.Result.Name), ExtSOAPDataType(aLibrary, op.Result.DataType)]), 12);
+ end;
+ for i := 0 to op.Count -1 do begin
+ if op[i].Flag in [fOut, fInOut, fResult] then begin
+ lRet := aLibrary.FindStruct(op[i].DataType);
+ if (lRet <> nil) and (lRet.Count = 1) and (lRet.Attributes.Values['Anonymous'] = '1') then begin
+ if lRet.Attributes.Values['Nillable'] = '1' then
+ write(Format(' ', [Unprefix(op[i].Name), ExtSOAPDataType(aLibrary, lRet[0].DataType)]), 12)
+ else
+ write(Format(' ', [Unprefix(op[i].Name), ExtSOAPDataType(aLibrary, lRet[0].DataType)]), 12);
+ end else
+ write(Format(' ', [Unprefix(op[i].Name), ExtSOAPDataType(aLibrary, op[i].DataType)]), 12);
+ end;
+ end;
+ if op.Attributes.VAlues['OutputLax'] = '1' then
+ Write(' ', 12);
+ write(' ', 9);
+ write(' ', 6);
+ end;
+ write(' ', 3);
+ end;
+ end;
+ aService := GetAnchestor(aLibrary, aService);
+ end;
+ finally
+ dups.Free;
+ end;
+end;
+
+constructor TRODLToWSDL.Create(const aLibraryFile, aTargetEntity: string);
+begin
+ fTargetNamespace := 'http://tempuri.org/';
+ fExternalRefs := TStringList.Create;
+ fExternalUrls := TStringList.Create;
+ inherited;
+end;
+
+constructor TRODLToWSDL.Create(const aLibrary: TRODLLibrary;
+ const aTargetEntity: string);
+begin
+ fTargetNamespace := 'http://tempuri.org/';
+ fExternalRefs := TStringList.Create;
+ fExternalUrls := TStringList.Create;
+ inherited;
+end;
+
+destructor TRODLToWSDL.Destroy;
+begin
+ fExternalRefs.Free;
+ fExternalUrls.Free;
+ inherited;
+end;
+
+procedure TRODLToWSDL.AddExternal(aNode: TRODLEntity);
+var
+ lEx: TRODLException;
+begin
+ if Anode = nil then exit;
+ if aNode is TRODLException then begin
+ lEx := TRODLException(aNode);
+ if (fTargetXSD = '') or (fTargetXSD <> lEx.Attributes.Values['ElementUrl']) then
+ AddExternal(lEx.Attributes.Values['ElementNamespace'], lEx.Attributes.Values['ElementUrl']);
+ exit;
+ end;
+ if aNode.Attributes.Values['ImportedFromUrl'] = '' then exit;
+ AddExternal(aNode.Attributes.Values['ImportedFromNamespace'], aNode.Attributes.Values['ImportedFromUrl']);
+end;
+
+procedure TRODLToWSDL.AddExternal(const aNs,aUrl: string);
+var
+ i: Integer;
+begin
+ for i := 0 to fExternalRefs.Count -1 do begin
+ if (fExternalRefs[i] = aNs) and (fExternalUrls[i] = aUrl) then exit;
+ end;
+ fExternalRefs.Add(aNs);
+ fExternalUrls.ADd(aUrl);
+end;
+
+
+function TRODLToWSDL.ExtSOAPDataType(aLibrary: TRODLLibrary; const aDataTypeName: string): string;
+var
+ el: TRODLEntity;
+begin
+ if fExternalTypesAsReferences then begin
+ el := aLibrary.FindStruct(aDataTypeName);
+ if el = nil then
+ el := aLibrary.FindException(aDataTypeName);
+ if el = nil then
+ el := aLibrary.FindEnum(aDataTypeName);
+ if el = nil then
+ el := aLibrary.FindArray(aDataTypeName);
+ if el <> nil then begin
+ if (el.Attributes.values['ElementNamespace'] <> '') and (fXsdTns <> el.Attributes.values['ElementNamespace']) then begin
+ result := 'ns'+IntToStr(fExternalRefs.IndexOf(el.Attributes.values['ElementNamespace']))+':'+Unprefix(aDataTypeName);
+ exit;
+ end;
+ if (el.Attributes.values['ImportedFromNamespace'] <> '') and (fXsdTns <> el.Attributes.values['ImportedFromNamespace']) then begin
+ result := 'ns'+IntToStr(fExternalRefs.IndexOf(el.Attributes.values['ImportedFromNamespace']))+':'+Unprefix(aDataTypeName);
+ exit;
+ end;
+ end;
+ end;
+
+ result := Unprefix(SOAPDataType(aDataTypeName, True));
+end;
+
+procedure TRODLToWSDL.ResolveExternalReferences(aLibrary: TRODLLibrary);
+var
+ i, j, k: Integer;
+ lIsTarget: Boolean;
+ lServ: TRODLService;
+ lStr: TRODLStruct;
+ lEx: TRODLException;
+ lEl: TRODLEntity;
+
+ lOp: TRODLOperation;
+ lList: TList;
+
+begin
+ lList := TList.Create;
+ try
+ // assume only 1 of fTargetEntity/fTargetXsd is set
+ for i := 0 to aLibrary.ExceptionCount -1 do begin
+ lEx := aLibrary.Exceptions[i];
+ if (lEx.Attributes.Values['ElementUrl'] = fTargetXSD) and (lEx.Count = 1) then begin
+ fHasXsdData := true;
+ if (fXsdTns = '') and (lEx.Attributes.Values['ElementNamespace'] <> '') then
+ fXsdTns := lEx.Attributes.Values['ElementNamespace'];
+ lEl := aLibrary.ItemByName(lEx.Items[0].DataType);
+ if (lEl <> nil) and (lEl.Attributes.Values['ImportedFromUrl'] <> fTargetXSD) then
+ AddExternal(lEl);
+ lEl := aLibrary.ItemByName(lex.Ancestor);
+ if (lEl <> nil) and (lEl.Attributes.Values['ElementUrl'] <> fTargetXSD) then
+ AddExternal(lEl);
+ end;
+ end;
+ for i := 0 to aLibrary.ArrayCount -1 do begin
+ if aLibrary.Arrays[i].Attributes.Values['ImportedFromUrl'] = fTargetXSD then begin
+ fHasXsdData := true;
+ if (fXsdTns = '') and (aLibrary.Arrays[i].Attributes.Values['ImportedFromNamespace'] <> '') then
+ fXsdTns := aLibrary.Arrays[i].Attributes.Values['ImportedFromNamespace'];
+ lEl := aLibrary.ItemByName(aLibrary.Arrays[i].ElementType);
+ if (lEl <> nil) and (lEl.Attributes.Values['ImportedFromUrl'] <> fTargetXSD) then
+ AddExternal(lEl);
+ end else if fTargetXSD = '' then AddExternal(aLibrary.Arrays[i]);
+ end;
+ for i := 0 to aLibrary.StructCount -1 do begin
+ lStr := aLibrary.Structs[i];
+ if lStr.Attributes.Values['ImportedFromUrl'] = fTargetXSD then begin
+ while lStr <> nil do begin
+ fHasXsdData := true;
+ if (fXsdTns = '') and (lStr.Attributes.Values['ImportedFromNamespace'] <> '') then
+ fXsdTns := lStr.Attributes.Values['ImportedFromNamespace'];
+ for j := 0 to lStr.Count -1 do begin
+ lEl := aLibrary.ItemByName(lStr[j].DataType);
+ if (lEl <> nil) and (lEl.Attributes.Values['ImportedFromUrl'] <> fTargetXSD) then
+ AddExternal(lEl);
+ end;
+ lEl := aLibrary.ItemByName(lStr.Ancestor);
+ if (lEl <> nil) and (lEl.Attributes.Values['ImportedFromUrl'] <> fTargetXSD) then
+ AddExternal(lEl);
+ if lEl is TRODLStruct then
+ lStr := TRodlStruct(lEl)
+ else
+ break;
+ end;
+ end else if fTargetXSD = '' then AddExternal(lStr);
+ end;
+ for i := 0 to aLibrary.EnumCount -1 do begin
+ if aLibrary.Enums[i].Attributes.Values['ImportedFromUrl'] = fTargetXSD then begin
+ fHasXsdData := true;
+ if (fXsdTns = '') and (aLibrary.Enums[i].Attributes.Values['ImportedFromNamespace'] <> '') then
+ fXsdTns := aLibrary.Enums[i].Attributes.Values['ImportedFromNamespace'];
+
+ end else if fTargetXSD = '' then
+ AddExternal(aLibrary.Enums[i]);
+ end;
+ for i := 0 to aLibrary.ServiceCount -1 do begin
+ lServ := aLibrary.Services[i];
+ lIsTarget := ((fTargetEntity = '') or (lServ.Name = fTargetEntity)) and (fTargetXsd = '');
+ if lIsTarget or (fTargetXSD <> '') then begin
+ for j := 0 to lServ[0].Count -1 do begin
+ lOp := lServ[0][j];
+ if lIsTarget then
+ for k := 0 to lOp.Attributes.Count -1 do begin
+ if copy(lOp.Attributes[k], 1, 6) = 'fault_' then begin
+ AddExternal(aLibrary.FindException(lOp.Attributes.Values[lOp.Attributes.Names[k]]));
+ end;
+ end;
+ if lOp.Attributes.Values['InputImportedFromUrl'] = fTargetXSD then begin
+ for k := 0 to lOp.Count -1 do begin
+ if lOp[k].Flag in [fIn, fInOut] then begin
+ lEl := aLibrary.ItemByName(lOp[k].DataType);
+ if (lEl <> nil) and (lEl.Attributes.Values['ImportedFromUrl'] <> fTargetXSD) then
+ AddExternal(lEl);
+ end;
+ end;
+ end else if lIsTarget and (lOp.Attributes.Values['InputImportedFromUrl'] <> '') then begin
+ AddExternal(fTargetNamespace, lOp.Attributes.Values['InputImportedFromUrl']);
+ end;
+ if lOp.Attributes.Values['OutputImportedFromUrl'] = fTargetXSD then begin
+ for k := 0 to lOp.Count -1 do begin
+ if lOp[k].Flag in [fInOut] then begin
+ lEl := aLibrary.ItemByName(lOp[k].DataType);
+ if (lEl <> nil) and (lEl.Attributes.Values['ImportedFromUrl'] <> fTargetXSD) then
+ AddExternal(lEl);
+ end;
+ end;
+ if lOp.Result <> nil then begin
+ lEl := aLibrary.ItemByName(lOp.Result.DataType);
+ if (lEl <> nil) and (lEl.Attributes.Values['ImportedFromUrl'] <> fTargetXSD) then
+ AddExternal(lEl);
+ end;
+ end else if lIsTarget and (lOp.Attributes.Values['OutputImportedFromUrl'] <> '') then begin
+ AddExternal(fTargetNamespace, lOp.Attributes.Values['OutputImportedFromUrl']);
+ end;
+ end;
+ end;
+ end;
+
+ finally
+ lList.Free;
+ end;
+end;
+
+procedure TRODLToWSDL.WriteExceptionMessage(AnException: TRODLException);
+var
+ i: Integer;
+ lItem: TRODLTypedEntity;
+begin
+ if not fUseDocument then exit; // only supported for document
+ Write(Format('', [anException.Name]), 3);
+ for i := 0 to anException.Count -1 do begin
+ lItem := anException[i];
+ if AnException.Attributes.Values['ElementName'] <> '' then
+ Write(Format(' ', [lItem.Name, GetPrefix(AnException.Attributes.Values['ElementName'], AnException.Attributes.Values['ElementNamespace'])]), 6)
+ else
+ Write(Format(' ', [lItem.Name, ExtSOAPDataType(anException.OwnerLibrary, lItem.DataType)]), 6);
+ end;
+ Write(' ', 3);
+
+end;
+
+procedure TRODLToWSDL.WriteExceptionParts(aMeth: TRODLOperation);
+var
+ i: Integer;
+ s, lVal: string;
+begin
+ if not UseDocument then exit;
+ for i := 0 to aMeth.Attributes.Count -1 do begin
+ s := aMeth.Attributes.Names[i];
+ if copy(s,1,6)= 'fault_' then begin
+ lVal := aMeth.Attributes.Values[s];
+ if aMeth.OwnerLibrary.FindException(lVal) <> nil then begin
+ Write(Format(' ', [copy(s,7,MaxInt), lVal]), 9);
+ end;
+ end;
+ end;
+end;
+
+procedure TRODLToWSDL.WriteExceptionElement(anException: TRODLException);
+var
+ lRet: TRODLStruct;
+ i: Integer;
+begin
+ if fExternalTypesAsReferences and (anException.Attributes.Values['ElementUrl'] <> fTargetXSD) then exit;
+
+ if (anException.Attributes.Values['ElementType'] = '') and (anException.Attributes.Values['ElementName'] <> '') then begin
+ Write(Format('', [anException.Attributes.Values['ElementName']]), 9);
+ WriteAnnotation(anException.Documentation, 9); {Giovanni}
+ Write('', 9);
+ end else begin
+ if anException.Attributes.Values['ElementType'] = '' then
+ Write(Format('', [anException.Name]), 9)
+ else
+ Write(Format('', [anException.Attributes.Values['ElementType']]), 9);
+ WriteAnnotation(anException.Documentation, 9); {Giovanni}
+ end;
+ if anException.Ancestor <> '' then begin
+ write('', 9);
+ write(Format('', [ExtSOAPDataType(anException.OwnerLibrary, anException.Ancestor)]), 9);
+ end;
+ Write('', 12);
+
+ for i := 0 to anException.Count-1 do begin
+ with anException.Items[i] do begin
+ lRet := anException.OwnerLibrary.FindStruct(DataType);
+ if (lRet <> nil) and (lRet.Count = 1) and (lRet.Attributes.Values['Anonymous'] = '1') then begin
+ if lRet.Attributes.Values['Nillable'] = '1' then
+ Write(Format('', [Unprefix(Name), ExtSOAPDataType(anException.OwnerLibrary, lRet.Items[0].DataType)]), 15)
+ else
+ Write(Format('', [Unprefix(Name), ExtSOAPDataType(anException.OwnerLibrary, lRet.Items[0].DataType)]), 15);
+ end else begin
+ Write(Format('', [Unprefix(Name), ExtSOAPDataType(anException.OwnerLibrary, DataType)]), 15);
+ end;
+ WriteAnnotation(Documentation, 15); {Giovanni}
+ Write(' ',15);
+ end;
+ end;
+ Write(' ', 12);
+ if anException.Ancestor <> '' then begin
+ write(' ', 9);
+ write(' ', 9);
+ end;
+ Write(' ', 9);
+ if (anException.Attributes.Values['ElementType'] = '') and (anException.Attributes.Values['ElementName'] <> '') then
+ Write(' ', 9);
+ if anException.Attributes.Values['ElementType'] <> '' then begin
+ Write(Format(' ', [anException.Attributes.Values['ElementName'], anException.Attributes.Values['ElementType']]), 9);
+ end;
+end;
+
+function TRODLToWSDL.GetPrefix(const aType, aNs: string): String;
+begin
+ if (fTargetXSD = '') and (aNs = fTargetNamespace) then begin
+ result := 'tns:'+aType;
+ exit;
+ end;
+
+ if aNs <> '' then begin
+ result := 'ns'+IntToStr(fExternalRefs.IndexOf(aNs))+':'+Unprefix(aType);
+ exit;
+ end;
+ Result := 'tns:'+ aType;
+end;
+
+function TRODLToWSDL.ReplaceSpecialChars(aText: String): String;
+begin
+ result := StringReplace(aText, '&', '&', [rfReplaceAll, rfIgnoreCase]);
+ result := StringReplace(result, '"', '"', [rfReplaceAll, rfIgnoreCase]);
+ result := StringReplace(result, '''', ''', [rfReplaceAll, rfIgnoreCase]);
+ result := StringReplace(result, '<', '<', [rfReplaceAll, rfIgnoreCase]);
+ result := StringReplace(result, '>', '>', [rfReplaceAll, rfIgnoreCase]);
+end;
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen/uRODLToXML.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen/uRODLToXML.pas
new file mode 100644
index 0000000..80224d8
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen/uRODLToXML.pas
@@ -0,0 +1,1275 @@
+unit uRODLToXML;
+
+{----------------------------------------------------------------------------}
+{ RemObjects SDK Library - CodeGen }
+{ }
+{ compiler: Delphi 5 and up, Kylix 2 and up }
+{ platform: Win32, Linux }
+{ }
+{ (c)opyright RemObjects Software. all rights reserved. }
+{ }
+{ Using this code requires a valid license of the RemObjects SDK }
+{ which can be obtained at http://www.remobjects.com. }
+{----------------------------------------------------------------------------}
+
+{$IFDEF LINUX}
+{$I ../RemObjects.inc}
+{$ELSE}
+{$I ..\RemObjects.inc}
+{$ENDIF LINUX}
+
+interface
+
+uses
+ SysUtils,
+ Classes, uRODL;
+
+const
+ XMLFlagNames: array[TRODLParamFlag] of string = (
+ 'In', 'Out', 'InOut', 'Result');
+
+type
+ { TRODLToXML }
+ TRODLToXML = class(TRODLConverter)
+ private
+ fFlattenUsedRODLs:boolean;
+ fStyleSheet: string;
+ procedure WriteArrays(xml: TStringList; aLibrary: TRODLLibrary);
+ procedure WriteAttributes(xml: TStringList; aEntity: TRODLEntity);
+ procedure WriteEnums(xml: TStringList; aLibrary: TRODLLibrary);
+ procedure WriteEventSinks(xml: TStringList; aLibrary: TRODLLibrary);
+ procedure WriteExceptions(xml: TStringList; aLibrary: TRODLLibrary);
+ procedure WriteServices(xml: TStringList; aLibrary: TRODLLibrary);
+ procedure WriteStructs(xml: TStringList; aLibrary: TRODLLibrary);
+ procedure WriteUses(xml: TStringList; aLibrary: TRODLLibrary);
+ function WriteAsCData(aData: string): string;
+ function Indent(SpaceCount: byte): string;
+ protected
+ procedure IntConvert(const aLibrary: TRODLLibrary; const aTargetEntity: string = ''); override;
+ public
+ constructor Create(const aLibrary: TRODLLibrary; iFlattenUsedRODLs:boolean=false); reintroduce; overload;
+ constructor Create(const aLibraryFile: string; iFlattenUsedRODLs:boolean=false); reintroduce; overload;
+
+ property StyleSheet: string read fStyleSheet write fStyleSheet;
+ end;
+
+ { TXMLToRODL }
+ TXMLToRODL = class(TRODLReader)
+ private
+ fAddToExistingLibrary:TRODLLibrary;
+ fRecreateGuids:boolean;
+ procedure LoadStreamToLibrary(aStream: TStream; iLibrary: TRODLLibrary; iRodlName: string = ''; iRodlUse: TRODLUse=nil; iReplaceLibraryAttributes:boolean=true);
+ function RecreateGuidIfNeeded(iGuid:TGuid):TGuid;
+ protected
+ function IntReadFromStream(aStream: TStream; aFilename:string): TRODLLibrary; override;
+
+ public
+ constructor Create(iAddToExisting:TRODLLibrary; iRecreateGuids:boolean=false); reintroduce; overload;
+ procedure LoadFileToLibrary(iFilename: string; iLibrary: TRODLLibrary; iRodlUse:TRODLUse=nil);
+
+ function ReadFromString(const aString: string; const aFilename:string=''): TRODLLibrary;
+ end;
+
+function XMLFlagNameToFlag(const aName: string): TRODLParamFlag;
+
+function LoadLibraryFromXml(const aFilename: string): TRODLLibrary;
+
+implementation
+
+uses
+ {$IFDEF DEBUG_REMOBJECTS_RODLTOXML}eDebugServer, {$ENDIF}
+ TypInfo, {$IFDEF DELPHI5}ComObj,{$ENDIF}
+ uROClasses, uRORes, uROXMLIntf;
+
+function XMLFlagNameToFlag(const aName: string): TRODLParamFlag;
+var
+ f: TRODLParamFlag;
+begin
+ result := fIn;
+
+ for f := Low(TRODLParamFlag) to High(TRODLParamFlag) do
+ if (CompareText(XMLFlagNames[f], aName) = 0) then begin
+ result := f;
+ Exit;
+ end;
+
+ RaiseError(err_InvalidParamFlag, [aName]);
+end;
+
+function LoadLibraryFromXml(const aFilename: string): TRODLLibrary;
+begin
+ with TXMLToRODL.Create do try
+ result := ReadFromFile(aFilename);
+ finally
+ Free;
+ end;
+end;
+
+constructor TRODLToXML.Create(const aLibrary: TRODLLibrary; iFlattenUsedRODLs: boolean);
+begin
+ fFlattenUsedRODLs := iFlattenUsedRODLs;
+ inherited Create(aLibrary);
+end;
+
+constructor TRODLToXML.Create(const aLibraryFile: string; iFlattenUsedRODLs: boolean);
+begin
+ fFlattenUsedRODLs := iFlattenUsedRODLs;
+ inherited Create(aLibraryFIle);
+end;
+
+procedure TRODLToXML.IntConvert(const aLibrary: TRODLLibrary; const aTargetEntity: string = '');
+var
+ lAdditional: string;
+ xml: TStringList;
+begin
+ xml := TStringList.Create;
+ with aLibrary do try
+ lAdditional := '';
+ if Namespace <> '' then lAdditional := 'Namespace="' + Namespace + '" ';
+
+ xml.Append('');
+ if fStyleSheet <> '' then
+ xml.Append('');
+
+ xml.Append(Format('', [Name, GUIDToString(UID)]));
+
+ WriteAttributes(xml, aLibrary);
+ WriteServices(xml, aLibrary);
+ WriteEventSinks(xml, aLibrary);
+ WriteStructs(xml, aLibrary);
+ WriteEnums(xml, aLibrary);
+ WriteArrays(xml, aLibrary);
+ WriteUses(xml, aLibrary);
+ WriteExceptions(xml, aLibrary);
+
+ xml.Append(' ');
+ finally
+ Buffer.AddStrings(xml);
+ xml.Free;
+ end;
+end;
+
+procedure TRODLToXML.WriteArrays(xml: TStringList; aLibrary: TRODLLibrary);
+var
+ i: Integer;
+begin
+ xml.Append(Indent(3) + '');
+ with aLibrary do
+ for i := 0 to (ArrayCount - 1) do begin
+ if fFlattenUsedRODLs or not Arrays[i].IsFromUsedRodl then
+ with Arrays[i] do begin
+ xml.Append(Indent(6) + Format('', [Name, GUIDToString(UID)]));
+ WriteAttributes(xml, Info);
+ xml.Append(Indent(3) + Format(' ', [ElementType]));
+ xml.Append(Indent(6) + ' ');
+ end;
+ end;
+ xml.Append(Indent(3) + ' ');
+end;
+
+function TRODLToXML.WriteAsCData(aData: string): string;
+
+ function CleanCDATA(const aString: string): string;
+ var
+ lLength: Integer;
+ begin
+ result := aString;
+ lLength := length(aString);
+ while (lLength > 0) and (CharInSet(result[lLength],[#09,#10,#13,#32])) do dec(lLength);
+ SetLength(result, lLength);
+ for lLength := Length(Result) downto 1 do
+ if CharInSet(Result[lLength] , [#0..#8,#11,#12,#14..#31]) then result[lLength] := #32;
+ result := StringReplace(result, ']]>', ']]>', [rfReplaceAll]);
+ end;
+
+begin
+ result := '';
+end;
+
+procedure TRODLToXML.WriteAttributes(xml: TStringList; aEntity: TRODLEntity);
+var
+ attr: Integer;
+begin
+ if aEntity.Documentation <> '' then
+ xml.Append(Indent(6) + '' + WriteAsCData(aEntity.Documentation) + ' ');
+
+ if (aEntity.Attributes.Count > 0) then begin
+ with aEntity.Attributes do begin
+ xml.Append(Indent(6) + '');
+
+ for attr := 0 to (aEntity.Attributes.Count - 1) do
+ xml.Append(Indent(9) + Format('<%s Value="%s" />',
+ [Names[attr], Values[Names[attr]]]));
+
+ xml.Append(Indent(6) + ' ');
+ end;
+ end;
+
+ if Assigned(aEntity.GroupUnder) then
+ xml.Append(Indent(6) + Format(' ', [GUIDToString(aEntity.GroupUnder.UID)]));
+end;
+
+procedure TRODLToXML.WriteEnums(xml: TStringList; aLibrary: TRODLLibrary);
+var
+ i, k: Integer;
+begin
+ xml.Append(Indent(3) + '');
+ with aLibrary do
+ for i := 0 to (EnumCount - 1) do begin
+
+ if fFlattenUsedRODLs or not Enums[i].IsFromUsedRodl then
+ with Enums[i] do begin
+ if not PrefixEnumValues then
+ xml.Append(Indent(6) + Format('', [Name, GUIDToString(UID)]))
+ else
+ xml.Append(Indent(6) + Format('', [Name, GUIDToString(UID)]));
+ WriteAttributes(xml, Info);
+ xml.Append(Indent(3) + '');
+ for k := 0 to (Count - 1) do begin
+ with Items[k] do begin
+ xml.Append(Indent(9) + Format('', [Name]));
+ WriteAttributes(xml, Info);
+ xml.Append(Indent(9) + ' ');
+ end;
+ end;
+ xml.Append(Indent(3) + ' ');
+ xml.Append(Indent(6) + ' ');
+ end;
+ end;
+ xml.Append(Indent(3) + ' ');
+end;
+
+procedure TRODLToXML.WriteEventSinks(xml: TStringList; aLibrary: TRODLLibrary);
+var
+ i, k, m, p: Integer;
+ lAdditional: string;
+begin
+ with aLibrary do
+ if EventSinkCount > 0 then begin
+ xml.Append(Indent(3) + '');
+ for i := 0 to (EventSinkCount - 1) do begin
+ if fFlattenUsedRODLs or not EventSinks[i].IsFromUsedRodl then
+ with EventSinks[i] do begin
+
+ lAdditional := '';
+ if ImplUnit <> '' then lAdditional := ' ImplUnit="' + ImplUnit + '"';
+ if ImplClass <> '' then lAdditional := lAdditional + ' ImplClass="' + ImplClass + '"';
+ if Ancestor <> '' then lAdditional := lAdditional + ' Ancestor="' + Ancestor + '"';
+ if Abstract then lAdditional := lAdditional + ' Abstract="1"';
+ xml.Append(Indent(6) + Format('', [Name, GUIDToString(UID)]));
+
+ WriteAttributes(xml, Info);
+
+ xml.Append(Indent(6) + '');
+
+ for k := 0 to (Count - 1) do begin
+ with Items[k] do begin
+ xml.Append(Indent(9) +
+ Format('', [Name, GUIDToString(UID)]));
+
+ WriteAttributes(xml, Info);
+
+ xml.Append(Indent(6) + '');
+ for m := 0 to (Count - 1) do begin
+ with Items[m] do begin
+ xml.Append(Indent(9) +
+ Format('', [Name, GUIDToString(UID)]));
+
+ WriteAttributes(xml, Info);
+
+ xml.Append(Indent(6) + '');
+
+ { ToDo: cloned from above for now; implement "proper" RODL->XML for 3.0 }
+ if Assigned(Result) then with Result do begin
+ with Result do begin
+ xml.Append(Format('', [Name, DataType, XMLFlagNames[Flag]]));
+ WriteAttributes(xml, Info);
+ xml.Append(' ');
+ end;
+ end;
+
+ for p := 0 to (Count - 1) do begin
+ with Items[p] do begin
+ xml.Append(Format('', [Name, DataType, XMLFlagNames[Flag]]));
+ WriteAttributes(xml, Info);
+ xml.Append(' ');
+ end;
+ end;
+ xml.Append(Indent(6) + ' ');
+ xml.Append(Indent(9) + ' ');
+ end;
+ end;
+ xml.Append(Indent(6) + ' ');
+
+ xml.Append(Indent(9) + ' ');
+ end;
+ end;
+
+ xml.Append(Indent(6) + ' ');
+ xml.Append(Indent(6) + ' ');
+ end;
+ end;
+ xml.Append(Indent(3) + ' ');
+ end;
+end;
+
+procedure TRODLToXML.WriteExceptions(xml: TStringList; aLibrary: TRODLLibrary);
+var
+ i, k: Integer;
+ lAdd: string;
+begin
+ with aLibrary do
+ if ExceptionCount > 0 then begin
+ xml.Append(Indent(3) + '');
+ for i := 0 to (ExceptionCount - 1) do begin
+ if fFlattenUsedRODLs or not Exceptions[i].IsFromUsedRodl then
+ with Exceptions[i] do begin
+
+ lAdd := '';
+ if AutoCreateParams then
+ lAdd := ' AutoCreateParams="1"'
+ else
+ lAdd := ' AutoCreateParams="0"';
+
+ if Ancestor <> '' then lAdd := lAdd+Format(' Ancestor="%s"',[Ancestor]);
+ if Abstract then lAdd := lAdd + ' Abstract="1"';
+
+ xml.Append(Indent(6) + Format('',[Name, GUIDToString(UID)]));
+ WriteAttributes(xml, Info);
+ xml.Append(Indent(3) + '');
+ for k := 0 to (Count - 1) do begin
+ with Items[k] do begin
+ xml.Append(Indent(9) + Format('', [Name, DataType]));
+ WriteAttributes(xml, Info);
+ xml.Append(Indent(9) + Format(' ', [Name, DataType]));
+ end;
+ end;
+ xml.Append(Indent(3) + ' ');
+ xml.Append(Indent(6) + ' ')
+ end;
+
+ end;
+ xml.Append(Indent(3) + ' ');
+ end;
+end;
+
+procedure TRODLToXML.WriteServices(xml: TStringList; aLibrary: TRODLLibrary);
+var
+ i, k, m, p: Integer;
+ lAdditional: string;
+begin
+ with aLibrary do begin
+ if GroupCount > 0 then begin
+ xml.Append(Indent(3) + '');
+ for i := 0 to (GroupCount - 1) do begin
+ if fFlattenUsedRODLs or not Groups[i].IsFromUsedRodl then begin
+ with Groups[i] do begin
+ xml.Append(Indent(6) + Format('', [Name, GUIDToString(UID)]));
+ WriteAttributes(xml, Info);
+ xml.Append(Indent(6) + ' ');
+ end;
+ end;
+ end;
+ xml.Append(Indent(3) + ' ');
+ end;
+
+ xml.Append(Indent(3) + '');
+ for i := 0 to (ServiceCount - 1) do begin
+ if fFlattenUsedRODLs or not Services[i].IsFromUsedRodl then
+ with Services[i] do begin
+
+ lAdditional := '';
+ if ImplUnit <> '' then lAdditional := ' ImplUnit="' + ImplUnit + '"';
+ if ImplClass <> '' then lAdditional := lAdditional + ' ImplClass="' + ImplClass + '"';
+ if Ancestor <> '' then lAdditional := lAdditional + ' Ancestor="' + Ancestor + '"';
+ if Abstract then lAdditional := lAdditional + ' Abstract="1"';
+ if isPrivate then lAdditional := lAdditional + ' Private="1"';
+
+ xml.Append(Indent(6) + Format('', [Name, GUIDToString(UID)]));
+ WriteAttributes(xml, Info);
+
+ xml.Append(Indent(6) + '');
+
+ for k := 0 to (Count - 1) do begin
+ with Items[k] do begin
+ xml.Append(Indent(9) + Format('', [Name, GUIDToString(UID)]));
+ WriteAttributes(xml, Info);
+
+ xml.Append(Indent(6) + '');
+ for m := 0 to (Count - 1) do begin
+ with Items[m] do begin
+ if ForceAsyncResponse then
+ xml.Append(Indent(9) + Format('', [Name, GUIDToString(UID)]))
+ else
+ xml.Append(Indent(9) + Format('', [Name, GUIDToString(UID)]));
+
+ WriteAttributes(xml, Info);
+
+ xml.Append(Indent(6) + '');
+
+ if Assigned(Result) then with Result do begin
+ with Result do begin
+ xml.Append(Format('', [Name, DataType, XMLFlagNames[Flag]]));
+ WriteAttributes(xml, Info);
+ xml.Append(' ');
+ end;
+ end;
+
+ for p := 0 to (Count - 1) do begin
+ with Items[p] do begin
+ xml.Append(Format('', [Name, DataType, XMLFlagNames[Flag]]));
+ WriteAttributes(xml, Info);
+ xml.Append(' ');
+ end;
+ end;
+ xml.Append(Indent(6) + ' ');
+
+ if CodeBodyCount > 0 then begin
+ xml.Append(Indent(6) + '');
+ for p := 0 to CodeBodyCount-1 do begin
+ xml.Append(Indent(6) + '' + WriteAsCData(CodeBodies[CodeBodyLanguages[p]].Text) + '');
+ end;
+ xml.Append(Indent(6) + '');
+ end;
+
+ xml.Append(Indent(9) + ' ');
+ end;
+ end;
+ xml.Append(Indent(6) + ' ');
+
+ xml.Append(Indent(9) + ' ');
+ end;
+ end;
+
+ xml.Append(Indent(6) + ' ');
+ xml.Append(Indent(6) + ' ');
+ end;
+ end;
+ end;
+ xml.Append(Indent(3) + ' ');
+end;
+
+procedure TRODLToXML.WriteStructs(xml: TStringList; aLibrary: TRODLLibrary);
+var
+ i, k: Integer;
+ lAdditional: string;
+begin
+ xml.Append(Indent(3) + '');
+ with aLibrary do
+ for i := 0 to (StructCount - 1) do begin
+
+ if fFlattenUsedRODLs or not Structs[i].IsFromUsedRodl then
+ with Structs[i] do begin
+
+ lAdditional := '';
+ if AutoCreateParams then
+ lAdditional := ' AutoCreateParams="1"'
+ else
+ lAdditional := ' AutoCreateParams="0"';
+
+ if Ancestor <> '' then lAdditional := lAdditional + Format(' Ancestor="%s"', [Ancestor]);
+ if Abstract then lAdditional := lAdditional + ' Abstract="1"';
+
+ xml.Append(Indent(6) + Format('',
+ [Name, GUIDToString(UID)]));
+
+ WriteAttributes(xml, Info);
+ xml.Append(Indent(3) + '');
+ for k := 0 to (Count - 1) do begin
+ with Items[k] do begin
+ xml.Append(Indent(9) + Format('', [Name, DataType]));
+ WriteAttributes(xml, Info);
+ xml.Append(Indent(9) + Format(' ', [Name, DataType]));
+ end;
+ end;
+ xml.Append(Indent(3) + ' ');
+ xml.Append(Indent(6) + ' ');
+ end;
+
+ end;
+ xml.Append(Indent(3) + ' ');
+end;
+
+procedure TRODLToXML.WriteUses(xml: TStringList; aLibrary: TRODLLibrary);
+var
+ i: Integer;
+ lSplitModeAttribute: string;
+ lUsedRodlFilename, lUsedRodlFilename_absolute: string;
+begin
+ with aLibrary do
+ if UseCount > 0 then begin
+ xml.Append(Indent(3) + '');
+ for i := 0 to (UseCount - 1) do begin
+ if (not fFlattenUsedRODLs) and (not Use[i].IsFromUsedRodl) then
+ with Use[i] do begin
+ lUsedRodlFilename := RodlFile;
+ lUsedRodlFilename_absolute := AbsoluteRodlFile;
+ if lUsedRodlFilename_absolute = '' then
+ lUsedRodlFilename_absolute := ExpandFileName(ExpandVariables(lUsedRodlFilename));
+ {if aLibrary.RodlFilename <> '' then
+ lUsedRodlFilename := ExtractRelativePath(ExtractFilePath(aLibrary.RodlFilename),lUsedRodlFilename);}
+
+ lSplitModeAttribute := '';
+ if SplitMode <> usmAsParent then
+ lSplitModeAttribute := Format(' SplitMode="%s"', [IntToStr(Integer(SplitMode))]);
+ if GenerateCode then
+ xml.Append(Indent(6) + Format('',
+ [Name, GUIDToString(UID), lUsedRodlFilename, lUsedRodlFilename_absolute, lSplitModeAttribute]))
+ else
+ xml.Append(Indent(6) + Format('',
+ [Name, GUIDToString(UID), lUsedRodlFilename, lUsedRodlFilename_absolute, lSplitModeAttribute]));
+ WriteAttributes(xml, Info);
+ xml.Append(Indent(6) + ' ')
+ end;
+
+ end;
+ xml.Append(Indent(3) + ' ');
+ end;
+end;
+
+function TRODLToXML.Indent(SpaceCount: byte): string;
+{var
+ i: integer;}
+begin
+ result := '';
+ {for i := 1 to SpaceCount do
+ result := result + ' ';}
+end;
+
+{ TXMLToRODL }
+
+function GetNodeAttribute(aNode: IXMLNode; const anAttributeName: string): string;
+var
+ lAtrributeNode: IXMLNode;
+begin
+ Result := '';
+ if Assigned(aNode) then begin
+ lAtrributeNode := aNode.GetAttributeByName(anAttributeName);
+ if Assigned(lAtrributeNode) then result := lAtrributeNode.Value;
+ end else
+ if CompareText(anAttributeName, 'UID') = 0 then result := GUIDToString(EmptyGUID);
+end;
+
+function FixLegacyTypes(aType: string): string;
+begin
+ if LowerCase(aType) = 'string' then result := 'AnsiString'
+ else result := aType;
+end;
+
+constructor TXMLToRODL.Create(iAddToExisting: TRODLLibrary; iRecreateGuids:boolean=false);
+begin
+ Create();
+ fAddToExistingLibrary := iAddToExisting;
+ fRecreateGuids := iRecreateGuids;
+end;
+
+function TXMLToRODL.IntReadFromStream(aStream: TStream; aFilename:string): TRODLLibrary;
+begin
+ if Assigned(fAddToExistingLibrary) then begin
+ result := fAddToExistingLibrary;
+ LoadStreamToLibrary(aStream, result, aFilename, nil, false); // Don't set RODL Attributes
+ end
+ else begin
+ result := TRODLLibrary.Create();
+ result.RodlFilename := aFilename;
+ LoadStreamToLibrary(aStream, result, aFilename);
+ end;
+end;
+
+procedure TXMLToRODL.LoadFileToLibrary(iFilename: string; iLibrary: TRODLLibrary; iRodlUse:TRODLUse=nil);
+var
+ lStream: TStream;
+begin
+ //ToDo: resolve relative filenames; handle http filenames, etc.
+
+ lStream := TFileStream.Create(iFilename, fmOpenRead);
+ try
+ LoadStreamToLibrary(lStream, iLibrary, iFilename, iRodlUse);
+ finally
+ lStream.Free();
+ end;
+end;
+
+function ExpandFileNameByBase(const iBase, iFilename:string):string; overload;
+var
+ lCurrentDir:string;
+begin
+ lCurrentDir := GetCurrentDir();
+ SetCurrentDir(iBase);
+ try
+ result := ExpandFileName(iFilename);
+ finally
+ SetCurrentDir(lCurrentDir);
+ end;
+end;
+
+function StringToGUID(const s: string): TGUID;
+begin
+ if s = '' then Result := NewGuid else begin
+ try
+ Result := Sysutils.StringToGUID(s);
+ except
+ on e: EConvertError do
+ Result := NewGuid;
+ end;
+ end;
+end;
+
+procedure TXMLToRODL.LoadStreamToLibrary(aStream: TStream; iLibrary: TRODLLibrary; iRodlName: string = ''; iRodlUse: TRODLUse=nil; iReplaceLibraryAttributes:boolean=true);
+var
+ fGroupGuidList: TStringList;
+
+ procedure ReadAttributes(anXMLNode: IXMLNode; aEntity: TRODLEntity);
+ var
+ lGroupID: string;
+ i, k: integer;
+ lName, lValue: string;
+ lNode,lChildNode:IXMLNode;
+ begin
+ if (anXMLNode = nil) then Exit;
+
+ { read legacy v2.0 documentation attribues }
+ if (anXMLNode.GetAttributeByName('Documentation') <> nil) then begin
+ aEntity.Documentation := anXMLNode.GetAttributeByName('Documentation').Value;
+ end;
+
+ lValue := '';
+ for i := 0 to (anXMLNode.ChildrenCount-1) do begin
+
+ lNode :=anXMLNode.Children[i];
+ if (lNode.Name = 'CustomAttributes') then begin
+
+ for k := 0 to (lNode.ChildrenCount-1) do begin
+ lChildNode := lNode.Children[k];
+ lName := lChildNode.Name;
+
+ if (lName = '#text') then Continue;
+ if (lChildNode.GetAttributeByName('Value') <> nil) then begin
+ lValue := lChildNode.GetAttributeByName('Value').Value;
+ end
+ else begin
+ lValue := '';
+ end;
+
+ aEntity.Attributes.Values[lName] := lValue;
+ end;
+
+ Exit;
+ end
+ else if lNode.Name = 'Documentation' then begin
+ aEntity.Documentation := lNode.Value
+ end
+ else if lNode.Name = 'Group' then begin
+ lGroupID := lNode.GetAttributeValue('Under','');
+ if lGroupID <> '' then begin
+ aEntity.GroupUnder := iLibrary.FindGroup(StringToGUID(lGroupID));
+ if aEntity.GroupUnder = nil then begin
+ lGroupID := fGroupGuidList.Values[lGroupId];
+ if lGroupID <> '' then
+ aEntity.GroupUnder := iLibrary.FindGroup(StringToGUID(lGroupID));
+
+ end;
+ end;
+ end;
+
+ end;
+ end;
+
+ function RODLFileIsUsed(aRODL: string): boolean;
+ var
+ i: integer;
+ begin
+ Result:=False;
+ if ARodl <> '' then
+ if FileExists(ARodl) then
+ For i := 0 to iLibrary.UseCount -1 do begin
+ if SameText(ExpandVariables(iLibrary.Use[i].RodlFile),aRODL) or SameText(iLibrary.Use[i].AbsoluteRodlFile, aRODL) then begin
+ Result:=True;
+ Break;
+ end;
+ end;
+ end;
+
+var
+ lFlag: TRODLParamFlag;
+ //domimpl: TDomImplementation;
+ //parser: TXmlToDomParser;
+ xmldoc: IXMLDocument;
+ list,
+ sublist,
+ subsublist,
+ lastlist: IXMLNodeList;
+ i, k, m, p: Integer;
+
+ lParentNode:IXMLNode;
+
+ struct: TRODLStruct;
+ stelem: TRODLTypedEntity;
+ arr: TRODLArray;
+ lUse: TRODLUse;
+ lEventSink: TRODLEventSink;
+ lFilename:string;
+ lException: TRODLException;
+ lGroup: TRODLGroup;
+ svc: TRODLService;
+ enum: TRODLEnum;
+ eval: TRODLEnumValue;
+ intf: TRODLServiceInterface;
+ op: TRODLOperation;
+ par: TRODLOperationParam;
+
+begin
+ fGroupGuidList:= TStringList.Create;
+ try
+ xmldoc := NewROXmlDocument();
+ aStream.Position := 0;
+ xmldoc.New();
+ xmldoc.LoadFromStream(aStream);
+
+ if not Assigned(iRodlUse) then begin
+ // Library
+ if Assigned(xmldoc.DocumentNode) then begin
+ if iReplaceLibraryAttributes then begin
+ iLibrary.Name := GetNodeAttribute(xmldoc.DocumentNode, 'Name');
+ iLibrary.Namespace := GetNodeAttribute(xmldoc.DocumentNode, 'Namespace');
+ iLibrary.UID := RecreateGuidIfNeeded(StringToGUID(GetNodeAttribute(xmldoc.DocumentNode, 'UID')));
+ //iLibrary.Documentation := GetNodeAttribute(xmldoc.DocumentNode, 'Documentation');
+
+ ReadAttributes(xmldoc.DocumentNode, iLibrary);
+ end;
+ end;
+ end else
+ begin
+ iRodlUse.LoadedRodlLibraryName := GetNodeAttribute(xmldoc.DocumentNode, 'Name');
+ //
+ end;
+
+ // Groups
+ lParentNode := xmldoc.DocumentNode.GetNodeByName('Groups');
+ if Assigned(lParentNode) then begin
+ list := lParentNode.GetNodesByName('Group');
+ if Assigned(list) then
+ begin
+ for i := 0 to (list.Count-1) do begin
+ lGroup := TRODLGroup.Create;
+ lGroup.IsFromUsedRodl := iRodlUse <> nil;
+ lGroup.LocatedInRodlUse := iRodlUse;
+ lGroup.Name := GetNodeAttribute(list.Nodes[i], 'Name');
+ //lGroup.Documentation := GetNodeAttribute(list.Nodes[i], 'Documentation');
+ lGroup.UID := RecreateGuidIfNeeded(StringToGUID(GetNodeAttribute(list.Nodes[i], 'UID')));
+ fGroupGuidList.Add(GetNodeAttribute(list.Nodes[i], 'UID')+'='+GUIDToString(lGroup.Uid));
+
+ iLibrary.Add(lGroup);
+ end;
+ for i := 0 to List.count -1 do begin
+ lGroup := iLibrary.Groups[iLibrary.GroupCount - List.count + i];
+ ReadAttributes(list.Nodes[i], lGroup);
+ end;
+ end;
+ end; // Groups
+
+ // Uses
+ lParentNode := xmldoc.DocumentNode.GetNodeByName('Uses');
+ if Assigned(lParentNode) then begin
+ list := lParentNode.GetNodesByName('Use');
+ if Assigned(list) then begin
+ for i := 0 to (list.Count-1) do begin
+ if RODLFileIsUsed(GetNodeAttribute(list.Nodes[i], 'AbsoluteRodl')) then Continue;
+ if RODLFileIsUsed(ExpandVariables(GetNodeAttribute(list.Nodes[i], 'Rodl'))) then Continue;
+ lUse := TRODLUse.Create;
+ lUse.Name := GetNodeAttribute(list.Nodes[i], 'Name');
+ //lUse.Documentation := GetNodeAttribute(list.Nodes[i], 'Documentation');
+ lUse.UID := RecreateGuidIfNeeded(StringToGUID(GetNodeAttribute(list.Nodes[i], 'UID')));
+ lUse.RodlFile := GetNodeAttribute(list.Nodes[i], 'Rodl');
+ lUse.AbsoluteRodlFile := GetNodeAttribute(list.Nodes[i], 'AbsoluteRodl');
+ lUse.GenerateCode := GetNodeAttribute(list.Nodes[i], 'GenerateCode') = '1';
+ lUse.SplitMode := TRODLUseSplitMode(StrToIntDef(GetNodeAttribute(list.Nodes[i], 'SplitMode'), Integer(usmAsParent)));
+
+ ReadAttributes(list.Nodes[i], lUse);
+
+ lUse.IsFromUsedRodl := Assigned(iRodlUse);
+ lUse.LocatedInRodlUse := iRodlUse;
+
+ iLibrary.Add(lUse);
+
+ try
+ with self.ClassType.Create do try
+ {$IFDEF DEBUG_REMOBJECTS_RODLTOXML}
+ DebugServer.Write('Used RODL "%s"',[lUse.RodlFile]);
+ {$ENDIF}
+
+ lFilename := ExpandVariables(lUse.RodlFile);
+ if iRodlName <> '' then begin
+ if lUse.LocatedInRodlUse <> nil then
+ lFilename := ExpandFileNameByBase(ExtractFilePath(lUse.LocatedInRodlUse.AbsoluteRodlFile),lFilename)
+ else
+ lFilename := ExpandFileNameByBase(ExtractFilePath(iRodlName),lFilename);
+ if FileExists(lFilename) then
+ lUse.AbsoluteRodlFile := lFilename;
+ end;
+ if (not FileExists(lFilename)) and (lUse.AbsoluteRodlFile <> '') then begin
+ lFilename := lUse.AbsoluteRodlFile;
+ if FileExists(lFilename) then
+ lUse.RodlFile := lFilename;
+ end;
+
+ {$IFDEF DEBUG_REMOBJECTS_RODLTOXML}
+ DebugServer.Write('Loading "%s"',[lFilename]);
+ {$ENDIF}
+
+ LoadFileToLibrary(lFilename, iLibrary, lUse);
+ finally
+ Free();
+ end; { with }
+ except
+ { ignore if an included RODL cannot be found, for most cases it wont be needed to do the CodeGen }
+ end;
+
+ end;
+ end;
+ end; // Uses
+
+ // Services
+ lParentNode := xmldoc.DocumentNode.GetNodeByName('Services');
+ if Assigned(lParentNode) then begin
+ list := lParentNode.GetNodesByName('Service');
+ if Assigned(list) then begin
+ for i := 0 to (list.Count-1) do begin
+ svc := TRODLService.Create;
+ svc.Name := GetNodeAttribute(list.Nodes[i], 'Name');
+ //svc.Documentation := GetNodeAttribute(list.Nodes[i], 'Documentation');
+ svc.Ancestor := GetNodeAttribute(list.Nodes[i], 'Ancestor');
+
+ svc.ImplUnit := GetNodeAttribute(list.Nodes[i], 'ImplUnit');
+ svc.ImplClass := GetNodeAttribute(list.Nodes[i], 'ImplClass');
+ svc.Abstract := GetNodeAttribute(list.Nodes[i], 'Abstract') = '1';
+ svc.isPrivate := GetNodeAttribute(list.Nodes[i], 'Private') = '1';
+ svc.UID := RecreateGuidIfNeeded(StringToGUID(GetNodeAttribute(list.Nodes[i], 'UID')));
+
+ ReadAttributes(list.Nodes[i], svc);
+
+ // Default interface
+ // TODO: Implement multiple interfaces in the future. Not needed now
+ lParentNode := list.Nodes[i].GetNodeByName('Interfaces');
+ if Assigned(lParentNode) then begin
+ sublist := lParentNode.GetNodesByName('Interface');
+ if Assigned(sublist) and (sublist.Count > 0) then begin
+ //later: for k := 0 to (sublist.Length-1) do begin
+ k := 0;
+
+ intf := svc.Default;
+ intf.Name := GetNodeAttribute(sublist.Nodes[k], 'Name');
+ intf.UID := RecreateGuidIfNeeded(StringToGUID(GetNodeAttribute(sublist.Nodes[k], 'UID'))); // Fixed thanks to a compiler warning! Was using m as index
+ //intf.Documentation := GetNodeAttribute(sublist.Nodes[k], 'Documentation');
+
+ ReadAttributes(sublist.Nodes[k], intf);
+
+ // Operations
+ lParentNode := sublist.Nodes[k].GetNodeByName('Operations');
+ if Assigned(lParentNode) then begin
+ subsublist := lParentNode.GetNodesByName('Operation');
+ if Assigned(subsublist) then begin
+ for m := 0 to (subsublist.Count-1) do begin
+ op := intf.Add;
+ op.Name := GetNodeAttribute(subsublist.Nodes[m], 'Name');
+ //op.Documentation := GetNodeAttribute(subsublist.Nodes[m], 'Documentation');
+ op.UID := RecreateGuidIfNeeded(StringToGUID(GetNodeAttribute(subsublist.Nodes[m], 'UID')));
+ op.ForceAsyncResponse := GetNodeAttribute(subsublist.Nodes[m], 'ForceAsyncResponse') = '1';
+
+ ReadAttributes(subsublist.Nodes[m], op);
+
+ // Parameters
+ lParentNode := subsublist.Nodes[m].GetNodeByName('Parameters');
+ if Assigned(lParentNode) then begin
+ lastlist := lParentNode.GetNodesByName('Parameter');
+ if Assigned(lastlist) then begin
+ for p := 0 to (lastlist.Count-1) do begin
+ lFlag := XMLFlagNameToFlag(GetNodeAttribute(lastlist.Nodes[p], 'Flag'));
+ case lFlag of
+ fResult:par := op.AddResult();
+ else par := op.Add();
+ end; { case }
+ par.Name := GetNodeAttribute(lastlist.Nodes[p], 'Name');
+ //par.Documentation := GetNodeAttribute(lastlist.Nodes[p], 'Documentation');
+ par.Flag := lFlag;
+ par.DataType := FixLegacyTypes(GetNodeAttribute(lastlist.Nodes[p], 'DataType'));
+ ReadAttributes(lastlist.Nodes[p], par);
+ end;
+ end;
+ end; // Service|Interface|Operation|Parameters
+
+ // Code Bodies
+ lParentNode := subsublist.Nodes[m].GetNodeByName('Code');
+ if Assigned(lParentNode) then begin
+ lastlist := lParentNode.GetNodesByName('Code');
+ if Assigned(lastlist) then begin
+ for p := 0 to (lastlist.Count-1) do begin
+ op.SetCodeBodyAsString(GetNodeAttribute(lastlist.Nodes[p], 'Language'),lastlist.Nodes[p].Value);
+ end;
+ end;
+ end; // Service|Interface|Operation|Parameters
+
+ {op.MoveResult();}
+ end;
+ end;
+ end; // Service|Interface|Operations
+ end;
+ end; // Service|Interfaces
+
+ svc.IsFromUsedRodl := Assigned(iRodlUse);
+ svc.LocatedInRodlUse := iRodlUse;
+
+ iLibrary.Add(svc);
+ end;
+ end;
+ end; // Services
+
+ // EventSinks
+ lParentNode := xmldoc.DocumentNode.GetNodeByName('EventSinks');
+ if Assigned(lParentNode) then begin
+ list := lParentNode.GetNodesByName('EventSink');
+ if Assigned(list) then begin
+ for i := 0 to (list.Count-1) do begin
+ lEventSink := TRODLEventSink.Create;
+ lEventSink.Name := GetNodeAttribute(list.Nodes[i], 'Name');
+ //lEventSink.Documentation := GetNodeAttribute(list.Nodes[i], 'Documentation');
+ lEventSink.Ancestor := GetNodeAttribute(list.Nodes[i], 'Ancestor');
+
+ lEventSink.ImplUnit := GetNodeAttribute(list.Nodes[i], 'ImplUnit');
+ lEventSink.ImplClass := GetNodeAttribute(list.Nodes[i], 'ImplClass');
+ lEventSink.Abstract := GetNodeAttribute(list.Nodes[i], 'Abstract') = '1';
+ lEventSink.UID := RecreateGuidIfNeeded(StringToGUID(GetNodeAttribute(list.Nodes[i], 'UID')));
+
+ ReadAttributes(list.Nodes[i], lEventSink);
+
+ // Default interface
+ // TODO: Implement multiple interfaces in the future. Not needed now
+ lParentNode := list.Nodes[i].GetNodeByName('Interfaces');
+ if Assigned(lParentNode) then begin
+ sublist := lParentNode.GetNodesByName('Interface');
+ if Assigned(sublist) and (sublist.Count > 0) then begin
+ //later: for k := 0 to (sublist.Length-1) do begin
+ k := 0;
+
+ intf := lEventSink.Default;
+ intf.Name := GetNodeAttribute(sublist.Nodes[k], 'Name');
+ intf.UID := RecreateGuidIfNeeded(StringToGUID(GetNodeAttribute(sublist.Nodes[k], 'UID'))); // Fixed thanks to a compiler warning! Was using m as index
+ //intf.Documentation := GetNodeAttribute(sublist.Nodes[k], 'Documentation');
+
+ ReadAttributes(sublist.Nodes[k], intf);
+
+ // Operations
+ lParentNode := sublist.Nodes[k].GetNodeByName('Operations');
+ if Assigned(lParentNode) then begin
+ subsublist := lParentNode.GetNodesByName('Operation');
+ if Assigned(subsublist) then begin
+ for m := 0 to (subsublist.Count-1) do begin
+ op := intf.Add;
+ op.Name := GetNodeAttribute(subsublist.Nodes[m], 'Name');
+ //op.Documentation := GetNodeAttribute(subsublist.Nodes[m], 'Documentation');
+ op.UID := RecreateGuidIfNeeded(StringToGUID(GetNodeAttribute(subsublist.Nodes[m], 'UID')));
+
+ ReadAttributes(subsublist.Nodes[m], op);
+
+ // Parameters
+ lParentNode := subsublist.Nodes[m].GetNodeByName('Parameters');
+ if Assigned(lParentNode) then begin
+ lastlist := lParentNode.GetNodesByName('Parameter');
+ if Assigned(lastlist) then begin
+ for p := 0 to (lastlist.Count-1) do begin
+ lFlag := XMLFlagNameToFlag(GetNodeAttribute(lastlist.Nodes[p], 'Flag'));
+ case lFlag of
+ fResult:par := op.AddResult();
+ else par := op.Add();
+ end; { case }
+ par.Name := GetNodeAttribute(lastlist.Nodes[p], 'Name');
+ //par.Documentation := GetNodeAttribute(lastlist.Nodes[p], 'Documentation');
+ par.Flag := lFlag;
+ par.DataType := FixLegacyTypes(GetNodeAttribute(lastlist.Nodes[p], 'DataType'));
+ ReadAttributes(lastlist.Nodes[p], par);
+ end;
+ end;
+ end; // Service|Interface|Operation|Parameters
+
+ // Code Bodies
+ lParentNode := subsublist.Nodes[m].GetNodeByName('Code');
+ if Assigned(lParentNode) then begin
+ lastlist := lParentNode.GetNodesByName('Code');
+ if Assigned(lastlist) then begin
+ for p := 0 to (lastlist.Count-1) do begin
+ op.SetCodeBodyAsString(GetNodeAttribute(lastlist.Nodes[p], 'Language'),StringFromHexString(lastlist.Nodes[p].Value));
+ end;
+ end;
+ end; // Service|Interface|Operation|Parameters
+
+ {op.MoveResult();}
+ end;
+ end;
+ end; // Service|Interface|Operations
+ end;
+ end; // Service|Interfaces
+
+ lEventSink.IsFromUsedRodl := Assigned(iRodlUse);
+ lEventSink.LocatedInRodlUse := iRodlUse;
+
+ iLibrary.Add(lEventSink);
+ end;
+ end;
+ end; // EventSinks
+
+ //////////////////// TODO REMOVE **BELOW**
+ // EventSinks
+ lParentNode := xmldoc.DocumentNode.GetNodeByName('CallbackSinks');
+ if Assigned(lParentNode) then begin
+ list := lParentNode.GetNodesByName('CallbackSink');
+ if Assigned(list) then begin
+ for i := 0 to (list.Count-1) do begin
+ lEventSink := TRODLEventSink.Create;
+ lEventSink.Name := GetNodeAttribute(list.Nodes[i], 'Name');
+ //lEventSink.Documentation := GetNodeAttribute(list.Nodes[i], 'Documentation');
+ lEventSink.Ancestor := GetNodeAttribute(list.Nodes[i], 'Ancestor');
+
+ lEventSink.ImplUnit := GetNodeAttribute(list.Nodes[i], 'ImplUnit');
+ lEventSink.ImplClass := GetNodeAttribute(list.Nodes[i], 'ImplClass');
+ lEventSink.Abstract := GetNodeAttribute(list.Nodes[i], 'Abstract') = '1';
+ lEventSink.UID := RecreateGuidIfNeeded(StringToGUID(GetNodeAttribute(list.Nodes[i], 'UID')));
+
+ ReadAttributes(list.Nodes[i], lEventSink);
+
+ // Default interface
+ // TODO: Implement multiple interfaces in the future. Not needed now
+ lParentNode := list.Nodes[i].GetNodeByName('Interfaces');
+ if Assigned(lParentNode) then begin
+ sublist := lParentNode.GetNodesByName('Interface');
+ if Assigned(sublist) and (sublist.Count > 0) then begin
+ //later: for k := 0 to (sublist.Length-1) do begin
+ k := 0;
+
+ intf := lEventSink.Default;
+ intf.Name := GetNodeAttribute(sublist.Nodes[k], 'Name');
+ intf.UID := RecreateGuidIfNeeded(StringToGUID(GetNodeAttribute(sublist.Nodes[k], 'UID'))); // Fixed thanks to a compiler warning! Was using m as index
+ //intf.Documentation := GetNodeAttribute(sublist.Nodes[k], 'Documentation');
+
+ ReadAttributes(sublist.Nodes[k], intf);
+
+ // Operations
+ lParentNode := sublist.Nodes[k].GetNodeByName('Operations');
+ if Assigned(lParentNode) then begin
+ subsublist := lParentNode.GetNodesByName('Operation');
+ if Assigned(subsublist) then begin
+ for m := 0 to (subsublist.Count-1) do begin
+ op := intf.Add;
+ op.Name := GetNodeAttribute(subsublist.Nodes[m], 'Name');
+ //op.Documentation := GetNodeAttribute(subsublist.Nodes[m], 'Documentation');
+ op.UID := RecreateGuidIfNeeded(StringToGUID(GetNodeAttribute(subsublist.Nodes[m], 'UID')));
+
+ ReadAttributes(subsublist.Nodes[m], op);
+
+ // Parameters
+ lParentNode := subsublist.Nodes[m].GetNodeByName('Parameters');
+ if Assigned(lParentNode) then begin
+ lastlist := lParentNode.GetNodesByName('Parameter');
+ if Assigned(lastlist) then begin
+ for p := 0 to (lastlist.Count-1) do begin
+ lFlag := XMLFlagNameToFlag(GetNodeAttribute(lastlist.Nodes[p], 'Flag'));
+ case lFlag of
+ fResult:par := op.AddResult();
+ else par := op.Add();
+ end; { case }
+ par.Name := GetNodeAttribute(lastlist.Nodes[p], 'Name');
+ //par.Documentation := GetNodeAttribute(lastlist.Nodes[p], 'Documentation');
+ par.Flag := lFlag;
+ par.DataType := FixLegacyTypes(GetNodeAttribute(lastlist.Nodes[p], 'DataType'));
+ ReadAttributes(lastlist.Nodes[p], par);
+ end;
+ end;
+ end; // Service|Interface|Operation|Parameters
+
+ // Code Bodies
+ lParentNode := subsublist.Nodes[m].GetNodeByName('Code');
+ if Assigned(lParentNode) then begin
+ lastlist := lParentNode.GetNodesByName('Code');
+ if Assigned(lastlist) then begin
+ for p := 0 to (lastlist.Count-1) do begin
+ op.SetCodeBodyAsString(GetNodeAttribute(lastlist.Nodes[p], 'Language'),StringFromHexString(lastlist.Nodes[p].Value));
+ end;
+ end;
+ end; // Service|Interface|Operation|Parameters
+
+ {op.MoveResult();}
+ end;
+ end;
+ end; // Service|Interface|Operations
+ end;
+ end; // Service|Interfaces
+
+ lEventSink.IsFromUsedRodl := Assigned(iRodlUse);
+ lEventSink.LocatedInRodlUse := iRodlUse;
+
+ iLibrary.Add(lEventSink);
+ end;
+ end;
+ end; // EventSinks
+ //////////////////// TODO REMOVE ^^^^^^
+
+ // Structs
+ lParentNode := xmldoc.DocumentNode.GetNodeByName('Structs');
+ if Assigned(lParentNode) then begin
+ list := lParentNode.GetNodesByName('Struct');
+ if Assigned(list) then begin
+ for i := 0 to (list.Count-1) do begin
+ struct := TRODLStruct.Create;
+ struct.Name := GetNodeAttribute(list.Nodes[i], 'Name');
+ //struct.Documentation := GetNodeAttribute(list.Nodes[i], 'Documentation');
+ struct.UID := RecreateGuidIfNeeded(StringToGUID(GetNodeAttribute(list.Nodes[i], 'UID')));
+ struct.Ancestor := GetNodeAttribute(list.Nodes[i], 'Ancestor');
+ struct.AutoCreateParams := GetNodeAttribute(list.Nodes[i], 'AutoCreateParams') <> '0';
+ struct.Abstract := GetNodeAttribute(list.Nodes[i], 'Abstract') = '1';
+
+ ReadAttributes(list.Nodes[i], struct);
+
+ lParentNode := list.Nodes[i].GetNodeByName('Elements');
+ if Assigned(lParentNode) then begin
+ sublist := lParentNode.GetNodesByName('Element');
+ if Assigned(sublist) then begin
+ for p := 0 to (sublist.Count-1) do begin
+ stelem := struct.Add;
+ stelem.Name := GetNodeAttribute(sublist.Nodes[p], 'Name');
+ //stelem.Documentation := GetNodeAttribute(sublist.Nodes[p], 'Documentation');
+ stelem.DataType := FixLegacyTypes(GetNodeAttribute(sublist.Nodes[p], 'DataType'));
+ ReadAttributes(sublist.Nodes[p], stelem);
+ end;
+ end;
+ end; // Struct|Elements
+
+ struct.IsFromUsedRodl := Assigned(iRodlUse);
+ struct.LocatedInRodlUse := iRodlUse;
+
+ iLibrary.Add(struct);
+ end;
+ end;
+ end; //Structs
+
+ // Enums
+ lParentNode := xmldoc.DocumentNode.GetNodeByName('Enums');
+ if Assigned(lParentNode) then begin
+ list := lParentNode.GetNodesByName('Enum');
+ if Assigned(list) then begin
+ for i := 0 to (list.Count-1) do begin
+ enum := TRODLEnum.Create;
+ enum.Name := GetNodeAttribute(list.Nodes[i], 'Name');
+ enum.PrefixEnumValues := GetNodeAttribute(list.Nodes[i], 'Prefix') <> '0';
+ //enum.Documentation := GetNodeAttribute(list.Nodes[i], 'Documentation');
+ enum.UID := RecreateGuidIfNeeded(StringToGUID(GetNodeAttribute(list.Nodes[i], 'UID')));
+
+ ReadAttributes(list.Nodes[i], enum);
+
+ lParentNode := list.Nodes[i].GetNodeByName('EnumValues');
+ if Assigned(lParentNode) then begin
+ sublist := lParentNode.GetNodesByName('EnumValue');
+ if Assigned(sublist) then begin
+ for p := 0 to (sublist.Count-1) do begin
+ eval := enum.Add;
+ eval.Name := GetNodeAttribute(sublist.Nodes[p], 'Name');
+ ReadAttributes(sublist.Nodes[p], eval);
+ //eval.Documentation := GetNodeAttribute(sublist.Nodes[p], 'Documentation');
+ end;
+ end;
+ end; //Enum|EnumValues
+
+ enum.IsFromUsedRodl := Assigned(iRodlUse);
+ enum.LocatedInRodlUse := iRodlUse;
+
+ iLibrary.Add(enum);
+ end;
+ end;
+ end; // Enums
+
+ // Arrays
+ lParentNode := xmldoc.DocumentNode.GetNodeByName('Arrays');
+ if Assigned(lParentNode) then begin
+ list := lParentNode.GetNodesByName('Array');
+ if Assigned(list) then begin
+ for i := 0 to (list.Count-1) do begin
+ arr := TRODLArray.Create;
+ arr.Name := GetNodeAttribute(list.Nodes[i], 'Name');
+ //arr.Documentation := GetNodeAttribute(list.Nodes[i], 'Documentation');
+ arr.UID := RecreateGuidIfNeeded(StringToGUID(GetNodeAttribute(list.Nodes[i], 'UID')));
+
+ ReadAttributes(list.Nodes[i], arr);
+
+ sublist := list.Nodes[i].GetNodesByName('ElementType');
+ if Assigned(sublist) and (sublist.Count > 0) then
+ arr.ElementType := FixLegacyTypes(GetNodeAttribute(sublist.Nodes[0], 'DataType'));
+
+ arr.IsFromUsedRodl := Assigned(iRodlUse);
+ arr.LocatedInRodlUse := iRodlUse;
+
+ iLibrary.Add(arr)
+ end;
+ end;
+ end; // Arrays
+
+ // Exceptions
+ lParentNode := xmldoc.DocumentNode.GetNodeByName('Exceptions');
+ if Assigned(lParentNode) then begin
+ list := lParentNode.GetNodesByName('Exception');
+ if Assigned(list) then begin
+ for i := 0 to (list.Count-1) do begin
+ lException := TRODLException.Create;
+ lException.Name := GetNodeAttribute(list.Nodes[i], 'Name');
+ //lException.Documentation := GetNodeAttribute(list.Nodes[i], 'Documentation');
+ lException.UID := RecreateGuidIfNeeded(StringToGUID(GetNodeAttribute(list.Nodes[i], 'UID')));
+ lException.Ancestor := GetNodeAttribute(list.Nodes[i], 'Ancestor');
+ lException.Abstract := GetNodeAttribute(list.Nodes[i], 'Abstract') = '1';
+
+ ReadAttributes(list.Nodes[i], lException);
+
+ lParentNode := list.Nodes[i].GetNodeByName('Elements');
+ if Assigned(lParentNode) then begin
+ sublist := lParentNode.GetNodesByName('Element');
+ if Assigned(sublist) then begin
+ for p := 0 to (sublist.Count-1) do begin
+ stelem := lException.Add;
+ stelem.Name := GetNodeAttribute(sublist.Nodes[p], 'Name');
+ //stelem.Documentation := GetNodeAttribute(sublist.Nodes[p], 'Documentation');
+ stelem.DataType := FixLegacyTypes(GetNodeAttribute(sublist.Nodes[p], 'DataType'));
+ ReadAttributes(sublist.Nodes[p], stelem);
+ end;
+ end;
+ end; // Struct|Elements
+
+ lException.IsFromUsedRodl := Assigned(iRodlUse);
+ lException.LocatedInRodlUse := iRodlUse;
+
+ iLibrary.Add(lException)
+ end;
+ end;
+ end; // Exceptions
+ finally
+ fGroupGuidList.Free;
+ end;
+end;
+
+function TXMLToRODL.ReadFromString(const aString: string; const aFilename:string): TRODLLibrary;
+var
+ ss: TStringStream;
+begin
+ ss := TStringStream.Create(aString);
+ try
+ result := Read(ss, aFilename);
+ finally
+ ss.Free;
+ end;
+end;
+
+function TXMLToRODL.RecreateGuidIfNeeded(iGuid: TGuid): TGuid;
+begin
+ if fRecreateGuids then
+ result := NewGuid()
+ else
+ result := iGuid;
+end;
+
+end.
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen2/Templates/Templates.rc b/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen2/Templates/Templates.rc
new file mode 100644
index 0000000..831323d
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen2/Templates/Templates.rc
@@ -0,0 +1,25 @@
+TEMPLATE_INTF_PAS RCDATA "template.intf.pas"
+TEMPLATE_INVK_PAS RCDATA "template.invk.pas"
+TEMPLATE_IMPL_PAS RCDATA "template.impl.pas"
+TEMPLATE_ASYNC_PAS RCDATA "template.async.pas"
+TEMPLATE_WRAPPER_INTF_PAS RCDATA "template.wrapper_intf.pas"
+TEMPLATE_WRAPPER_INVK_PAS RCDATA "template.wrapper_invk.pas"
+TEMPLATE_WRAPPER_ASYNC_PAS RCDATA "template.wrapper_async.pas"
+
+TEMPLATE_IMPL_DFM RCDATA "template.impl.dfm"
+
+TEMPLATE_INTF_CPP RCDATA "template.intf.cpp"
+TEMPLATE_INTF_H RCDATA "template.intf.h"
+TEMPLATE_INVK_CPP RCDATA "template.invk.cpp"
+TEMPLATE_INVK_H RCDATA "template.invk.h"
+TEMPLATE_IMPL_CPP RCDATA "template.impl.cpp"
+TEMPLATE_IMPL_H RCDATA "template.impl.h"
+TEMPLATE_ASYNC_CPP RCDATA "template.async.cpp"
+TEMPLATE_ASYNC_H RCDATA "template.async.h"
+TEMPLATE_WRAPPER_INTF_H RCDATA "template.wrapper_intf.h"
+TEMPLATE_WRAPPER_INVK_H RCDATA "template.wrapper_invk.h"
+TEMPLATE_WRAPPER_ASYNC_H RCDATA "template.wrapper_async.h"
+
+TEMPLATE_INTF_OBJC_M RCDATA "template.Obj-C.intf.m"
+TEMPLATE_INTF_OBJC_H RCDATA "template.Obj-C.intf.h"
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen2/Templates/Templates.res b/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen2/Templates/Templates.res
new file mode 100644
index 0000000..a5a7729
Binary files /dev/null and b/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen2/Templates/Templates.res differ
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen2/Templates/template.async.cpp b/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen2/Templates/template.async.cpp
new file mode 100644
index 0000000..54697e9
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen2/Templates/template.async.cpp
@@ -0,0 +1,162 @@
+// %UNIT_NAME%
+//
+/*---------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project. }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{---------------------------------------------------------------------------*/
+
+// Implementation of %UNIT_NAME%
+#include "%UNIT_NAME%.h"
+
+// <%%% START SERVICES %%%>
+// <%%% START FUNCTION_OPERATIONS %%%>
+void __fastcall T%SERVICE_NAME%_AsyncProxy::Invoke_%OPERATION_NAME%(
+ // <%%% START IN_PARAMS %%%>
+ // <%%% START IF_PARAM_TYPE_SIMPLE %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_TYPE% %PARAM_BACK_MODIFIER% %PARAM_NAME%,
+ // <%%% END IF_PARAM_TYPE_SIMPLE %%%>
+ // <%%% START IF_PARAM_TYPE_COMPLEX %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_TYPE%* %PARAM_BACK_MODIFIER% %PARAM_NAME%,
+ // <%%% END IF_PARAM_TYPE_COMPLEX %%%>
+ // <%%% END IN_PARAMS %%%>
+ )
+{
+ __AssertProxyNotBusy("%OPERATION_NAME%");
+
+ __Message->InitializeRequestMessage(__TransportChannel, "%LIBRARY_NAME%", __InterfaceName, "%OPERATION_NAME%");
+ // <%%% START IN_PARAMS_NO_STRIP %%%>
+ // <%%% START IF_PARAM_TYPE_SIMPLE %%%>
+ __Message->Write("%PARAM_NAME%", __Get%PARAM_TYPE%Info, &%PARAM_NAME%, TParamAttributes(%PARAM_ATTRIBUTE%));
+ // <%%% END IF_PARAM_TYPE_SIMPLE %%%>
+ // <%%% START IF_PARAM_TYPE_COMPLEX %%%>
+ __Message->Write("%PARAM_NAME%", __typeinfo(%PARAM_TYPE%), %PARAM_NAME%, TParamAttributes(%PARAM_ATTRIBUTE%));
+ // <%%% END IF_PARAM_TYPE_COMPLEX %%%>
+ // <%%% END IN_PARAMS_NO_STRIP %%%>
+
+ __DispatchAsyncRequest("%OPERATION_NAME%", __Message);
+}
+
+// <%%% START IF_RESULT_SIMPLE %%%>
+%OPERATION_RESULT% __fastcall T%SERVICE_NAME%_AsyncProxy::Retrieve_%OPERATION_NAME%(
+// <%%% END IF_RESULT_SIMPLE %%%>
+// <%%% START IF_RESULT_COMPLEX %%%>
+%OPERATION_RESULT%* __fastcall T%SERVICE_NAME%_AsyncProxy::Retrieve_%OPERATION_NAME%(
+// <%%% END IF_RESULT_COMPLEX %%%>
+ // <%%% START OUT_PARAMS %%%>
+ // <%%% START IF_PARAM_TYPE_SIMPLE %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_TYPE% %PARAM_BACK_MODIFIER% %PARAM_NAME%,
+ // <%%% END IF_PARAM_TYPE_SIMPLE %%%>
+ // <%%% START IF_PARAM_TYPE_COMPLEX %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_TYPE%* %PARAM_BACK_MODIFIER% %PARAM_NAME%,
+ // <%%% END IF_PARAM_TYPE_COMPLEX %%%>
+ // <%%% END OUT_PARAMS %%%>
+ )
+{
+ // <%%% START IF_RESULT_SIMPLE %%%>
+ %OPERATION_RESULT% result;
+ // <%%% END IF_RESULT_SIMPLE %%%>
+ // <%%% START IF_RESULT_COMPLEX %%%>
+ %OPERATION_RESULT%* result;
+ // <%%% END IF_RESULT_COMPLEX %%%>
+
+ // <%%% START OUT_PARAMS_NO_STRIP %%%>
+ // <%%% START IF_PARAM_TYPE_COMPLEX %%%>
+ %PARAM_NAME% = NULL;
+ // <%%% END IF_PARAM_TYPE_COMPLEX %%%>
+ // <%%% END OUT_PARAMS_NO_STRIP %%%>
+ // <%%% START IF_RESULT_COMPLEX %%%>
+ result = NULL;
+ // <%%% END IF_RESULT_COMPLEX %%%>
+
+ TStream* __response = __RetrieveAsyncResponse("%OPERATION_NAME%");
+ __Message->ReadFromStream(__response);
+
+ // <%%% START IF_RESULT_SIMPLE %%%>
+ __Message->Read("Result", __Get%OPERATION_RESULT%Info, &result, TParamAttributes(%OPERATION_RESULT_ATTRIBUTE%));
+ // <%%% END IF_RESULT_SIMPLE %%%>
+ // <%%% START IF_RESULT_COMPLEX %%%>
+ __Message->Read("Result", __typeinfo(%OPERATION_RESULT%), result, TParamAttributes(%OPERATION_RESULT_ATTRIBUTE%));
+ // <%%% END IF_RESULT_COMPLEX %%%>
+ // <%%% START OUT_PARAMS_NO_STRIP %%%>
+ // <%%% START IF_PARAM_TYPE_SIMPLE %%%>
+ __Message->Read("%PARAM_NAME%", __Get%PARAM_TYPE%Info, &%PARAM_NAME%, TParamAttributes(%PARAM_ATTRIBUTE%));
+ // <%%% END IF_PARAM_TYPE_SIMPLE %%%>
+ // <%%% START IF_PARAM_TYPE_COMPLEX %%%>
+ __Message->Read("%PARAM_NAME%", __typeinfo(%PARAM_TYPE%), %PARAM_NAME%, TParamAttributes(%PARAM_ATTRIBUTE%));
+ // <%%% END IF_PARAM_TYPE_COMPLEX %%%>
+ // <%%% END OUT_PARAMS_NO_STRIP %%%>
+
+ delete __response;
+ return result;
+}
+
+// <%%% END FUNCTION_OPERATIONS %%%>
+// <%%% START PROCEDURE_OPERATIONS %%%>
+void _fastcall T%SERVICE_NAME%_AsyncProxy::Invoke_%OPERATION_NAME%(
+ // <%%% START IN_PARAMS %%%>
+ // <%%% START IF_PARAM_TYPE_SIMPLE %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_TYPE% %PARAM_BACK_MODIFIER% %PARAM_NAME%,
+ // <%%% END IF_PARAM_TYPE_SIMPLE %%%>
+ // <%%% START IF_PARAM_TYPE_COMPLEX %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_TYPE%* %PARAM_BACK_MODIFIER% %PARAM_NAME%,
+ // <%%% END IF_PARAM_TYPE_COMPLEX %%%>
+ // <%%% END IN_PARAMS %%%>
+ )
+{
+ __AssertProxyNotBusy("%OPERATION_NAME%");
+ TStream* __request = new TMemoryStream();
+
+ __Message->InitializeRequestMessage(__TransportChannel, "%LIBRARY_NAME%", __InterfaceName, "%OPERATION_NAME%");
+ // <%%% START IN_PARAMS_NO_STRIP %%%>
+ // <%%% START IF_PARAM_TYPE_SIMPLE %%%>
+ __Message->Write("%PARAM_NAME%", __Get%PARAM_TYPE%Info, &%PARAM_NAME%, TParamAttributes(%PARAM_ATTRIBUTE%));
+ // <%%% END IF_PARAM_TYPE_SIMPLE %%%>
+ // <%%% START IF_PARAM_TYPE_COMPLEX %%%>
+ __Message->Write("%PARAM_NAME%", __typeinfo(%PARAM_TYPE%), %PARAM_NAME%, TParamAttributes(%PARAM_ATTRIBUTE%));
+ // <%%% END IF_PARAM_TYPE_COMPLEX %%%>
+ // <%%% END IN_PARAMS_NO_STRIP %%%>
+ __Message->Finalize();
+
+ __Message->WriteToStream(__request);
+ __DispatchAsyncRequest("%OPERATION_NAME%", __request, False);
+}
+
+// <%%% START IF_OUT_PARAMS %%%>
+void _fastcall T%SERVICE_NAME%_AsyncProxy::Retrieve_%OPERATION_NAME%(
+ // <%%% START OUT_PARAMS %%%>
+ // <%%% START IF_PARAM_TYPE_SIMPLE %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_TYPE% %PARAM_BACK_MODIFIER% %PARAM_NAME%,
+ // <%%% END IF_PARAM_TYPE_SIMPLE %%%>
+ // <%%% START IF_PARAM_TYPE_COMPLEX %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_TYPE%* %PARAM_BACK_MODIFIER% %PARAM_NAME%,
+ // <%%% END IF_PARAM_TYPE_COMPLEX %%%>
+ // <%%% END OUT_PARAMS %%%>
+ )
+{
+ // <%%% START OUT_PARAMS_NO_STRIP %%%>
+ // <%%% START IF_PARAM_TYPE_COMPLEX %%%>
+ %PARAM_NAME% = NULL;
+ // <%%% END IF_PARAM_TYPE_COMPLEX %%%>
+ // <%%% END OUT_PARAMS_NO_STRIP %%%>
+
+ TStream* __response = __RetrieveAsyncResponse("%OPERATION_NAME%");
+ __Message->ReadFromStream(__response);
+
+ // <%%% START OUT_PARAMS_NO_STRIP %%%>
+ // <%%% START IF_PARAM_TYPE_SIMPLE %%%>
+ __Message->Read("%PARAM_NAME%", __Get%PARAM_TYPE%Info, &%PARAM_NAME%, TParamAttributes(%PARAM_ATTRIBUTE%));
+ // <%%% END IF_PARAM_TYPE_SIMPLE %%%>
+ // <%%% START IF_PARAM_TYPE_COMPLEX %%%>
+ __Message->Read("%PARAM_NAME%", __typeinfo(%PARAM_TYPE%), %PARAM_NAME%, TParamAttributes(%PARAM_ATTRIBUTE%));
+ // <%%% END IF_PARAM_TYPE_COMPLEX %%%>
+ // <%%% END OUT_PARAMS_NO_STRIP %%%>
+
+ delete __response;
+}
+
+// <%%% END IF_OUT_PARAMS %%%>
+// <%%% END PROCEDURE_OPERATIONS %%%>
+// <%%% END SERVICES %%%>
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen2/Templates/template.async.h b/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen2/Templates/template.async.h
new file mode 100644
index 0000000..161e698
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen2/Templates/template.async.h
@@ -0,0 +1,223 @@
+// %UNIT_NAME%
+//
+/*---------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project. }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{---------------------------------------------------------------------------*/
+
+#ifndef %UNIT_NAME%H
+#define %UNIT_NAME%H
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w- // All warnings off
+#pragma option -Vx // Zero-length empty class member functions
+#pragma pack(push,8)
+
+#include // Pascal unit
+#include
+// <%%% START REQUIRED_UNITS %%%>
+#include <%REQUIRED_UNIT_NAME%.hpp>
+// <%%% END REQUIRED_UNITS %%%>
+#include "%LIBRARY_NAME%_Intf.h"
+
+
+namespace %NAMESPACE_NAME%
+{
+// Forward declarations
+// <%%% START SERVICES %%%>
+__interface I%SERVICE_NAME%_Async; // = interface;
+class DELPHICLASS Co%SERVICE_NAME%_Async;
+class DELPHICLASS T%SERVICE_NAME%_AsyncProxy;
+// <%%% END SERVICES %%%>
+
+// <%%% START SERVICES %%%>
+__interface I%SERVICE_NAME%_Async;
+typedef System::DelphiInterface _di_I%SERVICE_NAME%_Async;
+__interface INTERFACE_UUID("%SERVICE_UID%") I%SERVICE_NAME%_Async : public %SERVICE_ANCESTOR_NAME%
+{
+public:
+ // <%%% START FUNCTION_OPERATIONS %%%>
+ virtual void __fastcall Invoke_%OPERATION_NAME%(
+ // <%%% START IN_PARAMS %%%>
+ // <%%% START IF_PARAM_TYPE_SIMPLE %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_TYPE% %PARAM_BACK_MODIFIER% %PARAM_NAME%,
+ // <%%% END IF_PARAM_TYPE_SIMPLE %%%>
+ // <%%% START IF_PARAM_TYPE_COMPLEX %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_TYPE%* %PARAM_BACK_MODIFIER% %PARAM_NAME%,
+ // <%%% END IF_PARAM_TYPE_COMPLEX %%%>
+ // <%%% END IN_PARAMS %%%>
+ ) = 0; // pure virtual function - interface only
+ // <%%% START IF_RESULT_SIMPLE %%%>
+ virtual %OPERATION_RESULT% __fastcall Retrieve_%OPERATION_NAME%(
+ // <%%% END IF_RESULT_SIMPLE %%%>
+ // <%%% START IF_RESULT_COMPLEX %%%>
+ virtual %OPERATION_RESULT%* __fastcall Retrieve_%OPERATION_NAME%(
+ // <%%% END IF_RESULT_COMPLEX %%%>
+ // <%%% START OUT_PARAMS %%%>
+ // <%%% START IF_PARAM_TYPE_SIMPLE %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_TYPE% %PARAM_BACK_MODIFIER% %PARAM_NAME%,
+ // <%%% END IF_PARAM_TYPE_SIMPLE %%%>
+ // <%%% START IF_PARAM_TYPE_COMPLEX %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_TYPE%* %PARAM_BACK_MODIFIER% %PARAM_NAME%,
+ // <%%% END IF_PARAM_TYPE_COMPLEX %%%>
+ // <%%% END OUT_PARAMS %%%>
+ ) = 0; // pure virtual function - interface only
+ // <%%% END FUNCTION_OPERATIONS %%%>
+
+ // <%%% START PROCEDURE_OPERATIONS %%%>
+ virtual void _fastcall Invoke_%OPERATION_NAME%(
+ // <%%% START IN_PARAMS %%%>
+ // <%%% START IF_PARAM_TYPE_SIMPLE %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_TYPE% %PARAM_BACK_MODIFIER% %PARAM_NAME%,
+ // <%%% END IF_PARAM_TYPE_SIMPLE %%%>
+ // <%%% START IF_PARAM_TYPE_COMPLEX %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_TYPE%* %PARAM_BACK_MODIFIER% %PARAM_NAME%,
+ // <%%% END IF_PARAM_TYPE_COMPLEX %%%>
+ // <%%% END IN_PARAMS %%%>
+ ) = 0; // pure virtual function - interface only
+ // <%%% START IF_OUT_PARAMS %%%>
+ virtual void _fastcall Retrieve_%OPERATION_NAME%(
+ // <%%% START OUT_PARAMS %%%>
+ // <%%% START IF_PARAM_TYPE_SIMPLE %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_TYPE% %PARAM_BACK_MODIFIER% %PARAM_NAME%,
+ // <%%% END IF_PARAM_TYPE_SIMPLE %%%>
+ // <%%% START IF_PARAM_TYPE_COMPLEX %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_TYPE%* %PARAM_BACK_MODIFIER% %PARAM_NAME%,
+ // <%%% END IF_PARAM_TYPE_COMPLEX %%%>
+ // <%%% END OUT_PARAMS %%%>
+ ) = 0; // pure virtual function - interface only
+ // <%%% END IF_OUT_PARAMS %%%>
+ // <%%% END PROCEDURE_OPERATIONS %%%>
+};
+
+// Co%SERVICE_NAME%_Async
+class DELPHICLASS Co%SERVICE_NAME%_Async;
+class Co%SERVICE_NAME%_Async : public System::TObject
+{
+ typedef System::TObject inherited;
+
+public:
+ static _di_I%SERVICE_NAME%_Async __fastcall Create(const Uroclientintf::_di_IROMessage aMessage,
+ Uroclientintf::_di_IROTransportChannel aTransportChannel)
+ {
+ _di_I%SERVICE_NAME%_Async result;
+ T%SERVICE_NAME%_AsyncProxy* proxy = new T%SERVICE_NAME%_AsyncProxy(aMessage, aTransportChannel);
+ if (proxy->QueryInterface(I%SERVICE_NAME%_IID, reinterpret_cast(&result)) != S_OK)
+ {
+ delete proxy;
+ throw EIntfCastError::EIntfCastError("I%SERVICE_NAME%_Async not supported");
+ }
+ return result;
+ };
+
+ static _di_I%SERVICE_NAME%_Async __fastcall Create(Uroclient::TROMessage* aMessage,
+ Uroclient::TROTransportChannel *aTransportChannel)
+ {
+ _di_IROMessage __Message;
+ _di_IROTransportChannel __TransportChannel;
+
+ if (aMessage->GetInterface(__Message))
+ {
+ if (aTransportChannel->GetInterface(__TransportChannel))
+ return Create(__Message, __TransportChannel);
+ else
+ throw EIntfCastError::EIntfCastError("IROTransportChannel not supported");
+ }
+ else
+ {
+ throw EIntfCastError::EIntfCastError("IROMessage not supported");
+ }
+ };
+};
+
+class DELPHICLASS T%SERVICE_NAME%_AsyncProxy;
+class T%SERVICE_NAME%_AsyncProxy : public %SERVICE_PROXY_ANCESTOR_NAME%, I%SERVICE_NAME%_Async
+{
+ typedef %SERVICE_PROXY_ANCESTOR_NAME% inherited;
+
+protected:
+ virtual AnsiString __fastcall __GetInterfaceName()
+ { return "%SERVICE_NAME%"; }
+
+ // <%%% START FUNCTION_OPERATIONS %%%>
+ virtual void __fastcall Invoke_%OPERATION_NAME%(
+ // <%%% START IN_PARAMS %%%>
+ // <%%% START IF_PARAM_TYPE_SIMPLE %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_TYPE% %PARAM_BACK_MODIFIER% %PARAM_NAME%,
+ // <%%% END IF_PARAM_TYPE_SIMPLE %%%>
+ // <%%% START IF_PARAM_TYPE_COMPLEX %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_TYPE%* %PARAM_BACK_MODIFIER% %PARAM_NAME%,
+ // <%%% END IF_PARAM_TYPE_COMPLEX %%%>
+ // <%%% END IN_PARAMS %%%>
+ );
+ // <%%% START IF_RESULT_SIMPLE %%%>
+ virtual %OPERATION_RESULT% __fastcall Retrieve_%OPERATION_NAME%(
+ // <%%% END IF_RESULT_SIMPLE %%%>
+ // <%%% START IF_RESULT_COMPLEX %%%>
+ virtual %OPERATION_RESULT%* __fastcall Retrieve_%OPERATION_NAME%(
+ // <%%% END IF_RESULT_COMPLEX %%%>
+ // <%%% START OUT_PARAMS %%%>
+ // <%%% START IF_PARAM_TYPE_SIMPLE %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_TYPE% %PARAM_BACK_MODIFIER% %PARAM_NAME%,
+ // <%%% END IF_PARAM_TYPE_SIMPLE %%%>
+ // <%%% START IF_PARAM_TYPE_COMPLEX %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_TYPE%* %PARAM_BACK_MODIFIER% %PARAM_NAME%,
+ // <%%% END IF_PARAM_TYPE_COMPLEX %%%>
+ // <%%% END OUT_PARAMS %%%>
+ );
+ // <%%% END FUNCTION_OPERATIONS %%%>
+
+ // <%%% START PROCEDURE_OPERATIONS %%%>
+ virtual void _fastcall Invoke_%OPERATION_NAME%(
+ // <%%% START IN_PARAMS %%%>
+ // <%%% START IF_PARAM_TYPE_SIMPLE %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_TYPE% %PARAM_BACK_MODIFIER% %PARAM_NAME%,
+ // <%%% END IF_PARAM_TYPE_SIMPLE %%%>
+ // <%%% START IF_PARAM_TYPE_COMPLEX %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_TYPE%* %PARAM_BACK_MODIFIER% %PARAM_NAME%,
+ // <%%% END IF_PARAM_TYPE_COMPLEX %%%>
+ // <%%% END IN_PARAMS %%%>
+ );
+ // <%%% START IF_OUT_PARAMS %%%>
+ virtual void _fastcall Retrieve_%OPERATION_NAME%(
+ // <%%% START OUT_PARAMS %%%>
+ // <%%% START IF_PARAM_TYPE_SIMPLE %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_TYPE% %PARAM_BACK_MODIFIER% %PARAM_NAME%,
+ // <%%% END IF_PARAM_TYPE_SIMPLE %%%>
+ // <%%% START IF_PARAM_TYPE_COMPLEX %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_TYPE%* %PARAM_BACK_MODIFIER% %PARAM_NAME%,
+ // <%%% END IF_PARAM_TYPE_COMPLEX %%%>
+ // <%%% END OUT_PARAMS %%%>
+ );
+ // <%%% END IF_OUT_PARAMS %%%>
+ // <%%% END PROCEDURE_OPERATIONS %%%>
+public:
+ #pragma option push -w-inl
+ /* TROProxy.Create */ inline __fastcall virtual T%SERVICE_NAME%_AsyncProxy(const Uroclientintf::_di_IROMessage aMessage, const Uroclientintf::_di_IROTransportChannel aTransportChannel)/* overload */ :
+ %SERVICE_PROXY_ANCESTOR_NAME%(aMessage, aTransportChannel) {}
+ #pragma option pop
+
+ virtual HRESULT __stdcall QueryInterface(const GUID& IID, void **Obj) {
+ return inherited::QueryInterface(IID, (void *)Obj); }
+
+ virtual ULONG __stdcall AddRef() {
+ return inherited::_AddRef(); }
+
+ virtual ULONG __stdcall Release() {
+ return inherited::_Release(); }
+};
+// <%%% END SERVICES %%%>
+
+} // namespace %NAMESPACE_NAME%
+
+using namespace %NAMESPACE_NAME%;
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+#endif // %UNIT_NAME%H
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen2/Templates/template.async.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen2/Templates/template.async.pas
new file mode 100644
index 0000000..343ba00
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen2/Templates/template.async.pas
@@ -0,0 +1,228 @@
+unit %UNIT_NAME%;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{----------------------------------------------------------------------------}
+
+{$I Remobjects.inc}
+
+interface
+
+uses
+ {vcl:} Classes, TypInfo,
+ {RemObjects:} uROXMLIntf, uROClasses, uROClient, uROTypes, uROClientIntf, uROAsync
+ // <%%% START REQUIRED_UNITS %%%>
+ {Required:} %REQUIRED_UNIT_NAME%,
+ // <%%% END REQUIRED_UNITS %%%>
+ {Generated:} %LIBRARY_NAME%_Intf;
+
+type
+ { Forward declarations }
+ // <%%% START SERVICES %%%>
+ I%SERVICE_NAME%_Async = interface;
+ Co%SERVICE_NAME%_Async = class;
+ T%SERVICE_NAME%_AsyncProxy = class;
+ // <%%% END SERVICES %%%>
+
+ // <%%% START SERVICES %%%>
+ { I%SERVICE_NAME%_Async }
+ // <%%% START DOCUMENTATION %%%>
+
+ { Description:
+ %CONTENT% }
+ // <%%% END DOCUMENTATION %%%>
+ I%SERVICE_NAME%_Async = interface%SERVICE_ANCESTOR_NAME%
+ ['%ASYNC_SERVICE_UID%']
+ // <%%% START FUNCTION_OPERATIONS %%%>
+ procedure Invoke_%OPERATION_NAME%(
+ // <%%% START IN_PARAMS %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_NAME%: %PARAM_TYPE%;
+ // <%%% END IN_PARAMS %%%>
+ );
+ function Retrieve_%OPERATION_NAME%(
+ // <%%% START OUT_PARAMS %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_NAME%: %PARAM_TYPE%;
+ // <%%% END OUT_PARAMS %%%>
+ ): %OPERATION_RESULT%;
+ // <%%% END FUNCTION_OPERATIONS %%%>
+ // <%%% START PROCEDURE_OPERATIONS %%%>
+ procedure Invoke_%OPERATION_NAME%(
+ // <%%% START IN_PARAMS %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_NAME%: %PARAM_TYPE%;
+ // <%%% END IN_PARAMS %%%>
+ );
+ // <%%% START IF_OUT_PARAMS %%%>
+ procedure Retrieve_%OPERATION_NAME%(
+ // <%%% START OUT_PARAMS %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_NAME%: %PARAM_TYPE%;
+ // <%%% END OUT_PARAMS %%%>
+ );
+ // <%%% END IF_OUT_PARAMS %%%>
+ // <%%% END PROCEDURE_OPERATIONS %%%>
+ end;
+
+ { Co%SERVICE_NAME%_Async }
+ Co%SERVICE_NAME%_Async = class
+ class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): I%SERVICE_NAME%_Async;
+ end;
+
+ { T%SERVICE_NAME%_Proxy }
+ T%SERVICE_NAME%_AsyncProxy = class(%SERVICE_PROXY_ANCESTOR_NAME%, I%SERVICE_NAME%_Async)
+ protected
+ function __GetInterfaceName:string; override;
+
+ // <%%% START FUNCTION_OPERATIONS %%%>
+ procedure Invoke_%OPERATION_NAME%(
+ // <%%% START IN_PARAMS %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_NAME%: %PARAM_TYPE%;
+ // <%%% END IN_PARAMS %%%>
+ );
+ function Retrieve_%OPERATION_NAME%(
+ // <%%% START OUT_PARAMS %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_NAME%: %PARAM_TYPE%;
+ // <%%% END OUT_PARAMS %%%>
+ ): %OPERATION_RESULT%;
+ // <%%% END FUNCTION_OPERATIONS %%%>
+ // <%%% START PROCEDURE_OPERATIONS %%%>
+ procedure Invoke_%OPERATION_NAME%(
+ // <%%% START IN_PARAMS %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_NAME%: %PARAM_TYPE%;
+ // <%%% END IN_PARAMS %%%>
+ );
+ // <%%% START IF_OUT_PARAMS %%%>
+ procedure Retrieve_%OPERATION_NAME%(
+ // <%%% START OUT_PARAMS %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_NAME%: %PARAM_TYPE%;
+ // <%%% END OUT_PARAMS %%%>
+ );
+ // <%%% END IF_OUT_PARAMS %%%>
+ // <%%% END PROCEDURE_OPERATIONS %%%>
+ end;
+
+ // <%%% END SERVICES %%%>
+implementation
+
+uses
+ {vcl:} SysUtils,
+ {RemObjects:} uROEventRepository, uRORes;
+
+// <%%% START SERVICES %%%>
+{ Co%SERVICE_NAME%_Async }
+
+class function Co%SERVICE_NAME%_Async.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): I%SERVICE_NAME%_Async;
+begin
+ result := T%SERVICE_NAME%_AsyncProxy.Create(aMessage, aTransportChannel);
+end;
+
+{ T%SERVICE_NAME%_AsyncProxy }
+
+function T%SERVICE_NAME%_AsyncProxy.__GetInterfaceName:string;
+begin
+ result := '%SERVICE_NAME%';
+end;
+
+// <%%% START FUNCTION_OPERATIONS %%%>
+procedure T%SERVICE_NAME%_AsyncProxy.Invoke_%OPERATION_NAME%(
+ // <%%% START IN_PARAMS %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_NAME%: %PARAM_TYPE%;
+ // <%%% END IN_PARAMS %%%>
+ );
+begin
+ __AssertProxyNotBusy('%OPERATION_NAME%');
+
+ __Message.InitializeRequestMessage(__TransportChannel, '%LIBRARY_NAME%', __InterfaceName, '%OPERATION_NAME%');
+ // <%%% START IN_PARAMS_NO_STRIP %%%>
+ __Message.Write('%PARAM_NAME%', TypeInfo(%PARAM_TYPE%), %PARAM_NAME%, [%PARAM_ATTRIBUTE%]);
+ // <%%% END IN_PARAMS_NO_STRIP %%%>
+
+ __DispatchAsyncRequest('%OPERATION_NAME%',__Message);
+end;
+
+function T%SERVICE_NAME%_AsyncProxy.Retrieve_%OPERATION_NAME%(
+ // <%%% START OUT_PARAMS %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_NAME%: %PARAM_TYPE%;
+ // <%%% END OUT_PARAMS %%%>
+ ): %OPERATION_RESULT%;
+var
+ __response:TStream;
+begin
+ // <%%% START OUT_PARAMS_NO_STRIP %%%>
+ // <%%% START IF_PARAM_TYPE_COMPLEX %%%>
+ %PARAM_NAME% := nil;
+ // <%%% END IF_PARAM_TYPE_COMPLEX %%%>
+ // <%%% END OUT_PARAMS_NO_STRIP %%%>
+ // <%%% START IF_RESULT_COMPLEX %%%>
+ Result := nil;
+ // <%%% END IF_RESULT_COMPLEX %%%>
+
+ __response := __RetrieveAsyncResponse('%OPERATION_NAME%');
+ __Message.ReadFromStream(__response);
+
+ __Message.Read('Result', TypeInfo(%OPERATION_RESULT%), Result, [%OPERATION_RESULT_ATTRIBUTE%]);
+ // <%%% START OUT_PARAMS_NO_STRIP %%%>
+ __Message.Read('%PARAM_NAME%', TypeInfo(%PARAM_TYPE%), %PARAM_NAME%, [%PARAM_ATTRIBUTE%]);
+ // <%%% END OUT_PARAMS_NO_STRIP %%%>
+
+ __response.Free();
+end;
+
+// <%%% END FUNCTION_OPERATIONS %%%>
+// <%%% START PROCEDURE_OPERATIONS %%%>
+procedure T%SERVICE_NAME%_AsyncProxy.Invoke_%OPERATION_NAME%(
+ // <%%% START IN_PARAMS %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_NAME%: %PARAM_TYPE%;
+ // <%%% END IN_PARAMS %%%>
+ );
+var
+ __request:TStream;
+begin
+ __AssertProxyNotBusy('%OPERATION_NAME%');
+ __request := TMemoryStream.Create;
+
+ __Message.InitializeRequestMessage(__TransportChannel, '%LIBRARY_NAME%', __InterfaceName, '%OPERATION_NAME%');
+ // <%%% START IN_PARAMS_NO_STRIP %%%>
+ __Message.Write('%PARAM_NAME%', TypeInfo(%PARAM_TYPE%), %PARAM_NAME%, [%PARAM_ATTRIBUTE%]);
+ // <%%% END IN_PARAMS_NO_STRIP %%%>
+ __Message.Finalize;
+
+ __Message.WriteToStream(__request);
+ __DispatchAsyncRequest('%OPERATION_NAME%', __request, False);
+end;
+
+// <%%% START IF_OUT_PARAMS %%%>
+procedure T%SERVICE_NAME%_AsyncProxy.Retrieve_%OPERATION_NAME%(
+ // <%%% START OUT_PARAMS %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_NAME%: %PARAM_TYPE%;
+ // <%%% END OUT_PARAMS %%%>
+ );
+var
+ __response:TStream;
+begin
+ // <%%% START OUT_PARAMS_NO_STRIP %%%>
+ // <%%% START IF_PARAM_TYPE_COMPLEX %%%>
+ %PARAM_NAME% := nil;
+ // <%%% END IF_PARAM_TYPE_COMPLEX %%%>
+ // <%%% END OUT_PARAMS_NO_STRIP %%%>
+
+ __response := __RetrieveAsyncResponse('%OPERATION_NAME%');
+ __Message.ReadFromStream(__response);
+
+ // <%%% START OUT_PARAMS_NO_STRIP %%%>
+ __Message.Read('%PARAM_NAME%', TypeInfo(%PARAM_TYPE%), %PARAM_NAME%, [%PARAM_ATTRIBUTE%]);
+ // <%%% END OUT_PARAMS_NO_STRIP %%%>
+
+ __response.Free();
+end;
+
+// <%%% END IF_OUT_PARAMS %%%>
+// <%%% END PROCEDURE_OPERATIONS %%%>
+// <%%% END SERVICES %%%>
+initialization
+
+finalization
+
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen2/Templates/template.impl.cpp b/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen2/Templates/template.impl.cpp
new file mode 100644
index 0000000..04b5dbb
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen2/Templates/template.impl.cpp
@@ -0,0 +1,93 @@
+// <%%% START SERVICES %%%>
+// unit %UNIT_NAME%
+//
+/*---------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Modify this unit to provide implementation for your service. */
+
+// Interface of %LIBRARY_NAME%
+#include "%LIBRARY_NAME%_Intf.h"
+
+// Our header file
+#include "%UNIT_NAME%.h"
+
+// Invoker interface
+#include "%LIBRARY_NAME%_Invk.h"
+
+// <%%% START IF_DATA_MODULE %%%>
+#pragma link "Uroremotedatamodule"
+// <%%% END IF_DATA_MODULE %%%>
+#pragma link "Uroserver"
+
+// <%%% START IF_DATA_MODULE %%%>
+//---------------------------------------------------------------------------
+#pragma package(smart_init)
+#pragma resource "*.dfm"
+T%SERVICE_NAME% *%SERVICE_NAME%;
+//---------------------------------------------------------------------------
+// <%%% END IF_DATA_MODULE %%%>
+void __fastcall Create_%SERVICE_NAME%(/*out*/ _di_IInterface& anInstance)
+{
+ anInstance = new T%SERVICE_NAME%(
+ // <%%% START IF_DATA_MODULE %%%>
+ NULL
+ // <%%% END IF_DATA_MODULE %%%>
+ )->operator IROObjectRetainer *();
+}
+
+// %SERVICE_NAME%
+// <%%% START IF_DATA_MODULE %%%>
+
+__fastcall T%SERVICE_NAME%::T%SERVICE_NAME%(Classes::TComponent* aOwner)
+ : TRORemoteDataModule(aOwner)
+{
+}
+// <%%% END IF_DATA_MODULE %%%>
+// <%%% START FUNCTION_OPERATIONS %%%>
+// <%%% START IF_RESULT_SIMPLE %%%>
+%OPERATION_RESULT% __fastcall T%SERVICE_NAME%::%OPERATION_NAME%(
+// <%%% END IF_RESULT_SIMPLE %%%>
+// <%%% START IF_RESULT_COMPLEX %%%>
+%OPERATION_RESULT%* __fastcall T%SERVICE_NAME%::%OPERATION_NAME%(
+// <%%% END IF_RESULT_COMPLEX %%%>
+ // <%%% START PARAMS %%%>
+ // <%%% START IF_PARAM_TYPE_SIMPLE %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_TYPE% %PARAM_BACK_MODIFIER% %PARAM_NAME%,
+ // <%%% END IF_PARAM_TYPE_SIMPLE %%%>
+ // <%%% START IF_PARAM_TYPE_COMPLEX %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_TYPE%* %PARAM_BACK_MODIFIER% %PARAM_NAME%,
+ // <%%% END IF_PARAM_TYPE_COMPLEX %%%>
+ // <%%% END PARAMS %%%>
+ )
+{
+ // Insert your implementation code for %SERVICE_NAME%::%OPERATION_NAME% here
+}
+// <%%% END FUNCTION_OPERATIONS %%%>
+
+// <%%% START PROCEDURE_OPERATIONS %%%>
+void __fastcall T%SERVICE_NAME%::%OPERATION_NAME%(
+ // <%%% START PARAMS %%%>
+ // <%%% START IF_PARAM_TYPE_SIMPLE %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_TYPE% %PARAM_BACK_MODIFIER% %PARAM_NAME%,
+ // <%%% END IF_PARAM_TYPE_SIMPLE %%%>
+ // <%%% START IF_PARAM_TYPE_COMPLEX %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_TYPE%* %PARAM_BACK_MODIFIER% %PARAM_NAME%,
+ // <%%% END IF_PARAM_TYPE_COMPLEX %%%>
+ // <%%% END PARAMS %%%>
+ )
+{
+ // Insert your implementation code for %SERVICE_NAME%::%OPERATION_NAME% here
+}
+// <%%% END PROCEDURE_OPERATIONS %%%>
+
+void __initialization_%UNIT_NAME%();
+
+#pragma startup __initialization_%UNIT_NAME%
+
+void __initialization_%UNIT_NAME%()
+{
+ new TROClassFactory("%SERVICE_NAME%", Create_%SERVICE_NAME%, __classid(T%SERVICE_NAME%_Invoker));
+}
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen2/Templates/template.impl.dfm b/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen2/Templates/template.impl.dfm
new file mode 100644
index 0000000..63e0a45
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen2/Templates/template.impl.dfm
@@ -0,0 +1,7 @@
+// <%%% START SERVICES %%%>
+object %SERVICE_NAME%: T%SERVICE_NAME%
+ OldCreateOrder = False
+ Height = 150
+ Width = 150
+end
+// <%%% END SERVICES %%%>
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen2/Templates/template.impl.h b/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen2/Templates/template.impl.h
new file mode 100644
index 0000000..dfda313
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen2/Templates/template.impl.h
@@ -0,0 +1,90 @@
+// <%%% START SERVICES %%%>
+// unit %UNIT_NAME%
+//
+/*---------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile your project. }
+{ }
+{ Modify the %UNIT_NAME%.cpp file to change the implementation details of }
+{ this service. }
+{---------------------------------------------------------------------------*/
+
+#ifndef %UNIT_NAME%H
+#define %UNIT_NAME%H
+
+#include // Pascal unit
+// <%%% START IF_DATA_MODULE %%%>
+#include
+#include
+#include
+#include
+#include // Pascal unit
+// <%%% END IF_DATA_MODULE %%%>
+#include // Pascal unit
+#include "%LIBRARY_NAME%_intf.h"
+
+// T%SERVICE_NAME%
+class T%SERVICE_NAME% : public %SERVICE_ANCESTOR_NAME%, I%SERVICE_NAME% // implements I%SERVICE_NAME%
+{
+ typedef %SERVICE_ANCESTOR_NAME% inherited;
+
+// <%%% START IF_DATA_MODULE %%%>
+__published: // this line is required or the IDE will consider the declaration of the datamodule is incorrect.
+// <%%% END IF_DATA_MODULE %%%>
+protected:
+ // I%SERVICE_NAME% methods
+ // <%%% START FUNCTION_OPERATIONS %%%>
+ // <%%% START IF_RESULT_SIMPLE %%%>
+ virtual %OPERATION_RESULT% __fastcall %OPERATION_NAME%(
+ // <%%% END IF_RESULT_SIMPLE %%%>
+ // <%%% START IF_RESULT_COMPLEX %%%>
+ virtual %OPERATION_RESULT%* __fastcall %OPERATION_NAME%(
+ // <%%% END IF_RESULT_COMPLEX %%%>
+ // <%%% START PARAMS %%%>
+ // <%%% START IF_PARAM_TYPE_SIMPLE %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_TYPE% %PARAM_BACK_MODIFIER% %PARAM_NAME%,
+ // <%%% END IF_PARAM_TYPE_SIMPLE %%%>
+ // <%%% START IF_PARAM_TYPE_COMPLEX %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_TYPE%* %PARAM_BACK_MODIFIER% %PARAM_NAME%,
+ // <%%% END IF_PARAM_TYPE_COMPLEX %%%>
+ // <%%% END PARAMS %%%>
+ );
+ // <%%% END FUNCTION_OPERATIONS %%%>
+ // <%%% START PROCEDURE_OPERATIONS %%%>
+ virtual void __fastcall %OPERATION_NAME%(
+ // <%%% START PARAMS %%%>
+ // <%%% START IF_PARAM_TYPE_SIMPLE %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_TYPE% %PARAM_BACK_MODIFIER% %PARAM_NAME%,
+ // <%%% END IF_PARAM_TYPE_SIMPLE %%%>
+ // <%%% START IF_PARAM_TYPE_COMPLEX %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_TYPE%* %PARAM_BACK_MODIFIER% %PARAM_NAME%,
+ // <%%% END IF_PARAM_TYPE_COMPLEX %%%>
+ // <%%% END PARAMS %%%>
+ );
+ // <%%% END PROCEDURE_OPERATIONS %%%>
+
+public:
+ // <%%% START IF_DATA_MODULE %%%>
+ __fastcall T%SERVICE_NAME%(Classes::TComponent* aOwner);
+
+ // <%%% END IF_DATA_MODULE %%%>
+ virtual HRESULT __stdcall QueryInterface(const GUID& IID, void **Obj) {
+ return inherited::QueryInterface(IID, (void *)Obj); }
+
+ virtual ULONG __stdcall AddRef() {
+ return inherited::_AddRef(); }
+
+ virtual ULONG __stdcall Release() {
+ return inherited::_Release(); }
+};
+// <%%% START IF_DATA_MODULE %%%>
+//---------------------------------------------------------------------------
+extern PACKAGE T%SERVICE_NAME% *%SERVICE_NAME%;
+//---------------------------------------------------------------------------
+// <%%% END IF_DATA_MODULE %%%>
+
+#endif // %UNIT_NAME%H
+
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen2/Templates/template.impl.pas b/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen2/Templates/template.impl.pas
new file mode 100644
index 0000000..3b8d8cc
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen2/Templates/template.impl.pas
@@ -0,0 +1,92 @@
+unit %UNIT_NAME%;
+
+{----------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project . }
+{ }
+{ This is where you are supposed to code the implementation of your objects. }
+{----------------------------------------------------------------------------}
+
+{$I Remobjects.inc}
+
+interface
+
+uses
+ {vcl:} Classes, SysUtils,
+ {RemObjects:} uROXMLIntf, uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
+ // <%%% START REQUIRED_UNITS %%%>
+ {Required:} %REQUIRED_UNIT_NAME%,
+ // <%%% END REQUIRED_UNITS %%%>
+ {Generated:} %LIBRARY_NAME%_Intf;
+
+// <%%% START SERVICES %%%>
+type
+ { T%SERVICE_NAME% }
+ T%SERVICE_NAME% = class(%SERVICE_ANCESTOR_NAME%, I%SERVICE_NAME%)
+ private
+ protected
+ { I%SERVICE_NAME% methods }
+ // <%%% START FUNCTION_OPERATIONS %%%>
+ function %OPERATION_NAME%(
+ // <%%% START PARAMS %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_NAME%: %PARAM_TYPE%;
+ // <%%% END PARAMS %%%>
+ ): %OPERATION_RESULT%;
+ // <%%% END FUNCTION_OPERATIONS %%%>
+ // <%%% START PROCEDURE_OPERATIONS %%%>
+ procedure %OPERATION_NAME%(
+ // <%%% START PARAMS %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_NAME%: %PARAM_TYPE%;
+ // <%%% END PARAMS %%%>
+ );
+ // <%%% END PROCEDURE_OPERATIONS %%%>
+ end;
+// <%%% END SERVICES %%%>
+
+implementation
+
+// <%%% START IF_DATA_MODULE %%%>
+{$R *.dfm}
+
+// <%%% END IF_DATA_MODULE %%%>
+uses
+ {Generated:} %LIBRARY_NAME%_Invk;
+
+// <%%% START SERVICES %%%>
+procedure Create_%SERVICE_NAME%(out anInstance : IUnknown);
+begin
+ anInstance := T%SERVICE_NAME%.Create(
+ // <%%% START IF_DATA_MODULE %%%>
+ nil
+ // <%%% END IF_DATA_MODULE %%%>
+ );
+end;
+
+{ %SERVICE_NAME% }
+// <%%% START FUNCTION_OPERATIONS %%%>
+function T%SERVICE_NAME%.%OPERATION_NAME%(
+ // <%%% START PARAMS %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_NAME%: %PARAM_TYPE%;
+ // <%%% END PARAMS %%%>
+ ): %OPERATION_RESULT%;
+begin
+end;
+
+// <%%% END FUNCTION_OPERATIONS %%%>
+// <%%% START PROCEDURE_OPERATIONS %%%>
+procedure T%SERVICE_NAME%.%OPERATION_NAME%(
+ // <%%% START PARAMS %%%>
+ %PARAM_FRONT_MODIFIER% %PARAM_NAME%: %PARAM_TYPE%;
+ // <%%% END PARAMS %%%>
+ );
+begin
+end;
+
+// <%%% END PROCEDURE_OPERATIONS %%%>
+initialization
+ TROClassFactory.Create('%SERVICE_NAME%', Create_%SERVICE_NAME%, T%SERVICE_NAME%_Invoker);
+
+finalization
+
+// <%%% END SERVICES %%%>
+end.
diff --git a/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen2/Templates/template.intf.cpp b/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen2/Templates/template.intf.cpp
new file mode 100644
index 0000000..658c4a9
--- /dev/null
+++ b/official/5.0.30.691/RemObjects SDK for Delphi/Source/CodeGen2/Templates/template.intf.cpp
@@ -0,0 +1,1301 @@
+// %UNIT_NAME%
+//
+/*---------------------------------------------------------------------------}
+{ This unit was automatically generated by the RemObjects SDK after reading }
+{ the RODL file associated with this project. }
+{ }
+{ Do not modify this unit manually, or your changes will be lost when this }
+{ unit is regenerated the next time you compile the project. }
+{---------------------------------------------------------------------------*/
+
+void __initialization_%UNIT_NAME%();
+void __finalization_%UNIT_NAME%();
+
+#pragma startup __initialization_%UNIT_NAME%
+#pragma exit __finalization_%UNIT_NAME%
+
+#include "%LIBRARY_NAME%_Intf.h"
+#include
+#include
+
+// Implementation of %UNIT_NAME%
+
+// <%%% START ARRAYS %%%>
+// %ARRAY_NAME%
+void __fastcall %ARRAY_NAME%::Assign(Classes::TPersistent* iSource)
+{
+ %ARRAY_NAME%* lSource = dynamic_cast<%ARRAY_NAME%*>(iSource);
+ if (lSource)
+ {
+ Clear();
+ Resize(lSource->Count);
+ for (int i = 0 ; i < Count ; i++)
+ {
+ // <%%% START IF_ARRAY_TYPE_COMPLEX %%%>
+ if (lSource->Items[i] != NULL)
+ {
+ Items[i]->Assign(lSource->Items[i]);
+ }
+ // <%%% END IF_ARRAY_TYPE_COMPLEX %%%>
+ // <%%% START IF_ARRAY_TYPE_SIMPLE %%%>
+ Items[i] = lSource->Items[i];
+ // <%%% END IF_ARRAY_TYPE_SIMPLE %%%>
+ }
+ }
+ else
+ {
+ inherited::Assign(iSource);
+ }
+}
+
+void __fastcall %ARRAY_NAME%::ReadComplex(TObject* ASerializer)
+{
+ // <%%% START IF_ARRAY_TYPE_SIMPLE %%%>
+ %ARRAY_TYPE% lval;
+ // <%%% END IF_ARRAY_TYPE_SIMPLE %%%>
+ // <%%% START IF_ARRAY_TYPE_COMPLEX %%%>
+ %ARRAY_TYPE%* lval;
+ // <%%% END IF_ARRAY_TYPE_COMPLEX %%%>
+ TROSerializer* Serializer = dynamic_cast(ASerializer);
+ for (int i = 0; i < Count; i++)
+ {
+ // <%%% START IF_ARRAY_BINARY_TYPE %%%>
+ Serializer->ReadBinary(Serializer->GetArrayElementName(GetItemType(__classid(%ARRAY_NAME%)), GetItemRef(i)), &lval, i);
+ // <%%% END IF_ARRAY_BINARY_TYPE %%%>
+ // <%%% START IF_ARRAY_BOOLEAN_TYPE %%%>
+ Serializer->ReadEnumerated(Serializer->GetArrayElementName(GetItemType(__classid(%ARRAY_NAME%)), GetItemRef(i)), __GetboolInfo, &lval, i);
+ // <%%% END IF_ARRAY_BOOLEAN_TYPE %%%>
+ // <%%% START IF_ARRAY_CURRENCY_TYPE %%%>
+ Serializer->ReadDouble(Serializer->GetArrayElementName(GetItemType(__classid(%ARRAY_NAME%)), GetItemRef(i)), ftCurr, &lval, i);
+ // <%%% END IF_ARRAY_CURRENCY_TYPE %%%>
+ // <%%% START IF_ARRAY_DATETIME_TYPE %%%>
+ Serializer->ReadDateTime(Serializer->GetArrayElementName(GetItemType(__classid(%ARRAY_NAME%)), GetItemRef(i)), &lval, i);
+ // <%%% END IF_ARRAY_DATETIME_TYPE %%%>
+ // <%%% START IF_ARRAY_DECIMAL_TYPE %%%>
+ Serializer->ReadDecimal(Serializer->GetArrayElementName(GetItemType(__classid(%ARRAY_NAME%)), GetItemRef(i)), &lval, i);
+ // <%%% END IF_ARRAY_DECIMAL_TYPE %%%>
+ // <%%% START IF_ARRAY_DOUBLE_TYPE %%%>
+ Serializer->ReadDouble(Serializer->GetArrayElementName(GetItemType(__classid(%ARRAY_NAME%)), GetItemRef(i)), ftDouble, &lval, i);
+ // <%%% END IF_ARRAY_DOUBLE_TYPE %%%>
+ // <%%% START IF_ARRAY_GUID_TYPE %%%>
+ Serializer->ReadGuid(Serializer->GetArrayElementName(GetItemType(__classid(%ARRAY_NAME%)), GetItemRef(i)), &lval, i);
+ // <%%% END IF_ARRAY_GUID_TYPE %%%>
+ // <%%% START IF_ARRAY_INT64_TYPE %%%>
+ Serializer->ReadInt64(Serializer->GetArrayElementName(GetItemType(__classid(%ARRAY_NAME%)), GetItemRef(i)), &lval, i);
+ // <%%% END IF_ARRAY_INT64_TYPE %%%>
+ // <%%% START IF_ARRAY_INTEGER_TYPE %%%>
+ Serializer->ReadInteger(Serializer->GetArrayElementName(GetItemType(__classid(%ARRAY_NAME%)), GetItemRef(i)), otSLong, &lval, i);
+ // <%%% END IF_ARRAY_INTEGER_TYPE %%%>
+ // <%%% START IF_ARRAY_ANSISTRING_TYPE %%%>
+ Serializer->ReadUTF8String(Serializer->GetArrayElementName(GetItemType(__classid(%ARRAY_NAME%)), GetItemRef(i)), &lval, i);
+ // <%%% END IF_ARRAY_ANSISTRING_TYPE %%%>
+ // <%%% START IF_ARRAY_UTF8STRING_TYPE %%%>
+ Serializer->ReadUTF8String(Serializer->GetArrayElementName(GetItemType(__classid(%ARRAY_NAME%)), GetItemRef(i)), &lval, i);
+ // <%%% END IF_ARRAY_UTF8STRING_TYPE %%%>
+ // <%%% START IF_ARRAY_VARIANT_TYPE %%%>
+ Serializer->ReadVariant(Serializer->GetArrayElementName(GetItemType(__classid(%ARRAY_NAME%)), GetItemRef(i)), &lval, i);
+ // <%%% END IF_ARRAY_VARIANT_TYPE %%%>
+ // <%%% START IF_ARRAY_WIDESTRING_TYPE %%%>
+ Serializer->ReadWideString(Serializer->GetArrayElementName(GetItemType(__classid(%ARRAY_NAME%)), GetItemRef(i)), &lval, i);
+ // <%%% END IF_ARRAY_WIDESTRING_TYPE %%%>
+ // <%%% START IF_ARRAY_XML_TYPE %%%>
+ Serializer->ReadXml(Serializer->GetArrayElementName(GetItemType(__classid(%ARRAY_NAME%)), GetItemRef(i)), &lval, i);
+ // <%%% END IF_ARRAY_XML_TYPE %%%>
+ // <%%% START IF_ARRAY_ARRAY_TYPE %%%>
+ Serializer->ReadArray(Serializer->GetArrayElementName(GetItemType(__classid(%ARRAY_NAME%)), GetItemRef(i)), __classid(%ARRAY_TYPE%), &lval, i);
+ // <%%% END IF_ARRAY_ARRAY_TYPE %%%>
+ // <%%% START IF_ARRAY_ENUM_TYPE %%%>
+ Serializer->ReadEnumerated(Serializer->GetArrayElementName(GetItemType(__classid(%ARRAY_NAME%)), GetItemRef(i)), __Get%ARRAY_TYPE%Info, &lval, i);
+ // <%%% END IF_ARRAY_ENUM_TYPE %%%>
+ // <%%% START IF_ARRAY_STRUCT_TYPE %%%>
+ Serializer->ReadStruct(Serializer->GetArrayElementName(GetItemType(__classid(%ARRAY_NAME%)), GetItemRef(i)), __classid(%ARRAY_TYPE%), &lval, i);
+ // <%%% END IF_ARRAY_STRUCT_TYPE %%%>
+ Items[i] = lval;
+ }
+}
+
+void __fastcall %ARRAY_NAME%::WriteComplex(TObject* ASerializer)
+{
+ TROSerializer* Serializer = dynamic_cast(ASerializer);
+ for(int i = 0; i < Count; i++)
+ // <%%% START IF_ARRAY_BINARY_TYPE %%%>
+ Serializer->WriteBinary(Serializer->GetArrayElementName(GetItemType(__classid(%ARRAY_NAME%)), GetItemRef(i)), &(fItems[i]), i);
+ // <%%% END IF_ARRAY_BINARY_TYPE %%%>
+ // <%%% START IF_ARRAY_BOOLEAN_TYPE %%%>
+ Serializer->WriteEnumerated(Serializer->GetArrayElementName(GetItemType(__classid(%ARRAY_NAME%)), GetItemRef(i)), __GetboolInfo, &(fItems[i]), i);
+ // <%%% END IF_ARRAY_BOOLEAN_TYPE %%%>
+ // <%%% START IF_ARRAY_CURRENCY_TYPE %%%>
+ Serializer->WriteDouble(Serializer->GetArrayElementName(GetItemType(__classid(%ARRAY_NAME%)), GetItemRef(i)), ftCurr, &(fItems[i]), i);
+ // <%%% END IF_ARRAY_CURRENCY_TYPE %%%>
+ // <%%% START IF_ARRAY_DATETIME_TYPE %%%>
+ Serializer->WriteDateTime(Serializer->GetArrayElementName(GetItemType(__classid(%ARRAY_NAME%)), GetItemRef(i)), &(fItems[i]), i);
+ // <%%% END IF_ARRAY_DATETIME_TYPE %%%>
+ // <%%% START IF_ARRAY_DECIMAL_TYPE %%%>
+ Serializer->WriteDecimal(Serializer->GetArrayElementName(GetItemType(__classid(%ARRAY_NAME%)), GetItemRef(i)), &(fItems[i]), i);
+ // <%%% END IF_ARRAY_DECIMAL_TYPE %%%>
+ // <%%% START IF_ARRAY_DOUBLE_TYPE %%%>
+ Serializer->WriteDouble(Serializer->GetArrayElementName(GetItemType(__classid(%ARRAY_NAME%)), GetItemRef(i)), ftDouble, &(fItems[i]), i);
+ // <%%% END IF_ARRAY_DOUBLE_TYPE %%%>
+ // <%%% START IF_ARRAY_GUID_TYPE %%%>
+ Serializer->WriteGuid(Serializer->GetArrayElementName(GetItemType(__classid(%ARRAY_NAME%)), GetItemRef(i)), &(fItems[i]), i);
+ // <%%% END IF_ARRAY_GUID_TYPE %%%>
+ // <%%% START IF_ARRAY_INT64_TYPE %%%>
+ Serializer->WriteInt64(Serializer->GetArrayElementName(GetItemType(__classid(%ARRAY_NAME%)), GetItemRef(i)), &(fItems[i]), i);
+ // <%%% END IF_ARRAY_INT64_TYPE %%%>
+ // <%%% START IF_ARRAY_INTEGER_TYPE %%%>
+ Serializer->WriteInteger(Serializer->GetArrayElementName(GetItemType(__classid(%ARRAY_NAME%)), GetItemRef(i)), otSLong, &(fItems[i]), i);
+ // <%%% END IF_ARRAY_INTEGER_TYPE %%%>
+ // <%%% START IF_ARRAY_ANSISTRING_TYPE %%%>
+ Serializer->WriteUTF8String(Serializer->GetArrayElementName(GetItemType(__classid(%ARRAY_NAME%)), GetItemRef(i)), &(fItems[i]), i);
+ // <%%% END IF_ARRAY_ANSISTRING_TYPE %%%>
+ // <%%% START IF_ARRAY_UTF8STRING_TYPE %%%>
+ Serializer->WriteUTF8String(Serializer->GetArrayElementName(GetItemType(__classid(%ARRAY_NAME%)), GetItemRef(i)), &(fItems[i]), i);
+ // <%%% END IF_ARRAY_UTF8STRING_TYPE %%%>
+ // <%%% START IF_ARRAY_VARIANT_TYPE %%%>
+ Serializer->WriteVariant(Serializer->GetArrayElementName(GetItemType(__classid(%ARRAY_NAME%)), GetItemRef(i)), &(fItems[i]), i);
+ // <%%% END IF_ARRAY_VARIANT_TYPE %%%>
+ // <%%% START IF_ARRAY_WIDESTRING_TYPE %%%>
+ Serializer->WriteWideString(Serializer->GetArrayElementName(GetItemType(__classid(%ARRAY_NAME%)), GetItemRef(i)), &(fItems[i]), i);
+ // <%%% END IF_ARRAY_WIDESTRING_TYPE %%%>
+ // <%%% START IF_ARRAY_XML_TYPE %%%>
+ Serializer->WriteXml(Serializer->GetArrayElementName(GetItemType(__classid(%ARRAY_NAME%)), GetItemRef(i)), &(fItems[i]), i);
+ // <%%% END IF_ARRAY_XML_TYPE %%%>
+ // <%%% START IF_ARRAY_ARRAY_TYPE %%%>
+ Serializer->WriteArray(Serializer->GetArrayElementName(GetItemType(__classid(%ARRAY_NAME%)), GetItemRef(i)), &(fItems[i]), i);
+ // <%%% END IF_ARRAY_ARRAY_TYPE %%%>
+ // <%%% START IF_ARRAY_ENUM_TYPE %%%>
+ Serializer->WriteEnumerated(Serializer->GetArrayElementName(GetItemType(__classid(%ARRAY_NAME%)), GetItemRef(i)), __Get%ARRAY_TYPE%Info, &(fItems[i]), i);
+ // <%%% END IF_ARRAY_ENUM_TYPE %%%>
+ // <%%% START IF_ARRAY_STRUCT_TYPE %%%>
+ Serializer->WriteStruct(Serializer->GetArrayElementName(GetItemType(__classid(%ARRAY_NAME%)), GetItemRef(i)), &(fItems[i]), __classid(%ARRAY_TYPE%), i);
+ // <%%% END IF_ARRAY_STRUCT_TYPE %%%>
+}
+
+void __fastcall %ARRAY_NAME%::Grow()
+{
+ int Delta;
+ int Capacity = fItems.Length;
+ if (Capacity > 64)
+ {
+ Delta = Capacity / 4;
+ }
+ else
+ {
+ if (Capacity > 8)
+ Delta = 16;
+ else
+ Delta = 4;
+ }
+ fItems.set_length(Capacity + Delta);
+}
+
+// <%%% START IF_ARRAY_TYPE_COMPLEX %%%>
+%ARRAY_TYPE%* __fastcall %ARRAY_NAME%::GetItems(const int Index)
+// <%%% END IF_ARRAY_TYPE_COMPLEX %%%>
+// <%%% START IF_ARRAY_TYPE_SIMPLE %%%>
+%ARRAY_TYPE% __fastcall %ARRAY_NAME%::GetItems(const int Index)
+// <%%% END IF_ARRAY_TYPE_SIMPLE %%%>
+{
+ if ((Index < 0) || (Index >= Count))
+ {
+ RaiseError(LoadResourceString(&_err_ArrayIndexOutOfBounds), ARRAYOFCONST((Index)));
+ }
+ return fItems[Index];
+}
+
+// <%%% START IF_ARRAY_TYPE_COMPLEX %%%>
+void __fastcall %ARRAY_NAME%::SetItems(const int Index, %ARRAY_TYPE%* Value)
+// <%%% END IF_ARRAY_TYPE_COMPLEX %%%>
+// <%%% START IF_ARRAY_TYPE_SIMPLE %%%>
+void __fastcall %ARRAY_NAME%::SetItems(const int Index, %ARRAY_TYPE% Value)
+// <%%% END IF_ARRAY_TYPE_SIMPLE %%%>
+{
+ if ((Index < 0) || (Index >= Count))
+ {
+ RaiseError(LoadResourceString(&_err_ArrayIndexOutOfBounds), ARRAYOFCONST((Index)));
+ }
+ // <%%% START IF_ARRAY_TYPE_COMPLEX %%%>
+ delete fItems[Index];
+ // <%%% END IF_ARRAY_TYPE_COMPLEX %%%>
+ fItems[Index] = Value;
+}
+
+int __fastcall %ARRAY_NAME%::GetCount()
+{
+ return fCount;
+}
+
+void* __fastcall %ARRAY_NAME%::GetItemRef(const int Index)
+{
+ if ((Index < 0) || (Index >= Count))
+ {
+ RaiseError(LoadResourceString(&_err_ArrayIndexOutOfBounds), ARRAYOFCONST((Index)));
+ }
+ return &fItems[Index];
+}
+
+// <%%% START IF_ARRAY_TYPE_COMPLEX %%%>
+void __fastcall %ARRAY_NAME%::SetItemRef(const int Index, void* Ref)
+{
+ if ((Index < 0) || (Index >= Count))
+ {
+ RaiseError(LoadResourceString(&_err_ArrayIndexOutOfBounds), ARRAYOFCONST((Index)));
+ }
+
+ if (Ref != fItems[Index])
+ {
+ delete fItems[Index];
+ fItems[Index] = reinterpret_cast<%ARRAY_TYPE%*>(Ref);
+ }
+}
+
+// <%%% END IF_ARRAY_TYPE_COMPLEX %%%>
+void __fastcall %ARRAY_NAME%::Clear()
+{
+ // <%%% START IF_ARRAY_TYPE_COMPLEX %%%>
+ for (int i = 0; i < Count; i++)
+ delete fItems[i];
+
+ // <%%% END IF_ARRAY_TYPE_COMPLEX %%%>
+ fItems.set_length(0);
+ fCount = 0;
+}
+
+void __fastcall %ARRAY_NAME%::Delete(const int Index)
+{
+ if (Index >= Count)
+ {
+ RaiseError(LoadResourceString(&_err_InvalidIndex), ARRAYOFCONST((Index)));
+ }
+
+ // <%%% START IF_ARRAY_TYPE_COMPLEX %%%>
+ delete fItems[Index];
+
+ // <%%% END IF_ARRAY_TYPE_COMPLEX %%%>
+ if (Index < Count - 1)
+ for (int i = Index; i < Count - 1 ; i++)
+ fItems[i] = fItems[i + 1];
+
+ fItems.set_length(Count - 1);
+ fCount--;
+}
+
+void __fastcall %ARRAY_NAME%::Resize(const int ElementCount)
+{
+// <%%% START IF_ARRAY_TYPE_COMPLEX %%%>
+ int i;
+ for(i = fCount -1; i >= ElementCount; --i)
+ delete fItems[i];
+// <%%% END IF_ARRAY_TYPE_COMPLEX %%%>
+ fItems.set_length(ElementCount);
+// <%%% START IF_ARRAY_TYPE_COMPLEX %%%>
+ for(i = fCount; i <= ElementCount -1; ++i)
+ fItems[i] = new %ARRAY_TYPE%();
+// <%%% END IF_ARRAY_TYPE_COMPLEX %%%>
+ fCount = ElementCount;
+}
+
+// <%%% START IF_ARRAY_TYPE_COMPLEX %%%>
+%ARRAY_TYPE%* __fastcall %ARRAY_NAME%::Add()
+{
+ %ARRAY_TYPE%* result = new %ARRAY_TYPE%();
+ Add(result);
+ return result;
+}
+
+// <%%% END IF_ARRAY_TYPE_COMPLEX %%%>
+// <%%% START IF_ARRAY_TYPE_COMPLEX %%%>
+int __fastcall %ARRAY_NAME%::Add(%ARRAY_TYPE%* Value)
+// <%%% END IF_ARRAY_TYPE_COMPLEX %%%>
+// <%%% START IF_ARRAY_TYPE_SIMPLE %%%>
+int __fastcall %ARRAY_NAME%::Add(%ARRAY_TYPE% Value)
+// <%%% END IF_ARRAY_TYPE_SIMPLE %%%>
+{
+ int result = Count;
+ if (fItems.Length == result)
+ Grow();
+
+ fItems[result] = Value;
+ fCount++;
+ return result;
+}
+// <%%% END ARRAYS %%%>
+// <%%% START EXCEPTIONS %%%>
+// %EXCEPTION_NAME%
+
+%EXCEPTION_NAME%::%EXCEPTION_NAME%(AnsiString anExceptionMessage
+ // <%%% START ANCESTOR_FIELDS %%%>
+ // <%%% START IF_FIELD_TYPE_SIMPLE %%%>
+ , %FIELD_TYPE% a%FIELD_NAME%
+ // <%%% END IF_FIELD_TYPE_SIMPLE %%%>
+ // <%%% START IF_FIELD_TYPE_COMPLEX %%%>
+ , %FIELD_TYPE%* a%FIELD_NAME%
+ // <%%% END IF_FIELD_TYPE_COMPLEX %%%>
+ // <%%% END ANCESTOR_FIELDS %%%>
+ // <%%% START FIELDS_NO_STRIP %%%>
+ // <%%% START IF_FIELD_TYPE_SIMPLE %%%>
+ , %FIELD_TYPE% a%FIELD_NAME%
+ // <%%% END IF_FIELD_TYPE_SIMPLE %%%>
+ // <%%% START IF_FIELD_TYPE_COMPLEX %%%>
+ , %FIELD_TYPE%* a%FIELD_NAME%
+ // <%%% END IF_FIELD_TYPE_COMPLEX %%%>
+ // <%%% END FIELDS_NO_STRIP %%%>
+ ): %EXCEPTION_ANCESTOR_NAME%(anExceptionMessage
+ // <%%% START ANCESTOR_FIELDS %%%>
+ , a%FIELD_NAME%
+ // <%%% END ANCESTOR_FIELDS %%%>
+ )
+{
+ // <%%% START FIELDS_NO_STRIP %%%>
+ f%FIELD_NAME% = a%FIELD_NAME%;
+ // <%%% END FIELDS_NO_STRIP %%%>
+}
+
+// <%%% START IF_HAS_FIELDS %%%>
+void __fastcall %EXCEPTION_NAME%::ReadException(TObject* ASerializer)
+{
+ if (dynamic_cast(ASerializer)->RecordStrictOrder)
+ {
+ // <%%% START IF_STRUCT_HAS_ANCESTOR %%%>
+ inherited::ReadException(ASerializer);
+ // <%%% END IF_STRUCT_HAS_ANCESTOR %%%>
+ // <%%% START FIELDS_NO_STRIP %%%>
+ // <%%% START IF_FIELD_TYPE_SIMPLE %%%>
+ %FIELD_TYPE% l_%FIELD_NAME% = %FIELD_NAME%;
+ // <%%% END IF_FIELD_TYPE_SIMPLE %%%>
+ // <%%% START IF_FIELD_TYPE_COMPLEX %%%>
+ %FIELD_TYPE%* l_%FIELD_NAME% = %FIELD_NAME%;
+ // <%%% END IF_FIELD_TYPE_COMPLEX %%%>
+ // <%%% START IF_FIELD_BINARY_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadBinary("%FIELD_NAME%", &l_%FIELD_NAME%);
+ if (%FIELD_NAME% != l_%FIELD_NAME%) delete %FIELD_NAME%;
+ // <%%% END IF_FIELD_BINARY_TYPE %%%>
+ // <%%% START IF_FIELD_BOOLEAN_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadEnumerated("%FIELD_NAME%", __GetboolInfo, &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_BOOLEAN_TYPE %%%>
+ // <%%% START IF_FIELD_CURRENCY_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadDouble("%FIELD_NAME%", ftCurr, &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_CURRENCY_TYPE %%%>
+ // <%%% START IF_FIELD_DATETIME_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadDateTime("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_DATETIME_TYPE %%%>
+ // <%%% START IF_FIELD_DECIMAL_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadDecimal("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_DECIMAL_TYPE %%%>
+ // <%%% START IF_FIELD_DOUBLE_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadDouble("%FIELD_NAME%", ftDouble, &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_DOUBLE_TYPE %%%>
+ // <%%% START IF_FIELD_GUID_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadGuid("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_GUID_TYPE %%%>
+ // <%%% START IF_FIELD_INT64_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadInt64("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_INT64_TYPE %%%>
+ // <%%% START IF_FIELD_INTEGER_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadInteger("%FIELD_NAME%", otSLong, &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_INTEGER_TYPE %%%>
+ // <%%% START IF_FIELD_ANSISTRING_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadUTF8String("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_ANSISTRING_TYPE %%%>
+ // <%%% START IF_FIELD_UTF8STRING_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadUTF8String("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_UTF8STRING_TYPE %%%>
+ // <%%% START IF_FIELD_VARIANT_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadVariant("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_VARIANT_TYPE %%%>
+ // <%%% START IF_FIELD_WIDESTRING_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadWideString("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_WIDESTRING_TYPE %%%>
+ // <%%% START IF_FIELD_XML_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadXml("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_XML_TYPE %%%>
+ // <%%% START IF_FIELD_ARRAY_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadArray("%FIELD_NAME%", __classid(%FIELD_TYPE%), &l_%FIELD_NAME%);
+ if (%FIELD_NAME% != l_%FIELD_NAME%) delete %FIELD_NAME%;
+ // <%%% END IF_FIELD_ARRAY_TYPE %%%>
+ // <%%% START IF_FIELD_ENUM_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadEnumerated("%FIELD_NAME%", __Get%FIELD_TYPE%Info, &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_ENUM_TYPE %%%>
+ // <%%% START IF_FIELD_STRUCT_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadStruct("%FIELD_NAME%", __classid(%FIELD_TYPE%), &l_%FIELD_NAME%);
+ if (%FIELD_NAME% != l_%FIELD_NAME%) delete %FIELD_NAME%;
+ // <%%% END IF_FIELD_STRUCT_TYPE %%%>
+ %FIELD_NAME% = l_%FIELD_NAME%;
+ // <%%% END FIELDS_NO_STRIP %%%>
+ }
+ else
+ {
+ // <%%% START ENTIRE_HIERARCHY_FIELDS %%%>
+ // <%%% START IF_FIELD_TYPE_SIMPLE %%%>
+ %FIELD_TYPE% l_%FIELD_NAME% = %FIELD_NAME%;
+ // <%%% END IF_FIELD_TYPE_SIMPLE %%%>
+ // <%%% START IF_FIELD_TYPE_COMPLEX %%%>
+ %FIELD_TYPE%* l_%FIELD_NAME% = %FIELD_NAME%;
+ // <%%% END IF_FIELD_TYPE_COMPLEX %%%>
+ // <%%% START IF_FIELD_BINARY_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadBinary("%FIELD_NAME%", &l_%FIELD_NAME%);
+ if (%FIELD_NAME% != l_%FIELD_NAME%) delete %FIELD_NAME%;
+ // <%%% END IF_FIELD_BINARY_TYPE %%%>
+ // <%%% START IF_FIELD_BOOLEAN_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadEnumerated("%FIELD_NAME%", __GetboolInfo, &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_BOOLEAN_TYPE %%%>
+ // <%%% START IF_FIELD_CURRENCY_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadDouble("%FIELD_NAME%", ftCurr, &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_CURRENCY_TYPE %%%>
+ // <%%% START IF_FIELD_DATETIME_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadDateTime("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_DATETIME_TYPE %%%>
+ // <%%% START IF_FIELD_DECIMAL_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadDecimal("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_DECIMAL_TYPE %%%>
+ // <%%% START IF_FIELD_DOUBLE_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadDouble("%FIELD_NAME%", ftDouble, &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_DOUBLE_TYPE %%%>
+ // <%%% START IF_FIELD_GUID_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadGuid("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_GUID_TYPE %%%>
+ // <%%% START IF_FIELD_INT64_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadInt64("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_INT64_TYPE %%%>
+ // <%%% START IF_FIELD_INTEGER_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadInteger("%FIELD_NAME%", otSLong, &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_INTEGER_TYPE %%%>
+ // <%%% START IF_FIELD_ANSISTRING_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadUTF8String("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_ANSISTRING_TYPE %%%>
+ // <%%% START IF_FIELD_UTF8STRING_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadUTF8String("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_UTF8STRING_TYPE %%%>
+ // <%%% START IF_FIELD_VARIANT_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadVariant("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_VARIANT_TYPE %%%>
+ // <%%% START IF_FIELD_WIDESTRING_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadWideString("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_WIDESTRING_TYPE %%%>
+ // <%%% START IF_FIELD_XML_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadXml("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_XML_TYPE %%%>
+ // <%%% START IF_FIELD_ARRAY_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadArray("%FIELD_NAME%", __classid(%FIELD_TYPE%), &l_%FIELD_NAME%);
+ if (%FIELD_NAME% != l_%FIELD_NAME%) delete %FIELD_NAME%;
+ // <%%% END IF_FIELD_ARRAY_TYPE %%%>
+ // <%%% START IF_FIELD_ENUM_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadEnumerated("%FIELD_NAME%", __Get%FIELD_TYPE%Info, &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_ENUM_TYPE %%%>
+ // <%%% START IF_FIELD_STRUCT_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadStruct("%FIELD_NAME%", __classid(%FIELD_TYPE%), &l_%FIELD_NAME%);
+ if (%FIELD_NAME% != l_%FIELD_NAME%) delete %FIELD_NAME%;
+ // <%%% END IF_FIELD_STRUCT_TYPE %%%>
+ %FIELD_NAME% = l_%FIELD_NAME%;
+ // <%%% END ENTIRE_HIERARCHY_FIELDS %%%>
+ }
+}
+
+void __fastcall %EXCEPTION_NAME%::WriteException(TObject* ASerializer)
+{
+ if (dynamic_cast(ASerializer)->RecordStrictOrder)
+ {
+ // <%%% START IF_STRUCT_HAS_ANCESTOR %%%>
+ inherited::WriteException(ASerializer);
+ // <%%% END IF_STRUCT_HAS_ANCESTOR %%%>
+ // <%%% START FIELDS_NO_STRIP %%%>
+ // <%%% START IF_FIELD_TYPE_SIMPLE %%%>
+ %FIELD_TYPE% l_%FIELD_NAME% = %FIELD_NAME%;
+ // <%%% END IF_FIELD_TYPE_SIMPLE %%%>
+ // <%%% START IF_FIELD_TYPE_COMPLEX %%%>
+ %FIELD_TYPE%* l_%FIELD_NAME% = %FIELD_NAME%;
+ // <%%% END IF_FIELD_TYPE_COMPLEX %%%>
+ // <%%% START IF_FIELD_BINARY_TYPE %%%>
+ dynamic_cast(ASerializer)->WriteBinary("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_BINARY_TYPE %%%>
+ // <%%% START IF_FIELD_BOOLEAN_TYPE %%%>
+ dynamic_cast(ASerializer)->WriteEnumerated("%FIELD_NAME%", __GetboolInfo, &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_BOOLEAN_TYPE %%%>
+ // <%%% START IF_FIELD_CURRENCY_TYPE %%%>
+ dynamic_cast(ASerializer)->WriteDouble("%FIELD_NAME%", ftCurr, &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_CURRENCY_TYPE %%%>
+ // <%%% START IF_FIELD_DATETIME_TYPE %%%>
+ dynamic_cast(ASerializer)->WriteDateTime("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_DATETIME_TYPE %%%>
+ // <%%% START IF_FIELD_DECIMAL_TYPE %%%>
+ dynamic_cast(ASerializer)->WriteDecimal("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_DECIMAL_TYPE %%%>
+ // <%%% START IF_FIELD_DOUBLE_TYPE %%%>
+ dynamic_cast(ASerializer)->WriteDouble("%FIELD_NAME%", ftDouble, &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_DOUBLE_TYPE %%%>
+ // <%%% START IF_FIELD_GUID_TYPE %%%>
+ dynamic_cast(ASerializer)->WriteGuid("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_GUID_TYPE %%%>
+ // <%%% START IF_FIELD_INT64_TYPE %%%>
+ dynamic_cast(ASerializer)->WriteInt64("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_INT64_TYPE %%%>
+ // <%%% START IF_FIELD_INTEGER_TYPE %%%>
+ dynamic_cast(ASerializer)->WriteInteger("%FIELD_NAME%", otSLong, &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_INTEGER_TYPE %%%>
+ // <%%% START IF_FIELD_ANSISTRING_TYPE %%%>
+ dynamic_cast(ASerializer)->WriteUTF8String("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_ANSISTRING_TYPE %%%>
+ // <%%% START IF_FIELD_UTF8STRING_TYPE %%%>
+ dynamic_cast(ASerializer)->WriteUTF8String("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_UTF8STRING_TYPE %%%>
+ // <%%% START IF_FIELD_VARIANT_TYPE %%%>
+ dynamic_cast(ASerializer)->WriteVariant("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_VARIANT_TYPE %%%>
+ // <%%% START IF_FIELD_WIDESTRING_TYPE %%%>
+ dynamic_cast(ASerializer)->WriteWideString("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_WIDESTRING_TYPE %%%>
+ // <%%% START IF_FIELD_XML_TYPE %%%>
+ dynamic_cast(ASerializer)->WriteXml("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_XML_TYPE %%%>
+ // <%%% START IF_FIELD_ARRAY_TYPE %%%>
+ dynamic_cast(ASerializer)->WriteArray("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_ARRAY_TYPE %%%>
+ // <%%% START IF_FIELD_ENUM_TYPE %%%>
+ dynamic_cast(ASerializer)->WriteEnumerated("%FIELD_NAME%", __Get%FIELD_TYPE%Info, &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_ENUM_TYPE %%%>
+ // <%%% START IF_FIELD_STRUCT_TYPE %%%>
+ dynamic_cast(ASerializer)->WriteStruct("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_STRUCT_TYPE %%%>
+ // <%%% END FIELDS_NO_STRIP %%%>
+ }
+ else
+ {
+ // <%%% START ENTIRE_HIERARCHY_FIELDS %%%>
+ // <%%% START IF_FIELD_TYPE_SIMPLE %%%>
+ %FIELD_TYPE% l_%FIELD_NAME% = %FIELD_NAME%;
+ // <%%% END IF_FIELD_TYPE_SIMPLE %%%>
+ // <%%% START IF_FIELD_TYPE_COMPLEX %%%>
+ %FIELD_TYPE%* l_%FIELD_NAME% = %FIELD_NAME%;
+ // <%%% END IF_FIELD_TYPE_COMPLEX %%%>
+ // <%%% START IF_FIELD_BINARY_TYPE %%%>
+ dynamic_cast(ASerializer)->WriteBinary("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_BINARY_TYPE %%%>
+ // <%%% START IF_FIELD_BOOLEAN_TYPE %%%>
+ dynamic_cast(ASerializer)->WriteEnumerated("%FIELD_NAME%", __GetboolInfo, &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_BOOLEAN_TYPE %%%>
+ // <%%% START IF_FIELD_CURRENCY_TYPE %%%>
+ dynamic_cast(ASerializer)->WriteDouble("%FIELD_NAME%", ftCurr, &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_CURRENCY_TYPE %%%>
+ // <%%% START IF_FIELD_DATETIME_TYPE %%%>
+ dynamic_cast(ASerializer)->WriteDateTime("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_DATETIME_TYPE %%%>
+ // <%%% START IF_FIELD_DECIMAL_TYPE %%%>
+ dynamic_cast(ASerializer)->WriteDecimal("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_DECIMAL_TYPE %%%>
+ // <%%% START IF_FIELD_DOUBLE_TYPE %%%>
+ dynamic_cast(ASerializer)->WriteDouble("%FIELD_NAME%", ftDouble, &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_DOUBLE_TYPE %%%>
+ // <%%% START IF_FIELD_GUID_TYPE %%%>
+ dynamic_cast(ASerializer)->WriteGuid("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_GUID_TYPE %%%>
+ // <%%% START IF_FIELD_INT64_TYPE %%%>
+ dynamic_cast(ASerializer)->WriteInt64("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_INT64_TYPE %%%>
+ // <%%% START IF_FIELD_INTEGER_TYPE %%%>
+ dynamic_cast(ASerializer)->WriteInteger("%FIELD_NAME%", otSLong, &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_INTEGER_TYPE %%%>
+ // <%%% START IF_FIELD_ANSISTRING_TYPE %%%>
+ dynamic_cast(ASerializer)->WriteUTF8String("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_ANSISTRING_TYPE %%%>
+ // <%%% START IF_FIELD_UTF8STRING_TYPE %%%>
+ dynamic_cast(ASerializer)->WriteUTF8String("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_UTF8STRING_TYPE %%%>
+ // <%%% START IF_FIELD_VARIANT_TYPE %%%>
+ dynamic_cast(ASerializer)->WriteVariant("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_VARIANT_TYPE %%%>
+ // <%%% START IF_FIELD_WIDESTRING_TYPE %%%>
+ dynamic_cast(ASerializer)->WriteWideString("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_WIDESTRING_TYPE %%%>
+ // <%%% START IF_FIELD_XML_TYPE %%%>
+ dynamic_cast(ASerializer)->WriteXml("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_XML_TYPE %%%>
+ // <%%% START IF_FIELD_ARRAY_TYPE %%%>
+ dynamic_cast(ASerializer)->WriteArray("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_ARRAY_TYPE %%%>
+ // <%%% START IF_FIELD_ENUM_TYPE %%%>
+ dynamic_cast(ASerializer)->WriteEnumerated("%FIELD_NAME%", __Get%FIELD_TYPE%Info, &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_ENUM_TYPE %%%>
+ // <%%% START IF_FIELD_STRUCT_TYPE %%%>
+ dynamic_cast(ASerializer)->WriteStruct("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_STRUCT_TYPE %%%>
+ // <%%% END ENTIRE_HIERARCHY_FIELDS %%%>
+ }
+}
+
+// <%%% END IF_HAS_FIELDS %%%>
+// <%%% END EXCEPTIONS %%%>
+// <%%% START STRUCTS %%%>
+// %STRUCT_NAME%
+
+void __fastcall %STRUCT_NAME%::Assign(Classes::TPersistent* iSource)
+{
+ inherited::Assign(iSource); // inherited typedef
+ // <%%% START IF_HAS_FIELDS %%%>
+
+ %STRUCT_NAME%* lSource = dynamic_cast<%STRUCT_NAME%*>(iSource);
+ if (lSource)
+ {
+ // <%%% END IF_HAS_FIELDS %%%>
+ // <%%% START FIELDS_NO_STRIP %%%>
+ // <%%% START IF_FIELD_TYPE_SIMPLE %%%>
+ %FIELD_NAME% = lSource->%FIELD_NAME%;
+ // <%%% END IF_FIELD_TYPE_SIMPLE %%%>
+ // <%%% START IF_FIELD_TYPE_COMPLEX %%%>
+ // <%%% START IF_NOT_AUTO_CREATE_FIELDS %%%>
+ if (f%FIELD_NAME% != NULL)
+ %FIELD_NAME%->Assign(lSource->%FIELD_NAME%);
+ // <%%% END IF_NOT_AUTO_CREATE_FIELDS %%%>
+ // <%%% START IF_AUTO_CREATE_FIELDS %%%>
+ %FIELD_NAME%->Assign(lSource->%FIELD_NAME%);
+ // <%%% END IF_AUTO_CREATE_FIELDS %%%>
+ // <%%% END IF_FIELD_TYPE_COMPLEX %%%>
+ // <%%% END FIELDS_NO_STRIP %%%>
+ // <%%% START IF_HAS_FIELDS %%%>
+ }
+ // <%%% END IF_HAS_FIELDS %%%>
+}
+
+// <%%% START FIELDS_NO_STRIP %%%>
+// <%%% START IF_FIELD_TYPE_COMPLEX %%%>
+%FIELD_TYPE%* __fastcall %STRUCT_NAME%::Get%FIELD_NAME%()
+{
+ // <%%% START IF_AUTO_CREATE_FIELDS %%%>
+ if (f%FIELD_NAME% == NULL)
+ f%FIELD_NAME% = new %FIELD_TYPE%();
+ // <%%% END IF_AUTO_CREATE_FIELDS %%%>
+ return f%FIELD_NAME%;
+}
+
+// <%%% END IF_FIELD_TYPE_COMPLEX %%%>
+// <%%% END FIELDS_NO_STRIP %%%>
+// <%%% START IF_HAS_FIELDS %%%>
+void __fastcall %STRUCT_NAME%::ReadComplex(TObject* ASerializer)
+{
+ if (dynamic_cast(ASerializer)->RecordStrictOrder)
+ {
+ // <%%% START IF_STRUCT_HAS_ANCESTOR %%%>
+ inherited::ReadException(ASerializer);
+ // <%%% END IF_STRUCT_HAS_ANCESTOR %%%>
+ // <%%% START FIELDS_NO_STRIP %%%>
+ // <%%% START IF_FIELD_TYPE_SIMPLE %%%>
+ %FIELD_TYPE% l_%FIELD_NAME% = %FIELD_NAME%;
+ // <%%% END IF_FIELD_TYPE_SIMPLE %%%>
+ // <%%% START IF_FIELD_TYPE_COMPLEX %%%>
+ %FIELD_TYPE%* l_%FIELD_NAME% = %FIELD_NAME%;
+ // <%%% END IF_FIELD_TYPE_COMPLEX %%%>
+ // <%%% START IF_FIELD_BINARY_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadBinary("%FIELD_NAME%", &l_%FIELD_NAME%);
+ if (%FIELD_NAME% != l_%FIELD_NAME%) delete %FIELD_NAME%;
+ // <%%% END IF_FIELD_BINARY_TYPE %%%>
+ // <%%% START IF_FIELD_BOOLEAN_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadEnumerated("%FIELD_NAME%", __GetboolInfo, &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_BOOLEAN_TYPE %%%>
+ // <%%% START IF_FIELD_CURRENCY_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadDouble("%FIELD_NAME%", ftCurr, &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_CURRENCY_TYPE %%%>
+ // <%%% START IF_FIELD_DATETIME_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadDateTime("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_DATETIME_TYPE %%%>
+ // <%%% START IF_FIELD_DECIMAL_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadDecimal("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_DECIMAL_TYPE %%%>
+ // <%%% START IF_FIELD_DOUBLE_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadDouble("%FIELD_NAME%", ftDouble, &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_DOUBLE_TYPE %%%>
+ // <%%% START IF_FIELD_GUID_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadGuid("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_GUID_TYPE %%%>
+ // <%%% START IF_FIELD_INT64_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadInt64("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_INT64_TYPE %%%>
+ // <%%% START IF_FIELD_INTEGER_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadInteger("%FIELD_NAME%", otSLong, &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_INTEGER_TYPE %%%>
+ // <%%% START IF_FIELD_ANSISTRING_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadUTF8String("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_ANSISTRING_TYPE %%%>
+ // <%%% START IF_FIELD_UTF8STRING_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadUTF8String("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_UTF8STRING_TYPE %%%>
+ // <%%% START IF_FIELD_VARIANT_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadVariant("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_VARIANT_TYPE %%%>
+ // <%%% START IF_FIELD_WIDESTRING_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadWideString("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_WIDESTRING_TYPE %%%>
+ // <%%% START IF_FIELD_XML_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadXml("%FIELD_NAME%", &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_XML_TYPE %%%>
+ // <%%% START IF_FIELD_ARRAY_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadArray("%FIELD_NAME%", __classid(%FIELD_TYPE%), &l_%FIELD_NAME%);
+ if (%FIELD_NAME% != l_%FIELD_NAME%) delete %FIELD_NAME%;
+ // <%%% END IF_FIELD_ARRAY_TYPE %%%>
+ // <%%% START IF_FIELD_ENUM_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadEnumerated("%FIELD_NAME%", __Get%FIELD_TYPE%Info, &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_ENUM_TYPE %%%>
+ // <%%% START IF_FIELD_STRUCT_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadStruct("%FIELD_NAME%", __classid(%FIELD_TYPE%), &l_%FIELD_NAME%);
+ if (%FIELD_NAME% != l_%FIELD_NAME%) delete %FIELD_NAME%;
+ // <%%% END IF_FIELD_STRUCT_TYPE %%%>
+ %FIELD_NAME% = l_%FIELD_NAME%;
+ // <%%% END FIELDS_NO_STRIP %%%>
+ }
+ else
+ {
+ // <%%% START ENTIRE_HIERARCHY_FIELDS %%%>
+ // <%%% START IF_FIELD_TYPE_SIMPLE %%%>
+ %FIELD_TYPE% l_%FIELD_NAME% = %FIELD_NAME%;
+ // <%%% END IF_FIELD_TYPE_SIMPLE %%%>
+ // <%%% START IF_FIELD_TYPE_COMPLEX %%%>
+ %FIELD_TYPE%* l_%FIELD_NAME% = %FIELD_NAME%;
+ // <%%% END IF_FIELD_TYPE_COMPLEX %%%>
+ // <%%% START IF_FIELD_BINARY_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadBinary("%FIELD_NAME%", &l_%FIELD_NAME%);
+ if (%FIELD_NAME% != l_%FIELD_NAME%) delete %FIELD_NAME%;
+ // <%%% END IF_FIELD_BINARY_TYPE %%%>
+ // <%%% START IF_FIELD_BOOLEAN_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadEnumerated("%FIELD_NAME%", __GetboolInfo, &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_BOOLEAN_TYPE %%%>
+ // <%%% START IF_FIELD_CURRENCY_TYPE %%%>
+ dynamic_cast(ASerializer)->ReadDouble("%FIELD_NAME%", ftCurr, &l_%FIELD_NAME%);
+ // <%%% END IF_FIELD_CURRENCY_TYPE %%%>
+ // <%%% START IF_FIELD_DATETIME_TYPE %%%>
+ dynamic_cast